@uniformdev/design-system 19.88.0 → 19.89.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
@@ -13999,7 +13999,7 @@ var WarningIcon = css50`
13999
13999
  // src/components/Input/WarningMessage.tsx
14000
14000
  import { jsx as jsx55, jsxs as jsxs33 } from "@emotion/react/jsx-runtime";
14001
14001
  var WarningMessage = ({ message, testId, ...props }) => {
14002
- return message ? /* @__PURE__ */ jsxs33("span", { role: "status", css: WarningText, "data-testid": testId, ...props, children: [
14002
+ return message ? /* @__PURE__ */ jsxs33("span", { role: "status", css: WarningText, "data-testid": testId != null ? testId : "message-text", ...props, children: [
14003
14003
  /* @__PURE__ */ jsx55("span", { children: /* @__PURE__ */ jsx55(Icon, { css: WarningIcon, icon: MdWarning2, size: "1rem", iconColor: "currentColor" }) }),
14004
14004
  message
14005
14005
  ] }) : null;
@@ -16666,6 +16666,11 @@ var inputMenu = css76`
16666
16666
  position: absolute;
16667
16667
  top: calc(var(--spacing-md) * -1.2);
16668
16668
  right: 0;
16669
+ `;
16670
+ var inputActionItems = css76`
16671
+ display: flex;
16672
+ `;
16673
+ var inputMenuHover = css76`
16669
16674
  opacity: var(--opacity-50);
16670
16675
  transition: background-color var(--duration-fast) var(--timing-ease-out);
16671
16676
 
@@ -16961,7 +16966,7 @@ var ParameterMenuButton = forwardRef12(
16961
16966
  "button",
16962
16967
  {
16963
16968
  className: "parameter-menu",
16964
- css: inputMenu,
16969
+ css: [inputMenu, inputMenuHover],
16965
16970
  type: "button",
16966
16971
  "aria-label": `${label} options`,
16967
16972
  ref,
@@ -17083,9 +17088,7 @@ var ParameterShell = ({
17083
17088
  {
17084
17089
  css: [
17085
17090
  inputMenu,
17086
- css81`
17087
- opacity: var(--opacity-100);
17088
- `,
17091
+ inputActionItems,
17089
17092
  menuItems ? css81`
17090
17093
  right: var(--spacing-md);
17091
17094
  ` : void 0
@@ -18904,7 +18907,7 @@ var RichText = ({
18904
18907
  return () => {
18905
18908
  removeUpdateListener();
18906
18909
  };
18907
- }, []);
18910
+ }, [editor, onChange]);
18908
18911
  return /* @__PURE__ */ jsxs71(Fragment18, { children: [
18909
18912
  readOnly ? null : /* @__PURE__ */ jsx106(RichTextToolbar_default, { config, customControls }),
18910
18913
  /* @__PURE__ */ jsxs71("div", { css: editorContainer, ref: editorContainerRef, "data-testid": "value-container", children: [
@@ -19360,7 +19363,7 @@ var SegmentedControl = ({
19360
19363
  return map[size];
19361
19364
  }, [size]);
19362
19365
  const isIconOnly = useMemo5(() => {
19363
- return options.every((option) => option.icon && !option.label);
19366
+ return options.every((option) => option && option.icon && !option.label);
19364
19367
  }, [options]);
19365
19368
  return /* @__PURE__ */ jsx112(
19366
19369
  "div",
@@ -19368,6 +19371,9 @@ var SegmentedControl = ({
19368
19371
  css: [segmentedControlStyles, orientation === "vertical" ? segmentedControlVerticalStyles : void 0],
19369
19372
  ...props,
19370
19373
  children: options.map((option, index) => {
19374
+ if (!option) {
19375
+ return null;
19376
+ }
19371
19377
  const text = option.label ? option.label : option.icon ? null : String(option.value);
19372
19378
  const isDisabled = disabled2 || option.disabled;
19373
19379
  return /* @__PURE__ */ jsx112(
package/dist/index.d.mts CHANGED
@@ -22776,7 +22776,7 @@ type SegmentedControlProps<TValue extends string = string> = Omit<React__default
22776
22776
  /** A unique name for the component, used to group the options */
22777
22777
  name: string;
22778
22778
  /** The options to show */
22779
- options: SegmentedControlOption<TValue>[];
22779
+ options: Array<SegmentedControlOption<TValue> | undefined>;
22780
22780
  /** The value of the option to be selected */
22781
22781
  value?: TValue;
22782
22782
  /** Called when the user selects a different option */
package/dist/index.d.ts CHANGED
@@ -22776,7 +22776,7 @@ type SegmentedControlProps<TValue extends string = string> = Omit<React__default
22776
22776
  /** A unique name for the component, used to group the options */
22777
22777
  name: string;
22778
22778
  /** The options to show */
22779
- options: SegmentedControlOption<TValue>[];
22779
+ options: Array<SegmentedControlOption<TValue> | undefined>;
22780
22780
  /** The value of the option to be selected */
22781
22781
  value?: TValue;
22782
22782
  /** Called when the user selects a different option */
package/dist/index.js CHANGED
@@ -15723,7 +15723,7 @@ var WarningIcon = import_react68.css`
15723
15723
  // src/components/Input/WarningMessage.tsx
15724
15724
  var import_jsx_runtime55 = require("@emotion/react/jsx-runtime");
15725
15725
  var WarningMessage = ({ message, testId, ...props }) => {
15726
- return message ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { role: "status", css: WarningText, "data-testid": testId, ...props, children: [
15726
+ return message ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { role: "status", css: WarningText, "data-testid": testId != null ? testId : "message-text", ...props, children: [
15727
15727
  /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Icon, { css: WarningIcon, icon: import_MdWarning2.MdWarning, size: "1rem", iconColor: "currentColor" }) }),
15728
15728
  message
15729
15729
  ] }) : null;
@@ -18471,6 +18471,11 @@ var inputMenu = import_react102.css`
18471
18471
  position: absolute;
18472
18472
  top: calc(var(--spacing-md) * -1.2);
18473
18473
  right: 0;
18474
+ `;
18475
+ var inputActionItems = import_react102.css`
18476
+ display: flex;
18477
+ `;
18478
+ var inputMenuHover = import_react102.css`
18474
18479
  opacity: var(--opacity-50);
18475
18480
  transition: background-color var(--duration-fast) var(--timing-ease-out);
18476
18481
 
@@ -18778,7 +18783,7 @@ var ParameterMenuButton = (0, import_react108.forwardRef)(
18778
18783
  "button",
18779
18784
  {
18780
18785
  className: "parameter-menu",
18781
- css: inputMenu,
18786
+ css: [inputMenu, inputMenuHover],
18782
18787
  type: "button",
18783
18788
  "aria-label": `${label} options`,
18784
18789
  ref,
@@ -18901,9 +18906,7 @@ var ParameterShell = ({
18901
18906
  {
18902
18907
  css: [
18903
18908
  inputMenu,
18904
- import_react110.css`
18905
- opacity: var(--opacity-100);
18906
- `,
18909
+ inputActionItems,
18907
18910
  menuItems ? import_react110.css`
18908
18911
  right: var(--spacing-md);
18909
18912
  ` : void 0
@@ -20697,7 +20700,7 @@ var RichText = ({
20697
20700
  return () => {
20698
20701
  removeUpdateListener();
20699
20702
  };
20700
- }, []);
20703
+ }, [editor, onChange]);
20701
20704
  return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_jsx_runtime106.Fragment, { children: [
20702
20705
  readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(RichTextToolbar_default, { config, customControls }),
20703
20706
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { css: editorContainer, ref: editorContainerRef, "data-testid": "value-container", children: [
@@ -21164,7 +21167,7 @@ var SegmentedControl = ({
21164
21167
  return map[size];
21165
21168
  }, [size]);
21166
21169
  const isIconOnly = (0, import_react132.useMemo)(() => {
21167
- return options.every((option) => option.icon && !option.label);
21170
+ return options.every((option) => option && option.icon && !option.label);
21168
21171
  }, [options]);
21169
21172
  return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
21170
21173
  "div",
@@ -21172,6 +21175,9 @@ var SegmentedControl = ({
21172
21175
  css: [segmentedControlStyles, orientation === "vertical" ? segmentedControlVerticalStyles : void 0],
21173
21176
  ...props,
21174
21177
  children: options.map((option, index) => {
21178
+ if (!option) {
21179
+ return null;
21180
+ }
21175
21181
  const text = option.label ? option.label : option.icon ? null : String(option.value);
21176
21182
  const isDisabled = disabled2 || option.disabled;
21177
21183
  return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "19.88.0",
3
+ "version": "19.89.0",
4
4
  "description": "Uniform design system components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -23,8 +23,8 @@
23
23
  "@storybook/react": "6.5.16",
24
24
  "@types/react": "18.2.40",
25
25
  "@types/react-dom": "18.2.17",
26
- "@uniformdev/canvas": "^19.88.0",
27
- "@uniformdev/richtext": "^19.88.0",
26
+ "@uniformdev/canvas": "^19.89.0",
27
+ "@uniformdev/richtext": "^19.89.0",
28
28
  "autoprefixer": "10.4.16",
29
29
  "hygen": "6.2.11",
30
30
  "postcss": "8.4.32",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "0a02f919a6b0f0c41307f120adada2e5d45a947b"
70
+ "gitHead": "247189fb1039d0f81498949534646baaffb8bca7"
71
71
  }