@codenhub/styles 0.0.4 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/LICENSE +201 -201
  2. package/NOTICE +27 -0
  3. package/README.md +60 -92
  4. package/dist/aesthetics/chunky-tile.css +1 -0
  5. package/dist/aesthetics/glass.css +1 -0
  6. package/dist/aesthetics/index.css +2 -0
  7. package/dist/aesthetics/neobrutalism.css +1 -0
  8. package/dist/aesthetics/pixel.css +1 -0
  9. package/dist/components.css +2 -2
  10. package/dist/index.css +2 -2
  11. package/dist/native.css +2 -0
  12. package/dist/theme.css +2 -2
  13. package/dist/tw/aesthetics/chunky-tile.css +107 -0
  14. package/dist/tw/aesthetics/glass.css +66 -0
  15. package/dist/tw/aesthetics/index.css +9 -0
  16. package/dist/tw/aesthetics/neobrutalism.css +63 -0
  17. package/dist/tw/aesthetics/pixel.css +88 -0
  18. package/dist/tw/box.css +185 -0
  19. package/dist/tw/components/button.css +88 -0
  20. package/dist/tw/components/feedback.css +163 -0
  21. package/dist/tw/components/form.css +601 -0
  22. package/dist/tw/components/index.css +18 -0
  23. package/dist/tw/components/loader.css +122 -0
  24. package/dist/tw/components/surface.css +98 -0
  25. package/dist/tw/components/tooltip.css +132 -0
  26. package/dist/tw/elevation.css +39 -0
  27. package/dist/tw/index.css +12 -0
  28. package/dist/tw/intent.css +189 -0
  29. package/dist/tw/native.css +203 -0
  30. package/dist/tw/presentation.css +77 -0
  31. package/dist/tw/reset.css +142 -0
  32. package/dist/tw/theme.css +218 -0
  33. package/dist/tw/typography.css +34 -0
  34. package/dist/tw/utilities/content.css +349 -0
  35. package/dist/tw/utilities/index.css +6 -0
  36. package/dist/tw/utilities/layout.css +107 -0
  37. package/docs/accessibility.md +82 -0
  38. package/docs/concepts.md +94 -0
  39. package/docs/index.md +62 -0
  40. package/docs/integrating/astro.md +29 -0
  41. package/docs/integrating/index.md +32 -0
  42. package/docs/integrating/nextjs.md +44 -0
  43. package/docs/integrating/svelte.md +37 -0
  44. package/docs/integrating/tailwind.md +40 -0
  45. package/docs/integrating/vue.md +25 -0
  46. package/docs/setup.md +116 -0
  47. package/docs/usage/aesthetics.md +197 -0
  48. package/docs/usage/buttons.md +74 -0
  49. package/docs/usage/composing.md +218 -0
  50. package/docs/usage/content-and-layout.md +200 -0
  51. package/docs/usage/customizing.md +213 -0
  52. package/docs/usage/feedback.md +117 -0
  53. package/docs/usage/forms.md +177 -0
  54. package/docs/usage/index.md +32 -0
  55. package/docs/usage/theming.md +210 -0
  56. package/docs/usage/tooltips.md +45 -0
  57. package/llms-full.txt +2122 -0
  58. package/llms.txt +26 -0
  59. package/package.json +95 -29
  60. package/src/components/button.css +0 -155
  61. package/src/components/feedback.css +0 -214
  62. package/src/components/form.css +0 -303
  63. package/src/components/index.css +0 -9
  64. package/src/components/loader.css +0 -56
  65. package/src/components/surface.css +0 -6
  66. package/src/components/tooltip.css +0 -60
  67. package/src/index.css +0 -7
  68. package/src/overrides.css +0 -76
  69. package/src/theme.css +0 -234
  70. package/src/typography.css +0 -30
  71. 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.0.4",
3
+ "version": "0.1.0",
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,88 @@
12
12
  },
13
13
  "files": [
14
14
  "dist",
15
- "src",
16
- "NOTICE"
15
+ "NOTICE",
16
+ "README.md",
17
+ "docs",
18
+ "llms.txt",
19
+ "llms-full.txt"
17
20
  ],
18
21
  "type": "module",
19
22
  "exports": {
20
- ".": "./dist/index.css",
21
- "./theme": "./dist/theme.css",
22
- "./components": "./dist/components.css",
23
- "./tw": "./src/index.css",
24
- "./tw/theme": "./src/theme.css",
25
- "./tw/components": "./src/components/index.css",
26
- "./tw/surface": "./src/components/surface.css",
27
- "./tw/button": "./src/components/button.css",
28
- "./tw/form": "./src/components/form.css",
29
- "./tw/feedback": "./src/components/feedback.css",
30
- "./tw/loader": "./src/components/loader.css",
31
- "./tw/tooltip": "./src/components/tooltip.css",
32
- "./tw/utilities": "./src/utilities.css"
23
+ ".": {
24
+ "style": "./dist/index.css",
25
+ "import": "./dist/index.css",
26
+ "default": "./dist/index.css"
27
+ },
28
+ "./theme": {
29
+ "style": "./dist/theme.css",
30
+ "import": "./dist/theme.css",
31
+ "default": "./dist/theme.css"
32
+ },
33
+ "./components": {
34
+ "style": "./dist/components.css",
35
+ "import": "./dist/components.css",
36
+ "default": "./dist/components.css"
37
+ },
38
+ "./aesthetics": {
39
+ "style": "./dist/aesthetics/index.css",
40
+ "import": "./dist/aesthetics/index.css",
41
+ "default": "./dist/aesthetics/index.css"
42
+ },
43
+ "./aesthetics/neobrutalism": {
44
+ "style": "./dist/aesthetics/neobrutalism.css",
45
+ "import": "./dist/aesthetics/neobrutalism.css",
46
+ "default": "./dist/aesthetics/neobrutalism.css"
47
+ },
48
+ "./aesthetics/glass": {
49
+ "style": "./dist/aesthetics/glass.css",
50
+ "import": "./dist/aesthetics/glass.css",
51
+ "default": "./dist/aesthetics/glass.css"
52
+ },
53
+ "./aesthetics/pixel": {
54
+ "style": "./dist/aesthetics/pixel.css",
55
+ "import": "./dist/aesthetics/pixel.css",
56
+ "default": "./dist/aesthetics/pixel.css"
57
+ },
58
+ "./aesthetics/chunky-tile": {
59
+ "style": "./dist/aesthetics/chunky-tile.css",
60
+ "import": "./dist/aesthetics/chunky-tile.css",
61
+ "default": "./dist/aesthetics/chunky-tile.css"
62
+ },
63
+ "./tw": "./dist/tw/index.css",
64
+ "./tw/theme": "./dist/tw/theme.css",
65
+ "./tw/components": "./dist/tw/components/index.css",
66
+ "./tw/surface": "./dist/tw/components/surface.css",
67
+ "./tw/button": "./dist/tw/components/button.css",
68
+ "./tw/form": "./dist/tw/components/form.css",
69
+ "./tw/feedback": "./dist/tw/components/feedback.css",
70
+ "./tw/loader": "./dist/tw/components/loader.css",
71
+ "./tw/tooltip": "./dist/tw/components/tooltip.css",
72
+ "./tw/reset": "./dist/tw/reset.css",
73
+ "./tw/native": "./dist/tw/native.css",
74
+ "./tw/typography": "./dist/tw/typography.css",
75
+ "./tw/utilities": "./dist/tw/utilities/index.css",
76
+ "./tw/aesthetics": "./dist/tw/aesthetics/index.css",
77
+ "./tw/aesthetics/neobrutalism": "./dist/tw/aesthetics/neobrutalism.css",
78
+ "./tw/aesthetics/glass": "./dist/tw/aesthetics/glass.css",
79
+ "./tw/aesthetics/pixel": "./dist/tw/aesthetics/pixel.css",
80
+ "./tw/aesthetics/chunky-tile": "./dist/tw/aesthetics/chunky-tile.css",
81
+ "./native": {
82
+ "style": "./dist/native.css",
83
+ "import": "./dist/native.css",
84
+ "default": "./dist/native.css"
85
+ }
33
86
  },
34
87
  "publishConfig": {
35
88
  "access": "public"
36
89
  },
37
90
  "devDependencies": {
38
- "@playwright/test": "^1.57.0",
39
- "@tailwindcss/cli": "^4.3.0",
40
- "@types/node": "^25.9.1",
41
- "tailwindcss": "^4.3.0",
42
- "typescript": "^6.0.3"
91
+ "@playwright/test": "^1.61.1",
92
+ "@tailwindcss/cli": "^4.3.2",
93
+ "@types/node": "^26.1.0",
94
+ "tailwindcss": "^4.3.2",
95
+ "typescript": "^6.0.3",
96
+ "vitest": "^4.1.10"
43
97
  },
44
98
  "peerDependencies": {
45
99
  "tailwindcss": ">=4.0.0"
@@ -49,16 +103,28 @@
49
103
  "optional": true
50
104
  }
51
105
  },
106
+ "codenhub": {
107
+ "docs": {
108
+ "label": "StyleKit",
109
+ "status": "active"
110
+ }
111
+ },
52
112
  "scripts": {
53
- "dev": "pnpm build && pnpm --filter=@codenhub/styles-dev dev",
113
+ "clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\"",
114
+ "dev": "pnpm --filter=@codenhub/styles-dev dev",
54
115
  "debug": "pnpm build && pnpm --filter=@codenhub/styles-debug dev",
55
- "build": "pnpm build:styles",
56
- "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",
116
+ "demo": "pnpm build && pnpm --filter=@codenhub/styles-demo dev",
117
+ "build": "pnpm clean && pnpm build:styles && pnpm build:aesthetics && pnpm build:tw",
118
+ "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",
119
+ "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",
120
+ "build:tw": "node -e \"import('node:fs').then(fs => fs.cpSync('src', 'dist/tw', { recursive: true }))\"",
57
121
  "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"
122
+ "status:pack": "npm pack --dry-run --ignore-scripts",
123
+ "test": "vitest run",
124
+ "test:browser": "playwright test",
125
+ "test:browser:watch": "playwright test --ui",
126
+ "test:coverage": "pnpm test",
127
+ "test:watch": "vitest --watch",
128
+ "typecheck": "tsc -b"
63
129
  }
64
130
  }
@@ -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
- }