@yewdiel21/motion-kit 0.9.1 → 0.10.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 +93 -83
- package/dist/auto/index.d.ts +22 -3
- package/dist/auto/index.js +41 -3
- package/dist/auto/index.js.map +1 -1
- package/dist/{chunk-BFC27F2G.js → chunk-IKQ5FODN.js} +2 -2
- package/dist/{chunk-JQMJQSXD.js → chunk-TFNRIZHU.js} +1614 -11
- package/dist/chunk-TFNRIZHU.js.map +1 -0
- package/dist/{chunk-XDWBVFHQ.js → chunk-XAKC2QY7.js} +1202 -3
- package/dist/chunk-XAKC2QY7.js.map +1 -0
- package/dist/css/components/calendar.css +159 -0
- package/dist/css/components/hover-card.css +14 -0
- package/dist/css/components/input-otp.css +10 -0
- package/dist/css/components/pagination.css +11 -0
- package/dist/css/components/quantity.css +16 -0
- package/dist/css/components/slot-picker.css +126 -0
- package/dist/css/components/studio-dock.css +35 -0
- package/dist/css/components/trailer.css +37 -0
- package/dist/css/controls.css +65 -0
- package/dist/elements/index.d.ts +72 -4
- package/dist/elements/index.js +170 -4
- package/dist/elements/index.js.map +1 -1
- package/dist/index.css +1017 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +45 -3
- package/dist/index.js.map +1 -1
- package/dist/react/index.d.ts +105 -6
- package/dist/react/index.js +350 -3
- package/dist/react/index.js.map +1 -1
- package/dist/{reduced-B98f8LPs.d.ts → reduced-BmBzKH94.d.ts} +199 -2
- package/dist/{reveal-C0hCDcB_.d.ts → reveal-jsX-uwUz.d.ts} +211 -1
- package/dist/{store-pHiUvxP8.d.ts → store-DYb3tTsZ.d.ts} +1 -1
- package/package.json +1 -1
- package/registry.json +178 -104
- package/skills/motion-kit/SKILL.md +209 -189
- package/src/auto/auto-init.ts +38 -0
- package/src/components/calendar/README.md +82 -0
- package/src/components/calendar/calendar.css +158 -0
- package/src/components/calendar/element.ts +27 -0
- package/src/components/calendar/engine.ts +412 -0
- package/src/components/calendar/react.tsx +69 -0
- package/src/components/hover-card/README.md +16 -0
- package/src/components/hover-card/element.ts +8 -0
- package/src/components/hover-card/engine.ts +69 -0
- package/src/components/hover-card/hover-card.css +13 -0
- package/src/components/hover-card/react.tsx +19 -0
- package/src/components/input-otp/README.md +18 -0
- package/src/components/input-otp/element.ts +14 -0
- package/src/components/input-otp/engine.ts +106 -0
- package/src/components/input-otp/input-otp.css +9 -0
- package/src/components/input-otp/react.tsx +21 -0
- package/src/components/pagination/README.md +17 -0
- package/src/components/pagination/element.ts +14 -0
- package/src/components/pagination/engine.ts +102 -0
- package/src/components/pagination/pagination.css +10 -0
- package/src/components/pagination/react.tsx +22 -0
- package/src/components/quantity/README.md +20 -0
- package/src/components/quantity/element.ts +14 -0
- package/src/components/quantity/engine.ts +85 -0
- package/src/components/quantity/quantity.css +15 -0
- package/src/components/quantity/react.tsx +21 -0
- package/src/components/slot-picker/README.md +68 -0
- package/src/components/slot-picker/element.ts +27 -0
- package/src/components/slot-picker/engine.ts +412 -0
- package/src/components/slot-picker/react.tsx +76 -0
- package/src/components/slot-picker/slot-picker.css +125 -0
- package/src/components/studio-dock/README.md +44 -0
- package/src/components/studio-dock/element.ts +11 -0
- package/src/components/studio-dock/engine.ts +212 -0
- package/src/components/studio-dock/react.tsx +23 -0
- package/src/components/studio-dock/studio-dock.css +34 -0
- package/src/components/trailer/README.md +28 -0
- package/src/components/trailer/element.ts +13 -0
- package/src/components/trailer/engine.ts +189 -0
- package/src/components/trailer/react.tsx +16 -0
- package/src/components/trailer/trailer.css +36 -0
- package/src/core/dates.ts +98 -0
- package/src/css/controls/README.md +14 -0
- package/src/css/controls/status.css +63 -0
- package/src/elements/index.ts +24 -0
- package/src/index.ts +25 -0
- package/src/react/index.ts +21 -0
- package/src/react/use-action-button.ts +6 -0
- package/src/react/use-editorial-reveal.ts +7 -0
- package/src/react/use-film-hero.ts +6 -0
- package/src/react/use-font-cycle.ts +7 -0
- package/src/react/use-image-zoom.ts +5 -0
- package/src/react/use-joined-cta.ts +5 -0
- package/src/react/use-local-clock.ts +5 -0
- package/src/react/use-scroll-dock.ts +5 -0
- package/src/react/use-sticker.ts +5 -0
- package/src/react/use-studio-dock.ts +8 -0
- package/src/react/use-thumbnail-nav.ts +7 -0
- package/src/react/use-trailer.ts +6 -0
- package/src/react/use-weight-hover.ts +5 -0
- package/src/recipes/action-button/README.md +31 -0
- package/src/recipes/action-button/action-button.css +113 -0
- package/src/recipes/action-button/create-action-button.ts +56 -0
- package/src/recipes/editorial-reveal/README.md +35 -0
- package/src/recipes/editorial-reveal/create-editorial-reveal.ts +91 -0
- package/src/recipes/editorial-reveal/editorial-reveal.css +17 -0
- package/src/recipes/film-hero/README.md +23 -0
- package/src/recipes/film-hero/create-film-hero.ts +65 -0
- package/src/recipes/film-hero/film-hero.css +29 -0
- package/src/recipes/font-cycle/README.md +11 -0
- package/src/recipes/font-cycle/create-font-cycle.ts +126 -0
- package/src/recipes/font-cycle/font-cycle.css +36 -0
- package/src/recipes/image-zoom/README.md +16 -0
- package/src/recipes/image-zoom/create-image-zoom.ts +27 -0
- package/src/recipes/image-zoom/image-zoom.css +7 -0
- package/src/recipes/joined-cta/README.md +13 -0
- package/src/recipes/joined-cta/create-joined-cta.ts +22 -0
- package/src/recipes/joined-cta/joined-cta.css +17 -0
- package/src/recipes/local-clock/README.md +31 -0
- package/src/recipes/local-clock/create-local-clock.ts +61 -0
- package/src/recipes/scroll-dock/README.md +46 -0
- package/src/recipes/scroll-dock/create-scroll-dock.ts +72 -0
- package/src/recipes/scroll-dock/scroll-dock.css +70 -0
- package/src/recipes/sticker/README.md +59 -0
- package/src/recipes/sticker/create-sticker.ts +490 -0
- package/src/recipes/sticker/sticker.css +112 -0
- package/src/recipes/thumbnail-nav/README.md +16 -0
- package/src/recipes/thumbnail-nav/create-thumbnail-nav.ts +165 -0
- package/src/recipes/thumbnail-nav/thumbnail-nav.css +108 -0
- package/src/recipes/weight-hover/README.md +37 -0
- package/src/recipes/weight-hover/create-weight-hover.ts +136 -0
- package/src/recipes/weight-hover/weight-hover.css +7 -0
- package/dist/chunk-JQMJQSXD.js.map +0 -1
- package/dist/chunk-XDWBVFHQ.js.map +0 -1
- /package/dist/{chunk-BFC27F2G.js.map → chunk-IKQ5FODN.js.map} +0 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/* components/calendar/calendar.css */
|
|
2
|
+
/* calendar — Melon Mind's month/week grid on the --mk-* tokens; parts are .mk-calendar__*. */
|
|
3
|
+
.mk-calendar,
|
|
4
|
+
mk-calendar {
|
|
5
|
+
--mk-calendar-gap: 6px;
|
|
6
|
+
--mk-calendar-radius: var(--mk-radius-lg);
|
|
7
|
+
--mk-calendar-day-height: 112px;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: var(--mk-space-3);
|
|
11
|
+
color: var(--mk-text);
|
|
12
|
+
}
|
|
13
|
+
.mk-calendar__header {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-wrap: wrap;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: var(--mk-space-2);
|
|
18
|
+
}
|
|
19
|
+
.mk-calendar__title { margin: 0 auto 0 0; font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 400; letter-spacing: -0.01em; }
|
|
20
|
+
.mk-calendar__views { display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--mk-radius-full); background: var(--mk-surface-3); }
|
|
21
|
+
.mk-calendar__views button,
|
|
22
|
+
.mk-calendar__nav {
|
|
23
|
+
display: inline-grid;
|
|
24
|
+
place-items: center;
|
|
25
|
+
min-width: 44px;
|
|
26
|
+
height: 44px;
|
|
27
|
+
padding: 0 12px;
|
|
28
|
+
border: 0;
|
|
29
|
+
border-radius: var(--mk-radius-full);
|
|
30
|
+
background: transparent;
|
|
31
|
+
color: var(--mk-muted);
|
|
32
|
+
font: inherit;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
transition: background 0.2s, color 0.2s, transform 0.3s var(--mk-ease-nav-move);
|
|
35
|
+
}
|
|
36
|
+
.mk-calendar__views button[aria-pressed='true'] { background: var(--mk-surface-5); color: var(--mk-text); }
|
|
37
|
+
.mk-calendar__nav { background: var(--mk-surface-3); color: var(--mk-text); }
|
|
38
|
+
.mk-calendar__nav:active { transform: scale(0.92); }
|
|
39
|
+
:is(.mk-calendar__views button, .mk-calendar__nav):focus-visible { outline: 2px solid var(--mk-accent); outline-offset: 2px; }
|
|
40
|
+
|
|
41
|
+
[data-mk-calendar-grid] { position: relative; display: flex; flex-direction: column; gap: var(--mk-calendar-gap); }
|
|
42
|
+
.mk-calendar__head,
|
|
43
|
+
.mk-calendar__week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--mk-calendar-gap); }
|
|
44
|
+
.mk-calendar__body { display: flex; flex-direction: column; gap: var(--mk-calendar-gap); }
|
|
45
|
+
.mk-calendar__body--leaving { position: absolute; left: 0; right: 0; pointer-events: none; }
|
|
46
|
+
.mk-calendar__weekday {
|
|
47
|
+
padding: 8px 4px;
|
|
48
|
+
border-radius: var(--mk-radius-md);
|
|
49
|
+
background: var(--mk-surface-2);
|
|
50
|
+
text-align: center;
|
|
51
|
+
font-size: 0.95rem;
|
|
52
|
+
}
|
|
53
|
+
.mk-calendar__weekday-narrow { display: none; }
|
|
54
|
+
|
|
55
|
+
.mk-calendar__day {
|
|
56
|
+
position: relative;
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
gap: 4px;
|
|
60
|
+
min-width: 0;
|
|
61
|
+
min-height: var(--mk-calendar-day-height);
|
|
62
|
+
padding: 6px;
|
|
63
|
+
border-radius: var(--mk-calendar-radius);
|
|
64
|
+
background: var(--mk-surface-3);
|
|
65
|
+
transition: background 0.3s, box-shadow 0.3s;
|
|
66
|
+
container-type: inline-size;
|
|
67
|
+
}
|
|
68
|
+
.mk-calendar__body[data-view='week'] .mk-calendar__day { min-height: calc(var(--mk-calendar-day-height) * 3); }
|
|
69
|
+
.mk-calendar__day[data-outside] { background: var(--mk-surface-1); color: var(--mk-muted); }
|
|
70
|
+
.mk-calendar__day:hover { background: var(--mk-surface-4); }
|
|
71
|
+
.mk-calendar__day[aria-selected='true'] { box-shadow: inset 0 0 0 2px var(--mk-accent); }
|
|
72
|
+
.mk-calendar__number {
|
|
73
|
+
align-self: flex-end;
|
|
74
|
+
min-width: 2.2rem;
|
|
75
|
+
height: 2.2rem;
|
|
76
|
+
padding: 0 0.4rem;
|
|
77
|
+
border: 0;
|
|
78
|
+
border-radius: var(--mk-radius-full);
|
|
79
|
+
background: transparent;
|
|
80
|
+
color: inherit;
|
|
81
|
+
font: inherit;
|
|
82
|
+
font-size: 1.15rem;
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
transition: background 0.3s, color 0.3s, border-radius 0.3s var(--mk-ease-nav-radius), transform 0.3s var(--mk-ease-nav-radius);
|
|
85
|
+
}
|
|
86
|
+
.mk-calendar__number:hover { background: var(--mk-surface-5); }
|
|
87
|
+
.mk-calendar__number:active { transform: scale(0.9); }
|
|
88
|
+
.mk-calendar__number:focus-visible { outline: 2px solid var(--mk-accent); outline-offset: 2px; }
|
|
89
|
+
.mk-calendar__day[data-today] .mk-calendar__number { background: var(--mk-accent); color: var(--mk-on-accent); }
|
|
90
|
+
|
|
91
|
+
.mk-calendar__events { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
|
|
92
|
+
.mk-calendar__event,
|
|
93
|
+
.mk-calendar__more {
|
|
94
|
+
--mk-calendar-event-color: var(--mk-accent);
|
|
95
|
+
display: flex;
|
|
96
|
+
align-items: center;
|
|
97
|
+
gap: 6px;
|
|
98
|
+
width: 100%;
|
|
99
|
+
min-width: 0;
|
|
100
|
+
padding: 5px 8px;
|
|
101
|
+
border: 0;
|
|
102
|
+
border-radius: 10px;
|
|
103
|
+
background: var(--mk-surface-4);
|
|
104
|
+
color: var(--mk-text);
|
|
105
|
+
font: inherit;
|
|
106
|
+
font-size: 0.85rem;
|
|
107
|
+
text-align: left;
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
transition: background 0.2s, transform 0.3s var(--mk-ease-nav-move);
|
|
110
|
+
}
|
|
111
|
+
.mk-calendar__event[data-state='pending'] {
|
|
112
|
+
background: color-mix(in srgb, var(--mk-calendar-event-color) 30%, var(--mk-surface-3));
|
|
113
|
+
}
|
|
114
|
+
.mk-calendar__event:hover,
|
|
115
|
+
.mk-calendar__more:hover { transform: translateY(-1px); background: var(--mk-surface-5); }
|
|
116
|
+
.mk-calendar__event:focus-visible,
|
|
117
|
+
.mk-calendar__more:focus-visible { outline: 2px solid var(--mk-accent); outline-offset: 1px; }
|
|
118
|
+
.mk-calendar__status {
|
|
119
|
+
flex: none;
|
|
120
|
+
width: 0.8rem;
|
|
121
|
+
height: 0.8rem;
|
|
122
|
+
border: 2px solid currentColor;
|
|
123
|
+
border-radius: 50%;
|
|
124
|
+
}
|
|
125
|
+
.mk-calendar__event[data-state='done'] .mk-calendar__status { background: currentColor; box-shadow: inset 0 0 0 2px var(--mk-surface-4); }
|
|
126
|
+
.mk-calendar__event[data-state='cancelled'] .mk-calendar__event-title { text-decoration: line-through; opacity: 0.6; }
|
|
127
|
+
.mk-calendar__event-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
128
|
+
.mk-calendar__event-time { flex: none; font-variant-numeric: tabular-nums; opacity: 0.85; }
|
|
129
|
+
.mk-calendar__more { justify-content: center; background: transparent; color: var(--mk-muted); }
|
|
130
|
+
|
|
131
|
+
/* Narrow day cells: the month keeps the title (the time stays in the label); the week stacks the time under it. */
|
|
132
|
+
@container (max-width: 150px) {
|
|
133
|
+
.mk-calendar__body[data-view='month'] .mk-calendar__event-time { display: none; }
|
|
134
|
+
.mk-calendar__body[data-view='week'] .mk-calendar__event { flex-wrap: wrap; column-gap: 5px; row-gap: 1px; }
|
|
135
|
+
.mk-calendar__body[data-view='week'] .mk-calendar__event-title { flex: 1 1 0; }
|
|
136
|
+
.mk-calendar__body[data-view='week'] .mk-calendar__event-time { flex-basis: 100%; padding-left: calc(0.8rem + 5px); font-size: 0.72rem; }
|
|
137
|
+
}
|
|
138
|
+
@media (max-width: 680px) {
|
|
139
|
+
.mk-calendar,
|
|
140
|
+
mk-calendar { --mk-calendar-day-height: 64px; --mk-calendar-gap: 4px; --mk-calendar-radius: var(--mk-radius-sm); }
|
|
141
|
+
.mk-calendar__weekday-long { display: none; }
|
|
142
|
+
.mk-calendar__weekday-narrow { display: inline; }
|
|
143
|
+
.mk-calendar__number { align-self: center; font-size: 0.95rem; }
|
|
144
|
+
.mk-calendar__body[data-view='month'] .mk-calendar__events { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 3px; }
|
|
145
|
+
.mk-calendar__body[data-view='month'] :is(.mk-calendar__event, .mk-calendar__more) {
|
|
146
|
+
width: 7px;
|
|
147
|
+
height: 7px;
|
|
148
|
+
padding: 0;
|
|
149
|
+
border-radius: 50%;
|
|
150
|
+
background: var(--mk-calendar-event-color);
|
|
151
|
+
font-size: 0;
|
|
152
|
+
}
|
|
153
|
+
.mk-calendar__body[data-view='month'] .mk-calendar__status { display: none; }
|
|
154
|
+
.mk-calendar__body[data-view='week'] .mk-calendar__event-time { display: none; }
|
|
155
|
+
}
|
|
156
|
+
@media (prefers-reduced-motion: reduce) {
|
|
157
|
+
.mk-calendar *,
|
|
158
|
+
mk-calendar * { transition: none !important; }
|
|
159
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* components/hover-card/hover-card.css */
|
|
2
|
+
.mk-hover-card, mk-hover-card { position: relative; display: inline-flex; }
|
|
3
|
+
.mk-hover-card [data-mk-hover-panel], mk-hover-card [data-mk-hover-panel] {
|
|
4
|
+
position: absolute; z-index: 10; bottom: calc(100% + .75rem); left: 0;
|
|
5
|
+
width: min(19rem, calc(100vw - 3rem)); padding: 1.25rem; border-radius: var(--mk-radius-lg);
|
|
6
|
+
color: var(--mk-text); background: var(--mk-surface-3); border: 1px solid var(--mk-outline-soft);
|
|
7
|
+
box-shadow: 0 12px 40px color-mix(in srgb, var(--mk-shadow-color) 20%, transparent);
|
|
8
|
+
animation: mk-hover-card-in .28s cubic-bezier(.2,.8,.2,1) both;
|
|
9
|
+
}
|
|
10
|
+
.mk-hover-card [data-mk-hover-panel]::after, mk-hover-card [data-mk-hover-panel]::after { content: ''; position: absolute; inset: -1rem 0; z-index: -1; }
|
|
11
|
+
.mk-hover-card[data-mk-placement=bottom] [data-mk-hover-panel], mk-hover-card[data-mk-placement=bottom] [data-mk-hover-panel] { top: calc(100% + .75rem); bottom: auto; }
|
|
12
|
+
.mk-hover-card [hidden], mk-hover-card [hidden] { display: none !important; }
|
|
13
|
+
@keyframes mk-hover-card-in { from { opacity: 0; transform: translateY(7px) scale(.97); } to { opacity: 1; transform: none; } }
|
|
14
|
+
@media (prefers-reduced-motion: reduce) { .mk-hover-card [data-mk-hover-panel], mk-hover-card [data-mk-hover-panel] { animation: none; } }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* components/input-otp/input-otp.css */
|
|
2
|
+
.mk-input-otp, mk-input-otp { --mk-otp-size: 2.75rem; --mk-otp-gap: .4rem; display: inline-block; position: relative; max-width: 100%; }
|
|
3
|
+
.mk-input-otp [data-mk-otp-slots], mk-input-otp [data-mk-otp-slots] { display: flex; flex-wrap: wrap; gap: var(--mk-otp-gap); }
|
|
4
|
+
.mk-input-otp__slot { box-sizing: border-box; width: var(--mk-otp-size); height: 3.5rem; display: grid; place-items: center; border: 1px solid var(--mk-outline-soft); border-radius: var(--mk-radius-sm); color: var(--mk-text); background: var(--mk-surface-1); font: 1.5rem var(--mk-font-mono, monospace); transition: border-color .2s, background .2s, transform .2s; }
|
|
5
|
+
.mk-input-otp__slot[data-mk-active] { outline: 2px solid var(--mk-accent); outline-offset: 2px; background: var(--mk-accent-soft); color: var(--mk-on-accent-soft); transform: translateY(-2px); }
|
|
6
|
+
.mk-input-otp [data-mk-otp-input], mk-input-otp [data-mk-otp-input] { position: absolute; inset: 0; box-sizing: border-box; width: 100%; height: 100%; border: 0; background: transparent; color: transparent; caret-color: transparent; outline: 0; font: 1.5rem var(--mk-font-mono, monospace); letter-spacing: calc(var(--mk-otp-size) + var(--mk-otp-gap) - 1ch); padding: 0 0 0 calc((var(--mk-otp-size) - 1ch) / 2); }
|
|
7
|
+
.mk-input-otp:has([aria-invalid=true]) .mk-input-otp__slot, mk-input-otp:has([aria-invalid=true]) .mk-input-otp__slot { border-color: var(--mk-error); }
|
|
8
|
+
.mk-input-otp:has(:disabled), mk-input-otp:has(:disabled) { opacity: .45; }
|
|
9
|
+
@media (max-width: 420px) { .mk-input-otp, mk-input-otp { --mk-otp-size: 2.25rem; --mk-otp-gap: .3rem; } }
|
|
10
|
+
@media (prefers-reduced-motion: reduce) { .mk-input-otp__slot { transition: none; transform: none !important; } }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* components/pagination/pagination.css */
|
|
2
|
+
.mk-pagination, mk-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .35rem; }
|
|
3
|
+
.mk-pagination [data-mk-pagination-pages], mk-pagination [data-mk-pagination-pages] { display: flex; align-items: center; gap: .25rem; }
|
|
4
|
+
.mk-pagination button, mk-pagination button { min-width: 2.5rem; height: 2.5rem; border: 0; border-radius: var(--mk-radius-full); background: var(--mk-surface-2); color: var(--mk-text); font: inherit; cursor: pointer; transition: transform .3s, background .3s, color .3s; }
|
|
5
|
+
.mk-pagination button[aria-current], mk-pagination button[aria-current] { background: var(--mk-accent); color: var(--mk-on-accent); }
|
|
6
|
+
.mk-pagination button:hover:not(:disabled), mk-pagination button:hover:not(:disabled) { transform: translateY(-3px); }
|
|
7
|
+
.mk-pagination button:active:not(:disabled), mk-pagination button:active:not(:disabled) { transform: scale(.9); }
|
|
8
|
+
.mk-pagination button:focus-visible, mk-pagination button:focus-visible { outline: 2px solid var(--mk-accent); outline-offset: 3px; }
|
|
9
|
+
.mk-pagination button:disabled, mk-pagination button:disabled { opacity: .35; cursor: default; }
|
|
10
|
+
.mk-pagination__gap { padding: 0 .15rem; color: var(--mk-muted); }
|
|
11
|
+
@media (prefers-reduced-motion: reduce) { .mk-pagination button, mk-pagination button { transition: none; transform: none !important; } }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* components/quantity/quantity.css */
|
|
2
|
+
.mk-quantity, mk-quantity { display: inline-flex; align-items: center; gap: .5rem; --mk-quantity-size: 3rem; }
|
|
3
|
+
.mk-quantity [data-mk-quantity-decrease], .mk-quantity [data-mk-quantity-increase], mk-quantity button {
|
|
4
|
+
width: var(--mk-quantity-size); height: var(--mk-quantity-size); border: 0; border-radius: 50%;
|
|
5
|
+
background: var(--mk-secondary-soft); color: var(--mk-on-secondary-soft); font: inherit; font-size: 1.65rem;
|
|
6
|
+
cursor: pointer; transition: transform .4s cubic-bezier(.28,.71,0,.98), opacity .2s;
|
|
7
|
+
}
|
|
8
|
+
.mk-quantity [data-mk-quantity-increase], mk-quantity [data-mk-quantity-increase] { background: var(--mk-accent-soft); color: var(--mk-on-accent-soft); }
|
|
9
|
+
.mk-quantity button:is(:hover,:focus-visible):not(:disabled), mk-quantity button:is(:hover,:focus-visible):not(:disabled) {
|
|
10
|
+
transform: rotate(15deg); mask-image: radial-gradient(circle at 100% 0, transparent 22%, #000 23%);
|
|
11
|
+
}
|
|
12
|
+
.mk-quantity button:focus-visible, mk-quantity button:focus-visible { outline: 2px solid var(--mk-accent); outline-offset: 4px; }
|
|
13
|
+
.mk-quantity button:disabled, mk-quantity button:disabled { opacity: .4; cursor: default; }
|
|
14
|
+
.mk-quantity input, mk-quantity input { width: 3.5rem; padding: .4rem 0; border: 0; border-radius: var(--mk-radius-sm); text-align: center; font: inherit; font-variant-numeric: tabular-nums; background: transparent; color: var(--mk-text); appearance: textfield; }
|
|
15
|
+
.mk-quantity input::-webkit-inner-spin-button, mk-quantity input::-webkit-inner-spin-button { appearance: none; }
|
|
16
|
+
@media (prefers-reduced-motion: reduce) { .mk-quantity button, mk-quantity button { transition: none; transform: none !important; } }
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/* components/slot-picker/slot-picker.css */
|
|
2
|
+
/* slot-picker — Melon Mind's appointment picker on the --mk-* tokens; parts are .mk-slot-picker__*. */
|
|
3
|
+
.mk-slot-picker,
|
|
4
|
+
mk-slot-picker {
|
|
5
|
+
--mk-slot-picker-radius: var(--mk-radius-md);
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
border-radius: var(--mk-radius-xl);
|
|
10
|
+
background: var(--mk-surface);
|
|
11
|
+
color: var(--mk-text);
|
|
12
|
+
}
|
|
13
|
+
.mk-slot-picker__calendar { padding: var(--mk-space-5); }
|
|
14
|
+
.mk-slot-picker__panel {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
gap: var(--mk-space-3);
|
|
18
|
+
min-height: 100%;
|
|
19
|
+
padding: var(--mk-space-5);
|
|
20
|
+
background: var(--mk-surface-2);
|
|
21
|
+
}
|
|
22
|
+
.mk-slot-picker__month { display: flex; align-items: center; gap: var(--mk-space-2); margin-bottom: var(--mk-space-3); }
|
|
23
|
+
.mk-slot-picker__title { margin: 0 auto 0 0; font-size: 1.35rem; font-weight: 400; }
|
|
24
|
+
.mk-slot-picker__nav {
|
|
25
|
+
display: grid;
|
|
26
|
+
place-items: center;
|
|
27
|
+
width: 42px;
|
|
28
|
+
height: 42px;
|
|
29
|
+
border: 0;
|
|
30
|
+
border-radius: 50%;
|
|
31
|
+
background: var(--mk-surface-2);
|
|
32
|
+
color: var(--mk-text);
|
|
33
|
+
font: inherit;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
transition: transform 0.3s var(--mk-ease-nav-move), opacity 0.2s;
|
|
36
|
+
}
|
|
37
|
+
.mk-slot-picker__nav:active { transform: scale(0.9); }
|
|
38
|
+
.mk-slot-picker__nav:disabled { opacity: 0.35; cursor: default; }
|
|
39
|
+
[data-mk-slot-days],
|
|
40
|
+
[data-mk-slot-times] { position: relative; }
|
|
41
|
+
.mk-slot-picker__days { display: flex; flex-direction: column; gap: 6px; }
|
|
42
|
+
.mk-slot-picker__weekdays,
|
|
43
|
+
.mk-slot-picker__week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
|
|
44
|
+
.mk-slot-picker__weekdays span {
|
|
45
|
+
padding: 6px 0;
|
|
46
|
+
border-radius: var(--mk-radius-sm);
|
|
47
|
+
background: color-mix(in srgb, var(--mk-surface-2) 70%, transparent);
|
|
48
|
+
text-align: center;
|
|
49
|
+
font-size: 0.9rem;
|
|
50
|
+
}
|
|
51
|
+
.mk-slot-picker__week > [role='gridcell'] { display: grid; }
|
|
52
|
+
.mk-slot-picker__day {
|
|
53
|
+
aspect-ratio: 1.15;
|
|
54
|
+
border: 0;
|
|
55
|
+
border-radius: var(--mk-slot-picker-radius);
|
|
56
|
+
background: var(--mk-surface-3);
|
|
57
|
+
color: var(--mk-text);
|
|
58
|
+
font: inherit;
|
|
59
|
+
font-size: 0.95rem;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
transition: background 0.25s, color 0.25s, border-radius 0.3s var(--mk-ease-nav-radius), transform 0.3s var(--mk-ease-nav-radius);
|
|
62
|
+
}
|
|
63
|
+
.mk-slot-picker__day:hover:not(:disabled) { background: var(--mk-surface-5); border-radius: var(--mk-radius-full); }
|
|
64
|
+
.mk-slot-picker__day:active:not(:disabled) { transform: scale(0.92); }
|
|
65
|
+
.mk-slot-picker__day:disabled { opacity: 0.35; cursor: default; }
|
|
66
|
+
.mk-slot-picker__day[aria-current='date'] { box-shadow: inset 0 0 0 1.5px var(--mk-outline); }
|
|
67
|
+
[aria-selected='true'] > .mk-slot-picker__day,
|
|
68
|
+
[aria-selected='true'] > .mk-slot-picker__day:hover:not(:disabled) { background: var(--mk-accent); color: var(--mk-on-accent); }
|
|
69
|
+
:is(.mk-slot-picker__day, .mk-slot-picker__time, .mk-slot-picker__nav):focus-visible { outline: 2px solid var(--mk-accent); outline-offset: 2px; }
|
|
70
|
+
|
|
71
|
+
.mk-slot-picker__heading {
|
|
72
|
+
margin: 0;
|
|
73
|
+
padding: 8px;
|
|
74
|
+
border-radius: var(--mk-radius-md);
|
|
75
|
+
background: var(--mk-surface);
|
|
76
|
+
font-weight: 600;
|
|
77
|
+
}
|
|
78
|
+
.mk-slot-picker__heading:not([data-mk-shown]) { display: none; }
|
|
79
|
+
.mk-slot-picker__heading[data-mk-shown] { animation: mk-slot-heading-in 0.5s cubic-bezier(0.38, 0.49, 0, 1.4); }
|
|
80
|
+
@keyframes mk-slot-heading-in {
|
|
81
|
+
0% { max-height: 0; min-height: 0; padding-block: 0; opacity: 0; }
|
|
82
|
+
100% { max-height: 56px; min-height: 40px; opacity: 1; }
|
|
83
|
+
}
|
|
84
|
+
.mk-slot-picker__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 8px; align-content: start; }
|
|
85
|
+
.mk-slot-picker__leaving { position: absolute; left: 0; right: 0; pointer-events: none; }
|
|
86
|
+
.mk-slot-picker__note { grid-column: 1 / -1; margin: 2rem 0; color: var(--mk-muted); text-align: center; }
|
|
87
|
+
.mk-slot-picker__time {
|
|
88
|
+
position: relative;
|
|
89
|
+
isolation: isolate;
|
|
90
|
+
height: 44px;
|
|
91
|
+
border: 0;
|
|
92
|
+
border-radius: var(--mk-radius-sm);
|
|
93
|
+
background: var(--mk-surface-4);
|
|
94
|
+
color: var(--mk-text);
|
|
95
|
+
font: inherit;
|
|
96
|
+
font-variant-numeric: tabular-nums;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
transition: background 0.2s, color 0.2s, transform 0.3s var(--mk-ease-nav-move);
|
|
99
|
+
}
|
|
100
|
+
.mk-slot-picker__time:hover { transform: translateY(-2px); }
|
|
101
|
+
.mk-slot-picker__time[aria-checked='true'] { color: var(--mk-on-accent); }
|
|
102
|
+
.mk-slot-picker__time[aria-checked='true']::before {
|
|
103
|
+
content: '';
|
|
104
|
+
position: absolute;
|
|
105
|
+
inset: 0;
|
|
106
|
+
z-index: -1;
|
|
107
|
+
border-radius: inherit;
|
|
108
|
+
background: var(--mk-accent);
|
|
109
|
+
animation: mk-slot-highlight 0.7s cubic-bezier(0.38, 0.49, 0, 1.1);
|
|
110
|
+
}
|
|
111
|
+
@keyframes mk-slot-highlight {
|
|
112
|
+
0% { transform: scale(0.8); opacity: 0; filter: blur(16px); box-shadow: 0 0 0 1px var(--mk-surface-2); }
|
|
113
|
+
100% { transform: scale(1); opacity: 1; filter: blur(0); }
|
|
114
|
+
}
|
|
115
|
+
.mk-slot-picker__actions { margin-top: auto; display: flex; justify-content: flex-end; }
|
|
116
|
+
|
|
117
|
+
@media (max-width: 680px) {
|
|
118
|
+
.mk-slot-picker,
|
|
119
|
+
mk-slot-picker { grid-template-columns: 1fr; }
|
|
120
|
+
.mk-slot-picker__calendar,
|
|
121
|
+
.mk-slot-picker__panel { padding: var(--mk-space-4); }
|
|
122
|
+
}
|
|
123
|
+
@media (prefers-reduced-motion: reduce) {
|
|
124
|
+
.mk-slot-picker *,
|
|
125
|
+
mk-slot-picker * { transition: none !important; animation: none !important; }
|
|
126
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* components/studio-dock/studio-dock.css */
|
|
2
|
+
.mk-studio-dock { position: relative; isolation: isolate; width: min(343px, 100%); color: var(--mk-text); font: inherit; }
|
|
3
|
+
.mk-studio-dock--fixed { position: fixed; z-index: 70; inset-block-end: 24px; inset-inline-start: 50%; translate: -50% 0; width: min(343px, calc(100vw - 32px)); }
|
|
4
|
+
.mk-studio-dock__bar { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 12px; border-radius: 18px; background: var(--mk-surface-2); }
|
|
5
|
+
.mk-studio-dock__brand, .mk-studio-dock__toggle { display: grid; place-items: center; inline-size: 40px; block-size: 40px; flex: none; border: 0; border-radius: 10px; background: var(--mk-surface); color: inherit; text-decoration: none; font: inherit; }
|
|
6
|
+
.mk-studio-dock__label { flex: 1; font-size: .9rem; }
|
|
7
|
+
.mk-studio-dock__toggle { cursor: pointer; }
|
|
8
|
+
.mk-studio-dock__toggle span { transition: transform .4s; }
|
|
9
|
+
.mk-studio-dock[data-mk-studio-open] .mk-studio-dock__toggle span { transform: rotate(45deg); }
|
|
10
|
+
.mk-studio-dock__panel { position: absolute; z-index: 2; inset-inline: 0; inset-block-end: var(--mk-studio-dock-offset, 76px); max-height: min(660px, 75dvh, var(--mk-studio-dock-space, 660px)); overflow: auto; overscroll-behavior: contain; padding: 12px; border: 1px solid var(--mk-outline-soft); border-radius: 18px; background: var(--mk-surface-2); box-shadow: 0 16px 60px #0002; }
|
|
11
|
+
/* Not enough room above the bar: the engine opens the sheet below it. */
|
|
12
|
+
.mk-studio-dock[data-mk-studio-below] .mk-studio-dock__panel { inset-block: var(--mk-studio-dock-offset, 76px) auto; }
|
|
13
|
+
.mk-studio-dock [hidden] { display: none !important; }
|
|
14
|
+
.mk-studio-dock__grid, .mk-studio-dock__page { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
|
|
15
|
+
.mk-studio-dock__tile { min-height: 130px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 12px; border-radius: 10px; background: var(--mk-surface); color: inherit; text-decoration: none; transition: transform .4s cubic-bezier(.2, 1.4, .4, 1); }
|
|
16
|
+
.mk-studio-dock__tile small { color: var(--mk-muted); }
|
|
17
|
+
.mk-studio-dock__tile:is(:hover, :focus-visible) { transform: scale(.94); }
|
|
18
|
+
.mk-studio-dock__reel { display: flex; justify-content: space-between; align-items: end; min-height: 154px; margin-block: 12px; padding: 16px; border-radius: 10px; background: var(--mk-accent); color: var(--mk-on-accent); }
|
|
19
|
+
.mk-studio-dock__reel button { border: 1px solid currentColor; border-radius: 50%; padding: 14px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
|
|
20
|
+
.mk-studio-dock__slide-track { position: relative; display: flex; align-items: center; height: 64px; padding: 4px; margin-block: 12px; border-radius: 48px; background: var(--mk-surface-3, var(--mk-surface)); }
|
|
21
|
+
.mk-studio-dock__slide-track > span { position: absolute; inset-inline: 60px 12px; text-align: center; font-size: .75rem; pointer-events: none; }
|
|
22
|
+
.mk-studio-dock [data-mk-studio-slide] { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--mk-surface); color: inherit; font-size: 20px; cursor: pointer; touch-action: pan-y; transform: translateX(var(--mk-studio-drag, 0px)); }
|
|
23
|
+
.mk-studio-dock__clock { position: relative; aspect-ratio: 1; display: grid; place-content: center; gap: 4px; text-align: center; border: 10px solid var(--mk-surface); border-radius: 50%; background: var(--mk-surface-2); }
|
|
24
|
+
.mk-studio-dock__clock::after { content: ''; position: absolute; inset: 8px; border: 1px solid var(--mk-outline-soft); border-radius: 50%; }
|
|
25
|
+
.mk-studio-dock__clock small { color: var(--mk-muted); }
|
|
26
|
+
.mk-studio-dock__pages { margin-block-start: 12px; }
|
|
27
|
+
.mk-studio-dock__pagination { display: flex; justify-content: center; gap: 8px; margin-block-start: 12px; }
|
|
28
|
+
.mk-studio-dock__pagination button { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--mk-surface); color: inherit; font: inherit; cursor: pointer; }
|
|
29
|
+
.mk-studio-dock__pagination [aria-current] { background: var(--mk-accent); color: var(--mk-on-accent); }
|
|
30
|
+
.mk-studio-dock__view { display: grid; gap: 16px; padding: 12px 0; }
|
|
31
|
+
.mk-studio-dock__view input, .mk-studio-dock__view textarea { width: 100%; padding: 12px; border: 1px solid var(--mk-outline-soft); border-radius: 8px; background: var(--mk-surface); color: inherit; font: inherit; }
|
|
32
|
+
.mk-studio-dock__view label { display: grid; gap: 6px; }
|
|
33
|
+
.mk-studio-dock__view video { width: 100%; border-radius: 10px; }
|
|
34
|
+
.mk-studio-dock :is(button,a,input,textarea):focus-visible { outline: 2px solid var(--mk-accent); outline-offset: 3px; }
|
|
35
|
+
@media (prefers-reduced-motion: reduce) { .mk-studio-dock *, .mk-studio-dock *::after { transition: none !important; animation: none !important; } }
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* components/trailer/trailer.css */
|
|
2
|
+
.mk-trailer {
|
|
3
|
+
--mk-trailer-ink: #f6f3e8;
|
|
4
|
+
--mk-trailer-paper: #131816;
|
|
5
|
+
width: min(1100px, calc(100vw - 32px));
|
|
6
|
+
max-width: none;
|
|
7
|
+
max-height: calc(100dvh - 32px);
|
|
8
|
+
padding: 0;
|
|
9
|
+
border: 0;
|
|
10
|
+
border-radius: 0;
|
|
11
|
+
color: var(--mk-trailer-ink);
|
|
12
|
+
background: var(--mk-trailer-paper);
|
|
13
|
+
overflow: auto;
|
|
14
|
+
margin: auto;
|
|
15
|
+
}
|
|
16
|
+
.mk-trailer::backdrop { background: rgb(4 10 7 / .8); }
|
|
17
|
+
.mk-trailer__header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; }
|
|
18
|
+
.mk-trailer__title { font: 500 .75rem/1.5 var(--mk-font-mono, monospace); text-transform: uppercase; letter-spacing: .16em; margin: 0; }
|
|
19
|
+
.mk-trailer video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #060b08; }
|
|
20
|
+
.mk-trailer [data-mk-trailer-stage]:fullscreen { display: flex; flex-direction: column; justify-content: center; width: 100%; height: 100%; background: var(--mk-trailer-paper); color: var(--mk-trailer-ink); }
|
|
21
|
+
.mk-trailer [data-mk-trailer-stage]:fullscreen video { max-height: calc(100dvh - 90px); }
|
|
22
|
+
.mk-trailer__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 20px 16px; font: .7rem/1.5 var(--mk-font-mono, monospace); }
|
|
23
|
+
.mk-trailer button { display: grid; place-items: center; min-width: 44px; min-height: 44px; border: 1px solid currentColor; color: inherit; background: transparent; cursor: pointer; font: inherit; }
|
|
24
|
+
.mk-trailer button:hover { background: rgb(255 255 255 / .12); }
|
|
25
|
+
.mk-trailer button:focus-visible, .mk-trailer input:focus-visible { outline: 2px solid #e5ff96; outline-offset: 4px; }
|
|
26
|
+
.mk-trailer button svg { width: 18px; height: 18px; fill: currentColor; }
|
|
27
|
+
.mk-trailer [data-mk-trailer-seek] { flex: 1; min-width: 70px; accent-color: #d6f2ac; }
|
|
28
|
+
.mk-trailer [data-mk-trailer-volume] { width: 72px; accent-color: #d6f2ac; }
|
|
29
|
+
.mk-trailer [data-mk-trailer-time] { white-space: nowrap; }
|
|
30
|
+
.mk-trailer [data-mk-trailer-status] { padding: 0 20px; font: .8rem/1.5 var(--mk-font, sans-serif); }
|
|
31
|
+
.mk-trailer [data-mk-trailer-status]:empty { display: none; }
|
|
32
|
+
.mk-trailer__pause-icon, .mk-trailer__sound-off { display: none; }
|
|
33
|
+
.mk-trailer [data-mk-trailer-play][aria-pressed="true"] .mk-trailer__play-icon,
|
|
34
|
+
.mk-trailer [data-mk-trailer-mute][aria-pressed="true"] .mk-trailer__sound-on { display: none; }
|
|
35
|
+
.mk-trailer [data-mk-trailer-play][aria-pressed="true"] .mk-trailer__pause-icon,
|
|
36
|
+
.mk-trailer [data-mk-trailer-mute][aria-pressed="true"] .mk-trailer__sound-off { display: block; }
|
|
37
|
+
@media (max-width: 540px) { .mk-trailer [data-mk-trailer-volume] { display: none; } .mk-trailer__controls { gap: 8px; padding-inline: 12px; } .mk-trailer [data-mk-trailer-seek] { flex-basis: 100%; order: -1; } }
|
package/dist/css/controls.css
CHANGED
|
@@ -948,3 +948,68 @@
|
|
|
948
948
|
transition: none;
|
|
949
949
|
}
|
|
950
950
|
}
|
|
951
|
+
|
|
952
|
+
/* css/controls/status.css */
|
|
953
|
+
/* status — "Available for new projects" pill and a live dot whose halo pulses (DOVV Studio: 1.6 s ease-out, scale 1 → 2.6). */
|
|
954
|
+
.mk-status {
|
|
955
|
+
display: inline-flex;
|
|
956
|
+
align-items: center;
|
|
957
|
+
gap: 10px;
|
|
958
|
+
height: 40px;
|
|
959
|
+
padding: 0 16px 0 14px;
|
|
960
|
+
border-radius: 100px;
|
|
961
|
+
background: var(--mk-surface);
|
|
962
|
+
color: var(--mk-text);
|
|
963
|
+
font: inherit;
|
|
964
|
+
font-size: 14px;
|
|
965
|
+
font-weight: 500;
|
|
966
|
+
letter-spacing: -0.01em;
|
|
967
|
+
white-space: nowrap;
|
|
968
|
+
text-decoration: none;
|
|
969
|
+
box-shadow: 0 0 0 1px var(--mk-outline-soft), 0 6px 20px -8px rgb(0 0 0 / 0.18);
|
|
970
|
+
transition: box-shadow 0.3s, transform 0.3s;
|
|
971
|
+
}
|
|
972
|
+
/* One line always: on phones the secondary half goes. */
|
|
973
|
+
@media (max-width: 480px) {
|
|
974
|
+
.mk-status > :is(.mk-status__sep, .mk-status__muted) { display: none; }
|
|
975
|
+
}
|
|
976
|
+
a.mk-status:hover,
|
|
977
|
+
button.mk-status:hover {
|
|
978
|
+
transform: translateY(-1px);
|
|
979
|
+
box-shadow: 0 0 0 1px var(--mk-outline), 0 10px 24px -8px rgb(0 0 0 / 0.22);
|
|
980
|
+
}
|
|
981
|
+
.mk-status__sep { width: 1px; height: 14px; background: var(--mk-outline-soft); }
|
|
982
|
+
.mk-status__muted { color: var(--mk-muted); }
|
|
983
|
+
.mk-status > svg,
|
|
984
|
+
.mk-status > .mk-icon { color: var(--mk-muted); transition: transform 0.3s; }
|
|
985
|
+
.mk-status:hover > svg,
|
|
986
|
+
.mk-status:hover > .mk-icon { transform: translateX(2px); }
|
|
987
|
+
.mk-status__dot {
|
|
988
|
+
--mk-status-color: #16c847;
|
|
989
|
+
position: relative;
|
|
990
|
+
display: inline-block;
|
|
991
|
+
flex: none;
|
|
992
|
+
width: 8px;
|
|
993
|
+
height: 8px;
|
|
994
|
+
border-radius: 50%;
|
|
995
|
+
background: var(--mk-status-color);
|
|
996
|
+
}
|
|
997
|
+
.mk-status__dot::after {
|
|
998
|
+
content: '';
|
|
999
|
+
position: absolute;
|
|
1000
|
+
inset: 0;
|
|
1001
|
+
border-radius: inherit;
|
|
1002
|
+
background: inherit;
|
|
1003
|
+
animation: mk-status-pulse 1.6s ease-out infinite;
|
|
1004
|
+
}
|
|
1005
|
+
.mk-status__dot--busy { --mk-status-color: #f59e0b; }
|
|
1006
|
+
.mk-status__dot--off { --mk-status-color: var(--mk-muted); }
|
|
1007
|
+
.mk-status__dot--off::after { animation: none; }
|
|
1008
|
+
@keyframes mk-status-pulse {
|
|
1009
|
+
0% { opacity: 0.6; transform: scale(1); }
|
|
1010
|
+
100% { opacity: 0; transform: scale(2.6); }
|
|
1011
|
+
}
|
|
1012
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1013
|
+
.mk-status { transition: none; }
|
|
1014
|
+
.mk-status__dot::after { animation: none; }
|
|
1015
|
+
}
|
package/dist/elements/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { I as Instance } from '../types-BkS_raL8.js';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { S as StudioDockInstance, i as StudioDockView, T as TrailerInstance, D as DialogInstance, M as MenuInstance, Q as QuantityInstance, P as PaginationInstance, H as HoverCardInstance, I as InputOtpInstance, C as CalendarInstance, j as SlotPickerInstance } from '../reveal-jsX-uwUz.js';
|
|
3
|
+
import { T as ThemePickerInstance, a as ToasterInstance, C as ChatInstance, b as ChatRole, N as NavInstance, c as NavStyle, d as CursorInstance, I as IslandInstance } from '../store-DYb3tTsZ.js';
|
|
4
|
+
export { t as toast } from '../store-DYb3tTsZ.js';
|
|
5
5
|
import { C as ChatBackgroundInstance, S as StepsInstance } from '../engine-GDGwQnJE.js';
|
|
6
6
|
import 'gsap/Flip';
|
|
7
7
|
|
|
@@ -24,6 +24,25 @@ declare abstract class MkElement<I extends Instance = Instance> extends SafeHTML
|
|
|
24
24
|
/** customElements.define once; later calls with the same name are ignored. */
|
|
25
25
|
declare function defineElement(name: string, ctor: CustomElementConstructor): void;
|
|
26
26
|
|
|
27
|
+
declare class MkStudioDockElement extends MkElement<StudioDockInstance> {
|
|
28
|
+
static options: Record<string, OptionType>;
|
|
29
|
+
protected create(options: Record<string, unknown>): StudioDockInstance;
|
|
30
|
+
open(view?: StudioDockView): void;
|
|
31
|
+
close(): void;
|
|
32
|
+
toggle(): void;
|
|
33
|
+
selectPage(index: number): void;
|
|
34
|
+
}
|
|
35
|
+
declare const defineStudioDock: () => void;
|
|
36
|
+
|
|
37
|
+
/** Wrap a consumer-authored native <dialog> containing <video>. */
|
|
38
|
+
declare class MkTrailerElement extends MkElement<TrailerInstance> {
|
|
39
|
+
static options: Record<string, OptionType>;
|
|
40
|
+
protected create(options: Record<string, unknown>): TrailerInstance;
|
|
41
|
+
open(origin?: HTMLElement | null): void;
|
|
42
|
+
close(): void;
|
|
43
|
+
}
|
|
44
|
+
declare const defineTrailer: () => void;
|
|
45
|
+
|
|
27
46
|
/**
|
|
28
47
|
* <mk-theme-picker show-hidden themes="neogreen,pink"></mk-theme-picker>
|
|
29
48
|
* Emits `mk:theme` on document when a theme is chosen (from setTheme).
|
|
@@ -163,6 +182,47 @@ declare class MkIslandElement extends MkElement<IslandInstance> {
|
|
|
163
182
|
ready(): void;
|
|
164
183
|
}
|
|
165
184
|
|
|
185
|
+
/** Light DOM: supply the same child markup shown in the README. */
|
|
186
|
+
declare class MkQuantityElement extends MkElement<QuantityInstance> {
|
|
187
|
+
static options: Record<string, OptionType>;
|
|
188
|
+
protected create(options: Record<string, unknown>): QuantityInstance;
|
|
189
|
+
attributeChangedCallback(name: string, previous: string | null, next: string | null): void;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** Light DOM: supply the same child markup shown in the README. */
|
|
193
|
+
declare class MkPaginationElement extends MkElement<PaginationInstance> {
|
|
194
|
+
static options: Record<string, OptionType>;
|
|
195
|
+
protected create(options: Record<string, unknown>): PaginationInstance;
|
|
196
|
+
attributeChangedCallback(name: string, previous: string | null, next: string | null): void;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/** Light DOM: supply the same child markup shown in the README. */
|
|
200
|
+
declare class MkHoverCardElement extends MkElement<HoverCardInstance> {
|
|
201
|
+
static options: Record<string, OptionType>;
|
|
202
|
+
protected create(options: Record<string, unknown>): HoverCardInstance;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/** Light DOM: supply the same child markup shown in the README. */
|
|
206
|
+
declare class MkInputOtpElement extends MkElement<InputOtpInstance> {
|
|
207
|
+
static options: Record<string, OptionType>;
|
|
208
|
+
protected create(options: Record<string, unknown>): InputOtpInstance;
|
|
209
|
+
attributeChangedCallback(name: string, previous: string | null, next: string | null): void;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/** Light DOM: supply the header and the [data-mk-calendar-grid] shown in the README. */
|
|
213
|
+
declare class MkCalendarElement extends MkElement<CalendarInstance> {
|
|
214
|
+
static options: Record<string, OptionType>;
|
|
215
|
+
protected create(options: Record<string, unknown>): CalendarInstance;
|
|
216
|
+
attributeChangedCallback(name: string, previous: string | null, next: string | null): void;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/** Light DOM: supply the [data-mk-slot-days] and [data-mk-slot-times] markup shown in the README. */
|
|
220
|
+
declare class MkSlotPickerElement extends MkElement<SlotPickerInstance> {
|
|
221
|
+
static options: Record<string, OptionType>;
|
|
222
|
+
protected create(options: Record<string, unknown>): SlotPickerInstance;
|
|
223
|
+
attributeChangedCallback(name: string, previous: string | null, next: string | null): void;
|
|
224
|
+
}
|
|
225
|
+
|
|
166
226
|
/** Tag name → element class, for every component. */
|
|
167
227
|
declare const ELEMENTS: {
|
|
168
228
|
readonly 'mk-theme-picker': typeof MkThemePickerElement;
|
|
@@ -175,9 +235,17 @@ declare const ELEMENTS: {
|
|
|
175
235
|
readonly 'mk-steps': typeof MkStepsElement;
|
|
176
236
|
readonly 'mk-cursor': typeof MkCursorElement;
|
|
177
237
|
readonly 'mk-island': typeof MkIslandElement;
|
|
238
|
+
readonly 'mk-quantity': typeof MkQuantityElement;
|
|
239
|
+
readonly 'mk-pagination': typeof MkPaginationElement;
|
|
240
|
+
readonly 'mk-hover-card': typeof MkHoverCardElement;
|
|
241
|
+
readonly 'mk-input-otp': typeof MkInputOtpElement;
|
|
242
|
+
readonly 'mk-studio-dock': typeof MkStudioDockElement;
|
|
243
|
+
readonly 'mk-trailer': typeof MkTrailerElement;
|
|
244
|
+
readonly 'mk-calendar': typeof MkCalendarElement;
|
|
245
|
+
readonly 'mk-slot-picker': typeof MkSlotPickerElement;
|
|
178
246
|
};
|
|
179
247
|
type ElementName = keyof typeof ELEMENTS;
|
|
180
248
|
/** Register every motion-kit element (or the ones named). Safe to call more than once. */
|
|
181
249
|
declare function defineElements(names?: ElementName[]): void;
|
|
182
250
|
|
|
183
|
-
export { ELEMENTS, type ElementName, MkChatBackgroundElement, MkChatElement, MkCursorElement, MkDialogElement, MkElement, MkIslandElement, MkMenuElement, MkNavElement, MkStepsElement, MkThemePickerElement, MkToasterElement, type OptionType, SafeHTMLElement, defineElement, defineElements };
|
|
251
|
+
export { ELEMENTS, type ElementName, MkCalendarElement, MkChatBackgroundElement, MkChatElement, MkCursorElement, MkDialogElement, MkElement, MkHoverCardElement, MkInputOtpElement, MkIslandElement, MkMenuElement, MkNavElement, MkPaginationElement, MkQuantityElement, MkSlotPickerElement, MkStepsElement, MkStudioDockElement, MkThemePickerElement, MkToasterElement, MkTrailerElement, type OptionType, SafeHTMLElement, defineElement, defineElements, defineStudioDock, defineTrailer };
|