@orion-ds/react 1.2.3 → 1.2.5

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/AI_QUICKREF.md +8 -3
  2. package/README.md +22 -11
  3. package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  4. package/dist/components/Button/Button.d.ts.map +1 -1
  5. package/dist/components/Checkbox/Checkbox.d.ts +1 -0
  6. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  7. package/dist/components/Checkbox/Checkbox.types.d.ts +30 -5
  8. package/dist/components/Checkbox/Checkbox.types.d.ts.map +1 -1
  9. package/dist/components/Field/Field.d.ts +1 -0
  10. package/dist/components/Field/Field.d.ts.map +1 -1
  11. package/dist/components/Field/Field.types.d.ts +30 -0
  12. package/dist/components/Field/Field.types.d.ts.map +1 -1
  13. package/dist/components/Link/Link.d.ts.map +1 -1
  14. package/dist/components/Link/Link.types.d.ts +17 -0
  15. package/dist/components/Link/Link.types.d.ts.map +1 -1
  16. package/dist/components/Navbar/Navbar.d.ts +26 -15
  17. package/dist/components/Navbar/Navbar.d.ts.map +1 -1
  18. package/dist/components/Navbar/Navbar.types.d.ts +46 -0
  19. package/dist/components/Navbar/Navbar.types.d.ts.map +1 -1
  20. package/dist/components/Radio/Radio.d.ts +1 -0
  21. package/dist/components/Radio/Radio.d.ts.map +1 -1
  22. package/dist/components/Radio/Radio.types.d.ts +28 -4
  23. package/dist/components/Radio/Radio.types.d.ts.map +1 -1
  24. package/dist/components/SearchInput/SearchInput.d.ts.map +1 -1
  25. package/dist/components/Spinner/Spinner.types.d.ts +1 -1
  26. package/dist/components/Spinner/Spinner.types.d.ts.map +1 -1
  27. package/dist/components/Stepper/Stepper.d.ts.map +1 -1
  28. package/dist/components/Stepper/Stepper.types.d.ts +7 -0
  29. package/dist/components/Stepper/Stepper.types.d.ts.map +1 -1
  30. package/dist/components/Switch/Switch.d.ts +1 -0
  31. package/dist/components/Switch/Switch.d.ts.map +1 -1
  32. package/dist/components/Switch/Switch.types.d.ts +31 -4
  33. package/dist/components/Switch/Switch.types.d.ts.map +1 -1
  34. package/dist/components/Textarea/TextArea 2.d.ts +32 -0
  35. package/dist/components/Textarea/TextArea 2.d.ts.map +1 -0
  36. package/dist/components/Textarea/TextArea.types 2.d.ts +91 -0
  37. package/dist/components/Textarea/TextArea.types 2.d.ts.map +1 -0
  38. package/dist/components/Textarea/Textarea.d.ts +1 -0
  39. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  40. package/dist/components/Textarea/Textarea.types.d.ts +36 -8
  41. package/dist/components/Textarea/Textarea.types.d.ts.map +1 -1
  42. package/dist/index.cjs +16 -16
  43. package/dist/index.cjs.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 +8441 -0
  48. package/package.json +10 -5
@@ -2,6 +2,7 @@
2
2
  * Switch Component Types
3
3
  *
4
4
  * Type definitions for the Orion Switch component (toggle).
5
+ * Implements WCAG 2.1 AA accessibility guidelines.
5
6
  */
6
7
  import type { InputHTMLAttributes } from 'react';
7
8
  /**
@@ -19,17 +20,43 @@ export type SwitchSize = 'sm' | 'md' | 'lg';
19
20
  */
20
21
  export interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'> {
21
22
  /**
22
- * Switch label
23
+ * Switch label text.
24
+ * Required for accessibility unless aria-label is provided.
23
25
  */
24
26
  label?: string;
25
27
  /**
26
- * Switch size
27
- * @default 'md'
28
+ * Switch size variant.
29
+ * @default 'sm'
28
30
  */
29
31
  size?: SwitchSize;
30
32
  /**
31
- * Helper text (shown below switch)
33
+ * Helper text displayed below the switch.
34
+ * Automatically linked via aria-describedby.
32
35
  */
33
36
  helperText?: string;
37
+ /**
38
+ * Error message.
39
+ * Shows error state and displays message below switch.
40
+ */
41
+ error?: string;
42
+ /**
43
+ * Accessible label for screen readers when no visible label is provided.
44
+ * REQUIRED if `label` prop is not provided.
45
+ *
46
+ * @example
47
+ * ```tsx
48
+ * <Switch
49
+ * aria-label="Enable dark mode"
50
+ * checked={darkMode}
51
+ * onChange={toggleDarkMode}
52
+ * />
53
+ * ```
54
+ */
55
+ 'aria-label'?: string;
56
+ /**
57
+ * Additional element IDs that describe this switch.
58
+ * Automatically includes error and helper text IDs when provided.
59
+ */
60
+ 'aria-describedby'?: string;
34
61
  }
35
62
  //# sourceMappingURL=Switch.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.types.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/F;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
1
+ {"version":3,"file":"Switch.types.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/F;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAMf;;;;;;;;;;;;OAYG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Textarea Component
3
+ *
4
+ * Multi-line text input with label, error states, and character counter.
5
+ * Implements WCAG 2.1 AA accessibility guidelines.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <Textarea
10
+ * label="Description"
11
+ * placeholder="Enter description..."
12
+ * helperText="Provide detailed information"
13
+ * />
14
+ *
15
+ * <Textarea
16
+ * label="Bio"
17
+ * maxLength={500}
18
+ * showCounter
19
+ * resize="vertical"
20
+ * />
21
+ *
22
+ * <Textarea
23
+ * label="Comments"
24
+ * error="This field is required"
25
+ * size="lg"
26
+ * />
27
+ * ```
28
+ */
29
+ import React from 'react';
30
+ import type { TextareaProps } from './Textarea.types';
31
+ export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
32
+ //# sourceMappingURL=TextArea%202.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextArea 2.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/TextArea 2.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"}
@@ -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;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