@eightshift/ui-components 0.0.1
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 +27 -0
- package/dist/Checkbox-BLcVbhiO.js +178 -0
- package/dist/ColorSwatch-Cmlex_kT.js +66 -0
- package/dist/FieldError-wtMA4667.js +42 -0
- package/dist/FocusScope-1u9yyfIN.js +725 -0
- package/dist/Form-Cq3fu75_.js +5 -0
- package/dist/GridList-BZPXp3_O.js +1256 -0
- package/dist/Group-DyqpTRPe.js +49 -0
- package/dist/Input-jsbb4ugq.js +130 -0
- package/dist/Label-BPzS-sR7.js +17 -0
- package/dist/ListBox-w9gDaJkV.js +4423 -0
- package/dist/LiveAnnouncer-IsokfWQ5.js +73 -0
- package/dist/NumberFormatter-LzoKy975.js +160 -0
- package/dist/RSPContexts-CrNYmadY.js +14 -0
- package/dist/Select-49a62830.esm-C-RFtLiD.js +2541 -0
- package/dist/SelectionManager-mefd0ThJ.js +2155 -0
- package/dist/Separator-DHn0CwdK.js +325 -0
- package/dist/Slider-Pyh2V4bY.js +885 -0
- package/dist/Text-BM136LvS.js +17 -0
- package/dist/VisuallyHidden-BYRI1Lfo.js +51 -0
- package/dist/_commonjsHelpers-CUmg6egw.js +6 -0
- package/dist/ariaHideOutside-ByKBPHmX.js +113 -0
- package/dist/assets/style.css +1 -0
- package/dist/button-BkkdyHfJ.js +307 -0
- package/dist/components/animated-visibility/animated-visibility.js +7165 -0
- package/dist/components/base-control/base-control.js +97 -0
- package/dist/components/breakpoint-preview/breakpoint-preview.js +218 -0
- package/dist/components/button/button.js +10 -0
- package/dist/components/checkbox/checkbox.js +119 -0
- package/dist/components/color-pickers/color-picker.js +242 -0
- package/dist/components/color-pickers/color-swatch.js +62 -0
- package/dist/components/color-pickers/gradient-editor.js +516 -0
- package/dist/components/color-pickers/solid-color-picker.js +1633 -0
- package/dist/components/component-toggle/component-toggle.js +71 -0
- package/dist/components/container-panel/container-panel.js +39 -0
- package/dist/components/expandable/expandable.js +144 -0
- package/dist/components/input-field/input-field.js +224 -0
- package/dist/components/link-input/link-input.js +937 -0
- package/dist/components/list-box/list-box.js +152 -0
- package/dist/components/matrix-align/matrix-align.js +185 -0
- package/dist/components/menu/menu.js +1608 -0
- package/dist/components/notice/notice.js +119 -0
- package/dist/components/number-picker/number-picker.js +277 -0
- package/dist/components/popover/popover.js +9 -0
- package/dist/components/radio/radio.js +552 -0
- package/dist/components/repeater/repeater-item.js +127 -0
- package/dist/components/repeater/repeater.js +248 -0
- package/dist/components/responsive/responsive-legacy.js +326 -0
- package/dist/components/responsive/responsive.js +499 -0
- package/dist/components/responsive-preview/responsive-preview.js +119 -0
- package/dist/components/rich-label/rich-label.js +56 -0
- package/dist/components/select/async-multi-select.js +144 -0
- package/dist/components/select/async-single-select.js +126 -0
- package/dist/components/select/custom-select-default-components.js +38 -0
- package/dist/components/select/multi-select-components.js +8 -0
- package/dist/components/select/multi-select.js +134 -0
- package/dist/components/select/react-select-component-wrappers.js +90 -0
- package/dist/components/select/shared.js +45 -0
- package/dist/components/select/single-select.js +116 -0
- package/dist/components/select/styles.js +55 -0
- package/dist/components/slider/column-config-slider.js +225 -0
- package/dist/components/slider/slider.js +362 -0
- package/dist/components/slider/utils.js +45 -0
- package/dist/components/spacer/spacer.js +93 -0
- package/dist/components/tabs/tabs.js +626 -0
- package/dist/components/toggle/switch.js +140 -0
- package/dist/components/toggle/toggle.js +58 -0
- package/dist/components/toggle-button/toggle-button.js +206 -0
- package/dist/components/tooltip/tooltip.js +10 -0
- package/dist/context-jMy6xdVq.js +98 -0
- package/dist/default-i18n-BhE-OUmt.js +873 -0
- package/dist/filterDOMProps-DG2RfOUr.js +30 -0
- package/dist/focusSafely-C3K8zAKj.js +743 -0
- package/dist/hooks/use-cell-edit-mode.js +35 -0
- package/dist/icons/block-icon.js +42 -0
- package/dist/icons/generic-color-swatch.js +21 -0
- package/dist/icons/icons.js +3636 -0
- package/dist/index-Bfb9bWcb.js +28844 -0
- package/dist/index-a301f526.esm-Bioi4cGX.js +3576 -0
- package/dist/index.js +109 -0
- package/dist/intlStrings-CUhoK9EN.js +2484 -0
- package/dist/isScrollable-PcyglExV.js +10 -0
- package/dist/modifiers.esm-BuJQPI1X.js +31 -0
- package/dist/multi-select-components-CjVpCNko.js +3677 -0
- package/dist/number-rWqELA8W.js +39 -0
- package/dist/popover-Dx3vKXUX.js +1061 -0
- package/dist/react-select-async.esm-TFb_ZX6C.js +111 -0
- package/dist/react-select.esm-BjRWqf0E.js +15 -0
- package/dist/style.js +1 -0
- package/dist/textSelection-BosCCRVE.js +89 -0
- package/dist/tooltip-CkCndvTI.js +1094 -0
- package/dist/useButton-CuG5UzUw.js +74 -0
- package/dist/useEvent-DHv-yhOH.js +24 -0
- package/dist/useFocusRing-Cc-4eouh.js +41 -0
- package/dist/useFocusable-5q1Gek1J.js +81 -0
- package/dist/useFormReset-Buc9YJcv.js +23 -0
- package/dist/useFormValidationState-BAPPNXic.js +238 -0
- package/dist/useHasTabbableChild-D3uUNhJ0.js +37 -0
- package/dist/useLabel-CGlkoFG0.js +28 -0
- package/dist/useLabels-Dg62M_3P.js +25 -0
- package/dist/useListData-BelKu4kx.js +211 -0
- package/dist/useListState-Domq0blV.js +137 -0
- package/dist/useLocalizedStringFormatter-Prmz0h0A.js +130 -0
- package/dist/useNumberFieldState-BLU3uhSR.js +1253 -0
- package/dist/useNumberFormatter-BLc2xjZn.js +13 -0
- package/dist/usePress-BQgVor4T.js +698 -0
- package/dist/useToggle-C9ETOBaZ.js +58 -0
- package/dist/useToggleState-DJ_z5E2S.js +21 -0
- package/dist/utilities/classnames.js +16 -0
- package/dist/utilities/text-helpers.js +79 -0
- package/dist/utils-BsiH7-5Y.js +488 -0
- package/package.json +71 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./utils-BsiH7-5Y.js";
|
|
2
|
+
import React__default, { forwardRef, createContext } from "react";
|
|
3
|
+
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./focusSafely-C3K8zAKj.js";
|
|
4
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-Cc-4eouh.js";
|
|
5
|
+
const $a049562f99e7db0e$export$f9c6924e160136d1 = /* @__PURE__ */ createContext({});
|
|
6
|
+
function $a049562f99e7db0e$var$Group(props, ref) {
|
|
7
|
+
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $a049562f99e7db0e$export$f9c6924e160136d1);
|
|
8
|
+
let { isDisabled, isInvalid, onHoverStart, onHoverChange, onHoverEnd, ...otherProps } = props;
|
|
9
|
+
let { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456({
|
|
10
|
+
onHoverStart,
|
|
11
|
+
onHoverChange,
|
|
12
|
+
onHoverEnd,
|
|
13
|
+
isDisabled
|
|
14
|
+
});
|
|
15
|
+
let { isFocused, isFocusVisible, focusProps } = $f7dceffc5ad7768b$export$4e328f61c538687f({
|
|
16
|
+
within: true
|
|
17
|
+
});
|
|
18
|
+
isDisabled !== null && isDisabled !== void 0 ? isDisabled : isDisabled = !!props["aria-disabled"] && props["aria-disabled"] !== "false";
|
|
19
|
+
isInvalid !== null && isInvalid !== void 0 ? isInvalid : isInvalid = !!props["aria-invalid"] && props["aria-invalid"] !== "false";
|
|
20
|
+
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
21
|
+
...props,
|
|
22
|
+
values: {
|
|
23
|
+
isHovered,
|
|
24
|
+
isFocusWithin: isFocused,
|
|
25
|
+
isFocusVisible,
|
|
26
|
+
isDisabled,
|
|
27
|
+
isInvalid
|
|
28
|
+
},
|
|
29
|
+
defaultClassName: "react-aria-Group"
|
|
30
|
+
});
|
|
31
|
+
var _props_role, _props_slot;
|
|
32
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
33
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(otherProps, focusProps, hoverProps),
|
|
34
|
+
...renderProps,
|
|
35
|
+
ref,
|
|
36
|
+
role: (_props_role = props.role) !== null && _props_role !== void 0 ? _props_role : "group",
|
|
37
|
+
slot: (_props_slot = props.slot) !== null && _props_slot !== void 0 ? _props_slot : void 0,
|
|
38
|
+
"data-focus-within": isFocused || void 0,
|
|
39
|
+
"data-hovered": isHovered || void 0,
|
|
40
|
+
"data-focus-visible": isFocusVisible || void 0,
|
|
41
|
+
"data-disabled": isDisabled || void 0,
|
|
42
|
+
"data-invalid": isInvalid || void 0
|
|
43
|
+
}, renderProps.children);
|
|
44
|
+
}
|
|
45
|
+
const $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 = /* @__PURE__ */ forwardRef($a049562f99e7db0e$var$Group);
|
|
46
|
+
export {
|
|
47
|
+
$a049562f99e7db0e$export$f9c6924e160136d1 as $,
|
|
48
|
+
$a049562f99e7db0e$export$eb2fcfdbd7ba97d4 as a
|
|
49
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import React__default, { useEffect, createContext } from "react";
|
|
2
|
+
import { e as $458b0a5536c1a7cf$export$40bfa8c7b0832715, f as $431fbd86ca7dc216$export$f21a1ffae260145a, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "./focusSafely-C3K8zAKj.js";
|
|
3
|
+
import { d as $3ef42575df84b30b$export$9d1611c77c2fe928, b as $64fa3d84918910a7$export$86427a43e3e48ebb, a as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "./utils-BsiH7-5Y.js";
|
|
4
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-DG2RfOUr.js";
|
|
5
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-Buc9YJcv.js";
|
|
6
|
+
import { a as $2baaea4c71418dea$export$294aa081a6c6f55d } from "./FieldError-wtMA4667.js";
|
|
7
|
+
import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-5q1Gek1J.js";
|
|
8
|
+
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, a as $e93e671b31057976$export$b8473d3665f3a75a } from "./useFormValidationState-BAPPNXic.js";
|
|
9
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "./useFocusRing-Cc-4eouh.js";
|
|
10
|
+
function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
11
|
+
let { inputElementType = "input", isDisabled = false, isRequired = false, isReadOnly = false, type = "text", validationBehavior = "aria" } = props;
|
|
12
|
+
let [value, setValue] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.value, props.defaultValue || "", props.onChange);
|
|
13
|
+
let { focusableProps } = $e6afbd83fe6ebbd2$export$4c014de7c8940b4c(props, ref);
|
|
14
|
+
let validationState = $e5be200c675c3b3a$export$fc1a364ae1f3ff10({
|
|
15
|
+
...props,
|
|
16
|
+
value
|
|
17
|
+
});
|
|
18
|
+
let { isInvalid, validationErrors, validationDetails } = validationState.displayValidation;
|
|
19
|
+
let { labelProps, fieldProps, descriptionProps, errorMessageProps } = $2baaea4c71418dea$export$294aa081a6c6f55d({
|
|
20
|
+
...props,
|
|
21
|
+
isInvalid,
|
|
22
|
+
errorMessage: props.errorMessage || validationErrors
|
|
23
|
+
});
|
|
24
|
+
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
25
|
+
labelable: true
|
|
26
|
+
});
|
|
27
|
+
const inputOnlyProps = {
|
|
28
|
+
type,
|
|
29
|
+
pattern: props.pattern
|
|
30
|
+
};
|
|
31
|
+
$99facab73266f662$export$5add1d006293d136(ref, value, setValue);
|
|
32
|
+
$e93e671b31057976$export$b8473d3665f3a75a(props, validationState, ref);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (ref.current instanceof $431fbd86ca7dc216$export$f21a1ffae260145a(ref.current).HTMLTextAreaElement) {
|
|
35
|
+
let input = ref.current;
|
|
36
|
+
Object.defineProperty(input, "defaultValue", {
|
|
37
|
+
get: () => input.value,
|
|
38
|
+
set: () => {
|
|
39
|
+
},
|
|
40
|
+
configurable: true
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}, [
|
|
44
|
+
ref
|
|
45
|
+
]);
|
|
46
|
+
return {
|
|
47
|
+
labelProps,
|
|
48
|
+
inputProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, inputElementType === "input" && inputOnlyProps, {
|
|
49
|
+
disabled: isDisabled,
|
|
50
|
+
readOnly: isReadOnly,
|
|
51
|
+
required: isRequired && validationBehavior === "native",
|
|
52
|
+
"aria-required": isRequired && validationBehavior === "aria" || void 0,
|
|
53
|
+
"aria-invalid": isInvalid || void 0,
|
|
54
|
+
"aria-errormessage": props["aria-errormessage"],
|
|
55
|
+
"aria-activedescendant": props["aria-activedescendant"],
|
|
56
|
+
"aria-autocomplete": props["aria-autocomplete"],
|
|
57
|
+
"aria-haspopup": props["aria-haspopup"],
|
|
58
|
+
value,
|
|
59
|
+
onChange: (e) => setValue(e.target.value),
|
|
60
|
+
autoComplete: props.autoComplete,
|
|
61
|
+
autoCapitalize: props.autoCapitalize,
|
|
62
|
+
maxLength: props.maxLength,
|
|
63
|
+
minLength: props.minLength,
|
|
64
|
+
name: props.name,
|
|
65
|
+
placeholder: props.placeholder,
|
|
66
|
+
inputMode: props.inputMode,
|
|
67
|
+
// Clipboard events
|
|
68
|
+
onCopy: props.onCopy,
|
|
69
|
+
onCut: props.onCut,
|
|
70
|
+
onPaste: props.onPaste,
|
|
71
|
+
// Composition events
|
|
72
|
+
onCompositionEnd: props.onCompositionEnd,
|
|
73
|
+
onCompositionStart: props.onCompositionStart,
|
|
74
|
+
onCompositionUpdate: props.onCompositionUpdate,
|
|
75
|
+
// Selection events
|
|
76
|
+
onSelect: props.onSelect,
|
|
77
|
+
// Input events
|
|
78
|
+
onBeforeInput: props.onBeforeInput,
|
|
79
|
+
onInput: props.onInput,
|
|
80
|
+
...focusableProps,
|
|
81
|
+
...fieldProps
|
|
82
|
+
}),
|
|
83
|
+
descriptionProps,
|
|
84
|
+
errorMessageProps,
|
|
85
|
+
isInvalid,
|
|
86
|
+
validationErrors,
|
|
87
|
+
validationDetails
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
const $3985021b0ad6602f$export$37fb8590cf2c088c = /* @__PURE__ */ createContext({});
|
|
91
|
+
let $3985021b0ad6602f$var$filterHoverProps = (props) => {
|
|
92
|
+
let { onHoverStart, onHoverChange, onHoverEnd, ...otherProps } = props;
|
|
93
|
+
return otherProps;
|
|
94
|
+
};
|
|
95
|
+
function $3985021b0ad6602f$var$Input(props, ref) {
|
|
96
|
+
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $3985021b0ad6602f$export$37fb8590cf2c088c);
|
|
97
|
+
let { hoverProps, isHovered } = $6179b936705e76d3$export$ae780daf29e6d456(props);
|
|
98
|
+
let { isFocused, isFocusVisible, focusProps } = $f7dceffc5ad7768b$export$4e328f61c538687f({
|
|
99
|
+
isTextInput: true,
|
|
100
|
+
autoFocus: props.autoFocus
|
|
101
|
+
});
|
|
102
|
+
let isInvalid = !!props["aria-invalid"] && props["aria-invalid"] !== "false";
|
|
103
|
+
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
104
|
+
...props,
|
|
105
|
+
values: {
|
|
106
|
+
isHovered,
|
|
107
|
+
isFocused,
|
|
108
|
+
isFocusVisible,
|
|
109
|
+
isDisabled: props.disabled || false,
|
|
110
|
+
isInvalid
|
|
111
|
+
},
|
|
112
|
+
defaultClassName: "react-aria-Input"
|
|
113
|
+
});
|
|
114
|
+
return /* @__PURE__ */ React__default.createElement("input", {
|
|
115
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928($3985021b0ad6602f$var$filterHoverProps(props), focusProps, hoverProps),
|
|
116
|
+
...renderProps,
|
|
117
|
+
ref,
|
|
118
|
+
"data-focused": isFocused || void 0,
|
|
119
|
+
"data-disabled": props.disabled || void 0,
|
|
120
|
+
"data-hovered": isHovered || void 0,
|
|
121
|
+
"data-focus-visible": isFocusVisible || void 0,
|
|
122
|
+
"data-invalid": isInvalid || void 0
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
const $3985021b0ad6602f$export$f5b8910cec6cf069 = /* @__PURE__ */ $64fa3d84918910a7$export$86427a43e3e48ebb($3985021b0ad6602f$var$Input);
|
|
126
|
+
export {
|
|
127
|
+
$3985021b0ad6602f$export$37fb8590cf2c088c as $,
|
|
128
|
+
$3985021b0ad6602f$export$f5b8910cec6cf069 as a,
|
|
129
|
+
$2d73ec29415bd339$export$712718f7aec83d5 as b
|
|
130
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { b as $64fa3d84918910a7$export$86427a43e3e48ebb, a as $64fa3d84918910a7$export$29f1550f4b0d4415 } from "./utils-BsiH7-5Y.js";
|
|
2
|
+
import React__default, { createContext } from "react";
|
|
3
|
+
const $01b77f81d0f07f68$export$75b6ee27786ba447 = /* @__PURE__ */ createContext({});
|
|
4
|
+
function $01b77f81d0f07f68$var$Label(props, ref) {
|
|
5
|
+
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $01b77f81d0f07f68$export$75b6ee27786ba447);
|
|
6
|
+
let { elementType: ElementType = "label", ...labelProps } = props;
|
|
7
|
+
return /* @__PURE__ */ React__default.createElement(ElementType, {
|
|
8
|
+
className: "react-aria-Label",
|
|
9
|
+
...labelProps,
|
|
10
|
+
ref
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
const $01b77f81d0f07f68$export$b04be29aa201d4f5 = /* @__PURE__ */ $64fa3d84918910a7$export$86427a43e3e48ebb($01b77f81d0f07f68$var$Label);
|
|
14
|
+
export {
|
|
15
|
+
$01b77f81d0f07f68$export$b04be29aa201d4f5 as $,
|
|
16
|
+
$01b77f81d0f07f68$export$75b6ee27786ba447 as a
|
|
17
|
+
};
|