@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.
Files changed (219) hide show
  1. package/Badge/index.js +14 -14
  2. package/Badge/index.mjs +14 -14
  3. package/Banner/index.js +5 -5
  4. package/Banner/index.mjs +5 -5
  5. package/Button/index.js +1 -1
  6. package/Button/index.mjs +1 -1
  7. package/CHANGELOG.md +6 -0
  8. package/Calendar/index.js +1 -1
  9. package/Calendar/index.mjs +1 -1
  10. package/Card/index.js +1 -1
  11. package/Card/index.mjs +1 -1
  12. package/Checkbox/index.js +1 -1
  13. package/Checkbox/index.mjs +1 -1
  14. package/CodeBlock/index.js +13 -13
  15. package/CodeBlock/index.mjs +13 -13
  16. package/CodeSnippet/index.js +1 -1
  17. package/CodeSnippet/index.mjs +1 -1
  18. package/DataGrid/index.js +57 -57
  19. package/DataGrid/index.mjs +58 -58
  20. package/DatePicker/index.js +3 -3
  21. package/DatePicker/index.mjs +5 -5
  22. package/DateRangePicker/index.js +3 -3
  23. package/DateRangePicker/index.mjs +5 -5
  24. package/Drawer/index.js +18 -18
  25. package/Drawer/index.mjs +22 -22
  26. package/DropdownButton/index.js +12 -12
  27. package/DropdownButton/index.mjs +12 -12
  28. package/EmptyStateCard/index.js +8 -8
  29. package/EmptyStateCard/index.mjs +8 -8
  30. package/FocusedProductLayout/index.js +23 -23
  31. package/FocusedProductLayout/index.mjs +23 -23
  32. package/ForgeLayout/index.js +41 -231
  33. package/ForgeLayout/index.mjs +40 -230
  34. package/FormLayout/index.js +5 -5
  35. package/FormLayout/index.mjs +5 -5
  36. package/HorizontalGrid/index.js +1 -1
  37. package/HorizontalGrid/index.mjs +1 -1
  38. package/HorizontalStack/index.js +1 -1
  39. package/HorizontalStack/index.mjs +1 -1
  40. package/Icon/index.js +1 -1
  41. package/Icon/index.mjs +1 -1
  42. package/IconButton/index.js +12 -12
  43. package/IconButton/index.mjs +12 -12
  44. package/InputField/index.js +1 -1
  45. package/InputField/index.mjs +1 -1
  46. package/KebabButton/index.js +1 -1
  47. package/KebabButton/index.mjs +1 -1
  48. package/Menu/MenuOverlay.d.ts.map +1 -1
  49. package/Menu/index.js +1 -1
  50. package/Menu/index.mjs +1 -1
  51. package/Menu/utilities.d.ts +3 -0
  52. package/Menu/utilities.d.ts.map +1 -1
  53. package/Modal/index.js +19 -19
  54. package/Modal/index.mjs +23 -23
  55. package/MultiSelect/MultiSelect.d.ts +123 -0
  56. package/MultiSelect/MultiSelect.d.ts.map +1 -0
  57. package/MultiSelect/MultiSelect.stories.d.ts +11 -0
  58. package/MultiSelect/MultiSelect.stories.d.ts.map +1 -0
  59. package/MultiSelect/MultiSelect.test.d.ts +2 -0
  60. package/MultiSelect/MultiSelect.test.d.ts.map +1 -0
  61. package/MultiSelect/MultiSelectDropdown.d.ts +22 -0
  62. package/MultiSelect/MultiSelectDropdown.d.ts.map +1 -0
  63. package/MultiSelect/index.d.ts +2 -0
  64. package/MultiSelect/index.d.ts.map +1 -0
  65. package/MultiSelect/index.js +1989 -0
  66. package/MultiSelect/index.mjs +1974 -0
  67. package/MultiSelect/utilities.d.ts +3 -0
  68. package/MultiSelect/utilities.d.ts.map +1 -0
  69. package/NexusLayout/index.js +28 -28
  70. package/NexusLayout/index.mjs +28 -28
  71. package/Notification/index.js +1 -1
  72. package/Notification/index.mjs +1 -1
  73. package/Pagination/index.js +7 -7
  74. package/Pagination/index.mjs +7 -7
  75. package/PillGroup/index.js +3 -1681
  76. package/PillGroup/index.mjs +3 -1681
  77. package/ProductLayout/index.js +21 -21
  78. package/ProductLayout/index.mjs +25 -25
  79. package/Provider/index.js +1 -1
  80. package/Provider/index.mjs +1 -1
  81. package/RadioButtonGroup/index.js +3 -3
  82. package/RadioButtonGroup/index.mjs +3 -3
  83. package/RadioGroup/index.js +1 -1
  84. package/RadioGroup/index.mjs +1 -1
  85. package/RangeCalendar/index.js +1 -1
  86. package/RangeCalendar/index.mjs +1 -1
  87. package/SearchNav/index.js +29 -29
  88. package/SearchNav/index.mjs +29 -29
  89. package/SectionCard/index.js +7 -7
  90. package/SectionCard/index.mjs +7 -7
  91. package/Select/index.js +5 -5
  92. package/Select/index.mjs +5 -5
  93. package/SelectorErrorTooltip/index.js +1 -1
  94. package/SelectorErrorTooltip/index.mjs +1 -1
  95. package/Spinner/index.js +1 -1
  96. package/Spinner/index.mjs +1 -1
  97. package/SplitToggleCard/index.js +4 -4
  98. package/SplitToggleCard/index.mjs +4 -4
  99. package/Stepper/index.js +1 -1
  100. package/Stepper/index.mjs +1 -1
  101. package/TabNav/index.js +1 -1
  102. package/TabNav/index.mjs +1 -1
  103. package/TabPanels/index.js +1 -1
  104. package/TabPanels/index.mjs +2 -2
  105. package/Tabs/index.js +1 -1
  106. package/Tabs/index.mjs +1 -1
  107. package/Text/index.js +1 -1
  108. package/Text/index.mjs +1 -1
  109. package/TextField/index.js +1 -1
  110. package/TextField/index.mjs +1 -1
  111. package/Textarea/index.js +1 -1
  112. package/Textarea/index.mjs +1 -1
  113. package/Toggle/index.js +1 -1
  114. package/Toggle/index.mjs +1 -1
  115. package/ToggleCard/index.js +2 -2
  116. package/ToggleCard/index.mjs +2 -2
  117. package/Tooltip/index.js +1 -1
  118. package/Tooltip/index.mjs +1 -1
  119. package/VerticalNav/index.js +24 -24
  120. package/VerticalNav/index.mjs +24 -24
  121. package/VerticalStack/index.js +1 -1
  122. package/VerticalStack/index.mjs +1 -1
  123. package/__chunks__/{Button-CDRssWxC.mjs → Button-BqogJAQ3.mjs} +3 -3
  124. package/__chunks__/{Button-DXhw-VUb.js → Button-CVaEK94Q.js} +18 -18
  125. package/__chunks__/{Button-lb6KY-VK.mjs → Button-CVbi-24J.mjs} +18 -18
  126. package/__chunks__/{Button-BvLvcmfd.js → Button-Y550ybuK.js} +1 -1
  127. package/__chunks__/{Calendar-ChbA9Ste.mjs → Calendar-C2JlXaSY.mjs} +1 -1
  128. package/__chunks__/{Calendar-D-oFF4f4.js → Calendar-CmF_v-Dn.js} +1 -1
  129. package/__chunks__/{CalendarBase-oPvH2YM1.js → CalendarBase-Cavy4k_H.js} +18 -18
  130. package/__chunks__/{CalendarBase-DC8WR7md.mjs → CalendarBase-aeU9JZC2.mjs} +18 -18
  131. package/__chunks__/{Card-CWv2re8Z.mjs → Card-B5c1vM8E.mjs} +12 -12
  132. package/__chunks__/{Card-CRFM7MOD.js → Card-BHZOcCVB.js} +12 -12
  133. package/__chunks__/{Checkbox-B7eahvPN.js → Checkbox-BmtLwm3J.js} +19 -19
  134. package/__chunks__/{Checkbox-XDmnzjIx.mjs → Checkbox-IhSMESiF.mjs} +20 -20
  135. package/__chunks__/{CodeSnippet-CnjYkoJo.mjs → CodeSnippet-DA3SuGi9.mjs} +2 -2
  136. package/__chunks__/{CodeSnippet-FCgb2RfQ.js → CodeSnippet-HAojQDBb.js} +2 -2
  137. package/__chunks__/{DatePickerBase-B9g5PeHi.mjs → DatePickerBase-DYuliQ2j.mjs} +20 -64
  138. package/__chunks__/{DatePickerBase-DMmeUEou.js → DatePickerBase-PqJZhPW5.js} +18 -62
  139. package/__chunks__/Dialog-CFyC5TFs.js +232 -0
  140. package/__chunks__/Dialog-DnCSZh3s.mjs +233 -0
  141. package/__chunks__/{HelpMenu-BjEMVfGE.js → HelpMenu-DttT1pkc.js} +6 -6
  142. package/__chunks__/{HelpMenu-DWvUM5hz.mjs → HelpMenu-dPaIsmEG.mjs} +6 -6
  143. package/__chunks__/{HorizontalGrid-BZX-WluO.js → HorizontalGrid-BFqXCljf.js} +1 -1
  144. package/__chunks__/{HorizontalGrid-DGrPEAhQ.mjs → HorizontalGrid-CyBrrh6k.mjs} +1 -1
  145. package/__chunks__/{HorizontalStack-VtCu2VMx.js → HorizontalStack-BG-lZii5.js} +1 -1
  146. package/__chunks__/{HorizontalStack--Qc3cVBd.mjs → HorizontalStack-p9m9muAJ.mjs} +1 -1
  147. package/__chunks__/{Icon-BDa4XL_V.js → Icon-BHbBKuGB.js} +2 -2
  148. package/__chunks__/{Icon-BD88DLNr.mjs → Icon-ZRjQkfey.mjs} +2 -2
  149. package/__chunks__/{InputCaption-DKZRO84o.js → InputCaption-BQw7pLl1.js} +2 -2
  150. package/__chunks__/{InputCaption-DYFfypKt.mjs → InputCaption-DE7SnGJr.mjs} +2 -2
  151. package/__chunks__/{InputField-Bv1SfmUB.mjs → InputField-1toY1X94.mjs} +6 -89
  152. package/__chunks__/{InputField-C7Ti5JNz.js → InputField-e2dBsTrQ.js} +6 -89
  153. package/__chunks__/{InputIcon-VzRxuUky.mjs → InputIcon-CKwsgYvg.mjs} +31 -31
  154. package/__chunks__/{InputIcon-c-x0Whak.js → InputIcon-DM19rdNu.js} +31 -31
  155. package/__chunks__/{KebabButton-CdlmuIRm.js → KebabButton-3APOVOtc.js} +4 -4
  156. package/__chunks__/{KebabButton-TgeYkgj5.mjs → KebabButton-CGvwEB3q.mjs} +4 -4
  157. package/__chunks__/{Menu-C1Q0RfOp.js → Menu-90Db_wYM.js} +22 -62
  158. package/__chunks__/{Menu-BL0okgwD.mjs → Menu-D7JiGJt4.mjs} +22 -62
  159. package/__chunks__/{Notification-CZS59-s8.mjs → Notification-C4gEE6IM.mjs} +14 -14
  160. package/__chunks__/{Notification-D7fRjiAH.js → Notification-DZ0uDsoT.js} +14 -14
  161. package/__chunks__/{Overlay-DyfvFsGi.mjs → Overlay-BEmOdNIB.mjs} +3 -3
  162. package/__chunks__/PillGroup-BetDOSFz.js +2061 -0
  163. package/__chunks__/PillGroup-Bp5vfk6Z.mjs +2062 -0
  164. package/__chunks__/{RadioGroup-D3RN5LLn.mjs → RadioGroup-DPJOnxCi.mjs} +16 -16
  165. package/__chunks__/{RadioGroup-CYlZvoxh.js → RadioGroup-Qn2c29rT.js} +15 -15
  166. package/__chunks__/{RangeCalendar-D5t6FuZp.mjs → RangeCalendar-BNySCRAa.mjs} +1 -1
  167. package/__chunks__/{RangeCalendar-0Zt6GJAs.js → RangeCalendar-lhIzCnWl.js} +1 -1
  168. package/__chunks__/{SelectOverlay-XRIcujy9.js → SelectOverlay-CoOED545.js} +28 -188
  169. package/__chunks__/{SelectOverlay-DAJ9-Wye.mjs → SelectOverlay-D12QgA_I.mjs} +29 -189
  170. package/__chunks__/{SelectorErrorTooltip-r2APVg60.js → SelectorErrorTooltip-CNinvIcU.js} +4 -4
  171. package/__chunks__/{SelectorErrorTooltip-BSNUFpGD.mjs → SelectorErrorTooltip-Cz7Uw_O_.mjs} +4 -4
  172. package/__chunks__/{Spinner-C6CoASxe.mjs → Spinner-Co64ezt-.mjs} +5 -5
  173. package/__chunks__/{Spinner-D9lZ3erf.js → Spinner-DTH0xdij.js} +5 -5
  174. package/__chunks__/{Stepper-D0YDhoPF.js → Stepper-DqcfNOrn.js} +25 -25
  175. package/__chunks__/{Stepper-BRecUCpd.mjs → Stepper-OFWKfhi3.mjs} +25 -25
  176. package/__chunks__/{TabNav-BzeG4JrK.mjs → TabNav-B44TuB70.mjs} +1 -1
  177. package/__chunks__/{TabNav-ipa33NIM.js → TabNav-DzF57oTN.js} +1 -1
  178. package/__chunks__/{Tabs-CsOlVyHJ.mjs → Tabs-ClOwavjv.mjs} +17 -17
  179. package/__chunks__/{Tabs-CDUhh-Bz.js → Tabs-CsxDAl1X.js} +17 -17
  180. package/__chunks__/{Text-CntV2Frc.js → Text-BwXTDw77.js} +34 -34
  181. package/__chunks__/{Text-BHyjSBcd.mjs → Text-DYLBjpe-.mjs} +34 -34
  182. package/__chunks__/{TextField-Ca_M-pak.mjs → TextField-DVWDMYaM.mjs} +1 -1
  183. package/__chunks__/{TextField-CBWpUHdy.js → TextField-YD_1oSnk.js} +1 -1
  184. package/__chunks__/{Toggle-BxtpUTDA.mjs → Toggle-DiK1wHdG.mjs} +11 -11
  185. package/__chunks__/{Toggle-C6ICkaF-.js → Toggle-gPKUf7QS.js} +11 -11
  186. package/__chunks__/{Tooltip-BK6l0C3n.mjs → Tooltip-BX_C7x_7.mjs} +10 -10
  187. package/__chunks__/{Tooltip-cqSETep4.js → Tooltip-DPZMv6Ia.js} +8 -8
  188. package/__chunks__/{VerticalStack-BVtgNZrG.mjs → VerticalStack-C466n8W1.mjs} +3 -3
  189. package/__chunks__/{VerticalStack-B7auhieq.js → VerticalStack-DIpmkisq.js} +3 -3
  190. package/__chunks__/{useDialog-c-C07qhw.mjs → useDialog-h-MPfyGr.mjs} +1 -1
  191. package/__chunks__/{useEdgeInterceptors-DrJ9MQmY.mjs → useEdgeInterceptors-BORL2txk.mjs} +5 -5
  192. package/__chunks__/{useEdgeInterceptors-Bvg1fK8h.js → useEdgeInterceptors-DU8I_hQ1.js} +5 -5
  193. package/__chunks__/useFilter-D-K0Oj-7.mjs +65 -0
  194. package/__chunks__/useFilter-DpnZ54nd.js +64 -0
  195. package/__chunks__/{useFormValidation-v2O6VL2V.mjs → useFormValidation-B3euLzzR.mjs} +4 -4
  196. package/__chunks__/useListBoxSection-BlFRlBZy.js +192 -0
  197. package/__chunks__/useListBoxSection-BsSdeGKp.mjs +193 -0
  198. package/__chunks__/{useTriggerWidth-CRz8zSDa.mjs → useMenuTrigger-D4pQ727R.mjs} +3 -130
  199. package/__chunks__/{useTriggerWidth-Dj7C0lza.js → useMenuTrigger-qbIPy-fg.js} +0 -127
  200. package/__chunks__/useMenuTriggerState-Cf_X36NC.mjs +67 -0
  201. package/__chunks__/useMenuTriggerState-Dai3rheB.js +66 -0
  202. package/__chunks__/{useModalOverlay-S0R2uVTX.mjs → useModalOverlay-CkOujl0G.mjs} +1 -1
  203. package/__chunks__/{useOverlayPosition-BjK7cu6U.mjs → useOverlayPosition-dua8TTSS.mjs} +1 -1
  204. package/__chunks__/{useOverlayTrigger-DDcXdZOM.mjs → useOverlayTrigger-BS8c6XEz.mjs} +1 -1
  205. package/__chunks__/{useSelectableItem-D61t76J1.mjs → useSelectableItem-B8l2VAQ8.mjs} +2 -2
  206. package/__chunks__/{useSelectableList-UkBCcTuC.js → useSelectableList-CzTJAukw.js} +15 -0
  207. package/__chunks__/{useSelectableList-BdG5I7cy.mjs → useSelectableList-DsUuWr0P.mjs} +18 -3
  208. package/__chunks__/useTextField-CErFc3WZ.js +106 -0
  209. package/__chunks__/useTextField-Dd-YTxI4.mjs +107 -0
  210. package/__chunks__/useTriggerWidth-B-IM2wNY.js +132 -0
  211. package/__chunks__/useTriggerWidth-CAYuGPNq.mjs +133 -0
  212. package/__chunks__/{utilities-CaBPUKEB.js → utilities-BDABIMDb.js} +4 -0
  213. package/__chunks__/{utilities-DASknbaa.mjs → utilities-DpKIaDkW.mjs} +5 -1
  214. package/__chunks__/{utils-D4ddhsBL.mjs → utils-Dt6xdGol.mjs} +10 -2
  215. package/__chunks__/{utils-DIF5XAA2.js → utils-eHk7b-OB.js} +8 -0
  216. package/package.json +1 -1
  217. package/style.css +1609 -1445
  218. package/utilities/storybook.d.ts +1 -0
  219. 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-BjK7cu6U.mjs";
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, useContext } from "react";
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$9d4c57ee4c6ffdd8 as f
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@easypost/easy-ui",
3
- "version": "1.0.0-alpha.65",
3
+ "version": "1.0.0-alpha.66",
4
4
  "sideEffects": [
5
5
  "**/*.css"
6
6
  ],