@easypost/easy-ui 1.0.0-alpha.64 → 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 +14 -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-SuH-KkYi.js → Button-CVaEK94Q.js} +18 -18
- package/__chunks__/{Button-DfkicQp7.mjs → Button-CVbi-24J.mjs} +18 -18
- package/__chunks__/{Button-BvLvcmfd.js → Button-Y550ybuK.js} +1 -1
- package/__chunks__/{Calendar-CB3kTGpr.mjs → Calendar-C2JlXaSY.mjs} +1 -1
- package/__chunks__/{Calendar-D5V31Ypy.js → Calendar-CmF_v-Dn.js} +1 -1
- package/__chunks__/{CalendarBase-CIkCiMYk.js → CalendarBase-Cavy4k_H.js} +18 -18
- package/__chunks__/{CalendarBase-Cq-ReOPx.mjs → CalendarBase-aeU9JZC2.mjs} +18 -18
- package/__chunks__/{Card-BKC3iEwF.mjs → Card-B5c1vM8E.mjs} +12 -12
- package/__chunks__/{Card-BGmLybqD.js → Card-BHZOcCVB.js} +12 -12
- package/__chunks__/{Checkbox-B-c8_oGX.js → Checkbox-BmtLwm3J.js} +19 -19
- package/__chunks__/{Checkbox-AbvJCEnW.mjs → Checkbox-IhSMESiF.mjs} +20 -20
- package/__chunks__/{CodeSnippet-CzP6GP8p.mjs → CodeSnippet-DA3SuGi9.mjs} +2 -2
- package/__chunks__/{CodeSnippet-D9Gfaozc.js → CodeSnippet-HAojQDBb.js} +2 -2
- package/__chunks__/{DatePickerBase-DVe9Z17z.mjs → DatePickerBase-DYuliQ2j.mjs} +20 -64
- package/__chunks__/{DatePickerBase-BW867uS-.js → DatePickerBase-PqJZhPW5.js} +18 -62
- package/__chunks__/Dialog-CFyC5TFs.js +232 -0
- package/__chunks__/Dialog-DnCSZh3s.mjs +233 -0
- package/__chunks__/{HelpMenu-BikR3il4.js → HelpMenu-DttT1pkc.js} +6 -6
- package/__chunks__/{HelpMenu-ylsZtQ2y.mjs → HelpMenu-dPaIsmEG.mjs} +6 -6
- package/__chunks__/{HorizontalGrid-7W4Y5Vah.js → HorizontalGrid-BFqXCljf.js} +1 -1
- package/__chunks__/{HorizontalGrid-B399c2dw.mjs → HorizontalGrid-CyBrrh6k.mjs} +1 -1
- package/__chunks__/{HorizontalStack-Bz49rrqk.js → HorizontalStack-BG-lZii5.js} +1 -1
- package/__chunks__/{HorizontalStack-9tVfFqP2.mjs → HorizontalStack-p9m9muAJ.mjs} +1 -1
- package/__chunks__/{Icon-AWZqgFkO.js → Icon-BHbBKuGB.js} +2 -2
- package/__chunks__/{Icon-tvIiMl4h.mjs → Icon-ZRjQkfey.mjs} +2 -2
- package/__chunks__/{InputCaption-DMwqCmEY.js → InputCaption-BQw7pLl1.js} +2 -2
- package/__chunks__/{InputCaption-BPHL8W55.mjs → InputCaption-DE7SnGJr.mjs} +2 -2
- package/__chunks__/{InputField-LUuwaWK6.mjs → InputField-1toY1X94.mjs} +6 -89
- package/__chunks__/{InputField-BBG9VjEM.js → InputField-e2dBsTrQ.js} +6 -89
- package/__chunks__/{InputIcon-C6fRUjFn.mjs → InputIcon-CKwsgYvg.mjs} +31 -31
- package/__chunks__/{InputIcon-BOj4dVSh.js → InputIcon-DM19rdNu.js} +31 -31
- package/__chunks__/{KebabButton-DXxpDShY.js → KebabButton-3APOVOtc.js} +4 -4
- package/__chunks__/{KebabButton-DdERbhKc.mjs → KebabButton-CGvwEB3q.mjs} +4 -4
- package/__chunks__/{Menu-BtQxi784.js → Menu-90Db_wYM.js} +22 -62
- package/__chunks__/{Menu-CGSgffvA.mjs → Menu-D7JiGJt4.mjs} +22 -62
- package/__chunks__/{Notification-sLPjuMls.mjs → Notification-C4gEE6IM.mjs} +14 -14
- package/__chunks__/{Notification-CTV7jwBV.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-jGUuixrB.mjs → RadioGroup-DPJOnxCi.mjs} +16 -16
- package/__chunks__/{RadioGroup-CN_RSlFy.js → RadioGroup-Qn2c29rT.js} +15 -15
- package/__chunks__/{RangeCalendar-D5fz339R.mjs → RangeCalendar-BNySCRAa.mjs} +1 -1
- package/__chunks__/{RangeCalendar-odwkDlEn.js → RangeCalendar-lhIzCnWl.js} +1 -1
- package/__chunks__/{SelectOverlay-BegZKkp1.js → SelectOverlay-CoOED545.js} +28 -188
- package/__chunks__/{SelectOverlay-CoSQv1a0.mjs → SelectOverlay-D12QgA_I.mjs} +29 -189
- package/__chunks__/{SelectorErrorTooltip-DT7rcGh6.js → SelectorErrorTooltip-CNinvIcU.js} +4 -4
- package/__chunks__/{SelectorErrorTooltip-By-GwbSg.mjs → SelectorErrorTooltip-Cz7Uw_O_.mjs} +4 -4
- package/__chunks__/{Spinner-dtD1VQqy.mjs → Spinner-Co64ezt-.mjs} +5 -5
- package/__chunks__/{Spinner-nHnby3-R.js → Spinner-DTH0xdij.js} +5 -5
- package/__chunks__/{Stepper-vfWux5uh.js → Stepper-DqcfNOrn.js} +25 -25
- package/__chunks__/{Stepper-DCWfT6Sx.mjs → Stepper-OFWKfhi3.mjs} +25 -25
- package/__chunks__/{TabNav-BRBhGNv8.mjs → TabNav-B44TuB70.mjs} +1 -1
- package/__chunks__/{TabNav-BJUikM9a.js → TabNav-DzF57oTN.js} +1 -1
- package/__chunks__/{Tabs-Do2OPQch.mjs → Tabs-ClOwavjv.mjs} +17 -17
- package/__chunks__/{Tabs-DX6oanPk.js → Tabs-CsxDAl1X.js} +17 -17
- package/__chunks__/{Text-DM6H1mZu.js → Text-BwXTDw77.js} +34 -34
- package/__chunks__/{Text-DLBOW0Eu.mjs → Text-DYLBjpe-.mjs} +34 -34
- package/__chunks__/{TextField-BmHD0Ts_.mjs → TextField-DVWDMYaM.mjs} +1 -1
- package/__chunks__/{TextField-DN6oGeBc.js → TextField-YD_1oSnk.js} +1 -1
- package/__chunks__/{Toggle-CDwSjy-c.mjs → Toggle-DiK1wHdG.mjs} +11 -11
- package/__chunks__/{Toggle-CkJcayVz.js → Toggle-gPKUf7QS.js} +11 -11
- package/__chunks__/{Tooltip-CSsijgRV.mjs → Tooltip-BX_C7x_7.mjs} +10 -10
- package/__chunks__/{Tooltip-U0vMQeot.js → Tooltip-DPZMv6Ia.js} +8 -8
- package/__chunks__/{VerticalStack-1CrrssEd.mjs → VerticalStack-C466n8W1.mjs} +3 -3
- package/__chunks__/{VerticalStack-D25ZR-UD.js → VerticalStack-DIpmkisq.js} +3 -3
- package/__chunks__/{useDialog-c-C07qhw.mjs → useDialog-h-MPfyGr.mjs} +1 -1
- package/__chunks__/{useEdgeInterceptors-DM6DGJVL.mjs → useEdgeInterceptors-BORL2txk.mjs} +5 -5
- package/__chunks__/{useEdgeInterceptors-g_iE4uY5.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 +2 -2
- package/style.css +1609 -1444
- package/utilities/storybook.d.ts +1 -0
- package/utilities/storybook.d.ts.map +1 -1
|
@@ -0,0 +1,132 @@
|
|
|
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 __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
9
|
+
var __typeError = (msg) => {
|
|
10
|
+
throw TypeError(msg);
|
|
11
|
+
};
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
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 filterDOMProps = require("./filterDOMProps-D3iOHP0H.js");
|
|
59
|
+
const useResizeObserver = require("./useResizeObserver-BsbT3mjh.js");
|
|
60
|
+
function $9fc4852771d079eb$var$Section(props) {
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
$9fc4852771d079eb$var$Section.getCollectionNode = function* getCollectionNode(props) {
|
|
64
|
+
let { children, title, items } = props;
|
|
65
|
+
yield {
|
|
66
|
+
type: "section",
|
|
67
|
+
props,
|
|
68
|
+
hasChildNodes: true,
|
|
69
|
+
rendered: title,
|
|
70
|
+
"aria-label": props["aria-label"],
|
|
71
|
+
*childNodes() {
|
|
72
|
+
if (typeof children === "function") {
|
|
73
|
+
if (!items) throw new Error("props.children was a function but props.items is missing");
|
|
74
|
+
for (let item of items) yield {
|
|
75
|
+
type: "item",
|
|
76
|
+
value: item,
|
|
77
|
+
renderer: children
|
|
78
|
+
};
|
|
79
|
+
} else {
|
|
80
|
+
let items2 = [];
|
|
81
|
+
React.Children.forEach(children, (child) => {
|
|
82
|
+
items2.push({
|
|
83
|
+
type: "item",
|
|
84
|
+
element: child
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
yield* __yieldStar(items2);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
let $9fc4852771d079eb$export$6e2c8f0811a474ce = $9fc4852771d079eb$var$Section;
|
|
93
|
+
function $f4b273590fab9f93$export$52210f68a14655d0(props) {
|
|
94
|
+
let domProps = filterDOMProps.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
95
|
+
labelable: true
|
|
96
|
+
});
|
|
97
|
+
let ariaOrientation;
|
|
98
|
+
if (props.orientation === "vertical") ariaOrientation = "vertical";
|
|
99
|
+
if (props.elementType !== "hr") return {
|
|
100
|
+
separatorProps: __spreadProps(__spreadValues({}, domProps), {
|
|
101
|
+
role: "separator",
|
|
102
|
+
"aria-orientation": ariaOrientation
|
|
103
|
+
})
|
|
104
|
+
};
|
|
105
|
+
return {
|
|
106
|
+
separatorProps: domProps
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function useTriggerWidth(triggerRef) {
|
|
110
|
+
const [triggerWidth, setTriggerWidth] = React.useState(null);
|
|
111
|
+
useResizeObserver.$9daab02d461809db$export$683480f191c0e3ea({
|
|
112
|
+
ref: triggerRef,
|
|
113
|
+
onResize: () => {
|
|
114
|
+
if (triggerRef.current) {
|
|
115
|
+
const { width } = triggerRef.current.getBoundingClientRect();
|
|
116
|
+
setTriggerWidth(width);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
const initialRef = React.useRef(false);
|
|
121
|
+
React.useEffect(() => {
|
|
122
|
+
if (triggerRef.current && !initialRef.current) {
|
|
123
|
+
const { width } = triggerRef.current.getBoundingClientRect();
|
|
124
|
+
setTriggerWidth(width);
|
|
125
|
+
initialRef.current = true;
|
|
126
|
+
}
|
|
127
|
+
}, [triggerRef]);
|
|
128
|
+
return triggerWidth;
|
|
129
|
+
}
|
|
130
|
+
exports.$9fc4852771d079eb$export$6e2c8f0811a474ce = $9fc4852771d079eb$export$6e2c8f0811a474ce;
|
|
131
|
+
exports.$f4b273590fab9f93$export$52210f68a14655d0 = $f4b273590fab9f93$export$52210f68a14655d0;
|
|
132
|
+
exports.useTriggerWidth = useTriggerWidth;
|
|
@@ -0,0 +1,133 @@
|
|
|
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 __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
|
|
8
|
+
var __typeError = (msg) => {
|
|
9
|
+
throw TypeError(msg);
|
|
10
|
+
};
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __await = function(promise, isYieldStar) {
|
|
25
|
+
this[0] = promise;
|
|
26
|
+
this[1] = isYieldStar;
|
|
27
|
+
};
|
|
28
|
+
var __yieldStar = (value) => {
|
|
29
|
+
var obj = value[__knownSymbol("asyncIterator")], isAwait = false, method, it = {};
|
|
30
|
+
if (obj == null) {
|
|
31
|
+
obj = value[__knownSymbol("iterator")]();
|
|
32
|
+
method = (k) => it[k] = (x) => obj[k](x);
|
|
33
|
+
} else {
|
|
34
|
+
obj = obj.call(value);
|
|
35
|
+
method = (k) => it[k] = (v) => {
|
|
36
|
+
if (isAwait) {
|
|
37
|
+
isAwait = false;
|
|
38
|
+
if (k === "throw") throw v;
|
|
39
|
+
return v;
|
|
40
|
+
}
|
|
41
|
+
isAwait = true;
|
|
42
|
+
return {
|
|
43
|
+
done: false,
|
|
44
|
+
value: new __await(new Promise((resolve) => {
|
|
45
|
+
var x = obj[k](v);
|
|
46
|
+
if (!(x instanceof Object)) __typeError("Object expected");
|
|
47
|
+
resolve(x);
|
|
48
|
+
}), 1)
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
return it[__knownSymbol("iterator")] = () => it, method("next"), "throw" in obj ? method("throw") : it.throw = (x) => {
|
|
53
|
+
throw x;
|
|
54
|
+
}, "return" in obj && method("return"), it;
|
|
55
|
+
};
|
|
56
|
+
import React__default, { useState, useRef, useEffect } from "react";
|
|
57
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.mjs";
|
|
58
|
+
import { $ as $9daab02d461809db$export$683480f191c0e3ea } from "./useResizeObserver-Dyb4wvuA.mjs";
|
|
59
|
+
function $9fc4852771d079eb$var$Section(props) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
$9fc4852771d079eb$var$Section.getCollectionNode = function* getCollectionNode(props) {
|
|
63
|
+
let { children, title, items } = props;
|
|
64
|
+
yield {
|
|
65
|
+
type: "section",
|
|
66
|
+
props,
|
|
67
|
+
hasChildNodes: true,
|
|
68
|
+
rendered: title,
|
|
69
|
+
"aria-label": props["aria-label"],
|
|
70
|
+
*childNodes() {
|
|
71
|
+
if (typeof children === "function") {
|
|
72
|
+
if (!items) throw new Error("props.children was a function but props.items is missing");
|
|
73
|
+
for (let item of items) yield {
|
|
74
|
+
type: "item",
|
|
75
|
+
value: item,
|
|
76
|
+
renderer: children
|
|
77
|
+
};
|
|
78
|
+
} else {
|
|
79
|
+
let items2 = [];
|
|
80
|
+
React__default.Children.forEach(children, (child) => {
|
|
81
|
+
items2.push({
|
|
82
|
+
type: "item",
|
|
83
|
+
element: child
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
yield* __yieldStar(items2);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
let $9fc4852771d079eb$export$6e2c8f0811a474ce = $9fc4852771d079eb$var$Section;
|
|
92
|
+
function $f4b273590fab9f93$export$52210f68a14655d0(props) {
|
|
93
|
+
let domProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
94
|
+
labelable: true
|
|
95
|
+
});
|
|
96
|
+
let ariaOrientation;
|
|
97
|
+
if (props.orientation === "vertical") ariaOrientation = "vertical";
|
|
98
|
+
if (props.elementType !== "hr") return {
|
|
99
|
+
separatorProps: __spreadProps(__spreadValues({}, domProps), {
|
|
100
|
+
role: "separator",
|
|
101
|
+
"aria-orientation": ariaOrientation
|
|
102
|
+
})
|
|
103
|
+
};
|
|
104
|
+
return {
|
|
105
|
+
separatorProps: domProps
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function useTriggerWidth(triggerRef) {
|
|
109
|
+
const [triggerWidth, setTriggerWidth] = useState(null);
|
|
110
|
+
$9daab02d461809db$export$683480f191c0e3ea({
|
|
111
|
+
ref: triggerRef,
|
|
112
|
+
onResize: () => {
|
|
113
|
+
if (triggerRef.current) {
|
|
114
|
+
const { width } = triggerRef.current.getBoundingClientRect();
|
|
115
|
+
setTriggerWidth(width);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
const initialRef = useRef(false);
|
|
120
|
+
useEffect(() => {
|
|
121
|
+
if (triggerRef.current && !initialRef.current) {
|
|
122
|
+
const { width } = triggerRef.current.getBoundingClientRect();
|
|
123
|
+
setTriggerWidth(width);
|
|
124
|
+
initialRef.current = true;
|
|
125
|
+
}
|
|
126
|
+
}, [triggerRef]);
|
|
127
|
+
return triggerWidth;
|
|
128
|
+
}
|
|
129
|
+
export {
|
|
130
|
+
$9fc4852771d079eb$export$6e2c8f0811a474ce as $,
|
|
131
|
+
$f4b273590fab9f93$export$52210f68a14655d0 as a,
|
|
132
|
+
useTriggerWidth as u
|
|
133
|
+
};
|
|
@@ -274,6 +274,9 @@ const Y_PADDING_INSIDE_OVERLAY = 8;
|
|
|
274
274
|
const OVERLAY_OFFSET = 8;
|
|
275
275
|
const OVERLAY_PADDING_FROM_CONTAINER = 12;
|
|
276
276
|
const SELECT_ALL_KEY = "all";
|
|
277
|
+
function getMenuPopoverMaxHeight({ maxItemsUntilScroll }) {
|
|
278
|
+
return ITEM_HEIGHT * maxItemsUntilScroll + Y_PADDING_INSIDE_OVERLAY * 2 + 2;
|
|
279
|
+
}
|
|
277
280
|
function getUnmergedPopoverStyles(width, triggerWidth) {
|
|
278
281
|
return __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, utilities_css.getComponentToken("menu", "item_height", `${utilities_css.pxToRem(ITEM_HEIGHT)}rem`)), utilities_css.getComponentToken("menu", "padding.y", `${utilities_css.pxToRem(Y_PADDING_INSIDE_OVERLAY)}rem`)), utilities_css.getComponentToken("menu", "min-width", width === "auto" ? `${triggerWidth}px` : void 0)), utilities_css.getResponsiveValue("menu", "width", width !== "auto" && width !== "fit-content" ? width : "auto"));
|
|
279
282
|
}
|
|
@@ -347,6 +350,7 @@ exports.OVERLAY_PADDING_FROM_CONTAINER = OVERLAY_PADDING_FROM_CONTAINER;
|
|
|
347
350
|
exports.SELECT_ALL_KEY = SELECT_ALL_KEY;
|
|
348
351
|
exports.Y_PADDING_INSIDE_OVERLAY = Y_PADDING_INSIDE_OVERLAY;
|
|
349
352
|
exports.filterSelectedKeys = filterSelectedKeys;
|
|
353
|
+
exports.getMenuPopoverMaxHeight = getMenuPopoverMaxHeight;
|
|
350
354
|
exports.getUnmergedPopoverStyles = getUnmergedPopoverStyles;
|
|
351
355
|
exports.isSelectAllIndeterminate = isSelectAllIndeterminate;
|
|
352
356
|
exports.isSelectAllSelected = isSelectAllSelected;
|
|
@@ -34,7 +34,7 @@ import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-5f58
|
|
|
34
34
|
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-BHXy3Wtu.mjs";
|
|
35
35
|
import { a as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-BC5PXI9q.mjs";
|
|
36
36
|
import { $ as $a11501f3d1d39e6c$export$ea8f71083e90600f, a as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18, b as $5e3802645cc19319$export$1c3ebcada18427bf } from "./ariaHideOutside-CxWZQtI1.mjs";
|
|
37
|
-
import { $ as $2a41e45df1593e64$export$d39e1813b3bdd0e1 } from "./useOverlayPosition-
|
|
37
|
+
import { $ as $2a41e45df1593e64$export$d39e1813b3bdd0e1 } from "./useOverlayPosition-dua8TTSS.mjs";
|
|
38
38
|
import { d as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, $ as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "./mergeProps-DSi85raC.mjs";
|
|
39
39
|
import { getComponentToken, pxToRem, getResponsiveValue } from "../utilities/css.mjs";
|
|
40
40
|
var $773d5888b972f1cf$exports = {};
|
|
@@ -273,6 +273,9 @@ const Y_PADDING_INSIDE_OVERLAY = 8;
|
|
|
273
273
|
const OVERLAY_OFFSET = 8;
|
|
274
274
|
const OVERLAY_PADDING_FROM_CONTAINER = 12;
|
|
275
275
|
const SELECT_ALL_KEY = "all";
|
|
276
|
+
function getMenuPopoverMaxHeight({ maxItemsUntilScroll }) {
|
|
277
|
+
return ITEM_HEIGHT * maxItemsUntilScroll + Y_PADDING_INSIDE_OVERLAY * 2 + 2;
|
|
278
|
+
}
|
|
276
279
|
function getUnmergedPopoverStyles(width, triggerWidth) {
|
|
277
280
|
return __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, getComponentToken("menu", "item_height", `${pxToRem(ITEM_HEIGHT)}rem`)), getComponentToken("menu", "padding.y", `${pxToRem(Y_PADDING_INSIDE_OVERLAY)}rem`)), getComponentToken("menu", "min-width", width === "auto" ? `${triggerWidth}px` : void 0)), getResponsiveValue("menu", "width", width !== "auto" && width !== "fit-content" ? width : "auto"));
|
|
278
281
|
}
|
|
@@ -349,6 +352,7 @@ export {
|
|
|
349
352
|
isSelectAllIndeterminate as e,
|
|
350
353
|
filterSelectedKeys as f,
|
|
351
354
|
getUnmergedPopoverStyles as g,
|
|
355
|
+
getMenuPopoverMaxHeight as h,
|
|
352
356
|
isSelectAllSelected as i,
|
|
353
357
|
useSelectionCapture as u
|
|
354
358
|
};
|
|
@@ -32,7 +32,7 @@ var __objRest = (source, exclude) => {
|
|
|
32
32
|
import { $ as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c } from "./mergeProps-DSi85raC.mjs";
|
|
33
33
|
import { $ as $5dc95899b306f630$export$c9058316764c140e } from "./mergeRefs-CCV6itCY.mjs";
|
|
34
34
|
import { $ as $df56164dff5785e2$export$4338b53315abf666 } from "./useObjectRef-wU82Pkgx.mjs";
|
|
35
|
-
import React__default, { useMemo, useState, useRef, useCallback
|
|
35
|
+
import React__default, { useMemo, useContext, useState, useRef, useCallback } from "react";
|
|
36
36
|
import ReactDOM from "react-dom";
|
|
37
37
|
const $64fa3d84918910a7$export$c62b8e45d58ddad9 = Symbol("default");
|
|
38
38
|
function $64fa3d84918910a7$export$2881499e37b75b9a({ values, children }) {
|
|
@@ -181,6 +181,12 @@ function $64fa3d84918910a7$var$useAnimation(ref, isActive, onEnd) {
|
|
|
181
181
|
onEnd
|
|
182
182
|
]);
|
|
183
183
|
}
|
|
184
|
+
function $64fa3d84918910a7$export$ef03459518577ad4(props) {
|
|
185
|
+
const prefix = /^(data-.*)$/;
|
|
186
|
+
let filteredProps = {};
|
|
187
|
+
for (const prop in props) if (!prefix.test(prop)) filteredProps[prop] = props[prop];
|
|
188
|
+
return filteredProps;
|
|
189
|
+
}
|
|
184
190
|
export {
|
|
185
191
|
$64fa3d84918910a7$export$29f1550f4b0d4415 as $,
|
|
186
192
|
$64fa3d84918910a7$export$4d86445c2cf5e3 as a,
|
|
@@ -188,5 +194,7 @@ export {
|
|
|
188
194
|
$64fa3d84918910a7$export$6d3443f2c48bfc20 as c,
|
|
189
195
|
$64fa3d84918910a7$export$2881499e37b75b9a as d,
|
|
190
196
|
$64fa3d84918910a7$export$c62b8e45d58ddad9 as e,
|
|
191
|
-
$64fa3d84918910a7$export$
|
|
197
|
+
$64fa3d84918910a7$export$fabf2dc03a41866e as f,
|
|
198
|
+
$64fa3d84918910a7$export$9d4c57ee4c6ffdd8 as g,
|
|
199
|
+
$64fa3d84918910a7$export$ef03459518577ad4 as h
|
|
192
200
|
};
|
|
@@ -182,6 +182,12 @@ function $64fa3d84918910a7$var$useAnimation(ref, isActive, onEnd) {
|
|
|
182
182
|
onEnd
|
|
183
183
|
]);
|
|
184
184
|
}
|
|
185
|
+
function $64fa3d84918910a7$export$ef03459518577ad4(props) {
|
|
186
|
+
const prefix = /^(data-.*)$/;
|
|
187
|
+
let filteredProps = {};
|
|
188
|
+
for (const prop in props) if (!prefix.test(prop)) filteredProps[prop] = props[prop];
|
|
189
|
+
return filteredProps;
|
|
190
|
+
}
|
|
185
191
|
exports.$64fa3d84918910a7$export$2881499e37b75b9a = $64fa3d84918910a7$export$2881499e37b75b9a;
|
|
186
192
|
exports.$64fa3d84918910a7$export$29f1550f4b0d4415 = $64fa3d84918910a7$export$29f1550f4b0d4415;
|
|
187
193
|
exports.$64fa3d84918910a7$export$45fda7c47f93fd48 = $64fa3d84918910a7$export$45fda7c47f93fd48;
|
|
@@ -189,3 +195,5 @@ exports.$64fa3d84918910a7$export$4d86445c2cf5e3 = $64fa3d84918910a7$export$4d864
|
|
|
189
195
|
exports.$64fa3d84918910a7$export$6d3443f2c48bfc20 = $64fa3d84918910a7$export$6d3443f2c48bfc20;
|
|
190
196
|
exports.$64fa3d84918910a7$export$9d4c57ee4c6ffdd8 = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8;
|
|
191
197
|
exports.$64fa3d84918910a7$export$c62b8e45d58ddad9 = $64fa3d84918910a7$export$c62b8e45d58ddad9;
|
|
198
|
+
exports.$64fa3d84918910a7$export$ef03459518577ad4 = $64fa3d84918910a7$export$ef03459518577ad4;
|
|
199
|
+
exports.$64fa3d84918910a7$export$fabf2dc03a41866e = $64fa3d84918910a7$export$fabf2dc03a41866e;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easypost/easy-ui",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.66",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"**/*.css"
|
|
6
6
|
],
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@easypost/easy-ui-icons": "1.0.0-alpha.
|
|
8
|
+
"@easypost/easy-ui-icons": "1.0.0-alpha.34",
|
|
9
9
|
"@easypost/easy-ui-tokens": "1.0.0-alpha.14",
|
|
10
10
|
"@react-aria/toast": "^3.0.0-beta.18",
|
|
11
11
|
"@react-aria/utils": "^3.26.0",
|