@uniformdev/design-system 20.7.1-alpha.18 → 20.7.1-alpha.26
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 +20 -7
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +20 -7
- package/package.json +5 -5
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
|
}
|
|
@@ -10480,6 +10483,7 @@ var ObjectGridItemMediaInner = css77`
|
|
|
10480
10483
|
flex: 1;
|
|
10481
10484
|
overflow: hidden;
|
|
10482
10485
|
height: 100%;
|
|
10486
|
+
z-index: 0;
|
|
10483
10487
|
`;
|
|
10484
10488
|
var ObjectGridItemContentWrapper = css77`
|
|
10485
10489
|
display: grid;
|
|
@@ -10660,8 +10664,8 @@ var ObjectGridItemCardCover = (props) => {
|
|
|
10660
10664
|
) });
|
|
10661
10665
|
}
|
|
10662
10666
|
if ("icon" in props && props.icon) {
|
|
10663
|
-
const { icon, iconColor } = props;
|
|
10664
|
-
return /* @__PURE__ */ jsx101("div", { css: CoverContainer, children: /* @__PURE__ */ jsxs67("div", { css: CoverIconWrapper, "data-testid": "object-grid-item-thumbnail", ...
|
|
10667
|
+
const { icon, iconColor, ...rest } = props;
|
|
10668
|
+
return /* @__PURE__ */ jsx101("div", { css: CoverContainer, children: /* @__PURE__ */ jsxs67("div", { css: CoverIconWrapper, "data-testid": "object-grid-item-thumbnail", ...rest, children: [
|
|
10665
10669
|
/* @__PURE__ */ jsx101(Icon, { icon, iconColor: iconColor != null ? iconColor : "currentColor", css: CoverIconGhost }),
|
|
10666
10670
|
/* @__PURE__ */ jsx101(Icon, { icon, iconColor: iconColor != null ? iconColor : "currentColor", size: 48 })
|
|
10667
10671
|
] }) });
|
|
@@ -10984,13 +10988,21 @@ var ObjectListItem2 = ({ minContainerQueryWidth = "34rem", ...props }) => {
|
|
|
10984
10988
|
css: [
|
|
10985
10989
|
ObjectListItemContentWrapper,
|
|
10986
10990
|
`${cq(minContainerQueryWidth)} {
|
|
10987
|
-
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);
|
|
10988
10992
|
}`
|
|
10989
10993
|
],
|
|
10990
10994
|
children: [
|
|
10991
|
-
/* @__PURE__ */ jsx106(HorizontalRhythm, { gap: "sm", align: "center", children: cover }),
|
|
10995
|
+
cover ? /* @__PURE__ */ jsx106(HorizontalRhythm, { gap: "sm", align: "center", children: cover }) : null,
|
|
10992
10996
|
/* @__PURE__ */ jsxs71(VerticalRhythm, { gap: "0", justify: renderAs === "multi" ? "flex-start" : "center", children: [
|
|
10993
|
-
/* @__PURE__ */ jsx106(
|
|
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
|
+
),
|
|
10994
11006
|
renderAs === "multi" ? props.children : null
|
|
10995
11007
|
] }),
|
|
10996
11008
|
/* @__PURE__ */ jsx106(HorizontalRhythm, { gap: "xs", align: renderAs === "multi" ? "flex-start" : "center", children: rightSlot })
|
|
@@ -15533,6 +15545,7 @@ var SegmentedControl = ({
|
|
|
15533
15545
|
}
|
|
15534
15546
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
15535
15547
|
const isDisabled = disabled2 || option.disabled;
|
|
15548
|
+
const isChecked = option.value === value;
|
|
15536
15549
|
return /* @__PURE__ */ jsx134(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ jsx134(
|
|
15537
15550
|
"div",
|
|
15538
15551
|
{
|
|
@@ -15542,7 +15555,7 @@ var SegmentedControl = ({
|
|
|
15542
15555
|
"label",
|
|
15543
15556
|
{
|
|
15544
15557
|
css: [
|
|
15545
|
-
segmentedControlLabelStyles(
|
|
15558
|
+
segmentedControlLabelStyles(isChecked, isDisabled),
|
|
15546
15559
|
sizeStyles,
|
|
15547
15560
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
15548
15561
|
],
|
|
@@ -15554,7 +15567,7 @@ var SegmentedControl = ({
|
|
|
15554
15567
|
type: "radio",
|
|
15555
15568
|
name,
|
|
15556
15569
|
value: index,
|
|
15557
|
-
checked:
|
|
15570
|
+
checked: isChecked,
|
|
15558
15571
|
onChange: onOptionChange,
|
|
15559
15572
|
disabled: isDisabled
|
|
15560
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
|
-
/**
|
|
388
|
-
|
|
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
|
-
/**
|
|
388
|
-
|
|
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
|
}
|
|
@@ -12339,6 +12342,7 @@ var ObjectGridItemMediaInner = import_react118.css`
|
|
|
12339
12342
|
flex: 1;
|
|
12340
12343
|
overflow: hidden;
|
|
12341
12344
|
height: 100%;
|
|
12345
|
+
z-index: 0;
|
|
12342
12346
|
`;
|
|
12343
12347
|
var ObjectGridItemContentWrapper = import_react118.css`
|
|
12344
12348
|
display: grid;
|
|
@@ -12523,8 +12527,8 @@ var ObjectGridItemCardCover = (props) => {
|
|
|
12523
12527
|
) });
|
|
12524
12528
|
}
|
|
12525
12529
|
if ("icon" in props && props.icon) {
|
|
12526
|
-
const { icon, iconColor } = props;
|
|
12527
|
-
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { css: CoverContainer, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { css: CoverIconWrapper, "data-testid": "object-grid-item-thumbnail", ...
|
|
12530
|
+
const { icon, iconColor, ...rest } = props;
|
|
12531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { css: CoverContainer, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { css: CoverIconWrapper, "data-testid": "object-grid-item-thumbnail", ...rest, children: [
|
|
12528
12532
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Icon, { icon, iconColor: iconColor != null ? iconColor : "currentColor", css: CoverIconGhost }),
|
|
12529
12533
|
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Icon, { icon, iconColor: iconColor != null ? iconColor : "currentColor", size: 48 })
|
|
12530
12534
|
] }) });
|
|
@@ -12859,13 +12863,21 @@ var ObjectListItem2 = ({ minContainerQueryWidth = "34rem", ...props }) => {
|
|
|
12859
12863
|
css: [
|
|
12860
12864
|
ObjectListItemContentWrapper,
|
|
12861
12865
|
`${cq(minContainerQueryWidth)} {
|
|
12862
|
-
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);
|
|
12863
12867
|
}`
|
|
12864
12868
|
],
|
|
12865
12869
|
children: [
|
|
12866
|
-
/* @__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,
|
|
12867
12871
|
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(VerticalRhythm, { gap: "0", justify: renderAs === "multi" ? "flex-start" : "center", children: [
|
|
12868
|
-
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
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
|
+
),
|
|
12869
12881
|
renderAs === "multi" ? props.children : null
|
|
12870
12882
|
] }),
|
|
12871
12883
|
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(HorizontalRhythm, { gap: "xs", align: renderAs === "multi" ? "flex-start" : "center", children: rightSlot })
|
|
@@ -17378,6 +17390,7 @@ var SegmentedControl = ({
|
|
|
17378
17390
|
}
|
|
17379
17391
|
const text = option.label ? option.label : option.icon ? null : String(option.value);
|
|
17380
17392
|
const isDisabled = disabled2 || option.disabled;
|
|
17393
|
+
const isChecked = option.value === value;
|
|
17381
17394
|
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(Tooltip, { title: (_a = option.tooltip) != null ? _a : "", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
17382
17395
|
"div",
|
|
17383
17396
|
{
|
|
@@ -17387,7 +17400,7 @@ var SegmentedControl = ({
|
|
|
17387
17400
|
"label",
|
|
17388
17401
|
{
|
|
17389
17402
|
css: [
|
|
17390
|
-
segmentedControlLabelStyles(
|
|
17403
|
+
segmentedControlLabelStyles(isChecked, isDisabled),
|
|
17391
17404
|
sizeStyles,
|
|
17392
17405
|
isIconOnly ? segmentedControlLabelIconOnlyStyles : void 0
|
|
17393
17406
|
],
|
|
@@ -17399,7 +17412,7 @@ var SegmentedControl = ({
|
|
|
17399
17412
|
type: "radio",
|
|
17400
17413
|
name,
|
|
17401
17414
|
value: index,
|
|
17402
|
-
checked:
|
|
17415
|
+
checked: isChecked,
|
|
17403
17416
|
onChange: onOptionChange,
|
|
17404
17417
|
disabled: isDisabled
|
|
17405
17418
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "20.7.1-alpha.
|
|
3
|
+
"version": "20.7.1-alpha.26+03c49728b3",
|
|
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.7.1-alpha.
|
|
30
|
-
"@uniformdev/richtext": "^20.7.1-alpha.
|
|
29
|
+
"@uniformdev/canvas": "^20.7.1-alpha.26+03c49728b3",
|
|
30
|
+
"@uniformdev/richtext": "^20.7.1-alpha.26+03c49728b3",
|
|
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.
|
|
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": "
|
|
80
|
+
"gitHead": "03c49728b3fb82b57e64265bde2f950f12ee7cb6"
|
|
81
81
|
}
|