@easypost/easy-ui 1.0.0-alpha.4 → 1.0.0-alpha.6

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 (133) hide show
  1. package/Badge/index.js +32 -26
  2. package/Badge/index.mjs +32 -26
  3. package/Banner/index.js +15 -16
  4. package/Banner/index.mjs +15 -16
  5. package/Button/Button.d.ts +61 -0
  6. package/Button/Button.d.ts.map +1 -1
  7. package/Button/index.js +34 -69
  8. package/Button/index.mjs +33 -68
  9. package/CHANGELOG.md +21 -0
  10. package/Card/index.js +84 -5
  11. package/Card/index.mjs +84 -5
  12. package/Checkbox/index.js +84 -72
  13. package/Checkbox/index.mjs +84 -72
  14. package/CodeBlock/index.js +43 -49
  15. package/CodeBlock/index.mjs +43 -49
  16. package/DropdownButton/DropdownButton.d.ts +48 -0
  17. package/DropdownButton/DropdownButton.d.ts.map +1 -1
  18. package/DropdownButton/index.js +29 -101
  19. package/DropdownButton/index.mjs +29 -85
  20. package/HorizontalGrid/index.js +11 -31
  21. package/HorizontalGrid/index.mjs +11 -31
  22. package/HorizontalStack/index.js +48 -4
  23. package/HorizontalStack/index.mjs +48 -4
  24. package/Icon/Icon.d.ts +51 -0
  25. package/Icon/Icon.d.ts.map +1 -1
  26. package/Icon/index.js +38 -4
  27. package/Icon/index.mjs +38 -4
  28. package/IconButton/IconButton.d.ts +62 -0
  29. package/IconButton/IconButton.d.ts.map +1 -1
  30. package/IconButton/index.js +26 -43
  31. package/IconButton/index.mjs +25 -42
  32. package/InputField/Label.d.ts +2 -2
  33. package/InputField/index.js +282 -10
  34. package/InputField/index.mjs +266 -10
  35. package/InputField/utilities.d.ts +1 -1
  36. package/InputField/utilities.d.ts.map +1 -1
  37. package/Menu/MenuOverlay.d.ts.map +1 -1
  38. package/Menu/index.js +178 -1958
  39. package/Menu/index.mjs +168 -1948
  40. package/Menu/utilities.d.ts +11 -0
  41. package/Menu/utilities.d.ts.map +1 -0
  42. package/Notification/index.js +1534 -14
  43. package/Notification/index.mjs +1518 -14
  44. package/Provider/index.js +15 -15
  45. package/Provider/index.mjs +15 -15
  46. package/RadioGroup/index.js +63 -63
  47. package/RadioGroup/index.mjs +63 -63
  48. package/Select/Select.d.ts +88 -0
  49. package/Select/Select.d.ts.map +1 -0
  50. package/Select/Select.stories.d.ts +17 -0
  51. package/Select/Select.stories.d.ts.map +1 -0
  52. package/Select/Select.test.d.ts +2 -0
  53. package/Select/Select.test.d.ts.map +1 -0
  54. package/Select/SelectContext.d.ts +14 -0
  55. package/Select/SelectContext.d.ts.map +1 -0
  56. package/Select/SelectField.d.ts +62 -0
  57. package/Select/SelectField.d.ts.map +1 -0
  58. package/Select/SelectOption.d.ts +23 -0
  59. package/Select/SelectOption.d.ts.map +1 -0
  60. package/Select/SelectOverlay.d.ts +3 -0
  61. package/Select/SelectOverlay.d.ts.map +1 -0
  62. package/Select/SelectSection.d.ts +22 -0
  63. package/Select/SelectSection.d.ts.map +1 -0
  64. package/Select/SelectTrigger.d.ts +30 -0
  65. package/Select/SelectTrigger.d.ts.map +1 -0
  66. package/Select/index.d.ts +2 -0
  67. package/Select/index.d.ts.map +1 -0
  68. package/Select/index.js +816 -0
  69. package/Select/index.mjs +816 -0
  70. package/SelectorErrorTooltip/index.js +102 -11
  71. package/SelectorErrorTooltip/index.mjs +86 -11
  72. package/Text/index.js +85 -4
  73. package/Text/index.mjs +85 -4
  74. package/TextField/index.js +19 -38
  75. package/TextField/index.mjs +19 -38
  76. package/Textarea/index.js +20 -37
  77. package/Textarea/index.mjs +20 -37
  78. package/Theme/index.js +145 -9
  79. package/Theme/index.mjs +145 -9
  80. package/Toggle/index.js +51 -50
  81. package/Toggle/index.mjs +51 -50
  82. package/Tooltip/index.js +299 -10
  83. package/Tooltip/index.mjs +299 -10
  84. package/UnstyledButton/index.js +4 -4
  85. package/UnstyledButton/index.mjs +3 -3
  86. package/VerticalStack/index.js +13 -47
  87. package/VerticalStack/index.mjs +13 -47
  88. package/__chunks__/ExpandMore400-7c5263a4.mjs +49 -0
  89. package/__chunks__/ExpandMore400-92646971.js +65 -0
  90. package/__chunks__/InputIcon-2317befd.mjs +148 -0
  91. package/__chunks__/InputIcon-d3963cf8.js +147 -0
  92. package/__chunks__/{import-e7f45c7e.mjs → import-0561e1ba.mjs} +3 -3
  93. package/__chunks__/{import-b7971a11.mjs → import-19bc38ac.mjs} +72 -34
  94. package/__chunks__/{import-01299af6.js → import-24a482e1.js} +3 -2
  95. package/__chunks__/{import-baa3cd0c.mjs → import-29af6941.mjs} +4 -3
  96. package/__chunks__/{import-0d1b4d93.js → import-2b302763.js} +193 -141
  97. package/__chunks__/{import-ab878fb6.mjs → import-3d962a94.mjs} +205 -153
  98. package/__chunks__/{import-86330a7c.mjs → import-6a831ca1.mjs} +16 -15
  99. package/__chunks__/{import-7545401a.js → import-8b6c0bc7.js} +3 -3
  100. package/__chunks__/{import-63bf0645.js → import-a1e0f814.js} +47 -9
  101. package/__chunks__/{import-3ab42f86.js → import-a2023d8f.js} +35 -22
  102. package/__chunks__/{import-76076ca6.js → import-dea5a24d.js} +15 -14
  103. package/__chunks__/{import-856e0385.mjs → import-f1f4792a.mjs} +36 -23
  104. package/__chunks__/{UnstyledButton-883f0c6c.mjs → index-29d7bca9.mjs} +17 -42
  105. package/__chunks__/{UnstyledButton-96172ec0.js → index-3985350a.js} +17 -42
  106. package/__chunks__/{overlayscrollbars-react.es-c8369a03.mjs → overlayscrollbars-react.es-7f332a3b.mjs} +4 -4
  107. package/__chunks__/{overlayscrollbars-react.es-20563393.js → overlayscrollbars-react.es-f2a0bcff.js} +4 -4
  108. package/__chunks__/{real-module-e4cd2301.mjs → real-module-515df21d.mjs} +1 -1
  109. package/__chunks__/{real-module-ae2a4342.js → real-module-e36b1436.js} +1 -1
  110. package/__chunks__/useTriggerWidth-156b038a.js +2030 -0
  111. package/__chunks__/useTriggerWidth-addcd1d6.mjs +2031 -0
  112. package/package.json +11 -11
  113. package/style.css +1423 -1196
  114. package/utilities/css.js +14 -58
  115. package/utilities/css.mjs +14 -58
  116. package/__chunks__/Card-7bbd41e0.mjs +0 -110
  117. package/__chunks__/Card-dac53c75.js +0 -109
  118. package/__chunks__/HorizontalStack-a441c63f.mjs +0 -80
  119. package/__chunks__/HorizontalStack-a862839b.js +0 -79
  120. package/__chunks__/Icon-3d00481a.js +0 -44
  121. package/__chunks__/Icon-a75b5201.mjs +0 -45
  122. package/__chunks__/InputField-4fbaae06.js +0 -487
  123. package/__chunks__/InputField-a272f602.mjs +0 -472
  124. package/__chunks__/Notification-b8eafec6.mjs +0 -1456
  125. package/__chunks__/Notification-c5b34eb3.js +0 -1471
  126. package/__chunks__/SelectorErrorTooltip-43c5e29e.js +0 -84
  127. package/__chunks__/SelectorErrorTooltip-b6204987.mjs +0 -69
  128. package/__chunks__/Text-1ae70c19.js +0 -102
  129. package/__chunks__/Text-4ae50d5c.mjs +0 -103
  130. package/__chunks__/Theme-4e498252.mjs +0 -132
  131. package/__chunks__/Theme-751e5575.js +0 -131
  132. package/__chunks__/Tooltip-bd55165e.js +0 -317
  133. package/__chunks__/Tooltip-f7e67b21.mjs +0 -318
@@ -14,7 +14,7 @@ var __spreadValues = (a, b) => {
14
14
  }
15
15
  return a;
16
16
  };
17
- import React__default, { useContext, useRef, useState, useCallback, useEffect } from "react";
17
+ import React__default, { useContext, useState, useRef, useCallback, useEffect } from "react";
18
18
  const $704cf1d3b684cc5c$var$defaultContext = {
19
19
  prefix: String(Math.round(Math.random() * 1e10)),
20
20
  current: 0,
@@ -45,14 +45,33 @@ function $704cf1d3b684cc5c$var$useCounter(isDisabled = false) {
45
45
  }
46
46
  return ref.current;
47
47
  }
48
- function $704cf1d3b684cc5c$export$619500959fc48b26(defaultId) {
48
+ function $704cf1d3b684cc5c$var$useLegacySSRSafeId(defaultId) {
49
49
  let ctx = useContext($704cf1d3b684cc5c$var$SSRContext);
50
50
  if (ctx === $704cf1d3b684cc5c$var$defaultContext && !$704cf1d3b684cc5c$var$canUseDOM)
51
51
  console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
52
52
  let counter = $704cf1d3b684cc5c$var$useCounter(!!defaultId);
53
53
  return defaultId || `react-aria${ctx.prefix}-${counter}`;
54
54
  }
55
+ function $704cf1d3b684cc5c$var$useModernSSRSafeId(defaultId) {
56
+ let id = React__default.useId();
57
+ let [didSSR] = useState($704cf1d3b684cc5c$export$535bd6ca7f90a273());
58
+ let prefix = didSSR ? "react-aria" : `react-aria${$704cf1d3b684cc5c$var$defaultContext.prefix}`;
59
+ return defaultId || `${prefix}-${id}`;
60
+ }
61
+ const $704cf1d3b684cc5c$export$619500959fc48b26 = typeof React__default["useId"] === "function" ? $704cf1d3b684cc5c$var$useModernSSRSafeId : $704cf1d3b684cc5c$var$useLegacySSRSafeId;
62
+ function $704cf1d3b684cc5c$var$getSnapshot() {
63
+ return false;
64
+ }
65
+ function $704cf1d3b684cc5c$var$getServerSnapshot() {
66
+ return true;
67
+ }
68
+ function $704cf1d3b684cc5c$var$subscribe(onStoreChange) {
69
+ return () => {
70
+ };
71
+ }
55
72
  function $704cf1d3b684cc5c$export$535bd6ca7f90a273() {
73
+ if (typeof React__default["useSyncExternalStore"] === "function")
74
+ return React__default["useSyncExternalStore"]($704cf1d3b684cc5c$var$subscribe, $704cf1d3b684cc5c$var$getSnapshot, $704cf1d3b684cc5c$var$getServerSnapshot);
56
75
  let cur = useContext($704cf1d3b684cc5c$var$SSRContext);
57
76
  return cur.isSSR;
58
77
  }
@@ -376,8 +395,8 @@ function $313b98861ee5dd6c$export$d6875122194c7b44(props, defaultLabel) {
376
395
  id = $bdb11010cef70236$export$f680877a34711e37(id);
377
396
  if (labelledBy && label) {
378
397
  let ids = /* @__PURE__ */ new Set([
379
- ...labelledBy.trim().split(/\s+/),
380
- id
398
+ id,
399
+ ...labelledBy.trim().split(/\s+/)
381
400
  ]);
382
401
  labelledBy = [
383
402
  ...ids
@@ -510,27 +529,44 @@ function $c87311424ea30a05$export$fedb369cb70207f1() {
510
529
  function $c87311424ea30a05$export$e1865c3bedcd822b() {
511
530
  return $c87311424ea30a05$export$9ac100e40613ea10() || $c87311424ea30a05$export$fedb369cb70207f1();
512
531
  }
532
+ function $c87311424ea30a05$export$78551043582a6a98() {
533
+ return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i) && !$c87311424ea30a05$export$6446a186d09e379e();
534
+ }
535
+ function $c87311424ea30a05$export$6446a186d09e379e() {
536
+ return $c87311424ea30a05$var$testUserAgent(/Chrome/i);
537
+ }
513
538
  function $c87311424ea30a05$export$a11b0059900ceec8() {
514
539
  return $c87311424ea30a05$var$testUserAgent(/Android/i);
515
540
  }
541
+ function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
542
+ const ref = useRef(null);
543
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
544
+ ref.current = fn;
545
+ }, [
546
+ fn
547
+ ]);
548
+ return useCallback((...args) => {
549
+ const f = ref.current;
550
+ return f(...args);
551
+ }, []);
552
+ }
516
553
  function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options) {
517
- let handlerRef = useRef(handler);
518
- handlerRef.current = handler;
554
+ let handleEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(handler);
519
555
  let isDisabled = handler == null;
520
556
  useEffect(() => {
521
557
  if (isDisabled)
522
558
  return;
523
559
  let element = ref.current;
524
- let handler2 = (e) => handlerRef.current.call(this, e);
525
- element.addEventListener(event, handler2, options);
560
+ element.addEventListener(event, handleEvent, options);
526
561
  return () => {
527
- element.removeEventListener(event, handler2, options);
562
+ element.removeEventListener(event, handleEvent, options);
528
563
  };
529
564
  }, [
530
565
  ref,
531
566
  event,
532
567
  options,
533
- isDisabled
568
+ isDisabled,
569
+ handleEvent
534
570
  ]);
535
571
  }
536
572
  function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element) {
@@ -613,29 +649,31 @@ function $6a7db85432448f7f$export$29bf1b5f2c56cf63(event) {
613
649
  return event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse";
614
650
  }
615
651
  export {
616
- $3ef42575df84b30b$export$9d1611c77c2fe928 as $,
617
- $65484d02dcb7eb3e$export$457c3d6518dd4c6f as a,
652
+ $bdb11010cef70236$export$b4cc09c592e8fdb8 as $,
653
+ $3ef42575df84b30b$export$9d1611c77c2fe928 as a,
618
654
  $bdb11010cef70236$export$f680877a34711e37 as b,
619
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as c,
620
- $bdb11010cef70236$export$b4cc09c592e8fdb8 as d,
621
- $7215afc6de606d6b$export$de79e2c695e052f3 as e,
622
- $e9faafb641e167db$export$90fc3a17d93f704c as f,
623
- $2f04cbc44ee30ce0$export$53a0910f038337bd as g,
624
- $2f04cbc44ee30ce0$export$c826860796309d1b as h,
625
- $62d8ded9296f3872$export$2bb74740c4e19def as i,
626
- $c87311424ea30a05$export$e1865c3bedcd822b as j,
627
- $c87311424ea30a05$export$9ac100e40613ea10 as k,
628
- $9daab02d461809db$export$683480f191c0e3ea as l,
629
- $313b98861ee5dd6c$export$d6875122194c7b44 as m,
630
- $5dc95899b306f630$export$c9058316764c140e as n,
631
- $704cf1d3b684cc5c$export$535bd6ca7f90a273 as o,
632
- $c87311424ea30a05$export$fedb369cb70207f1 as p,
633
- $ff5963eb1fccf552$export$e08e3b67e392101e as q,
634
- $62d8ded9296f3872$export$cfa2225e87938781 as r,
635
- $03deb23ff14920c4$export$4eaf04e54aa8eed6 as s,
636
- $6a7db85432448f7f$export$29bf1b5f2c56cf63 as t,
637
- $6a7db85432448f7f$export$60278871457622de as u,
638
- $ef06256079686ba0$export$f8aeda7b10753fa1 as v,
639
- $bbed8b41f857bcc0$export$24490316f764c430 as w,
640
- $e7801be82b4b2a53$export$4debdb1a3f0fa79e as x
655
+ $313b98861ee5dd6c$export$d6875122194c7b44 as c,
656
+ $65484d02dcb7eb3e$export$457c3d6518dd4c6f as d,
657
+ $704cf1d3b684cc5c$export$535bd6ca7f90a273 as e,
658
+ $03deb23ff14920c4$export$4eaf04e54aa8eed6 as f,
659
+ $8ae05eaa5c114e9c$export$7f54fc3180508a52 as g,
660
+ $6a7db85432448f7f$export$29bf1b5f2c56cf63 as h,
661
+ $7215afc6de606d6b$export$de79e2c695e052f3 as i,
662
+ $6a7db85432448f7f$export$60278871457622de as j,
663
+ $ef06256079686ba0$export$f8aeda7b10753fa1 as k,
664
+ $c87311424ea30a05$export$fedb369cb70207f1 as l,
665
+ $bbed8b41f857bcc0$export$24490316f764c430 as m,
666
+ $e7801be82b4b2a53$export$4debdb1a3f0fa79e as n,
667
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as o,
668
+ $c87311424ea30a05$export$9ac100e40613ea10 as p,
669
+ $9daab02d461809db$export$683480f191c0e3ea as q,
670
+ $ff5963eb1fccf552$export$e08e3b67e392101e as r,
671
+ $62d8ded9296f3872$export$cfa2225e87938781 as s,
672
+ $62d8ded9296f3872$export$2bb74740c4e19def as t,
673
+ $e9faafb641e167db$export$90fc3a17d93f704c as u,
674
+ $2f04cbc44ee30ce0$export$53a0910f038337bd as v,
675
+ $2f04cbc44ee30ce0$export$c826860796309d1b as w,
676
+ $c87311424ea30a05$export$e1865c3bedcd822b as x,
677
+ $c87311424ea30a05$export$78551043582a6a98 as y,
678
+ $5dc95899b306f630$export$c9058316764c140e as z
641
679
  };
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
- const _import = require("./import-63bf0645.js");
2
+ const _import = require("./import-a1e0f814.js");
3
3
  function $d191a55c9702f145$export$8467354a121f1b9f(props) {
4
4
  let { id, label, "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, labelElementType = "label" } = props;
5
5
  id = _import.$bdb11010cef70236$export$f680877a34711e37(id);
6
6
  let labelId = _import.$bdb11010cef70236$export$f680877a34711e37();
7
7
  let labelProps = {};
8
8
  if (label) {
9
- ariaLabelledby = ariaLabelledby ? `${ariaLabelledby} ${labelId}` : labelId;
9
+ ariaLabelledby = ariaLabelledby ? `${labelId} ${ariaLabelledby}` : labelId;
10
10
  labelProps = {
11
11
  id: labelId,
12
12
  htmlFor: labelElementType === "label" ? id : void 0
@@ -56,3 +56,4 @@ function $2baaea4c71418dea$export$294aa081a6c6f55d(props) {
56
56
  };
57
57
  }
58
58
  exports.$2baaea4c71418dea$export$294aa081a6c6f55d = $2baaea4c71418dea$export$294aa081a6c6f55d;
59
+ exports.$d191a55c9702f145$export$8467354a121f1b9f = $d191a55c9702f145$export$8467354a121f1b9f;
@@ -1,11 +1,11 @@
1
- import { d as $bdb11010cef70236$export$b4cc09c592e8fdb8, $ as $3ef42575df84b30b$export$9d1611c77c2fe928, b as $bdb11010cef70236$export$f680877a34711e37, m as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./import-b7971a11.mjs";
1
+ import { $ as $bdb11010cef70236$export$b4cc09c592e8fdb8, a as $3ef42575df84b30b$export$9d1611c77c2fe928, b as $bdb11010cef70236$export$f680877a34711e37, c as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./import-19bc38ac.mjs";
2
2
  function $d191a55c9702f145$export$8467354a121f1b9f(props) {
3
3
  let { id, label, "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, labelElementType = "label" } = props;
4
4
  id = $bdb11010cef70236$export$f680877a34711e37(id);
5
5
  let labelId = $bdb11010cef70236$export$f680877a34711e37();
6
6
  let labelProps = {};
7
7
  if (label) {
8
- ariaLabelledby = ariaLabelledby ? `${ariaLabelledby} ${labelId}` : labelId;
8
+ ariaLabelledby = ariaLabelledby ? `${labelId} ${ariaLabelledby}` : labelId;
9
9
  labelProps = {
10
10
  id: labelId,
11
11
  htmlFor: labelElementType === "label" ? id : void 0
@@ -55,5 +55,6 @@ function $2baaea4c71418dea$export$294aa081a6c6f55d(props) {
55
55
  };
56
56
  }
57
57
  export {
58
- $2baaea4c71418dea$export$294aa081a6c6f55d as $
58
+ $2baaea4c71418dea$export$294aa081a6c6f55d as $,
59
+ $d191a55c9702f145$export$8467354a121f1b9f as a
59
60
  };