frutjam 1.1.0-beta.0 → 1.2.0-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frutjam",
3
- "version": "1.1.0-beta.0",
3
+ "version": "1.2.0-beta.0",
4
4
  "description": "A utility-first CSS framework UI Library",
5
5
  "funding": "https://ko-fi.com/nezanuha",
6
6
  "main": "./dist/frutjam.css",
@@ -17,7 +17,7 @@
17
17
  ".": "./src/main.css",
18
18
  "./base/*": "./src/base/*",
19
19
  "./components/*": "./src/components/*",
20
- "./themes/*": "./src/themes/*",
20
+ "./themes/*": "./src/theme/*",
21
21
  "./utilities/*": "./src/utilities/*"
22
22
  },
23
23
  "scripts": {
@@ -1,7 +1,6 @@
1
1
  @import '../theme/jams/base.css';
2
- @utility accordion {
3
- @apply divide-y divide-core-200 dark:divide-core-900;
4
2
 
3
+ @utility accordion {
5
4
  display: grid;
6
5
  background: light-dark(
7
6
  var(--core-50),
@@ -15,19 +14,33 @@
15
14
  cursor: pointer;
16
15
 
17
16
  &>details {
18
- @apply text-pretty;
17
+ &:not(:last-child) {
18
+ border-bottom: 1px solid light-dark(
19
+ var(--core-200),
20
+ var(--core-900)
21
+ );
22
+ }
23
+ text-wrap: pretty;
19
24
 
20
25
  &>*:not(summary){
21
- @apply px-4 pb-4;
26
+ padding-inline: 1rem;
27
+ padding-bottom: 1rem;
22
28
  }
23
29
  &>summary::marker{
24
- @apply content-none;
30
+ content: none;
25
31
  }
26
32
  &>summary{
27
- @apply flex gap-4 items-center justify-between p-4 font-medium;
33
+ display: flex;
34
+ gap: 1rem;
35
+ align-items: center;
36
+ justify-content: space-between;
37
+ padding: 1rem;
38
+ font-weight: 500;
39
+
28
40
  &::after {
29
- @apply content-[url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyMCAyMCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0icmdiYSg1Myw1Myw1MywxKSIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ij4KICA8cGF0aCBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Im0xOS41IDguMjUtNy41IDcuNS03LjUtNy41Ii8+Cjwvc3ZnPg==')];
30
- @apply inline-block text-inherit;
41
+ content: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyMCAyMCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZT0icmdiYSg1Myw1Myw1MywxKSIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ij4KICA8cGF0aCBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Im0xOS41IDguMjUtNy41IDcuNS03LjUtNy41Ii8+Cjwvc3ZnPg==');
42
+ display: inline-block;
43
+ color: inherit;
31
44
  }
32
45
  }
33
46
  }
@@ -35,9 +48,11 @@
35
48
  &>details[open] {
36
49
 
37
50
  &>summary {
38
- @apply pb-4;
51
+ padding-bottom: 1rem;
39
52
  &::after {
40
- @apply rotate-180 origin-center transition-transform duration-300;
53
+ transform: rotate(180deg);
54
+ transform-origin: center;
55
+ transition: transform 300ms;
41
56
  }
42
57
  }
43
58
  }
@@ -67,8 +67,8 @@
67
67
  }
68
68
 
69
69
  @utility badge {
70
- @apply gap-2 badge-md;
71
-
70
+ @apply badge-md;
71
+ gap: 0.5rem;
72
72
  border-radius: var(--badge-radius, var(--radius-badge));
73
73
  display: inline-flex;
74
74
  align-items: center;
@@ -1,8 +1,7 @@
1
1
  @import "../theme/jams/base.css";
2
2
 
3
3
  @utility breadcrumb {
4
- @apply py-2;
5
-
4
+ padding-block: 0.5rem;
6
5
  max-width: 100%;
7
6
  overflow-x: auto;
8
7
 
@@ -25,17 +24,22 @@
25
24
  & > span {
26
25
  display: flex;
27
26
  align-items: center;
28
- @apply gap-2;
27
+ gap: 0.5rem;
29
28
 
30
29
  @media (hover: hover) {
31
30
  &:hover:not([aria-current="page"]):not(.breadcrumb-current) {
32
- @apply underline underline-offset-4;
31
+ text-decoration-line: underline;
32
+ text-underline-offset: 4px;
33
33
  cursor: pointer;
34
34
  }
35
35
  }
36
36
 
37
37
  &:focus {
38
- @apply outline-hidden;
38
+ outline-style: none;
39
+ @media (forced-colors: active) {
40
+ outline: 2px solid transparent;
41
+ outline-offset: 2px;
42
+ }
39
43
  }
40
44
 
41
45
  &:focus-visible {
@@ -47,15 +51,22 @@
47
51
  /* Only show default separator if NOT preceded by .breadcrumb-separator */
48
52
  & + .breadcrumb-item::before, & + li::before {
49
53
  content: "";
50
- @apply mr-3 ml-2 block h-1.5 w-1.5 opacity-40;
51
- rotate: 45deg;
54
+ margin-right: 0.75rem;
55
+ margin-left: 0.5rem;
56
+ height: 0.375rem;
57
+ width: 0.375rem;
58
+ opacity: 40%;
59
+ display: block;
60
+ transform: rotate(45deg);
61
+ transition: transform 300ms;
52
62
  border-top: 1px solid;
53
63
  border-right: 1px solid;
54
64
  background-color: #0000;
55
65
  }
56
66
 
57
67
  [dir="rtl"] & + .breadcrumb-item::before, [dir="rtl"] & + li::before {
58
- rotate: -135deg;
68
+ transform: rotate(-135deg);
69
+ transition: transform 300ms;
59
70
  }
60
71
 
61
72
  /* Remove default separator when preceded by custom .breadcrumb-separator */
@@ -68,7 +79,12 @@
68
79
  .breadcrumb-separator {
69
80
  display: flex;
70
81
  align-items: center;
71
- @apply mx-2 text-sm text-gray-500;
82
+ margin-inline: 0.5rem;
83
+ font-size: 0.875rem;
84
+ color: light-dark(
85
+ var(--core-200),
86
+ var(--core-900)
87
+ );
72
88
  }
73
89
  }
74
90
  }
@@ -174,12 +174,16 @@
174
174
  }
175
175
 
176
176
  @utility btn {
177
- @apply btn-md text-shadow-xs/5 gap-1.5 leading-normal;
177
+ @apply btn-md;
178
+
179
+ text-shadow: 0px 1px 1px color-mix(in oklab, var(--btn-900) 10%, transparent);
180
+ line-height: 1.5;
178
181
  width: var(--btn-width);
179
182
  max-width: var(--btn-max-width);
180
183
  transition: translate 0.2s ease-out, visibility 0.2s allow-discrete, background-color 0.2s ease-out, opacity 0.1s ease-out;
181
184
  position: relative;
182
185
  display: var(--btn-display, inline-flex);
186
+ gap: 0.375rem;
183
187
  flex-shrink: 0;
184
188
  align-items: center;
185
189
  justify-content: center;
@@ -231,18 +235,20 @@
231
235
  }
232
236
 
233
237
  &:is(:disabled, [disabled], .btn-disabled) {
234
- @apply opacity-20 cursor-not-allowed pointer-events-none;
238
+ opacity: 20%;
239
+ cursor: not-allowed;
240
+ pointer-events: none;
235
241
  }
236
242
 
237
243
  &:is(input[type="checkbox"], input[type="radio"]) {
238
- @apply appearance-none;
244
+ appearance: none;
239
245
 
240
246
  &::after {
241
247
  content: attr(aria-label);
242
248
  }
243
249
 
244
250
  &:checked {
245
- @apply isolate;
251
+ isolation: isolate;
246
252
  }
247
253
  }
248
254
 
@@ -3,27 +3,26 @@
3
3
  @utility card-outline {
4
4
  border: 1px solid light-dark(
5
5
  var(--core-200),
6
- var(--core-900)
6
+ var(--core-950)
7
7
  );
8
8
  }
9
9
 
10
10
  @utility card-dashed {
11
11
  border: 1px dashed light-dark(
12
12
  var(--core-200),
13
- var(--core-900)
13
+ var(--core-950)
14
14
  );
15
15
  }
16
16
 
17
17
  /* card size */
18
18
 
19
19
  @utility card {
20
- @apply relative flex flex-col;
20
+ position: relative;
21
+ display: flex;
22
+ flex-direction: column;
21
23
  border-radius: var(--radius-card);
22
24
  overflow:hidden;
23
- background: light-dark(
24
- var(--core-50),
25
- var(--core-900)
26
- );
25
+ background-color: transparent;
27
26
 
28
27
  :where(figure:first-child) {
29
28
  overflow: hidden;
@@ -43,14 +42,22 @@
43
42
  }
44
43
 
45
44
  @utility card-body {
46
- @apply flex flex-auto flex-col gap-2;
45
+ display: flex;
46
+ gap: 0.5rem;
47
+ flex: auto;
48
+ flex-direction: column;
47
49
  padding: 1.5rem;
48
50
 
49
51
  :where(p){
50
- @apply text-base grow;
52
+ flex-grow: 1;
53
+ font-size: 1rem;
51
54
  }
52
55
  }
53
56
 
54
57
  @utility card-title {
55
- @apply flex items-center gap-2 font-semibold text-lg;
58
+ display: flex;
59
+ align-items: center;
60
+ gap: 0.5rem;
61
+ font-weight: 600;
62
+ font-size: 1.125rem;
56
63
  }
@@ -1,99 +1,162 @@
1
1
  @import "../theme/jams/base.css";
2
2
 
3
3
  @utility checkbox-xs {
4
- @layer components {
5
- @apply p-0.75 size-3;
6
- }
4
+ padding: 0.1875rem;
5
+ width: 0.75rem;
6
+ height: 0.75rem;
7
7
  }
8
8
 
9
9
  @utility checkbox-sm {
10
- @layer components {
11
- @apply p-1 size-4;
12
- }
10
+ padding: 0.25rem;
11
+ width: 1rem;
12
+ height: 1rem;
13
13
  }
14
14
 
15
15
  @utility checkbox-md {
16
- @layer components {
17
- @apply p-1.25 size-5;
18
- }
16
+ padding: 0.3125rem;
17
+ width: 1.25rem;
18
+ height: 1.25rem;
19
19
  }
20
20
 
21
21
  @utility checkbox-lg {
22
- @layer components {
23
- @apply p-1.5 size-6;
24
- }
22
+ padding: 0.375rem;
23
+ width: 1.5rem;
24
+ height: 1.5rem;
25
25
  }
26
26
 
27
27
  @utility checkbox-xl {
28
- @layer components {
29
- @apply p-1.75 size-7;
30
- }
28
+ padding: 0.4375rem;
29
+ width: 1.75rem;
30
+ height: 1.75rem;
31
31
  }
32
32
 
33
33
  @utility checkbox-2xl {
34
- @layer components {
35
- @apply p-2 size-8;
36
- }
34
+ padding: 0.5rem;
35
+ width: 2rem;
36
+ height: 2rem;
37
37
  }
38
38
 
39
39
  @utility checkbox-circle {
40
- @layer components {
41
- @apply rounded-full aspect-square;
42
- }
40
+ border-radius: calc(infinity * 1px);
41
+ aspect-ratio: 1 / 1;
43
42
  }
44
43
 
45
44
  @utility checkbox-square {
46
- @layer components {
47
- @apply rounded-[var(--radius-checkbox)] aspect-square;
48
- }
45
+ border-radius: var(--radius-checkbox);
46
+ aspect-ratio: 1 / 1;
49
47
  }
50
48
 
51
49
  @utility checkbox {
52
- @apply relative shrink-0 cursor-pointer appearance-none align-middle shadow ring duration-350 checkbox-md;
50
+ @apply checkbox-md;
51
+ /* box-shadow: light-dark(
52
+ var(--core-100),
53
+ var(--core-900)
54
+ ) 0px 1px 1px; */
55
+ position: relative;
56
+ transition-duration: 350ms;
57
+ flex-shrink: 0;
58
+ cursor: pointer;
59
+ appearance: none;
60
+ vertical-align: middle;
53
61
 
54
- --tw-ring-color: light-dark(
55
- var(--checkbox-300),
56
- color-mix(in oklab, var(--checkbox-100) 16%, transparent)
62
+ box-shadow: 0 0 0 0px var(--checkbox-100), 0 0 0 calc(1px + 0px) light-dark(var(--checkbox-300), var(--checkbox-500)), 0 0 var(--checkbox-100);
63
+ /* border: 1.6px solid var(--checkbox-100); */
64
+ outline: 1px solid light-dark(
65
+ var(--checkbox-400),
66
+ var(--checkbox-700)
57
67
  );
58
-
68
+
59
69
  background-color: light-dark(
60
70
  var(--checkbox-100),
61
71
  color-mix(in oklab, var(--checkbox-600) 15%, transparent)
62
72
  );
63
73
 
64
- color: light-dark(var(--checkbox-700), var(--checkbox-200));
65
74
 
75
+ /* &:not(
76
+ .checkbox-primary,
77
+ .checkbox-secondary,
78
+ .checkbox-accent,
79
+ .checkbox-info,
80
+ .checkbox-success,
81
+ .checkbox-warning,
82
+ .checkbox-error
83
+ ){
84
+ outline: 1px solid light-dark(
85
+ var(--checkbox-400),
86
+ var(--checkbox-700)
87
+ );
88
+ border: 0.5px solid light-dark(
89
+ var(--checkbox-50),
90
+ var(--checkbox-900)
91
+ );
92
+ }
93
+
94
+ &:is(
95
+ .checkbox-primary,
96
+ .checkbox-secondary,
97
+ .checkbox-accent,
98
+ .checkbox-info,
99
+ .checkbox-success,
100
+ .checkbox-warning,
101
+ .checkbox-error
102
+ ){
103
+ outline: 1px solid var(--checkbox-700);
104
+ border: 0.5px solid light-dark(
105
+ var(--checkbox-50),
106
+ var(--checkbox-900)
107
+ );
108
+ } */
109
+
110
+
111
+ /* background-color: transparent; */
112
+ /* color: light-dark(var(--checkbox-700), var(--checkbox-200)); */
113
+ color: light-dark(var(--checkbox-700), var(--checkbox-200));
66
114
  border-radius: var(--radius-checkbox);
67
115
 
68
116
  &::before {
69
- @apply block size-full rotate-45 bg-current opacity-0 content-none transition-all;
117
+ content: none;
118
+ opacity: 0%;
119
+ background-color: currentcolor;
120
+ transform: rotate(45deg);
121
+ transition: transform 300ms, background-color 100ms;
122
+ display: block;
123
+ width: 100%;
124
+ height: 100%;
70
125
  clip-path: polygon(20% 100%, 20% 80%, 50% 80%, 50% 0, 70% 0, 70% 100%);
71
126
  font-size: 1rem;
72
127
  line-height: 0.75;
73
128
  }
74
129
 
75
130
  &:focus-visible {
76
- outline: 2px solid var(--checkbox-700, currentColor);
131
+ outline: 1px solid var(--checkbox-700, currentColor);
77
132
  outline-offset: 2px;
78
133
  }
79
134
 
80
135
  &:checked,
81
136
  &[aria-checked="true"] {
82
- @apply shadow-2xl;
137
+ box-shadow: 0 0 0 0px var(--checkbox-100), 0 0 0 calc(1px + 0px) var(--checkbox-400), 0 0 var(--checkbox-100);
83
138
  background-color: light-dark(var(--checkbox-200), var(--checkbox-600));
139
+ transition: transform 300ms, background-color 100ms;
140
+
84
141
  &::before {
85
- clip-path: polygon(20% 100%, 20% 80%, 50% 80%, 50% 0, 70% 0, 70% 100%);
86
- @apply opacity-100 content-['✔︎'];
87
- @media (forced-colors: active) {
88
- @apply rotate-0 bg-transparent content-['✔︎'] [clip-path:none];
142
+ content: '✔︎';
143
+ opacity: 100%;
144
+ }
145
+
146
+ @media (forced-colors: active) {
147
+ &:before {
148
+ content: '✔︎';
149
+ transform: rotate(0deg);
150
+ background-color: light-dark(var(--checkbox-200), var(--checkbox-600));
151
+ clip-path:none;
89
152
  }
90
153
  }
91
154
  }
92
155
 
93
156
  &:indeterminate {
94
157
  &:before {
95
- @apply rotate-0 opacity-100;
96
- translate: 0 -35%;
158
+ opacity: 100%;
159
+ transform: rotate(0deg) translate(0, -35%);
97
160
  clip-path: polygon(
98
161
  20% 100%,
99
162
  20% 80%,
@@ -106,7 +169,8 @@
106
169
  }
107
170
 
108
171
  &:disabled {
109
- @apply cursor-not-allowed opacity-20;
172
+ cursor: not-allowed;
173
+ opacity: 20%;
110
174
  }
111
175
 
112
176
  --checkbox-50: var(--default-50);
@@ -44,8 +44,8 @@
44
44
  }
45
45
 
46
46
  @utility container-full {
47
- width: 100vw;
48
- max-width: 100vw;
47
+ width: 100%;
48
+ max-width: 100%;
49
49
  margin-inline: auto;
50
50
  padding-inline: 1rem;
51
51
  box-sizing: border-box;
@@ -2,10 +2,11 @@
2
2
 
3
3
  @utility divider-x {
4
4
  &:not(:empty) {
5
- @apply gap-x-2;
5
+ column-gap: 0.5rem;
6
6
  }
7
7
  &::before, &::after {
8
- @apply w-full h-[0.5px];
8
+ width: 100%;
9
+ height: 0.5px;
9
10
  }
10
11
  }
11
12
 
@@ -59,12 +60,13 @@
59
60
 
60
61
 
61
62
  @utility divider-y {
62
- @apply flex-col;
63
+ flex-direction: column;
63
64
  &:not(:empty) {
64
- @apply gap-y-2;
65
+ row-gap: 0.5rem;
65
66
  }
66
67
  &::before, &::after {
67
- @apply w-[0.5px] flex-1;
68
+ width: 0.5px;
69
+ flex: 1;
68
70
  }
69
71
  }
70
72
 
@@ -104,10 +106,15 @@
104
106
  }
105
107
 
106
108
  @utility divider {
107
- @apply divider-x-solid flex items-center justify-center h-auto;
109
+ @apply divider-x-solid;
110
+
111
+ display: flex;
112
+ align-items: center;
113
+ justify-content: center;
114
+ height: auto;
108
115
 
109
116
  &::before, &::after {
110
- @apply content-[''];
117
+ content: '';
111
118
  }
112
119
 
113
120
  --divider-50: var(--default-50);
@@ -1,10 +1,28 @@
1
1
  @import "../theme/jams/base.css";
2
2
  @utility drawer {
3
- @apply pointer-events-none invisible fixed inset-0 m-0 grid h-full max-h-none w-full max-w-none place-items-start bg-transparent p-0 text-inherit z-999 overflow-hidden overscroll-contain;
3
+ pointer-events: none;
4
+ visibility: hidden;
5
+ position: fixed;
6
+ inset: 0rem;
7
+ margin: 0rem;
8
+ padding: 0rem;
9
+ display: grid;
10
+ width: 100%;
11
+ height: 100%;
12
+ max-width: none;
13
+ max-height: none;
14
+ place-items: start;
15
+ background-color: transparent;
16
+ color: inherit;
17
+ z-index: 999;
18
+ overflow: hidden;
19
+ overscroll-behavior: contain;
4
20
 
5
21
  &:not(drawer:not([open]):not(.drawer-open)),
6
22
  &::backdrop {
7
- @apply starting:invisible;
23
+ @starting-style {
24
+ visibility: hidden;
25
+ }
8
26
  background: light-dark(
9
27
  color-mix(in oklab,var(--color-default-100)30%,var(--color-default-900)20%),
10
28
  color-mix(in oklab,var(--color-default-800)50%,transparent)
@@ -12,7 +30,11 @@
12
30
  }
13
31
 
14
32
  &[open], &.drawer-open{
15
- @apply pointer-events-auto visible starting:invisible;
33
+ @starting-style {
34
+ visibility: hidden;
35
+ }
36
+ pointer-events: auto;
37
+ visibility: visible;
16
38
 
17
39
  .drawer-body {
18
40
  translate: 0 0;
@@ -23,16 +45,37 @@
23
45
  }
24
46
 
25
47
  @utility drawer-backdrop {
26
- @apply col-start-1 row-start-1 grid self-stretch justify-self-stretch text-transparent -z-1;
48
+ display: grid;
49
+ grid-column-start: 1;
50
+ grid-row-start: 1;
51
+ align-self: stretch;
52
+ justify-self: stretch;
53
+ color: transparent;
54
+ z-index: -1;
55
+
27
56
  button {
28
- @apply cursor-pointer;
57
+ cursor: pointer;
29
58
  }
30
59
  }
31
60
 
32
61
  @utility drawer-body {
33
- @apply rounded-none forced-colors:outline col-start-1 row-start-1 h-screen max-h-none w-11/12 w-auto max-w-none p-1 overflow-y-auto overscroll-contain;
62
+ border-radius: 0;
34
63
  translate: -100% 0;
35
64
  scale: 1;
65
+ grid-column-start: 1;
66
+ grid-row-start: 1;
67
+ height: 100vh;
68
+ max-height: none;
69
+ width: calc(11/12 * 100%);
70
+ max-width: none;
71
+ padding: 0.25rem;
72
+ overflow-y: auto;
73
+ overscroll-behavior: contain;
74
+
75
+ @media (forced-colors: active) {
76
+ outline-style: solid;
77
+ outline-width: 1px;
78
+ }
36
79
 
37
80
  --tw-shadow-color: light-dark(
38
81
  color-mix(in oklab,var(--core-300)50%,transparent),
@@ -56,10 +99,13 @@
56
99
 
57
100
 
58
101
  @utility drawer-top {
59
- @apply place-items-start;
102
+ place-items: start;
60
103
 
61
104
  :where(.drawer-body) {
62
- @apply h-auto w-full max-w-none rounded-none;
105
+ height: auto;
106
+ width: 100%;
107
+ max-width: none;
108
+ border-radius: 0;
63
109
  max-height: calc(100vh - 5em);
64
110
  translate: 0 -100%;
65
111
  scale: 1;
@@ -67,10 +113,13 @@
67
113
  }
68
114
 
69
115
  @utility drawer-bottom {
70
- @apply place-items-end;
116
+ place-items: end;
71
117
 
72
118
  :where(.drawer-body) {
73
- @apply h-auto w-full max-w-none rounded-none;
119
+ height: auto;
120
+ width: 100%;
121
+ max-width: none;
122
+ border-radius: 0;
74
123
  max-height: calc(100vh - 5em);
75
124
  translate: 0 100%;
76
125
  scale: 1;
@@ -78,20 +127,28 @@
78
127
  }
79
128
 
80
129
  @utility drawer-start {
81
- @apply place-items-start;
130
+ place-items: start;
82
131
 
83
132
  :where(.drawer-body) {
84
- @apply h-screen max-h-none w-auto max-w-none rounded-none;
133
+ height: 100vh;
134
+ width: auto;
135
+ max-height: none;
136
+ max-width: none;
137
+ border-radius: 0;
85
138
  translate: -100% 0;
86
139
  scale: 1;
87
140
  }
88
141
  }
89
142
 
90
143
  @utility drawer-end {
91
- @apply place-items-end;
144
+ place-items: end;
92
145
 
93
146
  :where(.drawer-body) {
94
- @apply h-screen max-h-none w-auto max-w-none rounded-none;
147
+ height: 100vh;
148
+ max-height: none;
149
+ max-width: none;
150
+ width: auto;
151
+ border-radius: 0;
95
152
  translate: 100% 0;
96
153
  scale: 1;
97
154
  }
@@ -10,8 +10,11 @@
10
10
  }
11
11
 
12
12
  @utility header-body {
13
- @apply gap-3 py-2 container;
13
+ @apply container;
14
+
14
15
  display: flex;
16
+ gap: 0.75rem;
17
+ padding-block: 0.5rem;
15
18
  justify-content: space-between;
16
19
  align-items:center;
17
20
  margin-left: auto;
@@ -50,14 +50,16 @@
50
50
 
51
51
  @utility input-dashed {
52
52
  &:not(.input-active) {
53
- @apply outline-dashed;
53
+ outline-width: 1px;
54
+ outline-style: dashed;
54
55
  }
55
56
  }
56
57
 
57
58
 
58
59
  @utility input-outline {
59
60
  &:not(.input-active) {
60
- @apply outline outline-solid;
61
+ outline-width: 1px;
62
+ outline-style: solid;
61
63
  }
62
64
  }
63
65
 
@@ -76,28 +78,43 @@
76
78
 
77
79
  @utility input-ghost {
78
80
  &:not(.input-active) {
79
- @apply outline-transparent;
81
+ outline-color: transparent;
80
82
  }
81
83
  }
82
84
 
83
85
  @utility input {
84
- @apply input-md transition duration-300 px-2.5 font-medium relative inline-flex self-start
85
- shrink-0 appearance-none items-center gap-2 align-middle whitespace-nowrap;
86
+ @apply input-md;
86
87
 
88
+ display: inline-flex;
89
+ align-self: flex-start;
90
+ flex-shrink: 0;
91
+ align-items: center;
92
+ appearance: none;
87
93
  border-radius: var(--radius-input);
94
+ gap: 0.5rem;
95
+ vertical-align: middle;
96
+ white-space: nowrap;
97
+ position: relative;
98
+ font-weight: 500;
99
+ padding-inline: 0.625rem;
100
+ transition: border-color 300ms, outline-color 300ms;
88
101
 
89
102
  &::placeholder {
90
- @apply text-sm;
103
+ font-size: var(--input-text-size);
91
104
  color: light-dark(
92
105
  var(--core-300),
93
- var(--core-800)
106
+ var(--core-700)
94
107
  );
95
108
  }
96
109
 
97
110
  &::file-selector-button{
98
- @apply mr-4 inline-flex items-center transition duration-300 text-sm;
111
+ font-size: var(--input-text-size);
112
+ margin-right: 1rem;
113
+ display: inline-flex;
114
+ transition: border-color 300ms, background-color 300ms, display 300ms;
115
+ align-items: center;
99
116
  border-radius: calc(var(--radius-input)/2);
100
- background: light-dark(
117
+ background-color: light-dark(
101
118
  var(--input-100),
102
119
  var(--input-800)
103
120
  );
@@ -119,7 +136,7 @@
119
136
  var(--input-900),
120
137
  var(--input-300)
121
138
  );
122
- background: light-dark(
139
+ background-color: light-dark(
123
140
  var(--input-200),
124
141
  var(--input-700)
125
142
  );
@@ -137,8 +154,12 @@
137
154
  .input-error
138
155
  ){
139
156
  outline: 1px solid light-dark(
140
- var(--input-300),
141
- var(--input-800)
157
+ var(--input-400),
158
+ var(--input-700)
159
+ );
160
+ border: 0.5px solid light-dark(
161
+ var(--input-50),
162
+ var(--input-900)
142
163
  );
143
164
  }
144
165
 
@@ -151,23 +172,59 @@
151
172
  .input-warning,
152
173
  .input-error
153
174
  ){
154
- outline: 1px solid light-dark(
155
- var(--input-700),
156
- var(--input-800)
175
+ outline: 1px solid var(--input-700);
176
+ border: 0.5px solid light-dark(
177
+ var(--input-50),
178
+ var(--input-900)
157
179
  );
158
180
  }
159
181
 
160
182
  &:is(:disabled, [disabled], .input-disabled) {
161
- @apply cursor-not-allowed placeholder:text-[var(--input-200)];
183
+ cursor: not-allowed;
162
184
  color:var(--input-50);
163
185
  background-color: light-dark(
164
186
  var(--input-100),
165
187
  var(--input-900)
166
188
  );
189
+
190
+ &::placeholder {
191
+ color: var(--input-200);
192
+ }
167
193
  }
168
194
 
169
195
  &:focus, &:focus-within {
170
- @apply outline-[var(--input-800)] ring-2 ring-[var(--input-200)] isolate;
196
+ isolation: isolate;
197
+ &:is(
198
+ .input-primary,
199
+ .input-secondary,
200
+ .input-accent,
201
+ .input-info,
202
+ .input-success,
203
+ .input-warning,
204
+ .input-error
205
+ ){
206
+ outline-color: var(--input-800);
207
+ border-color: light-dark(
208
+ var(--input-200),
209
+ var(--input-950)
210
+ );
211
+ }
212
+
213
+ &:not(
214
+ .input-primary,
215
+ .input-secondary,
216
+ .input-accent,
217
+ .input-info,
218
+ .input-success,
219
+ .input-warning,
220
+ .input-error
221
+ ){
222
+ outline-color: var(--input-800);
223
+ border-color: light-dark(
224
+ var(--input-200),
225
+ var(--input-600)
226
+ );
227
+ }
171
228
  }
172
229
 
173
230
  --input-50: var(--default-50);
@@ -2,15 +2,48 @@
2
2
  @import "../theme/placement.css";
3
3
  @import "../theme/animation/slide.css";
4
4
 
5
- @utility modal{
6
- @apply pointer-events-none invisible fixed inset-0 m-0 grid h-full max-h-none w-full max-w-none items-center justify-items-center bg-transparent p-3 text-inherit z-999 overflow-hidden overscroll-contain;
5
+ @utility modal{
6
+ display: grid;
7
+ width: 100%;
8
+ height: 100%;
9
+ max-width: none;
10
+ max-height: none;
11
+ align-items: center;
12
+ z-index: 999;
13
+ overscroll-behavior: contain;
14
+ overflow: hidden;
15
+ justify-items: center;
16
+ color: inherit;
17
+ padding: 0.75rem;
18
+ background-color: transparent;
19
+ inset: 0rem;
20
+ margin: 0rem;
21
+ pointer-events: none;
22
+ visibility: hidden;
23
+ position: fixed;
24
+
25
+
7
26
  &:not(modal:not([open]):not(.modal-open)),
8
27
  &::backdrop {
9
- @apply opacity-100 starting:invisible starting:opacity-0;
10
- background: light-dark(#00000026, #000000ba);
28
+ @starting-style {
29
+ visibility: hidden;
30
+ opacity: 0%;
31
+ }
32
+
33
+ opacity: 100%;
34
+ background-color: color-mix(in oklab,var(--core-800)50%,transparent);
11
35
  }
12
36
  &[open], &.modal-open {
13
- @apply pointer-events-auto visible opacity-100 starting:invisible starting:opacity-0;
37
+
38
+ pointer-events: auto;
39
+ visibility: visible;
40
+ opacity: 100%;
41
+
42
+ @starting-style {
43
+ visibility: hidden;
44
+ opacity: 0%;
45
+ }
46
+
14
47
  .modal-body {
15
48
  translate: 0 0;
16
49
  scale: 1;
@@ -20,18 +53,48 @@
20
53
  }
21
54
 
22
55
  @utility modal-backdrop {
23
- @apply col-start-1 row-start-1 grid self-stretch justify-self-stretch text-transparent -z-1 bg-transparent;
56
+ display: grid;
57
+ grid-column-start: 1;
58
+ grid-row-start: 1;
59
+ align-self: stretch;
60
+ justify-self: stretch;
61
+ color: transparent;
62
+ background-color: transparent;
63
+ z-index: -1;
64
+
24
65
  button {
25
- @apply cursor-pointer;
66
+ cursor: pointer;
26
67
  }
27
68
  }
28
69
 
29
70
  @utility modal-body {
30
- @apply rounded-[var(--radius-modal)] shadow-sm forced-colors:outline col-start-1 row-start-1 max-h-screen w-11/12 max-w-[32rem] p-6 scale-95 opacity-0 overflow-y-auto overscroll-contain;
31
- --tw-shadow-color: light-dark(
71
+ /* @apply shadow-sm; */
72
+
73
+ box-shadow: light-dark(
74
+ var(--core-100),
75
+ var(--core-900)
76
+ ) 0px 1px 1px;
77
+
78
+ @media (forced-colors: active) {
79
+ outline-style: solid;
80
+ outline-width: 1px;
81
+ }
82
+ grid-column-start: 1;
83
+ grid-row-start: 1;
84
+ max-height: 100vh;
85
+ width: calc(11/12 * 100%);
86
+ max-width: 32rem;
87
+ padding: 1.5rem;
88
+ transform: scale(95%, 95%);
89
+ opacity: 0%;
90
+ overflow-y: auto;
91
+ overscroll-behavior: contain;
92
+ border-radius: var(--radius-modal);
93
+
94
+ /* --tw-shadow-color: light-dark(
32
95
  color-mix(in oklab,var(--core-300)50%,transparent),
33
96
  color-mix(in oklab,var(--core-900)60%,transparent)
34
- );
97
+ ); */
35
98
  background: light-dark(
36
99
  var(--core-50),
37
100
  var(--core-950)
@@ -51,18 +114,17 @@
51
114
 
52
115
  /* placements */
53
116
  @utility modal-x-* {
54
- @apply [justify-items:--value(--x-*)];
117
+ justify-items:--value(--x-*);
55
118
  }
56
119
 
57
120
  @utility modal-y-* {
58
- @apply [align-items:--value(--y-*)];
121
+ align-items:--value(--y-*);
59
122
  }
60
123
 
61
124
  /* animation */
62
-
63
125
  @utility modal-slide-* {
64
126
  :where(.modal-body) {
65
- @apply [translate:--value(--slide-*)];
127
+ translate:--value(--slide-*);
66
128
  scale: 1;
67
129
  }
68
130
  }
@@ -5,10 +5,10 @@
5
5
  justify-self: --value(--x-*);
6
6
  & > :where(.nav-list) {
7
7
  display: flex;
8
- justify-content:--value(--x-*);
8
+ justify-content: --value(--x-*);
9
9
  align-items: center;
10
10
  flex-direction: row;
11
- @apply gap-x-2;
11
+ column-gap: 0.5rem;
12
12
  }
13
13
  }
14
14
 
@@ -17,14 +17,15 @@
17
17
  }
18
18
 
19
19
  @utility nav-y-* {
20
- @apply gap-y-3;
21
20
  display:flex;
21
+ row-gap: 0.75rem;
22
22
  flex-direction: column;
23
- justify-self:--value(--y-*);
23
+ justify-self: --value(--y-*);
24
24
  width: 100%;
25
+
25
26
  & > :where(.nav-list) {
26
- @apply gap-y-1;
27
27
  display: flex;
28
+ row-gap: 0.25rem;
28
29
  align-items: start;
29
30
  flex-direction: column;
30
31
  width: 100%;
@@ -1,37 +1,78 @@
1
1
  @import "../theme/jams/base.css";
2
+
2
3
  @utility popover {
3
- @layer components {
4
- @apply pointer-events-none invisible fixed inset-0 m-0 grid h-full max-h-none w-full max-w-none items-center justify-items-center bg-transparent p-0 text-inherit z-999 overflow-hidden overscroll-contain;
4
+ pointer-events: none;
5
+ visibility: hidden;
6
+ position: fixed;
7
+ inset: 0rem;
8
+ margin: 0rem;
9
+ padding: 0rem;
10
+ display: grid;
11
+ width: 100%;
12
+ height: 100%;
13
+ max-width: none;
14
+ max-height: none;
15
+ align-items: center;
16
+ justify-items: center;
17
+ background-color: transparent;
18
+ color: inherit;
19
+ z-index: 999;
20
+ overflow: hidden;
21
+ overscroll-behavior: contain;
5
22
 
6
- &:not(popover:not([popover]:popover-open)),
7
- &::backdrop {
8
- @apply opacity-100 starting:invisible starting:opacity-0 bg-default-600;
23
+ &:not(popover:not([popover]:popover-open)), &::backdrop {
24
+ opacity: 100%;
25
+ @starting-style {
26
+ visibility: hidden;
27
+ opacity: 0%;
9
28
  }
29
+ background-color: var(--default-600);
30
+ }
10
31
 
11
- &[popover]:popover-open {
12
- @apply pointer-events-auto visible opacity-100 starting:invisible starting:opacity-0;
32
+ &[popover]:popover-open {
33
+ pointer-events: auto;
34
+ visibility: visible;
35
+ opacity: 100%;
13
36
 
14
- .popover-body {
15
- translate: 0 0;
16
- scale: 1;
17
- opacity: 1;
18
- }
37
+ @starting-style {
38
+ visibility: hidden;
39
+ opacity: 0%;
40
+ }
41
+
42
+ .popover-body {
43
+ translate: 0 0;
44
+ scale: 1;
45
+ opacity: 1;
19
46
  }
20
47
  }
21
48
  }
22
49
 
23
50
  @utility popover-backdrop {
24
- @layer components {
25
- @apply col-start-1 row-start-1 grid self-stretch justify-self-stretch text-transparent -z-1;
26
- button {
27
- @apply cursor-pointer;
28
- }
51
+ display: grid;
52
+ grid-column-start: 1;
53
+ grid-row-start: 1;
54
+ align-self: stretch;
55
+ justify-self: stretch;
56
+ color: transparent;
57
+ z-index: -1;
58
+
59
+ button {
60
+ cursor: pointer;
29
61
  }
30
62
  }
31
63
 
32
64
  @utility popover-body {
65
+
66
+ background-color: var(--core-50);
67
+ color: var(--core-950);
68
+ border-radius: 1.5rem;
69
+ border: 1px solid light-dark(
70
+ color-mix(in oklab,var(--core-300)50%,transparent),
71
+ color-mix(in oklab,var(--core-900)60%,transparent)
72
+ );
73
+
33
74
  @layer components {
34
- @apply bg-core-50 text-core-950 rounded-3xl border border-black/60 shadow-xl shadow-black/10 forced-colors:outline col-start-1 row-start-1 max-h-screen w-11/12 max-w-[32rem] p-6 transition-all duration-150 scale-95 opacity-0 overflow-y-auto overscroll-contain;
75
+ @apply shadow-xl shadow-black/10 forced-colors:outline col-start-1 row-start-1 max-h-screen w-11/12 max-w-[32rem] p-6 transition-all duration-150 scale-95 opacity-0 overflow-y-auto overscroll-contain;
35
76
  }
36
77
  }
37
78
 
@@ -1,7 +1,17 @@
1
1
  @import "../theme/jams/base.css";
2
2
 
3
3
  @utility sidebar {
4
- @apply p-6 border-x border-core-200 dark:border-core-900 max-h-dvh sticky overflow-y-auto gap-5;
4
+ position: sticky;
5
+ overflow-y: auto;
6
+ gap: 1.25rem;
7
+ max-height: 100dvh;
8
+ padding: 1.5rem;
9
+ border-inline-style: solid;
10
+ border-inline-width: 1px;
11
+ border-color: light-dark(
12
+ var(--core-200),
13
+ var(--core-900)
14
+ );
5
15
  background-color: light-dark(
6
16
  var(--core-0),
7
17
  var(--core-1000)
@@ -1,6 +1,7 @@
1
1
  @import '../theme/typography.css';
2
2
  @utility style {
3
3
  h1 {
4
- @apply text-4xl font-bold
4
+ font-size: 2.25rem;
5
+ font-weight: 700;
5
6
  }
6
7
  }
package/src/main.css CHANGED
@@ -8,7 +8,7 @@
8
8
  @import "./components/checkbox.css";
9
9
  @import "./components/accordion.css";
10
10
  /* @import "./components/popover.css"; */
11
- @import "./components/dropdown.css";
11
+ /* @import "./components/dropdown.css"; */
12
12
  @import "./components/divider.css";
13
13
  @import "./components/nav.css";
14
14
  @import "./components/card.css";