@uniformdev/design-system 20.25.0 → 20.25.2-alpha.0

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
@@ -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`
@@ -12420,6 +12430,20 @@ var getLabelForElement = (type) => {
12420
12430
  const element = richTextBuiltInElements.find((element2) => element2.type === type);
12421
12431
  return (_a = element == null ? void 0 : element.label) != null ? _a : type;
12422
12432
  };
12433
+ var defaultParameterConfiguration = {
12434
+ required: false,
12435
+ formatting: {
12436
+ builtIn: richTextBuiltInFormats.map((format) => format.type)
12437
+ },
12438
+ elements: {
12439
+ builtIn: richTextBuiltInElements.map((element) => element.type)
12440
+ },
12441
+ elementsConfig: {
12442
+ asset: {
12443
+ allowedTypes: ["image"]
12444
+ }
12445
+ }
12446
+ };
12423
12447
 
12424
12448
  // src/components/ParameterInputs/ParameterRichText.tsx
12425
12449
  import { deepEqual as deepEqual2 } from "fast-equals";
@@ -14590,7 +14614,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
14590
14614
  /* @__PURE__ */ jsxs86(
14591
14615
  Menu,
14592
14616
  {
14593
- menuTrigger: /* @__PURE__ */ jsxs86("button", { css: [richTextToolbarButton, textStyleButton], title: "Text styles", children: [
14617
+ menuTrigger: /* @__PURE__ */ jsxs86("button", { css: [richTextToolbarButton, textStyleButton], title: "Text styles", type: "button", children: [
14594
14618
  visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
14595
14619
  " ",
14596
14620
  /* @__PURE__ */ jsx128(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
@@ -14623,6 +14647,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
14623
14647
  "button",
14624
14648
  {
14625
14649
  "data-testid": `formatting-button-${format.type}`,
14650
+ type: "button",
14626
14651
  onClick: () => {
14627
14652
  editor.dispatchCommand(FORMAT_TEXT_COMMAND, format.type);
14628
14653
  },
@@ -14636,7 +14661,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
14636
14661
  visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ jsx128(
14637
14662
  Menu,
14638
14663
  {
14639
- menuTrigger: /* @__PURE__ */ jsx128("button", { css: richTextToolbarButton, title: "Alternative text styles", children: /* @__PURE__ */ jsx128(Icon, { icon: "more-alt", css: toolbarIcon }) }),
14664
+ menuTrigger: /* @__PURE__ */ jsx128("button", { css: richTextToolbarButton, title: "Alternative text styles", type: "button", children: /* @__PURE__ */ jsx128(Icon, { icon: "more-alt", css: toolbarIcon }) }),
14640
14665
  placement: "bottom-start",
14641
14666
  children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ jsx128(
14642
14667
  MenuItem,
@@ -14656,6 +14681,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
14656
14681
  "button",
14657
14682
  {
14658
14683
  "data-testid": "element-link",
14684
+ type: "button",
14659
14685
  onClick: () => {
14660
14686
  if (isLink) {
14661
14687
  editor.dispatchCommand(REMOVE_LINK_NODE_COMMAND, {});
@@ -14672,6 +14698,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
14672
14698
  "button",
14673
14699
  {
14674
14700
  "data-testid": "element-unordered-list",
14701
+ type: "button",
14675
14702
  onClick: () => {
14676
14703
  if (activeElement === "unorderedList") {
14677
14704
  editor.dispatchCommand(REMOVE_LIST_COMMAND, void 0);
@@ -14690,6 +14717,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
14690
14717
  "button",
14691
14718
  {
14692
14719
  "data-testid": "element-ordered-list",
14720
+ type: "button",
14693
14721
  onClick: () => {
14694
14722
  if (activeElement === "orderedList") {
14695
14723
  editor.dispatchCommand(REMOVE_LIST_COMMAND, void 0);
@@ -14710,7 +14738,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
14710
14738
  visibleInsertElementsWithIcons.size > 0 ? /* @__PURE__ */ jsx128("div", { css: toolbarGroup, "data-testid": "rich-text-toolbar-insert", children: /* @__PURE__ */ jsxs86(
14711
14739
  Menu,
14712
14740
  {
14713
- menuTrigger: /* @__PURE__ */ jsxs86("button", { css: richTextToolbarButton, title: "Insert block element", children: [
14741
+ menuTrigger: /* @__PURE__ */ jsxs86("button", { css: richTextToolbarButton, title: "Insert block element", type: "button", children: [
14714
14742
  "Insert",
14715
14743
  /* @__PURE__ */ jsx128(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
14716
14744
  ] }),
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`
@@ -14337,6 +14347,20 @@ var getLabelForElement = (type) => {
14337
14347
  const element = richTextBuiltInElements.find((element2) => element2.type === type);
14338
14348
  return (_a = element == null ? void 0 : element.label) != null ? _a : type;
14339
14349
  };
14350
+ var defaultParameterConfiguration = {
14351
+ required: false,
14352
+ formatting: {
14353
+ builtIn: richTextBuiltInFormats.map((format) => format.type)
14354
+ },
14355
+ elements: {
14356
+ builtIn: richTextBuiltInElements.map((element) => element.type)
14357
+ },
14358
+ elementsConfig: {
14359
+ asset: {
14360
+ allowedTypes: ["image"]
14361
+ }
14362
+ }
14363
+ };
14340
14364
 
14341
14365
  // src/components/ParameterInputs/ParameterRichText.tsx
14342
14366
  var import_fast_equals2 = require("fast-equals");
@@ -16444,7 +16468,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
16444
16468
  /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
16445
16469
  Menu,
16446
16470
  {
16447
- menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("button", { css: [richTextToolbarButton, textStyleButton], title: "Text styles", children: [
16471
+ menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("button", { css: [richTextToolbarButton, textStyleButton], title: "Text styles", type: "button", children: [
16448
16472
  visibleTextualElements.some((element) => element.type === activeElement) ? getLabelForElement(activeElement) : getLabelForElement("paragraph"),
16449
16473
  " ",
16450
16474
  /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
@@ -16477,6 +16501,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
16477
16501
  "button",
16478
16502
  {
16479
16503
  "data-testid": `formatting-button-${format.type}`,
16504
+ type: "button",
16480
16505
  onClick: () => {
16481
16506
  editor.dispatchCommand(import_lexical9.FORMAT_TEXT_COMMAND, format.type);
16482
16507
  },
@@ -16490,7 +16515,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
16490
16515
  visibleFormatsWithoutIcon.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
16491
16516
  Menu,
16492
16517
  {
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 }) }),
16518
+ 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
16519
  placement: "bottom-start",
16495
16520
  children: visibleFormatsWithoutIcon.map((format) => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
16496
16521
  MenuItem,
@@ -16510,6 +16535,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
16510
16535
  "button",
16511
16536
  {
16512
16537
  "data-testid": "element-link",
16538
+ type: "button",
16513
16539
  onClick: () => {
16514
16540
  if (isLink) {
16515
16541
  editor.dispatchCommand(REMOVE_LINK_NODE_COMMAND, {});
@@ -16526,6 +16552,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
16526
16552
  "button",
16527
16553
  {
16528
16554
  "data-testid": "element-unordered-list",
16555
+ type: "button",
16529
16556
  onClick: () => {
16530
16557
  if (activeElement === "unorderedList") {
16531
16558
  editor.dispatchCommand(import_list2.REMOVE_LIST_COMMAND, void 0);
@@ -16544,6 +16571,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
16544
16571
  "button",
16545
16572
  {
16546
16573
  "data-testid": "element-ordered-list",
16574
+ type: "button",
16547
16575
  onClick: () => {
16548
16576
  if (activeElement === "orderedList") {
16549
16577
  editor.dispatchCommand(import_list2.REMOVE_LIST_COMMAND, void 0);
@@ -16564,7 +16592,7 @@ var RichTextToolbar = ({ config, customControls, onInsertTable, onInsertAsset })
16564
16592
  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
16593
  Menu,
16566
16594
  {
16567
- menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("button", { css: richTextToolbarButton, title: "Insert block element", children: [
16595
+ menuTrigger: /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("button", { css: richTextToolbarButton, title: "Insert block element", type: "button", children: [
16568
16596
  "Insert",
16569
16597
  /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(Icon, { icon: "chevron-down", css: [toolbarIcon, toolbarChevron], size: "1rem" })
16570
16598
  ] }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "20.25.0",
3
+ "version": "20.25.2-alpha.0+93d3ffc2f1",
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.0",
42
- "@uniformdev/richtext": "^20.25.0",
41
+ "@uniformdev/canvas": "^20.25.2-alpha.0+93d3ffc2f1",
42
+ "@uniformdev/richtext": "^20.25.2-alpha.0+93d3ffc2f1",
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": "3fe795ce670ac4b96982a833d234059ad5a47995"
94
+ "gitHead": "93d3ffc2f1717d4ab6789d483ca7164f68a36b72"
95
95
  }