@discourser/design-system 0.1.7 → 0.2.1
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 +411 -16
- package/dist/index.cjs +776 -145
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21793 -151
- package/dist/index.d.ts +21793 -151
- package/dist/index.js +753 -142
- package/dist/index.js.map +1 -1
- package/package.json +10 -7
- package/styled-system/css/conditions.mjs +1 -1
- package/styled-system/css/css.mjs +1 -1
- package/styled-system/css/sva.mjs +9 -4
- package/styled-system/helpers.mjs +12 -20
- package/styled-system/jsx/create-style-context.d.ts +54 -0
- package/styled-system/jsx/create-style-context.mjs +118 -0
- package/styled-system/jsx/factory.mjs +14 -5
- package/styled-system/jsx/index.d.ts +1 -0
- package/styled-system/jsx/index.mjs +1 -0
- package/styled-system/jsx/is-valid-prop.mjs +2 -2
- package/styled-system/patterns/aspect-ratio.d.ts +0 -1
- package/styled-system/patterns/bleed.d.ts +0 -1
- package/styled-system/patterns/box.d.ts +0 -1
- package/styled-system/patterns/center.d.ts +0 -1
- package/styled-system/patterns/circle.d.ts +0 -1
- package/styled-system/patterns/container.d.ts +0 -1
- package/styled-system/patterns/cq.d.ts +0 -1
- package/styled-system/patterns/divider.d.ts +1 -2
- package/styled-system/patterns/flex.d.ts +0 -1
- package/styled-system/patterns/float.d.ts +1 -2
- package/styled-system/patterns/grid-item.d.ts +0 -1
- package/styled-system/patterns/grid.d.ts +0 -1
- package/styled-system/patterns/grid.mjs +1 -1
- package/styled-system/patterns/hstack.d.ts +0 -1
- package/styled-system/patterns/hstack.mjs +1 -1
- package/styled-system/patterns/link-overlay.d.ts +0 -1
- package/styled-system/patterns/spacer.d.ts +0 -1
- package/styled-system/patterns/square.d.ts +0 -1
- package/styled-system/patterns/stack.d.ts +0 -1
- package/styled-system/patterns/stack.mjs +1 -1
- package/styled-system/patterns/visually-hidden.d.ts +0 -1
- package/styled-system/patterns/vstack.d.ts +0 -1
- package/styled-system/patterns/vstack.mjs +1 -1
- package/styled-system/patterns/wrap.d.ts +0 -1
- package/styled-system/patterns/wrap.mjs +1 -1
- package/styled-system/recipes/absolute-center.d.ts +34 -0
- package/styled-system/recipes/absolute-center.mjs +32 -0
- package/styled-system/recipes/accordion.d.ts +38 -0
- package/styled-system/recipes/accordion.mjs +67 -0
- package/styled-system/recipes/avatar.d.ts +42 -0
- package/styled-system/recipes/avatar.mjs +71 -0
- package/styled-system/recipes/badge.d.ts +38 -0
- package/styled-system/recipes/badge.mjs +41 -0
- package/styled-system/recipes/button.d.ts +6 -7
- package/styled-system/recipes/button.mjs +11 -7
- package/styled-system/recipes/card.d.ts +6 -11
- package/styled-system/recipes/card.mjs +50 -23
- package/styled-system/recipes/checkbox.d.ts +38 -0
- package/styled-system/recipes/checkbox.mjs +68 -0
- package/styled-system/recipes/dialog.d.ts +13 -6
- package/styled-system/recipes/dialog.mjs +35 -3
- package/styled-system/recipes/drawer.d.ts +38 -0
- package/styled-system/recipes/drawer.mjs +90 -0
- package/styled-system/recipes/field.d.ts +31 -0
- package/styled-system/recipes/field.mjs +61 -0
- package/styled-system/recipes/group.d.ts +36 -0
- package/styled-system/recipes/group.mjs +72 -0
- package/styled-system/recipes/index.d.ts +21 -3
- package/styled-system/recipes/index.mjs +21 -3
- package/styled-system/recipes/input.d.ts +6 -8
- package/styled-system/recipes/input.mjs +12 -9
- package/styled-system/recipes/popover.d.ts +31 -0
- package/styled-system/recipes/popover.mjs +81 -0
- package/styled-system/recipes/progress.d.ts +44 -0
- package/styled-system/recipes/progress.mjs +98 -0
- package/styled-system/recipes/radio-group.d.ts +38 -0
- package/styled-system/recipes/radio-group.mjs +68 -0
- package/styled-system/recipes/select.d.ts +38 -0
- package/styled-system/recipes/select.mjs +111 -0
- package/styled-system/recipes/skeleton.d.ts +39 -0
- package/styled-system/recipes/skeleton.mjs +40 -0
- package/styled-system/recipes/slider.d.ts +42 -0
- package/styled-system/recipes/slider.mjs +94 -0
- package/styled-system/recipes/spinner.d.ts +34 -0
- package/styled-system/recipes/spinner.mjs +36 -0
- package/styled-system/recipes/switch-component.d.ts +38 -0
- package/styled-system/recipes/switch-component.mjs +65 -0
- package/styled-system/recipes/tabs.d.ts +39 -0
- package/styled-system/recipes/tabs.mjs +71 -0
- package/styled-system/recipes/textarea.d.ts +38 -0
- package/styled-system/recipes/textarea.mjs +41 -0
- package/styled-system/recipes/toast.d.ts +31 -0
- package/styled-system/recipes/toast.mjs +53 -0
- package/styled-system/recipes/tooltip.d.ts +31 -0
- package/styled-system/recipes/tooltip.mjs +49 -0
- package/styled-system/tokens/index.mjs +3483 -635
- package/styled-system/tokens/tokens.d.ts +31 -19
- package/styled-system/types/composition.d.ts +83 -23
- package/styled-system/types/conditions.d.ts +15 -11
- package/styled-system/types/jsx.d.ts +27 -10
- package/styled-system/types/pattern.d.ts +4 -4
- package/styled-system/types/prop-type.d.ts +30 -3
- package/styled-system/types/style-props.d.ts +262 -225
- package/styled-system/types/system-types.d.ts +162 -2
- package/styled-system/recipes/icon-button.d.ts +0 -39
- package/styled-system/recipes/icon-button.mjs +0 -39
- package/styled-system/recipes/switch-control.d.ts +0 -35
- package/styled-system/recipes/switch-control.mjs +0 -53
- package/styled-system/recipes/switch.d.ts +0 -35
- package/styled-system/recipes/switch.mjs +0 -53
|
@@ -1,48 +1,60 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
export type Token =
|
|
2
|
+
export type Token = `aspectRatios.${AspectRatioToken}` | `borders.${BorderToken}` | `radii.${RadiusToken}` | `shadows.${ShadowToken}` | `blurs.${BlurToken}` | `spacing.${SpacingToken}` | `sizes.${SizeToken}` | `animations.${AnimationToken}` | `colors.${ColorToken}` | `fonts.${FontToken}` | `fontSizes.${FontSizeToken}` | `lineHeights.${LineHeightToken}` | `fontWeights.${FontWeightToken}` | `letterSpacings.${LetterSpacingToken}` | `durations.${DurationToken}` | `easings.${EasingToken}` | `breakpoints.${BreakpointToken}`
|
|
3
3
|
|
|
4
|
-
export type ColorPalette = "primary" | "secondary" | "tertiary" | "neutral" | "neutralVariant" | "error" | "
|
|
4
|
+
export type ColorPalette = "current" | "black" | "white" | "transparent" | "rose" | "pink" | "fuchsia" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "emerald" | "green" | "lime" | "yellow" | "amber" | "orange" | "red" | "stone" | "zinc" | "gray" | "slate" | "primary" | "secondary" | "tertiary" | "neutral" | "neutralVariant" | "error" | "primary.solid.bg" | "primary.solid" | "primary.solid.fg" | "primary.subtle.bg" | "primary.subtle" | "primary.subtle.fg" | "primary.surface.bg" | "primary.surface" | "primary.surface.border" | "primary.surface.fg" | "primary.outline" | "primary.outline.bg" | "primary.outline.border" | "primary.outline.fg" | "primary.plain" | "primary.plain.bg" | "primary.plain.fg" | "neutral.solid.bg" | "neutral.solid" | "neutral.solid.fg" | "neutral.subtle.bg" | "neutral.subtle" | "neutral.subtle.fg" | "neutral.surface.bg" | "neutral.surface" | "neutral.surface.border" | "neutral.surface.fg" | "neutral.outline" | "neutral.outline.bg" | "neutral.outline.border" | "neutral.outline.fg" | "neutral.plain" | "neutral.plain.bg" | "neutral.plain.fg" | "error.solid.bg" | "error.solid" | "error.solid.fg" | "error.subtle.bg" | "error.subtle" | "error.subtle.fg" | "error.surface.bg" | "error.surface" | "error.surface.border" | "error.surface.fg" | "error.outline" | "error.outline.bg" | "error.outline.border" | "error.outline.fg" | "error.plain" | "error.plain.bg" | "error.plain.fg" | "gray.solid.bg" | "gray.solid" | "gray.solid.fg" | "gray.subtle.bg" | "gray.subtle" | "gray.subtle.fg" | "gray.surface.bg" | "gray.surface" | "gray.surface.border" | "gray.surface.fg" | "gray.outline" | "gray.outline.bg" | "gray.outline.border" | "gray.outline.fg" | "gray.plain" | "gray.plain.bg" | "gray.plain.fg" | "red.solid.bg" | "red.solid" | "red.solid.fg" | "red.subtle.bg" | "red.subtle" | "red.subtle.fg" | "red.surface.bg" | "red.surface" | "red.surface.border" | "red.surface.fg" | "red.outline" | "red.outline.bg" | "red.outline.border" | "red.outline.fg" | "red.plain" | "red.plain.bg" | "red.plain.fg" | "fg" | "canvas" | "border" | "surface" | "surface.container" | "onSurface" | "m3Primary" | "onM3Primary" | "onSecondary" | "onTertiary" | "outline" | "inverseSurface" | "inverseOnSurface" | "inversePrimary" | "scrim"
|
|
5
5
|
|
|
6
|
-
export type
|
|
6
|
+
export type AspectRatioToken = "square" | "landscape" | "portrait" | "wide" | "ultrawide" | "golden"
|
|
7
7
|
|
|
8
|
-
export type
|
|
8
|
+
export type BorderToken = "none"
|
|
9
9
|
|
|
10
|
-
export type
|
|
10
|
+
export type RadiusToken = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "full" | "l1" | "l2" | "l3"
|
|
11
11
|
|
|
12
|
-
export type
|
|
12
|
+
export type ShadowToken = "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "inset-2xs" | "inset-xs" | "inset-sm" | "inset"
|
|
13
13
|
|
|
14
|
-
export type
|
|
14
|
+
export type BlurToken = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl"
|
|
15
15
|
|
|
16
|
-
export type
|
|
16
|
+
export type SpacingToken = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "-1" | "-2" | "-3" | "-4" | "-5" | "-6" | "-7" | "-8" | "-9" | "-10" | "-11" | "-12" | "-14" | "-16" | "-20" | "-24" | "-28" | "-32" | "-36" | "-40" | "-44" | "-48" | "-52" | "-56" | "-60" | "-64" | "-72" | "-80" | "-96" | "-0.5" | "-1.5" | "-2.5" | "-3.5" | "-4.5" | "-5.5"
|
|
17
17
|
|
|
18
|
-
export type
|
|
18
|
+
export type SizeToken = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "14" | "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "52" | "56" | "60" | "64" | "72" | "80" | "96" | "0.5" | "1.5" | "2.5" | "3.5" | "4.5" | "5.5" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "prose" | "full" | "min" | "max" | "fit" | "breakpoint-sm" | "breakpoint-md" | "breakpoint-lg" | "breakpoint-xl" | "breakpoint-2xl"
|
|
19
19
|
|
|
20
|
-
export type
|
|
20
|
+
export type AnimationToken = "spin" | "ping" | "pulse" | "bounce"
|
|
21
21
|
|
|
22
|
-
export type ShadowToken = "level0" | "level1" | "level2" | "level3" | "level4" | "level5"
|
|
22
|
+
export type ColorToken = "current" | "black" | "white" | "transparent" | "rose.50" | "rose.100" | "rose.200" | "rose.300" | "rose.400" | "rose.500" | "rose.600" | "rose.700" | "rose.800" | "rose.900" | "rose.950" | "pink.50" | "pink.100" | "pink.200" | "pink.300" | "pink.400" | "pink.500" | "pink.600" | "pink.700" | "pink.800" | "pink.900" | "pink.950" | "fuchsia.50" | "fuchsia.100" | "fuchsia.200" | "fuchsia.300" | "fuchsia.400" | "fuchsia.500" | "fuchsia.600" | "fuchsia.700" | "fuchsia.800" | "fuchsia.900" | "fuchsia.950" | "purple.50" | "purple.100" | "purple.200" | "purple.300" | "purple.400" | "purple.500" | "purple.600" | "purple.700" | "purple.800" | "purple.900" | "purple.950" | "violet.50" | "violet.100" | "violet.200" | "violet.300" | "violet.400" | "violet.500" | "violet.600" | "violet.700" | "violet.800" | "violet.900" | "violet.950" | "indigo.50" | "indigo.100" | "indigo.200" | "indigo.300" | "indigo.400" | "indigo.500" | "indigo.600" | "indigo.700" | "indigo.800" | "indigo.900" | "indigo.950" | "blue.50" | "blue.100" | "blue.200" | "blue.300" | "blue.400" | "blue.500" | "blue.600" | "blue.700" | "blue.800" | "blue.900" | "blue.950" | "sky.50" | "sky.100" | "sky.200" | "sky.300" | "sky.400" | "sky.500" | "sky.600" | "sky.700" | "sky.800" | "sky.900" | "sky.950" | "cyan.50" | "cyan.100" | "cyan.200" | "cyan.300" | "cyan.400" | "cyan.500" | "cyan.600" | "cyan.700" | "cyan.800" | "cyan.900" | "cyan.950" | "teal.50" | "teal.100" | "teal.200" | "teal.300" | "teal.400" | "teal.500" | "teal.600" | "teal.700" | "teal.800" | "teal.900" | "teal.950" | "emerald.50" | "emerald.100" | "emerald.200" | "emerald.300" | "emerald.400" | "emerald.500" | "emerald.600" | "emerald.700" | "emerald.800" | "emerald.900" | "emerald.950" | "green.50" | "green.100" | "green.200" | "green.300" | "green.400" | "green.500" | "green.600" | "green.700" | "green.800" | "green.900" | "green.950" | "lime.50" | "lime.100" | "lime.200" | "lime.300" | "lime.400" | "lime.500" | "lime.600" | "lime.700" | "lime.800" | "lime.900" | "lime.950" | "yellow.50" | "yellow.100" | "yellow.200" | "yellow.300" | "yellow.400" | "yellow.500" | "yellow.600" | "yellow.700" | "yellow.800" | "yellow.900" | "yellow.950" | "amber.50" | "amber.100" | "amber.200" | "amber.300" | "amber.400" | "amber.500" | "amber.600" | "amber.700" | "amber.800" | "amber.900" | "amber.950" | "orange.50" | "orange.100" | "orange.200" | "orange.300" | "orange.400" | "orange.500" | "orange.600" | "orange.700" | "orange.800" | "orange.900" | "orange.950" | "red.50" | "red.100" | "red.200" | "red.300" | "red.400" | "red.500" | "red.600" | "red.700" | "red.800" | "red.900" | "red.950" | "stone.50" | "stone.100" | "stone.200" | "stone.300" | "stone.400" | "stone.500" | "stone.600" | "stone.700" | "stone.800" | "stone.900" | "stone.950" | "zinc.50" | "zinc.100" | "zinc.200" | "zinc.300" | "zinc.400" | "zinc.500" | "zinc.600" | "zinc.700" | "zinc.800" | "zinc.900" | "zinc.950" | "gray.50" | "gray.100" | "gray.200" | "gray.300" | "gray.400" | "gray.500" | "gray.600" | "gray.700" | "gray.800" | "gray.900" | "gray.950" | "slate.50" | "slate.100" | "slate.200" | "slate.300" | "slate.400" | "slate.500" | "slate.600" | "slate.700" | "slate.800" | "slate.900" | "slate.950" | "primary.0" | "primary.10" | "primary.20" | "primary.30" | "primary.40" | "primary.50" | "primary.60" | "primary.70" | "primary.80" | "primary.90" | "primary.95" | "primary.99" | "primary.100" | "secondary.0" | "secondary.10" | "secondary.20" | "secondary.30" | "secondary.40" | "secondary.50" | "secondary.60" | "secondary.70" | "secondary.80" | "secondary.90" | "secondary.95" | "secondary.99" | "secondary.100" | "tertiary.0" | "tertiary.10" | "tertiary.20" | "tertiary.30" | "tertiary.40" | "tertiary.50" | "tertiary.60" | "tertiary.70" | "tertiary.80" | "tertiary.90" | "tertiary.95" | "tertiary.99" | "tertiary.100" | "neutral.0" | "neutral.10" | "neutral.20" | "neutral.30" | "neutral.40" | "neutral.50" | "neutral.60" | "neutral.70" | "neutral.80" | "neutral.90" | "neutral.95" | "neutral.99" | "neutral.100" | "neutral.200" | "neutral.300" | "neutral.400" | "neutral.500" | "neutral.600" | "neutral.700" | "neutral.800" | "neutral.900" | "neutral.950" | "neutralVariant.0" | "neutralVariant.10" | "neutralVariant.20" | "neutralVariant.30" | "neutralVariant.40" | "neutralVariant.50" | "neutralVariant.60" | "neutralVariant.70" | "neutralVariant.80" | "neutralVariant.90" | "neutralVariant.95" | "neutralVariant.99" | "neutralVariant.100" | "error.0" | "error.10" | "error.20" | "error.30" | "error.40" | "error.50" | "error.60" | "error.70" | "error.80" | "error.90" | "error.95" | "error.99" | "error.100" | "primary.1" | "primary.2" | "primary.3" | "primary.4" | "primary.5" | "primary.6" | "primary.7" | "primary.8" | "primary.9" | "primary.11" | "primary.12" | "primary.a1" | "primary.a2" | "primary.a3" | "primary.a4" | "primary.a5" | "primary.a6" | "primary.a7" | "primary.a8" | "primary.a9" | "primary.a10" | "primary.a11" | "primary.a12" | "primary.solid.bg" | "primary.solid.bg.hover" | "primary.solid.fg" | "primary.subtle.bg" | "primary.subtle.bg.hover" | "primary.subtle.bg.active" | "primary.subtle.fg" | "primary.surface.bg" | "primary.surface.bg.active" | "primary.surface.border" | "primary.surface.border.hover" | "primary.surface.fg" | "primary.outline.bg.hover" | "primary.outline.bg.active" | "primary.outline.border" | "primary.outline.fg" | "primary.plain.bg.hover" | "primary.plain.bg.active" | "primary.plain.fg" | "neutral.1" | "neutral.2" | "neutral.3" | "neutral.4" | "neutral.5" | "neutral.6" | "neutral.7" | "neutral.8" | "neutral.9" | "neutral.11" | "neutral.12" | "neutral.a1" | "neutral.a2" | "neutral.a3" | "neutral.a4" | "neutral.a5" | "neutral.a6" | "neutral.a7" | "neutral.a8" | "neutral.a9" | "neutral.a10" | "neutral.a11" | "neutral.a12" | "neutral.solid.bg" | "neutral.solid.bg.hover" | "neutral.solid.fg" | "neutral.subtle.bg" | "neutral.subtle.bg.hover" | "neutral.subtle.bg.active" | "neutral.subtle.fg" | "neutral.surface.bg" | "neutral.surface.bg.hover" | "neutral.surface.bg.active" | "neutral.surface.border" | "neutral.surface.border.hover" | "neutral.surface.fg" | "neutral.outline.bg.hover" | "neutral.outline.bg.active" | "neutral.outline.border" | "neutral.outline.fg" | "neutral.plain.bg.hover" | "neutral.plain.bg.active" | "neutral.plain.fg" | "error.1" | "error.2" | "error.3" | "error.4" | "error.5" | "error.6" | "error.7" | "error.8" | "error.9" | "error.11" | "error.12" | "error.a1" | "error.a2" | "error.a3" | "error.a4" | "error.a5" | "error.a6" | "error.a7" | "error.a8" | "error.a9" | "error.a10" | "error.a11" | "error.a12" | "error.solid.bg" | "error.solid.bg.hover" | "error.solid.fg" | "error.subtle.bg" | "error.subtle.bg.hover" | "error.subtle.bg.active" | "error.subtle.fg" | "error.surface.bg" | "error.surface.bg.active" | "error.surface.border" | "error.surface.border.hover" | "error.surface.fg" | "error.outline.bg.hover" | "error.outline.bg.active" | "error.outline.border" | "error.outline.fg" | "error.plain.bg.hover" | "error.plain.bg.active" | "error.plain.fg" | "gray.1" | "gray.2" | "gray.3" | "gray.4" | "gray.5" | "gray.6" | "gray.7" | "gray.8" | "gray.9" | "gray.10" | "gray.11" | "gray.12" | "gray.a1" | "gray.a2" | "gray.a3" | "gray.a4" | "gray.a5" | "gray.a6" | "gray.a7" | "gray.a8" | "gray.a9" | "gray.a10" | "gray.a11" | "gray.a12" | "gray.solid.bg" | "gray.solid.bg.hover" | "gray.solid.fg" | "gray.subtle.bg" | "gray.subtle.bg.hover" | "gray.subtle.bg.active" | "gray.subtle.fg" | "gray.surface.bg" | "gray.surface.bg.hover" | "gray.surface.bg.active" | "gray.surface.border" | "gray.surface.border.hover" | "gray.surface.fg" | "gray.outline.bg.hover" | "gray.outline.bg.active" | "gray.outline.border" | "gray.outline.fg" | "gray.plain.bg.hover" | "gray.plain.bg.active" | "gray.plain.fg" | "red.1" | "red.2" | "red.3" | "red.4" | "red.5" | "red.6" | "red.7" | "red.8" | "red.9" | "red.10" | "red.11" | "red.12" | "red.a1" | "red.a2" | "red.a3" | "red.a4" | "red.a5" | "red.a6" | "red.a7" | "red.a8" | "red.a9" | "red.a10" | "red.a11" | "red.a12" | "red.solid.bg" | "red.solid.bg.hover" | "red.solid.fg" | "red.subtle.bg" | "red.subtle.bg.hover" | "red.subtle.bg.active" | "red.subtle.fg" | "red.surface.bg" | "red.surface.bg.active" | "red.surface.border" | "red.surface.border.hover" | "red.surface.fg" | "red.outline.bg.hover" | "red.outline.bg.active" | "red.outline.border" | "red.outline.fg" | "red.plain.bg.hover" | "red.plain.bg.active" | "red.plain.fg" | "fg.default" | "fg.muted" | "fg.subtle" | "canvas" | "border.default" | "border.muted" | "surface" | "surface.dim" | "surface.bright" | "surface.container" | "surface.container.low" | "surface.container.lowest" | "surface.container.high" | "surface.container.highest" | "onSurface" | "onSurface.variant" | "m3Primary" | "m3Primary.container" | "onM3Primary" | "onM3Primary.container" | "secondary" | "secondary.container" | "onSecondary" | "onSecondary.container" | "tertiary" | "tertiary.container" | "onTertiary" | "onTertiary.container" | "outline" | "outline.variant" | "inverseSurface" | "inverseOnSurface" | "inversePrimary" | "scrim" | "colorPalette" | "colorPalette.50" | "colorPalette.100" | "colorPalette.200" | "colorPalette.300" | "colorPalette.400" | "colorPalette.500" | "colorPalette.600" | "colorPalette.700" | "colorPalette.800" | "colorPalette.900" | "colorPalette.950" | "colorPalette.0" | "colorPalette.10" | "colorPalette.20" | "colorPalette.30" | "colorPalette.40" | "colorPalette.60" | "colorPalette.70" | "colorPalette.80" | "colorPalette.90" | "colorPalette.95" | "colorPalette.99" | "colorPalette.1" | "colorPalette.2" | "colorPalette.3" | "colorPalette.4" | "colorPalette.5" | "colorPalette.6" | "colorPalette.7" | "colorPalette.8" | "colorPalette.9" | "colorPalette.11" | "colorPalette.12" | "colorPalette.a1" | "colorPalette.a2" | "colorPalette.a3" | "colorPalette.a4" | "colorPalette.a5" | "colorPalette.a6" | "colorPalette.a7" | "colorPalette.a8" | "colorPalette.a9" | "colorPalette.a10" | "colorPalette.a11" | "colorPalette.a12" | "colorPalette.solid.bg" | "colorPalette.bg" | "colorPalette.solid.bg.hover" | "colorPalette.bg.hover" | "colorPalette.hover" | "colorPalette.solid.fg" | "colorPalette.fg" | "colorPalette.subtle.bg" | "colorPalette.subtle.bg.hover" | "colorPalette.subtle.bg.active" | "colorPalette.bg.active" | "colorPalette.active" | "colorPalette.subtle.fg" | "colorPalette.surface.bg" | "colorPalette.surface.bg.active" | "colorPalette.surface.border" | "colorPalette.border" | "colorPalette.surface.border.hover" | "colorPalette.border.hover" | "colorPalette.surface.fg" | "colorPalette.outline.bg.hover" | "colorPalette.outline.bg.active" | "colorPalette.outline.border" | "colorPalette.outline.fg" | "colorPalette.plain.bg.hover" | "colorPalette.plain.bg.active" | "colorPalette.plain.fg" | "colorPalette.surface.bg.hover" | "colorPalette.default" | "colorPalette.muted" | "colorPalette.subtle" | "colorPalette.dim" | "colorPalette.bright" | "colorPalette.container" | "colorPalette.container.low" | "colorPalette.low" | "colorPalette.container.lowest" | "colorPalette.lowest" | "colorPalette.container.high" | "colorPalette.high" | "colorPalette.container.highest" | "colorPalette.highest" | "colorPalette.variant"
|
|
23
23
|
|
|
24
|
-
export type
|
|
24
|
+
export type FontToken = "sans" | "serif" | "display" | "body" | "mono"
|
|
25
25
|
|
|
26
|
-
export type
|
|
26
|
+
export type FontSizeToken = "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "displayLarge" | "displayMedium" | "displaySmall" | "headlineLarge" | "headlineMedium" | "headlineSmall" | "titleLarge" | "titleMedium" | "titleSmall" | "bodyLarge" | "bodyMedium" | "bodySmall" | "labelLarge" | "labelMedium" | "labelSmall"
|
|
27
27
|
|
|
28
|
-
export type
|
|
28
|
+
export type LineHeightToken = "none" | "tight" | "snug" | "normal" | "relaxed" | "loose" | "displayLarge" | "displayMedium" | "displaySmall" | "headlineLarge" | "headlineMedium" | "headlineSmall" | "titleLarge" | "titleMedium" | "titleSmall" | "bodyLarge" | "bodyMedium" | "bodySmall" | "labelLarge" | "labelMedium" | "labelSmall"
|
|
29
|
+
|
|
30
|
+
export type FontWeightToken = "400" | "500" | "thin" | "extralight" | "light" | "normal" | "medium" | "semibold" | "bold" | "extrabold" | "black"
|
|
31
|
+
|
|
32
|
+
export type LetterSpacingToken = "tighter" | "tight" | "normal" | "wide" | "wider" | "widest" | "displayLarge" | "displayMedium" | "displaySmall" | "headlineLarge" | "headlineMedium" | "headlineSmall" | "titleLarge" | "titleMedium" | "titleSmall" | "bodyLarge" | "bodyMedium" | "bodySmall" | "labelLarge" | "labelMedium" | "labelSmall"
|
|
33
|
+
|
|
34
|
+
export type DurationToken = "fastest" | "faster" | "slowest" | "instant" | "fast" | "normal" | "slow" | "slower"
|
|
29
35
|
|
|
30
|
-
export type
|
|
36
|
+
export type EasingToken = "default" | "linear" | "in" | "out" | "in-out" | "standard" | "standardDecelerate" | "standardAccelerate" | "emphasized" | "emphasizedDecelerate" | "emphasizedAccelerate"
|
|
37
|
+
|
|
38
|
+
export type BreakpointToken = "sm" | "md" | "lg" | "xl" | "2xl"
|
|
31
39
|
|
|
32
40
|
export type Tokens = {
|
|
41
|
+
aspectRatios: AspectRatioToken
|
|
42
|
+
borders: BorderToken
|
|
43
|
+
radii: RadiusToken
|
|
44
|
+
shadows: ShadowToken
|
|
45
|
+
blurs: BlurToken
|
|
46
|
+
spacing: SpacingToken
|
|
47
|
+
sizes: SizeToken
|
|
48
|
+
animations: AnimationToken
|
|
33
49
|
colors: ColorToken
|
|
34
50
|
fonts: FontToken
|
|
35
51
|
fontSizes: FontSizeToken
|
|
36
52
|
lineHeights: LineHeightToken
|
|
37
53
|
fontWeights: FontWeightToken
|
|
38
54
|
letterSpacings: LetterSpacingToken
|
|
39
|
-
spacing: SpacingToken
|
|
40
|
-
radii: RadiusToken
|
|
41
|
-
shadows: ShadowToken
|
|
42
55
|
durations: DurationToken
|
|
43
56
|
easings: EasingToken
|
|
44
57
|
breakpoints: BreakpointToken
|
|
45
|
-
sizes: SizeToken
|
|
46
58
|
} & { [token: string]: never }
|
|
47
59
|
|
|
48
60
|
export type TokenCategory = "aspectRatios" | "zIndex" | "opacity" | "colors" | "fonts" | "fontSizes" | "fontWeights" | "lineHeights" | "letterSpacings" | "sizes" | "cursor" | "shadows" | "spacing" | "radii" | "borders" | "borderWidths" | "durations" | "easings" | "animations" | "blurs" | "gradients" | "breakpoints" | "assets"
|
|
@@ -15,6 +15,8 @@ interface Recursive<T> {
|
|
|
15
15
|
* -----------------------------------------------------------------------------*/
|
|
16
16
|
|
|
17
17
|
type TextStyleProperty =
|
|
18
|
+
| 'color'
|
|
19
|
+
| 'direction'
|
|
18
20
|
| 'font'
|
|
19
21
|
| 'fontFamily'
|
|
20
22
|
| 'fontFeatureSettings'
|
|
@@ -35,6 +37,7 @@ type TextStyleProperty =
|
|
|
35
37
|
| 'fontVariantPosition'
|
|
36
38
|
| 'fontVariationSettings'
|
|
37
39
|
| 'fontWeight'
|
|
40
|
+
| 'hangingPunctuation'
|
|
38
41
|
| 'hypens'
|
|
39
42
|
| 'hyphenateCharacter'
|
|
40
43
|
| 'hyphenateLimitChars'
|
|
@@ -43,11 +46,17 @@ type TextStyleProperty =
|
|
|
43
46
|
| 'lineHeight'
|
|
44
47
|
| 'quotes'
|
|
45
48
|
| 'overflowWrap'
|
|
49
|
+
| 'tabSize'
|
|
50
|
+
| 'textAlign'
|
|
51
|
+
| 'textAlignLast'
|
|
46
52
|
| 'textCombineUpright'
|
|
47
53
|
| 'textDecoration'
|
|
48
54
|
| 'textDecorationColor'
|
|
49
55
|
| 'textDecorationLine'
|
|
56
|
+
| 'textDecorationSkip'
|
|
57
|
+
| 'textDecorationSkipBox'
|
|
50
58
|
| 'textDecorationSkipInk'
|
|
59
|
+
| 'textDecorationSkipInset'
|
|
51
60
|
| 'textDecorationStyle'
|
|
52
61
|
| 'textDecorationThickness'
|
|
53
62
|
| 'textEmphasis'
|
|
@@ -60,16 +69,21 @@ type TextStyleProperty =
|
|
|
60
69
|
| 'textOverflow'
|
|
61
70
|
| 'textRendering'
|
|
62
71
|
| 'textShadow'
|
|
72
|
+
| 'textStroke'
|
|
73
|
+
| 'textStrokeColor'
|
|
74
|
+
| 'textStrokeWidth'
|
|
63
75
|
| 'textTransform'
|
|
64
76
|
| 'textUnderlineOffset'
|
|
65
77
|
| 'textUnderlinePosition'
|
|
66
78
|
| 'textWrap'
|
|
67
79
|
| 'textWrapMode'
|
|
68
80
|
| 'textWrapStyle'
|
|
81
|
+
| 'unicodeBidi'
|
|
69
82
|
| 'verticalAlign'
|
|
70
83
|
| 'whiteSpace'
|
|
71
84
|
| 'wordBreak'
|
|
72
85
|
| 'wordSpacing'
|
|
86
|
+
| 'writingMode'
|
|
73
87
|
|
|
74
88
|
export type TextStyle = CompositionStyleObject<TextStyleProperty>
|
|
75
89
|
|
|
@@ -79,17 +93,11 @@ export type TextStyles = Recursive<Token<TextStyle>>
|
|
|
79
93
|
* Layer styles
|
|
80
94
|
* -----------------------------------------------------------------------------*/
|
|
81
95
|
|
|
82
|
-
type
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
| 'Inline'
|
|
88
|
-
| 'Block'
|
|
89
|
-
| 'InlineStart'
|
|
90
|
-
| 'InlineEnd'
|
|
91
|
-
| 'BlockStart'
|
|
92
|
-
| 'BlockEnd'
|
|
96
|
+
type LogicalPlacement = 'Inline' | 'Block' | 'InlineStart' | 'InlineEnd' | 'BlockStart' | 'BlockEnd'
|
|
97
|
+
|
|
98
|
+
type PhysicalPlacement = 'Top' | 'Right' | 'Bottom' | 'Left'
|
|
99
|
+
|
|
100
|
+
type Placement = PhysicalPlacement | LogicalPlacement
|
|
93
101
|
|
|
94
102
|
type Radius =
|
|
95
103
|
| `Top${'Right' | 'Left'}`
|
|
@@ -98,20 +106,80 @@ type Radius =
|
|
|
98
106
|
| `End${'Start' | 'End'}`
|
|
99
107
|
|
|
100
108
|
type LayerStyleProperty =
|
|
109
|
+
| 'aspectRatio'
|
|
101
110
|
| 'background'
|
|
102
111
|
| 'backgroundColor'
|
|
103
112
|
| 'backgroundImage'
|
|
104
|
-
| 'borderRadius'
|
|
105
113
|
| 'border'
|
|
106
|
-
| 'borderWidth'
|
|
107
114
|
| 'borderColor'
|
|
115
|
+
| 'borderImage'
|
|
116
|
+
| 'borderImageOutset'
|
|
117
|
+
| 'borderImageRepeat'
|
|
118
|
+
| 'borderImageSlice'
|
|
119
|
+
| 'borderImageSource'
|
|
120
|
+
| 'borderImageWidth'
|
|
121
|
+
| 'borderRadius'
|
|
108
122
|
| 'borderStyle'
|
|
123
|
+
| 'borderWidth'
|
|
124
|
+
| `border${Placement}`
|
|
125
|
+
| `border${Placement}Color`
|
|
126
|
+
| `border${Placement}Style`
|
|
127
|
+
| `border${Placement}Width`
|
|
128
|
+
| 'borderRadius'
|
|
129
|
+
| `border${Radius}Radius`
|
|
109
130
|
| 'boxShadow'
|
|
131
|
+
| 'boxShadowColor'
|
|
132
|
+
| 'clipPath'
|
|
133
|
+
| 'color'
|
|
134
|
+
| 'contain'
|
|
135
|
+
| 'content'
|
|
136
|
+
| 'contentVisibility'
|
|
137
|
+
| 'cursor'
|
|
138
|
+
| 'display'
|
|
110
139
|
| 'filter'
|
|
111
140
|
| 'backdropFilter'
|
|
112
|
-
| '
|
|
113
|
-
| '
|
|
141
|
+
| 'height'
|
|
142
|
+
| 'width'
|
|
143
|
+
| 'minHeight'
|
|
144
|
+
| 'minWidth'
|
|
145
|
+
| 'maxHeight'
|
|
146
|
+
| 'maxWidth'
|
|
147
|
+
| `margin${Placement}`
|
|
148
|
+
| 'inset'
|
|
149
|
+
| `inset${LogicalPlacement}`
|
|
150
|
+
| Lowercase<PhysicalPlacement>
|
|
151
|
+
| 'isolation'
|
|
152
|
+
| 'mask'
|
|
153
|
+
| 'maskClip'
|
|
154
|
+
| 'maskComposite'
|
|
155
|
+
| 'maskImage'
|
|
156
|
+
| 'maskMode'
|
|
157
|
+
| 'maskOrigin'
|
|
158
|
+
| 'maskPosition'
|
|
159
|
+
| 'maskRepeat'
|
|
160
|
+
| 'maskSize'
|
|
161
|
+
| 'mixBlendMode'
|
|
162
|
+
| 'objectFit'
|
|
163
|
+
| 'objectPosition'
|
|
114
164
|
| 'opacity'
|
|
165
|
+
| 'outline'
|
|
166
|
+
| 'outlineColor'
|
|
167
|
+
| 'outlineOffset'
|
|
168
|
+
| 'outlineStyle'
|
|
169
|
+
| 'outlineWidth'
|
|
170
|
+
| 'overflow'
|
|
171
|
+
| 'overflowX'
|
|
172
|
+
| 'overflowY'
|
|
173
|
+
| 'padding'
|
|
174
|
+
| `padding${Placement}`
|
|
175
|
+
| 'pointerEvents'
|
|
176
|
+
| 'position'
|
|
177
|
+
| 'resize'
|
|
178
|
+
| 'transform'
|
|
179
|
+
| 'transition'
|
|
180
|
+
| 'visibility'
|
|
181
|
+
| 'willChange'
|
|
182
|
+
| 'zIndex'
|
|
115
183
|
| 'backgroundBlendMode'
|
|
116
184
|
| 'backgroundAttachment'
|
|
117
185
|
| 'backgroundClip'
|
|
@@ -119,14 +187,6 @@ type LayerStyleProperty =
|
|
|
119
187
|
| 'backgroundPosition'
|
|
120
188
|
| 'backgroundRepeat'
|
|
121
189
|
| 'backgroundSize'
|
|
122
|
-
| `border${Placement}`
|
|
123
|
-
| `border${Placement}Width`
|
|
124
|
-
| 'borderRadius'
|
|
125
|
-
| `border${Radius}Radius`
|
|
126
|
-
| `border${Placement}Color`
|
|
127
|
-
| `border${Placement}Style`
|
|
128
|
-
| 'padding'
|
|
129
|
-
| `padding${Placement}`
|
|
130
190
|
|
|
131
191
|
export type LayerStyle = CompositionStyleObject<LayerStyleProperty>
|
|
132
192
|
|
|
@@ -14,7 +14,7 @@ export interface Conditions {
|
|
|
14
14
|
"_focusWithin": string
|
|
15
15
|
/** `&:is(:focus-visible, [data-focus-visible])` */
|
|
16
16
|
"_focusVisible": string
|
|
17
|
-
/** `&:is(:disabled, [disabled], [data-disabled])` */
|
|
17
|
+
/** `&:is(:disabled, [disabled], [data-disabled], [aria-disabled=true])` */
|
|
18
18
|
"_disabled": string
|
|
19
19
|
/** `&:is(:active, [data-active])` */
|
|
20
20
|
"_active": string
|
|
@@ -22,7 +22,7 @@ export interface Conditions {
|
|
|
22
22
|
"_visited": string
|
|
23
23
|
/** `&:target` */
|
|
24
24
|
"_target": string
|
|
25
|
-
/** `&:is(:read-only, [data-read-only])` */
|
|
25
|
+
/** `&:is(:read-only, [data-read-only], [aria-readonly=true])` */
|
|
26
26
|
"_readOnly": string
|
|
27
27
|
/** `&:read-write` */
|
|
28
28
|
"_readWrite": string
|
|
@@ -50,7 +50,7 @@ export interface Conditions {
|
|
|
50
50
|
"_firstLetter": string
|
|
51
51
|
/** `&::first-line` */
|
|
52
52
|
"_firstLine": string
|
|
53
|
-
/** `&::marker` */
|
|
53
|
+
/** `&::marker, &::-webkit-details-marker` */
|
|
54
54
|
"_marker": string
|
|
55
55
|
/** `&::selection` */
|
|
56
56
|
"_selection": string
|
|
@@ -84,7 +84,7 @@ export interface Conditions {
|
|
|
84
84
|
"_peerFocusWithin": string
|
|
85
85
|
/** `.peer:is(:focus-visible, [data-focus-visible]) ~ &` */
|
|
86
86
|
"_peerFocusVisible": string
|
|
87
|
-
/** `.peer:is(:disabled, [disabled], [data-disabled]) ~ &` */
|
|
87
|
+
/** `.peer:is(:disabled, [disabled], [data-disabled], [aria-disabled=true]) ~ &` */
|
|
88
88
|
"_peerDisabled": string
|
|
89
89
|
/** `.peer:is(:checked, [data-checked], [aria-checked=true], [data-state="checked"]) ~ &` */
|
|
90
90
|
"_peerChecked": string
|
|
@@ -104,13 +104,13 @@ export interface Conditions {
|
|
|
104
104
|
"_groupFocusWithin": string
|
|
105
105
|
/** `.group:is(:focus-visible, [data-focus-visible]) &` */
|
|
106
106
|
"_groupFocusVisible": string
|
|
107
|
-
/** `.group:is(:disabled, [disabled], [data-disabled]) &` */
|
|
107
|
+
/** `.group:is(:disabled, [disabled], [data-disabled], [aria-disabled=true]) &` */
|
|
108
108
|
"_groupDisabled": string
|
|
109
109
|
/** `.group:is(:checked, [data-checked], [aria-checked=true], [data-state="checked"]) &` */
|
|
110
110
|
"_groupChecked": string
|
|
111
111
|
/** `.group:is([aria-expanded=true], [data-expanded], [data-state="expanded"]) &` */
|
|
112
112
|
"_groupExpanded": string
|
|
113
|
-
/** `.group:invalid &` */
|
|
113
|
+
/** `.group:is(:invalid, [data-invalid], [aria-invalid=true]) &` */
|
|
114
114
|
"_groupInvalid": string
|
|
115
115
|
/** `&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state="indeterminate"])` */
|
|
116
116
|
"_indeterminate": string
|
|
@@ -118,7 +118,7 @@ export interface Conditions {
|
|
|
118
118
|
"_required": string
|
|
119
119
|
/** `&:is(:valid, [data-valid])` */
|
|
120
120
|
"_valid": string
|
|
121
|
-
/** `&:is(:invalid, [data-invalid])` */
|
|
121
|
+
/** `&:is(:invalid, [data-invalid], [aria-invalid=true])` */
|
|
122
122
|
"_invalid": string
|
|
123
123
|
/** `&:autofill` */
|
|
124
124
|
"_autofill": string
|
|
@@ -146,11 +146,11 @@ export interface Conditions {
|
|
|
146
146
|
"_default": string
|
|
147
147
|
/** `&:optional` */
|
|
148
148
|
"_optional": string
|
|
149
|
-
/** `&:is([open], [data-open], [data-state="open"])` */
|
|
149
|
+
/** `&:is([open], [data-open], [data-state="open"], :popover-open)` */
|
|
150
150
|
"_open": string
|
|
151
151
|
/** `&:is([closed], [data-closed], [data-state="closed"])` */
|
|
152
152
|
"_closed": string
|
|
153
|
-
/**
|
|
153
|
+
/** `&:is(:fullscreen, [data-fullscreen])` */
|
|
154
154
|
"_fullscreen": string
|
|
155
155
|
/** `&:is([data-loading], [aria-busy=true])` */
|
|
156
156
|
"_loading": string
|
|
@@ -194,9 +194,9 @@ export interface Conditions {
|
|
|
194
194
|
"_lessContrast": string
|
|
195
195
|
/** `@media (prefers-contrast: more)` */
|
|
196
196
|
"_moreContrast": string
|
|
197
|
-
/**
|
|
197
|
+
/** `:where([dir=ltr], :dir(ltr)) &` */
|
|
198
198
|
"_ltr": string
|
|
199
|
-
/**
|
|
199
|
+
/** `:where([dir=rtl], :dir(rtl)) &` */
|
|
200
200
|
"_rtl": string
|
|
201
201
|
/** `&::-webkit-scrollbar` */
|
|
202
202
|
"_scrollbar": string
|
|
@@ -212,6 +212,10 @@ export interface Conditions {
|
|
|
212
212
|
"_icon": string
|
|
213
213
|
/** `@starting-style` */
|
|
214
214
|
"_starting": string
|
|
215
|
+
/** `@media (scripting: none)` */
|
|
216
|
+
"_noscript": string
|
|
217
|
+
/** `@media (inverted-colors: inverted)` */
|
|
218
|
+
"_invertedColors": string
|
|
215
219
|
/** `@media screen and (min-width: 40rem)` */
|
|
216
220
|
"sm": string
|
|
217
221
|
/** `@media screen and (min-width: 40rem) and (max-width: 47.9975rem)` */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
import type {
|
|
2
|
+
import type { ElementType, JSX, ComponentPropsWithRef, ComponentType, Component } from 'react'
|
|
3
3
|
import type { RecipeDefinition, RecipeSelection, RecipeVariantRecord } from './recipe';
|
|
4
4
|
import type { Assign, DistributiveOmit, DistributiveUnion, JsxHTMLProps, JsxStyleProps, Pretty } from './system-types';
|
|
5
5
|
|
|
@@ -7,26 +7,43 @@ interface Dict {
|
|
|
7
7
|
[k: string]: unknown
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export type
|
|
11
|
-
|
|
10
|
+
export type DataAttrs = Record<`data-${string}`, unknown>
|
|
11
|
+
|
|
12
|
+
export interface UnstyledProps {
|
|
13
|
+
/**
|
|
14
|
+
* Whether to remove recipe styles
|
|
15
|
+
*/
|
|
16
|
+
unstyled?: boolean | undefined
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface AsProps {
|
|
20
|
+
/**
|
|
21
|
+
* The element to render as
|
|
22
|
+
*/
|
|
23
|
+
as?: ElementType | undefined
|
|
12
24
|
}
|
|
13
25
|
|
|
26
|
+
export type ComponentProps<T extends ElementType> = T extends ComponentType<infer P> | Component<infer P>
|
|
27
|
+
? JSX.LibraryManagedAttributes<T, P>
|
|
28
|
+
: ComponentPropsWithRef<T>
|
|
29
|
+
|
|
14
30
|
export interface StyledComponent<T extends ElementType, P extends Dict = {}> {
|
|
15
|
-
(props: JsxHTMLProps<ComponentProps<T
|
|
16
|
-
displayName?: string
|
|
31
|
+
(props: JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, Assign<JsxStyleProps, P>>): JSX.Element
|
|
32
|
+
displayName?: string | undefined
|
|
17
33
|
}
|
|
18
34
|
|
|
19
35
|
interface RecipeFn {
|
|
20
36
|
__type: any
|
|
21
37
|
}
|
|
22
38
|
|
|
23
|
-
interface JsxFactoryOptions<TProps extends Dict> {
|
|
39
|
+
export interface JsxFactoryOptions<TProps extends Dict> {
|
|
24
40
|
dataAttr?: boolean
|
|
25
|
-
defaultProps?: TProps
|
|
26
|
-
shouldForwardProp
|
|
41
|
+
defaultProps?: Partial<TProps> & DataAttrs
|
|
42
|
+
shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
|
|
43
|
+
forwardProps?: string[]
|
|
27
44
|
}
|
|
28
45
|
|
|
29
|
-
export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T
|
|
46
|
+
export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, P>;
|
|
30
47
|
|
|
31
48
|
export type JsxElement<T extends ElementType, P extends Dict> = T extends StyledComponent<infer A, infer B>
|
|
32
49
|
? StyledComponent<A, Pretty<DistributiveUnion<P, B>>>
|
|
@@ -47,6 +64,6 @@ export type JsxElements = {
|
|
|
47
64
|
|
|
48
65
|
export type Styled = JsxFactory & JsxElements
|
|
49
66
|
|
|
50
|
-
export type HTMLStyledProps<T extends ElementType> = JsxHTMLProps<ComponentProps<T
|
|
67
|
+
export type HTMLStyledProps<T extends ElementType> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, JsxStyleProps>
|
|
51
68
|
|
|
52
69
|
export type StyledVariantProps<T extends StyledComponent<any, any>> = T extends StyledComponent<any, infer Props> ? Props : never
|
|
@@ -6,10 +6,10 @@ type Primitive = string | number | boolean | null | undefined
|
|
|
6
6
|
type LiteralUnion<T, K extends Primitive = string> = T | (K & Record<never, never>)
|
|
7
7
|
|
|
8
8
|
export type PatternProperty =
|
|
9
|
-
| { type: 'property'; value: CssProperty }
|
|
10
|
-
| { type: 'enum'; value: string[] }
|
|
11
|
-
| { type: 'token'; value: TokenCategory; property?: CssProperty }
|
|
12
|
-
| { type: 'string' | 'boolean' | 'number' }
|
|
9
|
+
| { type: 'property'; value: CssProperty; description?: string }
|
|
10
|
+
| { type: 'enum'; value: string[]; description?: string }
|
|
11
|
+
| { type: 'token'; value: TokenCategory; property?: CssProperty; description?: string }
|
|
12
|
+
| { type: 'string' | 'boolean' | 'number'; description?: string }
|
|
13
13
|
|
|
14
14
|
export interface PatternHelpers {
|
|
15
15
|
map: (value: any, fn: (value: string) => string | undefined) => any
|
|
@@ -4,6 +4,7 @@ import type { CssProperties } from './system-types';
|
|
|
4
4
|
import type { Tokens } from '../tokens/index';
|
|
5
5
|
|
|
6
6
|
export interface UtilityValues {
|
|
7
|
+
aspectRatio: Tokens["aspectRatios"];
|
|
7
8
|
top: Tokens["spacing"];
|
|
8
9
|
left: Tokens["spacing"];
|
|
9
10
|
inset: "auto" | Tokens["spacing"];
|
|
@@ -53,7 +54,14 @@ export interface UtilityValues {
|
|
|
53
54
|
spaceX: "auto" | Tokens["spacing"] | CssProperties["marginInlineStart"];
|
|
54
55
|
spaceY: "auto" | Tokens["spacing"] | CssProperties["marginBlockStart"];
|
|
55
56
|
outlineColor: Tokens["colors"];
|
|
57
|
+
outline: Tokens["borders"];
|
|
56
58
|
outlineOffset: Tokens["spacing"];
|
|
59
|
+
focusRing: "outside" | "inside" | "mixed" | "none";
|
|
60
|
+
focusVisibleRing: "outside" | "inside" | "mixed" | "none";
|
|
61
|
+
focusRingColor: Tokens["colors"];
|
|
62
|
+
focusRingOffset: Tokens["spacing"];
|
|
63
|
+
focusRingWidth: CssProperties["outlineWidth"];
|
|
64
|
+
focusRingStyle: CssProperties["outlineStyle"];
|
|
57
65
|
divideColor: Tokens["colors"];
|
|
58
66
|
divideStyle: CssProperties["borderStyle"];
|
|
59
67
|
width: "auto" | Tokens["sizes"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "screen";
|
|
@@ -68,6 +76,7 @@ export interface UtilityValues {
|
|
|
68
76
|
minBlockSize: "auto" | Tokens["sizes"] | "svh" | "lvh" | "dvh" | "screen" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6";
|
|
69
77
|
maxHeight: "auto" | Tokens["sizes"] | "svh" | "lvh" | "dvh" | "screen" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6";
|
|
70
78
|
maxBlockSize: "auto" | Tokens["sizes"] | "svh" | "lvh" | "dvh" | "screen" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6";
|
|
79
|
+
boxSize: "auto" | Tokens["sizes"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "screen";
|
|
71
80
|
color: Tokens["colors"];
|
|
72
81
|
fontFamily: Tokens["fonts"];
|
|
73
82
|
fontSize: Tokens["fontSizes"];
|
|
@@ -80,11 +89,13 @@ export interface UtilityValues {
|
|
|
80
89
|
textIndent: Tokens["spacing"];
|
|
81
90
|
textShadow: Tokens["shadows"];
|
|
82
91
|
textShadowColor: Tokens["colors"];
|
|
92
|
+
WebkitTextFillColor: Tokens["colors"];
|
|
83
93
|
textWrap: "wrap" | "balance" | "nowrap";
|
|
84
94
|
truncate: boolean;
|
|
85
95
|
background: Tokens["colors"];
|
|
86
96
|
backgroundColor: Tokens["colors"];
|
|
87
97
|
backgroundGradient: "to-t" | "to-tr" | "to-r" | "to-br" | "to-b" | "to-bl" | "to-l" | "to-tl";
|
|
98
|
+
backgroundLinear: "to-t" | "to-tr" | "to-r" | "to-br" | "to-b" | "to-bl" | "to-l" | "to-tl";
|
|
88
99
|
textGradient: "to-t" | "to-tr" | "to-r" | "to-br" | "to-b" | "to-bl" | "to-l" | "to-tl";
|
|
89
100
|
gradientFrom: Tokens["colors"];
|
|
90
101
|
gradientTo: Tokens["colors"];
|
|
@@ -104,28 +115,43 @@ export interface UtilityValues {
|
|
|
104
115
|
borderEndStartRadius: Tokens["radii"];
|
|
105
116
|
borderEndEndRadius: Tokens["radii"];
|
|
106
117
|
borderEndRadius: Tokens["radii"] | CssProperties["borderRadius"];
|
|
118
|
+
border: Tokens["borders"];
|
|
107
119
|
borderColor: Tokens["colors"];
|
|
120
|
+
borderInline: Tokens["borders"];
|
|
108
121
|
borderInlineColor: Tokens["colors"];
|
|
122
|
+
borderBlock: Tokens["borders"];
|
|
109
123
|
borderBlockColor: Tokens["colors"];
|
|
124
|
+
borderLeft: Tokens["borders"];
|
|
110
125
|
borderLeftColor: Tokens["colors"];
|
|
126
|
+
borderInlineStart: Tokens["borders"];
|
|
111
127
|
borderInlineStartColor: Tokens["colors"];
|
|
128
|
+
borderRight: Tokens["borders"];
|
|
112
129
|
borderRightColor: Tokens["colors"];
|
|
130
|
+
borderInlineEnd: Tokens["borders"];
|
|
113
131
|
borderInlineEndColor: Tokens["colors"];
|
|
132
|
+
borderTop: Tokens["borders"];
|
|
114
133
|
borderTopColor: Tokens["colors"];
|
|
134
|
+
borderBottom: Tokens["borders"];
|
|
115
135
|
borderBottomColor: Tokens["colors"];
|
|
136
|
+
borderBlockEnd: Tokens["borders"];
|
|
116
137
|
borderBlockEndColor: Tokens["colors"];
|
|
138
|
+
borderBlockStart: Tokens["borders"];
|
|
117
139
|
borderBlockStartColor: Tokens["colors"];
|
|
118
140
|
boxShadow: Tokens["shadows"];
|
|
119
141
|
boxShadowColor: Tokens["colors"];
|
|
120
142
|
filter: "auto";
|
|
143
|
+
blur: Tokens["blurs"];
|
|
121
144
|
backdropFilter: "auto";
|
|
145
|
+
backdropBlur: Tokens["blurs"];
|
|
122
146
|
borderSpacing: Tokens["spacing"] | "auto";
|
|
123
147
|
borderSpacingX: Tokens["spacing"];
|
|
124
148
|
borderSpacingY: Tokens["spacing"];
|
|
125
149
|
transitionTimingFunction: Tokens["easings"];
|
|
126
150
|
transitionDelay: Tokens["durations"];
|
|
127
151
|
transitionDuration: Tokens["durations"];
|
|
128
|
-
|
|
152
|
+
transitionProperty: "common" | "colors" | "size" | "position" | "background";
|
|
153
|
+
transition: "all" | "common" | "size" | "position" | "background" | "colors" | "opacity" | "shadow" | "transform";
|
|
154
|
+
animation: Tokens["animations"];
|
|
129
155
|
animationName: "spin" | "ping" | "pulse" | "bounce";
|
|
130
156
|
animationTimingFunction: Tokens["easings"];
|
|
131
157
|
animationDuration: Tokens["durations"];
|
|
@@ -178,8 +204,9 @@ export interface UtilityValues {
|
|
|
178
204
|
srOnly: boolean;
|
|
179
205
|
debug: boolean;
|
|
180
206
|
containerName: CssProperties["containerName"];
|
|
181
|
-
colorPalette: "primary" | "secondary" | "tertiary" | "neutral" | "neutralVariant" | "error" | "
|
|
182
|
-
textStyle: "displayLarge" | "displayMedium" | "displaySmall" | "headlineLarge" | "headlineMedium" | "headlineSmall" | "titleLarge" | "titleMedium" | "titleSmall" | "bodyLarge" | "bodyMedium" | "bodySmall" | "labelLarge" | "labelMedium" | "labelSmall";
|
|
207
|
+
colorPalette: "current" | "black" | "white" | "transparent" | "rose" | "pink" | "fuchsia" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "emerald" | "green" | "lime" | "yellow" | "amber" | "orange" | "red" | "stone" | "zinc" | "gray" | "slate" | "primary" | "secondary" | "tertiary" | "neutral" | "neutralVariant" | "error" | "primary.solid.bg" | "primary.solid" | "primary.solid.fg" | "primary.subtle.bg" | "primary.subtle" | "primary.subtle.fg" | "primary.surface.bg" | "primary.surface" | "primary.surface.border" | "primary.surface.fg" | "primary.outline" | "primary.outline.bg" | "primary.outline.border" | "primary.outline.fg" | "primary.plain" | "primary.plain.bg" | "primary.plain.fg" | "neutral.solid.bg" | "neutral.solid" | "neutral.solid.fg" | "neutral.subtle.bg" | "neutral.subtle" | "neutral.subtle.fg" | "neutral.surface.bg" | "neutral.surface" | "neutral.surface.border" | "neutral.surface.fg" | "neutral.outline" | "neutral.outline.bg" | "neutral.outline.border" | "neutral.outline.fg" | "neutral.plain" | "neutral.plain.bg" | "neutral.plain.fg" | "error.solid.bg" | "error.solid" | "error.solid.fg" | "error.subtle.bg" | "error.subtle" | "error.subtle.fg" | "error.surface.bg" | "error.surface" | "error.surface.border" | "error.surface.fg" | "error.outline" | "error.outline.bg" | "error.outline.border" | "error.outline.fg" | "error.plain" | "error.plain.bg" | "error.plain.fg" | "gray.solid.bg" | "gray.solid" | "gray.solid.fg" | "gray.subtle.bg" | "gray.subtle" | "gray.subtle.fg" | "gray.surface.bg" | "gray.surface" | "gray.surface.border" | "gray.surface.fg" | "gray.outline" | "gray.outline.bg" | "gray.outline.border" | "gray.outline.fg" | "gray.plain" | "gray.plain.bg" | "gray.plain.fg" | "red.solid.bg" | "red.solid" | "red.solid.fg" | "red.subtle.bg" | "red.subtle" | "red.subtle.fg" | "red.surface.bg" | "red.surface" | "red.surface.border" | "red.surface.fg" | "red.outline" | "red.outline.bg" | "red.outline.border" | "red.outline.fg" | "red.plain" | "red.plain.bg" | "red.plain.fg" | "fg" | "canvas" | "border" | "surface" | "surface.container" | "onSurface" | "m3Primary" | "onM3Primary" | "onSecondary" | "onTertiary" | "outline" | "inverseSurface" | "inverseOnSurface" | "inversePrimary" | "scrim";
|
|
208
|
+
textStyle: "8xl" | "9xl" | "displayLarge" | "displayMedium" | "displaySmall" | "headlineLarge" | "headlineMedium" | "headlineSmall" | "titleLarge" | "titleMedium" | "titleSmall" | "bodyLarge" | "bodyMedium" | "bodySmall" | "labelLarge" | "labelMedium" | "labelSmall" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "label";
|
|
209
|
+
layerStyle: "disabled";
|
|
183
210
|
}
|
|
184
211
|
|
|
185
212
|
|