@cerberus-design/react 0.13.2-next-46f23d2 → 0.13.2-next-9b3d27e
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.
- package/build/legacy/_tsup-dts-rollup.d.cts +297 -1
- package/build/legacy/components/Accordion.cjs.map +1 -1
- package/build/legacy/components/AccordionItemGroup.cjs.map +1 -1
- package/build/legacy/components/Admonition.cjs +3 -0
- package/build/legacy/components/Admonition.cjs.map +1 -1
- package/build/legacy/components/Avatar.cjs +3 -0
- package/build/legacy/components/Avatar.cjs.map +1 -1
- package/build/legacy/components/Checkbox.cjs +3 -0
- package/build/legacy/components/Checkbox.cjs.map +1 -1
- package/build/legacy/components/DatePicker.client.cjs +525 -0
- package/build/legacy/components/DatePicker.client.cjs.map +1 -0
- package/build/legacy/components/DatePicker.server.cjs +364 -0
- package/build/legacy/components/DatePicker.server.cjs.map +1 -0
- package/build/legacy/components/FileStatus.cjs +3 -0
- package/build/legacy/components/FileStatus.cjs.map +1 -1
- package/build/legacy/components/FileUploader.cjs +3 -0
- package/build/legacy/components/FileUploader.cjs.map +1 -1
- package/build/legacy/components/Input.cjs +3 -0
- package/build/legacy/components/Input.cjs.map +1 -1
- package/build/legacy/components/Notification.cjs +3 -0
- package/build/legacy/components/Notification.cjs.map +1 -1
- package/build/legacy/components/Select.cjs +3 -0
- package/build/legacy/components/Select.cjs.map +1 -1
- package/build/legacy/components/Tag.cjs +3 -0
- package/build/legacy/components/Tag.cjs.map +1 -1
- package/build/legacy/components/Toggle.cjs +3 -0
- package/build/legacy/components/Toggle.cjs.map +1 -1
- package/build/legacy/config/cerbIcons.cjs +3 -0
- package/build/legacy/config/cerbIcons.cjs.map +1 -1
- package/build/legacy/config/defineIcons.cjs +3 -0
- package/build/legacy/config/defineIcons.cjs.map +1 -1
- package/build/legacy/context/confirm-modal.cjs +3 -0
- package/build/legacy/context/confirm-modal.cjs.map +1 -1
- package/build/legacy/context/cta-modal.cjs +3 -0
- package/build/legacy/context/cta-modal.cjs.map +1 -1
- package/build/legacy/context/notification-center.cjs +3 -0
- package/build/legacy/context/notification-center.cjs.map +1 -1
- package/build/legacy/context/prompt-modal.cjs +3 -0
- package/build/legacy/context/prompt-modal.cjs.map +1 -1
- package/build/legacy/hooks/useDate.cjs +8 -0
- package/build/legacy/hooks/useDate.cjs.map +1 -1
- package/build/legacy/index.cjs +909 -613
- package/build/legacy/index.cjs.map +1 -1
- package/build/modern/_tsup-dts-rollup.d.ts +297 -1
- package/build/modern/{chunk-ZTYKIWYQ.js → chunk-34E3UFFB.js} +1 -1
- package/build/modern/chunk-34E3UFFB.js.map +1 -0
- package/build/modern/{chunk-CZND26FC.js → chunk-3BM6MZ4A.js} +8 -1
- package/build/modern/{chunk-CZND26FC.js.map → chunk-3BM6MZ4A.js.map} +1 -1
- package/build/modern/{chunk-67KLFLNR.js → chunk-4IMOKN2D.js} +3 -3
- package/build/modern/{chunk-XNX3OTJK.js → chunk-5KHU6MM5.js} +7 -1
- package/build/modern/chunk-5KHU6MM5.js.map +1 -0
- package/build/modern/{chunk-C3HYHH3H.js → chunk-BU5JK37R.js} +2 -2
- package/build/modern/{chunk-UBN2CZLV.js → chunk-DDOTCGGA.js} +2 -2
- package/build/modern/{chunk-CMDPTXHB.js → chunk-ECKJGCNH.js} +6 -6
- package/build/modern/{chunk-W3YI64C5.js → chunk-F4LTOZAN.js} +2 -2
- package/build/modern/{chunk-SVFZJYLV.js → chunk-F7EWTOML.js} +2 -2
- package/build/modern/{chunk-CSMPRYNC.js → chunk-F7XWOSN3.js} +2 -2
- package/build/modern/{chunk-NF5WV3OW.js → chunk-FRWNAVDM.js} +6 -6
- package/build/modern/{chunk-42RVVWGM.js → chunk-G7AGKII3.js} +11 -11
- package/build/modern/{chunk-RET4YOBV.js → chunk-GI6CSUU4.js} +6 -6
- package/build/modern/{chunk-35L6DOHE.js → chunk-HP4ZN473.js} +2 -2
- package/build/modern/chunk-IP5VFOPZ.js +132 -0
- package/build/modern/chunk-IP5VFOPZ.js.map +1 -0
- package/build/modern/{chunk-RHHFH6JJ.js → chunk-M73ECA25.js} +2 -2
- package/build/modern/{chunk-OFAATLPF.js → chunk-O7QVCF3H.js} +3 -3
- package/build/modern/chunk-QX4V5V74.js +169 -0
- package/build/modern/chunk-QX4V5V74.js.map +1 -0
- package/build/modern/{chunk-3DGV4ESI.js → chunk-S25RHYZV.js} +2 -2
- package/build/modern/{chunk-PGXJJDPH.js → chunk-W2LSPRQ3.js} +2 -2
- package/build/modern/{chunk-MRH2EO3L.js → chunk-XVU2NQCW.js} +2 -2
- package/build/modern/components/Accordion.js +1 -1
- package/build/modern/components/AccordionItemGroup.js +2 -2
- package/build/modern/components/Admonition.js +4 -4
- package/build/modern/components/Avatar.js +3 -3
- package/build/modern/components/Checkbox.js +3 -3
- package/build/modern/components/DatePicker.client.js +32 -0
- package/build/modern/components/DatePicker.client.js.map +1 -0
- package/build/modern/components/DatePicker.server.js +31 -0
- package/build/modern/components/DatePicker.server.js.map +1 -0
- package/build/modern/components/FileStatus.js +5 -5
- package/build/modern/components/FileUploader.js +4 -4
- package/build/modern/components/Input.js +3 -3
- package/build/modern/components/Notification.js +3 -3
- package/build/modern/components/Select.js +3 -3
- package/build/modern/components/Tag.js +3 -3
- package/build/modern/components/Toggle.js +3 -3
- package/build/modern/config/cerbIcons.js +1 -1
- package/build/modern/config/defineIcons.js +2 -2
- package/build/modern/context/confirm-modal.js +5 -5
- package/build/modern/context/cta-modal.js +5 -5
- package/build/modern/context/notification-center.js +4 -4
- package/build/modern/context/prompt-modal.js +8 -8
- package/build/modern/hooks/useDate.js +3 -1
- package/build/modern/index.js +110 -68
- package/build/modern/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Accordion.tsx +0 -1
- package/src/components/DatePicker.client.tsx +364 -0
- package/src/components/DatePicker.server.tsx +229 -0
- package/src/config/cerbIcons.ts +9 -0
- package/src/hooks/useDate.ts +12 -0
- package/src/index.ts +2 -0
- package/build/modern/chunk-XNX3OTJK.js.map +0 -1
- package/build/modern/chunk-ZTYKIWYQ.js.map +0 -1
- /package/build/modern/{chunk-67KLFLNR.js.map → chunk-4IMOKN2D.js.map} +0 -0
- /package/build/modern/{chunk-C3HYHH3H.js.map → chunk-BU5JK37R.js.map} +0 -0
- /package/build/modern/{chunk-UBN2CZLV.js.map → chunk-DDOTCGGA.js.map} +0 -0
- /package/build/modern/{chunk-CMDPTXHB.js.map → chunk-ECKJGCNH.js.map} +0 -0
- /package/build/modern/{chunk-W3YI64C5.js.map → chunk-F4LTOZAN.js.map} +0 -0
- /package/build/modern/{chunk-SVFZJYLV.js.map → chunk-F7EWTOML.js.map} +0 -0
- /package/build/modern/{chunk-CSMPRYNC.js.map → chunk-F7XWOSN3.js.map} +0 -0
- /package/build/modern/{chunk-NF5WV3OW.js.map → chunk-FRWNAVDM.js.map} +0 -0
- /package/build/modern/{chunk-42RVVWGM.js.map → chunk-G7AGKII3.js.map} +0 -0
- /package/build/modern/{chunk-RET4YOBV.js.map → chunk-GI6CSUU4.js.map} +0 -0
- /package/build/modern/{chunk-35L6DOHE.js.map → chunk-HP4ZN473.js.map} +0 -0
- /package/build/modern/{chunk-RHHFH6JJ.js.map → chunk-M73ECA25.js.map} +0 -0
- /package/build/modern/{chunk-OFAATLPF.js.map → chunk-O7QVCF3H.js.map} +0 -0
- /package/build/modern/{chunk-3DGV4ESI.js.map → chunk-S25RHYZV.js.map} +0 -0
- /package/build/modern/{chunk-PGXJJDPH.js.map → chunk-W2LSPRQ3.js.map} +0 -0
- /package/build/modern/{chunk-MRH2EO3L.js.map → chunk-XVU2NQCW.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
Label
|
|
3
|
+
} from "./chunk-NMF2HYWO.js";
|
|
4
4
|
import {
|
|
5
5
|
Modal
|
|
6
6
|
} from "./chunk-BE4EOU2P.js";
|
|
@@ -15,22 +15,22 @@ import {
|
|
|
15
15
|
} from "./chunk-2UXE5PDG.js";
|
|
16
16
|
import {
|
|
17
17
|
Input
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import {
|
|
20
|
-
Label
|
|
21
|
-
} from "./chunk-NMF2HYWO.js";
|
|
18
|
+
} from "./chunk-F7EWTOML.js";
|
|
22
19
|
import {
|
|
23
|
-
|
|
24
|
-
} from "./chunk-
|
|
20
|
+
Portal
|
|
21
|
+
} from "./chunk-IQJDVFPP.js";
|
|
25
22
|
import {
|
|
26
23
|
Field
|
|
27
24
|
} from "./chunk-UZDVOIW5.js";
|
|
25
|
+
import {
|
|
26
|
+
Button
|
|
27
|
+
} from "./chunk-EXGKZGML.js";
|
|
28
28
|
import {
|
|
29
29
|
useModal
|
|
30
30
|
} from "./chunk-KGQG5JGW.js";
|
|
31
31
|
import {
|
|
32
32
|
Avatar
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-BU5JK37R.js";
|
|
34
34
|
import {
|
|
35
35
|
Show
|
|
36
36
|
} from "./chunk-BUVVRQLZ.js";
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "./chunk-JIZQFTW6.js";
|
|
40
40
|
import {
|
|
41
41
|
$cerberusIcons
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-DDOTCGGA.js";
|
|
43
43
|
|
|
44
44
|
// src/context/prompt-modal.tsx
|
|
45
45
|
import {
|
|
@@ -240,4 +240,4 @@ export {
|
|
|
240
240
|
PromptModal,
|
|
241
241
|
usePromptModal
|
|
242
242
|
};
|
|
243
|
-
//# sourceMappingURL=chunk-
|
|
243
|
+
//# sourceMappingURL=chunk-G7AGKII3.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ProgressBar
|
|
3
3
|
} from "./chunk-WZJ5UQNM.js";
|
|
4
|
-
import {
|
|
5
|
-
IconButton
|
|
6
|
-
} from "./chunk-APD6IX5R.js";
|
|
7
4
|
import {
|
|
8
5
|
FieldMessage
|
|
9
6
|
} from "./chunk-JWIJHSI6.js";
|
|
10
7
|
import {
|
|
11
8
|
Field
|
|
12
9
|
} from "./chunk-UZDVOIW5.js";
|
|
10
|
+
import {
|
|
11
|
+
IconButton
|
|
12
|
+
} from "./chunk-APD6IX5R.js";
|
|
13
13
|
import {
|
|
14
14
|
Avatar
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BU5JK37R.js";
|
|
16
16
|
import {
|
|
17
17
|
$cerberusIcons
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-DDOTCGGA.js";
|
|
19
19
|
|
|
20
20
|
// src/components/FileStatus.tsx
|
|
21
21
|
import {
|
|
@@ -225,4 +225,4 @@ export {
|
|
|
225
225
|
processStatus,
|
|
226
226
|
FileStatus
|
|
227
227
|
};
|
|
228
|
-
//# sourceMappingURL=chunk-
|
|
228
|
+
//# sourceMappingURL=chunk-GI6CSUU4.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-JIZQFTW6.js";
|
|
4
4
|
import {
|
|
5
5
|
$cerberusIcons
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DDOTCGGA.js";
|
|
7
7
|
|
|
8
8
|
// src/components/Notification.tsx
|
|
9
9
|
import { cx } from "@cerberus/styled-system/css";
|
|
@@ -72,4 +72,4 @@ function Notification(props) {
|
|
|
72
72
|
export {
|
|
73
73
|
Notification
|
|
74
74
|
};
|
|
75
|
-
//# sourceMappingURL=chunk-
|
|
75
|
+
//# sourceMappingURL=chunk-HP4ZN473.js.map
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IconButton
|
|
3
|
+
} from "./chunk-APD6IX5R.js";
|
|
4
|
+
import {
|
|
5
|
+
Button
|
|
6
|
+
} from "./chunk-EXGKZGML.js";
|
|
7
|
+
import {
|
|
8
|
+
$cerberusIcons
|
|
9
|
+
} from "./chunk-DDOTCGGA.js";
|
|
10
|
+
|
|
11
|
+
// src/components/DatePicker.server.tsx
|
|
12
|
+
import {
|
|
13
|
+
DatePicker as ArkDP
|
|
14
|
+
} from "@ark-ui/react";
|
|
15
|
+
import { css, cx } from "@cerberus/styled-system/css";
|
|
16
|
+
import { datePicker, iconButton, label } from "@cerberus/styled-system/recipes";
|
|
17
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
var datePickerStyles = datePicker();
|
|
19
|
+
function DatePickerLabel(props) {
|
|
20
|
+
const { className, ...arkProps } = props;
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
ArkDP.Label,
|
|
23
|
+
{
|
|
24
|
+
...arkProps,
|
|
25
|
+
className: cx(
|
|
26
|
+
className,
|
|
27
|
+
label({
|
|
28
|
+
size: "sm"
|
|
29
|
+
})
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
function DatePickerTrigger(props) {
|
|
35
|
+
const { calendar: CalendarIcon } = $cerberusIcons;
|
|
36
|
+
return /* @__PURE__ */ jsx(
|
|
37
|
+
ArkDP.Trigger,
|
|
38
|
+
{
|
|
39
|
+
...props,
|
|
40
|
+
className: cx(
|
|
41
|
+
props.className,
|
|
42
|
+
iconButton({
|
|
43
|
+
size: "sm",
|
|
44
|
+
usage: "ghost"
|
|
45
|
+
}),
|
|
46
|
+
datePickerStyles.trigger
|
|
47
|
+
),
|
|
48
|
+
children: /* @__PURE__ */ jsx(CalendarIcon, {})
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
function DatePickerViewControl(props) {
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
ArkDP.Control,
|
|
55
|
+
{
|
|
56
|
+
...props,
|
|
57
|
+
className: cx(props.className, datePickerStyles.viewControl)
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
function DatePickerViewControlGroup(props) {
|
|
62
|
+
const { calendarPrev: PrevIcon, calendarNext: NextIcon } = $cerberusIcons;
|
|
63
|
+
return /* @__PURE__ */ jsxs(DatePickerViewControl, { ...props, children: [
|
|
64
|
+
/* @__PURE__ */ jsx(ArkDP.PrevTrigger, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { ariaLabel: "Previous", size: "sm", children: /* @__PURE__ */ jsx(PrevIcon, {}) }) }),
|
|
65
|
+
/* @__PURE__ */ jsx(ArkDP.ViewTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
66
|
+
Button,
|
|
67
|
+
{
|
|
68
|
+
className: css({
|
|
69
|
+
h: "2rem",
|
|
70
|
+
paddingInline: "md"
|
|
71
|
+
}),
|
|
72
|
+
shape: "rounded",
|
|
73
|
+
size: "sm",
|
|
74
|
+
usage: "ghost",
|
|
75
|
+
children: /* @__PURE__ */ jsx(ArkDP.RangeText, {})
|
|
76
|
+
}
|
|
77
|
+
) }),
|
|
78
|
+
/* @__PURE__ */ jsx(ArkDP.NextTrigger, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { ariaLabel: "Next", size: "sm", children: /* @__PURE__ */ jsx(NextIcon, {}) }) })
|
|
79
|
+
] });
|
|
80
|
+
}
|
|
81
|
+
function DatePickerTable(props) {
|
|
82
|
+
return /* @__PURE__ */ jsx(
|
|
83
|
+
ArkDP.Table,
|
|
84
|
+
{
|
|
85
|
+
...props,
|
|
86
|
+
className: cx(props.className, datePickerStyles.table)
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
function DatePickerTableHeader(props) {
|
|
91
|
+
return /* @__PURE__ */ jsx(
|
|
92
|
+
ArkDP.TableHeader,
|
|
93
|
+
{
|
|
94
|
+
...props,
|
|
95
|
+
className: cx(props.className, datePickerStyles.tableHeader)
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
function DatePickerTableCell(props) {
|
|
100
|
+
return /* @__PURE__ */ jsx(
|
|
101
|
+
ArkDP.TableCell,
|
|
102
|
+
{
|
|
103
|
+
...props,
|
|
104
|
+
className: cx(props.className, datePickerStyles.tableCell)
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
function DatePickerTableCellTrigger(props) {
|
|
109
|
+
return /* @__PURE__ */ jsx(
|
|
110
|
+
ArkDP.TableCellTrigger,
|
|
111
|
+
{
|
|
112
|
+
...props,
|
|
113
|
+
className: cx(props.className, datePickerStyles.tableCellTrigger)
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
var DatePickerView = ArkDP.View;
|
|
118
|
+
var DatePickerContext = ArkDP.Context;
|
|
119
|
+
|
|
120
|
+
export {
|
|
121
|
+
DatePickerLabel,
|
|
122
|
+
DatePickerTrigger,
|
|
123
|
+
DatePickerViewControl,
|
|
124
|
+
DatePickerViewControlGroup,
|
|
125
|
+
DatePickerTable,
|
|
126
|
+
DatePickerTableHeader,
|
|
127
|
+
DatePickerTableCell,
|
|
128
|
+
DatePickerTableCellTrigger,
|
|
129
|
+
DatePickerView,
|
|
130
|
+
DatePickerContext
|
|
131
|
+
};
|
|
132
|
+
//# sourceMappingURL=chunk-IP5VFOPZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/DatePicker.server.tsx"],"sourcesContent":["import {\n DatePicker as ArkDP,\n type DatePickerLabelProps,\n type DatePickerTableCellProps,\n type DatePickerTableCellTriggerProps,\n type DatePickerTableHeaderProps,\n type DatePickerTableProps,\n type DatePickerTriggerProps,\n type DatePickerViewControlProps,\n} from '@ark-ui/react'\nimport { css, cx } from '@cerberus/styled-system/css'\nimport { datePicker, iconButton, label } from '@cerberus/styled-system/recipes'\nimport { $cerberusIcons } from '../config/defineIcons'\nimport { IconButton } from './IconButton'\nimport { Button } from './Button'\n\n/**\n * This module contains the DatePicker server family components.\n * @module DatePicker\n */\n\n// We are not exposing this to the public API\nconst datePickerStyles = datePicker()\n\n/**\n * The label component for the DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerLabel>\n * <DatePickerLabel.Label>...</DatePickerLabel.Label>\n * </DatePickerLabel>\n * ```\n */\nexport function DatePickerLabel(props: DatePickerLabelProps) {\n const { className, ...arkProps } = props\n return (\n <ArkDP.Label\n {...arkProps}\n className={cx(\n className,\n label({\n size: 'sm',\n }),\n )}\n />\n )\n}\n\n/**\n * The trigger component for the DatePicker which opens the calendar.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTrigger />\n * ```\n */\nexport function DatePickerTrigger(props: DatePickerTriggerProps) {\n const { calendar: CalendarIcon } = $cerberusIcons\n return (\n <ArkDP.Trigger\n {...props}\n className={cx(\n props.className,\n iconButton({\n size: 'sm',\n usage: 'ghost',\n }),\n datePickerStyles.trigger,\n )}\n >\n <CalendarIcon />\n </ArkDP.Trigger>\n )\n}\n\n/**\n * The control component for the DatePicker which wraps the triggers to switch\n * between calendar views.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerViewControl>\n * <PrevTrigger />\n * <ViewTrigger />\n * <NextTrigger />\n * </DatePickerViewControl>\n * ```\n */\nexport function DatePickerViewControl(props: DatePickerViewControlProps) {\n return (\n <ArkDP.Control\n {...props}\n className={cx(props.className, datePickerStyles.viewControl)}\n />\n )\n}\n\n/**\n * An abstraction of the DatePicker control that contains the prev, view, and\n * next triggers which control the calendar output.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerViewControlGroup />\n * ```\n */\nexport function DatePickerViewControlGroup(props: DatePickerViewControlProps) {\n const { calendarPrev: PrevIcon, calendarNext: NextIcon } = $cerberusIcons\n return (\n <DatePickerViewControl {...props}>\n <ArkDP.PrevTrigger asChild>\n <IconButton ariaLabel=\"Previous\" size=\"sm\">\n <PrevIcon />\n </IconButton>\n </ArkDP.PrevTrigger>\n\n <ArkDP.ViewTrigger asChild>\n <Button\n className={css({\n h: '2rem',\n paddingInline: 'md',\n })}\n shape=\"rounded\"\n size=\"sm\"\n usage=\"ghost\"\n >\n <ArkDP.RangeText />\n </Button>\n </ArkDP.ViewTrigger>\n\n <ArkDP.NextTrigger asChild>\n <IconButton ariaLabel=\"Next\" size=\"sm\">\n <NextIcon />\n </IconButton>\n </ArkDP.NextTrigger>\n </DatePickerViewControl>\n )\n}\n\n/**\n * The table component for the DatePicker.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTable />\n * ```\n */\nexport function DatePickerTable(props: DatePickerTableProps) {\n return (\n <ArkDP.Table\n {...props}\n className={cx(props.className, datePickerStyles.table)}\n />\n )\n}\n\n/**\n * The header component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableHeader />\n * ```\n */\nexport function DatePickerTableHeader(props: DatePickerTableHeaderProps) {\n return (\n <ArkDP.TableHeader\n {...props}\n className={cx(props.className, datePickerStyles.tableHeader)}\n />\n )\n}\n\n/**\n * The cell component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableCell />\n * ```\n */\nexport function DatePickerTableCell(props: DatePickerTableCellProps) {\n return (\n <ArkDP.TableCell\n {...props}\n className={cx(props.className, datePickerStyles.tableCell)}\n />\n )\n}\n\n/**\n * The cell component for the DatePicker table.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerTableCell />\n * ```\n */\nexport function DatePickerTableCellTrigger(\n props: DatePickerTableCellTriggerProps,\n) {\n return (\n <ArkDP.TableCellTrigger\n {...props}\n className={cx(props.className, datePickerStyles.tableCellTrigger)}\n />\n )\n}\n\n/**\n * The view container which wraps the control and content components.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerView />\n * ```\n */\nexport const DatePickerView = ArkDP.View\n\n/**\n * The context component for the DatePicker which provides the DatePicker state.\n * @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <DatePickerContext />\n * ```\n */\nexport const DatePickerContext = ArkDP.Context\n"],"mappings":";;;;;;;;;;;AAAA;AAAA,EACE,cAAc;AAAA,OAQT;AACP,SAAS,KAAK,UAAU;AACxB,SAAS,YAAY,YAAY,aAAa;AA0B1C,cAyEA,YAzEA;AAfJ,IAAM,mBAAmB,WAAW;AAY7B,SAAS,gBAAgB,OAA6B;AAC3D,QAAM,EAAE,WAAW,GAAG,SAAS,IAAI;AACnC,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT;AAAA,QACA,MAAM;AAAA,UACJ,MAAM;AAAA,QACR,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;AAUO,SAAS,kBAAkB,OAA+B;AAC/D,QAAM,EAAE,UAAU,aAAa,IAAI;AACnC,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT,MAAM;AAAA,QACN,WAAW;AAAA,UACT,MAAM;AAAA,UACN,OAAO;AAAA,QACT,CAAC;AAAA,QACD,iBAAiB;AAAA,MACnB;AAAA,MAEA,8BAAC,gBAAa;AAAA;AAAA,EAChB;AAEJ;AAeO,SAAS,sBAAsB,OAAmC;AACvE,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,GAAG,MAAM,WAAW,iBAAiB,WAAW;AAAA;AAAA,EAC7D;AAEJ;AAWO,SAAS,2BAA2B,OAAmC;AAC5E,QAAM,EAAE,cAAc,UAAU,cAAc,SAAS,IAAI;AAC3D,SACE,qBAAC,yBAAuB,GAAG,OACzB;AAAA,wBAAC,MAAM,aAAN,EAA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
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HP4ZN473.js";
|
|
4
4
|
import {
|
|
5
5
|
NotificationDescription
|
|
6
6
|
} from "./chunk-UXY3KCC3.js";
|
|
@@ -159,4 +159,4 @@ export {
|
|
|
159
159
|
NotificationCenter,
|
|
160
160
|
useNotificationCenter
|
|
161
161
|
};
|
|
162
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-M73ECA25.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Avatar
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BU5JK37R.js";
|
|
4
4
|
import {
|
|
5
5
|
Show
|
|
6
6
|
} from "./chunk-BUVVRQLZ.js";
|
|
7
7
|
import {
|
|
8
8
|
$cerberusIcons
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DDOTCGGA.js";
|
|
10
10
|
|
|
11
11
|
// src/components/FileUploader.tsx
|
|
12
12
|
import { cx } from "@cerberus/styled-system/css";
|
|
@@ -72,4 +72,4 @@ function FileUploader(props) {
|
|
|
72
72
|
export {
|
|
73
73
|
FileUploader
|
|
74
74
|
};
|
|
75
|
-
//# sourceMappingURL=chunk-
|
|
75
|
+
//# sourceMappingURL=chunk-O7QVCF3H.js.map
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Portal
|
|
3
|
+
} from "./chunk-IQJDVFPP.js";
|
|
4
|
+
import {
|
|
5
|
+
useFieldContext
|
|
6
|
+
} from "./chunk-UZDVOIW5.js";
|
|
7
|
+
import {
|
|
8
|
+
DatePickerContext,
|
|
9
|
+
DatePickerTable,
|
|
10
|
+
DatePickerTableCell,
|
|
11
|
+
DatePickerTableCellTrigger,
|
|
12
|
+
DatePickerTableHeader,
|
|
13
|
+
DatePickerTrigger,
|
|
14
|
+
DatePickerView,
|
|
15
|
+
DatePickerViewControlGroup
|
|
16
|
+
} from "./chunk-IP5VFOPZ.js";
|
|
17
|
+
import {
|
|
18
|
+
formatISOToMilitary
|
|
19
|
+
} from "./chunk-3BM6MZ4A.js";
|
|
20
|
+
|
|
21
|
+
// src/components/DatePicker.client.tsx
|
|
22
|
+
import {
|
|
23
|
+
DatePicker as ArkDP
|
|
24
|
+
} from "@ark-ui/react";
|
|
25
|
+
import { useCallback } from "react";
|
|
26
|
+
import { datePicker } from "@cerberus/styled-system/recipes";
|
|
27
|
+
import { cx } from "@cerberus/styled-system/css";
|
|
28
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
29
|
+
var datePickerStyles = datePicker();
|
|
30
|
+
function DatePicker(props) {
|
|
31
|
+
const states = useFieldContext();
|
|
32
|
+
const handleFormat = useCallback((value) => {
|
|
33
|
+
return formatISOToMilitary(value.toString());
|
|
34
|
+
}, []);
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
ArkDP.Root,
|
|
37
|
+
{
|
|
38
|
+
...props,
|
|
39
|
+
...states,
|
|
40
|
+
format: handleFormat,
|
|
41
|
+
positioning: {
|
|
42
|
+
placement: "bottom-start"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
function DatePickerInput(props) {
|
|
48
|
+
const { invalid, ...fieldStates } = useFieldContext();
|
|
49
|
+
return /* @__PURE__ */ jsxs(ArkDP.Control, { className: datePickerStyles.control, children: [
|
|
50
|
+
/* @__PURE__ */ jsx(DatePickerTrigger, {}),
|
|
51
|
+
/* @__PURE__ */ jsx(
|
|
52
|
+
ArkDP.Input,
|
|
53
|
+
{
|
|
54
|
+
...props,
|
|
55
|
+
...fieldStates,
|
|
56
|
+
...invalid && { "aria-invalid": true },
|
|
57
|
+
className: cx(props.className, datePickerStyles.input),
|
|
58
|
+
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
59
|
+
maxLength: 11
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] });
|
|
63
|
+
}
|
|
64
|
+
function RangePickerInput(props) {
|
|
65
|
+
const { invalid, ...fieldStates } = useFieldContext();
|
|
66
|
+
return /* @__PURE__ */ jsxs(ArkDP.Control, { "data-range": true, className: datePickerStyles.control, children: [
|
|
67
|
+
/* @__PURE__ */ jsx(DatePickerTrigger, {}),
|
|
68
|
+
/* @__PURE__ */ jsx(
|
|
69
|
+
ArkDP.Input,
|
|
70
|
+
{
|
|
71
|
+
...props,
|
|
72
|
+
...fieldStates,
|
|
73
|
+
...invalid && { "aria-invalid": true },
|
|
74
|
+
"data-range-input": true,
|
|
75
|
+
className: cx(props.className, datePickerStyles.input),
|
|
76
|
+
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
77
|
+
maxLength: 11,
|
|
78
|
+
index: 0
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ jsx(
|
|
82
|
+
ArkDP.Input,
|
|
83
|
+
{
|
|
84
|
+
...props,
|
|
85
|
+
...fieldStates,
|
|
86
|
+
...invalid && { "aria-invalid": true },
|
|
87
|
+
"data-range-input": true,
|
|
88
|
+
"data-range-end-input": true,
|
|
89
|
+
className: cx(props.className, datePickerStyles.input),
|
|
90
|
+
placeholder: props.placeholder ?? "DD MMM YYYY",
|
|
91
|
+
maxLength: 11,
|
|
92
|
+
index: 1
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
] });
|
|
96
|
+
}
|
|
97
|
+
function DatePickerContent(props) {
|
|
98
|
+
const { children, ...contentProps } = props;
|
|
99
|
+
return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(ArkDP.Positioner, { className: datePickerStyles.positioner, children: /* @__PURE__ */ jsx(
|
|
100
|
+
ArkDP.Content,
|
|
101
|
+
{
|
|
102
|
+
...contentProps,
|
|
103
|
+
className: cx(contentProps.className, datePickerStyles.content),
|
|
104
|
+
children
|
|
105
|
+
}
|
|
106
|
+
) }) });
|
|
107
|
+
}
|
|
108
|
+
function DatePickerDayView(props) {
|
|
109
|
+
function isToday(date) {
|
|
110
|
+
const today = /* @__PURE__ */ new Date();
|
|
111
|
+
const formatted = today.toISOString().split("T")[0];
|
|
112
|
+
const arkDate = `${date.year}-${String(date.month).padStart(2, "0")}-${String(date.day).padStart(2, "0")}`;
|
|
113
|
+
return formatted === arkDate;
|
|
114
|
+
}
|
|
115
|
+
function isPastDay(date) {
|
|
116
|
+
const today = /* @__PURE__ */ new Date();
|
|
117
|
+
const arkDate = `${date.year}-${String(date.month).padStart(2, "0")}-${String(date.day).padStart(2, "0")}`;
|
|
118
|
+
return new Date(arkDate) < today;
|
|
119
|
+
}
|
|
120
|
+
function getDayValue(date) {
|
|
121
|
+
if (isToday(date)) return "today";
|
|
122
|
+
if (isPastDay(date)) return "past";
|
|
123
|
+
return "future";
|
|
124
|
+
}
|
|
125
|
+
return /* @__PURE__ */ jsx(DatePickerView, { ...props, view: "day", children: /* @__PURE__ */ jsx(DatePickerContext, { children: (datePicker2) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
126
|
+
/* @__PURE__ */ jsx(DatePickerViewControlGroup, {}),
|
|
127
|
+
/* @__PURE__ */ jsxs(DatePickerTable, { children: [
|
|
128
|
+
/* @__PURE__ */ jsx(ArkDP.TableHead, { children: /* @__PURE__ */ jsx(ArkDP.TableRow, { children: datePicker2.weekDays.map((weekDay, id) => /* @__PURE__ */ jsx(DatePickerTableHeader, { children: weekDay.narrow }, id)) }) }),
|
|
129
|
+
/* @__PURE__ */ jsx(ArkDP.TableBody, { children: datePicker2.weeks.map((week, id) => /* @__PURE__ */ jsx(ArkDP.TableRow, { children: week.map((day, id2) => /* @__PURE__ */ jsx(DatePickerTableCell, { value: day, children: /* @__PURE__ */ jsx(
|
|
130
|
+
DatePickerTableCellTrigger,
|
|
131
|
+
{
|
|
132
|
+
"data-date": getDayValue(day),
|
|
133
|
+
children: day.day
|
|
134
|
+
}
|
|
135
|
+
) }, id2)) }, id)) })
|
|
136
|
+
] })
|
|
137
|
+
] }) }) });
|
|
138
|
+
}
|
|
139
|
+
function DatePickerMonthView(props) {
|
|
140
|
+
return /* @__PURE__ */ jsx(ArkDP.View, { ...props, view: "month", children: /* @__PURE__ */ jsx(ArkDP.Context, { children: (datePicker2) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
141
|
+
/* @__PURE__ */ jsx(DatePickerViewControlGroup, {}),
|
|
142
|
+
/* @__PURE__ */ jsx(DatePickerTable, { children: /* @__PURE__ */ jsx(ArkDP.TableBody, { children: datePicker2.getMonthsGrid({ columns: 4, format: "short" }).map((months, id) => /* @__PURE__ */ jsx(ArkDP.TableRow, { children: months.map((month, id2) => /* @__PURE__ */ jsx(DatePickerTableCell, { value: month.value, children: /* @__PURE__ */ jsx(DatePickerTableCellTrigger, { children: month.label }) }, id2)) }, id)) }) })
|
|
143
|
+
] }) }) });
|
|
144
|
+
}
|
|
145
|
+
function DatePickerYearView(props) {
|
|
146
|
+
return /* @__PURE__ */ jsx(ArkDP.View, { ...props, view: "year", children: /* @__PURE__ */ jsx(ArkDP.Context, { children: (datePicker2) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
147
|
+
/* @__PURE__ */ jsx(DatePickerViewControlGroup, {}),
|
|
148
|
+
/* @__PURE__ */ jsx(DatePickerTable, { children: /* @__PURE__ */ jsx(ArkDP.TableBody, { children: datePicker2.getYearsGrid({ columns: 4 }).map((years, id) => /* @__PURE__ */ jsx(ArkDP.TableRow, { children: years.map((year, id2) => /* @__PURE__ */ jsx(DatePickerTableCell, { value: year.value, children: /* @__PURE__ */ jsx(DatePickerTableCellTrigger, { children: year.label }) }, id2)) }, id)) }) })
|
|
149
|
+
] }) }) });
|
|
150
|
+
}
|
|
151
|
+
function DatePickerCalendar() {
|
|
152
|
+
return /* @__PURE__ */ jsxs(DatePickerContent, { children: [
|
|
153
|
+
/* @__PURE__ */ jsx(DatePickerDayView, {}),
|
|
154
|
+
/* @__PURE__ */ jsx(DatePickerMonthView, {}),
|
|
155
|
+
/* @__PURE__ */ jsx(DatePickerYearView, {})
|
|
156
|
+
] });
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export {
|
|
160
|
+
DatePicker,
|
|
161
|
+
DatePickerInput,
|
|
162
|
+
RangePickerInput,
|
|
163
|
+
DatePickerContent,
|
|
164
|
+
DatePickerDayView,
|
|
165
|
+
DatePickerMonthView,
|
|
166
|
+
DatePickerYearView,
|
|
167
|
+
DatePickerCalendar
|
|
168
|
+
};
|
|
169
|
+
//# sourceMappingURL=chunk-QX4V5V74.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/DatePicker.client.tsx"],"sourcesContent":["'use client'\n\nimport {\n DatePicker as ArkDP,\n type DatePickerContentProps,\n type DatePickerInputProps,\n type DatePickerRootProps,\n type DatePickerViewProps,\n type DateValue,\n} from '@ark-ui/react'\nimport { Portal } from './Portal'\nimport { useCallback } from 'react'\nimport { datePicker } from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\nimport { useFieldContext } from '../context/field'\nimport {\n DatePickerTrigger,\n DatePickerView,\n DatePickerContext,\n DatePickerViewControlGroup,\n DatePickerTable,\n DatePickerTableHeader,\n DatePickerTableCellTrigger,\n DatePickerTableCell,\n} from './DatePicker.server'\nimport { formatISOToMilitary } from '../hooks/useDate'\n\n/**\n * This module contains the DatePicker client family components.\n * @module DatePicker:client\n */\n\n// We are not exposing this to the public API\nconst datePickerStyles = datePicker()\n\n/**\n * The main context provider for the DatePicker family components.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePicker(props: DatePickerRootProps) {\n const states = useFieldContext()\n\n // TODO: Fix this format bug\n // There is a bug with the Root component that causes random date selection onBlur after the first selection if the format prop is used.\n const handleFormat = useCallback((value: DateValue) => {\n return formatISOToMilitary(value.toString())\n }, [])\n\n return (\n <ArkDP.Root\n {...props}\n {...states}\n format={handleFormat}\n positioning={{\n placement: 'bottom-start',\n }}\n />\n )\n}\n\n/**\n * The input component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerInput(props: DatePickerInputProps) {\n const { invalid, ...fieldStates } = useFieldContext()\n return (\n <ArkDP.Control className={datePickerStyles.control}>\n <DatePickerTrigger />\n <ArkDP.Input\n {...props}\n {...fieldStates}\n {...(invalid && { 'aria-invalid': true })}\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n />\n </ArkDP.Control>\n )\n}\n\n/**\n * The input component for the DatePicker that uses ranges.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\" selection=\"range\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <RangePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function RangePickerInput(props: DatePickerInputProps) {\n const { invalid, ...fieldStates } = useFieldContext()\n return (\n <ArkDP.Control data-range className={datePickerStyles.control}>\n <DatePickerTrigger />\n <ArkDP.Input\n {...props}\n {...fieldStates}\n {...(invalid && { 'aria-invalid': true })}\n data-range-input\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={0}\n />\n <ArkDP.Input\n {...props}\n {...fieldStates}\n {...(invalid && { 'aria-invalid': true })}\n data-range-input\n data-range-end-input\n className={cx(props.className, datePickerStyles.input)}\n placeholder={props.placeholder ?? 'DD MMM YYYY'}\n maxLength={11}\n index={1}\n />\n </ArkDP.Control>\n )\n}\n\n/**\n * The content component for the DatePicker which contains the calendar.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerContent(props: DatePickerContentProps) {\n const { children, ...contentProps } = props\n return (\n <Portal>\n <ArkDP.Positioner className={datePickerStyles.positioner}>\n <ArkDP.Content\n {...contentProps}\n className={cx(contentProps.className, datePickerStyles.content)}\n >\n {children}\n </ArkDP.Content>\n </ArkDP.Positioner>\n </Portal>\n )\n}\n\n/**\n * The day view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerDayView(props: Omit<DatePickerViewProps, 'view'>) {\n function isToday(date: ArkDP.DateValue): boolean {\n const today = new Date()\n const formatted = today.toISOString().split('T')[0]\n const arkDate = `${date.year}-${String(date.month).padStart(2, '0')}-${String(date.day).padStart(2, '0')}`\n return formatted === arkDate\n }\n\n function isPastDay(date: ArkDP.DateValue): boolean {\n const today = new Date()\n const arkDate = `${date.year}-${String(date.month).padStart(2, '0')}-${String(date.day).padStart(2, '0')}`\n return new Date(arkDate) < today\n }\n\n function getDayValue(date: ArkDP.DateValue): 'today' | 'past' | 'future' {\n if (isToday(date)) return 'today'\n if (isPastDay(date)) return 'past'\n return 'future'\n }\n\n return (\n <DatePickerView {...props} view=\"day\">\n <DatePickerContext>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableHead>\n <ArkDP.TableRow>\n {datePicker.weekDays.map((weekDay, id) => (\n <DatePickerTableHeader key={id}>\n {weekDay.narrow}\n </DatePickerTableHeader>\n ))}\n </ArkDP.TableRow>\n </ArkDP.TableHead>\n\n <ArkDP.TableBody>\n {datePicker.weeks.map((week, id) => (\n <ArkDP.TableRow key={id}>\n {week.map((day, id) => (\n <DatePickerTableCell key={id} value={day}>\n <DatePickerTableCellTrigger\n data-date={getDayValue(day)}\n >\n {day.day}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </DatePickerContext>\n </DatePickerView>\n )\n}\n\n/**\n * The month view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerMonthView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <ArkDP.View {...props} view=\"month\">\n <ArkDP.Context>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableBody>\n {datePicker\n .getMonthsGrid({ columns: 4, format: 'short' })\n .map((months, id) => (\n <ArkDP.TableRow key={id}>\n {months.map((month, id) => (\n <DatePickerTableCell key={id} value={month.value}>\n <DatePickerTableCellTrigger>\n {month.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </ArkDP.Context>\n </ArkDP.View>\n )\n}\n\n/**\n * The year view component for the DatePicker.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerYearView(props: Omit<DatePickerViewProps, 'view'>) {\n return (\n <ArkDP.View {...props} view=\"year\">\n <ArkDP.Context>\n {(datePicker) => (\n <>\n <DatePickerViewControlGroup />\n\n <DatePickerTable>\n <ArkDP.TableBody>\n {datePicker.getYearsGrid({ columns: 4 }).map((years, id) => (\n <ArkDP.TableRow key={id}>\n {years.map((year, id) => (\n <DatePickerTableCell key={id} value={year.value}>\n <DatePickerTableCellTrigger>\n {year.label}\n </DatePickerTableCellTrigger>\n </DatePickerTableCell>\n ))}\n </ArkDP.TableRow>\n ))}\n </ArkDP.TableBody>\n </DatePickerTable>\n </>\n )}\n </ArkDP.Context>\n </ArkDP.View>\n )\n}\n\n/**\n * An abstraction of the DatePicker content components that contain the\n * different calendar views and controls.\n * @definition [Date Picker docs](https://cerberus.digitalu.design/react/date-picker)\n * @example\n * ```tsx\n * <Field>\n * <DatePicker name=\"start_date\">\n * <DatePickerLabel>Start date</DatePickerLabel>\n * <DatePickerInput />\n * <DatePickerCalendar />\n * </DatePicker>\n * </Field>\n * ```\n */\nexport function DatePickerCalendar() {\n return (\n <DatePickerContent>\n <DatePickerDayView />\n <DatePickerMonthView />\n <DatePickerYearView />\n </DatePickerContent>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA;AAAA,EACE,cAAc;AAAA,OAMT;AAEP,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AA8Cf,SA0JM,UA1JN,KA4BA,YA5BA;AA1BJ,IAAM,mBAAmB,WAAW;AAgB7B,SAAS,WAAW,OAA4B;AACrD,QAAM,SAAS,gBAAgB;AAI/B,QAAM,eAAe,YAAY,CAAC,UAAqB;AACrD,WAAO,oBAAoB,MAAM,SAAS,CAAC;AAAA,EAC7C,GAAG,CAAC,CAAC;AAEL,SACE;AAAA,IAAC,MAAM;AAAA,IAAN;AAAA,MACE,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,QAAQ;A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,eAAK,OACR,KAHwBA,GAI1B,CACD,KAPkB,EAQrB,CACD,GACH,GACF;AAAA,KACF,GAEJ,GACF;AAEJ;AAiBO,SAAS,qBAAqB;AACnC,SACE,qBAAC,qBACC;AAAA,wBAAC,qBAAkB;AAAA,IACnB,oBAAC,uBAAoB;AAAA,IACrB,oBAAC,sBAAmB;AAAA,KACtB;AAEJ;","names":["datePicker","id"]}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-BUVVRQLZ.js";
|
|
7
7
|
import {
|
|
8
8
|
$cerberusIcons
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DDOTCGGA.js";
|
|
10
10
|
|
|
11
11
|
// src/components/Select.tsx
|
|
12
12
|
import { cx } from "@cerberus/styled-system/css";
|
|
@@ -65,4 +65,4 @@ export {
|
|
|
65
65
|
Select,
|
|
66
66
|
Option
|
|
67
67
|
};
|
|
68
|
-
//# sourceMappingURL=chunk-
|
|
68
|
+
//# sourceMappingURL=chunk-S25RHYZV.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-BUVVRQLZ.js";
|
|
7
7
|
import {
|
|
8
8
|
$cerberusIcons
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DDOTCGGA.js";
|
|
10
10
|
|
|
11
11
|
// src/components/Checkbox.tsx
|
|
12
12
|
import {
|
|
@@ -53,4 +53,4 @@ function Checkbox(props) {
|
|
|
53
53
|
export {
|
|
54
54
|
Checkbox
|
|
55
55
|
};
|
|
56
|
-
//# sourceMappingURL=chunk-
|
|
56
|
+
//# sourceMappingURL=chunk-W2LSPRQ3.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-UZDVOIW5.js";
|
|
4
4
|
import {
|
|
5
5
|
$cerberusIcons
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DDOTCGGA.js";
|
|
7
7
|
|
|
8
8
|
// src/components/Toggle.tsx
|
|
9
9
|
import { cx } from "@cerberus/styled-system/css";
|
|
@@ -55,4 +55,4 @@ function Toggle(props) {
|
|
|
55
55
|
export {
|
|
56
56
|
Toggle
|
|
57
57
|
};
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-XVU2NQCW.js.map
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
Admonition,
|
|
3
3
|
AdmonitionDescription,
|
|
4
4
|
AdmonitionHeading
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-4IMOKN2D.js";
|
|
6
|
+
import "../chunk-BU5JK37R.js";
|
|
7
7
|
import "../chunk-BUVVRQLZ.js";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-DDOTCGGA.js";
|
|
9
|
+
import "../chunk-5KHU6MM5.js";
|
|
10
10
|
import "../chunk-E3PAEB7Y.js";
|
|
11
11
|
import "../chunk-HVKM54BA.js";
|
|
12
12
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Avatar
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-BU5JK37R.js";
|
|
4
4
|
import "../chunk-BUVVRQLZ.js";
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-DDOTCGGA.js";
|
|
6
|
+
import "../chunk-5KHU6MM5.js";
|
|
7
7
|
import "../chunk-E3PAEB7Y.js";
|
|
8
8
|
import "../chunk-HVKM54BA.js";
|
|
9
9
|
export {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Checkbox
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-W2LSPRQ3.js";
|
|
5
5
|
import "../chunk-UZDVOIW5.js";
|
|
6
6
|
import "../chunk-BUVVRQLZ.js";
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-DDOTCGGA.js";
|
|
8
|
+
import "../chunk-5KHU6MM5.js";
|
|
9
9
|
import "../chunk-E3PAEB7Y.js";
|
|
10
10
|
import "../chunk-HVKM54BA.js";
|
|
11
11
|
export {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
DatePicker,
|
|
4
|
+
DatePickerCalendar,
|
|
5
|
+
DatePickerContent,
|
|
6
|
+
DatePickerDayView,
|
|
7
|
+
DatePickerInput,
|
|
8
|
+
DatePickerMonthView,
|
|
9
|
+
DatePickerYearView,
|
|
10
|
+
RangePickerInput
|
|
11
|
+
} from "../chunk-QX4V5V74.js";
|
|
12
|
+
import "../chunk-IQJDVFPP.js";
|
|
13
|
+
import "../chunk-UZDVOIW5.js";
|
|
14
|
+
import "../chunk-IP5VFOPZ.js";
|
|
15
|
+
import "../chunk-APD6IX5R.js";
|
|
16
|
+
import "../chunk-EXGKZGML.js";
|
|
17
|
+
import "../chunk-DDOTCGGA.js";
|
|
18
|
+
import "../chunk-5KHU6MM5.js";
|
|
19
|
+
import "../chunk-E3PAEB7Y.js";
|
|
20
|
+
import "../chunk-HVKM54BA.js";
|
|
21
|
+
import "../chunk-3BM6MZ4A.js";
|
|
22
|
+
export {
|
|
23
|
+
DatePicker,
|
|
24
|
+
DatePickerCalendar,
|
|
25
|
+
DatePickerContent,
|
|
26
|
+
DatePickerDayView,
|
|
27
|
+
DatePickerInput,
|
|
28
|
+
DatePickerMonthView,
|
|
29
|
+
DatePickerYearView,
|
|
30
|
+
RangePickerInput
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=DatePicker.client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|