@drivenets/design-system 0.0.3 → 0.0.5
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 +13 -0
- package/README.md +51 -0
- package/dist/components/ds-alert-banner/ds-alert-banner.cjs +157 -52
- 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.js +157 -52
- package/dist/components/ds-alert-banner/ds-alert-banner.js.map +1 -1
- package/dist/components/ds-alert-banner/ds-alert-banner.types.d.cts.map +1 -1
- package/dist/components/ds-alert-banner/ds-alert-banner.types.js.map +1 -1
- package/dist/components/ds-breadcrumb/ds-breadcrumb.cjs +59 -16
- package/dist/components/ds-breadcrumb/ds-breadcrumb.js +59 -16
- package/dist/components/ds-breadcrumb/ds-breadcrumb.js.map +1 -1
- package/dist/components/ds-button/ds-button.cjs +18 -2
- package/dist/components/ds-button/ds-button.d.cts +2 -2
- package/dist/components/ds-button/ds-button.d.cts.map +1 -1
- package/dist/components/ds-button/ds-button.d.ts +2 -2
- package/dist/components/ds-button/ds-button.js +18 -2
- package/dist/components/ds-button/ds-button.js.map +1 -1
- package/dist/components/ds-button/versions/ds-button-legacy/ds-button-legacy.cjs +79 -10
- package/dist/components/ds-button/versions/ds-button-legacy/ds-button-legacy.js +79 -10
- 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 +78 -10
- package/dist/components/ds-button/versions/ds-button-new/ds-button-new.js +78 -10
- package/dist/components/ds-button/versions/ds-button-new/ds-button-new.js.map +1 -1
- package/dist/components/ds-checkbox/ds-checkbox.cjs +89 -18
- package/dist/components/ds-checkbox/ds-checkbox.js +89 -18
- package/dist/components/ds-checkbox/ds-checkbox.js.map +1 -1
- package/dist/components/ds-chip/ds-chip.cjs +100 -30
- package/dist/components/ds-chip/ds-chip.js +100 -30
- package/dist/components/ds-chip/ds-chip.js.map +1 -1
- package/dist/components/ds-chip-group/ds-chip-group.cjs +6 -6
- package/dist/components/ds-chip-group/ds-chip-group.js +6 -6
- package/dist/components/ds-chip-group/ds-chip-group.js.map +1 -1
- package/dist/components/ds-chip-group/hooks/use-chip-row-calculation.js.map +1 -1
- package/dist/components/ds-confirmation/ds-confirmation.cjs +210 -56
- 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-confirmation/ds-confirmation.js +210 -56
- package/dist/components/ds-confirmation/ds-confirmation.js.map +1 -1
- package/dist/components/ds-dialog/ds-dialog.js.map +1 -1
- package/dist/components/ds-drawer/ds-drawer.cjs +261 -61
- package/dist/components/ds-drawer/ds-drawer.d.cts +9 -9
- package/dist/components/ds-drawer/ds-drawer.d.ts +9 -9
- package/dist/components/ds-drawer/ds-drawer.js +261 -61
- package/dist/components/ds-drawer/ds-drawer.js.map +1 -1
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.cjs +481 -135
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.js +481 -135
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.js.map +1 -1
- package/dist/components/ds-expandable-text-input/ds-expandable-text-input.cjs +146 -56
- 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-expandable-text-input/ds-expandable-text-input.js +146 -56
- package/dist/components/ds-expandable-text-input/ds-expandable-text-input.js.map +1 -1
- package/dist/components/ds-file-upload/components/file-upload/file-upload.cjs +190 -69
- package/dist/components/ds-file-upload/components/file-upload/file-upload.js +190 -69
- package/dist/components/ds-file-upload/components/file-upload/file-upload.js.map +1 -1
- package/dist/components/ds-file-upload/components/file-upload-item/file-upload-item.cjs +273 -132
- package/dist/components/ds-file-upload/components/file-upload-item/file-upload-item.js +273 -132
- package/dist/components/ds-file-upload/components/file-upload-item/file-upload-item.js.map +1 -1
- package/dist/components/ds-file-upload/ds-file-upload.cjs +96 -16
- package/dist/components/ds-file-upload/ds-file-upload.js +96 -16
- package/dist/components/ds-file-upload/ds-file-upload.js.map +1 -1
- package/dist/components/ds-file-upload/errors/file-upload-errors.js.map +1 -1
- package/dist/components/ds-file-upload/hooks/use-file-upload.cjs +93 -93
- package/dist/components/ds-file-upload/hooks/use-file-upload.js +93 -93
- package/dist/components/ds-file-upload/hooks/use-file-upload.js.map +1 -1
- package/dist/components/ds-file-upload/types/accept-types.js.map +1 -1
- package/dist/components/ds-file-upload/utils/accept-utils.js.map +1 -1
- package/dist/components/ds-file-upload/utils/constants.js.map +1 -1
- package/dist/components/ds-file-upload/utils/file-factory.js.map +1 -1
- package/dist/components/ds-file-upload/utils/format-file-size.js.map +1 -1
- package/dist/components/ds-file-upload/utils/generate-helper-text.js.map +1 -1
- package/dist/components/ds-file-upload/utils/get-error-message.js.map +1 -1
- package/dist/components/ds-file-upload/utils/is-file-equal.js.map +1 -1
- package/dist/components/ds-form-control/ds-form-control.cjs +119 -34
- package/dist/components/ds-form-control/ds-form-control.d.cts +7 -7
- package/dist/components/ds-form-control/ds-form-control.d.ts +7 -7
- package/dist/components/ds-form-control/ds-form-control.d.ts.map +1 -1
- package/dist/components/ds-form-control/ds-form-control.js +119 -34
- package/dist/components/ds-form-control/ds-form-control.js.map +1 -1
- package/dist/components/ds-form-control/ds-form-control.types.js.map +1 -1
- package/dist/components/ds-grid/ds-grid.js.map +1 -1
- package/dist/components/ds-icon/ds-icon.cjs +84 -13
- package/dist/components/ds-icon/ds-icon.js +84 -13
- package/dist/components/ds-icon/ds-icon.js.map +1 -1
- package/dist/components/ds-icon/ds-icon.types.d.cts.map +1 -1
- package/dist/components/ds-icon/ds-icon.types.js.map +1 -1
- package/dist/components/ds-modal/ds-modal.cjs +222 -55
- package/dist/components/ds-modal/ds-modal.d.cts +8 -8
- 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 +222 -55
- package/dist/components/ds-modal/ds-modal.js.map +1 -1
- package/dist/components/ds-number-input/ds-number-input.cjs +136 -49
- package/dist/components/ds-number-input/ds-number-input.js +136 -49
- package/dist/components/ds-number-input/ds-number-input.js.map +1 -1
- package/dist/components/ds-panel/ds-panel.cjs +111 -19
- package/dist/components/ds-panel/ds-panel.d.cts +2 -2
- package/dist/components/ds-panel/ds-panel.d.cts.map +1 -1
- package/dist/components/ds-panel/ds-panel.d.ts +2 -2
- package/dist/components/ds-panel/ds-panel.js +111 -19
- package/dist/components/ds-panel/ds-panel.js.map +1 -1
- package/dist/components/ds-password-input/ds-password-input.cjs +108 -41
- package/dist/components/ds-password-input/ds-password-input.js +108 -41
- package/dist/components/ds-password-input/ds-password-input.js.map +1 -1
- package/dist/components/ds-popover/ds-popover.cjs +50 -12
- package/dist/components/ds-popover/ds-popover.js +50 -12
- package/dist/components/ds-popover/ds-popover.js.map +1 -1
- package/dist/components/ds-radio-group/ds-radio-group.cjs +209 -53
- package/dist/components/ds-radio-group/ds-radio-group.js +209 -53
- package/dist/components/ds-radio-group/ds-radio-group.js.map +1 -1
- package/dist/components/ds-segment-group/ds-segment-group.cjs +215 -0
- package/dist/components/ds-segment-group/ds-segment-group.d.cts +26 -0
- package/dist/components/ds-segment-group/ds-segment-group.d.cts.map +1 -0
- package/dist/components/ds-segment-group/ds-segment-group.d.ts +26 -0
- package/dist/components/ds-segment-group/ds-segment-group.d.ts.map +1 -0
- package/dist/components/ds-segment-group/ds-segment-group.js +214 -0
- package/dist/components/ds-segment-group/ds-segment-group.js.map +1 -0
- package/dist/components/ds-segment-group/ds-segment-group.module.cjs +12 -0
- package/dist/components/ds-segment-group/ds-segment-group.module.js +12 -0
- package/dist/components/ds-segment-group/ds-segment-group.module.js.map +1 -0
- package/dist/components/ds-segment-group/ds-segment-group.types.cjs +2 -0
- package/dist/components/ds-segment-group/ds-segment-group.types.d.cts +52 -0
- package/dist/components/ds-segment-group/ds-segment-group.types.d.cts.map +1 -0
- package/dist/components/ds-segment-group/ds-segment-group.types.d.ts +52 -0
- package/dist/components/ds-segment-group/ds-segment-group.types.d.ts.map +1 -0
- package/dist/components/ds-segment-group/ds-segment-group.types.js +2 -0
- package/dist/components/ds-segment-group/index.cjs +2 -0
- package/dist/components/ds-segment-group/index.d.ts +2 -0
- package/dist/components/ds-segment-group/index.js +2 -0
- package/dist/components/ds-select/ds-select.cjs +198 -89
- package/dist/components/ds-select/ds-select.d.cts +2 -2
- package/dist/components/ds-select/ds-select.d.cts.map +1 -1
- package/dist/components/ds-select/ds-select.d.ts +2 -2
- package/dist/components/ds-select/ds-select.js +198 -89
- package/dist/components/ds-select/ds-select.js.map +1 -1
- package/dist/components/ds-select/select-items-chips.cjs +73 -22
- package/dist/components/ds-select/select-items-chips.js +73 -22
- package/dist/components/ds-select/select-items-chips.js.map +1 -1
- package/dist/components/ds-smart-tabs/ds-smart-tabs.cjs +208 -46
- package/dist/components/ds-smart-tabs/ds-smart-tabs.d.cts +2 -2
- package/dist/components/ds-smart-tabs/ds-smart-tabs.d.cts.map +1 -1
- package/dist/components/ds-smart-tabs/ds-smart-tabs.d.ts +2 -2
- package/dist/components/ds-smart-tabs/ds-smart-tabs.d.ts.map +1 -1
- package/dist/components/ds-smart-tabs/ds-smart-tabs.js +208 -46
- package/dist/components/ds-smart-tabs/ds-smart-tabs.js.map +1 -1
- package/dist/components/ds-smart-tabs/ds-smart-tabs.types.js.map +1 -1
- package/dist/components/ds-spinner/ds-spinner.cjs +90 -20
- package/dist/components/ds-spinner/ds-spinner.js +90 -20
- package/dist/components/ds-spinner/ds-spinner.js.map +1 -1
- package/dist/components/ds-spinner/ds-spinner.types.js.map +1 -1
- package/dist/components/ds-status-badge/ds-status-badge.cjs +54 -11
- package/dist/components/ds-status-badge/ds-status-badge.js +54 -11
- package/dist/components/ds-status-badge/ds-status-badge.js.map +1 -1
- package/dist/components/ds-stepper/components/ds-step-content.cjs +59 -13
- package/dist/components/ds-stepper/components/ds-step-content.d.cts +2 -2
- package/dist/components/ds-stepper/components/ds-step-content.js +59 -13
- package/dist/components/ds-stepper/components/ds-step-content.js.map +1 -1
- package/dist/components/ds-stepper/components/ds-step-description.cjs +14 -5
- package/dist/components/ds-stepper/components/ds-step-description.js +14 -5
- package/dist/components/ds-stepper/components/ds-step-description.js.map +1 -1
- package/dist/components/ds-stepper/components/ds-step-label.cjs +14 -5
- package/dist/components/ds-stepper/components/ds-step-label.js +14 -5
- package/dist/components/ds-stepper/components/ds-step-label.js.map +1 -1
- package/dist/components/ds-stepper/components/ds-step-next-button.cjs +23 -6
- package/dist/components/ds-stepper/components/ds-step-next-button.d.cts +2 -2
- package/dist/components/ds-stepper/components/ds-step-next-button.js +23 -6
- package/dist/components/ds-stepper/components/ds-step-next-button.js.map +1 -1
- package/dist/components/ds-stepper/components/ds-step.cjs +106 -25
- package/dist/components/ds-stepper/components/ds-step.d.cts +2 -2
- package/dist/components/ds-stepper/components/ds-step.js +106 -25
- package/dist/components/ds-stepper/components/ds-step.js.map +1 -1
- package/dist/components/ds-stepper/ds-stepper.cjs +62 -15
- package/dist/components/ds-stepper/ds-stepper.d.cts +2 -2
- package/dist/components/ds-stepper/ds-stepper.d.cts.map +1 -1
- package/dist/components/ds-stepper/ds-stepper.js +62 -15
- package/dist/components/ds-stepper/ds-stepper.js.map +1 -1
- package/dist/components/ds-stepper/hooks/use-stepper.js.map +1 -1
- package/dist/components/ds-stepper/hooks/use-steps.cjs +29 -9
- package/dist/components/ds-stepper/hooks/use-steps.js +29 -9
- package/dist/components/ds-stepper/hooks/use-steps.js.map +1 -1
- package/dist/components/ds-system-status/ds-system-status.cjs +37 -7
- package/dist/components/ds-system-status/ds-system-status.js +37 -7
- package/dist/components/ds-system-status/ds-system-status.js.map +1 -1
- package/dist/components/ds-system-status/ds-system-status.types.js.map +1 -1
- package/dist/components/ds-table/components/core-table/core-table.cjs +281 -48
- package/dist/components/ds-table/components/core-table/core-table.js +281 -48
- 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 +134 -50
- package/dist/components/ds-table/components/ds-table-bulk-actions/ds-table-bulk-actions.js +134 -50
- 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-cell/ds-table-cell.cjs +140 -43
- package/dist/components/ds-table/components/ds-table-cell/ds-table-cell.js +140 -43
- package/dist/components/ds-table/components/ds-table-cell/ds-table-cell.js.map +1 -1
- package/dist/components/ds-table/components/ds-table-header/ds-table-header.cjs +37 -6
- package/dist/components/ds-table/components/ds-table-header/ds-table-header.js +37 -6
- package/dist/components/ds-table/components/ds-table-header/ds-table-header.js.map +1 -1
- package/dist/components/ds-table/components/ds-table-row/ds-table-row.cjs +272 -100
- package/dist/components/ds-table/components/ds-table-row/ds-table-row.js +272 -100
- package/dist/components/ds-table/components/ds-table-row/ds-table-row.js.map +1 -1
- package/dist/components/ds-table/context/ds-table-context.js.map +1 -1
- package/dist/components/ds-table/ds-table.cjs +15 -15
- package/dist/components/ds-table/ds-table.d.cts +2 -2
- package/dist/components/ds-table/ds-table.js +15 -15
- package/dist/components/ds-table/ds-table.js.map +1 -1
- package/dist/components/ds-table/hooks/use-drag-and-drop.cjs +126 -38
- package/dist/components/ds-table/hooks/use-drag-and-drop.js +126 -38
- package/dist/components/ds-table/hooks/use-drag-and-drop.js.map +1 -1
- package/dist/components/ds-table/utils/column-styling.js.map +1 -1
- package/dist/components/ds-table/utils/create-columns-grid-template.js.map +1 -1
- package/dist/components/ds-table/utils/merge-refs.js.map +1 -1
- package/dist/components/ds-text-input/ds-text-input.cjs +128 -43
- package/dist/components/ds-text-input/ds-text-input.js +128 -43
- package/dist/components/ds-text-input/ds-text-input.js.map +1 -1
- package/dist/components/ds-text-input/ds-text-input.types.js.map +1 -1
- package/dist/components/ds-textarea/ds-textarea.cjs +66 -22
- package/dist/components/ds-textarea/ds-textarea.js +66 -22
- package/dist/components/ds-textarea/ds-textarea.js.map +1 -1
- package/dist/components/ds-toast/ds-toast-context.cjs +62 -17
- package/dist/components/ds-toast/ds-toast-context.js +62 -17
- package/dist/components/ds-toast/ds-toast-context.js.map +1 -1
- package/dist/components/ds-toast/ds-toast.cjs +90 -26
- package/dist/components/ds-toast/ds-toast.js +90 -26
- package/dist/components/ds-toast/ds-toast.js.map +1 -1
- package/dist/components/ds-tooltip/ds-tooltip.cjs +51 -13
- package/dist/components/ds-tooltip/ds-tooltip.js +51 -13
- package/dist/components/ds-tooltip/ds-tooltip.js.map +1 -1
- package/dist/components/ds-typography/ds-typography.cjs +51 -7
- package/dist/components/ds-typography/ds-typography.config.js.map +1 -1
- package/dist/components/ds-typography/ds-typography.js +51 -7
- package/dist/components/ds-typography/ds-typography.js.map +1 -1
- package/dist/components/ds-vertical-tabs/ds-vertical-tabs.cjs +91 -30
- 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/components/ds-vertical-tabs/ds-vertical-tabs.js +91 -30
- package/dist/components/ds-vertical-tabs/ds-vertical-tabs.js.map +1 -1
- package/dist/index.cjs +3 -0
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +3 -1
- package/dist/index.min.css +1 -1
- package/package.json +8 -2
- package/src/components/ds-segment-group/ds-segment-group.module.scss +99 -0
- package/src/components/ds-segment-group/ds-segment-group.tsx +76 -0
- package/src/components/ds-segment-group/ds-segment-group.types.tsx +64 -0
- package/src/components/ds-segment-group/index.tsx +2 -0
- package/src/index.ts +1 -0
|
@@ -3,6 +3,7 @@ import "../ds-icon/index.js";
|
|
|
3
3
|
import ds_typography_default from "../ds-typography/ds-typography.js";
|
|
4
4
|
import "../ds-typography/index.js";
|
|
5
5
|
import ds_modal_module_default from "./ds-modal.module.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
6
7
|
import classNames from "classnames";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { Portal } from "@ark-ui/react/portal";
|
|
@@ -14,63 +15,229 @@ import { Dialog } from "@ark-ui/react/dialog";
|
|
|
14
15
|
* Supports custom header, footer, and body content with grid-based sizing.
|
|
15
16
|
* Use columns prop to control modal width (1-12 grid columns).
|
|
16
17
|
*/
|
|
17
|
-
const DsModal = (
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
const DsModal = (t0) => {
|
|
19
|
+
const $ = c(20);
|
|
20
|
+
const { open, onOpenChange, columns: t1, style, className, modal: t2, closeOnEscape, closeOnInteractOutside: t3, children } = t0;
|
|
21
|
+
const columns = t1 === void 0 ? 6 : t1;
|
|
22
|
+
const modal = t2 === void 0 ? true : t2;
|
|
23
|
+
const closeOnInteractOutside = t3 === void 0 ? false : t3;
|
|
24
|
+
let t4;
|
|
25
|
+
if ($[0] !== onOpenChange) {
|
|
26
|
+
t4 = (details) => {
|
|
27
|
+
onOpenChange(details.open);
|
|
28
|
+
};
|
|
29
|
+
$[0] = onOpenChange;
|
|
30
|
+
$[1] = t4;
|
|
31
|
+
} else t4 = $[1];
|
|
32
|
+
const handleOpenChange = t4;
|
|
33
|
+
let t5;
|
|
34
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
35
|
+
t5 = /* @__PURE__ */ jsx(Dialog.Backdrop, { className: ds_modal_module_default.overlay });
|
|
36
|
+
$[2] = t5;
|
|
37
|
+
} else t5 = $[2];
|
|
38
|
+
const t6 = ds_modal_module_default[`cols-${String(columns)}`];
|
|
39
|
+
let t7;
|
|
40
|
+
if ($[3] !== className || $[4] !== t6) {
|
|
41
|
+
t7 = classNames(ds_modal_module_default.modal, t6, className);
|
|
42
|
+
$[3] = className;
|
|
43
|
+
$[4] = t6;
|
|
44
|
+
$[5] = t7;
|
|
45
|
+
} else t7 = $[5];
|
|
46
|
+
let t8;
|
|
47
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
48
|
+
t8 = classNames(ds_modal_module_default.content);
|
|
49
|
+
$[6] = t8;
|
|
50
|
+
} else t8 = $[6];
|
|
51
|
+
let t9;
|
|
52
|
+
if ($[7] !== children) {
|
|
53
|
+
t9 = /* @__PURE__ */ jsx("div", {
|
|
54
|
+
className: t8,
|
|
55
|
+
children
|
|
56
|
+
});
|
|
57
|
+
$[7] = children;
|
|
58
|
+
$[8] = t9;
|
|
59
|
+
} else t9 = $[8];
|
|
60
|
+
let t10;
|
|
61
|
+
if ($[9] !== style || $[10] !== t7 || $[11] !== t9) {
|
|
62
|
+
t10 = /* @__PURE__ */ jsxs(Portal, { children: [t5, /* @__PURE__ */ jsx(Dialog.Positioner, { children: /* @__PURE__ */ jsx(Dialog.Content, {
|
|
28
63
|
style,
|
|
29
|
-
className:
|
|
30
|
-
children:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
64
|
+
className: t7,
|
|
65
|
+
children: t9
|
|
66
|
+
}) })] });
|
|
67
|
+
$[9] = style;
|
|
68
|
+
$[10] = t7;
|
|
69
|
+
$[11] = t9;
|
|
70
|
+
$[12] = t10;
|
|
71
|
+
} else t10 = $[12];
|
|
72
|
+
let t11;
|
|
73
|
+
if ($[13] !== closeOnEscape || $[14] !== closeOnInteractOutside || $[15] !== handleOpenChange || $[16] !== modal || $[17] !== open || $[18] !== t10) {
|
|
74
|
+
t11 = /* @__PURE__ */ jsx(Dialog.Root, {
|
|
75
|
+
open,
|
|
76
|
+
onOpenChange: handleOpenChange,
|
|
77
|
+
modal,
|
|
78
|
+
closeOnEscape,
|
|
79
|
+
closeOnInteractOutside,
|
|
80
|
+
children: t10
|
|
81
|
+
});
|
|
82
|
+
$[13] = closeOnEscape;
|
|
83
|
+
$[14] = closeOnInteractOutside;
|
|
84
|
+
$[15] = handleOpenChange;
|
|
85
|
+
$[16] = modal;
|
|
86
|
+
$[17] = open;
|
|
87
|
+
$[18] = t10;
|
|
88
|
+
$[19] = t11;
|
|
89
|
+
} else t11 = $[19];
|
|
90
|
+
return t11;
|
|
91
|
+
};
|
|
92
|
+
const Header = (t0) => {
|
|
93
|
+
const $ = c(6);
|
|
94
|
+
const { style, className, children } = t0;
|
|
95
|
+
let t1;
|
|
96
|
+
if ($[0] !== className) {
|
|
97
|
+
t1 = classNames(ds_modal_module_default.header, className);
|
|
98
|
+
$[0] = className;
|
|
99
|
+
$[1] = t1;
|
|
100
|
+
} else t1 = $[1];
|
|
101
|
+
let t2;
|
|
102
|
+
if ($[2] !== children || $[3] !== style || $[4] !== t1) {
|
|
103
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
104
|
+
style,
|
|
105
|
+
className: t1,
|
|
106
|
+
children
|
|
107
|
+
});
|
|
108
|
+
$[2] = children;
|
|
109
|
+
$[3] = style;
|
|
110
|
+
$[4] = t1;
|
|
111
|
+
$[5] = t2;
|
|
112
|
+
} else t2 = $[5];
|
|
113
|
+
return t2;
|
|
114
|
+
};
|
|
115
|
+
const Title = (t0) => {
|
|
116
|
+
const $ = c(8);
|
|
117
|
+
const { style, className, children } = t0;
|
|
118
|
+
let t1;
|
|
119
|
+
if ($[0] !== className) {
|
|
120
|
+
t1 = classNames(ds_modal_module_default.title, className);
|
|
121
|
+
$[0] = className;
|
|
122
|
+
$[1] = t1;
|
|
123
|
+
} else t1 = $[1];
|
|
124
|
+
let t2;
|
|
125
|
+
if ($[2] !== children) {
|
|
126
|
+
t2 = /* @__PURE__ */ jsx(ds_typography_default, {
|
|
127
|
+
variant: "heading3",
|
|
128
|
+
children
|
|
129
|
+
});
|
|
130
|
+
$[2] = children;
|
|
131
|
+
$[3] = t2;
|
|
132
|
+
} else t2 = $[3];
|
|
133
|
+
let t3;
|
|
134
|
+
if ($[4] !== style || $[5] !== t1 || $[6] !== t2) {
|
|
135
|
+
t3 = /* @__PURE__ */ jsx(Dialog.Title, {
|
|
136
|
+
className: t1,
|
|
137
|
+
style,
|
|
138
|
+
asChild: true,
|
|
139
|
+
children: t2
|
|
140
|
+
});
|
|
141
|
+
$[4] = style;
|
|
142
|
+
$[5] = t1;
|
|
143
|
+
$[6] = t2;
|
|
144
|
+
$[7] = t3;
|
|
145
|
+
} else t3 = $[7];
|
|
146
|
+
return t3;
|
|
147
|
+
};
|
|
148
|
+
const CloseTrigger = (t0) => {
|
|
149
|
+
const $ = c(4);
|
|
150
|
+
const { style, className } = t0;
|
|
151
|
+
let t1;
|
|
152
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
153
|
+
t1 = /* @__PURE__ */ jsx(ds_icon_default, {
|
|
154
|
+
icon: "close",
|
|
155
|
+
size: "small"
|
|
156
|
+
});
|
|
157
|
+
$[0] = t1;
|
|
158
|
+
} else t1 = $[0];
|
|
159
|
+
let t2;
|
|
160
|
+
if ($[1] !== className || $[2] !== style) {
|
|
161
|
+
t2 = /* @__PURE__ */ jsx(Dialog.CloseTrigger, {
|
|
162
|
+
style,
|
|
163
|
+
className,
|
|
164
|
+
children: t1
|
|
165
|
+
});
|
|
166
|
+
$[1] = className;
|
|
167
|
+
$[2] = style;
|
|
168
|
+
$[3] = t2;
|
|
169
|
+
} else t2 = $[3];
|
|
170
|
+
return t2;
|
|
171
|
+
};
|
|
172
|
+
const Body = (t0) => {
|
|
173
|
+
const $ = c(6);
|
|
174
|
+
const { style, className, children } = t0;
|
|
175
|
+
let t1;
|
|
176
|
+
if ($[0] !== className) {
|
|
177
|
+
t1 = classNames(ds_modal_module_default.body, className);
|
|
178
|
+
$[0] = className;
|
|
179
|
+
$[1] = t1;
|
|
180
|
+
} else t1 = $[1];
|
|
181
|
+
let t2;
|
|
182
|
+
if ($[2] !== children || $[3] !== style || $[4] !== t1) {
|
|
183
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
184
|
+
style,
|
|
185
|
+
className: t1,
|
|
186
|
+
children
|
|
187
|
+
});
|
|
188
|
+
$[2] = children;
|
|
189
|
+
$[3] = style;
|
|
190
|
+
$[4] = t1;
|
|
191
|
+
$[5] = t2;
|
|
192
|
+
} else t2 = $[5];
|
|
193
|
+
return t2;
|
|
194
|
+
};
|
|
195
|
+
const Footer = (t0) => {
|
|
196
|
+
const $ = c(6);
|
|
197
|
+
const { style, className, children } = t0;
|
|
198
|
+
let t1;
|
|
199
|
+
if ($[0] !== className) {
|
|
200
|
+
t1 = classNames(ds_modal_module_default.footer, className);
|
|
201
|
+
$[0] = className;
|
|
202
|
+
$[1] = t1;
|
|
203
|
+
} else t1 = $[1];
|
|
204
|
+
let t2;
|
|
205
|
+
if ($[2] !== children || $[3] !== style || $[4] !== t1) {
|
|
206
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
207
|
+
style,
|
|
208
|
+
className: t1,
|
|
209
|
+
children
|
|
210
|
+
});
|
|
211
|
+
$[2] = children;
|
|
212
|
+
$[3] = style;
|
|
213
|
+
$[4] = t1;
|
|
214
|
+
$[5] = t2;
|
|
215
|
+
} else t2 = $[5];
|
|
216
|
+
return t2;
|
|
217
|
+
};
|
|
218
|
+
const Actions = (t0) => {
|
|
219
|
+
const $ = c(6);
|
|
220
|
+
const { style, className, children } = t0;
|
|
221
|
+
let t1;
|
|
222
|
+
if ($[0] !== className) {
|
|
223
|
+
t1 = classNames(ds_modal_module_default.actions, className);
|
|
224
|
+
$[0] = className;
|
|
225
|
+
$[1] = t1;
|
|
226
|
+
} else t1 = $[1];
|
|
227
|
+
let t2;
|
|
228
|
+
if ($[2] !== children || $[3] !== style || $[4] !== t1) {
|
|
229
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
230
|
+
style,
|
|
231
|
+
className: t1,
|
|
232
|
+
children
|
|
233
|
+
});
|
|
234
|
+
$[2] = children;
|
|
235
|
+
$[3] = style;
|
|
236
|
+
$[4] = t1;
|
|
237
|
+
$[5] = t2;
|
|
238
|
+
} else t2 = $[5];
|
|
239
|
+
return t2;
|
|
36
240
|
};
|
|
37
|
-
const Header = ({ style, className, children }) => /* @__PURE__ */ jsx("div", {
|
|
38
|
-
style,
|
|
39
|
-
className: classNames(ds_modal_module_default.header, className),
|
|
40
|
-
children
|
|
41
|
-
});
|
|
42
|
-
const Title = ({ style, className, children }) => /* @__PURE__ */ jsx(Dialog.Title, {
|
|
43
|
-
className: classNames(ds_modal_module_default.title, className),
|
|
44
|
-
style,
|
|
45
|
-
asChild: true,
|
|
46
|
-
children: /* @__PURE__ */ jsx(ds_typography_default, {
|
|
47
|
-
variant: "heading3",
|
|
48
|
-
children
|
|
49
|
-
})
|
|
50
|
-
});
|
|
51
|
-
const CloseTrigger = ({ style, className }) => /* @__PURE__ */ jsx(Dialog.CloseTrigger, {
|
|
52
|
-
style,
|
|
53
|
-
className,
|
|
54
|
-
children: /* @__PURE__ */ jsx(ds_icon_default, {
|
|
55
|
-
icon: "close",
|
|
56
|
-
size: "small"
|
|
57
|
-
})
|
|
58
|
-
});
|
|
59
|
-
const Body = ({ style, className, children }) => /* @__PURE__ */ jsx("div", {
|
|
60
|
-
style,
|
|
61
|
-
className: classNames(ds_modal_module_default.body, className),
|
|
62
|
-
children
|
|
63
|
-
});
|
|
64
|
-
const Footer = ({ style, className, children }) => /* @__PURE__ */ jsx("div", {
|
|
65
|
-
style,
|
|
66
|
-
className: classNames(ds_modal_module_default.footer, className),
|
|
67
|
-
children
|
|
68
|
-
});
|
|
69
|
-
const Actions = ({ style, className, children }) => /* @__PURE__ */ jsx("div", {
|
|
70
|
-
style,
|
|
71
|
-
className: classNames(ds_modal_module_default.actions, className),
|
|
72
|
-
children
|
|
73
|
-
});
|
|
74
241
|
DsModal.Header = Header;
|
|
75
242
|
DsModal.Title = Title;
|
|
76
243
|
DsModal.CloseTrigger = CloseTrigger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-modal.js","names":["styles","DsTypography","
|
|
1
|
+
{"version":3,"file":"ds-modal.js","names":["CSSProperties","ReactNode","Dialog","Portal","classNames","DsModalProps","styles","DsIcon","DsTypography","DsModal","t0","$","_c","open","onOpenChange","columns","t1","style","className","modal","t2","closeOnEscape","closeOnInteractOutside","t3","children","undefined","t4","details","handleOpenChange","t5","Symbol","for","overlay","t6","String","t7","t8","content","t9","t10","t11","Header","header","Title","title","CloseTrigger","Body","body","Footer","footer","Actions","actions"],"sources":["../../../src/components/ds-modal/ds-modal.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\nimport { Dialog } from '@ark-ui/react/dialog';\nimport { Portal } from '@ark-ui/react/portal';\nimport classNames from 'classnames';\nimport type { DsModalProps } from './ds-modal.types';\nimport styles from './ds-modal.module.scss';\nimport { DsIcon } from '../ds-icon';\nimport { DsTypography } from '../ds-typography';\n\n/**\n * Composable modal dialog.\n * Supports custom header, footer, and body content with grid-based sizing.\n * Use columns prop to control modal width (1-12 grid columns).\n */\nconst DsModal = ({\n\topen,\n\tonOpenChange,\n\tcolumns = 6,\n\tstyle,\n\tclassName,\n\tmodal = true,\n\tcloseOnEscape,\n\tcloseOnInteractOutside = false,\n\tchildren,\n}: DsModalProps) => {\n\tconst handleOpenChange = (details: { open: boolean }) => {\n\t\tonOpenChange(details.open);\n\t};\n\n\treturn (\n\t\t<Dialog.Root\n\t\t\topen={open}\n\t\t\tonOpenChange={handleOpenChange}\n\t\t\tmodal={modal}\n\t\t\tcloseOnEscape={closeOnEscape}\n\t\t\tcloseOnInteractOutside={closeOnInteractOutside}\n\t\t>\n\t\t\t<Portal>\n\t\t\t\t<Dialog.Backdrop className={styles.overlay} />\n\t\t\t\t<Dialog.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(styles.modal, styles[`cols-${String(columns)}`], className)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className={classNames(styles.content)}>{children}</div>\n\t\t\t\t\t</Dialog.Content>\n\t\t\t\t</Dialog.Positioner>\n\t\t\t</Portal>\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={className}>\n\t\t<DsIcon icon=\"close\" size=\"small\"></DsIcon>\n\t</Dialog.CloseTrigger>\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\nDsModal.Header = Header;\nDsModal.Title = Title;\nDsModal.CloseTrigger = CloseTrigger;\nDsModal.Body = Body;\nDsModal.Footer = Footer;\nDsModal.Actions =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wBAAM6C,SAAUjC,UAAU;AAAAP,IAAA,KAAAO;AAAAP,IAAA,KAAAK;OAAAA,MAAAL,EAAA;CAAA,IAAAS;AAAA,KAAAT,EAAA,OAAAa,YAAAb,EAAA,OAAAM,SAAAN,EAAA,OAAAK,IAAA;AAAnEI,OAAA,oBAAA;GAAYH;GAAkB,WAAAD;GAC5BQ;IACI;AAAAb,IAAA,KAAAa;AAAAb,IAAA,KAAAM;AAAAN,IAAA,KAAAK;AAAAL,IAAA,KAAAS;OAAAA,MAAAT,EAAA;AAAA,QAFNS;;AAKDX,QAAQgC,SAASA;AACjBhC,QAAQkC,QAAQA;AAChBlC,QAAQoC,eAAeA;AACvBpC,QAAQqC,OAAOA;AACfrC,QAAQuC,SAASA;AACjBvC,QAAQyC,UAAUA;AAElB,uBAAezC"}
|
|
@@ -2,68 +2,155 @@ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
|
2
2
|
const require_ds_icon = require('../ds-icon/ds-icon.cjs');
|
|
3
3
|
require('../ds-icon/index.cjs');
|
|
4
4
|
const require_ds_number_input_module = require('./ds-number-input.module.cjs');
|
|
5
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
5
6
|
let classnames = require("classnames");
|
|
6
7
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
7
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
9
|
let __ark_ui_react = require("@ark-ui/react");
|
|
9
10
|
|
|
10
11
|
//#region src/components/ds-number-input/ds-number-input.tsx
|
|
11
|
-
const DsNumberInput = (
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
const DsNumberInput = (t0) => {
|
|
13
|
+
const $ = (0, react_compiler_runtime.c)(33);
|
|
14
|
+
const { id, ref, name, size: t1, onBlur, onChange, onValueChange, className, style: t2, placeholder, disabled: t3, min, max, step, value, defaultValue } = t0;
|
|
15
|
+
const size = t1 === void 0 ? "default" : t1;
|
|
16
|
+
let t4;
|
|
17
|
+
if ($[0] !== t2) {
|
|
18
|
+
t4 = t2 === void 0 ? {} : t2;
|
|
19
|
+
$[0] = t2;
|
|
20
|
+
$[1] = t4;
|
|
21
|
+
} else t4 = $[1];
|
|
22
|
+
const style = t4;
|
|
23
|
+
const disabled = t3 === void 0 ? false : t3;
|
|
24
|
+
const t5 = size === "small";
|
|
25
|
+
const t6 = size === "default";
|
|
26
|
+
let t7;
|
|
27
|
+
if ($[2] !== className || $[3] !== t5 || $[4] !== t6) {
|
|
28
|
+
t7 = (0, classnames.default)(require_ds_number_input_module.default.textInputContainer, {
|
|
29
|
+
[require_ds_number_input_module.default.small]: t5,
|
|
30
|
+
[require_ds_number_input_module.default.default]: t6
|
|
31
|
+
}, className);
|
|
32
|
+
$[2] = className;
|
|
33
|
+
$[3] = t5;
|
|
34
|
+
$[4] = t6;
|
|
35
|
+
$[5] = t7;
|
|
36
|
+
} else t7 = $[5];
|
|
37
|
+
const containerClass = t7;
|
|
38
|
+
const t8 = typeof value !== "undefined" ? String(value) : void 0;
|
|
39
|
+
const t9 = typeof defaultValue !== "undefined" ? String(defaultValue) : void 0;
|
|
40
|
+
let t10;
|
|
41
|
+
if ($[6] !== onValueChange) {
|
|
42
|
+
t10 = (details) => onValueChange?.(details.valueAsNumber);
|
|
43
|
+
$[6] = onValueChange;
|
|
44
|
+
$[7] = t10;
|
|
45
|
+
} else t10 = $[7];
|
|
46
|
+
let t11;
|
|
47
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
48
|
+
t11 = (0, classnames.default)(require_ds_number_input_module.default.iconButton);
|
|
49
|
+
$[8] = t11;
|
|
50
|
+
} else t11 = $[8];
|
|
51
|
+
let t12;
|
|
52
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
53
|
+
t12 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react.NumberInput.DecrementTrigger, {
|
|
54
|
+
asChild: true,
|
|
55
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
56
|
+
type: "button",
|
|
57
|
+
className: t11,
|
|
58
|
+
"aria-label": "Decrease value",
|
|
59
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, {
|
|
60
|
+
icon: "remove",
|
|
61
|
+
size: "tiny"
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
});
|
|
65
|
+
$[9] = t12;
|
|
66
|
+
} else t12 = $[9];
|
|
67
|
+
let t13;
|
|
68
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
69
|
+
t13 = (0, classnames.default)(require_ds_number_input_module.default.input);
|
|
70
|
+
$[10] = t13;
|
|
71
|
+
} else t13 = $[10];
|
|
72
|
+
let t14;
|
|
73
|
+
if ($[11] !== name || $[12] !== onBlur || $[13] !== onChange || $[14] !== placeholder || $[15] !== ref) {
|
|
74
|
+
t14 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react.NumberInput.Input, {
|
|
75
|
+
ref,
|
|
76
|
+
name,
|
|
77
|
+
className: t13,
|
|
78
|
+
placeholder,
|
|
79
|
+
onBlur,
|
|
80
|
+
onChange
|
|
81
|
+
});
|
|
82
|
+
$[11] = name;
|
|
83
|
+
$[12] = onBlur;
|
|
84
|
+
$[13] = onChange;
|
|
85
|
+
$[14] = placeholder;
|
|
86
|
+
$[15] = ref;
|
|
87
|
+
$[16] = t14;
|
|
88
|
+
} else t14 = $[16];
|
|
89
|
+
let t15;
|
|
90
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
91
|
+
t15 = (0, classnames.default)(require_ds_number_input_module.default.iconButton);
|
|
92
|
+
$[17] = t15;
|
|
93
|
+
} else t15 = $[17];
|
|
94
|
+
let t16;
|
|
95
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
96
|
+
t16 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react.NumberInput.IncrementTrigger, {
|
|
97
|
+
asChild: true,
|
|
98
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
99
|
+
type: "button",
|
|
100
|
+
className: t15,
|
|
101
|
+
"aria-label": "Increase value",
|
|
102
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, {
|
|
103
|
+
icon: "add",
|
|
104
|
+
size: "tiny"
|
|
105
|
+
})
|
|
106
|
+
})
|
|
107
|
+
});
|
|
108
|
+
$[18] = t16;
|
|
109
|
+
} else t16 = $[18];
|
|
110
|
+
let t17;
|
|
111
|
+
if ($[19] !== containerClass || $[20] !== style || $[21] !== t14) {
|
|
112
|
+
t17 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react.NumberInput.Control, {
|
|
26
113
|
asChild: true,
|
|
27
114
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
28
115
|
className: containerClass,
|
|
29
116
|
style,
|
|
30
117
|
children: [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
type: "button",
|
|
35
|
-
className: (0, classnames.default)(require_ds_number_input_module.default.iconButton),
|
|
36
|
-
"aria-label": "Decrease value",
|
|
37
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, {
|
|
38
|
-
icon: "remove",
|
|
39
|
-
size: "tiny"
|
|
40
|
-
})
|
|
41
|
-
})
|
|
42
|
-
}),
|
|
43
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react.NumberInput.Input, {
|
|
44
|
-
ref,
|
|
45
|
-
name,
|
|
46
|
-
className: (0, classnames.default)(require_ds_number_input_module.default.input),
|
|
47
|
-
placeholder,
|
|
48
|
-
onBlur,
|
|
49
|
-
onChange
|
|
50
|
-
}),
|
|
51
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react.NumberInput.IncrementTrigger, {
|
|
52
|
-
asChild: true,
|
|
53
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
54
|
-
type: "button",
|
|
55
|
-
className: (0, classnames.default)(require_ds_number_input_module.default.iconButton),
|
|
56
|
-
"aria-label": "Increase value",
|
|
57
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, {
|
|
58
|
-
icon: "add",
|
|
59
|
-
size: "tiny"
|
|
60
|
-
})
|
|
61
|
-
})
|
|
62
|
-
})
|
|
118
|
+
t12,
|
|
119
|
+
t14,
|
|
120
|
+
t16
|
|
63
121
|
]
|
|
64
122
|
})
|
|
65
|
-
})
|
|
66
|
-
|
|
123
|
+
});
|
|
124
|
+
$[19] = containerClass;
|
|
125
|
+
$[20] = style;
|
|
126
|
+
$[21] = t14;
|
|
127
|
+
$[22] = t17;
|
|
128
|
+
} else t17 = $[22];
|
|
129
|
+
let t18;
|
|
130
|
+
if ($[23] !== disabled || $[24] !== id || $[25] !== max || $[26] !== min || $[27] !== step || $[28] !== t10 || $[29] !== t17 || $[30] !== t8 || $[31] !== t9) {
|
|
131
|
+
t18 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react.NumberInput.Root, {
|
|
132
|
+
id,
|
|
133
|
+
min,
|
|
134
|
+
max,
|
|
135
|
+
step,
|
|
136
|
+
disabled,
|
|
137
|
+
value: t8,
|
|
138
|
+
defaultValue: t9,
|
|
139
|
+
onValueChange: t10,
|
|
140
|
+
children: t17
|
|
141
|
+
});
|
|
142
|
+
$[23] = disabled;
|
|
143
|
+
$[24] = id;
|
|
144
|
+
$[25] = max;
|
|
145
|
+
$[26] = min;
|
|
146
|
+
$[27] = step;
|
|
147
|
+
$[28] = t10;
|
|
148
|
+
$[29] = t17;
|
|
149
|
+
$[30] = t8;
|
|
150
|
+
$[31] = t9;
|
|
151
|
+
$[32] = t18;
|
|
152
|
+
} else t18 = $[32];
|
|
153
|
+
return t18;
|
|
67
154
|
};
|
|
68
155
|
var ds_number_input_default = DsNumberInput;
|
|
69
156
|
|