@med-o/ui 0.1.0 → 0.3.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/index.d.ts +366 -150
- package/dist/index.js +1342 -944
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -0
- package/package.json +6 -7
- package/src/avatar/avatar.css +1 -1
- package/src/badge/badge.css +1 -1
- package/src/bottom-sheet/bottom-sheet.css +1 -1
- package/src/breadcrumbs/breadcrumbs.css +2 -2
- package/src/button/button.css +2 -2
- package/src/card/card.css +1 -1
- package/src/checkbox/choice.css +1 -1
- package/src/combobox/combobox.css +1 -1
- package/src/dialog/dialog.css +1 -1
- package/src/list/list.css +2 -2
- package/src/list-view/list-view.css +1 -1
- package/src/listbox/listbox.css +1 -1
- package/src/menu/menu.css +1 -1
- package/src/navigation/navigation.css +0 -1
- package/src/popover/popover.css +1 -1
- package/src/select/select.css +1 -1
- package/src/styles.css +48 -40
- package/src/switch/switch.css +1 -1
- package/src/table/table.css +11 -1
- package/src/tabs/tabs.css +1 -1
- package/src/tag/tag.css +1 -1
- package/src/text-field/input.css +1 -1
- package/src/toast/toast.css +1 -1
- package/src/toggle-button/toggle-button.css +1 -1
- package/src/tooltip/tooltip.css +1 -1
- package/src/upload/upload.css +1 -1
package/src/styles.css
CHANGED
|
@@ -1,40 +1,48 @@
|
|
|
1
|
-
/*
|
|
2
|
-
@import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@
|
|
9
|
-
|
|
10
|
-
@import './
|
|
11
|
-
@import './
|
|
12
|
-
@import './
|
|
13
|
-
@import './
|
|
14
|
-
@import './
|
|
15
|
-
@import './
|
|
16
|
-
@import './
|
|
17
|
-
@import './
|
|
18
|
-
@import './
|
|
19
|
-
@import './
|
|
20
|
-
@import './
|
|
21
|
-
@import './
|
|
22
|
-
@import './
|
|
23
|
-
@import './
|
|
24
|
-
@import './
|
|
25
|
-
@import './
|
|
26
|
-
@import './
|
|
27
|
-
@import './
|
|
28
|
-
@import './
|
|
29
|
-
@import './
|
|
30
|
-
@import './
|
|
31
|
-
@import './
|
|
32
|
-
@import './
|
|
33
|
-
@import './
|
|
34
|
-
@import './
|
|
35
|
-
@import './
|
|
36
|
-
@import './
|
|
37
|
-
@import './
|
|
38
|
-
@import './
|
|
39
|
-
@import './
|
|
40
|
-
@import './
|
|
1
|
+
/*
|
|
2
|
+
* All component styles of @med-o/ui. Needs the tokens: @import "@med-o/design-tokens/css";
|
|
3
|
+
*
|
|
4
|
+
* Cascade layers: every component style sits in the layer `components`. CSS without a layer (your app) always
|
|
5
|
+
* wins over it, whatever the specificity – no !important needed. With Tailwind v4 the utilities win as well.
|
|
6
|
+
* The first line fixes the order of the layers (the same as Tailwind v4), so it holds in any import order.
|
|
7
|
+
*/
|
|
8
|
+
@layer theme, base, components, utilities;
|
|
9
|
+
|
|
10
|
+
@import './utils/utilities.css' layer(components);
|
|
11
|
+
@import './button/button.css' layer(components);
|
|
12
|
+
@import './field/field.css' layer(components);
|
|
13
|
+
@import './text-field/input.css' layer(components);
|
|
14
|
+
@import './checkbox/choice.css' layer(components);
|
|
15
|
+
@import './switch/switch.css' layer(components);
|
|
16
|
+
@import './badge/badge.css' layer(components);
|
|
17
|
+
@import './tag/tag.css' layer(components);
|
|
18
|
+
@import './avatar/avatar.css' layer(components);
|
|
19
|
+
@import './tooltip/tooltip.css' layer(components);
|
|
20
|
+
@import './progress/progress.css' layer(components);
|
|
21
|
+
@import './list/list.css' layer(components);
|
|
22
|
+
@import './list-view/list-view.css' layer(components);
|
|
23
|
+
@import './bulk-action-bar/bulk-action-bar.css' layer(components);
|
|
24
|
+
@import './empty-state/empty-state.css' layer(components);
|
|
25
|
+
@import './pagination/pagination.css' layer(components);
|
|
26
|
+
@import './search/search.css' layer(components);
|
|
27
|
+
@import './breadcrumbs/breadcrumbs.css' layer(components);
|
|
28
|
+
@import './accordion/accordion.css' layer(components);
|
|
29
|
+
@import './slider/slider.css' layer(components);
|
|
30
|
+
@import './toggle-button/toggle-button.css' layer(components);
|
|
31
|
+
@import './listbox/listbox.css' layer(components);
|
|
32
|
+
@import './select/select.css' layer(components);
|
|
33
|
+
@import './combobox/combobox.css' layer(components);
|
|
34
|
+
@import './bottom-sheet/bottom-sheet.css' layer(components);
|
|
35
|
+
@import './menu/menu.css' layer(components);
|
|
36
|
+
@import './dialog/dialog.css' layer(components);
|
|
37
|
+
@import './drawer/drawer.css' layer(components);
|
|
38
|
+
@import './link/link.css' layer(components);
|
|
39
|
+
@import './alert/alert.css' layer(components);
|
|
40
|
+
@import './toast/toast.css' layer(components);
|
|
41
|
+
@import './tabs/tabs.css' layer(components);
|
|
42
|
+
@import './popover/popover.css' layer(components);
|
|
43
|
+
@import './navigation/navigation.css' layer(components);
|
|
44
|
+
@import './card/card.css' layer(components);
|
|
45
|
+
@import './table/table.css' layer(components);
|
|
46
|
+
@import './upload/upload.css' layer(components);
|
|
47
|
+
@import './date-time/date-time.css' layer(components);
|
|
48
|
+
@import './media/media.css' layer(components);
|
package/src/switch/switch.css
CHANGED
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
border-radius: var(--medo-radius-full);
|
|
64
64
|
background-color: var(--medo-color-text-on-action);
|
|
65
65
|
color: var(--_track);
|
|
66
|
-
/* The thumb moves with a snappy spring
|
|
66
|
+
/* The thumb moves with a snappy spring. */
|
|
67
67
|
transition:
|
|
68
68
|
transform var(--medo-motion-spring-snappy-duration) var(--medo-motion-spring-snappy),
|
|
69
69
|
color var(--medo-motion-duration-fast) var(--medo-motion-easing-standard);
|
package/src/table/table.css
CHANGED
|
@@ -23,6 +23,12 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/* Without the frame, e.g. inside a card or a documentation page. */
|
|
26
|
+
/* Scrolls sideways: the container takes the focus (see StaticTable), so it needs a visible ring. */
|
|
27
|
+
.medo-table-container:focus-visible {
|
|
28
|
+
outline: none;
|
|
29
|
+
box-shadow: var(--medo-shadow-focus-ring);
|
|
30
|
+
}
|
|
31
|
+
|
|
26
32
|
.medo-table-container--plain {
|
|
27
33
|
border: 0;
|
|
28
34
|
border-radius: 0;
|
|
@@ -167,7 +173,7 @@
|
|
|
167
173
|
padding-inline: var(--medo-space-4) 0;
|
|
168
174
|
}
|
|
169
175
|
|
|
170
|
-
/* Row feedback fades; pressed shows at once
|
|
176
|
+
/* Row feedback fades; pressed shows at once, so a tap feels immediate. */
|
|
171
177
|
.medo-table__row > .medo-table__cell {
|
|
172
178
|
transition: background-color var(--medo-motion-duration-fast) var(--medo-motion-easing-standard);
|
|
173
179
|
}
|
|
@@ -235,6 +241,10 @@
|
|
|
235
241
|
.medo-table__row[data-focus-visible] {
|
|
236
242
|
outline-color: Highlight;
|
|
237
243
|
}
|
|
244
|
+
.medo-table-container:focus-visible {
|
|
245
|
+
outline: 2px solid Highlight;
|
|
246
|
+
outline-offset: 2px;
|
|
247
|
+
}
|
|
238
248
|
}
|
|
239
249
|
|
|
240
250
|
/* ---------- Frame: toolbar – table – footer in one bordered surface ---------- */
|
package/src/tabs/tabs.css
CHANGED
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
border-radius: inherit;
|
|
140
140
|
background-color: var(--medo-color-surface-thumb);
|
|
141
141
|
box-shadow: var(--medo-shadow-elevation-1);
|
|
142
|
-
/* SelectionIndicator animates translate and size from the previous tab – a snappy spring
|
|
142
|
+
/* SelectionIndicator animates translate and size from the previous tab – a snappy spring, so the eye follows the selection. */
|
|
143
143
|
transition:
|
|
144
144
|
translate var(--medo-motion-spring-snappy-duration) var(--medo-motion-spring-snappy),
|
|
145
145
|
width var(--medo-motion-spring-snappy-duration) var(--medo-motion-spring-snappy);
|
package/src/tag/tag.css
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Compact pill for a value. Two roles, never mixed:
|
|
5
5
|
* removable – a chosen value (multi-select): the x removes it
|
|
6
|
-
* selectable – a filter: the whole tag toggles, a check marks
|
|
6
|
+
* selectable – a filter: the whole tag toggles, a check marks “selected”
|
|
7
7
|
*
|
|
8
8
|
* Structure:
|
|
9
9
|
* <div class="medo-tag medo-tag--md [medo-tag--selectable]">
|
package/src/text-field/input.css
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* </div>
|
|
9
9
|
* <textarea class="medo-textarea medo-textarea--md"></textarea>
|
|
10
10
|
*
|
|
11
|
-
* Sizes sm / md / lg = 32 / 40 / 48 px. Mobile and touch: always lg (16 px text prevents
|
|
11
|
+
* Sizes sm / md / lg = 32 / 40 / 48 px. Mobile and touch: always lg (16 px text prevents the automatic zoom of mobile browsers).
|
|
12
12
|
* Focus: the border turns focus/ring plus 1 px inside (flush, no outer band).
|
|
13
13
|
*/
|
|
14
14
|
|
package/src/toast/toast.css
CHANGED
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
/* ---------- Motion (View Transitions
|
|
132
|
+
/* ---------- Motion (View Transitions): in slides up with a smooth spring, out fades and shrinks a little;
|
|
133
133
|
* the other toasts glide to their new place with the same spring. ---------- */
|
|
134
134
|
|
|
135
135
|
::view-transition-group(.medo-toast) {
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
border-radius: var(--medo-radius-sm);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
/* The selected fill is an indicator that slides between the items with a snappy spring
|
|
71
|
+
/* The selected fill is an indicator that slides between the items with a snappy spring. */
|
|
72
72
|
.medo-toggle-group--segmented .medo-toggle:is([data-selected], [aria-pressed='true']) {
|
|
73
73
|
--_bg: transparent;
|
|
74
74
|
}
|
package/src/tooltip/tooltip.css
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
white-space: nowrap;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
/* Motion
|
|
33
|
+
/* Motion: fades in and settles from 96 % at the trigger; out: a quick fade without movement. */
|
|
34
34
|
.medo-tooltip {
|
|
35
35
|
transform-origin: var(--trigger-anchor-point, top);
|
|
36
36
|
transition:
|
package/src/upload/upload.css
CHANGED
|
@@ -344,7 +344,7 @@
|
|
|
344
344
|
color: var(--medo-color-feedback-danger-text);
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
/* New files slide in softly
|
|
347
|
+
/* New files slide in softly, so the eye finds them. */
|
|
348
348
|
.medo-upload__item {
|
|
349
349
|
transition:
|
|
350
350
|
opacity var(--medo-motion-duration-normal) var(--medo-motion-easing-enter),
|