@proyecto-viviana/solidaria 0.0.2 → 0.0.3

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 (110) hide show
  1. package/dist/index.d.ts +1214 -15
  2. package/dist/index.js +178 -382
  3. package/dist/index.jsx +2717 -0
  4. package/package.json +7 -5
  5. package/dist/button/createButton.d.ts +0 -29
  6. package/dist/button/createButton.d.ts.map +0 -1
  7. package/dist/button/createToggleButton.d.ts +0 -41
  8. package/dist/button/createToggleButton.d.ts.map +0 -1
  9. package/dist/button/index.d.ts +0 -5
  10. package/dist/button/index.d.ts.map +0 -1
  11. package/dist/button/types.d.ts +0 -66
  12. package/dist/button/types.d.ts.map +0 -1
  13. package/dist/checkbox/createCheckbox.d.ts +0 -56
  14. package/dist/checkbox/createCheckbox.d.ts.map +0 -1
  15. package/dist/checkbox/createCheckboxGroup.d.ts +0 -53
  16. package/dist/checkbox/createCheckboxGroup.d.ts.map +0 -1
  17. package/dist/checkbox/createCheckboxGroupItem.d.ts +0 -25
  18. package/dist/checkbox/createCheckboxGroupItem.d.ts.map +0 -1
  19. package/dist/checkbox/createCheckboxGroupState.d.ts +0 -71
  20. package/dist/checkbox/createCheckboxGroupState.d.ts.map +0 -1
  21. package/dist/checkbox/index.d.ts +0 -9
  22. package/dist/checkbox/index.d.ts.map +0 -1
  23. package/dist/index.d.ts.map +0 -1
  24. package/dist/index.js.map +0 -1
  25. package/dist/interactions/FocusableProvider.d.ts +0 -26
  26. package/dist/interactions/FocusableProvider.d.ts.map +0 -1
  27. package/dist/interactions/PressEvent.d.ts +0 -63
  28. package/dist/interactions/PressEvent.d.ts.map +0 -1
  29. package/dist/interactions/createFocus.d.ts +0 -31
  30. package/dist/interactions/createFocus.d.ts.map +0 -1
  31. package/dist/interactions/createFocusRing.d.ts +0 -37
  32. package/dist/interactions/createFocusRing.d.ts.map +0 -1
  33. package/dist/interactions/createFocusWithin.d.ts +0 -27
  34. package/dist/interactions/createFocusWithin.d.ts.map +0 -1
  35. package/dist/interactions/createFocusable.d.ts +0 -65
  36. package/dist/interactions/createFocusable.d.ts.map +0 -1
  37. package/dist/interactions/createHover.d.ts +0 -41
  38. package/dist/interactions/createHover.d.ts.map +0 -1
  39. package/dist/interactions/createKeyboard.d.ts +0 -35
  40. package/dist/interactions/createKeyboard.d.ts.map +0 -1
  41. package/dist/interactions/createPress.d.ts +0 -49
  42. package/dist/interactions/createPress.d.ts.map +0 -1
  43. package/dist/interactions/index.d.ts +0 -10
  44. package/dist/interactions/index.d.ts.map +0 -1
  45. package/dist/label/createField.d.ts +0 -51
  46. package/dist/label/createField.d.ts.map +0 -1
  47. package/dist/label/createLabel.d.ts +0 -49
  48. package/dist/label/createLabel.d.ts.map +0 -1
  49. package/dist/label/createLabels.d.ts +0 -16
  50. package/dist/label/createLabels.d.ts.map +0 -1
  51. package/dist/label/index.d.ts +0 -6
  52. package/dist/label/index.d.ts.map +0 -1
  53. package/dist/link/createLink.d.ts +0 -65
  54. package/dist/link/createLink.d.ts.map +0 -1
  55. package/dist/link/index.d.ts +0 -2
  56. package/dist/link/index.d.ts.map +0 -1
  57. package/dist/progress/createProgressBar.d.ts +0 -47
  58. package/dist/progress/createProgressBar.d.ts.map +0 -1
  59. package/dist/progress/index.d.ts +0 -2
  60. package/dist/progress/index.d.ts.map +0 -1
  61. package/dist/radio/createRadio.d.ts +0 -68
  62. package/dist/radio/createRadio.d.ts.map +0 -1
  63. package/dist/radio/createRadioGroup.d.ts +0 -85
  64. package/dist/radio/createRadioGroup.d.ts.map +0 -1
  65. package/dist/radio/createRadioGroupState.d.ts +0 -77
  66. package/dist/radio/createRadioGroupState.d.ts.map +0 -1
  67. package/dist/radio/index.d.ts +0 -4
  68. package/dist/radio/index.d.ts.map +0 -1
  69. package/dist/separator/createSeparator.d.ts +0 -38
  70. package/dist/separator/createSeparator.d.ts.map +0 -1
  71. package/dist/separator/index.d.ts +0 -2
  72. package/dist/separator/index.d.ts.map +0 -1
  73. package/dist/ssr/index.d.ts +0 -24
  74. package/dist/ssr/index.d.ts.map +0 -1
  75. package/dist/switch/createSwitch.d.ts +0 -34
  76. package/dist/switch/createSwitch.d.ts.map +0 -1
  77. package/dist/switch/index.d.ts +0 -2
  78. package/dist/switch/index.d.ts.map +0 -1
  79. package/dist/textfield/createTextField.d.ts +0 -73
  80. package/dist/textfield/createTextField.d.ts.map +0 -1
  81. package/dist/textfield/index.d.ts +0 -2
  82. package/dist/textfield/index.d.ts.map +0 -1
  83. package/dist/toggle/createToggle.d.ts +0 -94
  84. package/dist/toggle/createToggle.d.ts.map +0 -1
  85. package/dist/toggle/createToggleState.d.ts +0 -34
  86. package/dist/toggle/createToggleState.d.ts.map +0 -1
  87. package/dist/toggle/index.d.ts +0 -5
  88. package/dist/toggle/index.d.ts.map +0 -1
  89. package/dist/utils/dom.d.ts +0 -51
  90. package/dist/utils/dom.d.ts.map +0 -1
  91. package/dist/utils/events.d.ts +0 -29
  92. package/dist/utils/events.d.ts.map +0 -1
  93. package/dist/utils/filterDOMProps.d.ts +0 -29
  94. package/dist/utils/filterDOMProps.d.ts.map +0 -1
  95. package/dist/utils/focus.d.ts +0 -20
  96. package/dist/utils/focus.d.ts.map +0 -1
  97. package/dist/utils/geometry.d.ts +0 -40
  98. package/dist/utils/geometry.d.ts.map +0 -1
  99. package/dist/utils/globalListeners.d.ts +0 -36
  100. package/dist/utils/globalListeners.d.ts.map +0 -1
  101. package/dist/utils/index.d.ts +0 -11
  102. package/dist/utils/index.d.ts.map +0 -1
  103. package/dist/utils/mergeProps.d.ts +0 -8
  104. package/dist/utils/mergeProps.d.ts.map +0 -1
  105. package/dist/utils/platform.d.ts +0 -14
  106. package/dist/utils/platform.d.ts.map +0 -1
  107. package/dist/utils/reactivity.d.ts +0 -28
  108. package/dist/utils/reactivity.d.ts.map +0 -1
  109. package/dist/utils/textSelection.d.ts +0 -19
  110. package/dist/utils/textSelection.d.ts.map +0 -1
@@ -1,65 +0,0 @@
1
- /**
2
- * Link hook for Solidaria
3
- *
4
- * Provides the behavior and accessibility implementation for a link component.
5
- * A link allows a user to navigate to another page or resource within a web page
6
- * or application.
7
- *
8
- * This is a 1:1 port of @react-aria/link's useLink hook.
9
- */
10
- import { type Accessor } from 'solid-js';
11
- import { type MaybeAccessor } from '../utils/reactivity';
12
- import { type PressEvent } from '../interactions/PressEvent';
13
- export interface AriaLinkProps {
14
- /** Whether the link is disabled. */
15
- isDisabled?: boolean;
16
- /** The HTML element used to render the link, e.g. 'a', or 'span'. @default 'a' */
17
- elementType?: string;
18
- /** The URL to link to. */
19
- href?: string;
20
- /** The target window for the link. */
21
- target?: string;
22
- /** The relationship between the linked resource and the current page. */
23
- rel?: string;
24
- /** Handler that is called when the press is released over the target. */
25
- onPress?: (e: PressEvent) => void;
26
- /** Handler that is called when a press interaction starts. */
27
- onPressStart?: (e: PressEvent) => void;
28
- /** Handler that is called when a press interaction ends. */
29
- onPressEnd?: (e: PressEvent) => void;
30
- /** Handler that is called when the element is clicked. */
31
- onClick?: (e: MouseEvent) => void;
32
- /** Handler that is called when the element receives focus. */
33
- onFocus?: (e: FocusEvent) => void;
34
- /** Handler that is called when the element loses focus. */
35
- onBlur?: (e: FocusEvent) => void;
36
- /** Handler that is called when the element's focus status changes. */
37
- onFocusChange?: (isFocused: boolean) => void;
38
- /** Handler that is called when a key is pressed. */
39
- onKeyDown?: (e: KeyboardEvent) => void;
40
- /** Handler that is called when a key is released. */
41
- onKeyUp?: (e: KeyboardEvent) => void;
42
- /** Whether to autofocus the element. */
43
- autoFocus?: boolean;
44
- /** Indicates the current "page" or state within a set of related elements. */
45
- 'aria-current'?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false' | boolean;
46
- /** Defines a string value that labels the current element. */
47
- 'aria-label'?: string;
48
- /** Identifies the element (or elements) that labels the current element. */
49
- 'aria-labelledby'?: string;
50
- /** Identifies the element (or elements) that describes the object. */
51
- 'aria-describedby'?: string;
52
- }
53
- export interface LinkAria {
54
- /** Props for the link element. */
55
- linkProps: Record<string, unknown>;
56
- /** Whether the link is currently pressed. */
57
- isPressed: Accessor<boolean>;
58
- }
59
- /**
60
- * Provides the behavior and accessibility implementation for a link component.
61
- * A link allows a user to navigate to another page or resource within a web page
62
- * or application.
63
- */
64
- export declare function createLink(props?: MaybeAccessor<AriaLinkProps>): LinkAria;
65
- //# sourceMappingURL=createLink.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createLink.d.ts","sourceRoot":"","sources":["../../src/link/createLink.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKzC,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAM7D,MAAM,WAAW,aAAa;IAC5B,oCAAoC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,8DAA8D;IAC9D,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACvC,4DAA4D;IAC5D,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACrC,0DAA0D;IAC1D,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,8DAA8D;IAC9D,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,2DAA2D;IAC3D,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACjC,sEAAsE;IACtE,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,oDAAoD;IACpD,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IACvC,qDAAqD;IACrD,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IACrC,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;IAC7F,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sEAAsE;IACtE,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,QAAQ;IACvB,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,6CAA6C;IAC7C,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;CAC9B;AAMD;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,KAAK,GAAE,aAAa,CAAC,aAAa,CAAM,GACvC,QAAQ,CA8FV"}
@@ -1,2 +0,0 @@
1
- export { createLink, type AriaLinkProps, type LinkAria } from './createLink';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/link/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,aAAa,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC"}
@@ -1,47 +0,0 @@
1
- /**
2
- * ProgressBar hook for Solidaria
3
- *
4
- * Provides the accessibility implementation for a progress bar component.
5
- * Progress bars show either determinate or indeterminate progress of an operation
6
- * over time.
7
- *
8
- * This is a 1:1 port of @react-aria/progress's useProgressBar hook.
9
- */
10
- import { type MaybeAccessor } from '../utils/reactivity';
11
- export interface AriaProgressBarProps {
12
- /** The current value (controlled). */
13
- value?: number;
14
- /** The smallest value allowed for the input. @default 0 */
15
- minValue?: number;
16
- /** The largest value allowed for the input. @default 100 */
17
- maxValue?: number;
18
- /** The content to display as the value's label (e.g. 1 of 4). */
19
- valueLabel?: string;
20
- /** Whether presentation is indeterminate when progress isn't known. */
21
- isIndeterminate?: boolean;
22
- /** The display format of the value label. */
23
- formatOptions?: Intl.NumberFormatOptions;
24
- /** The content to display as the label. */
25
- label?: string;
26
- /** An accessibility label for this item. */
27
- 'aria-label'?: string;
28
- /** Identifies the element (or elements) that labels the current element. */
29
- 'aria-labelledby'?: string;
30
- /** Identifies the element (or elements) that describes the object. */
31
- 'aria-describedby'?: string;
32
- /** Identifies the element (or elements) that provide a detailed, extended description for the object. */
33
- 'aria-details'?: string;
34
- }
35
- export interface ProgressBarAria {
36
- /** Props for the progress bar container element. */
37
- progressBarProps: Record<string, unknown>;
38
- /** Props for the progress bar's visual label element (if any). */
39
- labelProps: Record<string, unknown>;
40
- }
41
- /**
42
- * Provides the accessibility implementation for a progress bar component.
43
- * Progress bars show either determinate or indeterminate progress of an operation
44
- * over time.
45
- */
46
- export declare function createProgressBar(props?: MaybeAccessor<AriaProgressBarProps>): ProgressBarAria;
47
- //# sourceMappingURL=createProgressBar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createProgressBar.d.ts","sourceRoot":"","sources":["../../src/progress/createProgressBar.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,qBAAqB,CAAC;AAMjE,MAAM,WAAW,oBAAoB;IACnC,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,6CAA6C;IAC7C,aAAa,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;IACzC,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sEAAsE;IACtE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yGAAyG;IACzG,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,oDAAoD;IACpD,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,kEAAkE;IAClE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAcD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,GAAE,aAAa,CAAC,oBAAoB,CAAM,GAC9C,eAAe,CAyDjB"}
@@ -1,2 +0,0 @@
1
- export { createProgressBar, type AriaProgressBarProps, type ProgressBarAria, } from './createProgressBar';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/progress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,KAAK,oBAAoB,EACzB,KAAK,eAAe,GACrB,MAAM,qBAAqB,CAAC"}
@@ -1,68 +0,0 @@
1
- /**
2
- * Radio hook for Solidaria
3
- *
4
- * Provides the behavior and accessibility implementation for an individual
5
- * radio button in a radio group.
6
- *
7
- * This is a 1:1 port of @react-aria/radio's useRadio hook.
8
- */
9
- import { JSX, Accessor } from 'solid-js';
10
- import { type MaybeAccessor } from '../utils/reactivity';
11
- import { type RadioGroupState } from '@proyecto-viviana/solid-stately';
12
- import { type PressEvent } from '../interactions/PressEvent';
13
- export interface AriaRadioProps {
14
- /** The value of the radio button, used when submitting an HTML form. */
15
- value: string;
16
- /** Whether the radio button is disabled. */
17
- isDisabled?: boolean;
18
- /** The label for the radio button. */
19
- children?: JSX.Element;
20
- /** Defines a string value that labels the current element. */
21
- 'aria-label'?: string;
22
- /** Identifies the element (or elements) that labels the current element. */
23
- 'aria-labelledby'?: string;
24
- /** Identifies the element (or elements) that describes the object. */
25
- 'aria-describedby'?: string;
26
- /** Handler that is called when the press is released over the target. */
27
- onPress?: (e: PressEvent) => void;
28
- /** Handler that is called when a press interaction starts. */
29
- onPressStart?: (e: PressEvent) => void;
30
- /** Handler that is called when a press interaction ends, either over the target or when the pointer leaves the target. */
31
- onPressEnd?: (e: PressEvent) => void;
32
- /** Handler that is called when the press state changes. */
33
- onPressChange?: (isPressed: boolean) => void;
34
- /** Handler that is called when a press is released over the target, regardless of whether it started on the target or not. */
35
- onPressUp?: (e: PressEvent) => void;
36
- /** Handler that is called when the element is clicked. */
37
- onClick?: (e: MouseEvent) => void;
38
- /** Handler that is called when the element receives focus. */
39
- onFocus?: (e: FocusEvent) => void;
40
- /** Handler that is called when the element loses focus. */
41
- onBlur?: (e: FocusEvent) => void;
42
- /** Handler that is called when the element's focus status changes. */
43
- onFocusChange?: (isFocused: boolean) => void;
44
- /** Handler that is called when a key is pressed. */
45
- onKeyDown?: (e: KeyboardEvent) => void;
46
- /** Handler that is called when a key is released. */
47
- onKeyUp?: (e: KeyboardEvent) => void;
48
- /** Whether to autofocus the element. */
49
- autoFocus?: boolean;
50
- }
51
- export interface RadioAria {
52
- /** Props for the label wrapper element. */
53
- labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;
54
- /** Props for the input element. */
55
- inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
56
- /** Whether the radio is disabled. */
57
- isDisabled: boolean;
58
- /** Whether the radio is currently selected. */
59
- isSelected: Accessor<boolean>;
60
- /** Whether the radio is in a pressed state. */
61
- isPressed: Accessor<boolean>;
62
- }
63
- /**
64
- * Provides the behavior and accessibility implementation for an individual
65
- * radio button in a radio group.
66
- */
67
- export declare function createRadio(props: MaybeAccessor<AriaRadioProps>, state: RadioGroupState, ref: () => HTMLInputElement | null): RadioAria;
68
- //# sourceMappingURL=createRadio.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createRadio.d.ts","sourceRoot":"","sources":["../../src/radio/createRadio.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAgB,MAAM,UAAU,CAAC;AAKvD,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,KAAK,eAAe,EAAyB,MAAM,iCAAiC,CAAC;AAE9F,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAM7D,MAAM,WAAW,cAAc;IAC7B,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sEAAsE;IACtE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yEAAyE;IACzE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,8DAA8D;IAC9D,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACvC,0HAA0H;IAC1H,UAAU,CAAC,EAAE,CAA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MAAM,gBAAgB,GAAG,IAAI,GACjC,SAAS,CAsMX"}
@@ -1,85 +0,0 @@
1
- /**
2
- * Radio group hook for Solidaria
3
- *
4
- * Provides the behavior and accessibility implementation for a radio group component.
5
- * Radio groups allow users to select a single item from a list of mutually exclusive options.
6
- *
7
- * This is a 1:1 port of @react-aria/radio's useRadioGroup hook.
8
- */
9
- import { JSX } from 'solid-js';
10
- import { type MaybeAccessor } from '../utils/reactivity';
11
- import { type RadioGroupState } from '@proyecto-viviana/solid-stately';
12
- export interface AriaRadioGroupProps {
13
- /** The content to display as the label. */
14
- label?: JSX.Element;
15
- /** A description for the radio group. Provides additional context. */
16
- description?: JSX.Element;
17
- /** An error message for the radio group. */
18
- errorMessage?: JSX.Element | ((validation: {
19
- isInvalid: boolean;
20
- validationErrors: string[];
21
- }) => JSX.Element);
22
- /** Whether the radio group is disabled. */
23
- isDisabled?: boolean;
24
- /** Whether the radio group is read only. */
25
- isReadOnly?: boolean;
26
- /** Whether the radio group is required. */
27
- isRequired?: boolean;
28
- /** Whether the radio group is invalid. */
29
- isInvalid?: boolean;
30
- /** The axis the Radio Button(s) should align with. Defaults to 'vertical'. */
31
- orientation?: 'horizontal' | 'vertical';
32
- /** The name of the radio group, used when submitting an HTML form. */
33
- name?: string;
34
- /** The form to associate the radio group with. */
35
- form?: string;
36
- /** Validation behavior for the radio group. */
37
- validationBehavior?: 'aria' | 'native';
38
- /** Handler that is called when the radio group receives focus. */
39
- onFocus?: (e: FocusEvent) => void;
40
- /** Handler that is called when the radio group loses focus. */
41
- onBlur?: (e: FocusEvent) => void;
42
- /** Handler that is called when the radio group's focus status changes. */
43
- onFocusChange?: (isFocused: boolean) => void;
44
- /** Defines a string value that labels the current element. */
45
- 'aria-label'?: string;
46
- /** Identifies the element (or elements) that labels the current element. */
47
- 'aria-labelledby'?: string;
48
- /** Identifies the element (or elements) that describes the object. */
49
- 'aria-describedby'?: string;
50
- /** Identifies the element (or elements) that provide an error message for the object. */
51
- 'aria-errormessage'?: string;
52
- /** The element's unique identifier. */
53
- id?: string;
54
- }
55
- export interface RadioGroupAria {
56
- /** Props for the radio group wrapper element. */
57
- radioGroupProps: JSX.HTMLAttributes<HTMLDivElement>;
58
- /** Props for the radio group's visible label (if any). */
59
- labelProps: JSX.HTMLAttributes<HTMLElement>;
60
- /** Props for the radio group description element, if any. */
61
- descriptionProps: JSX.HTMLAttributes<HTMLElement>;
62
- /** Props for the radio group error message element, if any. */
63
- errorMessageProps: JSX.HTMLAttributes<HTMLElement>;
64
- /** Whether the radio group is invalid. */
65
- isInvalid: boolean;
66
- /** Validation errors, if any. */
67
- validationErrors: string[];
68
- /** Validation details, if any. */
69
- validationDetails: Record<string, boolean>;
70
- }
71
- interface RadioGroupData {
72
- name: string;
73
- form: string | undefined;
74
- descriptionId: string | undefined;
75
- errorMessageId: string | undefined;
76
- validationBehavior: 'aria' | 'native';
77
- }
78
- export declare const radioGroupData: WeakMap<RadioGroupState, RadioGroupData>;
79
- /**
80
- * Provides the behavior and accessibility implementation for a radio group component.
81
- * Radio groups allow users to select a single item from a list of mutually exclusive options.
82
- */
83
- export declare function createRadioGroup(props: MaybeAccessor<AriaRadioGroupProps>, state: RadioGroupState): RadioGroupAria;
84
- export {};
85
- //# sourceMappingURL=createRadioGroup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createRadioGroup.d.ts","sourceRoot":"","sources":["../../src/radio/createRadioGroup.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAM/B,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvE,MAAM,WAAW,mBAAmB;IAClC,2CAA2C;IAC3C,KAAK,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACpB,sEAAsE;IACtE,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;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C,cAAc,CAAC,CAAC;IACpD,0DAA0D;IAC1D,UAAU,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC5C,6DAA6D;IAC7D,gBAAgB,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAClD,+DAA+D;IAC/D,iBAAiB,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IACnD,0CAA0C;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,iCAAiC;IACjC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,kCAAkC;IAClC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5C;AAGD,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,kBAAkB,EAAE,MAAM,GAAG,QAAQ,CAAC;CACvC;AAED,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,eAAe,EAAE,cAAc,CAAiB,CAAC;AAMtF;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,aAAa,CAAC,mBAAmB,CAAC,EACzC,KAAK,EAAE,eAAe,GACrB,cAAc,CAsFhB"}
@@ -1,77 +0,0 @@
1
- /**
2
- * Radio group state for Solidaria
3
- *
4
- * Provides state management for a radio group component.
5
- * Provides a name for the group, and manages selection and focus state.
6
- *
7
- * This is a 1:1 port of @react-stately/radio's useRadioGroupState.
8
- */
9
- import { Accessor } from 'solid-js';
10
- import { type MaybeAccessor } from '../utils/reactivity';
11
- export interface RadioGroupProps {
12
- /** The current selected value (controlled). */
13
- value?: string | null;
14
- /** The default selected value (uncontrolled). */
15
- defaultValue?: string | null;
16
- /** Handler that is called when the value changes. */
17
- onChange?: (value: string) => void;
18
- /** Whether the radio group is disabled. */
19
- isDisabled?: boolean;
20
- /** Whether the radio group is read only. */
21
- isReadOnly?: boolean;
22
- /** Whether the radio group is required. */
23
- isRequired?: boolean;
24
- /** Whether the radio group is invalid. */
25
- isInvalid?: boolean;
26
- /** The name of the radio group, used when submitting an HTML form. */
27
- name?: string;
28
- /** The form to associate the radio group with. */
29
- form?: string;
30
- /** The label for the radio group. */
31
- label?: string;
32
- /** Orientation of the radio group. */
33
- orientation?: 'horizontal' | 'vertical';
34
- /** Handler that is called when the radio group receives focus. */
35
- onFocus?: (e: FocusEvent) => void;
36
- /** Handler that is called when the radio group loses focus. */
37
- onBlur?: (e: FocusEvent) => void;
38
- /** Handler that is called when the radio group's focus status changes. */
39
- onFocusChange?: (isFocused: boolean) => void;
40
- }
41
- export interface RadioGroupState {
42
- /** The name for the group, used for native form submission. */
43
- readonly name: string;
44
- /** Whether the radio group is disabled. */
45
- readonly isDisabled: boolean;
46
- /** Whether the radio group is read only. */
47
- readonly isReadOnly: boolean;
48
- /** Whether the radio group is required. */
49
- readonly isRequired: boolean;
50
- /** Whether the radio group is invalid. */
51
- readonly isInvalid: boolean;
52
- /** The currently selected value. */
53
- readonly selectedValue: Accessor<string | null>;
54
- /** The default selected value. */
55
- readonly defaultSelectedValue: string | null;
56
- /** Sets the selected value. */
57
- setSelectedValue(value: string | null): void;
58
- /** The value of the last focused radio. */
59
- readonly lastFocusedValue: Accessor<string | null>;
60
- /** Sets the last focused value. */
61
- setLastFocusedValue(value: string | null): void;
62
- }
63
- /**
64
- * Internal WeakMap to store sync version accessors for each radio group state.
65
- * This is used by createRadio to trigger DOM sync when native radio behavior
66
- * causes the DOM checked state to desync from our reactive state.
67
- *
68
- * This is kept separate from RadioGroupState to maintain API parity with React-Aria.
69
- * @internal
70
- */
71
- export declare const radioGroupSyncVersion: WeakMap<RadioGroupState, Accessor<number>>;
72
- /**
73
- * Provides state management for a radio group component.
74
- * Provides a name for the group, and manages selection and focus state.
75
- */
76
- export declare function createRadioGroupState(props?: MaybeAccessor<RadioGroupProps>): RadioGroupState;
77
- //# sourceMappingURL=createRadioGroupState.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createRadioGroupState.d.ts","sourceRoot":"","sources":["../../src/radio/createRadioGroupState.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAgB,QAAQ,EAAW,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,qBAAqB,CAAC;AAOjE,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,qDAAqD;IACrD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,2CAA2C;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2CAA2C;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,kEAAkE;IAClE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,+DAA+D;IAC/D,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IACjC,0EAA0E;IAC1E,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAED,MAAM,WAAW,eAAe;IAC9B,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,2CAA2C;IAC3C,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B,4CAA4C;IAC5C,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B,2CAA2C;IAC3C,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAE7B,0CAA0C;IAC1C,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAE5B,oCAAoC;IACpC,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAEhD,kCAAkC;IAClC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7C,+BAA+B;IAC/B,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAE7C,2CAA2C;IAC3C,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAEnD,mCAAmC;IACnC,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;CACjD;AAMD;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,EAAE,OAAO,CAAC,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAiB,CAAC;AAM/F;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,GAAE,aAAa,CAAC,eAAe,CAAM,GACzC,eAAe,CAgGjB"}
@@ -1,4 +0,0 @@
1
- export { createRadioGroupState, radioGroupSyncVersion, type RadioGroupProps, type RadioGroupState, } from '@proyecto-viviana/solid-stately';
2
- export { createRadioGroup, radioGroupData, type AriaRadioGroupProps, type RadioGroupAria, } from './createRadioGroup';
3
- export { createRadio, type AriaRadioProps, type RadioAria, } from './createRadio';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/radio/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,cAAc,GACpB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,WAAW,EACX,KAAK,cAAc,EACnB,KAAK,SAAS,GACf,MAAM,eAAe,CAAC"}
@@ -1,38 +0,0 @@
1
- /**
2
- * createSeparator - SolidJS implementation of React Aria's useSeparator
3
- *
4
- * A separator is a visual divider between two groups of content,
5
- * e.g. groups of menu items or sections of a page.
6
- */
7
- import type { JSX } from 'solid-js';
8
- import { type MaybeAccessor } from '../utils';
9
- export type Orientation = 'horizontal' | 'vertical';
10
- export interface AriaSeparatorProps {
11
- /**
12
- * The orientation of the separator.
13
- * @default 'horizontal'
14
- */
15
- orientation?: Orientation;
16
- /**
17
- * The HTML element type that will be used to render the separator.
18
- * @default 'hr'
19
- */
20
- elementType?: string;
21
- /** An accessibility label for the separator. */
22
- 'aria-label'?: string;
23
- /** Identifies the element(s) that labels the separator. */
24
- 'aria-labelledby'?: string;
25
- /** The element's unique identifier. */
26
- id?: string;
27
- }
28
- export interface SeparatorAria {
29
- /** Props for the separator element. */
30
- separatorProps: JSX.HTMLAttributes<HTMLElement>;
31
- }
32
- /**
33
- * Provides the accessibility implementation for a separator.
34
- * A separator is a visual divider between two groups of content,
35
- * e.g. groups of menu items or sections of a page.
36
- */
37
- export declare function createSeparator(props?: MaybeAccessor<AriaSeparatorProps>): SeparatorAria;
38
- //# sourceMappingURL=createSeparator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createSeparator.d.ts","sourceRoot":"","sources":["../../src/separator/createSeparator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAU,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAOtD,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,cAAc,EAAE,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;CACjD;AAMD;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,KAAK,GAAE,aAAa,CAAC,kBAAkB,CAAM,GAC5C,aAAa,CA6Bf"}
@@ -1,2 +0,0 @@
1
- export { createSeparator, type AriaSeparatorProps, type SeparatorAria, type Orientation, } from './createSeparator';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/separator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,WAAW,GACjB,MAAM,mBAAmB,CAAC"}
@@ -1,24 +0,0 @@
1
- /**
2
- * SSR utilities for Solidaria
3
- *
4
- * SolidJS has built-in SSR support with `isServer` and `createUniqueId()`.
5
- * These utilities provide a consistent API matching React-Aria's patterns.
6
- */
7
- /**
8
- * Returns whether the component is currently being server side rendered.
9
- * Can be used to delay browser-specific rendering until after hydration.
10
- */
11
- export declare function createIsSSR(): boolean;
12
- /**
13
- * Generate a unique ID that is stable across server and client.
14
- * Uses SolidJS's built-in createUniqueId which handles SSR correctly.
15
- *
16
- * @param defaultId - Optional default ID to use instead of generating one.
17
- */
18
- export declare function createId(defaultId?: string): string;
19
- /**
20
- * Check if we can use DOM APIs.
21
- * This is useful for code that needs to run only in the browser.
22
- */
23
- export declare const canUseDOM: boolean;
24
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ssr/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAKnD;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,SAAY,CAAC"}
@@ -1,34 +0,0 @@
1
- /**
2
- * Switch hook for Solidaria
3
- *
4
- * Provides the behavior and accessibility implementation for a switch component.
5
- * A switch is similar to a checkbox, but represents on/off values as opposed to selection.
6
- *
7
- * This is a 1:1 port of @react-aria/switch's useSwitch hook.
8
- */
9
- import { JSX, Accessor } from 'solid-js';
10
- import { type AriaToggleProps } from '../toggle/createToggle';
11
- import { type ToggleState } from '@proyecto-viviana/solid-stately';
12
- import { type MaybeAccessor } from '../utils/reactivity';
13
- export interface AriaSwitchProps extends AriaToggleProps {
14
- }
15
- export interface SwitchAria {
16
- /** Props for the label wrapper element. */
17
- labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;
18
- /** Props for the input element. */
19
- inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
20
- /** Whether the switch is selected. */
21
- isSelected: Accessor<boolean>;
22
- /** Whether the switch is in a pressed state. */
23
- isPressed: Accessor<boolean>;
24
- /** Whether the switch is disabled. */
25
- isDisabled: boolean;
26
- /** Whether the switch is read only. */
27
- isReadOnly: boolean;
28
- }
29
- /**
30
- * Provides the behavior and accessibility implementation for a switch component.
31
- * A switch is similar to a checkbox, but represents on/off values as opposed to selection.
32
- */
33
- export declare function createSwitch(props: MaybeAccessor<AriaSwitchProps>, state: ToggleState, ref: () => HTMLInputElement | null): SwitchAria;
34
- //# sourceMappingURL=createSwitch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createSwitch.d.ts","sourceRoot":"","sources":["../../src/switch/createSwitch.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAgB,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAMzD,MAAM,WAAW,eAAgB,SAAQ,eAAe;CAEvD;AAED,MAAM,WAAW,UAAU;IACzB,2CAA2C;IAC3C,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACtD,mCAAmC;IACnC,UAAU,EAAE,GAAG,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACtD,sCAAsC;IACtC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC9B,gDAAgD;IAChD,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC7B,sCAAsC;IACtC,UAAU,EAAE,OAAO,CAAC;IACpB,uCAAuC;IACvC,UAAU,EAAE,OAAO,CAAC;CACrB;AAMD;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,aAAa,CAAC,eAAe,CAAC,EACrC,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,MAAM,gBAAgB,GAAG,IAAI,GACjC,UAAU,CAoBZ"}
@@ -1,2 +0,0 @@
1
- export { createSwitch, type AriaSwitchProps, type SwitchAria } from './createSwitch';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,73 +0,0 @@
1
- /**
2
- * TextField hook for Solidaria
3
- *
4
- * Provides the behavior and accessibility implementation for a text field.
5
- *
6
- * This is a 1:1 port of @react-aria/textfield's useTextField hook.
7
- */
8
- import { JSX } from 'solid-js';
9
- import { type AriaFieldProps, type FieldAria } from '../label';
10
- import { type FocusableProps } from '../interactions';
11
- import { type MaybeAccessor } from '../utils/reactivity';
12
- export interface AriaTextFieldProps extends AriaFieldProps, FocusableProps {
13
- /** The current value (controlled). */
14
- value?: string;
15
- /** The default value (uncontrolled). */
16
- defaultValue?: string;
17
- /** Handler that is called when the value changes. */
18
- onChange?: (value: string) => void;
19
- /** Whether the input is disabled. */
20
- isDisabled?: boolean;
21
- /** Whether the input is read only. */
22
- isReadOnly?: boolean;
23
- /** Whether the input is required. */
24
- isRequired?: boolean;
25
- /** The type of input to render. */
26
- type?: 'text' | 'search' | 'url' | 'tel' | 'email' | 'password' | string;
27
- /** The input mode hint for virtual keyboards. */
28
- inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
29
- /** The name of the input element, used when submitting an HTML form. */
30
- name?: string;
31
- /** Regex pattern to validate the input value. */
32
- pattern?: string;
33
- /** The maximum number of characters supported by the input. */
34
- maxLength?: number;
35
- /** The minimum number of characters required by the input. */
36
- minLength?: number;
37
- /** Placeholder text for the input. */
38
- placeholder?: string;
39
- /** Whether to enable auto complete. */
40
- autoComplete?: string;
41
- /** Whether to enable auto correct. */
42
- autoCorrect?: string;
43
- /** Whether to enable spell check. */
44
- spellCheck?: 'true' | 'false';
45
- /** Controls whether and how text input is automatically capitalized. */
46
- autoCapitalize?: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
47
- /** The element type to use for the input. Defaults to 'input'. */
48
- inputElementType?: 'input' | 'textarea';
49
- onCopy?: JSX.EventHandler<HTMLInputElement | HTMLTextAreaElement, ClipboardEvent>;
50
- onCut?: JSX.EventHandler<HTMLInputElement | HTMLTextAreaElement, ClipboardEvent>;
51
- onPaste?: JSX.EventHandler<HTMLInputElement | HTMLTextAreaElement, ClipboardEvent>;
52
- onCompositionStart?: JSX.EventHandler<HTMLInputElement | HTMLTextAreaElement, CompositionEvent>;
53
- onCompositionEnd?: JSX.EventHandler<HTMLInputElement | HTMLTextAreaElement, CompositionEvent>;
54
- onCompositionUpdate?: JSX.EventHandler<HTMLInputElement | HTMLTextAreaElement, CompositionEvent>;
55
- onSelect?: JSX.EventHandler<HTMLInputElement | HTMLTextAreaElement, Event>;
56
- onBeforeInput?: JSX.EventHandler<HTMLInputElement | HTMLTextAreaElement, InputEvent>;
57
- onInput?: JSX.EventHandler<HTMLInputElement | HTMLTextAreaElement, InputEvent>;
58
- }
59
- export interface TextFieldAria<T extends HTMLInputElement | HTMLTextAreaElement = HTMLInputElement> extends Omit<FieldAria, 'fieldProps'> {
60
- /** Props for the input element. */
61
- inputProps: JSX.InputHTMLAttributes<T>;
62
- /** Whether the text field is invalid. */
63
- isInvalid: boolean;
64
- }
65
- /**
66
- * Provides the behavior and accessibility implementation for a text field.
67
- * Text fields allow users to input text with a keyboard.
68
- *
69
- * @param props - Props for the text field.
70
- * @param ref - Optional ref callback for the input element.
71
- */
72
- export declare function createTextField<T extends HTMLInputElement | HTMLTextAreaElement = HTMLInputElement>(props: MaybeAccessor<AriaTextFieldProps>, ref?: (el: T) => void): TextFieldAria<T>;
73
- //# sourceMappingURL=createTextField.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createTextField.d.ts","sourceRoot":"","sources":["../../src/textfield/createTextField.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAe,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,iB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MG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,gBAAgB,GAAG,mBAAmB,GAAG,gBAAgB,EACjG,KAAK,EAAE,aAAa,CAAC,kBAAkB,CAAC,EACxC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,GACpB,aAAa,CAAC,CAAC,CAAC,CAsGlB"}
@@ -1,2 +0,0 @@
1
- export { createTextField, type AriaTextFieldProps, type TextFieldAria, } from './createTextField';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/textfield/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,KAAK,kBAAkB,EACvB,KAAK,aAAa,GACnB,MAAM,mBAAmB,CAAC"}