ooxml-ui 0.16.2 → 0.16.3

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.
@@ -777,7 +777,10 @@ var CSS3 = `
777
777
  :host(:focus-within) { border-color: ${tok("--office-field-border-focus")}; }
778
778
  :host([variant="titlebar"]) { height: ${tok("--office-field-height")}; gap: ${tok("--office-space-1-5")}; padding-inline: ${tok("--office-space-3-5")};
779
779
  border-color: ${tok("--office-border")}; border-radius: ${tok("--office-radius-md")}; background: ${tok("--office-background")}; }
780
- :host([variant="titlebar"]:focus-within) { color: ${tok("--office-foreground")}; }
780
+ :host([variant="titlebar"]:focus-within) {
781
+ border-color: ${tok("--office-field-border-focus")};
782
+ color: ${tok("--office-foreground")};
783
+ }
781
784
  :host([disabled]) { opacity: .5; cursor: not-allowed; }
782
785
  svg { width: ${tok("--office-icon-size-md")}; height: ${tok("--office-icon-size-md")}; flex: none; }
783
786
  :host([variant="titlebar"]) svg { width: ${tok("--office-icon-size")}; height: ${tok("--office-icon-size")}; }
@@ -1975,12 +1978,12 @@ var SWITCH_CSS = `
1975
1978
  flex: none; border: var(--_b) solid ${tok("--office-switch-border")}; border-radius: ${tok("--office-radius-full")};
1976
1979
  background: ${tok("--office-switch-track")}; cursor: pointer; vertical-align: middle;
1977
1980
  touch-action: manipulation; transition: background-color ${tok("--office-duration")}; }
1978
- :host::after { content: ""; position: absolute; top: calc((var(--_h) - 2 * var(--_b) - var(--_k)) / 2); left: var(--_o);
1981
+ .knob { display: block; position: absolute; top: calc((var(--_h) - 2 * var(--_b) - var(--_k)) / 2); left: var(--_o);
1979
1982
  width: var(--_k); height: var(--_k); border-radius: 50%; background: ${tok("--office-switch-thumb")};
1980
1983
  box-shadow: ${tok("--office-shadow-sm")}; transition: transform ${tok("--office-duration")}; }
1981
1984
  :host([checked]) { border-color: ${tok("--office-switch-track-on")};
1982
1985
  background: ${tok("--office-switch-track-on")}; }
1983
- :host([checked])::after { transform: translateX(var(--office-switch-knob-travel, calc(var(--_w) - var(--_k) - 2 * var(--_o) - 2 * var(--_b))));
1986
+ :host([checked]) .knob { transform: translateX(var(--office-switch-knob-travel, calc(var(--_w) - var(--_k) - 2 * var(--_o) - 2 * var(--_b))));
1984
1987
  background: ${tok("--office-switch-thumb-on")}; }
1985
1988
  :host(:focus-visible) { outline: ${tok("--office-focus-width")} solid ${tok("--office-ring")}; outline-offset: ${tok("--office-focus-offset")}; }
1986
1989
  :host([disabled]) { opacity: .5; cursor: not-allowed; }
@@ -1988,9 +1991,9 @@ svg { display: none; }
1988
1991
  @media (pointer: coarse), (max-width: 767px) { :host { --_w: ${tok("--office-switch-width-touch")}; --_h: ${tok("--office-switch-height-touch")}; --_k: ${tok("--office-switch-knob-size-touch")}; } }
1989
1992
  @media (forced-colors: active) {
1990
1993
  :host { border-color: CanvasText; background: Canvas; forced-color-adjust: none; }
1991
- :host::after { background: CanvasText; }
1994
+ .knob { background: CanvasText; }
1992
1995
  :host([checked]) { border-color: Highlight; background: Highlight; }
1993
- :host([checked])::after { background: HighlightText; }
1996
+ :host([checked]) .knob { background: HighlightText; }
1994
1997
  }
1995
1998
  `;
1996
1999
  function makeCheckable(role, css) {
@@ -2011,6 +2014,12 @@ function makeCheckable(role, css) {
2011
2014
  const template = this.ownerDocument.createElement("template");
2012
2015
  template.innerHTML = CHECK_SVG;
2013
2016
  root.append(template.content.cloneNode(true));
2017
+ if (role === "switch") {
2018
+ const knob = this.ownerDocument.createElement("span");
2019
+ knob.className = "knob";
2020
+ knob.setAttribute("part", "knob");
2021
+ root.append(knob);
2022
+ }
2014
2023
  this.addEventListener("click", (event) => {
2015
2024
  if (this.disabled) event.preventDefault();
2016
2025
  else this.toggle();
package/dist/controls.js CHANGED
@@ -1,4 +1,4 @@
1
- export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TOAST_VISIBLE_LIMIT, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonGroup, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineToasts, defineToolbar, defineZoomSlider, nextEnabledIndex, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-QELTZLUJ.js';
1
+ export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TOAST_VISIBLE_LIMIT, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonGroup, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineToasts, defineToolbar, defineZoomSlider, nextEnabledIndex, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-IKE3XWDZ.js';
2
2
  export { defineIcon } from './chunk-YFT6FYOP.js';
3
3
  import './chunk-YM2DT6QD.js';
4
4
  import './chunk-XPYONXNE.js';
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { installOfficeUiTheme } from './chunk-F4TM7U4P.js';
2
2
  export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme } from './chunk-F4TM7U4P.js';
3
- import { registerControls } from './chunk-QELTZLUJ.js';
4
- export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TOAST_VISIBLE_LIMIT, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonGroup, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineToasts, defineToolbar, defineZoomSlider, nextEnabledIndex, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-QELTZLUJ.js';
3
+ import { registerControls } from './chunk-IKE3XWDZ.js';
4
+ export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, EMPTY_MENU_STATE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TOAST_VISIBLE_LIMIT, attachKeyTips, clampFlyoutPosition, clampOptionNumber, clearOfficeProfile, defineAccount, defineBackstage, defineButton, defineCheckbox, defineCommandSearch, defineContextMenu, defineDialog, defineDialogFooter, defineFindBar, defineMenuButton, defineMenuItem, defineMenuSeparator, defineOptionsDialog, definePasteOptions, definePrintPreview, defineRadio, defineReadOnlyBanner, defineRibbon, defineRibbonGroup, defineRibbonStack, defineRibbonToggle, defineRuler, defineSearchField, defineSelect, defineStatusBar, defineStatusItem, defineSwitch, defineTabStrip, defineToasts, defineToolbar, defineZoomSlider, nextEnabledIndex, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, typeAheadIndex, writeOfficeProfile } from './chunk-IKE3XWDZ.js';
5
5
  export { ICON_CSS, createIconSvg, defineIcon, getIcon, listIcons, paintIcon, registerIcon } from './chunk-YFT6FYOP.js';
6
6
  import { definePresence } from './chunk-YM2DT6QD.js';
7
7
  export { definePresence, initialsOf, participantsFromAwareness } from './chunk-YM2DT6QD.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ooxml-ui",
3
- "version": "0.16.2",
3
+ "version": "0.16.3",
4
4
  "description": "Shared, format-neutral web components and styles for the Office viewers (Word, PowerPoint, Excel)",
5
5
  "keywords": [
6
6
  "custom-elements",