@easypost/easy-ui 1.0.0-alpha.53 → 1.0.0-alpha.54

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 (177) 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 +15 -15
  9. package/Calendar/index.mjs +15 -15
  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 +60 -60
  19. package/DataGrid/index.mjs +60 -60
  20. package/Drawer/index.js +21 -21
  21. package/Drawer/index.mjs +21 -21
  22. package/DropdownButton/index.js +12 -12
  23. package/DropdownButton/index.mjs +12 -12
  24. package/EmptyStateCard/index.js +8 -8
  25. package/EmptyStateCard/index.mjs +8 -8
  26. package/FocusedProductLayout/index.js +23 -23
  27. package/FocusedProductLayout/index.mjs +23 -23
  28. package/FormLayout/index.js +5 -5
  29. package/FormLayout/index.mjs +5 -5
  30. package/HorizontalGrid/index.js +1 -1
  31. package/HorizontalGrid/index.mjs +1 -1
  32. package/HorizontalStack/index.js +1 -1
  33. package/HorizontalStack/index.mjs +1 -1
  34. package/Icon/index.js +1 -1
  35. package/Icon/index.mjs +1 -1
  36. package/IconButton/index.js +12 -12
  37. package/IconButton/index.mjs +12 -12
  38. package/InputField/index.js +1 -1
  39. package/InputField/index.mjs +1 -1
  40. package/KebabButton/index.js +1 -1
  41. package/KebabButton/index.mjs +1 -1
  42. package/Menu/index.js +1 -1
  43. package/Menu/index.mjs +1 -1
  44. package/Modal/index.js +22 -22
  45. package/Modal/index.mjs +22 -22
  46. package/NexusLayout/index.js +28 -28
  47. package/NexusLayout/index.mjs +28 -28
  48. package/Notification/index.js +1 -1
  49. package/Notification/index.mjs +1 -1
  50. package/Pagination/index.js +7 -7
  51. package/Pagination/index.mjs +7 -7
  52. package/PillGroup/index.js +23 -136
  53. package/PillGroup/index.mjs +12 -125
  54. package/ProductLayout/index.js +24 -24
  55. package/ProductLayout/index.mjs +24 -24
  56. package/Provider/index.js +1 -1
  57. package/Provider/index.mjs +1 -1
  58. package/RadioButtonGroup/RadioButtonGroup.d.ts +103 -0
  59. package/RadioButtonGroup/RadioButtonGroup.d.ts.map +1 -0
  60. package/RadioButtonGroup/RadioButtonGroup.stories.d.ts +11 -0
  61. package/RadioButtonGroup/RadioButtonGroup.stories.d.ts.map +1 -0
  62. package/RadioButtonGroup/RadioButtonGroup.test.d.ts +2 -0
  63. package/RadioButtonGroup/RadioButtonGroup.test.d.ts.map +1 -0
  64. package/RadioButtonGroup/index.d.ts +2 -0
  65. package/RadioButtonGroup/index.d.ts.map +1 -0
  66. package/RadioButtonGroup/index.js +262 -0
  67. package/RadioButtonGroup/index.mjs +262 -0
  68. package/RadioGroup/index.js +16 -16
  69. package/RadioGroup/index.mjs +16 -16
  70. package/SearchNav/index.js +29 -29
  71. package/SearchNav/index.mjs +29 -29
  72. package/SectionCard/index.js +7 -7
  73. package/SectionCard/index.mjs +7 -7
  74. package/Select/index.js +4 -4
  75. package/Select/index.mjs +4 -4
  76. package/SelectorErrorTooltip/index.js +1 -1
  77. package/SelectorErrorTooltip/index.mjs +1 -1
  78. package/Spinner/index.js +1 -1
  79. package/Spinner/index.mjs +1 -1
  80. package/SplitToggleCard/index.js +4 -4
  81. package/SplitToggleCard/index.mjs +4 -4
  82. package/Stepper/index.js +1 -1
  83. package/Stepper/index.mjs +1 -1
  84. package/TabNav/index.js +1 -1
  85. package/TabNav/index.mjs +1 -1
  86. package/TabPanels/index.js +3 -3
  87. package/TabPanels/index.mjs +3 -3
  88. package/Tabs/index.js +1 -1
  89. package/Tabs/index.mjs +1 -1
  90. package/Text/index.js +1 -1
  91. package/Text/index.mjs +1 -1
  92. package/TextField/index.js +1 -1
  93. package/TextField/index.mjs +1 -1
  94. package/Textarea/index.js +1 -1
  95. package/Textarea/index.mjs +1 -1
  96. package/Toggle/index.js +1 -1
  97. package/Toggle/index.mjs +1 -1
  98. package/ToggleCard/index.js +2 -2
  99. package/ToggleCard/index.mjs +2 -2
  100. package/Tooltip/index.js +1 -1
  101. package/Tooltip/index.mjs +1 -1
  102. package/VerticalNav/index.js +24 -24
  103. package/VerticalNav/index.mjs +24 -24
  104. package/VerticalStack/index.js +1 -1
  105. package/VerticalStack/index.mjs +1 -1
  106. package/__chunks__/{Button-BLXBu8Ta.js → Button-D_Bk7BuN.js} +17 -17
  107. package/__chunks__/{Button-KmjMp6fw.mjs → Button-Dy9idhgT.mjs} +17 -17
  108. package/__chunks__/{Card-Bn_WwYcR.js → Card-9RlZlFEC.js} +12 -12
  109. package/__chunks__/{Card-YKZzjRiK.mjs → Card-mxjU9S-F.mjs} +12 -12
  110. package/__chunks__/{Checkbox--LkvUfIF.mjs → Checkbox-BgumKMXU.mjs} +21 -20
  111. package/__chunks__/{Checkbox-CLLYuQFM.js → Checkbox-CBB8jlZw.js} +22 -21
  112. package/__chunks__/{CodeSnippet-daiUE0ZZ.mjs → CodeSnippet-BjUoaeh9.mjs} +2 -2
  113. package/__chunks__/{CodeSnippet-D5b8WTPo.js → CodeSnippet-DVrkwOg4.js} +2 -2
  114. package/__chunks__/{FocusScope-OD0PXxQI.mjs → FocusScope-C194OB-4.mjs} +83 -1
  115. package/__chunks__/{FocusScope-D5T6fKI9.js → FocusScope-DJer9ahG.js} +82 -0
  116. package/__chunks__/{HelpMenu-dUbPE3b6.js → HelpMenu-DF2Bx-bn.js} +6 -6
  117. package/__chunks__/{HelpMenu-CvYzKDPL.mjs → HelpMenu-m1qJ4EyP.mjs} +6 -6
  118. package/__chunks__/{HorizontalGrid-BZ6IHKxE.mjs → HorizontalGrid-BYR8Gr-h.mjs} +1 -1
  119. package/__chunks__/{HorizontalGrid-ijPB5iDF.js → HorizontalGrid-DuHNRhon.js} +1 -1
  120. package/__chunks__/{HorizontalStack-BhYVqGNF.js → HorizontalStack-By6XdGZh.js} +1 -1
  121. package/__chunks__/{HorizontalStack-CVOKWs2C.mjs → HorizontalStack-DaZakHYj.mjs} +1 -1
  122. package/__chunks__/{Icon-ML4td6nu.mjs → Icon-3zFwhVjn.mjs} +2 -2
  123. package/__chunks__/{Icon-DTlCtPmb.js → Icon-BB9QecRC.js} +2 -2
  124. package/__chunks__/{InputField-BVj42bl6.js → InputField-CHAxJwME.js} +3 -3
  125. package/__chunks__/{InputField-BGuPTA6X.mjs → InputField-CdEl4M4-.mjs} +3 -3
  126. package/__chunks__/{InputIcon-Ds8RTUHn.mjs → InputIcon--PdoGQOO.mjs} +25 -25
  127. package/__chunks__/{InputIcon-cgR2J0CY.js → InputIcon-oj25h1MN.js} +25 -25
  128. package/__chunks__/{KebabButton-Dwul0lCB.js → KebabButton-3bAqpgLu.js} +4 -4
  129. package/__chunks__/{KebabButton-KJLOsFVT.mjs → KebabButton-fmLpDchx.mjs} +4 -4
  130. package/__chunks__/{Menu-aW3etzMU.js → Menu--B0Fn4Ol.js} +15 -15
  131. package/__chunks__/{Menu-_F51cSwS.mjs → Menu-B95QYBVQ.mjs} +15 -15
  132. package/__chunks__/{Notification-B_EYEB85.mjs → Notification-D15awRNG.mjs} +14 -14
  133. package/__chunks__/{Notification-FLiv_7Pz.js → Notification-DTb3bJn4.js} +14 -14
  134. package/__chunks__/{Overlay-8RgU2lAl.mjs → Overlay-BtzIt9Ka.mjs} +1 -1
  135. package/__chunks__/{Overlay-B-di_dfG.js → Overlay-CUtfbILq.js} +1 -1
  136. package/__chunks__/{SelectOverlay-CE6xQN1A.mjs → SelectOverlay-D39ws5R2.mjs} +22 -22
  137. package/__chunks__/{SelectOverlay-BXUOr3V4.js → SelectOverlay-_dx1vHML.js} +22 -22
  138. package/__chunks__/{SelectorErrorTooltip-Kb6OHby6.mjs → SelectorErrorTooltip-D8y5kImH.mjs} +4 -4
  139. package/__chunks__/{SelectorErrorTooltip-CVmgS1ea.js → SelectorErrorTooltip-DhV9YtiA.js} +4 -4
  140. package/__chunks__/{Spinner-B824MsLf.js → Spinner-CVcjgzNy.js} +5 -5
  141. package/__chunks__/{Spinner-B_gLJGR4.mjs → Spinner-CfniY1TS.mjs} +5 -5
  142. package/__chunks__/{Stepper-jvJMb2AN.mjs → Stepper-D_2YRENa.mjs} +25 -25
  143. package/__chunks__/{Stepper-BsXgQ8uM.js → Stepper-E2li7kd2.js} +25 -25
  144. package/__chunks__/{TabNav-DZMmlU0F.mjs → TabNav-BgwlyiLE.mjs} +1 -1
  145. package/__chunks__/{TabNav-7zvsNpDC.js → TabNav-C7_HMIZx.js} +1 -1
  146. package/__chunks__/{Tabs-S7stbA0f.mjs → Tabs-CwxqTiAn.mjs} +17 -17
  147. package/__chunks__/{Tabs-Bno4dYlh.js → Tabs-WKn9NKJy.js} +17 -17
  148. package/__chunks__/{Text-CT2y5c8a.js → Text-CoOcI-ZA.js} +34 -34
  149. package/__chunks__/{Text-7pwgbag-.mjs → Text-Dfn-c0km.mjs} +34 -34
  150. package/__chunks__/{Toggle-DTGHrByH.js → Toggle-DYTnMD3t.js} +14 -13
  151. package/__chunks__/{Toggle-DnXlXQfM.mjs → Toggle-qa6gbH9Q.mjs} +13 -12
  152. package/__chunks__/{Tooltip-D3oH4aIj.js → Tooltip-6vJKVOnU.js} +8 -8
  153. package/__chunks__/{Tooltip-CtI3y9PC.mjs → Tooltip-DnLwtGUV.mjs} +8 -8
  154. package/__chunks__/{VerticalStack-BiBVFfHt.js → VerticalStack-BUxIVmGp.js} +3 -3
  155. package/__chunks__/{VerticalStack-BHv8i_jQ.mjs → VerticalStack-ac4iBcxE.mjs} +3 -3
  156. package/__chunks__/{ariaHideOutside-BYYnLsgt.js → ariaHideOutside-2fSu0FuJ.js} +1 -1
  157. package/__chunks__/{ariaHideOutside-CGNwwQAc.mjs → ariaHideOutside-Dhj8j6Mb.mjs} +1 -1
  158. package/__chunks__/{useDialog-BThBdiel.mjs → useDialog-CfUEt_df.mjs} +2 -2
  159. package/__chunks__/{useDialog-DIiUusMk.js → useDialog-CtMBWxF5.js} +2 -2
  160. package/__chunks__/{useEdgeInterceptors-CegFcI5C.js → useEdgeInterceptors-CQ1iontu.js} +5 -5
  161. package/__chunks__/{useEdgeInterceptors-Cg-US2Aq.mjs → useEdgeInterceptors-DYwJNXXm.mjs} +5 -5
  162. package/__chunks__/{useHasTabbableChild-DU6tKe-i.mjs → useHasTabbableChild-9rS-nuc-.mjs} +1 -1
  163. package/__chunks__/{useHasTabbableChild-4Ga1outX.js → useHasTabbableChild-BY-g4H3y.js} +1 -1
  164. package/__chunks__/{useSelectableItem-CJ5_OAlc.js → useSelectableItem-C0qCIU8l.js} +1 -1
  165. package/__chunks__/{useSelectableItem-SVHzvSUI.mjs → useSelectableItem-CHd6ksRw.mjs} +1 -1
  166. package/__chunks__/{useSelectableList-ICLJNy5q.js → useSelectableList-CnP9hXkb.js} +1 -1
  167. package/__chunks__/{useSelectableList-C-_LjaIN.mjs → useSelectableList-FvytdUu7.mjs} +1 -1
  168. package/__chunks__/{useToggle-CE4Qgz03.js → useToggle-DsYRac30.js} +0 -17
  169. package/__chunks__/{useToggle-B8pvlPQG.mjs → useToggle-YUgC8qn-.mjs} +1 -18
  170. package/__chunks__/useToggleState-CdbEMLRz.js +18 -0
  171. package/__chunks__/useToggleState-kFojjzgV.mjs +19 -0
  172. package/__chunks__/{useTriggerWidth-BhAxDRD1.mjs → useTriggerWidth-B3JINZlR.mjs} +2 -2
  173. package/__chunks__/{useTriggerWidth-CCmtSs-d.js → useTriggerWidth-CcKoLR8z.js} +2 -2
  174. package/__chunks__/utils-DXO9zsKE.js +154 -0
  175. package/__chunks__/utils-Dm-0qf_-.mjs +155 -0
  176. package/package.json +1 -1
  177. package/style.css +993 -948
@@ -0,0 +1,154 @@
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
+ var __objRest = (source, exclude) => {
22
+ var target = {};
23
+ for (var prop in source)
24
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
25
+ target[prop] = source[prop];
26
+ if (source != null && __getOwnPropSymbols)
27
+ for (var prop of __getOwnPropSymbols(source)) {
28
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
29
+ target[prop] = source[prop];
30
+ }
31
+ return target;
32
+ };
33
+ const mergeProps = require("./mergeProps-DniMwM6P.js");
34
+ const mergeRefs = require("./mergeRefs-CQsNYO0P.js");
35
+ const React = require("react");
36
+ require("react-dom");
37
+ function $df56164dff5785e2$export$4338b53315abf666(forwardedRef) {
38
+ const objRef = React.useRef(null);
39
+ return React.useMemo(() => ({
40
+ get current() {
41
+ return objRef.current;
42
+ },
43
+ set current(value) {
44
+ objRef.current = value;
45
+ if (typeof forwardedRef === "function") forwardedRef(value);
46
+ else if (forwardedRef) forwardedRef.current = value;
47
+ }
48
+ }), [
49
+ forwardedRef
50
+ ]);
51
+ }
52
+ const $64fa3d84918910a7$export$c62b8e45d58ddad9 = Symbol("default");
53
+ function $64fa3d84918910a7$export$2881499e37b75b9a({ values, children }) {
54
+ for (let [Context, value] of values)
55
+ children = /* @__PURE__ */ React.createElement(Context.Provider, {
56
+ value
57
+ }, children);
58
+ return children;
59
+ }
60
+ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
61
+ let { className, style, children, defaultClassName, defaultChildren, defaultStyle, values } = props;
62
+ return React.useMemo(() => {
63
+ let computedClassName;
64
+ let computedStyle;
65
+ let computedChildren;
66
+ if (typeof className === "function") computedClassName = className(__spreadProps(__spreadValues({}, values), {
67
+ defaultClassName
68
+ }));
69
+ else computedClassName = className;
70
+ if (typeof style === "function") computedStyle = style(__spreadProps(__spreadValues({}, values), {
71
+ defaultStyle: defaultStyle || {}
72
+ }));
73
+ else computedStyle = style;
74
+ if (typeof children === "function") computedChildren = children(__spreadProps(__spreadValues({}, values), {
75
+ defaultChildren
76
+ }));
77
+ else if (children == null) computedChildren = defaultChildren;
78
+ else computedChildren = children;
79
+ return {
80
+ className: computedClassName !== null && computedClassName !== void 0 ? computedClassName : defaultClassName,
81
+ style: computedStyle || defaultStyle ? __spreadValues(__spreadValues({}, defaultStyle), computedStyle) : void 0,
82
+ children: computedChildren !== null && computedChildren !== void 0 ? computedChildren : defaultChildren,
83
+ "data-rac": ""
84
+ };
85
+ }, [
86
+ className,
87
+ style,
88
+ children,
89
+ defaultClassName,
90
+ defaultChildren,
91
+ defaultStyle,
92
+ values
93
+ ]);
94
+ }
95
+ function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
96
+ let ctx = React.useContext(context);
97
+ if (slot === null)
98
+ return null;
99
+ if (ctx && typeof ctx === "object" && "slots" in ctx && ctx.slots) {
100
+ let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map((p) => `"${p}"`));
101
+ if (!slot && !ctx.slots[$64fa3d84918910a7$export$c62b8e45d58ddad9]) throw new Error(`A slot prop is required. Valid slot names are ${availableSlots}.`);
102
+ let slotKey = slot || $64fa3d84918910a7$export$c62b8e45d58ddad9;
103
+ if (!ctx.slots[slotKey])
104
+ throw new Error(`Invalid slot "${slot}". Valid slot names are ${availableSlots}.`);
105
+ return ctx.slots[slotKey];
106
+ }
107
+ return ctx;
108
+ }
109
+ function $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, context) {
110
+ let ctx = $64fa3d84918910a7$export$fabf2dc03a41866e(context, props.slot) || {};
111
+ let _a = ctx, { ref: contextRef } = _a, contextProps = __objRest(_a, ["ref"]);
112
+ let mergedRef = $df56164dff5785e2$export$4338b53315abf666(React.useMemo(() => mergeRefs.$5dc95899b306f630$export$c9058316764c140e(ref, contextRef), [
113
+ ref,
114
+ contextRef
115
+ ]));
116
+ let mergedProps = mergeProps.$3ef42575df84b30b$export$9d1611c77c2fe928(contextProps, props);
117
+ if ("style" in contextProps && contextProps.style && "style" in props && props.style) {
118
+ if (typeof contextProps.style === "function" || typeof props.style === "function")
119
+ mergedProps.style = (renderProps) => {
120
+ let contextStyle = typeof contextProps.style === "function" ? contextProps.style(renderProps) : contextProps.style;
121
+ let defaultStyle = __spreadValues(__spreadValues({}, renderProps.defaultStyle), contextStyle);
122
+ let style = typeof props.style === "function" ? props.style(__spreadProps(__spreadValues({}, renderProps), {
123
+ defaultStyle
124
+ })) : props.style;
125
+ return __spreadValues(__spreadValues({}, defaultStyle), style);
126
+ };
127
+ else
128
+ mergedProps.style = __spreadValues(__spreadValues({}, contextProps.style), props.style);
129
+ }
130
+ return [
131
+ mergedProps,
132
+ mergedRef
133
+ ];
134
+ }
135
+ function $64fa3d84918910a7$export$9d4c57ee4c6ffdd8() {
136
+ let [hasSlot, setHasSlot] = React.useState(true);
137
+ let hasRun = React.useRef(false);
138
+ let ref = React.useCallback((el) => {
139
+ hasRun.current = true;
140
+ setHasSlot(!!el);
141
+ }, []);
142
+ mergeProps.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
143
+ if (!hasRun.current) setHasSlot(false);
144
+ }, []);
145
+ return [
146
+ ref,
147
+ hasSlot
148
+ ];
149
+ }
150
+ exports.$64fa3d84918910a7$export$2881499e37b75b9a = $64fa3d84918910a7$export$2881499e37b75b9a;
151
+ exports.$64fa3d84918910a7$export$29f1550f4b0d4415 = $64fa3d84918910a7$export$29f1550f4b0d4415;
152
+ exports.$64fa3d84918910a7$export$4d86445c2cf5e3 = $64fa3d84918910a7$export$4d86445c2cf5e3;
153
+ exports.$64fa3d84918910a7$export$9d4c57ee4c6ffdd8 = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8;
154
+ exports.$df56164dff5785e2$export$4338b53315abf666 = $df56164dff5785e2$export$4338b53315abf666;
@@ -0,0 +1,155 @@
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
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
32
+ import { a as $3ef42575df84b30b$export$9d1611c77c2fe928, b as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c } from "./mergeProps-SJQ-f8LF.mjs";
33
+ import { $ as $5dc95899b306f630$export$c9058316764c140e } from "./mergeRefs-CCV6itCY.mjs";
34
+ import React__default, { useRef, useMemo, useState, useCallback, useContext } from "react";
35
+ import "react-dom";
36
+ function $df56164dff5785e2$export$4338b53315abf666(forwardedRef) {
37
+ const objRef = useRef(null);
38
+ return useMemo(() => ({
39
+ get current() {
40
+ return objRef.current;
41
+ },
42
+ set current(value) {
43
+ objRef.current = value;
44
+ if (typeof forwardedRef === "function") forwardedRef(value);
45
+ else if (forwardedRef) forwardedRef.current = value;
46
+ }
47
+ }), [
48
+ forwardedRef
49
+ ]);
50
+ }
51
+ const $64fa3d84918910a7$export$c62b8e45d58ddad9 = Symbol("default");
52
+ function $64fa3d84918910a7$export$2881499e37b75b9a({ values, children }) {
53
+ for (let [Context, value] of values)
54
+ children = /* @__PURE__ */ React__default.createElement(Context.Provider, {
55
+ value
56
+ }, children);
57
+ return children;
58
+ }
59
+ function $64fa3d84918910a7$export$4d86445c2cf5e3(props) {
60
+ let { className, style, children, defaultClassName, defaultChildren, defaultStyle, values } = props;
61
+ return useMemo(() => {
62
+ let computedClassName;
63
+ let computedStyle;
64
+ let computedChildren;
65
+ if (typeof className === "function") computedClassName = className(__spreadProps(__spreadValues({}, values), {
66
+ defaultClassName
67
+ }));
68
+ else computedClassName = className;
69
+ if (typeof style === "function") computedStyle = style(__spreadProps(__spreadValues({}, values), {
70
+ defaultStyle: defaultStyle || {}
71
+ }));
72
+ else computedStyle = style;
73
+ if (typeof children === "function") computedChildren = children(__spreadProps(__spreadValues({}, values), {
74
+ defaultChildren
75
+ }));
76
+ else if (children == null) computedChildren = defaultChildren;
77
+ else computedChildren = children;
78
+ return {
79
+ className: computedClassName !== null && computedClassName !== void 0 ? computedClassName : defaultClassName,
80
+ style: computedStyle || defaultStyle ? __spreadValues(__spreadValues({}, defaultStyle), computedStyle) : void 0,
81
+ children: computedChildren !== null && computedChildren !== void 0 ? computedChildren : defaultChildren,
82
+ "data-rac": ""
83
+ };
84
+ }, [
85
+ className,
86
+ style,
87
+ children,
88
+ defaultClassName,
89
+ defaultChildren,
90
+ defaultStyle,
91
+ values
92
+ ]);
93
+ }
94
+ function $64fa3d84918910a7$export$fabf2dc03a41866e(context, slot) {
95
+ let ctx = useContext(context);
96
+ if (slot === null)
97
+ return null;
98
+ if (ctx && typeof ctx === "object" && "slots" in ctx && ctx.slots) {
99
+ let availableSlots = new Intl.ListFormat().format(Object.keys(ctx.slots).map((p) => `"${p}"`));
100
+ if (!slot && !ctx.slots[$64fa3d84918910a7$export$c62b8e45d58ddad9]) throw new Error(`A slot prop is required. Valid slot names are ${availableSlots}.`);
101
+ let slotKey = slot || $64fa3d84918910a7$export$c62b8e45d58ddad9;
102
+ if (!ctx.slots[slotKey])
103
+ throw new Error(`Invalid slot "${slot}". Valid slot names are ${availableSlots}.`);
104
+ return ctx.slots[slotKey];
105
+ }
106
+ return ctx;
107
+ }
108
+ function $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, context) {
109
+ let ctx = $64fa3d84918910a7$export$fabf2dc03a41866e(context, props.slot) || {};
110
+ let _a = ctx, { ref: contextRef } = _a, contextProps = __objRest(_a, ["ref"]);
111
+ let mergedRef = $df56164dff5785e2$export$4338b53315abf666(useMemo(() => $5dc95899b306f630$export$c9058316764c140e(ref, contextRef), [
112
+ ref,
113
+ contextRef
114
+ ]));
115
+ let mergedProps = $3ef42575df84b30b$export$9d1611c77c2fe928(contextProps, props);
116
+ if ("style" in contextProps && contextProps.style && "style" in props && props.style) {
117
+ if (typeof contextProps.style === "function" || typeof props.style === "function")
118
+ mergedProps.style = (renderProps) => {
119
+ let contextStyle = typeof contextProps.style === "function" ? contextProps.style(renderProps) : contextProps.style;
120
+ let defaultStyle = __spreadValues(__spreadValues({}, renderProps.defaultStyle), contextStyle);
121
+ let style = typeof props.style === "function" ? props.style(__spreadProps(__spreadValues({}, renderProps), {
122
+ defaultStyle
123
+ })) : props.style;
124
+ return __spreadValues(__spreadValues({}, defaultStyle), style);
125
+ };
126
+ else
127
+ mergedProps.style = __spreadValues(__spreadValues({}, contextProps.style), props.style);
128
+ }
129
+ return [
130
+ mergedProps,
131
+ mergedRef
132
+ ];
133
+ }
134
+ function $64fa3d84918910a7$export$9d4c57ee4c6ffdd8() {
135
+ let [hasSlot, setHasSlot] = useState(true);
136
+ let hasRun = useRef(false);
137
+ let ref = useCallback((el) => {
138
+ hasRun.current = true;
139
+ setHasSlot(!!el);
140
+ }, []);
141
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
142
+ if (!hasRun.current) setHasSlot(false);
143
+ }, []);
144
+ return [
145
+ ref,
146
+ hasSlot
147
+ ];
148
+ }
149
+ export {
150
+ $64fa3d84918910a7$export$29f1550f4b0d4415 as $,
151
+ $64fa3d84918910a7$export$4d86445c2cf5e3 as a,
152
+ $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 as b,
153
+ $64fa3d84918910a7$export$2881499e37b75b9a as c,
154
+ $df56164dff5785e2$export$4338b53315abf666 as d
155
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easypost/easy-ui",
3
- "version": "1.0.0-alpha.53",
3
+ "version": "1.0.0-alpha.54",
4
4
  "sideEffects": [
5
5
  "**/*.css"
6
6
  ],