@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,82 @@
|
|
|
1
|
+
/* components/color-area/color-area.css */
|
|
2
|
+
/* color-area — saturation (x) × brightness (y) at the current hue; 12 px corners; the thumb is a ringed circle that
|
|
3
|
+
grows when grabbed and pops a loupe. The thumb may stand half outside the square: leave room around it. */
|
|
4
|
+
.mk-color-area,
|
|
5
|
+
mk-color-area {
|
|
6
|
+
--mk-color-area-height: 11rem;
|
|
7
|
+
--mk-color-checker: repeating-conic-gradient(#d4d4d4 0 25%, #fff 0 50%) 0 0 / 10px 10px;
|
|
8
|
+
display: block;
|
|
9
|
+
position: relative;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:is(.mk-color-area, mk-color-area) [data-mk-color-area-surface] {
|
|
13
|
+
position: relative;
|
|
14
|
+
height: var(--mk-color-area-height);
|
|
15
|
+
border-radius: 12px;
|
|
16
|
+
background: var(--mk-color-area);
|
|
17
|
+
box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
|
|
18
|
+
cursor: crosshair;
|
|
19
|
+
touch-action: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:is(.mk-color-area, mk-color-area) [data-mk-color-thumb] {
|
|
23
|
+
position: absolute;
|
|
24
|
+
left: calc(clamp(0, var(--mk-color-x, 0), 1) * 100%);
|
|
25
|
+
top: calc(clamp(0, var(--mk-color-y, 0), 1) * 100%);
|
|
26
|
+
width: 1.5rem;
|
|
27
|
+
height: 1.5rem;
|
|
28
|
+
margin: -0.75rem 0 0 -0.75rem;
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
background: linear-gradient(var(--mk-color-thumb), var(--mk-color-thumb)), var(--mk-color-checker);
|
|
31
|
+
box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgb(0 0 0 / 0.14), 0 4px 12px rgb(0 0 0 / 0.3);
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:is(.mk-color-area, mk-color-area):has(input:focus-visible) [data-mk-color-thumb] {
|
|
36
|
+
box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--mk-accent), 0 4px 12px rgb(0 0 0 / 0.3);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:is(.mk-color-area, mk-color-area) [data-mk-color-loupe] {
|
|
40
|
+
position: absolute;
|
|
41
|
+
bottom: calc(100% + 10px);
|
|
42
|
+
left: 50%;
|
|
43
|
+
width: 2.75rem;
|
|
44
|
+
height: 2.75rem;
|
|
45
|
+
margin-left: -1.375rem;
|
|
46
|
+
border-radius: 50%;
|
|
47
|
+
background: linear-gradient(var(--mk-color-thumb), var(--mk-color-thumb)), var(--mk-color-checker);
|
|
48
|
+
box-shadow: 0 0 0 3px #fff, 0 8px 20px rgb(0 0 0 / 0.25);
|
|
49
|
+
opacity: 0;
|
|
50
|
+
transform-origin: 50% 100%;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Near the top edge the loupe flips below the thumb, so a panel or card that clips its content never cuts it. */
|
|
54
|
+
:is(.mk-color-area, mk-color-area)[data-mk-loupe-below] [data-mk-color-loupe] {
|
|
55
|
+
top: calc(100% + 10px);
|
|
56
|
+
bottom: auto;
|
|
57
|
+
transform-origin: 50% 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media (prefers-reduced-motion: reduce) {
|
|
61
|
+
:is(.mk-color-area, mk-color-area)[data-mk-grabbing] [data-mk-color-loupe] {
|
|
62
|
+
opacity: 1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:is(.mk-color-area, mk-color-area):has(input:disabled) [data-mk-color-area-surface] {
|
|
67
|
+
opacity: 0.45;
|
|
68
|
+
cursor: not-allowed;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* The two ranges stay readable to assistive tech but take no room (the per-component file does not need base.css). */
|
|
72
|
+
:is(.mk-color-area, mk-color-area) [data-mk-color-input] {
|
|
73
|
+
position: absolute;
|
|
74
|
+
width: 1px;
|
|
75
|
+
height: 1px;
|
|
76
|
+
margin: -1px;
|
|
77
|
+
padding: 0;
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
clip-path: inset(50%);
|
|
80
|
+
white-space: nowrap;
|
|
81
|
+
border: 0;
|
|
82
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* components/color-field/color-field.css */
|
|
2
|
+
/* color-field — a 12 px field on surface-3 with a colour swatch (8 px corners, checkerboard under translucent colours)
|
|
3
|
+
and a mono text input; focus draws a 3 px accent ring; an unparsed text dashes the swatch. */
|
|
4
|
+
.mk-color-field,
|
|
5
|
+
mk-color-field {
|
|
6
|
+
--mk-color-checker: repeating-conic-gradient(#d4d4d4 0 25%, #fff 0 50%) 0 0 / 8px 8px;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 0.6rem;
|
|
10
|
+
min-width: 0;
|
|
11
|
+
height: 2.75rem;
|
|
12
|
+
padding: 0 0.75rem 0 0.5rem;
|
|
13
|
+
border-radius: 12px;
|
|
14
|
+
background: var(--mk-surface-3);
|
|
15
|
+
color: var(--mk-text);
|
|
16
|
+
transition: box-shadow 0.2s ease;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:is(.mk-color-field, mk-color-field):focus-within {
|
|
20
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--mk-accent) 35%, transparent);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:is(.mk-color-field, mk-color-field) [data-mk-color-swatch] {
|
|
24
|
+
flex: none;
|
|
25
|
+
width: 1.75rem;
|
|
26
|
+
height: 1.75rem;
|
|
27
|
+
border-radius: 8px;
|
|
28
|
+
background: linear-gradient(var(--mk-color-swatch), var(--mk-color-swatch)), var(--mk-color-checker);
|
|
29
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mk-text) 22%, transparent);
|
|
30
|
+
transition: background 0.25s ease;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:is(.mk-color-field, mk-color-field)[data-mk-unparsed] [data-mk-color-swatch] {
|
|
34
|
+
outline: 2px dashed var(--mk-muted);
|
|
35
|
+
outline-offset: 2px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:is(.mk-color-field, mk-color-field) [data-mk-color-text] {
|
|
39
|
+
flex: 1;
|
|
40
|
+
min-width: 0;
|
|
41
|
+
border: 0;
|
|
42
|
+
background: transparent;
|
|
43
|
+
color: inherit;
|
|
44
|
+
font: 500 0.9375rem/1 var(--mk-font-mono, ui-monospace, monospace);
|
|
45
|
+
text-overflow: ellipsis;
|
|
46
|
+
outline: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:is(.mk-color-field, mk-color-field) [data-mk-color-status] {
|
|
50
|
+
position: absolute;
|
|
51
|
+
width: 1px;
|
|
52
|
+
height: 1px;
|
|
53
|
+
margin: -1px;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
clip-path: inset(50%);
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (prefers-reduced-motion: reduce) {
|
|
60
|
+
:is(.mk-color-field, mk-color-field) {
|
|
61
|
+
transition: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:is(.mk-color-field, mk-color-field) [data-mk-color-swatch] {
|
|
65
|
+
transition: none;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/* components/color-picker/color-picker.css */
|
|
2
|
+
/* color-picker — a swatch button (12 px, the hex beside it) that grows into a 20 px panel: area, hue, alpha, field,
|
|
3
|
+
eyedropper and 8 px preset swatches. Inline, the panel sits in place. Needs dialog.css for the popover, and the
|
|
4
|
+
color-area, color-slider and color-field stylesheets for its parts. */
|
|
5
|
+
.mk-color-picker,
|
|
6
|
+
mk-color-picker {
|
|
7
|
+
--mk-color-checker: repeating-conic-gradient(#d4d4d4 0 25%, #fff 0 50%) 0 0 / 8px 8px;
|
|
8
|
+
display: inline-block;
|
|
9
|
+
max-width: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:is(.mk-color-picker, mk-color-picker) [data-mk-color-trigger] {
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 0.6rem;
|
|
16
|
+
height: 2.75rem;
|
|
17
|
+
padding: 0 0.9rem 0 0.4rem;
|
|
18
|
+
border: 0;
|
|
19
|
+
border-radius: 12px;
|
|
20
|
+
background: var(--mk-surface-3);
|
|
21
|
+
color: var(--mk-text);
|
|
22
|
+
font: 500 0.9375rem/1 var(--mk-font-mono, ui-monospace, monospace);
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:is(.mk-color-picker, mk-color-picker) [data-mk-color-trigger]:focus-visible {
|
|
27
|
+
outline: 3px solid color-mix(in srgb, var(--mk-accent) 45%, transparent);
|
|
28
|
+
outline-offset: 2px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:is(.mk-color-picker, mk-color-picker) [data-mk-color-trigger]:disabled {
|
|
32
|
+
opacity: 0.5;
|
|
33
|
+
cursor: not-allowed;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:is(.mk-color-picker, mk-color-picker) [data-mk-color-trigger] [data-mk-color-swatch],
|
|
37
|
+
[data-mk-color-preset] {
|
|
38
|
+
border-radius: 8px;
|
|
39
|
+
background: linear-gradient(var(--mk-color-swatch), var(--mk-color-swatch)), var(--mk-color-checker, repeating-conic-gradient(#d4d4d4 0 25%, #fff 0 50%) 0 0 / 8px 8px);
|
|
40
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mk-text) 22%, transparent);
|
|
41
|
+
transition: background 0.25s ease;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:is(.mk-color-picker, mk-color-picker) [data-mk-color-trigger] [data-mk-color-swatch] {
|
|
45
|
+
width: 2rem;
|
|
46
|
+
height: 2rem;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Classes, not data attributes: the copy that folds back into the swatch on close keeps only the classes. */
|
|
50
|
+
.mk-dialog.mk-color-panel {
|
|
51
|
+
--mk-dialog-width: 18rem;
|
|
52
|
+
--mk-dialog-radius: 20px;
|
|
53
|
+
--mk-dialog-bg: var(--mk-surface-1);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[data-mk-color-panel-body] {
|
|
57
|
+
display: grid;
|
|
58
|
+
gap: 0.9rem;
|
|
59
|
+
padding: 0.9rem;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* The loupes pop above the area and the sliders: the panel leaves them room. */
|
|
63
|
+
.mk-dialog.mk-color-panel [data-mk-color-panel-body] {
|
|
64
|
+
padding-top: 1.1rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
:is(.mk-color-picker, mk-color-picker)[data-mk-inline] [data-mk-color-panel-body] {
|
|
68
|
+
width: min(18rem, 100%);
|
|
69
|
+
box-sizing: border-box;
|
|
70
|
+
border-radius: 20px;
|
|
71
|
+
background: var(--mk-surface-1);
|
|
72
|
+
box-shadow: inset 0 0 0 1px var(--mk-outline-soft, rgb(0 0 0 / 0.08));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
[data-mk-color-panel-body] .mk-color-slider {
|
|
76
|
+
grid-template-columns: minmax(0, 1fr);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[data-mk-color-row] {
|
|
80
|
+
display: flex;
|
|
81
|
+
gap: 0.5rem;
|
|
82
|
+
min-width: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
[data-mk-color-row] > .mk-color-field {
|
|
86
|
+
flex: 1;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
[data-mk-color-eyedropper] {
|
|
90
|
+
display: grid;
|
|
91
|
+
flex: none;
|
|
92
|
+
place-items: center;
|
|
93
|
+
width: 2.75rem;
|
|
94
|
+
height: 2.75rem;
|
|
95
|
+
border: 0;
|
|
96
|
+
border-radius: 12px;
|
|
97
|
+
background: var(--mk-surface-3);
|
|
98
|
+
color: var(--mk-text);
|
|
99
|
+
cursor: pointer;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
[data-mk-color-swatches] {
|
|
103
|
+
display: grid;
|
|
104
|
+
grid-template-columns: repeat(8, minmax(0, 1fr));
|
|
105
|
+
gap: 0.4rem;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[data-mk-color-preset] {
|
|
109
|
+
aspect-ratio: 1;
|
|
110
|
+
min-width: 0;
|
|
111
|
+
padding: 0;
|
|
112
|
+
border: 0;
|
|
113
|
+
cursor: pointer;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
[data-mk-color-preset][aria-pressed='true'] {
|
|
117
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mk-text) 22%, transparent), 0 0 0 2px var(--mk-surface-1), 0 0 0 4px var(--mk-text);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
[data-mk-color-preset]:focus-visible,
|
|
121
|
+
[data-mk-color-eyedropper]:focus-visible {
|
|
122
|
+
outline: 3px solid color-mix(in srgb, var(--mk-accent) 45%, transparent);
|
|
123
|
+
outline-offset: 2px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@media (prefers-reduced-motion: reduce) {
|
|
127
|
+
:is(.mk-color-picker, mk-color-picker) [data-mk-color-swatch],
|
|
128
|
+
[data-mk-color-preset] {
|
|
129
|
+
transition: none;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/* components/color-slider/color-slider.css */
|
|
2
|
+
/* color-slider — one colour channel: a pill track with the channel's gradient (alpha over a checkerboard) and a round
|
|
3
|
+
thumb filled with the colour; grabbing grows it and pops a loupe. The native range is a transparent hit area. */
|
|
4
|
+
.mk-color-slider,
|
|
5
|
+
mk-color-slider {
|
|
6
|
+
--mk-color-size: 1.75rem;
|
|
7
|
+
--mk-color-length: 12rem;
|
|
8
|
+
--mk-color-checker: repeating-conic-gradient(#d4d4d4 0 25%, #fff 0 50%) 0 0 / 10px 10px;
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: 0.75rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:is(.mk-color-slider, mk-color-slider) [data-mk-color-track] {
|
|
16
|
+
position: relative;
|
|
17
|
+
height: var(--mk-color-size);
|
|
18
|
+
border-radius: 999px;
|
|
19
|
+
background: var(--mk-color-track), var(--mk-color-checker);
|
|
20
|
+
box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:is(.mk-color-slider, mk-color-slider) [data-mk-color-input] {
|
|
24
|
+
position: absolute;
|
|
25
|
+
inset: 0;
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 100%;
|
|
28
|
+
margin: 0;
|
|
29
|
+
opacity: 0;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:is(.mk-color-slider, mk-color-slider) [data-mk-color-thumb] {
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 50%;
|
|
36
|
+
left: calc(clamp(0, var(--mk-color-pos, 0), 1) * (100% - var(--mk-color-size)));
|
|
37
|
+
width: var(--mk-color-size);
|
|
38
|
+
height: var(--mk-color-size);
|
|
39
|
+
margin-top: calc(var(--mk-color-size) / -2);
|
|
40
|
+
border-radius: 50%;
|
|
41
|
+
background: linear-gradient(var(--mk-color-thumb), var(--mk-color-thumb)), var(--mk-color-checker);
|
|
42
|
+
box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgb(0 0 0 / 0.14), 0 4px 12px rgb(0 0 0 / 0.25);
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:is(.mk-color-slider, mk-color-slider) [data-mk-color-track]:has(input:focus-visible) [data-mk-color-thumb] {
|
|
47
|
+
box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--mk-accent), 0 4px 12px rgb(0 0 0 / 0.25);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:is(.mk-color-slider, mk-color-slider) [data-mk-color-loupe] {
|
|
51
|
+
position: absolute;
|
|
52
|
+
bottom: calc(100% + 10px);
|
|
53
|
+
left: 50%;
|
|
54
|
+
width: 2.75rem;
|
|
55
|
+
height: 2.75rem;
|
|
56
|
+
margin-left: -1.375rem;
|
|
57
|
+
border-radius: 50%;
|
|
58
|
+
background: linear-gradient(var(--mk-color-thumb), var(--mk-color-thumb)), var(--mk-color-checker);
|
|
59
|
+
box-shadow: 0 0 0 3px #fff, 0 8px 20px rgb(0 0 0 / 0.25);
|
|
60
|
+
opacity: 0;
|
|
61
|
+
transform-origin: 50% 100%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Reduced motion: GSAP does not run, the attribute shows the loupe. */
|
|
65
|
+
@media (prefers-reduced-motion: reduce) {
|
|
66
|
+
:is(.mk-color-slider, mk-color-slider)[data-mk-grabbing] [data-mk-color-loupe] {
|
|
67
|
+
opacity: 1;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:is(.mk-color-slider, mk-color-slider) [data-mk-color-output] {
|
|
72
|
+
min-width: 3.5ch;
|
|
73
|
+
color: var(--mk-muted);
|
|
74
|
+
font-size: 0.8125rem;
|
|
75
|
+
font-variant-numeric: tabular-nums;
|
|
76
|
+
text-align: end;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:is(.mk-color-slider, mk-color-slider) [data-mk-color-track]:has(input:disabled) {
|
|
80
|
+
opacity: 0.45;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Vertical: the track stands up, bottom is the minimum, the loupe sits on the left. */
|
|
84
|
+
:is(.mk-color-slider, mk-color-slider)[data-mk-orientation='vertical'] {
|
|
85
|
+
grid-template-columns: auto;
|
|
86
|
+
justify-items: center;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
:is(.mk-color-slider, mk-color-slider)[data-mk-orientation='vertical'] [data-mk-color-track] {
|
|
90
|
+
width: var(--mk-color-size);
|
|
91
|
+
height: var(--mk-color-length);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
:is(.mk-color-slider, mk-color-slider)[data-mk-orientation='vertical'] [data-mk-color-input] {
|
|
95
|
+
writing-mode: vertical-lr;
|
|
96
|
+
direction: rtl;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:is(.mk-color-slider, mk-color-slider)[data-mk-orientation='vertical'] [data-mk-color-thumb] {
|
|
100
|
+
top: auto;
|
|
101
|
+
bottom: calc(clamp(0, var(--mk-color-pos, 0), 1) * (100% - var(--mk-color-size)));
|
|
102
|
+
left: 0;
|
|
103
|
+
margin-top: 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:is(.mk-color-slider, mk-color-slider)[data-mk-orientation='vertical'] [data-mk-color-loupe] {
|
|
107
|
+
top: 50%;
|
|
108
|
+
right: calc(100% + 10px);
|
|
109
|
+
bottom: auto;
|
|
110
|
+
left: auto;
|
|
111
|
+
margin: -1.375rem 0 0;
|
|
112
|
+
transform-origin: 100% 50%;
|
|
113
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/* components/command-search/command-search.css */
|
|
2
|
+
/* command-search — a dark command palette (Melonmind's glass, near black in both modes): a search field, grouped
|
|
3
|
+
results with marked letters, a pill gliding under the active one and a footer with the keys. */
|
|
4
|
+
.mk-command-search,
|
|
5
|
+
mk-command-search {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
[data-mk-command] {
|
|
10
|
+
--mk-command-bg: rgb(14 15 17 / 0.92);
|
|
11
|
+
--mk-command-text: #eceef1;
|
|
12
|
+
--mk-command-muted: #8b919b;
|
|
13
|
+
--mk-command-line: rgb(255 255 255 / 0.07);
|
|
14
|
+
--mk-command-pill: rgb(255 255 255 / 0.08);
|
|
15
|
+
--mk-command-mark: #f5d76e;
|
|
16
|
+
width: min(32rem, calc(100vw - 2rem));
|
|
17
|
+
max-height: min(28rem, calc(100dvh - 4rem));
|
|
18
|
+
margin: 12vh auto auto;
|
|
19
|
+
padding: 0;
|
|
20
|
+
overflow: visible;
|
|
21
|
+
border: 0;
|
|
22
|
+
background: transparent;
|
|
23
|
+
color: var(--mk-command-text);
|
|
24
|
+
font-family: var(--mk-font);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
[data-mk-command]::backdrop {
|
|
28
|
+
background: color-mix(in srgb, var(--mk-scrim, #000) 28%, transparent);
|
|
29
|
+
backdrop-filter: blur(3px);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[data-mk-command][open] {
|
|
33
|
+
display: block;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-mk-command] [data-mk-command-panel] {
|
|
37
|
+
position: relative;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
max-height: inherit;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
border-radius: 24px;
|
|
43
|
+
background: var(--mk-command-bg);
|
|
44
|
+
box-shadow:
|
|
45
|
+
inset 1px 1px 1px rgb(255 255 255 / 0.08),
|
|
46
|
+
inset -1px -1px 1px rgb(255 255 255 / 0.04),
|
|
47
|
+
0 30px 60px -20px rgb(0 0 0 / 0.6);
|
|
48
|
+
backdrop-filter: blur(24px);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[data-mk-command] [data-mk-command-field] {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: 0.6rem;
|
|
55
|
+
margin: 0.6rem;
|
|
56
|
+
padding: 0 0.85rem;
|
|
57
|
+
border-radius: 14px;
|
|
58
|
+
background: rgb(255 255 255 / 0.05);
|
|
59
|
+
box-shadow: inset 0 0 0 1px var(--mk-command-line);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
[data-mk-command] [data-mk-command-icon] {
|
|
63
|
+
display: grid;
|
|
64
|
+
color: var(--mk-command-muted);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
[data-mk-command] input {
|
|
68
|
+
flex: 1;
|
|
69
|
+
min-width: 0;
|
|
70
|
+
min-height: 2.75rem;
|
|
71
|
+
border: 0;
|
|
72
|
+
outline: none;
|
|
73
|
+
background: transparent;
|
|
74
|
+
color: var(--mk-command-text);
|
|
75
|
+
font: inherit;
|
|
76
|
+
font-size: 1rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[data-mk-command] input::placeholder {
|
|
80
|
+
color: var(--mk-command-muted);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
[data-mk-command] [data-mk-command-scroll] {
|
|
84
|
+
position: relative;
|
|
85
|
+
flex: 1;
|
|
86
|
+
min-height: 0;
|
|
87
|
+
overflow-y: auto;
|
|
88
|
+
padding: 0 0.6rem 0.6rem;
|
|
89
|
+
overscroll-behavior: contain;
|
|
90
|
+
scrollbar-width: thin;
|
|
91
|
+
scrollbar-color: rgb(255 255 255 / 0.15) transparent;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
[data-mk-command] [data-mk-command-pill] {
|
|
95
|
+
position: absolute;
|
|
96
|
+
top: 0;
|
|
97
|
+
left: 0;
|
|
98
|
+
border-radius: 12px;
|
|
99
|
+
background: var(--mk-command-pill);
|
|
100
|
+
pointer-events: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[data-mk-command] [data-mk-command-list] {
|
|
104
|
+
position: relative;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
[data-mk-command] [data-mk-command-group-label] {
|
|
108
|
+
padding: 0.75rem 0.65rem 0.35rem;
|
|
109
|
+
color: var(--mk-command-muted);
|
|
110
|
+
font-size: 0.75rem;
|
|
111
|
+
font-weight: 500;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
[data-mk-command] [data-mk-command-item] {
|
|
115
|
+
display: flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
gap: 0.6rem;
|
|
118
|
+
min-height: 2.5rem;
|
|
119
|
+
padding: 0 0.65rem;
|
|
120
|
+
border-radius: 12px;
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
[data-mk-command] [data-mk-command-arrow] {
|
|
125
|
+
width: 1rem;
|
|
126
|
+
color: var(--mk-command-muted);
|
|
127
|
+
text-align: center;
|
|
128
|
+
transition: translate 0.3s cubic-bezier(0.38, 0.49, 0, 2);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
[data-mk-command] [data-mk-command-item][aria-selected='true'] [data-mk-command-arrow] {
|
|
132
|
+
color: var(--mk-command-text);
|
|
133
|
+
translate: 2px 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
[data-mk-command] [data-mk-command-label] {
|
|
137
|
+
flex: 1;
|
|
138
|
+
min-width: 0;
|
|
139
|
+
overflow: hidden;
|
|
140
|
+
font-size: 0.9375rem;
|
|
141
|
+
text-overflow: ellipsis;
|
|
142
|
+
white-space: nowrap;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
[data-mk-command] mark {
|
|
146
|
+
border-radius: 3px;
|
|
147
|
+
background: rgb(245 215 110 / 0.16);
|
|
148
|
+
color: var(--mk-command-mark);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
[data-mk-command] [data-mk-command-hint] {
|
|
152
|
+
color: var(--mk-command-muted);
|
|
153
|
+
font-size: 0.75rem;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
[data-mk-command] [data-mk-command-empty] {
|
|
157
|
+
margin: 0;
|
|
158
|
+
padding: 2rem 1rem;
|
|
159
|
+
color: var(--mk-command-muted);
|
|
160
|
+
text-align: center;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
[data-mk-command] [data-mk-command-empty][hidden] {
|
|
164
|
+
display: none;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
[data-mk-command] [data-mk-command-footer] {
|
|
168
|
+
display: flex;
|
|
169
|
+
align-items: center;
|
|
170
|
+
gap: 0.4rem;
|
|
171
|
+
padding: 0.6rem 0.9rem;
|
|
172
|
+
border-top: 1px solid var(--mk-command-line);
|
|
173
|
+
color: var(--mk-command-muted);
|
|
174
|
+
font-size: 0.75rem;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
[data-mk-command] [data-mk-command-footer] span {
|
|
178
|
+
margin-right: 0.6rem;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
[data-mk-command] kbd {
|
|
182
|
+
display: inline-grid;
|
|
183
|
+
place-items: center;
|
|
184
|
+
min-width: 1.5rem;
|
|
185
|
+
height: 1.5rem;
|
|
186
|
+
padding: 0 0.3rem;
|
|
187
|
+
border-radius: 6px;
|
|
188
|
+
background: rgb(255 255 255 / 0.07);
|
|
189
|
+
box-shadow: inset 0 -1px 0 rgb(255 255 255 / 0.06);
|
|
190
|
+
color: var(--mk-command-text);
|
|
191
|
+
font-family: inherit;
|
|
192
|
+
font-size: 0.75rem;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* The trigger (optional): a search pill with the shortcut. */
|
|
196
|
+
[data-mk-command-open] {
|
|
197
|
+
display: inline-flex;
|
|
198
|
+
align-items: center;
|
|
199
|
+
gap: 0.6rem;
|
|
200
|
+
min-height: 2.75rem;
|
|
201
|
+
padding: 0 0.6rem 0 1rem;
|
|
202
|
+
border: 0;
|
|
203
|
+
border-radius: 64px;
|
|
204
|
+
background: var(--mk-surface-3);
|
|
205
|
+
color: var(--mk-muted);
|
|
206
|
+
font: inherit;
|
|
207
|
+
cursor: pointer;
|
|
208
|
+
transition: background-color 0.2s ease;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
[data-mk-command-open]:hover {
|
|
212
|
+
background: var(--mk-surface-4);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
[data-mk-command-open]:focus-visible {
|
|
216
|
+
outline: 2px solid var(--mk-accent);
|
|
217
|
+
outline-offset: 3px;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
[data-mk-command-open] kbd {
|
|
221
|
+
padding: 0.15rem 0.45rem;
|
|
222
|
+
border-radius: 8px;
|
|
223
|
+
background: var(--mk-surface-1);
|
|
224
|
+
color: var(--mk-text);
|
|
225
|
+
font-family: inherit;
|
|
226
|
+
font-size: 0.75rem;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@media (max-width: 520px) {
|
|
230
|
+
[data-mk-command] {
|
|
231
|
+
margin-top: 1rem;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
[data-mk-command] [data-mk-command-footer] {
|
|
235
|
+
display: none;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* Container transform (motion/morph.ts): the trigger's look covers the panel and fades into it; the trigger hides meanwhile. */
|
|
240
|
+
[data-mk-command] .mk-morph-face {
|
|
241
|
+
position: absolute;
|
|
242
|
+
inset: 0;
|
|
243
|
+
z-index: 2147483647;
|
|
244
|
+
border-radius: inherit;
|
|
245
|
+
pointer-events: none;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
:is(.mk-command-search, mk-command-search) [data-mk-morph-origin] {
|
|
249
|
+
opacity: 0 !important;
|
|
250
|
+
transition: opacity 80ms ease !important;
|
|
251
|
+
pointer-events: none;
|
|
252
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* components/context-menu/context-menu.css */
|
|
2
|
+
/* context-menu — the area that answers a right click; its menu is .mk-menu, placed at the pointer. */
|
|
3
|
+
mk-context-menu {
|
|
4
|
+
display: block;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.mk-context-menu,
|
|
8
|
+
mk-context-menu {
|
|
9
|
+
-webkit-touch-callout: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:is(.mk-context-menu, mk-context-menu):focus-visible,
|
|
13
|
+
:is(.mk-context-menu, mk-context-menu) [data-mk-context-trigger]:focus-visible {
|
|
14
|
+
outline: 2px solid var(--mk-accent);
|
|
15
|
+
outline-offset: 3px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* The area pressed while its menu is open. */
|
|
19
|
+
:is(.mk-context-menu, mk-context-menu)[aria-expanded='true'],
|
|
20
|
+
:is(.mk-context-menu, mk-context-menu) [data-mk-context-trigger][aria-expanded='true'] {
|
|
21
|
+
outline: 2px solid color-mix(in srgb, var(--mk-accent) 45%, transparent);
|
|
22
|
+
outline-offset: 3px;
|
|
23
|
+
}
|