@cerberus-design/react 0.25.0 → 0.25.1-rc.1
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/dist/components/combobox/combobox.cjs +1 -2
- package/dist/components/combobox/combobox.d.cts +1 -3
- package/dist/components/combobox/combobox.d.ts +1 -3
- package/dist/components/combobox/combobox.js +1 -2
- package/dist/components/cta-dialog/provider.cjs +3 -1
- package/dist/components/cta-dialog/provider.d.cts +2 -1
- package/dist/components/cta-dialog/provider.d.ts +2 -1
- package/dist/components/cta-dialog/provider.js +3 -1
- package/dist/components/date-picker/calendar.cjs +3 -1
- package/dist/components/date-picker/calendar.d.cts +4 -8
- package/dist/components/date-picker/calendar.d.ts +4 -8
- package/dist/components/date-picker/calendar.js +3 -1
- package/dist/components/date-picker/content.cjs +1 -3
- package/dist/components/date-picker/content.d.cts +1 -2
- package/dist/components/date-picker/content.d.ts +1 -2
- package/dist/components/date-picker/content.js +1 -3
- package/dist/components/date-picker/date-picker.cjs +47 -2
- package/dist/components/date-picker/date-picker.d.cts +1 -6
- package/dist/components/date-picker/date-picker.d.ts +1 -6
- package/dist/components/date-picker/date-picker.js +47 -2
- package/dist/components/date-picker/index.cjs +3 -3
- package/dist/components/date-picker/index.js +3 -3
- package/dist/components/date-picker/input.cjs +1 -1
- package/dist/components/date-picker/input.js +1 -1
- package/dist/components/date-picker/primitives.cjs +4 -1
- package/dist/components/date-picker/primitives.d.cts +1 -4
- package/dist/components/date-picker/primitives.d.ts +1 -4
- package/dist/components/date-picker/primitives.js +4 -1
- package/dist/components/date-picker/range-input.cjs +2 -2
- package/dist/components/date-picker/range-input.js +2 -2
- package/dist/components/field/status-indicator.cjs +1 -2
- package/dist/components/field/status-indicator.d.cts +1 -1
- package/dist/components/field/status-indicator.d.ts +1 -1
- package/dist/components/field/status-indicator.js +1 -2
- package/dist/components/file-upload/file-status.cjs +26 -43
- package/dist/components/file-upload/file-status.js +27 -44
- package/dist/components/file-upload/file-uploader.cjs +21 -47
- package/dist/components/file-upload/file-uploader.d.cts +7 -10
- package/dist/components/file-upload/file-uploader.d.ts +7 -10
- package/dist/components/file-upload/file-uploader.js +22 -48
- package/dist/components/file-upload/helpers.cjs +17 -0
- package/dist/components/file-upload/helpers.d.cts +16 -0
- package/dist/components/file-upload/helpers.d.ts +16 -0
- package/dist/components/file-upload/helpers.js +13 -0
- package/dist/components/file-upload/img-preview.cjs +30 -0
- package/dist/components/file-upload/img-preview.d.cts +2 -0
- package/dist/components/file-upload/img-preview.d.ts +2 -0
- package/dist/components/file-upload/img-preview.js +26 -0
- package/dist/components/file-upload/index.cjs +24 -0
- package/dist/components/file-upload/index.d.cts +4 -0
- package/dist/components/file-upload/index.d.ts +4 -0
- package/dist/components/file-upload/index.js +4 -0
- package/dist/components/file-upload/parts.cjs +28 -0
- package/dist/components/file-upload/parts.d.cts +86 -0
- package/dist/components/file-upload/parts.d.ts +86 -0
- package/dist/components/file-upload/parts.js +24 -0
- package/dist/components/file-upload/primitives.cjs +81 -0
- package/dist/components/file-upload/primitives.d.cts +45 -0
- package/dist/components/file-upload/primitives.d.ts +45 -0
- package/dist/components/file-upload/primitives.js +61 -0
- package/dist/components/file-upload/utils.cjs +18 -0
- package/dist/components/file-upload/utils.d.cts +7 -0
- package/dist/components/file-upload/utils.d.ts +7 -0
- package/dist/components/file-upload/utils.js +14 -0
- package/dist/components/select/select.cjs +6 -3
- package/dist/components/select/select.d.cts +1 -3
- package/dist/components/select/select.d.ts +1 -3
- package/dist/components/select/select.js +6 -3
- package/dist/context/confirm-modal.cjs +3 -1
- package/dist/context/confirm-modal.d.cts +2 -1
- package/dist/context/confirm-modal.d.ts +2 -1
- package/dist/context/confirm-modal.js +3 -1
- package/dist/context/prompt-modal.cjs +4 -2
- package/dist/context/prompt-modal.d.cts +2 -1
- package/dist/context/prompt-modal.d.ts +2 -1
- package/dist/context/prompt-modal.js +5 -3
- package/dist/index.cjs +163 -131
- package/dist/index.client.d.cts +1 -1
- package/dist/index.client.d.ts +1 -1
- package/dist/index.js +8 -4
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-clear-trigger.cjs +19 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-clear-trigger.js +15 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-context.cjs +10 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-context.js +6 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-dropzone.cjs +22 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-dropzone.js +18 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-hidden-input.cjs +21 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-hidden-input.js +17 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-delete-trigger.cjs +23 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-delete-trigger.js +19 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-group.cjs +23 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-group.js +19 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-name.cjs +22 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-name.js +18 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-preview-image.cjs +28 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-preview-image.js +24 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-preview.cjs +22 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-preview.js +18 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-size-text.cjs +22 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-size-text.js +18 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item.cjs +26 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item.js +22 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-label.cjs +19 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-label.js +15 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-root.cjs +47 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-root.js +43 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-trigger.cjs +19 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-trigger.js +15 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload-context.cjs +15 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload-context.js +10 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload-item-group-props-context.cjs +15 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload-item-group-props-context.js +10 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload-item-props-context.cjs +15 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload-item-props-context.js +10 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload.cjs +36 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload.js +32 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.0/node_modules/@internationalized/date/src/CalendarDate.js +3 -3
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.0/node_modules/@internationalized/date/src/conversion.js +1 -1
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.0/node_modules/@internationalized/date/src/queries.js +1 -1
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/CalendarDate.cjs +218 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/CalendarDate.js +212 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/DateFormatter.cjs +135 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/DateFormatter.js +131 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/calendars/GregorianCalendar.cjs +101 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/calendars/GregorianCalendar.js +93 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/conversion.cjs +200 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/conversion.js +186 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/manipulation.cjs +352 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/manipulation.js +336 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/queries.cjs +39 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/queries.js +30 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/string.cjs +44 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/string.js +37 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/utils.cjs +10 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/utils.js +6 -0
- package/dist/node_modules/.pnpm/@zag-js_file-upload@1.31.1/node_modules/@zag-js/file-upload/dist/index.cjs +649 -0
- package/dist/node_modules/.pnpm/@zag-js_file-upload@1.31.1/node_modules/@zag-js/file-upload/dist/index.js +643 -0
- package/dist/node_modules/.pnpm/@zag-js_file-utils@1.31.1/node_modules/@zag-js/file-utils/dist/index.cjs +147 -0
- package/dist/node_modules/.pnpm/@zag-js_file-utils@1.31.1/node_modules/@zag-js/file-utils/dist/index.js +138 -0
- package/dist/node_modules/.pnpm/@zag-js_i18n-utils@1.31.1/node_modules/@zag-js/i18n-utils/dist/index.cjs +53 -0
- package/dist/node_modules/.pnpm/@zag-js_i18n-utils@1.31.1/node_modules/@zag-js/i18n-utils/dist/index.js +48 -0
- package/dist/node_modules/.pnpm/@zag-js_utils@1.31.1/node_modules/@zag-js/utils/dist/index.cjs +9 -0
- package/dist/node_modules/.pnpm/@zag-js_utils@1.31.1/node_modules/@zag-js/utils/dist/index.js +9 -1
- package/package.json +7 -7
- package/src/components/combobox/combobox.tsx +7 -13
- package/src/components/cta-dialog/provider.tsx +8 -3
- package/src/components/date-picker/calendar.tsx +10 -9
- package/src/components/date-picker/content.tsx +4 -11
- package/src/components/date-picker/date-picker.tsx +55 -18
- package/src/components/date-picker/input.tsx +1 -1
- package/src/components/date-picker/primitives.tsx +4 -1
- package/src/components/date-picker/range-input.tsx +2 -2
- package/src/components/field/status-indicator.tsx +2 -5
- package/src/components/file-upload/file-status.tsx +14 -21
- package/src/components/file-upload/file-uploader.tsx +37 -49
- package/src/components/file-upload/helpers.ts +28 -0
- package/src/components/file-upload/img-preview.tsx +41 -0
- package/src/components/file-upload/index.ts +4 -0
- package/src/components/file-upload/parts.tsx +126 -0
- package/src/components/file-upload/primitives.ts +156 -0
- package/src/components/file-upload/utils.ts +20 -0
- package/src/components/select/select.tsx +11 -12
- package/src/context/confirm-modal.tsx +7 -2
- package/src/context/prompt-modal.tsx +9 -4
- package/src/index.client.ts +2 -0
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const cerberus = require('../../context/cerberus.cjs');
|
|
7
7
|
const index = require('../../utils/index.cjs');
|
|
8
|
-
const portal = require('../portal/portal.cjs');
|
|
9
8
|
const show = require('../show/show.cjs');
|
|
10
9
|
const parts = require('./parts.cjs');
|
|
11
10
|
const primitives = require('./primitives.cjs');
|
|
@@ -33,7 +32,7 @@ function Combobox(props) {
|
|
|
33
32
|
/* @__PURE__ */ jsxRuntime.jsx(parts.ComboboxParts.ClearTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {}) }),
|
|
34
33
|
/* @__PURE__ */ jsxRuntime.jsx(parts.ComboboxParts.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectArrow, {}) })
|
|
35
34
|
] }),
|
|
36
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
35
|
+
/* @__PURE__ */ jsxRuntime.jsx(parts.ComboboxParts.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsx(parts.ComboboxParts.Content, { size: rootProps.size, children: elProps.children }) })
|
|
37
36
|
] });
|
|
38
37
|
}
|
|
39
38
|
|
|
@@ -13,9 +13,7 @@ export interface ComboboxProps extends ComboboxRootProps<SelectCollectionItem>,
|
|
|
13
13
|
*/
|
|
14
14
|
startIcon?: FieldInputElProps['startIcon'];
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
* to render the Select dropdown in a specific context, such as a modal.
|
|
18
|
-
* @default document.body
|
|
16
|
+
* @deprecated - this is no longer needed
|
|
19
17
|
*/
|
|
20
18
|
container?: RefObject<HTMLElement | null>;
|
|
21
19
|
}
|
|
@@ -13,9 +13,7 @@ export interface ComboboxProps extends ComboboxRootProps<SelectCollectionItem>,
|
|
|
13
13
|
*/
|
|
14
14
|
startIcon?: FieldInputElProps['startIcon'];
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
* to render the Select dropdown in a specific context, such as a modal.
|
|
18
|
-
* @default document.body
|
|
16
|
+
* @deprecated - this is no longer needed
|
|
19
17
|
*/
|
|
20
18
|
container?: RefObject<HTMLElement | null>;
|
|
21
19
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useCerberusContext } from '../../context/cerberus.js';
|
|
3
3
|
import { splitProps } from '../../utils/index.js';
|
|
4
|
-
import { Portal } from '../portal/portal.js';
|
|
5
4
|
import { Show } from '../show/show.js';
|
|
6
5
|
import { ComboboxParts } from './parts.js';
|
|
7
6
|
import { ComboboxStartIcon } from './primitives.js';
|
|
@@ -29,7 +28,7 @@ function Combobox(props) {
|
|
|
29
28
|
/* @__PURE__ */ jsx(ComboboxParts.ClearTrigger, { children: /* @__PURE__ */ jsx(CloseIcon, {}) }),
|
|
30
29
|
/* @__PURE__ */ jsx(ComboboxParts.Trigger, { children: /* @__PURE__ */ jsx(SelectArrow, {}) })
|
|
31
30
|
] }),
|
|
32
|
-
/* @__PURE__ */ jsx(
|
|
31
|
+
/* @__PURE__ */ jsx(ComboboxParts.Positioner, { children: /* @__PURE__ */ jsx(ComboboxParts.Content, { size: rootProps.size, children: elProps.children }) })
|
|
33
32
|
] });
|
|
34
33
|
}
|
|
35
34
|
|
|
@@ -17,6 +17,7 @@ const context = require('./context.cjs');
|
|
|
17
17
|
const triggerItem = require('./trigger-item.cjs');
|
|
18
18
|
|
|
19
19
|
function CTAModal(props) {
|
|
20
|
+
const { children, ...rootProps } = props;
|
|
20
21
|
const [open, setOpen] = React.useState(false);
|
|
21
22
|
const [content, setContent] = React.useState(null);
|
|
22
23
|
const confirmIcon = content?.icon;
|
|
@@ -46,7 +47,7 @@ function CTAModal(props) {
|
|
|
46
47
|
[handleShow]
|
|
47
48
|
);
|
|
48
49
|
return /* @__PURE__ */ jsxRuntime.jsxs(context.CTAModalContext.Provider, { value, children: [
|
|
49
|
-
|
|
50
|
+
children,
|
|
50
51
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
51
52
|
primitives.DialogProvider,
|
|
52
53
|
{
|
|
@@ -54,6 +55,7 @@ function CTAModal(props) {
|
|
|
54
55
|
open,
|
|
55
56
|
onOpenChange: (e) => setOpen(e.open),
|
|
56
57
|
unmountOnExit: true,
|
|
58
|
+
...rootProps,
|
|
57
59
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
58
60
|
dialog.Dialog,
|
|
59
61
|
{
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { DialogRootProps } from '../dialog/index';
|
|
2
3
|
import { CTAModalValue } from './context';
|
|
3
4
|
/**
|
|
4
5
|
* This module provides the provider and hook for the cta modal.
|
|
@@ -36,5 +37,5 @@ import { CTAModalValue } from './context';
|
|
|
36
37
|
* }, [cta])
|
|
37
38
|
* ```
|
|
38
39
|
*/
|
|
39
|
-
export declare function CTAModal(props: PropsWithChildren<
|
|
40
|
+
export declare function CTAModal(props: PropsWithChildren<DialogRootProps>): import("react/jsx-runtime").JSX.Element;
|
|
40
41
|
export declare function useCTAModal(): CTAModalValue;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { DialogRootProps } from '../dialog/index';
|
|
2
3
|
import { CTAModalValue } from './context';
|
|
3
4
|
/**
|
|
4
5
|
* This module provides the provider and hook for the cta modal.
|
|
@@ -36,5 +37,5 @@ import { CTAModalValue } from './context';
|
|
|
36
37
|
* }, [cta])
|
|
37
38
|
* ```
|
|
38
39
|
*/
|
|
39
|
-
export declare function CTAModal(props: PropsWithChildren<
|
|
40
|
+
export declare function CTAModal(props: PropsWithChildren<DialogRootProps>): import("react/jsx-runtime").JSX.Element;
|
|
40
41
|
export declare function useCTAModal(): CTAModalValue;
|
|
@@ -13,6 +13,7 @@ import { CTAModalContext } from './context.js';
|
|
|
13
13
|
import { TriggerItem } from './trigger-item.js';
|
|
14
14
|
|
|
15
15
|
function CTAModal(props) {
|
|
16
|
+
const { children, ...rootProps } = props;
|
|
16
17
|
const [open, setOpen] = useState(false);
|
|
17
18
|
const [content, setContent] = useState(null);
|
|
18
19
|
const confirmIcon = content?.icon;
|
|
@@ -42,7 +43,7 @@ function CTAModal(props) {
|
|
|
42
43
|
[handleShow]
|
|
43
44
|
);
|
|
44
45
|
return /* @__PURE__ */ jsxs(CTAModalContext.Provider, { value, children: [
|
|
45
|
-
|
|
46
|
+
children,
|
|
46
47
|
/* @__PURE__ */ jsx(
|
|
47
48
|
DialogProvider,
|
|
48
49
|
{
|
|
@@ -50,6 +51,7 @@ function CTAModal(props) {
|
|
|
50
51
|
open,
|
|
51
52
|
onOpenChange: (e) => setOpen(e.open),
|
|
52
53
|
unmountOnExit: true,
|
|
54
|
+
...rootProps,
|
|
53
55
|
children: /* @__PURE__ */ jsxs(
|
|
54
56
|
Dialog,
|
|
55
57
|
{
|
|
@@ -4,13 +4,15 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const index = require('../../utils/index.cjs');
|
|
7
8
|
const content = require('./content.cjs');
|
|
8
9
|
const dayView = require('./day-view.cjs');
|
|
9
10
|
const monthView = require('./month-view.cjs');
|
|
10
11
|
const yearView = require('./year-view.cjs');
|
|
11
12
|
|
|
12
13
|
function DatePickerCalendar(props) {
|
|
13
|
-
|
|
14
|
+
const [, contentProps] = index.splitProps(props, ["withModal", "container"]);
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(content.DatePickerContent, { ...contentProps, children: [
|
|
14
16
|
/* @__PURE__ */ jsxRuntime.jsx(dayView.DatePickerDayView, {}),
|
|
15
17
|
/* @__PURE__ */ jsxRuntime.jsx(monthView.DatePickerMonthView, { view: "month" }),
|
|
16
18
|
/* @__PURE__ */ jsxRuntime.jsx(yearView.DatePickerYearView, { view: "year" })
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
+
import { DatePickerContentProps } from './primitives';
|
|
2
3
|
/**
|
|
3
4
|
* This module contains an abstraction of the DatePicker component.
|
|
4
5
|
* @module 'date-picker/calendar'
|
|
5
6
|
*/
|
|
6
7
|
export interface DatePickerCalendarProps {
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
-
* content in a modal. This is an alternative to using the `container` prop
|
|
10
|
-
* which provides the context to the Portal instead.
|
|
11
|
-
* @default false
|
|
9
|
+
* @deprecated - this is no longer needed.
|
|
12
10
|
*/
|
|
13
11
|
withModal?: boolean;
|
|
14
12
|
/**
|
|
15
|
-
*
|
|
16
|
-
* to render the DatePicker content in a specific context, such as a modal.
|
|
17
|
-
* @default document.body
|
|
13
|
+
* @deprecated - this is no longer needed.
|
|
18
14
|
*/
|
|
19
15
|
container?: RefObject<HTMLElement | null>;
|
|
20
16
|
}
|
|
@@ -33,4 +29,4 @@ export interface DatePickerCalendarProps {
|
|
|
33
29
|
* </Field>
|
|
34
30
|
* ```
|
|
35
31
|
*/
|
|
36
|
-
export declare function DatePickerCalendar(props: DatePickerCalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function DatePickerCalendar(props: DatePickerCalendarProps & DatePickerContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
|
+
import { DatePickerContentProps } from './primitives';
|
|
2
3
|
/**
|
|
3
4
|
* This module contains an abstraction of the DatePicker component.
|
|
4
5
|
* @module 'date-picker/calendar'
|
|
5
6
|
*/
|
|
6
7
|
export interface DatePickerCalendarProps {
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
-
* content in a modal. This is an alternative to using the `container` prop
|
|
10
|
-
* which provides the context to the Portal instead.
|
|
11
|
-
* @default false
|
|
9
|
+
* @deprecated - this is no longer needed.
|
|
12
10
|
*/
|
|
13
11
|
withModal?: boolean;
|
|
14
12
|
/**
|
|
15
|
-
*
|
|
16
|
-
* to render the DatePicker content in a specific context, such as a modal.
|
|
17
|
-
* @default document.body
|
|
13
|
+
* @deprecated - this is no longer needed.
|
|
18
14
|
*/
|
|
19
15
|
container?: RefObject<HTMLElement | null>;
|
|
20
16
|
}
|
|
@@ -33,4 +29,4 @@ export interface DatePickerCalendarProps {
|
|
|
33
29
|
* </Field>
|
|
34
30
|
* ```
|
|
35
31
|
*/
|
|
36
|
-
export declare function DatePickerCalendar(props: DatePickerCalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function DatePickerCalendar(props: DatePickerCalendarProps & DatePickerContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { splitProps } from '../../utils/index.js';
|
|
3
4
|
import { DatePickerContent } from './content.js';
|
|
4
5
|
import { DatePickerDayView } from './day-view.js';
|
|
5
6
|
import { DatePickerMonthView } from './month-view.js';
|
|
6
7
|
import { DatePickerYearView } from './year-view.js';
|
|
7
8
|
|
|
8
9
|
function DatePickerCalendar(props) {
|
|
9
|
-
|
|
10
|
+
const [, contentProps] = splitProps(props, ["withModal", "container"]);
|
|
11
|
+
return /* @__PURE__ */ jsxs(DatePickerContent, { ...contentProps, children: [
|
|
10
12
|
/* @__PURE__ */ jsx(DatePickerDayView, {}),
|
|
11
13
|
/* @__PURE__ */ jsx(DatePickerMonthView, { view: "month" }),
|
|
12
14
|
/* @__PURE__ */ jsx(DatePickerYearView, { view: "year" })
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const portal = require('../portal/portal.cjs');
|
|
8
7
|
const parts = require('./parts.cjs');
|
|
9
8
|
|
|
10
9
|
function DatePickerContent(props) {
|
|
11
|
-
|
|
12
|
-
return /* @__PURE__ */ jsxRuntime.jsx(portal.Portal, { disabled: withModal ?? false, container, children: /* @__PURE__ */ jsxRuntime.jsx(parts.DatePickerParts.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsx(parts.DatePickerParts.Content, { ...contentProps }) }) });
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(parts.DatePickerParts.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsx(parts.DatePickerParts.Content, { ...props }) });
|
|
13
11
|
}
|
|
14
12
|
|
|
15
13
|
exports.DatePickerContent = DatePickerContent;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DatePickerCalendarProps } from './calendar';
|
|
2
1
|
import { DatePickerContentProps } from './primitives';
|
|
3
2
|
/**
|
|
4
3
|
* This private module contains an abstraction of the DatePickerContent
|
|
@@ -10,4 +9,4 @@ import { DatePickerContentProps } from './primitives';
|
|
|
10
9
|
* primitives.
|
|
11
10
|
* @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
12
11
|
*/
|
|
13
|
-
export declare function DatePickerContent(props: DatePickerContentProps
|
|
12
|
+
export declare function DatePickerContent(props: DatePickerContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DatePickerCalendarProps } from './calendar';
|
|
2
1
|
import { DatePickerContentProps } from './primitives';
|
|
3
2
|
/**
|
|
4
3
|
* This private module contains an abstraction of the DatePickerContent
|
|
@@ -10,4 +9,4 @@ import { DatePickerContentProps } from './primitives';
|
|
|
10
9
|
* primitives.
|
|
11
10
|
* @definition [datePicker docs](https://cerberus.digitalu.design/react/date-picker)
|
|
12
11
|
*/
|
|
13
|
-
export declare function DatePickerContent(props: DatePickerContentProps
|
|
12
|
+
export declare function DatePickerContent(props: DatePickerContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { Portal } from '../portal/portal.js';
|
|
4
3
|
import { DatePickerParts } from './parts.js';
|
|
5
4
|
|
|
6
5
|
function DatePickerContent(props) {
|
|
7
|
-
|
|
8
|
-
return /* @__PURE__ */ jsx(Portal, { disabled: withModal ?? false, container, children: /* @__PURE__ */ jsx(DatePickerParts.Positioner, { children: /* @__PURE__ */ jsx(DatePickerParts.Content, { ...contentProps }) }) });
|
|
6
|
+
return /* @__PURE__ */ jsx(DatePickerParts.Positioner, { children: /* @__PURE__ */ jsx(DatePickerParts.Content, { ...props }) });
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
export { DatePickerContent };
|
|
@@ -4,17 +4,62 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const parts = require('./parts.cjs');
|
|
7
|
+
const CalendarDate = require('../../node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/CalendarDate.cjs');
|
|
7
8
|
|
|
9
|
+
const FULL_DATE_REGEX = /^(\d{1,2})[\s/](\d{1,2})[\s/](\d{4})$/;
|
|
10
|
+
const PARTIAL_DATE_REGEX = /^(\d{1,2})[\s/](\d{1,2})$/;
|
|
11
|
+
const MONTH_REGEX = /^(\d{1,2})$/;
|
|
8
12
|
function DatePicker(props) {
|
|
9
13
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
14
|
parts.DatePickerParts.Root,
|
|
11
15
|
{
|
|
12
|
-
|
|
16
|
+
format: handleFormat,
|
|
17
|
+
parse,
|
|
13
18
|
positioning: {
|
|
14
19
|
placement: "bottom-start"
|
|
15
|
-
}
|
|
20
|
+
},
|
|
21
|
+
...props
|
|
16
22
|
}
|
|
17
23
|
);
|
|
18
24
|
}
|
|
25
|
+
function parse(value) {
|
|
26
|
+
const fullMatch = value.match(FULL_DATE_REGEX);
|
|
27
|
+
if (fullMatch) {
|
|
28
|
+
const [, month, day, year] = fullMatch.map(Number);
|
|
29
|
+
try {
|
|
30
|
+
return new CalendarDate.CalendarDate(year, month, day);
|
|
31
|
+
} catch {
|
|
32
|
+
return void 0;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const partialMatch = value.match(PARTIAL_DATE_REGEX);
|
|
36
|
+
if (partialMatch) {
|
|
37
|
+
const [, month, day] = partialMatch.map(Number);
|
|
38
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
39
|
+
try {
|
|
40
|
+
return new CalendarDate.CalendarDate(currentYear, month, day);
|
|
41
|
+
} catch {
|
|
42
|
+
return void 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const monthMatch = value.match(MONTH_REGEX);
|
|
46
|
+
if (monthMatch) {
|
|
47
|
+
const [, month] = monthMatch.map(Number);
|
|
48
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
49
|
+
try {
|
|
50
|
+
if (month < 1 || month > 12) return void 0;
|
|
51
|
+
return new CalendarDate.CalendarDate(currentYear, month, 1);
|
|
52
|
+
} catch {
|
|
53
|
+
return void 0;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return void 0;
|
|
57
|
+
}
|
|
58
|
+
function handleFormat(date) {
|
|
59
|
+
const day = date.day.toString().padStart(2, "0");
|
|
60
|
+
const month = date.month.toString().padStart(2, "0");
|
|
61
|
+
const year = date.year.toString();
|
|
62
|
+
return `${month} ${day} ${year}`;
|
|
63
|
+
}
|
|
19
64
|
|
|
20
65
|
exports.DatePicker = DatePicker;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { DatePickerRootProps } from './primitives';
|
|
2
|
-
/**
|
|
3
|
-
* This module contains an abstraction of the DatePicker.Root primitive.
|
|
4
|
-
* @module 'date-picker/root'
|
|
5
|
-
*/
|
|
6
2
|
/**
|
|
7
3
|
* DatePicker component is an abstraction of the DatePickerRoot primitive which
|
|
8
4
|
* is the context provider to the DatePicker.
|
|
9
|
-
* @description [Cerberus Docs](https://cerberus.digitalu.design/
|
|
10
|
-
* @description [Ark Docs](https://ark-ui.com/react/docs/components/date-picker)
|
|
5
|
+
* @description [Cerberus Docs](https://cerberus.digitalu.design/docs/components/date-picker)
|
|
11
6
|
*/
|
|
12
7
|
export declare function DatePicker(props: DatePickerRootProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { DatePickerRootProps } from './primitives';
|
|
2
|
-
/**
|
|
3
|
-
* This module contains an abstraction of the DatePicker.Root primitive.
|
|
4
|
-
* @module 'date-picker/root'
|
|
5
|
-
*/
|
|
6
2
|
/**
|
|
7
3
|
* DatePicker component is an abstraction of the DatePickerRoot primitive which
|
|
8
4
|
* is the context provider to the DatePicker.
|
|
9
|
-
* @description [Cerberus Docs](https://cerberus.digitalu.design/
|
|
10
|
-
* @description [Ark Docs](https://ark-ui.com/react/docs/components/date-picker)
|
|
5
|
+
* @description [Cerberus Docs](https://cerberus.digitalu.design/docs/components/date-picker)
|
|
11
6
|
*/
|
|
12
7
|
export declare function DatePicker(props: DatePickerRootProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +1,61 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { DatePickerParts } from './parts.js';
|
|
3
|
+
import { CalendarDate } from '../../node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/CalendarDate.js';
|
|
3
4
|
|
|
5
|
+
const FULL_DATE_REGEX = /^(\d{1,2})[\s/](\d{1,2})[\s/](\d{4})$/;
|
|
6
|
+
const PARTIAL_DATE_REGEX = /^(\d{1,2})[\s/](\d{1,2})$/;
|
|
7
|
+
const MONTH_REGEX = /^(\d{1,2})$/;
|
|
4
8
|
function DatePicker(props) {
|
|
5
9
|
return /* @__PURE__ */ jsx(
|
|
6
10
|
DatePickerParts.Root,
|
|
7
11
|
{
|
|
8
|
-
|
|
12
|
+
format: handleFormat,
|
|
13
|
+
parse,
|
|
9
14
|
positioning: {
|
|
10
15
|
placement: "bottom-start"
|
|
11
|
-
}
|
|
16
|
+
},
|
|
17
|
+
...props
|
|
12
18
|
}
|
|
13
19
|
);
|
|
14
20
|
}
|
|
21
|
+
function parse(value) {
|
|
22
|
+
const fullMatch = value.match(FULL_DATE_REGEX);
|
|
23
|
+
if (fullMatch) {
|
|
24
|
+
const [, month, day, year] = fullMatch.map(Number);
|
|
25
|
+
try {
|
|
26
|
+
return new CalendarDate(year, month, day);
|
|
27
|
+
} catch {
|
|
28
|
+
return void 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const partialMatch = value.match(PARTIAL_DATE_REGEX);
|
|
32
|
+
if (partialMatch) {
|
|
33
|
+
const [, month, day] = partialMatch.map(Number);
|
|
34
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
35
|
+
try {
|
|
36
|
+
return new CalendarDate(currentYear, month, day);
|
|
37
|
+
} catch {
|
|
38
|
+
return void 0;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const monthMatch = value.match(MONTH_REGEX);
|
|
42
|
+
if (monthMatch) {
|
|
43
|
+
const [, month] = monthMatch.map(Number);
|
|
44
|
+
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
45
|
+
try {
|
|
46
|
+
if (month < 1 || month > 12) return void 0;
|
|
47
|
+
return new CalendarDate(currentYear, month, 1);
|
|
48
|
+
} catch {
|
|
49
|
+
return void 0;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return void 0;
|
|
53
|
+
}
|
|
54
|
+
function handleFormat(date) {
|
|
55
|
+
const day = date.day.toString().padStart(2, "0");
|
|
56
|
+
const month = date.month.toString().padStart(2, "0");
|
|
57
|
+
const year = date.year.toString();
|
|
58
|
+
return `${month} ${day} ${year}`;
|
|
59
|
+
}
|
|
15
60
|
|
|
16
61
|
export { DatePicker };
|
|
@@ -9,9 +9,9 @@ const input = require('./input.cjs');
|
|
|
9
9
|
const rangeInput = require('./range-input.cjs');
|
|
10
10
|
const calendar = require('./calendar.cjs');
|
|
11
11
|
const index = require('../../node_modules/.pnpm/@zag-js_date-picker@1.31.1_@internationalized_date@3.10.0/node_modules/@zag-js/date-picker/dist/index.cjs');
|
|
12
|
-
const CalendarDate = require('../../node_modules/.pnpm/@internationalized_date@3.10.
|
|
13
|
-
const queries = require('../../node_modules/.pnpm/@internationalized_date@3.10.
|
|
14
|
-
const DateFormatter = require('../../node_modules/.pnpm/@internationalized_date@3.10.
|
|
12
|
+
const CalendarDate = require('../../node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/CalendarDate.cjs');
|
|
13
|
+
const queries = require('../../node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/queries.cjs');
|
|
14
|
+
const DateFormatter = require('../../node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/DateFormatter.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -5,6 +5,6 @@ export { DatePickerInput } from './input.js';
|
|
|
5
5
|
export { RangePickerInput } from './range-input.js';
|
|
6
6
|
export { DatePickerCalendar } from './calendar.js';
|
|
7
7
|
export { parse as parseDate } from '../../node_modules/.pnpm/@zag-js_date-picker@1.31.1_@internationalized_date@3.10.0/node_modules/@zag-js/date-picker/dist/index.js';
|
|
8
|
-
export { CalendarDate } from '../../node_modules/.pnpm/@internationalized_date@3.10.
|
|
9
|
-
export { getLocalTimeZone, today } from '../../node_modules/.pnpm/@internationalized_date@3.10.
|
|
10
|
-
export { DateFormatter } from '../../node_modules/.pnpm/@internationalized_date@3.10.
|
|
8
|
+
export { CalendarDate } from '../../node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/CalendarDate.js';
|
|
9
|
+
export { getLocalTimeZone, today } from '../../node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/queries.js';
|
|
10
|
+
export { DateFormatter } from '../../node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/DateFormatter.js';
|
|
@@ -57,7 +57,10 @@ const DatePickerTableCellTrigger = withSlotRecipe(
|
|
|
57
57
|
);
|
|
58
58
|
const DatePickerRoot = withNoRecipe(datePickerRoot.DatePickerRoot);
|
|
59
59
|
const DatePickerClearTrigger = withNoRecipe(datePickerClearTrigger.DatePickerClearTrigger);
|
|
60
|
-
const DatePickerPositioner =
|
|
60
|
+
const DatePickerPositioner = withSlotRecipe(
|
|
61
|
+
datePickerPositioner.DatePickerPositioner,
|
|
62
|
+
"positioner"
|
|
63
|
+
);
|
|
61
64
|
const DatePickerYearSelect = withNoRecipe(datePickerYearSelect.DatePickerYearSelect);
|
|
62
65
|
const DatePickerMonthSelect = withNoRecipe(datePickerMonthSelect.DatePickerMonthSelect);
|
|
63
66
|
const DatePickerView = withNoRecipe(datePickerView.DatePickerView);
|
|
@@ -79,10 +79,7 @@ export declare const DatePickerClearTrigger: {
|
|
|
79
79
|
* styles.
|
|
80
80
|
*/
|
|
81
81
|
export type DatePickerPositionerProps = CerberusPrimitiveProps<ArkDatePickerPositionerProps>;
|
|
82
|
-
export declare const DatePickerPositioner:
|
|
83
|
-
(props: CerberusPrimitiveProps<DatePicker.PositionerProps & RefAttributes<HTMLDivElement>>): import("react/jsx-runtime").JSX.Element;
|
|
84
|
-
displayName: string;
|
|
85
|
-
};
|
|
82
|
+
export declare const DatePickerPositioner: ForwardRefExoticComponent<Omit<CerberusPrimitiveProps<DatePicker.PositionerProps & RefAttributes<HTMLDivElement>>, "ref"> & RefAttributes<unknown>>;
|
|
86
83
|
/**
|
|
87
84
|
* The year select input component of the DatePicker. This primitive has no
|
|
88
85
|
* Cerberus styles.
|
|
@@ -79,10 +79,7 @@ export declare const DatePickerClearTrigger: {
|
|
|
79
79
|
* styles.
|
|
80
80
|
*/
|
|
81
81
|
export type DatePickerPositionerProps = CerberusPrimitiveProps<ArkDatePickerPositionerProps>;
|
|
82
|
-
export declare const DatePickerPositioner:
|
|
83
|
-
(props: CerberusPrimitiveProps<DatePicker.PositionerProps & RefAttributes<HTMLDivElement>>): import("react/jsx-runtime").JSX.Element;
|
|
84
|
-
displayName: string;
|
|
85
|
-
};
|
|
82
|
+
export declare const DatePickerPositioner: ForwardRefExoticComponent<Omit<CerberusPrimitiveProps<DatePicker.PositionerProps & RefAttributes<HTMLDivElement>>, "ref"> & RefAttributes<unknown>>;
|
|
86
83
|
/**
|
|
87
84
|
* The year select input component of the DatePicker. This primitive has no
|
|
88
85
|
* Cerberus styles.
|
|
@@ -53,7 +53,10 @@ const DatePickerTableCellTrigger = withSlotRecipe(
|
|
|
53
53
|
);
|
|
54
54
|
const DatePickerRoot = withNoRecipe(DatePickerRoot$1);
|
|
55
55
|
const DatePickerClearTrigger = withNoRecipe(DatePickerClearTrigger$1);
|
|
56
|
-
const DatePickerPositioner =
|
|
56
|
+
const DatePickerPositioner = withSlotRecipe(
|
|
57
|
+
DatePickerPositioner$1,
|
|
58
|
+
"positioner"
|
|
59
|
+
);
|
|
57
60
|
const DatePickerYearSelect = withNoRecipe(DatePickerYearSelect$1);
|
|
58
61
|
const DatePickerMonthSelect = withNoRecipe(DatePickerMonthSelect$1);
|
|
59
62
|
const DatePickerView = withNoRecipe(DatePickerView$1);
|
|
@@ -15,7 +15,7 @@ function RangePickerInput(props) {
|
|
|
15
15
|
{
|
|
16
16
|
...props,
|
|
17
17
|
"data-range-input": true,
|
|
18
|
-
placeholder: props.placeholder ?? "DD
|
|
18
|
+
placeholder: props.placeholder ?? "MM DD YYYY",
|
|
19
19
|
maxLength: 11,
|
|
20
20
|
index: 0
|
|
21
21
|
}
|
|
@@ -26,7 +26,7 @@ function RangePickerInput(props) {
|
|
|
26
26
|
...props,
|
|
27
27
|
"data-range-input": true,
|
|
28
28
|
"data-range-end-input": true,
|
|
29
|
-
placeholder: props.placeholder ?? "DD
|
|
29
|
+
placeholder: props.placeholder ?? "MM DD YYYY",
|
|
30
30
|
maxLength: 11,
|
|
31
31
|
index: 1
|
|
32
32
|
}
|
|
@@ -11,7 +11,7 @@ function RangePickerInput(props) {
|
|
|
11
11
|
{
|
|
12
12
|
...props,
|
|
13
13
|
"data-range-input": true,
|
|
14
|
-
placeholder: props.placeholder ?? "DD
|
|
14
|
+
placeholder: props.placeholder ?? "MM DD YYYY",
|
|
15
15
|
maxLength: 11,
|
|
16
16
|
index: 0
|
|
17
17
|
}
|
|
@@ -22,7 +22,7 @@ function RangePickerInput(props) {
|
|
|
22
22
|
...props,
|
|
23
23
|
"data-range-input": true,
|
|
24
24
|
"data-range-end-input": true,
|
|
25
|
-
placeholder: props.placeholder ?? "DD
|
|
25
|
+
placeholder: props.placeholder ?? "MM DD YYYY",
|
|
26
26
|
maxLength: 11,
|
|
27
27
|
index: 1
|
|
28
28
|
}
|
|
@@ -15,8 +15,7 @@ function FieldStatusIndicator(props) {
|
|
|
15
15
|
const styles = recipes.field();
|
|
16
16
|
const { icons } = cerberus.useCerberusContext();
|
|
17
17
|
const { invalid: InvalidIcon } = icons;
|
|
18
|
-
if (
|
|
19
|
-
if (fieldContext.invalid) {
|
|
18
|
+
if (fieldContext?.invalid) {
|
|
20
19
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21
20
|
"span",
|
|
22
21
|
{
|
|
@@ -15,4 +15,4 @@ export interface FieldStatusIndicatorProps extends HTMLAttributes<HTMLSpanElemen
|
|
|
15
15
|
* </FieldRoot>
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
export declare function FieldStatusIndicator(props: FieldStatusIndicatorProps): import("react/jsx-runtime").JSX.Element
|
|
18
|
+
export declare function FieldStatusIndicator(props: FieldStatusIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,4 +15,4 @@ export interface FieldStatusIndicatorProps extends HTMLAttributes<HTMLSpanElemen
|
|
|
15
15
|
* </FieldRoot>
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
export declare function FieldStatusIndicator(props: FieldStatusIndicatorProps): import("react/jsx-runtime").JSX.Element
|
|
18
|
+
export declare function FieldStatusIndicator(props: FieldStatusIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,8 +11,7 @@ function FieldStatusIndicator(props) {
|
|
|
11
11
|
const styles = field();
|
|
12
12
|
const { icons } = useCerberusContext();
|
|
13
13
|
const { invalid: InvalidIcon } = icons;
|
|
14
|
-
if (
|
|
15
|
-
if (fieldContext.invalid) {
|
|
14
|
+
if (fieldContext?.invalid) {
|
|
16
15
|
return /* @__PURE__ */ jsx(
|
|
17
16
|
"span",
|
|
18
17
|
{
|