@proyecto-viviana/solid-stately 0.2.4 → 0.2.7
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/LICENSE +21 -0
- package/dist/autocomplete/createAutocompleteState.d.ts +2 -1
- package/dist/checkbox/createCheckboxGroupState.d.ts +10 -1
- package/dist/collections/types.d.ts +11 -0
- package/dist/color/getColorChannels.d.ts +20 -0
- package/dist/data/createAsyncList.d.ts +111 -0
- package/dist/data/createListData.d.ts +65 -0
- package/dist/data/createTreeData.d.ts +61 -0
- package/dist/data/index.d.ts +3 -0
- package/dist/datepicker/index.d.ts +10 -0
- package/dist/grid/types.d.ts +5 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +3737 -2697
- package/dist/index.js.map +1 -7
- package/dist/menu/index.d.ts +8 -0
- package/dist/radio/createRadioGroupState.d.ts +10 -1
- package/dist/select/createSelectState.d.ts +17 -0
- package/dist/selection/index.d.ts +11 -0
- package/dist/toast/createToastState.d.ts +7 -1
- package/dist/toggle/createToggleGroupState.d.ts +45 -0
- package/dist/toggle/index.d.ts +1 -0
- package/dist/tree/TreeCollection.d.ts +3 -2
- package/package.json +6 -5
- package/src/autocomplete/createAutocompleteState.ts +10 -11
- package/src/calendar/createDateFieldState.ts +24 -1
- package/src/checkbox/createCheckboxGroupState.ts +42 -6
- package/src/collections/ListCollection.ts +152 -146
- package/src/collections/createListState.ts +266 -264
- package/src/collections/createMenuState.ts +106 -106
- package/src/collections/createSelectionState.ts +336 -336
- package/src/collections/index.ts +46 -46
- package/src/collections/types.ts +181 -169
- package/src/color/Color.ts +951 -951
- package/src/color/createColorAreaState.ts +293 -293
- package/src/color/createColorFieldState.ts +292 -292
- package/src/color/createColorSliderState.ts +241 -241
- package/src/color/createColorWheelState.ts +211 -211
- package/src/color/getColorChannels.ts +34 -0
- package/src/color/index.ts +47 -47
- package/src/color/types.ts +127 -127
- package/src/combobox/createComboBoxState.ts +703 -703
- package/src/combobox/index.ts +13 -13
- package/src/data/createAsyncList.ts +377 -0
- package/src/data/createListData.ts +298 -0
- package/src/data/createTreeData.ts +433 -0
- package/src/data/index.ts +25 -0
- package/src/datepicker/index.ts +36 -0
- package/src/disclosure/createDisclosureState.ts +4 -4
- package/src/dnd/createDragState.ts +153 -153
- package/src/dnd/createDraggableCollectionState.ts +165 -165
- package/src/dnd/createDropState.ts +212 -212
- package/src/dnd/createDroppableCollectionState.ts +357 -357
- package/src/dnd/index.ts +76 -76
- package/src/dnd/types.ts +317 -317
- package/src/form/createFormValidationState.ts +389 -389
- package/src/form/index.ts +15 -15
- package/src/grid/types.ts +5 -0
- package/src/index.ts +49 -0
- package/src/menu/index.ts +19 -0
- package/src/numberfield/createNumberFieldState.ts +427 -383
- package/src/numberfield/index.ts +5 -5
- package/src/overlays/createOverlayTriggerState.ts +67 -67
- package/src/overlays/index.ts +5 -5
- package/src/radio/createRadioGroupState.ts +44 -6
- package/src/searchfield/createSearchFieldState.ts +62 -62
- package/src/searchfield/index.ts +5 -5
- package/src/select/createSelectState.ts +290 -181
- package/src/select/index.ts +5 -5
- package/src/selection/index.ts +28 -0
- package/src/slider/createSliderState.ts +211 -211
- package/src/slider/index.ts +6 -6
- package/src/tabs/createTabListState.ts +37 -11
- package/src/toast/createToastState.d.ts +6 -1
- package/src/toast/createToastState.ts +8 -1
- package/src/toggle/createToggleGroupState.ts +127 -0
- package/src/toggle/index.ts +6 -0
- package/src/tooltip/createTooltipTriggerState.ts +183 -183
- package/src/tooltip/index.ts +6 -6
- package/src/tree/TreeCollection.ts +208 -175
- package/src/tree/createTreeState.ts +392 -392
- package/src/tree/index.ts +13 -13
- package/src/tree/types.ts +174 -174
package/src/form/index.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export {
|
|
2
|
-
createFormValidationState,
|
|
3
|
-
mergeValidation,
|
|
4
|
-
FormValidationContext,
|
|
5
|
-
privateValidationStateProp,
|
|
6
|
-
VALID_VALIDITY_STATE,
|
|
7
|
-
DEFAULT_VALIDATION_RESULT,
|
|
8
|
-
type FormValidationState,
|
|
9
|
-
type FormValidationProps,
|
|
10
|
-
type ValidationResult,
|
|
11
|
-
type ValidationErrors,
|
|
12
|
-
type ValidationFunction,
|
|
13
|
-
type ValidationBehavior,
|
|
14
|
-
type ValidityState,
|
|
15
|
-
} from './createFormValidationState';
|
|
1
|
+
export {
|
|
2
|
+
createFormValidationState,
|
|
3
|
+
mergeValidation,
|
|
4
|
+
FormValidationContext,
|
|
5
|
+
privateValidationStateProp,
|
|
6
|
+
VALID_VALIDITY_STATE,
|
|
7
|
+
DEFAULT_VALIDATION_RESULT,
|
|
8
|
+
type FormValidationState,
|
|
9
|
+
type FormValidationProps,
|
|
10
|
+
type ValidationResult,
|
|
11
|
+
type ValidationErrors,
|
|
12
|
+
type ValidationFunction,
|
|
13
|
+
type ValidationBehavior,
|
|
14
|
+
type ValidityState,
|
|
15
|
+
} from './createFormValidationState';
|
package/src/grid/types.ts
CHANGED
|
@@ -15,6 +15,7 @@ export type GridNodeType =
|
|
|
15
15
|
| 'rowheader' // A cell that acts as a row header
|
|
16
16
|
| 'headerrow' // A header row container
|
|
17
17
|
| 'section' // A section/group
|
|
18
|
+
| 'content' // A collection content placeholder
|
|
18
19
|
| 'placeholder'; // A placeholder (e.g., empty row)
|
|
19
20
|
|
|
20
21
|
/**
|
|
@@ -37,6 +38,10 @@ export interface GridNode<T = unknown> {
|
|
|
37
38
|
index: number;
|
|
38
39
|
/** The key of the parent node, if any. */
|
|
39
40
|
parentKey?: Key | null;
|
|
41
|
+
/** Previous sibling key (visible order). */
|
|
42
|
+
prevKey?: Key | null;
|
|
43
|
+
/** Next sibling key (visible order). */
|
|
44
|
+
nextKey?: Key | null;
|
|
40
45
|
/** Whether this node has child nodes. */
|
|
41
46
|
hasChildNodes: boolean;
|
|
42
47
|
/** Child nodes (cells for rows, rows for sections). */
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
// Toggle
|
|
2
2
|
export {
|
|
3
3
|
createToggleState,
|
|
4
|
+
createToggleGroupState,
|
|
4
5
|
type ToggleStateOptions,
|
|
5
6
|
type ToggleState,
|
|
7
|
+
type ToggleGroupProps,
|
|
8
|
+
type ToggleGroupState,
|
|
6
9
|
} from './toggle';
|
|
7
10
|
|
|
8
11
|
// Autocomplete
|
|
@@ -80,6 +83,31 @@ export {
|
|
|
80
83
|
type MenuTriggerState,
|
|
81
84
|
} from './collections';
|
|
82
85
|
|
|
86
|
+
// Selection (module-compat aliases)
|
|
87
|
+
export {
|
|
88
|
+
useMultipleSelectionState,
|
|
89
|
+
type MultipleSelectionStateProps,
|
|
90
|
+
type MultipleSelectionState,
|
|
91
|
+
} from './selection';
|
|
92
|
+
|
|
93
|
+
// Menu (module-compat aliases)
|
|
94
|
+
export {
|
|
95
|
+
useMenuTriggerState,
|
|
96
|
+
} from './menu';
|
|
97
|
+
|
|
98
|
+
// Datepicker (module-compat aliases)
|
|
99
|
+
export {
|
|
100
|
+
useDateFieldState,
|
|
101
|
+
useDatePickerState,
|
|
102
|
+
useDateRangePickerState,
|
|
103
|
+
useTimeFieldState,
|
|
104
|
+
type DateFieldStateOptions,
|
|
105
|
+
type DatePickerStateOptions,
|
|
106
|
+
type DateRangePickerStateOptions,
|
|
107
|
+
type TimeFieldStateOptions,
|
|
108
|
+
type SegmentType,
|
|
109
|
+
} from './datepicker';
|
|
110
|
+
|
|
83
111
|
// Select
|
|
84
112
|
export {
|
|
85
113
|
createSelectState,
|
|
@@ -379,5 +407,26 @@ export {
|
|
|
379
407
|
// SSR
|
|
380
408
|
export { createIsSSR, createId, canUseDOM, isServer } from './ssr';
|
|
381
409
|
|
|
410
|
+
// Data Hooks
|
|
411
|
+
export {
|
|
412
|
+
createListData,
|
|
413
|
+
type ListOptions,
|
|
414
|
+
type ListData,
|
|
415
|
+
createTreeData,
|
|
416
|
+
type TreeOptions,
|
|
417
|
+
type TreeData,
|
|
418
|
+
type TreeDataNode,
|
|
419
|
+
createAsyncList,
|
|
420
|
+
type AsyncListOptions,
|
|
421
|
+
type AsyncListData,
|
|
422
|
+
type AsyncListLoadFunction,
|
|
423
|
+
type AsyncListLoadOptions,
|
|
424
|
+
type AsyncListStateUpdate,
|
|
425
|
+
type LoadingState,
|
|
426
|
+
} from './data';
|
|
427
|
+
|
|
428
|
+
// getColorChannels
|
|
429
|
+
export { getColorChannels } from './color/getColorChannels';
|
|
430
|
+
|
|
382
431
|
// Utils
|
|
383
432
|
export { access, isAccessor, type MaybeAccessor, type MaybeAccessorValue } from './utils';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Menu compatibility surface.
|
|
3
|
+
*
|
|
4
|
+
* Exposes React Stately-like menu hook names while using existing
|
|
5
|
+
* Solid menu state primitives.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
createMenuState,
|
|
10
|
+
createMenuTriggerState,
|
|
11
|
+
type MenuStateProps,
|
|
12
|
+
type MenuState,
|
|
13
|
+
type MenuTriggerStateProps,
|
|
14
|
+
type MenuTriggerState,
|
|
15
|
+
} from '../collections/createMenuState';
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
createMenuTriggerState as useMenuTriggerState,
|
|
19
|
+
} from '../collections/createMenuState';
|