@threadlabs/looma 0.23.15 → 0.23.16
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-icon-button/ui-icon-button.html +27 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-icon-button.css +28 -0
- package/vanilla/UiIconButton.d.ts +1 -0
- package/vanilla/UiIconButton.js +4 -1
- package/vue/UiIconButton.d.ts +9 -0
- package/vue/UiIconButton.vue +46 -0
- package/vue/chunks/UiIconButton.js +24 -1
- package/vue/components.css +59 -36
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
<prop name="size" type="keyword" values="sm, md, lg" default="md"
|
|
12
12
|
>Button and icon size together: sm is 1.75rem with a small icon, md is 2rem, and lg is 2.5rem with a large icon. On touch, every size gets an invisible hit
|
|
13
13
|
area of at least 44px.</prop>
|
|
14
|
+
<prop name="matchButton" type="boolean" default="false"
|
|
15
|
+
>Matches a boxed Button of the same size when the two share a flex row. Uses the control-size theme tokens and stretches to the row's height, including
|
|
16
|
+
touch-sized controls. Leave it off for compact toolbar and inline icon buttons.</prop>
|
|
14
17
|
<prop name="variant" type="keyword" values="ghost, outline, solid" default="ghost"
|
|
15
18
|
>Emphasis. ghost shows only the icon until it is hovered, for toolbars and dense rows; outline adds a border on the default surface; solid fills with the
|
|
16
19
|
accent colour, for the one primary action in a group.</prop>
|
|
@@ -23,6 +26,7 @@
|
|
|
23
26
|
from:disabled="disabled"
|
|
24
27
|
type="button"
|
|
25
28
|
from:aria-label="label"
|
|
29
|
+
from:data-match-button="matchButton"
|
|
26
30
|
from:aria-disabled="{ true: 'true', false: null }[format('%s', loading or pending)]"
|
|
27
31
|
from:aria-busy="loading or pending"
|
|
28
32
|
>
|
|
@@ -245,6 +249,29 @@
|
|
|
245
249
|
min-block-size: var(--ui-icon-button-size, var(--_size));
|
|
246
250
|
}
|
|
247
251
|
|
|
252
|
+
/* A text button's companion uses control geometry; compact icon buttons keep their own density. */
|
|
253
|
+
:host-state([matchButton]) {
|
|
254
|
+
--_size: var(--ui-control-size-md);
|
|
255
|
+
block-size: auto;
|
|
256
|
+
align-self: stretch;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
:host-state([matchButton][size="sm"]) {
|
|
260
|
+
--_size: var(--ui-control-size-sm);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
:host-state([matchButton][size="lg"]) {
|
|
264
|
+
--_size: var(--ui-control-size-lg);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
@media (pointer: coarse) {
|
|
268
|
+
:host-state([matchButton]) {
|
|
269
|
+
inline-size: max(var(--ui-icon-button-size, var(--_size)), var(--ui-control-min-block-size));
|
|
270
|
+
min-inline-size: max(var(--ui-icon-button-size, var(--_size)), var(--ui-control-min-block-size));
|
|
271
|
+
min-block-size: max(var(--ui-icon-button-size, var(--_size)), var(--ui-control-min-block-size));
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
248
275
|
:host-state([round]) {
|
|
249
276
|
border-radius: var(--ui-radius-round);
|
|
250
277
|
}
|