@orion-ds/react 1.2.4 → 1.2.6

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 (48) hide show
  1. package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  2. package/dist/components/Button/Button.d.ts.map +1 -1
  3. package/dist/components/Checkbox/Checkbox.d.ts +1 -0
  4. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  5. package/dist/components/Checkbox/Checkbox.types.d.ts +30 -5
  6. package/dist/components/Checkbox/Checkbox.types.d.ts.map +1 -1
  7. package/dist/components/Field/Field.d.ts +1 -0
  8. package/dist/components/Field/Field.d.ts.map +1 -1
  9. package/dist/components/Field/Field.types.d.ts +30 -0
  10. package/dist/components/Field/Field.types.d.ts.map +1 -1
  11. package/dist/components/Link/Link.d.ts.map +1 -1
  12. package/dist/components/Link/Link.types.d.ts +17 -0
  13. package/dist/components/Link/Link.types.d.ts.map +1 -1
  14. package/dist/components/Navbar/Navbar.d.ts +26 -15
  15. package/dist/components/Navbar/Navbar.d.ts.map +1 -1
  16. package/dist/components/Navbar/Navbar.types.d.ts +46 -0
  17. package/dist/components/Navbar/Navbar.types.d.ts.map +1 -1
  18. package/dist/components/Radio/Radio.d.ts +1 -0
  19. package/dist/components/Radio/Radio.d.ts.map +1 -1
  20. package/dist/components/Radio/Radio.types.d.ts +28 -4
  21. package/dist/components/Radio/Radio.types.d.ts.map +1 -1
  22. package/dist/components/SearchInput/SearchInput.d.ts.map +1 -1
  23. package/dist/components/Spinner/Spinner.types.d.ts +1 -1
  24. package/dist/components/Spinner/Spinner.types.d.ts.map +1 -1
  25. package/dist/components/Stepper/Stepper.d.ts.map +1 -1
  26. package/dist/components/Stepper/Stepper.types.d.ts +7 -0
  27. package/dist/components/Stepper/Stepper.types.d.ts.map +1 -1
  28. package/dist/components/Switch/Switch.d.ts +1 -0
  29. package/dist/components/Switch/Switch.d.ts.map +1 -1
  30. package/dist/components/Switch/Switch.types.d.ts +31 -4
  31. package/dist/components/Switch/Switch.types.d.ts.map +1 -1
  32. package/dist/components/Textarea/TextArea 2.d.ts +32 -0
  33. package/dist/components/Textarea/TextArea 2.d.ts.map +1 -0
  34. package/dist/components/Textarea/TextArea.types 2.d.ts +91 -0
  35. package/dist/components/Textarea/TextArea.types 2.d.ts.map +1 -0
  36. package/dist/components/Textarea/Textarea.d.ts +1 -0
  37. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  38. package/dist/components/Textarea/Textarea.types.d.ts +36 -8
  39. package/dist/components/Textarea/Textarea.types.d.ts.map +1 -1
  40. package/dist/index.cjs +16 -16
  41. package/dist/index.cjs.map +1 -1
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.mjs +16042 -15771
  45. package/dist/index.mjs.map +1 -1
  46. package/dist/react.css +1 -1
  47. package/dist/styles.css +21 -1
  48. package/package.json +6 -5
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Textarea Component Types
3
+ *
4
+ * Type definitions for the Orion Textarea component.
5
+ * Implements WCAG 2.1 AA accessibility guidelines.
6
+ */
7
+ import type { TextareaHTMLAttributes } from 'react';
8
+ /**
9
+ * Textarea sizes
10
+ */
11
+ export type TextareaSize = 'sm' | 'md' | 'lg';
12
+ /**
13
+ * Textarea resize behavior
14
+ */
15
+ export type TextareaResize = 'none' | 'vertical' | 'horizontal' | 'both';
16
+ /**
17
+ * Textarea component props
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <Textarea label="Description" placeholder="Enter description..." />
22
+ * <Textarea
23
+ * label="Bio"
24
+ * helperText="Tell us about yourself"
25
+ * maxLength={500}
26
+ * showCounter
27
+ * />
28
+ * ```
29
+ */
30
+ export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
31
+ /**
32
+ * Textarea label text.
33
+ * Required for accessibility unless aria-label is provided.
34
+ */
35
+ label?: string;
36
+ /**
37
+ * Helper text displayed below the textarea.
38
+ * Automatically linked via aria-describedby.
39
+ */
40
+ helperText?: string;
41
+ /**
42
+ * Error message.
43
+ * Shows error state and displays message below textarea.
44
+ */
45
+ error?: string;
46
+ /**
47
+ * Textarea size variant.
48
+ * @default 'md'
49
+ */
50
+ size?: TextareaSize;
51
+ /**
52
+ * Resize behavior.
53
+ * @default 'vertical'
54
+ */
55
+ resize?: TextareaResize;
56
+ /**
57
+ * Show character counter.
58
+ * Counter is announced to screen readers via aria-live.
59
+ * @default false
60
+ */
61
+ showCounter?: boolean;
62
+ /**
63
+ * Maximum character length.
64
+ * Required if showCounter is true.
65
+ */
66
+ maxLength?: number;
67
+ /**
68
+ * Shows "(optional)" indicator next to label.
69
+ * @default false
70
+ */
71
+ optional?: boolean;
72
+ /**
73
+ * Accessible label for screen readers when no visible label is provided.
74
+ * REQUIRED if `label` prop is not provided.
75
+ *
76
+ * @example
77
+ * ```tsx
78
+ * <Textarea
79
+ * aria-label="Additional comments"
80
+ * placeholder="Enter your comments..."
81
+ * />
82
+ * ```
83
+ */
84
+ 'aria-label'?: string;
85
+ /**
86
+ * Additional element IDs that describe this textarea.
87
+ * Automatically includes error, helper text, and counter IDs when provided.
88
+ */
89
+ 'aria-describedby'?: string;
90
+ }
91
+ //# sourceMappingURL=TextArea.types%202.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextArea.types 2.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/TextArea.types 2.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;AAEzE;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC9F;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAMnB;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
@@ -2,6 +2,7 @@
2
2
  * Textarea Component
3
3
  *
4
4
  * Multi-line text input with label, error states, and character counter.
5
+ * Implements WCAG 2.1 AA accessibility guidelines.
5
6
  *
6
7
  * @example
7
8
  * ```tsx
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAA4C,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,eAAO,MAAM,QAAQ,2FAiIpB,CAAC"}
1
+ {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAmD,MAAM,OAAO,CAAC;AAExE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD,eAAO,MAAM,QAAQ,2FA6KpB,CAAC"}
@@ -2,6 +2,7 @@
2
2
  * Textarea Component Types
3
3
  *
4
4
  * Type definitions for the Orion Textarea component.
5
+ * Implements WCAG 2.1 AA accessibility guidelines.
5
6
  */
6
7
  import type { TextareaHTMLAttributes } from 'react';
7
8
  /**
@@ -28,36 +29,63 @@ export type TextareaResize = 'none' | 'vertical' | 'horizontal' | 'both';
28
29
  */
29
30
  export interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size'> {
30
31
  /**
31
- * Textarea label
32
+ * Textarea label text.
33
+ * Required for accessibility unless aria-label is provided.
32
34
  */
33
35
  label?: string;
34
36
  /**
35
- * Helper text (shown below textarea)
37
+ * Helper text displayed below the textarea.
38
+ * Automatically linked via aria-describedby.
36
39
  */
37
40
  helperText?: string;
38
41
  /**
39
- * Error message
42
+ * Error message.
43
+ * Shows error state and displays message below textarea.
40
44
  */
41
45
  error?: string;
42
46
  /**
43
- * Textarea size
47
+ * Textarea size variant.
44
48
  * @default 'md'
45
49
  */
46
50
  size?: TextareaSize;
47
51
  /**
48
- * Resize behavior
52
+ * Resize behavior.
49
53
  * @default 'vertical'
50
54
  */
51
55
  resize?: TextareaResize;
52
56
  /**
53
- * Show character counter
57
+ * Show character counter.
58
+ * Counter is announced to screen readers via aria-live.
54
59
  * @default false
55
60
  */
56
61
  showCounter?: boolean;
57
62
  /**
58
- * Maximum character length
59
- * (required if showCounter is true)
63
+ * Maximum character length.
64
+ * Required if showCounter is true.
60
65
  */
61
66
  maxLength?: number;
67
+ /**
68
+ * Shows "(optional)" indicator next to label.
69
+ * @default false
70
+ */
71
+ optional?: boolean;
72
+ /**
73
+ * Accessible label for screen readers when no visible label is provided.
74
+ * REQUIRED if `label` prop is not provided.
75
+ *
76
+ * @example
77
+ * ```tsx
78
+ * <Textarea
79
+ * aria-label="Additional comments"
80
+ * placeholder="Enter your comments..."
81
+ * />
82
+ * ```
83
+ */
84
+ 'aria-label'?: string;
85
+ /**
86
+ * Additional element IDs that describe this textarea.
87
+ * Automatically includes error, helper text, and counter IDs when provided.
88
+ */
89
+ 'aria-describedby'?: string;
62
90
  }
63
91
  //# sourceMappingURL=Textarea.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.types.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;AAEzE;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC9F;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"Textarea.types.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;AAEzE;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC9F;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAMnB;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}