@kadoui/tailwindcss 1.0.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.
package/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # Kadoui-css
2
+
3
+ The TailwindCSS styles for build robust UIs
4
+
5
+ ---
6
+
7
+ ### Add the following code to your main CSS file
8
+
9
+ ```css
10
+ @import "tailwindcss";
11
+ @import "@kadoui/css";
12
+
13
+ @theme {
14
+ --font-*: initial;
15
+ --font-beautifulFont: var(--font-beautifulFont);
16
+
17
+ --color-*: initial;
18
+ --color-background: #fafafa;
19
+ --color-background-thick: #efefef;
20
+ --color-foreground: #151515;
21
+ --color-beautifulRed: #9e0000;
22
+ /* You can add any colors */
23
+
24
+ --color-palette: var(--color-foreground);
25
+ --color-brush: var(--color-background);
26
+ }
27
+
28
+ [data-theme="dark"] {
29
+ --color-background: #151515;
30
+ --color-background-thick: #101010;
31
+ --color-foreground: #fafafa;
32
+ }
33
+
34
+ @custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));
35
+
36
+ /* If you add a color, please add its palette as well */
37
+ @utility palette-background {
38
+ --color-palette: var(--color-background);
39
+ --color-brush: var(--color-foreground);
40
+ }
41
+
42
+ @utility palette-background-thick {
43
+ --color-palette: var(--color-background-thick);
44
+ --color-brush: var(--color-foreground);
45
+ }
46
+
47
+ @utility palette-foreground {
48
+ --color-palette: var(--color-foreground);
49
+ --color-brush: var(--color-background);
50
+ }
51
+
52
+ @utility palette-beautifulRed {
53
+ --color-palette: var(--color-beautifulRed);
54
+ --color-brush: var(--color-background);
55
+ }
56
+
57
+ @layer base {
58
+ html {
59
+ @apply font-beautifulFont;
60
+ }
61
+ }
62
+ ```
63
+
64
+ ---
65
+
66
+ ### We recommend that you develop the UI of your app with this system
67
+
68
+ ```
69
+ Media query:
70
+ sm < mobile
71
+ sm > tablet
72
+ lg < tablet
73
+ lg > desktop
74
+
75
+ Spacing:
76
+ lvl-1: 0.5
77
+ lvl-2: 1.5
78
+ lvl-3: 3
79
+ lvl-4: 6
80
+ lvl-5: 9
81
+ lvl-6: 12
82
+ lvl-7: 16
83
+ lvl-8: 20
84
+
85
+ Color shades:
86
+ lvl-1: 100%
87
+ lvl-2: 90%
88
+ lvl-3: 80%
89
+ lvl-4: 50%
90
+ lvl-5: 20%
91
+ lvl-6: 10%
92
+
93
+ Z-index layers:
94
+ lvl-1: 10
95
+ lvl-2: 20
96
+ lvl-3: 30
97
+ lvl-4: 40
98
+ lvl-5: 50
99
+
100
+ Border radius:
101
+ lvl-1: rounded
102
+ lvl-2: rounded-md
103
+ lvl-3: rounded-lg
104
+ lvl-4: rounded-xl
105
+ lvl-5: rounded-2xl
106
+
107
+ Heading:
108
+ text-xl sm:text-2xl lg:text-5xl font-black
109
+
110
+ Title:
111
+ text-base sm:text-lg lg:text-xl font-bold
112
+
113
+ Paragraph:
114
+ text-sm sm:text-base
115
+ ```
116
+
117
+ ---
118
+
119
+ ### Kadoui toolchain
120
+
121
+ Consider that `Kadoui-css` should be mix by a logical UI package, You can use `Kadoui-react` or build your own.
122
+
123
+ [Read about `Kadoui-react`](https://www.npmjs.com/package/@kadoui/react)
124
+
125
+ ---
126
+
127
+ Written with ❤️ by [Farzad Vahdati](https://github.com/FarzadVav)
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@kadoui/tailwindcss",
3
+ "version": "1.0.0",
4
+ "description": "Kadoui TailwindCSS styles",
5
+ "author": "FarzadVav",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "repository": "https://github.com/FarzadVav/kadoui/packages/kadoui-tailwindcss",
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "exports": {
13
+ ".": "./src/index.css",
14
+ "./postcss": "./postcss.config.js"
15
+ },
16
+ "keywords": [
17
+ "@kadoui/tailwindcss",
18
+ "kado",
19
+ "ui",
20
+ "css",
21
+ "tailwind"
22
+ ],
23
+ "devDependencies": {
24
+ "postcss": "8.5.6",
25
+ "tailwindcss": "4.1.18",
26
+ "@tailwindcss/postcss": "4.1.18"
27
+ },
28
+ "packageManager": "pnpm@10.25.0"
29
+ }
@@ -0,0 +1,6 @@
1
+ // Optional PostCSS configuration for apps that need it
2
+ export const kadouiPostcssConfig = {
3
+ plugins: {
4
+ "@tailwindcss/postcss": {},
5
+ },
6
+ };
package/src/index.css ADDED
@@ -0,0 +1,32 @@
1
+ @import "tailwindcss";
2
+
3
+ /* Utilities */
4
+ @import "./styles/base.css";
5
+ @import "./styles/button.css";
6
+ @import "./styles/input.css";
7
+ @import "./styles/badge.css";
8
+ @import "./styles/card.css";
9
+ @import "./styles/kbd.css";
10
+ @import "./styles/alert.css";
11
+ @import "./styles/join.css";
12
+ @import "./styles/position.css";
13
+ @import "./styles/separator.css";
14
+
15
+ /* Components */
16
+ @import "./styles/components/affix.css";
17
+ @import "./styles/components/carousel.css";
18
+ @import "./styles/components/choice.css";
19
+ @import "./styles/components/show-more.css";
20
+ @import "./styles/components/accordion.css";
21
+ @import "./styles/components/context-menu.css";
22
+ @import "./styles/components/popover.css";
23
+ @import "./styles/components/drawer.css";
24
+ @import "./styles/components/modal.css";
25
+ @import "./styles/components/otp.css";
26
+ @import "./styles/components/pagination.css";
27
+ @import "./styles/components/progress.css";
28
+ @import "./styles/components/rating.css";
29
+ @import "./styles/components/select-box.css";
30
+ @import "./styles/components/sheet.css";
31
+ @import "./styles/components/breadcrumbs.css";
32
+ @import "./styles/components/spoiler.css";
@@ -0,0 +1,10 @@
1
+ @utility alert {
2
+ @apply flex items-center bg-palette/10 text-palette border border-palette;
3
+
4
+ min-height: var(--element-h);
5
+ font-size: var(--element-text);
6
+ line-height: var(--element-line);
7
+ padding: var(--element-spacing);
8
+ gap: calc(var(--element-spacing));
9
+ border-radius: var(--element-rounded);
10
+ }
@@ -0,0 +1,25 @@
1
+ @utility badge {
2
+ --element-w: max-content;
3
+
4
+ @apply flex items-center justify-center max-w-full;
5
+
6
+ width: var(--element-w);
7
+ height: var(--element-h);
8
+ padding: 0 var(--element-spacing);
9
+ gap: calc(var(--element-spacing) / 1.5);
10
+ border-radius: var(--element-rounded);
11
+ font-size: var(--element-text);
12
+ line-height: var(--element-line);
13
+ }
14
+
15
+ @utility badge-fill {
16
+ @apply bg-palette text-brush;
17
+ }
18
+
19
+ @utility badge-outline {
20
+ @apply border border-palette text-palette;
21
+ }
22
+
23
+ @utility badge-soft {
24
+ @apply bg-palette/10 text-palette;
25
+ }
@@ -0,0 +1,176 @@
1
+ /* Base styles */
2
+
3
+ @layer base {
4
+ html {
5
+ @apply scroll-smooth;
6
+ }
7
+
8
+ body {
9
+ @apply bg-background text-foreground;
10
+ }
11
+
12
+ * {
13
+ @apply select-none;
14
+
15
+ scrollbar-width: thin;
16
+ scrollbar-color: var(--color-foreground) transparent;
17
+ }
18
+
19
+ a,
20
+ span,
21
+ label {
22
+ @apply inline-block;
23
+ }
24
+
25
+ button {
26
+ @apply cursor-pointer;
27
+ }
28
+
29
+ input:focus,
30
+ textarea:focus {
31
+ @apply outline-none;
32
+ }
33
+
34
+ textarea {
35
+ @apply resize-none;
36
+ }
37
+ }
38
+
39
+ /* Dark mode */
40
+
41
+ @custom-variant dark (&:where([data-theme=dark], [data-theme=dark] *));
42
+
43
+ /* Palette colors */
44
+
45
+ @utility palette-background {
46
+ --color-palette: var(--color-background);
47
+ --color-brush: var(--color-foreground);
48
+ }
49
+
50
+ @utility palette-foreground {
51
+ --color-palette: var(--color-foreground);
52
+ --color-brush: var(--color-background);
53
+ }
54
+
55
+ @utility palette-primary {
56
+ --color-palette: var(--color-primary);
57
+ --color-brush: var(--color-primary-foreground);
58
+ }
59
+
60
+ @utility palette-secondary {
61
+ --color-palette: var(--color-secondary);
62
+ --color-brush: var(--color-secondary-foreground);
63
+ }
64
+
65
+ @utility palette-error {
66
+ --color-palette: var(--color-error);
67
+ --color-brush: var(--color-error-foreground);
68
+ }
69
+
70
+ @utility palette-success {
71
+ --color-palette: var(--color-success);
72
+ --color-brush: var(--color-success-foreground);
73
+ }
74
+
75
+ @utility palette-warning {
76
+ --color-palette: var(--color-warning);
77
+ --color-brush: var(--color-warning-foreground);
78
+ }
79
+
80
+ @utility palette-info {
81
+ --color-palette: var(--color-info);
82
+ --color-brush: var(--color-info-foreground);
83
+ }
84
+
85
+ /* Element sizes */
86
+
87
+ @utility element-xs {
88
+ --element-h: var(--element-xs-h);
89
+ --element-spacing: var(--element-xs-spacing);
90
+ --element-text: var(--element-xs-text);
91
+ --element-leading: var(--element-xs-leading);
92
+ --element-rounded: var(--element-xs-rounded);
93
+ }
94
+
95
+ @utility element-sm {
96
+ --element-h: var(--element-sm-h);
97
+ --element-spacing: var(--element-sm-spacing);
98
+ --element-text: var(--element-sm-text);
99
+ --element-leading: var(--element-sm-leading);
100
+ --element-rounded: var(--element-sm-rounded);
101
+ }
102
+
103
+ @utility element-md {
104
+ --element-h: var(--element-medium-h);
105
+ --element-spacing: var(--element-medium-spacing);
106
+ --element-text: var(--element-medium-text);
107
+ --element-leading: var(--element-medium-leading);
108
+ --element-rounded: var(--element-medium-rounded);
109
+ }
110
+
111
+ @utility element-lg {
112
+ --element-h: var(--element-lg-h);
113
+ --element-spacing: var(--element-lg-spacing);
114
+ --element-text: var(--element-lg-text);
115
+ --element-leading: var(--element-lg-leading);
116
+ --element-rounded: var(--element-lg-rounded);
117
+ }
118
+
119
+ @utility element-xl {
120
+ --element-h: var(--element-xl-h);
121
+ --element-spacing: var(--element-xl-spacing);
122
+ --element-text: var(--element-xl-text);
123
+ --element-leading: var(--element-xl-leading);
124
+ --element-rounded: var(--element-xl-rounded);
125
+ }
126
+
127
+ /* Use element sizes */
128
+
129
+ @utility element-square-size {
130
+ --element-w: var(--element-h);
131
+ --element-spacing: 0;
132
+
133
+ text-align: center;
134
+ min-width: var(--element-w);
135
+ }
136
+
137
+ @utility element-full-w {
138
+ --element-w: 100%;
139
+ }
140
+
141
+ @utility element-icon-size {
142
+ width: calc(var(--element-h) / 2);
143
+ min-width: calc(var(--element-h) / 2);
144
+ height: calc(var(--element-h) / 2);
145
+ min-height: calc(var(--element-h) / 2);
146
+ }
147
+
148
+ /* Utilities */
149
+
150
+ @utility no-scrollbar {
151
+ scrollbar-width: none;
152
+ }
153
+
154
+ @utility w-fix {
155
+ @apply w-max max-w-full;
156
+ }
157
+
158
+ @utility link {
159
+ @apply underline decoration-transparent decoration-0 hover:decoration-palette focus-visible:decoration-palette;
160
+ }
161
+
162
+ @utility highlight {
163
+ @apply px-[calc(var(--element-spacing)/2)] bg-palette/10 text-palette rounded font-bold;
164
+ }
165
+
166
+ @utility ignore {
167
+ @apply opacity-0 invisible pointer-events-none;
168
+ }
169
+
170
+ @utility not-ignore {
171
+ @apply opacity-100 visible pointer-events-auto;
172
+ }
173
+
174
+ @utility range-slider {
175
+ @apply bg-palette rounded-full appearance-none cursor-grab active:cursor-grabbing;
176
+ }
@@ -0,0 +1,29 @@
1
+ @utility btn {
2
+ --element-w: max-content;
3
+
4
+ @apply max-w-full flex items-center justify-center transition-all outline-solid outline-2 outline-transparent focus-visible:outline-palette disabled:opacity-50 disabled:cursor-not-allowed active:opacity-50;
5
+
6
+ width: var(--element-w);
7
+ height: var(--element-h);
8
+ padding: 0 var(--element-spacing);
9
+ gap: calc(var(--element-spacing) / 1.5);
10
+ border-radius: var(--element-rounded);
11
+ font-size: var(--element-text);
12
+ line-height: var(--element-line);
13
+ }
14
+
15
+ @utility btn-fill {
16
+ @apply bg-palette text-brush outline-offset-2 hover:bg-palette/90;
17
+ }
18
+
19
+ @utility btn-outline {
20
+ @apply border border-palette text-palette outline-offset-2 hover:bg-palette/10;
21
+ }
22
+
23
+ @utility btn-soft {
24
+ @apply bg-palette/10 text-palette hover:bg-palette/20;
25
+ }
26
+
27
+ @utility btn-ghost {
28
+ @apply text-palette hover:bg-palette/10;
29
+ }
@@ -0,0 +1,22 @@
1
+ @utility card {
2
+ padding: var(--element-spacing);
3
+ border-radius: var(--element-rounded);
4
+ font-size: var(--element-text);
5
+ line-height: var(--element-line);
6
+ }
7
+
8
+ @utility card-menu {
9
+ @apply w-max;
10
+ }
11
+
12
+ @utility card-y {
13
+ @apply flex flex-col;
14
+
15
+ row-gap: calc(var(--element-spacing) / 2);
16
+ }
17
+
18
+ @utility card-x {
19
+ @apply flex items-center justify-between;
20
+
21
+ column-gap: calc(var(--element-spacing) / 2);
22
+ }
@@ -0,0 +1,3 @@
1
+ @utility accordion-body {
2
+ @apply overflow-hidden;
3
+ }
@@ -0,0 +1,3 @@
1
+ @utility affix {
2
+ @apply fixed transition-all z-40 data-[state=false]:ignore;
3
+ }
@@ -0,0 +1,7 @@
1
+ @utility breadcrumbs {
2
+ @apply flex items-center flex-wrap gap-x-(--element-spacing);
3
+ }
4
+
5
+ @utility breadcrumbs-item {
6
+ @apply flex items-center;
7
+ }
@@ -0,0 +1,15 @@
1
+ @utility carousel {
2
+ @apply relative;
3
+ }
4
+
5
+ @utility carousel-container {
6
+ @apply flex items-center overflow-x-auto scroll-smooth;
7
+ }
8
+
9
+ @utility carousel-left-fade {
10
+ @apply pointer-events-none absolute right-0 top-0 h-full w-1/3 lg:w-1/6 bg-linear-to-l from-background from-10% lg:from-5% to-transparent z-10 transition-opacity;
11
+ }
12
+
13
+ @utility carousel-right-fade {
14
+ @apply pointer-events-none absolute left-0 top-0 h-full w-1/3 lg:w-1/6 bg-linear-to-r from-background from-10% lg:from-5% to-transparent z-10 transition-opacity;
15
+ }
@@ -0,0 +1,69 @@
1
+ @utility choice {
2
+ @apply border border-palette p-1 outline-solid outline-2 outline-transparent focus-visible:outline-palette outline-offset-2;
3
+ }
4
+
5
+ @utility choice-radio {
6
+ @apply rounded-full flex items-center justify-center;
7
+
8
+ width: var(--element-h);
9
+ height: var(--element-h);
10
+
11
+ &[data-state="false"]>.choice-radio-trigger {
12
+ @apply opacity-0 scale-0;
13
+ }
14
+ }
15
+
16
+ @utility choice-radio-trigger {
17
+ @apply bg-palette rounded-full transition-all flex items-center justify-center text-brush;
18
+
19
+ width: calc(var(--element-h) - 0.5rem);
20
+ height: calc(var(--element-h) - 0.5rem);
21
+ }
22
+
23
+ @utility choice-checkbox {
24
+ @apply rounded-(--element-rounded) flex items-center justify-center;
25
+
26
+ width: var(--element-h);
27
+ height: var(--element-h);
28
+
29
+ &[data-state="false"]>.choice-checkbox-trigger {
30
+ @apply opacity-0 scale-0;
31
+ }
32
+ }
33
+
34
+ @utility choice-checkbox-trigger {
35
+ @apply bg-palette rounded-[calc(var(--element-rounded)-0.25rem)] transition-all flex items-center justify-center text-brush;
36
+
37
+ width: calc(var(--element-h) - 0.5rem);
38
+ height: calc(var(--element-h) - 0.5rem);
39
+ }
40
+
41
+ @utility choice-switch {
42
+ @apply relative rounded-full flex items-center;
43
+
44
+ width: calc(var(--element-h) * 2);
45
+ height: var(--element-h);
46
+
47
+ &[data-state="true"] {
48
+ @apply bg-palette text-brush;
49
+
50
+ &>.choice-switch-trigger {
51
+ @apply bg-brush text-palette;
52
+
53
+ left: calc(var(--element-h) + 0.25rem);
54
+ }
55
+ }
56
+
57
+ &[data-state="false"]>.choice-switch-trigger {
58
+ @apply bg-palette text-brush;
59
+
60
+ left: 0.25rem;
61
+ }
62
+ }
63
+
64
+ @utility choice-switch-trigger {
65
+ @apply absolute rounded-full transition-all flex items-center justify-center;
66
+
67
+ width: calc(var(--element-h) - 0.5rem);
68
+ height: calc(var(--element-h) - 0.5rem);
69
+ }
@@ -0,0 +1,11 @@
1
+ @utility context-menu {
2
+ @apply relative;
3
+ }
4
+
5
+ @utility context-menu-body {
6
+ @apply z-10 fixed transition-all card card-menu card-y data-[state=false]:ignore;
7
+ }
8
+
9
+ @utility context-menu-navigation {
10
+ @apply card card-menu card-y;
11
+ }
@@ -0,0 +1,7 @@
1
+ @utility drawer-portal {
2
+ @apply fixed inset-0 z-50 bg-foreground/50;
3
+ }
4
+
5
+ @utility drawer-body {
6
+ @apply absolute bg-background p-(--element-spacing) overflow-y-auto;
7
+ }
@@ -0,0 +1,15 @@
1
+ @utility modal-portal {
2
+ @apply fixed inset-0 z-50 flex items-center justify-center bg-foreground/50;
3
+ }
4
+
5
+ @utility modal-body {
6
+ @apply w-max max-w-[90%] h-full max-h-[90%] flex items-center justify-center flex-col;
7
+ }
8
+
9
+ @utility modal-header {
10
+ @apply w-full h-[calc(var(--element-h)*1.5)] flex items-center px-(--element-spacing) bg-background rounded-t-(--element-rounded) border-b border-background-thin sticky top-0;
11
+ }
12
+
13
+ @utility modal-content {
14
+ @apply w-full py-(--element-spacing) px-(--element-spacing) bg-background rounded-b-(--element-rounded) max-h-[calc(100%-(var(--element-h)*1.5))] overflow-y-auto;
15
+ }
@@ -0,0 +1,3 @@
1
+ @utility otp {
2
+ @apply flex items-center gap-[calc(var(--element-spacing)/2)];
3
+ }
@@ -0,0 +1,3 @@
1
+ @utility pagination {
2
+ @apply flex items-center gap-(--element-spacing);
3
+ }
@@ -0,0 +1,7 @@
1
+ @utility popover {
2
+ @apply relative w-fix;
3
+ }
4
+
5
+ @utility popover-body {
6
+ @apply absolute w-max rounded-lg z-10;
7
+ }
@@ -0,0 +1,7 @@
1
+ @utility progress {
2
+ @apply w-full rounded-(--element-rounded) overflow-hidden h-(--element-h) bg-palette/10;
3
+ }
4
+
5
+ @utility progress-bar {
6
+ @apply flex items-center justify-center h-full bg-palette text-brush max-w-full;
7
+ }
@@ -0,0 +1,7 @@
1
+ @utility rating {
2
+ @apply flex items-center w-fix;
3
+ }
4
+
5
+ @utility rating-items {
6
+ @apply transition-all px-1 not-active:hover:-translate-y-1;
7
+ }
@@ -0,0 +1,11 @@
1
+ @utility select-box-input {
2
+ @apply relative cursor-pointer *:cursor-pointer;
3
+ }
4
+
5
+ @utility select-box-list {
6
+ @apply card card-y absolute position-b w-full cursor-default z-10;
7
+ }
8
+
9
+ @utility select-box-option {
10
+ @apply btn element-full-w justify-start;
11
+ }
@@ -0,0 +1,19 @@
1
+ @utility sheet-portal {
2
+ @apply fixed inset-0 z-50 bg-foreground/50;
3
+ }
4
+
5
+ @utility sheet-body {
6
+ @apply absolute bottom-0 h-[75%] w-full flex flex-col overflow-hidden bg-background touch-none;
7
+ }
8
+
9
+ @utility sheet-header {
10
+ @apply p-(--element-spacing) flex items-center justify-center;
11
+ }
12
+
13
+ @utility sheet-handlebar {
14
+ @apply w-1/4 h-1 rounded-full bg-foreground;
15
+ }
16
+
17
+ @utility sheet-content {
18
+ @apply overflow-y-auto flex-1 p-(--element-spacing);
19
+ }
@@ -0,0 +1,3 @@
1
+ @utility show-more-fade {
2
+ @apply absolute inset-0 bg-linear-to-t from-background from-30% to-transparent;
3
+ }
@@ -0,0 +1,7 @@
1
+ @utility spoiler {
2
+ @apply transition-all data-[state=false]:inline data-[state=false]:cursor-pointer data-[state=false]:rounded data-[state=false]:overflow-hidden data-[state=false]:px-1;
3
+ }
4
+
5
+ @utility spoiler-blur {
6
+ @apply transition-all data-[state=false]:select-none data-[state=false]:blur-[3px];
7
+ }
@@ -0,0 +1,3 @@
1
+ @utility steps-controls {
2
+ @apply flex items-center mb-[calc(1.5rem+0.75rem+0.375rem)];
3
+ }
@@ -0,0 +1,43 @@
1
+ /* Input element should be a `label` */
2
+
3
+ @utility input {
4
+ --element-w: auto;
5
+
6
+ @apply text-palette flex cursor-text relative transition-all outline-solid outline-2 outline-transparent focus-within:outline-palette disabled:opacity-50 disabled:cursor-not-allowed has-[[type=file]]:cursor-pointer;
7
+
8
+ width: var(--element-w);
9
+ height: var(--element-h);
10
+ font-size: var(--element-text);
11
+ line-height: var(--element-line);
12
+ border-radius: var(--element-rounded);
13
+ padding: var(--element-spacing);
14
+ gap: var(--element-spacing);
15
+
16
+ &:has(input, select) {
17
+ @apply items-center;
18
+
19
+ padding: 0 var(--element-spacing);
20
+ }
21
+
22
+ &:has(textarea) {
23
+ @apply h-[25dvh];
24
+
25
+ padding: var(--element-spacing);
26
+ }
27
+ }
28
+
29
+ @utility input-field {
30
+ @apply bg-transparent placeholder:text-palette/50 flex-1 not-[[type=file]]:h-full max-w-full [[type=file]]:cursor-pointer disabled:cursor-not-allowed;
31
+
32
+ &:where(select) {
33
+ @apply cursor-pointer;
34
+ }
35
+ }
36
+
37
+ @utility input-outline {
38
+ @apply border border-palette outline-offset-2;
39
+ }
40
+
41
+ @utility input-soft {
42
+ @apply bg-palette/10;
43
+ }
@@ -0,0 +1,16 @@
1
+ @utility join {
2
+ @apply flex items-center ltr:*:not-first:rounded-l-none ltr:*:not-last:rounded-r-none rtl:*:not-first:rounded-r-none rtl:*:not-last:rounded-l-none;
3
+ }
4
+
5
+ /* Consider border color may not be suitable for your use, you should change it */
6
+ @utility join-border {
7
+ @apply ltr:*:not-last:border-r rtl:*:not-last:border-l;
8
+
9
+ * {
10
+ border-color: color-mix(in oklab, var(--color-palette) 50%, var(--color-brush))
11
+ }
12
+ }
13
+
14
+ @utility join-fix-border {
15
+ @apply ltr:*:not-first:border-l-0 rtl:*:not-first:border-r-0;
16
+ }
@@ -0,0 +1,13 @@
1
+ @utility kbd {
2
+ @apply bg-palette/10 text-palette transition-transform active:translate-y-0.5;
3
+
4
+ padding: var(--element-spacing);
5
+ border-radius: var(--element-rounded);
6
+ font-size: var(--element-text);
7
+ line-height: var(--element-line);
8
+ box-shadow: 0 2px 0 1px var(--color-palette);
9
+
10
+ &:active {
11
+ box-shadow: 0 1px 0 1px var(--color-palette);
12
+ }
13
+ }
@@ -0,0 +1,85 @@
1
+ @utility top-center {
2
+ @apply top-1/2 -translate-y-1/2;
3
+ }
4
+
5
+ @utility top-boundary {
6
+ @apply top-0 -translate-y-1/2;
7
+ }
8
+
9
+ @utility top-out {
10
+ @apply top-0 -translate-y-full;
11
+ }
12
+
13
+ @utility right-center {
14
+ @apply right-1/2 translate-x-1/2;
15
+ }
16
+
17
+ @utility right-boundary {
18
+ @apply right-0 translate-x-1/2;
19
+ }
20
+
21
+ @utility right-out {
22
+ @apply right-0 translate-x-full;
23
+ }
24
+
25
+ @utility bottom-center {
26
+ @apply bottom-1/2 translate-y-1/2;
27
+ }
28
+
29
+ @utility bottom-boundary {
30
+ @apply bottom-0 translate-y-1/2;
31
+ }
32
+
33
+ @utility bottom-out {
34
+ @apply bottom-0 translate-y-full;
35
+ }
36
+
37
+ @utility left-center {
38
+ @apply left-1/2 -translate-x-1/2;
39
+ }
40
+
41
+ @utility left-boundary {
42
+ @apply left-0 -translate-x-1/2;
43
+ }
44
+
45
+ @utility left-out {
46
+ @apply left-0 -translate-x-full;
47
+ }
48
+
49
+ @utility inset-center {
50
+ @apply top-center left-center;
51
+ }
52
+
53
+ /* Compaound positions */
54
+
55
+ @utility position-t {
56
+ @apply top-out left-center;
57
+ }
58
+
59
+ @utility position-tr {
60
+ @apply top-out right-out;
61
+ }
62
+
63
+ @utility position-r {
64
+ @apply top-center right-out;
65
+ }
66
+
67
+ @utility position-br {
68
+ @apply bottom-out right-out;
69
+ }
70
+
71
+ @utility position-b {
72
+ @apply bottom-out left-center;
73
+ }
74
+
75
+ @utility position-bl {
76
+ @apply bottom-out left-out;
77
+ }
78
+
79
+ @utility position-l {
80
+ @apply top-center left-out;
81
+ }
82
+
83
+ @utility position-tl {
84
+ @apply left-out;
85
+ }
@@ -0,0 +1,41 @@
1
+ @utility separate-t {
2
+ @apply border-t;
3
+
4
+ padding-top: var(--element-spacing);
5
+ margin-top: var(--element-spacing);
6
+ }
7
+
8
+ @utility separate-r {
9
+ @apply border-r;
10
+
11
+ padding-right: var(--element-spacing);
12
+ margin-right: var(--element-spacing);
13
+ }
14
+
15
+ @utility separate-b {
16
+ @apply border-b;
17
+
18
+ padding-bottom: var(--element-spacing);
19
+ margin-bottom: var(--element-spacing);
20
+ }
21
+
22
+ @utility separate-l {
23
+ @apply border-l;
24
+
25
+ padding-left: var(--element-spacing);
26
+ margin-left: var(--element-spacing);
27
+ }
28
+
29
+ @utility separate-y {
30
+ @apply border-y;
31
+
32
+ padding: var(--element-spacing) 0;
33
+ margin: var(--element-spacing) 0;
34
+ }
35
+
36
+ @utility separate-x {
37
+ @apply border-x;
38
+
39
+ padding: 0 var(--element-spacing);
40
+ margin: 0 var(--element-spacing);
41
+ }