@inf-monkeys-tech/monkeys-design 1.0.42 → 1.0.43

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 (70) hide show
  1. package/dist/OverlayNodeHost-14bb9b0f18f4.d.mts +1 -1
  2. package/dist/OverlayNodeHost-3c763888b689.d.ts +1 -1
  3. package/dist/components/agent-workbench/index.js +4 -1
  4. package/dist/components/agent-workbench/index.js.map +1 -1
  5. package/dist/components/agent-workbench/index.mjs +4 -1
  6. package/dist/components/agent-workbench/index.mjs.map +1 -1
  7. package/dist/components/base/index.d.mts +2 -2
  8. package/dist/components/base/index.d.ts +2 -2
  9. package/dist/components/base/index.js +212 -58
  10. package/dist/components/base/index.js.map +1 -1
  11. package/dist/components/base/index.mjs +212 -59
  12. package/dist/components/base/index.mjs.map +1 -1
  13. package/dist/components/data-explorer/index.js +4 -1
  14. package/dist/components/data-explorer/index.js.map +1 -1
  15. package/dist/components/data-explorer/index.mjs +4 -1
  16. package/dist/components/data-explorer/index.mjs.map +1 -1
  17. package/dist/components/layout/index.d.mts +1 -1
  18. package/dist/components/layout/index.d.ts +1 -1
  19. package/dist/components/layout/index.js +4 -1
  20. package/dist/components/layout/index.js.map +1 -1
  21. package/dist/components/layout/index.mjs +4 -1
  22. package/dist/components/layout/index.mjs.map +1 -1
  23. package/dist/components/runtime/index.d.mts +1 -1
  24. package/dist/components/runtime/index.d.ts +1 -1
  25. package/dist/components/runtime/index.js +4 -1
  26. package/dist/components/runtime/index.js.map +1 -1
  27. package/dist/components/runtime/index.mjs +4 -1
  28. package/dist/components/runtime/index.mjs.map +1 -1
  29. package/dist/components/toast/index.d.mts +1 -1
  30. package/dist/components/toast/index.d.ts +1 -1
  31. package/dist/components/toast/index.js +4 -1
  32. package/dist/components/toast/index.js.map +1 -1
  33. package/dist/components/toast/index.mjs +4 -1
  34. package/dist/components/toast/index.mjs.map +1 -1
  35. package/dist/components/toolbar/index.js +4 -1
  36. package/dist/components/toolbar/index.js.map +1 -1
  37. package/dist/components/toolbar/index.mjs +4 -1
  38. package/dist/components/toolbar/index.mjs.map +1 -1
  39. package/dist/components/workbench/index.d.mts +9 -1
  40. package/dist/components/workbench/index.d.ts +9 -1
  41. package/dist/components/workbench/index.js +244 -78
  42. package/dist/components/workbench/index.js.map +1 -1
  43. package/dist/components/workbench/index.mjs +244 -78
  44. package/dist/components/workbench/index.mjs.map +1 -1
  45. package/dist/index.d.mts +4 -4
  46. package/dist/index.d.ts +4 -4
  47. package/dist/index.js +262 -74
  48. package/dist/index.js.map +1 -1
  49. package/dist/index.mjs +261 -75
  50. package/dist/index.mjs.map +1 -1
  51. package/dist/locale/index.d.mts +8 -2
  52. package/dist/locale/index.d.ts +8 -2
  53. package/dist/locale/index.js +8 -2
  54. package/dist/locale/index.js.map +1 -1
  55. package/dist/locale/index.mjs +8 -2
  56. package/dist/locale/index.mjs.map +1 -1
  57. package/dist/provider/index.d.mts +25 -5
  58. package/dist/provider/index.d.ts +25 -5
  59. package/dist/provider/index.js +24 -3
  60. package/dist/provider/index.js.map +1 -1
  61. package/dist/provider/index.mjs +24 -4
  62. package/dist/provider/index.mjs.map +1 -1
  63. package/dist/styles.css +1 -1
  64. package/dist/{theme-61b15c3b7960.d.ts → theme-17bde32ca128.d.ts} +3 -2
  65. package/dist/{theme-7bf5602208e8.d.mts → theme-39d2fdc145c2.d.mts} +3 -2
  66. package/dist/{types-453d18eab188.d.mts → types-22bd2ecb535c.d.mts} +3 -0
  67. package/dist/{types-453d18eab188.d.ts → types-22bd2ecb535c.d.ts} +3 -0
  68. package/dist/{types-3c51850d34c1.d.mts → types-29dff278cb84.d.mts} +15 -1
  69. package/dist/{types-3c51850d34c1.d.ts → types-29dff278cb84.d.ts} +15 -1
  70. package/package.json +1 -1
@@ -498,7 +498,10 @@ var enUS = {
498
498
  loadError: "Unable to load items",
499
499
  refreshError: "Unable to refresh items",
500
500
  retry: "Retry",
501
- loadingMore: "Loading more items"
501
+ loadingMore: "Loading more items",
502
+ permission: "You do not have permission to view this content",
503
+ offline: "You appear to be offline",
504
+ requestAccess: "Request access"
502
505
  },
503
506
  interactiveTable: {
504
507
  columnActions: "Column actions",
@@ -762,6 +765,9 @@ function useMonkeysBaseAppearance(explicit) {
762
765
  [explicit, inherited]
763
766
  );
764
767
  }
768
+ function useMonkeysStatusStates() {
769
+ return react.useContext(MonkeysThemeContext).statusStates ?? {};
770
+ }
765
771
  function useMonkeysDirection() {
766
772
  return react.useContext(MonkeysDirectionContext).direction;
767
773
  }
@@ -2232,16 +2238,6 @@ function getBaseButtonToneClassName(theme, tone = "default", active = false) {
2232
2238
  active && theme.slots.buttonActive
2233
2239
  );
2234
2240
  }
2235
- function getBaseNoticeToneClassName(theme, tone = "default") {
2236
- return cn(
2237
- tone === "default" && theme.slots.noticeDefault,
2238
- tone === "primary" && theme.slots.noticePrimary,
2239
- tone === "success" && theme.slots.noticeSuccess,
2240
- tone === "warning" && theme.slots.noticeWarning,
2241
- tone === "danger" && theme.slots.noticeDanger,
2242
- tone === "muted" && theme.slots.noticeMuted
2243
- );
2244
- }
2245
2241
  function getBaseMenuItemToneClassName(theme, tone = "default") {
2246
2242
  return cn(
2247
2243
  tone === "default" && theme.slots.menuItemDefault,
@@ -3501,6 +3497,7 @@ var BaseEmptyState = react.forwardRef(
3501
3497
  title,
3502
3498
  description,
3503
3499
  actions,
3500
+ variant,
3504
3501
  appearance,
3505
3502
  className,
3506
3503
  classNames,
@@ -3509,6 +3506,9 @@ var BaseEmptyState = react.forwardRef(
3509
3506
  }, ref) {
3510
3507
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
3511
3508
  const componentAttributes = useMonkeysComponentAttributes();
3509
+ const statusStates = useMonkeysStatusStates();
3510
+ const resolvedVariant = variant ?? statusStates.empty?.variant ?? "default";
3511
+ const densityClassName = statusStates.density === "compact" ? "min-h-0 px-3 py-3" : statusStates.density === "comfortable" ? "min-h-56 px-8 py-12" : void 0;
3512
3512
  const theme = resolveBaseAppearance(resolvedAppearance);
3513
3513
  return /* @__PURE__ */ jsxRuntime.jsxs(
3514
3514
  "div",
@@ -3519,7 +3519,15 @@ var BaseEmptyState = react.forwardRef(
3519
3519
  "data-monkeys-component": "empty-state",
3520
3520
  "data-slot": "root",
3521
3521
  "data-state": "empty",
3522
- className: cn(theme.slots.stateRoot, classNames?.root, className),
3522
+ "data-variant": resolvedVariant,
3523
+ "data-density": statusStates.density,
3524
+ className: cn(
3525
+ theme.slots.stateRoot,
3526
+ densityClassName,
3527
+ resolvedVariant === "compact" && "min-h-0 gap-1 py-3",
3528
+ classNames?.root,
3529
+ className
3530
+ ),
3523
3531
  style: {
3524
3532
  ...theme.styles.stateRoot,
3525
3533
  ...style
@@ -3925,6 +3933,59 @@ var BaseInput = react.forwardRef(
3925
3933
  );
3926
3934
  }
3927
3935
  );
3936
+ var variantClassNames = {
3937
+ line: "h-4 w-full",
3938
+ block: "h-24 w-full",
3939
+ circle: "aspect-square h-10 rounded-full"
3940
+ };
3941
+ var BaseSkeleton = react.forwardRef(
3942
+ function BaseSkeleton2({
3943
+ variant = "line",
3944
+ animated = true,
3945
+ appearance,
3946
+ className,
3947
+ classNames,
3948
+ style,
3949
+ ...skeletonProps
3950
+ }, ref) {
3951
+ if (variant !== "line" && variant !== "block" && variant !== "circle") {
3952
+ throw new TypeError(
3953
+ 'BaseSkeleton variant must be "line", "block", or "circle".'
3954
+ );
3955
+ }
3956
+ if (typeof animated !== "boolean") {
3957
+ throw new TypeError("BaseSkeleton animated must be a boolean.");
3958
+ }
3959
+ const resolvedAppearance = useMonkeysBaseAppearance(appearance);
3960
+ const componentAttributes = useMonkeysComponentAttributes();
3961
+ const theme = resolveBaseAppearance(resolvedAppearance);
3962
+ return /* @__PURE__ */ jsxRuntime.jsx(
3963
+ "div",
3964
+ {
3965
+ ...componentAttributes,
3966
+ ...skeletonProps,
3967
+ ref,
3968
+ "aria-hidden": "true",
3969
+ "data-monkeys-component": "skeleton",
3970
+ "data-slot": "root",
3971
+ "data-variant": variant,
3972
+ "data-animated": animated,
3973
+ "data-state": animated ? "animated" : "static",
3974
+ className: cn(
3975
+ theme.slots.skeletonRoot,
3976
+ variantClassNames[variant],
3977
+ animated && "motion-safe:animate-pulse motion-reduce:animate-none",
3978
+ classNames?.root,
3979
+ className
3980
+ ),
3981
+ style: {
3982
+ ...theme.styles.skeleton,
3983
+ ...style
3984
+ }
3985
+ }
3986
+ );
3987
+ }
3988
+ );
3928
3989
  function DefaultLoadingIcon({ className }) {
3929
3990
  return /* @__PURE__ */ jsxRuntime.jsxs(
3930
3991
  "svg",
@@ -3962,6 +4023,7 @@ var BaseLoadingState = react.forwardRef(function BaseLoadingState2({
3962
4023
  title,
3963
4024
  description,
3964
4025
  actions,
4026
+ variant,
3965
4027
  appearance,
3966
4028
  className,
3967
4029
  classNames,
@@ -3976,8 +4038,11 @@ var BaseLoadingState = react.forwardRef(function BaseLoadingState2({
3976
4038
  const resolvedAppearance = useMonkeysBaseAppearance(appearance);
3977
4039
  const componentAttributes = useMonkeysComponentAttributes();
3978
4040
  const loadingMessages = useMonkeysLocaleMessages().loading;
4041
+ const statusStates = useMonkeysStatusStates();
4042
+ const resolvedVariant = variant ?? statusStates.loading?.variant ?? "spinner";
4043
+ const densityClassName = statusStates.density === "compact" ? "min-h-0 px-3 py-3" : statusStates.density === "comfortable" ? "min-h-56 px-8 py-12" : void 0;
3979
4044
  const theme = resolveBaseAppearance(resolvedAppearance);
3980
- const resolvedIcon = icon === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(DefaultLoadingIcon, { className: theme.slots.loadingSpinner }) : icon;
4045
+ const resolvedIcon = resolvedVariant === "skeleton" && icon === void 0 ? void 0 : icon === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(DefaultLoadingIcon, { className: theme.slots.loadingSpinner }) : icon;
3981
4046
  const resolvedAriaLabel = nativeAriaLabel ?? (nativeAriaLabelledBy === void 0 ? loadingMessages.spinner : void 0);
3982
4047
  return /* @__PURE__ */ jsxRuntime.jsxs(
3983
4048
  "div",
@@ -3993,13 +4058,19 @@ var BaseLoadingState = react.forwardRef(function BaseLoadingState2({
3993
4058
  "data-monkeys-component": "loading-state",
3994
4059
  "data-slot": "root",
3995
4060
  "data-state": "loading",
3996
- className: cn(theme.slots.stateRoot, classNames?.root, className),
4061
+ "data-variant": resolvedVariant,
4062
+ "data-density": statusStates.density,
4063
+ className: cn(theme.slots.stateRoot, densityClassName, classNames?.root, className),
3997
4064
  style: {
3998
4065
  ...theme.styles.stateRoot,
3999
4066
  ...style
4000
4067
  },
4001
4068
  children: [
4002
- hasRenderableNode(resolvedIcon) ? /* @__PURE__ */ jsxRuntime.jsx(
4069
+ resolvedVariant === "skeleton" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full max-w-sm flex-col gap-3", "data-slot": "skeleton", children: [
4070
+ /* @__PURE__ */ jsxRuntime.jsx(BaseSkeleton, { variant: "block", className: "h-20" }),
4071
+ /* @__PURE__ */ jsxRuntime.jsx(BaseSkeleton, { variant: "line", className: "w-4/5" }),
4072
+ /* @__PURE__ */ jsxRuntime.jsx(BaseSkeleton, { variant: "line", className: "w-3/5" })
4073
+ ] }) : hasRenderableNode(resolvedIcon) ? /* @__PURE__ */ jsxRuntime.jsx(
4003
4074
  "div",
4004
4075
  {
4005
4076
  "data-slot": "icon",
@@ -4040,55 +4111,6 @@ var BaseLoadingState = react.forwardRef(function BaseLoadingState2({
4040
4111
  }
4041
4112
  );
4042
4113
  });
4043
- function BaseNotice({
4044
- tone,
4045
- icon,
4046
- title,
4047
- description,
4048
- actions,
4049
- children,
4050
- appearance,
4051
- className,
4052
- classNames,
4053
- style,
4054
- ...noticeProps
4055
- }) {
4056
- const theme = resolveBaseAppearance(appearance);
4057
- const resolvedDescription = children ?? description;
4058
- return /* @__PURE__ */ jsxRuntime.jsxs(
4059
- "div",
4060
- {
4061
- ...noticeProps,
4062
- className: cn(
4063
- theme.slots.noticeBase,
4064
- getBaseNoticeToneClassName(theme, tone),
4065
- classNames?.root,
4066
- className
4067
- ),
4068
- style: {
4069
- ...theme.styles.notice,
4070
- ...style
4071
- },
4072
- children: [
4073
- hasRenderableNode(icon) ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(theme.slots.noticeIcon, classNames?.icon), children: icon }) : null,
4074
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
4075
- hasRenderableNode(title) ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(theme.slots.noticeTitle, classNames?.title), children: title }) : null,
4076
- hasRenderableNode(resolvedDescription) ? /* @__PURE__ */ jsxRuntime.jsx(
4077
- "div",
4078
- {
4079
- className: cn(
4080
- theme.slots.noticeDescription,
4081
- classNames?.description
4082
- ),
4083
- children: resolvedDescription
4084
- }
4085
- ) : null,
4086
- hasRenderableNode(actions) ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(theme.slots.noticeActions, classNames?.actions), children: actions }) : null
4087
- ] })
4088
- ]
4089
- }
4090
- );
4091
- }
4092
4114
  var typeaheadResetDelay = 500;
4093
4115
  function validateSelectProps({
4094
4116
  options,
@@ -4831,6 +4853,131 @@ function BaseSegmentedControl({
4831
4853
  }
4832
4854
  );
4833
4855
  }
4856
+ function SystemStateIcon({ kind }) {
4857
+ const path = {
4858
+ error: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4859
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "9" }),
4860
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 7v6" }),
4861
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 17h.01" })
4862
+ ] }),
4863
+ permission: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4864
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "5", y: "10", width: "14", height: "10", rx: "2" }),
4865
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 10V7a4 4 0 0 1 8 0v3" })
4866
+ ] }),
4867
+ offline: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4868
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 12.5a10 10 0 0 1 14 0" }),
4869
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8.5 16a5 5 0 0 1 7 0" }),
4870
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 20h.01" }),
4871
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m4 4 16 16" })
4872
+ ] }),
4873
+ fallback: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4874
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "9" }),
4875
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9.5 9a2.5 2.5 0 1 1 4.2 1.8c-1 .8-1.7 1.2-1.7 2.7" }),
4876
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 17h.01" })
4877
+ ] })
4878
+ };
4879
+ return /* @__PURE__ */ jsxRuntime.jsx(
4880
+ "svg",
4881
+ {
4882
+ "aria-hidden": "true",
4883
+ viewBox: "0 0 24 24",
4884
+ className: "h-7 w-7",
4885
+ fill: "none",
4886
+ stroke: "currentColor",
4887
+ strokeLinecap: "round",
4888
+ strokeLinejoin: "round",
4889
+ strokeWidth: "1.8",
4890
+ children: path[kind]
4891
+ }
4892
+ );
4893
+ }
4894
+ var BaseSystemState = react.forwardRef(
4895
+ function BaseSystemState2({
4896
+ kind = "fallback",
4897
+ icon,
4898
+ title,
4899
+ description,
4900
+ actions,
4901
+ appearance,
4902
+ className,
4903
+ classNames,
4904
+ style,
4905
+ role,
4906
+ "aria-live": ariaLive,
4907
+ ...stateProps
4908
+ }, ref) {
4909
+ const resolvedAppearance = useMonkeysBaseAppearance(appearance);
4910
+ const componentAttributes = useMonkeysComponentAttributes();
4911
+ const statusStates = useMonkeysStatusStates();
4912
+ const densityClassName = statusStates.density === "compact" ? "min-h-0 px-3 py-3" : statusStates.density === "comfortable" ? "min-h-56 px-8 py-12" : void 0;
4913
+ const theme = resolveBaseAppearance(resolvedAppearance);
4914
+ const resolvedIcon = icon === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(SystemStateIcon, { kind }) : icon;
4915
+ const resolvedRole = role ?? (kind === "error" || kind === "offline" ? "alert" : "status");
4916
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4917
+ "div",
4918
+ {
4919
+ ...componentAttributes,
4920
+ ...stateProps,
4921
+ ref,
4922
+ role: resolvedRole,
4923
+ "aria-live": ariaLive ?? (resolvedRole === "alert" ? "assertive" : "polite"),
4924
+ "data-monkeys-component": "system-state",
4925
+ "data-slot": "root",
4926
+ "data-state": kind,
4927
+ "data-density": statusStates.density,
4928
+ className: cn(
4929
+ theme.slots.stateRoot,
4930
+ densityClassName,
4931
+ classNames?.root,
4932
+ className
4933
+ ),
4934
+ style: { ...theme.styles.stateRoot, ...style },
4935
+ children: [
4936
+ hasRenderableNode(resolvedIcon) ? /* @__PURE__ */ jsxRuntime.jsx(
4937
+ "div",
4938
+ {
4939
+ "data-slot": "icon",
4940
+ "data-state": kind,
4941
+ className: cn(theme.slots.stateIcon, classNames?.icon),
4942
+ style: theme.styles.stateIcon,
4943
+ children: resolvedIcon
4944
+ }
4945
+ ) : null,
4946
+ hasRenderableNode(title) ? /* @__PURE__ */ jsxRuntime.jsx(
4947
+ "div",
4948
+ {
4949
+ "data-slot": "title",
4950
+ "data-state": kind,
4951
+ className: cn(theme.slots.stateTitle, classNames?.title),
4952
+ children: title
4953
+ }
4954
+ ) : null,
4955
+ hasRenderableNode(description) ? /* @__PURE__ */ jsxRuntime.jsx(
4956
+ "div",
4957
+ {
4958
+ "data-slot": "description",
4959
+ "data-state": kind,
4960
+ className: cn(
4961
+ theme.slots.stateDescription,
4962
+ classNames?.description
4963
+ ),
4964
+ children: description
4965
+ }
4966
+ ) : null,
4967
+ hasRenderableNode(actions) ? /* @__PURE__ */ jsxRuntime.jsx(
4968
+ "div",
4969
+ {
4970
+ "data-slot": "actions",
4971
+ "data-state": kind,
4972
+ className: cn(theme.slots.stateActions, classNames?.actions),
4973
+ children: actions
4974
+ }
4975
+ ) : null
4976
+ ]
4977
+ }
4978
+ );
4979
+ }
4980
+ );
4834
4981
  var DATA_TRANSFER_COLUMN_TYPE = "application/x-monkeys-base-table-column";
4835
4982
  var COLUMN_RESIZE_KEYBOARD_STEP = 8;
4836
4983
  function assignRef2(ref, value) {
@@ -8808,6 +8955,7 @@ function WorkbenchCollection({
8808
8955
  }) {
8809
8956
  const componentAttributes = useMonkeysComponentAttributes();
8810
8957
  const localeMessages = useMonkeysLocaleMessages().workbench.collection;
8958
+ const statusStates = useMonkeysStatusStates();
8811
8959
  const componentId = react.useId().replace(/:/g, "");
8812
8960
  const rootRef = react.useRef(null);
8813
8961
  const itemsRef = react.useRef(null);
@@ -8898,7 +9046,10 @@ function WorkbenchCollection({
8898
9046
  loadError: config.labels?.loadError ?? localeMessages.loadError,
8899
9047
  refreshError: config.labels?.refreshError ?? localeMessages.refreshError,
8900
9048
  retry: config.labels?.retry ?? localeMessages.retry,
8901
- loadingMore: config.labels?.loadingMore ?? localeMessages.loadingMore
9049
+ loadingMore: config.labels?.loadingMore ?? localeMessages.loadingMore,
9050
+ permission: config.labels?.permission ?? localeMessages.permission,
9051
+ offline: config.labels?.offline ?? localeMessages.offline,
9052
+ requestAccess: config.labels?.requestAccess ?? localeMessages.requestAccess
8902
9053
  }), [config.labels, localeMessages]);
8903
9054
  const virtualizationError = react.useMemo(() => {
8904
9055
  const virtualization = config.virtualization;
@@ -9346,11 +9497,15 @@ function WorkbenchCollection({
9346
9497
  const selectionToolbar = selectedKeys.size > 0 ? resolveRenderableSlot(slots?.selectionToolbar, slotContext) : null;
9347
9498
  const beforeItems = resolveRenderableSlot(slots?.beforeItems, slotContext);
9348
9499
  const footer = resolveRenderableSlot(slots?.footer, slotContext);
9349
- const showInitialLoading = loading && items.length === 0;
9350
- const showInitialError = Boolean(effectiveError) && items.length === 0 && !showInitialLoading;
9351
- const showEmpty = !showInitialLoading && !showInitialError && (state?.empty === true || items.length === 0);
9500
+ const showPermission = state?.permission === true;
9501
+ const showOffline = state?.offline === true && !showPermission;
9502
+ const showInitialLoading = loading && items.length === 0 && !showPermission && !showOffline;
9503
+ const showInitialError = Boolean(effectiveError) && items.length === 0 && !showPermission && !showOffline && !showInitialLoading;
9504
+ const showEmpty = !showPermission && !showOffline && !showInitialLoading && !showInitialError && (state?.empty === true || items.length === 0);
9352
9505
  const loadingSlot = resolveRenderableSlot(slots?.loading, slotContext);
9353
9506
  const errorSlot = resolveRenderableSlot(slots?.error, slotContext);
9507
+ const permissionSlot = resolveRenderableSlot(slots?.permission, slotContext);
9508
+ const offlineSlot = resolveRenderableSlot(slots?.offline, slotContext);
9354
9509
  const emptySlot = resolveRenderableSlot(slots?.empty, slotContext);
9355
9510
  const loadMoreSlot = resolveRenderableSlot(slots?.loadMore, slotContext);
9356
9511
  const selfScrollable = config.layout.scrollOwner === "self" || config.layout.scrollOwner === void 0 && (config.layout.fillHeight || config.layout.maxHeight);
@@ -9381,14 +9536,26 @@ function WorkbenchCollection({
9381
9536
  hasRenderableNode(toolbar) ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames?.toolbar, children: toolbar }) : null,
9382
9537
  hasRenderableNode(selectionToolbar) ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames?.selectionToolbar, children: selectionToolbar }) : null,
9383
9538
  hasRenderableNode(beforeItems) ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames?.beforeItems, children: beforeItems }) : null,
9384
- showInitialLoading ? hasRenderableNode(loadingSlot) ? loadingSlot : /* @__PURE__ */ jsxRuntime.jsx(BaseLoadingState, { title: labels.loading }) : showInitialError ? hasRenderableNode(errorSlot) ? errorSlot : /* @__PURE__ */ jsxRuntime.jsx(
9385
- BaseNotice,
9539
+ showPermission ? hasRenderableNode(permissionSlot) ? permissionSlot : /* @__PURE__ */ jsxRuntime.jsx(
9540
+ BaseSystemState,
9541
+ {
9542
+ kind: "permission",
9543
+ title: labels.permission,
9544
+ actions: statusStates.permission?.showRequestAccess !== false && callbacks?.onRequestAccess ? /* @__PURE__ */ jsxRuntime.jsx(BaseButton, { size: "sm", label: labels.requestAccess, onClick: callbacks.onRequestAccess }) : void 0
9545
+ }
9546
+ ) : showOffline ? hasRenderableNode(offlineSlot) ? offlineSlot : /* @__PURE__ */ jsxRuntime.jsx(
9547
+ BaseSystemState,
9548
+ {
9549
+ kind: "offline",
9550
+ title: labels.offline,
9551
+ actions: statusStates.error?.showRetry !== false && callbacks?.onRetry ? /* @__PURE__ */ jsxRuntime.jsx(BaseButton, { size: "sm", label: labels.retry, onClick: callbacks.onRetry }) : void 0
9552
+ }
9553
+ ) : showInitialLoading ? hasRenderableNode(loadingSlot) ? loadingSlot : /* @__PURE__ */ jsxRuntime.jsx(BaseLoadingState, { title: labels.loading }) : showInitialError ? hasRenderableNode(errorSlot) ? errorSlot : /* @__PURE__ */ jsxRuntime.jsx(
9554
+ BaseSystemState,
9386
9555
  {
9387
- tone: "danger",
9388
- role: "alert",
9389
- "aria-live": "assertive",
9556
+ kind: "error",
9390
9557
  title: labels.loadError,
9391
- actions: callbacks?.onRetry ? /* @__PURE__ */ jsxRuntime.jsx(BaseButton, { size: "sm", label: labels.retry, onClick: callbacks.onRetry }) : void 0
9558
+ actions: statusStates.error?.showRetry !== false && callbacks?.onRetry ? /* @__PURE__ */ jsxRuntime.jsx(BaseButton, { size: "sm", label: labels.retry, onClick: callbacks.onRetry }) : void 0
9392
9559
  }
9393
9560
  ) : showEmpty ? hasRenderableNode(emptySlot) ? emptySlot : /* @__PURE__ */ jsxRuntime.jsx(BaseEmptyState, { title: labels.empty }) : /* @__PURE__ */ jsxRuntime.jsx(
9394
9561
  "div",
@@ -9420,12 +9587,11 @@ function WorkbenchCollection({
9420
9587
  }
9421
9588
  ),
9422
9589
  items.length > 0 && effectiveError ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames?.status, children: hasRenderableNode(errorSlot) ? errorSlot : /* @__PURE__ */ jsxRuntime.jsx(
9423
- BaseNotice,
9590
+ BaseSystemState,
9424
9591
  {
9425
- tone: "danger",
9426
- role: "alert",
9592
+ kind: "error",
9427
9593
  title: labels.refreshError,
9428
- actions: callbacks?.onRetry ? /* @__PURE__ */ jsxRuntime.jsx(BaseButton, { size: "sm", label: labels.retry, onClick: callbacks.onRetry }) : void 0
9594
+ actions: statusStates.error?.showRetry !== false && callbacks?.onRetry ? /* @__PURE__ */ jsxRuntime.jsx(BaseButton, { size: "sm", label: labels.retry, onClick: callbacks.onRetry }) : void 0
9429
9595
  }
9430
9596
  ) }) : null,
9431
9597
  items.length > 0 && (hasMore || loadingMore) ? /* @__PURE__ */ jsxRuntime.jsx("div", { ref: loadMoreRef, className: classNames?.loadMore, "data-collection-load-more": "", children: hasRenderableNode(loadMoreSlot) ? loadMoreSlot : loadingMore ? /* @__PURE__ */ jsxRuntime.jsx(BaseLoadingState, { title: labels.loadingMore }) : null }) : null,