alouette 20.3.0 → 20.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 (130) hide show
  1. package/bin/install-skills.mjs +72 -0
  2. package/dist/definitions/animationDurationsMs.d.ts +3 -0
  3. package/dist/definitions/animationDurationsMs.d.ts.map +1 -1
  4. package/dist/definitions/core/useColorToken.d.ts +9 -0
  5. package/dist/definitions/core/useColorToken.d.ts.map +1 -0
  6. package/dist/definitions/index.d.ts +21 -1
  7. package/dist/definitions/index.d.ts.map +1 -1
  8. package/dist/definitions/ui/actions/ActionButton.d.ts +9 -0
  9. package/dist/definitions/ui/actions/ActionButton.d.ts.map +1 -0
  10. package/dist/definitions/ui/actions/ActionButton.stories.d.ts +19 -0
  11. package/dist/definitions/ui/actions/ActionButton.stories.d.ts.map +1 -0
  12. package/dist/definitions/ui/actions/Button.d.ts +31 -2
  13. package/dist/definitions/ui/actions/Button.d.ts.map +1 -1
  14. package/dist/definitions/ui/actions/Button.stories.d.ts.map +1 -1
  15. package/dist/definitions/ui/actions/usePressAsync.d.ts +13 -0
  16. package/dist/definitions/ui/actions/usePressAsync.d.ts.map +1 -0
  17. package/dist/definitions/ui/containers/StableAccentScope.d.ts +16 -0
  18. package/dist/definitions/ui/containers/StableAccentScope.d.ts.map +1 -0
  19. package/dist/definitions/ui/containers/Surface.d.ts +2 -2
  20. package/dist/definitions/ui/containers/Surface.d.ts.map +1 -1
  21. package/dist/definitions/ui/feedback/CircularProgress.d.ts +21 -0
  22. package/dist/definitions/ui/feedback/CircularProgress.d.ts.map +1 -0
  23. package/dist/definitions/ui/feedback/CircularProgress.stories.d.ts +38 -0
  24. package/dist/definitions/ui/feedback/CircularProgress.stories.d.ts.map +1 -0
  25. package/dist/definitions/ui/feedback/LinearProgress.d.ts +21 -0
  26. package/dist/definitions/ui/feedback/LinearProgress.d.ts.map +1 -0
  27. package/dist/definitions/ui/feedback/LinearProgress.stories.d.ts +38 -0
  28. package/dist/definitions/ui/feedback/LinearProgress.stories.d.ts.map +1 -0
  29. package/dist/definitions/ui/feedback/Message.d.ts +1 -0
  30. package/dist/definitions/ui/feedback/Message.d.ts.map +1 -1
  31. package/dist/definitions/ui/feedback/Message.stories.d.ts.map +1 -1
  32. package/dist/definitions/ui/feedback/RingCircle.d.ts +16 -0
  33. package/dist/definitions/ui/feedback/RingCircle.d.ts.map +1 -0
  34. package/dist/definitions/ui/feedback/RingCircle.web.d.ts +4 -0
  35. package/dist/definitions/ui/feedback/RingCircle.web.d.ts.map +1 -0
  36. package/dist/definitions/ui/feedback/useSimulatedProgress.d.ts +11 -0
  37. package/dist/definitions/ui/feedback/useSimulatedProgress.d.ts.map +1 -0
  38. package/dist/definitions/ui/forms/Form.d.ts +26 -0
  39. package/dist/definitions/ui/forms/Form.d.ts.map +1 -0
  40. package/dist/definitions/ui/forms/Form.stories.d.ts +13 -0
  41. package/dist/definitions/ui/forms/Form.stories.d.ts.map +1 -0
  42. package/dist/definitions/ui/forms/FormField.d.ts +30 -0
  43. package/dist/definitions/ui/forms/FormField.d.ts.map +1 -0
  44. package/dist/definitions/ui/forms/FormField.stories.d.ts +13 -0
  45. package/dist/definitions/ui/forms/FormField.stories.d.ts.map +1 -0
  46. package/dist/definitions/ui/forms/FormFieldArray.d.ts +39 -0
  47. package/dist/definitions/ui/forms/FormFieldArray.d.ts.map +1 -0
  48. package/dist/definitions/ui/forms/FormFieldArray.stories.d.ts +18 -0
  49. package/dist/definitions/ui/forms/FormFieldArray.stories.d.ts.map +1 -0
  50. package/dist/definitions/ui/forms/FormItem.d.ts +31 -0
  51. package/dist/definitions/ui/forms/FormItem.d.ts.map +1 -0
  52. package/dist/definitions/ui/forms/FormItem.stories.d.ts +14 -0
  53. package/dist/definitions/ui/forms/FormItem.stories.d.ts.map +1 -0
  54. package/dist/definitions/ui/forms/FormSubmitButton.d.ts +20 -0
  55. package/dist/definitions/ui/forms/FormSubmitButton.d.ts.map +1 -0
  56. package/dist/definitions/ui/forms/FormSubmitButton.stories.d.ts +15 -0
  57. package/dist/definitions/ui/forms/FormSubmitButton.stories.d.ts.map +1 -0
  58. package/dist/definitions/ui/forms/SimpleVForm.d.ts +18 -0
  59. package/dist/definitions/ui/forms/SimpleVForm.d.ts.map +1 -0
  60. package/dist/definitions/ui/forms/SimpleVForm.stories.d.ts +14 -0
  61. package/dist/definitions/ui/forms/SimpleVForm.stories.d.ts.map +1 -0
  62. package/dist/definitions/ui/primitives/Icon.d.ts +2 -1
  63. package/dist/definitions/ui/primitives/Icon.d.ts.map +1 -1
  64. package/dist/definitions/ui/story-components/IndeterminateToggleDemo.d.ts +7 -0
  65. package/dist/definitions/ui/story-components/IndeterminateToggleDemo.d.ts.map +1 -0
  66. package/dist/index-browser.es.js +698 -84
  67. package/dist/index-browser.es.js.map +1 -1
  68. package/dist/index-node22.cjs +727 -81
  69. package/dist/index-node22.cjs.map +1 -1
  70. package/dist/index-node22.mjs +718 -83
  71. package/dist/index-node22.mjs.map +1 -1
  72. package/dist/index-react-native.cjs.js +727 -81
  73. package/dist/index-react-native.cjs.js.map +1 -1
  74. package/dist/index-react-native.es.js +718 -83
  75. package/dist/index-react-native.es.js.map +1 -1
  76. package/package.json +14 -8
  77. package/skills/alouette-actions/SKILL.md +46 -2
  78. package/skills/alouette-animation/SKILL.md +5 -3
  79. package/skills/alouette-dialogs/SKILL.md +163 -0
  80. package/skills/alouette-external-links/SKILL.md +1 -1
  81. package/skills/alouette-feedback/SKILL.md +59 -12
  82. package/skills/alouette-forms/SKILL.md +1 -1
  83. package/skills/alouette-forms-composition/SKILL.md +299 -0
  84. package/skills/alouette-icons/SKILL.md +1 -1
  85. package/skills/alouette-layout/SKILL.md +1 -1
  86. package/skills/alouette-responsive/SKILL.md +1 -1
  87. package/skills/alouette-setup/SKILL.md +1 -1
  88. package/skills/alouette-theming/SKILL.md +50 -3
  89. package/skills/alouette-typography/SKILL.md +1 -1
  90. package/src/animationDurationsMs.ts +4 -1
  91. package/src/core/useColorToken.ts +31 -0
  92. package/src/global.css +21 -12
  93. package/src/index.ts +29 -0
  94. package/src/themeVariables.ts +6 -6
  95. package/src/ui/actions/ActionButton.stories.tsx +137 -0
  96. package/src/ui/actions/ActionButton.tsx +36 -0
  97. package/src/ui/actions/Button.stories.tsx +43 -1
  98. package/src/ui/actions/Button.tsx +88 -6
  99. package/src/ui/actions/usePressAsync.ts +88 -0
  100. package/src/ui/containers/Box.tsx +1 -1
  101. package/src/ui/containers/StableAccentScope.tsx +33 -0
  102. package/src/ui/containers/Surface.tsx +1 -1
  103. package/src/ui/feedback/CircularProgress.stories.tsx +100 -0
  104. package/src/ui/feedback/CircularProgress.tsx +118 -0
  105. package/src/ui/feedback/ConnectionState.tsx +2 -2
  106. package/src/ui/feedback/LinearProgress.stories.tsx +101 -0
  107. package/src/ui/feedback/LinearProgress.tsx +77 -0
  108. package/src/ui/feedback/Message.stories.tsx +2 -0
  109. package/src/ui/feedback/Message.tsx +5 -0
  110. package/src/ui/feedback/RingCircle.tsx +94 -0
  111. package/src/ui/feedback/RingCircle.web.tsx +51 -0
  112. package/src/ui/feedback/useSimulatedProgress.ts +75 -0
  113. package/src/ui/forms/Form.stories.tsx +83 -0
  114. package/src/ui/forms/Form.tsx +64 -0
  115. package/src/ui/forms/FormField.stories.tsx +112 -0
  116. package/src/ui/forms/FormField.tsx +79 -0
  117. package/src/ui/forms/FormFieldArray.stories.tsx +383 -0
  118. package/src/ui/forms/FormFieldArray.tsx +172 -0
  119. package/src/ui/forms/FormItem.stories.tsx +167 -0
  120. package/src/ui/forms/FormItem.tsx +131 -0
  121. package/src/ui/forms/FormSubmitButton.stories.tsx +114 -0
  122. package/src/ui/forms/FormSubmitButton.tsx +34 -0
  123. package/src/ui/forms/SimpleVForm.stories.tsx +203 -0
  124. package/src/ui/forms/SimpleVForm.tsx +43 -0
  125. package/src/ui/inputs/InputText.tsx +1 -1
  126. package/src/ui/inputs/Select.shared.tsx +1 -1
  127. package/src/ui/inputs/Select.web.tsx +2 -2
  128. package/src/ui/inputs/Switch.web.tsx +2 -2
  129. package/src/ui/primitives/Icon.tsx +4 -22
  130. package/src/ui/story-components/IndeterminateToggleDemo.tsx +29 -0
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from "@storybook/react-vite";
2
+ import { Form } from "./Form";
3
+ type ThisStory = StoryObj<typeof Form>;
4
+ declare const _default: {
5
+ title: string;
6
+ component: typeof Form;
7
+ parameters: {
8
+ componentSubtitle: string;
9
+ };
10
+ };
11
+ export default _default;
12
+ export declare const FormStory: ThisStory;
13
+ //# sourceMappingURL=Form.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form.stories.d.ts","sourceRoot":"","sources":["../../../../src/ui/forms/Form.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAK5D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAW9B,KAAK,SAAS,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;;;;;;;;AAEvC,wBAO8B;AAE9B,eAAO,MAAM,SAAS,EAAE,SAsDvB,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { ReactNode } from "react";
2
+ import { type ControllerRenderProps, type FieldError, type FieldPath, type FieldValues, type RegisterOptions } from "react-hook-form";
3
+ export interface FormFieldProps<TFieldValues extends FieldValues> {
4
+ name: FieldPath<TFieldValues>;
5
+ label: string;
6
+ /**
7
+ * Marks the field required and shows FormItem's marker. Pass true for no
8
+ * message, or any other ReactNode to use as the required-field error —
9
+ * unless renderError overrides it — once the field is left empty.
10
+ * react-hook-form's own FieldError.message is always a plain string, so
11
+ * this is the only way to get a richer, i18n'd required message without
12
+ * reaching for renderError.
13
+ */
14
+ required?: ReactNode;
15
+ validate?: RegisterOptions<TFieldValues>["validate"];
16
+ renderError?: (error: FieldError | undefined) => ReactNode;
17
+ render: (params: {
18
+ field: ControllerRenderProps<TFieldValues>;
19
+ labelId: string;
20
+ }) => ReactNode;
21
+ }
22
+ /**
23
+ * Wires a react-hook-form Controller to FormItem's label/error/layout.
24
+ * Must be used inside <Form>, which provides the control via context.
25
+ * Renders any input via `render` — not tied to a specific input component.
26
+ * The rendered input must attach `field.ref` for pressing the label to
27
+ * focus it, via react-hook-form's own setFocus.
28
+ */
29
+ export declare function FormField<TFieldValues extends FieldValues>({ name, label, required, validate, renderError, render, }: FormFieldProps<TFieldValues>): ReactNode;
30
+ //# sourceMappingURL=FormField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../../src/ui/forms/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,eAAe,EAErB,MAAM,iBAAiB,CAAC;AAGzB,MAAM,WAAW,cAAc,CAAC,YAAY,SAAS,WAAW;IAC9D,IAAI,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC;IACrD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,KAAK,SAAS,CAAC;IAC3D,MAAM,EAAE,CAAC,MAAM,EAAE;QACf,KAAK,EAAE,qBAAqB,CAAC,YAAY,CAAC,CAAC;QAC3C,OAAO,EAAE,MAAM,CAAC;KACjB,KAAK,SAAS,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,YAAY,SAAS,WAAW,EAAE,EAC1D,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,MAAM,GACP,EAAE,cAAc,CAAC,YAAY,CAAC,GAAG,SAAS,CAgC1C"}
@@ -0,0 +1,13 @@
1
+ import type { StoryObj } from "@storybook/react-vite";
2
+ import { FormField } from "./FormField";
3
+ type ThisStory = StoryObj<typeof FormField>;
4
+ declare const _default: {
5
+ title: string;
6
+ component: typeof FormField;
7
+ parameters: {
8
+ componentSubtitle: string;
9
+ };
10
+ };
11
+ export default _default;
12
+ export declare const FormFieldStory: ThisStory;
13
+ //# sourceMappingURL=FormField.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormField.stories.d.ts","sourceRoot":"","sources":["../../../../src/ui/forms/FormField.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAO5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA+DxC,KAAK,SAAS,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;;;;;;;;AAE5C,wBAOmC;AAEnC,eAAO,MAAM,cAAc,EAAE,SA6B5B,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { type ReactNode } from "react";
2
+ import { type ArrayPath, type FieldArray, type FieldPath, type FieldValues } from "react-hook-form";
3
+ export interface FormFieldArrayProps<TFieldValues extends FieldValues> {
4
+ name: ArrayPath<TFieldValues>;
5
+ label: string;
6
+ /** Muted helper text shown under the label (e.g. a minimum-count hint). */
7
+ details?: ReactNode;
8
+ /** Value appended when a new item is added. */
9
+ emptyValue: FieldArray<TFieldValues, ArrayPath<TFieldValues>>;
10
+ /**
11
+ * Minimum number of items. The array is padded to this length on mount and
12
+ * the leading `minSize` items cannot be removed.
13
+ */
14
+ minSize?: number;
15
+ /** aria-label for the add button. */
16
+ addLabel?: string;
17
+ /** Disables the add button, e.g. while the last item is still empty. */
18
+ disableAdd?: boolean;
19
+ /** aria-label for each remove button, given the item's own label. */
20
+ removeLabel?: (itemLabel: string) => string;
21
+ render: (params: {
22
+ /** Path prefix for this item, e.g. "guests.0". Build sub-paths as `${name}.value`. */
23
+ name: FieldPath<TFieldValues>;
24
+ index: number;
25
+ /** Per-item base accessible name (`${label} ${index + 1}`), e.g. "Guests 1". */
26
+ label: string;
27
+ }) => ReactNode;
28
+ }
29
+ /**
30
+ * A repeatable list of object fields backed by react-hook-form's useFieldArray.
31
+ * Must be used inside <Form>. FormFieldArray owns only the array label and the
32
+ * add/remove buttons — it is agnostic about what an item contains, including
33
+ * any per-item framing (a caller can wrap multi-field items in a Surface). Each item's inputs (their values, labels and error
34
+ * messages) are the caller's job: `render` receives the item's path prefix
35
+ * (e.g. "guests.0") and composes its own FormField(s), bound to `name` for a
36
+ * raw value or `${name}.value` / `${name}.firstName` for an object item.
37
+ */
38
+ export declare function FormFieldArray<TFieldValues extends FieldValues>({ name, label, details, emptyValue, minSize, addLabel, disableAdd, removeLabel, render, }: FormFieldArrayProps<TFieldValues>): ReactNode;
39
+ //# sourceMappingURL=FormFieldArray.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormFieldArray.d.ts","sourceRoot":"","sources":["../../../../src/ui/forms/FormFieldArray.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA+B,MAAM,OAAO,CAAC;AACpE,OAAO,EACL,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAGjB,MAAM,iBAAiB,CAAC;AAQzB,MAAM,WAAW,mBAAmB,CAAC,YAAY,SAAS,WAAW;IACnE,IAAI,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,+CAA+C;IAC/C,UAAU,EAAE,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC;IAC9D;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qEAAqE;IACrE,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5C,MAAM,EAAE,CAAC,MAAM,EAAE;QACf,sFAAsF;QACtF,IAAI,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;QAC9B,KAAK,EAAE,MAAM,CAAC;QACd,gFAAgF;QAChF,KAAK,EAAE,MAAM,CAAC;KACf,KAAK,SAAS,CAAC;CACjB;AAmDD;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,YAAY,SAAS,WAAW,EAAE,EAC/D,IAAI,EACJ,KAAK,EACL,OAAO,EACP,UAAU,EACV,OAAW,EACX,QAAqB,EACrB,UAAU,EACV,WAAkD,EAClD,MAAM,GACP,EAAE,mBAAmB,CAAC,YAAY,CAAC,GAAG,SAAS,CA0D/C"}
@@ -0,0 +1,18 @@
1
+ import type { StoryObj } from "@storybook/react-vite";
2
+ import { FormFieldArray } from "./FormFieldArray";
3
+ type ThisStory = StoryObj<typeof FormFieldArray>;
4
+ declare const _default: {
5
+ title: string;
6
+ component: typeof FormFieldArray;
7
+ parameters: {
8
+ componentSubtitle: string;
9
+ };
10
+ };
11
+ export default _default;
12
+ export declare const FormFieldArrayPreviewStory: ThisStory;
13
+ export declare const FormFieldArrayVariantsStory: ThisStory;
14
+ export declare const Tests: ThisStory;
15
+ export declare const MinSizeTests: ThisStory;
16
+ export declare const MultiFieldTests: ThisStory;
17
+ export declare const RawStringTests: ThisStory;
18
+ //# sourceMappingURL=FormFieldArray.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormFieldArray.stories.d.ts","sourceRoot":"","sources":["../../../../src/ui/forms/FormFieldArray.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAW5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA+LlD,KAAK,SAAS,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC;;;;;;;;AAEjD,wBAOwC;AAExC,eAAO,MAAM,0BAA0B,EAAE,SASxC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,SAkCzC,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,SA2CnB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,SAmB1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,SA0B7B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,SA2B5B,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { type ReactNode } from "react";
2
+ export interface FormItemProps {
3
+ label: string;
4
+ /** Muted helper text shown between the label and the input. */
5
+ details?: ReactNode;
6
+ error?: ReactNode;
7
+ /**
8
+ * True when `error` is caused by the field being left empty, as opposed
9
+ * to some other validation failure. An empty required field just needs
10
+ * its star recolored — a second warning icon would be a redundant cue.
11
+ */
12
+ isRequiredError?: boolean;
13
+ /** true shows the default marker; any other ReactNode replaces it. */
14
+ required?: ReactNode;
15
+ /**
16
+ * Wraps the rendered content in a left border + padding to visually nest it
17
+ * inside a group. The label stays at full width above the rail.
18
+ */
19
+ indented?: boolean;
20
+ /** Called when the label is pressed, so it can focus the input. */
21
+ onLabelPress?: () => void;
22
+ render: (labelId: string) => ReactNode;
23
+ }
24
+ /**
25
+ * Label, error message and layout for a single form field. Form-library
26
+ * agnostic — pass the input as a render prop so it can wire
27
+ * aria-labelledby to the generated labelId, and onLabelPress so the label
28
+ * can focus it, matching a native <label for> click.
29
+ */
30
+ export declare function FormItem({ label, details, error, isRequiredError, required, indented, onLabelPress, render, }: FormItemProps): ReactNode;
31
+ //# sourceMappingURL=FormItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormItem.d.ts","sourceRoot":"","sources":["../../../../src/ui/forms/FormItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAQ9C,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sEAAsE;IACtE,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mEAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,SAAS,CAAC;CACxC;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,OAAO,EACP,KAAK,EACL,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,MAAM,GACP,EAAE,aAAa,GAAG,SAAS,CAkF3B"}
@@ -0,0 +1,14 @@
1
+ import type { StoryObj } from "@storybook/react-vite";
2
+ import { FormItem } from "./FormItem";
3
+ type ThisStory = StoryObj<typeof FormItem>;
4
+ declare const _default: {
5
+ title: string;
6
+ component: typeof FormItem;
7
+ parameters: {
8
+ componentSubtitle: string;
9
+ };
10
+ };
11
+ export default _default;
12
+ export declare const Variants: ThisStory;
13
+ export declare const Tests: ThisStory;
14
+ //# sourceMappingURL=FormItem.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormItem.stories.d.ts","sourceRoot":"","sources":["../../../../src/ui/forms/FormItem.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAK5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAiGtC,KAAK,SAAS,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;;;;;;;;AAE3C,wBAOkC;AAElC,eAAO,MAAM,QAAQ,EAAE,SAgCtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,SAkBnB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { ReactNode } from "react";
2
+ export interface FormSubmitButtonProps {
3
+ label: string;
4
+ onPress: () => Promise<void>;
5
+ /**
6
+ * Maps a submit failure to displayed text. Required rather than
7
+ * defaulted, since a library-provided default could only ever be a
8
+ * hardcoded English string — not translatable. Check
9
+ * `error instanceof FormValidationError` to render a "fix the errors
10
+ * above" case distinctly from a genuine onSubmit failure.
11
+ */
12
+ errorToMessage: (error: unknown) => string;
13
+ }
14
+ /**
15
+ * Submit button for a <Form>. Built on ActionButton, so submission gets the
16
+ * same loading/success/failed lifecycle and inline error message as any
17
+ * other async action in the app, rather than a plain boolean isSubmitting.
18
+ */
19
+ export declare function FormSubmitButton({ label, onPress, errorToMessage, }: FormSubmitButtonProps): ReactNode;
20
+ //# sourceMappingURL=FormSubmitButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormSubmitButton.d.ts","sourceRoot":"","sources":["../../../../src/ui/forms/FormSubmitButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B;;;;;;OAMG;IACH,cAAc,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAC;CAC5C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,OAAO,EACP,cAAc,GACf,EAAE,qBAAqB,GAAG,SAAS,CAQnC"}
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from "@storybook/react-vite";
2
+ import { type ReactNode } from "react";
3
+ import { FormSubmitButton } from "./FormSubmitButton";
4
+ declare function FormSubmitButtonDemo(): ReactNode;
5
+ type ThisStory = StoryObj<typeof FormSubmitButtonDemo>;
6
+ declare const _default: {
7
+ title: string;
8
+ component: typeof FormSubmitButton;
9
+ parameters: {
10
+ componentSubtitle: string;
11
+ };
12
+ };
13
+ export default _default;
14
+ export declare const FormSubmitButtonStory: ThisStory;
15
+ //# sourceMappingURL=FormSubmitButton.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormSubmitButton.stories.d.ts","sourceRoot":"","sources":["../../../../src/ui/forms/FormSubmitButton.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAOjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAmBtD,iBAAS,oBAAoB,IAAI,SAAS,CAyCzC;AAED,KAAK,SAAS,GAAG,QAAQ,CAAC,OAAO,oBAAoB,CAAC,CAAC;;;;;;;;AAEvD,wBAO8C;AAE9C,eAAO,MAAM,qBAAqB,EAAE,SA+BnC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { ReactNode } from "react";
2
+ import type { FieldValues } from "react-hook-form";
3
+ import { type FormProps } from "./Form";
4
+ export interface SimpleVFormProps<TFieldValues extends FieldValues> extends Omit<FormProps<TFieldValues>, "render"> {
5
+ submitLabel: string;
6
+ /** Forwarded to FormSubmitButton — see its errorToMessage doc. */
7
+ submitErrorToMessage: (error: unknown) => string;
8
+ className?: string;
9
+ render: (params: {
10
+ submit: () => Promise<void>;
11
+ }) => ReactNode;
12
+ }
13
+ /**
14
+ * Standardizes the common case: a Form laid out as a vertical stack with
15
+ * a trailing FormSubmitButton.
16
+ */
17
+ export declare function SimpleVForm<TFieldValues extends FieldValues>({ submitLabel, submitErrorToMessage, className, render, ...formProps }: SimpleVFormProps<TFieldValues>): ReactNode;
18
+ //# sourceMappingURL=SimpleVForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleVForm.d.ts","sourceRoot":"","sources":["../../../../src/ui/forms/SimpleVForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAG9C,MAAM,WAAW,gBAAgB,CAC/B,YAAY,SAAS,WAAW,CAChC,SAAQ,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAC;IAC/C,WAAW,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,oBAAoB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,KAAK,SAAS,CAAC;CAChE;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,YAAY,SAAS,WAAW,EAAE,EAC5D,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,MAAM,EACN,GAAG,SAAS,EACb,EAAE,gBAAgB,CAAC,YAAY,CAAC,GAAG,SAAS,CAgB5C"}
@@ -0,0 +1,14 @@
1
+ import type { StoryObj } from "@storybook/react-vite";
2
+ import { type ReactNode } from "react";
3
+ declare function SimpleVFormDemo(): ReactNode;
4
+ type ThisStory = StoryObj<typeof SimpleVFormDemo>;
5
+ declare const _default: {
6
+ title: string;
7
+ component: typeof SimpleVFormDemo;
8
+ parameters: {
9
+ componentSubtitle: string;
10
+ };
11
+ };
12
+ export default _default;
13
+ export declare const SimpleVFormStory: ThisStory;
14
+ //# sourceMappingURL=SimpleVForm.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleVForm.stories.d.ts","sourceRoot":"","sources":["../../../../src/ui/forms/SimpleVForm.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAsHjD,iBAAS,eAAe,IAAI,SAAS,CAsBpC;AAED,KAAK,SAAS,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;;;;;;;;AAElD,wBAOyC;AAEzC,eAAO,MAAM,gBAAgB,EAAE,SA+C9B,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { type ReactElement, type ReactNode, type SVGProps } from "react";
2
+ import type { ColorClassName } from "../../core/useColorToken";
2
3
  export type SVGIconElement = ReactElement<SVGProps<SVGSVGElement>>;
3
4
  export interface IconProps {
4
5
  icon: SVGIconElement;
@@ -9,7 +10,7 @@ export interface IconProps {
9
10
  * `text-muted`, `text-accent`, `text-on-accent`, `text-disabled-muted`.
10
11
  * Defaults to `text-sharp`.
11
12
  */
12
- className?: string | "text-accent" | "text-disabled-muted" | "text-disabled" | "text-muted" | "text-on-accent-muted" | "text-on-accent" | "text-sharp";
13
+ className?: ColorClassName;
13
14
  }
14
15
  export declare function Icon({ icon, size, className, }: IconProps): ReactNode;
15
16
  //# sourceMappingURL=Icon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../src/ui/primitives/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,QAAQ,EAEd,MAAM,OAAO,CAAC;AAGf,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAEnE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,cAAc,CAAC;IACrB,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,CAAC,EACN,MAAM,GAEN,aAAa,GAEb,qBAAqB,GAErB,eAAe,GAEf,YAAY,GAEZ,sBAAsB,GAEtB,gBAAgB,GAEhB,YAAY,CAAC;CAClB;AAED,wBAAgB,IAAI,CAAC,EACnB,IAAI,EACJ,IAAS,EACT,SAAwB,GACzB,EAAE,SAAS,GAAG,SAAS,CAavB"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../src/ui/primitives/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,QAAQ,EAEd,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAEnE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,cAAc,CAAC;IACrB,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B;AAED,wBAAgB,IAAI,CAAC,EACnB,IAAI,EACJ,IAAS,EACT,SAAwB,GACzB,EAAE,SAAS,GAAG,SAAS,CASvB"}
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from "react";
2
+ export interface IndeterminateToggleDemoProps {
3
+ boxClassName: string;
4
+ children: (loading: boolean) => ReactNode;
5
+ }
6
+ export declare function IndeterminateToggleDemo({ boxClassName, children, }: IndeterminateToggleDemoProps): ReactNode;
7
+ //# sourceMappingURL=IndeterminateToggleDemo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndeterminateToggleDemo.d.ts","sourceRoot":"","sources":["../../../../src/ui/story-components/IndeterminateToggleDemo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,MAAM,WAAW,4BAA4B;IAC3C,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,SAAS,CAAC;CAC3C;AAED,wBAAgB,uBAAuB,CAAC,EACtC,YAAY,EACZ,QAAQ,GACT,EAAE,4BAA4B,GAAG,SAAS,CAc1C"}