@drivenets/design-system 0.0.3 → 0.0.4
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 +6 -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.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.cts.map +1 -1
- 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.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 +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.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-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.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.d.ts +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.d.ts +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.d.ts +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.d.ts +2 -2
- 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.min.css +1 -1
- package/package.json +7 -1
|
@@ -4,6 +4,7 @@ require('../ds-icon/index.cjs');
|
|
|
4
4
|
const require_ds_typography = require('../ds-typography/ds-typography.cjs');
|
|
5
5
|
const require_ds_dropdown_menu_module = require('./ds-dropdown-menu.module.cjs');
|
|
6
6
|
const require_ds_text_input = require('../ds-text-input/ds-text-input.cjs');
|
|
7
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
7
8
|
let classnames = require("classnames");
|
|
8
9
|
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
9
10
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -22,20 +23,60 @@ const DEFAULT_POSITIONING = {
|
|
|
22
23
|
/**
|
|
23
24
|
* Root component - manages dropdown state
|
|
24
25
|
*/
|
|
25
|
-
const Root = (
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
const Root = (t0) => {
|
|
27
|
+
const $ = (0, react_compiler_runtime.c)(16);
|
|
28
|
+
const { open, onOpenChange, onSelect, onHighlightChange, positioning: customPositioning, preventCloseOnSelect: t1, children } = t0;
|
|
29
|
+
const preventCloseOnSelect = t1 === void 0 ? false : t1;
|
|
30
|
+
let t2;
|
|
31
|
+
if ($[0] !== customPositioning) {
|
|
32
|
+
t2 = {
|
|
33
|
+
...DEFAULT_POSITIONING,
|
|
34
|
+
...customPositioning
|
|
35
|
+
};
|
|
36
|
+
$[0] = customPositioning;
|
|
37
|
+
$[1] = t2;
|
|
38
|
+
} else t2 = $[1];
|
|
39
|
+
const positioning = t2;
|
|
40
|
+
let t3;
|
|
41
|
+
if ($[2] !== onOpenChange) {
|
|
42
|
+
t3 = (details) => onOpenChange?.(details.open);
|
|
43
|
+
$[2] = onOpenChange;
|
|
44
|
+
$[3] = t3;
|
|
45
|
+
} else t3 = $[3];
|
|
46
|
+
let t4;
|
|
47
|
+
if ($[4] !== onSelect) {
|
|
48
|
+
t4 = (details_0) => onSelect?.(details_0.value);
|
|
49
|
+
$[4] = onSelect;
|
|
50
|
+
$[5] = t4;
|
|
51
|
+
} else t4 = $[5];
|
|
52
|
+
let t5;
|
|
53
|
+
if ($[6] !== onHighlightChange) {
|
|
54
|
+
t5 = (details_1) => onHighlightChange?.(details_1.highlightedValue);
|
|
55
|
+
$[6] = onHighlightChange;
|
|
56
|
+
$[7] = t5;
|
|
57
|
+
} else t5 = $[7];
|
|
58
|
+
const t6 = !preventCloseOnSelect;
|
|
59
|
+
let t7;
|
|
60
|
+
if ($[8] !== children || $[9] !== open || $[10] !== positioning || $[11] !== t3 || $[12] !== t4 || $[13] !== t5 || $[14] !== t6) {
|
|
61
|
+
t7 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react_menu.Menu.Root, {
|
|
62
|
+
open,
|
|
63
|
+
onOpenChange: t3,
|
|
64
|
+
onSelect: t4,
|
|
65
|
+
onHighlightChange: t5,
|
|
66
|
+
positioning,
|
|
67
|
+
closeOnSelect: t6,
|
|
68
|
+
children
|
|
69
|
+
});
|
|
70
|
+
$[8] = children;
|
|
71
|
+
$[9] = open;
|
|
72
|
+
$[10] = positioning;
|
|
73
|
+
$[11] = t3;
|
|
74
|
+
$[12] = t4;
|
|
75
|
+
$[13] = t5;
|
|
76
|
+
$[14] = t6;
|
|
77
|
+
$[15] = t7;
|
|
78
|
+
} else t7 = $[15];
|
|
79
|
+
return t7;
|
|
39
80
|
};
|
|
40
81
|
/**
|
|
41
82
|
* Trigger component - wraps the trigger element
|
|
@@ -44,195 +85,494 @@ const Trigger = __ark_ui_react_menu.Menu.Trigger;
|
|
|
44
85
|
/**
|
|
45
86
|
* Content component - wraps the dropdown content
|
|
46
87
|
*/
|
|
47
|
-
const Content = (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
88
|
+
const Content = (t0) => {
|
|
89
|
+
const $ = (0, react_compiler_runtime.c)(9);
|
|
90
|
+
const { disablePortal: t1, children, className, style } = t0;
|
|
91
|
+
const Wrapper = (t1 === void 0 ? false : t1) ? react.Fragment : __ark_ui_react_portal.Portal;
|
|
92
|
+
let t2;
|
|
93
|
+
if ($[0] !== className) {
|
|
94
|
+
t2 = (0, classnames.default)(require_ds_dropdown_menu_module.default.content, className);
|
|
95
|
+
$[0] = className;
|
|
96
|
+
$[1] = t2;
|
|
97
|
+
} else t2 = $[1];
|
|
98
|
+
let t3;
|
|
99
|
+
if ($[2] !== children || $[3] !== style || $[4] !== t2) {
|
|
100
|
+
t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react_menu.Menu.Positioner, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react_menu.Menu.Content, {
|
|
101
|
+
className: t2,
|
|
102
|
+
style,
|
|
103
|
+
children
|
|
104
|
+
}) });
|
|
105
|
+
$[2] = children;
|
|
106
|
+
$[3] = style;
|
|
107
|
+
$[4] = t2;
|
|
108
|
+
$[5] = t3;
|
|
109
|
+
} else t3 = $[5];
|
|
110
|
+
let t4;
|
|
111
|
+
if ($[6] !== Wrapper || $[7] !== t3) {
|
|
112
|
+
t4 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Wrapper, { children: t3 });
|
|
113
|
+
$[6] = Wrapper;
|
|
114
|
+
$[7] = t3;
|
|
115
|
+
$[8] = t4;
|
|
116
|
+
} else t4 = $[8];
|
|
117
|
+
return t4;
|
|
53
118
|
};
|
|
54
119
|
/**
|
|
55
120
|
* Item component - renders a menu item
|
|
56
121
|
*/
|
|
57
|
-
const Item = (
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
122
|
+
const Item = (t0) => {
|
|
123
|
+
const $ = (0, react_compiler_runtime.c)(12);
|
|
124
|
+
const { disabled, selected, value, asChild, onClick, onSelect, children, className, style } = t0;
|
|
125
|
+
let t1;
|
|
126
|
+
if ($[0] !== className || $[1] !== selected) {
|
|
127
|
+
t1 = (0, classnames.default)(require_ds_dropdown_menu_module.default.item, { [require_ds_dropdown_menu_module.default.selected]: selected }, className);
|
|
128
|
+
$[0] = className;
|
|
129
|
+
$[1] = selected;
|
|
130
|
+
$[2] = t1;
|
|
131
|
+
} else t1 = $[2];
|
|
132
|
+
let t2;
|
|
133
|
+
if ($[3] !== asChild || $[4] !== children || $[5] !== disabled || $[6] !== onClick || $[7] !== onSelect || $[8] !== style || $[9] !== t1 || $[10] !== value) {
|
|
134
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react_menu.Menu.Item, {
|
|
135
|
+
disabled,
|
|
136
|
+
className: t1,
|
|
137
|
+
style,
|
|
138
|
+
value,
|
|
139
|
+
asChild,
|
|
140
|
+
onClick,
|
|
141
|
+
onSelect,
|
|
142
|
+
children
|
|
143
|
+
});
|
|
144
|
+
$[3] = asChild;
|
|
145
|
+
$[4] = children;
|
|
146
|
+
$[5] = disabled;
|
|
147
|
+
$[6] = onClick;
|
|
148
|
+
$[7] = onSelect;
|
|
149
|
+
$[8] = style;
|
|
150
|
+
$[9] = t1;
|
|
151
|
+
$[10] = value;
|
|
152
|
+
$[11] = t2;
|
|
153
|
+
} else t2 = $[11];
|
|
154
|
+
return t2;
|
|
68
155
|
};
|
|
69
156
|
/**
|
|
70
157
|
* ItemIndicator component - renders a selection indicator (check icon by default)
|
|
71
158
|
*/
|
|
72
|
-
const ItemIndicator = (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
159
|
+
const ItemIndicator = (t0) => {
|
|
160
|
+
const $ = (0, react_compiler_runtime.c)(8);
|
|
161
|
+
const { children, className, style } = t0;
|
|
162
|
+
let t1;
|
|
163
|
+
if ($[0] !== className) {
|
|
164
|
+
t1 = (0, classnames.default)(require_ds_dropdown_menu_module.default.indicator, className);
|
|
165
|
+
$[0] = className;
|
|
166
|
+
$[1] = t1;
|
|
167
|
+
} else t1 = $[1];
|
|
168
|
+
let t2;
|
|
169
|
+
if ($[2] !== children) {
|
|
170
|
+
t2 = children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, { icon: "check" });
|
|
171
|
+
$[2] = children;
|
|
172
|
+
$[3] = t2;
|
|
173
|
+
} else t2 = $[3];
|
|
174
|
+
let t3;
|
|
175
|
+
if ($[4] !== style || $[5] !== t1 || $[6] !== t2) {
|
|
176
|
+
t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
177
|
+
className: t1,
|
|
178
|
+
style,
|
|
179
|
+
children: t2
|
|
180
|
+
});
|
|
181
|
+
$[4] = style;
|
|
182
|
+
$[5] = t1;
|
|
183
|
+
$[6] = t2;
|
|
184
|
+
$[7] = t3;
|
|
185
|
+
} else t3 = $[7];
|
|
186
|
+
return t3;
|
|
78
187
|
};
|
|
79
188
|
/**
|
|
80
189
|
* Header component - sticky header container for search, filters, or other controls
|
|
81
190
|
*/
|
|
82
|
-
const Header = (
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
191
|
+
const Header = (t0) => {
|
|
192
|
+
const $ = (0, react_compiler_runtime.c)(6);
|
|
193
|
+
const { children, className, style } = t0;
|
|
194
|
+
let t1;
|
|
195
|
+
if ($[0] !== className) {
|
|
196
|
+
t1 = (0, classnames.default)(require_ds_dropdown_menu_module.default.header, className);
|
|
197
|
+
$[0] = className;
|
|
198
|
+
$[1] = t1;
|
|
199
|
+
} else t1 = $[1];
|
|
200
|
+
let t2;
|
|
201
|
+
if ($[2] !== children || $[3] !== style || $[4] !== t1) {
|
|
202
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
203
|
+
className: t1,
|
|
204
|
+
style,
|
|
205
|
+
children
|
|
206
|
+
});
|
|
207
|
+
$[2] = children;
|
|
208
|
+
$[3] = style;
|
|
209
|
+
$[4] = t1;
|
|
210
|
+
$[5] = t2;
|
|
211
|
+
} else t2 = $[5];
|
|
212
|
+
return t2;
|
|
88
213
|
};
|
|
89
214
|
/**
|
|
90
215
|
* Actions component - footer container for action buttons
|
|
91
216
|
*/
|
|
92
|
-
const Actions = (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
217
|
+
const Actions = (t0) => {
|
|
218
|
+
const $ = (0, react_compiler_runtime.c)(6);
|
|
219
|
+
const { children, className, style } = t0;
|
|
220
|
+
let t1;
|
|
221
|
+
if ($[0] !== className) {
|
|
222
|
+
t1 = (0, classnames.default)(require_ds_dropdown_menu_module.default.actions, className);
|
|
223
|
+
$[0] = className;
|
|
224
|
+
$[1] = t1;
|
|
225
|
+
} else t1 = $[1];
|
|
226
|
+
let t2;
|
|
227
|
+
if ($[2] !== children || $[3] !== style || $[4] !== t1) {
|
|
228
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
229
|
+
className: t1,
|
|
230
|
+
style,
|
|
231
|
+
role: "menu",
|
|
232
|
+
"aria-label": "Menu actions",
|
|
233
|
+
children
|
|
234
|
+
});
|
|
235
|
+
$[2] = children;
|
|
236
|
+
$[3] = style;
|
|
237
|
+
$[4] = t1;
|
|
238
|
+
$[5] = t2;
|
|
239
|
+
} else t2 = $[5];
|
|
240
|
+
return t2;
|
|
100
241
|
};
|
|
101
242
|
/**
|
|
102
243
|
* ItemGroup component - collapsible group container
|
|
103
244
|
*/
|
|
104
|
-
const ItemGroup = (
|
|
245
|
+
const ItemGroup = (t0) => {
|
|
246
|
+
const $ = (0, react_compiler_runtime.c)(16);
|
|
247
|
+
const { children, collapsed: controlledCollapsed, onCollapsedChange, className, style } = t0;
|
|
105
248
|
const [internalCollapsed, setInternalCollapsed] = (0, react.useState)(false);
|
|
106
249
|
const isControlled = controlledCollapsed !== void 0;
|
|
107
250
|
const collapsed = isControlled ? controlledCollapsed : internalCollapsed;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
251
|
+
let t1;
|
|
252
|
+
if ($[0] !== collapsed || $[1] !== isControlled || $[2] !== onCollapsedChange) {
|
|
253
|
+
t1 = () => {
|
|
254
|
+
const newCollapsed = !collapsed;
|
|
255
|
+
if (!isControlled) setInternalCollapsed(newCollapsed);
|
|
256
|
+
onCollapsedChange?.(newCollapsed);
|
|
257
|
+
};
|
|
258
|
+
$[0] = collapsed;
|
|
259
|
+
$[1] = isControlled;
|
|
260
|
+
$[2] = onCollapsedChange;
|
|
261
|
+
$[3] = t1;
|
|
262
|
+
} else t1 = $[3];
|
|
263
|
+
const toggle = t1;
|
|
264
|
+
let t2;
|
|
265
|
+
if ($[4] !== collapsed || $[5] !== toggle) {
|
|
266
|
+
t2 = {
|
|
115
267
|
collapsed,
|
|
116
268
|
toggle
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
269
|
+
};
|
|
270
|
+
$[4] = collapsed;
|
|
271
|
+
$[5] = toggle;
|
|
272
|
+
$[6] = t2;
|
|
273
|
+
} else t2 = $[6];
|
|
274
|
+
let t3;
|
|
275
|
+
if ($[7] !== className) {
|
|
276
|
+
t3 = (0, classnames.default)(require_ds_dropdown_menu_module.default.group, className);
|
|
277
|
+
$[7] = className;
|
|
278
|
+
$[8] = t3;
|
|
279
|
+
} else t3 = $[8];
|
|
280
|
+
let t4;
|
|
281
|
+
if ($[9] !== children || $[10] !== style || $[11] !== t3) {
|
|
282
|
+
t4 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react_menu.Menu.ItemGroup, {
|
|
283
|
+
className: t3,
|
|
120
284
|
style,
|
|
121
285
|
children
|
|
122
|
-
})
|
|
123
|
-
|
|
286
|
+
});
|
|
287
|
+
$[9] = children;
|
|
288
|
+
$[10] = style;
|
|
289
|
+
$[11] = t3;
|
|
290
|
+
$[12] = t4;
|
|
291
|
+
} else t4 = $[12];
|
|
292
|
+
let t5;
|
|
293
|
+
if ($[13] !== t2 || $[14] !== t4) {
|
|
294
|
+
t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GroupContext.Provider, {
|
|
295
|
+
value: t2,
|
|
296
|
+
children: t4
|
|
297
|
+
});
|
|
298
|
+
$[13] = t2;
|
|
299
|
+
$[14] = t4;
|
|
300
|
+
$[15] = t5;
|
|
301
|
+
} else t5 = $[15];
|
|
302
|
+
return t5;
|
|
124
303
|
};
|
|
125
304
|
/**
|
|
126
305
|
* ItemGroupLabel component - clickable group header with collapse indicator
|
|
127
306
|
*/
|
|
128
|
-
const ItemGroupLabel = (
|
|
307
|
+
const ItemGroupLabel = (t0) => {
|
|
308
|
+
const $ = (0, react_compiler_runtime.c)(22);
|
|
309
|
+
const { children, className, style } = t0;
|
|
129
310
|
const context = (0, react.useContext)(GroupContext);
|
|
130
|
-
if (!context)
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
asChild: true,
|
|
141
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
142
|
-
type: "button",
|
|
143
|
-
className: (0, classnames.default)(require_ds_dropdown_menu_module.default.groupLabel, require_ds_dropdown_menu_module.default.groupLabelCollapsible, className),
|
|
144
|
-
style,
|
|
145
|
-
onClick: toggle,
|
|
146
|
-
onKeyDown: (e) => e.stopPropagation(),
|
|
147
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_typography.default, {
|
|
311
|
+
if (!context) {
|
|
312
|
+
let t1$1;
|
|
313
|
+
if ($[0] !== className) {
|
|
314
|
+
t1$1 = (0, classnames.default)(require_ds_dropdown_menu_module.default.groupLabel, className);
|
|
315
|
+
$[0] = className;
|
|
316
|
+
$[1] = t1$1;
|
|
317
|
+
} else t1$1 = $[1];
|
|
318
|
+
let t2$1;
|
|
319
|
+
if ($[2] !== children) {
|
|
320
|
+
t2$1 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_typography.default, {
|
|
148
321
|
variant: "body-sm-md",
|
|
149
322
|
children
|
|
150
|
-
})
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
323
|
+
});
|
|
324
|
+
$[2] = children;
|
|
325
|
+
$[3] = t2$1;
|
|
326
|
+
} else t2$1 = $[3];
|
|
327
|
+
let t3$1;
|
|
328
|
+
if ($[4] !== style || $[5] !== t1$1 || $[6] !== t2$1) {
|
|
329
|
+
t3$1 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react_menu.Menu.ItemGroupLabel, {
|
|
330
|
+
className: t1$1,
|
|
331
|
+
style,
|
|
332
|
+
children: t2$1
|
|
333
|
+
});
|
|
334
|
+
$[4] = style;
|
|
335
|
+
$[5] = t1$1;
|
|
336
|
+
$[6] = t2$1;
|
|
337
|
+
$[7] = t3$1;
|
|
338
|
+
} else t3$1 = $[7];
|
|
339
|
+
return t3$1;
|
|
340
|
+
}
|
|
341
|
+
const { collapsed, toggle } = context;
|
|
342
|
+
let t1;
|
|
343
|
+
if ($[8] !== className) {
|
|
344
|
+
t1 = (0, classnames.default)(require_ds_dropdown_menu_module.default.groupLabel, require_ds_dropdown_menu_module.default.groupLabelCollapsible, className);
|
|
345
|
+
$[8] = className;
|
|
346
|
+
$[9] = t1;
|
|
347
|
+
} else t1 = $[9];
|
|
348
|
+
let t2;
|
|
349
|
+
if ($[10] !== children) {
|
|
350
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_typography.default, {
|
|
351
|
+
variant: "body-sm-md",
|
|
352
|
+
children
|
|
353
|
+
});
|
|
354
|
+
$[10] = children;
|
|
355
|
+
$[11] = t2;
|
|
356
|
+
} else t2 = $[11];
|
|
357
|
+
const t3 = !collapsed;
|
|
358
|
+
let t4;
|
|
359
|
+
if ($[12] !== t3) {
|
|
360
|
+
t4 = (0, classnames.default)(require_ds_dropdown_menu_module.default.groupLabelIcon, { [require_ds_dropdown_menu_module.default.groupLabelIconRotated]: t3 });
|
|
361
|
+
$[12] = t3;
|
|
362
|
+
$[13] = t4;
|
|
363
|
+
} else t4 = $[13];
|
|
364
|
+
let t5;
|
|
365
|
+
if ($[14] !== t4) {
|
|
366
|
+
t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, {
|
|
367
|
+
icon: "keyboard_arrow_down",
|
|
368
|
+
className: t4
|
|
369
|
+
});
|
|
370
|
+
$[14] = t4;
|
|
371
|
+
$[15] = t5;
|
|
372
|
+
} else t5 = $[15];
|
|
373
|
+
let t6;
|
|
374
|
+
if ($[16] !== style || $[17] !== t1 || $[18] !== t2 || $[19] !== t5 || $[20] !== toggle) {
|
|
375
|
+
t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react_menu.Menu.ItemGroupLabel, {
|
|
376
|
+
asChild: true,
|
|
377
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
378
|
+
type: "button",
|
|
379
|
+
className: t1,
|
|
380
|
+
style,
|
|
381
|
+
onClick: toggle,
|
|
382
|
+
onKeyDown: _temp,
|
|
383
|
+
children: [t2, t5]
|
|
384
|
+
})
|
|
385
|
+
});
|
|
386
|
+
$[16] = style;
|
|
387
|
+
$[17] = t1;
|
|
388
|
+
$[18] = t2;
|
|
389
|
+
$[19] = t5;
|
|
390
|
+
$[20] = toggle;
|
|
391
|
+
$[21] = t6;
|
|
392
|
+
} else t6 = $[21];
|
|
393
|
+
return t6;
|
|
156
394
|
};
|
|
157
395
|
/**
|
|
158
396
|
* ItemGroupContent component - collapsible content container
|
|
159
397
|
*/
|
|
160
|
-
const ItemGroupContent = (
|
|
398
|
+
const ItemGroupContent = (t0) => {
|
|
399
|
+
const $ = (0, react_compiler_runtime.c)(4);
|
|
400
|
+
const { children, className, style } = t0;
|
|
161
401
|
if ((0, react.useContext)(GroupContext)?.collapsed) return null;
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
402
|
+
let t1;
|
|
403
|
+
if ($[0] !== children || $[1] !== className || $[2] !== style) {
|
|
404
|
+
t1 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
405
|
+
className,
|
|
406
|
+
style,
|
|
407
|
+
children
|
|
408
|
+
});
|
|
409
|
+
$[0] = children;
|
|
410
|
+
$[1] = className;
|
|
411
|
+
$[2] = style;
|
|
412
|
+
$[3] = t1;
|
|
413
|
+
} else t1 = $[3];
|
|
414
|
+
return t1;
|
|
167
415
|
};
|
|
168
416
|
/**
|
|
169
417
|
* Separator component - renders a visual divider
|
|
170
418
|
*/
|
|
171
|
-
const Separator = (
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
419
|
+
const Separator = (t0) => {
|
|
420
|
+
const $ = (0, react_compiler_runtime.c)(5);
|
|
421
|
+
const { className, style } = t0;
|
|
422
|
+
let t1;
|
|
423
|
+
if ($[0] !== className) {
|
|
424
|
+
t1 = (0, classnames.default)(require_ds_dropdown_menu_module.default.separator, className);
|
|
425
|
+
$[0] = className;
|
|
426
|
+
$[1] = t1;
|
|
427
|
+
} else t1 = $[1];
|
|
428
|
+
let t2;
|
|
429
|
+
if ($[2] !== style || $[3] !== t1) {
|
|
430
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react_menu.Menu.Separator, {
|
|
431
|
+
className: t1,
|
|
432
|
+
style
|
|
433
|
+
});
|
|
434
|
+
$[2] = style;
|
|
435
|
+
$[3] = t1;
|
|
436
|
+
$[4] = t2;
|
|
437
|
+
} else t2 = $[4];
|
|
438
|
+
return t2;
|
|
176
439
|
};
|
|
177
440
|
/**
|
|
178
441
|
* DEPRECATED: Legacy DsDropdownMenu component with options array
|
|
179
442
|
* Use compound component pattern instead
|
|
180
443
|
* @deprecated
|
|
181
444
|
*/
|
|
182
|
-
const DsDropdownMenuLegacy = (
|
|
445
|
+
const DsDropdownMenuLegacy = (t0) => {
|
|
446
|
+
const $ = (0, react_compiler_runtime.c)(34);
|
|
447
|
+
const { options, children, contentGap: t1, className, style, align: t2, side: t3, disablePortal: t4, disableSearch: t5, selected, onSelect } = t0;
|
|
448
|
+
const contentGap = t1 === void 0 ? 0 : t1;
|
|
449
|
+
const align = t2 === void 0 ? "center" : t2;
|
|
450
|
+
const side = t3 === void 0 ? "bottom" : t3;
|
|
451
|
+
const disablePortal = t4 === void 0 ? false : t4;
|
|
452
|
+
const disableSearch = t5 === void 0 ? true : t5;
|
|
183
453
|
const [open, setOpen] = (0, react.useState)(false);
|
|
184
454
|
const [searchTerm, setSearchTerm] = (0, react.useState)("");
|
|
185
455
|
const Wrapper = disablePortal ? react.Fragment : __radix_ui_react_dropdown_menu.Portal;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
456
|
+
let t6;
|
|
457
|
+
if ($[0] !== disableSearch || $[1] !== options || $[2] !== searchTerm) {
|
|
458
|
+
t6 = disableSearch ? options : options.filter((option) => option.label.toLowerCase().includes(searchTerm.toLowerCase()));
|
|
459
|
+
$[0] = disableSearch;
|
|
460
|
+
$[1] = options;
|
|
461
|
+
$[2] = searchTerm;
|
|
462
|
+
$[3] = t6;
|
|
463
|
+
} else t6 = $[3];
|
|
464
|
+
const filteredOptions = t6;
|
|
465
|
+
let t7;
|
|
466
|
+
if ($[4] !== children) {
|
|
467
|
+
t7 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_dropdown_menu.Trigger, {
|
|
191
468
|
asChild: true,
|
|
192
469
|
children
|
|
193
|
-
})
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
470
|
+
});
|
|
471
|
+
$[4] = children;
|
|
472
|
+
$[5] = t7;
|
|
473
|
+
} else t7 = $[5];
|
|
474
|
+
let t8;
|
|
475
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
476
|
+
t8 = (0, classnames.default)(require_ds_dropdown_menu_module.default.contentLegacy, require_ds_dropdown_menu_module.default.viewportLegacy);
|
|
477
|
+
$[6] = t8;
|
|
478
|
+
} else t8 = $[6];
|
|
479
|
+
let t9;
|
|
480
|
+
if ($[7] !== disableSearch || $[8] !== searchTerm) {
|
|
481
|
+
t9 = !disableSearch && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_text_input.default, {
|
|
482
|
+
placeholder: "Search",
|
|
483
|
+
value: searchTerm,
|
|
484
|
+
onValueChange: setSearchTerm,
|
|
485
|
+
slots: { startAdornment: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, {
|
|
486
|
+
icon: "search",
|
|
487
|
+
size: "tiny"
|
|
488
|
+
}) },
|
|
489
|
+
onKeyDown: _temp2
|
|
490
|
+
});
|
|
491
|
+
$[7] = disableSearch;
|
|
492
|
+
$[8] = searchTerm;
|
|
493
|
+
$[9] = t9;
|
|
494
|
+
} else t9 = $[9];
|
|
495
|
+
let t10;
|
|
496
|
+
if ($[10] !== className || $[11] !== filteredOptions || $[12] !== onSelect || $[13] !== selected || $[14] !== style) {
|
|
497
|
+
let t11$1;
|
|
498
|
+
if ($[16] !== className || $[17] !== onSelect || $[18] !== selected || $[19] !== style) {
|
|
499
|
+
t11$1 = (option_0, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dropdown_menu.Item, {
|
|
500
|
+
disabled: option_0.disabled,
|
|
501
|
+
className: (0, classnames.default)(require_ds_dropdown_menu_module.default.itemLegacy, { [require_ds_dropdown_menu_module.default.selected]: selected === option_0.value }, className),
|
|
210
502
|
style,
|
|
211
|
-
onClick: (
|
|
212
|
-
|
|
213
|
-
if (!
|
|
214
|
-
if (
|
|
215
|
-
|
|
503
|
+
onClick: (e_0) => {
|
|
504
|
+
e_0.stopPropagation();
|
|
505
|
+
if (!option_0.disabled) {
|
|
506
|
+
if (option_0.value) onSelect?.(option_0.value);
|
|
507
|
+
option_0.onClick?.(e_0);
|
|
216
508
|
setOpen(false);
|
|
217
509
|
}
|
|
218
510
|
},
|
|
219
511
|
children: [
|
|
220
|
-
|
|
221
|
-
icon:
|
|
512
|
+
option_0.icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, {
|
|
513
|
+
icon: option_0.icon,
|
|
222
514
|
className: require_ds_dropdown_menu_module.default.itemIcon
|
|
223
515
|
}),
|
|
224
516
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
225
517
|
className: require_ds_dropdown_menu_module.default.label,
|
|
226
|
-
children:
|
|
518
|
+
children: option_0.label
|
|
227
519
|
}),
|
|
228
|
-
|
|
520
|
+
option_0.value && selected === option_0.value && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
229
521
|
className: require_ds_dropdown_menu_module.default.indicator,
|
|
230
522
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, { icon: "check" })
|
|
231
523
|
})
|
|
232
524
|
]
|
|
233
|
-
}, i)
|
|
234
|
-
|
|
235
|
-
|
|
525
|
+
}, i);
|
|
526
|
+
$[16] = className;
|
|
527
|
+
$[17] = onSelect;
|
|
528
|
+
$[18] = selected;
|
|
529
|
+
$[19] = style;
|
|
530
|
+
$[20] = t11$1;
|
|
531
|
+
} else t11$1 = $[20];
|
|
532
|
+
t10 = filteredOptions.map(t11$1);
|
|
533
|
+
$[10] = className;
|
|
534
|
+
$[11] = filteredOptions;
|
|
535
|
+
$[12] = onSelect;
|
|
536
|
+
$[13] = selected;
|
|
537
|
+
$[14] = style;
|
|
538
|
+
$[15] = t10;
|
|
539
|
+
} else t10 = $[15];
|
|
540
|
+
let t11;
|
|
541
|
+
if ($[21] !== align || $[22] !== contentGap || $[23] !== side || $[24] !== t10 || $[25] !== t9) {
|
|
542
|
+
t11 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dropdown_menu.Content, {
|
|
543
|
+
className: t8,
|
|
544
|
+
sideOffset: contentGap,
|
|
545
|
+
align,
|
|
546
|
+
side,
|
|
547
|
+
children: [t9, t10]
|
|
548
|
+
});
|
|
549
|
+
$[21] = align;
|
|
550
|
+
$[22] = contentGap;
|
|
551
|
+
$[23] = side;
|
|
552
|
+
$[24] = t10;
|
|
553
|
+
$[25] = t9;
|
|
554
|
+
$[26] = t11;
|
|
555
|
+
} else t11 = $[26];
|
|
556
|
+
let t12;
|
|
557
|
+
if ($[27] !== Wrapper || $[28] !== t11) {
|
|
558
|
+
t12 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Wrapper, { children: t11 });
|
|
559
|
+
$[27] = Wrapper;
|
|
560
|
+
$[28] = t11;
|
|
561
|
+
$[29] = t12;
|
|
562
|
+
} else t12 = $[29];
|
|
563
|
+
let t13;
|
|
564
|
+
if ($[30] !== open || $[31] !== t12 || $[32] !== t7) {
|
|
565
|
+
t13 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__radix_ui_react_dropdown_menu.Root, {
|
|
566
|
+
open,
|
|
567
|
+
onOpenChange: setOpen,
|
|
568
|
+
children: [t7, t12]
|
|
569
|
+
});
|
|
570
|
+
$[30] = open;
|
|
571
|
+
$[31] = t12;
|
|
572
|
+
$[32] = t7;
|
|
573
|
+
$[33] = t13;
|
|
574
|
+
} else t13 = $[33];
|
|
575
|
+
return t13;
|
|
236
576
|
};
|
|
237
577
|
/**
|
|
238
578
|
* Design system DsDropdownMenu component
|
|
@@ -277,6 +617,12 @@ const DsDropdownMenu = {
|
|
|
277
617
|
ItemGroupContent,
|
|
278
618
|
Separator
|
|
279
619
|
};
|
|
620
|
+
function _temp(e) {
|
|
621
|
+
return e.stopPropagation();
|
|
622
|
+
}
|
|
623
|
+
function _temp2(e) {
|
|
624
|
+
return e.stopPropagation();
|
|
625
|
+
}
|
|
280
626
|
|
|
281
627
|
//#endregion
|
|
282
628
|
exports.DsDropdownMenu = DsDropdownMenu;
|