@toyu-ui/define 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/all.d.ts +1 -0
- package/all.js +18 -0
- package/button.d.ts +2 -0
- package/button.js +9 -0
- package/center.d.ts +2 -0
- package/center.js +9 -0
- package/checkbox.d.ts +2 -0
- package/checkbox.js +9 -0
- package/cluster.d.ts +2 -0
- package/cluster.js +9 -0
- package/container.d.ts +2 -0
- package/container.js +9 -0
- package/flex.d.ts +2 -0
- package/flex.js +9 -0
- package/frame.d.ts +2 -0
- package/frame.js +9 -0
- package/grid.d.ts +2 -0
- package/grid.js +9 -0
- package/index.d.ts +13 -0
- package/index.js +40 -0
- package/input.d.ts +2 -0
- package/input.js +9 -0
- package/package.json +89 -0
- package/radio-group.d.ts +2 -0
- package/radio-group.js +9 -0
- package/radio.d.ts +2 -0
- package/radio.js +9 -0
- package/sidebar.d.ts +2 -0
- package/sidebar.js +9 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Juro Kapsiar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<h1><span color="blue">T</span><span color="cyan">Y</span>UI</h1>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>framework-neutral component library</strong>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://github.com/jurokapsiar/tyui"><img src="https://img.shields.io/badge/version-0.0.0-blue?style=flat-square" alt="Version" /></a>
|
|
11
|
+
<a href="https://yarnpkg.com/"><img src="https://img.shields.io/badge/Yarn-4.5.0-2C8EBB?style=flat-square&logo=yarn&logoColor=white" alt="Yarn" /></a>
|
|
12
|
+
<a href="https://nx.dev/"><img src="https://img.shields.io/badge/Nx-22.6.5-143055?style=flat-square&logo=nx&logoColor=white" alt="Nx" /></a>
|
|
13
|
+
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-6.0.3-3178C6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript" /></a>
|
|
14
|
+
<a href="https://vite.dev/"><img src="https://img.shields.io/badge/Vite-7.1.11-646CFF?style=flat-square&logo=vite&logoColor=white" alt="Vite" /></a>
|
|
15
|
+
<a href="https://storybook.js.org/"><img src="https://img.shields.io/badge/Storybook-10.3.5-FF4785?style=flat-square&logo=storybook&logoColor=white" alt="Storybook" /></a>
|
|
16
|
+
<a href="https://lit.dev/"><img src="https://img.shields.io/badge/Lit-3.3.2-324FFF?style=flat-square&logo=lit&logoColor=white" alt="Lit" /></a>
|
|
17
|
+
<a href="https://www.solidjs.com/"><img src="https://img.shields.io/badge/Solid-1.9.13-2C4F7C?style=flat-square&logo=solid&logoColor=white" alt="Solid" /></a>
|
|
18
|
+
<a href="https://vitest.dev/"><img src="https://img.shields.io/badge/Vitest-4.1.5-6E9F18?style=flat-square&logo=vitest&logoColor=white" alt="Vitest" /></a>
|
|
19
|
+
<a href="https://playwright.dev/"><img src="https://img.shields.io/badge/Playwright-1.59.1-2EAD33?style=flat-square&logo=playwright&logoColor=white" alt="Playwright" /></a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<p align="center">
|
|
23
|
+
<a href="#availability">Availability</a> ·
|
|
24
|
+
<a href="#architecture">Architecture</a> ·
|
|
25
|
+
<a href="#commands">Commands</a> ·
|
|
26
|
+
<a href="#specs-and-decisions">Specs And Decisions</a>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
**TYUI** is a framework-neutral component library. It is an experiment, not intended to be used by anybody really.
|
|
32
|
+
|
|
33
|
+
Codex interviewed me, asked bunch of interesting questions about design systems, component libraries, accessibility. Used [APG patterns](https://www.w3.org/WAI/ARIA/apg/patterns/) and [Fluent UI React v9](https://react.fluentui.dev/) as a reference for behaviors, API and other aspects. Then implemented the specs.
|
|
34
|
+
|
|
35
|
+
The library is intended to be AI firendly - agents should have access to all underlying information, component intnets, usage patterns and best practices.
|
|
36
|
+
|
|
37
|
+
Desing is proposed to be a separate layer. It should be possible to generate the design layer based on the standardized [design.md](https://github.com/google-labs-code/design.md/blob/main/docs/spec.md).
|
|
38
|
+
|
|
39
|
+
**Warning:** This is 100% AI generated and not polished. Visuals and user experience will be rough. As part of the experiment I might also want to find out if agents can fine tune the behaviors and visuals of the components so that they can be considered well crafted. But for now they are not.
|
|
40
|
+
|
|
41
|
+
## Availability
|
|
42
|
+
|
|
43
|
+
Storybook is deployed as [Github page](https://jurokapsiar.github.io/tyui/).
|
|
44
|
+
Packages are not yet available - they might be if I decide to use the library in my personal projects.
|
|
45
|
+
|
|
46
|
+
## Architecture
|
|
47
|
+
|
|
48
|
+
- `libs/core`: plain TypeScript behavior, state machines, and accessibility logic.
|
|
49
|
+
- `libs/elements`: native Custom Element implementations.
|
|
50
|
+
- `libs/define`: opt-in custom-element registration functions.
|
|
51
|
+
- `libs/solid`: Solid JSX typing and optional thin wrappers.
|
|
52
|
+
- `libs/testing`: shared testing helpers.
|
|
53
|
+
- `apps/solid-example`: Solid + Vite consumer example.
|
|
54
|
+
- `apps/vanilla-example`: vanilla + Vite consumer example.
|
|
55
|
+
|
|
56
|
+
The component implementation should remain in `core` and `elements`. Framework packages should only improve typing and ergonomics.
|
|
57
|
+
|
|
58
|
+
## Commands
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
yarn install
|
|
62
|
+
yarn build
|
|
63
|
+
yarn test
|
|
64
|
+
yarn typecheck
|
|
65
|
+
yarn playwright:image
|
|
66
|
+
yarn dev:solid
|
|
67
|
+
yarn dev:vanilla
|
|
68
|
+
yarn storybook
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Specs And Decisions
|
|
72
|
+
|
|
73
|
+
- `spec/requirements.md`
|
|
74
|
+
- `spec/architecture.md`
|
|
75
|
+
- `spec/testing.md`
|
|
76
|
+
- `spec/component-contract-template.md`
|
|
77
|
+
- `adr/0001-native-custom-elements.md`
|
|
78
|
+
- `adr/0002-solid-integration-surface.md`
|
|
79
|
+
- `ai/components/*.md`
|
package/all.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function defineTyuiElements(): void;
|
package/all.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineTyuiButton as i } from "./button.js";
|
|
2
|
+
import { defineTyuiCenter as e } from "./center.js";
|
|
3
|
+
import { defineTyuiCheckbox as o } from "./checkbox.js";
|
|
4
|
+
import { defineTyuiCluster as r } from "./cluster.js";
|
|
5
|
+
import { defineTyuiContainer as f } from "./container.js";
|
|
6
|
+
import { defineTyuiFlex as m } from "./flex.js";
|
|
7
|
+
import { defineTyuiFrame as n } from "./frame.js";
|
|
8
|
+
import { defineTyuiGrid as t } from "./grid.js";
|
|
9
|
+
import { defineTyuiInput as u } from "./input.js";
|
|
10
|
+
import { defineTyuiRadio as d } from "./radio.js";
|
|
11
|
+
import { defineTyuiRadioGroup as p } from "./radio-group.js";
|
|
12
|
+
import { defineTyuiSidebar as y } from "./sidebar.js";
|
|
13
|
+
function k() {
|
|
14
|
+
i(), e(), o(), r(), f(), m(), n(), t(), u(), d(), p(), y();
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
k as defineTyuiElements
|
|
18
|
+
};
|
package/button.d.ts
ADDED
package/button.js
ADDED
package/center.d.ts
ADDED
package/center.js
ADDED
package/checkbox.d.ts
ADDED
package/checkbox.js
ADDED
package/cluster.d.ts
ADDED
package/cluster.js
ADDED
package/container.d.ts
ADDED
package/container.js
ADDED
package/flex.d.ts
ADDED
package/flex.js
ADDED
package/frame.d.ts
ADDED
package/frame.js
ADDED
package/grid.d.ts
ADDED
package/grid.js
ADDED
package/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './button';
|
|
2
|
+
export * from './center';
|
|
3
|
+
export * from './checkbox';
|
|
4
|
+
export * from './cluster';
|
|
5
|
+
export * from './container';
|
|
6
|
+
export * from './flex';
|
|
7
|
+
export * from './frame';
|
|
8
|
+
export * from './grid';
|
|
9
|
+
export * from './input';
|
|
10
|
+
export * from './radio';
|
|
11
|
+
export * from './radio-group';
|
|
12
|
+
export * from './sidebar';
|
|
13
|
+
export * from './all';
|
package/index.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineTyuiButton as r, tyuiButtonTagName as o } from "./button.js";
|
|
2
|
+
import { defineTyuiCenter as a, tyuiCenterTagName as u } from "./center.js";
|
|
3
|
+
import { defineTyuiCheckbox as f, tyuiCheckboxTagName as y } from "./checkbox.js";
|
|
4
|
+
import { defineTyuiCluster as n, tyuiClusterTagName as d } from "./cluster.js";
|
|
5
|
+
import { defineTyuiContainer as x, tyuiContainerTagName as g } from "./container.js";
|
|
6
|
+
import { defineTyuiFlex as C, tyuiFlexTagName as l } from "./flex.js";
|
|
7
|
+
import { defineTyuiFrame as F, tyuiFrameTagName as G } from "./frame.js";
|
|
8
|
+
import { defineTyuiGrid as s, tyuiGridTagName as c } from "./grid.js";
|
|
9
|
+
import { defineTyuiInput as k, tyuiInputTagName as B } from "./input.js";
|
|
10
|
+
import { defineTyuiRadio as S, tyuiRadioTagName as E } from "./radio.js";
|
|
11
|
+
import { defineTyuiRadioGroup as q, tyuiRadioGroupTagName as v } from "./radio-group.js";
|
|
12
|
+
import { defineTyuiSidebar as z, tyuiSidebarTagName as A } from "./sidebar.js";
|
|
13
|
+
import { defineTyuiElements as H } from "./all.js";
|
|
14
|
+
export {
|
|
15
|
+
r as defineTyuiButton,
|
|
16
|
+
a as defineTyuiCenter,
|
|
17
|
+
f as defineTyuiCheckbox,
|
|
18
|
+
n as defineTyuiCluster,
|
|
19
|
+
x as defineTyuiContainer,
|
|
20
|
+
H as defineTyuiElements,
|
|
21
|
+
C as defineTyuiFlex,
|
|
22
|
+
F as defineTyuiFrame,
|
|
23
|
+
s as defineTyuiGrid,
|
|
24
|
+
k as defineTyuiInput,
|
|
25
|
+
S as defineTyuiRadio,
|
|
26
|
+
q as defineTyuiRadioGroup,
|
|
27
|
+
z as defineTyuiSidebar,
|
|
28
|
+
o as tyuiButtonTagName,
|
|
29
|
+
u as tyuiCenterTagName,
|
|
30
|
+
y as tyuiCheckboxTagName,
|
|
31
|
+
d as tyuiClusterTagName,
|
|
32
|
+
g as tyuiContainerTagName,
|
|
33
|
+
l as tyuiFlexTagName,
|
|
34
|
+
G as tyuiFrameTagName,
|
|
35
|
+
c as tyuiGridTagName,
|
|
36
|
+
B as tyuiInputTagName,
|
|
37
|
+
v as tyuiRadioGroupTagName,
|
|
38
|
+
E as tyuiRadioTagName,
|
|
39
|
+
A as tyuiSidebarTagName
|
|
40
|
+
};
|
package/input.d.ts
ADDED
package/input.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@toyu-ui/define",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"homepage": "https://github.com/jurokapsiar/tyui#readme",
|
|
5
|
+
"bugs": {
|
|
6
|
+
"url": "https://github.com/jurokapsiar/tyui/issues"
|
|
7
|
+
},
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/jurokapsiar/tyui.git",
|
|
12
|
+
"directory": "libs/define"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"main": "./index.js",
|
|
17
|
+
"module": "./index.js",
|
|
18
|
+
"types": "./index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./index.d.ts",
|
|
22
|
+
"default": "./index.js"
|
|
23
|
+
},
|
|
24
|
+
"./button": {
|
|
25
|
+
"types": "./button.d.ts",
|
|
26
|
+
"default": "./button.js"
|
|
27
|
+
},
|
|
28
|
+
"./center": {
|
|
29
|
+
"types": "./center.d.ts",
|
|
30
|
+
"default": "./center.js"
|
|
31
|
+
},
|
|
32
|
+
"./checkbox": {
|
|
33
|
+
"types": "./checkbox.d.ts",
|
|
34
|
+
"default": "./checkbox.js"
|
|
35
|
+
},
|
|
36
|
+
"./cluster": {
|
|
37
|
+
"types": "./cluster.d.ts",
|
|
38
|
+
"default": "./cluster.js"
|
|
39
|
+
},
|
|
40
|
+
"./container": {
|
|
41
|
+
"types": "./container.d.ts",
|
|
42
|
+
"default": "./container.js"
|
|
43
|
+
},
|
|
44
|
+
"./flex": {
|
|
45
|
+
"types": "./flex.d.ts",
|
|
46
|
+
"default": "./flex.js"
|
|
47
|
+
},
|
|
48
|
+
"./frame": {
|
|
49
|
+
"types": "./frame.d.ts",
|
|
50
|
+
"default": "./frame.js"
|
|
51
|
+
},
|
|
52
|
+
"./grid": {
|
|
53
|
+
"types": "./grid.d.ts",
|
|
54
|
+
"default": "./grid.js"
|
|
55
|
+
},
|
|
56
|
+
"./input": {
|
|
57
|
+
"types": "./input.d.ts",
|
|
58
|
+
"default": "./input.js"
|
|
59
|
+
},
|
|
60
|
+
"./radio": {
|
|
61
|
+
"types": "./radio.d.ts",
|
|
62
|
+
"default": "./radio.js"
|
|
63
|
+
},
|
|
64
|
+
"./radio-group": {
|
|
65
|
+
"types": "./radio-group.d.ts",
|
|
66
|
+
"default": "./radio-group.js"
|
|
67
|
+
},
|
|
68
|
+
"./sidebar": {
|
|
69
|
+
"types": "./sidebar.d.ts",
|
|
70
|
+
"default": "./sidebar.js"
|
|
71
|
+
},
|
|
72
|
+
"./all": {
|
|
73
|
+
"types": "./all.d.ts",
|
|
74
|
+
"default": "./all.js"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"publishConfig": {
|
|
78
|
+
"access": "public"
|
|
79
|
+
},
|
|
80
|
+
"scripts": {
|
|
81
|
+
"build": "vite build",
|
|
82
|
+
"test": "vitest run --passWithNoTests",
|
|
83
|
+
"typecheck": "tsc -p tsconfig.lib.json --noEmit"
|
|
84
|
+
},
|
|
85
|
+
"dependencies": {
|
|
86
|
+
"@toyu-ui/elements": "^0.1.0"
|
|
87
|
+
},
|
|
88
|
+
"private": false
|
|
89
|
+
}
|
package/radio-group.d.ts
ADDED
package/radio-group.js
ADDED
package/radio.d.ts
ADDED
package/radio.js
ADDED
package/sidebar.d.ts
ADDED
package/sidebar.js
ADDED