@eightshift/ui-components 2.0.2 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Button-OQ5EIPvt.js → Button-BPLceDeW.js} +5 -5
- package/dist/{Collection-CJM_asJz.js → Collection-CZxddMZS.js} +241 -135
- package/dist/{Color-B0HgM8f4.js → Color-MV5kBVXr.js} +1 -1
- package/dist/{ColorSwatch-Dv3Wxdl_.js → ColorSwatch-BqQfVu4L.js} +5 -5
- package/dist/{ComboBox-BnlZjJ3T.js → ComboBox-_RfyhwZw.js} +42 -21
- package/dist/{Dialog-CIh-hX93.js → Dialog-8tYeQ9n4.js} +202 -91
- package/dist/{FieldError-D7A6s7O5.js → FieldError-52GVSGgC.js} +2 -2
- package/dist/{FocusScope-Cs5_OoeA.js → FocusScope-Cri5BFRz.js} +206 -43
- package/dist/{Group-D6tr3U_n.js → Group-_emcIVxI.js} +3 -3
- package/dist/{Heading-DiYTXoIW.js → Heading-B2153VXe.js} +1 -1
- package/dist/{Hidden-DnOd_jPX.js → Hidden-rE6uR-lr.js} +2 -6
- package/dist/{Input-Se0m3ubj.js → Input-BxpFEIXV.js} +10 -10
- package/dist/{Label-Ca9uelsn.js → Label-icmbmNdI.js} +2 -2
- package/dist/{List-Br274SP1.js → List-CZMUbkFU.js} +3 -1
- package/dist/{ListBox-D9dFEh5A.js → ListBox-Ca6hiCqz.js} +29 -28
- package/dist/{OverlayArrow-1jx-ZyCR.js → OverlayArrow-CYXQSlEU.js} +7 -7
- package/dist/{Select-aab027f3.esm-HFNIFFya.js → Select-aab027f3.esm-PDJCDE95.js} +2 -2
- package/dist/{Separator-BhZycTUp.js → Separator-4IIDRlV_.js} +4 -4
- package/dist/{Slider-BZNaJylD.js → Slider-rz2XRMGm.js} +15 -16
- package/dist/{Text-aOUPPvTO.js → Text-DVSAPY-K.js} +1 -1
- package/dist/{VisuallyHidden-ClTQo25k.js → VisuallyHidden-f9zX67a_.js} +2 -2
- package/dist/assets/style-admin.css +1289 -1338
- package/dist/assets/style-editor.css +433 -482
- package/dist/assets/style.css +433 -482
- package/dist/assets/wp-font-enhancements.css +3 -3
- package/dist/assets/wp-ui-enhancements.css +45 -45
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/button/button.js +6 -6
- package/dist/components/checkbox/checkbox.js +13 -10
- package/dist/components/color-pickers/color-picker.js +1 -1
- package/dist/components/color-pickers/color-swatch.js +3 -3
- package/dist/components/color-pickers/gradient-editor.js +4 -4
- package/dist/components/color-pickers/solid-color-picker.js +22 -24
- package/dist/components/component-toggle/component-toggle.js +1 -1
- package/dist/components/container-panel/container-panel.js +9 -3
- package/dist/components/draggable/draggable-handle.js +2 -2
- package/dist/components/draggable/draggable.js +1167 -871
- package/dist/components/draggable-list/draggable-list-item.js +2 -2
- package/dist/components/draggable-list/draggable-list.js +2 -2
- package/dist/components/expandable/expandable.js +9 -9
- package/dist/components/input-field/input-field.js +10 -9
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +9 -10
- package/dist/components/matrix-align/matrix-align.js +2 -2
- package/dist/components/menu/menu.js +3 -3
- package/dist/components/modal/modal.js +7 -7
- package/dist/components/number-picker/number-picker.js +15 -13
- package/dist/components/option-select/option-select.js +1 -1
- package/dist/components/options-panel/options-panel.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/placeholders/image-placeholder.js +1 -1
- package/dist/components/popover/popover.js +2 -2
- package/dist/components/radio/radio.js +20 -17
- package/dist/components/repeater/repeater-item.js +10 -3
- package/dist/components/repeater/repeater.js +34 -5
- package/dist/components/responsive/mini-responsive.js +8 -5
- package/dist/components/responsive/responsive-legacy.js +2 -2
- package/dist/components/responsive/responsive.js +10 -7
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/rich-label/rich-label.js +4 -3
- package/dist/components/select/async-multi-select.js +4 -4
- package/dist/components/select/async-single-select.js +3 -3
- package/dist/components/select/custom-select-default-components.js +1 -1
- package/dist/components/select/multi-select-components.js +3 -3
- package/dist/components/select/multi-select.js +4 -4
- package/dist/components/select/react-select-component-wrappers.js +1 -1
- package/dist/components/select/single-select.js +3 -3
- package/dist/components/select/v2/async-select.js +10 -10
- package/dist/components/select/v2/shared.js +2 -2
- package/dist/components/select/v2/single-select.js +24 -23
- package/dist/components/slider/column-config-slider.js +3 -3
- package/dist/components/slider/slider.js +3 -3
- package/dist/components/slider/utils.js +1 -1
- package/dist/components/tabs/tabs.js +46 -26
- package/dist/components/toggle/switch.js +7 -7
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +6 -6
- package/dist/components/tooltip/tooltip.js +18 -24
- package/dist/{context-CDOs-GuR.js → context-D2KUdwNL.js} +1 -1
- package/dist/{default-i18n-CM1-Xvzf.js → default-i18n-CT_oS1Fy.js} +22 -3
- package/dist/icons/icons.js +229 -1629
- package/dist/icons/index.js +2 -3
- package/dist/icons/jsx-svg.js +1 -1
- package/dist/{index-641ee5b8.esm-DbdaYaxR.js → index-641ee5b8.esm-DIuJijyT.js} +31 -31
- package/dist/{index-CcCn9HWX.js → index-BKGQ6jGS.js} +1 -1
- package/dist/{index-BRp93Yfa.js → index-CFozsmNS.js} +4 -1
- package/dist/{multi-select-components-DJfz929p.js → multi-select-components-Sp-JEFEX.js} +4 -4
- package/dist/{react-jsx-parser.min-CVit0rZn.js → react-jsx-parser.min-DZCiis5V.js} +48 -20
- package/dist/{react-select-async.esm-DcVLw9X5.js → react-select-async.esm-Bql4G5iV.js} +3 -3
- package/dist/{react-select.esm-OZ0cmTjg.js → react-select.esm-B_TudhTU.js} +3 -3
- package/dist/{textSelection-BlTDSskG.js → textSelection-0UUS8Yfg.js} +8 -47
- package/dist/{useButton-CmLbE5vg.js → useButton-Cg474OYB.js} +5 -5
- package/dist/{useEvent-cLDJlznQ.js → useEvent-B0b-6KBr.js} +1 -1
- package/dist/useFocusRing-CV5l3lf6.js +107 -0
- package/dist/{useFormReset-NpLM2e3G.js → useFormReset-C5OggHsw.js} +1 -1
- package/dist/{useFormValidation-BWwmZQE2.js → useFormValidation-DhDNSjws.js} +3 -3
- package/dist/{focusSafely-CiqTTjWy.js → useHover-DwDr6ozG.js} +305 -98
- package/dist/{useLabel-C85N3Hzw.js → useLabel-D7HkNEHT.js} +2 -2
- package/dist/{useLabels-C_2wWraB.js → useLabels-D8cxd1Z8.js} +1 -1
- package/dist/{useListState-Z7FB_NzO.js → useListState-DVr6aYd_.js} +28 -13
- package/dist/{useLocalizedStringFormatter-BQ4TF72x.js → useLocalizedStringFormatter-CFP1YZWQ.js} +1 -1
- package/dist/{useNumberField-Bm6_BVl9.js → useNumberField-TwM0Z9D1.js} +10 -10
- package/dist/{useNumberFormatter-DlUVKkO7.js → useNumberFormatter-321rAb4J.js} +1 -1
- package/dist/{usePress-rg_OQIGW.js → usePress-Cucx-xSA.js} +69 -63
- package/dist/{useSingleSelectListState-Cu3xtEJS.js → useSingleSelectListState-CMGsRHHh.js} +2 -2
- package/dist/{useToggle-DzlgBLAJ.js → useToggle-C0I3vs0g.js} +9 -7
- package/dist/{useToggleState-DhSBQxkp.js → useToggleState-CmQX3SoX.js} +1 -1
- package/dist/{utils-39D0mStj.js → utils-DkCSC521.js} +38 -35
- package/package.json +32 -32
- package/dist/useFocusRing-CGp3guTX.js +0 -41
- package/dist/useFocusable-087cO5Ct.js +0 -81
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs,
|
|
1
|
+
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { DecorativeTooltip } from "../tooltip/tooltip.js";
|
|
4
4
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
5
|
-
import { _ as __, s as sprintf } from "../../default-i18n-
|
|
5
|
+
import { _ as __, s as sprintf } from "../../default-i18n-CT_oS1Fy.js";
|
|
6
6
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
7
7
|
import { upperFirst } from "../../utilities/es-dash.js";
|
|
8
8
|
import { icons } from "../../icons/icons.js";
|
|
9
9
|
import { Menu, MenuItem, MenuSeparator, SubMenuItem } from "../menu/menu.js";
|
|
10
10
|
import { ResponsivePreview } from "../responsive-preview/responsive-preview.js";
|
|
11
|
-
import {
|
|
11
|
+
import { Button, ButtonGroup } from "../button/button.js";
|
|
12
12
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
13
13
|
import { AnimatedVisibility } from "../animated-visibility/animated-visibility.js";
|
|
14
14
|
import { ToggleButton } from "../toggle-button/toggle-button.js";
|
|
@@ -41,6 +41,7 @@ import { BaseControl } from "../base-control/base-control.js";
|
|
|
41
41
|
* @param {boolean} [props.noModeSelect] - If `true`, the mode selection (desktop-first/mobile-first) is hidden.
|
|
42
42
|
* @param {boolean} [props.inline] - If `true`, the default breakpoint is shown inline with the label. In the expanded state, all breakpoints are shown below the label.
|
|
43
43
|
* @param {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
44
|
+
* @param {boolean} [props.useLegacyDesktopFirst] - If `true`, the legacy desktop-first mode is used. This is only for backwards compatibility.
|
|
44
45
|
* @param {'start' | 'center' | 'end' | 'stretch'} [props.innerContentAlign='start'] - Determines inner content alignment
|
|
45
46
|
*
|
|
46
47
|
* @returns {JSX.Element} The Responsive component.
|
|
@@ -88,16 +89,18 @@ const Responsive = (props) => {
|
|
|
88
89
|
inline,
|
|
89
90
|
children,
|
|
90
91
|
hidden,
|
|
91
|
-
innerContentAlign = "start"
|
|
92
|
+
innerContentAlign = "start",
|
|
93
|
+
useLegacyDesktopFirst
|
|
92
94
|
} = props;
|
|
93
95
|
if (typeof rawBreakpoints === "undefined" || !Array.isArray(rawBreakpoints)) {
|
|
94
96
|
console.warn(__("Responsive: Missing or invalid 'breakpoints' prop.", "eightshift-ui-components"));
|
|
95
97
|
return null;
|
|
96
98
|
}
|
|
97
99
|
const breakpoints = rawBreakpoints.slice(1);
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
let desktopFirstBreakpoints = (rawDesktopFirstBreakpoints ?? rawBreakpoints.slice(1)).map((breakpoint) => breakpoint.startsWith("max-") ? breakpoint : `max-${breakpoint}`);
|
|
101
|
+
if (useLegacyDesktopFirst) {
|
|
102
|
+
desktopFirstBreakpoints = (rawDesktopFirstBreakpoints ?? rawBreakpoints.slice(0, -1)).map((breakpoint) => breakpoint.startsWith("max-") ? breakpoint : `max-${breakpoint}`);
|
|
103
|
+
}
|
|
101
104
|
const [detailsVisible, setDetailsVisible] = useState(false);
|
|
102
105
|
const isDesktopFirst = (value == null ? void 0 : value["_desktopFirst"]) === true;
|
|
103
106
|
const firstMobileFirstOverride = breakpoints.find((breakpoint) => typeof (value == null ? void 0 : value[breakpoint]) !== "undefined");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../default-i18n-
|
|
2
|
+
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
3
3
|
import { upperFirst } from "../../utilities/es-dash.js";
|
|
4
4
|
import { BreakpointPreview } from "../breakpoint-preview/breakpoint-preview.js";
|
|
5
5
|
import { icons } from "../../icons/icons.js";
|
|
@@ -10,6 +10,7 @@ import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
|
10
10
|
* @param {string} [props.subtitle] - Subtitle to display.
|
|
11
11
|
* @param {JSX.Element} [props.as] - Element to render the label as. Not compatible with `contentsOnly`.
|
|
12
12
|
* @param {string} [props.className] - Classes to pass to the label.
|
|
13
|
+
* @param {string} [props.iconClassName] - Classes to pass to the icon.
|
|
13
14
|
* @param {boolean} [props.fullWidth=false] - If `true`, the component will take up as much space as it can.
|
|
14
15
|
* @param {boolean} [props.contentsOnly] - If `true`, only the label (/icon/subtitle) will be rendered, without any wrapping elements. Useful if you want to provide your own layout.
|
|
15
16
|
* @param {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
@@ -28,14 +29,14 @@ import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
|
28
29
|
* @preserve
|
|
29
30
|
*/
|
|
30
31
|
const RichLabel = (props) => {
|
|
31
|
-
const { icon, label, subtitle, as, className, fullWidth = false, contentsOnly, hidden, noColor, fullSizeSubtitle, inlineSubtitle } = props;
|
|
32
|
+
const { icon, label, subtitle, as, className, iconClassName, fullWidth = false, contentsOnly, hidden, noColor, fullSizeSubtitle, inlineSubtitle } = props;
|
|
32
33
|
if (hidden) {
|
|
33
34
|
return null;
|
|
34
35
|
}
|
|
35
36
|
const ComponentToRender = as ?? "div";
|
|
36
37
|
if (contentsOnly) {
|
|
37
38
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
38
|
-
icon && /* @__PURE__ */ jsx("span", { className: clsx("es:
|
|
39
|
+
icon && /* @__PURE__ */ jsx("span", { className: clsx("es:icon:size-5.5", !noColor && "es:text-slate-500"), children: icon }),
|
|
39
40
|
label && /* @__PURE__ */ jsx("span", { className: clsx("es:text-balance", !noColor && "es:text-secondary-800"), children: label }),
|
|
40
41
|
subtitle && /* @__PURE__ */ jsx("span", { className: clsx("es:text-balance es:text-xs es:opacity-65", !noColor && "es:text-secondary-800"), children: subtitle })
|
|
41
42
|
] });
|
|
@@ -51,7 +52,7 @@ const RichLabel = (props) => {
|
|
|
51
52
|
className
|
|
52
53
|
),
|
|
53
54
|
children: [
|
|
54
|
-
icon && /* @__PURE__ */ jsx("span", { className: "es:
|
|
55
|
+
icon && /* @__PURE__ */ jsx("span", { className: clsx("es:icon:size-5.5", iconClassName), children: icon }),
|
|
55
56
|
(label || subtitle) && /* @__PURE__ */ jsxs("div", { className: clsx("es:flex es:items-start es:text-balance es:text-start", inlineSubtitle ? "es:gap-1.5" : "es:flex-col"), children: [
|
|
56
57
|
label && /* @__PURE__ */ jsx("span", { children: label }),
|
|
57
58
|
subtitle && /* @__PURE__ */ jsx("span", { className: clsx(!fullSizeSubtitle && "es:text-xs", "es:opacity-65"), children: subtitle })
|
|
@@ -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
|
|
3
|
+
import { A as AsyncSelect$1 } from "../../react-select-async.esm-Bql4G5iV.js";
|
|
4
|
+
import { D as DndContext, g as getDragEndHandler, S as SortableContext, a as getMultiValueRemove, b as getMultiValue } from "../../multi-select-components-Sp-JEFEX.js";
|
|
5
5
|
import { r as restrictToParentElement } from "../../modifiers.esm-BuJQPI1X.js";
|
|
6
|
-
import {
|
|
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-DIuJijyT.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-
|
|
3
|
-
import {
|
|
2
|
+
import { A as AsyncSelect$1 } from "../../react-select-async.esm-Bql4G5iV.js";
|
|
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-DIuJijyT.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-DIuJijyT.js";
|
|
6
6
|
/**
|
|
7
7
|
* Default dropdown indicator for CustomSelect.
|
|
8
8
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { g,
|
|
2
|
+
import { g, b, a } from "../../multi-select-components-Sp-JEFEX.js";
|
|
3
3
|
import "../../lite-DVmmD_-j.js";
|
|
4
4
|
export {
|
|
5
5
|
g as getDragEndHandler,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
b as getMultiValue,
|
|
7
|
+
a as getMultiValueRemove
|
|
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
|
|
3
|
+
import { S as StateManagedSelect$1 } from "../../react-select.esm-B_TudhTU.js";
|
|
4
|
+
import { D as DndContext, g as getDragEndHandler, S as SortableContext, a as getMultiValueRemove, b as getMultiValue } from "../../multi-select-components-Sp-JEFEX.js";
|
|
5
5
|
import { r as restrictToParentElement } from "../../modifiers.esm-BuJQPI1X.js";
|
|
6
|
-
import {
|
|
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-DIuJijyT.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-
|
|
3
|
-
import {
|
|
2
|
+
import { S as StateManagedSelect$1 } from "../../react-select.esm-B_TudhTU.js";
|
|
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-DIuJijyT.js";
|
|
8
8
|
/**
|
|
9
9
|
* Select menu.
|
|
10
10
|
*
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../../default-i18n-
|
|
3
|
-
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../../Button-
|
|
4
|
-
import { $ as $f86e6c1ec7da6ebb$export$bc3384a35de93d66, a as $d01f2c01039c0eec$export$72b9695b8216309a, b as $d01f2c01039c0eec$export$c02625b26074192c } from "../../../ComboBox-
|
|
5
|
-
import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../../Input-
|
|
6
|
-
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../../Label-
|
|
7
|
-
import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../../ListBox-
|
|
8
|
-
import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-
|
|
9
|
-
import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../../Text-
|
|
2
|
+
import { _ as __ } from "../../../default-i18n-CT_oS1Fy.js";
|
|
3
|
+
import { $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../../Button-BPLceDeW.js";
|
|
4
|
+
import { $ as $f86e6c1ec7da6ebb$export$bc3384a35de93d66, a as $d01f2c01039c0eec$export$72b9695b8216309a, b as $d01f2c01039c0eec$export$c02625b26074192c } from "../../../ComboBox-_RfyhwZw.js";
|
|
5
|
+
import { $ as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../../../Input-BxpFEIXV.js";
|
|
6
|
+
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../../Label-icmbmNdI.js";
|
|
7
|
+
import { $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../../ListBox-Ca6hiCqz.js";
|
|
8
|
+
import { $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-8tYeQ9n4.js";
|
|
9
|
+
import { $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../../../Text-DVSAPY-K.js";
|
|
10
10
|
import { OptionItemBase } from "./shared.js";
|
|
11
11
|
import { RichLabel } from "../../rich-label/rich-label.js";
|
|
12
12
|
import { BaseControl } from "../../base-control/base-control.js";
|
|
13
13
|
import { useEffect, useRef, cloneElement, useContext } from "react";
|
|
14
14
|
import { icons } from "../../../icons/icons.js";
|
|
15
|
-
import "../../../react-jsx-parser.min-
|
|
15
|
+
import "../../../react-jsx-parser.min-DZCiis5V.js";
|
|
16
16
|
import { unescapeHTML } from "../../../utilities/text-helpers.js";
|
|
17
|
-
import { c as clsx } from "../../../utils-
|
|
17
|
+
import { c as clsx } from "../../../utils-DkCSC521.js";
|
|
18
18
|
/**
|
|
19
19
|
* Select menu with async loading.
|
|
20
20
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { a as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../../ListBox-
|
|
3
|
-
import { c as clsx } from "../../../utils-
|
|
2
|
+
import { a as $eed445e0843c11d0$export$a11e76429ed99b4 } from "../../../ListBox-Ca6hiCqz.js";
|
|
3
|
+
import { c as clsx } from "../../../utils-DkCSC521.js";
|
|
4
4
|
const OptionItemBase = (props) => {
|
|
5
5
|
var _a;
|
|
6
6
|
return /* @__PURE__ */ jsx(
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../../default-i18n-
|
|
2
|
+
import { _ as __ } from "../../../default-i18n-CT_oS1Fy.js";
|
|
3
3
|
import { BaseControl } from "../../base-control/base-control.js";
|
|
4
|
-
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1, $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../../Button-
|
|
5
|
-
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../../Label-
|
|
6
|
-
import { b as $eed445e0843c11d0$export$7ff8f37d2d81a48d, c as $eed445e0843c11d0$export$7c5906fe4f1f2af2, $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../../ListBox-
|
|
7
|
-
import { o as $168583247155ddda$export$dc9c12ed27dd1b49, l as $de32f1b87079253c$export$d2f961adcb0afbe, p as $07b14b47974efb58$export$9b9a0cd73afb7ca4, $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-
|
|
8
|
-
import { d as $3ef42575df84b30b$export$9d1611c77c2fe928,
|
|
9
|
-
import { a as $2baaea4c71418dea$export$294aa081a6c6f55d, $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../../FieldError-
|
|
4
|
+
import { a as $d2b4bc8c273e7be6$export$24d547caef80ccd1, $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../../../Button-BPLceDeW.js";
|
|
5
|
+
import { a as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../../Label-icmbmNdI.js";
|
|
6
|
+
import { b as $eed445e0843c11d0$export$7ff8f37d2d81a48d, c as $eed445e0843c11d0$export$7c5906fe4f1f2af2, $ as $eed445e0843c11d0$export$41f133550aa26f48 } from "../../../ListBox-Ca6hiCqz.js";
|
|
7
|
+
import { o as $168583247155ddda$export$dc9c12ed27dd1b49, l as $de32f1b87079253c$export$d2f961adcb0afbe, p as $07b14b47974efb58$export$9b9a0cd73afb7ca4, $ as $07b14b47974efb58$export$5b6b19405a83ff9d } from "../../../Dialog-8tYeQ9n4.js";
|
|
8
|
+
import { d as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, p as $ff5963eb1fccf552$export$e08e3b67e392101e, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e, b as $64fa3d84918910a7$export$4d86445c2cf5e3, g as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, h as $64fa3d84918910a7$export$ef03459518577ad4, i as $64fa3d84918910a7$export$2881499e37b75b9a, c as clsx } from "../../../utils-DkCSC521.js";
|
|
9
|
+
import { a as $2baaea4c71418dea$export$294aa081a6c6f55d, $ as $ee014567cb39d3f0$export$ff05c3ac10437e03 } from "../../../FieldError-52GVSGgC.js";
|
|
10
10
|
import { $ as $d3e0e05bdfcf66bd$export$c24727297075ec6a } from "../../../Form-Cq3fu75_.js";
|
|
11
|
-
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../../Text-
|
|
12
|
-
import {
|
|
11
|
+
import { a as $514c0188e459b4c0$export$9afb8bc826b033ea } from "../../../Text-DVSAPY-K.js";
|
|
12
|
+
import { o as $fb3050f43d946246$export$e32c88dfddc6e1d8, e as $e1995378a142960e$export$bf788dd355e3a401 } from "../../../Collection-CZxddMZS.js";
|
|
13
13
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../../filterDOMProps-EDDcM64A.js";
|
|
14
|
-
import {
|
|
15
|
-
import React__default, { useMemo, useRef, useState, createContext,
|
|
16
|
-
import {
|
|
17
|
-
import { $ as $
|
|
18
|
-
import { $ as $
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
14
|
+
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, f as $9daab02d461809db$export$683480f191c0e3ea } from "../../../OverlayArrow-CYXQSlEU.js";
|
|
15
|
+
import React__default, { useMemo, useRef, useState, forwardRef, createContext, useContext, useCallback, cloneElement } from "react";
|
|
16
|
+
import { $ as $fca6afa0e843324b$export$f12b703ca79dfbb1 } from "../../../useLocalizedStringFormatter-CFP1YZWQ.js";
|
|
17
|
+
import { a as $e93e671b31057976$export$b8473d3665f3a75a, $ as $e5be200c675c3b3a$export$fc1a364ae1f3ff10 } from "../../../useFormValidation-DhDNSjws.js";
|
|
18
|
+
import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "../../../useSingleSelectListState-CMGsRHHh.js";
|
|
19
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../../useFocusRing-CV5l3lf6.js";
|
|
20
|
+
import { e as $325a3faab7a68acd$export$a16aca283550c30d, f as $2a25aae57d74318e$export$a05409b8bb224a5a } from "../../../Separator-4IIDRlV_.js";
|
|
21
|
+
import { p as $507fabe10e71c6fb$export$8397ddfc504fdb9a } from "../../../useHover-DwDr6ozG.js";
|
|
22
|
+
import { $ as $99facab73266f662$export$5add1d006293d136 } from "../../../useFormReset-C5OggHsw.js";
|
|
23
|
+
import { a as $5c3e21d68f1c4674$export$a966af930f325cab } from "../../../VisuallyHidden-f9zX67a_.js";
|
|
24
24
|
import { icons } from "../../../icons/icons.js";
|
|
25
|
-
import "../../../react-jsx-parser.min-
|
|
25
|
+
import "../../../react-jsx-parser.min-DZCiis5V.js";
|
|
26
26
|
import { OptionItemBase } from "./shared.js";
|
|
27
27
|
import { RichLabel } from "../../rich-label/rich-label.js";
|
|
28
28
|
const $58aed456727eb0f3$export$703601b7e90536f8 = /* @__PURE__ */ new WeakMap();
|
|
@@ -183,7 +183,7 @@ function $bdd25dc72710631f$export$f809e80f58e251d1(props, state, triggerRef) {
|
|
|
183
183
|
disabled: isDisabled,
|
|
184
184
|
required: validationBehavior === "native" && isRequired,
|
|
185
185
|
name,
|
|
186
|
-
value: (_state_selectedKey = state.selectedKey) !== null && _state_selectedKey !== void 0 ? _state_selectedKey :
|
|
186
|
+
value: (_state_selectedKey = state.selectedKey) !== null && _state_selectedKey !== void 0 ? _state_selectedKey : void 0,
|
|
187
187
|
onChange: (e) => state.setSelectedKey(e.target.value)
|
|
188
188
|
}
|
|
189
189
|
};
|
|
@@ -576,7 +576,7 @@ function $82d7e5349645de74$var$SelectInner({ props, selectRef: ref, collection }
|
|
|
576
576
|
within: true
|
|
577
577
|
});
|
|
578
578
|
let buttonRef = useRef(null);
|
|
579
|
-
let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8();
|
|
579
|
+
let [labelRef, label] = $64fa3d84918910a7$export$9d4c57ee4c6ffdd8(!props["aria-label"] && !props["aria-labelledby"]);
|
|
580
580
|
let { labelProps, triggerProps, valueProps, menuProps, descriptionProps, errorMessageProps, ...validation } = $58aed456727eb0f3$export$e64b2f635402ca43({
|
|
581
581
|
...$64fa3d84918910a7$export$ef03459518577ad4(props),
|
|
582
582
|
label,
|
|
@@ -658,7 +658,8 @@ function $82d7e5349645de74$var$SelectInner({ props, selectRef: ref, collection }
|
|
|
658
658
|
placement: "bottom start",
|
|
659
659
|
style: {
|
|
660
660
|
"--trigger-width": buttonWidth
|
|
661
|
-
}
|
|
661
|
+
},
|
|
662
|
+
"aria-labelledby": menuProps["aria-labelledby"]
|
|
662
663
|
}
|
|
663
664
|
],
|
|
664
665
|
[
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { _ as __ } from "../../default-i18n-
|
|
3
|
-
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-
|
|
4
|
-
import { $ as $6f909507e6374d18$export$472062a354075cee, a as $6f909507e6374d18$export$105594979f116971, b as $6f909507e6374d18$export$2c1b491743890dec, c as $6f909507e6374d18$export$a590f758a961cb5b } from "../../Slider-
|
|
2
|
+
import { _ as __ } from "../../default-i18n-CT_oS1Fy.js";
|
|
3
|
+
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-icmbmNdI.js";
|
|
4
|
+
import { $ as $6f909507e6374d18$export$472062a354075cee, a as $6f909507e6374d18$export$105594979f116971, b as $6f909507e6374d18$export$2c1b491743890dec, c as $6f909507e6374d18$export$a590f758a961cb5b } from "../../Slider-rz2XRMGm.js";
|
|
5
5
|
import { BaseControl } from "../base-control/base-control.js";
|
|
6
6
|
import { icons } from "../../icons/icons.js";
|
|
7
7
|
import { getColumnConfigOutputText } from "./utils.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "../../utils-
|
|
3
|
-
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5, a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "../../Label-
|
|
4
|
-
import { $ as $6f909507e6374d18$export$472062a354075cee,
|
|
2
|
+
import { $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "../../utils-DkCSC521.js";
|
|
3
|
+
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5, a as $01b77f81d0f07f68$export$75b6ee27786ba447 } from "../../Label-icmbmNdI.js";
|
|
4
|
+
import { $ as $6f909507e6374d18$export$472062a354075cee, a as $6f909507e6374d18$export$105594979f116971, b as $6f909507e6374d18$export$2c1b491743890dec, c as $6f909507e6374d18$export$a590f758a961cb5b, d as $6f909507e6374d18$export$1e7083018727fa60 } from "../../Slider-rz2XRMGm.js";
|
|
5
5
|
import { BaseControl } from "../base-control/base-control.js";
|
|
6
6
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
7
7
|
import { NumberPicker } from "../number-picker/number-picker.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __, s as sprintf, a as _n } from "../../default-i18n-
|
|
1
|
+
import { _ as __, s as sprintf, a as _n } from "../../default-i18n-CT_oS1Fy.js";
|
|
2
2
|
/**
|
|
3
3
|
* Generates an array of markers based on the provided minimum and maximum values and step.
|
|
4
4
|
* If the step is less than 10, only markers divisible by 5 and 10 are included.
|
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as $880e95eb8b93ba9a$export$ecf600387e221c37,
|
|
3
|
-
import {
|
|
4
|
-
import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "../../Hidden-
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { c as $880e95eb8b93ba9a$export$ecf600387e221c37, k as $ae20dd8cbca75726$export$d6daf82dcd84e87c, d as $e1995378a142960e$export$18af5c7a9e9b3664, f as $e1995378a142960e$export$fb8073518f34e6ec, g as $7135fc7d473fd974$export$4feb769f8ddf26c5, m as $7135fc7d473fd974$export$a164736487e3f0ae, e as $e1995378a142960e$export$bf788dd355e3a401, n as $7135fc7d473fd974$export$90e00781bc59d8f9 } from "../../Collection-CZxddMZS.js";
|
|
3
|
+
import { k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, d as $3ef42575df84b30b$export$9d1611c77c2fe928, e as $bdb11010cef70236$export$f680877a34711e37, l as $df56164dff5785e2$export$4338b53315abf666, b as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "../../utils-DkCSC521.js";
|
|
4
|
+
import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "../../Hidden-rE6uR-lr.js";
|
|
5
5
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
6
|
-
import React__default, { useState, useMemo, useRef, useEffect, forwardRef, useContext, createContext, useId, cloneElement
|
|
7
|
-
import {
|
|
8
|
-
import { $ as $
|
|
9
|
-
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { $ as $
|
|
14
|
-
import { _ as __, s as sprintf } from "../../default-i18n-
|
|
6
|
+
import React__default, { version, useState, useMemo, useRef, useEffect, forwardRef, useContext, createContext, isValidElement, useId, cloneElement } from "react";
|
|
7
|
+
import { a as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 } from "../../usePress-Cucx-xSA.js";
|
|
8
|
+
import { a as $f645667febf57a63$export$4c014de7c8940b4c, $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-DwDr6ozG.js";
|
|
9
|
+
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-D8cxd1Z8.js";
|
|
10
|
+
import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "../../FocusScope-Cri5BFRz.js";
|
|
11
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-D2KUdwNL.js";
|
|
12
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-CV5l3lf6.js";
|
|
13
|
+
import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "../../useSingleSelectListState-CMGsRHHh.js";
|
|
14
|
+
import { _ as __, s as sprintf } from "../../default-i18n-CT_oS1Fy.js";
|
|
15
15
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
16
|
-
import { c as cva } from "../../index-
|
|
16
|
+
import { c as cva } from "../../index-BKGQ6jGS.js";
|
|
17
17
|
import { Notice } from "../notice/notice.js";
|
|
18
18
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
19
|
+
function $cdc5a6778b766db2$export$a9d04c5684123369(value) {
|
|
20
|
+
const pieces = version.split(".");
|
|
21
|
+
const major = parseInt(pieces[0], 10);
|
|
22
|
+
if (major >= 19) return value;
|
|
23
|
+
return value ? "true" : void 0;
|
|
24
|
+
}
|
|
19
25
|
function $83013635b024ae3d$export$eac1895992b9f3d6(ref, options) {
|
|
20
26
|
let isDisabled = options === null || options === void 0 ? void 0 : options.isDisabled;
|
|
21
27
|
let [hasTabbableChild, setHasTabbableChild] = useState(false);
|
|
@@ -77,8 +83,11 @@ function $0175d55c2a017ebc$export$fdf4756d5b8ef90a(props, state, ref) {
|
|
|
77
83
|
});
|
|
78
84
|
delete domProps.id;
|
|
79
85
|
let linkProps = $ea8dcbcb9ea1b556$export$7e924b3091a3bd18(item === null || item === void 0 ? void 0 : item.props);
|
|
86
|
+
let { focusableProps } = $f645667febf57a63$export$4c014de7c8940b4c({
|
|
87
|
+
isDisabled
|
|
88
|
+
}, ref);
|
|
80
89
|
return {
|
|
81
|
-
tabProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, linkProps, itemProps, {
|
|
90
|
+
tabProps: $3ef42575df84b30b$export$9d1611c77c2fe928(domProps, focusableProps, linkProps, itemProps, {
|
|
82
91
|
id: tabId,
|
|
83
92
|
"aria-selected": isSelected,
|
|
84
93
|
"aria-disabled": isDisabled || void 0,
|
|
@@ -206,7 +215,7 @@ function $76f919a04c5a7d14$export$4ba071daf4e486(props) {
|
|
|
206
215
|
let lastSelectedKey = useRef(currentSelectedKey);
|
|
207
216
|
useEffect(() => {
|
|
208
217
|
let selectedKey = currentSelectedKey;
|
|
209
|
-
if (selectionManager.isEmpty || selectedKey == null || !collection.getItem(selectedKey)) {
|
|
218
|
+
if (props.selectedKey == null && (selectionManager.isEmpty || selectedKey == null || !collection.getItem(selectedKey))) {
|
|
210
219
|
selectedKey = $76f919a04c5a7d14$var$findDefaultSelectedKey(collection, state.disabledKeys);
|
|
211
220
|
if (selectedKey != null)
|
|
212
221
|
selectionManager.setSelectedKeys([
|
|
@@ -354,6 +363,7 @@ const $5e8ad37a45e1c704$export$3e41faf802a29e71 = /* @__PURE__ */ $e1995378a1429
|
|
|
354
363
|
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
355
364
|
...props,
|
|
356
365
|
id: void 0,
|
|
366
|
+
children: item.rendered,
|
|
357
367
|
defaultClassName: "react-aria-Tab",
|
|
358
368
|
values: {
|
|
359
369
|
isSelected,
|
|
@@ -374,7 +384,7 @@ const $5e8ad37a45e1c704$export$3e41faf802a29e71 = /* @__PURE__ */ $e1995378a1429
|
|
|
374
384
|
"data-focus-visible": isFocusVisible || void 0,
|
|
375
385
|
"data-pressed": isPressed || void 0,
|
|
376
386
|
"data-hovered": isHovered || void 0
|
|
377
|
-
});
|
|
387
|
+
}, renderProps.children);
|
|
378
388
|
});
|
|
379
389
|
const $5e8ad37a45e1c704$export$3d96ec278d3efce4 = /* @__PURE__ */ $f39a9eba43920ace$export$86427a43e3e48ebb(function TabPanel(props, forwardedRef) {
|
|
380
390
|
const state = useContext($5e8ad37a45e1c704$export$364712098d2aa57c);
|
|
@@ -402,7 +412,7 @@ const $5e8ad37a45e1c704$export$3d96ec278d3efce4 = /* @__PURE__ */ $f39a9eba43920
|
|
|
402
412
|
"data-focused": isFocused || void 0,
|
|
403
413
|
"data-focus-visible": isFocusVisible || void 0,
|
|
404
414
|
// @ts-ignore
|
|
405
|
-
inert: !isSelected
|
|
415
|
+
inert: $cdc5a6778b766db2$export$a9d04c5684123369(!isSelected),
|
|
406
416
|
"data-inert": !isSelected ? "true" : void 0
|
|
407
417
|
}, /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
408
418
|
values: [
|
|
@@ -431,7 +441,7 @@ const $5e8ad37a45e1c704$export$3d96ec278d3efce4 = /* @__PURE__ */ $f39a9eba43920
|
|
|
431
441
|
*
|
|
432
442
|
* @returns {JSX.Element} The Tabs component.
|
|
433
443
|
*
|
|
434
|
-
* @typedef {'underline' | 'pill' | 'pillInverse'} TabsType
|
|
444
|
+
* @typedef {'underline' | 'pill' | 'pillInverse' | 'pillCompact' | 'pillCompactInverse'} TabsType
|
|
435
445
|
*
|
|
436
446
|
* @example
|
|
437
447
|
* <Tabs>
|
|
@@ -564,6 +574,7 @@ TabList2.displayName = "TabList";
|
|
|
564
574
|
* @param {string} [props.className] - Classes to pass to the tab.
|
|
565
575
|
* @param {JSX.Element} [props.icon] - Icon to show on the tab.
|
|
566
576
|
* @param {string|JSX.Element} [props.badge] - Badge to render besides the label.
|
|
577
|
+
* @param {boolean} [props.invisible] - If `true`, the tab is disabled and not rendered, but is not unmounted from the DOM.
|
|
567
578
|
* @param {string} [props.label] - Tab label. **Note**: overrides inner items!
|
|
568
579
|
* @param {string} [props.subtitle] - Tab subtitle. **Note**: overrides inner items!
|
|
569
580
|
*
|
|
@@ -574,12 +585,15 @@ TabList2.displayName = "TabList";
|
|
|
574
585
|
* @preserve
|
|
575
586
|
*/
|
|
576
587
|
const Tab = (props) => {
|
|
577
|
-
const { children, disabled, isParentVertical, className, icon, label, subtitle, type, badge, ...other } = props;
|
|
588
|
+
const { children, disabled, isParentVertical, className, icon, label, subtitle, type, badge, invisible, ...other } = props;
|
|
578
589
|
const componentClasses = cva(
|
|
579
590
|
[
|
|
580
|
-
"es:group es:flex es:items-center es:gap-1.5 es:relative es:shrink-0
|
|
591
|
+
"es:group es:flex es:items-center es:gap-1.5 es:relative es:shrink-0",
|
|
581
592
|
"es:select-none es:text-sm es:transition es:not-disabled:cursor-pointer",
|
|
582
593
|
"es:any-focus:outline-hidden es:focus-visible:ring-2 es:focus-visible:ring-accent-500/50",
|
|
594
|
+
!(type === "pillCompact" || type === "pillCompactInverse") && "es:min-h-9.5",
|
|
595
|
+
isParentVertical && (type === "pillCompact" || type === "pillCompactInverse") && "es:min-h-8",
|
|
596
|
+
invisible && "es:hidden",
|
|
583
597
|
className
|
|
584
598
|
],
|
|
585
599
|
{
|
|
@@ -587,7 +601,9 @@ const Tab = (props) => {
|
|
|
587
601
|
type: {
|
|
588
602
|
underline: "es:disabled:text-secondary-400 es:selected:text-accent-950",
|
|
589
603
|
pill: "es:font-[450] es:border es:border-transparent es:px-3 es:py-2 es:rounded-lg es:not-disabled:not-selected:hover:text-secondary-900 es:not-disabled:not-selected:hover:bg-secondary-100 es:text-secondary-500 es:selected:text-accent-900 es:selected:bg-accent-400/15 es:has-icon:pl-2.5 es:focus-visible:border-accent-500 es:disabled:text-secondary-400/75",
|
|
590
|
-
pillInverse: "es:font-[450] es:border es:border-transparent es:px-3 es:py-2 es:rounded-lg es:not-disabled:not-selected:hover:text-secondary-900 es:not-disabled:not-selected:hover:bg-secondary-100 es:text-secondary-500 es:selected:text-white es:selected:bg-accent-600 es:has-icon:pl-2.5 es:focus-visible:border-accent-500 es:disabled:text-secondary-400/75"
|
|
604
|
+
pillInverse: "es:font-[450] es:border es:border-transparent es:px-3 es:py-2 es:rounded-lg es:not-disabled:not-selected:hover:text-secondary-900 es:not-disabled:not-selected:hover:bg-secondary-100 es:text-secondary-500 es:selected:text-white es:selected:bg-accent-600 es:has-icon:pl-2.5 es:focus-visible:border-accent-500 es:disabled:text-secondary-400/75",
|
|
605
|
+
pillCompact: "es:icon:size-4 es:font-[450] es:border es:border-transparent es:px-1.5 es:py-1 es:rounded-lg es:not-disabled:not-selected:hover:text-secondary-900 es:not-disabled:not-selected:hover:bg-secondary-100 es:text-secondary-500 es:selected:text-accent-900 es:selected:bg-accent-400/15 es:has-icon:pl-1 es:focus-visible:border-accent-500 es:disabled:text-secondary-400/75",
|
|
606
|
+
pillCompactInverse: "es:icon:size-4 es:font-[450] es:border es:border-transparent es:px-1.5 es:py-1 es:rounded-lg es:not-disabled:not-selected:hover:text-secondary-900 es:not-disabled:not-selected:hover:bg-secondary-100 es:text-secondary-500 es:selected:text-white es:selected:bg-accent-600 es:has-icon:pl-1 es:focus-visible:border-accent-500 es:disabled:text-secondary-400/75"
|
|
591
607
|
}
|
|
592
608
|
},
|
|
593
609
|
compoundVariants: [
|
|
@@ -618,7 +634,7 @@ const Tab = (props) => {
|
|
|
618
634
|
$5e8ad37a45e1c704$export$3e41faf802a29e71,
|
|
619
635
|
{
|
|
620
636
|
...other,
|
|
621
|
-
isDisabled: disabled,
|
|
637
|
+
isDisabled: disabled || invisible,
|
|
622
638
|
className: componentClasses({ vertical: Boolean(isParentVertical), type }),
|
|
623
639
|
children: [
|
|
624
640
|
(icon || subtitle) && /* @__PURE__ */ jsx(
|
|
@@ -627,7 +643,8 @@ const Tab = (props) => {
|
|
|
627
643
|
icon,
|
|
628
644
|
label: label ?? children,
|
|
629
645
|
subtitle,
|
|
630
|
-
noColor: true
|
|
646
|
+
noColor: true,
|
|
647
|
+
iconClassName: clsx((type === "pillCompact" || type === "pillCompactInverse") && "es:icon:size-4!")
|
|
631
648
|
}
|
|
632
649
|
),
|
|
633
650
|
!(icon || subtitle) && (label ?? children),
|
|
@@ -638,7 +655,10 @@ const Tab = (props) => {
|
|
|
638
655
|
"es:transition-colors es:px-1.5 es:py-1 es:leading-none es:rounded-md es:text-xs es:font-medium",
|
|
639
656
|
type === "underline" && "es:inset-ring es:inset-ring-secondary-200/20 es:bg-secondary-100 es:group-selected:bg-accent-500/10 es:group-selected:text-accent-900 es:group-selected:inset-ring-accent-500/10",
|
|
640
657
|
type === "pill" && "es:bg-secondary-100 es:group-selected:bg-accent-600 es:group-selected:text-white",
|
|
641
|
-
type === "pillInverse" && "es:bg-secondary-100 es:group-selected:bg-accent-50 es:group-selected:text-accent-900"
|
|
658
|
+
type === "pillInverse" && "es:bg-secondary-100 es:group-selected:bg-accent-50 es:group-selected:text-accent-900",
|
|
659
|
+
type === "pillCompact" && "es:bg-secondary-100 es:group-selected:bg-accent-600 es:group-selected:text-white",
|
|
660
|
+
type === "pillCompactInverse" && "es:bg-secondary-100 es:group-selected:bg-accent-50 es:group-selected:text-accent-900",
|
|
661
|
+
(type === "pillCompact" || type === "pillCompactInverse") && "es:[&_svg]:size-4!"
|
|
642
662
|
),
|
|
643
663
|
children: badge
|
|
644
664
|
}
|
|
@@ -668,7 +688,7 @@ const TabPanel2 = (props) => {
|
|
|
668
688
|
$5e8ad37a45e1c704$export$3d96ec278d3efce4,
|
|
669
689
|
{
|
|
670
690
|
...other,
|
|
671
|
-
className: clsx("es:
|
|
691
|
+
className: clsx("es:space-y-2.5 es:text-sm es:any-focus:outline-hidden", className),
|
|
672
692
|
children
|
|
673
693
|
}
|
|
674
694
|
);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415,
|
|
2
|
+
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, h as $64fa3d84918910a7$export$ef03459518577ad4, b as $64fa3d84918910a7$export$4d86445c2cf5e3, d as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "../../utils-DkCSC521.js";
|
|
3
3
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
4
4
|
import React__default, { forwardRef, createContext } from "react";
|
|
5
|
-
import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-
|
|
6
|
-
import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "../../useToggle-
|
|
7
|
-
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-
|
|
8
|
-
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../
|
|
9
|
-
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-
|
|
5
|
+
import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-CmQX3SoX.js";
|
|
6
|
+
import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "../../useToggle-C0I3vs0g.js";
|
|
7
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-CV5l3lf6.js";
|
|
8
|
+
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-DwDr6ozG.js";
|
|
9
|
+
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-f9zX67a_.js";
|
|
10
10
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
11
11
|
function $b418ec0c85c52f27$export$d853f7095ae95f88(props, state, ref) {
|
|
12
12
|
let { labelProps, inputProps, isSelected, isPressed, isDisabled, isReadOnly } = $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref);
|
|
@@ -114,7 +114,7 @@ const Switch2 = (props) => {
|
|
|
114
114
|
className: "es:group es:flex es:items-center es:justify-between es:gap-2 es:any-focus:outline-hidden",
|
|
115
115
|
children: [
|
|
116
116
|
children,
|
|
117
|
-
/* @__PURE__ */ jsx("div", { className: clsx("es:flex es:shrink-0 es:items-center es:justify-center", className), children: /* @__PURE__ */ jsx(
|
|
117
|
+
/* @__PURE__ */ jsx("div", { className: clsx("es:flex es:shrink-0 es:items-center es:justify-center es:min-h-6.5", className), children: /* @__PURE__ */ jsx(
|
|
118
118
|
"div",
|
|
119
119
|
{
|
|
120
120
|
className: clsx(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-
|
|
2
|
+
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-icmbmNdI.js";
|
|
3
3
|
import { Switch } from "./switch.js";
|
|
4
4
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
5
5
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { p as $ff5963eb1fccf552$export$e08e3b67e392101e, d as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, b as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../../utils-
|
|
2
|
+
import { p as $ff5963eb1fccf552$export$e08e3b67e392101e, d as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, b as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../../utils-DkCSC521.js";
|
|
3
3
|
import React__default, { createContext, forwardRef, useContext } from "react";
|
|
4
|
-
import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-
|
|
5
|
-
import { $ as $701a24aa0da5b062$export$ea18c227d4417cc3 } from "../../useButton-
|
|
6
|
-
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-
|
|
7
|
-
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../
|
|
8
|
-
import { c as cva } from "../../index-
|
|
4
|
+
import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-CmQX3SoX.js";
|
|
5
|
+
import { $ as $701a24aa0da5b062$export$ea18c227d4417cc3 } from "../../useButton-Cg474OYB.js";
|
|
6
|
+
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-CV5l3lf6.js";
|
|
7
|
+
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-DwDr6ozG.js";
|
|
8
|
+
import { c as cva } from "../../index-BKGQ6jGS.js";
|
|
9
9
|
import { Tooltip } from "../tooltip/tooltip.js";
|
|
10
10
|
function $55f54f7887471b58$export$51e84d46ca0bc451(props, state, ref) {
|
|
11
11
|
const { isSelected } = state;
|