@swiftwc/ui 0.0.0-dev.52 → 0.0.0-dev.54

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.
@@ -17,7 +17,6 @@ export * from './label-view';
17
17
  export * from './list-view';
18
18
  export * from './menu-view';
19
19
  export * from './navigation-large-title';
20
- export * from './navigation-link';
21
20
  export * from './navigation-split-view';
22
21
  export * from './navigation-stack';
23
22
  export * from './navigation-title';
@@ -17,7 +17,6 @@ export * from './label-view';
17
17
  export * from './list-view';
18
18
  export * from './menu-view';
19
19
  export * from './navigation-large-title';
20
- export * from './navigation-link';
21
20
  export * from './navigation-split-view';
22
21
  export * from './navigation-stack';
23
22
  export * from './navigation-title';
@@ -158,7 +158,7 @@ export class PickerView extends FormAssociatedBase {
158
158
  break;
159
159
  }
160
160
  default: {
161
- const btn = $(`<button type="button" tabindex="0" is="navigation-link"><h-stack distribution="leading" template="auto spacer"><label-view data-role="check" style="visibility: hidden"><image-view slot="icon" system-name="check"></image-view></label-view><label-view><span></span></label-view></h-stack></button>`, '>1'), label = btn.querySelector(':scope>h-stack>label-view:nth-child(2)');
161
+ const btn = $(`<button type="button" tabindex="0" navigation-link><h-stack distribution="leading" template="auto spacer"><label-view data-role="check" style="visibility: hidden"><image-view slot="icon" system-name="check"></image-view></label-view><label-view><span></span></label-view></h-stack></button>`, '>1'), label = btn.querySelector(':scope>h-stack>label-view:nth-child(2)');
162
162
  if (label && el.dataset.label)
163
163
  renderLabelTitle(label, el.dataset.label); //label?.setAttribute('title', el.dataset.label)
164
164
  btn.addEventListener('click', async (evt) => {
@@ -634,13 +634,40 @@ export class PickerView extends FormAssociatedBase {
634
634
  #reflectSelectionOnButtons() {
635
635
  if (devFlags.debug)
636
636
  console.debug(`${_a.name} #reflectSelectionOnButtons`);
637
- // walk all rendered buttons (inline has buttons in list, menu has buttons in menu-view)
638
- for (const el of this.querySelectorAll('button[value]:not([slot])'))
639
- el.querySelector('label-view[data-role="check"]')?.style.setProperty('visibility', el.getAttribute('value') === this.#selection ? 'visible' : 'hidden');
640
- // also sync the spawn (sheet/navigation) if open
641
- if (this.#spawn)
642
- for (const el of this.#spawn.querySelectorAll('list-view button[value]:not([slot])'))
637
+ const syncButtons = (root) => {
638
+ // 1. Sync plain value buttons (existing behavior)
639
+ for (const el of root.querySelectorAll('button[value]:not([slot])'))
643
640
  el.querySelector('label-view[data-role="check"]')?.style.setProperty('visibility', el.getAttribute('value') === this.#selection ? 'visible' : 'hidden');
641
+ // 2. Sync `details` (optgroups) — open/mark if any descendant option matches selection
642
+ for (const details of root.querySelectorAll('details[is="disclosure-group"]')) {
643
+ const hasSelectedDescendant = [...details.querySelectorAll('button[value]')].some((btn) => btn.getAttribute('value') === this.#selection);
644
+ // Show/hide the check on the summary's label-view
645
+ details.querySelector(':scope>summary label-view[data-role="check"]')?.style.setProperty('visibility', hasSelectedDescendant ? 'visible' : 'hidden');
646
+ }
647
+ // 3. Sync nav-link buttons (those without `value` that spawn sub-pages)
648
+ // These wrap <datalist> children — mark them if any descendant value matches
649
+ for (const btn of root.querySelectorAll('button[navigation-link]:not([value])')) {
650
+ // Find the matching datalist node by label
651
+ const btnLabel = btn.querySelector('label-view span')?.textContent?.trim();
652
+ const matchingDatalist = [...(this.#slots?.get('list')?.assignedElements() ?? [])]
653
+ .flatMap((el) => [...el.querySelectorAll('datalist'), ...(el.tagName === 'DATALIST' ? [el] : [])])
654
+ .find((dl) => dl.getAttribute('data-label') === btnLabel);
655
+ const hasSelectedDescendant = matchingDatalist ? [...matchingDatalist.querySelectorAll('option')].some((opt) => extractTagFromOption(opt) === this.#selection) : false;
656
+ btn.querySelector('label-view[data-role="check"]')?.style.setProperty('visibility', hasSelectedDescendant ? 'visible' : 'hidden');
657
+ }
658
+ };
659
+ // Run on the host element (inline/menu styles)
660
+ syncButtons(this);
661
+ // Also sync the spawn if open (sheet/navigation-link styles)
662
+ if (this.#spawn)
663
+ syncButtons(this.#spawn);
664
+ // // walk all rendered buttons (inline has buttons in list, menu has buttons in menu-view)
665
+ // for (const el of this.querySelectorAll<HTMLButtonElement>('button[value]:not([slot])'))
666
+ // el.querySelector<HTMLElement>('label-view[data-role="check"]')?.style.setProperty('visibility', el.getAttribute('value') === this.#selection ? 'visible' : 'hidden')
667
+ // // also sync the spawn (sheet/navigation) if open
668
+ // if (this.#spawn)
669
+ // for (const el of this.#spawn.querySelectorAll<HTMLButtonElement>('list-view button[value]:not([slot])'))
670
+ // el.querySelector<HTMLElement>('label-view[data-role="check"]')?.style.setProperty('visibility', el.getAttribute('value') === this.#selection ? 'visible' : 'hidden')
644
671
  }
645
672
  get #currentTag() {
646
673
  return this.#slots
@@ -753,22 +753,22 @@
753
753
  --itemradiusbr: var(--list--item-border-radius,);
754
754
  --itemradiusbl: var(--list--adjacentitem-border-radius,);
755
755
  }
756
- :where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]), [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]), list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
757
- table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
758
- [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
759
- list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
760
- table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
761
- [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
762
- list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link])) {
756
+ :where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]), [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]), list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
757
+ table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
758
+ [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
759
+ list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
760
+ table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
761
+ [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
762
+ list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link])) {
763
763
  position: relative;
764
764
  }
765
- :where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]), [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]), list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
766
- table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
767
- [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
768
- list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
769
- table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
770
- [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
771
- list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]))::after {
765
+ :where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]), [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]), list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
766
+ table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
767
+ [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
768
+ list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
769
+ table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
770
+ [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
771
+ list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]))::after {
772
772
  pointer-events: none;
773
773
  content: "";
774
774
  -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" fill="currentColor" viewBox="0 0 256 256"%3E%3Cpath d="M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"%3E%3C/path%3E%3C/svg%3E') no-repeat center/contain;
@@ -777,13 +777,13 @@
777
777
  aspect-ratio: 1;
778
778
  place-self: center;
779
779
  }
780
- :where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]), [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]), list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
781
- table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
782
- [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
783
- list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
784
- table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
785
- [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]),
786
- list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[is=navigation-link], navigation-stack button[is=navigation-link]))::after {
780
+ :where(table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]), [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]), list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
781
+ table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
782
+ [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
783
+ list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) section-view > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
784
+ table-view:not(table-view table-view, list-view table-view, [is=form-view] table-view) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
785
+ [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]),
786
+ list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) [is=disclosure-group] > :not([slot], section-view, [is=disclosure-group], picker-view, menu-view, menu-view *, whatever-name):is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]))::after {
787
787
  position: absolute;
788
788
  inset: 50% var(--itempadiend) auto auto;
789
789
  display: var(--list--accessories-display, grid);
@@ -3701,7 +3701,7 @@
3701
3701
  --itemhighlightface: var(--accentColor3);
3702
3702
  --itemactiveface: var(--accentColor3);
3703
3703
  }
3704
- list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) button[list-item-tint]:not([is=navigation-link]) {
3704
+ list-view:not(list-view list-view, [is=form-view] list-view, table-view list-view) button[list-item-tint]:not([navigation-link]) {
3705
3705
  --itemtext: var(--accentColor);
3706
3706
  --itemhighlighttext: var(--accentColor);
3707
3707
  --itemactivetext: var(--accentColor);
@@ -4074,7 +4074,7 @@
4074
4074
  --itemhighlightface: var(--accentColor3);
4075
4075
  --itemactiveface: var(--accentColor3);
4076
4076
  }
4077
- [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) button[list-item-tint]:not([is=navigation-link]) {
4077
+ [is=form-view]:not([is=form-view] [is=form-view], list-view [is=form-view], table-view [is=form-view], [is=tab-bar] > [is=form-view]) button[list-item-tint]:not([navigation-link]) {
4078
4078
  --itemtext: var(--accentColor);
4079
4079
  --itemhighlighttext: var(--accentColor);
4080
4080
  --itemactivetext: var(--accentColor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swiftwc/ui",
3
- "version": "0.0.0-dev.52",
3
+ "version": "0.0.0-dev.54",
4
4
  "description": "Elegant SwiftUI-inspired web components for standalone web apps and web extensions.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -180,7 +180,7 @@ $form-elses: (
180
180
  --itemhighlightface: var(--accentColor3);
181
181
  --itemactiveface: var(--accentColor3);
182
182
  }
183
- &:not([is='navigation-link']) {
183
+ &:not([navigation-link]) {
184
184
  --itemtext: var(--accentColor);
185
185
  --itemhighlighttext: var(--accentColor);
186
186
  --itemactivetext: var(--accentColor);
@@ -181,7 +181,7 @@ $list-elses: (
181
181
  --itemhighlightface: var(--accentColor3);
182
182
  --itemactiveface: var(--accentColor3);
183
183
  }
184
- &:not([is='navigation-link']) {
184
+ &:not([navigation-link]) {
185
185
  --itemtext: var(--accentColor);
186
186
  --itemhighlighttext: var(--accentColor);
187
187
  --itemactivetext: var(--accentColor);
@@ -462,7 +462,7 @@ $list-item-selector: ':not([slot], section-view, [is="disclosure-group"], picker
462
462
  section-view > #{$list-item-selector},
463
463
  [is='disclosure-group'] > #{$list-item-selector} {
464
464
  // NOTE: drill-in chevron show up only on nav-link buttons. Paddings and all other props have already been taken over!
465
- &:is(navigation-split-view button[is='navigation-link'], navigation-stack button[is='navigation-link']) {
465
+ &:is(navigation-split-view button[navigation-link], navigation-stack button[navigation-link]) {
466
466
  :where(&) {
467
467
  position: relative;
468
468
 
@@ -235,10 +235,6 @@
235
235
  {
236
236
  "name": "navigation-large-title"
237
237
  },
238
- {
239
- "name": "navigation-link",
240
- "description": "A button that controls a navigation presentation."
241
- },
242
238
  {
243
239
  "name": "navigation-split-view",
244
240
  "description": "A view with two or three side-by-side sections, where what you choose in the left section changes what appears in the next section."
@@ -1,10 +0,0 @@
1
- import { ButtonBase } from '../namespace-browser/base';
2
- /**
3
- * @summary A button that controls a navigation presentation.
4
- */
5
- export declare class NavigationLink extends ButtonBase {
6
- #private;
7
- constructor();
8
- static polyfillDisconnectedCallback(el: NavigationLink): void;
9
- static polyfillConnectedCallback(el: NavigationLink): void;
10
- }
@@ -1,25 +0,0 @@
1
- import { CleanupRegistry } from '../internal/class/cleanup-registry';
2
- import { devFlags, onoff } from '../internal/utils';
3
- import { ButtonBase } from '../namespace-browser/base';
4
- /**
5
- * @summary A button that controls a navigation presentation.
6
- */
7
- export class NavigationLink extends ButtonBase {
8
- constructor() {
9
- super();
10
- }
11
- static polyfillDisconnectedCallback(el) {
12
- if (devFlags.debug)
13
- console.debug(`${NavigationLink.name} ⚡️ disconnect`);
14
- CleanupRegistry.unregister(el);
15
- }
16
- static polyfillConnectedCallback(el) {
17
- if (devFlags.debug)
18
- console.debug(`${NavigationLink.name} ⚡️ connect`);
19
- el.tabIndex = 0;
20
- CleanupRegistry.register(el, onoff('click', NavigationLink.#handleClick, el).on());
21
- }
22
- static #handleClick = async (evt) => {
23
- // alert(99)
24
- };
25
- }