@codenhub/styles 0.6.0 → 0.8.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 (151) hide show
  1. package/NOTICE +18 -16
  2. package/README.es.md +62 -0
  3. package/README.md +28 -22
  4. package/README.pt-BR.md +62 -0
  5. package/dist/aesthetics/chunky-tile.css +1 -1
  6. package/dist/aesthetics/cyber.css +1 -1
  7. package/dist/aesthetics/glass.css +1 -1
  8. package/dist/aesthetics/index.css +2 -2
  9. package/dist/aesthetics/neobrutalism.css +1 -1
  10. package/dist/aesthetics/pixel.css +1 -1
  11. package/dist/aesthetics/sketch.css +1 -1
  12. package/dist/cli.js +189 -0
  13. package/dist/components.css +2 -2
  14. package/dist/index.css +2 -2
  15. package/dist/index.d.ts +1 -0
  16. package/dist/native.css +2 -2
  17. package/dist/palette.css +1 -1
  18. package/dist/theme.css +2 -2
  19. package/docs/accessibility.md +108 -60
  20. package/docs/changelog/0.1.1.md +1 -0
  21. package/docs/changelog/0.2.0.md +1 -0
  22. package/docs/changelog/0.3.0.md +1 -0
  23. package/docs/changelog/0.4.0.md +1 -0
  24. package/docs/changelog/0.5.0.md +8 -3
  25. package/docs/changelog/0.6.0.md +2 -1
  26. package/docs/changelog/0.7.0.md +50 -0
  27. package/docs/changelog/0.8.0.md +70 -0
  28. package/docs/changelog/index.md +2 -0
  29. package/docs/concepts.md +188 -46
  30. package/docs/es/accessibility.md +169 -0
  31. package/docs/es/concepts.md +212 -0
  32. package/docs/es/index.md +105 -0
  33. package/docs/es/integrating/astro.md +35 -0
  34. package/docs/es/integrating/index.md +75 -0
  35. package/docs/es/integrating/nextjs.md +67 -0
  36. package/docs/es/integrating/svelte.md +45 -0
  37. package/docs/es/integrating/tailwind.md +148 -0
  38. package/docs/es/integrating/vue.md +31 -0
  39. package/docs/es/integrating/without-a-bundler.md +238 -0
  40. package/docs/es/setup.md +188 -0
  41. package/docs/es/usage/aesthetics.md +282 -0
  42. package/docs/es/usage/buttons.md +135 -0
  43. package/docs/es/usage/composing.md +168 -0
  44. package/docs/es/usage/content-and-layout.md +219 -0
  45. package/docs/es/usage/customizing.md +304 -0
  46. package/docs/es/usage/feedback.md +157 -0
  47. package/docs/es/usage/forms.md +256 -0
  48. package/docs/es/usage/index.md +33 -0
  49. package/docs/es/usage/presets.md +92 -0
  50. package/docs/es/usage/solo.md +86 -0
  51. package/docs/es/usage/theming.md +309 -0
  52. package/docs/es/usage/tooltips.md +127 -0
  53. package/docs/index.md +86 -26
  54. package/docs/integrating/astro.md +3 -4
  55. package/docs/integrating/index.md +46 -13
  56. package/docs/integrating/nextjs.md +3 -4
  57. package/docs/integrating/svelte.md +5 -4
  58. package/docs/integrating/tailwind.md +89 -6
  59. package/docs/integrating/vue.md +3 -4
  60. package/docs/integrating/without-a-bundler.md +237 -0
  61. package/docs/pt-BR/accessibility.md +169 -0
  62. package/docs/pt-BR/concepts.md +212 -0
  63. package/docs/pt-BR/index.md +105 -0
  64. package/docs/pt-BR/integrating/astro.md +35 -0
  65. package/docs/pt-BR/integrating/index.md +75 -0
  66. package/docs/pt-BR/integrating/nextjs.md +67 -0
  67. package/docs/pt-BR/integrating/svelte.md +45 -0
  68. package/docs/pt-BR/integrating/tailwind.md +148 -0
  69. package/docs/pt-BR/integrating/vue.md +31 -0
  70. package/docs/pt-BR/integrating/without-a-bundler.md +238 -0
  71. package/docs/pt-BR/setup.md +188 -0
  72. package/docs/pt-BR/usage/aesthetics.md +282 -0
  73. package/docs/pt-BR/usage/buttons.md +135 -0
  74. package/docs/pt-BR/usage/composing.md +168 -0
  75. package/docs/pt-BR/usage/content-and-layout.md +219 -0
  76. package/docs/pt-BR/usage/customizing.md +304 -0
  77. package/docs/pt-BR/usage/feedback.md +157 -0
  78. package/docs/pt-BR/usage/forms.md +256 -0
  79. package/docs/pt-BR/usage/index.md +33 -0
  80. package/docs/pt-BR/usage/presets.md +92 -0
  81. package/docs/pt-BR/usage/solo.md +86 -0
  82. package/docs/pt-BR/usage/theming.md +309 -0
  83. package/docs/pt-BR/usage/tooltips.md +127 -0
  84. package/docs/setup.md +142 -91
  85. package/docs/usage/aesthetics.md +89 -73
  86. package/docs/usage/buttons.md +112 -40
  87. package/docs/usage/composing.md +109 -92
  88. package/docs/usage/content-and-layout.md +160 -125
  89. package/docs/usage/customizing.md +117 -41
  90. package/docs/usage/feedback.md +138 -71
  91. package/docs/usage/forms.md +201 -107
  92. package/docs/usage/index.md +22 -14
  93. package/docs/usage/presets.md +91 -0
  94. package/docs/usage/solo.md +85 -0
  95. package/docs/usage/theming.md +273 -118
  96. package/docs/usage/tooltips.md +90 -49
  97. package/llms-full.txt +2820 -1298
  98. package/llms.txt +24 -22
  99. package/package.json +134 -91
  100. package/{dist/tw → tw}/aesthetics/chunky-tile.css +107 -29
  101. package/{dist/tw → tw}/aesthetics/cyber.css +88 -40
  102. package/{dist/tw → tw}/aesthetics/glass.css +257 -61
  103. package/{dist/tw → tw}/aesthetics/neobrutalism.css +113 -20
  104. package/{dist/tw → tw}/aesthetics/pixel.css +93 -8
  105. package/tw/aesthetics/sketch.css +417 -0
  106. package/{dist/tw → tw}/box.css +105 -9
  107. package/tw/components/button.css +11 -0
  108. package/tw/components/button.rules.css +187 -0
  109. package/tw/components/feedback.css +11 -0
  110. package/{dist/tw/components/feedback.css → tw/components/feedback.rules.css} +136 -32
  111. package/tw/components/form.css +11 -0
  112. package/{dist/tw/components/form.css → tw/components/form.rules.css} +577 -125
  113. package/tw/components/index.css +16 -0
  114. package/tw/components/rules.css +41 -0
  115. package/tw/components/surface.css +11 -0
  116. package/tw/components/surface.rules.css +222 -0
  117. package/tw/components/tooltip.css +11 -0
  118. package/{dist/tw/components/tooltip.css → tw/components/tooltip.rules.css} +43 -27
  119. package/{dist/tw → tw}/corner.css +18 -12
  120. package/{dist/tw → tw}/elevation.css +23 -17
  121. package/{dist/tw → tw}/index.css +12 -10
  122. package/tw/index.d.ts +1 -0
  123. package/tw/intent.css +312 -0
  124. package/tw/modifiers.css +127 -0
  125. package/tw/native.css +320 -0
  126. package/tw/presentation.css +139 -0
  127. package/tw/reset.css +10 -0
  128. package/{dist/tw/reset.css → tw/reset.rules.css} +21 -22
  129. package/tw/size.css +34 -0
  130. package/tw/surface.css +9 -0
  131. package/tw/surface.rules.css +212 -0
  132. package/{dist/tw → tw}/theme.css +121 -45
  133. package/tw/typography.css +8 -0
  134. package/{dist/tw/typography.css → tw/typography.rules.css} +0 -3
  135. package/{dist/tw → tw}/utilities/content.css +212 -50
  136. package/tw/utilities/index.css +11 -0
  137. package/tw/utilities/layout.css +208 -0
  138. package/tw/utilities/rules.css +8 -0
  139. package/dist/tw/aesthetics/sketch.css +0 -333
  140. package/dist/tw/components/button.css +0 -139
  141. package/dist/tw/components/index.css +0 -36
  142. package/dist/tw/components/loader.css +0 -116
  143. package/dist/tw/components/surface.css +0 -175
  144. package/dist/tw/intent.css +0 -228
  145. package/dist/tw/native.css +0 -203
  146. package/dist/tw/palette.css +0 -460
  147. package/dist/tw/presentation.css +0 -68
  148. package/dist/tw/surface.css +0 -61
  149. package/dist/tw/utilities/index.css +0 -6
  150. package/dist/tw/utilities/layout.css +0 -130
  151. /package/{dist/tw → tw}/aesthetics/index.css +0 -0
package/llms.txt CHANGED
@@ -4,29 +4,31 @@
4
4
 
5
5
  Use compiled entrypoints for ready-to-import CSS or `/tw` entrypoints in a
6
6
  Tailwind CSS v4 build. The package has no JavaScript behavior. Supported behavior
7
- is the surface documented in public docs and demonstrated by the playground.
7
+ is what the public docs describe and the demo at https://demo.codenhub.dev/styles/ shows.
8
8
 
9
9
  ## Documentation
10
10
 
11
- - [Documentation](./docs/index.md): Primary entrypoint — what the package is, what it does and does not do, and where to go next.
12
- - [README](./README.md): Installation, first use, requirements, and stability notes.
13
- - [Setup](./docs/setup.md): Installation, entrypoint/import-path reference, configuration, and requirements.
14
- - [Concepts](./docs/concepts.md): The three-axis model, the token system, and theme-selector precedence.
15
- - [Usage](./docs/usage/index.md): Composing, theming, customizing, aesthetics, and each component family.
16
- - [Composing](./docs/usage/composing.md): Combining axes, presentation, the component axis matrix, and elevation.
17
- - [Theming](./docs/usage/theming.md): Color, intent, and foundation token reference.
18
- - [Customizing](./docs/usage/customizing.md): Presentation, material, and aesthetic token reference.
19
- - [Aesthetics](./docs/usage/aesthetics.md): Each shipped aesthetic and its documented exceptions.
20
- - [Buttons](./docs/usage/buttons.md)
21
- - [Forms](./docs/usage/forms.md)
22
- - [Feedback](./docs/usage/feedback.md)
23
- - [Tooltips](./docs/usage/tooltips.md)
24
- - [Content and layout](./docs/usage/content-and-layout.md): Layout helpers, content chips/tables, surfaces, and typography utilities.
25
- - [Integrating](./docs/integrating/index.md): Wiring the stylesheet into Next.js, Vue, Svelte, Astro, or a Tailwind CSS v4 build.
26
- - [Tailwind CSS v4](./docs/integrating/tailwind.md)
27
- - [Next.js](./docs/integrating/nextjs.md)
28
- - [Vue](./docs/integrating/vue.md)
29
- - [Svelte](./docs/integrating/svelte.md)
30
- - [Astro](./docs/integrating/astro.md)
31
- - [Accessibility](./docs/accessibility.md): CSS accessibility behavior and consumer responsibilities.
11
+ - [Introduction](./docs/index.md): Primary entrypoint: what the package is for, what it does not do, versioning, and the reading order.
12
+ - [README](./README.md): Installation, a first example, requirements, and license.
13
+ - [Setup](./docs/setup.md): Installing, choosing compiled CSS or Tailwind source, requirements, every entrypoint, classless HTML, cascade layers, and what to check when nothing is styled.
14
+ - [Integrating](./docs/integrating/index.md): How the stylesheet loads in a framework build, and which guide to follow.
15
+ - [Tailwind CSS v4](./docs/integrating/tailwind.md): Using the `/tw` source entrypoints in a Tailwind CSS v4 build, focused entrypoints, the `dark:` variant, and troubleshooting.
16
+ - [Next.js](./docs/integrating/nextjs.md): Importing the stylesheet in a Next.js or React app.
17
+ - [Vue](./docs/integrating/vue.md): Importing the stylesheet in a Vue or Vite app.
18
+ - [Svelte](./docs/integrating/svelte.md): Importing the stylesheet in a Svelte or SvelteKit app.
19
+ - [Astro](./docs/integrating/astro.md): Importing the stylesheet in an Astro app.
20
+ - [Without a bundler](./docs/integrating/without-a-bundler.md): Linking the compiled files from plain HTML, Rails, Django, or a CDN.
21
+ - [Building a screen](./docs/concepts.md): Layout, type, cards, and buttons, and the model behind them: intent, fill, edge, aesthetic, and what passes down to children.
22
+ - [Usage overview](./docs/usage/index.md): The task guides in order, then the lookup pages.
23
+ - [Buttons](./docs/usage/buttons.md): Destructive and secondary actions, icon buttons, sizes, link buttons, disabled states, and loading icons.
24
+ - [Forms](./docs/usage/forms.md): Labeled fields, hints and errors, icons and fixed prefixes, selects, and checkbox, radio, and switch toggles.
25
+ - [Feedback](./docs/usage/feedback.md): A saving button, alerts, badges, skeletons, progress bars, and motion that keeps running.
26
+ - [Tooltips](./docs/usage/tooltips.md): Field help on hover and focus, the ARIA wiring and Escape handler, and where a tooltip gets clipped.
27
+ - [Theming](./docs/usage/theming.md): Light and dark mode, brand colors, custom intents, and every color, intent, foundation, and font token with its default.
28
+ - [Aesthetics](./docs/usage/aesthetics.md): The six optional looks, what each changes, its knobs, and its limits.
29
+ - [Solo classes](./docs/usage/solo.md): Painting an aesthetic onto one element from another library, and what a solo class reads and ignores.
30
+ - [Composing](./docs/usage/composing.md): Lookup for combining classes, every component's default look, presentation rules, the component axis matrix, and elevation.
31
+ - [Customizing](./docs/usage/customizing.md): Lookup for presentation and material tokens, aesthetic knobs, the six public component variables, the generated palette, and composition helpers.
32
+ - [Content and layout](./docs/usage/content-and-layout.md): Lookup for layout helpers, the type scale, cards and panels, tables, quotes, code, and keys.
33
+ - [Accessibility](./docs/accessibility.md): What the CSS provides for focus, states, motion, contrast, forced colors, and right-to-left text, and what the application must add.
32
34
  - [Changelog](./docs/changelog/index.md): Release history, including breaking changes.
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@codenhub/styles",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "private": false,
5
- "description": "CSS-only Codenhub design tokens, base styles, and composable UI helper classes.",
5
+ "description": "Build a consistent, themeable interface by writing class names on plain HTML, with one stylesheet of tokens, a reset, layout and type helpers, and component classes, and no JavaScript.",
6
6
  "homepage": "https://github.com/codenhub/codenhub/tree/main/packages/styles",
7
7
  "license": "Apache-2.0",
8
8
  "repository": {
@@ -10,8 +10,12 @@
10
10
  "url": "git+https://github.com/codenhub/codenhub.git",
11
11
  "directory": "packages/styles"
12
12
  },
13
+ "bin": {
14
+ "codenhub-styles": "./dist/cli.js"
15
+ },
13
16
  "files": [
14
17
  "dist",
18
+ "tw",
15
19
  "NOTICE",
16
20
  "README.md",
17
21
  "docs",
@@ -22,163 +26,190 @@
22
26
  "sideEffects": [
23
27
  "**/*.css"
24
28
  ],
29
+ "types": "./dist/index.d.ts",
25
30
  "exports": {
26
31
  ".": {
32
+ "types": "./dist/index.d.ts",
27
33
  "style": "./dist/index.css",
28
34
  "import": "./dist/index.css",
29
35
  "default": "./dist/index.css"
30
36
  },
31
37
  "./theme": {
38
+ "types": "./dist/index.d.ts",
32
39
  "style": "./dist/theme.css",
33
40
  "import": "./dist/theme.css",
34
41
  "default": "./dist/theme.css"
35
42
  },
36
43
  "./palette": {
44
+ "types": "./dist/index.d.ts",
37
45
  "style": "./dist/palette.css",
38
46
  "import": "./dist/palette.css",
39
47
  "default": "./dist/palette.css"
40
48
  },
41
49
  "./components": {
50
+ "types": "./dist/index.d.ts",
42
51
  "style": "./dist/components.css",
43
52
  "import": "./dist/components.css",
44
53
  "default": "./dist/components.css"
45
54
  },
46
55
  "./aesthetics": {
56
+ "types": "./dist/index.d.ts",
47
57
  "style": "./dist/aesthetics/index.css",
48
58
  "import": "./dist/aesthetics/index.css",
49
59
  "default": "./dist/aesthetics/index.css"
50
60
  },
51
61
  "./aesthetics/neobrutalism": {
62
+ "types": "./dist/index.d.ts",
52
63
  "style": "./dist/aesthetics/neobrutalism.css",
53
64
  "import": "./dist/aesthetics/neobrutalism.css",
54
65
  "default": "./dist/aesthetics/neobrutalism.css"
55
66
  },
56
67
  "./aesthetics/glass": {
68
+ "types": "./dist/index.d.ts",
57
69
  "style": "./dist/aesthetics/glass.css",
58
70
  "import": "./dist/aesthetics/glass.css",
59
71
  "default": "./dist/aesthetics/glass.css"
60
72
  },
61
73
  "./aesthetics/pixel": {
74
+ "types": "./dist/index.d.ts",
62
75
  "style": "./dist/aesthetics/pixel.css",
63
76
  "import": "./dist/aesthetics/pixel.css",
64
77
  "default": "./dist/aesthetics/pixel.css"
65
78
  },
66
79
  "./aesthetics/chunky-tile": {
80
+ "types": "./dist/index.d.ts",
67
81
  "style": "./dist/aesthetics/chunky-tile.css",
68
82
  "import": "./dist/aesthetics/chunky-tile.css",
69
83
  "default": "./dist/aesthetics/chunky-tile.css"
70
84
  },
71
85
  "./aesthetics/cyber": {
86
+ "types": "./dist/index.d.ts",
72
87
  "style": "./dist/aesthetics/cyber.css",
73
88
  "import": "./dist/aesthetics/cyber.css",
74
89
  "default": "./dist/aesthetics/cyber.css"
75
90
  },
76
91
  "./aesthetics/sketch": {
92
+ "types": "./dist/index.d.ts",
77
93
  "style": "./dist/aesthetics/sketch.css",
78
94
  "import": "./dist/aesthetics/sketch.css",
79
95
  "default": "./dist/aesthetics/sketch.css"
80
96
  },
81
97
  "./tw": {
82
- "style": "./dist/tw/index.css",
83
- "import": "./dist/tw/index.css",
84
- "default": "./dist/tw/index.css"
98
+ "types": "./tw/index.d.ts",
99
+ "style": "./tw/index.css",
100
+ "import": "./tw/index.css",
101
+ "default": "./tw/index.css"
85
102
  },
86
103
  "./tw/theme": {
87
- "style": "./dist/tw/theme.css",
88
- "import": "./dist/tw/theme.css",
89
- "default": "./dist/tw/theme.css"
104
+ "types": "./tw/index.d.ts",
105
+ "style": "./tw/theme.css",
106
+ "import": "./tw/theme.css",
107
+ "default": "./tw/theme.css"
90
108
  },
91
109
  "./tw/components": {
92
- "style": "./dist/tw/components/index.css",
93
- "import": "./dist/tw/components/index.css",
94
- "default": "./dist/tw/components/index.css"
110
+ "types": "./tw/index.d.ts",
111
+ "style": "./tw/components/index.css",
112
+ "import": "./tw/components/index.css",
113
+ "default": "./tw/components/index.css"
95
114
  },
96
115
  "./tw/surface": {
97
- "style": "./dist/tw/components/surface.css",
98
- "import": "./dist/tw/components/surface.css",
99
- "default": "./dist/tw/components/surface.css"
116
+ "types": "./tw/index.d.ts",
117
+ "style": "./tw/components/surface.css",
118
+ "import": "./tw/components/surface.css",
119
+ "default": "./tw/components/surface.css"
100
120
  },
101
121
  "./tw/button": {
102
- "style": "./dist/tw/components/button.css",
103
- "import": "./dist/tw/components/button.css",
104
- "default": "./dist/tw/components/button.css"
122
+ "types": "./tw/index.d.ts",
123
+ "style": "./tw/components/button.css",
124
+ "import": "./tw/components/button.css",
125
+ "default": "./tw/components/button.css"
105
126
  },
106
127
  "./tw/form": {
107
- "style": "./dist/tw/components/form.css",
108
- "import": "./dist/tw/components/form.css",
109
- "default": "./dist/tw/components/form.css"
128
+ "types": "./tw/index.d.ts",
129
+ "style": "./tw/components/form.css",
130
+ "import": "./tw/components/form.css",
131
+ "default": "./tw/components/form.css"
110
132
  },
111
133
  "./tw/feedback": {
112
- "style": "./dist/tw/components/feedback.css",
113
- "import": "./dist/tw/components/feedback.css",
114
- "default": "./dist/tw/components/feedback.css"
115
- },
116
- "./tw/loader": {
117
- "style": "./dist/tw/components/loader.css",
118
- "import": "./dist/tw/components/loader.css",
119
- "default": "./dist/tw/components/loader.css"
134
+ "types": "./tw/index.d.ts",
135
+ "style": "./tw/components/feedback.css",
136
+ "import": "./tw/components/feedback.css",
137
+ "default": "./tw/components/feedback.css"
120
138
  },
121
139
  "./tw/tooltip": {
122
- "style": "./dist/tw/components/tooltip.css",
123
- "import": "./dist/tw/components/tooltip.css",
124
- "default": "./dist/tw/components/tooltip.css"
140
+ "types": "./tw/index.d.ts",
141
+ "style": "./tw/components/tooltip.css",
142
+ "import": "./tw/components/tooltip.css",
143
+ "default": "./tw/components/tooltip.css"
125
144
  },
126
145
  "./tw/reset": {
127
- "style": "./dist/tw/reset.css",
128
- "import": "./dist/tw/reset.css",
129
- "default": "./dist/tw/reset.css"
146
+ "types": "./tw/index.d.ts",
147
+ "style": "./tw/reset.css",
148
+ "import": "./tw/reset.css",
149
+ "default": "./tw/reset.css"
130
150
  },
131
151
  "./tw/native": {
132
- "style": "./dist/tw/native.css",
133
- "import": "./dist/tw/native.css",
134
- "default": "./dist/tw/native.css"
152
+ "types": "./tw/index.d.ts",
153
+ "style": "./tw/native.css",
154
+ "import": "./tw/native.css",
155
+ "default": "./tw/native.css"
135
156
  },
136
157
  "./tw/typography": {
137
- "style": "./dist/tw/typography.css",
138
- "import": "./dist/tw/typography.css",
139
- "default": "./dist/tw/typography.css"
158
+ "types": "./tw/index.d.ts",
159
+ "style": "./tw/typography.css",
160
+ "import": "./tw/typography.css",
161
+ "default": "./tw/typography.css"
140
162
  },
141
163
  "./tw/utilities": {
142
- "style": "./dist/tw/utilities/index.css",
143
- "import": "./dist/tw/utilities/index.css",
144
- "default": "./dist/tw/utilities/index.css"
164
+ "types": "./tw/index.d.ts",
165
+ "style": "./tw/utilities/index.css",
166
+ "import": "./tw/utilities/index.css",
167
+ "default": "./tw/utilities/index.css"
145
168
  },
146
169
  "./tw/aesthetics": {
147
- "style": "./dist/tw/aesthetics/index.css",
148
- "import": "./dist/tw/aesthetics/index.css",
149
- "default": "./dist/tw/aesthetics/index.css"
170
+ "types": "./tw/index.d.ts",
171
+ "style": "./tw/aesthetics/index.css",
172
+ "import": "./tw/aesthetics/index.css",
173
+ "default": "./tw/aesthetics/index.css"
150
174
  },
151
175
  "./tw/aesthetics/neobrutalism": {
152
- "style": "./dist/tw/aesthetics/neobrutalism.css",
153
- "import": "./dist/tw/aesthetics/neobrutalism.css",
154
- "default": "./dist/tw/aesthetics/neobrutalism.css"
176
+ "types": "./tw/index.d.ts",
177
+ "style": "./tw/aesthetics/neobrutalism.css",
178
+ "import": "./tw/aesthetics/neobrutalism.css",
179
+ "default": "./tw/aesthetics/neobrutalism.css"
155
180
  },
156
181
  "./tw/aesthetics/glass": {
157
- "style": "./dist/tw/aesthetics/glass.css",
158
- "import": "./dist/tw/aesthetics/glass.css",
159
- "default": "./dist/tw/aesthetics/glass.css"
182
+ "types": "./tw/index.d.ts",
183
+ "style": "./tw/aesthetics/glass.css",
184
+ "import": "./tw/aesthetics/glass.css",
185
+ "default": "./tw/aesthetics/glass.css"
160
186
  },
161
187
  "./tw/aesthetics/pixel": {
162
- "style": "./dist/tw/aesthetics/pixel.css",
163
- "import": "./dist/tw/aesthetics/pixel.css",
164
- "default": "./dist/tw/aesthetics/pixel.css"
188
+ "types": "./tw/index.d.ts",
189
+ "style": "./tw/aesthetics/pixel.css",
190
+ "import": "./tw/aesthetics/pixel.css",
191
+ "default": "./tw/aesthetics/pixel.css"
165
192
  },
166
193
  "./tw/aesthetics/chunky-tile": {
167
- "style": "./dist/tw/aesthetics/chunky-tile.css",
168
- "import": "./dist/tw/aesthetics/chunky-tile.css",
169
- "default": "./dist/tw/aesthetics/chunky-tile.css"
194
+ "types": "./tw/index.d.ts",
195
+ "style": "./tw/aesthetics/chunky-tile.css",
196
+ "import": "./tw/aesthetics/chunky-tile.css",
197
+ "default": "./tw/aesthetics/chunky-tile.css"
170
198
  },
171
199
  "./tw/aesthetics/cyber": {
172
- "style": "./dist/tw/aesthetics/cyber.css",
173
- "import": "./dist/tw/aesthetics/cyber.css",
174
- "default": "./dist/tw/aesthetics/cyber.css"
200
+ "types": "./tw/index.d.ts",
201
+ "style": "./tw/aesthetics/cyber.css",
202
+ "import": "./tw/aesthetics/cyber.css",
203
+ "default": "./tw/aesthetics/cyber.css"
175
204
  },
176
205
  "./tw/aesthetics/sketch": {
177
- "style": "./dist/tw/aesthetics/sketch.css",
178
- "import": "./dist/tw/aesthetics/sketch.css",
179
- "default": "./dist/tw/aesthetics/sketch.css"
206
+ "types": "./tw/index.d.ts",
207
+ "style": "./tw/aesthetics/sketch.css",
208
+ "import": "./tw/aesthetics/sketch.css",
209
+ "default": "./tw/aesthetics/sketch.css"
180
210
  },
181
211
  "./native": {
212
+ "types": "./dist/index.d.ts",
182
213
  "style": "./dist/native.css",
183
214
  "import": "./dist/native.css",
184
215
  "default": "./dist/native.css"
@@ -188,17 +219,52 @@
188
219
  "publishConfig": {
189
220
  "access": "public"
190
221
  },
222
+ "devDependencies": {
223
+ "@codenhub/tools": "0.1.0",
224
+ "@playwright/test": "~1.63.0",
225
+ "@tailwindcss/cli": "^4.3.4",
226
+ "@tailwindcss/node": "^4.3.4",
227
+ "@tailwindcss/oxide": "^4.3.4",
228
+ "@types/node": "^26.6.6",
229
+ "tailwindcss": "^4.3.4",
230
+ "tsdown": "^0.23.5",
231
+ "typescript": "^6.0.3",
232
+ "vitest": "^4.1.10"
233
+ },
234
+ "peerDependencies": {
235
+ "@tailwindcss/cli": ">=4.3.2 <5",
236
+ "tailwindcss": ">=4.3.2 <5"
237
+ },
238
+ "peerDependenciesMeta": {
239
+ "@tailwindcss/cli": {
240
+ "optional": true
241
+ },
242
+ "tailwindcss": {
243
+ "optional": true
244
+ }
245
+ },
246
+ "engines": {
247
+ "node": ">=24"
248
+ },
249
+ "codenhub": {
250
+ "label": "StyleKit",
251
+ "status": "active",
252
+ "docs": {},
253
+ "tools": {
254
+ "timeout": 1800
255
+ }
256
+ },
191
257
  "scripts": {
192
- "clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\"",
258
+ "clean": "node -e \"for (const d of ['dist', 'tw']) fs.rmSync(d, { recursive: true, force: true })\"",
193
259
  "dev": "pnpm --filter=@codenhub/styles-dev dev",
194
260
  "debug": "pnpm build && pnpm --filter=@codenhub/styles-debug dev",
195
261
  "demo": "pnpm build && pnpm --filter=@codenhub/styles-demo dev",
196
262
  "generate": "node scripts/generate-palette.mjs",
197
- "build": "pnpm clean && node scripts/build-styles.mjs && pnpm build:tw",
263
+ "build": "pnpm clean && node scripts/build-styles.mjs && pnpm build:tw && pnpm build:cli",
198
264
  "build:styles": "node scripts/build-styles.mjs --styles",
199
265
  "build:aesthetics": "node scripts/build-styles.mjs --aesthetics",
200
266
  "build:tw": "node scripts/build-tw.mjs",
201
- "prepublishOnly": "pnpm build && pnpm typecheck && pnpm test",
267
+ "build:cli": "tsdown src/cli/cli.ts --format esm --no-clean --no-fixed-extension --no-dts",
202
268
  "status:npm": "npm view @codenhub/styles version dist-tags time --json && npm dist-tag ls @codenhub/styles && npm access get status @codenhub/styles",
203
269
  "status:pack": "npm pack --dry-run --ignore-scripts",
204
270
  "test": "vitest run",
@@ -207,28 +273,5 @@
207
273
  "test:coverage": "pnpm test",
208
274
  "test:watch": "vitest --watch",
209
275
  "typecheck": "tsc -b"
210
- },
211
- "devDependencies": {
212
- "@codenhub/tools": "workspace:*",
213
- "@playwright/test": "catalog:",
214
- "@tailwindcss/cli": "catalog:",
215
- "@types/node": "catalog:",
216
- "tailwindcss": "catalog:",
217
- "typescript": "catalog:",
218
- "vitest": "catalog:"
219
- },
220
- "peerDependencies": {
221
- "tailwindcss": ">=4.3.2 <5"
222
- },
223
- "peerDependenciesMeta": {
224
- "tailwindcss": {
225
- "optional": true
226
- }
227
- },
228
- "codenhub": {
229
- "docs": {
230
- "label": "StyleKit",
231
- "status": "active"
232
- }
233
276
  }
234
- }
277
+ }
@@ -144,30 +144,110 @@
144
144
  --ui-label-case: initial;
145
145
  --ui-label-shadow: initial;
146
146
  }
147
+
148
+ /* More contrast asked for: the tile takes the controls' grey, since its own
149
+ is about 2.5:1 against the page in both themes. The bar under a tile is
150
+ this ink too, and darkens with it. A rule of its own rather than nested
151
+ above: `registry.test.ts` reads that block's declarations flat. See
152
+ docs/accessibility.md. */
153
+ @media (prefers-contrast: more) {
154
+ .chunky-tile {
155
+ --ui-ink: light-dark(var(--color-neutral-600), var(--color-neutral-400));
156
+ }
157
+ }
147
158
  }
148
159
 
149
160
  /* Solo: the same look painted onto the one element carrying the class, for an
150
161
  element the package does not style. See docs/internal/model.md#solo-classes and
151
- the note on `.glass-solo`: own knobs and foundation tokens with literal
152
- fallbacks, never a shared `--ui-*`, `--intent-*`, or `--elevation-color`
153
- token, unlayered, and not for this package's own components. */
162
+ the note on `.glass-solo`: it composes with the element's presentation,
163
+ intent, and elevation, and reads its material from its own knobs and
164
+ foundation tokens with literal fallbacks, never a shared material `--ui-*`
165
+ or `--elevation-color` token. Unlayered, and not for this package's own
166
+ components. */
154
167
  .chunky-tile-solo {
155
168
  --_tile-lift: var(--tile-lift, 4px);
156
- --_tile-ink: light-dark(var(--color-neutral-400, oklch(70.8% 0 0)), var(--color-neutral-600, oklch(43.9% 0 0)));
157
- /* With no fill to shade, the bar shades the edge: the colour an unfilled
158
- tile's bar already is under the aesthetic class. */
159
- --_tile-bar: color-mix(in oklab, var(--_tile-ink) 72%, rgb(0 0 0));
169
+ /* The composition, the same in every solo class; `registry.test.ts` holds
170
+ the copies together. See the note on `.glass-solo`. */
171
+ --_solo-intent-color: initial;
172
+ --_solo-intent-contrast: initial;
173
+ --_solo-intent-strong: initial;
174
+ --_solo-intent-border: initial;
175
+ --_solo-intent-fill-max: initial;
176
+ --_solo-color: var(--_solo-intent-color, var(--color-text, light-dark(oklch(14.5% 0 0), oklch(98.5% 0 0))));
177
+ --_solo-contrast: var(
178
+ --_solo-intent-contrast,
179
+ var(--color-text-contrast, light-dark(oklch(98.5% 0 0), oklch(14.5% 0 0)))
180
+ );
181
+ --_solo-strong: var(--_solo-intent-strong, var(--color-text-strong, light-dark(oklch(20.5% 0 0), oklch(97% 0 0))));
182
+ --_solo-capped: min(var(--ui-fill, 0%), var(--_solo-intent-fill-max, 20%));
183
+ --_solo-fill: color-mix(in oklab, var(--_solo-color) var(--_solo-capped), transparent);
184
+ --_solo-on-fill: min(var(--ui-fg-on-fill, 0%), max(0%, calc(var(--_solo-capped) * 2 - 100%)));
185
+ --_solo-fg: color-mix(in oklab, var(--_solo-contrast) var(--_solo-on-fill), var(--_solo-strong));
186
+ /* The line with no intent on the element: this aesthetic's own ink. */
187
+ --_solo-ink: var(
188
+ --_solo-intent-border,
189
+ light-dark(var(--color-neutral-400, oklch(70.8% 0 0)), var(--color-neutral-600, oklch(43.9% 0 0)))
190
+ );
191
+ --_solo-edge: color-mix(in oklab, var(--_solo-ink) var(--ui-border, 100%), var(--_solo-fill));
192
+ /* The bar shades the line, as an unfilled tile's does under the aesthetic
193
+ class, and follows the element's intent with it. */
194
+ --_tile-bar: color-mix(in oklab, var(--_solo-ink) 72%, rgb(0 0 0));
195
+ --_solo-depth: calc(var(--_tile-lift) * var(--ui-elevation, 1));
160
196
 
161
- border: 2px solid var(--_tile-ink);
197
+ border: 2px solid var(--_solo-edge);
162
198
  border-radius: var(--tile-radius, 0.75rem);
163
- box-shadow: 0 var(--_tile-lift) 0 0 var(--_tile-bar);
199
+ box-shadow:
200
+ 0 var(--_solo-depth) 0 0 var(--_tile-bar),
201
+ inset 0 0 0 100vmax var(--_solo-fill);
164
202
  font-family: var(--font-rounded, var(--font-default, ui-sans-serif, system-ui, sans-serif));
165
- transition:
166
- box-shadow var(--motion-duration-normal, 200ms) var(--motion-ease, cubic-bezier(0.2, 0, 0, 1)),
167
- transform var(--motion-duration-normal, 200ms) var(--motion-ease, cubic-bezier(0.2, 0, 0, 1));
168
203
  }
169
204
 
170
- /* The heavier, tracked label is an action's, as under the aesthetic class. */
205
+ /* More contrast asked for: the controls' grey, as on `.chunky-tile`, for the
206
+ same 2.5:1. An element's intent still colours the line. */
207
+ @media (prefers-contrast: more) {
208
+ .chunky-tile-solo {
209
+ --_solo-ink: var(
210
+ --_solo-intent-border,
211
+ light-dark(var(--color-neutral-600, oklch(43.9% 0 0)), var(--color-neutral-400, oklch(70.8% 0 0)))
212
+ );
213
+ }
214
+ }
215
+
216
+ /* An intent class on the element colours it, as on a component. Named rather
217
+ than read from `--intent-*` alone: those slots inherit, so a `.success`
218
+ container would colour a solo element where it leaves a component neutral. */
219
+ .chunky-tile-solo:is(.primary, .secondary, .success, .warning, .destructive, .info) {
220
+ --_solo-intent-color: var(--intent-color);
221
+ --_solo-intent-contrast: var(--intent-contrast);
222
+ --_solo-intent-strong: var(--intent-strong);
223
+ --_solo-intent-border: var(--intent-border);
224
+ --_solo-intent-fill-max: var(--intent-fill-max);
225
+ }
226
+
227
+ /* The text colour is written only where a fill or an intent is asked for, on
228
+ the element or by a container's fill class. Anywhere else the element keeps
229
+ its own: a dark toast keeps its light text. */
230
+ .chunky-tile-solo:is(
231
+ .solid,
232
+ .soft,
233
+ .ghost,
234
+ .primary,
235
+ .secondary,
236
+ .success,
237
+ .warning,
238
+ .destructive,
239
+ .info,
240
+ :is(.solid, .soft, .ghost) *
241
+ ) {
242
+ color: var(--_solo-fg);
243
+ }
244
+
245
+ /* The heavier, tracked label is an action's, as under the aesthetic class.
246
+
247
+ So is the press's transition: `transition` is one list, so writing it on
248
+ every solo element replaced a container's own -- a toast's fade and height
249
+ stopped animating. The travel is the independent `translate`, so the
250
+ element's own `transform` stays its own. */
171
251
  .chunky-tile-solo:is(
172
252
  button,
173
253
  a[href],
@@ -179,26 +259,22 @@
179
259
  ) {
180
260
  font-weight: 800;
181
261
  letter-spacing: 0.04em;
262
+ transition:
263
+ box-shadow var(--motion-duration-normal, 200ms) var(--motion-ease, cubic-bezier(0.2, 0, 0, 1)),
264
+ translate var(--motion-duration-normal, 200ms) var(--motion-ease, cubic-bezier(0.2, 0, 0, 1));
265
+
266
+ /* Reduced motion keeps the press and drops its motion: the tile lands on
267
+ its bar at once. The near-zero duration `box` uses, so a `transitionend`
268
+ still fires. */
269
+ @media (prefers-reduced-motion: reduce) {
270
+ transition-duration: 0.01ms;
271
+ }
182
272
  }
183
273
 
184
274
  /* The press, only on something pressed: an action, not disabled. A solo
185
275
  container -- a toast clicked to dismiss -- stays put, the way only `.btn` and
186
276
  an opted-in card press under the aesthetic class. */
187
277
  .chunky-tile-solo:is(
188
- button,
189
- a[href],
190
- [role="button"],
191
- summary,
192
- input[type="button"],
193
- input[type="submit"],
194
- input[type="reset"]
195
- ):active:not(:disabled, [aria-disabled="true"]) {
196
- box-shadow: 0 0 0 0 var(--_tile-bar);
197
- transform: translateY(var(--_tile-lift));
198
- }
199
-
200
- @media (prefers-reduced-motion: reduce) {
201
- .chunky-tile-solo:is(
202
278
  button,
203
279
  a[href],
204
280
  [role="button"],
@@ -207,6 +283,8 @@
207
283
  input[type="submit"],
208
284
  input[type="reset"]
209
285
  ):active:not(:disabled, [aria-disabled="true"]) {
210
- transform: none;
211
- }
286
+ box-shadow:
287
+ 0 0 0 0 var(--_tile-bar),
288
+ inset 0 0 0 100vmax var(--_solo-fill);
289
+ translate: 0 var(--_solo-depth);
212
290
  }