@saas-ui/react 3.0.0-alpha.1 → 3.0.0-alpha.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (344) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/dist/chunk-2EUACKRH.js +26 -0
  3. package/dist/chunk-3MO37LYW.js +326 -0
  4. package/dist/chunk-4TR3AOMG.js +33 -0
  5. package/dist/chunk-6LOMIKR5.js +69 -0
  6. package/dist/chunk-6ZNR6N2K.js +45 -0
  7. package/dist/chunk-7VSTNV2B.js +53 -0
  8. package/dist/chunk-BCNPBZZK.js +45 -0
  9. package/dist/chunk-CB52LBJK.js +71 -0
  10. package/dist/chunk-CD2JUFI2.js +231 -0
  11. package/dist/chunk-FJFNGSPL.js +23 -0
  12. package/dist/chunk-GGAKUS66.js +141 -0
  13. package/dist/chunk-H6TFEHY4.js +63 -0
  14. package/dist/chunk-HELHPHIQ.js +35 -0
  15. package/dist/chunk-I2RXEKTB.js +38 -0
  16. package/dist/chunk-JGHXJ3PI.js +102 -0
  17. package/dist/chunk-L356FPLY.js +20 -0
  18. package/dist/chunk-LIYUBUOP.js +119 -0
  19. package/dist/chunk-M7FOBCOV.js +184 -0
  20. package/dist/chunk-NSD5HRIP.js +46 -0
  21. package/dist/chunk-Q6SNJJO2.js +63 -0
  22. package/dist/chunk-QSNSWCTM.js +32 -0
  23. package/dist/chunk-S3CQW7GD.js +100 -0
  24. package/dist/chunk-SA3OGTOO.js +23 -0
  25. package/dist/chunk-SKXSBAOS.js +35 -0
  26. package/dist/{components/breadcrumbs/index.js → chunk-TT4C5VXB.js} +6 -7
  27. package/dist/chunk-TZBAM4AD.js +20 -0
  28. package/dist/chunk-UCQ3LZIE.js +43 -0
  29. package/dist/chunk-ULAJ3JEO.js +32 -0
  30. package/dist/chunk-WYLMBMAH.js +22 -0
  31. package/dist/components/app-shell/index.cjs +1 -1
  32. package/dist/components/app-shell/index.d.cts +1 -1
  33. package/dist/components/app-shell/index.d.ts +1 -1
  34. package/dist/components/app-shell/index.js +3 -40
  35. package/dist/components/avatar/index.cjs +69 -0
  36. package/dist/components/avatar/index.d.cts +18 -0
  37. package/dist/components/avatar/index.d.ts +18 -0
  38. package/dist/components/avatar/index.js +10 -0
  39. package/dist/components/{breadcrumbs → breadcrumb}/index.cjs +8 -10
  40. package/dist/components/{breadcrumbs → breadcrumb}/index.d.cts +3 -4
  41. package/dist/components/{breadcrumbs → breadcrumb}/index.d.ts +3 -4
  42. package/dist/components/breadcrumb/index.js +8 -0
  43. package/dist/components/button/index.js +3 -40
  44. package/dist/components/checkbox/index.js +3 -15
  45. package/dist/components/command/index.cjs +1 -1
  46. package/dist/components/command/index.js +3 -28
  47. package/dist/components/dialog/index.cjs +19 -58
  48. package/dist/components/dialog/index.js +4 -67
  49. package/dist/components/drawer/index.cjs +23 -64
  50. package/dist/components/drawer/index.d.cts +2 -2
  51. package/dist/components/drawer/index.d.ts +2 -2
  52. package/dist/components/drawer/index.js +4 -59
  53. package/dist/components/empty-state/index.cjs +48 -0
  54. package/dist/components/empty-state/index.d.cts +11 -0
  55. package/dist/components/empty-state/index.d.ts +11 -0
  56. package/dist/components/empty-state/index.js +8 -0
  57. package/dist/components/grid-list/index.cjs +68 -0
  58. package/dist/components/grid-list/index.d.cts +22 -0
  59. package/dist/components/grid-list/index.d.ts +22 -0
  60. package/dist/components/grid-list/index.js +8 -0
  61. package/dist/components/icon-badge/index.cjs +1 -1
  62. package/dist/components/icon-badge/index.d.cts +1 -1
  63. package/dist/components/icon-badge/index.d.ts +1 -1
  64. package/dist/components/icon-badge/index.js +3 -33
  65. package/dist/components/link/index.js +3 -14
  66. package/dist/components/loading-overlay/index.cjs +42 -1879
  67. package/dist/components/loading-overlay/index.d.cts +19 -6
  68. package/dist/components/loading-overlay/index.d.ts +19 -6
  69. package/dist/components/loading-overlay/index.js +7 -1874
  70. package/dist/components/menu/index.cjs +249 -0
  71. package/dist/components/menu/index.d.cts +39 -0
  72. package/dist/components/menu/index.d.ts +39 -0
  73. package/dist/components/menu/index.js +11 -0
  74. package/dist/components/navbar/index.cjs +61 -15
  75. package/dist/components/navbar/index.d.cts +12 -9
  76. package/dist/components/navbar/index.d.ts +12 -9
  77. package/dist/components/navbar/index.js +5 -38
  78. package/dist/components/number-input/index.js +3 -26
  79. package/dist/components/password-input/index.js +3 -225
  80. package/dist/components/persona/index.cjs +52 -15
  81. package/dist/components/persona/index.d.cts +22 -2
  82. package/dist/components/persona/index.d.ts +22 -2
  83. package/dist/components/persona/index.js +7 -144
  84. package/dist/components/pin-input/index.js +3 -21
  85. package/dist/components/radio/index.js +4 -16
  86. package/dist/components/search-input/index.js +4 -114
  87. package/dist/components/segmented-control/index.cjs +60 -0
  88. package/dist/components/segmented-control/index.d.cts +14 -0
  89. package/dist/components/segmented-control/index.d.ts +14 -0
  90. package/dist/components/segmented-control/index.js +8 -0
  91. package/dist/components/select/index.js +4 -94
  92. package/dist/components/sidebar/index.cjs +64 -32
  93. package/dist/components/sidebar/index.d.cts +24 -23
  94. package/dist/components/sidebar/index.d.ts +24 -23
  95. package/dist/components/sidebar/index.js +7 -101
  96. package/dist/components/steps/index.cjs +7 -9
  97. package/dist/components/steps/index.d.cts +2 -2
  98. package/dist/components/steps/index.d.ts +2 -2
  99. package/dist/components/steps/index.js +6 -67
  100. package/dist/components/switch/index.js +3 -18
  101. package/dist/components/toaster/index.cjs +54 -0
  102. package/dist/components/toaster/index.d.cts +10 -0
  103. package/dist/components/toaster/index.d.ts +10 -0
  104. package/dist/components/toaster/index.js +10 -0
  105. package/dist/components/tooltip/index.cjs +57 -0
  106. package/dist/components/tooltip/index.d.cts +14 -0
  107. package/dist/components/tooltip/index.d.ts +14 -0
  108. package/dist/components/tooltip/index.js +8 -0
  109. package/dist/index.cjs +2357 -220
  110. package/dist/index.d.cts +38 -2
  111. package/dist/index.d.ts +38 -2
  112. package/dist/index.js +515 -276
  113. package/dist/theme/tokens/colors.cjs +349 -0
  114. package/dist/theme/tokens/colors.d.cts +856 -0
  115. package/dist/theme/tokens/colors.d.ts +856 -0
  116. package/dist/theme/tokens/colors.js +8 -0
  117. package/package.json +12 -7
  118. package/dist/chunk-VBIVLREP.js +0 -45
  119. package/src/components/app-shell/app-shell.recipe.ts +0 -52
  120. package/src/components/app-shell/app-shell.stories.tsx +0 -51
  121. package/src/components/app-shell/app-shell.tsx +0 -94
  122. package/src/components/app-shell/index.ts +0 -3
  123. package/src/components/breadcrumbs/breadcrumb.stories.tsx +0 -17
  124. package/src/components/breadcrumbs/breadcrumb.tsx +0 -36
  125. package/src/components/breadcrumbs/index.ts +0 -1
  126. package/src/components/breadcrumbs/namespace.ts +0 -8
  127. package/src/components/button/button.recipe.ts +0 -182
  128. package/src/components/button/button.stories.tsx +0 -99
  129. package/src/components/button/button.tsx +0 -55
  130. package/src/components/button/index.ts +0 -2
  131. package/src/components/checkbox/checkbox.tsx +0 -26
  132. package/src/components/checkbox/index.ts +0 -2
  133. package/src/components/close-button/close-button.stories.tsx +0 -12
  134. package/src/components/close-button/close-button.tsx +0 -18
  135. package/src/components/close-button/index.ts +0 -2
  136. package/src/components/command/command.recipe.ts +0 -17
  137. package/src/components/command/command.stories.tsx +0 -47
  138. package/src/components/command/command.tsx +0 -50
  139. package/src/components/command/index.ts +0 -1
  140. package/src/components/dialog/dialog.tsx +0 -67
  141. package/src/components/dialog/index.ts +0 -1
  142. package/src/components/dialog/namespace.ts +0 -18
  143. package/src/components/drawer/drawer.tsx +0 -57
  144. package/src/components/drawer/index.ts +0 -3
  145. package/src/components/drawer/namespace.ts +0 -19
  146. package/src/components/grid-list/grid-list.recipe.ts +0 -113
  147. package/src/components/icon-badge/icon-badge.recipe.ts +0 -57
  148. package/src/components/icon-badge/icon-badge.stories.tsx +0 -38
  149. package/src/components/icon-badge/icon-badge.tsx +0 -59
  150. package/src/components/icon-badge/index.ts +0 -2
  151. package/src/components/icons/create-icon.tsx +0 -41
  152. package/src/components/icons/icons.tsx +0 -119
  153. package/src/components/icons/index.ts +0 -1
  154. package/src/components/input-group/index.ts +0 -1
  155. package/src/components/input-group/input-group.tsx +0 -46
  156. package/src/components/link/index.ts +0 -2
  157. package/src/components/link/link.stories.tsx +0 -17
  158. package/src/components/link/link.test.tsx +0 -33
  159. package/src/components/link/link.tsx +0 -27
  160. package/src/components/loading-overlay/index.ts +0 -1
  161. package/src/components/loading-overlay/loading-overlay.recipe.ts +0 -61
  162. package/src/components/loading-overlay/loading-overlay.stories.tsx +0 -68
  163. package/src/components/loading-overlay/loading-overlay.tsx +0 -54
  164. package/src/components/loading-overlay/namespace.ts +0 -7
  165. package/src/components/navbar/index.ts +0 -1
  166. package/src/components/navbar/namespace.ts +0 -9
  167. package/src/components/navbar/navbar.recipe.ts +0 -109
  168. package/src/components/navbar/navbar.stories.tsx +0 -435
  169. package/src/components/navbar/navbar.test.tsx +0 -49
  170. package/src/components/navbar/navbar.tsx +0 -39
  171. package/src/components/number-input/index.ts +0 -2
  172. package/src/components/number-input/number-input.tsx +0 -41
  173. package/src/components/password-input/index.ts +0 -2
  174. package/src/components/password-input/password-input.tsx +0 -93
  175. package/src/components/persona/index.ts +0 -2
  176. package/src/components/persona/namespace.ts +0 -18
  177. package/src/components/persona/persona-primitive.tsx +0 -220
  178. package/src/components/persona/persona.recipe.ts +0 -94
  179. package/src/components/persona/persona.stories.tsx +0 -101
  180. package/src/components/persona/persona.tsx +0 -142
  181. package/src/components/pin-input/index.ts +0 -2
  182. package/src/components/pin-input/pin-input.tsx +0 -36
  183. package/src/components/radio/index.ts +0 -2
  184. package/src/components/radio/radio.tsx +0 -27
  185. package/src/components/search-input/index.ts +0 -2
  186. package/src/components/search-input/search-input.stories.tsx +0 -63
  187. package/src/components/search-input/search-input.tsx +0 -134
  188. package/src/components/select/index.ts +0 -1
  189. package/src/components/select/namespace.ts +0 -18
  190. package/src/components/select/select.tsx +0 -135
  191. package/src/components/sidebar/index.ts +0 -7
  192. package/src/components/sidebar/namespace.ts +0 -27
  193. package/src/components/sidebar/sidebar-item.recipe.ts +0 -65
  194. package/src/components/sidebar/sidebar.recipe.ts +0 -237
  195. package/src/components/sidebar/sidebar.stories.tsx +0 -903
  196. package/src/components/sidebar/sidebar.tsx +0 -208
  197. package/src/components/spinner/index.ts +0 -2
  198. package/src/components/spinner/spinner.stories.tsx +0 -19
  199. package/src/components/spinner/spinner.tsx +0 -21
  200. package/src/components/steps/index.ts +0 -1
  201. package/src/components/steps/namespace.ts +0 -16
  202. package/src/components/steps/steps.tsx +0 -82
  203. package/src/components/switch/index.ts +0 -3
  204. package/src/components/switch/switch.tsx +0 -39
  205. package/src/compositions/accordion.tsx +0 -47
  206. package/src/compositions/action-bar.tsx +0 -40
  207. package/src/compositions/alert.tsx +0 -51
  208. package/src/compositions/avatar.tsx +0 -74
  209. package/src/compositions/blockquote.tsx +0 -31
  210. package/src/compositions/checkbox-card.tsx +0 -57
  211. package/src/compositions/checkbox.tsx +0 -25
  212. package/src/compositions/clipboard.tsx +0 -107
  213. package/src/compositions/color-mode.tsx +0 -65
  214. package/src/compositions/data-list.tsx +0 -37
  215. package/src/compositions/empty-state.tsx +0 -34
  216. package/src/compositions/field.tsx +0 -33
  217. package/src/compositions/file-button.tsx +0 -166
  218. package/src/compositions/hover-card.tsx +0 -35
  219. package/src/compositions/link-button.tsx +0 -12
  220. package/src/compositions/menu.tsx +0 -108
  221. package/src/compositions/native-select.tsx +0 -57
  222. package/src/compositions/pagination.tsx +0 -207
  223. package/src/compositions/popover.tsx +0 -58
  224. package/src/compositions/progress-circle.tsx +0 -37
  225. package/src/compositions/progress.tsx +0 -40
  226. package/src/compositions/prose.tsx +0 -264
  227. package/src/compositions/provider.tsx +0 -12
  228. package/src/compositions/radio-card.tsx +0 -57
  229. package/src/compositions/radio.tsx +0 -24
  230. package/src/compositions/rating.tsx +0 -27
  231. package/src/compositions/segmented-control.tsx +0 -47
  232. package/src/compositions/skeleton.tsx +0 -44
  233. package/src/compositions/slider.tsx +0 -53
  234. package/src/compositions/stat.tsx +0 -75
  235. package/src/compositions/status.tsx +0 -29
  236. package/src/compositions/stepper-input.tsx +0 -49
  237. package/src/compositions/tag.tsx +0 -39
  238. package/src/compositions/timeline.tsx +0 -17
  239. package/src/compositions/toaster.tsx +0 -43
  240. package/src/compositions/toggle-tip.tsx +0 -62
  241. package/src/compositions/tooltip.tsx +0 -46
  242. package/src/index.ts +0 -7
  243. package/src/preset.ts +0 -9
  244. package/src/provider/index.ts +0 -4
  245. package/src/provider/sui-provider.tsx +0 -34
  246. package/src/provider/use-link.test.tsx +0 -60
  247. package/src/provider/use-link.tsx +0 -13
  248. package/src/styled-system/create-recipe-context.tsx +0 -91
  249. package/src/styled-system/create-slot-recipe-context.tsx +0 -188
  250. package/src/styled-system/empty.ts +0 -7
  251. package/src/styled-system/factory.types.ts +0 -11
  252. package/src/theme/animation-styles.ts +0 -53
  253. package/src/theme/breakpoints.ts +0 -11
  254. package/src/theme/conditions.ts +0 -26
  255. package/src/theme/fluid-font-sizes.ts +0 -65
  256. package/src/theme/global-css.ts +0 -94
  257. package/src/theme/index.ts +0 -72
  258. package/src/theme/layer-styles.ts +0 -116
  259. package/src/theme/recipes/chakra/accordion.ts +0 -145
  260. package/src/theme/recipes/chakra/action-bar.ts +0 -62
  261. package/src/theme/recipes/chakra/alert.ts +0 -157
  262. package/src/theme/recipes/chakra/avatar.ts +0 -141
  263. package/src/theme/recipes/chakra/badge.ts +0 -67
  264. package/src/theme/recipes/chakra/blockquote.ts +0 -83
  265. package/src/theme/recipes/chakra/breadcrumb.ts +0 -94
  266. package/src/theme/recipes/chakra/card.ts +0 -99
  267. package/src/theme/recipes/chakra/checkbox-card.ts +0 -212
  268. package/src/theme/recipes/chakra/checkbox.ts +0 -70
  269. package/src/theme/recipes/chakra/checkmark.ts +0 -83
  270. package/src/theme/recipes/chakra/code.ts +0 -17
  271. package/src/theme/recipes/chakra/collapsible.ts +0 -20
  272. package/src/theme/recipes/chakra/container.ts +0 -26
  273. package/src/theme/recipes/chakra/data-list.ts +0 -80
  274. package/src/theme/recipes/chakra/dialog.ts +0 -225
  275. package/src/theme/recipes/chakra/drawer.ts +0 -201
  276. package/src/theme/recipes/chakra/editable.ts +0 -88
  277. package/src/theme/recipes/chakra/empty-state.ts +0 -88
  278. package/src/theme/recipes/chakra/field.ts +0 -68
  279. package/src/theme/recipes/chakra/fieldset.ts +0 -62
  280. package/src/theme/recipes/chakra/file-upload.ts +0 -96
  281. package/src/theme/recipes/chakra/heading.ts +0 -27
  282. package/src/theme/recipes/chakra/hover-card.ts +0 -68
  283. package/src/theme/recipes/chakra/icon.ts +0 -30
  284. package/src/theme/recipes/chakra/input-addon.ts +0 -40
  285. package/src/theme/recipes/chakra/input.ts +0 -96
  286. package/src/theme/recipes/chakra/kbd.ts +0 -60
  287. package/src/theme/recipes/chakra/link.ts +0 -37
  288. package/src/theme/recipes/chakra/list.ts +0 -67
  289. package/src/theme/recipes/chakra/mark.ts +0 -27
  290. package/src/theme/recipes/chakra/menu.ts +0 -124
  291. package/src/theme/recipes/chakra/native-select.ts +0 -140
  292. package/src/theme/recipes/chakra/number-input.ts +0 -115
  293. package/src/theme/recipes/chakra/pin-input.ts +0 -27
  294. package/src/theme/recipes/chakra/popover.ts +0 -86
  295. package/src/theme/recipes/chakra/progress-circle.ts +0 -94
  296. package/src/theme/recipes/chakra/progress.ts +0 -127
  297. package/src/theme/recipes/chakra/radio-card.ts +0 -220
  298. package/src/theme/recipes/chakra/radio-group.ts +0 -72
  299. package/src/theme/recipes/chakra/radiomark.ts +0 -107
  300. package/src/theme/recipes/chakra/rating-group.ts +0 -94
  301. package/src/theme/recipes/chakra/segment-group.ts +0 -117
  302. package/src/theme/recipes/chakra/select.ts +0 -282
  303. package/src/theme/recipes/chakra/separator.ts +0 -51
  304. package/src/theme/recipes/chakra/skeleton.ts +0 -53
  305. package/src/theme/recipes/chakra/skip-nav-link.ts +0 -34
  306. package/src/theme/recipes/chakra/slider.ts +0 -178
  307. package/src/theme/recipes/chakra/spinner.ts +0 -32
  308. package/src/theme/recipes/chakra/stat.ts +0 -79
  309. package/src/theme/recipes/chakra/status.ts +0 -48
  310. package/src/theme/recipes/chakra/steps.ts +0 -218
  311. package/src/theme/recipes/chakra/switch.ts +0 -167
  312. package/src/theme/recipes/chakra/table.ts +0 -172
  313. package/src/theme/recipes/chakra/tabs.ts +0 -280
  314. package/src/theme/recipes/chakra/tag.ts +0 -131
  315. package/src/theme/recipes/chakra/textarea.ts +0 -88
  316. package/src/theme/recipes/chakra/timeline.ts +0 -138
  317. package/src/theme/recipes/chakra/toast.ts +0 -96
  318. package/src/theme/recipes/chakra/tooltip.ts +0 -40
  319. package/src/theme/recipes.ts +0 -46
  320. package/src/theme/semantic-tokens/colors.ts +0 -403
  321. package/src/theme/semantic-tokens/radii.ts +0 -7
  322. package/src/theme/semantic-tokens/shadows.ts +0 -52
  323. package/src/theme/slot-recipes.ts +0 -104
  324. package/src/theme/text-styles.ts +0 -39
  325. package/src/theme/tokens/animations.ts +0 -8
  326. package/src/theme/tokens/aspect-ratios.ts +0 -10
  327. package/src/theme/tokens/blurs.ts +0 -12
  328. package/src/theme/tokens/borders.ts +0 -9
  329. package/src/theme/tokens/colors.ts +0 -177
  330. package/src/theme/tokens/cursor.ts +0 -12
  331. package/src/theme/tokens/durations.ts +0 -11
  332. package/src/theme/tokens/easings.ts +0 -10
  333. package/src/theme/tokens/font-sizes.ts +0 -20
  334. package/src/theme/tokens/font-weights.ts +0 -13
  335. package/src/theme/tokens/fonts.ts +0 -15
  336. package/src/theme/tokens/keyframes.ts +0 -173
  337. package/src/theme/tokens/letter-spacing.ts +0 -9
  338. package/src/theme/tokens/line-heights.ts +0 -19
  339. package/src/theme/tokens/radius.ts +0 -18
  340. package/src/theme/tokens/sizes.ts +0 -71
  341. package/src/theme/tokens/spacing.ts +0 -38
  342. package/src/theme/tokens/z-indices.ts +0 -34
  343. package/src/theme/utils.ts +0 -46
  344. /package/dist/{chunk-KHRLZUV4.js → chunk-O2WVT2BP.js} +0 -0
@@ -1,120 +1,10 @@
1
1
  'use client'
2
- import "../../chunk-KTLWEUNW.js";
3
2
  import {
4
- CloseIcon,
5
- SearchIcon
6
- } from "../../chunk-VDXTEASE.js";
3
+ SearchInput
4
+ } from "../../chunk-LIYUBUOP.js";
5
+ import "../../chunk-KTLWEUNW.js";
6
+ import "../../chunk-VDXTEASE.js";
7
7
  import "../../chunk-RTMS5TJN.js";
8
-
9
- // src/components/search-input/search-input.tsx
10
- import React, { forwardRef } from "react";
11
- import {
12
- Group,
13
- IconButton,
14
- Input,
15
- InputElement,
16
- mergeRefs,
17
- useControllableState
18
- } from "@chakra-ui/react";
19
- import { callAll } from "@saas-ui/core/utils";
20
- import { jsx, jsxs } from "react/jsx-runtime";
21
- var SearchInput = forwardRef(
22
- (props, ref) => {
23
- const {
24
- placeholder = "Search",
25
- value: valueProp,
26
- defaultValue: defaultValueProp,
27
- size,
28
- variant,
29
- width = "full",
30
- icon = /* @__PURE__ */ jsx(SearchIcon, {}),
31
- resetIcon,
32
- endElement: endElementProp,
33
- onChange: onChangeProp,
34
- onReset: onResetProp,
35
- onKeyDown: onKeyDownProp,
36
- disabled,
37
- ...inputProps
38
- } = props;
39
- const inputRef = React.useRef(null);
40
- const [value, setValue] = useControllableState({
41
- value: valueProp,
42
- defaultValue: defaultValueProp
43
- });
44
- const onChange = React.useCallback(
45
- (e) => {
46
- setValue(e.target.value);
47
- },
48
- [setValue]
49
- );
50
- const onKeyDown = React.useCallback(
51
- (event) => {
52
- if (event.key === "Escape") {
53
- setValue("");
54
- onReset();
55
- }
56
- },
57
- [onResetProp, setValue]
58
- );
59
- const onReset = () => {
60
- var _a;
61
- setValue("");
62
- onResetProp == null ? void 0 : onResetProp();
63
- (_a = inputRef.current) == null ? void 0 : _a.focus();
64
- };
65
- const showReset = value && !props.disabled;
66
- const endElement = showReset ? /* @__PURE__ */ jsx(SearchInputResetButton, { size, children: resetIcon }) : endElementProp;
67
- return /* @__PURE__ */ jsxs(Group, { width, children: [
68
- /* @__PURE__ */ jsx(
69
- InputElement,
70
- {
71
- placement: "start",
72
- px: "0",
73
- aspectRatio: "9/10",
74
- fontSize: size,
75
- children: icon
76
- }
77
- ),
78
- /* @__PURE__ */ jsx(
79
- Input,
80
- {
81
- type: "text",
82
- placeholder,
83
- variant,
84
- size,
85
- value,
86
- disabled,
87
- ref: mergeRefs(ref, inputRef),
88
- onChange: callAll(onChange, onChangeProp),
89
- onKeyDown: callAll(onKeyDown, onKeyDownProp),
90
- ps: "calc(var(--input-height) - var(--input-height) / 10)",
91
- pe: "calc(var(--input-height) - var(--input-height) / 10)",
92
- ...inputProps
93
- }
94
- ),
95
- /* @__PURE__ */ jsx(InputElement, { placement: "end", children: endElement })
96
- ] });
97
- }
98
- );
99
- var SearchInputResetButton = forwardRef(
100
- (props, ref) => {
101
- const { children = /* @__PURE__ */ jsx(CloseIcon, {}), ...rest } = props;
102
- return /* @__PURE__ */ jsx(
103
- IconButton,
104
- {
105
- ref,
106
- variant: "ghost",
107
- "aria-label": "Reset search",
108
- me: "-2",
109
- aspectRatio: "square",
110
- height: "calc(100% - {spacing.2})",
111
- ...rest,
112
- children
113
- }
114
- );
115
- }
116
- );
117
- SearchInput.displayName = "SearchInput";
118
8
  export {
119
9
  SearchInput
120
10
  };
@@ -0,0 +1,60 @@
1
+ 'use client'
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/components/segmented-control/index.ts
22
+ var segmented_control_exports = {};
23
+ __export(segmented_control_exports, {
24
+ SegmentedControl: () => SegmentedControl
25
+ });
26
+ module.exports = __toCommonJS(segmented_control_exports);
27
+
28
+ // src/components/segmented-control/segmented-control.tsx
29
+ var import_react = require("react");
30
+ var import_react2 = require("@chakra-ui/react");
31
+ var import_jsx_runtime = require("react/jsx-runtime");
32
+ function normalize(items) {
33
+ return items.map((item) => {
34
+ if (typeof item === "string") return { value: item, label: item };
35
+ return item;
36
+ });
37
+ }
38
+ var SegmentedControl = (0, import_react.forwardRef)(function SegmentedControl2(props, ref) {
39
+ const { items, ...rest } = props;
40
+ const data = (0, import_react.useMemo)(() => normalize(items), [items]);
41
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react2.SegmentGroup.Root, { ref, ...rest, children: [
42
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.SegmentGroup.Indicator, {}),
43
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.For, { each: data, children: (item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
44
+ import_react2.SegmentGroup.Item,
45
+ {
46
+ value: item.value,
47
+ disabled: item.disabled,
48
+ children: [
49
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.SegmentGroup.ItemText, { children: item.label }),
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.SegmentGroup.ItemHiddenInput, {})
51
+ ]
52
+ },
53
+ item.value
54
+ ) })
55
+ ] });
56
+ });
57
+ // Annotate the CommonJS export names for ESM import in node:
58
+ 0 && (module.exports = {
59
+ SegmentedControl
60
+ });
@@ -0,0 +1,14 @@
1
+ import * as react from 'react';
2
+ import { SegmentGroup } from '@chakra-ui/react';
3
+
4
+ interface Item {
5
+ value: string;
6
+ label: React.ReactNode;
7
+ disabled?: boolean;
8
+ }
9
+ interface SegmentedControlProps extends SegmentGroup.RootProps {
10
+ items: Array<string | Item>;
11
+ }
12
+ declare const SegmentedControl: react.ForwardRefExoticComponent<SegmentedControlProps & react.RefAttributes<HTMLDivElement>>;
13
+
14
+ export { SegmentedControl, type SegmentedControlProps };
@@ -0,0 +1,14 @@
1
+ import * as react from 'react';
2
+ import { SegmentGroup } from '@chakra-ui/react';
3
+
4
+ interface Item {
5
+ value: string;
6
+ label: React.ReactNode;
7
+ disabled?: boolean;
8
+ }
9
+ interface SegmentedControlProps extends SegmentGroup.RootProps {
10
+ items: Array<string | Item>;
11
+ }
12
+ declare const SegmentedControl: react.ForwardRefExoticComponent<SegmentedControlProps & react.RefAttributes<HTMLDivElement>>;
13
+
14
+ export { SegmentedControl, type SegmentedControlProps };
@@ -0,0 +1,8 @@
1
+ 'use client'
2
+ import {
3
+ SegmentedControl
4
+ } from "../../chunk-SKXSBAOS.js";
5
+ import "../../chunk-RTMS5TJN.js";
6
+ export {
7
+ SegmentedControl
8
+ };
@@ -1,100 +1,10 @@
1
1
  'use client'
2
2
  import {
3
- CloseButton
4
- } from "../../chunk-FZW2DYK3.js";
3
+ namespace_exports
4
+ } from "../../chunk-S3CQW7GD.js";
5
+ import "../../chunk-FZW2DYK3.js";
5
6
  import "../../chunk-VDXTEASE.js";
6
- import {
7
- __export
8
- } from "../../chunk-RTMS5TJN.js";
9
-
10
- // src/components/select/namespace.ts
11
- var namespace_exports = {};
12
- __export(namespace_exports, {
13
- Content: () => SelectContent,
14
- Item: () => SelectItem,
15
- ItemGroup: () => SelectItemGroup,
16
- ItemText: () => SelectItemText,
17
- Label: () => SelectLabel,
18
- Root: () => SelectRoot,
19
- Trigger: () => SelectTrigger,
20
- ValueText: () => SelectValueText
21
- });
22
-
23
- // src/components/select/select.tsx
24
- import { forwardRef } from "react";
25
- import { Portal, Select as SelectPrimitive } from "@chakra-ui/react";
26
- import { jsx, jsxs } from "react/jsx-runtime";
27
- var SelectTrigger = forwardRef(
28
- function SelectTrigger2(props, ref) {
29
- const { children, clearable, ...rest } = props;
30
- return /* @__PURE__ */ jsxs(SelectPrimitive.Control, { ...rest, children: [
31
- /* @__PURE__ */ jsx(SelectPrimitive.Trigger, { ref, children }),
32
- /* @__PURE__ */ jsxs(SelectPrimitive.IndicatorGroup, { children: [
33
- clearable && /* @__PURE__ */ jsx(SelectClearTrigger, {}),
34
- /* @__PURE__ */ jsx(SelectPrimitive.Indicator, {})
35
- ] })
36
- ] });
37
- }
38
- );
39
- var SelectClearTrigger = forwardRef(function SelectClearTrigger2(props, ref) {
40
- return /* @__PURE__ */ jsx(SelectPrimitive.ClearTrigger, { asChild: true, ...props, ref, children: /* @__PURE__ */ jsx(
41
- CloseButton,
42
- {
43
- size: "xs",
44
- variant: "plain",
45
- focusVisibleRing: "inside",
46
- focusRingWidth: "2px",
47
- pointerEvents: "auto"
48
- }
49
- ) });
50
- });
51
- var SelectContent = forwardRef(
52
- function SelectContent2(props, ref) {
53
- const { portalled = true, portalRef, ...rest } = props;
54
- return /* @__PURE__ */ jsx(Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsx(SelectPrimitive.Positioner, { children: /* @__PURE__ */ jsx(SelectPrimitive.Content, { ...rest, ref }) }) });
55
- }
56
- );
57
- var SelectItem = forwardRef(
58
- function SelectItem2(props, ref) {
59
- const { item, children, ...rest } = props;
60
- return /* @__PURE__ */ jsxs(SelectPrimitive.Item, { item, ...rest, ref, children: [
61
- children,
62
- /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, {})
63
- ] }, item.value);
64
- }
65
- );
66
- var SelectValueText = forwardRef(function SelectValueText2(props, ref) {
67
- const { children, ...rest } = props;
68
- return /* @__PURE__ */ jsx(SelectPrimitive.ValueText, { ...rest, ref, children: /* @__PURE__ */ jsx(SelectPrimitive.Context, { children: (select) => {
69
- const items = select.selectedItems;
70
- if (items.length === 0) return props.placeholder;
71
- if (children) return children(items);
72
- if (items.length === 1)
73
- return select.collection.stringifyItem(items[0]);
74
- return `${items.length} selected`;
75
- } }) });
76
- });
77
- var SelectRoot = forwardRef(function SelectRoot2(props, ref) {
78
- return /* @__PURE__ */ jsx(
79
- SelectPrimitive.Root,
80
- {
81
- ...props,
82
- ref,
83
- positioning: { sameWidth: true, ...props.positioning }
84
- }
85
- );
86
- });
87
- var SelectItemGroup = forwardRef(
88
- function SelectItemGroup2(props, ref) {
89
- const { children, label, ...rest } = props;
90
- return /* @__PURE__ */ jsxs(SelectPrimitive.ItemGroup, { ...rest, ref, children: [
91
- /* @__PURE__ */ jsx(SelectPrimitive.ItemGroupLabel, { children: label }),
92
- children
93
- ] });
94
- }
95
- );
96
- var SelectLabel = SelectPrimitive.Label;
97
- var SelectItemText = SelectPrimitive.ItemText;
7
+ import "../../chunk-RTMS5TJN.js";
98
8
  export {
99
9
  namespace_exports as Select
100
10
  };
@@ -19,18 +19,18 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
20
 
21
21
  // src/components/sidebar/index.ts
22
- var sidebar_exports = {};
23
- __export(sidebar_exports, {
24
- Sidebar: () => namespace_exports,
25
- useSidebar: () => import_sidebar.useSidebar,
22
+ var sidebar_exports2 = {};
23
+ __export(sidebar_exports2, {
24
+ Sidebar: () => sidebar_exports,
25
+ useSidebar: () => import_sidebar2.useSidebar,
26
26
  useSidebarItemStyles: () => useSidebarItemStyles,
27
27
  useSidebarStyles: () => useSidebarStyles
28
28
  });
29
- module.exports = __toCommonJS(sidebar_exports);
29
+ module.exports = __toCommonJS(sidebar_exports2);
30
30
 
31
- // src/components/sidebar/namespace.ts
32
- var namespace_exports = {};
33
- __export(namespace_exports, {
31
+ // src/components/sidebar/sidebar.tsx
32
+ var sidebar_exports = {};
33
+ __export(sidebar_exports, {
34
34
  Backdrop: () => SidebarBackdrop,
35
35
  Body: () => SidebarBody,
36
36
  FlyoutTrigger: () => SidebarFlyoutTrigger,
@@ -42,18 +42,17 @@ __export(namespace_exports, {
42
42
  GroupTitle: () => SidebarGroupTitle,
43
43
  Header: () => SidebarHeader,
44
44
  NavButton: () => SidebarNavButton,
45
+ NavButtonEndElement: () => SidebarNavButtonEndElement,
45
46
  NavItem: () => SidebarNavItem,
46
- NavItemEndElement: () => SidebarNavItemEndElement,
47
47
  Provider: () => SidebarProvider,
48
48
  Root: () => SidebarRoot,
49
49
  Track: () => SidebarTrack,
50
50
  Trigger: () => SidebarTrigger
51
51
  });
52
+ var import_sidebar = require("@saas-ui/core/sidebar");
52
53
 
53
- // src/components/sidebar/sidebar.tsx
54
+ // src/components/sidebar/sidebar.context.ts
54
55
  var import_react = require("@chakra-ui/react");
55
- var import_sidebar = require("@saas-ui/core/sidebar");
56
- var import_jsx_runtime = require("react/jsx-runtime");
57
56
  var {
58
57
  withContext,
59
58
  useRecipeResult,
@@ -61,8 +60,18 @@ var {
61
60
  ClassNamesProvider,
62
61
  useStyles: useSidebarStyles
63
62
  } = (0, import_react.createSlotRecipeContext)({
64
- key: "sidebar"
63
+ key: "suiSidebar"
65
64
  });
65
+ var {
66
+ withProvider: withItemProvider,
67
+ withContext: withItemContext,
68
+ useStyles: useSidebarItemStyles
69
+ } = (0, import_react.createSlotRecipeContext)({
70
+ key: "suiSidebarNavItem"
71
+ });
72
+
73
+ // src/components/sidebar/sidebar.tsx
74
+ var import_jsx_runtime = require("react/jsx-runtime");
66
75
  var SidebarProvider = function SidebarProvider2(props) {
67
76
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar.Sidebar.Provider, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RecipeProvider, { ...props, children: props.children }) });
68
77
  };
@@ -78,21 +87,35 @@ var SidebarRoot = withContext(
78
87
  import_sidebar.Sidebar.Root,
79
88
  "root"
80
89
  );
81
- var SidebarTrigger = withContext(import_sidebar.Sidebar.Trigger, "trigger", {
82
- forwardAsChild: true
83
- });
90
+ var SidebarTrigger = withContext(
91
+ import_sidebar.Sidebar.Trigger,
92
+ "trigger",
93
+ {
94
+ forwardAsChild: true
95
+ }
96
+ );
84
97
  var SidebarFlyoutTrigger = withContext(import_sidebar.Sidebar.FlyoutTrigger, "flyoutTrigger", {
85
98
  forwardAsChild: true
86
99
  });
87
- var SidebarBackdrop = withContext(import_sidebar.Sidebar.Backdrop, "backdrop", {
88
- forwardAsChild: true
89
- });
90
- var SidebarHeader = withContext(import_sidebar.Sidebar.Header, "header");
100
+ var SidebarBackdrop = withContext(
101
+ import_sidebar.Sidebar.Backdrop,
102
+ "backdrop",
103
+ {
104
+ forwardAsChild: true
105
+ }
106
+ );
107
+ var SidebarHeader = withContext(
108
+ import_sidebar.Sidebar.Header,
109
+ "header"
110
+ );
91
111
  var SidebarBody = withContext(
92
112
  import_sidebar.Sidebar.Body,
93
113
  "body"
94
114
  );
95
- var SidebarFooter = withContext(import_sidebar.Sidebar.Footer, "footer");
115
+ var SidebarFooter = withContext(
116
+ import_sidebar.Sidebar.Footer,
117
+ "footer"
118
+ );
96
119
  var SidebarTrack = withContext(
97
120
  import_sidebar.Sidebar.Track,
98
121
  "track",
@@ -109,22 +132,31 @@ var SidebarGroup = withContext(
109
132
  }
110
133
  }
111
134
  );
112
- var SidebarGroupHeader = withContext(import_sidebar.Sidebar.GroupHeader, "groupHeader");
135
+ var SidebarGroupHeader = withContext(
136
+ import_sidebar.Sidebar.GroupHeader,
137
+ "groupHeader"
138
+ );
113
139
  var SidebarGroupTitle = withContext(import_sidebar.Sidebar.GroupTitle, "groupTitle");
114
140
  var SidebarGroupEndElement = withContext(import_sidebar.Sidebar.GroupEndElement, "groupEndElement");
115
- var SidebarGroupContent = withContext(import_sidebar.Sidebar.GroupContent, "groupContent");
116
- var {
117
- withProvider: withItemProvider,
118
- withContext: withItemContext,
119
- useStyles: useSidebarItemStyles
120
- } = (0, import_react.createSlotRecipeContext)({
121
- key: "sidebarNavItem"
122
- });
123
- var SidebarNavItem = withItemProvider(import_sidebar.Sidebar.NavItem, "item");
141
+ var SidebarGroupContent = withContext(
142
+ import_sidebar.Sidebar.GroupContent,
143
+ "groupContent"
144
+ );
145
+ var SidebarNavItem = withItemProvider(
146
+ import_sidebar.Sidebar.NavItem,
147
+ "item"
148
+ );
124
149
  var SidebarNavButton = withItemContext(import_sidebar.Sidebar.NavButton, "button", {
125
150
  forwardAsChild: true
126
151
  });
127
- var SidebarNavItemEndElement = withItemContext(import_sidebar.Sidebar.NavItemEndElement, "endElement");
152
+ var SidebarNavButtonEndElement = withItemContext(import_sidebar.Sidebar.NavItemEndElement, "endElement", {
153
+ defaultProps: {
154
+ "data-slot": "endElement"
155
+ }
156
+ });
157
+
158
+ // src/components/sidebar/index.ts
159
+ var import_sidebar2 = require("@saas-ui/core/sidebar");
128
160
  // Annotate the CommonJS export names for ESM import in node:
129
161
  0 && (module.exports = {
130
162
  Sidebar,