@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
|
@@ -1,67 +1,154 @@
|
|
|
1
1
|
import ds_icon_default from "../ds-icon/ds-icon.js";
|
|
2
2
|
import "../ds-icon/index.js";
|
|
3
3
|
import ds_number_input_module_default from "./ds-number-input.module.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
4
5
|
import classNames from "classnames";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { NumberInput } from "@ark-ui/react";
|
|
7
8
|
|
|
8
9
|
//#region src/components/ds-number-input/ds-number-input.tsx
|
|
9
|
-
const DsNumberInput = (
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
const DsNumberInput = (t0) => {
|
|
11
|
+
const $ = c(33);
|
|
12
|
+
const { id, ref, name, size: t1, onBlur, onChange, onValueChange, className, style: t2, placeholder, disabled: t3, min, max, step, value, defaultValue } = t0;
|
|
13
|
+
const size = t1 === void 0 ? "default" : t1;
|
|
14
|
+
let t4;
|
|
15
|
+
if ($[0] !== t2) {
|
|
16
|
+
t4 = t2 === void 0 ? {} : t2;
|
|
17
|
+
$[0] = t2;
|
|
18
|
+
$[1] = t4;
|
|
19
|
+
} else t4 = $[1];
|
|
20
|
+
const style = t4;
|
|
21
|
+
const disabled = t3 === void 0 ? false : t3;
|
|
22
|
+
const t5 = size === "small";
|
|
23
|
+
const t6 = size === "default";
|
|
24
|
+
let t7;
|
|
25
|
+
if ($[2] !== className || $[3] !== t5 || $[4] !== t6) {
|
|
26
|
+
t7 = classNames(ds_number_input_module_default.textInputContainer, {
|
|
27
|
+
[ds_number_input_module_default.small]: t5,
|
|
28
|
+
[ds_number_input_module_default.default]: t6
|
|
29
|
+
}, className);
|
|
30
|
+
$[2] = className;
|
|
31
|
+
$[3] = t5;
|
|
32
|
+
$[4] = t6;
|
|
33
|
+
$[5] = t7;
|
|
34
|
+
} else t7 = $[5];
|
|
35
|
+
const containerClass = t7;
|
|
36
|
+
const t8 = typeof value !== "undefined" ? String(value) : void 0;
|
|
37
|
+
const t9 = typeof defaultValue !== "undefined" ? String(defaultValue) : void 0;
|
|
38
|
+
let t10;
|
|
39
|
+
if ($[6] !== onValueChange) {
|
|
40
|
+
t10 = (details) => onValueChange?.(details.valueAsNumber);
|
|
41
|
+
$[6] = onValueChange;
|
|
42
|
+
$[7] = t10;
|
|
43
|
+
} else t10 = $[7];
|
|
44
|
+
let t11;
|
|
45
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
46
|
+
t11 = classNames(ds_number_input_module_default.iconButton);
|
|
47
|
+
$[8] = t11;
|
|
48
|
+
} else t11 = $[8];
|
|
49
|
+
let t12;
|
|
50
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
51
|
+
t12 = /* @__PURE__ */ jsx(NumberInput.DecrementTrigger, {
|
|
52
|
+
asChild: true,
|
|
53
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
54
|
+
type: "button",
|
|
55
|
+
className: t11,
|
|
56
|
+
"aria-label": "Decrease value",
|
|
57
|
+
children: /* @__PURE__ */ jsx(ds_icon_default, {
|
|
58
|
+
icon: "remove",
|
|
59
|
+
size: "tiny"
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
$[9] = t12;
|
|
64
|
+
} else t12 = $[9];
|
|
65
|
+
let t13;
|
|
66
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
67
|
+
t13 = classNames(ds_number_input_module_default.input);
|
|
68
|
+
$[10] = t13;
|
|
69
|
+
} else t13 = $[10];
|
|
70
|
+
let t14;
|
|
71
|
+
if ($[11] !== name || $[12] !== onBlur || $[13] !== onChange || $[14] !== placeholder || $[15] !== ref) {
|
|
72
|
+
t14 = /* @__PURE__ */ jsx(NumberInput.Input, {
|
|
73
|
+
ref,
|
|
74
|
+
name,
|
|
75
|
+
className: t13,
|
|
76
|
+
placeholder,
|
|
77
|
+
onBlur,
|
|
78
|
+
onChange
|
|
79
|
+
});
|
|
80
|
+
$[11] = name;
|
|
81
|
+
$[12] = onBlur;
|
|
82
|
+
$[13] = onChange;
|
|
83
|
+
$[14] = placeholder;
|
|
84
|
+
$[15] = ref;
|
|
85
|
+
$[16] = t14;
|
|
86
|
+
} else t14 = $[16];
|
|
87
|
+
let t15;
|
|
88
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
89
|
+
t15 = classNames(ds_number_input_module_default.iconButton);
|
|
90
|
+
$[17] = t15;
|
|
91
|
+
} else t15 = $[17];
|
|
92
|
+
let t16;
|
|
93
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
94
|
+
t16 = /* @__PURE__ */ jsx(NumberInput.IncrementTrigger, {
|
|
95
|
+
asChild: true,
|
|
96
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
97
|
+
type: "button",
|
|
98
|
+
className: t15,
|
|
99
|
+
"aria-label": "Increase value",
|
|
100
|
+
children: /* @__PURE__ */ jsx(ds_icon_default, {
|
|
101
|
+
icon: "add",
|
|
102
|
+
size: "tiny"
|
|
103
|
+
})
|
|
104
|
+
})
|
|
105
|
+
});
|
|
106
|
+
$[18] = t16;
|
|
107
|
+
} else t16 = $[18];
|
|
108
|
+
let t17;
|
|
109
|
+
if ($[19] !== containerClass || $[20] !== style || $[21] !== t14) {
|
|
110
|
+
t17 = /* @__PURE__ */ jsx(NumberInput.Control, {
|
|
24
111
|
asChild: true,
|
|
25
112
|
children: /* @__PURE__ */ jsxs("div", {
|
|
26
113
|
className: containerClass,
|
|
27
114
|
style,
|
|
28
115
|
children: [
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
type: "button",
|
|
33
|
-
className: classNames(ds_number_input_module_default.iconButton),
|
|
34
|
-
"aria-label": "Decrease value",
|
|
35
|
-
children: /* @__PURE__ */ jsx(ds_icon_default, {
|
|
36
|
-
icon: "remove",
|
|
37
|
-
size: "tiny"
|
|
38
|
-
})
|
|
39
|
-
})
|
|
40
|
-
}),
|
|
41
|
-
/* @__PURE__ */ jsx(NumberInput.Input, {
|
|
42
|
-
ref,
|
|
43
|
-
name,
|
|
44
|
-
className: classNames(ds_number_input_module_default.input),
|
|
45
|
-
placeholder,
|
|
46
|
-
onBlur,
|
|
47
|
-
onChange
|
|
48
|
-
}),
|
|
49
|
-
/* @__PURE__ */ jsx(NumberInput.IncrementTrigger, {
|
|
50
|
-
asChild: true,
|
|
51
|
-
children: /* @__PURE__ */ jsx("button", {
|
|
52
|
-
type: "button",
|
|
53
|
-
className: classNames(ds_number_input_module_default.iconButton),
|
|
54
|
-
"aria-label": "Increase value",
|
|
55
|
-
children: /* @__PURE__ */ jsx(ds_icon_default, {
|
|
56
|
-
icon: "add",
|
|
57
|
-
size: "tiny"
|
|
58
|
-
})
|
|
59
|
-
})
|
|
60
|
-
})
|
|
116
|
+
t12,
|
|
117
|
+
t14,
|
|
118
|
+
t16
|
|
61
119
|
]
|
|
62
120
|
})
|
|
63
|
-
})
|
|
64
|
-
|
|
121
|
+
});
|
|
122
|
+
$[19] = containerClass;
|
|
123
|
+
$[20] = style;
|
|
124
|
+
$[21] = t14;
|
|
125
|
+
$[22] = t17;
|
|
126
|
+
} else t17 = $[22];
|
|
127
|
+
let t18;
|
|
128
|
+
if ($[23] !== disabled || $[24] !== id || $[25] !== max || $[26] !== min || $[27] !== step || $[28] !== t10 || $[29] !== t17 || $[30] !== t8 || $[31] !== t9) {
|
|
129
|
+
t18 = /* @__PURE__ */ jsx(NumberInput.Root, {
|
|
130
|
+
id,
|
|
131
|
+
min,
|
|
132
|
+
max,
|
|
133
|
+
step,
|
|
134
|
+
disabled,
|
|
135
|
+
value: t8,
|
|
136
|
+
defaultValue: t9,
|
|
137
|
+
onValueChange: t10,
|
|
138
|
+
children: t17
|
|
139
|
+
});
|
|
140
|
+
$[23] = disabled;
|
|
141
|
+
$[24] = id;
|
|
142
|
+
$[25] = max;
|
|
143
|
+
$[26] = min;
|
|
144
|
+
$[27] = step;
|
|
145
|
+
$[28] = t10;
|
|
146
|
+
$[29] = t17;
|
|
147
|
+
$[30] = t8;
|
|
148
|
+
$[31] = t9;
|
|
149
|
+
$[32] = t18;
|
|
150
|
+
} else t18 = $[32];
|
|
151
|
+
return t18;
|
|
65
152
|
};
|
|
66
153
|
var ds_number_input_default = DsNumberInput;
|
|
67
154
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-number-input.js","names":["
|
|
1
|
+
{"version":3,"file":"ds-number-input.js","names":["FC","classNames","NumberInput","styles","DsNumberInputProps","DsIcon","DsNumberInput","t0","$","_c","id","ref","name","size","t1","onBlur","onChange","onValueChange","className","style","t2","placeholder","disabled","t3","min","max","step","value","defaultValue","undefined","t4","t5","t6","t7","textInputContainer","small","default","containerClass","t8","String","t9","t10","details","valueAsNumber","t11","Symbol","for","iconButton","t12","t13","input","t14","t15","t16","t17","t18"],"sources":["../../../src/components/ds-number-input/ds-number-input.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport classNames from 'classnames';\nimport { NumberInput } from '@ark-ui/react';\nimport styles from './ds-number-input.module.scss';\nimport type { DsNumberInputProps } from './ds-number-input.types';\nimport { DsIcon } from '../ds-icon';\n\nconst DsNumberInput: FC<DsNumberInputProps> = ({\n\tid,\n\tref,\n\tname,\n\tsize = 'default',\n\tonBlur,\n\tonChange,\n\tonValueChange,\n\tclassName,\n\tstyle = {},\n\tplaceholder,\n\tdisabled = false,\n\tmin,\n\tmax,\n\tstep,\n\tvalue,\n\tdefaultValue,\n}) => {\n\tconst containerClass = classNames(\n\t\tstyles.textInputContainer,\n\t\t{\n\t\t\t[styles.small]: size === 'small',\n\t\t\t[styles.default]: size === 'default',\n\t\t},\n\t\tclassName,\n\t);\n\n\treturn (\n\t\t<NumberInput.Root\n\t\t\tid={id}\n\t\t\tmin={min}\n\t\t\tmax={max}\n\t\t\tstep={step}\n\t\t\tdisabled={disabled}\n\t\t\tvalue={typeof value !== 'undefined' ? String(value) : undefined}\n\t\t\tdefaultValue={typeof defaultValue !== 'undefined' ? String(defaultValue) : undefined}\n\t\t\tonValueChange={(details) => onValueChange?.(details.valueAsNumber)}\n\t\t>\n\t\t\t<NumberInput.Control asChild>\n\t\t\t\t<div className={containerClass} style={style}>\n\t\t\t\t\t<NumberInput.DecrementTrigger asChild>\n\t\t\t\t\t\t<button type=\"button\" className={classNames(styles.iconButton)} aria-label=\"Decrease value\">\n\t\t\t\t\t\t\t<DsIcon icon=\"remove\" size=\"tiny\" />\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</NumberInput.DecrementTrigger>\n\n\t\t\t\t\t<NumberInput.Input\n\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\tname={name}\n\t\t\t\t\t\tclassName={classNames(styles.input)}\n\t\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\t\tonBlur={onBlur}\n\t\t\t\t\t\tonChange={onChange}\n\t\t\t\t\t></NumberInput.Input>\n\n\t\t\t\t\t<NumberInput.IncrementTrigger asChild>\n\t\t\t\t\t\t<button type=\"button\" className={classNames(styles.iconButton)} aria-label=\"Increase value\">\n\t\t\t\t\t\t\t<DsIcon icon=\"add\" size=\"tiny\" />\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</NumberInput.IncrementTrigger>\n\t\t\t\t</div>\n\t\t\t</NumberInput.Control>\n\t\t</NumberInput.Root>\n\t);\n};\n\nexport default DsNumberInput;\n"],"mappings":";;;;;;;;;AAOA,MAAMM,iBAAwCC,OAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAAC,MAAA,EAAAC,IAAAC,KAAAC,MAAAC,MAAAC,IAAAC,QAAAC,UAAAC,eAAAC,WAAAC,OAAAC,IAAAC,aAAAC,UAAAC,IAAAC,KAAAC,KAAAC,MAAAC,OAAAC,iBAAArB;CAI9C,MAAAM,OAAAC,OAAAe,SAAA,YAAAf;CAAgB,IAAAgB;AAAA,KAAAtB,EAAA,OAAAY,IAAA;AAKhBU,OAAAV,OAAAS,SAAA,EAAU,GAAVT;AAAUZ,I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EAAA;CAAA,IAAA+C;AAAA,KAAA/C,EAAA,QAAAc,YAAAd,EAAA,QAAAE,MAAAF,EAAA,QAAAiB,OAAAjB,EAAA,QAAAgB,OAAAhB,EAAA,QAAAkB,QAAAlB,EAAA,QAAAiC,OAAAjC,EAAA,QAAA8C,OAAA9C,EAAA,QAAA8B,MAAA9B,EAAA,QAAAgC,IAAA;AAjCvBe,QAAA,oBAAA,YAAA;GACK7C;GACCc;GACAC;GACCC;GACIJ;GACH,OAAAgB;GACO,cAAAE;GACC,eAAAC;aAEfa;IAwBkB;AAAA9C,IAAA,MAAAc;AAAAd,IAAA,MAAAE;AAAAF,IAAA,MAAAiB;AAAAjB,IAAA,MAAAgB;AAAAhB,IAAA,MAAAkB;AAAAlB,IAAA,MAAAiC;AAAAjC,IAAA,MAAA8C;AAAA9C,IAAA,MAAA8B;AAAA9B,IAAA,MAAAgC;AAAAhC,IAAA,MAAA+C;OAAAA,OAAA/C,EAAA;AAAA,QAlCnB+C;;AAsCF,8BAAejD"}
|
|
@@ -2,6 +2,7 @@ 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_panel_module = require('./ds-panel.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");
|
|
@@ -9,29 +10,120 @@ let __radix_ui_react_collapsible = require("@radix-ui/react-collapsible");
|
|
|
9
10
|
__radix_ui_react_collapsible = require_rolldown_runtime.__toESM(__radix_ui_react_collapsible);
|
|
10
11
|
|
|
11
12
|
//#region src/components/ds-panel/ds-panel.tsx
|
|
12
|
-
function DsPanel(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
function DsPanel(t0) {
|
|
14
|
+
const $ = (0, react_compiler_runtime.c)(23);
|
|
15
|
+
let children;
|
|
16
|
+
let className;
|
|
17
|
+
let onOpenChange;
|
|
18
|
+
let open;
|
|
19
|
+
let props;
|
|
20
|
+
let slotProps;
|
|
21
|
+
let t1;
|
|
22
|
+
let t2;
|
|
23
|
+
if ($[0] !== t0) {
|
|
24
|
+
({open, onOpenChange, children, className, slotProps, variant: t1, disablePadding: t2, ...props} = t0);
|
|
25
|
+
$[0] = t0;
|
|
26
|
+
$[1] = children;
|
|
27
|
+
$[2] = className;
|
|
28
|
+
$[3] = onOpenChange;
|
|
29
|
+
$[4] = open;
|
|
30
|
+
$[5] = props;
|
|
31
|
+
$[6] = slotProps;
|
|
32
|
+
$[7] = t1;
|
|
33
|
+
$[8] = t2;
|
|
34
|
+
} else {
|
|
35
|
+
children = $[1];
|
|
36
|
+
className = $[2];
|
|
37
|
+
onOpenChange = $[3];
|
|
38
|
+
open = $[4];
|
|
39
|
+
props = $[5];
|
|
40
|
+
slotProps = $[6];
|
|
41
|
+
t1 = $[7];
|
|
42
|
+
t2 = $[8];
|
|
43
|
+
}
|
|
44
|
+
const variant = t1 === void 0 ? "docked" : t1;
|
|
45
|
+
const disablePadding = t2 === void 0 ? false : t2;
|
|
46
|
+
const t3 = variant === "docked";
|
|
47
|
+
const t4 = variant === "floating";
|
|
48
|
+
let t5;
|
|
49
|
+
if ($[9] !== className || $[10] !== disablePadding || $[11] !== t3 || $[12] !== t4) {
|
|
50
|
+
t5 = (0, classnames.default)(require_ds_panel_module.default.root, className, {
|
|
51
|
+
[require_ds_panel_module.default.variantDocked]: t3,
|
|
52
|
+
[require_ds_panel_module.default.variantFloating]: t4,
|
|
19
53
|
[require_ds_panel_module.default.disablePadding]: disablePadding
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
54
|
+
});
|
|
55
|
+
$[9] = className;
|
|
56
|
+
$[10] = disablePadding;
|
|
57
|
+
$[11] = t3;
|
|
58
|
+
$[12] = t4;
|
|
59
|
+
$[13] = t5;
|
|
60
|
+
} else t5 = $[13];
|
|
61
|
+
const t6 = slotProps?.collapseButton;
|
|
62
|
+
let t7;
|
|
63
|
+
if ($[14] !== t6) {
|
|
64
|
+
t7 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsPanelCollapseButton, { ...t6 });
|
|
65
|
+
$[14] = t6;
|
|
66
|
+
$[15] = t7;
|
|
67
|
+
} else t7 = $[15];
|
|
68
|
+
let t8;
|
|
69
|
+
if ($[16] !== children || $[17] !== onOpenChange || $[18] !== open || $[19] !== props || $[20] !== t5 || $[21] !== t7) {
|
|
70
|
+
t8 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_collapsible.Root, {
|
|
71
|
+
open,
|
|
72
|
+
onOpenChange,
|
|
73
|
+
className: t5,
|
|
74
|
+
...props,
|
|
75
|
+
children: [t7, children]
|
|
76
|
+
});
|
|
77
|
+
$[16] = children;
|
|
78
|
+
$[17] = onOpenChange;
|
|
79
|
+
$[18] = open;
|
|
80
|
+
$[19] = props;
|
|
81
|
+
$[20] = t5;
|
|
82
|
+
$[21] = t7;
|
|
83
|
+
$[22] = t8;
|
|
84
|
+
} else t8 = $[22];
|
|
85
|
+
return t8;
|
|
24
86
|
}
|
|
25
|
-
function DsPanelCollapseButton(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
87
|
+
function DsPanelCollapseButton(t0) {
|
|
88
|
+
const $ = (0, react_compiler_runtime.c)(9);
|
|
89
|
+
let collapsed;
|
|
90
|
+
let props;
|
|
91
|
+
if ($[0] !== t0) {
|
|
92
|
+
({collapsed, ...props} = t0);
|
|
93
|
+
$[0] = t0;
|
|
94
|
+
$[1] = collapsed;
|
|
95
|
+
$[2] = props;
|
|
96
|
+
} else {
|
|
97
|
+
collapsed = $[1];
|
|
98
|
+
props = $[2];
|
|
99
|
+
}
|
|
100
|
+
let t1;
|
|
101
|
+
if ($[3] !== collapsed) {
|
|
102
|
+
t1 = (0, classnames.default)(require_ds_panel_module.default.trigger, { [require_ds_panel_module.default.triggerCollapsed]: collapsed });
|
|
103
|
+
$[3] = collapsed;
|
|
104
|
+
$[4] = t1;
|
|
105
|
+
} else t1 = $[4];
|
|
106
|
+
let t2;
|
|
107
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
108
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, {
|
|
31
109
|
icon: "arrow_circle_left",
|
|
32
110
|
variant: "outlined"
|
|
33
|
-
})
|
|
34
|
-
|
|
111
|
+
});
|
|
112
|
+
$[5] = t2;
|
|
113
|
+
} else t2 = $[5];
|
|
114
|
+
let t3;
|
|
115
|
+
if ($[6] !== props || $[7] !== t1) {
|
|
116
|
+
t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_collapsible.Trigger, {
|
|
117
|
+
className: t1,
|
|
118
|
+
"aria-label": "Toggle panel",
|
|
119
|
+
...props,
|
|
120
|
+
children: t2
|
|
121
|
+
});
|
|
122
|
+
$[6] = props;
|
|
123
|
+
$[7] = t1;
|
|
124
|
+
$[8] = t3;
|
|
125
|
+
} else t3 = $[8];
|
|
126
|
+
return t3;
|
|
35
127
|
}
|
|
36
128
|
|
|
37
129
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsPanelProps } from "./ds-panel.types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ds-panel/ds-panel.d.ts
|
|
5
5
|
declare function DsPanel({
|
|
@@ -11,7 +11,7 @@ declare function DsPanel({
|
|
|
11
11
|
variant,
|
|
12
12
|
disablePadding,
|
|
13
13
|
...props
|
|
14
|
-
}: DsPanelProps):
|
|
14
|
+
}: DsPanelProps): react_jsx_runtime18.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { DsPanel };
|
|
17
17
|
//# sourceMappingURL=ds-panel.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-panel.d.cts","names":[],"sources":["../../../src/components/ds-panel/ds-panel.tsx"],"sourcesContent":[],"mappings":";;;;iBAMgB,OAAA;;;;;;;;;GASb,eAAY,
|
|
1
|
+
{"version":3,"file":"ds-panel.d.cts","names":[],"sources":["../../../src/components/ds-panel/ds-panel.tsx"],"sourcesContent":[],"mappings":";;;;iBAMgB,OAAA;;;;;;;;;GASb,eAAY,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsPanelProps } from "./ds-panel.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime27 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ds-panel/ds-panel.d.ts
|
|
5
5
|
declare function DsPanel({
|
|
@@ -11,7 +11,7 @@ declare function DsPanel({
|
|
|
11
11
|
variant,
|
|
12
12
|
disablePadding,
|
|
13
13
|
...props
|
|
14
|
-
}: DsPanelProps):
|
|
14
|
+
}: DsPanelProps): react_jsx_runtime27.JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { DsPanel };
|
|
17
17
|
//# sourceMappingURL=ds-panel.d.ts.map
|
|
@@ -1,34 +1,126 @@
|
|
|
1
1
|
import ds_icon_default from "../ds-icon/ds-icon.js";
|
|
2
2
|
import "../ds-icon/index.js";
|
|
3
3
|
import ds_panel_module_default from "./ds-panel.module.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
4
5
|
import classNames from "classnames";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
7
8
|
|
|
8
9
|
//#region src/components/ds-panel/ds-panel.tsx
|
|
9
|
-
function DsPanel(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
function DsPanel(t0) {
|
|
11
|
+
const $ = c(23);
|
|
12
|
+
let children;
|
|
13
|
+
let className;
|
|
14
|
+
let onOpenChange;
|
|
15
|
+
let open;
|
|
16
|
+
let props;
|
|
17
|
+
let slotProps;
|
|
18
|
+
let t1;
|
|
19
|
+
let t2;
|
|
20
|
+
if ($[0] !== t0) {
|
|
21
|
+
({open, onOpenChange, children, className, slotProps, variant: t1, disablePadding: t2, ...props} = t0);
|
|
22
|
+
$[0] = t0;
|
|
23
|
+
$[1] = children;
|
|
24
|
+
$[2] = className;
|
|
25
|
+
$[3] = onOpenChange;
|
|
26
|
+
$[4] = open;
|
|
27
|
+
$[5] = props;
|
|
28
|
+
$[6] = slotProps;
|
|
29
|
+
$[7] = t1;
|
|
30
|
+
$[8] = t2;
|
|
31
|
+
} else {
|
|
32
|
+
children = $[1];
|
|
33
|
+
className = $[2];
|
|
34
|
+
onOpenChange = $[3];
|
|
35
|
+
open = $[4];
|
|
36
|
+
props = $[5];
|
|
37
|
+
slotProps = $[6];
|
|
38
|
+
t1 = $[7];
|
|
39
|
+
t2 = $[8];
|
|
40
|
+
}
|
|
41
|
+
const variant = t1 === void 0 ? "docked" : t1;
|
|
42
|
+
const disablePadding = t2 === void 0 ? false : t2;
|
|
43
|
+
const t3 = variant === "docked";
|
|
44
|
+
const t4 = variant === "floating";
|
|
45
|
+
let t5;
|
|
46
|
+
if ($[9] !== className || $[10] !== disablePadding || $[11] !== t3 || $[12] !== t4) {
|
|
47
|
+
t5 = classNames(ds_panel_module_default.root, className, {
|
|
48
|
+
[ds_panel_module_default.variantDocked]: t3,
|
|
49
|
+
[ds_panel_module_default.variantFloating]: t4,
|
|
16
50
|
[ds_panel_module_default.disablePadding]: disablePadding
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
51
|
+
});
|
|
52
|
+
$[9] = className;
|
|
53
|
+
$[10] = disablePadding;
|
|
54
|
+
$[11] = t3;
|
|
55
|
+
$[12] = t4;
|
|
56
|
+
$[13] = t5;
|
|
57
|
+
} else t5 = $[13];
|
|
58
|
+
const t6 = slotProps?.collapseButton;
|
|
59
|
+
let t7;
|
|
60
|
+
if ($[14] !== t6) {
|
|
61
|
+
t7 = /* @__PURE__ */ jsx(DsPanelCollapseButton, { ...t6 });
|
|
62
|
+
$[14] = t6;
|
|
63
|
+
$[15] = t7;
|
|
64
|
+
} else t7 = $[15];
|
|
65
|
+
let t8;
|
|
66
|
+
if ($[16] !== children || $[17] !== onOpenChange || $[18] !== open || $[19] !== props || $[20] !== t5 || $[21] !== t7) {
|
|
67
|
+
t8 = /* @__PURE__ */ jsxs(Collapsible.Root, {
|
|
68
|
+
open,
|
|
69
|
+
onOpenChange,
|
|
70
|
+
className: t5,
|
|
71
|
+
...props,
|
|
72
|
+
children: [t7, children]
|
|
73
|
+
});
|
|
74
|
+
$[16] = children;
|
|
75
|
+
$[17] = onOpenChange;
|
|
76
|
+
$[18] = open;
|
|
77
|
+
$[19] = props;
|
|
78
|
+
$[20] = t5;
|
|
79
|
+
$[21] = t7;
|
|
80
|
+
$[22] = t8;
|
|
81
|
+
} else t8 = $[22];
|
|
82
|
+
return t8;
|
|
21
83
|
}
|
|
22
|
-
function DsPanelCollapseButton(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
84
|
+
function DsPanelCollapseButton(t0) {
|
|
85
|
+
const $ = c(9);
|
|
86
|
+
let collapsed;
|
|
87
|
+
let props;
|
|
88
|
+
if ($[0] !== t0) {
|
|
89
|
+
({collapsed, ...props} = t0);
|
|
90
|
+
$[0] = t0;
|
|
91
|
+
$[1] = collapsed;
|
|
92
|
+
$[2] = props;
|
|
93
|
+
} else {
|
|
94
|
+
collapsed = $[1];
|
|
95
|
+
props = $[2];
|
|
96
|
+
}
|
|
97
|
+
let t1;
|
|
98
|
+
if ($[3] !== collapsed) {
|
|
99
|
+
t1 = classNames(ds_panel_module_default.trigger, { [ds_panel_module_default.triggerCollapsed]: collapsed });
|
|
100
|
+
$[3] = collapsed;
|
|
101
|
+
$[4] = t1;
|
|
102
|
+
} else t1 = $[4];
|
|
103
|
+
let t2;
|
|
104
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
105
|
+
t2 = /* @__PURE__ */ jsx(ds_icon_default, {
|
|
28
106
|
icon: "arrow_circle_left",
|
|
29
107
|
variant: "outlined"
|
|
30
|
-
})
|
|
31
|
-
|
|
108
|
+
});
|
|
109
|
+
$[5] = t2;
|
|
110
|
+
} else t2 = $[5];
|
|
111
|
+
let t3;
|
|
112
|
+
if ($[6] !== props || $[7] !== t1) {
|
|
113
|
+
t3 = /* @__PURE__ */ jsx(Collapsible.Trigger, {
|
|
114
|
+
className: t1,
|
|
115
|
+
"aria-label": "Toggle panel",
|
|
116
|
+
...props,
|
|
117
|
+
children: t2
|
|
118
|
+
});
|
|
119
|
+
$[6] = props;
|
|
120
|
+
$[7] = t1;
|
|
121
|
+
$[8] = t3;
|
|
122
|
+
} else t3 = $[8];
|
|
123
|
+
return t3;
|
|
32
124
|
}
|
|
33
125
|
|
|
34
126
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ds-panel.js","names":["classnames","styles","DsIcon"],"sources":["../../../src/components/ds-panel/ds-panel.tsx"],"sourcesContent":["import * as Collapsible from '@radix-ui/react-collapsible';\nimport classnames from 'classnames';\nimport styles from './ds-panel.module.scss';\nimport { DsIcon } from '../ds-icon';\nimport type { DsPanelCollapseButtonProps, DsPanelProps } from './ds-panel.types';\n\nexport function DsPanel({\n\topen,\n\tonOpenChange,\n\tchildren,\n\tclassName,\n\tslotProps,\n\tvariant = 'docked',\n\tdisablePadding = false,\n\t...props\n}: DsPanelProps) {\n\treturn (\n\t\t<Collapsible.Root\n\t\t\topen={open}\n\t\t\tonOpenChange={onOpenChange}\n\t\t\tclassName={classnames(styles.root, className, {\n\t\t\t\t[styles.variantDocked]: variant === 'docked',\n\t\t\t\t[styles.variantFloating]: variant === 'floating',\n\t\t\t\t[styles.disablePadding]: disablePadding,\n\t\t\t})}\n\t\t\t{...props}\n\t\t>\n\t\t\t<DsPanelCollapseButton {...slotProps?.collapseButton} />\n\t\t\t{children}\n\t\t</Collapsible.Root>\n\t);\n}\n\nfunction DsPanelCollapseButton({ collapsed, ...props }: DsPanelCollapseButtonProps) {\n\treturn (\n\t\t<Collapsible.Trigger\n\t\t\tclassName={classnames(styles.trigger, {\n\t\t\t\t[styles.triggerCollapsed]: collapsed,\n\t\t\t})}\n\t\t\taria-label=\"Toggle panel\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<DsIcon icon=\"arrow_circle_left\" variant=\"outlined\" />\n\t\t</Collapsible.Trigger>\n\t);\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ds-panel.js","names":["Collapsible","classnames","styles","DsIcon","DsPanelCollapseButtonProps","DsPanelProps","DsPanel","t0","$","_c","children","className","onOpenChange","open","props","slotProps","t1","t2","variant","disablePadding","undefined","t3","t4","t5","root","variantDocked","variantFloating","t6","collapseButton","t7","t8","DsPanelCollapseButton","collapsed","trigger","triggerCollapsed","Symbol","for"],"sources":["../../../src/components/ds-panel/ds-panel.tsx"],"sourcesContent":["import * as Collapsible from '@radix-ui/react-collapsible';\nimport classnames from 'classnames';\nimport styles from './ds-panel.module.scss';\nimport { DsIcon } from '../ds-icon';\nimport type { DsPanelCollapseButtonProps, DsPanelProps } from './ds-panel.types';\n\nexport function DsPanel({\n\topen,\n\tonOpenChange,\n\tchildren,\n\tclassName,\n\tslotProps,\n\tvariant = 'docked',\n\tdisablePadding = false,\n\t...props\n}: DsPanelProps) {\n\treturn (\n\t\t<Collapsible.Root\n\t\t\topen={open}\n\t\t\tonOpenChange={onOpenChange}\n\t\t\tclassName={classnames(styles.root, className, {\n\t\t\t\t[styles.variantDocked]: variant === 'docked',\n\t\t\t\t[styles.variantFloating]: variant === 'floating',\n\t\t\t\t[styles.disablePadding]: disablePadding,\n\t\t\t})}\n\t\t\t{...props}\n\t\t>\n\t\t\t<DsPanelCollapseButton {...slotProps?.collapseButton} />\n\t\t\t{children}\n\t\t</Collapsible.Root>\n\t);\n}\n\nfunction DsPanelCollapseButton({ collapsed, ...props }: DsPanelCollapseButtonProps) {\n\treturn (\n\t\t<Collapsible.Trigger\n\t\t\tclassName={classnames(styles.trigger, {\n\t\t\t\t[styles.triggerCollapsed]: collapsed,\n\t\t\t})}\n\t\t\taria-label=\"Toggle panel\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<DsIcon icon=\"arrow_circle_left\" variant=\"outlined\" />\n\t\t</Collapsible.Trigger>\n\t);\n}\n"],"mappings":";;;;;;;;;AAMA,SAAOM,QAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;AAAA,KAAAT,EAAA,OAAAD,IAAA;AAAiB,GAAA,CAAAM,MAAAD,cAAAF,UAAAC,WAAAI,WAAAG,SAAAF,IAAAG,gBAAAF,OAAAH,SAAAP;AASTC,IAAA,KAAAD;AAAAC,IAAA,KAAAE;AAAAF,IAAA,KAAAG;AAAAH,IAAA,KAAAI;AAAAJ,IAAA,KAAAK;AAAAL,IAAA,KAAAM;AAAAN,IAAA,KAAAO;AAAAP,IAAA,KAAAQ;AAAAR,IAAA,KAAAS;QAAA;AAAAP,aAAAF,EAAA;AAAAG,cAAAH,EAAA;AAAAI,iBAAAJ,EAAA;AAAAK,SAAAL,EAAA;AAAAM,UAAAN,EAAA;AAAAO,cAAAP,EAAA;AAAAQ,OAAAR,EAAA;AAAAS,OAAAT,EAAA;;CAHd,MAAAU,UAAAF,OAAAI,SAAA,WAAAJ;CACA,MAAAG,iBAAAF,OAAAG,SAAA,QAAAH;CAQ2B,MA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