@techsio/ui-kit 0.48.0 → 0.49.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/atoms/numeric-input.js +3 -0
- package/dist/molecules/form-checkbox.js +12 -2
- package/dist/molecules/form-error-summary.js +59 -0
- package/dist/molecules/form-input.js +10 -1
- package/dist/molecules/form-numeric-input.js +9 -1
- package/dist/molecules/form-textarea.js +10 -1
- package/dist/src/atoms/numeric-input.d.ts +1 -1
- package/dist/src/atoms/numeric-input.d.ts.map +1 -1
- package/dist/src/molecules/form-checkbox.d.ts +2 -1
- package/dist/src/molecules/form-checkbox.d.ts.map +1 -1
- package/dist/src/molecules/form-error-summary.d.ts +29 -0
- package/dist/src/molecules/form-error-summary.d.ts.map +1 -0
- package/dist/src/molecules/form-input.d.ts +3 -3
- package/dist/src/molecules/form-input.d.ts.map +1 -1
- package/dist/src/molecules/form-numeric-input.d.ts +3 -3
- package/dist/src/molecules/form-numeric-input.d.ts.map +1 -1
- package/dist/src/molecules/form-textarea.d.ts +3 -3
- package/dist/src/molecules/form-textarea.d.ts.map +1 -1
- package/dist/src/templates/numeric-input.d.ts +1 -1
- package/dist/stories/changelog/changelog.stories.d.ts.map +1 -1
- package/dist/stories/molecules/form-error-summary.stories.d.ts +11 -0
- package/dist/stories/molecules/form-error-summary.stories.d.ts.map +1 -0
- package/dist/test/form-error-summary.ids.test.d.ts +2 -0
- package/dist/test/form-error-summary.ids.test.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/tokens/components/components.css +1 -0
- package/src/tokens/components/molecules/_form-error-summary.css +20 -0
|
@@ -102,6 +102,9 @@ function NumericInput({ id, name, size, disabled = false, required = false, patt
|
|
|
102
102
|
const stringDefaultValue = void 0 !== defaultValue ? formatValue(defaultValue) : void 0;
|
|
103
103
|
const service = useMachine(__rspack_external__zag_js_number_input_f1a1f439.machine, {
|
|
104
104
|
id: uniqueId,
|
|
105
|
+
ids: id ? {
|
|
106
|
+
input: id
|
|
107
|
+
} : void 0,
|
|
105
108
|
min,
|
|
106
109
|
max,
|
|
107
110
|
step,
|
|
@@ -61,11 +61,19 @@ const checkboxVariants = tv({
|
|
|
61
61
|
size: "md"
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
-
function FormCheckbox({ id, name, value, checked, defaultChecked, indeterminate, disabled = false, required = false, readOnly = false, children, label, helpText, validateStatus = "default", showHelpTextIcon = "default" !== validateStatus, size = "md", className, onCheckedChange }) {
|
|
64
|
+
function FormCheckbox({ id, name, value, checked, defaultChecked, indeterminate, disabled = false, required = false, readOnly = false, children, label, helpText, "aria-describedby": ariaDescribedBy, validateStatus = "default", showHelpTextIcon = "default" !== validateStatus, size = "md", className, onCheckedChange }) {
|
|
65
65
|
const generatedId = useId();
|
|
66
66
|
const uniqueId = id || generatedId;
|
|
67
|
+
const helpTextId = useId();
|
|
68
|
+
const describedBy = [
|
|
69
|
+
ariaDescribedBy,
|
|
70
|
+
helpText ? helpTextId : void 0
|
|
71
|
+
].filter(Boolean).join(" ") || void 0;
|
|
67
72
|
const service = useMachine(machine, {
|
|
68
73
|
id: uniqueId,
|
|
74
|
+
ids: id ? {
|
|
75
|
+
hiddenInput: id
|
|
76
|
+
} : void 0,
|
|
69
77
|
name,
|
|
70
78
|
value,
|
|
71
79
|
checked: indeterminate ? "indeterminate" : checked,
|
|
@@ -100,7 +108,8 @@ function FormCheckbox({ id, name, value, checked, defaultChecked, indeterminate,
|
|
|
100
108
|
}),
|
|
101
109
|
/*#__PURE__*/ jsx("input", {
|
|
102
110
|
className: styles.hiddenInput(),
|
|
103
|
-
...api.getHiddenInputProps()
|
|
111
|
+
...api.getHiddenInputProps(),
|
|
112
|
+
"aria-describedby": describedBy
|
|
104
113
|
}),
|
|
105
114
|
labelContent && /*#__PURE__*/ jsxs("span", {
|
|
106
115
|
className: styles.label(),
|
|
@@ -119,6 +128,7 @@ function FormCheckbox({ id, name, value, checked, defaultChecked, indeterminate,
|
|
|
119
128
|
className: styles.textIndented(),
|
|
120
129
|
"data-icon": showHelpTextIcon,
|
|
121
130
|
children: /*#__PURE__*/ jsx(StatusText, {
|
|
131
|
+
id: helpTextId,
|
|
122
132
|
showIcon: showHelpTextIcon,
|
|
123
133
|
size: size,
|
|
124
134
|
status: validateStatus,
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { tv } from "../utils.js";
|
|
3
|
+
const formErrorSummaryVariants = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: [
|
|
6
|
+
"flex flex-col gap-100",
|
|
7
|
+
"rounded-form-control",
|
|
8
|
+
"border-(length:--border-width-validation)",
|
|
9
|
+
"border-form-error-summary-border",
|
|
10
|
+
"bg-form-error-summary-bg",
|
|
11
|
+
"p-300"
|
|
12
|
+
],
|
|
13
|
+
title: [
|
|
14
|
+
"text-label-md",
|
|
15
|
+
"font-medium",
|
|
16
|
+
"text-form-error-summary-fg"
|
|
17
|
+
],
|
|
18
|
+
list: [
|
|
19
|
+
"m-0",
|
|
20
|
+
"flex list-none flex-col gap-100 p-0"
|
|
21
|
+
],
|
|
22
|
+
link: [
|
|
23
|
+
"text-form-error-summary-fg",
|
|
24
|
+
"underline",
|
|
25
|
+
"underline-offset-4",
|
|
26
|
+
"focus-visible:form-error-summary-focus-ring"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
function FormErrorSummary({ title = "There is a problem", errors, onFieldFocus, className, ref }) {
|
|
31
|
+
if (0 === errors.length) return null;
|
|
32
|
+
const styles = formErrorSummaryVariants();
|
|
33
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
34
|
+
className: styles.root({
|
|
35
|
+
className
|
|
36
|
+
}),
|
|
37
|
+
ref: ref,
|
|
38
|
+
role: "alert",
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ jsx("h2", {
|
|
41
|
+
className: styles.title(),
|
|
42
|
+
children: title
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ jsx("ul", {
|
|
45
|
+
className: styles.list(),
|
|
46
|
+
children: errors.map((error)=>/*#__PURE__*/ jsx("li", {
|
|
47
|
+
children: /*#__PURE__*/ jsx("a", {
|
|
48
|
+
className: styles.link(),
|
|
49
|
+
href: `#${error.targetId}`,
|
|
50
|
+
onClick: ()=>onFieldFocus?.(error.targetId),
|
|
51
|
+
children: error.label
|
|
52
|
+
})
|
|
53
|
+
}, error.id))
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
FormErrorSummary.displayName = "FormErrorSummary";
|
|
59
|
+
export { FormErrorSummary };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
2
3
|
import { Input } from "../atoms/input.js";
|
|
3
4
|
import { Label } from "../atoms/label.js";
|
|
4
5
|
import { StatusText } from "../atoms/status-text.js";
|
|
@@ -26,9 +27,15 @@ function FormInputRaw({ id, label, validateStatus = "default", helpText, size =
|
|
|
26
27
|
]
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
|
-
function FormInput({ helpText, id, validateStatus = "default", showHelpTextIcon = "default" !== validateStatus, size = "md", ...props }) {
|
|
30
|
+
function FormInput({ helpText, id, validateStatus = "default", showHelpTextIcon = "default" !== validateStatus, size = "md", "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, ...props }) {
|
|
31
|
+
const helpTextId = useId();
|
|
32
|
+
const describedBy = [
|
|
33
|
+
ariaDescribedBy,
|
|
34
|
+
helpText ? helpTextId : void 0
|
|
35
|
+
].filter(Boolean).join(" ") || void 0;
|
|
30
36
|
return /*#__PURE__*/ jsx(FormInputRaw, {
|
|
31
37
|
helpText: helpText && /*#__PURE__*/ jsx(StatusText, {
|
|
38
|
+
id: helpTextId,
|
|
32
39
|
status: validateStatus,
|
|
33
40
|
showIcon: showHelpTextIcon,
|
|
34
41
|
size: size,
|
|
@@ -37,6 +44,8 @@ function FormInput({ helpText, id, validateStatus = "default", showHelpTextIcon
|
|
|
37
44
|
id: id,
|
|
38
45
|
size: size,
|
|
39
46
|
validateStatus: validateStatus,
|
|
47
|
+
"aria-invalid": "error" === validateStatus ? true : ariaInvalid,
|
|
48
|
+
"aria-describedby": describedBy,
|
|
40
49
|
...props
|
|
41
50
|
});
|
|
42
51
|
}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
2
3
|
import { Label } from "../atoms/label.js";
|
|
3
4
|
import { NumericInput } from "../atoms/numeric-input.js";
|
|
4
5
|
import { StatusText } from "../atoms/status-text.js";
|
|
5
|
-
function FormNumericInput({ id, label, validateStatus = "default", helpText, showHelpTextIcon = "default" !== validateStatus, size = "md", required, disabled, children, ...numericInputProps }) {
|
|
6
|
+
function FormNumericInput({ id, label, validateStatus = "default", helpText, showHelpTextIcon = "default" !== validateStatus, size = "md", required, disabled, children, describedBy, ...numericInputProps }) {
|
|
7
|
+
const helpTextId = useId();
|
|
8
|
+
const mergedDescribedBy = [
|
|
9
|
+
describedBy,
|
|
10
|
+
helpText ? helpTextId : void 0
|
|
11
|
+
].filter(Boolean).join(" ") || void 0;
|
|
6
12
|
return /*#__PURE__*/ jsxs("div", {
|
|
7
13
|
className: "flex flex-col gap-form-field-gap",
|
|
8
14
|
children: [
|
|
@@ -19,10 +25,12 @@ function FormNumericInput({ id, label, validateStatus = "default", helpText, sho
|
|
|
19
25
|
invalid: "error" === validateStatus,
|
|
20
26
|
required: required,
|
|
21
27
|
size: size,
|
|
28
|
+
describedBy: mergedDescribedBy,
|
|
22
29
|
...numericInputProps,
|
|
23
30
|
children: children
|
|
24
31
|
}),
|
|
25
32
|
helpText && /*#__PURE__*/ jsx(StatusText, {
|
|
33
|
+
id: helpTextId,
|
|
26
34
|
status: validateStatus,
|
|
27
35
|
showIcon: showHelpTextIcon,
|
|
28
36
|
size: size,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
2
3
|
import { Label } from "../atoms/label.js";
|
|
3
4
|
import { StatusText } from "../atoms/status-text.js";
|
|
4
5
|
import { Textarea } from "../atoms/textarea.js";
|
|
@@ -25,9 +26,15 @@ function FormTextareaRaw({ id, label, validateStatus = "default", helpText, size
|
|
|
25
26
|
]
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
|
-
function FormTextarea({ helpText, id, validateStatus = "default", showHelpTextIcon = "default" !== validateStatus, size = "md", ...props }) {
|
|
29
|
+
function FormTextarea({ helpText, id, validateStatus = "default", showHelpTextIcon = "default" !== validateStatus, size = "md", "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, ...props }) {
|
|
30
|
+
const helpTextId = useId();
|
|
31
|
+
const describedBy = [
|
|
32
|
+
ariaDescribedBy,
|
|
33
|
+
helpText ? helpTextId : void 0
|
|
34
|
+
].filter(Boolean).join(" ") || void 0;
|
|
29
35
|
return /*#__PURE__*/ jsx(FormTextareaRaw, {
|
|
30
36
|
helpText: helpText && /*#__PURE__*/ jsx(StatusText, {
|
|
37
|
+
id: helpTextId,
|
|
31
38
|
status: validateStatus,
|
|
32
39
|
showIcon: showHelpTextIcon,
|
|
33
40
|
size: size,
|
|
@@ -36,6 +43,8 @@ function FormTextarea({ helpText, id, validateStatus = "default", showHelpTextIc
|
|
|
36
43
|
id: id,
|
|
37
44
|
size: size,
|
|
38
45
|
validateStatus: validateStatus,
|
|
46
|
+
"aria-invalid": "error" === validateStatus ? true : ariaInvalid,
|
|
47
|
+
"aria-describedby": describedBy,
|
|
39
48
|
...props
|
|
40
49
|
});
|
|
41
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numeric-input.d.ts","sourceRoot":"","sources":["../../../src/atoms/numeric-input.tsx"],"names":[],"mappings":"AAAA;;;;;;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,UAAU,CAAC;IAE5D,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAA;IACrE,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,YAAY,GAAG,UAAU,CAAA;IACrD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IAGf,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC/B,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,SAAS,CAAA;IAG/D,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IAGpB,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAA;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AA+CD,UAAU,yBAA0B,SAAQ,wBAAwB,CAAC,KAAK,CAAC;IACzE,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B;AAoBD,UAAU,iCACR,SAAQ,wBAAwB,CAAC,KAAK,CAAC;IACvC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B"}
|
|
@@ -12,13 +12,14 @@ export type FormCheckboxProps = {
|
|
|
12
12
|
children?: ReactNode;
|
|
13
13
|
label?: ReactNode;
|
|
14
14
|
helpText?: ReactNode;
|
|
15
|
+
"aria-describedby"?: string;
|
|
15
16
|
validateStatus?: "default" | "error" | "success" | "warning";
|
|
16
17
|
showHelpTextIcon?: boolean;
|
|
17
18
|
size?: "sm" | "md" | "lg";
|
|
18
19
|
className?: string;
|
|
19
20
|
onCheckedChange?: (checked: boolean) => void;
|
|
20
21
|
};
|
|
21
|
-
export declare function FormCheckbox({ id, name, value, checked, defaultChecked, indeterminate, disabled, required, readOnly, children, label, helpText, validateStatus, showHelpTextIcon, size, className, onCheckedChange, }: FormCheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function FormCheckbox({ id, name, value, checked, defaultChecked, indeterminate, disabled, required, readOnly, children, label, helpText, "aria-describedby": ariaDescribedBy, validateStatus, showHelpTextIcon, size, className, onCheckedChange, }: FormCheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
22
23
|
export declare namespace FormCheckbox {
|
|
23
24
|
var displayName: string;
|
|
24
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-checkbox.d.ts","sourceRoot":"","sources":["../../../src/molecules/form-checkbox.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAA;AAwD7C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,cAAc,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;IAC5D,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI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,YAAY,CAAC,EAC3B,EAAE,EACF,IAAI,EACJ,KAAK,EACL,OAAO,EACP,cAAc,EACd,aAAa,EACb,QAAgB,EAChB,QAAgB,EAChB,QAAgB,EAChB,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,kBAAkB,EAAE,eAAe,EACnC,cAA0B,EAC1B,gBAA+C,EAC/C,IAAW,EACX,SAAS,EACT,eAAe,GAChB,EAAE,iBAAiB,2CA+DnB;yBAlFe,YAAY"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FormErrorSummary — @techsio/ui-kit molecule.
|
|
3
|
+
*
|
|
4
|
+
* @component FormErrorSummary
|
|
5
|
+
* @componentVersion v1.0.1
|
|
6
|
+
* @skill form-error-summary-usage
|
|
7
|
+
* @changelog libs/ui/stories/changelog/changelog.stories.tsx
|
|
8
|
+
*
|
|
9
|
+
* Versioning is enforced at commit by scripts/check-skill-sync.mjs: @componentVersion must match
|
|
10
|
+
* the form-error-summary-usage skill's component_version and a changelog entry. Bump all three together.
|
|
11
|
+
*/
|
|
12
|
+
import type { Ref } from "react";
|
|
13
|
+
export type FormErrorSummaryError = {
|
|
14
|
+
id: string;
|
|
15
|
+
label: string;
|
|
16
|
+
targetId: string;
|
|
17
|
+
};
|
|
18
|
+
export type FormErrorSummaryProps = {
|
|
19
|
+
title?: string;
|
|
20
|
+
errors: FormErrorSummaryError[];
|
|
21
|
+
onFieldFocus?: (targetId: string) => void;
|
|
22
|
+
className?: string;
|
|
23
|
+
ref?: Ref<HTMLDivElement>;
|
|
24
|
+
};
|
|
25
|
+
export declare function FormErrorSummary({ title, errors, onFieldFocus, className, ref, }: FormErrorSummaryProps): import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export declare namespace FormErrorSummary {
|
|
27
|
+
var displayName: string;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=form-error-summary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-error-summary.d.ts","sourceRoot":"","sources":["../../../src/molecules/form-error-summary.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAGhC,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,qBAAqB,EAAE,CAAA;IAC/B,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAA;CAC1B,CAAA;AAuBD,wBAAgB,gBAAgB,CAAC,EAC/B,KAA4B,EAC5B,MAAM,EACN,YAAY,EACZ,SAAS,EACT,GAAG,GACJ,EAAE,qBAAqB,kDAyBvB;yBA/Be,gBAAgB"}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* FormInput — @techsio/ui-kit molecule.
|
|
3
3
|
*
|
|
4
4
|
* @component FormInput
|
|
5
|
-
* @componentVersion v1.
|
|
5
|
+
* @componentVersion v1.1.0
|
|
6
6
|
* @skill form-input-usage
|
|
7
7
|
* @changelog libs/ui/stories/changelog/changelog.stories.tsx
|
|
8
8
|
*
|
|
9
9
|
* Versioning is enforced at commit by scripts/check-skill-sync.mjs: @componentVersion must match
|
|
10
10
|
* the form-input-usage skill's component_version and a changelog entry. Bump all three together.
|
|
11
11
|
*/
|
|
12
|
-
import type
|
|
12
|
+
import { type ReactNode } from "react";
|
|
13
13
|
import { type InputProps } from "../atoms/input.js";
|
|
14
14
|
type ValidateStatus = "default" | "error" | "success" | "warning";
|
|
15
15
|
interface FormInputRawProps extends InputProps {
|
|
@@ -22,6 +22,6 @@ export declare function FormInputRaw({ id, label, validateStatus, helpText, size
|
|
|
22
22
|
type FormInputProps = FormInputRawProps & {
|
|
23
23
|
showHelpTextIcon?: boolean;
|
|
24
24
|
};
|
|
25
|
-
export declare function FormInput({ helpText, id, validateStatus, showHelpTextIcon, size, ...props }: FormInputProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function FormInput({ helpText, id, validateStatus, showHelpTextIcon, size, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, ...props }: FormInputProps): import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
export {};
|
|
27
27
|
//# sourceMappingURL=form-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-input.d.ts","sourceRoot":"","sources":["../../../src/molecules/form-input.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"form-input.d.ts","sourceRoot":"","sources":["../../../src/molecules/form-input.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAIvD,KAAK,cAAc,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAEjE,UAAU,iBAAkB,SAAQ,UAAU;IAC5C,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,SAAS,CAAA;IAChB,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,wBAAgB,YAAY,CAAC,EAC3B,EAAE,EACF,KAAK,EACL,cAA0B,EAC1B,QAAQ,EACR,IAAW,EACX,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAmBnB;AAED,KAAK,cAAc,GAAG,iBAAiB,GAAG;IACxC,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA;AAED,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,EAAE,EACF,cAA0B,EAC1B,gBAA+C,EAC/C,IAAW,EACX,kBAAkB,EAAE,eAAe,EACnC,cAAc,EAAE,WAAW,EAC3B,GAAG,KAAK,EACT,EAAE,cAAc,2CA6BhB"}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* FormNumericInput — @techsio/ui-kit molecule.
|
|
3
3
|
*
|
|
4
4
|
* @component FormNumericInput
|
|
5
|
-
* @componentVersion v1.
|
|
5
|
+
* @componentVersion v1.1.0
|
|
6
6
|
* @skill form-numeric-input-usage
|
|
7
7
|
* @changelog libs/ui/stories/changelog/changelog.stories.tsx
|
|
8
8
|
*
|
|
9
9
|
* Versioning is enforced at commit by scripts/check-skill-sync.mjs: @componentVersion must match
|
|
10
10
|
* the form-numeric-input-usage skill's component_version and a changelog entry. Bump all three together.
|
|
11
11
|
*/
|
|
12
|
-
import type
|
|
12
|
+
import { type ReactNode } from "react";
|
|
13
13
|
import { type NumericInputProps } from "../atoms/numeric-input.js";
|
|
14
14
|
type ValidateStatus = "default" | "error" | "success" | "warning";
|
|
15
15
|
interface FormNumericInputProps extends Omit<NumericInputProps, "children"> {
|
|
@@ -20,6 +20,6 @@ interface FormNumericInputProps extends Omit<NumericInputProps, "children"> {
|
|
|
20
20
|
showHelpTextIcon?: boolean;
|
|
21
21
|
children: ReactNode;
|
|
22
22
|
}
|
|
23
|
-
export declare function FormNumericInput({ id, label, validateStatus, helpText, showHelpTextIcon, size, required, disabled, children, ...numericInputProps }: FormNumericInputProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function FormNumericInput({ id, label, validateStatus, helpText, showHelpTextIcon, size, required, disabled, children, describedBy, ...numericInputProps }: FormNumericInputProps): import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
export {};
|
|
25
25
|
//# sourceMappingURL=form-numeric-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-numeric-input.d.ts","sourceRoot":"","sources":["../../../src/molecules/form-numeric-input.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"form-numeric-input.d.ts","sourceRoot":"","sources":["../../../src/molecules/form-numeric-input.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAA;AAE7C,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAG7E,KAAK,cAAc,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAEjE,UAAU,qBAAsB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC;IACzE,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,SAAS,CAAA;IAChB,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,EAAE,EACF,KAAK,EACL,cAA0B,EAC1B,QAAQ,EACR,gBAA+C,EAC/C,IAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,GAAG,iBAAiB,EACrB,EAAE,qBAAqB,2CAqCvB"}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* FormTextarea — @techsio/ui-kit molecule.
|
|
3
3
|
*
|
|
4
4
|
* @component FormTextarea
|
|
5
|
-
* @componentVersion v1.
|
|
5
|
+
* @componentVersion v1.1.0
|
|
6
6
|
* @skill form-textarea-usage
|
|
7
7
|
* @changelog libs/ui/stories/changelog/changelog.stories.tsx
|
|
8
8
|
*
|
|
9
9
|
* Versioning is enforced at commit by scripts/check-skill-sync.mjs: @componentVersion must match
|
|
10
10
|
* the form-textarea-usage skill's component_version and a changelog entry. Bump all three together.
|
|
11
11
|
*/
|
|
12
|
-
import type
|
|
12
|
+
import { type ReactNode } from "react";
|
|
13
13
|
import { type TextareaProps } from "../atoms/textarea.js";
|
|
14
14
|
type ValidateStatus = "default" | "error" | "success" | "warning";
|
|
15
15
|
interface FormTextareaRawProps extends TextareaProps {
|
|
@@ -22,6 +22,6 @@ export declare function FormTextareaRaw({ id, label, validateStatus, helpText, s
|
|
|
22
22
|
type FormTextareaProps = FormTextareaRawProps & {
|
|
23
23
|
showHelpTextIcon?: boolean;
|
|
24
24
|
};
|
|
25
|
-
export declare function FormTextarea({ helpText, id, validateStatus, showHelpTextIcon, size, ...props }: FormTextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function FormTextarea({ helpText, id, validateStatus, showHelpTextIcon, size, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, ...props }: FormTextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
export {};
|
|
27
27
|
//# sourceMappingURL=form-textarea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-textarea.d.ts","sourceRoot":"","sources":["../../../src/molecules/form-textarea.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"form-textarea.d.ts","sourceRoot":"","sources":["../../../src/molecules/form-textarea.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAA;AAG7C,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEhE,KAAK,cAAc,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAEjE,UAAU,oBAAqB,SAAQ,aAAa;IAClD,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,SAAS,CAAA;IAChB,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,wBAAgB,eAAe,CAAC,EAC9B,EAAE,EACF,KAAK,EACL,cAA0B,EAC1B,QAAQ,EACR,IAAW,EACX,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAoB,2CAkBtB;AAED,KAAK,iBAAiB,GAAG,oBAAoB,GAAG;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA;AAED,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,EAAE,EACF,cAA0B,EAC1B,gBAA+C,EAC/C,IAAW,EACX,kBAAkB,EAAE,eAAe,EACnC,cAAc,EAAE,WAAW,EAC3B,GAAG,KAAK,EACT,EAAE,iBAAiB,2CA6BnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog.stories.d.ts","sourceRoot":"","sources":["../../../stories/changelog/changelog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"changelog.stories.d.ts","sourceRoot":"","sources":["../../../stories/changelog/changelog.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAiQtD,iBAAS,SAAS,4CAUjB;AAED,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAKhC,CAAA;AAED,eAAe,IAAI,CAAA;AAEnB,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,OAAO,SAAS,CAAM,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { FormErrorSummary } from '../../src/molecules/form-error-summary.js';
|
|
3
|
+
declare const meta: Meta<typeof FormErrorSummary>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof FormErrorSummary>;
|
|
6
|
+
export declare const Playground: Story;
|
|
7
|
+
export declare const OneError: Story;
|
|
8
|
+
export declare const MultipleErrors: Story;
|
|
9
|
+
export declare const Hidden: Story;
|
|
10
|
+
export declare const WithForm: Story;
|
|
11
|
+
//# sourceMappingURL=form-error-summary.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-error-summary.stories.d.ts","sourceRoot":"","sources":["../../../stories/molecules/form-error-summary.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAOtD,OAAO,EACL,gBAAgB,EAEjB,MAAM,wCAAwC,CAAA;AAE/C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAyBvC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAQ9C,eAAO,MAAM,UAAU,EAAE,KAIxB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAA;AAED,eAAO,MAAM,cAAc,EAAE,KAI5B,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KASpB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-error-summary.ids.test.d.ts","sourceRoot":"","sources":["../../test/form-error-summary.ids.test.tsx"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
@import "./molecules/_dialog.css";
|
|
30
30
|
@import "./molecules/_drawer.css";
|
|
31
31
|
@import "./molecules/_file-upload.css";
|
|
32
|
+
@import "./molecules/_form-error-summary.css";
|
|
32
33
|
@import "./molecules/_pagination.css";
|
|
33
34
|
@import "./molecules/_popover.css";
|
|
34
35
|
@import "./molecules/_radio-card.css";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* FormErrorSummary — runtime tokens derive from the status-text error token and
|
|
3
|
+
* danger primitives so the summary reads as one system with the form fields.
|
|
4
|
+
*/
|
|
5
|
+
@theme static {
|
|
6
|
+
--color-form-error-summary-fg: var(--color-status-text-fg-error);
|
|
7
|
+
--color-form-error-summary-border: var(--color-bg-danger-base);
|
|
8
|
+
--color-form-error-summary-bg: var(--color-bg-danger-subtle);
|
|
9
|
+
--color-form-error-summary-ring: var(--color-status-text-fg-error);
|
|
10
|
+
--outline-form-error-summary-focus-style: var(--default-ring-style);
|
|
11
|
+
--outline-form-error-summary-focus-width: var(--default-ring-width);
|
|
12
|
+
--outline-form-error-summary-focus-offset: var(--default-ring-offset);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@utility form-error-summary-focus-ring {
|
|
16
|
+
outline-color: var(--color-form-error-summary-ring);
|
|
17
|
+
outline-offset: var(--outline-form-error-summary-focus-offset);
|
|
18
|
+
outline-style: var(--outline-form-error-summary-focus-style);
|
|
19
|
+
outline-width: var(--outline-form-error-summary-focus-width);
|
|
20
|
+
}
|