@toyu-ui/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/README.md +79 -0
- package/button.d.ts +13 -0
- package/button.js +22 -0
- package/checkbox.d.ts +12 -0
- package/checkbox.js +19 -0
- package/custom-elements.json +715 -0
- package/define/button.d.ts +1 -0
- package/define/button.js +1 -0
- package/define/center.d.ts +1 -0
- package/define/center.js +1 -0
- package/define/checkbox.d.ts +1 -0
- package/define/checkbox.js +1 -0
- package/define/cluster.d.ts +1 -0
- package/define/cluster.js +1 -0
- package/define/container.d.ts +1 -0
- package/define/container.js +1 -0
- package/define/flex.d.ts +1 -0
- package/define/flex.js +1 -0
- package/define/frame.d.ts +1 -0
- package/define/frame.js +1 -0
- package/define/grid.d.ts +1 -0
- package/define/grid.js +1 -0
- package/define/input.d.ts +1 -0
- package/define/input.js +1 -0
- package/define/radio-group.d.ts +1 -0
- package/define/radio-group.js +1 -0
- package/define/radio.d.ts +1 -0
- package/define/radio.js +1 -0
- package/define/sidebar.d.ts +1 -0
- package/define/sidebar.js +1 -0
- package/define.d.ts +1 -0
- package/define.js +1 -0
- package/helpers/index.d.ts +2 -0
- package/index.d.ts +6 -0
- package/index.js +12 -0
- package/input.d.ts +19 -0
- package/input.js +25 -0
- package/jsx.d.ts +151 -0
- package/jsx.js +1 -0
- package/package.json +123 -0
- package/radio-group.d.ts +13 -0
- package/radio-group.js +20 -0
- package/radio.d.ts +12 -0
- package/radio.js +19 -0
- package/skills/button/SKILL.md +35 -0
- package/skills/center/SKILL.md +38 -0
- package/skills/checkbox/SKILL.md +37 -0
- package/skills/cluster/SKILL.md +38 -0
- package/skills/components/SKILL.md +38 -0
- package/skills/container/SKILL.md +38 -0
- package/skills/flex/SKILL.md +38 -0
- package/skills/frame/SKILL.md +38 -0
- package/skills/grid/SKILL.md +38 -0
- package/skills/input/SKILL.md +37 -0
- package/skills/radio/SKILL.md +37 -0
- package/skills/radio-group/SKILL.md +38 -0
- package/skills/setup/SKILL.md +49 -0
- package/skills/sidebar/SKILL.md +38 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: components
|
|
3
|
+
description: Load the Solid setup guidance and the complete TYUI component guidance set for Solid apps.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
requires:
|
|
6
|
+
- '@toyu-ui/solid#setup'
|
|
7
|
+
- '@toyu-ui/elements#components'
|
|
8
|
+
metadata:
|
|
9
|
+
type: framework
|
|
10
|
+
library: '@toyu-ui/solid'
|
|
11
|
+
library_version: '0.1.0'
|
|
12
|
+
framework: solid
|
|
13
|
+
source: skills/components/SKILL.md
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# TYUI Solid components
|
|
17
|
+
|
|
18
|
+
## Intent
|
|
19
|
+
|
|
20
|
+
Use `@toyu-ui/solid#components` when a Solid app needs the full TYUI component selection and usage guidance.
|
|
21
|
+
|
|
22
|
+
## Correct Usage
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
yarn dlx @tanstack/intent@latest load @toyu-ui/solid#components
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Selection Guidance
|
|
29
|
+
|
|
30
|
+
- Start Solid app guidance from this skill when component choice is not known.
|
|
31
|
+
- Use `@toyu-ui/solid#setup` for Solid registration and JSX rules.
|
|
32
|
+
- Use required `@toyu-ui/elements#*` skills for component-specific intent and anti-patterns.
|
|
33
|
+
- Use `@toyu-ui/solid` exports and `@toyu-ui/solid/define/*` paths in app code.
|
|
34
|
+
|
|
35
|
+
## Anti-Patterns
|
|
36
|
+
|
|
37
|
+
- Do not ask Solid apps to install `@toyu-ui/define` or `@toyu-ui/elements` directly for normal use.
|
|
38
|
+
- Do not duplicate component guidance in Solid skills.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: container
|
|
3
|
+
description: Solid-facing alias for tyui-container guidance.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
requires: ['@toyu-ui/solid#setup', '@toyu-ui/elements#container']
|
|
6
|
+
metadata:
|
|
7
|
+
type: framework
|
|
8
|
+
library: '@toyu-ui/solid'
|
|
9
|
+
library_version: '0.1.0'
|
|
10
|
+
framework: solid
|
|
11
|
+
source: skills/container/SKILL.md
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# TYUI Solid container
|
|
15
|
+
|
|
16
|
+
## Intent
|
|
17
|
+
|
|
18
|
+
Use `@toyu-ui/solid#container` to load Solid setup plus the authoritative `@toyu-ui/elements#container` guidance.
|
|
19
|
+
|
|
20
|
+
## Correct Usage
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import '@toyu-ui/solid/jsx';
|
|
24
|
+
import { defineTyuiContainer } from '@toyu-ui/solid/define/container';
|
|
25
|
+
|
|
26
|
+
defineTyuiContainer();
|
|
27
|
+
|
|
28
|
+
<tyui-container size="wide" gutter="page" />;
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Selection Guidance
|
|
32
|
+
|
|
33
|
+
- Use raw `tyui-container` in TSX for page or section rails.
|
|
34
|
+
- Register it through `@toyu-ui/solid/define/container`.
|
|
35
|
+
|
|
36
|
+
## Anti-Patterns
|
|
37
|
+
|
|
38
|
+
- Do not use Container to set individual control widths.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flex
|
|
3
|
+
description: Solid-facing alias for tyui-flex guidance.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
requires: ['@toyu-ui/solid#setup', '@toyu-ui/elements#flex']
|
|
6
|
+
metadata:
|
|
7
|
+
type: framework
|
|
8
|
+
library: '@toyu-ui/solid'
|
|
9
|
+
library_version: '0.1.0'
|
|
10
|
+
framework: solid
|
|
11
|
+
source: skills/flex/SKILL.md
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# TYUI Solid flex
|
|
15
|
+
|
|
16
|
+
## Intent
|
|
17
|
+
|
|
18
|
+
Use `@toyu-ui/solid#flex` to load Solid setup plus the authoritative `@toyu-ui/elements#flex` guidance.
|
|
19
|
+
|
|
20
|
+
## Correct Usage
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import '@toyu-ui/solid/jsx';
|
|
24
|
+
import { defineTyuiFlex } from '@toyu-ui/solid/define/flex';
|
|
25
|
+
|
|
26
|
+
defineTyuiFlex();
|
|
27
|
+
|
|
28
|
+
<tyui-flex direction="column" gap="3" />;
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Selection Guidance
|
|
32
|
+
|
|
33
|
+
- Use raw `tyui-flex` in TSX for one-axis composition.
|
|
34
|
+
- Register it through `@toyu-ui/solid/define/flex`.
|
|
35
|
+
|
|
36
|
+
## Anti-Patterns
|
|
37
|
+
|
|
38
|
+
- Do not import registration helpers from `@toyu-ui/define` in normal Solid app code.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frame
|
|
3
|
+
description: Solid-facing alias for tyui-frame guidance.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
requires: ['@toyu-ui/solid#setup', '@toyu-ui/elements#frame']
|
|
6
|
+
metadata:
|
|
7
|
+
type: framework
|
|
8
|
+
library: '@toyu-ui/solid'
|
|
9
|
+
library_version: '0.1.0'
|
|
10
|
+
framework: solid
|
|
11
|
+
source: skills/frame/SKILL.md
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# TYUI Solid frame
|
|
15
|
+
|
|
16
|
+
## Intent
|
|
17
|
+
|
|
18
|
+
Use `@toyu-ui/solid#frame` to load Solid setup plus the authoritative `@toyu-ui/elements#frame` guidance.
|
|
19
|
+
|
|
20
|
+
## Correct Usage
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import '@toyu-ui/solid/jsx';
|
|
24
|
+
import { defineTyuiFrame } from '@toyu-ui/solid/define/frame';
|
|
25
|
+
|
|
26
|
+
defineTyuiFrame();
|
|
27
|
+
|
|
28
|
+
<tyui-frame ratio="16/9" fit="cover" />;
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Selection Guidance
|
|
32
|
+
|
|
33
|
+
- Use raw `tyui-frame` in TSX for aspect-ratio media and previews.
|
|
34
|
+
- Register it through `@toyu-ui/solid/define/frame`.
|
|
35
|
+
|
|
36
|
+
## Anti-Patterns
|
|
37
|
+
|
|
38
|
+
- Do not put complex forms inside Frame.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grid
|
|
3
|
+
description: Solid-facing alias for tyui-grid guidance.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
requires: ['@toyu-ui/solid#setup', '@toyu-ui/elements#grid']
|
|
6
|
+
metadata:
|
|
7
|
+
type: framework
|
|
8
|
+
library: '@toyu-ui/solid'
|
|
9
|
+
library_version: '0.1.0'
|
|
10
|
+
framework: solid
|
|
11
|
+
source: skills/grid/SKILL.md
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# TYUI Solid grid
|
|
15
|
+
|
|
16
|
+
## Intent
|
|
17
|
+
|
|
18
|
+
Use `@toyu-ui/solid#grid` to load Solid setup plus the authoritative `@toyu-ui/elements#grid` guidance.
|
|
19
|
+
|
|
20
|
+
## Correct Usage
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import '@toyu-ui/solid/jsx';
|
|
24
|
+
import { defineTyuiGrid } from '@toyu-ui/solid/define/grid';
|
|
25
|
+
|
|
26
|
+
defineTyuiGrid();
|
|
27
|
+
|
|
28
|
+
<tyui-grid min-item-size="16rem" gap="4" />;
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Selection Guidance
|
|
32
|
+
|
|
33
|
+
- Use raw `tyui-grid` in TSX for responsive peer cards and panels.
|
|
34
|
+
- Register it through `@toyu-ui/solid/define/grid`.
|
|
35
|
+
|
|
36
|
+
## Anti-Patterns
|
|
37
|
+
|
|
38
|
+
- Do not use Grid for tabular data.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: input
|
|
3
|
+
description: Solid-facing alias for tyui-input guidance.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
requires: ['@toyu-ui/solid#setup', '@toyu-ui/elements#input']
|
|
6
|
+
metadata:
|
|
7
|
+
type: framework
|
|
8
|
+
library: '@toyu-ui/solid'
|
|
9
|
+
library_version: '0.1.0'
|
|
10
|
+
framework: solid
|
|
11
|
+
source: skills/input/SKILL.md
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# TYUI Solid input
|
|
15
|
+
|
|
16
|
+
## Intent
|
|
17
|
+
|
|
18
|
+
Use `@toyu-ui/solid#input` to load Solid setup plus the authoritative `@toyu-ui/elements#input` guidance.
|
|
19
|
+
|
|
20
|
+
## Correct Usage
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import { Input } from '@toyu-ui/solid';
|
|
24
|
+
|
|
25
|
+
<Input name="email" type="email" required>
|
|
26
|
+
Email
|
|
27
|
+
</Input>;
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Selection Guidance
|
|
31
|
+
|
|
32
|
+
- Use the `Input` wrapper for single-line text entry in Solid.
|
|
33
|
+
- Use `event.detail.value` from typed `onInput` handlers.
|
|
34
|
+
|
|
35
|
+
## Anti-Patterns
|
|
36
|
+
|
|
37
|
+
- Do not rely on placeholder text as the only label.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: radio
|
|
3
|
+
description: Solid-facing alias for tyui-radio guidance.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
requires: ['@toyu-ui/solid#setup', '@toyu-ui/elements#radio']
|
|
6
|
+
metadata:
|
|
7
|
+
type: framework
|
|
8
|
+
library: '@toyu-ui/solid'
|
|
9
|
+
library_version: '0.1.0'
|
|
10
|
+
framework: solid
|
|
11
|
+
source: skills/radio/SKILL.md
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# TYUI Solid radio
|
|
15
|
+
|
|
16
|
+
## Intent
|
|
17
|
+
|
|
18
|
+
Use `@toyu-ui/solid#radio` to load Solid setup plus the authoritative `@toyu-ui/elements#radio` guidance.
|
|
19
|
+
|
|
20
|
+
## Correct Usage
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import { Radio, RadioGroup } from '@toyu-ui/solid';
|
|
24
|
+
|
|
25
|
+
<RadioGroup label="Plan" name="plan">
|
|
26
|
+
<Radio value="team">Team</Radio>
|
|
27
|
+
</RadioGroup>;
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Selection Guidance
|
|
31
|
+
|
|
32
|
+
- Use Radio only inside RadioGroup.
|
|
33
|
+
- Use Checkbox for independent boolean choices.
|
|
34
|
+
|
|
35
|
+
## Anti-Patterns
|
|
36
|
+
|
|
37
|
+
- Do not manage Radio checked state outside the group.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: radio-group
|
|
3
|
+
description: Solid-facing alias for tyui-radio-group guidance.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
requires: ['@toyu-ui/solid#setup', '@toyu-ui/elements#radio-group']
|
|
6
|
+
metadata:
|
|
7
|
+
type: framework
|
|
8
|
+
library: '@toyu-ui/solid'
|
|
9
|
+
library_version: '0.1.0'
|
|
10
|
+
framework: solid
|
|
11
|
+
source: skills/radio-group/SKILL.md
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# TYUI Solid radio group
|
|
15
|
+
|
|
16
|
+
## Intent
|
|
17
|
+
|
|
18
|
+
Use `@toyu-ui/solid#radio-group` to load Solid setup plus the authoritative `@toyu-ui/elements#radio-group` guidance.
|
|
19
|
+
|
|
20
|
+
## Correct Usage
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import { Radio, RadioGroup } from '@toyu-ui/solid';
|
|
24
|
+
|
|
25
|
+
<RadioGroup label="Frequency" name="frequency">
|
|
26
|
+
<Radio value="daily">Daily</Radio>
|
|
27
|
+
<Radio value="weekly">Weekly</Radio>
|
|
28
|
+
</RadioGroup>;
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Selection Guidance
|
|
32
|
+
|
|
33
|
+
- Use RadioGroup when the user chooses one option from a small set.
|
|
34
|
+
- Use `event.detail.value` from typed change handlers.
|
|
35
|
+
|
|
36
|
+
## Anti-Patterns
|
|
37
|
+
|
|
38
|
+
- Do not put non-radio controls in the default slot.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup
|
|
3
|
+
description: Set up TYUI custom elements for Solid, including registration, JSX typing, wrappers, and typed custom events.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
requires: ['@toyu-ui/elements#components']
|
|
6
|
+
metadata:
|
|
7
|
+
type: framework
|
|
8
|
+
library: '@toyu-ui/solid'
|
|
9
|
+
library_version: '0.1.0'
|
|
10
|
+
framework: solid
|
|
11
|
+
source: src/index.ts
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# TYUI Solid setup
|
|
15
|
+
|
|
16
|
+
## Intent
|
|
17
|
+
|
|
18
|
+
Use `@toyu-ui/solid` when a Solid app wants typed JSX ergonomics for TYUI custom
|
|
19
|
+
elements. The implementation remains in `@toyu-ui/elements`.
|
|
20
|
+
|
|
21
|
+
## Registration
|
|
22
|
+
|
|
23
|
+
Register only the elements you use:
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import { defineTyuiButton } from '@toyu-ui/solid/define/button';
|
|
27
|
+
|
|
28
|
+
defineTyuiButton();
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Use `defineTyuiElements()` only for demos or apps where eager registration of
|
|
32
|
+
all elements is acceptable.
|
|
33
|
+
|
|
34
|
+
## JSX Usage
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
<tyui-button appearance="primary" on:click={save}>
|
|
38
|
+
Save
|
|
39
|
+
</tyui-button>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Thin wrappers may improve prop names or event typing, but they must not fork
|
|
43
|
+
behavior from the underlying custom element.
|
|
44
|
+
|
|
45
|
+
## Anti-Patterns
|
|
46
|
+
|
|
47
|
+
- Do not reimplement TYUI behavior in Solid wrappers.
|
|
48
|
+
- Do not use Solid signals inside `@toyu-ui/elements`.
|
|
49
|
+
- Do not register all elements in a library module that should tree-shake.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sidebar
|
|
3
|
+
description: Solid-facing alias for tyui-sidebar guidance.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
requires: ['@toyu-ui/solid#setup', '@toyu-ui/elements#sidebar']
|
|
6
|
+
metadata:
|
|
7
|
+
type: framework
|
|
8
|
+
library: '@toyu-ui/solid'
|
|
9
|
+
library_version: '0.1.0'
|
|
10
|
+
framework: solid
|
|
11
|
+
source: skills/sidebar/SKILL.md
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# TYUI Solid sidebar
|
|
15
|
+
|
|
16
|
+
## Intent
|
|
17
|
+
|
|
18
|
+
Use `@toyu-ui/solid#sidebar` to load Solid setup plus the authoritative `@toyu-ui/elements#sidebar` guidance.
|
|
19
|
+
|
|
20
|
+
## Correct Usage
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import '@toyu-ui/solid/jsx';
|
|
24
|
+
import { defineTyuiSidebar } from '@toyu-ui/solid/define/sidebar';
|
|
25
|
+
|
|
26
|
+
defineTyuiSidebar();
|
|
27
|
+
|
|
28
|
+
<tyui-sidebar side-size="16rem" content-min="55%" />;
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Selection Guidance
|
|
32
|
+
|
|
33
|
+
- Use raw `tyui-sidebar` in TSX for two-region fixed-plus-fluid layout.
|
|
34
|
+
- Register it through `@toyu-ui/solid/define/sidebar`.
|
|
35
|
+
|
|
36
|
+
## Anti-Patterns
|
|
37
|
+
|
|
38
|
+
- Do not use Sidebar for overlay drawer behavior.
|