@mks2508/mks-ui 0.7.0 → 0.8.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/dist/css/primitives-DotMatrix-dot.css +364 -0
- package/dist/css/primitives-GooeyMorphingSurface-gooey.css +112 -0
- package/dist/css/ui-GooeyButton-gooey.css +43 -0
- package/dist/index.css +531 -0
- package/dist/react-ui/components/MorphingPopover/MorphingPopover.types.d.ts +8 -3
- package/dist/react-ui/components/MorphingPopover/MorphingPopover.types.d.ts.map +1 -1
- package/dist/react-ui/index.js +24 -1
- package/dist/react-ui/primitives/DotMatrix/DotMatrix.types.d.ts +109 -0
- package/dist/react-ui/primitives/DotMatrix/DotMatrix.types.d.ts.map +1 -0
- package/dist/react-ui/primitives/DotMatrix/dot-matrix.js +0 -0
- package/dist/react-ui/primitives/DotMatrix/dot.css +364 -0
- package/dist/react-ui/primitives/DotMatrix/index.d.ts +7 -0
- package/dist/react-ui/primitives/DotMatrix/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/DotMatrix/index.js +185 -0
- package/dist/react-ui/primitives/DotMatrix/patterns.d.ts +32 -0
- package/dist/react-ui/primitives/DotMatrix/patterns.d.ts.map +1 -0
- package/dist/react-ui/primitives/DotMatrix/patterns.js +175 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/GooeyMorphingSurface.types.d.ts +100 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/GooeyMorphingSurface.types.d.ts.map +1 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/GooeyMorphingSurface.types.js +20 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/gooey-morphing-surface.js +0 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/gooey-morphing.css +112 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/index.d.ts +36 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/GooeyMorphingSurface/index.js +141 -0
- package/dist/react-ui/primitives/index.d.ts +2 -0
- package/dist/react-ui/primitives/index.d.ts.map +1 -1
- package/dist/react-ui/primitives/index.js +4 -0
- package/dist/react-ui/ui/Badge/Badge.styles.d.ts +1 -1
- package/dist/react-ui/ui/Button/Button.styles.d.ts +1 -1
- package/dist/react-ui/ui/DataCard/DataCard.styles.d.ts +1 -1
- package/dist/react-ui/ui/FileIcon/FileIcon.styles.d.ts +25 -0
- package/dist/react-ui/ui/FileIcon/FileIcon.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/FileIcon/FileIcon.styles.js +31 -0
- package/dist/react-ui/ui/FileIcon/FileIcon.types.d.ts +89 -0
- package/dist/react-ui/ui/FileIcon/FileIcon.types.d.ts.map +1 -0
- package/dist/react-ui/ui/FileIcon/index.d.ts +46 -0
- package/dist/react-ui/ui/FileIcon/index.d.ts.map +1 -0
- package/dist/react-ui/ui/FileIcon/index.js +138 -0
- package/dist/react-ui/ui/FileItem/FileItem.styles.d.ts +47 -0
- package/dist/react-ui/ui/FileItem/FileItem.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/FileItem/FileItem.styles.js +60 -0
- package/dist/react-ui/ui/FileItem/FileItem.types.d.ts +84 -0
- package/dist/react-ui/ui/FileItem/FileItem.types.d.ts.map +1 -0
- package/dist/react-ui/ui/FileItem/index.d.ts +48 -0
- package/dist/react-ui/ui/FileItem/index.d.ts.map +1 -0
- package/dist/react-ui/ui/FileItem/index.js +124 -0
- package/dist/react-ui/ui/FilePanel/FilePanel.styles.d.ts +34 -0
- package/dist/react-ui/ui/FilePanel/FilePanel.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/FilePanel/FilePanel.styles.js +57 -0
- package/dist/react-ui/ui/FilePanel/FilePanel.types.d.ts +55 -0
- package/dist/react-ui/ui/FilePanel/FilePanel.types.d.ts.map +1 -0
- package/dist/react-ui/ui/FilePanel/index.d.ts +55 -0
- package/dist/react-ui/ui/FilePanel/index.d.ts.map +1 -0
- package/dist/react-ui/ui/FilePanel/index.js +107 -0
- package/dist/react-ui/ui/FileTree/FileTree.styles.d.ts +31 -0
- package/dist/react-ui/ui/FileTree/FileTree.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/FileTree/FileTree.styles.js +45 -0
- package/dist/react-ui/ui/FileTree/FileTree.types.d.ts +95 -0
- package/dist/react-ui/ui/FileTree/FileTree.types.d.ts.map +1 -0
- package/dist/react-ui/ui/FileTree/index.d.ts +60 -0
- package/dist/react-ui/ui/FileTree/index.d.ts.map +1 -0
- package/dist/react-ui/ui/FileTree/index.js +226 -0
- package/dist/react-ui/ui/GooeyButton/GooeyButton.types.d.ts +35 -0
- package/dist/react-ui/ui/GooeyButton/GooeyButton.types.d.ts.map +1 -0
- package/dist/react-ui/ui/GooeyButton/gooey-button.js +0 -0
- package/dist/react-ui/ui/GooeyButton/gooey.css +43 -0
- package/dist/react-ui/ui/GooeyButton/index.d.ts +26 -0
- package/dist/react-ui/ui/GooeyButton/index.d.ts.map +1 -0
- package/dist/react-ui/ui/GooeyButton/index.js +109 -0
- package/dist/react-ui/ui/MiddleTruncatePath/MiddleTruncatePath.styles.d.ts +23 -0
- package/dist/react-ui/ui/MiddleTruncatePath/MiddleTruncatePath.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/MiddleTruncatePath/MiddleTruncatePath.styles.js +32 -0
- package/dist/react-ui/ui/MiddleTruncatePath/MiddleTruncatePath.types.d.ts +43 -0
- package/dist/react-ui/ui/MiddleTruncatePath/MiddleTruncatePath.types.d.ts.map +1 -0
- package/dist/react-ui/ui/MiddleTruncatePath/index.d.ts +33 -0
- package/dist/react-ui/ui/MiddleTruncatePath/index.d.ts.map +1 -0
- package/dist/react-ui/ui/MiddleTruncatePath/index.js +60 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.context.d.ts +17 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.context.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.context.js +27 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.styles.d.ts +19 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.styles.js +39 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.types.d.ts +188 -0
- package/dist/react-ui/ui/OperationCard/OperationCard.types.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/index.d.ts +45 -0
- package/dist/react-ui/ui/OperationCard/index.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/index.js +118 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardActions.d.ts +3 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardActions.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardActions.js +86 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardHeader.d.ts +14 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardHeader.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardHeader.js +62 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardProgress.d.ts +3 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardProgress.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardProgress.js +37 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardStats.d.ts +3 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardStats.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardStats.js +42 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardVisualizer.d.ts +3 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardVisualizer.d.ts.map +1 -0
- package/dist/react-ui/ui/OperationCard/parts/OperationCardVisualizer.js +53 -0
- package/dist/react-ui/ui/Tabs/Tabs.styles.d.ts +3 -3
- package/dist/react-ui/ui/index.d.ts +7 -0
- package/dist/react-ui/ui/index.d.ts.map +1 -1
- package/dist/react-ui/ui/index.js +19 -0
- package/package.json +1 -1
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
/* =============================================================================
|
|
2
|
+
* DotMatrix — progressive fill model.
|
|
3
|
+
*
|
|
4
|
+
* Cells light up one at a time in `pattern` order, stay lit until the
|
|
5
|
+
* cycle resets, then repeat. Implementation uses ONE CSS animation per
|
|
6
|
+
* matrix that drives a registered custom property `--dm-phase` from
|
|
7
|
+
* 0 → 1 (fill), holds it at 1 (hold), then snaps back to 0 (reset)
|
|
8
|
+
* for a rest period.
|
|
9
|
+
*
|
|
10
|
+
* Each cell carries a `--dm-threshold` (its position in the fill
|
|
11
|
+
* sequence, 0..1) and computes its own `::before` opacity as a step
|
|
12
|
+
* across `phase - threshold`, multiplied by `--dm-edge-sharpness` so
|
|
13
|
+
* the edge can range from "instant snap" to "warm fade".
|
|
14
|
+
*
|
|
15
|
+
* Perf shape: N matrices = N animations total (not N × cells). Cell
|
|
16
|
+
* opacity is computed at paint time by calc(); the compositor batches
|
|
17
|
+
* updates via the shared phase var. With `contain: layout style paint`
|
|
18
|
+
* each cell is isolated so work doesn't cascade.
|
|
19
|
+
* ============================================================================= */
|
|
20
|
+
|
|
21
|
+
@property --dm-phase {
|
|
22
|
+
syntax: '<number>';
|
|
23
|
+
initial-value: 0;
|
|
24
|
+
inherits: true;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.dm-root {
|
|
28
|
+
display: grid;
|
|
29
|
+
width: 100%;
|
|
30
|
+
gap: var(--dm-gap, 5px);
|
|
31
|
+
padding: var(--dm-pad, 0.25rem);
|
|
32
|
+
border-radius: 0.5rem;
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
|
|
35
|
+
/* Skip render work when the matrix is offscreen. */
|
|
36
|
+
content-visibility: auto;
|
|
37
|
+
contain-intrinsic-size: auto 200px;
|
|
38
|
+
transform: translateZ(0);
|
|
39
|
+
|
|
40
|
+
--dm-on: var(--foreground);
|
|
41
|
+
--dm-off: color-mix(in oklch, var(--foreground) 12%, transparent);
|
|
42
|
+
--dm-glow: color-mix(in oklch, var(--foreground) 50%, transparent);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* ─── Cell: base OFF layer — neutral dim ──────────────────────────────── */
|
|
46
|
+
|
|
47
|
+
.dm-cell {
|
|
48
|
+
position: relative;
|
|
49
|
+
aspect-ratio: 1 / 1;
|
|
50
|
+
min-width: 4px;
|
|
51
|
+
min-height: 4px;
|
|
52
|
+
border-radius: var(--dm-radius, 32%);
|
|
53
|
+
background-color: color-mix(in oklch, var(--foreground) 10%, transparent);
|
|
54
|
+
opacity: var(--dm-off-opacity, 0.45);
|
|
55
|
+
transform: scale(var(--dm-off-scale, 0.9));
|
|
56
|
+
contain: layout style paint;
|
|
57
|
+
|
|
58
|
+
--dm-threshold: 0;
|
|
59
|
+
--dm-stagger-delay: 0ms;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* ─── Pseudo: ON layer — LED look, fades in as phase crosses threshold ─ */
|
|
63
|
+
|
|
64
|
+
.dm-cell::before {
|
|
65
|
+
content: '';
|
|
66
|
+
position: absolute;
|
|
67
|
+
inset: 0;
|
|
68
|
+
border-radius: inherit;
|
|
69
|
+
background-color: var(--dm-on);
|
|
70
|
+
background-image:
|
|
71
|
+
radial-gradient(
|
|
72
|
+
circle at 32% 26%,
|
|
73
|
+
rgb(255 255 255 / 0.35) 0%,
|
|
74
|
+
rgb(255 255 255 / 0.12) 18%,
|
|
75
|
+
transparent 48%
|
|
76
|
+
),
|
|
77
|
+
radial-gradient(
|
|
78
|
+
circle at 70% 78%,
|
|
79
|
+
rgb(0 0 0 / 0.22) 0%,
|
|
80
|
+
transparent 60%
|
|
81
|
+
);
|
|
82
|
+
box-shadow:
|
|
83
|
+
inset 0 0 1px rgb(255 255 255 / 0.55),
|
|
84
|
+
inset 0 0 0 1px color-mix(in oklch, var(--dm-on) 65%, transparent),
|
|
85
|
+
inset 0 -1px 2px color-mix(in oklch, var(--dm-on) 40%, black 20%);
|
|
86
|
+
opacity: 0;
|
|
87
|
+
pointer-events: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.dm-root[data-variant='glow'] .dm-cell::before {
|
|
91
|
+
box-shadow:
|
|
92
|
+
inset 0 0 1px rgb(255 255 255 / 0.55),
|
|
93
|
+
inset 0 0 0 1px color-mix(in oklch, var(--dm-on) 65%, transparent),
|
|
94
|
+
inset 0 -1px 2px color-mix(in oklch, var(--dm-on) 40%, black 20%),
|
|
95
|
+
0 0 2px var(--dm-glow),
|
|
96
|
+
0 0 6px var(--dm-glow),
|
|
97
|
+
0 0 12px color-mix(in oklch, var(--dm-glow) 55%, transparent);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* ─── Running: phase animates on root, cells derive state from it ────── */
|
|
101
|
+
|
|
102
|
+
.dm-root[data-status='running'] {
|
|
103
|
+
animation-name: var(--dm-anim-phase);
|
|
104
|
+
animation-duration: var(--dm-cycle-total, 2600ms);
|
|
105
|
+
animation-iteration-count: infinite;
|
|
106
|
+
animation-timing-function: linear;
|
|
107
|
+
animation-fill-mode: both;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* Lit fraction for THIS cell — 0 when off, 1 when fully filled, ramped
|
|
111
|
+
* near the threshold by `--dm-edge-sharpness`. Reused by both the pseudo
|
|
112
|
+
* opacity (the LED glow) and the cell's scale (grows when lit). */
|
|
113
|
+
.dm-root[data-status='running'] .dm-cell {
|
|
114
|
+
opacity: 1;
|
|
115
|
+
transform: scale(
|
|
116
|
+
calc(
|
|
117
|
+
var(--dm-off-scale, 0.88) +
|
|
118
|
+
(var(--dm-on-scale, 1) - var(--dm-off-scale, 0.88)) *
|
|
119
|
+
clamp(
|
|
120
|
+
0,
|
|
121
|
+
(var(--dm-phase) - var(--dm-threshold)) *
|
|
122
|
+
var(--dm-edge-sharpness, 50),
|
|
123
|
+
1
|
|
124
|
+
)
|
|
125
|
+
)
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.dm-root[data-status='running'] .dm-cell::before {
|
|
130
|
+
opacity: clamp(
|
|
131
|
+
0,
|
|
132
|
+
calc(
|
|
133
|
+
(var(--dm-phase) - var(--dm-threshold)) *
|
|
134
|
+
var(--dm-edge-sharpness, 50)
|
|
135
|
+
),
|
|
136
|
+
1
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* ─── Accent cells ────────────────────────────────────────────────────── */
|
|
141
|
+
|
|
142
|
+
.dm-cell[data-accent='true'] {
|
|
143
|
+
opacity: 1;
|
|
144
|
+
transform: scale(1);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.dm-cell[data-accent='true']::before {
|
|
148
|
+
background-color: var(--primary);
|
|
149
|
+
background-image: none;
|
|
150
|
+
box-shadow:
|
|
151
|
+
inset 0 0 1px rgb(255 255 255 / 0.5),
|
|
152
|
+
0 0 3px color-mix(in oklch, var(--primary) 70%, transparent),
|
|
153
|
+
0 0 7px color-mix(in oklch, var(--primary) 50%, transparent);
|
|
154
|
+
opacity: 1 !important;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* ─── Lifecycle FINAL animations ──────────────────────────────────────── */
|
|
158
|
+
|
|
159
|
+
@keyframes dm-success-pop {
|
|
160
|
+
0% {
|
|
161
|
+
transform: scale(0.94);
|
|
162
|
+
filter: brightness(0.7);
|
|
163
|
+
}
|
|
164
|
+
45% {
|
|
165
|
+
transform: scale(1.18);
|
|
166
|
+
filter: brightness(1.4);
|
|
167
|
+
}
|
|
168
|
+
100% {
|
|
169
|
+
transform: scale(1);
|
|
170
|
+
filter: brightness(1);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@keyframes dm-fail-strobe {
|
|
175
|
+
0% {
|
|
176
|
+
transform: scale(1);
|
|
177
|
+
filter: brightness(1);
|
|
178
|
+
}
|
|
179
|
+
22% {
|
|
180
|
+
transform: scale(1.22);
|
|
181
|
+
filter: brightness(1.55) saturate(1.4);
|
|
182
|
+
}
|
|
183
|
+
55% {
|
|
184
|
+
transform: scale(0.92);
|
|
185
|
+
filter: brightness(0.75);
|
|
186
|
+
}
|
|
187
|
+
100% {
|
|
188
|
+
transform: scale(0.97);
|
|
189
|
+
filter: brightness(1);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@keyframes dm-cancelled-dim {
|
|
194
|
+
0% {
|
|
195
|
+
transform: scale(1);
|
|
196
|
+
opacity: 1;
|
|
197
|
+
}
|
|
198
|
+
100% {
|
|
199
|
+
transform: scale(0.9);
|
|
200
|
+
opacity: 0.55;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.dm-root[data-status='success'] {
|
|
205
|
+
animation: none;
|
|
206
|
+
}
|
|
207
|
+
.dm-root[data-status='success'] .dm-cell {
|
|
208
|
+
opacity: 1;
|
|
209
|
+
transform: scale(1);
|
|
210
|
+
animation: dm-success-pop 520ms cubic-bezier(0.2, 0, 0.2, 1) both;
|
|
211
|
+
animation-delay: var(--dm-stagger-delay, 0ms);
|
|
212
|
+
}
|
|
213
|
+
.dm-root[data-status='success'] .dm-cell::before {
|
|
214
|
+
opacity: 1;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.dm-root[data-status='failed'] {
|
|
218
|
+
animation: none;
|
|
219
|
+
}
|
|
220
|
+
.dm-root[data-status='failed'] .dm-cell {
|
|
221
|
+
opacity: 1;
|
|
222
|
+
animation: dm-fail-strobe 560ms cubic-bezier(0.2, 0, 0.2, 1) both;
|
|
223
|
+
animation-delay: var(--dm-stagger-delay, 0ms);
|
|
224
|
+
}
|
|
225
|
+
.dm-root[data-status='failed'] .dm-cell::before {
|
|
226
|
+
background-color: var(--destructive);
|
|
227
|
+
box-shadow:
|
|
228
|
+
inset 0 0 1px rgb(255 255 255 / 0.5),
|
|
229
|
+
inset 0 0 0 1px color-mix(in oklch, var(--destructive) 55%, transparent),
|
|
230
|
+
inset 0 -1px 2px color-mix(in oklch, var(--destructive) 40%, black 20%);
|
|
231
|
+
opacity: 1;
|
|
232
|
+
}
|
|
233
|
+
.dm-root[data-status='failed'][data-variant='glow'] .dm-cell::before {
|
|
234
|
+
box-shadow:
|
|
235
|
+
inset 0 0 1px rgb(255 255 255 / 0.55),
|
|
236
|
+
inset 0 0 0 1px color-mix(in oklch, var(--destructive) 55%, transparent),
|
|
237
|
+
inset 0 -1px 2px color-mix(in oklch, var(--destructive) 40%, black 20%),
|
|
238
|
+
0 0 3px color-mix(in oklch, var(--destructive) 70%, transparent),
|
|
239
|
+
0 0 9px color-mix(in oklch, var(--destructive) 55%, transparent);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.dm-root[data-status='cancelled'] {
|
|
243
|
+
animation: none;
|
|
244
|
+
}
|
|
245
|
+
.dm-root[data-status='cancelled'] .dm-cell {
|
|
246
|
+
background-color: color-mix(in oklch, var(--foreground) 22%, transparent);
|
|
247
|
+
opacity: 0.65;
|
|
248
|
+
animation: dm-cancelled-dim 380ms cubic-bezier(0.4, 0, 0.8, 0.6) both;
|
|
249
|
+
animation-delay: var(--dm-stagger-delay, 0ms);
|
|
250
|
+
}
|
|
251
|
+
.dm-root[data-status='cancelled'] .dm-cell::before {
|
|
252
|
+
opacity: 0;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.dm-root[data-status='idle'] {
|
|
256
|
+
animation: none;
|
|
257
|
+
}
|
|
258
|
+
.dm-root[data-status='idle'] .dm-cell::before {
|
|
259
|
+
opacity: 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* ─── Theme-token palettes ────────────────────────────────────────────── */
|
|
263
|
+
|
|
264
|
+
.dm--foreground {
|
|
265
|
+
--dm-on: var(--foreground);
|
|
266
|
+
--dm-off: color-mix(in oklch, var(--foreground) 12%, transparent);
|
|
267
|
+
--dm-glow: color-mix(in oklch, var(--foreground) 55%, transparent);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.dm--primary {
|
|
271
|
+
--dm-on: var(--primary);
|
|
272
|
+
--dm-off: color-mix(in oklch, var(--primary) 14%, transparent);
|
|
273
|
+
--dm-glow: color-mix(in oklch, var(--primary) 65%, transparent);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.dm--destructive {
|
|
277
|
+
--dm-on: var(--destructive);
|
|
278
|
+
--dm-off: color-mix(in oklch, var(--destructive) 14%, transparent);
|
|
279
|
+
--dm-glow: color-mix(in oklch, var(--destructive) 65%, transparent);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.dm--warning {
|
|
283
|
+
--dm-on: var(--warning);
|
|
284
|
+
--dm-off: color-mix(in oklch, var(--warning) 14%, transparent);
|
|
285
|
+
--dm-glow: color-mix(in oklch, var(--warning) 65%, transparent);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/* ─── Named palettes (OKLCH for stability) ────────────────────────────── */
|
|
289
|
+
|
|
290
|
+
.dm--cyan {
|
|
291
|
+
--dm-on: oklch(90% 0.2 195);
|
|
292
|
+
--dm-off: oklch(40% 0.08 195 / 0.4);
|
|
293
|
+
--dm-glow: oklch(80% 0.25 195 / 0.95);
|
|
294
|
+
}
|
|
295
|
+
.dm--magenta {
|
|
296
|
+
--dm-on: oklch(85% 0.25 330);
|
|
297
|
+
--dm-off: oklch(40% 0.08 330 / 0.4);
|
|
298
|
+
--dm-glow: oklch(75% 0.3 330 / 0.95);
|
|
299
|
+
}
|
|
300
|
+
.dm--yellow {
|
|
301
|
+
--dm-on: oklch(95% 0.2 90);
|
|
302
|
+
--dm-off: oklch(50% 0.08 90 / 0.4);
|
|
303
|
+
--dm-glow: oklch(90% 0.25 90 / 0.95);
|
|
304
|
+
}
|
|
305
|
+
.dm--green {
|
|
306
|
+
--dm-on: oklch(90% 0.25 145);
|
|
307
|
+
--dm-off: oklch(40% 0.08 145 / 0.4);
|
|
308
|
+
--dm-glow: oklch(80% 0.3 145 / 0.95);
|
|
309
|
+
}
|
|
310
|
+
.dm--orange {
|
|
311
|
+
--dm-on: oklch(85% 0.22 50);
|
|
312
|
+
--dm-off: oklch(45% 0.08 50 / 0.4);
|
|
313
|
+
--dm-glow: oklch(75% 0.28 50 / 0.95);
|
|
314
|
+
}
|
|
315
|
+
.dm--blue {
|
|
316
|
+
--dm-on: oklch(80% 0.22 260);
|
|
317
|
+
--dm-off: oklch(40% 0.08 260 / 0.4);
|
|
318
|
+
--dm-glow: oklch(70% 0.28 260 / 0.95);
|
|
319
|
+
}
|
|
320
|
+
.dm--red {
|
|
321
|
+
--dm-on: oklch(70% 0.25 25);
|
|
322
|
+
--dm-off: oklch(40% 0.08 25 / 0.4);
|
|
323
|
+
--dm-glow: oklch(60% 0.3 25 / 0.95);
|
|
324
|
+
}
|
|
325
|
+
.dm--purple {
|
|
326
|
+
--dm-on: oklch(75% 0.22 300);
|
|
327
|
+
--dm-off: oklch(40% 0.08 300 / 0.4);
|
|
328
|
+
--dm-glow: oklch(65% 0.28 300 / 0.95);
|
|
329
|
+
}
|
|
330
|
+
.dm--teal {
|
|
331
|
+
--dm-on: oklch(82% 0.18 175);
|
|
332
|
+
--dm-off: oklch(40% 0.08 175 / 0.4);
|
|
333
|
+
--dm-glow: oklch(72% 0.24 175 / 0.95);
|
|
334
|
+
}
|
|
335
|
+
.dm--pink {
|
|
336
|
+
--dm-on: oklch(80% 0.2 350);
|
|
337
|
+
--dm-off: oklch(45% 0.08 350 / 0.4);
|
|
338
|
+
--dm-glow: oklch(70% 0.26 350 / 0.95);
|
|
339
|
+
}
|
|
340
|
+
.dm--lime {
|
|
341
|
+
--dm-on: oklch(88% 0.22 120);
|
|
342
|
+
--dm-off: oklch(45% 0.08 120 / 0.4);
|
|
343
|
+
--dm-glow: oklch(80% 0.28 120 / 0.95);
|
|
344
|
+
}
|
|
345
|
+
.dm--white {
|
|
346
|
+
--dm-on: oklch(98% 0 0);
|
|
347
|
+
--dm-off: oklch(50% 0 0 / 0.3);
|
|
348
|
+
--dm-glow: oklch(95% 0 0 / 0.85);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/* ─── Reduced motion — freeze animations ─────────────────────────────── */
|
|
352
|
+
|
|
353
|
+
@media (prefers-reduced-motion: reduce) {
|
|
354
|
+
.dm-root[data-status='running'],
|
|
355
|
+
.dm-root[data-status='success'] .dm-cell,
|
|
356
|
+
.dm-root[data-status='failed'] .dm-cell,
|
|
357
|
+
.dm-root[data-status='cancelled'] .dm-cell {
|
|
358
|
+
animation: none !important;
|
|
359
|
+
}
|
|
360
|
+
.dm-cell {
|
|
361
|
+
transform: none;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/* =============================================================================
|
|
2
|
+
* GooeyMorphingSurface — CSS layer for the SVG rect morph + HTML overlays.
|
|
3
|
+
*
|
|
4
|
+
* Classes are prefixed `.gms-*` so they act as a manual scope (mks-ui's
|
|
5
|
+
* rolldown build produces empty default-exports for CSS modules, so we use
|
|
6
|
+
* plain CSS with explicit classnames referenced as string literals from
|
|
7
|
+
* the component).
|
|
8
|
+
*
|
|
9
|
+
* Every tunable value comes from inline CSS custom props set by the React
|
|
10
|
+
* component at the root element. No hard-coded dimensions or timings here.
|
|
11
|
+
*
|
|
12
|
+
* Technique recap: two <rect>s inside a <g filter="url(#gooey)">. Body rect
|
|
13
|
+
* is a geometric CLONE of the pill when closed, and morphs into the card
|
|
14
|
+
* geometry (x, y, width, height, rx, ry all interpolate) when open. The
|
|
15
|
+
* gaussian-blur + alpha-threshold filter bends the overlapping silhouettes
|
|
16
|
+
* into a single shape with a soft metaball throat.
|
|
17
|
+
* ============================================================================= */
|
|
18
|
+
|
|
19
|
+
.gms-root {
|
|
20
|
+
position: relative;
|
|
21
|
+
display: inline-block;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.gms-shell {
|
|
25
|
+
position: relative;
|
|
26
|
+
width: var(--gms-card-w);
|
|
27
|
+
height: var(--gms-pill-h);
|
|
28
|
+
color: var(--gms-fill);
|
|
29
|
+
transition: height var(--gms-duration) var(--gms-ease);
|
|
30
|
+
/* Drop-shadow follows the fused silhouette. Chained filters = additive
|
|
31
|
+
* shadow layers for depth without a hard box-shadow. */
|
|
32
|
+
filter: drop-shadow(0 16px 38px rgb(0 0 0 / 0.35))
|
|
33
|
+
drop-shadow(0 4px 10px rgb(0 0 0 / 0.18));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.gms-shell[data-open='true'] {
|
|
37
|
+
height: calc(var(--gms-pill-h) + var(--gms-card-h));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.gms-svg {
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: 0;
|
|
43
|
+
left: 50%;
|
|
44
|
+
transform: translateX(-50%);
|
|
45
|
+
display: block;
|
|
46
|
+
overflow: visible;
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.gms-body-rect {
|
|
51
|
+
will-change: x, y, width, height;
|
|
52
|
+
transition:
|
|
53
|
+
x var(--gms-duration) var(--gms-ease),
|
|
54
|
+
y var(--gms-duration) var(--gms-ease),
|
|
55
|
+
width var(--gms-duration) var(--gms-ease),
|
|
56
|
+
height var(--gms-duration) var(--gms-ease),
|
|
57
|
+
rx var(--gms-duration) var(--gms-ease),
|
|
58
|
+
ry var(--gms-duration) var(--gms-ease);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.gms-pill {
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: 0;
|
|
64
|
+
left: var(--gms-pill-x);
|
|
65
|
+
width: var(--gms-pill-w);
|
|
66
|
+
height: var(--gms-pill-h);
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
gap: 0.5rem;
|
|
71
|
+
color: var(--card-foreground);
|
|
72
|
+
pointer-events: none;
|
|
73
|
+
z-index: 2;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.gms-card {
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: calc(var(--gms-pill-h) - var(--gms-overlap));
|
|
79
|
+
left: 0;
|
|
80
|
+
width: var(--gms-card-w);
|
|
81
|
+
height: var(--gms-card-h);
|
|
82
|
+
color: var(--card-foreground);
|
|
83
|
+
opacity: 0;
|
|
84
|
+
transform: translateY(4px);
|
|
85
|
+
pointer-events: none;
|
|
86
|
+
z-index: 2;
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
border-radius: var(--gms-card-r);
|
|
89
|
+
transition:
|
|
90
|
+
opacity calc(var(--gms-duration) * 0.35) var(--gms-ease),
|
|
91
|
+
transform calc(var(--gms-duration) * 0.35) var(--gms-ease);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.gms-shell[data-open='true'] .gms-card {
|
|
95
|
+
opacity: 1;
|
|
96
|
+
transform: translateY(0);
|
|
97
|
+
pointer-events: auto;
|
|
98
|
+
transition:
|
|
99
|
+
opacity calc(var(--gms-duration) * 0.55) var(--gms-ease)
|
|
100
|
+
calc(var(--gms-duration) * 0.45),
|
|
101
|
+
transform calc(var(--gms-duration) * 0.55) var(--gms-ease)
|
|
102
|
+
calc(var(--gms-duration) * 0.45);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@media (prefers-reduced-motion: reduce) {
|
|
106
|
+
.gms-shell,
|
|
107
|
+
.gms-body-rect,
|
|
108
|
+
.gms-card {
|
|
109
|
+
transition-duration: 0.01ms !important;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* =============================================================================
|
|
2
|
+
* GooeyButton — transparent hit area over the pill region.
|
|
3
|
+
*
|
|
4
|
+
* The visual pill is drawn by the <GooeyMorphingSurface> primitive; this
|
|
5
|
+
* layer is a single button that captures clicks in both open and closed
|
|
6
|
+
* states without painting anything. All layout math comes from the
|
|
7
|
+
* primitive's CSS custom props (--gms-pill-w, --gms-pill-h).
|
|
8
|
+
* ============================================================================= */
|
|
9
|
+
|
|
10
|
+
.gbtn-host {
|
|
11
|
+
position: relative;
|
|
12
|
+
display: inline-block;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.gbtn-trigger {
|
|
16
|
+
position: absolute;
|
|
17
|
+
top: 0;
|
|
18
|
+
left: 50%;
|
|
19
|
+
transform: translateX(-50%);
|
|
20
|
+
z-index: 3;
|
|
21
|
+
width: var(--gms-pill-w);
|
|
22
|
+
height: var(--gms-pill-h);
|
|
23
|
+
padding: 0;
|
|
24
|
+
margin: 0;
|
|
25
|
+
border: 0;
|
|
26
|
+
background: transparent;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
font: inherit;
|
|
29
|
+
color: inherit;
|
|
30
|
+
/* Pill-shaped focus ring. */
|
|
31
|
+
border-radius: 9999px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.gbtn-trigger:focus-visible {
|
|
35
|
+
outline: 2px solid var(--ring, currentColor);
|
|
36
|
+
outline-offset: 2px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.gbtn-trigger:disabled {
|
|
40
|
+
cursor: not-allowed;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
}
|
|
43
|
+
|