@proyecto-viviana/solidaria-components 0.2.9 → 0.3.0
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/README.md +39 -272
- package/dist/ActionBar.d.ts +21 -13
- package/dist/ActionBar.d.ts.map +1 -1
- package/dist/ActionGroup.d.ts +8 -8
- package/dist/ActionGroup.d.ts.map +1 -1
- package/dist/Alert.d.ts +5 -5
- package/dist/Alert.d.ts.map +1 -1
- package/dist/Autocomplete.d.ts +5 -5
- package/dist/Autocomplete.d.ts.map +1 -1
- package/dist/Breadcrumbs.d.ts +18 -7
- package/dist/Breadcrumbs.d.ts.map +1 -1
- package/dist/Button.d.ts +24 -5
- package/dist/Button.d.ts.map +1 -1
- package/dist/Calendar.d.ts +38 -7
- package/dist/Calendar.d.ts.map +1 -1
- package/dist/Checkbox.d.ts +32 -7
- package/dist/Checkbox.d.ts.map +1 -1
- package/dist/Collection.d.ts +19 -14
- package/dist/Collection.d.ts.map +1 -1
- package/dist/Color.d.ts +103 -14
- package/dist/Color.d.ts.map +1 -1
- package/dist/ColorEditor.d.ts +6 -6
- package/dist/ColorEditor.d.ts.map +1 -1
- package/dist/ComboBox.d.ts +85 -19
- package/dist/ComboBox.d.ts.map +1 -1
- package/dist/ContextualHelpTrigger.d.ts +2 -2
- package/dist/ContextualHelpTrigger.d.ts.map +1 -1
- package/dist/DateField.d.ts +8 -6
- package/dist/DateField.d.ts.map +1 -1
- package/dist/DatePicker.d.ts +53 -22
- package/dist/DatePicker.d.ts.map +1 -1
- package/dist/DateRangePickerContext.d.ts +30 -0
- package/dist/DateRangePickerContext.d.ts.map +1 -0
- package/dist/Dialog.d.ts +5 -5
- package/dist/Dialog.d.ts.map +1 -1
- package/dist/Disclosure.d.ts +23 -5
- package/dist/Disclosure.d.ts.map +1 -1
- package/dist/DragAndDrop.d.ts +6 -6
- package/dist/DragAndDrop.d.ts.map +1 -1
- package/dist/DragPreview.d.ts +2 -2
- package/dist/DragPreview.d.ts.map +1 -1
- package/dist/DropZone.d.ts +4 -4
- package/dist/DropZone.d.ts.map +1 -1
- package/dist/FieldError.d.ts +9 -5
- package/dist/FieldError.d.ts.map +1 -1
- package/dist/FileTrigger.d.ts +3 -3
- package/dist/FileTrigger.d.ts.map +1 -1
- package/dist/Focusable.d.ts +2 -2
- package/dist/Focusable.d.ts.map +1 -1
- package/dist/Form.d.ts +18 -4
- package/dist/Form.d.ts.map +1 -1
- package/dist/GridList.d.ts +32 -12
- package/dist/GridList.d.ts.map +1 -1
- package/dist/HiddenDateInput.d.ts +26 -0
- package/dist/HiddenDateInput.d.ts.map +1 -0
- package/dist/HiddenTimeInput.d.ts +25 -0
- package/dist/HiddenTimeInput.d.ts.map +1 -0
- package/dist/Icon.d.ts +5 -5
- package/dist/Icon.d.ts.map +1 -1
- package/dist/Keyboard.d.ts +1 -1
- package/dist/Landmark.d.ts +3 -3
- package/dist/Landmark.d.ts.map +1 -1
- package/dist/Link.d.ts +10 -4
- package/dist/Link.d.ts.map +1 -1
- package/dist/ListBox.d.ts +32 -12
- package/dist/ListBox.d.ts.map +1 -1
- package/dist/ListDropTargetDelegate.d.ts +6 -6
- package/dist/ListDropTargetDelegate.d.ts.map +1 -1
- package/dist/Menu.d.ts +65 -14
- package/dist/Menu.d.ts.map +1 -1
- package/dist/Meter.d.ts +3 -3
- package/dist/Meter.d.ts.map +1 -1
- package/dist/Modal.d.ts +5 -5
- package/dist/Modal.d.ts.map +1 -1
- package/dist/NumberField.d.ts +8 -12
- package/dist/NumberField.d.ts.map +1 -1
- package/dist/Popover.d.ts +28 -5
- package/dist/Popover.d.ts.map +1 -1
- package/dist/Pressable.d.ts +2 -2
- package/dist/Pressable.d.ts.map +1 -1
- package/dist/ProgressBar.d.ts +5 -3
- package/dist/ProgressBar.d.ts.map +1 -1
- package/dist/RadioGroup.d.ts +43 -9
- package/dist/RadioGroup.d.ts.map +1 -1
- package/dist/RangeCalendar.d.ts +34 -7
- package/dist/RangeCalendar.d.ts.map +1 -1
- package/dist/RouterProvider.d.ts +2 -2
- package/dist/RouterProvider.d.ts.map +1 -1
- package/dist/SearchField.d.ts +23 -20
- package/dist/SearchField.d.ts.map +1 -1
- package/dist/Select.d.ts +41 -11
- package/dist/Select.d.ts.map +1 -1
- package/dist/SelectionIndicator.d.ts +3 -3
- package/dist/SelectionIndicator.d.ts.map +1 -1
- package/dist/Separator.d.ts +9 -3
- package/dist/Separator.d.ts.map +1 -1
- package/dist/SharedElementTransition.d.ts +6 -4
- package/dist/SharedElementTransition.d.ts.map +1 -1
- package/dist/Slider.d.ts +12 -8
- package/dist/Slider.d.ts.map +1 -1
- package/dist/StepList.d.ts +90 -0
- package/dist/StepList.d.ts.map +1 -0
- package/dist/Switch.d.ts +11 -5
- package/dist/Switch.d.ts.map +1 -1
- package/dist/Table.d.ts +187 -23
- package/dist/Table.d.ts.map +1 -1
- package/dist/Tabs.d.ts +45 -9
- package/dist/Tabs.d.ts.map +1 -1
- package/dist/TagGroup.d.ts +12 -10
- package/dist/TagGroup.d.ts.map +1 -1
- package/dist/Text.d.ts +2 -2
- package/dist/TextField.d.ts +15 -11
- package/dist/TextField.d.ts.map +1 -1
- package/dist/TimeField.d.ts +6 -6
- package/dist/TimeField.d.ts.map +1 -1
- package/dist/Toast.d.ts +29 -14
- package/dist/Toast.d.ts.map +1 -1
- package/dist/ToggleButton.d.ts +11 -5
- package/dist/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButtonGroup.d.ts +7 -7
- package/dist/ToggleButtonGroup.d.ts.map +1 -1
- package/dist/Toolbar.d.ts +7 -3
- package/dist/Toolbar.d.ts.map +1 -1
- package/dist/Tooltip.d.ts +50 -8
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/Tree.d.ts +66 -17
- package/dist/Tree.d.ts.map +1 -1
- package/dist/Virtualizer.d.ts +12 -12
- package/dist/Virtualizer.d.ts.map +1 -1
- package/dist/VirtualizerLayouts.d.ts +2 -2
- package/dist/VirtualizerLayouts.d.ts.map +1 -1
- package/dist/VisuallyHidden.d.ts +1 -1
- package/dist/VisuallyHidden.d.ts.map +1 -1
- package/dist/contexts.d.ts +5 -1
- package/dist/contexts.d.ts.map +1 -1
- package/dist/index.d.ts +73 -71
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23247 -18564
- package/dist/index.js.map +1 -1
- package/dist/index.jsx +18110 -0
- package/dist/index.jsx.map +1 -0
- package/dist/useDragAndDrop.d.ts +13 -13
- package/dist/useDragAndDrop.d.ts.map +1 -1
- package/dist/utils.d.ts +2 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/virtualizer/Layout.d.ts +1 -1
- package/dist/virtualizer/Layout.d.ts.map +1 -1
- package/package.json +31 -32
- package/src/ActionBar.tsx +75 -72
- package/src/ActionGroup.tsx +53 -61
- package/src/Alert.tsx +17 -42
- package/src/Autocomplete.tsx +39 -44
- package/src/Breadcrumbs.tsx +149 -80
- package/src/Button.tsx +267 -70
- package/src/Calendar.tsx +218 -138
- package/src/Checkbox.tsx +413 -121
- package/src/Collection.tsx +67 -58
- package/src/Color.tsx +803 -380
- package/src/ColorEditor.tsx +131 -149
- package/src/ComboBox.tsx +414 -249
- package/src/ContextualHelpTrigger.tsx +86 -74
- package/src/DateField.tsx +185 -91
- package/src/DatePicker.tsx +524 -213
- package/src/DateRangePickerContext.tsx +44 -0
- package/src/Dialog.tsx +156 -118
- package/src/Disclosure.tsx +127 -80
- package/src/DragAndDrop.tsx +60 -54
- package/src/DragPreview.tsx +13 -11
- package/src/DropZone.tsx +42 -22
- package/src/FieldError.tsx +45 -23
- package/src/FileTrigger.tsx +19 -19
- package/src/Focusable.tsx +21 -24
- package/src/Form.tsx +71 -16
- package/src/GridList.tsx +273 -197
- package/src/HiddenDateInput.tsx +153 -0
- package/src/HiddenTimeInput.tsx +133 -0
- package/src/Icon.tsx +22 -43
- package/src/Keyboard.tsx +3 -3
- package/src/Landmark.tsx +37 -63
- package/src/Link.tsx +125 -75
- package/src/ListBox.tsx +332 -233
- package/src/ListDropTargetDelegate.ts +81 -80
- package/src/Menu.tsx +1023 -274
- package/src/Meter.tsx +38 -56
- package/src/Modal.tsx +243 -175
- package/src/NumberField.tsx +139 -143
- package/src/Popover.tsx +386 -233
- package/src/Pressable.tsx +21 -21
- package/src/ProgressBar.tsx +48 -57
- package/src/RadioGroup.tsx +524 -122
- package/src/RangeCalendar.tsx +157 -90
- package/src/RouterProvider.tsx +30 -47
- package/src/SearchField.tsx +362 -143
- package/src/Select.tsx +656 -233
- package/src/SelectionIndicator.tsx +18 -15
- package/src/Separator.tsx +47 -49
- package/src/SharedElementTransition.tsx +103 -97
- package/src/Slider.tsx +138 -98
- package/src/StepList.tsx +272 -0
- package/src/Switch.tsx +93 -46
- package/src/Table.tsx +1308 -342
- package/src/Tabs.tsx +324 -103
- package/src/TagGroup.tsx +139 -126
- package/src/Text.tsx +3 -3
- package/src/TextField.tsx +389 -79
- package/src/TimeField.tsx +136 -76
- package/src/Toast.tsx +209 -157
- package/src/ToggleButton.tsx +47 -37
- package/src/ToggleButtonGroup.tsx +39 -34
- package/src/Toolbar.tsx +54 -69
- package/src/Tooltip.tsx +387 -119
- package/src/Tree.tsx +651 -368
- package/src/Virtualizer.tsx +208 -180
- package/src/VirtualizerLayouts.ts +45 -30
- package/src/VisuallyHidden.tsx +19 -19
- package/src/contexts.ts +29 -37
- package/src/index.ts +110 -195
- package/src/useDragAndDrop.ts +87 -71
- package/src/utils.tsx +40 -55
- package/src/virtualizer/Layout.ts +14 -22
- package/dist/index.ssr.js +0 -16996
- package/dist/index.ssr.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,304 +1,71 @@
|
|
|
1
1
|
# @proyecto-viviana/solidaria-components
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
SolidJS port of React Aria Components: unstyled, accessible components built on
|
|
4
|
+
`@proyecto-viviana/solidaria` and `@proyecto-viviana/solid-stately`.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
This package is still part of a parity port. Do not treat export coverage as a
|
|
7
|
+
production readiness guarantee.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
6
10
|
|
|
7
11
|
```bash
|
|
8
|
-
|
|
12
|
+
npm install @proyecto-viviana/solidaria-components solid-js
|
|
9
13
|
```
|
|
10
14
|
|
|
11
|
-
## Overview
|
|
12
|
-
|
|
13
|
-
solidaria-components provides ready-to-use headless components that combine state management and accessibility in one package. Unlike the lower-level hooks in solidaria, these components handle all the wiring for you while giving you full control over styling through render props and data attributes.
|
|
14
|
-
|
|
15
|
-
## Available Components
|
|
16
|
-
|
|
17
|
-
### Form Controls
|
|
18
|
-
|
|
19
|
-
| Component | Description |
|
|
20
|
-
|-----------|-------------|
|
|
21
|
-
| Button | Accessible button with press states |
|
|
22
|
-
| Checkbox, CheckboxGroup | Checkboxes with group support |
|
|
23
|
-
| Radio, RadioGroup | Radio buttons |
|
|
24
|
-
| ToggleSwitch | Toggle switch control |
|
|
25
|
-
| TextField, Input, TextArea, Label | Text inputs with labels |
|
|
26
|
-
| NumberField | Numeric input with inc/dec buttons |
|
|
27
|
-
| SearchField | Search input with clear button |
|
|
28
|
-
| Slider, SliderTrack, SliderThumb | Range slider |
|
|
29
|
-
|
|
30
|
-
### Navigation
|
|
31
|
-
|
|
32
|
-
| Component | Description |
|
|
33
|
-
|-----------|-------------|
|
|
34
|
-
| Tabs, TabList, Tab, TabPanel | Tabbed navigation |
|
|
35
|
-
| Breadcrumbs, BreadcrumbItem | Breadcrumb navigation |
|
|
36
|
-
| Link | Accessible link |
|
|
37
|
-
| Landmark | ARIA landmark regions with F6 navigation |
|
|
38
|
-
|
|
39
|
-
### Selection
|
|
40
|
-
|
|
41
|
-
| Component | Description |
|
|
42
|
-
|-----------|-------------|
|
|
43
|
-
| Select, SelectTrigger, SelectValue, SelectListBox, SelectOption | Dropdown select |
|
|
44
|
-
| Menu, MenuItem, MenuTrigger, MenuButton | Action menus |
|
|
45
|
-
| ListBox, ListBoxOption | Selectable lists |
|
|
46
|
-
|
|
47
|
-
### Feedback & Layout
|
|
48
|
-
|
|
49
|
-
| Component | Description |
|
|
50
|
-
|-----------|-------------|
|
|
51
|
-
| ProgressBar | Progress indicator |
|
|
52
|
-
| Separator | Visual divider |
|
|
53
|
-
| VisuallyHidden | Screen reader only content |
|
|
54
|
-
|
|
55
15
|
## Usage
|
|
56
16
|
|
|
57
|
-
### Render Props Pattern
|
|
58
|
-
|
|
59
|
-
Components expose state through render props for full styling control:
|
|
60
|
-
|
|
61
17
|
```tsx
|
|
62
18
|
import { Button } from "@proyecto-viviana/solidaria-components";
|
|
63
19
|
|
|
64
|
-
function
|
|
65
|
-
return (
|
|
66
|
-
<Button onPress={() => console.log("pressed")}>
|
|
67
|
-
{({ isPressed, isHovered, isFocusVisible }) => (
|
|
68
|
-
<span
|
|
69
|
-
class={`btn ${isPressed() ? "pressed" : ""} ${isHovered() ? "hovered" : ""}`}
|
|
70
|
-
>
|
|
71
|
-
Click me
|
|
72
|
-
</span>
|
|
73
|
-
)}
|
|
74
|
-
</Button>
|
|
75
|
-
);
|
|
20
|
+
export function SaveButton() {
|
|
21
|
+
return <Button onPress={() => save()}>Save</Button>;
|
|
76
22
|
}
|
|
77
23
|
```
|
|
78
24
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
Components also expose state via data attributes for CSS styling:
|
|
25
|
+
Components are headless. Style them with classes, data attributes, and render
|
|
26
|
+
props.
|
|
82
27
|
|
|
83
28
|
```tsx
|
|
84
29
|
import { Button } from "@proyecto-viviana/solidaria-components";
|
|
85
30
|
|
|
86
|
-
function
|
|
87
|
-
return (
|
|
88
|
-
<Button class="my-button" onPress={() => {}}>
|
|
89
|
-
Click me
|
|
90
|
-
</Button>
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
```css
|
|
96
|
-
.my-button {
|
|
97
|
-
background: blue;
|
|
98
|
-
}
|
|
99
|
-
.my-button[data-pressed] {
|
|
100
|
-
background: darkblue;
|
|
101
|
-
}
|
|
102
|
-
.my-button[data-hovered] {
|
|
103
|
-
background: lightblue;
|
|
104
|
-
}
|
|
105
|
-
.my-button[data-focus-visible] {
|
|
106
|
-
outline: 2px solid white;
|
|
107
|
-
}
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Checkbox Example
|
|
111
|
-
|
|
112
|
-
```tsx
|
|
113
|
-
import { Checkbox, CheckboxGroup } from "@proyecto-viviana/solidaria-components";
|
|
114
|
-
|
|
115
|
-
function Preferences() {
|
|
116
|
-
return (
|
|
117
|
-
<CheckboxGroup>
|
|
118
|
-
{({ groupProps }) => (
|
|
119
|
-
<div {...groupProps}>
|
|
120
|
-
<Checkbox value="newsletter">
|
|
121
|
-
{({ inputProps, isSelected }) => (
|
|
122
|
-
<label>
|
|
123
|
-
<input {...inputProps} />
|
|
124
|
-
<span class={isSelected() ? "checked" : ""}>
|
|
125
|
-
Subscribe to newsletter
|
|
126
|
-
</span>
|
|
127
|
-
</label>
|
|
128
|
-
)}
|
|
129
|
-
</Checkbox>
|
|
130
|
-
<Checkbox value="updates">
|
|
131
|
-
{({ inputProps, isSelected }) => (
|
|
132
|
-
<label>
|
|
133
|
-
<input {...inputProps} />
|
|
134
|
-
<span class={isSelected() ? "checked" : ""}>
|
|
135
|
-
Receive updates
|
|
136
|
-
</span>
|
|
137
|
-
</label>
|
|
138
|
-
)}
|
|
139
|
-
</Checkbox>
|
|
140
|
-
</div>
|
|
141
|
-
)}
|
|
142
|
-
</CheckboxGroup>
|
|
143
|
-
);
|
|
144
|
-
}
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
### Select Example
|
|
148
|
-
|
|
149
|
-
```tsx
|
|
150
|
-
import { Select, SelectTrigger, SelectValue, SelectListBox, SelectOption } from "@proyecto-viviana/solidaria-components";
|
|
151
|
-
|
|
152
|
-
const countries = [
|
|
153
|
-
{ key: "us", label: "United States" },
|
|
154
|
-
{ key: "uk", label: "United Kingdom" },
|
|
155
|
-
{ key: "ca", label: "Canada" },
|
|
156
|
-
];
|
|
157
|
-
|
|
158
|
-
function CountrySelect() {
|
|
159
|
-
return (
|
|
160
|
-
<Select items={countries} onSelectionChange={(key) => console.log(key)}>
|
|
161
|
-
<SelectTrigger>
|
|
162
|
-
<SelectValue placeholder="Select a country" />
|
|
163
|
-
</SelectTrigger>
|
|
164
|
-
<SelectListBox>
|
|
165
|
-
{(item) => (
|
|
166
|
-
<SelectOption key={item.key}>
|
|
167
|
-
{({ isSelected, isFocused }) => (
|
|
168
|
-
<span class={`option ${isSelected() ? "selected" : ""}`}>
|
|
169
|
-
{item.label}
|
|
170
|
-
</span>
|
|
171
|
-
)}
|
|
172
|
-
</SelectOption>
|
|
173
|
-
)}
|
|
174
|
-
</SelectListBox>
|
|
175
|
-
</Select>
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### Tabs Example
|
|
181
|
-
|
|
182
|
-
```tsx
|
|
183
|
-
import { Tabs, TabList, Tab, TabPanel } from "@proyecto-viviana/solidaria-components";
|
|
184
|
-
|
|
185
|
-
const tabs = [
|
|
186
|
-
{ id: "overview", label: "Overview", content: "Overview content here" },
|
|
187
|
-
{ id: "features", label: "Features", content: "Features content here" },
|
|
188
|
-
{ id: "pricing", label: "Pricing", content: "Pricing content here" },
|
|
189
|
-
];
|
|
190
|
-
|
|
191
|
-
function Navigation() {
|
|
31
|
+
export function ToolbarButton() {
|
|
192
32
|
return (
|
|
193
|
-
<
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
)}
|
|
202
|
-
</TabList>
|
|
203
|
-
{tabs.map((tab) => (
|
|
204
|
-
<TabPanel key={tab.id}>{tab.content}</TabPanel>
|
|
205
|
-
))}
|
|
206
|
-
</Tabs>
|
|
207
|
-
);
|
|
208
|
-
}
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### Slider Example
|
|
212
|
-
|
|
213
|
-
```tsx
|
|
214
|
-
import { Slider, SliderTrack, SliderThumb, SliderOutput } from "@proyecto-viviana/solidaria-components";
|
|
215
|
-
|
|
216
|
-
function VolumeSlider() {
|
|
217
|
-
return (
|
|
218
|
-
<Slider defaultValue={50} minValue={0} maxValue={100}>
|
|
219
|
-
{({ value, getValuePercent }) => (
|
|
220
|
-
<>
|
|
221
|
-
<div class="label-row">
|
|
222
|
-
<span>Volume</span>
|
|
223
|
-
<SliderOutput />
|
|
224
|
-
</div>
|
|
225
|
-
<SliderTrack>
|
|
226
|
-
{({ isDragging }) => (
|
|
227
|
-
<div class={`track ${isDragging() ? "dragging" : ""}`}>
|
|
228
|
-
<div class="fill" style={{ width: `${getValuePercent() * 100}%` }} />
|
|
229
|
-
<SliderThumb>
|
|
230
|
-
{({ isFocusVisible }) => (
|
|
231
|
-
<div class={`thumb ${isFocusVisible() ? "focused" : ""}`} />
|
|
232
|
-
)}
|
|
233
|
-
</SliderThumb>
|
|
234
|
-
</div>
|
|
235
|
-
)}
|
|
236
|
-
</SliderTrack>
|
|
237
|
-
</>
|
|
33
|
+
<Button class="button">
|
|
34
|
+
{({ isPressed, isFocusVisible }) => (
|
|
35
|
+
<span
|
|
36
|
+
data-pressed={isPressed() || undefined}
|
|
37
|
+
data-focus-visible={isFocusVisible() || undefined}
|
|
38
|
+
>
|
|
39
|
+
Save
|
|
40
|
+
</span>
|
|
238
41
|
)}
|
|
239
|
-
</
|
|
42
|
+
</Button>
|
|
240
43
|
);
|
|
241
44
|
}
|
|
242
45
|
```
|
|
243
46
|
|
|
244
|
-
##
|
|
47
|
+
## Current Parity Evidence
|
|
245
48
|
|
|
246
|
-
|
|
49
|
+
As of the 2026-05-12 local report:
|
|
247
50
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
return <div>Selected: {state?.selectedKey()}</div>;
|
|
254
|
-
}
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
## Styling Approaches
|
|
258
|
-
|
|
259
|
-
### 1. Render Props (Most Control)
|
|
260
|
-
|
|
261
|
-
```tsx
|
|
262
|
-
<Button>
|
|
263
|
-
{({ isPressed, isHovered }) => (
|
|
264
|
-
<span style={{ background: isPressed() ? "red" : isHovered() ? "pink" : "blue" }}>
|
|
265
|
-
Click
|
|
266
|
-
</span>
|
|
267
|
-
)}
|
|
268
|
-
</Button>
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
### 2. Data Attributes (CSS)
|
|
272
|
-
|
|
273
|
-
```tsx
|
|
274
|
-
<Button class="btn">Click</Button>
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
```css
|
|
278
|
-
.btn[data-pressed] { background: red; }
|
|
279
|
-
.btn[data-hovered] { background: pink; }
|
|
280
|
-
```
|
|
51
|
+
- `vp run guard:rac-export-gap` reports `0` missing React Aria Components named
|
|
52
|
+
exports.
|
|
53
|
+
- `vp run guard:rac-parity` reports no missing required tracked symbols.
|
|
54
|
+
- The package has extra Solid exports and aliases compared with upstream RAC.
|
|
55
|
+
Treat those as local API and document intentional additions in changesets.
|
|
281
56
|
|
|
282
|
-
|
|
57
|
+
The barrel in [`src/index.ts`](src/index.ts) is the source of truth for the
|
|
58
|
+
current public surface. This README intentionally does not duplicate the full
|
|
59
|
+
export list.
|
|
283
60
|
|
|
284
|
-
|
|
285
|
-
<Button class={({ isPressed }) => isPressed() ? "pressed" : "normal"}>
|
|
286
|
-
Click
|
|
287
|
-
</Button>
|
|
288
|
-
```
|
|
61
|
+
## Verification
|
|
289
62
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
import {
|
|
296
|
-
Button,
|
|
297
|
-
type ButtonProps,
|
|
298
|
-
type ButtonRenderProps,
|
|
299
|
-
} from "@proyecto-viviana/solidaria-components";
|
|
63
|
+
```bash
|
|
64
|
+
vp run guard:rac-parity
|
|
65
|
+
vp run guard:rac-export-gap
|
|
66
|
+
vp run --filter @proyecto-viviana/solidaria-components build
|
|
67
|
+
vp test run packages
|
|
300
68
|
```
|
|
301
69
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
MIT
|
|
70
|
+
When changing behavior, add focused tests under `test/` that use semantic
|
|
71
|
+
queries and user-like interactions rather than implementation markers alone.
|
package/dist/ActionBar.d.ts
CHANGED
|
@@ -7,20 +7,23 @@
|
|
|
7
7
|
* No RAC headless equivalent — this is a thin component layer that ties
|
|
8
8
|
* selection state to visibility and keyboard behavior.
|
|
9
9
|
*/
|
|
10
|
-
import { type JSX, type ParentProps } from
|
|
11
|
-
import type { Key } from
|
|
12
|
-
import { type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from
|
|
10
|
+
import { type JSX, type ParentProps } from "solid-js";
|
|
11
|
+
import type { Key } from "@proyecto-viviana/solid-stately";
|
|
12
|
+
import { type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from "./utils";
|
|
13
|
+
type RefLike<T> = ((el: T) => void) | {
|
|
14
|
+
current?: T | null;
|
|
15
|
+
} | undefined;
|
|
13
16
|
export interface ActionBarRenderProps {
|
|
14
17
|
/** Whether the action bar is visible. */
|
|
15
18
|
isOpen: boolean;
|
|
16
19
|
/** The number of selected items. */
|
|
17
|
-
selectedItemCount: number |
|
|
20
|
+
selectedItemCount: number | "all";
|
|
18
21
|
}
|
|
19
|
-
export interface ActionBarProps extends SlotProps {
|
|
20
|
-
/** The number of selected items. ActionBar is hidden when 0. */
|
|
21
|
-
selectedItemCount
|
|
22
|
+
export interface ActionBarProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "class" | "style" | "children" | "ref" | "slot">, SlotProps {
|
|
23
|
+
/** The number of selected items. ActionBar is hidden when 0. @default 0 */
|
|
24
|
+
selectedItemCount?: number | "all";
|
|
22
25
|
/** Callback when the clear button is pressed. */
|
|
23
|
-
onClearSelection
|
|
26
|
+
onClearSelection?: () => void;
|
|
24
27
|
/** Callback when an action is triggered. */
|
|
25
28
|
onAction?: (key: Key) => void;
|
|
26
29
|
/** The action buttons to display. */
|
|
@@ -30,15 +33,19 @@ export interface ActionBarProps extends SlotProps {
|
|
|
30
33
|
/** Inline style for the container. */
|
|
31
34
|
style?: StyleOrFunction<ActionBarRenderProps>;
|
|
32
35
|
/** Accessible label for the action bar. @default 'Actions' */
|
|
33
|
-
|
|
36
|
+
"aria-label"?: string;
|
|
34
37
|
/** Identifies the element (or elements) that labels the action bar. */
|
|
35
|
-
|
|
38
|
+
"aria-labelledby"?: string;
|
|
36
39
|
/** Optional keydown handler on the action bar element. */
|
|
37
40
|
onKeyDown?: JSX.EventHandlerUnion<HTMLDivElement, KeyboardEvent>;
|
|
41
|
+
/** Screen reader announcement when the action bar becomes available. */
|
|
42
|
+
actionsAvailableMessage?: string;
|
|
43
|
+
/** Ref for the underlying action bar element. */
|
|
44
|
+
ref?: RefLike<HTMLDivElement>;
|
|
38
45
|
}
|
|
39
46
|
export interface ActionBarContextValue {
|
|
40
|
-
selectedItemCount: () => number |
|
|
41
|
-
onClearSelection
|
|
47
|
+
selectedItemCount: () => number | "all";
|
|
48
|
+
onClearSelection?: () => void;
|
|
42
49
|
onAction?: (key: Key) => void;
|
|
43
50
|
}
|
|
44
51
|
export declare const ActionBarContext: import("solid-js").Context<ActionBarContextValue | null>;
|
|
@@ -62,10 +69,11 @@ export declare function ActionBarSelectionCount(props: ActionBarSelectionCountPr
|
|
|
62
69
|
export interface ActionBarClearButtonProps {
|
|
63
70
|
class?: string;
|
|
64
71
|
children?: JSX.Element;
|
|
65
|
-
|
|
72
|
+
"aria-label"?: string;
|
|
66
73
|
}
|
|
67
74
|
/**
|
|
68
75
|
* Button to clear the current selection.
|
|
69
76
|
*/
|
|
70
77
|
export declare function ActionBarClearButton(props: ActionBarClearButtonProps): JSX.Element;
|
|
78
|
+
export {};
|
|
71
79
|
//# sourceMappingURL=ActionBar.d.ts.map
|
package/dist/ActionBar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionBar.d.ts","sourceRoot":"","sources":["../src/ActionBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,KAAK,GAAG,EACR,KAAK,WAAW,EAOjB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,SAAS,EAGf,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionBar.d.ts","sourceRoot":"","sources":["../src/ActionBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,KAAK,GAAG,EACR,KAAK,WAAW,EAOjB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,SAAS,EAGf,MAAM,SAAS,CAAC;AAEjB,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,CAAA;CAAE,GAAG,SAAS,CAAC;AAWzE,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,MAAM,EAAE,OAAO,CAAC;IAChB,oCAAoC;IACpC,iBAAiB,EAAE,MAAM,GAAG,KAAK,CAAC;CACnC;AAED,MAAM,WAAW,cACf,SACE,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,KAAK,GAAG,MAAM,CAAC,EACzF,SAAS;IACX,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IACnC,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,4CAA4C;IAC5C,Q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C,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,GAAG,GAAG,CAAC,OAAO,CAYxF;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,GAAG,CAAC,OAAO,CAalF"}
|
package/dist/ActionGroup.d.ts
CHANGED
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
* No RAC equivalent exists — this bridges solidaria ARIA hooks
|
|
10
10
|
* directly to a headless component.
|
|
11
11
|
*/
|
|
12
|
-
import { type JSX } from
|
|
13
|
-
import { type ListState, type Key, type SelectionMode } from
|
|
14
|
-
import { type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from
|
|
12
|
+
import { type JSX } from "solid-js";
|
|
13
|
+
import { type ListState, type Key, type SelectionMode } from "@proyecto-viviana/solid-stately";
|
|
14
|
+
import { type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from "./utils";
|
|
15
15
|
export interface ActionGroupRenderProps {
|
|
16
16
|
/** The orientation of the action group. */
|
|
17
|
-
orientation:
|
|
17
|
+
orientation: "horizontal" | "vertical";
|
|
18
18
|
/** Whether the entire group is disabled. */
|
|
19
19
|
isDisabled: boolean;
|
|
20
20
|
/** The selection mode. */
|
|
@@ -40,19 +40,19 @@ export interface ActionGroupProps<T extends ActionGroupItem = ActionGroupItem> e
|
|
|
40
40
|
/** The selection mode. @default 'none' */
|
|
41
41
|
selectionMode?: SelectionMode;
|
|
42
42
|
/** Orientation of the group. @default 'horizontal' */
|
|
43
|
-
orientation?:
|
|
43
|
+
orientation?: "horizontal" | "vertical";
|
|
44
44
|
/** Whether the entire group is disabled. */
|
|
45
45
|
isDisabled?: boolean;
|
|
46
46
|
/** Accessible label. */
|
|
47
|
-
|
|
47
|
+
"aria-label"?: string;
|
|
48
48
|
/** Labelled-by id. */
|
|
49
|
-
|
|
49
|
+
"aria-labelledby"?: string;
|
|
50
50
|
/** Currently selected keys (controlled). */
|
|
51
51
|
selectedKeys?: Iterable<Key>;
|
|
52
52
|
/** Default selected keys (uncontrolled). */
|
|
53
53
|
defaultSelectedKeys?: Iterable<Key>;
|
|
54
54
|
/** Handler called when selection changes. */
|
|
55
|
-
onSelectionChange?: (keys:
|
|
55
|
+
onSelectionChange?: (keys: "all" | Set<Key>) => void;
|
|
56
56
|
/** Handler called when an item action is triggered. */
|
|
57
57
|
onAction?: (key: Key) => void;
|
|
58
58
|
/** Keys of disabled items. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionGroup.d.ts","sourceRoot":"","sources":["../src/ActionGroup.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,KAAK,GAAG,EAOT,MAAM,UAAU,CAAC;AAMlB,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,aAAa,EACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,SAAS,EAGf,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionGroup.d.ts","sourceRoot":"","sources":["../src/ActionGroup.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,KAAK,GAAG,EAOT,MAAM,UAAU,CAAC;AAMlB,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,aAAa,EACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,SAAS,EAGf,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,sBAAsB;IACrC,2CAA2C;IAC3C,WAAW,EAAE,YAAY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C,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC7B,qCAAqC;IACrC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,0BAA0B,KAAK,GAAG,CAAC,OAAO,CAAC;IAC5E,mCAAmC;IACnC,KAAK,CAAC,EAAE,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;IACpD,sCAAsC;IACtC,KAAK,CAAC,EAAE,eAAe,CAAC,sBAAsB,CAAC,CAAC;CACjD;AAED,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe;IAClF,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,6EAAsD,CAAC;AACtF,eAAO,MAAM,uBAAuB,+DAAyD,CAAC;AAE9F,wBAAgB,WAAW,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,EACrE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,GACzB,GAAG,CAAC,OAAO,CA0Hb;AA+CD,wBAAgB,qBAAqB,IAAI,uBAAuB,GAAG,IAAI,CAEtE"}
|
package/dist/Alert.d.ts
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* and provides render props for styling. The UI layer consumes this
|
|
6
6
|
* for styling/composition only.
|
|
7
7
|
*/
|
|
8
|
-
import { type JSX } from
|
|
9
|
-
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from
|
|
10
|
-
import { type ButtonProps } from
|
|
11
|
-
export type AlertVariant =
|
|
8
|
+
import { type JSX } from "solid-js";
|
|
9
|
+
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from "./utils";
|
|
10
|
+
import { type ButtonProps } from "./Button";
|
|
11
|
+
export type AlertVariant = "info" | "success" | "warning" | "error";
|
|
12
12
|
export interface AlertRenderProps {
|
|
13
13
|
/** The variant of the alert. */
|
|
14
14
|
variant: AlertVariant;
|
|
@@ -52,7 +52,7 @@ export declare const AlertContext: import("solid-js").Context<AlertContextValue
|
|
|
52
52
|
* ```
|
|
53
53
|
*/
|
|
54
54
|
export declare function Alert(props: AlertProps): JSX.Element;
|
|
55
|
-
export interface AlertDismissButtonProps extends Omit<ButtonProps,
|
|
55
|
+
export interface AlertDismissButtonProps extends Omit<ButtonProps, "onPress"> {
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* A dismiss button for use inside an Alert.
|
package/dist/Alert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../src/Alert.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../src/Alert.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAqD,MAAM,UAAU,CAAC;AACvF,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,SAAS,EAEf,MAAM,SAAS,CAAC;AACjB,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAEpE,MAAM,WAAW,gBAAgB;IAC/B,gCAAgC;IAChC,OAAO,EAAE,YAAY,CAAC;IACtB,0CAA0C;IAC1C,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,gCAAgC;IAChC,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,yFAAyF;IACzF,QAAQ,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAC5C,yCAAyC;IACzC,KAAK,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC9C,wCAAwC;IACxC,KAAK,CAAC,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC;IAC1C,6BAA6B;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,YAAY,CAAC;IAC5B,aAAa,EAAE,MAAM,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,eAAO,MAAM,YAAY,sDAAgD,CAAC;AAE1E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CA2DpD;AAED,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC;CAAG;AAEhF;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAU9E"}
|
package/dist/Autocomplete.d.ts
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Port of react-aria-components/src/Autocomplete.tsx
|
|
8
8
|
*/
|
|
9
|
-
import { type JSX, type ParentProps } from
|
|
10
|
-
import { type AriaAutocompleteOptions, type AutocompleteInputProps, type CollectionOptions } from
|
|
11
|
-
import { type AutocompleteState, type AutocompleteStateOptions } from
|
|
12
|
-
import { type SlotProps } from
|
|
13
|
-
export interface AutocompleteProps<T = unknown> extends Omit<AutocompleteStateOptions,
|
|
9
|
+
import { type JSX, type ParentProps } from "solid-js";
|
|
10
|
+
import { type AriaAutocompleteOptions, type AutocompleteInputProps, type CollectionOptions } from "@proyecto-viviana/solidaria";
|
|
11
|
+
import { type AutocompleteState, type AutocompleteStateOptions } from "@proyecto-viviana/solid-stately";
|
|
12
|
+
import { type SlotProps } from "./utils";
|
|
13
|
+
export interface AutocompleteProps<T = unknown> extends Omit<AutocompleteStateOptions, "children">, Omit<AriaAutocompleteOptions<T>, "inputRef" | "collectionRef">, ParentProps, SlotProps {
|
|
14
14
|
}
|
|
15
15
|
export interface AutocompleteContextValue {
|
|
16
16
|
inputProps: AutocompleteInputProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../src/Autocomplete.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,KAAK,GAAG,EACR,KAAK,WAAW,EAMjB,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../src/Autocomplete.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,KAAK,GAAG,EACR,KAAK,WAAW,EAMjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,WAAW,iBAAiB,CAAC,CAAC,GAAG,OAAO,CAC5C,SACE,IAAI,CAAC,wBAAwB,EAAE,UAAU,CAAC,EAC1C,IAAI,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,eAAe,CAAC,EAC9D,WAAW,EACX,SAAS;CAAG;AAEhB,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,sBAAsB,CAAC;IACnC,QAAQ,EAAE,CAAC,EAAE,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC1C;AAED,MAAM,WAAW,kCAAkC;IACjD,eAAe,EAAE,iBAAiB,CAAC;IACnC,aAAa,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;CACzC;AAED,eAAO,MAAM,mBAAmB,6DAAuD,CAAC;AACxF,eAAO,MAAM,wBAAwB,sDAAgD,CAAC;AACtF,eAAO,MAAM,6BAA6B,uEACsB,CAAC;AAEjE;;;GAGG;AACH,wBAAgB,oBAAoB,oCAEnC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,6BAEnC;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,8CAExC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,YAAY,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAuDlF"}
|
package/dist/Breadcrumbs.d.ts
CHANGED
|
@@ -4,14 +4,17 @@
|
|
|
4
4
|
* A pre-wired headless breadcrumbs component that combines aria hooks.
|
|
5
5
|
* Port of react-aria-components Breadcrumbs.
|
|
6
6
|
*/
|
|
7
|
-
import { type Accessor, type JSX } from
|
|
8
|
-
import { type AriaBreadcrumbsProps, type AriaBreadcrumbItemProps } from
|
|
9
|
-
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from
|
|
7
|
+
import { type Accessor, type JSX } from "solid-js";
|
|
8
|
+
import { type AriaBreadcrumbsProps, type AriaBreadcrumbItemProps } from "@proyecto-viviana/solidaria";
|
|
9
|
+
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from "./utils";
|
|
10
|
+
type RefLike<T> = ((el: T) => void) | {
|
|
11
|
+
current?: T | null;
|
|
12
|
+
} | undefined;
|
|
10
13
|
export interface BreadcrumbsRenderProps {
|
|
11
14
|
/** Whether the breadcrumbs are disabled. */
|
|
12
15
|
isDisabled: boolean;
|
|
13
16
|
}
|
|
14
|
-
export interface BreadcrumbsProps<T> extends Omit<AriaBreadcrumbsProps,
|
|
17
|
+
export interface BreadcrumbsProps<T> extends Omit<AriaBreadcrumbsProps, "isDisabled">, SlotProps {
|
|
15
18
|
/** The items to render in the breadcrumbs. */
|
|
16
19
|
items?: T[];
|
|
17
20
|
/** Function to get the key from an item. */
|
|
@@ -20,12 +23,14 @@ export interface BreadcrumbsProps<T> extends Omit<AriaBreadcrumbsProps, 'isDisab
|
|
|
20
23
|
isDisabled?: boolean;
|
|
21
24
|
/** Handler called when a breadcrumb item is activated. */
|
|
22
25
|
onAction?: (key: string | number) => void;
|
|
23
|
-
/** The children of the component
|
|
24
|
-
children
|
|
26
|
+
/** The children of the component, or a render function for collection items. */
|
|
27
|
+
children?: JSX.Element | ((item: T) => JSX.Element);
|
|
25
28
|
/** The CSS className for the element. */
|
|
26
29
|
class?: ClassNameOrFunction<BreadcrumbsRenderProps>;
|
|
27
30
|
/** The inline style for the element. */
|
|
28
31
|
style?: StyleOrFunction<BreadcrumbsRenderProps>;
|
|
32
|
+
/** Ref for the navigation element. */
|
|
33
|
+
ref?: RefLike<HTMLElement>;
|
|
29
34
|
}
|
|
30
35
|
export interface BreadcrumbItemRenderProps {
|
|
31
36
|
/** Whether this is the current/last item. */
|
|
@@ -41,7 +46,7 @@ export interface BreadcrumbItemRenderProps {
|
|
|
41
46
|
/** Whether the item is hovered. */
|
|
42
47
|
isHovered: boolean;
|
|
43
48
|
}
|
|
44
|
-
export interface BreadcrumbItemProps extends Omit<AriaBreadcrumbItemProps,
|
|
49
|
+
export interface BreadcrumbItemProps extends Omit<AriaBreadcrumbItemProps, "isDisabled">, SlotProps {
|
|
45
50
|
/** The children of the breadcrumb item. */
|
|
46
51
|
children?: RenderChildren<BreadcrumbItemRenderProps>;
|
|
47
52
|
/** The CSS className for the element. */
|
|
@@ -50,10 +55,16 @@ export interface BreadcrumbItemProps extends Omit<AriaBreadcrumbItemProps, 'isDi
|
|
|
50
55
|
style?: StyleOrFunction<BreadcrumbItemRenderProps>;
|
|
51
56
|
/** Whether this item is disabled. */
|
|
52
57
|
isDisabled?: boolean;
|
|
58
|
+
/** Ref for the breadcrumb item element. */
|
|
59
|
+
ref?: RefLike<HTMLElement>;
|
|
53
60
|
}
|
|
54
61
|
interface BreadcrumbsContextValue {
|
|
55
62
|
isDisabled: Accessor<boolean>;
|
|
56
63
|
onAction?: (key: string | number) => void;
|
|
64
|
+
registerStaticItem?: () => number;
|
|
65
|
+
staticItemCount?: Accessor<number>;
|
|
66
|
+
resetStaticItems?: () => void;
|
|
67
|
+
setStaticItemCount?: (count: number) => void;
|
|
57
68
|
}
|
|
58
69
|
export declare const BreadcrumbsContext: import("solid-js").Context<BreadcrumbsContextValue | null>;
|
|
59
70
|
interface BreadcrumbItemContextValue {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../src/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../src/Breadcrumbs.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,GAAG,EAST,MAAM,UAAU,CAAC;AAElB,OAAO,EAML,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAE7B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,SAAS,EAGf,MAAM,SAAS,CAAC;AAEjB,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,CAAA;CAAE,GAAG,SAAS,CAAC;AAczE,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,W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