index int64 0 0 | repo_id stringlengths 16 181 | file_path stringlengths 28 270 | content stringlengths 1 11.6M | __index_level_0__ int64 0 10k |
|---|---|---|---|---|
0 | petrpan-code/thebuilder/react-intersection-observer | petrpan-code/thebuilder/react-intersection-observer/docs/Recipes.md | # Recipes
The `IntersectionObserver` itself is just a simple but powerful tool. Here's a
few ideas for how you can use it.
## Lazy image load
It's actually easy to create your own lazy image loader, and this allows you to
build it according to your needs.
**Couple of tips**
- Don't set the `src` (or `srcset`) on t... | 1,100 |
0 | petrpan-code/thebuilder/react-intersection-observer | petrpan-code/thebuilder/react-intersection-observer/scripts/build-copy.js | const fs = require('fs');
const path = require('path');
const pck = require('../package');
const rootDir = path.resolve(__dirname, '../');
const distDir = path.resolve(__dirname, '../dist');
const filesToCopy = ['package.json', 'README.md', 'LICENSE'];
filesToCopy.forEach((file) => {
fs.copyFileSync(path.resolve(roo... | 1,101 |
0 | petrpan-code/thebuilder/react-intersection-observer | petrpan-code/thebuilder/react-intersection-observer/src/InView.tsx | import * as React from 'react';
import type { IntersectionObserverProps, PlainChildrenProps } from './index';
import { observe } from './observe';
type State = {
inView: boolean;
entry?: IntersectionObserverEntry;
};
function isPlainChildren(
props: IntersectionObserverProps | PlainChildrenProps,
): props is Pl... | 1,102 |
0 | petrpan-code/thebuilder/react-intersection-observer | petrpan-code/thebuilder/react-intersection-observer/src/index.tsx | 'use client';
import * as React from 'react';
export { InView } from './InView';
export { useInView } from './useInView';
export { observe, defaultFallbackInView } from './observe';
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export type ObserverInstanceCallback = (
inView: boolean,
entry: In... | 1,103 |
0 | petrpan-code/thebuilder/react-intersection-observer | petrpan-code/thebuilder/react-intersection-observer/src/observe.ts | import type { ObserverInstanceCallback } from './index';
const observerMap = new Map<
string,
{
id: string;
observer: IntersectionObserver;
elements: Map<Element, Array<ObserverInstanceCallback>>;
}
>();
const RootIds: WeakMap<Element | Document, string> = new WeakMap();
let rootId = 0;
let unsuppo... | 1,104 |
0 | petrpan-code/thebuilder/react-intersection-observer | petrpan-code/thebuilder/react-intersection-observer/src/test-utils.ts | import { act } from 'react-dom/test-utils';
type Item = {
callback: IntersectionObserverCallback;
elements: Set<Element>;
created: number;
};
let isMocking = false;
const observers = new Map<IntersectionObserver, Item>();
// If we are running in a valid testing environment, we can mock the IntersectionObserve... | 1,105 |
0 | petrpan-code/thebuilder/react-intersection-observer | petrpan-code/thebuilder/react-intersection-observer/src/useInView.tsx | import * as React from 'react';
import type { InViewHookResponse, IntersectionOptions } from './index';
import { observe } from './observe';
type State = {
inView: boolean;
entry?: IntersectionObserverEntry;
};
/**
* React Hooks make it easy to monitor the `inView` state of your components. Call
* the `useInVie... | 1,106 |
0 | petrpan-code/thebuilder/react-intersection-observer/src | petrpan-code/thebuilder/react-intersection-observer/src/__tests__/InView.test.tsx | import React from 'react';
import { screen, fireEvent, render } from '@testing-library/react';
import { intersectionMockInstance, mockAllIsIntersecting } from '../test-utils';
import { InView } from '../InView';
import { defaultFallbackInView } from '../observe';
test('Should render <InView /> intersecting', () => {
... | 1,107 |
0 | petrpan-code/thebuilder/react-intersection-observer/src | petrpan-code/thebuilder/react-intersection-observer/src/__tests__/hooks.test.tsx | import React, { useCallback } from 'react';
import { render, screen } from '@testing-library/react';
import { useInView } from '../useInView';
import {
intersectionMockInstance,
mockAllIsIntersecting,
mockIsIntersecting,
} from '../test-utils';
import { IntersectionOptions, defaultFallbackInView } from '../index'... | 1,108 |
0 | petrpan-code/thebuilder/react-intersection-observer/src | petrpan-code/thebuilder/react-intersection-observer/src/__tests__/observe.test.ts | import { mockIsIntersecting, intersectionMockInstance } from '../test-utils';
import { optionsToId } from '../observe';
import { observe } from '../';
test('should be able to use observe', () => {
const element = document.createElement('div');
const cb = vi.fn();
const unmount = observe(element, cb, { threshold:... | 1,109 |
0 | petrpan-code/thebuilder/react-intersection-observer/src | petrpan-code/thebuilder/react-intersection-observer/src/__tests__/setup.test.ts | import { mockAllIsIntersecting } from '../test-utils';
import { vi } from 'vitest';
vi.hoisted(() => {
// Clear the `beforeEach` from global, so we can detect if this is a test env
// @ts-ignore
global.vi = undefined;
});
beforeAll(() => {});
test('should warn if not running in test env', () => {
vi.spyOn(co... | 1,110 |
0 | petrpan-code/thebuilder/react-intersection-observer | petrpan-code/thebuilder/react-intersection-observer/storybook/package.json | {
"name": "storybook",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "storybook dev -p 9000",
"build": "storybook build"
},
"keywords": [],
"author": "Daniel Schmidt",
"repository": {
"type": "git",
"url": "https://github.com/thebuilder/react-intersecti... | 1,111 |
0 | petrpan-code/thebuilder/react-intersection-observer | petrpan-code/thebuilder/react-intersection-observer/storybook/postcss.config.js | module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
| 1,112 |
0 | petrpan-code/thebuilder/react-intersection-observer | petrpan-code/thebuilder/react-intersection-observer/storybook/readme.md | # react-intersection-observer
React implementation of the
[Intersection Observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API)
to tell you when an element enters or leaves the viewport.
Contains both a [Hooks](#useinview), [render props](#render-props) and
[plain children](#plain-ch... | 1,113 |
0 | petrpan-code/thebuilder/react-intersection-observer | petrpan-code/thebuilder/react-intersection-observer/storybook/tailwind.config.js | /** @type {import("@types/tailwindcss/tailwind-config").TailwindConfig } */
module.exports = {
content: ['stories/**/*.tsx'],
};
| 1,114 |
0 | petrpan-code/thebuilder/react-intersection-observer | petrpan-code/thebuilder/react-intersection-observer/storybook/tsconfig.json | {
"compilerOptions": {
"module": "esnext",
"target": "ESNext",
"lib": ["es6", "es7", "esnext", "dom"],
"jsx": "react",
"moduleResolution": "node",
"noImplicitReturns": true,
"strict": true,
"strictFunctionTypes": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": t... | 1,115 |
0 | petrpan-code/thebuilder/react-intersection-observer/storybook | petrpan-code/thebuilder/react-intersection-observer/storybook/.storybook/main.ts | import { StorybookConfig } from '@storybook/react-vite';
const config: StorybookConfig = {
framework: '@storybook/react-vite',
stories: [
'../stories/**/*.mdx',
'../stories/**/*.@(story|stories).@(ts|tsx)',
],
addons: ['@storybook/addon-essentials'],
core: {
builder: '@storybook/builder-vite',
... | 1,116 |
0 | petrpan-code/thebuilder/react-intersection-observer/storybook | petrpan-code/thebuilder/react-intersection-observer/storybook/.storybook/manager.ts | import { addons } from '@storybook/addons';
import { themes } from '@storybook/theming';
addons.setConfig({
theme: {
...themes.dark,
brandTitle: 'React IntersectionObserver',
brandUrl: 'https://github.com/thebuilder/react-intersection-observer',
},
});
| 1,117 |
0 | petrpan-code/thebuilder/react-intersection-observer/storybook | petrpan-code/thebuilder/react-intersection-observer/storybook/.storybook/preview-head.html | <meta
name="description"
content="React implementation of the Intersection Observer API to tell you when an element enters or leaves the viewport."
/>
<style>
.sbdocs .sbdocs-hidden {
display: none;
}
.sb-preparing-docs {
background: #1b1c1d;
}
.sb-preparing-docs .sb-previewBlock {
background:... | 1,118 |
0 | petrpan-code/thebuilder/react-intersection-observer/storybook | petrpan-code/thebuilder/react-intersection-observer/storybook/.storybook/preview.ts | import 'intersection-observer';
import 'tailwindcss/tailwind.css';
import { themes } from '@storybook/theming';
export const parameters = {
controls: {
expanded: true,
},
theme: {
...themes.dark,
},
docs: {
theme: themes.dark,
},
};
| 1,119 |
0 | petrpan-code/thebuilder/react-intersection-observer/storybook | petrpan-code/thebuilder/react-intersection-observer/storybook/stories/Hooks.story.tsx | import { Meta, StoryObj } from '@storybook/react';
import {
IntersectionOptions,
InView,
useInView,
} from 'react-intersection-observer';
import { motion } from 'framer-motion';
import React, { CSSProperties, useEffect, useRef, useState } from 'react';
import {
EntryDetails,
InViewBlock,
InViewIcon,
Statu... | 1,120 |
0 | petrpan-code/thebuilder/react-intersection-observer/storybook | petrpan-code/thebuilder/react-intersection-observer/storybook/stories/InView.story.tsx | import * as React from 'react';
import { CSSProperties } from 'react';
import { action } from '@storybook/addon-actions';
import { Meta, StoryObj } from '@storybook/react';
import { IntersectionOptions, InView } from 'react-intersection-observer';
import {
EntryDetails,
InViewBlock,
InViewIcon,
RootComponent,
... | 1,121 |
0 | petrpan-code/thebuilder/react-intersection-observer/storybook | petrpan-code/thebuilder/react-intersection-observer/storybook/stories/Intro.mdx | import { Markdown } from '@storybook/addon-docs';
import Readme from '../readme.md?raw';
<Markdown>{Readme}</Markdown> | 1,122 |
0 | petrpan-code/thebuilder/react-intersection-observer/storybook | petrpan-code/thebuilder/react-intersection-observer/storybook/stories/Recipes.mdx | import { Markdown } from '@storybook/addon-docs';
import Recipes from '../../docs/Recipes.md?raw';
<Markdown>{Recipes}</Markdown> | 1,123 |
0 | petrpan-code/thebuilder/react-intersection-observer/storybook | petrpan-code/thebuilder/react-intersection-observer/storybook/stories/elements.tsx | import { AnimatePresence, motion } from 'framer-motion';
import React, { useEffect, useRef, useState } from 'react';
import type { IntersectionOptions } from 'react-intersection-observer';
type ScrollProps = {
children: React.ReactNode;
indicators?: 'all' | 'top' | 'bottom' | 'none';
};
export function ErrorMessa... | 1,124 |
0 | petrpan-code/thebuilder/react-intersection-observer/storybook | petrpan-code/thebuilder/react-intersection-observer/storybook/stories/story-utils.ts | import type { IntersectionOptions } from 'react-intersection-observer';
import { ArgTypes } from '@storybook/types';
export const argTypes: ArgTypes<IntersectionOptions> = {
root: {
table: { disable: true },
description:
"The IntersectionObserver interface's read-only `root` property identifies the Ele... | 1,125 |
0 | petrpan-code/WalletConnect | petrpan-code/WalletConnect/web3modal/.eslintrc.json | {
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:all",
"plugin:@typescript-eslint/stylistic-type-checked",
"plugin:@typescript-eslint/strict-type-checked",
"prettier"
],
"parserOptions": {
"project": ["tsconfig.json"]
},
"... | 1,126 |
0 | petrpan-code/WalletConnect | petrpan-code/WalletConnect/web3modal/.npmrc | script-shell=sh
| 1,127 |
0 | petrpan-code/WalletConnect | petrpan-code/WalletConnect/web3modal/.prettierrc.json | {
"arrowParens": "avoid",
"printWidth": 100,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"singleAttributePerLine": false,
"semi": false
}
| 1,128 |
0 | petrpan-code/WalletConnect | petrpan-code/WalletConnect/web3modal/LICENSE | Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and d... | 1,129 |
0 | petrpan-code/WalletConnect | petrpan-code/WalletConnect/web3modal/dangerfile.ts | /* eslint-disable no-await-in-loop */
import { danger, fail, message, warn } from 'danger'
import corePackageJson from './packages/core/package.json' assert { type: 'json' }
import { ConstantsUtil } from './packages/scaffold-utils/src/ConstantsUtil'
// -- Constants -----------------------------------------------------... | 1,130 |
0 | petrpan-code/WalletConnect | petrpan-code/WalletConnect/web3modal/lerna.json | {
"npmClient": "npm",
"packages": [
"packages/common",
"packages/ui",
"packages/core",
"packages/scaffold",
"packages/scaffold-react",
"packages/scaffold-vue",
"packages/polyfills",
"packages/utils",
"packages/siwe",
"packages/wagmi",
"packages/ethers",
"packages/ethe... | 1,131 |
0 | petrpan-code/WalletConnect | petrpan-code/WalletConnect/web3modal/package-lock.json | {
"name": "web3modal",
"version": "3.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "web3modal",
"version": "3.0.0",
"workspaces": [
"packages/common",
"packages/ui",
"packages/core",
"packages/scaffold",
"packages/scaffo... | 1,132 |
0 | petrpan-code/WalletConnect | petrpan-code/WalletConnect/web3modal/package.json | {
"name": "web3modal",
"version": "3.0.0",
"private": true,
"type": "module",
"scripts": {
"build": "turbo run build",
"watch": "turbo run watch --parallel",
"gallery": "turbo run dev:gallery --parallel",
"laboratory": "turbo run dev:laboratory --parallel",
"examples": "turbo run dev:examp... | 1,133 |
0 | petrpan-code/WalletConnect | petrpan-code/WalletConnect/web3modal/readme.md | > [!NOTE]
> Looking for v2? [switch the branch](https://github.com/WalletConnect/web3modal/tree/V2).
#### 📚 [Documentation](https://docs.walletconnect.com/web3modal/about)
#### 🧪 [Laboratory](https://lab.web3modal.com)
#### 🔗 [Website](https://web3modal.com)
# Web3Modal
Your on-ramp to web3 multichain. Web3Moda... | 1,134 |
0 | petrpan-code/WalletConnect | petrpan-code/WalletConnect/web3modal/tsconfig.json | {
"compilerOptions": {
"target": "ES2021",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"module": "ESNext",
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
"moduleResolution": "Bundler",
"experimentalDecorators": true,
"reso... | 1,135 |
0 | petrpan-code/WalletConnect | petrpan-code/WalletConnect/web3modal/turbo.json | {
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**"]
},
"watch": {
"dependsOn": ["^watch"],
"cache": false
},
"build:gallery": {
"dependsOn": ["build", "^build:gallery"],
"outputs": ["out/**"]... | 1,136 |
0 | petrpan-code/WalletConnect/web3modal | petrpan-code/WalletConnect/web3modal/.vscode/settings.json | {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.wordWrapColumn": 100,
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"explorer.sortOrder": "type",
"extensions.ignoreRecommendations": true,
"files.aut... | 1,137 |
0 | petrpan-code/WalletConnect/web3modal/apps | petrpan-code/WalletConnect/web3modal/apps/gallery/.eslintrc.json | {
"extends": ["../../.eslintrc.json"]
}
| 1,138 |
0 | petrpan-code/WalletConnect/web3modal/apps | petrpan-code/WalletConnect/web3modal/apps/gallery/package.json | {
"name": "@apps/gallery",
"version": "3.3.2",
"private": true,
"main": "index.js",
"scripts": {
"dev:gallery": "storybook dev -p 6006",
"build:gallery": "storybook build -o out",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"dependencies": {
"@web3modal/ui": "3.3.2",
"lit": "3.0.0",
... | 1,139 |
0 | petrpan-code/WalletConnect/web3modal/apps | petrpan-code/WalletConnect/web3modal/apps/gallery/tsconfig.json | {
"extends": "../../tsconfig.json"
}
| 1,140 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery | petrpan-code/WalletConnect/web3modal/apps/gallery/.storybook/main.ts | /** @type { import('@storybook/web-components-vite').StorybookConfig } */
export default {
stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
core: {
disableTelemetry: true
},
framework: {
name: '@storybook/w... | 1,141 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery | petrpan-code/WalletConnect/web3modal/apps/gallery/.storybook/preview.tsx | import { Controls, Description, Primary, Source, Subtitle, Title } from '@storybook/blocks'
import { GLOBALS_UPDATED, SET_GLOBALS } from '@storybook/core-events'
import { addons } from '@storybook/preview-api'
import { themes } from '@storybook/theming'
import { initializeTheming, setColorTheme } from '@web3modal/ui/sr... | 1,142 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/components | petrpan-code/WalletConnect/web3modal/apps/gallery/components/gallery-container/index.ts | import { customElement } from '@web3modal/ui'
import { html, LitElement } from 'lit'
import { property } from 'lit/decorators.js'
import styles from './styles'
@customElement('gallery-container')
export class GalleryContainer extends LitElement {
public static override styles = [styles]
// -- state & properties -... | 1,143 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/components | petrpan-code/WalletConnect/web3modal/apps/gallery/components/gallery-container/styles.ts | import { css } from 'lit'
export default css`
div {
width: var(--container-width);
height: var(--container-height);
display: flex;
justify-content: center;
align-items: center;
background-color: inherit;
}
::slotted(*) {
width: 100%;
}
`
| 1,144 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/components | petrpan-code/WalletConnect/web3modal/apps/gallery/components/gallery-placeholder/index.ts | import { customElement } from '@web3modal/ui'
import { html, LitElement } from 'lit'
import { property } from 'lit/decorators.js'
import { classMap } from 'lit/directives/class-map.js'
import styles from './styles'
@customElement('gallery-placeholder')
export class GalleryPlaceholder extends LitElement {
public stat... | 1,145 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/components | petrpan-code/WalletConnect/web3modal/apps/gallery/components/gallery-placeholder/styles.ts | import { css } from 'lit'
export default css`
.placeholder-size-xxs {
width: 8px;
height: 8px;
}
.placeholder-size-xs {
width: 16px;
height: 16px;
}
.placeholder-size-sm {
width: 24px;
height: 24px;
}
.placeholder-size-md {
width: 32px;
height: 32px;
}
.placeholder... | 1,146 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/assets/Icons.mdx | import { Meta, Title } from '@storybook/blocks'
import '@web3modal/ui/src/layout/wui-grid'
import '@web3modal/ui/src/layout/wui-flex'
import '@web3modal/ui/src/components/wui-icon'
import '@web3modal/ui/src/components/wui-text'
import { iconOptions } from '../../utils/PresetUtils'
<Meta title="assets/Icons" />
<Title... | 1,147 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/components/wui-card.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/components/wui-card'
import type { WuiCard } from '@web3modal/ui/src/components/wui-card'
import { html } from 'lit'
import '../../components/gallery-placeholder'
type Component = Meta<WuiCard>
export default {
title: 'Components/wui-ca... | 1,148 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/components/wui-icon.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/components/wui-icon'
import type { WuiIcon } from '@web3modal/ui/src/components/wui-icon'
import { html } from 'lit'
import { colorOptions, iconOptions } from '../../utils/PresetUtils'
type Component = Meta<WuiIcon>
export default {
tit... | 1,149 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/components/wui-image.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/components/wui-image'
import type { WuiImage } from '@web3modal/ui/src/components/wui-image'
import { html } from 'lit'
import { walletImageSrc } from '../../utils/PresetUtils'
type Component = Meta<WuiImage>
export default {
title: 'Co... | 1,150 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/components/wui-loading-hexagon.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/components/wui-loading-hexagon'
import type { WuiLoadingHexagon } from '@web3modal/ui/src/components/wui-loading-hexagon'
import { html } from 'lit'
type Component = Meta<WuiLoadingHexagon>
export default {
title: 'Components/wui-loadin... | 1,151 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/components/wui-loading-spinner.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/components/wui-loading-spinner'
import type { WuiLoadingSpinner } from '@web3modal/ui/src/components/wui-loading-spinner'
import { html } from 'lit'
import { colorOptions } from '../../utils/PresetUtils'
type Component = Meta<WuiLoadingSpi... | 1,152 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/components/wui-loading-thumbnail.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/components/wui-loading-thumbnail'
import type { WuiLoadingThumbnail } from '@web3modal/ui/src/components/wui-loading-thumbnail'
import { html } from 'lit'
type Component = Meta<WuiLoadingThumbnail>
export default {
title: 'Components/wu... | 1,153 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/components/wui-shimmer.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/components/wui-shimmer'
import type { WuiShimmer } from '@web3modal/ui/src/components/wui-shimmer'
import { html } from 'lit'
import { borderRadiusOptions } from '../../utils/PresetUtils'
type Component = Meta<WuiShimmer>
export default {... | 1,154 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/components/wui-text.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/components/wui-text'
import type { WuiText } from '@web3modal/ui/src/components/wui-text'
import { html } from 'lit'
import { ifDefined } from 'lit/directives/if-defined.js'
import { colorOptions, textAlignOptions, textOptions } from '../..... | 1,155 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/components/wui-visual.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/components/wui-visual'
import type { WuiVisual } from '@web3modal/ui/src/components/wui-visual'
import { html } from 'lit'
import { visualOptions } from '../../utils/PresetUtils'
type Component = Meta<WuiVisual>
export default {
title: ... | 1,156 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-account-button.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-account-button'
import type { WuiAccountButton } from '@web3modal/ui/src/composites/wui-account-button'
import { html } from 'lit'
import { address, avatarImageSrc, networkImageSrc } from '../../utils/PresetUtils'
type Compo... | 1,157 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-all-wallets-image.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-all-wallets-image'
import type { WuiAllWalletsImage } from '@web3modal/ui/src/composites/wui-all-wallets-image'
import { html } from 'lit'
import { walletImagesOptions } from '../../utils/PresetUtils'
type Component = Meta<W... | 1,158 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-avatar.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-avatar'
import type { WuiAvatar } from '@web3modal/ui/src/composites/wui-avatar'
import { html } from 'lit'
import { address, avatarImageSrc } from '../../utils/PresetUtils'
type Component = Meta<WuiAvatar>
export default {... | 1,159 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-button.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-button'
import type { WuiButton } from '@web3modal/ui/src/composites/wui-button'
import type { IconType } from '@web3modal/ui/src/utils/TypesUtil'
import { html } from 'lit'
import { buttonOptions, iconOptions } from '../../u... | 1,160 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-card-select-loader.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-card-select-loader'
import type { WuiCardSelectLoader } from '@web3modal/ui/src/composites/wui-card-select-loader'
import { html } from 'lit'
import { cardSelectOptions } from '../../utils/PresetUtils'
type Component = Meta<... | 1,161 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-card-select.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-card-select'
import type { WuiCardSelect } from '@web3modal/ui/src/composites/wui-card-select'
import { html } from 'lit'
import '../../components/gallery-container'
import { cardSelectOptions, walletImageSrc } from '../../ut... | 1,162 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-chip.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-chip'
import type { WuiChip } from '@web3modal/ui/src/composites/wui-chip'
import { html } from 'lit'
import {
chipOptions,
externalLink,
iconOptions,
walletImagesOptions
} from '../../utils/PresetUtils'
type Compone... | 1,163 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-connect-button.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-connect-button'
import type { WuiConnectButton } from '@web3modal/ui/src/composites/wui-connect-button'
import { html } from 'lit'
type Component = Meta<WuiConnectButton>
export default {
title: 'Composites/wui-connect-bu... | 1,164 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-cta-button.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-cta-button'
import type { WuiCtaButton } from '@web3modal/ui/src/composites/wui-cta-button'
import { html } from 'lit'
import '../../components/gallery-container'
type Component = Meta<WuiCtaButton>
export default {
title:... | 1,165 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-email-input.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-email-input'
import type { WuiEmailInput } from '@web3modal/ui/src/composites/wui-email-input'
import { html } from 'lit'
import '../../components/gallery-container'
type Component = Meta<WuiEmailInput>
export default {
t... | 1,166 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-icon-box.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-icon-box'
import type { WuiIconBox } from '@web3modal/ui/src/composites/wui-icon-box'
import { html } from 'lit'
import {
backgroundOptions,
colorOptions,
iconBoxBorderOptions,
iconOptions
} from '../../utils/PresetU... | 1,167 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-icon-link.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-icon-link'
import type { WuiIconLink } from '@web3modal/ui/src/composites/wui-icon-link'
import { html } from 'lit'
import { colorOptions, iconOptions } from '../../utils/PresetUtils'
type Component = Meta<WuiIconLink>
expo... | 1,168 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-input-element.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-input-element'
import type { WuiInputElement } from '@web3modal/ui/src/composites/wui-input-element'
import { html } from 'lit'
import { iconOptions } from '../../utils/PresetUtils'
type Component = Meta<WuiInputElement>
ex... | 1,169 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-input-numeric.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-input-numeric'
import type { WuiInputNumeric } from '@web3modal/ui/src/composites/wui-input-numeric'
import { html } from 'lit'
import '../../components/gallery-container'
type Component = Meta<WuiInputNumeric>
export defau... | 1,170 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-input-text.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-input-text'
import type { WuiInputText } from '@web3modal/ui/src/composites/wui-input-text'
import { html } from 'lit'
import '../../components/gallery-container'
import { iconOptions } from '../../utils/PresetUtils'
type Co... | 1,171 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-link.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-link'
import type { WuiLink } from '@web3modal/ui/src/composites/wui-link'
import type { IconType } from '@web3modal/ui/src/utils/TypesUtil'
import { html } from 'lit'
import { iconOptions } from '../../utils/PresetUtils'
ty... | 1,172 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-list-item.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-list-item'
import type { WuiListItem } from '@web3modal/ui/src/composites/wui-list-item'
import { html } from 'lit'
import '../../components/gallery-container'
import { accountEntryOptions, iconOptions, networkImageSrc } from... | 1,173 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-list-wallet.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-list-wallet'
import type { WuiListWallet } from '@web3modal/ui/src/composites/wui-list-wallet'
import { html } from 'lit'
import '../../components/gallery-container'
import {
iconOptions,
tagLabelOptions,
tagOptions,
... | 1,174 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-logo-select.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-logo-select'
import type { WuiLogoSelect } from '@web3modal/ui/src/composites/wui-logo-select'
import { html } from 'lit'
import { logoOptions } from '../../utils/PresetUtils'
type Component = Meta<WuiLogoSelect>
export def... | 1,175 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-logo.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-logo'
import type { WuiLogo } from '@web3modal/ui/src/composites/wui-logo'
import { html } from 'lit'
import { logoOptions } from '../../utils/PresetUtils'
type Component = Meta<WuiLogo>
export default {
title: 'Composite... | 1,176 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-network-button.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-network-button'
import type { WuiNetworkButton } from '@web3modal/ui/src/composites/wui-network-button'
import { html } from 'lit'
import { networkImageSrc } from '../../utils/PresetUtils'
type Component = Meta<WuiNetworkBut... | 1,177 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-network-image.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-network-image'
import type { WuiNetworkImage } from '@web3modal/ui/src/composites/wui-network-image'
import { html } from 'lit'
import { networkImageSrc } from '../../utils/PresetUtils'
type Component = Meta<WuiNetworkImage>... | 1,178 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-otp.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-otp'
import type { WuiOtp } from '@web3modal/ui/src/composites/wui-otp'
import { html } from 'lit'
import '../../components/gallery-container'
type Component = Meta<WuiOtp>
export default {
title: 'Composites/wui-otp',
... | 1,179 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-qr-code.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-qr-code'
import type { WuiQrCode } from '@web3modal/ui/src/composites/wui-qr-code'
import { html } from 'lit'
import { themeOptions, walletImageSrc } from '../../utils/PresetUtils'
type Component = Meta<WuiQrCode>
export de... | 1,180 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-search-bar.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-search-bar'
import type { WuiSearchBar } from '@web3modal/ui/src/composites/wui-search-bar'
import { html } from 'lit'
import '../../components/gallery-container'
type Component = Meta<WuiSearchBar>
export default {
title... | 1,181 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-snackbar.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-snackbar'
import type { WuiSnackbar } from '@web3modal/ui/src/composites/wui-snackbar'
import { html } from 'lit'
import { colorOptions, iconOptions } from '../../utils/PresetUtils'
type Component = Meta<WuiSnackbar>
export... | 1,182 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-tabs.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-tabs'
import type { WuiTabs } from '@web3modal/ui/src/composites/wui-tabs'
import { html } from 'lit'
type Component = Meta<WuiTabs>
export default {
title: 'Composites/wui-tabs',
args: {
tabs: [
{ icon: 'mobi... | 1,183 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-tag.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-tag'
import type { WuiTag } from '@web3modal/ui/src/composites/wui-tag'
import { html } from 'lit'
import { tagOptions } from '../../utils/PresetUtils'
type Component = Meta<WuiTag>
export default {
title: 'Composites/wui... | 1,184 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-tooltip.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-tooltip'
import type { WuiTooltip } from '@web3modal/ui/src/composites/wui-tooltip'
import { html } from 'lit'
import { placementOptions } from '../../utils/PresetUtils'
type Component = Meta<WuiTooltip>
export default {
... | 1,185 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-transaction-list-item-loader.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-transaction-list-item-loader'
import type { WuiTransactionListItemLoader } from '@web3modal/ui/src/composites/wui-transaction-list-item-loader'
import { html } from 'lit'
import '../../components/gallery-container'
type Comp... | 1,186 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-transaction-list-item.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-transaction-list-item'
import type { WuiTransactionListItem } from '@web3modal/ui/src/composites/wui-transaction-list-item'
import { html } from 'lit'
import '../../components/gallery-container'
import {
transactionDirectio... | 1,187 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-transaction-visual.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-transaction-visual'
import type { WuiTransactionVisual } from '@web3modal/ui/src/composites/wui-transaction-visual'
import { html } from 'lit'
import {
transactionDirectionOptions,
transactionTypeOptions,
transactionSt... | 1,188 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-visual-thumbnail.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-visual-thumbnail'
import type { WuiVisualThumbnail } from '@web3modal/ui/src/composites/wui-visual-thumbnail'
import { html } from 'lit'
import { walletImageSrc } from '../../utils/PresetUtils'
type Component = Meta<WuiVisua... | 1,189 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/composites/wui-wallet-image.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/composites/wui-wallet-image'
import type { WuiWalletImage } from '@web3modal/ui/src/composites/wui-wallet-image'
import { html } from 'lit'
import { walletImageSrc } from '../../utils/PresetUtils'
type Component = Meta<WuiWalletImage>
exp... | 1,190 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/layout/wui-flex.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/layout/wui-flex'
import type { WuiFlex } from '@web3modal/ui/src/layout/wui-flex'
import { html } from 'lit'
import '../../components/gallery-placeholder'
import {
flexAlignItemsOptions,
flexBasisOptions,
flexDirectionOptions,
flexG... | 1,191 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/layout/wui-grid.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/layout/wui-grid'
import type { WuiGrid } from '@web3modal/ui/src/layout/wui-grid'
import { html } from 'lit'
import '../../components/gallery-placeholder'
import { gridContentOptions, gridItemsOptions, spacingOptions } from '../../utils/Pre... | 1,192 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/layout/wui-separator.stories.ts | import type { Meta } from '@storybook/web-components'
import '@web3modal/ui/src/layout/wui-separator'
import type { WuiSeparator } from '@web3modal/ui/src/layout/wui-separator'
import { html } from 'lit'
import { ifDefined } from 'lit/directives/if-defined.js'
import '../../components/gallery-container'
type Component... | 1,193 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/theme/BorderRadius.mdx | import { Meta, Title } from '@storybook/blocks'
<Meta title="theme/BorderRadius" />
<Title>Border Radius</Title>
```css
--wui-border-radius-4xs: 6px;
--wui-border-radius-3xs: 8px;
--wui-border-radius-xxs: 12px;
--wui-border-radius-xs: 16px;
--wui-border-radius-s: 20px;
--wui-border-radius-m: 28px;
--wui-border-radiu... | 1,194 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/theme/Colors.mdx | import { Meta, ColorPalette, Title, ColorItem } from '@storybook/blocks'
<Meta title="theme/Colors" />
<Title>Dark</Title>
<ColorPalette>
<ColorItem
title="Blue"
subtitle="80 | 90 | 100"
colors={{
'wui-color-blue-80': '#6CB4FF',
'wui-color-blue-90': '#59AAFF',
'wui-color-blue-100': '#... | 1,195 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/theme/Overlay.mdx | import { Meta, ColorPalette, Title, ColorItem } from '@storybook/blocks'
<Meta title="theme/Overlay" />
<Title>Overlay</Title>
<ColorPalette>
<ColorItem
title="Overlay"
subtitle="002 | 005 | 010"
colors={{
'wui-overlay-002': 'rgba(0, 0, 0, 0.02)',
'wui-overlay-005': 'rgba(0, 0, 0, 0.05)',
... | 1,196 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery/stories | petrpan-code/WalletConnect/web3modal/apps/gallery/stories/theme/Spacing.mdx | import { Meta, Title } from '@storybook/blocks'
<Meta title="theme/Spacing" />
<Title>Spacing</Title>
```css
--wui-spacing-0: 0px;
--wui-spacing-4xs: 2px;
--wui-spacing-3xs: 4px;
--wui-spacing-xxs: 6px;
--wui-spacing-xs: 8px;
--wui-spacing-s: 12px;
--wui-spacing-m: 14px;
--wui-spacing-l: 16px;
--wui-spacing-xl: 20px... | 1,197 |
0 | petrpan-code/WalletConnect/web3modal/apps/gallery | petrpan-code/WalletConnect/web3modal/apps/gallery/utils/PresetUtils.ts | import type {
AccountEntryType,
BackgroundType,
BorderRadiusType,
ButtonType,
CardSelectType,
ChipType,
ColorType,
FlexAlignItemsType,
FlexBasisType,
FlexDirectionType,
FlexGrowType,
FlexJustifyContentType,
FlexShrinkType,
FlexWrapType,
GridContentType,
GridItemsType,
IconBoxBorderType... | 1,198 |
0 | petrpan-code/WalletConnect/web3modal/apps | petrpan-code/WalletConnect/web3modal/apps/laboratory/.eslintrc.json | {
"extends": ["../../.eslintrc.json"]
}
| 1,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.