@drivenets/design-system 0.2.0 → 0.3.0
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/CHANGELOG.md +12 -0
- package/dist/components/ds-alert-banner/ds-alert-banner.d.cts +5 -5
- package/dist/components/ds-alert-banner/ds-alert-banner.d.cts.map +1 -1
- package/dist/components/ds-alert-banner/ds-alert-banner.d.ts +5 -5
- package/dist/components/ds-alert-banner/ds-alert-banner.types.d.cts.map +1 -1
- package/dist/components/ds-button/ds-button.d.cts +2 -2
- package/dist/components/ds-button/ds-button.d.ts +2 -2
- package/dist/components/ds-button/ds-button.d.ts.map +1 -1
- package/dist/components/ds-button/versions/ds-button-legacy/ds-button-legacy.cjs +23 -24
- package/dist/components/ds-button/versions/ds-button-legacy/ds-button-legacy.js +23 -24
- package/dist/components/ds-button/versions/ds-button-legacy/ds-button-legacy.js.map +1 -1
- package/dist/components/ds-button/versions/ds-button-new/ds-button-new.cjs +24 -25
- package/dist/components/ds-button/versions/ds-button-new/ds-button-new.js +24 -25
- package/dist/components/ds-button/versions/ds-button-new/ds-button-new.js.map +1 -1
- package/dist/components/ds-chip-group/hooks/use-chip-row-calculation.cjs +1 -0
- package/dist/components/ds-chip-group/hooks/use-chip-row-calculation.js +1 -0
- package/dist/components/ds-chip-group/hooks/use-chip-row-calculation.js.map +1 -1
- package/dist/components/ds-confirmation/ds-confirmation.d.cts +8 -8
- package/dist/components/ds-confirmation/ds-confirmation.d.ts +8 -8
- package/dist/components/ds-date-input/ds-date-input.d.cts +2 -2
- package/dist/components/ds-date-input/ds-date-input.d.cts.map +1 -1
- package/dist/components/ds-date-input/ds-date-input.d.ts +2 -2
- package/dist/components/ds-date-input/ds-date-input.module.cjs +22 -22
- package/dist/components/ds-date-input/ds-date-input.module.js +22 -22
- package/dist/components/ds-date-input/ds-date-input.module.js.map +1 -1
- package/dist/components/ds-date-input/ds-date-input.utils.cjs +9 -2
- package/dist/components/ds-date-input/ds-date-input.utils.js +9 -2
- package/dist/components/ds-date-input/ds-date-input.utils.js.map +1 -1
- package/dist/components/ds-drawer/ds-drawer.cjs +3 -3
- package/dist/components/ds-drawer/ds-drawer.d.cts +9 -9
- package/dist/components/ds-drawer/ds-drawer.d.cts.map +1 -1
- package/dist/components/ds-drawer/ds-drawer.d.ts +9 -9
- package/dist/components/ds-drawer/ds-drawer.d.ts.map +1 -1
- package/dist/components/ds-drawer/ds-drawer.js +3 -3
- package/dist/components/ds-drawer/ds-drawer.js.map +1 -1
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.types.d.cts +1 -1
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.types.d.cts.map +1 -1
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.types.d.ts +1 -1
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.types.d.ts.map +1 -1
- package/dist/components/ds-expandable-text-input/ds-expandable-text-input.d.cts +2 -2
- package/dist/components/ds-expandable-text-input/ds-expandable-text-input.d.ts +2 -2
- package/dist/components/ds-file-upload/utils/format-file-size.cjs +1 -1
- package/dist/components/ds-file-upload/utils/format-file-size.js +1 -1
- package/dist/components/ds-file-upload/utils/format-file-size.js.map +1 -1
- package/dist/components/ds-form-control/ds-form-control.cjs +2 -5
- package/dist/components/ds-form-control/ds-form-control.d.cts +8 -8
- package/dist/components/ds-form-control/ds-form-control.js +2 -5
- package/dist/components/ds-form-control/ds-form-control.js.map +1 -1
- package/dist/components/ds-loader/ds-loader.cjs +60 -0
- package/dist/components/ds-loader/ds-loader.d.cts +15 -0
- package/dist/components/ds-loader/ds-loader.d.cts.map +1 -0
- package/dist/components/ds-loader/ds-loader.d.ts +15 -0
- package/dist/components/ds-loader/ds-loader.d.ts.map +1 -0
- package/dist/components/ds-loader/ds-loader.js +59 -0
- package/dist/components/ds-loader/ds-loader.js.map +1 -0
- package/dist/components/ds-loader/ds-loader.module.cjs +15 -0
- package/dist/components/ds-loader/ds-loader.module.js +15 -0
- package/dist/components/ds-loader/ds-loader.module.js.map +1 -0
- package/dist/components/ds-loader/ds-loader.types.cjs +6 -0
- package/dist/components/ds-loader/ds-loader.types.d.cts +27 -0
- package/dist/components/ds-loader/ds-loader.types.d.cts.map +1 -0
- package/dist/components/ds-loader/ds-loader.types.d.ts +27 -0
- package/dist/components/ds-loader/ds-loader.types.d.ts.map +1 -0
- package/dist/components/ds-loader/ds-loader.types.js +6 -0
- package/dist/components/ds-loader/ds-loader.types.js.map +1 -0
- package/dist/components/ds-loader/index.cjs +2 -0
- package/dist/components/ds-loader/index.d.ts +2 -0
- package/dist/components/ds-loader/index.js +2 -0
- package/dist/components/ds-loader/pulsing-icon.cjs +37 -0
- package/dist/components/ds-loader/pulsing-icon.js +37 -0
- package/dist/components/ds-loader/pulsing-icon.js.map +1 -0
- package/dist/components/ds-loader/spinner-icon.cjs +74 -0
- package/dist/components/ds-loader/spinner-icon.js +74 -0
- package/dist/components/ds-loader/spinner-icon.js.map +1 -0
- package/dist/components/ds-modal/ds-modal.cjs +2 -2
- package/dist/components/ds-modal/ds-modal.d.cts +8 -8
- package/dist/components/ds-modal/ds-modal.d.cts.map +1 -1
- package/dist/components/ds-modal/ds-modal.d.ts +8 -8
- package/dist/components/ds-modal/ds-modal.d.ts.map +1 -1
- package/dist/components/ds-modal/ds-modal.js +2 -2
- package/dist/components/ds-modal/ds-modal.js.map +1 -1
- package/dist/components/ds-panel/ds-panel.d.cts +2 -2
- package/dist/components/ds-panel/ds-panel.d.ts +2 -2
- package/dist/components/ds-select/ds-select.cjs +1 -1
- package/dist/components/ds-select/ds-select.d.cts +2 -2
- package/dist/components/ds-select/ds-select.d.ts +2 -2
- package/dist/components/ds-select/ds-select.js +1 -1
- package/dist/components/ds-select/ds-select.js.map +1 -1
- package/dist/components/ds-skeleton/ds-skeleton-circle.cjs +59 -0
- package/dist/components/ds-skeleton/ds-skeleton-circle.d.cts +18 -0
- package/dist/components/ds-skeleton/ds-skeleton-circle.d.cts.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton-circle.d.ts +18 -0
- package/dist/components/ds-skeleton/ds-skeleton-circle.d.ts.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton-circle.js +58 -0
- package/dist/components/ds-skeleton/ds-skeleton-circle.js.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton-rect.cjs +61 -0
- package/dist/components/ds-skeleton/ds-skeleton-rect.d.cts +18 -0
- package/dist/components/ds-skeleton/ds-skeleton-rect.d.cts.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton-rect.d.ts +18 -0
- package/dist/components/ds-skeleton/ds-skeleton-rect.d.ts.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton-rect.js +60 -0
- package/dist/components/ds-skeleton/ds-skeleton-rect.js.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton-text.cjs +91 -0
- package/dist/components/ds-skeleton/ds-skeleton-text.d.cts +21 -0
- package/dist/components/ds-skeleton/ds-skeleton-text.d.cts.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton-text.d.ts +21 -0
- package/dist/components/ds-skeleton/ds-skeleton-text.d.ts.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton-text.js +90 -0
- package/dist/components/ds-skeleton/ds-skeleton-text.js.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton.cjs +13 -0
- package/dist/components/ds-skeleton/ds-skeleton.config.cjs +62 -0
- package/dist/components/ds-skeleton/ds-skeleton.config.js +59 -0
- package/dist/components/ds-skeleton/ds-skeleton.config.js.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton.d.cts +32 -0
- package/dist/components/ds-skeleton/ds-skeleton.d.cts.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton.d.ts +32 -0
- package/dist/components/ds-skeleton/ds-skeleton.d.ts.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton.js +14 -0
- package/dist/components/ds-skeleton/ds-skeleton.js.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton.module.cjs +15 -0
- package/dist/components/ds-skeleton/ds-skeleton.module.js +15 -0
- package/dist/components/ds-skeleton/ds-skeleton.module.js.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton.types.cjs +8 -0
- package/dist/components/ds-skeleton/ds-skeleton.types.d.cts +91 -0
- package/dist/components/ds-skeleton/ds-skeleton.types.d.cts.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton.types.d.ts +93 -0
- package/dist/components/ds-skeleton/ds-skeleton.types.d.ts.map +1 -0
- package/dist/components/ds-skeleton/ds-skeleton.types.js +7 -0
- package/dist/components/ds-skeleton/ds-skeleton.types.js.map +1 -0
- package/dist/components/ds-skeleton/index.cjs +5 -0
- package/dist/components/ds-skeleton/index.d.ts +5 -0
- package/dist/components/ds-skeleton/index.js +5 -0
- package/dist/components/ds-smart-tabs/ds-smart-tabs.d.cts +2 -2
- package/dist/components/ds-smart-tabs/ds-smart-tabs.d.ts +2 -2
- package/dist/components/ds-spinner/ds-spinner.cjs +43 -45
- package/dist/components/ds-spinner/ds-spinner.js +43 -45
- package/dist/components/ds-spinner/ds-spinner.js.map +1 -1
- package/dist/components/ds-stepper/components/ds-step-content.d.cts +2 -2
- package/dist/components/ds-stepper/components/ds-step-content.d.ts +2 -2
- package/dist/components/ds-stepper/components/ds-step-next-button.d.cts +2 -2
- package/dist/components/ds-stepper/components/ds-step-next-button.d.ts +2 -2
- package/dist/components/ds-stepper/components/ds-step.d.cts +2 -2
- package/dist/components/ds-stepper/components/ds-step.d.ts +2 -2
- package/dist/components/ds-stepper/ds-stepper.d.cts +2 -2
- package/dist/components/ds-stepper/ds-stepper.d.ts +2 -2
- package/dist/components/ds-table/components/core-table/core-table.cjs +82 -185
- package/dist/components/ds-table/components/core-table/core-table.js +82 -185
- package/dist/components/ds-table/components/core-table/core-table.js.map +1 -1
- package/dist/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.cjs +61 -72
- package/dist/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.js +61 -72
- package/dist/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.js.map +1 -1
- package/dist/components/ds-table/components/ds-table-row/ds-table-row.cjs +80 -81
- package/dist/components/ds-table/components/ds-table-row/ds-table-row.js +80 -81
- package/dist/components/ds-table/components/ds-table-row/ds-table-row.js.map +1 -1
- package/dist/components/ds-table/ds-table.cjs +3 -3
- package/dist/components/ds-table/ds-table.d.cts +2 -3
- package/dist/components/ds-table/ds-table.d.cts.map +1 -1
- package/dist/components/ds-table/ds-table.d.ts +2 -3
- package/dist/components/ds-table/ds-table.d.ts.map +1 -1
- package/dist/components/ds-table/ds-table.js +3 -3
- package/dist/components/ds-table/ds-table.js.map +1 -1
- package/dist/components/ds-table/ds-table.types.d.cts +0 -4
- package/dist/components/ds-table/ds-table.types.d.cts.map +1 -1
- package/dist/components/ds-table/ds-table.types.d.ts +0 -4
- package/dist/components/ds-table/ds-table.types.d.ts.map +1 -1
- package/dist/components/ds-table/filters/adapters/create-dual-range-filter-adapter.cjs +7 -4
- package/dist/components/ds-table/filters/adapters/create-dual-range-filter-adapter.js +7 -4
- package/dist/components/ds-table/filters/adapters/create-dual-range-filter-adapter.js.map +1 -1
- package/dist/components/ds-table/filters/hooks/use-table-filters.cjs +94 -87
- package/dist/components/ds-table/filters/hooks/use-table-filters.js +94 -87
- package/dist/components/ds-table/filters/hooks/use-table-filters.js.map +1 -1
- package/dist/components/ds-tabs/components/ds-tabs-content/ds-tabs-content.cjs +37 -0
- package/dist/components/ds-tabs/components/ds-tabs-content/ds-tabs-content.js +36 -0
- package/dist/components/ds-tabs/components/ds-tabs-content/ds-tabs-content.js.map +1 -0
- package/dist/components/ds-tabs/components/ds-tabs-content/ds-tabs-content.module.cjs +9 -0
- package/dist/components/ds-tabs/components/ds-tabs-content/ds-tabs-content.module.js +9 -0
- package/dist/components/ds-tabs/components/ds-tabs-content/ds-tabs-content.module.js.map +1 -0
- package/dist/components/ds-tabs/components/ds-tabs-content/index.cjs +1 -0
- package/dist/components/ds-tabs/components/ds-tabs-content/index.js +1 -0
- package/dist/components/ds-tabs/components/ds-tabs-list/ds-tabs-indicator.module.cjs +6 -0
- package/dist/components/ds-tabs/components/ds-tabs-list/ds-tabs-indicator.module.js +6 -0
- package/dist/components/ds-tabs/components/ds-tabs-list/ds-tabs-indicator.module.js.map +1 -0
- package/dist/components/ds-tabs/components/ds-tabs-list/ds-tabs-list.cjs +41 -0
- package/dist/components/ds-tabs/components/ds-tabs-list/ds-tabs-list.js +40 -0
- package/dist/components/ds-tabs/components/ds-tabs-list/ds-tabs-list.js.map +1 -0
- package/dist/components/ds-tabs/components/ds-tabs-list/ds-tabs-list.module.cjs +6 -0
- package/dist/components/ds-tabs/components/ds-tabs-list/ds-tabs-list.module.js +6 -0
- package/dist/components/ds-tabs/components/ds-tabs-list/ds-tabs-list.module.js.map +1 -0
- package/dist/components/ds-tabs/components/ds-tabs-list/index.cjs +1 -0
- package/dist/components/ds-tabs/components/ds-tabs-list/index.js +1 -0
- package/dist/components/ds-tabs/components/ds-tabs-tab/ds-tabs-tab.cjs +178 -0
- package/dist/components/ds-tabs/components/ds-tabs-tab/ds-tabs-tab.js +177 -0
- package/dist/components/ds-tabs/components/ds-tabs-tab/ds-tabs-tab.js.map +1 -0
- package/dist/components/ds-tabs/components/ds-tabs-tab/ds-tabs-tab.module.cjs +15 -0
- package/dist/components/ds-tabs/components/ds-tabs-tab/ds-tabs-tab.module.js +15 -0
- package/dist/components/ds-tabs/components/ds-tabs-tab/ds-tabs-tab.module.js.map +1 -0
- package/dist/components/ds-tabs/components/ds-tabs-tab/index.cjs +1 -0
- package/dist/components/ds-tabs/components/ds-tabs-tab/index.js +1 -0
- package/dist/components/ds-tabs/ds-tabs.cjs +71 -0
- package/dist/components/ds-tabs/ds-tabs.d.cts +43 -0
- package/dist/components/ds-tabs/ds-tabs.d.cts.map +1 -0
- package/dist/components/ds-tabs/ds-tabs.d.ts +43 -0
- package/dist/components/ds-tabs/ds-tabs.d.ts.map +1 -0
- package/dist/components/ds-tabs/ds-tabs.js +70 -0
- package/dist/components/ds-tabs/ds-tabs.js.map +1 -0
- package/dist/components/ds-tabs/ds-tabs.module.cjs +6 -0
- package/dist/components/ds-tabs/ds-tabs.module.js +6 -0
- package/dist/components/ds-tabs/ds-tabs.module.js.map +1 -0
- package/dist/components/ds-tabs/ds-tabs.types.d.cts +91 -0
- package/dist/components/ds-tabs/ds-tabs.types.d.cts.map +1 -0
- package/dist/components/ds-tabs/ds-tabs.types.d.ts +92 -0
- package/dist/components/ds-tabs/ds-tabs.types.d.ts.map +1 -0
- package/dist/components/ds-tabs/index.cjs +1 -0
- package/dist/components/ds-tabs/index.d.ts +2 -0
- package/dist/components/ds-tabs/index.js +1 -0
- package/dist/components/ds-tag/ds-tag.d.cts +2 -2
- package/dist/components/ds-tag/ds-tag.d.ts +2 -2
- package/dist/components/ds-tag-filter/ds-tag-filter.d.cts +2 -2
- package/dist/components/ds-tag-filter/ds-tag-filter.d.ts +2 -2
- package/dist/components/ds-toggle/ds-toggle.d.cts +2 -2
- package/dist/components/ds-toggle/ds-toggle.d.ts +2 -2
- package/dist/components/ds-vertical-tabs/ds-vertical-tabs.d.cts +5 -5
- package/dist/components/ds-vertical-tabs/ds-vertical-tabs.d.ts +5 -5
- package/dist/index.cjs +20 -0
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +16 -4
- package/dist/index.js +12 -1
- package/dist/index.min.css +1 -1
- package/package.json +5 -3
- package/src/components/ds-button/versions/ds-button-legacy/ds-button-legacy.tsx +1 -7
- package/src/components/ds-button/versions/ds-button-new/ds-button-new.tsx +4 -2
- package/src/components/ds-chip-group/hooks/use-chip-row-calculation.ts +5 -0
- package/src/components/ds-date-input/ds-date-input.module.scss +1 -0
- package/src/components/ds-date-input/ds-date-input.utils.ts +16 -2
- package/src/components/ds-drawer/ds-drawer.tsx +4 -1
- package/src/components/ds-dropdown-menu/ds-dropdown-menu.types.tsx +4 -1
- package/src/components/ds-file-upload/utils/format-file-size.ts +1 -1
- package/src/components/ds-form-control/ds-form-control.tsx +9 -2
- package/src/components/ds-loader/ds-loader.module.scss +57 -0
- package/src/components/ds-loader/ds-loader.tsx +18 -0
- package/src/components/ds-loader/ds-loader.types.ts +24 -0
- package/src/components/ds-loader/index.ts +2 -0
- package/src/components/ds-loader/pulsing-icon.tsx +17 -0
- package/src/components/ds-loader/spinner-icon.tsx +37 -0
- package/src/components/ds-modal/ds-modal.tsx +7 -1
- package/src/components/ds-select/ds-select.tsx +1 -1
- package/src/components/ds-skeleton/ds-skeleton-circle.tsx +29 -0
- package/src/components/ds-skeleton/ds-skeleton-rect.tsx +36 -0
- package/src/components/ds-skeleton/ds-skeleton-text.tsx +49 -0
- package/src/components/ds-skeleton/ds-skeleton.config.ts +68 -0
- package/src/components/ds-skeleton/ds-skeleton.module.scss +72 -0
- package/src/components/ds-skeleton/ds-skeleton.tsx +9 -0
- package/src/components/ds-skeleton/ds-skeleton.types.ts +92 -0
- package/src/components/ds-skeleton/index.ts +5 -0
- package/src/components/ds-spinner/ds-spinner.tsx +1 -1
- package/src/components/ds-table/components/core-table/core-table.tsx +16 -16
- package/src/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.tsx +10 -13
- package/src/components/ds-table/components/ds-table-row/ds-table-row.tsx +0 -2
- package/src/components/ds-table/ds-table.tsx +6 -5
- package/src/components/ds-table/ds-table.types.ts +0 -5
- package/src/components/ds-table/filters/adapters/create-dual-range-filter-adapter.tsx +2 -4
- package/src/components/ds-table/filters/hooks/use-table-filters.ts +10 -5
- package/src/components/ds-table/utils/story-data-generator.ts +7 -7
- package/src/components/ds-tabs/components/ds-tabs-content/ds-tabs-content.module.scss +18 -0
- package/src/components/ds-tabs/components/ds-tabs-content/ds-tabs-content.tsx +12 -0
- package/src/components/ds-tabs/components/ds-tabs-content/index.ts +1 -0
- package/src/components/ds-tabs/components/ds-tabs-list/ds-tabs-indicator.module.scss +31 -0
- package/src/components/ds-tabs/components/ds-tabs-list/ds-tabs-list.module.scss +27 -0
- package/src/components/ds-tabs/components/ds-tabs-list/ds-tabs-list.tsx +14 -0
- package/src/components/ds-tabs/components/ds-tabs-list/index.ts +1 -0
- package/src/components/ds-tabs/components/ds-tabs-tab/ds-tabs-tab.module.scss +242 -0
- package/src/components/ds-tabs/components/ds-tabs-tab/ds-tabs-tab.tsx +130 -0
- package/src/components/ds-tabs/components/ds-tabs-tab/index.ts +1 -0
- package/src/components/ds-tabs/ds-tabs.module.scss +14 -0
- package/src/components/ds-tabs/ds-tabs.tsx +46 -0
- package/src/components/ds-tabs/ds-tabs.types.ts +97 -0
- package/src/components/ds-tabs/index.ts +2 -0
- package/src/index.ts +3 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsConfirmationProps } from "./ds-confirmation.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime26 from "react/jsx-runtime";
|
|
3
3
|
import { CSSProperties, ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/ds-confirmation/ds-confirmation.d.ts
|
|
@@ -13,7 +13,7 @@ declare const DsConfirmation: {
|
|
|
13
13
|
style,
|
|
14
14
|
className,
|
|
15
15
|
children
|
|
16
|
-
}: DsConfirmationProps):
|
|
16
|
+
}: DsConfirmationProps): react_jsx_runtime26.JSX.Element;
|
|
17
17
|
Header: ({
|
|
18
18
|
style,
|
|
19
19
|
className,
|
|
@@ -22,7 +22,7 @@ declare const DsConfirmation: {
|
|
|
22
22
|
style?: CSSProperties;
|
|
23
23
|
className?: string;
|
|
24
24
|
children: ReactNode;
|
|
25
|
-
}) =>
|
|
25
|
+
}) => react_jsx_runtime26.JSX.Element;
|
|
26
26
|
Title: ({
|
|
27
27
|
style,
|
|
28
28
|
className,
|
|
@@ -31,14 +31,14 @@ declare const DsConfirmation: {
|
|
|
31
31
|
style?: CSSProperties;
|
|
32
32
|
className?: string;
|
|
33
33
|
children: ReactNode;
|
|
34
|
-
}) =>
|
|
34
|
+
}) => react_jsx_runtime26.JSX.Element;
|
|
35
35
|
CloseTrigger: ({
|
|
36
36
|
style,
|
|
37
37
|
className
|
|
38
38
|
}: {
|
|
39
39
|
style?: CSSProperties;
|
|
40
40
|
className?: string;
|
|
41
|
-
}) =>
|
|
41
|
+
}) => react_jsx_runtime26.JSX.Element;
|
|
42
42
|
Body: ({
|
|
43
43
|
style,
|
|
44
44
|
className,
|
|
@@ -47,7 +47,7 @@ declare const DsConfirmation: {
|
|
|
47
47
|
style?: CSSProperties;
|
|
48
48
|
className?: string;
|
|
49
49
|
children: ReactNode;
|
|
50
|
-
}) =>
|
|
50
|
+
}) => react_jsx_runtime26.JSX.Element;
|
|
51
51
|
Footer: ({
|
|
52
52
|
style,
|
|
53
53
|
className,
|
|
@@ -56,7 +56,7 @@ declare const DsConfirmation: {
|
|
|
56
56
|
style?: CSSProperties;
|
|
57
57
|
className?: string;
|
|
58
58
|
children: ReactNode;
|
|
59
|
-
}) =>
|
|
59
|
+
}) => react_jsx_runtime26.JSX.Element;
|
|
60
60
|
Actions: ({
|
|
61
61
|
style,
|
|
62
62
|
className,
|
|
@@ -65,7 +65,7 @@ declare const DsConfirmation: {
|
|
|
65
65
|
style?: CSSProperties;
|
|
66
66
|
className?: string;
|
|
67
67
|
children: ReactNode;
|
|
68
|
-
}) =>
|
|
68
|
+
}) => react_jsx_runtime26.JSX.Element;
|
|
69
69
|
};
|
|
70
70
|
//#endregion
|
|
71
71
|
export { DsConfirmation };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsDateInputProps } from "./ds-date-input.types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime15 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ds-date-input/ds-date-input.d.ts
|
|
5
5
|
|
|
@@ -25,7 +25,7 @@ declare const DsDateInput: ({
|
|
|
25
25
|
readOnly,
|
|
26
26
|
id,
|
|
27
27
|
...datePickerProps
|
|
28
|
-
}: DsDateInputProps) =>
|
|
28
|
+
}: DsDateInputProps) => react_jsx_runtime15.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { DsDateInput };
|
|
31
31
|
//# sourceMappingURL=ds-date-input.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-date-input.d.cts","names":[],"sources":["../../../src/components/ds-date-input/ds-date-input.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAI8D;;;cAmBxD,WAAe,EAAA,CAAA;EAAA,KAAA;EAAA,WAAA;EAAA,KAAA;EAAA,SAAA;EAAA,aAAA;EAAA,aAAA;EAAA,YAAA;EAAA,KAAA,EAAA,MAAA;EAAA,YAAA,EAAA,aAAA;EAAA,GAAA,EAAA,IAAA;EAAA,GAAA,EAAA,IAAA;EAAA,QAAA;EAAA,QAAA;EAAA,EAAA;EAAA,GAAA;AAAA,CAAA,EAgBlB,gBAhBkB,EAAA,GAgBF,
|
|
1
|
+
{"version":3,"file":"ds-date-input.d.cts","names":[],"sources":["../../../src/components/ds-date-input/ds-date-input.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAI8D;;;cAmBxD,WAAe,EAAA,CAAA;EAAA,KAAA;EAAA,WAAA;EAAA,KAAA;EAAA,SAAA;EAAA,aAAA;EAAA,aAAA;EAAA,YAAA;EAAA,KAAA,EAAA,MAAA;EAAA,YAAA,EAAA,aAAA;EAAA,GAAA,EAAA,IAAA;EAAA,GAAA,EAAA,IAAA;EAAA,QAAA;EAAA,QAAA;EAAA,EAAA;EAAA,GAAA;AAAA,CAAA,EAgBlB,gBAhBkB,EAAA,GAgBF,mBAAA,CAAA,GAAA,CAAA,OAhBE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsDateInputProps } from "./ds-date-input.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime59 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ds-date-input/ds-date-input.d.ts
|
|
5
5
|
|
|
@@ -25,7 +25,7 @@ declare const DsDateInput: ({
|
|
|
25
25
|
readOnly,
|
|
26
26
|
id,
|
|
27
27
|
...datePickerProps
|
|
28
|
-
}: DsDateInputProps) =>
|
|
28
|
+
}: DsDateInputProps) => react_jsx_runtime59.JSX.Element;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { DsDateInput };
|
|
31
31
|
//# sourceMappingURL=ds-date-input.d.ts.map
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/components/ds-date-input/ds-date-input.module.scss
|
|
3
3
|
var ds_date_input_module_default = {
|
|
4
|
-
"dateInputControl": "
|
|
5
|
-
"input": "
|
|
6
|
-
"iconButton": "
|
|
7
|
-
"disabled": "
|
|
8
|
-
"dateInputButton": "
|
|
9
|
-
"readOnly": "
|
|
10
|
-
"positioner": "
|
|
11
|
-
"content": "
|
|
12
|
-
"expand": "
|
|
13
|
-
"collapse": "
|
|
14
|
-
"viewControl": "
|
|
15
|
-
"viewTrigger": "
|
|
16
|
-
"prevTrigger": "
|
|
17
|
-
"nextTrigger": "
|
|
18
|
-
"calendarView": "
|
|
19
|
-
"table": "
|
|
20
|
-
"tableBody": "
|
|
21
|
-
"tableRow": "
|
|
22
|
-
"tableCellTrigger": "
|
|
23
|
-
"tableCellTriggerValue": "
|
|
24
|
-
"tableHead": "
|
|
25
|
-
"tableHeader": "
|
|
4
|
+
"dateInputControl": "_dateInputControl_1abgc_1",
|
|
5
|
+
"input": "_input_1abgc_1",
|
|
6
|
+
"iconButton": "_iconButton_1abgc_1",
|
|
7
|
+
"disabled": "_disabled_1abgc_1",
|
|
8
|
+
"dateInputButton": "_dateInputButton_1abgc_1",
|
|
9
|
+
"readOnly": "_readOnly_1abgc_1",
|
|
10
|
+
"positioner": "_positioner_1abgc_1",
|
|
11
|
+
"content": "_content_1abgc_1",
|
|
12
|
+
"expand": "_expand_1abgc_1",
|
|
13
|
+
"collapse": "_collapse_1abgc_1",
|
|
14
|
+
"viewControl": "_viewControl_1abgc_1",
|
|
15
|
+
"viewTrigger": "_viewTrigger_1abgc_1",
|
|
16
|
+
"prevTrigger": "_prevTrigger_1abgc_1",
|
|
17
|
+
"nextTrigger": "_nextTrigger_1abgc_1",
|
|
18
|
+
"calendarView": "_calendarView_1abgc_1",
|
|
19
|
+
"table": "_table_1abgc_1",
|
|
20
|
+
"tableBody": "_tableBody_1abgc_1",
|
|
21
|
+
"tableRow": "_tableRow_1abgc_1",
|
|
22
|
+
"tableCellTrigger": "_tableCellTrigger_1abgc_1",
|
|
23
|
+
"tableCellTriggerValue": "_tableCellTriggerValue_1abgc_1",
|
|
24
|
+
"tableHead": "_tableHead_1abgc_1",
|
|
25
|
+
"tableHeader": "_tableHeader_1abgc_1"
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
//#endregion
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
//#region src/components/ds-date-input/ds-date-input.module.scss
|
|
2
2
|
var ds_date_input_module_default = {
|
|
3
|
-
"dateInputControl": "
|
|
4
|
-
"input": "
|
|
5
|
-
"iconButton": "
|
|
6
|
-
"disabled": "
|
|
7
|
-
"dateInputButton": "
|
|
8
|
-
"readOnly": "
|
|
9
|
-
"positioner": "
|
|
10
|
-
"content": "
|
|
11
|
-
"expand": "
|
|
12
|
-
"collapse": "
|
|
13
|
-
"viewControl": "
|
|
14
|
-
"viewTrigger": "
|
|
15
|
-
"prevTrigger": "
|
|
16
|
-
"nextTrigger": "
|
|
17
|
-
"calendarView": "
|
|
18
|
-
"table": "
|
|
19
|
-
"tableBody": "
|
|
20
|
-
"tableRow": "
|
|
21
|
-
"tableCellTrigger": "
|
|
22
|
-
"tableCellTriggerValue": "
|
|
23
|
-
"tableHead": "
|
|
24
|
-
"tableHeader": "
|
|
3
|
+
"dateInputControl": "_dateInputControl_1abgc_1",
|
|
4
|
+
"input": "_input_1abgc_1",
|
|
5
|
+
"iconButton": "_iconButton_1abgc_1",
|
|
6
|
+
"disabled": "_disabled_1abgc_1",
|
|
7
|
+
"dateInputButton": "_dateInputButton_1abgc_1",
|
|
8
|
+
"readOnly": "_readOnly_1abgc_1",
|
|
9
|
+
"positioner": "_positioner_1abgc_1",
|
|
10
|
+
"content": "_content_1abgc_1",
|
|
11
|
+
"expand": "_expand_1abgc_1",
|
|
12
|
+
"collapse": "_collapse_1abgc_1",
|
|
13
|
+
"viewControl": "_viewControl_1abgc_1",
|
|
14
|
+
"viewTrigger": "_viewTrigger_1abgc_1",
|
|
15
|
+
"prevTrigger": "_prevTrigger_1abgc_1",
|
|
16
|
+
"nextTrigger": "_nextTrigger_1abgc_1",
|
|
17
|
+
"calendarView": "_calendarView_1abgc_1",
|
|
18
|
+
"table": "_table_1abgc_1",
|
|
19
|
+
"tableBody": "_tableBody_1abgc_1",
|
|
20
|
+
"tableRow": "_tableRow_1abgc_1",
|
|
21
|
+
"tableCellTrigger": "_tableCellTrigger_1abgc_1",
|
|
22
|
+
"tableCellTriggerValue": "_tableCellTriggerValue_1abgc_1",
|
|
23
|
+
"tableHead": "_tableHead_1abgc_1",
|
|
24
|
+
"tableHeader": "_tableHeader_1abgc_1"
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-date-input.module.js","names":[],"sources":["../../../file:/home/runner/work/design-system/design-system/packages/design-system/src/components/ds-date-input/ds-date-input.module.scss","../../../file:/home/runner/work/design-system/design-system/packages/design-system/src/styles/shared/_input.scss","../../../file:/home/runner/work/design-system/design-system/packages/design-system/src/styles/_typography.scss","../../../file:/home/runner/work/design-system/design-system/packages/design-system/src/styles/shared/_dropdown.scss","../../../file:/home/runner/work/design-system/design-system/packages/design-system/src/styles/mixins/_bounding-box.scss"],"sourcesContent":["@use '../../styles/shared/input';\n@use '../../styles/shared/dropdown';\n\n.dateInputControl {\n\t@include input.base-input-container;\n\t@include input.input-container-states;\n\tmax-height: input.$input-text-height-default;\n\tjustify-content: space-between;\n\tpadding: var(--spacing-xs) var(--spacing-sm);\n\tgap: var(--spacing-3xs);\n\n\tborder-color: var(--form-control-border-color, var(--color-border));\n\n\t&:hover:not(.disabled) {\n\t\tborder-color: var(--form-control-border-color, var(--color-border-hover));\n\t}\n\n\t&:focus-within {\n\t\tborder-color: var(--form-control-border-color, var(--color-border-action));\n\t}\n\n\t&.disabled {\n\t\tcolor: var(--color-background-deselected);\n\t\tbackground: var(--color-background-secondary);\n\t\tborder-color: var(--color-border-disabled);\n\t\tcursor: not-allowed;\n\n\t\t.input {\n\t\t\tcolor: var(--color-font-disabled);\n\t\t}\n\n\t\t.dateInputButton {\n\t\t\tcolor: var(--color-background-disable);\n\t\t\tcursor: not-allowed;\n\t\t}\n\t}\n\n\t&.readOnly {\n\t\tbackground: var(--color-background-secondary);\n\t\tcursor: default;\n\t}\n}\n\n.input {\n\t@include input.base-input;\n\tmin-width: 0;\n\tflex: 1;\n\tpadding: 0;\n}\n\n.dateInputButton {\n\t@include input.icon-button;\n\tdisplay: flex;\n\talign-items: center;\n\tcursor: pointer;\n\tpadding: 0;\n\ttransition: color 0.2s ease;\n\n\t&:hover:not(:disabled) {\n\t\tcolor: var(--color-background-action-hover);\n\t}\n\n\t&:disabled {\n\t\tcolor: var(--color-background-disable);\n\t\tcursor: not-allowed;\n\t}\n}\n\n.positioner {\n\t@include dropdown.dropdown-viewport;\n}\n\n.content {\n\t@include dropdown.dropdown-content;\n\tpadding: var(--spacing-standard);\n}\n\n.viewControl {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tmargin-bottom: var(--spacing-xs);\n}\n\n.viewTrigger {\n\tflex: 1;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground: transparent;\n\tborder: none;\n\tcursor: pointer;\n\tpadding: var(--spacing-2xs) var(--spacing-xs);\n\tborder-radius: var(--spacing-2xs);\n\tcolor: var(--color-font-main);\n\ttransition: background-color 0.2s;\n\n\t&:hover {\n\t\tbackground: var(--color-background-hover);\n\t}\n}\n\n.prevTrigger,\n.nextTrigger {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground: transparent;\n\tborder: none;\n\tcursor: pointer;\n\tpadding: var(--spacing-2xs);\n\tborder-radius: var(--spacing-2xs);\n\tcolor: var(--color-font-secondary);\n\ttransition: all 0.2s;\n\n\t&:hover {\n\t\tbackground: var(--color-background-hover);\n\t\tcolor: var(--color-font-main);\n\t}\n\n\t&:disabled {\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t}\n}\n\n.calendarView {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--spacing-xs);\n}\n\n.table {\n\twidth: 100%;\n\tborder-collapse: collapse;\n\n\t.tableBody .tableRow .tableCellTrigger:focus-visible {\n\t\t.tableCellTriggerValue {\n\t\t\toutline: 2px solid var(--color-background-action-hover);\n\t\t\tborder-radius: var(--spacing-2xs);\n\t\t\tborder-width: 0;\n\t\t}\n\t}\n}\n\n.tableHead {\n\tborder-bottom: 1px solid var(--color-border);\n}\n\n.tableHeader {\n\ttext-align: center;\n\tpadding: var(--spacing-2xs);\n\tcolor: var(--color-font-secondary);\n\tfont-weight: var(--font-weight-medium);\n}\n\n.tableRow {\n\t&:first-child {\n\t\t.tableCellTrigger {\n\t\t\tmargin-top: var(--spacing-xs);\n\t\t}\n\t}\n}\n\n.tableCellTrigger {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: pointer;\n\tuser-select: none;\n\t-webkit-tap-highlight-color: transparent;\n\toutline: none;\n\n\t.tableCellTriggerValue {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: var(--spacing-xl);\n\t\theight: var(--spacing-xl);\n\t\tmargin: var(--spacing-3xs);\n\t\tcolor: var(--color-font-main);\n\t\tborder-radius: var(--spacing-xs);\n\t}\n\n\t&:hover:not([data-disabled], [data-selected], [data-in-range], [data-in-hover-range])\n\t\t.tableCellTriggerValue {\n\t\toutline: 1px solid var(--color-border);\n\t\tbackground: var(--color-background-action-hover-weak);\n\t}\n\n\t&[data-outside-range] .tableCellTriggerValue {\n\t\tcolor: var(--color-font-disabled);\n\t}\n\n\t&[data-selected] .tableCellTriggerValue {\n\t\tbackground: var(--color-background-selected);\n\t\tcolor: var(--color-font-on-action);\n\t}\n\n\t&[data-in-range]:not([data-selected]) {\n\t\tposition: relative;\n\n\t\t.tableCellTriggerValue {\n\t\t\tbackground: var(--color-background-action-secondary-hover);\n\t\t}\n\t}\n\n\t&[data-today]:not([data-selected], [data-in-range]):hover .tableCellTriggerValue {\n\t\tborder-radius: var(--spacing-xs);\n\t}\n\n\t&[data-today]:not([data-selected]) .tableCellTriggerValue {\n\t\tposition: relative;\n\n\t\t&::after {\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\twidth: 75%;\n\t\t\tbottom: 4px;\n\t\t\tborder-bottom: 1px solid var(--color-background-brand);\n\t\t}\n\t}\n\n\t&[data-today][data-selected] .tableCellTriggerValue {\n\t\tposition: relative;\n\n\t\t&::after {\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\twidth: 75%;\n\t\t\tbottom: 4px;\n\t\t\tborder-bottom: 1px solid var(--color-background);\n\t\t}\n\t}\n\n\t&[data-disabled] .tableCellTriggerValue {\n\t\tcolor: var(--color-font-disabled);\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t}\n\n\t&[data-unavailable] .tableCellTriggerValue {\n\t\ttext-decoration: line-through;\n\t\topacity: 0.4;\n\t}\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ds-date-input.module.js","names":[],"sources":["../../../file:/home/runner/work/design-system/design-system/packages/design-system/src/components/ds-date-input/ds-date-input.module.scss","../../../file:/home/runner/work/design-system/design-system/packages/design-system/src/styles/shared/_input.scss","../../../file:/home/runner/work/design-system/design-system/packages/design-system/src/styles/_typography.scss","../../../file:/home/runner/work/design-system/design-system/packages/design-system/src/styles/shared/_dropdown.scss","../../../file:/home/runner/work/design-system/design-system/packages/design-system/src/styles/mixins/_bounding-box.scss"],"sourcesContent":["@use '../../styles/shared/input';\n@use '../../styles/shared/dropdown';\n\n.dateInputControl {\n\t@include input.base-input-container;\n\t@include input.input-container-states;\n\tmax-height: input.$input-text-height-default;\n\tjustify-content: space-between;\n\tpadding: var(--spacing-xs) var(--spacing-sm);\n\tgap: var(--spacing-3xs);\n\n\tborder-color: var(--form-control-border-color, var(--color-border));\n\n\t&:hover:not(.disabled) {\n\t\tborder-color: var(--form-control-border-color, var(--color-border-hover));\n\t}\n\n\t&:focus-within {\n\t\tborder-color: var(--form-control-border-color, var(--color-border-action));\n\t}\n\n\t&.disabled {\n\t\tcolor: var(--color-background-deselected);\n\t\tbackground: var(--color-background-secondary);\n\t\tborder-color: var(--color-border-disabled);\n\t\tcursor: not-allowed;\n\n\t\t.input {\n\t\t\tcolor: var(--color-font-disabled);\n\t\t}\n\n\t\t.dateInputButton {\n\t\t\tcolor: var(--color-background-disable);\n\t\t\tcursor: not-allowed;\n\t\t}\n\t}\n\n\t&.readOnly {\n\t\tbackground: var(--color-background-secondary);\n\t\tcursor: default;\n\t}\n}\n\n.input {\n\t@include input.base-input;\n\tmin-width: 0;\n\tflex: 1;\n\tpadding: 0;\n}\n\n.dateInputButton {\n\t@include input.icon-button;\n\tdisplay: flex;\n\talign-items: center;\n\tcursor: pointer;\n\tpadding: 0;\n\ttransition: color 0.2s ease;\n\n\t&:hover:not(:disabled) {\n\t\tcolor: var(--color-background-action-hover);\n\t}\n\n\t&:disabled {\n\t\tcolor: var(--color-background-disable);\n\t\tcursor: not-allowed;\n\t}\n}\n\n.positioner {\n\t@include dropdown.dropdown-viewport;\n}\n\n.content {\n\t@include dropdown.dropdown-content;\n\tpadding: var(--spacing-standard);\n\tmin-width: fit-content;\n}\n\n.viewControl {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tmargin-bottom: var(--spacing-xs);\n}\n\n.viewTrigger {\n\tflex: 1;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground: transparent;\n\tborder: none;\n\tcursor: pointer;\n\tpadding: var(--spacing-2xs) var(--spacing-xs);\n\tborder-radius: var(--spacing-2xs);\n\tcolor: var(--color-font-main);\n\ttransition: background-color 0.2s;\n\n\t&:hover {\n\t\tbackground: var(--color-background-hover);\n\t}\n}\n\n.prevTrigger,\n.nextTrigger {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tbackground: transparent;\n\tborder: none;\n\tcursor: pointer;\n\tpadding: var(--spacing-2xs);\n\tborder-radius: var(--spacing-2xs);\n\tcolor: var(--color-font-secondary);\n\ttransition: all 0.2s;\n\n\t&:hover {\n\t\tbackground: var(--color-background-hover);\n\t\tcolor: var(--color-font-main);\n\t}\n\n\t&:disabled {\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t}\n}\n\n.calendarView {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--spacing-xs);\n}\n\n.table {\n\twidth: 100%;\n\tborder-collapse: collapse;\n\n\t.tableBody .tableRow .tableCellTrigger:focus-visible {\n\t\t.tableCellTriggerValue {\n\t\t\toutline: 2px solid var(--color-background-action-hover);\n\t\t\tborder-radius: var(--spacing-2xs);\n\t\t\tborder-width: 0;\n\t\t}\n\t}\n}\n\n.tableHead {\n\tborder-bottom: 1px solid var(--color-border);\n}\n\n.tableHeader {\n\ttext-align: center;\n\tpadding: var(--spacing-2xs);\n\tcolor: var(--color-font-secondary);\n\tfont-weight: var(--font-weight-medium);\n}\n\n.tableRow {\n\t&:first-child {\n\t\t.tableCellTrigger {\n\t\t\tmargin-top: var(--spacing-xs);\n\t\t}\n\t}\n}\n\n.tableCellTrigger {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: pointer;\n\tuser-select: none;\n\t-webkit-tap-highlight-color: transparent;\n\toutline: none;\n\n\t.tableCellTriggerValue {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: var(--spacing-xl);\n\t\theight: var(--spacing-xl);\n\t\tmargin: var(--spacing-3xs);\n\t\tcolor: var(--color-font-main);\n\t\tborder-radius: var(--spacing-xs);\n\t}\n\n\t&:hover:not([data-disabled], [data-selected], [data-in-range], [data-in-hover-range])\n\t\t.tableCellTriggerValue {\n\t\toutline: 1px solid var(--color-border);\n\t\tbackground: var(--color-background-action-hover-weak);\n\t}\n\n\t&[data-outside-range] .tableCellTriggerValue {\n\t\tcolor: var(--color-font-disabled);\n\t}\n\n\t&[data-selected] .tableCellTriggerValue {\n\t\tbackground: var(--color-background-selected);\n\t\tcolor: var(--color-font-on-action);\n\t}\n\n\t&[data-in-range]:not([data-selected]) {\n\t\tposition: relative;\n\n\t\t.tableCellTriggerValue {\n\t\t\tbackground: var(--color-background-action-secondary-hover);\n\t\t}\n\t}\n\n\t&[data-today]:not([data-selected], [data-in-range]):hover .tableCellTriggerValue {\n\t\tborder-radius: var(--spacing-xs);\n\t}\n\n\t&[data-today]:not([data-selected]) .tableCellTriggerValue {\n\t\tposition: relative;\n\n\t\t&::after {\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\twidth: 75%;\n\t\t\tbottom: 4px;\n\t\t\tborder-bottom: 1px solid var(--color-background-brand);\n\t\t}\n\t}\n\n\t&[data-today][data-selected] .tableCellTriggerValue {\n\t\tposition: relative;\n\n\t\t&::after {\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\twidth: 75%;\n\t\t\tbottom: 4px;\n\t\t\tborder-bottom: 1px solid var(--color-background);\n\t\t}\n\t}\n\n\t&[data-disabled] .tableCellTriggerValue {\n\t\tcolor: var(--color-font-disabled);\n\t\tcursor: not-allowed;\n\t\topacity: 0.5;\n\t}\n\n\t&[data-unavailable] .tableCellTriggerValue {\n\t\ttext-decoration: line-through;\n\t\topacity: 0.4;\n\t}\n}\n"],"mappings":""}
|
|
@@ -24,7 +24,8 @@ const stringToDateValue = (dates) => {
|
|
|
24
24
|
*/
|
|
25
25
|
const dateValuesToStrings = (dates, range) => {
|
|
26
26
|
const values = dates.map((date) => date.toString());
|
|
27
|
-
|
|
27
|
+
if (range) return [values[0] ?? "", values[1] ?? ""];
|
|
28
|
+
return values[0] ?? "";
|
|
28
29
|
};
|
|
29
30
|
/**
|
|
30
31
|
* Format a DateValue to string (MM/DD/YYYY)
|
|
@@ -40,7 +41,7 @@ const formatDateValue = (date) => {
|
|
|
40
41
|
const formatDateInputValue = (value, range) => {
|
|
41
42
|
if (value.length === 0) return "";
|
|
42
43
|
const newValue = value.map(formatDateValue);
|
|
43
|
-
return range ? newValue.join(" - ") : newValue[0];
|
|
44
|
+
return range ? newValue.join(" - ") : newValue[0] ?? "";
|
|
44
45
|
};
|
|
45
46
|
/**
|
|
46
47
|
* Parse a date string (MM/DD/YYYY) to DateValue
|
|
@@ -50,6 +51,7 @@ const parseDateString = (dateStr) => {
|
|
|
50
51
|
const match = dateStr.trim().match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/);
|
|
51
52
|
if (!match) return null;
|
|
52
53
|
const [, month, day, year] = match;
|
|
54
|
+
if (!month || !day || !year) return null;
|
|
53
55
|
const monthNum = parseInt(month, 10);
|
|
54
56
|
const dayNum = parseInt(day, 10);
|
|
55
57
|
const yearNum = parseInt(year, 10);
|
|
@@ -81,6 +83,11 @@ const parseRangeInput = (text) => {
|
|
|
81
83
|
isValid: false
|
|
82
84
|
};
|
|
83
85
|
const [startStr, endStr] = parts;
|
|
86
|
+
if (!startStr || !endStr) return {
|
|
87
|
+
start: null,
|
|
88
|
+
end: null,
|
|
89
|
+
isValid: false
|
|
90
|
+
};
|
|
84
91
|
const startDate = parseDateString(startStr);
|
|
85
92
|
const endDate = parseDateString(endStr);
|
|
86
93
|
if (!startDate || !endDate) return {
|
|
@@ -23,7 +23,8 @@ const stringToDateValue = (dates) => {
|
|
|
23
23
|
*/
|
|
24
24
|
const dateValuesToStrings = (dates, range) => {
|
|
25
25
|
const values = dates.map((date) => date.toString());
|
|
26
|
-
|
|
26
|
+
if (range) return [values[0] ?? "", values[1] ?? ""];
|
|
27
|
+
return values[0] ?? "";
|
|
27
28
|
};
|
|
28
29
|
/**
|
|
29
30
|
* Format a DateValue to string (MM/DD/YYYY)
|
|
@@ -39,7 +40,7 @@ const formatDateValue = (date) => {
|
|
|
39
40
|
const formatDateInputValue = (value, range) => {
|
|
40
41
|
if (value.length === 0) return "";
|
|
41
42
|
const newValue = value.map(formatDateValue);
|
|
42
|
-
return range ? newValue.join(" - ") : newValue[0];
|
|
43
|
+
return range ? newValue.join(" - ") : newValue[0] ?? "";
|
|
43
44
|
};
|
|
44
45
|
/**
|
|
45
46
|
* Parse a date string (MM/DD/YYYY) to DateValue
|
|
@@ -49,6 +50,7 @@ const parseDateString = (dateStr) => {
|
|
|
49
50
|
const match = dateStr.trim().match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/);
|
|
50
51
|
if (!match) return null;
|
|
51
52
|
const [, month, day, year] = match;
|
|
53
|
+
if (!month || !day || !year) return null;
|
|
52
54
|
const monthNum = parseInt(month, 10);
|
|
53
55
|
const dayNum = parseInt(day, 10);
|
|
54
56
|
const yearNum = parseInt(year, 10);
|
|
@@ -80,6 +82,11 @@ const parseRangeInput = (text) => {
|
|
|
80
82
|
isValid: false
|
|
81
83
|
};
|
|
82
84
|
const [startStr, endStr] = parts;
|
|
85
|
+
if (!startStr || !endStr) return {
|
|
86
|
+
start: null,
|
|
87
|
+
end: null,
|
|
88
|
+
isValid: false
|
|
89
|
+
};
|
|
83
90
|
const startDate = parseDateString(startStr);
|
|
84
91
|
const endDate = parseDateString(endStr);
|
|
85
92
|
if (!startDate || !endDate) return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-date-input.utils.js","names":["DateValue","CalendarDate","parseDate","DateInputValidation","isValid","error","ParsedDateRange","start","end","isoStringToDateValue","isoDate","undefined","stringToDateValue","dates","dateArray","Array","isArray","map","filter","d","dateValuesToStrings","range","values","date","toString","formatDateValue","paddedMonth","String","month","padStart","paddedDay","day","year","formatDateInputValue","value","length","newValue","join","parseDateString","dateStr","trim","match","monthNum","parseInt","dayNum","yearNum","Date","getFullYear","getMonth","getDate","parseRangeInput","text","includes","parts","split","p","startStr","endStr","startDate","endDate","parseInputText","parsed","validateDateString","min","max","compare"],"sources":["../../../src/components/ds-date-input/ds-date-input.utils.ts"],"sourcesContent":["import { type DateValue } from '@ark-ui/react/date-picker';\nimport { CalendarDate, parseDate } from '@internationalized/date';\n\n/**\n * Validation result for date input\n */\ninterface DateInputValidation {\n\tisValid: boolean;\n\terror?: string;\n}\n\n/**\n * Parsed date range result\n */\ninterface ParsedDateRange {\n\tstart: string | null;\n\tend: string | null;\n\tisValid: boolean;\n}\n\n/**\n * Convert ISO date string to DateValue\n */\nexport const isoStringToDateValue = (isoDate: string): DateValue | undefined => {\n\ttry {\n\t\treturn parseDate(isoDate) as unknown as DateValue;\n\t} catch {\n\t\treturn undefined;\n\t}\n};\n\n/**\n * Convert string or tuple to DateValue array (for internal use with Ark UI)\n */\nexport const stringToDateValue = (dates: string | [string, string]): DateValue[] => {\n\tconst dateArray = Array.isArray(dates) ? dates : [dates];\n\n\treturn dateArray.map(isoStringToDateValue).filter((d) => !!d);\n};\n\n/**\n * Convert DateValue array to string or tuple (for public API)\n */\nexport const dateValuesToStrings = (dates: DateValue[], range: boolean): string | [string, string] => {\n\tconst values = dates.map((date) => date.toString());\n\n\treturn range ? [values[0], values[1]] : values[0];\n};\n\n/**\n * Format a DateValue to string (MM/DD/YYYY)\n */\nconst formatDateValue = (date: DateValue): string => {\n\tconst paddedMonth = String(date.month).padStart(2, '0');\n\tconst paddedDay = String(date.day).padStart(2, '0');\n\n\treturn `${paddedMonth}/${paddedDay}/${String(date.year)}`;\n};\n\n/**\n * Format an array of DateValues to a unified string\n * Single: \"12/25/2024\"\n * Range: \"12/01/2024 - 12/31/2024\"\n */\nexport const formatDateInputValue = (value: DateValue[], range: boolean): string => {\n\tif (value.length === 0) {\n\t\treturn '';\n\t}\n\tconst newValue = value.map(formatDateValue);\n\n\treturn range ? newValue.join(' - ') : newValue[0];\n};\n\n/**\n * Parse a date string (MM/DD/YYYY) to DateValue\n */\nconst parseDateString = (dateStr: string): DateValue | null => {\n\tif (!dateStr || !dateStr.trim()) {\n\t\treturn null;\n\t}\n\n\t// Try MM/DD/YYYY format\n\tconst match = dateStr.trim().match(/^(\\d{1,2})\\/(\\d{1,2})\\/(\\d{4})$/);\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [, month, day, year] = match;\n\tconst monthNum = parseInt(month, 10);\n\tconst dayNum = parseInt(day, 10);\n\tconst yearNum = parseInt(year, 10);\n\n\t// Use native Date for proper validation (handles leap years, month lengths, etc.)\n\t// Note: Date months are 0-indexed, so subtract 1\n\tconst date = new Date(yearNum, monthNum - 1, dayNum);\n\n\t// Check if the date is valid and matches what we parsed\n\t// (e.g., 02/31/2024 would roll over to 03/02/2024, so we detect that)\n\tif (date.getFullYear() !== yearNum || date.getMonth() !== monthNum - 1 || date.getDate() !== dayNum) {\n\t\treturn null;\n\t}\n\n\treturn new CalendarDate(yearNum, monthNum, dayNum) as unknown as DateValue;\n};\n\n/**\n * Parse a range input string (MM/DD/YYYY - MM/DD/YYYY)\n */\nconst parseRangeInput = (text: string): ParsedDateRange => {\n\tif (!text.trim()) {\n\t\treturn { start: null, end: null, isValid: true }; // Empty is valid\n\t}\n\n\t// Check if it contains a dash separator\n\tif (!text.includes('-')) {\n\t\t// Single date format, treat as incomplete range\n\t\tconst date = parseDateString(text.trim());\n\t\treturn {\n\t\t\tstart: date ? formatDateValue(date) : null,\n\t\t\tend: null,\n\t\t\tisValid: false, // Incomplete range\n\t\t};\n\t}\n\n\t// Split by dash\n\tconst parts = text.split('-').map((p) => p.trim());\n\tif (parts.length !== 2) {\n\t\treturn { start: null, end: null, isValid: false };\n\t}\n\n\tconst [startStr, endStr] = parts;\n\tconst startDate = parseDateString(startStr);\n\tconst endDate = parseDateString(endStr);\n\n\t// Both must be valid dates\n\tif (!startDate || !endDate) {\n\t\treturn {\n\t\t\tstart: startDate ? formatDateValue(startDate) : null,\n\t\t\tend: endDate ? formatDateValue(endDate) : null,\n\t\t\tisValid: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tstart: formatDateValue(startDate),\n\t\tend: formatDateValue(endDate),\n\t\tisValid: true,\n\t};\n};\n\n/**\n * Parse input text based on range flag\n */\nexport const parseInputText = (text: string, range: boolean): DateValue[] => {\n\tif (!range) {\n\t\tconst date = parseDateString(text);\n\t\treturn date ? [date] : [];\n\t}\n\n\t// Range mode\n\tconst parsed = parseRangeInput(text);\n\tif (!parsed.isValid || !parsed.start || !parsed.end) {\n\t\treturn [];\n\t}\n\n\tconst startDate = parseDateString(parsed.start);\n\tconst endDate = parseDateString(parsed.end);\n\n\tif (!startDate || !endDate) {\n\t\treturn [];\n\t}\n\n\treturn [startDate, endDate];\n};\n\n/**\n * Validate date input\n */\nexport const validateDateString = ({\n\ttext,\n\trange,\n\tmin,\n\tmax,\n}: {\n\ttext: string;\n\trange: boolean;\n\tmin?: DateValue;\n\tmax?: DateValue;\n}): DateInputValidation => {\n\tif (!text.trim()) {\n\t\treturn { isValid: true }; // Empty is valid (let required validation handle it)\n\t}\n\n\tif (!range) {\n\t\tconst date = parseDateString(text);\n\t\tif (!date) {\n\t\t\treturn { isValid: false, error: 'Invalid date format. Use MM/DD/YYYY' };\n\t\t}\n\n\t\t// Check min/max\n\t\tif (min && date.compare(min) < 0) {\n\t\t\treturn { isValid: false, error: 'Date is before minimum allowed date' };\n\t\t}\n\t\tif (max && date.compare(max) > 0) {\n\t\t\treturn { isValid: false, error: 'Date is after maximum allowed date' };\n\t\t}\n\n\t\treturn { isValid: true };\n\t}\n\n\t// Range mode validation\n\tconst parsed = parseRangeInput(text);\n\tif (!parsed.isValid) {\n\t\treturn { isValid: false, error: 'Invalid date range format. Use MM/DD/YYYY - MM/DD/YYYY' };\n\t}\n\n\tif (!parsed.start || !parsed.end) {\n\t\treturn { isValid: false, error: 'Both start and end dates are required' };\n\t}\n\n\tconst startDate = parseDateString(parsed.start);\n\tconst endDate = parseDateString(parsed.end);\n\n\tif (!startDate || !endDate) {\n\t\treturn { isValid: false, error: 'Invalid date format. Use MM/DD/YYYY' };\n\t}\n\n\t// Validate start <= end\n\tif (startDate.compare(endDate) > 0) {\n\t\treturn { isValid: false, error: 'Start date must be before or equal to end date' };\n\t}\n\n\t// Check min/max\n\tif (min && startDate.compare(min) < 0) {\n\t\treturn { isValid: false, error: 'Start date is before minimum allowed date' };\n\t}\n\tif (max && endDate.compare(max) > 0) {\n\t\treturn { isValid: false, error: 'End date is after maximum allowed date' };\n\t}\n\n\treturn { isValid: true };\n};\n"],"mappings":";;;;;;;AAuBA,MAAaS,wBAAwBC,YAA2C;AAC/E,KAAI;AACH,SAAOR,UAAUQ,QAAQ;SAClB;AACP;;;;;;AAOF,MAAaE,qBAAqBC,UAAkD;AAGnF,SAFkBE,MAAMC,QAAQH,MAAM,GAAGA,QAAQ,CAACA,MAAM,EAEvCI,IAAIR,qBAAqB,CAACS,QAAQC,MAAM,CAAC,CAACA,EAAE;;;;;AAM9D,MAAaC,uBAAuBP,OAAoBQ,UAA8C;CACrG,MAAMC,SAAST,MAAMI,KAAKM,SAASA,KAAKC,UAAU,CAAC;AAEnD,QAAOH,QAAQ,CAACC,OAAO,IAAIA,OAAO,GAAG,GAAGA,OAAO;;;;;AAMhD,MAAMG,mBAAmBF,SAA4B;AAIpD,QAAO,GAHaI,OAAOJ,KAAKK,MAAM,CAACC,SAAS,GAAG,IAAI,CAGlC,GAFHF,OAAOJ,KAAKQ,IAAI,CAACF,SAAS,GAAG,IAAI,CAEjB,GAAIF,OAAOJ,KAAKS,KAAK;;;;;;;AAQxD,MAAaC,wBAAwBC,OAAoBb,UAA2B;AACnF,KAAIa,MAAMC,WAAW,EACpB,QAAO;CAER,MAAMC,WAAWF,MAAMjB,IAAIQ,gBAAgB;AAE3C,QAAOJ,QAAQe,SAASC,KAAK,MAAM,GAA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OAAO;EAA0D;AAG3F,KAAI,CAACwD,OAAOtD,SAAS,CAACsD,OAAOrD,IAC5B,QAAO;EAAEJ,SAAS;EAAOC,OAAO;EAAyC;CAG1E,MAAMqD,YAAYpB,gBAAgBuB,OAAOtD,MAAM;CAC/C,MAAMoD,UAAUrB,gBAAgBuB,OAAOrD,IAAI;AAE3C,KAAI,CAACkD,aAAa,CAACC,QAClB,QAAO;EAAEvD,SAAS;EAAOC,OAAO;EAAuC;AAIxE,KAAIqD,UAAUO,QAAQN,QAAQ,GAAG,EAChC,QAAO;EAAEvD,SAAS;EAAOC,OAAO;EAAkD;AAInF,KAAI0D,OAAOL,UAAUO,QAAQF,IAAI,GAAG,EACnC,QAAO;EAAE3D,SAAS;EAAOC,OAAO;EAA6C;AAE9E,KAAI2D,OAAOL,QAAQM,QAAQD,IAAI,GAAG,EACjC,QAAO;EAAE5D,SAAS;EAAOC,OAAO;EAA0C;AAG3E,QAAO,EAAED,SAAS,MAAM"}
|
|
1
|
+
{"version":3,"file":"ds-date-input.utils.js","names":["DateValue","CalendarDate","parseDate","DateInputValidation","isValid","error","ParsedDateRange","start","end","isoStringToDateValue","isoDate","undefined","stringToDateValue","dates","dateArray","Array","isArray","map","filter","d","dateValuesToStrings","range","values","date","toString","formatDateValue","paddedMonth","String","month","padStart","paddedDay","day","year","formatDateInputValue","value","length","newValue","join","parseDateString","dateStr","trim","match","monthNum","parseInt","dayNum","yearNum","Date","getFullYear","getMonth","getDate","parseRangeInput","text","includes","parts","split","p","startStr","endStr","startDate","endDate","parseInputText","parsed","validateDateString","min","max","compare"],"sources":["../../../src/components/ds-date-input/ds-date-input.utils.ts"],"sourcesContent":["import { type DateValue } from '@ark-ui/react/date-picker';\nimport { CalendarDate, parseDate } from '@internationalized/date';\n\n/**\n * Validation result for date input\n */\ninterface DateInputValidation {\n\tisValid: boolean;\n\terror?: string;\n}\n\n/**\n * Parsed date range result\n */\ninterface ParsedDateRange {\n\tstart: string | null;\n\tend: string | null;\n\tisValid: boolean;\n}\n\n/**\n * Convert ISO date string to DateValue\n */\nexport const isoStringToDateValue = (isoDate: string): DateValue | undefined => {\n\ttry {\n\t\treturn parseDate(isoDate) as unknown as DateValue;\n\t} catch {\n\t\treturn undefined;\n\t}\n};\n\n/**\n * Convert string or tuple to DateValue array (for internal use with Ark UI)\n */\nexport const stringToDateValue = (dates: string | [string, string]): DateValue[] => {\n\tconst dateArray = Array.isArray(dates) ? dates : [dates];\n\n\treturn dateArray.map(isoStringToDateValue).filter((d) => !!d);\n};\n\n/**\n * Convert DateValue array to string or tuple (for public API)\n */\nexport const dateValuesToStrings = (dates: DateValue[], range: boolean): string | [string, string] => {\n\tconst values = dates.map((date) => date.toString());\n\n\tif (range) {\n\t\treturn [values[0] ?? '', values[1] ?? ''];\n\t}\n\n\treturn values[0] ?? '';\n};\n\n/**\n * Format a DateValue to string (MM/DD/YYYY)\n */\nconst formatDateValue = (date: DateValue): string => {\n\tconst paddedMonth = String(date.month).padStart(2, '0');\n\tconst paddedDay = String(date.day).padStart(2, '0');\n\n\treturn `${paddedMonth}/${paddedDay}/${String(date.year)}`;\n};\n\n/**\n * Format an array of DateValues to a unified string\n * Single: \"12/25/2024\"\n * Range: \"12/01/2024 - 12/31/2024\"\n */\nexport const formatDateInputValue = (value: DateValue[], range: boolean): string => {\n\tif (value.length === 0) {\n\t\treturn '';\n\t}\n\tconst newValue = value.map(formatDateValue);\n\n\treturn range ? newValue.join(' - ') : (newValue[0] ?? '');\n};\n\n/**\n * Parse a date string (MM/DD/YYYY) to DateValue\n */\nconst parseDateString = (dateStr: string): DateValue | null => {\n\tif (!dateStr || !dateStr.trim()) {\n\t\treturn null;\n\t}\n\n\t// Try MM/DD/YYYY format\n\tconst match = dateStr.trim().match(/^(\\d{1,2})\\/(\\d{1,2})\\/(\\d{4})$/);\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [, month, day, year] = match;\n\n\tif (!month || !day || !year) {\n\t\treturn null;\n\t}\n\n\tconst monthNum = parseInt(month, 10);\n\tconst dayNum = parseInt(day, 10);\n\tconst yearNum = parseInt(year, 10);\n\n\t// Use native Date for proper validation (handles leap years, month lengths, etc.)\n\t// Note: Date months are 0-indexed, so subtract 1\n\tconst date = new Date(yearNum, monthNum - 1, dayNum);\n\n\t// Check if the date is valid and matches what we parsed\n\t// (e.g., 02/31/2024 would roll over to 03/02/2024, so we detect that)\n\tif (date.getFullYear() !== yearNum || date.getMonth() !== monthNum - 1 || date.getDate() !== dayNum) {\n\t\treturn null;\n\t}\n\n\treturn new CalendarDate(yearNum, monthNum, dayNum) as unknown as DateValue;\n};\n\n/**\n * Parse a range input string (MM/DD/YYYY - MM/DD/YYYY)\n */\nconst parseRangeInput = (text: string): ParsedDateRange => {\n\tif (!text.trim()) {\n\t\treturn { start: null, end: null, isValid: true }; // Empty is valid\n\t}\n\n\t// Check if it contains a dash separator\n\tif (!text.includes('-')) {\n\t\t// Single date format, treat as incomplete range\n\t\tconst date = parseDateString(text.trim());\n\t\treturn {\n\t\t\tstart: date ? formatDateValue(date) : null,\n\t\t\tend: null,\n\t\t\tisValid: false, // Incomplete range\n\t\t};\n\t}\n\n\t// Split by dash\n\tconst parts = text.split('-').map((p) => p.trim());\n\tif (parts.length !== 2) {\n\t\treturn { start: null, end: null, isValid: false };\n\t}\n\n\tconst [startStr, endStr] = parts;\n\n\tif (!startStr || !endStr) {\n\t\treturn { start: null, end: null, isValid: false };\n\t}\n\n\tconst startDate = parseDateString(startStr);\n\tconst endDate = parseDateString(endStr);\n\n\t// Both must be valid dates\n\tif (!startDate || !endDate) {\n\t\treturn {\n\t\t\tstart: startDate ? formatDateValue(startDate) : null,\n\t\t\tend: endDate ? formatDateValue(endDate) : null,\n\t\t\tisValid: false,\n\t\t};\n\t}\n\n\treturn {\n\t\tstart: formatDateValue(startDate),\n\t\tend: formatDateValue(endDate),\n\t\tisValid: true,\n\t};\n};\n\n/**\n * Parse input text based on range flag\n */\nexport const parseInputText = (text: string, range: boolean): DateValue[] => {\n\tif (!range) {\n\t\tconst date = parseDateString(text);\n\t\treturn date ? [date] : [];\n\t}\n\n\t// Range mode\n\tconst parsed = parseRangeInput(text);\n\tif (!parsed.isValid || !parsed.start || !parsed.end) {\n\t\treturn [];\n\t}\n\n\tconst startDate = parseDateString(parsed.start);\n\tconst endDate = parseDateString(parsed.end);\n\n\tif (!startDate || !endDate) {\n\t\treturn [];\n\t}\n\n\treturn [startDate, endDate];\n};\n\n/**\n * Validate date input\n */\nexport const validateDateString = ({\n\ttext,\n\trange,\n\tmin,\n\tmax,\n}: {\n\ttext: string;\n\trange: boolean;\n\tmin?: DateValue;\n\tmax?: DateValue;\n}): DateInputValidation => {\n\tif (!text.trim()) {\n\t\treturn { isValid: true }; // Empty is valid (let required validation handle it)\n\t}\n\n\tif (!range) {\n\t\tconst date = parseDateString(text);\n\t\tif (!date) {\n\t\t\treturn { isValid: false, error: 'Invalid date format. Use MM/DD/YYYY' };\n\t\t}\n\n\t\t// Check min/max\n\t\tif (min && date.compare(min) < 0) {\n\t\t\treturn { isValid: false, error: 'Date is before minimum allowed date' };\n\t\t}\n\t\tif (max && date.compare(max) > 0) {\n\t\t\treturn { isValid: false, error: 'Date is after maximum allowed date' };\n\t\t}\n\n\t\treturn { isValid: true };\n\t}\n\n\t// Range mode validation\n\tconst parsed = parseRangeInput(text);\n\tif (!parsed.isValid) {\n\t\treturn { isValid: false, error: 'Invalid date range format. Use MM/DD/YYYY - MM/DD/YYYY' };\n\t}\n\n\tif (!parsed.start || !parsed.end) {\n\t\treturn { isValid: false, error: 'Both start and end dates are required' };\n\t}\n\n\tconst startDate = parseDateString(parsed.start);\n\tconst endDate = parseDateString(parsed.end);\n\n\tif (!startDate || !endDate) {\n\t\treturn { isValid: false, error: 'Invalid date format. Use MM/DD/YYYY' };\n\t}\n\n\t// Validate start <= end\n\tif (startDate.compare(endDate) > 0) {\n\t\treturn { isValid: false, error: 'Start date must be before or equal to end date' };\n\t}\n\n\t// Check min/max\n\tif (min && startDate.compare(min) < 0) {\n\t\treturn { isValid: false, error: 'Start date is before minimum allowed date' };\n\t}\n\tif (max && endDate.compare(max) > 0) {\n\t\treturn { isValid: false, error: 'End date is after maximum allowed date' };\n\t}\n\n\treturn { isValid: true };\n};\n"],"mappings":";;;;;;;AAuBA,MAAaS,wBAAwBC,YAA2C;AAC/E,KAAI;AACH,SAAOR,UAAUQ,QAAQ;SAClB;AACP;;;;;;AAOF,MAAaE,qBAAqBC,UAAkD;AAGnF,SAFkBE,MAAMC,QAAQH,MAAM,GAAGA,QAAQ,CAACA,MAAM,EAEvCI,IAAIR,qBAAqB,CAACS,QAAQC,MAAM,CAAC,CAACA,EAAE;;;;;AAM9D,MAAaC,uBAAuBP,OAAoBQ,UAA8C;CACrG,MAAMC,SAAST,MAAMI,KAAKM,SAASA,KAAKC,UAAU,CAAC;AAEnD,KAAIH,MACH,QAAO,CAACC,OAAO,MAAM,IAAIA,OAAO,MAAM,GAAG;AAG1C,QAAOA,OAAO,MAAM;;;;;AAMrB,MAAMG,mBAAmBF,SAA4B;AAIpD,QAAO,GAHaI,OAAOJ,KAAKK,MAAM,CAACC,SAAS,GAAG,IAAI,CAGlC,GAFHF,OAAOJ,KAAKQ,IAAI,CAACF,SAAS,GAAG,IAAI,CAEjB,GAAIF,OAAOJ,KAAKS,KAAK;;;;;;;AAQxD,MAAaC,wBAAwBC,OAAoBb,UAA2B;AACnF,KAAIa,MAAMC,WAAW,EACpB,QAAO;CAER,MAAMC,WAAWF,MAAMjB,IAAIQ,gBAAgB;AAE3C,QAAOJ,QAAQe,SAASC,KAAK,MAAM,GAAID,SAAS,MAAM;;;;;AAMvD,MAAME,mBAAmBC,YAAsC;AAC9D,KAAI,CAACA,WAAW,CAACA,QAAQC,MAAM,CAC9B,QAAO;CAIR,MAAMC,QAAQF,QAAQC,MAAM,CAACC,MAAM,kCAAkC;AACrE,KAAI,CAACA,MACJ,QAAO;CAGR,MAAM,GAAGb,OAAOG,KAAKC,QAAQS;AAE7B,KAAI,CAACb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AAO;EAAyC;CAG1E,MAAMqD,YAAYpB,gBAAgBuB,OAAOtD,MAAM;CAC/C,MAAMoD,UAAUrB,gBAAgBuB,OAAOrD,IAAI;AAE3C,KAAI,CAACkD,aAAa,CAACC,QAClB,QAAO;EAAEvD,SAAS;EAAOC,OAAO;EAAuC;AAIxE,KAAIqD,UAAUO,QAAQN,QAAQ,GAAG,EAChC,QAAO;EAAEvD,SAAS;EAAOC,OAAO;EAAkD;AAInF,KAAI0D,OAAOL,UAAUO,QAAQF,IAAI,GAAG,EACnC,QAAO;EAAE3D,SAAS;EAAOC,OAAO;EAA6C;AAE9E,KAAI2D,OAAOL,QAAQM,QAAQD,IAAI,GAAG,EACjC,QAAO;EAAE5D,SAAS;EAAOC,OAAO;EAA0C;AAG3E,QAAO,EAAED,SAAS,MAAM"}
|
|
@@ -43,11 +43,11 @@ const DsDrawer = (t0) => {
|
|
|
43
43
|
$[2] = backdrop;
|
|
44
44
|
$[3] = t8;
|
|
45
45
|
} else t8 = $[3];
|
|
46
|
-
const t9 = require_ds_drawer_module.default[`
|
|
47
|
-
const t10 = require_ds_drawer_module.default[`
|
|
46
|
+
const t9 = require_ds_drawer_module.default[`position-${position}`];
|
|
47
|
+
const t10 = require_ds_drawer_module.default[`cols-${String(columns)}`];
|
|
48
48
|
let t11;
|
|
49
49
|
if ($[4] !== className || $[5] !== t10 || $[6] !== t9) {
|
|
50
|
-
t11 = (0, classnames.default)(require_ds_drawer_module.default.drawer, t9,
|
|
50
|
+
t11 = (0, classnames.default)(require_ds_drawer_module.default.drawer, t9, className, t10);
|
|
51
51
|
$[4] = className;
|
|
52
52
|
$[5] = t10;
|
|
53
53
|
$[6] = t9;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsDrawerProps } from "./ds-drawer.types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import { CSSProperties, ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/ds-drawer/ds-drawer.d.ts
|
|
@@ -22,7 +22,7 @@ declare const DsDrawer: {
|
|
|
22
22
|
style,
|
|
23
23
|
className,
|
|
24
24
|
children
|
|
25
|
-
}: DsDrawerProps):
|
|
25
|
+
}: DsDrawerProps): react_jsx_runtime0.JSX.Element;
|
|
26
26
|
Header: ({
|
|
27
27
|
style,
|
|
28
28
|
className,
|
|
@@ -31,7 +31,7 @@ declare const DsDrawer: {
|
|
|
31
31
|
style?: CSSProperties;
|
|
32
32
|
className?: string;
|
|
33
33
|
children: ReactNode;
|
|
34
|
-
}) =>
|
|
34
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
35
35
|
Title: ({
|
|
36
36
|
style,
|
|
37
37
|
className,
|
|
@@ -40,14 +40,14 @@ declare const DsDrawer: {
|
|
|
40
40
|
style?: CSSProperties;
|
|
41
41
|
className?: string;
|
|
42
42
|
children: ReactNode;
|
|
43
|
-
}) =>
|
|
43
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
44
44
|
CloseTrigger: ({
|
|
45
45
|
style,
|
|
46
46
|
className
|
|
47
47
|
}: {
|
|
48
48
|
style?: CSSProperties;
|
|
49
49
|
className?: string;
|
|
50
|
-
}) =>
|
|
50
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
51
51
|
Toolbar: ({
|
|
52
52
|
style,
|
|
53
53
|
className,
|
|
@@ -56,7 +56,7 @@ declare const DsDrawer: {
|
|
|
56
56
|
style?: CSSProperties;
|
|
57
57
|
className?: string;
|
|
58
58
|
children: ReactNode;
|
|
59
|
-
}) =>
|
|
59
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
60
60
|
Body: ({
|
|
61
61
|
style,
|
|
62
62
|
className,
|
|
@@ -65,7 +65,7 @@ declare const DsDrawer: {
|
|
|
65
65
|
style?: CSSProperties;
|
|
66
66
|
className?: string;
|
|
67
67
|
children: ReactNode;
|
|
68
|
-
}) =>
|
|
68
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
69
69
|
Footer: ({
|
|
70
70
|
style,
|
|
71
71
|
className,
|
|
@@ -74,7 +74,7 @@ declare const DsDrawer: {
|
|
|
74
74
|
style?: CSSProperties;
|
|
75
75
|
className?: string;
|
|
76
76
|
children: ReactNode;
|
|
77
|
-
}) =>
|
|
77
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
78
78
|
Actions: ({
|
|
79
79
|
style,
|
|
80
80
|
className,
|
|
@@ -83,7 +83,7 @@ declare const DsDrawer: {
|
|
|
83
83
|
style?: CSSProperties;
|
|
84
84
|
className?: string;
|
|
85
85
|
children: ReactNode;
|
|
86
|
-
}) =>
|
|
86
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
87
87
|
};
|
|
88
88
|
//#endregion
|
|
89
89
|
export { DsDrawer };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-drawer.d.cts","names":[],"sources":["../../../src/components/ds-drawer/ds-drawer.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAIuD;;cAUjD;;;;;;;;;;;;;KAYH,gBAAa,
|
|
1
|
+
{"version":3,"file":"ds-drawer.d.cts","names":[],"sources":["../../../src/components/ds-drawer/ds-drawer.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAIuD;;cAUjD;;;;;;;;;;;;;KAYH,gBAAa,kBAAA,CAAA,GAAA,CAAA;;;;;;YA2CP;;cAEE;QACV,kBAAA,CAAA,GAAA,CAAA;;;;;EA9Ce;YAyDP;;IAzDN,QAAA,EA2DQ,SA3DR;EAAa,CAAA,EAAA,GA4Df,kBAAA,CAAA,GAAA,CAAA,OA5De;;;;EA2CP;YAuB6C;;EAvB7C,CAAA,EAAA,GAuBgF,kBAAA,CAAA,GAAA,CAAA,OAvBhF;EAEE,OAAA,EAAA,CAAA;IAAA,KAAA;IAAA,SAAA;IAAA;GAAA,EAAA;IACV,KAAA,CAAA,EA+BQ,aA/BR;;cAiCU;QACV,kBAAA,CAAA,GAAA,CAAA;EAvBQ,IAAA,EAAA,CAAA;IAAA,KAAA;IAAA,SAAA;IAAA;GAAA,EAAA;IAEE,KAAA,CAAA,EAgCF,aAhCE;IACV,SAAA,CAAA,EAAA,MAAA;cAiCU;QACV,kBAAA,CAAA,GAAA,CAAA;EA5BqD,MAAA,EAAA,CAAA;IAAA,KAAA;IAAA,SAAA;IAAA;GAAA,EAAA;IAAmC,KAAA,CAAA,EAuChF,aAvCgF;;cAyC9E;QACV,kBAAA,CAAA,GAAA,CAAA;EA/BQ,OAAA,EAAA,CAAA;IAAA,KAAA;IAAA,SAAA;IAAA;GAAA,EAAA;IAEE,KAAA,CAAA,EAwCF,aAxCE;IACV,SAAA,CAAA,EAAA,MAAA;cAyCU;QACV,kBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsDrawerProps } from "./ds-drawer.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime33 from "react/jsx-runtime";
|
|
3
3
|
import { CSSProperties, ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/ds-drawer/ds-drawer.d.ts
|
|
@@ -22,7 +22,7 @@ declare const DsDrawer: {
|
|
|
22
22
|
style,
|
|
23
23
|
className,
|
|
24
24
|
children
|
|
25
|
-
}: DsDrawerProps):
|
|
25
|
+
}: DsDrawerProps): react_jsx_runtime33.JSX.Element;
|
|
26
26
|
Header: ({
|
|
27
27
|
style,
|
|
28
28
|
className,
|
|
@@ -31,7 +31,7 @@ declare const DsDrawer: {
|
|
|
31
31
|
style?: CSSProperties;
|
|
32
32
|
className?: string;
|
|
33
33
|
children: ReactNode;
|
|
34
|
-
}) =>
|
|
34
|
+
}) => react_jsx_runtime33.JSX.Element;
|
|
35
35
|
Title: ({
|
|
36
36
|
style,
|
|
37
37
|
className,
|
|
@@ -40,14 +40,14 @@ declare const DsDrawer: {
|
|
|
40
40
|
style?: CSSProperties;
|
|
41
41
|
className?: string;
|
|
42
42
|
children: ReactNode;
|
|
43
|
-
}) =>
|
|
43
|
+
}) => react_jsx_runtime33.JSX.Element;
|
|
44
44
|
CloseTrigger: ({
|
|
45
45
|
style,
|
|
46
46
|
className
|
|
47
47
|
}: {
|
|
48
48
|
style?: CSSProperties;
|
|
49
49
|
className?: string;
|
|
50
|
-
}) =>
|
|
50
|
+
}) => react_jsx_runtime33.JSX.Element;
|
|
51
51
|
Toolbar: ({
|
|
52
52
|
style,
|
|
53
53
|
className,
|
|
@@ -56,7 +56,7 @@ declare const DsDrawer: {
|
|
|
56
56
|
style?: CSSProperties;
|
|
57
57
|
className?: string;
|
|
58
58
|
children: ReactNode;
|
|
59
|
-
}) =>
|
|
59
|
+
}) => react_jsx_runtime33.JSX.Element;
|
|
60
60
|
Body: ({
|
|
61
61
|
style,
|
|
62
62
|
className,
|
|
@@ -65,7 +65,7 @@ declare const DsDrawer: {
|
|
|
65
65
|
style?: CSSProperties;
|
|
66
66
|
className?: string;
|
|
67
67
|
children: ReactNode;
|
|
68
|
-
}) =>
|
|
68
|
+
}) => react_jsx_runtime33.JSX.Element;
|
|
69
69
|
Footer: ({
|
|
70
70
|
style,
|
|
71
71
|
className,
|
|
@@ -74,7 +74,7 @@ declare const DsDrawer: {
|
|
|
74
74
|
style?: CSSProperties;
|
|
75
75
|
className?: string;
|
|
76
76
|
children: ReactNode;
|
|
77
|
-
}) =>
|
|
77
|
+
}) => react_jsx_runtime33.JSX.Element;
|
|
78
78
|
Actions: ({
|
|
79
79
|
style,
|
|
80
80
|
className,
|
|
@@ -83,7 +83,7 @@ declare const DsDrawer: {
|
|
|
83
83
|
style?: CSSProperties;
|
|
84
84
|
className?: string;
|
|
85
85
|
children: ReactNode;
|
|
86
|
-
}) =>
|
|
86
|
+
}) => react_jsx_runtime33.JSX.Element;
|
|
87
87
|
};
|
|
88
88
|
//#endregion
|
|
89
89
|
export { DsDrawer };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-drawer.d.ts","names":[],"sources":["../../../src/components/ds-drawer/ds-drawer.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAIuD;;cAUjD;;;;;;;;;;;;;KAYH,gBAAa,mBAAA,CAAA,GAAA,CAAA;;;;;;
|
|
1
|
+
{"version":3,"file":"ds-drawer.d.ts","names":[],"sources":["../../../src/components/ds-drawer/ds-drawer.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;AAIuD;;cAUjD;;;;;;;;;;;;;KAYH,gBAAa,mBAAA,CAAA,GAAA,CAAA;;;;;;YA2CP;;cAEE;QACV,mBAAA,CAAA,GAAA,CAAA;;;;;EA9Ce;YAyDP;;IAzDN,QAAA,EA2DQ,SA3DR;EAAa,CAAA,EAAA,GA4Df,mBAAA,CAAA,GAAA,CAAA,OA5De;;;;EA2CP;YAuB6C;;EAvB7C,CAAA,EAAA,GAuBgF,mBAAA,CAAA,GAAA,CAAA,OAvBhF;EAEE,OAAA,EAAA,CAAA;IAAA,KAAA;IAAA,SAAA;IAAA;GAAA,EAAA;IACV,KAAA,CAAA,EA+BQ,aA/BR;;cAiCU;QACV,mBAAA,CAAA,GAAA,CAAA;EAvBQ,IAAA,EAAA,CAAA;IAAA,KAAA;IAAA,SAAA;IAAA;GAAA,EAAA;IAEE,KAAA,CAAA,EAgCF,aAhCE;IACV,SAAA,CAAA,EAAA,MAAA;cAiCU;QACV,mBAAA,CAAA,GAAA,CAAA;EA5BqD,MAAA,EAAA,CAAA;IAAA,KAAA;IAAA,SAAA;IAAA;GAAA,EAAA;IAAmC,KAAA,CAAA,EAuChF,aAvCgF;;cAyC9E;QACV,mBAAA,CAAA,GAAA,CAAA;EA/BQ,OAAA,EAAA,CAAA;IAAA,KAAA;IAAA,SAAA;IAAA;GAAA,EAAA;IAEE,KAAA,CAAA,EAwCF,aAxCE;IACV,SAAA,CAAA,EAAA,MAAA;cAyCU;QACV,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -41,11 +41,11 @@ const DsDrawer = (t0) => {
|
|
|
41
41
|
$[2] = backdrop;
|
|
42
42
|
$[3] = t8;
|
|
43
43
|
} else t8 = $[3];
|
|
44
|
-
const t9 = ds_drawer_module_default[`
|
|
45
|
-
const t10 = ds_drawer_module_default[`
|
|
44
|
+
const t9 = ds_drawer_module_default[`position-${position}`];
|
|
45
|
+
const t10 = ds_drawer_module_default[`cols-${String(columns)}`];
|
|
46
46
|
let t11;
|
|
47
47
|
if ($[4] !== className || $[5] !== t10 || $[6] !== t9) {
|
|
48
|
-
t11 = classNames(ds_drawer_module_default.drawer, t9,
|
|
48
|
+
t11 = classNames(ds_drawer_module_default.drawer, t9, className, t10);
|
|
49
49
|
$[4] = className;
|
|
50
50
|
$[5] = t10;
|
|
51
51
|
$[6] = t9;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-drawer.js","names":["CSSProperties","ReactNode","Fragment","Dialog","Portal","classNames","DsDrawerProps","styles","DsIcon","DsTypography","DsDrawer","t0","$","_c","open","onOpenChange","columns","t1","position","t2","backdrop","t3","closeOnEscape","t4","closeOnInteractOutside","t5","portal","t6","style","className","children","undefined","t7","details","handleOpenChange","Wrapper","t8","t9","String","t10","t11","drawer","t12","content","t13","positioner","t14","t15","Header","header","Title","title","CloseTrigger","closeTrigger","Symbol","for","Toolbar","toolbar","Body","body","Footer","footer","Actions","actions"],"sources":["../../../src/components/ds-drawer/ds-drawer.tsx"],"sourcesContent":["import { type CSSProperties, type ReactNode, Fragment } from 'react';\nimport { Dialog } from '@ark-ui/react/dialog';\nimport { Portal } from '@ark-ui/react/portal';\nimport classNames from 'classnames';\nimport type { DsDrawerProps } from './ds-drawer.types';\nimport styles from './ds-drawer.module.scss';\nimport { DsIcon } from '../ds-icon';\nimport { DsTypography } from '../ds-typography';\n\n/**\n * Composable drawer component.\n * Supports grid-based sizing, flexible positioning, and compound components.\n * Use columns prop to control drawer width (1-12 grid columns).\n */\nconst DsDrawer = ({\n\topen,\n\tonOpenChange,\n\tcolumns = 4,\n\tposition = 'end',\n\tbackdrop = false,\n\tcloseOnEscape = true,\n\tcloseOnInteractOutside = false,\n\tportal = false,\n\tstyle,\n\tclassName,\n\tchildren,\n}: DsDrawerProps) => {\n\tconst handleOpenChange = (details: { open: boolean }) => {\n\t\tonOpenChange(details.open);\n\t};\n\tconst Wrapper = portal ? Portal : Fragment;\n\n\treturn (\n\t\t<Dialog.Root\n\t\t\topen={open}\n\t\t\tonOpenChange={handleOpenChange}\n\t\t\tmodal={backdrop}\n\t\t\tcloseOnEscape={closeOnEscape}\n\t\t\tcloseOnInteractOutside={closeOnInteractOutside}\n\t\t\tpreventScroll={backdrop}\n\t\t>\n\t\t\t<Wrapper>\n\t\t\t\t{backdrop && <Dialog.Backdrop className={styles.backdrop} />}\n\t\t\t\t<Dialog.Positioner className={styles.positioner}>\n\t\t\t\t\t<Dialog.Content\n\t\t\t\t\t\tstyle={style}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\tstyles.drawer,\n\t\t\t\t\t\t\tstyles[`cols-${String(columns)}`],\n\t\t\t\t\t\t\tstyles[`position-${position}`],\n\t\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className={styles.content}>{children}</div>\n\t\t\t\t\t</Dialog.Content>\n\t\t\t\t</Dialog.Positioner>\n\t\t\t</Wrapper>\n\t\t</Dialog.Root>\n\t);\n};\n\nconst Header = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<div style={style} className={classNames(styles.header, className)}>\n\t\t{children}\n\t</div>\n);\n\nconst Title = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<Dialog.Title className={classNames(styles.title, className)} style={style} asChild>\n\t\t<DsTypography variant=\"heading3\">{children}</DsTypography>\n\t</Dialog.Title>\n);\n\nconst CloseTrigger = ({ style, className }: { style?: CSSProperties; className?: string }) => (\n\t<Dialog.CloseTrigger style={style} className={classNames(styles.closeTrigger, className)}>\n\t\t<DsIcon icon=\"close\" size=\"small\" />\n\t</Dialog.CloseTrigger>\n);\n\nconst Toolbar = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<div style={style} className={classNames(styles.toolbar, className)}>\n\t\t{children}\n\t</div>\n);\n\nconst Body = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<div style={style} className={classNames(styles.body, className)}>\n\t\t{children}\n\t</div>\n);\n\nconst Footer = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<div style={style} className={classNames(styles.footer, className)}>\n\t\t{children}\n\t</div>\n);\n\nconst Actions = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<div style={style} className={classNames(styles.actions, className)}>\n\t\t{children}\n\t</div>\n);\n\nDsDrawer.Header = Header;\nDsDrawer.Title = Title;\nDsDrawer.CloseTrigger = CloseTrigger;\nDsDrawer.Toolbar = Toolbar;\nDsDrawer.Body = Body;\nDsDrawer.Footer = Footer;\nDsDrawer.Actions = Actions;\n\nexport default DsDrawer;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAcA,MAAMU,YAAWC,OAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAAC,MAAA,EAAAC,MAAAC,cAAAC,SAAAC,IAAAC,UAAAC,IAAAC,UAAAC,IAAAC,eAAAC,IAAAC,wBAAAC,IAAAC,QAAAC,IAAAC,OAAAC,WAAAC,aAAAnB;CAGjB,MAAAK,UAAAC,OAAAc,SAAA,IAAAd;CACA,MAAAC,WA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AO;OAAAA,MAAAP,EAAA;AAAA,QAFNO;;AAKDT,SAASsC,SAASA;AAClBtC,SAASwC,QAAQA;AACjBxC,SAAS0C,eAAeA;AACxB1C,SAAS8C,UAAUA;AACnB9C,SAASgD,OAAOA;AAChBhD,SAASkD,SAASA;AAClBlD,SAASoD,UAAUA;AAEnB,wBAAepD"}
|
|
1
|
+
{"version":3,"file":"ds-drawer.js","names":["CSSProperties","ReactNode","Fragment","Dialog","Portal","classNames","DsDrawerProps","styles","DsIcon","DsTypography","DsDrawer","t0","$","_c","open","onOpenChange","columns","t1","position","t2","backdrop","t3","closeOnEscape","t4","closeOnInteractOutside","t5","portal","t6","style","className","children","undefined","t7","details","handleOpenChange","Wrapper","t8","t9","t10","String","t11","drawer","t12","content","t13","positioner","t14","t15","Header","header","Title","title","CloseTrigger","closeTrigger","Symbol","for","Toolbar","toolbar","Body","body","Footer","footer","Actions","actions"],"sources":["../../../src/components/ds-drawer/ds-drawer.tsx"],"sourcesContent":["import { type CSSProperties, type ReactNode, Fragment } from 'react';\nimport { Dialog } from '@ark-ui/react/dialog';\nimport { Portal } from '@ark-ui/react/portal';\nimport classNames from 'classnames';\nimport type { DsDrawerProps } from './ds-drawer.types';\nimport styles from './ds-drawer.module.scss';\nimport { DsIcon } from '../ds-icon';\nimport { DsTypography } from '../ds-typography';\n\n/**\n * Composable drawer component.\n * Supports grid-based sizing, flexible positioning, and compound components.\n * Use columns prop to control drawer width (1-12 grid columns).\n */\nconst DsDrawer = ({\n\topen,\n\tonOpenChange,\n\tcolumns = 4,\n\tposition = 'end',\n\tbackdrop = false,\n\tcloseOnEscape = true,\n\tcloseOnInteractOutside = false,\n\tportal = false,\n\tstyle,\n\tclassName,\n\tchildren,\n}: DsDrawerProps) => {\n\tconst handleOpenChange = (details: { open: boolean }) => {\n\t\tonOpenChange(details.open);\n\t};\n\tconst Wrapper = portal ? Portal : Fragment;\n\n\treturn (\n\t\t<Dialog.Root\n\t\t\topen={open}\n\t\t\tonOpenChange={handleOpenChange}\n\t\t\tmodal={backdrop}\n\t\t\tcloseOnEscape={closeOnEscape}\n\t\t\tcloseOnInteractOutside={closeOnInteractOutside}\n\t\t\tpreventScroll={backdrop}\n\t\t>\n\t\t\t<Wrapper>\n\t\t\t\t{backdrop && <Dialog.Backdrop className={styles.backdrop} />}\n\t\t\t\t<Dialog.Positioner className={styles.positioner}>\n\t\t\t\t\t<Dialog.Content\n\t\t\t\t\t\tstyle={style}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\tstyles.drawer,\n\t\t\t\t\t\t\tstyles[`position-${position}`],\n\t\t\t\t\t\t\tclassName,\n\n\t\t\t\t\t\t\t// @ts-expect-error: these classnames are generated dynamically in scss\n\t\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n\t\t\t\t\t\t\tstyles[`cols-${String(columns)}`],\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className={styles.content}>{children}</div>\n\t\t\t\t\t</Dialog.Content>\n\t\t\t\t</Dialog.Positioner>\n\t\t\t</Wrapper>\n\t\t</Dialog.Root>\n\t);\n};\n\nconst Header = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<div style={style} className={classNames(styles.header, className)}>\n\t\t{children}\n\t</div>\n);\n\nconst Title = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<Dialog.Title className={classNames(styles.title, className)} style={style} asChild>\n\t\t<DsTypography variant=\"heading3\">{children}</DsTypography>\n\t</Dialog.Title>\n);\n\nconst CloseTrigger = ({ style, className }: { style?: CSSProperties; className?: string }) => (\n\t<Dialog.CloseTrigger style={style} className={classNames(styles.closeTrigger, className)}>\n\t\t<DsIcon icon=\"close\" size=\"small\" />\n\t</Dialog.CloseTrigger>\n);\n\nconst Toolbar = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<div style={style} className={classNames(styles.toolbar, className)}>\n\t\t{children}\n\t</div>\n);\n\nconst Body = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<div style={style} className={classNames(styles.body, className)}>\n\t\t{children}\n\t</div>\n);\n\nconst Footer = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<div style={style} className={classNames(styles.footer, className)}>\n\t\t{children}\n\t</div>\n);\n\nconst Actions = ({\n\tstyle,\n\tclassName,\n\tchildren,\n}: {\n\tstyle?: CSSProperties;\n\tclassName?: string;\n\tchildren: ReactNode;\n}) => (\n\t<div style={style} className={classNames(styles.actions, className)}>\n\t\t{children}\n\t</div>\n);\n\nDsDrawer.Header = Header;\nDsDrawer.Title = Title;\nDsDrawer.CloseTrigger = CloseTrigger;\nDsDrawer.Toolbar = Toolbar;\nDsDrawer.Body = Body;\nDsDrawer.Footer = Footer;\nDsDrawer.Actions = Actions;\n\nexport default DsDrawer;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAcA,MAAMU,YAAWC,OAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAAC,MAAA,EAAAC,MAAAC,cAAAC,SAAAC,IAAAC,UAAAC,IAAAC,UAAAC,IAAAC,eAAAC,IAAAC,wBAAAC,IAAAC,QAAAC,IAAAC,OAAAC,WAAAC,aAAAnB;CAGjB,MAAAK,UAAAC,OAAAc,SAAA,IAAAd;CACA,MAAAC,WAAAC,OAAAY,SAAA,QAAAZ;CACA,MAAAC,WAAAC,OAAAU,SAAA,QAAAV;CACA,MAAAC,gBAAAC,OAAAQ,SAAA,OAAAR;CACA,MAAAC,yBAAAC,OAAAM,S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