@codenhub/styles 0.0.4 → 0.1.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/LICENSE +201 -201
- package/NOTICE +27 -0
- package/README.md +22 -116
- package/dist/aesthetics/chunky-tile.css +1 -0
- package/dist/aesthetics/glass.css +1 -0
- package/dist/aesthetics/index.css +2 -0
- package/dist/aesthetics/neobrutalism.css +1 -0
- package/dist/aesthetics/pixel.css +1 -0
- package/dist/components.css +2 -2
- package/dist/index.css +2 -2
- package/dist/native.css +2 -0
- package/dist/theme.css +2 -2
- package/dist/tw/aesthetics/chunky-tile.css +109 -0
- package/dist/tw/aesthetics/glass.css +66 -0
- package/dist/tw/aesthetics/index.css +9 -0
- package/dist/tw/aesthetics/neobrutalism.css +63 -0
- package/dist/tw/aesthetics/pixel.css +88 -0
- package/dist/tw/box.css +206 -0
- package/dist/tw/components/button.css +108 -0
- package/dist/tw/components/feedback.css +163 -0
- package/dist/tw/components/form.css +599 -0
- package/dist/tw/components/index.css +28 -0
- package/dist/tw/components/loader.css +122 -0
- package/dist/tw/components/surface.css +122 -0
- package/dist/tw/components/tooltip.css +132 -0
- package/dist/tw/elevation.css +46 -0
- package/dist/tw/index.css +27 -0
- package/dist/tw/intent.css +209 -0
- package/dist/tw/native.css +187 -0
- package/dist/tw/presentation.css +77 -0
- package/dist/tw/reset.css +129 -0
- package/dist/tw/theme.css +223 -0
- package/dist/tw/typography.css +34 -0
- package/dist/tw/utilities/content.css +361 -0
- package/dist/tw/utilities/index.css +6 -0
- package/dist/tw/utilities/layout.css +107 -0
- package/docs/accessibility.md +92 -0
- package/docs/changelog/0.1.0.md +37 -0
- package/docs/changelog/0.1.1.md +10 -0
- package/docs/changelog/index.md +10 -0
- package/docs/concepts.md +68 -0
- package/docs/index.md +35 -0
- package/docs/integrating/astro.md +35 -0
- package/docs/integrating/index.md +41 -0
- package/docs/integrating/nextjs.md +67 -0
- package/docs/integrating/svelte.md +43 -0
- package/docs/integrating/tailwind.md +56 -0
- package/docs/integrating/vue.md +31 -0
- package/docs/setup.md +96 -0
- package/docs/usage/aesthetics.md +120 -0
- package/docs/usage/buttons.md +58 -0
- package/docs/usage/composing.md +143 -0
- package/docs/usage/content-and-layout.md +175 -0
- package/docs/usage/customizing.md +148 -0
- package/docs/usage/feedback.md +79 -0
- package/docs/usage/forms.md +135 -0
- package/docs/usage/index.md +24 -0
- package/docs/usage/theming.md +154 -0
- package/docs/usage/tooltips.md +39 -0
- package/llms-full.txt +1676 -0
- package/llms.txt +26 -0
- package/package.json +176 -33
- package/src/components/button.css +0 -155
- package/src/components/feedback.css +0 -214
- package/src/components/form.css +0 -303
- package/src/components/index.css +0 -9
- package/src/components/loader.css +0 -56
- package/src/components/surface.css +0 -6
- package/src/components/tooltip.css +0 -60
- package/src/index.css +0 -7
- package/src/overrides.css +0 -76
- package/src/theme.css +0 -234
- package/src/typography.css +0 -30
- package/src/utilities.css +0 -40
package/llms.txt
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# @codenhub/styles
|
|
2
|
+
|
|
3
|
+
> CSS-only Codenhub design tokens, reset, typography, layout and content utilities, component classes, native-element styling, and Tailwind CSS v4 source entrypoints.
|
|
4
|
+
|
|
5
|
+
Use compiled entrypoints for ready-to-import CSS or `/tw` entrypoints in a
|
|
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.
|
|
8
|
+
|
|
9
|
+
## Documentation
|
|
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
|
+
- [Accessibility](./docs/accessibility.md): CSS accessibility behavior and consumer responsibilities.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codenhub/styles",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "CSS-only Codenhub design tokens, base styles, and composable UI helper classes.",
|
|
6
6
|
"homepage": "https://github.com/codenhub/codenhub/tree/main/packages/styles",
|
|
@@ -12,34 +12,183 @@
|
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"dist",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
15
|
+
"NOTICE",
|
|
16
|
+
"README.md",
|
|
17
|
+
"docs",
|
|
18
|
+
"llms.txt",
|
|
19
|
+
"llms-full.txt"
|
|
17
20
|
],
|
|
18
21
|
"type": "module",
|
|
22
|
+
"sideEffects": [
|
|
23
|
+
"**/*.css"
|
|
24
|
+
],
|
|
19
25
|
"exports": {
|
|
20
|
-
".":
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"./
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"./
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
".": {
|
|
27
|
+
"style": "./dist/index.css",
|
|
28
|
+
"import": "./dist/index.css",
|
|
29
|
+
"default": "./dist/index.css"
|
|
30
|
+
},
|
|
31
|
+
"./theme": {
|
|
32
|
+
"style": "./dist/theme.css",
|
|
33
|
+
"import": "./dist/theme.css",
|
|
34
|
+
"default": "./dist/theme.css"
|
|
35
|
+
},
|
|
36
|
+
"./components": {
|
|
37
|
+
"style": "./dist/components.css",
|
|
38
|
+
"import": "./dist/components.css",
|
|
39
|
+
"default": "./dist/components.css"
|
|
40
|
+
},
|
|
41
|
+
"./aesthetics": {
|
|
42
|
+
"style": "./dist/aesthetics/index.css",
|
|
43
|
+
"import": "./dist/aesthetics/index.css",
|
|
44
|
+
"default": "./dist/aesthetics/index.css"
|
|
45
|
+
},
|
|
46
|
+
"./aesthetics/neobrutalism": {
|
|
47
|
+
"style": "./dist/aesthetics/neobrutalism.css",
|
|
48
|
+
"import": "./dist/aesthetics/neobrutalism.css",
|
|
49
|
+
"default": "./dist/aesthetics/neobrutalism.css"
|
|
50
|
+
},
|
|
51
|
+
"./aesthetics/glass": {
|
|
52
|
+
"style": "./dist/aesthetics/glass.css",
|
|
53
|
+
"import": "./dist/aesthetics/glass.css",
|
|
54
|
+
"default": "./dist/aesthetics/glass.css"
|
|
55
|
+
},
|
|
56
|
+
"./aesthetics/pixel": {
|
|
57
|
+
"style": "./dist/aesthetics/pixel.css",
|
|
58
|
+
"import": "./dist/aesthetics/pixel.css",
|
|
59
|
+
"default": "./dist/aesthetics/pixel.css"
|
|
60
|
+
},
|
|
61
|
+
"./aesthetics/chunky-tile": {
|
|
62
|
+
"style": "./dist/aesthetics/chunky-tile.css",
|
|
63
|
+
"import": "./dist/aesthetics/chunky-tile.css",
|
|
64
|
+
"default": "./dist/aesthetics/chunky-tile.css"
|
|
65
|
+
},
|
|
66
|
+
"./tw": {
|
|
67
|
+
"style": "./dist/tw/index.css",
|
|
68
|
+
"import": "./dist/tw/index.css",
|
|
69
|
+
"default": "./dist/tw/index.css"
|
|
70
|
+
},
|
|
71
|
+
"./tw/theme": {
|
|
72
|
+
"style": "./dist/tw/theme.css",
|
|
73
|
+
"import": "./dist/tw/theme.css",
|
|
74
|
+
"default": "./dist/tw/theme.css"
|
|
75
|
+
},
|
|
76
|
+
"./tw/components": {
|
|
77
|
+
"style": "./dist/tw/components/index.css",
|
|
78
|
+
"import": "./dist/tw/components/index.css",
|
|
79
|
+
"default": "./dist/tw/components/index.css"
|
|
80
|
+
},
|
|
81
|
+
"./tw/surface": {
|
|
82
|
+
"style": "./dist/tw/components/surface.css",
|
|
83
|
+
"import": "./dist/tw/components/surface.css",
|
|
84
|
+
"default": "./dist/tw/components/surface.css"
|
|
85
|
+
},
|
|
86
|
+
"./tw/button": {
|
|
87
|
+
"style": "./dist/tw/components/button.css",
|
|
88
|
+
"import": "./dist/tw/components/button.css",
|
|
89
|
+
"default": "./dist/tw/components/button.css"
|
|
90
|
+
},
|
|
91
|
+
"./tw/form": {
|
|
92
|
+
"style": "./dist/tw/components/form.css",
|
|
93
|
+
"import": "./dist/tw/components/form.css",
|
|
94
|
+
"default": "./dist/tw/components/form.css"
|
|
95
|
+
},
|
|
96
|
+
"./tw/feedback": {
|
|
97
|
+
"style": "./dist/tw/components/feedback.css",
|
|
98
|
+
"import": "./dist/tw/components/feedback.css",
|
|
99
|
+
"default": "./dist/tw/components/feedback.css"
|
|
100
|
+
},
|
|
101
|
+
"./tw/loader": {
|
|
102
|
+
"style": "./dist/tw/components/loader.css",
|
|
103
|
+
"import": "./dist/tw/components/loader.css",
|
|
104
|
+
"default": "./dist/tw/components/loader.css"
|
|
105
|
+
},
|
|
106
|
+
"./tw/tooltip": {
|
|
107
|
+
"style": "./dist/tw/components/tooltip.css",
|
|
108
|
+
"import": "./dist/tw/components/tooltip.css",
|
|
109
|
+
"default": "./dist/tw/components/tooltip.css"
|
|
110
|
+
},
|
|
111
|
+
"./tw/reset": {
|
|
112
|
+
"style": "./dist/tw/reset.css",
|
|
113
|
+
"import": "./dist/tw/reset.css",
|
|
114
|
+
"default": "./dist/tw/reset.css"
|
|
115
|
+
},
|
|
116
|
+
"./tw/native": {
|
|
117
|
+
"style": "./dist/tw/native.css",
|
|
118
|
+
"import": "./dist/tw/native.css",
|
|
119
|
+
"default": "./dist/tw/native.css"
|
|
120
|
+
},
|
|
121
|
+
"./tw/typography": {
|
|
122
|
+
"style": "./dist/tw/typography.css",
|
|
123
|
+
"import": "./dist/tw/typography.css",
|
|
124
|
+
"default": "./dist/tw/typography.css"
|
|
125
|
+
},
|
|
126
|
+
"./tw/utilities": {
|
|
127
|
+
"style": "./dist/tw/utilities/index.css",
|
|
128
|
+
"import": "./dist/tw/utilities/index.css",
|
|
129
|
+
"default": "./dist/tw/utilities/index.css"
|
|
130
|
+
},
|
|
131
|
+
"./tw/aesthetics": {
|
|
132
|
+
"style": "./dist/tw/aesthetics/index.css",
|
|
133
|
+
"import": "./dist/tw/aesthetics/index.css",
|
|
134
|
+
"default": "./dist/tw/aesthetics/index.css"
|
|
135
|
+
},
|
|
136
|
+
"./tw/aesthetics/neobrutalism": {
|
|
137
|
+
"style": "./dist/tw/aesthetics/neobrutalism.css",
|
|
138
|
+
"import": "./dist/tw/aesthetics/neobrutalism.css",
|
|
139
|
+
"default": "./dist/tw/aesthetics/neobrutalism.css"
|
|
140
|
+
},
|
|
141
|
+
"./tw/aesthetics/glass": {
|
|
142
|
+
"style": "./dist/tw/aesthetics/glass.css",
|
|
143
|
+
"import": "./dist/tw/aesthetics/glass.css",
|
|
144
|
+
"default": "./dist/tw/aesthetics/glass.css"
|
|
145
|
+
},
|
|
146
|
+
"./tw/aesthetics/pixel": {
|
|
147
|
+
"style": "./dist/tw/aesthetics/pixel.css",
|
|
148
|
+
"import": "./dist/tw/aesthetics/pixel.css",
|
|
149
|
+
"default": "./dist/tw/aesthetics/pixel.css"
|
|
150
|
+
},
|
|
151
|
+
"./tw/aesthetics/chunky-tile": {
|
|
152
|
+
"style": "./dist/tw/aesthetics/chunky-tile.css",
|
|
153
|
+
"import": "./dist/tw/aesthetics/chunky-tile.css",
|
|
154
|
+
"default": "./dist/tw/aesthetics/chunky-tile.css"
|
|
155
|
+
},
|
|
156
|
+
"./native": {
|
|
157
|
+
"style": "./dist/native.css",
|
|
158
|
+
"import": "./dist/native.css",
|
|
159
|
+
"default": "./dist/native.css"
|
|
160
|
+
},
|
|
161
|
+
"./package.json": "./package.json"
|
|
33
162
|
},
|
|
34
163
|
"publishConfig": {
|
|
35
164
|
"access": "public"
|
|
36
165
|
},
|
|
166
|
+
"scripts": {
|
|
167
|
+
"clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\"",
|
|
168
|
+
"dev": "pnpm --filter=@codenhub/styles-dev dev",
|
|
169
|
+
"debug": "pnpm build && pnpm --filter=@codenhub/styles-debug dev",
|
|
170
|
+
"demo": "pnpm build && pnpm --filter=@codenhub/styles-demo dev",
|
|
171
|
+
"build": "pnpm clean && pnpm build:styles && pnpm build:aesthetics && pnpm build:tw",
|
|
172
|
+
"build:styles": "tailwindcss -i ./src/index.css -o ./dist/index.css --minify && tailwindcss -i ./src/theme.css -o ./dist/theme.css --minify && tailwindcss -i ./src/components/index.css -o ./dist/components.css --minify && tailwindcss -i ./src/native.css -o ./dist/native.css --minify",
|
|
173
|
+
"build:aesthetics": "tailwindcss -i ./src/aesthetics/index.css -o ./dist/aesthetics/index.css --minify && tailwindcss -i ./src/aesthetics/neobrutalism.css -o ./dist/aesthetics/neobrutalism.css --minify && tailwindcss -i ./src/aesthetics/glass.css -o ./dist/aesthetics/glass.css --minify && tailwindcss -i ./src/aesthetics/pixel.css -o ./dist/aesthetics/pixel.css --minify && tailwindcss -i ./src/aesthetics/chunky-tile.css -o ./dist/aesthetics/chunky-tile.css --minify",
|
|
174
|
+
"build:tw": "node scripts/build-tw.mjs",
|
|
175
|
+
"prepublishOnly": "pnpm build && pnpm typecheck && pnpm test",
|
|
176
|
+
"status:npm": "npm view @codenhub/styles version dist-tags time --json && npm dist-tag ls @codenhub/styles && npm access get status @codenhub/styles",
|
|
177
|
+
"status:pack": "npm pack --dry-run --ignore-scripts",
|
|
178
|
+
"test": "vitest run",
|
|
179
|
+
"test:browser": "playwright test",
|
|
180
|
+
"test:browser:watch": "playwright test --ui",
|
|
181
|
+
"test:coverage": "pnpm test",
|
|
182
|
+
"test:watch": "vitest --watch",
|
|
183
|
+
"typecheck": "tsc -b"
|
|
184
|
+
},
|
|
37
185
|
"devDependencies": {
|
|
38
|
-
"@playwright/test": "
|
|
39
|
-
"@tailwindcss/cli": "
|
|
40
|
-
"@types/node": "
|
|
41
|
-
"tailwindcss": "
|
|
42
|
-
"typescript": "
|
|
186
|
+
"@playwright/test": "catalog:",
|
|
187
|
+
"@tailwindcss/cli": "catalog:",
|
|
188
|
+
"@types/node": "catalog:",
|
|
189
|
+
"tailwindcss": "catalog:",
|
|
190
|
+
"typescript": "catalog:",
|
|
191
|
+
"vitest": "catalog:"
|
|
43
192
|
},
|
|
44
193
|
"peerDependencies": {
|
|
45
194
|
"tailwindcss": ">=4.0.0"
|
|
@@ -49,16 +198,10 @@
|
|
|
49
198
|
"optional": true
|
|
50
199
|
}
|
|
51
200
|
},
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"status:npm": "npm view @codenhub/styles version dist-tags time --json && npm dist-tag ls @codenhub/styles && npm access get status @codenhub/styles",
|
|
58
|
-
"status:pack": "npm pack --dry-run",
|
|
59
|
-
"test": "pnpm typecheck && pnpm build && pnpm test:visual",
|
|
60
|
-
"test:visual": "playwright test",
|
|
61
|
-
"test:watch": "playwright test --ui",
|
|
62
|
-
"typecheck": "tsc --project tsconfig.json --noEmit"
|
|
201
|
+
"codenhub": {
|
|
202
|
+
"docs": {
|
|
203
|
+
"label": "StyleKit",
|
|
204
|
+
"status": "active"
|
|
205
|
+
}
|
|
63
206
|
}
|
|
64
|
-
}
|
|
207
|
+
}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
@import "tailwindcss";
|
|
2
|
-
@import "../theme.css";
|
|
3
|
-
|
|
4
|
-
@utility btn {
|
|
5
|
-
--button-color: var(--color-text);
|
|
6
|
-
--button-contrast: var(--color-text-contrast);
|
|
7
|
-
--button-hover: var(--color-text-hover);
|
|
8
|
-
--button-subtle: var(--color-text-subtle);
|
|
9
|
-
--button-strong: var(--color-text-strong);
|
|
10
|
-
--button-bg: var(--button-color);
|
|
11
|
-
--button-fg: var(--button-contrast);
|
|
12
|
-
--button-border: var(--button-bg);
|
|
13
|
-
--button-hover-bg: var(--button-hover);
|
|
14
|
-
--button-hover-fg: var(--button-fg);
|
|
15
|
-
--button-hover-border: var(--button-hover-bg);
|
|
16
|
-
--button-text: var(--button-strong);
|
|
17
|
-
--button-soft-bg: var(--button-subtle);
|
|
18
|
-
--button-subtle-hover-bg: color-mix(in srgb, var(--button-soft-bg) 80%, transparent);
|
|
19
|
-
--button-soft-hover-bg: color-mix(in srgb, var(--button-soft-bg) 84%, var(--button-text));
|
|
20
|
-
--button-spinner: var(--button-fg);
|
|
21
|
-
|
|
22
|
-
@apply relative inline-flex min-h-(--control-height,2.5rem) w-fit items-center justify-center gap-2 rounded-(--radius-control) bg-(--button-bg) px-4 py-2 font-semibold whitespace-nowrap text-(--button-fg) no-underline transition-[background-color,border-color,color,opacity,transform] duration-(--motion-duration-fast) ease-(--motion-ease) select-none;
|
|
23
|
-
border: var(--border-width) solid var(--button-border);
|
|
24
|
-
|
|
25
|
-
&.primary {
|
|
26
|
-
--button-color: var(--color-primary);
|
|
27
|
-
--button-contrast: var(--color-primary-contrast);
|
|
28
|
-
--button-hover: var(--color-primary-hover);
|
|
29
|
-
--button-subtle: var(--color-primary-subtle);
|
|
30
|
-
--button-strong: var(--color-primary-strong);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&.secondary {
|
|
34
|
-
--button-color: var(--color-accent);
|
|
35
|
-
--button-contrast: var(--color-accent-contrast);
|
|
36
|
-
--button-hover: var(--color-accent-hover);
|
|
37
|
-
--button-subtle: var(--color-accent-subtle);
|
|
38
|
-
--button-strong: var(--color-accent-strong);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&.success {
|
|
42
|
-
--button-color: var(--color-success);
|
|
43
|
-
--button-contrast: var(--color-success-contrast);
|
|
44
|
-
--button-hover: var(--color-success-hover);
|
|
45
|
-
--button-subtle: var(--color-success-subtle);
|
|
46
|
-
--button-strong: var(--color-success-strong);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&.warning {
|
|
50
|
-
--button-color: var(--color-warning);
|
|
51
|
-
--button-contrast: var(--color-warning-contrast);
|
|
52
|
-
--button-hover: var(--color-warning-hover);
|
|
53
|
-
--button-subtle: var(--color-warning-subtle);
|
|
54
|
-
--button-strong: var(--color-warning-strong);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&.destructive,
|
|
58
|
-
&.danger,
|
|
59
|
-
&.error {
|
|
60
|
-
--button-color: var(--color-destructive);
|
|
61
|
-
--button-contrast: var(--color-destructive-contrast);
|
|
62
|
-
--button-hover: var(--color-destructive-hover);
|
|
63
|
-
--button-subtle: var(--color-destructive-subtle);
|
|
64
|
-
--button-strong: var(--color-destructive-strong);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&.info {
|
|
68
|
-
--button-color: var(--color-info);
|
|
69
|
-
--button-contrast: var(--color-info-contrast);
|
|
70
|
-
--button-hover: var(--color-info-hover);
|
|
71
|
-
--button-subtle: var(--color-info-subtle);
|
|
72
|
-
--button-strong: var(--color-info-strong);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&.out {
|
|
76
|
-
--button-spinner: var(--button-text);
|
|
77
|
-
|
|
78
|
-
@apply bg-transparent text-(--button-color);
|
|
79
|
-
border: calc(var(--border-width) * 2) solid var(--button-color);
|
|
80
|
-
|
|
81
|
-
&:not(:disabled, .disabled, [aria-disabled="true"], [data-disabled]):hover {
|
|
82
|
-
@apply border-(--button-color) bg-(--button-subtle) text-(--button-color);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
&.fill {
|
|
86
|
-
&:not(:disabled, .disabled, [aria-disabled="true"], [data-disabled]):hover {
|
|
87
|
-
@apply border-(--button-color) bg-(--button-color) text-(--button-contrast);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&.ghost {
|
|
93
|
-
--button-spinner: var(--button-text);
|
|
94
|
-
|
|
95
|
-
@apply border-transparent bg-transparent text-(--button-text);
|
|
96
|
-
|
|
97
|
-
&:not(:disabled, .disabled, [aria-disabled="true"], [data-disabled]):hover {
|
|
98
|
-
@apply border-transparent bg-(--button-subtle-hover-bg) text-(--button-text);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
&.soft {
|
|
103
|
-
--button-spinner: var(--button-text);
|
|
104
|
-
|
|
105
|
-
@apply border-transparent bg-(--button-soft-bg) text-(--button-text);
|
|
106
|
-
|
|
107
|
-
&:not(:disabled, .disabled, [aria-disabled="true"], [data-disabled]):hover {
|
|
108
|
-
@apply border-transparent bg-(--button-soft-hover-bg) text-(--button-text);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&.sm {
|
|
113
|
-
@apply min-h-8 px-3 py-1 text-sm;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
&.lg {
|
|
117
|
-
@apply min-h-12 px-5 py-2.5 text-[1.0625rem];
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
&.icon {
|
|
121
|
-
@apply aspect-square min-w-(--control-height,2.5rem) p-2;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
&.pill {
|
|
125
|
-
@apply rounded-full;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
&:not(:disabled, .disabled, [aria-disabled="true"], [data-disabled]):hover {
|
|
129
|
-
&:not(.out, .ghost, .soft) {
|
|
130
|
-
@apply border-(--button-hover-border) bg-(--button-hover-bg) text-(--button-hover-fg);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
&:disabled,
|
|
135
|
-
&.disabled,
|
|
136
|
-
&[aria-disabled="true"],
|
|
137
|
-
&[data-disabled] {
|
|
138
|
-
@apply cursor-not-allowed;
|
|
139
|
-
|
|
140
|
-
opacity: 0.58;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
&.loading {
|
|
144
|
-
@apply pointer-events-none text-transparent! transition-[opacity,transform];
|
|
145
|
-
|
|
146
|
-
&::after {
|
|
147
|
-
@apply absolute block size-4 -translate-x-1/2 -translate-y-1/2 rounded-full bg-(--button-spinner);
|
|
148
|
-
|
|
149
|
-
top: calc(50% + var(--border-width));
|
|
150
|
-
left: calc(50% + var(--border-width));
|
|
151
|
-
content: "";
|
|
152
|
-
@apply ai;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
@import "tailwindcss";
|
|
2
|
-
@import "../theme.css";
|
|
3
|
-
|
|
4
|
-
@keyframes anim-skeleton {
|
|
5
|
-
0% {
|
|
6
|
-
background-position: 200% 0;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
100% {
|
|
10
|
-
background-position: -200% 0;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@utility alert {
|
|
15
|
-
--feedback-color: var(--color-text);
|
|
16
|
-
--feedback-contrast: var(--color-text-contrast);
|
|
17
|
-
--feedback-surface: color-mix(in srgb, var(--feedback-color) 12%, var(--color-background));
|
|
18
|
-
--feedback-border: color-mix(in srgb, var(--feedback-color) 42%, var(--color-border));
|
|
19
|
-
|
|
20
|
-
@apply flex rounded-(--radius-surface) bg-(--feedback-surface) p-4 leading-5 text-(--feedback-color);
|
|
21
|
-
border: var(--border-width) solid var(--feedback-border);
|
|
22
|
-
|
|
23
|
-
&.primary {
|
|
24
|
-
--feedback-color: var(--color-primary);
|
|
25
|
-
--feedback-contrast: var(--color-primary-contrast);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&.secondary {
|
|
29
|
-
--feedback-color: var(--color-accent);
|
|
30
|
-
--feedback-contrast: var(--color-accent-contrast);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&.success {
|
|
34
|
-
--feedback-color: var(--color-success);
|
|
35
|
-
--feedback-contrast: var(--color-success-contrast);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&.warning {
|
|
39
|
-
--feedback-color: var(--color-warning);
|
|
40
|
-
--feedback-contrast: var(--color-warning-contrast);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&.destructive,
|
|
44
|
-
&.danger,
|
|
45
|
-
&.error {
|
|
46
|
-
--feedback-color: var(--color-destructive);
|
|
47
|
-
--feedback-contrast: var(--color-destructive-contrast);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&.info {
|
|
51
|
-
--feedback-color: var(--color-info);
|
|
52
|
-
--feedback-contrast: var(--color-info-contrast);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&.flat {
|
|
56
|
-
@apply bg-(--feedback-color) text-(--feedback-contrast);
|
|
57
|
-
border-color: var(--feedback-color);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&.soft {
|
|
61
|
-
@apply border-transparent bg-(--feedback-surface) text-(--feedback-color);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&.left-accent {
|
|
65
|
-
@apply border-y-transparent border-r-transparent bg-(--feedback-surface) text-(--feedback-color);
|
|
66
|
-
border-left-width: 4px;
|
|
67
|
-
border-left-color: var(--feedback-color);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&.icon {
|
|
71
|
-
@apply relative pl-11;
|
|
72
|
-
|
|
73
|
-
&::before {
|
|
74
|
-
@apply absolute top-4 left-4 block size-5 bg-current;
|
|
75
|
-
|
|
76
|
-
content: "";
|
|
77
|
-
mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
|
|
78
|
-
-webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
|
|
79
|
-
mask-size: contain;
|
|
80
|
-
-webkit-mask-size: contain;
|
|
81
|
-
mask-repeat: no-repeat;
|
|
82
|
-
-webkit-mask-repeat: no-repeat;
|
|
83
|
-
mask-position: center;
|
|
84
|
-
-webkit-mask-position: center;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&.success::before {
|
|
88
|
-
mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
|
|
89
|
-
-webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&.warning::before {
|
|
93
|
-
mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
|
|
94
|
-
-webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&.destructive::before,
|
|
98
|
-
&.danger::before,
|
|
99
|
-
&.error::before {
|
|
100
|
-
mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m15 9-6 6'/%3E%3Cpath d='m9 9 6 6'/%3E%3C/svg%3E");
|
|
101
|
-
-webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m15 9-6 6'/%3E%3Cpath d='m9 9 6 6'/%3E%3C/svg%3E");
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&.info::before {
|
|
105
|
-
mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
|
|
106
|
-
-webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
@utility badge {
|
|
112
|
-
--feedback-color: var(--color-text);
|
|
113
|
-
--feedback-contrast: var(--color-text-contrast);
|
|
114
|
-
--feedback-surface: color-mix(in srgb, var(--feedback-color) 12%, var(--color-background));
|
|
115
|
-
--feedback-border: color-mix(in srgb, var(--feedback-color) 42%, var(--color-border));
|
|
116
|
-
|
|
117
|
-
@apply inline-flex min-h-6 w-fit items-center gap-1 rounded-full bg-(--feedback-surface) px-2.5 text-xs font-bold text-(--feedback-color);
|
|
118
|
-
border: var(--border-width) solid var(--feedback-border);
|
|
119
|
-
|
|
120
|
-
&.primary {
|
|
121
|
-
--feedback-color: var(--color-primary);
|
|
122
|
-
--feedback-contrast: var(--color-primary-contrast);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&.secondary {
|
|
126
|
-
--feedback-color: var(--color-accent);
|
|
127
|
-
--feedback-contrast: var(--color-accent-contrast);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
&.success {
|
|
131
|
-
--feedback-color: var(--color-success);
|
|
132
|
-
--feedback-contrast: var(--color-success-contrast);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
&.warning {
|
|
136
|
-
--feedback-color: var(--color-warning);
|
|
137
|
-
--feedback-contrast: var(--color-warning-contrast);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
&.destructive,
|
|
141
|
-
&.danger,
|
|
142
|
-
&.error {
|
|
143
|
-
--feedback-color: var(--color-destructive);
|
|
144
|
-
--feedback-contrast: var(--color-destructive-contrast);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
&.info {
|
|
148
|
-
--feedback-color: var(--color-info);
|
|
149
|
-
--feedback-contrast: var(--color-info-contrast);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
&.flat {
|
|
153
|
-
@apply bg-(--feedback-color) text-(--feedback-contrast);
|
|
154
|
-
border-color: var(--feedback-color);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
&.soft {
|
|
158
|
-
@apply border-transparent;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
@utility skeleton {
|
|
163
|
-
@apply min-h-4 w-full rounded-(--radius-control);
|
|
164
|
-
|
|
165
|
-
animation: anim-skeleton calc(var(--motion-duration-slow) * 4) linear infinite;
|
|
166
|
-
background: linear-gradient(90deg, var(--color-surface), var(--color-foreground), var(--color-surface));
|
|
167
|
-
background-size: 200% 100%;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
@utility progress {
|
|
171
|
-
--progress-color: var(--color-text);
|
|
172
|
-
--progress-surface: color-mix(in srgb, var(--color-text-subtle) 60%, transparent);
|
|
173
|
-
|
|
174
|
-
@apply h-2.5 w-full overflow-hidden rounded-full bg-(--progress-surface);
|
|
175
|
-
|
|
176
|
-
> * {
|
|
177
|
-
@apply block h-full transition-[width] duration-(--motion-duration-slow) ease-(--motion-ease);
|
|
178
|
-
|
|
179
|
-
background-color: var(--progress-color);
|
|
180
|
-
width: var(--progress-value, 0%);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
&.primary {
|
|
184
|
-
--progress-color: var(--color-primary);
|
|
185
|
-
--progress-surface: color-mix(in srgb, var(--color-primary-subtle) 60%, transparent);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
&.secondary {
|
|
189
|
-
--progress-color: var(--color-accent);
|
|
190
|
-
--progress-surface: color-mix(in srgb, var(--color-accent-subtle) 60%, transparent);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
&.success {
|
|
194
|
-
--progress-color: var(--color-success);
|
|
195
|
-
--progress-surface: color-mix(in srgb, var(--color-success-subtle) 60%, transparent);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
&.warning {
|
|
199
|
-
--progress-color: var(--color-warning);
|
|
200
|
-
--progress-surface: color-mix(in srgb, var(--color-warning-subtle) 60%, transparent);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
&.destructive,
|
|
204
|
-
&.danger,
|
|
205
|
-
&.error {
|
|
206
|
-
--progress-color: var(--color-destructive);
|
|
207
|
-
--progress-surface: color-mix(in srgb, var(--color-destructive-subtle) 60%, transparent);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
&.info {
|
|
211
|
-
--progress-color: var(--color-info);
|
|
212
|
-
--progress-surface: color-mix(in srgb, var(--color-info-subtle) 60%, transparent);
|
|
213
|
-
}
|
|
214
|
-
}
|