@dorsk/tsumikit 0.67.0 → 0.67.1
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/README.md +8 -4
- package/dist/components/atoms/Button.svelte +7 -7
- package/dist/components/molecules/FileButton.svelte +2 -2
- package/dist/components/molecules/FileButton.svelte.d.ts +1 -1
- package/dist/components/molecules/IconButton.svelte +1 -1
- package/dist/components/molecules/Popover.svelte +5 -6
- package/dist/components/molecules/Popover.svelte.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -852,10 +852,14 @@ glyphs (`size` stays the SVG px, emoji ×1.35).
|
|
|
852
852
|
On `(pointer: coarse)` every icon-only/square control (and `Popover`'s default
|
|
853
853
|
trigger) carries an invisible `::after` slab that extends its hit area to
|
|
854
854
|
`--touch-target` (44px, WCAG 2.5.8) without moving layout; fine pointers are
|
|
855
|
-
untouched. The slab
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
855
|
+
untouched. The slab is the centred target with its inline-*end* half cut off:
|
|
856
|
+
44px tall, and the box plus half the deficit wide (34px for a 24px icon).
|
|
857
|
+
Inline-end overflow would count towards the scrollable overflow of every scroll
|
|
858
|
+
ancestor, so a button near the right edge of an `overflow-y: auto` container
|
|
859
|
+
would make it scroll sideways; in a row that half lies under the next sibling's
|
|
860
|
+
slab anyway. Growing the whole deficit towards the start instead would let each
|
|
861
|
+
slab cover the previous sibling's centre, so taps would land one icon to the
|
|
862
|
+
right.
|
|
859
863
|
`hitArea="compact"` opts a dense-table row out. `Button
|
|
860
864
|
collapseLabel="mobile" | "container"` hides `<span data-label>` children below
|
|
861
865
|
40rem viewport / 30rem container, drops to icon padding, and names the button
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
// container (`container`) so the button becomes icon-only; the hidden text
|
|
52
52
|
// becomes the aria-label unless one is set.
|
|
53
53
|
collapseLabel?: 'never' | 'mobile' | 'container';
|
|
54
|
-
// Icon-only/square buttons grow a
|
|
54
|
+
// Icon-only/square buttons grow a touch hit slab on coarse pointers without
|
|
55
55
|
// moving layout; `compact` opts out in dense tables.
|
|
56
56
|
hitArea?: 'auto' | 'compact';
|
|
57
57
|
// Async/busy state: shows a spinner, blocks clicks, sets aria-busy. Stays
|
|
@@ -507,12 +507,12 @@
|
|
|
507
507
|
}
|
|
508
508
|
|
|
509
509
|
/* Coarse pointers: icon-only and square buttons carry an invisible slab that
|
|
510
|
-
extends the hit area
|
|
510
|
+
extends the hit area towards --touch-target without changing layout. Buttons
|
|
511
511
|
already at or above the target keep their own box (inset never positive).
|
|
512
|
-
The slab
|
|
513
|
-
towards the scrollable overflow of every scroll ancestor,
|
|
514
|
-
|
|
515
|
-
|
|
512
|
+
The slab is the centred target with its inline-end half cut off: inline-end
|
|
513
|
+
overflow counts towards the scrollable overflow of every scroll ancestor, and
|
|
514
|
+
in a row that half lies under the next sibling anyway. Growing further towards
|
|
515
|
+
the start would let each slab cover the previous sibling's centre. */
|
|
516
516
|
@media (pointer: coarse) {
|
|
517
517
|
.btn-icon:not(.hit-compact),
|
|
518
518
|
.btn-icon-inline:not(.hit-compact),
|
|
@@ -529,7 +529,7 @@
|
|
|
529
529
|
content: '';
|
|
530
530
|
position: absolute;
|
|
531
531
|
inset-block: min(0px, calc((100% - var(--touch-target)) / 2));
|
|
532
|
-
inset-inline-start: min(0px, calc(100% - var(--touch-target)));
|
|
532
|
+
inset-inline-start: min(0px, calc((100% - var(--touch-target)) / 2));
|
|
533
533
|
inset-inline-end: 0;
|
|
534
534
|
}
|
|
535
535
|
}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
control?: boolean;
|
|
46
46
|
/** Shared square box scale (`--box-xs/sm/md/lg`); implies `iconOnly`. */
|
|
47
47
|
box?: 'xs' | 'sm' | 'md' | 'lg';
|
|
48
|
-
/** Icon-only buttons grow a
|
|
48
|
+
/** Icon-only buttons grow a touch hit slab on coarse pointers; `compact` opts out. */
|
|
49
49
|
hitArea?: 'auto' | 'compact';
|
|
50
50
|
class?: string;
|
|
51
51
|
} = $props();
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
content: '';
|
|
159
159
|
position: absolute;
|
|
160
160
|
inset-block: min(0px, calc((100% - var(--touch-target)) / 2));
|
|
161
|
-
inset-inline-start: min(0px, calc(100% - var(--touch-target)));
|
|
161
|
+
inset-inline-start: min(0px, calc((100% - var(--touch-target)) / 2));
|
|
162
162
|
inset-inline-end: 0;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
@@ -24,7 +24,7 @@ type $$ComponentProps = {
|
|
|
24
24
|
control?: boolean;
|
|
25
25
|
/** Shared square box scale (`--box-xs/sm/md/lg`); implies `iconOnly`. */
|
|
26
26
|
box?: 'xs' | 'sm' | 'md' | 'lg';
|
|
27
|
-
/** Icon-only buttons grow a
|
|
27
|
+
/** Icon-only buttons grow a touch hit slab on coarse pointers; `compact` opts out. */
|
|
28
28
|
hitArea?: 'auto' | 'compact';
|
|
29
29
|
class?: string;
|
|
30
30
|
};
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
// Exact glyph size for SVG *and* text glyphs (px number or any CSS length),
|
|
35
35
|
// no emoji multiplier. Wins over `size`.
|
|
36
36
|
glyphSize?: number | string;
|
|
37
|
-
// Opt out of the
|
|
37
|
+
// Opt out of the coarse-pointer hit slab in dense rows.
|
|
38
38
|
hitArea?: 'auto' | 'compact';
|
|
39
39
|
// Borderless, compact icon affordance (chip-remove ✕, inline edit ✎) —
|
|
40
40
|
// no square box; just a muted glyph that brightens on hover. Pair with
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
/** Use the shared `--control-height` toolbar/composer contract. */
|
|
62
62
|
control?: boolean;
|
|
63
63
|
block?: boolean;
|
|
64
|
-
/** Icon-only triggers grow a
|
|
64
|
+
/** Icon-only triggers grow a touch hit slab on coarse pointers; `compact` opts out. */
|
|
65
65
|
hitArea?: 'auto' | 'compact';
|
|
66
66
|
/** Corner count indicator on the trigger, as on `Button`: hidden at
|
|
67
67
|
* 0/undefined, capped at `countMax+`, the exact number joins `label`. */
|
|
@@ -449,10 +449,9 @@
|
|
|
449
449
|
padding: var(--pop-trigger-pad, 0);
|
|
450
450
|
flex: none;
|
|
451
451
|
}
|
|
452
|
-
/* Coarse pointers: icon-only triggers extend their hit area
|
|
453
|
-
via an invisible slab; layout does not move.
|
|
454
|
-
inline
|
|
455
|
-
(see Button.svelte). */
|
|
452
|
+
/* Coarse pointers: icon-only triggers extend their hit area towards --touch-target
|
|
453
|
+
via an invisible slab; layout does not move. Same geometry as Button.svelte:
|
|
454
|
+
no inline-end growth, half the deficit towards the inline start. */
|
|
456
455
|
@media (pointer: coarse) {
|
|
457
456
|
.pop-trigger:not(.canonical, .hit-compact) {
|
|
458
457
|
position: relative;
|
|
@@ -461,7 +460,7 @@
|
|
|
461
460
|
content: '';
|
|
462
461
|
position: absolute;
|
|
463
462
|
inset-block: min(0px, calc((100% - var(--touch-target)) / 2));
|
|
464
|
-
inset-inline-start: min(0px, calc(100% - var(--touch-target)));
|
|
463
|
+
inset-inline-start: min(0px, calc((100% - var(--touch-target)) / 2));
|
|
465
464
|
inset-inline-end: 0;
|
|
466
465
|
}
|
|
467
466
|
}
|
|
@@ -46,7 +46,7 @@ type Own = {
|
|
|
46
46
|
/** Use the shared `--control-height` toolbar/composer contract. */
|
|
47
47
|
control?: boolean;
|
|
48
48
|
block?: boolean;
|
|
49
|
-
/** Icon-only triggers grow a
|
|
49
|
+
/** Icon-only triggers grow a touch hit slab on coarse pointers; `compact` opts out. */
|
|
50
50
|
hitArea?: 'auto' | 'compact';
|
|
51
51
|
/** Corner count indicator on the trigger, as on `Button`: hidden at
|
|
52
52
|
* 0/undefined, capped at `countMax+`, the exact number joins `label`. */
|
package/package.json
CHANGED