@revikornmann/muka-ui 0.6.0 → 0.8.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/Alert/Alert.css +7 -0
- package/dist/cjs/components/DataPieChart/DataPieChart.css +29 -0
- package/dist/cjs/components/DataPieChart/DataPieChart.js +20 -3
- package/dist/cjs/components/DataPieChart/DataPieChart.js.map +1 -1
- package/dist/cjs/components/Dialog/Dialog.js +64 -7
- package/dist/cjs/components/Dialog/Dialog.js.map +1 -1
- package/dist/cjs/components/NavigationTransition/NavigationTransition.js +25 -8
- package/dist/cjs/components/NavigationTransition/NavigationTransition.js.map +1 -1
- package/dist/cjs/components/PhotoUploader/PhotoUploader.css +125 -0
- package/dist/cjs/components/PhotoUploader/PhotoUploader.js +257 -0
- package/dist/cjs/components/PhotoUploader/PhotoUploader.js.map +1 -0
- package/dist/cjs/components/PhotoUploader/index.js +6 -0
- package/dist/cjs/components/PhotoUploader/index.js.map +1 -0
- package/dist/cjs/components/ProgressAccordeon/ProgressAccordeon.css +32 -2
- package/dist/cjs/components/ProgressAccordeon/ProgressAccordeon.js +13 -2
- package/dist/cjs/components/ProgressAccordeon/ProgressAccordeon.js.map +1 -1
- package/dist/cjs/components/SpecList/SpecList.css +34 -21
- package/dist/cjs/components/SpecList/SpecList.js +9 -3
- package/dist/cjs/components/SpecList/SpecList.js.map +1 -1
- package/dist/cjs/components/Thumbnail/Thumbnail.css +171 -0
- package/dist/cjs/components/Thumbnail/Thumbnail.js +55 -0
- package/dist/cjs/components/Thumbnail/Thumbnail.js.map +1 -0
- package/dist/cjs/components/Thumbnail/index.js +6 -0
- package/dist/cjs/components/Thumbnail/index.js.map +1 -0
- package/dist/cjs/components/index.js +5 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/esm/components/Alert/Alert.css +7 -0
- package/dist/esm/components/DataPieChart/DataPieChart.css +29 -0
- package/dist/esm/components/DataPieChart/DataPieChart.js +20 -3
- package/dist/esm/components/DataPieChart/DataPieChart.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js +31 -7
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/NavigationTransition/NavigationTransition.js +25 -8
- package/dist/esm/components/NavigationTransition/NavigationTransition.js.map +1 -1
- package/dist/esm/components/PhotoUploader/PhotoUploader.css +125 -0
- package/dist/esm/components/PhotoUploader/PhotoUploader.js +254 -0
- package/dist/esm/components/PhotoUploader/PhotoUploader.js.map +1 -0
- package/dist/esm/components/PhotoUploader/index.js +2 -0
- package/dist/esm/components/PhotoUploader/index.js.map +1 -0
- package/dist/esm/components/ProgressAccordeon/ProgressAccordeon.css +32 -2
- package/dist/esm/components/ProgressAccordeon/ProgressAccordeon.js +13 -2
- package/dist/esm/components/ProgressAccordeon/ProgressAccordeon.js.map +1 -1
- package/dist/esm/components/SpecList/SpecList.css +34 -21
- package/dist/esm/components/SpecList/SpecList.js +9 -3
- package/dist/esm/components/SpecList/SpecList.js.map +1 -1
- package/dist/esm/components/Thumbnail/Thumbnail.css +171 -0
- package/dist/esm/components/Thumbnail/Thumbnail.js +52 -0
- package/dist/esm/components/Thumbnail/Thumbnail.js.map +1 -0
- package/dist/esm/components/Thumbnail/index.js +2 -0
- package/dist/esm/components/Thumbnail/index.js.map +1 -0
- package/dist/esm/components/index.js +2 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/styles/components/Alert.css +7 -0
- package/dist/styles/components/DataPieChart.css +29 -0
- package/dist/styles/components/PhotoUploader.css +125 -0
- package/dist/styles/components/ProgressAccordeon.css +32 -2
- package/dist/styles/components/SpecList.css +34 -21
- package/dist/styles/components/Thumbnail.css +171 -0
- package/dist/styles/index.css +867 -449
- package/dist/styles/muka-dark.css +867 -449
- package/dist/styles/muka-light.css +867 -449
- package/dist/styles/tokens-bouwplan-dark.css +37 -0
- package/dist/styles/tokens-bouwplan-light.css +37 -0
- package/dist/styles/tokens-fscl-dark.css +37 -0
- package/dist/styles/tokens-fscl-light.css +37 -0
- package/dist/styles/tokens-grip-dark.css +37 -0
- package/dist/styles/tokens-grip-light.css +37 -0
- package/dist/styles/tokens-muka-dark.css +37 -0
- package/dist/styles/tokens-muka-light.css +37 -0
- package/dist/styles/tokens-wireframe-dark.css +37 -0
- package/dist/styles/tokens-wireframe-light.css +37 -0
- package/dist/styles/wireframe-dark.css +867 -449
- package/dist/styles/wireframe-light.css +867 -449
- package/dist/types/components/DataPieChart/DataPieChart.d.ts +7 -0
- package/dist/types/components/DataPieChart/DataPieChart.d.ts.map +1 -1
- package/dist/types/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/types/components/FileUpload/FileUpload.d.ts +1 -1
- package/dist/types/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/types/components/FileUpload/FileUploadItem.d.ts +1 -1
- package/dist/types/components/FileUpload/FileUploadItem.d.ts.map +1 -1
- package/dist/types/components/NavigationTransition/NavigationTransition.d.ts +3 -1
- package/dist/types/components/NavigationTransition/NavigationTransition.d.ts.map +1 -1
- package/dist/types/components/PhotoUploader/PhotoUploader.d.ts +71 -0
- package/dist/types/components/PhotoUploader/PhotoUploader.d.ts.map +1 -0
- package/dist/types/components/PhotoUploader/index.d.ts +2 -0
- package/dist/types/components/PhotoUploader/index.d.ts.map +1 -0
- package/dist/types/components/ProgressAccordeon/ProgressAccordeon.d.ts.map +1 -1
- package/dist/types/components/SpecList/SpecList.d.ts +13 -5
- package/dist/types/components/SpecList/SpecList.d.ts.map +1 -1
- package/dist/types/components/Thumbnail/Thumbnail.d.ts +77 -0
- package/dist/types/components/Thumbnail/Thumbnail.d.ts.map +1 -0
- package/dist/types/components/Thumbnail/index.d.ts +2 -0
- package/dist/types/components/Thumbnail/index.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/scripts/build-tokens.js +12 -1
- package/tokens/t1-primitives/motion.json +21 -0
- package/tokens/t2-alias/base.json +17 -0
- package/tokens/t3-semantics/ui.json +12 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/* Thumbnail Component Styles - Using Muka Design Tokens */
|
|
2
|
+
|
|
3
|
+
.muka-thumbnail {
|
|
4
|
+
position: relative;
|
|
5
|
+
flex-shrink: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* The frame carries the border, background and shape clip. Keeping it separate
|
|
9
|
+
from the root lets the remove (×) button sit outside the clip (needed for the
|
|
10
|
+
circular/ellipse shape, whose corners would otherwise clip the button). */
|
|
11
|
+
.muka-thumbnail__frame {
|
|
12
|
+
position: absolute;
|
|
13
|
+
inset: 0;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
border: var(--border-width-regular, 1px) solid var(--color-black-alpha-3);
|
|
16
|
+
border-radius: var(--border-radius-lg);
|
|
17
|
+
background-color: var(--color-surface-level1);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* ─── Shapes ──────────────────────────────────────────── */
|
|
21
|
+
.muka-thumbnail--4-3 {
|
|
22
|
+
width: 160px;
|
|
23
|
+
height: 120px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.muka-thumbnail--1-1 {
|
|
27
|
+
width: 120px;
|
|
28
|
+
height: 120px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.muka-thumbnail--ellipse {
|
|
32
|
+
width: 120px;
|
|
33
|
+
height: 120px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.muka-thumbnail--ellipse .muka-thumbnail__frame {
|
|
37
|
+
border-radius: var(--border-radius-full);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Image fills the frame, cropped to cover. Sits at scale(1) by default so the
|
|
41
|
+
interactive hover zoom has a clean origin. */
|
|
42
|
+
.muka-thumbnail__image {
|
|
43
|
+
position: absolute;
|
|
44
|
+
inset: 0;
|
|
45
|
+
width: 100%;
|
|
46
|
+
height: 100%;
|
|
47
|
+
object-fit: cover;
|
|
48
|
+
display: block;
|
|
49
|
+
transform-origin: center;
|
|
50
|
+
/* Micro-interaction: hover zoom eases out over the "micro" duration. */
|
|
51
|
+
transition: transform var(--motion-duration-micro) var(--motion-easing-enter);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* ─── Interactive (click-to-enlarge) ──────────────────── */
|
|
55
|
+
.muka-thumbnail__trigger {
|
|
56
|
+
position: absolute;
|
|
57
|
+
inset: 0;
|
|
58
|
+
padding: 0;
|
|
59
|
+
border: 0;
|
|
60
|
+
background: none;
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.muka-thumbnail__trigger:focus-visible {
|
|
66
|
+
outline: 2px solid var(--color-border-focus);
|
|
67
|
+
outline-offset: -2px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* On hover the image scales up ~8px (160px → 168px) with an ease-out feel. */
|
|
71
|
+
.muka-thumbnail--interactive:hover .muka-thumbnail__image {
|
|
72
|
+
transform: scale(1.05);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* ─── Loading overlay + progress donut ────────────────── */
|
|
76
|
+
.muka-thumbnail__overlay {
|
|
77
|
+
position: absolute;
|
|
78
|
+
inset: 0;
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
background-color: var(--dialog-color-backdrop);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.muka-thumbnail__progress {
|
|
86
|
+
width: 40px;
|
|
87
|
+
height: 40px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* ─── Error / corrupt state ───────────────────────────── */
|
|
91
|
+
.muka-thumbnail--error .muka-thumbnail__frame {
|
|
92
|
+
background-color: var(--alias-color-state-error-muted);
|
|
93
|
+
border-color: var(--alias-color-state-error-default);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.muka-thumbnail__error {
|
|
97
|
+
position: absolute;
|
|
98
|
+
inset: 0;
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-direction: column;
|
|
101
|
+
align-items: center;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
gap: var(--spacing-2);
|
|
104
|
+
padding: var(--spacing-3);
|
|
105
|
+
text-align: center;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.muka-thumbnail__error-icon {
|
|
109
|
+
color: var(--alert-color-error-accent);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.muka-thumbnail__caption {
|
|
113
|
+
max-width: 100%;
|
|
114
|
+
overflow: hidden;
|
|
115
|
+
text-overflow: ellipsis;
|
|
116
|
+
white-space: nowrap;
|
|
117
|
+
color: var(--alert-color-error-accent);
|
|
118
|
+
font-family: var(--text-body-sm-regular-fontFamily);
|
|
119
|
+
font-size: var(--text-body-sm-regular-fontSize);
|
|
120
|
+
font-weight: var(--text-body-sm-regular-fontWeight);
|
|
121
|
+
line-height: var(--text-body-sm-regular-lineHeight);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* ─── Remove (×) button ───────────────────────────────── */
|
|
125
|
+
.muka-thumbnail__remove {
|
|
126
|
+
position: absolute;
|
|
127
|
+
top: var(--spacing-2);
|
|
128
|
+
right: var(--spacing-2);
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
justify-content: center;
|
|
132
|
+
width: var(--size-2xl);
|
|
133
|
+
height: var(--size-2xl);
|
|
134
|
+
padding: 0;
|
|
135
|
+
color: var(--button-color-tertiary-foreground-default);
|
|
136
|
+
background-color: var(--button-color-tertiary-background-default);
|
|
137
|
+
border: var(--border-width-regular, 1px) solid var(--button-color-tertiary-border-default);
|
|
138
|
+
border-radius: var(--border-radius-lg);
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
transition: background-color var(--motion-duration-micro) var(--motion-easing-enter),
|
|
141
|
+
border-color var(--motion-duration-micro) var(--motion-easing-enter);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.muka-thumbnail__remove:hover {
|
|
145
|
+
color: var(--button-color-tertiary-foreground-hover);
|
|
146
|
+
background-color: var(--button-color-tertiary-background-hover);
|
|
147
|
+
border-color: var(--button-color-tertiary-border-hover);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.muka-thumbnail__remove:active {
|
|
151
|
+
color: var(--button-color-tertiary-foreground-pressed);
|
|
152
|
+
background-color: var(--button-color-tertiary-background-pressed);
|
|
153
|
+
border-color: var(--button-color-tertiary-border-pressed);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.muka-thumbnail__remove:focus-visible {
|
|
157
|
+
outline: 2px solid var(--color-border-focus);
|
|
158
|
+
outline-offset: 2px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* ─── Reduced motion ──────────────────────────────────── */
|
|
162
|
+
@media (prefers-reduced-motion: reduce) {
|
|
163
|
+
.muka-thumbnail__image,
|
|
164
|
+
.muka-thumbnail__remove {
|
|
165
|
+
transition: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.muka-thumbnail--interactive:hover .muka-thumbnail__image {
|
|
169
|
+
transform: none;
|
|
170
|
+
}
|
|
171
|
+
}
|