@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/feedback.md
CHANGED
|
@@ -1,81 +1,70 @@
|
|
|
1
1
|
# Feedback Components
|
|
2
2
|
|
|
3
|
-
Source: `src/components/feedback
|
|
3
|
+
Source: `src/components/feedback/**`
|
|
4
4
|
|
|
5
|
-
## Progress
|
|
5
|
+
## `Progress`
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Progress bar component with theme colors and custom content support.
|
|
8
8
|
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
value: number; // 0-100
|
|
14
|
-
theme?: ProgressTheme; // default: "primary"
|
|
9
|
+
```typescript
|
|
10
|
+
export interface ProgressProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
11
|
+
value: number;
|
|
12
|
+
theme?: ProgressTheme;
|
|
15
13
|
size?: ComponentSize;
|
|
16
14
|
inset?: boolean;
|
|
17
15
|
}
|
|
18
16
|
```
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
| Prop | Type | Description |
|
|
19
|
+
|------|------|-------------|
|
|
20
|
+
| `value` | `number` | Progress value (0-100) |
|
|
21
|
+
| `theme` | `SemanticTheme` | Bar color theme. Default: `"primary"` |
|
|
22
|
+
| `size` | `ComponentSize` | Padding size |
|
|
23
|
+
| `inset` | `boolean` | Borderless transparent background mode |
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
### `ProgressTheme`
|
|
25
26
|
|
|
26
|
-
```
|
|
27
|
-
|
|
27
|
+
```typescript
|
|
28
|
+
export type ProgressTheme = SemanticTheme;
|
|
28
29
|
```
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## `NotificationProvider`
|
|
31
34
|
|
|
32
|
-
|
|
35
|
+
Provider for the notification system. Maintains up to 50 notifications.
|
|
36
|
+
|
|
37
|
+
### `useNotification`
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
export function useNotification(): NotificationContextValue;
|
|
41
|
+
```
|
|
33
42
|
|
|
34
|
-
|
|
35
|
-
function useNotification(): NotificationContextValue;
|
|
43
|
+
### `NotificationContextValue`
|
|
36
44
|
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
```typescript
|
|
46
|
+
export interface NotificationContextValue {
|
|
39
47
|
items: Accessor<NotificationItem[]>;
|
|
40
48
|
unreadCount: Accessor<number>;
|
|
41
49
|
latestUnread: Accessor<NotificationItem | undefined>;
|
|
42
|
-
|
|
43
|
-
// Create (returns id)
|
|
44
50
|
info: (title: string, message?: string, options?: NotificationOptions) => string;
|
|
45
51
|
success: (title: string, message?: string, options?: NotificationOptions) => string;
|
|
46
52
|
warning: (title: string, message?: string, options?: NotificationOptions) => string;
|
|
47
53
|
danger: (title: string, message?: string, options?: NotificationOptions) => string;
|
|
48
54
|
error: (err?: any, header?: string) => void;
|
|
49
|
-
|
|
50
|
-
// Update
|
|
51
|
-
update: (
|
|
52
|
-
id: string,
|
|
53
|
-
updates: Partial<Pick<NotificationItem, "title" | "message" | "theme" | "action">>,
|
|
54
|
-
options?: NotificationUpdateOptions,
|
|
55
|
-
) => void;
|
|
56
|
-
|
|
57
|
-
// Delete
|
|
55
|
+
update: (id: string, updates: Partial<Pick<NotificationItem, "title" | "message" | "theme" | "action">>, options?: NotificationUpdateOptions) => void;
|
|
58
56
|
remove: (id: string) => void;
|
|
59
|
-
|
|
60
|
-
// Management
|
|
61
57
|
markAsRead: (id: string) => void;
|
|
62
58
|
markAllAsRead: () => void;
|
|
63
59
|
dismissBanner: () => void;
|
|
64
60
|
clear: () => void;
|
|
65
61
|
}
|
|
62
|
+
```
|
|
66
63
|
|
|
67
|
-
|
|
68
|
-
action?: NotificationAction;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
interface NotificationAction {
|
|
72
|
-
label: string;
|
|
73
|
-
onClick: () => void;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
type NotificationTheme = "info" | "success" | "warning" | "danger";
|
|
64
|
+
### `NotificationItem`
|
|
77
65
|
|
|
78
|
-
|
|
66
|
+
```typescript
|
|
67
|
+
export interface NotificationItem {
|
|
79
68
|
id: string;
|
|
80
69
|
theme: NotificationTheme;
|
|
81
70
|
title: string;
|
|
@@ -86,46 +75,85 @@ interface NotificationItem {
|
|
|
86
75
|
}
|
|
87
76
|
```
|
|
88
77
|
|
|
89
|
-
|
|
78
|
+
### `NotificationTheme`
|
|
90
79
|
|
|
91
|
-
|
|
80
|
+
```typescript
|
|
81
|
+
export type NotificationTheme = "info" | "success" | "warning" | "danger";
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### `NotificationAction`
|
|
92
85
|
|
|
93
|
-
```
|
|
94
|
-
interface
|
|
95
|
-
|
|
86
|
+
```typescript
|
|
87
|
+
export interface NotificationAction {
|
|
88
|
+
label: string;
|
|
89
|
+
onClick: () => void;
|
|
96
90
|
}
|
|
97
91
|
```
|
|
98
92
|
|
|
99
|
-
|
|
93
|
+
### `NotificationOptions`
|
|
100
94
|
|
|
101
|
-
|
|
95
|
+
```typescript
|
|
96
|
+
export interface NotificationOptions {
|
|
97
|
+
action?: NotificationAction;
|
|
98
|
+
}
|
|
99
|
+
```
|
|
102
100
|
|
|
103
|
-
|
|
101
|
+
### `NotificationUpdateOptions`
|
|
104
102
|
|
|
105
|
-
```
|
|
106
|
-
|
|
103
|
+
```typescript
|
|
104
|
+
export interface NotificationUpdateOptions {
|
|
105
|
+
renotify?: boolean;
|
|
106
|
+
}
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## `NotificationBell`
|
|
110
112
|
|
|
111
|
-
|
|
113
|
+
Bell icon button that shows unread count badge and dropdown notification list.
|
|
112
114
|
|
|
113
|
-
```
|
|
114
|
-
interface
|
|
115
|
-
|
|
115
|
+
```typescript
|
|
116
|
+
export interface NotificationBellProps {
|
|
117
|
+
showBanner?: boolean;
|
|
116
118
|
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
| Prop | Type | Description |
|
|
122
|
+
|------|------|-------------|
|
|
123
|
+
| `showBanner` | `boolean` | Show notification banner. Default: `true` |
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## `NotificationBanner`
|
|
128
|
+
|
|
129
|
+
Fixed-position banner showing the latest unread notification with dismiss and action buttons.
|
|
130
|
+
|
|
131
|
+
No props (reads from `NotificationContext`).
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## `BusyProvider`
|
|
136
|
+
|
|
137
|
+
Provider for busy overlay state management. Supports nested show/hide calls.
|
|
117
138
|
|
|
118
|
-
|
|
139
|
+
```typescript
|
|
140
|
+
export interface BusyProviderProps {
|
|
141
|
+
variant?: BusyVariant;
|
|
142
|
+
}
|
|
119
143
|
```
|
|
120
144
|
|
|
121
|
-
###
|
|
145
|
+
### `BusyVariant`
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
export type BusyVariant = "spinner" | "bar";
|
|
149
|
+
```
|
|
122
150
|
|
|
123
|
-
|
|
151
|
+
### `useBusy`
|
|
124
152
|
|
|
125
|
-
```
|
|
126
|
-
function useBusy(): BusyContextValue;
|
|
153
|
+
```typescript
|
|
154
|
+
export function useBusy(): BusyContextValue;
|
|
127
155
|
|
|
128
|
-
interface BusyContextValue {
|
|
156
|
+
export interface BusyContextValue {
|
|
129
157
|
variant: Accessor<BusyVariant>;
|
|
130
158
|
show: (message?: string) => void;
|
|
131
159
|
hide: () => void;
|
|
@@ -133,16 +161,16 @@ interface BusyContextValue {
|
|
|
133
161
|
}
|
|
134
162
|
```
|
|
135
163
|
|
|
136
|
-
|
|
164
|
+
---
|
|
137
165
|
|
|
138
|
-
## BusyContainer
|
|
166
|
+
## `BusyContainer`
|
|
139
167
|
|
|
140
|
-
|
|
168
|
+
Inline loading overlay component with spinner or progress bar variants.
|
|
141
169
|
|
|
142
|
-
```
|
|
143
|
-
interface BusyContainerProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
144
|
-
busy?: boolean;
|
|
145
|
-
ready?: boolean;
|
|
170
|
+
```typescript
|
|
171
|
+
export interface BusyContainerProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "children"> {
|
|
172
|
+
busy?: boolean;
|
|
173
|
+
ready?: boolean;
|
|
146
174
|
variant?: BusyVariant;
|
|
147
175
|
message?: string;
|
|
148
176
|
progressPercent?: number;
|
|
@@ -150,61 +178,56 @@ interface BusyContainerProps extends Omit<JSX.HTMLAttributes<HTMLDivElement>, "c
|
|
|
150
178
|
}
|
|
151
179
|
```
|
|
152
180
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
181
|
+
| Prop | Type | Description |
|
|
182
|
+
|------|------|-------------|
|
|
183
|
+
| `busy` | `boolean` | Show loading overlay (children preserved) |
|
|
184
|
+
| `ready` | `boolean` | If `false`, children hidden and loading shown (initial loading) |
|
|
185
|
+
| `variant` | `BusyVariant` | Display style. Inherits from `BusyProvider` context |
|
|
186
|
+
| `message` | `string` | Loading message text |
|
|
187
|
+
| `progressPercent` | `number` | Progress bar value (0-100) |
|
|
160
188
|
|
|
161
|
-
|
|
162
|
-
const PrintProvider: ParentComponent;
|
|
163
|
-
```
|
|
189
|
+
---
|
|
164
190
|
|
|
165
|
-
|
|
191
|
+
## `PrintProvider`
|
|
166
192
|
|
|
167
|
-
|
|
193
|
+
Provider for print-to-printer and print-to-PDF functionality.
|
|
168
194
|
|
|
169
|
-
|
|
195
|
+
### `usePrint`
|
|
170
196
|
|
|
171
|
-
```
|
|
172
|
-
function usePrint(): PrintContextValue;
|
|
197
|
+
```typescript
|
|
198
|
+
export function usePrint(): PrintContextValue;
|
|
173
199
|
|
|
174
|
-
interface PrintContextValue {
|
|
200
|
+
export interface PrintContextValue {
|
|
175
201
|
toPrinter: (factory: () => JSX.Element, options?: PrintOptions) => Promise<void>;
|
|
176
202
|
toPdf: (factory: () => JSX.Element, options?: PrintOptions) => Promise<Uint8Array>;
|
|
177
203
|
}
|
|
178
|
-
|
|
179
|
-
interface PrintOptions {
|
|
180
|
-
size?: string; // e.g., "A4", "A3 landscape", "100mm 200mm"
|
|
181
|
-
margin?: string; // CSS margin, default: "0"
|
|
182
|
-
}
|
|
183
204
|
```
|
|
184
205
|
|
|
185
|
-
|
|
186
|
-
- `toPdf`: renders content off-screen, converts to images via `html-to-image`, generates PDF via `jsPDF`.
|
|
206
|
+
### `PrintOptions`
|
|
187
207
|
|
|
188
|
-
|
|
208
|
+
```typescript
|
|
209
|
+
export interface PrintOptions {
|
|
210
|
+
size?: string;
|
|
211
|
+
margin?: string;
|
|
212
|
+
}
|
|
213
|
+
```
|
|
189
214
|
|
|
190
|
-
|
|
215
|
+
### `usePrintInstance`
|
|
191
216
|
|
|
192
|
-
```
|
|
193
|
-
function usePrintInstance(): PrintInstance | undefined;
|
|
217
|
+
```typescript
|
|
218
|
+
export function usePrintInstance(): PrintInstance | undefined;
|
|
194
219
|
|
|
195
|
-
interface PrintInstance {
|
|
220
|
+
export interface PrintInstance {
|
|
196
221
|
ready: () => void;
|
|
197
222
|
}
|
|
198
223
|
```
|
|
199
224
|
|
|
200
|
-
|
|
225
|
+
---
|
|
201
226
|
|
|
202
|
-
|
|
227
|
+
## `Print`
|
|
203
228
|
|
|
204
|
-
|
|
205
|
-
const Print: ParentComponent;
|
|
206
|
-
```
|
|
229
|
+
Wrapper component for print content with page separation.
|
|
207
230
|
|
|
208
231
|
### Sub-components
|
|
209
232
|
|
|
210
|
-
- **`Print.Page`** --
|
|
233
|
+
- **`Print.Page`** -- Individual print page container
|