@easypost/easy-ui 1.0.0-alpha.65 → 1.0.0-alpha.66
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/Badge/index.js +14 -14
- package/Badge/index.mjs +14 -14
- package/Banner/index.js +5 -5
- package/Banner/index.mjs +5 -5
- package/Button/index.js +1 -1
- package/Button/index.mjs +1 -1
- package/CHANGELOG.md +6 -0
- package/Calendar/index.js +1 -1
- package/Calendar/index.mjs +1 -1
- package/Card/index.js +1 -1
- package/Card/index.mjs +1 -1
- package/Checkbox/index.js +1 -1
- package/Checkbox/index.mjs +1 -1
- package/CodeBlock/index.js +13 -13
- package/CodeBlock/index.mjs +13 -13
- package/CodeSnippet/index.js +1 -1
- package/CodeSnippet/index.mjs +1 -1
- package/DataGrid/index.js +57 -57
- package/DataGrid/index.mjs +58 -58
- package/DatePicker/index.js +3 -3
- package/DatePicker/index.mjs +5 -5
- package/DateRangePicker/index.js +3 -3
- package/DateRangePicker/index.mjs +5 -5
- package/Drawer/index.js +18 -18
- package/Drawer/index.mjs +22 -22
- package/DropdownButton/index.js +12 -12
- package/DropdownButton/index.mjs +12 -12
- package/EmptyStateCard/index.js +8 -8
- package/EmptyStateCard/index.mjs +8 -8
- package/FocusedProductLayout/index.js +23 -23
- package/FocusedProductLayout/index.mjs +23 -23
- package/ForgeLayout/index.js +41 -231
- package/ForgeLayout/index.mjs +40 -230
- package/FormLayout/index.js +5 -5
- package/FormLayout/index.mjs +5 -5
- package/HorizontalGrid/index.js +1 -1
- package/HorizontalGrid/index.mjs +1 -1
- package/HorizontalStack/index.js +1 -1
- package/HorizontalStack/index.mjs +1 -1
- package/Icon/index.js +1 -1
- package/Icon/index.mjs +1 -1
- package/IconButton/index.js +12 -12
- package/IconButton/index.mjs +12 -12
- package/InputField/index.js +1 -1
- package/InputField/index.mjs +1 -1
- package/KebabButton/index.js +1 -1
- package/KebabButton/index.mjs +1 -1
- package/Menu/MenuOverlay.d.ts.map +1 -1
- package/Menu/index.js +1 -1
- package/Menu/index.mjs +1 -1
- package/Menu/utilities.d.ts +3 -0
- package/Menu/utilities.d.ts.map +1 -1
- package/Modal/index.js +19 -19
- package/Modal/index.mjs +23 -23
- package/MultiSelect/MultiSelect.d.ts +123 -0
- package/MultiSelect/MultiSelect.d.ts.map +1 -0
- package/MultiSelect/MultiSelect.stories.d.ts +11 -0
- package/MultiSelect/MultiSelect.stories.d.ts.map +1 -0
- package/MultiSelect/MultiSelect.test.d.ts +2 -0
- package/MultiSelect/MultiSelect.test.d.ts.map +1 -0
- package/MultiSelect/MultiSelectDropdown.d.ts +22 -0
- package/MultiSelect/MultiSelectDropdown.d.ts.map +1 -0
- package/MultiSelect/index.d.ts +2 -0
- package/MultiSelect/index.d.ts.map +1 -0
- package/MultiSelect/index.js +1989 -0
- package/MultiSelect/index.mjs +1974 -0
- package/MultiSelect/utilities.d.ts +3 -0
- package/MultiSelect/utilities.d.ts.map +1 -0
- package/NexusLayout/index.js +28 -28
- package/NexusLayout/index.mjs +28 -28
- package/Notification/index.js +1 -1
- package/Notification/index.mjs +1 -1
- package/Pagination/index.js +7 -7
- package/Pagination/index.mjs +7 -7
- package/PillGroup/index.js +3 -1681
- package/PillGroup/index.mjs +3 -1681
- package/ProductLayout/index.js +21 -21
- package/ProductLayout/index.mjs +25 -25
- package/Provider/index.js +1 -1
- package/Provider/index.mjs +1 -1
- package/RadioButtonGroup/index.js +3 -3
- package/RadioButtonGroup/index.mjs +3 -3
- package/RadioGroup/index.js +1 -1
- package/RadioGroup/index.mjs +1 -1
- package/RangeCalendar/index.js +1 -1
- package/RangeCalendar/index.mjs +1 -1
- package/SearchNav/index.js +29 -29
- package/SearchNav/index.mjs +29 -29
- package/SectionCard/index.js +7 -7
- package/SectionCard/index.mjs +7 -7
- package/Select/index.js +5 -5
- package/Select/index.mjs +5 -5
- package/SelectorErrorTooltip/index.js +1 -1
- package/SelectorErrorTooltip/index.mjs +1 -1
- package/Spinner/index.js +1 -1
- package/Spinner/index.mjs +1 -1
- package/SplitToggleCard/index.js +4 -4
- package/SplitToggleCard/index.mjs +4 -4
- package/Stepper/index.js +1 -1
- package/Stepper/index.mjs +1 -1
- package/TabNav/index.js +1 -1
- package/TabNav/index.mjs +1 -1
- package/TabPanels/index.js +1 -1
- package/TabPanels/index.mjs +2 -2
- package/Tabs/index.js +1 -1
- package/Tabs/index.mjs +1 -1
- package/Text/index.js +1 -1
- package/Text/index.mjs +1 -1
- package/TextField/index.js +1 -1
- package/TextField/index.mjs +1 -1
- package/Textarea/index.js +1 -1
- package/Textarea/index.mjs +1 -1
- package/Toggle/index.js +1 -1
- package/Toggle/index.mjs +1 -1
- package/ToggleCard/index.js +2 -2
- package/ToggleCard/index.mjs +2 -2
- package/Tooltip/index.js +1 -1
- package/Tooltip/index.mjs +1 -1
- package/VerticalNav/index.js +24 -24
- package/VerticalNav/index.mjs +24 -24
- package/VerticalStack/index.js +1 -1
- package/VerticalStack/index.mjs +1 -1
- package/__chunks__/{Button-CDRssWxC.mjs → Button-BqogJAQ3.mjs} +3 -3
- package/__chunks__/{Button-DXhw-VUb.js → Button-CVaEK94Q.js} +18 -18
- package/__chunks__/{Button-lb6KY-VK.mjs → Button-CVbi-24J.mjs} +18 -18
- package/__chunks__/{Button-BvLvcmfd.js → Button-Y550ybuK.js} +1 -1
- package/__chunks__/{Calendar-ChbA9Ste.mjs → Calendar-C2JlXaSY.mjs} +1 -1
- package/__chunks__/{Calendar-D-oFF4f4.js → Calendar-CmF_v-Dn.js} +1 -1
- package/__chunks__/{CalendarBase-oPvH2YM1.js → CalendarBase-Cavy4k_H.js} +18 -18
- package/__chunks__/{CalendarBase-DC8WR7md.mjs → CalendarBase-aeU9JZC2.mjs} +18 -18
- package/__chunks__/{Card-CWv2re8Z.mjs → Card-B5c1vM8E.mjs} +12 -12
- package/__chunks__/{Card-CRFM7MOD.js → Card-BHZOcCVB.js} +12 -12
- package/__chunks__/{Checkbox-B7eahvPN.js → Checkbox-BmtLwm3J.js} +19 -19
- package/__chunks__/{Checkbox-XDmnzjIx.mjs → Checkbox-IhSMESiF.mjs} +20 -20
- package/__chunks__/{CodeSnippet-CnjYkoJo.mjs → CodeSnippet-DA3SuGi9.mjs} +2 -2
- package/__chunks__/{CodeSnippet-FCgb2RfQ.js → CodeSnippet-HAojQDBb.js} +2 -2
- package/__chunks__/{DatePickerBase-B9g5PeHi.mjs → DatePickerBase-DYuliQ2j.mjs} +20 -64
- package/__chunks__/{DatePickerBase-DMmeUEou.js → DatePickerBase-PqJZhPW5.js} +18 -62
- package/__chunks__/Dialog-CFyC5TFs.js +232 -0
- package/__chunks__/Dialog-DnCSZh3s.mjs +233 -0
- package/__chunks__/{HelpMenu-BjEMVfGE.js → HelpMenu-DttT1pkc.js} +6 -6
- package/__chunks__/{HelpMenu-DWvUM5hz.mjs → HelpMenu-dPaIsmEG.mjs} +6 -6
- package/__chunks__/{HorizontalGrid-BZX-WluO.js → HorizontalGrid-BFqXCljf.js} +1 -1
- package/__chunks__/{HorizontalGrid-DGrPEAhQ.mjs → HorizontalGrid-CyBrrh6k.mjs} +1 -1
- package/__chunks__/{HorizontalStack-VtCu2VMx.js → HorizontalStack-BG-lZii5.js} +1 -1
- package/__chunks__/{HorizontalStack--Qc3cVBd.mjs → HorizontalStack-p9m9muAJ.mjs} +1 -1
- package/__chunks__/{Icon-BDa4XL_V.js → Icon-BHbBKuGB.js} +2 -2
- package/__chunks__/{Icon-BD88DLNr.mjs → Icon-ZRjQkfey.mjs} +2 -2
- package/__chunks__/{InputCaption-DKZRO84o.js → InputCaption-BQw7pLl1.js} +2 -2
- package/__chunks__/{InputCaption-DYFfypKt.mjs → InputCaption-DE7SnGJr.mjs} +2 -2
- package/__chunks__/{InputField-Bv1SfmUB.mjs → InputField-1toY1X94.mjs} +6 -89
- package/__chunks__/{InputField-C7Ti5JNz.js → InputField-e2dBsTrQ.js} +6 -89
- package/__chunks__/{InputIcon-VzRxuUky.mjs → InputIcon-CKwsgYvg.mjs} +31 -31
- package/__chunks__/{InputIcon-c-x0Whak.js → InputIcon-DM19rdNu.js} +31 -31
- package/__chunks__/{KebabButton-CdlmuIRm.js → KebabButton-3APOVOtc.js} +4 -4
- package/__chunks__/{KebabButton-TgeYkgj5.mjs → KebabButton-CGvwEB3q.mjs} +4 -4
- package/__chunks__/{Menu-C1Q0RfOp.js → Menu-90Db_wYM.js} +22 -62
- package/__chunks__/{Menu-BL0okgwD.mjs → Menu-D7JiGJt4.mjs} +22 -62
- package/__chunks__/{Notification-CZS59-s8.mjs → Notification-C4gEE6IM.mjs} +14 -14
- package/__chunks__/{Notification-D7fRjiAH.js → Notification-DZ0uDsoT.js} +14 -14
- package/__chunks__/{Overlay-DyfvFsGi.mjs → Overlay-BEmOdNIB.mjs} +3 -3
- package/__chunks__/PillGroup-BetDOSFz.js +2061 -0
- package/__chunks__/PillGroup-Bp5vfk6Z.mjs +2062 -0
- package/__chunks__/{RadioGroup-D3RN5LLn.mjs → RadioGroup-DPJOnxCi.mjs} +16 -16
- package/__chunks__/{RadioGroup-CYlZvoxh.js → RadioGroup-Qn2c29rT.js} +15 -15
- package/__chunks__/{RangeCalendar-D5t6FuZp.mjs → RangeCalendar-BNySCRAa.mjs} +1 -1
- package/__chunks__/{RangeCalendar-0Zt6GJAs.js → RangeCalendar-lhIzCnWl.js} +1 -1
- package/__chunks__/{SelectOverlay-XRIcujy9.js → SelectOverlay-CoOED545.js} +28 -188
- package/__chunks__/{SelectOverlay-DAJ9-Wye.mjs → SelectOverlay-D12QgA_I.mjs} +29 -189
- package/__chunks__/{SelectorErrorTooltip-r2APVg60.js → SelectorErrorTooltip-CNinvIcU.js} +4 -4
- package/__chunks__/{SelectorErrorTooltip-BSNUFpGD.mjs → SelectorErrorTooltip-Cz7Uw_O_.mjs} +4 -4
- package/__chunks__/{Spinner-C6CoASxe.mjs → Spinner-Co64ezt-.mjs} +5 -5
- package/__chunks__/{Spinner-D9lZ3erf.js → Spinner-DTH0xdij.js} +5 -5
- package/__chunks__/{Stepper-D0YDhoPF.js → Stepper-DqcfNOrn.js} +25 -25
- package/__chunks__/{Stepper-BRecUCpd.mjs → Stepper-OFWKfhi3.mjs} +25 -25
- package/__chunks__/{TabNav-BzeG4JrK.mjs → TabNav-B44TuB70.mjs} +1 -1
- package/__chunks__/{TabNav-ipa33NIM.js → TabNav-DzF57oTN.js} +1 -1
- package/__chunks__/{Tabs-CsOlVyHJ.mjs → Tabs-ClOwavjv.mjs} +17 -17
- package/__chunks__/{Tabs-CDUhh-Bz.js → Tabs-CsxDAl1X.js} +17 -17
- package/__chunks__/{Text-CntV2Frc.js → Text-BwXTDw77.js} +34 -34
- package/__chunks__/{Text-BHyjSBcd.mjs → Text-DYLBjpe-.mjs} +34 -34
- package/__chunks__/{TextField-Ca_M-pak.mjs → TextField-DVWDMYaM.mjs} +1 -1
- package/__chunks__/{TextField-CBWpUHdy.js → TextField-YD_1oSnk.js} +1 -1
- package/__chunks__/{Toggle-BxtpUTDA.mjs → Toggle-DiK1wHdG.mjs} +11 -11
- package/__chunks__/{Toggle-C6ICkaF-.js → Toggle-gPKUf7QS.js} +11 -11
- package/__chunks__/{Tooltip-BK6l0C3n.mjs → Tooltip-BX_C7x_7.mjs} +10 -10
- package/__chunks__/{Tooltip-cqSETep4.js → Tooltip-DPZMv6Ia.js} +8 -8
- package/__chunks__/{VerticalStack-BVtgNZrG.mjs → VerticalStack-C466n8W1.mjs} +3 -3
- package/__chunks__/{VerticalStack-B7auhieq.js → VerticalStack-DIpmkisq.js} +3 -3
- package/__chunks__/{useDialog-c-C07qhw.mjs → useDialog-h-MPfyGr.mjs} +1 -1
- package/__chunks__/{useEdgeInterceptors-DrJ9MQmY.mjs → useEdgeInterceptors-BORL2txk.mjs} +5 -5
- package/__chunks__/{useEdgeInterceptors-Bvg1fK8h.js → useEdgeInterceptors-DU8I_hQ1.js} +5 -5
- package/__chunks__/useFilter-D-K0Oj-7.mjs +65 -0
- package/__chunks__/useFilter-DpnZ54nd.js +64 -0
- package/__chunks__/{useFormValidation-v2O6VL2V.mjs → useFormValidation-B3euLzzR.mjs} +4 -4
- package/__chunks__/useListBoxSection-BlFRlBZy.js +192 -0
- package/__chunks__/useListBoxSection-BsSdeGKp.mjs +193 -0
- package/__chunks__/{useTriggerWidth-CRz8zSDa.mjs → useMenuTrigger-D4pQ727R.mjs} +3 -130
- package/__chunks__/{useTriggerWidth-Dj7C0lza.js → useMenuTrigger-qbIPy-fg.js} +0 -127
- package/__chunks__/useMenuTriggerState-Cf_X36NC.mjs +67 -0
- package/__chunks__/useMenuTriggerState-Dai3rheB.js +66 -0
- package/__chunks__/{useModalOverlay-S0R2uVTX.mjs → useModalOverlay-CkOujl0G.mjs} +1 -1
- package/__chunks__/{useOverlayPosition-BjK7cu6U.mjs → useOverlayPosition-dua8TTSS.mjs} +1 -1
- package/__chunks__/{useOverlayTrigger-DDcXdZOM.mjs → useOverlayTrigger-BS8c6XEz.mjs} +1 -1
- package/__chunks__/{useSelectableItem-D61t76J1.mjs → useSelectableItem-B8l2VAQ8.mjs} +2 -2
- package/__chunks__/{useSelectableList-UkBCcTuC.js → useSelectableList-CzTJAukw.js} +15 -0
- package/__chunks__/{useSelectableList-BdG5I7cy.mjs → useSelectableList-DsUuWr0P.mjs} +18 -3
- package/__chunks__/useTextField-CErFc3WZ.js +106 -0
- package/__chunks__/useTextField-Dd-YTxI4.mjs +107 -0
- package/__chunks__/useTriggerWidth-B-IM2wNY.js +132 -0
- package/__chunks__/useTriggerWidth-CAYuGPNq.mjs +133 -0
- package/__chunks__/{utilities-CaBPUKEB.js → utilities-BDABIMDb.js} +4 -0
- package/__chunks__/{utilities-DASknbaa.mjs → utilities-DpKIaDkW.mjs} +5 -1
- package/__chunks__/{utils-D4ddhsBL.mjs → utils-Dt6xdGol.mjs} +10 -2
- package/__chunks__/{utils-DIF5XAA2.js → utils-eHk7b-OB.js} +8 -0
- package/package.json +1 -1
- package/style.css +1609 -1445
- package/utilities/storybook.d.ts +1 -0
- package/utilities/storybook.d.ts.map +1 -1
|
@@ -5,10 +5,6 @@ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
|
5
5
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
-
var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
9
|
-
var __typeError = (msg) => {
|
|
10
|
-
throw TypeError(msg);
|
|
11
|
-
};
|
|
12
8
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
9
|
var __spreadValues = (a, b) => {
|
|
14
10
|
for (var prop in b || (b = {}))
|
|
@@ -22,92 +18,10 @@ var __spreadValues = (a, b) => {
|
|
|
22
18
|
return a;
|
|
23
19
|
};
|
|
24
20
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
-
var __await = function(promise, isYieldStar) {
|
|
26
|
-
this[0] = promise;
|
|
27
|
-
this[1] = isYieldStar;
|
|
28
|
-
};
|
|
29
|
-
var __yieldStar = (value) => {
|
|
30
|
-
var obj = value[__knownSymbol("asyncIterator")], isAwait = false, method, it = {};
|
|
31
|
-
if (obj == null) {
|
|
32
|
-
obj = value[__knownSymbol("iterator")]();
|
|
33
|
-
method = (k) => it[k] = (x) => obj[k](x);
|
|
34
|
-
} else {
|
|
35
|
-
obj = obj.call(value);
|
|
36
|
-
method = (k) => it[k] = (v) => {
|
|
37
|
-
if (isAwait) {
|
|
38
|
-
isAwait = false;
|
|
39
|
-
if (k === "throw") throw v;
|
|
40
|
-
return v;
|
|
41
|
-
}
|
|
42
|
-
isAwait = true;
|
|
43
|
-
return {
|
|
44
|
-
done: false,
|
|
45
|
-
value: new __await(new Promise((resolve) => {
|
|
46
|
-
var x = obj[k](v);
|
|
47
|
-
if (!(x instanceof Object)) __typeError("Object expected");
|
|
48
|
-
resolve(x);
|
|
49
|
-
}), 1)
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
return it[__knownSymbol("iterator")] = () => it, method("next"), "throw" in obj ? method("throw") : it.throw = (x) => {
|
|
54
|
-
throw x;
|
|
55
|
-
}, "return" in obj && method("return"), it;
|
|
56
|
-
};
|
|
57
|
-
const React = require("react");
|
|
58
|
-
const SelectionManager = require("./SelectionManager-DuX6geJg.js");
|
|
59
21
|
const mergeProps = require("./mergeProps-DniMwM6P.js");
|
|
60
22
|
const useLocalizedStringFormatter = require("./useLocalizedStringFormatter-CaF1VsOH.js");
|
|
61
23
|
const useSelectableItem = require("./useSelectableItem-DpEX9QBc.js");
|
|
62
24
|
const useOverlayTrigger = require("./useOverlayTrigger-Dp7RXQ9B.js");
|
|
63
|
-
const filterDOMProps = require("./filterDOMProps-D3iOHP0H.js");
|
|
64
|
-
const useResizeObserver = require("./useResizeObserver-BsbT3mjh.js");
|
|
65
|
-
function $9fc4852771d079eb$var$Section(props) {
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
$9fc4852771d079eb$var$Section.getCollectionNode = function* getCollectionNode(props) {
|
|
69
|
-
let { children, title, items } = props;
|
|
70
|
-
yield {
|
|
71
|
-
type: "section",
|
|
72
|
-
props,
|
|
73
|
-
hasChildNodes: true,
|
|
74
|
-
rendered: title,
|
|
75
|
-
"aria-label": props["aria-label"],
|
|
76
|
-
*childNodes() {
|
|
77
|
-
if (typeof children === "function") {
|
|
78
|
-
if (!items) throw new Error("props.children was a function but props.items is missing");
|
|
79
|
-
for (let item of items) yield {
|
|
80
|
-
type: "item",
|
|
81
|
-
value: item,
|
|
82
|
-
renderer: children
|
|
83
|
-
};
|
|
84
|
-
} else {
|
|
85
|
-
let items2 = [];
|
|
86
|
-
React.Children.forEach(children, (child) => {
|
|
87
|
-
items2.push({
|
|
88
|
-
type: "item",
|
|
89
|
-
element: child
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
yield* __yieldStar(items2);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
let $9fc4852771d079eb$export$6e2c8f0811a474ce = $9fc4852771d079eb$var$Section;
|
|
98
|
-
const $453cc9f0df89c0a5$var$cache = /* @__PURE__ */ new WeakMap();
|
|
99
|
-
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
|
|
100
|
-
let count = $453cc9f0df89c0a5$var$cache.get(collection);
|
|
101
|
-
if (count != null) return count;
|
|
102
|
-
let counter = 0;
|
|
103
|
-
let countItems = (items) => {
|
|
104
|
-
for (let item of items) if (item.type === "section") countItems(SelectionManager.$c5a24bc478652b5f$export$1005530eda016c13(item, collection));
|
|
105
|
-
else counter++;
|
|
106
|
-
};
|
|
107
|
-
countItems(collection);
|
|
108
|
-
$453cc9f0df89c0a5$var$cache.set(collection, counter);
|
|
109
|
-
return counter;
|
|
110
|
-
}
|
|
111
25
|
var $c0398ad35c3639b7$exports = {};
|
|
112
26
|
$c0398ad35c3639b7$exports = {
|
|
113
27
|
"longPressMessage": `اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة`
|
|
@@ -346,45 +260,4 @@ function $168583247155ddda$export$dc9c12ed27dd1b49(props, state, ref) {
|
|
|
346
260
|
})
|
|
347
261
|
};
|
|
348
262
|
}
|
|
349
|
-
function $f4b273590fab9f93$export$52210f68a14655d0(props) {
|
|
350
|
-
let domProps = filterDOMProps.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
351
|
-
labelable: true
|
|
352
|
-
});
|
|
353
|
-
let ariaOrientation;
|
|
354
|
-
if (props.orientation === "vertical") ariaOrientation = "vertical";
|
|
355
|
-
if (props.elementType !== "hr") return {
|
|
356
|
-
separatorProps: __spreadProps(__spreadValues({}, domProps), {
|
|
357
|
-
role: "separator",
|
|
358
|
-
"aria-orientation": ariaOrientation
|
|
359
|
-
})
|
|
360
|
-
};
|
|
361
|
-
return {
|
|
362
|
-
separatorProps: domProps
|
|
363
|
-
};
|
|
364
|
-
}
|
|
365
|
-
function useTriggerWidth(triggerRef) {
|
|
366
|
-
const [triggerWidth, setTriggerWidth] = React.useState(null);
|
|
367
|
-
useResizeObserver.$9daab02d461809db$export$683480f191c0e3ea({
|
|
368
|
-
ref: triggerRef,
|
|
369
|
-
onResize: () => {
|
|
370
|
-
if (triggerRef.current) {
|
|
371
|
-
const { width } = triggerRef.current.getBoundingClientRect();
|
|
372
|
-
setTriggerWidth(width);
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
});
|
|
376
|
-
const initialRef = React.useRef(false);
|
|
377
|
-
React.useEffect(() => {
|
|
378
|
-
if (triggerRef.current && !initialRef.current) {
|
|
379
|
-
const { width } = triggerRef.current.getBoundingClientRect();
|
|
380
|
-
setTriggerWidth(width);
|
|
381
|
-
initialRef.current = true;
|
|
382
|
-
}
|
|
383
|
-
}, [triggerRef]);
|
|
384
|
-
return triggerWidth;
|
|
385
|
-
}
|
|
386
263
|
exports.$168583247155ddda$export$dc9c12ed27dd1b49 = $168583247155ddda$export$dc9c12ed27dd1b49;
|
|
387
|
-
exports.$453cc9f0df89c0a5$export$77d5aafae4e095b2 = $453cc9f0df89c0a5$export$77d5aafae4e095b2;
|
|
388
|
-
exports.$9fc4852771d079eb$export$6e2c8f0811a474ce = $9fc4852771d079eb$export$6e2c8f0811a474ce;
|
|
389
|
-
exports.$f4b273590fab9f93$export$52210f68a14655d0 = $f4b273590fab9f93$export$52210f68a14655d0;
|
|
390
|
-
exports.useTriggerWidth = useTriggerWidth;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { a as $fc909762b330b746$export$61c6a8c84e605fb6 } from "./Overlay-BEmOdNIB.mjs";
|
|
21
|
+
import { useState } from "react";
|
|
22
|
+
function $a28c903ee9ad8dc5$export$79fefeb1c2091ac3(props) {
|
|
23
|
+
let overlayTriggerState = $fc909762b330b746$export$61c6a8c84e605fb6(props);
|
|
24
|
+
let [focusStrategy, setFocusStrategy] = useState(null);
|
|
25
|
+
let [expandedKeysStack, setExpandedKeysStack] = useState([]);
|
|
26
|
+
let closeAll = () => {
|
|
27
|
+
setExpandedKeysStack([]);
|
|
28
|
+
overlayTriggerState.close();
|
|
29
|
+
};
|
|
30
|
+
let openSubmenu = (triggerKey, level) => {
|
|
31
|
+
setExpandedKeysStack((oldStack) => {
|
|
32
|
+
if (level > oldStack.length) return oldStack;
|
|
33
|
+
return [
|
|
34
|
+
...oldStack.slice(0, level),
|
|
35
|
+
triggerKey
|
|
36
|
+
];
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
let closeSubmenu = (triggerKey, level) => {
|
|
40
|
+
setExpandedKeysStack((oldStack) => {
|
|
41
|
+
let key = oldStack[level];
|
|
42
|
+
if (key === triggerKey) return oldStack.slice(0, level);
|
|
43
|
+
else return oldStack;
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
return __spreadProps(__spreadValues({
|
|
47
|
+
focusStrategy
|
|
48
|
+
}, overlayTriggerState), {
|
|
49
|
+
open(focusStrategy2 = null) {
|
|
50
|
+
setFocusStrategy(focusStrategy2);
|
|
51
|
+
overlayTriggerState.open();
|
|
52
|
+
},
|
|
53
|
+
toggle(focusStrategy2 = null) {
|
|
54
|
+
setFocusStrategy(focusStrategy2);
|
|
55
|
+
overlayTriggerState.toggle();
|
|
56
|
+
},
|
|
57
|
+
close() {
|
|
58
|
+
closeAll();
|
|
59
|
+
},
|
|
60
|
+
expandedKeysStack,
|
|
61
|
+
openSubmenu,
|
|
62
|
+
closeSubmenu
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
$a28c903ee9ad8dc5$export$79fefeb1c2091ac3 as $
|
|
67
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
const Overlay = require("./Overlay-Dmwy9VjC.js");
|
|
22
|
+
const React = require("react");
|
|
23
|
+
function $a28c903ee9ad8dc5$export$79fefeb1c2091ac3(props) {
|
|
24
|
+
let overlayTriggerState = Overlay.$fc909762b330b746$export$61c6a8c84e605fb6(props);
|
|
25
|
+
let [focusStrategy, setFocusStrategy] = React.useState(null);
|
|
26
|
+
let [expandedKeysStack, setExpandedKeysStack] = React.useState([]);
|
|
27
|
+
let closeAll = () => {
|
|
28
|
+
setExpandedKeysStack([]);
|
|
29
|
+
overlayTriggerState.close();
|
|
30
|
+
};
|
|
31
|
+
let openSubmenu = (triggerKey, level) => {
|
|
32
|
+
setExpandedKeysStack((oldStack) => {
|
|
33
|
+
if (level > oldStack.length) return oldStack;
|
|
34
|
+
return [
|
|
35
|
+
...oldStack.slice(0, level),
|
|
36
|
+
triggerKey
|
|
37
|
+
];
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
let closeSubmenu = (triggerKey, level) => {
|
|
41
|
+
setExpandedKeysStack((oldStack) => {
|
|
42
|
+
let key = oldStack[level];
|
|
43
|
+
if (key === triggerKey) return oldStack.slice(0, level);
|
|
44
|
+
else return oldStack;
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
return __spreadProps(__spreadValues({
|
|
48
|
+
focusStrategy
|
|
49
|
+
}, overlayTriggerState), {
|
|
50
|
+
open(focusStrategy2 = null) {
|
|
51
|
+
setFocusStrategy(focusStrategy2);
|
|
52
|
+
overlayTriggerState.open();
|
|
53
|
+
},
|
|
54
|
+
toggle(focusStrategy2 = null) {
|
|
55
|
+
setFocusStrategy(focusStrategy2);
|
|
56
|
+
overlayTriggerState.toggle();
|
|
57
|
+
},
|
|
58
|
+
close() {
|
|
59
|
+
closeAll();
|
|
60
|
+
},
|
|
61
|
+
expandedKeysStack,
|
|
62
|
+
openSubmenu,
|
|
63
|
+
closeSubmenu
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
exports.$a28c903ee9ad8dc5$export$79fefeb1c2091ac3 = $a28c903ee9ad8dc5$export$79fefeb1c2091ac3;
|
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { $ as $a11501f3d1d39e6c$export$ea8f71083e90600f, a as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18, b as $5e3802645cc19319$export$1c3ebcada18427bf } from "./ariaHideOutside-CxWZQtI1.mjs";
|
|
21
|
-
import {
|
|
21
|
+
import { b as $337b884510726a0d$export$14c98a7594375490 } from "./Overlay-BEmOdNIB.mjs";
|
|
22
22
|
import { $ as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./mergeProps-DSi85raC.mjs";
|
|
23
23
|
import { useEffect } from "react";
|
|
24
24
|
function $8ac8429251c45e4b$export$dbc0f175b25fb0fb(props, state, ref) {
|
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { d as $c87311424ea30a05$export$78551043582a6a98 } from "./isVirtualEvent-BPCuFO54.mjs";
|
|
21
21
|
import { $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4 } from "./number-CLRm_tTs.mjs";
|
|
22
|
-
import {
|
|
22
|
+
import { c as $dd149f63282afbbf$export$18fc8428861184da } from "./Overlay-BEmOdNIB.mjs";
|
|
23
23
|
import { useState, useRef, useEffect, useCallback } from "react";
|
|
24
24
|
import { d as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c } from "./mergeProps-DSi85raC.mjs";
|
|
25
25
|
import { $ as $9daab02d461809db$export$683480f191c0e3ea } from "./useResizeObserver-Dyb4wvuA.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as $dd149f63282afbbf$export$f6211563215e3b37 } from "./Overlay-
|
|
1
|
+
import { $ as $dd149f63282afbbf$export$f6211563215e3b37 } from "./Overlay-BEmOdNIB.mjs";
|
|
2
2
|
import { useEffect } from "react";
|
|
3
3
|
import { c as $bdb11010cef70236$export$f680877a34711e37 } from "./mergeProps-DSi85raC.mjs";
|
|
4
4
|
function $628037886ba31236$export$f9d5c8beee7d008d(props, state, ref) {
|
|
@@ -532,8 +532,8 @@ function $880e95eb8b93ba9a$var$isSelectionKey() {
|
|
|
532
532
|
return (event === null || event === void 0 ? void 0 : event.key) === " " || (event === null || event === void 0 ? void 0 : event.code) === "Space";
|
|
533
533
|
}
|
|
534
534
|
export {
|
|
535
|
-
$
|
|
536
|
-
$
|
|
535
|
+
$880e95eb8b93ba9a$export$ecf600387e221c37 as $,
|
|
536
|
+
$ae20dd8cbca75726$export$d6daf82dcd84e87c as a,
|
|
537
537
|
$fb3050f43d946246$export$e32c88dfddc6e1d8 as b,
|
|
538
538
|
$8a26561d2877236e$export$c24ed0104d07eab9 as c
|
|
539
539
|
};
|
|
@@ -18,10 +18,24 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
return a;
|
|
19
19
|
};
|
|
20
20
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
const SelectionManager = require("./SelectionManager-DuX6geJg.js");
|
|
21
22
|
const useSelectableItem = require("./useSelectableItem-DpEX9QBc.js");
|
|
22
23
|
const isScrollable = require("./isScrollable-CE3Xdlg4.js");
|
|
23
24
|
const useCollator = require("./useCollator-DGrSWVh4.js");
|
|
24
25
|
const React = require("react");
|
|
26
|
+
const $453cc9f0df89c0a5$var$cache = /* @__PURE__ */ new WeakMap();
|
|
27
|
+
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
|
|
28
|
+
let count = $453cc9f0df89c0a5$var$cache.get(collection);
|
|
29
|
+
if (count != null) return count;
|
|
30
|
+
let counter = 0;
|
|
31
|
+
let countItems = (items) => {
|
|
32
|
+
for (let item of items) if (item.type === "section") countItems(SelectionManager.$c5a24bc478652b5f$export$1005530eda016c13(item, collection));
|
|
33
|
+
else counter++;
|
|
34
|
+
};
|
|
35
|
+
countItems(collection);
|
|
36
|
+
$453cc9f0df89c0a5$var$cache.set(collection, counter);
|
|
37
|
+
return counter;
|
|
38
|
+
}
|
|
25
39
|
class $657e4dc4a6e88df0$export$8f5ed9ff9f511381 {
|
|
26
40
|
getItemRect(key) {
|
|
27
41
|
let container = this.ref.current;
|
|
@@ -260,5 +274,6 @@ function $982254629710d113$export$b95089534ab7c1fd(props) {
|
|
|
260
274
|
};
|
|
261
275
|
}
|
|
262
276
|
exports.$2a25aae57d74318e$export$a05409b8bb224a5a = $2a25aae57d74318e$export$a05409b8bb224a5a;
|
|
277
|
+
exports.$453cc9f0df89c0a5$export$77d5aafae4e095b2 = $453cc9f0df89c0a5$export$77d5aafae4e095b2;
|
|
263
278
|
exports.$657e4dc4a6e88df0$export$8f5ed9ff9f511381 = $657e4dc4a6e88df0$export$8f5ed9ff9f511381;
|
|
264
279
|
exports.$982254629710d113$export$b95089534ab7c1fd = $982254629710d113$export$b95089534ab7c1fd;
|
|
@@ -17,10 +17,24 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import {
|
|
20
|
+
import { c as $c5a24bc478652b5f$export$1005530eda016c13 } from "./SelectionManager-DCO_d3m1.mjs";
|
|
21
|
+
import { a as $ae20dd8cbca75726$export$d6daf82dcd84e87c } from "./useSelectableItem-B8l2VAQ8.mjs";
|
|
21
22
|
import { $ as $cc38e7bd3fc7b213$export$2bb74740c4e19def } from "./isScrollable-DwbLAiO0.mjs";
|
|
22
23
|
import { $ as $325a3faab7a68acd$export$a16aca283550c30d } from "./useCollator-B-keb3wA.mjs";
|
|
23
24
|
import { useMemo } from "react";
|
|
25
|
+
const $453cc9f0df89c0a5$var$cache = /* @__PURE__ */ new WeakMap();
|
|
26
|
+
function $453cc9f0df89c0a5$export$77d5aafae4e095b2(collection) {
|
|
27
|
+
let count = $453cc9f0df89c0a5$var$cache.get(collection);
|
|
28
|
+
if (count != null) return count;
|
|
29
|
+
let counter = 0;
|
|
30
|
+
let countItems = (items) => {
|
|
31
|
+
for (let item of items) if (item.type === "section") countItems($c5a24bc478652b5f$export$1005530eda016c13(item, collection));
|
|
32
|
+
else counter++;
|
|
33
|
+
};
|
|
34
|
+
countItems(collection);
|
|
35
|
+
$453cc9f0df89c0a5$var$cache.set(collection, counter);
|
|
36
|
+
return counter;
|
|
37
|
+
}
|
|
24
38
|
class $657e4dc4a6e88df0$export$8f5ed9ff9f511381 {
|
|
25
39
|
getItemRect(key) {
|
|
26
40
|
let container = this.ref.current;
|
|
@@ -260,6 +274,7 @@ function $982254629710d113$export$b95089534ab7c1fd(props) {
|
|
|
260
274
|
}
|
|
261
275
|
export {
|
|
262
276
|
$982254629710d113$export$b95089534ab7c1fd as $,
|
|
263
|
-
$
|
|
264
|
-
$
|
|
277
|
+
$453cc9f0df89c0a5$export$77d5aafae4e095b2 as a,
|
|
278
|
+
$2a25aae57d74318e$export$a05409b8bb224a5a as b,
|
|
279
|
+
$657e4dc4a6e88df0$export$8f5ed9ff9f511381 as c
|
|
265
280
|
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
const React = require("react");
|
|
22
|
+
const isVirtualEvent = require("./isVirtualEvent-DwoP1rNI.js");
|
|
23
|
+
const mergeProps = require("./mergeProps-DniMwM6P.js");
|
|
24
|
+
const filterDOMProps = require("./filterDOMProps-D3iOHP0H.js");
|
|
25
|
+
const useFormReset = require("./useFormReset-Bgj93eR3.js");
|
|
26
|
+
const useControlledState = require("./useControlledState-mnKBd6Uc.js");
|
|
27
|
+
const useField = require("./useField-BJW_bXVD.js");
|
|
28
|
+
const useFocusable = require("./useFocusable-8kJcp2yc.js");
|
|
29
|
+
const useFormValidation = require("./useFormValidation-DYz5WFze.js");
|
|
30
|
+
function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
31
|
+
let { inputElementType = "input", isDisabled = false, isRequired = false, isReadOnly = false, type = "text", validationBehavior = "aria" } = props;
|
|
32
|
+
let [value, setValue] = useControlledState.$458b0a5536c1a7cf$export$40bfa8c7b0832715(props.value, props.defaultValue || "", props.onChange);
|
|
33
|
+
let { focusableProps } = useFocusable.$e6afbd83fe6ebbd2$export$4c014de7c8940b4c(props, ref);
|
|
34
|
+
let validationState = useFormValidation.$e5be200c675c3b3a$export$fc1a364ae1f3ff10(__spreadProps(__spreadValues({}, props), {
|
|
35
|
+
value
|
|
36
|
+
}));
|
|
37
|
+
let { isInvalid, validationErrors, validationDetails } = validationState.displayValidation;
|
|
38
|
+
let { labelProps, fieldProps, descriptionProps, errorMessageProps } = useField.$2baaea4c71418dea$export$294aa081a6c6f55d(__spreadProps(__spreadValues({}, props), {
|
|
39
|
+
isInvalid,
|
|
40
|
+
errorMessage: props.errorMessage || validationErrors
|
|
41
|
+
}));
|
|
42
|
+
let domProps = filterDOMProps.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
43
|
+
labelable: true
|
|
44
|
+
});
|
|
45
|
+
const inputOnlyProps = {
|
|
46
|
+
type,
|
|
47
|
+
pattern: props.pattern
|
|
48
|
+
};
|
|
49
|
+
useFormReset.$99facab73266f662$export$5add1d006293d136(ref, value, setValue);
|
|
50
|
+
useFormValidation.$e93e671b31057976$export$b8473d3665f3a75a(props, validationState, ref);
|
|
51
|
+
React.useEffect(() => {
|
|
52
|
+
if (ref.current instanceof isVirtualEvent.$431fbd86ca7dc216$export$f21a1ffae260145a(ref.current).HTMLTextAreaElement) {
|
|
53
|
+
let input = ref.current;
|
|
54
|
+
Object.defineProperty(input, "defaultValue", {
|
|
55
|
+
get: () => input.value,
|
|
56
|
+
set: () => {
|
|
57
|
+
},
|
|
58
|
+
configurable: true
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}, [
|
|
62
|
+
ref
|
|
63
|
+
]);
|
|
64
|
+
return {
|
|
65
|
+
labelProps,
|
|
66
|
+
inputProps: mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(domProps, inputElementType === "input" ? inputOnlyProps : void 0, __spreadValues(__spreadValues({
|
|
67
|
+
disabled: isDisabled,
|
|
68
|
+
readOnly: isReadOnly,
|
|
69
|
+
required: isRequired && validationBehavior === "native",
|
|
70
|
+
"aria-required": isRequired && validationBehavior === "aria" || void 0,
|
|
71
|
+
"aria-invalid": isInvalid || void 0,
|
|
72
|
+
"aria-errormessage": props["aria-errormessage"],
|
|
73
|
+
"aria-activedescendant": props["aria-activedescendant"],
|
|
74
|
+
"aria-autocomplete": props["aria-autocomplete"],
|
|
75
|
+
"aria-haspopup": props["aria-haspopup"],
|
|
76
|
+
value,
|
|
77
|
+
onChange: (e) => setValue(e.target.value),
|
|
78
|
+
autoComplete: props.autoComplete,
|
|
79
|
+
autoCapitalize: props.autoCapitalize,
|
|
80
|
+
maxLength: props.maxLength,
|
|
81
|
+
minLength: props.minLength,
|
|
82
|
+
name: props.name,
|
|
83
|
+
placeholder: props.placeholder,
|
|
84
|
+
inputMode: props.inputMode,
|
|
85
|
+
// Clipboard events
|
|
86
|
+
onCopy: props.onCopy,
|
|
87
|
+
onCut: props.onCut,
|
|
88
|
+
onPaste: props.onPaste,
|
|
89
|
+
// Composition events
|
|
90
|
+
onCompositionEnd: props.onCompositionEnd,
|
|
91
|
+
onCompositionStart: props.onCompositionStart,
|
|
92
|
+
onCompositionUpdate: props.onCompositionUpdate,
|
|
93
|
+
// Selection events
|
|
94
|
+
onSelect: props.onSelect,
|
|
95
|
+
// Input events
|
|
96
|
+
onBeforeInput: props.onBeforeInput,
|
|
97
|
+
onInput: props.onInput
|
|
98
|
+
}, focusableProps), fieldProps)),
|
|
99
|
+
descriptionProps,
|
|
100
|
+
errorMessageProps,
|
|
101
|
+
isInvalid,
|
|
102
|
+
validationErrors,
|
|
103
|
+
validationDetails
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
exports.$2d73ec29415bd339$export$712718f7aec83d5 = $2d73ec29415bd339$export$712718f7aec83d5;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { useEffect } from "react";
|
|
21
|
+
import { a as $431fbd86ca7dc216$export$f21a1ffae260145a } from "./isVirtualEvent-BPCuFO54.mjs";
|
|
22
|
+
import { $ as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./mergeProps-DSi85raC.mjs";
|
|
23
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.mjs";
|
|
24
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "./useFormReset-DA1Lwdha.mjs";
|
|
25
|
+
import { $ as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useControlledState-CFWhSD5C.mjs";
|
|
26
|
+
import { $ as $2baaea4c71418dea$export$294aa081a6c6f55d } from "./useField-B6VplZ_n.mjs";
|
|
27
|
+
import { $ as $e6afbd83fe6ebbd2$export$4c014de7c8940b4c } from "./useFocusable-CNor_Zjt.mjs";
|
|
28
|
+
import { $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, a as $e93e671b31057976$export$b8473d3665f3a75a } from "./useFormValidation-B3euLzzR.mjs";
|
|
29
|
+
function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
30
|
+
let { inputElementType = "input", isDisabled = false, isRequired = false, isReadOnly = false, type = "text", validationBehavior = "aria" } = props;
|
|
31
|
+
let [value, setValue] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(props.value, props.defaultValue || "", props.onChange);
|
|
32
|
+
let { focusableProps } = $e6afbd83fe6ebbd2$export$4c014de7c8940b4c(props, ref);
|
|
33
|
+
let validationState = $e5be200c675c3b3a$export$fc1a364ae1f3ff10(__spreadProps(__spreadValues({}, props), {
|
|
34
|
+
value
|
|
35
|
+
}));
|
|
36
|
+
let { isInvalid, validationErrors, validationDetails } = validationState.displayValidation;
|
|
37
|
+
let { labelProps, fieldProps, descriptionProps, errorMessageProps } = $2baaea4c71418dea$export$294aa081a6c6f55d(__spreadProps(__spreadValues({}, props), {
|
|
38
|
+
isInvalid,
|
|
39
|
+
errorMessage: props.errorMessage || validationErrors
|
|
40
|
+
}));
|
|
41
|
+
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
42
|
+
labelable: true
|
|
43
|
+
});
|
|
44
|
+
const inputOnlyProps = {
|
|
45
|
+
type,
|
|
46
|
+
pattern: props.pattern
|
|
47
|
+
};
|
|
48
|
+
$99facab73266f662$export$5add1d006293d136(ref, value, setValue);
|
|
49
|
+
$e93e671b31057976$export$b8473d3665f3a75a(props, validationState, ref);
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (ref.current instanceof $431fbd86ca7dc216$export$f21a1ffae260145a(ref.current).HTMLTextAreaElement) {
|
|
52
|
+
let input = ref.current;
|
|
53
|
+
Object.defineProperty(input, "defaultValue", {
|
|
54
|
+
get: () => input.value,
|
|
55
|
+
set: () => {
|
|
56
|
+
},
|
|
57
|
+
configurable: true
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}, [
|
|
61
|
+
ref
|
|
62
|
+
]);
|
|
63
|
+
return {
|
|
64
|
+
labelProps,
|
|
65
|
+
inputProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, inputElementType === "input" ? inputOnlyProps : void 0, __spreadValues(__spreadValues({
|
|
66
|
+
disabled: isDisabled,
|
|
67
|
+
readOnly: isReadOnly,
|
|
68
|
+
required: isRequired && validationBehavior === "native",
|
|
69
|
+
"aria-required": isRequired && validationBehavior === "aria" || void 0,
|
|
70
|
+
"aria-invalid": isInvalid || void 0,
|
|
71
|
+
"aria-errormessage": props["aria-errormessage"],
|
|
72
|
+
"aria-activedescendant": props["aria-activedescendant"],
|
|
73
|
+
"aria-autocomplete": props["aria-autocomplete"],
|
|
74
|
+
"aria-haspopup": props["aria-haspopup"],
|
|
75
|
+
value,
|
|
76
|
+
onChange: (e) => setValue(e.target.value),
|
|
77
|
+
autoComplete: props.autoComplete,
|
|
78
|
+
autoCapitalize: props.autoCapitalize,
|
|
79
|
+
maxLength: props.maxLength,
|
|
80
|
+
minLength: props.minLength,
|
|
81
|
+
name: props.name,
|
|
82
|
+
placeholder: props.placeholder,
|
|
83
|
+
inputMode: props.inputMode,
|
|
84
|
+
// Clipboard events
|
|
85
|
+
onCopy: props.onCopy,
|
|
86
|
+
onCut: props.onCut,
|
|
87
|
+
onPaste: props.onPaste,
|
|
88
|
+
// Composition events
|
|
89
|
+
onCompositionEnd: props.onCompositionEnd,
|
|
90
|
+
onCompositionStart: props.onCompositionStart,
|
|
91
|
+
onCompositionUpdate: props.onCompositionUpdate,
|
|
92
|
+
// Selection events
|
|
93
|
+
onSelect: props.onSelect,
|
|
94
|
+
// Input events
|
|
95
|
+
onBeforeInput: props.onBeforeInput,
|
|
96
|
+
onInput: props.onInput
|
|
97
|
+
}, focusableProps), fieldProps)),
|
|
98
|
+
descriptionProps,
|
|
99
|
+
errorMessageProps,
|
|
100
|
+
isInvalid,
|
|
101
|
+
validationErrors,
|
|
102
|
+
validationDetails
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
export {
|
|
106
|
+
$2d73ec29415bd339$export$712718f7aec83d5 as $
|
|
107
|
+
};
|