@eightshift/ui-components 7.2.1 → 7.3.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/dist/Autocomplete-pLMPWMFq.js +451 -0
- package/dist/Button-Biwg7zwt.js +223 -0
- package/dist/Dialog-C1sh8jbh.js +2474 -0
- package/dist/{Disclosure-NYWFw9RJ.js → Disclosure-B_SHgiUz.js} +50 -51
- package/dist/FocusScope-lGkM8AO8.js +734 -0
- package/dist/Form-BxIJCHYd.js +5 -0
- package/dist/Heading-B2EsUuu6.js +16 -0
- package/dist/{Hidden-8TB37dpK.js → Hidden-DYY00jLm.js} +10 -10
- package/dist/I18nProvider-Cm6dj5jY.js +93 -0
- package/dist/Label-B1TkoVOG.js +17 -0
- package/dist/ListBox-BquE0m8z.js +584 -0
- package/dist/{NumberFormatter-m5VW6MTK.js → NumberFormatter-JHF0Tadk.js} +24 -26
- package/dist/PortalProvider-BYcv24il.js +13 -0
- package/dist/RadioGroup-BxjLooWU.js +324 -0
- package/dist/SearchField-BkAU0HLm.js +322 -0
- package/dist/SelectionIndicator-Bx_EYBXD.js +13 -0
- package/dist/{Slider-DW1RuMVp.js → Slider-DSv6fyZ6.js} +321 -363
- package/dist/Text-C8pfwn0W.js +16 -0
- package/dist/{VisuallyHidden-CfsnJHZb.js → VisuallyHidden-KcXlGa5p.js} +12 -12
- package/dist/{animation-Bd2peown.js → animation-BJ-2VKdB.js} +12 -12
- package/dist/assets/style-admin.css +1 -1
- package/dist/assets/style-editor.css +1 -1
- package/dist/assets/style.css +1 -1
- package/dist/{button-D9cbyHeZ.js → button-CawAzlko.js} +21 -73
- package/dist/{checkbox-BO5RZmO8.js → checkbox-t7VrqXv2.js} +59 -62
- package/dist/{color-swatch-D2ZBkuTt.js → color-swatch-gU09x9Ga.js} +417 -414
- package/dist/components/base-control/base-control.js +2 -2
- package/dist/components/base-control/container.js +1 -1
- package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/color-pickers/color-picker.js +2 -2
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.js +1 -1
- package/dist/components/color-pickers/solid-color-picker.js +1 -1
- package/dist/components/component-toggle/component-toggle.js +4 -4
- package/dist/components/container-panel/container-panel.js +5 -5
- package/dist/components/draggable/draggable-handle.js +1 -1
- package/dist/components/draggable/draggable.js +1 -1
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/draggable-list/draggable-list.js +2 -2
- package/dist/components/expandable/expandable.js +7 -7
- package/dist/components/index.js +15 -15
- package/dist/components/input-field/input-field.js +1 -1
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +1 -1
- package/dist/components/matrix-align/matrix-align.js +5 -5
- package/dist/components/menu/menu.js +11 -11
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/number-picker/number-picker.js +1 -1
- package/dist/components/option-select/option-select.js +3 -3
- package/dist/components/options-panel/options-panel.js +3 -3
- package/dist/components/placeholders/file-picker-shell.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/popover/popover.js +6 -6
- package/dist/components/portal-provider/portal-provider.js +2 -2
- package/dist/components/radio/radio.js +9 -9
- package/dist/components/repeater/repeater-item.js +2 -2
- package/dist/components/repeater/repeater.js +3 -3
- package/dist/components/responsive/mini-responsive.js +6 -6
- package/dist/components/responsive/responsive-legacy.js +5 -5
- package/dist/components/responsive/responsive.js +5 -5
- package/dist/components/responsive-preview/responsive-preview.js +2 -2
- package/dist/components/select/async-multi-select.js +27 -26
- package/dist/components/select/async-select.js +27 -26
- package/dist/components/select/multi-select.js +33 -32
- package/dist/components/select/shared.js +1 -1
- package/dist/components/select/single-select.js +33 -32
- package/dist/components/select/styles.js +1 -1
- package/dist/components/slider/column-config-slider.js +8 -8
- package/dist/components/slider/slider.js +8 -8
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/smart-image/smart-image.js +1 -1
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle/toggle.js +3 -3
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{draggable-CTDVJ4zd.js → draggable-Cxv-OueQ.js} +1 -1
- package/dist/filterDOMProps-BfW758QC.js +69 -0
- package/dist/{gradient-editor-CD5Sho6A.js → gradient-editor-CInqVF8v.js} +6 -6
- package/dist/icons/index.js +1 -1
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/index.js +15 -15
- package/dist/{input-field-_OCWbftf.js → input-field-BdFrxQ-R.js} +46 -47
- package/dist/keyboard-CT41mQzR.js +55 -0
- package/dist/{link-input-BnjtzMbF.js → link-input-BDFhSSvH.js} +324 -356
- package/dist/{modal-snrElwty.js → modal-CJDaBdPh.js} +100 -92
- package/dist/{number-ZZIxJukn.js → number-MWRvGfyE.js} +10 -10
- package/dist/{number-picker-Dhtx4409.js → number-picker-BrxrB-xq.js} +43 -42
- package/dist/{shared-BpAYSi3F.js → shared-CI4kcnm8.js} +482 -502
- package/dist/{smart-image-CBNbxJ57.js → smart-image-eGdMu9s9.js} +2 -2
- package/dist/{solid-color-picker-DukArNH-.js → solid-color-picker-DXgX-OAm.js} +926 -935
- package/dist/{switch-DmsvyQPa.js → switch-DNHFoCCx.js} +28 -28
- package/dist/{tabs-Cy6gB0RL.js → tabs-C2tPOEYr.js} +145 -149
- package/dist/textSelection-BhX_2zV9.js +45 -0
- package/dist/{toggle-button-BlzUGfGy.js → toggle-button-DYDp11rq.js} +35 -35
- package/dist/{tooltip-BzJzYlcc.js → tooltip-C-hT6tN9.js} +162 -162
- package/dist/{useAsyncList-BNzwKoX4.js → useAsyncList-DsOh1xIx.js} +54 -74
- package/dist/{useButton-ra1ZSZ4z.js → useButton-BMZc4fTX.js} +11 -11
- package/dist/{SelectionManager-B8lLv6Ue.js → useCollection-CBVYSuGz.js} +1689 -1777
- package/dist/{useEvent-DkZVfgsS.js → useEvent-ypAU33vv.js} +5 -5
- package/dist/useField-BXf__jxy.js +32 -0
- package/dist/{useFilter-OiMnf6sb.js → useFilter-CfKEbIwL.js} +5 -5
- package/dist/{useFocusRing-DuYL4cdO.js → useFocusRing-BgYY-7ko.js} +23 -23
- package/dist/useFormReset-BuMc_O4y.js +17 -0
- package/dist/{FieldError-BWDbP5Db.js → useFormValidation-BcME9D0E.js} +63 -66
- package/dist/useHover-lyApu3ba.js +975 -0
- package/dist/{useLabel-2EohW5l6.js → useLabel-Rv8cIIKk.js} +8 -8
- package/dist/{useLabels-B2p7RXi5.js → useLabels-xOYtkA8o.js} +5 -5
- package/dist/useListState-u6DfeXHi.js +135 -0
- package/dist/{useLocalizedStringFormatter-Dv2diN3k.js → useLocalizedStringFormatter-CR-bmorj.js} +45 -45
- package/dist/{useNumberField-2xbi3jRV.js → useNumberFieldState-xL-ecwNz.js} +665 -619
- package/dist/useNumberFormatter-CR1PAFPG.js +10 -0
- package/dist/useOverlayTriggerState-AeCx45Gv.js +551 -0
- package/dist/usePress-Dnx5rBoD.js +593 -0
- package/dist/useTextField-BW3ZwGyz.js +159 -0
- package/dist/{useToggle-ecIirvIM.js → useToggle-BF5wptMP.js} +19 -20
- package/dist/useToggleState-D5P01lch.js +22 -0
- package/dist/useToolbar-BT25-MJg.js +55 -0
- package/dist/utilities/debounce-throttle.js +1 -1
- package/dist/utilities/es-dash.js +1 -1
- package/dist/utilities/index.js +3 -3
- package/dist/{utils-B_uiqNa4.js → utils-JFcCNFzy.js} +121 -122
- package/package.json +13 -13
- package/dist/Button-h6xF_WrP.js +0 -225
- package/dist/Dialog-i5VLQw1o.js +0 -2488
- package/dist/FocusScope-CgwbGOBB.js +0 -746
- package/dist/Form-DTMkbrQY.js +0 -5
- package/dist/Heading-Hol-wS_B.js +0 -16
- package/dist/Input-BURqyJXW.js +0 -161
- package/dist/Label-DFXXxMKY.js +0 -17
- package/dist/ListBox-BHUJxpwh.js +0 -600
- package/dist/OverlayArrow-BoloUPQM.js +0 -573
- package/dist/PortalProvider-DinZZCKX.js +0 -14
- package/dist/RSPContexts-C_z0bI8W.js +0 -12
- package/dist/RadioGroup-BwlGtCja.js +0 -329
- package/dist/SearchField-Cm1i5mLj.js +0 -764
- package/dist/SelectionIndicator-31L6EI9F.js +0 -13
- package/dist/Text-O6VBBDlP.js +0 -16
- package/dist/context-C-XNeJ_l.js +0 -93
- package/dist/filterDOMProps-_2_3GD-K.js +0 -69
- package/dist/textSelection-Dv6WPj0Z.js +0 -45
- package/dist/useField-D0WrzR2F.js +0 -32
- package/dist/useFormReset-DdkykzAn.js +0 -18
- package/dist/useHover-qaMm3XFO.js +0 -982
- package/dist/useListState-CD_5vfyy.js +0 -147
- package/dist/useNumberFormatter-C2Cm2mNj.js +0 -10
- package/dist/usePress-ZP1TjkFf.js +0 -678
- package/dist/useToggleState-IIDbiKPl.js +0 -23
- /package/dist/{List-DWlgW2Ex.js → List---tsVJlI.js} +0 -0
- /package/dist/{build-module-Bsx62nlm.js → build-module-K6vi4xE0.js} +0 -0
- /package/dist/{debounce-throttle-DXxSAKpq.js → debounce-throttle-LSPAPFtq.js} +0 -0
- /package/dist/{dist-2gkv7_1U.js → dist-jw8wvxoG.js} +0 -0
- /package/dist/{es-dash-HqXWZZ3_.js → es-dash-BuShf_ht.js} +0 -0
- /package/dist/{jsx-svg-DgKbriN1.js → jsx-svg-DT1SBWuP.js} +0 -0
- /package/dist/{utilities-lwX686oD.js → utilities-DV0KKJNR.js} +0 -0
|
@@ -1,79 +1,27 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-BUU5J41u.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as $
|
|
6
|
-
import { n as
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { t as __ } from "./build-module-Bsx62nlm.js";
|
|
11
|
-
import React, { createContext, forwardRef, useRef, useState } from "react";
|
|
2
|
+
import { l as $03e8ab2d84d7657a$export$4338b53315abf666, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-JFcCNFzy.js";
|
|
3
|
+
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-BfW758QC.js";
|
|
4
|
+
import { a as $6c0095e7e99364f2$export$c17561cb55d4db30, n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-Biwg7zwt.js";
|
|
5
|
+
import { t as $afa781ff67c1cd08$export$fa142eb1681c520 } from "./useToolbar-BT25-MJg.js";
|
|
6
|
+
import { n as Tooltip } from "./tooltip-C-hT6tN9.js";
|
|
7
|
+
import { t as cva } from "./dist-jw8wvxoG.js";
|
|
8
|
+
import { t as __ } from "./build-module-K6vi4xE0.js";
|
|
9
|
+
import React, { createContext, forwardRef } from "react";
|
|
12
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
-
//#region node_modules
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
$
|
|
18
|
-
|
|
19
|
-
setInToolbar(!!(ref.current && ((_ref_current_parentElement = ref.current.parentElement) === null || _ref_current_parentElement === void 0 ? void 0 : _ref_current_parentElement.closest("[role=\"toolbar\"]"))));
|
|
20
|
-
});
|
|
21
|
-
const { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
|
|
22
|
-
const shouldReverse = direction === "rtl" && orientation === "horizontal";
|
|
23
|
-
let focusManager = $9bf71ea28793e738$export$c5251b9e124bf29(ref);
|
|
24
|
-
const onKeyDown = (e) => {
|
|
25
|
-
if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) return;
|
|
26
|
-
if (orientation === "horizontal" && e.key === "ArrowRight" || orientation === "vertical" && e.key === "ArrowDown") if (shouldReverse) focusManager.focusPrevious();
|
|
27
|
-
else focusManager.focusNext();
|
|
28
|
-
else if (orientation === "horizontal" && e.key === "ArrowLeft" || orientation === "vertical" && e.key === "ArrowUp") if (shouldReverse) focusManager.focusNext();
|
|
29
|
-
else focusManager.focusPrevious();
|
|
30
|
-
else if (e.key === "Tab") {
|
|
31
|
-
e.stopPropagation();
|
|
32
|
-
lastFocused.current = $d4ee10de306f2510$export$cd4e5573fbe2b576();
|
|
33
|
-
if (e.shiftKey) focusManager.focusFirst();
|
|
34
|
-
else focusManager.focusLast();
|
|
35
|
-
return;
|
|
36
|
-
} else return;
|
|
37
|
-
e.stopPropagation();
|
|
38
|
-
e.preventDefault();
|
|
39
|
-
};
|
|
40
|
-
const lastFocused = useRef(null);
|
|
41
|
-
const onBlur = (e) => {
|
|
42
|
-
if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, e.relatedTarget) && !lastFocused.current) lastFocused.current = $d4ee10de306f2510$export$e58f029f0fbfdb29(e);
|
|
43
|
-
};
|
|
44
|
-
const onFocus = (e) => {
|
|
45
|
-
if (lastFocused.current && !$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, e.relatedTarget) && $d4ee10de306f2510$export$4282f70798064fe0(ref.current, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) {
|
|
46
|
-
var _lastFocused_current;
|
|
47
|
-
(_lastFocused_current = lastFocused.current) === null || _lastFocused_current === void 0 || _lastFocused_current.focus();
|
|
48
|
-
lastFocused.current = null;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
return { toolbarProps: {
|
|
52
|
-
...$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, { labelable: true }),
|
|
53
|
-
role: !isInToolbar ? "toolbar" : "group",
|
|
54
|
-
"aria-orientation": orientation,
|
|
55
|
-
"aria-label": ariaLabel,
|
|
56
|
-
"aria-labelledby": ariaLabel == null ? ariaLabelledBy : void 0,
|
|
57
|
-
onKeyDownCapture: !isInToolbar ? onKeyDown : void 0,
|
|
58
|
-
onFocusCapture: !isInToolbar ? onFocus : void 0,
|
|
59
|
-
onBlurCapture: !isInToolbar ? onBlur : void 0
|
|
60
|
-
} };
|
|
61
|
-
}
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region node_modules/react-aria-components/dist/Toolbar.mjs
|
|
64
|
-
var $13c3c67164f4d5be$export$6311e7ab80ef752f = createContext({});
|
|
65
|
-
var $13c3c67164f4d5be$export$4c260019440d418f = forwardRef(function Toolbar(props, ref) {
|
|
66
|
-
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $13c3c67164f4d5be$export$6311e7ab80ef752f);
|
|
67
|
-
let { toolbarProps } = $2680b1829e803644$export$fa142eb1681c520(props, ref);
|
|
68
|
-
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
11
|
+
//#region node_modules/react-aria-components/dist/private/Toolbar.mjs
|
|
12
|
+
var $db7105decd081705$export$6311e7ab80ef752f = createContext({});
|
|
13
|
+
var $db7105decd081705$export$4c260019440d418f = forwardRef(function Toolbar(props, ref) {
|
|
14
|
+
[props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $db7105decd081705$export$6311e7ab80ef752f);
|
|
15
|
+
let { toolbarProps } = $afa781ff67c1cd08$export$fa142eb1681c520(props, ref);
|
|
16
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
69
17
|
...props,
|
|
70
18
|
values: { orientation: props.orientation || "horizontal" },
|
|
71
19
|
defaultClassName: "react-aria-Toolbar"
|
|
72
20
|
});
|
|
73
|
-
let DOMProps = $
|
|
21
|
+
let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { global: true });
|
|
74
22
|
delete DOMProps.id;
|
|
75
|
-
return React.createElement($
|
|
76
|
-
...$
|
|
23
|
+
return React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
24
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, renderProps, toolbarProps),
|
|
77
25
|
ref,
|
|
78
26
|
slot: props.slot || void 0,
|
|
79
27
|
"data-orientation": props.orientation || "horizontal"
|
|
@@ -121,9 +69,9 @@ var Button = (props) => {
|
|
|
121
69
|
const { children, icon, size = "default", type = "default", flat, pending, pendingAriaLabel = __("Loading", "eightshift-ui-components"), disabled, className, tooltip: rawTooltip, onPress, forwardedRef, wrapperClassName, tooltipProps, "aria-label": ariaLabel = typeof children === "string" ? children : __("Menu item", "eightshift-ui-components"), hidden, ...other } = props;
|
|
122
70
|
let tooltip = rawTooltip;
|
|
123
71
|
if (rawTooltip === true && ariaLabel?.length > 0) tooltip = ariaLabel;
|
|
124
|
-
const objRef = $
|
|
72
|
+
const objRef = $03e8ab2d84d7657a$export$4338b53315abf666(forwardedRef);
|
|
125
73
|
if (hidden) return null;
|
|
126
|
-
const component = jsx($
|
|
74
|
+
const component = jsx($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
127
75
|
onPress,
|
|
128
76
|
isDisabled: disabled,
|
|
129
77
|
isPending: pending,
|
|
@@ -473,7 +421,7 @@ var Button = (props) => {
|
|
|
473
421
|
children: ({ isPending }) => jsxs(Fragment$1, { children: [
|
|
474
422
|
icon,
|
|
475
423
|
children,
|
|
476
|
-
isPending && jsx($
|
|
424
|
+
isPending && jsx($6c0095e7e99364f2$export$c17561cb55d4db30, {
|
|
477
425
|
"aria-label": pendingAriaLabel,
|
|
478
426
|
className: "es:sr-only",
|
|
479
427
|
isIndeterminate: true
|
|
@@ -513,7 +461,7 @@ var Button = (props) => {
|
|
|
513
461
|
*/
|
|
514
462
|
var ButtonGroup = ({ children, className, vertical, hidden, type = "segmented", ...rest }) => {
|
|
515
463
|
if (hidden) return null;
|
|
516
|
-
return jsx($
|
|
464
|
+
return jsx($db7105decd081705$export$4c260019440d418f, {
|
|
517
465
|
className: clsx("es:flex", type === "segmented" && !vertical && "es:gap-0.5", type === "segmented" && vertical && "es:flex-col es:gap-0.75", type === "segmented" && !vertical && "es-button-group-h", type === "segmented" && vertical && "es-button-group-v", type === "split" && !vertical && "es:gap-1.25", type === "split" && vertical && "es:flex-col es:gap-1", className),
|
|
518
466
|
orientation: vertical ? "vertical" : "horizontal",
|
|
519
467
|
...rest,
|
|
@@ -1,48 +1,50 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-BUU5J41u.js";
|
|
2
2
|
import { AnimatedVisibility } from "./components/animated-visibility/animated-visibility.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as $
|
|
6
|
-
import { t as $
|
|
7
|
-
import { t as $
|
|
8
|
-
import {
|
|
9
|
-
import { t as $
|
|
10
|
-
import {
|
|
11
|
-
import { t as $
|
|
12
|
-
import { t as $
|
|
13
|
-
import {
|
|
14
|
-
import { t as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "./Form-DTMkbrQY.js";
|
|
3
|
+
import { c as $7230ffa83bc0c2cf$export$fabf2dc03a41866e, d as $4064df0d6f9620e1$export$c9058316764c140e, l as $03e8ab2d84d7657a$export$4338b53315abf666, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$ef03459518577ad4, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-JFcCNFzy.js";
|
|
4
|
+
import { t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-lyApu3ba.js";
|
|
5
|
+
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-BfW758QC.js";
|
|
6
|
+
import { t as $d27d541f9569d26d$export$45712eceda6fad21 } from "./usePress-Dnx5rBoD.js";
|
|
7
|
+
import { t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-BgYY-7ko.js";
|
|
8
|
+
import { n as $43a3b93638fe5db9$export$b04be29aa201d4f5 } from "./Label-B1TkoVOG.js";
|
|
9
|
+
import { t as $ea3928288112382f$export$439d29a4e110a164 } from "./VisuallyHidden-KcXlGa5p.js";
|
|
10
|
+
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10, n as $fd2148440a13ec26$export$a763b9476acd3eb, r as $fd2148440a13ec26$export$dad6ae84456c676a, t as $860f7da480e22816$export$b8473d3665f3a75a } from "./useFormValidation-BcME9D0E.js";
|
|
11
|
+
import { t as $cdaed739b1139372$export$c24727297075ec6a } from "./Form-BxIJCHYd.js";
|
|
12
|
+
import { t as $876b6f32ca5a04c3$export$cbe85ee05b554577 } from "./useToggle-BF5wptMP.js";
|
|
13
|
+
import { t as $fd3c5e01e837dc20$export$8042c6c013fd5226 } from "./useToggleState-D5P01lch.js";
|
|
15
14
|
import { RichLabel } from "./components/rich-label/rich-label.js";
|
|
16
|
-
import { t as cva } from "./dist-
|
|
15
|
+
import { t as cva } from "./dist-jw8wvxoG.js";
|
|
17
16
|
import { check } from "./icons/ui-icons/check.js";
|
|
18
17
|
import React, { createContext, forwardRef, useContext, useEffect, useMemo, useRef } from "react";
|
|
19
18
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
|
-
//#region node_modules
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
//#region node_modules/react-aria/dist/private/checkbox/utils.mjs
|
|
20
|
+
var $0fffd24394d22962$export$ec98120685d4f57d = new WeakMap();
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region node_modules/react-aria/dist/private/checkbox/useCheckbox.mjs
|
|
23
|
+
function $dde212bea465bd23$export$e375f10ce42261c5(props, state, inputRef) {
|
|
24
|
+
let validationState = $fd2148440a13ec26$export$fc1a364ae1f3ff10({
|
|
23
25
|
...props,
|
|
24
26
|
value: state.isSelected
|
|
25
27
|
});
|
|
26
28
|
let { isInvalid, validationErrors, validationDetails } = validationState.displayValidation;
|
|
27
|
-
let { labelProps, inputProps, isSelected, isPressed, isDisabled, isReadOnly } = $
|
|
29
|
+
let { labelProps, inputProps, isSelected, isPressed, isDisabled, isReadOnly } = $876b6f32ca5a04c3$export$cbe85ee05b554577({
|
|
28
30
|
...props,
|
|
29
31
|
isInvalid
|
|
30
32
|
}, state, inputRef);
|
|
31
|
-
$
|
|
33
|
+
$860f7da480e22816$export$b8473d3665f3a75a(props, validationState, inputRef);
|
|
32
34
|
let { isIndeterminate, isRequired, validationBehavior = "aria" } = props;
|
|
33
35
|
useEffect(() => {
|
|
34
36
|
if (inputRef.current) inputRef.current.indeterminate = !!isIndeterminate;
|
|
35
37
|
});
|
|
36
|
-
let { pressProps } = $
|
|
38
|
+
let { pressProps } = $d27d541f9569d26d$export$45712eceda6fad21({
|
|
37
39
|
isDisabled: isDisabled || isReadOnly,
|
|
38
40
|
onPress() {
|
|
39
|
-
let { [$
|
|
41
|
+
let { [$fd2148440a13ec26$export$a763b9476acd3eb]: groupValidationState } = props;
|
|
40
42
|
let { commitValidation } = groupValidationState ? groupValidationState : validationState;
|
|
41
43
|
commitValidation();
|
|
42
44
|
}
|
|
43
45
|
});
|
|
44
46
|
return {
|
|
45
|
-
labelProps: $
|
|
47
|
+
labelProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(labelProps, pressProps, useMemo(() => ({ onMouseDown: (e) => e.preventDefault() }), [])),
|
|
46
48
|
inputProps: {
|
|
47
49
|
...inputProps,
|
|
48
50
|
checked: isSelected,
|
|
@@ -59,12 +61,9 @@ function $406796ff087fe49b$export$e375f10ce42261c5(props, state, inputRef) {
|
|
|
59
61
|
};
|
|
60
62
|
}
|
|
61
63
|
//#endregion
|
|
62
|
-
//#region node_modules
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
//#region node_modules/@react-aria/checkbox/dist/useCheckboxGroupItem.mjs
|
|
66
|
-
function $fba3e38d5ca8983f$export$353b32fc6898d37d(props, state, inputRef) {
|
|
67
|
-
const toggleState = $3017fa7ffdddec74$export$8042c6c013fd5226({
|
|
64
|
+
//#region node_modules/react-aria/dist/private/checkbox/useCheckboxGroupItem.mjs
|
|
65
|
+
function $55cfc34eef47e1ca$export$353b32fc6898d37d(props, state, inputRef) {
|
|
66
|
+
const toggleState = $fd3c5e01e837dc20$export$8042c6c013fd5226({
|
|
68
67
|
isReadOnly: props.isReadOnly || state.isReadOnly,
|
|
69
68
|
isSelected: state.isSelected(props.value),
|
|
70
69
|
defaultSelected: state.defaultValue.includes(props.value),
|
|
@@ -74,32 +73,30 @@ function $fba3e38d5ca8983f$export$353b32fc6898d37d(props, state, inputRef) {
|
|
|
74
73
|
if (props.onChange) props.onChange(isSelected);
|
|
75
74
|
}
|
|
76
75
|
});
|
|
77
|
-
let { name, form, descriptionId, errorMessageId, validationBehavior } = $
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
let { realtimeValidation } = $e5be200c675c3b3a$export$fc1a364ae1f3ff10({
|
|
76
|
+
let { name, form, descriptionId, errorMessageId, validationBehavior } = $0fffd24394d22962$export$ec98120685d4f57d.get(state);
|
|
77
|
+
validationBehavior = props.validationBehavior ?? validationBehavior;
|
|
78
|
+
let { realtimeValidation } = $fd2148440a13ec26$export$fc1a364ae1f3ff10({
|
|
81
79
|
...props,
|
|
82
80
|
value: toggleState.isSelected,
|
|
83
81
|
name: void 0,
|
|
84
82
|
validationBehavior: "aria"
|
|
85
83
|
});
|
|
86
|
-
let nativeValidation = useRef($
|
|
84
|
+
let nativeValidation = useRef($fd2148440a13ec26$export$dad6ae84456c676a);
|
|
87
85
|
let updateValidation = () => {
|
|
88
86
|
state.setInvalid(props.value, realtimeValidation.isInvalid ? realtimeValidation : nativeValidation.current);
|
|
89
87
|
};
|
|
90
88
|
useEffect(updateValidation);
|
|
91
89
|
let combinedRealtimeValidation = state.realtimeValidation.isInvalid ? state.realtimeValidation : realtimeValidation;
|
|
92
90
|
let displayValidation = validationBehavior === "native" ? state.displayValidation : combinedRealtimeValidation;
|
|
93
|
-
|
|
94
|
-
let res = $406796ff087fe49b$export$e375f10ce42261c5({
|
|
91
|
+
let res = $dde212bea465bd23$export$e375f10ce42261c5({
|
|
95
92
|
...props,
|
|
96
93
|
isReadOnly: props.isReadOnly || state.isReadOnly,
|
|
97
94
|
isDisabled: props.isDisabled || state.isDisabled,
|
|
98
95
|
name: props.name || name,
|
|
99
96
|
form: props.form || form,
|
|
100
|
-
isRequired:
|
|
97
|
+
isRequired: props.isRequired ?? state.isRequired,
|
|
101
98
|
validationBehavior,
|
|
102
|
-
[$
|
|
99
|
+
[$fd2148440a13ec26$export$a763b9476acd3eb]: {
|
|
103
100
|
realtimeValidation: combinedRealtimeValidation,
|
|
104
101
|
displayValidation,
|
|
105
102
|
resetValidation: state.resetValidation,
|
|
@@ -123,32 +120,32 @@ function $fba3e38d5ca8983f$export$353b32fc6898d37d(props, state, inputRef) {
|
|
|
123
120
|
};
|
|
124
121
|
}
|
|
125
122
|
//#endregion
|
|
126
|
-
//#region node_modules/react-aria-components/dist/Checkbox.mjs
|
|
127
|
-
var $
|
|
128
|
-
var $
|
|
123
|
+
//#region node_modules/react-aria-components/dist/private/Checkbox.mjs
|
|
124
|
+
var $ed8ccb2e23e76301$export$b085522c77523c51 = createContext(null);
|
|
125
|
+
var $ed8ccb2e23e76301$export$139c5b8563afc1fc = createContext(null);
|
|
126
|
+
var $ed8ccb2e23e76301$export$48513f6b9f8ce62d = forwardRef(function Checkbox(props, ref) {
|
|
129
127
|
let { inputRef: userProvidedInputRef = null, ...otherProps } = props;
|
|
130
|
-
[props, ref] = $
|
|
131
|
-
let { validationBehavior: formValidationBehavior } = $
|
|
132
|
-
|
|
133
|
-
let
|
|
134
|
-
let
|
|
135
|
-
let
|
|
136
|
-
|
|
137
|
-
...$64fa3d84918910a7$export$ef03459518577ad4(props),
|
|
128
|
+
[props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(otherProps, ref, $ed8ccb2e23e76301$export$b085522c77523c51);
|
|
129
|
+
let { validationBehavior: formValidationBehavior } = $7230ffa83bc0c2cf$export$fabf2dc03a41866e($cdaed739b1139372$export$c24727297075ec6a) || {};
|
|
130
|
+
let validationBehavior = props.validationBehavior ?? formValidationBehavior ?? "native";
|
|
131
|
+
let groupState = useContext($ed8ccb2e23e76301$export$139c5b8563afc1fc);
|
|
132
|
+
let inputRef = $03e8ab2d84d7657a$export$4338b53315abf666(useMemo(() => $4064df0d6f9620e1$export$c9058316764c140e(userProvidedInputRef, props.inputRef !== void 0 ? props.inputRef : null), [userProvidedInputRef, props.inputRef]));
|
|
133
|
+
let { labelProps, inputProps, isSelected, isDisabled, isReadOnly, isPressed, isInvalid } = groupState ? $55cfc34eef47e1ca$export$353b32fc6898d37d({
|
|
134
|
+
...$7230ffa83bc0c2cf$export$ef03459518577ad4(props),
|
|
138
135
|
value: props.value,
|
|
139
136
|
children: typeof props.children === "function" ? true : props.children
|
|
140
|
-
}, groupState, inputRef) : $
|
|
141
|
-
...$
|
|
137
|
+
}, groupState, inputRef) : $dde212bea465bd23$export$e375f10ce42261c5({
|
|
138
|
+
...$7230ffa83bc0c2cf$export$ef03459518577ad4(props),
|
|
142
139
|
children: typeof props.children === "function" ? true : props.children,
|
|
143
140
|
validationBehavior
|
|
144
|
-
}, $
|
|
145
|
-
let { isFocused, isFocusVisible, focusProps } = $
|
|
141
|
+
}, $fd3c5e01e837dc20$export$8042c6c013fd5226(props), inputRef);
|
|
142
|
+
let { isFocused, isFocusVisible, focusProps } = $0c4a58759813079a$export$4e328f61c538687f();
|
|
146
143
|
let isInteractionDisabled = isDisabled || isReadOnly;
|
|
147
|
-
let { hoverProps, isHovered } = $
|
|
144
|
+
let { hoverProps, isHovered } = $e969f22b6713ca4a$export$ae780daf29e6d456({
|
|
148
145
|
...props,
|
|
149
146
|
isDisabled: isInteractionDisabled
|
|
150
147
|
});
|
|
151
|
-
let renderProps = $
|
|
148
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
152
149
|
...props,
|
|
153
150
|
defaultClassName: "react-aria-Checkbox",
|
|
154
151
|
values: {
|
|
@@ -164,11 +161,11 @@ var $bc237834342dbd75$export$48513f6b9f8ce62d = forwardRef(function Checkbox(pro
|
|
|
164
161
|
isRequired: props.isRequired || false
|
|
165
162
|
}
|
|
166
163
|
});
|
|
167
|
-
let DOMProps = $
|
|
164
|
+
let DOMProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { global: true });
|
|
168
165
|
delete DOMProps.id;
|
|
169
166
|
delete DOMProps.onClick;
|
|
170
|
-
return React.createElement($
|
|
171
|
-
...$
|
|
167
|
+
return React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.label, {
|
|
168
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, labelProps, hoverProps, renderProps),
|
|
172
169
|
ref,
|
|
173
170
|
slot: props.slot || void 0,
|
|
174
171
|
"data-selected": isSelected || void 0,
|
|
@@ -181,8 +178,8 @@ var $bc237834342dbd75$export$48513f6b9f8ce62d = forwardRef(function Checkbox(pro
|
|
|
181
178
|
"data-readonly": isReadOnly || void 0,
|
|
182
179
|
"data-invalid": isInvalid || void 0,
|
|
183
180
|
"data-required": props.isRequired || void 0
|
|
184
|
-
}, React.createElement($
|
|
185
|
-
...$
|
|
181
|
+
}, React.createElement($ea3928288112382f$export$439d29a4e110a164, { elementType: "span" }, React.createElement("input", {
|
|
182
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(inputProps, focusProps),
|
|
186
183
|
ref: inputRef
|
|
187
184
|
})), renderProps.children);
|
|
188
185
|
});
|
|
@@ -280,13 +277,13 @@ var checkboxClasses = cva([
|
|
|
280
277
|
var Checkbox = (props) => {
|
|
281
278
|
const { icon, label, subtitle, checked, disabled, readOnly, indeterminate, onChange, className, labelClassName, inlineSubtitle, flat, alignEnd, children, hidden, ...other } = props;
|
|
282
279
|
if (hidden) return null;
|
|
283
|
-
return jsxs($
|
|
280
|
+
return jsxs($ed8ccb2e23e76301$export$48513f6b9f8ce62d, {
|
|
284
281
|
isDisabled: disabled,
|
|
285
282
|
isIndeterminate: indeterminate,
|
|
286
283
|
isReadOnly: readOnly,
|
|
287
284
|
isSelected: checked ?? false,
|
|
288
285
|
onChange,
|
|
289
|
-
className: clsx("es:group es:flex es:w-
|
|
286
|
+
className: clsx("es:group es:flex es:w-fill es:items-center es:gap-2", className),
|
|
290
287
|
...other,
|
|
291
288
|
children: [
|
|
292
289
|
!alignEnd && (label || subtitle) && jsx(RichLabel, {
|
|
@@ -297,7 +294,7 @@ var Checkbox = (props) => {
|
|
|
297
294
|
inlineSubtitle,
|
|
298
295
|
fullSizeSubtitle: true,
|
|
299
296
|
fullWidth: true,
|
|
300
|
-
as: $
|
|
297
|
+
as: $43a3b93638fe5db9$export$b04be29aa201d4f5,
|
|
301
298
|
noColor: true
|
|
302
299
|
}),
|
|
303
300
|
jsxs("div", {
|
|
@@ -327,7 +324,7 @@ var Checkbox = (props) => {
|
|
|
327
324
|
className: clsx(subtitle && "es:mt-1.25", labelClassName),
|
|
328
325
|
inlineSubtitle,
|
|
329
326
|
fullSizeSubtitle: true,
|
|
330
|
-
as: $
|
|
327
|
+
as: $43a3b93638fe5db9$export$b04be29aa201d4f5,
|
|
331
328
|
noColor: true
|
|
332
329
|
}),
|
|
333
330
|
!(icon || label || subtitle) && children
|