@proyecto-viviana/solidaria-components 0.2.5 → 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/LICENSE +21 -0
- package/README.md +39 -272
- package/dist/ActionBar.d.ts +79 -0
- package/dist/ActionBar.d.ts.map +1 -0
- package/dist/ActionGroup.d.ts +74 -0
- package/dist/ActionGroup.d.ts.map +1 -0
- package/dist/Alert.d.ts +70 -0
- package/dist/Alert.d.ts.map +1 -0
- package/dist/Autocomplete.d.ts +5 -5
- package/dist/Autocomplete.d.ts.map +1 -1
- package/dist/Breadcrumbs.d.ts +27 -8
- package/dist/Breadcrumbs.d.ts.map +1 -1
- package/dist/Button.d.ts +28 -5
- package/dist/Button.d.ts.map +1 -1
- package/dist/Calendar.d.ts +51 -7
- package/dist/Calendar.d.ts.map +1 -1
- package/dist/Checkbox.d.ts +33 -8
- package/dist/Checkbox.d.ts.map +1 -1
- package/dist/Collection.d.ts +130 -0
- package/dist/Collection.d.ts.map +1 -0
- package/dist/Color.d.ts +210 -9
- package/dist/Color.d.ts.map +1 -1
- package/dist/ColorEditor.d.ts +42 -0
- package/dist/ColorEditor.d.ts.map +1 -0
- package/dist/ComboBox.d.ts +146 -16
- package/dist/ComboBox.d.ts.map +1 -1
- package/dist/ContextualHelpTrigger.d.ts +40 -0
- package/dist/ContextualHelpTrigger.d.ts.map +1 -0
- package/dist/DateField.d.ts +35 -8
- package/dist/DateField.d.ts.map +1 -1
- package/dist/DatePicker.d.ts +101 -5
- 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 +25 -5
- package/dist/Disclosure.d.ts.map +1 -1
- package/dist/DragAndDrop.d.ts +80 -0
- package/dist/DragAndDrop.d.ts.map +1 -0
- package/dist/DragPreview.d.ts +14 -0
- package/dist/DragPreview.d.ts.map +1 -0
- package/dist/DropZone.d.ts +27 -0
- package/dist/DropZone.d.ts.map +1 -0
- package/dist/FieldError.d.ts +27 -0
- package/dist/FieldError.d.ts.map +1 -0
- package/dist/FileTrigger.d.ts +26 -0
- package/dist/FileTrigger.d.ts.map +1 -0
- package/dist/Focusable.d.ts +27 -0
- package/dist/Focusable.d.ts.map +1 -0
- package/dist/Form.d.ts +41 -0
- package/dist/Form.d.ts.map +1 -0
- package/dist/GridList.d.ts +69 -10
- 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 +57 -0
- package/dist/Icon.d.ts.map +1 -0
- package/dist/Keyboard.d.ts +13 -0
- package/dist/Keyboard.d.ts.map +1 -0
- 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 +73 -11
- package/dist/ListBox.d.ts.map +1 -1
- package/dist/ListDropTargetDelegate.d.ts +38 -0
- package/dist/ListDropTargetDelegate.d.ts.map +1 -0
- package/dist/Menu.d.ts +79 -10
- package/dist/Menu.d.ts.map +1 -1
- package/dist/Meter.d.ts +4 -4
- package/dist/Meter.d.ts.map +1 -1
- package/dist/Modal.d.ts +6 -4
- package/dist/Modal.d.ts.map +1 -1
- package/dist/NumberField.d.ts +10 -12
- package/dist/NumberField.d.ts.map +1 -1
- package/dist/Popover.d.ts +32 -7
- package/dist/Popover.d.ts.map +1 -1
- package/dist/Pressable.d.ts +27 -0
- package/dist/Pressable.d.ts.map +1 -0
- package/dist/ProgressBar.d.ts +6 -4
- 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 +39 -7
- package/dist/RangeCalendar.d.ts.map +1 -1
- package/dist/RouterProvider.d.ts +75 -0
- package/dist/RouterProvider.d.ts.map +1 -0
- package/dist/SearchField.d.ts +23 -21
- package/dist/SearchField.d.ts.map +1 -1
- package/dist/Select.d.ts +48 -7
- package/dist/Select.d.ts.map +1 -1
- package/dist/SelectionIndicator.d.ts +30 -0
- package/dist/SelectionIndicator.d.ts.map +1 -0
- package/dist/Separator.d.ts +9 -3
- package/dist/Separator.d.ts.map +1 -1
- package/dist/SharedElementTransition.d.ts +41 -0
- package/dist/SharedElementTransition.d.ts.map +1 -0
- package/dist/Slider.d.ts +15 -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 +222 -19
- package/dist/Table.d.ts.map +1 -1
- package/dist/Tabs.d.ts +47 -10
- package/dist/Tabs.d.ts.map +1 -1
- package/dist/TagGroup.d.ts +22 -10
- package/dist/TagGroup.d.ts.map +1 -1
- package/dist/Text.d.ts +10 -0
- package/dist/Text.d.ts.map +1 -0
- package/dist/TextField.d.ts +19 -11
- package/dist/TextField.d.ts.map +1 -1
- package/dist/TimeField.d.ts +32 -7
- 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 +36 -0
- package/dist/ToggleButton.d.ts.map +1 -0
- package/dist/ToggleButtonGroup.d.ts +33 -0
- package/dist/ToggleButtonGroup.d.ts.map +1 -0
- package/dist/Toolbar.d.ts +7 -3
- package/dist/Toolbar.d.ts.map +1 -1
- package/dist/Tooltip.d.ts +58 -7
- package/dist/Tooltip.d.ts.map +1 -1
- package/dist/Tree.d.ts +102 -11
- package/dist/Tree.d.ts.map +1 -1
- package/dist/Virtualizer.d.ts +61 -0
- package/dist/Virtualizer.d.ts.map +1 -0
- package/dist/VirtualizerLayouts.d.ts +82 -0
- package/dist/VirtualizerLayouts.d.ts.map +1 -0
- package/dist/VisuallyHidden.d.ts +4 -2
- package/dist/VisuallyHidden.d.ts.map +1 -1
- package/dist/contexts.d.ts +6 -1
- package/dist/contexts.d.ts.map +1 -1
- package/dist/index.d.ts +73 -39
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23342 -10644
- package/dist/index.js.map +1 -7
- package/dist/index.jsx +18110 -0
- package/dist/index.jsx.map +1 -0
- package/dist/useDragAndDrop.d.ts +93 -0
- package/dist/useDragAndDrop.d.ts.map +1 -0
- package/dist/utils.d.ts +8 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/virtualizer/Layout.d.ts +79 -0
- package/dist/virtualizer/Layout.d.ts.map +1 -0
- package/package.json +33 -32
- package/src/ActionBar.tsx +251 -0
- package/src/ActionGroup.tsx +277 -0
- package/src/Alert.tsx +152 -0
- package/src/Autocomplete.tsx +39 -44
- package/src/Breadcrumbs.tsx +227 -72
- package/src/Button.tsx +315 -74
- package/src/Calendar.tsx +347 -141
- package/src/Checkbox.tsx +414 -123
- package/src/Collection.tsx +350 -0
- package/src/Color.tsx +1325 -284
- package/src/ColorEditor.tsx +213 -0
- package/src/ComboBox.tsx +644 -245
- package/src/ContextualHelpTrigger.tsx +195 -0
- package/src/DateField.tsx +274 -106
- package/src/DatePicker.tsx +892 -111
- package/src/DateRangePickerContext.tsx +44 -0
- package/src/Dialog.tsx +173 -104
- package/src/Disclosure.tsx +158 -105
- package/src/DragAndDrop.tsx +340 -0
- package/src/DragPreview.tsx +47 -0
- package/src/DropZone.tsx +233 -0
- package/src/FieldError.tsx +89 -0
- package/src/FileTrigger.tsx +83 -0
- package/src/Focusable.tsx +103 -0
- package/src/Form.tsx +140 -0
- package/src/GridList.tsx +542 -128
- package/src/HiddenDateInput.tsx +153 -0
- package/src/HiddenTimeInput.tsx +133 -0
- package/src/Icon.tsx +133 -0
- package/src/Keyboard.tsx +26 -0
- package/src/Landmark.tsx +37 -63
- package/src/Link.tsx +132 -69
- package/src/ListBox.tsx +656 -106
- package/src/ListDropTargetDelegate.ts +283 -0
- package/src/Menu.tsx +1234 -132
- package/src/Meter.tsx +44 -58
- package/src/Modal.tsx +262 -166
- package/src/NumberField.tsx +267 -151
- package/src/Popover.tsx +452 -343
- package/src/Pressable.tsx +108 -0
- package/src/ProgressBar.tsx +54 -59
- package/src/RadioGroup.tsx +533 -121
- package/src/RangeCalendar.tsx +249 -150
- package/src/RouterProvider.tsx +223 -0
- package/src/SearchField.tsx +460 -133
- package/src/Select.tsx +804 -233
- package/src/SelectionIndicator.tsx +108 -0
- package/src/Separator.tsx +47 -49
- package/src/SharedElementTransition.tsx +264 -0
- package/src/Slider.tsx +148 -98
- package/src/StepList.tsx +272 -0
- package/src/Switch.tsx +93 -46
- package/src/Table.tsx +1551 -225
- package/src/Tabs.tsx +377 -123
- package/src/TagGroup.tsx +233 -135
- package/src/Text.tsx +18 -0
- package/src/TextField.tsx +413 -86
- package/src/TimeField.tsx +232 -222
- package/src/Toast.tsx +306 -160
- package/src/ToggleButton.tsx +169 -0
- package/src/ToggleButtonGroup.tsx +141 -0
- package/src/Toolbar.tsx +61 -70
- package/src/Tooltip.tsx +473 -116
- package/src/Tree.tsx +1514 -175
- package/src/Virtualizer.tsx +730 -0
- package/src/VirtualizerLayouts.ts +280 -0
- package/src/VisuallyHidden.tsx +32 -38
- package/src/contexts.ts +29 -36
- package/src/index.ts +972 -620
- package/src/useDragAndDrop.ts +367 -0
- package/src/utils.tsx +69 -50
- package/src/virtualizer/Layout.ts +192 -0
- package/dist/index.ssr.js +0 -9785
- package/dist/index.ssr.js.map +0 -7
package/dist/Meter.d.ts
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* Meters represent a quantity within a known range, or a fractional value.
|
|
8
8
|
* Unlike progress bars, meters represent a current value rather than progress toward a goal.
|
|
9
9
|
*/
|
|
10
|
-
import { type JSX
|
|
11
|
-
import { type AriaMeterProps } from
|
|
12
|
-
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from
|
|
10
|
+
import { type JSX } from "solid-js";
|
|
11
|
+
import { type AriaMeterProps } from "@proyecto-viviana/solidaria";
|
|
12
|
+
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from "./utils";
|
|
13
13
|
export interface MeterRenderProps {
|
|
14
14
|
/** The value as a percentage between the minimum and maximum (0-100). */
|
|
15
15
|
percentage: number;
|
|
@@ -42,5 +42,5 @@ export declare const MeterContext: import("solid-js").Context<MeterProps | null>
|
|
|
42
42
|
* </Meter>
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
export declare function Meter(props:
|
|
45
|
+
export declare function Meter(props: MeterProps): JSX.Element;
|
|
46
46
|
//# sourceMappingURL=Meter.d.ts.map
|
package/dist/Meter.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Meter.d.ts","sourceRoot":"","sources":["../src/Meter.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"Meter.d.ts","sourceRoot":"","sources":["../src/Meter.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAyC,MAAM,UAAU,CAAC;AAC3E,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,SAAS,EAGf,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,gBAAgB;IAC/B,yEAAyE;IACzE,UAAU,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,UAAW,SAAQ,cAAc,EAAE,SAAS;IAC3D,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;CAC3C;AAED,eAAO,MAAM,YAAY,+CAAyC,CAAC;AAWnE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CA6EpD"}
|
package/dist/Modal.d.ts
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* Headless modal components with overlay, focus trapping, and dismissal handling.
|
|
5
5
|
* Port of react-aria-components Modal.
|
|
6
6
|
*/
|
|
7
|
-
import { type JSX } from
|
|
8
|
-
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction } from
|
|
7
|
+
import { type JSX } from "solid-js";
|
|
8
|
+
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction } from "./utils";
|
|
9
|
+
import { type OverlayTriggerState } from "./contexts";
|
|
9
10
|
export interface ModalRenderProps {
|
|
10
11
|
/** Whether the modal is currently entering (for animations). */
|
|
11
12
|
isEntering: boolean;
|
|
@@ -36,8 +37,9 @@ export interface ModalOverlayProps {
|
|
|
36
37
|
}
|
|
37
38
|
export interface ModalProps extends ModalOverlayProps {
|
|
38
39
|
}
|
|
39
|
-
export { OverlayTriggerStateContext, type OverlayTriggerState } from
|
|
40
|
-
export { useOverlayTriggerState } from
|
|
40
|
+
export { OverlayTriggerStateContext, type OverlayTriggerState } from "./contexts";
|
|
41
|
+
export { useOverlayTriggerState } from "./contexts";
|
|
42
|
+
export declare const ModalContext: import("solid-js").Context<OverlayTriggerState | null>;
|
|
41
43
|
/**
|
|
42
44
|
* ModalOverlay is the backdrop/underlay behind a modal.
|
|
43
45
|
* It handles click-outside dismissal and provides styling hooks.
|
package/dist/Modal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../src/Modal.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,GAAG,EAST,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../src/Modal.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,GAAG,EAST,MAAM,UAAU,CAAC;AAQlB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EAKrB,MAAM,SAAS,CAAC;AACjB,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,YAAY,CAAC;AAyBpB,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,UAAU,EAAE,OAAO,CAAC;IACpB,+DAA+D;IAC/D,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,qEAAqE;IACrE,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,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yDAAyD;IACzD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0DAA0D;IAC1D,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,oDAAoD;IACpD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gDAAgD;IAChD,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,sDAAsD;IACtD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qDAAqD;IACrD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,UAAW,SAAQ,iBAAiB;CAAG;AAExD,OAAO,EAAE,0BAA0B,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACpD,eAAO,MAAM,YAAY,wDAA6B,CAAC;AAEvD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAqKlE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAIpD;AAkPD,eAAe,KAAK,CAAC"}
|
package/dist/NumberField.d.ts
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* A pre-wired headless number field that combines state + aria hooks.
|
|
5
5
|
* Port of react-aria-components/src/NumberField.tsx
|
|
6
6
|
*/
|
|
7
|
-
import { type JSX } from
|
|
8
|
-
import { type AriaNumberFieldProps } from
|
|
9
|
-
import { type NumberFieldState } from
|
|
10
|
-
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from
|
|
7
|
+
import { type JSX } from "solid-js";
|
|
8
|
+
import { type AriaNumberFieldProps, type AriaButtonProps } from "@proyecto-viviana/solidaria";
|
|
9
|
+
import { type NumberFieldState } from "@proyecto-viviana/solid-stately";
|
|
10
|
+
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from "./utils";
|
|
11
11
|
export interface NumberFieldRenderProps {
|
|
12
12
|
/** Whether the number field is disabled. */
|
|
13
13
|
isDisabled: boolean;
|
|
@@ -20,7 +20,7 @@ export interface NumberFieldRenderProps {
|
|
|
20
20
|
/** The current numeric value. */
|
|
21
21
|
value: number;
|
|
22
22
|
}
|
|
23
|
-
export interface NumberFieldProps extends Omit<AriaNumberFieldProps,
|
|
23
|
+
export interface NumberFieldProps extends Omit<AriaNumberFieldProps, "label">, SlotProps {
|
|
24
24
|
/** The current value (controlled). */
|
|
25
25
|
value?: number;
|
|
26
26
|
/** The default value (uncontrolled). */
|
|
@@ -91,8 +91,8 @@ export interface NumberFieldDecrementButtonProps extends SlotProps {
|
|
|
91
91
|
interface NumberFieldContextValue {
|
|
92
92
|
state: NumberFieldState;
|
|
93
93
|
inputProps: JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
94
|
-
incrementButtonProps:
|
|
95
|
-
decrementButtonProps:
|
|
94
|
+
incrementButtonProps: AriaButtonProps;
|
|
95
|
+
decrementButtonProps: AriaButtonProps;
|
|
96
96
|
labelProps: JSX.HTMLAttributes<HTMLElement>;
|
|
97
97
|
groupProps: JSX.HTMLAttributes<HTMLElement>;
|
|
98
98
|
descriptionProps: JSX.HTMLAttributes<HTMLElement>;
|
|
@@ -101,8 +101,10 @@ interface NumberFieldContextValue {
|
|
|
101
101
|
isInvalid: boolean;
|
|
102
102
|
isRequired: boolean;
|
|
103
103
|
isReadOnly: boolean;
|
|
104
|
+
setInputRef: (el: HTMLInputElement) => void;
|
|
104
105
|
}
|
|
105
106
|
export declare const NumberFieldContext: import("solid-js").Context<NumberFieldContextValue | null>;
|
|
107
|
+
export declare const NumberFieldStateContext: import("solid-js").Context<NumberFieldState | null>;
|
|
106
108
|
/**
|
|
107
109
|
* A number field allows a user to enter a number and increment/decrement the value.
|
|
108
110
|
*/
|
|
@@ -125,11 +127,7 @@ export declare function NumberFieldLabel(props: {
|
|
|
125
127
|
/**
|
|
126
128
|
* The input group for a number field (contains input and buttons).
|
|
127
129
|
*/
|
|
128
|
-
export declare function NumberFieldGroup(props:
|
|
129
|
-
children?: JSX.Element;
|
|
130
|
-
class?: string;
|
|
131
|
-
style?: JSX.CSSProperties;
|
|
132
|
-
}): JSX.Element;
|
|
130
|
+
export declare function NumberFieldGroup(props: JSX.HTMLAttributes<HTMLDivElement>): JSX.Element;
|
|
133
131
|
/**
|
|
134
132
|
* The input element for a number field.
|
|
135
133
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../src/NumberField.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../src/NumberField.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAqD,MAAM,UAAU,CAAC;AACvF,OAAO,EAKL,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACrB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAChG,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,SAAS,EAGf,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,UAAU,EAAE,OAAO,CAAC;IACpB,2CAA2C;IAC3C,SAAS,EAAE,OAAO,CAAC;IACnB,4CAA4C;IAC5C,UAAU,EAAE,OAAO,CAAC;IACpB,6CAA6C;IAC7C,UAAU,EAAE,OAAO,CAAC;IACpB,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,EAAE,SAAS;IACtF,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,yBAAyB;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC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EAAE,GAAG,CAAC,aAAa,CAAC;CAC3B,GAAG,GAAG,CAAC,OAAO,CAed;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,GAAG,CAAC,OAAO,CAsBvF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,CAuE1E;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,GAAG,GAAG,CAAC,OAAO,CAgE9F;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,GAAG,GAAG,CAAC,OAAO,CAgE9F"}
|
package/dist/Popover.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* A headless popover component that positions relative to a trigger element.
|
|
5
5
|
* Port of react-aria-components Popover.
|
|
6
6
|
*/
|
|
7
|
-
import { type JSX } from
|
|
8
|
-
import { type Placement, type PlacementAxis } from
|
|
9
|
-
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from
|
|
7
|
+
import { type JSX } from "solid-js";
|
|
8
|
+
import { type Placement, type PlacementAxis } from "@proyecto-viviana/solidaria";
|
|
9
|
+
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from "./utils";
|
|
10
10
|
export interface PopoverRenderProps {
|
|
11
11
|
/**
|
|
12
12
|
* The name of the component that triggered the popover.
|
|
@@ -69,6 +69,22 @@ export interface PopoverProps extends SlotProps {
|
|
|
69
69
|
* @default true
|
|
70
70
|
*/
|
|
71
71
|
shouldFlip?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* The max height of the popover.
|
|
74
|
+
*/
|
|
75
|
+
maxHeight?: number;
|
|
76
|
+
/**
|
|
77
|
+
* A boundary element for placement calculations.
|
|
78
|
+
*/
|
|
79
|
+
boundaryElement?: Element;
|
|
80
|
+
/**
|
|
81
|
+
* A ref for the popover arrow element.
|
|
82
|
+
*/
|
|
83
|
+
arrowRef?: () => Element | null;
|
|
84
|
+
/**
|
|
85
|
+
* A ref for the scrollable popover element.
|
|
86
|
+
*/
|
|
87
|
+
scrollRef?: () => Element | null;
|
|
72
88
|
/**
|
|
73
89
|
* Whether the popover is non-modal (allows interaction outside).
|
|
74
90
|
*/
|
|
@@ -87,6 +103,11 @@ export interface PopoverProps extends SlotProps {
|
|
|
87
103
|
defaultOpen?: boolean;
|
|
88
104
|
/** Handler called when the popover's open state changes. */
|
|
89
105
|
onOpenChange?: (isOpen: boolean) => void;
|
|
106
|
+
/**
|
|
107
|
+
* Whether focus should move to the popover container on open.
|
|
108
|
+
* @default true
|
|
109
|
+
*/
|
|
110
|
+
autoFocus?: boolean;
|
|
90
111
|
/** Whether the popover is entering (for animations). */
|
|
91
112
|
isEntering?: boolean;
|
|
92
113
|
/** Whether the popover is exiting (for animations). */
|
|
@@ -102,10 +123,12 @@ export interface PopoverTriggerProps {
|
|
|
102
123
|
/** Callback when open state changes. */
|
|
103
124
|
onOpenChange?: (isOpen: boolean) => void;
|
|
104
125
|
}
|
|
105
|
-
export { PopoverTriggerContext, usePopoverTrigger, type PopoverTriggerContextValue } from
|
|
106
|
-
|
|
126
|
+
export { PopoverTriggerContext, usePopoverTrigger, type PopoverTriggerContextValue, } from "./contexts";
|
|
127
|
+
interface PopoverContextValue {
|
|
107
128
|
placement: () => PlacementAxis | null;
|
|
108
|
-
|
|
129
|
+
arrowProps: () => JSX.HTMLAttributes<HTMLElement>;
|
|
130
|
+
}
|
|
131
|
+
export declare const PopoverContext: import("solid-js").Context<PopoverContextValue | null>;
|
|
109
132
|
/**
|
|
110
133
|
* A PopoverTrigger opens a popover when a trigger element is pressed.
|
|
111
134
|
* Children should include a trigger element (e.g. Button) and the Popover.
|
|
@@ -117,7 +140,9 @@ export declare function PopoverTrigger(props: PopoverTriggerProps): JSX.Element;
|
|
|
117
140
|
export declare function Popover(props: PopoverProps): JSX.Element;
|
|
118
141
|
export interface OverlayArrowProps {
|
|
119
142
|
/** The children - should be an SVG or element for the arrow. */
|
|
120
|
-
children?: JSX.Element
|
|
143
|
+
children?: JSX.Element;
|
|
144
|
+
/** Render function used when Solid children accessors would be ambiguous. */
|
|
145
|
+
render?: () => JSX.Element;
|
|
121
146
|
/** The CSS className. */
|
|
122
147
|
class?: string;
|
|
123
148
|
/** The inline style. */
|
package/dist/Popover.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../src/Popover.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,GAAG,EAUT,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../src/Popover.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,GAAG,EAUT,MAAM,UAAU,CAAC;AAElB,OAAO,EAML,KAAK,SAAS,EACd,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,SAAS,EAKf,MAAM,SAAS,CAAC;AAGjB,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;OAEG;IACH,SAAS,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,YAAa,SAAQ,SAAS;IAC7C,qEAAqE;IACrE,QAAQ,CAAC,EAAE,cAAc,CAAC,kBAAkB,CAAC,CAAC;IAC9C,yCAAyC;IACzC,KAAK,CAAC,EAAE,mBAAmB,CAAC,kBAAkB,CAAC,CAAC;IAChD,wCAAwC;IACxC,KAAK,CAAC,EA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AO,CAAC;IACtB,gDAAgD;IAChD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,6DAA6D;IAC7D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wCAAwC;IACxC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C;AAED,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,0BAA0B,GAChC,MAAM,YAAY,CAAC;AAEpB,UAAU,mBAAmB;IAC3B,SAAS,EAAE,MAAM,aAAa,GAAG,IAAI,CAAC;IACtC,UAAU,EAAE,MAAM,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;CACnD;AAED,eAAO,MAAM,cAAc,wDAAkD,CAAC;AAe9E;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CA2CtE;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAiWxD;AAED,MAAM,WAAW,iBAAiB;IAChC,gEAAgE;IAChE,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,OAAO,CAAC;IAC3B,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,KAAK,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAsClE;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pressable component for solidaria-components
|
|
3
|
+
*
|
|
4
|
+
* A render-prop component that wraps createPress + createFocusable
|
|
5
|
+
* to make an element pressable. Port of React Aria's Pressable.
|
|
6
|
+
*/
|
|
7
|
+
import { type JSX } from "solid-js";
|
|
8
|
+
import { type CreatePressProps } from "@proyecto-viviana/solidaria";
|
|
9
|
+
export interface PressableProps extends CreatePressProps {
|
|
10
|
+
/** A single child element to make pressable. */
|
|
11
|
+
children: JSX.Element;
|
|
12
|
+
/** Ref callback. */
|
|
13
|
+
ref?: HTMLElement | ((el: HTMLElement) => void);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Makes its child element pressable and focusable.
|
|
17
|
+
* Combines createPress and createFocusable for full interaction support.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Pressable onPress={() => console.log('pressed')}>
|
|
22
|
+
* <div role="button" tabIndex={0}>Click me</div>
|
|
23
|
+
* </Pressable>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function Pressable(props: PressableProps): JSX.Element;
|
|
27
|
+
//# sourceMappingURL=Pressable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../src/Pressable.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,GAAG,EAKT,MAAM,UAAU,CAAC;AAClB,OAAO,EAGL,KAAK,gBAAgB,EAEtB,MAAM,6BAA6B,CAAC;AAErC,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD,gDAAgD;IAChD,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;IACtB,oBAAoB;IACpB,GAAG,CAAC,EAAE,WAAW,GAAG,CAAC,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,CAAC,CAAC;CACjD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAoE5D"}
|
package/dist/ProgressBar.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Pre-wired headless progress bar component that combines aria hooks.
|
|
5
5
|
* Port of react-aria-components/src/ProgressBar.tsx
|
|
6
6
|
*/
|
|
7
|
-
import { type JSX
|
|
8
|
-
import { type AriaProgressBarProps } from
|
|
9
|
-
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from
|
|
7
|
+
import { type JSX } from "solid-js";
|
|
8
|
+
import { type AriaProgressBarProps } from "@proyecto-viviana/solidaria";
|
|
9
|
+
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from "./utils";
|
|
10
10
|
export interface ProgressBarRenderProps {
|
|
11
11
|
/** The value as a percentage between the minimum and maximum (0-100). */
|
|
12
12
|
percentage: number | undefined;
|
|
@@ -16,6 +16,8 @@ export interface ProgressBarRenderProps {
|
|
|
16
16
|
isIndeterminate: boolean;
|
|
17
17
|
}
|
|
18
18
|
export interface ProgressBarProps extends AriaProgressBarProps, SlotProps {
|
|
19
|
+
/** The element id. */
|
|
20
|
+
id?: string;
|
|
19
21
|
/** The children of the component. A function may be provided to receive render props. */
|
|
20
22
|
children?: RenderChildren<ProgressBarRenderProps>;
|
|
21
23
|
/** The CSS className for the element. */
|
|
@@ -41,5 +43,5 @@ export declare const ProgressBarContext: import("solid-js").Context<ProgressBarP
|
|
|
41
43
|
* </ProgressBar>
|
|
42
44
|
* ```
|
|
43
45
|
*/
|
|
44
|
-
export declare function ProgressBar(props:
|
|
46
|
+
export declare function ProgressBar(props: ProgressBarProps): JSX.Element;
|
|
45
47
|
//# sourceMappingURL=ProgressBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../src/ProgressBar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../src/ProgressBar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAiE,MAAM,UAAU,CAAC;AACnG,OAAO,EAAqB,KAAK,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,SAAS,EAGf,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,sBAAsB;IACrC,yEAAyE;IACzE,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,wCAAwC;IACxC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,iDAAiD;IACjD,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB,EAAE,SAAS;IACvE,sBAAsB;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yFAAyF;IACzF,QAAQ,CAAC,EAAE,cAAc,CAAC,sBAAsB,CAAC,CAAC;IAClD,yCAAyC;IACzC,KAAK,CAAC,EAAE,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;IACpD,wCAAwC;IACxC,KAAK,CAAC,EAAE,eAAe,CAAC,sBAAsB,CAAC,CAAC;CACjD;AAED,eAAO,MAAM,kBAAkB,qDAA+C,CAAC;AAW/E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CA0FhE"}
|
package/dist/RadioGroup.d.ts
CHANGED
|
@@ -4,11 +4,14 @@
|
|
|
4
4
|
* Pre-wired headless radio components that combine state + aria hooks.
|
|
5
5
|
* Port of react-aria-components/src/RadioGroup.tsx
|
|
6
6
|
*/
|
|
7
|
-
import { type JSX, type ParentProps } from
|
|
8
|
-
import { type AriaRadioProps, type AriaRadioGroupProps } from
|
|
9
|
-
import { type RadioGroupState, type RadioGroupProps as RadioGroupStateProps } from
|
|
10
|
-
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from
|
|
11
|
-
|
|
7
|
+
import { type JSX, type ParentProps } from "solid-js";
|
|
8
|
+
import { type AriaRadioProps, type AriaRadioGroupProps } from "@proyecto-viviana/solidaria";
|
|
9
|
+
import { type RadioGroupState, type RadioGroupProps as RadioGroupStateProps } from "@proyecto-viviana/solid-stately";
|
|
10
|
+
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from "./utils";
|
|
11
|
+
type RefLike<T> = ((el: T) => void) | {
|
|
12
|
+
current?: T | null;
|
|
13
|
+
} | undefined;
|
|
14
|
+
export type Orientation = "horizontal" | "vertical";
|
|
12
15
|
export interface RadioGroupRenderProps {
|
|
13
16
|
/** The orientation of the radio group. */
|
|
14
17
|
orientation: Orientation;
|
|
@@ -43,25 +46,55 @@ export interface RadioRenderProps {
|
|
|
43
46
|
/** Whether the radio is required. */
|
|
44
47
|
isRequired: boolean;
|
|
45
48
|
}
|
|
46
|
-
export interface RadioGroupProps extends Omit<AriaRadioGroupProps,
|
|
49
|
+
export interface RadioGroupProps extends Omit<AriaRadioGroupProps, "children" | "label" | "description" | "errorMessage">, Pick<RadioGroupStateProps, "value" | "defaultValue" | "onChange" | "validationState" | "validate">, SlotProps {
|
|
47
50
|
/** The children of the component. A function may be provided to receive render props. */
|
|
48
51
|
children?: RenderChildren<RadioGroupRenderProps>;
|
|
49
52
|
/** The CSS className for the element. */
|
|
50
53
|
class?: ClassNameOrFunction<RadioGroupRenderProps>;
|
|
51
54
|
/** The inline style for the element. */
|
|
52
55
|
style?: StyleOrFunction<RadioGroupRenderProps>;
|
|
56
|
+
/** Custom renderer for the outer radio group element. */
|
|
57
|
+
render?: (props: JSX.HTMLAttributes<HTMLDivElement>, renderProps: RadioGroupRenderProps) => JSX.Element;
|
|
58
|
+
/** Ref for the radio group element. */
|
|
59
|
+
ref?: RefLike<HTMLDivElement>;
|
|
60
|
+
/** A description for the radio group. */
|
|
61
|
+
description?: JSX.Element;
|
|
62
|
+
/** An error message for the radio group. */
|
|
63
|
+
errorMessage?: JSX.Element;
|
|
53
64
|
}
|
|
54
|
-
export interface RadioProps extends Omit<AriaRadioProps,
|
|
65
|
+
export interface RadioProps extends Omit<AriaRadioProps, "children">, SlotProps {
|
|
55
66
|
/** The children of the component. A function may be provided to receive render props. */
|
|
56
67
|
children?: RenderChildren<RadioRenderProps>;
|
|
57
68
|
/** The CSS className for the element. */
|
|
58
69
|
class?: ClassNameOrFunction<RadioRenderProps>;
|
|
59
70
|
/** The inline style for the element. */
|
|
60
71
|
style?: StyleOrFunction<RadioRenderProps>;
|
|
72
|
+
/** Custom renderer for the outer radio label element. */
|
|
73
|
+
render?: (props: JSX.LabelHTMLAttributes<HTMLLabelElement>, renderProps: RadioRenderProps) => JSX.Element;
|
|
74
|
+
/** Ref for the outer label element. */
|
|
75
|
+
ref?: RefLike<HTMLLabelElement>;
|
|
76
|
+
/** Ref for the underlying input element. */
|
|
77
|
+
inputRef?: RefLike<HTMLInputElement>;
|
|
78
|
+
/** A description for the radio. */
|
|
79
|
+
description?: JSX.Element;
|
|
80
|
+
/** An error message for the radio. */
|
|
81
|
+
errorMessage?: JSX.Element;
|
|
82
|
+
/** Handler called when hover starts. */
|
|
83
|
+
onHoverStart?: () => void;
|
|
84
|
+
/** Handler called when hover ends. */
|
|
85
|
+
onHoverEnd?: () => void;
|
|
86
|
+
/** Handler called when hover state changes. */
|
|
87
|
+
onHoverChange?: (isHovered: boolean) => void;
|
|
61
88
|
}
|
|
62
|
-
export
|
|
89
|
+
export interface RadioGroupContextValue extends RadioGroupProps {
|
|
90
|
+
slots?: Record<string, RadioGroupProps>;
|
|
91
|
+
}
|
|
92
|
+
export declare const RadioGroupContext: import("solid-js").Context<RadioGroupContextValue | null>;
|
|
63
93
|
export declare const RadioGroupStateContext: import("solid-js").Context<RadioGroupState | null>;
|
|
64
|
-
export
|
|
94
|
+
export interface RadioContextValue extends RadioProps {
|
|
95
|
+
slots?: Record<string, RadioProps>;
|
|
96
|
+
}
|
|
97
|
+
export declare const RadioContext: import("solid-js").Context<RadioContextValue | null>;
|
|
65
98
|
/**
|
|
66
99
|
* A radio group allows a user to select a single item from a list of mutually exclusive options.
|
|
67
100
|
*
|
|
@@ -92,4 +125,5 @@ export declare function RadioGroup(props: ParentProps<RadioGroupProps>): JSX.Ele
|
|
|
92
125
|
* ```
|
|
93
126
|
*/
|
|
94
127
|
export declare function Radio(props: RadioProps): JSX.Element;
|
|
128
|
+
export {};
|
|
95
129
|
//# sourceMappingURL=RadioGroup.d.ts.map
|
package/dist/RadioGroup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../src/RadioGroup.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,GAAG,EACR,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../src/RadioGroup.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,GAAG,EACR,KAAK,WAAW,EAQjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACzB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,eAAe,IAAI,oBAAoB,EAE7C,MAAM,iCAAiC,CAAC;AAOzC,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;AAqCzE,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC;AAEpD,MAAM,WAAW,qBAAqB;IACpC,0CAA0C;IAC1C,WAAW,EAAE,WAAW,CAAC;IACzB,2CAA2C;IAC3C,UAAU,EAA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,MAAM,iBAAiB,2DAAqD,CAAC;AACpF,eAAO,MAAM,sBAAsB,oDAA8C,CAAC;AAClF,MAAM,WAAW,iBAAkB,SAAQ,UAAU;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CACpC;AACD,eAAO,MAAM,YAAY,sDAAgD,CAAC;AAE1E;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC,OAAO,CA0O3E;AAkTD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,GAAG,CAAC,OAAO,CAUpD"}
|
package/dist/RangeCalendar.d.ts
CHANGED
|
@@ -4,19 +4,24 @@
|
|
|
4
4
|
* Pre-wired headless range calendar component that combines aria hooks.
|
|
5
5
|
* Port of react-aria-components/src/RangeCalendar.tsx
|
|
6
6
|
*/
|
|
7
|
-
import { type JSX } from
|
|
8
|
-
import { type AriaRangeCalendarProps, type AriaCalendarGridProps } from
|
|
9
|
-
import { type RangeCalendarState, type RangeCalendarStateProps, type CalendarDate, type DateValue, type RangeValue } from
|
|
10
|
-
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from
|
|
7
|
+
import { type JSX } from "solid-js";
|
|
8
|
+
import { type AriaRangeCalendarProps, type AriaCalendarGridProps } from "@proyecto-viviana/solidaria";
|
|
9
|
+
import { type RangeCalendarState, type RangeCalendarStateProps, type CalendarDate, type DateValue, type RangeValue } from "@proyecto-viviana/solid-stately";
|
|
10
|
+
import { type RenderChildren, type ClassNameOrFunction, type StyleOrFunction, type SlotProps } from "./utils";
|
|
11
|
+
type RefLike<T> = ((el: T) => void) | {
|
|
12
|
+
current?: T | null;
|
|
13
|
+
} | undefined;
|
|
11
14
|
export interface RangeCalendarRenderProps {
|
|
12
15
|
/** Whether the calendar is disabled. */
|
|
13
16
|
isDisabled: boolean;
|
|
14
17
|
/** Whether the calendar is read-only. */
|
|
15
18
|
isReadOnly: boolean;
|
|
19
|
+
/** Whether the current selection is invalid. */
|
|
20
|
+
isInvalid: boolean;
|
|
16
21
|
/** Whether the user is currently selecting a range. */
|
|
17
22
|
isDragging: boolean;
|
|
18
23
|
}
|
|
19
|
-
export interface RangeCalendarProps<T extends DateValue = DateValue> extends Omit<AriaRangeCalendarProps,
|
|
24
|
+
export interface RangeCalendarProps<T extends DateValue = DateValue> extends Omit<AriaRangeCalendarProps, "id" | "isDisabled" | "isReadOnly">, Omit<RangeCalendarStateProps<T>, "locale">, SlotProps {
|
|
20
25
|
/** The children of the component. */
|
|
21
26
|
children?: JSX.Element;
|
|
22
27
|
/** The CSS className for the element. */
|
|
@@ -25,18 +30,28 @@ export interface RangeCalendarProps<T extends DateValue = DateValue> extends Omi
|
|
|
25
30
|
style?: StyleOrFunction<RangeCalendarRenderProps>;
|
|
26
31
|
/** The locale to use for formatting. */
|
|
27
32
|
locale?: string;
|
|
33
|
+
/** Ref for the range calendar root element. */
|
|
34
|
+
ref?: RefLike<HTMLDivElement>;
|
|
28
35
|
}
|
|
29
36
|
export interface RangeCalendarGridRenderProps {
|
|
30
37
|
/** Whether the grid is disabled. */
|
|
31
38
|
isDisabled: boolean;
|
|
32
39
|
}
|
|
33
|
-
export interface RangeCalendarGridProps extends Omit<AriaCalendarGridProps,
|
|
40
|
+
export interface RangeCalendarGridProps extends Omit<AriaCalendarGridProps, "startDate" | "endDate">, SlotProps {
|
|
34
41
|
/** The children of the component (render function receiving dates). */
|
|
35
42
|
children?: (date: CalendarDate) => JSX.Element;
|
|
36
43
|
/** The CSS className for the element. */
|
|
37
44
|
class?: ClassNameOrFunction<RangeCalendarGridRenderProps>;
|
|
38
45
|
/** The inline style for the element. */
|
|
39
46
|
style?: StyleOrFunction<RangeCalendarGridRenderProps>;
|
|
47
|
+
/** Class name for weekday header cells. */
|
|
48
|
+
headerCellClass?: string;
|
|
49
|
+
/** Inline style for weekday header cells. */
|
|
50
|
+
headerCellStyle?: JSX.CSSProperties;
|
|
51
|
+
/** Number of months to offset from the start. */
|
|
52
|
+
offset?: {
|
|
53
|
+
months?: number;
|
|
54
|
+
};
|
|
40
55
|
}
|
|
41
56
|
export interface RangeCalendarCellRenderProps {
|
|
42
57
|
/** Whether the cell is within the selected range. */
|
|
@@ -51,12 +66,24 @@ export interface RangeCalendarCellRenderProps {
|
|
|
51
66
|
isDisabled: boolean;
|
|
52
67
|
/** Whether the cell is unavailable. */
|
|
53
68
|
isUnavailable: boolean;
|
|
69
|
+
/** Whether the cell is part of an invalid selection. */
|
|
70
|
+
isInvalid: boolean;
|
|
54
71
|
/** Whether the cell is outside the visible month. */
|
|
55
72
|
isOutsideMonth: boolean;
|
|
56
73
|
/** Whether the cell represents today. */
|
|
57
74
|
isToday: boolean;
|
|
58
75
|
/** Whether the cell is pressed. */
|
|
59
76
|
isPressed: boolean;
|
|
77
|
+
/** Whether the cell is hovered. */
|
|
78
|
+
isHovered: boolean;
|
|
79
|
+
/** Whether the cell is the first day slot in its row. */
|
|
80
|
+
isFirstChild: boolean;
|
|
81
|
+
/** Whether the cell is the last day slot in its row. */
|
|
82
|
+
isLastChild: boolean;
|
|
83
|
+
/** Whether the cell is in the first rendered week row. */
|
|
84
|
+
isFirstWeek: boolean;
|
|
85
|
+
/** Whether the cell is in the last rendered week row. */
|
|
86
|
+
isLastWeek: boolean;
|
|
60
87
|
/** The formatted date string. */
|
|
61
88
|
formattedDate: string;
|
|
62
89
|
}
|
|
@@ -69,8 +96,13 @@ export interface RangeCalendarCellProps extends SlotProps {
|
|
|
69
96
|
class?: ClassNameOrFunction<RangeCalendarCellRenderProps>;
|
|
70
97
|
/** The inline style for the element. */
|
|
71
98
|
style?: StyleOrFunction<RangeCalendarCellRenderProps>;
|
|
99
|
+
/** Class name for the table cell wrapper. */
|
|
100
|
+
cellClass?: ClassNameOrFunction<RangeCalendarCellRenderProps>;
|
|
101
|
+
/** Inline style for the table cell wrapper. */
|
|
102
|
+
cellStyle?: StyleOrFunction<RangeCalendarCellRenderProps>;
|
|
72
103
|
}
|
|
73
104
|
export declare const RangeCalendarContext: import("solid-js").Context<RangeCalendarState<DateValue> | null>;
|
|
105
|
+
export declare const RangeCalendarStateContext: import("solid-js").Context<RangeCalendarState<DateValue> | null>;
|
|
74
106
|
export declare function useRangeCalendarContext(): RangeCalendarState<DateValue>;
|
|
75
107
|
/**
|
|
76
108
|
* A range calendar displays a grid of days and allows users to select a contiguous range of dates.
|
|
@@ -102,7 +134,7 @@ export interface RangeCalendarHeadingProps extends SlotProps {
|
|
|
102
134
|
export declare function RangeCalendarHeading(props: RangeCalendarHeadingProps): JSX.Element;
|
|
103
135
|
export interface RangeCalendarButtonProps extends SlotProps {
|
|
104
136
|
/** The slot for this button (previous or next). */
|
|
105
|
-
slot?:
|
|
137
|
+
slot?: "previous" | "next";
|
|
106
138
|
/** The children of the component. */
|
|
107
139
|
children?: JSX.Element;
|
|
108
140
|
/** The CSS className for the element. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RangeCalendar.d.ts","sourceRoot":"","sources":["../src/RangeCalendar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,GAAG,
|
|
1
|
+
{"version":3,"file":"RangeCalendar.d.ts","sourceRoot":"","sources":["../src/RangeCalendar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,GAAG,EAUT,MAAM,UAAU,CAAC;AAClB,OAAO,EAKL,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC3B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,UAAU,EAGhB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,S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B,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,GAAG,CAAC,OAAO,CAwBhF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CA8F5E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CAkG5E;AAED,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RouterProvider for solidaria-components
|
|
3
|
+
*
|
|
4
|
+
* A context provider for client-side router integration.
|
|
5
|
+
* SolidJS apps typically use TanStack Router or SolidRouter directly;
|
|
6
|
+
* this provides API compatibility with React Aria's RouterProvider.
|
|
7
|
+
*/
|
|
8
|
+
import { type JSX } from "solid-js";
|
|
9
|
+
export interface RouterClickModifiers {
|
|
10
|
+
metaKey?: boolean;
|
|
11
|
+
ctrlKey?: boolean;
|
|
12
|
+
altKey?: boolean;
|
|
13
|
+
shiftKey?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface RouterContextValue {
|
|
16
|
+
/** Whether the router is a native browser router (no client-side navigation). */
|
|
17
|
+
isNative: boolean;
|
|
18
|
+
/** Navigate to a given href. */
|
|
19
|
+
navigate: (href: string, routerOptions?: RouterOptions) => void;
|
|
20
|
+
/** Open a link target with router-aware navigation behavior. */
|
|
21
|
+
open: (target: Element, modifiers: RouterClickModifiers, href: string, routerOptions?: RouterOptions) => void;
|
|
22
|
+
/** Transform an href for the router. */
|
|
23
|
+
useHref: (href: string) => string;
|
|
24
|
+
}
|
|
25
|
+
export interface RouterOptions {
|
|
26
|
+
/** Whether to replace the current history entry. */
|
|
27
|
+
replace?: boolean;
|
|
28
|
+
/** Additional router-specific options. */
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
}
|
|
31
|
+
export interface RouterProviderProps {
|
|
32
|
+
/** A function that performs client-side navigation. */
|
|
33
|
+
navigate: (href: string, routerOptions?: RouterOptions) => void;
|
|
34
|
+
/** An optional function that transforms hrefs. */
|
|
35
|
+
useHref?: (href: string) => string;
|
|
36
|
+
/** Children to render. */
|
|
37
|
+
children: JSX.Element;
|
|
38
|
+
}
|
|
39
|
+
export declare const RouterContext: import("solid-js").Context<RouterContextValue>;
|
|
40
|
+
export interface LinkDOMProps {
|
|
41
|
+
href?: string;
|
|
42
|
+
target?: string;
|
|
43
|
+
rel?: string;
|
|
44
|
+
download?: string | boolean;
|
|
45
|
+
ping?: string;
|
|
46
|
+
referrerPolicy?: "" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url";
|
|
47
|
+
}
|
|
48
|
+
export declare function shouldClientNavigate(link: HTMLAnchorElement, modifiers: RouterClickModifiers): boolean;
|
|
49
|
+
export declare function openLink(target: HTMLAnchorElement, modifiers: RouterClickModifiers): void;
|
|
50
|
+
export declare function useLinkProps(props?: LinkDOMProps): LinkDOMProps;
|
|
51
|
+
export declare function handleLinkClick(event: MouseEvent, router: RouterContextValue, href: string | undefined, routerOptions?: RouterOptions): void;
|
|
52
|
+
/**
|
|
53
|
+
* A RouterProvider accepts a `navigate` function from a client-side router,
|
|
54
|
+
* and provides it to all nested solidaria links to enable client-side navigation.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```tsx
|
|
58
|
+
* import { useNavigate } from '@solidjs/router';
|
|
59
|
+
*
|
|
60
|
+
* function App() {
|
|
61
|
+
* const navigate = useNavigate();
|
|
62
|
+
* return (
|
|
63
|
+
* <RouterProvider navigate={navigate}>
|
|
64
|
+
* <Link href="/about">About</Link>
|
|
65
|
+
* </RouterProvider>
|
|
66
|
+
* );
|
|
67
|
+
* }
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export declare function RouterProvider(props: RouterProviderProps): JSX.Element;
|
|
71
|
+
/**
|
|
72
|
+
* Returns the current router context value.
|
|
73
|
+
*/
|
|
74
|
+
export declare function useRouter(): RouterContextValue;
|
|
75
|
+
//# sourceMappingURL=RouterProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouterProvider.d.ts","sourceRoot":"","sources":["../src/RouterProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,GAAG,EAA6B,MAAM,UAAU,CAAC;AAE/D,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,iFAAiF;IACjF,QAAQ,EAAE,OAAO,CAAC;IAClB,gCAAgC;IAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IAChE,gEAAgE;IAChE,IAAI,EAAE,CACJ,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,oBAAoB,EAC/B,IAAI,EAAE,MAAM,EACZ,aAAa,CAAC,EAAE,aAAa,KAC1B,IAAI,CAAC;IACV,wCAAwC;IACxC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,aAAa;IAC5B,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0CAA0C;IAC1C,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,uDAAuD;IACvD,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;IAChE,kDAAkD;IAClD,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAA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