@luscii-healthtech/web-ui 61.0.2 → 62.0.1
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/components/Radio/LabeledRadioCard.js +18 -7
- package/dist/esm/components/Radio/LabeledRadioCard.js.map +1 -1
- package/dist/esm/components/Textarea/LabeledTextarea.js +3 -3
- package/dist/esm/components/Textarea/LabeledTextarea.js.map +1 -1
- package/dist/index.development.js +21 -9
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/components/Radio/LabeledRadioCard.d.ts +7 -2
- package/dist/src/components/Textarea/LabeledTextarea.d.ts +40 -3
- package/dist/src/generated/components/Radio/LabeledRadioCard.d.ts +7 -2
- package/dist/src/generated/components/Textarea/LabeledTextarea.d.ts +40 -3
- package/dist/stories/LabeledRadio.stories.d.ts +7 -0
- package/dist/stories/LabeledTextarea.stories.d.ts +9 -2
- package/dist/stories/PopoverRadioCardRecipe.stories.d.ts +0 -3
- package/dist/web-ui-tailwind.css +0 -10
- package/package.json +1 -1
|
@@ -3,12 +3,10 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import { Stack } from '../Stack/Stack.js';
|
|
6
|
-
import { LabelText } from '../forms/shared/LabelText.js';
|
|
7
6
|
import { Text } from '../Text/Text.js';
|
|
8
7
|
|
|
9
8
|
const isChildrenProps = (props) => "children" in props;
|
|
10
9
|
const RadioCardBase = React__default.forwardRef(({ id, disabled, className, inputClassName, aside, inputAttrs, hasSubtitle, children }, ref) => {
|
|
11
|
-
const semanticId = React__default.useId();
|
|
12
10
|
return jsxs(Stack, { as: "label", axis: "x", htmlFor: id, _py: hasSubtitle ? "base" : "l", _px: "l", justify: "between", align: "center", className: classNames(
|
|
13
11
|
"ui:cursor-pointer",
|
|
14
12
|
{
|
|
@@ -33,24 +31,37 @@ const RadioCardBase = React__default.forwardRef(({ id, disabled, className, inpu
|
|
|
33
31
|
// Checked and hovered styles
|
|
34
32
|
"ui:has-checked:not-has-disabled:bg-background-neutral-secondary-hovered ui:has-checked:not-has-disabled:ring-2 ui:hover:has-checked:not-has-disabled:ring-border-brand-primary-hovered",
|
|
35
33
|
className
|
|
36
|
-
), children: [jsx("input", Object.assign({ type: "radio"
|
|
34
|
+
), children: [jsx("input", Object.assign({ type: "radio" }, inputAttrs, { ref, className: classNames("ui:sr-only", inputClassName) })), jsx("span", { className: classNames("ui:flex ui:flex-1 ui:flex-col ui:min-w-0", {
|
|
37
35
|
"ui:[&_*]:!text-text-neutral-primary-disabled": disabled
|
|
38
|
-
}), children }), aside && jsx("
|
|
36
|
+
}), children }), aside && jsx("span", { className: classNames({
|
|
39
37
|
"ui:[&_*]:!text-text-neutral-primary-disabled": disabled
|
|
40
38
|
}), children: aside })] });
|
|
41
39
|
});
|
|
42
40
|
RadioCardBase.displayName = "RadioCardBase";
|
|
43
41
|
const LabeledRadioCardWithProps = React__default.forwardRef((props, ref) => {
|
|
44
|
-
const { className, inputClassName, aside, label, subtitle, leadingIcon } = props, inputAttrs = __rest(props, ["className", "inputClassName", "aside", "label", "subtitle", "leadingIcon"]);
|
|
42
|
+
const { className, inputClassName, aside, label, subtitle, leadingIcon, "aria-describedby": ariaDescribedBy } = props, inputAttrs = __rest(props, ["className", "inputClassName", "aside", "label", "subtitle", "leadingIcon", "aria-describedby"]);
|
|
45
43
|
const { id, disabled } = inputAttrs;
|
|
46
44
|
const hasSubtitle = subtitle !== void 0;
|
|
47
|
-
|
|
45
|
+
const subtitleId = React__default.useId();
|
|
46
|
+
return jsx(RadioCardBase, { id, disabled, className, inputClassName, aside, inputAttrs: Object.assign(Object.assign({}, inputAttrs), { "aria-describedby": classNames(ariaDescribedBy, hasSubtitle && subtitleId) || void 0 }), hasSubtitle, ref, children: jsxs(Stack, { as: "span", axis: "x", _gap: "base", align: "center", children: [leadingIcon, jsxs(Stack, { as: "span", axis: "y", _gap: "xs", align: "stretch", className: "ui:flex-1 ui:min-w-0", children: [typeof label === "string" ? jsx(Text, { variant: "body-base-regular", children: label }) : label, hasSubtitle && jsx("span", { id: subtitleId, "aria-hidden": true, className: "ui:flex ui:flex-col", children: typeof subtitle === "string" ? jsx(Text, { variant: "body-small-light", color: "neutral-secondary", children: subtitle }) : subtitle })] })] }) });
|
|
48
47
|
});
|
|
49
48
|
LabeledRadioCardWithProps.displayName = "LabeledRadioCardWithProps";
|
|
50
49
|
const LabeledRadioCardWithChildren = React__default.forwardRef((props, ref) => {
|
|
51
50
|
const { className, inputClassName, aside, children } = props, inputAttrs = __rest(props, ["className", "inputClassName", "aside", "children"]);
|
|
52
51
|
const { id, disabled } = inputAttrs;
|
|
53
|
-
return jsx(RadioCardBase, {
|
|
52
|
+
return jsx(RadioCardBase, {
|
|
53
|
+
id,
|
|
54
|
+
disabled,
|
|
55
|
+
className,
|
|
56
|
+
inputClassName,
|
|
57
|
+
aside,
|
|
58
|
+
inputAttrs,
|
|
59
|
+
// The card can't tell how many lines `children` has, so it keeps the
|
|
60
|
+
// compact padding of a card with a subtitle
|
|
61
|
+
hasSubtitle: true,
|
|
62
|
+
ref,
|
|
63
|
+
children
|
|
64
|
+
});
|
|
54
65
|
});
|
|
55
66
|
LabeledRadioCardWithChildren.displayName = "LabeledRadioCardWithChildren";
|
|
56
67
|
const LabeledRadioCard = React__default.forwardRef((props, ref) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledRadioCard.js","sources":["../../../../../../src/components/Radio/LabeledRadioCard.tsx"],"sourcesContent":[null],"names":["React","_jsxs","_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"LabeledRadioCard.js","sources":["../../../../../../src/components/Radio/LabeledRadioCard.tsx"],"sourcesContent":[null],"names":["React","_jsxs","_jsx"],"mappings":";;;;;;;AA+CA,MAAM,eAAA,GAAkB,CACtB,KAAA,KAC2B,UAAA,IAAc,KAAA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AA,CAAA,IAAK,KAAA,IAAO,GAAA,EAAQ,CAAA,CAAA;AACvD,CAAC;AAEH,gBAAA,CAAiB,WAAA,GAAc,kBAAA;;"}
|
|
@@ -8,14 +8,14 @@ import { HelperAndErrorText } from '../forms/shared/HelperAndErrorText.js';
|
|
|
8
8
|
import { LabelText } from '../forms/shared/LabelText.js';
|
|
9
9
|
import { Textarea } from './Textarea.js';
|
|
10
10
|
|
|
11
|
-
const LabeledTextarea =
|
|
12
|
-
const { className, helperText, errorText, label, width, fullWidth, id, "aria-describedby": ariaDescribedBy } = props, rest = __rest(props, ["className", "helperText", "errorText", "label", "width", "fullWidth", "id", "aria-describedby"]);
|
|
11
|
+
const LabeledTextarea = (props) => {
|
|
12
|
+
const { ref, className, helperText, errorText, label, width, fullWidth, id, "aria-describedby": ariaDescribedBy } = props, rest = __rest(props, ["ref", "className", "helperText", "errorText", "label", "width", "fullWidth", "id", "aria-describedby"]);
|
|
13
13
|
const generatedTextareaId = React__default.useId();
|
|
14
14
|
const textareaId = id || generatedTextareaId;
|
|
15
15
|
const helperErrorTextId = React__default.useId();
|
|
16
16
|
const fieldWidth = width !== null && width !== void 0 ? width : fullWidth ? "full" : void 0;
|
|
17
17
|
return jsxs(Stack, { _gap: "base", align: fieldWidth ? "stretch" : void 0, className: classNames(fieldWidth && calculateResponsiveWidthClasses(fieldWidth), className), children: [label && jsx(LabelText, { as: "label", htmlFor: textareaId, children: label }), jsx(Textarea, Object.assign({}, rest, { id: textareaId, ref, isError: Boolean(errorText), "aria-invalid": Boolean(errorText) || rest["aria-invalid"] || void 0, "aria-describedby": [ariaDescribedBy, helperErrorTextId].filter(Boolean).join(" ") })), jsx(HelperAndErrorText, { helperText, errorText, describingId: helperErrorTextId })] });
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
|
|
20
20
|
export { LabeledTextarea };
|
|
21
21
|
//# sourceMappingURL=LabeledTextarea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabeledTextarea.js","sources":["../../../../../../src/components/Textarea/LabeledTextarea.tsx"],"sourcesContent":[null],"names":["React","_jsxs","_jsx"],"mappings":";;;;;;;;;;AAyFO,MAAM,eAAA,
|
|
1
|
+
{"version":3,"file":"LabeledTextarea.js","sources":["../../../../../../src/components/Textarea/LabeledTextarea.tsx"],"sourcesContent":[null],"names":["React","_jsxs","_jsx"],"mappings":";;;;;;;;;;AAyFO,MAAM,eAAA,GAAkB,CAC7B,KAAA,KACE;AAIF,EAAA,MAAM,EACJ,GAAA,EACA,SAAA,EACA,UAAA,EACA,SAAA,EACA,KAAA,EACA,KAAA,EACA,SAAA,EACA,EAAA,EACA,kBAAA,EAAoB,eAAA,EAAe,GAEjC,KAAA,EADC,OAAI,MAAA,CACL,KAAA,EAXE,CAAA,KAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,OAAA,EAAA,OAAA,EAAA,WAAA,EAAA,IAAA,EAAA,kBAAA,CAWL,CAAA;AAED,EAAA,MAAM,mBAAA,GAAsBA,eAAM,KAAA;AAClC,EAAA,MAAM,aAAa,EAAA,IAAM,mBAAA;AACzB,EAAA,MAAM,iBAAA,GAAoBA,eAAM,KAAA;AAChC,EAAA,MAAM,aAAa,KAAA,aAAA,UAAK,MAAA,GAAL,KAAA,GAAU,YAAY,MAAA,GAAS,MAAA;AAQlD,EAAA,OACEC,KAAC,KAAA,IACC,IAAA,EAAK,MAAA,EACL,OAAO,UAAA,GAAa,SAAA,GAAY,MAAA,EAChC,SAAA,EAAW,WACT,UAAA,IAAc,+BAAA,CAAgC,UAAU,CAAA,EACxD,SAAS,CAAA,EACV,QAAA,EAAA,CAEA,KAAA,IACCC,IAAC,SAAA,EAAS,EAAC,EAAA,EAAG,OAAA,EAAQ,SAAS,UAAA,EAAU,QAAA,EACtC,KAAA,KAGLA,GAAA,CAAC,QAAA,EAAQ,OAAA,MAAA,CAAA,IACH,IAAA,EAAI,EACR,EAAA,EAAI,UAAA,EACJ,KACA,OAAA,EAAS,OAAA,CAAQ,SAAS,CAAA,EAAC,gBACb,OAAA,CAAQ,SAAS,CAAA,IAAK,IAAA,CAAK,cAAc,CAAA,IAAK,MAAA,EAAS,kBAAA,EACnD,CAAC,iBAAiB,iBAAiB,CAAA,CAClD,MAAA,CAAO,OAAO,EACd,IAAA,CAAK,GAAG,CAAA,EAAC,CAAA,CAAA,EAGdA,GAAA,CAAC,kBAAA,EAAkB,EACjB,YACA,SAAA,EACA,YAAA,EAAc,mBAAiB,CAC/B,GAAA,CAAA;AAGR;;"}
|
|
@@ -2163,7 +2163,6 @@ const LabeledCheckboxCardGroup = (props) => {
|
|
|
2163
2163
|
|
|
2164
2164
|
const isChildrenProps = (props) => "children" in props;
|
|
2165
2165
|
const RadioCardBase = React__namespace.default.forwardRef(({ id, disabled, className, inputClassName, aside, inputAttrs, hasSubtitle, children }, ref) => {
|
|
2166
|
-
const semanticId = React__namespace.default.useId();
|
|
2167
2166
|
return jsxRuntime.jsxs(Stack, { as: "label", axis: "x", htmlFor: id, _py: hasSubtitle ? "base" : "l", _px: "l", justify: "between", align: "center", className: classNames__default.default(
|
|
2168
2167
|
"ui:cursor-pointer",
|
|
2169
2168
|
{
|
|
@@ -2188,24 +2187,37 @@ const RadioCardBase = React__namespace.default.forwardRef(({ id, disabled, class
|
|
|
2188
2187
|
// Checked and hovered styles
|
|
2189
2188
|
"ui:has-checked:not-has-disabled:bg-background-neutral-secondary-hovered ui:has-checked:not-has-disabled:ring-2 ui:hover:has-checked:not-has-disabled:ring-border-brand-primary-hovered",
|
|
2190
2189
|
className
|
|
2191
|
-
), children: [jsxRuntime.jsx("input", Object.assign({ type: "radio"
|
|
2190
|
+
), children: [jsxRuntime.jsx("input", Object.assign({ type: "radio" }, inputAttrs, { ref, className: classNames__default.default("ui:sr-only", inputClassName) })), jsxRuntime.jsx("span", { className: classNames__default.default("ui:flex ui:flex-1 ui:flex-col ui:min-w-0", {
|
|
2192
2191
|
"ui:[&_*]:!text-text-neutral-primary-disabled": disabled
|
|
2193
|
-
}), children }), aside && jsxRuntime.jsx("
|
|
2192
|
+
}), children }), aside && jsxRuntime.jsx("span", { className: classNames__default.default({
|
|
2194
2193
|
"ui:[&_*]:!text-text-neutral-primary-disabled": disabled
|
|
2195
2194
|
}), children: aside })] });
|
|
2196
2195
|
});
|
|
2197
2196
|
RadioCardBase.displayName = "RadioCardBase";
|
|
2198
2197
|
const LabeledRadioCardWithProps = React__namespace.default.forwardRef((props, ref) => {
|
|
2199
|
-
const { className, inputClassName, aside, label, subtitle, leadingIcon } = props, inputAttrs = __rest(props, ["className", "inputClassName", "aside", "label", "subtitle", "leadingIcon"]);
|
|
2198
|
+
const { className, inputClassName, aside, label, subtitle, leadingIcon, "aria-describedby": ariaDescribedBy } = props, inputAttrs = __rest(props, ["className", "inputClassName", "aside", "label", "subtitle", "leadingIcon", "aria-describedby"]);
|
|
2200
2199
|
const { id, disabled } = inputAttrs;
|
|
2201
2200
|
const hasSubtitle = subtitle !== void 0;
|
|
2202
|
-
|
|
2201
|
+
const subtitleId = React__namespace.default.useId();
|
|
2202
|
+
return jsxRuntime.jsx(RadioCardBase, { id, disabled, className, inputClassName, aside, inputAttrs: Object.assign(Object.assign({}, inputAttrs), { "aria-describedby": classNames__default.default(ariaDescribedBy, hasSubtitle && subtitleId) || void 0 }), hasSubtitle, ref, children: jsxRuntime.jsxs(Stack, { as: "span", axis: "x", _gap: "base", align: "center", children: [leadingIcon, jsxRuntime.jsxs(Stack, { as: "span", axis: "y", _gap: "xs", align: "stretch", className: "ui:flex-1 ui:min-w-0", children: [typeof label === "string" ? jsxRuntime.jsx(Text, { variant: "body-base-regular", children: label }) : label, hasSubtitle && jsxRuntime.jsx("span", { id: subtitleId, "aria-hidden": true, className: "ui:flex ui:flex-col", children: typeof subtitle === "string" ? jsxRuntime.jsx(Text, { variant: "body-small-light", color: "neutral-secondary", children: subtitle }) : subtitle })] })] }) });
|
|
2203
2203
|
});
|
|
2204
2204
|
LabeledRadioCardWithProps.displayName = "LabeledRadioCardWithProps";
|
|
2205
2205
|
const LabeledRadioCardWithChildren = React__namespace.default.forwardRef((props, ref) => {
|
|
2206
2206
|
const { className, inputClassName, aside, children } = props, inputAttrs = __rest(props, ["className", "inputClassName", "aside", "children"]);
|
|
2207
2207
|
const { id, disabled } = inputAttrs;
|
|
2208
|
-
return jsxRuntime.jsx(RadioCardBase, {
|
|
2208
|
+
return jsxRuntime.jsx(RadioCardBase, {
|
|
2209
|
+
id,
|
|
2210
|
+
disabled,
|
|
2211
|
+
className,
|
|
2212
|
+
inputClassName,
|
|
2213
|
+
aside,
|
|
2214
|
+
inputAttrs,
|
|
2215
|
+
// The card can't tell how many lines `children` has, so it keeps the
|
|
2216
|
+
// compact padding of a card with a subtitle
|
|
2217
|
+
hasSubtitle: true,
|
|
2218
|
+
ref,
|
|
2219
|
+
children
|
|
2220
|
+
});
|
|
2209
2221
|
});
|
|
2210
2222
|
LabeledRadioCardWithChildren.displayName = "LabeledRadioCardWithChildren";
|
|
2211
2223
|
const LabeledRadioCard = React__namespace.default.forwardRef((props, ref) => {
|
|
@@ -2799,14 +2811,14 @@ const Textarea = React__namespace.default.forwardRef((_a, ref) => {
|
|
|
2799
2811
|
]), style, ref }));
|
|
2800
2812
|
});
|
|
2801
2813
|
|
|
2802
|
-
const LabeledTextarea =
|
|
2803
|
-
const { className, helperText, errorText, label, width, fullWidth, id, "aria-describedby": ariaDescribedBy } = props, rest = __rest(props, ["className", "helperText", "errorText", "label", "width", "fullWidth", "id", "aria-describedby"]);
|
|
2814
|
+
const LabeledTextarea = (props) => {
|
|
2815
|
+
const { ref, className, helperText, errorText, label, width, fullWidth, id, "aria-describedby": ariaDescribedBy } = props, rest = __rest(props, ["ref", "className", "helperText", "errorText", "label", "width", "fullWidth", "id", "aria-describedby"]);
|
|
2804
2816
|
const generatedTextareaId = React__namespace.default.useId();
|
|
2805
2817
|
const textareaId = id || generatedTextareaId;
|
|
2806
2818
|
const helperErrorTextId = React__namespace.default.useId();
|
|
2807
2819
|
const fieldWidth = width !== null && width !== void 0 ? width : fullWidth ? "full" : void 0;
|
|
2808
2820
|
return jsxRuntime.jsxs(Stack, { _gap: "base", align: fieldWidth ? "stretch" : void 0, className: classNames__default.default(fieldWidth && calculateResponsiveWidthClasses(fieldWidth), className), children: [label && jsxRuntime.jsx(LabelText, { as: "label", htmlFor: textareaId, children: label }), jsxRuntime.jsx(Textarea, Object.assign({}, rest, { id: textareaId, ref, isError: Boolean(errorText), "aria-invalid": Boolean(errorText) || rest["aria-invalid"] || void 0, "aria-describedby": [ariaDescribedBy, helperErrorTextId].filter(Boolean).join(" ") })), jsxRuntime.jsx(HelperAndErrorText, { helperText, errorText, describingId: helperErrorTextId })] });
|
|
2809
|
-
}
|
|
2821
|
+
};
|
|
2810
2822
|
|
|
2811
2823
|
const Actions$1 = (props) => {
|
|
2812
2824
|
const { children, className } = props, rest = __rest(props, ["children", "className"]);
|