@eightshift/ui-components 1.2.0 → 1.2.2
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.
|
@@ -72,10 +72,10 @@ const ContainerPanel = (props) => {
|
|
|
72
72
|
Button,
|
|
73
73
|
{
|
|
74
74
|
onPress: () => setOpen(!open),
|
|
75
|
-
icon: open ? icons.caretDownFill : icons.caretDown,
|
|
75
|
+
icon: (typeof use !== "undefined" ? open && use : open) ? icons.caretDownFill : icons.caretDown,
|
|
76
76
|
type: "ghost",
|
|
77
77
|
size: "small",
|
|
78
|
-
className: clsx("[&>svg]:es-uic-size-5 [&>svg]:es-uic-transition-transform", open && "[&>svg]:-es-uic-scale-y-100"),
|
|
78
|
+
className: clsx("[&>svg]:es-uic-size-5 [&>svg]:es-uic-transition-transform", (typeof use !== "undefined" ? open && use : open) && "[&>svg]:-es-uic-scale-y-100"),
|
|
79
79
|
disabled: typeof use !== "undefined" && !use
|
|
80
80
|
}
|
|
81
81
|
)
|
|
@@ -106,7 +106,7 @@ const ContainerPanel = (props) => {
|
|
|
106
106
|
children
|
|
107
107
|
}
|
|
108
108
|
),
|
|
109
|
-
typeof use !== "undefined" &&
|
|
109
|
+
typeof use !== "undefined" && /* @__PURE__ */ jsx(
|
|
110
110
|
AnimatedVisibility,
|
|
111
111
|
{
|
|
112
112
|
visible: closable ? use && open : use,
|
|
@@ -163,7 +163,8 @@ const ColumnConfigSlider = (props) => {
|
|
|
163
163
|
i === 1 && "!es-uic-translate-x-1/2 !es-uic-translate-y-0 es-uic-self-center es-uic-justify-self-end",
|
|
164
164
|
"es-uic-shadow dragging:es-uic-bg-teal-600 disabled:es-uic-opacity-0",
|
|
165
165
|
"focus-visible:es-uic-ring focus-visible:es-uic-ring-teal-500 focus-visible:es-uic-ring-opacity-50",
|
|
166
|
-
"es-uic-border-teal-600 es-uic-bg-teal-500 es-uic-shadow-teal-600/50"
|
|
166
|
+
"es-uic-border-teal-600 es-uic-bg-teal-500 es-uic-shadow-teal-600/50",
|
|
167
|
+
"hover:es-uic-cursor-grab dragging:es-uic-cursor-grabbing"
|
|
167
168
|
),
|
|
168
169
|
style: {
|
|
169
170
|
gridColumn: `${state.values[i]} / span 1`
|
|
@@ -291,7 +291,8 @@ const Slider = (props) => {
|
|
|
291
291
|
vertical ? "!-es-uic-translate-y-1/2 !es-uic-translate-x-0" : "!-es-uic-translate-x-1/2 !es-uic-translate-y-0",
|
|
292
292
|
"es-uic-shadow dragging:es-uic-bg-teal-600 disabled:es-uic-border-gray-200 disabled:es-uic-bg-gray-100 disabled:es-uic-shadow-none",
|
|
293
293
|
"focus-visible:es-uic-ring focus-visible:es-uic-ring-teal-500 focus-visible:es-uic-ring-opacity-50",
|
|
294
|
-
"es-uic-border-teal-600 es-uic-bg-teal-500 es-uic-shadow-teal-600/50"
|
|
294
|
+
"es-uic-border-teal-600 es-uic-bg-teal-500 es-uic-shadow-teal-600/50",
|
|
295
|
+
"hover:es-uic-cursor-grab dragging:es-uic-cursor-grabbing"
|
|
295
296
|
),
|
|
296
297
|
onFocus: () => {
|
|
297
298
|
if (state.values.length < 2) {
|
|
@@ -61,21 +61,21 @@ const getColumnConfigOutputText = (columns, offset, width, showOuterAsGutter = f
|
|
|
61
61
|
if (offset === 1 && endOffset === columns) {
|
|
62
62
|
return __("Full-width", "eightshift-ui-components");
|
|
63
63
|
}
|
|
64
|
-
if (offset === 1 && endOffset < columns) {
|
|
65
|
-
return sprintf(__("To col %d", "eightshift-ui-components"), showOuterAsGutter ? endOffset - 1 : endOffset);
|
|
66
|
-
}
|
|
67
|
-
if (offset > 1 && endOffset === columns) {
|
|
68
|
-
return sprintf(__("From col %d", "eightshift-ui-components"), showOuterAsGutter ? offset - 1 : offset);
|
|
69
|
-
}
|
|
70
64
|
if (showOuterAsGutter && width === 1 && offset === 1) {
|
|
71
65
|
return __("Start gutter", "eightshift-ui-components");
|
|
72
66
|
}
|
|
73
|
-
if (showOuterAsGutter && endOffset === columns) {
|
|
67
|
+
if (showOuterAsGutter && width === 1 && endOffset === columns) {
|
|
74
68
|
return __("End gutter", "eightshift-ui-components");
|
|
75
69
|
}
|
|
76
70
|
if (width === 1) {
|
|
77
71
|
return sprintf(__("Col %d", "eightshift-ui-components"), offset);
|
|
78
72
|
}
|
|
73
|
+
if (offset === 1 && endOffset < columns) {
|
|
74
|
+
return sprintf(__("To col %d", "eightshift-ui-components"), showOuterAsGutter ? endOffset - 1 : endOffset);
|
|
75
|
+
}
|
|
76
|
+
if (offset > 1 && endOffset === columns) {
|
|
77
|
+
return sprintf(__("From col %d", "eightshift-ui-components"), showOuterAsGutter ? offset - 1 : offset);
|
|
78
|
+
}
|
|
79
79
|
return sprintf(_n("%s col from %s", "%s cols from %s", width, "eightshift-ui-components"), width, showOuterAsGutter ? offset - 1 : offset);
|
|
80
80
|
};
|
|
81
81
|
export {
|