@yewdiel21/motion-kit 0.10.0 → 0.14.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 +155 -93
- package/dist/auto/index.d.ts +53 -3
- package/dist/auto/index.js +101 -3
- package/dist/auto/index.js.map +1 -1
- package/dist/{chunk-IKQ5FODN.js → chunk-6P4P7NU6.js} +2 -218
- package/dist/chunk-6P4P7NU6.js.map +1 -0
- package/dist/chunk-CU6SXW3E.js +20334 -0
- package/dist/chunk-CU6SXW3E.js.map +1 -0
- package/dist/{chunk-XAKC2QY7.js → chunk-EY4BJKC4.js} +3 -28
- package/dist/chunk-EY4BJKC4.js.map +1 -0
- package/dist/chunk-QP4QJOEN.js +72 -0
- package/dist/chunk-QP4QJOEN.js.map +1 -0
- package/dist/css/components/activity-feed.css +240 -0
- package/dist/css/components/attachment.css +266 -0
- package/dist/css/components/breadcrumb.css +110 -0
- package/dist/css/components/chart-tooltip.css +168 -0
- package/dist/css/components/chart.css +296 -0
- package/dist/css/components/code-block.css +264 -0
- package/dist/css/components/color-area.css +82 -0
- package/dist/css/components/color-field.css +67 -0
- package/dist/css/components/color-picker.css +131 -0
- package/dist/css/components/color-slider.css +113 -0
- package/dist/css/components/command-search.css +252 -0
- package/dist/css/components/context-menu.css +23 -0
- package/dist/css/components/credit-card.css +288 -0
- package/dist/css/components/data-table.css +591 -0
- package/dist/css/components/date-range-picker.css +168 -0
- package/dist/css/components/date-time-picker.css +178 -0
- package/dist/css/components/drawer.css +58 -0
- package/dist/css/components/editable-table.css +201 -0
- package/dist/css/components/empty-state.css +61 -0
- package/dist/css/components/file-explorer.css +633 -0
- package/dist/css/components/filter-builder.css +232 -0
- package/dist/css/components/hold-confirm.css +87 -0
- package/dist/css/components/hover-card.css +13 -7
- package/dist/css/components/image-preview.css +195 -0
- package/dist/css/components/json-viewer.css +272 -0
- package/dist/css/components/like-button.css +78 -0
- package/dist/css/components/link-preview.css +275 -0
- package/dist/css/components/loading-button.css +77 -0
- package/dist/css/components/multi-select.css +267 -0
- package/dist/css/components/notification-bell.css +127 -0
- package/dist/css/components/password-strength.css +183 -0
- package/dist/css/components/popover.css +25 -0
- package/dist/css/components/progress.css +140 -0
- package/dist/css/components/questionnaire.css +217 -0
- package/dist/css/components/range-calendar.css +186 -0
- package/dist/css/components/range-slider.css +192 -0
- package/dist/css/components/resizable-panel.css +243 -0
- package/dist/css/components/rich-text-editor.css +284 -0
- package/dist/css/components/scratch-card.css +75 -0
- package/dist/css/components/skeleton.css +108 -0
- package/dist/css/components/split-view.css +19 -0
- package/dist/css/components/star-rating.css +80 -0
- package/dist/css/components/stat-card.css +164 -0
- package/dist/css/components/swipe-actions.css +105 -0
- package/dist/css/components/tag-input.css +244 -0
- package/dist/css/components/time-field.css +88 -0
- package/dist/css/components/timeline.css +219 -0
- package/dist/css/components/tooltip.css +79 -0
- package/dist/css/components/tree-view.css +210 -0
- package/dist/css/components/virtual-list.css +195 -0
- package/dist/css/tokens.css +185 -181
- package/dist/elements/index.d.ts +674 -5
- package/dist/elements/index.js +1361 -8
- package/dist/elements/index.js.map +1 -1
- package/dist/{engine-GDGwQnJE.d.ts → engine-Cn6IhE3z.d.ts} +1 -1
- package/dist/engine-QECQnGz1.d.ts +33 -0
- package/dist/index.css +9104 -189
- package/dist/index.d.ts +89 -5
- package/dist/index.js +243 -9
- package/dist/index.js.map +1 -1
- package/dist/react/index.d.ts +579 -23
- package/dist/react/index.js +2042 -7
- package/dist/react/index.js.map +1 -1
- package/dist/{reduced-BmBzKH94.d.ts → reduced-BBUusld6.d.ts} +9 -2
- package/dist/reveal-DEvp6U6T.d.ts +2381 -0
- package/dist/{store-DYb3tTsZ.d.ts → store-DjkTBX7f.d.ts} +2 -2
- package/package.json +1 -1
- package/registry.json +406 -1
- package/src/auto/auto-init.ts +98 -0
- package/src/components/activity-feed/README.md +56 -0
- package/src/components/activity-feed/activity-feed.css +239 -0
- package/src/components/activity-feed/element.ts +36 -0
- package/src/components/activity-feed/engine.ts +351 -0
- package/src/components/activity-feed/react.tsx +32 -0
- package/src/components/attachment/README.md +27 -0
- package/src/components/attachment/attachment.css +265 -0
- package/src/components/attachment/element.ts +50 -0
- package/src/components/attachment/engine.ts +469 -0
- package/src/components/attachment/react.tsx +65 -0
- package/src/components/breadcrumb/README.md +38 -0
- package/src/components/breadcrumb/breadcrumb.css +109 -0
- package/src/components/breadcrumb/element.ts +27 -0
- package/src/components/breadcrumb/engine.ts +249 -0
- package/src/components/breadcrumb/react.tsx +30 -0
- package/src/components/chart/README.md +24 -0
- package/src/components/chart/chart.css +295 -0
- package/src/components/chart/element.ts +41 -0
- package/src/components/chart/engine.ts +811 -0
- package/src/components/chart/react.tsx +50 -0
- package/src/components/chart-tooltip/README.md +53 -0
- package/src/components/chart-tooltip/chart-tooltip.css +167 -0
- package/src/components/chart-tooltip/element.ts +37 -0
- package/src/components/chart-tooltip/engine.ts +442 -0
- package/src/components/chart-tooltip/react.tsx +47 -0
- package/src/components/code-block/README.md +19 -0
- package/src/components/code-block/code-block.css +263 -0
- package/src/components/code-block/element.ts +34 -0
- package/src/components/code-block/engine.ts +254 -0
- package/src/components/code-block/highlight.ts +244 -0
- package/src/components/code-block/react.tsx +94 -0
- package/src/components/color-area/README.md +50 -0
- package/src/components/color-area/color-area.css +81 -0
- package/src/components/color-area/element.ts +26 -0
- package/src/components/color-area/engine.ts +246 -0
- package/src/components/color-area/react.tsx +42 -0
- package/src/components/color-field/README.md +43 -0
- package/src/components/color-field/color-field.css +66 -0
- package/src/components/color-field/element.ts +26 -0
- package/src/components/color-field/engine.ts +174 -0
- package/src/components/color-field/react.tsx +42 -0
- package/src/components/color-picker/README.md +45 -0
- package/src/components/color-picker/color-picker.css +130 -0
- package/src/components/color-picker/element.ts +45 -0
- package/src/components/color-picker/engine.ts +314 -0
- package/src/components/color-picker/react.tsx +47 -0
- package/src/components/color-slider/README.md +55 -0
- package/src/components/color-slider/color-slider.css +112 -0
- package/src/components/color-slider/element.ts +26 -0
- package/src/components/color-slider/engine.ts +234 -0
- package/src/components/color-slider/react.tsx +45 -0
- package/src/components/command-search/README.md +15 -0
- package/src/components/command-search/command-search.css +251 -0
- package/src/components/command-search/element.ts +36 -0
- package/src/components/command-search/engine.ts +356 -0
- package/src/components/command-search/match.ts +53 -0
- package/src/components/command-search/react.tsx +66 -0
- package/src/components/context-menu/README.md +31 -0
- package/src/components/context-menu/context-menu.css +22 -0
- package/src/components/context-menu/element.ts +40 -0
- package/src/components/context-menu/engine.ts +153 -0
- package/src/components/context-menu/react.tsx +57 -0
- package/src/components/credit-card/README.md +20 -0
- package/src/components/credit-card/card.ts +77 -0
- package/src/components/credit-card/credit-card.css +287 -0
- package/src/components/credit-card/element.ts +33 -0
- package/src/components/credit-card/engine.ts +410 -0
- package/src/components/credit-card/react.tsx +36 -0
- package/src/components/data-table/README.md +83 -0
- package/src/components/data-table/data-table.css +590 -0
- package/src/components/data-table/element.ts +54 -0
- package/src/components/data-table/engine.ts +1059 -0
- package/src/components/data-table/react.tsx +94 -0
- package/src/components/date-range-picker/README.md +51 -0
- package/src/components/date-range-picker/date-range-picker.css +167 -0
- package/src/components/date-range-picker/element.ts +52 -0
- package/src/components/date-range-picker/engine.ts +352 -0
- package/src/components/date-range-picker/react.tsx +57 -0
- package/src/components/date-time-picker/README.md +48 -0
- package/src/components/date-time-picker/date-time-picker.css +177 -0
- package/src/components/date-time-picker/element.ts +47 -0
- package/src/components/date-time-picker/engine.ts +350 -0
- package/src/components/date-time-picker/react.tsx +54 -0
- package/src/components/dialog/README.md +103 -102
- package/src/components/dialog/element.ts +123 -118
- package/src/components/dialog/engine.ts +449 -432
- package/src/components/drawer/README.md +28 -0
- package/src/components/drawer/drawer.css +57 -0
- package/src/components/drawer/element.ts +21 -0
- package/src/components/drawer/engine.ts +56 -0
- package/src/components/drawer/react.tsx +85 -0
- package/src/components/editable-table/README.md +67 -0
- package/src/components/editable-table/editable-table.css +200 -0
- package/src/components/editable-table/element.ts +45 -0
- package/src/components/editable-table/engine.ts +775 -0
- package/src/components/editable-table/react.tsx +79 -0
- package/src/components/empty-state/README.md +41 -0
- package/src/components/empty-state/element.ts +23 -0
- package/src/components/empty-state/empty-state.css +60 -0
- package/src/components/empty-state/engine.ts +232 -0
- package/src/components/empty-state/react.tsx +34 -0
- package/src/components/file-explorer/README.md +67 -0
- package/src/components/file-explorer/element.ts +39 -0
- package/src/components/file-explorer/engine.ts +1307 -0
- package/src/components/file-explorer/file-explorer.css +632 -0
- package/src/components/file-explorer/react.tsx +77 -0
- package/src/components/filter-builder/README.md +47 -0
- package/src/components/filter-builder/element.ts +34 -0
- package/src/components/filter-builder/engine.ts +365 -0
- package/src/components/filter-builder/filter-builder.css +231 -0
- package/src/components/filter-builder/react.tsx +36 -0
- package/src/components/hold-confirm/README.md +13 -0
- package/src/components/hold-confirm/element.ts +24 -0
- package/src/components/hold-confirm/engine.ts +216 -0
- package/src/components/hold-confirm/hold-confirm.css +86 -0
- package/src/components/hold-confirm/react.tsx +28 -0
- package/src/components/hover-card/README.md +6 -2
- package/src/components/hover-card/engine.ts +68 -6
- package/src/components/hover-card/hover-card.css +13 -7
- package/src/components/image-preview/README.md +16 -0
- package/src/components/image-preview/element.ts +26 -0
- package/src/components/image-preview/engine.ts +325 -0
- package/src/components/image-preview/image-preview.css +194 -0
- package/src/components/image-preview/react.tsx +43 -0
- package/src/components/json-viewer/README.md +56 -0
- package/src/components/json-viewer/element.ts +37 -0
- package/src/components/json-viewer/engine.ts +440 -0
- package/src/components/json-viewer/json-viewer.css +271 -0
- package/src/components/json-viewer/react.tsx +56 -0
- package/src/components/like-button/README.md +13 -0
- package/src/components/like-button/element.ts +47 -0
- package/src/components/like-button/engine.ts +145 -0
- package/src/components/like-button/like-button.css +77 -0
- package/src/components/like-button/react.tsx +39 -0
- package/src/components/link-preview/README.md +19 -0
- package/src/components/link-preview/element.ts +29 -0
- package/src/components/link-preview/engine.ts +192 -0
- package/src/components/link-preview/link-preview.css +274 -0
- package/src/components/link-preview/react.tsx +101 -0
- package/src/components/loading-button/README.md +45 -0
- package/src/components/loading-button/element.ts +34 -0
- package/src/components/loading-button/engine.ts +201 -0
- package/src/components/loading-button/loading-button.css +76 -0
- package/src/components/loading-button/react.tsx +43 -0
- package/src/components/multi-select/README.md +48 -0
- package/src/components/multi-select/element.ts +28 -0
- package/src/components/multi-select/engine.ts +294 -0
- package/src/components/multi-select/multi-select.css +266 -0
- package/src/components/multi-select/react.tsx +39 -0
- package/src/components/notification-bell/README.md +14 -0
- package/src/components/notification-bell/element.ts +48 -0
- package/src/components/notification-bell/engine.ts +202 -0
- package/src/components/notification-bell/notification-bell.css +126 -0
- package/src/components/notification-bell/react.tsx +57 -0
- package/src/components/password-strength/README.md +17 -0
- package/src/components/password-strength/element.ts +22 -0
- package/src/components/password-strength/engine.ts +212 -0
- package/src/components/password-strength/password-strength.css +182 -0
- package/src/components/password-strength/react.tsx +36 -0
- package/src/components/password-strength/score.ts +62 -0
- package/src/components/popover/README.md +44 -0
- package/src/components/popover/element.ts +31 -0
- package/src/components/popover/engine.ts +114 -0
- package/src/components/popover/popover.css +24 -0
- package/src/components/popover/react.tsx +50 -0
- package/src/components/progress/README.md +17 -0
- package/src/components/progress/element.ts +30 -0
- package/src/components/progress/engine.ts +173 -0
- package/src/components/progress/progress.css +139 -0
- package/src/components/progress/react.tsx +35 -0
- package/src/components/questionnaire/README.md +32 -0
- package/src/components/questionnaire/element.ts +118 -0
- package/src/components/questionnaire/engine.ts +255 -0
- package/src/components/questionnaire/questionnaire.css +216 -0
- package/src/components/questionnaire/react.tsx +140 -0
- package/src/components/range-calendar/README.md +58 -0
- package/src/components/range-calendar/element.ts +42 -0
- package/src/components/range-calendar/engine.ts +390 -0
- package/src/components/range-calendar/range-calendar.css +185 -0
- package/src/components/range-calendar/react.tsx +56 -0
- package/src/components/range-slider/README.md +23 -0
- package/src/components/range-slider/element.ts +53 -0
- package/src/components/range-slider/engine.ts +316 -0
- package/src/components/range-slider/range-slider.css +191 -0
- package/src/components/range-slider/react.tsx +66 -0
- package/src/components/resizable-panel/README.md +61 -0
- package/src/components/resizable-panel/element.ts +36 -0
- package/src/components/resizable-panel/engine.ts +551 -0
- package/src/components/resizable-panel/react.tsx +74 -0
- package/src/components/resizable-panel/resizable-panel.css +242 -0
- package/src/components/rich-text-editor/README.md +57 -0
- package/src/components/rich-text-editor/element.ts +34 -0
- package/src/components/rich-text-editor/engine.ts +673 -0
- package/src/components/rich-text-editor/react.tsx +60 -0
- package/src/components/rich-text-editor/rich-text-editor.css +283 -0
- package/src/components/scratch-card/README.md +15 -0
- package/src/components/scratch-card/element.ts +30 -0
- package/src/components/scratch-card/engine.ts +257 -0
- package/src/components/scratch-card/react.tsx +40 -0
- package/src/components/scratch-card/scratch-card.css +74 -0
- package/src/components/skeleton/README.md +15 -0
- package/src/components/skeleton/element.ts +32 -0
- package/src/components/skeleton/engine.ts +104 -0
- package/src/components/skeleton/react.tsx +41 -0
- package/src/components/skeleton/skeleton.css +107 -0
- package/src/components/split-view/README.md +50 -0
- package/src/components/split-view/element.ts +34 -0
- package/src/components/split-view/engine.ts +114 -0
- package/src/components/split-view/react.tsx +63 -0
- package/src/components/split-view/split-view.css +18 -0
- package/src/components/star-rating/README.md +14 -0
- package/src/components/star-rating/element.ts +26 -0
- package/src/components/star-rating/engine.ts +217 -0
- package/src/components/star-rating/react.tsx +33 -0
- package/src/components/star-rating/star-rating.css +79 -0
- package/src/components/stat-card/README.md +42 -0
- package/src/components/stat-card/element.ts +40 -0
- package/src/components/stat-card/engine.ts +283 -0
- package/src/components/stat-card/react.tsx +36 -0
- package/src/components/stat-card/stat-card.css +163 -0
- package/src/components/swipe-actions/README.md +19 -0
- package/src/components/swipe-actions/element.ts +26 -0
- package/src/components/swipe-actions/engine.ts +260 -0
- package/src/components/swipe-actions/react.tsx +80 -0
- package/src/components/swipe-actions/swipe-actions.css +104 -0
- package/src/components/tag-input/README.md +42 -0
- package/src/components/tag-input/element.ts +39 -0
- package/src/components/tag-input/engine.ts +313 -0
- package/src/components/tag-input/react.tsx +54 -0
- package/src/components/tag-input/tag-input.css +243 -0
- package/src/components/time-field/README.md +54 -0
- package/src/components/time-field/element.ts +38 -0
- package/src/components/time-field/engine.ts +110 -0
- package/src/components/time-field/react.tsx +45 -0
- package/src/components/time-field/time-field.css +87 -0
- package/src/components/timeline/README.md +57 -0
- package/src/components/timeline/element.ts +31 -0
- package/src/components/timeline/engine.ts +300 -0
- package/src/components/timeline/react.tsx +59 -0
- package/src/components/timeline/timeline.css +218 -0
- package/src/components/tooltip/README.md +46 -0
- package/src/components/tooltip/element.ts +22 -0
- package/src/components/tooltip/engine.ts +288 -0
- package/src/components/tooltip/react.tsx +30 -0
- package/src/components/tooltip/tooltip.css +78 -0
- package/src/components/tree-view/README.md +61 -0
- package/src/components/tree-view/element.ts +32 -0
- package/src/components/tree-view/engine.ts +569 -0
- package/src/components/tree-view/react.tsx +78 -0
- package/src/components/tree-view/tree-view.css +209 -0
- package/src/components/virtual-list/README.md +81 -0
- package/src/components/virtual-list/element.ts +42 -0
- package/src/components/virtual-list/engine.ts +678 -0
- package/src/components/virtual-list/react.tsx +101 -0
- package/src/components/virtual-list/virtual-list.css +194 -0
- package/src/core/chips.ts +196 -0
- package/src/core/color.ts +304 -0
- package/src/core/date-range.ts +67 -0
- package/src/core/dates.ts +11 -1
- package/src/core/files.ts +107 -0
- package/src/core/filter.ts +229 -0
- package/src/core/gsap.ts +80 -65
- package/src/core/listbox.ts +332 -0
- package/src/core/mark.ts +29 -0
- package/src/core/position.ts +89 -0
- package/src/core/relative-time.ts +77 -0
- package/src/core/segment-field.ts +373 -0
- package/src/core/segments.ts +153 -0
- package/src/core/tree.ts +116 -0
- package/src/core/virtual.ts +79 -0
- package/src/css/tokens.css +186 -182
- package/src/elements/index.ts +147 -0
- package/src/index.ts +72 -0
- package/src/motion/micro.ts +248 -0
- package/src/motion/sheet.ts +88 -65
- package/src/motion/surface.ts +9 -0
- package/src/react/index.ts +57 -0
- package/dist/chunk-IKQ5FODN.js.map +0 -1
- package/dist/chunk-J6OCFNGU.js +0 -177
- package/dist/chunk-J6OCFNGU.js.map +0 -1
- package/dist/chunk-TFNRIZHU.js +0 -3977
- package/dist/chunk-TFNRIZHU.js.map +0 -1
- package/dist/chunk-XAKC2QY7.js.map +0 -1
- package/dist/reveal-jsX-uwUz.d.ts +0 -625
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Windowing (virtual-list), the pure part: the top of each row from their
|
|
3
|
+
* heights (one fixed height, or measured ones with an estimate for the rest),
|
|
4
|
+
* the total height, and which rows a scroll position shows. The running sums
|
|
5
|
+
* are filled lazily from the first changed row, and finding the row at a
|
|
6
|
+
* position is a binary search over them (about 17 steps for 100 000 rows).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface VirtualRange {
|
|
10
|
+
/** First row drawn. */
|
|
11
|
+
start: number;
|
|
12
|
+
/** One past the last row drawn. */
|
|
13
|
+
end: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface VirtualSizes {
|
|
17
|
+
readonly count: number;
|
|
18
|
+
get(index: number): number;
|
|
19
|
+
/** A row's height; true when it changed. */
|
|
20
|
+
set(index: number, height: number): boolean;
|
|
21
|
+
/** The top of a row (the sum of the heights before it). */
|
|
22
|
+
offset(index: number): number;
|
|
23
|
+
total(): number;
|
|
24
|
+
/** The row at a vertical position (clamped to the list). */
|
|
25
|
+
indexAt(y: number): number;
|
|
26
|
+
/** The rows that cover y … y + height, with `overscan` more on each side. */
|
|
27
|
+
range(y: number, height: number, overscan?: number): VirtualRange;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function createSizes(heights: number[]): VirtualSizes {
|
|
31
|
+
const sizes = heights.map((height) => (Number.isFinite(height) && height > 0 ? height : 0));
|
|
32
|
+
const count = sizes.length;
|
|
33
|
+
const sums = new Float64Array(count + 1);
|
|
34
|
+
// sums[0..valid] are right.
|
|
35
|
+
let valid = 0;
|
|
36
|
+
const ensure = (index: number) => {
|
|
37
|
+
for (let i = valid; i < index; i++) sums[i + 1] = sums[i]! + sizes[i]!;
|
|
38
|
+
if (index > valid) valid = index;
|
|
39
|
+
};
|
|
40
|
+
const indexAt = (y: number) => {
|
|
41
|
+
if (!count) return 0;
|
|
42
|
+
ensure(count);
|
|
43
|
+
let low = 0;
|
|
44
|
+
let high = count - 1;
|
|
45
|
+
// The last row whose top is at or above y.
|
|
46
|
+
while (low < high) {
|
|
47
|
+
const middle = (low + high + 1) >> 1;
|
|
48
|
+
if (sums[middle]! <= y) low = middle;
|
|
49
|
+
else high = middle - 1;
|
|
50
|
+
}
|
|
51
|
+
return low;
|
|
52
|
+
};
|
|
53
|
+
return {
|
|
54
|
+
count,
|
|
55
|
+
get: (index) => sizes[index] ?? 0,
|
|
56
|
+
set(index, height) {
|
|
57
|
+
if (index < 0 || index >= count || !Number.isFinite(height) || height < 0 || sizes[index] === height) return false;
|
|
58
|
+
sizes[index] = height;
|
|
59
|
+
if (valid > index) valid = index;
|
|
60
|
+
return true;
|
|
61
|
+
},
|
|
62
|
+
offset(index) {
|
|
63
|
+
const at = Math.max(0, Math.min(count, index));
|
|
64
|
+
ensure(at);
|
|
65
|
+
return sums[at]!;
|
|
66
|
+
},
|
|
67
|
+
total() {
|
|
68
|
+
ensure(count);
|
|
69
|
+
return sums[count]!;
|
|
70
|
+
},
|
|
71
|
+
indexAt,
|
|
72
|
+
range(y, height, overscan = 0) {
|
|
73
|
+
if (!count) return { start: 0, end: 0 };
|
|
74
|
+
const start = indexAt(Math.max(0, y));
|
|
75
|
+
const last = indexAt(Math.max(0, y + Math.max(0, height) - 0.5));
|
|
76
|
+
return { start: Math.max(0, start - overscan), end: Math.min(count, last + 1 + overscan) };
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
package/src/css/tokens.css
CHANGED
|
@@ -1,182 +1,186 @@
|
|
|
1
|
-
/* motion-kit tokens — override any of them on :root, on a [data-mk-theme] or on a component. */
|
|
2
|
-
:root {
|
|
3
|
-
/* Elastic curves */
|
|
4
|
-
--mk-ease-elastic: linear(0, 0.5737 7.6%, 0.8382 11.87%, 0.9463 14.19%, 1.0292 16.54%, 1.0886 18.97%, 1.1258 21.53%, 1.137 22.97%, 1.1424 24.48%, 1.1423 26.1%, 1.1366 27.86%, 1.1165 31.01%, 1.0507 38.62%, 1.0219 42.57%, 0.9995 46.99%, 0.9872 51.63%, 0.9842 58.77%, 1.0011 81.26%, 1);
|
|
5
|
-
--mk-ease-elastic-hover: linear(0, 0.2178 2.1%, 1.1144 8.49%, 1.2959 10.7%, 1.3463 11.81%, 1.3705 12.94%, 1.3726, 1.3643 14.48%, 1.3151 16.2%, 1.0317 21.81%, 0.941 24.01%, 0.8912 25.91%, 0.8694 27.84%, 0.8698 29.21%, 0.8824 30.71%, 1.0122 38.33%, 1.0357, 1.046 42.71%, 1.0416 45.7%, 0.9961 53.26%, 0.9839 57.54%, 0.9853 60.71%, 1.0012 68.14%, 1.0056 72.24%, 0.9981 86.66%, 1);
|
|
6
|
-
|
|
7
|
-
/* Motion curves. The signature is a multi-point path sampled as CSS linear(). */
|
|
8
|
-
--mk-ease-signature: linear(0 0%, .017 2.5%, .037 5%, .061 7.5%, .091 10%, .13 12.5%, .184 15%, .275 17.5%, .562 20%, .733 22.5%, .803 25%, .848 27.5%, .88 30%, .902 32.5%, .942 40%, .97 50%, .985 60%, .993 70%, .998 80%, 1 90%, 1 100%);
|
|
9
|
-
/* backdrop tint uses the same curve. */
|
|
10
|
-
--mk-ease-tint: var(--mk-ease-signature);
|
|
11
|
-
--mk-ease-flow: cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
12
|
-
--mk-ease-close: cubic-bezier(0.56, 0.27, 0, 1);
|
|
13
|
-
--mk-ease-blur-away: cubic-bezier(0.37, 0.35, 0, 1);
|
|
14
|
-
--mk-ease-nav-radius: cubic-bezier(0.38, 0.49, 0, 2);
|
|
15
|
-
--mk-ease-nav-move: cubic-bezier(0.38, 0.49, 0, 1.2);
|
|
16
|
-
--mk-ease-swatch: cubic-bezier(0.38, 0.49, 0, 1.5);
|
|
17
|
-
--mk-ease-swatch-light: cubic-bezier(0.11, 1, 0, 1);
|
|
18
|
-
--mk-ease-slot: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
19
|
-
/* Glass, sheet and control curves */
|
|
20
|
-
--mk-ease-glass: cubic-bezier(0.25, 1, 0.5, 1);
|
|
21
|
-
--mk-ease-sheet: cubic-bezier(0.16, 1, 0.3, 1);
|
|
22
|
-
--mk-ease-siena: cubic-bezier(0.19, 1, 0.22, 1);
|
|
23
|
-
--mk-ease-quint: cubic-bezier(0.23, 1, 0.32, 1);
|
|
24
|
-
/* springs (Motion 400/10 press, 260/18 success), sampled by springLinear(); a test keeps them in sync. */
|
|
25
|
-
--mk-ease-press: linear(0, 0.1957, 0.6333, 1.0817, 1.3717, 1.4412, 1.3274, 1.1249, 0.934, 0.8221, 0.808, 0.8691, 0.9612, 1.0413, 1.0833, 1.0824, 1.0513, 1.01, 0.9769, 0.9618, 0.9651, 0.9804, 0.9986, 1.0121, 1.0173, 1.0146, 1.0072, 0.9993, 0.9939, 0.9923, 0.994, 0.9974, 1.0008, 1.003, 1.0034, 1.0024, 1.0008, 0.9994, 0.9986, 0.9985, 1);
|
|
26
|
-
--mk-dur-press: 1.346s;
|
|
27
|
-
--mk-ease-success: linear(0, 0.0437, 0.1533, 0.3004, 0.4617, 0.6197, 0.7624, 0.8825, 0.9767, 1.0451, 1.0895, 1.1133, 1.1208, 1.1161, 1.1032, 1.0856, 1.0662, 1.047, 1.0296, 1.0149, 1.0034, 0.9949, 0.9894, 0.9864, 0.9854, 0.9859, 0.9874, 0.9895, 0.9919, 0.9942, 0.9963, 0.9981, 0.9995, 1.0006, 1.0012, 1.0016, 1.0018, 1.0017, 1.0015, 1.0013, 1);
|
|
28
|
-
--mk-dur-success: 0.779s;
|
|
29
|
-
--mk-dur-fast: 0.25s;
|
|
30
|
-
--mk-dur: 0.45s;
|
|
31
|
-
--mk-dur-slow: 0.7s;
|
|
32
|
-
|
|
33
|
-
/* Layered shadow */
|
|
34
|
-
--mk-shadow: 0 9px 21px rgb(0 0 0 / 0.1), 0 38px 38px rgb(0 0 0 / 0.09), 0 85px 51px rgb(0 0 0 / 0.05);
|
|
35
|
-
--mk-shadow-soft: 0 9px 21px rgb(0 0 0 / 0.05), 0 38px 38px rgb(0 0 0 / 0.045), 0 85px 51px rgb(0 0 0 / 0.025);
|
|
36
|
-
|
|
37
|
-
/* Shape: large capsules */
|
|
38
|
-
--mk-radius-card: 1rem;
|
|
39
|
-
--mk-radius-xs: 8px;
|
|
40
|
-
--mk-radius-sm: 12px;
|
|
41
|
-
--mk-radius-md: 16px;
|
|
42
|
-
--mk-radius-lg: 24px;
|
|
43
|
-
--mk-radius-xl: 32px;
|
|
44
|
-
--mk-radius-2xl: 40px;
|
|
45
|
-
--mk-radius-3xl: 48px;
|
|
46
|
-
--mk-radius-4xl: 64px;
|
|
47
|
-
--mk-radius-full: 999px;
|
|
48
|
-
--mk-radius-bubble: var(--mk-radius-xl);
|
|
49
|
-
--mk-radius-dialog: var(--mk-radius-2xl);
|
|
50
|
-
--mk-radius-chat: var(--mk-radius-3xl);
|
|
51
|
-
--mk-radius-dock: var(--mk-radius-4xl);
|
|
52
|
-
|
|
53
|
-
/* Spacing, 4 px steps. navigation breakpoint is 680px (media queries use it literally). */
|
|
54
|
-
--mk-space-1: 4px;
|
|
55
|
-
--mk-space-2: 8px;
|
|
56
|
-
--mk-space-3: 12px;
|
|
57
|
-
--mk-space-4: 16px;
|
|
58
|
-
--mk-space-5: 20px;
|
|
59
|
-
--mk-space-6: 24px;
|
|
60
|
-
--mk-space-7: 28px;
|
|
61
|
-
--mk-space-8: 32px;
|
|
62
|
-
--mk-space-9: 36px;
|
|
63
|
-
--mk-space-10: 40px;
|
|
64
|
-
--mk-space-11: 44px;
|
|
65
|
-
--mk-space-12: 48px;
|
|
66
|
-
--mk-space-13: 52px;
|
|
67
|
-
--mk-space-14: 56px;
|
|
68
|
-
--mk-space-15: 60px;
|
|
69
|
-
--mk-space-16: 64px;
|
|
70
|
-
--mk-breakpoint: 680px;
|
|
71
|
-
|
|
72
|
-
/* Type: DM Sans, Geist Mono, Material Symbols Rounded (css/fonts.css loads them). */
|
|
73
|
-
--mk-font: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
|
|
74
|
-
--mk-font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
75
|
-
/* Material 3 type scale; font weights are unitless. */
|
|
76
|
-
--md-sys-typescale-display-large-font: var(--mk-font);
|
|
77
|
-
--md-sys-typescale-display-large-size: 57px;
|
|
78
|
-
--md-sys-typescale-display-large-line-height: 64px;
|
|
79
|
-
--md-sys-typescale-display-large-weight: 400;
|
|
80
|
-
--md-sys-typescale-display-large-tracking: -0.25px;
|
|
81
|
-
--md-sys-typescale-display-medium-font: var(--mk-font);
|
|
82
|
-
--md-sys-typescale-display-medium-size: 45px;
|
|
83
|
-
--md-sys-typescale-display-medium-line-height: 52px;
|
|
84
|
-
--md-sys-typescale-display-medium-weight: 400;
|
|
85
|
-
--md-sys-typescale-display-medium-tracking: 0px;
|
|
86
|
-
--md-sys-typescale-display-small-font: var(--mk-font);
|
|
87
|
-
--md-sys-typescale-display-small-size: 36px;
|
|
88
|
-
--md-sys-typescale-display-small-line-height: 44px;
|
|
89
|
-
--md-sys-typescale-display-small-weight: 400;
|
|
90
|
-
--md-sys-typescale-display-small-tracking: 0px;
|
|
91
|
-
--md-sys-typescale-headline-large-font: var(--mk-font);
|
|
92
|
-
--md-sys-typescale-headline-large-size: 32px;
|
|
93
|
-
--md-sys-typescale-headline-large-line-height: 40px;
|
|
94
|
-
--md-sys-typescale-headline-large-weight: 400;
|
|
95
|
-
--md-sys-typescale-headline-large-tracking: 0px;
|
|
96
|
-
--md-sys-typescale-headline-medium-font: var(--mk-font);
|
|
97
|
-
--md-sys-typescale-headline-medium-size: 28px;
|
|
98
|
-
--md-sys-typescale-headline-medium-line-height: 36px;
|
|
99
|
-
--md-sys-typescale-headline-medium-weight: 400;
|
|
100
|
-
--md-sys-typescale-headline-medium-tracking: 0px;
|
|
101
|
-
--md-sys-typescale-headline-small-font: var(--mk-font);
|
|
102
|
-
--md-sys-typescale-headline-small-size: 24px;
|
|
103
|
-
--md-sys-typescale-headline-small-line-height: 32px;
|
|
104
|
-
--md-sys-typescale-headline-small-weight: 400;
|
|
105
|
-
--md-sys-typescale-headline-small-tracking: 0px;
|
|
106
|
-
--md-sys-typescale-title-large-font: var(--mk-font);
|
|
107
|
-
--md-sys-typescale-title-large-size: 22px;
|
|
108
|
-
--md-sys-typescale-title-large-line-height: 28px;
|
|
109
|
-
--md-sys-typescale-title-large-weight: 400;
|
|
110
|
-
--md-sys-typescale-title-large-tracking: 0px;
|
|
111
|
-
--md-sys-typescale-title-medium-font: var(--mk-font);
|
|
112
|
-
--md-sys-typescale-title-medium-size: 16px;
|
|
113
|
-
--md-sys-typescale-title-medium-line-height: 24px;
|
|
114
|
-
--md-sys-typescale-title-medium-weight: 500;
|
|
115
|
-
--md-sys-typescale-title-medium-tracking: 0.15px;
|
|
116
|
-
--md-sys-typescale-title-small-font: var(--mk-font);
|
|
117
|
-
--md-sys-typescale-title-small-size: 14px;
|
|
118
|
-
--md-sys-typescale-title-small-line-height: 20px;
|
|
119
|
-
--md-sys-typescale-title-small-weight: 500;
|
|
120
|
-
--md-sys-typescale-title-small-tracking: 0.1px;
|
|
121
|
-
--md-sys-typescale-body-large-font: var(--mk-font);
|
|
122
|
-
--md-sys-typescale-body-large-size: 16px;
|
|
123
|
-
--md-sys-typescale-body-large-line-height: 24px;
|
|
124
|
-
--md-sys-typescale-body-large-weight: 400;
|
|
125
|
-
--md-sys-typescale-body-large-tracking: 0.5px;
|
|
126
|
-
--md-sys-typescale-body-medium-font: var(--mk-font);
|
|
127
|
-
--md-sys-typescale-body-medium-size: 14px;
|
|
128
|
-
--md-sys-typescale-body-medium-line-height: 20px;
|
|
129
|
-
--md-sys-typescale-body-medium-weight: 400;
|
|
130
|
-
--md-sys-typescale-body-medium-tracking: 0.25px;
|
|
131
|
-
--md-sys-typescale-body-small-font: var(--mk-font);
|
|
132
|
-
--md-sys-typescale-body-small-size: 12px;
|
|
133
|
-
--md-sys-typescale-body-small-line-height: 16px;
|
|
134
|
-
--md-sys-typescale-body-small-weight: 400;
|
|
135
|
-
--md-sys-typescale-body-small-tracking: 0.4px;
|
|
136
|
-
--md-sys-typescale-label-large-font: var(--mk-font);
|
|
137
|
-
--md-sys-typescale-label-large-size: 14px;
|
|
138
|
-
--md-sys-typescale-label-large-line-height: 20px;
|
|
139
|
-
--md-sys-typescale-label-large-weight: 500;
|
|
140
|
-
--md-sys-typescale-label-large-tracking: 0.1px;
|
|
141
|
-
--md-sys-typescale-label-medium-font: var(--mk-font);
|
|
142
|
-
--md-sys-typescale-label-medium-size: 12px;
|
|
143
|
-
--md-sys-typescale-label-medium-line-height: 16px;
|
|
144
|
-
--md-sys-typescale-label-medium-weight: 500;
|
|
145
|
-
--md-sys-typescale-label-medium-tracking: 0.5px;
|
|
146
|
-
--md-sys-typescale-label-small-font: var(--mk-font);
|
|
147
|
-
--md-sys-typescale-label-small-size: 11px;
|
|
148
|
-
--md-sys-typescale-label-small-line-height: 16px;
|
|
149
|
-
--md-sys-typescale-label-small-weight: 500;
|
|
150
|
-
--md-sys-typescale-label-small-tracking: 0.5px;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/*
|
|
154
|
-
* Semantic colour layer over the Material 3 roles. Declared on every themed
|
|
155
|
-
* element too, so a nested [data-mk-theme] recomputes it from its own roles.
|
|
156
|
-
*/
|
|
157
|
-
:root,
|
|
158
|
-
[data-mk-theme] {
|
|
159
|
-
--mk-bg: var(--md-sys-color-background);
|
|
160
|
-
--mk-surface: var(--md-sys-color-surface);
|
|
161
|
-
--mk-surface-1: var(--md-sys-color-surface-container-lowest);
|
|
162
|
-
--mk-surface-2: var(--md-sys-color-surface-container-low);
|
|
163
|
-
--mk-surface-3: var(--md-sys-color-surface-container);
|
|
164
|
-
--mk-surface-4: var(--md-sys-color-surface-container-high);
|
|
165
|
-
--mk-surface-5: var(--md-sys-color-surface-container-highest);
|
|
166
|
-
--mk-text: var(--md-sys-color-on-surface);
|
|
167
|
-
--mk-muted: var(--md-sys-color-on-surface-variant);
|
|
168
|
-
--mk-accent: var(--md-sys-color-primary);
|
|
169
|
-
--mk-on-accent: var(--md-sys-color-on-primary);
|
|
170
|
-
--mk-accent-soft: var(--md-sys-color-primary-container);
|
|
171
|
-
--mk-on-accent-soft: var(--md-sys-color-on-primary-container);
|
|
172
|
-
--mk-secondary-soft: var(--md-sys-color-secondary-container);
|
|
173
|
-
--mk-on-secondary-soft: var(--md-sys-color-on-secondary-container);
|
|
174
|
-
--mk-outline: var(--md-sys-color-outline);
|
|
175
|
-
--mk-outline-soft: var(--md-sys-color-outline-variant);
|
|
176
|
-
--mk-error: var(--md-sys-color-error);
|
|
177
|
-
--mk-on-error: var(--md-sys-color-on-error);
|
|
178
|
-
--mk-error-soft: var(--md-sys-color-error-container);
|
|
179
|
-
--mk-on-error-soft: var(--md-sys-color-on-error-container);
|
|
180
|
-
--mk-scrim: var(--md-sys-color-scrim);
|
|
181
|
-
--mk-shadow-color: var(--md-sys-color-shadow);
|
|
182
|
-
|
|
1
|
+
/* motion-kit tokens — override any of them on :root, on a [data-mk-theme] or on a component. */
|
|
2
|
+
:root {
|
|
3
|
+
/* Elastic curves */
|
|
4
|
+
--mk-ease-elastic: linear(0, 0.5737 7.6%, 0.8382 11.87%, 0.9463 14.19%, 1.0292 16.54%, 1.0886 18.97%, 1.1258 21.53%, 1.137 22.97%, 1.1424 24.48%, 1.1423 26.1%, 1.1366 27.86%, 1.1165 31.01%, 1.0507 38.62%, 1.0219 42.57%, 0.9995 46.99%, 0.9872 51.63%, 0.9842 58.77%, 1.0011 81.26%, 1);
|
|
5
|
+
--mk-ease-elastic-hover: linear(0, 0.2178 2.1%, 1.1144 8.49%, 1.2959 10.7%, 1.3463 11.81%, 1.3705 12.94%, 1.3726, 1.3643 14.48%, 1.3151 16.2%, 1.0317 21.81%, 0.941 24.01%, 0.8912 25.91%, 0.8694 27.84%, 0.8698 29.21%, 0.8824 30.71%, 1.0122 38.33%, 1.0357, 1.046 42.71%, 1.0416 45.7%, 0.9961 53.26%, 0.9839 57.54%, 0.9853 60.71%, 1.0012 68.14%, 1.0056 72.24%, 0.9981 86.66%, 1);
|
|
6
|
+
|
|
7
|
+
/* Motion curves. The signature is a multi-point path sampled as CSS linear(). */
|
|
8
|
+
--mk-ease-signature: linear(0 0%, .017 2.5%, .037 5%, .061 7.5%, .091 10%, .13 12.5%, .184 15%, .275 17.5%, .562 20%, .733 22.5%, .803 25%, .848 27.5%, .88 30%, .902 32.5%, .942 40%, .97 50%, .985 60%, .993 70%, .998 80%, 1 90%, 1 100%);
|
|
9
|
+
/* backdrop tint uses the same curve. */
|
|
10
|
+
--mk-ease-tint: var(--mk-ease-signature);
|
|
11
|
+
--mk-ease-flow: cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
12
|
+
--mk-ease-close: cubic-bezier(0.56, 0.27, 0, 1);
|
|
13
|
+
--mk-ease-blur-away: cubic-bezier(0.37, 0.35, 0, 1);
|
|
14
|
+
--mk-ease-nav-radius: cubic-bezier(0.38, 0.49, 0, 2);
|
|
15
|
+
--mk-ease-nav-move: cubic-bezier(0.38, 0.49, 0, 1.2);
|
|
16
|
+
--mk-ease-swatch: cubic-bezier(0.38, 0.49, 0, 1.5);
|
|
17
|
+
--mk-ease-swatch-light: cubic-bezier(0.11, 1, 0, 1);
|
|
18
|
+
--mk-ease-slot: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
19
|
+
/* Glass, sheet and control curves */
|
|
20
|
+
--mk-ease-glass: cubic-bezier(0.25, 1, 0.5, 1);
|
|
21
|
+
--mk-ease-sheet: cubic-bezier(0.16, 1, 0.3, 1);
|
|
22
|
+
--mk-ease-siena: cubic-bezier(0.19, 1, 0.22, 1);
|
|
23
|
+
--mk-ease-quint: cubic-bezier(0.23, 1, 0.32, 1);
|
|
24
|
+
/* springs (Motion 400/10 press, 260/18 success), sampled by springLinear(); a test keeps them in sync. */
|
|
25
|
+
--mk-ease-press: linear(0, 0.1957, 0.6333, 1.0817, 1.3717, 1.4412, 1.3274, 1.1249, 0.934, 0.8221, 0.808, 0.8691, 0.9612, 1.0413, 1.0833, 1.0824, 1.0513, 1.01, 0.9769, 0.9618, 0.9651, 0.9804, 0.9986, 1.0121, 1.0173, 1.0146, 1.0072, 0.9993, 0.9939, 0.9923, 0.994, 0.9974, 1.0008, 1.003, 1.0034, 1.0024, 1.0008, 0.9994, 0.9986, 0.9985, 1);
|
|
26
|
+
--mk-dur-press: 1.346s;
|
|
27
|
+
--mk-ease-success: linear(0, 0.0437, 0.1533, 0.3004, 0.4617, 0.6197, 0.7624, 0.8825, 0.9767, 1.0451, 1.0895, 1.1133, 1.1208, 1.1161, 1.1032, 1.0856, 1.0662, 1.047, 1.0296, 1.0149, 1.0034, 0.9949, 0.9894, 0.9864, 0.9854, 0.9859, 0.9874, 0.9895, 0.9919, 0.9942, 0.9963, 0.9981, 0.9995, 1.0006, 1.0012, 1.0016, 1.0018, 1.0017, 1.0015, 1.0013, 1);
|
|
28
|
+
--mk-dur-success: 0.779s;
|
|
29
|
+
--mk-dur-fast: 0.25s;
|
|
30
|
+
--mk-dur: 0.45s;
|
|
31
|
+
--mk-dur-slow: 0.7s;
|
|
32
|
+
|
|
33
|
+
/* Layered shadow */
|
|
34
|
+
--mk-shadow: 0 9px 21px rgb(0 0 0 / 0.1), 0 38px 38px rgb(0 0 0 / 0.09), 0 85px 51px rgb(0 0 0 / 0.05);
|
|
35
|
+
--mk-shadow-soft: 0 9px 21px rgb(0 0 0 / 0.05), 0 38px 38px rgb(0 0 0 / 0.045), 0 85px 51px rgb(0 0 0 / 0.025);
|
|
36
|
+
|
|
37
|
+
/* Shape: large capsules */
|
|
38
|
+
--mk-radius-card: 1rem;
|
|
39
|
+
--mk-radius-xs: 8px;
|
|
40
|
+
--mk-radius-sm: 12px;
|
|
41
|
+
--mk-radius-md: 16px;
|
|
42
|
+
--mk-radius-lg: 24px;
|
|
43
|
+
--mk-radius-xl: 32px;
|
|
44
|
+
--mk-radius-2xl: 40px;
|
|
45
|
+
--mk-radius-3xl: 48px;
|
|
46
|
+
--mk-radius-4xl: 64px;
|
|
47
|
+
--mk-radius-full: 999px;
|
|
48
|
+
--mk-radius-bubble: var(--mk-radius-xl);
|
|
49
|
+
--mk-radius-dialog: var(--mk-radius-2xl);
|
|
50
|
+
--mk-radius-chat: var(--mk-radius-3xl);
|
|
51
|
+
--mk-radius-dock: var(--mk-radius-4xl);
|
|
52
|
+
|
|
53
|
+
/* Spacing, 4 px steps. navigation breakpoint is 680px (media queries use it literally). */
|
|
54
|
+
--mk-space-1: 4px;
|
|
55
|
+
--mk-space-2: 8px;
|
|
56
|
+
--mk-space-3: 12px;
|
|
57
|
+
--mk-space-4: 16px;
|
|
58
|
+
--mk-space-5: 20px;
|
|
59
|
+
--mk-space-6: 24px;
|
|
60
|
+
--mk-space-7: 28px;
|
|
61
|
+
--mk-space-8: 32px;
|
|
62
|
+
--mk-space-9: 36px;
|
|
63
|
+
--mk-space-10: 40px;
|
|
64
|
+
--mk-space-11: 44px;
|
|
65
|
+
--mk-space-12: 48px;
|
|
66
|
+
--mk-space-13: 52px;
|
|
67
|
+
--mk-space-14: 56px;
|
|
68
|
+
--mk-space-15: 60px;
|
|
69
|
+
--mk-space-16: 64px;
|
|
70
|
+
--mk-breakpoint: 680px;
|
|
71
|
+
|
|
72
|
+
/* Type: DM Sans, Geist Mono, Material Symbols Rounded (css/fonts.css loads them). */
|
|
73
|
+
--mk-font: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
|
|
74
|
+
--mk-font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
75
|
+
/* Material 3 type scale; font weights are unitless. */
|
|
76
|
+
--md-sys-typescale-display-large-font: var(--mk-font);
|
|
77
|
+
--md-sys-typescale-display-large-size: 57px;
|
|
78
|
+
--md-sys-typescale-display-large-line-height: 64px;
|
|
79
|
+
--md-sys-typescale-display-large-weight: 400;
|
|
80
|
+
--md-sys-typescale-display-large-tracking: -0.25px;
|
|
81
|
+
--md-sys-typescale-display-medium-font: var(--mk-font);
|
|
82
|
+
--md-sys-typescale-display-medium-size: 45px;
|
|
83
|
+
--md-sys-typescale-display-medium-line-height: 52px;
|
|
84
|
+
--md-sys-typescale-display-medium-weight: 400;
|
|
85
|
+
--md-sys-typescale-display-medium-tracking: 0px;
|
|
86
|
+
--md-sys-typescale-display-small-font: var(--mk-font);
|
|
87
|
+
--md-sys-typescale-display-small-size: 36px;
|
|
88
|
+
--md-sys-typescale-display-small-line-height: 44px;
|
|
89
|
+
--md-sys-typescale-display-small-weight: 400;
|
|
90
|
+
--md-sys-typescale-display-small-tracking: 0px;
|
|
91
|
+
--md-sys-typescale-headline-large-font: var(--mk-font);
|
|
92
|
+
--md-sys-typescale-headline-large-size: 32px;
|
|
93
|
+
--md-sys-typescale-headline-large-line-height: 40px;
|
|
94
|
+
--md-sys-typescale-headline-large-weight: 400;
|
|
95
|
+
--md-sys-typescale-headline-large-tracking: 0px;
|
|
96
|
+
--md-sys-typescale-headline-medium-font: var(--mk-font);
|
|
97
|
+
--md-sys-typescale-headline-medium-size: 28px;
|
|
98
|
+
--md-sys-typescale-headline-medium-line-height: 36px;
|
|
99
|
+
--md-sys-typescale-headline-medium-weight: 400;
|
|
100
|
+
--md-sys-typescale-headline-medium-tracking: 0px;
|
|
101
|
+
--md-sys-typescale-headline-small-font: var(--mk-font);
|
|
102
|
+
--md-sys-typescale-headline-small-size: 24px;
|
|
103
|
+
--md-sys-typescale-headline-small-line-height: 32px;
|
|
104
|
+
--md-sys-typescale-headline-small-weight: 400;
|
|
105
|
+
--md-sys-typescale-headline-small-tracking: 0px;
|
|
106
|
+
--md-sys-typescale-title-large-font: var(--mk-font);
|
|
107
|
+
--md-sys-typescale-title-large-size: 22px;
|
|
108
|
+
--md-sys-typescale-title-large-line-height: 28px;
|
|
109
|
+
--md-sys-typescale-title-large-weight: 400;
|
|
110
|
+
--md-sys-typescale-title-large-tracking: 0px;
|
|
111
|
+
--md-sys-typescale-title-medium-font: var(--mk-font);
|
|
112
|
+
--md-sys-typescale-title-medium-size: 16px;
|
|
113
|
+
--md-sys-typescale-title-medium-line-height: 24px;
|
|
114
|
+
--md-sys-typescale-title-medium-weight: 500;
|
|
115
|
+
--md-sys-typescale-title-medium-tracking: 0.15px;
|
|
116
|
+
--md-sys-typescale-title-small-font: var(--mk-font);
|
|
117
|
+
--md-sys-typescale-title-small-size: 14px;
|
|
118
|
+
--md-sys-typescale-title-small-line-height: 20px;
|
|
119
|
+
--md-sys-typescale-title-small-weight: 500;
|
|
120
|
+
--md-sys-typescale-title-small-tracking: 0.1px;
|
|
121
|
+
--md-sys-typescale-body-large-font: var(--mk-font);
|
|
122
|
+
--md-sys-typescale-body-large-size: 16px;
|
|
123
|
+
--md-sys-typescale-body-large-line-height: 24px;
|
|
124
|
+
--md-sys-typescale-body-large-weight: 400;
|
|
125
|
+
--md-sys-typescale-body-large-tracking: 0.5px;
|
|
126
|
+
--md-sys-typescale-body-medium-font: var(--mk-font);
|
|
127
|
+
--md-sys-typescale-body-medium-size: 14px;
|
|
128
|
+
--md-sys-typescale-body-medium-line-height: 20px;
|
|
129
|
+
--md-sys-typescale-body-medium-weight: 400;
|
|
130
|
+
--md-sys-typescale-body-medium-tracking: 0.25px;
|
|
131
|
+
--md-sys-typescale-body-small-font: var(--mk-font);
|
|
132
|
+
--md-sys-typescale-body-small-size: 12px;
|
|
133
|
+
--md-sys-typescale-body-small-line-height: 16px;
|
|
134
|
+
--md-sys-typescale-body-small-weight: 400;
|
|
135
|
+
--md-sys-typescale-body-small-tracking: 0.4px;
|
|
136
|
+
--md-sys-typescale-label-large-font: var(--mk-font);
|
|
137
|
+
--md-sys-typescale-label-large-size: 14px;
|
|
138
|
+
--md-sys-typescale-label-large-line-height: 20px;
|
|
139
|
+
--md-sys-typescale-label-large-weight: 500;
|
|
140
|
+
--md-sys-typescale-label-large-tracking: 0.1px;
|
|
141
|
+
--md-sys-typescale-label-medium-font: var(--mk-font);
|
|
142
|
+
--md-sys-typescale-label-medium-size: 12px;
|
|
143
|
+
--md-sys-typescale-label-medium-line-height: 16px;
|
|
144
|
+
--md-sys-typescale-label-medium-weight: 500;
|
|
145
|
+
--md-sys-typescale-label-medium-tracking: 0.5px;
|
|
146
|
+
--md-sys-typescale-label-small-font: var(--mk-font);
|
|
147
|
+
--md-sys-typescale-label-small-size: 11px;
|
|
148
|
+
--md-sys-typescale-label-small-line-height: 16px;
|
|
149
|
+
--md-sys-typescale-label-small-weight: 500;
|
|
150
|
+
--md-sys-typescale-label-small-tracking: 0.5px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/*
|
|
154
|
+
* Semantic colour layer over the Material 3 roles. Declared on every themed
|
|
155
|
+
* element too, so a nested [data-mk-theme] recomputes it from its own roles.
|
|
156
|
+
*/
|
|
157
|
+
:root,
|
|
158
|
+
[data-mk-theme] {
|
|
159
|
+
--mk-bg: var(--md-sys-color-background);
|
|
160
|
+
--mk-surface: var(--md-sys-color-surface);
|
|
161
|
+
--mk-surface-1: var(--md-sys-color-surface-container-lowest);
|
|
162
|
+
--mk-surface-2: var(--md-sys-color-surface-container-low);
|
|
163
|
+
--mk-surface-3: var(--md-sys-color-surface-container);
|
|
164
|
+
--mk-surface-4: var(--md-sys-color-surface-container-high);
|
|
165
|
+
--mk-surface-5: var(--md-sys-color-surface-container-highest);
|
|
166
|
+
--mk-text: var(--md-sys-color-on-surface);
|
|
167
|
+
--mk-muted: var(--md-sys-color-on-surface-variant);
|
|
168
|
+
--mk-accent: var(--md-sys-color-primary);
|
|
169
|
+
--mk-on-accent: var(--md-sys-color-on-primary);
|
|
170
|
+
--mk-accent-soft: var(--md-sys-color-primary-container);
|
|
171
|
+
--mk-on-accent-soft: var(--md-sys-color-on-primary-container);
|
|
172
|
+
--mk-secondary-soft: var(--md-sys-color-secondary-container);
|
|
173
|
+
--mk-on-secondary-soft: var(--md-sys-color-on-secondary-container);
|
|
174
|
+
--mk-outline: var(--md-sys-color-outline);
|
|
175
|
+
--mk-outline-soft: var(--md-sys-color-outline-variant);
|
|
176
|
+
--mk-error: var(--md-sys-color-error);
|
|
177
|
+
--mk-on-error: var(--md-sys-color-on-error);
|
|
178
|
+
--mk-error-soft: var(--md-sys-color-error-container);
|
|
179
|
+
--mk-on-error-soft: var(--md-sys-color-on-error-container);
|
|
180
|
+
--mk-scrim: var(--md-sys-color-scrim);
|
|
181
|
+
--mk-shadow-color: var(--md-sys-color-shadow);
|
|
182
|
+
/* Melonmind's inverse glass (popovers, command search, chart tooltips): the text colour at 86 %, blurred, bevelled. */
|
|
183
|
+
--mk-glass-inverse: color-mix(in srgb, var(--mk-text) 86%, transparent);
|
|
184
|
+
--mk-on-glass-inverse: var(--mk-bg);
|
|
185
|
+
--mk-glass-bevel: inset 1px 1px 1px 0 color-mix(in srgb, var(--mk-bg) 30%, transparent), inset -1px -1px 1px 0 color-mix(in srgb, var(--mk-bg) 30%, transparent), 0 12px 32px -12px color-mix(in srgb, var(--mk-shadow-color) 40%, transparent);
|
|
186
|
+
}
|
package/src/elements/index.ts
CHANGED
|
@@ -17,6 +17,55 @@ import { MkHoverCardElement } from '../components/hover-card/element';
|
|
|
17
17
|
import { MkInputOtpElement } from '../components/input-otp/element';
|
|
18
18
|
import { MkCalendarElement } from '../components/calendar/element';
|
|
19
19
|
import { MkSlotPickerElement } from '../components/slot-picker/element';
|
|
20
|
+
import { MkAttachmentElement } from '../components/attachment/element';
|
|
21
|
+
import { MkSkeletonElement } from '../components/skeleton/element';
|
|
22
|
+
import { MkQuestionnaireElement } from '../components/questionnaire/element';
|
|
23
|
+
import { MkCodeBlockElement } from '../components/code-block/element';
|
|
24
|
+
import { MkContextMenuElement } from '../components/context-menu/element';
|
|
25
|
+
import { MkDrawerElement } from '../components/drawer/element';
|
|
26
|
+
import { MkLinkPreviewElement } from '../components/link-preview/element';
|
|
27
|
+
import { MkProgressElement } from '../components/progress/element';
|
|
28
|
+
import { MkRangeSliderElement } from '../components/range-slider/element';
|
|
29
|
+
import { MkChartElement } from '../components/chart/element';
|
|
30
|
+
import { MkCreditCardElement } from '../components/credit-card/element';
|
|
31
|
+
import { MkCommandSearchElement } from '../components/command-search/element';
|
|
32
|
+
import { MkHoldConfirmElement } from '../components/hold-confirm/element';
|
|
33
|
+
import { MkImagePreviewElement } from '../components/image-preview/element';
|
|
34
|
+
import { MkLikeButtonElement } from '../components/like-button/element';
|
|
35
|
+
import { MkNotificationBellElement } from '../components/notification-bell/element';
|
|
36
|
+
import { MkPasswordStrengthElement } from '../components/password-strength/element';
|
|
37
|
+
import { MkScratchCardElement } from '../components/scratch-card/element';
|
|
38
|
+
import { MkStarRatingElement } from '../components/star-rating/element';
|
|
39
|
+
import { MkSwipeActionsElement } from '../components/swipe-actions/element';
|
|
40
|
+
import { MkColorSliderElement } from '../components/color-slider/element';
|
|
41
|
+
import { MkColorAreaElement } from '../components/color-area/element';
|
|
42
|
+
import { MkColorFieldElement } from '../components/color-field/element';
|
|
43
|
+
import { MkColorPickerElement } from '../components/color-picker/element';
|
|
44
|
+
import { MkTimeFieldElement } from '../components/time-field/element';
|
|
45
|
+
import { MkRangeCalendarElement } from '../components/range-calendar/element';
|
|
46
|
+
import { MkDateRangePickerElement } from '../components/date-range-picker/element';
|
|
47
|
+
import { MkTooltipElement } from '../components/tooltip/element';
|
|
48
|
+
import { MkPopoverElement } from '../components/popover/element';
|
|
49
|
+
import { MkLoadingButtonElement } from '../components/loading-button/element';
|
|
50
|
+
import { MkBreadcrumbElement } from '../components/breadcrumb/element';
|
|
51
|
+
import { MkEmptyStateElement } from '../components/empty-state/element';
|
|
52
|
+
import { MkStatCardElement } from '../components/stat-card/element';
|
|
53
|
+
import { MkChartTooltipElement } from '../components/chart-tooltip/element';
|
|
54
|
+
import { MkMultiSelectElement } from '../components/multi-select/element';
|
|
55
|
+
import { MkTagInputElement } from '../components/tag-input/element';
|
|
56
|
+
import { MkDateTimePickerElement } from '../components/date-time-picker/element';
|
|
57
|
+
import { MkFilterBuilderElement } from '../components/filter-builder/element';
|
|
58
|
+
import { MkTimelineElement } from '../components/timeline/element';
|
|
59
|
+
import { MkActivityFeedElement } from '../components/activity-feed/element';
|
|
60
|
+
import { MkTreeViewElement } from '../components/tree-view/element';
|
|
61
|
+
import { MkFileExplorerElement } from '../components/file-explorer/element';
|
|
62
|
+
import { MkJsonViewerElement } from '../components/json-viewer/element';
|
|
63
|
+
import { MkVirtualListElement } from '../components/virtual-list/element';
|
|
64
|
+
import { MkResizablePanelElement } from '../components/resizable-panel/element';
|
|
65
|
+
import { MkSplitViewElement } from '../components/split-view/element';
|
|
66
|
+
import { MkDataTableElement } from '../components/data-table/element';
|
|
67
|
+
import { MkEditableTableElement } from '../components/editable-table/element';
|
|
68
|
+
import { MkRichTextEditorElement } from '../components/rich-text-editor/element';
|
|
20
69
|
// new-component:imports (scripts/new-component.mjs inserts above this line)
|
|
21
70
|
|
|
22
71
|
export { MkElement, SafeHTMLElement, defineElement, type OptionType } from './base';
|
|
@@ -39,6 +88,55 @@ export { MkStudioDockElement, defineStudioDock } from '../components/studio-dock
|
|
|
39
88
|
export { MkTrailerElement, defineTrailer } from '../components/trailer/element';
|
|
40
89
|
export { MkCalendarElement } from '../components/calendar/element';
|
|
41
90
|
export { MkSlotPickerElement } from '../components/slot-picker/element';
|
|
91
|
+
export { MkAttachmentElement } from '../components/attachment/element';
|
|
92
|
+
export { MkSkeletonElement } from '../components/skeleton/element';
|
|
93
|
+
export { MkQuestionnaireElement } from '../components/questionnaire/element';
|
|
94
|
+
export { MkCodeBlockElement } from '../components/code-block/element';
|
|
95
|
+
export { MkContextMenuElement } from '../components/context-menu/element';
|
|
96
|
+
export { MkDrawerElement } from '../components/drawer/element';
|
|
97
|
+
export { MkLinkPreviewElement } from '../components/link-preview/element';
|
|
98
|
+
export { MkProgressElement } from '../components/progress/element';
|
|
99
|
+
export { MkRangeSliderElement } from '../components/range-slider/element';
|
|
100
|
+
export { MkChartElement } from '../components/chart/element';
|
|
101
|
+
export { MkCreditCardElement } from '../components/credit-card/element';
|
|
102
|
+
export { MkCommandSearchElement } from '../components/command-search/element';
|
|
103
|
+
export { MkHoldConfirmElement } from '../components/hold-confirm/element';
|
|
104
|
+
export { MkImagePreviewElement } from '../components/image-preview/element';
|
|
105
|
+
export { MkLikeButtonElement } from '../components/like-button/element';
|
|
106
|
+
export { MkNotificationBellElement } from '../components/notification-bell/element';
|
|
107
|
+
export { MkPasswordStrengthElement } from '../components/password-strength/element';
|
|
108
|
+
export { MkScratchCardElement } from '../components/scratch-card/element';
|
|
109
|
+
export { MkStarRatingElement } from '../components/star-rating/element';
|
|
110
|
+
export { MkSwipeActionsElement } from '../components/swipe-actions/element';
|
|
111
|
+
export { MkColorSliderElement } from '../components/color-slider/element';
|
|
112
|
+
export { MkColorAreaElement } from '../components/color-area/element';
|
|
113
|
+
export { MkColorFieldElement } from '../components/color-field/element';
|
|
114
|
+
export { MkColorPickerElement } from '../components/color-picker/element';
|
|
115
|
+
export { MkTimeFieldElement } from '../components/time-field/element';
|
|
116
|
+
export { MkRangeCalendarElement } from '../components/range-calendar/element';
|
|
117
|
+
export { MkDateRangePickerElement } from '../components/date-range-picker/element';
|
|
118
|
+
export { MkTooltipElement } from '../components/tooltip/element';
|
|
119
|
+
export { MkPopoverElement } from '../components/popover/element';
|
|
120
|
+
export { MkLoadingButtonElement } from '../components/loading-button/element';
|
|
121
|
+
export { MkBreadcrumbElement } from '../components/breadcrumb/element';
|
|
122
|
+
export { MkEmptyStateElement } from '../components/empty-state/element';
|
|
123
|
+
export { MkStatCardElement } from '../components/stat-card/element';
|
|
124
|
+
export { MkChartTooltipElement } from '../components/chart-tooltip/element';
|
|
125
|
+
export { MkMultiSelectElement } from '../components/multi-select/element';
|
|
126
|
+
export { MkTagInputElement } from '../components/tag-input/element';
|
|
127
|
+
export { MkDateTimePickerElement } from '../components/date-time-picker/element';
|
|
128
|
+
export { MkFilterBuilderElement } from '../components/filter-builder/element';
|
|
129
|
+
export { MkTimelineElement } from '../components/timeline/element';
|
|
130
|
+
export { MkActivityFeedElement } from '../components/activity-feed/element';
|
|
131
|
+
export { MkTreeViewElement } from '../components/tree-view/element';
|
|
132
|
+
export { MkFileExplorerElement } from '../components/file-explorer/element';
|
|
133
|
+
export { MkJsonViewerElement } from '../components/json-viewer/element';
|
|
134
|
+
export { MkVirtualListElement } from '../components/virtual-list/element';
|
|
135
|
+
export { MkResizablePanelElement } from '../components/resizable-panel/element';
|
|
136
|
+
export { MkSplitViewElement } from '../components/split-view/element';
|
|
137
|
+
export { MkDataTableElement } from '../components/data-table/element';
|
|
138
|
+
export { MkEditableTableElement } from '../components/editable-table/element';
|
|
139
|
+
export { MkRichTextEditorElement } from '../components/rich-text-editor/element';
|
|
42
140
|
// new-component:exports
|
|
43
141
|
|
|
44
142
|
/** Tag name → element class, for every component. */
|
|
@@ -61,6 +159,55 @@ export const ELEMENTS = {
|
|
|
61
159
|
'mk-trailer': MkTrailerElement,
|
|
62
160
|
'mk-calendar': MkCalendarElement,
|
|
63
161
|
'mk-slot-picker': MkSlotPickerElement,
|
|
162
|
+
'mk-attachment': MkAttachmentElement,
|
|
163
|
+
'mk-skeleton': MkSkeletonElement,
|
|
164
|
+
'mk-questionnaire': MkQuestionnaireElement,
|
|
165
|
+
'mk-code-block': MkCodeBlockElement,
|
|
166
|
+
'mk-context-menu': MkContextMenuElement,
|
|
167
|
+
'mk-drawer': MkDrawerElement,
|
|
168
|
+
'mk-link-preview': MkLinkPreviewElement,
|
|
169
|
+
'mk-progress': MkProgressElement,
|
|
170
|
+
'mk-range-slider': MkRangeSliderElement,
|
|
171
|
+
'mk-chart': MkChartElement,
|
|
172
|
+
'mk-credit-card': MkCreditCardElement,
|
|
173
|
+
'mk-command-search': MkCommandSearchElement,
|
|
174
|
+
'mk-hold-confirm': MkHoldConfirmElement,
|
|
175
|
+
'mk-image-preview': MkImagePreviewElement,
|
|
176
|
+
'mk-like-button': MkLikeButtonElement,
|
|
177
|
+
'mk-notification-bell': MkNotificationBellElement,
|
|
178
|
+
'mk-password-strength': MkPasswordStrengthElement,
|
|
179
|
+
'mk-scratch-card': MkScratchCardElement,
|
|
180
|
+
'mk-star-rating': MkStarRatingElement,
|
|
181
|
+
'mk-swipe-actions': MkSwipeActionsElement,
|
|
182
|
+
'mk-color-slider': MkColorSliderElement,
|
|
183
|
+
'mk-color-area': MkColorAreaElement,
|
|
184
|
+
'mk-color-field': MkColorFieldElement,
|
|
185
|
+
'mk-color-picker': MkColorPickerElement,
|
|
186
|
+
'mk-time-field': MkTimeFieldElement,
|
|
187
|
+
'mk-range-calendar': MkRangeCalendarElement,
|
|
188
|
+
'mk-date-range-picker': MkDateRangePickerElement,
|
|
189
|
+
'mk-tooltip': MkTooltipElement,
|
|
190
|
+
'mk-popover': MkPopoverElement,
|
|
191
|
+
'mk-loading-button': MkLoadingButtonElement,
|
|
192
|
+
'mk-breadcrumb': MkBreadcrumbElement,
|
|
193
|
+
'mk-empty-state': MkEmptyStateElement,
|
|
194
|
+
'mk-stat-card': MkStatCardElement,
|
|
195
|
+
'mk-chart-tooltip': MkChartTooltipElement,
|
|
196
|
+
'mk-multi-select': MkMultiSelectElement,
|
|
197
|
+
'mk-tag-input': MkTagInputElement,
|
|
198
|
+
'mk-date-time-picker': MkDateTimePickerElement,
|
|
199
|
+
'mk-filter-builder': MkFilterBuilderElement,
|
|
200
|
+
'mk-timeline': MkTimelineElement,
|
|
201
|
+
'mk-activity-feed': MkActivityFeedElement,
|
|
202
|
+
'mk-tree-view': MkTreeViewElement,
|
|
203
|
+
'mk-file-explorer': MkFileExplorerElement,
|
|
204
|
+
'mk-json-viewer': MkJsonViewerElement,
|
|
205
|
+
'mk-virtual-list': MkVirtualListElement,
|
|
206
|
+
'mk-resizable-panel': MkResizablePanelElement,
|
|
207
|
+
'mk-split-view': MkSplitViewElement,
|
|
208
|
+
'mk-data-table': MkDataTableElement,
|
|
209
|
+
'mk-editable-table': MkEditableTableElement,
|
|
210
|
+
'mk-rich-text-editor': MkRichTextEditorElement,
|
|
64
211
|
// new-component:entries
|
|
65
212
|
} as const;
|
|
66
213
|
|