@eleventheye/asui 2.13.3 → 2.14.1
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/.github/workflows/publish.yml +3 -5
- package/AGENTS.md +125 -0
- package/CHANGELOG.md +17 -0
- package/dist/apptypes/ASUI.types.d.ts +5 -0
- package/dist/apptypes/ASUI.types.d.ts.map +1 -1
- package/dist/asbutton/styles.d.ts +13 -6
- package/dist/asbutton/styles.d.ts.map +1 -1
- package/dist/aschart/donut/styles.d.ts +14 -14
- package/dist/aschart/donut/styles.d.ts.map +1 -1
- package/dist/aschart/hbar/styles.d.ts +7 -7
- package/dist/aschart/hbar/styles.d.ts.map +1 -1
- package/dist/aschart/vbar/ASChartVBar.types.d.ts +1 -1
- package/dist/aschart/vbar/ASChartVBar.types.d.ts.map +1 -1
- package/dist/aschart/vbar/styles.d.ts +7 -7
- package/dist/aschart/vbar/styles.d.ts.map +1 -1
- package/dist/asdropdown/styles.d.ts +13 -7
- package/dist/asdropdown/styles.d.ts.map +1 -1
- package/dist/asiconbutton/styles.d.ts +8 -3
- package/dist/asiconbutton/styles.d.ts.map +1 -1
- package/dist/asloader/styles.d.ts +30 -14
- package/dist/asloader/styles.d.ts.map +1 -1
- package/dist/asmodal/styles.d.ts +5 -3
- package/dist/asmodal/styles.d.ts.map +1 -1
- package/dist/asnavbar/desktop/styles.d.ts +6 -6
- package/dist/asnavbar/desktop/styles.d.ts.map +1 -1
- package/dist/asnavbar/mobile/styles.d.ts +4 -4
- package/dist/asnavbar/mobile/styles.d.ts.map +1 -1
- package/dist/asnavbar/navbararrowbuttons/styles.d.ts +29 -5
- package/dist/asnavbar/navbararrowbuttons/styles.d.ts.map +1 -1
- package/dist/asnavbar/navbaritem/styles.d.ts +4 -2
- package/dist/asnavbar/navbaritem/styles.d.ts.map +1 -1
- package/dist/asnavbar/navbarpickpanel/styles.d.ts +1 -1
- package/dist/asnavbar/navbarpickpanel/styles.d.ts.map +1 -1
- package/dist/asnavbar/navbarpickpanelitem/styles.d.ts +4 -2
- package/dist/asnavbar/navbarpickpanelitem/styles.d.ts.map +1 -1
- package/dist/asnavbar/styles.d.ts +2 -2
- package/dist/asnavbar/styles.d.ts.map +1 -1
- package/dist/astappable/ASTappable.d.ts.map +1 -1
- package/dist/astappable/ASTappable.js +1 -1
- package/dist/astextfield/ASTextField.d.ts.map +1 -1
- package/dist/astextfield/ASTextField.js +34 -61
- package/dist/astextfield/ASTextField.types.d.ts +2 -1
- package/dist/astextfield/ASTextField.types.d.ts.map +1 -1
- package/dist/astextfield/styles.d.ts +24 -12
- package/dist/astextfield/styles.d.ts.map +1 -1
- package/dist/astextfield/styles.js +1 -1
- package/dist/astheme/ASThemeDefault.d.ts.map +1 -1
- package/dist/astheme/ASThemeDefault.js +1 -0
- package/dist/icons/styles.d.ts +7 -5
- package/dist/icons/styles.d.ts.map +1 -1
- package/docs/commit-syntax.md +143 -0
- package/docs/theme-update-strategy.md +101 -0
- package/package.json +16 -16
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Commit Syntax
|
|
2
|
+
|
|
3
|
+
This repo uses `standard-version` for release commits, version tags, and changelog generation.
|
|
4
|
+
|
|
5
|
+
For useful release notes, commit messages should follow Conventional Commits while still keeping the GitHub issue/ticket number near the front.
|
|
6
|
+
|
|
7
|
+
## Recommended Format
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
<type>: #<ticket> <short summary>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Examples:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
feat: #123 add ASTextField theme override helper
|
|
17
|
+
fix: #124 correct ASNavBar large button spacing
|
|
18
|
+
docs: #125 document release process
|
|
19
|
+
chore: #126 update dependencies
|
|
20
|
+
refactor: #127 simplify ASTextField value ownership
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
This format is parser-friendly for `standard-version` and still keeps the ticket number easy to scan.
|
|
24
|
+
|
|
25
|
+
## Common Types
|
|
26
|
+
|
|
27
|
+
- `feat`: user-facing feature or new capability
|
|
28
|
+
- `fix`: bug fix
|
|
29
|
+
- `docs`: documentation-only change
|
|
30
|
+
- `chore`: maintenance, dependency updates, release plumbing
|
|
31
|
+
- `refactor`: code structure change without intended behavior change
|
|
32
|
+
- `test`: test-only change
|
|
33
|
+
- `style`: formatting-only change
|
|
34
|
+
- `perf`: performance improvement
|
|
35
|
+
- `build`: build system or packaging change
|
|
36
|
+
- `ci`: GitHub Actions or CI change
|
|
37
|
+
|
|
38
|
+
## Version Bump Behavior
|
|
39
|
+
|
|
40
|
+
`standard-version` looks at commits since the last tag and infers the next version:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
fix: ... -> patch bump
|
|
44
|
+
feat: ... -> minor bump
|
|
45
|
+
BREAKING CHANGE or ! -> major bump
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Examples from `2.13.4`:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
fix: #128 correct ASTextField clear button behavior
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
would normally produce:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
2.13.5
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
feat: #128 add theme override helper
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
would normally produce:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
2.14.0
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
feat!: #128 replace textfield theme API
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
would normally produce:
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
3.0.0
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Breaking Changes
|
|
81
|
+
|
|
82
|
+
Use `!` after the type/scope:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
feat!: #128 replace textfield theme API
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Or include a footer:
|
|
89
|
+
|
|
90
|
+
```text
|
|
91
|
+
feat: #128 replace textfield theme API
|
|
92
|
+
|
|
93
|
+
BREAKING CHANGE: textfield theme keys were renamed.
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Manual Version Control
|
|
97
|
+
|
|
98
|
+
The inferred version can be overridden:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npm run release -- --release-as patch
|
|
102
|
+
npm run release -- --release-as minor
|
|
103
|
+
npm run release -- --release-as major
|
|
104
|
+
npm run release -- --release-as 2.14.3
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Release Flow
|
|
108
|
+
|
|
109
|
+
Run releases from a clean, up-to-date `main` branch after feature work has been merged.
|
|
110
|
+
|
|
111
|
+
The intended release flow is:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npm run release
|
|
115
|
+
git push --follow-tags origin main
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`npm run release` runs `standard-version`, which:
|
|
119
|
+
|
|
120
|
+
1. reads commits since the last tag
|
|
121
|
+
2. updates `package.json`
|
|
122
|
+
3. updates `package-lock.json`
|
|
123
|
+
4. updates `CHANGELOG.md`
|
|
124
|
+
5. creates a release commit
|
|
125
|
+
6. creates a version tag such as `v2.13.5`
|
|
126
|
+
|
|
127
|
+
Pushing the tag triggers the publish workflow.
|
|
128
|
+
|
|
129
|
+
## Avoid
|
|
130
|
+
|
|
131
|
+
Avoid ticket-first messages when you want automatic changelog generation:
|
|
132
|
+
|
|
133
|
+
```text
|
|
134
|
+
#123 Added ASTextField theme override helper
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
This is readable for humans, but `standard-version` will not classify it as a feature or fix.
|
|
138
|
+
|
|
139
|
+
Prefer:
|
|
140
|
+
|
|
141
|
+
```text
|
|
142
|
+
feat: #123 add ASTextField theme override helper
|
|
143
|
+
```
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Theme Update Strategy
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Keep the published UI components easy to reuse in projects that do not share the original ASUI yellow visual language.
|
|
6
|
+
|
|
7
|
+
The theme should describe semantic design slots instead of locking components to one implementation style. A default ASUI theme can still be expressive and yellow-forward, but consumers should be able to replace it with a flat, dark, light, outlined, or product-specific style without fighting the component internals.
|
|
8
|
+
|
|
9
|
+
## Guiding Principles
|
|
10
|
+
|
|
11
|
+
- Theme semantic roles, not one visual implementation.
|
|
12
|
+
- Avoid exposing every CSS property as a public prop.
|
|
13
|
+
- Use theme slots for common branding and component states.
|
|
14
|
+
- Keep `className` and `style` as escape hatches for one-off layout or visual tweaks.
|
|
15
|
+
- Prefer component-level theme objects that can be partially overridden.
|
|
16
|
+
- Do not make Storybook/local-demo styling drive the production component API.
|
|
17
|
+
|
|
18
|
+
## ASTextField Direction
|
|
19
|
+
|
|
20
|
+
`ASTextField` currently supports theming, but parts of the theme are still tied to the original gradient/yellow implementation. Keys such as `bgColorTop`, `bgColorBottom`, `inputBgTop`, and `inputBgBottom` imply that every text field background must be a two-stop gradient.
|
|
21
|
+
|
|
22
|
+
Move this toward semantic slots that accept complete CSS values:
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
textfield: {
|
|
26
|
+
containerBackground: string;
|
|
27
|
+
containerBorderColor: string;
|
|
28
|
+
containerBorderRadius: string;
|
|
29
|
+
containerColor: string;
|
|
30
|
+
|
|
31
|
+
inputBackground: string;
|
|
32
|
+
inputBorderColor: string;
|
|
33
|
+
inputBorderRadius: string;
|
|
34
|
+
inputColor: string;
|
|
35
|
+
inputPlaceholderColor: string;
|
|
36
|
+
|
|
37
|
+
inputFocusBackground: string;
|
|
38
|
+
inputFocusBorderColor: string;
|
|
39
|
+
inputFocusColor: string;
|
|
40
|
+
inputFocusShadow: string;
|
|
41
|
+
|
|
42
|
+
iconColor: string;
|
|
43
|
+
iconHoverColor: string;
|
|
44
|
+
|
|
45
|
+
autofillBackground: string;
|
|
46
|
+
autofillColor: string;
|
|
47
|
+
autofillBorderColor: string;
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The default theme can still provide gradients:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
containerBackground: `linear-gradient(to bottom, ${colors.yellow30} 5%, ${colors.mainYellow} 100%)`;
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
A consuming project should be able to replace it with a flat value:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
containerBackground: '#ffffff';
|
|
61
|
+
inputBackground: '#ffffff';
|
|
62
|
+
inputFocusShadow: '0 0 0 3px rgb(59 130 246 / 25%)';
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Specific Cleanup Items
|
|
66
|
+
|
|
67
|
+
- Replace hardcoded icon colors in `ASTextField.tsx` with theme values.
|
|
68
|
+
- Rename gradient-specific theme keys to semantic background/border/color slots.
|
|
69
|
+
- Consider theme slots for common layout values that affect portability:
|
|
70
|
+
- `minWidth`
|
|
71
|
+
- `containerPaddingInline`
|
|
72
|
+
- `inputBorderRadius`
|
|
73
|
+
- `transition`
|
|
74
|
+
- size-specific heights
|
|
75
|
+
- size-specific input font sizes
|
|
76
|
+
- Keep advanced or rare customizations outside the public theme surface unless multiple real components need them.
|
|
77
|
+
|
|
78
|
+
## Theme Override API
|
|
79
|
+
|
|
80
|
+
Longer term, prefer a helper that deep-merges partial theme overrides with `ASThemeDefault`:
|
|
81
|
+
|
|
82
|
+
```ts
|
|
83
|
+
const theme = createASTheme({
|
|
84
|
+
textfield: {
|
|
85
|
+
containerBackground: '#fff',
|
|
86
|
+
containerBorderColor: '#d0d5dd',
|
|
87
|
+
iconColor: '#667085',
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
This lets consumers update only the slots they care about while keeping the rest of the component library styled consistently.
|
|
93
|
+
|
|
94
|
+
## Migration Approach
|
|
95
|
+
|
|
96
|
+
1. Start with one component at a time, beginning with `ASTextField`.
|
|
97
|
+
2. Add semantic theme slots while temporarily preserving old keys if needed.
|
|
98
|
+
3. Update component styles to read from the new slots.
|
|
99
|
+
4. Move hardcoded visual values into the theme.
|
|
100
|
+
5. Verify the default ASUI theme still renders the current look.
|
|
101
|
+
6. Add at least one alternate Storybook theme example to prove the component can leave the yellow theme cleanly.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eleventheye/asui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "AS UI React Library by eleventheye (another one!)",
|
|
6
6
|
"keywords": [
|
|
@@ -59,24 +59,24 @@
|
|
|
59
59
|
"build-storybook": "storybook build"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@storybook/addon-docs": "^10.
|
|
63
|
-
"@storybook/addon-onboarding": "^10.
|
|
64
|
-
"@storybook/addon-webpack5-compiler-swc": "^4.0.
|
|
65
|
-
"@storybook/react-webpack5": "^10.
|
|
62
|
+
"@storybook/addon-docs": "^10.3.6",
|
|
63
|
+
"@storybook/addon-onboarding": "^10.3.6",
|
|
64
|
+
"@storybook/addon-webpack5-compiler-swc": "^4.0.3",
|
|
65
|
+
"@storybook/react-webpack5": "^10.3.6",
|
|
66
66
|
"@svgr/webpack": "^8.1.0",
|
|
67
|
-
"@types/react": "^19.
|
|
68
|
-
"@types/react-dom": "^19.
|
|
69
|
-
"@types/styled-components": "^5.1.
|
|
70
|
-
"npmignore": "^0.3.
|
|
67
|
+
"@types/react": "^19.2.14",
|
|
68
|
+
"@types/react-dom": "^19.2.3",
|
|
69
|
+
"@types/styled-components": "^5.1.36",
|
|
70
|
+
"npmignore": "^0.3.5",
|
|
71
71
|
"standard-version": "^9.5.0",
|
|
72
|
-
"storybook": "^10.
|
|
73
|
-
"typescript": "^
|
|
72
|
+
"storybook": "^10.3.6",
|
|
73
|
+
"typescript": "^6.0.3"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"react": "^19.
|
|
77
|
-
"react-dom": "^19.
|
|
78
|
-
"rimraf": "^6.
|
|
79
|
-
"styled-components": "^6.1
|
|
80
|
-
"uuid": "
|
|
76
|
+
"react": "^19.2.5",
|
|
77
|
+
"react-dom": "^19.2.5",
|
|
78
|
+
"rimraf": "^6.1.3",
|
|
79
|
+
"styled-components": "^6.4.1",
|
|
80
|
+
"uuid": "14.0.0"
|
|
81
81
|
}
|
|
82
82
|
}
|