@uniformdev/design-system 20.34.1 → 20.34.3-alpha.70

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,11 +96,12 @@ var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
96
96
  --typography-inverted: var(--white);
97
97
 
98
98
  /* chart colours */
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;
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;
104
105
 
105
106
  /* utility colours */
106
107
  --utility-success: #4ade80;
@@ -6518,9 +6519,12 @@ var ChipContainer = css45`
6518
6519
  }
6519
6520
  `;
6520
6521
  var ChipText = css45`
6522
+ display: flex;
6523
+ align-items: center;
6524
+ justify-content: left;
6521
6525
  align-self: center;
6522
6526
  line-height: 1.2;
6523
- text-wrap: nowrap;
6527
+ white-space: nowrap;
6524
6528
  `;
6525
6529
  var ChipIcon = css45`
6526
6530
  align-self: center;
@@ -14901,23 +14905,8 @@ var ParameterRichText = ({
14901
14905
  errorTestId,
14902
14906
  captionTestId,
14903
14907
  menuItems,
14904
- value,
14905
- onChange,
14906
- onConnectLink,
14907
- config,
14908
- onRichTextInit,
14909
- readOnly,
14910
- editorWrapperClassName,
14911
- editorInputClassName,
14912
- editorInputWrapperClassName,
14913
- editorFooter,
14914
- customNodes,
14915
14908
  children,
14916
- variables,
14917
- customControls,
14918
- onInsertTable,
14919
- onInsertAsset,
14920
- minimalInteractivity
14909
+ ...innerProps
14921
14910
  }) => {
14922
14911
  return /* @__PURE__ */ jsxs88(
14923
14912
  ParameterShell,
@@ -14933,28 +14922,7 @@ var ParameterRichText = ({
14933
14922
  captionTestId,
14934
14923
  menuItems,
14935
14924
  children: [
14936
- /* @__PURE__ */ jsx130(
14937
- ParameterRichTextInner,
14938
- {
14939
- value,
14940
- onChange,
14941
- onConnectLink,
14942
- config,
14943
- onRichTextInit,
14944
- readOnly,
14945
- editorWrapperClassName,
14946
- editorInputClassName,
14947
- editorInputWrapperClassName,
14948
- editorFooter,
14949
- customNodes,
14950
- variables,
14951
- customControls,
14952
- onInsertTable,
14953
- onInsertAsset,
14954
- minimalInteractivity,
14955
- children
14956
- }
14957
- ),
14925
+ /* @__PURE__ */ jsx130(ParameterRichTextInner, { ...innerProps, children }),
14958
14926
  menuItems ? /* @__PURE__ */ jsx130(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx130(Fragment18, { children: menuItems }) }) : null
14959
14927
  ]
14960
14928
  }
@@ -15043,22 +15011,11 @@ var editorInput = css98`
15043
15011
  `;
15044
15012
  var ParameterRichTextInner = ({
15045
15013
  value,
15046
- onChange,
15047
- onConnectLink,
15048
- config,
15049
- onRichTextInit,
15050
- readOnly,
15051
- editorWrapperClassName,
15052
- editorInputClassName,
15053
- editorInputWrapperClassName,
15054
15014
  editorFooter,
15055
15015
  children,
15056
15016
  customNodes,
15057
- variables,
15058
- customControls,
15059
- onInsertTable,
15060
- onInsertAsset,
15061
- minimalInteractivity
15017
+ editorWrapperClassName,
15018
+ ...richTextProps
15062
15019
  }) => {
15063
15020
  const lexicalConfig = {
15064
15021
  namespace: "uniform",
@@ -15114,27 +15071,10 @@ var ParameterRichTextInner = ({
15114
15071
  tableCell: tableCellElement,
15115
15072
  tableCellHeader: tableHeaderElement
15116
15073
  },
15117
- editable: !readOnly
15074
+ editable: !richTextProps.readOnly
15118
15075
  };
15119
15076
  return /* @__PURE__ */ jsxs88(Fragment18, { children: [
15120
- /* @__PURE__ */ jsx130("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx130(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx130(
15121
- RichText,
15122
- {
15123
- onChange,
15124
- onConnectLink,
15125
- config,
15126
- onRichTextInit,
15127
- readOnly,
15128
- editorInputClassName,
15129
- editorInputWrapperClassName,
15130
- variables,
15131
- customControls,
15132
- onInsertTable,
15133
- onInsertAsset,
15134
- minimalInteractivity,
15135
- children
15136
- }
15137
- ) }) }),
15077
+ /* @__PURE__ */ jsx130("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx130(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx130(RichText, { ...richTextProps, children }) }) }),
15138
15078
  editorFooter ? editorFooter : null
15139
15079
  ] });
15140
15080
  };
@@ -15160,7 +15100,8 @@ var RichText = ({
15160
15100
  customControls,
15161
15101
  onInsertTable,
15162
15102
  onInsertAsset,
15163
- minimalInteractivity
15103
+ minimalInteractivity,
15104
+ placeholder
15164
15105
  }) => {
15165
15106
  const [editor] = useLexicalComposerContext9();
15166
15107
  useEffect23(() => {
@@ -15223,7 +15164,7 @@ var RichText = ({
15223
15164
  RichTextPlugin,
15224
15165
  {
15225
15166
  contentEditable: /* @__PURE__ */ jsx130(ContentEditable, { css: editorInput, className: editorInputClassName }),
15226
- placeholder: /* @__PURE__ */ jsx130("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
15167
+ placeholder: /* @__PURE__ */ jsx130("div", { css: editorPlaceholder, "data-placeholder": true, children: placeholder != null ? placeholder : readOnly ? "empty" : "start editing..." }),
15227
15168
  ErrorBoundary: LexicalErrorBoundary
15228
15169
  }
15229
15170
  ),
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,11 +1745,12 @@ var Theme = ({ disableReset = false, disableGlobalReset = false }) => {
1745
1745
  --typography-inverted: var(--white);
1746
1746
 
1747
1747
  /* chart colours */
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;
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;
1753
1754
 
1754
1755
  /* utility colours */
1755
1756
  --utility-success: #4ade80;
@@ -8297,9 +8298,12 @@ var ChipContainer = import_react67.css`
8297
8298
  }
8298
8299
  `;
8299
8300
  var ChipText = import_react67.css`
8301
+ display: flex;
8302
+ align-items: center;
8303
+ justify-content: left;
8300
8304
  align-self: center;
8301
8305
  line-height: 1.2;
8302
- text-wrap: nowrap;
8306
+ white-space: nowrap;
8303
8307
  `;
8304
8308
  var ChipIcon = import_react67.css`
8305
8309
  align-self: center;
@@ -16751,23 +16755,8 @@ var ParameterRichText = ({
16751
16755
  errorTestId,
16752
16756
  captionTestId,
16753
16757
  menuItems,
16754
- value,
16755
- onChange,
16756
- onConnectLink,
16757
- config,
16758
- onRichTextInit,
16759
- readOnly,
16760
- editorWrapperClassName,
16761
- editorInputClassName,
16762
- editorInputWrapperClassName,
16763
- editorFooter,
16764
- customNodes,
16765
16758
  children,
16766
- variables,
16767
- customControls,
16768
- onInsertTable,
16769
- onInsertAsset,
16770
- minimalInteractivity
16759
+ ...innerProps
16771
16760
  }) => {
16772
16761
  return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
16773
16762
  ParameterShell,
@@ -16783,28 +16772,7 @@ var ParameterRichText = ({
16783
16772
  captionTestId,
16784
16773
  menuItems,
16785
16774
  children: [
16786
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
16787
- ParameterRichTextInner,
16788
- {
16789
- value,
16790
- onChange,
16791
- onConnectLink,
16792
- config,
16793
- onRichTextInit,
16794
- readOnly,
16795
- editorWrapperClassName,
16796
- editorInputClassName,
16797
- editorInputWrapperClassName,
16798
- editorFooter,
16799
- customNodes,
16800
- variables,
16801
- customControls,
16802
- onInsertTable,
16803
- onInsertAsset,
16804
- minimalInteractivity,
16805
- children
16806
- }
16807
- ),
16775
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ParameterRichTextInner, { ...innerProps, children }),
16808
16776
  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
16809
16777
  ]
16810
16778
  }
@@ -16893,22 +16861,11 @@ var editorInput = import_react157.css`
16893
16861
  `;
16894
16862
  var ParameterRichTextInner = ({
16895
16863
  value,
16896
- onChange,
16897
- onConnectLink,
16898
- config,
16899
- onRichTextInit,
16900
- readOnly,
16901
- editorWrapperClassName,
16902
- editorInputClassName,
16903
- editorInputWrapperClassName,
16904
16864
  editorFooter,
16905
16865
  children,
16906
16866
  customNodes,
16907
- variables,
16908
- customControls,
16909
- onInsertTable,
16910
- onInsertAsset,
16911
- minimalInteractivity
16867
+ editorWrapperClassName,
16868
+ ...richTextProps
16912
16869
  }) => {
16913
16870
  const lexicalConfig = {
16914
16871
  namespace: "uniform",
@@ -16964,27 +16921,10 @@ var ParameterRichTextInner = ({
16964
16921
  tableCell: tableCellElement,
16965
16922
  tableCellHeader: tableHeaderElement
16966
16923
  },
16967
- editable: !readOnly
16924
+ editable: !richTextProps.readOnly
16968
16925
  };
16969
16926
  return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(import_jsx_runtime130.Fragment, { children: [
16970
- /* @__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)(
16971
- RichText,
16972
- {
16973
- onChange,
16974
- onConnectLink,
16975
- config,
16976
- onRichTextInit,
16977
- readOnly,
16978
- editorInputClassName,
16979
- editorInputWrapperClassName,
16980
- variables,
16981
- customControls,
16982
- onInsertTable,
16983
- onInsertAsset,
16984
- minimalInteractivity,
16985
- children
16986
- }
16987
- ) }) }),
16927
+ /* @__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 }) }) }),
16988
16928
  editorFooter ? editorFooter : null
16989
16929
  ] });
16990
16930
  };
@@ -17010,7 +16950,8 @@ var RichText = ({
17010
16950
  customControls,
17011
16951
  onInsertTable,
17012
16952
  onInsertAsset,
17013
- minimalInteractivity
16953
+ minimalInteractivity,
16954
+ placeholder
17014
16955
  }) => {
17015
16956
  const [editor] = (0, import_LexicalComposerContext9.useLexicalComposerContext)();
17016
16957
  (0, import_react158.useEffect)(() => {
@@ -17073,7 +17014,7 @@ var RichText = ({
17073
17014
  import_LexicalRichTextPlugin.RichTextPlugin,
17074
17015
  {
17075
17016
  contentEditable: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_LexicalContentEditable.ContentEditable, { css: editorInput, className: editorInputClassName }),
17076
- placeholder: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { css: editorPlaceholder, children: readOnly ? "empty" : "start editing..." }),
17017
+ placeholder: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { css: editorPlaceholder, "data-placeholder": true, children: placeholder != null ? placeholder : readOnly ? "empty" : "start editing..." }),
17077
17018
  ErrorBoundary: import_LexicalErrorBoundary.default
17078
17019
  }
17079
17020
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "20.34.1",
3
+ "version": "20.34.3-alpha.70+bc3f8ba0f4",
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.1",
42
- "@uniformdev/richtext": "^20.34.1",
43
- "@vitest/coverage-v8": "^3.1.2",
39
+ "@types/react": "18.3.24",
40
+ "@types/react-dom": "18.3.7",
41
+ "@uniformdev/canvas": "^20.34.3-alpha.70+bc3f8ba0f4",
42
+ "@uniformdev/richtext": "^20.34.3-alpha.70+bc3f8ba0f4",
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": "e118be221d19f1e59da7c5845bc3e784e0b42cf3"
94
+ "gitHead": "bc3f8ba0f4719673f92d9e8c48c3818dc439c364"
95
95
  }