@yewdiel21/motion-kit 0.14.0 → 0.15.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/README.md +174 -155
- package/bin/motion-kit.mjs +3 -3
- package/dist/auto/index.d.ts +6 -3
- package/dist/auto/index.js +8 -2
- package/dist/auto/index.js.map +1 -1
- package/dist/{chunk-EY4BJKC4.js → chunk-6IRJYXJU.js} +2 -2
- package/dist/{chunk-CU6SXW3E.js → chunk-A6QQCF6V.js} +1309 -310
- package/dist/chunk-A6QQCF6V.js.map +1 -0
- package/dist/chunk-JXRS3OEA.js +3638 -0
- package/dist/chunk-JXRS3OEA.js.map +1 -0
- package/dist/css/components/add-to-cart.css +72 -0
- package/dist/css/components/bidirectional-slider.css +168 -0
- package/dist/css/components/data-table.css +121 -26
- package/dist/css/components/filter-builder.css +10 -15
- package/dist/css/components/heatmap-chart.css +391 -0
- package/dist/css/components/hover-card.css +8 -2
- package/dist/css/components/image-preview.css +90 -2
- package/dist/css/components/json-viewer.css +33 -1
- package/dist/css/components/nav.css +102 -102
- package/dist/css/components/orbit-menu.css +130 -0
- package/dist/css/components/pagination.css +10 -5
- package/dist/css/components/pie-chart.css +390 -0
- package/dist/css/components/pill-button.css +135 -0
- package/dist/css/components/radar-chart.css +370 -0
- package/dist/css/components/radial-chart.css +398 -0
- package/dist/css/components/sankey-chart.css +358 -0
- package/dist/css/components/scroll-island.css +111 -0
- package/dist/css/components/select.css +136 -0
- package/dist/css/components/toolbar.css +122 -0
- package/dist/css/components/tree-view.css +79 -0
- package/dist/css/components/voice-dots.css +70 -0
- package/dist/elements/index.d.ts +180 -7
- package/dist/elements/index.js +287 -6
- package/dist/elements/index.js.map +1 -1
- package/dist/{engine-Cn6IhE3z.d.ts → engine-5zRIssTO.d.ts} +11 -1
- package/dist/index.css +1832 -168
- package/dist/index.d.ts +4 -4
- package/dist/index.js +33 -3
- package/dist/index.js.map +1 -1
- package/dist/react/index.d.ts +117 -11
- package/dist/react/index.js +314 -13
- package/dist/react/index.js.map +1 -1
- package/dist/{reduced-BBUusld6.d.ts → reduced-6X_bns60.d.ts} +1 -1
- package/dist/{reveal-DEvp6U6T.d.ts → reveal-BfyKKsw4.d.ts} +97 -4
- package/dist/store-CA2Qcun_.d.ts +453 -0
- package/package.json +9 -16
- package/registry.json +1096 -948
- package/src/auto/auto-init.ts +6 -0
- package/src/components/add-to-cart/README.md +34 -0
- package/src/components/add-to-cart/add-to-cart.css +71 -0
- package/src/components/add-to-cart/element.ts +20 -0
- package/src/components/add-to-cart/engine.ts +206 -0
- package/src/components/add-to-cart/react.tsx +29 -0
- package/src/components/bidirectional-slider/README.md +46 -0
- package/src/components/bidirectional-slider/bidirectional-slider.css +167 -0
- package/src/components/bidirectional-slider/element.ts +42 -0
- package/src/components/bidirectional-slider/engine.ts +289 -0
- package/src/components/bidirectional-slider/react.tsx +45 -0
- package/src/components/chart/README.md +10 -0
- package/src/components/chart/element.ts +2 -0
- package/src/components/chart/engine.ts +50 -23
- package/src/components/chart/parts.ts +237 -0
- package/src/components/chart/react.tsx +2 -2
- package/src/components/chart/use-chart.ts +55 -0
- package/src/components/data-table/README.md +3 -3
- package/src/components/data-table/data-table.css +121 -26
- package/src/components/data-table/engine.ts +81 -29
- package/src/components/editable-table/engine.ts +67 -11
- package/src/components/filter-builder/engine.ts +33 -2
- package/src/components/filter-builder/filter-builder.css +10 -15
- package/src/components/heatmap-chart/README.md +48 -0
- package/src/components/heatmap-chart/element.ts +21 -0
- package/src/components/heatmap-chart/engine.ts +281 -0
- package/src/components/heatmap-chart/heatmap-chart.css +93 -0
- package/src/components/heatmap-chart/react.tsx +14 -0
- package/src/components/hover-card/engine.ts +30 -1
- package/src/components/hover-card/hover-card.css +8 -2
- package/src/components/image-preview/element.ts +1 -1
- package/src/components/image-preview/engine.ts +95 -15
- package/src/components/image-preview/image-preview.css +90 -2
- package/src/components/image-preview/react.tsx +3 -3
- package/src/components/json-viewer/engine.ts +11 -2
- package/src/components/json-viewer/json-viewer.css +33 -1
- package/src/components/nav/README.md +12 -10
- package/src/components/nav/element.ts +5 -5
- package/src/components/nav/engine.ts +21 -14
- package/src/components/nav/nav.css +102 -102
- package/src/components/nav/react.tsx +4 -4
- package/src/components/orbit-menu/README.md +46 -0
- package/src/components/orbit-menu/element.ts +27 -0
- package/src/components/orbit-menu/engine.ts +179 -0
- package/src/components/orbit-menu/orbit-menu.css +129 -0
- package/src/components/orbit-menu/react.tsx +44 -0
- package/src/components/pagination/README.md +1 -1
- package/src/components/pagination/engine.ts +50 -4
- package/src/components/pagination/pagination.css +10 -5
- package/src/components/pie-chart/README.md +48 -0
- package/src/components/pie-chart/element.ts +30 -0
- package/src/components/pie-chart/engine.ts +283 -0
- package/src/components/pie-chart/pie-chart.css +92 -0
- package/src/components/pie-chart/react.tsx +14 -0
- package/src/components/pill-button/README.md +46 -0
- package/src/components/pill-button/element.ts +16 -0
- package/src/components/pill-button/engine.ts +77 -0
- package/src/components/pill-button/pill-button.css +134 -0
- package/src/components/pill-button/react.tsx +32 -0
- package/src/components/radar-chart/README.md +48 -0
- package/src/components/radar-chart/element.ts +30 -0
- package/src/components/radar-chart/engine.ts +327 -0
- package/src/components/radar-chart/radar-chart.css +72 -0
- package/src/components/radar-chart/react.tsx +14 -0
- package/src/components/radial-chart/README.md +48 -0
- package/src/components/radial-chart/element.ts +30 -0
- package/src/components/radial-chart/engine.ts +290 -0
- package/src/components/radial-chart/radial-chart.css +100 -0
- package/src/components/radial-chart/react.tsx +14 -0
- package/src/components/sankey-chart/README.md +48 -0
- package/src/components/sankey-chart/element.ts +31 -0
- package/src/components/sankey-chart/engine.ts +401 -0
- package/src/components/sankey-chart/react.tsx +14 -0
- package/src/components/sankey-chart/sankey-chart.css +60 -0
- package/src/components/scroll-island/README.md +34 -0
- package/src/components/scroll-island/element.ts +16 -0
- package/src/components/scroll-island/engine.ts +252 -0
- package/src/components/scroll-island/react.tsx +26 -0
- package/src/components/scroll-island/scroll-island.css +110 -0
- package/src/components/select/README.md +34 -0
- package/src/components/select/element.ts +26 -0
- package/src/components/select/engine.ts +267 -0
- package/src/components/select/react.tsx +33 -0
- package/src/components/select/select.css +135 -0
- package/src/components/toolbar/README.md +46 -0
- package/src/components/toolbar/element.ts +30 -0
- package/src/components/toolbar/engine.ts +230 -0
- package/src/components/toolbar/react.tsx +34 -0
- package/src/components/toolbar/toolbar.css +121 -0
- package/src/components/tree-view/element.ts +1 -1
- package/src/components/tree-view/engine.ts +174 -0
- package/src/components/tree-view/react.tsx +7 -3
- package/src/components/tree-view/tree-view.css +79 -0
- package/src/components/voice-dots/README.md +48 -0
- package/src/components/voice-dots/element.ts +45 -0
- package/src/components/voice-dots/engine.ts +243 -0
- package/src/components/voice-dots/react.tsx +52 -0
- package/src/components/voice-dots/voice-dots.css +69 -0
- package/src/elements/index.ts +39 -0
- package/src/index.ts +16 -0
- package/src/motion/liquid.ts +14 -4
- package/src/react/index.ts +14 -1
- package/dist/chunk-6P4P7NU6.js +0 -1401
- package/dist/chunk-6P4P7NU6.js.map +0 -1
- package/dist/chunk-CU6SXW3E.js.map +0 -1
- package/dist/store-DjkTBX7f.d.ts +0 -195
- /package/dist/{chunk-EY4BJKC4.js.map → chunk-6IRJYXJU.js.map} +0 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/* components/orbit-menu/orbit-menu.css */
|
|
2
|
+
/* orbit-menu — soft white squares (16 px corners, a wide low shadow) around a middle button whose lines turn into an ×.
|
|
3
|
+
The options sit on the middle and the engine moves them out; give the menu room around it. */
|
|
4
|
+
.mk-orbit-menu,
|
|
5
|
+
mk-orbit-menu {
|
|
6
|
+
--mk-orbit-size: 4rem;
|
|
7
|
+
--mk-orbit-face: var(--mk-surface-3);
|
|
8
|
+
--mk-orbit-ink: var(--mk-text);
|
|
9
|
+
--mk-orbit-shadow: 0 18px 36px -14px rgb(0 0 0 / 0.22), 0 2px 6px -2px rgb(0 0 0 / 0.08);
|
|
10
|
+
position: relative;
|
|
11
|
+
display: inline-grid;
|
|
12
|
+
place-items: center;
|
|
13
|
+
width: var(--mk-orbit-size);
|
|
14
|
+
height: var(--mk-orbit-size);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:is(.mk-orbit-menu, mk-orbit-menu) :is([data-mk-orbit-toggle], [data-mk-orbit-item]) {
|
|
18
|
+
display: grid;
|
|
19
|
+
place-items: center;
|
|
20
|
+
width: var(--mk-orbit-size);
|
|
21
|
+
height: var(--mk-orbit-size);
|
|
22
|
+
padding: 0;
|
|
23
|
+
border: 1px solid var(--mk-outline-soft);
|
|
24
|
+
border-radius: var(--mk-radius-md);
|
|
25
|
+
background: var(--mk-orbit-face);
|
|
26
|
+
box-shadow: var(--mk-orbit-shadow);
|
|
27
|
+
color: var(--mk-orbit-ink);
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
-webkit-tap-highlight-color: transparent;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:is(.mk-orbit-menu, mk-orbit-menu) [data-mk-orbit-toggle] {
|
|
33
|
+
position: relative;
|
|
34
|
+
z-index: 2;
|
|
35
|
+
transition:
|
|
36
|
+
background-color 0.3s ease,
|
|
37
|
+
box-shadow 0.3s ease;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Open: the middle goes glassy, the options are the faces now. */
|
|
41
|
+
:is(.mk-orbit-menu, mk-orbit-menu)[data-mk-state='open'] [data-mk-orbit-toggle] {
|
|
42
|
+
background: color-mix(in srgb, var(--mk-orbit-face) 55%, transparent);
|
|
43
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mk-orbit-ink) 8%, transparent);
|
|
44
|
+
backdrop-filter: blur(8px);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:is(.mk-orbit-menu, mk-orbit-menu) [data-mk-orbit-item] {
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 0;
|
|
50
|
+
left: 0;
|
|
51
|
+
z-index: 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:is(.mk-orbit-menu, mk-orbit-menu) :is([data-mk-orbit-toggle], [data-mk-orbit-item]) svg {
|
|
55
|
+
width: 1.75rem;
|
|
56
|
+
height: 1.75rem;
|
|
57
|
+
transition: transform 0.35s var(--mk-ease-swatch);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media (hover: hover) {
|
|
61
|
+
:is(.mk-orbit-menu, mk-orbit-menu) [data-mk-orbit-item]:hover svg {
|
|
62
|
+
transform: scale(1.12);
|
|
63
|
+
}
|
|
64
|
+
:is(.mk-orbit-menu, mk-orbit-menu) [data-mk-orbit-item]:hover {
|
|
65
|
+
box-shadow: 0 22px 40px -14px rgb(0 0 0 / 0.28), 0 2px 6px -2px rgb(0 0 0 / 0.1);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:is(.mk-orbit-menu, mk-orbit-menu) :is([data-mk-orbit-toggle], [data-mk-orbit-item]):focus-visible {
|
|
70
|
+
outline: 2px solid var(--mk-accent);
|
|
71
|
+
outline-offset: 3px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* The three lines and their × . */
|
|
75
|
+
[data-mk-orbit-burger] {
|
|
76
|
+
position: relative;
|
|
77
|
+
width: 1.5rem;
|
|
78
|
+
height: 1rem;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
[data-mk-orbit-burger] i {
|
|
82
|
+
position: absolute;
|
|
83
|
+
left: 0;
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 2px;
|
|
86
|
+
border-radius: 2px;
|
|
87
|
+
background: currentColor;
|
|
88
|
+
transition:
|
|
89
|
+
transform 0.4s var(--mk-ease-swatch),
|
|
90
|
+
opacity 0.2s ease;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
[data-mk-orbit-burger] i:nth-child(1) {
|
|
94
|
+
top: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[data-mk-orbit-burger] i:nth-child(2) {
|
|
98
|
+
top: calc(50% - 1px);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
[data-mk-orbit-burger] i:nth-child(3) {
|
|
102
|
+
bottom: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
:is(.mk-orbit-menu, mk-orbit-menu)[data-mk-state='open'] [data-mk-orbit-burger] i:nth-child(1) {
|
|
106
|
+
transform: translateY(calc(0.5rem - 1px)) rotate(45deg);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:is(.mk-orbit-menu, mk-orbit-menu)[data-mk-state='open'] [data-mk-orbit-burger] i:nth-child(2) {
|
|
110
|
+
opacity: 0;
|
|
111
|
+
transform: scaleX(0.2);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
:is(.mk-orbit-menu, mk-orbit-menu)[data-mk-state='open'] [data-mk-orbit-burger] i:nth-child(3) {
|
|
115
|
+
transform: translateY(calc(-0.5rem + 1px)) rotate(-45deg);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@media (prefers-reduced-motion: reduce) {
|
|
119
|
+
[data-mk-orbit-burger] i,
|
|
120
|
+
:is(.mk-orbit-menu, mk-orbit-menu) [data-mk-orbit-toggle],
|
|
121
|
+
:is(.mk-orbit-menu, mk-orbit-menu) svg {
|
|
122
|
+
transition: none;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@media (forced-colors: active) {
|
|
127
|
+
:is(.mk-orbit-menu, mk-orbit-menu) :is([data-mk-orbit-toggle], [data-mk-orbit-item]) {
|
|
128
|
+
border: 1px solid ButtonText;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
/* components/pagination/pagination.css */
|
|
2
|
+
/* pagination — round page buttons on surface-2; a pill (accent) glides under the current page; numbers that stay slide
|
|
3
|
+
when the window moves and new ones pop in; hover lifts, press squeezes. */
|
|
2
4
|
.mk-pagination, mk-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .35rem; }
|
|
3
|
-
.mk-pagination [data-mk-pagination-pages], mk-pagination [data-mk-pagination-pages] { display: flex; align-items: center; gap: .25rem; }
|
|
4
|
-
.mk-pagination button, mk-pagination button { min-width: 2.5rem; height: 2.5rem; border: 0; border-radius: var(--mk-radius-full); background: var(--mk-surface-2); color: var(--mk-text); font: inherit; cursor: pointer; transition:
|
|
5
|
+
.mk-pagination [data-mk-pagination-pages], mk-pagination [data-mk-pagination-pages] { position: relative; display: flex; align-items: center; gap: .25rem; isolation: isolate; }
|
|
6
|
+
.mk-pagination button, mk-pagination button { position: relative; min-width: 2.5rem; height: 2.5rem; border: 0; border-radius: var(--mk-radius-full); background: var(--mk-surface-2); color: var(--mk-text); font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; transition: translate .3s cubic-bezier(.38,.49,0,1.5), background-color .25s, color .25s; }
|
|
5
7
|
.mk-pagination button[aria-current], mk-pagination button[aria-current] { background: var(--mk-accent); color: var(--mk-on-accent); }
|
|
6
|
-
|
|
7
|
-
.mk-pagination
|
|
8
|
+
/* With the engine, the pill paints the current page and its button stays clear. */
|
|
9
|
+
:is(.mk-pagination, mk-pagination)[data-mk-glide] button[aria-current] { background: transparent; }
|
|
10
|
+
:is(.mk-pagination, mk-pagination) [data-mk-pagination-indicator] { position: absolute; top: 0; left: 0; z-index: -1; border-radius: var(--mk-radius-full); background: var(--mk-accent); pointer-events: none; }
|
|
11
|
+
.mk-pagination button:hover:not(:disabled), mk-pagination button:hover:not(:disabled) { translate: 0 -3px; }
|
|
12
|
+
.mk-pagination button:hover:not(:disabled):not([aria-current]), mk-pagination button:hover:not(:disabled):not([aria-current]) { background: var(--mk-surface-3); }
|
|
8
13
|
.mk-pagination button:focus-visible, mk-pagination button:focus-visible { outline: 2px solid var(--mk-accent); outline-offset: 3px; }
|
|
9
14
|
.mk-pagination button:disabled, mk-pagination button:disabled { opacity: .35; cursor: default; }
|
|
10
15
|
.mk-pagination__gap { padding: 0 .15rem; color: var(--mk-muted); }
|
|
11
|
-
@media (prefers-reduced-motion: reduce) { .mk-pagination button, mk-pagination button { transition: none;
|
|
16
|
+
@media (prefers-reduced-motion: reduce) { .mk-pagination button, mk-pagination button { transition: none; translate: none !important; } }
|
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
/* components/chart/chart.css */
|
|
2
|
+
/* chart — Melon Mind's Indicadores: a monochrome line on the surface, the baseline only, the last value in a pill,
|
|
3
|
+
a dotted guide, the inverse glass tooltip and outlined legend pills.
|
|
4
|
+
Several series use --mk-chart-1…8 (a colour-blind-checked order, light and dark steps). */
|
|
5
|
+
.mk-chart,
|
|
6
|
+
mk-chart {
|
|
7
|
+
--mk-chart-mono: var(--mk-text);
|
|
8
|
+
--mk-chart-1: #2a78d6;
|
|
9
|
+
--mk-chart-2: #eb6834;
|
|
10
|
+
--mk-chart-3: #1baf7a;
|
|
11
|
+
--mk-chart-4: #eda100;
|
|
12
|
+
--mk-chart-5: #e87ba4;
|
|
13
|
+
--mk-chart-6: #008300;
|
|
14
|
+
--mk-chart-7: #6250d6;
|
|
15
|
+
--mk-chart-8: #e34948;
|
|
16
|
+
--mk-chart-other: var(--mk-muted);
|
|
17
|
+
--mk-chart-surface: var(--mk-surface-1);
|
|
18
|
+
--mk-chart-grid: color-mix(in srgb, var(--mk-text) 14%, transparent);
|
|
19
|
+
position: relative;
|
|
20
|
+
display: grid;
|
|
21
|
+
gap: 0.75rem;
|
|
22
|
+
min-width: 0;
|
|
23
|
+
color: var(--mk-text);
|
|
24
|
+
font-family: var(--mk-font);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@media (prefers-color-scheme: dark) {
|
|
28
|
+
:where(:root:not([data-mk-mode='light'])) :is(.mk-chart, mk-chart) {
|
|
29
|
+
--mk-chart-1: #3987e5;
|
|
30
|
+
--mk-chart-2: #d95926;
|
|
31
|
+
--mk-chart-3: #199e70;
|
|
32
|
+
--mk-chart-4: #c98500;
|
|
33
|
+
--mk-chart-5: #d55181;
|
|
34
|
+
--mk-chart-6: #008300;
|
|
35
|
+
--mk-chart-7: #9085e9;
|
|
36
|
+
--mk-chart-8: #e66767;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:where(:root[data-mk-mode='dark']) :is(.mk-chart, mk-chart) {
|
|
41
|
+
--mk-chart-1: #3987e5;
|
|
42
|
+
--mk-chart-2: #d95926;
|
|
43
|
+
--mk-chart-3: #199e70;
|
|
44
|
+
--mk-chart-4: #c98500;
|
|
45
|
+
--mk-chart-5: #d55181;
|
|
46
|
+
--mk-chart-6: #008300;
|
|
47
|
+
--mk-chart-7: #9085e9;
|
|
48
|
+
--mk-chart-8: #e66767;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-plot] {
|
|
52
|
+
position: relative;
|
|
53
|
+
min-width: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-plot][hidden] {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-svg] {
|
|
61
|
+
display: block;
|
|
62
|
+
width: 100%;
|
|
63
|
+
height: auto;
|
|
64
|
+
overflow: visible;
|
|
65
|
+
touch-action: pan-y;
|
|
66
|
+
border-radius: 12px;
|
|
67
|
+
cursor: crosshair;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-svg]:focus {
|
|
71
|
+
outline: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-svg]:focus-visible {
|
|
75
|
+
outline: 2px solid var(--mk-accent);
|
|
76
|
+
outline-offset: 4px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:is(.mk-chart, mk-chart) [data-mk-part='grid'] line {
|
|
80
|
+
stroke: var(--mk-chart-grid);
|
|
81
|
+
stroke-width: 1;
|
|
82
|
+
shape-rendering: crispEdges;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:is(.mk-chart, mk-chart) [data-mk-part='grid'] line[data-mk-zero] {
|
|
86
|
+
stroke: color-mix(in srgb, var(--mk-text) 22%, transparent);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:is(.mk-chart, mk-chart) text {
|
|
90
|
+
fill: var(--mk-muted);
|
|
91
|
+
font-size: 11px;
|
|
92
|
+
font-variant-numeric: tabular-nums;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:is(.mk-chart, mk-chart) [data-mk-part='total'] {
|
|
96
|
+
fill: var(--mk-text);
|
|
97
|
+
font-size: 10px;
|
|
98
|
+
font-weight: 500;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:is(.mk-chart, mk-chart) [data-mk-part='line'] {
|
|
102
|
+
fill: none;
|
|
103
|
+
stroke-linecap: round;
|
|
104
|
+
stroke-linejoin: round;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:is(.mk-chart, mk-chart) :is([data-mk-part='dot'], [data-mk-part='marker'], [data-mk-part='end']) {
|
|
108
|
+
stroke: var(--mk-chart-surface);
|
|
109
|
+
stroke-width: 2.5;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* The selection guide: Melonmind's dotted day line. */
|
|
113
|
+
:is(.mk-chart, mk-chart) [data-mk-part='guide'] {
|
|
114
|
+
stroke: color-mix(in srgb, var(--mk-text) 45%, transparent);
|
|
115
|
+
stroke-width: 1;
|
|
116
|
+
stroke-dasharray: 2 4;
|
|
117
|
+
shape-rendering: crispEdges;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
:is(.mk-chart, mk-chart) [data-mk-part='band'] {
|
|
121
|
+
fill: color-mix(in srgb, var(--mk-text) 6%, transparent);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
:is(.mk-chart, mk-chart) [data-mk-part='series'] path[data-mk-index] {
|
|
125
|
+
transition: opacity 0.2s ease;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:is(.mk-chart, mk-chart) [data-mk-part='series'] path[data-mk-dim] {
|
|
129
|
+
opacity: 0.35;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* The last value. */
|
|
133
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-end] {
|
|
134
|
+
position: absolute;
|
|
135
|
+
top: 0;
|
|
136
|
+
left: 0;
|
|
137
|
+
padding: 0.15rem 0.55rem;
|
|
138
|
+
border-radius: var(--mk-radius-full);
|
|
139
|
+
background: var(--mk-surface-3);
|
|
140
|
+
color: var(--mk-text);
|
|
141
|
+
font-size: 0.75rem;
|
|
142
|
+
font-weight: 500;
|
|
143
|
+
font-variant-numeric: tabular-nums;
|
|
144
|
+
white-space: nowrap;
|
|
145
|
+
pointer-events: none;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-end][hidden] {
|
|
149
|
+
display: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Tooltip: the inverse glass, 12 px radius, 8 × 12 padding (Melonmind). */
|
|
153
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-tooltip] {
|
|
154
|
+
position: absolute;
|
|
155
|
+
top: 0;
|
|
156
|
+
left: 0;
|
|
157
|
+
z-index: 2;
|
|
158
|
+
display: grid;
|
|
159
|
+
gap: 0.2rem;
|
|
160
|
+
min-width: 8rem;
|
|
161
|
+
max-width: 16rem;
|
|
162
|
+
padding: 0.5rem 0.75rem;
|
|
163
|
+
border-radius: 12px;
|
|
164
|
+
background: var(--mk-glass-inverse);
|
|
165
|
+
box-shadow: var(--mk-glass-bevel);
|
|
166
|
+
backdrop-filter: blur(16px);
|
|
167
|
+
color: var(--mk-on-glass-inverse);
|
|
168
|
+
font-size: 0.8125rem;
|
|
169
|
+
line-height: 1.3;
|
|
170
|
+
pointer-events: none;
|
|
171
|
+
transform-origin: 50% 100%;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-tooltip][hidden] {
|
|
175
|
+
display: none;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-tooltip] strong {
|
|
179
|
+
font-weight: 600;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-row] {
|
|
183
|
+
display: grid;
|
|
184
|
+
grid-template-columns: 0.6rem minmax(0, 1fr) auto;
|
|
185
|
+
align-items: center;
|
|
186
|
+
gap: 0.5rem;
|
|
187
|
+
opacity: 0.9;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-row] i {
|
|
191
|
+
width: 0.6rem;
|
|
192
|
+
height: 0.6rem;
|
|
193
|
+
border-radius: 3px;
|
|
194
|
+
box-shadow: 0 0 0 1px color-mix(in srgb, var(--mk-on-glass-inverse) 30%, transparent);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-row] b {
|
|
198
|
+
font-weight: 500;
|
|
199
|
+
font-variant-numeric: tabular-nums;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-row] i[data-mk-mono] {
|
|
203
|
+
height: 2px;
|
|
204
|
+
border-radius: 2px;
|
|
205
|
+
background: currentColor;
|
|
206
|
+
box-shadow: none;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-row] i[data-mk-dash] {
|
|
210
|
+
height: 0;
|
|
211
|
+
border-top: 2px dashed currentColor;
|
|
212
|
+
border-radius: 0;
|
|
213
|
+
background: none;
|
|
214
|
+
box-shadow: none;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-row='total'] {
|
|
218
|
+
margin-top: 0.15rem;
|
|
219
|
+
padding-top: 0.25rem;
|
|
220
|
+
border-top: 1px solid color-mix(in srgb, var(--mk-on-glass-inverse) 25%, transparent);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-row='total'] i {
|
|
224
|
+
box-shadow: none;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Legend: outlined pills (Melonmind «— Ingresado»). */
|
|
228
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-legend] {
|
|
229
|
+
display: flex;
|
|
230
|
+
flex-wrap: wrap;
|
|
231
|
+
gap: 0.4rem;
|
|
232
|
+
margin: 0;
|
|
233
|
+
padding: 0;
|
|
234
|
+
color: var(--mk-text);
|
|
235
|
+
font-size: 0.8125rem;
|
|
236
|
+
list-style: none;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-legend][hidden] {
|
|
240
|
+
display: none;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-legend] li {
|
|
244
|
+
display: inline-flex;
|
|
245
|
+
align-items: center;
|
|
246
|
+
gap: 0.45rem;
|
|
247
|
+
padding: 0.2rem 0.7rem;
|
|
248
|
+
border: 1px solid var(--mk-outline-soft);
|
|
249
|
+
border-radius: var(--mk-radius-full);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-swatch] {
|
|
253
|
+
width: 0.7rem;
|
|
254
|
+
height: 0.7rem;
|
|
255
|
+
border-radius: 3px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-swatch][data-mk-type='line'],
|
|
259
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-swatch][data-mk-type='area'] {
|
|
260
|
+
width: 0.9rem;
|
|
261
|
+
height: 2px;
|
|
262
|
+
border-radius: 2px;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-swatch][data-mk-dash] {
|
|
266
|
+
height: 0;
|
|
267
|
+
background: none !important;
|
|
268
|
+
border-top: 2px dashed currentColor;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-empty] {
|
|
272
|
+
display: grid;
|
|
273
|
+
place-items: center;
|
|
274
|
+
min-height: 10rem;
|
|
275
|
+
margin: 0;
|
|
276
|
+
border-radius: 24px;
|
|
277
|
+
background: var(--mk-surface-2);
|
|
278
|
+
color: var(--mk-muted);
|
|
279
|
+
font-size: 0.875rem;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
:is(.mk-chart, mk-chart) [data-mk-chart-empty][hidden] {
|
|
283
|
+
display: none;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
@media (prefers-reduced-motion: reduce) {
|
|
287
|
+
:is(.mk-chart, mk-chart) [data-mk-part='series'] path {
|
|
288
|
+
transition: none;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
@media (forced-colors: active) {
|
|
293
|
+
:is(.mk-chart, mk-chart) [data-mk-part='line'] {
|
|
294
|
+
stroke: CanvasText !important;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/* components/pie-chart/pie-chart.css */
|
|
299
|
+
/* pie-chart — a donut (or pie) in chart's family: it needs chart.css for the colours, tooltip, legend and table.
|
|
300
|
+
Slices are parted by the surface; the chosen one slides out, the others dim; the donut's middle names it. */
|
|
301
|
+
.mk-pie-chart,
|
|
302
|
+
mk-pie-chart {
|
|
303
|
+
display: grid;
|
|
304
|
+
justify-items: center;
|
|
305
|
+
gap: 1rem;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
[data-mk-chart-type='pie'] [data-mk-chart-plot] {
|
|
309
|
+
width: 100%;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
[data-mk-chart-type='pie'] [data-mk-chart-svg] {
|
|
313
|
+
width: var(--mk-pie-size, 240px);
|
|
314
|
+
max-width: 100%;
|
|
315
|
+
margin-inline: auto;
|
|
316
|
+
border-radius: 50%;
|
|
317
|
+
cursor: pointer;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
[data-mk-chart-type='pie'] [data-mk-part='series'] path {
|
|
321
|
+
stroke: var(--mk-chart-surface);
|
|
322
|
+
stroke-width: 1;
|
|
323
|
+
stroke-linejoin: round;
|
|
324
|
+
transition:
|
|
325
|
+
transform 0.45s var(--mk-ease-swatch),
|
|
326
|
+
opacity 0.2s ease;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
[data-mk-chart-type='pie'] [data-mk-part='series'] path[data-mk-dim] {
|
|
330
|
+
opacity: 0.4;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
[data-mk-pie-center] {
|
|
334
|
+
position: absolute;
|
|
335
|
+
top: 50%;
|
|
336
|
+
left: 50%;
|
|
337
|
+
display: grid;
|
|
338
|
+
justify-items: center;
|
|
339
|
+
gap: 0.15rem;
|
|
340
|
+
max-width: calc(var(--mk-pie-size, 240px) * 0.5);
|
|
341
|
+
transform: translate(-50%, -50%);
|
|
342
|
+
text-align: center;
|
|
343
|
+
pointer-events: none;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
[data-mk-pie-center][hidden] {
|
|
347
|
+
display: none;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
[data-mk-pie-center] strong {
|
|
351
|
+
color: var(--mk-text);
|
|
352
|
+
font-size: clamp(1.1rem, calc(var(--mk-pie-size, 240px) * 0.11), 2rem);
|
|
353
|
+
font-weight: 650;
|
|
354
|
+
font-variant-numeric: tabular-nums;
|
|
355
|
+
line-height: 1.1;
|
|
356
|
+
letter-spacing: -0.02em;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
[data-mk-pie-center] span {
|
|
360
|
+
overflow: hidden;
|
|
361
|
+
max-width: 100%;
|
|
362
|
+
color: var(--mk-muted);
|
|
363
|
+
font-size: 0.8125rem;
|
|
364
|
+
white-space: nowrap;
|
|
365
|
+
text-overflow: ellipsis;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
[data-mk-chart-type='pie'] [data-mk-chart-legend] {
|
|
369
|
+
justify-content: center;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
[data-mk-chart-type='pie'] [data-mk-chart-legend] li {
|
|
373
|
+
transition: opacity 0.2s ease;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
[data-mk-chart-type='pie'] [data-mk-chart-legend] li[data-mk-dim] {
|
|
377
|
+
opacity: 0.45;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
@media (prefers-reduced-motion: reduce) {
|
|
381
|
+
[data-mk-chart-type='pie'] [data-mk-part='series'] path {
|
|
382
|
+
transition: opacity 0.2s ease;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
@media (forced-colors: active) {
|
|
387
|
+
[data-mk-chart-type='pie'] [data-mk-part='series'] path {
|
|
388
|
+
stroke: Canvas;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/* components/pill-button/pill-button.css */
|
|
2
|
+
/* pill-button — a dark pill whose fill gathers into a circle around the icon on hover (and spreads back on leave).
|
|
3
|
+
The fill is one layer clipped with inset(); the label and icon sit above it. `expand` starts as the circle. */
|
|
4
|
+
.mk-pill-button:is(button, a),
|
|
5
|
+
[data-mk-pill] {
|
|
6
|
+
--mk-pill-height: 3rem;
|
|
7
|
+
--mk-pill-dot: 2.25rem;
|
|
8
|
+
--mk-pill-ink: var(--mk-text);
|
|
9
|
+
--mk-pill-on-ink: var(--mk-bg);
|
|
10
|
+
--mk-pill-gap: calc((var(--mk-pill-height) - var(--mk-pill-dot)) / 2);
|
|
11
|
+
--mk-pill-gathered: inset(var(--mk-pill-gap) var(--mk-pill-gap) var(--mk-pill-gap) calc(100% - var(--mk-pill-gap) - var(--mk-pill-dot)) round var(--mk-radius-full));
|
|
12
|
+
--mk-pill-spread: inset(0 0 0 0 round var(--mk-radius-full));
|
|
13
|
+
position: relative;
|
|
14
|
+
isolation: isolate;
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 1.25rem;
|
|
18
|
+
height: var(--mk-pill-height);
|
|
19
|
+
padding: 0 calc(var(--mk-pill-gap) + (var(--mk-pill-dot) - 1.125rem) / 2) 0 1.5rem;
|
|
20
|
+
border: 0;
|
|
21
|
+
border-radius: var(--mk-radius-full);
|
|
22
|
+
background: transparent;
|
|
23
|
+
color: var(--mk-pill-on-ink);
|
|
24
|
+
font: 500 1rem/1 var(--mk-font);
|
|
25
|
+
text-decoration: none;
|
|
26
|
+
white-space: nowrap;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
-webkit-tap-highlight-color: transparent;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
mk-pill-button {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
[data-mk-pill-fill] {
|
|
36
|
+
position: absolute;
|
|
37
|
+
inset: 0;
|
|
38
|
+
z-index: -1;
|
|
39
|
+
border-radius: inherit;
|
|
40
|
+
background: var(--mk-pill-ink);
|
|
41
|
+
clip-path: var(--mk-pill-spread);
|
|
42
|
+
transition: clip-path 0.5s var(--mk-ease-swatch);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
[data-mk-pill-label] {
|
|
46
|
+
display: inline-block;
|
|
47
|
+
color: var(--mk-pill-on-ink);
|
|
48
|
+
transition:
|
|
49
|
+
transform 0.45s var(--mk-ease-swatch),
|
|
50
|
+
color 0.2s ease 0.05s;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
[data-mk-pill-icon] {
|
|
54
|
+
display: inline-grid;
|
|
55
|
+
place-items: center;
|
|
56
|
+
width: 1.125rem;
|
|
57
|
+
height: 1.125rem;
|
|
58
|
+
color: var(--mk-pill-on-ink);
|
|
59
|
+
transition: transform 0.45s var(--mk-ease-swatch);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
[data-mk-pill-icon] svg {
|
|
63
|
+
display: block;
|
|
64
|
+
width: 100%;
|
|
65
|
+
height: 100%;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Gathered: on hover, keyboard focus or a tap. */
|
|
69
|
+
@media (hover: hover) {
|
|
70
|
+
:is([data-mk-pill=''], .mk-pill-button:is(button, a):not([data-mk-pill])):hover [data-mk-pill-fill] {
|
|
71
|
+
clip-path: var(--mk-pill-gathered);
|
|
72
|
+
}
|
|
73
|
+
:is([data-mk-pill=''], .mk-pill-button:is(button, a):not([data-mk-pill])):hover [data-mk-pill-label] {
|
|
74
|
+
color: var(--mk-pill-ink);
|
|
75
|
+
transform: translateX(-0.5rem);
|
|
76
|
+
}
|
|
77
|
+
:is([data-mk-pill], .mk-pill-button:is(button, a)):hover [data-mk-pill-icon] {
|
|
78
|
+
transform: translateX(2px);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
[data-mk-pill='']:is(:focus-visible, [data-mk-active]) [data-mk-pill-fill] {
|
|
82
|
+
clip-path: var(--mk-pill-gathered);
|
|
83
|
+
}
|
|
84
|
+
[data-mk-pill='']:is(:focus-visible, [data-mk-active]) [data-mk-pill-label] {
|
|
85
|
+
color: var(--mk-pill-ink);
|
|
86
|
+
transform: translateX(-0.5rem);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* expand: the circle spreads into the pill. */
|
|
90
|
+
[data-mk-pill='expand'] [data-mk-pill-fill] {
|
|
91
|
+
clip-path: var(--mk-pill-gathered);
|
|
92
|
+
}
|
|
93
|
+
[data-mk-pill='expand'] [data-mk-pill-label] {
|
|
94
|
+
color: var(--mk-pill-ink);
|
|
95
|
+
}
|
|
96
|
+
@media (hover: hover) {
|
|
97
|
+
[data-mk-pill='expand']:hover [data-mk-pill-fill] {
|
|
98
|
+
clip-path: var(--mk-pill-spread);
|
|
99
|
+
}
|
|
100
|
+
[data-mk-pill='expand']:hover [data-mk-pill-label] {
|
|
101
|
+
color: var(--mk-pill-on-ink);
|
|
102
|
+
transform: translateX(0.25rem);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
[data-mk-pill='expand']:is(:focus-visible, [data-mk-active]) [data-mk-pill-fill] {
|
|
106
|
+
clip-path: var(--mk-pill-spread);
|
|
107
|
+
}
|
|
108
|
+
[data-mk-pill='expand']:is(:focus-visible, [data-mk-active]) [data-mk-pill-label] {
|
|
109
|
+
color: var(--mk-pill-on-ink);
|
|
110
|
+
transform: translateX(0.25rem);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:is([data-mk-pill], .mk-pill-button:is(button, a)):focus-visible {
|
|
114
|
+
outline: 2px solid var(--mk-accent);
|
|
115
|
+
outline-offset: 3px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:is([data-mk-pill], .mk-pill-button:is(button, a)):is(:disabled, [aria-disabled='true']) {
|
|
119
|
+
cursor: not-allowed;
|
|
120
|
+
opacity: 0.5;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@media (prefers-reduced-motion: reduce) {
|
|
124
|
+
[data-mk-pill-fill],
|
|
125
|
+
[data-mk-pill-label],
|
|
126
|
+
[data-mk-pill-icon] {
|
|
127
|
+
transition-duration: 0.01s;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@media (forced-colors: active) {
|
|
132
|
+
[data-mk-pill] {
|
|
133
|
+
border: 1px solid ButtonText;
|
|
134
|
+
}
|
|
135
|
+
}
|