@efficiency-point/design-system 0.1.48 → 0.4.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/README.md +37 -2
- package/dist/components/DSThemeSwitcher/DSThemeSwitcher.d.ts +9 -0
- package/dist/components/DSThemeSwitcher/DSThemeSwitcher.d.ts.map +1 -0
- package/dist/components/DSThemeSwitcher/theme.d.ts +9 -0
- package/dist/components/DSThemeSwitcher/theme.d.ts.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +218 -117
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -41,4 +41,6 @@ export * from './components/DSAccordion/DSAccordion';
|
|
|
41
41
|
export * from './components/DSPortal/DSPortal';
|
|
42
42
|
export * from './components/DSNavigationSurface/DSNavigationSurface';
|
|
43
43
|
export * from './components/DSBottomNavigation/DSBottomNavigation';
|
|
44
|
+
export * from './components/DSThemeSwitcher/DSThemeSwitcher';
|
|
45
|
+
export * from './components/DSThemeSwitcher/theme';
|
|
44
46
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oDAAoD,CAAC;AACnE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oDAAoD,CAAC;AACnE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sDAAsD,CAAC;AACrE,cAAc,oDAAoD,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oDAAoD,CAAC;AACnE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,CAAC;AACvD,cAAc,0CAA0C,CAAC;AACzD,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oDAAoD,CAAC;AACnE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sCAAsC,CAAC;AACrD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sDAAsD,CAAC;AACrE,cAAc,oDAAoD,CAAC;AAEnE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,oCAAoC,CAAC"}
|
package/dist/index.es.js
CHANGED
|
@@ -34,15 +34,15 @@ var C = {
|
|
|
34
34
|
})
|
|
35
35
|
]
|
|
36
36
|
}), T = {
|
|
37
|
-
badge: "
|
|
38
|
-
sm: "
|
|
39
|
-
md: "
|
|
40
|
-
neutral: "
|
|
41
|
-
brand: "
|
|
42
|
-
info: "
|
|
43
|
-
success: "
|
|
44
|
-
warning: "
|
|
45
|
-
error: "
|
|
37
|
+
badge: "_badge_1k2yn_1",
|
|
38
|
+
sm: "_sm_1k2yn_25",
|
|
39
|
+
md: "_md_1k2yn_37",
|
|
40
|
+
neutral: "_neutral_1k2yn_51",
|
|
41
|
+
brand: "_brand_1k2yn_63",
|
|
42
|
+
info: "_info_1k2yn_75",
|
|
43
|
+
success: "_success_1k2yn_87",
|
|
44
|
+
warning: "_warning_1k2yn_99",
|
|
45
|
+
error: "_error_1k2yn_111"
|
|
46
46
|
}, E = (e, t = 99) => {
|
|
47
47
|
let n = Math.max(0, Math.floor(e)), r = Math.max(0, Math.floor(t));
|
|
48
48
|
return n > r ? `${r}+` : String(n);
|
|
@@ -78,17 +78,17 @@ var C = {
|
|
|
78
78
|
]
|
|
79
79
|
})
|
|
80
80
|
}), A = {
|
|
81
|
-
button: "
|
|
82
|
-
sm: "
|
|
83
|
-
md: "
|
|
84
|
-
lg: "
|
|
85
|
-
primary: "
|
|
86
|
-
secondary: "
|
|
87
|
-
outline: "
|
|
88
|
-
ghost: "
|
|
89
|
-
empty: "
|
|
90
|
-
destructive: "
|
|
91
|
-
destructiveOutline: "
|
|
81
|
+
button: "_button_4fqtv_1",
|
|
82
|
+
sm: "_sm_4fqtv_59",
|
|
83
|
+
md: "_md_4fqtv_73",
|
|
84
|
+
lg: "_lg_4fqtv_87",
|
|
85
|
+
primary: "_primary_4fqtv_101",
|
|
86
|
+
secondary: "_secondary_4fqtv_115",
|
|
87
|
+
outline: "_outline_4fqtv_129",
|
|
88
|
+
ghost: "_ghost_4fqtv_143",
|
|
89
|
+
empty: "_empty_4fqtv_157",
|
|
90
|
+
destructive: "_destructive_4fqtv_171",
|
|
91
|
+
destructiveOutline: "_destructiveOutline_4fqtv_183"
|
|
92
92
|
}, j = s(({ children: e, variant: n = "primary", size: r = "md", isLoading: i = !1, disabled: a, type: o = "button", className: s = "", ...c }, l) => /* @__PURE__ */ t("button", {
|
|
93
93
|
ref: l,
|
|
94
94
|
className: `${A.button} ${A[n]} ${A[r]} ${s}`,
|
|
@@ -2136,12 +2136,12 @@ var M = {
|
|
|
2136
2136
|
]
|
|
2137
2137
|
});
|
|
2138
2138
|
}, bt = {
|
|
2139
|
-
wrapper: "
|
|
2140
|
-
input: "
|
|
2141
|
-
switch: "
|
|
2142
|
-
thumb: "
|
|
2143
|
-
label: "
|
|
2144
|
-
disabled: "
|
|
2139
|
+
wrapper: "_wrapper_1tjtn_1",
|
|
2140
|
+
input: "_input_1tjtn_21",
|
|
2141
|
+
switch: "_switch_1tjtn_35",
|
|
2142
|
+
thumb: "_thumb_1tjtn_67",
|
|
2143
|
+
label: "_label_1tjtn_113",
|
|
2144
|
+
disabled: "_disabled_1tjtn_125"
|
|
2145
2145
|
}, xt = ({ checked: e, onChange: r, label: i, disabled: a = !1, readOnly: o = !1, className: s = "", name: c, id: l, value: u }) => {
|
|
2146
2146
|
let d = f(), p = l ?? `ds-radio-button-${c ?? d}`;
|
|
2147
2147
|
return /* @__PURE__ */ n("label", {
|
|
@@ -3619,19 +3619,19 @@ var Ot = ({ field: e, value: n, setValue: r, disabled: i, error: a }) => {
|
|
|
3619
3619
|
children: n
|
|
3620
3620
|
}) });
|
|
3621
3621
|
}, hn = {
|
|
3622
|
-
wrapper: "
|
|
3623
|
-
control: "
|
|
3624
|
-
textarea: "
|
|
3625
|
-
disabledText: "
|
|
3626
|
-
sm: "
|
|
3627
|
-
md: "
|
|
3628
|
-
lg: "
|
|
3629
|
-
autoResize: "
|
|
3630
|
-
manualResize: "
|
|
3631
|
-
textareaError: "
|
|
3632
|
-
clearAction: "
|
|
3633
|
-
messages: "
|
|
3634
|
-
counter: "
|
|
3622
|
+
wrapper: "_wrapper_1tid7_1",
|
|
3623
|
+
control: "_control_1tid7_15",
|
|
3624
|
+
textarea: "_textarea_1tid7_25",
|
|
3625
|
+
disabledText: "_disabledText_1tid7_27",
|
|
3626
|
+
sm: "_sm_1tid7_103",
|
|
3627
|
+
md: "_md_1tid7_117",
|
|
3628
|
+
lg: "_lg_1tid7_131",
|
|
3629
|
+
autoResize: "_autoResize_1tid7_145",
|
|
3630
|
+
manualResize: "_manualResize_1tid7_155",
|
|
3631
|
+
textareaError: "_textareaError_1tid7_163",
|
|
3632
|
+
clearAction: "_clearAction_1tid7_171",
|
|
3633
|
+
messages: "_messages_1tid7_251",
|
|
3634
|
+
counter: "_counter_1tid7_265"
|
|
3635
3635
|
}, gn = 2;
|
|
3636
3636
|
function _n(e) {
|
|
3637
3637
|
let t = window.getComputedStyle(e), n = Number.parseFloat(t.lineHeight);
|
|
@@ -3799,18 +3799,18 @@ function Dn(e, t, n) {
|
|
|
3799
3799
|
return r >= Cn || r >= 32 && r / i >= wn;
|
|
3800
3800
|
}
|
|
3801
3801
|
var On = {
|
|
3802
|
-
layer: "
|
|
3803
|
-
backdrop: "
|
|
3804
|
-
"backdrop-enter": "_backdrop-
|
|
3805
|
-
panel: "
|
|
3806
|
-
"modal-enter": "_modal-
|
|
3807
|
-
header: "
|
|
3808
|
-
title: "
|
|
3809
|
-
description: "
|
|
3810
|
-
content: "
|
|
3811
|
-
close: "
|
|
3812
|
-
dragHandle: "
|
|
3813
|
-
"sheet-enter": "_sheet-
|
|
3802
|
+
layer: "_layer_tnds0_1",
|
|
3803
|
+
backdrop: "_backdrop_tnds0_15",
|
|
3804
|
+
"backdrop-enter": "_backdrop-enter_tnds0_1",
|
|
3805
|
+
panel: "_panel_tnds0_47",
|
|
3806
|
+
"modal-enter": "_modal-enter_tnds0_1",
|
|
3807
|
+
header: "_header_tnds0_89",
|
|
3808
|
+
title: "_title_tnds0_107",
|
|
3809
|
+
description: "_description_tnds0_119",
|
|
3810
|
+
content: "_content_tnds0_133",
|
|
3811
|
+
close: "_close_tnds0_141",
|
|
3812
|
+
dragHandle: "_dragHandle_tnds0_149",
|
|
3813
|
+
"sheet-enter": "_sheet-enter_tnds0_1"
|
|
3814
3814
|
}, kn = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", An = a({});
|
|
3815
3815
|
function jn(e) {
|
|
3816
3816
|
if (e.key !== "Tab") return;
|
|
@@ -4047,25 +4047,25 @@ var Mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4047
4047
|
a
|
|
4048
4048
|
]);
|
|
4049
4049
|
}, Jn = {
|
|
4050
|
-
layer: "
|
|
4051
|
-
backdrop: "
|
|
4052
|
-
panel: "
|
|
4053
|
-
right: "
|
|
4054
|
-
left: "
|
|
4055
|
-
bottom: "
|
|
4056
|
-
fullscreen: "
|
|
4057
|
-
sm: "
|
|
4058
|
-
md: "
|
|
4059
|
-
lg: "
|
|
4060
|
-
xl: "
|
|
4061
|
-
header: "
|
|
4062
|
-
heading: "
|
|
4063
|
-
headerActions: "
|
|
4064
|
-
content: "
|
|
4065
|
-
footer: "
|
|
4066
|
-
"enter-right": "_enter-
|
|
4067
|
-
"enter-left": "_enter-
|
|
4068
|
-
"enter-bottom": "_enter-
|
|
4050
|
+
layer: "_layer_2i8uw_1",
|
|
4051
|
+
backdrop: "_backdrop_2i8uw_13",
|
|
4052
|
+
panel: "_panel_2i8uw_27",
|
|
4053
|
+
right: "_right_2i8uw_59",
|
|
4054
|
+
left: "_left_2i8uw_73",
|
|
4055
|
+
bottom: "_bottom_2i8uw_87",
|
|
4056
|
+
fullscreen: "_fullscreen_2i8uw_101",
|
|
4057
|
+
sm: "_sm_2i8uw_113",
|
|
4058
|
+
md: "_md_2i8uw_121",
|
|
4059
|
+
lg: "_lg_2i8uw_129",
|
|
4060
|
+
xl: "_xl_2i8uw_137",
|
|
4061
|
+
header: "_header_2i8uw_145",
|
|
4062
|
+
heading: "_heading_2i8uw_163",
|
|
4063
|
+
headerActions: "_headerActions_2i8uw_203",
|
|
4064
|
+
content: "_content_2i8uw_215",
|
|
4065
|
+
footer: "_footer_2i8uw_227",
|
|
4066
|
+
"enter-right": "_enter-right_2i8uw_1",
|
|
4067
|
+
"enter-left": "_enter-left_2i8uw_1",
|
|
4068
|
+
"enter-bottom": "_enter-bottom_2i8uw_1"
|
|
4069
4069
|
}, Yn = "button:not(:disabled), [href], input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex=\"-1\"])", Xn = a(null), Zn = (e) => {
|
|
4070
4070
|
if (e.key !== "Tab") return;
|
|
4071
4071
|
let t = Array.from(e.currentTarget.querySelectorAll(Yn));
|
|
@@ -4209,21 +4209,21 @@ var Mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4209
4209
|
})
|
|
4210
4210
|
})
|
|
4211
4211
|
}), ar = {
|
|
4212
|
-
viewport: "
|
|
4213
|
-
"top-right": "_top-
|
|
4214
|
-
"top-left": "_top-
|
|
4215
|
-
"bottom-right": "_bottom-
|
|
4216
|
-
"bottom-left": "_bottom-
|
|
4217
|
-
toast: "
|
|
4218
|
-
"toast-enter": "_toast-
|
|
4219
|
-
body: "
|
|
4220
|
-
icon: "
|
|
4221
|
-
title: "
|
|
4222
|
-
message: "
|
|
4223
|
-
info: "
|
|
4224
|
-
success: "
|
|
4225
|
-
warning: "
|
|
4226
|
-
error: "
|
|
4212
|
+
viewport: "_viewport_22b73_1",
|
|
4213
|
+
"top-right": "_top-right_22b73_21",
|
|
4214
|
+
"top-left": "_top-left_22b73_31",
|
|
4215
|
+
"bottom-right": "_bottom-right_22b73_41",
|
|
4216
|
+
"bottom-left": "_bottom-left_22b73_51",
|
|
4217
|
+
toast: "_toast_22b73_61",
|
|
4218
|
+
"toast-enter": "_toast-enter_22b73_1",
|
|
4219
|
+
body: "_body_22b73_97",
|
|
4220
|
+
icon: "_icon_22b73_117",
|
|
4221
|
+
title: "_title_22b73_129",
|
|
4222
|
+
message: "_message_22b73_141",
|
|
4223
|
+
info: "_info_22b73_187",
|
|
4224
|
+
success: "_success_22b73_195",
|
|
4225
|
+
warning: "_warning_22b73_203",
|
|
4226
|
+
error: "_error_22b73_211"
|
|
4227
4227
|
}, or = {
|
|
4228
4228
|
info: "IconInfoCircle",
|
|
4229
4229
|
success: "IconSuccessCircle",
|
|
@@ -4362,9 +4362,9 @@ var Mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4362
4362
|
a
|
|
4363
4363
|
]);
|
|
4364
4364
|
}, pr = {
|
|
4365
|
-
root: "
|
|
4366
|
-
tooltip: "
|
|
4367
|
-
"ds-tooltip-in": "_ds-tooltip-
|
|
4365
|
+
root: "_root_1pa4z_1",
|
|
4366
|
+
tooltip: "_tooltip_1pa4z_11",
|
|
4367
|
+
"ds-tooltip-in": "_ds-tooltip-in_1pa4z_1"
|
|
4368
4368
|
}, mr = 8, hr = 16, gr = {
|
|
4369
4369
|
top: "bottom",
|
|
4370
4370
|
right: "left",
|
|
@@ -4528,34 +4528,34 @@ var Mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
4528
4528
|
let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = `${String(r).padStart(2, "0")}:${String(i).padStart(2, "0")}`;
|
|
4529
4529
|
return n ? `${n}:${a}` : a;
|
|
4530
4530
|
}, $ = {
|
|
4531
|
-
root: "
|
|
4532
|
-
frame: "
|
|
4533
|
-
video: "
|
|
4534
|
-
overlay: "
|
|
4535
|
-
state: "
|
|
4536
|
-
buffering: "
|
|
4537
|
-
loaderViewport: "
|
|
4538
|
-
loaderScale: "
|
|
4539
|
-
stateIcon: "
|
|
4540
|
-
empty: "
|
|
4541
|
-
error: "
|
|
4542
|
-
replay: "
|
|
4543
|
-
controlsLayer: "
|
|
4544
|
-
controlsVisible: "
|
|
4545
|
-
controls: "
|
|
4546
|
-
controlGroup: "
|
|
4547
|
-
controlButton: "
|
|
4548
|
-
settingsAction: "
|
|
4549
|
-
timeline: "
|
|
4550
|
-
volume: "
|
|
4551
|
-
settings: "
|
|
4552
|
-
playButton: "
|
|
4553
|
-
volumeGroup: "
|
|
4554
|
-
timelineGroup: "
|
|
4555
|
-
time: "
|
|
4556
|
-
settingsActionLabel: "
|
|
4557
|
-
caption: "
|
|
4558
|
-
fullscreen: "
|
|
4531
|
+
root: "_root_m0ykf_1",
|
|
4532
|
+
frame: "_frame_m0ykf_35",
|
|
4533
|
+
video: "_video_m0ykf_65",
|
|
4534
|
+
overlay: "_overlay_m0ykf_81",
|
|
4535
|
+
state: "_state_m0ykf_83",
|
|
4536
|
+
buffering: "_buffering_m0ykf_85",
|
|
4537
|
+
loaderViewport: "_loaderViewport_m0ykf_145",
|
|
4538
|
+
loaderScale: "_loaderScale_m0ykf_157",
|
|
4539
|
+
stateIcon: "_stateIcon_m0ykf_171",
|
|
4540
|
+
empty: "_empty_m0ykf_203",
|
|
4541
|
+
error: "_error_m0ykf_213",
|
|
4542
|
+
replay: "_replay_m0ykf_225",
|
|
4543
|
+
controlsLayer: "_controlsLayer_m0ykf_261",
|
|
4544
|
+
controlsVisible: "_controlsVisible_m0ykf_287",
|
|
4545
|
+
controls: "_controls_m0ykf_261",
|
|
4546
|
+
controlGroup: "_controlGroup_m0ykf_311",
|
|
4547
|
+
controlButton: "_controlButton_m0ykf_337",
|
|
4548
|
+
settingsAction: "_settingsAction_m0ykf_369",
|
|
4549
|
+
timeline: "_timeline_m0ykf_401",
|
|
4550
|
+
volume: "_volume_m0ykf_403",
|
|
4551
|
+
settings: "_settings_m0ykf_369",
|
|
4552
|
+
playButton: "_playButton_m0ykf_417",
|
|
4553
|
+
volumeGroup: "_volumeGroup_m0ykf_431",
|
|
4554
|
+
timelineGroup: "_timelineGroup_m0ykf_455",
|
|
4555
|
+
time: "_time_m0ykf_401",
|
|
4556
|
+
settingsActionLabel: "_settingsActionLabel_m0ykf_693",
|
|
4557
|
+
caption: "_caption_m0ykf_705",
|
|
4558
|
+
fullscreen: "_fullscreen_m0ykf_719"
|
|
4559
4559
|
}, Cr = 2500, wr = 5, Tr = .05, Er = [
|
|
4560
4560
|
.5,
|
|
4561
4561
|
.75,
|
|
@@ -5262,6 +5262,107 @@ var Mn = ({ children: e, title: r, description: i, modalId: a, closeLabel: o = "
|
|
|
5262
5262
|
})
|
|
5263
5263
|
})
|
|
5264
5264
|
});
|
|
5265
|
+
}, Ir = "efficiency-point.design-system.theme", Lr = {
|
|
5266
|
+
teal: "Teal",
|
|
5267
|
+
signal: "Signal"
|
|
5268
|
+
}, Rr = (e) => e === "teal" || e === "signal", zr = () => {
|
|
5269
|
+
try {
|
|
5270
|
+
let e = typeof window > "u" ? null : window.localStorage.getItem(Ir);
|
|
5271
|
+
return Rr(e) ? e : "signal";
|
|
5272
|
+
} catch {
|
|
5273
|
+
return "signal";
|
|
5274
|
+
}
|
|
5275
|
+
}, Br = (e) => {
|
|
5276
|
+
typeof document < "u" && (document.documentElement.dataset.dsTheme = e);
|
|
5277
|
+
try {
|
|
5278
|
+
typeof window < "u" && window.localStorage.setItem(Ir, e);
|
|
5279
|
+
} catch {}
|
|
5280
|
+
}, Vr = {
|
|
5281
|
+
sample: "_sample_3woga_1",
|
|
5282
|
+
menu: "_menu_3woga_59",
|
|
5283
|
+
options: "_options_3woga_81",
|
|
5284
|
+
legend: "_legend_3woga_93",
|
|
5285
|
+
option: "_option_3woga_81"
|
|
5286
|
+
}, Hr = ({ value: r, onChange: i, compact: a = !1, disabled: o = !1 }) => {
|
|
5287
|
+
let [s, c] = g(!1), l = h(null), [u, p] = g(null), m = f();
|
|
5288
|
+
return d(() => {
|
|
5289
|
+
if (!s) return;
|
|
5290
|
+
let e = (e) => {
|
|
5291
|
+
e.target instanceof Node && !l.current?.contains(e.target) && !u?.contains(e.target) && c(!1);
|
|
5292
|
+
}, t = (e) => {
|
|
5293
|
+
e.key === "Escape" && (c(!1), l.current?.focus());
|
|
5294
|
+
};
|
|
5295
|
+
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", t), () => {
|
|
5296
|
+
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", t);
|
|
5297
|
+
};
|
|
5298
|
+
}, [s, u]), d(() => {
|
|
5299
|
+
if (!u) return;
|
|
5300
|
+
let e = requestAnimationFrame(() => u.querySelector("input:checked")?.focus());
|
|
5301
|
+
return () => cancelAnimationFrame(e);
|
|
5302
|
+
}, [u]), /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n(j, {
|
|
5303
|
+
ref: l,
|
|
5304
|
+
variant: "ghost",
|
|
5305
|
+
disabled: o,
|
|
5306
|
+
"aria-label": `Цветовая тема: ${Lr[r]}`,
|
|
5307
|
+
title: `Цветовая тема: ${Lr[r]}`,
|
|
5308
|
+
"aria-expanded": s && !o,
|
|
5309
|
+
"aria-controls": s && !o ? m : void 0,
|
|
5310
|
+
onClick: () => c(!s),
|
|
5311
|
+
children: [
|
|
5312
|
+
/* @__PURE__ */ t("span", {
|
|
5313
|
+
"data-ds-theme": r,
|
|
5314
|
+
className: Vr.sample,
|
|
5315
|
+
"aria-hidden": "true"
|
|
5316
|
+
}),
|
|
5317
|
+
!a && Lr[r],
|
|
5318
|
+
/* @__PURE__ */ t(J, {
|
|
5319
|
+
name: "IconChevron",
|
|
5320
|
+
width: 14,
|
|
5321
|
+
height: 14,
|
|
5322
|
+
"aria-hidden": "true"
|
|
5323
|
+
})
|
|
5324
|
+
]
|
|
5325
|
+
}), s && !o && /* @__PURE__ */ t(mn, {
|
|
5326
|
+
anchorRef: l,
|
|
5327
|
+
children: /* @__PURE__ */ t("div", {
|
|
5328
|
+
ref: p,
|
|
5329
|
+
id: m,
|
|
5330
|
+
className: Vr.menu,
|
|
5331
|
+
onBlur: (e) => {
|
|
5332
|
+
e.relatedTarget instanceof Node && !e.currentTarget.contains(e.relatedTarget) && !l.current?.contains(e.relatedTarget) && c(!1);
|
|
5333
|
+
},
|
|
5334
|
+
children: /* @__PURE__ */ n("fieldset", {
|
|
5335
|
+
className: Vr.options,
|
|
5336
|
+
children: [/* @__PURE__ */ t("legend", {
|
|
5337
|
+
className: Vr.legend,
|
|
5338
|
+
children: "Цветовая тема"
|
|
5339
|
+
}), ["teal", "signal"].map((e) => /* @__PURE__ */ n("label", {
|
|
5340
|
+
className: Vr.option,
|
|
5341
|
+
children: [
|
|
5342
|
+
/* @__PURE__ */ t("input", {
|
|
5343
|
+
type: "radio",
|
|
5344
|
+
name: m,
|
|
5345
|
+
value: e,
|
|
5346
|
+
checked: r === e,
|
|
5347
|
+
onChange: () => i(e)
|
|
5348
|
+
}),
|
|
5349
|
+
/* @__PURE__ */ t("span", {
|
|
5350
|
+
"data-ds-theme": e,
|
|
5351
|
+
className: Vr.sample,
|
|
5352
|
+
"aria-hidden": "true"
|
|
5353
|
+
}),
|
|
5354
|
+
/* @__PURE__ */ t("span", { children: Lr[e] }),
|
|
5355
|
+
r === e && /* @__PURE__ */ t(J, {
|
|
5356
|
+
name: "IconCheck",
|
|
5357
|
+
width: 16,
|
|
5358
|
+
height: 16,
|
|
5359
|
+
"aria-hidden": "true"
|
|
5360
|
+
})
|
|
5361
|
+
]
|
|
5362
|
+
}, e))]
|
|
5363
|
+
})
|
|
5364
|
+
})
|
|
5365
|
+
})] });
|
|
5265
5366
|
};
|
|
5266
5367
|
//#endregion
|
|
5267
|
-
export { zn as ConfirmModal, Ar as DSAccordion, w as DSBadge, Fr as DSBottomNavigation, tr as DSBottomSheet, j as DSButton, Pe as DSCheckbox, D as DSCounterBadge, Ht as DSDataTable, nt as DSDateRange, $e as DSDateTimePicker, er as DSDrawer, ut as DSDropDown, yt as DSDropDownMultiple, ee as DSFieldLabel, N as DSFieldMessage, dn as DSFileInput, tn as DSFilters, mn as DSFloatingMenu, rn as DSFormGrid, an as DSFormGridItem, nr as DSFullscreenDialog, J as DSIcon, Me as DSIconNames, $t as DSInfoBlock, mt as DSInput, k as DSLoader, Nn as DSModal, Mn as DSModalFrame, Nr as DSNavigationSurface, $n as DSOverlay, ir as DSPageLoader, fn as DSPortal, xt as DSRadioButton, Zt as DSSearchDropDown, it as DSSkeleton, ft as DSSort, xr as DSTabs, vn as DSTextarea, sr as DSToast, dr as DSToastProvider, yr as DSTooltip, on as DSValidationSummary, Dr as DSVideoPlayerFrame, Bn as ErrorModal, Pn as ModalSystemProvider, Vn as builtInModalRegistry, Fn as defineModalRegistry, E as formatDSCounterValue, X as formatDateInputValue, Ge as formatDateTimeLocalValue, kr as getDSAccordionScrollTarget, At as getDSDataTableColumnStyle, Mt as getDSDataTablePaginationItems, jt as getDSDataTableStickyColumnStyle, Un as getErrorMessage, kt as getNextDSDataTablePageSelection, ct as getNextEnabledOptionIndex, He as isValidDateInputPrefix, tt as isValidDateRange, Be as maskDateInputValue, Ue as parseDateInputValue, Ke as parseDateTimeLocalValue, xn as resetModalStore, ur as resetToastStore, Hn as useConfirmModal, Gn as useConfirmModalStore, Qn as useDSOverlay, Wn as useErrorModal, Kn as useErrorModalStore, qn as useModals, bn as useModalsStore, fr as useToast, lr as useToastStore, Nt as validateDSDataTableData };
|
|
5368
|
+
export { zn as ConfirmModal, Ar as DSAccordion, w as DSBadge, Fr as DSBottomNavigation, tr as DSBottomSheet, j as DSButton, Pe as DSCheckbox, D as DSCounterBadge, Ht as DSDataTable, nt as DSDateRange, $e as DSDateTimePicker, er as DSDrawer, ut as DSDropDown, yt as DSDropDownMultiple, ee as DSFieldLabel, N as DSFieldMessage, dn as DSFileInput, tn as DSFilters, mn as DSFloatingMenu, rn as DSFormGrid, an as DSFormGridItem, nr as DSFullscreenDialog, J as DSIcon, Me as DSIconNames, $t as DSInfoBlock, mt as DSInput, k as DSLoader, Nn as DSModal, Mn as DSModalFrame, Nr as DSNavigationSurface, $n as DSOverlay, ir as DSPageLoader, fn as DSPortal, xt as DSRadioButton, Zt as DSSearchDropDown, it as DSSkeleton, ft as DSSort, xr as DSTabs, vn as DSTextarea, Hr as DSThemeSwitcher, sr as DSToast, dr as DSToastProvider, yr as DSTooltip, on as DSValidationSummary, Dr as DSVideoPlayerFrame, Lr as DS_THEME_NAMES, Ir as DS_THEME_STORAGE_KEY, Bn as ErrorModal, Pn as ModalSystemProvider, Br as applyDSTheme, Vn as builtInModalRegistry, Fn as defineModalRegistry, E as formatDSCounterValue, X as formatDateInputValue, Ge as formatDateTimeLocalValue, kr as getDSAccordionScrollTarget, At as getDSDataTableColumnStyle, Mt as getDSDataTablePaginationItems, jt as getDSDataTableStickyColumnStyle, Un as getErrorMessage, kt as getNextDSDataTablePageSelection, ct as getNextEnabledOptionIndex, zr as getStoredDSTheme, Rr as isDSTheme, He as isValidDateInputPrefix, tt as isValidDateRange, Be as maskDateInputValue, Ue as parseDateInputValue, Ke as parseDateTimeLocalValue, xn as resetModalStore, ur as resetToastStore, Hn as useConfirmModal, Gn as useConfirmModalStore, Qn as useDSOverlay, Wn as useErrorModal, Kn as useErrorModalStore, qn as useModals, bn as useModalsStore, fr as useToast, lr as useToastStore, Nt as validateDSDataTableData };
|