@swiftwc/ui 0.0.0-dev.26 → 0.0.0-dev.28

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.
Files changed (33) hide show
  1. package/generated/client/index.d.ts +4 -2
  2. package/generated/client/index.js +14 -5
  3. package/generated/components/bordered-button.js +3 -2
  4. package/generated/components/bordered-prominent-button.js +3 -2
  5. package/generated/components/borderless-button.js +3 -2
  6. package/generated/components/fine-tooltip.js +15 -4
  7. package/generated/components/glass-button.js +3 -2
  8. package/generated/components/glass-prominent-button.js +3 -2
  9. package/generated/components/navigation-title.js +8 -25
  10. package/generated/components/scroll-view.js +8 -12
  11. package/generated/components/tool-bar-item.js +5 -4
  12. package/generated/css/index.css +82 -11
  13. package/generated/i18n/locales/el.d.ts +5 -7
  14. package/generated/i18n/locales/el.js +5 -7
  15. package/generated/i18n/locales/en.d.ts +5 -7
  16. package/generated/i18n/locales/en.js +5 -7
  17. package/generated/internal/utils/button-role.d.ts +1 -1
  18. package/generated/internal/utils/button-role.js +49 -33
  19. package/package.json +1 -1
  20. package/scss/_transitions.scss +1 -1
  21. package/scss/base/_root.scss +1 -1
  22. package/scss/colors/_index.scss +14 -9
  23. package/scss/components/_alert-dialog.scss +6 -0
  24. package/scss/components/_bordered-button.scss +10 -0
  25. package/scss/components/_bordered-prominent-button.scss +15 -3
  26. package/scss/components/_borderless-button.scss +10 -0
  27. package/scss/components/_confirmation-dialog.scss +12 -7
  28. package/scss/components/_glass-button.scss +10 -0
  29. package/scss/components/_glass-prominent-button.scss +15 -3
  30. package/scss/transitions/_alert-dialog.scss +7 -8
  31. package/scss/transitions/_sheet-view.scss +30 -0
  32. package/web-components.html-data/en.json +18 -0
  33. package/scss/transitions/_dialog.scss +0 -28
@@ -1,6 +1,7 @@
1
1
  import { lifecycleObserver } from '../buses';
2
2
  import { I18n } from '../i18n';
3
3
  import { NavigationPath } from '../internal/class/navigation-path';
4
+ import { type NavigationHost } from '../internal/privateNamespace';
4
5
  import { type WebComponentCtor } from '../namespace-browser';
5
6
  import { Snapshot } from '../snapshot';
6
7
  export declare const polyfills: Map<string, WebComponentCtor>;
@@ -18,12 +19,13 @@ export declare const alert: (title?: string, message?: string, actions?: {
18
19
  }[], options?: {
19
20
  titleVisibility?: boolean;
20
21
  }) => Promise<void>;
21
- export declare const confirmationDialog: (trigger: HTMLElement, title: string, actions?: {
22
+ export declare const confirmationDialog: (trigger: HTMLElement, title: string, message?: string, actions?: {
22
23
  label?: string;
23
24
  image?: string;
24
25
  role?: string;
25
26
  }[], options?: {
26
27
  controller?: AbortController;
27
28
  titleVisibility?: boolean;
28
- }) => Promise<unknown>;
29
+ }) => Promise<string>;
29
30
  export { I18n, lifecycleObserver, NavigationPath, Snapshot };
31
+ export { type NavigationHost };
@@ -328,7 +328,11 @@ export const alert = async (title, message, actions, options) => {
328
328
  label.setAttribute('title', message);
329
329
  vStack.insertAdjacentElement('beforeend', label);
330
330
  }
331
- for (const [index, action] of (actions ?? []).entries()) {
331
+ for (const [index, action] of (actions ?? [
332
+ {
333
+ role: 'close',
334
+ },
335
+ ]).entries()) {
332
336
  const btn = $(`<button type="button" tabindex="0" is="bordered-button"></button>`, '>1');
333
337
  btn.setAttribute('value', `${index}`);
334
338
  if (action?.role)
@@ -352,15 +356,20 @@ export const alert = async (title, message, actions, options) => {
352
356
  return promise;
353
357
  });
354
358
  };
355
- export const confirmationDialog = async (trigger, title, actions, options) => {
359
+ export const confirmationDialog = async (trigger, title, message, actions, options) => {
356
360
  const newAnchorName = `--confirmation-dialog-${self.crypto.randomUUID()}`;
357
- const dialog = $(`<dialog is="confirmation-dialog"></dialog>`, '>1');
361
+ const dialog = $(`<dialog is="confirmation-dialog"></dialog>`, '>1'), vStack = dialog.querySelector(':scope>v-stack') ?? dialog.appendChild($(`<v-stack spacing="1" alignment="fill"></v-stack>`, '>1'));
358
362
  trigger.style.setProperty('anchor-name', newAnchorName, 'important'); //$.prop('anchor-name', newAnchorName, trigger, 'important')
359
363
  dialog.style.setProperty('position-anchor', newAnchorName); //$.prop('position-anchor', newAnchorName, dialog)
360
364
  if (title && false !== options?.titleVisibility) {
361
- const label = $(`<label-view></label-view>`, '>1');
365
+ const label = $(`<label-view font="headline"></label-view>`, '>1');
362
366
  label.setAttribute('title', title);
363
- dialog.insertAdjacentElement('beforeend', label);
367
+ vStack.insertAdjacentElement('beforeend', label);
368
+ }
369
+ if (message && false !== options?.titleVisibility) {
370
+ const label = $(`<label-view foreground="secondary" font="callout"></label-view>`, '>1');
371
+ label.setAttribute('title', message);
372
+ vStack.insertAdjacentElement('beforeend', label);
364
373
  }
365
374
  for (const [index, action] of (actions ?? []).entries()) {
366
375
  const btn = $(`<button type="button" tabindex="0" is="bordered-button"></button>`, '>1');
@@ -8,7 +8,7 @@ import { Snapshot } from '../snapshot';
8
8
  */
9
9
  export class BorderedButton extends ButtonBase {
10
10
  static get observedAttributes() {
11
- return ['role'];
11
+ return ['role', 'title-key'];
12
12
  }
13
13
  constructor() {
14
14
  super();
@@ -28,9 +28,10 @@ export class BorderedButton extends ButtonBase {
28
28
  if (!node)
29
29
  return;
30
30
  switch (attributeName) {
31
+ case 'title-key':
31
32
  case 'role':
32
33
  Snapshot.waitReady.then(() => {
33
- buttonRole(target, target.getAttribute(attributeName));
34
+ buttonRole(target, target.getAttribute('role'), target.getAttribute('title-key'));
34
35
  });
35
36
  break;
36
37
  }
@@ -8,7 +8,7 @@ import { Snapshot } from '../snapshot';
8
8
  */
9
9
  export class BorderedProminentButton extends ButtonBase {
10
10
  static get observedAttributes() {
11
- return ['role'];
11
+ return ['role', 'title-key'];
12
12
  }
13
13
  constructor() {
14
14
  super();
@@ -28,9 +28,10 @@ export class BorderedProminentButton extends ButtonBase {
28
28
  if (!node)
29
29
  return;
30
30
  switch (attributeName) {
31
+ case 'title-key':
31
32
  case 'role':
32
33
  Snapshot.waitReady.then(() => {
33
- buttonRole(target, target.getAttribute(attributeName));
34
+ buttonRole(target, target.getAttribute('role'), target.getAttribute('title-key'));
34
35
  });
35
36
  break;
36
37
  }
@@ -8,7 +8,7 @@ import { Snapshot } from '../snapshot';
8
8
  */
9
9
  export class BorderlessButton extends ButtonBase {
10
10
  static get observedAttributes() {
11
- return ['role'];
11
+ return ['role', 'title-key'];
12
12
  }
13
13
  constructor() {
14
14
  super();
@@ -28,9 +28,10 @@ export class BorderlessButton extends ButtonBase {
28
28
  if (!node)
29
29
  return;
30
30
  switch (attributeName) {
31
+ case 'title-key':
31
32
  case 'role':
32
33
  Snapshot.waitReady.then(() => {
33
- buttonRole(target, target.getAttribute(attributeName));
34
+ buttonRole(target, target.getAttribute('role'), target.getAttribute('title-key'));
34
35
  });
35
36
  break;
36
37
  }
@@ -5,7 +5,12 @@ export class FineTooltip extends HTMLElement {
5
5
  constructor() {
6
6
  super();
7
7
  }
8
- #handleMutation = (mutations) => {
8
+ #handleTriggerRemovalMutation = (mutations) => {
9
+ if (this.#queryTrigger?.isConnected)
10
+ return;
11
+ this?.remove();
12
+ };
13
+ #handleTriggerAttrMutation = (mutations) => {
9
14
  for (const { target, attributeName } of mutations)
10
15
  if (target instanceof HTMLElement && target && attributeName)
11
16
  this.#render(target.getAttribute(attributeName));
@@ -23,7 +28,8 @@ export class FineTooltip extends HTMLElement {
23
28
  target.style.setProperty('transform-origin', 'bottom');
24
29
  }
25
30
  };
26
- #observer = new MutationObserver(this.#handleMutation);
31
+ #mutationObserver = new MutationObserver(this.#handleTriggerAttrMutation);
32
+ #mutationObserver2 = new MutationObserver(this.#handleTriggerRemovalMutation);
27
33
  #resizeObserver = new ResizeObserver(this.#handleMeasure);
28
34
  get #queryTrigger() {
29
35
  const positionAnchor = this.style.positionAnchor;
@@ -51,7 +57,8 @@ export class FineTooltip extends HTMLElement {
51
57
  disconnectedCallback() {
52
58
  console.debug(`${_a.name} ⚡️ disconnect`);
53
59
  this.#resizeObserver.unobserve(this);
54
- this.#observer?.disconnect();
60
+ this.#mutationObserver?.disconnect();
61
+ this.#mutationObserver2?.disconnect();
55
62
  this.#queryTrigger?.style.removeProperty('anchor-name');
56
63
  CleanupRegistry.unregister(this);
57
64
  }
@@ -71,10 +78,14 @@ export class FineTooltip extends HTMLElement {
71
78
  }
72
79
  else {
73
80
  this.#render(trigger.getAttribute('help'));
74
- this.#observer.observe(trigger, {
81
+ this.#mutationObserver.observe(trigger, {
75
82
  attributes: true,
76
83
  attributeFilter: ['help'],
77
84
  });
85
+ this.#mutationObserver2.observe(document.body, {
86
+ childList: true,
87
+ subtree: true,
88
+ });
78
89
  this.#resizeObserver.observe(this);
79
90
  }
80
91
  this.toggleAttribute('open', 'open' === evt.newState);
@@ -8,7 +8,7 @@ import { Snapshot } from '../snapshot';
8
8
  */
9
9
  export class GlassButton extends ButtonBase {
10
10
  static get observedAttributes() {
11
- return ['role'];
11
+ return ['role', 'title-key'];
12
12
  }
13
13
  constructor() {
14
14
  super();
@@ -28,9 +28,10 @@ export class GlassButton extends ButtonBase {
28
28
  if (!node)
29
29
  return;
30
30
  switch (attributeName) {
31
+ case 'title-key':
31
32
  case 'role':
32
33
  Snapshot.waitReady.then(() => {
33
- buttonRole(target, target.getAttribute(attributeName));
34
+ buttonRole(target, target.getAttribute('role'), target.getAttribute('title-key'));
34
35
  });
35
36
  break;
36
37
  }
@@ -8,7 +8,7 @@ import { Snapshot } from '../snapshot';
8
8
  */
9
9
  export class GlassProminentButton extends ButtonBase {
10
10
  static get observedAttributes() {
11
- return ['role'];
11
+ return ['role', 'title-key'];
12
12
  }
13
13
  constructor() {
14
14
  super();
@@ -28,9 +28,10 @@ export class GlassProminentButton extends ButtonBase {
28
28
  if (!node)
29
29
  return;
30
30
  switch (attributeName) {
31
+ case 'title-key':
31
32
  case 'role':
32
33
  Snapshot.waitReady.then(() => {
33
- buttonRole(target, target.getAttribute(attributeName));
34
+ buttonRole(target, target.getAttribute('role'), target.getAttribute('title-key'));
34
35
  });
35
36
  break;
36
37
  }
@@ -33,34 +33,17 @@ export class NavigationTitle extends HTMLElement {
33
33
  }
34
34
  }
35
35
  #render = (title, subtitle) => {
36
- const el = this.querySelector(':scope>:not([slot])') ??
37
- this.appendChild($(`<navigation-large-title><v-stack spacing="0" alignment="fill"><label-view line-limit="1" truncation-mode="tail" font="headline"></label-view><label-view line-limit="1" truncation-mode="tail" font="callout"></label-view></v-stack></navigation-large-title>`, '>1')), vStack = el.querySelector(':scope>v-stack') ??
38
- el.appendChild($(`<v-stack spacing="0" alignment="fill"><label-view line-limit="1" truncation-mode="tail" font="headline"></label-view><label-view line-limit="1" truncation-mode="tail" font="callout"></label-view></v-stack>`, '>1'));
39
- let titleLabel = vStack.querySelector(':scope>label-view:nth-child(1)');
40
- if (title) {
41
- titleLabel ??= vStack.appendChild($(`<label-view line-limit="1" truncation-mode="tail" font="headline"></label-view>`, '>1'));
36
+ const titleTemplate = `<label-view line-limit="1" truncation-mode="tail" font="headline"></label-view>`, subtitleTemplate = `<label-view line-limit="1" truncation-mode="tail" foreground="secondary" font="callout"></label-view>`, vStactTemplate = `<v-stack spacing="0" alignment="fill">${titleTemplate}${subtitleTemplate}</v-stack>`;
37
+ const el = this.querySelector(':scope>:not([slot])') ?? this.appendChild($(`<navigation-large-title>${vStactTemplate}</navigation-large-title>`, '>1')), vStack = el.querySelector(':scope>v-stack') ?? el.appendChild($(vStactTemplate, '>1'));
38
+ const titleLabel = vStack.querySelector(':scope>label-view:nth-child(1)') ?? vStack.appendChild($(titleTemplate, '>1'));
39
+ if (title)
42
40
  titleLabel.setAttribute('title', title);
43
- }
44
41
  else
45
- titleLabel?.remove();
46
- let subtitleLabel = vStack.querySelector(':scope>label-view:nth-child(2)');
47
- if (subtitle) {
48
- subtitleLabel ??= vStack.appendChild($(`<label-view line-limit="1" truncation-mode="tail" font="callout"></label-view>`, '>1'));
42
+ titleLabel?.removeAttribute('title');
43
+ const subtitleLabel = vStack.querySelector(':scope>label-view:nth-child(2)') ?? vStack.appendChild($(subtitleTemplate, '>1'));
44
+ if (subtitle)
49
45
  subtitleLabel.setAttribute('title', subtitle);
50
- }
51
46
  else
52
- subtitleLabel?.remove();
53
- // for (const el of this.querySelectorAll(':scope>*')) el.remove()
54
- // const el = this.appendChild(
55
- // Object.assign(document.createElement('template'), {
56
- // innerHTML: `<navigation-large-title><v-stack spacing="0" alignment="fill" slot="top-bar-principal"><label-view line-limit="1" truncation-mode="tail" font="headline"></label-view><label-view line-limit="1" truncation-mode="tail" font="callout"></label-view></v-stack></navigation-large-title>`,
57
- // }).content.firstElementChild!
58
- // ),
59
- // titleLabel = el.querySelector('label-view:nth-child(1)'),
60
- // subtitleLabel = el.querySelector('label-view:nth-child(2)')
61
- // if (title) titleLabel?.setAttribute('label', title)
62
- // else titleLabel?.remove()
63
- // if (subtitle) subtitleLabel?.setAttribute('label', subtitle)
64
- // else subtitleLabel?.remove()
47
+ subtitleLabel?.removeAttribute('title');
65
48
  };
66
49
  }
@@ -180,22 +180,18 @@ export class ScrollView extends HTMLElement {
180
180
  });
181
181
  }
182
182
  #renderNavTitle = (title, subtitle) => {
183
- const vStack = this.querySelector(':scope>[slot=top-bar-principal]') ??
184
- this.appendChild($(`<v-stack spacing="0" alignment="fill" slot="top-bar-principal"><label-view line-limit="1" truncation-mode="tail" font="headline"></label-view><label-view line-limit="1" truncation-mode="tail" font="callout"></label-view></v-stack>`, '>1'));
185
- let titleLabel = vStack.querySelector(':scope>label-view:nth-child(1)');
186
- if (title) {
187
- titleLabel ??= vStack.appendChild($(`<label-view line-limit="1" truncation-mode="tail" font="headline"></label-view>`, '>1'));
183
+ const titleTemplate = `<label-view line-limit="1" truncation-mode="tail" font="headline"></label-view>`, subtitleTemplate = `<label-view line-limit="1" truncation-mode="tail" foreground="secondary" font="callout"></label-view>`;
184
+ const vStack = this.querySelector(':scope>[slot=top-bar-principal]') ?? this.appendChild($(`<v-stack spacing="0" alignment="fill" slot="top-bar-principal">${titleTemplate}${subtitleTemplate}</v-stack>`, '>1'));
185
+ const titleLabel = vStack.querySelector(':scope>label-view:nth-child(1)') ?? vStack.appendChild($(titleTemplate, '>1'));
186
+ if (title)
188
187
  titleLabel.setAttribute('title', title);
189
- }
190
188
  else
191
- titleLabel?.remove();
192
- let subtitleLabel = vStack.querySelector(':scope>label-view:nth-child(2)');
193
- if (subtitle) {
194
- subtitleLabel ??= vStack.appendChild($(`<label-view line-limit="1" truncation-mode="tail" font="callout"></label-view>`, '>1'));
189
+ titleLabel?.removeAttribute('title');
190
+ let subtitleLabel = vStack.querySelector(':scope>label-view:nth-child(2)') ?? vStack.appendChild($(subtitleTemplate, '>1'));
191
+ if (subtitle)
195
192
  subtitleLabel.setAttribute('title', subtitle);
196
- }
197
193
  else
198
- subtitleLabel?.remove();
194
+ subtitleLabel?.removeAttribute('title');
199
195
  };
200
196
  }
201
197
  _a = ScrollView;
@@ -3,7 +3,7 @@ import { buttonRole, onoff, touchGlass } from '../internal/utils';
3
3
  import { Snapshot } from '../snapshot';
4
4
  export class ToolBarItem extends HTMLElement {
5
5
  static get observedAttributes() {
6
- return ['slot', 'data-previous-slot'];
6
+ return ['slot', 'data-previous-slot', 'title-key'];
7
7
  }
8
8
  constructor() {
9
9
  super();
@@ -41,10 +41,11 @@ export class ToolBarItem extends HTMLElement {
41
41
  switch (name) {
42
42
  case 'slot':
43
43
  case 'data-previous-slot':
44
- const target = this.querySelector(':scope>button');
45
- if (target && ['confirmation-action'].includes(newValue ?? ''))
44
+ case 'title-key':
45
+ const target = this.querySelector(':scope>button'), nv = this.getAttribute('data-previous-slot') ?? this.getAttribute('slot') ?? '';
46
+ if (target && ['confirmation-action', 'cancellation-action'].includes(nv))
46
47
  Snapshot.waitReady.then(() => {
47
- buttonRole(target, newValue);
48
+ buttonRole(target, nv, this.getAttribute('title-key'));
48
49
  });
49
50
  break;
50
51
  }
@@ -101,7 +101,7 @@
101
101
  --toolbar-cell-block-padding-start: 0.25rem;
102
102
  --toolbar-cell-block-padding-end: 0.25rem;
103
103
  --toolbar-cell-border-radius: var(--pill-border-radius);
104
- --toolbar-cell-min-size: 2.8rem;
104
+ --toolbar-cell-min-size: 2.9rem;
105
105
  --toolbar-cell-focus-bg: var(--control-clear-glass-focus-bg);
106
106
  --toolbar-cell-focus-bg-dark: var(--control-clear-glass-focus-bg-dark);
107
107
  --toolbar-cell-active-bg: var(--control-clear-glass-active-bg);
@@ -1698,8 +1698,9 @@
1698
1698
  inline-size: fit-content;
1699
1699
  block-size: fit-content;
1700
1700
  height: auto;
1701
- max-inline-size: var(--confirmation--dialog-max-inline-size, );
1702
- max-block-size: var(--confirmation--dialog-max-block-size, );
1701
+ min-inline-size: min(20rem, 80svw);
1702
+ max-inline-size: min(20rem, 80vw);
1703
+ max-block-size: 80vh;
1703
1704
  margin-block: var(--confirmation--dialog-margin-block, );
1704
1705
  margin-inline: var(--confirmation--dialog-margin-inline, );
1705
1706
  transform: var(--confirmation--dialog-scale, );
@@ -1711,12 +1712,10 @@
1711
1712
  box-shadow: var(--menu-popover-box-shadow, );
1712
1713
  padding-block: 1rem;
1713
1714
  padding-inline: 1rem;
1714
- gap: 0.5rem;
1715
+ gap: 1rem;
1715
1716
  --confirmation--dialog-scale: scale(0);
1716
1717
  }
1717
1718
  :where([is=confirmation-dialog][open]) {
1718
- --confirmation--dialog-max-inline-size: 100vw;
1719
- --confirmation--dialog-max-block-size: 100vh;
1720
1719
  --confirmation--dialog-margin-block: max(env(safe-area-inset-top), var(--menu-spacing)) max(env(safe-area-inset-bottom), var(--menu-spacing));
1721
1720
  --confirmation--dialog-margin-inline: max(env(safe-area-inset-left), var(--menu-spacing)) max(env(safe-area-inset-right), var(--menu-spacing));
1722
1721
  --confirmation--dialog-scale: scale(1);
@@ -1727,8 +1726,6 @@
1727
1726
  }
1728
1727
  }
1729
1728
  :where([is=confirmation-dialog][closing]) {
1730
- --confirmation--dialog-max-inline-size: anchor-size();
1731
- --confirmation--dialog-max-block-size: anchor-size();
1732
1729
  --confirmation--dialog-scale: scale(0);
1733
1730
  }
1734
1731
  }
@@ -1748,6 +1745,12 @@
1748
1745
  :where([is=alert-dialog])::backdrop {
1749
1746
  background-color: transparent;
1750
1747
  }
1748
+ @media (prefers-reduced-motion: no-preference) {
1749
+ :where([is=alert-dialog])::backdrop {
1750
+ transition: display var(--view-transition-duration) ease-out allow-discrete, overlay var(--view-transition-duration) ease-out allow-discrete, background-color var(--view-transition-duration) ease-out allow-discrete;
1751
+ will-change: background-color, overlay, display;
1752
+ }
1753
+ }
1751
1754
  :where([is=alert-dialog]) {
1752
1755
  color: var(--text, );
1753
1756
  touch-action: none;
@@ -1772,6 +1775,14 @@
1772
1775
  --alert--dialog-scale: scale(1.2);
1773
1776
  --alert--dialog-opacity: 0.8;
1774
1777
  }
1778
+ :where([is=alert-dialog][open])::backdrop {
1779
+ background-color: var(--view-transition-dialog-onscreen-backdrop-bg);
1780
+ }
1781
+ @starting-style {
1782
+ :where([is=alert-dialog][open])::backdrop {
1783
+ background-color: transparent;
1784
+ }
1785
+ }
1775
1786
  :where([is=alert-dialog][open]) {
1776
1787
  --alert--dialog-scale: scale(1);
1777
1788
  --alert--dialog-opacity: 1;
@@ -1782,6 +1793,14 @@
1782
1793
  --alert--dialog-opacity: 0.8;
1783
1794
  }
1784
1795
  }
1796
+ :where([is=alert-dialog][closing])::backdrop {
1797
+ background-color: var(--clear);
1798
+ }
1799
+ @starting-style {
1800
+ :where([is=alert-dialog][closing])::backdrop {
1801
+ background-color: transparent;
1802
+ }
1803
+ }
1785
1804
  :where([is=alert-dialog][closing]) {
1786
1805
  --alert--dialog-scale: scale(0.98);
1787
1806
  --alert--dialog-opacity: 0;
@@ -2166,6 +2185,15 @@
2166
2185
  --accentColor4: var(--red4);
2167
2186
  --accentColor5: var(--red5);
2168
2187
  }
2188
+ :where([is=borderless-button][role=confirm]) {
2189
+ --accentColorEffective: var(--blue);
2190
+ --accentColorEffective4: var(--blue4);
2191
+ --accentColor: var(--blue);
2192
+ --accentColor2: var(--blue2);
2193
+ --accentColor3: var(--blue3);
2194
+ --accentColor4: var(--blue4);
2195
+ --accentColor5: var(--blue5);
2196
+ }
2169
2197
  }
2170
2198
  @layer sw-utils {
2171
2199
  :where([is=borderless-button]) {
@@ -2217,6 +2245,15 @@
2217
2245
  --accentColor4: var(--red4);
2218
2246
  --accentColor5: var(--red5);
2219
2247
  }
2248
+ :where([is=bordered-button][role=confirm]) {
2249
+ --accentColorEffective: var(--blue);
2250
+ --accentColorEffective4: var(--blue4);
2251
+ --accentColor: var(--blue);
2252
+ --accentColor2: var(--blue2);
2253
+ --accentColor3: var(--blue3);
2254
+ --accentColor4: var(--blue4);
2255
+ --accentColor5: var(--blue5);
2256
+ }
2220
2257
  }
2221
2258
  @layer sw-utils {
2222
2259
  :where([is=bordered-button]) {
@@ -2263,9 +2300,18 @@
2263
2300
  --accentColor4: var(--red4);
2264
2301
  --accentColor5: var(--red5);
2265
2302
  }
2303
+ :where([is=bordered-prominent-button][role=confirm]) {
2304
+ --accentColorEffective: var(--blue);
2305
+ --accentColorEffective4: var(--blue4);
2306
+ --accentColor: var(--blue);
2307
+ --accentColor2: var(--blue2);
2308
+ --accentColor3: var(--blue3);
2309
+ --accentColor4: var(--blue4);
2310
+ --accentColor5: var(--blue5);
2311
+ }
2266
2312
  }
2267
2313
  @layer sw-colors {
2268
- [is=bordered-prominent-button] {
2314
+ :where([is=bordered-prominent-button] > *) {
2269
2315
  --secondary: var(--btntext);
2270
2316
  --blue: var(--btntext);
2271
2317
  }
@@ -2318,6 +2364,15 @@
2318
2364
  --accentColor4: var(--red4);
2319
2365
  --accentColor5: var(--red5);
2320
2366
  }
2367
+ :where([is=glass-button][role=confirm]) {
2368
+ --accentColorEffective: var(--blue);
2369
+ --accentColorEffective4: var(--blue4);
2370
+ --accentColor: var(--blue);
2371
+ --accentColor2: var(--blue2);
2372
+ --accentColor3: var(--blue3);
2373
+ --accentColor4: var(--blue4);
2374
+ --accentColor5: var(--blue5);
2375
+ }
2321
2376
  }
2322
2377
  @layer sw-utils {
2323
2378
  :where([is=glass-button]) {
@@ -2367,9 +2422,18 @@
2367
2422
  --accentColor4: var(--red4);
2368
2423
  --accentColor5: var(--red5);
2369
2424
  }
2425
+ :where([is=glass-prominent-button][role=confirm]) {
2426
+ --accentColorEffective: var(--blue);
2427
+ --accentColorEffective4: var(--blue4);
2428
+ --accentColor: var(--blue);
2429
+ --accentColor2: var(--blue2);
2430
+ --accentColor3: var(--blue3);
2431
+ --accentColor4: var(--blue4);
2432
+ --accentColor5: var(--blue5);
2433
+ }
2370
2434
  }
2371
2435
  @layer sw-colors {
2372
- [is=glass-prominent-button] {
2436
+ :where([is=glass-prominent-button] > *) {
2373
2437
  --secondary: var(--btntext);
2374
2438
  --blue: var(--btntext);
2375
2439
  }
@@ -6805,7 +6869,8 @@
6805
6869
  @layer sw-transitions {
6806
6870
  @media (prefers-reduced-motion: no-preference) {
6807
6871
  :where([is=alert-dialog]) {
6808
- transition: all var(--touchglass-transition-duration) allow-discrete ease-out;
6872
+ transition: display var(--touchglass-transition-duration) allow-discrete ease-out, overlay var(--touchglass-transition-duration) allow-discrete ease-out, transform var(--touchglass-transition-duration) allow-discrete ease-out, opacity var(--touchglass-transition-duration) allow-discrete ease-out;
6873
+ will-change: transform, overlay, display, opacity;
6809
6874
  }
6810
6875
  }
6811
6876
  }
@@ -7794,6 +7859,12 @@
7794
7859
  --toolbaritemhighlighttext: light-dark(oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none), oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none));
7795
7860
  --toolbaritemactiveface: light-dark(oklch(from var(--accentColor) min(calc(l * 1.2), 1) min(calc(c * 1.1), c) h), oklch(from var(--accentColor) min(calc(l * 1.2), 1) min(calc(c * 1.1), c) h));
7796
7861
  --toolbaritemactivetext: light-dark(oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none), oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none));
7862
+ }
7863
+ :where(tool-bar-item[tint], [tint] tool-bar-item,
7864
+ tool-bar-item-group[tint],
7865
+ [tint] tool-bar-item-group,
7866
+ navigation-split-view sidebar-toggle[tint],
7867
+ [tint] navigation-split-view sidebar-toggle) > button {
7797
7868
  --secondary: var(--btntext);
7798
7869
  --blue: var(--btntext);
7799
7870
  --accentColorEffective: var(--btntext);
@@ -5,13 +5,11 @@ declare const _default: () => {
5
5
  readonly Description: "Ελέγξτε την ορθογραφία ή δοκιμάστε μια νέα αναζήτηση.";
6
6
  };
7
7
  readonly ButtonRole: {
8
- readonly Default: {
9
- readonly Cancel: "Cancel";
10
- readonly Close: "Close";
11
- readonly Confirm: "Confirm";
12
- readonly Destructive: "Διαγραφή";
13
- readonly OK: "OK";
14
- };
8
+ readonly Cancel: "Ακύρωση";
9
+ readonly Close: "Κλείσιμο";
10
+ readonly Confirm: "Τέλος";
11
+ readonly Destructive: "Διαγραφή";
12
+ readonly OK: "OK";
15
13
  };
16
14
  };
17
15
  export default _default;
@@ -6,12 +6,10 @@ export default defineTranslations(() => ({
6
6
  Description: 'Ελέγξτε την ορθογραφία ή δοκιμάστε μια νέα αναζήτηση.',
7
7
  },
8
8
  ButtonRole: {
9
- Default: {
10
- Cancel: 'Cancel',
11
- Close: 'Close',
12
- Confirm: 'Confirm',
13
- Destructive: 'Διαγραφή',
14
- OK: 'OK',
15
- },
9
+ Cancel: 'Ακύρωση',
10
+ Close: 'Κλείσιμο',
11
+ Confirm: 'Τέλος',
12
+ Destructive: 'Διαγραφή',
13
+ OK: 'OK',
16
14
  },
17
15
  }));
@@ -5,13 +5,11 @@ declare const _default: () => {
5
5
  readonly Description: "Check the spelling or try a new search.";
6
6
  };
7
7
  readonly ButtonRole: {
8
- readonly Default: {
9
- readonly Cancel: "Cancel";
10
- readonly Close: "Close";
11
- readonly Confirm: "Confirm";
12
- readonly Destructive: "Delete";
13
- readonly OK: "OK";
14
- };
8
+ readonly Cancel: "Cancel";
9
+ readonly Close: "Close";
10
+ readonly Confirm: "Confirm";
11
+ readonly Destructive: "Delete";
12
+ readonly OK: "OK";
15
13
  };
16
14
  };
17
15
  export default _default;
@@ -6,12 +6,10 @@ export default defineTranslations(() => ({
6
6
  Description: 'Check the spelling or try a new search.',
7
7
  },
8
8
  ButtonRole: {
9
- Default: {
10
- Cancel: 'Cancel',
11
- Close: 'Close',
12
- Confirm: 'Confirm',
13
- Destructive: 'Delete',
14
- OK: 'OK',
15
- },
9
+ Cancel: 'Cancel',
10
+ Close: 'Close',
11
+ Confirm: 'Confirm',
12
+ Destructive: 'Delete',
13
+ OK: 'OK',
16
14
  },
17
15
  }));
@@ -1 +1 @@
1
- export default function (target: HTMLElement, role: string | null): void;
1
+ export default function (target: HTMLElement, role: string | null, titleKey?: string | null): void;
@@ -3,41 +3,57 @@ import { Snapshot } from '../../snapshot';
3
3
  import { CleanupRegistry } from '../class/cleanup-registry';
4
4
  import { default as $ } from './cash';
5
5
  import onoff from './onoff';
6
- function renderPlaceholder(el, role) {
7
- const label = el.querySelector(':scope>[slot=placeholder]') ?? el.appendChild($(`<label-view slot="placeholder"></label-view>`, '>1'));
8
- switch (role) {
9
- case 'cancel':
10
- label.setAttribute('title', I18n.t('ButtonRole').Default.Cancel);
11
- label.setAttribute('system-image', Snapshot.config['cancel-button-icon']);
12
- break;
13
- case 'close':
14
- label.setAttribute('title', I18n.t('ButtonRole').Default.Close);
15
- label.setAttribute('system-image', Snapshot.config['close-button-icon']);
16
- break;
17
- case 'confirm':
18
- label.setAttribute('title', I18n.t('ButtonRole').Default.Confirm);
19
- label.setAttribute('system-image', Snapshot.config['confirm-button-icon']);
20
- break;
21
- case 'confirmation-action':
22
- label.setAttribute('title', I18n.t('ButtonRole').Default.Confirm);
23
- label.setAttribute('system-image', Snapshot.config['confirm-button-icon']);
24
- break;
25
- case 'destructive':
26
- label.setAttribute('title', I18n.t('ButtonRole').Default.Destructive);
27
- label.setAttribute('system-image', Snapshot.config['delete-button-icon']);
28
- break;
29
- default:
30
- label?.remove();
31
- break;
32
- }
33
- // if (role) {
34
- // label.setAttribute('title', I18n.t('ButtonRole').Default.Destructive)
35
- // } else label?.remove()
6
+ function renderPlaceholder(el, role, titleKey) {
7
+ if (!el.isConnected)
8
+ return;
9
+ self.requestAnimationFrame(() => {
10
+ if (!el.isConnected)
11
+ return;
12
+ const label = el.querySelector(':scope>[slot=placeholder]') ?? el.appendChild($(`<label-view slot="placeholder"></label-view>`, '>1'));
13
+ switch (role) {
14
+ case 'cancel':
15
+ label.setAttribute('title', titleKey && titleKey in I18n.t('ButtonRole') ? I18n.t('ButtonRole')[titleKey] : I18n.t('ButtonRole').Cancel);
16
+ label.setAttribute('system-image', Snapshot.config['cancel-button-icon']);
17
+ break;
18
+ case 'close':
19
+ if (label.closest('[is=alert-dialog]')) {
20
+ label.setAttribute('title', titleKey && titleKey in I18n.t('ButtonRole') ? I18n.t('ButtonRole')[titleKey] : I18n.t('ButtonRole').OK);
21
+ }
22
+ else {
23
+ label.setAttribute('title', titleKey && titleKey in I18n.t('ButtonRole') ? I18n.t('ButtonRole')[titleKey] : I18n.t('ButtonRole').Close);
24
+ label.setAttribute('system-image', Snapshot.config['close-button-icon']);
25
+ }
26
+ break;
27
+ case 'confirm':
28
+ label.setAttribute('title', titleKey && titleKey in I18n.t('ButtonRole') ? I18n.t('ButtonRole')[titleKey] : I18n.t('ButtonRole').Confirm);
29
+ label.setAttribute('system-image', Snapshot.config['confirm-button-icon']);
30
+ break;
31
+ case 'confirmation-action':
32
+ label.setAttribute('title', titleKey && titleKey in I18n.t('ButtonRole') ? I18n.t('ButtonRole')[titleKey] : I18n.t('ButtonRole').Confirm);
33
+ label.setAttribute('system-image', Snapshot.config['confirm-button-icon']);
34
+ break;
35
+ case 'cancellation-action':
36
+ label.setAttribute('title', titleKey && titleKey in I18n.t('ButtonRole') ? I18n.t('ButtonRole')[titleKey] : I18n.t('ButtonRole').Cancel);
37
+ label.setAttribute('system-image', Snapshot.config['cancel-button-icon']);
38
+ break;
39
+ case 'destructive':
40
+ label.setAttribute('title', titleKey && titleKey in I18n.t('ButtonRole') ? I18n.t('ButtonRole')[titleKey] : I18n.t('ButtonRole').Destructive);
41
+ label.setAttribute('system-image', Snapshot.config['delete-button-icon']);
42
+ break;
43
+ default:
44
+ label?.remove();
45
+ break;
46
+ }
47
+ // if (role) {
48
+ // label.setAttribute('title', I18n.t('ButtonRole').Default.Destructive)
49
+ // } else label?.remove()
50
+ });
36
51
  }
37
- export default function (target, role) {
38
- renderPlaceholder(target, role);
52
+ export default function (target, role, titleKey) {
53
+ const overiderTitle = typeof titleKey === 'string' && titleKey in I18n.t('ButtonRole') ? titleKey : undefined;
54
+ renderPlaceholder(target, role, overiderTitle);
39
55
  CleanupRegistry.unregister(target, 'i18n');
40
56
  CleanupRegistry.register(target, onoff('localechange', () => {
41
- renderPlaceholder(target, role);
57
+ renderPlaceholder(target, role, overiderTitle);
42
58
  }, I18n.on).on(), 'i18n');
43
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swiftwc/ui",
3
- "version": "0.0.0-dev.26",
3
+ "version": "0.0.0-dev.28",
4
4
  "description": "Elegant SwiftUI-inspired web components for standalone web apps and web extensions.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -8,7 +8,7 @@
8
8
 
9
9
  @forward 'transitions/bwd.navbar';
10
10
 
11
- @forward 'transitions/dialog';
11
+ @forward 'transitions/sheet-view';
12
12
 
13
13
  @forward 'transitions/fine-tooltip';
14
14
 
@@ -174,7 +174,7 @@
174
174
  --toolbar-cell-block-padding-start: 0.25rem;
175
175
  --toolbar-cell-block-padding-end: 0.25rem;
176
176
  --toolbar-cell-border-radius: var(--pill-border-radius);
177
- --toolbar-cell-min-size: 2.8rem;
177
+ --toolbar-cell-min-size: 2.9rem;
178
178
 
179
179
  --toolbar-cell-focus-bg: var(--control-clear-glass-focus-bg); //oklch(0 0 0 / 0%);
180
180
  --toolbar-cell-focus-bg-dark: var(--control-clear-glass-focus-bg-dark); //oklch(0 0 0 / 0%);
@@ -517,18 +517,23 @@ $colors: map.merge(
517
517
  // }
518
518
  }
519
519
 
520
- :where(&[tint], [tint] &) {
521
- // --toolbaritemtext: oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none);
522
- // --toolbaritemhighlighttext: oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none);
523
- // --toolbaritemactivetext: oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none);
520
+ &[tint],
521
+ [tint] & {
522
+ :where(&) {
523
+ // --toolbaritemtext: oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none);
524
+ // --toolbaritemhighlighttext: oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none);
525
+ // --toolbaritemactivetext: oklch(from var(--accentColor) clamp(0, (0.7 - l) * 999, 1) none none);
524
526
 
525
- @include mixins.wire-tinted-glass(toolbaritem);
527
+ @include mixins.wire-tinted-glass(toolbaritem);
526
528
 
527
- --secondary: var(--btntext);
528
- --blue: var(--btntext);
529
+ > button {
530
+ --secondary: var(--btntext);
531
+ --blue: var(--btntext);
529
532
 
530
- --accentColorEffective: var(--btntext);
531
- --accentColor: var(--btntext);
533
+ --accentColorEffective: var(--btntext);
534
+ --accentColor: var(--btntext);
535
+ }
536
+ }
532
537
  }
533
538
  }
534
539
 
@@ -6,6 +6,8 @@
6
6
  :where(&) {
7
7
  @include mixins.reset-dialog;
8
8
 
9
+ @include mixins.make-backdrop-transitionable;
10
+
9
11
  color: var(--text,);
10
12
 
11
13
  touch-action: none;
@@ -43,6 +45,8 @@
43
45
 
44
46
  &[open] {
45
47
  :where(&) {
48
+ @include mixins.add-dialog-backdrop-transition-frames(var(--view-transition-dialog-onscreen-backdrop-bg));
49
+
46
50
  --alert--dialog-scale: scale(1);
47
51
  --alert--dialog-opacity: 1;
48
52
 
@@ -55,6 +59,8 @@
55
59
 
56
60
  &[closing] {
57
61
  :where(&) {
62
+ @include mixins.add-dialog-backdrop-transition-frames(var(--clear));
63
+
58
64
  --alert--dialog-scale: scale(0.98);
59
65
  --alert--dialog-opacity: 0;
60
66
  }
@@ -35,6 +35,16 @@
35
35
  --accentColor4: var(--red4);
36
36
  --accentColor5: var(--red5);
37
37
  }
38
+ :where(&[role='confirm']) {
39
+ --accentColorEffective: var(--blue);
40
+ --accentColorEffective4: var(--blue4);
41
+
42
+ --accentColor: var(--blue);
43
+ --accentColor2: var(--blue2);
44
+ --accentColor3: var(--blue3);
45
+ --accentColor4: var(--blue4);
46
+ --accentColor5: var(--blue5);
47
+ }
38
48
  }
39
49
  }
40
50
 
@@ -32,13 +32,25 @@
32
32
  --accentColor4: var(--red4);
33
33
  --accentColor5: var(--red5);
34
34
  }
35
+ :where(&[role='confirm']) {
36
+ --accentColorEffective: var(--blue);
37
+ --accentColorEffective4: var(--blue4);
38
+
39
+ --accentColor: var(--blue);
40
+ --accentColor2: var(--blue2);
41
+ --accentColor3: var(--blue3);
42
+ --accentColor4: var(--blue4);
43
+ --accentColor5: var(--blue5);
44
+ }
35
45
  }
36
46
  }
37
47
 
38
48
  @layer #{vars.$colors-layer} {
39
- [is='bordered-prominent-button'] {
40
- --secondary: var(--btntext);
41
- --blue: var(--btntext);
49
+ [is='bordered-prominent-button'] > * {
50
+ :where(&) {
51
+ --secondary: var(--btntext);
52
+ --blue: var(--btntext);
53
+ }
42
54
  }
43
55
  }
44
56
 
@@ -22,6 +22,16 @@
22
22
  --accentColor4: var(--red4);
23
23
  --accentColor5: var(--red5);
24
24
  }
25
+ :where(&[role='confirm']) {
26
+ --accentColorEffective: var(--blue);
27
+ --accentColorEffective4: var(--blue4);
28
+
29
+ --accentColor: var(--blue);
30
+ --accentColor2: var(--blue2);
31
+ --accentColor3: var(--blue3);
32
+ --accentColor4: var(--blue4);
33
+ --accentColor5: var(--blue5);
34
+ }
25
35
  }
26
36
  }
27
37
 
@@ -15,8 +15,13 @@
15
15
  inline-size: fit-content;
16
16
  block-size: fit-content;
17
17
  height: auto; // safari
18
- max-inline-size: var(--confirmation--dialog-max-inline-size,);
19
- max-block-size: var(--confirmation--dialog-max-block-size,);
18
+
19
+ min-inline-size: min(20rem, 80svw);
20
+
21
+ max-inline-size: min(20rem, 80vw);
22
+ max-block-size: 80vh;
23
+ // max-inline-size: var(--confirmation--dialog-max-inline-size,);
24
+ // max-block-size: var(--confirmation--dialog-max-block-size,);
20
25
 
21
26
  margin-block: var(--confirmation--dialog-margin-block,);
22
27
  margin-inline: var(--confirmation--dialog-margin-inline,);
@@ -34,7 +39,7 @@
34
39
 
35
40
  padding-block: 1rem;
36
41
  padding-inline: 1rem;
37
- gap: 0.5rem;
42
+ gap: 1rem;
38
43
 
39
44
  // finally
40
45
  --confirmation--dialog-scale: scale(0);
@@ -42,8 +47,8 @@
42
47
 
43
48
  &[open] {
44
49
  :where(&) {
45
- --confirmation--dialog-max-inline-size: 100vw;
46
- --confirmation--dialog-max-block-size: 100vh;
50
+ // --confirmation--dialog-max-inline-size: 100vw;
51
+ // --confirmation--dialog-max-block-size: 100vh;
47
52
 
48
53
  --confirmation--dialog-margin-block: max(env(safe-area-inset-top), var(--menu-spacing)) max(env(safe-area-inset-bottom), var(--menu-spacing));
49
54
  --confirmation--dialog-margin-inline: max(env(safe-area-inset-left), var(--menu-spacing)) max(env(safe-area-inset-right), var(--menu-spacing));
@@ -58,8 +63,8 @@
58
63
 
59
64
  &[closing] {
60
65
  :where(&) {
61
- --confirmation--dialog-max-inline-size: anchor-size();
62
- --confirmation--dialog-max-block-size: anchor-size();
66
+ // --confirmation--dialog-max-inline-size: anchor-size();
67
+ // --confirmation--dialog-max-block-size: anchor-size();
63
68
 
64
69
  --confirmation--dialog-scale: scale(0);
65
70
  }
@@ -37,6 +37,16 @@
37
37
  --accentColor4: var(--red4);
38
38
  --accentColor5: var(--red5);
39
39
  }
40
+ :where(&[role='confirm']) {
41
+ --accentColorEffective: var(--blue);
42
+ --accentColorEffective4: var(--blue4);
43
+
44
+ --accentColor: var(--blue);
45
+ --accentColor2: var(--blue2);
46
+ --accentColor3: var(--blue3);
47
+ --accentColor4: var(--blue4);
48
+ --accentColor5: var(--blue5);
49
+ }
40
50
  }
41
51
  }
42
52
 
@@ -37,13 +37,25 @@
37
37
  --accentColor4: var(--red4);
38
38
  --accentColor5: var(--red5);
39
39
  }
40
+ :where(&[role='confirm']) {
41
+ --accentColorEffective: var(--blue);
42
+ --accentColorEffective4: var(--blue4);
43
+
44
+ --accentColor: var(--blue);
45
+ --accentColor2: var(--blue2);
46
+ --accentColor3: var(--blue3);
47
+ --accentColor4: var(--blue4);
48
+ --accentColor5: var(--blue5);
49
+ }
40
50
  }
41
51
  }
42
52
 
43
53
  @layer #{vars.$colors-layer} {
44
- [is='glass-prominent-button'] {
45
- --secondary: var(--btntext);
46
- --blue: var(--btntext);
54
+ [is='glass-prominent-button'] > * {
55
+ :where(&) {
56
+ --secondary: var(--btntext);
57
+ --blue: var(--btntext);
58
+ }
47
59
  }
48
60
  }
49
61
 
@@ -5,14 +5,13 @@
5
5
  @media (prefers-reduced-motion: no-preference) {
6
6
  [is='alert-dialog'] {
7
7
  :where(&) {
8
- // transition:
9
- // block-size var(--menu-animation-duration) allow-discrete ease-out,
10
- // inline-size var(--menu-animation-duration) allow-discrete ease-out,
11
- // display var(--menu-animation-duration) allow-discrete ease-out,
12
- // overlay var(--menu-animation-duration) allow-discrete ease-out,
13
- // transform var(--menu-animation-duration) allow-discrete ease-out;
14
- transition: all var(--touchglass-transition-duration) allow-discrete ease-out;
15
- // will-change: block-size, inline-size, transform, overlay, display;
8
+ transition:
9
+ display var(--touchglass-transition-duration) allow-discrete ease-out,
10
+ overlay var(--touchglass-transition-duration) allow-discrete ease-out,
11
+ transform var(--touchglass-transition-duration) allow-discrete ease-out,
12
+ opacity var(--touchglass-transition-duration) allow-discrete ease-out;
13
+ // transition: all var(--touchglass-transition-duration) allow-discrete ease-out;
14
+ will-change: transform, overlay, display, opacity;
16
15
  }
17
16
  }
18
17
  }
@@ -0,0 +1,30 @@
1
+ @use '../vars';
2
+ @use '../mixins';
3
+
4
+ @layer #{vars.$transitions-layer} {
5
+ [is='sheet-view'] {
6
+ &:not([open]) {
7
+ z-index: var(--top-layer-polyfill-z-index);
8
+ }
9
+
10
+ &[open] {
11
+ --sheet-view-translate: translateY(var(--view-transition-dialog-onscreen-y));
12
+
13
+ @include mixins.if-ipad-sheet-fits {
14
+ @include mixins.if-2col-split-view-fits {
15
+ navigation-split-view & {
16
+ margin-inline-start: var(--safe-area-inset-left);
17
+ }
18
+ }
19
+ }
20
+
21
+ @include mixins.add-dialog-backdrop-transition-frames(var(--view-transition-dialog-onscreen-backdrop-bg));
22
+
23
+ @starting-style {
24
+ & {
25
+ --sheet-view-translate: translateY(var(--view-transition-dialog-offscreen-y));
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
@@ -13,6 +13,9 @@
13
13
  "attributes": [
14
14
  {
15
15
  "name": "role"
16
+ },
17
+ {
18
+ "name": "title-key"
16
19
  }
17
20
  ]
18
21
  },
@@ -22,6 +25,9 @@
22
25
  "attributes": [
23
26
  {
24
27
  "name": "role"
28
+ },
29
+ {
30
+ "name": "title-key"
25
31
  }
26
32
  ]
27
33
  },
@@ -31,6 +37,9 @@
31
37
  "attributes": [
32
38
  {
33
39
  "name": "role"
40
+ },
41
+ {
42
+ "name": "title-key"
34
43
  }
35
44
  ]
36
45
  },
@@ -116,6 +125,9 @@
116
125
  "attributes": [
117
126
  {
118
127
  "name": "role"
128
+ },
129
+ {
130
+ "name": "title-key"
119
131
  }
120
132
  ]
121
133
  },
@@ -125,6 +137,9 @@
125
137
  "attributes": [
126
138
  {
127
139
  "name": "role"
140
+ },
141
+ {
142
+ "name": "title-key"
128
143
  }
129
144
  ]
130
145
  },
@@ -322,6 +337,9 @@
322
337
  },
323
338
  {
324
339
  "name": "data-previous-slot"
340
+ },
341
+ {
342
+ "name": "title-key"
325
343
  }
326
344
  ]
327
345
  },
@@ -1,28 +0,0 @@
1
- @use '../vars';
2
- @use '../mixins';
3
-
4
- @layer #{vars.$transitions-layer} {
5
- [is='sheet-view']:not([open]) {
6
- z-index: var(--top-layer-polyfill-z-index);
7
- }
8
-
9
- [is='sheet-view'][open] {
10
- --sheet-view-translate: translateY(var(--view-transition-dialog-onscreen-y));
11
-
12
- @include mixins.if-ipad-sheet-fits {
13
- @include mixins.if-2col-split-view-fits {
14
- navigation-split-view & {
15
- margin-inline-start: var(--safe-area-inset-left);
16
- }
17
- }
18
- }
19
-
20
- @include mixins.add-dialog-backdrop-transition-frames(var(--view-transition-dialog-onscreen-backdrop-bg));
21
-
22
- @starting-style {
23
- & {
24
- --sheet-view-translate: translateY(var(--view-transition-dialog-offscreen-y));
25
- }
26
- }
27
- }
28
- }