@eightshift/ui-components 8.1.0 → 8.3.0
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/dist/{Autocomplete-BUU44AuW.js → Autocomplete-Dqkum3dO.js} +29 -25
- package/dist/{Button-_E2Z5G2l.js → Button-DHgs_rCq.js} +15 -9
- package/dist/{Dialog-3XLIaepk.js → Dialog-CldDJ_4u.js} +390 -189
- package/dist/{Disclosure-Dh0z_DEQ.js → Disclosure-BHNgL5Is.js} +33 -29
- package/dist/{FocusScope-BKGWN6UK.js → FocusScope-CUuL5wjz.js} +13 -8
- package/dist/{Heading-BWTs9ckA.js → Heading-BQje2nS2.js} +1 -1
- package/dist/{I18nProvider-BskRMK8G.js → I18nProvider-R_4IDnf9.js} +1 -1
- package/dist/{Label-UpU4cKPh.js → Label-C4bJkVti.js} +1 -1
- package/dist/{ListBox-DepY-52g.js → ListBox-CZXso3mJ.js} +14 -38
- package/dist/{NumberFormatter-WKBRKiEA.js → NumberFormatter-Bwdv413k.js} +4 -2
- package/dist/{RadioGroup-Br9Mn9QJ.js → RadioGroup-BTByPMrl.js} +35 -35
- package/dist/{SearchField-q2Fj0L9K.js → SearchField-DkX1vqMN.js} +29 -26
- package/dist/{Slider-B8icnyOo.js → Slider-Dw-JjfLx.js} +55 -44
- package/dist/{Text-D4y19vs8.js → Text-CA2_mHEB.js} +4 -3
- package/dist/{VisuallyHidden-B_LZ_kn7.js → VisuallyHidden-ZZwHZDro.js} +2 -2
- package/dist/{animation-DpSgtWyu.js → animation-COc9P6ap.js} +2 -4
- package/dist/assets/{image-analysis-worker-BuHru-CI.js → image-analysis-worker-CBOB71mx.js} +1 -1
- package/dist/assets/style-admin.css +1 -1
- package/dist/assets/style-editor.css +1 -1
- package/dist/assets/style.css +1 -1
- package/dist/assets/wp-overrides/make-block-messages-nicer.css +1 -1
- package/dist/{build-module-DG6ZK7Ty.js → build-module-BISCoQjQ.js} +4 -4
- package/dist/{button-XSk_8UW7.js → button-ldR_tlvk.js} +64 -13
- package/dist/{checkbox-BYaS9tQ5.js → checkbox-DDyLJRY8.js} +8 -8
- package/dist/{color-swatch-6ZEIXej3.js → color-swatch-DmhdOhe4.js} +15 -16
- package/dist/components/animated-visibility/animated-visibility.js +5 -3
- package/dist/components/base-control/base-control.d.ts +1 -1
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/base-control/container.d.ts +4 -30
- package/dist/components/base-control/container.js +5 -32
- package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -1
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/color-pickers/color-picker.js +8 -8
- package/dist/components/color-pickers/color-swatch.js +1 -1
- package/dist/components/color-pickers/gradient-editor.js +1 -1
- package/dist/components/color-pickers/solid-color-picker.js +1 -1
- package/dist/components/component-toggle/component-toggle.d.ts +1 -1
- package/dist/components/component-toggle/component-toggle.js +4 -4
- package/dist/components/container-panel/container-panel.js +11 -11
- package/dist/components/contextual-help/contextual-help.js +3 -3
- package/dist/components/draggable/draggable.d.ts +3 -3
- package/dist/components/draggable/draggable.js +1 -1
- package/dist/components/draggable-list/draggable-list.d.ts +3 -3
- package/dist/components/draggable-list/draggable-list.js +9 -9
- package/dist/components/expandable/expandable.js +4 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +18 -17
- package/dist/components/input-field/input-field.d.ts +1 -1
- package/dist/components/input-field/input-field.js +1 -1
- package/dist/components/item-collection/item-collection.d.ts +3 -28
- package/dist/components/item-collection/item-collection.js +7 -7
- package/dist/components/link-input/link-input.d.ts +0 -2
- package/dist/components/link-input/link-input.js +1 -1
- package/dist/components/matrix-align/matrix-align.js +5 -4
- package/dist/components/menu/menu.d.ts +8 -29
- package/dist/components/menu/menu.js +11 -8
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/notice/notice.js +8 -8
- package/dist/components/number-picker/number-picker.d.ts +1 -1
- package/dist/components/number-picker/number-picker.js +1 -1
- package/dist/components/option-select/option-select.d.ts +1 -1
- package/dist/components/option-select/option-select.js +22 -16
- package/dist/components/options-panel/options-panel.js +4 -4
- package/dist/components/placeholders/file-picker-shell.js +4 -3
- package/dist/components/placeholders/file-placeholder.js +3 -2
- package/dist/components/popover/popover.js +5 -5
- package/dist/components/portal-provider/portal-provider.js +2 -1
- package/dist/components/prompt-popover/prompt-popover.d.ts +56 -0
- package/dist/components/prompt-popover/prompt-popover.js +81 -0
- package/dist/components/radio/radio.d.ts +2 -1
- package/dist/components/radio/radio.js +2 -2
- package/dist/components/repeater/repeater-context.d.ts +0 -1
- package/dist/components/repeater/repeater-item.js +2 -2
- package/dist/components/repeater/repeater.d.ts +5 -38
- package/dist/components/repeater/repeater.js +8 -11
- package/dist/components/responsive/mini-responsive.d.ts +0 -1
- package/dist/components/responsive/mini-responsive.js +31 -31
- package/dist/components/responsive/responsive-legacy.d.ts +0 -1
- package/dist/components/responsive/responsive-legacy.js +13 -11
- package/dist/components/responsive/responsive.d.ts +0 -1
- package/dist/components/responsive/responsive.js +29 -29
- package/dist/components/responsive-preview/responsive-preview.js +4 -4
- package/dist/components/rich-label/rich-label.d.ts +1 -1
- package/dist/components/rich-label/rich-label.js +2 -2
- package/dist/components/select/async-multi-select.d.ts +12 -13
- package/dist/components/select/async-multi-select.js +40 -21
- package/dist/components/select/async-select.d.ts +12 -13
- package/dist/components/select/async-select.js +39 -21
- package/dist/components/select/multi-select.d.ts +2 -8
- package/dist/components/select/multi-select.js +20 -20
- package/dist/components/select/shared.d.ts +7 -11
- package/dist/components/select/shared.js +2 -2
- package/dist/components/select/single-select.d.ts +2 -8
- package/dist/components/select/single-select.js +17 -17
- package/dist/components/select/styles.d.ts +2 -2
- package/dist/components/slider/column-config-slider.js +8 -6
- package/dist/components/slider/slider.js +16 -12
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/smart-image/smart-image.d.ts +1 -2
- package/dist/components/smart-image/smart-image.js +53 -51
- package/dist/components/tabs/tabs.d.ts +16 -64
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle/switch.d.ts +1 -1
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle/toggle.js +2 -2
- package/dist/components/toggle-button/toggle-button.d.ts +2 -2
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{draggable-9MfdTVWP.js → draggable-oS68xcYX.js} +130 -125
- package/dist/{es-dash-DunirOmV.js → es-dash-DPtJSRjw.js} +23 -52
- package/dist/{gradient-editor-yqSw0uPA.js → gradient-editor-DP8ioFX1.js} +39 -30
- package/dist/icons/block-icon.js +1 -1
- package/dist/icons/icon.d.ts +3 -3
- package/dist/icons/icon.js +21 -9
- package/dist/icons/icons.d.ts +210 -1
- package/dist/icons/index.js +1 -1
- package/dist/icons/jsx-svg.d.ts +5 -4
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/index.js +18 -17
- package/dist/{input-field-nN6BO0oz.js → input-field-C-XvZeCZ.js} +8 -8
- package/dist/{jsx-svg-BjGQUBLh.js → jsx-svg-DRwJdRpA.js} +171 -129
- package/dist/{keyboard-g5Amam-c.js → keyboard-Cdqi5ZQQ.js} +1 -1
- package/dist/{link-input-BhlPElU8.js → link-input-DdwuqoMg.js} +147 -89
- package/dist/{modal-B5axB0Fc.js → modal-DZco5MDu.js} +15 -14
- package/dist/{number-picker-nnOf0XnN.js → number-picker-XqKW0BNi.js} +9 -9
- package/dist/{react-y40Dt3ab.js → react-O71mlJXS.js} +250 -266
- package/dist/{shared-Ba_bt4s9.js → shared-YXMIX2ka.js} +60 -44
- package/dist/{solid-color-picker-CsosgTVa.js → solid-color-picker-D5LEdmDM.js} +78 -58
- package/dist/{switch-BJ4_OyUm.js → switch-Bo6nmed_.js} +8 -8
- package/dist/{tabs-wAe0AAyu.js → tabs-DE-qb7Kt.js} +35 -30
- package/dist/{text-helpers-2j9DuxP1.js → text-helpers-QrwKKaOh.js} +3 -2
- package/dist/{textSelection-B_Nv6Jz3.js → textSelection-C17LWYmO.js} +3 -3
- package/dist/{toggle-button-BLJdEp8V.js → toggle-button-Cb4yCEua.js} +39 -8
- package/dist/{tooltip-BW9nj5-V.js → tooltip-CT-vzIdz.js} +68 -62
- package/dist/{useAsyncList-B3-uyJgA.js → useAsyncList-CjKVLGN0.js} +8 -4
- package/dist/{useButton-CPMVLXoX.js → useButton-V65TBDGM.js} +3 -3
- package/dist/{useCollection-PzY6FI39.js → useCollection-DqUS7tjk.js} +281 -184
- package/dist/useEvent-C9zwSNzZ.js +18 -0
- package/dist/{useField-DrfR8j9h.js → useField-B_ibsWst.js} +2 -2
- package/dist/{useFilter-CiCjo6Na.js → useFilter-C75IzdIZ.js} +1 -1
- package/dist/{useFocusRing-CrYHpV7C.js → useFocusRing-JidySWlU.js} +1 -1
- package/dist/{useFormReset-U6c35PHq.js → useFormReset-Sp8-miDa.js} +1 -1
- package/dist/{useFormValidation-B2q2MGWN.js → useFormValidation-CpmQEh8J.js} +2 -2
- package/dist/{useHover-CNsbAR0V.js → useHover-CaY3sRjL.js} +250 -46
- package/dist/{useLabel-DuxAjaic.js → useLabel-gfFDE4bn.js} +2 -2
- package/dist/{useLabels-NUsp5IW3.js → useLabels-Dcg-cEyM.js} +1 -1
- package/dist/{useListState-FLxa7R_U.js → useListState-CzB3v6M9.js} +6 -11
- package/dist/{useLocalizedStringFormatter-Ccm8EL_u.js → useLocalizedStringFormatter-CTCqjYu4.js} +6 -1
- package/dist/{useNumberFieldState-DWvm7CXu.js → useNumberFieldState-DC3XY3DQ.js} +79 -62
- package/dist/{useNumberFormatter-B0_D7a_o.js → useNumberFormatter-DbAt_fC_.js} +2 -2
- package/dist/{useOverlayTriggerState-zZ7homyI.js → useOverlayTriggerState-BKmSTK_5.js} +16 -11
- package/dist/{usePress-DRoujMNm.js → usePress-CUCWcP-m.js} +50 -28
- package/dist/{useSlot-pRz-v9kC.js → useSlot-CnQHcvd4.js} +1 -1
- package/dist/{useTextField-e8jIFT3s.js → useTextField-C3QIkMON.js} +6 -6
- package/dist/{useToggle-CR_ZKvr_.js → useToggle-bbGRUbo4.js} +6 -6
- package/dist/{useToggleState-ButQxGrJ.js → useToggleState-D_rLMrVW.js} +1 -1
- package/dist/utilities/array-helpers.d.ts +2 -2
- package/dist/utilities/array-helpers.js +4 -3
- package/dist/utilities/debounce-throttle.d.ts +9 -2
- package/dist/utilities/es-dash.d.ts +11 -8
- package/dist/utilities/es-dash.js +1 -1
- package/dist/utilities/index.js +2 -2
- package/dist/utilities/text-helpers.js +1 -1
- package/dist/utilities/web-workers.d.ts +7 -7
- package/dist/utilities/web-workers.js +5 -5
- package/dist/{utils-Czi6q2Ub.js → utils-ClM91CuL.js} +30 -19
- package/package.json +23 -27
- package/dist/useEvent-CzuFZ2HT.js +0 -22
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-DQoRUQAf.js";
|
|
2
|
-
import { g as $a4e76a5424781910$export$e08e3b67e392101e, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-
|
|
3
|
-
import { t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-
|
|
2
|
+
import { g as $a4e76a5424781910$export$e08e3b67e392101e, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
3
|
+
import { t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-CaY3sRjL.js";
|
|
4
4
|
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-CgeMQsGa.js";
|
|
5
|
-
import { t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-
|
|
6
|
-
import { t as $ac4318a9c075bb9f$export$ea18c227d4417cc3 } from "./useButton-
|
|
7
|
-
import { t as $fd3c5e01e837dc20$export$8042c6c013fd5226 } from "./useToggleState-
|
|
5
|
+
import { t as $0c4a58759813079a$export$4e328f61c538687f } from "./useFocusRing-JidySWlU.js";
|
|
6
|
+
import { t as $ac4318a9c075bb9f$export$ea18c227d4417cc3 } from "./useButton-V65TBDGM.js";
|
|
7
|
+
import { t as $fd3c5e01e837dc20$export$8042c6c013fd5226 } from "./useToggleState-D_rLMrVW.js";
|
|
8
8
|
import { t as $91fe5e721c7f36c1$export$c9549807523555e0 } from "./SelectionIndicator-CyOcB5ps.js";
|
|
9
|
-
import { n as Tooltip } from "./tooltip-
|
|
9
|
+
import { n as Tooltip } from "./tooltip-CT-vzIdz.js";
|
|
10
10
|
import { t as cva } from "./dist-DpXluZqJ.js";
|
|
11
11
|
import $3ARPR$react, { createContext, forwardRef, useContext } from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -113,7 +113,7 @@ var $75afe627ae0cc0fa$export$d2b052e7b4be1756 = forwardRef(function ToggleButton
|
|
|
113
113
|
//#endregion
|
|
114
114
|
//#region lib/components/toggle-button/toggle-button.tsx
|
|
115
115
|
var componentClasses = cva([
|
|
116
|
-
"es:font-variation-[\"wdth\"_85,\"wght\"_325,\"ROND\"_100,\"GRAD\"_0,\"slnt\"_0] es:not-aria-pressed:hover:font-variation-[\"wdth\"_85,\"wght\"_325,\"ROND\"_100,\"GRAD\"_75,\"slnt\"_0] es:aria-pressed:font-variation-[\"wdth\"_85,\"wght\"_325,\"ROND\"_100,\"GRAD\"_75,\"slnt\"
|
|
116
|
+
"es:font-variation-[\"wdth\"_85,\"wght\"_325,\"ROND\"_100,\"GRAD\"_0,\"slnt\"_0] es:not-aria-pressed:hover:font-variation-[\"wdth\"_85,\"wght\"_325,\"ROND\"_100,\"GRAD\"_75,\"slnt\"_0] es:aria-pressed:font-variation-[\"wdth\"_85,\"wght\"_325,\"ROND\"_100,\"GRAD\"_75,\"slnt\"_0]",
|
|
117
117
|
"es:flex es:items-center es:justify-center",
|
|
118
118
|
"es:transition-plus es:duration-300 es:ease-spring-smooth es:text-13",
|
|
119
119
|
"es:any-focus:outline-hidden",
|
|
@@ -145,6 +145,7 @@ var componentClasses = cva([
|
|
|
145
145
|
type: {
|
|
146
146
|
default: null,
|
|
147
147
|
ghost: null,
|
|
148
|
+
outline: null,
|
|
148
149
|
simple: null
|
|
149
150
|
},
|
|
150
151
|
disabled: {
|
|
@@ -281,6 +282,30 @@ var componentClasses = cva([
|
|
|
281
282
|
"es:focus-visible:bg-accent-50 es:focus-visible:inset-ring es:focus-visible:ring-accent-500/30 es:focus-visible:inset-shadow-accent-300/10 es:focus-visible:inset-ring-accent-500"
|
|
282
283
|
]
|
|
283
284
|
},
|
|
285
|
+
{
|
|
286
|
+
type: "outline",
|
|
287
|
+
disabled: false,
|
|
288
|
+
selected: false,
|
|
289
|
+
class: [
|
|
290
|
+
"es:bg-white",
|
|
291
|
+
"es:bg-linear-to-br es:from-surface-200/0 es:to-surface-200/0 es:text-secondary-700",
|
|
292
|
+
"es:inset-ring es:inset-ring-secondary-700/12",
|
|
293
|
+
"es:hover:from-surface-200/30 es:hover:to-surface-200/50 es:hover:text-accent-950 es:hover:inset-ring-accent-950/6",
|
|
294
|
+
"es:pressed:from-accent-600/5 es:pressed:to-accent-600/15 es:pressed:text-accent-900",
|
|
295
|
+
"es:focus-visible:bg-accent-50 es:focus-visible:text-accent-950 es:focus-visible:inset-ring es:focus-visible:ring-accent-500/30 es:focus-visible:inset-shadow-accent-300/10 es:focus-visible:inset-ring-accent-500"
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
type: "outline",
|
|
300
|
+
disabled: false,
|
|
301
|
+
selected: true,
|
|
302
|
+
class: [
|
|
303
|
+
"es:bg-white",
|
|
304
|
+
"es:bg-linear-to-br es:from-accent-600/70 es:to-accent-600/90 es:text-white",
|
|
305
|
+
"es:inset-ring es:inset-ring-accent-800/10",
|
|
306
|
+
"es:focus-visible:bg-accent-50 es:focus-visible:inset-ring es:focus-visible:ring-accent-500/30 es:focus-visible:inset-shadow-accent-300/10 es:focus-visible:inset-ring-accent-500"
|
|
307
|
+
]
|
|
308
|
+
},
|
|
284
309
|
{
|
|
285
310
|
type: "default",
|
|
286
311
|
disabled: true,
|
|
@@ -295,6 +320,11 @@ var componentClasses = cva([
|
|
|
295
320
|
disabled: true,
|
|
296
321
|
class: ["es:text-secondary-500 es:any-icon:text-secondary-500/50"]
|
|
297
322
|
},
|
|
323
|
+
{
|
|
324
|
+
type: "outline",
|
|
325
|
+
disabled: true,
|
|
326
|
+
class: ["es:text-secondary-500 es:any-icon:text-secondary-500/50", "es:inset-ring es:inset-ring-secondary-100"]
|
|
327
|
+
},
|
|
298
328
|
{
|
|
299
329
|
size: "small",
|
|
300
330
|
iconOnly: false,
|
|
@@ -372,6 +402,7 @@ var componentClasses = cva([
|
|
|
372
402
|
iconOnly: false
|
|
373
403
|
}
|
|
374
404
|
});
|
|
405
|
+
var isStringValue = (value) => Object.prototype.toString.call(value) === "[object String]";
|
|
375
406
|
var TypedTooltip = Tooltip;
|
|
376
407
|
/**
|
|
377
408
|
* A simple toggle button component.
|
|
@@ -403,7 +434,7 @@ var ToggleButton = (props) => {
|
|
|
403
434
|
const { children, icon, size = "default", type = "default", disabled, className, tooltip: rawTooltip, selected, onChange, wrapperClassName, tooltipProps, flat, hidden, "aria-label": ariaLabel, ...other } = props;
|
|
404
435
|
if (hidden) return null;
|
|
405
436
|
let tooltip = rawTooltip;
|
|
406
|
-
if (rawTooltip === true &&
|
|
437
|
+
if (rawTooltip === true && isStringValue(ariaLabel) && ariaLabel.length > 0) tooltip = ariaLabel;
|
|
407
438
|
const component = jsxs($75afe627ae0cc0fa$export$d2b052e7b4be1756, {
|
|
408
439
|
isSelected: selected,
|
|
409
440
|
onChange,
|
|
@@ -1,63 +1,13 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-DQoRUQAf.js";
|
|
2
|
-
import { m as $c7eafbbe1ea5834e$export$535bd6ca7f90a273, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, p as $390e54f620492c70$export$f680877a34711e37, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-
|
|
3
|
-
import { _ as $8f5a2122b0992be3$export$b9b3dfddab17db27, i as $d1116acdf220c2da$export$4c014de7c8940b4c, p as $8f5a2122b0992be3$export$630ff653c5ada6a9, r as $d1116acdf220c2da$export$13f3202a3e5ddd5, t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-
|
|
2
|
+
import { m as $c7eafbbe1ea5834e$export$535bd6ca7f90a273, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$df3a06d6289f983e, p as $390e54f620492c70$export$f680877a34711e37, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a, u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
3
|
+
import { _ as $8f5a2122b0992be3$export$b9b3dfddab17db27, i as $d1116acdf220c2da$export$4c014de7c8940b4c, p as $8f5a2122b0992be3$export$630ff653c5ada6a9, r as $d1116acdf220c2da$export$13f3202a3e5ddd5, t as $e969f22b6713ca4a$export$ae780daf29e6d456 } from "./useHover-CaY3sRjL.js";
|
|
4
4
|
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-CgeMQsGa.js";
|
|
5
|
-
import { a as $4fcfe18fac72dabd$export$2de4954e8ae13b9f, n as $b3526bc71400be8d$export$d39e1813b3bdd0e1, o as $4fcfe18fac72dabd$export$746d02f47f4d381, t as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6 } from "./useOverlayTriggerState-
|
|
5
|
+
import { a as $4fcfe18fac72dabd$export$2de4954e8ae13b9f, n as $b3526bc71400be8d$export$d39e1813b3bdd0e1, o as $4fcfe18fac72dabd$export$746d02f47f4d381, t as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6 } from "./useOverlayTriggerState-BKmSTK_5.js";
|
|
6
6
|
import { n as $72abaeab4d80592f$export$9fc1347d4195ccb3 } from "./PortalProvider-Dbcc7pHq.js";
|
|
7
|
-
import { n as $fcc7165e876206c6$export$6d3443f2c48bfc20, t as $fcc7165e876206c6$export$45fda7c47f93fd48 } from "./animation-
|
|
7
|
+
import { n as $fcc7165e876206c6$export$6d3443f2c48bfc20, t as $fcc7165e876206c6$export$45fda7c47f93fd48 } from "./animation-COc9P6ap.js";
|
|
8
8
|
import $3ARPR$react, { createContext, forwardRef, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import $3wX5A$reactdom from "react-dom";
|
|
11
|
-
//#region node_modules/react-aria/dist/private/overlays/useModal.mjs
|
|
12
|
-
var $c07df45195231803$var$Context = $3ARPR$react.createContext(null);
|
|
13
|
-
function $c07df45195231803$export$178405afcd8c5eb(props) {
|
|
14
|
-
let { children } = props;
|
|
15
|
-
let parent = useContext($c07df45195231803$var$Context);
|
|
16
|
-
let [modalCount, setModalCount] = useState(0);
|
|
17
|
-
let context = useMemo(() => ({
|
|
18
|
-
parent,
|
|
19
|
-
modalCount,
|
|
20
|
-
addModal() {
|
|
21
|
-
setModalCount((count) => count + 1);
|
|
22
|
-
if (parent) parent.addModal();
|
|
23
|
-
},
|
|
24
|
-
removeModal() {
|
|
25
|
-
setModalCount((count) => count - 1);
|
|
26
|
-
if (parent) parent.removeModal();
|
|
27
|
-
}
|
|
28
|
-
}), [parent, modalCount]);
|
|
29
|
-
return $3ARPR$react.createElement($c07df45195231803$var$Context.Provider, { value: context }, children);
|
|
30
|
-
}
|
|
31
|
-
function $c07df45195231803$export$d9aaed4c3ece1bc0() {
|
|
32
|
-
let context = useContext($c07df45195231803$var$Context);
|
|
33
|
-
return { modalProviderProps: { "aria-hidden": context && context.modalCount > 0 ? true : void 0 } };
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Creates a root node that will be aria-hidden if there are other modals open.
|
|
37
|
-
*/ function $c07df45195231803$var$OverlayContainerDOM(props) {
|
|
38
|
-
let { modalProviderProps } = $c07df45195231803$export$d9aaed4c3ece1bc0();
|
|
39
|
-
return $3ARPR$react.createElement("div", {
|
|
40
|
-
"data-overlay-container": true,
|
|
41
|
-
...props,
|
|
42
|
-
...modalProviderProps
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
function $c07df45195231803$export$bf688221f59024e5(props) {
|
|
46
|
-
return $3ARPR$react.createElement($c07df45195231803$export$178405afcd8c5eb, null, $3ARPR$react.createElement($c07df45195231803$var$OverlayContainerDOM, props));
|
|
47
|
-
}
|
|
48
|
-
function $c07df45195231803$export$b47c3594eab58386(props) {
|
|
49
|
-
let isSSR = $c7eafbbe1ea5834e$export$535bd6ca7f90a273();
|
|
50
|
-
let { portalContainer = isSSR ? null : document.body, ...rest } = props;
|
|
51
|
-
let { getContainer } = $72abaeab4d80592f$export$9fc1347d4195ccb3();
|
|
52
|
-
if (!props.portalContainer && getContainer) portalContainer = getContainer();
|
|
53
|
-
$3ARPR$react.useEffect(() => {
|
|
54
|
-
if (portalContainer?.closest("[data-overlay-container]")) throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.");
|
|
55
|
-
}, [portalContainer]);
|
|
56
|
-
if (!portalContainer) return null;
|
|
57
|
-
let contents = $3ARPR$react.createElement($c07df45195231803$export$bf688221f59024e5, rest);
|
|
58
|
-
return $3wX5A$reactdom.createPortal(contents, portalContainer);
|
|
59
|
-
}
|
|
60
|
-
//#endregion
|
|
61
11
|
//#region node_modules/react-stately/dist/private/tooltip/useTooltipTriggerState.mjs
|
|
62
12
|
var $3834487504f4fc00$var$TOOLTIP_DELAY = 1500;
|
|
63
13
|
var $3834487504f4fc00$var$TOOLTIP_COOLDOWN = 500;
|
|
@@ -69,6 +19,7 @@ var $3834487504f4fc00$var$globalCooldownTimeout = null;
|
|
|
69
19
|
function $3834487504f4fc00$export$4d40659c25ecb50b(props = {}) {
|
|
70
20
|
let { delay = $3834487504f4fc00$var$TOOLTIP_DELAY, closeDelay = $3834487504f4fc00$var$TOOLTIP_COOLDOWN } = props;
|
|
71
21
|
let { isOpen, open, close } = $f11fb0bcf1b2687a$export$61c6a8c84e605fb6(props);
|
|
22
|
+
let [shouldSkipAnimation, setIsInstant] = useState(false);
|
|
72
23
|
let id = useMemo(() => `${++$3834487504f4fc00$var$tooltipId}`, []);
|
|
73
24
|
let closeTimeout = useRef(null);
|
|
74
25
|
let closeCallback = useRef(close);
|
|
@@ -77,15 +28,16 @@ function $3834487504f4fc00$export$4d40659c25ecb50b(props = {}) {
|
|
|
77
28
|
};
|
|
78
29
|
let closeOpenTooltips = () => {
|
|
79
30
|
for (let hideTooltipId in $3834487504f4fc00$var$tooltips) if (hideTooltipId !== id) {
|
|
80
|
-
$3834487504f4fc00$var$tooltips[hideTooltipId](true);
|
|
31
|
+
$3834487504f4fc00$var$tooltips[hideTooltipId](true, true);
|
|
81
32
|
delete $3834487504f4fc00$var$tooltips[hideTooltipId];
|
|
82
33
|
}
|
|
83
34
|
};
|
|
84
|
-
let showTooltip = () => {
|
|
35
|
+
let showTooltip = (instant) => {
|
|
85
36
|
if (closeTimeout.current) clearTimeout(closeTimeout.current);
|
|
86
37
|
closeTimeout.current = null;
|
|
87
38
|
closeOpenTooltips();
|
|
88
39
|
ensureTooltipEntry();
|
|
40
|
+
setIsInstant(!!instant);
|
|
89
41
|
$3834487504f4fc00$var$globalWarmedUp = true;
|
|
90
42
|
open();
|
|
91
43
|
if ($3834487504f4fc00$var$globalWarmUpTimeout) {
|
|
@@ -97,7 +49,8 @@ function $3834487504f4fc00$export$4d40659c25ecb50b(props = {}) {
|
|
|
97
49
|
$3834487504f4fc00$var$globalCooldownTimeout = null;
|
|
98
50
|
}
|
|
99
51
|
};
|
|
100
|
-
let hideTooltip = (immediate) => {
|
|
52
|
+
let hideTooltip = (immediate, instant) => {
|
|
53
|
+
setIsInstant(!!instant);
|
|
101
54
|
if (immediate || closeDelay <= 0) {
|
|
102
55
|
if (closeTimeout.current) clearTimeout(closeTimeout.current);
|
|
103
56
|
closeTimeout.current = null;
|
|
@@ -127,9 +80,9 @@ function $3834487504f4fc00$export$4d40659c25ecb50b(props = {}) {
|
|
|
127
80
|
$3834487504f4fc00$var$globalWarmUpTimeout = setTimeout(() => {
|
|
128
81
|
$3834487504f4fc00$var$globalWarmUpTimeout = null;
|
|
129
82
|
$3834487504f4fc00$var$globalWarmedUp = true;
|
|
130
|
-
showTooltip();
|
|
83
|
+
showTooltip(false);
|
|
131
84
|
}, delay);
|
|
132
|
-
} else if (!isOpen) showTooltip();
|
|
85
|
+
} else if (!isOpen) showTooltip(true);
|
|
133
86
|
};
|
|
134
87
|
useEffect(() => {
|
|
135
88
|
closeCallback.current = close;
|
|
@@ -142,14 +95,65 @@ function $3834487504f4fc00$export$4d40659c25ecb50b(props = {}) {
|
|
|
142
95
|
}, [id]);
|
|
143
96
|
return {
|
|
144
97
|
isOpen,
|
|
98
|
+
shouldSkipAnimation,
|
|
145
99
|
open: (immediate) => {
|
|
146
100
|
if (!immediate && delay > 0 && !closeTimeout.current) warmupTooltip();
|
|
147
|
-
else showTooltip();
|
|
101
|
+
else showTooltip($3834487504f4fc00$var$globalWarmedUp);
|
|
148
102
|
},
|
|
149
103
|
close: hideTooltip
|
|
150
104
|
};
|
|
151
105
|
}
|
|
152
106
|
//#endregion
|
|
107
|
+
//#region node_modules/react-aria/dist/private/overlays/useModal.mjs
|
|
108
|
+
var $c07df45195231803$var$Context = $3ARPR$react.createContext(null);
|
|
109
|
+
function $c07df45195231803$export$178405afcd8c5eb(props) {
|
|
110
|
+
let { children } = props;
|
|
111
|
+
let parent = useContext($c07df45195231803$var$Context);
|
|
112
|
+
let [modalCount, setModalCount] = useState(0);
|
|
113
|
+
let context = useMemo(() => ({
|
|
114
|
+
parent,
|
|
115
|
+
modalCount,
|
|
116
|
+
addModal() {
|
|
117
|
+
setModalCount((count) => count + 1);
|
|
118
|
+
if (parent) parent.addModal();
|
|
119
|
+
},
|
|
120
|
+
removeModal() {
|
|
121
|
+
setModalCount((count) => count - 1);
|
|
122
|
+
if (parent) parent.removeModal();
|
|
123
|
+
}
|
|
124
|
+
}), [parent, modalCount]);
|
|
125
|
+
return $3ARPR$react.createElement($c07df45195231803$var$Context.Provider, { value: context }, children);
|
|
126
|
+
}
|
|
127
|
+
function $c07df45195231803$export$d9aaed4c3ece1bc0() {
|
|
128
|
+
let context = useContext($c07df45195231803$var$Context);
|
|
129
|
+
return { modalProviderProps: { "aria-hidden": context && context.modalCount > 0 ? true : void 0 } };
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Creates a root node that will be aria-hidden if there are other modals open.
|
|
133
|
+
*/ function $c07df45195231803$var$OverlayContainerDOM(props) {
|
|
134
|
+
let { modalProviderProps } = $c07df45195231803$export$d9aaed4c3ece1bc0();
|
|
135
|
+
return $3ARPR$react.createElement("div", {
|
|
136
|
+
"data-overlay-container": true,
|
|
137
|
+
...props,
|
|
138
|
+
...modalProviderProps
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function $c07df45195231803$export$bf688221f59024e5(props) {
|
|
142
|
+
return $3ARPR$react.createElement($c07df45195231803$export$178405afcd8c5eb, null, $3ARPR$react.createElement($c07df45195231803$var$OverlayContainerDOM, props));
|
|
143
|
+
}
|
|
144
|
+
function $c07df45195231803$export$b47c3594eab58386(props) {
|
|
145
|
+
let isSSR = $c7eafbbe1ea5834e$export$535bd6ca7f90a273();
|
|
146
|
+
let { portalContainer = isSSR ? null : document.body, ...rest } = props;
|
|
147
|
+
let { getContainer } = $72abaeab4d80592f$export$9fc1347d4195ccb3();
|
|
148
|
+
if (!props.portalContainer && getContainer) portalContainer = getContainer();
|
|
149
|
+
$3ARPR$react.useEffect(() => {
|
|
150
|
+
if (portalContainer?.closest("[data-overlay-container]")) throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.");
|
|
151
|
+
}, [portalContainer]);
|
|
152
|
+
if (!portalContainer) return null;
|
|
153
|
+
let contents = $3ARPR$react.createElement($c07df45195231803$export$bf688221f59024e5, rest);
|
|
154
|
+
return $3wX5A$reactdom.createPortal(contents, portalContainer);
|
|
155
|
+
}
|
|
156
|
+
//#endregion
|
|
153
157
|
//#region node_modules/react-aria/dist/private/tooltip/useTooltip.mjs
|
|
154
158
|
function $8c383cffc84c9982$export$1c4b08e0eca38426(props, state) {
|
|
155
159
|
let domProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, { labelable: true });
|
|
@@ -260,7 +264,8 @@ var $05a50f7d78b03ad9$export$28c660c63b792dea = forwardRef(function Tooltip({ UN
|
|
|
260
264
|
let contextState = useContext($05a50f7d78b03ad9$export$7a7623236eec67fa);
|
|
261
265
|
let localState = $3834487504f4fc00$export$4d40659c25ecb50b(props);
|
|
262
266
|
let state = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState;
|
|
263
|
-
let
|
|
267
|
+
let exitAnimation = $fcc7165e876206c6$export$45fda7c47f93fd48(ref, state.isOpen);
|
|
268
|
+
let isExiting = props.isExiting || !state.shouldSkipAnimation && exitAnimation || false;
|
|
264
269
|
if (!state.isOpen && !isExiting) return null;
|
|
265
270
|
return $3ARPR$react.createElement($c07df45195231803$export$b47c3594eab58386, { portalContainer: UNSTABLE_portalContainer }, $3ARPR$react.createElement($05a50f7d78b03ad9$var$TooltipInner, {
|
|
266
271
|
...props,
|
|
@@ -284,7 +289,8 @@ function $05a50f7d78b03ad9$var$TooltipInner(props) {
|
|
|
284
289
|
containerPadding: props.containerPadding,
|
|
285
290
|
onClose: () => state.close(true)
|
|
286
291
|
});
|
|
287
|
-
let
|
|
292
|
+
let enterAnimation = $fcc7165e876206c6$export$6d3443f2c48bfc20(props.tooltipRef, !!placement);
|
|
293
|
+
let isEntering = props.isEntering || !state.shouldSkipAnimation && enterAnimation || false;
|
|
288
294
|
let renderProps = $7230ffa83bc0c2cf$export$4d86445c2cf5e3({
|
|
289
295
|
...props,
|
|
290
296
|
defaultClassName: "react-aria-Tooltip",
|
|
@@ -48,16 +48,20 @@ function $232f8dea1b0a4f2f$export$79c0c687a5963b0a(opts, dispatch) {
|
|
|
48
48
|
insertBefore(key, ...values) {
|
|
49
49
|
dispatch((state) => {
|
|
50
50
|
let index = state.items.findIndex((item) => getKey?.(item) === key);
|
|
51
|
-
if (index === -1)
|
|
52
|
-
|
|
51
|
+
if (index === -1) {
|
|
52
|
+
if (state.items.length === 0) index = 0;
|
|
53
|
+
else return state;
|
|
54
|
+
}
|
|
53
55
|
return $232f8dea1b0a4f2f$var$insert(state, index, ...values);
|
|
54
56
|
});
|
|
55
57
|
},
|
|
56
58
|
insertAfter(key, ...values) {
|
|
57
59
|
dispatch((state) => {
|
|
58
60
|
let index = state.items.findIndex((item) => getKey?.(item) === key);
|
|
59
|
-
if (index === -1)
|
|
60
|
-
|
|
61
|
+
if (index === -1) {
|
|
62
|
+
if (state.items.length === 0) index = 0;
|
|
63
|
+
else return state;
|
|
64
|
+
}
|
|
61
65
|
return $232f8dea1b0a4f2f$var$insert(state, index + 1, ...values);
|
|
62
66
|
});
|
|
63
67
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-
|
|
2
|
-
import { i as $d1116acdf220c2da$export$4c014de7c8940b4c } from "./useHover-
|
|
1
|
+
import { u as $bbaa08b3cd72f041$export$9d1611c77c2fe928 } from "./utils-ClM91CuL.js";
|
|
2
|
+
import { i as $d1116acdf220c2da$export$4c014de7c8940b4c } from "./useHover-CaY3sRjL.js";
|
|
3
3
|
import { t as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f } from "./filterDOMProps-CgeMQsGa.js";
|
|
4
|
-
import { t as $d27d541f9569d26d$export$45712eceda6fad21 } from "./usePress-
|
|
4
|
+
import { t as $d27d541f9569d26d$export$45712eceda6fad21 } from "./usePress-CUCWcP-m.js";
|
|
5
5
|
//#region node_modules/react-aria/dist/private/button/useButton.mjs
|
|
6
6
|
function $ac4318a9c075bb9f$export$ea18c227d4417cc3(props, ref) {
|
|
7
7
|
let { elementType = "button", isDisabled, onPress, onPressStart, onPressEnd, onPressUp, onPressChange, preventFocusOnPress, allowFocusWhenDisabled, onClick, href, target, rel, type = "button" } = props;
|