@uniformdev/design-system 20.9.0 → 20.9.1-alpha.3

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.
package/dist/esm/index.js CHANGED
@@ -1563,6 +1563,9 @@ function useShortcut({
1563
1563
  const handle = useCallback(
1564
1564
  (e) => {
1565
1565
  if (disabled2) {
1566
+ if (disabled2 === "silent") {
1567
+ return;
1568
+ }
1566
1569
  toast.info(`Shortcut ${getFormattedShortcut(shortcut).join("")} is currently disabled`);
1567
1570
  return;
1568
1571
  }
@@ -10985,13 +10988,21 @@ var ObjectListItem2 = ({ minContainerQueryWidth = "34rem", ...props }) => {
10985
10988
  css: [
10986
10989
  ObjectListItemContentWrapper,
10987
10990
  `${cq(minContainerQueryWidth)} {
10988
- grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
10991
+ grid-template-columns: ${cover ? "minmax(0, auto)" : ""} minmax(0, 1fr) minmax(0, auto);
10989
10992
  }`
10990
10993
  ],
10991
10994
  children: [
10992
- /* @__PURE__ */ jsx106(HorizontalRhythm, { gap: "sm", align: "center", children: cover }),
10995
+ cover ? /* @__PURE__ */ jsx106(HorizontalRhythm, { gap: "sm", align: "center", children: cover }) : null,
10993
10996
  /* @__PURE__ */ jsxs71(VerticalRhythm, { gap: "0", justify: renderAs === "multi" ? "flex-start" : "center", children: [
10994
- /* @__PURE__ */ jsx106(HorizontalRhythm, { gap: "xs", align: renderAs === "multi" ? "flex-start" : "center", children: header2 }),
10997
+ /* @__PURE__ */ jsx106(
10998
+ HorizontalRhythm,
10999
+ {
11000
+ gap: "xs",
11001
+ align: renderAs === "multi" ? "flex-start" : "center",
11002
+ "data-testid": "title",
11003
+ children: header2
11004
+ }
11005
+ ),
10995
11006
  renderAs === "multi" ? props.children : null
10996
11007
  ] }),
10997
11008
  /* @__PURE__ */ jsx106(HorizontalRhythm, { gap: "xs", align: renderAs === "multi" ? "flex-start" : "center", children: rightSlot })
@@ -15534,6 +15545,7 @@ var SegmentedControl = ({
15534
15545
  }
15535
15546
  const text = option.label ? option.label : option.icon ? null : String(option.value);
15536
15547
  const isDisabled = disabled2 || option.disabled;
15548
+ const isChecked = option.value === value;
15537
15549
  return /* @__PURE__ */ jsx134(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ jsx134(
15538
15550
  "div",
15539
15551
  {
@@ -15543,7 +15555,7 @@ var SegmentedControl = ({
15543
15555
  "label",
15544
15556
  {
15545
15557
  css: [
15546
- segmentedControlLabelStyles(option.value === value, isDisabled),
15558
+ segmentedControlLabelStyles(isChecked, isDisabled),
15547
15559
  sizeStyles,
15548
15560
  isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
15549
15561
  ],
@@ -15555,7 +15567,7 @@ var SegmentedControl = ({
15555
15567
  type: "radio",
15556
15568
  name,
15557
15569
  value: index,
15558
- checked: option.value === value,
15570
+ checked: isChecked,
15559
15571
  onChange: onOptionChange,
15560
15572
  disabled: isDisabled
15561
15573
  }
package/dist/index.d.mts CHANGED
@@ -384,8 +384,12 @@ type UseShortcutOptions = {
384
384
  doNotPreventDefault?: boolean;
385
385
  /** Whether the shortcut will activate with a form field in focus */
386
386
  activeWhenEditing?: boolean;
387
- /** When true, the shortcut is disabled. The result will also reflect this state, which may disable attached menus, buttons, etc */
388
- disabled?: boolean;
387
+ /**
388
+ * When true or 'silent', the shortcut is disabled. When undefined or false, it is enabled.
389
+ * The result will also reflect this state, which may disable attached menus, buttons, etc
390
+ * 'silent' will not show a toast notification when the shortcut is invoked while disabled.
391
+ */
392
+ disabled?: boolean | 'silent';
389
393
  };
390
394
  type ShortcutReference = {
391
395
  shortcut: string;
package/dist/index.d.ts CHANGED
@@ -384,8 +384,12 @@ type UseShortcutOptions = {
384
384
  doNotPreventDefault?: boolean;
385
385
  /** Whether the shortcut will activate with a form field in focus */
386
386
  activeWhenEditing?: boolean;
387
- /** When true, the shortcut is disabled. The result will also reflect this state, which may disable attached menus, buttons, etc */
388
- disabled?: boolean;
387
+ /**
388
+ * When true or 'silent', the shortcut is disabled. When undefined or false, it is enabled.
389
+ * The result will also reflect this state, which may disable attached menus, buttons, etc
390
+ * 'silent' will not show a toast notification when the shortcut is invoked while disabled.
391
+ */
392
+ disabled?: boolean | 'silent';
389
393
  };
390
394
  type ShortcutReference = {
391
395
  shortcut: string;
package/dist/index.js CHANGED
@@ -3253,6 +3253,9 @@ function useShortcut({
3253
3253
  const handle = (0, import_react14.useCallback)(
3254
3254
  (e) => {
3255
3255
  if (disabled2) {
3256
+ if (disabled2 === "silent") {
3257
+ return;
3258
+ }
3256
3259
  import_react_toastify.toast.info(`Shortcut ${getFormattedShortcut(shortcut).join("")} is currently disabled`);
3257
3260
  return;
3258
3261
  }
@@ -12860,13 +12863,21 @@ var ObjectListItem2 = ({ minContainerQueryWidth = "34rem", ...props }) => {
12860
12863
  css: [
12861
12864
  ObjectListItemContentWrapper,
12862
12865
  `${cq(minContainerQueryWidth)} {
12863
- grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
12866
+ grid-template-columns: ${cover ? "minmax(0, auto)" : ""} minmax(0, 1fr) minmax(0, auto);
12864
12867
  }`
12865
12868
  ],
12866
12869
  children: [
12867
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(HorizontalRhythm, { gap: "sm", align: "center", children: cover }),
12870
+ cover ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(HorizontalRhythm, { gap: "sm", align: "center", children: cover }) : null,
12868
12871
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(VerticalRhythm, { gap: "0", justify: renderAs === "multi" ? "flex-start" : "center", children: [
12869
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(HorizontalRhythm, { gap: "xs", align: renderAs === "multi" ? "flex-start" : "center", children: header2 }),
12872
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
12873
+ HorizontalRhythm,
12874
+ {
12875
+ gap: "xs",
12876
+ align: renderAs === "multi" ? "flex-start" : "center",
12877
+ "data-testid": "title",
12878
+ children: header2
12879
+ }
12880
+ ),
12870
12881
  renderAs === "multi" ? props.children : null
12871
12882
  ] }),
12872
12883
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(HorizontalRhythm, { gap: "xs", align: renderAs === "multi" ? "flex-start" : "center", children: rightSlot })
@@ -17379,6 +17390,7 @@ var SegmentedControl = ({
17379
17390
  }
17380
17391
  const text = option.label ? option.label : option.icon ? null : String(option.value);
17381
17392
  const isDisabled = disabled2 || option.disabled;
17393
+ const isChecked = option.value === value;
17382
17394
  return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
17383
17395
  "div",
17384
17396
  {
@@ -17388,7 +17400,7 @@ var SegmentedControl = ({
17388
17400
  "label",
17389
17401
  {
17390
17402
  css: [
17391
- segmentedControlLabelStyles(option.value === value, isDisabled),
17403
+ segmentedControlLabelStyles(isChecked, isDisabled),
17392
17404
  sizeStyles,
17393
17405
  isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
17394
17406
  ],
@@ -17400,7 +17412,7 @@ var SegmentedControl = ({
17400
17412
  type: "radio",
17401
17413
  name,
17402
17414
  value: index,
17403
- checked: option.value === value,
17415
+ checked: isChecked,
17404
17416
  onChange: onOptionChange,
17405
17417
  disabled: isDisabled
17406
17418
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "20.9.0",
3
+ "version": "20.9.1-alpha.3+9f10f56702",
4
4
  "description": "Uniform design system components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -26,8 +26,8 @@
26
26
  "@storybook/theming": "^8.3.3",
27
27
  "@types/react": "18.3.11",
28
28
  "@types/react-dom": "18.3.1",
29
- "@uniformdev/canvas": "^20.9.0",
30
- "@uniformdev/richtext": "^20.9.0",
29
+ "@uniformdev/canvas": "^20.9.1-alpha.3+9f10f56702",
30
+ "@uniformdev/richtext": "^20.9.1-alpha.3+9f10f56702",
31
31
  "autoprefixer": "10.4.16",
32
32
  "hygen": "6.2.11",
33
33
  "postcss": "8.4.47",
@@ -55,7 +55,7 @@
55
55
  "@lexical/table": "0.25.0",
56
56
  "@lexical/utils": "0.25.0",
57
57
  "@monaco-editor/react": "4.6.0",
58
- "@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v5.2.1/react-icons-all-files-5.2.1.tgz",
58
+ "@react-icons/all-files": "https://github.com/react-icons/react-icons/releases/download/v5.5.0/react-icons-all-files-5.5.0.tgz",
59
59
  "fast-equals": "^5.0.1",
60
60
  "lexical": "0.25.0",
61
61
  "monaco-editor": "0.50.0",
@@ -77,5 +77,5 @@
77
77
  "publishConfig": {
78
78
  "access": "public"
79
79
  },
80
- "gitHead": "47e2e9af8e7e56d2c524c6057920fe6a9480a4a9"
80
+ "gitHead": "9f10f5670229b812c73e7db447e82c2617687f3a"
81
81
  }