@uniformdev/design-system 20.25.0 → 20.25.1
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 +17 -3
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +17 -3
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -4167,6 +4167,7 @@ var menuTriggerStyles = css25`
|
|
|
4167
4167
|
background: transparent;
|
|
4168
4168
|
padding: var(--spacing-xs);
|
|
4169
4169
|
color: var(--gray-600);
|
|
4170
|
+
border-radius: var(--rounded-sm);
|
|
4170
4171
|
transition: color var(--duration-fast) var(--timing-ease-out);
|
|
4171
4172
|
|
|
4172
4173
|
&:focus,
|
|
@@ -4174,6 +4175,10 @@ var menuTriggerStyles = css25`
|
|
|
4174
4175
|
outline: none;
|
|
4175
4176
|
color: var(--typography-base);
|
|
4176
4177
|
}
|
|
4178
|
+
|
|
4179
|
+
&:focus-visible {
|
|
4180
|
+
outline: 2px solid var(--accent-dark-active);
|
|
4181
|
+
}
|
|
4177
4182
|
`;
|
|
4178
4183
|
|
|
4179
4184
|
// src/components/Menu/Menu.tsx
|
|
@@ -8242,6 +8247,11 @@ var iconButton = css58`
|
|
|
8242
8247
|
justify-content: center;
|
|
8243
8248
|
width: var(--button-size);
|
|
8244
8249
|
height: var(--button-size);
|
|
8250
|
+
|
|
8251
|
+
&:disabled {
|
|
8252
|
+
filter: grayscale(100%);
|
|
8253
|
+
opacity: 0.5;
|
|
8254
|
+
}
|
|
8245
8255
|
`;
|
|
8246
8256
|
var sizes2 = {
|
|
8247
8257
|
xs: css58`
|
|
@@ -14590,7 +14600,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14590
14600
|
/* @__PURE__ */ jsxs86(
|
|
14591
14601
|
Menu,
|
|
14592
14602
|
{
|
|
14593
|
-
menuTrigger: /* @__PURE__ */ jsxs86("button", { css: [richTextToolbarButton, textStyleButton], title: "Text styles", children: [
|
|
14603
|
+
menuTrigger: /* @__PURE__ */ jsxs86("button", { css: [richTextToolbarButton, textStyleButton], title: "Text styles", type: "button", children: [
|
|
14594
14604
|
visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
14595
14605
|
" ",
|
|
14596
14606
|
/* @__PURE__ */ jsx128(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
@@ -14623,6 +14633,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14623
14633
|
"button",
|
|
14624
14634
|
{
|
|
14625
14635
|
"data-testid": `formatting-button-${format.type}`,
|
|
14636
|
+
type: "button",
|
|
14626
14637
|
onClick: () => {
|
|
14627
14638
|
editor.dispatchCommand(FORMAT_TEXT_COMMAND, format.type);
|
|
14628
14639
|
},
|
|
@@ -14636,7 +14647,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14636
14647
|
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ jsx128(
|
|
14637
14648
|
Menu,
|
|
14638
14649
|
{
|
|
14639
|
-
menuTrigger: /* @__PURE__ */ jsx128("button", { css: richTextToolbarButton, title: "Alternative text styles", children: /* @__PURE__ */ jsx128(Icon, { icon: "more-alt", css: toolbarIcon }) }),
|
|
14650
|
+
menuTrigger: /* @__PURE__ */ jsx128("button", { css: richTextToolbarButton, title: "Alternative text styles", type: "button", children: /* @__PURE__ */ jsx128(Icon, { icon: "more-alt", css: toolbarIcon }) }),
|
|
14640
14651
|
placement: "bottom-start",
|
|
14641
14652
|
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ jsx128(
|
|
14642
14653
|
MenuItem,
|
|
@@ -14656,6 +14667,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14656
14667
|
"button",
|
|
14657
14668
|
{
|
|
14658
14669
|
"data-testid": "element-link",
|
|
14670
|
+
type: "button",
|
|
14659
14671
|
onClick: () => {
|
|
14660
14672
|
if (isLink) {
|
|
14661
14673
|
editor.dispatchCommand(REMOVE_LINK_NODE_COMMAND, {});
|
|
@@ -14672,6 +14684,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14672
14684
|
"button",
|
|
14673
14685
|
{
|
|
14674
14686
|
"data-testid": "element-unordered-list",
|
|
14687
|
+
type: "button",
|
|
14675
14688
|
onClick: () => {
|
|
14676
14689
|
if (activeElement === "unorderedList") {
|
|
14677
14690
|
editor.dispatchCommand(REMOVE_LIST_COMMAND, void 0);
|
|
@@ -14690,6 +14703,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14690
14703
|
"button",
|
|
14691
14704
|
{
|
|
14692
14705
|
"data-testid": "element-ordered-list",
|
|
14706
|
+
type: "button",
|
|
14693
14707
|
onClick: () => {
|
|
14694
14708
|
if (activeElement === "orderedList") {
|
|
14695
14709
|
editor.dispatchCommand(REMOVE_LIST_COMMAND, void 0);
|
|
@@ -14710,7 +14724,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
14710
14724
|
visibleInsertElementsWithIcons.size > 0 ? /* @__PURE__ */ jsx128("div", { css: toolbarGroup, "data-testid": "rich-text-toolbar-insert", children: /* @__PURE__ */ jsxs86(
|
|
14711
14725
|
Menu,
|
|
14712
14726
|
{
|
|
14713
|
-
menuTrigger: /* @__PURE__ */ jsxs86("button", { css: richTextToolbarButton, title: "Insert block element", children: [
|
|
14727
|
+
menuTrigger: /* @__PURE__ */ jsxs86("button", { css: richTextToolbarButton, title: "Insert block element", type: "button", children: [
|
|
14714
14728
|
"Insert",
|
|
14715
14729
|
/* @__PURE__ */ jsx128(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
14716
14730
|
] }),
|
package/dist/index.d.mts
CHANGED
|
@@ -1164,13 +1164,12 @@ declare const allSupportedIcons: {
|
|
|
1164
1164
|
|
|
1165
1165
|
/** A list of available icon names that can be used with the Uniform brand */
|
|
1166
1166
|
type IconName = keyof typeof allSupportedIcons;
|
|
1167
|
-
|
|
1167
|
+
/** sets the type of icon to use from the available list */
|
|
1168
|
+
type IconType = IconName | IconType$1;
|
|
1168
1169
|
/** sets fill color of the svg icon
|
|
1169
1170
|
* @default 'default'
|
|
1170
1171
|
*/
|
|
1171
1172
|
type IconColor = 'white' | 'action' | 'default' | 'red' | 'gray' | 'gray300' | 'accent' | 'currentColor' | 'accent-dark' | 'accent-light' | 'accent-alt-dark';
|
|
1172
|
-
/** sets the type of icon to use from the available list */
|
|
1173
|
-
type IconType = IconName | IconType$1;
|
|
1174
1173
|
interface IconProps extends IconBaseProps {
|
|
1175
1174
|
/** sets the icon to be used */
|
|
1176
1175
|
icon: IconType;
|
|
@@ -1179,11 +1178,6 @@ interface IconProps extends IconBaseProps {
|
|
|
1179
1178
|
/** sets additional icon props provided by "react-icons" */
|
|
1180
1179
|
otherProps?: IconBaseProps;
|
|
1181
1180
|
}
|
|
1182
|
-
/**
|
|
1183
|
-
* Component that renders icons
|
|
1184
|
-
* @example <Icon icon="add-r" iconColor="currentColor" />
|
|
1185
|
-
*/
|
|
1186
|
-
declare const Icon: React__default.MemoExoticComponent<({ icon, iconColor, size, ...otherProps }: IconProps) => _emotion_react_jsx_runtime.JSX.Element | null>;
|
|
1187
1181
|
|
|
1188
1182
|
declare const rectangleRoundedIcon: (props: _react_icons_all_files.IconBaseProps) => React.JSX.Element;
|
|
1189
1183
|
declare const cardIcon: (props: _react_icons_all_files.IconBaseProps) => React.JSX.Element;
|
|
@@ -1238,6 +1232,12 @@ declare const customIcons: {
|
|
|
1238
1232
|
'zig-zag-thick': (props: _react_icons_all_files.IconBaseProps) => React.JSX.Element;
|
|
1239
1233
|
};
|
|
1240
1234
|
|
|
1235
|
+
/**
|
|
1236
|
+
* Component that renders icons
|
|
1237
|
+
* @example <Icon icon="add-r" iconColor="currentColor" />
|
|
1238
|
+
*/
|
|
1239
|
+
declare const Icon: React__default.MemoExoticComponent<({ icon, iconColor, size, ...otherProps }: IconProps) => _emotion_react_jsx_runtime.JSX.Element | null>;
|
|
1240
|
+
|
|
1241
1241
|
type IconsMap = Record<string, IconType$1>;
|
|
1242
1242
|
declare function useIconContext(): {
|
|
1243
1243
|
iconsMap: IconsMap;
|
package/dist/index.d.ts
CHANGED
|
@@ -1164,13 +1164,12 @@ declare const allSupportedIcons: {
|
|
|
1164
1164
|
|
|
1165
1165
|
/** A list of available icon names that can be used with the Uniform brand */
|
|
1166
1166
|
type IconName = keyof typeof allSupportedIcons;
|
|
1167
|
-
|
|
1167
|
+
/** sets the type of icon to use from the available list */
|
|
1168
|
+
type IconType = IconName | IconType$1;
|
|
1168
1169
|
/** sets fill color of the svg icon
|
|
1169
1170
|
* @default 'default'
|
|
1170
1171
|
*/
|
|
1171
1172
|
type IconColor = 'white' | 'action' | 'default' | 'red' | 'gray' | 'gray300' | 'accent' | 'currentColor' | 'accent-dark' | 'accent-light' | 'accent-alt-dark';
|
|
1172
|
-
/** sets the type of icon to use from the available list */
|
|
1173
|
-
type IconType = IconName | IconType$1;
|
|
1174
1173
|
interface IconProps extends IconBaseProps {
|
|
1175
1174
|
/** sets the icon to be used */
|
|
1176
1175
|
icon: IconType;
|
|
@@ -1179,11 +1178,6 @@ interface IconProps extends IconBaseProps {
|
|
|
1179
1178
|
/** sets additional icon props provided by "react-icons" */
|
|
1180
1179
|
otherProps?: IconBaseProps;
|
|
1181
1180
|
}
|
|
1182
|
-
/**
|
|
1183
|
-
* Component that renders icons
|
|
1184
|
-
* @example <Icon icon="add-r" iconColor="currentColor" />
|
|
1185
|
-
*/
|
|
1186
|
-
declare const Icon: React__default.MemoExoticComponent<({ icon, iconColor, size, ...otherProps }: IconProps) => _emotion_react_jsx_runtime.JSX.Element | null>;
|
|
1187
1181
|
|
|
1188
1182
|
declare const rectangleRoundedIcon: (props: _react_icons_all_files.IconBaseProps) => React.JSX.Element;
|
|
1189
1183
|
declare const cardIcon: (props: _react_icons_all_files.IconBaseProps) => React.JSX.Element;
|
|
@@ -1238,6 +1232,12 @@ declare const customIcons: {
|
|
|
1238
1232
|
'zig-zag-thick': (props: _react_icons_all_files.IconBaseProps) => React.JSX.Element;
|
|
1239
1233
|
};
|
|
1240
1234
|
|
|
1235
|
+
/**
|
|
1236
|
+
* Component that renders icons
|
|
1237
|
+
* @example <Icon icon="add-r" iconColor="currentColor" />
|
|
1238
|
+
*/
|
|
1239
|
+
declare const Icon: React__default.MemoExoticComponent<({ icon, iconColor, size, ...otherProps }: IconProps) => _emotion_react_jsx_runtime.JSX.Element | null>;
|
|
1240
|
+
|
|
1241
1241
|
type IconsMap = Record<string, IconType$1>;
|
|
1242
1242
|
declare function useIconContext(): {
|
|
1243
1243
|
iconsMap: IconsMap;
|
package/dist/index.js
CHANGED
|
@@ -5892,6 +5892,7 @@ var menuTriggerStyles = import_react35.css`
|
|
|
5892
5892
|
background: transparent;
|
|
5893
5893
|
padding: var(--spacing-xs);
|
|
5894
5894
|
color: var(--gray-600);
|
|
5895
|
+
border-radius: var(--rounded-sm);
|
|
5895
5896
|
transition: color var(--duration-fast) var(--timing-ease-out);
|
|
5896
5897
|
|
|
5897
5898
|
&:focus,
|
|
@@ -5899,6 +5900,10 @@ var menuTriggerStyles = import_react35.css`
|
|
|
5899
5900
|
outline: none;
|
|
5900
5901
|
color: var(--typography-base);
|
|
5901
5902
|
}
|
|
5903
|
+
|
|
5904
|
+
&:focus-visible {
|
|
5905
|
+
outline: 2px solid var(--accent-dark-active);
|
|
5906
|
+
}
|
|
5902
5907
|
`;
|
|
5903
5908
|
|
|
5904
5909
|
// src/components/Menu/Menu.tsx
|
|
@@ -10057,6 +10062,11 @@ var iconButton = import_react88.css`
|
|
|
10057
10062
|
justify-content: center;
|
|
10058
10063
|
width: var(--button-size);
|
|
10059
10064
|
height: var(--button-size);
|
|
10065
|
+
|
|
10066
|
+
&:disabled {
|
|
10067
|
+
filter: grayscale(100%);
|
|
10068
|
+
opacity: 0.5;
|
|
10069
|
+
}
|
|
10060
10070
|
`;
|
|
10061
10071
|
var sizes2 = {
|
|
10062
10072
|
xs: import_react88.css`
|
|
@@ -16444,7 +16454,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16444
16454
|
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
16445
16455
|
Menu,
|
|
16446
16456
|
{
|
|
16447
|
-
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("button", { css: [richTextToolbarButton, textStyleButton], title: "Text styles", children: [
|
|
16457
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("button", { css: [richTextToolbarButton, textStyleButton], title: "Text styles", type: "button", children: [
|
|
16448
16458
|
visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
|
|
16449
16459
|
" ",
|
|
16450
16460
|
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
@@ -16477,6 +16487,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16477
16487
|
"button",
|
|
16478
16488
|
{
|
|
16479
16489
|
"data-testid": `formatting-button-${format.type}`,
|
|
16490
|
+
type: "button",
|
|
16480
16491
|
onClick: () => {
|
|
16481
16492
|
editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, format.type);
|
|
16482
16493
|
},
|
|
@@ -16490,7 +16501,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16490
16501
|
visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
16491
16502
|
Menu,
|
|
16492
16503
|
{
|
|
16493
|
-
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("button", { css: richTextToolbarButton, title: "Alternative text styles", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { icon: "more-alt", css: toolbarIcon }) }),
|
|
16504
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("button", { css: richTextToolbarButton, title: "Alternative text styles", type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { icon: "more-alt", css: toolbarIcon }) }),
|
|
16494
16505
|
placement: "bottom-start",
|
|
16495
16506
|
children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
16496
16507
|
MenuItem,
|
|
@@ -16510,6 +16521,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16510
16521
|
"button",
|
|
16511
16522
|
{
|
|
16512
16523
|
"data-testid": "element-link",
|
|
16524
|
+
type: "button",
|
|
16513
16525
|
onClick: () => {
|
|
16514
16526
|
if (isLink) {
|
|
16515
16527
|
editor.dispatchCommand(REMOVE_LINK_NODE_COMMAND, {});
|
|
@@ -16526,6 +16538,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16526
16538
|
"button",
|
|
16527
16539
|
{
|
|
16528
16540
|
"data-testid": "element-unordered-list",
|
|
16541
|
+
type: "button",
|
|
16529
16542
|
onClick: () => {
|
|
16530
16543
|
if (activeElement === "unorderedList") {
|
|
16531
16544
|
editor.dispatchCommand(import_list2.REMOVE_LIST_COMMAND, void 0);
|
|
@@ -16544,6 +16557,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16544
16557
|
"button",
|
|
16545
16558
|
{
|
|
16546
16559
|
"data-testid": "element-ordered-list",
|
|
16560
|
+
type: "button",
|
|
16547
16561
|
onClick: () => {
|
|
16548
16562
|
if (activeElement === "orderedList") {
|
|
16549
16563
|
editor.dispatchCommand(import_list2.REMOVE_LIST_COMMAND, void 0);
|
|
@@ -16564,7 +16578,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
|
|
|
16564
16578
|
visibleInsertElementsWithIcons.size > 0 ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("div", { css: toolbarGroup, "data-testid": "rich-text-toolbar-insert", children: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
16565
16579
|
Menu,
|
|
16566
16580
|
{
|
|
16567
|
-
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("button", { css: richTextToolbarButton, title: "Insert block element", children: [
|
|
16581
|
+
menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("button", { css: richTextToolbarButton, title: "Insert block element", type: "button", children: [
|
|
16568
16582
|
"Insert",
|
|
16569
16583
|
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
|
|
16570
16584
|
] }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "20.25.
|
|
3
|
+
"version": "20.25.1",
|
|
4
4
|
"description": "Uniform design system components",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"exports": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@storybook/theming": "^8.3.3",
|
|
39
39
|
"@types/react": "18.3.11",
|
|
40
40
|
"@types/react-dom": "18.3.1",
|
|
41
|
-
"@uniformdev/canvas": "^20.25.
|
|
42
|
-
"@uniformdev/richtext": "^20.25.
|
|
41
|
+
"@uniformdev/canvas": "^20.25.1",
|
|
42
|
+
"@uniformdev/richtext": "^20.25.1",
|
|
43
43
|
"@vitest/coverage-v8": "^3.1.2",
|
|
44
44
|
"autoprefixer": "10.4.21",
|
|
45
45
|
"hygen": "6.2.11",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"publishConfig": {
|
|
92
92
|
"access": "public"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "ff2a3aff48b99c1b81865a082cec9bd72f56d2d3"
|
|
95
95
|
}
|