@swiftwc/ui 0.0.0-dev.88 → 0.0.0-dev.89

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.
@@ -6,7 +6,7 @@ import { MutationObserverSet } from '../internal/class/mutation-observer-set';
6
6
  import { NavigationPath } from '../internal/class/navigation-path';
7
7
  import { queryInsertPosition, startViewTransition } from '../internal/privateNamespace';
8
8
  import { $, devFlags, kebabCase, onoff } from '../internal/utils';
9
- import { html as htmx, morph, queryMorph } from '../morphdom';
9
+ import { html as htmx, queryMorph } from '../morphdom';
10
10
  import { html, render } from '../tpl';
11
11
  const pickerStyles = ['menu', 'inline', 'navigation-link', 'sheet', 'automatic'];
12
12
  const update = (path, node, overwrite = true) => {
@@ -1031,9 +1031,12 @@ export class PickerView extends FormAssociatedBase {
1031
1031
  // if (!cvl) currentValueLabel.setAttribute('foreground', 'secondary')
1032
1032
  // else currentValueLabel.removeAttribute('foreground')
1033
1033
  const title = this.#currentValueLabel || this.#selection || this.getAttribute(this.constructor.ATTR.PLACEHOLDER), systemImage = this.#currentValueIcon || this.getAttribute(this.constructor.ATTR.PLACEHOLDER_ICON);
1034
- // queryMorph(':not([slot])', htmx`<span>${title}</span>`, currentValueLabel, { removeIf: !title }) //renderLabelTitle(currentValueLabel, this.#currentValueLabel || this.#selection || this.getAttribute((this.constructor as typeof PickerView).ATTR.PLACEHOLDER))
1035
- // queryMorph('[slot=icon]', htmx`<image-view slot="icon" system-name="${systemImage}"></image-view>`, currentValueLabel, { removeIf: !systemImage }) //renderLabelIcon(currentValueLabel, this.#currentValueIcon || this.getAttribute((this.constructor as typeof PickerView).ATTR.PLACEHOLDER_ICON))
1036
- morph(htmx `<label-view>${systemImage ? htmx `<image-view slot="icon" system-name="${systemImage}"></image-view>` : null}${title ? htmx `<span>${title}</span>` : null}</label-view>`, currentValueLabel);
1034
+ queryMorph(':not([slot])', htmx `<span>${title}</span>`, currentValueLabel, { removeIf: !title }); //renderLabelTitle(currentValueLabel, this.#currentValueLabel || this.#selection || this.getAttribute((this.constructor as typeof PickerView).ATTR.PLACEHOLDER))
1035
+ queryMorph('[slot=icon]', htmx `<image-view slot="icon" system-name="${systemImage}"></image-view>`, currentValueLabel, { removeIf: !systemImage }); //renderLabelIcon(currentValueLabel, this.#currentValueIcon || this.getAttribute((this.constructor as typeof PickerView).ATTR.PLACEHOLDER_ICON))
1036
+ // morph(
1037
+ // htmx`<label-view>${systemImage ? htmx`<image-view slot="icon" system-name="${systemImage}"></image-view>` : null}${title ? htmx`<span>${title}</span>` : null}</label-view>`,
1038
+ // currentValueLabel
1039
+ // ) NOTE: not this bc/ help tooltip right now is added to trigger label and this mangles it
1037
1040
  break;
1038
1041
  }
1039
1042
  case 'menu': {
@@ -1043,9 +1046,12 @@ export class PickerView extends FormAssociatedBase {
1043
1046
  // if (!cvl) currentValueLabel.setAttribute('foreground', 'secondary')
1044
1047
  // else currentValueLabel.removeAttribute('foreground')
1045
1048
  const title = this.#currentValueLabel || this.#selection || this.getAttribute(this.constructor.ATTR.PLACEHOLDER), systemImage = this.#currentValueIcon || this.getAttribute(this.constructor.ATTR.PLACEHOLDER_ICON);
1046
- // queryMorph(':not([slot])', htmx`<span>${title}</span>`, currentValueLabel, { removeIf: !title }) //renderLabelTitle(currentValueLabel, this.#currentValueLabel || this.#selection || this.getAttribute((this.constructor as typeof PickerView).ATTR.PLACEHOLDER))
1047
- // queryMorph('[slot=icon]', htmx`<image-view slot="icon" system-name="${systemImage}"></image-view>`, currentValueLabel, { removeIf: !systemImage }) //renderLabelIcon(currentValueLabel, this.#currentValueIcon || this.getAttribute((this.constructor as typeof PickerView).ATTR.PLACEHOLDER_ICON))
1048
- morph(htmx `<label-view slot="label">${systemImage ? htmx `<image-view slot="icon" system-name="${systemImage}"></image-view>` : null}${title ? htmx `<span>${title}</span>` : null}</label-view>`, currentValueLabel);
1049
+ queryMorph(':not([slot])', htmx `<span>${title}</span>`, currentValueLabel, { removeIf: !title }); //renderLabelTitle(currentValueLabel, this.#currentValueLabel || this.#selection || this.getAttribute((this.constructor as typeof PickerView).ATTR.PLACEHOLDER))
1050
+ queryMorph('[slot=icon]', htmx `<image-view slot="icon" system-name="${systemImage}"></image-view>`, currentValueLabel, { removeIf: !systemImage }); //renderLabelIcon(currentValueLabel, this.#currentValueIcon || this.getAttribute((this.constructor as typeof PickerView).ATTR.PLACEHOLDER_ICON))
1051
+ // morph(
1052
+ // htmx`<label-view slot="label">${systemImage ? htmx`<image-view slot="icon" system-name="${systemImage}"></image-view>` : null}${title ? htmx`<span>${title}</span>` : null}</label-view>`,
1053
+ // currentValueLabel
1054
+ // ) NOTE: not this bc/ help tooltip right now is added to trigger label and this mangles it
1049
1055
  break;
1050
1056
  }
1051
1057
  case 'inline':
@@ -97,7 +97,7 @@
97
97
  --toolbar-cell-box-shadow: var(--control-clear-glass-box-shadow);
98
98
  --menu-bg: var(--control-clear-glass-bg);
99
99
  --menu-bg-dark: var(--control-clear-glass-bg-dark);
100
- --menu-max-inline-size: 15rem;
100
+ --menu-max-inline-size: 20rem;
101
101
  --menu-max-block-size: 60vh;
102
102
  --menu-spacing: 1rem;
103
103
  --menu-host-offscreen-transform: scale(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swiftwc/ui",
3
- "version": "0.0.0-dev.88",
3
+ "version": "0.0.0-dev.89",
4
4
  "description": "Elegant SwiftUI-inspired web components for standalone web apps and web extensions.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -191,7 +191,7 @@
191
191
  --menu-bg: var(--control-clear-glass-bg); //--menu-bg: var(--liquid-glass-bg); //oklch(var(--sidebar-bg-lch) / var(--sidebar-bg-alpha));
192
192
  --menu-bg-dark: var(--control-clear-glass-bg-dark); //--menu-bg-dark: var(--liquid-glass-bg-dark); //oklch(var(--sidebar-bg-lch-dark) / var(--sidebar-bg-alpha-dark));
193
193
 
194
- --menu-max-inline-size: 15rem;
194
+ --menu-max-inline-size: 20rem;
195
195
  --menu-max-block-size: 60vh;
196
196
  --menu-spacing: 1rem;
197
197
  --menu-host-offscreen-transform: scale(0);