gooee 0.0.0-stage → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +99 -2
- package/package.json +36 -4
- package/scripts/add.js +533 -0
- package/scripts/pro-components.json +82 -0
- package/src/base.css +39 -0
- package/src/components/Accordion/Accordion.module.css +90 -0
- package/src/components/Accordion/Accordion.tsx +125 -0
- package/src/components/Accordion/index.ts +1 -0
- package/src/components/Alert/Alert.module.css +121 -0
- package/src/components/Alert/Alert.tsx +90 -0
- package/src/components/Alert/index.ts +1 -0
- package/src/components/AlertDialog/AlertDialog.module.css +2 -0
- package/src/components/AlertDialog/AlertDialog.tsx +108 -0
- package/src/components/AlertDialog/index.ts +1 -0
- package/src/components/AnimatedNumber/AnimatedNumber.module.css +48 -0
- package/src/components/AnimatedNumber/AnimatedNumber.tsx +52 -0
- package/src/components/AnimatedNumber/index.ts +1 -0
- package/src/components/AspectRatio/AspectRatio.module.css +15 -0
- package/src/components/AspectRatio/AspectRatio.tsx +12 -0
- package/src/components/AspectRatio/index.ts +1 -0
- package/src/components/Avatar/Avatar.module.css +62 -0
- package/src/components/Avatar/Avatar.tsx +55 -0
- package/src/components/Avatar/index.ts +3 -0
- package/src/components/AvatarGroup/AvatarGroup.module.css +53 -0
- package/src/components/AvatarGroup/AvatarGroup.tsx +43 -0
- package/src/components/AvatarGroup/index.ts +1 -0
- package/src/components/Badge/Badge.module.css +69 -0
- package/src/components/Badge/Badge.tsx +25 -0
- package/src/components/Badge/index.ts +1 -0
- package/src/components/Breadcrumb/Breadcrumb.module.css +104 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +76 -0
- package/src/components/Breadcrumb/index.ts +1 -0
- package/src/components/Button/Button.module.css +191 -0
- package/src/components/Button/Button.tsx +148 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/ButtonGroup/ButtonGroup.module.css +59 -0
- package/src/components/ButtonGroup/ButtonGroup.tsx +45 -0
- package/src/components/ButtonGroup/index.ts +1 -0
- package/src/components/Card/Card.module.css +82 -0
- package/src/components/Card/Card.tsx +34 -0
- package/src/components/Card/index.ts +1 -0
- package/src/components/Center/Center.module.css +15 -0
- package/src/components/Center/Center.tsx +28 -0
- package/src/components/Center/index.ts +1 -0
- package/src/components/Checkbox/Checkbox.module.css +120 -0
- package/src/components/Checkbox/Checkbox.tsx +133 -0
- package/src/components/Checkbox/index.ts +1 -0
- package/src/components/CheckboxGroup/CheckboxGroup.module.css +30 -0
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +88 -0
- package/src/components/CheckboxGroup/index.ts +1 -0
- package/src/components/Cluster/Cluster.module.css +25 -0
- package/src/components/Cluster/Cluster.tsx +26 -0
- package/src/components/Cluster/index.ts +1 -0
- package/src/components/CodeBlock/CodeBlock.module.css +74 -0
- package/src/components/CodeBlock/CodeBlock.tsx +53 -0
- package/src/components/CodeBlock/highlight.ts +73 -0
- package/src/components/CodeBlock/index.ts +1 -0
- package/src/components/Collapsible/Collapsible.module.css +75 -0
- package/src/components/Collapsible/Collapsible.tsx +71 -0
- package/src/components/Collapsible/index.ts +1 -0
- package/src/components/Container/Container.module.css +14 -0
- package/src/components/Container/Container.tsx +19 -0
- package/src/components/Container/index.ts +1 -0
- package/src/components/CopyButton/CopyButton.module.css +125 -0
- package/src/components/CopyButton/CopyButton.tsx +160 -0
- package/src/components/CopyButton/index.ts +1 -0
- package/src/components/Dial/Dial.module.css +344 -0
- package/src/components/Dial/Dial.tsx +332 -0
- package/src/components/Dial/index.ts +1 -0
- package/src/components/Dialog/Dialog.module.css +190 -0
- package/src/components/Dialog/Dialog.tsx +100 -0
- package/src/components/Dialog/index.ts +1 -0
- package/src/components/Divider/Divider.module.css +39 -0
- package/src/components/Divider/Divider.tsx +34 -0
- package/src/components/Divider/index.ts +1 -0
- package/src/components/DropdownMenu/DropdownMenu.module.css +134 -0
- package/src/components/DropdownMenu/DropdownMenu.tsx +215 -0
- package/src/components/DropdownMenu/index.ts +1 -0
- package/src/components/EmptyState/EmptyState.module.css +66 -0
- package/src/components/EmptyState/EmptyState.tsx +38 -0
- package/src/components/EmptyState/index.ts +1 -0
- package/src/components/Fab/Fab.module.css +176 -0
- package/src/components/Fab/Fab.tsx +117 -0
- package/src/components/Fab/index.ts +1 -0
- package/src/components/Fieldset/Fieldset.module.css +34 -0
- package/src/components/Fieldset/Fieldset.tsx +41 -0
- package/src/components/Fieldset/index.ts +1 -0
- package/src/components/FormField/FormField.module.css +62 -0
- package/src/components/FormField/FormField.tsx +91 -0
- package/src/components/FormField/index.ts +2 -0
- package/src/components/Grid/Grid.module.css +39 -0
- package/src/components/Grid/Grid.tsx +35 -0
- package/src/components/Grid/index.ts +1 -0
- package/src/components/HoldToConfirm/HoldToConfirm.module.css +175 -0
- package/src/components/HoldToConfirm/HoldToConfirm.tsx +334 -0
- package/src/components/HoldToConfirm/index.ts +1 -0
- package/src/components/IconButton/IconButton.module.css +78 -0
- package/src/components/IconButton/IconButton.tsx +35 -0
- package/src/components/IconButton/index.ts +1 -0
- package/src/components/Input/Input.module.css +157 -0
- package/src/components/Input/Input.tsx +133 -0
- package/src/components/Input/index.ts +1 -0
- package/src/components/InputGroup/InputGroup.module.css +146 -0
- package/src/components/InputGroup/InputGroup.tsx +90 -0
- package/src/components/InputGroup/index.ts +1 -0
- package/src/components/Kbd/Kbd.module.css +28 -0
- package/src/components/Kbd/Kbd.tsx +38 -0
- package/src/components/Kbd/index.ts +1 -0
- package/src/components/Link/Link.module.css +65 -0
- package/src/components/Link/Link.tsx +41 -0
- package/src/components/Link/index.ts +1 -0
- package/src/components/LivePill/LivePill.module.css +207 -0
- package/src/components/LivePill/LivePill.tsx +182 -0
- package/src/components/LivePill/index.ts +1 -0
- package/src/components/Meter/Meter.module.css +91 -0
- package/src/components/Meter/Meter.tsx +109 -0
- package/src/components/Meter/index.ts +1 -0
- package/src/components/MorphButton/MorphButton.module.css +152 -0
- package/src/components/MorphButton/MorphButton.tsx +203 -0
- package/src/components/MorphButton/index.ts +1 -0
- package/src/components/NumberInput/NumberInput.module.css +104 -0
- package/src/components/NumberInput/NumberInput.tsx +252 -0
- package/src/components/NumberInput/index.ts +2 -0
- package/src/components/Pagination/Pagination.module.css +88 -0
- package/src/components/Pagination/Pagination.tsx +126 -0
- package/src/components/Pagination/index.ts +1 -0
- package/src/components/PasswordInput/PasswordInput.module.css +64 -0
- package/src/components/PasswordInput/PasswordInput.tsx +63 -0
- package/src/components/PasswordInput/index.ts +2 -0
- package/src/components/PickerWheel/PickerWheel.module.css +123 -0
- package/src/components/PickerWheel/PickerWheel.tsx +326 -0
- package/src/components/PickerWheel/index.ts +1 -0
- package/src/components/Popover/Popover.module.css +78 -0
- package/src/components/Popover/Popover.tsx +117 -0
- package/src/components/Popover/index.ts +1 -0
- package/src/components/ProgressBar/ProgressBar.module.css +61 -0
- package/src/components/ProgressBar/ProgressBar.tsx +48 -0
- package/src/components/ProgressBar/index.ts +1 -0
- package/src/components/Prose/Prose.module.css +115 -0
- package/src/components/Prose/Prose.tsx +14 -0
- package/src/components/Prose/index.ts +1 -0
- package/src/components/Radio/Radio.module.css +106 -0
- package/src/components/Radio/Radio.tsx +115 -0
- package/src/components/Radio/index.ts +1 -0
- package/src/components/Retime/Retime.tsx +116 -0
- package/src/components/Retime/index.ts +1 -0
- package/src/components/RulerScrubber/RulerScrubber.module.css +146 -0
- package/src/components/RulerScrubber/RulerScrubber.tsx +209 -0
- package/src/components/RulerScrubber/index.ts +1 -0
- package/src/components/ScrollArea/ScrollArea.module.css +72 -0
- package/src/components/ScrollArea/ScrollArea.tsx +172 -0
- package/src/components/ScrollArea/index.ts +1 -0
- package/src/components/SearchInput/SearchInput.module.css +53 -0
- package/src/components/SearchInput/SearchInput.tsx +104 -0
- package/src/components/SearchInput/index.ts +2 -0
- package/src/components/SegmentedControl/SegmentedControl.module.css +150 -0
- package/src/components/SegmentedControl/SegmentedControl.tsx +169 -0
- package/src/components/SegmentedControl/index.ts +1 -0
- package/src/components/Select/Select.module.css +204 -0
- package/src/components/Select/Select.tsx +254 -0
- package/src/components/Select/index.ts +1 -0
- package/src/components/Sheet/Sheet.module.css +228 -0
- package/src/components/Sheet/Sheet.tsx +449 -0
- package/src/components/Sheet/index.ts +1 -0
- package/src/components/Skeleton/Skeleton.module.css +56 -0
- package/src/components/Skeleton/Skeleton.tsx +37 -0
- package/src/components/Skeleton/index.ts +1 -0
- package/src/components/Slider/Slider.module.css +155 -0
- package/src/components/Slider/Slider.tsx +200 -0
- package/src/components/Slider/index.ts +1 -0
- package/src/components/Spinner/Spinner.module.css +50 -0
- package/src/components/Spinner/Spinner.tsx +29 -0
- package/src/components/Spinner/index.ts +1 -0
- package/src/components/Split/Split.module.css +29 -0
- package/src/components/Split/Split.tsx +33 -0
- package/src/components/Split/index.ts +1 -0
- package/src/components/SplitFlap/SplitFlap.module.css +107 -0
- package/src/components/SplitFlap/SplitFlap.tsx +225 -0
- package/src/components/SplitFlap/index.ts +1 -0
- package/src/components/Stack/Stack.module.css +17 -0
- package/src/components/Stack/Stack.tsx +19 -0
- package/src/components/Stack/index.ts +1 -0
- package/src/components/SwipeDeck/SwipeDeck.module.css +250 -0
- package/src/components/SwipeDeck/SwipeDeck.tsx +350 -0
- package/src/components/SwipeDeck/index.ts +1 -0
- package/src/components/Switch/Switch.module.css +97 -0
- package/src/components/Switch/Switch.tsx +147 -0
- package/src/components/Switch/index.ts +1 -0
- package/src/components/Table/Table.module.css +369 -0
- package/src/components/Table/Table.tsx +368 -0
- package/src/components/Table/index.ts +1 -0
- package/src/components/TableOfContents/TableOfContents.module.css +107 -0
- package/src/components/TableOfContents/TableOfContents.tsx +93 -0
- package/src/components/TableOfContents/index.ts +1 -0
- package/src/components/Tabs/Tabs.module.css +101 -0
- package/src/components/Tabs/Tabs.tsx +190 -0
- package/src/components/Tabs/index.ts +1 -0
- package/src/components/Tag/Tag.module.css +120 -0
- package/src/components/Tag/Tag.tsx +109 -0
- package/src/components/Tag/index.ts +1 -0
- package/src/components/Textarea/Textarea.module.css +79 -0
- package/src/components/Textarea/Textarea.tsx +130 -0
- package/src/components/Textarea/index.ts +1 -0
- package/src/components/ThemeToggle/ThemeToggle.module.css +21 -0
- package/src/components/ThemeToggle/ThemeToggle.tsx +69 -0
- package/src/components/ThemeToggle/index.ts +1 -0
- package/src/components/Toast/Toast.module.css +202 -0
- package/src/components/Toast/Toast.tsx +473 -0
- package/src/components/Toast/index.ts +1 -0
- package/src/components/Toggle/Toggle.module.css +94 -0
- package/src/components/Toggle/Toggle.tsx +50 -0
- package/src/components/Toggle/index.ts +1 -0
- package/src/components/Tooltip/Tooltip.module.css +34 -0
- package/src/components/Tooltip/Tooltip.tsx +154 -0
- package/src/components/Tooltip/index.ts +1 -0
- package/src/components/VisuallyHidden/VisuallyHidden.module.css +13 -0
- package/src/components/VisuallyHidden/VisuallyHidden.tsx +12 -0
- package/src/components/VisuallyHidden/index.ts +1 -0
- package/src/internal/FieldMessage.module.css +49 -0
- package/src/internal/FieldMessage.tsx +44 -0
- package/src/internal/Portal.tsx +7 -0
- package/src/internal/Roll.module.css +31 -0
- package/src/internal/Roll.tsx +20 -0
- package/src/internal/cx.ts +3 -0
- package/src/internal/feel.ts +355 -0
- package/src/internal/fling.ts +118 -0
- package/src/internal/focus.ts +94 -0
- package/src/internal/icons.module.css +62 -0
- package/src/internal/icons.tsx +511 -0
- package/src/internal/keyboard.ts +62 -0
- package/src/internal/layers.ts +85 -0
- package/src/internal/liquid.ts +248 -0
- package/src/internal/liquidMatter.ts +168 -0
- package/src/internal/liquidMore.ts +686 -0
- package/src/internal/liquidPath.ts +519 -0
- package/src/internal/mergeRefs.ts +10 -0
- package/src/internal/motion.ts +37 -0
- package/src/internal/relativeTime.ts +26 -0
- package/src/internal/scrollFrame.ts +157 -0
- package/src/internal/softPress.ts +299 -0
- package/src/internal/space.ts +6 -0
- package/src/internal/useControllable.ts +21 -0
- package/src/internal/useFloating.ts +85 -0
- package/src/internal/usePresence.ts +15 -0
- package/src/internal/useScrub.ts +160 -0
- package/src/tokens.css +727 -0
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
import { Children, cloneElement, isValidElement, type ReactElement, type SVGProps } from 'react'
|
|
2
|
+
import styles from './icons.module.css'
|
|
3
|
+
|
|
4
|
+
export type IconProps = SVGProps<SVGSVGElement> & {
|
|
5
|
+
size?: number | string
|
|
6
|
+
/** Plays the icon's own small motion when the button or link it sits in is pointed at or focused. Off by default; never with reduced motion. */
|
|
7
|
+
animated?: boolean
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type Motion = 'draw' | 'nudge-r' | 'nudge-l' | 'nudge-u' | 'nudge-d' | 'nudge-ur' | 'swing' | 'turn' | 'pop' | 'blink' | 'wiggle' | 'bounce' | 'grow'
|
|
11
|
+
|
|
12
|
+
// Every icon names the motion that fits its meaning; `animated` decides whether it plays. A drawn line
|
|
13
|
+
// needs its length as 1 to be drawn in from its start, so those shapes get pathLength.
|
|
14
|
+
function Svg({ size = '1em', m, animated, className, children, ...rest }: IconProps & { m: Motion }) {
|
|
15
|
+
const shapes = animated && m === 'draw' ? Children.map(children, (c) => (isValidElement(c) ? cloneElement(c as ReactElement<{ pathLength?: number }>, { pathLength: 1 }) : c)) : children
|
|
16
|
+
return (
|
|
17
|
+
<svg
|
|
18
|
+
width={size}
|
|
19
|
+
height={size}
|
|
20
|
+
viewBox="0 0 24 24"
|
|
21
|
+
fill="none"
|
|
22
|
+
stroke="currentColor"
|
|
23
|
+
strokeWidth={1.75}
|
|
24
|
+
strokeLinecap="round"
|
|
25
|
+
strokeLinejoin="round"
|
|
26
|
+
aria-hidden="true"
|
|
27
|
+
focusable="false"
|
|
28
|
+
className={animated ? (className ? `${styles.icon} ${className}` : styles.icon) : className}
|
|
29
|
+
data-motion={animated ? m : undefined}
|
|
30
|
+
{...rest}
|
|
31
|
+
>
|
|
32
|
+
{shapes}
|
|
33
|
+
</svg>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const CheckIcon = (p: IconProps) => <Svg m="draw" {...p}><path d="M5 12.5l4.5 4.5L19 7.5" /></Svg>
|
|
38
|
+
export const XIcon = (p: IconProps) => <Svg m="pop" {...p}><path d="M6 6l12 12M18 6L6 18" /></Svg>
|
|
39
|
+
export const ChevronDownIcon = (p: IconProps) => <Svg m="nudge-d" {...p}><path d="M6 9l6 6 6-6" /></Svg>
|
|
40
|
+
export const ChevronRightIcon = (p: IconProps) => <Svg m="nudge-r" {...p}><path d="M9 6l6 6-6 6" /></Svg>
|
|
41
|
+
export const ChevronLeftIcon = (p: IconProps) => <Svg m="nudge-l" {...p}><path d="M15 6l-6 6 6 6" /></Svg>
|
|
42
|
+
export const CopyIcon = (p: IconProps) => (
|
|
43
|
+
<Svg m="pop" {...p}>
|
|
44
|
+
<rect x="8.5" y="8.5" width="11" height="11" rx="2.5" />
|
|
45
|
+
<path d="M15.5 8.5V6.5a2 2 0 0 0-2-2h-7a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h2" />
|
|
46
|
+
</Svg>
|
|
47
|
+
)
|
|
48
|
+
export const InfoIcon = (p: IconProps) => (
|
|
49
|
+
<Svg m="pop" {...p}>
|
|
50
|
+
<circle cx="12" cy="12" r="9" />
|
|
51
|
+
<path d="M12 11v5M12 7.75v.01" />
|
|
52
|
+
</Svg>
|
|
53
|
+
)
|
|
54
|
+
export const CheckCircleIcon = (p: IconProps) => (
|
|
55
|
+
<Svg m="draw" {...p}>
|
|
56
|
+
<circle cx="12" cy="12" r="9" />
|
|
57
|
+
<path d="M8.5 12.25l2.5 2.5 4.5-5" />
|
|
58
|
+
</Svg>
|
|
59
|
+
)
|
|
60
|
+
export const WarningIcon = (p: IconProps) => (
|
|
61
|
+
<Svg m="pop" {...p}>
|
|
62
|
+
<path d="M12 4L2.75 19.5h18.5L12 4z" />
|
|
63
|
+
<path d="M12 10v4.5M12 17v.01" />
|
|
64
|
+
</Svg>
|
|
65
|
+
)
|
|
66
|
+
export const ErrorIcon = (p: IconProps) => (
|
|
67
|
+
<Svg m="pop" {...p}>
|
|
68
|
+
<path d="M8.25 3.5h7.5l5 5v7l-5 5h-7.5l-5-5v-7z" />
|
|
69
|
+
<path d="M9.5 9.5l5 5M14.5 9.5l-5 5" />
|
|
70
|
+
</Svg>
|
|
71
|
+
)
|
|
72
|
+
export const EyeIcon = (p: IconProps) => (
|
|
73
|
+
<Svg m="blink" {...p}>
|
|
74
|
+
<path d="M2.5 12s3.5-6.5 9.5-6.5 9.5 6.5 9.5 6.5-3.5 6.5-9.5 6.5S2.5 12 2.5 12z" />
|
|
75
|
+
<circle cx="12" cy="12" r="2.75" />
|
|
76
|
+
</Svg>
|
|
77
|
+
)
|
|
78
|
+
export const CodeIcon = (p: IconProps) => <Svg m="draw" {...p}><path d="M8.5 7.5L4 12l4.5 4.5M15.5 7.5L20 12l-4.5 4.5" /></Svg>
|
|
79
|
+
export const SearchIcon = (p: IconProps) => (
|
|
80
|
+
<Svg m="wiggle" {...p}>
|
|
81
|
+
<circle cx="11" cy="11" r="6.5" />
|
|
82
|
+
<path d="M16 16l4 4" />
|
|
83
|
+
</Svg>
|
|
84
|
+
)
|
|
85
|
+
export const SunIcon = (p: IconProps) => (
|
|
86
|
+
<Svg m="turn" {...p}>
|
|
87
|
+
<circle cx="12" cy="12" r="4" />
|
|
88
|
+
<path d="M12 2.5v2M12 19.5v2M4.6 4.6l1.4 1.4M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4L6 18M18 6l1.4-1.4" />
|
|
89
|
+
</Svg>
|
|
90
|
+
)
|
|
91
|
+
export const MoonIcon = (p: IconProps) => <Svg m="wiggle" {...p}><path d="M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z" /></Svg>
|
|
92
|
+
export const PlusIcon = (p: IconProps) => <Svg m="pop" {...p}><path d="M12 5v14M5 12h14" /></Svg>
|
|
93
|
+
export const MinusIcon = (p: IconProps) => <Svg m="pop" {...p}><path d="M5 12h14" /></Svg>
|
|
94
|
+
export const MenuIcon = (p: IconProps) => <Svg m="draw" {...p}><path d="M4 7h16M4 12h16M4 17h10" /></Svg>
|
|
95
|
+
export const MoreIcon = (p: IconProps) => (
|
|
96
|
+
<Svg m="wiggle" {...p}>
|
|
97
|
+
<circle cx="6" cy="12" r="0.9" fill="currentColor" />
|
|
98
|
+
<circle cx="12" cy="12" r="0.9" fill="currentColor" />
|
|
99
|
+
<circle cx="18" cy="12" r="0.9" fill="currentColor" />
|
|
100
|
+
</Svg>
|
|
101
|
+
)
|
|
102
|
+
export const InboxIcon = (p: IconProps) => (
|
|
103
|
+
<Svg m="wiggle" {...p}>
|
|
104
|
+
<path d="M3.5 13.5l2.5-8h12l2.5 8v5a1.5 1.5 0 0 1-1.5 1.5H5a1.5 1.5 0 0 1-1.5-1.5z" />
|
|
105
|
+
<path d="M3.5 13.5H8l1.5 2.5h5l1.5-2.5h4.5" />
|
|
106
|
+
</Svg>
|
|
107
|
+
)
|
|
108
|
+
export const ArrowUpRightIcon = (p: IconProps) => <Svg m="nudge-ur" {...p}><path d="M8 16L16 8M9 8h7v7" /></Svg>
|
|
109
|
+
export const TrashIcon = (p: IconProps) => (
|
|
110
|
+
<Svg m="wiggle" {...p}>
|
|
111
|
+
<path d="M4.5 7h15M10 4h4M6.5 7l1 12.5h9l1-12.5" />
|
|
112
|
+
</Svg>
|
|
113
|
+
)
|
|
114
|
+
export const EditIcon = (p: IconProps) => <Svg m="draw" {...p}><path d="M4 20h4L19 9l-4-4L4 16v4z" /></Svg>
|
|
115
|
+
export const UndoIcon = (p: IconProps) => <Svg m="nudge-l" {...p}><path d="M9 14L4 9l5-5M4 9h10.5a5.5 5.5 0 0 1 0 11H11" /></Svg>
|
|
116
|
+
export const ShareIcon = (p: IconProps) => (
|
|
117
|
+
<Svg m="nudge-u" {...p}>
|
|
118
|
+
<path d="M12 15V4M8 8l4-4 4 4" />
|
|
119
|
+
<path d="M6 12v6.5A1.5 1.5 0 0 0 7.5 20h9a1.5 1.5 0 0 0 1.5-1.5V12" />
|
|
120
|
+
</Svg>
|
|
121
|
+
)
|
|
122
|
+
export const HeartIcon = (p: IconProps) => (
|
|
123
|
+
<Svg m="pop" {...p}><path d="M12 19.5s-7.5-4.4-7.5-10A4.3 4.3 0 0 1 12 7a4.3 4.3 0 0 1 7.5 2.5c0 5.6-7.5 10-7.5 10z" /></Svg>
|
|
124
|
+
)
|
|
125
|
+
export const SettingsIcon = (p: IconProps) => (
|
|
126
|
+
<Svg m="turn" {...p}>
|
|
127
|
+
<circle cx="12" cy="12" r="3" />
|
|
128
|
+
<path d="M12 3v2.5M12 18.5V21M3 12h2.5M18.5 12H21M5.6 5.6l1.8 1.8M16.6 16.6l1.8 1.8M5.6 18.4l1.8-1.8M16.6 7.4l1.8-1.8" />
|
|
129
|
+
</Svg>
|
|
130
|
+
)
|
|
131
|
+
export const PlayIcon = (p: IconProps) => <Svg m="pop" {...p}><path d="M7.5 5.5v13l10.5-6.5z" fill="currentColor" /></Svg>
|
|
132
|
+
export const PauseIcon = (p: IconProps) => (
|
|
133
|
+
<Svg m="pop" {...p}>
|
|
134
|
+
<rect x="6.5" y="5.5" width="3.5" height="13" rx="1" fill="currentColor" />
|
|
135
|
+
<rect x="14" y="5.5" width="3.5" height="13" rx="1" fill="currentColor" />
|
|
136
|
+
</Svg>
|
|
137
|
+
)
|
|
138
|
+
export const VolumeIcon = (p: IconProps) => (
|
|
139
|
+
<Svg m="wiggle" {...p}>
|
|
140
|
+
<path d="M4 9.5h3.5L12 5.5v13l-4.5-4H4z" />
|
|
141
|
+
<path d="M15.5 9a4 4 0 0 1 0 6M18 6.5a7.5 7.5 0 0 1 0 11" />
|
|
142
|
+
</Svg>
|
|
143
|
+
)
|
|
144
|
+
export const VolumeOffIcon = (p: IconProps) => (
|
|
145
|
+
<Svg m="wiggle" {...p}>
|
|
146
|
+
<path d="M4 9.5h3.5L12 5.5v13l-4.5-4H4z" />
|
|
147
|
+
<path d="M16 9.5l5 5M21 9.5l-5 5" />
|
|
148
|
+
</Svg>
|
|
149
|
+
)
|
|
150
|
+
export const CaptionsIcon = (p: IconProps) => (
|
|
151
|
+
<Svg m="wiggle" {...p}>
|
|
152
|
+
<rect x="3" y="5.5" width="18" height="13" rx="2.5" />
|
|
153
|
+
<path d="M10.5 10.25a2 2 0 1 0 0 3.5M17 10.25a2 2 0 1 0 0 3.5" />
|
|
154
|
+
</Svg>
|
|
155
|
+
)
|
|
156
|
+
export const FullscreenIcon = (p: IconProps) => <Svg m="pop" {...p}><path d="M4 9V4h5M15 4h5v5M20 15v5h-5M9 20H4v-5" /></Svg>
|
|
157
|
+
export const ExitFullscreenIcon = (p: IconProps) => <Svg m="pop" {...p}><path d="M9 4v5H4M20 9h-5V4M15 20v-5h5M4 15h5v5" /></Svg>
|
|
158
|
+
export const PipIcon = (p: IconProps) => (
|
|
159
|
+
<Svg m="pop" {...p}>
|
|
160
|
+
<rect x="3" y="5" width="18" height="14" rx="2" />
|
|
161
|
+
<rect x="12" y="11.5" width="6" height="4.5" rx="1" fill="currentColor" />
|
|
162
|
+
</Svg>
|
|
163
|
+
)
|
|
164
|
+
export const BellIcon = (p: IconProps) => (
|
|
165
|
+
<Svg m="swing" {...p}>
|
|
166
|
+
<path d="M6 16.5V11a6 6 0 0 1 12 0v5.5l1.5 1.5h-15z" />
|
|
167
|
+
<path d="M10 20.5a2.2 2.2 0 0 0 4 0" />
|
|
168
|
+
</Svg>
|
|
169
|
+
)
|
|
170
|
+
export const StopIcon = (p: IconProps) => <Svg m="pop" {...p}><rect x="6.5" y="6.5" width="11" height="11" rx="2.5" fill="currentColor" /></Svg>
|
|
171
|
+
export const ArrowUpIcon = (p: IconProps) => <Svg m="nudge-u" {...p}><path d="M12 19V5M6 11l6-6 6 6" /></Svg>
|
|
172
|
+
export const ArrowDownIcon = (p: IconProps) => <Svg m="nudge-d" {...p}><path d="M12 5v14M6 13l6 6 6-6" /></Svg>
|
|
173
|
+
export const DownloadIcon = (p: IconProps) => (
|
|
174
|
+
<Svg m="nudge-d" {...p}>
|
|
175
|
+
<path d="M12 4v11M7.5 10.5L12 15l4.5-4.5" />
|
|
176
|
+
<path d="M5 19.5h14" />
|
|
177
|
+
</Svg>
|
|
178
|
+
)
|
|
179
|
+
export const ReplyIcon = (p: IconProps) => <Svg m="nudge-l" {...p}><path d="M10 6L4.5 11.5 10 17M5 11.5h8.5a6 6 0 0 1 6 6V19" /></Svg>
|
|
180
|
+
export const ClockIcon = (p: IconProps) => (
|
|
181
|
+
<Svg m="wiggle" {...p}>
|
|
182
|
+
<circle cx="12" cy="12" r="8.5" />
|
|
183
|
+
<path d="M12 7.5V12l3 2" />
|
|
184
|
+
</Svg>
|
|
185
|
+
)
|
|
186
|
+
export const RetryIcon = (p: IconProps) => (
|
|
187
|
+
<Svg m="turn" {...p}>
|
|
188
|
+
<path d="M19.5 12a7.5 7.5 0 1 1-2.2-5.3" />
|
|
189
|
+
<path d="M19.5 4.5v4h-4" />
|
|
190
|
+
</Svg>
|
|
191
|
+
)
|
|
192
|
+
export const GripIcon = (p: IconProps) => (
|
|
193
|
+
<Svg m="wiggle" {...p}>
|
|
194
|
+
<path d="M5 9h14M5 15h14" />
|
|
195
|
+
</Svg>
|
|
196
|
+
)
|
|
197
|
+
export const FilterIcon = (p: IconProps) => <Svg m="draw" {...p}><path d="M4.5 6h15l-5.75 7v5.5l-3.5-2V13z" /></Svg>
|
|
198
|
+
|
|
199
|
+
export const BookIcon = (p: IconProps) => (
|
|
200
|
+
<Svg m="bounce" {...p}>
|
|
201
|
+
<path d="M12 6.5C10.5 5.3 8.2 4.75 4 4.75v13.5c4.2 0 6.5.55 8 1.75 1.5-1.2 3.8-1.75 8-1.75V4.75c-4.2 0-6.5.55-8 1.75z" />
|
|
202
|
+
<path d="M12 6.5V20" />
|
|
203
|
+
</Svg>
|
|
204
|
+
)
|
|
205
|
+
export const PlugIcon = (p: IconProps) => (
|
|
206
|
+
<Svg m="swing" {...p}>
|
|
207
|
+
<path d="M9 3.5v4M15 3.5v4" />
|
|
208
|
+
<path d="M6.5 7.5h11v3a5.5 5.5 0 0 1-11 0z" />
|
|
209
|
+
<path d="M12 16v4.5" />
|
|
210
|
+
</Svg>
|
|
211
|
+
)
|
|
212
|
+
export const CompassIcon = (p: IconProps) => (
|
|
213
|
+
<Svg m="turn" {...p}>
|
|
214
|
+
<circle cx="12" cy="12" r="8.5" />
|
|
215
|
+
<path d="M15.5 8.5l-2 5-5 2 2-5z" />
|
|
216
|
+
</Svg>
|
|
217
|
+
)
|
|
218
|
+
export const PaletteIcon = (p: IconProps) => (
|
|
219
|
+
<Svg m="bounce" {...p}>
|
|
220
|
+
<path d="M12 3.5a8.5 8.5 0 0 0 0 17c1.4 0 2-.9 2-1.9 0-1.4-1.1-1.9-1.1-3.1 0-1 .8-1.75 1.8-1.75H17a3.5 3.5 0 0 0 3.5-3.5C20.5 6.9 16.7 3.5 12 3.5z" />
|
|
221
|
+
<circle cx="7.75" cy="11.5" r="1.1" fill="currentColor" stroke="none" />
|
|
222
|
+
<circle cx="10.25" cy="7.5" r="1.1" fill="currentColor" stroke="none" />
|
|
223
|
+
<circle cx="14.75" cy="7.75" r="1.1" fill="currentColor" stroke="none" />
|
|
224
|
+
</Svg>
|
|
225
|
+
)
|
|
226
|
+
export const SlidersIcon = (p: IconProps) => (
|
|
227
|
+
<Svg m="bounce" {...p}>
|
|
228
|
+
<path d="M4 7h9M17 7h3M4 17h3M11 17h9" />
|
|
229
|
+
<circle cx="15" cy="7" r="2" />
|
|
230
|
+
<circle cx="9" cy="17" r="2" />
|
|
231
|
+
</Svg>
|
|
232
|
+
)
|
|
233
|
+
export const GridIcon = (p: IconProps) => (
|
|
234
|
+
<Svg m="pop" {...p}>
|
|
235
|
+
<rect x="4" y="4" width="6.5" height="6.5" rx="1.5" />
|
|
236
|
+
<rect x="13.5" y="4" width="6.5" height="6.5" rx="1.5" />
|
|
237
|
+
<rect x="4" y="13.5" width="6.5" height="6.5" rx="1.5" />
|
|
238
|
+
<rect x="13.5" y="13.5" width="6.5" height="6.5" rx="1.5" />
|
|
239
|
+
</Svg>
|
|
240
|
+
)
|
|
241
|
+
export const PackageIcon = (p: IconProps) => (
|
|
242
|
+
<Svg m="bounce" {...p}>
|
|
243
|
+
<path d="M12 3.5l8 4.25v8.5L12 20.5l-8-4.25v-8.5z" />
|
|
244
|
+
<path d="M4 7.75l8 4.25 8-4.25M12 12v8.5" />
|
|
245
|
+
</Svg>
|
|
246
|
+
)
|
|
247
|
+
export const SproutIcon = (p: IconProps) => (
|
|
248
|
+
<Svg m="grow" {...p}>
|
|
249
|
+
<path d="M12 20.5V11" />
|
|
250
|
+
<path d="M12 14.5c-.4-3.6-2.8-5.7-6.5-5.7 0 3.6 2.5 5.7 6.5 5.7z" />
|
|
251
|
+
<path d="M12 11.5c.3-4 2.8-6.3 6.5-6.3 0 4-2.6 6.3-6.5 6.3z" />
|
|
252
|
+
<path d="M8.5 20.5h7" />
|
|
253
|
+
</Svg>
|
|
254
|
+
)
|
|
255
|
+
export const LayersIcon = (p: IconProps) => (
|
|
256
|
+
<Svg m="bounce" {...p}>
|
|
257
|
+
<path d="M12 4l8.5 4.5L12 13 3.5 8.5z" />
|
|
258
|
+
<path d="M3.5 12.75L12 17.25l8.5-4.5" />
|
|
259
|
+
<path d="M3.5 16.5L12 21l8.5-4.5" />
|
|
260
|
+
</Svg>
|
|
261
|
+
)
|
|
262
|
+
export const TerminalIcon = (p: IconProps) => (
|
|
263
|
+
<Svg m="bounce" {...p}>
|
|
264
|
+
<rect x="3.5" y="4.5" width="17" height="15" rx="2.5" />
|
|
265
|
+
<path d="M7.5 9.5l3 2.5-3 2.5M12.5 15h4" />
|
|
266
|
+
</Svg>
|
|
267
|
+
)
|
|
268
|
+
export const FileIcon = (p: IconProps) => (
|
|
269
|
+
<Svg m="bounce" {...p}>
|
|
270
|
+
<path d="M13.5 3.5H7a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9z" />
|
|
271
|
+
<path d="M13.5 3.5V9H19" />
|
|
272
|
+
</Svg>
|
|
273
|
+
)
|
|
274
|
+
export const FileTextIcon = (p: IconProps) => (
|
|
275
|
+
<Svg m="bounce" {...p}>
|
|
276
|
+
<path d="M13.5 3.5H7a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V9z" />
|
|
277
|
+
<path d="M13.5 3.5V9H19M8.5 13h7M8.5 16.5h5" />
|
|
278
|
+
</Svg>
|
|
279
|
+
)
|
|
280
|
+
export const FolderIcon = (p: IconProps) => <Svg m="bounce" {...p}><path d="M3.5 7.5a2 2 0 0 1 2-2h4l2 2.25h7a2 2 0 0 1 2 2v7.75a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2z" /></Svg>
|
|
281
|
+
export const ImageIcon = (p: IconProps) => (
|
|
282
|
+
<Svg m="pop" {...p}>
|
|
283
|
+
<rect x="3.5" y="4.5" width="17" height="15" rx="2.5" />
|
|
284
|
+
<circle cx="9" cy="9.5" r="1.5" />
|
|
285
|
+
<path d="M20.5 15.5L16 11l-8.5 8.5" />
|
|
286
|
+
</Svg>
|
|
287
|
+
)
|
|
288
|
+
export const LinkIcon = (p: IconProps) => (
|
|
289
|
+
<Svg m="draw" {...p}>
|
|
290
|
+
<path d="M10 14a4 4 0 0 0 5.66 0l3-3a4 4 0 0 0-5.66-5.66l-1 1" />
|
|
291
|
+
<path d="M14 10a4 4 0 0 0-5.66 0l-3 3a4 4 0 0 0 5.66 5.66l1-1" />
|
|
292
|
+
</Svg>
|
|
293
|
+
)
|
|
294
|
+
export const PaperclipIcon = (p: IconProps) => <Svg m="draw" {...p}><path d="M19 11.5l-7.25 7.25a4.6 4.6 0 0 1-6.5-6.5L12.5 5a3 3 0 0 1 4.25 4.25l-7 7a1.5 1.5 0 0 1-2.1-2.1l6.6-6.65" /></Svg>
|
|
295
|
+
export const UploadIcon = (p: IconProps) => (
|
|
296
|
+
<Svg m="nudge-u" {...p}>
|
|
297
|
+
<path d="M12 15V4M7.5 8.5L12 4l4.5 4.5" />
|
|
298
|
+
<path d="M5 19.5h14" />
|
|
299
|
+
</Svg>
|
|
300
|
+
)
|
|
301
|
+
export const CloudIcon = (p: IconProps) => <Svg m="bounce" {...p}><path d="M7 18.5a4 4 0 0 1-.6-7.95A5.5 5.5 0 0 1 17 9a4.75 4.75 0 0 1 .5 9.5z" /></Svg>
|
|
302
|
+
export const DatabaseIcon = (p: IconProps) => (
|
|
303
|
+
<Svg m="bounce" {...p}>
|
|
304
|
+
<ellipse cx="12" cy="6" rx="7" ry="2.5" />
|
|
305
|
+
<path d="M5 6v12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5V6" />
|
|
306
|
+
<path d="M5 12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5" />
|
|
307
|
+
</Svg>
|
|
308
|
+
)
|
|
309
|
+
export const BarChartIcon = (p: IconProps) => (
|
|
310
|
+
<Svg m="draw" {...p}>
|
|
311
|
+
<path d="M4 20h16" />
|
|
312
|
+
<path d="M7 16.5v-4M12 16.5V7M17 16.5v-7" />
|
|
313
|
+
</Svg>
|
|
314
|
+
)
|
|
315
|
+
export const LineChartIcon = (p: IconProps) => (
|
|
316
|
+
<Svg m="draw" {...p}>
|
|
317
|
+
<path d="M4 4v16h16" />
|
|
318
|
+
<path d="M7.5 15l3.5-4 3 2.5 5-6" />
|
|
319
|
+
</Svg>
|
|
320
|
+
)
|
|
321
|
+
export const TableIcon = (p: IconProps) => (
|
|
322
|
+
<Svg m="bounce" {...p}>
|
|
323
|
+
<rect x="3.5" y="4.5" width="17" height="15" rx="2.5" />
|
|
324
|
+
<path d="M3.5 9.5h17M3.5 14.5h17M10 9.5v10" />
|
|
325
|
+
</Svg>
|
|
326
|
+
)
|
|
327
|
+
export const CalendarIcon = (p: IconProps) => (
|
|
328
|
+
<Svg m="wiggle" {...p}>
|
|
329
|
+
<rect x="4" y="5.5" width="16" height="14.5" rx="2.5" />
|
|
330
|
+
<path d="M4 10h16M8.5 3.5v4M15.5 3.5v4" />
|
|
331
|
+
</Svg>
|
|
332
|
+
)
|
|
333
|
+
export const ListIcon = (p: IconProps) => (
|
|
334
|
+
<Svg m="draw" {...p}>
|
|
335
|
+
<path d="M9 7h11M9 12h11M9 17h11" />
|
|
336
|
+
<path d="M4.5 7h.01M4.5 12h.01M4.5 17h.01" />
|
|
337
|
+
</Svg>
|
|
338
|
+
)
|
|
339
|
+
export const HashIcon = (p: IconProps) => <Svg m="draw" {...p}><path d="M5 9h15M4 15h15M10 4L8 20M16 4l-2 16" /></Svg>
|
|
340
|
+
export const UserIcon = (p: IconProps) => (
|
|
341
|
+
<Svg m="bounce" {...p}>
|
|
342
|
+
<circle cx="12" cy="8.5" r="4" />
|
|
343
|
+
<path d="M4.5 20a7.5 7.5 0 0 1 15 0" />
|
|
344
|
+
</Svg>
|
|
345
|
+
)
|
|
346
|
+
export const UsersIcon = (p: IconProps) => (
|
|
347
|
+
<Svg m="bounce" {...p}>
|
|
348
|
+
<circle cx="9" cy="9" r="3.5" />
|
|
349
|
+
<path d="M3 19.5a6 6 0 0 1 12 0" />
|
|
350
|
+
<path d="M15.5 5.75a3.5 3.5 0 0 1 0 6.5M17.5 14.25A6 6 0 0 1 21 19.5" />
|
|
351
|
+
</Svg>
|
|
352
|
+
)
|
|
353
|
+
export const MailIcon = (p: IconProps) => (
|
|
354
|
+
<Svg m="wiggle" {...p}>
|
|
355
|
+
<rect x="3.5" y="5.5" width="17" height="13" rx="2.5" />
|
|
356
|
+
<path d="M4 7.5l8 5.5 8-5.5" />
|
|
357
|
+
</Svg>
|
|
358
|
+
)
|
|
359
|
+
export const MessageIcon = (p: IconProps) => <Svg m="wiggle" {...p}><path d="M20.5 14.5a2 2 0 0 1-2 2H9.5L5 20v-3.5h.5a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h13a2 2 0 0 1 2 2z" /></Svg>
|
|
360
|
+
export const PhoneIcon = (p: IconProps) => (
|
|
361
|
+
<Svg m="wiggle" {...p}>
|
|
362
|
+
<rect x="6.5" y="3" width="11" height="18" rx="2.5" />
|
|
363
|
+
<path d="M11 17.5h2" />
|
|
364
|
+
</Svg>
|
|
365
|
+
)
|
|
366
|
+
export const AtSignIcon = (p: IconProps) => (
|
|
367
|
+
<Svg m="bounce" {...p}>
|
|
368
|
+
<circle cx="12" cy="12" r="3.5" />
|
|
369
|
+
<path d="M15.5 8.5v4.75a2.25 2.25 0 0 0 4.5 0V12a8 8 0 1 0-3.2 6.4" />
|
|
370
|
+
</Svg>
|
|
371
|
+
)
|
|
372
|
+
export const LockIcon = (p: IconProps) => (
|
|
373
|
+
<Svg m="wiggle" {...p}>
|
|
374
|
+
<rect x="5" y="10.5" width="14" height="10" rx="2.5" />
|
|
375
|
+
<path d="M8 10.5V8a4 4 0 0 1 8 0v2.5" />
|
|
376
|
+
</Svg>
|
|
377
|
+
)
|
|
378
|
+
export const UnlockIcon = (p: IconProps) => (
|
|
379
|
+
<Svg m="wiggle" {...p}>
|
|
380
|
+
<rect x="5" y="10.5" width="14" height="10" rx="2.5" />
|
|
381
|
+
<path d="M8 10.5V8a4 4 0 0 1 7.75-1.4" />
|
|
382
|
+
</Svg>
|
|
383
|
+
)
|
|
384
|
+
export const KeyIcon = (p: IconProps) => (
|
|
385
|
+
<Svg m="swing" {...p}>
|
|
386
|
+
<circle cx="8" cy="15.5" r="4" />
|
|
387
|
+
<path d="M10.9 12.6L19.5 4M16.5 7L19 9.5M14 9.5l2 2" />
|
|
388
|
+
</Svg>
|
|
389
|
+
)
|
|
390
|
+
export const ShieldIcon = (p: IconProps) => <Svg m="bounce" {...p}><path d="M12 3.5l7 2.75v5.25c0 4.25-2.9 7.6-7 9-4.1-1.4-7-4.75-7-9V6.25z" /></Svg>
|
|
391
|
+
export const LogInIcon = (p: IconProps) => (
|
|
392
|
+
<Svg m="nudge-r" {...p}>
|
|
393
|
+
<path d="M14 4h4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4" />
|
|
394
|
+
<path d="M3.5 12h11M10.5 8l4 4-4 4" />
|
|
395
|
+
</Svg>
|
|
396
|
+
)
|
|
397
|
+
export const LogOutIcon = (p: IconProps) => (
|
|
398
|
+
<Svg m="nudge-r" {...p}>
|
|
399
|
+
<path d="M10 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h4" />
|
|
400
|
+
<path d="M9.5 12h11M16.5 8l4 4-4 4" />
|
|
401
|
+
</Svg>
|
|
402
|
+
)
|
|
403
|
+
export const SendIcon = (p: IconProps) => (
|
|
404
|
+
<Svg m="nudge-ur" {...p}>
|
|
405
|
+
<path d="M20.5 3.5l-17 7 7 3 3 7z" />
|
|
406
|
+
<path d="M20.5 3.5l-10 10" />
|
|
407
|
+
</Svg>
|
|
408
|
+
)
|
|
409
|
+
export const SmileIcon = (p: IconProps) => (
|
|
410
|
+
<Svg m="blink" {...p}>
|
|
411
|
+
<circle cx="12" cy="12" r="8.5" />
|
|
412
|
+
<path d="M8.5 14.5a4.5 4.5 0 0 0 7 0" />
|
|
413
|
+
<path d="M9 9.5h.01M15 9.5h.01" />
|
|
414
|
+
</Svg>
|
|
415
|
+
)
|
|
416
|
+
export const VideoIcon = (p: IconProps) => (
|
|
417
|
+
<Svg m="wiggle" {...p}>
|
|
418
|
+
<rect x="3" y="6.5" width="12.5" height="11" rx="2.5" />
|
|
419
|
+
<path d="M15.5 10.5l5.5-3v9l-5.5-3" />
|
|
420
|
+
</Svg>
|
|
421
|
+
)
|
|
422
|
+
export const MicIcon = (p: IconProps) => (
|
|
423
|
+
<Svg m="wiggle" {...p}>
|
|
424
|
+
<rect x="9" y="3.5" width="6" height="11" rx="3" />
|
|
425
|
+
<path d="M5.5 11.5a6.5 6.5 0 0 0 13 0M12 18v2.5" />
|
|
426
|
+
</Svg>
|
|
427
|
+
)
|
|
428
|
+
export const CartIcon = (p: IconProps) => (
|
|
429
|
+
<Svg m="wiggle" {...p}>
|
|
430
|
+
<path d="M3 4.5h2.5l2 10.5h10.5l2-7.5H6.5" />
|
|
431
|
+
<circle cx="9" cy="19" r="1.25" />
|
|
432
|
+
<circle cx="17" cy="19" r="1.25" />
|
|
433
|
+
</Svg>
|
|
434
|
+
)
|
|
435
|
+
export const BagIcon = (p: IconProps) => (
|
|
436
|
+
<Svg m="wiggle" {...p}>
|
|
437
|
+
<path d="M5.5 8h13l-1 12h-11z" />
|
|
438
|
+
<path d="M9 10.5V7a3 3 0 0 1 6 0v3.5" />
|
|
439
|
+
</Svg>
|
|
440
|
+
)
|
|
441
|
+
export const CreditCardIcon = (p: IconProps) => (
|
|
442
|
+
<Svg m="bounce" {...p}>
|
|
443
|
+
<rect x="3" y="5.5" width="18" height="13" rx="2.5" />
|
|
444
|
+
<path d="M3 10h18M7 14.5h3" />
|
|
445
|
+
</Svg>
|
|
446
|
+
)
|
|
447
|
+
export const ReceiptIcon = (p: IconProps) => (
|
|
448
|
+
<Svg m="bounce" {...p}>
|
|
449
|
+
<path d="M6 3.5h12v17l-2-1.5-2 1.5-2-1.5-2 1.5-2-1.5-2 1.5z" />
|
|
450
|
+
<path d="M9 8.5h6M9 12h6M9 15.5h3" />
|
|
451
|
+
</Svg>
|
|
452
|
+
)
|
|
453
|
+
export const TagIcon = (p: IconProps) => (
|
|
454
|
+
<Svg m="swing" {...p}>
|
|
455
|
+
<path d="M3.5 12.1V5A1.5 1.5 0 0 1 5 3.5h7.1a1.5 1.5 0 0 1 1.06.44l7.4 7.4a1.5 1.5 0 0 1 0 2.12l-7.1 7.1a1.5 1.5 0 0 1-2.12 0l-7.4-7.4a1.5 1.5 0 0 1-.44-1.06z" />
|
|
456
|
+
<circle cx="8.25" cy="8.25" r="1.25" />
|
|
457
|
+
</Svg>
|
|
458
|
+
)
|
|
459
|
+
export const GiftIcon = (p: IconProps) => (
|
|
460
|
+
<Svg m="pop" {...p}>
|
|
461
|
+
<rect x="4" y="8.5" width="16" height="4" rx="1" />
|
|
462
|
+
<path d="M5.5 12.5V20h13v-7.5M12 8.5V20" />
|
|
463
|
+
<path d="M12 8.5C10.5 5 7 4.75 7 6.75 7 8 9 8.5 12 8.5zM12 8.5c1.5-3.5 5-3.75 5-1.75 0 1.25-2 1.75-5 1.75z" />
|
|
464
|
+
</Svg>
|
|
465
|
+
)
|
|
466
|
+
export const HomeIcon = (p: IconProps) => <Svg m="bounce" {...p}><path d="M4 10.5L12 4l8 6.5V19a1.5 1.5 0 0 1-1.5 1.5H15v-6H9v6H5.5A1.5 1.5 0 0 1 4 19z" /></Svg>
|
|
467
|
+
export const MapPinIcon = (p: IconProps) => (
|
|
468
|
+
<Svg m="bounce" {...p}>
|
|
469
|
+
<path d="M12 21s-6.5-5.6-6.5-11a6.5 6.5 0 0 1 13 0c0 5.4-6.5 11-6.5 11z" />
|
|
470
|
+
<circle cx="12" cy="10" r="2.5" />
|
|
471
|
+
</Svg>
|
|
472
|
+
)
|
|
473
|
+
export const GlobeIcon = (p: IconProps) => (
|
|
474
|
+
<Svg m="turn" {...p}>
|
|
475
|
+
<circle cx="12" cy="12" r="8.5" />
|
|
476
|
+
<path d="M3.5 12h17" />
|
|
477
|
+
<path d="M12 3.5c2.4 2.4 3.5 5.3 3.5 8.5s-1.1 6.1-3.5 8.5c-2.4-2.4-3.5-5.3-3.5-8.5S9.6 5.9 12 3.5z" />
|
|
478
|
+
</Svg>
|
|
479
|
+
)
|
|
480
|
+
export const StarIcon = (p: IconProps) => <Svg m="pop" {...p}><path d="M12.00 3.85L14.20 9.57L20.32 9.90L15.57 13.76L17.14 19.68L12.00 16.35L6.86 19.68L8.43 13.76L3.68 9.90L9.80 9.57z" /></Svg>
|
|
481
|
+
export const BookmarkIcon = (p: IconProps) => <Svg m="swing" {...p}><path d="M6.5 4.5a1 1 0 0 1 1-1h9a1 1 0 0 1 1 1v16L12 16.5l-5.5 4z" /></Svg>
|
|
482
|
+
export const FlagIcon = (p: IconProps) => (
|
|
483
|
+
<Svg m="swing" {...p}>
|
|
484
|
+
<path d="M5 21V4" />
|
|
485
|
+
<path d="M5 4.5c3-1.5 5.5 1.5 8.5 0s5.5 0 5.5 0v9s-2.5-1.5-5.5 0-5.5-1.5-8.5 0" />
|
|
486
|
+
</Svg>
|
|
487
|
+
)
|
|
488
|
+
export const TruckIcon = (p: IconProps) => (
|
|
489
|
+
<Svg m="nudge-r" {...p}>
|
|
490
|
+
<path d="M14 16.5v-10H3.5v10h1.75M14 9.5h3.75l3 3.5v3.5h-1.5M8.75 16.5h6.5" />
|
|
491
|
+
<circle cx="7" cy="17" r="1.75" />
|
|
492
|
+
<circle cx="17.75" cy="17" r="1.75" />
|
|
493
|
+
</Svg>
|
|
494
|
+
)
|
|
495
|
+
export const ChevronUpIcon = (p: IconProps) => <Svg m="nudge-u" {...p}><path d="M6 15l6-6 6 6" /></Svg>
|
|
496
|
+
export const ArrowLeftIcon = (p: IconProps) => <Svg m="nudge-l" {...p}><path d="M19 12H5M11 6l-6 6 6 6" /></Svg>
|
|
497
|
+
export const ArrowRightIcon = (p: IconProps) => <Svg m="nudge-r" {...p}><path d="M5 12h14M13 6l6 6-6 6" /></Svg>
|
|
498
|
+
export const EyeOffIcon = (p: IconProps) => (
|
|
499
|
+
<Svg m="blink" {...p}>
|
|
500
|
+
<path d="M2.5 12s3.5-6.5 9.5-6.5 9.5 6.5 9.5 6.5-3.5 6.5-9.5 6.5S2.5 12 2.5 12z" />
|
|
501
|
+
<circle cx="12" cy="12" r="2.75" />
|
|
502
|
+
<path d="M4 4l16 16" />
|
|
503
|
+
</Svg>
|
|
504
|
+
)
|
|
505
|
+
export const ZapIcon = (p: IconProps) => <Svg m="pop" {...p}><path d="M13 3L5 13.5h6L10.5 21 19 10.5h-6z" /></Svg>
|
|
506
|
+
export const LayoutIcon = (p: IconProps) => (
|
|
507
|
+
<Svg m="bounce" {...p}>
|
|
508
|
+
<rect x="3.5" y="4.5" width="17" height="15" rx="2.5" />
|
|
509
|
+
<path d="M3.5 9.5h17M9.5 9.5v10" />
|
|
510
|
+
</Svg>
|
|
511
|
+
)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// A phone's keyboard covers the bottom of the window, and Safari scrolls a field into view only when
|
|
2
|
+
// you tap the field itself. Parts move focus from code without scrolling (so their morph never jumps),
|
|
3
|
+
// which leaves the field under the keyboard. While a keyboard is up, this keeps the focused field in
|
|
4
|
+
// view: the page scrolls just enough, or a fixed layer (a sheet, a dialog) lifts, then drops back
|
|
5
|
+
// when the keyboard goes. A layer that places itself over the keyboard opts out with data-own-keyboard.
|
|
6
|
+
|
|
7
|
+
const GAP = 16
|
|
8
|
+
const FIELD = 'input:not([type="checkbox"], [type="radio"], [type="range"], [type="button"], [type="submit"], [type="reset"], [type="color"], [type="file"]), textarea, [contenteditable=""], [contenteditable="true"]'
|
|
9
|
+
|
|
10
|
+
let watching = false
|
|
11
|
+
let lifted: { layer: HTMLElement; by: number } | null = null
|
|
12
|
+
let probe: HTMLElement | null = null
|
|
13
|
+
|
|
14
|
+
function fixedLayer(el: HTMLElement) {
|
|
15
|
+
for (let a: HTMLElement | null = el; a && a !== document.body; a = a.parentElement) if (getComputedStyle(a).position === 'fixed') return a
|
|
16
|
+
return null
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function drop() {
|
|
20
|
+
if (!lifted) return
|
|
21
|
+
lifted.layer.style.removeProperty('translate')
|
|
22
|
+
lifted = null
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function reveal() {
|
|
26
|
+
const vv = window.visualViewport!
|
|
27
|
+
const field = document.activeElement
|
|
28
|
+
// A pinch zoom also shrinks the visual viewport; only a keyboard does it at scale 1.
|
|
29
|
+
const keyboard = vv.scale < 1.01 && innerHeight - vv.height > 120
|
|
30
|
+
if (!keyboard || !(field instanceof HTMLElement) || !field.matches(FIELD) || field.closest('[data-own-keyboard]')) return drop()
|
|
31
|
+
const layer = fixedLayer(field)
|
|
32
|
+
if (lifted && lifted.layer !== layer) drop()
|
|
33
|
+
// The visible bottom, in the same terms as measured boxes: on iPhone those move with the visible area
|
|
34
|
+
// when it pans, elsewhere they stay on the page. A marker fixed to the floor shows which.
|
|
35
|
+
const floor = probe!.getBoundingClientRect().top
|
|
36
|
+
const over = field.getBoundingClientRect().bottom + GAP - (floor - (innerHeight - vv.offsetTop - vv.height))
|
|
37
|
+
if (!layer) {
|
|
38
|
+
if (over > 0) window.scrollBy({ top: over, behavior: matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth' })
|
|
39
|
+
return
|
|
40
|
+
}
|
|
41
|
+
// Never lifted past the top of what is visible.
|
|
42
|
+
const now = lifted?.by ?? 0
|
|
43
|
+
const room = layer.getBoundingClientRect().top - (floor - innerHeight + vv.offsetTop) - GAP + now
|
|
44
|
+
const by = Math.max(0, Math.min(now + over, room))
|
|
45
|
+
if (by === now) return
|
|
46
|
+
layer.style.translate = `0 ${-by}px`
|
|
47
|
+
lifted = { layer, by }
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Starts watching once per page. Only touch screens get a keyboard, so a mouse never sees it act. */
|
|
51
|
+
export function watchKeyboard() {
|
|
52
|
+
const vv = typeof window !== 'undefined' ? window.visualViewport : null
|
|
53
|
+
if (watching || !vv || !matchMedia('(pointer: coarse)').matches) return
|
|
54
|
+
watching = true
|
|
55
|
+
probe = document.createElement('div')
|
|
56
|
+
probe.setAttribute('aria-hidden', 'true')
|
|
57
|
+
Object.assign(probe.style, { position: 'fixed', bottom: '0', left: '0', width: '0', height: '0', pointerEvents: 'none' })
|
|
58
|
+
document.body.append(probe)
|
|
59
|
+
vv.addEventListener('resize', reveal)
|
|
60
|
+
document.addEventListener('focusin', () => requestAnimationFrame(reveal))
|
|
61
|
+
document.addEventListener('focusout', () => requestAnimationFrame(reveal))
|
|
62
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { useEffect, useRef, type RefObject } from 'react'
|
|
2
|
+
|
|
3
|
+
// A stack of open layers, so Esc and outside clicks only close the top one.
|
|
4
|
+
const stack: Array<{ id: symbol; hint: boolean }> = []
|
|
5
|
+
|
|
6
|
+
export function useDismiss(
|
|
7
|
+
active: boolean,
|
|
8
|
+
refs: Array<RefObject<HTMLElement | null>>,
|
|
9
|
+
onDismiss: (reason: 'escape' | 'outside', event: Event) => void,
|
|
10
|
+
/** hint: a tooltip-like layer. It takes Esc first, but clicks pass to the layer below it. focusOut: focus moving
|
|
11
|
+
outside it, while no layer is open above it, counts as outside too. */
|
|
12
|
+
options: { outside?: boolean; hint?: boolean; focusOut?: boolean } = {},
|
|
13
|
+
) {
|
|
14
|
+
const { outside = true, hint = false, focusOut = false } = options
|
|
15
|
+
const cb = useRef(onDismiss)
|
|
16
|
+
cb.current = onDismiss
|
|
17
|
+
const refsRef = useRef(refs)
|
|
18
|
+
refsRef.current = refs
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (!active) return
|
|
22
|
+
const id = Symbol('layer')
|
|
23
|
+
stack.push({ id, hint })
|
|
24
|
+
const isTop = () => stack[stack.length - 1]?.id === id
|
|
25
|
+
const isTopForPointer = () => stack.filter((l) => !l.hint).pop()?.id === id
|
|
26
|
+
|
|
27
|
+
const onKey = (e: KeyboardEvent) => {
|
|
28
|
+
if (e.key === 'Escape' && isTop()) {
|
|
29
|
+
e.stopPropagation()
|
|
30
|
+
cb.current('escape', e)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const onPointer = (e: PointerEvent) => {
|
|
34
|
+
if (!outside || !isTopForPointer()) return
|
|
35
|
+
const target = e.target as Node
|
|
36
|
+
if (refsRef.current.some((r) => r.current?.contains(target))) return
|
|
37
|
+
// Things like the toast stack sit above every layer and never count as outside.
|
|
38
|
+
if (target instanceof Element && target.closest('[data-gooee-layer-ignore]')) return
|
|
39
|
+
cb.current('outside', e)
|
|
40
|
+
}
|
|
41
|
+
const onFocus = (e: FocusEvent) => {
|
|
42
|
+
if (!focusOut || !isTopForPointer()) return
|
|
43
|
+
const target = e.target as Node
|
|
44
|
+
if (refsRef.current.some((r) => r.current?.contains(target))) return
|
|
45
|
+
cb.current('outside', e)
|
|
46
|
+
}
|
|
47
|
+
document.addEventListener('keydown', onKey)
|
|
48
|
+
document.addEventListener('pointerdown', onPointer)
|
|
49
|
+
document.addEventListener('focusin', onFocus)
|
|
50
|
+
return () => {
|
|
51
|
+
document.removeEventListener('keydown', onKey)
|
|
52
|
+
document.removeEventListener('pointerdown', onPointer)
|
|
53
|
+
document.removeEventListener('focusin', onFocus)
|
|
54
|
+
const i = stack.findIndex((l) => l.id === id)
|
|
55
|
+
if (i >= 0) stack.splice(i, 1)
|
|
56
|
+
}
|
|
57
|
+
}, [active, outside, hint, focusOut])
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
let lockCount = 0
|
|
61
|
+
let saved = ''
|
|
62
|
+
let savedPadding = ''
|
|
63
|
+
|
|
64
|
+
export function useScrollLock(active: boolean) {
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (!active) return
|
|
67
|
+
if (lockCount === 0) {
|
|
68
|
+
const body = document.body
|
|
69
|
+
// Fills the space the scrollbar leaves, so the page does not shift sideways.
|
|
70
|
+
const bar = window.innerWidth - document.documentElement.clientWidth
|
|
71
|
+
saved = body.style.overflow
|
|
72
|
+
savedPadding = body.style.paddingRight
|
|
73
|
+
if (bar > 0) body.style.paddingRight = `calc(${getComputedStyle(body).paddingRight} + ${bar}px)`
|
|
74
|
+
body.style.overflow = 'hidden'
|
|
75
|
+
}
|
|
76
|
+
lockCount++
|
|
77
|
+
return () => {
|
|
78
|
+
lockCount--
|
|
79
|
+
if (lockCount === 0) {
|
|
80
|
+
document.body.style.overflow = saved
|
|
81
|
+
document.body.style.paddingRight = savedPadding
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}, [active])
|
|
85
|
+
}
|