@kaizen/components 1.45.1 → 1.45.2
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/cjs/RichTextEditor/RichTextEditor/RichTextEditor.cjs +6 -5
- package/dist/cjs/index.css +2 -2
- package/dist/esm/RichTextEditor/RichTextEditor/RichTextEditor.mjs +6 -5
- package/dist/esm/index.css +2 -2
- package/dist/styles.css +1 -1
- package/dist/types/packages/components/src/RichTextEditor/RichTextEditor/RichTextEditor.d.ts +2 -1
- package/package.json +3 -3
- package/src/RichTextEditor/RichTextEditor/RichTextEditor.tsx +6 -3
|
@@ -68,7 +68,8 @@ var ProseMirrorHistory__namespace = /*#__PURE__*/_interopNamespace(ProseMirrorHi
|
|
|
68
68
|
* {@link https://cultureamp.design/?path=/docs/components-richtexteditor--docs Storybook}
|
|
69
69
|
*/
|
|
70
70
|
var RichTextEditor = function (_a) {
|
|
71
|
-
var
|
|
71
|
+
var id = _a.id,
|
|
72
|
+
onChange = _a.onChange,
|
|
72
73
|
defaultValue = _a.defaultValue,
|
|
73
74
|
labelText = _a.labelText,
|
|
74
75
|
labelledBy = _a["aria-labelledby"],
|
|
@@ -83,11 +84,11 @@ var RichTextEditor = function (_a) {
|
|
|
83
84
|
description = _a.description,
|
|
84
85
|
_c = _a.status,
|
|
85
86
|
status = _c === void 0 ? "default" : _c,
|
|
86
|
-
restProps = tslib.__rest(_a, ["onChange", "defaultValue", "labelText", "aria-labelledby", "aria-describedby", "classNameOverride", "controls", "rows", "dataError", "onDataError", "validationMessage", "description", "status"]);
|
|
87
|
-
var
|
|
87
|
+
restProps = tslib.__rest(_a, ["id", "onChange", "defaultValue", "labelText", "aria-labelledby", "aria-describedby", "classNameOverride", "controls", "rows", "dataError", "onDataError", "validationMessage", "description", "status"]);
|
|
88
|
+
var generatedId = React.useId();
|
|
88
89
|
var schema$1 = React.useState(schema.createSchemaFromControls(controls))[0];
|
|
89
|
-
var
|
|
90
|
-
var
|
|
90
|
+
var editorId = id || generatedId;
|
|
91
|
+
var labelId = labelledBy || "".concat(editorId, "-rte-label");
|
|
91
92
|
var validationMessageAria = validationMessage ? "".concat(editorId, "-rte-validation-message") : "";
|
|
92
93
|
var descriptionAria = description ? "".concat(editorId, "-rte-description") : "";
|
|
93
94
|
var ariaDescribedBy = classnames__default.default(validationMessageAria, descriptionAria, describedBy);
|
package/dist/cjs/index.css
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
.Main-module_main__hMyB1{z-index:0}
|
|
3
3
|
.Wrapper-module_wrapper__89WmC{background:var(--color-gray-100,#f9f9f9);display:grid;grid-template-rows:min-content 1fr min-content;min-height:100vh;position:relative}
|
|
4
4
|
.FooterRoot-module_footerRoot__N-6nQ{align-items:center;background:var(--color-blue-500,#0168b3);display:grid;flex-grow:1;gap:var(--spacing-16,1rem);grid-template-areas:"prev stepper next";grid-template-columns:1fr 2fr 1fr;justify-content:center;padding:var(--spacing-24,1.5rem) var(--spacing-12,.75rem)}@media (min-width:768px){.FooterRoot-module_footerRoot__N-6nQ{bottom:0;grid-template-columns:1fr 5fr 1fr;padding:var(--spacing-24,1.5rem) var(--spacing-32,2rem);position:sticky;z-index:1}}
|
|
5
|
-
.Branding-module_branding__4h-rD{display:flex;flex-grow:1;grid-area:branding;justify-content:center;padding-top:var(--spacing-4,.25rem)}@media (min-width:768px){.Branding-module_branding__4h-rD{justify-content:unset}}.Branding-module_logo__vqqec{flex-basis:7.5rem}
|
|
6
|
-
.Titles-module_titles__JYwU0{align-items:center;flex-grow:1;grid-area:titles;justify-content:center}.Titles-module_pageTitle__YDp9S,.Titles-module_titles__JYwU0{display:flex;flex-direction:column}.Titles-module_prefix__40x8n{margin-bottom:var(--spacing-4,.25rem)}.Titles-module_status__huuP7{margin-top:var(--spacing-8,.5rem)}
|
|
7
5
|
.FooterActions-module_footerAction__v7eL-{display:flex;flex-basis:auto;flex-grow:1}.FooterActions-module_footerActionPrevious__2XByZ{grid-area:"prev";justify-content:start}.FooterActions-module_footerActionNext__IKRta{grid-area:"next";justify-content:end}
|
|
8
6
|
.Actions-module_actions__Prrp0{align-items:center;display:flex;flex-direction:column;flex-grow:1;grid-area:actions;justify-content:center}@media (min-width:768px){.Actions-module_actions__Prrp0{align-items:flex-start;flex-direction:row;justify-content:flex-end;margin-top:calc(var(--spacing-12, .75rem)*-1)}}
|
|
7
|
+
.Titles-module_titles__JYwU0{align-items:center;flex-grow:1;grid-area:titles;justify-content:center}.Titles-module_pageTitle__YDp9S,.Titles-module_titles__JYwU0{display:flex;flex-direction:column}.Titles-module_prefix__40x8n{margin-bottom:var(--spacing-4,.25rem)}.Titles-module_status__huuP7{margin-top:var(--spacing-8,.5rem)}
|
|
8
|
+
.Branding-module_branding__4h-rD{display:flex;flex-grow:1;grid-area:branding;justify-content:center;padding-top:var(--spacing-4,.25rem)}@media (min-width:768px){.Branding-module_branding__4h-rD{justify-content:unset}}.Branding-module_logo__vqqec{flex-basis:7.5rem}
|
|
9
9
|
.ProgressStepper-module_stepsContainer__WMxXN{grid-area:stepper;width:100%}.ProgressStepper-module_stepList__b1wWX{align-items:flex-end;display:none;justify-content:center;list-style:none;margin:0;padding:0}@media (min-width:768px){.ProgressStepper-module_stepList__b1wWX{display:flex}}.ProgressStepper-module_step__-Ep19{container:step/inline-size;display:flex;flex-basis:100%;flex-grow:1;justify-content:center;max-width:var(--spacing-96,6rem);overflow-wrap:break-word;position:relative}.ProgressStepper-module_stepContent__B4uFS{align-items:center;display:flex;flex-direction:column}.ProgressStepper-module_stepIndicator__-qEWT{height:1.25rem;position:relative;width:1.25rem}.ProgressStepper-module_stepName__hS4lp{display:none;font-weight:var(--typography-paragraph-bold-font-weight,600);margin-bottom:var(--spacing-12,.75rem);text-align:center}.ProgressStepper-module_stepIcon__0Kh4y{color:var(--color-white,#fff);height:1.25rem;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:1.25rem}.ProgressStepper-module_stepDivider__KEZPU{border:var(--spacing-1,.0625rem) solid var(--color-white,#fff);border-radius:var(--border-solid-border-radius,7px);display:flex;flex-grow:1;height:0;left:100%;margin:0;min-width:calc(100% - var(--spacing-24, 1.5rem));position:absolute;top:calc(100% - .625rem);transform:translateX(-50%)}[dir=rtl] .ProgressStepper-module_stepDivider__KEZPU{left:unset;right:100%;transform:translateX(50%)}.ProgressStepper-module_stepperDescription__B00hX{display:flex;justify-content:center}@media (min-width:768px){.ProgressStepper-module_stepperDescription__B00hX{height:0;overflow:hidden;position:absolute;width:0}}@container step (min-width: 4.5rem){.ProgressStepper-module_stepName__hS4lp{display:inline}}
|
|
10
10
|
.Root-module_root__7DVw5{align-items:center;background-color:var(--color-white,#fff);box-shadow:var(--shadow-small-box-shadow,0 1px 3px 0 rgba(0,0,0,.1),0 3px 16px 0 rgba(0,0,0,.06));display:grid;flex-grow:1;gap:var(--spacing-16,1rem);grid-template:"branding" min-content "titles" max-content "actions" min-content/1fr;justify-content:center;padding:var(--spacing-24,1.5rem);text-align:center}@media (min-width:768px){.Root-module_root__7DVw5{align-items:start;grid-template:"branding titles actions" min-content/1fr max-content 1fr;position:sticky;top:0;z-index:1}}
|
|
11
11
|
.SVG-module_icon__8J5Ev{display:inline-block;height:20px;width:20px}.SVG-module_icon__8J5Ev>use{pointer-events:none}@media screen and (-ms-high-contrast:active){.SVG-module_icon__8J5Ev{color:#000}}@media screen and (-ms-high-contrast:white-on-black){.SVG-module_icon__8J5Ev{color:#fff}}@media screen and (-ms-high-contrast:black-on-white){.SVG-module_icon__8J5Ev{color:#000}}.SVG-module_inheritSize__Q8iam{display:block;height:inherit;width:inherit}
|
|
@@ -36,7 +36,8 @@ import styles from './RichTextEditor.module.scss.mjs';
|
|
|
36
36
|
*/
|
|
37
37
|
const RichTextEditor = /*#__PURE__*/function () {
|
|
38
38
|
const RichTextEditor = function (_a) {
|
|
39
|
-
var
|
|
39
|
+
var id = _a.id,
|
|
40
|
+
onChange = _a.onChange,
|
|
40
41
|
defaultValue = _a.defaultValue,
|
|
41
42
|
labelText = _a.labelText,
|
|
42
43
|
labelledBy = _a["aria-labelledby"],
|
|
@@ -51,11 +52,11 @@ const RichTextEditor = /*#__PURE__*/function () {
|
|
|
51
52
|
description = _a.description,
|
|
52
53
|
_c = _a.status,
|
|
53
54
|
status = _c === void 0 ? "default" : _c,
|
|
54
|
-
restProps = __rest(_a, ["onChange", "defaultValue", "labelText", "aria-labelledby", "aria-describedby", "classNameOverride", "controls", "rows", "dataError", "onDataError", "validationMessage", "description", "status"]);
|
|
55
|
-
var
|
|
55
|
+
restProps = __rest(_a, ["id", "onChange", "defaultValue", "labelText", "aria-labelledby", "aria-describedby", "classNameOverride", "controls", "rows", "dataError", "onDataError", "validationMessage", "description", "status"]);
|
|
56
|
+
var generatedId = useId();
|
|
56
57
|
var schema = useState(createSchemaFromControls(controls))[0];
|
|
57
|
-
var
|
|
58
|
-
var
|
|
58
|
+
var editorId = id || generatedId;
|
|
59
|
+
var labelId = labelledBy || "".concat(editorId, "-rte-label");
|
|
59
60
|
var validationMessageAria = validationMessage ? "".concat(editorId, "-rte-validation-message") : "";
|
|
60
61
|
var descriptionAria = description ? "".concat(editorId, "-rte-description") : "";
|
|
61
62
|
var ariaDescribedBy = classnames(validationMessageAria, descriptionAria, describedBy);
|
package/dist/esm/index.css
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
.Main-module_main__hMyB1{z-index:0}
|
|
3
3
|
.Wrapper-module_wrapper__89WmC{background:var(--color-gray-100,#f9f9f9);display:grid;grid-template-rows:min-content 1fr min-content;min-height:100vh;position:relative}
|
|
4
4
|
.FooterRoot-module_footerRoot__N-6nQ{align-items:center;background:var(--color-blue-500,#0168b3);display:grid;flex-grow:1;gap:var(--spacing-16,1rem);grid-template-areas:"prev stepper next";grid-template-columns:1fr 2fr 1fr;justify-content:center;padding:var(--spacing-24,1.5rem) var(--spacing-12,.75rem)}@media (min-width:768px){.FooterRoot-module_footerRoot__N-6nQ{bottom:0;grid-template-columns:1fr 5fr 1fr;padding:var(--spacing-24,1.5rem) var(--spacing-32,2rem);position:sticky;z-index:1}}
|
|
5
|
-
.Branding-module_branding__4h-rD{display:flex;flex-grow:1;grid-area:branding;justify-content:center;padding-top:var(--spacing-4,.25rem)}@media (min-width:768px){.Branding-module_branding__4h-rD{justify-content:unset}}.Branding-module_logo__vqqec{flex-basis:7.5rem}
|
|
6
|
-
.Titles-module_titles__JYwU0{align-items:center;flex-grow:1;grid-area:titles;justify-content:center}.Titles-module_pageTitle__YDp9S,.Titles-module_titles__JYwU0{display:flex;flex-direction:column}.Titles-module_prefix__40x8n{margin-bottom:var(--spacing-4,.25rem)}.Titles-module_status__huuP7{margin-top:var(--spacing-8,.5rem)}
|
|
7
5
|
.FooterActions-module_footerAction__v7eL-{display:flex;flex-basis:auto;flex-grow:1}.FooterActions-module_footerActionPrevious__2XByZ{grid-area:"prev";justify-content:start}.FooterActions-module_footerActionNext__IKRta{grid-area:"next";justify-content:end}
|
|
8
6
|
.Actions-module_actions__Prrp0{align-items:center;display:flex;flex-direction:column;flex-grow:1;grid-area:actions;justify-content:center}@media (min-width:768px){.Actions-module_actions__Prrp0{align-items:flex-start;flex-direction:row;justify-content:flex-end;margin-top:calc(var(--spacing-12, .75rem)*-1)}}
|
|
7
|
+
.Titles-module_titles__JYwU0{align-items:center;flex-grow:1;grid-area:titles;justify-content:center}.Titles-module_pageTitle__YDp9S,.Titles-module_titles__JYwU0{display:flex;flex-direction:column}.Titles-module_prefix__40x8n{margin-bottom:var(--spacing-4,.25rem)}.Titles-module_status__huuP7{margin-top:var(--spacing-8,.5rem)}
|
|
8
|
+
.Branding-module_branding__4h-rD{display:flex;flex-grow:1;grid-area:branding;justify-content:center;padding-top:var(--spacing-4,.25rem)}@media (min-width:768px){.Branding-module_branding__4h-rD{justify-content:unset}}.Branding-module_logo__vqqec{flex-basis:7.5rem}
|
|
9
9
|
.ProgressStepper-module_stepsContainer__WMxXN{grid-area:stepper;width:100%}.ProgressStepper-module_stepList__b1wWX{align-items:flex-end;display:none;justify-content:center;list-style:none;margin:0;padding:0}@media (min-width:768px){.ProgressStepper-module_stepList__b1wWX{display:flex}}.ProgressStepper-module_step__-Ep19{container:step/inline-size;display:flex;flex-basis:100%;flex-grow:1;justify-content:center;max-width:var(--spacing-96,6rem);overflow-wrap:break-word;position:relative}.ProgressStepper-module_stepContent__B4uFS{align-items:center;display:flex;flex-direction:column}.ProgressStepper-module_stepIndicator__-qEWT{height:1.25rem;position:relative;width:1.25rem}.ProgressStepper-module_stepName__hS4lp{display:none;font-weight:var(--typography-paragraph-bold-font-weight,600);margin-bottom:var(--spacing-12,.75rem);text-align:center}.ProgressStepper-module_stepIcon__0Kh4y{color:var(--color-white,#fff);height:1.25rem;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%);width:1.25rem}.ProgressStepper-module_stepDivider__KEZPU{border:var(--spacing-1,.0625rem) solid var(--color-white,#fff);border-radius:var(--border-solid-border-radius,7px);display:flex;flex-grow:1;height:0;left:100%;margin:0;min-width:calc(100% - var(--spacing-24, 1.5rem));position:absolute;top:calc(100% - .625rem);transform:translateX(-50%)}[dir=rtl] .ProgressStepper-module_stepDivider__KEZPU{left:unset;right:100%;transform:translateX(50%)}.ProgressStepper-module_stepperDescription__B00hX{display:flex;justify-content:center}@media (min-width:768px){.ProgressStepper-module_stepperDescription__B00hX{height:0;overflow:hidden;position:absolute;width:0}}@container step (min-width: 4.5rem){.ProgressStepper-module_stepName__hS4lp{display:inline}}
|
|
10
10
|
.Root-module_root__7DVw5{align-items:center;background-color:var(--color-white,#fff);box-shadow:var(--shadow-small-box-shadow,0 1px 3px 0 rgba(0,0,0,.1),0 3px 16px 0 rgba(0,0,0,.06));display:grid;flex-grow:1;gap:var(--spacing-16,1rem);grid-template:"branding" min-content "titles" max-content "actions" min-content/1fr;justify-content:center;padding:var(--spacing-24,1.5rem);text-align:center}@media (min-width:768px){.Root-module_root__7DVw5{align-items:start;grid-template:"branding titles actions" min-content/1fr max-content 1fr;position:sticky;top:0;z-index:1}}
|
|
11
11
|
.SVG-module_icon__8J5Ev{display:inline-block;height:20px;width:20px}.SVG-module_icon__8J5Ev>use{pointer-events:none}@media screen and (-ms-high-contrast:active){.SVG-module_icon__8J5Ev{color:#000}}@media screen and (-ms-high-contrast:white-on-black){.SVG-module_icon__8J5Ev{color:#fff}}@media screen and (-ms-high-contrast:black-on-white){.SVG-module_icon__8J5Ev{color:#000}}.SVG-module_inheritSize__Q8iam{display:block;height:inherit;width:inherit}
|