@you-agent-factory/components 0.0.0 → 0.0.2
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.md +21 -0
- package/README.md +38 -7
- package/dist/category-paths.d.ts +3 -0
- package/dist/charts/chart-state-panel.d.ts +11 -0
- package/dist/charts/chart.d.ts +35 -0
- package/dist/charts/index.d.ts +5 -0
- package/dist/charts/index.js +287 -0
- package/dist/chunks/action-row.js +39 -0
- package/dist/chunks/alert-panel.js +182 -0
- package/dist/chunks/button.js +193 -0
- package/dist/chunks/cn.js +6 -0
- package/dist/chunks/factory-emulator-controls.js +123 -0
- package/dist/chunks/package-form-field.js +546 -0
- package/dist/chunks/scroll-area.js +261 -0
- package/dist/chunks/surface-panel.js +73 -0
- package/dist/chunks/table-layout.js +292 -0
- package/dist/chunks/typography-roles.js +26 -0
- package/dist/chunks/typography.js +129 -0
- package/dist/chunks/widget-frame.js +344 -0
- package/dist/data-display/code-panel.d.ts +12 -0
- package/dist/data-display/data-table.d.ts +27 -0
- package/dist/data-display/description-list.d.ts +4 -0
- package/{src/data-display/index.ts → dist/data-display/index.d.ts} +4 -26
- package/dist/data-display/index.js +20 -0
- package/dist/data-display/table-layout.d.ts +8 -0
- package/dist/data-display/table.d.ts +14 -0
- package/dist/factory-emulator/factory-emulator-controls.d.ts +23 -0
- package/dist/factory-emulator/index.d.ts +6 -0
- package/dist/factory-emulator/index.js +6 -0
- package/dist/feedback/alert-panel-semantics.d.ts +11 -0
- package/dist/feedback/alert-panel.d.ts +29 -0
- package/dist/feedback/index.d.ts +6 -0
- package/dist/feedback/index.js +10 -0
- package/dist/feedback/skeleton.d.ts +2 -0
- package/dist/forms/index.d.ts +19 -0
- package/dist/forms/index.js +37 -0
- package/dist/forms/package-checkbox.d.ts +3 -0
- package/dist/forms/package-enum-select.d.ts +42 -0
- package/dist/forms/package-file-input.d.ts +3 -0
- package/dist/forms/package-form-field.d.ts +49 -0
- package/dist/forms/package-input.d.ts +6 -0
- package/dist/forms/package-native-select.d.ts +3 -0
- package/dist/forms/package-select.d.ts +32 -0
- package/dist/forms/package-textarea.d.ts +10 -0
- package/dist/forms/select-icons.d.ts +3 -0
- package/dist/graphs/graph-edge-path.d.ts +18 -0
- package/dist/graphs/graph-edge.d.ts +15 -0
- package/dist/graphs/graph-node-button.d.ts +11 -0
- package/dist/graphs/graph-node-handle-badge.d.ts +5 -0
- package/dist/graphs/graph-node-handle.d.ts +18 -0
- package/dist/graphs/graph-node-shell.d.ts +13 -0
- package/dist/graphs/graph-node-state-indicator.d.ts +6 -0
- package/dist/graphs/graph-node-state.d.ts +23 -0
- package/dist/graphs/graph-viewport-surface.d.ts +5 -0
- package/dist/graphs/index.d.ts +13 -0
- package/dist/graphs/index.js +614 -0
- package/{src/icons/index.ts → dist/icons/index.d.ts} +1 -2
- package/dist/icons/index.js +4 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +145 -0
- package/dist/layout/action-row.d.ts +8 -0
- package/{src/layout/index.ts → dist/layout/index.d.ts} +1 -3
- package/dist/layout/index.js +9 -0
- package/dist/layout/surface-panel.d.ts +15 -0
- package/{src/navigation/index.ts → dist/navigation/index.d.ts} +1 -2
- package/dist/navigation/index.js +4 -0
- package/dist/overlays/collapsible.d.ts +5 -0
- package/dist/overlays/dialog.d.ts +16 -0
- package/dist/overlays/index.d.ts +10 -0
- package/dist/overlays/index.js +27 -0
- package/dist/overlays/overlay-layout.d.ts +6 -0
- package/dist/overlays/popover.d.ts +6 -0
- package/dist/overlays/scroll-area.d.ts +9 -0
- package/dist/primitives/button-link.d.ts +5 -0
- package/dist/primitives/button.d.ts +9 -0
- package/dist/primitives/icon-button-shell.d.ts +10 -0
- package/{src/primitives/index.ts → dist/primitives/index.d.ts} +2 -19
- package/dist/primitives/index.js +49 -0
- package/dist/primitives/package-text.d.ts +6 -0
- package/dist/primitives/typography-roles.d.ts +12 -0
- package/dist/primitives/typography.d.ts +36 -0
- package/dist/recipes/index.d.ts +14 -0
- package/dist/recipes/index.js +32 -0
- package/dist/recipes/widget-frame-content.d.ts +24 -0
- package/dist/recipes/widget-frame-disclosure.d.ts +33 -0
- package/dist/recipes/widget-frame-layout.d.ts +12 -0
- package/dist/recipes/widget-frame-skeleton.d.ts +2 -0
- package/dist/recipes/widget-frame-states.d.ts +15 -0
- package/dist/recipes/widget-frame-typography.d.ts +10 -0
- package/dist/recipes/widget-frame.d.ts +12 -0
- package/{src → dist}/styles.css +36 -0
- package/dist/testing/index.d.ts +4 -0
- package/dist/testing/index.js +16 -0
- package/dist/testing/render.d.ts +5 -0
- package/{src/tokens/index.ts → dist/tokens/index.d.ts} +1 -2
- package/dist/tokens/index.js +4 -0
- package/dist/utilities/cn.d.ts +1 -0
- package/{src/utilities/index.ts → dist/utilities/index.d.ts} +1 -3
- package/dist/utilities/index.js +6 -0
- package/package.json +65 -64
- package/docs/README.md +0 -83
- package/docs/button.md +0 -119
- package/docs/charts.md +0 -325
- package/docs/data-display-code-panel.md +0 -120
- package/docs/feedback-alert-panel.md +0 -117
- package/docs/feedback-skeleton.md +0 -54
- package/docs/forms-form-field.md +0 -490
- package/docs/forms-input-primitives.md +0 -311
- package/docs/forms-select-primitives.md +0 -362
- package/docs/graphs.md +0 -250
- package/docs/layout-display-primitives.md +0 -211
- package/docs/overlays.md +0 -414
- package/docs/table-data-table.md +0 -331
- package/docs/typography-roles.md +0 -182
- package/docs/widget-frame-recipes.md +0 -273
- package/src/category-paths.ts +0 -20
- package/src/charts/chart-state-panel.tsx +0 -103
- package/src/charts/chart.tsx +0 -287
- package/src/charts/index.ts +0 -21
- package/src/data-display/code-panel.tsx +0 -67
- package/src/data-display/data-table.tsx +0 -180
- package/src/data-display/description-list.tsx +0 -24
- package/src/data-display/table-layout.ts +0 -12
- package/src/data-display/table.tsx +0 -131
- package/src/feedback/alert-panel-semantics.ts +0 -75
- package/src/feedback/alert-panel.tsx +0 -187
- package/src/feedback/index.ts +0 -21
- package/src/feedback/skeleton.tsx +0 -16
- package/src/forms/index.ts +0 -73
- package/src/forms/package-checkbox.tsx +0 -50
- package/src/forms/package-enum-select.tsx +0 -185
- package/src/forms/package-file-input.tsx +0 -25
- package/src/forms/package-form-field.tsx +0 -202
- package/src/forms/package-input.tsx +0 -25
- package/src/forms/package-native-select.tsx +0 -25
- package/src/forms/package-select.tsx +0 -209
- package/src/forms/package-textarea.tsx +0 -35
- package/src/forms/select-icons.tsx +0 -35
- package/src/graphs/graph-edge-path.ts +0 -241
- package/src/graphs/graph-edge.tsx +0 -130
- package/src/graphs/graph-interactive-example.tsx +0 -187
- package/src/graphs/graph-node-button.tsx +0 -51
- package/src/graphs/graph-node-handle-badge.tsx +0 -108
- package/src/graphs/graph-node-handle.ts +0 -28
- package/src/graphs/graph-node-shell.tsx +0 -111
- package/src/graphs/graph-node-state-indicator.tsx +0 -47
- package/src/graphs/graph-node-state.ts +0 -111
- package/src/graphs/graph-viewport-surface.tsx +0 -27
- package/src/graphs/index.ts +0 -41
- package/src/index.ts +0 -209
- package/src/layout/action-row.tsx +0 -53
- package/src/layout/surface-panel.tsx +0 -91
- package/src/overlays/collapsible.tsx +0 -22
- package/src/overlays/dialog.tsx +0 -148
- package/src/overlays/index.ts +0 -31
- package/src/overlays/overlay-layout.ts +0 -9
- package/src/overlays/popover.tsx +0 -29
- package/src/overlays/scroll-area.tsx +0 -78
- package/src/primitives/button-link.tsx +0 -22
- package/src/primitives/button.tsx +0 -258
- package/src/primitives/icon-button-shell.tsx +0 -49
- package/src/primitives/package-text.tsx +0 -29
- package/src/primitives/typography-roles.ts +0 -12
- package/src/primitives/typography.tsx +0 -165
- package/src/recipes/index.ts +0 -61
- package/src/recipes/widget-frame-content.tsx +0 -114
- package/src/recipes/widget-frame-disclosure.tsx +0 -161
- package/src/recipes/widget-frame-layout.ts +0 -40
- package/src/recipes/widget-frame-skeleton.tsx +0 -16
- package/src/recipes/widget-frame-states.tsx +0 -99
- package/src/recipes/widget-frame-typography.ts +0 -19
- package/src/recipes/widget-frame.tsx +0 -84
- package/src/testing/index.ts +0 -13
- package/src/testing/render.tsx +0 -16
- package/src/utilities/cn.ts +0 -5
- /package/{src → dist}/styles/color-palette-presets.css +0 -0
- /package/{src → dist}/styles/color-role-tokens.css +0 -0
- /package/{src → dist}/styles/layout-role-tokens.css +0 -0
- /package/{src → dist}/styles/text-color-role-tokens.css +0 -0
- /package/{src → dist}/styles/typography-role-tokens.css +0 -0
- /package/{src → dist}/styles/typography-role-utilities.css +0 -0
- /package/{src → dist}/styles/typography-roles.css +0 -0
package/{src → dist}/styles.css
RENAMED
|
@@ -11,6 +11,42 @@
|
|
|
11
11
|
@import "./styles/typography-roles.css";
|
|
12
12
|
@import "./styles/layout-role-tokens.css";
|
|
13
13
|
|
|
14
|
+
.factory-emulator-playback,
|
|
15
|
+
.factory-emulator-playback__actions,
|
|
16
|
+
.factory-emulator-playback__speed {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: 0.5rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.factory-emulator-playback,
|
|
23
|
+
.factory-emulator-playback__actions {
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.factory-emulator-playback {
|
|
28
|
+
inline-size: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.factory-emulator-playback__action,
|
|
32
|
+
.factory-emulator-playback__speed-select,
|
|
33
|
+
.factory-emulator-playback__status {
|
|
34
|
+
min-block-size: 2.25rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.factory-emulator-playback__action {
|
|
38
|
+
padding: 0.5rem 0.75rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.factory-emulator-playback__speed {
|
|
42
|
+
margin-inline-start: auto;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.factory-emulator-playback__speed-select,
|
|
46
|
+
.factory-emulator-playback__status {
|
|
47
|
+
padding: 0.5rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
14
50
|
@keyframes overlay-collapsible-down {
|
|
15
51
|
from {
|
|
16
52
|
height: 0;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Stable category path for `@you-agent-factory/components/testing`. */
|
|
2
|
+
export declare const COMPONENTS_CATEGORY: "testing";
|
|
3
|
+
export type ComponentsCategory = typeof COMPONENTS_CATEGORY;
|
|
4
|
+
export { render, renderPackageComponent, screen, userEvent, waitFor, within, } from "./render";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { render } from "@testing-library/react";
|
|
2
|
+
import { render as render2, screen, waitFor, within } from "@testing-library/react";
|
|
3
|
+
import { default as default2 } from "@testing-library/user-event";
|
|
4
|
+
function renderPackageComponent(ui, options) {
|
|
5
|
+
return render(ui, options);
|
|
6
|
+
}
|
|
7
|
+
const COMPONENTS_CATEGORY = "testing";
|
|
8
|
+
export {
|
|
9
|
+
COMPONENTS_CATEGORY,
|
|
10
|
+
render2 as render,
|
|
11
|
+
renderPackageComponent,
|
|
12
|
+
screen,
|
|
13
|
+
default2 as userEvent,
|
|
14
|
+
waitFor,
|
|
15
|
+
within
|
|
16
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type RenderOptions, type RenderResult } from "@testing-library/react";
|
|
2
|
+
import type { ReactElement } from "react";
|
|
3
|
+
export declare function renderPackageComponent(ui: ReactElement, options?: Omit<RenderOptions, "wrapper">): RenderResult;
|
|
4
|
+
export { fireEvent, render, screen, within, waitFor } from "@testing-library/react";
|
|
5
|
+
export { default as userEvent } from "@testing-library/user-event";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function cn(...classes: Array<false | null | string | undefined>): string;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/** Stable category path for `@you-agent-factory/components/utilities`. */
|
|
2
|
-
export const COMPONENTS_CATEGORY
|
|
3
|
-
|
|
2
|
+
export declare const COMPONENTS_CATEGORY: "utilities";
|
|
4
3
|
export type ComponentsCategory = typeof COMPONENTS_CATEGORY;
|
|
5
|
-
|
|
6
4
|
export { cn } from "./cn";
|
package/package.json
CHANGED
|
@@ -1,122 +1,123 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@you-agent-factory/components",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "Domain-free React components, design tokens, and utilities for public visualizers.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"homepage": "https://github.com/portpowered/you-agent-factory#readme",
|
|
8
6
|
"repository": {
|
|
9
7
|
"type": "git",
|
|
10
8
|
"url": "git+https://github.com/portpowered/you-agent-factory.git",
|
|
11
9
|
"directory": "ui/packages/components"
|
|
12
10
|
},
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/portpowered/you-agent-factory/issues"
|
|
15
|
-
},
|
|
16
11
|
"publishConfig": {
|
|
17
12
|
"access": "public"
|
|
18
13
|
},
|
|
19
14
|
"files": [
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"src/**/*.ts",
|
|
24
|
-
"src/**/*.tsx",
|
|
25
|
-
"!src/**/*.test.ts",
|
|
26
|
-
"!src/**/*.test.tsx",
|
|
27
|
-
"!src/**/*.stories.ts",
|
|
28
|
-
"!src/**/*.stories.tsx",
|
|
29
|
-
"!src/**/*.harness.test.ts",
|
|
30
|
-
"!src/**/*.integration.test.tsx",
|
|
31
|
-
"!src/**/storybook-*.ts",
|
|
32
|
-
"!src/**/storybook-*.tsx",
|
|
33
|
-
"!src/**/package-*-story-support.tsx",
|
|
34
|
-
"!src/**/*story-fixtures.ts",
|
|
35
|
-
"!src/**/overlay-story*.ts",
|
|
36
|
-
"!src/**/compile-package-token-styles.ts",
|
|
37
|
-
"!src/**/package-token-fixture-usage.ts",
|
|
38
|
-
"!src/**/package-token-styles-fixture.css",
|
|
39
|
-
"!src/testing/package-browser-shims.ts",
|
|
40
|
-
"!src/testing/react-flow-test-shims.ts",
|
|
41
|
-
"!src/testing/vitest.setup.ts",
|
|
42
|
-
"!src/vite-aliases.ts"
|
|
15
|
+
"dist",
|
|
16
|
+
"LICENSE.md",
|
|
17
|
+
"README.md"
|
|
43
18
|
],
|
|
19
|
+
"type": "module",
|
|
44
20
|
"sideEffects": [
|
|
45
21
|
"*.css",
|
|
46
22
|
"**/*.css"
|
|
47
23
|
],
|
|
48
24
|
"exports": {
|
|
49
25
|
".": {
|
|
50
|
-
"types": "./
|
|
51
|
-
"
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.js",
|
|
28
|
+
"default": "./dist/index.js"
|
|
52
29
|
},
|
|
53
|
-
"./styles.css": "./
|
|
30
|
+
"./styles.css": "./dist/styles.css",
|
|
54
31
|
"./primitives": {
|
|
55
|
-
"types": "./
|
|
56
|
-
"
|
|
32
|
+
"types": "./dist/primitives/index.d.ts",
|
|
33
|
+
"import": "./dist/primitives/index.js",
|
|
34
|
+
"default": "./dist/primitives/index.js"
|
|
57
35
|
},
|
|
58
36
|
"./forms": {
|
|
59
|
-
"types": "./
|
|
60
|
-
"
|
|
37
|
+
"types": "./dist/forms/index.d.ts",
|
|
38
|
+
"import": "./dist/forms/index.js",
|
|
39
|
+
"default": "./dist/forms/index.js"
|
|
61
40
|
},
|
|
62
41
|
"./layout": {
|
|
63
|
-
"types": "./
|
|
64
|
-
"
|
|
42
|
+
"types": "./dist/layout/index.d.ts",
|
|
43
|
+
"import": "./dist/layout/index.js",
|
|
44
|
+
"default": "./dist/layout/index.js"
|
|
65
45
|
},
|
|
66
46
|
"./feedback": {
|
|
67
|
-
"types": "./
|
|
68
|
-
"
|
|
47
|
+
"types": "./dist/feedback/index.d.ts",
|
|
48
|
+
"import": "./dist/feedback/index.js",
|
|
49
|
+
"default": "./dist/feedback/index.js"
|
|
69
50
|
},
|
|
70
51
|
"./data-display": {
|
|
71
|
-
"types": "./
|
|
72
|
-
"
|
|
52
|
+
"types": "./dist/data-display/index.d.ts",
|
|
53
|
+
"import": "./dist/data-display/index.js",
|
|
54
|
+
"default": "./dist/data-display/index.js"
|
|
73
55
|
},
|
|
74
56
|
"./navigation": {
|
|
75
|
-
"types": "./
|
|
76
|
-
"
|
|
57
|
+
"types": "./dist/navigation/index.d.ts",
|
|
58
|
+
"import": "./dist/navigation/index.js",
|
|
59
|
+
"default": "./dist/navigation/index.js"
|
|
77
60
|
},
|
|
78
61
|
"./overlays": {
|
|
79
|
-
"types": "./
|
|
80
|
-
"
|
|
62
|
+
"types": "./dist/overlays/index.d.ts",
|
|
63
|
+
"import": "./dist/overlays/index.js",
|
|
64
|
+
"default": "./dist/overlays/index.js"
|
|
81
65
|
},
|
|
82
66
|
"./charts": {
|
|
83
|
-
"types": "./
|
|
84
|
-
"
|
|
67
|
+
"types": "./dist/charts/index.d.ts",
|
|
68
|
+
"import": "./dist/charts/index.js",
|
|
69
|
+
"default": "./dist/charts/index.js"
|
|
70
|
+
},
|
|
71
|
+
"./factory-emulator": {
|
|
72
|
+
"types": "./dist/factory-emulator/index.d.ts",
|
|
73
|
+
"import": "./dist/factory-emulator/index.js",
|
|
74
|
+
"default": "./dist/factory-emulator/index.js"
|
|
85
75
|
},
|
|
86
76
|
"./graphs": {
|
|
87
|
-
"types": "./
|
|
88
|
-
"
|
|
77
|
+
"types": "./dist/graphs/index.d.ts",
|
|
78
|
+
"import": "./dist/graphs/index.js",
|
|
79
|
+
"default": "./dist/graphs/index.js"
|
|
89
80
|
},
|
|
90
81
|
"./recipes": {
|
|
91
|
-
"types": "./
|
|
92
|
-
"
|
|
82
|
+
"types": "./dist/recipes/index.d.ts",
|
|
83
|
+
"import": "./dist/recipes/index.js",
|
|
84
|
+
"default": "./dist/recipes/index.js"
|
|
93
85
|
},
|
|
94
86
|
"./icons": {
|
|
95
|
-
"types": "./
|
|
96
|
-
"
|
|
87
|
+
"types": "./dist/icons/index.d.ts",
|
|
88
|
+
"import": "./dist/icons/index.js",
|
|
89
|
+
"default": "./dist/icons/index.js"
|
|
97
90
|
},
|
|
98
91
|
"./utilities": {
|
|
99
|
-
"types": "./
|
|
100
|
-
"
|
|
92
|
+
"types": "./dist/utilities/index.d.ts",
|
|
93
|
+
"import": "./dist/utilities/index.js",
|
|
94
|
+
"default": "./dist/utilities/index.js"
|
|
101
95
|
},
|
|
102
96
|
"./testing": {
|
|
103
|
-
"types": "./
|
|
104
|
-
"
|
|
97
|
+
"types": "./dist/testing/index.d.ts",
|
|
98
|
+
"import": "./dist/testing/index.js",
|
|
99
|
+
"default": "./dist/testing/index.js"
|
|
105
100
|
},
|
|
106
101
|
"./tokens": {
|
|
107
|
-
"types": "./
|
|
108
|
-
"
|
|
102
|
+
"types": "./dist/tokens/index.d.ts",
|
|
103
|
+
"import": "./dist/tokens/index.js",
|
|
104
|
+
"default": "./dist/tokens/index.js"
|
|
109
105
|
}
|
|
110
106
|
},
|
|
111
107
|
"scripts": {
|
|
108
|
+
"build": "node scripts/build-package.mjs",
|
|
112
109
|
"build-storybook": "storybook build --loglevel warn",
|
|
110
|
+
"check:installed-consumer": "node scripts/verify-installed-consumer.mjs",
|
|
111
|
+
"check:pack": "node scripts/verify-package-pack.mjs",
|
|
113
112
|
"check:package-boundary": "node scripts/check-package-boundary.mjs",
|
|
114
113
|
"check:package-dependency-direction": "node scripts/check-package-dependency-direction.mjs",
|
|
114
|
+
"prepack": "bun run build",
|
|
115
115
|
"storybook": "storybook dev -p 6017",
|
|
116
116
|
"test": "bun run test:unit && bun run check:package-boundary && bun run check:package-dependency-direction",
|
|
117
|
+
"test:build": "bun run build && vitest run --config vitest.build.config.ts",
|
|
117
118
|
"test:unit": "vitest run --config vitest.config.ts",
|
|
118
119
|
"typecheck": "tsc -b --noEmit --pretty false",
|
|
119
|
-
"verify": "bun run typecheck && bun run test:unit && bun run build-storybook && bun run check:package-boundary && bun run check:package-dependency-direction",
|
|
120
|
+
"verify": "bun run build && bun run typecheck && bun run test:unit && bun run build-storybook && bun run check:package-boundary && bun run check:package-dependency-direction && bun run check:pack && bun run check:installed-consumer",
|
|
120
121
|
"verify:form-field-storybook-browser": "node scripts/verify-package-form-field-storybook-browser.mjs",
|
|
121
122
|
"verify:graph-storybook-viewport-browser": "node scripts/verify-graph-storybook-viewport-browser.mjs",
|
|
122
123
|
"verify:storybook-browser": "node scripts/verify-package-storybook-browser.mjs",
|
|
@@ -131,6 +132,8 @@
|
|
|
131
132
|
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
132
133
|
"@radix-ui/react-select": "^2.3.0",
|
|
133
134
|
"@radix-ui/react-slot": "^1.2.3",
|
|
135
|
+
"@testing-library/react": "^16.3.0",
|
|
136
|
+
"@testing-library/user-event": "^14.6.1",
|
|
134
137
|
"@xyflow/react": "^12.10.2",
|
|
135
138
|
"recharts": "^3.8.1"
|
|
136
139
|
},
|
|
@@ -144,8 +147,6 @@
|
|
|
144
147
|
"@tailwindcss/vite": "^4.2.2",
|
|
145
148
|
"@vitejs/plugin-react-swc": "^4.1.0",
|
|
146
149
|
"@testing-library/jest-dom": "^6.9.1",
|
|
147
|
-
"@testing-library/react": "^16.3.0",
|
|
148
|
-
"@testing-library/user-event": "^14.6.1",
|
|
149
150
|
"@types/react": "^19.2.2",
|
|
150
151
|
"@types/react-dom": "^19.2.2",
|
|
151
152
|
"happy-dom": "^20.9.0",
|
package/docs/README.md
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# Component package documentation
|
|
2
|
-
|
|
3
|
-
Per-component usage notes, props tables, and examples belong in this
|
|
4
|
-
directory. Add one markdown file per component (or small component group) as
|
|
5
|
-
those surfaces are documented.
|
|
6
|
-
|
|
7
|
-
## What belongs here
|
|
8
|
-
|
|
9
|
-
- Import paths and category entrypoints for a component
|
|
10
|
-
- Props, variants, and accessibility notes
|
|
11
|
-
- Short usage examples that do not depend on dashboard routes or API clients
|
|
12
|
-
|
|
13
|
-
## What does not belong here
|
|
14
|
-
|
|
15
|
-
- Dashboard-only wiring, data fetching, or business workflow guides
|
|
16
|
-
- Generated docs registries, docs-site routes, or build-time documentation
|
|
17
|
-
tooling
|
|
18
|
-
|
|
19
|
-
This docs shell is plain markdown kept under version control. Host applications
|
|
20
|
-
read it directly from the package; no docs-site implementation is required.
|
|
21
|
-
|
|
22
|
-
## Documented components
|
|
23
|
-
|
|
24
|
-
- [Button primitives](./button.md) — `Button`, `ButtonLink`, `IconButtonShell`,
|
|
25
|
-
semantic variants, loading behavior, and icon-only accessibility labels.
|
|
26
|
-
- [Typography roles](./typography-roles.md) — `Text`, `Heading`, `Label`,
|
|
27
|
-
`Code`, dense text, truncation, and wrapping
|
|
28
|
-
- [Layout and display primitives](./layout-display-primitives.md) —
|
|
29
|
-
`SurfacePanel`, `ActionRow`, `DescriptionList`, and responsive layout guidance
|
|
30
|
-
- [Form select primitives](./forms-select-primitives.md) — `Select`,
|
|
31
|
-
`NativeSelect`, `EnumSelect`, keyboard behavior, and option contracts
|
|
32
|
-
- [Form field structure and messaging](./forms-form-field.md) — `FormField`,
|
|
33
|
-
labels, descriptions, helper text, warnings, errors, success messages,
|
|
34
|
-
grouped-control semantics, and host validation responsibilities
|
|
35
|
-
- [Overlay and disclosure primitives](./overlays.md) — Dialog, Popover,
|
|
36
|
-
Collapsible, and ScrollArea accessibility, labeling, focus, and overflow
|
|
37
|
-
guidance.
|
|
38
|
-
|
|
39
|
-
## Getting started
|
|
40
|
-
|
|
41
|
-
See the package [README](../README.md) for install, CSS import setup, theming,
|
|
42
|
-
and consumer dependency boundaries. Link new component docs from that README or
|
|
43
|
-
from sibling files in this directory as the library grows.
|
|
44
|
-
|
|
45
|
-
## Component guides
|
|
46
|
-
|
|
47
|
-
- [Charts](./charts.md) — `ChartContainer`, tooltip and legend content, state
|
|
48
|
-
panels, config types, and host-owned data boundaries
|
|
49
|
-
|
|
50
|
-
## Form input primitives
|
|
51
|
-
|
|
52
|
-
- [Form input primitives](./forms-input-primitives.md) — import paths, controlled
|
|
53
|
-
versus uncontrolled usage, host accessibility responsibilities, and
|
|
54
|
-
presentation-only boundaries for text input, textarea, checkbox, and file input.
|
|
55
|
-
- [Form field structure and messaging](./forms-form-field.md) — `FormField`,
|
|
56
|
-
labels, descriptions, helper text, warnings, errors, success messages,
|
|
57
|
-
grouped-control semantics, `buildFormFieldAriaDescribedBy`, and host validation
|
|
58
|
-
responsibilities.
|
|
59
|
-
|
|
60
|
-
## Feedback and code display
|
|
61
|
-
|
|
62
|
-
- [AlertPanel](./feedback-alert-panel.md) — semantic feedback variants, token
|
|
63
|
-
mapping, accessibility, and Storybook references
|
|
64
|
-
- [Skeleton](./feedback-skeleton.md) — loading placeholders, busy regions, and
|
|
65
|
-
empty vs loading feedback
|
|
66
|
-
- [CodePanel](./data-display-code-panel.md) — long-line and long-block
|
|
67
|
-
containment, scrolling, and responsive layout expectations
|
|
68
|
-
|
|
69
|
-
## Table data display
|
|
70
|
-
|
|
71
|
-
- [Table primitives and DataTable](./table-data-table.md) — generic row contract,
|
|
72
|
-
explicit data states, density and responsive layout helpers, accessibility,
|
|
73
|
-
and Storybook references for domain-free tabular data display.
|
|
74
|
-
|
|
75
|
-
## Widget layout recipes
|
|
76
|
-
|
|
77
|
-
- [Graph primitives](./graphs.md) — `@you-agent-factory/components/graphs`
|
|
78
|
-
contracts, React Flow boundary, host responsibilities, and Storybook example
|
|
79
|
-
map
|
|
80
|
-
- [Widget frame and layout recipes](./widget-frame-recipes.md) — import paths,
|
|
81
|
-
state ownership, accessibility, Storybook references, and source-copy guidance
|
|
82
|
-
for domain-free framed panels.
|
|
83
|
-
|
package/docs/button.md
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
# Button primitives
|
|
2
|
-
|
|
3
|
-
`Button`, `ButtonLink`, and `IconButtonShell` are the reusable action primitives in
|
|
4
|
-
`@you-agent-factory/components`. They provide semantic tones, loading behavior,
|
|
5
|
-
icon-only sizing, and shared focus-visible treatment without dashboard routes,
|
|
6
|
-
providers, API clients, or generated OpenAPI types.
|
|
7
|
-
|
|
8
|
-
## Import paths
|
|
9
|
-
|
|
10
|
-
```ts
|
|
11
|
-
import {
|
|
12
|
-
Button,
|
|
13
|
-
ButtonLink,
|
|
14
|
-
IconButtonShell,
|
|
15
|
-
buttonVariants,
|
|
16
|
-
type ButtonProps,
|
|
17
|
-
type ButtonLinkProps,
|
|
18
|
-
type IconButtonShellProps,
|
|
19
|
-
} from "@you-agent-factory/components";
|
|
20
|
-
|
|
21
|
-
import {
|
|
22
|
-
Button as PrimitiveButton,
|
|
23
|
-
ButtonLink as PrimitiveButtonLink,
|
|
24
|
-
IconButtonShell as PrimitiveIconButtonShell,
|
|
25
|
-
} from "@you-agent-factory/components/primitives";
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Import `@you-agent-factory/components/styles.css` once in the host application
|
|
29
|
-
before rendering buttons. See the package [README](../README.md) for CSS setup.
|
|
30
|
-
|
|
31
|
-
## Button vs ButtonLink
|
|
32
|
-
|
|
33
|
-
| Primitive | Renders | Use when |
|
|
34
|
-
| --- | --- | --- |
|
|
35
|
-
| `Button` | `<button>` (or child via `asChild`) | The action stays on the current view: submit forms, open dialogs, trigger async work, or run in-place commands. |
|
|
36
|
-
| `ButtonLink` | `<a>` styled with shared button tokens | Navigation should use a real link: route changes, external URLs, or downloads where anchor semantics and `href` behavior are required. |
|
|
37
|
-
|
|
38
|
-
`ButtonLink` does not support `loading` because anchor elements do not expose the
|
|
39
|
-
same busy/disabled interaction model as buttons. Show progress elsewhere when a
|
|
40
|
-
navigation target is not yet ready.
|
|
41
|
-
|
|
42
|
-
`Button` supports `asChild` for composition, but prefer `ButtonLink` when the
|
|
43
|
-
rendered element must be an anchor.
|
|
44
|
-
|
|
45
|
-
## Semantic button variants
|
|
46
|
-
|
|
47
|
-
Set `tone` on `Button` and `ButtonLink`, or on `IconButtonShell` for toolbar
|
|
48
|
-
actions. Variants map to semantic roles rather than dashboard feature styling.
|
|
49
|
-
|
|
50
|
-
| `tone` | Role | When to use |
|
|
51
|
-
| --- | --- | --- |
|
|
52
|
-
| `default` | Primary | The single most important action in a section or dialog footer. |
|
|
53
|
-
| `secondary` | Secondary | Supporting actions that still need button emphasis, such as "Save draft". |
|
|
54
|
-
| `outline` | Outline | Neutral actions on busy surfaces or paired secondary controls in toolbars. |
|
|
55
|
-
| `ghost` | Ghost | Low-emphasis actions on dense panels where borders would add noise. |
|
|
56
|
-
| `destructive` | Destructive | Irreversible or high-risk operations such as delete or remove. Keep the label specific; do not rely on color alone. |
|
|
57
|
-
| `warning` | Warning | Actions that need caution but are not strictly destructive, such as "Review warnings". |
|
|
58
|
-
|
|
59
|
-
`IconButtonShell` also supports `tone="dangerGhost"` for compact destructive icon
|
|
60
|
-
actions. It keeps icon-button sizing while applying destructive hover treatment.
|
|
61
|
-
|
|
62
|
-
### Sizes
|
|
63
|
-
|
|
64
|
-
`Button` and `ButtonLink` accept `size` values such as `default`, `sm`, `lg`,
|
|
65
|
-
`pill`, `icon`, and `iconPill`. `IconButtonShell` fixes toolbar-friendly
|
|
66
|
-
`h-10 w-10` icon sizing and should be used for compact icon-only controls.
|
|
67
|
-
|
|
68
|
-
## Loading buttons
|
|
69
|
-
|
|
70
|
-
Pass `loading` to `Button` (including `IconButtonShell`) when an action is in
|
|
71
|
-
progress:
|
|
72
|
-
|
|
73
|
-
- Sets `aria-busy="true"` and disables the control to prevent duplicate activation.
|
|
74
|
-
- Preserves the accessible name from visible text or `aria-label`.
|
|
75
|
-
- Renders a centered spinner overlay while keeping label content in the accessibility tree.
|
|
76
|
-
|
|
77
|
-
Do not attach separate click handlers that ignore the disabled state while
|
|
78
|
-
`loading` is true.
|
|
79
|
-
|
|
80
|
-
## Icon-only accessibility
|
|
81
|
-
|
|
82
|
-
Icon-only buttons must expose a clear accessible name:
|
|
83
|
-
|
|
84
|
-
- Prefer visible text when space allows.
|
|
85
|
-
- Otherwise provide `aria-label` with a specific action name such as
|
|
86
|
-
`"Refresh jobs"` or `"Export dashboard"`.
|
|
87
|
-
- Mark decorative icons with `aria-hidden="true"` so screen readers use the
|
|
88
|
-
button label only.
|
|
89
|
-
|
|
90
|
-
`IconButtonShell` inherits the `h-11 w-11` / toolbar touch target from the
|
|
91
|
-
shared button size tokens. Avoid shrinking icon-only controls below the package
|
|
92
|
-
defaults unless the host design system documents an exception.
|
|
93
|
-
|
|
94
|
-
## Host application responsibilities
|
|
95
|
-
|
|
96
|
-
The component package owns presentation: markup, semantic tones, focus rings,
|
|
97
|
-
loading overlays, and token-backed styling.
|
|
98
|
-
|
|
99
|
-
Host applications own:
|
|
100
|
-
|
|
101
|
-
- **Action copy** — button labels, `aria-label` text, and confirmation messaging.
|
|
102
|
-
- **Click handlers** — business logic, validation, and error handling.
|
|
103
|
-
- **Routing** — `href` values, client-side navigation, and download targets for `ButtonLink`.
|
|
104
|
-
- **Domain workflows** — when an action is enabled, loading, or destructive in product context.
|
|
105
|
-
|
|
106
|
-
Pass data and callbacks into button primitives as props. Do not expect the
|
|
107
|
-
package to read app stores, routers, or API layers.
|
|
108
|
-
|
|
109
|
-
## Storybook examples
|
|
110
|
-
|
|
111
|
-
Package Storybook stories demonstrate expected states with package imports only:
|
|
112
|
-
|
|
113
|
-
- `Primitives/Button/Semantic variants` — normal, disabled, destructive, warning,
|
|
114
|
-
and link-like examples.
|
|
115
|
-
- `Primitives/Button/Loading and icon only` — loading, focus-visible, icon-only,
|
|
116
|
-
and destructive icon shell examples.
|
|
117
|
-
|
|
118
|
-
Run `bun run storybook` from `ui/packages/components` or inspect the static
|
|
119
|
-
build with `bun run build-storybook`.
|