@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.
- package/Badge/index.js +32 -26
- package/Badge/index.mjs +32 -26
- package/Banner/index.js +15 -16
- package/Banner/index.mjs +15 -16
- package/Button/Button.d.ts +61 -0
- package/Button/Button.d.ts.map +1 -1
- package/Button/index.js +34 -69
- package/Button/index.mjs +33 -68
- package/CHANGELOG.md +21 -0
- package/Card/index.js +84 -5
- package/Card/index.mjs +84 -5
- package/Checkbox/index.js +84 -72
- package/Checkbox/index.mjs +84 -72
- package/CodeBlock/index.js +43 -49
- package/CodeBlock/index.mjs +43 -49
- package/DropdownButton/DropdownButton.d.ts +48 -0
- package/DropdownButton/DropdownButton.d.ts.map +1 -1
- package/DropdownButton/index.js +29 -101
- package/DropdownButton/index.mjs +29 -85
- package/HorizontalGrid/index.js +11 -31
- package/HorizontalGrid/index.mjs +11 -31
- package/HorizontalStack/index.js +48 -4
- package/HorizontalStack/index.mjs +48 -4
- package/Icon/Icon.d.ts +51 -0
- package/Icon/Icon.d.ts.map +1 -1
- package/Icon/index.js +38 -4
- package/Icon/index.mjs +38 -4
- package/IconButton/IconButton.d.ts +62 -0
- package/IconButton/IconButton.d.ts.map +1 -1
- package/IconButton/index.js +26 -43
- package/IconButton/index.mjs +25 -42
- package/InputField/Label.d.ts +2 -2
- package/InputField/index.js +282 -10
- package/InputField/index.mjs +266 -10
- package/InputField/utilities.d.ts +1 -1
- package/InputField/utilities.d.ts.map +1 -1
- package/Menu/MenuOverlay.d.ts.map +1 -1
- package/Menu/index.js +178 -1958
- package/Menu/index.mjs +168 -1948
- package/Menu/utilities.d.ts +11 -0
- package/Menu/utilities.d.ts.map +1 -0
- package/Notification/index.js +1534 -14
- package/Notification/index.mjs +1518 -14
- package/Provider/index.js +15 -15
- package/Provider/index.mjs +15 -15
- package/RadioGroup/index.js +63 -63
- package/RadioGroup/index.mjs +63 -63
- package/Select/Select.d.ts +88 -0
- package/Select/Select.d.ts.map +1 -0
- package/Select/Select.stories.d.ts +17 -0
- package/Select/Select.stories.d.ts.map +1 -0
- package/Select/Select.test.d.ts +2 -0
- package/Select/Select.test.d.ts.map +1 -0
- package/Select/SelectContext.d.ts +14 -0
- package/Select/SelectContext.d.ts.map +1 -0
- package/Select/SelectField.d.ts +62 -0
- package/Select/SelectField.d.ts.map +1 -0
- package/Select/SelectOption.d.ts +23 -0
- package/Select/SelectOption.d.ts.map +1 -0
- package/Select/SelectOverlay.d.ts +3 -0
- package/Select/SelectOverlay.d.ts.map +1 -0
- package/Select/SelectSection.d.ts +22 -0
- package/Select/SelectSection.d.ts.map +1 -0
- package/Select/SelectTrigger.d.ts +30 -0
- package/Select/SelectTrigger.d.ts.map +1 -0
- package/Select/index.d.ts +2 -0
- package/Select/index.d.ts.map +1 -0
- package/Select/index.js +816 -0
- package/Select/index.mjs +816 -0
- package/SelectorErrorTooltip/index.js +102 -11
- package/SelectorErrorTooltip/index.mjs +86 -11
- package/Text/index.js +85 -4
- package/Text/index.mjs +85 -4
- package/TextField/index.js +19 -38
- package/TextField/index.mjs +19 -38
- package/Textarea/index.js +20 -37
- package/Textarea/index.mjs +20 -37
- package/Theme/index.js +145 -9
- package/Theme/index.mjs +145 -9
- package/Toggle/index.js +51 -50
- package/Toggle/index.mjs +51 -50
- package/Tooltip/index.js +299 -10
- package/Tooltip/index.mjs +299 -10
- package/UnstyledButton/index.js +4 -4
- package/UnstyledButton/index.mjs +3 -3
- package/VerticalStack/index.js +13 -47
- package/VerticalStack/index.mjs +13 -47
- package/__chunks__/ExpandMore400-7c5263a4.mjs +49 -0
- package/__chunks__/ExpandMore400-92646971.js +65 -0
- package/__chunks__/InputIcon-2317befd.mjs +148 -0
- package/__chunks__/InputIcon-d3963cf8.js +147 -0
- package/__chunks__/{import-e7f45c7e.mjs → import-0561e1ba.mjs} +3 -3
- package/__chunks__/{import-b7971a11.mjs → import-19bc38ac.mjs} +72 -34
- package/__chunks__/{import-01299af6.js → import-24a482e1.js} +3 -2
- package/__chunks__/{import-baa3cd0c.mjs → import-29af6941.mjs} +4 -3
- package/__chunks__/{import-0d1b4d93.js → import-2b302763.js} +193 -141
- package/__chunks__/{import-ab878fb6.mjs → import-3d962a94.mjs} +205 -153
- package/__chunks__/{import-86330a7c.mjs → import-6a831ca1.mjs} +16 -15
- package/__chunks__/{import-7545401a.js → import-8b6c0bc7.js} +3 -3
- package/__chunks__/{import-63bf0645.js → import-a1e0f814.js} +47 -9
- package/__chunks__/{import-3ab42f86.js → import-a2023d8f.js} +35 -22
- package/__chunks__/{import-76076ca6.js → import-dea5a24d.js} +15 -14
- package/__chunks__/{import-856e0385.mjs → import-f1f4792a.mjs} +36 -23
- package/__chunks__/{UnstyledButton-883f0c6c.mjs → index-29d7bca9.mjs} +17 -42
- package/__chunks__/{UnstyledButton-96172ec0.js → index-3985350a.js} +17 -42
- package/__chunks__/{overlayscrollbars-react.es-c8369a03.mjs → overlayscrollbars-react.es-7f332a3b.mjs} +4 -4
- package/__chunks__/{overlayscrollbars-react.es-20563393.js → overlayscrollbars-react.es-f2a0bcff.js} +4 -4
- package/__chunks__/{real-module-e4cd2301.mjs → real-module-515df21d.mjs} +1 -1
- package/__chunks__/{real-module-ae2a4342.js → real-module-e36b1436.js} +1 -1
- package/__chunks__/useTriggerWidth-156b038a.js +2030 -0
- package/__chunks__/useTriggerWidth-addcd1d6.mjs +2031 -0
- package/package.json +11 -11
- package/style.css +1423 -1196
- package/utilities/css.js +14 -58
- package/utilities/css.mjs +14 -58
- package/__chunks__/Card-7bbd41e0.mjs +0 -110
- package/__chunks__/Card-dac53c75.js +0 -109
- package/__chunks__/HorizontalStack-a441c63f.mjs +0 -80
- package/__chunks__/HorizontalStack-a862839b.js +0 -79
- package/__chunks__/Icon-3d00481a.js +0 -44
- package/__chunks__/Icon-a75b5201.mjs +0 -45
- package/__chunks__/InputField-4fbaae06.js +0 -487
- package/__chunks__/InputField-a272f602.mjs +0 -472
- package/__chunks__/Notification-b8eafec6.mjs +0 -1456
- package/__chunks__/Notification-c5b34eb3.js +0 -1471
- package/__chunks__/SelectorErrorTooltip-43c5e29e.js +0 -84
- package/__chunks__/SelectorErrorTooltip-b6204987.mjs +0 -69
- package/__chunks__/Text-1ae70c19.js +0 -102
- package/__chunks__/Text-4ae50d5c.mjs +0 -103
- package/__chunks__/Theme-4e498252.mjs +0 -132
- package/__chunks__/Theme-751e5575.js +0 -131
- package/__chunks__/Tooltip-bd55165e.js +0 -317
- 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,
|
|
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$
|
|
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
|
-
|
|
380
|
-
|
|
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
|
|
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
|
-
|
|
525
|
-
element.addEventListener(event, handler2, options);
|
|
560
|
+
element.addEventListener(event, handleEvent, options);
|
|
526
561
|
return () => {
|
|
527
|
-
element.removeEventListener(event,
|
|
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
|
-
$
|
|
617
|
-
$
|
|
652
|
+
$bdb11010cef70236$export$b4cc09c592e8fdb8 as $,
|
|
653
|
+
$3ef42575df84b30b$export$9d1611c77c2fe928 as a,
|
|
618
654
|
$bdb11010cef70236$export$f680877a34711e37 as b,
|
|
619
|
-
$
|
|
620
|
-
$
|
|
621
|
-
$
|
|
622
|
-
$
|
|
623
|
-
$
|
|
624
|
-
$
|
|
625
|
-
$
|
|
626
|
-
$
|
|
627
|
-
$
|
|
628
|
-
$
|
|
629
|
-
$
|
|
630
|
-
$
|
|
631
|
-
$
|
|
632
|
-
$c87311424ea30a05$export$
|
|
633
|
-
$
|
|
634
|
-
$
|
|
635
|
-
$
|
|
636
|
-
$
|
|
637
|
-
$
|
|
638
|
-
$
|
|
639
|
-
$
|
|
640
|
-
$
|
|
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-
|
|
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 ? `${
|
|
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 {
|
|
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 ? `${
|
|
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
|
};
|