@softistx/pulsarix-widget 0.7.0 → 0.7.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 +2 -2
- package/dist/index.js +31 -13
- package/docs/integration.md +7 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -179,7 +179,7 @@ works, and its limits: [docs/integration.md](docs/integration.md#9-inheriting-th
|
|
|
179
179
|
|
|
180
180
|
## The launcher
|
|
181
181
|
|
|
182
|
-
The launcher is an **edge tab**: a 44 x 44 px icon button docked flush to the viewport edge, rounded on the
|
|
182
|
+
The launcher is an **edge tab**: a 44 x 44 px icon button (24 x 44 px on phones, 600 px or less, with no peek) docked flush to the viewport edge, rounded on the
|
|
183
183
|
content side only, with the pulsarix mark and the unread badge. At rest it peeks 6 px less; it slides fully
|
|
184
184
|
in on hover, focus and while it is dragged. Its label is a tooltip only (hover or keyboard focus, hidden
|
|
185
185
|
while dragging and on touch screens), and its accessible name carries the unread count ("Report a
|
|
@@ -211,7 +211,7 @@ The floating round button, its `position` and its offsets are gone:
|
|
|
211
211
|
| `LauncherOffset`, `Position` types | `LauncherPlacement`, `LauncherSide` |
|
|
212
212
|
|
|
213
213
|
A host that reserved space for the round button (a right padding, say) no longer needs it: the tab is 44 px
|
|
214
|
-
wide, sits on the edge and the reporter can move it out of the way. To clear a sticky bar, use
|
|
214
|
+
wide (24 px on phones), sits on the edge and the reporter can move it out of the way. To clear a sticky bar, use
|
|
215
215
|
`holdLauncher()`.
|
|
216
216
|
|
|
217
217
|
## The report form
|
package/dist/index.js
CHANGED
|
@@ -4739,7 +4739,8 @@ progress::-moz-progress-bar {
|
|
|
4739
4739
|
}
|
|
4740
4740
|
|
|
4741
4741
|
/* The launcher: an edge tab docked flush to the viewport edge (px only, never rem). At rest it
|
|
4742
|
-
peeks 6 px less; it slides fully in on hover, focus, drag and
|
|
4742
|
+
peeks 6 px less (not on phones, where the tab is 24 px wide); it slides fully in on hover, focus, drag and
|
|
4743
|
+
while its menu is open. */
|
|
4743
4744
|
.pulsarix-sr {
|
|
4744
4745
|
position: absolute;
|
|
4745
4746
|
width: 1px;
|
|
@@ -4750,12 +4751,26 @@ progress::-moz-progress-bar {
|
|
|
4750
4751
|
}
|
|
4751
4752
|
.pulsarix-tab {
|
|
4752
4753
|
--dir: 1;
|
|
4754
|
+
--tab-w: 44px;
|
|
4755
|
+
--peek: 6px;
|
|
4753
4756
|
position: fixed;
|
|
4754
4757
|
z-index: 40;
|
|
4755
|
-
/*
|
|
4756
|
-
width:
|
|
4758
|
+
/* The visible width stays on screen at rest after the peek translate: it is the tap target. */
|
|
4759
|
+
width: calc(var(--tab-w) + var(--peek));
|
|
4757
4760
|
height: 44px;
|
|
4758
4761
|
}
|
|
4762
|
+
/* On a phone the tab is 24 x 44 px (WCAG 2.2 target size AA) and does not peek, so it covers less of the
|
|
4763
|
+
host's trailing controls; its hit area is its visible area. */
|
|
4764
|
+
@media (max-width: 600px) {
|
|
4765
|
+
.pulsarix-tab {
|
|
4766
|
+
--tab-w: 24px;
|
|
4767
|
+
--peek: 0px;
|
|
4768
|
+
}
|
|
4769
|
+
.pulsarix-tab-face svg {
|
|
4770
|
+
width: 16px;
|
|
4771
|
+
height: 16px;
|
|
4772
|
+
}
|
|
4773
|
+
}
|
|
4759
4774
|
.pulsarix-tab[hidden] {
|
|
4760
4775
|
display: none;
|
|
4761
4776
|
}
|
|
@@ -4770,7 +4785,7 @@ progress::-moz-progress-bar {
|
|
|
4770
4785
|
position: relative;
|
|
4771
4786
|
display: grid;
|
|
4772
4787
|
place-items: center;
|
|
4773
|
-
width:
|
|
4788
|
+
width: calc(var(--tab-w) + var(--peek));
|
|
4774
4789
|
height: 44px;
|
|
4775
4790
|
padding: 0;
|
|
4776
4791
|
border: 0;
|
|
@@ -4780,20 +4795,21 @@ progress::-moz-progress-bar {
|
|
|
4780
4795
|
box-shadow:
|
|
4781
4796
|
0 0 0 1px var(--background),
|
|
4782
4797
|
0 4px 14px rgb(0 0 0 / 0.25);
|
|
4783
|
-
transform: translateX(calc(var(--dir) *
|
|
4798
|
+
transform: translateX(calc(var(--dir) * var(--peek)));
|
|
4784
4799
|
transition: transform 0.18s ease;
|
|
4785
4800
|
touch-action: none;
|
|
4786
4801
|
user-select: none;
|
|
4787
4802
|
-webkit-user-select: none;
|
|
4788
4803
|
}
|
|
4789
|
-
/* The 6 px that
|
|
4804
|
+
/* The peek (6 px on wide screens, 0 on phones) that slides off screen is padding: the mark stays centred
|
|
4805
|
+
in the visible width (44 px, or 24 px on phones). */
|
|
4790
4806
|
.pulsarix-tab[data-side="right"] .pulsarix-tab-button {
|
|
4791
4807
|
border-radius: 12px 0 0 12px;
|
|
4792
|
-
padding-right:
|
|
4808
|
+
padding-right: var(--peek);
|
|
4793
4809
|
}
|
|
4794
4810
|
.pulsarix-tab[data-side="left"] .pulsarix-tab-button {
|
|
4795
4811
|
border-radius: 0 12px 12px 0;
|
|
4796
|
-
padding-left:
|
|
4812
|
+
padding-left: var(--peek);
|
|
4797
4813
|
}
|
|
4798
4814
|
.pulsarix-tab-button:hover,
|
|
4799
4815
|
.pulsarix-tab-button:focus-visible,
|
|
@@ -4801,23 +4817,25 @@ progress::-moz-progress-bar {
|
|
|
4801
4817
|
.pulsarix-tab[data-dragging] .pulsarix-tab-button {
|
|
4802
4818
|
transform: translateX(0);
|
|
4803
4819
|
}
|
|
4804
|
-
/* A two-tone ring
|
|
4820
|
+
/* A two-tone ring drawn inside the tab so all four sides show at the screen edge, on a light or a dark host:
|
|
4821
|
+
the text colour out, the page colour in. */
|
|
4805
4822
|
.pulsarix-tab-button:focus-visible {
|
|
4806
4823
|
outline: 2px solid transparent;
|
|
4807
4824
|
box-shadow:
|
|
4808
|
-
0 0 0 2px var(--
|
|
4809
|
-
0 0 0
|
|
4825
|
+
inset 0 0 0 2px var(--foreground),
|
|
4826
|
+
inset 0 0 0 4px var(--background),
|
|
4827
|
+
0 0 0 1px var(--background),
|
|
4810
4828
|
0 4px 14px rgb(0 0 0 / 0.25);
|
|
4811
4829
|
}
|
|
4812
4830
|
.pulsarix-tab[data-dragging] .pulsarix-tab-button {
|
|
4813
4831
|
cursor: grabbing;
|
|
4814
4832
|
transition: none;
|
|
4815
4833
|
}
|
|
4816
|
-
/* The face: the 44 px
|
|
4834
|
+
/* The face: the visible width at rest (44 px, 24 px on phones), so the count bubble anchors to the tab, not to the mark. */
|
|
4817
4835
|
.pulsarix-tab-face {
|
|
4818
4836
|
display: grid;
|
|
4819
4837
|
place-items: center;
|
|
4820
|
-
width:
|
|
4838
|
+
width: var(--tab-w);
|
|
4821
4839
|
height: 44px;
|
|
4822
4840
|
}
|
|
4823
4841
|
/* Temporary, until @softistx/material#5669: the count bubble's ring is not drawn in a shadow root. */
|
package/docs/integration.md
CHANGED
|
@@ -477,9 +477,13 @@ The edge tab that opens the dialog. Two options shape it; each has script-tag at
|
|
|
477
477
|
|
|
478
478
|
### Look: `launcher`
|
|
479
479
|
|
|
480
|
-
The launcher is an icon button, 44 x 44 px
|
|
481
|
-
rounded on the content side only.
|
|
482
|
-
|
|
480
|
+
The launcher is an icon button, 44 x 44 px on wide screens, docked flush to the viewport edge and
|
|
481
|
+
rounded on the content side only. On phones (viewport 600 px or less) it is 24 x 44 px: the mark shrinks
|
|
482
|
+
to 16 px, there is no peek, and the hit area is exactly the visible tab.
|
|
483
|
+
To avoid any overlap, reserve `padding-inline-end` (`-start` for a left tab) of 24 px on phones and
|
|
484
|
+
44-48 px on wide screens.
|
|
485
|
+
It wears the pulsarix mark and the unread badge. On wide screens it peeks 6 px less at rest; it slides
|
|
486
|
+
fully in on hover, focus and while dragged. Its label is a tooltip only
|
|
483
487
|
("Report a problem", with "Drag to move" on a second line): shown on hover or keyboard focus after a short
|
|
484
488
|
delay, hidden while dragging and on screens with no hover. The `launcher` option no longer changes its
|
|
485
489
|
look: `"auto"`, `"pill"` and `"icon"` are still read so existing embeds keep working, and `false` removes it
|