@superblocksteam/library 2.0.0-next.105 → 2.0.0-next.107

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-C87GcBiX.js} +2 -2
  2. package/dist/{allPaths-CFupmz0n.js.map → allPaths-C87GcBiX.js.map} +1 -1
  3. package/dist/{allPaths-DXhCHwqA.js → allPaths-CDxZNKK6.js} +2 -2
  4. package/dist/{allPaths-DXhCHwqA.js.map → allPaths-CDxZNKK6.js.map} +1 -1
  5. package/dist/{allPathsLoader-BNlRJuEf.js → allPathsLoader-DSfR6N4x.js} +3 -3
  6. package/dist/{allPathsLoader-DSzl66vm.js.map → allPathsLoader-DSfR6N4x.js.map} +1 -1
  7. package/dist/{allPathsLoader-DSzl66vm.js → allPathsLoader-Tn_25haG.js} +3 -3
  8. package/dist/{allPathsLoader-BNlRJuEf.js.map → allPathsLoader-Tn_25haG.js.map} +1 -1
  9. package/dist/{index--WgLdVs1.js → index-BVFDrjgu.js} +265 -124
  10. package/dist/{index--WgLdVs1.js.map → index-BVFDrjgu.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-AOJMwnbQ.js} +2 -2
  14. package/dist/{splitPathsBySizeLoader-D_NFLN6H.js.map → splitPathsBySizeLoader-AOJMwnbQ.js.map} +1 -1
  15. package/dist/{splitPathsBySizeLoader-BEDIEt1Q.js → splitPathsBySizeLoader-yjB1zNTJ.js} +2 -2
  16. package/dist/{splitPathsBySizeLoader-BEDIEt1Q.js.map → splitPathsBySizeLoader-yjB1zNTJ.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-DSfR6N4x.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-AOJMwnbQ.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
@@ -93184,7 +93184,14 @@ class Prop {
93184
93184
  ).reduce(
93185
93185
  (acc, [key2, value]) => {
93186
93186
  if (typeof value === "function") {
93187
- acc[key2] = value.bind(entity)(scopedState);
93187
+ try {
93188
+ acc[key2] = value.bind(entity)(scopedState);
93189
+ } catch (e3) {
93190
+ console.error(
93191
+ `Error evaluating property ${key2}, for type ${entity == null ? void 0 : entity.type}:`,
93192
+ e3
93193
+ );
93194
+ }
93188
93195
  }
93189
93196
  return acc;
93190
93197
  },
@@ -110491,6 +110498,10 @@ function rb(e3) {
110491
110498
  return Object.values(i3).length && (yield Yi(n2, o, true), yield qg(i3, t3.useAnimationFrame)), i3;
110492
110499
  });
110493
110500
  }
110501
+ const CSS_CLASSES = {
110502
+ SUSPENSE_FALLBACK: "sb-suspense-fallback",
110503
+ ANCHOR_NAME: "sb-anchor-name"
110504
+ };
110494
110505
  const PopoverClassName = styleAsClass`
110495
110506
  .ant-popover-inner-content {
110496
110507
  padding: 12px;
@@ -110648,6 +110659,77 @@ const ComponentInfoProvider = ({ sourceId, instanceId, name, children }) => {
110648
110659
  const useComponentInfo = () => {
110649
110660
  return useContext(ComponentInfoContext);
110650
110661
  };
110662
+ const ComponentStyleContext = createContext(
110663
+ null
110664
+ );
110665
+ function ComponentSuspenseStyleProvider({
110666
+ children
110667
+ }) {
110668
+ const [style2, setStyle] = useState({});
110669
+ const elementRef = useRef(null);
110670
+ const previousStyle = useRef(null);
110671
+ const getFallbackStyle = useMemo$2(() => {
110672
+ return () => {
110673
+ var _a2, _b2;
110674
+ if (!elementRef.current || !style2) {
110675
+ return style2 || previousStyle.current || {};
110676
+ }
110677
+ const childRef = elementRef.current.children[0];
110678
+ if (!childRef) {
110679
+ return style2;
110680
+ }
110681
+ let cachedRect = null;
110682
+ const lazyRect = () => {
110683
+ if (cachedRect === null) {
110684
+ cachedRect = childRef.getBoundingClientRect();
110685
+ }
110686
+ return cachedRect;
110687
+ };
110688
+ const fallbackStyle = { ...style2 };
110689
+ if (style2.width === "fit-content" || style2.width === "auto" || style2.width === void 0) {
110690
+ fallbackStyle.width = `${lazyRect().width}px`;
110691
+ }
110692
+ if (style2.height === "fit-content" || style2.height === "auto" || style2.height === void 0) {
110693
+ fallbackStyle.height = `${lazyRect().height}px`;
110694
+ }
110695
+ if (fallbackStyle.width === 0 || fallbackStyle.width === "0px") {
110696
+ fallbackStyle.width = (_a2 = previousStyle.current) == null ? void 0 : _a2.width;
110697
+ }
110698
+ if (fallbackStyle.height === 0 || fallbackStyle.height === "0px") {
110699
+ fallbackStyle.height = (_b2 = previousStyle.current) == null ? void 0 : _b2.height;
110700
+ }
110701
+ previousStyle.current = fallbackStyle;
110702
+ return fallbackStyle;
110703
+ };
110704
+ }, [elementRef, style2]);
110705
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
110706
+ ComponentStyleContext.Provider,
110707
+ {
110708
+ value: {
110709
+ setStyle,
110710
+ getFallbackStyle
110711
+ },
110712
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110713
+ "div",
110714
+ {
110715
+ className: CSS_CLASSES.SUSPENSE_FALLBACK,
110716
+ style: { display: "contents" },
110717
+ ref: elementRef,
110718
+ children
110719
+ }
110720
+ )
110721
+ }
110722
+ );
110723
+ }
110724
+ function useComponentSuspenseStyle() {
110725
+ const context2 = useContext(ComponentStyleContext);
110726
+ if (!context2) {
110727
+ throw new Error(
110728
+ "useComponentStyle must be used within a ComponentStyleProvider"
110729
+ );
110730
+ }
110731
+ return context2;
110732
+ }
110651
110733
  const entityActions = {
110652
110734
  reset: (entityName, scopeId) => {
110653
110735
  rootStore.entityManager.resetEntity({
@@ -110719,7 +110801,46 @@ const useShallowMobxObserver = (obj) => {
110719
110801
  }, [obj, keys2]);
110720
110802
  return result;
110721
110803
  };
110722
- const INVISIBLE_OPACITY = 0.5;
110804
+ const shimmerAnimation = We$1`
110805
+ 0% {
110806
+ background-position: -200px 0;
110807
+ }
110808
+ 100% {
110809
+ background-position: calc(200px + 100%) 0;
110810
+ }
110811
+ `;
110812
+ const ShimmerDiv = qe$1.div`
110813
+ min-height: 12px;
110814
+ min-width: 12px;
110815
+ background-color: ${(props2) => props2.$backgroundColor};
110816
+ border-radius: ${(props2) => props2.$borderRadius};
110817
+ position: relative;
110818
+ overflow: hidden;
110819
+ background: linear-gradient(
110820
+ 90deg,
110821
+ ${(props2) => props2.$backgroundColor} 25%,
110822
+ ${(props2) => props2.$shimmerHighlight} 50%,
110823
+ ${(props2) => props2.$backgroundColor} 75%
110824
+ );
110825
+ background-size: 200px 100%;
110826
+ animation: ${shimmerAnimation} 5s infinite linear;
110827
+ `;
110828
+ function SuspenseFallback({ style: style2 }) {
110829
+ var _a2, _b2;
110830
+ const { theme } = useTheme();
110831
+ const backgroundColor = ((_a2 = theme == null ? void 0 : theme.colors) == null ? void 0 : _a2.neutral50) || "#f8f9fa";
110832
+ const shimmerHighlight = ((_b2 = theme == null ? void 0 : theme.colors) == null ? void 0 : _b2.neutral100) || "#ffffff";
110833
+ const borderRadius2 = (theme == null ? void 0 : theme.borderRadius.value) + (theme == null ? void 0 : theme.borderRadius.mode);
110834
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
110835
+ ShimmerDiv,
110836
+ {
110837
+ $backgroundColor: backgroundColor,
110838
+ $shimmerHighlight: shimmerHighlight,
110839
+ $borderRadius: borderRadius2,
110840
+ style: style2 == null ? void 0 : style2()
110841
+ }
110842
+ );
110843
+ }
110723
110844
  function removeBindings(props2) {
110724
110845
  return Object.entries(props2).reduce(
110725
110846
  (acc, [key2, value]) => {
@@ -110735,6 +110856,7 @@ function removeBindings(props2) {
110735
110856
  {}
110736
110857
  );
110737
110858
  }
110859
+ const INVISIBLE_OPACITY = 0.5;
110738
110860
  const useStyleWithSize = (props2) => {
110739
110861
  const [style2, setStyle] = useState({});
110740
110862
  useStableEffect(
@@ -110818,6 +110940,10 @@ const ReactiveComponent = observer(function Component2({
110818
110940
  }
110819
110941
  return stylePropWithSize;
110820
110942
  }, [reactiveProps.isVisible, stylePropWithSize]);
110943
+ const { setStyle, getFallbackStyle } = useComponentSuspenseStyle();
110944
+ useMemo$2(() => {
110945
+ setStyle(styleProp);
110946
+ }, [styleProp, setStyle]);
110821
110947
  const instanceIdProps = { [WIDGET_INSTANCE_ID_ATTRIBUTE]: instanceId };
110822
110948
  if (currentName.current !== name) {
110823
110949
  currentName.current = name;
@@ -110831,35 +110957,44 @@ const ReactiveComponent = observer(function Component2({
110831
110957
  "data-test": `component-${name}`
110832
110958
  };
110833
110959
  }, [name, identifier2.name]);
110834
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { header: "Something went wrong rendering this widget.", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110835
- ComponentInfoProvider,
110960
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
110961
+ ErrorBoundary,
110836
110962
  {
110837
- sourceId,
110838
- name,
110839
- instanceId,
110840
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(ActionsProvider, { actions: actions.current, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110841
- DuplicatedNamePopover,
110963
+ header: `Something went wrong rendering this widget [${name}]`,
110964
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110965
+ ComponentInfoProvider,
110842
110966
  {
110843
- showWarning: !!(isNameDuplicated && showErrors),
110844
110967
  sourceId,
110845
110968
  name,
110846
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110847
- Component2,
110969
+ instanceId,
110970
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(ActionsProvider, { actions: actions.current, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
110971
+ DuplicatedNamePopover,
110848
110972
  {
110973
+ showWarning: !!(isNameDuplicated && showErrors),
110974
+ sourceId,
110849
110975
  name,
110850
- ...reactiveProps,
110851
- ...instanceIdProps,
110852
- dropTargetRef: widgetProps.dropTargetRef,
110853
- style: styleProp,
110854
- ...testProps,
110855
- children
110976
+ children: reactiveProps.loading === true ? /* @__PURE__ */ jsxRuntimeExports.jsx(SuspenseFallback, { style: getFallbackStyle }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
110977
+ Component2,
110978
+ {
110979
+ name,
110980
+ ...reactiveProps,
110981
+ ...instanceIdProps,
110982
+ dropTargetRef: widgetProps.dropTargetRef,
110983
+ style: styleProp,
110984
+ ...testProps,
110985
+ children
110986
+ }
110987
+ )
110856
110988
  }
110857
- )
110989
+ ) })
110858
110990
  }
110859
- ) })
110991
+ )
110860
110992
  }
110861
- ) });
110993
+ );
110862
110994
  });
110995
+ const WrappedReactiveComponent = (props2) => {
110996
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ComponentSuspenseStyleProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ReactiveComponent, { ...props2 }) });
110997
+ };
110863
110998
  const CustomComponentContext = createContext({
110864
110999
  isInCustomComponent: false,
110865
111000
  instanceId: "",
@@ -117500,7 +117635,7 @@ const EditWrapper = observer(function EditWrapper2(props2) {
117500
117635
  style: createAnchorNameStyle({
117501
117636
  instanceId: props2.identifier.instanceId
117502
117637
  }),
117503
- className: "sb-anchor-name",
117638
+ className: CSS_CLASSES.ANCHOR_NAME,
117504
117639
  "data-can-drag": !isRoot,
117505
117640
  "data-can-drop": props2.isDroppable,
117506
117641
  "data-selected": isSelected,
@@ -117534,7 +117669,7 @@ const EditWrapper = observer(function EditWrapper2(props2) {
117534
117669
  }
117535
117670
  ),
117536
117671
  /* @__PURE__ */ jsxRuntimeExports.jsx(
117537
- ReactiveComponent,
117672
+ WrappedReactiveComponent,
117538
117673
  {
117539
117674
  Component: props2.component,
117540
117675
  identifier: identifier2,
@@ -117886,7 +118021,7 @@ const registerSbComponent = (type5, config2, Component3) => {
117886
118021
  }
117887
118022
  if (props2.isVisible === false) return null;
117888
118023
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
117889
- ReactiveComponent,
118024
+ WrappedReactiveComponent,
117890
118025
  {
117891
118026
  Component: Component3,
117892
118027
  identifier: identifier2.current,
@@ -118379,6 +118514,28 @@ const borderRadius = (propertiesPanelConfig = {}) => {
118379
118514
  ...propertiesPanelConfig
118380
118515
  });
118381
118516
  };
118517
+ const loading = () => Prop.boolean().default(false).readAndWrite().propertiesPanel({
118518
+ label: "Loading",
118519
+ controlType: "RADIO_BUTTON_GROUP",
118520
+ helpText: "Whether the component is loading, switch to code mode to set the loading state based whatever you want",
118521
+ options: [
118522
+ {
118523
+ label: "Off",
118524
+ value: false
118525
+ },
118526
+ {
118527
+ label: "On",
118528
+ value: true
118529
+ },
118530
+ {
118531
+ label: "Auto",
118532
+ disabled: true,
118533
+ tooltip: "Coming soon! Loading state is based on if referenced data is loading",
118534
+ showTooltip: true,
118535
+ value: void 0
118536
+ }
118537
+ ]
118538
+ });
118382
118539
  function getDefaultBorderRadius() {
118383
118540
  let borderRadius2;
118384
118541
  switch (this.variant) {
@@ -118488,9 +118645,7 @@ const propertiesDefinition$h = {
118488
118645
  }
118489
118646
  ]
118490
118647
  }),
118491
- loadingAnimation: Prop.boolean().readAndWrite().default(true).propertiesPanel({
118492
- label: "Loading animation"
118493
- })
118648
+ loading: loading()
118494
118649
  }),
118495
118650
  interaction: Section.category(PropsPanelCategory.Interaction).children({
118496
118651
  isDisabled: Prop.boolean().readAndWrite().default(false).propertiesPanel({
@@ -118672,7 +118827,8 @@ Section.category(PropsPanelCategory.Appearance).children({
118672
118827
  helpText: "Changes the color of the background"
118673
118828
  }),
118674
118829
  border: border(),
118675
- borderRadius: borderRadius()
118830
+ borderRadius: borderRadius(),
118831
+ loading: loading()
118676
118832
  });
118677
118833
  ({
118678
118834
  layout: Section.category(PropsPanelCategory.Layout).add({
@@ -119019,7 +119175,8 @@ const propertiesDefinition$g = {
119019
119175
  isRemovable: true,
119020
119176
  defaultOnAdd: () => Theme.colors.appBackground ?? "#ffffff"
119021
119177
  }).default(void 0).validate(VALIDATORS.TEXT_ALLOW_UNDEFINED),
119022
- border: border()
119178
+ border: border(),
119179
+ loading: loading()
119023
119180
  })
119024
119181
  };
119025
119182
  const SbSection = registerSbComponent(
@@ -119429,7 +119586,8 @@ const propertiesDefinition$f = {
119429
119586
  }),
119430
119587
  borderRadius: borderRadius().default(function() {
119431
119588
  return this.variant === "card" ? createBorderRadiusObject(Theme.defaultBorder.borderRadius) : void 0;
119432
- })
119589
+ }),
119590
+ loading: loading()
119433
119591
  })
119434
119592
  };
119435
119593
  const EMPTY_CONTAINER_MIN_HEIGHT = 72;
@@ -119566,7 +119724,8 @@ const propertiesDefinition$e = {
119566
119724
  isRemovable: true,
119567
119725
  defaultOnAdd: () => Theme.colors.appBackground ?? "#ffffff"
119568
119726
  }),
119569
- border: border()
119727
+ border: border(),
119728
+ loading: loading()
119570
119729
  })
119571
119730
  };
119572
119731
  const CONTAINER_MIN_WIDTH = Dim.px(0);
@@ -126676,7 +126835,6 @@ const getInputValidationErrors = (props2) => {
126676
126835
  };
126677
126836
  const getErrorMessages = (errors2) => Object.values(errors2).filter(Boolean);
126678
126837
  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
126838
  const errorMessagePlacement = Prop.string().readAndWrite().default("tooltip").propertiesPanel({
126681
126839
  label: "Error display",
126682
126840
  controlType: "RADIO_BUTTON_GROUP",
@@ -127028,11 +127186,7 @@ const propertiesDefinition$d = {
127028
127186
  variants: [{ inputType: Prop.literal(InputTypes.TEXT) }]
127029
127187
  })
127030
127188
  ).add({
127031
- loadingAnimation: Prop.boolean().default(true).propertiesPanel({
127032
- helpText: ANIMATE_LOADING_PROPERTY_CONTROL_HELP_TEXT,
127033
- label: "Loading animation",
127034
- controlType: "SWITCH"
127035
- })
127189
+ loading: loading()
127036
127190
  }),
127037
127191
  layout: Section.category(PropsPanelCategory.Layout).add(padding({ themeValue: INPUT_PADDING, default: INPUT_PADDING })).add({
127038
127192
  ...size$2(),
@@ -127301,6 +127455,9 @@ const propertiesDefinition$c = {
127301
127455
  hasMaxHeight: false
127302
127456
  })
127303
127457
  ),
127458
+ appearance: Section.category(PropsPanelCategory.Appearance).children({
127459
+ loading: loading()
127460
+ }),
127304
127461
  events: Section.category(PropsPanelCategory.EventHandlers).children({
127305
127462
  onLoad: Prop.event().propertiesPanel({
127306
127463
  label: "onPageLoad"
@@ -133688,8 +133845,8 @@ function requireLoadingIcon() {
133688
133845
  };
133689
133846
  };
133690
133847
  var LoadingIcon3 = function LoadingIcon4(_ref2) {
133691
- var prefixCls = _ref2.prefixCls, loading = _ref2.loading, existIcon = _ref2.existIcon;
133692
- var visible2 = !!loading;
133848
+ var prefixCls = _ref2.prefixCls, loading2 = _ref2.loading, existIcon = _ref2.existIcon;
133849
+ var visible2 = !!loading2;
133693
133850
  if (existIcon) {
133694
133851
  return /* @__PURE__ */ _react["default"].createElement("span", {
133695
133852
  className: "".concat(prefixCls, "-loading-icon")
@@ -133819,12 +133976,12 @@ function requireButton$1() {
133819
133976
  }
133820
133977
  var InternalButton3 = function InternalButton22(props2, ref2) {
133821
133978
  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"]);
133979
+ 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
133980
  var size2 = React2.useContext(_SizeContext["default"]);
133824
133981
  var disabled = React2.useContext(_DisabledContext["default"]);
133825
133982
  var mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
133826
133983
  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];
133984
+ var _React$useState = React2.useState(!!loading2), _React$useState2 = (0, _slicedToArray2["default"])(_React$useState, 2), innerLoading = _React$useState2[0], setLoading = _React$useState2[1];
133828
133985
  var _React$useState3 = React2.useState(false), _React$useState4 = (0, _slicedToArray2["default"])(_React$useState3, 2), hasTwoCNChar = _React$useState4[0], setHasTwoCNChar = _React$useState4[1];
133829
133986
  var _React$useContext = React2.useContext(_configProvider.ConfigContext), getPrefixCls = _React$useContext.getPrefixCls, autoInsertSpaceInButton = _React$useContext.autoInsertSpaceInButton, direction = _React$useContext.direction;
133830
133987
  var buttonRef = ref2 || /* @__PURE__ */ React2.createRef();
@@ -133844,7 +134001,7 @@ function requireButton$1() {
133844
134001
  setHasTwoCNChar(false);
133845
134002
  }
133846
134003
  };
133847
- var loadingOrDelay = typeof loading === "boolean" ? loading : (loading === null || loading === void 0 ? void 0 : loading.delay) || true;
134004
+ var loadingOrDelay = typeof loading2 === "boolean" ? loading2 : (loading2 === null || loading2 === void 0 ? void 0 : loading2.delay) || true;
133848
134005
  React2.useEffect(function() {
133849
134006
  var delayTimer = null;
133850
134007
  if (typeof loadingOrDelay === "number") {
@@ -134022,7 +134179,7 @@ const propertiesDefinition$b = {
134022
134179
  { icon: "VERTICAL_BOTTOM", value: "bottom" }
134023
134180
  ],
134024
134181
  isVisible: function() {
134025
- return this.height.mode !== "fit";
134182
+ return this.height && this.height.mode !== "fit";
134026
134183
  }
134027
134184
  }),
134028
134185
  wrapText: Prop.boolean().readAndWrite().propertiesPanel({
@@ -134030,11 +134187,7 @@ const propertiesDefinition$b = {
134030
134187
  helpText: "If enabled, the text will wrap",
134031
134188
  controlType: "SWITCH"
134032
134189
  }).default(true),
134033
- animateLoading: Prop.boolean().readAndWrite().propertiesPanel({
134034
- helpText: ANIMATE_LOADING_PROPERTY_CONTROL_HELP_TEXT,
134035
- label: "Loading animation",
134036
- controlType: "SWITCH"
134037
- }),
134190
+ loading: loading(),
134038
134191
  shouldScroll: Prop.boolean().readAndWrite().propertiesPanel({
134039
134192
  helpText: "Whether the user can scroll vertically or horizontally to acess any overflow content. If disabled, content will clip",
134040
134193
  label: "Scroll overflow",
@@ -134577,7 +134730,8 @@ const propertiesDefinition$a = {
134577
134730
  value: "FULLSCREEN"
134578
134731
  }
134579
134732
  ]
134580
- })
134733
+ }),
134734
+ loading: loading()
134581
134735
  }),
134582
134736
  interaction: Section.category(PropsPanelCategory.Interaction).children({
134583
134737
  closeOnClickOutside: Prop.boolean().readAndWrite().default(true).propertiesPanel({
@@ -144556,14 +144710,14 @@ function getLoaderFn(options) {
144556
144710
  if (!(loader === "all")) return [3, 3];
144557
144711
  return [4, import(
144558
144712
  /* webpackChunkName: "blueprint-icons-all-paths-loader" */
144559
- "./allPathsLoader-BNlRJuEf.js"
144713
+ "./allPathsLoader-Tn_25haG.js"
144560
144714
  )];
144561
144715
  case 2:
144562
144716
  return [2, _b2.sent().allPathsLoader];
144563
144717
  case 3:
144564
144718
  return [4, import(
144565
144719
  /* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
144566
- "./splitPathsBySizeLoader-BEDIEt1Q.js"
144720
+ "./splitPathsBySizeLoader-yjB1zNTJ.js"
144567
144721
  )];
144568
144722
  case 4:
144569
144723
  return [2, _b2.sent().splitPathsBySizeLoader];
@@ -144967,19 +145121,19 @@ var AnchorButton = React.forwardRef(function(props2, ref2) {
144967
145121
  AnchorButton.displayName = "".concat(DISPLAYNAME_PREFIX, ".AnchorButton");
144968
145122
  function useSharedButtonAttributes(props2, ref2, options) {
144969
145123
  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;
145124
+ 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;
145125
+ var disabled = props2.disabled || loading2;
144972
145126
  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);
145127
+ 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
145128
  return __assign$2(__assign$2({}, interactiveProps), { className, disabled });
144975
145129
  }
144976
145130
  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;
145131
+ 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
145132
  var hasTextContent = !isReactNodeEmpty(text) || !isReactNodeEmpty(children);
144979
145133
  return React.createElement(
144980
145134
  React.Fragment,
144981
145135
  null,
144982
- loading && React.createElement(Spinner, { className: BUTTON_SPINNER, size: SpinnerSize.SMALL }),
145136
+ loading2 && React.createElement(Spinner, { className: BUTTON_SPINNER, size: SpinnerSize.SMALL }),
144983
145137
  React.createElement(Icon, { icon }),
144984
145138
  hasTextContent && React.createElement(
144985
145139
  Text,
@@ -160871,7 +161025,7 @@ const renderCell = ({
160871
161025
  };
160872
161026
  const TableButton = (props2) => {
160873
161027
  var _a2;
160874
- const [loading, setLoading] = useState(false);
161028
+ const [loading2, setLoading] = useState(false);
160875
161029
  const onComplete = () => {
160876
161030
  setLoading(false);
160877
161031
  };
@@ -160922,7 +161076,7 @@ const TableButton = (props2) => {
160922
161076
  textProps,
160923
161077
  buttonStyle: props2.buttonVariant,
160924
161078
  disabled: props2.isDisabled,
160925
- isLoading: loading,
161079
+ isLoading: loading2,
160926
161080
  backgroundColor: props2.backgroundColor ?? defaultBackgroundColor,
160927
161081
  text: props2.buttonLabel,
160928
161082
  border: props2.buttonBorder ?? defaultBorderObject,
@@ -160936,7 +161090,7 @@ const TableButton = (props2) => {
160936
161090
  if (!props2.isSelected) {
160937
161091
  props2.handleRowSelect(props2.rowIndex);
160938
161092
  }
160939
- if (!loading) {
161093
+ if (!loading2) {
160940
161094
  setLoading(true);
160941
161095
  props2.onClick(onComplete);
160942
161096
  }
@@ -161956,11 +162110,7 @@ const propertiesDefinition$9 = {
161956
162110
  { label: "5", value: 5 }
161957
162111
  ]
161958
162112
  }).default(-1),
161959
- animateLoading: Prop.boolean().propertiesPanel({
161960
- label: "Loading animation",
161961
- helpText: "Animate the loading state",
161962
- controlType: "SWITCH"
161963
- }),
162113
+ loading: loading(),
161964
162114
  isVisible: Prop.boolean().propertiesPanel({
161965
162115
  label: "Visible",
161966
162116
  helpText: "Whether the component is visible",
@@ -180821,10 +180971,7 @@ const propertiesDefinition$8 = {
180821
180971
  helpText: "Text to be shown inside of placeholder"
180822
180972
  }),
180823
180973
  textStyle: inputTextStyle(),
180824
- loadingAnimation: Prop.boolean().propertiesPanel({
180825
- label: "Loading animation",
180826
- helpText: "Display a loading animation if dependent data is loading"
180827
- })
180974
+ loading: loading()
180828
180975
  }),
180829
180976
  layout: Section.category(PropsPanelCategory.Layout).add(padding({ themeValue: DROPDOWN_PADDING, default: DROPDOWN_PADDING })).add({
180830
180977
  ...size$2(),
@@ -181477,10 +181624,7 @@ const propertiesDefinition$7 = {
181477
181624
  }),
181478
181625
  appearance: Section.category(PropsPanelCategory.Appearance).children({
181479
181626
  labelStyle: labelTextStyle(),
181480
- loadingAnimation: Prop.boolean().propertiesPanel({
181481
- label: "Loading animation",
181482
- helpText: "Display a loading animation if dependent data is loading"
181483
- })
181627
+ loading: loading()
181484
181628
  }),
181485
181629
  layout: basicLayout(),
181486
181630
  interaction: Section.category(PropsPanelCategory.Interaction).children({
@@ -181748,7 +181892,8 @@ const propertiesDefinition$6 = {
181748
181892
  label: "Placeholder",
181749
181893
  helpText: "Text to be shown inside of placeholder"
181750
181894
  }),
181751
- textStyle: inputTextStyle()
181895
+ textStyle: inputTextStyle(),
181896
+ loading: loading()
181752
181897
  }),
181753
181898
  interaction: Section.category(PropsPanelCategory.Interaction).children({
181754
181899
  isRequired: Prop.boolean().readAndWrite().default(false).propertiesPanel({
@@ -182229,11 +182374,7 @@ const propertiesDefinition$4 = {
182229
182374
  label: "Color",
182230
182375
  helpText: "Changes the color of the icon"
182231
182376
  }),
182232
- animateLoading: Prop.boolean().readAndWrite().default(true).propertiesPanel({
182233
- label: "Loading animation",
182234
- helpText: ANIMATE_LOADING_PROPERTY_CONTROL_HELP_TEXT,
182235
- controlType: "SWITCH"
182236
- })
182377
+ loading: loading()
182237
182378
  }),
182238
182379
  events: Section.category(PropsPanelCategory.EventHandlers).children({
182239
182380
  onClick: Prop.event().propertiesPanel({
@@ -182252,7 +182393,7 @@ const SbIcon = registerSbComponent(
182252
182393
  },
182253
182394
  (props2) => {
182254
182395
  const [isLoading, setIsLoading] = useState(false);
182255
- const { icon, style: style2, color, animateLoading, onClick } = props2;
182396
+ const { icon, style: style2, color, onClick } = props2;
182256
182397
  const { style: passthroughStyle, ...passThroughProps } = usePassthroughProps(props2);
182257
182398
  const inlineStyles = useMemo$2(() => {
182258
182399
  const minWidthStyle = !icon ? {
@@ -182269,13 +182410,14 @@ const SbIcon = registerSbComponent(
182269
182410
  }, [style2, color, onClick, passthroughStyle, icon]);
182270
182411
  const handleClick = useCallback(async () => {
182271
182412
  if (onClick) {
182272
- if (animateLoading) {
182413
+ try {
182273
182414
  setIsLoading(true);
182415
+ await onClick();
182416
+ } finally {
182417
+ setIsLoading(false);
182274
182418
  }
182275
- await onClick();
182276
- setIsLoading(false);
182277
182419
  }
182278
- }, [onClick, animateLoading]);
182420
+ }, [onClick]);
182279
182421
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
182280
182422
  StyledContainer,
182281
182423
  {
@@ -182472,11 +182614,7 @@ const propertiesDefinition$3 = {
182472
182614
  }
182473
182615
  ]
182474
182616
  }),
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
- })
182617
+ loading: loading()
182480
182618
  }),
182481
182619
  layout: Section.category(PropsPanelCategory.Layout).add(size$2()).add(margin()).add(visible()),
182482
182620
  events: Section.category(PropsPanelCategory.EventHandlers).children({
@@ -185212,13 +185350,16 @@ function applyThemeToIframe(generatedTheme) {
185212
185350
  }
185213
185351
  const originalLog = console.log;
185214
185352
  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);
185353
+ try {
185354
+ const processedArgs = args.map((arg) => {
185355
+ if (arg && typeof arg === "object" && (getBindingIdentifier(arg) || getBindingIdentifier(arg.bind ?? {}))) {
185356
+ return JSON.parse(JSON.stringify(arg));
185357
+ }
185358
+ return arg;
185359
+ });
185360
+ originalLog(...processedArgs);
185361
+ } catch {
185362
+ }
185222
185363
  };
185223
185364
  const SbProvider = function SbProvider2({
185224
185365
  name = "codemode",
@@ -196839,4 +196980,4 @@ export {
196839
196980
  copyToClipboard as y,
196840
196981
  navigateTo as z
196841
196982
  };
196842
- //# sourceMappingURL=index--WgLdVs1.js.map
196983
+ //# sourceMappingURL=index-BVFDrjgu.js.map