@uniformdev/design-system 19.87.0 → 19.88.1-alpha.7

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
@@ -16316,6 +16316,9 @@ var Modal = React19.forwardRef(
16316
16316
  style: { width, height: height === "auto" ? "min-content" : height },
16317
16317
  "data-testid": "side-dialog",
16318
16318
  onClick: onRequestClose,
16319
+ onCancel: (e) => {
16320
+ e.preventDefault();
16321
+ },
16319
16322
  ...modalProps,
16320
16323
  children: /* @__PURE__ */ jsxs59("div", { css: modalInnerStyles, onClick: (e) => e.stopPropagation(), children: [
16321
16324
  /* @__PURE__ */ jsxs59("div", { css: modalHeaderStyles, children: [
@@ -16663,6 +16666,11 @@ var inputMenu = css76`
16663
16666
  position: absolute;
16664
16667
  top: calc(var(--spacing-md) * -1.2);
16665
16668
  right: 0;
16669
+ `;
16670
+ var inputActionItems = css76`
16671
+ display: flex;
16672
+ `;
16673
+ var inputMenuHover = css76`
16666
16674
  opacity: var(--opacity-50);
16667
16675
  transition: background-color var(--duration-fast) var(--timing-ease-out);
16668
16676
 
@@ -16958,7 +16966,7 @@ var ParameterMenuButton = forwardRef12(
16958
16966
  "button",
16959
16967
  {
16960
16968
  className: "parameter-menu",
16961
- css: inputMenu,
16969
+ css: [inputMenu, inputMenuHover],
16962
16970
  type: "button",
16963
16971
  "aria-label": `${label} options`,
16964
16972
  ref,
@@ -17080,9 +17088,7 @@ var ParameterShell = ({
17080
17088
  {
17081
17089
  css: [
17082
17090
  inputMenu,
17083
- css81`
17084
- opacity: var(--opacity-100);
17085
- `,
17091
+ inputActionItems,
17086
17092
  menuItems ? css81`
17087
17093
  right: var(--spacing-md);
17088
17094
  ` : void 0
@@ -18901,7 +18907,7 @@ var RichText = ({
18901
18907
  return () => {
18902
18908
  removeUpdateListener();
18903
18909
  };
18904
- }, []);
18910
+ }, [editor, onChange]);
18905
18911
  return /* @__PURE__ */ jsxs71(Fragment18, { children: [
18906
18912
  readOnly ? null : /* @__PURE__ */ jsx106(RichTextToolbar_default, { config, customControls }),
18907
18913
  /* @__PURE__ */ jsxs71("div", { css: editorContainer, ref: editorContainerRef, "data-testid": "value-container", children: [
@@ -19357,7 +19363,7 @@ var SegmentedControl = ({
19357
19363
  return map[size];
19358
19364
  }, [size]);
19359
19365
  const isIconOnly = useMemo5(() => {
19360
- return options.every((option) => option.icon && !option.label);
19366
+ return options.every((option) => option && option.icon && !option.label);
19361
19367
  }, [options]);
19362
19368
  return /* @__PURE__ */ jsx112(
19363
19369
  "div",
@@ -19365,6 +19371,9 @@ var SegmentedControl = ({
19365
19371
  css: [segmentedControlStyles, orientation === "vertical" ? segmentedControlVerticalStyles : void 0],
19366
19372
  ...props,
19367
19373
  children: options.map((option, index) => {
19374
+ if (!option) {
19375
+ return null;
19376
+ }
19368
19377
  const text = option.label ? option.label : option.icon ? null : String(option.value);
19369
19378
  const isDisabled = disabled2 || option.disabled;
19370
19379
  return /* @__PURE__ */ jsx112(
package/dist/index.d.mts CHANGED
@@ -74,7 +74,7 @@ declare const supports: (cssProp: string) => string;
74
74
  * @function
75
75
  * @param {string} size - The responsive breakpoint value
76
76
  * @returns {string} - compiled container query e.g. @container (min-width: 640px)
77
- * @example `${cq('300px`)} { background: red; }`
77
+ * @example `${cq('300px')} { background: red; }`
78
78
  */
79
79
  declare const cq: (size: string) => string;
80
80
 
@@ -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
@@ -74,7 +74,7 @@ declare const supports: (cssProp: string) => string;
74
74
  * @function
75
75
  * @param {string} size - The responsive breakpoint value
76
76
  * @returns {string} - compiled container query e.g. @container (min-width: 640px)
77
- * @example `${cq('300px`)} { background: red; }`
77
+ * @example `${cq('300px')} { background: red; }`
78
78
  */
79
79
  declare const cq: (size: string) => string;
80
80
 
@@ -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
@@ -18110,6 +18110,9 @@ var Modal = import_react99.default.forwardRef(
18110
18110
  style: { width, height: height === "auto" ? "min-content" : height },
18111
18111
  "data-testid": "side-dialog",
18112
18112
  onClick: onRequestClose,
18113
+ onCancel: (e) => {
18114
+ e.preventDefault();
18115
+ },
18113
18116
  ...modalProps,
18114
18117
  children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { css: modalInnerStyles, onClick: (e) => e.stopPropagation(), children: [
18115
18118
  /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { css: modalHeaderStyles, children: [
@@ -18468,6 +18471,11 @@ var inputMenu = import_react102.css`
18468
18471
  position: absolute;
18469
18472
  top: calc(var(--spacing-md) * -1.2);
18470
18473
  right: 0;
18474
+ `;
18475
+ var inputActionItems = import_react102.css`
18476
+ display: flex;
18477
+ `;
18478
+ var inputMenuHover = import_react102.css`
18471
18479
  opacity: var(--opacity-50);
18472
18480
  transition: background-color var(--duration-fast) var(--timing-ease-out);
18473
18481
 
@@ -18775,7 +18783,7 @@ var ParameterMenuButton = (0, import_react108.forwardRef)(
18775
18783
  "button",
18776
18784
  {
18777
18785
  className: "parameter-menu",
18778
- css: inputMenu,
18786
+ css: [inputMenu, inputMenuHover],
18779
18787
  type: "button",
18780
18788
  "aria-label": `${label} options`,
18781
18789
  ref,
@@ -18898,9 +18906,7 @@ var ParameterShell = ({
18898
18906
  {
18899
18907
  css: [
18900
18908
  inputMenu,
18901
- import_react110.css`
18902
- opacity: var(--opacity-100);
18903
- `,
18909
+ inputActionItems,
18904
18910
  menuItems ? import_react110.css`
18905
18911
  right: var(--spacing-md);
18906
18912
  ` : void 0
@@ -20694,7 +20700,7 @@ var RichText = ({
20694
20700
  return () => {
20695
20701
  removeUpdateListener();
20696
20702
  };
20697
- }, []);
20703
+ }, [editor, onChange]);
20698
20704
  return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_jsx_runtime106.Fragment, { children: [
20699
20705
  readOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(RichTextToolbar_default, { config, customControls }),
20700
20706
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { css: editorContainer, ref: editorContainerRef, "data-testid": "value-container", children: [
@@ -21161,7 +21167,7 @@ var SegmentedControl = ({
21161
21167
  return map[size];
21162
21168
  }, [size]);
21163
21169
  const isIconOnly = (0, import_react132.useMemo)(() => {
21164
- return options.every((option) => option.icon && !option.label);
21170
+ return options.every((option) => option && option.icon && !option.label);
21165
21171
  }, [options]);
21166
21172
  return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
21167
21173
  "div",
@@ -21169,6 +21175,9 @@ var SegmentedControl = ({
21169
21175
  css: [segmentedControlStyles, orientation === "vertical" ? segmentedControlVerticalStyles : void 0],
21170
21176
  ...props,
21171
21177
  children: options.map((option, index) => {
21178
+ if (!option) {
21179
+ return null;
21180
+ }
21172
21181
  const text = option.label ? option.label : option.icon ? null : String(option.value);
21173
21182
  const isDisabled = disabled2 || option.disabled;
21174
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.87.0",
3
+ "version": "19.88.1-alpha.7+69b3ccba4",
4
4
  "description": "Uniform design system components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -23,11 +23,11 @@
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.87.0",
27
- "@uniformdev/richtext": "^19.87.0",
26
+ "@uniformdev/canvas": "^19.88.1-alpha.7+69b3ccba4",
27
+ "@uniformdev/richtext": "^19.88.1-alpha.7+69b3ccba4",
28
28
  "autoprefixer": "10.4.16",
29
29
  "hygen": "6.2.11",
30
- "postcss": "8.4.31",
30
+ "postcss": "8.4.32",
31
31
  "react": "18.2.0",
32
32
  "react-dom": "18.2.0",
33
33
  "tsup": "8.0.1"
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "596b9c4afbabb8579dd0e6c80690df135d6c55fc"
70
+ "gitHead": "69b3ccba4050c4ff412c4f226f54a36d74cf9a39"
71
71
  }