@talelk/newui-tailwind 1.0.0 → 1.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.
package/src/utilities.css CHANGED
@@ -30,6 +30,17 @@
30
30
  outline-offset: 0px;
31
31
  }
32
32
 
33
+ /* The padded-row outline: the row (Checkbox/Switch `padded`) draws the ring
34
+ * around itself while its hidden control holds keyboard focus. Same outline
35
+ * mechanism as `focus-ring` — never a `ring-*` box-shadow, which would
36
+ * collide with `shadow-*` and vanish in forced-colors mode. */
37
+ @utility focus-ring-within {
38
+ &:has(:focus-visible) {
39
+ outline: var(--focus-outline-default);
40
+ outline-offset: 0px;
41
+ }
42
+ }
43
+
33
44
  /* Stacking and motion scales. The numbers live in `@theme` (`--z-*`,
34
45
  * `--duration-*`, generated from `@talelk/newui-tokens`); these utilities are the
35
46
  * named vocabulary components use, so a layer change is a token edit and the
@@ -46,15 +57,24 @@
46
57
  @utility z-top {
47
58
  z-index: var(--z-top);
48
59
  }
60
+ @utility duration-instant {
61
+ transition-duration: var(--duration-instant);
62
+ }
49
63
  @utility duration-fast {
50
64
  transition-duration: var(--duration-fast);
51
65
  }
52
66
  @utility duration-base {
53
67
  transition-duration: var(--duration-base);
54
68
  }
69
+ @utility duration-moderate {
70
+ transition-duration: var(--duration-moderate);
71
+ }
55
72
  @utility duration-slow {
56
73
  transition-duration: var(--duration-slow);
57
74
  }
75
+ @utility duration-progress {
76
+ transition-duration: var(--duration-progress);
77
+ }
58
78
 
59
79
  /* A disclosure panel — the body of an `Accordion` item or a `Collapsible`.
60
80
  *
@@ -74,15 +94,15 @@
74
94
  grid-template-rows: 1fr;
75
95
  visibility: visible;
76
96
  transition:
77
- grid-template-rows 200ms cubic-bezier(0.23, 1, 0.32, 1),
97
+ grid-template-rows var(--duration-moderate) var(--ease-out),
78
98
  visibility 0s 0s;
79
99
 
80
100
  &[data-state="closed"] {
81
101
  grid-template-rows: 0fr;
82
102
  visibility: hidden;
83
103
  transition:
84
- grid-template-rows 200ms cubic-bezier(0.23, 1, 0.32, 1),
85
- visibility 0s 200ms;
104
+ grid-template-rows var(--duration-moderate) var(--ease-out),
105
+ visibility 0s var(--duration-moderate);
86
106
  }
87
107
 
88
108
  @media (prefers-reduced-motion: reduce) {
@@ -105,6 +125,66 @@
105
125
  }
106
126
  }
107
127
 
128
+ /* Overlay entrances (speeds are the `--animate-*` tokens in `@theme`; the
129
+ * global reduced-motion block below collapses every one of them). Popups and
130
+ * modals fade in over a 2px settle — no scale, no slide theatrics. */
131
+ @keyframes overlay-in {
132
+ from {
133
+ opacity: 0;
134
+ transform: translateY(2px);
135
+ }
136
+ to {
137
+ opacity: 1;
138
+ transform: translateY(0);
139
+ }
140
+ }
141
+
142
+ /* Bottom-anchored sheets rise the last few pixels into place. */
143
+ @keyframes drawer-in {
144
+ from {
145
+ opacity: 0;
146
+ transform: translateY(8px);
147
+ }
148
+ to {
149
+ opacity: 1;
150
+ transform: translateY(0);
151
+ }
152
+ }
153
+
154
+ /* Side sheets settle in from their inline-end edge: the last few pixels
155
+ * only, mirrored for right-to-left documents. */
156
+ @keyframes sheet-in {
157
+ from {
158
+ opacity: 0;
159
+ transform: translateX(12px);
160
+ }
161
+ to {
162
+ opacity: 1;
163
+ transform: translateX(0);
164
+ }
165
+ }
166
+ @keyframes sheet-in-rtl {
167
+ from {
168
+ opacity: 0;
169
+ transform: translateX(-12px);
170
+ }
171
+ to {
172
+ opacity: 1;
173
+ transform: translateX(0);
174
+ }
175
+ }
176
+
177
+ /* Skeleton sheen: sweeps a wide background gradient across the block. The
178
+ * consumer supplies the gradient and `background-size: 200% 100%`. */
179
+ @keyframes shimmer {
180
+ from {
181
+ background-position: 200% 0;
182
+ }
183
+ to {
184
+ background-position: -200% 0;
185
+ }
186
+ }
187
+
108
188
  /* Respect the OS "reduce motion" setting everywhere, once. Animations collapse
109
189
  * to a single near-instant frame instead of being removed, so nothing that
110
190
  * depends on an `animationend` (Zag's presence, our exit transitions) stalls. */
Binary file
@@ -1,61 +0,0 @@
1
- /* Variable fonts usage:
2
- :root { font-family: "Inter", sans-serif; }
3
- @supports (font-variation-settings: normal) {
4
- :root { font-family: "InterVar", sans-serif; font-optical-sizing: auto; }
5
- } */
6
- @font-face {
7
- font-family: "InterVar";
8
- font-weight: 100 900;
9
- font-display: swap;
10
- font-style: normal;
11
- src:
12
- url("Inter.var.woff2?v=3.19") format("woff2-variations"),
13
- url("Inter.var.woff2?v=3.19") format("woff2");
14
- src: url("Inter.var.woff2?v=3.19") format("woff2") tech("variations");
15
- unicode-range:
16
- U+0000-05FF, /* Latin, Greek, Cyrillic, Hebrew */ U+0700-1FFF,
17
- /* Extended Latin, Greek, Cyrillic, Armenian, Georgian */ U+2C00-2FFF,
18
- /* Additional scripts */ U+4E00-9FFF,
19
- /* CJK (Chinese, Japanese, Korean) */ U+AC00-D7AF; /* Hangul (Korean) */
20
- }
21
- @font-face {
22
- font-family: "InterVar";
23
- font-weight: 100 900;
24
- font-display: swap;
25
- font-style: italic;
26
- src:
27
- url("Inter-Italic.var.woff2?v=3.19") format("woff2-variations"),
28
- url("Inter-Italic.var.woff2?v=3.19") format("woff2");
29
- src: url("Inter-Italic.var.woff2?v=3.19") format("woff2") tech("variations");
30
- unicode-range:
31
- U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
32
- }
33
- /* Aliased 'InterVar' font as 'Inter' */
34
- /* To prevent breaking usage of `font-family: 'Inter'` */
35
- @font-face {
36
- font-family: "Inter";
37
- font-weight: 100 900;
38
- font-display: swap;
39
- font-style: normal;
40
- src:
41
- url("Inter.var.woff2?v=3.19") format("woff2-variations"),
42
- url("Inter.var.woff2?v=3.19") format("woff2");
43
- src: url("Inter.var.woff2?v=3.19") format("woff2") tech("variations");
44
- unicode-range:
45
- U+0000-05FF, /* Latin, Greek, Cyrillic, Hebrew */ U+0700-1FFF,
46
- /* Extended Latin, Greek, Cyrillic, Armenian, Georgian */ U+2C00-2FFF,
47
- /* Additional scripts */ U+4E00-9FFF,
48
- /* CJK (Chinese, Japanese, Korean) */ U+AC00-D7AF; /* Hangul (Korean) */
49
- }
50
- @font-face {
51
- font-family: "Inter";
52
- font-weight: 100 900;
53
- font-display: swap;
54
- font-style: italic;
55
- src:
56
- url("Inter-Italic.var.woff2?v=3.19") format("woff2-variations"),
57
- url("Inter-Italic.var.woff2?v=3.19") format("woff2");
58
- src: url("Inter-Italic.var.woff2?v=3.19") format("woff2") tech("variations");
59
- unicode-range:
60
- U+0000-05FF, U+0700-1FFF, U+2C00-2FFF, U+4E00-9FFF, U+AC00-D7AF;
61
- }