@revikornmann/muka-ui 0.27.2 → 0.28.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/dist/cjs/components/Avatar/Avatar.css +30 -7
- package/dist/cjs/components/Avatar/Avatar.js +4 -1
- package/dist/cjs/components/Avatar/Avatar.js.map +1 -1
- package/dist/cjs/components/DataPieChart/DataPieChart.css +4 -1
- package/dist/cjs/components/DataPieChart/DataPieChart.js +1 -1
- package/dist/cjs/components/DataPieChart/DataPieChart.js.map +1 -1
- package/dist/cjs/components/Dialog/Dialog.css +3 -0
- package/dist/cjs/components/Dialog/Dialog.js +66 -3
- package/dist/cjs/components/Dialog/Dialog.js.map +1 -1
- package/dist/cjs/components/Input/Input.css +21 -0
- package/dist/cjs/components/MediaViewer/MediaViewer.css +180 -0
- package/dist/cjs/components/MediaViewer/MediaViewer.js +271 -0
- package/dist/cjs/components/MediaViewer/MediaViewer.js.map +1 -0
- package/dist/cjs/components/MediaViewer/index.js +6 -0
- package/dist/cjs/components/MediaViewer/index.js.map +1 -0
- package/dist/cjs/components/MediaViewer/mediaViewerGestures.js +65 -0
- package/dist/cjs/components/MediaViewer/mediaViewerGestures.js.map +1 -0
- package/dist/cjs/components/Thumbnail/Thumbnail.css +11 -0
- package/dist/cjs/components/Thumbnail/Thumbnail.js +6 -2
- package/dist/cjs/components/Thumbnail/Thumbnail.js.map +1 -1
- package/dist/cjs/components/index.js +3 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.css +30 -7
- package/dist/esm/components/Avatar/Avatar.js +4 -1
- package/dist/esm/components/Avatar/Avatar.js.map +1 -1
- package/dist/esm/components/DataPieChart/DataPieChart.css +4 -1
- package/dist/esm/components/DataPieChart/DataPieChart.js +1 -1
- package/dist/esm/components/DataPieChart/DataPieChart.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.css +3 -0
- package/dist/esm/components/Dialog/Dialog.js +66 -3
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Input/Input.css +21 -0
- package/dist/esm/components/MediaViewer/MediaViewer.css +180 -0
- package/dist/esm/components/MediaViewer/MediaViewer.js +267 -0
- package/dist/esm/components/MediaViewer/MediaViewer.js.map +1 -0
- package/dist/esm/components/MediaViewer/index.js +2 -0
- package/dist/esm/components/MediaViewer/index.js.map +1 -0
- package/dist/esm/components/MediaViewer/mediaViewerGestures.js +58 -0
- package/dist/esm/components/MediaViewer/mediaViewerGestures.js.map +1 -0
- package/dist/esm/components/Thumbnail/Thumbnail.css +11 -0
- package/dist/esm/components/Thumbnail/Thumbnail.js +6 -2
- package/dist/esm/components/Thumbnail/Thumbnail.js.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/styles/base.css +2 -0
- package/dist/styles/components/Avatar.css +30 -7
- package/dist/styles/components/DataPieChart.css +4 -1
- package/dist/styles/components/Dialog.css +3 -0
- package/dist/styles/components/Input.css +21 -0
- package/dist/styles/components/MediaViewer.css +180 -0
- package/dist/styles/components/Thumbnail.css +11 -0
- package/dist/styles/index.css +554 -301
- package/dist/styles/muka-dark.css +554 -301
- package/dist/styles/muka-light.css +554 -301
- package/dist/styles/tokens-bouwplan-dark.css +8 -1
- package/dist/styles/tokens-bouwplan-light.css +8 -1
- package/dist/styles/tokens-fscl-dark.css +8 -1
- package/dist/styles/tokens-fscl-light.css +8 -1
- package/dist/styles/tokens-grip-dark.css +8 -1
- package/dist/styles/tokens-grip-light.css +8 -1
- package/dist/styles/tokens-muka-dark.css +8 -1
- package/dist/styles/tokens-muka-light.css +8 -1
- package/dist/styles/tokens-wireframe-dark.css +8 -1
- package/dist/styles/tokens-wireframe-light.css +8 -1
- package/dist/styles/wireframe-dark.css +554 -301
- package/dist/styles/wireframe-light.css +554 -301
- package/dist/types/components/Avatar/Avatar.d.ts +4 -1
- package/dist/types/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/types/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/types/components/MediaViewer/MediaViewer.d.ts +86 -0
- package/dist/types/components/MediaViewer/MediaViewer.d.ts.map +1 -0
- package/dist/types/components/MediaViewer/index.d.ts +2 -0
- package/dist/types/components/MediaViewer/index.d.ts.map +1 -0
- package/dist/types/components/MediaViewer/mediaViewerGestures.d.ts +35 -0
- package/dist/types/components/MediaViewer/mediaViewerGestures.d.ts.map +1 -0
- package/dist/types/components/Thumbnail/Thumbnail.d.ts +21 -0
- package/dist/types/components/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/docs/consumers/brand.md +6 -2
- package/docs/consumers/setup-instructions.md +35 -3
- package/package.json +1 -1
- package/skills/setup-muka/SKILL.md +36 -3
- package/tokens/t4-components/avatar.json +33 -1
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/* MediaViewer Component Styles - Using Muka Design Tokens */
|
|
2
|
+
|
|
3
|
+
/* ─── Native dialog: full viewport ────────────────────── */
|
|
4
|
+
.muka-media-viewer {
|
|
5
|
+
position: fixed;
|
|
6
|
+
inset: 0;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
max-width: none;
|
|
10
|
+
max-height: none;
|
|
11
|
+
margin: 0;
|
|
12
|
+
padding: 0;
|
|
13
|
+
border: none;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
overscroll-behavior: contain;
|
|
18
|
+
color: var(--color-text-default-default);
|
|
19
|
+
background-color: var(--color-black-alpha-12);
|
|
20
|
+
animation: muka-media-viewer-in var(--motion-duration-component) var(--motion-easing-enter);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.muka-media-viewer:not([open]) {
|
|
24
|
+
display: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.muka-media-viewer::backdrop {
|
|
28
|
+
background-color: var(--color-black-alpha-12);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes muka-media-viewer-in {
|
|
32
|
+
from {
|
|
33
|
+
opacity: 0;
|
|
34
|
+
}
|
|
35
|
+
to {
|
|
36
|
+
opacity: 1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* ─── Chrome: TopBar and footer sit on a surface ──────── */
|
|
41
|
+
.muka-media-viewer__topbar {
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
background-color: var(--color-surface-level3);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.muka-media-viewer__live {
|
|
47
|
+
position: absolute;
|
|
48
|
+
width: 1px;
|
|
49
|
+
height: 1px;
|
|
50
|
+
padding: 0;
|
|
51
|
+
margin: -1px;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
clip: rect(0, 0, 0, 0);
|
|
54
|
+
white-space: nowrap;
|
|
55
|
+
border: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* ─── Stage: the dark area the images slide across ────── */
|
|
59
|
+
.muka-media-viewer__stage {
|
|
60
|
+
position: relative;
|
|
61
|
+
flex: 1 1 auto;
|
|
62
|
+
min-height: 0;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
/* Gestures are handled in JS: no browser panning or pinch on the stage. */
|
|
65
|
+
touch-action: none;
|
|
66
|
+
user-select: none;
|
|
67
|
+
-webkit-user-select: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.muka-media-viewer__slide {
|
|
71
|
+
position: absolute;
|
|
72
|
+
inset: 0;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
padding: var(--spacing-4);
|
|
77
|
+
transition: transform var(--motion-duration-component) var(--motion-easing-default);
|
|
78
|
+
will-change: transform;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* While a finger drags, the image follows it without easing. */
|
|
82
|
+
.muka-media-viewer--dragging .muka-media-viewer__slide {
|
|
83
|
+
transition: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.muka-media-viewer__image {
|
|
87
|
+
display: block;
|
|
88
|
+
max-width: 100%;
|
|
89
|
+
max-height: 100%;
|
|
90
|
+
object-fit: contain;
|
|
91
|
+
pointer-events: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* ─── Previous / next: devices that can hover ─────────── */
|
|
95
|
+
.muka-media-viewer__nav {
|
|
96
|
+
position: absolute;
|
|
97
|
+
top: 50%;
|
|
98
|
+
display: none;
|
|
99
|
+
transform: translateY(-50%);
|
|
100
|
+
opacity: 0;
|
|
101
|
+
transition: opacity var(--motion-duration-micro) var(--motion-easing-enter);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.muka-media-viewer__nav--previous {
|
|
105
|
+
left: var(--spacing-4);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.muka-media-viewer__nav--next {
|
|
109
|
+
right: var(--spacing-4);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@media (hover: hover) and (pointer: fine) {
|
|
113
|
+
.muka-media-viewer__nav {
|
|
114
|
+
display: block;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.muka-media-viewer__stage:hover .muka-media-viewer__nav,
|
|
118
|
+
.muka-media-viewer__nav:focus-within {
|
|
119
|
+
opacity: 1;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* ─── Footer: caption, meta and actions ───────────────── */
|
|
124
|
+
.muka-media-viewer__footer {
|
|
125
|
+
flex-shrink: 0;
|
|
126
|
+
display: flex;
|
|
127
|
+
flex-direction: column;
|
|
128
|
+
gap: var(--spacing-3);
|
|
129
|
+
padding: var(--spacing-4);
|
|
130
|
+
padding-bottom: calc(var(--spacing-4) + env(safe-area-inset-bottom, 0px));
|
|
131
|
+
background-color: var(--color-surface-level3);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.muka-media-viewer__details {
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: flex-start;
|
|
137
|
+
justify-content: space-between;
|
|
138
|
+
gap: var(--spacing-3);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.muka-media-viewer__caption {
|
|
142
|
+
min-width: 0;
|
|
143
|
+
color: var(--color-text-subtle-default);
|
|
144
|
+
font-family: var(--text-body-sm-regular-fontFamily);
|
|
145
|
+
font-size: var(--text-body-sm-regular-fontSize);
|
|
146
|
+
font-weight: var(--text-body-sm-regular-fontWeight);
|
|
147
|
+
line-height: var(--text-body-sm-regular-lineHeight);
|
|
148
|
+
overflow-wrap: anywhere;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.muka-media-viewer__meta {
|
|
152
|
+
flex-shrink: 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.muka-media-viewer__actions {
|
|
156
|
+
display: flex;
|
|
157
|
+
flex-wrap: wrap;
|
|
158
|
+
gap: var(--spacing-2);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Mobile: actions stack full width, like Dialog footers. */
|
|
162
|
+
@media (max-width: 1023px) {
|
|
163
|
+
.muka-media-viewer__actions {
|
|
164
|
+
flex-direction: column;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.muka-media-viewer__actions > * {
|
|
168
|
+
width: 100%;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* ─── Reduced motion ──────────────────────────────────── */
|
|
173
|
+
@media (prefers-reduced-motion: reduce) {
|
|
174
|
+
.muka-media-viewer,
|
|
175
|
+
.muka-media-viewer__slide,
|
|
176
|
+
.muka-media-viewer__nav {
|
|
177
|
+
animation: none;
|
|
178
|
+
transition: none;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -33,6 +33,17 @@
|
|
|
33
33
|
height: 120px;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
/* Fluid: fill the parent's width; the shape sets the height via aspect-ratio. */
|
|
37
|
+
.muka-thumbnail--fluid {
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: auto;
|
|
40
|
+
aspect-ratio: 1 / 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.muka-thumbnail--fluid.muka-thumbnail--4-3 {
|
|
44
|
+
aspect-ratio: 4 / 3;
|
|
45
|
+
}
|
|
46
|
+
|
|
36
47
|
.muka-thumbnail--ellipse .muka-thumbnail__frame {
|
|
37
48
|
border-radius: var(--border-radius-full);
|
|
38
49
|
}
|