ooxml-ui 0.11.0 → 0.12.0

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.
@@ -1866,33 +1866,44 @@ var defineButton = definer("office-ui-button", () => {
1866
1866
  // src/checkable.ts
1867
1867
  var CHECK_SVG = '<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m3 8 3.2 3.2L13 4.5"/></svg>';
1868
1868
  var CHECKBOX_CSS = `
1869
- :host { display: inline-grid; box-sizing: border-box; width: 16px; height: 16px; flex: none;
1870
- place-items: center; border: 1px solid var(--office-border, #d1d5db); border-radius: 3px;
1871
- background: var(--office-background, #fff); color: var(--office-accent-foreground, #fff);
1872
- cursor: pointer; vertical-align: middle; }
1873
- :host([checked]) { border-color: var(--office-accent, #2563eb); background: var(--office-accent, #2563eb); }
1869
+ :host { display: inline-grid; box-sizing: border-box; width: var(--office-checkbox-size, 16px); height: var(--office-checkbox-size, 16px);
1870
+ flex: none; place-items: center; border: 1px solid var(--office-checkbox-border, var(--office-border, #d1d5db));
1871
+ border-radius: var(--office-checkbox-radius, 3px); background: var(--office-checkbox-background, var(--office-background, #fff));
1872
+ color: var(--office-checkbox-accent-foreground, var(--office-accent-foreground, #fff)); cursor: pointer; vertical-align: middle; }
1873
+ :host([checked]) { border-color: var(--office-checkbox-accent, var(--office-accent, #2563eb));
1874
+ background: var(--office-checkbox-accent, var(--office-accent, #2563eb)); }
1874
1875
  :host(:focus-visible) { outline: 2px solid var(--office-ring, #2563eb); outline-offset: 2px; }
1875
1876
  :host([disabled]) { opacity: .5; cursor: not-allowed; }
1876
1877
  svg { display: none; width: 12px; height: 12px; }
1877
1878
  :host([checked]) svg { display: block; }
1878
- @media (pointer: coarse), (max-width: 767px) { :host { width: 22px; height: 22px; } svg { width: 16px; height: 16px; } }
1879
+ @media (pointer: coarse), (max-width: 767px) {
1880
+ :host { width: var(--office-checkbox-size-touch, 22px); height: var(--office-checkbox-size-touch, 22px); }
1881
+ svg { width: 16px; height: 16px; }
1882
+ }
1879
1883
  @media (forced-colors: active) {
1880
1884
  :host { border-color: CanvasText; background: Canvas; color: CanvasText; forced-color-adjust: auto; }
1881
1885
  :host([checked]) { border-color: Highlight; background: Highlight; color: HighlightText; }
1882
1886
  }
1883
1887
  `;
1884
1888
  var SWITCH_CSS = `
1885
- :host { display: inline-block; box-sizing: border-box; position: relative; width: 32px; height: 18px;
1886
- flex: none; border: 1px solid var(--office-border, #d1d5db); border-radius: 9px;
1887
- background: var(--office-surface, #f3f4f6); cursor: pointer; vertical-align: middle; }
1888
- :host::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px;
1889
- border-radius: 50%; background: var(--office-foreground, #1f2937); transition: transform .12s; }
1890
- :host([checked]) { border-color: var(--office-accent, #2563eb); background: var(--office-accent, #2563eb); }
1891
- :host([checked])::after { transform: translateX(14px); background: var(--office-accent-foreground, #fff); }
1889
+ :host { --_w: var(--office-switch-width, 32px); --_h: var(--office-switch-height, 18px);
1890
+ --_b: var(--office-switch-border-width, 1px); --_k: var(--office-switch-knob-size, 12px);
1891
+ --_o: var(--office-switch-knob-offset, 2px);
1892
+ display: inline-block; box-sizing: border-box; position: relative; width: var(--_w); height: var(--_h);
1893
+ flex: none; border: var(--_b) solid var(--office-switch-border, var(--office-border, #d1d5db)); border-radius: 999px;
1894
+ background: var(--office-switch-track, var(--office-surface, #f3f4f6)); cursor: pointer; vertical-align: middle;
1895
+ touch-action: manipulation; transition: background-color .15s; }
1896
+ :host::after { content: ""; position: absolute; top: calc((var(--_h) - 2 * var(--_b) - var(--_k)) / 2); left: var(--_o);
1897
+ width: var(--_k); height: var(--_k); border-radius: 50%; background: var(--office-switch-thumb, var(--office-foreground, #1f2937));
1898
+ box-shadow: 0 1px 2px rgb(0 0 0 / .3); transition: transform .15s; }
1899
+ :host([checked]) { border-color: var(--office-switch-track-on, var(--office-accent, #2563eb));
1900
+ background: var(--office-switch-track-on, var(--office-accent, #2563eb)); }
1901
+ :host([checked])::after { transform: translateX(var(--office-switch-knob-travel, calc(var(--_w) - var(--_k) - 2 * var(--_o) - 2 * var(--_b))));
1902
+ background: var(--office-switch-thumb-on, var(--office-accent-foreground, #fff)); }
1892
1903
  :host(:focus-visible) { outline: 2px solid var(--office-ring, #2563eb); outline-offset: 2px; }
1893
1904
  :host([disabled]) { opacity: .5; cursor: not-allowed; }
1894
1905
  svg { display: none; }
1895
- @media (pointer: coarse), (max-width: 767px) { :host { min-height: 24px; width: 44px; height: 24px; border-radius: 12px; } }
1906
+ @media (pointer: coarse), (max-width: 767px) { :host { --_w: var(--office-switch-width-touch, 44px); --_h: var(--office-switch-height-touch, 24px); --_k: var(--office-switch-knob-size-touch, 18px); } }
1896
1907
  @media (forced-colors: active) {
1897
1908
  :host { border-color: CanvasText; background: Canvas; forced-color-adjust: none; }
1898
1909
  :host::after { background: CanvasText; }
package/dist/controls.js CHANGED
@@ -1,4 +1,4 @@
1
- export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TOAST_VISIBLE_LIMIT, attachKeyTips, 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, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, writeOfficeProfile } from './chunk-KM7DN2LV.js';
1
+ export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TOAST_VISIBLE_LIMIT, attachKeyTips, 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, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, writeOfficeProfile } from './chunk-BN3UBHTC.js';
2
2
  export { defineIcon } from './chunk-YZ2JQNHX.js';
3
3
  import './chunk-RLPL7Q6J.js';
4
4
  import './chunk-EY266IK3.js';
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { installOfficeUiTheme } from './chunk-H4KFVIGT.js';
2
2
  export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme } from './chunk-H4KFVIGT.js';
3
- import { registerControls } from './chunk-KM7DN2LV.js';
4
- export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TOAST_VISIBLE_LIMIT, attachKeyTips, 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, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, writeOfficeProfile } from './chunk-KM7DN2LV.js';
3
+ import { registerControls } from './chunk-BN3UBHTC.js';
4
+ export { CONTROL_DEFINERS, DEFAULT_OFFICE_PROFILE, OFFICE_AVATAR_SWATCHES, OFFICE_PROFILE_STORAGE_KEY, OFFICE_TOAST_VISIBLE_LIMIT, attachKeyTips, 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, profileInitials, readOfficeProfile, registerControls, rulerDivisions, sanitizeOfficeProfile, writeOfficeProfile } from './chunk-BN3UBHTC.js';
5
5
  export { ICON_CSS, createIconSvg, defineIcon, getIcon, listIcons, paintIcon, registerIcon } from './chunk-YZ2JQNHX.js';
6
6
  import { definePresence } from './chunk-RLPL7Q6J.js';
7
7
  export { definePresence, initialsOf, participantsFromAwareness } from './chunk-RLPL7Q6J.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ooxml-ui",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Shared, format-neutral web components and styles for the Office viewers (Word, PowerPoint, Excel)",
5
5
  "keywords": [
6
6
  "custom-elements",