@cerberus-design/react 0.18.3 → 0.18.4

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 (160) hide show
  1. package/build/legacy/_tsup-dts-rollup.d.cts +87 -25
  2. package/build/legacy/components/FileStatus.cjs +34 -26
  3. package/build/legacy/components/FileStatus.cjs.map +1 -1
  4. package/build/legacy/components/Text.cjs +17 -23
  5. package/build/legacy/components/Text.cjs.map +1 -1
  6. package/build/legacy/components/checkbox/checkbox.cjs +17 -23
  7. package/build/legacy/components/checkbox/checkbox.cjs.map +1 -1
  8. package/build/legacy/components/checkbox/index.cjs +17 -23
  9. package/build/legacy/components/checkbox/index.cjs.map +1 -1
  10. package/build/legacy/components/cta-dialog/index.cjs +44 -35
  11. package/build/legacy/components/cta-dialog/index.cjs.map +1 -1
  12. package/build/legacy/components/cta-dialog/provider.cjs +44 -35
  13. package/build/legacy/components/cta-dialog/provider.cjs.map +1 -1
  14. package/build/legacy/components/date-picker/date-picker.cjs.map +1 -1
  15. package/build/legacy/components/date-picker/day-view.d.cts +1 -1
  16. package/build/legacy/components/date-picker/index.cjs +29 -21
  17. package/build/legacy/components/date-picker/index.cjs.map +1 -1
  18. package/build/legacy/components/date-picker/index.d.cts +6 -0
  19. package/build/legacy/components/date-picker/input.cjs +2 -2
  20. package/build/legacy/components/date-picker/input.cjs.map +1 -1
  21. package/build/legacy/components/date-picker/range-input.cjs +2 -9
  22. package/build/legacy/components/date-picker/range-input.cjs.map +1 -1
  23. package/build/legacy/components/deprecated/Label.cjs.map +1 -1
  24. package/build/legacy/components/dialog/close-icon-trigger.cjs.map +1 -1
  25. package/build/legacy/components/dialog/dialog.cjs +2 -2
  26. package/build/legacy/components/dialog/dialog.cjs.map +1 -1
  27. package/build/legacy/components/dialog/index.cjs +2 -2
  28. package/build/legacy/components/dialog/index.cjs.map +1 -1
  29. package/build/legacy/components/dialog/index.d.cts +1 -0
  30. package/build/legacy/components/dialog/parts.cjs +2 -2
  31. package/build/legacy/components/dialog/parts.cjs.map +1 -1
  32. package/build/legacy/components/dialog/primitives.cjs +2 -2
  33. package/build/legacy/components/dialog/primitives.cjs.map +1 -1
  34. package/build/legacy/components/field/field.cjs +15 -9
  35. package/build/legacy/components/field/field.cjs.map +1 -1
  36. package/build/legacy/components/field/helper-text.cjs +53 -0
  37. package/build/legacy/components/field/helper-text.cjs.map +1 -0
  38. package/build/legacy/components/field/helper-text.d.cts +1 -0
  39. package/build/legacy/components/field/index.cjs +15 -9
  40. package/build/legacy/components/field/index.cjs.map +1 -1
  41. package/build/legacy/components/field/parts.cjs +0 -1
  42. package/build/legacy/components/field/parts.cjs.map +1 -1
  43. package/build/legacy/components/field/primitives.cjs +0 -1
  44. package/build/legacy/components/field/primitives.cjs.map +1 -1
  45. package/build/legacy/context/confirm-modal.cjs +85 -58
  46. package/build/legacy/context/confirm-modal.cjs.map +1 -1
  47. package/build/legacy/context/field.cjs.map +1 -1
  48. package/build/legacy/context/prompt-modal.cjs +120 -118
  49. package/build/legacy/context/prompt-modal.cjs.map +1 -1
  50. package/build/legacy/index.cjs +767 -715
  51. package/build/legacy/index.cjs.map +1 -1
  52. package/build/legacy/index.d.cts +11 -0
  53. package/build/legacy/types.cjs.map +1 -1
  54. package/build/legacy/types.d.cts +1 -0
  55. package/build/modern/_tsup-dts-rollup.d.ts +87 -25
  56. package/build/modern/chunk-2U2JYN3D.js +15 -0
  57. package/build/modern/chunk-2U2JYN3D.js.map +1 -0
  58. package/build/modern/chunk-ADI4DOEW.js +17 -0
  59. package/build/modern/chunk-ADI4DOEW.js.map +1 -0
  60. package/build/modern/{chunk-GBCF6DOS.js → chunk-AN65HXHS.js} +2 -2
  61. package/build/modern/{chunk-Z2KBUTCO.js → chunk-BMDNCJUB.js} +2 -2
  62. package/build/modern/chunk-BMDNCJUB.js.map +1 -0
  63. package/build/modern/{chunk-F3XFJHGR.js → chunk-D7PY357P.js} +2 -2
  64. package/build/modern/{chunk-ILROS7ST.js → chunk-DVCTN3GN.js} +2 -2
  65. package/build/modern/{chunk-NP73HOHI.js → chunk-GJBUGESH.js} +3 -3
  66. package/build/modern/{chunk-NP73HOHI.js.map → chunk-GJBUGESH.js.map} +1 -1
  67. package/build/modern/{chunk-KABRV6TB.js → chunk-JXWNDJJW.js} +3 -3
  68. package/build/modern/{chunk-SSR3CWJZ.js → chunk-LUGOJGMO.js} +4 -4
  69. package/build/modern/chunk-LUGOJGMO.js.map +1 -0
  70. package/build/modern/{chunk-3IT3V3YA.js → chunk-M3TZCQ7J.js} +4 -4
  71. package/build/modern/{chunk-WEL43I6Y.js → chunk-OK3VJFQL.js} +1 -2
  72. package/build/modern/{chunk-WEL43I6Y.js.map → chunk-OK3VJFQL.js.map} +1 -1
  73. package/build/modern/{chunk-ADZRQNW3.js → chunk-P7FPAUWN.js} +3 -9
  74. package/build/modern/chunk-P7FPAUWN.js.map +1 -0
  75. package/build/modern/{chunk-OY7BOKWW.js → chunk-QBA6KLL7.js} +2 -2
  76. package/build/modern/chunk-RMSM3XPV.js +218 -0
  77. package/build/modern/chunk-RMSM3XPV.js.map +1 -0
  78. package/build/modern/{chunk-LEBDLXJE.js → chunk-RTLS6K4E.js} +9 -6
  79. package/build/modern/chunk-RTLS6K4E.js.map +1 -0
  80. package/build/modern/{chunk-A5UXCB4L.js → chunk-SHBKM6EW.js} +43 -34
  81. package/build/modern/chunk-SHBKM6EW.js.map +1 -0
  82. package/build/modern/{chunk-CEJIKL6N.js → chunk-T44C3KQO.js} +1 -1
  83. package/build/modern/chunk-T44C3KQO.js.map +1 -0
  84. package/build/modern/{chunk-V6EAWUCQ.js → chunk-TRT6OCHJ.js} +2 -2
  85. package/build/modern/chunk-WSOITM7D.js +182 -0
  86. package/build/modern/chunk-WSOITM7D.js.map +1 -0
  87. package/build/modern/chunk-ZPHPCKAG.js +41 -0
  88. package/build/modern/chunk-ZPHPCKAG.js.map +1 -0
  89. package/build/modern/components/FileStatus.js +5 -4
  90. package/build/modern/components/Text.js +1 -1
  91. package/build/modern/components/admonition/admonition.js +2 -2
  92. package/build/modern/components/admonition/index.js +2 -2
  93. package/build/modern/components/checkbox/checkbox.js +2 -2
  94. package/build/modern/components/checkbox/index.js +2 -2
  95. package/build/modern/components/cta-dialog/index.js +5 -5
  96. package/build/modern/components/cta-dialog/provider.js +5 -5
  97. package/build/modern/components/date-picker/date-picker.js +1 -1
  98. package/build/modern/components/date-picker/day-view.d.ts +1 -1
  99. package/build/modern/components/date-picker/index.d.ts +6 -0
  100. package/build/modern/components/date-picker/index.js +16 -5
  101. package/build/modern/components/date-picker/input.js +1 -1
  102. package/build/modern/components/date-picker/range-input.js +1 -2
  103. package/build/modern/components/deprecated/Label.js +5 -4
  104. package/build/modern/components/dialog/close-icon-trigger.js +2 -2
  105. package/build/modern/components/dialog/dialog.js +2 -2
  106. package/build/modern/components/dialog/index.d.ts +1 -0
  107. package/build/modern/components/dialog/index.js +4 -4
  108. package/build/modern/components/dialog/parts.js +2 -2
  109. package/build/modern/components/dialog/primitives.js +1 -1
  110. package/build/modern/components/field/field.js +3 -2
  111. package/build/modern/components/field/helper-text.d.ts +1 -0
  112. package/build/modern/components/field/helper-text.js +11 -0
  113. package/build/modern/components/field/index.js +4 -3
  114. package/build/modern/components/field/parts.js +2 -2
  115. package/build/modern/components/field/primitives.js +1 -1
  116. package/build/modern/components/notifications/index.js +1 -1
  117. package/build/modern/context/confirm-modal.js +5 -5
  118. package/build/modern/context/field.js +1 -1
  119. package/build/modern/context/prompt-modal.js +10 -9
  120. package/build/modern/index.d.ts +11 -0
  121. package/build/modern/index.js +52 -40
  122. package/build/modern/index.js.map +1 -1
  123. package/build/modern/types.d.ts +1 -0
  124. package/package.json +10 -9
  125. package/src/components/Text.tsx +20 -23
  126. package/src/components/cta-dialog/provider.tsx +6 -1
  127. package/src/components/date-picker/date-picker.tsx +8 -5
  128. package/src/components/date-picker/index.ts +10 -0
  129. package/src/components/date-picker/input.tsx +1 -1
  130. package/src/components/date-picker/range-input.tsx +9 -24
  131. package/src/components/dialog/dialog.tsx +4 -2
  132. package/src/components/dialog/index.ts +4 -0
  133. package/src/components/dialog/primitives.tsx +7 -4
  134. package/src/components/field/field.tsx +11 -9
  135. package/src/components/field/helper-text.tsx +20 -0
  136. package/src/components/field/primitives.tsx +0 -3
  137. package/src/context/confirm-modal.tsx +52 -30
  138. package/src/context/prompt-modal.tsx +36 -31
  139. package/src/types.ts +21 -0
  140. package/build/modern/chunk-A5UXCB4L.js.map +0 -1
  141. package/build/modern/chunk-ADZRQNW3.js.map +0 -1
  142. package/build/modern/chunk-CEJIKL6N.js.map +0 -1
  143. package/build/modern/chunk-DHKSNGQX.js +0 -156
  144. package/build/modern/chunk-DHKSNGQX.js.map +0 -1
  145. package/build/modern/chunk-L64HQGLQ.js +0 -47
  146. package/build/modern/chunk-L64HQGLQ.js.map +0 -1
  147. package/build/modern/chunk-LEBDLXJE.js.map +0 -1
  148. package/build/modern/chunk-P7DWMM56.js +0 -210
  149. package/build/modern/chunk-P7DWMM56.js.map +0 -1
  150. package/build/modern/chunk-SSR3CWJZ.js.map +0 -1
  151. package/build/modern/chunk-U3ISYEUF.js +0 -1
  152. package/build/modern/chunk-Z2KBUTCO.js.map +0 -1
  153. /package/build/modern/{chunk-GBCF6DOS.js.map → chunk-AN65HXHS.js.map} +0 -0
  154. /package/build/modern/{chunk-F3XFJHGR.js.map → chunk-D7PY357P.js.map} +0 -0
  155. /package/build/modern/{chunk-ILROS7ST.js.map → chunk-DVCTN3GN.js.map} +0 -0
  156. /package/build/modern/{chunk-KABRV6TB.js.map → chunk-JXWNDJJW.js.map} +0 -0
  157. /package/build/modern/{chunk-3IT3V3YA.js.map → chunk-M3TZCQ7J.js.map} +0 -0
  158. /package/build/modern/{chunk-OY7BOKWW.js.map → chunk-QBA6KLL7.js.map} +0 -0
  159. /package/build/modern/{chunk-V6EAWUCQ.js.map → chunk-TRT6OCHJ.js.map} +0 -0
  160. /package/build/modern/{chunk-U3ISYEUF.js.map → components/field/helper-text.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/date-picker/index.ts","../../../../src/components/date-picker/primitives.tsx","../../../../src/components/date-picker/parts.ts","../../../../src/components/date-picker/date-picker.tsx","../../../../src/context/cerberus.tsx","../../../../src/components/IconButton.tsx","../../../../src/components/date-picker/trigger.tsx","../../../../src/components/date-picker/input.tsx","../../../../src/components/date-picker/range-input.tsx","../../../../src/components/Portal.tsx","../../../../src/components/date-picker/content.tsx","../../../../src/components/button/button.tsx","../../../../src/components/date-picker/view-control-group.tsx","../../../../src/components/date-picker/day-view.tsx","../../../../src/components/date-picker/month-view.tsx","../../../../src/components/date-picker/year-view.tsx","../../../../src/components/date-picker/calendar.tsx"],"sourcesContent":["export * from './parts'\nexport * from './primitives'\nexport * from './date-picker'\nexport * from './input'\nexport * from './range-input'\nexport * from './calendar'\n","import {\n DatePicker,\n type DatePickerContentProps,\n type DatePickerContextProps,\n type DatePickerControlProps,\n type DatePickerInputProps,\n type DatePickerLabelProps,\n type DatePickerMonthSelectProps,\n type DatePickerNextTriggerProps,\n type DatePickerPositionerProps,\n type DatePickerPrevTriggerProps,\n type DatePickerRangeTextProps,\n type DatePickerRootProps,\n type DatePickerTableBodyProps,\n type DatePickerTableCellProps,\n type DatePickerTableCellTriggerProps,\n type DatePickerTableHeaderProps,\n type DatePickerTableHeadProps,\n type DatePickerTableProps,\n type DatePickerTableRowProps,\n type DatePickerTriggerProps,\n type DatePickerViewControlProps,\n type DatePickerViewProps,\n type DatePickerViewTriggerProps,\n type DatePickerYearSelectProps,\n} from '@ark-ui/react/date-picker'\nimport { cx } from 'styled-system/css'\nimport { datePicker } from 'styled-system/recipes'\n\n/**\n * This module contains the DatePicker primitives.\n * @module 'date-picker/primitives'\n */\n\n/**\n * The label component for the DatePicker.\n */\nexport function DatePickerLabel(props: DatePickerLabelProps) {\n const styles = datePicker()\n return (\n <DatePicker.Label\n {...props}\n className={cx(styles.label, props.className)}\n />\n )\n}\n\n/**\n * The control component for the DatePicker which wraps the input and the\n * triggers to open the DatePicker and clear the value.\n */\nexport function DatePickerControl(props: DatePickerControlProps) {\n const styles = datePicker()\n return (\n <DatePicker.Control\n {...props}\n className={cx(styles.control, props.className)}\n />\n )\n}\n\n/**\n * The input component for the DatePicker.\n */\nexport function DatePickerInputEl(props: DatePickerInputProps) {\n const styles = datePicker()\n return (\n <DatePicker.Input\n {...props}\n className={cx(styles.input, props.className)}\n />\n )\n}\n\n/**\n * The trigger component that opens the DatePicker.\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const styles = datePicker()\n return (\n <DatePicker.Trigger\n {...props}\n className={cx(styles.trigger, props.className)}\n />\n )\n}\n\n/**\n * The content component for the DatePicker.\n */\nexport function DatePickerContent(props: DatePickerContentProps) {\n const styles = datePicker()\n return (\n <DatePicker.Content\n {...props}\n className={cx(styles.content, props.className)}\n />\n )\n}\n\n/**\n * The view control component for the DatePicker which wraps the triggers to\n * switch between calendar views.\n */\nexport function DatePickerViewControl(props: DatePickerViewControlProps) {\n const styles = datePicker()\n return (\n <DatePicker.Control\n {...props}\n className={cx(styles.viewControl, props.className)}\n />\n )\n}\n\n/**\n * The range text component for the DatePicker.\n */\nexport function DatePickerRangeText(props: DatePickerRangeTextProps) {\n const styles = datePicker()\n return (\n <DatePicker.RangeText\n {...props}\n className={cx(styles.rangeText, props.className)}\n />\n )\n}\n\n/**\n * The table component for the DatePicker.\n */\nexport function DatePickerTable(props: DatePickerTableProps) {\n const styles = datePicker()\n return (\n <DatePicker.Table\n {...props}\n className={cx(styles.table, props.className)}\n />\n )\n}\n\n/**\n * The header component for the DatePicker table.\n */\nexport function DatePickerTableHeader(props: DatePickerTableHeaderProps) {\n const styles = datePicker()\n return (\n <DatePicker.TableHeader\n {...props}\n className={cx(styles.tableHeader, props.className)}\n />\n )\n}\n\n/**\n * The table cell component for the DatePicker.\n */\nexport function DatePickerTableCell(props: DatePickerTableCellProps) {\n const styles = datePicker()\n return (\n <DatePicker.TableCell\n {...props}\n className={cx(styles.tableCell, props.className)}\n />\n )\n}\n\n/**\n * The table cell trigger component for the DatePicker.\n */\nexport function DatePickerTableCellTrigger(\n props: DatePickerTableCellTriggerProps,\n) {\n const styles = datePicker()\n return (\n <DatePicker.TableCellTrigger\n {...props}\n className={cx(styles.tableCellTrigger, props.className)}\n />\n )\n}\n\n/**\n * The root component of the DatePicker. This primitive has no Cerberus styles.\n */\nexport function DatePickerRoot(props: DatePickerRootProps) {\n return <DatePicker.Root {...props} />\n}\n\n/**\n * The label component of the DatePicker. This primitive has no Cerberus styles.\n */\nexport function DatePickerClearTrigger(props: DatePickerTriggerProps) {\n return <DatePicker.ClearTrigger {...props} />\n}\n\n/**\n * The control component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerPositioner(props: DatePickerPositionerProps) {\n return <DatePicker.Positioner {...props} />\n}\n\n/**\n * The year select input component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerYearSelect(props: DatePickerYearSelectProps) {\n return <DatePicker.YearSelect {...props} />\n}\n\n/**\n * The month select input component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerMonthSelect(props: DatePickerMonthSelectProps) {\n return <DatePicker.MonthSelect {...props} />\n}\n\n/**\n * The day view component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerView(props: DatePickerViewProps) {\n return <DatePicker.View {...props} />\n}\n\n/**\n * The day context component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerContext(props: DatePickerContextProps) {\n return <DatePicker.Context {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerPrevTrigger(props: DatePickerPrevTriggerProps) {\n return <DatePicker.PrevTrigger {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerNextTrigger(props: DatePickerNextTriggerProps) {\n return <DatePicker.NextTrigger {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerViewTrigger(props: DatePickerViewTriggerProps) {\n return <DatePicker.ViewTrigger {...props} />\n}\n\n/**\n * The table head component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableHead(props: DatePickerTableHeadProps) {\n return <DatePicker.TableHead {...props} />\n}\n/**\n * The table row component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableRow(props: DatePickerTableRowProps) {\n return <DatePicker.TableRow {...props} />\n}\n/**\n * The table body component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableBody(props: DatePickerTableBodyProps) {\n return <DatePicker.TableBody {...props} />\n}\n","import type { ElementType } from 'react'\nimport {\n DatePickerClearTrigger,\n DatePickerContent,\n DatePickerContext,\n DatePickerControl,\n DatePickerInputEl,\n DatePickerLabel,\n DatePickerMonthSelect,\n DatePickerNextTrigger,\n DatePickerPositioner,\n DatePickerPrevTrigger,\n DatePickerRangeText,\n DatePickerRoot,\n DatePickerTable,\n DatePickerTableBody,\n DatePickerTableCell,\n DatePickerTableCellTrigger,\n DatePickerTableHead,\n DatePickerTableHeader,\n DatePickerTableRow,\n DatePickerTrigger,\n DatePickerView,\n DatePickerViewControl,\n DatePickerViewTrigger,\n DatePickerYearSelect,\n} from './primitives'\n\n/**\n * This module contains the parts of the DatePicker component.\n * @module 'date-picker/parts'\n */\n\ninterface DatePickerPartsValue {\n /**\n * The container of the date-picker.\n */\n Root: ElementType\n /**\n * The label of the date-picker.\n */\n Label: ElementType\n /**\n * The control of the date-picker.\n */\n Control: ElementType\n /**\n * The input of the date-picker.\n */\n Input: ElementType\n /**\n * The trigger that opens the date-picker.\n */\n Trigger: ElementType\n /**\n * The trigger that clears the value of the date-picker.\n */\n ClearTrigger: ElementType\n /**\n * The positioner of the content for the date-picker.\n */\n Positioner: ElementType\n /**\n * The content of the date-picker.\n */\n Content: ElementType\n /**\n * The year select input of the date-picker.\n */\n YearSelect: ElementType\n /**\n * The month select input of the date-picker.\n */\n MonthSelect: ElementType\n /**\n * The day view of the date-picker.\n */\n View: ElementType\n /**\n * The day context of the date-picker.\n */\n Context: ElementType\n /**\n * The container for the content triggers.\n */\n ViewControl: ElementType\n /**\n * The trigger that moves to the previous month.\n */\n PrevTrigger: ElementType\n /**\n * The trigger that moves to the next month.\n */\n NextTrigger: ElementType\n /**\n * The trigger that moves to the next view.\n */\n ViewTrigger: ElementType\n /**\n * The range text of the date-picker.\n */\n RangeText: ElementType\n /**\n * The table of the date-picker.\n */\n Table: ElementType\n /**\n * The table head of the date-picker.\n */\n TableHead: ElementType\n /**\n * The table row of the date-picker.\n */\n TableRow: ElementType\n /**\n * The header text for the table.\n */\n TableHeader: ElementType\n /**\n * The body of the table.\n */\n TableBody: ElementType\n /**\n * The table cell of the table.\n */\n TableCell: ElementType\n /**\n * The trigger for the table cell.\n */\n TableCellTrigger: ElementType\n}\n\n/**\n * An Object containing the parts of the DatePicker component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the DatePickerParts object and\n * the entire family of components vs. only what you use.\n */\nexport const DatePickerParts: DatePickerPartsValue = {\n Root: DatePickerRoot,\n Label: DatePickerLabel,\n Control: DatePickerControl,\n Input: DatePickerInputEl,\n Trigger: DatePickerTrigger,\n ClearTrigger: DatePickerClearTrigger,\n Positioner: DatePickerPositioner,\n Content: DatePickerContent,\n YearSelect: DatePickerYearSelect,\n MonthSelect: DatePickerMonthSelect,\n View: DatePickerView,\n Context: DatePickerContext,\n ViewControl: DatePickerViewControl,\n PrevTrigger: DatePickerPrevTrigger,\n NextTrigger: DatePickerNextTrigger,\n ViewTrigger: DatePickerViewTrigger,\n RangeText: DatePickerRangeText,\n Table: DatePickerTable,\n TableHead: DatePickerTableHead,\n TableRow: DatePickerTableRow,\n TableHeader: DatePickerTableHeader,\n TableBody: DatePickerTableBody,\n TableCell: DatePickerTableCell,\n TableCellTrigger: DatePickerTableCellTrigger,\n}\n","import type { DatePickerRootProps } from '@ark-ui/react/date-picker'\nimport { DatePickerParts } from './parts'\n\n/**\n * This module contains an abstraction of the DatePicker.Root primitive.\n * @module 'date-picker/root'\n */\n\n/**\n * DatePicker component is an abstraction of the DatePickerRoot primitive which\n * is the context provider to the DatePicker.\n * @description [Cerberus Docs](https://cerberus.digitalu.design/react/date-picker)\n * @description [Ark Docs](https://ark-ui.com/react/docs/components/date-picker)\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 <DatePickerParts.Root\n {...props}\n positioning={{\n placement: 'bottom-start',\n }}\n />\n )\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from 'styled-system/css'\nimport { iconButton, type IconButtonVariantProps } from 'styled-system/recipes'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps extends HTMLArkProps<'button'> {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\nexport type IconButtonProps = IconButtonRawProps & IconButtonVariantProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps) {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <ark.button\n {...nativeProps}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n","'use client'\n\nimport type { DatePickerTriggerProps } from '@ark-ui/react/date-picker'\nimport { useCerberusContext } from '../../context/cerberus'\nimport { IconButton } from '../IconButton'\nimport { DatePickerParts } from './parts'\n\n/**\n * This private module contains the DatePicker trigger component.\n * @module DatePickerTrigger\n */\n\n/**\n * An abstraction of the DatePickerTrigger that toggles the calender open.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const { icons } = useCerberusContext()\n const { calendar: CalendarIcon } = icons\n\n return (\n <DatePickerParts.Trigger {...props} asChild>\n <IconButton ariaLabel=\"Open calendar\" size=\"sm\" usage=\"ghost\">\n <CalendarIcon />\n </IconButton>\n </DatePickerParts.Trigger>\n )\n}\n","import type { DatePickerInputProps } from '@ark-ui/react/date-picker'\nimport { DatePickerTrigger } from './trigger'\nimport { DatePickerParts } from './parts'\n\n/**\n * This module contains an abstraction of the DatePickerInputEl primitive.\n * @module 'date-picker/input'\n */\n\n/**\n * An abstraction of the DatePicker input that wraps the input and the\n * triggers to open the DatePicker and clear the value.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerInput(props: DatePickerInputProps) {\n return (\n <DatePickerParts.Control>\n <DatePickerTrigger />\n <DatePickerParts.Input\n {...props}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n />\n </DatePickerParts.Control>\n )\n}\n","'use client'\n\nimport type { DatePickerInputProps } from '@ark-ui/react/date-picker'\nimport { useMemo, type InputHTMLAttributes } from 'react'\nimport { DatePickerParts } from './parts'\nimport { DatePickerTrigger } from './trigger'\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 * An abstraction of the DatePicker input that wraps the input and the\n * triggers to open the DatePicker and clear the value.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\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 <DatePickerParts.Control data-range>\n <DatePickerTrigger />\n <DatePickerParts.Input\n {...nativeProps}\n data-range-input\n defaultValue={startDate}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={0}\n />\n <DatePickerParts.Input\n {...nativeProps}\n data-range-input\n defaultValue={endDate}\n data-range-end-input\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={1}\n />\n </DatePickerParts.Control>\n )\n}\n","import { Portal as ArkPortal, type PortalProps } from '@ark-ui/react'\nimport type { PropsWithChildren } from 'react'\n\n/**\n * This module is the Portal component.\n * @module\n */\n\nexport type { PortalProps }\n\n/**\n * The Portal component is used to render children into a DOM node that exists outside the DOM hierarchy of the parent component.\n * @see https://cerberus.digitalu.design/react/portal\n * @definition [React Portal Docs](https://react.dev/reference/react-dom/createPortal)\n * @example\n * ```tsx\n * 'use client'\n *\n * import { Portal } from '@cerberus/react'\n *\n * function SomeFeatureWithinSSRPage() {\n * return (\n * <Portal>\n * <div>Portal Content outside of the React VDom tree</div>\n * </Portal>\n * )\n * }\n */\nexport function Portal(props: PropsWithChildren<PortalProps>) {\n return <ArkPortal {...props} />\n}\n","import type { DatePickerContentProps } from '@ark-ui/react/date-picker'\nimport { Portal } from '../Portal'\nimport { DatePickerParts } from './parts'\n\n/**\n * This private module contains an abstraction of the DatePickerContent\n * primitive.\n * @module 'date-picker/content'\n */\n\n/**\n * An abstraction of the DatePicker content that wraps the DatePickerParts\n * primitives.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerContent(\n props: DatePickerContentProps & {\n withModal?: boolean\n },\n) {\n const { withModal, ...contentProps } = props\n return (\n <Portal disabled={withModal ?? false}>\n <DatePickerParts.Positioner>\n <DatePickerParts.Content {...contentProps} />\n </DatePickerParts.Positioner>\n </Portal>\n )\n}\n","'use client'\n\nimport { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport {\n type PropsWithChildren,\n createContext,\n useContext,\n useMemo,\n} from 'react'\nimport { cx } from 'styled-system/css'\nimport { button, type ButtonVariantProps } from 'styled-system/recipes'\nimport { Box } from '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 = HTMLArkProps<'button'> &\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) {\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 <ark.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","'use client'\n\nimport type { DatePickerViewControlProps } from '@ark-ui/react/date-picker'\nimport { useCerberusContext } from '../../context/cerberus'\nimport { IconButton } from '../IconButton'\nimport { DatePickerParts } from './parts'\nimport { Button } from '../button/button'\nimport { css } from 'styled-system/css'\n\n/**\n * This private module contains an abstraction of the DatePickerViewControl\n * primitive.\n * @module 'date-picker/view-control-group'\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 */\nexport function DatePickerViewControlGroup(props: DatePickerViewControlProps) {\n const { icons } = useCerberusContext()\n const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons\n\n return (\n <DatePickerParts.ViewControl {...props}>\n <DatePickerParts.PrevTrigger asChild>\n <IconButton ariaLabel=\"Previous\" size=\"sm\">\n <PrevIcon />\n </IconButton>\n </DatePickerParts.PrevTrigger>\n\n <DatePickerParts.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 <DatePickerParts.RangeText />\n </Button>\n </DatePickerParts.ViewTrigger>\n\n <DatePickerParts.NextTrigger asChild>\n <IconButton ariaLabel=\"Next\" size=\"sm\">\n <NextIcon />\n </IconButton>\n </DatePickerParts.NextTrigger>\n </DatePickerParts.ViewControl>\n )\n}\n","'use client'\n\nimport type {\n DatePicker,\n DatePickerViewProps,\n UseDatePickerContext,\n} from '@ark-ui/react/date-picker'\nimport { DatePickerParts } from './parts'\nimport { DatePickerViewControlGroup } from './view-control-group'\n\n/**\n * This private module contains an abstraction of the DayView component.\n * @module 'date-picker/day-view'\n */\n\nexport type DateValue = DatePicker.DateValue\n\n/**\n * An abstraction of the DatePickerDayView that renders the day view of the\n * DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerDayView(props: Omit<DatePickerViewProps, 'view'>) {\n function isToday(date: 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: 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: DateValue): 'today' | 'past' | 'future' {\n if (isToday(date)) return 'today'\n if (isPastDay(date)) return 'past'\n return 'future'\n }\n\n return (\n <DatePickerParts.View {...props} view=\"day\">\n <DatePickerParts.Context>\n {(datePickerData: UseDatePickerContext) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerParts.Table>\n <DatePickerParts.TableHead>\n <DatePickerParts.TableRow>\n {datePickerData.weekDays.map((weekDay, id) => (\n <DatePickerParts.TableHeader key={id}>\n {weekDay.narrow}\n </DatePickerParts.TableHeader>\n ))}\n </DatePickerParts.TableRow>\n </DatePickerParts.TableHead>\n\n <DatePickerParts.TableBody>\n {datePickerData.weeks.map((week, id) => (\n <DatePickerParts.TableRow key={id}>\n {week.map((day, id) => (\n <DatePickerParts.TableCell key={id} value={day}>\n <DatePickerParts.TableCellTrigger\n data-date={getDayValue(day)}\n >\n {day.day}\n </DatePickerParts.TableCellTrigger>\n </DatePickerParts.TableCell>\n ))}\n </DatePickerParts.TableRow>\n ))}\n </DatePickerParts.TableBody>\n </DatePickerParts.Table>\n </>\n )}\n </DatePickerParts.Context>\n </DatePickerParts.View>\n )\n}\n","'use client'\n\nimport type {\n DatePickerViewProps,\n UseDatePickerContext,\n} from '@ark-ui/react/date-picker'\nimport { DatePickerParts } from './parts'\nimport { DatePickerViewControlGroup } from './view-control-group'\n\n/**\n * This private module contains an abstraction of the DatePickerMonthView\n * component.\n * @module 'date-picker/month-view'\n */\n\n/**\n * An abstraction of the DatePickerMonthView that renders the month view of the\n * DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerMonthView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <DatePickerParts.View {...props} view=\"month\">\n <DatePickerParts.Context>\n {(datePicker: UseDatePickerContext) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerParts.Table>\n <DatePickerParts.TableBody>\n {datePicker\n .getMonthsGrid({ columns: 4, format: 'short' })\n .map((months, id) => (\n <DatePickerParts.TableRow key={id}>\n {months.map((month, id) => (\n <DatePickerParts.TableCell key={id} value={month.value}>\n <DatePickerParts.TableCellTrigger>\n {month.label}\n </DatePickerParts.TableCellTrigger>\n </DatePickerParts.TableCell>\n ))}\n </DatePickerParts.TableRow>\n ))}\n </DatePickerParts.TableBody>\n </DatePickerParts.Table>\n </>\n )}\n </DatePickerParts.Context>\n </DatePickerParts.View>\n )\n}\n","'use client'\n\nimport type {\n DatePickerViewProps,\n UseDatePickerContext,\n} from '@ark-ui/react/date-picker'\nimport { DatePickerParts } from './parts'\nimport { DatePickerViewControlGroup } from './view-control-group'\n\n/**\n * This private module contains an abstraction of the DatePickerYearView\n * component.\n * @module 'date-picker/year-view'\n */\n\n/**\n * An abstraction of the DatePickerYearView that renders the year view of the\n * DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerYearView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <DatePickerParts.View {...props} view=\"year\">\n <DatePickerParts.Context>\n {(datePicker: UseDatePickerContext) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerParts.Table>\n <DatePickerParts.TableBody>\n {datePicker.getYearsGrid({ columns: 4 }).map((years, id) => (\n <DatePickerParts.TableRow key={id}>\n {years.map((year, id) => (\n <DatePickerParts.TableCell key={id} value={year.value}>\n <DatePickerParts.TableCellTrigger>\n {year.label}\n </DatePickerParts.TableCellTrigger>\n </DatePickerParts.TableCell>\n ))}\n </DatePickerParts.TableRow>\n ))}\n </DatePickerParts.TableBody>\n </DatePickerParts.Table>\n </>\n )}\n </DatePickerParts.Context>\n </DatePickerParts.View>\n )\n}\n","import { DatePickerContent } from './content'\nimport { DatePickerDayView } from './day-view'\nimport { DatePickerMonthView } from './month-view'\nimport { DatePickerYearView } from './year-view'\n\n/**\n * This module contains an abstraction of the DatePicker component.\n * @module 'date-picker/calendar'\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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,yBAyBO;AACP,iBAAmB;AACnB,qBAA2B;AAavB;AAHG,SAAS,gBAAgB,OAA6B;AAC3D,QAAM,aAAS,2BAAW;AAC1B,SACE;AAAA,IAAC,8BAAW;AAAA,IAAX;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,OAAO,OAAO,MAAM,SAAS;AAAA;AAAA,EAC7C;AAEJ;AAMO,SAAS,kBAAkB,OAA+B;AAC/D,QAAM,aAAS,2BAAW;AAC1B,SACE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B;AAAA,KACtB;AAEJ;","names":["DatePicker","import_jsx_runtime","DatePicker","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_jsx_runtime","DatePickerTrigger","import_jsx_runtime","DatePickerTrigger","import_react","import_jsx_runtime","DatePickerTrigger","import_react","import_jsx_runtime","ArkPortal","import_jsx_runtime","DatePickerContent","import_factory","import_react","import_css","import_recipes","import_jsx_runtime","import_css","import_jsx_runtime","import_jsx_runtime","id","import_jsx_runtime","datePicker","id","import_jsx_runtime","datePicker","id","import_jsx_runtime","DatePickerContent"]}
1
+ {"version":3,"sources":["../../../../src/components/date-picker/index.ts","../../../../src/components/date-picker/primitives.tsx","../../../../src/components/date-picker/parts.ts","../../../../src/components/date-picker/date-picker.tsx","../../../../src/context/cerberus.tsx","../../../../src/components/IconButton.tsx","../../../../src/components/date-picker/trigger.tsx","../../../../src/components/date-picker/input.tsx","../../../../src/components/date-picker/range-input.tsx","../../../../src/components/Portal.tsx","../../../../src/components/date-picker/content.tsx","../../../../src/components/button/button.tsx","../../../../src/components/date-picker/view-control-group.tsx","../../../../src/components/date-picker/day-view.tsx","../../../../src/components/date-picker/month-view.tsx","../../../../src/components/date-picker/year-view.tsx","../../../../src/components/date-picker/calendar.tsx"],"sourcesContent":["export * from './parts'\nexport * from './primitives'\nexport * from './date-picker'\nexport * from './input'\nexport * from './range-input'\nexport * from './calendar'\n\n// external dependencies\n\nexport { parseDate, type DateValue } from '@ark-ui/react/date-picker'\nexport {\n CalendarDate,\n today,\n getLocalTimeZone,\n DateFormatter,\n} from '@internationalized/date'\n","import {\n DatePicker,\n type DatePickerContentProps,\n type DatePickerContextProps,\n type DatePickerControlProps,\n type DatePickerInputProps,\n type DatePickerLabelProps,\n type DatePickerMonthSelectProps,\n type DatePickerNextTriggerProps,\n type DatePickerPositionerProps,\n type DatePickerPrevTriggerProps,\n type DatePickerRangeTextProps,\n type DatePickerRootProps,\n type DatePickerTableBodyProps,\n type DatePickerTableCellProps,\n type DatePickerTableCellTriggerProps,\n type DatePickerTableHeaderProps,\n type DatePickerTableHeadProps,\n type DatePickerTableProps,\n type DatePickerTableRowProps,\n type DatePickerTriggerProps,\n type DatePickerViewControlProps,\n type DatePickerViewProps,\n type DatePickerViewTriggerProps,\n type DatePickerYearSelectProps,\n} from '@ark-ui/react/date-picker'\nimport { cx } from 'styled-system/css'\nimport { datePicker } from 'styled-system/recipes'\n\n/**\n * This module contains the DatePicker primitives.\n * @module 'date-picker/primitives'\n */\n\n/**\n * The label component for the DatePicker.\n */\nexport function DatePickerLabel(props: DatePickerLabelProps) {\n const styles = datePicker()\n return (\n <DatePicker.Label\n {...props}\n className={cx(styles.label, props.className)}\n />\n )\n}\n\n/**\n * The control component for the DatePicker which wraps the input and the\n * triggers to open the DatePicker and clear the value.\n */\nexport function DatePickerControl(props: DatePickerControlProps) {\n const styles = datePicker()\n return (\n <DatePicker.Control\n {...props}\n className={cx(styles.control, props.className)}\n />\n )\n}\n\n/**\n * The input component for the DatePicker.\n */\nexport function DatePickerInputEl(props: DatePickerInputProps) {\n const styles = datePicker()\n return (\n <DatePicker.Input\n {...props}\n className={cx(styles.input, props.className)}\n />\n )\n}\n\n/**\n * The trigger component that opens the DatePicker.\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const styles = datePicker()\n return (\n <DatePicker.Trigger\n {...props}\n className={cx(styles.trigger, props.className)}\n />\n )\n}\n\n/**\n * The content component for the DatePicker.\n */\nexport function DatePickerContent(props: DatePickerContentProps) {\n const styles = datePicker()\n return (\n <DatePicker.Content\n {...props}\n className={cx(styles.content, props.className)}\n />\n )\n}\n\n/**\n * The view control component for the DatePicker which wraps the triggers to\n * switch between calendar views.\n */\nexport function DatePickerViewControl(props: DatePickerViewControlProps) {\n const styles = datePicker()\n return (\n <DatePicker.Control\n {...props}\n className={cx(styles.viewControl, props.className)}\n />\n )\n}\n\n/**\n * The range text component for the DatePicker.\n */\nexport function DatePickerRangeText(props: DatePickerRangeTextProps) {\n const styles = datePicker()\n return (\n <DatePicker.RangeText\n {...props}\n className={cx(styles.rangeText, props.className)}\n />\n )\n}\n\n/**\n * The table component for the DatePicker.\n */\nexport function DatePickerTable(props: DatePickerTableProps) {\n const styles = datePicker()\n return (\n <DatePicker.Table\n {...props}\n className={cx(styles.table, props.className)}\n />\n )\n}\n\n/**\n * The header component for the DatePicker table.\n */\nexport function DatePickerTableHeader(props: DatePickerTableHeaderProps) {\n const styles = datePicker()\n return (\n <DatePicker.TableHeader\n {...props}\n className={cx(styles.tableHeader, props.className)}\n />\n )\n}\n\n/**\n * The table cell component for the DatePicker.\n */\nexport function DatePickerTableCell(props: DatePickerTableCellProps) {\n const styles = datePicker()\n return (\n <DatePicker.TableCell\n {...props}\n className={cx(styles.tableCell, props.className)}\n />\n )\n}\n\n/**\n * The table cell trigger component for the DatePicker.\n */\nexport function DatePickerTableCellTrigger(\n props: DatePickerTableCellTriggerProps,\n) {\n const styles = datePicker()\n return (\n <DatePicker.TableCellTrigger\n {...props}\n className={cx(styles.tableCellTrigger, props.className)}\n />\n )\n}\n\n/**\n * The root component of the DatePicker. This primitive has no Cerberus styles.\n */\nexport function DatePickerRoot(props: DatePickerRootProps) {\n return <DatePicker.Root {...props} />\n}\n\n/**\n * The label component of the DatePicker. This primitive has no Cerberus styles.\n */\nexport function DatePickerClearTrigger(props: DatePickerTriggerProps) {\n return <DatePicker.ClearTrigger {...props} />\n}\n\n/**\n * The control component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerPositioner(props: DatePickerPositionerProps) {\n return <DatePicker.Positioner {...props} />\n}\n\n/**\n * The year select input component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerYearSelect(props: DatePickerYearSelectProps) {\n return <DatePicker.YearSelect {...props} />\n}\n\n/**\n * The month select input component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerMonthSelect(props: DatePickerMonthSelectProps) {\n return <DatePicker.MonthSelect {...props} />\n}\n\n/**\n * The day view component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerView(props: DatePickerViewProps) {\n return <DatePicker.View {...props} />\n}\n\n/**\n * The day context component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerContext(props: DatePickerContextProps) {\n return <DatePicker.Context {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerPrevTrigger(props: DatePickerPrevTriggerProps) {\n return <DatePicker.PrevTrigger {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerNextTrigger(props: DatePickerNextTriggerProps) {\n return <DatePicker.NextTrigger {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerViewTrigger(props: DatePickerViewTriggerProps) {\n return <DatePicker.ViewTrigger {...props} />\n}\n\n/**\n * The table head component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableHead(props: DatePickerTableHeadProps) {\n return <DatePicker.TableHead {...props} />\n}\n/**\n * The table row component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableRow(props: DatePickerTableRowProps) {\n return <DatePicker.TableRow {...props} />\n}\n/**\n * The table body component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableBody(props: DatePickerTableBodyProps) {\n return <DatePicker.TableBody {...props} />\n}\n","import type { ElementType } from 'react'\nimport {\n DatePickerClearTrigger,\n DatePickerContent,\n DatePickerContext,\n DatePickerControl,\n DatePickerInputEl,\n DatePickerLabel,\n DatePickerMonthSelect,\n DatePickerNextTrigger,\n DatePickerPositioner,\n DatePickerPrevTrigger,\n DatePickerRangeText,\n DatePickerRoot,\n DatePickerTable,\n DatePickerTableBody,\n DatePickerTableCell,\n DatePickerTableCellTrigger,\n DatePickerTableHead,\n DatePickerTableHeader,\n DatePickerTableRow,\n DatePickerTrigger,\n DatePickerView,\n DatePickerViewControl,\n DatePickerViewTrigger,\n DatePickerYearSelect,\n} from './primitives'\n\n/**\n * This module contains the parts of the DatePicker component.\n * @module 'date-picker/parts'\n */\n\ninterface DatePickerPartsValue {\n /**\n * The container of the date-picker.\n */\n Root: ElementType\n /**\n * The label of the date-picker.\n */\n Label: ElementType\n /**\n * The control of the date-picker.\n */\n Control: ElementType\n /**\n * The input of the date-picker.\n */\n Input: ElementType\n /**\n * The trigger that opens the date-picker.\n */\n Trigger: ElementType\n /**\n * The trigger that clears the value of the date-picker.\n */\n ClearTrigger: ElementType\n /**\n * The positioner of the content for the date-picker.\n */\n Positioner: ElementType\n /**\n * The content of the date-picker.\n */\n Content: ElementType\n /**\n * The year select input of the date-picker.\n */\n YearSelect: ElementType\n /**\n * The month select input of the date-picker.\n */\n MonthSelect: ElementType\n /**\n * The day view of the date-picker.\n */\n View: ElementType\n /**\n * The day context of the date-picker.\n */\n Context: ElementType\n /**\n * The container for the content triggers.\n */\n ViewControl: ElementType\n /**\n * The trigger that moves to the previous month.\n */\n PrevTrigger: ElementType\n /**\n * The trigger that moves to the next month.\n */\n NextTrigger: ElementType\n /**\n * The trigger that moves to the next view.\n */\n ViewTrigger: ElementType\n /**\n * The range text of the date-picker.\n */\n RangeText: ElementType\n /**\n * The table of the date-picker.\n */\n Table: ElementType\n /**\n * The table head of the date-picker.\n */\n TableHead: ElementType\n /**\n * The table row of the date-picker.\n */\n TableRow: ElementType\n /**\n * The header text for the table.\n */\n TableHeader: ElementType\n /**\n * The body of the table.\n */\n TableBody: ElementType\n /**\n * The table cell of the table.\n */\n TableCell: ElementType\n /**\n * The trigger for the table cell.\n */\n TableCellTrigger: ElementType\n}\n\n/**\n * An Object containing the parts of the DatePicker component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the DatePickerParts object and\n * the entire family of components vs. only what you use.\n */\nexport const DatePickerParts: DatePickerPartsValue = {\n Root: DatePickerRoot,\n Label: DatePickerLabel,\n Control: DatePickerControl,\n Input: DatePickerInputEl,\n Trigger: DatePickerTrigger,\n ClearTrigger: DatePickerClearTrigger,\n Positioner: DatePickerPositioner,\n Content: DatePickerContent,\n YearSelect: DatePickerYearSelect,\n MonthSelect: DatePickerMonthSelect,\n View: DatePickerView,\n Context: DatePickerContext,\n ViewControl: DatePickerViewControl,\n PrevTrigger: DatePickerPrevTrigger,\n NextTrigger: DatePickerNextTrigger,\n ViewTrigger: DatePickerViewTrigger,\n RangeText: DatePickerRangeText,\n Table: DatePickerTable,\n TableHead: DatePickerTableHead,\n TableRow: DatePickerTableRow,\n TableHeader: DatePickerTableHeader,\n TableBody: DatePickerTableBody,\n TableCell: DatePickerTableCell,\n TableCellTrigger: DatePickerTableCellTrigger,\n}\n","import type { DatePickerRootProps } from '@ark-ui/react/date-picker'\nimport { DatePickerParts } from './parts'\n\n/**\n * This module contains an abstraction of the DatePicker.Root primitive.\n * @module 'date-picker/root'\n */\n\n/**\n * DatePicker component is an abstraction of the DatePickerRoot primitive which\n * is the context provider to the DatePicker.\n * @description [Cerberus Docs](https://cerberus.digitalu.design/react/date-picker)\n * @description [Ark Docs](https://ark-ui.com/react/docs/components/date-picker)\n */\nexport function DatePicker(props: DatePickerRootProps) {\n // const handleFormat = useCallback((date: DateValue) => {\n // const day = date.day.toString().padStart(2, '0')\n // const year = date.year.toString()\n // const formattedMonth = new DateFormatter('en-US', {\n // month: 'short',\n // }).format(date.toDate(getLocalTimeZone()))\n\n // // Format the date as \"DD MMM YYYY\"\n // return `${day} ${formattedMonth} ${year}`\n // }, [])\n\n return (\n <DatePickerParts.Root\n {...props}\n positioning={{\n placement: 'bottom-start',\n }}\n />\n )\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from 'styled-system/css'\nimport { iconButton, type IconButtonVariantProps } from 'styled-system/recipes'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps extends HTMLArkProps<'button'> {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\nexport type IconButtonProps = IconButtonRawProps & IconButtonVariantProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps) {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <ark.button\n {...nativeProps}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n","'use client'\n\nimport type { DatePickerTriggerProps } from '@ark-ui/react/date-picker'\nimport { useCerberusContext } from '../../context/cerberus'\nimport { IconButton } from '../IconButton'\nimport { DatePickerParts } from './parts'\n\n/**\n * This private module contains the DatePicker trigger component.\n * @module DatePickerTrigger\n */\n\n/**\n * An abstraction of the DatePickerTrigger that toggles the calender open.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const { icons } = useCerberusContext()\n const { calendar: CalendarIcon } = icons\n\n return (\n <DatePickerParts.Trigger {...props} asChild>\n <IconButton ariaLabel=\"Open calendar\" size=\"sm\" usage=\"ghost\">\n <CalendarIcon />\n </IconButton>\n </DatePickerParts.Trigger>\n )\n}\n","import type { DatePickerInputProps } from '@ark-ui/react/date-picker'\nimport { DatePickerTrigger } from './trigger'\nimport { DatePickerParts } from './parts'\n\n/**\n * This module contains an abstraction of the DatePickerInputEl primitive.\n * @module 'date-picker/input'\n */\n\n/**\n * An abstraction of the DatePicker input that wraps the input and the\n * triggers to open the DatePicker and clear the value.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerInput(props: DatePickerInputProps) {\n return (\n <DatePickerParts.Control>\n <DatePickerTrigger />\n <DatePickerParts.Input\n {...props}\n maxLength={11}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n />\n </DatePickerParts.Control>\n )\n}\n","import { type DatePickerInputProps } from '@ark-ui/react/date-picker'\nimport { DatePickerParts } from './parts'\nimport { DatePickerTrigger } from './trigger'\n\n/**\n * This private module contains the RangePickerInput component.\n * @module RangePickerInput\n */\n\nexport type RangePickerInputProps = DatePickerInputProps\n\n/**\n * An abstraction of the DatePicker input that wraps the input and the\n * triggers to open the DatePicker and clear the value.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function RangePickerInput(props: RangePickerInputProps) {\n return (\n <DatePickerParts.Control data-range>\n <DatePickerTrigger />\n <DatePickerParts.Input\n {...props}\n data-range-input\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={0}\n />\n <DatePickerParts.Input\n {...props}\n data-range-input\n data-range-end-input\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={1}\n />\n </DatePickerParts.Control>\n )\n}\n","import { Portal as ArkPortal, type PortalProps } from '@ark-ui/react'\nimport type { PropsWithChildren } from 'react'\n\n/**\n * This module is the Portal component.\n * @module\n */\n\nexport type { PortalProps }\n\n/**\n * The Portal component is used to render children into a DOM node that exists outside the DOM hierarchy of the parent component.\n * @see https://cerberus.digitalu.design/react/portal\n * @definition [React Portal Docs](https://react.dev/reference/react-dom/createPortal)\n * @example\n * ```tsx\n * 'use client'\n *\n * import { Portal } from '@cerberus/react'\n *\n * function SomeFeatureWithinSSRPage() {\n * return (\n * <Portal>\n * <div>Portal Content outside of the React VDom tree</div>\n * </Portal>\n * )\n * }\n */\nexport function Portal(props: PropsWithChildren<PortalProps>) {\n return <ArkPortal {...props} />\n}\n","import type { DatePickerContentProps } from '@ark-ui/react/date-picker'\nimport { Portal } from '../Portal'\nimport { DatePickerParts } from './parts'\n\n/**\n * This private module contains an abstraction of the DatePickerContent\n * primitive.\n * @module 'date-picker/content'\n */\n\n/**\n * An abstraction of the DatePicker content that wraps the DatePickerParts\n * primitives.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerContent(\n props: DatePickerContentProps & {\n withModal?: boolean\n },\n) {\n const { withModal, ...contentProps } = props\n return (\n <Portal disabled={withModal ?? false}>\n <DatePickerParts.Positioner>\n <DatePickerParts.Content {...contentProps} />\n </DatePickerParts.Positioner>\n </Portal>\n )\n}\n","'use client'\n\nimport { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport {\n type PropsWithChildren,\n createContext,\n useContext,\n useMemo,\n} from 'react'\nimport { cx } from 'styled-system/css'\nimport { button, type ButtonVariantProps } from 'styled-system/recipes'\nimport { Box } from '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 = HTMLArkProps<'button'> &\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) {\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 <ark.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","'use client'\n\nimport type { DatePickerViewControlProps } from '@ark-ui/react/date-picker'\nimport { useCerberusContext } from '../../context/cerberus'\nimport { IconButton } from '../IconButton'\nimport { DatePickerParts } from './parts'\nimport { Button } from '../button/button'\nimport { css } from 'styled-system/css'\n\n/**\n * This private module contains an abstraction of the DatePickerViewControl\n * primitive.\n * @module 'date-picker/view-control-group'\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 */\nexport function DatePickerViewControlGroup(props: DatePickerViewControlProps) {\n const { icons } = useCerberusContext()\n const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons\n\n return (\n <DatePickerParts.ViewControl {...props}>\n <DatePickerParts.PrevTrigger asChild>\n <IconButton ariaLabel=\"Previous\" size=\"sm\">\n <PrevIcon />\n </IconButton>\n </DatePickerParts.PrevTrigger>\n\n <DatePickerParts.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 <DatePickerParts.RangeText />\n </Button>\n </DatePickerParts.ViewTrigger>\n\n <DatePickerParts.NextTrigger asChild>\n <IconButton ariaLabel=\"Next\" size=\"sm\">\n <NextIcon />\n </IconButton>\n </DatePickerParts.NextTrigger>\n </DatePickerParts.ViewControl>\n )\n}\n","'use client'\n\nimport type {\n DatePicker,\n DatePickerViewProps,\n UseDatePickerContext,\n} from '@ark-ui/react/date-picker'\nimport { DatePickerParts } from './parts'\nimport { DatePickerViewControlGroup } from './view-control-group'\n\n/**\n * This private module contains an abstraction of the DayView component.\n * @module 'date-picker/day-view'\n */\n\nexport type DateValue = DatePicker.DateValue\n\n/**\n * An abstraction of the DatePickerDayView that renders the day view of the\n * DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerDayView(props: Omit<DatePickerViewProps, 'view'>) {\n function isToday(date: 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: 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: DateValue): 'today' | 'past' | 'future' {\n if (isToday(date)) return 'today'\n if (isPastDay(date)) return 'past'\n return 'future'\n }\n\n return (\n <DatePickerParts.View {...props} view=\"day\">\n <DatePickerParts.Context>\n {(datePickerData: UseDatePickerContext) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerParts.Table>\n <DatePickerParts.TableHead>\n <DatePickerParts.TableRow>\n {datePickerData.weekDays.map((weekDay, id) => (\n <DatePickerParts.TableHeader key={id}>\n {weekDay.narrow}\n </DatePickerParts.TableHeader>\n ))}\n </DatePickerParts.TableRow>\n </DatePickerParts.TableHead>\n\n <DatePickerParts.TableBody>\n {datePickerData.weeks.map((week, id) => (\n <DatePickerParts.TableRow key={id}>\n {week.map((day, id) => (\n <DatePickerParts.TableCell key={id} value={day}>\n <DatePickerParts.TableCellTrigger\n data-date={getDayValue(day)}\n >\n {day.day}\n </DatePickerParts.TableCellTrigger>\n </DatePickerParts.TableCell>\n ))}\n </DatePickerParts.TableRow>\n ))}\n </DatePickerParts.TableBody>\n </DatePickerParts.Table>\n </>\n )}\n </DatePickerParts.Context>\n </DatePickerParts.View>\n )\n}\n","'use client'\n\nimport type {\n DatePickerViewProps,\n UseDatePickerContext,\n} from '@ark-ui/react/date-picker'\nimport { DatePickerParts } from './parts'\nimport { DatePickerViewControlGroup } from './view-control-group'\n\n/**\n * This private module contains an abstraction of the DatePickerMonthView\n * component.\n * @module 'date-picker/month-view'\n */\n\n/**\n * An abstraction of the DatePickerMonthView that renders the month view of the\n * DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerMonthView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <DatePickerParts.View {...props} view=\"month\">\n <DatePickerParts.Context>\n {(datePicker: UseDatePickerContext) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerParts.Table>\n <DatePickerParts.TableBody>\n {datePicker\n .getMonthsGrid({ columns: 4, format: 'short' })\n .map((months, id) => (\n <DatePickerParts.TableRow key={id}>\n {months.map((month, id) => (\n <DatePickerParts.TableCell key={id} value={month.value}>\n <DatePickerParts.TableCellTrigger>\n {month.label}\n </DatePickerParts.TableCellTrigger>\n </DatePickerParts.TableCell>\n ))}\n </DatePickerParts.TableRow>\n ))}\n </DatePickerParts.TableBody>\n </DatePickerParts.Table>\n </>\n )}\n </DatePickerParts.Context>\n </DatePickerParts.View>\n )\n}\n","'use client'\n\nimport type {\n DatePickerViewProps,\n UseDatePickerContext,\n} from '@ark-ui/react/date-picker'\nimport { DatePickerParts } from './parts'\nimport { DatePickerViewControlGroup } from './view-control-group'\n\n/**\n * This private module contains an abstraction of the DatePickerYearView\n * component.\n * @module 'date-picker/year-view'\n */\n\n/**\n * An abstraction of the DatePickerYearView that renders the year view of the\n * DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerYearView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <DatePickerParts.View {...props} view=\"year\">\n <DatePickerParts.Context>\n {(datePicker: UseDatePickerContext) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerParts.Table>\n <DatePickerParts.TableBody>\n {datePicker.getYearsGrid({ columns: 4 }).map((years, id) => (\n <DatePickerParts.TableRow key={id}>\n {years.map((year, id) => (\n <DatePickerParts.TableCell key={id} value={year.value}>\n <DatePickerParts.TableCellTrigger>\n {year.label}\n </DatePickerParts.TableCellTrigger>\n </DatePickerParts.TableCell>\n ))}\n </DatePickerParts.TableRow>\n ))}\n </DatePickerParts.TableBody>\n </DatePickerParts.Table>\n </>\n )}\n </DatePickerParts.Context>\n </DatePickerParts.View>\n )\n}\n","import { DatePickerContent } from './content'\nimport { DatePickerDayView } from './day-view'\nimport { DatePickerMonthView } from './month-view'\nimport { DatePickerYearView } from './year-view'\n\n/**\n * This module contains an abstraction of the DatePicker component.\n * @module 'date-picker/calendar'\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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,yBAyBO;AACP,iBAAmB;AACnB,qBAA2B;AAavB;AAHG,SAAS,gBAAgB,OAA6B;AAC3D,QAAM,aAAS,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;;;AhBxBA,IAAAC,sBAA0C;AAC1C,kBAKO;","names":["DatePicker","import_jsx_runtime","DatePicker","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_jsx_runtime","DatePickerTrigger","import_jsx_runtime","DatePickerTrigger","import_jsx_runtime","DatePickerTrigger","import_react","import_jsx_runtime","ArkPortal","import_jsx_runtime","DatePickerContent","import_factory","import_react","import_css","import_recipes","import_jsx_runtime","import_css","import_jsx_runtime","import_jsx_runtime","today","id","import_jsx_runtime","datePicker","id","import_jsx_runtime","datePicker","id","import_jsx_runtime","DatePickerContent","import_date_picker"]}
@@ -1,3 +1,9 @@
1
+ export { parseDate_alias_1 as parseDate } from '../../_tsup-dts-rollup.cjs';
2
+ export { DateValue_alias_2 as DateValue } from '../../_tsup-dts-rollup.cjs';
3
+ export { CalendarDate_alias_1 as CalendarDate } from '../../_tsup-dts-rollup.cjs';
4
+ export { today_alias_1 as today } from '../../_tsup-dts-rollup.cjs';
5
+ export { getLocalTimeZone_alias_1 as getLocalTimeZone } from '../../_tsup-dts-rollup.cjs';
6
+ export { DateFormatter_alias_1 as DateFormatter } from '../../_tsup-dts-rollup.cjs';
1
7
  export { DatePickerParts_alias_1 as DatePickerParts } from '../../_tsup-dts-rollup.cjs';
2
8
  export { DatePickerLabel_alias_1 as DatePickerLabel } from '../../_tsup-dts-rollup.cjs';
3
9
  export { DatePickerControl_alias_1 as DatePickerControl } from '../../_tsup-dts-rollup.cjs';
@@ -260,8 +260,8 @@ function DatePickerInput(props) {
260
260
  DatePickerParts.Input,
261
261
  {
262
262
  ...props,
263
- placeholder: props.placeholder ?? "DD MMM YYYY",
264
- maxLength: 11
263
+ maxLength: 11,
264
+ placeholder: props.placeholder ?? "DD MMM YYYY"
265
265
  }
266
266
  )
267
267
  ] });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/date-picker/input.tsx","../../../../src/context/cerberus.tsx","../../../../src/components/IconButton.tsx","../../../../src/components/date-picker/primitives.tsx","../../../../src/components/date-picker/parts.ts","../../../../src/components/date-picker/trigger.tsx"],"sourcesContent":["import type { DatePickerInputProps } from '@ark-ui/react/date-picker'\nimport { DatePickerTrigger } from './trigger'\nimport { DatePickerParts } from './parts'\n\n/**\n * This module contains an abstraction of the DatePickerInputEl primitive.\n * @module 'date-picker/input'\n */\n\n/**\n * An abstraction of the DatePicker input that wraps the input and the\n * triggers to open the DatePicker and clear the value.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerInput(props: DatePickerInputProps) {\n return (\n <DatePickerParts.Control>\n <DatePickerTrigger />\n <DatePickerParts.Input\n {...props}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n />\n </DatePickerParts.Control>\n )\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from 'styled-system/css'\nimport { iconButton, type IconButtonVariantProps } from 'styled-system/recipes'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps extends HTMLArkProps<'button'> {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\nexport type IconButtonProps = IconButtonRawProps & IconButtonVariantProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps) {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <ark.button\n {...nativeProps}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n","import {\n DatePicker,\n type DatePickerContentProps,\n type DatePickerContextProps,\n type DatePickerControlProps,\n type DatePickerInputProps,\n type DatePickerLabelProps,\n type DatePickerMonthSelectProps,\n type DatePickerNextTriggerProps,\n type DatePickerPositionerProps,\n type DatePickerPrevTriggerProps,\n type DatePickerRangeTextProps,\n type DatePickerRootProps,\n type DatePickerTableBodyProps,\n type DatePickerTableCellProps,\n type DatePickerTableCellTriggerProps,\n type DatePickerTableHeaderProps,\n type DatePickerTableHeadProps,\n type DatePickerTableProps,\n type DatePickerTableRowProps,\n type DatePickerTriggerProps,\n type DatePickerViewControlProps,\n type DatePickerViewProps,\n type DatePickerViewTriggerProps,\n type DatePickerYearSelectProps,\n} from '@ark-ui/react/date-picker'\nimport { cx } from 'styled-system/css'\nimport { datePicker } from 'styled-system/recipes'\n\n/**\n * This module contains the DatePicker primitives.\n * @module 'date-picker/primitives'\n */\n\n/**\n * The label component for the DatePicker.\n */\nexport function DatePickerLabel(props: DatePickerLabelProps) {\n const styles = datePicker()\n return (\n <DatePicker.Label\n {...props}\n className={cx(styles.label, props.className)}\n />\n )\n}\n\n/**\n * The control component for the DatePicker which wraps the input and the\n * triggers to open the DatePicker and clear the value.\n */\nexport function DatePickerControl(props: DatePickerControlProps) {\n const styles = datePicker()\n return (\n <DatePicker.Control\n {...props}\n className={cx(styles.control, props.className)}\n />\n )\n}\n\n/**\n * The input component for the DatePicker.\n */\nexport function DatePickerInputEl(props: DatePickerInputProps) {\n const styles = datePicker()\n return (\n <DatePicker.Input\n {...props}\n className={cx(styles.input, props.className)}\n />\n )\n}\n\n/**\n * The trigger component that opens the DatePicker.\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const styles = datePicker()\n return (\n <DatePicker.Trigger\n {...props}\n className={cx(styles.trigger, props.className)}\n />\n )\n}\n\n/**\n * The content component for the DatePicker.\n */\nexport function DatePickerContent(props: DatePickerContentProps) {\n const styles = datePicker()\n return (\n <DatePicker.Content\n {...props}\n className={cx(styles.content, props.className)}\n />\n )\n}\n\n/**\n * The view control component for the DatePicker which wraps the triggers to\n * switch between calendar views.\n */\nexport function DatePickerViewControl(props: DatePickerViewControlProps) {\n const styles = datePicker()\n return (\n <DatePicker.Control\n {...props}\n className={cx(styles.viewControl, props.className)}\n />\n )\n}\n\n/**\n * The range text component for the DatePicker.\n */\nexport function DatePickerRangeText(props: DatePickerRangeTextProps) {\n const styles = datePicker()\n return (\n <DatePicker.RangeText\n {...props}\n className={cx(styles.rangeText, props.className)}\n />\n )\n}\n\n/**\n * The table component for the DatePicker.\n */\nexport function DatePickerTable(props: DatePickerTableProps) {\n const styles = datePicker()\n return (\n <DatePicker.Table\n {...props}\n className={cx(styles.table, props.className)}\n />\n )\n}\n\n/**\n * The header component for the DatePicker table.\n */\nexport function DatePickerTableHeader(props: DatePickerTableHeaderProps) {\n const styles = datePicker()\n return (\n <DatePicker.TableHeader\n {...props}\n className={cx(styles.tableHeader, props.className)}\n />\n )\n}\n\n/**\n * The table cell component for the DatePicker.\n */\nexport function DatePickerTableCell(props: DatePickerTableCellProps) {\n const styles = datePicker()\n return (\n <DatePicker.TableCell\n {...props}\n className={cx(styles.tableCell, props.className)}\n />\n )\n}\n\n/**\n * The table cell trigger component for the DatePicker.\n */\nexport function DatePickerTableCellTrigger(\n props: DatePickerTableCellTriggerProps,\n) {\n const styles = datePicker()\n return (\n <DatePicker.TableCellTrigger\n {...props}\n className={cx(styles.tableCellTrigger, props.className)}\n />\n )\n}\n\n/**\n * The root component of the DatePicker. This primitive has no Cerberus styles.\n */\nexport function DatePickerRoot(props: DatePickerRootProps) {\n return <DatePicker.Root {...props} />\n}\n\n/**\n * The label component of the DatePicker. This primitive has no Cerberus styles.\n */\nexport function DatePickerClearTrigger(props: DatePickerTriggerProps) {\n return <DatePicker.ClearTrigger {...props} />\n}\n\n/**\n * The control component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerPositioner(props: DatePickerPositionerProps) {\n return <DatePicker.Positioner {...props} />\n}\n\n/**\n * The year select input component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerYearSelect(props: DatePickerYearSelectProps) {\n return <DatePicker.YearSelect {...props} />\n}\n\n/**\n * The month select input component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerMonthSelect(props: DatePickerMonthSelectProps) {\n return <DatePicker.MonthSelect {...props} />\n}\n\n/**\n * The day view component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerView(props: DatePickerViewProps) {\n return <DatePicker.View {...props} />\n}\n\n/**\n * The day context component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerContext(props: DatePickerContextProps) {\n return <DatePicker.Context {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerPrevTrigger(props: DatePickerPrevTriggerProps) {\n return <DatePicker.PrevTrigger {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerNextTrigger(props: DatePickerNextTriggerProps) {\n return <DatePicker.NextTrigger {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerViewTrigger(props: DatePickerViewTriggerProps) {\n return <DatePicker.ViewTrigger {...props} />\n}\n\n/**\n * The table head component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableHead(props: DatePickerTableHeadProps) {\n return <DatePicker.TableHead {...props} />\n}\n/**\n * The table row component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableRow(props: DatePickerTableRowProps) {\n return <DatePicker.TableRow {...props} />\n}\n/**\n * The table body component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableBody(props: DatePickerTableBodyProps) {\n return <DatePicker.TableBody {...props} />\n}\n","import type { ElementType } from 'react'\nimport {\n DatePickerClearTrigger,\n DatePickerContent,\n DatePickerContext,\n DatePickerControl,\n DatePickerInputEl,\n DatePickerLabel,\n DatePickerMonthSelect,\n DatePickerNextTrigger,\n DatePickerPositioner,\n DatePickerPrevTrigger,\n DatePickerRangeText,\n DatePickerRoot,\n DatePickerTable,\n DatePickerTableBody,\n DatePickerTableCell,\n DatePickerTableCellTrigger,\n DatePickerTableHead,\n DatePickerTableHeader,\n DatePickerTableRow,\n DatePickerTrigger,\n DatePickerView,\n DatePickerViewControl,\n DatePickerViewTrigger,\n DatePickerYearSelect,\n} from './primitives'\n\n/**\n * This module contains the parts of the DatePicker component.\n * @module 'date-picker/parts'\n */\n\ninterface DatePickerPartsValue {\n /**\n * The container of the date-picker.\n */\n Root: ElementType\n /**\n * The label of the date-picker.\n */\n Label: ElementType\n /**\n * The control of the date-picker.\n */\n Control: ElementType\n /**\n * The input of the date-picker.\n */\n Input: ElementType\n /**\n * The trigger that opens the date-picker.\n */\n Trigger: ElementType\n /**\n * The trigger that clears the value of the date-picker.\n */\n ClearTrigger: ElementType\n /**\n * The positioner of the content for the date-picker.\n */\n Positioner: ElementType\n /**\n * The content of the date-picker.\n */\n Content: ElementType\n /**\n * The year select input of the date-picker.\n */\n YearSelect: ElementType\n /**\n * The month select input of the date-picker.\n */\n MonthSelect: ElementType\n /**\n * The day view of the date-picker.\n */\n View: ElementType\n /**\n * The day context of the date-picker.\n */\n Context: ElementType\n /**\n * The container for the content triggers.\n */\n ViewControl: ElementType\n /**\n * The trigger that moves to the previous month.\n */\n PrevTrigger: ElementType\n /**\n * The trigger that moves to the next month.\n */\n NextTrigger: ElementType\n /**\n * The trigger that moves to the next view.\n */\n ViewTrigger: ElementType\n /**\n * The range text of the date-picker.\n */\n RangeText: ElementType\n /**\n * The table of the date-picker.\n */\n Table: ElementType\n /**\n * The table head of the date-picker.\n */\n TableHead: ElementType\n /**\n * The table row of the date-picker.\n */\n TableRow: ElementType\n /**\n * The header text for the table.\n */\n TableHeader: ElementType\n /**\n * The body of the table.\n */\n TableBody: ElementType\n /**\n * The table cell of the table.\n */\n TableCell: ElementType\n /**\n * The trigger for the table cell.\n */\n TableCellTrigger: ElementType\n}\n\n/**\n * An Object containing the parts of the DatePicker component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the DatePickerParts object and\n * the entire family of components vs. only what you use.\n */\nexport const DatePickerParts: DatePickerPartsValue = {\n Root: DatePickerRoot,\n Label: DatePickerLabel,\n Control: DatePickerControl,\n Input: DatePickerInputEl,\n Trigger: DatePickerTrigger,\n ClearTrigger: DatePickerClearTrigger,\n Positioner: DatePickerPositioner,\n Content: DatePickerContent,\n YearSelect: DatePickerYearSelect,\n MonthSelect: DatePickerMonthSelect,\n View: DatePickerView,\n Context: DatePickerContext,\n ViewControl: DatePickerViewControl,\n PrevTrigger: DatePickerPrevTrigger,\n NextTrigger: DatePickerNextTrigger,\n ViewTrigger: DatePickerViewTrigger,\n RangeText: DatePickerRangeText,\n Table: DatePickerTable,\n TableHead: DatePickerTableHead,\n TableRow: DatePickerTableRow,\n TableHeader: DatePickerTableHeader,\n TableBody: DatePickerTableBody,\n TableCell: DatePickerTableCell,\n TableCellTrigger: DatePickerTableCellTrigger,\n}\n","'use client'\n\nimport type { DatePickerTriggerProps } from '@ark-ui/react/date-picker'\nimport { useCerberusContext } from '../../context/cerberus'\nimport { IconButton } from '../IconButton'\nimport { DatePickerParts } from './parts'\n\n/**\n * This private module contains the DatePicker trigger component.\n * @module DatePickerTrigger\n */\n\n/**\n * An abstraction of the DatePickerTrigger that toggles the calender open.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const { icons } = useCerberusContext()\n const { calendar: CalendarIcon } = icons\n\n return (\n <DatePickerParts.Trigger {...props} asChild>\n <IconButton ariaLabel=\"Open calendar\" size=\"sm\" usage=\"ghost\">\n <CalendarIcon />\n </IconButton>\n </DatePickerParts.Trigger>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,mBAAkE;AAyB9D;AAfJ,IAAM,sBAAkB,4BAA2C,IAAI;AAyBhE,SAAS,qBAAqB;AACnC,QAAM,cAAU,yBAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;AC3CA,qBAAuC;AACvC,iBAAmB;AACnB,qBAAwD;AAsBpD,IAAAA,sBAAA;AAHG,SAAS,WAAW,OAAwB;AACjD,QAAM,EAAE,WAAW,SAAS,OAAO,MAAM,GAAG,YAAY,IAAI;AAC5D,SACE;AAAA,IAAC,mBAAI;AAAA,IAAJ;AAAA,MACE,GAAG;AAAA,MACJ,cAAY,aAAa;AAAA,MACzB,eAAW;AAAA,QACT,YAAY;AAAA,YACZ,2BAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;;;ACrCA,yBAyBO;AACP,IAAAC,cAAmB;AACnB,IAAAC,kBAA2B;AAavB,IAAAC,sBAAA;AAHG,SAAS,gBAAgB,OAA6B;AAC3D,QAAM,aAAS,4BAAW;AAC1B,SACE;AAAA,IAAC,8BAAW;AAAA,IAAX;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,gBAAG,OAAO,OAAO,MAAM,SAAS;AAAA;AAAA,EAC7C;AAEJ;AAMO,SAAS,kBAAkB,OAA+B;AAC/D,QAAM,aAAS,4BAAW;AAC1B,SACE;AAAA,IAAC,8BAAW;AAAA,IAAX;A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AAgB,SAAhB,EACC;AAAA,iDAACC,oBAAA,EAAkB;AAAA,IACnB;AAAA,MAAC,gBAAgB;AAAA,MAAhB;AAAA,QACE,GAAG;AAAA,QACJ,aAAa,MAAM,eAAe;AAAA,QAClC,WAAW;AAAA;AAAA,IACb;AAAA,KACF;AAEJ;","names":["import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_jsx_runtime","DatePickerTrigger","import_jsx_runtime","DatePickerTrigger"]}
1
+ {"version":3,"sources":["../../../../src/components/date-picker/input.tsx","../../../../src/context/cerberus.tsx","../../../../src/components/IconButton.tsx","../../../../src/components/date-picker/primitives.tsx","../../../../src/components/date-picker/parts.ts","../../../../src/components/date-picker/trigger.tsx"],"sourcesContent":["import type { DatePickerInputProps } from '@ark-ui/react/date-picker'\nimport { DatePickerTrigger } from './trigger'\nimport { DatePickerParts } from './parts'\n\n/**\n * This module contains an abstraction of the DatePickerInputEl primitive.\n * @module 'date-picker/input'\n */\n\n/**\n * An abstraction of the DatePicker input that wraps the input and the\n * triggers to open the DatePicker and clear the value.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerInput(props: DatePickerInputProps) {\n return (\n <DatePickerParts.Control>\n <DatePickerTrigger />\n <DatePickerParts.Input\n {...props}\n maxLength={11}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n />\n </DatePickerParts.Control>\n )\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from 'styled-system/css'\nimport { iconButton, type IconButtonVariantProps } from 'styled-system/recipes'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps extends HTMLArkProps<'button'> {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\nexport type IconButtonProps = IconButtonRawProps & IconButtonVariantProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps) {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <ark.button\n {...nativeProps}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n","import {\n DatePicker,\n type DatePickerContentProps,\n type DatePickerContextProps,\n type DatePickerControlProps,\n type DatePickerInputProps,\n type DatePickerLabelProps,\n type DatePickerMonthSelectProps,\n type DatePickerNextTriggerProps,\n type DatePickerPositionerProps,\n type DatePickerPrevTriggerProps,\n type DatePickerRangeTextProps,\n type DatePickerRootProps,\n type DatePickerTableBodyProps,\n type DatePickerTableCellProps,\n type DatePickerTableCellTriggerProps,\n type DatePickerTableHeaderProps,\n type DatePickerTableHeadProps,\n type DatePickerTableProps,\n type DatePickerTableRowProps,\n type DatePickerTriggerProps,\n type DatePickerViewControlProps,\n type DatePickerViewProps,\n type DatePickerViewTriggerProps,\n type DatePickerYearSelectProps,\n} from '@ark-ui/react/date-picker'\nimport { cx } from 'styled-system/css'\nimport { datePicker } from 'styled-system/recipes'\n\n/**\n * This module contains the DatePicker primitives.\n * @module 'date-picker/primitives'\n */\n\n/**\n * The label component for the DatePicker.\n */\nexport function DatePickerLabel(props: DatePickerLabelProps) {\n const styles = datePicker()\n return (\n <DatePicker.Label\n {...props}\n className={cx(styles.label, props.className)}\n />\n )\n}\n\n/**\n * The control component for the DatePicker which wraps the input and the\n * triggers to open the DatePicker and clear the value.\n */\nexport function DatePickerControl(props: DatePickerControlProps) {\n const styles = datePicker()\n return (\n <DatePicker.Control\n {...props}\n className={cx(styles.control, props.className)}\n />\n )\n}\n\n/**\n * The input component for the DatePicker.\n */\nexport function DatePickerInputEl(props: DatePickerInputProps) {\n const styles = datePicker()\n return (\n <DatePicker.Input\n {...props}\n className={cx(styles.input, props.className)}\n />\n )\n}\n\n/**\n * The trigger component that opens the DatePicker.\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const styles = datePicker()\n return (\n <DatePicker.Trigger\n {...props}\n className={cx(styles.trigger, props.className)}\n />\n )\n}\n\n/**\n * The content component for the DatePicker.\n */\nexport function DatePickerContent(props: DatePickerContentProps) {\n const styles = datePicker()\n return (\n <DatePicker.Content\n {...props}\n className={cx(styles.content, props.className)}\n />\n )\n}\n\n/**\n * The view control component for the DatePicker which wraps the triggers to\n * switch between calendar views.\n */\nexport function DatePickerViewControl(props: DatePickerViewControlProps) {\n const styles = datePicker()\n return (\n <DatePicker.Control\n {...props}\n className={cx(styles.viewControl, props.className)}\n />\n )\n}\n\n/**\n * The range text component for the DatePicker.\n */\nexport function DatePickerRangeText(props: DatePickerRangeTextProps) {\n const styles = datePicker()\n return (\n <DatePicker.RangeText\n {...props}\n className={cx(styles.rangeText, props.className)}\n />\n )\n}\n\n/**\n * The table component for the DatePicker.\n */\nexport function DatePickerTable(props: DatePickerTableProps) {\n const styles = datePicker()\n return (\n <DatePicker.Table\n {...props}\n className={cx(styles.table, props.className)}\n />\n )\n}\n\n/**\n * The header component for the DatePicker table.\n */\nexport function DatePickerTableHeader(props: DatePickerTableHeaderProps) {\n const styles = datePicker()\n return (\n <DatePicker.TableHeader\n {...props}\n className={cx(styles.tableHeader, props.className)}\n />\n )\n}\n\n/**\n * The table cell component for the DatePicker.\n */\nexport function DatePickerTableCell(props: DatePickerTableCellProps) {\n const styles = datePicker()\n return (\n <DatePicker.TableCell\n {...props}\n className={cx(styles.tableCell, props.className)}\n />\n )\n}\n\n/**\n * The table cell trigger component for the DatePicker.\n */\nexport function DatePickerTableCellTrigger(\n props: DatePickerTableCellTriggerProps,\n) {\n const styles = datePicker()\n return (\n <DatePicker.TableCellTrigger\n {...props}\n className={cx(styles.tableCellTrigger, props.className)}\n />\n )\n}\n\n/**\n * The root component of the DatePicker. This primitive has no Cerberus styles.\n */\nexport function DatePickerRoot(props: DatePickerRootProps) {\n return <DatePicker.Root {...props} />\n}\n\n/**\n * The label component of the DatePicker. This primitive has no Cerberus styles.\n */\nexport function DatePickerClearTrigger(props: DatePickerTriggerProps) {\n return <DatePicker.ClearTrigger {...props} />\n}\n\n/**\n * The control component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerPositioner(props: DatePickerPositionerProps) {\n return <DatePicker.Positioner {...props} />\n}\n\n/**\n * The year select input component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerYearSelect(props: DatePickerYearSelectProps) {\n return <DatePicker.YearSelect {...props} />\n}\n\n/**\n * The month select input component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerMonthSelect(props: DatePickerMonthSelectProps) {\n return <DatePicker.MonthSelect {...props} />\n}\n\n/**\n * The day view component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerView(props: DatePickerViewProps) {\n return <DatePicker.View {...props} />\n}\n\n/**\n * The day context component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerContext(props: DatePickerContextProps) {\n return <DatePicker.Context {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerPrevTrigger(props: DatePickerPrevTriggerProps) {\n return <DatePicker.PrevTrigger {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerNextTrigger(props: DatePickerNextTriggerProps) {\n return <DatePicker.NextTrigger {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerViewTrigger(props: DatePickerViewTriggerProps) {\n return <DatePicker.ViewTrigger {...props} />\n}\n\n/**\n * The table head component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableHead(props: DatePickerTableHeadProps) {\n return <DatePicker.TableHead {...props} />\n}\n/**\n * The table row component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableRow(props: DatePickerTableRowProps) {\n return <DatePicker.TableRow {...props} />\n}\n/**\n * The table body component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableBody(props: DatePickerTableBodyProps) {\n return <DatePicker.TableBody {...props} />\n}\n","import type { ElementType } from 'react'\nimport {\n DatePickerClearTrigger,\n DatePickerContent,\n DatePickerContext,\n DatePickerControl,\n DatePickerInputEl,\n DatePickerLabel,\n DatePickerMonthSelect,\n DatePickerNextTrigger,\n DatePickerPositioner,\n DatePickerPrevTrigger,\n DatePickerRangeText,\n DatePickerRoot,\n DatePickerTable,\n DatePickerTableBody,\n DatePickerTableCell,\n DatePickerTableCellTrigger,\n DatePickerTableHead,\n DatePickerTableHeader,\n DatePickerTableRow,\n DatePickerTrigger,\n DatePickerView,\n DatePickerViewControl,\n DatePickerViewTrigger,\n DatePickerYearSelect,\n} from './primitives'\n\n/**\n * This module contains the parts of the DatePicker component.\n * @module 'date-picker/parts'\n */\n\ninterface DatePickerPartsValue {\n /**\n * The container of the date-picker.\n */\n Root: ElementType\n /**\n * The label of the date-picker.\n */\n Label: ElementType\n /**\n * The control of the date-picker.\n */\n Control: ElementType\n /**\n * The input of the date-picker.\n */\n Input: ElementType\n /**\n * The trigger that opens the date-picker.\n */\n Trigger: ElementType\n /**\n * The trigger that clears the value of the date-picker.\n */\n ClearTrigger: ElementType\n /**\n * The positioner of the content for the date-picker.\n */\n Positioner: ElementType\n /**\n * The content of the date-picker.\n */\n Content: ElementType\n /**\n * The year select input of the date-picker.\n */\n YearSelect: ElementType\n /**\n * The month select input of the date-picker.\n */\n MonthSelect: ElementType\n /**\n * The day view of the date-picker.\n */\n View: ElementType\n /**\n * The day context of the date-picker.\n */\n Context: ElementType\n /**\n * The container for the content triggers.\n */\n ViewControl: ElementType\n /**\n * The trigger that moves to the previous month.\n */\n PrevTrigger: ElementType\n /**\n * The trigger that moves to the next month.\n */\n NextTrigger: ElementType\n /**\n * The trigger that moves to the next view.\n */\n ViewTrigger: ElementType\n /**\n * The range text of the date-picker.\n */\n RangeText: ElementType\n /**\n * The table of the date-picker.\n */\n Table: ElementType\n /**\n * The table head of the date-picker.\n */\n TableHead: ElementType\n /**\n * The table row of the date-picker.\n */\n TableRow: ElementType\n /**\n * The header text for the table.\n */\n TableHeader: ElementType\n /**\n * The body of the table.\n */\n TableBody: ElementType\n /**\n * The table cell of the table.\n */\n TableCell: ElementType\n /**\n * The trigger for the table cell.\n */\n TableCellTrigger: ElementType\n}\n\n/**\n * An Object containing the parts of the DatePicker component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the DatePickerParts object and\n * the entire family of components vs. only what you use.\n */\nexport const DatePickerParts: DatePickerPartsValue = {\n Root: DatePickerRoot,\n Label: DatePickerLabel,\n Control: DatePickerControl,\n Input: DatePickerInputEl,\n Trigger: DatePickerTrigger,\n ClearTrigger: DatePickerClearTrigger,\n Positioner: DatePickerPositioner,\n Content: DatePickerContent,\n YearSelect: DatePickerYearSelect,\n MonthSelect: DatePickerMonthSelect,\n View: DatePickerView,\n Context: DatePickerContext,\n ViewControl: DatePickerViewControl,\n PrevTrigger: DatePickerPrevTrigger,\n NextTrigger: DatePickerNextTrigger,\n ViewTrigger: DatePickerViewTrigger,\n RangeText: DatePickerRangeText,\n Table: DatePickerTable,\n TableHead: DatePickerTableHead,\n TableRow: DatePickerTableRow,\n TableHeader: DatePickerTableHeader,\n TableBody: DatePickerTableBody,\n TableCell: DatePickerTableCell,\n TableCellTrigger: DatePickerTableCellTrigger,\n}\n","'use client'\n\nimport type { DatePickerTriggerProps } from '@ark-ui/react/date-picker'\nimport { useCerberusContext } from '../../context/cerberus'\nimport { IconButton } from '../IconButton'\nimport { DatePickerParts } from './parts'\n\n/**\n * This private module contains the DatePicker trigger component.\n * @module DatePickerTrigger\n */\n\n/**\n * An abstraction of the DatePickerTrigger that toggles the calender open.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const { icons } = useCerberusContext()\n const { calendar: CalendarIcon } = icons\n\n return (\n <DatePickerParts.Trigger {...props} asChild>\n <IconButton ariaLabel=\"Open calendar\" size=\"sm\" usage=\"ghost\">\n <CalendarIcon />\n </IconButton>\n </DatePickerParts.Trigger>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,mBAAkE;AAyB9D;AAfJ,IAAM,sBAAkB,4BAA2C,IAAI;AAyBhE,SAAS,qBAAqB;AACnC,QAAM,cAAU,yBAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;AC3CA,qBAAuC;AACvC,iBAAmB;AACnB,qBAAwD;AAsBpD,IAAAA,sBAAA;AAHG,SAAS,WAAW,OAAwB;AACjD,QAAM,EAAE,WAAW,SAAS,OAAO,MAAM,GAAG,YAAY,IAAI;AAC5D,SACE;AAAA,IAAC,mBAAI;AAAA,IAAJ;AAAA,MACE,GAAG;AAAA,MACJ,cAAY,aAAa;AAAA,MACzB,eAAW;AAAA,QACT,YAAY;AAAA,YACZ,2BAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AA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,WAAW;AAAA,EACX,WAAW;AAAA,EACX,kBAAkB;AACpB;;;AC/IQ,IAAAC,sBAAA;AAPD,SAASC,mBAAkB,OAA+B;AAC/D,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,UAAU,aAAa,IAAI;AAEnC,SACE,6CAAC,gBAAgB,SAAhB,EAAyB,GAAG,OAAO,SAAO,MACzC,uDAAC,cAAW,WAAU,iBAAgB,MAAK,MAAK,OAAM,SACpD,uDAAC,gBAAa,GAChB,GACF;AAEJ;;;ALXI,IAAAC,sBAAA;AAFG,SAAS,gBAAgB,OAA6B;AAC3D,SACE,8CAAC,gBAAgB,SAAhB,EACC;AAAA,iDAACC,oBAAA,EAAkB;AAAA,IACnB;AAAA,MAAC,gBAAgB;AAAA,MAAhB;AAAA,QACE,GAAG;AAAA,QACJ,WAAW;AAAA,QACX,aAAa,MAAM,eAAe;AAAA;AAAA,IACpC;AAAA,KACF;AAEJ;","names":["import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_jsx_runtime","DatePickerTrigger","import_jsx_runtime","DatePickerTrigger"]}
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- "use client";
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -24,7 +23,6 @@ __export(range_input_exports, {
24
23
  RangePickerInput: () => RangePickerInput
25
24
  });
26
25
  module.exports = __toCommonJS(range_input_exports);
27
- var import_react2 = require("react");
28
26
 
29
27
  // src/components/date-picker/primitives.tsx
30
28
  var import_date_picker = require("@ark-ui/react/date-picker");
@@ -256,17 +254,13 @@ function DatePickerTrigger2(props) {
256
254
  // src/components/date-picker/range-input.tsx
257
255
  var import_jsx_runtime5 = require("react/jsx-runtime");
258
256
  function RangePickerInput(props) {
259
- const { defaultValue, ...nativeProps } = props;
260
- const startDate = (0, import_react2.useMemo)(() => defaultValue == null ? void 0 : defaultValue[0], [defaultValue]);
261
- const endDate = (0, import_react2.useMemo)(() => defaultValue == null ? void 0 : defaultValue[1], [defaultValue]);
262
257
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(DatePickerParts.Control, { "data-range": true, children: [
263
258
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(DatePickerTrigger2, {}),
264
259
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
265
260
  DatePickerParts.Input,
266
261
  {
267
- ...nativeProps,
262
+ ...props,
268
263
  "data-range-input": true,
269
- defaultValue: startDate,
270
264
  placeholder: props.placeholder ?? "DD MMM YYYY",
271
265
  maxLength: 11,
272
266
  index: 0
@@ -275,9 +269,8 @@ function RangePickerInput(props) {
275
269
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
276
270
  DatePickerParts.Input,
277
271
  {
278
- ...nativeProps,
272
+ ...props,
279
273
  "data-range-input": true,
280
- defaultValue: endDate,
281
274
  "data-range-end-input": true,
282
275
  placeholder: props.placeholder ?? "DD MMM YYYY",
283
276
  maxLength: 11,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/date-picker/range-input.tsx","../../../../src/components/date-picker/primitives.tsx","../../../../src/components/date-picker/parts.ts","../../../../src/context/cerberus.tsx","../../../../src/components/IconButton.tsx","../../../../src/components/date-picker/trigger.tsx"],"sourcesContent":["'use client'\n\nimport type { DatePickerInputProps } from '@ark-ui/react/date-picker'\nimport { useMemo, type InputHTMLAttributes } from 'react'\nimport { DatePickerParts } from './parts'\nimport { DatePickerTrigger } from './trigger'\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 * An abstraction of the DatePicker input that wraps the input and the\n * triggers to open the DatePicker and clear the value.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\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 <DatePickerParts.Control data-range>\n <DatePickerTrigger />\n <DatePickerParts.Input\n {...nativeProps}\n data-range-input\n defaultValue={startDate}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={0}\n />\n <DatePickerParts.Input\n {...nativeProps}\n data-range-input\n defaultValue={endDate}\n data-range-end-input\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={1}\n />\n </DatePickerParts.Control>\n )\n}\n","import {\n DatePicker,\n type DatePickerContentProps,\n type DatePickerContextProps,\n type DatePickerControlProps,\n type DatePickerInputProps,\n type DatePickerLabelProps,\n type DatePickerMonthSelectProps,\n type DatePickerNextTriggerProps,\n type DatePickerPositionerProps,\n type DatePickerPrevTriggerProps,\n type DatePickerRangeTextProps,\n type DatePickerRootProps,\n type DatePickerTableBodyProps,\n type DatePickerTableCellProps,\n type DatePickerTableCellTriggerProps,\n type DatePickerTableHeaderProps,\n type DatePickerTableHeadProps,\n type DatePickerTableProps,\n type DatePickerTableRowProps,\n type DatePickerTriggerProps,\n type DatePickerViewControlProps,\n type DatePickerViewProps,\n type DatePickerViewTriggerProps,\n type DatePickerYearSelectProps,\n} from '@ark-ui/react/date-picker'\nimport { cx } from 'styled-system/css'\nimport { datePicker } from 'styled-system/recipes'\n\n/**\n * This module contains the DatePicker primitives.\n * @module 'date-picker/primitives'\n */\n\n/**\n * The label component for the DatePicker.\n */\nexport function DatePickerLabel(props: DatePickerLabelProps) {\n const styles = datePicker()\n return (\n <DatePicker.Label\n {...props}\n className={cx(styles.label, props.className)}\n />\n )\n}\n\n/**\n * The control component for the DatePicker which wraps the input and the\n * triggers to open the DatePicker and clear the value.\n */\nexport function DatePickerControl(props: DatePickerControlProps) {\n const styles = datePicker()\n return (\n <DatePicker.Control\n {...props}\n className={cx(styles.control, props.className)}\n />\n )\n}\n\n/**\n * The input component for the DatePicker.\n */\nexport function DatePickerInputEl(props: DatePickerInputProps) {\n const styles = datePicker()\n return (\n <DatePicker.Input\n {...props}\n className={cx(styles.input, props.className)}\n />\n )\n}\n\n/**\n * The trigger component that opens the DatePicker.\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const styles = datePicker()\n return (\n <DatePicker.Trigger\n {...props}\n className={cx(styles.trigger, props.className)}\n />\n )\n}\n\n/**\n * The content component for the DatePicker.\n */\nexport function DatePickerContent(props: DatePickerContentProps) {\n const styles = datePicker()\n return (\n <DatePicker.Content\n {...props}\n className={cx(styles.content, props.className)}\n />\n )\n}\n\n/**\n * The view control component for the DatePicker which wraps the triggers to\n * switch between calendar views.\n */\nexport function DatePickerViewControl(props: DatePickerViewControlProps) {\n const styles = datePicker()\n return (\n <DatePicker.Control\n {...props}\n className={cx(styles.viewControl, props.className)}\n />\n )\n}\n\n/**\n * The range text component for the DatePicker.\n */\nexport function DatePickerRangeText(props: DatePickerRangeTextProps) {\n const styles = datePicker()\n return (\n <DatePicker.RangeText\n {...props}\n className={cx(styles.rangeText, props.className)}\n />\n )\n}\n\n/**\n * The table component for the DatePicker.\n */\nexport function DatePickerTable(props: DatePickerTableProps) {\n const styles = datePicker()\n return (\n <DatePicker.Table\n {...props}\n className={cx(styles.table, props.className)}\n />\n )\n}\n\n/**\n * The header component for the DatePicker table.\n */\nexport function DatePickerTableHeader(props: DatePickerTableHeaderProps) {\n const styles = datePicker()\n return (\n <DatePicker.TableHeader\n {...props}\n className={cx(styles.tableHeader, props.className)}\n />\n )\n}\n\n/**\n * The table cell component for the DatePicker.\n */\nexport function DatePickerTableCell(props: DatePickerTableCellProps) {\n const styles = datePicker()\n return (\n <DatePicker.TableCell\n {...props}\n className={cx(styles.tableCell, props.className)}\n />\n )\n}\n\n/**\n * The table cell trigger component for the DatePicker.\n */\nexport function DatePickerTableCellTrigger(\n props: DatePickerTableCellTriggerProps,\n) {\n const styles = datePicker()\n return (\n <DatePicker.TableCellTrigger\n {...props}\n className={cx(styles.tableCellTrigger, props.className)}\n />\n )\n}\n\n/**\n * The root component of the DatePicker. This primitive has no Cerberus styles.\n */\nexport function DatePickerRoot(props: DatePickerRootProps) {\n return <DatePicker.Root {...props} />\n}\n\n/**\n * The label component of the DatePicker. This primitive has no Cerberus styles.\n */\nexport function DatePickerClearTrigger(props: DatePickerTriggerProps) {\n return <DatePicker.ClearTrigger {...props} />\n}\n\n/**\n * The control component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerPositioner(props: DatePickerPositionerProps) {\n return <DatePicker.Positioner {...props} />\n}\n\n/**\n * The year select input component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerYearSelect(props: DatePickerYearSelectProps) {\n return <DatePicker.YearSelect {...props} />\n}\n\n/**\n * The month select input component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerMonthSelect(props: DatePickerMonthSelectProps) {\n return <DatePicker.MonthSelect {...props} />\n}\n\n/**\n * The day view component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerView(props: DatePickerViewProps) {\n return <DatePicker.View {...props} />\n}\n\n/**\n * The day context component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerContext(props: DatePickerContextProps) {\n return <DatePicker.Context {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerPrevTrigger(props: DatePickerPrevTriggerProps) {\n return <DatePicker.PrevTrigger {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerNextTrigger(props: DatePickerNextTriggerProps) {\n return <DatePicker.NextTrigger {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerViewTrigger(props: DatePickerViewTriggerProps) {\n return <DatePicker.ViewTrigger {...props} />\n}\n\n/**\n * The table head component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableHead(props: DatePickerTableHeadProps) {\n return <DatePicker.TableHead {...props} />\n}\n/**\n * The table row component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableRow(props: DatePickerTableRowProps) {\n return <DatePicker.TableRow {...props} />\n}\n/**\n * The table body component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableBody(props: DatePickerTableBodyProps) {\n return <DatePicker.TableBody {...props} />\n}\n","import type { ElementType } from 'react'\nimport {\n DatePickerClearTrigger,\n DatePickerContent,\n DatePickerContext,\n DatePickerControl,\n DatePickerInputEl,\n DatePickerLabel,\n DatePickerMonthSelect,\n DatePickerNextTrigger,\n DatePickerPositioner,\n DatePickerPrevTrigger,\n DatePickerRangeText,\n DatePickerRoot,\n DatePickerTable,\n DatePickerTableBody,\n DatePickerTableCell,\n DatePickerTableCellTrigger,\n DatePickerTableHead,\n DatePickerTableHeader,\n DatePickerTableRow,\n DatePickerTrigger,\n DatePickerView,\n DatePickerViewControl,\n DatePickerViewTrigger,\n DatePickerYearSelect,\n} from './primitives'\n\n/**\n * This module contains the parts of the DatePicker component.\n * @module 'date-picker/parts'\n */\n\ninterface DatePickerPartsValue {\n /**\n * The container of the date-picker.\n */\n Root: ElementType\n /**\n * The label of the date-picker.\n */\n Label: ElementType\n /**\n * The control of the date-picker.\n */\n Control: ElementType\n /**\n * The input of the date-picker.\n */\n Input: ElementType\n /**\n * The trigger that opens the date-picker.\n */\n Trigger: ElementType\n /**\n * The trigger that clears the value of the date-picker.\n */\n ClearTrigger: ElementType\n /**\n * The positioner of the content for the date-picker.\n */\n Positioner: ElementType\n /**\n * The content of the date-picker.\n */\n Content: ElementType\n /**\n * The year select input of the date-picker.\n */\n YearSelect: ElementType\n /**\n * The month select input of the date-picker.\n */\n MonthSelect: ElementType\n /**\n * The day view of the date-picker.\n */\n View: ElementType\n /**\n * The day context of the date-picker.\n */\n Context: ElementType\n /**\n * The container for the content triggers.\n */\n ViewControl: ElementType\n /**\n * The trigger that moves to the previous month.\n */\n PrevTrigger: ElementType\n /**\n * The trigger that moves to the next month.\n */\n NextTrigger: ElementType\n /**\n * The trigger that moves to the next view.\n */\n ViewTrigger: ElementType\n /**\n * The range text of the date-picker.\n */\n RangeText: ElementType\n /**\n * The table of the date-picker.\n */\n Table: ElementType\n /**\n * The table head of the date-picker.\n */\n TableHead: ElementType\n /**\n * The table row of the date-picker.\n */\n TableRow: ElementType\n /**\n * The header text for the table.\n */\n TableHeader: ElementType\n /**\n * The body of the table.\n */\n TableBody: ElementType\n /**\n * The table cell of the table.\n */\n TableCell: ElementType\n /**\n * The trigger for the table cell.\n */\n TableCellTrigger: ElementType\n}\n\n/**\n * An Object containing the parts of the DatePicker component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the DatePickerParts object and\n * the entire family of components vs. only what you use.\n */\nexport const DatePickerParts: DatePickerPartsValue = {\n Root: DatePickerRoot,\n Label: DatePickerLabel,\n Control: DatePickerControl,\n Input: DatePickerInputEl,\n Trigger: DatePickerTrigger,\n ClearTrigger: DatePickerClearTrigger,\n Positioner: DatePickerPositioner,\n Content: DatePickerContent,\n YearSelect: DatePickerYearSelect,\n MonthSelect: DatePickerMonthSelect,\n View: DatePickerView,\n Context: DatePickerContext,\n ViewControl: DatePickerViewControl,\n PrevTrigger: DatePickerPrevTrigger,\n NextTrigger: DatePickerNextTrigger,\n ViewTrigger: DatePickerViewTrigger,\n RangeText: DatePickerRangeText,\n Table: DatePickerTable,\n TableHead: DatePickerTableHead,\n TableRow: DatePickerTableRow,\n TableHeader: DatePickerTableHeader,\n TableBody: DatePickerTableBody,\n TableCell: DatePickerTableCell,\n TableCellTrigger: DatePickerTableCellTrigger,\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from 'styled-system/css'\nimport { iconButton, type IconButtonVariantProps } from 'styled-system/recipes'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps extends HTMLArkProps<'button'> {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\nexport type IconButtonProps = IconButtonRawProps & IconButtonVariantProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps) {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <ark.button\n {...nativeProps}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n","'use client'\n\nimport type { DatePickerTriggerProps } from '@ark-ui/react/date-picker'\nimport { useCerberusContext } from '../../context/cerberus'\nimport { IconButton } from '../IconButton'\nimport { DatePickerParts } from './parts'\n\n/**\n * This private module contains the DatePicker trigger component.\n * @module DatePickerTrigger\n */\n\n/**\n * An abstraction of the DatePickerTrigger that toggles the calender open.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const { icons } = useCerberusContext()\n const { calendar: CalendarIcon } = icons\n\n return (\n <DatePickerParts.Trigger {...props} asChild>\n <IconButton ariaLabel=\"Open calendar\" size=\"sm\" usage=\"ghost\">\n <CalendarIcon />\n </IconButton>\n </DatePickerParts.Trigger>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,IAAAA,gBAAkD;;;ACHlD,yBAyBO;AACP,iBAAmB;AACnB,qBAA2B;AAavB;AAHG,SAAS,gBAAgB,OAA6B;AAC3D,QAAM,aAAS,2BAAW;AAC1B,SACE;AAAA,IAAC,8BAAW;AAAA,IAAX;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,OAAO,OAAO,MAAM,SAAS;AAAA;AAAA,EAC7C;AAEJ;AAMO,SAAS,kBAAkB,OAA+B;AAC/D,QAAM,aAAS,2BAAW;AAC1B,SACE;AAAA,IAAC,8BAAW;AAAA,IAAX;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,OAAO,SAAS,MAAM,SAAS;AAAA;AAAA,EAC/C;AAEJ;AAKO,SAAS,kBAAkB,OAA6B;AAC7D,QAAM,aAAS,2BAAW;AAC1B,SACE;AAAA,IAAC,8BAAW;AAAA,IAAX;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,OAAO,OAAO,MAAM,SAAS;AAAA;AAAA,EAC7C;AAEJ;AAKO,SAAS,kBAAkB,OAA+B;AAC/D,QAAM,aAAS,2BAAW;AAC1B,SACE;AAAA,IAAC,8BAAW;AAAA,IAAX;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,OAAO,SAAS,MAAM,SAAS;AAAA;AAAA,EAC/C;AAEJ;AAKO,SAAS,kBAAkB,OAA+B;AAC/D,QAAM,aAAS,2BAAW;AAC1B,SACE;AAAA,IAAC,8BAAW;AAAA,IAAX;AAAA,MACE,GAAG;AAAA,MACJ,eA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,GAAG,YAAY,IAAI;AAEzC,QAAM,gBAAY,uBAAQ,MAAM,6CAAe,IAAI,CAAC,YAAY,CAAC;AACjE,QAAM,cAAU,uBAAQ,MAAM,6CAAe,IAAI,CAAC,YAAY,CAAC;AAE/D,SACE,8CAAC,gBAAgB,SAAhB,EAAwB,cAAU,MACjC;AAAA,iDAACC,oBAAA,EAAkB;AAAA,IACnB;AAAA,MAAC,gBAAgB;AAAA,MAAhB;AAAA,QACE,GAAG;AAAA,QACJ,oBAAgB;AAAA,QAChB,cAAc;AAAA,QACd,aAAa,MAAM,eAAe;AAAA,QAClC,WAAW;AAAA,QACX,OAAO;AAAA;AAAA,IACT;AAAA,IACA;AAAA,MAAC,gBAAgB;AAAA,MAAhB;AAAA,QACE,GAAG;AAAA,QACJ,oBAAgB;AAAA,QAChB,cAAc;AAAA,QACd,wBAAoB;AAAA,QACpB,aAAa,MAAM,eAAe;AAAA,QAClC,WAAW;AAAA,QACX,OAAO;AAAA;AAAA,IACT;AAAA,KACF;AAEJ;","names":["import_react","import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_jsx_runtime","DatePickerTrigger","import_jsx_runtime","DatePickerTrigger"]}
1
+ {"version":3,"sources":["../../../../src/components/date-picker/range-input.tsx","../../../../src/components/date-picker/primitives.tsx","../../../../src/components/date-picker/parts.ts","../../../../src/context/cerberus.tsx","../../../../src/components/IconButton.tsx","../../../../src/components/date-picker/trigger.tsx"],"sourcesContent":["import { type DatePickerInputProps } from '@ark-ui/react/date-picker'\nimport { DatePickerParts } from './parts'\nimport { DatePickerTrigger } from './trigger'\n\n/**\n * This private module contains the RangePickerInput component.\n * @module RangePickerInput\n */\n\nexport type RangePickerInputProps = DatePickerInputProps\n\n/**\n * An abstraction of the DatePicker input that wraps the input and the\n * triggers to open the DatePicker and clear the value.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function RangePickerInput(props: RangePickerInputProps) {\n return (\n <DatePickerParts.Control data-range>\n <DatePickerTrigger />\n <DatePickerParts.Input\n {...props}\n data-range-input\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={0}\n />\n <DatePickerParts.Input\n {...props}\n data-range-input\n data-range-end-input\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={1}\n />\n </DatePickerParts.Control>\n )\n}\n","import {\n DatePicker,\n type DatePickerContentProps,\n type DatePickerContextProps,\n type DatePickerControlProps,\n type DatePickerInputProps,\n type DatePickerLabelProps,\n type DatePickerMonthSelectProps,\n type DatePickerNextTriggerProps,\n type DatePickerPositionerProps,\n type DatePickerPrevTriggerProps,\n type DatePickerRangeTextProps,\n type DatePickerRootProps,\n type DatePickerTableBodyProps,\n type DatePickerTableCellProps,\n type DatePickerTableCellTriggerProps,\n type DatePickerTableHeaderProps,\n type DatePickerTableHeadProps,\n type DatePickerTableProps,\n type DatePickerTableRowProps,\n type DatePickerTriggerProps,\n type DatePickerViewControlProps,\n type DatePickerViewProps,\n type DatePickerViewTriggerProps,\n type DatePickerYearSelectProps,\n} from '@ark-ui/react/date-picker'\nimport { cx } from 'styled-system/css'\nimport { datePicker } from 'styled-system/recipes'\n\n/**\n * This module contains the DatePicker primitives.\n * @module 'date-picker/primitives'\n */\n\n/**\n * The label component for the DatePicker.\n */\nexport function DatePickerLabel(props: DatePickerLabelProps) {\n const styles = datePicker()\n return (\n <DatePicker.Label\n {...props}\n className={cx(styles.label, props.className)}\n />\n )\n}\n\n/**\n * The control component for the DatePicker which wraps the input and the\n * triggers to open the DatePicker and clear the value.\n */\nexport function DatePickerControl(props: DatePickerControlProps) {\n const styles = datePicker()\n return (\n <DatePicker.Control\n {...props}\n className={cx(styles.control, props.className)}\n />\n )\n}\n\n/**\n * The input component for the DatePicker.\n */\nexport function DatePickerInputEl(props: DatePickerInputProps) {\n const styles = datePicker()\n return (\n <DatePicker.Input\n {...props}\n className={cx(styles.input, props.className)}\n />\n )\n}\n\n/**\n * The trigger component that opens the DatePicker.\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const styles = datePicker()\n return (\n <DatePicker.Trigger\n {...props}\n className={cx(styles.trigger, props.className)}\n />\n )\n}\n\n/**\n * The content component for the DatePicker.\n */\nexport function DatePickerContent(props: DatePickerContentProps) {\n const styles = datePicker()\n return (\n <DatePicker.Content\n {...props}\n className={cx(styles.content, props.className)}\n />\n )\n}\n\n/**\n * The view control component for the DatePicker which wraps the triggers to\n * switch between calendar views.\n */\nexport function DatePickerViewControl(props: DatePickerViewControlProps) {\n const styles = datePicker()\n return (\n <DatePicker.Control\n {...props}\n className={cx(styles.viewControl, props.className)}\n />\n )\n}\n\n/**\n * The range text component for the DatePicker.\n */\nexport function DatePickerRangeText(props: DatePickerRangeTextProps) {\n const styles = datePicker()\n return (\n <DatePicker.RangeText\n {...props}\n className={cx(styles.rangeText, props.className)}\n />\n )\n}\n\n/**\n * The table component for the DatePicker.\n */\nexport function DatePickerTable(props: DatePickerTableProps) {\n const styles = datePicker()\n return (\n <DatePicker.Table\n {...props}\n className={cx(styles.table, props.className)}\n />\n )\n}\n\n/**\n * The header component for the DatePicker table.\n */\nexport function DatePickerTableHeader(props: DatePickerTableHeaderProps) {\n const styles = datePicker()\n return (\n <DatePicker.TableHeader\n {...props}\n className={cx(styles.tableHeader, props.className)}\n />\n )\n}\n\n/**\n * The table cell component for the DatePicker.\n */\nexport function DatePickerTableCell(props: DatePickerTableCellProps) {\n const styles = datePicker()\n return (\n <DatePicker.TableCell\n {...props}\n className={cx(styles.tableCell, props.className)}\n />\n )\n}\n\n/**\n * The table cell trigger component for the DatePicker.\n */\nexport function DatePickerTableCellTrigger(\n props: DatePickerTableCellTriggerProps,\n) {\n const styles = datePicker()\n return (\n <DatePicker.TableCellTrigger\n {...props}\n className={cx(styles.tableCellTrigger, props.className)}\n />\n )\n}\n\n/**\n * The root component of the DatePicker. This primitive has no Cerberus styles.\n */\nexport function DatePickerRoot(props: DatePickerRootProps) {\n return <DatePicker.Root {...props} />\n}\n\n/**\n * The label component of the DatePicker. This primitive has no Cerberus styles.\n */\nexport function DatePickerClearTrigger(props: DatePickerTriggerProps) {\n return <DatePicker.ClearTrigger {...props} />\n}\n\n/**\n * The control component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerPositioner(props: DatePickerPositionerProps) {\n return <DatePicker.Positioner {...props} />\n}\n\n/**\n * The year select input component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerYearSelect(props: DatePickerYearSelectProps) {\n return <DatePicker.YearSelect {...props} />\n}\n\n/**\n * The month select input component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerMonthSelect(props: DatePickerMonthSelectProps) {\n return <DatePicker.MonthSelect {...props} />\n}\n\n/**\n * The day view component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerView(props: DatePickerViewProps) {\n return <DatePicker.View {...props} />\n}\n\n/**\n * The day context component of the DatePicker. This primitive has no\n * Cerberus styles.\n */\nexport function DatePickerContext(props: DatePickerContextProps) {\n return <DatePicker.Context {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerPrevTrigger(props: DatePickerPrevTriggerProps) {\n return <DatePicker.PrevTrigger {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerNextTrigger(props: DatePickerNextTriggerProps) {\n return <DatePicker.NextTrigger {...props} />\n}\n\n/**\n * The trigger component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerViewTrigger(props: DatePickerViewTriggerProps) {\n return <DatePicker.ViewTrigger {...props} />\n}\n\n/**\n * The table head component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableHead(props: DatePickerTableHeadProps) {\n return <DatePicker.TableHead {...props} />\n}\n/**\n * The table row component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableRow(props: DatePickerTableRowProps) {\n return <DatePicker.TableRow {...props} />\n}\n/**\n * The table body component of the DatePicker. This primitive has no Cerberus\n * styles.\n */\nexport function DatePickerTableBody(props: DatePickerTableBodyProps) {\n return <DatePicker.TableBody {...props} />\n}\n","import type { ElementType } from 'react'\nimport {\n DatePickerClearTrigger,\n DatePickerContent,\n DatePickerContext,\n DatePickerControl,\n DatePickerInputEl,\n DatePickerLabel,\n DatePickerMonthSelect,\n DatePickerNextTrigger,\n DatePickerPositioner,\n DatePickerPrevTrigger,\n DatePickerRangeText,\n DatePickerRoot,\n DatePickerTable,\n DatePickerTableBody,\n DatePickerTableCell,\n DatePickerTableCellTrigger,\n DatePickerTableHead,\n DatePickerTableHeader,\n DatePickerTableRow,\n DatePickerTrigger,\n DatePickerView,\n DatePickerViewControl,\n DatePickerViewTrigger,\n DatePickerYearSelect,\n} from './primitives'\n\n/**\n * This module contains the parts of the DatePicker component.\n * @module 'date-picker/parts'\n */\n\ninterface DatePickerPartsValue {\n /**\n * The container of the date-picker.\n */\n Root: ElementType\n /**\n * The label of the date-picker.\n */\n Label: ElementType\n /**\n * The control of the date-picker.\n */\n Control: ElementType\n /**\n * The input of the date-picker.\n */\n Input: ElementType\n /**\n * The trigger that opens the date-picker.\n */\n Trigger: ElementType\n /**\n * The trigger that clears the value of the date-picker.\n */\n ClearTrigger: ElementType\n /**\n * The positioner of the content for the date-picker.\n */\n Positioner: ElementType\n /**\n * The content of the date-picker.\n */\n Content: ElementType\n /**\n * The year select input of the date-picker.\n */\n YearSelect: ElementType\n /**\n * The month select input of the date-picker.\n */\n MonthSelect: ElementType\n /**\n * The day view of the date-picker.\n */\n View: ElementType\n /**\n * The day context of the date-picker.\n */\n Context: ElementType\n /**\n * The container for the content triggers.\n */\n ViewControl: ElementType\n /**\n * The trigger that moves to the previous month.\n */\n PrevTrigger: ElementType\n /**\n * The trigger that moves to the next month.\n */\n NextTrigger: ElementType\n /**\n * The trigger that moves to the next view.\n */\n ViewTrigger: ElementType\n /**\n * The range text of the date-picker.\n */\n RangeText: ElementType\n /**\n * The table of the date-picker.\n */\n Table: ElementType\n /**\n * The table head of the date-picker.\n */\n TableHead: ElementType\n /**\n * The table row of the date-picker.\n */\n TableRow: ElementType\n /**\n * The header text for the table.\n */\n TableHeader: ElementType\n /**\n * The body of the table.\n */\n TableBody: ElementType\n /**\n * The table cell of the table.\n */\n TableCell: ElementType\n /**\n * The trigger for the table cell.\n */\n TableCellTrigger: ElementType\n}\n\n/**\n * An Object containing the parts of the DatePicker component. For users that\n * prefer Object component syntax.\n *\n * @remarks\n *\n * When using object component syntax, you import the DatePickerParts object and\n * the entire family of components vs. only what you use.\n */\nexport const DatePickerParts: DatePickerPartsValue = {\n Root: DatePickerRoot,\n Label: DatePickerLabel,\n Control: DatePickerControl,\n Input: DatePickerInputEl,\n Trigger: DatePickerTrigger,\n ClearTrigger: DatePickerClearTrigger,\n Positioner: DatePickerPositioner,\n Content: DatePickerContent,\n YearSelect: DatePickerYearSelect,\n MonthSelect: DatePickerMonthSelect,\n View: DatePickerView,\n Context: DatePickerContext,\n ViewControl: DatePickerViewControl,\n PrevTrigger: DatePickerPrevTrigger,\n NextTrigger: DatePickerNextTrigger,\n ViewTrigger: DatePickerViewTrigger,\n RangeText: DatePickerRangeText,\n Table: DatePickerTable,\n TableHead: DatePickerTableHead,\n TableRow: DatePickerTableRow,\n TableHeader: DatePickerTableHeader,\n TableBody: DatePickerTableBody,\n TableCell: DatePickerTableCell,\n TableCellTrigger: DatePickerTableCellTrigger,\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from 'styled-system/css'\nimport { iconButton, type IconButtonVariantProps } from 'styled-system/recipes'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps extends HTMLArkProps<'button'> {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\nexport type IconButtonProps = IconButtonRawProps & IconButtonVariantProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps) {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <ark.button\n {...nativeProps}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n","'use client'\n\nimport type { DatePickerTriggerProps } from '@ark-ui/react/date-picker'\nimport { useCerberusContext } from '../../context/cerberus'\nimport { IconButton } from '../IconButton'\nimport { DatePickerParts } from './parts'\n\n/**\n * This private module contains the DatePicker trigger component.\n * @module DatePickerTrigger\n */\n\n/**\n * An abstraction of the DatePickerTrigger that toggles the calender open.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const { icons } = useCerberusContext()\n const { calendar: CalendarIcon } = icons\n\n return (\n <DatePickerParts.Trigger {...props} asChild>\n <IconButton ariaLabel=\"Open calendar\" size=\"sm\" usage=\"ghost\">\n <CalendarIcon />\n </IconButton>\n </DatePickerParts.Trigger>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;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MAAhB;AAAA,QACE,GAAG;AAAA,QACJ,oBAAgB;AAAA,QAChB,wBAAoB;AAAA,QACpB,aAAa,MAAM,eAAe;AAAA,QAClC,WAAW;AAAA,QACX,OAAO;AAAA;AAAA,IACT;AAAA,KACF;AAEJ;","names":["import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_jsx_runtime","DatePickerTrigger","import_jsx_runtime","DatePickerTrigger"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/deprecated/Label.tsx","../../../../src/components/field/primitives.tsx"],"sourcesContent":["import type { HTMLAttributes, PropsWithChildren } from 'react'\nimport { label, type LabelVariantProps } from 'styled-system/recipes'\nimport { cx } from '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","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 'styled-system/css'\nimport { field, type FieldVariantProps } from '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\n/**\n * The required indicator for the Field component.\n */\nexport function FieldRequiredIndicator() {\n return <Field.RequiredIndicator>(required)</Field.RequiredIndicator>\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;AAAA;AAAA;AAAA;AACA,IAAAA,kBAA8C;AAC9C,IAAAC,cAAmB;;;ACFnB,mBAOO;AAEP,iBAAmB;AACnB,qBAA8C;AA0B1C;AAiBG,SAAS,WAAW,OAAwB;AACjD,QAAM,EAAE,UAAU,GAAG,YAAY,IAAI;AACrC,QAAM,aAAS,sBAAM;AACrB,SACE,6CAAC,mBAAM,OAAN,EAAa,GAAG,aAAa,eAAW,eAAG,OAAO,OAAO,MAAM,SAAS,GACtE;AAAA;AAAA,IACD,4CAAC,mBAAM,mBAAN,EAAwB,wBAAU;AAAA,KACrC;AAEJ;;;AD5CI,IAAAC,sBAAA;AAHG,SAAS,MAAM,OAAsC;AAC1D,QAAM,EAAE,MAAM,GAAG,YAAY,IAAI;AACjC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,oBAAG,uBAAM,EAAE,KAAK,CAAC,GAAG,MAAM,SAAS;AAAA;AAAA,EAChD;AAEJ;","names":["import_recipes","import_css","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../../../src/components/deprecated/Label.tsx","../../../../src/components/field/primitives.tsx"],"sourcesContent":["import type { HTMLAttributes, PropsWithChildren } from 'react'\nimport { label, type LabelVariantProps } from 'styled-system/recipes'\nimport { cx } from '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","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 'styled-system/css'\nimport { field, type FieldVariantProps } from '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\n/**\n * The required indicator for the Field component.\n */\nexport function FieldRequiredIndicator() {\n return <Field.RequiredIndicator>(required)</Field.RequiredIndicator>\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 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;AAAA;AAAA;AAAA;AACA,IAAAA,kBAA8C;AAC9C,IAAAC,cAAmB;;;ACFnB,mBAOO;AAEP,iBAAmB;AACnB,qBAA8C;AA0B1C;AAiBG,SAAS,WAAW,OAAwB;AACjD,QAAM,EAAE,UAAU,GAAG,YAAY,IAAI;AACrC,QAAM,aAAS,sBAAM;AACrB,SACE,6CAAC,mBAAM,OAAN,EAAa,GAAG,aAAa,eAAW,eAAG,OAAO,OAAO,MAAM,SAAS,GACtE;AAAA;AAAA,IACD,4CAAC,mBAAM,mBAAN,EAAwB,wBAAU;AAAA,KACrC;AAEJ;;;AD5CI,IAAAC,sBAAA;AAHG,SAAS,MAAM,OAAsC;AAC1D,QAAM,EAAE,MAAM,GAAG,YAAY,IAAI;AACjC,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,oBAAG,uBAAM,EAAE,KAAK,CAAC,GAAG,MAAM,SAAS;AAAA;AAAA,EAChD;AAEJ;","names":["import_recipes","import_css","import_jsx_runtime"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/dialog/close-icon-trigger.tsx","../../../../src/context/cerberus.tsx","../../../../src/components/IconButton.tsx","../../../../src/components/dialog/primitives.tsx"],"sourcesContent":["'use client'\n\nimport { type DialogCloseTriggerProps } from '@ark-ui/react/dialog'\nimport { useCerberusContext } from '../../context/cerberus'\nimport { IconButton } from '../IconButton'\nimport { DialogCloseTrigger } from './primitives'\nimport { dialog } from 'styled-system/recipes'\nimport { cx } from 'styled-system/css'\n\n/**\n * This module contains the close trigger for the dialog.\n * @module react/dialog\n */\n\nexport function DialogCloseIconTrigger(props: DialogCloseTriggerProps) {\n const styles = dialog()\n\n const { icons } = useCerberusContext()\n const { close: CloseIcon } = icons\n\n return (\n <DialogCloseTrigger\n {...props}\n className={cx(styles.closeTrigger, props.className)}\n asChild\n >\n <IconButton\n ariaLabel=\"Close dialog\"\n palette=\"action\"\n size=\"lg\"\n usage=\"ghost\"\n >\n <CloseIcon />\n </IconButton>\n </DialogCloseTrigger>\n )\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from 'styled-system/css'\nimport { iconButton, type IconButtonVariantProps } from 'styled-system/recipes'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps extends HTMLArkProps<'button'> {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\nexport type IconButtonProps = IconButtonRawProps & IconButtonVariantProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps) {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <ark.button\n {...nativeProps}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n","import {\n Dialog,\n type DialogBackdropProps,\n type DialogContentProps,\n type DialogDescriptionProps,\n type DialogPositionerProps,\n type DialogRootProps,\n type DialogTitleProps,\n type DialogTriggerProps,\n} from '@ark-ui/react/dialog'\nimport { cx } from 'styled-system/css'\nimport { dialog, type DialogVariantProps } from 'styled-system/recipes'\n\n/**\n * This module contains the primitives of the Dialog component.\n * @module 'dialog/primitives'\n */\n\n/**\n * The provider that controls the dialog components.\n */\nexport function DialogRoot(props: DialogRootProps) {\n return <Dialog.Root {...props} />\n}\n\n/**\n * The trigger that opens the dialog.\n */\nexport function DialogTrigger(props: DialogTriggerProps) {\n const styles = dialog()\n return (\n <Dialog.Trigger\n {...props}\n className={cx(styles.trigger, props.className)}\n />\n )\n}\n\n/**\n * The overlay of the dialog.\n */\nexport function DialogBackdrop(props: DialogBackdropProps) {\n const styles = dialog()\n return (\n <Dialog.Backdrop\n {...props}\n className={cx(styles.backdrop, props.className)}\n />\n )\n}\n\n/**\n * The container that positions the dialog.\n */\nexport function DialogPositioner(props: DialogPositionerProps) {\n const styles = dialog()\n return (\n <Dialog.Positioner\n {...props}\n className={cx(styles.positioner, props.className)}\n />\n )\n}\n\n/**\n * The visible content of the dialog.\n */\nexport function DialogContent(props: DialogContentProps & DialogVariantProps) {\n const { size, ...contentProps } = props\n const styles = dialog({ size })\n return (\n <Dialog.Content\n {...contentProps}\n className={cx(styles.content, contentProps.className)}\n />\n )\n}\n\n/**\n * The heading of the dialog.\n */\nexport function DialogHeading(props: DialogTitleProps) {\n const styles = dialog()\n return (\n <Dialog.Title {...props} className={cx(styles.title, props.className)} />\n )\n}\n\n/**\n * The description of the dialog.\n */\nexport function DialogDescription(props: DialogDescriptionProps) {\n const styles = dialog()\n return (\n <Dialog.Description\n {...props}\n className={cx(styles.description, props.className)}\n />\n )\n}\n\n/**\n * The trigger that closes the dialog.\n */\nexport function DialogCloseTrigger(props: DialogTriggerProps) {\n return <Dialog.CloseTrigger {...props} />\n}\n\n/**\n * The provider that controls the dialog components. This is a named export of\n * the DialogRoot primitive.\n */\nexport const DialogProvider = DialogRoot\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,mBAAkE;AAyB9D;AAfJ,IAAM,sBAAkB,4BAA2C,IAAI;AAyBhE,SAAS,qBAAqB;AACnC,QAAM,cAAU,yBAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;AC3CA,qBAAuC;AACvC,iBAAmB;AACnB,qBAAwD;AAsBpD,IAAAA,sBAAA;AAHG,SAAS,WAAW,OAAwB;AACjD,QAAM,EAAE,WAAW,SAAS,OAAO,MAAM,GAAG,YAAY,IAAI;AAC5D,SACE;AAAA,IAAC,mBAAI;AAAA,IAAJ;AAAA,MACE,GAAG;AAAA,MACJ,cAAY,aAAa;AAAA,MACzB,eAAW;AAAA,QACT,YAAY;AAAA,YACZ,2BAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;;;ACrCA,oBASO;AACP,IAAAC,cAAmB;AACnB,IAAAC,kBAAgD;AAWvC,IAAAC,sBAAA;AAkFF,SAAS,mBAAmB,OAA2B;AAC5D,SAAO,6CAAC,qBAAO,cAAP,EAAqB,GAAG,OAAO;AACzC;;;AHpGA,IAAAC,kBAAuB;AACvB,IAAAC,cAAmB;AAyBX,IAAAC,sBAAA;AAlBD,SAAS,uBAAuB,OAAgC;AACrE,QAAM,aAAS,wBAAO;AAEtB,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,OAAO,UAAU,IAAI;AAE7B,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,gBAAG,OAAO,cAAc,MAAM,SAAS;AAAA,MAClD,SAAO;AAAA,MAEP;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,UAEN,uDAAC,aAAU;AAAA;AAAA,MACb;AAAA;AAAA,EACF;AAEJ;","names":["import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_recipes","import_css","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../../../src/components/dialog/close-icon-trigger.tsx","../../../../src/context/cerberus.tsx","../../../../src/components/IconButton.tsx","../../../../src/components/dialog/primitives.tsx"],"sourcesContent":["'use client'\n\nimport { type DialogCloseTriggerProps } from '@ark-ui/react/dialog'\nimport { useCerberusContext } from '../../context/cerberus'\nimport { IconButton } from '../IconButton'\nimport { DialogCloseTrigger } from './primitives'\nimport { dialog } from 'styled-system/recipes'\nimport { cx } from 'styled-system/css'\n\n/**\n * This module contains the close trigger for the dialog.\n * @module react/dialog\n */\n\nexport function DialogCloseIconTrigger(props: DialogCloseTriggerProps) {\n const styles = dialog()\n\n const { icons } = useCerberusContext()\n const { close: CloseIcon } = icons\n\n return (\n <DialogCloseTrigger\n {...props}\n className={cx(styles.closeTrigger, props.className)}\n asChild\n >\n <IconButton\n ariaLabel=\"Close dialog\"\n palette=\"action\"\n size=\"lg\"\n usage=\"ghost\"\n >\n <CloseIcon />\n </IconButton>\n </DialogCloseTrigger>\n )\n}\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import { ark, type HTMLArkProps } from '@ark-ui/react/factory'\nimport { cx } from 'styled-system/css'\nimport { iconButton, type IconButtonVariantProps } from 'styled-system/recipes'\n\n/**\n * This module contains the Icon Button component.\n * @module\n */\n\nexport interface IconButtonRawProps extends HTMLArkProps<'button'> {\n /**\n * The aria-label attribute for the icon button.\n */\n ariaLabel: string\n}\nexport type IconButtonProps = IconButtonRawProps & IconButtonVariantProps\n\n/**\n * A component that allows the user to perform actions using an icon\n * @see https://cerberus.digitalu.design/react/icon-button\n */\nexport function IconButton(props: IconButtonProps) {\n const { ariaLabel, palette, usage, size, ...nativeProps } = props\n return (\n <ark.button\n {...nativeProps}\n aria-label={ariaLabel ?? 'Icon Button'}\n className={cx(\n nativeProps.className,\n iconButton({\n palette,\n usage,\n size,\n }),\n )}\n />\n )\n}\n","import {\n Dialog,\n type DialogBackdropProps,\n type DialogContentProps,\n type DialogDescriptionProps,\n type DialogPositionerProps,\n type DialogRootProps,\n type DialogTitleProps,\n type DialogTriggerProps,\n} from '@ark-ui/react/dialog'\nimport { css, cx } from 'styled-system/css'\nimport { dialog, type DialogVariantProps } from 'styled-system/recipes'\nimport type { WithCss } from '../../types'\n\n/**\n * This module contains the primitives of the Dialog component.\n * @module 'dialog/primitives'\n */\n\n/**\n * The provider that controls the dialog components.\n */\nexport function DialogRoot(props: DialogRootProps) {\n return <Dialog.Root {...props} />\n}\n\n/**\n * The trigger that opens the dialog.\n */\nexport function DialogTrigger(props: DialogTriggerProps) {\n const styles = dialog()\n return (\n <Dialog.Trigger\n {...props}\n className={cx(styles.trigger, props.className)}\n />\n )\n}\n\n/**\n * The overlay of the dialog.\n */\nexport function DialogBackdrop(props: DialogBackdropProps) {\n const styles = dialog()\n return (\n <Dialog.Backdrop\n {...props}\n className={cx(styles.backdrop, props.className)}\n />\n )\n}\n\n/**\n * The container that positions the dialog.\n */\nexport function DialogPositioner(props: DialogPositionerProps) {\n const styles = dialog()\n return (\n <Dialog.Positioner\n {...props}\n className={cx(styles.positioner, props.className)}\n />\n )\n}\n\n/**\n * The visible content of the dialog.\n */\nexport function DialogContent(\n props: DialogContentProps & DialogVariantProps & WithCss,\n) {\n const { size, css: customStyles, ...contentProps } = props\n const styles = dialog({ size })\n return (\n <Dialog.Content\n {...contentProps}\n className={cx(styles.content, css(customStyles), contentProps.className)}\n />\n )\n}\n\n/**\n * The heading of the dialog.\n */\nexport function DialogHeading(props: DialogTitleProps) {\n const styles = dialog()\n return (\n <Dialog.Title {...props} className={cx(styles.title, props.className)} />\n )\n}\n\n/**\n * The description of the dialog.\n */\nexport function DialogDescription(props: DialogDescriptionProps) {\n const styles = dialog()\n return (\n <Dialog.Description\n {...props}\n className={cx(styles.description, props.className)}\n />\n )\n}\n\n/**\n * The trigger that closes the dialog.\n */\nexport function DialogCloseTrigger(props: DialogTriggerProps) {\n return <Dialog.CloseTrigger {...props} />\n}\n\n/**\n * The provider that controls the dialog components. This is a named export of\n * the DialogRoot primitive.\n */\nexport const DialogProvider = DialogRoot\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,mBAAkE;AAyB9D;AAfJ,IAAM,sBAAkB,4BAA2C,IAAI;AAyBhE,SAAS,qBAAqB;AACnC,QAAM,cAAU,yBAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;AC3CA,qBAAuC;AACvC,iBAAmB;AACnB,qBAAwD;AAsBpD,IAAAA,sBAAA;AAHG,SAAS,WAAW,OAAwB;AACjD,QAAM,EAAE,WAAW,SAAS,OAAO,MAAM,GAAG,YAAY,IAAI;AAC5D,SACE;AAAA,IAAC,mBAAI;AAAA,IAAJ;AAAA,MACE,GAAG;AAAA,MACJ,cAAY,aAAa;AAAA,MACzB,eAAW;AAAA,QACT,YAAY;AAAA,YACZ,2BAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,QACF,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;;;ACrCA,oBASO;AACP,IAAAC,cAAwB;AACxB,IAAAC,kBAAgD;AAYvC,IAAAC,sBAAA;AAoFF,SAAS,mBAAmB,OAA2B;AAC5D,SAAO,6CAAC,qBAAO,cAAP,EAAqB,GAAG,OAAO;AACzC;;;AHvGA,IAAAC,kBAAuB;AACvB,IAAAC,cAAmB;AAyBX,IAAAC,sBAAA;AAlBD,SAAS,uBAAuB,OAAgC;AACrE,QAAM,aAAS,wBAAO;AAEtB,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,OAAO,UAAU,IAAI;AAE7B,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,gBAAG,OAAO,cAAc,MAAM,SAAS;AAAA,MAClD,SAAO;AAAA,MAEP;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,UAEN,uDAAC,aAAU;AAAA;AAAA,MACb;AAAA;AAAA,EACF;AAEJ;","names":["import_jsx_runtime","import_css","import_recipes","import_jsx_runtime","import_recipes","import_css","import_jsx_runtime"]}
@@ -57,13 +57,13 @@ function DialogPositioner(props) {
57
57
  );
58
58
  }
59
59
  function DialogContent(props) {
60
- const { size, ...contentProps } = props;
60
+ const { size, css: customStyles, ...contentProps } = props;
61
61
  const styles = (0, import_recipes.dialog)({ size });
62
62
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
63
63
  import_dialog.Dialog.Content,
64
64
  {
65
65
  ...contentProps,
66
- className: (0, import_css.cx)(styles.content, contentProps.className)
66
+ className: (0, import_css.cx)(styles.content, (0, import_css.css)(customStyles), contentProps.className)
67
67
  }
68
68
  );
69
69
  }