@eightshift/ui-components 1.2.0 → 1.2.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.
@@ -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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eightshift/ui-components",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",