@drivenets/design-system 0.0.4 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +51 -0
- package/dist/components/ds-alert-banner/ds-alert-banner.d.ts +5 -5
- package/dist/components/ds-alert-banner/ds-alert-banner.d.ts.map +1 -1
- 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/versions/ds-button-new/ds-button-new.module.cjs +18 -18
- package/dist/components/ds-button/versions/ds-button-new/ds-button-new.module.js +18 -18
- package/dist/components/ds-button/versions/ds-button-new/ds-button-new.module.js.map +1 -1
- package/dist/components/ds-confirmation/ds-confirmation.d.cts +8 -8
- package/dist/components/ds-confirmation/ds-confirmation.d.ts +8 -8
- package/dist/components/ds-date-input/ds-date-input.cjs +352 -0
- package/dist/components/ds-date-input/ds-date-input.d.cts +31 -0
- package/dist/components/ds-date-input/ds-date-input.d.cts.map +1 -0
- package/dist/components/ds-date-input/ds-date-input.d.ts +31 -0
- package/dist/components/ds-date-input/ds-date-input.d.ts.map +1 -0
- package/dist/components/ds-date-input/ds-date-input.js +351 -0
- package/dist/components/ds-date-input/ds-date-input.js.map +1 -0
- package/dist/components/ds-date-input/ds-date-input.module.cjs +29 -0
- package/dist/components/ds-date-input/ds-date-input.module.js +29 -0
- package/dist/components/ds-date-input/ds-date-input.module.js.map +1 -0
- package/dist/components/ds-date-input/ds-date-input.types.d.cts +92 -0
- package/dist/components/ds-date-input/ds-date-input.types.d.cts.map +1 -0
- package/dist/components/ds-date-input/ds-date-input.types.d.ts +92 -0
- package/dist/components/ds-date-input/ds-date-input.types.d.ts.map +1 -0
- package/dist/components/ds-date-input/ds-date-input.utils.cjs +169 -0
- package/dist/components/ds-date-input/ds-date-input.utils.js +164 -0
- package/dist/components/ds-date-input/ds-date-input.utils.js.map +1 -0
- package/dist/components/ds-date-input/index.cjs +1 -0
- package/dist/components/ds-date-input/index.d.ts +2 -0
- package/dist/components/ds-date-input/index.js +1 -0
- package/dist/components/ds-divider/ds-divider.cjs +47 -0
- package/dist/components/ds-divider/ds-divider.d.cts +8 -0
- package/dist/components/ds-divider/ds-divider.d.cts.map +1 -0
- package/dist/components/ds-divider/ds-divider.d.ts +8 -0
- package/dist/components/ds-divider/ds-divider.d.ts.map +1 -0
- package/dist/components/ds-divider/ds-divider.js +46 -0
- package/dist/components/ds-divider/ds-divider.js.map +1 -0
- package/dist/components/ds-divider/ds-divider.module.cjs +10 -0
- package/dist/components/ds-divider/ds-divider.module.js +10 -0
- package/dist/components/ds-divider/ds-divider.module.js.map +1 -0
- package/dist/components/ds-divider/ds-divider.types.d.cts +25 -0
- package/dist/components/ds-divider/ds-divider.types.d.cts.map +1 -0
- package/dist/components/ds-divider/ds-divider.types.d.ts +25 -0
- package/dist/components/ds-divider/ds-divider.types.d.ts.map +1 -0
- package/dist/components/ds-divider/index.cjs +1 -0
- package/dist/components/ds-divider/index.d.ts +2 -0
- package/dist/components/ds-divider/index.js +1 -0
- 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-dropdown-menu/ds-dropdown-menu.cjs +80 -24
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.d.cts +1 -0
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.d.cts.map +1 -1
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.d.ts +1 -0
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.d.ts.map +1 -1
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.js +80 -24
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.js.map +1 -1
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.module.cjs +20 -18
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.module.js +20 -18
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.module.js.map +1 -1
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.types.d.cts +5 -1
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.types.d.cts.map +1 -1
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.types.d.ts +5 -1
- package/dist/components/ds-dropdown-menu/ds-dropdown-menu.types.d.ts.map +1 -1
- package/dist/components/ds-dropdown-menu/index.d.ts +1 -1
- package/dist/components/ds-expandable-text-input/ds-expandable-text-input.d.cts +2 -2
- package/dist/components/ds-expandable-text-input/ds-expandable-text-input.d.ts +2 -2
- package/dist/components/ds-form-control/ds-form-control.cjs +3 -0
- package/dist/components/ds-form-control/ds-form-control.d.cts +9 -7
- package/dist/components/ds-form-control/ds-form-control.d.cts.map +1 -1
- package/dist/components/ds-form-control/ds-form-control.d.ts +10 -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 +3 -0
- package/dist/components/ds-form-control/ds-form-control.js.map +1 -1
- 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-panel/ds-panel.d.cts +2 -2
- package/dist/components/ds-panel/ds-panel.d.ts +2 -2
- package/dist/components/ds-radio-group/ds-radio-group.types.d.cts +1 -1
- package/dist/components/ds-radio-group/ds-radio-group.types.d.cts.map +1 -1
- package/dist/components/ds-radio-group/ds-radio-group.types.d.ts +1 -1
- package/dist/components/ds-radio-group/ds-radio-group.types.d.ts.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.d.cts +2 -2
- package/dist/components/ds-select/ds-select.d.ts +2 -2
- package/dist/components/ds-smart-tabs/ds-smart-tabs.d.cts +2 -2
- package/dist/components/ds-smart-tabs/ds-smart-tabs.d.ts +2 -2
- package/dist/components/ds-stepper/components/ds-step-content.d.ts +2 -2
- package/dist/components/ds-stepper/components/ds-step-next-button.d.ts +2 -2
- package/dist/components/ds-stepper/components/ds-step.d.cts +2 -2
- package/dist/components/ds-stepper/components/ds-step.d.ts +2 -2
- package/dist/components/ds-stepper/ds-stepper.d.cts +2 -2
- package/dist/components/ds-stepper/ds-stepper.d.ts +2 -2
- package/dist/components/ds-table/components/ds-table-cell/ds-table-cell.types.d.cts +1 -0
- package/dist/components/ds-table/components/ds-table-cell/ds-table-cell.types.d.cts.map +1 -1
- package/dist/components/ds-table/components/ds-table-cell/ds-table-cell.types.d.ts +1 -1
- package/dist/components/ds-table/ds-table.d.cts +2 -2
- package/dist/components/ds-table/ds-table.d.ts +2 -2
- package/dist/components/ds-table/filters/adapters/create-checkbox-filter-adapter.cjs +55 -0
- package/dist/components/ds-table/filters/adapters/create-checkbox-filter-adapter.d.cts +49 -0
- package/dist/components/ds-table/filters/adapters/create-checkbox-filter-adapter.d.cts.map +1 -0
- package/dist/components/ds-table/filters/adapters/create-checkbox-filter-adapter.d.ts +50 -0
- package/dist/components/ds-table/filters/adapters/create-checkbox-filter-adapter.d.ts.map +1 -0
- package/dist/components/ds-table/filters/adapters/create-checkbox-filter-adapter.js +55 -0
- package/dist/components/ds-table/filters/adapters/create-checkbox-filter-adapter.js.map +1 -0
- package/dist/components/ds-table/filters/adapters/create-dual-range-filter-adapter.cjs +87 -0
- package/dist/components/ds-table/filters/adapters/create-dual-range-filter-adapter.d.cts +44 -0
- package/dist/components/ds-table/filters/adapters/create-dual-range-filter-adapter.d.cts.map +1 -0
- package/dist/components/ds-table/filters/adapters/create-dual-range-filter-adapter.d.ts +44 -0
- package/dist/components/ds-table/filters/adapters/create-dual-range-filter-adapter.d.ts.map +1 -0
- package/dist/components/ds-table/filters/adapters/create-dual-range-filter-adapter.js +87 -0
- package/dist/components/ds-table/filters/adapters/create-dual-range-filter-adapter.js.map +1 -0
- package/dist/components/ds-table/filters/adapters/create-filter-adapter.cjs +83 -0
- package/dist/components/ds-table/filters/adapters/create-filter-adapter.d.cts +111 -0
- package/dist/components/ds-table/filters/adapters/create-filter-adapter.d.cts.map +1 -0
- package/dist/components/ds-table/filters/adapters/create-filter-adapter.d.ts +111 -0
- package/dist/components/ds-table/filters/adapters/create-filter-adapter.d.ts.map +1 -0
- package/dist/components/ds-table/filters/adapters/create-filter-adapter.js +83 -0
- package/dist/components/ds-table/filters/adapters/create-filter-adapter.js.map +1 -0
- package/dist/components/ds-table/filters/adapters/index.cjs +3 -0
- package/dist/components/ds-table/filters/adapters/index.d.ts +3 -0
- package/dist/components/ds-table/filters/adapters/index.js +3 -0
- package/dist/components/ds-table/filters/components/checkbox-filter/checkbox-filter.cjs +22 -0
- package/dist/components/ds-table/filters/components/checkbox-filter/checkbox-filter.d.cts +17 -0
- package/dist/components/ds-table/filters/components/checkbox-filter/checkbox-filter.d.cts.map +1 -0
- package/dist/components/ds-table/filters/components/checkbox-filter/checkbox-filter.d.ts +18 -0
- package/dist/components/ds-table/filters/components/checkbox-filter/checkbox-filter.d.ts.map +1 -0
- package/dist/components/ds-table/filters/components/checkbox-filter/checkbox-filter.js +22 -0
- package/dist/components/ds-table/filters/components/checkbox-filter/checkbox-filter.js.map +1 -0
- package/dist/components/ds-table/filters/components/checkbox-filter/index.cjs +1 -0
- package/dist/components/ds-table/filters/components/checkbox-filter/index.d.ts +1 -0
- package/dist/components/ds-table/filters/components/checkbox-filter/index.js +1 -0
- package/dist/components/ds-table/filters/components/range-filter/index.cjs +1 -0
- package/dist/components/ds-table/filters/components/range-filter/index.d.ts +1 -0
- package/dist/components/ds-table/filters/components/range-filter/index.js +1 -0
- package/dist/components/ds-table/filters/components/range-filter/range-filter.cjs +177 -0
- package/dist/components/ds-table/filters/components/range-filter/range-filter.d.cts +14 -0
- package/dist/components/ds-table/filters/components/range-filter/range-filter.d.cts.map +1 -0
- package/dist/components/ds-table/filters/components/range-filter/range-filter.d.ts +16 -0
- package/dist/components/ds-table/filters/components/range-filter/range-filter.d.ts.map +1 -0
- package/dist/components/ds-table/filters/components/range-filter/range-filter.js +177 -0
- package/dist/components/ds-table/filters/components/range-filter/range-filter.js.map +1 -0
- package/dist/components/ds-table/filters/components/range-filter/range-filter.module.cjs +11 -0
- package/dist/components/ds-table/filters/components/range-filter/range-filter.module.js +11 -0
- package/dist/components/ds-table/filters/components/range-filter/range-filter.module.js.map +1 -0
- package/dist/components/ds-table/filters/hooks/index.cjs +1 -0
- package/dist/components/ds-table/filters/hooks/index.d.ts +1 -0
- package/dist/components/ds-table/filters/hooks/index.js +1 -0
- package/dist/components/ds-table/filters/hooks/use-table-filters.cjs +211 -0
- package/dist/components/ds-table/filters/hooks/use-table-filters.d.cts +65 -0
- package/dist/components/ds-table/filters/hooks/use-table-filters.d.cts.map +1 -0
- package/dist/components/ds-table/filters/hooks/use-table-filters.d.ts +66 -0
- package/dist/components/ds-table/filters/hooks/use-table-filters.d.ts.map +1 -0
- package/dist/components/ds-table/filters/hooks/use-table-filters.js +211 -0
- package/dist/components/ds-table/filters/hooks/use-table-filters.js.map +1 -0
- package/dist/components/ds-table/filters/index.cjs +6 -0
- package/dist/components/ds-table/filters/index.d.ts +11 -0
- package/dist/components/ds-table/filters/index.js +6 -0
- package/dist/components/ds-table/filters/types/filter-adapter.types.d.cts +101 -0
- package/dist/components/ds-table/filters/types/filter-adapter.types.d.cts.map +1 -0
- package/dist/components/ds-table/filters/types/filter-adapter.types.d.ts +102 -0
- package/dist/components/ds-table/filters/types/filter-adapter.types.d.ts.map +1 -0
- package/dist/components/ds-table/index.cjs +5 -0
- package/dist/components/ds-table/index.d.ts +8 -0
- package/dist/components/ds-table/index.js +5 -0
- package/dist/components/ds-toggle/ds-toggle.cjs +192 -0
- package/dist/components/ds-toggle/ds-toggle.d.cts +24 -0
- package/dist/components/ds-toggle/ds-toggle.d.cts.map +1 -0
- package/dist/components/ds-toggle/ds-toggle.d.ts +24 -0
- package/dist/components/ds-toggle/ds-toggle.d.ts.map +1 -0
- package/dist/components/ds-toggle/ds-toggle.js +191 -0
- package/dist/components/ds-toggle/ds-toggle.js.map +1 -0
- package/dist/components/ds-toggle/ds-toggle.module.cjs +13 -0
- package/dist/components/ds-toggle/ds-toggle.module.js +13 -0
- package/dist/components/ds-toggle/ds-toggle.module.js.map +1 -0
- package/dist/components/ds-toggle/ds-toggle.types.d.cts +67 -0
- package/dist/components/ds-toggle/ds-toggle.types.d.cts.map +1 -0
- package/dist/components/ds-toggle/ds-toggle.types.d.ts +67 -0
- package/dist/components/ds-toggle/ds-toggle.types.d.ts.map +1 -0
- package/dist/components/ds-toggle/index.cjs +1 -0
- package/dist/components/ds-toggle/index.d.ts +2 -0
- package/dist/components/ds-toggle/index.js +1 -0
- package/dist/components/ds-vertical-tabs/ds-vertical-tabs.d.cts +5 -5
- package/dist/components/ds-vertical-tabs/ds-vertical-tabs.d.ts +5 -5
- package/dist/index.cjs +20 -0
- package/dist/index.d.cts +17 -2
- package/dist/index.d.ts +21 -2
- package/dist/index.js +13 -1
- package/dist/index.min.css +1 -1
- package/package.json +3 -2
- package/src/components/ds-button/versions/ds-button-new/ds-button-new.module.scss +0 -1
- package/src/components/ds-date-input/ds-date-input.module.scss +246 -0
- package/src/components/ds-date-input/ds-date-input.tsx +309 -0
- package/src/components/ds-date-input/ds-date-input.types.tsx +104 -0
- package/src/components/ds-date-input/ds-date-input.utils.ts +242 -0
- package/src/components/ds-date-input/index.ts +2 -0
- package/src/components/ds-divider/ds-divider.module.scss +21 -0
- package/src/components/ds-divider/ds-divider.tsx +22 -0
- package/src/components/ds-divider/ds-divider.types.ts +21 -0
- package/src/components/ds-divider/index.ts +2 -0
- package/src/components/ds-dropdown-menu/ds-dropdown-menu.module.scss +11 -3
- package/src/components/ds-dropdown-menu/ds-dropdown-menu.tsx +17 -1
- package/src/components/ds-dropdown-menu/ds-dropdown-menu.types.tsx +5 -0
- package/src/components/ds-form-control/ds-form-control.tsx +2 -0
- package/src/components/ds-radio-group/ds-radio-group.types.tsx +1 -1
- 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/components/ds-table/filters/hooks/index.ts +1 -0
- package/src/components/ds-table/index.ts +2 -0
- package/src/components/ds-toggle/ds-toggle.module.scss +154 -0
- package/src/components/ds-toggle/ds-toggle.tsx +78 -0
- package/src/components/ds-toggle/ds-toggle.types.tsx +76 -0
- package/src/components/ds-toggle/index.tsx +2 -0
- package/src/index.ts +4 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_ds_icon = require('../ds-icon/ds-icon.cjs');
|
|
3
|
+
require('../ds-icon/index.cjs');
|
|
4
|
+
const require_ds_typography = require('../ds-typography/ds-typography.cjs');
|
|
5
|
+
require('../ds-typography/index.cjs');
|
|
6
|
+
const require_ds_toggle_module = require('./ds-toggle.module.cjs');
|
|
7
|
+
let react_compiler_runtime = require("react/compiler-runtime");
|
|
8
|
+
let classnames = require("classnames");
|
|
9
|
+
classnames = require_rolldown_runtime.__toESM(classnames);
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
+
let __ark_ui_react_switch = require("@ark-ui/react/switch");
|
|
12
|
+
|
|
13
|
+
//#region src/components/ds-toggle/ds-toggle.tsx
|
|
14
|
+
/**
|
|
15
|
+
* Design system Toggle component
|
|
16
|
+
*/
|
|
17
|
+
const DsToggle = (t0) => {
|
|
18
|
+
const $ = (0, react_compiler_runtime.c)(48);
|
|
19
|
+
let checked;
|
|
20
|
+
let children;
|
|
21
|
+
let className;
|
|
22
|
+
let label;
|
|
23
|
+
let labelInfo;
|
|
24
|
+
let name;
|
|
25
|
+
let onChange;
|
|
26
|
+
let onValueChange;
|
|
27
|
+
let ref;
|
|
28
|
+
let rest;
|
|
29
|
+
let t1;
|
|
30
|
+
let t2;
|
|
31
|
+
if ($[0] !== t0) {
|
|
32
|
+
({ref, label, name, labelInfo, className, style: t1, onChange, onValueChange, size: t2, children, checked, ...rest} = t0);
|
|
33
|
+
$[0] = t0;
|
|
34
|
+
$[1] = checked;
|
|
35
|
+
$[2] = children;
|
|
36
|
+
$[3] = className;
|
|
37
|
+
$[4] = label;
|
|
38
|
+
$[5] = labelInfo;
|
|
39
|
+
$[6] = name;
|
|
40
|
+
$[7] = onChange;
|
|
41
|
+
$[8] = onValueChange;
|
|
42
|
+
$[9] = ref;
|
|
43
|
+
$[10] = rest;
|
|
44
|
+
$[11] = t1;
|
|
45
|
+
$[12] = t2;
|
|
46
|
+
} else {
|
|
47
|
+
checked = $[1];
|
|
48
|
+
children = $[2];
|
|
49
|
+
className = $[3];
|
|
50
|
+
label = $[4];
|
|
51
|
+
labelInfo = $[5];
|
|
52
|
+
name = $[6];
|
|
53
|
+
onChange = $[7];
|
|
54
|
+
onValueChange = $[8];
|
|
55
|
+
ref = $[9];
|
|
56
|
+
rest = $[10];
|
|
57
|
+
t1 = $[11];
|
|
58
|
+
t2 = $[12];
|
|
59
|
+
}
|
|
60
|
+
let t3;
|
|
61
|
+
if ($[13] !== t1) {
|
|
62
|
+
t3 = t1 === void 0 ? {} : t1;
|
|
63
|
+
$[13] = t1;
|
|
64
|
+
$[14] = t3;
|
|
65
|
+
} else t3 = $[14];
|
|
66
|
+
const style = t3;
|
|
67
|
+
const isSmall = (t2 === void 0 ? "default" : t2) === "small";
|
|
68
|
+
const iconSize = isSmall ? "tiny" : "small";
|
|
69
|
+
let t4;
|
|
70
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
71
|
+
t4 = (0, classnames.default)(require_ds_toggle_module.default.icon, require_ds_toggle_module.default.iconCheck);
|
|
72
|
+
$[15] = t4;
|
|
73
|
+
} else t4 = $[15];
|
|
74
|
+
const checkIconClass = t4;
|
|
75
|
+
let t5;
|
|
76
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
77
|
+
t5 = (0, classnames.default)(require_ds_toggle_module.default.icon, require_ds_toggle_module.default.iconClose);
|
|
78
|
+
$[16] = t5;
|
|
79
|
+
} else t5 = $[16];
|
|
80
|
+
const closeIconClass = t5;
|
|
81
|
+
let t6;
|
|
82
|
+
if ($[17] !== className || $[18] !== isSmall) {
|
|
83
|
+
t6 = (0, classnames.default)(require_ds_toggle_module.default.root, { [require_ds_toggle_module.default.small]: isSmall }, className);
|
|
84
|
+
$[17] = className;
|
|
85
|
+
$[18] = isSmall;
|
|
86
|
+
$[19] = t6;
|
|
87
|
+
} else t6 = $[19];
|
|
88
|
+
const rootClass = t6;
|
|
89
|
+
let t7;
|
|
90
|
+
if ($[20] !== onValueChange) {
|
|
91
|
+
t7 = (e) => {
|
|
92
|
+
onValueChange?.(e.checked);
|
|
93
|
+
};
|
|
94
|
+
$[20] = onValueChange;
|
|
95
|
+
$[21] = t7;
|
|
96
|
+
} else t7 = $[21];
|
|
97
|
+
const handleCheckedChange = t7;
|
|
98
|
+
const t8 = ref;
|
|
99
|
+
let t9;
|
|
100
|
+
if ($[22] !== iconSize) {
|
|
101
|
+
t9 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, {
|
|
102
|
+
icon: "check",
|
|
103
|
+
size: iconSize,
|
|
104
|
+
className: checkIconClass
|
|
105
|
+
});
|
|
106
|
+
$[22] = iconSize;
|
|
107
|
+
$[23] = t9;
|
|
108
|
+
} else t9 = $[23];
|
|
109
|
+
let t10;
|
|
110
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
111
|
+
t10 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react_switch.Switch.Thumb, {});
|
|
112
|
+
$[24] = t10;
|
|
113
|
+
} else t10 = $[24];
|
|
114
|
+
let t11;
|
|
115
|
+
if ($[25] !== iconSize) {
|
|
116
|
+
t11 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_icon.default, {
|
|
117
|
+
icon: "close",
|
|
118
|
+
size: iconSize,
|
|
119
|
+
className: closeIconClass
|
|
120
|
+
});
|
|
121
|
+
$[25] = iconSize;
|
|
122
|
+
$[26] = t11;
|
|
123
|
+
} else t11 = $[26];
|
|
124
|
+
let t12;
|
|
125
|
+
if ($[27] !== t11 || $[28] !== t9) {
|
|
126
|
+
t12 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__ark_ui_react_switch.Switch.Control, { children: [
|
|
127
|
+
t9,
|
|
128
|
+
t10,
|
|
129
|
+
t11
|
|
130
|
+
] });
|
|
131
|
+
$[27] = t11;
|
|
132
|
+
$[28] = t9;
|
|
133
|
+
$[29] = t12;
|
|
134
|
+
} else t12 = $[29];
|
|
135
|
+
let t13;
|
|
136
|
+
if ($[30] !== children || $[31] !== isSmall || $[32] !== label || $[33] !== labelInfo) {
|
|
137
|
+
t13 = label ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__ark_ui_react_switch.Switch.Label, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_typography.default, {
|
|
138
|
+
variant: isSmall ? "body-xs-md" : "body-sm-md",
|
|
139
|
+
children: label
|
|
140
|
+
}), !!labelInfo && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ds_typography.default, {
|
|
141
|
+
variant: "body-xs-reg",
|
|
142
|
+
className: require_ds_toggle_module.default.labelInfo,
|
|
143
|
+
children: labelInfo
|
|
144
|
+
})] }) : children;
|
|
145
|
+
$[30] = children;
|
|
146
|
+
$[31] = isSmall;
|
|
147
|
+
$[32] = label;
|
|
148
|
+
$[33] = labelInfo;
|
|
149
|
+
$[34] = t13;
|
|
150
|
+
} else t13 = $[34];
|
|
151
|
+
let t14;
|
|
152
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
153
|
+
t14 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__ark_ui_react_switch.Switch.HiddenInput, {});
|
|
154
|
+
$[35] = t14;
|
|
155
|
+
} else t14 = $[35];
|
|
156
|
+
let t15;
|
|
157
|
+
if ($[36] !== checked || $[37] !== handleCheckedChange || $[38] !== label || $[39] !== name || $[40] !== onChange || $[41] !== rest || $[42] !== rootClass || $[43] !== style || $[44] !== t12 || $[45] !== t13 || $[46] !== t8) {
|
|
158
|
+
t15 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__ark_ui_react_switch.Switch.Root, {
|
|
159
|
+
ref: t8,
|
|
160
|
+
style,
|
|
161
|
+
className: rootClass,
|
|
162
|
+
label,
|
|
163
|
+
checked,
|
|
164
|
+
name,
|
|
165
|
+
onCheckedChange: handleCheckedChange,
|
|
166
|
+
onClick: onChange,
|
|
167
|
+
...rest,
|
|
168
|
+
children: [
|
|
169
|
+
t12,
|
|
170
|
+
t13,
|
|
171
|
+
t14
|
|
172
|
+
]
|
|
173
|
+
});
|
|
174
|
+
$[36] = checked;
|
|
175
|
+
$[37] = handleCheckedChange;
|
|
176
|
+
$[38] = label;
|
|
177
|
+
$[39] = name;
|
|
178
|
+
$[40] = onChange;
|
|
179
|
+
$[41] = rest;
|
|
180
|
+
$[42] = rootClass;
|
|
181
|
+
$[43] = style;
|
|
182
|
+
$[44] = t12;
|
|
183
|
+
$[45] = t13;
|
|
184
|
+
$[46] = t8;
|
|
185
|
+
$[47] = t15;
|
|
186
|
+
} else t15 = $[47];
|
|
187
|
+
return t15;
|
|
188
|
+
};
|
|
189
|
+
var ds_toggle_default = DsToggle;
|
|
190
|
+
|
|
191
|
+
//#endregion
|
|
192
|
+
exports.default = ds_toggle_default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DsToggleProps } from "./ds-toggle.types.cjs";
|
|
2
|
+
import * as react_jsx_runtime40 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ds-toggle/ds-toggle.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Design system Toggle component
|
|
7
|
+
*/
|
|
8
|
+
declare const DsToggle: ({
|
|
9
|
+
ref,
|
|
10
|
+
label,
|
|
11
|
+
name,
|
|
12
|
+
labelInfo,
|
|
13
|
+
className,
|
|
14
|
+
style,
|
|
15
|
+
onChange,
|
|
16
|
+
onValueChange,
|
|
17
|
+
size,
|
|
18
|
+
children,
|
|
19
|
+
checked,
|
|
20
|
+
...rest
|
|
21
|
+
}: DsToggleProps) => react_jsx_runtime40.JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { DsToggle };
|
|
24
|
+
//# sourceMappingURL=ds-toggle.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-toggle.d.cts","names":[],"sources":["../../../src/components/ds-toggle/ds-toggle.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAEuD,cASjD,QAgEL,EAAA,CAAA;EAAA,GAAA;EAAA,KAAA;EAAA,IAAA;EAAA,SAAA;EAAA,SAAA;EAAA,KAAA;EAAA,QAAA;EAAA,aAAA;EAAA,IAAA;EAAA,QAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EAnDE,aAmDF,EAAA,GAnDe,mBAAA,CAAA,GAAA,CAAA,OAmDf"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DsToggleProps } from "./ds-toggle.types.js";
|
|
2
|
+
import * as react_jsx_runtime41 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ds-toggle/ds-toggle.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Design system Toggle component
|
|
7
|
+
*/
|
|
8
|
+
declare const DsToggle: ({
|
|
9
|
+
ref,
|
|
10
|
+
label,
|
|
11
|
+
name,
|
|
12
|
+
labelInfo,
|
|
13
|
+
className,
|
|
14
|
+
style,
|
|
15
|
+
onChange,
|
|
16
|
+
onValueChange,
|
|
17
|
+
size,
|
|
18
|
+
children,
|
|
19
|
+
checked,
|
|
20
|
+
...rest
|
|
21
|
+
}: DsToggleProps) => react_jsx_runtime41.JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { DsToggle };
|
|
24
|
+
//# sourceMappingURL=ds-toggle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-toggle.d.ts","names":[],"sources":["../../../src/components/ds-toggle/ds-toggle.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAEuD,cASjD,QAgEL,EAAA,CAAA;EAAA,GAAA;EAAA,KAAA;EAAA,IAAA;EAAA,SAAA;EAAA,SAAA;EAAA,KAAA;EAAA,QAAA;EAAA,aAAA;EAAA,IAAA;EAAA,QAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EAnDE,aAmDF,EAAA,GAnDe,mBAAA,CAAA,GAAA,CAAA,OAmDf"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import ds_icon_default from "../ds-icon/ds-icon.js";
|
|
2
|
+
import "../ds-icon/index.js";
|
|
3
|
+
import ds_typography_default from "../ds-typography/ds-typography.js";
|
|
4
|
+
import "../ds-typography/index.js";
|
|
5
|
+
import ds_toggle_module_default from "./ds-toggle.module.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
|
+
import classNames from "classnames";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Switch } from "@ark-ui/react/switch";
|
|
10
|
+
|
|
11
|
+
//#region src/components/ds-toggle/ds-toggle.tsx
|
|
12
|
+
/**
|
|
13
|
+
* Design system Toggle component
|
|
14
|
+
*/
|
|
15
|
+
const DsToggle = (t0) => {
|
|
16
|
+
const $ = c(48);
|
|
17
|
+
let checked;
|
|
18
|
+
let children;
|
|
19
|
+
let className;
|
|
20
|
+
let label;
|
|
21
|
+
let labelInfo;
|
|
22
|
+
let name;
|
|
23
|
+
let onChange;
|
|
24
|
+
let onValueChange;
|
|
25
|
+
let ref;
|
|
26
|
+
let rest;
|
|
27
|
+
let t1;
|
|
28
|
+
let t2;
|
|
29
|
+
if ($[0] !== t0) {
|
|
30
|
+
({ref, label, name, labelInfo, className, style: t1, onChange, onValueChange, size: t2, children, checked, ...rest} = t0);
|
|
31
|
+
$[0] = t0;
|
|
32
|
+
$[1] = checked;
|
|
33
|
+
$[2] = children;
|
|
34
|
+
$[3] = className;
|
|
35
|
+
$[4] = label;
|
|
36
|
+
$[5] = labelInfo;
|
|
37
|
+
$[6] = name;
|
|
38
|
+
$[7] = onChange;
|
|
39
|
+
$[8] = onValueChange;
|
|
40
|
+
$[9] = ref;
|
|
41
|
+
$[10] = rest;
|
|
42
|
+
$[11] = t1;
|
|
43
|
+
$[12] = t2;
|
|
44
|
+
} else {
|
|
45
|
+
checked = $[1];
|
|
46
|
+
children = $[2];
|
|
47
|
+
className = $[3];
|
|
48
|
+
label = $[4];
|
|
49
|
+
labelInfo = $[5];
|
|
50
|
+
name = $[6];
|
|
51
|
+
onChange = $[7];
|
|
52
|
+
onValueChange = $[8];
|
|
53
|
+
ref = $[9];
|
|
54
|
+
rest = $[10];
|
|
55
|
+
t1 = $[11];
|
|
56
|
+
t2 = $[12];
|
|
57
|
+
}
|
|
58
|
+
let t3;
|
|
59
|
+
if ($[13] !== t1) {
|
|
60
|
+
t3 = t1 === void 0 ? {} : t1;
|
|
61
|
+
$[13] = t1;
|
|
62
|
+
$[14] = t3;
|
|
63
|
+
} else t3 = $[14];
|
|
64
|
+
const style = t3;
|
|
65
|
+
const isSmall = (t2 === void 0 ? "default" : t2) === "small";
|
|
66
|
+
const iconSize = isSmall ? "tiny" : "small";
|
|
67
|
+
let t4;
|
|
68
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
69
|
+
t4 = classNames(ds_toggle_module_default.icon, ds_toggle_module_default.iconCheck);
|
|
70
|
+
$[15] = t4;
|
|
71
|
+
} else t4 = $[15];
|
|
72
|
+
const checkIconClass = t4;
|
|
73
|
+
let t5;
|
|
74
|
+
if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
|
|
75
|
+
t5 = classNames(ds_toggle_module_default.icon, ds_toggle_module_default.iconClose);
|
|
76
|
+
$[16] = t5;
|
|
77
|
+
} else t5 = $[16];
|
|
78
|
+
const closeIconClass = t5;
|
|
79
|
+
let t6;
|
|
80
|
+
if ($[17] !== className || $[18] !== isSmall) {
|
|
81
|
+
t6 = classNames(ds_toggle_module_default.root, { [ds_toggle_module_default.small]: isSmall }, className);
|
|
82
|
+
$[17] = className;
|
|
83
|
+
$[18] = isSmall;
|
|
84
|
+
$[19] = t6;
|
|
85
|
+
} else t6 = $[19];
|
|
86
|
+
const rootClass = t6;
|
|
87
|
+
let t7;
|
|
88
|
+
if ($[20] !== onValueChange) {
|
|
89
|
+
t7 = (e) => {
|
|
90
|
+
onValueChange?.(e.checked);
|
|
91
|
+
};
|
|
92
|
+
$[20] = onValueChange;
|
|
93
|
+
$[21] = t7;
|
|
94
|
+
} else t7 = $[21];
|
|
95
|
+
const handleCheckedChange = t7;
|
|
96
|
+
const t8 = ref;
|
|
97
|
+
let t9;
|
|
98
|
+
if ($[22] !== iconSize) {
|
|
99
|
+
t9 = /* @__PURE__ */ jsx(ds_icon_default, {
|
|
100
|
+
icon: "check",
|
|
101
|
+
size: iconSize,
|
|
102
|
+
className: checkIconClass
|
|
103
|
+
});
|
|
104
|
+
$[22] = iconSize;
|
|
105
|
+
$[23] = t9;
|
|
106
|
+
} else t9 = $[23];
|
|
107
|
+
let t10;
|
|
108
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
109
|
+
t10 = /* @__PURE__ */ jsx(Switch.Thumb, {});
|
|
110
|
+
$[24] = t10;
|
|
111
|
+
} else t10 = $[24];
|
|
112
|
+
let t11;
|
|
113
|
+
if ($[25] !== iconSize) {
|
|
114
|
+
t11 = /* @__PURE__ */ jsx(ds_icon_default, {
|
|
115
|
+
icon: "close",
|
|
116
|
+
size: iconSize,
|
|
117
|
+
className: closeIconClass
|
|
118
|
+
});
|
|
119
|
+
$[25] = iconSize;
|
|
120
|
+
$[26] = t11;
|
|
121
|
+
} else t11 = $[26];
|
|
122
|
+
let t12;
|
|
123
|
+
if ($[27] !== t11 || $[28] !== t9) {
|
|
124
|
+
t12 = /* @__PURE__ */ jsxs(Switch.Control, { children: [
|
|
125
|
+
t9,
|
|
126
|
+
t10,
|
|
127
|
+
t11
|
|
128
|
+
] });
|
|
129
|
+
$[27] = t11;
|
|
130
|
+
$[28] = t9;
|
|
131
|
+
$[29] = t12;
|
|
132
|
+
} else t12 = $[29];
|
|
133
|
+
let t13;
|
|
134
|
+
if ($[30] !== children || $[31] !== isSmall || $[32] !== label || $[33] !== labelInfo) {
|
|
135
|
+
t13 = label ? /* @__PURE__ */ jsxs(Switch.Label, { children: [/* @__PURE__ */ jsx(ds_typography_default, {
|
|
136
|
+
variant: isSmall ? "body-xs-md" : "body-sm-md",
|
|
137
|
+
children: label
|
|
138
|
+
}), !!labelInfo && /* @__PURE__ */ jsx(ds_typography_default, {
|
|
139
|
+
variant: "body-xs-reg",
|
|
140
|
+
className: ds_toggle_module_default.labelInfo,
|
|
141
|
+
children: labelInfo
|
|
142
|
+
})] }) : children;
|
|
143
|
+
$[30] = children;
|
|
144
|
+
$[31] = isSmall;
|
|
145
|
+
$[32] = label;
|
|
146
|
+
$[33] = labelInfo;
|
|
147
|
+
$[34] = t13;
|
|
148
|
+
} else t13 = $[34];
|
|
149
|
+
let t14;
|
|
150
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
151
|
+
t14 = /* @__PURE__ */ jsx(Switch.HiddenInput, {});
|
|
152
|
+
$[35] = t14;
|
|
153
|
+
} else t14 = $[35];
|
|
154
|
+
let t15;
|
|
155
|
+
if ($[36] !== checked || $[37] !== handleCheckedChange || $[38] !== label || $[39] !== name || $[40] !== onChange || $[41] !== rest || $[42] !== rootClass || $[43] !== style || $[44] !== t12 || $[45] !== t13 || $[46] !== t8) {
|
|
156
|
+
t15 = /* @__PURE__ */ jsxs(Switch.Root, {
|
|
157
|
+
ref: t8,
|
|
158
|
+
style,
|
|
159
|
+
className: rootClass,
|
|
160
|
+
label,
|
|
161
|
+
checked,
|
|
162
|
+
name,
|
|
163
|
+
onCheckedChange: handleCheckedChange,
|
|
164
|
+
onClick: onChange,
|
|
165
|
+
...rest,
|
|
166
|
+
children: [
|
|
167
|
+
t12,
|
|
168
|
+
t13,
|
|
169
|
+
t14
|
|
170
|
+
]
|
|
171
|
+
});
|
|
172
|
+
$[36] = checked;
|
|
173
|
+
$[37] = handleCheckedChange;
|
|
174
|
+
$[38] = label;
|
|
175
|
+
$[39] = name;
|
|
176
|
+
$[40] = onChange;
|
|
177
|
+
$[41] = rest;
|
|
178
|
+
$[42] = rootClass;
|
|
179
|
+
$[43] = style;
|
|
180
|
+
$[44] = t12;
|
|
181
|
+
$[45] = t13;
|
|
182
|
+
$[46] = t8;
|
|
183
|
+
$[47] = t15;
|
|
184
|
+
} else t15 = $[47];
|
|
185
|
+
return t15;
|
|
186
|
+
};
|
|
187
|
+
var ds_toggle_default = DsToggle;
|
|
188
|
+
|
|
189
|
+
//#endregion
|
|
190
|
+
export { ds_toggle_default as default };
|
|
191
|
+
//# sourceMappingURL=ds-toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-toggle.js","names":["Switch","SwitchCheckedChangeDetails","classNames","DsToggleProps","styles","DsIcon","DsTypography","Ref","DsToggle","t0","$","_c","checked","children","className","label","labelInfo","name","onChange","onValueChange","ref","rest","t1","t2","style","size","t3","undefined","isSmall","iconSize","t4","Symbol","for","icon","iconCheck","checkIconClass","t5","iconClose","closeIconClass","t6","root","small","rootClass","t7","e","handleCheckedChange","t8","HTMLLabelElement","t9","t10","t11","t12","t13","t14","t15"],"sources":["../../../src/components/ds-toggle/ds-toggle.tsx"],"sourcesContent":["import { Switch, type SwitchCheckedChangeDetails } from '@ark-ui/react/switch';\nimport classNames from 'classnames';\nimport type { DsToggleProps } from './ds-toggle.types';\nimport styles from './ds-toggle.module.scss';\nimport { DsIcon } from '../ds-icon';\nimport { DsTypography } from '../ds-typography';\nimport type { Ref } from 'react';\n\n/**\n * Design system Toggle component\n */\nconst DsToggle = ({\n\tref,\n\tlabel,\n\tname,\n\tlabelInfo,\n\tclassName,\n\tstyle = {},\n\tonChange,\n\tonValueChange,\n\tsize = 'default',\n\tchildren,\n\tchecked,\n\t...rest\n}: DsToggleProps) => {\n\tconst isSmall = size === 'small';\n\tconst iconSize = isSmall ? 'tiny' : 'small';\n\tconst checkIconClass = classNames(styles.icon, styles.iconCheck);\n\tconst closeIconClass = classNames(styles.icon, styles.iconClose);\n\n\tconst rootClass = classNames(\n\t\tstyles.root,\n\t\t{\n\t\t\t[styles.small]: isSmall,\n\t\t},\n\t\tclassName,\n\t);\n\n\tconst handleCheckedChange = (e: SwitchCheckedChangeDetails) => {\n\t\tonValueChange?.(e.checked);\n\t};\n\n\treturn (\n\t\t<Switch.Root\n\t\t\tref={ref as Ref<HTMLLabelElement>}\n\t\t\tstyle={style}\n\t\t\tclassName={rootClass}\n\t\t\tlabel={label}\n\t\t\tchecked={checked}\n\t\t\tname={name}\n\t\t\tonCheckedChange={handleCheckedChange}\n\t\t\tonClick={onChange}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<Switch.Control>\n\t\t\t\t<DsIcon icon=\"check\" size={iconSize} className={checkIconClass} />\n\t\t\t\t<Switch.Thumb />\n\t\t\t\t<DsIcon icon=\"close\" size={iconSize} className={closeIconClass} />\n\t\t\t</Switch.Control>\n\n\t\t\t{label ? (\n\t\t\t\t<Switch.Label>\n\t\t\t\t\t<DsTypography variant={isSmall ? 'body-xs-md' : 'body-sm-md'}>{label}</DsTypography>\n\t\t\t\t\t{!!labelInfo && (\n\t\t\t\t\t\t<DsTypography variant=\"body-xs-reg\" className={styles.labelInfo}>\n\t\t\t\t\t\t\t{labelInfo}\n\t\t\t\t\t\t</DsTypography>\n\t\t\t\t\t)}\n\t\t\t\t</Switch.Label>\n\t\t\t) : (\n\t\t\t\tchildren\n\t\t\t)}\n\t\t\t<Switch.HiddenInput />\n\t\t</Switch.Root>\n\t);\n};\n\nexport default DsToggle;\n"],"mappings":";;;;;;;;;;;;;;AAWA,MAAMQ,YAAWC,OAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;AAAA,KAAAb,EAAA,OAAAD,IAAA;AAAC,GAAA,CAAAW,KAAAL,OAAAE,MAAAD,WAAAF,WAAAU,OAAAF,IAAAJ,UAAAC,eAAAM,MAAAF,IAAAV,UAAAD,YAAAS,QAAAZ;AAaFC,IAAA,KAAAD;AAAAC,IAAA,KAAAE;AAAAF,IAAA,KAAAG;AAAAH,IAAA,KAAAI;AAAAJ,IAAA,KAAAK;AAAAL,IAAA,KAAAM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{
|
|
4
|
+
"root": "_root_warw8_1",
|
|
5
|
+
"small": "_small_warw8_1",
|
|
6
|
+
"iconCheck": "_iconCheck_warw8_1",
|
|
7
|
+
"iconClose": "_iconClose_warw8_1",
|
|
8
|
+
"labelInfo": "_labelInfo_warw8_1",
|
|
9
|
+
"icon": "_icon_warw8_1"
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
exports.default = ds_toggle_module_default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/components/ds-toggle/ds-toggle.module.scss
|
|
2
|
+
var ds_toggle_module_default = {
|
|
3
|
+
"root": "_root_warw8_1",
|
|
4
|
+
"small": "_small_warw8_1",
|
|
5
|
+
"iconCheck": "_iconCheck_warw8_1",
|
|
6
|
+
"iconClose": "_iconClose_warw8_1",
|
|
7
|
+
"labelInfo": "_labelInfo_warw8_1",
|
|
8
|
+
"icon": "_icon_warw8_1"
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { ds_toggle_module_default as default };
|
|
13
|
+
//# sourceMappingURL=ds-toggle.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-toggle.module.js","names":[],"sources":["../../../src/components/ds-toggle/ds-toggle.module.scss"],"sourcesContent":[".root {\n\tdisplay: flex;\n\talign-items: flex-start;\n\tposition: relative;\n\twidth: fit-content;\n\n\t--switch-track-width: 36px;\n\t--thumb-size: 16px;\n\t--thumb-gap: 2px;\n\t--transition-duration: 200ms;\n\t--switch-track-diff: calc(var(--switch-track-width) - var(--thumb-size));\n\t--switch-thumb-x: var(--switch-track-diff);\n\t--icon-spacing: 2px;\n\n\t&.small {\n\t\t--switch-track-width: 26px;\n\t\t--thumb-size: 12px;\n\t\t--icon-spacing: 1px;\n\t}\n\n\t[data-part='control'] {\n\t\tposition: relative;\n\t\toutline: 2px solid transparent;\n\t\tdisplay: inline-flex;\n\t\tflex-shrink: 0;\n\t\tjustify-content: flex-start;\n\t\tbox-sizing: content-box;\n\t\tcursor: pointer;\n\t\tborder-radius: 9999px;\n\t\ttransition-property: background-color, color, fill, stroke, opacity, transform, outline-color, opacity;\n\t\ttransition-duration: var(--transition-duration);\n\t\tpadding: var(--thumb-gap);\n\t\twidth: var(--switch-track-width);\n\t\theight: var(--thumb-size);\n\n\t\t&[data-state='unchecked'] {\n\t\t\tbackground: var(--color-background-deselected);\n\n\t\t\t&[data-hover] {\n\t\t\t\tbackground: var(--color-background-deselected-hover);\n\t\t\t}\n\n\t\t\t&[data-focus-visible] {\n\t\t\t\toutline-color: var(--color-background-action-hover);\n\t\t\t\tbackground: var(--color-background-deselected-hover);\n\t\t\t}\n\n\t\t\t.iconCheck {\n\t\t\t\topacity: 0;\n\t\t\t}\n\n\t\t\t.iconClose {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\n\t\t&[data-state='checked'] {\n\t\t\tbackground: var(--color-background-selected);\n\n\t\t\t&[data-hover] {\n\t\t\t\tbackground: var(--color-background-selected-hover);\n\t\t\t}\n\n\t\t\t&[data-focus-visible] {\n\t\t\t\toutline-color: var(--color-background-selected);\n\t\t\t\tbackground: var(--color-background-selected-hover);\n\t\t\t}\n\n\t\t\t.iconCheck {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\t.iconClose {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t}\n\n\t\t&[data-disabled] {\n\t\t\tcursor: not-allowed;\n\t\t\tbackground: var(--color-background-disable);\n\n\t\t\t&[data-hover] {\n\t\t\t\tbackground: var(--color-background-deselected-hover);\n\t\t\t}\n\n\t\t\t&[data-focus-visible] {\n\t\t\t\toutline-color: var(--color-background-action-hover);\n\t\t\t\tbackground: var(--color-background-deselected-hover);\n\t\t\t}\n\t\t}\n\t}\n\n\t[data-part='thumb'] {\n\t\tborder-radius: 9999px;\n\t\tposition: relative;\n\t\ttransition-property: transform;\n\t\tbackground: var(--color-background);\n\t\ttransition-duration: var(--transition-duration);\n\t\theight: 100%;\n\t\taspect-ratio: 1/1;\n\n\t\t&:before {\n\t\t\tcontent: '';\n\t\t\ttransition: background-color var(--transition-duration) ease-in-out;\n\t\t\tposition: absolute;\n\t\t\tbackground-color: transparent;\n\t\t\tz-index: 10;\n\t\t\ttop: 50%;\n\t\t\tleft: 50%;\n\t\t\ttransform: translate(-50%, -50%);\n\t\t}\n\n\t\t&[data-state='checked'] {\n\t\t\ttransform: translateX(var(--switch-thumb-x));\n\t\t}\n\t}\n\n\t[data-part='label'] {\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tmargin-left: var(--spacing-xs);\n\n\t\t.labelInfo {\n\t\t\twidth: 100%;\n\t\t\tcolor: var(--color-font-secondary);\n\t\t}\n\n\t\t&[data-disabled] {\n\t\t\tcolor: var(--color-font-disabled);\n\t\t\tcursor: default;\n\n\t\t\t.labelInfo {\n\t\t\t\tcolor: var(--color-background-disable);\n\t\t\t}\n\t\t}\n\t}\n\n\t.icon {\n\t\tcolor: var(--color-icon-inverse);\n\t\tposition: absolute;\n\t\ttop: 50%;\n\t\ttransform: translateY(-50%);\n\t\tpointer-events: none;\n\t}\n\n\t.iconCheck {\n\t\tleft: var(--icon-spacing);\n\t}\n\n\t.iconClose {\n\t\tright: var(--icon-spacing);\n\t}\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { CSSProperties, MouseEvent, ReactNode, Ref } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/ds-toggle/ds-toggle.types.d.ts
|
|
4
|
+
declare const toggleSizes: readonly ["default", "small"];
|
|
5
|
+
type ToggleSize = (typeof toggleSizes)[number];
|
|
6
|
+
/**
|
|
7
|
+
* Props for the DsToggle component
|
|
8
|
+
*/
|
|
9
|
+
type DsToggleProps = {
|
|
10
|
+
/**
|
|
11
|
+
* Forwarded ref for the toggle label element
|
|
12
|
+
*/
|
|
13
|
+
ref?: Ref<HTMLElement>;
|
|
14
|
+
/**
|
|
15
|
+
* Optional form field name
|
|
16
|
+
*/
|
|
17
|
+
name?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Additional CSS class names
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Additional styles to apply to the component
|
|
24
|
+
*/
|
|
25
|
+
style?: CSSProperties;
|
|
26
|
+
/**
|
|
27
|
+
* Event handler called on user interaction.
|
|
28
|
+
* Note: prefer `onValueChange` for checked-state changes.
|
|
29
|
+
*/
|
|
30
|
+
onChange?: (event: MouseEvent<HTMLElement>) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Event handler called when the checked state changes
|
|
33
|
+
*/
|
|
34
|
+
onValueChange?: (checked: boolean) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Visual size of the toggle
|
|
37
|
+
*/
|
|
38
|
+
size?: ToggleSize;
|
|
39
|
+
/**
|
|
40
|
+
* Controlled checked state
|
|
41
|
+
*/
|
|
42
|
+
checked?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether the toggle is disabled
|
|
45
|
+
*/
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
} & ({
|
|
48
|
+
/**
|
|
49
|
+
* Optional children (e.g., custom label content)
|
|
50
|
+
*/
|
|
51
|
+
children: ReactNode;
|
|
52
|
+
label?: never;
|
|
53
|
+
labelInfo?: never;
|
|
54
|
+
} | {
|
|
55
|
+
children?: never;
|
|
56
|
+
/**
|
|
57
|
+
* Optional label text displayed next to the toggle
|
|
58
|
+
*/
|
|
59
|
+
label?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Optional additional info text displayed below the label
|
|
62
|
+
*/
|
|
63
|
+
labelInfo?: string;
|
|
64
|
+
});
|
|
65
|
+
//#endregion
|
|
66
|
+
export { DsToggleProps, ToggleSize };
|
|
67
|
+
//# sourceMappingURL=ds-toggle.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-toggle.types.d.cts","names":[],"sources":["../../../src/components/ds-toggle/ds-toggle.types.tsx"],"sourcesContent":[],"mappings":";;;cAEa;KACD,UAAA,WAAqB;AADjC;AACA;AAKA;AAIW,KAJC,aAAA,GAID;EAAJ;;;EAqBa,GAAA,CAAA,EArBb,GAqBa,CArBT,WAqBS,CAAA;EAUZ;;;;;;;;;;;UAhBC;;;;;qBAMW,WAAW;;;;;;;;SAUvB;;;;;;;;;;;;;YAgBK"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { CSSProperties, MouseEvent, ReactNode, Ref } from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/components/ds-toggle/ds-toggle.types.d.ts
|
|
4
|
+
declare const toggleSizes: readonly ["default", "small"];
|
|
5
|
+
type ToggleSize = (typeof toggleSizes)[number];
|
|
6
|
+
/**
|
|
7
|
+
* Props for the DsToggle component
|
|
8
|
+
*/
|
|
9
|
+
type DsToggleProps = {
|
|
10
|
+
/**
|
|
11
|
+
* Forwarded ref for the toggle label element
|
|
12
|
+
*/
|
|
13
|
+
ref?: Ref<HTMLElement>;
|
|
14
|
+
/**
|
|
15
|
+
* Optional form field name
|
|
16
|
+
*/
|
|
17
|
+
name?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Additional CSS class names
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Additional styles to apply to the component
|
|
24
|
+
*/
|
|
25
|
+
style?: CSSProperties;
|
|
26
|
+
/**
|
|
27
|
+
* Event handler called on user interaction.
|
|
28
|
+
* Note: prefer `onValueChange` for checked-state changes.
|
|
29
|
+
*/
|
|
30
|
+
onChange?: (event: MouseEvent<HTMLElement>) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Event handler called when the checked state changes
|
|
33
|
+
*/
|
|
34
|
+
onValueChange?: (checked: boolean) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Visual size of the toggle
|
|
37
|
+
*/
|
|
38
|
+
size?: ToggleSize;
|
|
39
|
+
/**
|
|
40
|
+
* Controlled checked state
|
|
41
|
+
*/
|
|
42
|
+
checked?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether the toggle is disabled
|
|
45
|
+
*/
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
} & ({
|
|
48
|
+
/**
|
|
49
|
+
* Optional children (e.g., custom label content)
|
|
50
|
+
*/
|
|
51
|
+
children: ReactNode;
|
|
52
|
+
label?: never;
|
|
53
|
+
labelInfo?: never;
|
|
54
|
+
} | {
|
|
55
|
+
children?: never;
|
|
56
|
+
/**
|
|
57
|
+
* Optional label text displayed next to the toggle
|
|
58
|
+
*/
|
|
59
|
+
label?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Optional additional info text displayed below the label
|
|
62
|
+
*/
|
|
63
|
+
labelInfo?: string;
|
|
64
|
+
});
|
|
65
|
+
//#endregion
|
|
66
|
+
export { DsToggleProps, ToggleSize };
|
|
67
|
+
//# sourceMappingURL=ds-toggle.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ds-toggle.types.d.ts","names":[],"sources":["../../../src/components/ds-toggle/ds-toggle.types.tsx"],"sourcesContent":[],"mappings":";;;cAEa;KACD,UAAA,WAAqB;AADjC;AACA;AAKA;AAIW,KAJC,aAAA,GAID;EAAJ;;;EAqBa,GAAA,CAAA,EArBb,GAqBa,CArBT,WAqBS,CAAA;EAUZ;;;;;;;;;;;UAhBC;;;;;qBAMW,WAAW;;;;;;;;SAUvB;;;;;;;;;;;;;YAgBK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const require_ds_toggle = require('./ds-toggle.cjs');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import ds_toggle_default from "./ds-toggle.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DsVerticalTabsContentProps, DsVerticalTabsListProps, DsVerticalTabsRootProps, DsVerticalTabsTabProps } from "./ds-vertical-tabs.types.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime32 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/ds-vertical-tabs/ds-vertical-tabs.d.ts
|
|
5
5
|
|
|
@@ -28,22 +28,22 @@ declare const DsVerticalTabs: {
|
|
|
28
28
|
className,
|
|
29
29
|
style,
|
|
30
30
|
children
|
|
31
|
-
}: DsVerticalTabsRootProps):
|
|
31
|
+
}: DsVerticalTabsRootProps): react_jsx_runtime32.JSX.Element;
|
|
32
32
|
List: ({
|
|
33
33
|
className,
|
|
34
34
|
children
|
|
35
|
-
}: DsVerticalTabsListProps) =>
|
|
35
|
+
}: DsVerticalTabsListProps) => react_jsx_runtime32.JSX.Element;
|
|
36
36
|
Tab: ({
|
|
37
37
|
value,
|
|
38
38
|
disabled,
|
|
39
39
|
className,
|
|
40
40
|
children
|
|
41
|
-
}: DsVerticalTabsTabProps) =>
|
|
41
|
+
}: DsVerticalTabsTabProps) => react_jsx_runtime32.JSX.Element;
|
|
42
42
|
Content: ({
|
|
43
43
|
value,
|
|
44
44
|
className,
|
|
45
45
|
children
|
|
46
|
-
}: DsVerticalTabsContentProps) =>
|
|
46
|
+
}: DsVerticalTabsContentProps) => react_jsx_runtime32.JSX.Element;
|
|
47
47
|
};
|
|
48
48
|
//#endregion
|
|
49
49
|
export { DsVerticalTabs };
|