@cerberus-design/react 0.15.0-next-e0ce56e → 0.15.0-next-739c492

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 (204) hide show
  1. package/build/legacy/_tsup-dts-rollup.d.cts +313 -112
  2. package/build/legacy/components/Checkbox.cjs +27 -35
  3. package/build/legacy/components/Checkbox.cjs.map +1 -1
  4. package/build/legacy/components/DatePicker.client.cjs +67 -89
  5. package/build/legacy/components/DatePicker.client.cjs.map +1 -1
  6. package/build/legacy/components/Fieldset.cjs +4 -17
  7. package/build/legacy/components/Fieldset.cjs.map +1 -1
  8. package/build/legacy/components/FieldsetLabel.cjs.map +1 -1
  9. package/build/legacy/components/FileStatus.cjs +126 -79
  10. package/build/legacy/components/FileStatus.cjs.map +1 -1
  11. package/build/legacy/components/Legend.cjs +10 -22
  12. package/build/legacy/components/Legend.cjs.map +1 -1
  13. package/build/legacy/components/Radio.cjs +4 -21
  14. package/build/legacy/components/Radio.cjs.map +1 -1
  15. package/build/legacy/components/Select.cjs +19 -54
  16. package/build/legacy/components/Select.cjs.map +1 -1
  17. package/build/legacy/components/Toggle.cjs +17 -24
  18. package/build/legacy/components/Toggle.cjs.map +1 -1
  19. package/build/legacy/components/button/button.cjs +1 -1
  20. package/build/legacy/components/button/button.cjs.map +1 -1
  21. package/build/legacy/components/button/index.cjs +1 -1
  22. package/build/legacy/components/button/index.cjs.map +1 -1
  23. package/build/legacy/components/button/parts.cjs +1 -1
  24. package/build/legacy/components/button/parts.cjs.map +1 -1
  25. package/build/legacy/components/{FieldMessage.cjs → deprecated/FieldMessage.cjs} +4 -17
  26. package/build/legacy/components/deprecated/FieldMessage.cjs.map +1 -0
  27. package/build/legacy/components/{Textarea.cjs → deprecated/Label.cjs} +24 -36
  28. package/build/legacy/components/deprecated/Label.cjs.map +1 -0
  29. package/build/legacy/components/field/field.cjs +130 -0
  30. package/build/legacy/components/field/field.cjs.map +1 -0
  31. package/build/legacy/components/field/index.cjs +261 -0
  32. package/build/legacy/components/field/index.cjs.map +1 -0
  33. package/build/legacy/components/field/parts.cjs +184 -0
  34. package/build/legacy/components/field/parts.cjs.map +1 -0
  35. package/build/legacy/components/field/primitives.cjs +186 -0
  36. package/build/legacy/components/field/primitives.cjs.map +1 -0
  37. package/build/legacy/components/field/start-indicator.cjs +45 -0
  38. package/build/legacy/components/field/start-indicator.cjs.map +1 -0
  39. package/build/legacy/components/field/status-indicator.cjs +78 -0
  40. package/build/legacy/components/field/status-indicator.cjs.map +1 -0
  41. package/build/legacy/context/confirm-modal.cjs +1 -1
  42. package/build/legacy/context/confirm-modal.cjs.map +1 -1
  43. package/build/legacy/context/cta-modal.cjs +1 -1
  44. package/build/legacy/context/cta-modal.cjs.map +1 -1
  45. package/build/legacy/context/field.cjs +23 -4
  46. package/build/legacy/context/field.cjs.map +1 -1
  47. package/build/legacy/context/notification-center.cjs.map +1 -1
  48. package/build/legacy/context/prompt-modal.cjs +168 -166
  49. package/build/legacy/context/prompt-modal.cjs.map +1 -1
  50. package/build/legacy/hooks/useDate.cjs.map +1 -1
  51. package/build/legacy/index.cjs +1156 -1067
  52. package/build/legacy/index.cjs.map +1 -1
  53. package/build/legacy/utils/index.cjs +22 -2
  54. package/build/legacy/utils/index.cjs.map +1 -1
  55. package/build/modern/_tsup-dts-rollup.d.ts +313 -112
  56. package/build/modern/{chunk-2JX27W6Y.js → chunk-2BIHLH4V.js} +2 -2
  57. package/build/modern/chunk-2BIHLH4V.js.map +1 -0
  58. package/build/modern/{chunk-3ZDFQO25.js → chunk-6EUC3SUI.js} +4 -7
  59. package/build/modern/chunk-6EUC3SUI.js.map +1 -0
  60. package/build/modern/{chunk-MER66QUY.js → chunk-6KZVE4HC.js} +1 -1
  61. package/build/modern/{chunk-MER66QUY.js.map → chunk-6KZVE4HC.js.map} +1 -1
  62. package/build/modern/{chunk-FTPZHG6J.js → chunk-6WOJAMZV.js} +3 -9
  63. package/build/modern/chunk-6WOJAMZV.js.map +1 -0
  64. package/build/modern/chunk-7VA5SXTY.js +31 -0
  65. package/build/modern/chunk-7VA5SXTY.js.map +1 -0
  66. package/build/modern/chunk-7YVOZULL.js +23 -0
  67. package/build/modern/chunk-7YVOZULL.js.map +1 -0
  68. package/build/modern/{chunk-KU2AWAK3.js → chunk-B2A6QFKT.js} +4 -17
  69. package/build/modern/chunk-B2A6QFKT.js.map +1 -0
  70. package/build/modern/chunk-BL7G3577.js +29 -0
  71. package/build/modern/chunk-BL7G3577.js.map +1 -0
  72. package/build/modern/chunk-C5NL3X7W.js +96 -0
  73. package/build/modern/chunk-C5NL3X7W.js.map +1 -0
  74. package/build/modern/chunk-CNA2VKAH.js +43 -0
  75. package/build/modern/chunk-CNA2VKAH.js.map +1 -0
  76. package/build/modern/{chunk-Z7FGXAND.js → chunk-FMRWRVUS.js} +2 -2
  77. package/build/modern/{chunk-NGOLRISW.js → chunk-FVE4GBB7.js} +9 -8
  78. package/build/modern/chunk-FVE4GBB7.js.map +1 -0
  79. package/build/modern/{chunk-7P7OWBGV.js → chunk-G2VFEBY4.js} +8 -8
  80. package/build/modern/chunk-G2VFEBY4.js.map +1 -0
  81. package/build/modern/{chunk-XQICKZH4.js → chunk-GENS32QO.js} +10 -8
  82. package/build/modern/chunk-GENS32QO.js.map +1 -0
  83. package/build/modern/{chunk-Q4IV5NUT.js → chunk-GNPGG4ND.js} +37 -40
  84. package/build/modern/chunk-GNPGG4ND.js.map +1 -0
  85. package/build/modern/{chunk-7S47NSGR.js → chunk-H54FR7IP.js} +2 -2
  86. package/build/modern/chunk-IGSC4IEA.js +37 -0
  87. package/build/modern/chunk-IGSC4IEA.js.map +1 -0
  88. package/build/modern/{chunk-JWIJHSI6.js → chunk-L7N24B6B.js} +3 -6
  89. package/build/modern/chunk-L7N24B6B.js.map +1 -0
  90. package/build/modern/{chunk-3RGRHMJQ.js → chunk-LCN7LYTU.js} +5 -5
  91. package/build/modern/{chunk-3BM6MZ4A.js → chunk-MWRO5QYD.js} +1 -1
  92. package/build/modern/chunk-MWRO5QYD.js.map +1 -0
  93. package/build/modern/{chunk-PZAZKQMO.js → chunk-OYT7RGC7.js} +1 -1
  94. package/build/modern/chunk-OYT7RGC7.js.map +1 -0
  95. package/build/modern/{chunk-ILQW5VZT.js → chunk-RBNOEAWJ.js} +4 -7
  96. package/build/modern/chunk-RBNOEAWJ.js.map +1 -0
  97. package/build/modern/{chunk-5QONP7GT.js → chunk-S2X5OEPK.js} +2 -10
  98. package/build/modern/chunk-S2X5OEPK.js.map +1 -0
  99. package/build/modern/chunk-TYPULJMJ.js +1 -0
  100. package/build/modern/chunk-Z52R6ABJ.js +21 -0
  101. package/build/modern/chunk-Z52R6ABJ.js.map +1 -0
  102. package/build/modern/components/Checkbox.js +1 -2
  103. package/build/modern/components/DatePicker.client.js +3 -4
  104. package/build/modern/components/Fieldset.js +1 -2
  105. package/build/modern/components/FieldsetLabel.js +1 -1
  106. package/build/modern/components/FileStatus.js +9 -3
  107. package/build/modern/components/Legend.js +1 -2
  108. package/build/modern/components/Radio.js +1 -3
  109. package/build/modern/components/Select.js +1 -2
  110. package/build/modern/components/Toggle.js +1 -2
  111. package/build/modern/components/button/button.js +1 -1
  112. package/build/modern/components/button/index.js +2 -2
  113. package/build/modern/components/button/parts.js +2 -2
  114. package/build/modern/components/deprecated/FieldMessage.js +8 -0
  115. package/build/modern/components/deprecated/Label.js +17 -0
  116. package/build/modern/components/field/field.js +14 -0
  117. package/build/modern/components/field/index.js +42 -0
  118. package/build/modern/components/field/index.js.map +1 -0
  119. package/build/modern/components/field/parts.js +11 -0
  120. package/build/modern/components/field/parts.js.map +1 -0
  121. package/build/modern/components/field/primitives.js +24 -0
  122. package/build/modern/components/field/primitives.js.map +1 -0
  123. package/build/modern/components/field/start-indicator.js +7 -0
  124. package/build/modern/components/field/start-indicator.js.map +1 -0
  125. package/build/modern/components/field/status-indicator.js +9 -0
  126. package/build/modern/components/field/status-indicator.js.map +1 -0
  127. package/build/modern/context/confirm-modal.js +2 -2
  128. package/build/modern/context/cta-modal.js +4 -4
  129. package/build/modern/context/field.js +34 -4
  130. package/build/modern/context/field.js.map +1 -1
  131. package/build/modern/context/notification-center.js +2 -2
  132. package/build/modern/context/prompt-modal.js +10 -5
  133. package/build/modern/hooks/useDate.js +1 -1
  134. package/build/modern/index.js +85 -62
  135. package/build/modern/index.js.map +1 -1
  136. package/build/modern/utils/index.js +5 -3
  137. package/package.json +2 -2
  138. package/src/components/Checkbox.tsx +13 -9
  139. package/src/components/DatePicker.client.tsx +2 -14
  140. package/src/components/Fieldset.tsx +3 -3
  141. package/src/components/FieldsetLabel.tsx +5 -2
  142. package/src/components/FileStatus.tsx +4 -5
  143. package/src/components/Legend.tsx +5 -6
  144. package/src/components/Radio.tsx +2 -7
  145. package/src/components/Select.tsx +1 -16
  146. package/src/components/Toggle.tsx +14 -7
  147. package/src/components/button/button.tsx +1 -1
  148. package/src/components/button/parts.ts +6 -0
  149. package/src/components/{FieldMessage.tsx → deprecated/FieldMessage.tsx} +2 -13
  150. package/src/components/deprecated/Label.tsx +24 -0
  151. package/src/components/field/field.tsx +77 -0
  152. package/src/components/field/index.ts +5 -0
  153. package/src/components/field/parts.ts +71 -0
  154. package/src/components/field/primitives.tsx +197 -0
  155. package/src/components/field/start-indicator.tsx +23 -0
  156. package/src/components/field/status-indicator.tsx +58 -0
  157. package/src/context/field.tsx +6 -5
  158. package/src/context/prompt-modal.tsx +16 -18
  159. package/src/hooks/useDate.ts +1 -7
  160. package/src/index.ts +4 -6
  161. package/src/utils/index.ts +30 -0
  162. package/build/legacy/components/FieldMessage.cjs.map +0 -1
  163. package/build/legacy/components/Input.cjs +0 -95
  164. package/build/legacy/components/Input.cjs.map +0 -1
  165. package/build/legacy/components/Label.cjs +0 -93
  166. package/build/legacy/components/Label.cjs.map +0 -1
  167. package/build/legacy/components/Textarea.cjs.map +0 -1
  168. package/build/modern/chunk-2JX27W6Y.js.map +0 -1
  169. package/build/modern/chunk-3BM6MZ4A.js.map +0 -1
  170. package/build/modern/chunk-3ZDFQO25.js.map +0 -1
  171. package/build/modern/chunk-5QONP7GT.js.map +0 -1
  172. package/build/modern/chunk-7P7OWBGV.js.map +0 -1
  173. package/build/modern/chunk-C5EHJUS5.js +0 -10
  174. package/build/modern/chunk-C5EHJUS5.js.map +0 -1
  175. package/build/modern/chunk-FTPZHG6J.js.map +0 -1
  176. package/build/modern/chunk-ILQW5VZT.js.map +0 -1
  177. package/build/modern/chunk-JIJM6JFJ.js +0 -36
  178. package/build/modern/chunk-JIJM6JFJ.js.map +0 -1
  179. package/build/modern/chunk-JWIJHSI6.js.map +0 -1
  180. package/build/modern/chunk-KU2AWAK3.js.map +0 -1
  181. package/build/modern/chunk-NGOLRISW.js.map +0 -1
  182. package/build/modern/chunk-NMF2HYWO.js +0 -50
  183. package/build/modern/chunk-NMF2HYWO.js.map +0 -1
  184. package/build/modern/chunk-PZAZKQMO.js.map +0 -1
  185. package/build/modern/chunk-Q4IV5NUT.js.map +0 -1
  186. package/build/modern/chunk-UZDVOIW5.js +0 -33
  187. package/build/modern/chunk-UZDVOIW5.js.map +0 -1
  188. package/build/modern/chunk-VYCU7I4J.js +0 -43
  189. package/build/modern/chunk-VYCU7I4J.js.map +0 -1
  190. package/build/modern/chunk-XQICKZH4.js.map +0 -1
  191. package/build/modern/components/FieldMessage.js +0 -9
  192. package/build/modern/components/Input.js +0 -11
  193. package/build/modern/components/Label.js +0 -10
  194. package/build/modern/components/Textarea.js +0 -9
  195. package/src/components/Input.tsx +0 -69
  196. package/src/components/Label.tsx +0 -69
  197. package/src/components/Textarea.tsx +0 -52
  198. /package/build/modern/{chunk-Z7FGXAND.js.map → chunk-FMRWRVUS.js.map} +0 -0
  199. /package/build/modern/{chunk-7S47NSGR.js.map → chunk-H54FR7IP.js.map} +0 -0
  200. /package/build/modern/{chunk-3RGRHMJQ.js.map → chunk-LCN7LYTU.js.map} +0 -0
  201. /package/build/modern/{components/FieldMessage.js.map → chunk-TYPULJMJ.js.map} +0 -0
  202. /package/build/modern/components/{Input.js.map → deprecated/FieldMessage.js.map} +0 -0
  203. /package/build/modern/components/{Label.js.map → deprecated/Label.js.map} +0 -0
  204. /package/build/modern/components/{Textarea.js.map → field/field.js.map} +0 -0
@@ -49,4 +49,4 @@ export {
49
49
  Button,
50
50
  ButtonIcon
51
51
  };
52
- //# sourceMappingURL=chunk-MER66QUY.js.map
52
+ //# sourceMappingURL=chunk-6KZVE4HC.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/button/button.tsx"],"sourcesContent":["'use client'\n\nimport {\n type ButtonHTMLAttributes,\n type PropsWithChildren,\n createContext,\n useContext,\n useMemo,\n} from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n button,\n type ButtonVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { Show } from '../Show'\nimport { Spinner } from '../Spinner'\nimport { Box } from '@cerberus/styled-system/jsx'\n\n/**\n * This module contains the Button component.\n * @module\n */\n\ninterface ButtonContextValue {\n pending: boolean\n}\n\nconst ButtonContext = createContext<ButtonContextValue>({\n pending: false,\n})\n\nexport type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &\n ButtonVariantProps & {\n pending?: boolean\n }\n\n/**\n * A component that allows the user to perform actions\n * @see https://cerberus.digitalu.design/react/button\n */\nexport function Button(props: ButtonProps): JSX.Element {\n const { palette, usage, shape, size, pending = false, ...nativeProps } = props\n const value = useMemo(() => ({ pending }), [pending])\n\n return (\n <ButtonContext.Provider value={value}>\n <button\n {...nativeProps}\n disabled={pending || nativeProps.disabled}\n className={cx(\n nativeProps.className,\n button({\n palette,\n usage,\n shape,\n size,\n }),\n )}\n />\n </ButtonContext.Provider>\n )\n}\n\n/**\n * An icon to display in a button that utilizes the pending state to display\n * a loading spinner.\n */\nexport function ButtonIcon(props: PropsWithChildren<object>) {\n const { pending } = useContext(ButtonContext)\n return (\n <Show when={pending} fallback={<>{props.children}</>}>\n <Box w=\"4\">\n <Spinner />\n </Box>\n </Show>\n )\n}\n"],"mappings":";;;;;;;;AAEA;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,UAAU;AACnB;AAAA,EACE;AAAA,OAEK;AAGP,SAAS,WAAW;AA8Bd,SAwB6B,UAxB7B;AAnBN,IAAM,gBAAgB,cAAkC;AAAA,EACtD,SAAS;AACX,CAAC;AAWM,SAAS,OAAO,OAAiC;AACtD,QAAM,EAAE,SAAS,OAAO,OAAO,MAAM,UAAU,OAAO,GAAG,YAAY,IAAI;AACzE,QAAM,QAAQ,QAAQ,OAAO,EAAE,QAAQ,IAAI,CAAC,OAAO,CAAC;AAEpD,SACE,oBAAC,cAAc,UAAd,EAAuB,OACtB;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAU,WAAW,YAAY;AAAA,MACjC,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA;AAAA,EACF,GACF;AAEJ;AAMO,SAAS,WAAW,OAAkC;AAC3D,QAAM,EAAE,QAAQ,IAAI,WAAW,aAAa;AAC5C,SACE,oBAAC,QAAK,MAAM,SAAS,UAAU,gCAAG,gBAAM,UAAS,GAC/C,8BAAC,OAAI,GAAE,KACL,8BAAC,WAAQ,GACX,GACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/button/button.tsx"],"sourcesContent":["'use client'\n\nimport {\n type ButtonHTMLAttributes,\n type PropsWithChildren,\n createContext,\n useContext,\n useMemo,\n} from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n button,\n type ButtonVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { Box } from '@cerberus/styled-system/jsx'\nimport { Show } from '../Show'\nimport { Spinner } from '../Spinner'\n\n/**\n * This module contains the Button component.\n * @module\n */\n\ninterface ButtonContextValue {\n pending: boolean\n}\n\nconst ButtonContext = createContext<ButtonContextValue>({\n pending: false,\n})\n\nexport type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &\n ButtonVariantProps & {\n pending?: boolean\n }\n\n/**\n * A component that allows the user to perform actions\n * @see https://cerberus.digitalu.design/react/button\n */\nexport function Button(props: ButtonProps): JSX.Element {\n const { palette, usage, shape, size, pending = false, ...nativeProps } = props\n const value = useMemo(() => ({ pending }), [pending])\n\n return (\n <ButtonContext.Provider value={value}>\n <button\n {...nativeProps}\n disabled={pending || nativeProps.disabled}\n className={cx(\n nativeProps.className,\n button({\n palette,\n usage,\n shape,\n size,\n }),\n )}\n />\n </ButtonContext.Provider>\n )\n}\n\n/**\n * An icon to display in a button that utilizes the pending state to display\n * a loading spinner.\n */\nexport function ButtonIcon(props: PropsWithChildren<object>) {\n const { pending } = useContext(ButtonContext)\n return (\n <Show when={pending} fallback={<>{props.children}</>}>\n <Box w=\"4\">\n <Spinner />\n </Box>\n </Show>\n )\n}\n"],"mappings":";;;;;;;;AAEA;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,UAAU;AACnB;AAAA,EACE;AAAA,OAEK;AACP,SAAS,WAAW;AAgCd,SAwB6B,UAxB7B;AAnBN,IAAM,gBAAgB,cAAkC;AAAA,EACtD,SAAS;AACX,CAAC;AAWM,SAAS,OAAO,OAAiC;AACtD,QAAM,EAAE,SAAS,OAAO,OAAO,MAAM,UAAU,OAAO,GAAG,YAAY,IAAI;AACzE,QAAM,QAAQ,QAAQ,OAAO,EAAE,QAAQ,IAAI,CAAC,OAAO,CAAC;AAEpD,SACE,oBAAC,cAAc,UAAd,EAAuB,OACtB;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAU,WAAW,YAAY;AAAA,MACjC,WAAW;AAAA,QACT,YAAY;AAAA,QACZ,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA;AAAA,EACF,GACF;AAEJ;AAMO,SAAS,WAAW,OAAkC;AAC3D,QAAM,EAAE,QAAQ,IAAI,WAAW,aAAa;AAC5C,SACE,oBAAC,QAAK,MAAM,SAAS,UAAU,gCAAG,gBAAM,UAAS,GAC/C,8BAAC,OAAI,GAAE,KACL,8BAAC,WAAQ,GACX,GACF;AAEJ;","names":[]}
@@ -1,15 +1,11 @@
1
- import {
2
- useFieldContext
3
- } from "./chunk-UZDVOIW5.js";
4
-
5
1
  // src/components/Radio.tsx
2
+ import { Field } from "@ark-ui/react/field";
6
3
  import { cx } from "@cerberus/styled-system/css";
7
4
  import { hstack } from "@cerberus/styled-system/patterns";
8
5
  import { radio } from "@cerberus/styled-system/recipes";
9
6
  import { jsx, jsxs } from "react/jsx-runtime";
10
7
  function Radio(props) {
11
8
  const { children, size, ...nativeProps } = props;
12
- const { invalid, ...state } = useFieldContext();
13
9
  const styles = radio({ size });
14
10
  return /* @__PURE__ */ jsxs(
15
11
  "div",
@@ -24,11 +20,9 @@ function Radio(props) {
24
20
  tabIndex: 0,
25
21
  children: [
26
22
  /* @__PURE__ */ jsx(
27
- "input",
23
+ Field.Input,
28
24
  {
29
25
  ...nativeProps,
30
- ...state,
31
- ...invalid && { "aria-invalid": true },
32
26
  className: cx(nativeProps.className, styles.input),
33
27
  tabIndex: -1,
34
28
  type: "radio"
@@ -43,4 +37,4 @@ function Radio(props) {
43
37
  export {
44
38
  Radio
45
39
  };
46
- //# sourceMappingURL=chunk-FTPZHG6J.js.map
40
+ //# sourceMappingURL=chunk-6WOJAMZV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Radio.tsx"],"sourcesContent":["import { Field } from '@ark-ui/react/field'\nimport { cx } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport { radio } from '@cerberus/styled-system/recipes'\nimport type { RecipeVariantProps } from '@cerberus/styled-system/types'\nimport type { InputHTMLAttributes, PropsWithChildren } from 'react'\n\n/**\n * This module contains the Radio component.\n * @module\n */\n\nexport type RadioRecipe = RecipeVariantProps<typeof radio>\nexport interface RadioBaseProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {\n /**\n * A unique identifier for the radio button. Required for accessibility.\n */\n id: string\n}\nexport type RadioProps = RadioBaseProps & RadioRecipe\n\n/**\n * The Radio component is used to allow users to select a single option from a list of options.\n * @see https://cerberus.digitalu.design/react/radio\n * @memberof module:Field\n * @example\n * ```tsx\n * <Field>\n * <fieldset name=\"fruit\">\n * <Radio id=\"radio-1\" name=\"fruit\" value=\"1\">\n * Option 1\n * </Radio>\n * <Radio id=\"radio-2\" name=\"fruit\" value=\"2\">\n * Option 2\n * </Radio>\n * <Radio id=\"radio-3\" name=\"fruit\" value=\"3\">\n * Option 3\n * </Radio>\n * </fieldset>\n * </Field>\n * ```\n */\nexport function Radio(props: PropsWithChildren<RadioProps>) {\n const { children, size, ...nativeProps } = props\n const styles = radio({ size })\n\n return (\n <div\n className={cx(\n 'group',\n hstack({\n gap: 'sm',\n }),\n styles.root,\n )}\n tabIndex={0}\n >\n <Field.Input\n {...nativeProps}\n className={cx(nativeProps.className, styles.input)}\n tabIndex={-1}\n type=\"radio\"\n />\n {children}\n </div>\n )\n}\n"],"mappings":";AAAA,SAAS,aAAa;AACtB,SAAS,UAAU;AACnB,SAAS,cAAc;AACvB,SAAS,aAAa;AA6ClB,SAUE,KAVF;AALG,SAAS,MAAM,OAAsC;AAC1D,QAAM,EAAE,UAAU,MAAM,GAAG,YAAY,IAAI;AAC3C,QAAM,SAAS,MAAM,EAAE,KAAK,CAAC;AAE7B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,OAAO;AAAA,UACL,KAAK;AAAA,QACP,CAAC;AAAA,QACD,OAAO;AAAA,MACT;AAAA,MACA,UAAU;AAAA,MAEV;AAAA;AAAA,UAAC,MAAM;AAAA,UAAN;AAAA,YACE,GAAG;AAAA,YACJ,WAAW,GAAG,YAAY,WAAW,OAAO,KAAK;AAAA,YACjD,UAAU;AAAA,YACV,MAAK;AAAA;AAAA,QACP;AAAA,QACC;AAAA;AAAA;AAAA,EACH;AAEJ;","names":[]}
@@ -0,0 +1,31 @@
1
+ import {
2
+ FieldErrorText,
3
+ FieldHelperText,
4
+ FieldInput,
5
+ FieldLabel,
6
+ FieldRoot,
7
+ FieldTextarea
8
+ } from "./chunk-C5NL3X7W.js";
9
+ import {
10
+ FieldStartIndicator
11
+ } from "./chunk-Z52R6ABJ.js";
12
+ import {
13
+ FieldStatusIndicator
14
+ } from "./chunk-CNA2VKAH.js";
15
+
16
+ // src/components/field/parts.ts
17
+ var FieldParts = {
18
+ Root: FieldRoot,
19
+ Label: FieldLabel,
20
+ Input: FieldInput,
21
+ Textarea: FieldTextarea,
22
+ HelperText: FieldHelperText,
23
+ ErrorText: FieldErrorText,
24
+ StartIndicator: FieldStartIndicator,
25
+ StatusIndicator: FieldStatusIndicator
26
+ };
27
+
28
+ export {
29
+ FieldParts
30
+ };
31
+ //# sourceMappingURL=chunk-7VA5SXTY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/field/parts.ts"],"sourcesContent":["import type { ElementType } from 'react'\nimport {\n FieldErrorText,\n FieldHelperText,\n FieldInput,\n FieldLabel,\n FieldRoot,\n FieldTextarea,\n} from './primitives'\nimport { FieldStatusIndicator } from './status-indicator'\nimport { FieldStartIndicator } from './start-indicator'\n\n/**\n * This module contains the parts of the Field component.\n * @module 'field/parts'\n */\n\ninterface FieldPartsValue {\n /**\n * The container of the field.\n */\n Root: ElementType\n /**\n * The label of the field.\n */\n Label: ElementType\n /**\n * The input of the field.\n */\n Input: ElementType\n /**\n * The textarea of the field.\n */\n Textarea: ElementType\n /**\n * The text that displays when the field is valid.\n */\n HelperText: ElementType\n /**\n * The text that displays when the field is invalid.\n */\n ErrorText: ElementType\n /**\n * The indicator that appears at the start of the field.\n */\n StartIndicator: ElementType\n /**\n * The status indicator of the field.\n */\n StatusIndicator: ElementType\n}\n\n/**\n * An Object containing the parts of the Field component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the FieldParts object and\n * the entire family of components vs. only what you use.\n */\nexport const FieldParts: FieldPartsValue = {\n Root: FieldRoot,\n Label: FieldLabel,\n Input: FieldInput,\n Textarea: FieldTextarea,\n HelperText: FieldHelperText,\n ErrorText: FieldErrorText,\n StartIndicator: FieldStartIndicator,\n StatusIndicator: FieldStatusIndicator,\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA6DO,IAAM,aAA8B;AAAA,EACzC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,iBAAiB;AACnB;","names":[]}
@@ -0,0 +1,23 @@
1
+ import {
2
+ FieldLabel
3
+ } from "./chunk-C5NL3X7W.js";
4
+
5
+ // src/components/deprecated/Label.tsx
6
+ import { label } from "@cerberus/styled-system/recipes";
7
+ import { cx } from "@cerberus/styled-system/css";
8
+ import { jsx } from "react/jsx-runtime";
9
+ function Label(props) {
10
+ const { size, ...nativeProps } = props;
11
+ return /* @__PURE__ */ jsx(
12
+ FieldLabel,
13
+ {
14
+ ...nativeProps,
15
+ className: cx(label({ size }), props.className)
16
+ }
17
+ );
18
+ }
19
+
20
+ export {
21
+ Label
22
+ };
23
+ //# sourceMappingURL=chunk-7YVOZULL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/deprecated/Label.tsx"],"sourcesContent":["import type { HTMLAttributes, PropsWithChildren } from 'react'\nimport { label, type LabelVariantProps } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\nimport { FieldLabel } from '../field'\n\n/**\n * This module contains the Label component.\n * @module\n */\nexport type LabelBaseProps = HTMLAttributes<HTMLLabelElement>\nexport type LabelProps = LabelBaseProps & LabelVariantProps\n\n/**\n * @deprecated Use FieldLabel or FieldParts.Label instead.\n */\nexport function Label(props: PropsWithChildren<LabelProps>) {\n const { size, ...nativeProps } = props\n return (\n <FieldLabel\n {...nativeProps}\n className={cx(label({ size }), props.className)}\n />\n )\n}\n"],"mappings":";;;;;AACA,SAAS,aAAqC;AAC9C,SAAS,UAAU;AAgBf;AAHG,SAAS,MAAM,OAAsC;AAC1D,QAAM,EAAE,MAAM,GAAG,YAAY,IAAI;AACjC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,MAAM,EAAE,KAAK,CAAC,GAAG,MAAM,SAAS;AAAA;AAAA,EAChD;AAEJ;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
- useFieldContext
3
- } from "./chunk-UZDVOIW5.js";
2
+ Portal
3
+ } from "./chunk-IQJDVFPP.js";
4
4
  import {
5
5
  DatePickerContext,
6
6
  DatePickerTable,
@@ -13,15 +13,12 @@ import {
13
13
  import {
14
14
  IconButton
15
15
  } from "./chunk-APD6IX5R.js";
16
- import {
17
- Portal
18
- } from "./chunk-IQJDVFPP.js";
19
16
  import {
20
17
  useCerberusContext
21
18
  } from "./chunk-GITT5645.js";
22
19
  import {
23
20
  Button
24
- } from "./chunk-MER66QUY.js";
21
+ } from "./chunk-6KZVE4HC.js";
25
22
 
26
23
  // src/components/DatePicker.client.tsx
27
24
  import {
@@ -33,12 +30,10 @@ import { useMemo } from "react";
33
30
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
34
31
  var datePickerStyles = datePicker();
35
32
  function DatePicker(props) {
36
- const states = useFieldContext();
37
33
  return /* @__PURE__ */ jsx(
38
34
  ArkDP.Root,
39
35
  {
40
36
  ...props,
41
- ...states,
42
37
  positioning: {
43
38
  placement: "bottom-start"
44
39
  }
@@ -86,15 +81,12 @@ function DatePickerTrigger(props) {
86
81
  );
87
82
  }
88
83
  function DatePickerInput(props) {
89
- const { invalid, ...fieldStates } = useFieldContext();
90
84
  return /* @__PURE__ */ jsxs(ArkDP.Control, { className: datePickerStyles.control, children: [
91
85
  /* @__PURE__ */ jsx(DatePickerTrigger, {}),
92
86
  /* @__PURE__ */ jsx(
93
87
  ArkDP.Input,
94
88
  {
95
89
  ...props,
96
- ...fieldStates,
97
- ...invalid && { "aria-invalid": true },
98
90
  className: cx(props.className, datePickerStyles.input),
99
91
  placeholder: props.placeholder ?? "DD MMM YYYY",
100
92
  maxLength: 11
@@ -103,7 +95,6 @@ function DatePickerInput(props) {
103
95
  ] });
104
96
  }
105
97
  function RangePickerInput(props) {
106
- const { invalid, ...fieldStates } = useFieldContext();
107
98
  const { defaultValue, ...nativeProps } = props;
108
99
  const startDate = useMemo(() => defaultValue?.[0], [defaultValue]);
109
100
  const endDate = useMemo(() => defaultValue?.[1], [defaultValue]);
@@ -113,8 +104,6 @@ function RangePickerInput(props) {
113
104
  ArkDP.Input,
114
105
  {
115
106
  ...nativeProps,
116
- ...fieldStates,
117
- ...invalid && { "aria-invalid": true },
118
107
  "data-range-input": true,
119
108
  defaultValue: startDate,
120
109
  className: cx(props.className, datePickerStyles.input),
@@ -127,8 +116,6 @@ function RangePickerInput(props) {
127
116
  ArkDP.Input,
128
117
  {
129
118
  ...nativeProps,
130
- ...fieldStates,
131
- ...invalid && { "aria-invalid": true },
132
119
  "data-range-input": true,
133
120
  defaultValue: endDate,
134
121
  "data-range-end-input": true,
@@ -214,4 +201,4 @@ export {
214
201
  DatePickerYearView,
215
202
  DatePickerCalendar
216
203
  };
217
- //# sourceMappingURL=chunk-KU2AWAK3.js.map
204
+ //# sourceMappingURL=chunk-B2A6QFKT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/DatePicker.client.tsx"],"sourcesContent":["'use client'\n\nimport {\n DatePicker as ArkDP,\n type DatePickerContentProps,\n type DatePickerInputProps,\n type DatePickerRootProps,\n type DatePickerTriggerProps,\n type DatePickerViewControlProps,\n type DatePickerViewProps,\n} from '@ark-ui/react'\nimport { Portal } from './Portal'\nimport { datePicker, iconButton } from '@cerberus/styled-system/recipes'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport {\n DatePickerView,\n DatePickerContext,\n DatePickerTable,\n DatePickerTableHeader,\n DatePickerTableCellTrigger,\n DatePickerTableCell,\n DatePickerViewControl,\n} from './DatePicker.server'\nimport { IconButton } from './IconButton'\nimport { Button } from './button/button'\nimport { useCerberusContext } from '../context/cerberus'\nimport { useMemo, type InputHTMLAttributes } from 'react'\n\n/**\n * This module contains the DatePicker client family components.\n * @module DatePicker:client\n */\n\n// We are not exposing this to the public API\nconst datePickerStyles = datePicker()\n\n/**\n * The main context provider for the DatePicker family components.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePicker(props: DatePickerRootProps) {\n // There is a bug with the Root component that causes random date selection\n // onBlur after the first selection if the format prop is used.\n // ref: https://github.com/chakra-ui/ark/issues/3112#event-16047829195\n\n // const handleFormat = useCallback((value: DateValue) => {\n // return formatISOToMilitary(value.toString())\n // }, [])\n\n return (\n <ArkDP.Root\n {...props}\n positioning={{\n placement: 'bottom-start',\n }}\n />\n )\n}\n\n/**\n * An abstraction of the DatePicker control that contains the prev, view, and\n * next triggers which control the calendar output.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerViewControlGroup />\n * ```\n */\nexport function DatePickerViewControlGroup(props: DatePickerViewControlProps) {\n const { icons } = useCerberusContext()\n const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons\n return (\n <DatePickerViewControl {...props}>\n <ArkDP.PrevTrigger asChild>\n <IconButton ariaLabel=\"Previous\" size=\"sm\">\n <PrevIcon />\n </IconButton>\n </ArkDP.PrevTrigger>\n\n <ArkDP.ViewTrigger asChild>\n <Button\n className={css({\n h: '2rem',\n paddingInline: 'md',\n })}\n shape=\"rounded\"\n size=\"sm\"\n usage=\"ghost\"\n >\n <ArkDP.RangeText />\n </Button>\n </ArkDP.ViewTrigger>\n\n <ArkDP.NextTrigger asChild>\n <IconButton ariaLabel=\"Next\" size=\"sm\">\n <NextIcon />\n </IconButton>\n </ArkDP.NextTrigger>\n </DatePickerViewControl>\n )\n}\n\n/**\n * The trigger component for the DatePicker which opens the calendar.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTrigger />\n * ```\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const { icons } = useCerberusContext()\n const { calendar: CalendarIcon } = icons\n return (\n <ArkDP.Trigger\n {...props}\n className={cx(\n props.className,\n iconButton({\n size: 'sm',\n usage: 'ghost',\n }),\n datePickerStyles.trigger,\n )}\n >\n <CalendarIcon />\n </ArkDP.Trigger>\n )\n}\n\n/**\n * The input component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerInput(props: DatePickerInputProps) {\n return (\n <ArkDP.Control className={datePickerStyles.control}>\n <DatePickerTrigger />\n <ArkDP.Input\n {...props}\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n />\n </ArkDP.Control>\n )\n}\n\nexport interface RangePickerInputProps\n extends Omit<DatePickerInputProps, 'defaultValue'> {\n /**\n * The defaultValue to add for the inputs. The first item is the start date\n * and the second item is the end date.\n */\n defaultValue?: [\n InputHTMLAttributes<HTMLInputElement>['defaultValue'],\n InputHTMLAttributes<HTMLInputElement>['defaultValue'],\n ]\n}\n\n/**\n * The input component for the DatePicker that uses ranges.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\" selection=\"range\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <RangePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function RangePickerInput(props: RangePickerInputProps) {\n const { defaultValue, ...nativeProps } = props\n\n const startDate = useMemo(() => defaultValue?.[0], [defaultValue])\n const endDate = useMemo(() => defaultValue?.[1], [defaultValue])\n\n return (\n <ArkDP.Control data-range className={datePickerStyles.control}>\n <DatePickerTrigger />\n <ArkDP.Input\n {...nativeProps}\n data-range-input\n defaultValue={startDate}\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={0}\n />\n <ArkDP.Input\n {...nativeProps}\n data-range-input\n defaultValue={endDate}\n data-range-end-input\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={1}\n />\n </ArkDP.Control>\n )\n}\n\n/**\n * The content component for the DatePicker which contains the calendar.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerContent(\n props: DatePickerContentProps & {\n withModal?: boolean\n },\n) {\n const { children, withModal, ...contentProps } = props\n return (\n <Portal disabled={withModal ?? false}>\n <ArkDP.Positioner className={datePickerStyles.positioner}>\n <ArkDP.Content\n {...contentProps}\n className={cx(contentProps.className, datePickerStyles.content)}\n >\n {children}\n </ArkDP.Content>\n </ArkDP.Positioner>\n </Portal>\n )\n}\n\n/**\n * The day view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerDayView(props: Omit<DatePickerViewProps, 'view'>) {\n function isToday(date: ArkDP.DateValue): boolean {\n const today = new Date()\n const formatted = today.toISOString().split('T')[0]\n const arkDate = `${date.year}-${String(date.month).padStart(2, '0')}-${String(date.day).padStart(2, '0')}`\n return formatted === arkDate\n }\n\n function isPastDay(date: ArkDP.DateValue): boolean {\n const today = new Date()\n const arkDate = `${date.year}-${String(date.month).padStart(2, '0')}-${String(date.day).padStart(2, '0')}`\n return new Date(arkDate) < today\n }\n\n function getDayValue(date: ArkDP.DateValue): 'today' | 'past' | 'future' {\n if (isToday(date)) return 'today'\n if (isPastDay(date)) return 'past'\n return 'future'\n }\n\n return (\n <DatePickerView {...props} view=\"day\">\n <DatePickerContext>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableHead>\n <ArkDP.TableRow>\n {datePicker.weekDays.map((weekDay, id) => (\n <DatePickerTableHeader key={id}>\n {weekDay.narrow}\n </DatePickerTableHeader>\n ))}\n </ArkDP.TableRow>\n </ArkDP.TableHead>\n\n <ArkDP.TableBody>\n {datePicker.weeks.map((week, id) => (\n <ArkDP.TableRow key={id}>\n {week.map((day, id) => (\n <DatePickerTableCell key={id} value={day}>\n <DatePickerTableCellTrigger\n data-date={getDayValue(day)}\n >\n {day.day}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </DatePickerContext>\n </DatePickerView>\n )\n}\n\n/**\n * The month view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerMonthView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <ArkDP.View {...props} view=\"month\">\n <ArkDP.Context>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableBody>\n {datePicker\n .getMonthsGrid({ columns: 4, format: 'short' })\n .map((months, id) => (\n <ArkDP.TableRow key={id}>\n {months.map((month, id) => (\n <DatePickerTableCell key={id} value={month.value}>\n <DatePickerTableCellTrigger>\n {month.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </ArkDP.Context>\n </ArkDP.View>\n )\n}\n\n/**\n * The year view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerYearView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <ArkDP.View {...props} view=\"year\">\n <ArkDP.Context>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableBody>\n {datePicker.getYearsGrid({ columns: 4 }).map((years, id) => (\n <ArkDP.TableRow key={id}>\n {years.map((year, id) => (\n <DatePickerTableCell key={id} value={year.value}>\n <DatePickerTableCellTrigger>\n {year.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </ArkDP.Context>\n </ArkDP.View>\n )\n}\n\n/**\n * An abstraction of the DatePicker content components that contain the\n * different calendar views and controls.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerCalendar(props: { withModal?: boolean }) {\n return (\n <DatePickerContent withModal={props.withModal}>\n <DatePickerDayView />\n <DatePickerMonthView />\n <DatePickerYearView />\n </DatePickerContent>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEA;AAAA,EACE,cAAc;AAAA,OAOT;AAEP,SAAS,YAAY,kBAAkB;AACvC,SAAS,KAAK,UAAU;AAaxB,SAAS,eAAyC;AAkC9C,SA8OM,UA9ON,KAsBA,YAtBA;AA1BJ,IAAM,mBAAmB,WAAW;AAgB7B,SAAS,WAAW,OAA4B;AASrD,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,aAAa;AAAA,QACX,WAAW;AAAA,MACb;AAAA;AAAA,EACF;AAEJ;AAWO,SAAS,2BAA2B,OAAmC;AAC5E,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,cAAc,UAAU,cAAc,SAAS,IAAI;AAC3D,SACE,qBAAC,yBAAuB,GAAG,OACzB;AAAA,wBAAC,MAAM,aAAN,EAAkB,SAAO,MACxB,8BAAC,cAAW,WAAU,YAAW,MAAK,MACpC,8BAAC,YAAS,GACZ,GACF;AAAA,IAEA,oBAAC,MAAM,aAAN,EAAkB,SAAO,MACxB;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,IAAI;AAAA,UACb,GAAG;AAAA,UACH,eAAe;AAAA,QACjB,CAAC;AAAA,QACD,OAAM;AAAA,QACN,MAAK;AAAA,QACL,OAAM;AAAA,QAEN,8BAAC,MAAM,WAAN,EAAgB;AAAA;AAAA,IACnB,GACF;AAAA,IAEA,oBAAC,MAAM,aAAN,EAAkB,SAAO,MACxB,8BAAC,cAAW,WAAU,QAAO,MAAK,MAChC,8BAAC,YAAS,GACZ,GACF;AAAA,KACF;AAEJ;AAUO,SAAS,kBAAkB,OAA+B;AAC/D,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AC,MAAM,WAAN,EACE,UAAAA,YAAW,aAAa,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,CAAC,OAAO,OACnD,oBAAC,MAAM,UAAN,EACE,gBAAM,IAAI,CAAC,MAAMC,QAChB,oBAAC,uBAA6B,OAAO,KAAK,OACxC,8BAAC,8BACE,eAAK,OACR,KAHwBA,GAI1B,CACD,KAPkB,EAQrB,CACD,GACH,GACF;AAAA,KACF,GAEJ,GACF;AAEJ;AAiBO,SAAS,mBAAmB,OAAgC;AACjE,SACE,qBAAC,qBAAkB,WAAW,MAAM,WAClC;AAAA,wBAAC,qBAAkB;AAAA,IACnB,oBAAC,uBAAoB;AAAA,IACrB,oBAAC,sBAAmB;AAAA,KACtB;AAEJ;","names":["datePicker","id"]}
@@ -0,0 +1,29 @@
1
+ // src/utils/index.ts
2
+ function formatNotifyCount(count) {
3
+ if (count > 99) return "99+";
4
+ return count.toString();
5
+ }
6
+ function splitProps(props, ...keyGroups) {
7
+ const result = keyGroups.map(() => ({}));
8
+ const rest = {};
9
+ for (const key in props) {
10
+ let assigned = false;
11
+ for (let i = 0; i < keyGroups.length; i++) {
12
+ if (keyGroups[i].includes(key)) {
13
+ result[i][key] = props[key];
14
+ assigned = true;
15
+ break;
16
+ }
17
+ }
18
+ if (!assigned) {
19
+ rest[key] = props[key];
20
+ }
21
+ }
22
+ return [...result, rest];
23
+ }
24
+
25
+ export {
26
+ formatNotifyCount,
27
+ splitProps
28
+ };
29
+ //# sourceMappingURL=chunk-BL7G3577.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/index.ts"],"sourcesContent":["/**\n * This module contains utility functions that are used across your app.\n * @module Utils\n */\n\n/**\n * Formats the count of notifications to be displayed in the notification badge.\n * @param count - The number of notifications.\n * @returns The formatted count of notifications.\n * @example\n * ```tsx\n * const count = formatNotifyCount(100)\n * console.log(count) // '99+'\n * ```\n */\nexport function formatNotifyCount(count: number): string {\n if (count > 99) return '99+'\n return count.toString()\n}\n\n/**\n * Splits the properties of an object into multiple groups based on lists of keys.\n * @param props - The object to split.\n * @param keyGroups - The lists of keys to include in each group.\n * @returns An array of objects: each containing the properties specified in the corresponding key group, and the last object containing the remaining keys.\n */\nexport function splitProps<T extends object>(\n props: T,\n ...keyGroups: (keyof T)[][]\n): { [K in keyof T]?: T[K] }[] {\n const result = keyGroups.map(() => ({}) as { [K in keyof T]?: T[K] })\n const rest = {} as { [K in keyof T]?: T[K] }\n\n for (const key in props) {\n let assigned = false\n for (let i = 0; i < keyGroups.length; i++) {\n if (keyGroups[i].includes(key as keyof T)) {\n result[i][key as keyof T] = props[key]\n assigned = true\n break\n }\n }\n if (!assigned) {\n rest[key as keyof T] = props[key]\n }\n }\n\n return [...result, rest]\n}\n\nexport * from './localStorage'\n"],"mappings":";AAeO,SAAS,kBAAkB,OAAuB;AACvD,MAAI,QAAQ,GAAI,QAAO;AACvB,SAAO,MAAM,SAAS;AACxB;AAQO,SAAS,WACd,UACG,WAC0B;AAC7B,QAAM,SAAS,UAAU,IAAI,OAAO,CAAC,EAA+B;AACpE,QAAM,OAAO,CAAC;AAEd,aAAW,OAAO,OAAO;AACvB,QAAI,WAAW;AACf,aAAS,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;AACzC,UAAI,UAAU,CAAC,EAAE,SAAS,GAAc,GAAG;AACzC,eAAO,CAAC,EAAE,GAAc,IAAI,MAAM,GAAG;AACrC,mBAAW;AACX;AAAA,MACF;AAAA,IACF;AACA,QAAI,CAAC,UAAU;AACb,WAAK,GAAc,IAAI,MAAM,GAAG;AAAA,IAClC;AAAA,EACF;AAEA,SAAO,CAAC,GAAG,QAAQ,IAAI;AACzB;","names":[]}
@@ -0,0 +1,96 @@
1
+ import {
2
+ FieldStartIndicator
3
+ } from "./chunk-Z52R6ABJ.js";
4
+ import {
5
+ FieldStatusIndicator
6
+ } from "./chunk-CNA2VKAH.js";
7
+
8
+ // src/components/field/primitives.tsx
9
+ import {
10
+ Field
11
+ } from "@ark-ui/react/field";
12
+ import { cx } from "@cerberus/styled-system/css";
13
+ import { field } from "@cerberus/styled-system/recipes";
14
+ import { jsx, jsxs } from "react/jsx-runtime";
15
+ function FieldRoot(props) {
16
+ const { size, ...fieldProps } = props;
17
+ const styles = field({ size });
18
+ return /* @__PURE__ */ jsx(
19
+ Field.Root,
20
+ {
21
+ ...fieldProps,
22
+ className: cx(styles.root, fieldProps.className)
23
+ }
24
+ );
25
+ }
26
+ function FieldLabel(props) {
27
+ const { children, ...nativeProps } = props;
28
+ const styles = field();
29
+ return /* @__PURE__ */ jsxs(Field.Label, { ...nativeProps, className: cx(styles.label, props.className), children: [
30
+ children,
31
+ /* @__PURE__ */ jsx(Field.RequiredIndicator, { children: "(required)" })
32
+ ] });
33
+ }
34
+ function FieldInput(props) {
35
+ const { size, startIcon, endIcon, ...fieldProps } = props;
36
+ const styles = field({ size });
37
+ const hasStartIcon = Boolean(startIcon);
38
+ return /* @__PURE__ */ jsxs("div", { className: styles.inputRoot, children: [
39
+ /* @__PURE__ */ jsx(FieldStartIndicator, { children: startIcon }),
40
+ /* @__PURE__ */ jsx(
41
+ Field.Input,
42
+ {
43
+ ...fieldProps,
44
+ ...hasStartIcon && { "data-has": "start-indicator" },
45
+ className: cx(styles.input, fieldProps.className)
46
+ }
47
+ ),
48
+ /* @__PURE__ */ jsx(FieldStatusIndicator, { fallback: endIcon })
49
+ ] });
50
+ }
51
+ function FieldHelperText(props) {
52
+ const styles = field();
53
+ if (!props.children) return null;
54
+ return /* @__PURE__ */ jsx(
55
+ Field.HelperText,
56
+ {
57
+ ...props,
58
+ className: cx(styles.helperText, props.className)
59
+ }
60
+ );
61
+ }
62
+ function FieldErrorText(props) {
63
+ const styles = field();
64
+ if (!props.children) return null;
65
+ return /* @__PURE__ */ jsx(
66
+ Field.ErrorText,
67
+ {
68
+ ...props,
69
+ className: cx(styles.errorText, props.className)
70
+ }
71
+ );
72
+ }
73
+ function FieldTextarea(props) {
74
+ const styles = field();
75
+ return /* @__PURE__ */ jsx(
76
+ Field.Textarea,
77
+ {
78
+ ...props,
79
+ className: cx(styles.textarea, props.className)
80
+ }
81
+ );
82
+ }
83
+ var Input = FieldInput;
84
+ var Textarea = FieldTextarea;
85
+
86
+ export {
87
+ FieldRoot,
88
+ FieldLabel,
89
+ FieldInput,
90
+ FieldHelperText,
91
+ FieldErrorText,
92
+ FieldTextarea,
93
+ Input,
94
+ Textarea
95
+ };
96
+ //# sourceMappingURL=chunk-C5NL3X7W.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/field/primitives.tsx"],"sourcesContent":["import {\n Field,\n type FieldHelperTextProps,\n type FieldInputProps as ArkFieldInputProps,\n type FieldLabelProps,\n type FieldRootProps as ArkFieldRootProps,\n type FieldTextareaProps,\n} from '@ark-ui/react/field'\nimport type { ReactNode } from 'react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { field, type FieldVariantProps } from '@cerberus/styled-system/recipes'\nimport { FieldStatusIndicator } from './status-indicator'\nimport { FieldStartIndicator } from './start-indicator'\n\n/**\n * This module contains all the primitives of the Field component.\n * @module 'field'\n */\n\nexport type FieldRootProps = ArkFieldRootProps & FieldVariantProps\n\n/**\n * The context & container for the Field components.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot required ids={{ input: 'exampleId' }}>\n * <FieldLabel>Label</FieldLabel>\n * <FieldInput />\n * </FieldRoot>\n * ```\n */\nexport function FieldRoot(props: FieldRootProps) {\n const { size, ...fieldProps } = props\n const styles = field({ size })\n return (\n <Field.Root\n {...fieldProps}\n className={cx(styles.root, fieldProps.className)}\n />\n )\n}\n\n/**\n * The label for the Field component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldLabel>Label</FieldLabel>\n * </FieldRoot>\n * ```\n */\nexport function FieldLabel(props: FieldLabelProps) {\n const { children, ...nativeProps } = props\n const styles = field()\n return (\n <Field.Label {...nativeProps} className={cx(styles.label, props.className)}>\n {children}\n <Field.RequiredIndicator>(required)</Field.RequiredIndicator>\n </Field.Label>\n )\n}\n\nexport interface FieldInputProps\n extends Omit<ArkFieldInputProps, 'size'>,\n FieldVariantProps {\n /**\n * An optional icon to display at the start of the input.\n */\n startIcon?: ReactNode\n /**\n * An optional icon to display at the end of the input.\n */\n endIcon?: ReactNode\n}\n\n/**\n * The input for the Field component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldInput />\n * </FieldRoot>\n * ```\n */\nexport function FieldInput(props: FieldInputProps) {\n const { size, startIcon, endIcon, ...fieldProps } = props\n const styles = field({ size })\n const hasStartIcon = Boolean(startIcon)\n\n return (\n <div className={styles.inputRoot}>\n <FieldStartIndicator>{startIcon}</FieldStartIndicator>\n <Field.Input\n {...fieldProps}\n {...(hasStartIcon && { 'data-has': 'start-indicator' })}\n className={cx(styles.input, fieldProps.className)}\n />\n <FieldStatusIndicator fallback={endIcon} />\n </div>\n )\n}\n\n/**\n * The helper text for the Field component that is shown when the field is\n * valid.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldInput />\n * <FieldHelperText>Helper text</FieldHelperText>\n * </FieldRoot>\n * ```\n */\nexport function FieldHelperText(props: FieldHelperTextProps) {\n const styles = field()\n\n if (!props.children) return null\n\n return (\n <Field.HelperText\n {...props}\n className={cx(styles.helperText, props.className)}\n />\n )\n}\n\n/**\n * The error text for the Field component that is shown when the field is\n * invalid.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldInput />\n * <FieldErrorText>Error text</FieldErrorText>\n * </FieldRoot>\n * ```\n */\nexport function FieldErrorText(props: FieldHelperTextProps) {\n const styles = field()\n\n if (!props.children) return null\n\n return (\n <Field.ErrorText\n {...props}\n className={cx(styles.errorText, props.className)}\n />\n )\n}\n\n/**\n * The textarea for the Field component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldTextarea />\n * </FieldRoot>\n * ```\n */\nexport function FieldTextarea(props: FieldTextareaProps) {\n const styles = field()\n return (\n <Field.Textarea\n {...props}\n className={cx(styles.textarea, props.className)}\n />\n )\n}\n\n/**\n * A named export for the FieldInput component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * import { Input } from '@cerberus/react'\n *\n * <Field\n * ids={{\n * control: 'email',\n * }}\n * label=\"Enter your email\"\n * helperText=\"We'll never share your email with anyone else.\"\n * errorText=\"Email is required.\"\n * required\n * >\n * <Input type=\"email\" />\n * </Field>\n * ```\n */\nexport const Input = FieldInput\nexport const Textarea = FieldTextarea\n"],"mappings":";;;;;;;;AAAA;AAAA,EACE;AAAA,OAMK;AAEP,SAAS,UAAU;AACnB,SAAS,aAAqC;AA0B1C,cAqBA,YArBA;AAJG,SAAS,UAAU,OAAuB;AAC/C,QAAM,EAAE,MAAM,GAAG,WAAW,IAAI;AAChC,QAAM,SAAS,MAAM,EAAE,KAAK,CAAC;AAC7B,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,OAAO,MAAM,WAAW,SAAS;AAAA;AAAA,EACjD;AAEJ;AAYO,SAAS,WAAW,OAAwB;AACjD,QAAM,EAAE,UAAU,GAAG,YAAY,IAAI;AACrC,QAAM,SAAS,MAAM;AACrB,SACE,qBAAC,MAAM,OAAN,EAAa,GAAG,aAAa,WAAW,GAAG,OAAO,OAAO,MAAM,SAAS,GACtE;AAAA;AAAA,IACD,oBAAC,MAAM,mBAAN,EAAwB,wBAAU;AAAA,KACrC;AAEJ;AAyBO,SAAS,WAAW,OAAwB;AACjD,QAAM,EAAE,MAAM,WAAW,SAAS,GAAG,WAAW,IAAI;AACpD,QAAM,SAAS,MAAM,EAAE,KAAK,CAAC;AAC7B,QAAM,eAAe,QAAQ,SAAS;AAEtC,SACE,qBAAC,SAAI,WAAW,OAAO,WACrB;AAAA,wBAAC,uBAAqB,qBAAU;AAAA,IAChC;AAAA,MAAC,MAAM;AAAA,MAAN;AAAA,QACE,GAAG;AAAA,QACH,GAAI,gBAAgB,EAAE,YAAY,kBAAkB;AAAA,QACrD,WAAW,GAAG,OAAO,OAAO,WAAW,SAAS;AAAA;AAAA,IAClD;AAAA,IACA,oBAAC,wBAAqB,UAAU,SAAS;AAAA,KAC3C;AAEJ;AAcO,SAAS,gBAAgB,OAA6B;AAC3D,QAAM,SAAS,MAAM;AAErB,MAAI,CAAC,MAAM,SAAU,QAAO;AAE5B,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,OAAO,YAAY,MAAM,SAAS;AAAA;AAAA,EAClD;AAEJ;AAcO,SAAS,eAAe,OAA6B;AAC1D,QAAM,SAAS,MAAM;AAErB,MAAI,CAAC,MAAM,SAAU,QAAO;AAE5B,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,OAAO,WAAW,MAAM,SAAS;AAAA;AAAA,EACjD;AAEJ;AAYO,SAAS,cAAc,OAA2B;AACvD,QAAM,SAAS,MAAM;AACrB,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,OAAO,UAAU,MAAM,SAAS;AAAA;AAAA,EAChD;AAEJ;AAsBO,IAAM,QAAQ;AACd,IAAM,WAAW;","names":[]}
@@ -0,0 +1,43 @@
1
+ import {
2
+ useCerberusContext
3
+ } from "./chunk-GITT5645.js";
4
+
5
+ // src/components/field/status-indicator.tsx
6
+ import { useFieldContext } from "@ark-ui/react";
7
+ import { cx } from "@cerberus/styled-system/css";
8
+ import { field } from "@cerberus/styled-system/recipes";
9
+ import { jsx } from "react/jsx-runtime";
10
+ function FieldStatusIndicator(props) {
11
+ const { fallback, ...nativeProps } = props;
12
+ const styles = field();
13
+ const fieldContext = useFieldContext();
14
+ const { icons } = useCerberusContext();
15
+ const { invalid: InvalidIcon } = icons;
16
+ if (fieldContext.invalid) {
17
+ return /* @__PURE__ */ jsx(
18
+ "span",
19
+ {
20
+ ...nativeProps,
21
+ "aria-hidden": "true",
22
+ "data-invalid": true,
23
+ className: cx(nativeProps.className, styles.statusIndicator),
24
+ children: /* @__PURE__ */ jsx(InvalidIcon, {})
25
+ }
26
+ );
27
+ }
28
+ return /* @__PURE__ */ jsx(
29
+ "span",
30
+ {
31
+ ...nativeProps,
32
+ "aria-hidden": "true",
33
+ "data-part": "end-indicator",
34
+ className: cx(nativeProps.className, styles.endIndicator),
35
+ children: fallback
36
+ }
37
+ );
38
+ }
39
+
40
+ export {
41
+ FieldStatusIndicator
42
+ };
43
+ //# sourceMappingURL=chunk-CNA2VKAH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/field/status-indicator.tsx"],"sourcesContent":["'use client'\n\nimport { useFieldContext } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport { field } from '@cerberus/styled-system/recipes'\nimport { useCerberusContext } from '../../context/cerberus'\nimport type { HTMLAttributes, ReactNode } from 'react'\n\nexport interface FieldStatusIndicatorProps\n extends HTMLAttributes<HTMLSpanElement> {\n /**\n * The fallback content to display when the field is valid.\n */\n fallback?: ReactNode\n}\n\n/**\n * The invalid status indicator for the Field component.\n * @description [Field Docs](https://cerberus.digitalu.design/react/field)\n * @example\n * ```tsx\n * <FieldRoot>\n * <FieldStatusIndicator />\n * </FieldRoot>\n * ```\n */\nexport function FieldStatusIndicator(props: FieldStatusIndicatorProps) {\n const { fallback, ...nativeProps } = props\n const styles = field()\n const fieldContext = useFieldContext()\n\n const { icons } = useCerberusContext()\n const { invalid: InvalidIcon } = icons\n\n if (fieldContext.invalid) {\n return (\n <span\n {...nativeProps}\n aria-hidden=\"true\"\n data-invalid\n className={cx(nativeProps.className, styles.statusIndicator)}\n >\n <InvalidIcon />\n </span>\n )\n }\n\n return (\n <span\n {...nativeProps}\n aria-hidden=\"true\"\n data-part=\"end-indicator\"\n className={cx(nativeProps.className, styles.endIndicator)}\n >\n {fallback}\n </span>\n )\n}\n"],"mappings":";;;;;AAEA,SAAS,uBAAuB;AAChC,SAAS,UAAU;AACnB,SAAS,aAAa;AAsCd;AAhBD,SAAS,qBAAqB,OAAkC;AACrE,QAAM,EAAE,UAAU,GAAG,YAAY,IAAI;AACrC,QAAM,SAAS,MAAM;AACrB,QAAM,eAAe,gBAAgB;AAErC,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,SAAS,YAAY,IAAI;AAEjC,MAAI,aAAa,SAAS;AACxB,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,eAAY;AAAA,QACZ,gBAAY;AAAA,QACZ,WAAW,GAAG,YAAY,WAAW,OAAO,eAAe;AAAA,QAE3D,8BAAC,eAAY;AAAA;AAAA,IACf;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,eAAY;AAAA,MACZ,aAAU;AAAA,MACV,WAAW,GAAG,YAAY,WAAW,OAAO,YAAY;AAAA,MAEvD;AAAA;AAAA,EACH;AAEJ;","names":[]}
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-V3M3ZOQI.js";
20
20
  import {
21
21
  Button
22
- } from "./chunk-MER66QUY.js";
22
+ } from "./chunk-6KZVE4HC.js";
23
23
  import {
24
24
  Show
25
25
  } from "./chunk-BUVVRQLZ.js";
@@ -177,4 +177,4 @@ export {
177
177
  NotificationCenter,
178
178
  useNotificationCenter
179
179
  };
180
- //# sourceMappingURL=chunk-Z7FGXAND.js.map
180
+ //# sourceMappingURL=chunk-FMRWRVUS.js.map
@@ -1,6 +1,3 @@
1
- import {
2
- useFieldContext
3
- } from "./chunk-UZDVOIW5.js";
4
1
  import {
5
2
  useCerberusContext
6
3
  } from "./chunk-GITT5645.js";
@@ -14,10 +11,11 @@ import {
14
11
  } from "@cerberus/styled-system/recipes";
15
12
  import { vstack } from "@cerberus/styled-system/patterns";
16
13
  import { cx } from "@cerberus/styled-system/css";
14
+ import { useFieldContext } from "@ark-ui/react/field";
17
15
  import { jsx, jsxs } from "react/jsx-runtime";
18
16
  function Checkbox(props) {
19
- const { describedBy, size, checked, mixed, ...nativeProps } = props;
20
- const { invalid, ...fieldStates } = useFieldContext();
17
+ const { size, checked, mixed, ...nativeProps } = props;
18
+ const { invalid, disabled, readOnly, required, ariaDescribedby, ids } = useFieldContext();
21
19
  const styles = checkbox({ size });
22
20
  const { icons } = useCerberusContext();
23
21
  const { checkbox: CheckIcon, indeterminate: IndeterminateIcon } = icons;
@@ -42,10 +40,13 @@ function Checkbox(props) {
42
40
  "input",
43
41
  {
44
42
  ...nativeProps,
45
- ...fieldStates,
46
- ...describedBy && { "aria-describedby": describedBy },
43
+ ...disabled && { disabled: true },
44
+ ...readOnly && { readOnly: true },
45
+ ...required && { required: true },
46
+ ...ariaDescribedby && { "aria-describedby": ariaDescribedby },
47
47
  ...invalid && { "aria-invalid": true },
48
48
  ...mixed && { "aria-checked": "mixed" },
49
+ id: ids.control,
49
50
  className: cx("peer", nativeProps.className, styles.input),
50
51
  type: "checkbox"
51
52
  }
@@ -60,4 +61,4 @@ function Checkbox(props) {
60
61
  export {
61
62
  Checkbox
62
63
  };
63
- //# sourceMappingURL=chunk-NGOLRISW.js.map
64
+ //# sourceMappingURL=chunk-FVE4GBB7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/Checkbox.tsx"],"sourcesContent":["'use client'\n\nimport {\n checkbox,\n type CheckboxVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport { cx } from '@cerberus/styled-system/css'\nimport type { InputHTMLAttributes } from 'react'\nimport { useCerberusContext } from '../context/cerberus'\nimport { Show } from './Show'\nimport { useFieldContext } from '@ark-ui/react/field'\n\n/**\n * This module contains the Checkbox component.\n * @module\n */\n\nexport type CheckboxProps = CheckboxVariantProps &\n Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'id'> & {\n /**\n * @deprecated\n */\n describedBy?: string\n /**\n * @deprecated use the Field.ids.control instead\n */\n id?: string\n /**\n * Used to display a mixed checked state.\n * @description [ARIA Mixed State](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/examples/checkbox-mixed/)\n */\n mixed?: boolean\n }\n\n/**\n * Checkbox component\n * @definition [ARIA Target Size](https://www.w3.org/WAI/WCAG21/Understanding/target-size.html#:~:text=Understanding%20SC%202.5.,%3ATarget%20Size%20(Level%20AAA)&text=The%20size%20of%20the%20target,Equivalent)\n * @definition [ARIA Forms](https://www.a11yproject.com/checklist/#forms)\n * @see https://cerberus.digitalu.design/react/checkbox\n * @example\n * ```tsx\n * <Field>\n * <Checkbox id=\"legal\" checked={checked.legal} onChange={handleChange} />\n * </Field>\n * ```\n */\nexport function Checkbox(props: CheckboxProps) {\n const { size, checked, mixed, ...nativeProps } = props\n const { invalid, disabled, readOnly, required, ariaDescribedby, ids } =\n useFieldContext()\n const styles = checkbox({ size })\n const { icons } = useCerberusContext()\n const { checkbox: CheckIcon, indeterminate: IndeterminateIcon } = icons\n\n if (!CheckIcon) {\n throw new Error('The CerberusProvider is missing the checkbox icon.')\n }\n if (!IndeterminateIcon) {\n throw new Error('The CerberusProvider is missing the indeterminate icon.')\n }\n\n return (\n <div\n className={cx(\n styles.root,\n vstack({\n gap: '0',\n justify: 'center',\n }),\n )}\n >\n <input\n {...nativeProps}\n {...(disabled && { disabled: true })}\n {...(readOnly && { readOnly: true })}\n {...(required && { required: true })}\n {...(ariaDescribedby && { 'aria-describedby': ariaDescribedby })}\n {...(invalid && { 'aria-invalid': true })}\n {...(mixed && { 'aria-checked': 'mixed' })}\n id={ids.control}\n className={cx('peer', nativeProps.className, styles.input)}\n type=\"checkbox\"\n />\n <Show when={checked && !mixed}>\n <span className={styles.icon}>\n <CheckIcon />\n </span>\n </Show>\n <Show when={mixed}>\n <span className={styles.icon}>\n <IndeterminateIcon />\n </span>\n </Show>\n </div>\n )\n}\n"],"mappings":";;;;;;;;AAEA;AAAA,EACE;AAAA,OAEK;AACP,SAAS,cAAc;AACvB,SAAS,UAAU;AAInB,SAAS,uBAAuB;AAoD5B,SASE,KATF;AAhBG,SAAS,SAAS,OAAsB;AAC7C,QAAM,EAAE,MAAM,SAAS,OAAO,GAAG,YAAY,IAAI;AACjD,QAAM,EAAE,SAAS,UAAU,UAAU,UAAU,iBAAiB,IAAI,IAClE,gBAAgB;AAClB,QAAM,SAAS,SAAS,EAAE,KAAK,CAAC;AAChC,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,UAAU,WAAW,eAAe,kBAAkB,IAAI;AAElE,MAAI,CAAC,WAAW;AACd,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,MAAI,CAAC,mBAAmB;AACtB,UAAM,IAAI,MAAM,yDAAyD;AAAA,EAC3E;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT,OAAO;AAAA,QACP,OAAO;AAAA,UACL,KAAK;AAAA,UACL,SAAS;AAAA,QACX,CAAC;AAAA,MACH;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACE,GAAG;AAAA,YACH,GAAI,YAAY,EAAE,UAAU,KAAK;AAAA,YACjC,GAAI,YAAY,EAAE,UAAU,KAAK;AAAA,YACjC,GAAI,YAAY,EAAE,UAAU,KAAK;AAAA,YACjC,GAAI,mBAAmB,EAAE,oBAAoB,gBAAgB;AAAA,YAC7D,GAAI,WAAW,EAAE,gBAAgB,KAAK;AAAA,YACtC,GAAI,SAAS,EAAE,gBAAgB,QAAQ;AAAA,YACxC,IAAI,IAAI;AAAA,YACR,WAAW,GAAG,QAAQ,YAAY,WAAW,OAAO,KAAK;AAAA,YACzD,MAAK;AAAA;AAAA,QACP;AAAA,QACA,oBAAC,QAAK,MAAM,WAAW,CAAC,OACtB,8BAAC,UAAK,WAAW,OAAO,MACtB,8BAAC,aAAU,GACb,GACF;AAAA,QACA,oBAAC,QAAK,MAAM,OACV,8BAAC,UAAK,WAAW,OAAO,MACtB,8BAAC,qBAAkB,GACrB,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -2,14 +2,14 @@ import {
2
2
  ProgressBar
3
3
  } from "./chunk-WZJ5UQNM.js";
4
4
  import {
5
- FieldMessage
6
- } from "./chunk-JWIJHSI6.js";
5
+ IconButton
6
+ } from "./chunk-APD6IX5R.js";
7
7
  import {
8
8
  Field
9
- } from "./chunk-UZDVOIW5.js";
9
+ } from "./chunk-IGSC4IEA.js";
10
10
  import {
11
- IconButton
12
- } from "./chunk-APD6IX5R.js";
11
+ FieldHelperText
12
+ } from "./chunk-C5NL3X7W.js";
13
13
  import {
14
14
  Avatar
15
15
  } from "./chunk-SXLPDPOZ.js";
@@ -106,8 +106,8 @@ function FileStatus(props) {
106
106
  size: "sm"
107
107
  }
108
108
  ),
109
- /* @__PURE__ */ jsx(Field, { invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ jsx(
110
- FieldMessage,
109
+ /* @__PURE__ */ jsx(Field, { label: "", invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ jsx(
110
+ FieldHelperText,
111
111
  {
112
112
  className: css({
113
113
  color: "page.text.100"
@@ -227,4 +227,4 @@ export {
227
227
  processStatus,
228
228
  FileStatus
229
229
  };
230
- //# sourceMappingURL=chunk-7P7OWBGV.js.map
230
+ //# sourceMappingURL=chunk-G2VFEBY4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/FileStatus.tsx"],"sourcesContent":["'use client'\n\nimport {\n useCallback,\n useMemo,\n type HTMLAttributes,\n type MouseEvent,\n} from 'react'\nimport {\n fileStatus,\n type FileStatusVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { hstack, vstack } from '@cerberus/styled-system/patterns'\nimport { useCerberusContext } from '../context/cerberus'\nimport { ProgressBar, type ProgressBarProps } from './ProgressBar'\nimport { IconButton } from './IconButton'\nimport { Avatar } from './Avatar'\nimport { Field, FieldHelperText } from './field/index'\n\n/**\n * This module contains the FileStatus component.\n * @module\n */\n\n/**\n * The available values of the fileStatus helper Object.\n * @example\n * ```tsx\n * import { fileStatus } from '@cerberus/react'\n * processStatus.TODO // 'todo'\n * ```\n */\nexport type FileStatusKey = (typeof processStatus)[keyof typeof processStatus]\n\n/**\n * The actions that can be performed on a file.\n */\nexport type FileStatusActions = 'cancel' | 'retry' | 'delete'\nexport interface FileBaseStatusProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {\n /**\n * A unique identifier for the file status. Required for accessibility.\n */\n id: string\n /**\n * The name of the file.\n */\n file: string\n /**\n * The percentage of the file that has been processed.\n */\n now: ProgressBarProps['now']\n /**\n * The status of the file.\n */\n status: processStatus\n /**\n * The action to perform on the file when a user clicks the\n * button located at the end of the status card.\n * @param status - The status of the file.\n * @param e - The event object.\n * @example\n * ```tsx\n * <FileStatus file=\"file.txt\" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />\n * ```\n * @default () => {}\n */\n onClick: (status: FileStatusActions, e: MouseEvent<HTMLButtonElement>) => void\n}\nexport type FileStatusProps = FileBaseStatusProps & FileStatusVariantProps\n\n/**\n * A helper object to represent the status of a file.\n * @example\n * ```tsx\n * import { fileStatus } from '@cerberus/react'\n * processStatus.TODO // 'todo'\n * ```\n */\nexport const enum processStatus {\n TODO = 'todo',\n PROCESSING = 'processing',\n DONE = 'done',\n ERROR = 'error',\n}\n\n/**\n * A component that displays the status of a file during file processing.\n * @see https://cerberus.digitalu.design/react/file-uploader\n * @example\n * ```tsx\n * <FileStatus file=\"file.txt\" now={0} status={processStatus.TODO} action={(status, e) => console.log(status, e)} />\n * ```\n */\nexport function FileStatus(props: FileStatusProps) {\n const { file, now, status, onClick, ...nativeProps } = props\n const actionLabel = useMemo(() => getStatusActionLabel(status), [status])\n const palette = useMemo(() => getPalette(status), [status])\n const modalIconPalette = useMemo(() => getModalIconPalette(status), [status])\n const styles = useMemo(() => {\n switch (status) {\n case processStatus.TODO:\n return fileStatus({ status: 'todo' })\n case processStatus.PROCESSING:\n return fileStatus({ status: 'processing' })\n case processStatus.DONE:\n return fileStatus({ status: 'done' })\n case processStatus.ERROR:\n return fileStatus({ status: 'error' })\n default:\n return fileStatus()\n }\n }, [status])\n\n const handleClick = useCallback(\n (e: MouseEvent<HTMLButtonElement>) => {\n const actionStatus = getStatusActionLabel(\n status,\n ).toLocaleLowerCase() as FileStatusActions\n onClick(actionStatus, e)\n },\n [onClick],\n )\n\n return (\n <div\n {...nativeProps}\n className={cx(nativeProps.className, styles.root, hstack())}\n >\n <Avatar\n ariaLabel=\"\"\n gradient={modalIconPalette}\n icon={<MatchFileStatusIcon size={24} status={status} />}\n src=\"\"\n />\n\n <div\n className={vstack({\n alignItems: 'flex-start',\n gap: '0.12rem',\n w: 'full',\n })}\n >\n <small\n className={css({\n color: 'page.text.initial',\n textStyle: 'label-sm',\n })}\n >\n {file}\n </small>\n <ProgressBar\n id={props.id}\n label=\"File upload status\"\n now={now}\n size=\"sm\"\n />\n <Field label=\"\" invalid={modalIconPalette === 'hades-dark'}>\n <FieldHelperText\n className={css({\n color: 'page.text.100',\n })}\n id={`help:${file}`}\n >\n <MatchFileStatusText status={status} now={now} />\n </FieldHelperText>\n </Field>\n </div>\n\n <IconButton\n ariaLabel={actionLabel}\n onClick={handleClick}\n palette={palette}\n size=\"sm\"\n >\n <MatchStatusAction status={status} />\n </IconButton>\n </div>\n )\n}\n\ninterface FileStatusElProps {\n status: FileStatusProps['status']\n size?: 16 | 20 | 24 | 32\n now?: number\n}\n\nfunction MatchFileStatusIcon(props: FileStatusElProps) {\n const { icons } = useCerberusContext()\n const {\n waitingFileUploader: TodoIcon,\n fileUploader: FileUploaderIcon,\n invalidAlt: InvalidIcon,\n successNotification: DoneIcon,\n } = icons\n\n switch (props.status) {\n case processStatus.TODO:\n return <TodoIcon size={props.size} />\n case processStatus.PROCESSING:\n return <FileUploaderIcon size={props.size} />\n case processStatus.DONE:\n return <DoneIcon size={props.size} />\n case processStatus.ERROR:\n return <InvalidIcon size={props.size} />\n default:\n throw new Error('Unknown status')\n }\n}\n\nfunction MatchFileStatusText(props: FileStatusElProps) {\n switch (props.status) {\n case processStatus.TODO:\n return 'Waiting to upload'\n case processStatus.PROCESSING:\n return `${props.now}% Complete`\n case processStatus.DONE:\n return 'File uploaded successfully'\n case processStatus.ERROR:\n return 'There was an error uploading the file'\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction MatchStatusAction(props: FileStatusElProps) {\n const { icons } = useCerberusContext()\n const { close: CloseIcon, redo: RedoIcon, delete: TrashIcon } = icons\n switch (props.status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return <CloseIcon />\n case processStatus.ERROR:\n return <RedoIcon />\n case processStatus.DONE:\n return <TrashIcon />\n default:\n throw new Error('Invalid status')\n }\n}\n\nfunction getStatusActionLabel(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'Cancel'\n case processStatus.ERROR:\n return 'Retry'\n case processStatus.DONE:\n return 'Delete'\n default:\n return ''\n }\n}\n\nfunction getPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'danger'\n case processStatus.ERROR:\n return 'action'\n case processStatus.DONE:\n return 'danger'\n default:\n return 'action'\n }\n}\n\nfunction getModalIconPalette(status: FileStatusKey) {\n switch (status) {\n case processStatus.TODO:\n case processStatus.PROCESSING:\n return 'charon-light'\n case processStatus.ERROR:\n return 'hades-dark'\n case processStatus.DONE:\n return 'thanatos-light'\n default:\n return 'charon-light'\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAEA;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AACP;AAAA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