@eightshift/ui-components 1.9.0 → 2.0.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.
Files changed (123) hide show
  1. package/README.md +0 -7
  2. package/dist/{Button-BMFbEXg1.js → Button-OQ5EIPvt.js} +8 -8
  3. package/dist/{SelectionManager-D-89MUJW.js → Collection-CJM_asJz.js} +345 -197
  4. package/dist/{Color-B-cqXgPz.js → Color-B0HgM8f4.js} +1 -1
  5. package/dist/{ColorSwatch-B6s54Jb3.js → ColorSwatch-Dv3Wxdl_.js} +6 -7
  6. package/dist/{ComboBox-VR9-vNZv.js → ComboBox-BnlZjJ3T.js} +21 -22
  7. package/dist/{Dialog-BlYTPzgB.js → Dialog-CIh-hX93.js} +77 -65
  8. package/dist/{FieldError-DKicm3R0.js → FieldError-D7A6s7O5.js} +2 -2
  9. package/dist/{FocusScope-EoLYfbMp.js → FocusScope-Cs5_OoeA.js} +6 -4
  10. package/dist/{Group-D96edUPC.js → Group-D6tr3U_n.js} +5 -6
  11. package/dist/{Heading-GytTjUsy.js → Heading-DiYTXoIW.js} +3 -4
  12. package/dist/{Hidden-D3hHnmPI.js → Hidden-DnOd_jPX.js} +2 -2
  13. package/dist/{Input-BXSxJ_44.js → Input-Se0m3ubj.js} +13 -11
  14. package/dist/{Label-BtoiUpt8.js → Label-Ca9uelsn.js} +4 -5
  15. package/dist/{List-Ct3nzFZG.js → List-Br274SP1.js} +16 -8
  16. package/dist/{ListBox-BMpo-Cem.js → ListBox-D9dFEh5A.js} +36 -23
  17. package/dist/{OverlayArrow-4epQ99-E.js → OverlayArrow-1jx-ZyCR.js} +75 -13
  18. package/dist/{Select-aab027f3.esm-C7BxKjSc.js → Select-aab027f3.esm-HFNIFFya.js} +4 -4
  19. package/dist/{Separator-DUhFmbD-.js → Separator-BhZycTUp.js} +9 -7
  20. package/dist/{Slider-QNPrj4N9.js → Slider-BZNaJylD.js} +20 -24
  21. package/dist/{Text-DNDWaukZ.js → Text-aOUPPvTO.js} +3 -4
  22. package/dist/{VisuallyHidden-BHNhi-ls.js → VisuallyHidden-ClTQo25k.js} +2 -2
  23. package/dist/assets/index.css +37 -0
  24. package/dist/assets/style-editor.css +5287 -0
  25. package/dist/assets/style.css +5293 -1
  26. package/dist/assets/wp-font-enhancements.css +8 -1
  27. package/dist/assets/wp-ui-enhancements.css +299 -1
  28. package/dist/components/animated-visibility/animated-visibility.js +17 -21
  29. package/dist/components/base-control/base-control.js +7 -7
  30. package/dist/components/breakpoint-preview/breakpoint-preview.js +50 -50
  31. package/dist/components/button/button.js +190 -86
  32. package/dist/components/checkbox/checkbox.js +44 -27
  33. package/dist/components/color-pickers/color-picker.js +13 -9
  34. package/dist/components/color-pickers/color-swatch.js +4 -4
  35. package/dist/components/color-pickers/gradient-editor.js +25 -24
  36. package/dist/components/color-pickers/solid-color-picker.js +197 -229
  37. package/dist/components/component-toggle/component-toggle.js +3 -3
  38. package/dist/components/container-panel/container-panel.js +17 -17
  39. package/dist/components/draggable/draggable-handle.js +6 -6
  40. package/dist/components/draggable/draggable.js +1414 -699
  41. package/dist/components/draggable-list/draggable-list-item.js +3 -3
  42. package/dist/components/draggable-list/draggable-list.js +12 -12
  43. package/dist/components/expandable/expandable.js +66 -78
  44. package/dist/components/index.js +2 -3
  45. package/dist/components/input-field/input-field.js +35 -22
  46. package/dist/components/layout/hstack.js +1 -1
  47. package/dist/components/layout/vstack.js +1 -1
  48. package/dist/components/link-input/link-input.js +69 -57
  49. package/dist/components/matrix-align/matrix-align.js +34 -86
  50. package/dist/components/menu/menu.js +22 -23
  51. package/dist/components/modal/modal.js +24 -25
  52. package/dist/components/notice/notice.js +32 -32
  53. package/dist/components/number-picker/number-picker.js +41 -40
  54. package/dist/components/option-select/option-select.js +9 -4
  55. package/dist/components/options-panel/options-panel.js +63 -28
  56. package/dist/components/placeholders/file-placeholder.js +6 -17
  57. package/dist/components/placeholders/image-placeholder.js +17 -17
  58. package/dist/components/placeholders/media-placeholder.js +12 -12
  59. package/dist/components/popover/popover.js +6 -5
  60. package/dist/components/radio/radio.js +60 -43
  61. package/dist/components/repeater/repeater-item.js +10 -10
  62. package/dist/components/repeater/repeater.js +8 -8
  63. package/dist/components/responsive/mini-responsive.js +41 -41
  64. package/dist/components/responsive/responsive-legacy.js +33 -33
  65. package/dist/components/responsive/responsive.js +48 -48
  66. package/dist/components/responsive-preview/responsive-preview.js +4 -4
  67. package/dist/components/rich-label/rich-label.js +13 -11
  68. package/dist/components/select/async-multi-select.js +3 -3
  69. package/dist/components/select/async-single-select.js +2 -2
  70. package/dist/components/select/custom-select-default-components.js +3 -3
  71. package/dist/components/select/multi-select-components.js +1 -1
  72. package/dist/components/select/multi-select.js +3 -3
  73. package/dist/components/select/react-select-component-wrappers.js +1 -1
  74. package/dist/components/select/single-select.js +2 -2
  75. package/dist/components/select/styles.js +21 -21
  76. package/dist/components/select/v2/async-select.js +37 -47
  77. package/dist/components/select/v2/shared.js +8 -8
  78. package/dist/components/select/v2/single-select.js +44 -48
  79. package/dist/components/slider/column-config-slider.js +25 -25
  80. package/dist/components/slider/slider.js +173 -182
  81. package/dist/components/spacer/spacer.js +21 -21
  82. package/dist/components/tabs/tabs.js +111 -63
  83. package/dist/components/toggle/switch.js +27 -21
  84. package/dist/components/toggle/toggle.js +1 -1
  85. package/dist/components/toggle-button/toggle-button.js +160 -83
  86. package/dist/components/tooltip/tooltip.js +25 -28
  87. package/dist/{context-KeRYAbEi.js → context-CDOs-GuR.js} +1 -1
  88. package/dist/{focusSafely-CZY36ssv.js → focusSafely-CiqTTjWy.js} +18 -17
  89. package/dist/icons/icons.js +52 -0
  90. package/dist/{index-641ee5b8.esm-DEB-c58F.js → index-641ee5b8.esm-DbdaYaxR.js} +45 -45
  91. package/dist/index-BRp93Yfa.js +28318 -0
  92. package/dist/index-CcCn9HWX.js +44 -0
  93. package/dist/index.js +2 -3
  94. package/dist/{multi-select-components-DM3GsNfb.js → multi-select-components-CkF3LyTF.js} +4 -4
  95. package/dist/{react-select-async.esm-Bq3N1-Wi.js → react-select-async.esm-DcVLw9X5.js} +3 -3
  96. package/dist/{react-select.esm-B38nY7_U.js → react-select.esm-OZ0cmTjg.js} +3 -3
  97. package/dist/style-editor.js +1 -0
  98. package/dist/style.js +1 -1
  99. package/dist/{textSelection-G2G-nukT.js → textSelection-BlTDSskG.js} +2 -2
  100. package/dist/{useButton-CFtcz1T6.js → useButton-CmLbE5vg.js} +3 -3
  101. package/dist/{useEvent-B0yfN_Zu.js → useEvent-cLDJlznQ.js} +1 -1
  102. package/dist/{useFocusRing-DMAlRYjX.js → useFocusRing-CGp3guTX.js} +1 -1
  103. package/dist/{useFocusable-BlkOMLma.js → useFocusable-087cO5Ct.js} +9 -6
  104. package/dist/{useFormReset-BAEM0o25.js → useFormReset-NpLM2e3G.js} +1 -1
  105. package/dist/{useFormValidation-BNzOc2t9.js → useFormValidation-BWwmZQE2.js} +3 -3
  106. package/dist/{useLabel-D6FSp5_M.js → useLabel-C85N3Hzw.js} +2 -2
  107. package/dist/{useLabels-CraZ2Sej.js → useLabels-C_2wWraB.js} +1 -1
  108. package/dist/{useListState-C3dnPq2F.js → useListState-Z7FB_NzO.js} +1 -1
  109. package/dist/{useLocalizedStringFormatter-B73fhEA7.js → useLocalizedStringFormatter-BQ4TF72x.js} +1 -1
  110. package/dist/{useNumberField-CQP9-nH5.js → useNumberField-Bm6_BVl9.js} +10 -10
  111. package/dist/{useNumberFormatter-Cdctl6fg.js → useNumberFormatter-DlUVKkO7.js} +1 -1
  112. package/dist/{usePress-xTkcGUkt.js → usePress-rg_OQIGW.js} +15 -14
  113. package/dist/{useSingleSelectListState-BGXQSTy7.js → useSingleSelectListState-Cu3xtEJS.js} +2 -2
  114. package/dist/{useToggle-Dpw3WpSw.js → useToggle-DzlgBLAJ.js} +4 -4
  115. package/dist/{useToggleState-BSKwCUIW.js → useToggleState-DhSBQxkp.js} +1 -1
  116. package/dist/{utils-BSLBwuuO.js → utils-39D0mStj.js} +41 -93
  117. package/package.json +43 -41
  118. package/dist/GeistMonoVF.woff2 +0 -0
  119. package/dist/GeistVF.woff2 +0 -0
  120. package/dist/assets/fonts.css +0 -1
  121. package/dist/components/list-box/list-box.js +0 -157
  122. package/dist/fonts.js +0 -1
  123. package/dist/index-BYHhzLf-.js +0 -444
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { forwardRef, useContext, useLayoutEffect, useRef, useState, useMemo, useCallback, createContext } from "react";
3
- import { r as reactDomExports } from "./index-BYHhzLf-.js";
3
+ import { r as reactDomExports } from "./index-BRp93Yfa.js";
4
4
  function _typeof(o) {
5
5
  "@babel/helpers - typeof";
6
6
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
@@ -98,7 +98,7 @@ function _objectWithoutPropertiesLoose(r, e) {
98
98
  if (null == r) return {};
99
99
  var t = {};
100
100
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
101
- if (e.includes(n)) continue;
101
+ if (-1 !== e.indexOf(n)) continue;
102
102
  t[n] = r[n];
103
103
  }
104
104
  return t;
@@ -107,8 +107,8 @@ function _objectWithoutProperties(e, t) {
107
107
  if (null == e) return {};
108
108
  var o, r, i = _objectWithoutPropertiesLoose(e, t);
109
109
  if (Object.getOwnPropertySymbols) {
110
- var s = Object.getOwnPropertySymbols(e);
111
- for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
110
+ var n = Object.getOwnPropertySymbols(e);
111
+ for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
112
112
  }
113
113
  return i;
114
114
  }
@@ -121,7 +121,6 @@ function _extends() {
121
121
  return n;
122
122
  }, _extends.apply(null, arguments);
123
123
  }
124
- var isDevelopment$2 = false;
125
124
  function sheetForTag(tag) {
126
125
  if (tag.sheet) {
127
126
  return tag.sheet;
@@ -162,7 +161,7 @@ var StyleSheet = /* @__PURE__ */ function() {
162
161
  _this.container.insertBefore(tag, before);
163
162
  _this.tags.push(tag);
164
163
  };
165
- this.isSpeedy = options2.speedy === void 0 ? !isDevelopment$2 : options2.speedy;
164
+ this.isSpeedy = options2.speedy === void 0 ? true : options2.speedy;
166
165
  this.tags = [];
167
166
  this.ctr = 0;
168
167
  this.nonce = options2.nonce;
@@ -1394,7 +1393,6 @@ var unitlessKeys = {
1394
1393
  strokeOpacity: 1,
1395
1394
  strokeWidth: 1
1396
1395
  };
1397
- var isDevelopment$1 = false;
1398
1396
  var hyphenateRegex = /[A-Z]|^ms/g;
1399
1397
  var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
1400
1398
  var isCustomProperty = function isCustomProperty2(property) {
@@ -1427,7 +1425,6 @@ var processStyleValue = function processStyleValue2(key, value) {
1427
1425
  }
1428
1426
  return value;
1429
1427
  };
1430
- var noComponentSelectorMessage = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";
1431
1428
  function handleInterpolation(mergedProps, registered, interpolation) {
1432
1429
  if (interpolation == null) {
1433
1430
  return "";
@@ -1498,9 +1495,6 @@ function createStringFromObject(mergedProps, registered, obj) {
1498
1495
  string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
1499
1496
  }
1500
1497
  } else {
1501
- if (key === "NO_COMPONENT_SELECTOR" && isDevelopment$1) {
1502
- throw new Error(noComponentSelectorMessage);
1503
- }
1504
1498
  if (Array.isArray(value) && typeof value[0] === "string" && registered == null) {
1505
1499
  for (var _i = 0; _i < value.length; _i++) {
1506
1500
  if (isProcessableValue(value[_i])) {
@@ -1567,7 +1561,6 @@ var syncFallback = function syncFallback2(create) {
1567
1561
  };
1568
1562
  var useInsertionEffect = React["useInsertionEffect"] ? React["useInsertionEffect"] : false;
1569
1563
  var useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;
1570
- var isDevelopment = false;
1571
1564
  var EmotionCacheContext = /* @__PURE__ */ React.createContext(
1572
1565
  // we're doing this to avoid preconstruct's dead code elimination in this one case
1573
1566
  // because this module is primarily intended for the browser and node
@@ -1624,7 +1617,7 @@ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
1624
1617
  className += cache.key + "-" + serialized.name;
1625
1618
  var newProps = {};
1626
1619
  for (var _key2 in props) {
1627
- if (hasOwn.call(props, _key2) && _key2 !== "css" && _key2 !== typePropName && !isDevelopment) {
1620
+ if (hasOwn.call(props, _key2) && _key2 !== "css" && _key2 !== typePropName && true) {
1628
1621
  newProps[_key2] = props[_key2];
1629
1622
  }
1630
1623
  }
@@ -1657,7 +1650,7 @@ var jsx = function jsx2(type, props) {
1657
1650
  var JSX;
1658
1651
  /* @__PURE__ */ (function(_JSX) {
1659
1652
  })(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
1660
- })(jsx || (jsx = {}));
1653
+ })(jsx);
1661
1654
  function css$2() {
1662
1655
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1663
1656
  args[_key] = arguments[_key];
@@ -1918,6 +1911,9 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
1918
1911
  y
1919
1912
  });
1920
1913
  }
1914
+ function rectsAreEqual(a, b) {
1915
+ return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
1916
+ }
1921
1917
  function observeMove(element, onMove) {
1922
1918
  let io = null;
1923
1919
  let timeoutId;
@@ -1936,12 +1932,13 @@ function observeMove(element, onMove) {
1936
1932
  threshold = 1;
1937
1933
  }
1938
1934
  cleanup();
1935
+ const elementRectForRootMargin = element.getBoundingClientRect();
1939
1936
  const {
1940
1937
  left,
1941
1938
  top,
1942
1939
  width,
1943
1940
  height
1944
- } = element.getBoundingClientRect();
1941
+ } = elementRectForRootMargin;
1945
1942
  if (!skip) {
1946
1943
  onMove();
1947
1944
  }
@@ -1972,6 +1969,9 @@ function observeMove(element, onMove) {
1972
1969
  refresh(false, ratio);
1973
1970
  }
1974
1971
  }
1972
+ if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
1973
+ refresh();
1974
+ }
1975
1975
  isFirstUpdate = false;
1976
1976
  }
1977
1977
  try {
@@ -2035,7 +2035,7 @@ function autoUpdate(reference, floating, update, options2) {
2035
2035
  }
2036
2036
  function frameLoop() {
2037
2037
  const nextRefRect = getBoundingClientRect(reference);
2038
- if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
2038
+ if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
2039
2039
  update();
2040
2040
  }
2041
2041
  prevRefRect = nextRefRect;
@@ -3084,28 +3084,28 @@ var defaultComponents = function defaultComponents2(props) {
3084
3084
  return _objectSpread2(_objectSpread2({}, components), props.components);
3085
3085
  };
3086
3086
  export {
3087
- css$1 as A,
3088
- dropdownIndicatorCSS as B,
3089
- groupCSS as C,
3090
- groupHeadingCSS as D,
3091
- indicatorsContainerCSS as E,
3092
- indicatorSeparatorCSS as F,
3093
- inputCSS as G,
3094
- loadingIndicatorCSS as H,
3095
- loadingMessageCSS as I,
3096
- menuCSS as J,
3097
- menuListCSS as K,
3098
- menuPortalCSS as L,
3099
- MenuPlacer as M,
3100
- multiValueCSS as N,
3101
- multiValueLabelCSS as O,
3102
- multiValueRemoveCSS as P,
3103
- noOptionsMessageCSS as Q,
3104
- optionCSS as R,
3105
- placeholderCSS as S,
3106
- css2 as T,
3107
- valueContainerCSS as U,
3108
- notNullish as V,
3087
+ indicatorSeparatorCSS as A,
3088
+ inputCSS as B,
3089
+ loadingIndicatorCSS as C,
3090
+ loadingMessageCSS as D,
3091
+ menuCSS as E,
3092
+ menuListCSS as F,
3093
+ menuPortalCSS as G,
3094
+ multiValueCSS as H,
3095
+ multiValueLabelCSS as I,
3096
+ multiValueRemoveCSS as J,
3097
+ noOptionsMessageCSS as K,
3098
+ optionCSS as L,
3099
+ placeholderCSS as M,
3100
+ css2 as N,
3101
+ valueContainerCSS as O,
3102
+ notNullish as P,
3103
+ scrollIntoView as Q,
3104
+ noop as R,
3105
+ MenuPlacer as S,
3106
+ removeProps as T,
3107
+ jsx as U,
3108
+ css$2 as V,
3109
3109
  supportsPassiveEvents as W,
3110
3110
  _extends as _,
3111
3111
  _objectWithoutProperties as a,
@@ -3124,14 +3124,14 @@ export {
3124
3124
  defaultComponents as n,
3125
3125
  isDocumentElement as o,
3126
3126
  cleanValue as p,
3127
- scrollIntoView as q,
3128
- noop as r,
3127
+ clearIndicatorCSS as q,
3128
+ containerCSS as r,
3129
3129
  singleValueAsValue as s,
3130
3130
  toPropertyKey as t,
3131
- removeProps as u,
3131
+ css$1 as u,
3132
3132
  valueTernary as v,
3133
- jsx as w,
3134
- css$2 as x,
3135
- clearIndicatorCSS as y,
3136
- containerCSS as z
3133
+ dropdownIndicatorCSS as w,
3134
+ groupCSS as x,
3135
+ groupHeadingCSS as y,
3136
+ indicatorsContainerCSS as z
3137
3137
  };