@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/styles.md
CHANGED
|
@@ -1,127 +1,133 @@
|
|
|
1
|
-
# Styles
|
|
1
|
+
# Styles & Directives
|
|
2
2
|
|
|
3
|
-
Source: `src/styles
|
|
3
|
+
Source: `src/styles/**`, `src/directives/**`
|
|
4
4
|
|
|
5
|
-
## Base Styles
|
|
5
|
+
## Base Styles (`base.styles`)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Foundational design tokens for borders, backgrounds, and text.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
default: "border-base-200 dark:border-base-700",
|
|
14
|
-
subtle: "border-base-200 dark:border-base-700",
|
|
9
|
+
```typescript
|
|
10
|
+
export const border: {
|
|
11
|
+
default: string; // border-base-200 dark:border-base-700
|
|
12
|
+
subtle: string; // border-base-200 dark:border-base-700
|
|
15
13
|
};
|
|
16
14
|
|
|
17
|
-
const bg
|
|
18
|
-
surface:
|
|
19
|
-
muted:
|
|
20
|
-
subtle:
|
|
15
|
+
export const bg: {
|
|
16
|
+
surface: string; // bg-white dark:bg-base-900
|
|
17
|
+
muted: string; // bg-base-100 dark:bg-base-800
|
|
18
|
+
subtle: string; // bg-base-200 dark:bg-base-700
|
|
21
19
|
};
|
|
22
20
|
|
|
23
|
-
const text
|
|
24
|
-
default:
|
|
25
|
-
muted:
|
|
26
|
-
placeholder:
|
|
21
|
+
export const text: {
|
|
22
|
+
default: string; // text-base-900 dark:text-base-100
|
|
23
|
+
muted: string; // text-base-400 dark:text-base-500
|
|
24
|
+
placeholder: string; // placeholder:text-base-400 dark:placeholder:text-base-500
|
|
27
25
|
};
|
|
28
26
|
```
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
---
|
|
31
29
|
|
|
32
|
-
|
|
30
|
+
## Control Styles (`control.styles`)
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
Size and state tokens for interactive components.
|
|
35
33
|
|
|
36
|
-
|
|
37
|
-
const state = {
|
|
38
|
-
disabled: "pointer-events-none cursor-default opacity-30",
|
|
39
|
-
};
|
|
34
|
+
### `ComponentSize`
|
|
40
35
|
|
|
41
|
-
|
|
36
|
+
```typescript
|
|
37
|
+
export type ComponentSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
38
|
+
```
|
|
42
39
|
|
|
43
|
-
|
|
44
|
-
md: "px-2 py-1",
|
|
45
|
-
xs: "px-1 py-0",
|
|
46
|
-
sm: "px-1.5 py-0.5",
|
|
47
|
-
lg: "px-3 py-2",
|
|
48
|
-
xl: "px-4 py-3",
|
|
49
|
-
};
|
|
40
|
+
### `state`
|
|
50
41
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
sm: "gap-0.5",
|
|
55
|
-
lg: "gap-1.5",
|
|
56
|
-
xl: "gap-2",
|
|
42
|
+
```typescript
|
|
43
|
+
export const state: {
|
|
44
|
+
disabled: string; // pointer-events-none cursor-default opacity-30
|
|
57
45
|
};
|
|
58
46
|
```
|
|
59
47
|
|
|
60
|
-
|
|
48
|
+
### `pad`
|
|
61
49
|
|
|
62
|
-
|
|
50
|
+
Size-specific padding classes:
|
|
63
51
|
|
|
64
|
-
|
|
52
|
+
| Size | Value |
|
|
53
|
+
|------|-------|
|
|
54
|
+
| `xs` | `px-1 py-0` |
|
|
55
|
+
| `sm` | `px-1.5 py-0.5` |
|
|
56
|
+
| `md` | `px-2 py-1` |
|
|
57
|
+
| `lg` | `px-3 py-2` |
|
|
58
|
+
| `xl` | `px-4 py-3` |
|
|
65
59
|
|
|
66
|
-
|
|
67
|
-
type SemanticTheme = "primary" | "info" | "success" | "warning" | "danger" | "base";
|
|
60
|
+
### `gap`
|
|
68
61
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
62
|
+
Size-specific gap classes:
|
|
63
|
+
|
|
64
|
+
| Size | Value |
|
|
65
|
+
|------|-------|
|
|
66
|
+
| `xs` | `gap-0` |
|
|
67
|
+
| `sm` | `gap-0.5` |
|
|
68
|
+
| `md` | `gap-1` |
|
|
69
|
+
| `lg` | `gap-1.5` |
|
|
70
|
+
| `xl` | `gap-2` |
|
|
71
|
+
|
|
72
|
+
---
|
|
78
73
|
|
|
79
|
-
|
|
74
|
+
## Theme Styles (`theme.styles`)
|
|
80
75
|
|
|
81
|
-
|
|
82
|
-
|---------|-------|
|
|
83
|
-
| `solid` | Tag, Button(solid), Progress bar fill |
|
|
84
|
-
| `solidHover` | Button(solid) hover state |
|
|
85
|
-
| `light` | Alert background |
|
|
86
|
-
| `text` | Link color, Tab selected |
|
|
87
|
-
| `hoverBg` | Button(ghost) hover, List item hover |
|
|
88
|
-
| `border` | Button(outline) border |
|
|
76
|
+
Semantic color theme tokens for components.
|
|
89
77
|
|
|
90
|
-
|
|
78
|
+
### `SemanticTheme`
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
export type SemanticTheme = "primary" | "info" | "success" | "warning" | "danger" | "base";
|
|
91
82
|
```
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
83
|
+
|
|
84
|
+
### `themeTokens`
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
export const themeTokens: Record<SemanticTheme, {
|
|
88
|
+
solid: string; // Solid background + white text
|
|
89
|
+
solidHover: string; // Hover effect for solid
|
|
90
|
+
light: string; // Light background + dark text
|
|
91
|
+
text: string; // Text color only
|
|
92
|
+
hoverBg: string; // Hover background
|
|
93
|
+
border: string; // Border color
|
|
94
|
+
}>;
|
|
98
95
|
```
|
|
99
96
|
|
|
100
|
-
|
|
97
|
+
Each theme (`primary`, `info`, `success`, `warning`, `danger`, `base`) provides all six token fields.
|
|
101
98
|
|
|
102
|
-
|
|
99
|
+
---
|
|
103
100
|
|
|
104
|
-
|
|
101
|
+
## Ripple Directive (`ripple`)
|
|
105
102
|
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
Directive that adds a material-design ripple effect to interactive elements.
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
export function ripple(el: HTMLElement, accessor: Accessor<boolean>): void;
|
|
108
107
|
```
|
|
109
108
|
|
|
110
|
-
Usage
|
|
109
|
+
### Usage
|
|
111
110
|
|
|
112
111
|
```tsx
|
|
113
112
|
<button use:ripple={!props.disabled}>Click me</button>
|
|
114
113
|
```
|
|
115
114
|
|
|
116
|
-
Behavior
|
|
117
|
-
- Creates an internal ripple container with `overflow: hidden`.
|
|
118
|
-
- Changes element position to `relative` if it is `static` (restored on cleanup).
|
|
119
|
-
- Single ripple mode: removes previous ripple on new click.
|
|
120
|
-
- Respects `prefers-reduced-motion: reduce`.
|
|
121
|
-
- Ripple radius based on distance from click point to farthest corner.
|
|
115
|
+
### Behavior
|
|
122
116
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
117
|
+
- Creates an internal ripple container with `overflow: hidden`
|
|
118
|
+
- Sets `position: relative` on static-positioned elements (restores on cleanup)
|
|
119
|
+
- Single ripple mode: removes previous ripple on new click
|
|
120
|
+
- Respects `prefers-reduced-motion: reduce`
|
|
121
|
+
- Full cleanup on unmount
|
|
122
|
+
|
|
123
|
+
### TypeScript Declaration
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
declare module "solid-js" {
|
|
127
|
+
namespace JSX {
|
|
128
|
+
interface Directives {
|
|
129
|
+
ripple: boolean;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
127
133
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplysm/solid",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.99",
|
|
4
4
|
"description": "Simplysm package - SolidJS library",
|
|
5
5
|
"author": "simplysm",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"tabbable": "^6.4.0",
|
|
54
54
|
"tailwind-merge": "^3.5.0",
|
|
55
55
|
"tailwindcss": "^3.4.19",
|
|
56
|
-
"@simplysm/core-browser": "13.0.
|
|
57
|
-
"@simplysm/core-common": "13.0.
|
|
58
|
-
"@simplysm/service-common": "13.0.
|
|
59
|
-
"@simplysm/service-client": "13.0.
|
|
56
|
+
"@simplysm/core-browser": "13.0.99",
|
|
57
|
+
"@simplysm/core-common": "13.0.99",
|
|
58
|
+
"@simplysm/service-common": "13.0.99",
|
|
59
|
+
"@simplysm/service-client": "13.0.99"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@solidjs/testing-library": "^0.8.10"
|