@uniformdev/design-system 20.34.2-alpha.67 → 20.35.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
@@ -96,12 +96,11 @@ var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
96
96
  --typography-inverted: var(--white);
97
97
 
98
98
  /* chart colours */
99
- --charting-chart-1: #0072B2;
100
- --charting-chart-2: #D55E00;
101
- --charting-chart-3: #009E73;
102
- --charting-chart-4: #E41A1C;
103
- --charting-chart-5: #F0E442;
104
- --charting-chart-6: #56B4E9;
99
+ --charting-chart-1: #ffa600;
100
+ --charting-chart-2: #c444b2;
101
+ --charting-chart-3: #ff5368;
102
+ --charting-chart-4: #f53d90;
103
+ --charting-chart-5: #ff7b3d;
105
104
 
106
105
  /* utility colours */
107
106
  --utility-success: #4ade80;
@@ -6519,9 +6518,12 @@ var ChipContainer = css45`
6519
6518
  }
6520
6519
  `;
6521
6520
  var ChipText = css45`
6521
+ display: flex;
6522
+ align-items: center;
6523
+ justify-content: left;
6522
6524
  align-self: center;
6523
6525
  line-height: 1.2;
6524
- text-wrap: nowrap;
6526
+ white-space: nowrap;
6525
6527
  `;
6526
6528
  var ChipIcon = css45`
6527
6529
  align-self: center;
@@ -14902,23 +14904,8 @@ var ParameterRichText = ({
14902
14904
  errorTestId,
14903
14905
  captionTestId,
14904
14906
  menuItems,
14905
- value,
14906
- onChange,
14907
- onConnectLink,
14908
- config,
14909
- onRichTextInit,
14910
- readOnly,
14911
- editorWrapperClassName,
14912
- editorInputClassName,
14913
- editorInputWrapperClassName,
14914
- editorFooter,
14915
- customNodes,
14916
14907
  children,
14917
- variables,
14918
- customControls,
14919
- onInsertTable,
14920
- onInsertAsset,
14921
- minimalInteractivity
14908
+ ...innerProps
14922
14909
  }) => {
14923
14910
  return /* @__PURE__ */ jsxs88(
14924
14911
  ParameterShell,
@@ -14934,28 +14921,7 @@ var ParameterRichText = ({
14934
14921
  captionTestId,
14935
14922
  menuItems,
14936
14923
  children: [
14937
- /* @__PURE__ */ jsx130(
14938
- ParameterRichTextInner,
14939
- {
14940
- value,
14941
- onChange,
14942
- onConnectLink,
14943
- config,
14944
- onRichTextInit,
14945
- readOnly,
14946
- editorWrapperClassName,
14947
- editorInputClassName,
14948
- editorInputWrapperClassName,
14949
- editorFooter,
14950
- customNodes,
14951
- variables,
14952
- customControls,
14953
- onInsertTable,
14954
- onInsertAsset,
14955
- minimalInteractivity,
14956
- children
14957
- }
14958
- ),
14924
+ /* @__PURE__ */ jsx130(ParameterRichTextInner, { ...innerProps, children }),
14959
14925
  menuItems ? /* @__PURE__ */ jsx130(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx130(Fragment18, { children: menuItems }) }) : null
14960
14926
  ]
14961
14927
  }
@@ -15044,22 +15010,11 @@ var editorInput = css98`
15044
15010
  `;
15045
15011
  var ParameterRichTextInner = ({
15046
15012
  value,
15047
- onChange,
15048
- onConnectLink,
15049
- config,
15050
- onRichTextInit,
15051
- readOnly,
15052
- editorWrapperClassName,
15053
- editorInputClassName,
15054
- editorInputWrapperClassName,
15055
15013
  editorFooter,
15056
15014
  children,
15057
15015
  customNodes,
15058
- variables,
15059
- customControls,
15060
- onInsertTable,
15061
- onInsertAsset,
15062
- minimalInteractivity
15016
+ editorWrapperClassName,
15017
+ ...richTextProps
15063
15018
  }) => {
15064
15019
  const lexicalConfig = {
15065
15020
  namespace: "uniform",
@@ -15115,27 +15070,10 @@ var ParameterRichTextInner = ({
15115
15070
  tableCell: tableCellElement,
15116
15071
  tableCellHeader: tableHeaderElement
15117
15072
  },
15118
- editable: !readOnly
15073
+ editable: !richTextProps.readOnly
15119
15074
  };
15120
15075
  return /* @__PURE__ */ jsxs88(Fragment18, { children: [
15121
- /* @__PURE__ */ jsx130("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx130(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx130(
15122
- RichText,
15123
- {
15124
- onChange,
15125
- onConnectLink,
15126
- config,
15127
- onRichTextInit,
15128
- readOnly,
15129
- editorInputClassName,
15130
- editorInputWrapperClassName,
15131
- variables,
15132
- customControls,
15133
- onInsertTable,
15134
- onInsertAsset,
15135
- minimalInteractivity,
15136
- children
15137
- }
15138
- ) }) }),
15076
+ /* @__PURE__ */ jsx130("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx130(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx130(RichText, { ...richTextProps, children }) }) }),
15139
15077
  editorFooter ? editorFooter : null
15140
15078
  ] });
15141
15079
  };
@@ -15161,7 +15099,8 @@ var RichText = ({
15161
15099
  customControls,
15162
15100
  onInsertTable,
15163
15101
  onInsertAsset,
15164
- minimalInteractivity
15102
+ minimalInteractivity,
15103
+ placeholder
15165
15104
  }) => {
15166
15105
  const [editor] = useLexicalComposerContext9();
15167
15106
  useEffect23(() => {
@@ -15224,7 +15163,7 @@ var RichText = ({
15224
15163
  RichTextPlugin,
15225
15164
  {
15226
15165
  contentEditable: /* @__PURE__ */ jsx130(ContentEditable, { css: editorInput, className: editorInputClassName }),
15227
- placeholder: /* @__PURE__ */ jsx130("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
15166
+ placeholder: /* @__PURE__ */ jsx130("div", { css: editorPlaceholder, "data-placeholder": true, children: placeholder != null ? placeholder : readOnly ? "empty" : "start editing..." }),
15228
15167
  ErrorBoundary: LexicalErrorBoundary
15229
15168
  }
15230
15169
  ),
package/dist/index.d.mts CHANGED
@@ -3475,16 +3475,17 @@ type RichTextProps = {
3475
3475
  } | null>;
3476
3476
  /** Assets */
3477
3477
  onInsertAsset?: () => void;
3478
+ placeholder?: string;
3478
3479
  };
3479
3480
  type RichTextParamValue = SerializedEditorState | undefined | null;
3480
- type ParameterRichTextInnerProps = RichTextProps & {
3481
+ type ParameterRichTextInnerProps = Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> & RichTextProps & {
3481
3482
  value: RichTextParamValue | ((editor: LexicalEditor) => void);
3482
3483
  editorWrapperClassName?: string;
3483
3484
  editorFooter?: React.ReactNode;
3484
3485
  };
3485
3486
  type ParameterRichTextProps = CommonParameterInputProps & ParameterRichTextInnerProps;
3486
- declare const ParameterRichText: ({ label, labelLeadingIcon, hiddenLabel, id, errorMessage, caption, errorTestId, captionTestId, menuItems, value, onChange, onConnectLink, config, onRichTextInit, readOnly, editorWrapperClassName, editorInputClassName, editorInputWrapperClassName, editorFooter, customNodes, children, variables, customControls, onInsertTable, onInsertAsset, minimalInteractivity, }: ParameterRichTextProps) => _emotion_react_jsx_runtime.JSX.Element;
3487
- declare const ParameterRichTextInner: ({ value, onChange, onConnectLink, config, onRichTextInit, readOnly, editorWrapperClassName, editorInputClassName, editorInputWrapperClassName, editorFooter, children, customNodes, variables, customControls, onInsertTable, onInsertAsset, minimalInteractivity, }: ParameterRichTextInnerProps) => _emotion_react_jsx_runtime.JSX.Element;
3487
+ declare const ParameterRichText: ({ label, labelLeadingIcon, hiddenLabel, id, errorMessage, caption, errorTestId, captionTestId, menuItems, children, ...innerProps }: ParameterRichTextProps) => _emotion_react_jsx_runtime.JSX.Element;
3488
+ declare const ParameterRichTextInner: ({ value, editorFooter, children, customNodes, editorWrapperClassName, ...richTextProps }: ParameterRichTextInnerProps) => _emotion_react_jsx_runtime.JSX.Element;
3488
3489
 
3489
3490
  type ParameterSelectProps = CommonParameterInputProps & CommonParameterSelectProps & React.InputHTMLAttributes<HTMLSelectElement>;
3490
3491
  /** @example <ParameterSelect label="my label" id="my-id" options={[{ label: 'option label', value: 0}]} */
package/dist/index.d.ts CHANGED
@@ -3475,16 +3475,17 @@ type RichTextProps = {
3475
3475
  } | null>;
3476
3476
  /** Assets */
3477
3477
  onInsertAsset?: () => void;
3478
+ placeholder?: string;
3478
3479
  };
3479
3480
  type RichTextParamValue = SerializedEditorState | undefined | null;
3480
- type ParameterRichTextInnerProps = RichTextProps & {
3481
+ type ParameterRichTextInnerProps = Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> & RichTextProps & {
3481
3482
  value: RichTextParamValue | ((editor: LexicalEditor) => void);
3482
3483
  editorWrapperClassName?: string;
3483
3484
  editorFooter?: React.ReactNode;
3484
3485
  };
3485
3486
  type ParameterRichTextProps = CommonParameterInputProps & ParameterRichTextInnerProps;
3486
- declare const ParameterRichText: ({ label, labelLeadingIcon, hiddenLabel, id, errorMessage, caption, errorTestId, captionTestId, menuItems, value, onChange, onConnectLink, config, onRichTextInit, readOnly, editorWrapperClassName, editorInputClassName, editorInputWrapperClassName, editorFooter, customNodes, children, variables, customControls, onInsertTable, onInsertAsset, minimalInteractivity, }: ParameterRichTextProps) => _emotion_react_jsx_runtime.JSX.Element;
3487
- declare const ParameterRichTextInner: ({ value, onChange, onConnectLink, config, onRichTextInit, readOnly, editorWrapperClassName, editorInputClassName, editorInputWrapperClassName, editorFooter, children, customNodes, variables, customControls, onInsertTable, onInsertAsset, minimalInteractivity, }: ParameterRichTextInnerProps) => _emotion_react_jsx_runtime.JSX.Element;
3487
+ declare const ParameterRichText: ({ label, labelLeadingIcon, hiddenLabel, id, errorMessage, caption, errorTestId, captionTestId, menuItems, children, ...innerProps }: ParameterRichTextProps) => _emotion_react_jsx_runtime.JSX.Element;
3488
+ declare const ParameterRichTextInner: ({ value, editorFooter, children, customNodes, editorWrapperClassName, ...richTextProps }: ParameterRichTextInnerProps) => _emotion_react_jsx_runtime.JSX.Element;
3488
3489
 
3489
3490
  type ParameterSelectProps = CommonParameterInputProps & CommonParameterSelectProps & React.InputHTMLAttributes<HTMLSelectElement>;
3490
3491
  /** @example <ParameterSelect label="my label" id="my-id" options={[{ label: 'option label', value: 0}]} */
package/dist/index.js CHANGED
@@ -1745,12 +1745,11 @@ var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
1745
1745
  --typography-inverted: var(--white);
1746
1746
 
1747
1747
  /* chart colours */
1748
- --charting-chart-1: #0072B2;
1749
- --charting-chart-2: #D55E00;
1750
- --charting-chart-3: #009E73;
1751
- --charting-chart-4: #E41A1C;
1752
- --charting-chart-5: #F0E442;
1753
- --charting-chart-6: #56B4E9;
1748
+ --charting-chart-1: #ffa600;
1749
+ --charting-chart-2: #c444b2;
1750
+ --charting-chart-3: #ff5368;
1751
+ --charting-chart-4: #f53d90;
1752
+ --charting-chart-5: #ff7b3d;
1754
1753
 
1755
1754
  /* utility colours */
1756
1755
  --utility-success: #4ade80;
@@ -8298,9 +8297,12 @@ var ChipContainer = import_react67.css`
8298
8297
  }
8299
8298
  `;
8300
8299
  var ChipText = import_react67.css`
8300
+ display: flex;
8301
+ align-items: center;
8302
+ justify-content: left;
8301
8303
  align-self: center;
8302
8304
  line-height: 1.2;
8303
- text-wrap: nowrap;
8305
+ white-space: nowrap;
8304
8306
  `;
8305
8307
  var ChipIcon = import_react67.css`
8306
8308
  align-self: center;
@@ -16752,23 +16754,8 @@ var ParameterRichText = ({
16752
16754
  errorTestId,
16753
16755
  captionTestId,
16754
16756
  menuItems,
16755
- value,
16756
- onChange,
16757
- onConnectLink,
16758
- config,
16759
- onRichTextInit,
16760
- readOnly,
16761
- editorWrapperClassName,
16762
- editorInputClassName,
16763
- editorInputWrapperClassName,
16764
- editorFooter,
16765
- customNodes,
16766
16757
  children,
16767
- variables,
16768
- customControls,
16769
- onInsertTable,
16770
- onInsertAsset,
16771
- minimalInteractivity
16758
+ ...innerProps
16772
16759
  }) => {
16773
16760
  return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
16774
16761
  ParameterShell,
@@ -16784,28 +16771,7 @@ var ParameterRichText = ({
16784
16771
  captionTestId,
16785
16772
  menuItems,
16786
16773
  children: [
16787
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
16788
- ParameterRichTextInner,
16789
- {
16790
- value,
16791
- onChange,
16792
- onConnectLink,
16793
- config,
16794
- onRichTextInit,
16795
- readOnly,
16796
- editorWrapperClassName,
16797
- editorInputClassName,
16798
- editorInputWrapperClassName,
16799
- editorFooter,
16800
- customNodes,
16801
- variables,
16802
- customControls,
16803
- onInsertTable,
16804
- onInsertAsset,
16805
- minimalInteractivity,
16806
- children
16807
- }
16808
- ),
16774
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ParameterRichTextInner, { ...innerProps, children }),
16809
16775
  menuItems ? /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_jsx_runtime130.Fragment, { children: menuItems }) }) : null
16810
16776
  ]
16811
16777
  }
@@ -16894,22 +16860,11 @@ var editorInput = import_react157.css`
16894
16860
  `;
16895
16861
  var ParameterRichTextInner = ({
16896
16862
  value,
16897
- onChange,
16898
- onConnectLink,
16899
- config,
16900
- onRichTextInit,
16901
- readOnly,
16902
- editorWrapperClassName,
16903
- editorInputClassName,
16904
- editorInputWrapperClassName,
16905
16863
  editorFooter,
16906
16864
  children,
16907
16865
  customNodes,
16908
- variables,
16909
- customControls,
16910
- onInsertTable,
16911
- onInsertAsset,
16912
- minimalInteractivity
16866
+ editorWrapperClassName,
16867
+ ...richTextProps
16913
16868
  }) => {
16914
16869
  const lexicalConfig = {
16915
16870
  namespace: "uniform",
@@ -16965,27 +16920,10 @@ var ParameterRichTextInner = ({
16965
16920
  tableCell: tableCellElement,
16966
16921
  tableCellHeader: tableHeaderElement
16967
16922
  },
16968
- editable: !readOnly
16923
+ editable: !richTextProps.readOnly
16969
16924
  };
16970
16925
  return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
16971
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_LexicalComposer.LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
16972
- RichText,
16973
- {
16974
- onChange,
16975
- onConnectLink,
16976
- config,
16977
- onRichTextInit,
16978
- readOnly,
16979
- editorInputClassName,
16980
- editorInputWrapperClassName,
16981
- variables,
16982
- customControls,
16983
- onInsertTable,
16984
- onInsertAsset,
16985
- minimalInteractivity,
16986
- children
16987
- }
16988
- ) }) }),
16926
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_LexicalComposer.LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(RichText, { ...richTextProps, children }) }) }),
16989
16927
  editorFooter ? editorFooter : null
16990
16928
  ] });
16991
16929
  };
@@ -17011,7 +16949,8 @@ var RichText = ({
17011
16949
  customControls,
17012
16950
  onInsertTable,
17013
16951
  onInsertAsset,
17014
- minimalInteractivity
16952
+ minimalInteractivity,
16953
+ placeholder
17015
16954
  }) => {
17016
16955
  const [editor] = (0, import_LexicalComposerContext9.useLexicalComposerContext)();
17017
16956
  (0, import_react158.useEffect)(() => {
@@ -17074,7 +17013,7 @@ var RichText = ({
17074
17013
  import_LexicalRichTextPlugin.RichTextPlugin,
17075
17014
  {
17076
17015
  contentEditable: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_LexicalContentEditable.ContentEditable, { css: editorInput, className: editorInputClassName }),
17077
- placeholder: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
17016
+ placeholder: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { css: editorPlaceholder, "data-placeholder": true, children: placeholder != null ? placeholder : readOnly ? "empty" : "start editing..." }),
17078
17017
  ErrorBoundary: import_LexicalErrorBoundary.default
17079
17018
  }
17080
17019
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "20.34.2-alpha.67+d830718b43",
3
+ "version": "20.35.0",
4
4
  "description": "Uniform design system components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "exports": {
@@ -23,7 +23,7 @@
23
23
  "build": "tsup",
24
24
  "dev": "tsup --watch",
25
25
  "clean": "rimraf dist",
26
- "test": "vitest",
26
+ "test": "vitest run",
27
27
  "test:coverage": "vitest run --coverage",
28
28
  "lint": "eslint \"src/**/*.{js,ts,tsx}\"",
29
29
  "format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
@@ -36,11 +36,11 @@
36
36
  "@storybook/preview-api": "^8.3.3",
37
37
  "@storybook/react": "8.3.3",
38
38
  "@storybook/theming": "^8.3.3",
39
- "@types/react": "18.3.11",
40
- "@types/react-dom": "18.3.1",
41
- "@uniformdev/canvas": "^20.34.2-alpha.67+d830718b43",
42
- "@uniformdev/richtext": "^20.34.2-alpha.67+d830718b43",
43
- "@vitest/coverage-v8": "^3.1.2",
39
+ "@types/react": "18.3.24",
40
+ "@types/react-dom": "18.3.7",
41
+ "@uniformdev/canvas": "^20.35.0",
42
+ "@uniformdev/richtext": "^20.35.0",
43
+ "@vitest/coverage-v8": "3.2.4",
44
44
  "autoprefixer": "10.4.21",
45
45
  "hygen": "6.2.11",
46
46
  "postcss": "8.5.3",
@@ -48,7 +48,7 @@
48
48
  "react-dom": "18.3.1",
49
49
  "react-select-event": "^5.5.1",
50
50
  "tsup": "8.3.0",
51
- "vitest": "^3.1.2"
51
+ "vitest": "3.2.4"
52
52
  },
53
53
  "dependencies": {
54
54
  "@ariakit/react": "^0.4.15",
@@ -91,5 +91,5 @@
91
91
  "publishConfig": {
92
92
  "access": "public"
93
93
  },
94
- "gitHead": "d830718b43d1c26a8f6c22434975882eae4cbb3d"
94
+ "gitHead": "f228361828ef49a596ca3841e5b79768c64418cf"
95
95
  }