@eightshift/ui-components 7.2.0 → 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/fonts/google-sans-flex-latin-ext-full-normal.woff2 +0 -0
- package/dist/assets/fonts/google-sans-flex-latin-full-normal.woff2 +0 -0
- package/dist/assets/fonts/google-sans-flex-symbols-full-normal.woff2 +0 -0
- 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-xfxA_s9a.js → gradient-editor-CInqVF8v.js} +6 -11
- 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/{jsx-svg-BRJ4n3pD.js → jsx-svg-DT1SBWuP.js} +6 -12
- package/dist/keyboard-CT41mQzR.js +55 -0
- package/dist/{link-input-Bh8G7Urm.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-BiWZjrGF.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-DaIUEc0g.js → tabs-C2tPOEYr.js} +150 -153
- 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 +18 -18
- 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-B21SgugS.js +0 -601
- 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-DR_I4_yn.js +0 -765
- 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/{utilities-lwX686oD.js → utilities-DV0KKJNR.js} +0 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-JFcCNFzy.js";
|
|
2
|
+
import { H as $23f2114a1b82827e$export$e58f029f0fbfdb29, d as $3e6197669829fe11$export$40bfa8c7b0832715, i as $d1116acdf220c2da$export$4c014de7c8940b4c, t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-lyApu3ba.js";
|
|
3
|
+
import { t as $d7f64c32b702fe2c$export$86427a43e3e48ebb } from "./Hidden-DYY00jLm.js";
|
|
4
|
+
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-BfW758QC.js";
|
|
5
|
+
import { t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-BgYY-7ko.js";
|
|
6
|
+
import { i as $fd2148440a13ec26$export$fc1a364ae1f3ff10, t as $860f7da480e22816$export$b8473d3665f3a75a } from "./useFormValidation-BcME9D0E.js";
|
|
7
|
+
import { t as $191c9b6d48a0a4e2$export$294aa081a6c6f55d } from "./useField-BXf__jxy.js";
|
|
8
|
+
import { t as $3274bf1495747a7b$export$5add1d006293d136 } from "./useFormReset-BuMc_O4y.js";
|
|
9
|
+
import React, { createContext, forwardRef, useState } from "react";
|
|
10
|
+
//#region node_modules/react-aria-components/dist/private/Group.mjs
|
|
11
|
+
var $3a442827418ebe87$export$f9c6924e160136d1 = createContext({});
|
|
12
|
+
var $3a442827418ebe87$export$eb2fcfdbd7ba97d4 = forwardRef(function Group(props, ref) {
|
|
13
|
+
[props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $3a442827418ebe87$export$f9c6924e160136d1);
|
|
14
|
+
let { isDisabled, isInvalid, isReadOnly, onHoverStart, onHoverChange, onHoverEnd, ...otherProps } = props;
|
|
15
|
+
isDisabled ??= !!props["aria-disabled"] && props["aria-disabled"] !== "false";
|
|
16
|
+
isInvalid ??= !!props["aria-invalid"] && props["aria-invalid"] !== "false";
|
|
17
|
+
let { hoverProps, isHovered } = $e969f22b6713ca4a$export$ae780daf29e6d456({
|
|
18
|
+
onHoverStart,
|
|
19
|
+
onHoverChange,
|
|
20
|
+
onHoverEnd,
|
|
21
|
+
isDisabled
|
|
22
|
+
});
|
|
23
|
+
let { isFocused, isFocusVisible, focusProps } = $0c4a58759813079a$export$4e328f61c538687f({ within: true });
|
|
24
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
25
|
+
...props,
|
|
26
|
+
values: {
|
|
27
|
+
isHovered,
|
|
28
|
+
isFocusWithin: isFocused,
|
|
29
|
+
isFocusVisible,
|
|
30
|
+
isDisabled,
|
|
31
|
+
isInvalid
|
|
32
|
+
},
|
|
33
|
+
defaultClassName: "react-aria-Group"
|
|
34
|
+
});
|
|
35
|
+
return React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.div, {
|
|
36
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(otherProps, focusProps, hoverProps),
|
|
37
|
+
...renderProps,
|
|
38
|
+
ref,
|
|
39
|
+
role: props.role ?? "group",
|
|
40
|
+
slot: props.slot ?? void 0,
|
|
41
|
+
"data-focus-within": isFocused || void 0,
|
|
42
|
+
"data-hovered": isHovered || void 0,
|
|
43
|
+
"data-focus-visible": isFocusVisible || void 0,
|
|
44
|
+
"data-disabled": isDisabled || void 0,
|
|
45
|
+
"data-invalid": isInvalid || void 0,
|
|
46
|
+
"data-readonly": isReadOnly || void 0
|
|
47
|
+
}, renderProps.children);
|
|
48
|
+
});
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region node_modules/react-aria-components/dist/private/Input.mjs
|
|
51
|
+
var $41fb335299a4a39e$export$37fb8590cf2c088c = createContext({});
|
|
52
|
+
var $41fb335299a4a39e$var$filterHoverProps = (props) => {
|
|
53
|
+
let { onHoverStart, onHoverChange, onHoverEnd, ...otherProps } = props;
|
|
54
|
+
return otherProps;
|
|
55
|
+
};
|
|
56
|
+
var $41fb335299a4a39e$export$f5b8910cec6cf069 = $d7f64c32b702fe2c$export$86427a43e3e48ebb(function Input(props, ref) {
|
|
57
|
+
[props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $41fb335299a4a39e$export$37fb8590cf2c088c);
|
|
58
|
+
let { hoverProps, isHovered } = $e969f22b6713ca4a$export$ae780daf29e6d456({
|
|
59
|
+
...props,
|
|
60
|
+
isDisabled: props.disabled
|
|
61
|
+
});
|
|
62
|
+
let { isFocused, isFocusVisible, focusProps } = $0c4a58759813079a$export$4e328f61c538687f({
|
|
63
|
+
isTextInput: true,
|
|
64
|
+
autoFocus: props.autoFocus
|
|
65
|
+
});
|
|
66
|
+
let isInvalid = !!props["aria-invalid"] && props["aria-invalid"] !== "false";
|
|
67
|
+
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
68
|
+
...props,
|
|
69
|
+
values: {
|
|
70
|
+
isHovered,
|
|
71
|
+
isFocused,
|
|
72
|
+
isFocusVisible,
|
|
73
|
+
isDisabled: props.disabled || false,
|
|
74
|
+
isInvalid
|
|
75
|
+
},
|
|
76
|
+
defaultClassName: "react-aria-Input"
|
|
77
|
+
});
|
|
78
|
+
return React.createElement($7230ffa83bc0c2cf$export$df3a06d6289f983e.input, {
|
|
79
|
+
...$bbaa08b3cd72f041$export$9d1611c77c2fe928($41fb335299a4a39e$var$filterHoverProps(props), focusProps, hoverProps),
|
|
80
|
+
...renderProps,
|
|
81
|
+
ref,
|
|
82
|
+
"data-focused": isFocused || void 0,
|
|
83
|
+
"data-disabled": props.disabled || void 0,
|
|
84
|
+
"data-hovered": isHovered || void 0,
|
|
85
|
+
"data-focus-visible": isFocusVisible || void 0,
|
|
86
|
+
"data-invalid": isInvalid || void 0
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region node_modules/react-aria/dist/private/textfield/useTextField.mjs
|
|
91
|
+
function $054f71d2330da2e3$export$712718f7aec83d5(props, ref) {
|
|
92
|
+
let { inputElementType = "input", isDisabled = false, isRequired = false, isReadOnly = false, type = "text", validationBehavior = "aria" } = props;
|
|
93
|
+
let [value, setValue] = $3e6197669829fe11$export$40bfa8c7b0832715(props.value, props.defaultValue || "", props.onChange);
|
|
94
|
+
let { focusableProps } = $d1116acdf220c2da$export$4c014de7c8940b4c(props, ref);
|
|
95
|
+
let validationState = $fd2148440a13ec26$export$fc1a364ae1f3ff10({
|
|
96
|
+
...props,
|
|
97
|
+
value
|
|
98
|
+
});
|
|
99
|
+
let { isInvalid, validationErrors, validationDetails } = validationState.displayValidation;
|
|
100
|
+
let { labelProps, fieldProps, descriptionProps, errorMessageProps } = $191c9b6d48a0a4e2$export$294aa081a6c6f55d({
|
|
101
|
+
...props,
|
|
102
|
+
isInvalid,
|
|
103
|
+
errorMessage: props.errorMessage || validationErrors
|
|
104
|
+
});
|
|
105
|
+
let domProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { labelable: true });
|
|
106
|
+
const inputOnlyProps = {
|
|
107
|
+
type,
|
|
108
|
+
pattern: props.pattern
|
|
109
|
+
};
|
|
110
|
+
let [initialValue] = useState(value);
|
|
111
|
+
$3274bf1495747a7b$export$5add1d006293d136(ref, props.defaultValue ?? initialValue, setValue);
|
|
112
|
+
$860f7da480e22816$export$b8473d3665f3a75a(props, validationState, ref);
|
|
113
|
+
return {
|
|
114
|
+
labelProps,
|
|
115
|
+
inputProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(domProps, inputElementType === "input" ? inputOnlyProps : void 0, {
|
|
116
|
+
disabled: isDisabled,
|
|
117
|
+
readOnly: isReadOnly,
|
|
118
|
+
required: isRequired && validationBehavior === "native",
|
|
119
|
+
"aria-required": isRequired && validationBehavior === "aria" || void 0,
|
|
120
|
+
"aria-invalid": isInvalid || void 0,
|
|
121
|
+
"aria-errormessage": props["aria-errormessage"],
|
|
122
|
+
"aria-activedescendant": props["aria-activedescendant"],
|
|
123
|
+
"aria-autocomplete": props["aria-autocomplete"],
|
|
124
|
+
"aria-haspopup": props["aria-haspopup"],
|
|
125
|
+
"aria-controls": props["aria-controls"],
|
|
126
|
+
value,
|
|
127
|
+
onChange: (e) => setValue($23f2114a1b82827e$export$e58f029f0fbfdb29(e).value),
|
|
128
|
+
autoComplete: props.autoComplete,
|
|
129
|
+
autoCapitalize: props.autoCapitalize,
|
|
130
|
+
maxLength: props.maxLength,
|
|
131
|
+
minLength: props.minLength,
|
|
132
|
+
name: props.name,
|
|
133
|
+
form: props.form,
|
|
134
|
+
placeholder: props.placeholder,
|
|
135
|
+
inputMode: props.inputMode,
|
|
136
|
+
autoCorrect: props.autoCorrect,
|
|
137
|
+
spellCheck: props.spellCheck,
|
|
138
|
+
[parseInt(React.version, 10) >= 17 ? "enterKeyHint" : "enterkeyhint"]: props.enterKeyHint,
|
|
139
|
+
onCopy: props.onCopy,
|
|
140
|
+
onCut: props.onCut,
|
|
141
|
+
onPaste: props.onPaste,
|
|
142
|
+
onCompositionEnd: props.onCompositionEnd,
|
|
143
|
+
onCompositionStart: props.onCompositionStart,
|
|
144
|
+
onCompositionUpdate: props.onCompositionUpdate,
|
|
145
|
+
onSelect: props.onSelect,
|
|
146
|
+
onBeforeInput: props.onBeforeInput,
|
|
147
|
+
onInput: props.onInput,
|
|
148
|
+
...focusableProps,
|
|
149
|
+
...fieldProps
|
|
150
|
+
}),
|
|
151
|
+
descriptionProps,
|
|
152
|
+
errorMessageProps,
|
|
153
|
+
isInvalid,
|
|
154
|
+
validationErrors,
|
|
155
|
+
validationDetails
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
//#endregion
|
|
159
|
+
export { $3a442827418ebe87$export$f9c6924e160136d1 as a, $3a442827418ebe87$export$eb2fcfdbd7ba97d4 as i, $41fb335299a4a39e$export$37fb8590cf2c088c as n, $41fb335299a4a39e$export$f5b8910cec6cf069 as r, $054f71d2330da2e3$export$712718f7aec83d5 as t };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { u as $
|
|
2
|
-
import { H as $
|
|
3
|
-
import { t as $
|
|
4
|
-
import { t as $
|
|
5
|
-
import { t as $
|
|
6
|
-
//#region node_modules
|
|
7
|
-
function $
|
|
1
|
+
import { u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-JFcCNFzy.js";
|
|
2
|
+
import { H as $23f2114a1b82827e$export$e58f029f0fbfdb29, i as $d1116acdf220c2da$export$4c014de7c8940b4c } from "./useHover-lyApu3ba.js";
|
|
3
|
+
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-BfW758QC.js";
|
|
4
|
+
import { t as $d27d541f9569d26d$export$45712eceda6fad21 } from "./usePress-Dnx5rBoD.js";
|
|
5
|
+
import { t as $3274bf1495747a7b$export$5add1d006293d136 } from "./useFormReset-BuMc_O4y.js";
|
|
6
|
+
//#region node_modules/react-aria/dist/private/toggle/useToggle.mjs
|
|
7
|
+
function $876b6f32ca5a04c3$export$cbe85ee05b554577(props, state, ref) {
|
|
8
8
|
let { isDisabled = false, isReadOnly = false, value, name, form, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, validationState = "valid", isInvalid, onPressStart, onPressEnd, onPressChange, onPress, onPressUp, onClick } = props;
|
|
9
9
|
let onChange = (e) => {
|
|
10
10
|
e.stopPropagation();
|
|
11
|
-
state.setSelected($
|
|
11
|
+
state.setSelected($23f2114a1b82827e$export$e58f029f0fbfdb29(e).checked);
|
|
12
12
|
};
|
|
13
13
|
if (!(children != null) && !(ariaLabel != null || ariaLabelledby != null) && process.env.NODE_ENV !== "production") console.warn("If you do not provide children, you must specify an aria-label for accessibility");
|
|
14
|
-
let { pressProps, isPressed } = $
|
|
14
|
+
let { pressProps, isPressed } = $d27d541f9569d26d$export$45712eceda6fad21({
|
|
15
15
|
onPressStart,
|
|
16
16
|
onPressEnd,
|
|
17
17
|
onPressChange,
|
|
@@ -20,27 +20,26 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
|
|
|
20
20
|
onClick,
|
|
21
21
|
isDisabled
|
|
22
22
|
});
|
|
23
|
-
let { pressProps: labelProps, isPressed: isLabelPressed } = $
|
|
23
|
+
let { pressProps: labelProps, isPressed: isLabelPressed } = $d27d541f9569d26d$export$45712eceda6fad21({
|
|
24
24
|
onPressStart,
|
|
25
25
|
onPressEnd,
|
|
26
26
|
onPressChange,
|
|
27
27
|
onPressUp,
|
|
28
28
|
onClick,
|
|
29
29
|
onPress(e) {
|
|
30
|
-
|
|
31
|
-
onPress === null || onPress === void 0 || onPress(e);
|
|
30
|
+
onPress?.(e);
|
|
32
31
|
state.toggle();
|
|
33
|
-
|
|
32
|
+
ref.current?.focus();
|
|
34
33
|
},
|
|
35
34
|
isDisabled: isDisabled || isReadOnly
|
|
36
35
|
});
|
|
37
|
-
let { focusableProps } = $
|
|
38
|
-
let interactions = $
|
|
39
|
-
let domProps = $
|
|
40
|
-
$
|
|
36
|
+
let { focusableProps } = $d1116acdf220c2da$export$4c014de7c8940b4c(props, ref);
|
|
37
|
+
let interactions = $bbaa08b3cd72f041$export$9d1611c77c2fe928(pressProps, focusableProps);
|
|
38
|
+
let domProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { labelable: true });
|
|
39
|
+
$3274bf1495747a7b$export$5add1d006293d136(ref, state.defaultSelected, state.setSelected);
|
|
41
40
|
return {
|
|
42
|
-
labelProps: $
|
|
43
|
-
inputProps: $
|
|
41
|
+
labelProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(labelProps, { onClick: (e) => e.preventDefault() }),
|
|
42
|
+
inputProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(domProps, {
|
|
44
43
|
"aria-invalid": isInvalid || validationState === "invalid" || void 0,
|
|
45
44
|
"aria-errormessage": props["aria-errormessage"],
|
|
46
45
|
"aria-controls": props["aria-controls"],
|
|
@@ -61,4 +60,4 @@ function $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref) {
|
|
|
61
60
|
};
|
|
62
61
|
}
|
|
63
62
|
//#endregion
|
|
64
|
-
export { $
|
|
63
|
+
export { $876b6f32ca5a04c3$export$cbe85ee05b554577 as t };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { d as $3e6197669829fe11$export$40bfa8c7b0832715 } from "./useHover-lyApu3ba.js";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
//#region node_modules/react-stately/dist/private/toggle/useToggleState.mjs
|
|
4
|
+
function $fd3c5e01e837dc20$export$8042c6c013fd5226(props = {}) {
|
|
5
|
+
let { isReadOnly } = props;
|
|
6
|
+
let [isSelected, setSelected] = $3e6197669829fe11$export$40bfa8c7b0832715(props.isSelected, props.defaultSelected || false, props.onChange);
|
|
7
|
+
let [initialValue] = useState(isSelected);
|
|
8
|
+
function updateSelected(value) {
|
|
9
|
+
if (!isReadOnly) setSelected(value);
|
|
10
|
+
}
|
|
11
|
+
function toggleState() {
|
|
12
|
+
if (!isReadOnly) setSelected(!isSelected);
|
|
13
|
+
}
|
|
14
|
+
return {
|
|
15
|
+
isSelected,
|
|
16
|
+
defaultSelected: props.defaultSelected ?? initialValue,
|
|
17
|
+
setSelected: updateSelected,
|
|
18
|
+
toggle: toggleState
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { $fd3c5e01e837dc20$export$8042c6c013fd5226 as t };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { h as $c4867b2f328c2698$export$e5c5a5f917a5871c } from "./utils-JFcCNFzy.js";
|
|
2
|
+
import { H as $23f2114a1b82827e$export$e58f029f0fbfdb29, V as $23f2114a1b82827e$export$cd4e5573fbe2b576, z as $23f2114a1b82827e$export$4282f70798064fe0 } from "./useHover-lyApu3ba.js";
|
|
3
|
+
import { t as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider-Cm6dj5jY.js";
|
|
4
|
+
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-BfW758QC.js";
|
|
5
|
+
import { i as $535772f9d2c1f38d$export$c5251b9e124bf29 } from "./FocusScope-lGkM8AO8.js";
|
|
6
|
+
import { useRef, useState } from "react";
|
|
7
|
+
//#region node_modules/react-aria/dist/private/toolbar/useToolbar.mjs
|
|
8
|
+
function $afa781ff67c1cd08$export$fa142eb1681c520(props, ref) {
|
|
9
|
+
const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, orientation = "horizontal" } = props;
|
|
10
|
+
let [isInToolbar, setInToolbar] = useState(false);
|
|
11
|
+
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
12
|
+
setInToolbar(!!(ref.current && ref.current.parentElement?.closest("[role=\"toolbar\"]")));
|
|
13
|
+
});
|
|
14
|
+
const { direction } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
15
|
+
const shouldReverse = direction === "rtl" && orientation === "horizontal";
|
|
16
|
+
let focusManager = $535772f9d2c1f38d$export$c5251b9e124bf29(ref);
|
|
17
|
+
const onKeyDown = (e) => {
|
|
18
|
+
if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) return;
|
|
19
|
+
if (orientation === "horizontal" && e.key === "ArrowRight" || orientation === "vertical" && e.key === "ArrowDown") if (shouldReverse) focusManager.focusPrevious();
|
|
20
|
+
else focusManager.focusNext();
|
|
21
|
+
else if (orientation === "horizontal" && e.key === "ArrowLeft" || orientation === "vertical" && e.key === "ArrowUp") if (shouldReverse) focusManager.focusNext();
|
|
22
|
+
else focusManager.focusPrevious();
|
|
23
|
+
else if (e.key === "Tab") {
|
|
24
|
+
e.stopPropagation();
|
|
25
|
+
lastFocused.current = $23f2114a1b82827e$export$cd4e5573fbe2b576();
|
|
26
|
+
if (e.shiftKey) focusManager.focusFirst();
|
|
27
|
+
else focusManager.focusLast();
|
|
28
|
+
return;
|
|
29
|
+
} else return;
|
|
30
|
+
e.stopPropagation();
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
};
|
|
33
|
+
const lastFocused = useRef(null);
|
|
34
|
+
const onBlur = (e) => {
|
|
35
|
+
if (!$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, e.relatedTarget) && !lastFocused.current) lastFocused.current = $23f2114a1b82827e$export$e58f029f0fbfdb29(e);
|
|
36
|
+
};
|
|
37
|
+
const onFocus = (e) => {
|
|
38
|
+
if (lastFocused.current && !$23f2114a1b82827e$export$4282f70798064fe0(e.currentTarget, e.relatedTarget) && $23f2114a1b82827e$export$4282f70798064fe0(ref.current, $23f2114a1b82827e$export$e58f029f0fbfdb29(e))) {
|
|
39
|
+
lastFocused.current?.focus();
|
|
40
|
+
lastFocused.current = null;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
return { toolbarProps: {
|
|
44
|
+
...$8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { labelable: true }),
|
|
45
|
+
role: !isInToolbar ? "toolbar" : "group",
|
|
46
|
+
"aria-orientation": orientation,
|
|
47
|
+
"aria-label": ariaLabel,
|
|
48
|
+
"aria-labelledby": ariaLabel == null ? ariaLabelledBy : void 0,
|
|
49
|
+
onKeyDownCapture: !isInToolbar ? onKeyDown : void 0,
|
|
50
|
+
onFocusCapture: !isInToolbar ? onFocus : void 0,
|
|
51
|
+
onBlurCapture: !isInToolbar ? onBlur : void 0
|
|
52
|
+
} };
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { $afa781ff67c1cd08$export$fa142eb1681c520 as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as throttle, t as debounce } from "../debounce-throttle-
|
|
1
|
+
import { n as throttle, t as debounce } from "../debounce-throttle-LSPAPFtq.js";
|
|
2
2
|
export { debounce, throttle };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as isObject, c as kebabCase, d as snakeCase, f as upperFirst, i as isEqual, l as lowerFirst, n as has, o as isPlainObject, r as isEmpty, s as isString, t as camelCase, u as pascalCase } from "../es-dash-
|
|
1
|
+
import { a as isObject, c as kebabCase, d as snakeCase, f as upperFirst, i as isEqual, l as lowerFirst, n as has, o as isPlainObject, r as isEmpty, s as isString, t as camelCase, u as pascalCase } from "../es-dash-BuShf_ht.js";
|
|
2
2
|
export { camelCase, has, isEmpty, isEqual, isObject, isPlainObject, isString, kebabCase, lowerFirst, pascalCase, snakeCase, upperFirst };
|
package/dist/utilities/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as clsx$1 } from "../clsx-BUU5J41u.js";
|
|
2
2
|
import { arrayMoveMultiple, fixIds } from "./array-helpers.js";
|
|
3
|
-
import { a as isObject, c as kebabCase, d as snakeCase, f as upperFirst, i as isEqual, l as lowerFirst, n as has, o as isPlainObject, r as isEmpty, s as isString, t as camelCase, u as pascalCase } from "../es-dash-
|
|
3
|
+
import { a as isObject, c as kebabCase, d as snakeCase, f as upperFirst, i as isEqual, l as lowerFirst, n as has, o as isPlainObject, r as isEmpty, s as isString, t as camelCase, u as pascalCase } from "../es-dash-BuShf_ht.js";
|
|
4
4
|
import { truncate, truncateEnd, truncateMiddle, unescapeHTML } from "./text-helpers.js";
|
|
5
|
-
import { n as throttle, t as debounce } from "../debounce-throttle-
|
|
5
|
+
import { n as throttle, t as debounce } from "../debounce-throttle-LSPAPFtq.js";
|
|
6
6
|
import { getFileExtension, isColorDark } from "./general.js";
|
|
7
|
-
import { t as clsx } from "../utilities-
|
|
7
|
+
import { t as clsx } from "../utilities-DV0KKJNR.js";
|
|
8
8
|
import { cyrb64Hash, randomId, simpleHash } from "./hash.js";
|
|
9
9
|
export { arrayMoveMultiple, camelCase, clsx, clsx$1 as clsxFull, cyrb64Hash, debounce, fixIds, getFileExtension, has, isColorDark, isEmpty, isEqual, isObject, isPlainObject, isString, kebabCase, lowerFirst, pascalCase, randomId, simpleHash, snakeCase, throttle, truncate, truncateEnd, truncateMiddle, unescapeHTML, upperFirst };
|