@simplysm/solid 13.0.98 → 13.0.99
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 +166 -259
- package/docs/data.md +246 -120
- package/docs/disclosure.md +85 -61
- package/docs/display.md +87 -44
- package/docs/features.md +186 -155
- package/docs/feedback.md +130 -107
- package/docs/form-control.md +337 -254
- package/docs/helpers.md +120 -82
- package/docs/hooks.md +69 -70
- package/docs/layout.md +115 -85
- package/docs/providers.md +130 -110
- package/docs/styles.md +91 -85
- package/package.json +5 -5
package/docs/disclosure.md
CHANGED
|
@@ -1,61 +1,70 @@
|
|
|
1
1
|
# Disclosure Components
|
|
2
2
|
|
|
3
|
-
Source: `src/components/disclosure
|
|
3
|
+
Source: `src/components/disclosure/**`
|
|
4
4
|
|
|
5
|
-
## Collapse
|
|
5
|
+
## `Collapse`
|
|
6
6
|
|
|
7
|
-
Animated
|
|
7
|
+
Animated collapsible container using CSS margin-top transition.
|
|
8
8
|
|
|
9
|
-
```
|
|
10
|
-
interface CollapseProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
11
|
-
open?: boolean;
|
|
9
|
+
```typescript
|
|
10
|
+
export interface CollapseProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
11
|
+
open?: boolean;
|
|
12
12
|
}
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
| Prop | Type | Description |
|
|
16
|
+
|------|------|-------------|
|
|
17
|
+
| `open` | `boolean` | Whether content is visible. Default: `false` |
|
|
18
|
+
|
|
19
|
+
---
|
|
18
20
|
|
|
19
|
-
## Dropdown
|
|
21
|
+
## `Dropdown`
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
Popup dropdown component with trigger/content slot pattern. Supports auto-positioning, keyboard navigation, and context menu mode.
|
|
22
24
|
|
|
23
|
-
```
|
|
24
|
-
interface DropdownProps {
|
|
25
|
-
position?: { x: number; y: number };
|
|
25
|
+
```typescript
|
|
26
|
+
export interface DropdownProps {
|
|
27
|
+
position?: { x: number; y: number };
|
|
26
28
|
open?: boolean;
|
|
27
29
|
onOpenChange?: (open: boolean) => void;
|
|
28
|
-
maxHeight?: number;
|
|
30
|
+
maxHeight?: number;
|
|
29
31
|
disabled?: boolean;
|
|
30
|
-
keyboardNav?: boolean;
|
|
32
|
+
keyboardNav?: boolean;
|
|
31
33
|
class?: string;
|
|
32
34
|
style?: JSX.CSSProperties;
|
|
33
35
|
children: JSX.Element;
|
|
34
36
|
}
|
|
35
37
|
```
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
| Prop | Type | Description |
|
|
40
|
+
|------|------|-------------|
|
|
41
|
+
| `position` | `{ x: number; y: number }` | Absolute position for context menu mode |
|
|
42
|
+
| `open` | `boolean` | Popup open state |
|
|
43
|
+
| `onOpenChange` | `(open: boolean) => void` | Open state change callback |
|
|
44
|
+
| `maxHeight` | `number` | Popup max height in px. Default: `300` |
|
|
45
|
+
| `disabled` | `boolean` | Disable trigger click |
|
|
46
|
+
| `keyboardNav` | `boolean` | Enable ArrowUp/ArrowDown keyboard navigation |
|
|
40
47
|
|
|
41
48
|
### Sub-components
|
|
42
49
|
|
|
43
|
-
- **`Dropdown.Trigger`** --
|
|
44
|
-
- **`Dropdown.Content`** -- Popup content
|
|
50
|
+
- **`Dropdown.Trigger`** -- Trigger element slot (click toggles popup)
|
|
51
|
+
- **`Dropdown.Content`** -- Popup content slot
|
|
45
52
|
|
|
46
|
-
|
|
53
|
+
---
|
|
47
54
|
|
|
48
|
-
|
|
55
|
+
## `Dialog`
|
|
49
56
|
|
|
50
|
-
|
|
51
|
-
|
|
57
|
+
Modal/float dialog with dragging, 8-directional resizing, automatic z-index management, and slot-based header/action areas.
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
export interface DialogProps {
|
|
52
61
|
open?: boolean;
|
|
53
62
|
onOpenChange?: (open: boolean) => void;
|
|
54
|
-
withCloseButton?: boolean;
|
|
55
|
-
closeOnInteractOutside?: boolean;
|
|
56
|
-
closeOnEscape?: boolean;
|
|
57
|
-
resizable?: boolean;
|
|
58
|
-
draggable?: boolean;
|
|
63
|
+
withCloseButton?: boolean;
|
|
64
|
+
closeOnInteractOutside?: boolean;
|
|
65
|
+
closeOnEscape?: boolean;
|
|
66
|
+
resizable?: boolean;
|
|
67
|
+
draggable?: boolean;
|
|
59
68
|
mode?: "float" | "fill";
|
|
60
69
|
width?: number;
|
|
61
70
|
height?: number;
|
|
@@ -63,51 +72,64 @@ interface DialogProps {
|
|
|
63
72
|
minHeight?: number;
|
|
64
73
|
position?: "bottom-right" | "top-right";
|
|
65
74
|
headerStyle?: JSX.CSSProperties | string;
|
|
66
|
-
beforeClose?: () => boolean;
|
|
75
|
+
beforeClose?: () => boolean;
|
|
67
76
|
onCloseComplete?: () => void;
|
|
68
77
|
class?: string;
|
|
69
78
|
}
|
|
70
79
|
```
|
|
71
80
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
| Prop | Type | Description |
|
|
82
|
+
|------|------|-------------|
|
|
83
|
+
| `open` | `boolean` | Dialog open state |
|
|
84
|
+
| `onOpenChange` | `(open: boolean) => void` | Open state change callback |
|
|
85
|
+
| `withCloseButton` | `boolean` | Show close button. Default: `true` |
|
|
86
|
+
| `closeOnInteractOutside` | `boolean` | Close on backdrop click. Default: `false` |
|
|
87
|
+
| `closeOnEscape` | `boolean` | Close on ESC key. Default: `true` |
|
|
88
|
+
| `resizable` | `boolean` | Enable 8-directional resizing. Default: `false` |
|
|
89
|
+
| `draggable` | `boolean` | Enable header dragging. Default: `true` |
|
|
90
|
+
| `mode` | `"float" \| "fill"` | Display mode |
|
|
91
|
+
| `width` / `height` | `number` | Initial dimensions in px |
|
|
92
|
+
| `minWidth` / `minHeight` | `number` | Minimum dimensions in px |
|
|
93
|
+
| `position` | `"bottom-right" \| "top-right"` | Absolute position mode |
|
|
94
|
+
| `beforeClose` | `() => boolean` | Close guard (return `false` to cancel) |
|
|
95
|
+
| `onCloseComplete` | `() => void` | Callback after close animation completes |
|
|
76
96
|
|
|
77
97
|
### Sub-components
|
|
78
98
|
|
|
79
|
-
- **`Dialog.Header`** --
|
|
80
|
-
- **`Dialog.Action`** -- Action
|
|
99
|
+
- **`Dialog.Header`** -- Header slot (enables dragging)
|
|
100
|
+
- **`Dialog.Action`** -- Action slot in header area (before close button)
|
|
81
101
|
|
|
82
|
-
|
|
102
|
+
### `DialogProvider`
|
|
83
103
|
|
|
84
|
-
|
|
104
|
+
Provider for programmatic dialog management via `useDialog().show()`.
|
|
85
105
|
|
|
86
|
-
```
|
|
87
|
-
interface DialogProviderProps extends DialogDefaults {}
|
|
106
|
+
```typescript
|
|
107
|
+
export interface DialogProviderProps extends DialogDefaults {}
|
|
88
108
|
|
|
89
|
-
interface DialogDefaults {
|
|
109
|
+
export interface DialogDefaults {
|
|
90
110
|
closeOnEscape?: boolean;
|
|
91
111
|
closeOnInteractOutside?: boolean;
|
|
92
112
|
}
|
|
93
113
|
```
|
|
94
114
|
|
|
95
|
-
### useDialog
|
|
96
|
-
|
|
97
|
-
Hook to open dialogs programmatically.
|
|
115
|
+
### `useDialog`
|
|
98
116
|
|
|
99
|
-
```
|
|
100
|
-
function useDialog(): DialogContextValue;
|
|
117
|
+
```typescript
|
|
118
|
+
export function useDialog(): DialogContextValue;
|
|
101
119
|
|
|
102
|
-
interface DialogContextValue {
|
|
120
|
+
export interface DialogContextValue {
|
|
103
121
|
show<P extends Record<string, any>>(
|
|
104
122
|
component: Component<P>,
|
|
105
123
|
props: Omit<P, "close">,
|
|
106
124
|
options?: DialogShowOptions,
|
|
107
125
|
): Promise<ExtractCloseResult<P> | undefined>;
|
|
108
126
|
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### `DialogShowOptions`
|
|
109
130
|
|
|
110
|
-
|
|
131
|
+
```typescript
|
|
132
|
+
export interface DialogShowOptions {
|
|
111
133
|
header?: JSX.Element;
|
|
112
134
|
withCloseButton?: boolean;
|
|
113
135
|
closeOnInteractOutside?: boolean;
|
|
@@ -125,21 +147,17 @@ interface DialogShowOptions {
|
|
|
125
147
|
}
|
|
126
148
|
```
|
|
127
149
|
|
|
128
|
-
|
|
150
|
+
### `DialogDefaultsContext`
|
|
129
151
|
|
|
130
|
-
|
|
152
|
+
Context for setting default dialog options across the app.
|
|
131
153
|
|
|
132
|
-
|
|
154
|
+
---
|
|
133
155
|
|
|
134
|
-
|
|
135
|
-
const DialogDefaultsContext: Context<Accessor<DialogDefaults>>;
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
## Tabs
|
|
156
|
+
## `Tabs`
|
|
139
157
|
|
|
140
|
-
Tab bar with
|
|
158
|
+
Tab bar component with underline indicator and keyboard support.
|
|
141
159
|
|
|
142
|
-
```
|
|
160
|
+
```typescript
|
|
143
161
|
interface TabsProps {
|
|
144
162
|
value?: string;
|
|
145
163
|
onValueChange?: (value: string) => void;
|
|
@@ -150,11 +168,17 @@ interface TabsProps {
|
|
|
150
168
|
}
|
|
151
169
|
```
|
|
152
170
|
|
|
171
|
+
| Prop | Type | Description |
|
|
172
|
+
|------|------|-------------|
|
|
173
|
+
| `value` | `string` | Currently selected tab value |
|
|
174
|
+
| `onValueChange` | `(value: string) => void` | Tab change callback |
|
|
175
|
+
| `size` | `ComponentSize` | Tab size |
|
|
176
|
+
|
|
153
177
|
### Sub-components
|
|
154
178
|
|
|
155
|
-
- **`Tabs.Tab`** -- Individual tab button
|
|
179
|
+
- **`Tabs.Tab`** -- Individual tab button
|
|
156
180
|
|
|
157
|
-
```
|
|
181
|
+
```typescript
|
|
158
182
|
interface TabsTabProps {
|
|
159
183
|
value: string;
|
|
160
184
|
disabled?: boolean;
|
package/docs/display.md
CHANGED
|
@@ -1,94 +1,137 @@
|
|
|
1
1
|
# Display Components
|
|
2
2
|
|
|
3
|
-
Source: `src/components/display
|
|
3
|
+
Source: `src/components/display/**`
|
|
4
4
|
|
|
5
|
-
## Barcode
|
|
5
|
+
## `Barcode`
|
|
6
6
|
|
|
7
|
-
SVG barcode renderer
|
|
7
|
+
SVG barcode renderer using bwip-js. Supports 100+ barcode formats.
|
|
8
8
|
|
|
9
|
-
```
|
|
10
|
-
interface BarcodeProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
```typescript
|
|
10
|
+
export interface BarcodeProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
11
11
|
type: BarcodeType;
|
|
12
12
|
value?: string;
|
|
13
13
|
}
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
| Prop | Type | Description |
|
|
17
|
+
|------|------|-------------|
|
|
18
|
+
| `type` | `BarcodeType` | Barcode format (e.g., `"qrcode"`, `"code128"`, `"ean13"`) |
|
|
19
|
+
| `value` | `string` | Data to encode |
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
### `BarcodeType`
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
Union of 100+ barcode format strings including `"qrcode"`, `"code128"`, `"ean13"`, `"datamatrix"`, `"pdf417"`, `"azteccode"`, etc.
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
---
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
## `Card`
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
Surface container with shadow, hover effects, and fade-in animation.
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
export interface CardProps extends JSX.HTMLAttributes<HTMLDivElement> {}
|
|
28
33
|
```
|
|
29
34
|
|
|
30
|
-
|
|
35
|
+
---
|
|
31
36
|
|
|
32
|
-
## Echarts
|
|
37
|
+
## `Echarts`
|
|
33
38
|
|
|
34
|
-
Apache ECharts wrapper with
|
|
39
|
+
Apache ECharts wrapper with auto-resize and loading state support.
|
|
35
40
|
|
|
36
|
-
```
|
|
37
|
-
interface EchartsProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
41
|
+
```typescript
|
|
42
|
+
export interface EchartsProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
38
43
|
option: echarts.EChartsOption;
|
|
39
|
-
busy?: boolean;
|
|
44
|
+
busy?: boolean;
|
|
40
45
|
}
|
|
41
46
|
```
|
|
42
47
|
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
| Prop | Type | Description |
|
|
49
|
+
|------|------|-------------|
|
|
50
|
+
| `option` | `echarts.EChartsOption` | ECharts configuration object |
|
|
51
|
+
| `busy` | `boolean` | Show loading overlay |
|
|
52
|
+
|
|
53
|
+
---
|
|
45
54
|
|
|
46
|
-
## Icon
|
|
55
|
+
## `Icon`
|
|
47
56
|
|
|
48
|
-
Tabler
|
|
57
|
+
Wrapper for Tabler Icons with consistent sizing and vertical alignment.
|
|
49
58
|
|
|
50
|
-
```
|
|
51
|
-
interface IconProps extends Omit<TablerIconProps, "size"> {
|
|
59
|
+
```typescript
|
|
60
|
+
export interface IconProps extends Omit<TablerIconProps, "size"> {
|
|
52
61
|
icon: Component<TablerIconProps>;
|
|
53
|
-
size?: string | number;
|
|
62
|
+
size?: string | number;
|
|
54
63
|
}
|
|
55
64
|
```
|
|
56
65
|
|
|
57
|
-
|
|
66
|
+
| Prop | Type | Description |
|
|
67
|
+
|------|------|-------------|
|
|
68
|
+
| `icon` | `Component<TablerIconProps>` | Tabler icon component |
|
|
69
|
+
| `size` | `string \| number` | Icon size. Default: `"1.25em"` |
|
|
58
70
|
|
|
59
|
-
|
|
71
|
+
---
|
|
60
72
|
|
|
61
|
-
|
|
73
|
+
## `Tag`
|
|
62
74
|
|
|
63
|
-
|
|
64
|
-
type TagTheme = SemanticTheme;
|
|
75
|
+
Inline badge/tag with semantic theme colors.
|
|
65
76
|
|
|
66
|
-
|
|
67
|
-
|
|
77
|
+
```typescript
|
|
78
|
+
export interface TagProps extends JSX.HTMLAttributes<HTMLSpanElement> {
|
|
79
|
+
theme?: TagTheme;
|
|
68
80
|
}
|
|
69
81
|
```
|
|
70
82
|
|
|
71
|
-
|
|
83
|
+
| Prop | Type | Description |
|
|
84
|
+
|------|------|-------------|
|
|
85
|
+
| `theme` | `SemanticTheme` | Color theme. Default: `"base"` |
|
|
72
86
|
|
|
73
|
-
|
|
87
|
+
### `TagTheme`
|
|
88
|
+
|
|
89
|
+
```typescript
|
|
90
|
+
export type TagTheme = SemanticTheme;
|
|
91
|
+
```
|
|
74
92
|
|
|
75
|
-
|
|
76
|
-
type LinkTheme = SemanticTheme;
|
|
93
|
+
---
|
|
77
94
|
|
|
78
|
-
|
|
79
|
-
|
|
95
|
+
## `Link`
|
|
96
|
+
|
|
97
|
+
Styled anchor element with theme colors and disabled state.
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
export interface LinkProps extends JSX.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
101
|
+
theme?: LinkTheme;
|
|
80
102
|
disabled?: boolean;
|
|
81
103
|
}
|
|
82
104
|
```
|
|
83
105
|
|
|
84
|
-
|
|
106
|
+
| Prop | Type | Description |
|
|
107
|
+
|------|------|-------------|
|
|
108
|
+
| `theme` | `SemanticTheme` | Color theme. Default: `"primary"` |
|
|
109
|
+
| `disabled` | `boolean` | Disabled state |
|
|
110
|
+
|
|
111
|
+
### `LinkTheme`
|
|
112
|
+
|
|
113
|
+
```typescript
|
|
114
|
+
export type LinkTheme = SemanticTheme;
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
85
118
|
|
|
86
|
-
|
|
119
|
+
## `Alert`
|
|
87
120
|
|
|
88
|
-
|
|
89
|
-
type AlertTheme = SemanticTheme;
|
|
121
|
+
Block-level alert container with semantic theme background.
|
|
90
122
|
|
|
91
|
-
|
|
92
|
-
|
|
123
|
+
```typescript
|
|
124
|
+
export interface AlertProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
125
|
+
theme?: AlertTheme;
|
|
93
126
|
}
|
|
94
127
|
```
|
|
128
|
+
|
|
129
|
+
| Prop | Type | Description |
|
|
130
|
+
|------|------|-------------|
|
|
131
|
+
| `theme` | `SemanticTheme` | Color theme. Default: `"base"` |
|
|
132
|
+
|
|
133
|
+
### `AlertTheme`
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
export type AlertTheme = SemanticTheme;
|
|
137
|
+
```
|