@stokelp/styled-system 1.0.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.
Files changed (148) hide show
  1. package/css/conditions.mjs +34 -0
  2. package/css/css.d.ts +9 -0
  3. package/css/css.mjs +45 -0
  4. package/css/cva.d.ts +6 -0
  5. package/css/cva.mjs +87 -0
  6. package/css/cx.d.ts +5 -0
  7. package/css/cx.mjs +15 -0
  8. package/css/index.d.ts +5 -0
  9. package/css/index.mjs +4 -0
  10. package/css/sva.d.ts +4 -0
  11. package/css/sva.mjs +41 -0
  12. package/jsx/aspect-ratio.d.ts +10 -0
  13. package/jsx/aspect-ratio.mjs +14 -0
  14. package/jsx/bleed.d.ts +10 -0
  15. package/jsx/bleed.mjs +14 -0
  16. package/jsx/box.d.ts +10 -0
  17. package/jsx/box.mjs +14 -0
  18. package/jsx/center.d.ts +10 -0
  19. package/jsx/center.mjs +14 -0
  20. package/jsx/circle.d.ts +10 -0
  21. package/jsx/circle.mjs +14 -0
  22. package/jsx/container.d.ts +10 -0
  23. package/jsx/container.mjs +14 -0
  24. package/jsx/cq.d.ts +10 -0
  25. package/jsx/cq.mjs +14 -0
  26. package/jsx/divider.d.ts +10 -0
  27. package/jsx/divider.mjs +14 -0
  28. package/jsx/factory-helper.mjs +22 -0
  29. package/jsx/factory.d.ts +3 -0
  30. package/jsx/factory.mjs +80 -0
  31. package/jsx/flex.d.ts +10 -0
  32. package/jsx/flex.mjs +14 -0
  33. package/jsx/float.d.ts +10 -0
  34. package/jsx/float.mjs +14 -0
  35. package/jsx/grid-item.d.ts +10 -0
  36. package/jsx/grid-item.mjs +14 -0
  37. package/jsx/grid.d.ts +10 -0
  38. package/jsx/grid.mjs +14 -0
  39. package/jsx/hstack.d.ts +10 -0
  40. package/jsx/hstack.mjs +14 -0
  41. package/jsx/index.d.ts +25 -0
  42. package/jsx/index.mjs +23 -0
  43. package/jsx/is-valid-prop.d.ts +11 -0
  44. package/jsx/is-valid-prop.mjs +17 -0
  45. package/jsx/link-box.d.ts +10 -0
  46. package/jsx/link-box.mjs +14 -0
  47. package/jsx/link-overlay.d.ts +10 -0
  48. package/jsx/link-overlay.mjs +14 -0
  49. package/jsx/spacer.d.ts +10 -0
  50. package/jsx/spacer.mjs +14 -0
  51. package/jsx/square.d.ts +10 -0
  52. package/jsx/square.mjs +14 -0
  53. package/jsx/stack.d.ts +10 -0
  54. package/jsx/stack.mjs +14 -0
  55. package/jsx/visually-hidden.d.ts +10 -0
  56. package/jsx/visually-hidden.mjs +14 -0
  57. package/jsx/vstack.d.ts +10 -0
  58. package/jsx/vstack.mjs +14 -0
  59. package/jsx/wrap.d.ts +10 -0
  60. package/jsx/wrap.mjs +14 -0
  61. package/package.json +56 -0
  62. package/panda.buildinfo.json +75 -0
  63. package/patterns/aspect-ratio.d.ts +21 -0
  64. package/patterns/aspect-ratio.mjs +38 -0
  65. package/patterns/bleed.d.ts +22 -0
  66. package/patterns/bleed.mjs +24 -0
  67. package/patterns/box.d.ts +21 -0
  68. package/patterns/box.mjs +15 -0
  69. package/patterns/center.d.ts +21 -0
  70. package/patterns/center.mjs +21 -0
  71. package/patterns/circle.d.ts +21 -0
  72. package/patterns/circle.mjs +25 -0
  73. package/patterns/container.d.ts +21 -0
  74. package/patterns/container.mjs +21 -0
  75. package/patterns/cq.d.ts +22 -0
  76. package/patterns/cq.mjs +21 -0
  77. package/patterns/divider.d.ts +23 -0
  78. package/patterns/divider.mjs +25 -0
  79. package/patterns/flex.d.ts +27 -0
  80. package/patterns/flex.mjs +26 -0
  81. package/patterns/float.d.ts +24 -0
  82. package/patterns/float.mjs +52 -0
  83. package/patterns/grid-item.d.ts +26 -0
  84. package/patterns/grid-item.mjs +25 -0
  85. package/patterns/grid.d.ts +25 -0
  86. package/patterns/grid.mjs +27 -0
  87. package/patterns/hstack.d.ts +22 -0
  88. package/patterns/hstack.mjs +24 -0
  89. package/patterns/index.d.ts +22 -0
  90. package/patterns/index.mjs +21 -0
  91. package/patterns/link-box.d.ts +21 -0
  92. package/patterns/link-box.mjs +22 -0
  93. package/patterns/link-overlay.d.ts +21 -0
  94. package/patterns/link-overlay.mjs +27 -0
  95. package/patterns/spacer.d.ts +21 -0
  96. package/patterns/spacer.mjs +21 -0
  97. package/patterns/square.d.ts +21 -0
  98. package/patterns/square.mjs +24 -0
  99. package/patterns/stack.d.ts +24 -0
  100. package/patterns/stack.mjs +24 -0
  101. package/patterns/visually-hidden.d.ts +21 -0
  102. package/patterns/visually-hidden.mjs +18 -0
  103. package/patterns/vstack.d.ts +22 -0
  104. package/patterns/vstack.mjs +24 -0
  105. package/patterns/wrap.d.ts +25 -0
  106. package/patterns/wrap.mjs +25 -0
  107. package/recipes/accordion.d.ts +28 -0
  108. package/recipes/accordion.mjs +56 -0
  109. package/recipes/button.d.ts +30 -0
  110. package/recipes/button.mjs +116 -0
  111. package/recipes/checkbox.d.ts +28 -0
  112. package/recipes/checkbox.mjs +52 -0
  113. package/recipes/create-recipe.mjs +82 -0
  114. package/recipes/drawer.d.ts +28 -0
  115. package/recipes/drawer.mjs +77 -0
  116. package/recipes/form-control.d.ts +28 -0
  117. package/recipes/form-control.mjs +24 -0
  118. package/recipes/form-helper-text.d.ts +28 -0
  119. package/recipes/form-helper-text.mjs +24 -0
  120. package/recipes/form-label.d.ts +28 -0
  121. package/recipes/form-label.mjs +36 -0
  122. package/recipes/heading.d.ts +30 -0
  123. package/recipes/heading.mjs +41 -0
  124. package/recipes/index.d.ts +12 -0
  125. package/recipes/index.mjs +11 -0
  126. package/recipes/switch-recipe.d.ts +28 -0
  127. package/recipes/switch-recipe.mjs +52 -0
  128. package/recipes/text.d.ts +31 -0
  129. package/recipes/text.mjs +41 -0
  130. package/recipes/textarea.d.ts +28 -0
  131. package/recipes/textarea.mjs +24 -0
  132. package/tokens/index.d.ts +9 -0
  133. package/tokens/index.mjs +1496 -0
  134. package/tokens/tokens.d.ts +63 -0
  135. package/types/composition.d.ts +111 -0
  136. package/types/conditions.d.ts +270 -0
  137. package/types/csstype.d.ts +21298 -0
  138. package/types/global.d.ts +19 -0
  139. package/types/index.d.ts +8 -0
  140. package/types/jsx.d.ts +52 -0
  141. package/types/parts.d.ts +8 -0
  142. package/types/pattern.d.ts +74 -0
  143. package/types/prop-type.d.ts +242 -0
  144. package/types/recipe.d.ts +173 -0
  145. package/types/selectors.d.ts +59 -0
  146. package/types/static-css.d.ts +51 -0
  147. package/types/style-props.d.ts +7468 -0
  148. package/types/system-types.d.ts +89 -0
@@ -0,0 +1,22 @@
1
+ import { getPatternStyles, patternFns } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const linkBoxConfig = {
5
+ transform(props5) {
6
+ return {
7
+ position: "relative",
8
+ "& :where(a, abbr)": {
9
+ position: "relative",
10
+ zIndex: "1"
11
+ },
12
+ ...props5
13
+ };
14
+ }}
15
+
16
+ export const getLinkBoxStyle = (styles = {}) => {
17
+ const _styles = getPatternStyles(linkBoxConfig, styles)
18
+ return linkBoxConfig.transform(_styles, patternFns)
19
+ }
20
+
21
+ export const linkBox = (styles) => css(getLinkBoxStyle(styles))
22
+ linkBox.raw = getLinkBoxStyle
@@ -0,0 +1,21 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
+ import type { Properties } from '../types/csstype';
4
+ import type { SystemProperties } from '../types/style-props';
5
+ import type { DistributiveOmit } from '../types/system-types';
6
+ import type { Tokens } from '../tokens/index';
7
+
8
+ export interface LinkOverlayProperties {
9
+
10
+ }
11
+
12
+
13
+ interface LinkOverlayStyles extends LinkOverlayProperties, DistributiveOmit<SystemStyleObject, keyof LinkOverlayProperties > {}
14
+
15
+ interface LinkOverlayPatternFn {
16
+ (styles?: LinkOverlayStyles): string
17
+ raw: (styles?: LinkOverlayStyles) => SystemStyleObject
18
+ }
19
+
20
+
21
+ export declare const linkOverlay: LinkOverlayPatternFn;
@@ -0,0 +1,27 @@
1
+ import { getPatternStyles, patternFns } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const linkOverlayConfig = {
5
+ transform(props5) {
6
+ return {
7
+ position: "static",
8
+ _before: {
9
+ content: '""',
10
+ display: "block",
11
+ position: "absolute",
12
+ cursor: "inherit",
13
+ inset: "0",
14
+ zIndex: "0",
15
+ ...props5["_before"]
16
+ },
17
+ ...props5
18
+ };
19
+ }}
20
+
21
+ export const getLinkOverlayStyle = (styles = {}) => {
22
+ const _styles = getPatternStyles(linkOverlayConfig, styles)
23
+ return linkOverlayConfig.transform(_styles, patternFns)
24
+ }
25
+
26
+ export const linkOverlay = (styles) => css(getLinkOverlayStyle(styles))
27
+ linkOverlay.raw = getLinkOverlayStyle
@@ -0,0 +1,21 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
+ import type { Properties } from '../types/csstype';
4
+ import type { SystemProperties } from '../types/style-props';
5
+ import type { DistributiveOmit } from '../types/system-types';
6
+ import type { Tokens } from '../tokens/index';
7
+
8
+ export interface SpacerProperties {
9
+ size?: ConditionalValue<Tokens["spacing"]>
10
+ }
11
+
12
+
13
+ interface SpacerStyles extends SpacerProperties, DistributiveOmit<SystemStyleObject, keyof SpacerProperties > {}
14
+
15
+ interface SpacerPatternFn {
16
+ (styles?: SpacerStyles): string
17
+ raw: (styles?: SpacerStyles) => SystemStyleObject
18
+ }
19
+
20
+
21
+ export declare const spacer: SpacerPatternFn;
@@ -0,0 +1,21 @@
1
+ import { getPatternStyles, patternFns } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const spacerConfig = {
5
+ transform(props5, { map }) {
6
+ const { size, ...rest } = props5;
7
+ return {
8
+ alignSelf: "stretch",
9
+ justifySelf: "stretch",
10
+ flex: map(size, (v) => v == null ? "1" : `0 0 ${v}`),
11
+ ...rest
12
+ };
13
+ }}
14
+
15
+ export const getSpacerStyle = (styles = {}) => {
16
+ const _styles = getPatternStyles(spacerConfig, styles)
17
+ return spacerConfig.transform(_styles, patternFns)
18
+ }
19
+
20
+ export const spacer = (styles) => css(getSpacerStyle(styles))
21
+ spacer.raw = getSpacerStyle
@@ -0,0 +1,21 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
+ import type { Properties } from '../types/csstype';
4
+ import type { SystemProperties } from '../types/style-props';
5
+ import type { DistributiveOmit } from '../types/system-types';
6
+ import type { Tokens } from '../tokens/index';
7
+
8
+ export interface SquareProperties {
9
+ size?: SystemProperties["width"]
10
+ }
11
+
12
+
13
+ interface SquareStyles extends SquareProperties, DistributiveOmit<SystemStyleObject, keyof SquareProperties > {}
14
+
15
+ interface SquarePatternFn {
16
+ (styles?: SquareStyles): string
17
+ raw: (styles?: SquareStyles) => SystemStyleObject
18
+ }
19
+
20
+
21
+ export declare const square: SquarePatternFn;
@@ -0,0 +1,24 @@
1
+ import { getPatternStyles, patternFns } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const squareConfig = {
5
+ transform(props5) {
6
+ const { size, ...rest } = props5;
7
+ return {
8
+ display: "flex",
9
+ alignItems: "center",
10
+ justifyContent: "center",
11
+ flex: "0 0 auto",
12
+ width: size,
13
+ height: size,
14
+ ...rest
15
+ };
16
+ }}
17
+
18
+ export const getSquareStyle = (styles = {}) => {
19
+ const _styles = getPatternStyles(squareConfig, styles)
20
+ return squareConfig.transform(_styles, patternFns)
21
+ }
22
+
23
+ export const square = (styles) => css(getSquareStyle(styles))
24
+ square.raw = getSquareStyle
@@ -0,0 +1,24 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
+ import type { Properties } from '../types/csstype';
4
+ import type { SystemProperties } from '../types/style-props';
5
+ import type { DistributiveOmit } from '../types/system-types';
6
+ import type { Tokens } from '../tokens/index';
7
+
8
+ export interface StackProperties {
9
+ align?: SystemProperties["alignItems"]
10
+ justify?: SystemProperties["justifyContent"]
11
+ direction?: SystemProperties["flexDirection"]
12
+ gap?: SystemProperties["gap"]
13
+ }
14
+
15
+
16
+ interface StackStyles extends StackProperties, DistributiveOmit<SystemStyleObject, keyof StackProperties > {}
17
+
18
+ interface StackPatternFn {
19
+ (styles?: StackStyles): string
20
+ raw: (styles?: StackStyles) => SystemStyleObject
21
+ }
22
+
23
+
24
+ export declare const stack: StackPatternFn;
@@ -0,0 +1,24 @@
1
+ import { getPatternStyles, patternFns } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const stackConfig = {
5
+ transform(props5) {
6
+ const { align, justify, direction, gap, ...rest } = props5;
7
+ return {
8
+ display: "flex",
9
+ flexDirection: direction,
10
+ alignItems: align,
11
+ justifyContent: justify,
12
+ gap,
13
+ ...rest
14
+ };
15
+ },
16
+ defaultValues:{direction:'column',gap:'10px'}}
17
+
18
+ export const getStackStyle = (styles = {}) => {
19
+ const _styles = getPatternStyles(stackConfig, styles)
20
+ return stackConfig.transform(_styles, patternFns)
21
+ }
22
+
23
+ export const stack = (styles) => css(getStackStyle(styles))
24
+ stack.raw = getStackStyle
@@ -0,0 +1,21 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
+ import type { Properties } from '../types/csstype';
4
+ import type { SystemProperties } from '../types/style-props';
5
+ import type { DistributiveOmit } from '../types/system-types';
6
+ import type { Tokens } from '../tokens/index';
7
+
8
+ export interface VisuallyHiddenProperties {
9
+
10
+ }
11
+
12
+
13
+ interface VisuallyHiddenStyles extends VisuallyHiddenProperties, DistributiveOmit<SystemStyleObject, keyof VisuallyHiddenProperties > {}
14
+
15
+ interface VisuallyHiddenPatternFn {
16
+ (styles?: VisuallyHiddenStyles): string
17
+ raw: (styles?: VisuallyHiddenStyles) => SystemStyleObject
18
+ }
19
+
20
+
21
+ export declare const visuallyHidden: VisuallyHiddenPatternFn;
@@ -0,0 +1,18 @@
1
+ import { getPatternStyles, patternFns } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const visuallyHiddenConfig = {
5
+ transform(props5) {
6
+ return {
7
+ srOnly: true,
8
+ ...props5
9
+ };
10
+ }}
11
+
12
+ export const getVisuallyHiddenStyle = (styles = {}) => {
13
+ const _styles = getPatternStyles(visuallyHiddenConfig, styles)
14
+ return visuallyHiddenConfig.transform(_styles, patternFns)
15
+ }
16
+
17
+ export const visuallyHidden = (styles) => css(getVisuallyHiddenStyle(styles))
18
+ visuallyHidden.raw = getVisuallyHiddenStyle
@@ -0,0 +1,22 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
+ import type { Properties } from '../types/csstype';
4
+ import type { SystemProperties } from '../types/style-props';
5
+ import type { DistributiveOmit } from '../types/system-types';
6
+ import type { Tokens } from '../tokens/index';
7
+
8
+ export interface VstackProperties {
9
+ justify?: SystemProperties["justifyContent"]
10
+ gap?: SystemProperties["gap"]
11
+ }
12
+
13
+
14
+ interface VstackStyles extends VstackProperties, DistributiveOmit<SystemStyleObject, keyof VstackProperties > {}
15
+
16
+ interface VstackPatternFn {
17
+ (styles?: VstackStyles): string
18
+ raw: (styles?: VstackStyles) => SystemStyleObject
19
+ }
20
+
21
+
22
+ export declare const vstack: VstackPatternFn;
@@ -0,0 +1,24 @@
1
+ import { getPatternStyles, patternFns } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const vstackConfig = {
5
+ transform(props5) {
6
+ const { justify, gap, ...rest } = props5;
7
+ return {
8
+ display: "flex",
9
+ alignItems: "center",
10
+ justifyContent: justify,
11
+ gap,
12
+ flexDirection: "column",
13
+ ...rest
14
+ };
15
+ },
16
+ defaultValues:{gap:'10px'}}
17
+
18
+ export const getVstackStyle = (styles = {}) => {
19
+ const _styles = getPatternStyles(vstackConfig, styles)
20
+ return vstackConfig.transform(_styles, patternFns)
21
+ }
22
+
23
+ export const vstack = (styles) => css(getVstackStyle(styles))
24
+ vstack.raw = getVstackStyle
@@ -0,0 +1,25 @@
1
+ /* eslint-disable */
2
+ import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
+ import type { Properties } from '../types/csstype';
4
+ import type { SystemProperties } from '../types/style-props';
5
+ import type { DistributiveOmit } from '../types/system-types';
6
+ import type { Tokens } from '../tokens/index';
7
+
8
+ export interface WrapProperties {
9
+ gap?: SystemProperties["gap"]
10
+ rowGap?: SystemProperties["gap"]
11
+ columnGap?: SystemProperties["gap"]
12
+ align?: SystemProperties["alignItems"]
13
+ justify?: SystemProperties["justifyContent"]
14
+ }
15
+
16
+
17
+ interface WrapStyles extends WrapProperties, DistributiveOmit<SystemStyleObject, keyof WrapProperties > {}
18
+
19
+ interface WrapPatternFn {
20
+ (styles?: WrapStyles): string
21
+ raw: (styles?: WrapStyles) => SystemStyleObject
22
+ }
23
+
24
+
25
+ export declare const wrap: WrapPatternFn;
@@ -0,0 +1,25 @@
1
+ import { getPatternStyles, patternFns } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const wrapConfig = {
5
+ transform(props5) {
6
+ const { columnGap, rowGap, gap = columnGap || rowGap ? void 0 : "10px", align, justify, ...rest } = props5;
7
+ return {
8
+ display: "flex",
9
+ flexWrap: "wrap",
10
+ alignItems: align,
11
+ justifyContent: justify,
12
+ gap,
13
+ columnGap,
14
+ rowGap,
15
+ ...rest
16
+ };
17
+ }}
18
+
19
+ export const getWrapStyle = (styles = {}) => {
20
+ const _styles = getPatternStyles(wrapConfig, styles)
21
+ return wrapConfig.transform(_styles, patternFns)
22
+ }
23
+
24
+ export const wrap = (styles) => css(getWrapStyle(styles))
25
+ wrap.raw = getWrapStyle
@@ -0,0 +1,28 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface AccordionVariant {
6
+ size: "md"
7
+ }
8
+
9
+ type AccordionVariantMap = {
10
+ [key in keyof AccordionVariant]: Array<AccordionVariant[key]>
11
+ }
12
+
13
+ export type AccordionVariantProps = {
14
+ [key in keyof AccordionVariant]?: ConditionalValue<AccordionVariant[key]> | undefined
15
+ }
16
+
17
+ export interface AccordionRecipe {
18
+ __type: AccordionVariantProps
19
+ (props?: AccordionVariantProps): Pretty<Record<"root" | "item" | "itemTrigger" | "itemContent" | "itemIndicator", string>>
20
+ raw: (props?: AccordionVariantProps) => AccordionVariantProps
21
+ variantMap: AccordionVariantMap
22
+ variantKeys: Array<keyof AccordionVariant>
23
+ splitVariantProps<Props extends AccordionVariantProps>(props: Props): [AccordionVariantProps, Pretty<DistributiveOmit<Props, keyof AccordionVariantProps>>]
24
+ getVariantProps: (props?: AccordionVariantProps) => AccordionVariantProps
25
+ }
26
+
27
+
28
+ export declare const accordion: AccordionRecipe
@@ -0,0 +1,56 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe } from './create-recipe.mjs';
3
+
4
+ const accordionDefaultVariants = {
5
+ "size": "md"
6
+ }
7
+ const accordionCompoundVariants = []
8
+
9
+ const accordionSlotNames = [
10
+ [
11
+ "root",
12
+ "accordion__root"
13
+ ],
14
+ [
15
+ "item",
16
+ "accordion__item"
17
+ ],
18
+ [
19
+ "itemTrigger",
20
+ "accordion__itemTrigger"
21
+ ],
22
+ [
23
+ "itemContent",
24
+ "accordion__itemContent"
25
+ ],
26
+ [
27
+ "itemIndicator",
28
+ "accordion__itemIndicator"
29
+ ]
30
+ ]
31
+ const accordionSlotFns = /* @__PURE__ */ accordionSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, accordionDefaultVariants, getSlotCompoundVariant(accordionCompoundVariants, slotName))])
32
+
33
+ const accordionFn = memo((props = {}) => {
34
+ return Object.fromEntries(accordionSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
35
+ })
36
+
37
+ const accordionVariantKeys = [
38
+ "size"
39
+ ]
40
+ const getVariantProps = (variants) => ({ ...accordionDefaultVariants, ...compact(variants) })
41
+
42
+ export const accordion = /* @__PURE__ */ Object.assign(accordionFn, {
43
+ __recipe__: false,
44
+ __name__: 'accordion',
45
+ raw: (props) => props,
46
+ variantKeys: accordionVariantKeys,
47
+ variantMap: {
48
+ "size": [
49
+ "md"
50
+ ]
51
+ },
52
+ splitVariantProps(props) {
53
+ return splitProps(props, accordionVariantKeys)
54
+ },
55
+ getVariantProps
56
+ })
@@ -0,0 +1,30 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface ButtonVariant {
6
+ size: "lg" | "md" | "sm"
7
+ variant: "primary" | "secondary" | "tertiary"
8
+ severity: "none" | "danger"
9
+ }
10
+
11
+ type ButtonVariantMap = {
12
+ [key in keyof ButtonVariant]: Array<ButtonVariant[key]>
13
+ }
14
+
15
+ export type ButtonVariantProps = {
16
+ [key in keyof ButtonVariant]?: ButtonVariant[key] | undefined
17
+ }
18
+
19
+ export interface ButtonRecipe {
20
+ __type: ButtonVariantProps
21
+ (props?: ButtonVariantProps): string
22
+ raw: (props?: ButtonVariantProps) => ButtonVariantProps
23
+ variantMap: ButtonVariantMap
24
+ variantKeys: Array<keyof ButtonVariant>
25
+ splitVariantProps<Props extends ButtonVariantProps>(props: Props): [ButtonVariantProps, Pretty<DistributiveOmit<Props, keyof ButtonVariantProps>>]
26
+ getVariantProps: (props?: ButtonVariantProps) => ButtonVariantProps
27
+ }
28
+
29
+ /** The styles for the Button component */
30
+ export declare const button: ButtonRecipe
@@ -0,0 +1,116 @@
1
+ import { memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe, mergeRecipes } from './create-recipe.mjs';
3
+
4
+ const buttonFn = /* @__PURE__ */ createRecipe('button', {
5
+ "size": "lg",
6
+ "variant": "primary",
7
+ "severity": "none"
8
+ }, [
9
+ {
10
+ "variant": "primary",
11
+ "severity": "danger",
12
+ "css": {
13
+ "bg": {
14
+ "_disabled": {
15
+ "_hover": "error.500",
16
+ "_active": "error.500",
17
+ "base": "error.500"
18
+ },
19
+ "_active": "error.800",
20
+ "_hover": "error.700",
21
+ "base": "error.500"
22
+ }
23
+ }
24
+ },
25
+ {
26
+ "variant": "secondary",
27
+ "severity": "danger",
28
+ "css": {
29
+ "bg": {
30
+ "_disabled": {
31
+ "_hover": "transparent",
32
+ "_active": "transparent",
33
+ "base": "transparent"
34
+ },
35
+ "_active": "error.700",
36
+ "_hover": "error.500",
37
+ "base": "transparent"
38
+ },
39
+ "boxShadow": {
40
+ "base": "inset 0 0 0 1px {colors.error.500}",
41
+ "_active": "inset 0 0 0 1px {colors.error.700}"
42
+ },
43
+ "color": {
44
+ "_disabled": {
45
+ "_hover": "error.500",
46
+ "_active": "error.500",
47
+ "base": "error.500"
48
+ },
49
+ "base": "error.500",
50
+ "_hover": "white",
51
+ "_active": "white"
52
+ }
53
+ }
54
+ },
55
+ {
56
+ "variant": "tertiary",
57
+ "severity": "danger",
58
+ "css": {
59
+ "bg": {
60
+ "_disabled": {
61
+ "_hover": "transparent",
62
+ "_active": "transparent",
63
+ "base": "transparent"
64
+ },
65
+ "_active": "error.200",
66
+ "_hover": "error.100",
67
+ "base": "transparent"
68
+ },
69
+ "color": {
70
+ "_disabled": {
71
+ "_hover": "error.500",
72
+ "_active": "error.500",
73
+ "base": "error.500"
74
+ },
75
+ "base": "error.500",
76
+ "_hover": "error.700",
77
+ "_active": "error.700"
78
+ }
79
+ }
80
+ }
81
+ ])
82
+
83
+ const buttonVariantMap = {
84
+ "size": [
85
+ "lg",
86
+ "md",
87
+ "sm"
88
+ ],
89
+ "variant": [
90
+ "primary",
91
+ "secondary",
92
+ "tertiary"
93
+ ],
94
+ "severity": [
95
+ "none",
96
+ "danger"
97
+ ]
98
+ }
99
+
100
+ const buttonVariantKeys = Object.keys(buttonVariantMap)
101
+
102
+ export const button = /* @__PURE__ */ Object.assign(memo(buttonFn.recipeFn), {
103
+ __recipe__: true,
104
+ __name__: 'button',
105
+ __getCompoundVariantCss__: buttonFn.__getCompoundVariantCss__,
106
+ raw: (props) => props,
107
+ variantKeys: buttonVariantKeys,
108
+ variantMap: buttonVariantMap,
109
+ merge(recipe) {
110
+ return mergeRecipes(this, recipe)
111
+ },
112
+ splitVariantProps(props) {
113
+ return splitProps(props, buttonVariantKeys)
114
+ },
115
+ getVariantProps: buttonFn.getVariantProps,
116
+ })
@@ -0,0 +1,28 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface CheckboxVariant {
6
+ size: "md"
7
+ }
8
+
9
+ type CheckboxVariantMap = {
10
+ [key in keyof CheckboxVariant]: Array<CheckboxVariant[key]>
11
+ }
12
+
13
+ export type CheckboxVariantProps = {
14
+ [key in keyof CheckboxVariant]?: ConditionalValue<CheckboxVariant[key]> | undefined
15
+ }
16
+
17
+ export interface CheckboxRecipe {
18
+ __type: CheckboxVariantProps
19
+ (props?: CheckboxVariantProps): Pretty<Record<"root" | "label" | "control" | "indicator", string>>
20
+ raw: (props?: CheckboxVariantProps) => CheckboxVariantProps
21
+ variantMap: CheckboxVariantMap
22
+ variantKeys: Array<keyof CheckboxVariant>
23
+ splitVariantProps<Props extends CheckboxVariantProps>(props: Props): [CheckboxVariantProps, Pretty<DistributiveOmit<Props, keyof CheckboxVariantProps>>]
24
+ getVariantProps: (props?: CheckboxVariantProps) => CheckboxVariantProps
25
+ }
26
+
27
+
28
+ export declare const checkbox: CheckboxRecipe
@@ -0,0 +1,52 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe } from './create-recipe.mjs';
3
+
4
+ const checkboxDefaultVariants = {
5
+ "size": "md"
6
+ }
7
+ const checkboxCompoundVariants = []
8
+
9
+ const checkboxSlotNames = [
10
+ [
11
+ "root",
12
+ "checkbox__root"
13
+ ],
14
+ [
15
+ "label",
16
+ "checkbox__label"
17
+ ],
18
+ [
19
+ "control",
20
+ "checkbox__control"
21
+ ],
22
+ [
23
+ "indicator",
24
+ "checkbox__indicator"
25
+ ]
26
+ ]
27
+ const checkboxSlotFns = /* @__PURE__ */ checkboxSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, checkboxDefaultVariants, getSlotCompoundVariant(checkboxCompoundVariants, slotName))])
28
+
29
+ const checkboxFn = memo((props = {}) => {
30
+ return Object.fromEntries(checkboxSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
31
+ })
32
+
33
+ const checkboxVariantKeys = [
34
+ "size"
35
+ ]
36
+ const getVariantProps = (variants) => ({ ...checkboxDefaultVariants, ...compact(variants) })
37
+
38
+ export const checkbox = /* @__PURE__ */ Object.assign(checkboxFn, {
39
+ __recipe__: false,
40
+ __name__: 'checkbox',
41
+ raw: (props) => props,
42
+ variantKeys: checkboxVariantKeys,
43
+ variantMap: {
44
+ "size": [
45
+ "md"
46
+ ]
47
+ },
48
+ splitVariantProps(props) {
49
+ return splitProps(props, checkboxVariantKeys)
50
+ },
51
+ getVariantProps
52
+ })