ooxml-ui 0.12.0 → 0.14.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.
@@ -1,4 +1,5 @@
1
- import { definer, attachStyles, controlCss, emit } from './chunk-EY266IK3.js';
1
+ import { definer, attachStyles, controlCss, emit } from './chunk-3BHP4IFP.js';
2
+ import { tok } from './chunk-BDJW2KDI.js';
2
3
 
3
4
  // src/presence.ts
4
5
  function participantsFromAwareness(states, selfId) {
@@ -27,14 +28,14 @@ var initialsOf = (name) => {
27
28
  var CSS = `
28
29
  :host { display: inline-flex; align-items: center; }
29
30
  ul { display: flex; margin: 0; padding: 0; list-style: none; }
30
- li { margin-inline-start: -6px; }
31
+ li { margin-inline-start: calc(-1 * ${tok("--office-space-1-5")}); }
31
32
  li:first-child { margin-inline-start: 0; }
32
33
  button, .more { box-sizing: border-box; display: inline-grid; place-items: center;
33
- width: var(--office-target-size, 28px); height: var(--office-target-size, 28px); padding: 0; border-radius: 50%;
34
- border: 2px solid var(--office-avatar-color, #6b7280); background: var(--office-surface, #f3f4f6);
35
- color: var(--office-foreground, #1f2937); font: 600 11px var(--office-font, system-ui, sans-serif); cursor: pointer; }
36
- .more { cursor: default; border-color: var(--office-border, #d1d5db); }
37
- button:focus-visible { outline: 2px solid var(--office-ring, #2563eb); outline-offset: 1px; z-index: 1; }
34
+ width: ${tok("--office-target-size")}; height: ${tok("--office-target-size")}; padding: 0; border-radius: 50%;
35
+ border: ${tok("--office-border-width-thick")} solid ${tok("--office-avatar-color")}; background: ${tok("--office-surface")};
36
+ color: ${tok("--office-foreground")}; font: 600 ${tok("--office-font-size-xs")} ${tok("--office-font")}; cursor: pointer; }
37
+ .more { cursor: default; border-color: ${tok("--office-border")}; }
38
+ button:focus-visible { outline: ${tok("--office-focus-width")} solid ${tok("--office-ring")}; outline-offset: calc(${tok("--office-focus-offset")} / 2); z-index: 1; }
38
39
  button[data-status="idle"] { opacity: .7; }
39
40
  button[data-status="away"] { opacity: .45; border-style: dashed; }
40
41
  @media (forced-colors: active) {
@@ -1,4 +1,4 @@
1
- import { definer, attachStyles, controlCss } from './chunk-EY266IK3.js';
1
+ import { definer, attachStyles, controlCss } from './chunk-3BHP4IFP.js';
2
2
 
3
3
  // src/icons.ts
4
4
  var registry = /* @__PURE__ */ new Map();
package/dist/controls.js CHANGED
@@ -1,4 +1,5 @@
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
- export { defineIcon } from './chunk-YZ2JQNHX.js';
3
- import './chunk-RLPL7Q6J.js';
4
- import './chunk-EY266IK3.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-EWNLGZPX.js';
2
+ export { defineIcon } from './chunk-WNSUNQIY.js';
3
+ import './chunk-WKLVWPI7.js';
4
+ import './chunk-3BHP4IFP.js';
5
+ import './chunk-BDJW2KDI.js';
@@ -47,7 +47,7 @@ export interface OfficePasteOptionsState {
47
47
  label?: string;
48
48
  }
49
49
  /**
50
- * `<office-ui-paste-options>`: the strip anchored 4px past a just-pasted object's bottom-right
50
+ * `<office-ui-paste-options>`: the strip anchored one `--office-space-1` step past a just-pasted object's bottom-right
51
51
  * corner (the host is the fixed box). A choice emits `office-paste-options-request`
52
52
  * `{ format }` then `office-paste-options-dismiss`; the first pointerdown or keydown outside
53
53
  * (Escape inside too) dismisses, armed one task after connecting so the paste gesture does not.
package/dist/icons.js CHANGED
@@ -1,2 +1,3 @@
1
- export { ICON_CSS, createIconSvg, defineIcon, getIcon, listIcons, paintIcon, registerIcon } from './chunk-YZ2JQNHX.js';
2
- import './chunk-EY266IK3.js';
1
+ export { ICON_CSS, createIconSvg, defineIcon, getIcon, listIcons, paintIcon, registerIcon } from './chunk-WNSUNQIY.js';
2
+ import './chunk-3BHP4IFP.js';
3
+ import './chunk-BDJW2KDI.js';
package/dist/index.js CHANGED
@@ -1,13 +1,14 @@
1
- import { installOfficeUiTheme } from './chunk-H4KFVIGT.js';
2
- export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme } from './chunk-H4KFVIGT.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
- export { ICON_CSS, createIconSvg, defineIcon, getIcon, listIcons, paintIcon, registerIcon } from './chunk-YZ2JQNHX.js';
6
- import { definePresence } from './chunk-RLPL7Q6J.js';
7
- export { definePresence, initialsOf, participantsFromAwareness } from './chunk-RLPL7Q6J.js';
8
- import { defineSmartArt } from './chunk-KJV76AB7.js';
9
- export { defineSmartArt, renderDiagramDrawing } from './chunk-KJV76AB7.js';
10
- export { CONTRACT_REVISION } from './chunk-EY266IK3.js';
1
+ import { installOfficeUiTheme } from './chunk-7CCQN3VM.js';
2
+ export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme } from './chunk-7CCQN3VM.js';
3
+ import { registerControls } from './chunk-EWNLGZPX.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-EWNLGZPX.js';
5
+ export { ICON_CSS, createIconSvg, defineIcon, getIcon, listIcons, paintIcon, registerIcon } from './chunk-WNSUNQIY.js';
6
+ import { definePresence } from './chunk-WKLVWPI7.js';
7
+ export { definePresence, initialsOf, participantsFromAwareness } from './chunk-WKLVWPI7.js';
8
+ import { defineSmartArt } from './chunk-4WUYOQRL.js';
9
+ export { defineSmartArt, renderDiagramDrawing } from './chunk-4WUYOQRL.js';
10
+ export { CONTRACT_REVISION } from './chunk-3BHP4IFP.js';
11
+ export { COMPACT, FOCUS_RING, OFFICE_TOKENS, TOUCH, tok } from './chunk-BDJW2KDI.js';
11
12
 
12
13
  // src/index.ts
13
14
  var OFFICE_UI_TAGS = [
package/dist/presence.js CHANGED
@@ -1,2 +1,3 @@
1
- export { definePresence, initialsOf, participantsFromAwareness } from './chunk-RLPL7Q6J.js';
2
- import './chunk-EY266IK3.js';
1
+ export { definePresence, initialsOf, participantsFromAwareness } from './chunk-WKLVWPI7.js';
2
+ import './chunk-3BHP4IFP.js';
3
+ import './chunk-BDJW2KDI.js';
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Popup helpers of `office-ui-select`. Moved from pptx-viewer
3
+ * (`packages/shared/src/web-components/select-menu.ts`, `select-trigger.ts`).
4
+ */
5
+ /** Mutations that can change a select's value, labels or font preview. */
6
+ export declare const SELECT_OPTION_ATTRIBUTES: string[];
7
+ /** The flattened option data the popup renders. */
8
+ export interface SelectChoice {
9
+ value: string;
10
+ label: string;
11
+ disabled: boolean;
12
+ hidden: boolean;
13
+ group: string;
14
+ displayLabel?: string;
15
+ description?: string;
16
+ fontFamily?: string;
17
+ }
18
+ /** Flatten `<option>` children, keeping optgroup labels and disabled or hidden state. */
19
+ export declare function collectSelectChoices(options: HTMLOptionElement[]): SelectChoice[];
20
+ /** Build the popup's options (only while it is open or has been opened). */
21
+ export declare function renderSelectMenu(menu: HTMLElement, choices: SelectChoice[], value: string): void;
22
+ /**
23
+ * Prefer below the trigger, flipping above when that offers more room. Margins, the gap and the
24
+ * height cap come from `--office-space-2`, `--office-space-1` and `--office-select-max-height`
25
+ * (`--office-font-picker-max-height` for a font family picker).
26
+ */
27
+ export declare function positionSelectMenu(menu: HTMLElement, trigger: HTMLElement, host: HTMLElement): void;
28
+ /** Expose the keyboard target while keeping the selected state separate. */
29
+ export declare function markSelectActive(menu: HTMLElement, trigger: HTMLElement, active: number, open: boolean): void;
30
+ /** The next enabled, visible option when moving with the arrow keys (wrapping). */
31
+ export declare function nextSelectActive(choices: SelectChoice[], active: number, step: number): number;
32
+ /** Options a PageUp/PageDown press moves, like the visible rows of a native listbox. */
33
+ export declare const SELECT_PAGE_SIZE = 8;
34
+ /** Jump a page of options up (-1) or down (+1), clamped to the nearest enabled option. */
35
+ export declare function pageSelectActive(choices: SelectChoice[], active: number, direction: 1 | -1): number;
36
+ /** Trigger with an `icon` slot, the value text and a chevron. */
37
+ export declare function createSelectTrigger(doc: Document): {
38
+ trigger: HTMLButtonElement;
39
+ text: HTMLSpanElement;
40
+ };
41
+ /** Optional editable content (`slot="custom"`) stays in the light DOM so hosts own its events. */
42
+ export declare function prependSelectCustomSlot(host: HTMLElement, menu: HTMLElement): void;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * `office-ui-select` styles, moved from pptx-viewer (`select-styles.ts`, `select-ribbon-styles.ts`)
3
+ * and expressed in tokens. `variant="ribbon-font"` and `variant="ribbon-icon"` are the compact
4
+ * ribbon combo and icon picker; `data-font-picker="family"` widens and lengthens the popup.
5
+ */
6
+ export declare const SELECT_CSS: string;
package/dist/select.d.ts CHANGED
@@ -1,13 +1,19 @@
1
+ /** A programmatic choice; `<option>` elements satisfy the same shape. */
1
2
  export interface OfficeSelectOption {
2
3
  value: string;
3
4
  label: string;
4
5
  disabled?: boolean;
5
6
  }
6
7
  /**
7
- * Single-select dropdown. Properties: `options` (array), `value`, `disabled`, `selectedIndex`;
8
- * attributes `value`, `disabled`, `aria-label`. Trigger has `role="combobox"` and the popup is a
9
- * `listbox`. Keyboard: ArrowDown/Up (open, move), Home, End, Enter/Space (choose), Escape
10
- * (close), printable keys (typeahead); disabled options are skipped. `input` then `change`
11
- * bubble when the user picks; setting a property is silent.
8
+ * Single-select combobox. Moved from pptx-viewer `pptx-ui-select` (the declarative, most complete
9
+ * implementation). Choices come from `<option>` / `<optgroup>` children (with `data-display-label`,
10
+ * `data-description` and font previews through `style="font-family"`), or from the `options`
11
+ * property when there are none. `value`, `disabled`, `selectedIndex`, `aria-label`;
12
+ * `variant="ribbon-font"` (compact ribbon combo that accepts unlisted values, such as a typed font
13
+ * size) or `"ribbon-icon"`; `data-font-picker="family|size"`; an `icon` slot and a `custom` slot at
14
+ * the top of the popup. Keyboard: arrows, Home, End, PageUp/PageDown (8 options), typeahead,
15
+ * Enter/Space, Escape, Tab; disabled and hidden choices are skipped. The popup is a top-layer
16
+ * `popover`, flipped above the trigger when there is more room. `input` then `change` bubble on a
17
+ * user choice; setting a property is silent. Form-associated.
12
18
  */
13
19
  export declare const defineSelect: import("./registry.js").Definer;
package/dist/smartart.js CHANGED
@@ -1,2 +1,3 @@
1
- export { defineSmartArt, renderDiagramDrawing } from './chunk-KJV76AB7.js';
2
- import './chunk-EY266IK3.js';
1
+ export { defineSmartArt, renderDiagramDrawing } from './chunk-4WUYOQRL.js';
2
+ import './chunk-3BHP4IFP.js';
3
+ import './chunk-BDJW2KDI.js';
package/dist/styles.d.ts CHANGED
@@ -4,5 +4,5 @@ export declare function attachStyles(root: ShadowRoot, css: string): void;
4
4
  * Rules every control repeats: `hidden`, the coarse-pointer touch target and the forced-colors
5
5
  * focus ring. Prepended to each control's own CSS by `controlCss`.
6
6
  */
7
- export declare const COMMON_CONTROL_CSS = "\n:host([hidden]) { display: none !important; }\n@media (pointer: coarse), (max-width: 767px) {\n\t:host { --office-target-size: 44px; }\n}\n@media (forced-colors: active) {\n\t:host(:focus-visible), :focus-visible { outline: 2px solid Highlight; outline-offset: 2px; }\n}\n";
7
+ export declare const COMMON_CONTROL_CSS: string;
8
8
  export declare const controlCss: (css: string) => string;
package/dist/theme.d.ts CHANGED
@@ -1,9 +1,10 @@
1
+ export { COMPACT, FOCUS_RING, OFFICE_TOKENS, tok, TOUCH, type OfficeToken } from './tokens.js';
1
2
  /**
2
3
  * Theme-token foundation. Custom properties cross shadow boundaries, so one `<style>` in the
3
4
  * document head themes every control. Every token also has a fallback inside each control, so
4
5
  * installing the theme is optional; a host overrides any token on `:root` or on a container.
5
6
  */
6
7
  export declare const THEME_STYLE_ID = "office-ui-theme";
7
- export declare const THEME_CSS = "\n:root {\n\t--office-foreground: #1f2937;\n\t--office-muted-foreground: #6b7280;\n\t--office-background: #ffffff;\n\t--office-surface: #f3f4f6;\n\t--office-border: #d1d5db;\n\t--office-accent: #2563eb;\n\t--office-accent-foreground: #ffffff;\n\t--office-ring: #2563eb;\n\t--office-danger: #b91c1c;\n\t--office-target-size: 28px;\n\t--office-radius: 4px;\n\t--office-font: system-ui, -apple-system, \"Segoe UI\", sans-serif;\n}\n@media (prefers-color-scheme: dark) {\n\t:root:not([data-office-theme=\"light\"]) {\n\t--office-foreground: #f9fafb;\n\t--office-muted-foreground: #9ca3af;\n\t--office-background: #111827;\n\t--office-surface: #1f2937;\n\t--office-border: #374151;\n\t--office-accent: #6366f1;\n\t--office-ring: #818cf8;\n\t--office-danger: #f87171;\n\t}\n}\n:root[data-office-theme=\"dark\"] {\n\t--office-foreground: #f9fafb;\n\t--office-muted-foreground: #9ca3af;\n\t--office-background: #111827;\n\t--office-surface: #1f2937;\n\t--office-border: #374151;\n\t--office-accent: #6366f1;\n\t--office-ring: #818cf8;\n\t--office-danger: #f87171;\n}\n@media (pointer: coarse), (max-width: 767px) {\n\t:root { --office-target-size: 44px; }\n}\n@media (forced-colors: active) {\n\t:root {\n\t\t--office-foreground: CanvasText;\n\t\t--office-muted-foreground: GrayText;\n\t\t--office-background: Canvas;\n\t\t--office-surface: Canvas;\n\t\t--office-border: CanvasText;\n\t\t--office-accent: Highlight;\n\t\t--office-accent-foreground: HighlightText;\n\t\t--office-ring: Highlight;\n\t\t--office-danger: CanvasText;\n\t}\n}\n";
8
+ export declare const THEME_CSS: string;
8
9
  /** Idempotent. Browser-only; returns false (and does nothing) without a document. */
9
10
  export declare function installOfficeUiTheme(doc?: Document | undefined): boolean;
package/dist/theme.js CHANGED
@@ -1 +1,2 @@
1
- export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme } from './chunk-H4KFVIGT.js';
1
+ export { THEME_CSS, THEME_STYLE_ID, installOfficeUiTheme } from './chunk-7CCQN3VM.js';
2
+ export { COMPACT, FOCUS_RING, OFFICE_TOKENS, TOUCH, tok } from './chunk-BDJW2KDI.js';
@@ -0,0 +1,194 @@
1
+ /**
2
+ * The ooxml-ui design tokens: the single source of every colour, size, space, radius, type,
3
+ * shadow, motion and layering value the controls use. Controls never write a literal; they read
4
+ * `tok('--office-…')`, which expands to `var(--office-…, <default>)`, so a control renders
5
+ * correctly with or without the installed theme and a host overrides any token on `:root` or on
6
+ * any container. `THEME_CSS` (theme.ts) declares these defaults on `:root` plus dark and
7
+ * forced-colours values. Component tokens default to the semantic ones.
8
+ */
9
+ export declare const OFFICE_TOKENS: {
10
+ readonly '--office-foreground': "#1f2937";
11
+ readonly '--office-muted-foreground': "#6b7280";
12
+ readonly '--office-background': "#ffffff";
13
+ readonly '--office-surface': "#f3f4f6";
14
+ readonly '--office-selected': "#e5e7eb";
15
+ readonly '--office-border': "#d1d5db";
16
+ readonly '--office-accent': "#2563eb";
17
+ readonly '--office-accent-foreground': "#ffffff";
18
+ readonly '--office-ring': "#2563eb";
19
+ readonly '--office-danger': "#b91c1c";
20
+ readonly '--office-danger-foreground': "#ffffff";
21
+ readonly '--office-warning': "#d97706";
22
+ readonly '--office-warning-foreground': "#ffffff";
23
+ readonly '--office-info': "#3b82f6";
24
+ readonly '--office-popover': "var(--office-background, #ffffff)";
25
+ readonly '--office-popover-foreground': "var(--office-foreground, #1f2937)";
26
+ readonly '--office-overlay': "rgb(0 0 0 / 40%)";
27
+ readonly '--office-notice-background': "#fef3c7";
28
+ readonly '--office-notice-foreground': "#78350f";
29
+ readonly '--office-notice-border': "rgb(180 83 9 / 30%)";
30
+ readonly '--office-notice-accent': "#d97706";
31
+ readonly '--office-keytip-background': "#ffffff";
32
+ readonly '--office-keytip-foreground': "#1f1f1f";
33
+ readonly '--office-keytip-border': "#8a8886";
34
+ readonly '--office-highlight': "#dc2626";
35
+ readonly '--office-paper': "#ffffff";
36
+ readonly '--office-accent-hover': "color-mix(in srgb, var(--office-accent, #2563eb) 85%, #000)";
37
+ readonly '--office-font': "system-ui, -apple-system, \"Segoe UI\", sans-serif";
38
+ readonly '--office-font-size-3xs': "9px";
39
+ readonly '--office-font-size-2xs': "10px";
40
+ readonly '--office-font-size-xs': "11px";
41
+ readonly '--office-font-size-sm': "12px";
42
+ readonly '--office-font-size': "13px";
43
+ readonly '--office-font-size-md': "14px";
44
+ readonly '--office-font-size-lg': "15px";
45
+ readonly '--office-font-size-xl': "18px";
46
+ readonly '--office-font-weight-medium': "500";
47
+ readonly '--office-font-weight-bold': "600";
48
+ readonly '--office-line-height': "1.4";
49
+ readonly '--office-line-height-tight': "1.2";
50
+ readonly '--office-icon-stroke': "1.5";
51
+ readonly '--office-space-px': "1px";
52
+ readonly '--office-space-0': "2px";
53
+ readonly '--office-space-1': "4px";
54
+ readonly '--office-space-1-5': "6px";
55
+ readonly '--office-space-2': "8px";
56
+ readonly '--office-space-2-5': "10px";
57
+ readonly '--office-space-3': "12px";
58
+ readonly '--office-space-3-5': "14px";
59
+ readonly '--office-space-4': "16px";
60
+ readonly '--office-space-5': "20px";
61
+ readonly '--office-space-6': "24px";
62
+ readonly '--office-border-width': "1px";
63
+ readonly '--office-border-width-thick': "2px";
64
+ readonly '--office-radius-xs': "2px";
65
+ readonly '--office-radius-sm': "3px";
66
+ readonly '--office-radius': "4px";
67
+ readonly '--office-radius-md': "6px";
68
+ readonly '--office-radius-lg': "8px";
69
+ readonly '--office-radius-full': "999px";
70
+ readonly '--office-focus-width': "2px";
71
+ readonly '--office-focus-offset': "2px";
72
+ readonly '--office-target-size': "28px";
73
+ readonly '--office-target-size-touch': "44px";
74
+ readonly '--office-control-height': "24px";
75
+ readonly '--office-control-height-md': "28px";
76
+ readonly '--office-control-height-lg': "32px";
77
+ readonly '--office-input-height': "26px";
78
+ readonly '--office-control-height-xs': "22px";
79
+ readonly '--office-icon-size-xs': "10px";
80
+ readonly '--office-icon-size-sm': "12px";
81
+ readonly '--office-icon-size': "14px";
82
+ readonly '--office-icon-size-md': "16px";
83
+ readonly '--office-icon-size-ml': "18px";
84
+ readonly '--office-icon-size-lg': "20px";
85
+ readonly '--office-shadow-sm': "0 1px 3px rgb(0 0 0 / 20%)";
86
+ readonly '--office-shadow': "0 6px 20px rgb(0 0 0 / 18%)";
87
+ readonly '--office-shadow-lg': "0 10px 25px rgb(0 0 0 / 20%)";
88
+ readonly '--office-z-popover': "1100";
89
+ readonly '--office-z-dialog': "1000";
90
+ readonly '--office-z-backstage': "30";
91
+ readonly '--office-duration-fast': ".12s";
92
+ readonly '--office-duration': ".15s";
93
+ readonly '--office-duration-spin': ".8s";
94
+ readonly '--office-field-height': "28px";
95
+ readonly '--office-field-height-lg': "40px";
96
+ readonly '--office-field-radius': "5px";
97
+ readonly '--office-field-border': "var(--office-border, #d1d5db)";
98
+ readonly '--office-field-border-focus': "var(--office-ring, #2563eb)";
99
+ readonly '--office-field-background': "var(--office-background, #ffffff)";
100
+ readonly '--office-field-foreground': "var(--office-foreground, #1f2937)";
101
+ readonly '--office-field-placeholder': "var(--office-muted-foreground, #6b7280)";
102
+ readonly '--office-checkbox-size': "16px";
103
+ readonly '--office-checkbox-size-touch': "22px";
104
+ readonly '--office-checkbox-radius': "3px";
105
+ readonly '--office-checkbox-border': "var(--office-border, #d1d5db)";
106
+ readonly '--office-checkbox-background': "var(--office-background, #ffffff)";
107
+ readonly '--office-checkbox-accent': "var(--office-accent, #2563eb)";
108
+ readonly '--office-checkbox-accent-foreground': "var(--office-accent-foreground, #ffffff)";
109
+ readonly '--office-radio-dot-size': "8px";
110
+ readonly '--office-radio-dot-size-touch': "12px";
111
+ readonly '--office-switch-width': "32px";
112
+ readonly '--office-switch-height': "18px";
113
+ readonly '--office-switch-width-touch': "44px";
114
+ readonly '--office-switch-height-touch': "24px";
115
+ readonly '--office-switch-border-width': "1px";
116
+ readonly '--office-switch-knob-size': "12px";
117
+ readonly '--office-switch-knob-size-touch': "18px";
118
+ readonly '--office-switch-knob-offset': "2px";
119
+ readonly '--office-switch-border': "var(--office-border, #d1d5db)";
120
+ readonly '--office-switch-track': "var(--office-surface, #f3f4f6)";
121
+ readonly '--office-switch-track-on': "var(--office-accent, #2563eb)";
122
+ readonly '--office-switch-thumb': "var(--office-foreground, #1f2937)";
123
+ readonly '--office-switch-thumb-on': "var(--office-accent-foreground, #ffffff)";
124
+ readonly '--office-ribbon-tab-height': "35px";
125
+ readonly '--office-ribbon-group-gap': "2px";
126
+ readonly '--office-ribbon-group-height': "78px";
127
+ readonly '--office-ribbon-caption-line-height': "12px";
128
+ readonly '--office-ribbon-row-height': "22px";
129
+ readonly '--office-ribbon-file-min-width': "52px";
130
+ readonly '--office-launcher-width': "16px";
131
+ readonly '--office-launcher-height': "14px";
132
+ readonly '--office-tab-indicator-width': "2.5px";
133
+ readonly '--office-status-bar-height': "24px";
134
+ readonly '--office-tab-height': "28px";
135
+ readonly '--office-tab-max-width': "220px";
136
+ readonly '--office-zoom-slider-width': "120px";
137
+ readonly '--office-zoom-slider-min-width': "48px";
138
+ readonly '--office-zoom-value-width': "40px";
139
+ readonly '--office-dialog-width': "auto";
140
+ readonly '--office-dialog-max-width': "min(640px, 100vw)";
141
+ readonly '--office-dialog-max-height': "90vh";
142
+ readonly '--office-dialog-min-width': "min(320px, 100vw)";
143
+ readonly '--office-dialog-button-min-width': "76px";
144
+ readonly '--office-options-width': "min(820px, 100vw)";
145
+ readonly '--office-options-nav-width': "180px";
146
+ readonly '--office-options-min-height': "min(440px, 70vh)";
147
+ readonly '--office-options-label-width': "180px";
148
+ readonly '--office-options-row-height': "30px";
149
+ readonly '--office-options-number-width': "80px";
150
+ readonly '--office-info-size': "15px";
151
+ readonly '--office-selection-bar-width': "3px";
152
+ readonly '--office-backstage-nav-width': "200px";
153
+ readonly '--office-backstage-nav-background': "var(--office-accent, #2563eb)";
154
+ readonly '--office-backstage-nav-foreground': "var(--office-accent-foreground, #ffffff)";
155
+ readonly '--office-backstage-item-hover': "rgb(0 0 0 / 22%)";
156
+ readonly '--office-backstage-padding': "28px 40px";
157
+ readonly '--office-backstage-back-size': "36px";
158
+ readonly '--office-backstage-item-height': "38px";
159
+ readonly '--office-menu-min-width': "180px";
160
+ readonly '--office-menu-max-height': "60vh";
161
+ readonly '--office-context-menu-min-width': "200px";
162
+ readonly '--office-search-popup-min-width': "240px";
163
+ readonly '--office-search-popup-max-height': "320px";
164
+ readonly '--office-select-max-height': "240px";
165
+ readonly '--office-select-background': "var(--office-background, #ffffff)";
166
+ readonly '--office-select-menu-min-width': "90px";
167
+ readonly '--office-select-option-active': "color-mix(in srgb, var(--office-accent, #2563eb) 20%, var(--office-popover, #ffffff))";
168
+ readonly '--office-select-ribbon-menu-width': "192px";
169
+ readonly '--office-font-picker-max-height': "320px";
170
+ readonly '--office-font-picker-width': "256px";
171
+ readonly '--office-chevron-size': "6px";
172
+ readonly '--office-ribbon-combo-height': "28px";
173
+ readonly '--office-ribbon-icon-select-width': "36px";
174
+ readonly '--office-search-width': "320px";
175
+ readonly '--office-print-preview-width': "420px";
176
+ readonly '--office-find-max-width': "640px";
177
+ readonly '--office-find-bar-height': "40px";
178
+ readonly '--office-ruler-size': "18px";
179
+ readonly '--office-avatar-size': "48px";
180
+ readonly '--office-avatar-color': "var(--office-muted-foreground, #6b7280)";
181
+ readonly '--office-toast-width': "360px";
182
+ readonly '--office-account-field-width': "320px";
183
+ };
184
+ export type OfficeToken = keyof typeof OFFICE_TOKENS;
185
+ /** `var(--office-…, <default>)` for a declared token. The default comes from the table. */
186
+ export declare function tok(name: OfficeToken): string;
187
+ /** The standard keyboard focus ring. */
188
+ export declare const FOCUS_RING: string;
189
+ /**
190
+ * Layout breakpoints. CSS forbids custom properties in media queries, so these are the only
191
+ * lengths written literally; every control uses these two.
192
+ */
193
+ export declare const COMPACT = "(max-width: 767px)";
194
+ export declare const TOUCH = "(pointer: coarse), (max-width: 767px)";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ooxml-ui",
3
- "version": "0.12.0",
3
+ "version": "0.14.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",