@simple-base/solid 0.1.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/dist/index.d.ts +200 -0
- package/dist/index.js +941 -0
- package/dist/index.jsx +563 -0
- package/package.json +44 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Reda Salmi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { JSX } from "solid-js";
|
|
2
|
+
import { BadgeOptions, BadgeSize, BadgeVariant, ButtonOptions, ButtonSize, ButtonVariant, ComboboxOption, ComboboxOptions, SelectOption, SelectOptions, TableCellOptions, TableCellVariant } from "@simple-base/contracts";
|
|
3
|
+
//#region src/components/AlertDialog.d.ts
|
|
4
|
+
type AlertDialogRootProps = Omit<JSX.DialogHtmlAttributes<HTMLDialogElement>, "role" | "aria-labelledby" | "aria-describedby">;
|
|
5
|
+
declare function AlertDialogRoot(props: AlertDialogRootProps): JSX.Element;
|
|
6
|
+
type AlertDialogIconProps = JSX.HTMLAttributes<HTMLDivElement>;
|
|
7
|
+
declare function AlertDialogIcon(props: AlertDialogIconProps): JSX.Element;
|
|
8
|
+
type AlertDialogContentProps = JSX.HTMLAttributes<HTMLDivElement>;
|
|
9
|
+
declare function AlertDialogContent(props: AlertDialogContentProps): JSX.Element;
|
|
10
|
+
type AlertDialogKickerProps = JSX.HTMLAttributes<HTMLParagraphElement>;
|
|
11
|
+
declare function AlertDialogKicker(props: AlertDialogKickerProps): JSX.Element;
|
|
12
|
+
type AlertDialogTitleProps = Omit<JSX.HTMLAttributes<HTMLHeadingElement>, "id">;
|
|
13
|
+
declare function AlertDialogTitle(props: AlertDialogTitleProps): JSX.Element;
|
|
14
|
+
type AlertDialogDescriptionProps = Omit<JSX.HTMLAttributes<HTMLParagraphElement>, "id">;
|
|
15
|
+
declare function AlertDialogDescription(props: AlertDialogDescriptionProps): JSX.Element;
|
|
16
|
+
type AlertDialogActionsProps = JSX.HTMLAttributes<HTMLDivElement>;
|
|
17
|
+
declare function AlertDialogActions(props: AlertDialogActionsProps): JSX.Element;
|
|
18
|
+
export declare const AlertDialog: typeof AlertDialogRoot & {
|
|
19
|
+
Icon: typeof AlertDialogIcon;
|
|
20
|
+
Content: typeof AlertDialogContent;
|
|
21
|
+
Kicker: typeof AlertDialogKicker;
|
|
22
|
+
Title: typeof AlertDialogTitle;
|
|
23
|
+
Description: typeof AlertDialogDescription;
|
|
24
|
+
Actions: typeof AlertDialogActions;
|
|
25
|
+
};
|
|
26
|
+
type AlertDialogProps = AlertDialogRootProps;
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/components/Badge.d.ts
|
|
29
|
+
type BadgeProps = JSX.HTMLAttributes<HTMLSpanElement> & BadgeOptions;
|
|
30
|
+
export declare function Badge(props: BadgeProps): JSX.Element;
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/components/Button.d.ts
|
|
33
|
+
type ButtonProps = JSX.ButtonHTMLAttributes<HTMLButtonElement> & ButtonOptions;
|
|
34
|
+
export declare function Button(props: ButtonProps): JSX.Element;
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/components/Switch.d.ts
|
|
37
|
+
type AccessibleName = {
|
|
38
|
+
"aria-label": string;
|
|
39
|
+
"aria-labelledby"?: string;
|
|
40
|
+
} | {
|
|
41
|
+
"aria-label"?: string;
|
|
42
|
+
"aria-labelledby": string;
|
|
43
|
+
};
|
|
44
|
+
type SwitchProps = Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "type" | "role" | "aria-checked"> & AccessibleName;
|
|
45
|
+
export declare function Switch(props: SwitchProps): JSX.Element;
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/components/Checkbox.d.ts
|
|
48
|
+
type CheckboxProps = Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "type">;
|
|
49
|
+
export declare function Checkbox(props: CheckboxProps): JSX.Element;
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/components/Input.d.ts
|
|
52
|
+
type InputElement = JSX.InputHTMLAttributes<HTMLInputElement>;
|
|
53
|
+
type InputType = Exclude<InputElement["type"], "radio" | "checkbox">;
|
|
54
|
+
type InputProps = Omit<InputElement, "type"> & {
|
|
55
|
+
type?: InputType;
|
|
56
|
+
};
|
|
57
|
+
export declare function Input(props: InputProps): JSX.Element;
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/components/Radio.d.ts
|
|
60
|
+
type RadioProps = Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "type">;
|
|
61
|
+
export declare function Radio(props: RadioProps): JSX.Element;
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/components/TextArea.d.ts
|
|
64
|
+
type TextAreaProps = JSX.TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
65
|
+
export declare function TextArea(props: TextAreaProps): JSX.Element;
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/components/Combobox.d.ts
|
|
68
|
+
type ComboboxRootProps = ComboboxOptions & {
|
|
69
|
+
children: JSX.Element;
|
|
70
|
+
} & Omit<JSX.HTMLAttributes<HTMLDivElement>, keyof ComboboxOptions | "children">;
|
|
71
|
+
declare function ComboboxRoot(props: ComboboxRootProps): JSX.Element;
|
|
72
|
+
type ComboboxLabelProps = Omit<JSX.LabelHTMLAttributes<HTMLLabelElement>, "id" | "for"> & {
|
|
73
|
+
children?: JSX.Element;
|
|
74
|
+
};
|
|
75
|
+
declare function ComboboxLabel(props: ComboboxLabelProps): JSX.Element;
|
|
76
|
+
type ComboboxControlProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, "id">;
|
|
77
|
+
declare function ComboboxControl(props: ComboboxControlProps): JSX.Element;
|
|
78
|
+
type ComboboxInputProps = Omit<JSX.InputHTMLAttributes<HTMLInputElement>, "id" | "type" | "role" | "value" | "defaultValue" | "disabled" | "readOnly" | "autoComplete">;
|
|
79
|
+
declare function ComboboxInput(props: ComboboxInputProps): JSX.Element;
|
|
80
|
+
type ComboboxTriggerProps = Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, "id" | "type" | "role" | "disabled">;
|
|
81
|
+
declare function ComboboxTrigger(props: ComboboxTriggerProps): JSX.Element;
|
|
82
|
+
type ComboboxPortalProps = {
|
|
83
|
+
children: JSX.Element;
|
|
84
|
+
mount?: Node;
|
|
85
|
+
};
|
|
86
|
+
declare function ComboboxPortal(props: ComboboxPortalProps): JSX.Element;
|
|
87
|
+
type ComboboxPositionerProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, "id" | "style">;
|
|
88
|
+
declare function ComboboxPositioner(props: ComboboxPositionerProps): JSX.Element;
|
|
89
|
+
type ComboboxContentProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, "hidden">;
|
|
90
|
+
declare function ComboboxContent(props: ComboboxContentProps): JSX.Element;
|
|
91
|
+
type ComboboxListProps = Omit<JSX.HTMLAttributes<HTMLUListElement>, "id" | "role" | "tabIndex" | "children"> & {
|
|
92
|
+
children: (option: ComboboxOption) => JSX.Element;
|
|
93
|
+
};
|
|
94
|
+
declare function ComboboxList(props: ComboboxListProps): JSX.Element;
|
|
95
|
+
type ComboboxEmptyProps = JSX.HTMLAttributes<HTMLDivElement>;
|
|
96
|
+
declare function ComboboxEmpty(props: ComboboxEmptyProps): JSX.Element;
|
|
97
|
+
type ComboboxItemProps = Omit<JSX.LiHTMLAttributes<HTMLLIElement>, "id" | "role" | "children"> & {
|
|
98
|
+
option: ComboboxOption;
|
|
99
|
+
};
|
|
100
|
+
declare function ComboboxItem(props: ComboboxItemProps): JSX.Element;
|
|
101
|
+
export declare const Combobox: typeof ComboboxRoot & {
|
|
102
|
+
Root: typeof ComboboxRoot;
|
|
103
|
+
Label: typeof ComboboxLabel;
|
|
104
|
+
Control: typeof ComboboxControl;
|
|
105
|
+
Input: typeof ComboboxInput;
|
|
106
|
+
Trigger: typeof ComboboxTrigger;
|
|
107
|
+
Portal: typeof ComboboxPortal;
|
|
108
|
+
Positioner: typeof ComboboxPositioner;
|
|
109
|
+
Content: typeof ComboboxContent;
|
|
110
|
+
List: typeof ComboboxList;
|
|
111
|
+
Empty: typeof ComboboxEmpty;
|
|
112
|
+
Item: typeof ComboboxItem;
|
|
113
|
+
};
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/components/Select.d.ts
|
|
116
|
+
type SelectRootProps = SelectOptions & {
|
|
117
|
+
children: JSX.Element;
|
|
118
|
+
} & Omit<JSX.HTMLAttributes<HTMLDivElement>, keyof SelectOptions | "children">;
|
|
119
|
+
declare function SelectRoot(props: SelectRootProps): JSX.Element;
|
|
120
|
+
type SelectLabelProps = Omit<JSX.LabelHTMLAttributes<HTMLLabelElement>, "id" | "for"> & {
|
|
121
|
+
children?: JSX.Element;
|
|
122
|
+
};
|
|
123
|
+
declare function SelectLabel(props: SelectLabelProps): JSX.Element;
|
|
124
|
+
type SelectControlProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, "id">;
|
|
125
|
+
declare function SelectControl(props: SelectControlProps): JSX.Element;
|
|
126
|
+
type SelectTriggerProps = Omit<JSX.ButtonHTMLAttributes<HTMLButtonElement>, "id" | "type" | "role" | "disabled" | "aria-label">;
|
|
127
|
+
declare function SelectTrigger(props: SelectTriggerProps): JSX.Element;
|
|
128
|
+
type SelectValueTextProps = JSX.HTMLAttributes<HTMLSpanElement>;
|
|
129
|
+
declare function SelectValueText(props: SelectValueTextProps): JSX.Element;
|
|
130
|
+
type SelectIndicatorProps = Omit<JSX.HTMLAttributes<HTMLSpanElement>, "aria-hidden">;
|
|
131
|
+
declare function SelectIndicator(props: SelectIndicatorProps): JSX.Element;
|
|
132
|
+
type SelectPortalProps = {
|
|
133
|
+
children: JSX.Element;
|
|
134
|
+
mount?: Node;
|
|
135
|
+
};
|
|
136
|
+
declare function SelectPortal(props: SelectPortalProps): JSX.Element;
|
|
137
|
+
type SelectPositionerProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, "id" | "style">;
|
|
138
|
+
declare function SelectPositioner(props: SelectPositionerProps): JSX.Element;
|
|
139
|
+
type SelectContentProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, "hidden">;
|
|
140
|
+
declare function SelectContent(props: SelectContentProps): JSX.Element;
|
|
141
|
+
type SelectListProps = Omit<JSX.HTMLAttributes<HTMLUListElement>, "id" | "role" | "tabIndex" | "children"> & {
|
|
142
|
+
children: (option: SelectOption) => JSX.Element;
|
|
143
|
+
};
|
|
144
|
+
declare function SelectList(props: SelectListProps): JSX.Element;
|
|
145
|
+
type SelectEmptyProps = JSX.HTMLAttributes<HTMLDivElement>;
|
|
146
|
+
declare function SelectEmpty(props: SelectEmptyProps): JSX.Element;
|
|
147
|
+
type SelectItemProps = Omit<JSX.LiHTMLAttributes<HTMLLIElement>, "id" | "role" | "children"> & {
|
|
148
|
+
option: SelectOption;
|
|
149
|
+
};
|
|
150
|
+
declare function SelectItem(props: SelectItemProps): JSX.Element;
|
|
151
|
+
export declare const Select: typeof SelectRoot & {
|
|
152
|
+
Root: typeof SelectRoot;
|
|
153
|
+
Label: typeof SelectLabel;
|
|
154
|
+
Control: typeof SelectControl;
|
|
155
|
+
Trigger: typeof SelectTrigger;
|
|
156
|
+
ValueText: typeof SelectValueText;
|
|
157
|
+
Indicator: typeof SelectIndicator;
|
|
158
|
+
Portal: typeof SelectPortal;
|
|
159
|
+
Positioner: typeof SelectPositioner;
|
|
160
|
+
Content: typeof SelectContent;
|
|
161
|
+
List: typeof SelectList;
|
|
162
|
+
Empty: typeof SelectEmpty;
|
|
163
|
+
Item: typeof SelectItem;
|
|
164
|
+
};
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region src/components/Table.d.ts
|
|
167
|
+
type TableRootProps = JSX.HTMLAttributes<HTMLTableElement>;
|
|
168
|
+
declare function TableRoot(props: TableRootProps): JSX.Element;
|
|
169
|
+
type TableWrapProps = JSX.HTMLAttributes<HTMLDivElement>;
|
|
170
|
+
declare function TableWrap(props: TableWrapProps): JSX.Element;
|
|
171
|
+
type TableCaptionProps = JSX.CaptionHTMLAttributes<HTMLTableCaptionElement>;
|
|
172
|
+
declare function TableCaption(props: TableCaptionProps): JSX.Element;
|
|
173
|
+
type TableHeaderProps = JSX.HTMLAttributes<HTMLTableSectionElement>;
|
|
174
|
+
declare function TableHeader(props: TableHeaderProps): JSX.Element;
|
|
175
|
+
type TableBodyProps = JSX.HTMLAttributes<HTMLTableSectionElement>;
|
|
176
|
+
declare function TableBody(props: TableBodyProps): JSX.Element;
|
|
177
|
+
type TableFooterProps = JSX.HTMLAttributes<HTMLTableSectionElement>;
|
|
178
|
+
declare function TableFooter(props: TableFooterProps): JSX.Element;
|
|
179
|
+
type TableRowProps = JSX.HTMLAttributes<HTMLTableRowElement>;
|
|
180
|
+
declare function TableRow(props: TableRowProps): JSX.Element;
|
|
181
|
+
type TableColumnHeaderProps = JSX.ThHTMLAttributes<HTMLTableCellElement>;
|
|
182
|
+
declare function TableColumnHeader(props: TableColumnHeaderProps): JSX.Element;
|
|
183
|
+
type TableRowHeaderProps = JSX.ThHTMLAttributes<HTMLTableCellElement>;
|
|
184
|
+
declare function TableRowHeader(props: TableRowHeaderProps): JSX.Element;
|
|
185
|
+
type TableCellProps = JSX.TdHTMLAttributes<HTMLTableCellElement> & TableCellOptions;
|
|
186
|
+
declare function TableCell(props: TableCellProps): JSX.Element;
|
|
187
|
+
export declare const Table: typeof TableRoot & {
|
|
188
|
+
Root: typeof TableRoot;
|
|
189
|
+
Wrap: typeof TableWrap;
|
|
190
|
+
Caption: typeof TableCaption;
|
|
191
|
+
Header: typeof TableHeader;
|
|
192
|
+
Body: typeof TableBody;
|
|
193
|
+
Footer: typeof TableFooter;
|
|
194
|
+
Row: typeof TableRow;
|
|
195
|
+
ColumnHeader: typeof TableColumnHeader;
|
|
196
|
+
RowHeader: typeof TableRowHeader;
|
|
197
|
+
Cell: typeof TableCell;
|
|
198
|
+
};
|
|
199
|
+
//#endregion
|
|
200
|
+
export type { AlertDialogActionsProps, AlertDialogContentProps, AlertDialogDescriptionProps, AlertDialogIconProps, AlertDialogKickerProps, AlertDialogProps, AlertDialogRootProps, AlertDialogTitleProps, BadgeProps, BadgeSize, BadgeVariant, ButtonProps, ButtonSize, ButtonVariant, CheckboxProps, ComboboxContentProps, ComboboxControlProps, ComboboxEmptyProps, ComboboxInputProps, ComboboxItemProps, ComboboxLabelProps, ComboboxListProps, ComboboxPortalProps, ComboboxPositionerProps, ComboboxRootProps, ComboboxTriggerProps, InputProps, RadioProps, SelectContentProps, SelectControlProps, SelectEmptyProps, SelectIndicatorProps, SelectItemProps, SelectLabelProps, SelectListProps, SelectPortalProps, SelectPositionerProps, SelectRootProps, SelectTriggerProps, SelectValueTextProps, SwitchProps, TableBodyProps, TableCaptionProps, TableCellProps, TableCellVariant, TableColumnHeaderProps, TableFooterProps, TableHeaderProps, TableRootProps, TableRowHeaderProps, TableRowProps, TableWrapProps, TextAreaProps };
|