@becket-ui/tokens 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/LICENSE +21 -0
  2. package/dist/preset.d.ts +7 -0
  3. package/dist/preset.js +1846 -0
  4. package/dist/preset.js.map +1 -0
  5. package/index.css +3033 -0
  6. package/index.d.ts +10 -0
  7. package/index.mjs +13 -0
  8. package/package.json +108 -0
  9. package/styled-system/css/conditions.mjs +36 -0
  10. package/styled-system/css/css.d.ts +22 -0
  11. package/styled-system/css/css.mjs +45 -0
  12. package/styled-system/css/cva.d.ts +6 -0
  13. package/styled-system/css/cva.mjs +87 -0
  14. package/styled-system/css/cx.d.ts +5 -0
  15. package/styled-system/css/cx.mjs +15 -0
  16. package/styled-system/css/index.d.ts +5 -0
  17. package/styled-system/css/index.mjs +4 -0
  18. package/styled-system/css/sva.d.ts +4 -0
  19. package/styled-system/css/sva.mjs +46 -0
  20. package/styled-system/helpers.mjs +328 -0
  21. package/styled-system/jsx/aspect-ratio.d.ts +10 -0
  22. package/styled-system/jsx/aspect-ratio.mjs +14 -0
  23. package/styled-system/jsx/bleed.d.ts +10 -0
  24. package/styled-system/jsx/bleed.mjs +14 -0
  25. package/styled-system/jsx/box.d.ts +10 -0
  26. package/styled-system/jsx/box.mjs +14 -0
  27. package/styled-system/jsx/center.d.ts +10 -0
  28. package/styled-system/jsx/center.mjs +14 -0
  29. package/styled-system/jsx/circle.d.ts +10 -0
  30. package/styled-system/jsx/circle.mjs +14 -0
  31. package/styled-system/jsx/container.d.ts +10 -0
  32. package/styled-system/jsx/container.mjs +14 -0
  33. package/styled-system/jsx/cq.d.ts +10 -0
  34. package/styled-system/jsx/cq.mjs +14 -0
  35. package/styled-system/jsx/create-style-context.d.ts +54 -0
  36. package/styled-system/jsx/create-style-context.mjs +121 -0
  37. package/styled-system/jsx/divider.d.ts +10 -0
  38. package/styled-system/jsx/divider.mjs +14 -0
  39. package/styled-system/jsx/factory-helper.mjs +22 -0
  40. package/styled-system/jsx/factory.d.ts +3 -0
  41. package/styled-system/jsx/factory.mjs +89 -0
  42. package/styled-system/jsx/flex.d.ts +10 -0
  43. package/styled-system/jsx/flex.mjs +14 -0
  44. package/styled-system/jsx/float.d.ts +10 -0
  45. package/styled-system/jsx/float.mjs +14 -0
  46. package/styled-system/jsx/grid-item.d.ts +10 -0
  47. package/styled-system/jsx/grid-item.mjs +14 -0
  48. package/styled-system/jsx/grid.d.ts +10 -0
  49. package/styled-system/jsx/grid.mjs +14 -0
  50. package/styled-system/jsx/hstack.d.ts +10 -0
  51. package/styled-system/jsx/hstack.mjs +14 -0
  52. package/styled-system/jsx/index.d.ts +25 -0
  53. package/styled-system/jsx/index.mjs +23 -0
  54. package/styled-system/jsx/is-valid-prop.d.ts +11 -0
  55. package/styled-system/jsx/is-valid-prop.mjs +17 -0
  56. package/styled-system/jsx/link-overlay.d.ts +10 -0
  57. package/styled-system/jsx/link-overlay.mjs +14 -0
  58. package/styled-system/jsx/spacer.d.ts +10 -0
  59. package/styled-system/jsx/spacer.mjs +14 -0
  60. package/styled-system/jsx/square.d.ts +10 -0
  61. package/styled-system/jsx/square.mjs +14 -0
  62. package/styled-system/jsx/stack.d.ts +10 -0
  63. package/styled-system/jsx/stack.mjs +14 -0
  64. package/styled-system/jsx/visually-hidden.d.ts +10 -0
  65. package/styled-system/jsx/visually-hidden.mjs +14 -0
  66. package/styled-system/jsx/vstack.d.ts +10 -0
  67. package/styled-system/jsx/vstack.mjs +14 -0
  68. package/styled-system/jsx/wrap.d.ts +10 -0
  69. package/styled-system/jsx/wrap.mjs +14 -0
  70. package/styled-system/patterns/aspect-ratio.d.ts +20 -0
  71. package/styled-system/patterns/aspect-ratio.mjs +38 -0
  72. package/styled-system/patterns/bleed.d.ts +21 -0
  73. package/styled-system/patterns/bleed.mjs +24 -0
  74. package/styled-system/patterns/box.d.ts +20 -0
  75. package/styled-system/patterns/box.mjs +15 -0
  76. package/styled-system/patterns/center.d.ts +20 -0
  77. package/styled-system/patterns/center.mjs +21 -0
  78. package/styled-system/patterns/circle.d.ts +20 -0
  79. package/styled-system/patterns/circle.mjs +25 -0
  80. package/styled-system/patterns/container.d.ts +20 -0
  81. package/styled-system/patterns/container.mjs +21 -0
  82. package/styled-system/patterns/cq.d.ts +21 -0
  83. package/styled-system/patterns/cq.mjs +21 -0
  84. package/styled-system/patterns/divider.d.ts +22 -0
  85. package/styled-system/patterns/divider.mjs +25 -0
  86. package/styled-system/patterns/flex.d.ts +26 -0
  87. package/styled-system/patterns/flex.mjs +26 -0
  88. package/styled-system/patterns/float.d.ts +23 -0
  89. package/styled-system/patterns/float.mjs +52 -0
  90. package/styled-system/patterns/grid-item.d.ts +25 -0
  91. package/styled-system/patterns/grid-item.mjs +25 -0
  92. package/styled-system/patterns/grid.d.ts +24 -0
  93. package/styled-system/patterns/grid.mjs +27 -0
  94. package/styled-system/patterns/hstack.d.ts +21 -0
  95. package/styled-system/patterns/hstack.mjs +24 -0
  96. package/styled-system/patterns/index.d.ts +21 -0
  97. package/styled-system/patterns/index.mjs +20 -0
  98. package/styled-system/patterns/link-overlay.d.ts +20 -0
  99. package/styled-system/patterns/link-overlay.mjs +24 -0
  100. package/styled-system/patterns/spacer.d.ts +20 -0
  101. package/styled-system/patterns/spacer.mjs +25 -0
  102. package/styled-system/patterns/square.d.ts +20 -0
  103. package/styled-system/patterns/square.mjs +24 -0
  104. package/styled-system/patterns/stack.d.ts +23 -0
  105. package/styled-system/patterns/stack.mjs +24 -0
  106. package/styled-system/patterns/visually-hidden.d.ts +20 -0
  107. package/styled-system/patterns/visually-hidden.mjs +18 -0
  108. package/styled-system/patterns/vstack.d.ts +21 -0
  109. package/styled-system/patterns/vstack.mjs +24 -0
  110. package/styled-system/patterns/wrap.d.ts +24 -0
  111. package/styled-system/patterns/wrap.mjs +25 -0
  112. package/styled-system/recipes/badge.d.ts +48 -0
  113. package/styled-system/recipes/badge.mjs +91 -0
  114. package/styled-system/recipes/button.d.ts +52 -0
  115. package/styled-system/recipes/button.mjs +122 -0
  116. package/styled-system/recipes/card.d.ts +44 -0
  117. package/styled-system/recipes/card.mjs +76 -0
  118. package/styled-system/recipes/checkbox.d.ts +36 -0
  119. package/styled-system/recipes/checkbox.mjs +62 -0
  120. package/styled-system/recipes/create-recipe.mjs +82 -0
  121. package/styled-system/recipes/dialog.d.ts +33 -0
  122. package/styled-system/recipes/dialog.mjs +53 -0
  123. package/styled-system/recipes/drawer.d.ts +36 -0
  124. package/styled-system/recipes/drawer.mjs +62 -0
  125. package/styled-system/recipes/field.d.ts +40 -0
  126. package/styled-system/recipes/field.mjs +61 -0
  127. package/styled-system/recipes/heading.d.ts +40 -0
  128. package/styled-system/recipes/heading.mjs +54 -0
  129. package/styled-system/recipes/hide.d.ts +38 -0
  130. package/styled-system/recipes/hide.mjs +246 -0
  131. package/styled-system/recipes/index.d.ts +23 -0
  132. package/styled-system/recipes/index.mjs +22 -0
  133. package/styled-system/recipes/link.d.ts +40 -0
  134. package/styled-system/recipes/link.mjs +36 -0
  135. package/styled-system/recipes/menu.d.ts +33 -0
  136. package/styled-system/recipes/menu.mjs +45 -0
  137. package/styled-system/recipes/radio.d.ts +36 -0
  138. package/styled-system/recipes/radio.mjs +70 -0
  139. package/styled-system/recipes/select-recipe.d.ts +40 -0
  140. package/styled-system/recipes/select-recipe.mjs +37 -0
  141. package/styled-system/recipes/separator.d.ts +36 -0
  142. package/styled-system/recipes/separator.mjs +31 -0
  143. package/styled-system/recipes/spinner.d.ts +36 -0
  144. package/styled-system/recipes/spinner.mjs +32 -0
  145. package/styled-system/recipes/switch-recipe.d.ts +40 -0
  146. package/styled-system/recipes/switch-recipe.mjs +93 -0
  147. package/styled-system/recipes/table.d.ts +36 -0
  148. package/styled-system/recipes/table.mjs +70 -0
  149. package/styled-system/recipes/tabs.d.ts +33 -0
  150. package/styled-system/recipes/tabs.mjs +45 -0
  151. package/styled-system/recipes/tag.d.ts +48 -0
  152. package/styled-system/recipes/tag.mjs +89 -0
  153. package/styled-system/recipes/text-field-recipe.d.ts +40 -0
  154. package/styled-system/recipes/text-field-recipe.mjs +37 -0
  155. package/styled-system/recipes/textarea-recipe.d.ts +40 -0
  156. package/styled-system/recipes/textarea-recipe.mjs +37 -0
  157. package/styled-system/recipes/tooltip.d.ts +36 -0
  158. package/styled-system/recipes/tooltip.mjs +33 -0
  159. package/styled-system/styles.css +2986 -0
  160. package/styled-system/tokens/index.d.ts +9 -0
  161. package/styled-system/tokens/index.mjs +2128 -0
  162. package/styled-system/tokens/tokens.d.ts +63 -0
  163. package/styled-system/types/composition.d.ts +227 -0
  164. package/styled-system/types/conditions.d.ts +310 -0
  165. package/styled-system/types/csstype.d.ts +22570 -0
  166. package/styled-system/types/global.d.ts +20 -0
  167. package/styled-system/types/index.d.ts +8 -0
  168. package/styled-system/types/jsx.d.ts +69 -0
  169. package/styled-system/types/parts.d.ts +8 -0
  170. package/styled-system/types/pattern.d.ts +78 -0
  171. package/styled-system/types/prop-type.d.ts +251 -0
  172. package/styled-system/types/recipe.d.ts +181 -0
  173. package/styled-system/types/selectors.d.ts +59 -0
  174. package/styled-system/types/static-css.d.ts +56 -0
  175. package/styled-system/types/style-props.d.ts +8089 -0
  176. package/styled-system/types/system-types.d.ts +151 -0
  177. package/theme/index.d.ts +56 -0
  178. package/theme/index.mjs +168 -0
  179. package/theme.example.css +68 -0
@@ -0,0 +1,27 @@
1
+ import { getPatternStyles, patternFns } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const gridConfig = {
5
+ transform(props, { map, isCssUnit }) {
6
+ const { columnGap, rowGap, gap, columns, minChildWidth, ...rest } = props;
7
+ const getValue = (v) => isCssUnit(v) ? v : `token(sizes.${v}, ${v})`;
8
+ return {
9
+ display: "grid",
10
+ gridTemplateColumns: columns != null ? map(columns, (v) => `repeat(${v}, minmax(0, 1fr))`) : minChildWidth != null ? map(minChildWidth, (v) => `repeat(auto-fit, minmax(${getValue(v)}, 1fr))`) : void 0,
11
+ gap,
12
+ columnGap,
13
+ rowGap,
14
+ ...rest
15
+ };
16
+ },
17
+ defaultValues(props) {
18
+ return { gap: props.columnGap || props.rowGap ? void 0 : "8px" };
19
+ }}
20
+
21
+ export const getGridStyle = (styles = {}) => {
22
+ const _styles = getPatternStyles(gridConfig, styles)
23
+ return gridConfig.transform(_styles, patternFns)
24
+ }
25
+
26
+ export const grid = (styles) => css(getGridStyle(styles))
27
+ grid.raw = getGridStyle
@@ -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 HstackProperties {
9
+ justify?: SystemProperties["justifyContent"]
10
+ gap?: SystemProperties["gap"]
11
+ }
12
+
13
+ interface HstackStyles extends HstackProperties, DistributiveOmit<SystemStyleObject, keyof HstackProperties > {}
14
+
15
+ interface HstackPatternFn {
16
+ (styles?: HstackStyles): string
17
+ raw: (styles?: HstackStyles) => SystemStyleObject
18
+ }
19
+
20
+
21
+ export declare const hstack: HstackPatternFn;
@@ -0,0 +1,24 @@
1
+ import { getPatternStyles, patternFns } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const hstackConfig = {
5
+ transform(props) {
6
+ const { justify, gap, ...rest } = props;
7
+ return {
8
+ display: "flex",
9
+ alignItems: "center",
10
+ justifyContent: justify,
11
+ gap,
12
+ flexDirection: "row",
13
+ ...rest
14
+ };
15
+ },
16
+ defaultValues:{gap:'8px'}}
17
+
18
+ export const getHstackStyle = (styles = {}) => {
19
+ const _styles = getPatternStyles(hstackConfig, styles)
20
+ return hstackConfig.transform(_styles, patternFns)
21
+ }
22
+
23
+ export const hstack = (styles) => css(getHstackStyle(styles))
24
+ hstack.raw = getHstackStyle
@@ -0,0 +1,21 @@
1
+ /* eslint-disable */
2
+ export * from './box';
3
+ export * from './flex';
4
+ export * from './stack';
5
+ export * from './vstack';
6
+ export * from './hstack';
7
+ export * from './spacer';
8
+ export * from './square';
9
+ export * from './circle';
10
+ export * from './center';
11
+ export * from './link-overlay';
12
+ export * from './aspect-ratio';
13
+ export * from './grid';
14
+ export * from './grid-item';
15
+ export * from './wrap';
16
+ export * from './container';
17
+ export * from './divider';
18
+ export * from './float';
19
+ export * from './bleed';
20
+ export * from './visually-hidden';
21
+ export * from './cq';
@@ -0,0 +1,20 @@
1
+ export * from './box.mjs';
2
+ export * from './flex.mjs';
3
+ export * from './stack.mjs';
4
+ export * from './vstack.mjs';
5
+ export * from './hstack.mjs';
6
+ export * from './spacer.mjs';
7
+ export * from './square.mjs';
8
+ export * from './circle.mjs';
9
+ export * from './center.mjs';
10
+ export * from './link-overlay.mjs';
11
+ export * from './aspect-ratio.mjs';
12
+ export * from './grid.mjs';
13
+ export * from './grid-item.mjs';
14
+ export * from './wrap.mjs';
15
+ export * from './container.mjs';
16
+ export * from './divider.mjs';
17
+ export * from './float.mjs';
18
+ export * from './bleed.mjs';
19
+ export * from './visually-hidden.mjs';
20
+ export * from './cq.mjs';
@@ -0,0 +1,20 @@
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
+ interface LinkOverlayStyles extends LinkOverlayProperties, DistributiveOmit<SystemStyleObject, keyof LinkOverlayProperties > {}
13
+
14
+ interface LinkOverlayPatternFn {
15
+ (styles?: LinkOverlayStyles): string
16
+ raw: (styles?: LinkOverlayStyles) => SystemStyleObject
17
+ }
18
+
19
+
20
+ export declare const linkOverlay: LinkOverlayPatternFn;
@@ -0,0 +1,24 @@
1
+ import { getPatternStyles, patternFns } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const linkOverlayConfig = {
5
+ transform(props) {
6
+ return {
7
+ _before: {
8
+ content: '""',
9
+ position: "absolute",
10
+ inset: "0",
11
+ zIndex: "0",
12
+ ...props["_before"]
13
+ },
14
+ ...props
15
+ };
16
+ }}
17
+
18
+ export const getLinkOverlayStyle = (styles = {}) => {
19
+ const _styles = getPatternStyles(linkOverlayConfig, styles)
20
+ return linkOverlayConfig.transform(_styles, patternFns)
21
+ }
22
+
23
+ export const linkOverlay = (styles) => css(getLinkOverlayStyle(styles))
24
+ linkOverlay.raw = getLinkOverlayStyle
@@ -0,0 +1,20 @@
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
+ interface SpacerStyles extends SpacerProperties, DistributiveOmit<SystemStyleObject, keyof SpacerProperties > {}
13
+
14
+ interface SpacerPatternFn {
15
+ (styles?: SpacerStyles): string
16
+ raw: (styles?: SpacerStyles) => SystemStyleObject
17
+ }
18
+
19
+
20
+ export declare const spacer: SpacerPatternFn;
@@ -0,0 +1,25 @@
1
+ import { getPatternStyles, patternFns } from '../helpers.mjs';
2
+ import { css } from '../css/index.mjs';
3
+
4
+ const spacerConfig = {
5
+ transform(props, { map, isCssUnit, isCssVar }) {
6
+ const { size, ...rest } = props;
7
+ return {
8
+ alignSelf: "stretch",
9
+ justifySelf: "stretch",
10
+ flex: map(size, (v) => {
11
+ if (v == null) return "1";
12
+ const val = isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
13
+ return `0 0 ${val}`;
14
+ }),
15
+ ...rest
16
+ };
17
+ }}
18
+
19
+ export const getSpacerStyle = (styles = {}) => {
20
+ const _styles = getPatternStyles(spacerConfig, styles)
21
+ return spacerConfig.transform(_styles, patternFns)
22
+ }
23
+
24
+ export const spacer = (styles) => css(getSpacerStyle(styles))
25
+ spacer.raw = getSpacerStyle
@@ -0,0 +1,20 @@
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
+ interface SquareStyles extends SquareProperties, DistributiveOmit<SystemStyleObject, keyof SquareProperties > {}
13
+
14
+ interface SquarePatternFn {
15
+ (styles?: SquareStyles): string
16
+ raw: (styles?: SquareStyles) => SystemStyleObject
17
+ }
18
+
19
+
20
+ 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(props) {
6
+ const { size, ...rest } = props;
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,23 @@
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
+ interface StackStyles extends StackProperties, DistributiveOmit<SystemStyleObject, keyof StackProperties > {}
16
+
17
+ interface StackPatternFn {
18
+ (styles?: StackStyles): string
19
+ raw: (styles?: StackStyles) => SystemStyleObject
20
+ }
21
+
22
+
23
+ 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(props) {
6
+ const { align, justify, direction, gap, ...rest } = props;
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:'8px'}}
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,20 @@
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
+ interface VisuallyHiddenStyles extends VisuallyHiddenProperties, DistributiveOmit<SystemStyleObject, keyof VisuallyHiddenProperties > {}
13
+
14
+ interface VisuallyHiddenPatternFn {
15
+ (styles?: VisuallyHiddenStyles): string
16
+ raw: (styles?: VisuallyHiddenStyles) => SystemStyleObject
17
+ }
18
+
19
+
20
+ 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(props) {
6
+ return {
7
+ srOnly: true,
8
+ ...props
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,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 VstackProperties {
9
+ justify?: SystemProperties["justifyContent"]
10
+ gap?: SystemProperties["gap"]
11
+ }
12
+
13
+ interface VstackStyles extends VstackProperties, DistributiveOmit<SystemStyleObject, keyof VstackProperties > {}
14
+
15
+ interface VstackPatternFn {
16
+ (styles?: VstackStyles): string
17
+ raw: (styles?: VstackStyles) => SystemStyleObject
18
+ }
19
+
20
+
21
+ 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(props) {
6
+ const { justify, gap, ...rest } = props;
7
+ return {
8
+ display: "flex",
9
+ alignItems: "center",
10
+ justifyContent: justify,
11
+ gap,
12
+ flexDirection: "column",
13
+ ...rest
14
+ };
15
+ },
16
+ defaultValues:{gap:'8px'}}
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,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 WrapProperties {
9
+ gap?: SystemProperties["gap"]
10
+ rowGap?: SystemProperties["gap"]
11
+ columnGap?: SystemProperties["gap"]
12
+ align?: SystemProperties["alignItems"]
13
+ justify?: SystemProperties["justifyContent"]
14
+ }
15
+
16
+ interface WrapStyles extends WrapProperties, DistributiveOmit<SystemStyleObject, keyof WrapProperties > {}
17
+
18
+ interface WrapPatternFn {
19
+ (styles?: WrapStyles): string
20
+ raw: (styles?: WrapStyles) => SystemStyleObject
21
+ }
22
+
23
+
24
+ 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(props) {
6
+ const { columnGap, rowGap, gap = columnGap || rowGap ? void 0 : "8px", align, justify, ...rest } = props;
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,48 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface BadgeVariant {
6
+ /**
7
+ * @default "md"
8
+ */
9
+ size: "sm" | "md" | "lg"
10
+ /**
11
+ * @default "neutral"
12
+ */
13
+ visual: "primary" | "secondary" | "neutral" | "outline"
14
+ /**
15
+ * @default "full"
16
+ */
17
+ borderRadius: "none" | "sm" | "md" | "lg" | "xl" | "full"
18
+ /**
19
+ * @default false
20
+ */
21
+ withGradient: boolean
22
+ }
23
+
24
+ type BadgeVariantMap = {
25
+ [key in keyof BadgeVariant]: Array<BadgeVariant[key]>
26
+ }
27
+
28
+
29
+
30
+ export type BadgeVariantProps = {
31
+ [key in keyof BadgeVariant]?: BadgeVariant[key] | undefined
32
+ }
33
+
34
+ export interface BadgeRecipe {
35
+
36
+ __type: BadgeVariantProps
37
+ (props?: BadgeVariantProps): string
38
+ raw: (props?: BadgeVariantProps) => BadgeVariantProps
39
+ variantMap: BadgeVariantMap
40
+ variantKeys: Array<keyof BadgeVariant>
41
+ splitVariantProps<Props extends BadgeVariantProps>(props: Props): [BadgeVariantProps, Pretty<DistributiveOmit<Props, keyof BadgeVariantProps>>]
42
+ getVariantProps: (props?: BadgeVariantProps) => BadgeVariantProps
43
+ }
44
+
45
+ /**
46
+ * Non-interactive status chip (Badge)
47
+ */
48
+ export declare const badge: BadgeRecipe
@@ -0,0 +1,91 @@
1
+ import { memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe, mergeRecipes } from './create-recipe.mjs';
3
+
4
+ const badgeFn = /* @__PURE__ */ createRecipe('badge', {
5
+ "size": "md",
6
+ "visual": "neutral",
7
+ "borderRadius": "full",
8
+ "withGradient": false
9
+ }, [
10
+ {
11
+ "withGradient": true,
12
+ "css": {
13
+ "borderWidth": "0px",
14
+ "borderStyle": "solid",
15
+ "borderColor": "transparent",
16
+ "backgroundColor": "transparent",
17
+ "backgroundImage": "var(--mav-label-gradient, {gradients.primary})",
18
+ "backgroundOrigin": "border-box",
19
+ "backgroundClip": "border-box",
20
+ "backgroundRepeat": "no-repeat",
21
+ "backgroundSize": "100% 100%",
22
+ "color": "var(--mav-label-color, {colors.text})"
23
+ }
24
+ },
25
+ {
26
+ "visual": "outline",
27
+ "withGradient": true,
28
+ "css": {
29
+ "borderWidth": "2px",
30
+ "borderStyle": "solid",
31
+ "borderColor": "transparent",
32
+ "backgroundImage": "linear-gradient({colors.background}, {colors.background}), var(--mav-label-gradient, {gradients.primary})",
33
+ "backgroundOrigin": "border-box",
34
+ "backgroundClip": "padding-box, border-box",
35
+ "color": "var(--mav-label-color, {colors.secondary})",
36
+ "textTransform": "uppercase"
37
+ }
38
+ },
39
+ {
40
+ "visual": "neutral",
41
+ "css": {
42
+ "_light": {
43
+ "bg": "var(--mav-label-bg, {colors.neutral.100})"
44
+ }
45
+ }
46
+ }
47
+ ])
48
+
49
+ const badgeVariantMap = {
50
+ "size": [
51
+ "sm",
52
+ "md",
53
+ "lg"
54
+ ],
55
+ "visual": [
56
+ "primary",
57
+ "secondary",
58
+ "neutral",
59
+ "outline"
60
+ ],
61
+ "borderRadius": [
62
+ "none",
63
+ "sm",
64
+ "md",
65
+ "lg",
66
+ "xl",
67
+ "full"
68
+ ],
69
+ "withGradient": [
70
+ "false",
71
+ "true"
72
+ ]
73
+ }
74
+
75
+ const badgeVariantKeys = Object.keys(badgeVariantMap)
76
+
77
+ export const badge = /* @__PURE__ */ Object.assign(memo(badgeFn.recipeFn), {
78
+ __recipe__: true,
79
+ __name__: 'badge',
80
+ __getCompoundVariantCss__: badgeFn.__getCompoundVariantCss__,
81
+ raw: (props) => props,
82
+ variantKeys: badgeVariantKeys,
83
+ variantMap: badgeVariantMap,
84
+ merge(recipe) {
85
+ return mergeRecipes(this, recipe)
86
+ },
87
+ splitVariantProps(props) {
88
+ return splitProps(props, badgeVariantKeys)
89
+ },
90
+ getVariantProps: badgeFn.getVariantProps,
91
+ })
@@ -0,0 +1,52 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface ButtonVariant {
6
+ /**
7
+ * @default "outline"
8
+ */
9
+ visual: "primary" | "secondary" | "neutral" | "outline"
10
+ /**
11
+ * @default "md"
12
+ */
13
+ size: "sm" | "md"
14
+ /**
15
+ * @default "md"
16
+ */
17
+ borderRadius: "none" | "sm" | "md" | "lg" | "xl" | "full"
18
+ /**
19
+ * @default false
20
+ */
21
+ withGradient: boolean
22
+ /**
23
+ * @default false
24
+ */
25
+ fullWidth: boolean
26
+ }
27
+
28
+ type ButtonVariantMap = {
29
+ [key in keyof ButtonVariant]: Array<ButtonVariant[key]>
30
+ }
31
+
32
+
33
+
34
+ export type ButtonVariantProps = {
35
+ [key in keyof ButtonVariant]?: ButtonVariant[key] | undefined
36
+ }
37
+
38
+ export interface ButtonRecipe {
39
+
40
+ __type: ButtonVariantProps
41
+ (props?: ButtonVariantProps): string
42
+ raw: (props?: ButtonVariantProps) => ButtonVariantProps
43
+ variantMap: ButtonVariantMap
44
+ variantKeys: Array<keyof ButtonVariant>
45
+ splitVariantProps<Props extends ButtonVariantProps>(props: Props): [ButtonVariantProps, Pretty<DistributiveOmit<Props, keyof ButtonVariantProps>>]
46
+ getVariantProps: (props?: ButtonVariantProps) => ButtonVariantProps
47
+ }
48
+
49
+ /**
50
+ * The styles for the Button component
51
+ */
52
+ export declare const button: ButtonRecipe