@eightshift/ui-components 1.1.3 → 1.2.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/assets/style.css +1 -1
- package/dist/{button-CD8Q1eok.js → button-MFj-FKsM.js} +1 -1
- package/dist/components/button/button.js +2 -2
- package/dist/components/checkbox/checkbox.js +2 -2
- package/dist/components/color-pickers/gradient-editor.js +26 -14
- package/dist/components/color-pickers/solid-color-picker.js +7 -3
- package/dist/components/component-toggle/component-toggle.js +2 -2
- package/dist/components/container-panel/container-panel.js +5 -5
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/expandable/expandable.js +2 -2
- package/dist/components/index.js +3 -3
- package/dist/components/input-field/input-field.js +1 -0
- package/dist/components/link-input/link-input.js +3 -4
- package/dist/components/matrix-align/matrix-align.js +3 -3
- package/dist/components/menu/menu.js +17 -7
- package/dist/components/number-picker/number-picker.js +1 -1
- package/dist/components/option-select/option-select.js +1 -1
- package/dist/components/options-panel/options-panel.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 +7 -4
- package/dist/components/responsive/responsive-legacy.js +7 -7
- package/dist/components/responsive/responsive.js +2 -2
- package/dist/components/responsive-preview/responsive-preview.js +5 -5
- package/dist/components/select/async-multi-select.js +1 -1
- package/dist/components/select/async-single-select.js +2 -2
- package/dist/components/select/shared.js +4 -0
- package/dist/components/select/styles.js +9 -8
- package/dist/components/slider/slider.js +4 -5
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/index.js +3 -3
- package/dist/{popover-Dk2o4S7K.js → popover-CdonDPqG.js} +7 -2
- package/dist/{tooltip-BRQ4tvZL.js → tooltip-Do_imFfg.js} +3 -3
- package/package.json +1 -1
|
@@ -36,19 +36,20 @@ const ResponsivePreview = (props) => {
|
|
|
36
36
|
var _a, _b;
|
|
37
37
|
const {
|
|
38
38
|
value,
|
|
39
|
-
isDesktopFirst,
|
|
39
|
+
isDesktopFirst: rawIsDesktopFirst,
|
|
40
40
|
breakpoints: rawBreakpoints,
|
|
41
41
|
desktopFirstBreakpoints: rawDesktopFirstBreakpoints,
|
|
42
42
|
options,
|
|
43
43
|
breakpointData,
|
|
44
44
|
breakpointUiData
|
|
45
45
|
} = props;
|
|
46
|
+
const isDesktopFirst = rawIsDesktopFirst ?? (value == null ? void 0 : value["_desktopFirst"]) ?? false;
|
|
46
47
|
const breakpoints = rawBreakpoints;
|
|
47
48
|
const desktopFirstBreakpoints = rawDesktopFirstBreakpoints ?? rawBreakpoints.slice(0, -1);
|
|
48
49
|
const firstMobileFirstOverride = breakpoints.find((breakpoint) => value == null ? void 0 : value[breakpoint]);
|
|
49
50
|
const lastDesktopFirstOverride = desktopFirstBreakpoints.toReversed().find((breakpoint) => value == null ? void 0 : value[breakpoint]);
|
|
50
51
|
let previewItems = [];
|
|
51
|
-
if (firstMobileFirstOverride) {
|
|
52
|
+
if (firstMobileFirstOverride && !isDesktopFirst) {
|
|
52
53
|
previewItems = [
|
|
53
54
|
...previewItems,
|
|
54
55
|
{
|
|
@@ -71,7 +72,7 @@ const ResponsivePreview = (props) => {
|
|
|
71
72
|
];
|
|
72
73
|
});
|
|
73
74
|
}
|
|
74
|
-
if (lastDesktopFirstOverride) {
|
|
75
|
+
if (lastDesktopFirstOverride && isDesktopFirst) {
|
|
75
76
|
desktopFirstBreakpoints.forEach((breakpoint) => {
|
|
76
77
|
var _a2, _b2;
|
|
77
78
|
if (typeof (value == null ? void 0 : value[breakpoint]) === "undefined") {
|
|
@@ -90,13 +91,12 @@ const ResponsivePreview = (props) => {
|
|
|
90
91
|
previewItems = [
|
|
91
92
|
...previewItems,
|
|
92
93
|
{
|
|
93
|
-
alignEnd: true,
|
|
94
94
|
breakpoint: __("Default", "eightshift-ui-components"),
|
|
95
95
|
value: ((_b = options == null ? void 0 : options.find((opt) => opt.value === (value == null ? void 0 : value["_default"]))) == null ? void 0 : _b.label) ?? upperFirst(value == null ? void 0 : value["_default"])
|
|
96
96
|
}
|
|
97
97
|
];
|
|
98
98
|
}
|
|
99
|
-
return /* @__PURE__ */ jsxs("div", { className: "es-uic-flex es-uic-min-w-72 es-uic-flex-col es-uic-items-start es-uic-gap-4 es-uic-p-2", children: [
|
|
99
|
+
return /* @__PURE__ */ jsxs("div", { className: "es-uic-flex es-uic-min-w-72 es-uic-flex-col es-uic-items-start es-uic-gap-4 es-uic-p-2 es-uic-text-sm", children: [
|
|
100
100
|
/* @__PURE__ */ jsxs("div", { className: "es-uic-flex es-uic-w-full es-uic-items-center es-uic-gap-2.5", children: [
|
|
101
101
|
/* @__PURE__ */ jsx(
|
|
102
102
|
RichLabel,
|
|
@@ -18,7 +18,7 @@ import { c as components } from "../../index-a301f526.esm-ByOfDxiG.js";
|
|
|
18
18
|
* @param {string} [props.subtitle] - Subtitle of the component.
|
|
19
19
|
* @param {JSX.Element|JSX.Element[]} [props.actions] - Actions to show to the right of the label.
|
|
20
20
|
* @param {boolean} [props.inline] - Whether the Select menu is displayed inline with the label, to the right.
|
|
21
|
-
* @param {boolean|{label: string, value: string, metadata: Object<string, any>?}[]
|
|
21
|
+
* @param {boolean|{label: string, value: string, metadata: Object<string, any>?}[]} [props.preloadOptions=true] - If `true`, the initial loading is done as soon as the component is loaded. If an array of `{label: '', value: ''}` option is provided, that is loaded immediately, dynamic fetching only happens in search. If `false`, nothing is loaded immediately, fetching only happens when an user types to search.
|
|
22
22
|
* @param {Function<Promise>} props.loadOptions - Async function that returns an array of `{label: '', value: ''}`-formatted items. `loadOptions(searchText: string): Promise<{label: string, value: string, [metadata]: Array}[]>`.
|
|
23
23
|
* @param {{label: string, value: string, metadata: Object<string, any>?}[]} props.value - Current value of the select.
|
|
24
24
|
* @param {Function} props.onChange - Function to call when the value changes.
|
|
@@ -15,8 +15,8 @@ import { c as components } from "../../index-a301f526.esm-ByOfDxiG.js";
|
|
|
15
15
|
* @param {string} [props.subtitle] - Subtitle of the component.
|
|
16
16
|
* @param {JSX.Element|JSX.Element[]} [props.actions] - Actions to show to the right of the label.
|
|
17
17
|
* @param {boolean} [props.inline] - Whether the Select menu is displayed inline with the label, to the right.
|
|
18
|
-
* @param {boolean|{label: string, value: string, metadata: Object<string, any>?}[]
|
|
19
|
-
* @param {Function
|
|
18
|
+
* @param {boolean|{label: string, value: string, metadata: Object<string, any>?}[]} [props.preloadOptions=true] - If `true`, the initial loading is done as soon as the component is loaded. If an array of `{label: '', value: ''}` option is provided, that is loaded immediately, dynamic fetching only happens in search. If `false`, nothing is loaded immediately, fetching only happens when an user types to search.
|
|
19
|
+
* @param {Function} props.loadOptions - Async function that returns an array of `{label: '', value: ''}`-formatted items. `loadOptions(searchText: string): Promise<{label: string, value: string, metadata: Object<string, any>?}[]>`.
|
|
20
20
|
* @param {{label: string, value: string, metadata: Object<string, any>?}} props.value - Current value of the select.
|
|
21
21
|
* @param {Function} props.onChange - Function to call when the value changes.
|
|
22
22
|
* @param {boolean} [props.clearable=false] - Whether the select is clearable.
|
|
@@ -29,6 +29,10 @@ const getValue = (simpleValue, value, options) => {
|
|
|
29
29
|
* @preserve
|
|
30
30
|
*/
|
|
31
31
|
const customOnChange = (simpleValue, newValue, onChange) => {
|
|
32
|
+
if (typeof newValue === "undefined" || newValue === null || newValue === "") {
|
|
33
|
+
onChange(void 0);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
32
36
|
delete newValue.id;
|
|
33
37
|
if (!simpleValue) {
|
|
34
38
|
onChange(newValue);
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
2
2
|
const controlStyles = {
|
|
3
|
-
base: "es-uic-border es-uic-rounded-md es-uic-bg-white es-uic-text-sm es-uic-transition es-uic-group es-uic-shadow-sm !es-uic-min-h-10",
|
|
4
|
-
focus: "es-uic-ring es-uic-ring-teal-500 es-uic-ring-opacity-50"
|
|
5
|
-
nonFocus: "es-uic-border-gray-300"
|
|
3
|
+
base: "es-uic-border es-uic-border-gray-300 es-uic-rounded-md es-uic-bg-white es-uic-text-sm es-uic-transition es-uic-group es-uic-shadow-sm !es-uic-min-h-10",
|
|
4
|
+
focus: "es-uic-ring es-uic-ring-teal-500 es-uic-ring-opacity-50"
|
|
6
5
|
};
|
|
7
6
|
const placeholderStyles = "es-uic-text-gray-400 es-uic-ml-0.5";
|
|
8
7
|
const selectInputStyles = "focus:es-uic-outline-none [&_input]:!es-uic-shadow-none [&_input:focus]:!es-uic-shadow-none";
|
|
9
8
|
const valueContainerStyles = "es-uic-gap-1 es-uic-ml-1 es-uic-my-1 !es-uic-overflow-visible";
|
|
10
9
|
const singleValueStyles = "es-uic-ml-0.5";
|
|
11
10
|
const multiValueStyles = clsx(
|
|
12
|
-
"es-uic-bg-gray-100 es-uic-rounded es-uic-p-1 es-uic-border es-uic-border-gray-100
|
|
11
|
+
"es-uic-bg-gray-100 es-uic-rounded es-uic-p-1 es-uic-border es-uic-border-gray-100 hover:border-gray-300 es-uic-items-center es-uic-gap-1.5 es-uic-transition es-uic-overflow-visible",
|
|
13
12
|
"[:focus-visible_&]:es-uic-outline-none [:focus-visible_&]:es-uic-ring",
|
|
14
13
|
"[:focus-visible_&]:es-uic-ring-teal-500 [:focus-visible_&]:es-uic-ring-opacity-50"
|
|
15
14
|
);
|
|
16
15
|
const multiValueLabelStyles = "es-uic-select-none";
|
|
17
16
|
const multiValueRemoveStyles = "hover:es-uic-bg-red-500/15 hover:es-uic-text-red-900 es-uic-text-gray-500 es-uic-rounded es-uic-p-0.5 [&>svg]:es-uic-size-3.5 [&>svg]:es-uic-stroke-[1.5] es-uic-transition";
|
|
18
|
-
const clearIndicatorStyles = "es-uic-text-gray-500 es-uic-p-1 es-uic-rounded-md
|
|
17
|
+
const clearIndicatorStyles = "es-uic-text-gray-500 es-uic-p-1 es-uic-rounded-md hover:bg-red-50 hover:text-red-800 es-uic-transition";
|
|
19
18
|
const dropdownIndicatorStyles = "es-uic-text-gray-500 es-uic-px-1 group-hover:es-uic-text-black [&>svg]:es-uic-transition-transform [&>svg]:es-uic-duration-500 [&>svg]:es-uic-size-5.5";
|
|
20
19
|
const menuStyles = "es-uic-rounded-md es-uic-border es-uic-border-gray-200 es-uic-bg-white es-uic-shadow-lg es-uic-mt-1 es-uic-text-sm es-uic-overflow-x-hidden";
|
|
21
20
|
const optionStyles = {
|
|
@@ -25,10 +24,11 @@ const optionStyles = {
|
|
|
25
24
|
};
|
|
26
25
|
const noOptionsMessageStyles = "es-uic-text-gray-400 es-uic-p-4";
|
|
27
26
|
const groupHeadingStyles = "es-uic-ml-3 es-uic-mt-2 es-uic-text-gray-500 es-uic-empty:hidden";
|
|
28
|
-
const groupStyles = "es-uic-border-b last:es-uic-border-b-0";
|
|
27
|
+
const groupStyles = "es-uic-border-b es-uic-border-b-gray-200 last:es-uic-border-b-0";
|
|
28
|
+
const loadingMessageStyles = "es-uic-p-4";
|
|
29
29
|
const eightshiftSelectClasses = {
|
|
30
30
|
clearIndicator: () => clearIndicatorStyles,
|
|
31
|
-
control: ({ isFocused }) => clsx(isFocused
|
|
31
|
+
control: ({ isFocused }) => clsx(isFocused && controlStyles.focus, controlStyles.base),
|
|
32
32
|
dropdownIndicator: () => dropdownIndicatorStyles,
|
|
33
33
|
group: () => groupStyles,
|
|
34
34
|
groupHeading: () => groupHeadingStyles,
|
|
@@ -41,7 +41,8 @@ const eightshiftSelectClasses = {
|
|
|
41
41
|
option: ({ isFocused, isSelected }) => clsx(isFocused && optionStyles.focus, isSelected && optionStyles.selected, optionStyles.base),
|
|
42
42
|
placeholder: () => placeholderStyles,
|
|
43
43
|
singleValue: () => singleValueStyles,
|
|
44
|
-
valueContainer: () => valueContainerStyles
|
|
44
|
+
valueContainer: () => valueContainerStyles,
|
|
45
|
+
loadingMessage: () => loadingMessageStyles
|
|
45
46
|
};
|
|
46
47
|
export {
|
|
47
48
|
eightshiftSelectClasses
|
|
@@ -101,10 +101,10 @@ const Slider = (props) => {
|
|
|
101
101
|
step,
|
|
102
102
|
isDisabled: disabled,
|
|
103
103
|
orientation: vertical ? "vertical" : "horizontal",
|
|
104
|
-
className: "es-uic-w-full es-uic-pb-3.5",
|
|
104
|
+
className: clsx("es-uic-w-full", (markerEntries == null ? void 0 : markerEntries.some(([_, value2]) => (value2 == null ? void 0 : value2.length) > 0)) && "es-uic-pb-3.5"),
|
|
105
105
|
onChangeEnd,
|
|
106
106
|
...other,
|
|
107
|
-
children: /* @__PURE__ */
|
|
107
|
+
children: /* @__PURE__ */ jsx(
|
|
108
108
|
BaseControl,
|
|
109
109
|
{
|
|
110
110
|
icon,
|
|
@@ -128,8 +128,7 @@ const Slider = (props) => {
|
|
|
128
128
|
] }),
|
|
129
129
|
labelAs: $01b77f81d0f07f68$export$b04be29aa201d4f5,
|
|
130
130
|
className: labelClassName,
|
|
131
|
-
|
|
132
|
-
children: [
|
|
131
|
+
children: /* @__PURE__ */ jsxs("div", { className: clsx("es-uic-flex es-uic-items-center es-uic-gap-2.5 !es-uic-space-y-0", vertical && "es-uic-flex-col"), children: [
|
|
133
132
|
before && /* @__PURE__ */ jsx("div", { className: "es-uic-flex es-uic-shrink-0 es-uic-items-center es-uic-gap-1", children: before }),
|
|
134
133
|
/* @__PURE__ */ jsx(
|
|
135
134
|
$6f909507e6374d18$export$105594979f116971,
|
|
@@ -312,7 +311,7 @@ const Slider = (props) => {
|
|
|
312
311
|
}
|
|
313
312
|
),
|
|
314
313
|
after && /* @__PURE__ */ jsx("div", { className: "es-uic-flex es-uic-shrink-0 es-uic-items-center es-uic-gap-1", children: after })
|
|
315
|
-
]
|
|
314
|
+
] })
|
|
316
315
|
}
|
|
317
316
|
)
|
|
318
317
|
}
|
|
@@ -468,7 +468,7 @@ const Tabs = (props) => {
|
|
|
468
468
|
cloneElement(child, {
|
|
469
469
|
id: `tab-${baseId}-${tabPanelCounter++}`,
|
|
470
470
|
key: index,
|
|
471
|
-
className: clsx(child.props.className, vertical && "es-uic-border-l es-uic-border-l-300 es-uic-pl-3")
|
|
471
|
+
className: clsx(child.props.className, vertical && "es-uic-border-l es-uic-border-l-gray-300 es-uic-pl-3")
|
|
472
472
|
})
|
|
473
473
|
];
|
|
474
474
|
}
|
|
@@ -6,7 +6,7 @@ import { $ as $701a24aa0da5b062$export$ea18c227d4417cc3 } from "../../useButton-
|
|
|
6
6
|
import { $ as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-SPRI0-SN.js";
|
|
7
7
|
import { $ as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../focusSafely-BS4dllCW.js";
|
|
8
8
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
9
|
-
import { T as Tooltip } from "../../tooltip-
|
|
9
|
+
import { T as Tooltip } from "../../tooltip-Do_imFfg.js";
|
|
10
10
|
function $55f54f7887471b58$export$51e84d46ca0bc451(props, state, ref) {
|
|
11
11
|
const { isSelected } = state;
|
|
12
12
|
const { isPressed, buttonProps } = $701a24aa0da5b062$export$ea18c227d4417cc3({
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnimatedVisibility } from "./components/animated-visibility/animated-visibility.js";
|
|
2
2
|
import { BaseControl } from "./components/base-control/base-control.js";
|
|
3
3
|
import { BreakpointPreview } from "./components/breakpoint-preview/breakpoint-preview.js";
|
|
4
|
-
import { B, a } from "./button-
|
|
4
|
+
import { B, a } from "./button-MFj-FKsM.js";
|
|
5
5
|
import { Checkbox } from "./components/checkbox/checkbox.js";
|
|
6
6
|
import { ComponentToggle } from "./components/component-toggle/component-toggle.js";
|
|
7
7
|
import { ContainerPanel } from "./components/container-panel/container-panel.js";
|
|
@@ -24,7 +24,7 @@ import { MediaPlaceholder } from "./components/placeholders/media-placeholder.js
|
|
|
24
24
|
import { Menu, MenuItem, MenuSection, MenuSeparator, SubMenuItem } from "./components/menu/menu.js";
|
|
25
25
|
import { Notice } from "./components/notice/notice.js";
|
|
26
26
|
import { NumberPicker } from "./components/number-picker/number-picker.js";
|
|
27
|
-
import { P, T } from "./popover-
|
|
27
|
+
import { P, T } from "./popover-CdonDPqG.js";
|
|
28
28
|
import { RadioButton, RadioButtonGroup } from "./components/radio/radio.js";
|
|
29
29
|
import { Repeater } from "./components/repeater/repeater.js";
|
|
30
30
|
import { RepeaterItem } from "./components/repeater/repeater-item.js";
|
|
@@ -45,7 +45,7 @@ import { Tab, TabList, TabPanel, Tabs } from "./components/tabs/tabs.js";
|
|
|
45
45
|
import { Toggle } from "./components/toggle/toggle.js";
|
|
46
46
|
import { Switch } from "./components/toggle/switch.js";
|
|
47
47
|
import { ToggleButton } from "./components/toggle-button/toggle-button.js";
|
|
48
|
-
import { D, T as T2 } from "./tooltip-
|
|
48
|
+
import { D, T as T2 } from "./tooltip-Do_imFfg.js";
|
|
49
49
|
import { VStack } from "./components/layout/vstack.js";
|
|
50
50
|
import { getColumnConfigOutputText } from "./components/slider/utils.js";
|
|
51
51
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { l as $df56164dff5785e2$export$4338b53315abf666, d as $3ef42575df84b30b$export$9d1611c77c2fe928, f as $8ae05eaa5c114e9c$export$7f54fc3180508a52, e as $bdb11010cef70236$export$f680877a34711e37, g as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, n as $ff5963eb1fccf552$export$e08e3b67e392101e, o as $b5e257d569688ac6$export$535bd6ca7f90a273, k as $bdb11010cef70236$export$b4cc09c592e8fdb8, a as $64fa3d84918910a7$export$29f1550f4b0d4415, q as $64fa3d84918910a7$export$45fda7c47f93fd48, t as $64fa3d84918910a7$export$94b6d0abf7d33e8c, r as $64fa3d84918910a7$export$6d3443f2c48bfc20, c as $64fa3d84918910a7$export$4d86445c2cf5e3, j as $64fa3d84918910a7$export$2881499e37b75b9a, s as $64fa3d84918910a7$export$c62b8e45d58ddad9 } from "./utils-Dc35LwuT.js";
|
|
3
3
|
import { d as $4e85f108e88277b8$export$d688439359537581 } from "./RSPContexts-CrNYmadY.js";
|
|
4
|
-
import { b as $dd149f63282afbbf$export$f6211563215e3b37, c as $2a41e45df1593e64$export$d39e1813b3bdd0e1, a as $fc909762b330b746$export$61c6a8c84e605fb6, d as $44f671af83e7d9e0$export$2de4954e8ae13b9f } from "./tooltip-
|
|
4
|
+
import { b as $dd149f63282afbbf$export$f6211563215e3b37, c as $2a41e45df1593e64$export$d39e1813b3bdd0e1, a as $fc909762b330b746$export$61c6a8c84e605fb6, d as $44f671af83e7d9e0$export$2de4954e8ae13b9f } from "./tooltip-Do_imFfg.js";
|
|
5
5
|
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "./filterDOMProps-EDDcM64A.js";
|
|
6
6
|
import React__default, { useRef, useContext, useEffect, useMemo, createContext, useState, forwardRef } from "react";
|
|
7
7
|
import { $ as $62d8ded9296f3872$export$cfa2225e87938781, a as $5e3802645cc19319$export$1c3ebcada18427bf } from "./ariaHideOutside-Zn64-frS.js";
|
|
@@ -14,7 +14,7 @@ import { e as $ae1eeba8b9eafd08$export$5165eccb35aaadb5 } from "./usePress-CScNe
|
|
|
14
14
|
import { $ as $dbSRa$reactdom } from "./index-CAPcSs9K.js";
|
|
15
15
|
import { c as clsx } from "./lite-DVmmD_-j.js";
|
|
16
16
|
import { _ as __ } from "./default-i18n-BqwLkgZv.js";
|
|
17
|
-
import { B as Button } from "./button-
|
|
17
|
+
import { B as Button } from "./button-MFj-FKsM.js";
|
|
18
18
|
const $f1ab8c75478c6f73$export$3351871ee4b288b8 = /* @__PURE__ */ React__default.forwardRef(({ children, ...props }, ref) => {
|
|
19
19
|
let isRegistered = useRef(false);
|
|
20
20
|
let prevContext = useContext($ae1eeba8b9eafd08$export$5165eccb35aaadb5);
|
|
@@ -958,6 +958,7 @@ const Popover = (props) => {
|
|
|
958
958
|
* @param {number} props.offset - Offset from the trigger element, on the same axis as the placement of the popover (e.g. if `placement` is `left`, this controls the horizontal spacing from the element).
|
|
959
959
|
* @param {number} props.crossOffset - Offset from the trigger element, on the opposite axis as the placement of the popover (e.g. if `placement` is `left`, this controls the vertical spacing from the element).
|
|
960
960
|
* @param {number} props.containerPadding - Space that should be left between the popover and the edge of the container (the default container is browser window).
|
|
961
|
+
* @param {boolean} [props.hidden] - If `true`, the component is not rendered.
|
|
961
962
|
*
|
|
962
963
|
* @returns {JSX.Element} The TriggeredPopover component.
|
|
963
964
|
*
|
|
@@ -985,8 +986,12 @@ const TriggeredPopover = (props) => {
|
|
|
985
986
|
offset,
|
|
986
987
|
crossOffset,
|
|
987
988
|
containerPadding,
|
|
989
|
+
hidden,
|
|
988
990
|
...rest
|
|
989
991
|
} = props;
|
|
992
|
+
if (hidden) {
|
|
993
|
+
return null;
|
|
994
|
+
}
|
|
990
995
|
return /* @__PURE__ */ jsxs($de32f1b87079253c$export$2e1e1122cf0cba88, { onOpenChange, children: [
|
|
991
996
|
trigger,
|
|
992
997
|
!trigger && /* @__PURE__ */ jsx(
|
|
@@ -933,9 +933,9 @@ const Tooltip = (props) => {
|
|
|
933
933
|
crossOffset,
|
|
934
934
|
className: ({ isEntering, isExiting }) => clsx(
|
|
935
935
|
"es-uic-group",
|
|
936
|
-
"es-uic-z-20 es-uic-select-none es-uic-rounded-md es-uic-border es-uic-px-1.5 es-uic-py-0.5 es-uic-text-sm es-uic-shadow es-uic-backdrop-blur-
|
|
937
|
-
theme === "light" && "es-uic-border-gray-200 es-uic-bg-white/
|
|
938
|
-
theme === "dark" && "es-uic-border-gray-600 es-uic-bg-black/
|
|
936
|
+
"es-uic-z-20 es-uic-select-none es-uic-rounded-md es-uic-border es-uic-px-1.5 es-uic-py-0.5 es-uic-text-sm es-uic-shadow es-uic-backdrop-blur-3xl es-uic-will-change-[transform,opacity] es-uic-fill-mode-forwards",
|
|
937
|
+
theme === "light" && "es-uic-border-gray-200 es-uic-bg-white/90 es-uic-text-gray-700",
|
|
938
|
+
theme === "dark" && "es-uic-border-gray-600 es-uic-bg-black/80 es-uic-text-gray-100",
|
|
939
939
|
isEntering && "es-uic-duration-300 es-uic-ease-out es-uic-animate-in es-uic-fade-in",
|
|
940
940
|
isEntering && "placement-left:es-uic-slide-in-from-right-0.5 placement-right:es-uic-slide-in-from-left-0.5 placement-top:es-uic-slide-in-from-bottom-0.5 placement-bottom:es-uic-slide-in-from-top-0.5",
|
|
941
941
|
isExiting && "es-uic-duration-150 es-uic-ease-in es-uic-animate-out es-uic-fade-out",
|