@mks2508/mks-ui 0.5.4 → 0.5.8
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/primitives/waapi/Gooey/Gooey.types.d.ts +23 -4
- package/dist/react-ui/primitives/waapi/Gooey/Gooey.types.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/Gooey/GooeyCanvas.d.ts +2 -2
- package/dist/react-ui/primitives/waapi/Gooey/GooeyCanvas.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/Gooey/GooeyCanvas.js +292 -31
- package/dist/react-ui/primitives/waapi/Gooey/gooey-utils.d.ts +7 -0
- package/dist/react-ui/primitives/waapi/Gooey/gooey-utils.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/Gooey/gooey-utils.js +6 -1
- package/dist/react-ui/ui/DynamicToggle/{DynamicToggle-Cm6-VceQ.css → DynamicToggle-DJLwEkHr.css} +116 -51
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.css +116 -51
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.styles.d.ts +1 -0
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.styles.d.ts.map +1 -1
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.styles.js +9 -3
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.types.d.ts +61 -31
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.types.d.ts.map +1 -1
- package/dist/react-ui/ui/DynamicToggle/index.d.ts +9 -3
- package/dist/react-ui/ui/DynamicToggle/index.d.ts.map +1 -1
- package/dist/react-ui/ui/DynamicToggle/index.js +68 -37
- package/package.json +52 -13
- package/src/assets/react.svg +0 -1
- package/src/core/index.ts +0 -7
- package/src/core/types.ts +0 -82
- package/src/css.d.ts +0 -7
- package/src/index.css +0 -129
- package/src/index.ts +0 -29
- package/src/react-ui/blocks/Terminal/ResttyAdapter.ts +0 -278
- package/src/react-ui/blocks/Terminal/Terminal.adapter.ts +0 -97
- package/src/react-ui/blocks/Terminal/Terminal.theme.restty.ts +0 -155
- package/src/react-ui/blocks/Terminal/Terminal.theme.ts +0 -80
- package/src/react-ui/blocks/Terminal/Terminal.types.ts +0 -438
- package/src/react-ui/blocks/Terminal/TerminalDisplay.styles.ts +0 -38
- package/src/react-ui/blocks/Terminal/TerminalDisplay.tsx +0 -254
- package/src/react-ui/blocks/Terminal/TerminalDisplay.types.ts +0 -73
- package/src/react-ui/blocks/Terminal/TerminalPanel.tsx +0 -269
- package/src/react-ui/blocks/Terminal/TerminalRestty.tsx +0 -326
- package/src/react-ui/blocks/Terminal/TerminalXterm.tsx +0 -230
- package/src/react-ui/blocks/Terminal/XTermAdapter.ts +0 -163
- package/src/react-ui/blocks/Terminal/chrome.ts +0 -25
- package/src/react-ui/blocks/Terminal/components/LogLineBadges.tsx +0 -316
- package/src/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.tsx +0 -218
- package/src/react-ui/blocks/Terminal/components/SyntaxHighlight.tsx +0 -386
- package/src/react-ui/blocks/Terminal/components/TerminalLogBadge.tsx +0 -67
- package/src/react-ui/blocks/Terminal/components/index.ts +0 -10
- package/src/react-ui/blocks/Terminal/display.ts +0 -46
- package/src/react-ui/blocks/Terminal/hooks/index.ts +0 -22
- package/src/react-ui/blocks/Terminal/hooks/useTerminalSettings.ts +0 -229
- package/src/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.ts +0 -292
- package/src/react-ui/blocks/Terminal/index.ts +0 -111
- package/src/react-ui/blocks/Terminal/panel/LogLinesViewer.tsx +0 -330
- package/src/react-ui/blocks/Terminal/panel/TerminalDebugPanel.tsx +0 -242
- package/src/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.tsx +0 -202
- package/src/react-ui/blocks/Terminal/panel/TerminalFilterTabs.tsx +0 -140
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.tsx +0 -68
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.ts +0 -85
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.tsx +0 -383
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.tsx +0 -439
- package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.tsx +0 -550
- package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.ts +0 -259
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.styles.ts +0 -75
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.tsx +0 -266
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.ts +0 -82
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelFooter.tsx +0 -112
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelHeader.tsx +0 -178
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.tsx +0 -203
- package/src/react-ui/blocks/Terminal/panel/TerminalSessionControl.tsx +0 -252
- package/src/react-ui/blocks/Terminal/panel/TerminalSessionTabs.tsx +0 -334
- package/src/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.tsx +0 -261
- package/src/react-ui/blocks/Terminal/panel/TerminalThemeSelector.tsx +0 -248
- package/src/react-ui/blocks/Terminal/panel/index.ts +0 -72
- package/src/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module.css +0 -59
- package/src/react-ui/blocks/Terminal/panel/terminal-session-tabs.module.css +0 -59
- package/src/react-ui/blocks/Terminal/parsing/BadgeFormatter.ts +0 -180
- package/src/react-ui/blocks/Terminal/parsing/HttpLogParser.ts +0 -248
- package/src/react-ui/blocks/Terminal/parsing/LogParser.types.ts +0 -283
- package/src/react-ui/blocks/Terminal/parsing/LogParserService.ts +0 -686
- package/src/react-ui/blocks/Terminal/parsing/MultilineAggregator.ts +0 -466
- package/src/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.ts +0 -343
- package/src/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.ts +0 -167
- package/src/react-ui/blocks/Terminal/parsing/TableParser.ts +0 -348
- package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.ts +0 -251
- package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.ts +0 -390
- package/src/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.ts +0 -320
- package/src/react-ui/blocks/Terminal/parsing/ansi/index.ts +0 -20
- package/src/react-ui/blocks/Terminal/parsing/index.ts +0 -69
- package/src/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.ts +0 -68
- package/src/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.ts +0 -436
- package/src/react-ui/blocks/Terminal/parsing/levels/index.ts +0 -14
- package/src/react-ui/blocks/index.ts +0 -11
- package/src/react-ui/components/MorphingPopover/MorphingPopover.types.ts +0 -49
- package/src/react-ui/components/MorphingPopover/index.tsx +0 -186
- package/src/react-ui/components/MorphingPopover/morphing-popover.module.css +0 -153
- package/src/react-ui/components/index.ts +0 -9
- package/src/react-ui/hooks/Animation/UseAutoHeight.tsx +0 -123
- package/src/react-ui/hooks/DOM/UseIsInView.tsx +0 -44
- package/src/react-ui/hooks/Formatting/UseListFormat.ts +0 -134
- package/src/react-ui/hooks/State/UseControlledState.tsx +0 -57
- package/src/react-ui/hooks/State/UseDataState.tsx +0 -76
- package/src/react-ui/hooks/index.ts +0 -20
- package/src/react-ui/icons/index.ts +0 -12
- package/src/react-ui/icons/lucide-animated/activity.tsx +0 -109
- package/src/react-ui/icons/lucide-animated/arrow-down-to-line.tsx +0 -51
- package/src/react-ui/icons/lucide-animated/arrow-up.tsx +0 -50
- package/src/react-ui/icons/lucide-animated/bell-electric.tsx +0 -124
- package/src/react-ui/icons/lucide-animated/bell.tsx +0 -93
- package/src/react-ui/icons/lucide-animated/bot.tsx +0 -122
- package/src/react-ui/icons/lucide-animated/box.tsx +0 -117
- package/src/react-ui/icons/lucide-animated/check.tsx +0 -21
- package/src/react-ui/icons/lucide-animated/circle-check.tsx +0 -107
- package/src/react-ui/icons/lucide-animated/delete.tsx +0 -133
- package/src/react-ui/icons/lucide-animated/download.tsx +0 -99
- package/src/react-ui/icons/lucide-animated/edit-2.tsx +0 -21
- package/src/react-ui/icons/lucide-animated/globe.tsx +0 -23
- package/src/react-ui/icons/lucide-animated/home.tsx +0 -103
- package/src/react-ui/icons/lucide-animated/index.ts +0 -38
- package/src/react-ui/icons/lucide-animated/layers.tsx +0 -23
- package/src/react-ui/icons/lucide-animated/layout-panel-top.tsx +0 -143
- package/src/react-ui/icons/lucide-animated/list.tsx +0 -54
- package/src/react-ui/icons/lucide-animated/package.tsx +0 -24
- package/src/react-ui/icons/lucide-animated/palette.tsx +0 -25
- package/src/react-ui/icons/lucide-animated/plus.tsx +0 -92
- package/src/react-ui/icons/lucide-animated/refresh-cw.tsx +0 -24
- package/src/react-ui/icons/lucide-animated/rocket.tsx +0 -24
- package/src/react-ui/icons/lucide-animated/save.tsx +0 -23
- package/src/react-ui/icons/lucide-animated/search.tsx +0 -94
- package/src/react-ui/icons/lucide-animated/settings.tsx +0 -92
- package/src/react-ui/icons/lucide-animated/terminal.tsx +0 -46
- package/src/react-ui/icons/lucide-animated/trash-2.tsx +0 -25
- package/src/react-ui/icons/lucide-animated/trending-down.tsx +0 -151
- package/src/react-ui/icons/lucide-animated/trending-up.tsx +0 -150
- package/src/react-ui/icons/lucide-animated/type.tsx +0 -23
- package/src/react-ui/icons/lucide-animated/upload.tsx +0 -23
- package/src/react-ui/icons/lucide-animated/x.tsx +0 -102
- package/src/react-ui/index.ts +0 -30
- package/src/react-ui/lib/get-strict-context.tsx +0 -56
- package/src/react-ui/lib/icon-wrapper.tsx +0 -70
- package/src/react-ui/lib/index.ts +0 -9
- package/src/react-ui/lib/utils.ts +0 -24
- package/src/react-ui/primitives/AutoHeight/index.tsx +0 -74
- package/src/react-ui/primitives/CountingNumber/index.tsx +0 -147
- package/src/react-ui/primitives/Highlight/Highlight.types.ts +0 -136
- package/src/react-ui/primitives/Highlight/index.tsx +0 -577
- package/src/react-ui/primitives/Slot/index.tsx +0 -128
- package/src/react-ui/primitives/index.ts +0 -16
- package/src/react-ui/primitives/waapi/Gooey/Gooey.types.ts +0 -123
- package/src/react-ui/primitives/waapi/Gooey/GooeyCanvas.tsx +0 -80
- package/src/react-ui/primitives/waapi/Gooey/GooeyFilter.tsx +0 -77
- package/src/react-ui/primitives/waapi/Gooey/MorphPath.tsx +0 -58
- package/src/react-ui/primitives/waapi/Gooey/gooey-utils.ts +0 -244
- package/src/react-ui/primitives/waapi/Gooey/index.ts +0 -50
- package/src/react-ui/primitives/waapi/Gooey/useMorphPath.ts +0 -48
- package/src/react-ui/primitives/waapi/Morph/Morph.types.ts +0 -106
- package/src/react-ui/primitives/waapi/Morph/MorphContext.tsx +0 -21
- package/src/react-ui/primitives/waapi/Morph/index.tsx +0 -56
- package/src/react-ui/primitives/waapi/Morph/techniques/index.ts +0 -12
- package/src/react-ui/primitives/waapi/Morph/techniques/useCSSGridMorph.ts +0 -89
- package/src/react-ui/primitives/waapi/Morph/techniques/useFLIPClipPath.ts +0 -176
- package/src/react-ui/primitives/waapi/Morph/techniques/useViewTransitions.ts +0 -87
- package/src/react-ui/primitives/waapi/Morph/useMorph.ts +0 -101
- package/src/react-ui/primitives/waapi/Reorder/Reorder.types.ts +0 -177
- package/src/react-ui/primitives/waapi/Reorder/index.tsx +0 -260
- package/src/react-ui/primitives/waapi/Reorder/useReorder.ts +0 -47
- package/src/react-ui/primitives/waapi/Reorder/useReorderPresence.ts +0 -209
- package/src/react-ui/primitives/waapi/Reorder/utils/separatorCoordination.ts +0 -104
- package/src/react-ui/primitives/waapi/SlidingNumber/SlidingNumber.styles.ts +0 -14
- package/src/react-ui/primitives/waapi/SlidingNumber/SlidingNumber.types.ts +0 -84
- package/src/react-ui/primitives/waapi/SlidingNumber/index.tsx +0 -474
- package/src/react-ui/primitives/waapi/SlidingText/SlidingText.styles.ts +0 -32
- package/src/react-ui/primitives/waapi/SlidingText/SlidingText.types.ts +0 -69
- package/src/react-ui/primitives/waapi/SlidingText/index.tsx +0 -140
- package/src/react-ui/primitives/waapi/core/animationConstants.ts +0 -215
- package/src/react-ui/primitives/waapi/core/index.ts +0 -53
- package/src/react-ui/primitives/waapi/core/types.ts +0 -200
- package/src/react-ui/primitives/waapi/core/useAnimationOrchestrator.ts +0 -430
- package/src/react-ui/primitives/waapi/core/useElementRegistry.ts +0 -81
- package/src/react-ui/primitives/waapi/core/useFLIPAnimation.ts +0 -138
- package/src/react-ui/primitives/waapi/core/usePositionCapture.ts +0 -106
- package/src/react-ui/primitives/waapi/index.ts +0 -139
- package/src/react-ui/styles/animations.css +0 -369
- package/src/react-ui/ui/Accordion/Accordion.styles.ts +0 -72
- package/src/react-ui/ui/Accordion/Accordion.types.ts +0 -199
- package/src/react-ui/ui/Accordion/index.tsx +0 -362
- package/src/react-ui/ui/AlertDialog/AlertDialog.styles.ts +0 -38
- package/src/react-ui/ui/AlertDialog/AlertDialog.types.ts +0 -296
- package/src/react-ui/ui/AlertDialog/index.tsx +0 -540
- package/src/react-ui/ui/Badge/Badge.styles.ts +0 -43
- package/src/react-ui/ui/Badge/Badge.types.ts +0 -26
- package/src/react-ui/ui/Badge/index.tsx +0 -34
- package/src/react-ui/ui/Button/Button.styles.ts +0 -57
- package/src/react-ui/ui/Button/Button.types.ts +0 -63
- package/src/react-ui/ui/Button/index.tsx +0 -155
- package/src/react-ui/ui/Card/Card.styles.ts +0 -32
- package/src/react-ui/ui/Card/Card.types.ts +0 -39
- package/src/react-ui/ui/Card/index.tsx +0 -130
- package/src/react-ui/ui/Checkbox/Checkbox.styles.ts +0 -40
- package/src/react-ui/ui/Checkbox/Checkbox.types.ts +0 -98
- package/src/react-ui/ui/Checkbox/index.tsx +0 -233
- package/src/react-ui/ui/Combobox/Combobox.styles.ts +0 -34
- package/src/react-ui/ui/Combobox/Combobox.types.ts +0 -89
- package/src/react-ui/ui/Combobox/index.tsx +0 -331
- package/src/react-ui/ui/CornerBracket/CornerBracket.styles.ts +0 -38
- package/src/react-ui/ui/CornerBracket/CornerBracket.types.ts +0 -15
- package/src/react-ui/ui/CornerBracket/index.tsx +0 -49
- package/src/react-ui/ui/DataCard/DataCard.styles.ts +0 -94
- package/src/react-ui/ui/DataCard/DataCard.types.ts +0 -125
- package/src/react-ui/ui/DataCard/index.tsx +0 -340
- package/src/react-ui/ui/Dialog/Dialog.styles.ts +0 -59
- package/src/react-ui/ui/Dialog/Dialog.types.ts +0 -284
- package/src/react-ui/ui/Dialog/index.tsx +0 -452
- package/src/react-ui/ui/DropdownMenu/DropdownMenu.styles.ts +0 -35
- package/src/react-ui/ui/DropdownMenu/DropdownMenu.types.ts +0 -81
- package/src/react-ui/ui/DropdownMenu/index.tsx +0 -300
- package/src/react-ui/ui/DynamicToggle/DynamicToggle.css +0 -303
- package/src/react-ui/ui/DynamicToggle/DynamicToggle.styles.ts +0 -85
- package/src/react-ui/ui/DynamicToggle/DynamicToggle.types.ts +0 -174
- package/src/react-ui/ui/DynamicToggle/index.tsx +0 -294
- package/src/react-ui/ui/DynamicToggle/prototype-v7.html +0 -615
- package/src/react-ui/ui/DynamicToggle/prototype.html +0 -419
- package/src/react-ui/ui/Field/Field.styles.ts +0 -47
- package/src/react-ui/ui/Field/Field.types.ts +0 -60
- package/src/react-ui/ui/Field/index.tsx +0 -254
- package/src/react-ui/ui/Input/Input.styles.ts +0 -11
- package/src/react-ui/ui/Input/Input.types.ts +0 -10
- package/src/react-ui/ui/Input/index.tsx +0 -32
- package/src/react-ui/ui/InputGroup/InputGroup.styles.ts +0 -53
- package/src/react-ui/ui/InputGroup/InputGroup.types.ts +0 -44
- package/src/react-ui/ui/InputGroup/index.tsx +0 -149
- package/src/react-ui/ui/Label/Label.styles.ts +0 -10
- package/src/react-ui/ui/Label/Label.types.ts +0 -9
- package/src/react-ui/ui/Label/index.tsx +0 -27
- package/src/react-ui/ui/Menu/Menu.styles.ts +0 -71
- package/src/react-ui/ui/Menu/Menu.types.ts +0 -425
- package/src/react-ui/ui/Menu/index.tsx +0 -900
- package/src/react-ui/ui/Popover/Popover.styles.ts +0 -55
- package/src/react-ui/ui/Popover/Popover.types.ts +0 -261
- package/src/react-ui/ui/Popover/index.tsx +0 -422
- package/src/react-ui/ui/Progress/Progress.styles.ts +0 -36
- package/src/react-ui/ui/Progress/Progress.types.ts +0 -162
- package/src/react-ui/ui/Progress/index.tsx +0 -254
- package/src/react-ui/ui/Select/Select.styles.ts +0 -30
- package/src/react-ui/ui/Select/Select.types.ts +0 -51
- package/src/react-ui/ui/Select/index.tsx +0 -225
- package/src/react-ui/ui/Separator/Separator.styles.ts +0 -10
- package/src/react-ui/ui/Separator/Separator.types.ts +0 -10
- package/src/react-ui/ui/Separator/index.tsx +0 -37
- package/src/react-ui/ui/Switch/Switch.styles.ts +0 -50
- package/src/react-ui/ui/Switch/Switch.types.ts +0 -155
- package/src/react-ui/ui/Switch/index.tsx +0 -253
- package/src/react-ui/ui/Tabs/Tabs.css +0 -39
- package/src/react-ui/ui/Tabs/Tabs.styles.ts +0 -148
- package/src/react-ui/ui/Tabs/Tabs.types.ts +0 -255
- package/src/react-ui/ui/Tabs/index.tsx +0 -529
- package/src/react-ui/ui/TextFlow/TextFlow.styles.ts +0 -36
- package/src/react-ui/ui/TextFlow/TextFlow.types.ts +0 -118
- package/src/react-ui/ui/TextFlow/index.tsx +0 -276
- package/src/react-ui/ui/Textarea/Textarea.styles.ts +0 -10
- package/src/react-ui/ui/Textarea/Textarea.types.ts +0 -9
- package/src/react-ui/ui/Textarea/index.tsx +0 -27
- package/src/react-ui/ui/Tooltip/Tooltip.styles.ts +0 -43
- package/src/react-ui/ui/Tooltip/Tooltip.types.ts +0 -253
- package/src/react-ui/ui/Tooltip/index.tsx +0 -394
- package/src/react-ui/ui/index.ts +0 -41
- package/src/types/css-modules.d.ts +0 -18
|
@@ -1,419 +0,0 @@
|
|
|
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>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { cva } from 'class-variance-authority';
|
|
2
|
-
import type { StyleSlots } from '@/core/types';
|
|
3
|
-
|
|
4
|
-
/** Visual regions for the Field component family. */
|
|
5
|
-
type FieldSlot =
|
|
6
|
-
| 'root'
|
|
7
|
-
| 'set'
|
|
8
|
-
| 'legend'
|
|
9
|
-
| 'group'
|
|
10
|
-
| 'content'
|
|
11
|
-
| 'label'
|
|
12
|
-
| 'title'
|
|
13
|
-
| 'description'
|
|
14
|
-
| 'separator'
|
|
15
|
-
| 'error';
|
|
16
|
-
|
|
17
|
-
const fieldStyles: StyleSlots<FieldSlot> = {
|
|
18
|
-
root: 'data-[invalid=true]:text-destructive gap-2 group/field flex w-full',
|
|
19
|
-
set: 'gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col',
|
|
20
|
-
legend: 'mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base',
|
|
21
|
-
group: 'gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4 group/field-group @container/field-group flex w-full flex-col',
|
|
22
|
-
content: 'gap-0.5 group/field-content flex flex-1 flex-col leading-snug',
|
|
23
|
-
label: 'has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 group/field-label peer/field-label flex w-fit leading-snug has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col',
|
|
24
|
-
title: 'gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center leading-snug',
|
|
25
|
-
description: 'text-muted-foreground text-left text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-data-horizontal/field:text-balance last:mt-0 nth-last-2:-mt-1 [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',
|
|
26
|
-
separator: '-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative',
|
|
27
|
-
error: 'text-destructive text-sm font-normal',
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
/** CVA variants for the Field root orientation. */
|
|
31
|
-
const fieldVariants = cva(fieldStyles.root, {
|
|
32
|
-
variants: {
|
|
33
|
-
orientation: {
|
|
34
|
-
vertical: 'flex-col *:w-full [&>.sr-only]:w-auto',
|
|
35
|
-
horizontal:
|
|
36
|
-
'flex-row items-center *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',
|
|
37
|
-
responsive:
|
|
38
|
-
'flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:*:data-[slot=field-label]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
defaultVariants: {
|
|
42
|
-
orientation: 'vertical',
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
export { fieldStyles, fieldVariants };
|
|
47
|
-
export type { FieldSlot };
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import type { SlotOverrides } from '@/core/types';
|
|
3
|
-
import type { fieldVariants, FieldSlot } from './Field.styles';
|
|
4
|
-
|
|
5
|
-
/** Props for the FieldSet component. */
|
|
6
|
-
interface IFieldSetProps extends React.ComponentProps<'fieldset'> {
|
|
7
|
-
slots?: SlotOverrides<FieldSlot>;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/** Props for the FieldLegend component. */
|
|
11
|
-
interface IFieldLegendProps extends React.ComponentProps<'legend'> {
|
|
12
|
-
/** Legend display variant. */
|
|
13
|
-
variant?: 'legend' | 'label';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/** Props for the FieldGroup component. */
|
|
17
|
-
type IFieldGroupProps = React.ComponentProps<'div'>;
|
|
18
|
-
|
|
19
|
-
/** Props for the Field component. */
|
|
20
|
-
interface IFieldProps
|
|
21
|
-
extends React.ComponentProps<'div'>,
|
|
22
|
-
VariantProps<typeof fieldVariants> {
|
|
23
|
-
slots?: SlotOverrides<FieldSlot>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/** Props for the FieldContent component. */
|
|
27
|
-
type IFieldContentProps = React.ComponentProps<'div'>;
|
|
28
|
-
|
|
29
|
-
/** Props for the FieldLabel component. */
|
|
30
|
-
type IFieldLabelProps = React.ComponentProps<'label'>;
|
|
31
|
-
|
|
32
|
-
/** Props for the FieldTitle component. */
|
|
33
|
-
type IFieldTitleProps = React.ComponentProps<'div'>;
|
|
34
|
-
|
|
35
|
-
/** Props for the FieldDescription component. */
|
|
36
|
-
type IFieldDescriptionProps = React.ComponentProps<'p'>;
|
|
37
|
-
|
|
38
|
-
/** Props for the FieldSeparator component. */
|
|
39
|
-
interface IFieldSeparatorProps extends React.ComponentProps<'div'> {
|
|
40
|
-
children?: React.ReactNode;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/** Props for the FieldError component. */
|
|
44
|
-
interface IFieldErrorProps extends React.ComponentProps<'div'> {
|
|
45
|
-
/** Array of error objects to display. */
|
|
46
|
-
errors?: Array<{ message?: string } | undefined>;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export type {
|
|
50
|
-
IFieldSetProps,
|
|
51
|
-
IFieldLegendProps,
|
|
52
|
-
IFieldGroupProps,
|
|
53
|
-
IFieldProps,
|
|
54
|
-
IFieldContentProps,
|
|
55
|
-
IFieldLabelProps,
|
|
56
|
-
IFieldTitleProps,
|
|
57
|
-
IFieldDescriptionProps,
|
|
58
|
-
IFieldSeparatorProps,
|
|
59
|
-
IFieldErrorProps,
|
|
60
|
-
};
|