@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.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +79 -0
  3. package/button.d.ts +13 -0
  4. package/button.js +22 -0
  5. package/checkbox.d.ts +12 -0
  6. package/checkbox.js +19 -0
  7. package/custom-elements.json +715 -0
  8. package/define/button.d.ts +1 -0
  9. package/define/button.js +1 -0
  10. package/define/center.d.ts +1 -0
  11. package/define/center.js +1 -0
  12. package/define/checkbox.d.ts +1 -0
  13. package/define/checkbox.js +1 -0
  14. package/define/cluster.d.ts +1 -0
  15. package/define/cluster.js +1 -0
  16. package/define/container.d.ts +1 -0
  17. package/define/container.js +1 -0
  18. package/define/flex.d.ts +1 -0
  19. package/define/flex.js +1 -0
  20. package/define/frame.d.ts +1 -0
  21. package/define/frame.js +1 -0
  22. package/define/grid.d.ts +1 -0
  23. package/define/grid.js +1 -0
  24. package/define/input.d.ts +1 -0
  25. package/define/input.js +1 -0
  26. package/define/radio-group.d.ts +1 -0
  27. package/define/radio-group.js +1 -0
  28. package/define/radio.d.ts +1 -0
  29. package/define/radio.js +1 -0
  30. package/define/sidebar.d.ts +1 -0
  31. package/define/sidebar.js +1 -0
  32. package/define.d.ts +1 -0
  33. package/define.js +1 -0
  34. package/helpers/index.d.ts +2 -0
  35. package/index.d.ts +6 -0
  36. package/index.js +12 -0
  37. package/input.d.ts +19 -0
  38. package/input.js +25 -0
  39. package/jsx.d.ts +151 -0
  40. package/jsx.js +1 -0
  41. package/package.json +123 -0
  42. package/radio-group.d.ts +13 -0
  43. package/radio-group.js +20 -0
  44. package/radio.d.ts +12 -0
  45. package/radio.js +19 -0
  46. package/skills/button/SKILL.md +35 -0
  47. package/skills/center/SKILL.md +38 -0
  48. package/skills/checkbox/SKILL.md +37 -0
  49. package/skills/cluster/SKILL.md +38 -0
  50. package/skills/components/SKILL.md +38 -0
  51. package/skills/container/SKILL.md +38 -0
  52. package/skills/flex/SKILL.md +38 -0
  53. package/skills/frame/SKILL.md +38 -0
  54. package/skills/grid/SKILL.md +38 -0
  55. package/skills/input/SKILL.md +37 -0
  56. package/skills/radio/SKILL.md +37 -0
  57. package/skills/radio-group/SKILL.md +38 -0
  58. package/skills/setup/SKILL.md +49 -0
  59. package/skills/sidebar/SKILL.md +38 -0
@@ -0,0 +1 @@
1
+ export * from '@toyu-ui/define/button';
@@ -0,0 +1 @@
1
+ export * from "@toyu-ui/define/button";
@@ -0,0 +1 @@
1
+ export * from '@toyu-ui/define/center';
@@ -0,0 +1 @@
1
+ export * from "@toyu-ui/define/center";
@@ -0,0 +1 @@
1
+ export * from '@toyu-ui/define/checkbox';
@@ -0,0 +1 @@
1
+ export * from "@toyu-ui/define/checkbox";
@@ -0,0 +1 @@
1
+ export * from '@toyu-ui/define/cluster';
@@ -0,0 +1 @@
1
+ export * from "@toyu-ui/define/cluster";
@@ -0,0 +1 @@
1
+ export * from '@toyu-ui/define/container';
@@ -0,0 +1 @@
1
+ export * from "@toyu-ui/define/container";
@@ -0,0 +1 @@
1
+ export * from '@toyu-ui/define/flex';
package/define/flex.js ADDED
@@ -0,0 +1 @@
1
+ export * from "@toyu-ui/define/flex";
@@ -0,0 +1 @@
1
+ export * from '@toyu-ui/define/frame';
@@ -0,0 +1 @@
1
+ export * from "@toyu-ui/define/frame";
@@ -0,0 +1 @@
1
+ export * from '@toyu-ui/define/grid';
package/define/grid.js ADDED
@@ -0,0 +1 @@
1
+ export * from "@toyu-ui/define/grid";
@@ -0,0 +1 @@
1
+ export * from '@toyu-ui/define/input';
@@ -0,0 +1 @@
1
+ export * from "@toyu-ui/define/input";
@@ -0,0 +1 @@
1
+ export * from '@toyu-ui/define/radio-group';
@@ -0,0 +1 @@
1
+ export * from "@toyu-ui/define/radio-group";
@@ -0,0 +1 @@
1
+ export * from '@toyu-ui/define/radio';
@@ -0,0 +1 @@
1
+ export * from "@toyu-ui/define/radio";
@@ -0,0 +1 @@
1
+ export * from '@toyu-ui/define/sidebar';
@@ -0,0 +1 @@
1
+ export * from "@toyu-ui/define/sidebar";
package/define.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from '@toyu-ui/define';
package/define.js ADDED
@@ -0,0 +1 @@
1
+ export * from "@toyu-ui/define";
@@ -0,0 +1,2 @@
1
+ export type PropertyBinder<TElement, TValue> = (element: TElement, value: TValue) => void;
2
+ export declare function assignElementProperty<TElement, TKey extends keyof TElement>(element: TElement, key: TKey, value: TElement[TKey]): void;
package/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export * from './button';
2
+ export * from './checkbox';
3
+ export * from './input';
4
+ export * from './radio';
5
+ export * from './radio-group';
6
+ export * from './jsx';
package/index.js ADDED
@@ -0,0 +1,12 @@
1
+ import { Button as t } from "./button.js";
2
+ import { Checkbox as e } from "./checkbox.js";
3
+ import { Input as f } from "./input.js";
4
+ import { Radio as u } from "./radio.js";
5
+ import { RadioGroup as d } from "./radio-group.js";
6
+ export {
7
+ t as Button,
8
+ e as Checkbox,
9
+ f as Input,
10
+ u as Radio,
11
+ d as RadioGroup
12
+ };
package/input.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ import { JSX } from 'solid-js';
2
+ import { TyuiInputAppearance, TyuiInputEvent, TyuiInputSize, TyuiInputType } from '@toyu-ui/elements/input';
3
+ export type InputProps = {
4
+ appearance?: TyuiInputAppearance | undefined;
5
+ defaultValue?: string | undefined;
6
+ disabled?: boolean | undefined;
7
+ invalid?: boolean | undefined;
8
+ name?: string | undefined;
9
+ onChange?: ((event: Event) => void) | undefined;
10
+ onInput?: ((event: TyuiInputEvent) => void) | undefined;
11
+ placeholder?: string | undefined;
12
+ readonly?: boolean | undefined;
13
+ required?: boolean | undefined;
14
+ size?: TyuiInputSize | undefined;
15
+ type?: TyuiInputType | undefined;
16
+ value?: string | undefined;
17
+ children?: JSX.Element | undefined;
18
+ };
19
+ export declare function Input(props: InputProps): JSX.Element;
package/input.js ADDED
@@ -0,0 +1,25 @@
1
+ import { addEventListener as h, getOwner as y, insert as g, effect as m, template as b } from "solid-js/web";
2
+ var q = /* @__PURE__ */ b("<tyui-input>", !0, !1, !1);
3
+ function z(i) {
4
+ return (() => {
5
+ var a = q();
6
+ return h(a, "input", i.onInput), h(a, "change", i.onChange), a._$owner = y(), g(a, () => i.children), m((e) => {
7
+ var d = i.appearance, n = i.defaultValue, v = i.disabled, t = i.invalid, l = i.name, r = i.placeholder, u = i.readonly, o = i.required, c = i.size, f = i.type;
8
+ return d !== e.e && (a.appearance = e.e = d), n !== e.t && (a.defaultvalue = e.t = n), v !== e.a && (a.disabled = e.a = v), t !== e.o && (a.invalid = e.o = t), l !== e.i && (a.name = e.i = l), r !== e.n && (a.placeholder = e.n = r), u !== e.s && (a.readonly = e.s = u), o !== e.h && (a.required = e.h = o), c !== e.r && (a.size = e.r = c), f !== e.d && (a.type = e.d = f), e;
9
+ }, {
10
+ e: void 0,
11
+ t: void 0,
12
+ a: void 0,
13
+ o: void 0,
14
+ i: void 0,
15
+ n: void 0,
16
+ s: void 0,
17
+ h: void 0,
18
+ r: void 0,
19
+ d: void 0
20
+ }), m(() => a.value = i.value), a;
21
+ })();
22
+ }
23
+ export {
24
+ z as Input
25
+ };
package/jsx.d.ts ADDED
@@ -0,0 +1,151 @@
1
+ import { JSX } from 'solid-js';
2
+ import { TyuiButtonAppearance, TyuiButtonElement, TyuiButtonIconPosition, TyuiButtonShape, TyuiButtonSize, TyuiButtonType } from '@toyu-ui/elements/button';
3
+ import { TyuiCenterElement, TyuiCenterGutter } from '@toyu-ui/elements/center';
4
+ import { TyuiCheckboxElement } from '@toyu-ui/elements/checkbox';
5
+ import { TyuiClusterAlign, TyuiClusterElement, TyuiClusterJustify } from '@toyu-ui/elements/cluster';
6
+ import { TyuiContainerElement, TyuiContainerGutter, TyuiContainerSize } from '@toyu-ui/elements/container';
7
+ import { TyuiFlexAlign, TyuiFlexDirection, TyuiFlexElement, TyuiFlexJustify, TyuiFlexWrap } from '@toyu-ui/elements/flex';
8
+ import { TyuiFrameElement, TyuiFrameFit } from '@toyu-ui/elements/frame';
9
+ import { TyuiGridAlign, TyuiGridElement, TyuiGridJustify } from '@toyu-ui/elements/grid';
10
+ import { TyuiInputAppearance, TyuiInputElement, TyuiInputEvent, TyuiInputSize, TyuiInputType } from '@toyu-ui/elements/input';
11
+ import { TyuiRadioElement, TyuiRadioLabelPosition } from '@toyu-ui/elements/radio';
12
+ import { TyuiRadioGroupElement, TyuiRadioGroupEvent, TyuiRadioGroupLayout } from '@toyu-ui/elements/radio-group';
13
+ import { TyuiSidebarElement, TyuiSidebarSide } from '@toyu-ui/elements/sidebar';
14
+ export type TyuiButtonSolidAttributes = JSX.HTMLAttributes<TyuiButtonElement> & {
15
+ appearance?: TyuiButtonAppearance | undefined;
16
+ disabled?: boolean | undefined;
17
+ disabledFocusable?: boolean | undefined;
18
+ 'disabled-focusable'?: boolean | undefined;
19
+ iconPosition?: TyuiButtonIconPosition | undefined;
20
+ 'icon-position'?: TyuiButtonIconPosition | undefined;
21
+ shape?: TyuiButtonShape | undefined;
22
+ size?: TyuiButtonSize | undefined;
23
+ type?: TyuiButtonType | undefined;
24
+ children?: JSX.Element | undefined;
25
+ };
26
+ type TyuiInputBaseAttributes = Omit<JSX.HTMLAttributes<TyuiInputElement>, 'onInput' | 'on:input' | 'onChange' | 'on:change'>;
27
+ export type TyuiInputSolidAttributes = TyuiInputBaseAttributes & {
28
+ appearance?: TyuiInputAppearance | undefined;
29
+ defaultValue?: string | undefined;
30
+ 'default-value'?: string | undefined;
31
+ disabled?: boolean | undefined;
32
+ invalid?: boolean | undefined;
33
+ name?: string | undefined;
34
+ placeholder?: string | undefined;
35
+ readonly?: boolean | undefined;
36
+ required?: boolean | undefined;
37
+ size?: TyuiInputSize | undefined;
38
+ type?: TyuiInputType | undefined;
39
+ value?: string | undefined;
40
+ children?: JSX.Element | undefined;
41
+ 'on:input'?: ((event: TyuiInputEvent) => void) | undefined;
42
+ 'on:change'?: ((event: Event) => void) | undefined;
43
+ };
44
+ type TyuiCheckboxBaseAttributes = Omit<JSX.HTMLAttributes<TyuiCheckboxElement>, 'onChange' | 'on:change'>;
45
+ export type TyuiCheckboxSolidAttributes = TyuiCheckboxBaseAttributes & {
46
+ checked?: boolean | undefined;
47
+ disabled?: boolean | undefined;
48
+ indeterminate?: boolean | undefined;
49
+ name?: string | undefined;
50
+ required?: boolean | undefined;
51
+ value?: string | undefined;
52
+ children?: JSX.Element | undefined;
53
+ 'on:change'?: ((event: Event) => void) | undefined;
54
+ };
55
+ export type TyuiRadioSolidAttributes = JSX.HTMLAttributes<TyuiRadioElement> & {
56
+ checked?: boolean | undefined;
57
+ disabled?: boolean | undefined;
58
+ labelPosition?: TyuiRadioLabelPosition | undefined;
59
+ 'label-position'?: TyuiRadioLabelPosition | undefined;
60
+ name?: string | undefined;
61
+ required?: boolean | undefined;
62
+ value?: string | undefined;
63
+ children?: JSX.Element | undefined;
64
+ };
65
+ type TyuiRadioGroupBaseAttributes = Omit<JSX.HTMLAttributes<TyuiRadioGroupElement>, 'onChange' | 'on:change'>;
66
+ export type TyuiRadioGroupSolidAttributes = TyuiRadioGroupBaseAttributes & {
67
+ disabled?: boolean | undefined;
68
+ label?: string | undefined;
69
+ layout?: TyuiRadioGroupLayout | undefined;
70
+ name?: string | undefined;
71
+ required?: boolean | undefined;
72
+ value?: string | undefined;
73
+ children?: JSX.Element | undefined;
74
+ 'on:change'?: ((event: TyuiRadioGroupEvent) => void) | undefined;
75
+ };
76
+ export type TyuiFlexSolidAttributes = JSX.HTMLAttributes<TyuiFlexElement> & {
77
+ direction?: TyuiFlexDirection | undefined;
78
+ wrap?: TyuiFlexWrap | undefined;
79
+ align?: TyuiFlexAlign | undefined;
80
+ justify?: TyuiFlexJustify | undefined;
81
+ gap?: '0' | '1' | '2' | '3' | '4' | undefined;
82
+ inline?: boolean | undefined;
83
+ children?: JSX.Element | undefined;
84
+ };
85
+ export type TyuiClusterSolidAttributes = JSX.HTMLAttributes<TyuiClusterElement> & {
86
+ align?: TyuiClusterAlign | undefined;
87
+ justify?: TyuiClusterJustify | undefined;
88
+ gap?: '0' | '1' | '2' | '3' | '4' | undefined;
89
+ rowGap?: '0' | '1' | '2' | '3' | '4' | undefined;
90
+ 'row-gap'?: '0' | '1' | '2' | '3' | '4' | undefined;
91
+ children?: JSX.Element | undefined;
92
+ };
93
+ export type TyuiGridSolidAttributes = JSX.HTMLAttributes<TyuiGridElement> & {
94
+ minItemSize?: string | undefined;
95
+ 'min-item-size'?: string | undefined;
96
+ gap?: '0' | '1' | '2' | '3' | '4' | undefined;
97
+ rowGap?: '0' | '1' | '2' | '3' | '4' | undefined;
98
+ 'row-gap'?: '0' | '1' | '2' | '3' | '4' | undefined;
99
+ align?: TyuiGridAlign | undefined;
100
+ justify?: TyuiGridJustify | undefined;
101
+ dense?: boolean | undefined;
102
+ children?: JSX.Element | undefined;
103
+ };
104
+ export type TyuiCenterSolidAttributes = JSX.HTMLAttributes<TyuiCenterElement> & {
105
+ measure?: string | undefined;
106
+ gutter?: TyuiCenterGutter | undefined;
107
+ intrinsic?: boolean | undefined;
108
+ children?: JSX.Element | undefined;
109
+ };
110
+ export type TyuiContainerSolidAttributes = JSX.HTMLAttributes<TyuiContainerElement> & {
111
+ size?: TyuiContainerSize | undefined;
112
+ gutter?: TyuiContainerGutter | undefined;
113
+ bleed?: boolean | undefined;
114
+ children?: JSX.Element | undefined;
115
+ };
116
+ export type TyuiFrameSolidAttributes = JSX.HTMLAttributes<TyuiFrameElement> & {
117
+ ratio?: string | undefined;
118
+ fit?: TyuiFrameFit | undefined;
119
+ position?: string | undefined;
120
+ children?: JSX.Element | undefined;
121
+ };
122
+ export type TyuiSidebarSolidAttributes = JSX.HTMLAttributes<TyuiSidebarElement> & {
123
+ side?: TyuiSidebarSide | undefined;
124
+ sideSize?: string | undefined;
125
+ 'side-size'?: string | undefined;
126
+ contentMin?: string | undefined;
127
+ 'content-min'?: string | undefined;
128
+ gap?: '0' | '1' | '2' | '3' | '4' | undefined;
129
+ noStretch?: boolean | undefined;
130
+ 'no-stretch'?: boolean | undefined;
131
+ children?: JSX.Element | undefined;
132
+ };
133
+ declare module 'solid-js' {
134
+ namespace JSX {
135
+ interface IntrinsicElements {
136
+ 'tyui-button': TyuiButtonSolidAttributes;
137
+ 'tyui-center': TyuiCenterSolidAttributes;
138
+ 'tyui-checkbox': TyuiCheckboxSolidAttributes;
139
+ 'tyui-cluster': TyuiClusterSolidAttributes;
140
+ 'tyui-container': TyuiContainerSolidAttributes;
141
+ 'tyui-flex': TyuiFlexSolidAttributes;
142
+ 'tyui-frame': TyuiFrameSolidAttributes;
143
+ 'tyui-grid': TyuiGridSolidAttributes;
144
+ 'tyui-input': TyuiInputSolidAttributes;
145
+ 'tyui-radio': TyuiRadioSolidAttributes;
146
+ 'tyui-radio-group': TyuiRadioGroupSolidAttributes;
147
+ 'tyui-sidebar': TyuiSidebarSolidAttributes;
148
+ }
149
+ }
150
+ }
151
+ export {};
package/jsx.js ADDED
@@ -0,0 +1 @@
1
+
package/package.json ADDED
@@ -0,0 +1,123 @@
1
+ {
2
+ "name": "@toyu-ui/solid",
3
+ "version": "0.1.0",
4
+ "keywords": [
5
+ "tanstack-intent"
6
+ ],
7
+ "homepage": "https://github.com/jurokapsiar/tyui#readme",
8
+ "bugs": {
9
+ "url": "https://github.com/jurokapsiar/tyui/issues"
10
+ },
11
+ "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/jurokapsiar/tyui.git",
15
+ "directory": "libs/solid"
16
+ },
17
+ "type": "module",
18
+ "sideEffects": false,
19
+ "main": "./index.js",
20
+ "module": "./index.js",
21
+ "types": "./index.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "types": "./index.d.ts",
25
+ "default": "./index.js"
26
+ },
27
+ "./button": {
28
+ "types": "./button.d.ts",
29
+ "default": "./button.js"
30
+ },
31
+ "./checkbox": {
32
+ "types": "./checkbox.d.ts",
33
+ "default": "./checkbox.js"
34
+ },
35
+ "./input": {
36
+ "types": "./input.d.ts",
37
+ "default": "./input.js"
38
+ },
39
+ "./radio": {
40
+ "types": "./radio.d.ts",
41
+ "default": "./radio.js"
42
+ },
43
+ "./radio-group": {
44
+ "types": "./radio-group.d.ts",
45
+ "default": "./radio-group.js"
46
+ },
47
+ "./jsx": {
48
+ "types": "./jsx.d.ts",
49
+ "default": "./jsx.js"
50
+ },
51
+ "./define": {
52
+ "types": "./define.d.ts",
53
+ "default": "./define.js"
54
+ },
55
+ "./define/button": {
56
+ "types": "./define/button.d.ts",
57
+ "default": "./define/button.js"
58
+ },
59
+ "./define/center": {
60
+ "types": "./define/center.d.ts",
61
+ "default": "./define/center.js"
62
+ },
63
+ "./define/checkbox": {
64
+ "types": "./define/checkbox.d.ts",
65
+ "default": "./define/checkbox.js"
66
+ },
67
+ "./define/cluster": {
68
+ "types": "./define/cluster.d.ts",
69
+ "default": "./define/cluster.js"
70
+ },
71
+ "./define/container": {
72
+ "types": "./define/container.d.ts",
73
+ "default": "./define/container.js"
74
+ },
75
+ "./define/flex": {
76
+ "types": "./define/flex.d.ts",
77
+ "default": "./define/flex.js"
78
+ },
79
+ "./define/frame": {
80
+ "types": "./define/frame.d.ts",
81
+ "default": "./define/frame.js"
82
+ },
83
+ "./define/grid": {
84
+ "types": "./define/grid.d.ts",
85
+ "default": "./define/grid.js"
86
+ },
87
+ "./define/input": {
88
+ "types": "./define/input.d.ts",
89
+ "default": "./define/input.js"
90
+ },
91
+ "./define/radio": {
92
+ "types": "./define/radio.d.ts",
93
+ "default": "./define/radio.js"
94
+ },
95
+ "./define/radio-group": {
96
+ "types": "./define/radio-group.d.ts",
97
+ "default": "./define/radio-group.js"
98
+ },
99
+ "./define/sidebar": {
100
+ "types": "./define/sidebar.d.ts",
101
+ "default": "./define/sidebar.js"
102
+ },
103
+ "./custom-elements.json": {
104
+ "default": "./custom-elements.json"
105
+ }
106
+ },
107
+ "publishConfig": {
108
+ "access": "public"
109
+ },
110
+ "scripts": {
111
+ "build": "vite build",
112
+ "test": "vitest run --passWithNoTests",
113
+ "typecheck": "tsc -p tsconfig.lib.json --noEmit"
114
+ },
115
+ "dependencies": {
116
+ "@toyu-ui/define": "^0.1.0",
117
+ "@toyu-ui/elements": "^0.1.0"
118
+ },
119
+ "peerDependencies": {
120
+ "solid-js": "^1.9.13"
121
+ },
122
+ "private": false
123
+ }
@@ -0,0 +1,13 @@
1
+ import { JSX } from 'solid-js';
2
+ import { TyuiRadioGroupEvent, TyuiRadioGroupLayout } from '@toyu-ui/elements/radio-group';
3
+ export type RadioGroupProps = {
4
+ disabled?: boolean | undefined;
5
+ label?: string | undefined;
6
+ layout?: TyuiRadioGroupLayout | undefined;
7
+ name?: string | undefined;
8
+ onChange?: ((event: TyuiRadioGroupEvent) => void) | undefined;
9
+ required?: boolean | undefined;
10
+ value?: string | undefined;
11
+ children?: JSX.Element | undefined;
12
+ };
13
+ export declare function RadioGroup(props: RadioGroupProps): JSX.Element;
package/radio-group.js ADDED
@@ -0,0 +1,20 @@
1
+ import { addEventListener as u, getOwner as o, insert as f, effect as v, template as m } from "solid-js/web";
2
+ var b = /* @__PURE__ */ m("<tyui-radio-group>", !0, !1, !1);
3
+ function g(t) {
4
+ return (() => {
5
+ var a = b();
6
+ return u(a, "change", t.onChange), a._$owner = o(), f(a, () => t.children), v((e) => {
7
+ var i = t.disabled, r = t.label, d = t.layout, l = t.name, n = t.required;
8
+ return i !== e.e && (a.disabled = e.e = i), r !== e.t && (a.label = e.t = r), d !== e.a && (a.layout = e.a = d), l !== e.o && (a.name = e.o = l), n !== e.i && (a.required = e.i = n), e;
9
+ }, {
10
+ e: void 0,
11
+ t: void 0,
12
+ a: void 0,
13
+ o: void 0,
14
+ i: void 0
15
+ }), v(() => a.value = t.value), a;
16
+ })();
17
+ }
18
+ export {
19
+ g as RadioGroup
20
+ };
package/radio.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { JSX } from 'solid-js';
2
+ import { TyuiRadioLabelPosition } from '@toyu-ui/elements/radio';
3
+ export type RadioProps = {
4
+ checked?: boolean | undefined;
5
+ disabled?: boolean | undefined;
6
+ labelPosition?: TyuiRadioLabelPosition | undefined;
7
+ name?: string | undefined;
8
+ required?: boolean | undefined;
9
+ value?: string | undefined;
10
+ children?: JSX.Element | undefined;
11
+ };
12
+ export declare function Radio(props: RadioProps): JSX.Element;
package/radio.js ADDED
@@ -0,0 +1,19 @@
1
+ import { getOwner as v, insert as o, effect as t, template as u } from "solid-js/web";
2
+ var c = /* @__PURE__ */ u("<tyui-radio>", !0, !1, !1);
3
+ function m(i) {
4
+ return (() => {
5
+ var e = c();
6
+ return e._$owner = v(), o(e, () => i.children), t((a) => {
7
+ var r = i.disabled, d = i.labelPosition, l = i.name, n = i.required;
8
+ return r !== a.e && (e.disabled = a.e = r), d !== a.t && (e.labelposition = a.t = d), l !== a.a && (e.name = a.a = l), n !== a.o && (e.required = a.o = n), a;
9
+ }, {
10
+ e: void 0,
11
+ t: void 0,
12
+ a: void 0,
13
+ o: void 0
14
+ }), t(() => e.checked = i.checked), t(() => e.value = i.value), e;
15
+ })();
16
+ }
17
+ export {
18
+ m as Radio
19
+ };
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: button
3
+ description: Solid-facing alias for tyui-button guidance.
4
+ license: Apache-2.0
5
+ requires: ['@toyu-ui/solid#setup', '@toyu-ui/elements#button']
6
+ metadata:
7
+ type: framework
8
+ library: '@toyu-ui/solid'
9
+ library_version: '0.1.0'
10
+ framework: solid
11
+ source: skills/button/SKILL.md
12
+ ---
13
+
14
+ # TYUI Solid button
15
+
16
+ ## Intent
17
+
18
+ Use `@toyu-ui/solid#button` to load Solid setup plus the authoritative `@toyu-ui/elements#button` guidance.
19
+
20
+ ## Correct Usage
21
+
22
+ ```tsx
23
+ import { Button } from '@toyu-ui/solid';
24
+
25
+ <Button appearance="primary">Save</Button>;
26
+ ```
27
+
28
+ ## Selection Guidance
29
+
30
+ - Use the `Button` wrapper for ordinary Solid app code.
31
+ - Use raw `tyui-button` only when direct custom-element access is needed.
32
+
33
+ ## Anti-Patterns
34
+
35
+ - Do not duplicate button behavior in a Solid wrapper.
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: center
3
+ description: Solid-facing alias for tyui-center guidance.
4
+ license: Apache-2.0
5
+ requires: ['@toyu-ui/solid#setup', '@toyu-ui/elements#center']
6
+ metadata:
7
+ type: framework
8
+ library: '@toyu-ui/solid'
9
+ library_version: '0.1.0'
10
+ framework: solid
11
+ source: skills/center/SKILL.md
12
+ ---
13
+
14
+ # TYUI Solid center
15
+
16
+ ## Intent
17
+
18
+ Use `@toyu-ui/solid#center` to load Solid setup plus the authoritative `@toyu-ui/elements#center` guidance.
19
+
20
+ ## Correct Usage
21
+
22
+ ```tsx
23
+ import '@toyu-ui/solid/jsx';
24
+ import { defineTyuiCenter } from '@toyu-ui/solid/define/center';
25
+
26
+ defineTyuiCenter();
27
+
28
+ <tyui-center measure="60ch" gutter="page" />;
29
+ ```
30
+
31
+ ## Selection Guidance
32
+
33
+ - Use raw `tyui-center` in TSX for readable centered regions.
34
+ - Register it through `@toyu-ui/solid/define/center`.
35
+
36
+ ## Anti-Patterns
37
+
38
+ - Do not use Center as a card or surface.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: checkbox
3
+ description: Solid-facing alias for tyui-checkbox guidance.
4
+ license: Apache-2.0
5
+ requires: ['@toyu-ui/solid#setup', '@toyu-ui/elements#checkbox']
6
+ metadata:
7
+ type: framework
8
+ library: '@toyu-ui/solid'
9
+ library_version: '0.1.0'
10
+ framework: solid
11
+ source: skills/checkbox/SKILL.md
12
+ ---
13
+
14
+ # TYUI Solid checkbox
15
+
16
+ ## Intent
17
+
18
+ Use `@toyu-ui/solid#checkbox` to load Solid setup plus the authoritative `@toyu-ui/elements#checkbox` guidance.
19
+
20
+ ## Correct Usage
21
+
22
+ ```tsx
23
+ import { Checkbox } from '@toyu-ui/solid';
24
+
25
+ <Checkbox name="updates" value="yes">
26
+ Send updates
27
+ </Checkbox>;
28
+ ```
29
+
30
+ ## Selection Guidance
31
+
32
+ - Use Checkbox for independent boolean choices in Solid.
33
+ - Use RadioGroup and Radio for mutually exclusive choices.
34
+
35
+ ## Anti-Patterns
36
+
37
+ - Do not use Checkbox as a command button.
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: cluster
3
+ description: Solid-facing alias for tyui-cluster guidance.
4
+ license: Apache-2.0
5
+ requires: ['@toyu-ui/solid#setup', '@toyu-ui/elements#cluster']
6
+ metadata:
7
+ type: framework
8
+ library: '@toyu-ui/solid'
9
+ library_version: '0.1.0'
10
+ framework: solid
11
+ source: skills/cluster/SKILL.md
12
+ ---
13
+
14
+ # TYUI Solid cluster
15
+
16
+ ## Intent
17
+
18
+ Use `@toyu-ui/solid#cluster` to load Solid setup plus the authoritative `@toyu-ui/elements#cluster` guidance.
19
+
20
+ ## Correct Usage
21
+
22
+ ```tsx
23
+ import '@toyu-ui/solid/jsx';
24
+ import { defineTyuiCluster } from '@toyu-ui/solid/define/cluster';
25
+
26
+ defineTyuiCluster();
27
+
28
+ <tyui-cluster gap="2" />;
29
+ ```
30
+
31
+ ## Selection Guidance
32
+
33
+ - Use raw `tyui-cluster` in TSX for wrapping action rows and tags.
34
+ - Register it through `@toyu-ui/solid/define/cluster`.
35
+
36
+ ## Anti-Patterns
37
+
38
+ - Do not use Cluster for table or data-grid semantics.