@sanity/ui 4.2.0 → 5.0.0-alpha.10
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/README.md +194 -28
- package/bin/sanity-ui.js +14 -0
- package/dist/_chunks-es/LazyRefractor.js +20 -0
- package/dist/_chunks-es/LazyRefractor.js.map +1 -0
- package/dist/cli/checks.js +148 -0
- package/dist/cli/config.js +23 -0
- package/dist/cli/detect.js +181 -0
- package/dist/cli/doctor.js +49 -0
- package/dist/cli/index.js +69 -0
- package/dist/cli/init.js +189 -0
- package/dist/cli/install.js +79 -0
- package/dist/cli/log.js +66 -0
- package/dist/cli/selfPackage.js +11 -0
- package/dist/cli/styles.js +185 -0
- package/dist/cli/test-utils.js +8 -0
- package/dist/cli/tsconfig.js +236 -0
- package/dist/cli/types.js +1 -0
- package/dist/cli/versions.js +45 -0
- package/dist/index.d.ts +1203 -1469
- package/dist/index.js +2123 -1989
- package/dist/index.js.map +1 -1
- package/dist/polyfills.d.ts +1 -0
- package/dist/polyfills.js +5 -0
- package/dist/polyfills.js.map +1 -0
- package/dist/styles.css +1 -547
- package/package.json +57 -58
- package/src/cli/checks.test.ts +38 -0
- package/src/cli/checks.ts +200 -0
- package/src/cli/config.ts +44 -0
- package/src/cli/detect.test.ts +191 -0
- package/src/cli/detect.ts +205 -0
- package/src/cli/doctor.test.ts +52 -0
- package/src/cli/doctor.ts +65 -0
- package/src/cli/index.ts +77 -0
- package/src/cli/init.ts +225 -0
- package/src/cli/install.test.ts +52 -0
- package/src/cli/install.ts +108 -0
- package/src/cli/log.ts +79 -0
- package/src/cli/selfPackage.ts +14 -0
- package/src/cli/styles.test.ts +130 -0
- package/src/cli/styles.ts +205 -0
- package/src/cli/test-utils.ts +10 -0
- package/src/cli/tsconfig.test.ts +174 -0
- package/src/cli/tsconfig.ts +282 -0
- package/src/cli/types.ts +77 -0
- package/src/cli/versions.test.ts +35 -0
- package/src/cli/versions.ts +41 -0
- package/src/components/badge/Badge.tsx +53 -0
- package/src/components/badge/badge.css +6 -0
- package/src/components/badge/badge.props.ts +31 -0
- package/src/components/box/Box.tsx +30 -0
- package/src/components/box/box.css +4 -0
- package/src/components/box/box.props.ts +29 -0
- package/src/components/button/Button.tsx +78 -0
- package/src/components/button/button.css +72 -0
- package/src/components/button/button.props.ts +122 -0
- package/src/components/card/Card.tsx +31 -0
- package/src/components/card/card.css +4 -0
- package/src/components/card/card.props.ts +58 -0
- package/src/components/checkbox/Checkbox.tsx +64 -0
- package/src/components/checkbox/checkbox.css +100 -0
- package/src/components/checkbox/checkbox.props.ts +33 -0
- package/src/components/code/Code.tsx +38 -0
- package/src/components/code/LazyRefractor.tsx +9 -0
- package/src/components/code/code.css +40 -0
- package/src/components/code/code.props.ts +44 -0
- package/src/components/container/Container.tsx +30 -0
- package/src/components/container/container.css +4 -0
- package/src/components/container/container.props.ts +28 -0
- package/src/components/dialog/Dialog.tsx +139 -0
- package/src/components/dialog/dialog.css +49 -0
- package/src/components/dialog/dialog.props.ts +45 -0
- package/src/components/divider/Divider.tsx +23 -0
- package/src/components/divider/divider.props.ts +9 -0
- package/src/components/eyebrow/Eyebrow.tsx +54 -0
- package/src/components/eyebrow/eyebrow.css +11 -0
- package/src/components/eyebrow/eyebrow.props.ts +28 -0
- package/src/components/flex/Flex.tsx +30 -0
- package/src/components/flex/flex.css +4 -0
- package/src/components/flex/flex.props.ts +33 -0
- package/src/components/grid/Grid.tsx +30 -0
- package/src/components/grid/grid.css +4 -0
- package/src/components/grid/grid.props.ts +33 -0
- package/src/components/h-stack/HStack.tsx +34 -0
- package/src/components/h-stack/hStack.props.ts +17 -0
- package/src/components/heading/Heading.tsx +54 -0
- package/src/components/heading/heading.css +9 -0
- package/src/components/heading/heading.props.ts +31 -0
- package/src/components/icon/Icon.tsx +24 -0
- package/src/components/icon/icon.css +17 -0
- package/src/components/icon/icon.props.ts +35 -0
- package/src/components/icon-button/IconButton.tsx +32 -0
- package/src/components/icon-button/iconButton.props.ts +31 -0
- package/src/components/index.css +28 -0
- package/src/components/indicator/Indicator.tsx +42 -0
- package/src/components/indicator/indicator.css +4 -0
- package/src/components/indicator/indicator.props.ts +24 -0
- package/src/components/indicator-stack/IndicatorStack.tsx +31 -0
- package/src/components/indicator-stack/indicator-stack.css +7 -0
- package/src/components/indicator-stack/indicatorStack.props.ts +15 -0
- package/src/components/inline/Inline.tsx +38 -0
- package/src/components/inline/inline.css +4 -0
- package/src/components/inline/inline.props.ts +100 -0
- package/src/components/label/Label.tsx +34 -0
- package/src/components/label/label.css +3 -0
- package/src/components/label/label.props.ts +25 -0
- package/src/components/link/Link.tsx +29 -0
- package/src/components/link/link.css +12 -0
- package/src/components/link/link.props.ts +23 -0
- package/src/components/list/List.tsx +167 -0
- package/src/components/list/list.css +25 -0
- package/src/components/list/list.props.ts +130 -0
- package/src/components/popover/Popover.tsx +85 -0
- package/src/components/popover/popover.css +21 -0
- package/src/components/popover/popover.props.ts +38 -0
- package/src/components/press-area/PressArea.tsx +29 -0
- package/src/components/press-area/press-area.css +22 -0
- package/src/components/press-area/pressArea.props.ts +16 -0
- package/src/components/radio/Radio.tsx +48 -0
- package/src/components/radio/radio.css +97 -0
- package/src/components/radio/radio.props.ts +25 -0
- package/src/components/skip-to-content/SkipToContent.tsx +35 -0
- package/src/components/skip-to-content/skip-to-content.css +9 -0
- package/src/components/skip-to-content/skipToContent.props.ts +25 -0
- package/src/components/spinner/Spinner.tsx +28 -0
- package/src/components/spinner/spinner.css +10 -0
- package/src/components/spinner/spinner.props.ts +19 -0
- package/src/components/switch/Switch.tsx +48 -0
- package/src/components/switch/switch.css +119 -0
- package/src/components/switch/switch.props.ts +25 -0
- package/src/components/text/Text.tsx +53 -0
- package/src/components/text/text.css +9 -0
- package/src/components/text/text.props.ts +28 -0
- package/src/components/tooltip/Tooltip.tsx +97 -0
- package/src/components/tooltip/tooltip.css +31 -0
- package/src/components/tooltip/tooltip.props.ts +36 -0
- package/src/components/tooltip-group/TooltipGroup.tsx +64 -0
- package/src/components/tooltip-group/tooltipGroup.props.ts +15 -0
- package/src/components/v-stack/VStack.tsx +32 -0
- package/src/components/v-stack/vStack.props.ts +17 -0
- package/src/components/visually-hidden/VisuallyHidden.tsx +29 -0
- package/src/components/visually-hidden/visually-hidden.css +9 -0
- package/src/components/visually-hidden/visuallyHidden.props.ts +23 -0
- package/src/css/classes/dynamic/flex-child.css +5 -0
- package/src/css/classes/dynamic/grid-child.css +8 -0
- package/src/css/classes/dynamic/grid-parent.css +6 -0
- package/src/css/classes/dynamic/height.css +5 -0
- package/src/css/classes/dynamic/index.css +7 -0
- package/src/css/classes/dynamic/line-clamp.css +5 -0
- package/src/css/classes/dynamic/readme.md +3 -0
- package/src/css/classes/dynamic/width.css +7 -0
- package/src/css/classes/dynamic/z-index.css +3 -0
- package/src/css/classes/generic/display.css +10 -0
- package/src/css/classes/generic/flex.css +24 -0
- package/src/css/classes/generic/grid.css +7 -0
- package/src/css/classes/generic/index.css +7 -0
- package/src/css/classes/generic/overflow.css +19 -0
- package/src/css/classes/generic/placement.css +202 -0
- package/src/css/classes/generic/position.css +7 -0
- package/src/css/classes/generic/readme.md +3 -0
- package/src/css/classes/generic/text-align.css +5 -0
- package/src/css/classes/index.css +4 -0
- package/src/css/classes/local/animation.css +4 -0
- package/src/css/classes/local/border.css +20 -0
- package/src/css/classes/local/index.css +6 -0
- package/src/css/classes/local/readme.md +3 -0
- package/src/css/classes/local/text-overflow.css +5 -0
- package/src/css/classes/local/text-trim.css +45 -0
- package/src/css/classes/local/tone.css +75 -0
- package/src/css/classes/local/top-anchor.css +4 -0
- package/src/css/classes/system/color.css +223 -0
- package/src/css/classes/system/container.css +8 -0
- package/src/css/classes/system/font-family.css +2 -0
- package/src/css/classes/system/font-weight.css +4 -0
- package/src/css/classes/system/gap.css +37 -0
- package/src/css/classes/system/index.css +10 -0
- package/src/css/classes/system/inset.css +56 -0
- package/src/css/classes/system/margin.css +148 -0
- package/src/css/classes/system/padding.css +78 -0
- package/src/css/classes/system/radius.css +10 -0
- package/src/css/classes/system/readme.md +3 -0
- package/src/css/classes/system/shadow.css +6 -0
- package/src/css/classes/system/typography.css +31 -0
- package/src/css/global/font-face.css +20 -0
- package/src/css/global/index.css +2 -0
- package/src/css/global/reset.css +76 -0
- package/src/css/tokens/index.css +3 -0
- package/src/css/tokens/opacity.css +6 -0
- package/src/css/tokens/semantic.css +25 -0
- package/src/css/tokens/surface.css +27 -0
- package/src/hooks/useIsClient.ts +10 -0
- package/src/index.css +18 -0
- package/src/index.ts +65 -0
- package/src/polyfills.ts +15 -0
- package/src/props/border.ts +51 -0
- package/src/props/flexChild.ts +29 -0
- package/src/props/flexParent.ts +47 -0
- package/src/props/gap.ts +31 -0
- package/src/props/gridChild.ts +50 -0
- package/src/props/gridParent.ts +45 -0
- package/src/props/height.ts +29 -0
- package/src/props/layout.ts +44 -0
- package/src/props/margin.ts +59 -0
- package/src/props/overflow.ts +30 -0
- package/src/props/padding.ts +59 -0
- package/src/props/placement.ts +16 -0
- package/src/props/position.ts +52 -0
- package/src/props/shadow.ts +15 -0
- package/src/props/tone.ts +15 -0
- package/src/props/typography.ts +62 -0
- package/src/props/width.ts +29 -0
- package/src/props/zIndex.ts +15 -0
- package/src/styles.css.d.ts +1 -0
- package/src/styles.css.node.js +2 -0
- package/src/styles.css.test.ts +24 -0
- package/src/types/Button.ts +8 -0
- package/src/types/Code.ts +6 -0
- package/src/types/Container.ts +3 -0
- package/src/types/Density.ts +3 -0
- package/src/types/Display.ts +11 -0
- package/src/types/Eyebrow.ts +3 -0
- package/src/types/Flex.ts +22 -0
- package/src/types/FontWeight.ts +3 -0
- package/src/types/Grid.ts +3 -0
- package/src/types/Heading.ts +6 -0
- package/src/types/Icon.ts +3 -0
- package/src/types/Interactive.ts +8 -0
- package/src/types/List.ts +2 -0
- package/src/types/Overflow.ts +3 -0
- package/src/types/Placement.ts +16 -0
- package/src/types/Position.ts +3 -0
- package/src/types/PropDef.ts +73 -0
- package/src/types/Radius.ts +3 -0
- package/src/types/Responsive.ts +10 -0
- package/src/types/Shadow.ts +3 -0
- package/src/types/Space.ts +15 -0
- package/src/types/Text.ts +3 -0
- package/src/types/TextAlign.ts +3 -0
- package/src/types/Tone.ts +3 -0
- package/src/utils/getProps.test.ts +156 -0
- package/src/utils/getProps.ts +156 -0
- package/src/utils/mergeTriggerProps.ts +66 -0
- package/src/utils/renderPortal.tsx +14 -0
- package/src/utils/suffixClassName.ts +5 -0
- package/src/version.ts +3 -0
- package/LICENSE +0 -21
- package/dist/_system-CTe2lb5l.d.ts +0 -40
- package/dist/_system-CTe2lb5l.d.ts.map +0 -1
- package/dist/arrow-BmX6qbAS.js +0 -170
- package/dist/arrow-BmX6qbAS.js.map +0 -1
- package/dist/autocomplete.d.ts +0 -140
- package/dist/autocomplete.d.ts.map +0 -1
- package/dist/autocomplete.js +0 -470
- package/dist/autocomplete.js.map +0 -1
- package/dist/breadcrumbs.d.ts +0 -18
- package/dist/breadcrumbs.d.ts.map +0 -1
- package/dist/breadcrumbs.js +0 -119
- package/dist/breadcrumbs.js.map +0 -1
- package/dist/button-BNyKSDyA.js +0 -180
- package/dist/button-BNyKSDyA.js.map +0 -1
- package/dist/button-dnqMFkWg.d.ts +0 -76
- package/dist/button-dnqMFkWg.d.ts.map +0 -1
- package/dist/card-C0a0wQTc.d.ts +0 -7
- package/dist/card-C0a0wQTc.d.ts.map +0 -1
- package/dist/code.d.ts +0 -20
- package/dist/code.d.ts.map +0 -1
- package/dist/code.js +0 -90
- package/dist/code.js.map +0 -1
- package/dist/codeFontStyle-84SMhFtI.js +0 -11
- package/dist/codeFontStyle-84SMhFtI.js.map +0 -1
- package/dist/component-DVlwaWB-.d.ts +0 -25
- package/dist/component-DVlwaWB-.d.ts.map +0 -1
- package/dist/element-BYgCE_iK.js +0 -51
- package/dist/element-BYgCE_iK.js.map +0 -1
- package/dist/factory-BzXTX8_Q.js +0 -3056
- package/dist/factory-BzXTX8_Q.js.map +0 -1
- package/dist/flex-DmbDG2ks.js +0 -76
- package/dist/flex-DmbDG2ks.js.map +0 -1
- package/dist/font-EtfxKPUz.d.ts +0 -49
- package/dist/font-EtfxKPUz.d.ts.map +0 -1
- package/dist/getElementRef-Jw7gY0eV.js +0 -102
- package/dist/getElementRef-Jw7gY0eV.js.map +0 -1
- package/dist/getScopedTheme-C-sZsyAz.js +0 -267
- package/dist/getScopedTheme-C-sZsyAz.js.map +0 -1
- package/dist/getTheme_v2-y09KqtEb.js +0 -487
- package/dist/getTheme_v2-y09KqtEb.js.map +0 -1
- package/dist/grid-6JSgMj1O.js +0 -115
- package/dist/grid-6JSgMj1O.js.map +0 -1
- package/dist/helpers-C8xxXAQC.js +0 -63
- package/dist/helpers-C8xxXAQC.js.map +0 -1
- package/dist/hotkeys-CaHsQlsO.js +0 -168
- package/dist/hotkeys-CaHsQlsO.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/layer-Bl5R3uNR.js +0 -61
- package/dist/layer-Bl5R3uNR.js.map +0 -1
- package/dist/layer-ChlP9Ik6.d.ts +0 -242
- package/dist/layer-ChlP9Ik6.d.ts.map +0 -1
- package/dist/menu.d.ts +0 -146
- package/dist/menu.d.ts.map +0 -1
- package/dist/menu.js +0 -626
- package/dist/menu.js.map +0 -1
- package/dist/popover-B7-28L8y.js +0 -408
- package/dist/popover-B7-28L8y.js.map +0 -1
- package/dist/popover-CMlQeKn0.d.ts +0 -96
- package/dist/popover-CMlQeKn0.d.ts.map +0 -1
- package/dist/popover.d.ts +0 -2
- package/dist/popover.js +0 -3
- package/dist/refractor-CC48DwHi.js +0 -20
- package/dist/refractor-CC48DwHi.js.map +0 -1
- package/dist/responsiveFont-CilwaORG.js +0 -55
- package/dist/responsiveFont-CilwaORG.js.map +0 -1
- package/dist/rgba-BSYaEUW6.d.ts +0 -846
- package/dist/rgba-BSYaEUW6.d.ts.map +0 -1
- package/dist/selectable-B0GUIL74.d.ts +0 -7
- package/dist/selectable-B0GUIL74.d.ts.map +0 -1
- package/dist/stack-rsNFPq2-.js +0 -112
- package/dist/stack-rsNFPq2-.js.map +0 -1
- package/dist/styles-css.d.ts +0 -2
- package/dist/styles-css.js +0 -4
- package/dist/textInput-pSfQjkmx.js +0 -313
- package/dist/textInput-pSfQjkmx.js.map +0 -1
- package/dist/theme.d.ts +0 -280
- package/dist/theme.d.ts.map +0 -1
- package/dist/theme.js +0 -55
- package/dist/theme.js.map +0 -1
- package/dist/toast.d.ts +0 -73
- package/dist/toast.d.ts.map +0 -1
- package/dist/toast.js +0 -302
- package/dist/toast.js.map +0 -1
- package/dist/tooltip.d.ts +0 -88
- package/dist/tooltip.d.ts.map +0 -1
- package/dist/tooltip.js +0 -435
- package/dist/tooltip.js.map +0 -1
- package/dist/useClickOutsideEvent-wGLGWBZN.js +0 -36
- package/dist/useClickOutsideEvent-wGLGWBZN.js.map +0 -1
- package/dist/useElementSize-BJvbGHq8.js +0 -51
- package/dist/useElementSize-BJvbGHq8.js.map +0 -1
- package/dist/useLayer-D1usxIE0.js +0 -712
- package/dist/useLayer-D1usxIE0.js.map +0 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@breakpoints {
|
|
2
|
+
.sui-p0 { padding: var(--space-0); }
|
|
3
|
+
.sui-p1 { padding: var(--space-1); }
|
|
4
|
+
.sui-p2 { padding: var(--space-2); }
|
|
5
|
+
.sui-p3 { padding: var(--space-3); }
|
|
6
|
+
.sui-p4 { padding: var(--space-4); }
|
|
7
|
+
.sui-p5 { padding: var(--space-5); }
|
|
8
|
+
.sui-p6 { padding: var(--space-6); }
|
|
9
|
+
.sui-p7 { padding: var(--space-7); }
|
|
10
|
+
.sui-p8 { padding: var(--space-8); }
|
|
11
|
+
.sui-p9 { padding: var(--space-9); }
|
|
12
|
+
|
|
13
|
+
.sui-px0 { padding-left: var(--space-0); padding-right: var(--space-0); }
|
|
14
|
+
.sui-px1 { padding-left: var(--space-1); padding-right: var(--space-1); }
|
|
15
|
+
.sui-px2 { padding-left: var(--space-2); padding-right: var(--space-2); }
|
|
16
|
+
.sui-px3 { padding-left: var(--space-3); padding-right: var(--space-3); }
|
|
17
|
+
.sui-px4 { padding-left: var(--space-4); padding-right: var(--space-4); }
|
|
18
|
+
.sui-px5 { padding-left: var(--space-5); padding-right: var(--space-5); }
|
|
19
|
+
.sui-px6 { padding-left: var(--space-6); padding-right: var(--space-6); }
|
|
20
|
+
.sui-px7 { padding-left: var(--space-7); padding-right: var(--space-7); }
|
|
21
|
+
.sui-px8 { padding-left: var(--space-8); padding-right: var(--space-8); }
|
|
22
|
+
.sui-px9 { padding-left: var(--space-9); padding-right: var(--space-9); }
|
|
23
|
+
|
|
24
|
+
.sui-py0 { padding-top: var(--space-0); padding-bottom: var(--space-0); }
|
|
25
|
+
.sui-py1 { padding-top: var(--space-1); padding-bottom: var(--space-1); }
|
|
26
|
+
.sui-py2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
|
|
27
|
+
.sui-py3 { padding-top: var(--space-3); padding-bottom: var(--space-3); }
|
|
28
|
+
.sui-py4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
|
|
29
|
+
.sui-py5 { padding-top: var(--space-5); padding-bottom: var(--space-5); }
|
|
30
|
+
.sui-py6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
|
|
31
|
+
.sui-py7 { padding-top: var(--space-7); padding-bottom: var(--space-7); }
|
|
32
|
+
.sui-py8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
|
|
33
|
+
.sui-py9 { padding-top: var(--space-9); padding-bottom: var(--space-9); }
|
|
34
|
+
|
|
35
|
+
.sui-pt0 { padding-top: var(--space-0); }
|
|
36
|
+
.sui-pt1 { padding-top: var(--space-1); }
|
|
37
|
+
.sui-pt2 { padding-top: var(--space-2); }
|
|
38
|
+
.sui-pt3 { padding-top: var(--space-3); }
|
|
39
|
+
.sui-pt4 { padding-top: var(--space-4); }
|
|
40
|
+
.sui-pt5 { padding-top: var(--space-5); }
|
|
41
|
+
.sui-pt6 { padding-top: var(--space-6); }
|
|
42
|
+
.sui-pt7 { padding-top: var(--space-7); }
|
|
43
|
+
.sui-pt8 { padding-top: var(--space-8); }
|
|
44
|
+
.sui-pt9 { padding-top: var(--space-9); }
|
|
45
|
+
|
|
46
|
+
.sui-pr0 { padding-right: var(--space-0); }
|
|
47
|
+
.sui-pr1 { padding-right: var(--space-1); }
|
|
48
|
+
.sui-pr2 { padding-right: var(--space-2); }
|
|
49
|
+
.sui-pr3 { padding-right: var(--space-3); }
|
|
50
|
+
.sui-pr4 { padding-right: var(--space-4); }
|
|
51
|
+
.sui-pr5 { padding-right: var(--space-5); }
|
|
52
|
+
.sui-pr6 { padding-right: var(--space-6); }
|
|
53
|
+
.sui-pr7 { padding-right: var(--space-7); }
|
|
54
|
+
.sui-pr8 { padding-right: var(--space-8); }
|
|
55
|
+
.sui-pr9 { padding-right: var(--space-9); }
|
|
56
|
+
|
|
57
|
+
.sui-pb0 { padding-bottom: var(--space-0); }
|
|
58
|
+
.sui-pb1 { padding-bottom: var(--space-1); }
|
|
59
|
+
.sui-pb2 { padding-bottom: var(--space-2); }
|
|
60
|
+
.sui-pb3 { padding-bottom: var(--space-3); }
|
|
61
|
+
.sui-pb4 { padding-bottom: var(--space-4); }
|
|
62
|
+
.sui-pb5 { padding-bottom: var(--space-5); }
|
|
63
|
+
.sui-pb6 { padding-bottom: var(--space-6); }
|
|
64
|
+
.sui-pb7 { padding-bottom: var(--space-7); }
|
|
65
|
+
.sui-pb8 { padding-bottom: var(--space-8); }
|
|
66
|
+
.sui-pb9 { padding-bottom: var(--space-9); }
|
|
67
|
+
|
|
68
|
+
.sui-pl0 { padding-left: var(--space-0); }
|
|
69
|
+
.sui-pl1 { padding-left: var(--space-1); }
|
|
70
|
+
.sui-pl2 { padding-left: var(--space-2); }
|
|
71
|
+
.sui-pl3 { padding-left: var(--space-3); }
|
|
72
|
+
.sui-pl4 { padding-left: var(--space-4); }
|
|
73
|
+
.sui-pl5 { padding-left: var(--space-5); }
|
|
74
|
+
.sui-pl6 { padding-left: var(--space-6); }
|
|
75
|
+
.sui-pl7 { padding-left: var(--space-7); }
|
|
76
|
+
.sui-pl8 { padding-left: var(--space-8); }
|
|
77
|
+
.sui-pl9 { padding-left: var(--space-9); }
|
|
78
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
@breakpoints {
|
|
2
|
+
.sui-radius0 { border-radius: var(--radius-0); }
|
|
3
|
+
.sui-radius1 { border-radius: var(--radius-1); }
|
|
4
|
+
.sui-radius2 { border-radius: var(--radius-2); }
|
|
5
|
+
.sui-radius3 { border-radius: var(--radius-3); }
|
|
6
|
+
.sui-radius4 { border-radius: var(--radius-4); }
|
|
7
|
+
.sui-radius5 { border-radius: var(--radius-5); }
|
|
8
|
+
.sui-radius6 { border-radius: var(--radius-6); }
|
|
9
|
+
.sui-radius-full { border-radius: var(--radius-round); }
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
.sui-shadow0 { box-shadow: var(--shadow0); }
|
|
2
|
+
.sui-shadow1 { box-shadow: var(--shadow1); }
|
|
3
|
+
.sui-shadow2 { box-shadow: var(--shadow2); }
|
|
4
|
+
.sui-shadow3 { box-shadow: var(--shadow3); }
|
|
5
|
+
.sui-shadow4 { box-shadow: var(--shadow4); }
|
|
6
|
+
.sui-shadow5 { box-shadow: var(--shadow5); }
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@breakpoints {
|
|
2
|
+
.sui-text-body0 { font: var(--body-0); }
|
|
3
|
+
.sui-text-body1 { font: var(--body-1); }
|
|
4
|
+
.sui-text-body2 { font: var(--body-2); }
|
|
5
|
+
.sui-text-body3 { font: var(--body-3); }
|
|
6
|
+
.sui-text-body4 { font: var(--body-4); }
|
|
7
|
+
|
|
8
|
+
.sui-text-code0 { font: var(--code-0); }
|
|
9
|
+
.sui-text-code1 { font: var(--code-1); }
|
|
10
|
+
.sui-text-code2 { font: var(--code-2); }
|
|
11
|
+
.sui-text-code3 { font: var(--code-3); }
|
|
12
|
+
.sui-text-code4 { font: var(--code-4); }
|
|
13
|
+
|
|
14
|
+
.sui-text-heading0 { font: var(--heading-0); }
|
|
15
|
+
.sui-text-heading1 { font: var(--heading-1); }
|
|
16
|
+
.sui-text-heading2 { font: var(--heading-2); }
|
|
17
|
+
.sui-text-heading3 { font: var(--heading-3); }
|
|
18
|
+
.sui-text-heading4 { font: var(--heading-4); }
|
|
19
|
+
.sui-text-heading5 { font: var(--heading-5); }
|
|
20
|
+
.sui-text-heading6 { font: var(--heading-6); }
|
|
21
|
+
.sui-text-heading7 { font: var(--heading-7); }
|
|
22
|
+
.sui-text-heading8 { font: var(--heading-8); }
|
|
23
|
+
.sui-text-heading9 { font: var(--heading-9); }
|
|
24
|
+
|
|
25
|
+
.sui-text-eyebrow0 { font: var(--label-0); }
|
|
26
|
+
.sui-text-eyebrow1 { font: var(--label-1); }
|
|
27
|
+
.sui-text-eyebrow2 { font: var(--label-2); }
|
|
28
|
+
.sui-text-eyebrow3 { font: var(--label-3); }
|
|
29
|
+
.sui-text-eyebrow4 { font: var(--label-4); }
|
|
30
|
+
.sui-text-eyebrow5 { font: var(--label-5); }
|
|
31
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: Inter;
|
|
3
|
+
font-style: normal;
|
|
4
|
+
font-weight: 400 700;
|
|
5
|
+
font-display: swap;
|
|
6
|
+
src: url('https://design-system-static.sanity.io/InterVariable-latin-20260728.woff2') format('woff2-variations');
|
|
7
|
+
src: url('https://design-system-static.sanity.io/InterVariable-latin-20260728.woff2') format('woff2')
|
|
8
|
+
tech('variations');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@font-face {
|
|
12
|
+
font-family: Inter;
|
|
13
|
+
font-style: italic;
|
|
14
|
+
font-weight: 400 700;
|
|
15
|
+
font-display: swap;
|
|
16
|
+
src: url('https://design-system-static.sanity.io/InterVariable-Italic-latin-20260728.woff2')
|
|
17
|
+
format('woff2-variations');
|
|
18
|
+
src: url('https://design-system-static.sanity.io/InterVariable-Italic-latin-20260728.woff2') format('woff2')
|
|
19
|
+
tech('variations');
|
|
20
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/* Default to border-box sizing */
|
|
2
|
+
*,
|
|
3
|
+
*::before,
|
|
4
|
+
*::after {
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* Zero out default margins, padding, and borders */
|
|
9
|
+
* {
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
border: 0 solid transparent;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:root {
|
|
16
|
+
color-scheme: light dark;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Prevent adjustments of font size after orientation changes in iOS. */
|
|
20
|
+
:where(html) {
|
|
21
|
+
-webkit-text-size-adjust: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where(body) {
|
|
25
|
+
background: light-dark(var(--white), var(--black));
|
|
26
|
+
font-family: var(--sans);
|
|
27
|
+
-webkit-font-smoothing: antialiased;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Display multimedia as block by default */
|
|
31
|
+
:where(
|
|
32
|
+
audio,
|
|
33
|
+
canvas,
|
|
34
|
+
embed,
|
|
35
|
+
iframe,
|
|
36
|
+
img,
|
|
37
|
+
object,
|
|
38
|
+
picture,
|
|
39
|
+
video
|
|
40
|
+
){
|
|
41
|
+
display: block;
|
|
42
|
+
max-width: 100%;
|
|
43
|
+
}
|
|
44
|
+
:where(img, picture, video) {
|
|
45
|
+
block-size: auto;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Inherit typography in form controls */
|
|
49
|
+
:where(
|
|
50
|
+
button,
|
|
51
|
+
input,
|
|
52
|
+
select,
|
|
53
|
+
textarea
|
|
54
|
+
) {
|
|
55
|
+
font: inherit;
|
|
56
|
+
line-height: inherit;
|
|
57
|
+
color: inherit;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Remove excess space for table borders */
|
|
61
|
+
:where(table) {
|
|
62
|
+
border-collapse: collapse;
|
|
63
|
+
border-spacing: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Enforce no animations for users that prefer reduced motion*/
|
|
67
|
+
@media (prefers-reduced-motion: reduce) {
|
|
68
|
+
*,
|
|
69
|
+
*::before,
|
|
70
|
+
*::after {
|
|
71
|
+
animation-duration: 0.01ms !important;
|
|
72
|
+
animation-iteration-count: 1 !important;
|
|
73
|
+
transition-duration: 0.01ms !important;
|
|
74
|
+
scroll-behavior: auto !important;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--backdrop: light-dark(var(--white), var(--black));
|
|
3
|
+
--brand-background: #eb5228;
|
|
4
|
+
--brand-foreground: var(--black);
|
|
5
|
+
--placeholder-opacity: var(--opacity-mid);
|
|
6
|
+
--overlay-opacity: var(--opacity-mid);
|
|
7
|
+
/* State */
|
|
8
|
+
--active-background-normal: light-dark(var(--blue-50), var(--blue-950));
|
|
9
|
+
--active-foreground-normal: light-dark(var(--blue-800), var(--blue-200));
|
|
10
|
+
--active-background-emphasized: light-dark(var(--blue-600), var(--blue-400));
|
|
11
|
+
--active-foreground-emphasized: light-dark(var(--white), var(--black));
|
|
12
|
+
--error-background-emphasized: light-dark(var(--red-600), var(--red-400));
|
|
13
|
+
--error-foreground: light-dark(var(--red-800), var(--red-200));
|
|
14
|
+
--error-separator: light-dark(var(--red-600), var(--red-400));
|
|
15
|
+
--focus-outline: 2px solid var(--blue-500);
|
|
16
|
+
--focus-offset: 2px;
|
|
17
|
+
--hover-lightness-delta: 0.125;
|
|
18
|
+
--hover-transition: border-color 100ms linear, background-color 100ms linear;
|
|
19
|
+
--inert-background: light-dark(var(--gray-50), var(--gray-950));
|
|
20
|
+
--inert-foreground: light-dark(var(--gray-400), var(--gray-600));
|
|
21
|
+
--fade-in-transition:
|
|
22
|
+
opacity 200ms cubic-bezier(0.34, 1.2, 0.64, 1),
|
|
23
|
+
scale 200ms cubic-bezier(0.34, 1.2, 0.64, 1), visibility 0s linear,
|
|
24
|
+
display 200ms linear allow-discrete;
|
|
25
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/* Default surface */
|
|
3
|
+
--background-high: light-dark(var(--gray-100), var(--gray-900));
|
|
4
|
+
--background-high-emphasized: light-dark(var(--gray-800), var(--gray-200));
|
|
5
|
+
--background-low: light-dark(var(--gray-50), var(--gray-950));
|
|
6
|
+
--background-low-emphasized: light-dark(var(--gray-600), var(--gray-400));
|
|
7
|
+
--separator-high: light-dark(var(--gray-400), var(--gray-600));
|
|
8
|
+
--separator-low: rgb(from var(--separator-high) r g b / var(--opacity-low));
|
|
9
|
+
--foreground-high: light-dark(var(--gray-800), var(--gray-200));
|
|
10
|
+
--foreground-high-emphasized: light-dark(var(--white), var(--black));
|
|
11
|
+
--foreground-low: light-dark(var(--gray-600), var(--gray-400));
|
|
12
|
+
--foreground-low-emphasized: light-dark(var(--gray-100), var(--gray-900));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[class*='sui-tone'] {
|
|
16
|
+
/* Toned surface */
|
|
17
|
+
--background-high: var(--tone-100);
|
|
18
|
+
--background-high-emphasized: var(--tone-800);
|
|
19
|
+
--background-low: var(--tone-50);
|
|
20
|
+
--background-low-emphasized: var(--tone-600);
|
|
21
|
+
--separator-high: var(--tone-400);
|
|
22
|
+
--separator-low: rgb(from var(--separator-high) r g b / var(--opacity-low));
|
|
23
|
+
--foreground-high: var(--tone-800);
|
|
24
|
+
--foreground-high-emphasized: var(--tone-0);
|
|
25
|
+
--foreground-low: var(--tone-600);
|
|
26
|
+
--foreground-low-emphasized: var(--tone-100);
|
|
27
|
+
}
|
package/src/index.css
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* SUI layer for base styles (currently just our global styles) */
|
|
2
|
+
@layer sui;
|
|
3
|
+
|
|
4
|
+
/* Import order is important in this file as it maintains
|
|
5
|
+
correct specificity resolution within the package. */
|
|
6
|
+
|
|
7
|
+
/* 1. Globals (layered to avoid conflicts with end user resets) */
|
|
8
|
+
@import './css/global/index.css' layer(sui.global);
|
|
9
|
+
|
|
10
|
+
/* 2. Tokens */
|
|
11
|
+
@import '@sanity-labs/design-tokens/dist/css/index.css';
|
|
12
|
+
@import './css/tokens/index.css';
|
|
13
|
+
|
|
14
|
+
/* 3. Component styles */
|
|
15
|
+
@import './components/index.css';
|
|
16
|
+
|
|
17
|
+
/* 4. Classes */
|
|
18
|
+
@import './css/classes/index.css';
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export * from './components/box/Box'
|
|
2
|
+
export * from './components/button/Button'
|
|
3
|
+
export * from './components/card/Card'
|
|
4
|
+
export * from './components/checkbox/Checkbox'
|
|
5
|
+
export * from './components/code/Code'
|
|
6
|
+
export * from './components/container/Container'
|
|
7
|
+
export * from './components/dialog/Dialog'
|
|
8
|
+
export * from './components/divider/Divider'
|
|
9
|
+
export * from './components/eyebrow/Eyebrow'
|
|
10
|
+
export * from './components/flex/Flex'
|
|
11
|
+
export * from './components/grid/Grid'
|
|
12
|
+
export * from './components/h-stack/HStack'
|
|
13
|
+
export * from './components/heading/Heading'
|
|
14
|
+
export * from './components/icon/Icon'
|
|
15
|
+
export * from './components/icon-button/IconButton'
|
|
16
|
+
export * from './components/indicator/Indicator'
|
|
17
|
+
export * from './components/indicator-stack/IndicatorStack'
|
|
18
|
+
export * from './components/inline/Inline'
|
|
19
|
+
export * from './components/label/Label'
|
|
20
|
+
export * from './components/link/Link'
|
|
21
|
+
export * from './components/list/List'
|
|
22
|
+
export * from './components/popover/Popover'
|
|
23
|
+
export * from './components/press-area/PressArea'
|
|
24
|
+
export * from './components/radio/Radio'
|
|
25
|
+
export * from './components/skip-to-content/SkipToContent'
|
|
26
|
+
export * from './components/spinner/Spinner'
|
|
27
|
+
export * from './components/switch/Switch'
|
|
28
|
+
export * from './components/text/Text'
|
|
29
|
+
export * from './components/tooltip/Tooltip'
|
|
30
|
+
export * from './components/tooltip-group/TooltipGroup'
|
|
31
|
+
export * from './components/v-stack/VStack'
|
|
32
|
+
export * from './components/visually-hidden/VisuallyHidden'
|
|
33
|
+
|
|
34
|
+
export * from './hooks/useIsClient'
|
|
35
|
+
|
|
36
|
+
export type {FlexParentProps} from './props/flexParent'
|
|
37
|
+
export type {GapProps} from './props/gap'
|
|
38
|
+
export type {GridParentProps} from './props/gridParent'
|
|
39
|
+
export type {LayoutProps} from './props/layout'
|
|
40
|
+
export type {MarginProps} from './props/margin'
|
|
41
|
+
export type {PaddingProps} from './props/padding'
|
|
42
|
+
export type {PlacementProps} from './props/placement'
|
|
43
|
+
export type {TypographyProps} from './props/typography'
|
|
44
|
+
|
|
45
|
+
export type {CodeSize} from './types/Code'
|
|
46
|
+
export type {ContainerSize} from './types/Container'
|
|
47
|
+
export type {Density} from './types/Density'
|
|
48
|
+
export type {DisplayBlock, DisplayFlex, DisplayGrid} from './types/Display'
|
|
49
|
+
export type {EyebrowSize} from './types/Eyebrow'
|
|
50
|
+
export type {AlignItems, FlexDirection, FlexWrap, JustifyContent} from './types/Flex'
|
|
51
|
+
export type {GridAutoFlow} from './types/Grid'
|
|
52
|
+
export type {HeadingSize} from './types/Heading'
|
|
53
|
+
export type {IconSize} from './types/Icon'
|
|
54
|
+
export type {Overflow} from './types/Overflow'
|
|
55
|
+
export type {Placement} from './types/Placement'
|
|
56
|
+
export type {Position} from './types/Position'
|
|
57
|
+
export type {Radius} from './types/Radius'
|
|
58
|
+
export type {Responsive} from './types/Responsive'
|
|
59
|
+
export type {Shadow} from './types/Shadow'
|
|
60
|
+
export type {Space, SpaceAuto, SpaceAutoNegative, SpaceInherit} from './types/Space'
|
|
61
|
+
export type {TextSize} from './types/Text'
|
|
62
|
+
export type {TextAlign} from './types/TextAlign'
|
|
63
|
+
export type {FontWeight} from './types/FontWeight'
|
|
64
|
+
export type {Tone} from './types/Tone'
|
|
65
|
+
export * from './components/badge/Badge'
|
package/src/polyfills.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
apply as applyClosedByPolyfill,
|
|
3
|
+
isSupported as isClosedBySupported,
|
|
4
|
+
} from 'dialog-closedby-polyfill'
|
|
5
|
+
|
|
6
|
+
if (
|
|
7
|
+
typeof HTMLButtonElement !== 'undefined' &&
|
|
8
|
+
!('interestForElement' in HTMLButtonElement.prototype)
|
|
9
|
+
) {
|
|
10
|
+
void import('interestfor')
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (typeof HTMLDialogElement !== 'undefined' && !isClosedBySupported()) {
|
|
14
|
+
applyClosedByPolyfill()
|
|
15
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {type PropDef} from '../types/PropDef'
|
|
2
|
+
import {RADIUS, type Radius} from '../types/Radius'
|
|
3
|
+
import {type Responsive} from '../types/Responsive'
|
|
4
|
+
|
|
5
|
+
export type BorderProps = {
|
|
6
|
+
/** CSS **border** property */
|
|
7
|
+
border?: Responsive<boolean>
|
|
8
|
+
/** CSS **border-top** property */
|
|
9
|
+
borderTop?: Responsive<boolean>
|
|
10
|
+
/** CSS **border-right** property */
|
|
11
|
+
borderRight?: Responsive<boolean>
|
|
12
|
+
/** CSS **border-bottom** property */
|
|
13
|
+
borderBottom?: Responsive<boolean>
|
|
14
|
+
/** CSS **border-left** property */
|
|
15
|
+
borderLeft?: Responsive<boolean>
|
|
16
|
+
/** CSS **border-radius** property */
|
|
17
|
+
radius?: Responsive<Radius>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const borderProps: Record<string, PropDef> = {
|
|
21
|
+
border: {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
className: 'border',
|
|
24
|
+
inverseClassName: 'border-none',
|
|
25
|
+
},
|
|
26
|
+
borderTop: {
|
|
27
|
+
type: 'boolean',
|
|
28
|
+
className: 'border-top',
|
|
29
|
+
inverseClassName: 'border-top-none',
|
|
30
|
+
},
|
|
31
|
+
borderRight: {
|
|
32
|
+
type: 'boolean',
|
|
33
|
+
className: 'border-right',
|
|
34
|
+
inverseClassName: 'border-right-none',
|
|
35
|
+
},
|
|
36
|
+
borderBottom: {
|
|
37
|
+
type: 'boolean',
|
|
38
|
+
className: 'border-bottom',
|
|
39
|
+
inverseClassName: 'border-bottom-none',
|
|
40
|
+
},
|
|
41
|
+
borderLeft: {
|
|
42
|
+
type: 'boolean',
|
|
43
|
+
className: 'border-left',
|
|
44
|
+
inverseClassName: 'border-left-none',
|
|
45
|
+
},
|
|
46
|
+
radius: {
|
|
47
|
+
type: 'union',
|
|
48
|
+
className: 'radius',
|
|
49
|
+
values: RADIUS,
|
|
50
|
+
},
|
|
51
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {type PropDef} from '../types/PropDef'
|
|
2
|
+
import {type Responsive} from '../types/Responsive'
|
|
3
|
+
|
|
4
|
+
export type FlexChildProps = {
|
|
5
|
+
/** CSS **flex-basis** property */
|
|
6
|
+
flexBasis?: Responsive<string>
|
|
7
|
+
/** CSS **flex-grow** property */
|
|
8
|
+
flexGrow?: Responsive<number>
|
|
9
|
+
/** CSS **flex-shrink** property */
|
|
10
|
+
flexShrink?: Responsive<number>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const flexChildProps: Record<string, PropDef> = {
|
|
14
|
+
flexBasis: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
className: 'flex-basis',
|
|
17
|
+
variable: '--flex-basis',
|
|
18
|
+
},
|
|
19
|
+
flexGrow: {
|
|
20
|
+
type: 'number',
|
|
21
|
+
className: 'flex-grow',
|
|
22
|
+
variable: '--flex-grow',
|
|
23
|
+
},
|
|
24
|
+
flexShrink: {
|
|
25
|
+
type: 'number',
|
|
26
|
+
className: 'flex-shrink',
|
|
27
|
+
variable: '--flex-shrink',
|
|
28
|
+
},
|
|
29
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ALIGN_ITEMS,
|
|
3
|
+
type AlignItems,
|
|
4
|
+
FLEX_DIRECTION,
|
|
5
|
+
FLEX_WRAP,
|
|
6
|
+
type FlexDirection,
|
|
7
|
+
type FlexWrap,
|
|
8
|
+
JUSTIFY_CONTENT,
|
|
9
|
+
type JustifyContent,
|
|
10
|
+
} from '../types/Flex'
|
|
11
|
+
import {type PropDef} from '../types/PropDef'
|
|
12
|
+
import {type Responsive} from '../types/Responsive'
|
|
13
|
+
|
|
14
|
+
/** @public */
|
|
15
|
+
export type FlexParentProps = {
|
|
16
|
+
/** CSS **align-items** property */
|
|
17
|
+
alignItems?: Responsive<AlignItems>
|
|
18
|
+
/** CSS **justify-content** property */
|
|
19
|
+
justifyContent?: Responsive<JustifyContent>
|
|
20
|
+
/** CSS **flex-direction** property */
|
|
21
|
+
flexDirection?: Responsive<FlexDirection>
|
|
22
|
+
/** CSS **flex-wrap** property */
|
|
23
|
+
flexWrap?: Responsive<FlexWrap>
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const flexParentProps: Record<string, PropDef> = {
|
|
27
|
+
alignItems: {
|
|
28
|
+
type: 'union',
|
|
29
|
+
className: 'align-items',
|
|
30
|
+
values: ALIGN_ITEMS,
|
|
31
|
+
},
|
|
32
|
+
justifyContent: {
|
|
33
|
+
type: 'union',
|
|
34
|
+
className: 'justify-content',
|
|
35
|
+
values: JUSTIFY_CONTENT,
|
|
36
|
+
},
|
|
37
|
+
flexDirection: {
|
|
38
|
+
type: 'union',
|
|
39
|
+
className: 'flex-direction',
|
|
40
|
+
values: FLEX_DIRECTION,
|
|
41
|
+
},
|
|
42
|
+
flexWrap: {
|
|
43
|
+
type: 'union',
|
|
44
|
+
className: 'flex',
|
|
45
|
+
values: FLEX_WRAP,
|
|
46
|
+
},
|
|
47
|
+
}
|
package/src/props/gap.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {type PropDef} from '../types/PropDef'
|
|
2
|
+
import {type Responsive} from '../types/Responsive'
|
|
3
|
+
import {SPACE_INHERIT, type SpaceInherit} from '../types/Space'
|
|
4
|
+
|
|
5
|
+
/** @public */
|
|
6
|
+
export type GapProps = {
|
|
7
|
+
/** CSS **gap** property */
|
|
8
|
+
gap?: Responsive<SpaceInherit>
|
|
9
|
+
/** CSS **row-gap** property */
|
|
10
|
+
rowGap?: Responsive<SpaceInherit>
|
|
11
|
+
/** CSS **column-gap** property */
|
|
12
|
+
columnGap?: Responsive<SpaceInherit>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const gapProps: Record<string, PropDef> = {
|
|
16
|
+
gap: {
|
|
17
|
+
type: 'union',
|
|
18
|
+
className: 'gap',
|
|
19
|
+
values: SPACE_INHERIT,
|
|
20
|
+
},
|
|
21
|
+
rowGap: {
|
|
22
|
+
type: 'union',
|
|
23
|
+
className: 'row-gap',
|
|
24
|
+
values: SPACE_INHERIT,
|
|
25
|
+
},
|
|
26
|
+
columnGap: {
|
|
27
|
+
type: 'union',
|
|
28
|
+
className: 'column-gap',
|
|
29
|
+
values: SPACE_INHERIT,
|
|
30
|
+
},
|
|
31
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {type PropDef} from '../types/PropDef'
|
|
2
|
+
import {type Responsive} from '../types/Responsive'
|
|
3
|
+
|
|
4
|
+
export type GridChildProps = {
|
|
5
|
+
/** CSS **grid-column** property */
|
|
6
|
+
gridColumn?: Responsive<string>
|
|
7
|
+
/** CSS **grid-column-start** property */
|
|
8
|
+
gridColumnStart?: Responsive<string>
|
|
9
|
+
/** CSS **grid-column-end** property */
|
|
10
|
+
gridColumnEnd?: Responsive<string>
|
|
11
|
+
/** CSS **grid-row** property */
|
|
12
|
+
gridRow?: Responsive<string>
|
|
13
|
+
/** CSS **grid-row-start** property */
|
|
14
|
+
gridRowStart?: Responsive<string>
|
|
15
|
+
/** CSS **grid-row-end** property */
|
|
16
|
+
gridRowEnd?: Responsive<string>
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const gridChildProps: Record<string, PropDef> = {
|
|
20
|
+
gridColumn: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
className: 'grid-column',
|
|
23
|
+
variable: '--grid-column',
|
|
24
|
+
},
|
|
25
|
+
gridColumnStart: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
className: 'grid-column-start',
|
|
28
|
+
variable: '--grid-column-start',
|
|
29
|
+
},
|
|
30
|
+
gridColumnEnd: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
className: 'grid-column-end',
|
|
33
|
+
variable: '--grid-column-end',
|
|
34
|
+
},
|
|
35
|
+
gridRow: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
className: 'grid-row',
|
|
38
|
+
variable: '--grid-row',
|
|
39
|
+
},
|
|
40
|
+
gridRowStart: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
className: 'grid-row-start',
|
|
43
|
+
variable: '--grid-row-start',
|
|
44
|
+
},
|
|
45
|
+
gridRowEnd: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
className: 'grid-row-end',
|
|
48
|
+
variable: '--grid-row-end',
|
|
49
|
+
},
|
|
50
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {GRID_AUTO_FLOW, type GridAutoFlow} from '../types/Grid'
|
|
2
|
+
import {type PropDef} from '../types/PropDef'
|
|
3
|
+
import {type Responsive} from '../types/Responsive'
|
|
4
|
+
|
|
5
|
+
/** @public */
|
|
6
|
+
export type GridParentProps = {
|
|
7
|
+
/** CSS **grid-auto-flow** property */
|
|
8
|
+
gridAutoFlow?: Responsive<GridAutoFlow>
|
|
9
|
+
/** CSS **grid-auto-columns** property */
|
|
10
|
+
gridAutoColumns?: Responsive<string>
|
|
11
|
+
/** CSS **grid-auto-row** property */
|
|
12
|
+
gridAutoRows?: Responsive<string>
|
|
13
|
+
/** CSS **grid-template-columns** property */
|
|
14
|
+
gridTemplateColumns?: Responsive<string>
|
|
15
|
+
/** CSS **grid-template-rows** property */
|
|
16
|
+
gridTemplateRows?: Responsive<string>
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const gridParentProps: Record<string, PropDef> = {
|
|
20
|
+
gridAutoFlow: {
|
|
21
|
+
type: 'union',
|
|
22
|
+
className: 'grid-auto-flow',
|
|
23
|
+
values: GRID_AUTO_FLOW,
|
|
24
|
+
},
|
|
25
|
+
gridAutoColumns: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
className: 'grid-auto-columns',
|
|
28
|
+
variable: '--grid-auto-columns',
|
|
29
|
+
},
|
|
30
|
+
gridAutoRows: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
className: 'grid-auto-rows',
|
|
33
|
+
variable: '--grid-auto-rows',
|
|
34
|
+
},
|
|
35
|
+
gridTemplateColumns: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
className: 'grid-template-columns',
|
|
38
|
+
variable: '--grid-template-columns',
|
|
39
|
+
},
|
|
40
|
+
gridTemplateRows: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
className: 'grid-template-rows',
|
|
43
|
+
variable: '--grid-template-rows',
|
|
44
|
+
},
|
|
45
|
+
}
|