@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.
Files changed (108) hide show
  1. package/README.md +411 -16
  2. package/dist/index.cjs +776 -145
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +21793 -151
  5. package/dist/index.d.ts +21793 -151
  6. package/dist/index.js +753 -142
  7. package/dist/index.js.map +1 -1
  8. package/package.json +10 -7
  9. package/styled-system/css/conditions.mjs +1 -1
  10. package/styled-system/css/css.mjs +1 -1
  11. package/styled-system/css/sva.mjs +9 -4
  12. package/styled-system/helpers.mjs +12 -20
  13. package/styled-system/jsx/create-style-context.d.ts +54 -0
  14. package/styled-system/jsx/create-style-context.mjs +118 -0
  15. package/styled-system/jsx/factory.mjs +14 -5
  16. package/styled-system/jsx/index.d.ts +1 -0
  17. package/styled-system/jsx/index.mjs +1 -0
  18. package/styled-system/jsx/is-valid-prop.mjs +2 -2
  19. package/styled-system/patterns/aspect-ratio.d.ts +0 -1
  20. package/styled-system/patterns/bleed.d.ts +0 -1
  21. package/styled-system/patterns/box.d.ts +0 -1
  22. package/styled-system/patterns/center.d.ts +0 -1
  23. package/styled-system/patterns/circle.d.ts +0 -1
  24. package/styled-system/patterns/container.d.ts +0 -1
  25. package/styled-system/patterns/cq.d.ts +0 -1
  26. package/styled-system/patterns/divider.d.ts +1 -2
  27. package/styled-system/patterns/flex.d.ts +0 -1
  28. package/styled-system/patterns/float.d.ts +1 -2
  29. package/styled-system/patterns/grid-item.d.ts +0 -1
  30. package/styled-system/patterns/grid.d.ts +0 -1
  31. package/styled-system/patterns/grid.mjs +1 -1
  32. package/styled-system/patterns/hstack.d.ts +0 -1
  33. package/styled-system/patterns/hstack.mjs +1 -1
  34. package/styled-system/patterns/link-overlay.d.ts +0 -1
  35. package/styled-system/patterns/spacer.d.ts +0 -1
  36. package/styled-system/patterns/square.d.ts +0 -1
  37. package/styled-system/patterns/stack.d.ts +0 -1
  38. package/styled-system/patterns/stack.mjs +1 -1
  39. package/styled-system/patterns/visually-hidden.d.ts +0 -1
  40. package/styled-system/patterns/vstack.d.ts +0 -1
  41. package/styled-system/patterns/vstack.mjs +1 -1
  42. package/styled-system/patterns/wrap.d.ts +0 -1
  43. package/styled-system/patterns/wrap.mjs +1 -1
  44. package/styled-system/recipes/absolute-center.d.ts +34 -0
  45. package/styled-system/recipes/absolute-center.mjs +32 -0
  46. package/styled-system/recipes/accordion.d.ts +38 -0
  47. package/styled-system/recipes/accordion.mjs +67 -0
  48. package/styled-system/recipes/avatar.d.ts +42 -0
  49. package/styled-system/recipes/avatar.mjs +71 -0
  50. package/styled-system/recipes/badge.d.ts +38 -0
  51. package/styled-system/recipes/badge.mjs +41 -0
  52. package/styled-system/recipes/button.d.ts +6 -7
  53. package/styled-system/recipes/button.mjs +11 -7
  54. package/styled-system/recipes/card.d.ts +6 -11
  55. package/styled-system/recipes/card.mjs +50 -23
  56. package/styled-system/recipes/checkbox.d.ts +38 -0
  57. package/styled-system/recipes/checkbox.mjs +68 -0
  58. package/styled-system/recipes/dialog.d.ts +13 -6
  59. package/styled-system/recipes/dialog.mjs +35 -3
  60. package/styled-system/recipes/drawer.d.ts +38 -0
  61. package/styled-system/recipes/drawer.mjs +90 -0
  62. package/styled-system/recipes/field.d.ts +31 -0
  63. package/styled-system/recipes/field.mjs +61 -0
  64. package/styled-system/recipes/group.d.ts +36 -0
  65. package/styled-system/recipes/group.mjs +72 -0
  66. package/styled-system/recipes/index.d.ts +21 -3
  67. package/styled-system/recipes/index.mjs +21 -3
  68. package/styled-system/recipes/input.d.ts +6 -8
  69. package/styled-system/recipes/input.mjs +12 -9
  70. package/styled-system/recipes/popover.d.ts +31 -0
  71. package/styled-system/recipes/popover.mjs +81 -0
  72. package/styled-system/recipes/progress.d.ts +44 -0
  73. package/styled-system/recipes/progress.mjs +98 -0
  74. package/styled-system/recipes/radio-group.d.ts +38 -0
  75. package/styled-system/recipes/radio-group.mjs +68 -0
  76. package/styled-system/recipes/select.d.ts +38 -0
  77. package/styled-system/recipes/select.mjs +111 -0
  78. package/styled-system/recipes/skeleton.d.ts +39 -0
  79. package/styled-system/recipes/skeleton.mjs +40 -0
  80. package/styled-system/recipes/slider.d.ts +42 -0
  81. package/styled-system/recipes/slider.mjs +94 -0
  82. package/styled-system/recipes/spinner.d.ts +34 -0
  83. package/styled-system/recipes/spinner.mjs +36 -0
  84. package/styled-system/recipes/switch-component.d.ts +38 -0
  85. package/styled-system/recipes/switch-component.mjs +65 -0
  86. package/styled-system/recipes/tabs.d.ts +39 -0
  87. package/styled-system/recipes/tabs.mjs +71 -0
  88. package/styled-system/recipes/textarea.d.ts +38 -0
  89. package/styled-system/recipes/textarea.mjs +41 -0
  90. package/styled-system/recipes/toast.d.ts +31 -0
  91. package/styled-system/recipes/toast.mjs +53 -0
  92. package/styled-system/recipes/tooltip.d.ts +31 -0
  93. package/styled-system/recipes/tooltip.mjs +49 -0
  94. package/styled-system/tokens/index.mjs +3483 -635
  95. package/styled-system/tokens/tokens.d.ts +31 -19
  96. package/styled-system/types/composition.d.ts +83 -23
  97. package/styled-system/types/conditions.d.ts +15 -11
  98. package/styled-system/types/jsx.d.ts +27 -10
  99. package/styled-system/types/pattern.d.ts +4 -4
  100. package/styled-system/types/prop-type.d.ts +30 -3
  101. package/styled-system/types/style-props.d.ts +262 -225
  102. package/styled-system/types/system-types.d.ts +162 -2
  103. package/styled-system/recipes/icon-button.d.ts +0 -39
  104. package/styled-system/recipes/icon-button.mjs +0 -39
  105. package/styled-system/recipes/switch-control.d.ts +0 -35
  106. package/styled-system/recipes/switch-control.mjs +0 -53
  107. package/styled-system/recipes/switch.d.ts +0 -35
  108. package/styled-system/recipes/switch.mjs +0 -53
@@ -0,0 +1,94 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe } from './create-recipe.mjs';
3
+
4
+ const sliderDefaultVariants = {
5
+ "size": "md",
6
+ "variant": "outline",
7
+ "orientation": "horizontal"
8
+ }
9
+ const sliderCompoundVariants = []
10
+
11
+ const sliderSlotNames = [
12
+ [
13
+ "root",
14
+ "slider__root"
15
+ ],
16
+ [
17
+ "label",
18
+ "slider__label"
19
+ ],
20
+ [
21
+ "thumb",
22
+ "slider__thumb"
23
+ ],
24
+ [
25
+ "valueText",
26
+ "slider__valueText"
27
+ ],
28
+ [
29
+ "track",
30
+ "slider__track"
31
+ ],
32
+ [
33
+ "range",
34
+ "slider__range"
35
+ ],
36
+ [
37
+ "control",
38
+ "slider__control"
39
+ ],
40
+ [
41
+ "markerGroup",
42
+ "slider__markerGroup"
43
+ ],
44
+ [
45
+ "marker",
46
+ "slider__marker"
47
+ ],
48
+ [
49
+ "draggingIndicator",
50
+ "slider__draggingIndicator"
51
+ ],
52
+ [
53
+ "markerIndicator",
54
+ "slider__markerIndicator"
55
+ ]
56
+ ]
57
+ const sliderSlotFns = /* @__PURE__ */ sliderSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, sliderDefaultVariants, getSlotCompoundVariant(sliderCompoundVariants, slotName))])
58
+
59
+ const sliderFn = memo((props = {}) => {
60
+ return Object.fromEntries(sliderSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
61
+ })
62
+
63
+ const sliderVariantKeys = [
64
+ "size",
65
+ "variant",
66
+ "orientation"
67
+ ]
68
+ const getVariantProps = (variants) => ({ ...sliderDefaultVariants, ...compact(variants) })
69
+
70
+ export const slider = /* @__PURE__ */ Object.assign(sliderFn, {
71
+ __recipe__: false,
72
+ __name__: 'slider',
73
+ raw: (props) => props,
74
+ classNameMap: {},
75
+ variantKeys: sliderVariantKeys,
76
+ variantMap: {
77
+ "size": [
78
+ "sm",
79
+ "md",
80
+ "lg"
81
+ ],
82
+ "variant": [
83
+ "outline"
84
+ ],
85
+ "orientation": [
86
+ "vertical",
87
+ "horizontal"
88
+ ]
89
+ },
90
+ splitVariantProps(props) {
91
+ return splitProps(props, sliderVariantKeys)
92
+ },
93
+ getVariantProps
94
+ })
@@ -0,0 +1,34 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface SpinnerVariant {
6
+ /**
7
+ * @default "md"
8
+ */
9
+ size: "inherit" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl"
10
+ }
11
+
12
+ type SpinnerVariantMap = {
13
+ [key in keyof SpinnerVariant]: Array<SpinnerVariant[key]>
14
+ }
15
+
16
+
17
+
18
+ export type SpinnerVariantProps = {
19
+ [key in keyof SpinnerVariant]?: ConditionalValue<SpinnerVariant[key]> | undefined
20
+ }
21
+
22
+ export interface SpinnerRecipe {
23
+
24
+ __type: SpinnerVariantProps
25
+ (props?: SpinnerVariantProps): string
26
+ raw: (props?: SpinnerVariantProps) => SpinnerVariantProps
27
+ variantMap: SpinnerVariantMap
28
+ variantKeys: Array<keyof SpinnerVariant>
29
+ splitVariantProps<Props extends SpinnerVariantProps>(props: Props): [SpinnerVariantProps, Pretty<DistributiveOmit<Props, keyof SpinnerVariantProps>>]
30
+ getVariantProps: (props?: SpinnerVariantProps) => SpinnerVariantProps
31
+ }
32
+
33
+
34
+ export declare const spinner: SpinnerRecipe
@@ -0,0 +1,36 @@
1
+ import { memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe, mergeRecipes } from './create-recipe.mjs';
3
+
4
+ const spinnerFn = /* @__PURE__ */ createRecipe('spinner', {
5
+ "size": "md"
6
+ }, [])
7
+
8
+ const spinnerVariantMap = {
9
+ "size": [
10
+ "inherit",
11
+ "xs",
12
+ "sm",
13
+ "md",
14
+ "lg",
15
+ "xl",
16
+ "2xl"
17
+ ]
18
+ }
19
+
20
+ const spinnerVariantKeys = Object.keys(spinnerVariantMap)
21
+
22
+ export const spinner = /* @__PURE__ */ Object.assign(memo(spinnerFn.recipeFn), {
23
+ __recipe__: true,
24
+ __name__: 'spinner',
25
+ __getCompoundVariantCss__: spinnerFn.__getCompoundVariantCss__,
26
+ raw: (props) => props,
27
+ variantKeys: spinnerVariantKeys,
28
+ variantMap: spinnerVariantMap,
29
+ merge(recipe) {
30
+ return mergeRecipes(this, recipe)
31
+ },
32
+ splitVariantProps(props) {
33
+ return splitProps(props, spinnerVariantKeys)
34
+ },
35
+ getVariantProps: spinnerFn.getVariantProps,
36
+ })
@@ -0,0 +1,38 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface SwitchComponentVariant {
6
+ /**
7
+ * @default "solid"
8
+ */
9
+ variant: "solid"
10
+ /**
11
+ * @default "md"
12
+ */
13
+ size: "xs" | "sm" | "md" | "lg"
14
+ }
15
+
16
+ type SwitchComponentVariantMap = {
17
+ [key in keyof SwitchComponentVariant]: Array<SwitchComponentVariant[key]>
18
+ }
19
+
20
+ type SwitchComponentSlot = "root" | "label" | "control" | "thumb" | "indicator"
21
+
22
+ export type SwitchComponentVariantProps = {
23
+ [key in keyof SwitchComponentVariant]?: ConditionalValue<SwitchComponentVariant[key]> | undefined
24
+ }
25
+
26
+ export interface SwitchComponentRecipe {
27
+ __slot: SwitchComponentSlot
28
+ __type: SwitchComponentVariantProps
29
+ (props?: SwitchComponentVariantProps): Pretty<Record<SwitchComponentSlot, string>>
30
+ raw: (props?: SwitchComponentVariantProps) => SwitchComponentVariantProps
31
+ variantMap: SwitchComponentVariantMap
32
+ variantKeys: Array<keyof SwitchComponentVariant>
33
+ splitVariantProps<Props extends SwitchComponentVariantProps>(props: Props): [SwitchComponentVariantProps, Pretty<DistributiveOmit<Props, keyof SwitchComponentVariantProps>>]
34
+ getVariantProps: (props?: SwitchComponentVariantProps) => SwitchComponentVariantProps
35
+ }
36
+
37
+
38
+ export declare const switchComponent: SwitchComponentRecipe
@@ -0,0 +1,65 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe } from './create-recipe.mjs';
3
+
4
+ const switchComponentDefaultVariants = {
5
+ "variant": "solid",
6
+ "size": "md"
7
+ }
8
+ const switchComponentCompoundVariants = []
9
+
10
+ const switchComponentSlotNames = [
11
+ [
12
+ "root",
13
+ "switchComponent__root"
14
+ ],
15
+ [
16
+ "label",
17
+ "switchComponent__label"
18
+ ],
19
+ [
20
+ "control",
21
+ "switchComponent__control"
22
+ ],
23
+ [
24
+ "thumb",
25
+ "switchComponent__thumb"
26
+ ],
27
+ [
28
+ "indicator",
29
+ "switchComponent__indicator"
30
+ ]
31
+ ]
32
+ const switchComponentSlotFns = /* @__PURE__ */ switchComponentSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, switchComponentDefaultVariants, getSlotCompoundVariant(switchComponentCompoundVariants, slotName))])
33
+
34
+ const switchComponentFn = memo((props = {}) => {
35
+ return Object.fromEntries(switchComponentSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
36
+ })
37
+
38
+ const switchComponentVariantKeys = [
39
+ "variant",
40
+ "size"
41
+ ]
42
+ const getVariantProps = (variants) => ({ ...switchComponentDefaultVariants, ...compact(variants) })
43
+
44
+ export const switchComponent = /* @__PURE__ */ Object.assign(switchComponentFn, {
45
+ __recipe__: false,
46
+ __name__: 'switchComponent',
47
+ raw: (props) => props,
48
+ classNameMap: {},
49
+ variantKeys: switchComponentVariantKeys,
50
+ variantMap: {
51
+ "variant": [
52
+ "solid"
53
+ ],
54
+ "size": [
55
+ "xs",
56
+ "sm",
57
+ "md",
58
+ "lg"
59
+ ]
60
+ },
61
+ splitVariantProps(props) {
62
+ return splitProps(props, switchComponentVariantKeys)
63
+ },
64
+ getVariantProps
65
+ })
@@ -0,0 +1,39 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface TabsVariant {
6
+ /**
7
+ * @default "md"
8
+ */
9
+ size: "xs" | "sm" | "md" | "lg"
10
+ /**
11
+ * @default "line"
12
+ */
13
+ variant: "line" | "subtle" | "enclosed"
14
+ fitted: boolean
15
+ }
16
+
17
+ type TabsVariantMap = {
18
+ [key in keyof TabsVariant]: Array<TabsVariant[key]>
19
+ }
20
+
21
+ type TabsSlot = "root" | "list" | "trigger" | "content" | "indicator"
22
+
23
+ export type TabsVariantProps = {
24
+ [key in keyof TabsVariant]?: ConditionalValue<TabsVariant[key]> | undefined
25
+ }
26
+
27
+ export interface TabsRecipe {
28
+ __slot: TabsSlot
29
+ __type: TabsVariantProps
30
+ (props?: TabsVariantProps): Pretty<Record<TabsSlot, string>>
31
+ raw: (props?: TabsVariantProps) => TabsVariantProps
32
+ variantMap: TabsVariantMap
33
+ variantKeys: Array<keyof TabsVariant>
34
+ splitVariantProps<Props extends TabsVariantProps>(props: Props): [TabsVariantProps, Pretty<DistributiveOmit<Props, keyof TabsVariantProps>>]
35
+ getVariantProps: (props?: TabsVariantProps) => TabsVariantProps
36
+ }
37
+
38
+
39
+ export declare const tabs: TabsRecipe
@@ -0,0 +1,71 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe } from './create-recipe.mjs';
3
+
4
+ const tabsDefaultVariants = {
5
+ "size": "md",
6
+ "variant": "line"
7
+ }
8
+ const tabsCompoundVariants = []
9
+
10
+ const tabsSlotNames = [
11
+ [
12
+ "root",
13
+ "tabs__root"
14
+ ],
15
+ [
16
+ "list",
17
+ "tabs__list"
18
+ ],
19
+ [
20
+ "trigger",
21
+ "tabs__trigger"
22
+ ],
23
+ [
24
+ "content",
25
+ "tabs__content"
26
+ ],
27
+ [
28
+ "indicator",
29
+ "tabs__indicator"
30
+ ]
31
+ ]
32
+ const tabsSlotFns = /* @__PURE__ */ tabsSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, tabsDefaultVariants, getSlotCompoundVariant(tabsCompoundVariants, slotName))])
33
+
34
+ const tabsFn = memo((props = {}) => {
35
+ return Object.fromEntries(tabsSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
36
+ })
37
+
38
+ const tabsVariantKeys = [
39
+ "size",
40
+ "variant",
41
+ "fitted"
42
+ ]
43
+ const getVariantProps = (variants) => ({ ...tabsDefaultVariants, ...compact(variants) })
44
+
45
+ export const tabs = /* @__PURE__ */ Object.assign(tabsFn, {
46
+ __recipe__: false,
47
+ __name__: 'tabs',
48
+ raw: (props) => props,
49
+ classNameMap: {},
50
+ variantKeys: tabsVariantKeys,
51
+ variantMap: {
52
+ "size": [
53
+ "xs",
54
+ "sm",
55
+ "md",
56
+ "lg"
57
+ ],
58
+ "variant": [
59
+ "line",
60
+ "subtle",
61
+ "enclosed"
62
+ ],
63
+ "fitted": [
64
+ "true"
65
+ ]
66
+ },
67
+ splitVariantProps(props) {
68
+ return splitProps(props, tabsVariantKeys)
69
+ },
70
+ getVariantProps
71
+ })
@@ -0,0 +1,38 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface TextareaVariant {
6
+ /**
7
+ * @default "surface"
8
+ */
9
+ variant: "outline" | "surface" | "subtle" | "flushed"
10
+ /**
11
+ * @default "md"
12
+ */
13
+ size: "xs" | "sm" | "md" | "lg" | "xl"
14
+ }
15
+
16
+ type TextareaVariantMap = {
17
+ [key in keyof TextareaVariant]: Array<TextareaVariant[key]>
18
+ }
19
+
20
+
21
+
22
+ export type TextareaVariantProps = {
23
+ [key in keyof TextareaVariant]?: ConditionalValue<TextareaVariant[key]> | undefined
24
+ }
25
+
26
+ export interface TextareaRecipe {
27
+
28
+ __type: TextareaVariantProps
29
+ (props?: TextareaVariantProps): string
30
+ raw: (props?: TextareaVariantProps) => TextareaVariantProps
31
+ variantMap: TextareaVariantMap
32
+ variantKeys: Array<keyof TextareaVariant>
33
+ splitVariantProps<Props extends TextareaVariantProps>(props: Props): [TextareaVariantProps, Pretty<DistributiveOmit<Props, keyof TextareaVariantProps>>]
34
+ getVariantProps: (props?: TextareaVariantProps) => TextareaVariantProps
35
+ }
36
+
37
+
38
+ export declare const textarea: TextareaRecipe
@@ -0,0 +1,41 @@
1
+ import { memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe, mergeRecipes } from './create-recipe.mjs';
3
+
4
+ const textareaFn = /* @__PURE__ */ createRecipe('textarea', {
5
+ "size": "md",
6
+ "variant": "surface"
7
+ }, [])
8
+
9
+ const textareaVariantMap = {
10
+ "variant": [
11
+ "outline",
12
+ "surface",
13
+ "subtle",
14
+ "flushed"
15
+ ],
16
+ "size": [
17
+ "xs",
18
+ "sm",
19
+ "md",
20
+ "lg",
21
+ "xl"
22
+ ]
23
+ }
24
+
25
+ const textareaVariantKeys = Object.keys(textareaVariantMap)
26
+
27
+ export const textarea = /* @__PURE__ */ Object.assign(memo(textareaFn.recipeFn), {
28
+ __recipe__: true,
29
+ __name__: 'textarea',
30
+ __getCompoundVariantCss__: textareaFn.__getCompoundVariantCss__,
31
+ raw: (props) => props,
32
+ variantKeys: textareaVariantKeys,
33
+ variantMap: textareaVariantMap,
34
+ merge(recipe) {
35
+ return mergeRecipes(this, recipe)
36
+ },
37
+ splitVariantProps(props) {
38
+ return splitProps(props, textareaVariantKeys)
39
+ },
40
+ getVariantProps: textareaFn.getVariantProps,
41
+ })
@@ -0,0 +1,31 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface ToastVariant {
6
+
7
+ }
8
+
9
+ type ToastVariantMap = {
10
+ [key in keyof ToastVariant]: Array<ToastVariant[key]>
11
+ }
12
+
13
+ type ToastSlot = "group" | "root" | "title" | "description" | "actionTrigger" | "closeTrigger"
14
+
15
+ export type ToastVariantProps = {
16
+ [key in keyof ToastVariant]?: ConditionalValue<ToastVariant[key]> | undefined
17
+ }
18
+
19
+ export interface ToastRecipe {
20
+ __slot: ToastSlot
21
+ __type: ToastVariantProps
22
+ (props?: ToastVariantProps): Pretty<Record<ToastSlot, string>>
23
+ raw: (props?: ToastVariantProps) => ToastVariantProps
24
+ variantMap: ToastVariantMap
25
+ variantKeys: Array<keyof ToastVariant>
26
+ splitVariantProps<Props extends ToastVariantProps>(props: Props): [ToastVariantProps, Pretty<DistributiveOmit<Props, keyof ToastVariantProps>>]
27
+ getVariantProps: (props?: ToastVariantProps) => ToastVariantProps
28
+ }
29
+
30
+
31
+ export declare const toast: ToastRecipe
@@ -0,0 +1,53 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe } from './create-recipe.mjs';
3
+
4
+ const toastDefaultVariants = {}
5
+ const toastCompoundVariants = []
6
+
7
+ const toastSlotNames = [
8
+ [
9
+ "group",
10
+ "toast__group"
11
+ ],
12
+ [
13
+ "root",
14
+ "toast__root"
15
+ ],
16
+ [
17
+ "title",
18
+ "toast__title"
19
+ ],
20
+ [
21
+ "description",
22
+ "toast__description"
23
+ ],
24
+ [
25
+ "actionTrigger",
26
+ "toast__actionTrigger"
27
+ ],
28
+ [
29
+ "closeTrigger",
30
+ "toast__closeTrigger"
31
+ ]
32
+ ]
33
+ const toastSlotFns = /* @__PURE__ */ toastSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, toastDefaultVariants, getSlotCompoundVariant(toastCompoundVariants, slotName))])
34
+
35
+ const toastFn = memo((props = {}) => {
36
+ return Object.fromEntries(toastSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
37
+ })
38
+
39
+ const toastVariantKeys = []
40
+ const getVariantProps = (variants) => ({ ...toastDefaultVariants, ...compact(variants) })
41
+
42
+ export const toast = /* @__PURE__ */ Object.assign(toastFn, {
43
+ __recipe__: false,
44
+ __name__: 'toast',
45
+ raw: (props) => props,
46
+ classNameMap: {},
47
+ variantKeys: toastVariantKeys,
48
+ variantMap: {},
49
+ splitVariantProps(props) {
50
+ return splitProps(props, toastVariantKeys)
51
+ },
52
+ getVariantProps
53
+ })
@@ -0,0 +1,31 @@
1
+ /* eslint-disable */
2
+ import type { ConditionalValue } from '../types/index';
3
+ import type { DistributiveOmit, Pretty } from '../types/system-types';
4
+
5
+ interface TooltipVariant {
6
+
7
+ }
8
+
9
+ type TooltipVariantMap = {
10
+ [key in keyof TooltipVariant]: Array<TooltipVariant[key]>
11
+ }
12
+
13
+ type TooltipSlot = "trigger" | "arrow" | "arrowTip" | "positioner" | "content"
14
+
15
+ export type TooltipVariantProps = {
16
+ [key in keyof TooltipVariant]?: ConditionalValue<TooltipVariant[key]> | undefined
17
+ }
18
+
19
+ export interface TooltipRecipe {
20
+ __slot: TooltipSlot
21
+ __type: TooltipVariantProps
22
+ (props?: TooltipVariantProps): Pretty<Record<TooltipSlot, string>>
23
+ raw: (props?: TooltipVariantProps) => TooltipVariantProps
24
+ variantMap: TooltipVariantMap
25
+ variantKeys: Array<keyof TooltipVariant>
26
+ splitVariantProps<Props extends TooltipVariantProps>(props: Props): [TooltipVariantProps, Pretty<DistributiveOmit<Props, keyof TooltipVariantProps>>]
27
+ getVariantProps: (props?: TooltipVariantProps) => TooltipVariantProps
28
+ }
29
+
30
+
31
+ export declare const tooltip: TooltipRecipe
@@ -0,0 +1,49 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
2
+ import { createRecipe } from './create-recipe.mjs';
3
+
4
+ const tooltipDefaultVariants = {}
5
+ const tooltipCompoundVariants = []
6
+
7
+ const tooltipSlotNames = [
8
+ [
9
+ "trigger",
10
+ "tooltip__trigger"
11
+ ],
12
+ [
13
+ "arrow",
14
+ "tooltip__arrow"
15
+ ],
16
+ [
17
+ "arrowTip",
18
+ "tooltip__arrowTip"
19
+ ],
20
+ [
21
+ "positioner",
22
+ "tooltip__positioner"
23
+ ],
24
+ [
25
+ "content",
26
+ "tooltip__content"
27
+ ]
28
+ ]
29
+ const tooltipSlotFns = /* @__PURE__ */ tooltipSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, tooltipDefaultVariants, getSlotCompoundVariant(tooltipCompoundVariants, slotName))])
30
+
31
+ const tooltipFn = memo((props = {}) => {
32
+ return Object.fromEntries(tooltipSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
33
+ })
34
+
35
+ const tooltipVariantKeys = []
36
+ const getVariantProps = (variants) => ({ ...tooltipDefaultVariants, ...compact(variants) })
37
+
38
+ export const tooltip = /* @__PURE__ */ Object.assign(tooltipFn, {
39
+ __recipe__: false,
40
+ __name__: 'tooltip',
41
+ raw: (props) => props,
42
+ classNameMap: {},
43
+ variantKeys: tooltipVariantKeys,
44
+ variantMap: {},
45
+ splitVariantProps(props) {
46
+ return splitProps(props, tooltipVariantKeys)
47
+ },
48
+ getVariantProps
49
+ })