@eightshift/ui-components 5.5.0 → 5.6.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/{Button-CQ5ZZJ2w.js → Button-BhEIfWLY.js} +1 -1
- package/dist/{Dialog-BMgMUQuN.js → Dialog-B8p4Ymh7.js} +7 -7
- package/dist/{List-BiAnh5G5.js → List-Bll1lQEW.js} +1 -1
- package/dist/{ListBox-DggfiuO_.js → ListBox-CEpKw7yC.js} +5 -5
- package/dist/{OverlayArrow-DraDOoRn.js → OverlayArrow-DDfa8khI.js} +1 -1
- package/dist/{SearchField-DWGdCvnn.js → SearchField-D6mPli0i.js} +2 -2
- package/dist/{Select-BvggcFOX.js → Select-CHzjZxXy.js} +7 -7
- package/dist/{Select-ef7c0426.esm-CmTkSxDx.js → Select-ef7c0426.esm-BJmjGGzK.js} +1 -1
- package/dist/{SelectionManager-B6-b5NM2.js → SelectionManager-D77bfEbg.js} +2 -2
- package/dist/{Separator-B-xeqOkC.js → Separator-DcqCdD4k.js} +1 -1
- package/dist/{SharedElementTransition-fML-zIv6.js → SharedElementTransition-BjRNHsjx.js} +1 -1
- package/dist/_commonjsHelpers-BhWcALO8.js +38 -0
- package/dist/assets/style-admin.css +2 -8286
- package/dist/assets/style-editor.css +2 -8286
- package/dist/assets/style.css +2 -8292
- package/dist/assets/wp-font-enhancements.css +2 -8
- package/dist/assets/wp-ui-enhancements.css +2 -387
- package/dist/components/breakpoint-preview/breakpoint-preview.js +1 -0
- package/dist/components/button/button.js +2 -2
- package/dist/components/checkbox/checkbox.js +2 -2
- package/dist/components/color-pickers/color-picker.js +1 -1
- 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 +2 -2
- package/dist/components/component-toggle/component-toggle.js +1 -1
- package/dist/components/draggable/draggable-handle.js +1 -1
- package/dist/components/draggable/draggable.js +2 -2
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/draggable-list/draggable-list.js +2 -2
- package/dist/components/expandable/expandable.js +3 -3
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +11 -11
- package/dist/components/matrix-align/matrix-align.js +2 -1
- package/dist/components/menu/menu.js +3 -3
- package/dist/components/modal/modal.js +4 -4
- package/dist/components/number-picker/number-picker.js +3 -3
- package/dist/components/option-select/option-select.js +1 -1
- package/dist/components/placeholders/file-picker-shell.js +13 -8
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/popover/popover.js +2 -2
- package/dist/components/radio/radio.js +2 -2
- package/dist/components/repeater/repeater-item.js +1 -1
- package/dist/components/repeater/repeater.js +2 -2
- package/dist/components/responsive/mini-responsive.js +2 -1
- package/dist/components/responsive/responsive-legacy.js +2 -1
- package/dist/components/responsive/responsive.js +2 -1
- package/dist/components/responsive-preview/responsive-preview.js +2 -1
- 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 +1 -1
- package/dist/components/select/multi-select-components.js +1 -1
- package/dist/components/select/multi-select.js +3 -3
- package/dist/components/select/react-select-component-wrappers.js +1 -1
- package/dist/components/select/single-select.js +2 -2
- package/dist/components/select/v2/async-multi-select.js +7 -6
- package/dist/components/select/v2/async-select.js +7 -6
- package/dist/components/select/v2/multi-select.js +8 -7
- package/dist/components/select/v2/shared.js +1 -1
- package/dist/components/select/v2/single-select.js +7 -7
- package/dist/components/slider/column-config-slider.js +1 -1
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/smart-image/smart-image.js +49 -7
- package/dist/components/smart-image/worker-inline.js +4 -0
- package/dist/components/tabs/tabs.js +6 -6
- package/dist/components/toggle/switch.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.js +2 -2
- package/dist/{default-i18n-CN_q3KUs.js → default-i18n-DBm-GqWM.js} +167 -50
- package/dist/general-6STKQIrk.js +4371 -0
- package/dist/icons/index.js +2 -0
- package/dist/icons/spinner.js +18 -0
- package/dist/{index-641ee5b8.esm-DVp0njHa.js → index-641ee5b8.esm-DiwvO-RP.js} +1 -1
- package/dist/{index-D8-Zjpbd.js → index-DjyEH0Gg.js} +1 -3
- package/dist/{multi-select-components-CT_W0Cy9.js → multi-select-components-B3KuDyYd.js} +1 -1
- package/dist/{react-select-async.esm-Zl1LPaPb.js → react-select-async.esm-_4pk-41v.js} +3 -3
- package/dist/{react-select.esm-Bu36HujU.js → react-select.esm-BeuAkAyY.js} +3 -3
- package/dist/sha256-C56UDWfQ.js +533 -0
- package/dist/{useButton-v9ngEj50.js → useButton-B2EaQJT_.js} +1 -1
- package/dist/{useDragAndDrop-C08ZXv4F.js → useDragAndDrop-DUXKDS0N.js} +5 -5
- package/dist/{useFilter-BlkUH1Ma.js → useFilter-BPcJ-Jzv.js} +1 -1
- package/dist/{useListState-RdLrYsMP.js → useListState-DZycqxCn.js} +1 -1
- package/dist/{useNumberField-D16dDfYF.js → useNumberField-CEA9Q4w_.js} +1 -1
- package/dist/{usePress-DJskZBH9.js → usePress-BCEPS3hl.js} +1 -1
- package/dist/{useSingleSelectListState-n0AVMr3Y.js → useSingleSelectListState-BFZEfeqI.js} +1 -1
- package/dist/{useToggle-DSBDAfdw.js → useToggle-DNoP2bvV.js} +1 -1
- package/dist/utilities/general.js +8 -4140
- package/dist/utilities/index.js +14 -7
- package/dist/utilities/web-workers.js +50 -0
- package/dist/workers/image-analysis.worker.js +52 -0
- package/package.json +13 -10
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $72a5793c14baf454$export$8b251419efc915eb, a as $431f98aba6844401$export$1ff3c3f08ae963c0 } from "../../Separator-
|
|
3
|
-
import { $ as $3674c52c6b3c5bce$export$27d2ad3c5815583e, a as $3674c52c6b3c5bce$export$d9b273488cd8ce6f, b as $3674c52c6b3c5bce$export$2ce376c2cc3355c8, c as $3674c52c6b3c5bce$export$4b1545b4f2016d26, d as $3674c52c6b3c5bce$export$ecabc99eeffab7ca } from "../../Dialog-
|
|
2
|
+
import { $ as $72a5793c14baf454$export$8b251419efc915eb, a as $431f98aba6844401$export$1ff3c3f08ae963c0 } from "../../Separator-DcqCdD4k.js";
|
|
3
|
+
import { $ as $3674c52c6b3c5bce$export$27d2ad3c5815583e, a as $3674c52c6b3c5bce$export$d9b273488cd8ce6f, b as $3674c52c6b3c5bce$export$2ce376c2cc3355c8, c as $3674c52c6b3c5bce$export$4b1545b4f2016d26, d as $3674c52c6b3c5bce$export$ecabc99eeffab7ca } from "../../Dialog-B8p4Ymh7.js";
|
|
4
4
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
5
5
|
import { icons } from "../../icons/icons.js";
|
|
6
6
|
import { Button } from "../button/button.js";
|
|
7
7
|
import { Popover } from "../popover/popover.js";
|
|
8
8
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
9
9
|
import { cloneElement } from "react";
|
|
10
|
-
import { _ as __ } from "../../default-i18n-
|
|
10
|
+
import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
|
|
11
11
|
/**
|
|
12
12
|
* @typedef {import('../button/button').ButtonProps} ButtonProps
|
|
13
13
|
* @typedef {import('../popover/popover').PopoverProps} PopoverProps
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { h as $a11501f3d1d39e6c$export$ea8f71083e90600f, i as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18, j as $337b884510726a0d$export$14c98a7594375490, k as $5e3802645cc19319$export$1c3ebcada18427bf, l as $de32f1b87079253c$export$d2f961adcb0afbe, m as $86ea4cb521eb2e37$export$2317d149ed6f78c4, n as $337b884510726a0d$export$c6fdb837b070b4ff, g as $de32f1b87079253c$export$2e1e1122cf0cba88, f as $de32f1b87079253c$export$3ddf2d174ce01153 } from "../../Dialog-
|
|
2
|
+
import { h as $a11501f3d1d39e6c$export$ea8f71083e90600f, i as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18, j as $337b884510726a0d$export$14c98a7594375490, k as $5e3802645cc19319$export$1c3ebcada18427bf, l as $de32f1b87079253c$export$d2f961adcb0afbe, m as $86ea4cb521eb2e37$export$2317d149ed6f78c4, n as $337b884510726a0d$export$c6fdb837b070b4ff, g as $de32f1b87079253c$export$2e1e1122cf0cba88, f as $de32f1b87079253c$export$3ddf2d174ce01153 } from "../../Dialog-B8p4Ymh7.js";
|
|
3
3
|
import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-B5aEynOM.js";
|
|
4
4
|
import { n as $b5e257d569688ac6$export$535bd6ca7f90a273, b as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, h as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-cvK1vxO7.js";
|
|
5
5
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-D2C6R0DK.js";
|
|
6
|
-
import { c as $21f1aa98acb08317$export$c57958e35f31ed73, d as $cc38e7bd3fc7b213$export$2bb74740c4e19def } from "../../SelectionManager-
|
|
6
|
+
import { c as $21f1aa98acb08317$export$c57958e35f31ed73, d as $cc38e7bd3fc7b213$export$2bb74740c4e19def } from "../../SelectionManager-D77bfEbg.js";
|
|
7
7
|
import React__default, { useState, useEffect, forwardRef, useContext, createContext, useRef, useMemo } from "react";
|
|
8
|
-
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, a as $d3f049242431219c$export$45fda7c47f93fd48, b as $d3f049242431219c$export$6d3443f2c48bfc20 } from "../../OverlayArrow-
|
|
8
|
+
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, a as $d3f049242431219c$export$45fda7c47f93fd48, b as $d3f049242431219c$export$6d3443f2c48bfc20 } from "../../OverlayArrow-DDfa8khI.js";
|
|
9
9
|
import { Button } from "../button/button.js";
|
|
10
|
-
import { _ as __ } from "../../default-i18n-
|
|
10
|
+
import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
|
|
11
11
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
12
12
|
import { icons } from "../../icons/icons.js";
|
|
13
13
|
import "../../react-jsx-parser.min-VUl-CuCv.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { forwardRef, createContext, useRef, useState, cloneElement } from "react";
|
|
3
|
-
import { _ as __ } from "../../default-i18n-
|
|
3
|
+
import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
|
|
4
4
|
import { a as $a049562f99e7db0e$export$f9c6924e160136d1, b as $3985021b0ad6602f$export$37fb8590cf2c088c, c as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-8yja_IHC.js";
|
|
5
5
|
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DWVaNd2E.js";
|
|
6
|
-
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-
|
|
6
|
+
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-BhEIfWLY.js";
|
|
7
7
|
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, f as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, g as $64fa3d84918910a7$export$ef03459518577ad4, h as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-cvK1vxO7.js";
|
|
8
8
|
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-B8BgFmIQ.js";
|
|
9
9
|
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu75_.js";
|
|
10
10
|
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-AxKZjtFm.js";
|
|
11
11
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-D2C6R0DK.js";
|
|
12
12
|
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-DMOmz986.js";
|
|
13
|
-
import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-
|
|
13
|
+
import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-CEA9Q4w_.js";
|
|
14
14
|
import { Button } from "../button/button.js";
|
|
15
15
|
import { icons } from "../../icons/icons.js";
|
|
16
16
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
@@ -7,7 +7,7 @@ import { SubMenuItem, MenuSeparator, MenuItem, Menu } from "../menu/menu.js";
|
|
|
7
7
|
import { RadioButtonGroup, RadioButton } from "../radio/radio.js";
|
|
8
8
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
9
9
|
import { ToggleButton } from "../toggle-button/toggle-button.js";
|
|
10
|
-
import { _ as __ } from "../../default-i18n-
|
|
10
|
+
import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
|
|
11
11
|
/**
|
|
12
12
|
* A component that allows the user to select an option from a list of options.
|
|
13
13
|
*
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
3
3
|
import { icons } from "../../icons/icons.js";
|
|
4
|
-
import
|
|
4
|
+
import "react";
|
|
5
5
|
import "../../react-jsx-parser.min-VUl-CuCv.js";
|
|
6
6
|
import { truncateMiddle } from "../../utilities/text-helpers.js";
|
|
7
|
+
import "../../sha256-C56UDWfQ.js";
|
|
7
8
|
import { SmartImage } from "../smart-image/smart-image.js";
|
|
8
9
|
/**
|
|
9
10
|
* A shell for a file picker UI, handling both rich visual presentation (e.g. images) and simple file placeholders.
|
|
@@ -52,7 +53,8 @@ const FilePickerShell = (props) => {
|
|
|
52
53
|
children,
|
|
53
54
|
className,
|
|
54
55
|
noUrlContent,
|
|
55
|
-
hidden
|
|
56
|
+
hidden,
|
|
57
|
+
...rest
|
|
56
58
|
} = props;
|
|
57
59
|
if (hidden) {
|
|
58
60
|
return null;
|
|
@@ -64,8 +66,9 @@ const FilePickerShell = (props) => {
|
|
|
64
66
|
return /* @__PURE__ */ jsxs(
|
|
65
67
|
"div",
|
|
66
68
|
{
|
|
69
|
+
...rest,
|
|
67
70
|
className: clsx(
|
|
68
|
-
"es:border es:border-secondary-200 es:bg-white es:flex es:justify-between es:rounded-2xl es:isolate es:relative es:flex-col es:gap-2 es:overflow-clip es:aspect-
|
|
71
|
+
"es:border es:border-secondary-200 es:bg-white es:flex es:justify-between es:rounded-2xl es:isolate es:relative es:flex-col es:gap-2 es:overflow-clip es:aspect-cinema es:group es:p-2",
|
|
69
72
|
className
|
|
70
73
|
),
|
|
71
74
|
children: [
|
|
@@ -89,26 +92,28 @@ const FilePickerShell = (props) => {
|
|
|
89
92
|
hasAnalysed && transparencyInfo?.top && url && "es:pt-3",
|
|
90
93
|
hasAnalysed && transparencyInfo?.bottom && url && "es:pb-3",
|
|
91
94
|
hasAnalysed && isTransparent && "es:bg-white/60 es:object-contain es:mx-auto",
|
|
92
|
-
hasAnalysed && isTransparent && (transparencyInfo?.left || transparencyInfo?.right) && "es:w-full",
|
|
93
|
-
hasAnalysed && isTransparent && (transparencyInfo?.top || transparencyInfo?.bottom) && "es:h-full",
|
|
95
|
+
hasAnalysed && isTransparent && (transparencyInfo?.left || transparencyInfo?.right) && "es:w-full!",
|
|
96
|
+
hasAnalysed && isTransparent && (transparencyInfo?.top || transparencyInfo?.bottom) && "es:h-full!",
|
|
94
97
|
hasAnalysed && !isTransparent && "es:w-full es:aspect-3-2 es:object-cover",
|
|
95
98
|
hasAnalysed && "es:grow es:rounded-xl"
|
|
96
99
|
),
|
|
97
|
-
errorClassName: "es:aspect-3-2 es:rounded-2xl es:bg-gradient-to-br es:from-
|
|
100
|
+
errorClassName: "es:aspect-3-2 es:rounded-2xl es:bg-gradient-to-br es:from-white es:to-secondary-50 es:border es:border-dashed es:border-secondary-200",
|
|
98
101
|
imageAnalysisSettings: { yFrom: 0.25, yTo: 0.75 },
|
|
102
|
+
...rest,
|
|
99
103
|
children: ({ image, dominantColors, isDark, hasAnalysed, isTransparent }) => /* @__PURE__ */ jsxs(
|
|
100
104
|
"div",
|
|
101
105
|
{
|
|
102
106
|
className: clsx(
|
|
103
|
-
"es:border es:
|
|
107
|
+
"es:border es:justify-between es:rounded-2xl es:isolate es:relative es:flex-col es:gap-y-2 es:grid es:grid-cols-1 es:overflow-clip es:aspect-3-2 es:transition",
|
|
108
|
+
hasAnalysed ? "es:border-secondary-200" : "es:border-secondary-200/0",
|
|
104
109
|
hasAnalysed && !isTransparent && "es:group es:grid-rows-1",
|
|
105
110
|
hasAnalysed && isTransparent && "es:p-2 es:grid-rows-[minmax(0,_1fr)_auto] es:h-fit",
|
|
111
|
+
!hasAnalysed && "es:shimmer-dark es:bg-secondary-50",
|
|
106
112
|
className
|
|
107
113
|
),
|
|
108
114
|
style: hasAnalysed && isTransparent ? { backgroundColor: `color-mix(in srgb, ${dominantColors[0]?.color || "#ffffff"} ${dominantColors[0]?.isDark ? 10 : 80}%, #ffffff)` } : {},
|
|
109
115
|
children: [
|
|
110
116
|
image,
|
|
111
|
-
!hasAnalysed && cloneElement(icons.loader, { className: "es:animate-spin es:size-8 es:text-accent-600 es:m-auto es:duration-3000" }),
|
|
112
117
|
hasAnalysed && children && /* @__PURE__ */ jsx(
|
|
113
118
|
"div",
|
|
114
119
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../default-i18n-
|
|
2
|
+
import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
|
|
3
3
|
import { icons } from "../../icons/icons.js";
|
|
4
4
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
5
5
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { e as $07b14b47974efb58$export$5b6b19405a83ff9d, f as $de32f1b87079253c$export$3ddf2d174ce01153, g as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../../Dialog-
|
|
2
|
+
import { e as $07b14b47974efb58$export$5b6b19405a83ff9d, f as $de32f1b87079253c$export$3ddf2d174ce01153, g as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../../Dialog-B8p4Ymh7.js";
|
|
3
3
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
4
|
-
import { _ as __ } from "../../default-i18n-
|
|
4
|
+
import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
|
|
5
5
|
import { Button } from "../button/button.js";
|
|
6
6
|
/**
|
|
7
7
|
* @typedef {Object} PopoverProps
|
|
@@ -4,12 +4,12 @@ import { b as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $bdb11010cef70236$
|
|
|
4
4
|
import { a as $2baaea4c71418dea$export$294aa081a6c6f55d, $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-B8BgFmIQ.js";
|
|
5
5
|
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu75_.js";
|
|
6
6
|
import { $ as $1d5b8b8664671ef2$export$c9549807523555e0 } from "../../SelectionIndicator-D7WMzeAW.js";
|
|
7
|
-
import { $ as $c8a5a149f625efcf$export$758399f318e6385a } from "../../SharedElementTransition-
|
|
7
|
+
import { $ as $c8a5a149f625efcf$export$758399f318e6385a } from "../../SharedElementTransition-BjRNHsjx.js";
|
|
8
8
|
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-AxKZjtFm.js";
|
|
9
9
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-D2C6R0DK.js";
|
|
10
10
|
import React__default, { useMemo, useState, forwardRef, createContext, cloneElement } from "react";
|
|
11
11
|
import { $ as $99facab73266f662$export$5add1d006293d136 } from "../../useFormReset-yV9VVy9R.js";
|
|
12
|
-
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "../../usePress-
|
|
12
|
+
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "../../usePress-BCEPS3hl.js";
|
|
13
13
|
import { $ as $f645667febf57a63$export$4c014de7c8940b4c, x as $431fbd86ca7dc216$export$f21a1ffae260145a, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715, w as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-BRDW3y7-.js";
|
|
14
14
|
import { a as $e93e671b31057976$export$b8473d3665f3a75a, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "../../useFormValidation-CeNsUGWK.js";
|
|
15
15
|
import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "../../FocusScope-B5vxRkHm.js";
|
|
@@ -5,7 +5,7 @@ import { icons } from "../../icons/icons.js";
|
|
|
5
5
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
6
6
|
import { useContext } from "react";
|
|
7
7
|
import { Expandable } from "../expandable/expandable.js";
|
|
8
|
-
import { _ as __ } from "../../default-i18n-
|
|
8
|
+
import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
|
|
9
9
|
import { RepeaterContext } from "./repeater-context.js";
|
|
10
10
|
/**
|
|
11
11
|
* A Repeater item.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useId, useState } from "react";
|
|
3
|
-
import { _ as __ } from "../../default-i18n-
|
|
3
|
+
import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
|
|
4
4
|
import { Button } from "../button/button.js";
|
|
5
5
|
import { icons } from "../../icons/icons.js";
|
|
6
6
|
import { BaseControl } from "../base-control/base-control.js";
|
|
7
7
|
import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
|
|
8
8
|
import { RepeaterContext } from "./repeater-context.js";
|
|
9
9
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
10
|
-
import { L as List, a as arrayRemove, b as arrayMove } from "../../List-
|
|
10
|
+
import { L as List, a as arrayRemove, b as arrayMove } from "../../List-Bll1lQEW.js";
|
|
11
11
|
import { Menu, MenuItem, MenuSeparator } from "../menu/menu.js";
|
|
12
12
|
const fixIds = (items, itemIdBase) => {
|
|
13
13
|
return items?.map((item, i) => ({
|
|
@@ -3,9 +3,10 @@ import { cloneElement } from "react";
|
|
|
3
3
|
import { DecorativeTooltip } from "../tooltip/tooltip.js";
|
|
4
4
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
5
|
import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
|
|
6
|
-
import { _ as __ } from "../../default-i18n-
|
|
6
|
+
import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
|
|
7
7
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
8
8
|
import { upperFirst } from "../../utilities/es-dash.js";
|
|
9
|
+
import "../../sha256-C56UDWfQ.js";
|
|
9
10
|
import { icons } from "../../icons/icons.js";
|
|
10
11
|
import { ResponsivePreview } from "../responsive-preview/responsive-preview.js";
|
|
11
12
|
import { ButtonGroup, Button } from "../button/button.js";
|
|
@@ -3,9 +3,10 @@ import { useState } from "react";
|
|
|
3
3
|
import { DecorativeTooltip } from "../tooltip/tooltip.js";
|
|
4
4
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
5
|
import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
|
|
6
|
-
import { _ as __ } from "../../default-i18n-
|
|
6
|
+
import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
|
|
7
7
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
8
8
|
import { upperFirst } from "../../utilities/es-dash.js";
|
|
9
|
+
import "../../sha256-C56UDWfQ.js";
|
|
9
10
|
import { icons } from "../../icons/icons.js";
|
|
10
11
|
import { Button } from "../button/button.js";
|
|
11
12
|
import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
|
|
@@ -3,9 +3,10 @@ import { useState } from "react";
|
|
|
3
3
|
import { DecorativeTooltip } from "../tooltip/tooltip.js";
|
|
4
4
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
5
|
import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
|
|
6
|
-
import { _ as __ } from "../../default-i18n-
|
|
6
|
+
import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
|
|
7
7
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
8
8
|
import { upperFirst } from "../../utilities/es-dash.js";
|
|
9
|
+
import "../../sha256-C56UDWfQ.js";
|
|
9
10
|
import { icons } from "../../icons/icons.js";
|
|
10
11
|
import { Menu, MenuSectionHeader, MenuItem, MenuSeparator, SubMenuItem } from "../menu/menu.js";
|
|
11
12
|
import { ResponsivePreview } from "../responsive-preview/responsive-preview.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../default-i18n-
|
|
2
|
+
import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
|
|
3
3
|
import { upperFirst } from "../../utilities/es-dash.js";
|
|
4
|
+
import "../../sha256-C56UDWfQ.js";
|
|
4
5
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
5
6
|
import { icons } from "../../icons/icons.js";
|
|
6
7
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useId } from "react";
|
|
3
|
-
import { A as AsyncSelect$1 } from "../../react-select-async.esm-
|
|
4
|
-
import { D as DndContext, g as getDragEndHandler, S as SortableContext, a as getMultiValueRemove, b as getMultiValue } from "../../multi-select-components-
|
|
3
|
+
import { A as AsyncSelect$1 } from "../../react-select-async.esm-_4pk-41v.js";
|
|
4
|
+
import { D as DndContext, g as getDragEndHandler, S as SortableContext, a as getMultiValueRemove, b as getMultiValue } from "../../multi-select-components-B3KuDyYd.js";
|
|
5
5
|
import { r as restrictToParentElement } from "../../modifiers.esm-BuJQPI1X.js";
|
|
6
6
|
import { CustomSelectDefaultClearIndicator, CustomSelectDefaultDropdownIndicator, CustomSelectDefaultMultiValueRemove } from "./custom-select-default-components.js";
|
|
7
7
|
import { BaseControl } from "../base-control/base-control.js";
|
|
8
8
|
import { eightshiftSelectClasses } from "./styles.js";
|
|
9
|
-
import { c as components } from "../../index-641ee5b8.esm-
|
|
9
|
+
import { c as components } from "../../index-641ee5b8.esm-DiwvO-RP.js";
|
|
10
10
|
/**
|
|
11
11
|
* Multi-select menu with async loading and re-ordering.
|
|
12
12
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { A as AsyncSelect$1 } from "../../react-select-async.esm-
|
|
2
|
+
import { A as AsyncSelect$1 } from "../../react-select-async.esm-_4pk-41v.js";
|
|
3
3
|
import { CustomSelectDefaultClearIndicator, CustomSelectDefaultDropdownIndicator } from "./custom-select-default-components.js";
|
|
4
4
|
import { BaseControl } from "../base-control/base-control.js";
|
|
5
5
|
import { eightshiftSelectClasses } from "./styles.js";
|
|
6
|
-
import { c as components } from "../../index-641ee5b8.esm-
|
|
6
|
+
import { c as components } from "../../index-641ee5b8.esm-DiwvO-RP.js";
|
|
7
7
|
/**
|
|
8
8
|
* Select menu with async loading.
|
|
9
9
|
*
|
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import React__default from "react";
|
|
3
3
|
import { icons } from "../../icons/icons.js";
|
|
4
4
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
|
-
import { c as components } from "../../index-641ee5b8.esm-
|
|
5
|
+
import { c as components } from "../../index-641ee5b8.esm-DiwvO-RP.js";
|
|
6
6
|
/**
|
|
7
7
|
* Default dropdown indicator for CustomSelect.
|
|
8
8
|
*
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useId } from "react";
|
|
3
|
-
import { S as StateManagedSelect$1 } from "../../react-select.esm-
|
|
4
|
-
import { D as DndContext, g as getDragEndHandler, S as SortableContext, a as getMultiValueRemove, b as getMultiValue } from "../../multi-select-components-
|
|
3
|
+
import { S as StateManagedSelect$1 } from "../../react-select.esm-BeuAkAyY.js";
|
|
4
|
+
import { D as DndContext, g as getDragEndHandler, S as SortableContext, a as getMultiValueRemove, b as getMultiValue } from "../../multi-select-components-B3KuDyYd.js";
|
|
5
5
|
import { r as restrictToParentElement } from "../../modifiers.esm-BuJQPI1X.js";
|
|
6
6
|
import { CustomSelectDefaultClearIndicator, CustomSelectDefaultDropdownIndicator, CustomSelectDefaultMultiValueRemove } from "./custom-select-default-components.js";
|
|
7
7
|
import { getValue } from "./shared.js";
|
|
8
8
|
import { BaseControl } from "../base-control/base-control.js";
|
|
9
9
|
import { eightshiftSelectClasses } from "./styles.js";
|
|
10
|
-
import { c as components } from "../../index-641ee5b8.esm-
|
|
10
|
+
import { c as components } from "../../index-641ee5b8.esm-DiwvO-RP.js";
|
|
11
11
|
/**
|
|
12
12
|
* Multi-select menu with re-orderable items.
|
|
13
13
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { S as StateManagedSelect$1 } from "../../react-select.esm-
|
|
2
|
+
import { S as StateManagedSelect$1 } from "../../react-select.esm-BeuAkAyY.js";
|
|
3
3
|
import { CustomSelectDefaultClearIndicator, CustomSelectDefaultDropdownIndicator } from "./custom-select-default-components.js";
|
|
4
4
|
import { getValue } from "./shared.js";
|
|
5
5
|
import { BaseControl } from "../base-control/base-control.js";
|
|
6
6
|
import { eightshiftSelectClasses } from "./styles.js";
|
|
7
|
-
import { c as components } from "../../index-641ee5b8.esm-
|
|
7
|
+
import { c as components } from "../../index-641ee5b8.esm-DiwvO-RP.js";
|
|
8
8
|
/**
|
|
9
9
|
* Select menu.
|
|
10
10
|
*
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../../default-i18n-
|
|
2
|
+
import { _ as __ } from "../../../default-i18n-DBm-GqWM.js";
|
|
3
3
|
import { BaseControl } from "../../base-control/base-control.js";
|
|
4
|
-
import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../../SearchField-
|
|
5
|
-
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../../Button-
|
|
6
|
-
import { g as $de32f1b87079253c$export$2e1e1122cf0cba88, e as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-
|
|
4
|
+
import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../../SearchField-D6mPli0i.js";
|
|
5
|
+
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../../Button-BhEIfWLY.js";
|
|
6
|
+
import { g as $de32f1b87079253c$export$2e1e1122cf0cba88, e as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-B8p4Ymh7.js";
|
|
7
7
|
import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../../Input-8yja_IHC.js";
|
|
8
8
|
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../../Label-DWVaNd2E.js";
|
|
9
|
-
import { $ as $eed445e0843c11d0$export$41f133550aa26f48, a as $eed445e0843c11d0$export$a11e76429ed99b4, b as $612b8eb6cb90e02d$export$62ed72bc21f6b8a6 } from "../../../ListBox-
|
|
9
|
+
import { $ as $eed445e0843c11d0$export$41f133550aa26f48, a as $eed445e0843c11d0$export$a11e76429ed99b4, b as $612b8eb6cb90e02d$export$62ed72bc21f6b8a6 } from "../../../ListBox-CEpKw7yC.js";
|
|
10
10
|
import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../../Text-AxKZjtFm.js";
|
|
11
|
-
import { $ as $d8f176866e6dc039$export$2cfc5be7a55829f6 } from "../../../useDragAndDrop-
|
|
11
|
+
import { $ as $d8f176866e6dc039$export$2cfc5be7a55829f6 } from "../../../useDragAndDrop-DUXKDS0N.js";
|
|
12
12
|
import { useRef, useEffect, cloneElement } from "react";
|
|
13
13
|
import { icons } from "../../../icons/icons.js";
|
|
14
14
|
import "../../../react-jsx-parser.min-VUl-CuCv.js";
|
|
@@ -16,6 +16,7 @@ import { OptionItemBase } from "./shared.js";
|
|
|
16
16
|
import { RichLabel } from "../../rich-label/rich-label.js";
|
|
17
17
|
import { c as clsx } from "../../../utils-cvK1vxO7.js";
|
|
18
18
|
import { truncateEnd, unescapeHTML } from "../../../utilities/text-helpers.js";
|
|
19
|
+
import "../../../sha256-C56UDWfQ.js";
|
|
19
20
|
import { moveArrayItem } from "../shared.js";
|
|
20
21
|
import { $ as $f86e6c1ec7da6ebb$export$bc3384a35de93d66 } from "../../../useAsyncList-D52mQcrH.js";
|
|
21
22
|
/**
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../../default-i18n-
|
|
2
|
+
import { _ as __ } from "../../../default-i18n-DBm-GqWM.js";
|
|
3
3
|
import { BaseControl } from "../../base-control/base-control.js";
|
|
4
|
-
import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../../SearchField-
|
|
5
|
-
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../../Button-
|
|
4
|
+
import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../../SearchField-D6mPli0i.js";
|
|
5
|
+
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../../Button-BhEIfWLY.js";
|
|
6
6
|
import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../../Input-8yja_IHC.js";
|
|
7
7
|
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../../Label-DWVaNd2E.js";
|
|
8
|
-
import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../../ListBox-
|
|
9
|
-
import { e as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-
|
|
10
|
-
import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, b as $82d7e5349645de74$export$ef445b55be0601bd } from "../../../Select-
|
|
8
|
+
import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../../ListBox-CEpKw7yC.js";
|
|
9
|
+
import { e as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-B8p4Ymh7.js";
|
|
10
|
+
import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, b as $82d7e5349645de74$export$ef445b55be0601bd } from "../../../Select-CHzjZxXy.js";
|
|
11
11
|
import { useRef, useEffect, cloneElement, useContext } from "react";
|
|
12
12
|
import { icons } from "../../../icons/icons.js";
|
|
13
13
|
import "../../../react-jsx-parser.min-VUl-CuCv.js";
|
|
14
14
|
import { OptionItemBase } from "./shared.js";
|
|
15
15
|
import { RichLabel } from "../../rich-label/rich-label.js";
|
|
16
16
|
import { unescapeHTML } from "../../../utilities/text-helpers.js";
|
|
17
|
+
import "../../../sha256-C56UDWfQ.js";
|
|
17
18
|
import { c as clsx } from "../../../utils-cvK1vxO7.js";
|
|
18
19
|
import { $ as $f86e6c1ec7da6ebb$export$bc3384a35de93d66 } from "../../../useAsyncList-D52mQcrH.js";
|
|
19
20
|
/**
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../../default-i18n-
|
|
2
|
+
import { _ as __ } from "../../../default-i18n-DBm-GqWM.js";
|
|
3
3
|
import { BaseControl } from "../../base-control/base-control.js";
|
|
4
|
-
import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../../SearchField-
|
|
5
|
-
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../../Button-
|
|
6
|
-
import { g as $de32f1b87079253c$export$2e1e1122cf0cba88, e as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-
|
|
4
|
+
import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../../SearchField-D6mPli0i.js";
|
|
5
|
+
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../../Button-BhEIfWLY.js";
|
|
6
|
+
import { g as $de32f1b87079253c$export$2e1e1122cf0cba88, e as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-B8p4Ymh7.js";
|
|
7
7
|
import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../../Input-8yja_IHC.js";
|
|
8
8
|
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../../Label-DWVaNd2E.js";
|
|
9
|
-
import { $ as $eed445e0843c11d0$export$41f133550aa26f48, a as $eed445e0843c11d0$export$a11e76429ed99b4, b as $612b8eb6cb90e02d$export$62ed72bc21f6b8a6 } from "../../../ListBox-
|
|
9
|
+
import { $ as $eed445e0843c11d0$export$41f133550aa26f48, a as $eed445e0843c11d0$export$a11e76429ed99b4, b as $612b8eb6cb90e02d$export$62ed72bc21f6b8a6 } from "../../../ListBox-CEpKw7yC.js";
|
|
10
10
|
import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../../Text-AxKZjtFm.js";
|
|
11
|
-
import { $ as $d8f176866e6dc039$export$2cfc5be7a55829f6 } from "../../../useDragAndDrop-
|
|
11
|
+
import { $ as $d8f176866e6dc039$export$2cfc5be7a55829f6 } from "../../../useDragAndDrop-DUXKDS0N.js";
|
|
12
12
|
import { useRef, cloneElement } from "react";
|
|
13
13
|
import { icons } from "../../../icons/icons.js";
|
|
14
14
|
import "../../../react-jsx-parser.min-VUl-CuCv.js";
|
|
@@ -17,7 +17,8 @@ import { RichLabel } from "../../rich-label/rich-label.js";
|
|
|
17
17
|
import { c as clsx } from "../../../utils-cvK1vxO7.js";
|
|
18
18
|
import { getValue, moveArrayItem } from "../shared.js";
|
|
19
19
|
import { truncateEnd } from "../../../utilities/text-helpers.js";
|
|
20
|
-
import
|
|
20
|
+
import "../../../sha256-C56UDWfQ.js";
|
|
21
|
+
import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../../useFilter-BPcJ-Jzv.js";
|
|
21
22
|
/**
|
|
22
23
|
* Multi-select menu.
|
|
23
24
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { a as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../../ListBox-
|
|
2
|
+
import { a as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../../ListBox-CEpKw7yC.js";
|
|
3
3
|
import { c as clsx } from "../../../utils-cvK1vxO7.js";
|
|
4
4
|
import { icons } from "../../../icons/icons.js";
|
|
5
5
|
import "react";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../../default-i18n-
|
|
2
|
+
import { _ as __ } from "../../../default-i18n-DBm-GqWM.js";
|
|
3
3
|
import { BaseControl } from "../../base-control/base-control.js";
|
|
4
|
-
import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../../SearchField-
|
|
5
|
-
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../../Button-
|
|
4
|
+
import { $ as $d2f53cda644affe3$export$2f2b9559550c7bbc, a as $440f4836bcb56932$export$b94867ecbd698f21 } from "../../../SearchField-D6mPli0i.js";
|
|
5
|
+
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../../Button-BhEIfWLY.js";
|
|
6
6
|
import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../../Input-8yja_IHC.js";
|
|
7
7
|
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../../Label-DWVaNd2E.js";
|
|
8
|
-
import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../../ListBox-
|
|
9
|
-
import { e as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-
|
|
10
|
-
import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, b as $82d7e5349645de74$export$ef445b55be0601bd } from "../../../Select-
|
|
8
|
+
import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../../ListBox-CEpKw7yC.js";
|
|
9
|
+
import { e as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-B8p4Ymh7.js";
|
|
10
|
+
import { $ as $82d7e5349645de74$export$ef9b1a59e592288f, a as $82d7e5349645de74$export$e288731fd71264f0, b as $82d7e5349645de74$export$ef445b55be0601bd } from "../../../Select-CHzjZxXy.js";
|
|
11
11
|
import { useRef, cloneElement, useContext } from "react";
|
|
12
12
|
import { icons } from "../../../icons/icons.js";
|
|
13
13
|
import "../../../react-jsx-parser.min-VUl-CuCv.js";
|
|
14
14
|
import { OptionItemBase } from "./shared.js";
|
|
15
15
|
import { RichLabel } from "../../rich-label/rich-label.js";
|
|
16
16
|
import { c as clsx } from "../../../utils-cvK1vxO7.js";
|
|
17
|
-
import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../../useFilter-
|
|
17
|
+
import { $ as $bb77f239b46e8c72$export$3274cf84b703fff } from "../../../useFilter-BPcJ-Jzv.js";
|
|
18
18
|
/**
|
|
19
19
|
* Select menu.
|
|
20
20
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../default-i18n-
|
|
2
|
+
import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
|
|
3
3
|
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DWVaNd2E.js";
|
|
4
4
|
import { $ as $6f909507e6374d18$export$472062a354075cee, a as $6f909507e6374d18$export$105594979f116971, b as $6f909507e6374d18$export$2c1b491743890dec, c as $6f909507e6374d18$export$a590f758a961cb5b } from "../../Slider-DfU6bRtH.js";
|
|
5
5
|
import { BaseControl } from "../base-control/base-control.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
|
|
2
|
-
import { _ as __, a as _n } from "../../default-i18n-
|
|
2
|
+
import { _ as __, a as _n } from "../../default-i18n-DBm-GqWM.js";
|
|
3
3
|
/**
|
|
4
4
|
* Generates an array of markers based on the provided minimum and maximum values and step.
|
|
5
5
|
* If the step is less than 10, only markers divisible by 5 and 10 are included.
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../default-i18n-
|
|
2
|
+
import { _ as __ } from "../../default-i18n-DBm-GqWM.js";
|
|
3
3
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
4
|
-
import { useState, cloneElement } from "react";
|
|
5
|
-
import { analyzeImage } from "../../utilities/general.js";
|
|
4
|
+
import { useState, useRef, useEffect, cloneElement } from "react";
|
|
6
5
|
import { icons } from "../../icons/icons.js";
|
|
7
6
|
import "../../react-jsx-parser.min-VUl-CuCv.js";
|
|
8
7
|
import { DecorativeTooltip } from "../tooltip/tooltip.js";
|
|
8
|
+
import { useImageAnalysisWorker } from "../../utilities/web-workers.js";
|
|
9
|
+
import workerInline from "./worker-inline.js";
|
|
10
|
+
import { s as sha256Exports } from "../../sha256-C56UDWfQ.js";
|
|
9
11
|
/**
|
|
10
12
|
* @typedef {Object} CustomImageProps
|
|
11
13
|
* @property {JSX.Element} [props.renderError] - Component to render if image analysis fails. `(error) => JSX:Element`.
|
|
@@ -13,6 +15,7 @@ import { DecorativeTooltip } from "../tooltip/tooltip.js";
|
|
|
13
15
|
* @property {string} [props.processingClassName] - Classes to apply while the image is loading / being processed.
|
|
14
16
|
* @property {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
15
17
|
* @property {import('../../utilities/general').ImageAnalysisSettings} [imageAnalysisSettings] - Settings to pass to the image analysis function.
|
|
18
|
+
* @property {import('../../utilities/general').ImageAnalysisResult} [analysisData] - Previous analysis result to pass in directly, skipping analysis.
|
|
16
19
|
*
|
|
17
20
|
* @preserve
|
|
18
21
|
*/
|
|
@@ -51,7 +54,7 @@ import { DecorativeTooltip } from "../tooltip/tooltip.js";
|
|
|
51
54
|
* @preserve
|
|
52
55
|
*/
|
|
53
56
|
const SmartImage = (props) => {
|
|
54
|
-
const { imageAnalysisSettings, errorClassName, processingClassName = "es:opacity-0 es:fixed", hidden, renderError, children, ...imageProps } = props;
|
|
57
|
+
const { imageAnalysisSettings, errorClassName, processingClassName = "es:opacity-0 es:fixed", hidden, renderError, analysisData, children, ...imageProps } = props;
|
|
55
58
|
const [isLoaded, setIsLoaded] = useState(false);
|
|
56
59
|
const [hasAnalysed, setHasAnalysed] = useState(false);
|
|
57
60
|
const [isTransparent, setIsTransparent] = useState(null);
|
|
@@ -59,10 +62,23 @@ const SmartImage = (props) => {
|
|
|
59
62
|
const [dominantColors, setDominantColors] = useState([]);
|
|
60
63
|
const [isDark, setIsDark] = useState(false);
|
|
61
64
|
const [error, setError] = useState(null);
|
|
65
|
+
const workerRef = useRef(null);
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
return () => {
|
|
68
|
+
if (workerRef.current) {
|
|
69
|
+
workerRef.current.terminate();
|
|
70
|
+
workerRef.current = null;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}, []);
|
|
74
|
+
const { analyzeWithWorkerCb } = useImageAnalysisWorker(workerRef, workerInline);
|
|
62
75
|
if (hidden) {
|
|
63
76
|
return null;
|
|
64
77
|
}
|
|
65
78
|
const classFetchProps = { isLoaded, hasAnalysed, isTransparent, dominantColors, isDark, transparencyInfo };
|
|
79
|
+
if (analysisData) {
|
|
80
|
+
delete imageProps.analysisData;
|
|
81
|
+
}
|
|
66
82
|
const imageElement = /* @__PURE__ */ jsx(
|
|
67
83
|
"img",
|
|
68
84
|
{
|
|
@@ -87,13 +103,39 @@ const SmartImage = (props) => {
|
|
|
87
103
|
setHasAnalysed(true);
|
|
88
104
|
return;
|
|
89
105
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
const { isDark: dark, dominantColors: colors, isTransparent: transparent, transparencyInfo: transparencyInfo2 } = result;
|
|
106
|
+
if (analysisData) {
|
|
107
|
+
const { isDark: dark, dominantColors: colors, isTransparent: transparent, transparencyInfo: transparencyInfo2 } = analysisData;
|
|
93
108
|
setIsDark(dark);
|
|
94
109
|
setDominantColors(colors);
|
|
95
110
|
setIsTransparent(transparent);
|
|
96
111
|
setTransparencyInfo(transparencyInfo2);
|
|
112
|
+
setHasAnalysed(true);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const cacheKey = `es-uic-img-analysis-${sha256Exports.sha256(imageProps.src)}`;
|
|
116
|
+
if (localStorage?.getItem(cacheKey)) {
|
|
117
|
+
const { isDark: dark, dominantColors: colors, isTransparent: transparent, transparencyInfo: transparencyInfo2 } = JSON.parse(localStorage.getItem(cacheKey));
|
|
118
|
+
setIsDark(dark);
|
|
119
|
+
setDominantColors(colors);
|
|
120
|
+
setIsTransparent(transparent);
|
|
121
|
+
setTransparencyInfo(transparencyInfo2);
|
|
122
|
+
setHasAnalysed(true);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
try {
|
|
126
|
+
const imageBitmap = await createImageBitmap(e.target);
|
|
127
|
+
const result = await analyzeWithWorkerCb(imageBitmap, imageAnalysisSettings);
|
|
128
|
+
if (result) {
|
|
129
|
+
const { isDark: dark, dominantColors: colors, isTransparent: transparent, transparencyInfo: transparencyInfo2 } = result;
|
|
130
|
+
setIsDark(dark);
|
|
131
|
+
setDominantColors(colors);
|
|
132
|
+
setIsTransparent(transparent);
|
|
133
|
+
setTransparencyInfo(transparencyInfo2);
|
|
134
|
+
localStorage?.setItem(cacheKey, JSON.stringify(result));
|
|
135
|
+
}
|
|
136
|
+
} catch (err) {
|
|
137
|
+
console.error("Error analyzing image:", err);
|
|
138
|
+
setError(err);
|
|
97
139
|
}
|
|
98
140
|
setHasAnalysed(true);
|
|
99
141
|
},
|