@saas-ui/react 3.0.0-next.43 → 3.0.0-next.47

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 (261) hide show
  1. package/dist/.tsbuildinfo.json +1 -1
  2. package/dist/colors.d.ts +1 -1
  3. package/dist/colors.js +1 -1
  4. package/dist/components/absolute-center/index.js +1 -0
  5. package/dist/components/action-bar/action-bar.js +1 -0
  6. package/dist/components/aspect-ratio/index.js +1 -0
  7. package/dist/components/blockquote/blockquote.js +1 -0
  8. package/dist/components/checkbox/checkbox.js +1 -0
  9. package/dist/components/checkbox-card/checkbox-card.js +1 -0
  10. package/dist/components/clipboard/clipboard.js +1 -0
  11. package/dist/components/close-button/close-button.js +1 -0
  12. package/dist/components/command/command.d.ts +1 -1
  13. package/dist/components/command/command.js +1 -0
  14. package/dist/components/dialog/dialog.js +1 -0
  15. package/dist/components/drawer/drawer.js +1 -0
  16. package/dist/components/empty-state/empty-state.js +1 -0
  17. package/dist/components/grid-list/grid-list.d.ts +1 -1
  18. package/dist/components/grid-list/grid-list.js +1 -0
  19. package/dist/components/hover-card/hover-card.js +1 -0
  20. package/dist/components/icon-button/icon-button.js +1 -0
  21. package/dist/components/info-tip/info-tip.js +1 -0
  22. package/dist/components/link/link.js +1 -0
  23. package/dist/components/loading-overlay/loading-overlay.js +1 -0
  24. package/dist/components/navbar/navbar.js +1 -0
  25. package/dist/components/number-input/number-input.js +1 -0
  26. package/dist/components/pagination/pagination.js +1 -0
  27. package/dist/components/persona/persona-composed.d.ts +1 -1
  28. package/dist/components/persona/persona.d.ts +1 -1
  29. package/dist/components/pin-input/pin-input.js +1 -0
  30. package/dist/components/popover/popover.js +1 -0
  31. package/dist/components/radio/radio.js +1 -0
  32. package/dist/components/radio-card/radio-card.js +1 -0
  33. package/dist/components/search-input/search-input.js +1 -0
  34. package/dist/components/sidebar/sidebar.js +1 -0
  35. package/dist/components/skeleton/skeleton.js +1 -0
  36. package/dist/components/slider/slider.js +1 -0
  37. package/dist/components/spinner/spinner.js +1 -0
  38. package/dist/components/stat/stat.js +1 -0
  39. package/dist/components/status/status.js +1 -0
  40. package/dist/components/steps/steps.js +1 -0
  41. package/dist/components/switch/switch.js +1 -0
  42. package/dist/components/tag/tag.js +1 -0
  43. package/dist/components/toggle-tip/toggle-tip.js +1 -0
  44. package/dist/components/tooltip/tooltip.js +1 -0
  45. package/dist/index.d.ts +1 -1
  46. package/dist/preset.d.ts +1 -3
  47. package/dist/preset.js +1 -10
  48. package/dist/provider/sui-provider.js +1 -0
  49. package/package.json +3 -2
  50. package/dist/components/accordion/accordion.recipe.d.ts +0 -84
  51. package/dist/components/accordion/accordion.recipe.js +0 -148
  52. package/dist/components/action-bar/action-bar.recipe.d.ts +0 -1
  53. package/dist/components/action-bar/action-bar.recipe.js +0 -56
  54. package/dist/components/alert/alert.recipe.d.ts +0 -120
  55. package/dist/components/alert/alert.recipe.js +0 -149
  56. package/dist/components/app-shell/app-shell.recipe.d.ts +0 -13
  57. package/dist/components/app-shell/app-shell.recipe.js +0 -41
  58. package/dist/components/avatar/avatar.recipe.d.ts +0 -88
  59. package/dist/components/avatar/avatar.recipe.js +0 -129
  60. package/dist/components/badge/badge.recipe.d.ts +0 -48
  61. package/dist/components/badge/badge.recipe.js +0 -66
  62. package/dist/components/blockquote/blockquote.recipe.d.ts +0 -52
  63. package/dist/components/blockquote/blockquote.recipe.js +0 -77
  64. package/dist/components/breadcrumb/breadcrumb.recipe.d.ts +0 -46
  65. package/dist/components/breadcrumb/breadcrumb.recipe.js +0 -90
  66. package/dist/components/button/button.recipe.d.ts +0 -141
  67. package/dist/components/button/button.recipe.js +0 -185
  68. package/dist/components/card/card.recipe.d.ts +0 -78
  69. package/dist/components/card/card.recipe.js +0 -133
  70. package/dist/components/checkbox/checkbox.recipe.d.ts +0 -80
  71. package/dist/components/checkbox/checkbox.recipe.js +0 -64
  72. package/dist/components/checkbox-card/checkbox-card.recipe.d.ts +0 -188
  73. package/dist/components/checkbox-card/checkbox-card.recipe.js +0 -202
  74. package/dist/components/checkmark/checkmark.recipe.d.ts +0 -54
  75. package/dist/components/checkmark/checkmark.recipe.js +0 -80
  76. package/dist/components/code/code.recipe.d.ts +0 -48
  77. package/dist/components/code/code.recipe.js +0 -14
  78. package/dist/components/collapsible/collapsible.recipe.d.ts +0 -1
  79. package/dist/components/collapsible/collapsible.recipe.js +0 -19
  80. package/dist/components/combobox/combobox.recipe.d.ts +0 -144
  81. package/dist/components/combobox/combobox.recipe.js +0 -292
  82. package/dist/components/command/command.recipe.d.ts +0 -15
  83. package/dist/components/command/command.recipe.js +0 -34
  84. package/dist/components/container/container.recipe.d.ts +0 -14
  85. package/dist/components/container/container.recipe.js +0 -25
  86. package/dist/components/data-list/data-list.recipe.d.ts +0 -55
  87. package/dist/components/data-list/data-list.recipe.js +0 -78
  88. package/dist/components/dialog/dialog.recipe.d.ts +0 -166
  89. package/dist/components/dialog/dialog.recipe.js +0 -256
  90. package/dist/components/drawer/drawer.recipe.d.ts +0 -113
  91. package/dist/components/drawer/drawer.recipe.js +0 -202
  92. package/dist/components/editable/editable.recipe.d.ts +0 -37
  93. package/dist/components/editable/editable.recipe.js +0 -89
  94. package/dist/components/empty-state/empty-state.recipe.d.ts +0 -83
  95. package/dist/components/empty-state/empty-state.recipe.js +0 -137
  96. package/dist/components/field/field.recipe.d.ts +0 -29
  97. package/dist/components/field/field.recipe.js +0 -74
  98. package/dist/components/fieldset/fieldset.recipe.d.ts +0 -37
  99. package/dist/components/fieldset/fieldset.recipe.js +0 -59
  100. package/dist/components/file-upload/file-upload.recipe.d.ts +0 -1
  101. package/dist/components/file-upload/file-upload.recipe.js +0 -90
  102. package/dist/components/grid-list/grid-list.recipe.d.ts +0 -60
  103. package/dist/components/grid-list/grid-list.recipe.js +0 -131
  104. package/dist/components/heading/heading.recipe.d.ts +0 -59
  105. package/dist/components/heading/heading.recipe.js +0 -70
  106. package/dist/components/hover-card/hover-card.recipe.d.ts +0 -28
  107. package/dist/components/hover-card/hover-card.recipe.js +0 -70
  108. package/dist/components/icon/icon.recipe.d.ts +0 -25
  109. package/dist/components/icon/icon.recipe.js +0 -27
  110. package/dist/components/icon-badge/icon-badge.recipe.d.ts +0 -43
  111. package/dist/components/icon-badge/icon-badge.recipe.js +0 -57
  112. package/dist/components/input/input.recipe.d.ts +0 -66
  113. package/dist/components/input/input.recipe.js +0 -93
  114. package/dist/components/input-addon/input-addon.recipe.d.ts +0 -56
  115. package/dist/components/input-addon/input-addon.recipe.js +0 -36
  116. package/dist/components/kbd/kbd.recipe.d.ts +0 -36
  117. package/dist/components/kbd/kbd.recipe.js +0 -56
  118. package/dist/components/link/link.recipe.d.ts +0 -18
  119. package/dist/components/link/link.recipe.js +0 -34
  120. package/dist/components/list/list.recipe.d.ts +0 -38
  121. package/dist/components/list/list.recipe.js +0 -62
  122. package/dist/components/loading-overlay/loading-overlay.recipe.d.ts +0 -26
  123. package/dist/components/loading-overlay/loading-overlay.recipe.js +0 -51
  124. package/dist/components/mark/mark.recipe.d.ts +0 -16
  125. package/dist/components/mark/mark.recipe.js +0 -25
  126. package/dist/components/menu/menu.recipe.d.ts +0 -58
  127. package/dist/components/menu/menu.recipe.js +0 -133
  128. package/dist/components/native-select/native-select.recipe.d.ts +0 -90
  129. package/dist/components/native-select/native-select.recipe.js +0 -134
  130. package/dist/components/navbar/navbar.recipe.d.ts +0 -46
  131. package/dist/components/navbar/navbar.recipe.js +0 -124
  132. package/dist/components/number-input/number-input.recipe.d.ts +0 -144
  133. package/dist/components/number-input/number-input.recipe.js +0 -111
  134. package/dist/components/page/page.recipe.d.ts +0 -61
  135. package/dist/components/page/page.recipe.js +0 -99
  136. package/dist/components/persona/persona.recipe.d.ts +0 -104
  137. package/dist/components/persona/persona.recipe.js +0 -106
  138. package/dist/components/pin-input/pin-input.recipe.d.ts +0 -236
  139. package/dist/components/pin-input/pin-input.recipe.js +0 -32
  140. package/dist/components/popover/popover.recipe.d.ts +0 -24
  141. package/dist/components/popover/popover.recipe.js +0 -84
  142. package/dist/components/progress/progress.recipe.d.ts +0 -82
  143. package/dist/components/progress/progress.recipe.js +0 -121
  144. package/dist/components/progress-circle/progress-circle.recipe.d.ts +0 -49
  145. package/dist/components/progress-circle/progress-circle.recipe.js +0 -91
  146. package/dist/components/radio/radiomark.recipe.d.ts +0 -56
  147. package/dist/components/radio/radiomark.recipe.js +0 -95
  148. package/dist/components/radio-card/radio-card.recipe.d.ts +0 -191
  149. package/dist/components/radio-card/radio-card.recipe.js +0 -209
  150. package/dist/components/radio-group/radio-group.recipe.d.ts +0 -77
  151. package/dist/components/radio-group/radio-group.recipe.js +0 -61
  152. package/dist/components/rating-group/rating-group.recipe.d.ts +0 -24
  153. package/dist/components/rating-group/rating-group.recipe.js +0 -83
  154. package/dist/components/section/section.recipe.d.ts +0 -27
  155. package/dist/components/section/section.recipe.js +0 -63
  156. package/dist/components/segmented-control/segment-group.recipe.d.ts +0 -48
  157. package/dist/components/segmented-control/segment-group.recipe.js +0 -127
  158. package/dist/components/select/select.recipe.d.ts +0 -155
  159. package/dist/components/select/select.recipe.js +0 -285
  160. package/dist/components/separator/separator.recipe.d.ts +0 -37
  161. package/dist/components/separator/separator.recipe.js +0 -50
  162. package/dist/components/sidebar/sidebar-nav-item.recipe.d.ts +0 -67
  163. package/dist/components/sidebar/sidebar-nav-item.recipe.js +0 -118
  164. package/dist/components/sidebar/sidebar.recipe.d.ts +0 -108
  165. package/dist/components/sidebar/sidebar.recipe.js +0 -280
  166. package/dist/components/skeleton/skeleton.recipe.d.ts +0 -41
  167. package/dist/components/skeleton/skeleton.recipe.js +0 -50
  168. package/dist/components/skip-nav-link/skip-nav-link.recipe.d.ts +0 -1
  169. package/dist/components/skip-nav-link/skip-nav-link.recipe.js +0 -31
  170. package/dist/components/slider/slider.recipe.d.ts +0 -101
  171. package/dist/components/slider/slider.recipe.js +0 -175
  172. package/dist/components/spinner/spinner.recipe.d.ts +0 -22
  173. package/dist/components/spinner/spinner.recipe.js +0 -31
  174. package/dist/components/stat/stat.recipe.d.ts +0 -19
  175. package/dist/components/stat/stat.recipe.js +0 -76
  176. package/dist/components/status/status.recipe.d.ts +0 -19
  177. package/dist/components/status/status.recipe.js +0 -44
  178. package/dist/components/steps/steps.recipe.d.ts +0 -142
  179. package/dist/components/steps/steps.recipe.js +0 -213
  180. package/dist/components/switch/switch.recipe.d.ts +0 -77
  181. package/dist/components/switch/switch.recipe.js +0 -157
  182. package/dist/components/table/table.recipe.d.ts +0 -121
  183. package/dist/components/table/table.recipe.js +0 -161
  184. package/dist/components/tabs/tabs.recipe.d.ts +0 -263
  185. package/dist/components/tabs/tabs.recipe.js +0 -332
  186. package/dist/components/tag/tag.recipe.d.ts +0 -95
  187. package/dist/components/tag/tag.recipe.js +0 -154
  188. package/dist/components/textarea/textarea.recipe.d.ts +0 -65
  189. package/dist/components/textarea/textarea.recipe.js +0 -90
  190. package/dist/components/timeline/timeline.recipe.d.ts +0 -62
  191. package/dist/components/timeline/timeline.recipe.js +0 -134
  192. package/dist/components/toaster/toast.recipe.d.ts +0 -1
  193. package/dist/components/toaster/toast.recipe.js +0 -90
  194. package/dist/components/tooltip/tooltip.recipe.d.ts +0 -10
  195. package/dist/components/tooltip/tooltip.recipe.js +0 -52
  196. package/dist/theme/animation-styles.d.ts +0 -1
  197. package/dist/theme/animation-styles.js +0 -49
  198. package/dist/theme/breakpoints.d.ts +0 -10
  199. package/dist/theme/breakpoints.js +0 -8
  200. package/dist/theme/conditions.d.ts +0 -18
  201. package/dist/theme/conditions.js +0 -19
  202. package/dist/theme/fluid-font-sizes.d.ts +0 -0
  203. package/dist/theme/fluid-font-sizes.js +0 -61
  204. package/dist/theme/global-css.d.ts +0 -1
  205. package/dist/theme/global-css.js +0 -56
  206. package/dist/theme/index.d.ts +0 -1
  207. package/dist/theme/index.js +0 -72
  208. package/dist/theme/layer-styles.d.ts +0 -1
  209. package/dist/theme/layer-styles.js +0 -133
  210. package/dist/theme/recipes.d.ts +0 -861
  211. package/dist/theme/recipes.js +0 -44
  212. package/dist/theme/semantic-tokens/colors.d.ts +0 -1298
  213. package/dist/theme/semantic-tokens/colors.js +0 -687
  214. package/dist/theme/semantic-tokens/radii.d.ts +0 -44
  215. package/dist/theme/semantic-tokens/radii.js +0 -39
  216. package/dist/theme/semantic-tokens/shadows.d.ts +0 -56
  217. package/dist/theme/semantic-tokens/shadows.js +0 -57
  218. package/dist/theme/slot-recipes.d.ts +0 -4030
  219. package/dist/theme/slot-recipes.js +0 -108
  220. package/dist/theme/text-styles.d.ts +0 -1
  221. package/dist/theme/text-styles.js +0 -82
  222. package/dist/theme/tokens/animations.d.ts +0 -14
  223. package/dist/theme/tokens/animations.js +0 -7
  224. package/dist/theme/tokens/aspect-ratios.d.ts +0 -20
  225. package/dist/theme/tokens/aspect-ratios.js +0 -9
  226. package/dist/theme/tokens/blurs.d.ts +0 -26
  227. package/dist/theme/tokens/blurs.js +0 -11
  228. package/dist/theme/tokens/borders.d.ts +0 -17
  229. package/dist/theme/tokens/borders.js +0 -8
  230. package/dist/theme/tokens/colors.d.ts +0 -820
  231. package/dist/theme/tokens/colors.js +0 -306
  232. package/dist/theme/tokens/cursor.d.ts +0 -26
  233. package/dist/theme/tokens/cursor.js +0 -11
  234. package/dist/theme/tokens/durations.d.ts +0 -23
  235. package/dist/theme/tokens/durations.js +0 -10
  236. package/dist/theme/tokens/easings.d.ts +0 -20
  237. package/dist/theme/tokens/easings.js +0 -9
  238. package/dist/theme/tokens/font-sizes.d.ts +0 -44
  239. package/dist/theme/tokens/font-sizes.js +0 -18
  240. package/dist/theme/tokens/font-weights.d.ts +0 -29
  241. package/dist/theme/tokens/font-weights.js +0 -12
  242. package/dist/theme/tokens/fonts.d.ts +0 -11
  243. package/dist/theme/tokens/fonts.js +0 -13
  244. package/dist/theme/tokens/keyframes.d.ts +0 -1
  245. package/dist/theme/tokens/keyframes.js +0 -157
  246. package/dist/theme/tokens/letter-spacing.d.ts +0 -56
  247. package/dist/theme/tokens/letter-spacing.js +0 -21
  248. package/dist/theme/tokens/line-heights.d.ts +0 -77
  249. package/dist/theme/tokens/line-heights.js +0 -29
  250. package/dist/theme/tokens/radius.d.ts +0 -32
  251. package/dist/theme/tokens/radius.js +0 -15
  252. package/dist/theme/tokens/sizes.d.ts +0 -257
  253. package/dist/theme/tokens/sizes.js +0 -66
  254. package/dist/theme/tokens/spacing.d.ts +0 -101
  255. package/dist/theme/tokens/spacing.js +0 -37
  256. package/dist/theme/tokens/z-indices.d.ts +0 -53
  257. package/dist/theme/tokens/z-indices.js +0 -32
  258. package/dist/theme/utilities.d.ts +0 -10
  259. package/dist/theme/utilities.js +0 -49
  260. package/dist/theme/utils.d.ts +0 -19
  261. package/dist/theme/utils.js +0 -34
@@ -1,34 +0,0 @@
1
- import { defineRecipe, } from '@chakra-ui/react/styled-system';
2
- export const commandRecipe = defineRecipe({
3
- className: 'sui-command',
4
- base: {
5
- colorPalette: 'gray',
6
- display: 'inline-flex',
7
- gap: 1,
8
- color: 'fg.muted',
9
- '[role=tooltip] > &': {
10
- ms: 1,
11
- _before: {
12
- content: '"•"',
13
- me: 1,
14
- fontSize: 'xs',
15
- },
16
- },
17
- },
18
- variants: {
19
- size: {
20
- sm: {
21
- fontSize: 'xs',
22
- },
23
- md: {
24
- fontSize: 'sm',
25
- },
26
- lg: {
27
- fontSize: 'md',
28
- },
29
- },
30
- },
31
- defaultVariants: {
32
- size: 'md',
33
- },
34
- });
@@ -1,14 +0,0 @@
1
- export declare const containerRecipe: import("@chakra-ui/react").RecipeDefinition<{
2
- centerContent: {
3
- true: {
4
- display: "flex";
5
- flexDirection: "column";
6
- alignItems: "center";
7
- };
8
- };
9
- fluid: {
10
- true: {
11
- maxWidth: "full";
12
- };
13
- };
14
- }>;
@@ -1,25 +0,0 @@
1
- import { defineRecipe } from '@chakra-ui/react/styled-system';
2
- export const containerRecipe = defineRecipe({
3
- className: 'chakra-container',
4
- base: {
5
- position: 'relative',
6
- maxWidth: '8xl',
7
- w: '100%',
8
- mx: 'auto',
9
- px: { base: '4', md: '6', lg: '8' },
10
- },
11
- variants: {
12
- centerContent: {
13
- true: {
14
- display: 'flex',
15
- flexDirection: 'column',
16
- alignItems: 'center',
17
- },
18
- },
19
- fluid: {
20
- true: {
21
- maxWidth: 'full',
22
- },
23
- },
24
- },
25
- });
@@ -1,55 +0,0 @@
1
- export declare const dataListSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"root" | "item" | "itemLabel" | "itemValue", {
2
- orientation: {
3
- horizontal: {
4
- root: {
5
- display: "flex";
6
- flexDirection: "column";
7
- };
8
- item: {
9
- display: "inline-flex";
10
- alignItems: "center";
11
- gap: "4";
12
- };
13
- itemLabel: {
14
- minWidth: "var(--label-width, 120px)";
15
- };
16
- };
17
- vertical: {
18
- root: {
19
- display: "flex";
20
- flexDirection: "column";
21
- };
22
- item: {
23
- display: "flex";
24
- flexDirection: "column";
25
- gap: "1";
26
- };
27
- };
28
- };
29
- size: {
30
- sm: {
31
- root: {
32
- gap: "3";
33
- };
34
- item: {
35
- textStyle: "xs";
36
- };
37
- };
38
- md: {
39
- root: {
40
- gap: "4";
41
- };
42
- item: {
43
- textStyle: "sm";
44
- };
45
- };
46
- lg: {
47
- root: {
48
- gap: "5";
49
- };
50
- item: {
51
- textStyle: "md";
52
- };
53
- };
54
- };
55
- }>;
@@ -1,78 +0,0 @@
1
- import { dataListAnatomy } from '@chakra-ui/react/anatomy';
2
- import { defineSlotRecipe } from '@chakra-ui/react/styled-system';
3
- export const dataListSlotRecipe = defineSlotRecipe({
4
- slots: dataListAnatomy.keys(),
5
- className: 'chakra-data-list',
6
- base: {
7
- itemLabel: {
8
- color: 'fg.muted',
9
- display: 'flex',
10
- alignItems: 'center',
11
- gap: '1',
12
- },
13
- itemValue: {
14
- display: 'flex',
15
- minWidth: '0',
16
- flex: '1',
17
- },
18
- },
19
- variants: {
20
- orientation: {
21
- horizontal: {
22
- root: {
23
- display: 'flex',
24
- flexDirection: 'column',
25
- },
26
- item: {
27
- display: 'inline-flex',
28
- alignItems: 'center',
29
- gap: '4',
30
- },
31
- itemLabel: {
32
- minWidth: 'var(--label-width, 120px)',
33
- },
34
- },
35
- vertical: {
36
- root: {
37
- display: 'flex',
38
- flexDirection: 'column',
39
- },
40
- item: {
41
- display: 'flex',
42
- flexDirection: 'column',
43
- gap: '1',
44
- },
45
- },
46
- },
47
- size: {
48
- sm: {
49
- root: {
50
- gap: '3',
51
- },
52
- item: {
53
- textStyle: 'xs',
54
- },
55
- },
56
- md: {
57
- root: {
58
- gap: '4',
59
- },
60
- item: {
61
- textStyle: 'sm',
62
- },
63
- },
64
- lg: {
65
- root: {
66
- gap: '5',
67
- },
68
- item: {
69
- textStyle: 'md',
70
- },
71
- },
72
- },
73
- },
74
- defaultVariants: {
75
- size: 'md',
76
- orientation: 'horizontal',
77
- },
78
- });
@@ -1,166 +0,0 @@
1
- export declare const dialogSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"description" | "content" | "body" | "backdrop" | "positioner" | "closeTrigger" | "title" | "header" | "footer" | "trigger", {
2
- variant: {
3
- dialog: {};
4
- confirm: {
5
- content: {
6
- textAlign: "center";
7
- };
8
- header: {
9
- flexDirection: "column";
10
- alignItems: "center";
11
- };
12
- footer: {
13
- display: "flex";
14
- flexDirection: "column-reverse";
15
- justifyContent: "stretch";
16
- alignItems: "stretch";
17
- };
18
- };
19
- };
20
- placement: {
21
- center: {
22
- positioner: {
23
- alignItems: "center";
24
- };
25
- content: {
26
- '--dialog-base-margin': "auto";
27
- mx: "auto";
28
- };
29
- };
30
- top: {
31
- positioner: {
32
- alignItems: "flex-start";
33
- };
34
- content: {
35
- '--dialog-base-margin': "spacing.16";
36
- mx: "auto";
37
- };
38
- };
39
- bottom: {
40
- positioner: {
41
- alignItems: "flex-end";
42
- };
43
- content: {
44
- '--dialog-base-margin': "spacing.16";
45
- mx: "auto";
46
- };
47
- };
48
- };
49
- scrollBehavior: {
50
- inside: {
51
- positioner: {
52
- overflow: "hidden";
53
- };
54
- content: {
55
- maxH: "calc(100% - 7.5rem)";
56
- };
57
- body: {
58
- overflow: "auto";
59
- };
60
- };
61
- outside: {
62
- positioner: {
63
- overflow: "auto";
64
- pointerEvents: "auto";
65
- };
66
- };
67
- };
68
- size: {
69
- xs: {
70
- content: {
71
- maxW: "sm";
72
- };
73
- };
74
- sm: {
75
- content: {
76
- maxW: "md";
77
- };
78
- };
79
- md: {
80
- content: {
81
- maxW: "lg";
82
- };
83
- };
84
- lg: {
85
- content: {
86
- maxW: "2xl";
87
- };
88
- };
89
- xl: {
90
- content: {
91
- maxW: "4xl";
92
- };
93
- };
94
- cover: {
95
- positioner: {
96
- padding: "10";
97
- };
98
- content: {
99
- width: "100%";
100
- height: "100%";
101
- '--dialog-margin': "0";
102
- };
103
- };
104
- full: {
105
- content: {
106
- maxW: "100vw";
107
- minH: "100vh";
108
- '--dialog-margin': "0";
109
- borderRadius: "0";
110
- };
111
- };
112
- };
113
- motionPreset: {
114
- scale: {
115
- content: {
116
- _open: {
117
- animationName: "scale-in, fade-in";
118
- };
119
- _closed: {
120
- animationName: "scale-out, fade-out";
121
- };
122
- };
123
- };
124
- 'slide-in-bottom': {
125
- content: {
126
- _open: {
127
- animationName: "slide-from-bottom, fade-in";
128
- };
129
- _closed: {
130
- animationName: "slide-to-bottom, fade-out";
131
- };
132
- };
133
- };
134
- 'slide-in-top': {
135
- content: {
136
- _open: {
137
- animationName: "slide-from-top, fade-in";
138
- };
139
- _closed: {
140
- animationName: "slide-to-top, fade-out";
141
- };
142
- };
143
- };
144
- 'slide-in-left': {
145
- content: {
146
- _open: {
147
- animationName: "slide-from-left, fade-in";
148
- };
149
- _closed: {
150
- animationName: "slide-to-left, fade-out";
151
- };
152
- };
153
- };
154
- 'slide-in-right': {
155
- content: {
156
- _open: {
157
- animationName: "slide-from-right, fade-in";
158
- };
159
- _closed: {
160
- animationName: "slide-to-right, fade-out";
161
- };
162
- };
163
- };
164
- none: {};
165
- };
166
- }>;
@@ -1,256 +0,0 @@
1
- import { dialogAnatomy } from '@chakra-ui/react/anatomy';
2
- import { defineSlotRecipe } from '@chakra-ui/react/styled-system';
3
- export const dialogSlotRecipe = defineSlotRecipe({
4
- slots: dialogAnatomy.keys(),
5
- className: 'chakra-dialog',
6
- base: {
7
- backdrop: {
8
- layerStyle: 'backdrop',
9
- pos: 'fixed',
10
- left: 0,
11
- top: 0,
12
- w: '100vw',
13
- h: '100dvh',
14
- zIndex: 'layer-4',
15
- _open: {
16
- animationName: 'fade-in',
17
- animationDuration: 'slow',
18
- },
19
- _closed: {
20
- animationName: 'fade-out',
21
- animationDuration: 'moderate',
22
- },
23
- },
24
- positioner: {
25
- display: 'flex',
26
- width: '100vw',
27
- height: '100dvh',
28
- position: 'fixed',
29
- left: 0,
30
- top: 0,
31
- '--dialog-z-index': 'zIndex.layer-4',
32
- zIndex: 'calc(var(--dialog-z-index) + var(--layer-index, 0))',
33
- justifyContent: 'center',
34
- overscrollBehaviorY: 'none',
35
- },
36
- content: {
37
- display: 'flex',
38
- flexDirection: 'column',
39
- position: 'relative',
40
- width: '100%',
41
- outline: 0,
42
- textStyle: 'sm',
43
- my: 'var(--dialog-margin, var(--dialog-base-margin))',
44
- zIndex: 'calc(var(--dialog-z-index) + var(--layer-index, 0))',
45
- layerStyle: 'overlay',
46
- _open: {
47
- animationDuration: 'moderate',
48
- },
49
- _closed: {
50
- animationDuration: 'faster',
51
- },
52
- },
53
- header: {
54
- display: 'flex',
55
- flex: 0,
56
- px: '6',
57
- py: '4',
58
- paddingBottom: '2',
59
- },
60
- body: {
61
- flex: '1',
62
- px: '6',
63
- py: '4',
64
- '&:is(.chakra-dialog__header + &)': {
65
- paddingTop: '2',
66
- },
67
- '&:has(+ .chakra-dialog__footer)': {
68
- paddingBottom: '2',
69
- },
70
- },
71
- footer: {
72
- display: 'flex',
73
- alignItems: 'center',
74
- justifyContent: 'flex-end',
75
- gap: '3',
76
- px: '6',
77
- pt: '2',
78
- pb: '4',
79
- },
80
- title: {
81
- textStyle: 'lg',
82
- fontWeight: 'semibold',
83
- },
84
- description: {
85
- color: 'fg.muted',
86
- },
87
- closeTrigger: {
88
- position: 'absolute',
89
- top: '4',
90
- right: '4',
91
- },
92
- },
93
- variants: {
94
- variant: {
95
- dialog: {},
96
- confirm: {
97
- content: {
98
- textAlign: 'center',
99
- },
100
- header: {
101
- flexDirection: 'column',
102
- alignItems: 'center',
103
- },
104
- footer: {
105
- display: 'flex',
106
- flexDirection: 'column-reverse',
107
- justifyContent: 'stretch',
108
- alignItems: 'stretch',
109
- },
110
- },
111
- },
112
- placement: {
113
- center: {
114
- positioner: {
115
- alignItems: 'center',
116
- },
117
- content: {
118
- '--dialog-base-margin': 'auto',
119
- mx: 'auto',
120
- },
121
- },
122
- top: {
123
- positioner: {
124
- alignItems: 'flex-start',
125
- },
126
- content: {
127
- '--dialog-base-margin': 'spacing.16',
128
- mx: 'auto',
129
- },
130
- },
131
- bottom: {
132
- positioner: {
133
- alignItems: 'flex-end',
134
- },
135
- content: {
136
- '--dialog-base-margin': 'spacing.16',
137
- mx: 'auto',
138
- },
139
- },
140
- },
141
- scrollBehavior: {
142
- inside: {
143
- positioner: {
144
- overflow: 'hidden',
145
- },
146
- content: {
147
- maxH: 'calc(100% - 7.5rem)',
148
- },
149
- body: {
150
- overflow: 'auto',
151
- },
152
- },
153
- outside: {
154
- positioner: {
155
- overflow: 'auto',
156
- pointerEvents: 'auto',
157
- },
158
- },
159
- },
160
- size: {
161
- xs: {
162
- content: {
163
- maxW: 'sm',
164
- },
165
- },
166
- sm: {
167
- content: {
168
- maxW: 'md',
169
- },
170
- },
171
- md: {
172
- content: {
173
- maxW: 'lg',
174
- },
175
- },
176
- lg: {
177
- content: {
178
- maxW: '2xl',
179
- },
180
- },
181
- xl: {
182
- content: {
183
- maxW: '4xl',
184
- },
185
- },
186
- cover: {
187
- positioner: {
188
- padding: '10',
189
- },
190
- content: {
191
- width: '100%',
192
- height: '100%',
193
- '--dialog-margin': '0',
194
- },
195
- },
196
- full: {
197
- content: {
198
- maxW: '100vw',
199
- minH: '100vh',
200
- '--dialog-margin': '0',
201
- borderRadius: '0',
202
- },
203
- },
204
- },
205
- motionPreset: {
206
- scale: {
207
- content: {
208
- _open: { animationName: 'scale-in, fade-in' },
209
- _closed: { animationName: 'scale-out, fade-out' },
210
- },
211
- },
212
- 'slide-in-bottom': {
213
- content: {
214
- _open: { animationName: 'slide-from-bottom, fade-in' },
215
- _closed: { animationName: 'slide-to-bottom, fade-out' },
216
- },
217
- },
218
- 'slide-in-top': {
219
- content: {
220
- _open: { animationName: 'slide-from-top, fade-in' },
221
- _closed: { animationName: 'slide-to-top, fade-out' },
222
- },
223
- },
224
- 'slide-in-left': {
225
- content: {
226
- _open: { animationName: 'slide-from-left, fade-in' },
227
- _closed: { animationName: 'slide-to-left, fade-out' },
228
- },
229
- },
230
- 'slide-in-right': {
231
- content: {
232
- _open: { animationName: 'slide-from-right, fade-in' },
233
- _closed: { animationName: 'slide-to-right, fade-out' },
234
- },
235
- },
236
- none: {},
237
- },
238
- },
239
- compoundVariants: [
240
- {
241
- variant: 'confirm',
242
- css: {
243
- content: {
244
- maxW: 'xs',
245
- },
246
- },
247
- },
248
- ],
249
- defaultVariants: {
250
- size: 'md',
251
- scrollBehavior: 'outside',
252
- placement: 'top',
253
- motionPreset: 'scale',
254
- variant: 'dialog',
255
- },
256
- });