@tearleads/windowing 0.2.47 → 0.2.49

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  export function AppSwitch({ checked, className, icon: Icon, onChange, title, }) {
3
- return (_jsxs("label", { className: `display-properties-app-switch ${className}`, children: [Icon && (_jsx(Icon, { className: `${className}-icon`, "aria-hidden": "true", focusable: "false", size: 16 })), _jsx("span", { className: "display-properties-label", children: title }), _jsx("input", { "aria-checked": checked, checked: checked, className: "display-properties-switch", onChange: (event) => onChange(event.currentTarget.checked), role: "switch", type: "checkbox" })] }));
3
+ return (_jsxs("label", { className: `display-properties-app-switch ${className}`, children: [Icon && (_jsx(Icon, { className: `display-properties-app-switch-icon ${className}-icon`, "aria-hidden": "true", focusable: "false", size: 16 })), _jsx("span", { className: "display-properties-label", children: title }), _jsx("input", { "aria-checked": checked, checked: checked, className: "display-properties-switch", onChange: (event) => onChange(event.currentTarget.checked), role: "switch", type: "checkbox" })] }));
4
4
  }
5
5
  //# sourceMappingURL=AppSwitch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppSwitch.js","sourceRoot":"","sources":["../../../home/runner/work/tearleads/tearleads/packages/windowing/src/display/AppSwitch.tsx"],"names":[],"mappings":";AAUA,MAAM,UAAU,SAAS,CAAC,EACxB,OAAO,EACP,SAAS,EACT,IAAI,EAAE,IAAI,EACV,QAAQ,EACR,KAAK,GACU;IACf,OAAO,CACL,iBAAO,SAAS,EAAE,iCAAiC,SAAS,EAAE,aAC3D,IAAI,IAAI,CACP,KAAC,IAAI,IACH,SAAS,EAAE,GAAG,SAAS,OAAO,iBAClB,MAAM,EAClB,SAAS,EAAC,OAAO,EACjB,IAAI,EAAE,EAAE,GACR,CACH,EACD,eAAM,SAAS,EAAC,0BAA0B,YAAE,KAAK,GAAQ,EACzD,gCACgB,OAAO,EACrB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,2BAA2B,EACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,EAC1D,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,UAAU,GACf,IACI,CACT,CAAC;AACJ,CAAC","sourcesContent":["import type { WindowingIcon } from \"../icons/windowingIcon\";\n\ninterface AppSwitchProps {\n checked: boolean;\n className: string;\n icon?: WindowingIcon | undefined;\n onChange: (checked: boolean) => void;\n title: string;\n}\n\nexport function AppSwitch({\n checked,\n className,\n icon: Icon,\n onChange,\n title,\n}: AppSwitchProps) {\n return (\n <label className={`display-properties-app-switch ${className}`}>\n {Icon && (\n <Icon\n className={`${className}-icon`}\n aria-hidden=\"true\"\n focusable=\"false\"\n size={16}\n />\n )}\n <span className=\"display-properties-label\">{title}</span>\n <input\n aria-checked={checked}\n checked={checked}\n className=\"display-properties-switch\"\n onChange={(event) => onChange(event.currentTarget.checked)}\n role=\"switch\"\n type=\"checkbox\"\n />\n </label>\n );\n}\n"]}
1
+ {"version":3,"file":"AppSwitch.js","sourceRoot":"","sources":["../../../home/runner/work/tearleads/tearleads/packages/windowing/src/display/AppSwitch.tsx"],"names":[],"mappings":";AAUA,MAAM,UAAU,SAAS,CAAC,EACxB,OAAO,EACP,SAAS,EACT,IAAI,EAAE,IAAI,EACV,QAAQ,EACR,KAAK,GACU;IACf,OAAO,CACL,iBAAO,SAAS,EAAE,iCAAiC,SAAS,EAAE,aAC3D,IAAI,IAAI,CACP,KAAC,IAAI,IACH,SAAS,EAAE,sCAAsC,SAAS,OAAO,iBACrD,MAAM,EAClB,SAAS,EAAC,OAAO,EACjB,IAAI,EAAE,EAAE,GACR,CACH,EACD,eAAM,SAAS,EAAC,0BAA0B,YAAE,KAAK,GAAQ,EACzD,gCACgB,OAAO,EACrB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,2BAA2B,EACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,EAC1D,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,UAAU,GACf,IACI,CACT,CAAC;AACJ,CAAC","sourcesContent":["import type { WindowingIcon } from \"../icons/windowingIcon\";\n\ninterface AppSwitchProps {\n checked: boolean;\n className: string;\n icon?: WindowingIcon | undefined;\n onChange: (checked: boolean) => void;\n title: string;\n}\n\nexport function AppSwitch({\n checked,\n className,\n icon: Icon,\n onChange,\n title,\n}: AppSwitchProps) {\n return (\n <label className={`display-properties-app-switch ${className}`}>\n {Icon && (\n <Icon\n className={`display-properties-app-switch-icon ${className}-icon`}\n aria-hidden=\"true\"\n focusable=\"false\"\n size={16}\n />\n )}\n <span className=\"display-properties-label\">{title}</span>\n <input\n aria-checked={checked}\n checked={checked}\n className=\"display-properties-switch\"\n onChange={(event) => onChange(event.currentTarget.checked)}\n role=\"switch\"\n type=\"checkbox\"\n />\n </label>\n );\n}\n"]}
@@ -146,8 +146,24 @@
146
146
  white-space: normal;
147
147
  }
148
148
 
149
- .display-properties-app-switch svg {
149
+ /* The app's glyph leads the row the way a menu item's or a host's list row's
150
+ * does: drawn at the shared muted `--opacity-icon`, so the label carries the
151
+ * row and the switch carries its state. */
152
+ .display-properties-app-switch-icon {
150
153
  flex: 0 0 auto;
154
+ opacity: var(--opacity-icon);
155
+ }
156
+
157
+ /* Touch (routed): the same 44px row and 24px glyph as the launcher, menus,
158
+ * and a host's list rows, so this list does not read denser than the rest.
159
+ * Author CSS outranks the icon's `size={16}` attributes. */
160
+ :root[data-navigation-mode="routed"] .display-properties-app-switch {
161
+ min-height: var(--control-height);
162
+ }
163
+
164
+ :root[data-navigation-mode="routed"] .display-properties-app-switch-icon {
165
+ width: var(--control-icon-size);
166
+ height: var(--control-icon-size);
151
167
  }
152
168
 
153
169
  /* A checkbox drawn as a sliding switch: a pill track and a round thumb that
@@ -171,7 +171,9 @@ the host writes overrides it. Tearleads overrides them with its own themes in
171
171
  [`packages/app/src/shell/layout/AppChrome.css`][app-chrome].
172
172
  The routed shell also reads the screen's safe areas (`--safe-area-*`) and, under
173
173
  `:root[data-navigation-mode="routed"]`, a 44px `--control-height` and 24px
174
- `--control-icon-size`, which [`tokens.css`][tokens] defines the same way.
174
+ `--control-icon-size`, which [`tokens.css`][tokens] defines the same way. Menus
175
+ and `DisplayProperties`' app switches size their rows and glyphs from the same
176
+ two tokens, so they match a host's list rows that read them.
175
177
 
176
178
  Several defaults derive from `--color-dark`, the foreground: the window edge
177
179
  (`--border-strong-color`), the hover and selection chip (`--emphasis-surface`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tearleads/windowing",
3
- "version": "0.2.47",
3
+ "version": "0.2.49",
4
4
  "description": "App-agnostic window management for React: window state, window chrome, and the menu and sidebar primitives it renders with.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -359,8 +359,10 @@
359
359
  cursor: pointer;
360
360
  }
361
361
 
362
- .routed-pane-taskbar-menu-button:focus-visible,
363
- .routed-pane-taskbar-menu-button[aria-expanded="true"] {
362
+ /* Only keyboard focus fills the button. Open is not marked: the launcher sheet
363
+ covers the button while it is open, and in tablet side mode the expanded
364
+ rail already shows the state, where a lasting fill read as a focus ring. */
365
+ .routed-pane-taskbar-menu-button:focus-visible {
364
366
  background: var(--emphasis-surface);
365
367
  color: var(--emphasis-text);
366
368
  }