@eightshift/ui-components 1.0.6 → 1.1.1
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/README.md +9 -0
- package/dist/{Button-eebLs4cp.js → Button-CbFrFO04.js} +5 -5
- package/dist/{Checkbox-BN0TEda-.js → Checkbox-Cv3pZDHg.js} +12 -16
- package/dist/{ColorSwatch-BrowHhTG.js → ColorSwatch-CNQmCQV8.js} +6 -7
- package/dist/{FieldError-ILxgMZy5.js → FieldError-J1-YPbi6.js} +2 -2
- package/dist/{FocusScope-B9b0VMib.js → FocusScope-Bw-IatMO.js} +79 -153
- package/dist/{GridList-CzpWxJsS.js → GridList-CEzzyr-l.js} +62 -90
- package/dist/{Group-Dkdm2-E7.js → Group-D3Qa6PrV.js} +3 -3
- package/dist/{Input-BJA4rmIo.js → Input-CX_rocyZ.js} +8 -8
- package/dist/{Label-9x5iLJ-Y.js → Label-Bg5O81Wb.js} +1 -1
- package/dist/{ListBox-D3Vr4vvC.js → ListBox-CCWXTj0t.js} +391 -598
- package/dist/{LiveAnnouncer-IsokfWQ5.js → LiveAnnouncer-D8h-3GrG.js} +12 -22
- package/dist/{NumberFormatter-LzoKy975.js → NumberFormatter-U_Gx0UDq.js} +26 -44
- package/dist/{Select-49a62830.esm-CKPmlkza.js → Select-49a62830.esm-BnlXlUnT.js} +92 -166
- package/dist/{SelectionManager-sedvcM-1.js → SelectionManager-XOAt-Ekx.js} +219 -401
- package/dist/{Separator-B6rnDabE.js → Separator-DZeg0KOr.js} +41 -72
- package/dist/{Slider-C5U5N7uM.js → Slider-fULMI0gI.js} +51 -82
- package/dist/{Text-Cyxp9ewv.js → Text-WqetJduR.js} +1 -1
- package/dist/{VisuallyHidden-BPJVSUyp.js → VisuallyHidden-Di1zXprL.js} +8 -11
- package/dist/{ariaHideOutside-ByKBPHmX.js → ariaHideOutside-Zn64-frS.js} +20 -36
- package/dist/assets/style.css +1 -1
- package/dist/assets/wp-font-enhancements.css +1 -1
- package/dist/assets/wp-ui-enhancements.css +1 -1
- package/dist/{button-idVI4jmd.js → button-CD8Q1eok.js} +17 -29
- package/dist/components/animated-visibility/animated-visibility.js +125 -113
- package/dist/components/base-control/base-control.js +3 -9
- package/dist/components/breakpoint-preview/breakpoint-preview.js +51 -108
- package/dist/components/button/button.js +6 -6
- package/dist/components/checkbox/checkbox.js +2 -2
- package/dist/components/color-pickers/color-picker.js +2 -2
- package/dist/components/color-pickers/color-swatch.js +5 -9
- package/dist/components/color-pickers/gradient-editor.js +15 -29
- package/dist/components/color-pickers/solid-color-picker.js +81 -128
- package/dist/components/component-toggle/component-toggle.js +4 -4
- package/dist/components/container-panel/container-panel.js +4 -11
- package/dist/components/draggable-list/draggable-list-item.js +4 -4
- package/dist/components/draggable-list/draggable-list.js +5 -5
- package/dist/components/expandable/expandable.js +45 -57
- package/dist/components/index.js +3 -3
- package/dist/components/input-field/input-field.js +11 -26
- package/dist/components/layout/hstack.js +2 -12
- package/dist/components/layout/vstack.js +2 -12
- package/dist/components/link-input/link-input.js +36 -53
- package/dist/components/list-box/list-box.js +4 -4
- package/dist/components/matrix-align/matrix-align.js +6 -10
- package/dist/components/menu/menu.js +101 -170
- package/dist/components/notice/notice.js +1 -1
- package/dist/components/number-picker/number-picker.js +15 -15
- package/dist/components/option-select/option-select.js +48 -64
- package/dist/components/options-panel/options-panel.js +3 -3
- package/dist/components/placeholders/file-placeholder.js +2 -2
- package/dist/components/placeholders/image-placeholder.js +1 -1
- package/dist/components/placeholders/media-placeholder.js +1 -1
- package/dist/components/popover/popover.js +4 -4
- package/dist/components/radio/radio.js +25 -38
- package/dist/components/repeater/repeater-item.js +6 -17
- package/dist/components/repeater/repeater.js +6 -7
- package/dist/components/responsive/responsive-legacy.js +6 -12
- package/dist/components/responsive/responsive.js +21 -48
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/rich-label/rich-label.js +2 -8
- package/dist/components/select/async-multi-select.js +3 -3
- package/dist/components/select/async-single-select.js +2 -2
- package/dist/components/select/custom-select-default-components.js +2 -2
- package/dist/components/select/multi-select-components.js +2 -2
- package/dist/components/select/multi-select.js +3 -3
- package/dist/components/select/react-select-component-wrappers.js +9 -9
- package/dist/components/select/single-select.js +2 -2
- package/dist/components/select/styles.js +3 -10
- package/dist/components/slider/column-config-slider.js +4 -4
- package/dist/components/slider/slider.js +5 -8
- package/dist/components/slider/utils.js +2 -6
- package/dist/components/spacer/spacer.js +2 -7
- package/dist/components/tabs/tabs.js +29 -50
- package/dist/components/toggle/switch.js +8 -8
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +8 -22
- package/dist/components/tooltip/tooltip.js +4 -4
- package/dist/{context-BAcFg5GO.js → context-4oSz1ItD.js} +10 -16
- package/dist/{default-i18n-Bk1GxDHz.js → default-i18n-BqwLkgZv.js} +21 -22
- package/dist/{filterDOMProps-DG2RfOUr.js → filterDOMProps-EDDcM64A.js} +1 -3
- package/dist/{focusSafely-B0hyd-S4.js → focusSafely-BS4dllCW.js} +85 -143
- package/dist/icons/generic-color-swatch.js +105 -13
- package/dist/icons/icons.js +31010 -3447
- package/dist/icons/jsx-svg.js +591 -953
- package/dist/{index-BDk0TPWz.js → index-CAPcSs9K.js} +1504 -2087
- package/dist/{index-a301f526.esm-BzTuHLdr.js → index-a301f526.esm-ByOfDxiG.js} +111 -183
- package/dist/index.js +3 -3
- package/dist/{intlStrings-Ctkp0HDc.js → intlStrings-Dxaeitoh.js} +35 -60
- package/dist/{isScrollable-PcyglExV.js → isScrollable-Dh9D9IOd.js} +1 -2
- package/dist/lite-DVmmD_-j.js +7 -0
- package/dist/{multi-select-components-nORKdJ-2.js → multi-select-components-7vKCF8dG.js} +3 -3
- package/dist/{number-rWqELA8W.js → number-CHmNj-oR.js} +3 -6
- package/dist/{popover-o2Q28Ljn.js → popover-Dk2o4S7K.js} +70 -112
- package/dist/{react-select-async.esm-CLj9uZTq.js → react-select-async.esm-5zW9Dv9E.js} +7 -11
- package/dist/{react-select.esm-3tyTZmrx.js → react-select.esm-Bi6uzjbT.js} +3 -3
- package/dist/{textSelection-BRZdHY-4.js → textSelection-exP_9srp.js} +5 -9
- package/dist/{tooltip-T6H9uF-Z.js → tooltip-BRQ4tvZL.js} +64 -111
- package/dist/{useButton-D-xACzEY.js → useButton-DbjDV_33.js} +19 -22
- package/dist/{useEvent-XlYPKgwX.js → useEvent-zvxfEnmK.js} +2 -3
- package/dist/{useFocusRing-CRx_hYC4.js → useFocusRing-SPRI0-SN.js} +1 -1
- package/dist/{useFocusable-CHfpEdlE.js → useFocusable-CLmhO94g.js} +5 -8
- package/dist/{useFormReset-aHn6-wRk.js → useFormReset-BVWgcyGO.js} +2 -3
- package/dist/{useFormValidationState-CdYmOaXI.js → useFormValidationState-CthG9Fbc.js} +20 -38
- package/dist/{useHasTabbableChild-domoFB7A.js → useHasTabbableChild--gkWUICh.js} +2 -2
- package/dist/{useLabel-DVhXVhtH.js → useLabel-g836T8kL.js} +3 -4
- package/dist/{useLabels-C7E5SkOi.js → useLabels-CfOtyOe2.js} +3 -5
- package/dist/{useListData-BelKu4kx.js → useListData-BpYQj7kK.js} +18 -32
- package/dist/{useListState-BRsq7O1C.js → useListState-DnWZa__1.js} +6 -12
- package/dist/{useLocalizedStringFormatter-WsEL47qR.js → useLocalizedStringFormatter-BQCMno9k.js} +12 -21
- package/dist/{useNumberFieldState-ZH2Qyyxh.js → useNumberFieldState-BegO5X6F.js} +75 -132
- package/dist/{useNumberFormatter-mhdYLxWQ.js → useNumberFormatter-DhOGEsEK.js} +2 -2
- package/dist/{usePress-B42RawCH.js → usePress-CScNeV3V.js} +92 -175
- package/dist/{useToggle-CExfZM8x.js → useToggle-6LnpaJ7-.js} +6 -7
- package/dist/{useToggleState-DghG5ImG.js → useToggleState-Cymkpac8.js} +3 -5
- package/dist/utilities/array-helpers.js +1 -1
- package/dist/utilities/index.js +1 -1
- package/dist/utilities/text-helpers.js +20 -20
- package/dist/{utils-DIBzm1e4.js → utils-Dc35LwuT.js} +49 -90
- package/package.json +96 -90
- package/dist/lite-pbIeT7tm.js +0 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4, b as $9446cca9a3875146$export$b6268554fba451f } from "./number-
|
|
2
|
-
import { a as $5b160d28a433310d$export$c17fa47878dc55b6, b as $6db58dc88e78b024$export$2f817fcdc4b89ae0 } from "./useLocalizedStringFormatter-
|
|
3
|
-
import { $ as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 } from "./NumberFormatter-
|
|
1
|
+
import { $ as $9446cca9a3875146$export$7d15b64cf5a3a4c4, b as $9446cca9a3875146$export$b6268554fba451f } from "./number-CHmNj-oR.js";
|
|
2
|
+
import { a as $5b160d28a433310d$export$c17fa47878dc55b6, b as $6db58dc88e78b024$export$2f817fcdc4b89ae0 } from "./useLocalizedStringFormatter-BQCMno9k.js";
|
|
3
|
+
import { $ as $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5 } from "./NumberFormatter-U_Gx0UDq.js";
|
|
4
4
|
var $2d805fd52bb48883$exports = {};
|
|
5
5
|
$2d805fd52bb48883$exports = {
|
|
6
6
|
"alpha": `ألفا`,
|
|
@@ -1404,15 +1404,12 @@ function $parcel$interopDefault(a) {
|
|
|
1404
1404
|
let $799cddbef784668f$var$dictionary = new $5b160d28a433310d$export$c17fa47878dc55b6($parcel$interopDefault($f98dad178a72c00d$exports));
|
|
1405
1405
|
function $799cddbef784668f$export$6e865ea70d7724f(value) {
|
|
1406
1406
|
let res = $799cddbef784668f$var$RGBColor.parse(value) || $799cddbef784668f$var$HSBColor.parse(value) || $799cddbef784668f$var$HSLColor.parse(value);
|
|
1407
|
-
if (res)
|
|
1408
|
-
return res;
|
|
1407
|
+
if (res) return res;
|
|
1409
1408
|
throw new Error("Invalid color value: " + value);
|
|
1410
1409
|
}
|
|
1411
1410
|
function $799cddbef784668f$export$4cde5df63f53f473(v) {
|
|
1412
|
-
if (typeof v === "string")
|
|
1413
|
-
|
|
1414
|
-
else
|
|
1415
|
-
return v;
|
|
1411
|
+
if (typeof v === "string") return $799cddbef784668f$export$6e865ea70d7724f(v);
|
|
1412
|
+
else return v;
|
|
1416
1413
|
}
|
|
1417
1414
|
const $799cddbef784668f$var$ORANGE_LIGHTNESS_THRESHOLD = 0.68;
|
|
1418
1415
|
const $799cddbef784668f$var$YELLOW_GREEN_LIGHTNESS_THRESHOLD = 0.85;
|
|
@@ -1465,8 +1462,7 @@ class $799cddbef784668f$var$Color {
|
|
|
1465
1462
|
return this.toFormat("rgb").toHexInt();
|
|
1466
1463
|
}
|
|
1467
1464
|
getChannelValue(channel) {
|
|
1468
|
-
if (channel in this)
|
|
1469
|
-
return this[channel];
|
|
1465
|
+
if (channel in this) return this[channel];
|
|
1470
1466
|
throw new Error("Unsupported color channel: " + channel);
|
|
1471
1467
|
}
|
|
1472
1468
|
withChannelValue(channel, value) {
|
|
@@ -1495,35 +1491,23 @@ class $799cddbef784668f$var$Color {
|
|
|
1495
1491
|
getColorName(locale) {
|
|
1496
1492
|
let [l, c, h] = $799cddbef784668f$var$toOKLCH(this);
|
|
1497
1493
|
let strings = $5b160d28a433310d$export$c17fa47878dc55b6.getGlobalDictionaryForPackage("@react-stately/color") || $799cddbef784668f$var$dictionary;
|
|
1498
|
-
if (l > 0.999)
|
|
1499
|
-
|
|
1500
|
-
if (l < 1e-3)
|
|
1501
|
-
return strings.getStringForLocale("black", locale);
|
|
1494
|
+
if (l > 0.999) return strings.getStringForLocale("white", locale);
|
|
1495
|
+
if (l < 1e-3) return strings.getStringForLocale("black", locale);
|
|
1502
1496
|
let hue;
|
|
1503
1497
|
[hue, l] = this.getOklchHue(l, c, h, locale);
|
|
1504
1498
|
let lightness = "";
|
|
1505
1499
|
let chroma = "";
|
|
1506
1500
|
if (c <= 0.1 && c >= $799cddbef784668f$var$GRAY_THRESHOLD) {
|
|
1507
|
-
if (l >= 0.7)
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
if (l < 0.
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
else if (l < 0.7)
|
|
1518
|
-
;
|
|
1519
|
-
else if (l < 0.85)
|
|
1520
|
-
lightness = "light";
|
|
1521
|
-
else
|
|
1522
|
-
lightness = "very light";
|
|
1523
|
-
if (chroma)
|
|
1524
|
-
chroma = strings.getStringForLocale(chroma, locale);
|
|
1525
|
-
if (lightness)
|
|
1526
|
-
lightness = strings.getStringForLocale(lightness, locale);
|
|
1501
|
+
if (l >= 0.7) chroma = "pale";
|
|
1502
|
+
else chroma = "grayish";
|
|
1503
|
+
} else if (c >= 0.15) chroma = "vibrant";
|
|
1504
|
+
if (l < 0.3) lightness = "very dark";
|
|
1505
|
+
else if (l < $799cddbef784668f$var$MAX_DARK_LIGHTNESS) lightness = "dark";
|
|
1506
|
+
else if (l < 0.7) ;
|
|
1507
|
+
else if (l < 0.85) lightness = "light";
|
|
1508
|
+
else lightness = "very light";
|
|
1509
|
+
if (chroma) chroma = strings.getStringForLocale(chroma, locale);
|
|
1510
|
+
if (lightness) lightness = strings.getStringForLocale(lightness, locale);
|
|
1527
1511
|
let alpha = this.getChannelValue("alpha");
|
|
1528
1512
|
let formatter = new $6db58dc88e78b024$export$2f817fcdc4b89ae0(locale, strings);
|
|
1529
1513
|
if (alpha < 1) {
|
|
@@ -1536,20 +1520,18 @@ class $799cddbef784668f$var$Color {
|
|
|
1536
1520
|
hue,
|
|
1537
1521
|
percentTransparent
|
|
1538
1522
|
}).replace(/\s+/g, " ").trim();
|
|
1539
|
-
} else
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
}).replace(/\s+/g, " ").trim();
|
|
1523
|
+
} else return formatter.format("colorName", {
|
|
1524
|
+
lightness,
|
|
1525
|
+
chroma,
|
|
1526
|
+
hue
|
|
1527
|
+
}).replace(/\s+/g, " ").trim();
|
|
1545
1528
|
}
|
|
1546
1529
|
getOklchHue(l, c, h, locale) {
|
|
1547
1530
|
let strings = $5b160d28a433310d$export$c17fa47878dc55b6.getGlobalDictionaryForPackage("@react-stately/color") || $799cddbef784668f$var$dictionary;
|
|
1548
|
-
if (c < $799cddbef784668f$var$GRAY_THRESHOLD)
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
];
|
|
1531
|
+
if (c < $799cddbef784668f$var$GRAY_THRESHOLD) return [
|
|
1532
|
+
strings.getStringForLocale("gray", locale),
|
|
1533
|
+
l
|
|
1534
|
+
];
|
|
1553
1535
|
for (let i = 0; i < $799cddbef784668f$var$OKLCH_HUES.length; i++) {
|
|
1554
1536
|
let [hue, hueName] = $799cddbef784668f$var$OKLCH_HUES[i];
|
|
1555
1537
|
let [nextHue, nextHueName] = $799cddbef784668f$var$OKLCH_HUES[i + 1] || [
|
|
@@ -1558,13 +1540,11 @@ class $799cddbef784668f$var$Color {
|
|
|
1558
1540
|
];
|
|
1559
1541
|
if (h >= hue && h < nextHue) {
|
|
1560
1542
|
if (hueName === "orange") {
|
|
1561
|
-
if (l < $799cddbef784668f$var$ORANGE_LIGHTNESS_THRESHOLD)
|
|
1562
|
-
hueName = "brown";
|
|
1543
|
+
if (l < $799cddbef784668f$var$ORANGE_LIGHTNESS_THRESHOLD) hueName = "brown";
|
|
1563
1544
|
else
|
|
1564
1545
|
l = l - $799cddbef784668f$var$ORANGE_LIGHTNESS_THRESHOLD + $799cddbef784668f$var$MAX_DARK_LIGHTNESS;
|
|
1565
1546
|
}
|
|
1566
|
-
if (h > hue + (nextHue - hue) / 2 && hueName !== nextHueName)
|
|
1567
|
-
hueName = `${hueName} ${nextHueName}`;
|
|
1547
|
+
if (h > hue + (nextHue - hue) / 2 && hueName !== nextHueName) hueName = `${hueName} ${nextHueName}`;
|
|
1568
1548
|
else if (hueName === "yellow" && l < $799cddbef784668f$var$YELLOW_GREEN_LIGHTNESS_THRESHOLD)
|
|
1569
1549
|
hueName = "yellow green";
|
|
1570
1550
|
let name = strings.getStringForLocale(hueName, locale).toLocaleLowerCase(locale);
|
|
@@ -1592,8 +1572,7 @@ class $799cddbef784668f$var$RGBColor extends $799cddbef784668f$var$Color {
|
|
|
1592
1572
|
9
|
|
1593
1573
|
].includes(value.length)) {
|
|
1594
1574
|
const values = (value.length < 6 ? value.replace(/[^#]/gi, "$&$&") : value).slice(1).split("");
|
|
1595
|
-
while (values.length > 0)
|
|
1596
|
-
colors.push(parseInt(values.splice(0, 2).join(""), 16));
|
|
1575
|
+
while (values.length > 0) colors.push(parseInt(values.splice(0, 2).join(""), 16));
|
|
1597
1576
|
colors[3] = colors[3] !== void 0 ? colors[3] / 255 : void 0;
|
|
1598
1577
|
}
|
|
1599
1578
|
const match = value.match(/^rgba?\((.*)\)$/);
|
|
@@ -1684,8 +1663,7 @@ class $799cddbef784668f$var$RGBColor extends $799cddbef784668f$var$Color {
|
|
|
1684
1663
|
const chroma = max - min;
|
|
1685
1664
|
let hue;
|
|
1686
1665
|
let saturation;
|
|
1687
|
-
if (chroma === 0)
|
|
1688
|
-
hue = saturation = 0;
|
|
1666
|
+
if (chroma === 0) hue = saturation = 0;
|
|
1689
1667
|
else {
|
|
1690
1668
|
saturation = chroma / (lightness < 0.5 ? max + min : 2 - max - min);
|
|
1691
1669
|
switch (max) {
|
|
@@ -1885,8 +1863,7 @@ class $799cddbef784668f$var$HSBColor extends $799cddbef784668f$var$Color {
|
|
|
1885
1863
|
formatChannelValue(channel, locale) {
|
|
1886
1864
|
let options = this.getChannelFormatOptions(channel);
|
|
1887
1865
|
let value = this.getChannelValue(channel);
|
|
1888
|
-
if (channel === "saturation" || channel === "brightness")
|
|
1889
|
-
value /= 100;
|
|
1866
|
+
if (channel === "saturation" || channel === "brightness") value /= 100;
|
|
1890
1867
|
return new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(locale, options).format(value);
|
|
1891
1868
|
}
|
|
1892
1869
|
getColorSpace() {
|
|
@@ -2028,8 +2005,7 @@ class $799cddbef784668f$var$HSLColor extends $799cddbef784668f$var$Color {
|
|
|
2028
2005
|
formatChannelValue(channel, locale) {
|
|
2029
2006
|
let options = this.getChannelFormatOptions(channel);
|
|
2030
2007
|
let value = this.getChannelValue(channel);
|
|
2031
|
-
if (channel === "saturation" || channel === "lightness")
|
|
2032
|
-
value /= 100;
|
|
2008
|
+
if (channel === "saturation" || channel === "lightness") value /= 100;
|
|
2033
2009
|
return new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(locale, options).format(value);
|
|
2034
2010
|
}
|
|
2035
2011
|
getColorSpace() {
|
|
@@ -2080,8 +2056,7 @@ function $799cddbef784668f$var$lin_sRGB(r, g, b) {
|
|
|
2080
2056
|
function $799cddbef784668f$var$lin_sRGB_component(val) {
|
|
2081
2057
|
let sign = val < 0 ? -1 : 1;
|
|
2082
2058
|
let abs = Math.abs(val);
|
|
2083
|
-
if (abs <= 0.04045)
|
|
2084
|
-
return val / 12.92;
|
|
2059
|
+
if (abs <= 0.04045) return val / 12.92;
|
|
2085
2060
|
return sign * Math.pow((abs + 0.055) / 1.055, 2.4);
|
|
2086
2061
|
}
|
|
2087
2062
|
function $799cddbef784668f$var$lin_sRGB_to_XYZ(r, g, b) {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
function $cc38e7bd3fc7b213$export$2bb74740c4e19def(node, checkForOverflow) {
|
|
2
2
|
let style = window.getComputedStyle(node);
|
|
3
3
|
let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
|
|
4
|
-
if (isScrollable && checkForOverflow)
|
|
5
|
-
isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;
|
|
4
|
+
if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;
|
|
6
5
|
return isScrollable;
|
|
7
6
|
}
|
|
8
7
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { useMemo, useLayoutEffect, useEffect, useRef, useCallback, useState, createContext, memo, useReducer, useContext } from "react";
|
|
3
|
-
import { r as reactDomExports } from "./index-
|
|
4
|
-
import { c as clsx } from "./lite-
|
|
3
|
+
import { r as reactDomExports } from "./index-CAPcSs9K.js";
|
|
4
|
+
import { c as clsx } from "./lite-DVmmD_-j.js";
|
|
5
5
|
function useCombinedRefs() {
|
|
6
6
|
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
7
7
|
refs[_key] = arguments[_key];
|
|
@@ -3641,7 +3641,7 @@ const getMultiValue = (ComponentToRender) => {
|
|
|
3641
3641
|
// Make non-dragged tiles have no pointer events, so you don't see hover styles on things like the remove button.
|
|
3642
3642
|
CSS.Translate.toString(transform) && "[&_>_div]:es-uic-pointer-events-none",
|
|
3643
3643
|
// Make the currently grabbed item into a fancy holo-like thing.
|
|
3644
|
-
isDragging && "es-uic-z-50 [&_>_div]:!es-uic-border [&_>_div]:es-uic-border-dotted [&_>_div]:!es-uic-border-teal-500 [&_>_div]:!es-uic-bg-teal-100/20 [&_>_div]:!es-uic-text-teal-900/15 [&_>_div_[role=button]]:es-uic-opacity-0
|
|
3644
|
+
isDragging && "es-uic-z-50 es-uic-blur-[0.5px] [&_>_div]:!es-uic-border [&_>_div]:es-uic-border-dotted [&_>_div]:!es-uic-border-teal-500 [&_>_div]:!es-uic-bg-teal-100/20 [&_>_div]:!es-uic-text-teal-900/15 [&_>_div_[role=button]]:es-uic-opacity-0"
|
|
3645
3645
|
),
|
|
3646
3646
|
...attributes,
|
|
3647
3647
|
...listeners,
|
|
@@ -19,12 +19,9 @@ function $9446cca9a3875146$export$cb6e0bb50bc19463(value, min, max, step) {
|
|
|
19
19
|
let remainder = (value - (isNaN(min) ? 0 : min)) % step;
|
|
20
20
|
let snappedValue = $9446cca9a3875146$export$e1a7b8e69ef6c52f(Math.abs(remainder) * 2 >= step ? value + Math.sign(remainder) * (step - Math.abs(remainder)) : value - remainder, step);
|
|
21
21
|
if (!isNaN(min)) {
|
|
22
|
-
if (snappedValue < min)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
snappedValue = min + Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f((max - min) / step, step)) * step;
|
|
26
|
-
} else if (!isNaN(max) && snappedValue > max)
|
|
27
|
-
snappedValue = Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f(max / step, step)) * step;
|
|
22
|
+
if (snappedValue < min) snappedValue = min;
|
|
23
|
+
else if (!isNaN(max) && snappedValue > max) snappedValue = min + Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f((max - min) / step, step)) * step;
|
|
24
|
+
} else if (!isNaN(max) && snappedValue > max) snappedValue = Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f(max / step, step)) * step;
|
|
28
25
|
snappedValue = $9446cca9a3875146$export$e1a7b8e69ef6c52f(snappedValue, step);
|
|
29
26
|
return snappedValue;
|
|
30
27
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { l as $df56164dff5785e2$export$4338b53315abf666, d as $3ef42575df84b30b$export$9d1611c77c2fe928, f as $8ae05eaa5c114e9c$export$7f54fc3180508a52, e as $bdb11010cef70236$export$f680877a34711e37, g as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, n as $ff5963eb1fccf552$export$e08e3b67e392101e, o as $b5e257d569688ac6$export$535bd6ca7f90a273, k as $bdb11010cef70236$export$b4cc09c592e8fdb8, a as $64fa3d84918910a7$export$29f1550f4b0d4415, q as $64fa3d84918910a7$export$45fda7c47f93fd48, t as $64fa3d84918910a7$export$94b6d0abf7d33e8c, r as $64fa3d84918910a7$export$6d3443f2c48bfc20, c as $64fa3d84918910a7$export$4d86445c2cf5e3, j as $64fa3d84918910a7$export$2881499e37b75b9a, s as $64fa3d84918910a7$export$c62b8e45d58ddad9 } from "./utils-
|
|
2
|
+
import { l as $df56164dff5785e2$export$4338b53315abf666, d as $3ef42575df84b30b$export$9d1611c77c2fe928, f as $8ae05eaa5c114e9c$export$7f54fc3180508a52, e as $bdb11010cef70236$export$f680877a34711e37, g as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, n as $ff5963eb1fccf552$export$e08e3b67e392101e, o as $b5e257d569688ac6$export$535bd6ca7f90a273, k as $bdb11010cef70236$export$b4cc09c592e8fdb8, a as $64fa3d84918910a7$export$29f1550f4b0d4415, q as $64fa3d84918910a7$export$45fda7c47f93fd48, t as $64fa3d84918910a7$export$94b6d0abf7d33e8c, r as $64fa3d84918910a7$export$6d3443f2c48bfc20, c as $64fa3d84918910a7$export$4d86445c2cf5e3, j as $64fa3d84918910a7$export$2881499e37b75b9a, s as $64fa3d84918910a7$export$c62b8e45d58ddad9 } from "./utils-Dc35LwuT.js";
|
|
3
3
|
import { d as $4e85f108e88277b8$export$d688439359537581 } from "./RSPContexts-CrNYmadY.js";
|
|
4
|
-
import { b as $dd149f63282afbbf$export$f6211563215e3b37, c as $2a41e45df1593e64$export$d39e1813b3bdd0e1, a as $fc909762b330b746$export$61c6a8c84e605fb6, d as $44f671af83e7d9e0$export$2de4954e8ae13b9f } from "./tooltip-
|
|
5
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-
|
|
4
|
+
import { b as $dd149f63282afbbf$export$f6211563215e3b37, c as $2a41e45df1593e64$export$d39e1813b3bdd0e1, a as $fc909762b330b746$export$61c6a8c84e605fb6, d as $44f671af83e7d9e0$export$2de4954e8ae13b9f } from "./tooltip-BRQ4tvZL.js";
|
|
5
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
6
6
|
import React__default, { useRef, useContext, useEffect, useMemo, createContext, useState, forwardRef } from "react";
|
|
7
|
-
import { $ as $62d8ded9296f3872$export$cfa2225e87938781, a as $5e3802645cc19319$export$1c3ebcada18427bf } from "./ariaHideOutside-
|
|
8
|
-
import { c as $9bf71ea28793e738$export$1258395f99bf9cbf, $ as $9bf71ea28793e738$export$20e40289641fbbb6 } from "./FocusScope-
|
|
9
|
-
import { l as $e7801be82b4b2a53$export$4debdb1a3f0fa79e, g as $431fbd86ca7dc216$export$b204af158042fbac, d as $9ab94262bd0047c7$export$420e68273165f4ec, j as $c87311424ea30a05$export$fedb369cb70207f1, h as $6a99195332edec8b$export$80f3e147d781571c } from "./focusSafely-
|
|
10
|
-
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-
|
|
11
|
-
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-
|
|
12
|
-
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-
|
|
13
|
-
import { e as $ae1eeba8b9eafd08$export$5165eccb35aaadb5 } from "./usePress-
|
|
14
|
-
import { $ as $dbSRa$reactdom } from "./index-
|
|
15
|
-
import { c as clsx } from "./lite-
|
|
16
|
-
import { _ as __ } from "./default-i18n-
|
|
17
|
-
import { B as Button } from "./button-
|
|
7
|
+
import { $ as $62d8ded9296f3872$export$cfa2225e87938781, a as $5e3802645cc19319$export$1c3ebcada18427bf } from "./ariaHideOutside-Zn64-frS.js";
|
|
8
|
+
import { c as $9bf71ea28793e738$export$1258395f99bf9cbf, $ as $9bf71ea28793e738$export$20e40289641fbbb6 } from "./FocusScope-Bw-IatMO.js";
|
|
9
|
+
import { l as $e7801be82b4b2a53$export$4debdb1a3f0fa79e, g as $431fbd86ca7dc216$export$b204af158042fbac, d as $9ab94262bd0047c7$export$420e68273165f4ec, j as $c87311424ea30a05$export$fedb369cb70207f1, h as $6a99195332edec8b$export$80f3e147d781571c } from "./focusSafely-BS4dllCW.js";
|
|
10
|
+
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "./useLabels-CfOtyOe2.js";
|
|
11
|
+
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "./useLocalizedStringFormatter-BQCMno9k.js";
|
|
12
|
+
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "./VisuallyHidden-Di1zXprL.js";
|
|
13
|
+
import { e as $ae1eeba8b9eafd08$export$5165eccb35aaadb5 } from "./usePress-CScNeV3V.js";
|
|
14
|
+
import { $ as $dbSRa$reactdom } from "./index-CAPcSs9K.js";
|
|
15
|
+
import { c as clsx } from "./lite-DVmmD_-j.js";
|
|
16
|
+
import { _ as __ } from "./default-i18n-BqwLkgZv.js";
|
|
17
|
+
import { B as Button } from "./button-CD8Q1eok.js";
|
|
18
18
|
const $f1ab8c75478c6f73$export$3351871ee4b288b8 = /* @__PURE__ */ React__default.forwardRef(({ children, ...props }, ref) => {
|
|
19
19
|
let isRegistered = useRef(false);
|
|
20
20
|
let prevContext = useContext($ae1eeba8b9eafd08$export$5165eccb35aaadb5);
|
|
@@ -24,8 +24,7 @@ const $f1ab8c75478c6f73$export$3351871ee4b288b8 = /* @__PURE__ */ React__default
|
|
|
24
24
|
ref,
|
|
25
25
|
register() {
|
|
26
26
|
isRegistered.current = true;
|
|
27
|
-
if (prevContext)
|
|
28
|
-
prevContext.register();
|
|
27
|
+
if (prevContext) prevContext.register();
|
|
29
28
|
}
|
|
30
29
|
});
|
|
31
30
|
$e7801be82b4b2a53$export$4debdb1a3f0fa79e(prevContext, ref);
|
|
@@ -56,25 +55,21 @@ function $e0b6e0b68ec7f50f$export$872b660ac5a1ff98(props) {
|
|
|
56
55
|
});
|
|
57
56
|
let onPointerDown = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
|
|
58
57
|
if (onInteractOutside && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) {
|
|
59
|
-
if (onInteractOutsideStart)
|
|
60
|
-
onInteractOutsideStart(e);
|
|
58
|
+
if (onInteractOutsideStart) onInteractOutsideStart(e);
|
|
61
59
|
stateRef.current.isPointerDown = true;
|
|
62
60
|
}
|
|
63
61
|
});
|
|
64
62
|
let triggerInteractOutside = $8ae05eaa5c114e9c$export$7f54fc3180508a52((e) => {
|
|
65
|
-
if (onInteractOutside)
|
|
66
|
-
onInteractOutside(e);
|
|
63
|
+
if (onInteractOutside) onInteractOutside(e);
|
|
67
64
|
});
|
|
68
65
|
useEffect(() => {
|
|
69
66
|
let state = stateRef.current;
|
|
70
|
-
if (isDisabled)
|
|
71
|
-
return;
|
|
67
|
+
if (isDisabled) return;
|
|
72
68
|
const element = ref.current;
|
|
73
69
|
const documentObject = $431fbd86ca7dc216$export$b204af158042fbac(element);
|
|
74
70
|
if (typeof PointerEvent !== "undefined") {
|
|
75
71
|
let onPointerUp = (e) => {
|
|
76
|
-
if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref))
|
|
77
|
-
triggerInteractOutside(e);
|
|
72
|
+
if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) triggerInteractOutside(e);
|
|
78
73
|
state.isPointerDown = false;
|
|
79
74
|
};
|
|
80
75
|
documentObject.addEventListener("pointerdown", onPointerDown, true);
|
|
@@ -85,16 +80,13 @@ function $e0b6e0b68ec7f50f$export$872b660ac5a1ff98(props) {
|
|
|
85
80
|
};
|
|
86
81
|
} else {
|
|
87
82
|
let onMouseUp = (e) => {
|
|
88
|
-
if (state.ignoreEmulatedMouseEvents)
|
|
89
|
-
|
|
90
|
-
else if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref))
|
|
91
|
-
triggerInteractOutside(e);
|
|
83
|
+
if (state.ignoreEmulatedMouseEvents) state.ignoreEmulatedMouseEvents = false;
|
|
84
|
+
else if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) triggerInteractOutside(e);
|
|
92
85
|
state.isPointerDown = false;
|
|
93
86
|
};
|
|
94
87
|
let onTouchEnd = (e) => {
|
|
95
88
|
state.ignoreEmulatedMouseEvents = true;
|
|
96
|
-
if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref))
|
|
97
|
-
triggerInteractOutside(e);
|
|
89
|
+
if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) triggerInteractOutside(e);
|
|
98
90
|
state.isPointerDown = false;
|
|
99
91
|
};
|
|
100
92
|
documentObject.addEventListener("mousedown", onPointerDown, true);
|
|
@@ -116,14 +108,11 @@ function $e0b6e0b68ec7f50f$export$872b660ac5a1ff98(props) {
|
|
|
116
108
|
]);
|
|
117
109
|
}
|
|
118
110
|
function $e0b6e0b68ec7f50f$var$isValidEvent(event, ref) {
|
|
119
|
-
if (event.button > 0)
|
|
120
|
-
return false;
|
|
111
|
+
if (event.button > 0) return false;
|
|
121
112
|
if (event.target) {
|
|
122
113
|
const ownerDocument = event.target.ownerDocument;
|
|
123
|
-
if (!ownerDocument || !ownerDocument.documentElement.contains(event.target))
|
|
124
|
-
|
|
125
|
-
if (event.target.closest("[data-react-aria-top-layer]"))
|
|
126
|
-
return false;
|
|
114
|
+
if (!ownerDocument || !ownerDocument.documentElement.contains(event.target)) return false;
|
|
115
|
+
if (event.target.closest("[data-react-aria-top-layer]")) return false;
|
|
127
116
|
}
|
|
128
117
|
return ref.current && !ref.current.contains(event.target);
|
|
129
118
|
}
|
|
@@ -131,20 +120,17 @@ const $a11501f3d1d39e6c$var$visibleOverlays = [];
|
|
|
131
120
|
function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
|
|
132
121
|
let { onClose, shouldCloseOnBlur, isOpen, isDismissable = false, isKeyboardDismissDisabled = false, shouldCloseOnInteractOutside } = props;
|
|
133
122
|
useEffect(() => {
|
|
134
|
-
if (isOpen)
|
|
135
|
-
$a11501f3d1d39e6c$var$visibleOverlays.push(ref);
|
|
123
|
+
if (isOpen) $a11501f3d1d39e6c$var$visibleOverlays.push(ref);
|
|
136
124
|
return () => {
|
|
137
125
|
let index = $a11501f3d1d39e6c$var$visibleOverlays.indexOf(ref);
|
|
138
|
-
if (index >= 0)
|
|
139
|
-
$a11501f3d1d39e6c$var$visibleOverlays.splice(index, 1);
|
|
126
|
+
if (index >= 0) $a11501f3d1d39e6c$var$visibleOverlays.splice(index, 1);
|
|
140
127
|
};
|
|
141
128
|
}, [
|
|
142
129
|
isOpen,
|
|
143
130
|
ref
|
|
144
131
|
]);
|
|
145
132
|
let onHide = () => {
|
|
146
|
-
if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && onClose)
|
|
147
|
-
onClose();
|
|
133
|
+
if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && onClose) onClose();
|
|
148
134
|
};
|
|
149
135
|
let onInteractOutsideStart = (e) => {
|
|
150
136
|
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {
|
|
@@ -178,15 +164,12 @@ function $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {
|
|
|
178
164
|
let { focusWithinProps } = $9ab94262bd0047c7$export$420e68273165f4ec({
|
|
179
165
|
isDisabled: !shouldCloseOnBlur,
|
|
180
166
|
onBlurWithin: (e) => {
|
|
181
|
-
if (!e.relatedTarget || $9bf71ea28793e738$export$1258395f99bf9cbf(e.relatedTarget))
|
|
182
|
-
|
|
183
|
-
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget))
|
|
184
|
-
onClose();
|
|
167
|
+
if (!e.relatedTarget || $9bf71ea28793e738$export$1258395f99bf9cbf(e.relatedTarget)) return;
|
|
168
|
+
if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose();
|
|
185
169
|
}
|
|
186
170
|
});
|
|
187
171
|
let onPointerDownUnderlay = (e) => {
|
|
188
|
-
if (e.target === e.currentTarget)
|
|
189
|
-
e.preventDefault();
|
|
172
|
+
if (e.target === e.currentTarget) e.preventDefault();
|
|
190
173
|
};
|
|
191
174
|
return {
|
|
192
175
|
overlayProps: {
|
|
@@ -202,14 +185,11 @@ function $628037886ba31236$export$f9d5c8beee7d008d(props, state, ref) {
|
|
|
202
185
|
let { type } = props;
|
|
203
186
|
let { isOpen } = state;
|
|
204
187
|
useEffect(() => {
|
|
205
|
-
if (ref && ref.current)
|
|
206
|
-
$dd149f63282afbbf$export$f6211563215e3b37.set(ref.current, state.close);
|
|
188
|
+
if (ref && ref.current) $dd149f63282afbbf$export$f6211563215e3b37.set(ref.current, state.close);
|
|
207
189
|
});
|
|
208
190
|
let ariaHasPopup = void 0;
|
|
209
|
-
if (type === "menu")
|
|
210
|
-
|
|
211
|
-
else if (type === "listbox")
|
|
212
|
-
ariaHasPopup = "listbox";
|
|
191
|
+
if (type === "menu") ariaHasPopup = true;
|
|
192
|
+
else if (type === "listbox") ariaHasPopup = "listbox";
|
|
213
193
|
let overlayId = $bdb11010cef70236$export$f680877a34711e37();
|
|
214
194
|
return {
|
|
215
195
|
triggerProps: {
|
|
@@ -240,19 +220,15 @@ let $49c51c25361d4cd2$var$restore;
|
|
|
240
220
|
function $49c51c25361d4cd2$export$ee0f7cc6afcd1c18(options = {}) {
|
|
241
221
|
let { isDisabled } = options;
|
|
242
222
|
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
243
|
-
if (isDisabled)
|
|
244
|
-
return;
|
|
223
|
+
if (isDisabled) return;
|
|
245
224
|
$49c51c25361d4cd2$var$preventScrollCount++;
|
|
246
225
|
if ($49c51c25361d4cd2$var$preventScrollCount === 1) {
|
|
247
|
-
if ($c87311424ea30a05$export$fedb369cb70207f1())
|
|
248
|
-
|
|
249
|
-
else
|
|
250
|
-
$49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollStandard();
|
|
226
|
+
if ($c87311424ea30a05$export$fedb369cb70207f1()) $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollMobileSafari();
|
|
227
|
+
else $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollStandard();
|
|
251
228
|
}
|
|
252
229
|
return () => {
|
|
253
230
|
$49c51c25361d4cd2$var$preventScrollCount--;
|
|
254
|
-
if ($49c51c25361d4cd2$var$preventScrollCount === 0)
|
|
255
|
-
$49c51c25361d4cd2$var$restore();
|
|
231
|
+
if ($49c51c25361d4cd2$var$preventScrollCount === 0) $49c51c25361d4cd2$var$restore();
|
|
256
232
|
};
|
|
257
233
|
}, [
|
|
258
234
|
isDisabled
|
|
@@ -266,18 +242,15 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
|
|
|
266
242
|
let restoreScrollableStyles;
|
|
267
243
|
let onTouchStart = (e) => {
|
|
268
244
|
scrollable = $62d8ded9296f3872$export$cfa2225e87938781(e.target, true);
|
|
269
|
-
if (scrollable === document.documentElement && scrollable === document.body)
|
|
270
|
-
|
|
271
|
-
if (scrollable instanceof HTMLElement && window.getComputedStyle(scrollable).overscrollBehavior === "auto")
|
|
272
|
-
restoreScrollableStyles = $49c51c25361d4cd2$var$setStyle(scrollable, "overscrollBehavior", "contain");
|
|
245
|
+
if (scrollable === document.documentElement && scrollable === document.body) return;
|
|
246
|
+
if (scrollable instanceof HTMLElement && window.getComputedStyle(scrollable).overscrollBehavior === "auto") restoreScrollableStyles = $49c51c25361d4cd2$var$setStyle(scrollable, "overscrollBehavior", "contain");
|
|
273
247
|
};
|
|
274
248
|
let onTouchMove = (e) => {
|
|
275
249
|
if (!scrollable || scrollable === document.documentElement || scrollable === document.body) {
|
|
276
250
|
e.preventDefault();
|
|
277
251
|
return;
|
|
278
252
|
}
|
|
279
|
-
if (scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth)
|
|
280
|
-
e.preventDefault();
|
|
253
|
+
if (scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth) e.preventDefault();
|
|
281
254
|
};
|
|
282
255
|
let onTouchEnd = (e) => {
|
|
283
256
|
let target = e.target;
|
|
@@ -290,8 +263,7 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
|
|
|
290
263
|
target.style.transform = "";
|
|
291
264
|
});
|
|
292
265
|
}
|
|
293
|
-
if (restoreScrollableStyles)
|
|
294
|
-
restoreScrollableStyles();
|
|
266
|
+
if (restoreScrollableStyles) restoreScrollableStyles();
|
|
295
267
|
};
|
|
296
268
|
let onFocus = (e) => {
|
|
297
269
|
let target = e.target;
|
|
@@ -315,8 +287,7 @@ function $49c51c25361d4cd2$var$preventScrollMobileSafari() {
|
|
|
315
287
|
};
|
|
316
288
|
let restoreStyles = null;
|
|
317
289
|
let setupStyles = () => {
|
|
318
|
-
if (restoreStyles)
|
|
319
|
-
return;
|
|
290
|
+
if (restoreStyles) return;
|
|
320
291
|
let onWindowScroll = () => {
|
|
321
292
|
window.scrollTo(0, 0);
|
|
322
293
|
};
|
|
@@ -363,8 +334,7 @@ function $49c51c25361d4cd2$var$scrollIntoView(target) {
|
|
|
363
334
|
if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== target) {
|
|
364
335
|
let scrollableTop = scrollable.getBoundingClientRect().top;
|
|
365
336
|
let targetTop = target.getBoundingClientRect().top;
|
|
366
|
-
if (targetTop > scrollableTop + target.clientHeight)
|
|
367
|
-
scrollable.scrollTop += targetTop - scrollableTop;
|
|
337
|
+
if (targetTop > scrollableTop + target.clientHeight) scrollable.scrollTop += targetTop - scrollableTop;
|
|
368
338
|
}
|
|
369
339
|
target = scrollable.parentElement;
|
|
370
340
|
}
|
|
@@ -553,8 +523,7 @@ function $86ea4cb521eb2e37$export$2317d149ed6f78c4(props) {
|
|
|
553
523
|
let stringFormatter = $fca6afa0e843324b$export$f12b703ca79dfbb1($parcel$interopDefault($a2f21f5f14f60553$exports), "@react-aria/overlays");
|
|
554
524
|
let labels = $313b98861ee5dd6c$export$d6875122194c7b44(otherProps, stringFormatter.format("dismiss"));
|
|
555
525
|
let onClick = () => {
|
|
556
|
-
if (onDismiss)
|
|
557
|
-
onDismiss();
|
|
526
|
+
if (onDismiss) onDismiss();
|
|
558
527
|
};
|
|
559
528
|
return /* @__PURE__ */ React__default.createElement($5c3e21d68f1c4674$export$439d29a4e110a164, null, /* @__PURE__ */ React__default.createElement("button", {
|
|
560
529
|
...labels,
|
|
@@ -587,10 +556,9 @@ function $f2f8a6077418541e$export$542a6fd13ac93354(props, state) {
|
|
|
587
556
|
isDisabled: isNonModal || !state.isOpen
|
|
588
557
|
});
|
|
589
558
|
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
590
|
-
if (state.isOpen && !isNonModal && popoverRef.current)
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
]);
|
|
559
|
+
if (state.isOpen && !isNonModal && popoverRef.current) return $5e3802645cc19319$export$1c3ebcada18427bf([
|
|
560
|
+
popoverRef.current
|
|
561
|
+
]);
|
|
594
562
|
}, [
|
|
595
563
|
isNonModal,
|
|
596
564
|
state.isOpen,
|
|
@@ -621,16 +589,13 @@ function $337b884510726a0d$export$c6fdb837b070b4ff(props) {
|
|
|
621
589
|
setContain
|
|
622
590
|
]);
|
|
623
591
|
let { getContainer } = $96b38030c423d352$export$574e9b0fb070c3b0();
|
|
624
|
-
if (!props.portalContainer && getContainer)
|
|
625
|
-
|
|
626
|
-
if (!portalContainer)
|
|
627
|
-
return null;
|
|
592
|
+
if (!props.portalContainer && getContainer) portalContainer = getContainer();
|
|
593
|
+
if (!portalContainer) return null;
|
|
628
594
|
let contents = props.children;
|
|
629
|
-
if (!props.disableFocusManagement)
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
}, contents);
|
|
595
|
+
if (!props.disableFocusManagement) contents = /* @__PURE__ */ React__default.createElement($9bf71ea28793e738$export$20e40289641fbbb6, {
|
|
596
|
+
restoreFocus: true,
|
|
597
|
+
contain: contain && !isExiting
|
|
598
|
+
}, contents);
|
|
634
599
|
contents = /* @__PURE__ */ React__default.createElement($337b884510726a0d$export$a2200b96afd16271.Provider, {
|
|
635
600
|
value: contextValue
|
|
636
601
|
}, /* @__PURE__ */ React__default.createElement($f1ab8c75478c6f73$export$cf75428e0b9ed1ea, null, contents));
|
|
@@ -683,8 +648,7 @@ function $40df3f8667284809$export$d55e7ee900f34e93(props, ref) {
|
|
|
683
648
|
// popovers to close. Since focus is contained within the dialog,
|
|
684
649
|
// we don't want this to occur due to the above useEffect.
|
|
685
650
|
onBlur: (e) => {
|
|
686
|
-
if (isRefocusing.current)
|
|
687
|
-
e.stopPropagation();
|
|
651
|
+
if (isRefocusing.current) e.stopPropagation();
|
|
688
652
|
}
|
|
689
653
|
},
|
|
690
654
|
titleProps: {
|
|
@@ -702,18 +666,16 @@ function $07b14b47974efb58$var$Popover(props, ref) {
|
|
|
702
666
|
let isHidden = useContext($64fa3d84918910a7$export$94b6d0abf7d33e8c);
|
|
703
667
|
if (isHidden) {
|
|
704
668
|
let children = props.children;
|
|
705
|
-
if (typeof children === "function")
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
});
|
|
669
|
+
if (typeof children === "function") children = children({
|
|
670
|
+
trigger: props.trigger || null,
|
|
671
|
+
placement: "bottom",
|
|
672
|
+
isEntering: false,
|
|
673
|
+
isExiting: false,
|
|
674
|
+
defaultChildren: null
|
|
675
|
+
});
|
|
713
676
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children);
|
|
714
677
|
}
|
|
715
|
-
if (state && !state.isOpen && !isExiting)
|
|
716
|
-
return null;
|
|
678
|
+
if (state && !state.isOpen && !isExiting) return null;
|
|
717
679
|
return /* @__PURE__ */ React__default.createElement($07b14b47974efb58$var$PopoverInner, {
|
|
718
680
|
...props,
|
|
719
681
|
triggerRef: props.triggerRef,
|
|
@@ -727,8 +689,7 @@ function $07b14b47974efb58$var$PopoverInner({ state, isExiting, UNSTABLE_portalC
|
|
|
727
689
|
let arrowRef = useRef(null);
|
|
728
690
|
let [arrowWidth, setArrowWidth] = useState(0);
|
|
729
691
|
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
730
|
-
if (arrowRef.current && state.isOpen)
|
|
731
|
-
setArrowWidth(arrowRef.current.getBoundingClientRect().width);
|
|
692
|
+
if (arrowRef.current && state.isOpen) setArrowWidth(arrowRef.current.getBoundingClientRect().width);
|
|
732
693
|
}, [
|
|
733
694
|
state.isOpen,
|
|
734
695
|
arrowRef
|
|
@@ -832,16 +793,13 @@ function $de32f1b87079253c$var$Dialog(props, ref) {
|
|
|
832
793
|
}, ref);
|
|
833
794
|
let state = useContext($de32f1b87079253c$export$d2f961adcb0afbe);
|
|
834
795
|
let children = props.children;
|
|
835
|
-
if (typeof children === "function")
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
});
|
|
796
|
+
if (typeof children === "function") children = children({
|
|
797
|
+
close: (state === null || state === void 0 ? void 0 : state.close) || (() => {
|
|
798
|
+
})
|
|
799
|
+
});
|
|
840
800
|
if (!dialogProps["aria-label"] && !dialogProps["aria-labelledby"]) {
|
|
841
|
-
if (props["aria-labelledby"])
|
|
842
|
-
|
|
843
|
-
else
|
|
844
|
-
console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.');
|
|
801
|
+
if (props["aria-labelledby"]) dialogProps["aria-labelledby"] = props["aria-labelledby"];
|
|
802
|
+
else console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.');
|
|
845
803
|
}
|
|
846
804
|
var _props_className;
|
|
847
805
|
return /* @__PURE__ */ React__default.createElement("section", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as _objectWithoutProperties, b as _slicedToArray, h as handleInputChange, d as _objectSpread2, e as _defineProperty, _ as _extends } from "./index-a301f526.esm-
|
|
1
|
+
import { a as _objectWithoutProperties, b as _slicedToArray, h as handleInputChange, d as _objectSpread2, e as _defineProperty, _ as _extends } from "./index-a301f526.esm-ByOfDxiG.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { useRef, useState, useEffect, useCallback, forwardRef } from "react";
|
|
4
|
-
import { u as useStateManager, S as Select } from "./Select-49a62830.esm-
|
|
5
|
-
import "./index-
|
|
4
|
+
import { u as useStateManager, S as Select } from "./Select-49a62830.esm-BnlXlUnT.js";
|
|
5
|
+
import "./index-CAPcSs9K.js";
|
|
6
6
|
var _excluded = ["defaultOptions", "cacheOptions", "loadOptions", "options", "isLoading", "onInputChange", "filterOption"];
|
|
7
7
|
function useAsync(_ref) {
|
|
8
8
|
var _ref$defaultOptions = _ref.defaultOptions, propsDefaultOptions = _ref$defaultOptions === void 0 ? false : _ref$defaultOptions, _ref$cacheOptions = _ref.cacheOptions, cacheOptions = _ref$cacheOptions === void 0 ? false : _ref$cacheOptions, propsLoadOptions = _ref.loadOptions;
|
|
@@ -35,8 +35,7 @@ function useAsync(_ref) {
|
|
|
35
35
|
};
|
|
36
36
|
}, []);
|
|
37
37
|
var loadOptions = useCallback(function(inputValue, callback) {
|
|
38
|
-
if (!propsLoadOptions)
|
|
39
|
-
return callback();
|
|
38
|
+
if (!propsLoadOptions) return callback();
|
|
40
39
|
var loader = propsLoadOptions(inputValue, callback);
|
|
41
40
|
if (loader && typeof loader.then === "function") {
|
|
42
41
|
loader.then(callback, function() {
|
|
@@ -47,8 +46,7 @@ function useAsync(_ref) {
|
|
|
47
46
|
useEffect(function() {
|
|
48
47
|
if (propsDefaultOptions === true) {
|
|
49
48
|
loadOptions(stateInputValue, function(options2) {
|
|
50
|
-
if (!mounted.current)
|
|
51
|
-
return;
|
|
49
|
+
if (!mounted.current) return;
|
|
52
50
|
setDefaultOptions(options2 || []);
|
|
53
51
|
setIsLoading(!!lastRequest.current);
|
|
54
52
|
});
|
|
@@ -77,10 +75,8 @@ function useAsync(_ref) {
|
|
|
77
75
|
setIsLoading(true);
|
|
78
76
|
setPassEmptyOptions(!loadedInputValue);
|
|
79
77
|
loadOptions(inputValue, function(options2) {
|
|
80
|
-
if (!mounted)
|
|
81
|
-
|
|
82
|
-
if (request !== lastRequest.current)
|
|
83
|
-
return;
|
|
78
|
+
if (!mounted) return;
|
|
79
|
+
if (request !== lastRequest.current) return;
|
|
84
80
|
lastRequest.current = void 0;
|
|
85
81
|
setIsLoading(false);
|
|
86
82
|
setLoadedInputValue(inputValue);
|