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