@simplysm/solid 13.0.96 → 13.0.98
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 +314 -123
- package/docs/data.md +216 -0
- package/docs/disclosure.md +164 -0
- package/docs/display.md +94 -0
- package/docs/features.md +211 -625
- package/docs/feedback.md +210 -0
- package/docs/form-control.md +537 -0
- package/docs/helpers.md +168 -0
- package/docs/hooks.md +143 -0
- package/docs/layout.md +182 -0
- package/docs/providers.md +177 -0
- package/docs/styles.md +127 -0
- package/package.json +19 -26
- package/docs/display-feedback.md +0 -404
- package/docs/form-controls.md +0 -587
- package/docs/layout-data.md +0 -392
- package/docs/providers-hooks.md +0 -516
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Disclosure Components
|
|
2
|
+
|
|
3
|
+
Source: `src/components/disclosure/**/*.tsx`
|
|
4
|
+
|
|
5
|
+
## Collapse
|
|
6
|
+
|
|
7
|
+
Animated expand/collapse container using margin-top transition.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
interface CollapseProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
11
|
+
open?: boolean; // default: false
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- Uses `ResizeObserver` to track content height.
|
|
16
|
+
- Disables transition on initial render to prevent flicker.
|
|
17
|
+
- Sets `visibility: hidden` when closed to prevent focusable element access.
|
|
18
|
+
|
|
19
|
+
## Dropdown
|
|
20
|
+
|
|
21
|
+
Positioned popup with trigger element. Uses Portal for rendering.
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
interface DropdownProps {
|
|
25
|
+
position?: { x: number; y: number }; // absolute position (for context menus)
|
|
26
|
+
open?: boolean;
|
|
27
|
+
onOpenChange?: (open: boolean) => void;
|
|
28
|
+
maxHeight?: number; // default: 300
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
keyboardNav?: boolean; // arrow key navigation
|
|
31
|
+
class?: string;
|
|
32
|
+
style?: JSX.CSSProperties;
|
|
33
|
+
children: JSX.Element;
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- Auto-positions above or below trigger based on available viewport space.
|
|
38
|
+
- Closes on outside click, Escape key, scroll, and resize.
|
|
39
|
+
- `keyboardNav`: ArrowDown/Up navigates between tabbable items in popup.
|
|
40
|
+
|
|
41
|
+
### Sub-components
|
|
42
|
+
|
|
43
|
+
- **`Dropdown.Trigger`** -- Click target that toggles the dropdown. Slot component.
|
|
44
|
+
- **`Dropdown.Content`** -- Popup content. Slot component.
|
|
45
|
+
|
|
46
|
+
## Dialog
|
|
47
|
+
|
|
48
|
+
Modal or floating dialog with drag, resize, z-index management, and animation.
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
interface DialogProps {
|
|
52
|
+
open?: boolean;
|
|
53
|
+
onOpenChange?: (open: boolean) => void;
|
|
54
|
+
withCloseButton?: boolean; // default: true
|
|
55
|
+
closeOnInteractOutside?: boolean; // default: false (uses DialogDefaults)
|
|
56
|
+
closeOnEscape?: boolean; // default: true (uses DialogDefaults)
|
|
57
|
+
resizable?: boolean; // default: false
|
|
58
|
+
draggable?: boolean; // default: true
|
|
59
|
+
mode?: "float" | "fill";
|
|
60
|
+
width?: number;
|
|
61
|
+
height?: number;
|
|
62
|
+
minWidth?: number;
|
|
63
|
+
minHeight?: number;
|
|
64
|
+
position?: "bottom-right" | "top-right";
|
|
65
|
+
headerStyle?: JSX.CSSProperties | string;
|
|
66
|
+
beforeClose?: () => boolean; // return false to prevent close
|
|
67
|
+
onCloseComplete?: () => void;
|
|
68
|
+
class?: string;
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
- `mode="float"`: no backdrop, pointer-events pass through.
|
|
73
|
+
- `mode="fill"`: full-screen dialog.
|
|
74
|
+
- 8-direction resize handles when `resizable=true`.
|
|
75
|
+
- Automatic z-index stacking across multiple open dialogs.
|
|
76
|
+
|
|
77
|
+
### Sub-components
|
|
78
|
+
|
|
79
|
+
- **`Dialog.Header`** -- Dialog title bar. Enables drag when `draggable=true`.
|
|
80
|
+
- **`Dialog.Action`** -- Action buttons rendered in the header next to the close button.
|
|
81
|
+
|
|
82
|
+
## DialogProvider
|
|
83
|
+
|
|
84
|
+
Programmatic dialog provider. Enables `useDialog().show()` to open dialogs as Promises.
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
interface DialogProviderProps extends DialogDefaults {}
|
|
88
|
+
|
|
89
|
+
interface DialogDefaults {
|
|
90
|
+
closeOnEscape?: boolean;
|
|
91
|
+
closeOnInteractOutside?: boolean;
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### useDialog()
|
|
96
|
+
|
|
97
|
+
Hook to open dialogs programmatically.
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
function useDialog(): DialogContextValue;
|
|
101
|
+
|
|
102
|
+
interface DialogContextValue {
|
|
103
|
+
show<P extends Record<string, any>>(
|
|
104
|
+
component: Component<P>,
|
|
105
|
+
props: Omit<P, "close">,
|
|
106
|
+
options?: DialogShowOptions,
|
|
107
|
+
): Promise<ExtractCloseResult<P> | undefined>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface DialogShowOptions {
|
|
111
|
+
header?: JSX.Element;
|
|
112
|
+
withCloseButton?: boolean;
|
|
113
|
+
closeOnInteractOutside?: boolean;
|
|
114
|
+
closeOnEscape?: boolean;
|
|
115
|
+
resizable?: boolean;
|
|
116
|
+
draggable?: boolean;
|
|
117
|
+
mode?: "float" | "fill";
|
|
118
|
+
width?: number;
|
|
119
|
+
height?: number;
|
|
120
|
+
minWidth?: number;
|
|
121
|
+
minHeight?: number;
|
|
122
|
+
position?: "bottom-right" | "top-right";
|
|
123
|
+
headerStyle?: JSX.CSSProperties | string;
|
|
124
|
+
beforeClose?: () => boolean;
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The dialog component receives a `close` prop. Call `close(result)` to resolve the Promise.
|
|
129
|
+
|
|
130
|
+
### DialogDefaultsContext
|
|
131
|
+
|
|
132
|
+
Context providing default dialog configuration. Used by `Dialog` when per-instance props are not set.
|
|
133
|
+
|
|
134
|
+
```ts
|
|
135
|
+
const DialogDefaultsContext: Context<Accessor<DialogDefaults>>;
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Tabs
|
|
139
|
+
|
|
140
|
+
Tab bar with value-based selection.
|
|
141
|
+
|
|
142
|
+
```ts
|
|
143
|
+
interface TabsProps {
|
|
144
|
+
value?: string;
|
|
145
|
+
onValueChange?: (value: string) => void;
|
|
146
|
+
size?: ComponentSize;
|
|
147
|
+
class?: string;
|
|
148
|
+
style?: JSX.CSSProperties;
|
|
149
|
+
children?: JSX.Element;
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Sub-components
|
|
154
|
+
|
|
155
|
+
- **`Tabs.Tab`** -- Individual tab button.
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
interface TabsTabProps {
|
|
159
|
+
value: string;
|
|
160
|
+
disabled?: boolean;
|
|
161
|
+
class?: string;
|
|
162
|
+
children?: JSX.Element;
|
|
163
|
+
}
|
|
164
|
+
```
|
package/docs/display.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Display Components
|
|
2
|
+
|
|
3
|
+
Source: `src/components/display/**/*.tsx`
|
|
4
|
+
|
|
5
|
+
## Barcode
|
|
6
|
+
|
|
7
|
+
SVG barcode renderer powered by bwip-js.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
interface BarcodeProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
11
|
+
type: BarcodeType;
|
|
12
|
+
value?: string;
|
|
13
|
+
}
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### BarcodeType
|
|
17
|
+
|
|
18
|
+
Union type of all supported barcode formats. Common values include: `"qrcode"`, `"code128"`, `"ean13"`, `"datamatrix"`, `"pdf417"`, `"azteccode"`, `"code39"`, `"upca"`, `"isbn"`.
|
|
19
|
+
|
|
20
|
+
Full list exported from `src/components/display/Barcode.types.ts` with 100+ formats.
|
|
21
|
+
|
|
22
|
+
## Card
|
|
23
|
+
|
|
24
|
+
Elevated container with shadow and fade-in animation.
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
interface CardProps extends JSX.HTMLAttributes<HTMLDivElement> {}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Applies surface background, rounded corners, shadow with hover/focus-within elevation.
|
|
31
|
+
|
|
32
|
+
## Echarts
|
|
33
|
+
|
|
34
|
+
Apache ECharts wrapper with reactive option updates and resize handling.
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
interface EchartsProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
38
|
+
option: echarts.EChartsOption;
|
|
39
|
+
busy?: boolean; // shows/hides loading indicator
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
- Uses SVG renderer.
|
|
44
|
+
- Automatically resizes with container via `ResizeObserver`.
|
|
45
|
+
|
|
46
|
+
## Icon
|
|
47
|
+
|
|
48
|
+
Tabler icon wrapper using `Dynamic` rendering.
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
interface IconProps extends Omit<TablerIconProps, "size"> {
|
|
52
|
+
icon: Component<TablerIconProps>;
|
|
53
|
+
size?: string | number; // default: "1.25em"
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Adds `inline` display and vertical alignment.
|
|
58
|
+
|
|
59
|
+
## Tag
|
|
60
|
+
|
|
61
|
+
Themed inline tag/badge with solid background.
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
type TagTheme = SemanticTheme;
|
|
65
|
+
|
|
66
|
+
interface TagProps extends JSX.HTMLAttributes<HTMLSpanElement> {
|
|
67
|
+
theme?: TagTheme; // default: "base"
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Link
|
|
72
|
+
|
|
73
|
+
Themed anchor link with hover underline.
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
type LinkTheme = SemanticTheme;
|
|
77
|
+
|
|
78
|
+
interface LinkProps extends JSX.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
79
|
+
theme?: LinkTheme; // default: "primary"
|
|
80
|
+
disabled?: boolean;
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Alert
|
|
85
|
+
|
|
86
|
+
Themed alert/callout box with light background.
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
type AlertTheme = SemanticTheme;
|
|
90
|
+
|
|
91
|
+
interface AlertProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
92
|
+
theme?: AlertTheme; // default: "base"
|
|
93
|
+
}
|
|
94
|
+
```
|