@cerberus-design/react 0.14.2-next-3cf1eed → 0.14.2-next-0052cda

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 (188) hide show
  1. package/build/legacy/_tsup-dts-rollup.d.cts +111 -34
  2. package/build/legacy/components/Accordion.cjs +4 -187
  3. package/build/legacy/components/Accordion.cjs.map +1 -1
  4. package/build/legacy/components/Accordion.client.cjs +64 -0
  5. package/build/legacy/components/Accordion.client.cjs.map +1 -0
  6. package/build/legacy/components/AccordionItemGroup.cjs +41 -185
  7. package/build/legacy/components/AccordionItemGroup.cjs.map +1 -1
  8. package/build/legacy/components/Admonition.cjs +89 -239
  9. package/build/legacy/components/Admonition.cjs.map +1 -1
  10. package/build/legacy/components/Admonition.client.cjs +219 -0
  11. package/build/legacy/components/Admonition.client.cjs.map +1 -0
  12. package/build/legacy/components/AnimatingUploadIcon.cjs.map +1 -1
  13. package/build/legacy/components/Avatar.cjs +23 -174
  14. package/build/legacy/components/Avatar.cjs.map +1 -1
  15. package/build/legacy/components/Checkbox.cjs +22 -168
  16. package/build/legacy/components/Checkbox.cjs.map +1 -1
  17. package/build/legacy/components/DatePicker.client.cjs +119 -268
  18. package/build/legacy/components/DatePicker.client.cjs.map +1 -1
  19. package/build/legacy/components/DatePicker.server.cjs +17 -271
  20. package/build/legacy/components/DatePicker.server.cjs.map +1 -1
  21. package/build/legacy/components/FileStatus.cjs +62 -212
  22. package/build/legacy/components/FileStatus.cjs.map +1 -1
  23. package/build/legacy/components/FileUploader.cjs +29 -180
  24. package/build/legacy/components/FileUploader.cjs.map +1 -1
  25. package/build/legacy/components/Input.cjs +20 -172
  26. package/build/legacy/components/Input.cjs.map +1 -1
  27. package/build/legacy/components/Notification.cjs +25 -176
  28. package/build/legacy/components/Notification.cjs.map +1 -1
  29. package/build/legacy/components/Select.cjs +26 -178
  30. package/build/legacy/components/Select.cjs.map +1 -1
  31. package/build/legacy/components/Tag.cjs +16 -167
  32. package/build/legacy/components/Tag.cjs.map +1 -1
  33. package/build/legacy/components/Toggle.cjs +20 -172
  34. package/build/legacy/components/Toggle.cjs.map +1 -1
  35. package/build/legacy/config/defineIcons.cjs +3 -39
  36. package/build/legacy/config/defineIcons.cjs.map +1 -1
  37. package/build/legacy/config/{cerbIcons.cjs → index.cjs} +22 -29
  38. package/build/legacy/config/index.cjs.map +1 -0
  39. package/build/legacy/config/types.cjs +19 -0
  40. package/build/legacy/config/types.cjs.map +1 -0
  41. package/build/legacy/context/cerberus.cjs +46 -0
  42. package/build/legacy/context/cerberus.cjs.map +1 -0
  43. package/build/legacy/context/confirm-modal.cjs +58 -207
  44. package/build/legacy/context/confirm-modal.cjs.map +1 -1
  45. package/build/legacy/context/cta-modal.cjs +57 -209
  46. package/build/legacy/context/cta-modal.cjs.map +1 -1
  47. package/build/legacy/context/notification-center.cjs +55 -206
  48. package/build/legacy/context/notification-center.cjs.map +1 -1
  49. package/build/legacy/context/prompt-modal.cjs +83 -233
  50. package/build/legacy/context/prompt-modal.cjs.map +1 -1
  51. package/build/legacy/index.cjs +950 -930
  52. package/build/legacy/index.cjs.map +1 -1
  53. package/build/modern/_tsup-dts-rollup.d.ts +111 -34
  54. package/build/modern/{chunk-BVCXVZAF.js → chunk-25HMVHLT.js} +6 -5
  55. package/build/modern/chunk-25HMVHLT.js.map +1 -0
  56. package/build/modern/chunk-36N4527B.js +1 -0
  57. package/build/modern/chunk-5EWCH7AI.js +82 -0
  58. package/build/modern/chunk-5EWCH7AI.js.map +1 -0
  59. package/build/modern/chunk-5SNLQZYP.js +25 -0
  60. package/build/modern/chunk-5SNLQZYP.js.map +1 -0
  61. package/build/modern/{chunk-6BH5J5GF.js → chunk-CCTLGF5U.js} +18 -17
  62. package/build/modern/chunk-CCTLGF5U.js.map +1 -0
  63. package/build/modern/{chunk-HKJMLWVP.js → chunk-EDARV2EI.js} +5 -4
  64. package/build/modern/chunk-EDARV2EI.js.map +1 -0
  65. package/build/modern/{chunk-FXLLRVAM.js → chunk-EMNBMH7Z.js} +13 -11
  66. package/build/modern/chunk-EMNBMH7Z.js.map +1 -0
  67. package/build/modern/{chunk-PVIMOXSO.js → chunk-GCQMH4QA.js} +5 -4
  68. package/build/modern/chunk-GCQMH4QA.js.map +1 -0
  69. package/build/modern/chunk-GITT5645.js +20 -0
  70. package/build/modern/chunk-GITT5645.js.map +1 -0
  71. package/build/modern/{chunk-TJCFYL5W.js → chunk-IGHMP4WA.js} +1 -20
  72. package/build/modern/chunk-IGHMP4WA.js.map +1 -0
  73. package/build/modern/chunk-ISCJ542I.js +82 -0
  74. package/build/modern/chunk-ISCJ542I.js.map +1 -0
  75. package/build/modern/{chunk-HVKM54BA.js → chunk-IW3LIRDG.js} +1 -1
  76. package/build/modern/chunk-IW3LIRDG.js.map +1 -0
  77. package/build/modern/{chunk-KWJ5FKX7.js → chunk-JQCRDZNI.js} +8 -6
  78. package/build/modern/chunk-JQCRDZNI.js.map +1 -0
  79. package/build/modern/chunk-KDDPAJMR.js +9 -0
  80. package/build/modern/chunk-KDDPAJMR.js.map +1 -0
  81. package/build/modern/{chunk-JJZQGR7A.js → chunk-KF35CYT4.js} +8 -6
  82. package/build/modern/chunk-KF35CYT4.js.map +1 -0
  83. package/build/modern/{chunk-XOROL3JY.js → chunk-KKHL3ZO4.js} +5 -4
  84. package/build/modern/chunk-KKHL3ZO4.js.map +1 -0
  85. package/build/modern/{chunk-U36UZJGZ.js → chunk-MZ3UCDUL.js} +5 -4
  86. package/build/modern/chunk-MZ3UCDUL.js.map +1 -0
  87. package/build/modern/{chunk-T2JOPPGL.js → chunk-N24COMHJ.js} +11 -4
  88. package/build/modern/chunk-N24COMHJ.js.map +1 -0
  89. package/build/modern/{chunk-CVTON5DQ.js → chunk-N3L3PEMF.js} +2 -2
  90. package/build/modern/chunk-NJSETNRL.js +68 -0
  91. package/build/modern/chunk-NJSETNRL.js.map +1 -0
  92. package/build/modern/{chunk-XXWR7UGH.js → chunk-QKZZHZL4.js} +22 -21
  93. package/build/modern/chunk-QKZZHZL4.js.map +1 -0
  94. package/build/modern/{chunk-KPUYKHLW.js → chunk-UMF2TWZN.js} +59 -9
  95. package/build/modern/chunk-UMF2TWZN.js.map +1 -0
  96. package/build/modern/{chunk-QK7R2XJM.js → chunk-XQICKZH4.js} +6 -5
  97. package/build/modern/chunk-XQICKZH4.js.map +1 -0
  98. package/build/modern/chunk-XZGXRRSQ.js +31 -0
  99. package/build/modern/chunk-XZGXRRSQ.js.map +1 -0
  100. package/build/modern/{chunk-5OVH3INN.js → chunk-Z64YZ5IH.js} +18 -18
  101. package/build/modern/chunk-Z64YZ5IH.js.map +1 -0
  102. package/build/modern/components/Accordion.client.js +9 -0
  103. package/build/modern/components/Accordion.client.js.map +1 -0
  104. package/build/modern/components/Accordion.js +1 -7
  105. package/build/modern/components/AccordionItemGroup.js +4 -6
  106. package/build/modern/components/Admonition.client.js +11 -0
  107. package/build/modern/components/Admonition.client.js.map +1 -0
  108. package/build/modern/components/Admonition.js +4 -6
  109. package/build/modern/components/AnimatingUploadIcon.js +1 -1
  110. package/build/modern/components/Avatar.js +3 -5
  111. package/build/modern/components/Checkbox.js +2 -5
  112. package/build/modern/components/DatePicker.client.js +8 -7
  113. package/build/modern/components/DatePicker.server.js +3 -13
  114. package/build/modern/components/FileStatus.js +4 -7
  115. package/build/modern/components/FileUploader.js +3 -6
  116. package/build/modern/components/Input.js +2 -5
  117. package/build/modern/components/Notification.js +2 -5
  118. package/build/modern/components/Select.js +2 -5
  119. package/build/modern/components/Tag.js +3 -5
  120. package/build/modern/components/Toggle.js +2 -5
  121. package/build/modern/config/defineIcons.js +2 -5
  122. package/build/modern/config/index.js +14 -0
  123. package/build/modern/config/index.js.map +1 -0
  124. package/build/modern/config/types.js +2 -0
  125. package/build/modern/config/types.js.map +1 -0
  126. package/build/modern/context/cerberus.js +10 -0
  127. package/build/modern/context/cerberus.js.map +1 -0
  128. package/build/modern/context/confirm-modal.js +6 -9
  129. package/build/modern/context/cta-modal.js +6 -9
  130. package/build/modern/context/notification-center.js +3 -6
  131. package/build/modern/context/prompt-modal.js +8 -11
  132. package/build/modern/index.js +105 -94
  133. package/build/modern/index.js.map +1 -1
  134. package/package.json +3 -7
  135. package/src/components/Accordion.client.tsx +46 -0
  136. package/src/components/Accordion.tsx +0 -37
  137. package/src/components/AccordionItemGroup.tsx +1 -1
  138. package/src/components/Admonition.client.tsx +73 -0
  139. package/src/components/Admonition.tsx +1 -70
  140. package/src/components/AnimatingUploadIcon.tsx +3 -3
  141. package/src/components/Avatar.tsx +5 -2
  142. package/src/components/Checkbox.tsx +10 -3
  143. package/src/components/DatePicker.client.tsx +79 -7
  144. package/src/components/DatePicker.server.tsx +2 -75
  145. package/src/components/FileStatus.tsx +5 -3
  146. package/src/components/FileUploader.tsx +3 -2
  147. package/src/components/Input.tsx +4 -2
  148. package/src/components/Notification.tsx +7 -4
  149. package/src/components/Select.tsx +5 -2
  150. package/src/components/Tag.tsx +5 -2
  151. package/src/components/Toggle.tsx +4 -3
  152. package/src/config/defineIcons.ts +28 -16
  153. package/src/config/index.ts +28 -0
  154. package/src/config/types.ts +42 -0
  155. package/src/context/cerberus.tsx +44 -0
  156. package/src/context/confirm-modal.tsx +4 -2
  157. package/src/context/cta-modal.tsx +5 -4
  158. package/src/context/prompt-modal.tsx +4 -2
  159. package/src/index.ts +3 -1
  160. package/build/legacy/config/cerbIcons.cjs.map +0 -1
  161. package/build/modern/chunk-5OVH3INN.js.map +0 -1
  162. package/build/modern/chunk-6BH5J5GF.js.map +0 -1
  163. package/build/modern/chunk-BC5SZDYY.js +0 -132
  164. package/build/modern/chunk-BC5SZDYY.js.map +0 -1
  165. package/build/modern/chunk-BVCXVZAF.js.map +0 -1
  166. package/build/modern/chunk-CRII2HNX.js +0 -55
  167. package/build/modern/chunk-CRII2HNX.js.map +0 -1
  168. package/build/modern/chunk-FXLLRVAM.js.map +0 -1
  169. package/build/modern/chunk-HKJMLWVP.js.map +0 -1
  170. package/build/modern/chunk-HVKM54BA.js.map +0 -1
  171. package/build/modern/chunk-JJZQGR7A.js.map +0 -1
  172. package/build/modern/chunk-KPUYKHLW.js.map +0 -1
  173. package/build/modern/chunk-KWJ5FKX7.js.map +0 -1
  174. package/build/modern/chunk-PVIMOXSO.js.map +0 -1
  175. package/build/modern/chunk-QK7R2XJM.js.map +0 -1
  176. package/build/modern/chunk-QMF5ZNDG.js +0 -27
  177. package/build/modern/chunk-QMF5ZNDG.js.map +0 -1
  178. package/build/modern/chunk-QQOWWMZ3.js +0 -138
  179. package/build/modern/chunk-QQOWWMZ3.js.map +0 -1
  180. package/build/modern/chunk-T2JOPPGL.js.map +0 -1
  181. package/build/modern/chunk-TJCFYL5W.js.map +0 -1
  182. package/build/modern/chunk-U36UZJGZ.js.map +0 -1
  183. package/build/modern/chunk-XOROL3JY.js.map +0 -1
  184. package/build/modern/chunk-XXWR7UGH.js.map +0 -1
  185. package/build/modern/config/cerbIcons.js +0 -9
  186. package/src/config/cerbIcons.ts +0 -73
  187. /package/build/modern/{config/cerbIcons.js.map → chunk-36N4527B.js.map} +0 -0
  188. /package/build/modern/{chunk-CVTON5DQ.js.map → chunk-N3L3PEMF.js.map} +0 -0
@@ -27,11 +27,13 @@ __export(DatePicker_client_exports, {
27
27
  DatePickerDayView: () => DatePickerDayView,
28
28
  DatePickerInput: () => DatePickerInput,
29
29
  DatePickerMonthView: () => DatePickerMonthView,
30
+ DatePickerTrigger: () => DatePickerTrigger,
31
+ DatePickerViewControlGroup: () => DatePickerViewControlGroup,
30
32
  DatePickerYearView: () => DatePickerYearView,
31
33
  RangePickerInput: () => RangePickerInput
32
34
  });
33
35
  module.exports = __toCommonJS(DatePicker_client_exports);
34
- var import_react4 = require("@ark-ui/react");
36
+ var import_react5 = require("@ark-ui/react");
35
37
 
36
38
  // src/components/Portal.tsx
37
39
  var import_react = require("@ark-ui/react");
@@ -55,188 +57,72 @@ function useFieldContext() {
55
57
 
56
58
  // src/components/DatePicker.server.tsx
57
59
  var import_react3 = require("@ark-ui/react");
58
- var import_css3 = require("@cerberus/styled-system/css");
59
- var import_recipes3 = require("@cerberus/styled-system/recipes");
60
-
61
- // src/config/cerbIcons.ts
62
- var import_icons = require("@cerberus/icons");
63
-
64
- // src/config/icons/checkbox.icons.tsx
60
+ var import_css = require("@cerberus/styled-system/css");
61
+ var import_recipes = require("@cerberus/styled-system/recipes");
65
62
  var import_jsx_runtime2 = require("react/jsx-runtime");
66
- function CheckmarkIcon(props) {
63
+ var datePickerStyles = (0, import_recipes.datePicker)();
64
+ function DatePickerViewControl(props) {
67
65
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
68
- "svg",
66
+ import_react3.DatePicker.Control,
69
67
  {
70
- "aria-hidden": "true",
71
- xmlns: "http://www.w3.org/2000/svg",
72
- fill: "none",
73
- role: "img",
74
- viewBox: "0 0 24 24",
75
68
  ...props,
76
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
77
- "path",
78
- {
79
- fill: "currentColor",
80
- d: "M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z"
81
- }
82
- )
69
+ className: (0, import_css.cx)(props.className, datePickerStyles.viewControl)
83
70
  }
84
71
  );
85
72
  }
86
- function IndeterminateIcon(props) {
73
+ function DatePickerTable(props) {
87
74
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
88
- "svg",
75
+ import_react3.DatePicker.Table,
89
76
  {
90
- "aria-hidden": "true",
91
- xmlns: "http://www.w3.org/2000/svg",
92
- role: "img",
93
- fill: "none",
94
- viewBox: "0 0 24 24",
95
77
  ...props,
96
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
78
+ className: (0, import_css.cx)(props.className, datePickerStyles.table)
97
79
  }
98
80
  );
99
81
  }
100
-
101
- // src/components/AnimatingUploadIcon.tsx
102
- var import_jsx_runtime3 = require("react/jsx-runtime");
103
- function AnimatingUploadIcon(props) {
104
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
105
- "svg",
82
+ function DatePickerTableHeader(props) {
83
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
84
+ import_react3.DatePicker.TableHeader,
106
85
  {
107
- "aria-hidden": "true",
108
- xmlns: "http://www.w3.org/2000/svg",
109
- width: props.size ?? "1em",
110
- height: props.size ?? "1em",
111
- viewBox: "0 0 24 24",
112
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
113
- "g",
114
- {
115
- fill: "none",
116
- stroke: "currentColor",
117
- strokeLinecap: "square",
118
- strokeLinejoin: "round",
119
- strokeWidth: 1.5,
120
- children: [
121
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
122
- "path",
123
- {
124
- "data-name": "animating-trail",
125
- strokeDasharray: "2 4",
126
- strokeDashoffset: 6,
127
- d: "M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9",
128
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
129
- "animate",
130
- {
131
- attributeName: "stroke-dashoffset",
132
- dur: "0.45s",
133
- repeatCount: "indefinite",
134
- values: "6;0"
135
- }
136
- )
137
- }
138
- ),
139
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
140
- "path",
141
- {
142
- "data-name": "half-circle",
143
- strokeDasharray: 32,
144
- strokeDashoffset: 32,
145
- d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9",
146
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
147
- "animate",
148
- {
149
- fill: "freeze",
150
- attributeName: "stroke-dashoffset",
151
- begin: "0.075s",
152
- dur: "0.3s",
153
- values: "32;0"
154
- }
155
- )
156
- }
157
- ),
158
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
159
- "svg",
160
- {
161
- "aria-hidden": "true",
162
- xmlns: "http://www.w3.org/2000/svg",
163
- width: "0.8em",
164
- height: "0.8em",
165
- x: "27%",
166
- y: "27%",
167
- viewBox: "0 0 24 24",
168
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
169
- "polygon",
170
- {
171
- fill: "currentColor",
172
- stroke: "currentColor",
173
- strokeWidth: 0.8,
174
- opacity: "1",
175
- points: "3.7,6.7 7.5,2.9 7.5,15 8.5,15 8.5,2.9 12.3,6.7 13,6 8,1 3,6 ",
176
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
177
- "animate",
178
- {
179
- fill: "freeze",
180
- attributeName: "opacity",
181
- values: "1;0;1",
182
- dur: "2s",
183
- repeatCount: "indefinite"
184
- }
185
- )
186
- }
187
- )
188
- }
189
- )
190
- ]
191
- }
192
- )
86
+ ...props,
87
+ className: (0, import_css.cx)(props.className, datePickerStyles.tableHeader)
193
88
  }
194
89
  );
195
90
  }
196
-
197
- // src/config/cerbIcons.ts
198
- var defaultIcons = {
199
- accordionIndicator: import_icons.ChevronDown,
200
- avatar: import_icons.UserFilled,
201
- calendar: import_icons.Calendar,
202
- calendarPrev: import_icons.ChevronLeft,
203
- calendarNext: import_icons.ChevronRight,
204
- checkbox: CheckmarkIcon,
205
- close: import_icons.Close,
206
- confirmModal: import_icons.Information,
207
- delete: import_icons.TrashCan,
208
- promptModal: import_icons.Information,
209
- waitingFileUploader: import_icons.CloudUpload,
210
- fileUploader: AnimatingUploadIcon,
211
- indeterminate: IndeterminateIcon,
212
- infoNotification: import_icons.Information,
213
- successNotification: import_icons.CheckmarkOutline,
214
- warningNotification: import_icons.WarningAlt,
215
- dangerNotification: import_icons.WarningFilled,
216
- invalid: import_icons.WarningFilled,
217
- invalidAlt: import_icons.Warning,
218
- redo: import_icons.Restart,
219
- selectArrow: import_icons.ChevronDown,
220
- toggleChecked: import_icons.Checkmark
221
- };
222
-
223
- // src/config/defineIcons.ts
224
- var $cerberusIcons = defaultIcons;
91
+ function DatePickerTableCell(props) {
92
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
93
+ import_react3.DatePicker.TableCell,
94
+ {
95
+ ...props,
96
+ className: (0, import_css.cx)(props.className, datePickerStyles.tableCell)
97
+ }
98
+ );
99
+ }
100
+ function DatePickerTableCellTrigger(props) {
101
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
102
+ import_react3.DatePicker.TableCellTrigger,
103
+ {
104
+ ...props,
105
+ className: (0, import_css.cx)(props.className, datePickerStyles.tableCellTrigger)
106
+ }
107
+ );
108
+ }
109
+ var DatePickerView = import_react3.DatePicker.View;
110
+ var DatePickerContext = import_react3.DatePicker.Context;
225
111
 
226
112
  // src/components/IconButton.tsx
227
- var import_css = require("@cerberus/styled-system/css");
228
- var import_recipes = require("@cerberus/styled-system/recipes");
229
- var import_jsx_runtime4 = require("react/jsx-runtime");
113
+ var import_css2 = require("@cerberus/styled-system/css");
114
+ var import_recipes2 = require("@cerberus/styled-system/recipes");
115
+ var import_jsx_runtime3 = require("react/jsx-runtime");
230
116
  function IconButton(props) {
231
117
  const { ariaLabel, palette, usage, size, ...nativeProps } = props;
232
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
118
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
233
119
  "button",
234
120
  {
235
121
  ...nativeProps,
236
122
  "aria-label": ariaLabel ?? "Icon Button",
237
- className: (0, import_css.cx)(
123
+ className: (0, import_css2.cx)(
238
124
  nativeProps.className,
239
- (0, import_recipes.iconButton)({
125
+ (0, import_recipes2.iconButton)({
240
126
  palette,
241
127
  usage,
242
128
  size
@@ -247,18 +133,18 @@ function IconButton(props) {
247
133
  }
248
134
 
249
135
  // src/components/Button.tsx
250
- var import_css2 = require("@cerberus/styled-system/css");
251
- var import_recipes2 = require("@cerberus/styled-system/recipes");
252
- var import_jsx_runtime5 = require("react/jsx-runtime");
136
+ var import_css3 = require("@cerberus/styled-system/css");
137
+ var import_recipes3 = require("@cerberus/styled-system/recipes");
138
+ var import_jsx_runtime4 = require("react/jsx-runtime");
253
139
  function Button(props) {
254
140
  const { palette, usage, shape, ...nativeProps } = props;
255
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
141
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
256
142
  "button",
257
143
  {
258
144
  ...nativeProps,
259
- className: (0, import_css2.cx)(
145
+ className: (0, import_css3.cx)(
260
146
  nativeProps.className,
261
- (0, import_recipes2.button)({
147
+ (0, import_recipes3.button)({
262
148
  palette,
263
149
  usage,
264
150
  shape
@@ -268,117 +154,80 @@ function Button(props) {
268
154
  );
269
155
  }
270
156
 
271
- // src/components/DatePicker.server.tsx
272
- var import_jsx_runtime6 = require("react/jsx-runtime");
273
- var datePickerStyles = (0, import_recipes3.datePicker)();
274
- function DatePickerTrigger(props) {
275
- const { calendar: CalendarIcon } = $cerberusIcons;
276
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
277
- import_react3.DatePicker.Trigger,
278
- {
279
- ...props,
280
- className: (0, import_css3.cx)(
281
- props.className,
282
- (0, import_recipes3.iconButton)({
283
- size: "sm",
284
- usage: "ghost"
285
- }),
286
- datePickerStyles.trigger
287
- ),
288
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CalendarIcon, {})
289
- }
290
- );
157
+ // src/context/cerberus.tsx
158
+ var import_react4 = require("react");
159
+ var import_jsx_runtime5 = require("react/jsx-runtime");
160
+ var CerberusContext = (0, import_react4.createContext)(null);
161
+ function useCerberusContext() {
162
+ const context = (0, import_react4.useContext)(CerberusContext);
163
+ if (!context) {
164
+ throw new Error("useCerberus must be used within a CerberusProvider");
165
+ }
166
+ return context;
291
167
  }
292
- function DatePickerViewControl(props) {
168
+
169
+ // src/components/DatePicker.client.tsx
170
+ var import_jsx_runtime6 = require("react/jsx-runtime");
171
+ var datePickerStyles2 = (0, import_recipes4.datePicker)();
172
+ function DatePicker(props) {
173
+ const states = useFieldContext();
293
174
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
294
- import_react3.DatePicker.Control,
175
+ import_react5.DatePicker.Root,
295
176
  {
296
177
  ...props,
297
- className: (0, import_css3.cx)(props.className, datePickerStyles.viewControl)
178
+ ...states,
179
+ positioning: {
180
+ placement: "bottom-start"
181
+ }
298
182
  }
299
183
  );
300
184
  }
301
185
  function DatePickerViewControlGroup(props) {
302
- const { calendarPrev: PrevIcon, calendarNext: NextIcon } = $cerberusIcons;
186
+ const { icons } = useCerberusContext();
187
+ const { calendarPrev: PrevIcon, calendarNext: NextIcon } = icons;
303
188
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(DatePickerViewControl, { ...props, children: [
304
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react3.DatePicker.PrevTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconButton, { ariaLabel: "Previous", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PrevIcon, {}) }) }),
305
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react3.DatePicker.ViewTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
189
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.PrevTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconButton, { ariaLabel: "Previous", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PrevIcon, {}) }) }),
190
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.ViewTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
306
191
  Button,
307
192
  {
308
- className: (0, import_css3.css)({
193
+ className: (0, import_css4.css)({
309
194
  h: "2rem",
310
195
  paddingInline: "md"
311
196
  }),
312
197
  shape: "rounded",
313
198
  size: "sm",
314
199
  usage: "ghost",
315
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react3.DatePicker.RangeText, {})
200
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.RangeText, {})
316
201
  }
317
202
  ) }),
318
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react3.DatePicker.NextTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconButton, { ariaLabel: "Next", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(NextIcon, {}) }) })
203
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.NextTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconButton, { ariaLabel: "Next", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(NextIcon, {}) }) })
319
204
  ] });
320
205
  }
321
- function DatePickerTable(props) {
322
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
323
- import_react3.DatePicker.Table,
324
- {
325
- ...props,
326
- className: (0, import_css3.cx)(props.className, datePickerStyles.table)
327
- }
328
- );
329
- }
330
- function DatePickerTableHeader(props) {
331
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
332
- import_react3.DatePicker.TableHeader,
333
- {
334
- ...props,
335
- className: (0, import_css3.cx)(props.className, datePickerStyles.tableHeader)
336
- }
337
- );
338
- }
339
- function DatePickerTableCell(props) {
340
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
341
- import_react3.DatePicker.TableCell,
342
- {
343
- ...props,
344
- className: (0, import_css3.cx)(props.className, datePickerStyles.tableCell)
345
- }
346
- );
347
- }
348
- function DatePickerTableCellTrigger(props) {
206
+ function DatePickerTrigger(props) {
207
+ const { icons } = useCerberusContext();
208
+ const { calendar: CalendarIcon } = icons;
349
209
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
350
- import_react3.DatePicker.TableCellTrigger,
210
+ import_react5.DatePicker.Trigger,
351
211
  {
352
212
  ...props,
353
- className: (0, import_css3.cx)(props.className, datePickerStyles.tableCellTrigger)
354
- }
355
- );
356
- }
357
- var DatePickerView = import_react3.DatePicker.View;
358
- var DatePickerContext = import_react3.DatePicker.Context;
359
-
360
- // src/components/DatePicker.client.tsx
361
- var import_jsx_runtime7 = require("react/jsx-runtime");
362
- var datePickerStyles2 = (0, import_recipes4.datePicker)();
363
- function DatePicker(props) {
364
- const states = useFieldContext();
365
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
366
- import_react4.DatePicker.Root,
367
- {
368
- ...props,
369
- ...states,
370
- positioning: {
371
- placement: "bottom-start"
372
- }
213
+ className: (0, import_css4.cx)(
214
+ props.className,
215
+ (0, import_recipes4.iconButton)({
216
+ size: "sm",
217
+ usage: "ghost"
218
+ }),
219
+ datePickerStyles2.trigger
220
+ ),
221
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CalendarIcon, {})
373
222
  }
374
223
  );
375
224
  }
376
225
  function DatePickerInput(props) {
377
226
  const { invalid, ...fieldStates } = useFieldContext();
378
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react4.DatePicker.Control, { className: datePickerStyles2.control, children: [
379
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerTrigger, {}),
380
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
381
- import_react4.DatePicker.Input,
227
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react5.DatePicker.Control, { className: datePickerStyles2.control, children: [
228
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerTrigger, {}),
229
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
230
+ import_react5.DatePicker.Input,
382
231
  {
383
232
  ...props,
384
233
  ...fieldStates,
@@ -392,10 +241,10 @@ function DatePickerInput(props) {
392
241
  }
393
242
  function RangePickerInput(props) {
394
243
  const { invalid, ...fieldStates } = useFieldContext();
395
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react4.DatePicker.Control, { "data-range": true, className: datePickerStyles2.control, children: [
396
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerTrigger, {}),
397
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
398
- import_react4.DatePicker.Input,
244
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react5.DatePicker.Control, { "data-range": true, className: datePickerStyles2.control, children: [
245
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerTrigger, {}),
246
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
247
+ import_react5.DatePicker.Input,
399
248
  {
400
249
  ...props,
401
250
  ...fieldStates,
@@ -407,8 +256,8 @@ function RangePickerInput(props) {
407
256
  index: 0
408
257
  }
409
258
  ),
410
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
411
- import_react4.DatePicker.Input,
259
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
260
+ import_react5.DatePicker.Input,
412
261
  {
413
262
  ...props,
414
263
  ...fieldStates,
@@ -425,8 +274,8 @@ function RangePickerInput(props) {
425
274
  }
426
275
  function DatePickerContent(props) {
427
276
  const { children, ...contentProps } = props;
428
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.DatePicker.Positioner, { className: datePickerStyles2.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
429
- import_react4.DatePicker.Content,
277
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.Positioner, { className: datePickerStyles2.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
278
+ import_react5.DatePicker.Content,
430
279
  {
431
280
  ...contentProps,
432
281
  className: (0, import_css4.cx)(contentProps.className, datePickerStyles2.content),
@@ -451,11 +300,11 @@ function DatePickerDayView(props) {
451
300
  if (isPastDay(date)) return "past";
452
301
  return "future";
453
302
  }
454
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerView, { ...props, view: "day", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerContext, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
455
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerViewControlGroup, {}),
456
- /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(DatePickerTable, { children: [
457
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.DatePicker.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.DatePicker.TableRow, { children: datePicker3.weekDays.map((weekDay, id) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerTableHeader, { children: weekDay.narrow }, id)) }) }),
458
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.DatePicker.TableBody, { children: datePicker3.weeks.map((week, id) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.DatePicker.TableRow, { children: week.map((day, id2) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerTableCell, { value: day, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
303
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerView, { ...props, view: "day", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerContext, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
304
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerViewControlGroup, {}),
305
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(DatePickerTable, { children: [
306
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.TableRow, { children: datePicker3.weekDays.map((weekDay, id) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerTableHeader, { children: weekDay.narrow }, id)) }) }),
307
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.TableBody, { children: datePicker3.weeks.map((week, id) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.TableRow, { children: week.map((day, id2) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerTableCell, { value: day, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
459
308
  DatePickerTableCellTrigger,
460
309
  {
461
310
  "data-date": getDayValue(day),
@@ -466,22 +315,22 @@ function DatePickerDayView(props) {
466
315
  ] }) }) });
467
316
  }
468
317
  function DatePickerMonthView(props) {
469
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.DatePicker.View, { ...props, view: "month", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
470
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerViewControlGroup, {}),
471
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.DatePicker.TableBody, { children: datePicker3.getMonthsGrid({ columns: 4, format: "short" }).map((months, id) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.DatePicker.TableRow, { children: months.map((month, id2) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerTableCell, { value: month.value, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerTableCellTrigger, { children: month.label }) }, id2)) }, id)) }) })
318
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.View, { ...props, view: "month", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
319
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerViewControlGroup, {}),
320
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.TableBody, { children: datePicker3.getMonthsGrid({ columns: 4, format: "short" }).map((months, id) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.TableRow, { children: months.map((month, id2) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerTableCell, { value: month.value, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerTableCellTrigger, { children: month.label }) }, id2)) }, id)) }) })
472
321
  ] }) }) });
473
322
  }
474
323
  function DatePickerYearView(props) {
475
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.DatePicker.View, { ...props, view: "year", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
476
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerViewControlGroup, {}),
477
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.DatePicker.TableBody, { children: datePicker3.getYearsGrid({ columns: 4 }).map((years, id) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react4.DatePicker.TableRow, { children: years.map((year, id2) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerTableCell, { value: year.value, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerTableCellTrigger, { children: year.label }) }, id2)) }, id)) }) })
324
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.View, { ...props, view: "year", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.Context, { children: (datePicker3) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
325
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerViewControlGroup, {}),
326
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerTable, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.TableBody, { children: datePicker3.getYearsGrid({ columns: 4 }).map((years, id) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react5.DatePicker.TableRow, { children: years.map((year, id2) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerTableCell, { value: year.value, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerTableCellTrigger, { children: year.label }) }, id2)) }, id)) }) })
478
327
  ] }) }) });
479
328
  }
480
329
  function DatePickerCalendar() {
481
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(DatePickerContent, { children: [
482
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerDayView, {}),
483
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerMonthView, {}),
484
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DatePickerYearView, {})
330
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(DatePickerContent, { children: [
331
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerDayView, {}),
332
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerMonthView, {}),
333
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DatePickerYearView, {})
485
334
  ] });
486
335
  }
487
336
  // Annotate the CommonJS export names for ESM import in node:
@@ -492,6 +341,8 @@ function DatePickerCalendar() {
492
341
  DatePickerDayView,
493
342
  DatePickerInput,
494
343
  DatePickerMonthView,
344
+ DatePickerTrigger,
345
+ DatePickerViewControlGroup,
495
346
  DatePickerYearView,
496
347
  RangePickerInput
497
348
  });