@mks2508/mks-ui 0.5.2 → 0.5.4
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/react-ui/index.js +8 -3
- package/dist/react-ui/primitives/index.js +5 -0
- package/dist/react-ui/primitives/waapi/Gooey/Gooey.types.d.ts +103 -0
- package/dist/react-ui/primitives/waapi/Gooey/Gooey.types.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Gooey/GooeyCanvas.d.ts +10 -0
- package/dist/react-ui/primitives/waapi/Gooey/GooeyCanvas.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Gooey/GooeyCanvas.js +59 -0
- package/dist/react-ui/primitives/waapi/Gooey/GooeyFilter.d.ts +7 -0
- package/dist/react-ui/primitives/waapi/Gooey/GooeyFilter.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Gooey/GooeyFilter.js +78 -0
- package/dist/react-ui/primitives/waapi/Gooey/MorphPath.d.ts +7 -0
- package/dist/react-ui/primitives/waapi/Gooey/MorphPath.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Gooey/MorphPath.js +51 -0
- package/dist/react-ui/primitives/waapi/Gooey/gooey-utils.d.ts +87 -0
- package/dist/react-ui/primitives/waapi/Gooey/gooey-utils.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Gooey/gooey-utils.js +177 -0
- package/dist/react-ui/primitives/waapi/Gooey/index.d.ts +28 -0
- package/dist/react-ui/primitives/waapi/Gooey/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Gooey/index.js +5 -0
- package/dist/react-ui/primitives/waapi/Gooey/useMorphPath.d.ts +7 -0
- package/dist/react-ui/primitives/waapi/Gooey/useMorphPath.d.ts.map +1 -0
- package/dist/react-ui/primitives/waapi/Gooey/useMorphPath.js +47 -0
- package/dist/react-ui/primitives/waapi/index.d.ts +2 -0
- package/dist/react-ui/primitives/waapi/index.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/index.js +6 -0
- package/dist/react-ui/ui/DataCard/DataCard.styles.d.ts +26 -16
- package/dist/react-ui/ui/DataCard/DataCard.styles.d.ts.map +1 -1
- package/dist/react-ui/ui/DataCard/DataCard.styles.js +36 -74
- package/dist/react-ui/ui/DataCard/DataCard.types.d.ts +50 -70
- package/dist/react-ui/ui/DataCard/DataCard.types.d.ts.map +1 -1
- package/dist/react-ui/ui/DataCard/index.d.ts +24 -93
- package/dist/react-ui/ui/DataCard/index.d.ts.map +1 -1
- package/dist/react-ui/ui/DataCard/index.js +76 -118
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle-Cm6-VceQ.css +304 -0
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.css +303 -0
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.js +0 -0
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.styles.d.ts +20 -8
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.styles.d.ts.map +1 -1
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.styles.js +55 -27
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.types.d.ts +63 -14
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.types.d.ts.map +1 -1
- package/dist/react-ui/ui/DynamicToggle/index.d.ts +22 -20
- package/dist/react-ui/ui/DynamicToggle/index.d.ts.map +1 -1
- package/dist/react-ui/ui/DynamicToggle/index.js +115 -96
- package/dist/react-ui/ui/Switch/index.js +1 -1
- package/dist/react-ui/ui/index.js +2 -2
- package/package.json +2 -2
- package/src/css.d.ts +1 -0
- package/src/react-ui/primitives/waapi/Gooey/Gooey.types.ts +123 -0
- package/src/react-ui/primitives/waapi/Gooey/GooeyCanvas.tsx +80 -0
- package/src/react-ui/primitives/waapi/Gooey/GooeyFilter.tsx +77 -0
- package/src/react-ui/primitives/waapi/Gooey/MorphPath.tsx +58 -0
- package/src/react-ui/primitives/waapi/Gooey/gooey-utils.ts +244 -0
- package/src/react-ui/primitives/waapi/Gooey/index.ts +50 -0
- package/src/react-ui/primitives/waapi/Gooey/useMorphPath.ts +48 -0
- package/src/react-ui/primitives/waapi/index.ts +23 -0
- package/src/react-ui/ui/DataCard/DataCard.styles.ts +45 -101
- package/src/react-ui/ui/DataCard/DataCard.types.ts +52 -73
- package/src/react-ui/ui/DataCard/index.tsx +118 -184
- package/src/react-ui/ui/DynamicToggle/DynamicToggle.css +244 -91
- package/src/react-ui/ui/DynamicToggle/DynamicToggle.styles.ts +60 -40
- package/src/react-ui/ui/DynamicToggle/DynamicToggle.types.ts +95 -14
- package/src/react-ui/ui/DynamicToggle/index.tsx +150 -96
- package/src/react-ui/ui/DynamicToggle/prototype-v7.html +615 -0
- package/src/react-ui/ui/DynamicToggle/prototype.html +419 -0
- package/src/react-ui/ui/Switch/index.tsx +1 -1
- /package/dist/react-ui/blocks/Terminal/panel/{terminal-filter-dropdown.module-DAcl_XQZ.css → terminal-filter-dropdown.module-C6oDcFBS.css} +0 -0
- /package/dist/react-ui/blocks/Terminal/panel/{terminal-session-tabs.module-DNAop5e3.css → terminal-session-tabs.module-D_-sgyza.css} +0 -0
- /package/dist/react-ui/components/MorphingPopover/{morphing-popover.module-BJrjXisF.css → morphing-popover.module-B1ftlaYj.css} +0 -0
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>DynamicToggle Prototype v6</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root {
|
|
9
|
+
--fg: #e2e8f0;
|
|
10
|
+
--bg: #0f172a;
|
|
11
|
+
--card: #1e293b;
|
|
12
|
+
--muted: #64748b;
|
|
13
|
+
--border: #334155;
|
|
14
|
+
--duration: 0.22;
|
|
15
|
+
--drop-off: 0.4;
|
|
16
|
+
--ease: cubic-bezier(0.22, 0.61, 0.36, 1);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
* { box-sizing: border-box; margin: 0; }
|
|
20
|
+
body {
|
|
21
|
+
min-height: 100vh;
|
|
22
|
+
display: flex; flex-direction: column; align-items: center;
|
|
23
|
+
padding: 4rem 1rem; gap: 3rem;
|
|
24
|
+
background: var(--bg);
|
|
25
|
+
font-family: system-ui, -apple-system, sans-serif;
|
|
26
|
+
color: var(--fg);
|
|
27
|
+
}
|
|
28
|
+
h3 { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 2px; }
|
|
29
|
+
.row { display: flex; gap: 2rem; align-items: end; flex-wrap: wrap; justify-content: center; }
|
|
30
|
+
|
|
31
|
+
/* Debug toggle */
|
|
32
|
+
#debug-toggle { position: fixed; top: 1rem; right: 1rem; z-index: 999; padding: 0.5rem 1rem; border-radius: 8px; background: #334155; color: #e2e8f0; border: 1px solid #475569; cursor: pointer; font-size: 12px; }
|
|
33
|
+
|
|
34
|
+
/* ================================================================
|
|
35
|
+
* CONTROL
|
|
36
|
+
* ================================================================ */
|
|
37
|
+
.control {
|
|
38
|
+
--w: 260px;
|
|
39
|
+
--h: 38px;
|
|
40
|
+
--radius: 9999px;
|
|
41
|
+
--font: 0.75rem;
|
|
42
|
+
--_r: min(var(--radius), calc(var(--h) / 2));
|
|
43
|
+
position: relative;
|
|
44
|
+
width: var(--w);
|
|
45
|
+
height: var(--h);
|
|
46
|
+
background: var(--card);
|
|
47
|
+
border-radius: var(--radius);
|
|
48
|
+
border: 1px solid var(--border);
|
|
49
|
+
padding: 2px;
|
|
50
|
+
margin-top: calc(var(--h) * 0.8);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.control__track {
|
|
54
|
+
display: grid; place-items: center;
|
|
55
|
+
grid-template-columns: repeat(4, 1fr);
|
|
56
|
+
width: 100%; height: 100%;
|
|
57
|
+
position: relative;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.indicator {
|
|
61
|
+
position: absolute;
|
|
62
|
+
width: 50%; left: 0; top: 0; bottom: 0;
|
|
63
|
+
background: var(--fg);
|
|
64
|
+
border-radius: var(--radius);
|
|
65
|
+
transition: translate calc(var(--duration) * 1s) var(--ease);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
label {
|
|
69
|
+
display: inline-grid; place-items: center;
|
|
70
|
+
height: 100%; width: 100%;
|
|
71
|
+
cursor: pointer; font-size: var(--font);
|
|
72
|
+
color: var(--fg); z-index: 2; font-weight: 500;
|
|
73
|
+
}
|
|
74
|
+
.control__track > label { color: var(--card); }
|
|
75
|
+
|
|
76
|
+
.sr-only {
|
|
77
|
+
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
|
|
78
|
+
overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.premium {
|
|
82
|
+
width: 100%; height: 100%;
|
|
83
|
+
display: grid; position: relative;
|
|
84
|
+
grid-template-columns: 1fr 1fr;
|
|
85
|
+
container-type: size;
|
|
86
|
+
}
|
|
87
|
+
.premium, .control__track > label:nth-of-type(1) { grid-column: span 2; }
|
|
88
|
+
.premium::before { display: none; }
|
|
89
|
+
|
|
90
|
+
.premium .indicator {
|
|
91
|
+
background: var(--fg); left: 50%; top: 0;
|
|
92
|
+
translate: -50% 0;
|
|
93
|
+
transition: translate calc(var(--duration) * 1s) var(--ease),
|
|
94
|
+
clip-path calc(var(--duration) * 1s) var(--ease),
|
|
95
|
+
background calc(var(--duration) * 1s) var(--ease);
|
|
96
|
+
clip-path: inset(73cqh calc(50% + 1px) calc(27cqh - 2px) calc(50% - 3px) round var(--radius));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.premium label span {
|
|
100
|
+
display: grid; place-items: center; height: 100%; width: 100%;
|
|
101
|
+
transition: scale calc(var(--duration) * 1s) var(--ease);
|
|
102
|
+
}
|
|
103
|
+
.premium label:nth-of-type(1) span { scale: 0.75; transform-origin: 150% 150%; border-radius: var(--radius); }
|
|
104
|
+
.premium label:nth-of-type(2) span { scale: 0.75; transform-origin: -65% 150%; border-radius: var(--radius); }
|
|
105
|
+
.premium label {
|
|
106
|
+
color: var(--muted);
|
|
107
|
+
transition: color calc(var(--duration) * 1s) var(--ease), opacity calc(var(--duration) * 1s) var(--ease);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.control__track:has(> :checked) > label { color: var(--card); }
|
|
111
|
+
.control__track:not(:has(> :checked)) > label { color: var(--fg); opacity: var(--drop-off); }
|
|
112
|
+
.control__track:not(:has(> :checked)) > .indicator { translate: 100% 0; }
|
|
113
|
+
.control__track:has(> :checked) .premium .indicator { background: var(--muted); }
|
|
114
|
+
.control__track:has(> :checked) .premium label { color: var(--muted); }
|
|
115
|
+
|
|
116
|
+
.premium:has(:checked) label span { scale: 1; }
|
|
117
|
+
.premium:has(:checked) .indicator { background: var(--card); clip-path: inset(0 0 0 0 round var(--radius)); }
|
|
118
|
+
.premium:has(:checked) label { color: var(--muted); opacity: 0.75; }
|
|
119
|
+
.premium:has(:nth-of-type(1):checked) label:nth-of-type(1),
|
|
120
|
+
.premium:has(:nth-of-type(2):checked) label:nth-of-type(2) { color: var(--fg); opacity: 1; }
|
|
121
|
+
.premium:has(:nth-of-type(1):checked) .indicator { translate: -100% 0; }
|
|
122
|
+
.premium:has(:nth-of-type(2):checked) .indicator { translate: 0 0; }
|
|
123
|
+
|
|
124
|
+
/* ================================================================
|
|
125
|
+
* BUBBLE — full width, ears at bottom corners
|
|
126
|
+
* Ears positioned at the junction line, curving inward
|
|
127
|
+
* ================================================================ */
|
|
128
|
+
.bubble {
|
|
129
|
+
position: absolute;
|
|
130
|
+
left: var(--_r);
|
|
131
|
+
right: var(--_r);
|
|
132
|
+
bottom: 100%;
|
|
133
|
+
margin-bottom: -1px;
|
|
134
|
+
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
justify-content: center;
|
|
138
|
+
|
|
139
|
+
background: var(--card);
|
|
140
|
+
border: 1px solid var(--border);
|
|
141
|
+
border-bottom: none;
|
|
142
|
+
border-radius: calc(var(--_r) * 0.4) calc(var(--_r) * 0.4) 0 0;
|
|
143
|
+
|
|
144
|
+
font-size: var(--font);
|
|
145
|
+
font-weight: 500;
|
|
146
|
+
color: var(--fg);
|
|
147
|
+
white-space: nowrap;
|
|
148
|
+
pointer-events: none;
|
|
149
|
+
|
|
150
|
+
height: 0;
|
|
151
|
+
padding: 0;
|
|
152
|
+
opacity: 0;
|
|
153
|
+
overflow: hidden;
|
|
154
|
+
|
|
155
|
+
transition:
|
|
156
|
+
height calc(var(--duration) * 1.5s) var(--ease),
|
|
157
|
+
padding calc(var(--duration) * 1.5s) var(--ease),
|
|
158
|
+
opacity calc(var(--duration) * 1s) var(--ease);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/*
|
|
162
|
+
* Concave ears — positioned BELOW the bubble, extending into the
|
|
163
|
+
* pill's border-radius corner area. The transparent quarter-circle
|
|
164
|
+
* reveals the page bg, creating the concave junction.
|
|
165
|
+
*
|
|
166
|
+
* All positions adjustable via --ear-* CSS vars (control panel).
|
|
167
|
+
*/
|
|
168
|
+
.bubble::before,
|
|
169
|
+
.bubble::after {
|
|
170
|
+
content: '';
|
|
171
|
+
position: absolute;
|
|
172
|
+
bottom: calc(-5px + var(--ear-ly, 0px));
|
|
173
|
+
width: var(--_r);
|
|
174
|
+
height: var(--_r);
|
|
175
|
+
pointer-events: none;
|
|
176
|
+
opacity: 0;
|
|
177
|
+
transition: opacity calc(var(--duration) * 1s) var(--ease);
|
|
178
|
+
}
|
|
179
|
+
.bubble::before {
|
|
180
|
+
left: calc(var(--_r) * -1 + var(--ear-lx, 0px));
|
|
181
|
+
background: radial-gradient(
|
|
182
|
+
circle at var(--ear-co-l, 0% 0%),
|
|
183
|
+
transparent calc(var(--_r) - 1.5px),
|
|
184
|
+
var(--border) calc(var(--_r) - 0.5px),
|
|
185
|
+
var(--card) var(--_r)
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
.bubble::after {
|
|
189
|
+
right: calc(var(--_r) * -1 + var(--ear-rx, 0px));
|
|
190
|
+
background: radial-gradient(
|
|
191
|
+
circle at var(--ear-co-r, 100% 0%),
|
|
192
|
+
transparent calc(var(--_r) - 1.5px),
|
|
193
|
+
var(--border) calc(var(--_r) - 0.5px),
|
|
194
|
+
var(--card) var(--_r)
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
.control:has(.premium :checked) .bubble::before,
|
|
198
|
+
.control:has(.premium :checked) .bubble::after {
|
|
199
|
+
opacity: 1;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* DEBUG: show ear boundaries */
|
|
203
|
+
[data-debug="true"] .bubble { outline: 2px dashed red; }
|
|
204
|
+
[data-debug="true"] .bubble::before { opacity: 1 !important; outline: 1px dashed cyan; }
|
|
205
|
+
[data-debug="true"] .bubble::after { opacity: 1 !important; outline: 1px dashed magenta; }
|
|
206
|
+
|
|
207
|
+
/* Active: bubble grows + ears show */
|
|
208
|
+
.control:has(.premium :checked) .bubble {
|
|
209
|
+
height: calc(var(--h) * 0.7);
|
|
210
|
+
padding: 0 0.75em;
|
|
211
|
+
opacity: 1;
|
|
212
|
+
overflow: visible;
|
|
213
|
+
}
|
|
214
|
+
.control:has(.premium :checked) .bubble::before,
|
|
215
|
+
.control:has(.premium :checked) .bubble::after {
|
|
216
|
+
opacity: 1;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* SIZES */
|
|
220
|
+
.control.xs { --w: 170px; --h: 26px; --font: 9px; }
|
|
221
|
+
.control.sm { --w: 210px; --h: 30px; --font: 10px; }
|
|
222
|
+
.control.lg { --w: 320px; --h: 44px; --font: 14px; }
|
|
223
|
+
.control.xl { --w: 400px; --h: 52px; --font: 16px; }
|
|
224
|
+
|
|
225
|
+
/* SHAPES */
|
|
226
|
+
.control.rounded { --radius: 12px; }
|
|
227
|
+
.control.square { --radius: 6px; }
|
|
228
|
+
</style>
|
|
229
|
+
</head>
|
|
230
|
+
<body>
|
|
231
|
+
|
|
232
|
+
<div id="controls" style="position:fixed;top:1rem;right:1rem;z-index:999;background:#1e293b;border:1px solid #475569;border-radius:12px;padding:1rem;display:flex;flex-direction:column;gap:0.5rem;font-size:11px;color:#94a3b8;min-width:280px;">
|
|
233
|
+
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:0.5rem">
|
|
234
|
+
<strong style="color:#e2e8f0">Ear Controls</strong>
|
|
235
|
+
<button onclick="if(document.body.dataset.debug==='true'){document.body.dataset.debug='false'}else{document.body.dataset.debug='true'}" style="padding:2px 8px;border-radius:4px;background:#334155;color:#e2e8f0;border:1px solid #475569;cursor:pointer;font-size:10px">Debug Colors</button>
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
<label>Left X: <span id="v-lx">0</span>px
|
|
239
|
+
<input type="range" min="-50" max="50" value="0" oninput="document.documentElement.style.setProperty('--ear-lx',this.value+'px');document.getElementById('v-lx').textContent=this.value" style="width:100%">
|
|
240
|
+
</label>
|
|
241
|
+
<label>Left Y (bottom offset): <span id="v-ly">0</span>
|
|
242
|
+
<input type="range" min="-50" max="50" value="0" oninput="document.documentElement.style.setProperty('--ear-ly',this.value+'px');document.getElementById('v-ly').textContent=this.value" style="width:100%">
|
|
243
|
+
</label>
|
|
244
|
+
<label>Right X: <span id="v-rx">0</span>px
|
|
245
|
+
<input type="range" min="-50" max="50" value="0" oninput="document.documentElement.style.setProperty('--ear-rx',this.value+'px');document.getElementById('v-rx').textContent=this.value" style="width:100%">
|
|
246
|
+
</label>
|
|
247
|
+
<label>Right Y (bottom offset): <span id="v-ry">0</span>
|
|
248
|
+
<input type="range" min="-50" max="50" value="0" oninput="document.documentElement.style.setProperty('--ear-ry',this.value+'px');document.getElementById('v-ry').textContent=this.value" style="width:100%">
|
|
249
|
+
</label>
|
|
250
|
+
<div style="margin-top:0.25rem;border-top:1px solid #334155;padding-top:0.25rem">
|
|
251
|
+
<strong style="color:#e2e8f0;font-size:10px">Quick: Both Y</strong>
|
|
252
|
+
</div>
|
|
253
|
+
<label>Both Y offset: <span id="v-by">0</span>
|
|
254
|
+
<input type="range" min="-50" max="50" value="0" oninput="var v=this.value+'px';document.documentElement.style.setProperty('--ear-ly',v);document.documentElement.style.setProperty('--ear-ry',v);document.getElementById('v-by').textContent=this.value;document.getElementById('v-ly').textContent=this.value;document.getElementById('v-ry').textContent=this.value" style="width:100%">
|
|
255
|
+
</label>
|
|
256
|
+
<label>Circle Origin Left: <span id="v-co1">0% 0%</span>
|
|
257
|
+
<select onchange="document.documentElement.style.setProperty('--ear-co-l',this.value);document.getElementById('v-co1').textContent=this.value" style="width:100%;background:#0f172a;color:#e2e8f0;border:1px solid #475569;border-radius:4px;padding:2px">
|
|
258
|
+
<option value="0% 0%">0% 0% (top-left)</option>
|
|
259
|
+
<option value="100% 0%">100% 0% (top-right)</option>
|
|
260
|
+
<option value="100% 100%">100% 100% (bottom-right)</option>
|
|
261
|
+
<option value="0% 100%">0% 100% (bottom-left)</option>
|
|
262
|
+
<option value="50% 50%">50% 50% (center)</option>
|
|
263
|
+
</select>
|
|
264
|
+
</label>
|
|
265
|
+
<label>Circle Origin Right: <span id="v-co2">100% 0%</span>
|
|
266
|
+
<select onchange="document.documentElement.style.setProperty('--ear-co-r',this.value);document.getElementById('v-co2').textContent=this.value" style="width:100%;background:#0f172a;color:#e2e8f0;border:1px solid #475569;border-radius:4px;padding:2px">
|
|
267
|
+
<option value="100% 0%">100% 0% (top-right)</option>
|
|
268
|
+
<option value="0% 0%">0% 0% (top-left)</option>
|
|
269
|
+
<option value="0% 100%">0% 100% (bottom-left)</option>
|
|
270
|
+
<option value="100% 100%">100% 100% (bottom-right)</option>
|
|
271
|
+
<option value="50% 50%">50% 50% (center)</option>
|
|
272
|
+
</select>
|
|
273
|
+
</label>
|
|
274
|
+
<div style="margin-top:0.5rem;padding-top:0.5rem;border-top:1px solid #334155;font-size:10px;color:#64748b" id="css-out"></div>
|
|
275
|
+
<button onclick="
|
|
276
|
+
var s=getComputedStyle(document.documentElement);
|
|
277
|
+
document.getElementById('css-out').textContent=
|
|
278
|
+
'left:'+s.getPropertyValue('--ear-lx')+' bottom:'+s.getPropertyValue('--ear-ly')+
|
|
279
|
+
' | right:'+s.getPropertyValue('--ear-rx')+' bottom:'+s.getPropertyValue('--ear-ry')+
|
|
280
|
+
' | size:'+s.getPropertyValue('--ear-pct')+'% | L-origin:'+s.getPropertyValue('--ear-co-l')+
|
|
281
|
+
' | R-origin:'+s.getPropertyValue('--ear-co-r');
|
|
282
|
+
" style="padding:4px 8px;border-radius:4px;background:#334155;color:#e2e8f0;border:1px solid #475569;cursor:pointer;font-size:10px">Copy Current Values</button>
|
|
283
|
+
</div>
|
|
284
|
+
|
|
285
|
+
<h3>All Sizes — Pill</h3>
|
|
286
|
+
<div class="row">
|
|
287
|
+
<div><h3>XS</h3>
|
|
288
|
+
<div class="control xs">
|
|
289
|
+
<div class="bubble">Changes</div>
|
|
290
|
+
<div class="control__track"><div class="indicator"></div>
|
|
291
|
+
<label for="xs-a">Tree</label><input class="sr-only" type="radio" name="xs" id="xs-a">
|
|
292
|
+
<div class="premium"><div class="indicator"></div>
|
|
293
|
+
<label for="xs-b"><span>Flat</span></label><input class="sr-only" type="radio" name="xs" id="xs-b" checked>
|
|
294
|
+
<label for="xs-c"><span>Grp</span></label><input class="sr-only" type="radio" name="xs" id="xs-c">
|
|
295
|
+
</div></div></div></div>
|
|
296
|
+
<div><h3>SM</h3>
|
|
297
|
+
<div class="control sm">
|
|
298
|
+
<div class="bubble">Changes</div>
|
|
299
|
+
<div class="control__track"><div class="indicator"></div>
|
|
300
|
+
<label for="sm-a">Tree</label><input class="sr-only" type="radio" name="sm" id="sm-a">
|
|
301
|
+
<div class="premium"><div class="indicator"></div>
|
|
302
|
+
<label for="sm-b"><span>Flat</span></label><input class="sr-only" type="radio" name="sm" id="sm-b" checked>
|
|
303
|
+
<label for="sm-c"><span>Grp</span></label><input class="sr-only" type="radio" name="sm" id="sm-c">
|
|
304
|
+
</div></div></div></div>
|
|
305
|
+
<div><h3>Default</h3>
|
|
306
|
+
<div class="control">
|
|
307
|
+
<div class="bubble">Premium</div>
|
|
308
|
+
<div class="control__track"><div class="indicator"></div>
|
|
309
|
+
<label for="df-a">Free</label><input class="sr-only" type="radio" name="df" id="df-a">
|
|
310
|
+
<div class="premium"><div class="indicator"></div>
|
|
311
|
+
<label for="df-b"><span>Solo</span></label><input class="sr-only" type="radio" name="df" id="df-b" checked>
|
|
312
|
+
<label for="df-c"><span>Team</span></label><input class="sr-only" type="radio" name="df" id="df-c">
|
|
313
|
+
</div></div></div></div>
|
|
314
|
+
<div><h3>LG</h3>
|
|
315
|
+
<div class="control lg">
|
|
316
|
+
<div class="bubble">Billing</div>
|
|
317
|
+
<div class="control__track"><div class="indicator"></div>
|
|
318
|
+
<label for="lg-a">Annual</label><input class="sr-only" type="radio" name="lg" id="lg-a">
|
|
319
|
+
<div class="premium"><div class="indicator"></div>
|
|
320
|
+
<label for="lg-b"><span>Monthly</span></label><input class="sr-only" type="radio" name="lg" id="lg-b" checked>
|
|
321
|
+
<label for="lg-c"><span>Weekly</span></label><input class="sr-only" type="radio" name="lg" id="lg-c">
|
|
322
|
+
</div></div></div></div>
|
|
323
|
+
<div><h3>XL</h3>
|
|
324
|
+
<div class="control xl">
|
|
325
|
+
<div class="bubble">Enterprise</div>
|
|
326
|
+
<div class="control__track"><div class="indicator"></div>
|
|
327
|
+
<label for="xl-a">Standard</label><input class="sr-only" type="radio" name="xl" id="xl-a">
|
|
328
|
+
<div class="premium"><div class="indicator"></div>
|
|
329
|
+
<label for="xl-b"><span>Business</span></label><input class="sr-only" type="radio" name="xl" id="xl-b" checked>
|
|
330
|
+
<label for="xl-c"><span>Custom</span></label><input class="sr-only" type="radio" name="xl" id="xl-c">
|
|
331
|
+
</div></div></div></div>
|
|
332
|
+
</div>
|
|
333
|
+
|
|
334
|
+
<h3>Rounded</h3>
|
|
335
|
+
<div class="row">
|
|
336
|
+
<div class="control sm rounded">
|
|
337
|
+
<div class="bubble">Mode</div>
|
|
338
|
+
<div class="control__track"><div class="indicator"></div>
|
|
339
|
+
<label for="r1-a">Off</label><input class="sr-only" type="radio" name="r1" id="r1-a">
|
|
340
|
+
<div class="premium"><div class="indicator"></div>
|
|
341
|
+
<label for="r1-b"><span>Auto</span></label><input class="sr-only" type="radio" name="r1" id="r1-b" checked>
|
|
342
|
+
<label for="r1-c"><span>Manual</span></label><input class="sr-only" type="radio" name="r1" id="r1-c">
|
|
343
|
+
</div></div></div>
|
|
344
|
+
<div class="control rounded">
|
|
345
|
+
<div class="bubble">Theme</div>
|
|
346
|
+
<div class="control__track"><div class="indicator"></div>
|
|
347
|
+
<label for="r2-a">System</label><input class="sr-only" type="radio" name="r2" id="r2-a">
|
|
348
|
+
<div class="premium"><div class="indicator"></div>
|
|
349
|
+
<label for="r2-b"><span>Light</span></label><input class="sr-only" type="radio" name="r2" id="r2-b" checked>
|
|
350
|
+
<label for="r2-c"><span>Dark</span></label><input class="sr-only" type="radio" name="r2" id="r2-c">
|
|
351
|
+
</div></div></div>
|
|
352
|
+
<div class="control lg rounded">
|
|
353
|
+
<div class="bubble">Advanced</div>
|
|
354
|
+
<div class="control__track"><div class="indicator"></div>
|
|
355
|
+
<label for="r3-a">Basic</label><input class="sr-only" type="radio" name="r3" id="r3-a">
|
|
356
|
+
<div class="premium"><div class="indicator"></div>
|
|
357
|
+
<label for="r3-b"><span>Pro</span></label><input class="sr-only" type="radio" name="r3" id="r3-b" checked>
|
|
358
|
+
<label for="r3-c"><span>Expert</span></label><input class="sr-only" type="radio" name="r3" id="r3-c">
|
|
359
|
+
</div></div></div>
|
|
360
|
+
</div>
|
|
361
|
+
|
|
362
|
+
<h3>Square</h3>
|
|
363
|
+
<div class="row">
|
|
364
|
+
<div class="control sm square">
|
|
365
|
+
<div class="bubble">Group</div>
|
|
366
|
+
<div class="control__track"><div class="indicator"></div>
|
|
367
|
+
<label for="sq1-a">A</label><input class="sr-only" type="radio" name="sq1" id="sq1-a">
|
|
368
|
+
<div class="premium"><div class="indicator"></div>
|
|
369
|
+
<label for="sq1-b"><span>B</span></label><input class="sr-only" type="radio" name="sq1" id="sq1-b" checked>
|
|
370
|
+
<label for="sq1-c"><span>C</span></label><input class="sr-only" type="radio" name="sq1" id="sq1-c">
|
|
371
|
+
</div></div></div>
|
|
372
|
+
<div class="control square">
|
|
373
|
+
<div class="bubble">Output</div>
|
|
374
|
+
<div class="control__track"><div class="indicator"></div>
|
|
375
|
+
<label for="sq2-a">Input</label><input class="sr-only" type="radio" name="sq2" id="sq2-a">
|
|
376
|
+
<div class="premium"><div class="indicator"></div>
|
|
377
|
+
<label for="sq2-b"><span>JSON</span></label><input class="sr-only" type="radio" name="sq2" id="sq2-b" checked>
|
|
378
|
+
<label for="sq2-c"><span>XML</span></label><input class="sr-only" type="radio" name="sq2" id="sq2-c">
|
|
379
|
+
</div></div></div>
|
|
380
|
+
<div class="control lg square">
|
|
381
|
+
<div class="bubble">Target</div>
|
|
382
|
+
<div class="control__track"><div class="indicator"></div>
|
|
383
|
+
<label for="sq3-a">Source</label><input class="sr-only" type="radio" name="sq3" id="sq3-a">
|
|
384
|
+
<div class="premium"><div class="indicator"></div>
|
|
385
|
+
<label for="sq3-b"><span>Dev</span></label><input class="sr-only" type="radio" name="sq3" id="sq3-b" checked>
|
|
386
|
+
<label for="sq3-c"><span>Prod</span></label><input class="sr-only" type="radio" name="sq3" id="sq3-c">
|
|
387
|
+
</div></div></div>
|
|
388
|
+
</div>
|
|
389
|
+
|
|
390
|
+
<h3>Collapsed (click left option)</h3>
|
|
391
|
+
<div class="row">
|
|
392
|
+
<div class="control">
|
|
393
|
+
<div class="bubble">Premium</div>
|
|
394
|
+
<div class="control__track"><div class="indicator"></div>
|
|
395
|
+
<label for="ps-a">Free</label><input class="sr-only" type="radio" name="ps" id="ps-a" checked>
|
|
396
|
+
<div class="premium"><div class="indicator"></div>
|
|
397
|
+
<label for="ps-b"><span>Solo</span></label><input class="sr-only" type="radio" name="ps" id="ps-b">
|
|
398
|
+
<label for="ps-c"><span>Team</span></label><input class="sr-only" type="radio" name="ps" id="ps-c">
|
|
399
|
+
</div></div></div>
|
|
400
|
+
<div class="control rounded">
|
|
401
|
+
<div class="bubble">Premium</div>
|
|
402
|
+
<div class="control__track"><div class="indicator"></div>
|
|
403
|
+
<label for="ps2-a">Free</label><input class="sr-only" type="radio" name="ps2" id="ps2-a" checked>
|
|
404
|
+
<div class="premium"><div class="indicator"></div>
|
|
405
|
+
<label for="ps2-b"><span>Solo</span></label><input class="sr-only" type="radio" name="ps2" id="ps2-b">
|
|
406
|
+
<label for="ps2-c"><span>Team</span></label><input class="sr-only" type="radio" name="ps2" id="ps2-c">
|
|
407
|
+
</div></div></div>
|
|
408
|
+
<div class="control square">
|
|
409
|
+
<div class="bubble">Premium</div>
|
|
410
|
+
<div class="control__track"><div class="indicator"></div>
|
|
411
|
+
<label for="ps3-a">Free</label><input class="sr-only" type="radio" name="ps3" id="ps3-a" checked>
|
|
412
|
+
<div class="premium"><div class="indicator"></div>
|
|
413
|
+
<label for="ps3-b"><span>Solo</span></label><input class="sr-only" type="radio" name="ps3" id="ps3-b">
|
|
414
|
+
<label for="ps3-c"><span>Team</span></label><input class="sr-only" type="radio" name="ps3" id="ps3-c">
|
|
415
|
+
</div></div></div>
|
|
416
|
+
</div>
|
|
417
|
+
|
|
418
|
+
</body>
|
|
419
|
+
</html>
|
|
@@ -107,7 +107,7 @@ function Switch({
|
|
|
107
107
|
defaultChecked={defaultChecked}
|
|
108
108
|
checked={checked}
|
|
109
109
|
onCheckedChange={setIsChecked}
|
|
110
|
-
nativeButton={nativeButton}
|
|
110
|
+
nativeButton={nativeButton ?? true}
|
|
111
111
|
disabled={disabled}
|
|
112
112
|
readOnly={readOnly}
|
|
113
113
|
required={required}
|
|
File without changes
|
|
File without changes
|