@superblocksteam/library 2.0.0-next.104 → 2.0.0-next.106

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 (54) hide show
  1. package/dist/{allPaths-CFupmz0n.js → allPaths-BuzU0kMz.js} +2 -2
  2. package/dist/{allPaths-CFupmz0n.js.map → allPaths-BuzU0kMz.js.map} +1 -1
  3. package/dist/{allPaths-DXhCHwqA.js → allPaths-guYcin1A.js} +2 -2
  4. package/dist/{allPaths-DXhCHwqA.js.map → allPaths-guYcin1A.js.map} +1 -1
  5. package/dist/{allPathsLoader-BNlRJuEf.js → allPathsLoader-C1K3ZeiQ.js} +3 -3
  6. package/dist/{allPathsLoader-DSzl66vm.js.map → allPathsLoader-C1K3ZeiQ.js.map} +1 -1
  7. package/dist/{allPathsLoader-DSzl66vm.js → allPathsLoader-C6jGHolR.js} +3 -3
  8. package/dist/{allPathsLoader-BNlRJuEf.js.map → allPathsLoader-C6jGHolR.js.map} +1 -1
  9. package/dist/{index--WgLdVs1.js → index-ctuNjk-c.js} +256 -122
  10. package/dist/{index--WgLdVs1.js.map → index-ctuNjk-c.js.map} +1 -1
  11. package/dist/index.css +2 -1
  12. package/dist/index.js +2 -2
  13. package/dist/{splitPathsBySizeLoader-D_NFLN6H.js → splitPathsBySizeLoader-C5GPcg6J.js} +2 -2
  14. package/dist/{splitPathsBySizeLoader-D_NFLN6H.js.map → splitPathsBySizeLoader-C5GPcg6J.js.map} +1 -1
  15. package/dist/{splitPathsBySizeLoader-BEDIEt1Q.js → splitPathsBySizeLoader-DCKSQVMB.js} +2 -2
  16. package/dist/{splitPathsBySizeLoader-BEDIEt1Q.js.map → splitPathsBySizeLoader-DCKSQVMB.js.map} +1 -1
  17. package/dist-types/lib/internal-details/component-suspense-style-context.d.ts +10 -0
  18. package/dist-types/lib/internal-details/css-constants.d.ts +4 -0
  19. package/dist-types/lib/internal-details/lib/suspense/suspense-fallback.d.ts +10 -0
  20. package/dist-types/lib/internal-details/reactive-component.d.ts +4 -3
  21. package/dist-types/lib/internal-details/remove-bindings.d.ts +1 -0
  22. package/dist-types/lib/user-facing/components/button/index.d.ts +1 -1
  23. package/dist-types/lib/user-facing/components/button/props.d.ts +1 -1
  24. package/dist-types/lib/user-facing/components/checkbox/index.d.ts +1 -1
  25. package/dist-types/lib/user-facing/components/checkbox/props.d.ts +1 -1
  26. package/dist-types/lib/user-facing/components/column/index.d.ts +1 -0
  27. package/dist-types/lib/user-facing/components/column/props.d.ts +1 -0
  28. package/dist-types/lib/user-facing/components/container/index.d.ts +2 -1
  29. package/dist-types/lib/user-facing/components/container/props.d.ts +1 -0
  30. package/dist-types/lib/user-facing/components/date-picker/index.d.ts +1 -0
  31. package/dist-types/lib/user-facing/components/date-picker/props.d.ts +1 -0
  32. package/dist-types/lib/user-facing/components/dropdown/index.d.ts +1 -1
  33. package/dist-types/lib/user-facing/components/dropdown/props.d.ts +1 -1
  34. package/dist-types/lib/user-facing/components/icon/index.d.ts +1 -1
  35. package/dist-types/lib/user-facing/components/icon/props.d.ts +1 -1
  36. package/dist-types/lib/user-facing/components/image/index.d.ts +1 -1
  37. package/dist-types/lib/user-facing/components/image/props.d.ts +1 -1
  38. package/dist-types/lib/user-facing/components/input/index.d.ts +1 -1
  39. package/dist-types/lib/user-facing/components/input/props.d.ts +1 -1
  40. package/dist-types/lib/user-facing/components/key-value/props.d.ts +1 -0
  41. package/dist-types/lib/user-facing/components/modal/index.d.ts +1 -0
  42. package/dist-types/lib/user-facing/components/modal/props.d.ts +1 -0
  43. package/dist-types/lib/user-facing/components/page/index.d.ts +3 -0
  44. package/dist-types/lib/user-facing/components/page/props.d.ts +3 -0
  45. package/dist-types/lib/user-facing/components/section/index.d.ts +1 -0
  46. package/dist-types/lib/user-facing/components/section/props.d.ts +1 -0
  47. package/dist-types/lib/user-facing/components/slideout/props.d.ts +5 -1
  48. package/dist-types/lib/user-facing/components/stack/index.d.ts +3 -1
  49. package/dist-types/lib/user-facing/components/table/index.d.ts +1 -1
  50. package/dist-types/lib/user-facing/components/table/props.d.ts +1 -1
  51. package/dist-types/lib/user-facing/components/text/index.d.ts +1 -1
  52. package/dist-types/lib/user-facing/components/text/props.d.ts +1 -1
  53. package/dist-types/lib/user-facing/properties-panel/mixins/loading.d.ts +2 -0
  54. package/package.json +2 -2
@@ -2684,14 +2684,14 @@ function getLoaderFn$1(options) {
2684
2684
  if (!(loader === "all")) return [3, 3];
2685
2685
  return [4, import(
2686
2686
  /* webpackChunkName: "blueprint-icons-all-paths-loader" */
2687
- "./allPathsLoader-DSzl66vm.js"
2687
+ "./allPathsLoader-C1K3ZeiQ.js"
2688
2688
  )];
2689
2689
  case 2:
2690
2690
  return [2, _b2.sent().allPathsLoader];
2691
2691
  case 3:
2692
2692
  return [4, import(
2693
2693
  /* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
2694
- "./splitPathsBySizeLoader-D_NFLN6H.js"
2694
+ "./splitPathsBySizeLoader-C5GPcg6J.js"
2695
2695
  )];
2696
2696
  case 4:
2697
2697
  return [2, _b2.sent().splitPathsBySizeLoader];
@@ -3155,19 +3155,19 @@ var AnchorButton$1 = React.forwardRef(function(props2, ref2) {
3155
3155
  AnchorButton$1.displayName = "".concat(DISPLAYNAME_PREFIX$1, ".AnchorButton");
3156
3156
  function useSharedButtonAttributes$1(props2, ref2, options) {
3157
3157
  var _a2;
3158
- var alignText = props2.alignText, fill = props2.fill, large = props2.large, _b2 = props2.loading, loading = _b2 === void 0 ? false : _b2, minimal = props2.minimal, outlined = props2.outlined, small = props2.small;
3159
- var disabled = props2.disabled || loading;
3158
+ var alignText = props2.alignText, fill = props2.fill, large = props2.large, _b2 = props2.loading, loading2 = _b2 === void 0 ? false : _b2, minimal = props2.minimal, outlined = props2.outlined, small = props2.small;
3159
+ var disabled = props2.disabled || loading2;
3160
3160
  var _c2 = useInteractiveAttributes$1(!disabled, props2, ref2, options), active = _c2[0], interactiveProps = _c2[1];
3161
- var className = classNames(BUTTON$1, (_a2 = {}, _a2[ACTIVE$1] = active, _a2[DISABLED$1] = disabled, _a2[FILL$1] = fill, _a2[LARGE$1] = large, _a2[LOADING$1] = loading, _a2[MINIMAL$1] = minimal, _a2[OUTLINED$1] = outlined, _a2[SMALL$1] = small, _a2), alignmentClass$1(alignText), intentClass$1(props2.intent), props2.className);
3161
+ var className = classNames(BUTTON$1, (_a2 = {}, _a2[ACTIVE$1] = active, _a2[DISABLED$1] = disabled, _a2[FILL$1] = fill, _a2[LARGE$1] = large, _a2[LOADING$1] = loading2, _a2[MINIMAL$1] = minimal, _a2[OUTLINED$1] = outlined, _a2[SMALL$1] = small, _a2), alignmentClass$1(alignText), intentClass$1(props2.intent), props2.className);
3162
3162
  return __assign$2(__assign$2({}, interactiveProps), { className, disabled });
3163
3163
  }
3164
3164
  function renderButtonContents$1(props2) {
3165
- var children = props2.children, ellipsizeText = props2.ellipsizeText, icon = props2.icon, loading = props2.loading, rightIcon = props2.rightIcon, text = props2.text, textClassName = props2.textClassName;
3165
+ var children = props2.children, ellipsizeText = props2.ellipsizeText, icon = props2.icon, loading2 = props2.loading, rightIcon = props2.rightIcon, text = props2.text, textClassName = props2.textClassName;
3166
3166
  var hasTextContent = !isReactNodeEmpty$1(text) || !isReactNodeEmpty$1(children);
3167
3167
  return React.createElement(
3168
3168
  React.Fragment,
3169
3169
  null,
3170
- loading && React.createElement(Spinner$1, { key: "loading", className: BUTTON_SPINNER$1, size: SpinnerSize$1.SMALL }),
3170
+ loading2 && React.createElement(Spinner$1, { key: "loading", className: BUTTON_SPINNER$1, size: SpinnerSize$1.SMALL }),
3171
3171
  React.createElement(Icon$3, { key: "leftIcon", icon }),
3172
3172
  hasTextContent && React.createElement(
3173
3173
  Text$1,
@@ -65441,7 +65441,7 @@ function isMultiple(mode) {
65441
65441
  }
65442
65442
  var BaseSelect = /* @__PURE__ */ React.forwardRef(function(props2, ref2) {
65443
65443
  var _customizeRawInputEle, _classNames2;
65444
- var id2 = props2.id, prefixCls = props2.prefixCls, className = props2.className, showSearch = props2.showSearch, tagRender = props2.tagRender, direction = props2.direction, omitDomProps = props2.omitDomProps, displayValues = props2.displayValues, onDisplayValuesChange = props2.onDisplayValuesChange, emptyOptions = props2.emptyOptions, _props$notFoundConten = props2.notFoundContent, notFoundContent = _props$notFoundConten === void 0 ? "Not Found" : _props$notFoundConten, onClear = props2.onClear, mode = props2.mode, disabled = props2.disabled, loading = props2.loading, getInputElement = props2.getInputElement, getRawInputElement = props2.getRawInputElement, open = props2.open, defaultOpen = props2.defaultOpen, onDropdownVisibleChange = props2.onDropdownVisibleChange, activeValue = props2.activeValue, onActiveValueChange = props2.onActiveValueChange, activeDescendantId = props2.activeDescendantId, searchValue = props2.searchValue, autoClearSearchValue = props2.autoClearSearchValue, onSearch = props2.onSearch, onSearchSplit = props2.onSearchSplit, tokenSeparators = props2.tokenSeparators, allowClear = props2.allowClear, showArrow = props2.showArrow, inputIcon = props2.inputIcon, clearIcon = props2.clearIcon, OptionList3 = props2.OptionList, animation = props2.animation, transitionName2 = props2.transitionName, dropdownStyle = props2.dropdownStyle, dropdownClassName = props2.dropdownClassName, dropdownMatchSelectWidth = props2.dropdownMatchSelectWidth, dropdownRender = props2.dropdownRender, dropdownAlign = props2.dropdownAlign, placement = props2.placement, getPopupContainer = props2.getPopupContainer, _props$showAction = props2.showAction, showAction = _props$showAction === void 0 ? [] : _props$showAction, onFocus = props2.onFocus, onBlur = props2.onBlur, onKeyUp = props2.onKeyUp, onKeyDown = props2.onKeyDown, onMouseDown = props2.onMouseDown, restProps = _objectWithoutProperties(props2, _excluded$l);
65444
+ var id2 = props2.id, prefixCls = props2.prefixCls, className = props2.className, showSearch = props2.showSearch, tagRender = props2.tagRender, direction = props2.direction, omitDomProps = props2.omitDomProps, displayValues = props2.displayValues, onDisplayValuesChange = props2.onDisplayValuesChange, emptyOptions = props2.emptyOptions, _props$notFoundConten = props2.notFoundContent, notFoundContent = _props$notFoundConten === void 0 ? "Not Found" : _props$notFoundConten, onClear = props2.onClear, mode = props2.mode, disabled = props2.disabled, loading2 = props2.loading, getInputElement = props2.getInputElement, getRawInputElement = props2.getRawInputElement, open = props2.open, defaultOpen = props2.defaultOpen, onDropdownVisibleChange = props2.onDropdownVisibleChange, activeValue = props2.activeValue, onActiveValueChange = props2.onActiveValueChange, activeDescendantId = props2.activeDescendantId, searchValue = props2.searchValue, autoClearSearchValue = props2.autoClearSearchValue, onSearch = props2.onSearch, onSearchSplit = props2.onSearchSplit, tokenSeparators = props2.tokenSeparators, allowClear = props2.allowClear, showArrow = props2.showArrow, inputIcon = props2.inputIcon, clearIcon = props2.clearIcon, OptionList3 = props2.OptionList, animation = props2.animation, transitionName2 = props2.transitionName, dropdownStyle = props2.dropdownStyle, dropdownClassName = props2.dropdownClassName, dropdownMatchSelectWidth = props2.dropdownMatchSelectWidth, dropdownRender = props2.dropdownRender, dropdownAlign = props2.dropdownAlign, placement = props2.placement, getPopupContainer = props2.getPopupContainer, _props$showAction = props2.showAction, showAction = _props$showAction === void 0 ? [] : _props$showAction, onFocus = props2.onFocus, onBlur = props2.onBlur, onKeyUp = props2.onKeyUp, onKeyDown = props2.onKeyDown, onMouseDown = props2.onMouseDown, restProps = _objectWithoutProperties(props2, _excluded$l);
65445
65445
  var multiple = isMultiple(mode);
65446
65446
  var mergedShowSearch = (showSearch !== void 0 ? showSearch : multiple) || mode === "combobox";
65447
65447
  var domProps = _objectSpread2$1({}, restProps);
@@ -65708,14 +65708,14 @@ var BaseSelect = /* @__PURE__ */ React.forwardRef(function(props2, ref2) {
65708
65708
  toggleOpen: onToggleOpen
65709
65709
  });
65710
65710
  }, [props2, notFoundContent, triggerOpen, mergedOpen, id2, mergedShowSearch, multiple, onToggleOpen]);
65711
- var mergedShowArrow = showArrow !== void 0 ? showArrow : loading || !multiple && mode !== "combobox";
65711
+ var mergedShowArrow = showArrow !== void 0 ? showArrow : loading2 || !multiple && mode !== "combobox";
65712
65712
  var arrowNode;
65713
65713
  if (mergedShowArrow) {
65714
65714
  arrowNode = /* @__PURE__ */ React.createElement(TransBtn, {
65715
- className: classNames("".concat(prefixCls, "-arrow"), _defineProperty$3({}, "".concat(prefixCls, "-arrow-loading"), loading)),
65715
+ className: classNames("".concat(prefixCls, "-arrow"), _defineProperty$3({}, "".concat(prefixCls, "-arrow-loading"), loading2)),
65716
65716
  customizeIcon: inputIcon,
65717
65717
  customizeIconProps: {
65718
- loading,
65718
+ loading: loading2,
65719
65719
  searchValue: mergedSearchValue,
65720
65720
  open: mergedOpen,
65721
65721
  focused: mockFocused,
@@ -65744,7 +65744,7 @@ var BaseSelect = /* @__PURE__ */ React.forwardRef(function(props2, ref2) {
65744
65744
  var optionList = /* @__PURE__ */ React.createElement(OptionList3, {
65745
65745
  ref: listRef
65746
65746
  });
65747
- var mergedClassName = classNames(prefixCls, className, (_classNames2 = {}, _defineProperty$3(_classNames2, "".concat(prefixCls, "-focused"), mockFocused), _defineProperty$3(_classNames2, "".concat(prefixCls, "-multiple"), multiple), _defineProperty$3(_classNames2, "".concat(prefixCls, "-single"), !multiple), _defineProperty$3(_classNames2, "".concat(prefixCls, "-allow-clear"), allowClear), _defineProperty$3(_classNames2, "".concat(prefixCls, "-show-arrow"), mergedShowArrow), _defineProperty$3(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _defineProperty$3(_classNames2, "".concat(prefixCls, "-loading"), loading), _defineProperty$3(_classNames2, "".concat(prefixCls, "-open"), mergedOpen), _defineProperty$3(_classNames2, "".concat(prefixCls, "-customize-input"), customizeInputElement), _defineProperty$3(_classNames2, "".concat(prefixCls, "-show-search"), mergedShowSearch), _classNames2));
65747
+ var mergedClassName = classNames(prefixCls, className, (_classNames2 = {}, _defineProperty$3(_classNames2, "".concat(prefixCls, "-focused"), mockFocused), _defineProperty$3(_classNames2, "".concat(prefixCls, "-multiple"), multiple), _defineProperty$3(_classNames2, "".concat(prefixCls, "-single"), !multiple), _defineProperty$3(_classNames2, "".concat(prefixCls, "-allow-clear"), allowClear), _defineProperty$3(_classNames2, "".concat(prefixCls, "-show-arrow"), mergedShowArrow), _defineProperty$3(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _defineProperty$3(_classNames2, "".concat(prefixCls, "-loading"), loading2), _defineProperty$3(_classNames2, "".concat(prefixCls, "-open"), mergedOpen), _defineProperty$3(_classNames2, "".concat(prefixCls, "-customize-input"), customizeInputElement), _defineProperty$3(_classNames2, "".concat(prefixCls, "-show-search"), mergedShowSearch), _classNames2));
65748
65748
  var selectorNode = /* @__PURE__ */ React.createElement(RefSelectTrigger, {
65749
65749
  ref: triggerRef,
65750
65750
  disabled,
@@ -71254,7 +71254,7 @@ if (define_process_env_default$X.NODE_ENV !== "production") {
71254
71254
  RefIcon$c.displayName = "SearchOutlined";
71255
71255
  }
71256
71256
  function getIcons(_ref2) {
71257
- var suffixIcon = _ref2.suffixIcon, clearIcon = _ref2.clearIcon, menuItemSelectedIcon = _ref2.menuItemSelectedIcon, removeIcon = _ref2.removeIcon, loading = _ref2.loading, multiple = _ref2.multiple, hasFeedback = _ref2.hasFeedback, prefixCls = _ref2.prefixCls, showArrow = _ref2.showArrow, feedbackIcon = _ref2.feedbackIcon;
71257
+ var suffixIcon = _ref2.suffixIcon, clearIcon = _ref2.clearIcon, menuItemSelectedIcon = _ref2.menuItemSelectedIcon, removeIcon = _ref2.removeIcon, loading2 = _ref2.loading, multiple = _ref2.multiple, hasFeedback = _ref2.hasFeedback, prefixCls = _ref2.prefixCls, showArrow = _ref2.showArrow, feedbackIcon = _ref2.feedbackIcon;
71258
71258
  var mergedClearIcon = clearIcon !== null && clearIcon !== void 0 ? clearIcon : /* @__PURE__ */ React.createElement(RefIcon$n, null);
71259
71259
  var getSuffixIconNode = function getSuffixIconNode2(arrowIcon) {
71260
71260
  return /* @__PURE__ */ React.createElement(React.Fragment, null, showArrow !== false && arrowIcon, hasFeedback && feedbackIcon);
@@ -71262,7 +71262,7 @@ function getIcons(_ref2) {
71262
71262
  var mergedSuffixIcon = null;
71263
71263
  if (suffixIcon !== void 0) {
71264
71264
  mergedSuffixIcon = getSuffixIconNode(suffixIcon);
71265
- } else if (loading) {
71265
+ } else if (loading2) {
71266
71266
  mergedSuffixIcon = getSuffixIconNode(/* @__PURE__ */ React.createElement(RefIcon$k, {
71267
71267
  spin: true
71268
71268
  }));
@@ -74611,8 +74611,8 @@ var getRealWidth = function getRealWidth2(node2) {
74611
74611
  };
74612
74612
  };
74613
74613
  var LoadingIcon$1 = function LoadingIcon(_ref2) {
74614
- var prefixCls = _ref2.prefixCls, loading = _ref2.loading, existIcon = _ref2.existIcon;
74615
- var visible2 = !!loading;
74614
+ var prefixCls = _ref2.prefixCls, loading2 = _ref2.loading, existIcon = _ref2.existIcon;
74615
+ var visible2 = !!loading2;
74616
74616
  if (existIcon) {
74617
74617
  return /* @__PURE__ */ React__default.createElement("span", {
74618
74618
  className: "".concat(prefixCls, "-loading-icon")
@@ -74709,12 +74709,12 @@ function convertLegacyProps(type5) {
74709
74709
  }
74710
74710
  var InternalButton = function InternalButton2(props2, ref2) {
74711
74711
  var _classNames;
74712
- var _props$loading = props2.loading, loading = _props$loading === void 0 ? false : _props$loading, customizePrefixCls = props2.prefixCls, _props$type = props2.type, type5 = _props$type === void 0 ? "default" : _props$type, danger = props2.danger, _props$shape = props2.shape, shape = _props$shape === void 0 ? "default" : _props$shape, customizeSize = props2.size, customDisabled = props2.disabled, className = props2.className, children = props2.children, icon = props2.icon, _props$ghost = props2.ghost, ghost = _props$ghost === void 0 ? false : _props$ghost, _props$block = props2.block, block = _props$block === void 0 ? false : _props$block, _props$htmlType = props2.htmlType, htmlType = _props$htmlType === void 0 ? "button" : _props$htmlType, rest = __rest$l(props2, ["loading", "prefixCls", "type", "danger", "shape", "size", "disabled", "className", "children", "icon", "ghost", "block", "htmlType"]);
74712
+ var _props$loading = props2.loading, loading2 = _props$loading === void 0 ? false : _props$loading, customizePrefixCls = props2.prefixCls, _props$type = props2.type, type5 = _props$type === void 0 ? "default" : _props$type, danger = props2.danger, _props$shape = props2.shape, shape = _props$shape === void 0 ? "default" : _props$shape, customizeSize = props2.size, customDisabled = props2.disabled, className = props2.className, children = props2.children, icon = props2.icon, _props$ghost = props2.ghost, ghost = _props$ghost === void 0 ? false : _props$ghost, _props$block = props2.block, block = _props$block === void 0 ? false : _props$block, _props$htmlType = props2.htmlType, htmlType = _props$htmlType === void 0 ? "button" : _props$htmlType, rest = __rest$l(props2, ["loading", "prefixCls", "type", "danger", "shape", "size", "disabled", "className", "children", "icon", "ghost", "block", "htmlType"]);
74713
74713
  var size2 = React.useContext(SizeContext$1);
74714
74714
  var disabled = React.useContext(DisabledContext$1);
74715
74715
  var mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
74716
74716
  var groupSize = React.useContext(GroupSizeContext);
74717
- var _React$useState = React.useState(!!loading), _React$useState2 = _slicedToArray(_React$useState, 2), innerLoading = _React$useState2[0], setLoading = _React$useState2[1];
74717
+ var _React$useState = React.useState(!!loading2), _React$useState2 = _slicedToArray(_React$useState, 2), innerLoading = _React$useState2[0], setLoading = _React$useState2[1];
74718
74718
  var _React$useState3 = React.useState(false), _React$useState4 = _slicedToArray(_React$useState3, 2), hasTwoCNChar = _React$useState4[0], setHasTwoCNChar = _React$useState4[1];
74719
74719
  var _React$useContext = React.useContext(ConfigContext), getPrefixCls = _React$useContext.getPrefixCls, autoInsertSpaceInButton = _React$useContext.autoInsertSpaceInButton, direction = _React$useContext.direction;
74720
74720
  var buttonRef = ref2 || /* @__PURE__ */ React.createRef();
@@ -74734,7 +74734,7 @@ var InternalButton = function InternalButton2(props2, ref2) {
74734
74734
  setHasTwoCNChar(false);
74735
74735
  }
74736
74736
  };
74737
- var loadingOrDelay = typeof loading === "boolean" ? loading : (loading === null || loading === void 0 ? void 0 : loading.delay) || true;
74737
+ var loadingOrDelay = typeof loading2 === "boolean" ? loading2 : (loading2 === null || loading2 === void 0 ? void 0 : loading2.delay) || true;
74738
74738
  React.useEffect(function() {
74739
74739
  var delayTimer = null;
74740
74740
  if (typeof loadingOrDelay === "number") {
@@ -74962,7 +74962,7 @@ var __rest$j = function(s3, e3) {
74962
74962
  };
74963
74963
  var DropdownButton = function DropdownButton2(props2) {
74964
74964
  var _React$useContext = React.useContext(ConfigContext), getContextPopupContainer = _React$useContext.getPopupContainer, getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction;
74965
- var customizePrefixCls = props2.prefixCls, _props$type = props2.type, type5 = _props$type === void 0 ? "default" : _props$type, danger = props2.danger, disabled = props2.disabled, loading = props2.loading, onClick = props2.onClick, htmlType = props2.htmlType, children = props2.children, className = props2.className, menu = props2.menu, arrow2 = props2.arrow, autoFocus = props2.autoFocus, overlay = props2.overlay, trigger2 = props2.trigger, align = props2.align, visible2 = props2.visible, open = props2.open, onVisibleChange = props2.onVisibleChange, onOpenChange = props2.onOpenChange, placement = props2.placement, getPopupContainer = props2.getPopupContainer, href2 = props2.href, _props$icon = props2.icon, icon = _props$icon === void 0 ? /* @__PURE__ */ React.createElement(RefIcon$b, null) : _props$icon, title = props2.title, _props$buttonsRender = props2.buttonsRender, buttonsRender = _props$buttonsRender === void 0 ? function(buttons) {
74965
+ var customizePrefixCls = props2.prefixCls, _props$type = props2.type, type5 = _props$type === void 0 ? "default" : _props$type, danger = props2.danger, disabled = props2.disabled, loading2 = props2.loading, onClick = props2.onClick, htmlType = props2.htmlType, children = props2.children, className = props2.className, menu = props2.menu, arrow2 = props2.arrow, autoFocus = props2.autoFocus, overlay = props2.overlay, trigger2 = props2.trigger, align = props2.align, visible2 = props2.visible, open = props2.open, onVisibleChange = props2.onVisibleChange, onOpenChange = props2.onOpenChange, placement = props2.placement, getPopupContainer = props2.getPopupContainer, href2 = props2.href, _props$icon = props2.icon, icon = _props$icon === void 0 ? /* @__PURE__ */ React.createElement(RefIcon$b, null) : _props$icon, title = props2.title, _props$buttonsRender = props2.buttonsRender, buttonsRender = _props$buttonsRender === void 0 ? function(buttons) {
74966
74966
  return buttons;
74967
74967
  } : _props$buttonsRender, mouseEnterDelay = props2.mouseEnterDelay, mouseLeaveDelay = props2.mouseLeaveDelay, overlayClassName = props2.overlayClassName, overlayStyle = props2.overlayStyle, destroyPopupOnHide = props2.destroyPopupOnHide, restProps = __rest$j(props2, ["prefixCls", "type", "danger", "disabled", "loading", "onClick", "htmlType", "children", "className", "menu", "arrow", "autoFocus", "overlay", "trigger", "align", "visible", "open", "onVisibleChange", "onOpenChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender", "mouseEnterDelay", "mouseLeaveDelay", "overlayClassName", "overlayStyle", "destroyPopupOnHide"]);
74968
74968
  var prefixCls = getPrefixCls("dropdown-button", customizePrefixCls);
@@ -75000,7 +75000,7 @@ var DropdownButton = function DropdownButton2(props2) {
75000
75000
  type: type5,
75001
75001
  danger,
75002
75002
  disabled,
75003
- loading,
75003
+ loading: loading2,
75004
75004
  onClick,
75005
75005
  htmlType,
75006
75006
  href: href2,
@@ -83058,10 +83058,10 @@ function getParagraphBasicProps(hasAvatar, hasTitle) {
83058
83058
  return basicProps;
83059
83059
  }
83060
83060
  var Skeleton$1 = function Skeleton(props2) {
83061
- var customizePrefixCls = props2.prefixCls, loading = props2.loading, className = props2.className, style2 = props2.style, children = props2.children, _props$avatar = props2.avatar, avatar = _props$avatar === void 0 ? false : _props$avatar, _props$title = props2.title, title = _props$title === void 0 ? true : _props$title, _props$paragraph = props2.paragraph, paragraph = _props$paragraph === void 0 ? true : _props$paragraph, active = props2.active, round2 = props2.round;
83061
+ var customizePrefixCls = props2.prefixCls, loading2 = props2.loading, className = props2.className, style2 = props2.style, children = props2.children, _props$avatar = props2.avatar, avatar = _props$avatar === void 0 ? false : _props$avatar, _props$title = props2.title, title = _props$title === void 0 ? true : _props$title, _props$paragraph = props2.paragraph, paragraph = _props$paragraph === void 0 ? true : _props$paragraph, active = props2.active, round2 = props2.round;
83062
83062
  var _React$useContext = React.useContext(ConfigContext), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction;
83063
83063
  var prefixCls = getPrefixCls("skeleton", customizePrefixCls);
83064
- if (loading || !("loading" in props2)) {
83064
+ if (loading2 || !("loading" in props2)) {
83065
83065
  var hasAvatar = !!avatar;
83066
83066
  var hasTitle = !!title;
83067
83067
  var hasParagraph = !!paragraph;
@@ -86059,7 +86059,7 @@ var __rest$6 = function(s3, e3) {
86059
86059
  return t3;
86060
86060
  };
86061
86061
  var Search$1 = /* @__PURE__ */ React.forwardRef(function(props2, ref2) {
86062
- var customizePrefixCls = props2.prefixCls, customizeInputPrefixCls = props2.inputPrefixCls, className = props2.className, customizeSize = props2.size, suffix = props2.suffix, _props$enterButton = props2.enterButton, enterButton = _props$enterButton === void 0 ? false : _props$enterButton, addonAfter = props2.addonAfter, loading = props2.loading, disabled = props2.disabled, customOnSearch = props2.onSearch, customOnChange = props2.onChange, onCompositionStart = props2.onCompositionStart, onCompositionEnd = props2.onCompositionEnd, restProps = __rest$6(props2, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]);
86062
+ var customizePrefixCls = props2.prefixCls, customizeInputPrefixCls = props2.inputPrefixCls, className = props2.className, customizeSize = props2.size, suffix = props2.suffix, _props$enterButton = props2.enterButton, enterButton = _props$enterButton === void 0 ? false : _props$enterButton, addonAfter = props2.addonAfter, loading2 = props2.loading, disabled = props2.disabled, customOnSearch = props2.onSearch, customOnChange = props2.onChange, onCompositionStart = props2.onCompositionStart, onCompositionEnd = props2.onCompositionEnd, restProps = __rest$6(props2, ["prefixCls", "inputPrefixCls", "className", "size", "suffix", "enterButton", "addonAfter", "loading", "disabled", "onSearch", "onChange", "onCompositionStart", "onCompositionEnd"]);
86063
86063
  var _React$useContext = React.useContext(ConfigContext), getPrefixCls = _React$useContext.getPrefixCls, direction = _React$useContext.direction;
86064
86064
  var contextSize = React.useContext(SizeContext$1);
86065
86065
  var composedRef = React.useRef(false);
@@ -86089,7 +86089,7 @@ var Search$1 = /* @__PURE__ */ React.forwardRef(function(props2, ref2) {
86089
86089
  }
86090
86090
  };
86091
86091
  var onPressEnter = function onPressEnter2(e3) {
86092
- if (composedRef.current || loading) {
86092
+ if (composedRef.current || loading2) {
86093
86093
  return;
86094
86094
  }
86095
86095
  onSearch(e3);
@@ -86121,7 +86121,7 @@ var Search$1 = /* @__PURE__ */ React.forwardRef(function(props2, ref2) {
86121
86121
  key: "enterButton",
86122
86122
  onMouseDown,
86123
86123
  onClick: onSearch,
86124
- loading,
86124
+ loading: loading2,
86125
86125
  icon: searchIcon
86126
86126
  }, enterButton);
86127
86127
  }
@@ -87720,7 +87720,7 @@ function isThenable(thing) {
87720
87720
  var ActionButton = function ActionButton2(props2) {
87721
87721
  var clickedRef = React.useRef(false);
87722
87722
  var ref2 = React.useRef(null);
87723
- var _useState = useSafeState(false), _useState2 = _slicedToArray(_useState, 2), loading = _useState2[0], setLoading = _useState2[1];
87723
+ var _useState = useSafeState(false), _useState2 = _slicedToArray(_useState, 2), loading2 = _useState2[0], setLoading = _useState2[1];
87724
87724
  var close2 = props2.close;
87725
87725
  var onInternalClose = function onInternalClose2() {
87726
87726
  close2 === null || close2 === void 0 ? void 0 : close2.apply(void 0, arguments);
@@ -87787,7 +87787,7 @@ var ActionButton = function ActionButton2(props2) {
87787
87787
  var type5 = props2.type, children = props2.children, prefixCls = props2.prefixCls, buttonProps = props2.buttonProps;
87788
87788
  return /* @__PURE__ */ React.createElement(Button$4, _extends$5({}, convertLegacyProps(type5), {
87789
87789
  onClick,
87790
- loading,
87790
+ loading: loading2,
87791
87791
  prefixCls
87792
87792
  }, buttonProps, {
87793
87793
  ref: ref2
@@ -110491,6 +110491,10 @@ function rb(e3) {
110491
110491
  return Object.values(i3).length && (yield Yi(n2, o, true), yield qg(i3, t3.useAnimationFrame)), i3;
110492
110492
  });
110493
110493
  }
110494
+ const CSS_CLASSES = {
110495
+ SUSPENSE_FALLBACK: "sb-suspense-fallback",
110496
+ ANCHOR_NAME: "sb-anchor-name"
110497
+ };
110494
110498
  const PopoverClassName = styleAsClass`
110495
110499
  .ant-popover-inner-content {
110496
110500
  padding: 12px;
@@ -110648,6 +110652,77 @@ const ComponentInfoProvider = ({ sourceId, instanceId, name, children }) => {
110648
110652
  const useComponentInfo = () => {
110649
110653
  return useContext(ComponentInfoContext);
110650
110654
  };
110655
+ const ComponentStyleContext = createContext(
110656
+ null
110657
+ );
110658
+ function ComponentSuspenseStyleProvider({
110659
+ children
110660
+ }) {
110661
+ const [style2, setStyle] = useState({});
110662
+ const elementRef = useRef(null);
110663
+ const previousStyle = useRef(null);
110664
+ const getFallbackStyle = useMemo$2(() => {
110665
+ return () => {
110666
+ var _a2, _b2;
110667
+ if (!elementRef.current || !style2) {
110668
+ return style2 || previousStyle.current || {};
110669
+ }
110670
+ const childRef = elementRef.current.children[0];
110671
+ if (!childRef) {
110672
+ return style2;
110673
+ }
110674
+ let cachedRect = null;
110675
+ const lazyRect = () => {
110676
+ if (cachedRect === null) {
110677
+ cachedRect = childRef.getBoundingClientRect();
110678
+ }
110679
+ return cachedRect;
110680
+ };
110681
+ const fallbackStyle = { ...style2 };
110682
+ if (style2.width === "fit-content" || style2.width === "auto" || style2.width === void 0) {
110683
+ fallbackStyle.width = `${lazyRect().width}px`;
110684
+ }
110685
+ if (style2.height === "fit-content" || style2.height === "auto" || style2.height === void 0) {
110686
+ fallbackStyle.height = `${lazyRect().height}px`;
110687
+ }
110688
+ if (fallbackStyle.width === 0 || fallbackStyle.width === "0px") {
110689
+ fallbackStyle.width = (_a2 = previousStyle.current) == null ? void 0 : _a2.width;
110690
+ }
110691
+ if (fallbackStyle.height === 0 || fallbackStyle.height === "0px") {
110692
+ fallbackStyle.height = (_b2 = previousStyle.current) == null ? void 0 : _b2.height;
110693
+ }
110694
+ previousStyle.current = fallbackStyle;
110695
+ return fallbackStyle;
110696
+ };
110697
+ }, [elementRef, style2]);
110698
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
110699
+ ComponentStyleContext.Provider,
110700
+ {
110701
+ value: {
110702
+ setStyle,
110703
+ getFallbackStyle
110704
+ },
110705
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110706
+ "div",
110707
+ {
110708
+ className: CSS_CLASSES.SUSPENSE_FALLBACK,
110709
+ style: { display: "contents" },
110710
+ ref: elementRef,
110711
+ children
110712
+ }
110713
+ )
110714
+ }
110715
+ );
110716
+ }
110717
+ function useComponentSuspenseStyle() {
110718
+ const context2 = useContext(ComponentStyleContext);
110719
+ if (!context2) {
110720
+ throw new Error(
110721
+ "useComponentStyle must be used within a ComponentStyleProvider"
110722
+ );
110723
+ }
110724
+ return context2;
110725
+ }
110651
110726
  const entityActions = {
110652
110727
  reset: (entityName, scopeId) => {
110653
110728
  rootStore.entityManager.resetEntity({
@@ -110719,7 +110794,46 @@ const useShallowMobxObserver = (obj) => {
110719
110794
  }, [obj, keys2]);
110720
110795
  return result;
110721
110796
  };
110722
- const INVISIBLE_OPACITY = 0.5;
110797
+ const shimmerAnimation = We$1`
110798
+ 0% {
110799
+ background-position: -200px 0;
110800
+ }
110801
+ 100% {
110802
+ background-position: calc(200px + 100%) 0;
110803
+ }
110804
+ `;
110805
+ const ShimmerDiv = qe$1.div`
110806
+ min-height: 12px;
110807
+ min-width: 12px;
110808
+ background-color: ${(props2) => props2.$backgroundColor};
110809
+ border-radius: ${(props2) => props2.$borderRadius};
110810
+ position: relative;
110811
+ overflow: hidden;
110812
+ background: linear-gradient(
110813
+ 90deg,
110814
+ ${(props2) => props2.$backgroundColor} 25%,
110815
+ ${(props2) => props2.$shimmerHighlight} 50%,
110816
+ ${(props2) => props2.$backgroundColor} 75%
110817
+ );
110818
+ background-size: 200px 100%;
110819
+ animation: ${shimmerAnimation} 5s infinite linear;
110820
+ `;
110821
+ function SuspenseFallback({ style: style2 }) {
110822
+ var _a2, _b2;
110823
+ const { theme } = useTheme();
110824
+ const backgroundColor = ((_a2 = theme == null ? void 0 : theme.colors) == null ? void 0 : _a2.neutral50) || "#f8f9fa";
110825
+ const shimmerHighlight = ((_b2 = theme == null ? void 0 : theme.colors) == null ? void 0 : _b2.neutral100) || "#ffffff";
110826
+ const borderRadius2 = (theme == null ? void 0 : theme.borderRadius.value) + (theme == null ? void 0 : theme.borderRadius.mode);
110827
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
110828
+ ShimmerDiv,
110829
+ {
110830
+ $backgroundColor: backgroundColor,
110831
+ $shimmerHighlight: shimmerHighlight,
110832
+ $borderRadius: borderRadius2,
110833
+ style: style2 == null ? void 0 : style2()
110834
+ }
110835
+ );
110836
+ }
110723
110837
  function removeBindings(props2) {
110724
110838
  return Object.entries(props2).reduce(
110725
110839
  (acc, [key2, value]) => {
@@ -110735,6 +110849,7 @@ function removeBindings(props2) {
110735
110849
  {}
110736
110850
  );
110737
110851
  }
110852
+ const INVISIBLE_OPACITY = 0.5;
110738
110853
  const useStyleWithSize = (props2) => {
110739
110854
  const [style2, setStyle] = useState({});
110740
110855
  useStableEffect(
@@ -110818,6 +110933,10 @@ const ReactiveComponent = observer(function Component2({
110818
110933
  }
110819
110934
  return stylePropWithSize;
110820
110935
  }, [reactiveProps.isVisible, stylePropWithSize]);
110936
+ const { setStyle, getFallbackStyle } = useComponentSuspenseStyle();
110937
+ useMemo$2(() => {
110938
+ setStyle(styleProp);
110939
+ }, [styleProp, setStyle]);
110821
110940
  const instanceIdProps = { [WIDGET_INSTANCE_ID_ATTRIBUTE]: instanceId };
110822
110941
  if (currentName.current !== name) {
110823
110942
  currentName.current = name;
@@ -110831,35 +110950,44 @@ const ReactiveComponent = observer(function Component2({
110831
110950
  "data-test": `component-${name}`
110832
110951
  };
110833
110952
  }, [name, identifier2.name]);
110834
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { header: "Something went wrong rendering this widget.", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110835
- ComponentInfoProvider,
110953
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
110954
+ ErrorBoundary,
110836
110955
  {
110837
- sourceId,
110838
- name,
110839
- instanceId,
110840
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(ActionsProvider, { actions: actions.current, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110841
- DuplicatedNamePopover,
110956
+ header: `Something went wrong rendering this widget [${name}]`,
110957
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110958
+ ComponentInfoProvider,
110842
110959
  {
110843
- showWarning: !!(isNameDuplicated && showErrors),
110844
110960
  sourceId,
110845
110961
  name,
110846
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110847
- Component2,
110962
+ instanceId,
110963
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(ActionsProvider, { actions: actions.current, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110964
+ DuplicatedNamePopover,
110848
110965
  {
110966
+ showWarning: !!(isNameDuplicated && showErrors),
110967
+ sourceId,
110849
110968
  name,
110850
- ...reactiveProps,
110851
- ...instanceIdProps,
110852
- dropTargetRef: widgetProps.dropTargetRef,
110853
- style: styleProp,
110854
- ...testProps,
110855
- children
110969
+ children: reactiveProps.loading === true ? /* @__PURE__ */ jsxRuntimeExports.jsx(SuspenseFallback, { style: getFallbackStyle }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
110970
+ Component2,
110971
+ {
110972
+ name,
110973
+ ...reactiveProps,
110974
+ ...instanceIdProps,
110975
+ dropTargetRef: widgetProps.dropTargetRef,
110976
+ style: styleProp,
110977
+ ...testProps,
110978
+ children
110979
+ }
110980
+ )
110856
110981
  }
110857
- )
110982
+ ) })
110858
110983
  }
110859
- ) })
110984
+ )
110860
110985
  }
110861
- ) });
110986
+ );
110862
110987
  });
110988
+ const WrappedReactiveComponent = (props2) => {
110989
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ComponentSuspenseStyleProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ReactiveComponent, { ...props2 }) });
110990
+ };
110863
110991
  const CustomComponentContext = createContext({
110864
110992
  isInCustomComponent: false,
110865
110993
  instanceId: "",
@@ -117500,7 +117628,7 @@ const EditWrapper = observer(function EditWrapper2(props2) {
117500
117628
  style: createAnchorNameStyle({
117501
117629
  instanceId: props2.identifier.instanceId
117502
117630
  }),
117503
- className: "sb-anchor-name",
117631
+ className: CSS_CLASSES.ANCHOR_NAME,
117504
117632
  "data-can-drag": !isRoot,
117505
117633
  "data-can-drop": props2.isDroppable,
117506
117634
  "data-selected": isSelected,
@@ -117534,7 +117662,7 @@ const EditWrapper = observer(function EditWrapper2(props2) {
117534
117662
  }
117535
117663
  ),
117536
117664
  /* @__PURE__ */ jsxRuntimeExports.jsx(
117537
- ReactiveComponent,
117665
+ WrappedReactiveComponent,
117538
117666
  {
117539
117667
  Component: props2.component,
117540
117668
  identifier: identifier2,
@@ -117886,7 +118014,7 @@ const registerSbComponent = (type5, config2, Component3) => {
117886
118014
  }
117887
118015
  if (props2.isVisible === false) return null;
117888
118016
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
117889
- ReactiveComponent,
118017
+ WrappedReactiveComponent,
117890
118018
  {
117891
118019
  Component: Component3,
117892
118020
  identifier: identifier2.current,
@@ -118379,6 +118507,28 @@ const borderRadius = (propertiesPanelConfig = {}) => {
118379
118507
  ...propertiesPanelConfig
118380
118508
  });
118381
118509
  };
118510
+ const loading = () => Prop.boolean().default(false).readAndWrite().propertiesPanel({
118511
+ label: "Loading",
118512
+ controlType: "RADIO_BUTTON_GROUP",
118513
+ helpText: "Whether the component is loading, switch to code mode to set the loading state based whatever you want",
118514
+ options: [
118515
+ {
118516
+ label: "Off",
118517
+ value: false
118518
+ },
118519
+ {
118520
+ label: "On",
118521
+ value: true
118522
+ },
118523
+ {
118524
+ label: "Auto",
118525
+ disabled: true,
118526
+ tooltip: "Coming soon! Loading state is based on if referenced data is loading",
118527
+ showTooltip: true,
118528
+ value: void 0
118529
+ }
118530
+ ]
118531
+ });
118382
118532
  function getDefaultBorderRadius() {
118383
118533
  let borderRadius2;
118384
118534
  switch (this.variant) {
@@ -118488,9 +118638,7 @@ const propertiesDefinition$h = {
118488
118638
  }
118489
118639
  ]
118490
118640
  }),
118491
- loadingAnimation: Prop.boolean().readAndWrite().default(true).propertiesPanel({
118492
- label: "Loading animation"
118493
- })
118641
+ loading: loading()
118494
118642
  }),
118495
118643
  interaction: Section.category(PropsPanelCategory.Interaction).children({
118496
118644
  isDisabled: Prop.boolean().readAndWrite().default(false).propertiesPanel({
@@ -118672,7 +118820,8 @@ Section.category(PropsPanelCategory.Appearance).children({
118672
118820
  helpText: "Changes the color of the background"
118673
118821
  }),
118674
118822
  border: border(),
118675
- borderRadius: borderRadius()
118823
+ borderRadius: borderRadius(),
118824
+ loading: loading()
118676
118825
  });
118677
118826
  ({
118678
118827
  layout: Section.category(PropsPanelCategory.Layout).add({
@@ -119019,7 +119168,8 @@ const propertiesDefinition$g = {
119019
119168
  isRemovable: true,
119020
119169
  defaultOnAdd: () => Theme.colors.appBackground ?? "#ffffff"
119021
119170
  }).default(void 0).validate(VALIDATORS.TEXT_ALLOW_UNDEFINED),
119022
- border: border()
119171
+ border: border(),
119172
+ loading: loading()
119023
119173
  })
119024
119174
  };
119025
119175
  const SbSection = registerSbComponent(
@@ -119429,7 +119579,8 @@ const propertiesDefinition$f = {
119429
119579
  }),
119430
119580
  borderRadius: borderRadius().default(function() {
119431
119581
  return this.variant === "card" ? createBorderRadiusObject(Theme.defaultBorder.borderRadius) : void 0;
119432
- })
119582
+ }),
119583
+ loading: loading()
119433
119584
  })
119434
119585
  };
119435
119586
  const EMPTY_CONTAINER_MIN_HEIGHT = 72;
@@ -119566,7 +119717,8 @@ const propertiesDefinition$e = {
119566
119717
  isRemovable: true,
119567
119718
  defaultOnAdd: () => Theme.colors.appBackground ?? "#ffffff"
119568
119719
  }),
119569
- border: border()
119720
+ border: border(),
119721
+ loading: loading()
119570
119722
  })
119571
119723
  };
119572
119724
  const CONTAINER_MIN_WIDTH = Dim.px(0);
@@ -126676,7 +126828,6 @@ const getInputValidationErrors = (props2) => {
126676
126828
  };
126677
126829
  const getErrorMessages = (errors2) => Object.values(errors2).filter(Boolean);
126678
126830
  const hasErrors = (errors2) => getErrorMessages(errors2).length > 0;
126679
- const ANIMATE_LOADING_PROPERTY_CONTROL_HELP_TEXT = "Display a loading animation if dependent data is loading";
126680
126831
  const errorMessagePlacement = Prop.string().readAndWrite().default("tooltip").propertiesPanel({
126681
126832
  label: "Error display",
126682
126833
  controlType: "RADIO_BUTTON_GROUP",
@@ -127028,11 +127179,7 @@ const propertiesDefinition$d = {
127028
127179
  variants: [{ inputType: Prop.literal(InputTypes.TEXT) }]
127029
127180
  })
127030
127181
  ).add({
127031
- loadingAnimation: Prop.boolean().default(true).propertiesPanel({
127032
- helpText: ANIMATE_LOADING_PROPERTY_CONTROL_HELP_TEXT,
127033
- label: "Loading animation",
127034
- controlType: "SWITCH"
127035
- })
127182
+ loading: loading()
127036
127183
  }),
127037
127184
  layout: Section.category(PropsPanelCategory.Layout).add(padding({ themeValue: INPUT_PADDING, default: INPUT_PADDING })).add({
127038
127185
  ...size$2(),
@@ -127301,6 +127448,9 @@ const propertiesDefinition$c = {
127301
127448
  hasMaxHeight: false
127302
127449
  })
127303
127450
  ),
127451
+ appearance: Section.category(PropsPanelCategory.Appearance).children({
127452
+ loading: loading()
127453
+ }),
127304
127454
  events: Section.category(PropsPanelCategory.EventHandlers).children({
127305
127455
  onLoad: Prop.event().propertiesPanel({
127306
127456
  label: "onPageLoad"
@@ -133688,8 +133838,8 @@ function requireLoadingIcon() {
133688
133838
  };
133689
133839
  };
133690
133840
  var LoadingIcon3 = function LoadingIcon4(_ref2) {
133691
- var prefixCls = _ref2.prefixCls, loading = _ref2.loading, existIcon = _ref2.existIcon;
133692
- var visible2 = !!loading;
133841
+ var prefixCls = _ref2.prefixCls, loading2 = _ref2.loading, existIcon = _ref2.existIcon;
133842
+ var visible2 = !!loading2;
133693
133843
  if (existIcon) {
133694
133844
  return /* @__PURE__ */ _react["default"].createElement("span", {
133695
133845
  className: "".concat(prefixCls, "-loading-icon")
@@ -133819,12 +133969,12 @@ function requireButton$1() {
133819
133969
  }
133820
133970
  var InternalButton3 = function InternalButton22(props2, ref2) {
133821
133971
  var _classNames;
133822
- var _props$loading = props2.loading, loading = _props$loading === void 0 ? false : _props$loading, customizePrefixCls = props2.prefixCls, _props$type = props2.type, type5 = _props$type === void 0 ? "default" : _props$type, danger = props2.danger, _props$shape = props2.shape, shape = _props$shape === void 0 ? "default" : _props$shape, customizeSize = props2.size, customDisabled = props2.disabled, className = props2.className, children = props2.children, icon = props2.icon, _props$ghost = props2.ghost, ghost = _props$ghost === void 0 ? false : _props$ghost, _props$block = props2.block, block = _props$block === void 0 ? false : _props$block, _props$htmlType = props2.htmlType, htmlType = _props$htmlType === void 0 ? "button" : _props$htmlType, rest = __rest2(props2, ["loading", "prefixCls", "type", "danger", "shape", "size", "disabled", "className", "children", "icon", "ghost", "block", "htmlType"]);
133972
+ var _props$loading = props2.loading, loading2 = _props$loading === void 0 ? false : _props$loading, customizePrefixCls = props2.prefixCls, _props$type = props2.type, type5 = _props$type === void 0 ? "default" : _props$type, danger = props2.danger, _props$shape = props2.shape, shape = _props$shape === void 0 ? "default" : _props$shape, customizeSize = props2.size, customDisabled = props2.disabled, className = props2.className, children = props2.children, icon = props2.icon, _props$ghost = props2.ghost, ghost = _props$ghost === void 0 ? false : _props$ghost, _props$block = props2.block, block = _props$block === void 0 ? false : _props$block, _props$htmlType = props2.htmlType, htmlType = _props$htmlType === void 0 ? "button" : _props$htmlType, rest = __rest2(props2, ["loading", "prefixCls", "type", "danger", "shape", "size", "disabled", "className", "children", "icon", "ghost", "block", "htmlType"]);
133823
133973
  var size2 = React2.useContext(_SizeContext["default"]);
133824
133974
  var disabled = React2.useContext(_DisabledContext["default"]);
133825
133975
  var mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
133826
133976
  var groupSize = React2.useContext(_buttonGroup.GroupSizeContext);
133827
- var _React$useState = React2.useState(!!loading), _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2), innerLoading = _React$useState2[0], setLoading = _React$useState2[1];
133977
+ var _React$useState = React2.useState(!!loading2), _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2), innerLoading = _React$useState2[0], setLoading = _React$useState2[1];
133828
133978
  var _React$useState3 = React2.useState(false), _React$useState4 = (0, _slicedToArray2["default"])(_React$useState3, 2), hasTwoCNChar = _React$useState4[0], setHasTwoCNChar = _React$useState4[1];
133829
133979
  var _React$useContext = React2.useContext(_configProvider.ConfigContext), getPrefixCls = _React$useContext.getPrefixCls, autoInsertSpaceInButton = _React$useContext.autoInsertSpaceInButton, direction = _React$useContext.direction;
133830
133980
  var buttonRef = ref2 || /* @__PURE__ */ React2.createRef();
@@ -133844,7 +133994,7 @@ function requireButton$1() {
133844
133994
  setHasTwoCNChar(false);
133845
133995
  }
133846
133996
  };
133847
- var loadingOrDelay = typeof loading === "boolean" ? loading : (loading === null || loading === void 0 ? void 0 : loading.delay) || true;
133997
+ var loadingOrDelay = typeof loading2 === "boolean" ? loading2 : (loading2 === null || loading2 === void 0 ? void 0 : loading2.delay) || true;
133848
133998
  React2.useEffect(function() {
133849
133999
  var delayTimer = null;
133850
134000
  if (typeof loadingOrDelay === "number") {
@@ -134030,11 +134180,7 @@ const propertiesDefinition$b = {
134030
134180
  helpText: "If enabled, the text will wrap",
134031
134181
  controlType: "SWITCH"
134032
134182
  }).default(true),
134033
- animateLoading: Prop.boolean().readAndWrite().propertiesPanel({
134034
- helpText: ANIMATE_LOADING_PROPERTY_CONTROL_HELP_TEXT,
134035
- label: "Loading animation",
134036
- controlType: "SWITCH"
134037
- }),
134183
+ loading: loading(),
134038
134184
  shouldScroll: Prop.boolean().readAndWrite().propertiesPanel({
134039
134185
  helpText: "Whether the user can scroll vertically or horizontally to acess any overflow content. If disabled, content will clip",
134040
134186
  label: "Scroll overflow",
@@ -134577,7 +134723,8 @@ const propertiesDefinition$a = {
134577
134723
  value: "FULLSCREEN"
134578
134724
  }
134579
134725
  ]
134580
- })
134726
+ }),
134727
+ loading: loading()
134581
134728
  }),
134582
134729
  interaction: Section.category(PropsPanelCategory.Interaction).children({
134583
134730
  closeOnClickOutside: Prop.boolean().readAndWrite().default(true).propertiesPanel({
@@ -144556,14 +144703,14 @@ function getLoaderFn(options) {
144556
144703
  if (!(loader === "all")) return [3, 3];
144557
144704
  return [4, import(
144558
144705
  /* webpackChunkName: "blueprint-icons-all-paths-loader" */
144559
- "./allPathsLoader-BNlRJuEf.js"
144706
+ "./allPathsLoader-C6jGHolR.js"
144560
144707
  )];
144561
144708
  case 2:
144562
144709
  return [2, _b2.sent().allPathsLoader];
144563
144710
  case 3:
144564
144711
  return [4, import(
144565
144712
  /* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
144566
- "./splitPathsBySizeLoader-BEDIEt1Q.js"
144713
+ "./splitPathsBySizeLoader-DCKSQVMB.js"
144567
144714
  )];
144568
144715
  case 4:
144569
144716
  return [2, _b2.sent().splitPathsBySizeLoader];
@@ -144967,19 +145114,19 @@ var AnchorButton = React.forwardRef(function(props2, ref2) {
144967
145114
  AnchorButton.displayName = "".concat(DISPLAYNAME_PREFIX, ".AnchorButton");
144968
145115
  function useSharedButtonAttributes(props2, ref2, options) {
144969
145116
  var _a2;
144970
- var alignText = props2.alignText, fill = props2.fill, large = props2.large, _b2 = props2.loading, loading = _b2 === void 0 ? false : _b2, minimal = props2.minimal, outlined = props2.outlined, _c2 = props2.size, size2 = _c2 === void 0 ? "medium" : _c2, small = props2.small, _d2 = props2.variant, variant = _d2 === void 0 ? "solid" : _d2;
144971
- var disabled = props2.disabled || loading;
145117
+ var alignText = props2.alignText, fill = props2.fill, large = props2.large, _b2 = props2.loading, loading2 = _b2 === void 0 ? false : _b2, minimal = props2.minimal, outlined = props2.outlined, _c2 = props2.size, size2 = _c2 === void 0 ? "medium" : _c2, small = props2.small, _d2 = props2.variant, variant = _d2 === void 0 ? "solid" : _d2;
145118
+ var disabled = props2.disabled || loading2;
144972
145119
  var _e2 = useInteractiveAttributes(!disabled, props2, ref2, options), active = _e2[0], interactiveProps = _e2[1];
144973
- var className = classNames(BUTTON, (_a2 = {}, _a2[ACTIVE] = active, _a2[DISABLED] = disabled, _a2[FILL] = fill, _a2[LOADING] = loading, _a2), alignmentClass(alignText), intentClass(props2.intent), sizeClass(size2, { large, small }), variantClass(variant, { minimal, outlined }), props2.className);
145120
+ var className = classNames(BUTTON, (_a2 = {}, _a2[ACTIVE] = active, _a2[DISABLED] = disabled, _a2[FILL] = fill, _a2[LOADING] = loading2, _a2), alignmentClass(alignText), intentClass(props2.intent), sizeClass(size2, { large, small }), variantClass(variant, { minimal, outlined }), props2.className);
144974
145121
  return __assign$2(__assign$2({}, interactiveProps), { className, disabled });
144975
145122
  }
144976
145123
  function renderButtonContents(props2) {
144977
- var children = props2.children, ellipsizeText = props2.ellipsizeText, endIcon = props2.endIcon, icon = props2.icon, loading = props2.loading, rightIcon = props2.rightIcon, text = props2.text, textClassName = props2.textClassName;
145124
+ var children = props2.children, ellipsizeText = props2.ellipsizeText, endIcon = props2.endIcon, icon = props2.icon, loading2 = props2.loading, rightIcon = props2.rightIcon, text = props2.text, textClassName = props2.textClassName;
144978
145125
  var hasTextContent = !isReactNodeEmpty(text) || !isReactNodeEmpty(children);
144979
145126
  return React.createElement(
144980
145127
  React.Fragment,
144981
145128
  null,
144982
- loading && React.createElement(Spinner, { className: BUTTON_SPINNER, size: SpinnerSize.SMALL }),
145129
+ loading2 && React.createElement(Spinner, { className: BUTTON_SPINNER, size: SpinnerSize.SMALL }),
144983
145130
  React.createElement(Icon, { icon }),
144984
145131
  hasTextContent && React.createElement(
144985
145132
  Text,
@@ -160871,7 +161018,7 @@ const renderCell = ({
160871
161018
  };
160872
161019
  const TableButton = (props2) => {
160873
161020
  var _a2;
160874
- const [loading, setLoading] = useState(false);
161021
+ const [loading2, setLoading] = useState(false);
160875
161022
  const onComplete = () => {
160876
161023
  setLoading(false);
160877
161024
  };
@@ -160922,7 +161069,7 @@ const TableButton = (props2) => {
160922
161069
  textProps,
160923
161070
  buttonStyle: props2.buttonVariant,
160924
161071
  disabled: props2.isDisabled,
160925
- isLoading: loading,
161072
+ isLoading: loading2,
160926
161073
  backgroundColor: props2.backgroundColor ?? defaultBackgroundColor,
160927
161074
  text: props2.buttonLabel,
160928
161075
  border: props2.buttonBorder ?? defaultBorderObject,
@@ -160936,7 +161083,7 @@ const TableButton = (props2) => {
160936
161083
  if (!props2.isSelected) {
160937
161084
  props2.handleRowSelect(props2.rowIndex);
160938
161085
  }
160939
- if (!loading) {
161086
+ if (!loading2) {
160940
161087
  setLoading(true);
160941
161088
  props2.onClick(onComplete);
160942
161089
  }
@@ -161956,11 +162103,7 @@ const propertiesDefinition$9 = {
161956
162103
  { label: "5", value: 5 }
161957
162104
  ]
161958
162105
  }).default(-1),
161959
- animateLoading: Prop.boolean().propertiesPanel({
161960
- label: "Loading animation",
161961
- helpText: "Animate the loading state",
161962
- controlType: "SWITCH"
161963
- }),
162106
+ loading: loading(),
161964
162107
  isVisible: Prop.boolean().propertiesPanel({
161965
162108
  label: "Visible",
161966
162109
  helpText: "Whether the component is visible",
@@ -180821,10 +180964,7 @@ const propertiesDefinition$8 = {
180821
180964
  helpText: "Text to be shown inside of placeholder"
180822
180965
  }),
180823
180966
  textStyle: inputTextStyle(),
180824
- loadingAnimation: Prop.boolean().propertiesPanel({
180825
- label: "Loading animation",
180826
- helpText: "Display a loading animation if dependent data is loading"
180827
- })
180967
+ loading: loading()
180828
180968
  }),
180829
180969
  layout: Section.category(PropsPanelCategory.Layout).add(padding({ themeValue: DROPDOWN_PADDING, default: DROPDOWN_PADDING })).add({
180830
180970
  ...size$2(),
@@ -181477,10 +181617,7 @@ const propertiesDefinition$7 = {
181477
181617
  }),
181478
181618
  appearance: Section.category(PropsPanelCategory.Appearance).children({
181479
181619
  labelStyle: labelTextStyle(),
181480
- loadingAnimation: Prop.boolean().propertiesPanel({
181481
- label: "Loading animation",
181482
- helpText: "Display a loading animation if dependent data is loading"
181483
- })
181620
+ loading: loading()
181484
181621
  }),
181485
181622
  layout: basicLayout(),
181486
181623
  interaction: Section.category(PropsPanelCategory.Interaction).children({
@@ -181748,7 +181885,8 @@ const propertiesDefinition$6 = {
181748
181885
  label: "Placeholder",
181749
181886
  helpText: "Text to be shown inside of placeholder"
181750
181887
  }),
181751
- textStyle: inputTextStyle()
181888
+ textStyle: inputTextStyle(),
181889
+ loading: loading()
181752
181890
  }),
181753
181891
  interaction: Section.category(PropsPanelCategory.Interaction).children({
181754
181892
  isRequired: Prop.boolean().readAndWrite().default(false).propertiesPanel({
@@ -182229,11 +182367,7 @@ const propertiesDefinition$4 = {
182229
182367
  label: "Color",
182230
182368
  helpText: "Changes the color of the icon"
182231
182369
  }),
182232
- animateLoading: Prop.boolean().readAndWrite().default(true).propertiesPanel({
182233
- label: "Loading animation",
182234
- helpText: ANIMATE_LOADING_PROPERTY_CONTROL_HELP_TEXT,
182235
- controlType: "SWITCH"
182236
- })
182370
+ loading: loading()
182237
182371
  }),
182238
182372
  events: Section.category(PropsPanelCategory.EventHandlers).children({
182239
182373
  onClick: Prop.event().propertiesPanel({
@@ -182252,7 +182386,7 @@ const SbIcon = registerSbComponent(
182252
182386
  },
182253
182387
  (props2) => {
182254
182388
  const [isLoading, setIsLoading] = useState(false);
182255
- const { icon, style: style2, color, animateLoading, onClick } = props2;
182389
+ const { icon, style: style2, color, onClick } = props2;
182256
182390
  const { style: passthroughStyle, ...passThroughProps } = usePassthroughProps(props2);
182257
182391
  const inlineStyles = useMemo$2(() => {
182258
182392
  const minWidthStyle = !icon ? {
@@ -182269,13 +182403,14 @@ const SbIcon = registerSbComponent(
182269
182403
  }, [style2, color, onClick, passthroughStyle, icon]);
182270
182404
  const handleClick = useCallback(async () => {
182271
182405
  if (onClick) {
182272
- if (animateLoading) {
182406
+ try {
182273
182407
  setIsLoading(true);
182408
+ await onClick();
182409
+ } finally {
182410
+ setIsLoading(false);
182274
182411
  }
182275
- await onClick();
182276
- setIsLoading(false);
182277
182412
  }
182278
- }, [onClick, animateLoading]);
182413
+ }, [onClick]);
182279
182414
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
182280
182415
  StyledContainer,
182281
182416
  {
@@ -182472,11 +182607,7 @@ const propertiesDefinition$3 = {
182472
182607
  }
182473
182608
  ]
182474
182609
  }),
182475
- animateLoading: Prop.boolean().readAndWrite().propertiesPanel({
182476
- label: "Loading animation",
182477
- helpText: "Display a loading animation if dependent data is loading",
182478
- controlType: "SWITCH"
182479
- })
182610
+ loading: loading()
182480
182611
  }),
182481
182612
  layout: Section.category(PropsPanelCategory.Layout).add(size$2()).add(margin()).add(visible()),
182482
182613
  events: Section.category(PropsPanelCategory.EventHandlers).children({
@@ -185212,13 +185343,16 @@ function applyThemeToIframe(generatedTheme) {
185212
185343
  }
185213
185344
  const originalLog = console.log;
185214
185345
  console.log = (...args) => {
185215
- const processedArgs = args.map((arg) => {
185216
- if (arg && typeof arg === "object" && (getBindingIdentifier(arg) || getBindingIdentifier(arg.bind ?? {}))) {
185217
- return JSON.parse(JSON.stringify(arg));
185218
- }
185219
- return arg;
185220
- });
185221
- originalLog(...processedArgs);
185346
+ try {
185347
+ const processedArgs = args.map((arg) => {
185348
+ if (arg && typeof arg === "object" && (getBindingIdentifier(arg) || getBindingIdentifier(arg.bind ?? {}))) {
185349
+ return JSON.parse(JSON.stringify(arg));
185350
+ }
185351
+ return arg;
185352
+ });
185353
+ originalLog(...processedArgs);
185354
+ } catch {
185355
+ }
185222
185356
  };
185223
185357
  const SbProvider = function SbProvider2({
185224
185358
  name = "codemode",
@@ -196839,4 +196973,4 @@ export {
196839
196973
  copyToClipboard as y,
196840
196974
  navigateTo as z
196841
196975
  };
196842
- //# sourceMappingURL=index--WgLdVs1.js.map
196976
+ //# sourceMappingURL=index-ctuNjk-c.js.map