@threadlabs/looma 0.23.11 → 0.23.13
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/components/ui-badge/ui-badge.html +16 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-badge.css +20 -8
- package/vue/UiBadge.vue +16 -6
- package/vue/chunks/UiBadge.js +2 -2
- package/vue/components.css +48 -38
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<defs>
|
|
3
3
|
<prop name="variant" type="keyword" values="solid, subtle, outline" default="subtle"
|
|
4
4
|
>Emphasis. subtle sets toned text over a soft wash; solid fills with the tone and uses contrasting text; outline keeps the surface with a toned edge.
|
|
5
|
-
Neutral looks the same in solid and subtle.</prop>
|
|
5
|
+
Neutral looks the same in solid and subtle. When space is constrained, the label truncates with an ellipsis while its full text remains available.</prop>
|
|
6
6
|
<prop name="tone" type="keyword" values="neutral, accent, info, success, warning, danger" default="neutral"
|
|
7
7
|
>Which colour the badge speaks in. neutral is a quiet grey for plain labels; accent draws the eye in the accent colour; info, success, warning, and danger
|
|
8
8
|
mark a status, so match the tone to what the badge says. For a category rather than a status, set the --ui-badge-color hook on the badge instead: any CSS
|
|
@@ -89,7 +89,9 @@
|
|
|
89
89
|
display: inline-flex;
|
|
90
90
|
align-items: center;
|
|
91
91
|
justify-content: center;
|
|
92
|
-
|
|
92
|
+
box-sizing: border-box;
|
|
93
|
+
min-inline-size: 0;
|
|
94
|
+
max-inline-size: 100%;
|
|
93
95
|
padding: var(--ui-badge-padding-block, var(--ui-space-0-5)) var(--ui-badge-padding-inline, var(--ui-space-2));
|
|
94
96
|
border: var(--ui-border-width) solid var(--ui-badge-border, var(--_badge-color-border, var(--_badge-border)));
|
|
95
97
|
border-radius: var(--ui-radius-round);
|
|
@@ -102,9 +104,17 @@
|
|
|
102
104
|
white-space: nowrap;
|
|
103
105
|
}
|
|
104
106
|
|
|
105
|
-
/*
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
/* A constrained badge keeps its surface intact and ellipsizes only its label. The full
|
|
108
|
+
text stays in the DOM for accessible names and consumers' selected values. */
|
|
109
|
+
.label {
|
|
110
|
+
display: block;
|
|
111
|
+
min-inline-size: 0;
|
|
112
|
+
overflow: hidden;
|
|
113
|
+
text-overflow: ellipsis;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Trim leading while retaining the font's ascent and descent. A cap-to-baseline box
|
|
117
|
+
would crop glyphs where the label clips horizontal overflow for ellipsis. */
|
|
108
118
|
@supports (text-box-trim: trim-both) {
|
|
109
119
|
:host {
|
|
110
120
|
display: inline-block;
|
|
@@ -112,7 +122,7 @@
|
|
|
112
122
|
text-align: center;
|
|
113
123
|
align-content: center;
|
|
114
124
|
text-box-trim: trim-both;
|
|
115
|
-
text-box-edge:
|
|
125
|
+
text-box-edge: text;
|
|
116
126
|
}
|
|
117
127
|
}
|
|
118
128
|
|