@proyecto-viviana/solidaria-components 0.3.2 → 0.4.1
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.
- package/dist/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar.js +175 -0
- package/dist/ActionBar.js.map +1 -0
- package/dist/ActionBar.jsx +119 -0
- package/dist/ActionBar.jsx.map +1 -0
- package/dist/ActionGroup.d.ts.map +1 -1
- package/dist/ActionGroup.js +179 -0
- package/dist/ActionGroup.js.map +1 -0
- package/dist/ActionGroup.jsx +129 -0
- package/dist/ActionGroup.jsx.map +1 -0
- package/dist/Alert.js +111 -0
- package/dist/Alert.js.map +1 -0
- package/dist/Alert.jsx +82 -0
- package/dist/Alert.jsx.map +1 -0
- package/dist/Autocomplete.d.ts +2 -2
- package/dist/Autocomplete.d.ts.map +1 -1
- package/dist/Autocomplete.js +130 -0
- package/dist/Autocomplete.js.map +1 -0
- package/dist/Autocomplete.jsx +116 -0
- package/dist/Autocomplete.jsx.map +1 -0
- package/dist/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs.js +333 -0
- package/dist/Breadcrumbs.js.map +1 -0
- package/dist/Breadcrumbs.jsx +261 -0
- package/dist/Breadcrumbs.jsx.map +1 -0
- package/dist/Button.d.ts.map +1 -1
- package/dist/Button.js +348 -0
- package/dist/Button.js.map +1 -0
- package/dist/Button.jsx +314 -0
- package/dist/Button.jsx.map +1 -0
- package/dist/Calendar.d.ts +4 -4
- package/dist/Calendar.d.ts.map +1 -1
- package/dist/Calendar.js +573 -0
- package/dist/Calendar.js.map +1 -0
- package/dist/Calendar.jsx +342 -0
- package/dist/Calendar.jsx.map +1 -0
- package/dist/CalendarPicker.d.ts +33 -0
- package/dist/CalendarPicker.d.ts.map +1 -0
- package/dist/CalendarPicker.js +44 -0
- package/dist/CalendarPicker.js.map +1 -0
- package/dist/CalendarPicker.jsx +44 -0
- package/dist/CalendarPicker.jsx.map +1 -0
- package/dist/Checkbox.d.ts +83 -4
- package/dist/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox.js +923 -0
- package/dist/Checkbox.js.map +1 -0
- package/dist/Checkbox.jsx +707 -0
- package/dist/Checkbox.jsx.map +1 -0
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Collection.js +202 -0
- package/dist/Collection.js.map +1 -0
- package/dist/Collection.jsx +152 -0
- package/dist/Collection.jsx.map +1 -0
- package/dist/Color.d.ts.map +1 -1
- package/dist/Color.js +1717 -0
- package/dist/Color.js.map +1 -0
- package/dist/Color.jsx +1340 -0
- package/dist/Color.jsx.map +1 -0
- package/dist/ColorEditor.js +208 -0
- package/dist/ColorEditor.js.map +1 -0
- package/dist/ColorEditor.jsx +120 -0
- package/dist/ColorEditor.jsx.map +1 -0
- package/dist/ComboBox.d.ts +8 -4
- package/dist/ComboBox.d.ts.map +1 -1
- package/dist/ComboBox.js +1000 -0
- package/dist/ComboBox.js.map +1 -0
- package/dist/ComboBox.jsx +724 -0
- package/dist/ComboBox.jsx.map +1 -0
- package/dist/ContextualHelpTrigger.js +146 -0
- package/dist/ContextualHelpTrigger.js.map +1 -0
- package/dist/ContextualHelpTrigger.jsx +109 -0
- package/dist/ContextualHelpTrigger.jsx.map +1 -0
- package/dist/DateField.d.ts +14 -5
- package/dist/DateField.d.ts.map +1 -1
- package/dist/DateField.js +4 -0
- package/dist/DateField.jsx +4 -0
- package/dist/DateField2.js +502 -0
- package/dist/DateField2.js.map +1 -0
- package/dist/DateField2.jsx +354 -0
- package/dist/DateField2.jsx.map +1 -0
- package/dist/DatePicker.d.ts +46 -7
- package/dist/DatePicker.d.ts.map +1 -1
- package/dist/DatePicker.js +7 -0
- package/dist/DatePicker.jsx +7 -0
- package/dist/DatePicker2.js +1171 -0
- package/dist/DatePicker2.js.map +1 -0
- package/dist/DatePicker2.jsx +820 -0
- package/dist/DatePicker2.jsx.map +1 -0
- package/dist/DateRangePickerContext.d.ts +2 -0
- package/dist/DateRangePickerContext.d.ts.map +1 -1
- package/dist/Dialog.d.ts.map +1 -1
- package/dist/Dialog.js +337 -0
- package/dist/Dialog.js.map +1 -0
- package/dist/Dialog.jsx +192 -0
- package/dist/Dialog.jsx.map +1 -0
- package/dist/Disclosure.d.ts.map +1 -1
- package/dist/Disclosure.js +331 -0
- package/dist/Disclosure.js.map +1 -0
- package/dist/Disclosure.jsx +230 -0
- package/dist/Disclosure.jsx.map +1 -0
- package/dist/DragAndDrop.d.ts.map +1 -1
- package/dist/DragAndDrop.js +176 -0
- package/dist/DragAndDrop.js.map +1 -0
- package/dist/DragAndDrop.jsx +160 -0
- package/dist/DragAndDrop.jsx.map +1 -0
- package/dist/DropZone.d.ts.map +1 -1
- package/dist/DropZone.js +189 -0
- package/dist/DropZone.js.map +1 -0
- package/dist/DropZone.jsx +144 -0
- package/dist/DropZone.jsx.map +1 -0
- package/dist/FieldError.js +66 -0
- package/dist/FieldError.js.map +1 -0
- package/dist/FieldError.jsx +47 -0
- package/dist/FieldError.jsx.map +1 -0
- package/dist/FileTrigger.js +79 -0
- package/dist/FileTrigger.js.map +1 -0
- package/dist/FileTrigger.jsx +49 -0
- package/dist/FileTrigger.jsx.map +1 -0
- package/dist/Focusable.js +70 -0
- package/dist/Focusable.js.map +1 -0
- package/dist/Focusable.jsx +69 -0
- package/dist/Focusable.jsx.map +1 -0
- package/dist/Form.js +99 -0
- package/dist/Form.js.map +1 -0
- package/dist/Form.jsx +73 -0
- package/dist/Form.jsx.map +1 -0
- package/dist/GridList.d.ts +34 -2
- package/dist/GridList.d.ts.map +1 -1
- package/dist/GridList.js +723 -0
- package/dist/GridList.js.map +1 -0
- package/dist/GridList.jsx +552 -0
- package/dist/GridList.jsx.map +1 -0
- package/dist/Icon.d.ts.map +1 -1
- package/dist/Icon.js +127 -0
- package/dist/Icon.js.map +1 -0
- package/dist/Icon.jsx +72 -0
- package/dist/Icon.jsx.map +1 -0
- package/dist/Keyboard.js +30 -0
- package/dist/Keyboard.js.map +1 -0
- package/dist/Keyboard.jsx +24 -0
- package/dist/Keyboard.jsx.map +1 -0
- package/dist/Landmark.js +134 -0
- package/dist/Landmark.js.map +1 -0
- package/dist/Landmark.jsx +118 -0
- package/dist/Landmark.jsx.map +1 -0
- package/dist/Link.d.ts.map +1 -1
- package/dist/Link.js +219 -0
- package/dist/Link.js.map +1 -0
- package/dist/Link.jsx +189 -0
- package/dist/Link.jsx.map +1 -0
- package/dist/ListBox.d.ts +2 -2
- package/dist/ListBox.d.ts.map +1 -1
- package/dist/ListBox.js +831 -0
- package/dist/ListBox.js.map +1 -0
- package/dist/ListBox.jsx +644 -0
- package/dist/ListBox.jsx.map +1 -0
- package/dist/Menu.d.ts +27 -9
- package/dist/Menu.d.ts.map +1 -1
- package/dist/Menu.js +1254 -0
- package/dist/Menu.js.map +1 -0
- package/dist/Menu.jsx +1042 -0
- package/dist/Menu.jsx.map +1 -0
- package/dist/Meter.d.ts.map +1 -1
- package/dist/Meter.js +123 -0
- package/dist/Meter.js.map +1 -0
- package/dist/Meter.jsx +107 -0
- package/dist/Meter.jsx.map +1 -0
- package/dist/Modal.d.ts.map +1 -1
- package/dist/Modal.js +382 -0
- package/dist/Modal.js.map +1 -0
- package/dist/Modal.jsx +314 -0
- package/dist/Modal.jsx.map +1 -0
- package/dist/NumberField.d.ts +3 -3
- package/dist/NumberField.d.ts.map +1 -1
- package/dist/NumberField.js +573 -0
- package/dist/NumberField.js.map +1 -0
- package/dist/NumberField.jsx +443 -0
- package/dist/NumberField.jsx.map +1 -0
- package/dist/Popover.d.ts +10 -2
- package/dist/Popover.d.ts.map +1 -1
- package/dist/Popover.js +471 -0
- package/dist/Popover.js.map +1 -0
- package/dist/Popover.jsx +354 -0
- package/dist/Popover.jsx.map +1 -0
- package/dist/Pressable.js +69 -0
- package/dist/Pressable.js.map +1 -0
- package/dist/Pressable.jsx +68 -0
- package/dist/Pressable.jsx.map +1 -0
- package/dist/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar.js +130 -0
- package/dist/ProgressBar.js.map +1 -0
- package/dist/ProgressBar.jsx +114 -0
- package/dist/ProgressBar.jsx.map +1 -0
- package/dist/RadioGroup.d.ts +82 -4
- package/dist/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup.js +931 -0
- package/dist/RadioGroup.js.map +1 -0
- package/dist/RadioGroup.jsx +681 -0
- package/dist/RadioGroup.jsx.map +1 -0
- package/dist/RangeCalendar.d.ts.map +1 -1
- package/dist/RangeCalendar.js +546 -0
- package/dist/RangeCalendar.js.map +1 -0
- package/dist/RangeCalendar.jsx +323 -0
- package/dist/RangeCalendar.jsx.map +1 -0
- package/dist/RouterProvider.js +118 -0
- package/dist/RouterProvider.js.map +1 -0
- package/dist/RouterProvider.jsx +112 -0
- package/dist/RouterProvider.jsx.map +1 -0
- package/dist/SearchField.d.ts +2 -2
- package/dist/SearchField.d.ts.map +1 -1
- package/dist/SearchField.js +667 -0
- package/dist/SearchField.js.map +1 -0
- package/dist/SearchField.jsx +550 -0
- package/dist/SearchField.jsx.map +1 -0
- package/dist/Select.d.ts +7 -0
- package/dist/Select.d.ts.map +1 -1
- package/dist/Select.js +1044 -0
- package/dist/Select.js.map +1 -0
- package/dist/Select.jsx +759 -0
- package/dist/Select.jsx.map +1 -0
- package/dist/SelectionIndicator.d.ts.map +1 -1
- package/dist/SelectionIndicator.js +86 -0
- package/dist/SelectionIndicator.js.map +1 -0
- package/dist/SelectionIndicator.jsx +50 -0
- package/dist/SelectionIndicator.jsx.map +1 -0
- package/dist/Separator.js +97 -0
- package/dist/Separator.js.map +1 -0
- package/dist/Separator.jsx +85 -0
- package/dist/Separator.jsx.map +1 -0
- package/dist/SharedElementTransition.d.ts.map +1 -1
- package/dist/SharedElementTransition.js +167 -0
- package/dist/SharedElementTransition.js.map +1 -0
- package/dist/SharedElementTransition.jsx +140 -0
- package/dist/SharedElementTransition.jsx.map +1 -0
- package/dist/Slider.d.ts +33 -1
- package/dist/Slider.d.ts.map +1 -1
- package/dist/Slider.js +515 -0
- package/dist/Slider.js.map +1 -0
- package/dist/Slider.jsx +403 -0
- package/dist/Slider.jsx.map +1 -0
- package/dist/StepList.d.ts.map +1 -1
- package/dist/StepList.js +191 -0
- package/dist/StepList.js.map +1 -0
- package/dist/StepList.jsx +136 -0
- package/dist/StepList.jsx.map +1 -0
- package/dist/Switch.d.ts +65 -2
- package/dist/Switch.d.ts.map +1 -1
- package/dist/Switch.js +534 -0
- package/dist/Switch.js.map +1 -0
- package/dist/Switch.jsx +393 -0
- package/dist/Switch.jsx.map +1 -0
- package/dist/Table.d.ts +50 -0
- package/dist/Table.d.ts.map +1 -1
- package/dist/Table.js +1766 -0
- package/dist/Table.js.map +1 -0
- package/dist/Table.jsx +1355 -0
- package/dist/Table.jsx.map +1 -0
- package/dist/Tabs.d.ts +0 -4
- package/dist/Tabs.d.ts.map +1 -1
- package/dist/Tabs.js +598 -0
- package/dist/Tabs.js.map +1 -0
- package/dist/Tabs.jsx +367 -0
- package/dist/Tabs.jsx.map +1 -0
- package/dist/TagGroup.d.ts +3 -1
- package/dist/TagGroup.d.ts.map +1 -1
- package/dist/TagGroup.js +382 -0
- package/dist/TagGroup.js.map +1 -0
- package/dist/TagGroup.jsx +273 -0
- package/dist/TagGroup.jsx.map +1 -0
- package/dist/Text.d.ts +18 -6
- package/dist/Text.d.ts.map +1 -1
- package/dist/Text.js +42 -0
- package/dist/Text.js.map +1 -0
- package/dist/Text.jsx +35 -0
- package/dist/Text.jsx.map +1 -0
- package/dist/TextField.d.ts +6 -6
- package/dist/TextField.d.ts.map +1 -1
- package/dist/TextField.js +439 -0
- package/dist/TextField.js.map +1 -0
- package/dist/TextField.jsx +406 -0
- package/dist/TextField.jsx.map +1 -0
- package/dist/TimeField.d.ts +17 -53
- package/dist/TimeField.d.ts.map +1 -1
- package/dist/TimeField.js +278 -0
- package/dist/TimeField.js.map +1 -0
- package/dist/TimeField.jsx +218 -0
- package/dist/TimeField.jsx.map +1 -0
- package/dist/Toast.d.ts +14 -0
- package/dist/Toast.d.ts.map +1 -1
- package/dist/Toast.js +551 -0
- package/dist/Toast.js.map +1 -0
- package/dist/Toast.jsx +361 -0
- package/dist/Toast.jsx.map +1 -0
- package/dist/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton.js +123 -0
- package/dist/ToggleButton.js.map +1 -0
- package/dist/ToggleButton.jsx +88 -0
- package/dist/ToggleButton.jsx.map +1 -0
- package/dist/ToggleButtonGroup.d.ts.map +1 -1
- package/dist/ToggleButtonGroup.js +114 -0
- package/dist/ToggleButtonGroup.js.map +1 -0
- package/dist/ToggleButtonGroup.jsx +85 -0
- package/dist/ToggleButtonGroup.jsx.map +1 -0
- package/dist/Toolbar.js +112 -0
- package/dist/Toolbar.js.map +1 -0
- package/dist/Toolbar.jsx +92 -0
- package/dist/Toolbar.jsx.map +1 -0
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip.js +539 -0
- package/dist/Tooltip.js.map +1 -0
- package/dist/Tooltip.jsx +465 -0
- package/dist/Tooltip.jsx.map +1 -0
- package/dist/Tree.d.ts +14 -2
- package/dist/Tree.d.ts.map +1 -1
- package/dist/Tree.js +1424 -0
- package/dist/Tree.js.map +1 -0
- package/dist/Tree.jsx +1172 -0
- package/dist/Tree.jsx.map +1 -0
- package/dist/Virtualizer.d.ts +16 -2
- package/dist/Virtualizer.d.ts.map +1 -1
- package/dist/Virtualizer.js +2 -0
- package/dist/Virtualizer.jsx +2 -0
- package/dist/Virtualizer2.js +751 -0
- package/dist/Virtualizer2.js.map +1 -0
- package/dist/Virtualizer2.jsx +730 -0
- package/dist/Virtualizer2.jsx.map +1 -0
- package/dist/VirtualizerLayouts.d.ts +18 -0
- package/dist/VirtualizerLayouts.d.ts.map +1 -1
- package/dist/VisuallyHidden.js +42 -0
- package/dist/VisuallyHidden.js.map +1 -0
- package/dist/VisuallyHidden.jsx +35 -0
- package/dist/VisuallyHidden.jsx.map +1 -0
- package/dist/contexts.js +33 -0
- package/dist/contexts.js.map +1 -0
- package/dist/contexts.jsx +33 -0
- package/dist/contexts.jsx.map +1 -0
- package/dist/index.d.ts +9 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +69 -23932
- package/dist/index.jsx +69 -18337
- package/dist/useDragAndDrop.d.ts +0 -8
- package/dist/useDragAndDrop.d.ts.map +1 -1
- package/dist/useDragAndDrop.js +2 -0
- package/dist/useDragAndDrop.jsx +2 -0
- package/dist/useDragAndDrop2.js +399 -0
- package/dist/useDragAndDrop2.js.map +1 -0
- package/dist/useDragAndDrop2.jsx +399 -0
- package/dist/useDragAndDrop2.jsx.map +1 -0
- package/dist/utils.d.ts +84 -11
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +285 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils.jsx +277 -0
- package/dist/utils.jsx.map +1 -0
- package/dist/virtualizer/Layout.js +144 -0
- package/dist/virtualizer/Layout.js.map +1 -0
- package/dist/virtualizer/Layout.jsx +144 -0
- package/dist/virtualizer/Layout.jsx.map +1 -0
- package/package.json +395 -4
- package/src/ActionBar.tsx +10 -12
- package/src/ActionGroup.tsx +5 -3
- package/src/Autocomplete.tsx +14 -9
- package/src/Breadcrumbs.tsx +58 -39
- package/src/Button.tsx +22 -2
- package/src/Calendar.tsx +57 -11
- package/src/CalendarPicker.tsx +73 -0
- package/src/Checkbox.tsx +539 -3
- package/src/Collection.tsx +9 -3
- package/src/Color.tsx +84 -41
- package/src/ComboBox.tsx +97 -21
- package/src/DateField.tsx +304 -53
- package/src/DatePicker.tsx +402 -62
- package/src/DateRangePickerContext.tsx +2 -0
- package/src/Dialog.tsx +13 -5
- package/src/Disclosure.tsx +7 -1
- package/src/DragAndDrop.tsx +3 -1
- package/src/DropZone.tsx +3 -1
- package/src/GridList.tsx +133 -26
- package/src/Icon.tsx +3 -1
- package/src/Link.tsx +3 -1
- package/src/ListBox.tsx +354 -25
- package/src/Menu.tsx +252 -128
- package/src/Meter.tsx +3 -1
- package/src/Modal.tsx +120 -56
- package/src/NumberField.tsx +51 -8
- package/src/Popover.tsx +68 -17
- package/src/ProgressBar.tsx +3 -1
- package/src/RadioGroup.tsx +468 -4
- package/src/RangeCalendar.tsx +123 -2
- package/src/SearchField.tsx +80 -4
- package/src/Select.tsx +122 -26
- package/src/SelectionIndicator.tsx +3 -1
- package/src/SharedElementTransition.tsx +95 -37
- package/src/Slider.tsx +159 -13
- package/src/StepList.tsx +0 -7
- package/src/Switch.tsx +395 -2
- package/src/Table.tsx +428 -99
- package/src/Tabs.tsx +17 -45
- package/src/TagGroup.tsx +29 -7
- package/src/Text.tsx +31 -10
- package/src/TextField.tsx +44 -6
- package/src/TimeField.tsx +127 -192
- package/src/Toast.tsx +79 -14
- package/src/ToggleButton.tsx +3 -1
- package/src/ToggleButtonGroup.tsx +3 -1
- package/src/Tooltip.tsx +3 -1
- package/src/Tree.tsx +91 -13
- package/src/Virtualizer.tsx +180 -31
- package/src/VirtualizerLayouts.ts +45 -10
- package/src/index.ts +51 -8
- package/src/useDragAndDrop.ts +8 -10
- package/src/utils.tsx +246 -30
- package/dist/HiddenTimeInput.d.ts +0 -25
- package/dist/HiddenTimeInput.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index.jsx.map +0 -1
- package/src/HiddenTimeInput.tsx +0 -133
package/dist/Link.js
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { filterDOMProps, useRenderProps } from "./utils.js";
|
|
2
|
+
import { handleLinkClick, useRouter } from "./RouterProvider.js";
|
|
3
|
+
import { Dynamic, createComponent, mergeProps } from "solid-js/web";
|
|
4
|
+
import { createContext, createMemo, splitProps } from "solid-js";
|
|
5
|
+
import { createFocusRing, createHover, createLink } from "@proyecto-viviana/solidaria";
|
|
6
|
+
//#region src/Link.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Link component for solidaria-components
|
|
9
|
+
*
|
|
10
|
+
* Pre-wired headless link component that combines aria hooks.
|
|
11
|
+
* Port of react-aria-components/src/Link.tsx
|
|
12
|
+
*/
|
|
13
|
+
function assignRef(ref, el) {
|
|
14
|
+
if (!ref) return;
|
|
15
|
+
if (typeof ref === "function") ref(el);
|
|
16
|
+
else ref.current = el;
|
|
17
|
+
}
|
|
18
|
+
const LinkContext = createContext(null);
|
|
19
|
+
/**
|
|
20
|
+
* A link allows a user to navigate to another page or resource within a web page
|
|
21
|
+
* or application.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <Link href="https://example.com">Visit Example</Link>
|
|
26
|
+
*
|
|
27
|
+
* // With render props
|
|
28
|
+
* <Link href="/about">
|
|
29
|
+
* {({ isHovered, isFocusVisible }) => (
|
|
30
|
+
* <span class={isHovered ? 'underline' : ''}>
|
|
31
|
+
* About Us
|
|
32
|
+
* </span>
|
|
33
|
+
* )}
|
|
34
|
+
* </Link>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
function Link(props) {
|
|
38
|
+
const [local, ariaProps] = splitProps(props, [
|
|
39
|
+
"children",
|
|
40
|
+
"class",
|
|
41
|
+
"style",
|
|
42
|
+
"ref",
|
|
43
|
+
"slot",
|
|
44
|
+
"onHoverStart",
|
|
45
|
+
"onHoverEnd",
|
|
46
|
+
"onHoverChange"
|
|
47
|
+
]);
|
|
48
|
+
const router = useRouter();
|
|
49
|
+
const resolvedHref = createMemo(() => ariaProps.href ? router.useHref(ariaProps.href) : void 0);
|
|
50
|
+
const elementType = () => {
|
|
51
|
+
if (ariaProps.href && !ariaProps.isDisabled) return "a";
|
|
52
|
+
return "span";
|
|
53
|
+
};
|
|
54
|
+
const linkAria = createLink({
|
|
55
|
+
get elementType() {
|
|
56
|
+
return elementType();
|
|
57
|
+
},
|
|
58
|
+
get isDisabled() {
|
|
59
|
+
return ariaProps.isDisabled;
|
|
60
|
+
},
|
|
61
|
+
get href() {
|
|
62
|
+
return resolvedHref();
|
|
63
|
+
},
|
|
64
|
+
get hrefLang() {
|
|
65
|
+
return ariaProps.hrefLang;
|
|
66
|
+
},
|
|
67
|
+
get target() {
|
|
68
|
+
return ariaProps.target;
|
|
69
|
+
},
|
|
70
|
+
get rel() {
|
|
71
|
+
return ariaProps.rel;
|
|
72
|
+
},
|
|
73
|
+
get download() {
|
|
74
|
+
return ariaProps.download;
|
|
75
|
+
},
|
|
76
|
+
get ping() {
|
|
77
|
+
return ariaProps.ping;
|
|
78
|
+
},
|
|
79
|
+
get referrerPolicy() {
|
|
80
|
+
return ariaProps.referrerPolicy;
|
|
81
|
+
},
|
|
82
|
+
get onPress() {
|
|
83
|
+
return ariaProps.onPress;
|
|
84
|
+
},
|
|
85
|
+
get onPressStart() {
|
|
86
|
+
return ariaProps.onPressStart;
|
|
87
|
+
},
|
|
88
|
+
get onPressEnd() {
|
|
89
|
+
return ariaProps.onPressEnd;
|
|
90
|
+
},
|
|
91
|
+
get onPressUp() {
|
|
92
|
+
return ariaProps.onPressUp;
|
|
93
|
+
},
|
|
94
|
+
get onPressChange() {
|
|
95
|
+
return ariaProps.onPressChange;
|
|
96
|
+
},
|
|
97
|
+
get onClick() {
|
|
98
|
+
return ariaProps.onClick;
|
|
99
|
+
},
|
|
100
|
+
get onFocus() {
|
|
101
|
+
return ariaProps.onFocus;
|
|
102
|
+
},
|
|
103
|
+
get onBlur() {
|
|
104
|
+
return ariaProps.onBlur;
|
|
105
|
+
},
|
|
106
|
+
get onFocusChange() {
|
|
107
|
+
return ariaProps.onFocusChange;
|
|
108
|
+
},
|
|
109
|
+
get onKeyDown() {
|
|
110
|
+
return ariaProps.onKeyDown;
|
|
111
|
+
},
|
|
112
|
+
get onKeyUp() {
|
|
113
|
+
return ariaProps.onKeyUp;
|
|
114
|
+
},
|
|
115
|
+
get autoFocus() {
|
|
116
|
+
return ariaProps.autoFocus;
|
|
117
|
+
},
|
|
118
|
+
get "aria-current"() {
|
|
119
|
+
return ariaProps["aria-current"];
|
|
120
|
+
},
|
|
121
|
+
get "aria-label"() {
|
|
122
|
+
return ariaProps["aria-label"];
|
|
123
|
+
},
|
|
124
|
+
get "aria-labelledby"() {
|
|
125
|
+
return ariaProps["aria-labelledby"];
|
|
126
|
+
},
|
|
127
|
+
get "aria-describedby"() {
|
|
128
|
+
return ariaProps["aria-describedby"];
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
const { isFocused, isFocusVisible, focusProps } = createFocusRing();
|
|
132
|
+
const { isHovered, hoverProps } = createHover({
|
|
133
|
+
get isDisabled() {
|
|
134
|
+
return ariaProps.isDisabled ?? false;
|
|
135
|
+
},
|
|
136
|
+
get onHoverStart() {
|
|
137
|
+
return local.onHoverStart;
|
|
138
|
+
},
|
|
139
|
+
get onHoverEnd() {
|
|
140
|
+
return local.onHoverEnd;
|
|
141
|
+
},
|
|
142
|
+
get onHoverChange() {
|
|
143
|
+
return local.onHoverChange;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
const renderValues = createMemo(() => ({
|
|
147
|
+
isCurrent: !!ariaProps["aria-current"],
|
|
148
|
+
isHovered: isHovered(),
|
|
149
|
+
isPressed: linkAria.isPressed(),
|
|
150
|
+
isFocused: isFocused(),
|
|
151
|
+
isFocusVisible: isFocusVisible(),
|
|
152
|
+
isDisabled: ariaProps.isDisabled ?? false
|
|
153
|
+
}));
|
|
154
|
+
const renderProps = useRenderProps({
|
|
155
|
+
get children() {
|
|
156
|
+
return props.children;
|
|
157
|
+
},
|
|
158
|
+
class: local.class,
|
|
159
|
+
style: local.style,
|
|
160
|
+
defaultClassName: "solidaria-Link"
|
|
161
|
+
}, renderValues);
|
|
162
|
+
const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));
|
|
163
|
+
const cleanLinkProps = () => {
|
|
164
|
+
const { ref: _ref1, ...rest } = linkAria.linkProps;
|
|
165
|
+
return rest;
|
|
166
|
+
};
|
|
167
|
+
const cleanHoverProps = () => {
|
|
168
|
+
const { ref: _ref2, ...rest } = hoverProps;
|
|
169
|
+
return rest;
|
|
170
|
+
};
|
|
171
|
+
const cleanFocusProps = () => {
|
|
172
|
+
const { ref: _ref3, ...rest } = focusProps;
|
|
173
|
+
return rest;
|
|
174
|
+
};
|
|
175
|
+
const onLinkClick = (event) => {
|
|
176
|
+
const onClick = cleanLinkProps().onClick;
|
|
177
|
+
onClick?.(event);
|
|
178
|
+
handleLinkClick(event, router, ariaProps.href, ariaProps.routerOptions);
|
|
179
|
+
};
|
|
180
|
+
return createComponent(Dynamic, mergeProps({ get component() {
|
|
181
|
+
return elementType();
|
|
182
|
+
} }, domProps, cleanLinkProps, cleanHoverProps, cleanFocusProps, {
|
|
183
|
+
ref: (element) => {
|
|
184
|
+
assignRef(local.ref, element);
|
|
185
|
+
},
|
|
186
|
+
onClick: onLinkClick,
|
|
187
|
+
get ["class"]() {
|
|
188
|
+
return renderProps.class();
|
|
189
|
+
},
|
|
190
|
+
get style() {
|
|
191
|
+
return renderProps.style();
|
|
192
|
+
},
|
|
193
|
+
get ["data-hovered"]() {
|
|
194
|
+
return isHovered() || void 0;
|
|
195
|
+
},
|
|
196
|
+
get ["data-pressed"]() {
|
|
197
|
+
return linkAria.isPressed() || void 0;
|
|
198
|
+
},
|
|
199
|
+
get ["data-focused"]() {
|
|
200
|
+
return isFocused() || void 0;
|
|
201
|
+
},
|
|
202
|
+
get ["data-focus-visible"]() {
|
|
203
|
+
return isFocusVisible() || void 0;
|
|
204
|
+
},
|
|
205
|
+
get ["data-current"]() {
|
|
206
|
+
return !!ariaProps["aria-current"] || void 0;
|
|
207
|
+
},
|
|
208
|
+
get ["data-disabled"]() {
|
|
209
|
+
return ariaProps.isDisabled || void 0;
|
|
210
|
+
},
|
|
211
|
+
get children() {
|
|
212
|
+
return renderProps.renderChildren();
|
|
213
|
+
}
|
|
214
|
+
}));
|
|
215
|
+
}
|
|
216
|
+
//#endregion
|
|
217
|
+
export { Link, LinkContext };
|
|
218
|
+
|
|
219
|
+
//# sourceMappingURL=Link.js.map
|
package/dist/Link.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link.js","names":["JSX","ParentProps","createContext","createMemo","splitProps","Dynamic","createLink","createFocusRing","createHover","AriaLinkProps","HoverEvents","RenderChildren","ClassNameOrFunction","StyleOrFunction","SlotProps","useRenderProps","filterDOMProps","handleLinkClick","useRouter","RefLike","el","T","current","assignRef","ref","LinkRenderProps","isCurrent","isHovered","isPressed","isFocused","isFocusVisible","isDisabled","LinkProps","Omit","children","class","style","HTMLElement","LinkContext","Link","props","Element","local","ariaProps","router","resolvedHref","href","useHref","undefined","elementType","linkAria","hrefLang","target","rel","download","ping","referrerPolicy","onPress","onPressStart","onPressEnd","onPressUp","onPressChange","onClick","onFocus","onBlur","onFocusChange","onKeyDown","onKeyUp","autoFocus","aria-current","aria-label","aria-labelledby","aria-describedby","focusProps","hoverProps","onHoverStart","onHoverEnd","onHoverChange","renderValues","renderProps","defaultClassName","domProps","global","cleanLinkProps","_ref1","rest","linkProps","Record","cleanHoverProps","_ref2","cleanFocusProps","_ref3","onLinkClick","event","MouseEvent","routerOptions","_$createComponent","_$mergeProps","component","element","data-hovered","data-pressed","data-focused","data-focus-visible","data-current","data-disabled","renderChildren"],"sources":["../src/Link.tsx"],"sourcesContent":["/**\n * Link component for solidaria-components\n *\n * Pre-wired headless link component that combines aria hooks.\n * Port of react-aria-components/src/Link.tsx\n */\n\nimport { type JSX, type ParentProps, createContext, createMemo, splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport {\n createLink,\n createFocusRing,\n createHover,\n type AriaLinkProps,\n type HoverEvents,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from \"./utils\";\nimport { handleLinkClick, useRouter } from \"./RouterProvider\";\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(el);\n } else {\n ref.current = el;\n }\n}\n\nexport interface LinkRenderProps {\n /** Whether the link is the current item within a list. */\n isCurrent: boolean;\n /** Whether the link is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the link is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the link is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the link is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the link is disabled. */\n isDisabled: boolean;\n}\n\nexport interface LinkProps extends Omit<AriaLinkProps, \"elementType\">, HoverEvents, SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<LinkRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<LinkRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<LinkRenderProps>;\n /** Ref for the underlying link element. */\n ref?: RefLike<HTMLElement>;\n}\n\nexport const LinkContext = createContext<LinkProps | null>(null);\n\n/**\n * A link allows a user to navigate to another page or resource within a web page\n * or application.\n *\n * @example\n * ```tsx\n * <Link href=\"https://example.com\">Visit Example</Link>\n *\n * // With render props\n * <Link href=\"/about\">\n * {({ isHovered, isFocusVisible }) => (\n * <span class={isHovered ? 'underline' : ''}>\n * About Us\n * </span>\n * )}\n * </Link>\n * ```\n */\nexport function Link(props: ParentProps<LinkProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n \"children\",\n \"class\",\n \"style\",\n \"ref\",\n \"slot\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onHoverChange\",\n ]);\n const router = useRouter();\n const resolvedHref = createMemo(() =>\n ariaProps.href ? router.useHref(ariaProps.href) : undefined,\n );\n\n const elementType = () => {\n if (ariaProps.href && !ariaProps.isDisabled) {\n return \"a\";\n }\n return \"span\";\n };\n\n const linkAria = createLink({\n get elementType() {\n return elementType();\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get href() {\n return resolvedHref();\n },\n get hrefLang() {\n return ariaProps.hrefLang;\n },\n get target() {\n return ariaProps.target;\n },\n get rel() {\n return ariaProps.rel;\n },\n get download() {\n return ariaProps.download;\n },\n get ping() {\n return ariaProps.ping;\n },\n get referrerPolicy() {\n return ariaProps.referrerPolicy;\n },\n get onPress() {\n return ariaProps.onPress;\n },\n get onPressStart() {\n return ariaProps.onPressStart;\n },\n get onPressEnd() {\n return ariaProps.onPressEnd;\n },\n get onPressUp() {\n return ariaProps.onPressUp;\n },\n get onPressChange() {\n return ariaProps.onPressChange;\n },\n get onClick() {\n return ariaProps.onClick;\n },\n get onFocus() {\n return ariaProps.onFocus;\n },\n get onBlur() {\n return ariaProps.onBlur;\n },\n get onFocusChange() {\n return ariaProps.onFocusChange;\n },\n get onKeyDown() {\n return ariaProps.onKeyDown;\n },\n get onKeyUp() {\n return ariaProps.onKeyUp;\n },\n get autoFocus() {\n return ariaProps.autoFocus;\n },\n get \"aria-current\"() {\n return ariaProps[\"aria-current\"];\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return ariaProps[\"aria-describedby\"];\n },\n });\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ariaProps.isDisabled ?? false;\n },\n get onHoverStart() {\n return local.onHoverStart;\n },\n get onHoverEnd() {\n return local.onHoverEnd;\n },\n get onHoverChange() {\n return local.onHoverChange;\n },\n });\n\n const renderValues = createMemo<LinkRenderProps>(() => ({\n isCurrent: !!ariaProps[\"aria-current\"],\n isHovered: isHovered(),\n isPressed: linkAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: ariaProps.isDisabled ?? false,\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Link\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n const cleanLinkProps = () => {\n const { ref: _ref1, ...rest } = linkAria.linkProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const onLinkClick = (event: MouseEvent) => {\n const onClick = cleanLinkProps().onClick as ((event: MouseEvent) => void) | undefined;\n onClick?.(event);\n handleLinkClick(event, router, ariaProps.href, ariaProps.routerOptions);\n };\n\n return (\n <Dynamic\n component={elementType()}\n {...domProps()}\n {...cleanLinkProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n ref={(element: HTMLElement) => {\n assignRef(local.ref, element);\n }}\n onClick={onLinkClick}\n class={renderProps.class()}\n style={renderProps.style()}\n data-hovered={isHovered() || undefined}\n data-pressed={linkAria.isPressed() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-current={!!ariaProps[\"aria-current\"] || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </Dynamic>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA4BA,SAASuB,UAAaC,KAAiBJ,IAAa;CAClD,IAAI,CAACI,KAAK;CACV,IAAI,OAAOA,QAAQ,YACjBA,IAAIJ,EAAE;MAENI,IAAIF,UAAUF;AAElB;AA4BA,MAAakB,cAAcpC,cAAgC,IAAI;;;;;;;;;;;;;;;;;;;AAoB/D,SAAgBqC,KAAKC,OAA4C;CAC/D,MAAM,CAACE,OAAOC,aAAavC,WAAWoC,OAAO;EAC3C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAAe,CAChB;CACD,MAAMI,SAAS1B,UAAU;CACzB,MAAM2B,eAAe1C,iBACnBwC,UAAUG,OAAOF,OAAOG,QAAQJ,UAAUG,IAAI,IAAIE,KAAAA,CACpD;CAEA,MAAMC,oBAAoB;EACxB,IAAIN,UAAUG,QAAQ,CAACH,UAAUZ,YAC/B,OAAO;EAET,O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AAlE,MACb2E,YAAyB;GAC7B5E,UAAUmB,MAAMlB,KAAK2E,OAAO;EAC9B;EACArC,SAAS8B;EAAW,KAAA,WAAA;GAAA,OACbb,YAAY5C,MAAM;EAAC;EAAA,IAC1BC,QAAK;GAAA,OAAE2C,YAAY3C,MAAM;EAAC;EAAA,KAAA,kBAAA;GAAA,OACZT,UAAU,KAAKqB,KAAAA;EAAS;EAAA,KAAA,kBAAA;GAAA,OACxBE,SAAStB,UAAU,KAAKoB,KAAAA;EAAS;EAAA,KAAA,kBAAA;GAAA,OACjCnB,UAAU,KAAKmB,KAAAA;EAAS;EAAA,KAAA,wBAAA;GAAA,OAClBlB,eAAe,KAAKkB,KAAAA;EAAS;EAAA,KAAA,kBAAA;GAAA,OACnC,CAAC,CAACL,UAAU,mBAAmBK,KAAAA;EAAS;EAAA,KAAA,mBAAA;GAAA,OACvCL,UAAUZ,cAAciB,KAAAA;EAAS;EAAA,IAAAd,WAAA;GAAA,OAE/C6C,YAAY2B,eAAe;EAAC;CAAA,CAAA,CAAA;AAGnC"}
|
package/dist/Link.jsx
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { filterDOMProps, useRenderProps } from "./utils.jsx";
|
|
2
|
+
import { handleLinkClick, useRouter } from "./RouterProvider.jsx";
|
|
3
|
+
import { createContext, createMemo, splitProps } from "solid-js";
|
|
4
|
+
import { Dynamic } from "solid-js/web";
|
|
5
|
+
import { createFocusRing, createHover, createLink } from "@proyecto-viviana/solidaria";
|
|
6
|
+
//#region src/Link.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Link component for solidaria-components
|
|
9
|
+
*
|
|
10
|
+
* Pre-wired headless link component that combines aria hooks.
|
|
11
|
+
* Port of react-aria-components/src/Link.tsx
|
|
12
|
+
*/
|
|
13
|
+
function assignRef(ref, el) {
|
|
14
|
+
if (!ref) return;
|
|
15
|
+
if (typeof ref === "function") ref(el);
|
|
16
|
+
else ref.current = el;
|
|
17
|
+
}
|
|
18
|
+
const LinkContext = createContext(null);
|
|
19
|
+
/**
|
|
20
|
+
* A link allows a user to navigate to another page or resource within a web page
|
|
21
|
+
* or application.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <Link href="https://example.com">Visit Example</Link>
|
|
26
|
+
*
|
|
27
|
+
* // With render props
|
|
28
|
+
* <Link href="/about">
|
|
29
|
+
* {({ isHovered, isFocusVisible }) => (
|
|
30
|
+
* <span class={isHovered ? 'underline' : ''}>
|
|
31
|
+
* About Us
|
|
32
|
+
* </span>
|
|
33
|
+
* )}
|
|
34
|
+
* </Link>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
function Link(props) {
|
|
38
|
+
const [local, ariaProps] = splitProps(props, [
|
|
39
|
+
"children",
|
|
40
|
+
"class",
|
|
41
|
+
"style",
|
|
42
|
+
"ref",
|
|
43
|
+
"slot",
|
|
44
|
+
"onHoverStart",
|
|
45
|
+
"onHoverEnd",
|
|
46
|
+
"onHoverChange"
|
|
47
|
+
]);
|
|
48
|
+
const router = useRouter();
|
|
49
|
+
const resolvedHref = createMemo(() => ariaProps.href ? router.useHref(ariaProps.href) : void 0);
|
|
50
|
+
const elementType = () => {
|
|
51
|
+
if (ariaProps.href && !ariaProps.isDisabled) return "a";
|
|
52
|
+
return "span";
|
|
53
|
+
};
|
|
54
|
+
const linkAria = createLink({
|
|
55
|
+
get elementType() {
|
|
56
|
+
return elementType();
|
|
57
|
+
},
|
|
58
|
+
get isDisabled() {
|
|
59
|
+
return ariaProps.isDisabled;
|
|
60
|
+
},
|
|
61
|
+
get href() {
|
|
62
|
+
return resolvedHref();
|
|
63
|
+
},
|
|
64
|
+
get hrefLang() {
|
|
65
|
+
return ariaProps.hrefLang;
|
|
66
|
+
},
|
|
67
|
+
get target() {
|
|
68
|
+
return ariaProps.target;
|
|
69
|
+
},
|
|
70
|
+
get rel() {
|
|
71
|
+
return ariaProps.rel;
|
|
72
|
+
},
|
|
73
|
+
get download() {
|
|
74
|
+
return ariaProps.download;
|
|
75
|
+
},
|
|
76
|
+
get ping() {
|
|
77
|
+
return ariaProps.ping;
|
|
78
|
+
},
|
|
79
|
+
get referrerPolicy() {
|
|
80
|
+
return ariaProps.referrerPolicy;
|
|
81
|
+
},
|
|
82
|
+
get onPress() {
|
|
83
|
+
return ariaProps.onPress;
|
|
84
|
+
},
|
|
85
|
+
get onPressStart() {
|
|
86
|
+
return ariaProps.onPressStart;
|
|
87
|
+
},
|
|
88
|
+
get onPressEnd() {
|
|
89
|
+
return ariaProps.onPressEnd;
|
|
90
|
+
},
|
|
91
|
+
get onPressUp() {
|
|
92
|
+
return ariaProps.onPressUp;
|
|
93
|
+
},
|
|
94
|
+
get onPressChange() {
|
|
95
|
+
return ariaProps.onPressChange;
|
|
96
|
+
},
|
|
97
|
+
get onClick() {
|
|
98
|
+
return ariaProps.onClick;
|
|
99
|
+
},
|
|
100
|
+
get onFocus() {
|
|
101
|
+
return ariaProps.onFocus;
|
|
102
|
+
},
|
|
103
|
+
get onBlur() {
|
|
104
|
+
return ariaProps.onBlur;
|
|
105
|
+
},
|
|
106
|
+
get onFocusChange() {
|
|
107
|
+
return ariaProps.onFocusChange;
|
|
108
|
+
},
|
|
109
|
+
get onKeyDown() {
|
|
110
|
+
return ariaProps.onKeyDown;
|
|
111
|
+
},
|
|
112
|
+
get onKeyUp() {
|
|
113
|
+
return ariaProps.onKeyUp;
|
|
114
|
+
},
|
|
115
|
+
get autoFocus() {
|
|
116
|
+
return ariaProps.autoFocus;
|
|
117
|
+
},
|
|
118
|
+
get "aria-current"() {
|
|
119
|
+
return ariaProps["aria-current"];
|
|
120
|
+
},
|
|
121
|
+
get "aria-label"() {
|
|
122
|
+
return ariaProps["aria-label"];
|
|
123
|
+
},
|
|
124
|
+
get "aria-labelledby"() {
|
|
125
|
+
return ariaProps["aria-labelledby"];
|
|
126
|
+
},
|
|
127
|
+
get "aria-describedby"() {
|
|
128
|
+
return ariaProps["aria-describedby"];
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
const { isFocused, isFocusVisible, focusProps } = createFocusRing();
|
|
132
|
+
const { isHovered, hoverProps } = createHover({
|
|
133
|
+
get isDisabled() {
|
|
134
|
+
return ariaProps.isDisabled ?? false;
|
|
135
|
+
},
|
|
136
|
+
get onHoverStart() {
|
|
137
|
+
return local.onHoverStart;
|
|
138
|
+
},
|
|
139
|
+
get onHoverEnd() {
|
|
140
|
+
return local.onHoverEnd;
|
|
141
|
+
},
|
|
142
|
+
get onHoverChange() {
|
|
143
|
+
return local.onHoverChange;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
const renderValues = createMemo(() => ({
|
|
147
|
+
isCurrent: !!ariaProps["aria-current"],
|
|
148
|
+
isHovered: isHovered(),
|
|
149
|
+
isPressed: linkAria.isPressed(),
|
|
150
|
+
isFocused: isFocused(),
|
|
151
|
+
isFocusVisible: isFocusVisible(),
|
|
152
|
+
isDisabled: ariaProps.isDisabled ?? false
|
|
153
|
+
}));
|
|
154
|
+
const renderProps = useRenderProps({
|
|
155
|
+
get children() {
|
|
156
|
+
return props.children;
|
|
157
|
+
},
|
|
158
|
+
class: local.class,
|
|
159
|
+
style: local.style,
|
|
160
|
+
defaultClassName: "solidaria-Link"
|
|
161
|
+
}, renderValues);
|
|
162
|
+
const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));
|
|
163
|
+
const cleanLinkProps = () => {
|
|
164
|
+
const { ref: _ref1, ...rest } = linkAria.linkProps;
|
|
165
|
+
return rest;
|
|
166
|
+
};
|
|
167
|
+
const cleanHoverProps = () => {
|
|
168
|
+
const { ref: _ref2, ...rest } = hoverProps;
|
|
169
|
+
return rest;
|
|
170
|
+
};
|
|
171
|
+
const cleanFocusProps = () => {
|
|
172
|
+
const { ref: _ref3, ...rest } = focusProps;
|
|
173
|
+
return rest;
|
|
174
|
+
};
|
|
175
|
+
const onLinkClick = (event) => {
|
|
176
|
+
const onClick = cleanLinkProps().onClick;
|
|
177
|
+
onClick?.(event);
|
|
178
|
+
handleLinkClick(event, router, ariaProps.href, ariaProps.routerOptions);
|
|
179
|
+
};
|
|
180
|
+
return <Dynamic component={elementType()} {...domProps()} {...cleanLinkProps()} {...cleanHoverProps()} {...cleanFocusProps()} ref={(element) => {
|
|
181
|
+
assignRef(local.ref, element);
|
|
182
|
+
}} onClick={onLinkClick} class={renderProps.class()} style={renderProps.style()} data-hovered={isHovered() || void 0} data-pressed={linkAria.isPressed() || void 0} data-focused={isFocused() || void 0} data-focus-visible={isFocusVisible() || void 0} data-current={!!ariaProps["aria-current"] || void 0} data-disabled={ariaProps.isDisabled || void 0}>
|
|
183
|
+
{renderProps.renderChildren()}
|
|
184
|
+
</Dynamic>;
|
|
185
|
+
}
|
|
186
|
+
//#endregion
|
|
187
|
+
export { Link, LinkContext };
|
|
188
|
+
|
|
189
|
+
//# sourceMappingURL=Link.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link.jsx","names":[],"sources":["../src/Link.tsx"],"sourcesContent":["/**\n * Link component for solidaria-components\n *\n * Pre-wired headless link component that combines aria hooks.\n * Port of react-aria-components/src/Link.tsx\n */\n\nimport { type JSX, type ParentProps, createContext, createMemo, splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport {\n createLink,\n createFocusRing,\n createHover,\n type AriaLinkProps,\n type HoverEvents,\n} from \"@proyecto-viviana/solidaria\";\nimport {\n type RenderChildren,\n type ClassNameOrFunction,\n type StyleOrFunction,\n type SlotProps,\n useRenderProps,\n filterDOMProps,\n} from \"./utils\";\nimport { handleLinkClick, useRouter } from \"./RouterProvider\";\n\ntype RefLike<T> = ((el: T) => void) | { current?: T | null } | undefined;\n\nfunction assignRef<T>(ref: RefLike<T>, el: T): void {\n if (!ref) return;\n if (typeof ref === \"function\") {\n ref(el);\n } else {\n ref.current = el;\n }\n}\n\nexport interface LinkRenderProps {\n /** Whether the link is the current item within a list. */\n isCurrent: boolean;\n /** Whether the link is currently hovered with a mouse. */\n isHovered: boolean;\n /** Whether the link is currently in a pressed state. */\n isPressed: boolean;\n /** Whether the link is focused, either via a mouse or keyboard. */\n isFocused: boolean;\n /** Whether the link is keyboard focused. */\n isFocusVisible: boolean;\n /** Whether the link is disabled. */\n isDisabled: boolean;\n}\n\nexport interface LinkProps extends Omit<AriaLinkProps, \"elementType\">, HoverEvents, SlotProps {\n /** The children of the component. A function may be provided to receive render props. */\n children?: RenderChildren<LinkRenderProps>;\n /** The CSS className for the element. */\n class?: ClassNameOrFunction<LinkRenderProps>;\n /** The inline style for the element. */\n style?: StyleOrFunction<LinkRenderProps>;\n /** Ref for the underlying link element. */\n ref?: RefLike<HTMLElement>;\n}\n\nexport const LinkContext = createContext<LinkProps | null>(null);\n\n/**\n * A link allows a user to navigate to another page or resource within a web page\n * or application.\n *\n * @example\n * ```tsx\n * <Link href=\"https://example.com\">Visit Example</Link>\n *\n * // With render props\n * <Link href=\"/about\">\n * {({ isHovered, isFocusVisible }) => (\n * <span class={isHovered ? 'underline' : ''}>\n * About Us\n * </span>\n * )}\n * </Link>\n * ```\n */\nexport function Link(props: ParentProps<LinkProps>): JSX.Element {\n const [local, ariaProps] = splitProps(props, [\n \"children\",\n \"class\",\n \"style\",\n \"ref\",\n \"slot\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"onHoverChange\",\n ]);\n const router = useRouter();\n const resolvedHref = createMemo(() =>\n ariaProps.href ? router.useHref(ariaProps.href) : undefined,\n );\n\n const elementType = () => {\n if (ariaProps.href && !ariaProps.isDisabled) {\n return \"a\";\n }\n return \"span\";\n };\n\n const linkAria = createLink({\n get elementType() {\n return elementType();\n },\n get isDisabled() {\n return ariaProps.isDisabled;\n },\n get href() {\n return resolvedHref();\n },\n get hrefLang() {\n return ariaProps.hrefLang;\n },\n get target() {\n return ariaProps.target;\n },\n get rel() {\n return ariaProps.rel;\n },\n get download() {\n return ariaProps.download;\n },\n get ping() {\n return ariaProps.ping;\n },\n get referrerPolicy() {\n return ariaProps.referrerPolicy;\n },\n get onPress() {\n return ariaProps.onPress;\n },\n get onPressStart() {\n return ariaProps.onPressStart;\n },\n get onPressEnd() {\n return ariaProps.onPressEnd;\n },\n get onPressUp() {\n return ariaProps.onPressUp;\n },\n get onPressChange() {\n return ariaProps.onPressChange;\n },\n get onClick() {\n return ariaProps.onClick;\n },\n get onFocus() {\n return ariaProps.onFocus;\n },\n get onBlur() {\n return ariaProps.onBlur;\n },\n get onFocusChange() {\n return ariaProps.onFocusChange;\n },\n get onKeyDown() {\n return ariaProps.onKeyDown;\n },\n get onKeyUp() {\n return ariaProps.onKeyUp;\n },\n get autoFocus() {\n return ariaProps.autoFocus;\n },\n get \"aria-current\"() {\n return ariaProps[\"aria-current\"];\n },\n get \"aria-label\"() {\n return ariaProps[\"aria-label\"];\n },\n get \"aria-labelledby\"() {\n return ariaProps[\"aria-labelledby\"];\n },\n get \"aria-describedby\"() {\n return ariaProps[\"aria-describedby\"];\n },\n });\n\n const { isFocused, isFocusVisible, focusProps } = createFocusRing();\n\n const { isHovered, hoverProps } = createHover({\n get isDisabled() {\n return ariaProps.isDisabled ?? false;\n },\n get onHoverStart() {\n return local.onHoverStart;\n },\n get onHoverEnd() {\n return local.onHoverEnd;\n },\n get onHoverChange() {\n return local.onHoverChange;\n },\n });\n\n const renderValues = createMemo<LinkRenderProps>(() => ({\n isCurrent: !!ariaProps[\"aria-current\"],\n isHovered: isHovered(),\n isPressed: linkAria.isPressed(),\n isFocused: isFocused(),\n isFocusVisible: isFocusVisible(),\n isDisabled: ariaProps.isDisabled ?? false,\n }));\n\n const renderProps = useRenderProps(\n {\n get children() {\n return props.children;\n },\n class: local.class,\n style: local.style,\n defaultClassName: \"solidaria-Link\",\n },\n renderValues,\n );\n\n const domProps = createMemo(() => filterDOMProps(ariaProps, { global: true }));\n\n const cleanLinkProps = () => {\n const { ref: _ref1, ...rest } = linkAria.linkProps as Record<string, unknown>;\n return rest;\n };\n const cleanHoverProps = () => {\n const { ref: _ref2, ...rest } = hoverProps as Record<string, unknown>;\n return rest;\n };\n const cleanFocusProps = () => {\n const { ref: _ref3, ...rest } = focusProps as Record<string, unknown>;\n return rest;\n };\n const onLinkClick = (event: MouseEvent) => {\n const onClick = cleanLinkProps().onClick as ((event: MouseEvent) => void) | undefined;\n onClick?.(event);\n handleLinkClick(event, router, ariaProps.href, ariaProps.routerOptions);\n };\n\n return (\n <Dynamic\n component={elementType()}\n {...domProps()}\n {...cleanLinkProps()}\n {...cleanHoverProps()}\n {...cleanFocusProps()}\n ref={(element: HTMLElement) => {\n assignRef(local.ref, element);\n }}\n onClick={onLinkClick}\n class={renderProps.class()}\n style={renderProps.style()}\n data-hovered={isHovered() || undefined}\n data-pressed={linkAria.isPressed() || undefined}\n data-focused={isFocused() || undefined}\n data-focus-visible={isFocusVisible() || undefined}\n data-current={!!ariaProps[\"aria-current\"] || undefined}\n data-disabled={ariaProps.isDisabled || undefined}\n >\n {renderProps.renderChildren()}\n </Dynamic>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA4BA,SAAS,UAAa,KAAiB,IAAa;CAClD,IAAI,CAAC,KAAK;CACV,IAAI,OAAO,QAAQ,YACjB,IAAI,EAAE;MAEN,IAAI,UAAU;AAElB;AA4BA,MAAa,cAAc,cAAgC,IAAI;;;;;;;;;;;;;;;;;;;AAoB/D,SAAgB,KAAK,OAA4C;CAC/D,MAAM,CAAC,OAAO,aAAa,WAAW,OAAO;EAC3C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CACD,MAAM,SAAS,UAAU;CACzB,MAAM,eAAe,iBACnB,UAAU,OAAO,OAAO,QAAQ,UAAU,IAAI,IAAI,KAAA,CACpD;CAEA,MAAM,oBAAoB;EACxB,IAAI,UAAU,QAAQ,CAAC,UAAU,YAC/B,OAAO;EAET,OAAO;CACT;CAEA,MAAM,WAAW,WAAW;EAC1B,IAAI,cAAc;GAChB,OAAO,YAAY;EACrB;EACA,IAAI,aAAa;GACf,OAAO,UAAU;E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 +61,7 @@ export interface ListBoxProps<T> extends Omit<AriaListBoxProps, "children">, Slo
|
|
|
61
61
|
/** Called when the load more sentinel becomes visible. */
|
|
62
62
|
onLoadMore?: () => void | Promise<void>;
|
|
63
63
|
/** Ref for the listbox element. */
|
|
64
|
-
ref?: RefLike<
|
|
64
|
+
ref?: RefLike<HTMLDivElement>;
|
|
65
65
|
/** Drag and drop hooks from `useDragAndDrop`. */
|
|
66
66
|
dragAndDropHooks?: DragAndDropHooks<T>;
|
|
67
67
|
/** Layout hint for styling parity. */
|
|
@@ -99,7 +99,7 @@ export interface ListBoxOptionProps<T> extends Omit<AriaOptionProps, "children"
|
|
|
99
99
|
/** The text value of the option (for typeahead). */
|
|
100
100
|
textValue?: string;
|
|
101
101
|
/** Ref for the option element. */
|
|
102
|
-
ref?: RefLike<
|
|
102
|
+
ref?: RefLike<HTMLDivElement>;
|
|
103
103
|
}
|
|
104
104
|
export interface ListBoxLoadMoreItemProps extends SlotProps {
|
|
105
105
|
/** Called when the sentinel becomes visible. */
|
package/dist/ListBox.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListBox.d.ts","sourceRoot":"","sources":["../src/ListBox.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"ListBox.d.ts","sourceRoot":"","sources":["../src/ListBox.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,GAAG,EAWT,MAAM,UAAU,CAAC;AAClB,OAAO,EAgBL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAGL,KAAK,SAAS,EAEd,KAAK,GAAG,EAET,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,SAAS,EAGf,MAAM,SAAS,CAAC;AAOjB,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