@uniformdev/design-system 20.34.1 → 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 +13 -73
- package/dist/index.d.mts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +13 -73
- package/package.json +9 -9
package/dist/esm/index.js
CHANGED
|
@@ -6518,9 +6518,12 @@ var ChipContainer = css45`
|
|
|
6518
6518
|
}
|
|
6519
6519
|
`;
|
|
6520
6520
|
var ChipText = css45`
|
|
6521
|
+
display: flex;
|
|
6522
|
+
align-items: center;
|
|
6523
|
+
justify-content: left;
|
|
6521
6524
|
align-self: center;
|
|
6522
6525
|
line-height: 1.2;
|
|
6523
|
-
|
|
6526
|
+
white-space: nowrap;
|
|
6524
6527
|
`;
|
|
6525
6528
|
var ChipIcon = css45`
|
|
6526
6529
|
align-self: center;
|
|
@@ -14901,23 +14904,8 @@ var ParameterRichText = ({
|
|
|
14901
14904
|
errorTestId,
|
|
14902
14905
|
captionTestId,
|
|
14903
14906
|
menuItems,
|
|
14904
|
-
value,
|
|
14905
|
-
onChange,
|
|
14906
|
-
onConnectLink,
|
|
14907
|
-
config,
|
|
14908
|
-
onRichTextInit,
|
|
14909
|
-
readOnly,
|
|
14910
|
-
editorWrapperClassName,
|
|
14911
|
-
editorInputClassName,
|
|
14912
|
-
editorInputWrapperClassName,
|
|
14913
|
-
editorFooter,
|
|
14914
|
-
customNodes,
|
|
14915
14907
|
children,
|
|
14916
|
-
|
|
14917
|
-
customControls,
|
|
14918
|
-
onInsertTable,
|
|
14919
|
-
onInsertAsset,
|
|
14920
|
-
minimalInteractivity
|
|
14908
|
+
...innerProps
|
|
14921
14909
|
}) => {
|
|
14922
14910
|
return /* @__PURE__ */ jsxs88(
|
|
14923
14911
|
ParameterShell,
|
|
@@ -14933,28 +14921,7 @@ var ParameterRichText = ({
|
|
|
14933
14921
|
captionTestId,
|
|
14934
14922
|
menuItems,
|
|
14935
14923
|
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
|
-
),
|
|
14924
|
+
/* @__PURE__ */ jsx130(ParameterRichTextInner, { ...innerProps, children }),
|
|
14958
14925
|
menuItems ? /* @__PURE__ */ jsx130(ParameterMenuButton, { label: `${label} menu`, children: /* @__PURE__ */ jsx130(Fragment18, { children: menuItems }) }) : null
|
|
14959
14926
|
]
|
|
14960
14927
|
}
|
|
@@ -15043,22 +15010,11 @@ var editorInput = css98`
|
|
|
15043
15010
|
`;
|
|
15044
15011
|
var ParameterRichTextInner = ({
|
|
15045
15012
|
value,
|
|
15046
|
-
onChange,
|
|
15047
|
-
onConnectLink,
|
|
15048
|
-
config,
|
|
15049
|
-
onRichTextInit,
|
|
15050
|
-
readOnly,
|
|
15051
|
-
editorWrapperClassName,
|
|
15052
|
-
editorInputClassName,
|
|
15053
|
-
editorInputWrapperClassName,
|
|
15054
15013
|
editorFooter,
|
|
15055
15014
|
children,
|
|
15056
15015
|
customNodes,
|
|
15057
|
-
|
|
15058
|
-
|
|
15059
|
-
onInsertTable,
|
|
15060
|
-
onInsertAsset,
|
|
15061
|
-
minimalInteractivity
|
|
15016
|
+
editorWrapperClassName,
|
|
15017
|
+
...richTextProps
|
|
15062
15018
|
}) => {
|
|
15063
15019
|
const lexicalConfig = {
|
|
15064
15020
|
namespace: "uniform",
|
|
@@ -15114,27 +15070,10 @@ var ParameterRichTextInner = ({
|
|
|
15114
15070
|
tableCell: tableCellElement,
|
|
15115
15071
|
tableCellHeader: tableHeaderElement
|
|
15116
15072
|
},
|
|
15117
|
-
editable: !readOnly
|
|
15073
|
+
editable: !richTextProps.readOnly
|
|
15118
15074
|
};
|
|
15119
15075
|
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
|
-
) }) }),
|
|
15076
|
+
/* @__PURE__ */ jsx130("div", { css: [editorWrapper], className: editorWrapperClassName, children: /* @__PURE__ */ jsx130(LexicalComposer, { initialConfig: lexicalConfig, children: /* @__PURE__ */ jsx130(RichText, { ...richTextProps, children }) }) }),
|
|
15138
15077
|
editorFooter ? editorFooter : null
|
|
15139
15078
|
] });
|
|
15140
15079
|
};
|
|
@@ -15160,7 +15099,8 @@ var RichText = ({
|
|
|
15160
15099
|
customControls,
|
|
15161
15100
|
onInsertTable,
|
|
15162
15101
|
onInsertAsset,
|
|
15163
|
-
minimalInteractivity
|
|
15102
|
+
minimalInteractivity,
|
|
15103
|
+
placeholder
|
|
15164
15104
|
}) => {
|
|
15165
15105
|
const [editor] = useLexicalComposerContext9();
|
|
15166
15106
|
useEffect23(() => {
|
|
@@ -15223,7 +15163,7 @@ var RichText = ({
|
|
|
15223
15163
|
RichTextPlugin,
|
|
15224
15164
|
{
|
|
15225
15165
|
contentEditable: /* @__PURE__ */ jsx130(ContentEditable, { css: editorInput, className: editorInputClassName }),
|
|
15226
|
-
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..." }),
|
|
15227
15167
|
ErrorBoundary: LexicalErrorBoundary
|
|
15228
15168
|
}
|
|
15229
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,
|
|
3487
|
-
declare const ParameterRichTextInner: ({ value,
|
|
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,
|
|
3487
|
-
declare const ParameterRichTextInner: ({ value,
|
|
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
|
@@ -8297,9 +8297,12 @@ var ChipContainer = import_react67.css`
|
|
|
8297
8297
|
}
|
|
8298
8298
|
`;
|
|
8299
8299
|
var ChipText = import_react67.css`
|
|
8300
|
+
display: flex;
|
|
8301
|
+
align-items: center;
|
|
8302
|
+
justify-content: left;
|
|
8300
8303
|
align-self: center;
|
|
8301
8304
|
line-height: 1.2;
|
|
8302
|
-
|
|
8305
|
+
white-space: nowrap;
|
|
8303
8306
|
`;
|
|
8304
8307
|
var ChipIcon = import_react67.css`
|
|
8305
8308
|
align-self: center;
|
|
@@ -16751,23 +16754,8 @@ var ParameterRichText = ({
|
|
|
16751
16754
|
errorTestId,
|
|
16752
16755
|
captionTestId,
|
|
16753
16756
|
menuItems,
|
|
16754
|
-
value,
|
|
16755
|
-
onChange,
|
|
16756
|
-
onConnectLink,
|
|
16757
|
-
config,
|
|
16758
|
-
onRichTextInit,
|
|
16759
|
-
readOnly,
|
|
16760
|
-
editorWrapperClassName,
|
|
16761
|
-
editorInputClassName,
|
|
16762
|
-
editorInputWrapperClassName,
|
|
16763
|
-
editorFooter,
|
|
16764
|
-
customNodes,
|
|
16765
16757
|
children,
|
|
16766
|
-
|
|
16767
|
-
customControls,
|
|
16768
|
-
onInsertTable,
|
|
16769
|
-
onInsertAsset,
|
|
16770
|
-
minimalInteractivity
|
|
16758
|
+
...innerProps
|
|
16771
16759
|
}) => {
|
|
16772
16760
|
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
16773
16761
|
ParameterShell,
|
|
@@ -16783,28 +16771,7 @@ var ParameterRichText = ({
|
|
|
16783
16771
|
captionTestId,
|
|
16784
16772
|
menuItems,
|
|
16785
16773
|
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
|
-
),
|
|
16774
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ParameterRichTextInner, { ...innerProps, children }),
|
|
16808
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
|
|
16809
16776
|
]
|
|
16810
16777
|
}
|
|
@@ -16893,22 +16860,11 @@ var editorInput = import_react157.css`
|
|
|
16893
16860
|
`;
|
|
16894
16861
|
var ParameterRichTextInner = ({
|
|
16895
16862
|
value,
|
|
16896
|
-
onChange,
|
|
16897
|
-
onConnectLink,
|
|
16898
|
-
config,
|
|
16899
|
-
onRichTextInit,
|
|
16900
|
-
readOnly,
|
|
16901
|
-
editorWrapperClassName,
|
|
16902
|
-
editorInputClassName,
|
|
16903
|
-
editorInputWrapperClassName,
|
|
16904
16863
|
editorFooter,
|
|
16905
16864
|
children,
|
|
16906
16865
|
customNodes,
|
|
16907
|
-
|
|
16908
|
-
|
|
16909
|
-
onInsertTable,
|
|
16910
|
-
onInsertAsset,
|
|
16911
|
-
minimalInteractivity
|
|
16866
|
+
editorWrapperClassName,
|
|
16867
|
+
...richTextProps
|
|
16912
16868
|
}) => {
|
|
16913
16869
|
const lexicalConfig = {
|
|
16914
16870
|
namespace: "uniform",
|
|
@@ -16964,27 +16920,10 @@ var ParameterRichTextInner = ({
|
|
|
16964
16920
|
tableCell: tableCellElement,
|
|
16965
16921
|
tableCellHeader: tableHeaderElement
|
|
16966
16922
|
},
|
|
16967
|
-
editable: !readOnly
|
|
16923
|
+
editable: !richTextProps.readOnly
|
|
16968
16924
|
};
|
|
16969
16925
|
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
|
-
) }) }),
|
|
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 }) }) }),
|
|
16988
16927
|
editorFooter ? editorFooter : null
|
|
16989
16928
|
] });
|
|
16990
16929
|
};
|
|
@@ -17010,7 +16949,8 @@ var RichText = ({
|
|
|
17010
16949
|
customControls,
|
|
17011
16950
|
onInsertTable,
|
|
17012
16951
|
onInsertAsset,
|
|
17013
|
-
minimalInteractivity
|
|
16952
|
+
minimalInteractivity,
|
|
16953
|
+
placeholder
|
|
17014
16954
|
}) => {
|
|
17015
16955
|
const [editor] = (0, import_LexicalComposerContext9.useLexicalComposerContext)();
|
|
17016
16956
|
(0, import_react158.useEffect)(() => {
|
|
@@ -17073,7 +17013,7 @@ var RichText = ({
|
|
|
17073
17013
|
import_LexicalRichTextPlugin.RichTextPlugin,
|
|
17074
17014
|
{
|
|
17075
17015
|
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..." }),
|
|
17016
|
+
placeholder: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { css: editorPlaceholder, "data-placeholder": true, children: placeholder != null ? placeholder : readOnly ? "empty" : "start editing..." }),
|
|
17077
17017
|
ErrorBoundary: import_LexicalErrorBoundary.default
|
|
17078
17018
|
}
|
|
17079
17019
|
),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "20.
|
|
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.
|
|
40
|
-
"@types/react-dom": "18.3.
|
|
41
|
-
"@uniformdev/canvas": "^20.
|
|
42
|
-
"@uniformdev/richtext": "^20.
|
|
43
|
-
"@vitest/coverage-v8": "
|
|
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": "
|
|
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": "
|
|
94
|
+
"gitHead": "f228361828ef49a596ca3841e5b79768c64418cf"
|
|
95
95
|
}
|