@proyecto-viviana/solidaria 0.0.3 → 0.0.4

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/button/createButton.d.ts +29 -0
  2. package/dist/button/createButton.d.ts.map +1 -0
  3. package/dist/button/createToggleButton.d.ts +41 -0
  4. package/dist/button/createToggleButton.d.ts.map +1 -0
  5. package/dist/button/index.d.ts +5 -0
  6. package/dist/button/index.d.ts.map +1 -0
  7. package/dist/button/types.d.ts +66 -0
  8. package/dist/button/types.d.ts.map +1 -0
  9. package/dist/checkbox/createCheckbox.d.ts +56 -0
  10. package/dist/checkbox/createCheckbox.d.ts.map +1 -0
  11. package/dist/checkbox/createCheckboxGroup.d.ts +53 -0
  12. package/dist/checkbox/createCheckboxGroup.d.ts.map +1 -0
  13. package/dist/checkbox/createCheckboxGroupItem.d.ts +25 -0
  14. package/dist/checkbox/createCheckboxGroupItem.d.ts.map +1 -0
  15. package/dist/checkbox/createCheckboxGroupState.d.ts +71 -0
  16. package/dist/checkbox/createCheckboxGroupState.d.ts.map +1 -0
  17. package/dist/checkbox/index.d.ts +9 -0
  18. package/dist/checkbox/index.d.ts.map +1 -0
  19. package/dist/index.d.ts +15 -1214
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +324 -151
  22. package/dist/index.js.map +1 -0
  23. package/dist/interactions/FocusableProvider.d.ts +26 -0
  24. package/dist/interactions/FocusableProvider.d.ts.map +1 -0
  25. package/dist/interactions/PressEvent.d.ts +63 -0
  26. package/dist/interactions/PressEvent.d.ts.map +1 -0
  27. package/dist/interactions/createFocus.d.ts +31 -0
  28. package/dist/interactions/createFocus.d.ts.map +1 -0
  29. package/dist/interactions/createFocusRing.d.ts +37 -0
  30. package/dist/interactions/createFocusRing.d.ts.map +1 -0
  31. package/dist/interactions/createFocusWithin.d.ts +27 -0
  32. package/dist/interactions/createFocusWithin.d.ts.map +1 -0
  33. package/dist/interactions/createFocusable.d.ts +65 -0
  34. package/dist/interactions/createFocusable.d.ts.map +1 -0
  35. package/dist/interactions/createHover.d.ts +41 -0
  36. package/dist/interactions/createHover.d.ts.map +1 -0
  37. package/dist/interactions/createKeyboard.d.ts +35 -0
  38. package/dist/interactions/createKeyboard.d.ts.map +1 -0
  39. package/dist/interactions/createPress.d.ts +49 -0
  40. package/dist/interactions/createPress.d.ts.map +1 -0
  41. package/dist/interactions/index.d.ts +10 -0
  42. package/dist/interactions/index.d.ts.map +1 -0
  43. package/dist/label/createField.d.ts +51 -0
  44. package/dist/label/createField.d.ts.map +1 -0
  45. package/dist/label/createLabel.d.ts +49 -0
  46. package/dist/label/createLabel.d.ts.map +1 -0
  47. package/dist/label/createLabels.d.ts +16 -0
  48. package/dist/label/createLabels.d.ts.map +1 -0
  49. package/dist/label/index.d.ts +6 -0
  50. package/dist/label/index.d.ts.map +1 -0
  51. package/dist/link/createLink.d.ts +65 -0
  52. package/dist/link/createLink.d.ts.map +1 -0
  53. package/dist/link/index.d.ts +2 -0
  54. package/dist/link/index.d.ts.map +1 -0
  55. package/dist/progress/createProgressBar.d.ts +47 -0
  56. package/dist/progress/createProgressBar.d.ts.map +1 -0
  57. package/dist/progress/index.d.ts +2 -0
  58. package/dist/progress/index.d.ts.map +1 -0
  59. package/dist/radio/createRadio.d.ts +68 -0
  60. package/dist/radio/createRadio.d.ts.map +1 -0
  61. package/dist/radio/createRadioGroup.d.ts +85 -0
  62. package/dist/radio/createRadioGroup.d.ts.map +1 -0
  63. package/dist/radio/createRadioGroupState.d.ts +77 -0
  64. package/dist/radio/createRadioGroupState.d.ts.map +1 -0
  65. package/dist/radio/index.d.ts +4 -0
  66. package/dist/radio/index.d.ts.map +1 -0
  67. package/dist/separator/createSeparator.d.ts +38 -0
  68. package/dist/separator/createSeparator.d.ts.map +1 -0
  69. package/dist/separator/index.d.ts +2 -0
  70. package/dist/separator/index.d.ts.map +1 -0
  71. package/dist/ssr/index.d.ts +24 -0
  72. package/dist/ssr/index.d.ts.map +1 -0
  73. package/dist/switch/createSwitch.d.ts +34 -0
  74. package/dist/switch/createSwitch.d.ts.map +1 -0
  75. package/dist/switch/index.d.ts +2 -0
  76. package/dist/switch/index.d.ts.map +1 -0
  77. package/dist/textfield/createTextField.d.ts +73 -0
  78. package/dist/textfield/createTextField.d.ts.map +1 -0
  79. package/dist/textfield/index.d.ts +2 -0
  80. package/dist/textfield/index.d.ts.map +1 -0
  81. package/dist/toggle/createToggle.d.ts +94 -0
  82. package/dist/toggle/createToggle.d.ts.map +1 -0
  83. package/dist/toggle/createToggleState.d.ts +34 -0
  84. package/dist/toggle/createToggleState.d.ts.map +1 -0
  85. package/dist/toggle/index.d.ts +5 -0
  86. package/dist/toggle/index.d.ts.map +1 -0
  87. package/dist/utils/dom.d.ts +51 -0
  88. package/dist/utils/dom.d.ts.map +1 -0
  89. package/dist/utils/events.d.ts +29 -0
  90. package/dist/utils/events.d.ts.map +1 -0
  91. package/dist/utils/filterDOMProps.d.ts +29 -0
  92. package/dist/utils/filterDOMProps.d.ts.map +1 -0
  93. package/dist/utils/focus.d.ts +20 -0
  94. package/dist/utils/focus.d.ts.map +1 -0
  95. package/dist/utils/geometry.d.ts +40 -0
  96. package/dist/utils/geometry.d.ts.map +1 -0
  97. package/dist/utils/globalListeners.d.ts +36 -0
  98. package/dist/utils/globalListeners.d.ts.map +1 -0
  99. package/dist/utils/index.d.ts +11 -0
  100. package/dist/utils/index.d.ts.map +1 -0
  101. package/dist/utils/mergeProps.d.ts +8 -0
  102. package/dist/utils/mergeProps.d.ts.map +1 -0
  103. package/dist/utils/platform.d.ts +14 -0
  104. package/dist/utils/platform.d.ts.map +1 -0
  105. package/dist/utils/reactivity.d.ts +28 -0
  106. package/dist/utils/reactivity.d.ts.map +1 -0
  107. package/dist/utils/textSelection.d.ts +19 -0
  108. package/dist/utils/textSelection.d.ts.map +1 -0
  109. package/package.json +52 -53
  110. package/dist/index.jsx +0 -2717
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Toggle hook for Solidaria
3
+ *
4
+ * Handles interactions for toggle elements, e.g. Checkboxes and Switches.
5
+ *
6
+ * This is a 1:1 port of @react-aria/toggle's useToggle hook.
7
+ */
8
+ import { JSX, Accessor } from 'solid-js';
9
+ import { type MaybeAccessor } from '../utils/reactivity';
10
+ import { type ToggleState } from '@proyecto-viviana/solid-stately';
11
+ import { type PressEvent } from '../interactions/PressEvent';
12
+ export interface AriaToggleProps {
13
+ /** Whether the element should be selected (controlled). */
14
+ isSelected?: boolean;
15
+ /** Whether the element should be selected by default (uncontrolled). */
16
+ defaultSelected?: boolean;
17
+ /** Handler that is called when the element's selection state changes. */
18
+ onChange?: (isSelected: boolean) => void;
19
+ /** The value of the input element, used when submitting an HTML form. */
20
+ value?: string;
21
+ /** The name of the input element, used when submitting an HTML form. */
22
+ name?: string;
23
+ /** The form to associate the input with. */
24
+ form?: string;
25
+ /** Whether the element is disabled. */
26
+ isDisabled?: boolean;
27
+ /** Whether the element is read only. */
28
+ isReadOnly?: boolean;
29
+ /** Whether the element is required. */
30
+ isRequired?: boolean;
31
+ /** Whether the element is invalid. */
32
+ isInvalid?: boolean;
33
+ /** The element's children. */
34
+ children?: JSX.Element;
35
+ /** Defines a string value that labels the current element. */
36
+ 'aria-label'?: string;
37
+ /** Identifies the element (or elements) that labels the current element. */
38
+ 'aria-labelledby'?: string;
39
+ /** Identifies the element (or elements) that describes the object. */
40
+ 'aria-describedby'?: string;
41
+ /** Identifies the element (or elements) that provide an error message for the object. */
42
+ 'aria-errormessage'?: string;
43
+ /** Identifies the element (or elements) whose contents or presence are controlled by the current element. */
44
+ 'aria-controls'?: string;
45
+ /** The element's unique identifier. */
46
+ id?: string;
47
+ /** Handler that is called when the press is released over the target. */
48
+ onPress?: (e: PressEvent) => void;
49
+ /** Handler that is called when a press interaction starts. */
50
+ onPressStart?: (e: PressEvent) => void;
51
+ /** Handler that is called when a press interaction ends, either over the target or when the pointer leaves the target. */
52
+ onPressEnd?: (e: PressEvent) => void;
53
+ /** Handler that is called when the press state changes. */
54
+ onPressChange?: (isPressed: boolean) => void;
55
+ /** Handler that is called when a press is released over the target, regardless of whether it started on the target or not. */
56
+ onPressUp?: (e: PressEvent) => void;
57
+ /** Handler that is called when the element is clicked. */
58
+ onClick?: (e: MouseEvent) => void;
59
+ /** Handler that is called when the element receives focus. */
60
+ onFocus?: (e: FocusEvent) => void;
61
+ /** Handler that is called when the element loses focus. */
62
+ onBlur?: (e: FocusEvent) => void;
63
+ /** Handler that is called when the element's focus status changes. */
64
+ onFocusChange?: (isFocused: boolean) => void;
65
+ /** Handler that is called when a key is pressed. */
66
+ onKeyDown?: (e: KeyboardEvent) => void;
67
+ /** Handler that is called when a key is released. */
68
+ onKeyUp?: (e: KeyboardEvent) => void;
69
+ /** Whether to exclude the element from the tab order. */
70
+ excludeFromTabOrder?: boolean;
71
+ /** Whether to autofocus the element. */
72
+ autoFocus?: boolean;
73
+ }
74
+ export interface ToggleAria {
75
+ /** Props to be spread on the label element. */
76
+ labelProps: JSX.LabelHTMLAttributes<HTMLLabelElement>;
77
+ /** Props to be spread on the input element. */
78
+ inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
79
+ /** Whether the toggle is selected. */
80
+ isSelected: Accessor<boolean>;
81
+ /** Whether the toggle is in a pressed state. */
82
+ isPressed: Accessor<boolean>;
83
+ /** Whether the toggle is disabled. */
84
+ isDisabled: boolean;
85
+ /** Whether the toggle is read only. */
86
+ isReadOnly: boolean;
87
+ /** Whether the toggle is invalid. */
88
+ isInvalid: boolean;
89
+ }
90
+ /**
91
+ * Handles interactions for toggle elements, e.g. Checkboxes and Switches.
92
+ */
93
+ export declare function createToggle(props: MaybeAccessor<AriaToggleProps>, state: ToggleState, ref: () => HTMLInputElement | null): ToggleAria;
94
+ //# sourceMappingURL=createToggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createToggle.d.ts","sourceRoot":"","sources":["../../src/toggle/createToggle.ts"],"names":[],"mappings":"AAAA;;;;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,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC7B,sCAAsC;IACtC,UAAU,EAAE,OAAO,CAAC;IACpB,uCAAuC;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,SAAS,EAAE,OAAO,CAAC;CACpB;AAMD;;GAEG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,aAAa,CAAC,eAAe,CAAC,EACrC,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,MAAM,gBAAgB,GAAG,IAAI,GACjC,UAAU,CA6GZ"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Toggle state for Solidaria
3
+ *
4
+ * Provides state management for toggle components like checkboxes and switches.
5
+ *
6
+ * This is a 1:1 port of @react-stately/toggle's useToggleState.
7
+ */
8
+ import { Accessor } from 'solid-js';
9
+ import { type MaybeAccessor } from '../utils/reactivity';
10
+ export interface ToggleStateOptions {
11
+ /** Whether the element should be selected (controlled). */
12
+ isSelected?: boolean;
13
+ /** Whether the element should be selected by default (uncontrolled). */
14
+ defaultSelected?: boolean;
15
+ /** Handler that is called when the element's selection state changes. */
16
+ onChange?: (isSelected: boolean) => void;
17
+ /** Whether the element is read only. */
18
+ isReadOnly?: boolean;
19
+ }
20
+ export interface ToggleState {
21
+ /** Whether the toggle is selected. */
22
+ readonly isSelected: Accessor<boolean>;
23
+ /** Whether the toggle is selected by default. */
24
+ readonly defaultSelected: boolean;
25
+ /** Updates selection state. */
26
+ setSelected(isSelected: boolean): void;
27
+ /** Toggle the selection state. */
28
+ toggle(): void;
29
+ }
30
+ /**
31
+ * Provides state management for toggle components like checkboxes and switches.
32
+ */
33
+ export declare function createToggleState(props?: MaybeAccessor<ToggleStateOptions>): ToggleState;
34
+ //# sourceMappingURL=createToggleState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createToggleState.d.ts","sourceRoot":"","sources":["../../src/toggle/createToggleState.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAgB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,KAAK,aAAa,EAAU,MAAM,qBAAqB,CAAC;AAMjE,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wEAAwE;IACxE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yEAAyE;IACzE,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,sCAAsC;IACtC,QAAQ,CAAC,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IACvC,iDAAiD;IACjD,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,+BAA+B;IAC/B,WAAW,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IACvC,kCAAkC;IAClC,MAAM,IAAI,IAAI,CAAC;CAChB;AAMD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,GAAE,aAAa,CAAC,kBAAkB,CAAM,GAAG,WAAW,CAiD5F"}
@@ -0,0 +1,5 @@
1
+ export { createToggleState } from '@proyecto-viviana/solid-stately';
2
+ export type { ToggleStateOptions, ToggleState } from '@proyecto-viviana/solid-stately';
3
+ export { createToggle } from './createToggle';
4
+ export type { AriaToggleProps, ToggleAria } from './createToggle';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/toggle/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,YAAY,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAGvF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * DOM utilities for cross-browser compatibility.
3
+ * Based on @react-aria/utils DOM utilities.
4
+ */
5
+ /**
6
+ * Gets the owner document of an element, or the global document.
7
+ */
8
+ export declare function getOwnerDocument(el: Element | null | undefined): Document;
9
+ /**
10
+ * Gets the owner window of an element, or the global window.
11
+ */
12
+ export declare function getOwnerWindow(el: Element | null | undefined): Window & typeof globalThis;
13
+ /**
14
+ * Cross-browser implementation of Node.contains that works with ShadowDOM.
15
+ * In Safari, Node.contains doesn't properly detect elements inside shadow roots.
16
+ */
17
+ export declare function nodeContains(parent: Node | null, child: Node | null): boolean;
18
+ /**
19
+ * Gets the event target, handling composed path for shadow DOM.
20
+ */
21
+ export declare function getEventTarget<T extends EventTarget>(event: Event): T | null;
22
+ /**
23
+ * Checks if an element is a valid focusable element.
24
+ */
25
+ export declare function isFocusable(element: Element): boolean;
26
+ /**
27
+ * Checks if a keyboard event should trigger the default action (like clicking).
28
+ */
29
+ export declare function isValidKeyboardEvent(event: KeyboardEvent, currentTarget: Element): boolean;
30
+ /**
31
+ * Checks if a key is valid for a specific input type.
32
+ */
33
+ export declare function isValidInputKey(target: HTMLInputElement, key: string): boolean;
34
+ /**
35
+ * Checks if an element is an HTML anchor link (has href attribute).
36
+ */
37
+ export declare function isHTMLAnchorLink(target: Element): boolean;
38
+ /**
39
+ * Whether to prevent default on keyboard events for this element.
40
+ */
41
+ export declare function shouldPreventDefaultKeyboard(target: Element, key: string): boolean;
42
+ /**
43
+ * Whether to prevent default on pointer up for this element.
44
+ */
45
+ export declare function shouldPreventDefaultUp(target: Element): boolean;
46
+ /**
47
+ * Opens a link, supporting both same-window and new-window navigation.
48
+ * Used for keyboard activation of links with Space key (which doesn't natively open links).
49
+ */
50
+ export declare function openLink(target: HTMLAnchorElement, event: Event, allowOpener?: boolean): void;
51
+ //# sourceMappingURL=dom.d.ts.map
@@ -0,0 +1 @@
1
+ {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 * Event utilities for detecting virtual clicks and event handling.
3
+ * Based on @react-aria/utils event utilities.
4
+ */
5
+ /**
6
+ * Checks if a click event was generated from a virtual source like a screen reader.
7
+ * Virtual clicks typically have detail of 0 and may have zero coordinates.
8
+ */
9
+ export declare function isVirtualClick(event: MouseEvent | PointerEvent): boolean;
10
+ /**
11
+ * Checks if a pointer event was generated by a virtual source.
12
+ * iOS VoiceOver fires pointer events with incorrect coordinates.
13
+ * These events have zero width/height.
14
+ */
15
+ export declare function isVirtualPointerEvent(event: PointerEvent): boolean;
16
+ /**
17
+ * Creates a synthetic mouse event for programmatic clicking.
18
+ */
19
+ export declare function createMouseEvent(type: string, nativeEvent?: Event): MouseEvent;
20
+ /**
21
+ * Creates a chain of event handlers that calls each in sequence.
22
+ */
23
+ export declare function chain<T extends (...args: any[]) => any>(...callbacks: (T | undefined | null)[]): T;
24
+ /**
25
+ * Sets the target property on an event object.
26
+ * Used for synthetic events where target needs to be modified.
27
+ */
28
+ export declare function setEventTarget<T extends Event>(event: T, target: EventTarget): void;
29
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/utils/events.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,YAAY,GAAG,OAAO,CAgBxE;AAcD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAalE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,KAAK,GAAG,UAAU,CAwB9E;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACrD,GAAG,SAAS,EAAE,CAAC,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,EAAE,GACrC,CAAC,CAQH;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAWnF"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * filterDOMProps for Solidaria
3
+ *
4
+ * Filters out all props that aren't valid DOM props.
5
+ * This is a 1:1 port of @react-aria/utils filterDOMProps.
6
+ */
7
+ export interface FilterDOMPropsOptions {
8
+ /**
9
+ * If labelling associated aria properties should be included in the filter.
10
+ */
11
+ labelable?: boolean;
12
+ /** Whether the element is a link and should include DOM props for <a> elements. */
13
+ isLink?: boolean;
14
+ /** Whether to include global DOM attributes. */
15
+ global?: boolean;
16
+ /** Whether to include DOM events. */
17
+ events?: boolean;
18
+ /**
19
+ * A Set of other property names that should be included in the filter.
20
+ */
21
+ propNames?: Set<string>;
22
+ }
23
+ /**
24
+ * Filters out all props that aren't valid DOM props or defined via override prop obj.
25
+ * @param props - The component props to be filtered.
26
+ * @param opts - Props to override.
27
+ */
28
+ export declare function filterDOMProps(props: Record<string, unknown>, opts?: FilterDOMPropsOptions): Record<string, unknown>;
29
+ //# sourceMappingURL=filterDOMProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filterDOMProps.d.ts","sourceRoot":"","sources":["../../src/utils/filterDOMProps.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA+DH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mFAAmF;IACnF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gDAAgD;IAChD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qCAAqC;IACrC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,IAAI,GAAE,qBAA0B,GAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBzB"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Focus management utilities.
3
+ * Based on @react-aria/utils focus utilities.
4
+ */
5
+ /**
6
+ * Focuses an element without scrolling the page.
7
+ * Uses preventScroll option with fallback for older browsers.
8
+ */
9
+ export declare function focusWithoutScrolling(element: HTMLElement | null): void;
10
+ /**
11
+ * Prevents focus from moving to a new element temporarily.
12
+ * Used when clicking on a button that shouldn't steal focus.
13
+ */
14
+ export declare function preventFocus(target: Element): void;
15
+ /**
16
+ * Safely focuses an element, alias for focusWithoutScrolling.
17
+ * This matches the react-aria focusSafely function name.
18
+ */
19
+ export declare const focusSafely: typeof focusWithoutScrolling;
20
+ //# sourceMappingURL=focus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../src/utils/focus.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI,CAwBvE;AAqCD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAiDlD;AAqBD;;;GAGG;AACH,eAAO,MAAM,WAAW,8BAAwB,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Geometry utilities for pointer/touch hit testing.
3
+ * Based on @react-aria/interactions geometry utilities.
4
+ */
5
+ export interface Rect {
6
+ top: number;
7
+ right: number;
8
+ bottom: number;
9
+ left: number;
10
+ }
11
+ export interface EventPoint {
12
+ clientX: number;
13
+ clientY: number;
14
+ width?: number;
15
+ height?: number;
16
+ radiusX?: number;
17
+ radiusY?: number;
18
+ }
19
+ /**
20
+ * Checks if two rectangles overlap.
21
+ */
22
+ export declare function areRectanglesOverlapping(a: Rect, b: Rect): boolean;
23
+ /**
24
+ * Gets the bounding rectangle for an event point (touch/pointer).
25
+ * Takes into account the size of the touch point.
26
+ */
27
+ export declare function getPointClientRect(point: EventPoint): Rect;
28
+ /**
29
+ * Checks if a pointer/touch point is over an element.
30
+ */
31
+ export declare function isPointOverTarget(point: EventPoint, target: Element): boolean;
32
+ /**
33
+ * Gets the first touch from a TouchEvent's targetTouches.
34
+ */
35
+ export declare function getTouchFromEvent(event: TouchEvent): Touch | null;
36
+ /**
37
+ * Finds a touch by its identifier in changedTouches.
38
+ */
39
+ export declare function getTouchById(event: TouchEvent, pointerId: number | null): Touch | null;
40
+ //# sourceMappingURL=geometry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../src/utils/geometry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,IAAI;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,OAAO,CAYlE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAwB1D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAa7E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,GAAG,IAAI,CAMjE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,CActF"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Global listener management utility.
3
+ * Based on @react-aria/utils useGlobalListeners hook, adapted for SolidJS.
4
+ *
5
+ * In SolidJS, we use onCleanup for automatic cleanup instead of useEffect return.
6
+ */
7
+ export interface GlobalListenerOptions extends AddEventListenerOptions {
8
+ /** Whether to add the listener to the window instead of document */
9
+ isWindow?: boolean;
10
+ }
11
+ /**
12
+ * Creates a manager for global event listeners that automatically cleans up.
13
+ * Use this in a component to register document/window level listeners
14
+ * that will be removed when the component unmounts.
15
+ */
16
+ export declare function createGlobalListeners(): {
17
+ addGlobalListener: {
18
+ <K extends keyof DocumentEventMap>(type: K, handler: (ev: DocumentEventMap[K]) => void, options?: GlobalListenerOptions): void;
19
+ <K extends keyof WindowEventMap>(type: K, handler: (ev: WindowEventMap[K]) => void, options?: GlobalListenerOptions & {
20
+ isWindow: true;
21
+ }): void;
22
+ };
23
+ removeGlobalListener: {
24
+ <K extends keyof DocumentEventMap>(type: K, handler: (ev: DocumentEventMap[K]) => void, options?: AddEventListenerOptions): void;
25
+ <K extends keyof WindowEventMap>(type: K, handler: (ev: WindowEventMap[K]) => void, options?: AddEventListenerOptions & {
26
+ isWindow: true;
27
+ }): void;
28
+ };
29
+ removeAllGlobalListeners: () => void;
30
+ };
31
+ /**
32
+ * Simple utility to add a single global listener with automatic cleanup.
33
+ * For one-off listeners where the full manager isn't needed.
34
+ */
35
+ export declare function addGlobalListenerOnce<K extends keyof DocumentEventMap>(type: K, handler: (ev: DocumentEventMap[K]) => void, options?: GlobalListenerOptions): () => void;
36
+ //# sourceMappingURL=globalListeners.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globalListeners.d.ts","sourceRoot":"","sources":["../../src/utils/globalListeners.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,qBAAsB,SAAQ,uBAAuB;IACpE,oEAAoE;IACpE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB;;SAWR,CAAC,SAAS,MAAM,gBAAgB,QACnD,CAAC,WACE,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,YAChC,qBAAqB,GAC9B,IAAI;SACoB,CAAC,SAAS,MAAM,cAAc,QACjD,CAAC,WACE,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,YAC9B,qBAAqB,GAAG;YAAE,QAAQ,EAAE,IAAI,CAAA;SAAE,GACnD,IAAI;;;SAsBuB,CAAC,SAAS,MAAM,gBAAgB,QACtD,CAAC,WACE,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,YAChC,uBAAuB,GAChC,IAAI;SACuB,CAAC,SAAS,MAAM,cAAc,QACpD,CAAC,WACE,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,KAAK,IAAI,YAC9B,uBAAuB,GAAG;YAAE,QAAQ,EAAE,IAAI,CAAA;SAAE,GACrD,IAAI;;oCA+B8B,IAAI;EAe1C;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,MAAM,gBAAgB,EACpE,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,EAC1C,OAAO,CAAC,EAAE,qBAAqB,GAC9B,MAAM,IAAI,CAeZ"}
@@ -0,0 +1,11 @@
1
+ export { mergeProps } from './mergeProps';
2
+ export { filterDOMProps, type FilterDOMPropsOptions } from './filterDOMProps';
3
+ export { access, isAccessor, type MaybeAccessor, type MaybeAccessorValue } from './reactivity';
4
+ export { isMac, isIPhone, isIPad, isIOS, isAppleDevice, isWebKit, isChrome, isAndroid, isFirefox, } from './platform';
5
+ export { getOwnerDocument, getOwnerWindow, nodeContains, getEventTarget, isFocusable, isValidKeyboardEvent, isValidInputKey, isHTMLAnchorLink, shouldPreventDefaultKeyboard, shouldPreventDefaultUp, openLink, } from './dom';
6
+ export { areRectanglesOverlapping, getPointClientRect, isPointOverTarget, getTouchFromEvent, getTouchById, type Rect, type EventPoint, } from './geometry';
7
+ export { isVirtualClick, isVirtualPointerEvent, createMouseEvent, chain, setEventTarget, } from './events';
8
+ export { disableTextSelection, restoreTextSelection } from './textSelection';
9
+ export { focusWithoutScrolling, focusSafely, preventFocus } from './focus';
10
+ export { createGlobalListeners, addGlobalListenerOnce, type GlobalListenerOptions, } from './globalListeners';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAG9E,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAG/F,OAAO,EACL,KAAK,EACL,QAAQ,EACR,MAAM,EACN,KAAK,EACL,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,GACV,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,cAAc,EACd,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,4BAA4B,EAC5B,sBAAsB,EACtB,QAAQ,GACT,MAAM,OAAO,CAAC;AAGf,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,EACZ,KAAK,IAAI,EACT,KAAK,UAAU,GAChB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,KAAK,EACL,cAAc,GACf,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAG7E,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG3E,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Merges multiple props objects together, handling event handlers specially
3
+ * by chaining them rather than replacing.
4
+ *
5
+ * Based on react-aria's mergeProps but adapted for SolidJS.
6
+ */
7
+ export declare function mergeProps<T extends object>(...args: T[]): Record<string, unknown>;
8
+ //# sourceMappingURL=mergeProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeProps.d.ts","sourceRoot":"","sources":["../../src/utils/mergeProps.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA6BlF"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Platform detection utilities.
3
+ * Based on @react-aria/utils platform detection.
4
+ */
5
+ export declare function isMac(): boolean;
6
+ export declare function isIPhone(): boolean;
7
+ export declare function isIPad(): boolean;
8
+ export declare function isIOS(): boolean;
9
+ export declare function isAppleDevice(): boolean;
10
+ export declare function isWebKit(): boolean;
11
+ export declare function isChrome(): boolean;
12
+ export declare function isAndroid(): boolean;
13
+ export declare function isFirefox(): boolean;
14
+ //# sourceMappingURL=platform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/utils/platform.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAcH,wBAAgB,KAAK,IAAI,OAAO,CAE/B;AAED,wBAAgB,QAAQ,IAAI,OAAO,CAElC;AAED,wBAAgB,MAAM,IAAI,OAAO,CAEhC;AAED,wBAAgB,KAAK,IAAI,OAAO,CAE/B;AAED,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED,wBAAgB,QAAQ,IAAI,OAAO,CAElC;AAED,wBAAgB,QAAQ,IAAI,OAAO,CAElC;AAED,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,wBAAgB,SAAS,IAAI,OAAO,CAEnC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Reactivity utilities for Solidaria
3
+ *
4
+ * Provides type-safe utilities for working with SolidJS reactivity patterns.
5
+ */
6
+ import { Accessor } from 'solid-js';
7
+ /**
8
+ * A value that may be either a raw value or an accessor function.
9
+ * This is a common pattern in SolidJS for props that may be reactive.
10
+ */
11
+ export type MaybeAccessor<T> = T | Accessor<T>;
12
+ /**
13
+ * Unwraps a MaybeAccessor to get the underlying value.
14
+ * If the input is a function, it calls it to get the value.
15
+ * Otherwise, it returns the value directly.
16
+ *
17
+ * @param value - The value or accessor to unwrap.
18
+ */
19
+ export declare function access<T>(value: MaybeAccessor<T>): T;
20
+ /**
21
+ * A value that may be undefined or an accessor that returns the value or undefined.
22
+ */
23
+ export type MaybeAccessorValue<T> = T | undefined | Accessor<T | undefined>;
24
+ /**
25
+ * Checks if a value is an accessor function.
26
+ */
27
+ export declare function isAccessor<T>(value: MaybeAccessor<T>): value is Accessor<T>;
28
+ //# sourceMappingURL=reactivity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reactivity.d.ts","sourceRoot":"","sources":["../../src/utils/reactivity.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC;;;GAGG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;AAE/C;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAEpD;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,GAAG,QAAQ,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;AAE5E;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,CAE3E"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Text selection management utilities.
3
+ * Based on @react-aria/interactions textSelection utilities.
4
+ *
5
+ * On iOS, long press triggers text selection. The only way to prevent this
6
+ * is to set user-select: none on the entire page. On other platforms,
7
+ * we can just set it on the target element.
8
+ */
9
+ /**
10
+ * Disables text selection on the page or element during press.
11
+ * On iOS, applies to the entire document. On other platforms, just the target.
12
+ */
13
+ export declare function disableTextSelection(target?: HTMLElement): void;
14
+ /**
15
+ * Restores text selection after press ends.
16
+ * On iOS, waits 300ms to avoid selection appearing during tap.
17
+ */
18
+ export declare function restoreTextSelection(target?: HTMLElement): void;
19
+ //# sourceMappingURL=textSelection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textSelection.d.ts","sourceRoot":"","sources":["../../src/utils/textSelection.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAYH;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAiB/D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAwC/D"}
package/package.json CHANGED
@@ -1,53 +1,52 @@
1
- {
2
- "name": "@proyecto-viviana/solidaria",
3
- "version": "0.0.3",
4
- "description": "A 1-1 SolidJS port of React Aria - accessible UI primitives",
5
- "type": "module",
6
- "main": "./dist/index.js",
7
- "module": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "solid": "./dist/index.jsx",
12
- "import": "./dist/index.js",
13
- "types": "./dist/index.d.ts"
14
- }
15
- },
16
- "files": [
17
- "dist",
18
- "src"
19
- ],
20
- "sideEffects": false,
21
- "scripts": {
22
- "build": "tsup",
23
- "dev": "tsup --watch",
24
- "prepublishOnly": "bun run build"
25
- },
26
- "dependencies": {
27
- "@proyecto-viviana/solid-stately": "^0.0.1"
28
- },
29
- "peerDependencies": {
30
- "solid-js": "^1.9.0"
31
- },
32
- "devDependencies": {
33
- "esbuild-plugin-solid": "^0.6.0",
34
- "solid-js": "^1.9.10",
35
- "tsup": "^8.0.0"
36
- },
37
- "keywords": [
38
- "solid",
39
- "solidjs",
40
- "aria",
41
- "accessibility",
42
- "a11y",
43
- "react-aria"
44
- ],
45
- "license": "MIT",
46
- "repository": {
47
- "type": "git",
48
- "url": "https://github.com/proyecto-viviana/proyecto-viviana"
49
- },
50
- "publishConfig": {
51
- "access": "public"
52
- }
53
- }
1
+ {
2
+ "name": "@proyecto-viviana/solidaria",
3
+ "version": "0.0.4",
4
+ "description": "A 1-1 SolidJS port of React Aria - accessible UI primitives",
5
+ "type": "module",
6
+ "main": "./dist/index.ssr.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "solid": "./dist/index.js",
12
+ "import": "./dist/index.js",
13
+ "node": "./dist/index.ssr.js",
14
+ "types": "./dist/index.d.ts"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "src"
20
+ ],
21
+ "sideEffects": false,
22
+ "scripts": {
23
+ "build": "rimraf dist tsconfig.build.tsbuildinfo && vite build && vite build --ssr && tsc -p tsconfig.build.json",
24
+ "dev": "vite build --watch",
25
+ "prepublishOnly": "bun run build"
26
+ },
27
+ "dependencies": {
28
+ "@proyecto-viviana/solid-stately": "^0.0.1"
29
+ },
30
+ "peerDependencies": {
31
+ "solid-js": "^1.9.0"
32
+ },
33
+ "devDependencies": {
34
+ "solid-js": "^1.9.10"
35
+ },
36
+ "keywords": [
37
+ "solid",
38
+ "solidjs",
39
+ "aria",
40
+ "accessibility",
41
+ "a11y",
42
+ "react-aria"
43
+ ],
44
+ "license": "MIT",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "https://github.com/proyecto-viviana/proyecto-viviana"
48
+ },
49
+ "publishConfig": {
50
+ "access": "public"
51
+ }
52
+ }