@mohirlab/react 0.3.0 → 0.5.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.
Files changed (45) hide show
  1. package/dist/components/choice/choice.d.ts +46 -0
  2. package/dist/components/choice/choice.d.ts.map +1 -0
  3. package/dist/components/choice/choice.js +184 -0
  4. package/dist/components/choice/choice.js.map +1 -0
  5. package/dist/components/choice/choice.styles.js +21 -0
  6. package/dist/components/choice/choice.styles.js.map +1 -0
  7. package/dist/components/choice/index.d.ts +2 -0
  8. package/dist/components/field/use-field-control.js +21 -0
  9. package/dist/components/field/use-field-control.js.map +1 -0
  10. package/dist/components/input/index.d.ts +2 -2
  11. package/dist/components/input/input.css.d.ts.map +1 -1
  12. package/dist/components/input/input.d.ts +12 -0
  13. package/dist/components/input/input.d.ts.map +1 -1
  14. package/dist/components/input/input.js +32 -11
  15. package/dist/components/input/input.js.map +1 -1
  16. package/dist/components/input/input.styles.js +3 -1
  17. package/dist/components/navigation/index.d.ts +3 -0
  18. package/dist/components/navigation/nav.d.ts +67 -0
  19. package/dist/components/navigation/nav.d.ts.map +1 -0
  20. package/dist/components/navigation/nav.js +144 -0
  21. package/dist/components/navigation/nav.js.map +1 -0
  22. package/dist/components/navigation/navigation.styles.js +21 -0
  23. package/dist/components/navigation/navigation.styles.js.map +1 -0
  24. package/dist/components/navigation/tabs.d.ts +30 -0
  25. package/dist/components/navigation/tabs.d.ts.map +1 -0
  26. package/dist/components/navigation/tabs.js +97 -0
  27. package/dist/components/navigation/tabs.js.map +1 -0
  28. package/dist/components/select/index.d.ts +2 -0
  29. package/dist/components/select/select.d.ts +14 -0
  30. package/dist/components/select/select.d.ts.map +1 -0
  31. package/dist/components/select/select.js +44 -0
  32. package/dist/components/select/select.js.map +1 -0
  33. package/dist/components/select/select.styles.js +7 -0
  34. package/dist/components/select/select.styles.js.map +1 -0
  35. package/dist/components/slider/index.d.ts +2 -0
  36. package/dist/components/slider/slider.d.ts +18 -0
  37. package/dist/components/slider/slider.d.ts.map +1 -0
  38. package/dist/components/slider/slider.js +50 -0
  39. package/dist/components/slider/slider.js.map +1 -0
  40. package/dist/components/slider/slider.styles.js +7 -0
  41. package/dist/components/slider/slider.styles.js.map +1 -0
  42. package/dist/index.d.ts +11 -2
  43. package/dist/index.js +8 -3
  44. package/dist/styles.css +706 -47
  45. package/package.json +6 -5
@@ -0,0 +1,46 @@
1
+ import { ComponentPropsWithRef, ReactNode } from "react";
2
+ type NativeInput = Omit<ComponentPropsWithRef<'input'>, 'type' | 'size'>;
3
+ interface ChoiceText {
4
+ /** Visible label. The whole row is clickable. */
5
+ label: ReactNode;
6
+ /** Secondary text under the label, linked with `aria-describedby`. */
7
+ description?: ReactNode;
8
+ invalid?: boolean;
9
+ }
10
+ export interface CheckboxProps extends NativeInput, ChoiceText {
11
+ /** Mixed state, e.g. "some items selected". Shown as a dash; clicking resolves it. */
12
+ indeterminate?: boolean;
13
+ }
14
+ /** A native checkbox, drawn in the Mohirlab style. */
15
+ export declare function Checkbox({ label, description, invalid, indeterminate, className, ref, ...rest }: CheckboxProps): import("react").JSX.Element;
16
+ export interface SwitchProps extends NativeInput, ChoiceText {}
17
+ /**
18
+ * An on/off setting that applies immediately (no Save button). A native checkbox with
19
+ * `role="switch"`, so it is announced as a switch and submits with forms.
20
+ */
21
+ export declare function Switch({ label, description, invalid, className, ...rest }: SwitchProps): import("react").JSX.Element;
22
+ export interface RadioGroupProps extends Omit<ComponentPropsWithRef<'fieldset'>, 'onChange' | 'defaultValue'> {
23
+ /** Names the group for assistive technology. */
24
+ legend: ReactNode;
25
+ /** Shared `name`; generated if omitted. */
26
+ name?: string;
27
+ value?: string;
28
+ defaultValue?: string;
29
+ onValueChange?: (value: string) => void;
30
+ hint?: ReactNode;
31
+ error?: ReactNode;
32
+ orientation?: 'vertical' | 'horizontal';
33
+ children: ReactNode;
34
+ }
35
+ /**
36
+ * A `<fieldset>` of radios: arrow keys move between options natively, the legend names
37
+ * the group, and hint and error are linked to it.
38
+ */
39
+ export declare function RadioGroup({ legend, name, value, defaultValue, onValueChange, hint, error, orientation, disabled, className, children, ...rest }: RadioGroupProps): import("react").JSX.Element;
40
+ export interface RadioProps extends Omit<NativeInput, 'name'>, Omit<ChoiceText, 'invalid'> {
41
+ value: string;
42
+ }
43
+ /** One option of a `RadioGroup`. */
44
+ export declare function Radio({ label, description, value, className, ...rest }: RadioProps): import("react").JSX.Element;
45
+ export {};
46
+ //# sourceMappingURL=choice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"choice.d.ts","names":[],"sources":["../../../src/components/choice/choice.tsx"],"mappings":";KAeK,cAAc,KAAK;UAEd;;EAER,OAAO;;EAEP,cAAc;EACd;;iBAmCe,sBAAsB,aAAa;;EAElD;;;wBAIc,WACd,OACA,aACA,SACA,eACA,WACA,QACG,QACF,gCAAa,IAAA;iBAkCC,oBAAoB,aAAa;;;;;wBAMlC,SAAS,OAAO,aAAa,SAAS,cAAc,QAAQ,8BAAW,IAAA;iBAwCtE,wBAAwB,KACvC;;EAIA,QAAQ;;EAER;EACA;EACA;EACA,iBAAiB;EACjB,OAAO;EACP,QAAQ;EACR;EACA,UAAU;;;;;;wBAOI,aACd,QACA,MACA,OACA,cACA,eACA,MACA,OACA,aACA,UACA,WACA,aACG,QACF,kCAAe,IAAA;iBAiDD,mBAAmB,KAAK,sBAAsB,KAAK;EAClE;;;wBAIc,QAAQ,OAAO,aAAa,OAAO,cAAc,QAAQ,6BAAU,IAAA"}
@@ -0,0 +1,184 @@
1
+ import { createContext, useContext, useEffect, useId, useRef } from "react";
2
+ import { iconCheck, iconMinus } from "@mohirlab/icons";
3
+ import { cx } from "../../utils/cx.js";
4
+ import { Icon } from "../icon/icon.js";
5
+ import { box, check, checkbox, dash, dot, group, item, label, legend, options, radio, row, thumb, track } from "./choice.styles.js";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ // src/components/choice/choice.tsx
8
+ function Row({ control, label: label$1, description: description$1, descriptionId, className, kind }) {
9
+ return /* @__PURE__ */ jsxs("div", {
10
+ className: cx(item, className),
11
+ "data-kind": kind,
12
+ children: [/* @__PURE__ */ jsxs("label", {
13
+ className: row,
14
+ children: [control, /* @__PURE__ */ jsx("span", {
15
+ className: label,
16
+ children: label$1
17
+ })]
18
+ }), description$1 && /* @__PURE__ */ jsx("span", {
19
+ id: descriptionId,
20
+ className: "ml_m1yyzl3",
21
+ children: description$1
22
+ })]
23
+ });
24
+ }
25
+ /** A native checkbox, drawn in the Mohirlab style. */
26
+ function Checkbox({ label, description, invalid, indeterminate = false, className, ref, ...rest }) {
27
+ const descriptionId = useId();
28
+ const inner = useRef(null);
29
+ useEffect(() => {
30
+ if (inner.current) inner.current.indeterminate = indeterminate;
31
+ }, [indeterminate]);
32
+ return /* @__PURE__ */ jsx(Row, {
33
+ className,
34
+ label,
35
+ description,
36
+ descriptionId,
37
+ control: /* @__PURE__ */ jsxs("span", {
38
+ className: box,
39
+ children: [
40
+ /* @__PURE__ */ jsx("input", {
41
+ ...rest,
42
+ ref: (el) => {
43
+ inner.current = el;
44
+ if (typeof ref === "function") ref(el);
45
+ else if (ref) ref.current = el;
46
+ },
47
+ type: "checkbox",
48
+ className: checkbox,
49
+ "aria-invalid": invalid || void 0,
50
+ "aria-describedby": description ? descriptionId : rest["aria-describedby"]
51
+ }),
52
+ /* @__PURE__ */ jsx(Icon, {
53
+ icon: iconCheck,
54
+ size: 14,
55
+ strokeWidth: 2.25,
56
+ className: check
57
+ }),
58
+ /* @__PURE__ */ jsx(Icon, {
59
+ icon: iconMinus,
60
+ size: 14,
61
+ strokeWidth: 2.25,
62
+ className: dash
63
+ })
64
+ ]
65
+ })
66
+ });
67
+ }
68
+ /**
69
+ * An on/off setting that applies immediately (no Save button). A native checkbox with
70
+ * `role="switch"`, so it is announced as a switch and submits with forms.
71
+ */
72
+ function Switch({ label, description, invalid, className, ...rest }) {
73
+ const descriptionId = useId();
74
+ return /* @__PURE__ */ jsx(Row, {
75
+ kind: "switch",
76
+ className,
77
+ label,
78
+ description,
79
+ descriptionId,
80
+ control: /* @__PURE__ */ jsxs("span", {
81
+ className: box,
82
+ children: [/* @__PURE__ */ jsx("input", {
83
+ ...rest,
84
+ type: "checkbox",
85
+ role: "switch",
86
+ className: track,
87
+ "aria-invalid": invalid || void 0,
88
+ "aria-describedby": description ? descriptionId : rest["aria-describedby"]
89
+ }), /* @__PURE__ */ jsx("span", {
90
+ className: thumb,
91
+ "aria-hidden": "true"
92
+ })]
93
+ })
94
+ });
95
+ }
96
+ const RadioGroupContext = createContext(null);
97
+ /**
98
+ * A `<fieldset>` of radios: arrow keys move between options natively, the legend names
99
+ * the group, and hint and error are linked to it.
100
+ */
101
+ function RadioGroup({ legend: legend$1, name, value, defaultValue, onValueChange, hint, error, orientation = "vertical", disabled, className, children, ...rest }) {
102
+ const generated = useId();
103
+ const hintId = useId();
104
+ const errorId = useId();
105
+ const legendId = useId();
106
+ const describedBy = [error ? errorId : null, hint ? hintId : null].filter(Boolean).join(" ") || void 0;
107
+ return /* @__PURE__ */ jsxs("fieldset", {
108
+ ...rest,
109
+ role: "radiogroup",
110
+ disabled,
111
+ "aria-labelledby": legendId,
112
+ "aria-describedby": describedBy,
113
+ "aria-invalid": error ? true : void 0,
114
+ className: cx(group, className),
115
+ children: [
116
+ /* @__PURE__ */ jsx("legend", {
117
+ id: legendId,
118
+ className: legend,
119
+ children: legend$1
120
+ }),
121
+ /* @__PURE__ */ jsx(RadioGroupContext.Provider, {
122
+ value: {
123
+ name: name ?? `ml-radio-${generated}`,
124
+ value,
125
+ defaultValue,
126
+ disabled,
127
+ invalid: Boolean(error),
128
+ onChange: onValueChange ? (event) => onValueChange(event.target.value) : void 0
129
+ },
130
+ children: /* @__PURE__ */ jsx("div", {
131
+ className: options,
132
+ "data-orientation": orientation,
133
+ children
134
+ })
135
+ }),
136
+ error && /* @__PURE__ */ jsx("p", {
137
+ id: errorId,
138
+ className: "ml_m1yyzlg",
139
+ children: error
140
+ }),
141
+ hint && /* @__PURE__ */ jsx("p", {
142
+ id: hintId,
143
+ className: "ml_m1yyzlf",
144
+ children: hint
145
+ })
146
+ ]
147
+ });
148
+ }
149
+ /** One option of a `RadioGroup`. */
150
+ function Radio({ label, description, value, className, ...rest }) {
151
+ const group = useContext(RadioGroupContext);
152
+ const descriptionId = useId();
153
+ if (!group) throw new Error("<Radio> must be used inside <RadioGroup>.");
154
+ const controlled = group.value !== void 0;
155
+ return /* @__PURE__ */ jsx(Row, {
156
+ className,
157
+ label,
158
+ description,
159
+ descriptionId,
160
+ control: /* @__PURE__ */ jsxs("span", {
161
+ className: box,
162
+ children: [/* @__PURE__ */ jsx("input", {
163
+ ...rest,
164
+ type: "radio",
165
+ name: group.name,
166
+ value,
167
+ checked: controlled ? group.value === value : void 0,
168
+ defaultChecked: !controlled && group.defaultValue !== void 0 ? group.defaultValue === value : void 0,
169
+ onChange: (event) => {
170
+ rest.onChange?.(event);
171
+ group.onChange?.(event);
172
+ },
173
+ className: radio,
174
+ "aria-describedby": description ? descriptionId : void 0
175
+ }), /* @__PURE__ */ jsx("span", {
176
+ className: dot,
177
+ "aria-hidden": "true"
178
+ })]
179
+ })
180
+ });
181
+ }
182
+ export { Checkbox, Radio, RadioGroup, Switch };
183
+
184
+ //# sourceMappingURL=choice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"choice.js","names":["label","description","styles.item","styles.row","styles.label","styles.box","styles.checkbox","styles.check","styles.dash","styles.track","styles.thumb","legend","styles.group","styles.legend","styles.options","styles.radio","styles.dot"],"sources":["../../../src/components/choice/choice.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n useEffect,\n useId,\n useRef,\n type ChangeEvent,\n type ComponentPropsWithRef,\n type ReactNode,\n} from 'react';\nimport { iconCheck, iconMinus } from '@mohirlab/icons';\nimport { cx } from '../../utils/cx';\nimport { Icon } from '../icon';\nimport * as styles from './choice.css';\n\ntype NativeInput = Omit<ComponentPropsWithRef<'input'>, 'type' | 'size'>;\n\ninterface ChoiceText {\n /** Visible label. The whole row is clickable. */\n label: ReactNode;\n /** Secondary text under the label, linked with `aria-describedby`. */\n description?: ReactNode;\n invalid?: boolean;\n}\n\nfunction Row({\n control,\n label,\n description,\n descriptionId,\n className,\n kind,\n}: {\n control: ReactNode;\n label: ReactNode;\n description?: ReactNode;\n descriptionId: string;\n className?: string;\n kind?: 'switch';\n}) {\n // The description stays outside the <label>: inside, it would become part of the\n // accessible name. It is linked with aria-describedby instead.\n return (\n <div className={cx(styles.item, className)} data-kind={kind}>\n <label className={styles.row}>\n {control}\n <span className={styles.label}>{label}</span>\n </label>\n {description && (\n <span id={descriptionId} className={styles.description}>\n {description}\n </span>\n )}\n </div>\n );\n}\n\nexport interface CheckboxProps extends NativeInput, ChoiceText {\n /** Mixed state, e.g. \"some items selected\". Shown as a dash; clicking resolves it. */\n indeterminate?: boolean;\n}\n\n/** A native checkbox, drawn in the Mohirlab style. */\nexport function Checkbox({\n label,\n description,\n invalid,\n indeterminate = false,\n className,\n ref,\n ...rest\n}: CheckboxProps) {\n const descriptionId = useId();\n const inner = useRef<HTMLInputElement>(null);\n useEffect(() => {\n if (inner.current) inner.current.indeterminate = indeterminate;\n }, [indeterminate]);\n return (\n <Row\n className={className}\n label={label}\n description={description}\n descriptionId={descriptionId}\n control={\n <span className={styles.box}>\n <input\n {...rest}\n ref={(el) => {\n inner.current = el;\n if (typeof ref === 'function') ref(el);\n else if (ref) ref.current = el;\n }}\n type=\"checkbox\"\n className={styles.checkbox}\n aria-invalid={invalid || undefined}\n aria-describedby={description ? descriptionId : rest['aria-describedby']}\n />\n <Icon icon={iconCheck} size={14} strokeWidth={2.25} className={styles.check} />\n <Icon icon={iconMinus} size={14} strokeWidth={2.25} className={styles.dash} />\n </span>\n }\n />\n );\n}\n\nexport interface SwitchProps extends NativeInput, ChoiceText {}\n\n/**\n * An on/off setting that applies immediately (no Save button). A native checkbox with\n * `role=\"switch\"`, so it is announced as a switch and submits with forms.\n */\nexport function Switch({ label, description, invalid, className, ...rest }: SwitchProps) {\n const descriptionId = useId();\n return (\n <Row\n kind=\"switch\"\n className={className}\n label={label}\n description={description}\n descriptionId={descriptionId}\n control={\n <span className={styles.box}>\n <input\n {...rest}\n type=\"checkbox\"\n // The browser exposes a native checkbox's checked state to the switch role;\n // a hand-set aria-checked could only drift out of sync.\n // oxlint-disable-next-line jsx-a11y/role-has-required-aria-props\n role=\"switch\"\n className={styles.track}\n aria-invalid={invalid || undefined}\n aria-describedby={description ? descriptionId : rest['aria-describedby']}\n />\n <span className={styles.thumb} aria-hidden=\"true\" />\n </span>\n }\n />\n );\n}\n\ninterface RadioGroupContextValue {\n name: string;\n value?: string;\n defaultValue?: string;\n disabled?: boolean;\n invalid: boolean;\n onChange?: (event: ChangeEvent<HTMLInputElement>) => void;\n}\n\nconst RadioGroupContext = createContext<RadioGroupContextValue | null>(null);\n\nexport interface RadioGroupProps extends Omit<\n ComponentPropsWithRef<'fieldset'>,\n 'onChange' | 'defaultValue'\n> {\n /** Names the group for assistive technology. */\n legend: ReactNode;\n /** Shared `name`; generated if omitted. */\n name?: string;\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n hint?: ReactNode;\n error?: ReactNode;\n orientation?: 'vertical' | 'horizontal';\n children: ReactNode;\n}\n\n/**\n * A `<fieldset>` of radios: arrow keys move between options natively, the legend names\n * the group, and hint and error are linked to it.\n */\nexport function RadioGroup({\n legend,\n name,\n value,\n defaultValue,\n onValueChange,\n hint,\n error,\n orientation = 'vertical',\n disabled,\n className,\n children,\n ...rest\n}: RadioGroupProps) {\n const generated = useId();\n const hintId = useId();\n const errorId = useId();\n const legendId = useId();\n const describedBy = [error ? errorId : null, hint ? hintId : null].filter(Boolean).join(' ') || undefined;\n return (\n // role=\"radiogroup\" (rather than the fieldset's implicit \"group\") is what carries\n // aria-invalid for the whole set; individual radios cannot.\n <fieldset\n {...rest}\n role=\"radiogroup\"\n disabled={disabled}\n aria-labelledby={legendId}\n aria-describedby={describedBy}\n aria-invalid={error ? true : undefined}\n className={cx(styles.group, className)}\n >\n <legend id={legendId} className={styles.legend}>\n {legend}\n </legend>\n <RadioGroupContext.Provider\n value={{\n name: name ?? `ml-radio-${generated}`,\n value,\n defaultValue,\n disabled,\n invalid: Boolean(error),\n onChange: onValueChange ? (event) => onValueChange(event.target.value) : undefined,\n }}\n >\n <div className={styles.options} data-orientation={orientation}>\n {children}\n </div>\n </RadioGroupContext.Provider>\n {error && (\n <p id={errorId} className={styles.groupError}>\n {error}\n </p>\n )}\n {hint && (\n <p id={hintId} className={styles.groupHint}>\n {hint}\n </p>\n )}\n </fieldset>\n );\n}\n\nexport interface RadioProps extends Omit<NativeInput, 'name'>, Omit<ChoiceText, 'invalid'> {\n value: string;\n}\n\n/** One option of a `RadioGroup`. */\nexport function Radio({ label, description, value, className, ...rest }: RadioProps) {\n const group = useContext(RadioGroupContext);\n const descriptionId = useId();\n if (!group) throw new Error('<Radio> must be used inside <RadioGroup>.');\n const controlled = group.value !== undefined;\n return (\n <Row\n className={className}\n label={label}\n description={description}\n descriptionId={descriptionId}\n control={\n <span className={styles.box}>\n <input\n {...rest}\n type=\"radio\"\n name={group.name}\n value={value}\n checked={controlled ? group.value === value : undefined}\n defaultChecked={\n !controlled && group.defaultValue !== undefined ? group.defaultValue === value : undefined\n }\n onChange={(event) => {\n rest.onChange?.(event);\n group.onChange?.(event);\n }}\n className={styles.radio}\n aria-describedby={description ? descriptionId : undefined}\n />\n <span className={styles.dot} aria-hidden=\"true\" />\n </span>\n }\n />\n );\n}\n"],"mappings":"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"}
@@ -0,0 +1,21 @@
1
+ // src/components/choice/choice.css.ts
2
+ var box = "ml_m1yyzl4";
3
+ var check = "ml_m1yyzl7";
4
+ var checkbox = "ml_m1yyzl5";
5
+ var dash = "ml_m1yyzl8";
6
+ var description = "ml_m1yyzl3";
7
+ var dot = "ml_m1yyzl9";
8
+ var group = "ml_m1yyzlc";
9
+ var groupError = "ml_m1yyzlg";
10
+ var groupHint = "ml_m1yyzlf";
11
+ var item = "ml_m1yyzl1";
12
+ var label = "ml_m1yyzl2";
13
+ var legend = "ml_m1yyzld";
14
+ var options = "ml_m1yyzle";
15
+ var radio = "ml_m1yyzl6";
16
+ var row = "ml_m1yyzl0";
17
+ var thumb = "ml_m1yyzlb";
18
+ var track = "ml_m1yyzla";
19
+ export { box, check, checkbox, dash, description, dot, group, groupError, groupHint, item, label, legend, options, radio, row, thumb, track };
20
+
21
+ //# sourceMappingURL=choice.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"choice.styles.js","names":[],"sources":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import { Checkbox, CheckboxProps, Radio, RadioGroup, RadioGroupProps, RadioProps, Switch, SwitchProps } from "./choice.js";
2
+ export { Checkbox, type CheckboxProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Switch, type SwitchProps };
@@ -0,0 +1,21 @@
1
+ import { useField } from "./field-context.js";
2
+ // src/components/field/use-field-control.ts
3
+ /**
4
+ * Props a form control takes from the surrounding `<Field>`: id (for the label),
5
+ * required, disabled, invalid state and the hint/error description. Anything set
6
+ * on the control itself wins; descriptions are merged.
7
+ */
8
+ function useFieldControl({ id, required, disabled, invalid, "aria-describedby": describedBy }) {
9
+ const field = useField();
10
+ const isInvalid = invalid ?? field?.invalid ?? false;
11
+ return {
12
+ id: id ?? field?.id,
13
+ required: required ?? field?.required,
14
+ disabled: disabled ?? field?.disabled,
15
+ "aria-invalid": isInvalid || void 0,
16
+ "aria-describedby": [field?.describedBy, describedBy].filter(Boolean).join(" ") || void 0
17
+ };
18
+ }
19
+ export { useFieldControl };
20
+
21
+ //# sourceMappingURL=use-field-control.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-field-control.js","names":[],"sources":["../../../src/components/field/use-field-control.ts"],"sourcesContent":["import { useField } from './field-context';\n\ninterface ControlProps {\n id?: string;\n required?: boolean;\n disabled?: boolean;\n invalid?: boolean;\n 'aria-describedby'?: string;\n}\n\n/**\n * Props a form control takes from the surrounding `<Field>`: id (for the label),\n * required, disabled, invalid state and the hint/error description. Anything set\n * on the control itself wins; descriptions are merged.\n */\nexport function useFieldControl({\n id,\n required,\n disabled,\n invalid,\n 'aria-describedby': describedBy,\n}: ControlProps) {\n const field = useField();\n const isInvalid = invalid ?? field?.invalid ?? false;\n return {\n id: id ?? field?.id,\n required: required ?? field?.required,\n disabled: disabled ?? field?.disabled,\n 'aria-invalid': isInvalid || undefined,\n 'aria-describedby': [field?.describedBy, describedBy].filter(Boolean).join(' ') || undefined,\n } as const;\n}\n"],"mappings":";;;;;;;AAeA,SAAgB,gBAAgB,EAC9B,IACA,UACA,UACA,SACA,oBAAoB,eACL;CACf,MAAM,QAAQ,SAAS;CACvB,MAAM,YAAY,WAAW,OAAO,WAAW;CAC/C,OAAO;EACL,IAAI,MAAM,OAAO;EACjB,UAAU,YAAY,OAAO;EAC7B,UAAU,YAAY,OAAO;EAC7B,gBAAgB,aAAa,KAAA;EAC7B,oBAAoB,CAAC,OAAO,aAAa,WAAW,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,KAAA;CACrF;AACF"}
@@ -1,2 +1,2 @@
1
- import { Input, InputProps } from "./input.js";
2
- export { Input, type InputProps };
1
+ import { Input, InputProps, Textarea, TextareaProps } from "./input.js";
2
+ export { Input, type InputProps, Textarea, type TextareaProps };
@@ -1 +1 @@
1
- {"version":3,"file":"input.css.d.ts","names":[],"sources":["../../../src/components/input/input.css.ts"],"mappings":";;;;;qBAea,0CAAK;;IAoCZ,mCAAE;IACF,mCAAE;IACF,mCAAE;;;YAMI,gBAAgB,YAAY,sBAAsB"}
1
+ {"version":3,"file":"input.css.d.ts","names":[],"sources":["../../../src/components/input/input.css.ts"],"mappings":";;;;;qBAgBa,0CAAK;;IAqCZ,mCAAE;IACF,mCAAE;IACF,mCAAE;;;YAMI,gBAAgB,YAAY,sBAAsB"}
@@ -6,4 +6,16 @@ export interface InputProps extends Omit<ComponentPropsWithRef<'input'>, 'size'>
6
6
  invalid?: boolean;
7
7
  }
8
8
  export declare function Input({ size, invalid, className, id, required, disabled, ...rest }: InputProps): import("react").JSX.Element;
9
+ export interface TextareaProps extends ComponentPropsWithRef<'textarea'> {
10
+ invalid?: boolean;
11
+ /**
12
+ * Grow with the content up to `maxRows`, where the browser supports CSS
13
+ * `field-sizing` (Chrome 123, Safari 26.2, Firefox 152). Elsewhere the user can
14
+ * resize it. Default true.
15
+ */
16
+ autoGrow?: boolean;
17
+ /** Upper bound for auto-grow, in lines. Default 10. */
18
+ maxRows?: number;
19
+ }
20
+ export declare function Textarea({ invalid, autoGrow, rows, maxRows, className, style, id, required, disabled, ...rest }: TextareaProps): import("react").JSX.Element;
9
21
  //# sourceMappingURL=input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","names":[],"sources":["../../../src/components/input/input.tsx"],"mappings":";;iBAKiB,mBAAmB,KAAK;EACvC,OAAO;;EAEP;;wBAGc,QAAQ,MAAM,SAAS,WAAW,IAAI,UAAU,aAAa,QAAQ,6BAAU,IAAA"}
1
+ {"version":3,"file":"input.d.ts","names":[],"sources":["../../../src/components/input/input.tsx"],"mappings":";;iBAMiB,mBAAmB,KAAK;EACvC,OAAO;;EAEP;;wBAGc,QAAQ,MAAM,SAAS,WAAW,IAAI,UAAU,aAAa,QAAQ,6BAAU,IAAA;iBAW9E,sBAAsB;EACrC;;;;;;EAMA;;EAEA;;wBAGc,WACd,SACA,UACA,MACA,SACA,WACA,OACA,IACA,UACA,aACG,QACF,gCAAa,IAAA"}
@@ -1,22 +1,43 @@
1
+ import { assignInlineVars } from "@vanilla-extract/dynamic";
1
2
  import { cx } from "../../utils/cx.js";
2
- import { useField } from "../field/field-context.js";
3
- import { input } from "./input.styles.js";
3
+ import { useFieldControl } from "../field/use-field-control.js";
4
+ import { input, maxRows, textarea } from "./input.styles.js";
4
5
  import { jsx } from "react/jsx-runtime";
5
6
  // src/components/input/input.tsx
6
7
  function Input({ size, invalid, className, id, required, disabled, ...rest }) {
7
- const field = useField();
8
- const describedBy = [field?.describedBy, rest["aria-describedby"]].filter(Boolean).join(" ") || void 0;
9
- const isInvalid = invalid ?? field?.invalid ?? false;
8
+ const control = useFieldControl({
9
+ id,
10
+ required,
11
+ disabled,
12
+ invalid,
13
+ "aria-describedby": rest["aria-describedby"]
14
+ });
10
15
  return /* @__PURE__ */ jsx("input", {
11
16
  ...rest,
12
- id: id ?? field?.id,
13
- required: required ?? field?.required,
14
- disabled: disabled ?? field?.disabled,
15
- "aria-describedby": describedBy,
16
- "aria-invalid": isInvalid || void 0,
17
+ ...control,
17
18
  className: cx(input({ size }), className)
18
19
  });
19
20
  }
20
- export { Input };
21
+ function Textarea({ invalid, autoGrow = true, rows = 3, maxRows: maxRows$1 = 10, className, style, id, required, disabled, ...rest }) {
22
+ const control = useFieldControl({
23
+ id,
24
+ required,
25
+ disabled,
26
+ invalid,
27
+ "aria-describedby": rest["aria-describedby"]
28
+ });
29
+ return /* @__PURE__ */ jsx("textarea", {
30
+ ...rest,
31
+ ...control,
32
+ rows,
33
+ "data-autogrow": autoGrow || void 0,
34
+ className: cx(input({ size: "md" }), textarea, className),
35
+ style: {
36
+ ...style,
37
+ ...assignInlineVars({ [maxRows]: String(maxRows$1) })
38
+ }
39
+ });
40
+ }
41
+ export { Input, Textarea };
21
42
 
22
43
  //# sourceMappingURL=input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","names":[],"sources":["../../../src/components/input/input.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react';\nimport { cx } from '../../utils/cx';\nimport { useField } from '../field/field-context';\nimport { input, type InputVariants } from './input.css';\n\nexport interface InputProps extends Omit<ComponentPropsWithRef<'input'>, 'size'> {\n size?: InputVariants['size'];\n /** Mark as invalid. Inside a `<Field error>` this is set for you. */\n invalid?: boolean;\n}\n\nexport function Input({ size, invalid, className, id, required, disabled, ...rest }: InputProps) {\n const field = useField();\n const describedBy = [field?.describedBy, rest['aria-describedby']].filter(Boolean).join(' ') || undefined;\n const isInvalid = invalid ?? field?.invalid ?? false;\n\n return (\n <input\n {...rest}\n id={id ?? field?.id}\n required={required ?? field?.required}\n disabled={disabled ?? field?.disabled}\n aria-describedby={describedBy}\n aria-invalid={isInvalid || undefined}\n className={cx(input({ size }), className)}\n />\n );\n}\n"],"mappings":";;;;;AAWA,SAAgB,MAAM,EAAE,MAAM,SAAS,WAAW,IAAI,UAAU,UAAU,GAAG,QAAoB;CAC/F,MAAM,QAAQ,SAAS;CACvB,MAAM,cAAc,CAAC,OAAO,aAAa,KAAK,mBAAmB,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,KAAA;CAChG,MAAM,YAAY,WAAW,OAAO,WAAW;CAE/C,OACE,oBAAC,SAAD;EACE,GAAI;EACJ,IAAI,MAAM,OAAO;EACjB,UAAU,YAAY,OAAO;EAC7B,UAAU,YAAY,OAAO;EAC7B,oBAAkB;EAClB,gBAAc,aAAa,KAAA;EAC3B,WAAW,GAAG,MAAM,EAAE,KAAK,CAAC,GAAG,SAAS;CACzC,CAAA;AAEL"}
1
+ {"version":3,"file":"input.js","names":["maxRows","maxRowsVar"],"sources":["../../../src/components/input/input.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react';\nimport { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { cx } from '../../utils/cx';\nimport { useFieldControl } from '../field/use-field-control';\nimport { input, maxRows as maxRowsVar, textarea, type InputVariants } from './input.css';\n\nexport interface InputProps extends Omit<ComponentPropsWithRef<'input'>, 'size'> {\n size?: InputVariants['size'];\n /** Mark as invalid. Inside a `<Field error>` this is set for you. */\n invalid?: boolean;\n}\n\nexport function Input({ size, invalid, className, id, required, disabled, ...rest }: InputProps) {\n const control = useFieldControl({\n id,\n required,\n disabled,\n invalid,\n 'aria-describedby': rest['aria-describedby'],\n });\n return <input {...rest} {...control} className={cx(input({ size }), className)} />;\n}\n\nexport interface TextareaProps extends ComponentPropsWithRef<'textarea'> {\n invalid?: boolean;\n /**\n * Grow with the content up to `maxRows`, where the browser supports CSS\n * `field-sizing` (Chrome 123, Safari 26.2, Firefox 152). Elsewhere the user can\n * resize it. Default true.\n */\n autoGrow?: boolean;\n /** Upper bound for auto-grow, in lines. Default 10. */\n maxRows?: number;\n}\n\nexport function Textarea({\n invalid,\n autoGrow = true,\n rows = 3,\n maxRows = 10,\n className,\n style,\n id,\n required,\n disabled,\n ...rest\n}: TextareaProps) {\n const control = useFieldControl({\n id,\n required,\n disabled,\n invalid,\n 'aria-describedby': rest['aria-describedby'],\n });\n return (\n <textarea\n {...rest}\n {...control}\n rows={rows}\n data-autogrow={autoGrow || undefined}\n className={cx(input({ size: 'md' }), textarea, className)}\n style={{ ...style, ...assignInlineVars({ [maxRowsVar]: String(maxRows) }) }}\n />\n );\n}\n"],"mappings":";;;;;;AAYA,SAAgB,MAAM,EAAE,MAAM,SAAS,WAAW,IAAI,UAAU,UAAU,GAAG,QAAoB;CAC/F,MAAM,UAAU,gBAAgB;EAC9B;EACA;EACA;EACA;EACA,oBAAoB,KAAK;CAC3B,CAAC;CACD,OAAO,oBAAC,SAAD;EAAO,GAAI;EAAM,GAAI;EAAS,WAAW,GAAG,MAAM,EAAE,KAAK,CAAC,GAAG,SAAS;CAAI,CAAA;AACnF;AAcA,SAAgB,SAAS,EACvB,SACA,WAAW,MACX,OAAO,GACPA,SAAAA,YAAU,IACV,WACA,OACA,IACA,UACA,UACA,GAAG,QACa;CAChB,MAAM,UAAU,gBAAgB;EAC9B;EACA;EACA;EACA;EACA,oBAAoB,KAAK;CAC3B,CAAC;CACD,OACE,oBAAC,YAAD;EACE,GAAI;EACJ,GAAI;EACE;EACN,iBAAe,YAAY,KAAA;EAC3B,WAAW,GAAG,MAAM,EAAE,MAAM,KAAK,CAAC,GAAG,UAAU,SAAS;EACxD,OAAO;GAAE,GAAG;GAAO,GAAG,iBAAiB,GAAGC,UAAa,OAAOD,SAAO,EAAE,CAAC;EAAE;CAC3E,CAAA;AAEL"}
@@ -10,6 +10,8 @@ var input = createRuntimeFn({
10
10
  defaultVariants: { size: "md" },
11
11
  compoundVariants: []
12
12
  });
13
- export { input };
13
+ var maxRows = "var(--ml_18bh0934)";
14
+ var textarea = "ml_18bh0935";
15
+ export { input, maxRows, textarea };
14
16
 
15
17
  //# sourceMappingURL=input.styles.js.map
@@ -0,0 +1,3 @@
1
+ import { Tab, TabList, TabListProps, TabPanel, TabPanelProps, TabProps, Tabs, TabsProps } from "./tabs.js";
2
+ import { BottomNav, BottomNavItem, BottomNavProps, BottomNavSpacer, Breadcrumbs, BreadcrumbsProps, Crumb, SegmentedControl, SegmentedControlProps, SegmentedOption } from "./nav.js";
3
+ export { BottomNav, BottomNavItem, type BottomNavProps, BottomNavSpacer, Breadcrumbs, type BreadcrumbsProps, type Crumb, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Tabs, type TabsProps };
@@ -0,0 +1,67 @@
1
+ import { ComponentPropsWithRef, ReactNode } from "react";
2
+ import { IconData } from "@mohirlab/icons";
3
+ export interface SegmentedOption {
4
+ value: string;
5
+ label: ReactNode;
6
+ icon?: IconData;
7
+ disabled?: boolean;
8
+ }
9
+ export interface SegmentedControlProps extends Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'onChange' | 'children'> {
10
+ /** Names the choice, e.g. "View". */
11
+ 'aria-label': string;
12
+ options: SegmentedOption[];
13
+ value?: string;
14
+ defaultValue?: string;
15
+ onValueChange?: (value: string) => void;
16
+ name?: string;
17
+ /** Stretch to the container width, segments sharing it equally. */
18
+ fullWidth?: boolean;
19
+ }
20
+ /**
21
+ * One choice from two to five short options, such as a view or a time range. Native
22
+ * radios underneath: arrow keys move the choice, and it submits with forms.
23
+ */
24
+ export declare function SegmentedControl({ options, value, defaultValue, onValueChange, name, fullWidth, className, ...rest }: SegmentedControlProps): import("react").JSX.Element;
25
+ export interface BottomNavProps extends ComponentPropsWithRef<'nav'> {
26
+ /** Names the navigation, e.g. "Main". */
27
+ 'aria-label': string;
28
+ /** Hide from this breakpoint up, where a sidebar or top bar takes over. Default tablet. */
29
+ hideFrom?: 'tablet' | 'desktop' | 'never';
30
+ }
31
+ /**
32
+ * The phone tab bar: three to five top-level destinations, fixed to the bottom and
33
+ * clear of the home indicator. Add a `BottomNavSpacer` at the end of the page so
34
+ * content can scroll past it.
35
+ */
36
+ export declare function BottomNav({ hideFrom, className, ...rest }: BottomNavProps): import("react").JSX.Element;
37
+ type BottomNavItemProps = {
38
+ icon: IconData;
39
+ label: string;
40
+ /** Marks the current destination (`aria-current="page"`). */
41
+ current?: boolean;
42
+ /** A count such as unread messages; announced with the label. */
43
+ badge?: number;
44
+ className?: string;
45
+ } & (({
46
+ href: string;
47
+ } & Omit<ComponentPropsWithRef<'a'>, 'children'>) | ({
48
+ href?: undefined;
49
+ } & Omit<ComponentPropsWithRef<'button'>, 'children'>));
50
+ export declare function BottomNavItem({ icon, label, current, badge, className, ...rest }: BottomNavItemProps): import("react").JSX.Element;
51
+ /** Reserves room under the page content for the bottom nav (on the same breakpoints). */
52
+ export declare function BottomNavSpacer({ hideFrom }: Pick<BottomNavProps, 'hideFrom'>): import("react").JSX.Element;
53
+ export interface Crumb {
54
+ label: ReactNode;
55
+ href?: string;
56
+ }
57
+ export interface BreadcrumbsProps extends Omit<ComponentPropsWithRef<'nav'>, 'children'> {
58
+ /** From the top level down to the current page (last, not linked). */
59
+ items: Crumb[];
60
+ }
61
+ /**
62
+ * Where the current page sits in the hierarchy. On phones it collapses to a single
63
+ * "← Parent" back link, the thing people actually use a trail for on a small screen.
64
+ */
65
+ export declare function Breadcrumbs({ items, className, 'aria-label': ariaLabel, ...rest }: BreadcrumbsProps): import("react").JSX.Element;
66
+ export {};
67
+ //# sourceMappingURL=nav.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nav.d.ts","names":[],"sources":["../../../src/components/navigation/nav.tsx"],"mappings":";;iBAQiB;EACf;EACA,OAAO;EACP,OAAO;EACP;;iBAGe,8BAA8B,KAC7C;;EAIA;EACA,SAAS;EACT;EACA;EACA,iBAAiB;EACjB;;EAEA;;;;;;wBAOc,mBACd,SACA,OACA,cACA,eACA,MACA,WACA,cACG,QACF,wCAAqB,IAAA;iBAqCP,uBAAuB;;EAEtC;;EAEA;;;;;;;wBAQc,YAAY,UAAqB,cAAc,QAAQ,iCAAc,IAAA;KAIhF;EACH,MAAM;EACN;;EAEA;;EAEA;EACA;;EAEK;IAAiB,KAAK;EACtB;IAAqB,KAAK;wBAGjB,gBAAgB,MAAM,OAAO,SAAS,OAAO,cAAc,QAAQ,qCAAkB,IAAA;;wBAiCrF,kBAAkB,YAAuB,KAAK,8CAA2B,IAAA;iBAMxE;EACf,OAAO;EACP;;iBAGe,yBAAyB,KAAK;;EAE7C,OAAO;;;;;;wBAOO,cACd,OACA,yBACc,cACX,QACF,mCAAgB,IAAA"}