@rcarls/rc-snackbar 0.5.0 → 0.7.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/CHANGELOG.md +34 -0
- package/dist/custom-elements.json +1 -1
- package/dist/{rc-snackbar-GsVuC2lu.js → rc-snackbar-ByjvYQQg.js} +17 -92
- package/dist/rc-snackbar-ByjvYQQg.js.map +1 -0
- package/dist/rc-snackbar-define.js +1 -1
- package/dist/rc-snackbar.js +1 -1
- package/dist/types/packages/rc-snackbar/src/rc-snackbar.d.ts +7 -1
- package/package.json +1 -1
- package/dist/rc-snackbar-GsVuC2lu.js.map +0 -1
- package/dist/types/packages/rc-snackbar/src/rc-snackbar.test.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @rcarls/rc-snackbar
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 57338f5: `rc-dialog`, `rc-bottom-sheet`, and `rc-snackbar` now fade in and out through
|
|
8
|
+
CSS alone, using `@starting-style` and a discrete `display`/`overlay`
|
|
9
|
+
transition, driven by the shared `--rc-motion-effects-*` tokens (and
|
|
10
|
+
`--rc-motion-spatial-*` for `rc-snackbar`'s slide). `showModal()`/`show()`/
|
|
11
|
+
`close()` all stay synchronous, and nothing in any of the three components
|
|
12
|
+
waits on the transition finishing, so a zero-duration theme or a browser
|
|
13
|
+
without support for the CSS involved both degrade to an instant, fully
|
|
14
|
+
correct open and close.
|
|
15
|
+
|
|
16
|
+
`rc-dialog` and `rc-bottom-sheet` animate opacity only, not a scale or slide
|
|
17
|
+
transform: both support pointer resize and read `getBoundingClientRect()` to
|
|
18
|
+
compute drag deltas, and a transform is a visual effect that
|
|
19
|
+
`getBoundingClientRect()` reports for as long as it's still animating,
|
|
20
|
+
corrupting that measurement if a resize or drag starts during the entrance.
|
|
21
|
+
`rc-snackbar` has no such feature, so it fades and slides up from the
|
|
22
|
+
block-end edge it's anchored to.
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- 5c006de: Ship component CSS minified. Package builds now run the CSS in Lit `css` styles
|
|
27
|
+
and light-DOM structural styles through Lightning CSS, removing comments and
|
|
28
|
+
whitespace while keeping source maps that resolve to each template. Rendered
|
|
29
|
+
styles are unchanged.
|
|
30
|
+
|
|
31
|
+
`@rcarls/rc-common` adds `cssText`, an identity tag that marks a plain CSS
|
|
32
|
+
string for minification. `rc-chip`, `rc-disclosure`, and `rc-accordion` now
|
|
33
|
+
depend on `@rcarls/rc-common` for it.
|
|
34
|
+
|
|
35
|
+
## 0.6.0
|
|
36
|
+
|
|
3
37
|
## 0.5.0
|
|
4
38
|
|
|
5
39
|
## 0.4.2
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"declarations": [
|
|
79
79
|
{
|
|
80
80
|
"kind": "class",
|
|
81
|
-
"description": "Snackbar live-region host for brief status messages and optional actions.",
|
|
81
|
+
"description": "Snackbar live-region host for brief status messages and optional actions.\n\nFades and slides in from the block-end edge it's anchored to through CSS\nalone (`@starting-style` plus a discrete `display` transition), using the\nshared `--rc-motion-effects-*`/`--rc-motion-spatial-*` tokens.\n`show()`/`close()` stay synchronous; nothing waits on the transition\nfinishing.",
|
|
82
82
|
"name": "RCSnackbar",
|
|
83
83
|
"cssProperties": [
|
|
84
84
|
{
|
|
@@ -1,85 +1,10 @@
|
|
|
1
1
|
import { css as u, LitElement as d, html as h } from "lit";
|
|
2
2
|
import { property as i } from "lit/decorators.js";
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var(--rc-snackbar-inset-block-end, 1rem) + env(safe-area-inset-bottom, 0px)
|
|
9
|
-
);
|
|
10
|
-
z-index: var(--rc-snackbar-z-index, 1000);
|
|
11
|
-
display: none;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
pointer-events: none;
|
|
14
|
-
color-scheme: inherit;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
:host([hidden]) {
|
|
18
|
-
display: none;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
:host([open]) {
|
|
22
|
-
display: flex;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
[part='surface'] {
|
|
26
|
-
pointer-events: auto;
|
|
27
|
-
display: flex;
|
|
28
|
-
align-items: center;
|
|
29
|
-
gap: var(--rc-snackbar-gap, 0.5rem);
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
min-block-size: var(--rc-snackbar-min-block-size, 3rem);
|
|
32
|
-
inline-size: min(100%, var(--rc-snackbar-max-inline-size, 30rem));
|
|
33
|
-
padding-block: var(--rc-snackbar-padding-block, 0.5rem);
|
|
34
|
-
padding-inline: var(--rc-snackbar-padding-inline, 1rem);
|
|
35
|
-
border: var(--rc-snackbar-border, 1px solid CanvasText);
|
|
36
|
-
border-radius: var(--rc-snackbar-radius, 0);
|
|
37
|
-
background: var(--rc-snackbar-bg, Canvas);
|
|
38
|
-
color: var(--rc-snackbar-color, CanvasText);
|
|
39
|
-
box-shadow: var(--rc-snackbar-shadow, none);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
[part='message'] {
|
|
43
|
-
flex: 1 1 auto;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
[part='action'] {
|
|
47
|
-
flex: 0 0 auto;
|
|
48
|
-
display: none;
|
|
49
|
-
border: var(--rc-snackbar-action-border, revert);
|
|
50
|
-
border-radius: var(--rc-snackbar-action-radius, revert);
|
|
51
|
-
padding-block: var(--rc-snackbar-action-padding-block, revert);
|
|
52
|
-
padding-inline: var(--rc-snackbar-action-padding-inline, revert);
|
|
53
|
-
background: var(--rc-snackbar-action-bg, revert);
|
|
54
|
-
color: var(--rc-snackbar-action-color, revert);
|
|
55
|
-
font: var(--rc-snackbar-action-font, revert);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
:host([action-label]) [part='action'] {
|
|
59
|
-
display: inline-flex;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
[part='action']:focus-visible {
|
|
63
|
-
outline: var(--rc-snackbar-focus-ring, revert);
|
|
64
|
-
outline-offset: var(--rc-snackbar-focus-ring-offset, revert);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@media (forced-colors: active) {
|
|
68
|
-
[part='surface'] {
|
|
69
|
-
border: 1px solid CanvasText;
|
|
70
|
-
background: CanvasText;
|
|
71
|
-
color: Canvas;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
[part='action'] {
|
|
75
|
-
color: Highlight;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
`;
|
|
79
|
-
var f = Object.defineProperty, v = Object.getOwnPropertyDescriptor, n = (p, e, t, s) => {
|
|
80
|
-
for (var r = s > 1 ? void 0 : s ? v(e, t) : e, o = p.length - 1, c; o >= 0; o--)
|
|
81
|
-
(c = p[o]) && (r = (s ? c(e, t, r) : c(r)) || r);
|
|
82
|
-
return s && r && f(e, t, r), r;
|
|
3
|
+
const f = u`:host{inset-inline:var(--rc-snackbar-inset-inline,1rem);z-index:var(--rc-snackbar-z-index,1000);pointer-events:none;color-scheme:inherit;justify-content:center;display:none;position:fixed;inset-block-end:calc(var(--rc-snackbar-inset-block-end,1rem) + env(safe-area-inset-bottom,0px))}:host([hidden]){display:none}:host([open]){display:flex}@media (prefers-reduced-motion:no-preference){:host{opacity:0;translate:0 100%}:host([open]){opacity:1;transition:opacity var(--rc-motion-effects-duration-default,.2s) var(--rc-motion-effects-easing-enter,ease-out), translate var(--rc-motion-spatial-duration-default,.4s) var(--rc-motion-spatial-easing-enter,ease-out), display var(--rc-motion-effects-duration-default,.2s) allow-discrete;translate:none}:host(:not([open])){transition:opacity var(--rc-motion-effects-duration-default,.2s) var(--rc-motion-effects-easing-exit,ease-in), translate var(--rc-motion-spatial-duration-default,.4s) var(--rc-motion-spatial-easing-exit,ease-in), display var(--rc-motion-effects-duration-default,.2s) allow-discrete}@starting-style{:host([open]){opacity:0;translate:0 100%}}}[part=surface]{pointer-events:auto;align-items:center;gap:var(--rc-snackbar-gap,.5rem);box-sizing:border-box;min-block-size:var(--rc-snackbar-min-block-size,3rem);inline-size:min(100%, var(--rc-snackbar-max-inline-size,30rem));padding-block:var(--rc-snackbar-padding-block,.5rem);padding-inline:var(--rc-snackbar-padding-inline,1rem);border:var(--rc-snackbar-border,1px solid CanvasText);border-radius:var(--rc-snackbar-radius,0);background:var(--rc-snackbar-bg,Canvas);color:var(--rc-snackbar-color,CanvasText);box-shadow:var(--rc-snackbar-shadow,none);display:flex}[part=message]{flex:auto}[part=action]{border:var(--rc-snackbar-action-border,revert);border-radius:var(--rc-snackbar-action-radius,revert);padding-block:var(--rc-snackbar-action-padding-block,revert);padding-inline:var(--rc-snackbar-action-padding-inline,revert);background:var(--rc-snackbar-action-bg,revert);color:var(--rc-snackbar-action-color,revert);font:var(--rc-snackbar-action-font,revert);flex:none;display:none}:host([action-label]) [part=action]{display:inline-flex}[part=action]:focus-visible{outline:var(--rc-snackbar-focus-ring,revert);outline-offset:var(--rc-snackbar-focus-ring-offset,revert)}@media (forced-colors:active){[part=surface]{color:canvas;background:canvastext;border:1px solid canvastext}[part=action]{color:highlight}}`;
|
|
4
|
+
var b = Object.defineProperty, v = Object.getOwnPropertyDescriptor, n = (p, e, t, s) => {
|
|
5
|
+
for (var a = s > 1 ? void 0 : s ? v(e, t) : e, o = p.length - 1, c; o >= 0; o--)
|
|
6
|
+
(c = p[o]) && (a = (s ? c(e, t, a) : c(a)) || a);
|
|
7
|
+
return s && a && b(e, t, a), a;
|
|
83
8
|
};
|
|
84
9
|
const l = class l extends d {
|
|
85
10
|
constructor() {
|
|
@@ -156,8 +81,8 @@ const l = class l extends d {
|
|
|
156
81
|
detail: { reason: e, message: s }
|
|
157
82
|
})
|
|
158
83
|
), t) {
|
|
159
|
-
const
|
|
160
|
-
|
|
84
|
+
const a = this._queue.shift();
|
|
85
|
+
a && queueMicrotask(() => this._showNow(a));
|
|
161
86
|
}
|
|
162
87
|
}
|
|
163
88
|
_handleAction() {
|
|
@@ -173,27 +98,27 @@ const l = class l extends d {
|
|
|
173
98
|
window.clearTimeout(this._timer), this._timer = void 0;
|
|
174
99
|
}
|
|
175
100
|
};
|
|
176
|
-
l.styles =
|
|
177
|
-
let
|
|
101
|
+
l.styles = f;
|
|
102
|
+
let r = l;
|
|
178
103
|
n([
|
|
179
104
|
i({ type: Boolean, reflect: !0 })
|
|
180
|
-
],
|
|
105
|
+
], r.prototype, "open", 1);
|
|
181
106
|
n([
|
|
182
107
|
i({ type: Boolean, attribute: "default-open" })
|
|
183
|
-
],
|
|
108
|
+
], r.prototype, "defaultOpen", 1);
|
|
184
109
|
n([
|
|
185
110
|
i({ type: String, reflect: !0 })
|
|
186
|
-
],
|
|
111
|
+
], r.prototype, "message", 2);
|
|
187
112
|
n([
|
|
188
113
|
i({ type: String, attribute: "action-label", reflect: !0 })
|
|
189
|
-
],
|
|
114
|
+
], r.prototype, "actionLabel", 2);
|
|
190
115
|
n([
|
|
191
116
|
i({ type: Number })
|
|
192
|
-
],
|
|
117
|
+
], r.prototype, "duration", 2);
|
|
193
118
|
n([
|
|
194
119
|
i({ type: String, attribute: "queue-policy" })
|
|
195
|
-
],
|
|
120
|
+
], r.prototype, "queuePolicy", 2);
|
|
196
121
|
export {
|
|
197
|
-
|
|
122
|
+
r as R
|
|
198
123
|
};
|
|
199
|
-
//# sourceMappingURL=rc-snackbar-
|
|
124
|
+
//# sourceMappingURL=rc-snackbar-ByjvYQQg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rc-snackbar-ByjvYQQg.js","sources":["../src/rc-snackbar.styles.ts","../src/rc-snackbar.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const snackbarStyles = css`\n :host {\n position: fixed;\n inset-inline: var(--rc-snackbar-inset-inline, 1rem);\n inset-block-end: calc(\n var(--rc-snackbar-inset-block-end, 1rem) + env(safe-area-inset-bottom, 0px)\n );\n z-index: var(--rc-snackbar-z-index, 1000);\n display: none;\n justify-content: center;\n pointer-events: none;\n color-scheme: inherit;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n :host([open]) {\n display: flex;\n }\n\n /*\n * Fade and slide up from the block-end edge it's anchored to. Unlike\n * rc-dialog/rc-bottom-sheet, nothing here reads getBoundingClientRect()\n * during the entrance, so a transform is safe: the host is a fixed\n * positioning wrapper with no resize or drag feature of its own.\n * show()/close() stay synchronous either way.\n */\n @media (prefers-reduced-motion: no-preference) {\n :host {\n opacity: 0;\n translate: 0 100%;\n }\n\n :host([open]) {\n opacity: 1;\n translate: none;\n transition:\n opacity var(--rc-motion-effects-duration-default, 200ms)\n var(--rc-motion-effects-easing-enter, ease-out),\n translate var(--rc-motion-spatial-duration-default, 400ms)\n var(--rc-motion-spatial-easing-enter, ease-out),\n display var(--rc-motion-effects-duration-default, 200ms) allow-discrete;\n }\n\n :host(:not([open])) {\n transition:\n opacity var(--rc-motion-effects-duration-default, 200ms)\n var(--rc-motion-effects-easing-exit, ease-in),\n translate var(--rc-motion-spatial-duration-default, 400ms)\n var(--rc-motion-spatial-easing-exit, ease-in),\n display var(--rc-motion-effects-duration-default, 200ms) allow-discrete;\n }\n\n @starting-style {\n :host([open]) {\n opacity: 0;\n translate: 0 100%;\n }\n }\n }\n\n [part='surface'] {\n pointer-events: auto;\n display: flex;\n align-items: center;\n gap: var(--rc-snackbar-gap, 0.5rem);\n box-sizing: border-box;\n min-block-size: var(--rc-snackbar-min-block-size, 3rem);\n inline-size: min(100%, var(--rc-snackbar-max-inline-size, 30rem));\n padding-block: var(--rc-snackbar-padding-block, 0.5rem);\n padding-inline: var(--rc-snackbar-padding-inline, 1rem);\n border: var(--rc-snackbar-border, 1px solid CanvasText);\n border-radius: var(--rc-snackbar-radius, 0);\n background: var(--rc-snackbar-bg, Canvas);\n color: var(--rc-snackbar-color, CanvasText);\n box-shadow: var(--rc-snackbar-shadow, none);\n }\n\n [part='message'] {\n flex: 1 1 auto;\n }\n\n [part='action'] {\n flex: 0 0 auto;\n display: none;\n border: var(--rc-snackbar-action-border, revert);\n border-radius: var(--rc-snackbar-action-radius, revert);\n padding-block: var(--rc-snackbar-action-padding-block, revert);\n padding-inline: var(--rc-snackbar-action-padding-inline, revert);\n background: var(--rc-snackbar-action-bg, revert);\n color: var(--rc-snackbar-action-color, revert);\n font: var(--rc-snackbar-action-font, revert);\n }\n\n :host([action-label]) [part='action'] {\n display: inline-flex;\n }\n\n [part='action']:focus-visible {\n outline: var(--rc-snackbar-focus-ring, revert);\n outline-offset: var(--rc-snackbar-focus-ring-offset, revert);\n }\n\n @media (forced-colors: active) {\n [part='surface'] {\n border: 1px solid CanvasText;\n background: CanvasText;\n color: Canvas;\n }\n\n [part='action'] {\n color: Highlight;\n }\n }\n`;\n\nexport default snackbarStyles;\n","import { LitElement, html } from 'lit';\nimport type { PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport snackbarStyles from './rc-snackbar.styles.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'rc-snackbar': RCSnackbar;\n }\n\n interface HTMLElementEventMap {\n 'rc-snackbar-action': CustomEvent<RCSnackbarActionDetail>;\n 'rc-snackbar-close': CustomEvent<RCSnackbarCloseDetail>;\n }\n}\n\n/** Snackbar queue behavior when `show()` is called while open. */\nexport type RCSnackbarQueuePolicy = 'queue' | 'replace';\n\n/** Close reasons surfaced by `rc-snackbar-close`. */\nexport type RCSnackbarCloseReason = 'action' | 'api' | 'timeout' | 'replace' | 'clear';\n\n/** Options accepted by `show()`. */\nexport interface RCSnackbarShowOptions {\n /** Message text to announce. */\n message: string;\n /** Optional action button label. */\n actionLabel?: string;\n /** Auto-close duration in milliseconds. */\n duration?: number;\n}\n\n/** Detail payload for `rc-snackbar-action`. */\nexport interface RCSnackbarActionDetail {\n /** Message that was visible when the action was activated. */\n message: string;\n}\n\n/** Detail payload for `rc-snackbar-close`. */\nexport interface RCSnackbarCloseDetail {\n /** Close reason. */\n reason: RCSnackbarCloseReason;\n /** Message that closed. */\n message: string;\n}\n\n/**\n * Snackbar live-region host for brief status messages and optional actions.\n *\n * Fades and slides in from the block-end edge it's anchored to through CSS\n * alone (`@starting-style` plus a discrete `display` transition), using the\n * shared `--rc-motion-effects-*`/`--rc-motion-spatial-*` tokens.\n * `show()`/`close()` stay synchronous; nothing waits on the transition\n * finishing.\n *\n * @see {@link https://richardcarls.github.io/rc-webcomponents/components/rc-snackbar rc-snackbar docs}\n *\n * @fires rc-snackbar-action - Fired when the action button is activated.\n * @fires rc-snackbar-close - Fired after a visible snackbar closes.\n *\n * @csspart surface - Snackbar surface.\n * @csspart message - Message text.\n * @csspart action - Optional action button.\n *\n * @attr open - Whether a snackbar is currently visible. Host writes are silent.\n * @attr default-open - Initial visible state for uncontrolled usage.\n * @attr message - Visible snackbar message.\n * @attr action-label - Optional action button label.\n * @attr duration - Auto-close duration in milliseconds.\n * @attr queue-policy - `queue` appends while open; `replace` closes the current message.\n *\n * @cssprop [--rc-snackbar-inset-inline=1rem] - Inline-axis inset from the viewport edge.\n * @cssprop [--rc-snackbar-inset-block-end=1rem] - Block-end inset from the viewport edge, before\n * the safe-area inset.\n * @cssprop [--rc-snackbar-z-index=1000] - Stacking order.\n * @cssprop [--rc-snackbar-gap=0.5rem] - Gap between the message and action.\n * @cssprop [--rc-snackbar-min-block-size=3rem] - Minimum surface block size.\n * @cssprop [--rc-snackbar-max-inline-size=30rem] - Maximum surface inline size.\n * @cssprop [--rc-snackbar-padding-block=0.5rem] - Surface block-axis padding.\n * @cssprop [--rc-snackbar-padding-inline=1rem] - Surface inline-axis padding.\n * @cssprop [--rc-snackbar-border=1px solid CanvasText] - Surface border.\n * @cssprop [--rc-snackbar-radius=0] - Surface border radius.\n * @cssprop [--rc-snackbar-bg=Canvas] - Surface background.\n * @cssprop [--rc-snackbar-color=CanvasText] - Surface text color.\n * @cssprop [--rc-snackbar-shadow=none] - Surface box shadow.\n * @cssprop [--rc-snackbar-action-border] - Action button border; defers to native button\n * border when unset.\n * @cssprop [--rc-snackbar-action-radius] - Action button border radius; defers to native button\n * radius when unset.\n * @cssprop [--rc-snackbar-action-padding-block] - Action button block-axis padding; defers to\n * native button padding when unset.\n * @cssprop [--rc-snackbar-action-padding-inline] - Action button inline-axis padding; defers to\n * native button padding when unset.\n * @cssprop [--rc-snackbar-action-bg] - Action button background; defers to native button\n * background when unset.\n * @cssprop [--rc-snackbar-action-color] - Action button text color; defers to native button\n * color when unset.\n * @cssprop [--rc-snackbar-action-font] - Action button font shorthand; defers to native button\n * font when unset.\n * @cssprop [--rc-snackbar-focus-ring] - Action button focus outline; defers to native focus\n * styling when unset.\n * @cssprop [--rc-snackbar-focus-ring-offset] - Action button focus outline offset; defers to\n * native focus styling when unset.\n */\nexport class RCSnackbar extends LitElement {\n static override styles = snackbarStyles;\n\n private _queue: RCSnackbarShowOptions[] = [];\n private _timer: number | undefined;\n private _lastMessage = '';\n\n private _open: boolean | undefined;\n private _defaultOpen = false;\n private _openInitialized = false;\n\n /** Whether the snackbar is currently visible. Host writes are silent. */\n @property({ type: Boolean, reflect: true })\n get open(): boolean {\n return this._open ?? this._defaultOpen;\n }\n\n set open(value: boolean | undefined) {\n const oldValue = this.open;\n\n this._open = value;\n this._openInitialized = true;\n this.requestUpdate('open', oldValue);\n }\n\n /** Initial visible state for uncontrolled usage, such as an already-queued\n * message shown on first render. */\n @property({ type: Boolean, attribute: 'default-open' })\n get defaultOpen(): boolean {\n return this._defaultOpen;\n }\n\n set defaultOpen(value: boolean) {\n const oldValue = this._defaultOpen;\n\n this._defaultOpen = value;\n\n if (!this._openInitialized && this._open === undefined) {\n this.requestUpdate('open', oldValue);\n }\n\n this.requestUpdate('defaultOpen', oldValue);\n }\n\n /** Visible message text. */\n @property({ type: String, reflect: true })\n message = '';\n\n /** Optional action button label. */\n @property({ type: String, attribute: 'action-label', reflect: true })\n actionLabel = '';\n\n /** Auto-close duration in milliseconds. Set to 0 to keep open. */\n @property({ type: Number })\n duration = 4000;\n\n /** Queue behavior for show calls while open. */\n @property({ type: String, attribute: 'queue-policy' })\n queuePolicy: RCSnackbarQueuePolicy = 'queue';\n\n override disconnectedCallback(): void {\n this._clearTimer();\n super.disconnectedCallback();\n }\n\n protected override updated(changed: PropertyValues<this>): void {\n if (changed.has('open') && !this.open) {\n this._clearTimer();\n }\n }\n\n protected override render() {\n return html`\n <div part=\"surface\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n <span part=\"message\">${this.message}</span>\n <button part=\"action\" type=\"button\" @click=${this._handleAction}>\n ${this.actionLabel}\n </button>\n </div>\n `;\n }\n\n /**\n * Shows a message or queues it according to `queuePolicy`.\n *\n * @example\n * snackbar.show({\n * message: 'Recipe saved',\n * actionLabel: 'Undo',\n * duration: 6000,\n * });\n */\n show(message: string | RCSnackbarShowOptions): void {\n const next = typeof message === 'string' ? { message } : message;\n\n if (this.open) {\n if (this.queuePolicy === 'replace') {\n this._closeCurrent('replace', false);\n this._showNow(next);\n } else {\n this._queue.push(next);\n }\n\n return;\n }\n\n this._showNow(next);\n }\n\n /** Closes the current snackbar. */\n close(reason: RCSnackbarCloseReason = 'api'): void {\n this._closeCurrent(reason, true);\n }\n\n /** Clears the current snackbar and all queued messages. */\n clear(): void {\n this._queue = [];\n this._closeCurrent('clear', false);\n }\n\n private _showNow(next: RCSnackbarShowOptions): void {\n const duration = next.duration ?? this.duration;\n\n this._clearTimer();\n this.message = next.message;\n this.actionLabel = next.actionLabel ?? '';\n this._lastMessage = next.message;\n this.open = true;\n\n if (duration > 0) {\n this._timer = window.setTimeout(() => this._closeCurrent('timeout', true), duration);\n }\n }\n\n private _closeCurrent(reason: RCSnackbarCloseReason, showNext: boolean): void {\n if (!this.open) {\n return;\n }\n\n const message = this.message;\n\n this._clearTimer();\n this.open = false;\n this.message = '';\n this.actionLabel = '';\n\n this.dispatchEvent(\n new CustomEvent<RCSnackbarCloseDetail>('rc-snackbar-close', {\n bubbles: true,\n composed: true,\n detail: { reason, message },\n }),\n );\n\n if (showNext) {\n const next = this._queue.shift();\n\n if (next) {\n queueMicrotask(() => this._showNow(next));\n }\n }\n }\n\n private _handleAction(): void {\n if (!this.open) {\n return;\n }\n\n this.dispatchEvent(\n new CustomEvent<RCSnackbarActionDetail>('rc-snackbar-action', {\n bubbles: true,\n composed: true,\n detail: { message: this._lastMessage },\n }),\n );\n\n this._closeCurrent('action', true);\n }\n\n private _clearTimer(): void {\n window.clearTimeout(this._timer);\n this._timer = undefined;\n }\n}\n\nexport default RCSnackbar;\n"],"names":["snackbarStyles","css","_RCSnackbar","LitElement","value","oldValue","changed","html","message","next","reason","duration","showNext","RCSnackbar","__decorateClass","property"],"mappings":";;AAEO,MAAMA,IAAiBC;;;;;;ACuGvB,MAAMC,IAAN,MAAMA,UAAmBC,EAAW;AAAA,EAApC,cAAA;AAAA,UAAA,GAAA,SAAA,GAGL,KAAQ,SAAkC,CAAA,GAE1C,KAAQ,eAAe,IAGvB,KAAQ,eAAe,IACvB,KAAQ,mBAAmB,IAqC3B,KAAA,UAAU,IAIV,KAAA,cAAc,IAId,KAAA,WAAW,KAIX,KAAA,cAAqC;AAAA,EAAA;AAAA,EA7CrC,IAAI,OAAgB;AAClB,WAAO,KAAK,SAAS,KAAK;AAAA,EAC5B;AAAA,EAEA,IAAI,KAAKC,GAA4B;AACnC,UAAMC,IAAW,KAAK;AAEtB,SAAK,QAAQD,GACb,KAAK,mBAAmB,IACxB,KAAK,cAAc,QAAQC,CAAQ;AAAA,EACrC;AAAA,EAKA,IAAI,cAAuB;AACzB,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAI,YAAYD,GAAgB;AAC9B,UAAMC,IAAW,KAAK;AAEtB,SAAK,eAAeD,GAEhB,CAAC,KAAK,oBAAoB,KAAK,UAAU,UAC3C,KAAK,cAAc,QAAQC,CAAQ,GAGrC,KAAK,cAAc,eAAeA,CAAQ;AAAA,EAC5C;AAAA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AC,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,QAAQ,WAAW,gBAAgB;AAAA,GAzD1CF,EA0DX,WAAA,eAAA,CAAA;"}
|
package/dist/rc-snackbar.js
CHANGED
|
@@ -36,6 +36,12 @@ export interface RCSnackbarCloseDetail {
|
|
|
36
36
|
/**
|
|
37
37
|
* Snackbar live-region host for brief status messages and optional actions.
|
|
38
38
|
*
|
|
39
|
+
* Fades and slides in from the block-end edge it's anchored to through CSS
|
|
40
|
+
* alone (`@starting-style` plus a discrete `display` transition), using the
|
|
41
|
+
* shared `--rc-motion-effects-*`/`--rc-motion-spatial-*` tokens.
|
|
42
|
+
* `show()`/`close()` stay synchronous; nothing waits on the transition
|
|
43
|
+
* finishing.
|
|
44
|
+
*
|
|
39
45
|
* @see {@link https://richardcarls.github.io/rc-webcomponents/components/rc-snackbar rc-snackbar docs}
|
|
40
46
|
*
|
|
41
47
|
* @fires rc-snackbar-action - Fired when the action button is activated.
|
|
@@ -110,7 +116,7 @@ export declare class RCSnackbar extends LitElement {
|
|
|
110
116
|
queuePolicy: RCSnackbarQueuePolicy;
|
|
111
117
|
disconnectedCallback(): void;
|
|
112
118
|
protected updated(changed: PropertyValues<this>): void;
|
|
113
|
-
protected render(): import('lit').TemplateResult<1>;
|
|
119
|
+
protected render(): import('lit-html').TemplateResult<1>;
|
|
114
120
|
/**
|
|
115
121
|
* Shows a message or queues it according to `queuePolicy`.
|
|
116
122
|
*
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rc-snackbar-GsVuC2lu.js","sources":["../src/rc-snackbar.styles.ts","../src/rc-snackbar.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const snackbarStyles = css`\n :host {\n position: fixed;\n inset-inline: var(--rc-snackbar-inset-inline, 1rem);\n inset-block-end: calc(\n var(--rc-snackbar-inset-block-end, 1rem) + env(safe-area-inset-bottom, 0px)\n );\n z-index: var(--rc-snackbar-z-index, 1000);\n display: none;\n justify-content: center;\n pointer-events: none;\n color-scheme: inherit;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n :host([open]) {\n display: flex;\n }\n\n [part='surface'] {\n pointer-events: auto;\n display: flex;\n align-items: center;\n gap: var(--rc-snackbar-gap, 0.5rem);\n box-sizing: border-box;\n min-block-size: var(--rc-snackbar-min-block-size, 3rem);\n inline-size: min(100%, var(--rc-snackbar-max-inline-size, 30rem));\n padding-block: var(--rc-snackbar-padding-block, 0.5rem);\n padding-inline: var(--rc-snackbar-padding-inline, 1rem);\n border: var(--rc-snackbar-border, 1px solid CanvasText);\n border-radius: var(--rc-snackbar-radius, 0);\n background: var(--rc-snackbar-bg, Canvas);\n color: var(--rc-snackbar-color, CanvasText);\n box-shadow: var(--rc-snackbar-shadow, none);\n }\n\n [part='message'] {\n flex: 1 1 auto;\n }\n\n [part='action'] {\n flex: 0 0 auto;\n display: none;\n border: var(--rc-snackbar-action-border, revert);\n border-radius: var(--rc-snackbar-action-radius, revert);\n padding-block: var(--rc-snackbar-action-padding-block, revert);\n padding-inline: var(--rc-snackbar-action-padding-inline, revert);\n background: var(--rc-snackbar-action-bg, revert);\n color: var(--rc-snackbar-action-color, revert);\n font: var(--rc-snackbar-action-font, revert);\n }\n\n :host([action-label]) [part='action'] {\n display: inline-flex;\n }\n\n [part='action']:focus-visible {\n outline: var(--rc-snackbar-focus-ring, revert);\n outline-offset: var(--rc-snackbar-focus-ring-offset, revert);\n }\n\n @media (forced-colors: active) {\n [part='surface'] {\n border: 1px solid CanvasText;\n background: CanvasText;\n color: Canvas;\n }\n\n [part='action'] {\n color: Highlight;\n }\n }\n`;\n\nexport default snackbarStyles;\n","import { LitElement, html } from 'lit';\nimport type { PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\n\nimport snackbarStyles from './rc-snackbar.styles.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'rc-snackbar': RCSnackbar;\n }\n\n interface HTMLElementEventMap {\n 'rc-snackbar-action': CustomEvent<RCSnackbarActionDetail>;\n 'rc-snackbar-close': CustomEvent<RCSnackbarCloseDetail>;\n }\n}\n\n/** Snackbar queue behavior when `show()` is called while open. */\nexport type RCSnackbarQueuePolicy = 'queue' | 'replace';\n\n/** Close reasons surfaced by `rc-snackbar-close`. */\nexport type RCSnackbarCloseReason = 'action' | 'api' | 'timeout' | 'replace' | 'clear';\n\n/** Options accepted by `show()`. */\nexport interface RCSnackbarShowOptions {\n /** Message text to announce. */\n message: string;\n /** Optional action button label. */\n actionLabel?: string;\n /** Auto-close duration in milliseconds. */\n duration?: number;\n}\n\n/** Detail payload for `rc-snackbar-action`. */\nexport interface RCSnackbarActionDetail {\n /** Message that was visible when the action was activated. */\n message: string;\n}\n\n/** Detail payload for `rc-snackbar-close`. */\nexport interface RCSnackbarCloseDetail {\n /** Close reason. */\n reason: RCSnackbarCloseReason;\n /** Message that closed. */\n message: string;\n}\n\n/**\n * Snackbar live-region host for brief status messages and optional actions.\n *\n * @see {@link https://richardcarls.github.io/rc-webcomponents/components/rc-snackbar rc-snackbar docs}\n *\n * @fires rc-snackbar-action - Fired when the action button is activated.\n * @fires rc-snackbar-close - Fired after a visible snackbar closes.\n *\n * @csspart surface - Snackbar surface.\n * @csspart message - Message text.\n * @csspart action - Optional action button.\n *\n * @attr open - Whether a snackbar is currently visible. Host writes are silent.\n * @attr default-open - Initial visible state for uncontrolled usage.\n * @attr message - Visible snackbar message.\n * @attr action-label - Optional action button label.\n * @attr duration - Auto-close duration in milliseconds.\n * @attr queue-policy - `queue` appends while open; `replace` closes the current message.\n *\n * @cssprop [--rc-snackbar-inset-inline=1rem] - Inline-axis inset from the viewport edge.\n * @cssprop [--rc-snackbar-inset-block-end=1rem] - Block-end inset from the viewport edge, before\n * the safe-area inset.\n * @cssprop [--rc-snackbar-z-index=1000] - Stacking order.\n * @cssprop [--rc-snackbar-gap=0.5rem] - Gap between the message and action.\n * @cssprop [--rc-snackbar-min-block-size=3rem] - Minimum surface block size.\n * @cssprop [--rc-snackbar-max-inline-size=30rem] - Maximum surface inline size.\n * @cssprop [--rc-snackbar-padding-block=0.5rem] - Surface block-axis padding.\n * @cssprop [--rc-snackbar-padding-inline=1rem] - Surface inline-axis padding.\n * @cssprop [--rc-snackbar-border=1px solid CanvasText] - Surface border.\n * @cssprop [--rc-snackbar-radius=0] - Surface border radius.\n * @cssprop [--rc-snackbar-bg=Canvas] - Surface background.\n * @cssprop [--rc-snackbar-color=CanvasText] - Surface text color.\n * @cssprop [--rc-snackbar-shadow=none] - Surface box shadow.\n * @cssprop [--rc-snackbar-action-border] - Action button border; defers to native button\n * border when unset.\n * @cssprop [--rc-snackbar-action-radius] - Action button border radius; defers to native button\n * radius when unset.\n * @cssprop [--rc-snackbar-action-padding-block] - Action button block-axis padding; defers to\n * native button padding when unset.\n * @cssprop [--rc-snackbar-action-padding-inline] - Action button inline-axis padding; defers to\n * native button padding when unset.\n * @cssprop [--rc-snackbar-action-bg] - Action button background; defers to native button\n * background when unset.\n * @cssprop [--rc-snackbar-action-color] - Action button text color; defers to native button\n * color when unset.\n * @cssprop [--rc-snackbar-action-font] - Action button font shorthand; defers to native button\n * font when unset.\n * @cssprop [--rc-snackbar-focus-ring] - Action button focus outline; defers to native focus\n * styling when unset.\n * @cssprop [--rc-snackbar-focus-ring-offset] - Action button focus outline offset; defers to\n * native focus styling when unset.\n */\nexport class RCSnackbar extends LitElement {\n static override styles = snackbarStyles;\n\n private _queue: RCSnackbarShowOptions[] = [];\n private _timer: number | undefined;\n private _lastMessage = '';\n\n private _open: boolean | undefined;\n private _defaultOpen = false;\n private _openInitialized = false;\n\n /** Whether the snackbar is currently visible. Host writes are silent. */\n @property({ type: Boolean, reflect: true })\n get open(): boolean {\n return this._open ?? this._defaultOpen;\n }\n\n set open(value: boolean | undefined) {\n const oldValue = this.open;\n\n this._open = value;\n this._openInitialized = true;\n this.requestUpdate('open', oldValue);\n }\n\n /** Initial visible state for uncontrolled usage, such as an already-queued\n * message shown on first render. */\n @property({ type: Boolean, attribute: 'default-open' })\n get defaultOpen(): boolean {\n return this._defaultOpen;\n }\n\n set defaultOpen(value: boolean) {\n const oldValue = this._defaultOpen;\n\n this._defaultOpen = value;\n\n if (!this._openInitialized && this._open === undefined) {\n this.requestUpdate('open', oldValue);\n }\n\n this.requestUpdate('defaultOpen', oldValue);\n }\n\n /** Visible message text. */\n @property({ type: String, reflect: true })\n message = '';\n\n /** Optional action button label. */\n @property({ type: String, attribute: 'action-label', reflect: true })\n actionLabel = '';\n\n /** Auto-close duration in milliseconds. Set to 0 to keep open. */\n @property({ type: Number })\n duration = 4000;\n\n /** Queue behavior for show calls while open. */\n @property({ type: String, attribute: 'queue-policy' })\n queuePolicy: RCSnackbarQueuePolicy = 'queue';\n\n override disconnectedCallback(): void {\n this._clearTimer();\n super.disconnectedCallback();\n }\n\n protected override updated(changed: PropertyValues<this>): void {\n if (changed.has('open') && !this.open) {\n this._clearTimer();\n }\n }\n\n protected override render() {\n return html`\n <div part=\"surface\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n <span part=\"message\">${this.message}</span>\n <button part=\"action\" type=\"button\" @click=${this._handleAction}>\n ${this.actionLabel}\n </button>\n </div>\n `;\n }\n\n /**\n * Shows a message or queues it according to `queuePolicy`.\n *\n * @example\n * snackbar.show({\n * message: 'Recipe saved',\n * actionLabel: 'Undo',\n * duration: 6000,\n * });\n */\n show(message: string | RCSnackbarShowOptions): void {\n const next = typeof message === 'string' ? { message } : message;\n\n if (this.open) {\n if (this.queuePolicy === 'replace') {\n this._closeCurrent('replace', false);\n this._showNow(next);\n } else {\n this._queue.push(next);\n }\n\n return;\n }\n\n this._showNow(next);\n }\n\n /** Closes the current snackbar. */\n close(reason: RCSnackbarCloseReason = 'api'): void {\n this._closeCurrent(reason, true);\n }\n\n /** Clears the current snackbar and all queued messages. */\n clear(): void {\n this._queue = [];\n this._closeCurrent('clear', false);\n }\n\n private _showNow(next: RCSnackbarShowOptions): void {\n const duration = next.duration ?? this.duration;\n\n this._clearTimer();\n this.message = next.message;\n this.actionLabel = next.actionLabel ?? '';\n this._lastMessage = next.message;\n this.open = true;\n\n if (duration > 0) {\n this._timer = window.setTimeout(() => this._closeCurrent('timeout', true), duration);\n }\n }\n\n private _closeCurrent(reason: RCSnackbarCloseReason, showNext: boolean): void {\n if (!this.open) {\n return;\n }\n\n const message = this.message;\n\n this._clearTimer();\n this.open = false;\n this.message = '';\n this.actionLabel = '';\n\n this.dispatchEvent(\n new CustomEvent<RCSnackbarCloseDetail>('rc-snackbar-close', {\n bubbles: true,\n composed: true,\n detail: { reason, message },\n }),\n );\n\n if (showNext) {\n const next = this._queue.shift();\n\n if (next) {\n queueMicrotask(() => this._showNow(next));\n }\n }\n }\n\n private _handleAction(): void {\n if (!this.open) {\n return;\n }\n\n this.dispatchEvent(\n new CustomEvent<RCSnackbarActionDetail>('rc-snackbar-action', {\n bubbles: true,\n composed: true,\n detail: { message: this._lastMessage },\n }),\n );\n\n this._closeCurrent('action', true);\n }\n\n private _clearTimer(): void {\n window.clearTimeout(this._timer);\n this._timer = undefined;\n }\n}\n\nexport default RCSnackbar;\n"],"names":["snackbarStyles","css","_RCSnackbar","LitElement","value","oldValue","changed","html","message","next","reason","duration","showNext","RCSnackbar","__decorateClass","property"],"mappings":";;AAEO,MAAMA,IAAiBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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