@eightshift/ui-components 5.0.2 → 5.0.4
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-BpwTmkAe.js → Button-DH22t_SM.js} +75 -6
- package/dist/{Collection-n5d0zIgb.js → Collection-uTAXq9Br.js} +1 -1
- package/dist/{Color-lVhk8V_G.js → Color-CNqKeT8D.js} +1 -1
- package/dist/{ColorSwatch-DntWEAC3.js → ColorSwatch-Dt3lRApA.js} +1 -1
- package/dist/{ComboBox-BJpTEATT.js → ComboBox-D7KpCYaK.js} +9 -9
- package/dist/{Dialog-O9uw63D7.js → Dialog-CJVCRT8_.js} +5 -5
- package/dist/{ListBox-BTxlCGcc.js → ListBox-_nDFq8-H.js} +4 -4
- package/dist/{OverlayArrow-5aDgmImj.js → OverlayArrow-CjvnevpX.js} +1 -1
- package/dist/{Separator-CaTBkETC.js → Separator-BN3mjL6q.js} +1 -1
- package/dist/{Slider-C-S1oEH9.js → Slider-uOPcIpqS.js} +1 -1
- package/dist/assets/style-admin.css +1121 -365
- package/dist/assets/style-editor.css +1121 -365
- package/dist/assets/style.css +1124 -368
- package/dist/components/button/button.js +53 -25
- package/dist/components/checkbox/checkbox.js +5 -5
- package/dist/components/color-pickers/color-swatch.js +4 -4
- package/dist/components/color-pickers/gradient-editor.js +3 -3
- package/dist/components/color-pickers/solid-color-picker.js +9 -9
- package/dist/components/component-toggle/component-toggle.js +0 -1
- package/dist/components/draggable/draggable.js +9 -5
- package/dist/components/expandable/expandable.js +60 -53
- package/dist/components/input-field/input-field.js +3 -3
- package/dist/components/layout/hstack.js +4 -2
- package/dist/components/layout/vstack.js +4 -2
- package/dist/components/link-input/link-input.js +11 -9
- package/dist/components/menu/menu.js +5 -5
- package/dist/components/modal/modal.js +101 -77
- package/dist/components/notice/notice.js +16 -16
- package/dist/components/number-picker/number-picker.js +3 -3
- package/dist/components/placeholders/file-placeholder.js +13 -6
- package/dist/components/placeholders/image-placeholder.js +2 -2
- package/dist/components/placeholders/media-placeholder.js +2 -2
- package/dist/components/popover/popover.js +2 -2
- package/dist/components/radio/radio.js +4 -4
- package/dist/components/repeater/repeater-item.js +6 -5
- package/dist/components/repeater/repeater.js +8 -3
- package/dist/components/select/async-multi-select.js +1 -0
- package/dist/components/select/async-single-select.js +1 -0
- package/dist/components/select/multi-select.js +1 -0
- package/dist/components/select/single-select.js +1 -0
- package/dist/components/select/styles.js +1 -1
- package/dist/components/select/v2/async-select.js +5 -5
- package/dist/components/select/v2/shared.js +1 -1
- package/dist/components/select/v2/single-select.js +8 -8
- package/dist/components/slider/column-config-slider.js +2 -2
- package/dist/components/slider/slider.js +2 -2
- package/dist/components/tabs/tabs.js +12 -11
- package/dist/components/toggle/switch.js +3 -3
- package/dist/components/toggle-button/toggle-button.js +13 -12
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/{number-GajL10e1.js → number-CHmNj-oR.js} +2 -2
- package/dist/{useButton-Bt3BffJm.js → useButton-lRcWnvOB.js} +1 -1
- package/dist/{useListState-DkyH7elT.js → useListState-9Hq_FiRF.js} +1 -1
- package/dist/{useNumberField-CU1_u8ze.js → useNumberField-D0u2bh8g.js} +2 -2
- package/dist/{usePress-BrJylgPR.js → usePress-DWBuejBp.js} +5 -3
- package/dist/{useSingleSelectListState-C4sorv2p.js → useSingleSelectListState-DqhemUIh.js} +1 -1
- package/dist/{useToggle-CDa3YAZI.js → useToggle-yGuUBU7q.js} +1 -1
- package/package.json +11 -11
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-
|
|
3
|
-
import { $ as $f86e6c1ec7da6ebb$export$bc3384a35de93d66, a as $d01f2c01039c0eec$export$72b9695b8216309a } from "../../ComboBox-
|
|
2
|
+
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../Button-DH22t_SM.js";
|
|
3
|
+
import { $ as $f86e6c1ec7da6ebb$export$bc3384a35de93d66, a as $d01f2c01039c0eec$export$72b9695b8216309a } from "../../ComboBox-D7KpCYaK.js";
|
|
4
4
|
import { $ as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 } from "../../Group-DDPhPPTQ.js";
|
|
5
5
|
import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-BmDS8Juy.js";
|
|
6
6
|
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-JS_ob-kh.js";
|
|
7
|
-
import { $ as $eed445e0843c11d0$export$41f133550aa26f48, a as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../ListBox-
|
|
8
|
-
import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-
|
|
7
|
+
import { $ as $eed445e0843c11d0$export$41f133550aa26f48, a as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../ListBox-_nDFq8-H.js";
|
|
8
|
+
import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../Dialog-CJVCRT8_.js";
|
|
9
9
|
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
10
10
|
import { icons } from "../../icons/icons.js";
|
|
11
11
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
@@ -127,7 +127,7 @@ const LinkInput = (props) => {
|
|
|
127
127
|
{
|
|
128
128
|
placeholder: disabled ? null : placeholder,
|
|
129
129
|
className: clsx(
|
|
130
|
-
"es:min-h-10 es:w-full es:rounded-
|
|
130
|
+
"es:min-h-10 es:w-full es:rounded-10 es:border es:border-secondary-300 es:py-2 es:pl-2 es:pr-1 es:text-sm es:shadow-sm es:transition es:selection:bg-accent-500/20 es:selection:text-accent-950 es:bg-white",
|
|
131
131
|
"es:any-focus:outline-hidden",
|
|
132
132
|
"es:focus-visible:ring-2 es:focus-visible:ring-accent-500/50",
|
|
133
133
|
"es:focus-visible:border-accent-500",
|
|
@@ -181,7 +181,7 @@ const LinkInput = (props) => {
|
|
|
181
181
|
{
|
|
182
182
|
"aria-label": __("URL suggestions", "eightshift-ui-components"),
|
|
183
183
|
className: ({ isEntering, isExiting }) => clsx(
|
|
184
|
-
"es:border es:rounded-
|
|
184
|
+
"es:border es:rounded-xl es:border-secondary-300 es:bg-white es:shadow-lg es:outline-hidden es:min-w-72",
|
|
185
185
|
isEntering || !(suggestionList.isLoading || !shouldShowSuggestions) && "es:not-motion-reduce:motion-preset-slide-down-sm es:motion-reduce:motion-preset-fade es:motion-duration-300",
|
|
186
186
|
isExiting && "es:not-motion-reduce:motion-translate-y-out-[-2.5%] es:motion-opacity-out-0 es:motion-duration-200",
|
|
187
187
|
(suggestionList.isLoading || !shouldShowSuggestions) && "es:invisible"
|
|
@@ -196,8 +196,10 @@ const LinkInput = (props) => {
|
|
|
196
196
|
{
|
|
197
197
|
icon: icons.searchEmpty,
|
|
198
198
|
label: __("No results", "eightshift-ui-components"),
|
|
199
|
-
subtitle: __("Try a different search term
|
|
200
|
-
className: "es:min-h-
|
|
199
|
+
subtitle: __("Try a different search term", "eightshift-ui-components"),
|
|
200
|
+
className: "es:min-h-14 es:p-2 es:w-fit es:mx-auto",
|
|
201
|
+
iconClassName: "es:text-accent-700 es:icon:size-7!",
|
|
202
|
+
noColor: true
|
|
201
203
|
}
|
|
202
204
|
),
|
|
203
205
|
suggestionList.items.length > 0 && !suggestionList.isLoading && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -231,7 +233,7 @@ const LinkInput = (props) => {
|
|
|
231
233
|
{
|
|
232
234
|
id: item.value,
|
|
233
235
|
className: clsx(
|
|
234
|
-
"es:rounded es:p-1 es:text-sm es:transition",
|
|
236
|
+
"es:rounded-10 es:p-1 es:text-sm es:transition",
|
|
235
237
|
"es:hover:border-secondary-300 es:hover:bg-secondary-100",
|
|
236
238
|
"es:focus-visible:border-secondary-300 es:focus-visible:bg-secondary-100",
|
|
237
239
|
"selected:es:bg-accent-600/10 selected:es:text-accent-900 selected:focus-visible:es:bg-accent-600/15"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $72a5793c14baf454$export$8b251419efc915eb, a as $431f98aba6844401$export$1ff3c3f08ae963c0 } from "../../Separator-
|
|
3
|
-
import { a as $3674c52c6b3c5bce$export$27d2ad3c5815583e, b as $3674c52c6b3c5bce$export$d9b273488cd8ce6f, c as $3674c52c6b3c5bce$export$2ce376c2cc3355c8, d as $3674c52c6b3c5bce$export$4b1545b4f2016d26, e as $3674c52c6b3c5bce$export$ecabc99eeffab7ca } from "../../Dialog-
|
|
2
|
+
import { $ as $72a5793c14baf454$export$8b251419efc915eb, a as $431f98aba6844401$export$1ff3c3f08ae963c0 } from "../../Separator-BN3mjL6q.js";
|
|
3
|
+
import { a as $3674c52c6b3c5bce$export$27d2ad3c5815583e, b as $3674c52c6b3c5bce$export$d9b273488cd8ce6f, c as $3674c52c6b3c5bce$export$2ce376c2cc3355c8, d as $3674c52c6b3c5bce$export$4b1545b4f2016d26, e as $3674c52c6b3c5bce$export$ecabc99eeffab7ca } from "../../Dialog-CJVCRT8_.js";
|
|
4
4
|
import { icons } from "../../icons/icons.js";
|
|
5
5
|
import { Button } from "../button/button.js";
|
|
6
6
|
import { Popover } from "../popover/popover.js";
|
|
@@ -173,7 +173,7 @@ const MenuSection = (props) => {
|
|
|
173
173
|
* @preserve
|
|
174
174
|
*/
|
|
175
175
|
const MenuSeparator = () => {
|
|
176
|
-
return /* @__PURE__ */ jsx($431f98aba6844401$export$1ff3c3f08ae963c0, { className: "es:mb-1 es:border-b es:border-secondary-200
|
|
176
|
+
return /* @__PURE__ */ jsx($431f98aba6844401$export$1ff3c3f08ae963c0, { className: "es:mb-1 es:border-b es:border-secondary-200" });
|
|
177
177
|
};
|
|
178
178
|
/**
|
|
179
179
|
* A menu item.
|
|
@@ -215,9 +215,9 @@ const MenuItem = (props) => {
|
|
|
215
215
|
"aria-label": ariaLabel,
|
|
216
216
|
isDisabled: disabled,
|
|
217
217
|
className: clsx(
|
|
218
|
-
"es:mx-1 es:mb-1 es:flex es:min-w-44 es:min-h-
|
|
218
|
+
"es:mx-1 es:mb-1 es:flex es:min-w-44 es:min-h-9 es:items-center es:gap-1.5",
|
|
219
219
|
"es:first:mt-1 es:icon:size-5 es:icon:text-secondary-500",
|
|
220
|
-
"es:select-none es:rounded-
|
|
220
|
+
"es:select-none es:rounded-xl es:py-1.5 es:px-2.5 es:text-sm es:transition",
|
|
221
221
|
"es:any-focus:outline-hidden",
|
|
222
222
|
!disabled && "es:hover:bg-secondary-100 es:focus-visible:inset-ring es:focus-visible:inset-ring-secondary-100/30 es:focus-visible:bg-secondary-100 es:contrast-more:focus-visible:bg-accent-500/15",
|
|
223
223
|
disabled ? "es:text-secondary-400" : "es:text-secondary-800",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
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-CJVCRT8_.js";
|
|
3
3
|
import { $ as $5cb03073d3f54797$export$a8a3e93435678ff9 } from "../../Heading-ba38ScjJ.js";
|
|
4
4
|
import { n as $b5e257d569688ac6$export$535bd6ca7f90a273, d as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-CZt7LCbO.js";
|
|
5
5
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
6
6
|
import React__default, { useState, useEffect, forwardRef, useContext, createContext, useRef, useMemo } from "react";
|
|
7
|
-
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, a as $d3f049242431219c$export$45fda7c47f93fd48, b as $d3f049242431219c$export$6d3443f2c48bfc20 } from "../../OverlayArrow-
|
|
7
|
+
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, a as $d3f049242431219c$export$45fda7c47f93fd48, b as $d3f049242431219c$export$6d3443f2c48bfc20 } from "../../OverlayArrow-CjvnevpX.js";
|
|
8
8
|
import { Button } from "../button/button.js";
|
|
9
9
|
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
10
10
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
@@ -191,6 +191,7 @@ function $f3f84453ead64de5$var$ModalContent(props) {
|
|
|
191
191
|
* @param {Object} props - Component props.
|
|
192
192
|
* @param {boolean} [props.open] - **Controlled mode ** - whether the modal is open.
|
|
193
193
|
* @param {boolean} [props.defaultOpen] - **Uncontrolled mode ** - whether the modal is initially open.
|
|
194
|
+
* @param {JSX.Element|JSX.Element[]} [props.actions] - Actions to display in the modal footer, typically buttons.
|
|
194
195
|
* @param {string|JSX.Element} [props.triggerLabel] - Label for the trigger button.
|
|
195
196
|
* @param {JSX.Element} [props.triggerIcon] - Trigger button icon.
|
|
196
197
|
* @param {Object} [props.triggerProps] - Props to pass to the trigger button.
|
|
@@ -201,7 +202,11 @@ function $f3f84453ead64de5$var$ModalContent(props) {
|
|
|
201
202
|
* @param {boolean} [props.noKeyboardDismiss] - If `true`, the modal will not close when pressing the `Esc` key.
|
|
202
203
|
* @param {string} [props.className] - Classes to pass to the modal container.
|
|
203
204
|
* @param {string} [props.overlayClassName] - Classes to pass to the modal backdrop.
|
|
205
|
+
* @param {string} [props.actionsClassName] - Classes to pass to the modal footer (actions) container.
|
|
206
|
+
* @param {string} [props.headerClassName] - Classes to pass to the modal header container.
|
|
207
|
+
* @param {string} [props.contentContainerClassName] - Classes to pass to the modal content container.
|
|
204
208
|
* @param {Function} [props.shouldCloseOnInteractOutside=() => true] - Allows ignoring close events for certain elements. `(element: HTMLElement) => boolean`.
|
|
209
|
+
* @param {Function} [props.onOpenChange] - Function called when the modal's open state changes. `(isOpen: boolean) => void`
|
|
205
210
|
*
|
|
206
211
|
* @returns {JSX.Element} The Modal component.
|
|
207
212
|
*
|
|
@@ -213,92 +218,111 @@ function $f3f84453ead64de5$var$ModalContent(props) {
|
|
|
213
218
|
* @preserve
|
|
214
219
|
*/
|
|
215
220
|
const Modal2 = (props) => {
|
|
221
|
+
const { triggerLabel, triggerIcon, triggerProps, customTrigger, open } = props;
|
|
222
|
+
if (typeof open !== "undefined") {
|
|
223
|
+
return /* @__PURE__ */ jsx(ModalInternal, { ...props });
|
|
224
|
+
}
|
|
225
|
+
return /* @__PURE__ */ jsxs($de32f1b87079253c$export$2e1e1122cf0cba88, { children: [
|
|
226
|
+
!customTrigger && /* @__PURE__ */ jsx(
|
|
227
|
+
Button,
|
|
228
|
+
{
|
|
229
|
+
icon: triggerIcon,
|
|
230
|
+
...triggerProps,
|
|
231
|
+
children: triggerLabel ?? (!triggerIcon && __("Open", "eightshift-frontend-libs"))
|
|
232
|
+
}
|
|
233
|
+
),
|
|
234
|
+
customTrigger,
|
|
235
|
+
/* @__PURE__ */ jsx(ModalInternal, { ...props })
|
|
236
|
+
] });
|
|
237
|
+
};
|
|
238
|
+
const ModalInternal = (props) => {
|
|
216
239
|
const {
|
|
217
240
|
children,
|
|
218
241
|
shouldCloseOnInteractOutside,
|
|
219
242
|
open,
|
|
220
243
|
defaultOpen,
|
|
221
|
-
|
|
222
|
-
triggerIcon,
|
|
223
|
-
triggerProps,
|
|
224
|
-
customTrigger,
|
|
244
|
+
onOpenChange,
|
|
225
245
|
title,
|
|
246
|
+
actions,
|
|
226
247
|
noCloseButton,
|
|
227
248
|
noClickToDismiss,
|
|
228
249
|
noKeyboardDismiss,
|
|
229
250
|
"aria-label": ariaLabel,
|
|
230
251
|
className,
|
|
231
|
-
|
|
252
|
+
headerClassName,
|
|
253
|
+
actionsClassName,
|
|
254
|
+
overlayClassName,
|
|
255
|
+
contentContainerClassName,
|
|
256
|
+
...rest
|
|
232
257
|
} = props;
|
|
233
|
-
return /* @__PURE__ */
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
] });
|
|
258
|
+
return /* @__PURE__ */ jsx(
|
|
259
|
+
$f3f84453ead64de5$export$8948f78d83984c69,
|
|
260
|
+
{
|
|
261
|
+
isDismissable: !noClickToDismiss,
|
|
262
|
+
defaultOpen,
|
|
263
|
+
isOpen: open,
|
|
264
|
+
shouldCloseOnInteractOutside,
|
|
265
|
+
onOpenChange,
|
|
266
|
+
isKeyboardDismissDisabled: noKeyboardDismiss,
|
|
267
|
+
className: ({ isEntering, isExiting }) => clsx(
|
|
268
|
+
"es:fixed es:inset-0 es:z-9999 es:flex es:min-h-full es:items-center es:justify-center es:overflow-y-auto es:p-4 es:text-center es:bg-black/30 es:backdrop-blur-sm",
|
|
269
|
+
isEntering && "es:motion-opacity-in es:motion-duration-150",
|
|
270
|
+
isExiting && "es:motion-opacity-out es:motion-duration-150",
|
|
271
|
+
overlayClassName
|
|
272
|
+
),
|
|
273
|
+
...rest,
|
|
274
|
+
children: /* @__PURE__ */ jsx(
|
|
275
|
+
$f3f84453ead64de5$export$2b77a92f1a5ad772,
|
|
276
|
+
{
|
|
277
|
+
className: ({ isEntering, isExiting }) => clsx(
|
|
278
|
+
"es:w-full es:max-w-lg es:overflow-hidden es:rounded-3xl es:border es:border-secondary-100 es:bg-white es:text-left es:align-middle es:shadow-xl es:inset-ring es:inset-ring-secondary-50",
|
|
279
|
+
isEntering && "es:motion-safe:motion-scale-in-95 es:motion-fade-in es:motion-duration-300 es:motion-ease-spring-smooth/scale",
|
|
280
|
+
isExiting && "es:motion-safe:motion-scale-out-95 es:motion-fade-out es:motion-duration-250 es:motion-ease-spring-smooth/scale",
|
|
281
|
+
className
|
|
282
|
+
),
|
|
283
|
+
children: /* @__PURE__ */ jsx(
|
|
284
|
+
$de32f1b87079253c$export$3ddf2d174ce01153,
|
|
285
|
+
{
|
|
286
|
+
className: "es:relative es:text-sm es:outline-hidden",
|
|
287
|
+
"aria-label": ariaLabel,
|
|
288
|
+
children: ({ close }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
289
|
+
/* @__PURE__ */ jsxs(
|
|
290
|
+
HStack,
|
|
291
|
+
{
|
|
292
|
+
className: clsx(!title && "es:relative", title && "es:px-5 es:py-3 es:justify-between es:bg-secondary-50 es:border-b es:border-secondary-200", headerClassName),
|
|
293
|
+
children: [
|
|
294
|
+
title && /* @__PURE__ */ jsx(
|
|
295
|
+
$5cb03073d3f54797$export$a8a3e93435678ff9,
|
|
296
|
+
{
|
|
297
|
+
className: "es:text-balance es:text-base! es:my-0! es:font-medium!",
|
|
298
|
+
slot: "title",
|
|
299
|
+
children: title
|
|
300
|
+
}
|
|
301
|
+
),
|
|
302
|
+
!noCloseButton && /* @__PURE__ */ jsx(
|
|
303
|
+
Button,
|
|
304
|
+
{
|
|
305
|
+
className: !title && "es:absolute es:top-4 es:right-4 es:bg-white/60 es:backdrop-blur-lg",
|
|
306
|
+
onPress: close,
|
|
307
|
+
type: "ghost",
|
|
308
|
+
size: "small",
|
|
309
|
+
icon: icons.clear,
|
|
310
|
+
"aria-label": __("Close", "eightshift-frontend-libs"),
|
|
311
|
+
tooltip: true
|
|
312
|
+
}
|
|
313
|
+
)
|
|
314
|
+
]
|
|
315
|
+
}
|
|
316
|
+
),
|
|
317
|
+
children && /* @__PURE__ */ jsx("div", { className: clsx("es:p-5 es:space-y-2.5", contentContainerClassName), children }),
|
|
318
|
+
actions && /* @__PURE__ */ jsx(HStack, { className: clsx("es:justify-end es:px-5 es:py-3 es:border-t es:border-secondary-100", actionsClassName), children: actions })
|
|
319
|
+
] })
|
|
320
|
+
}
|
|
321
|
+
)
|
|
322
|
+
}
|
|
323
|
+
)
|
|
324
|
+
}
|
|
325
|
+
);
|
|
302
326
|
};
|
|
303
327
|
export {
|
|
304
328
|
Modal2 as Modal
|
|
@@ -31,30 +31,30 @@ const Notice = (props) => {
|
|
|
31
31
|
const styles = {
|
|
32
32
|
info: {
|
|
33
33
|
icon: icons.infoCircle,
|
|
34
|
-
className: "es:border-blue-400 es:shadow-blue-500/15 es:bg-blue-
|
|
34
|
+
className: "es:border-blue-400/75 es:shadow-blue-500/15 es:bg-blue-200/5",
|
|
35
35
|
iconColor: "es:text-blue-400",
|
|
36
|
-
textColor: "es:text-blue-
|
|
36
|
+
textColor: "es:text-blue-500 es:saturate-75",
|
|
37
37
|
subtitleColor: "es:text-blue-950/60"
|
|
38
38
|
},
|
|
39
39
|
success: {
|
|
40
40
|
icon: icons.checkSquare,
|
|
41
|
-
className: "es:border-
|
|
42
|
-
iconColor: "es:text-
|
|
43
|
-
textColor: "es:text-
|
|
44
|
-
subtitleColor: "es:text-
|
|
41
|
+
className: "es:border-emerald-500/75 es:shadow-emerald-500/15 es:bg-emerald-200/5",
|
|
42
|
+
iconColor: "es:text-emerald-500",
|
|
43
|
+
textColor: "es:text-emerald-600",
|
|
44
|
+
subtitleColor: "es:text-emerald-950/60"
|
|
45
45
|
},
|
|
46
46
|
warning: {
|
|
47
47
|
icon: icons.warning,
|
|
48
|
-
className: "es:border-
|
|
49
|
-
iconColor: "es:text-
|
|
50
|
-
textColor: "es:text-
|
|
51
|
-
subtitleColor: "es:text-
|
|
48
|
+
className: "es:border-orange-500/75 es:shadow-orange-500/15 es:bg-orange-200/5",
|
|
49
|
+
iconColor: "es:text-orange-500",
|
|
50
|
+
textColor: "es:text-orange-700",
|
|
51
|
+
subtitleColor: "es:text-orange-950/60"
|
|
52
52
|
},
|
|
53
53
|
error: {
|
|
54
54
|
icon: icons.errorCircle,
|
|
55
|
-
className: "es:border-red-
|
|
56
|
-
iconColor: "es:text-red-
|
|
57
|
-
textColor: "es:text-red-
|
|
55
|
+
className: "es:border-red-300 es:shadow-red-500/15 es:bg-red-200/5",
|
|
56
|
+
iconColor: "es:text-red-500",
|
|
57
|
+
textColor: "es:text-red-700",
|
|
58
58
|
subtitleColor: "es:text-red-950/60"
|
|
59
59
|
},
|
|
60
60
|
placeholder: {
|
|
@@ -75,9 +75,9 @@ const Notice = (props) => {
|
|
|
75
75
|
"div",
|
|
76
76
|
{
|
|
77
77
|
className: clsx(
|
|
78
|
-
"es:grid es:grid-cols-[auto_1fr] es:grid-rows-[auto_auto] es:rounded-
|
|
78
|
+
"es:grid es:grid-cols-[auto_1fr] es:grid-rows-[auto_auto] es:rounded-xl es:border es:bg-linear-to-tr es:shadow-sm",
|
|
79
79
|
styles[type].className,
|
|
80
|
-
icon || styles[type].icon ? "es:gap-x-1.5 es:p-
|
|
80
|
+
icon || styles[type].icon ? "es:gap-x-1.5 es:p-2" : "es:px-2 es:py-2",
|
|
81
81
|
className
|
|
82
82
|
),
|
|
83
83
|
children: [
|
|
@@ -85,7 +85,7 @@ const Notice = (props) => {
|
|
|
85
85
|
"span",
|
|
86
86
|
{
|
|
87
87
|
className: clsx(
|
|
88
|
-
"es:col-span-1 es:col-start-1 es:row-span-2 es:row-start-1 es:shrink-0 es:icon:size-
|
|
88
|
+
"es:col-span-1 es:col-start-1 es:row-span-2 es:row-start-1 es:shrink-0 es:icon:size-6",
|
|
89
89
|
alignIconToTitle ? "es:self-baseline" : "es:self-center",
|
|
90
90
|
styles[type].iconColor
|
|
91
91
|
),
|
|
@@ -4,14 +4,14 @@ import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
|
4
4
|
import { a as $a049562f99e7db0e$export$f9c6924e160136d1, $ as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 } from "../../Group-DDPhPPTQ.js";
|
|
5
5
|
import { a as $3985021b0ad6602f$export$37fb8590cf2c088c, $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../Input-BmDS8Juy.js";
|
|
6
6
|
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-JS_ob-kh.js";
|
|
7
|
-
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-
|
|
7
|
+
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1 } from "../../Button-DH22t_SM.js";
|
|
8
8
|
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, g as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, h as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a } from "../../utils-CZt7LCbO.js";
|
|
9
9
|
import { $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../FieldError-DHrSdE_Q.js";
|
|
10
10
|
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../Form-Cq3fu75_.js";
|
|
11
11
|
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-BuJgePCv.js";
|
|
12
12
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
13
13
|
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-BbYZoHvX.js";
|
|
14
|
-
import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-
|
|
14
|
+
import { $ as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, a as $81397a9303501bda$export$23f548e970bdf099 } from "../../useNumberField-D0u2bh8g.js";
|
|
15
15
|
import { Button } from "../button/button.js";
|
|
16
16
|
import { icons } from "../../icons/icons.js";
|
|
17
17
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
@@ -218,7 +218,7 @@ const NumberPicker = ({
|
|
|
218
218
|
$a049562f99e7db0e$export$eb2fcfdbd7ba97d4,
|
|
219
219
|
{
|
|
220
220
|
className: clsx(
|
|
221
|
-
"es:group es:flex es:w-fit es:items-center es:rounded-
|
|
221
|
+
"es:group es:flex es:w-fit es:items-center es:rounded-10 es:border es:border-secondary-300 es:pl-1 es:pr-0.5 es:shadow-sm es:focus-within:shadow-md es:transition",
|
|
222
222
|
"es:inset-ring es:inset-ring-secondary-100",
|
|
223
223
|
isInputFocused && "es:outline-hidden es:focus-visible:border-accent-500 es:focus-visible:ring-2 es:focus-visible:ring-accent-500/50",
|
|
224
224
|
!prefix && (((_a = sizes == null ? void 0 : sizes[size]) == null ? void 0 : _a.noPrefixPadding) ?? sizes.default.noPrefixPadding),
|
|
@@ -27,13 +27,20 @@ const FilePlaceholder = (props) => {
|
|
|
27
27
|
return /* @__PURE__ */ jsx(
|
|
28
28
|
RichLabel,
|
|
29
29
|
{
|
|
30
|
-
icon:
|
|
30
|
+
icon: /* @__PURE__ */ jsx(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
className: clsx(
|
|
34
|
+
"es:w-fit es:rounded-xl es:border es:border-secondary-300 es:p-2",
|
|
35
|
+
fileName && "es:shadow-sm es:bg-gradient-to-br es:from-secondary-50 es:to-secondary-100 es:text-secondary-600",
|
|
36
|
+
!fileName && "es:border-dashed es:text-secondary-500"
|
|
37
|
+
),
|
|
38
|
+
children: icon ?? icons.file
|
|
39
|
+
}
|
|
40
|
+
),
|
|
31
41
|
label: (fileName ? fileName : children) ?? __("No file selected", "eightshift-ui-components"),
|
|
32
|
-
className: clsx(
|
|
33
|
-
|
|
34
|
-
fileName && "es:font-mono",
|
|
35
|
-
className
|
|
36
|
-
)
|
|
42
|
+
className: clsx(fileName && "es:font-mono", className),
|
|
43
|
+
noColor: true
|
|
37
44
|
}
|
|
38
45
|
);
|
|
39
46
|
};
|
|
@@ -32,8 +32,8 @@ const ImagePlaceholder = (props) => {
|
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
34
|
const styleClassName = {
|
|
35
|
-
default: "es:rounded-
|
|
36
|
-
simple: "es:rounded-
|
|
35
|
+
default: "es:rounded-2xl es:border es:border-secondary-300 es:bg-gradient-to-br es:from-white es:to-secondary-50 es:text-secondary-300 es:shadow-sm",
|
|
36
|
+
simple: "es:rounded-2xl es:border es:border-secondary-300 es:border-dashed es:text-secondary-300"
|
|
37
37
|
};
|
|
38
38
|
const sizeClassName = {
|
|
39
39
|
auto: "",
|
|
@@ -29,8 +29,8 @@ const MediaPlaceholder = (props) => {
|
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
31
|
const styleClassName = {
|
|
32
|
-
default: "es:rounded-
|
|
33
|
-
simple: "es:rounded-
|
|
32
|
+
default: "es:rounded-2xl es:border es:border-secondary-300 es:bg-secondary-50 es:text-secondary-400 es:shadow-sm",
|
|
33
|
+
simple: "es:rounded-2xl es:border es:border-secondary-300 es:border-dashed es:text-secondary-400"
|
|
34
34
|
};
|
|
35
35
|
const sizeClassName = {
|
|
36
36
|
auto: "",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d, f as $de32f1b87079253c$export$3ddf2d174ce01153, g as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../../Dialog-
|
|
2
|
+
import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d, f as $de32f1b87079253c$export$3ddf2d174ce01153, g as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../../Dialog-CJVCRT8_.js";
|
|
3
3
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
4
4
|
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
5
5
|
import { Button } from "../button/button.js";
|
|
@@ -102,7 +102,7 @@ const Popover = (props) => {
|
|
|
102
102
|
crossOffset,
|
|
103
103
|
containerPadding,
|
|
104
104
|
className: ({ isEntering, isExiting }) => clsx(
|
|
105
|
-
"es:rounded-
|
|
105
|
+
"es:rounded-2xl es:border es:border-secondary-300 es:bg-white es:inset-ring es:inset-ring-secondary-100 es:shadow-xl es:outline-hidden",
|
|
106
106
|
"es:motion-safe:motion-ease-spring-smooth",
|
|
107
107
|
isEntering && "es:motion-safe:motion-preset-slide-down-sm es:motion-safe:motion-duration-300 es:motion-reduce:motion-preset-fade-md",
|
|
108
108
|
isExiting && "es:not-motion-reduce:motion-translate-y-out-[-2.5%] es:motion-opacity-out-0 es:motion-duration-200",
|
|
@@ -7,7 +7,7 @@ import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../Text-BuJge
|
|
|
7
7
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
8
8
|
import React__default, { useMemo, useState, forwardRef, createContext, cloneElement } from "react";
|
|
9
9
|
import { $ as $99facab73266f662$export$5add1d006293d136 } from "../../useFormReset-D2YaWRIA.js";
|
|
10
|
-
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "../../usePress-
|
|
10
|
+
import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "../../usePress-DWBuejBp.js";
|
|
11
11
|
import { a as $f645667febf57a63$export$4c014de7c8940b4c, b as $458b0a5536c1a7cf$export$40bfa8c7b0832715, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-C2SkI1Fn.js";
|
|
12
12
|
import { a as $e93e671b31057976$export$b8473d3665f3a75a, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "../../useFormValidation-Dy0PXJg5.js";
|
|
13
13
|
import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "../../FocusScope-BEPI2m7u.js";
|
|
@@ -382,14 +382,14 @@ const RadioButton = (props) => {
|
|
|
382
382
|
"es:cursor-pointer es:py-1 es:px-1.5 es:border es:border-secondary-300 es:hover:bg-secondary-100/75 es:transition es:min-h-10",
|
|
383
383
|
"es:first:rounded-t-xl es:last:rounded-b-xl",
|
|
384
384
|
"es:focus-visible:ring-2 es:focus-visible:border-accent-500 es:focus-visible:ring-accent-500/50 es:focus-visible:z-10",
|
|
385
|
-
"es:shadow-
|
|
385
|
+
"es:shadow-sm es:inset-ring es:inset-shadow-xs",
|
|
386
386
|
"es:inset-ring-secondary-100 es:inset-shadow-secondary-100/50"
|
|
387
387
|
),
|
|
388
388
|
segmentedHorizontal: clsx(
|
|
389
389
|
"es:cursor-pointer es:py-1 es:px-1.5 es:border es:border-secondary-300 es:hover:bg-secondary-100/75 es:transition es:grow es:min-h-10",
|
|
390
390
|
"es:first:rounded-l-xl es:last:rounded-r-xl",
|
|
391
391
|
"es:focus-visible:ring-2 es:focus-visible:border-accent-500 es:focus-visible:ring-accent-500/50 es:focus-visible:z-10",
|
|
392
|
-
"es:shadow-
|
|
392
|
+
"es:shadow-sm es:inset-ring es:inset-shadow-xs",
|
|
393
393
|
"es:inset-ring-secondary-100 es:inset-shadow-secondary-100/50"
|
|
394
394
|
)
|
|
395
395
|
};
|
|
@@ -420,7 +420,7 @@ const RadioButton = (props) => {
|
|
|
420
420
|
"es:size-5 es:flex es:items-center es:justify-center",
|
|
421
421
|
"es:transition es:cursor-pointer",
|
|
422
422
|
"es:bg-radial es:border es:rounded-full",
|
|
423
|
-
"es:shadow-
|
|
423
|
+
"es:shadow-sm es:inset-ring es:inset-shadow-xs",
|
|
424
424
|
"es:any-focus:outline-hidden",
|
|
425
425
|
!isSelected && "es:border-secondary-300 es:inset-ring-secondary-100 es:inset-shadow-secondary-100/50",
|
|
426
426
|
!isSelected && "es:from-secondary-50 es:to-white es:text-secondary-600 es:hover:text-accent-950",
|
|
@@ -30,7 +30,7 @@ import { RepeaterContext } from "./repeater-context.js";
|
|
|
30
30
|
*/
|
|
31
31
|
const RepeaterItem = (props) => {
|
|
32
32
|
const { children, icon, label, subtitle, "aria-label": ariaLabel, className, actions, textValue, expandDisabled, menuOptions, noMenuButton, ...rest } = props;
|
|
33
|
-
const { deleteItem, duplicateItem, isDragged, isOutOfBounds, isSelected, canDelete, canAdd, allOpen, setAllOpen } = useContext(RepeaterContext);
|
|
33
|
+
const { deleteItem, duplicateItem, isDragged, isOutOfBounds, isSelected, canDelete, canAdd, allOpen, setAllOpen, setOpenItems, id, isItemOpen } = useContext(RepeaterContext);
|
|
34
34
|
return /* @__PURE__ */ jsx(
|
|
35
35
|
Expandable,
|
|
36
36
|
{
|
|
@@ -39,20 +39,21 @@ const RepeaterItem = (props) => {
|
|
|
39
39
|
subtitle: isOutOfBounds ? null : subtitle,
|
|
40
40
|
className: clsx(
|
|
41
41
|
"es:transition",
|
|
42
|
-
isDragged && "es:border es:border-secondary-100 es:bg-white/50 es:shadow-md es:backdrop-blur-lg",
|
|
43
|
-
isOutOfBounds && "es:border es:border-red-200! es:bg-red-50 es:shadow-red-500/20 es:[&_button]:invisible es:[&_svg_path]:stroke-red-500"
|
|
42
|
+
!isItemOpen && isDragged && "es:border es:border-secondary-100 es:bg-white/50 es:shadow-md es:backdrop-blur-lg",
|
|
43
|
+
!isItemOpen && isOutOfBounds && "es:border es:border-red-200! es:bg-red-50 es:shadow-red-500/20 es:[&_button]:invisible es:[&_svg_path]:stroke-red-500"
|
|
44
44
|
),
|
|
45
|
-
labelClassName: clsx(className, isDragged
|
|
45
|
+
labelClassName: clsx(className, isDragged && "es:cursor-grabbing", !isDragged && !isItemOpen && "es:cursor-grab"),
|
|
46
46
|
headerClassName: clsx(
|
|
47
47
|
"es:transition es:rounded-lg es:border es:border-transparent",
|
|
48
48
|
isSelected && "es:bg-accent-50 es:border-accent-100",
|
|
49
|
-
"es:group-focus:outline-hidden es:group-focus:border-accent-500 es:group-focus:ring-2 es:group-focus:ring-accent-500/50"
|
|
49
|
+
!isItemOpen && "es:group-focus:outline-hidden es:group-focus:border-accent-500 es:group-focus:ring-2 es:group-focus:ring-accent-500/50"
|
|
50
50
|
),
|
|
51
51
|
open: allOpen,
|
|
52
52
|
onOpenChange: (open) => {
|
|
53
53
|
if (allOpen && !open) {
|
|
54
54
|
setAllOpen(false);
|
|
55
55
|
}
|
|
56
|
+
setOpenItems((prev) => ({ ...prev, [id]: open }));
|
|
56
57
|
},
|
|
57
58
|
customOpenButton: ({ open, toggleOpen, tooltip, disabled }) => {
|
|
58
59
|
return /* @__PURE__ */ jsxs("div", { className: "es:flex es:items-center es:gap-px", children: [
|
|
@@ -38,6 +38,7 @@ const fixIds = (items, itemIdBase) => {
|
|
|
38
38
|
* @param {JSX.Element} [props.addButton] - If provided, overrides the default add button. `(props: { addItem: (additional: Object<string, any>?) => void, disabled: Boolean }) => JSX.Element`.
|
|
39
39
|
* @param {string} [props.className] - Classes to pass to the item wrapper.
|
|
40
40
|
* @param {boolean} [props.noExpandAllButton] - If `true`, the "Expand all"/"Collapse all" button is not displayed.
|
|
41
|
+
* @param {boolean} [props.noDragToRemove] - If `true`, the "drag to remove" functionality will be disabled.
|
|
41
42
|
* @param {JSX.Element|JSX.Element[]} [props.moreOptions] - Options to add in the "More options" menu.
|
|
42
43
|
* @param {JSX.Element} [props.emptyState] - Allows overriding the default empty state.
|
|
43
44
|
*
|
|
@@ -92,10 +93,12 @@ const Repeater = (props) => {
|
|
|
92
93
|
className,
|
|
93
94
|
emptyState,
|
|
94
95
|
noExpandAllButton,
|
|
96
|
+
noDragToRemove,
|
|
95
97
|
moreOptions,
|
|
96
98
|
hidden
|
|
97
99
|
} = props;
|
|
98
100
|
const [allOpen, setAllOpen] = useState(false);
|
|
101
|
+
const [openItems, setOpenItems] = useState({});
|
|
99
102
|
if (typeof rawItems === "undefined" || rawItems === null || !Array.isArray(rawItems)) {
|
|
100
103
|
console.warn(__("Repeater: 'items' are not an array or are undefined!", "eightshift-ui-components"));
|
|
101
104
|
}
|
|
@@ -168,7 +171,7 @@ const Repeater = (props) => {
|
|
|
168
171
|
/* @__PURE__ */ jsx(
|
|
169
172
|
List,
|
|
170
173
|
{
|
|
171
|
-
values: items,
|
|
174
|
+
values: items.map((item) => ({ ...item, disabled: openItems[item.id] })),
|
|
172
175
|
onChange: ({ oldIndex, newIndex }) => onChange(newIndex === -1 ? arrayRemove(items, oldIndex) : arrayMove(items, oldIndex, newIndex)),
|
|
173
176
|
renderList: ({ children: children2, props: props2 }) => {
|
|
174
177
|
const { key, ...rest } = props2;
|
|
@@ -214,7 +217,9 @@ const Repeater = (props) => {
|
|
|
214
217
|
canDelete,
|
|
215
218
|
canAdd,
|
|
216
219
|
allOpen,
|
|
217
|
-
setAllOpen
|
|
220
|
+
setAllOpen,
|
|
221
|
+
setOpenItems,
|
|
222
|
+
isItemOpen: openItems[item.id] ?? allOpen
|
|
218
223
|
},
|
|
219
224
|
children: children({
|
|
220
225
|
...item,
|
|
@@ -236,7 +241,7 @@ const Repeater = (props) => {
|
|
|
236
241
|
(item == null ? void 0 : item.id) ?? key
|
|
237
242
|
);
|
|
238
243
|
},
|
|
239
|
-
removableByMove:
|
|
244
|
+
removableByMove: !noDragToRemove
|
|
240
245
|
}
|
|
241
246
|
),
|
|
242
247
|
/* @__PURE__ */ jsxs(AnimatedVisibility, { visible: items.length < 1, children: [
|
|
@@ -143,6 +143,7 @@ const AsyncMultiSelect = (props) => {
|
|
|
143
143
|
DropdownIndicator: customDropdownArrow ?? CustomSelectDefaultDropdownIndicator,
|
|
144
144
|
ClearIndicator: customClearIndicator ?? CustomSelectDefaultClearIndicator
|
|
145
145
|
},
|
|
146
|
+
menuPlacement: "auto",
|
|
146
147
|
menuPortalTarget: document.body,
|
|
147
148
|
...additionalProps
|
|
148
149
|
}
|
|
@@ -125,6 +125,7 @@ const AsyncSelect = (props) => {
|
|
|
125
125
|
DropdownIndicator: customDropdownArrow ?? CustomSelectDefaultDropdownIndicator,
|
|
126
126
|
ClearIndicator: customClearIndicator ?? CustomSelectDefaultClearIndicator
|
|
127
127
|
},
|
|
128
|
+
menuPlacement: "auto",
|
|
128
129
|
menuPortalTarget: document.body,
|
|
129
130
|
...additionalProps
|
|
130
131
|
}
|
|
@@ -137,6 +137,7 @@ const MultiSelect = (props) => {
|
|
|
137
137
|
DropdownIndicator: customDropdownArrow ?? CustomSelectDefaultDropdownIndicator,
|
|
138
138
|
ClearIndicator: customClearIndicator ?? CustomSelectDefaultClearIndicator
|
|
139
139
|
},
|
|
140
|
+
menuPlacement: "auto",
|
|
140
141
|
menuPortalTarget: document.body,
|
|
141
142
|
...additionalProps
|
|
142
143
|
}
|