ooxml-ui 0.31.0 → 1.0.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.
Files changed (96) hide show
  1. package/README.md +14 -0
  2. package/custom-elements.json +10 -0
  3. package/dist/{chunk-RAZAJMHK.js → chunk-4QQASR5A.js} +2 -2
  4. package/dist/{chunk-HZ422LTR.js → chunk-BOX43CZD.js} +1 -0
  5. package/dist/{chunk-3GE2NHNG.js → chunk-FLHM5Q4O.js} +119 -81
  6. package/dist/{chunk-2QW4QE56.js → chunk-T3HB5LMH.js} +103 -68
  7. package/dist/controls.js +2 -2
  8. package/dist/docx/hard-break-command.d.ts +1 -3
  9. package/dist/docx/link-commands.d.ts +4 -15
  10. package/dist/docx/note-editor.d.ts +3 -2
  11. package/dist/docx/run-styles.d.ts +1 -1
  12. package/dist/docx/schema.d.ts +1 -1
  13. package/dist/docx/toggle-commands.d.ts +2 -8
  14. package/dist/docx.js +109 -302
  15. package/dist/form/gradient-direction-gallery.d.ts +19 -0
  16. package/dist/form/gradient-gallery-preview.d.ts +3 -0
  17. package/dist/form/gradient-preset-gallery.d.ts +16 -0
  18. package/dist/form/gradient-stop-track.d.ts +20 -0
  19. package/dist/form/number-range.d.ts +12 -0
  20. package/dist/icons.d.ts.map +1 -1
  21. package/dist/icons.js +1 -1
  22. package/dist/index.js +4 -4
  23. package/dist/menu/menu-button.d.ts +10 -0
  24. package/dist/menu/menu-button.d.ts.map +1 -1
  25. package/dist/pptx/{chart-3d-view-scene-IANLDFIE.mjs → chart-3d-view-scene-2KRQ5667.mjs} +2 -2
  26. package/dist/pptx/{chart-3d-view-scene-3DK5TUBZ.cjs → chart-3d-view-scene-36DMZWZ3.cjs} +37 -37
  27. package/dist/pptx/{chunk-C42ZL35K.mjs → chunk-ADOC5JLI.mjs} +1 -1
  28. package/dist/pptx/{chunk-QM4FGZG4.cjs → chunk-AIL3BNZS.cjs} +31 -131
  29. package/dist/pptx/{chunk-WLETAW3T.cjs → chunk-CJU4P5FT.cjs} +33 -13
  30. package/dist/pptx/{chunk-6SCK57RJ.cjs → chunk-FEFQTZDM.cjs} +158 -245
  31. package/dist/pptx/{chunk-EVGSFPUV.mjs → chunk-XWE5GSE7.mjs} +16 -109
  32. package/dist/pptx/{chunk-7JEMQW6R.mjs → chunk-YARCML7O.mjs} +11 -122
  33. package/dist/pptx/{chunk-OHE5UXST.cjs → chunk-YHA6XAB3.cjs} +1 -1
  34. package/dist/pptx/{chunk-X2F6PA2D.mjs → chunk-YOGDIDPB.mjs} +22 -3
  35. package/dist/pptx/dom/index.cjs +235 -235
  36. package/dist/pptx/dom/index.mjs +6 -6
  37. package/dist/pptx/export/html2canvas-clone.cjs +2 -2
  38. package/dist/pptx/export/html2canvas-clone.mjs +1 -1
  39. package/dist/pptx/index.cjs +2993 -2989
  40. package/dist/pptx/index.mjs +4 -4
  41. package/dist/pptx/render/chart-combo-stock.cjs +3 -3
  42. package/dist/pptx/render/chart-combo-stock.mjs +1 -1
  43. package/dist/pptx/render/chart-manual-layout.d.ts +2 -20
  44. package/dist/pptx/render/chart-manual-layout.d.ts.map +1 -1
  45. package/dist/pptx/render/chart-overlays.cjs +7 -7
  46. package/dist/pptx/render/chart-overlays.mjs +1 -1
  47. package/dist/pptx/render/chart-surface-treemap.cjs +4 -4
  48. package/dist/pptx/render/chart-surface-treemap.mjs +1 -1
  49. package/dist/pptx/render/chart-svg-def-types.d.ts +6 -1
  50. package/dist/pptx/render/chart-svg-def-types.d.ts.map +1 -1
  51. package/dist/pptx/render/chart-view-model-dom-helpers.d.ts +1 -1
  52. package/dist/pptx/render/chart-view-model-dom-helpers.d.ts.map +1 -1
  53. package/dist/pptx/render/chart-view-model.cjs +41 -41
  54. package/dist/pptx/render/chart-view-model.mjs +1 -1
  55. package/dist/pptx/render/chart-waterfall-map.cjs +6 -6
  56. package/dist/pptx/render/chart-waterfall-map.mjs +1 -1
  57. package/dist/pptx/render/element-interaction.d.ts +1 -1
  58. package/dist/pptx/render/element-interaction.d.ts.map +1 -1
  59. package/dist/pptx/render/gradient-picker.d.ts.map +1 -1
  60. package/dist/pptx/render/index.d.ts +1 -0
  61. package/dist/pptx/render/index.d.ts.map +1 -1
  62. package/dist/pptx/render/path-gradient-rect.d.ts +1 -75
  63. package/dist/pptx/render/path-gradient-rect.d.ts.map +1 -1
  64. package/dist/pptx/render/rotate-handle-placement.d.ts +1 -27
  65. package/dist/pptx/render/rotate-handle-placement.d.ts.map +1 -1
  66. package/dist/pptx/render/rotation-drag.d.ts +1 -7
  67. package/dist/pptx/render/rotation-drag.d.ts.map +1 -1
  68. package/dist/teams/app/files-panel.d.ts +8 -3
  69. package/dist/teams/app/teams-app.d.ts +1 -0
  70. package/dist/teams/app/teams-settings.d.ts +6 -0
  71. package/dist/teams.js +3 -3
  72. package/dist/visio/render-fill.d.ts +2 -1
  73. package/dist/visio/render-svg.d.ts +2 -0
  74. package/dist/visio/ribbon-action.d.ts +8 -1
  75. package/dist/visio/ribbon-parts.d.ts +2 -1
  76. package/dist/visio/ribbon-router.d.ts +4 -2
  77. package/dist/visio/viewer-commands.d.ts +3 -3
  78. package/dist/visio/viewer-draw-tool.d.ts +16 -6
  79. package/dist/visio/viewer-handle-events.d.ts +19 -0
  80. package/dist/visio/viewer-line-endpoints.d.ts +14 -0
  81. package/dist/visio/viewer-rotation-handle.d.ts +14 -0
  82. package/dist/visio/viewer-rotation-preview.d.ts +7 -0
  83. package/dist/visio.js +734 -88
  84. package/dist/xlsx/chart-area-pane.d.ts +9 -0
  85. package/dist/xlsx/chart-fill-binding.d.ts +23 -0
  86. package/dist/xlsx/chart-gradient-preview.d.ts +8 -0
  87. package/dist/xlsx/chart-series-fill.d.ts +2 -1
  88. package/dist/xlsx/chart-series-gradient-type.d.ts +9 -0
  89. package/dist/xlsx/chart-series-gradient.d.ts +8 -0
  90. package/dist/xlsx/chart-series-pane.d.ts +2 -1
  91. package/dist/xlsx/chart-series-range-preview.d.ts +7 -0
  92. package/dist/xlsx/chart-series-transparency.d.ts +2 -1
  93. package/dist/xlsx/grid/measure.d.ts +5 -0
  94. package/dist/xlsx/grid/styles.d.ts +1 -1
  95. package/dist/xlsx.js +962 -102
  96. package/package.json +2 -2
package/README.md CHANGED
@@ -65,6 +65,14 @@ app in the `teams-viewer` repository): `office-ui-avatar`, `-app-rail`, `-channe
65
65
  `-chat-composer`, `-prejoin`, `-call-grid` and `-call-controls`. Properties in, bubbling `office-*`
66
66
  events out, no data fetching; message text is always rendered as text.
67
67
 
68
+ `teams-app` opens Settings as a workspace page beside the app rail, retaining
69
+ the underlying chat, selected tab and edited workbook. Its `teams-settings`
70
+ element also supports standalone modal use; pass `embedded` to render a
71
+ modeless page sized to the containing workspace. Escape and Close settings
72
+ emit `teams-settings-close`; the host controls the `open` attribute. Personal
73
+ preferences apply immediately, while connection changes require Apply and
74
+ reconnect.
75
+
68
76
  ```ts
69
77
  import { registerOfficeUi } from 'ooxml-ui';
70
78
  registerOfficeUi(); // defines every element, idempotent
@@ -117,6 +125,12 @@ with an incompatible build of this package.
117
125
 
118
126
  ## Features: elements
119
127
 
128
+ `office-ui-menu-button` accepts `submenu` when nested inside another menu.
129
+ Its trigger becomes a menu item; hover, click or ArrowRight opens the child
130
+ panel beside the parent, with viewport edge placement. ArrowLeft or Escape
131
+ returns focus to its trigger; choosing a command closes the whole menu tree.
132
+ Arrow navigation stays within the current menu and skips disabled entries.
133
+
120
134
  | Tag | Attributes / properties | Events (all bubble, composed) |
121
135
  | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
122
136
  | `office-ui-button` | `label`, `icon`, `command`, `disabled`, `pressed`, `expanded`, `icon-only`, `variant="stacked"`, `keyshortcuts` | `office-command` `{ command }` |
@@ -1294,6 +1294,9 @@
1294
1294
  {
1295
1295
  "name": "label"
1296
1296
  },
1297
+ {
1298
+ "name": "submenu"
1299
+ },
1297
1300
  {
1298
1301
  "name": "title"
1299
1302
  }
@@ -1345,6 +1348,13 @@
1345
1348
  {
1346
1349
  "kind": "field",
1347
1350
  "name": "open"
1351
+ },
1352
+ {
1353
+ "kind": "field",
1354
+ "name": "submenu",
1355
+ "type": {
1356
+ "text": "boolean"
1357
+ }
1348
1358
  }
1349
1359
  ],
1350
1360
  "events": [
@@ -1,7 +1,7 @@
1
1
  import { defineSmartArt } from './chunk-XDUYS4KK.js';
2
- import { TEAMS_TAGS, registerTeams } from './chunk-3GE2NHNG.js';
2
+ import { TEAMS_TAGS, registerTeams } from './chunk-FLHM5Q4O.js';
3
3
  import { installOfficeUiTheme } from './chunk-X7RINDJQ.js';
4
- import { registerControls } from './chunk-2QW4QE56.js';
4
+ import { registerControls } from './chunk-T3HB5LMH.js';
5
5
  import { definePresence } from './chunk-OXKWNNNJ.js';
6
6
 
7
7
  // src/index.ts
@@ -17,6 +17,7 @@ var BUILT_IN = {
17
17
  clock: "M3 10a7 7 0 1 0 14 0 7 7 0 1 0-14 0M10 6v4l3 2",
18
18
  reset: "M4 10a6 6 0 1 1 1.8 4.2M4 6v4h4",
19
19
  plus: "M10 4v12M4 10h12",
20
+ upload: "M10 13V3M6 7l4-4 4 4M3 12v5h14v-5",
20
21
  minus: "M4 10h12",
21
22
  search: "M3 8.5a5.5 5.5 0 1 0 11 0 5.5 5.5 0 1 0-11 0M13 13l4 4",
22
23
  undo: "M7.5 11.5 3.5 7.5l4-4M3.5 7.5h9a4 4 0 0 1 0 8H10",
@@ -1,12 +1,12 @@
1
1
  import { THEME_CSS, installOfficeUiTheme } from './chunk-X7RINDJQ.js';
2
- import { registerControls, defineSwitch } from './chunk-2QW4QE56.js';
3
- import { registerIcon, getIcon } from './chunk-HZ422LTR.js';
2
+ import { defineMenuButton, defineMenuItem, registerControls, defineSwitch } from './chunk-T3HB5LMH.js';
3
+ import { registerIcon, getIcon } from './chunk-BOX43CZD.js';
4
4
  import { initialsOf, definePresence } from './chunk-OXKWNNNJ.js';
5
5
  import { definer, OfficeElement, controlStyles } from './chunk-ZV2Z4IWH.js';
6
6
  import { html, nothing, LitElement, unsafeCSS, svg } from 'lit';
7
7
  import { repeat } from 'lit/directives/repeat.js';
8
8
  import { live } from 'lit/directives/live.js';
9
- import { MAX_ATTACHMENTS, detectContentKind, contentUrl, readContent, filterFiles, parseServerConfig, sanitizeChannelName, MAX_CHANNEL_NAME_CHARS, MAX_CHANNEL_TOPIC_CHARS, markdownBlocks, createTeamsClient, sanitizeAttachment, markdownInline } from 'ooxml-core/teams';
9
+ import { MAX_ATTACHMENTS, detectContentKind, contentUrl, readContent, sortFiles, filterFiles, parseServerConfig, sanitizeChannelName, MAX_CHANNEL_NAME_CHARS, MAX_CHANNEL_TOPIC_CHARS, markdownBlocks, createTeamsClient, sanitizeAttachment, markdownInline } from 'ooxml-core/teams';
10
10
  import { keyed } from 'lit/directives/keyed.js';
11
11
 
12
12
  // raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/reset.css?raw
@@ -1420,7 +1420,7 @@ function defineTeamsChannelTab() {
1420
1420
  }
1421
1421
 
1422
1422
  // raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/files-panel.css?raw
1423
- var files_panel_default = ":host {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n min-width: 0;\n font: var(--office-font-size) var(--office-font);\n color: var(--office-foreground);\n background: var(--office-background);\n overflow: auto;\n}\n.toolbar,\n.transfer,\nform {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--office-space-3);\n padding: var(--office-space-3);\n}\ninput,\nbutton {\n font: inherit;\n color: inherit;\n}\ninput[type='search'],\ninput[name='name'] {\n box-sizing: border-box;\n min-width: 10em;\n padding: var(--office-space-2);\n background: var(--office-background);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n}\n.toolbar input[type='search'] {\n width: min(22em, 100%);\n}\n.toolbar-space {\n flex: 1;\n}\n.new-control {\n position: relative;\n}\n.new-menu {\n position: absolute;\n inset-block-start: calc(100% + var(--office-space-1));\n inset-inline-start: 0;\n z-index: 1;\n padding: var(--office-space-1);\n background: var(--office-popover);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n box-shadow: var(--office-shadow-teams);\n white-space: nowrap;\n}\n.new-menu button {\n border: 0;\n}\n.file-picker {\n display: none;\n}\nbutton {\n cursor: pointer;\n padding: var(--office-space-2);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n background: var(--office-background);\n}\nbutton:disabled {\n cursor: default;\n opacity: 0.5;\n}\nbutton:hover:not(:disabled) {\n background: var(--office-selected);\n}\nbutton.primary {\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n border-color: transparent;\n}\nbutton.primary:hover:not(:disabled) {\n background: var(--office-teams-brand-hover);\n}\n:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n.hint,\n[role='status'],\n[role='alert'] {\n margin: 0;\n padding: var(--office-space-2) var(--office-space-3);\n}\n.hint {\n color: var(--office-teams-text-subtle);\n}\n.file-list {\n position: relative;\n min-width: 0;\n min-height: 0;\n flex: 1;\n padding: var(--office-space-3);\n overflow-x: auto;\n}\ntable {\n border-collapse: collapse;\n width: 100%;\n text-align: start;\n}\nth,\ntd {\n padding: var(--office-space-3) var(--office-space-2);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n}\nth {\n text-align: start;\n font-weight: var(--office-font-weight-bold);\n white-space: nowrap;\n}\ntd:not(:first-child) {\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-sm);\n}\ntbody tr:hover {\n background: var(--office-selected);\n}\n.none {\n padding-block: var(--office-space-6);\n text-align: center;\n color: var(--office-teams-text-subtle);\n}\n.file-name {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n min-width: 12em;\n}\n.file-open {\n border: 0;\n background: transparent;\n text-align: start;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.file-open:hover:not(:disabled) {\n color: var(--office-teams-brand);\n text-decoration: underline;\n}\n.visually-hidden {\n position: absolute;\n width: 1em;\n height: 1em;\n clip-path: inset(50%);\n overflow: hidden;\n}\n.badge {\n flex-shrink: 0;\n display: grid;\n place-items: center;\n width: 2.2em;\n height: 2.2em;\n border-radius: var(--office-radius-md);\n background: var(--office-file-other);\n color: var(--office-call-foreground);\n font-weight: var(--office-font-weight-bold);\n}\n.badge[data-kind='docx'] {\n background: var(--office-file-docx);\n}\n.badge[data-kind='xlsx'] {\n background: var(--office-file-xlsx);\n}\n.badge[data-kind='pptx'] {\n background: var(--office-file-pptx);\n}\n.badge[data-kind='vsdx'] {\n background: var(--office-file-vsdx);\n}\n";
1423
+ var files_panel_default = ":host {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n min-width: 0;\n font: var(--office-font-size) var(--office-font);\n color: var(--office-foreground);\n background: var(--office-background);\n overflow: auto;\n}\n.toolbar,\n.transfer,\nform {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--office-space-3);\n padding: var(--office-space-3);\n}\ninput,\nbutton {\n font: inherit;\n color: inherit;\n}\ninput[type='search'],\ninput[name='name'] {\n box-sizing: border-box;\n min-width: 10em;\n padding: var(--office-space-2);\n background: var(--office-background);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n}\n.toolbar input[type='search'] {\n width: min(22em, 100%);\n}\n.toolbar-space {\n flex: 1;\n}\n.file-picker {\n display: none;\n}\nbutton {\n cursor: pointer;\n padding: var(--office-space-2);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n background: var(--office-background);\n}\nbutton:disabled {\n cursor: default;\n opacity: 0.5;\n}\nbutton:hover:not(:disabled) {\n background: var(--office-selected);\n}\n:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n.hint,\n[role='status'],\n[role='alert'] {\n margin: 0;\n padding: var(--office-space-2) var(--office-space-3);\n}\n.hint {\n color: var(--office-teams-text-subtle);\n}\n.file-list {\n position: relative;\n min-width: 0;\n min-height: 0;\n flex: 1;\n padding: var(--office-space-3);\n overflow-x: auto;\n}\ntable {\n border-collapse: collapse;\n width: 100%;\n text-align: start;\n}\nth,\ntd {\n padding: var(--office-space-3) var(--office-space-2);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n}\nth {\n text-align: start;\n font-weight: var(--office-font-weight-bold);\n white-space: nowrap;\n}\ntd:not(:first-child) {\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-sm);\n}\ntbody tr:hover {\n background: var(--office-selected);\n}\n.none {\n padding-block: var(--office-space-6);\n text-align: center;\n color: var(--office-teams-text-subtle);\n}\n.file-name {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n min-width: 12em;\n}\n.file-open {\n border: 0;\n background: transparent;\n text-align: start;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.file-open:hover:not(:disabled) {\n color: var(--office-teams-brand);\n text-decoration: underline;\n}\n.visually-hidden {\n position: absolute;\n width: 1em;\n height: 1em;\n clip-path: inset(50%);\n overflow: hidden;\n}\n.badge {\n flex-shrink: 0;\n display: grid;\n place-items: center;\n width: 2.2em;\n height: 2.2em;\n border-radius: var(--office-radius-md);\n background: var(--office-file-other);\n color: var(--office-call-foreground);\n font-weight: var(--office-font-weight-bold);\n}\n.badge[data-kind='docx'] {\n background: var(--office-file-docx);\n}\n.badge[data-kind='xlsx'] {\n background: var(--office-file-xlsx);\n}\n.badge[data-kind='pptx'] {\n background: var(--office-file-pptx);\n}\n.badge[data-kind='vsdx'] {\n background: var(--office-file-vsdx);\n}\n\n.toolbar {\n position: sticky;\n top: 0;\n z-index: 2;\n background: var(--office-background);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n}\n.new-command::part(button) {\n padding: var(--office-space-2) var(--office-space-4);\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n font-size: var(--office-font-size);\n border-radius: var(--office-radius-md);\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n}\n.new-command::part(caret) {\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n}\n.new-command::part(button):hover:not(:disabled),\n.new-command::part(caret):hover:not(:disabled) {\n background: var(--office-teams-brand-hover);\n}\n.toolbar > button {\n display: inline-flex;\n align-items: center;\n gap: var(--office-space-2);\n border-color: transparent;\n min-height: var(--office-target-size);\n}\n.icon {\n width: 1.4em;\n height: 1.4em;\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.file-list {\n overflow: auto;\n overscroll-behavior: contain;\n}\nth {\n position: sticky;\n top: 0;\n z-index: 1;\n background: var(--office-background);\n}\n.sort-command {\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n padding: 0;\n border: 0;\n font-weight: inherit;\n white-space: nowrap;\n}\n.sort-command span {\n color: var(--office-teams-text-subtle);\n}\ntbody tr:focus-within {\n background: var(--office-selected);\n}\n.badge {\n position: relative;\n width: 1.8em;\n height: 2.3em;\n border-radius: var(--office-radius);\n clip-path: polygon(0 0, 65% 0, 100% 25%, 100% 100%, 0 100%);\n}\n.badge::before {\n content: '';\n position: absolute;\n inset-inline-end: 0;\n top: 0;\n width: 35%;\n height: 25%;\n background: color-mix(in srgb, currentColor 35%, transparent);\n}\n@media (max-width: 48em) {\n th:nth-child(3),\n td:nth-child(3),\n th:nth-child(4),\n td:nth-child(4) {\n display: none;\n }\n .file-name {\n min-width: 0;\n gap: var(--office-space-2);\n }\n td:nth-child(2) {\n white-space: nowrap;\n }\n}\n";
1424
1424
 
1425
1425
  // raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/file-actions.css?raw
1426
1426
  var file_actions_default = ":host {\n display: block;\n font: inherit;\n color: inherit;\n}\nbutton {\n font: inherit;\n color: inherit;\n cursor: pointer;\n border: 0;\n background: transparent;\n border-radius: var(--office-radius);\n padding: var(--office-space-2) var(--office-space-3);\n}\nbutton:hover {\n background: var(--office-selected);\n}\nbutton:disabled {\n opacity: 0.5;\n cursor: default;\n}\n[popover] {\n margin: auto;\n min-width: 15em;\n max-width: min(24em, 90vw);\n padding: var(--office-space-2);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n box-shadow: var(--office-shadow-teams);\n color: var(--office-foreground);\n background: var(--office-popover);\n}\n[popover] button {\n display: block;\n width: 100%;\n text-align: start;\n}\np {\n margin: var(--office-space-2);\n font-size: var(--office-font-size-sm);\n}\n[role='alert'] {\n color: var(--office-danger);\n}\nlabel {\n display: grid;\n gap: var(--office-space-1);\n padding: var(--office-space-2);\n}\ninput {\n min-width: 0;\n width: 100%;\n box-sizing: border-box;\n padding: var(--office-space-2);\n font: inherit;\n background: var(--office-field-background);\n color: inherit;\n border: var(--office-border-width) solid var(--office-field-border);\n border-radius: var(--office-radius);\n}\n:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n";
@@ -1582,7 +1582,8 @@ var TeamsFilesPanel = class extends LitElement {
1582
1582
  canUpload: { type: Boolean },
1583
1583
  query: { state: true },
1584
1584
  creating: { state: true },
1585
- newMenu: { state: true },
1585
+ sortField: { state: true },
1586
+ sortDirection: { state: true },
1586
1587
  busy: { state: true },
1587
1588
  error: { state: true },
1588
1589
  destination: { state: true },
@@ -1600,7 +1601,8 @@ var TeamsFilesPanel = class extends LitElement {
1600
1601
  this.canUpload = false;
1601
1602
  this.query = "";
1602
1603
  this.creating = false;
1603
- this.newMenu = false;
1604
+ this.sortField = "ts";
1605
+ this.sortDirection = "descending";
1604
1606
  this.busy = false;
1605
1607
  this.error = "";
1606
1608
  this.destination = "";
@@ -1613,6 +1615,8 @@ var TeamsFilesPanel = class extends LitElement {
1613
1615
  }
1614
1616
  connectedCallback() {
1615
1617
  defineTeamsFileActions();
1618
+ defineMenuButton();
1619
+ defineMenuItem();
1616
1620
  super.connectedCallback();
1617
1621
  }
1618
1622
  updated(changed) {
@@ -1688,51 +1692,53 @@ var TeamsFilesPanel = class extends LitElement {
1688
1692
  this.emit("open", { ...attachment, channelId });
1689
1693
  });
1690
1694
  }
1695
+ sortHeading(field, label) {
1696
+ const active = this.sortField === field;
1697
+ return html`<th scope="col" aria-sort=${active ? this.sortDirection : "none"}>
1698
+ <button
1699
+ type="button"
1700
+ class="sort-command"
1701
+ @click=${() => {
1702
+ this.sortDirection = active && this.sortDirection === "ascending" ? "descending" : "ascending";
1703
+ this.sortField = field;
1704
+ }}
1705
+ >
1706
+ ${label}<span aria-hidden="true"
1707
+ >${active ? this.sortDirection === "ascending" ? "\u2191" : "\u2193" : "\u2195"}</span
1708
+ >
1709
+ </button>
1710
+ </th>`;
1711
+ }
1691
1712
  render() {
1692
- const files = filterFiles(this.files, this.query);
1713
+ const files = sortFiles(
1714
+ filterFiles(this.files, this.query),
1715
+ this.sortField,
1716
+ this.sortDirection
1717
+ );
1693
1718
  const disabled = this.busy || !this.canUpload || !this.channelId;
1694
1719
  return html`<div class="toolbar" role="toolbar" aria-label="File actions">
1695
- <div class="new-control">
1696
- <button
1697
- type="button"
1698
- class="primary"
1699
- ?disabled=${disabled}
1700
- @click=${() => this.newMenu = !this.newMenu}
1701
- aria-expanded=${String(this.newMenu)}
1702
- aria-controls="new-options"
1703
- >
1704
- + New
1705
- </button>
1706
- ${this.newMenu ? html`<div
1707
- id="new-options"
1708
- class="new-menu"
1709
- role="group"
1710
- aria-label="New file"
1711
- @keydown=${(event) => {
1712
- if (event.key === "Escape") {
1713
- this.newMenu = false;
1714
- this.renderRoot.querySelector(".primary")?.focus();
1715
- }
1716
- }}
1717
- >
1718
- <button
1719
- type="button"
1720
- ?disabled=${disabled}
1721
- @click=${() => {
1722
- this.newMenu = false;
1720
+ <office-ui-menu-button
1721
+ class="new-command"
1722
+ label="+ New"
1723
+ .disabled=${disabled}
1724
+ @office-command=${async (event) => {
1725
+ if (event.detail.command !== "new-workbook" || disabled) return;
1723
1726
  this.creating = true;
1727
+ await this.updateComplete;
1728
+ this.renderRoot.querySelector('input[name="name"]')?.focus();
1724
1729
  }}
1725
- >
1726
- New Excel workbook
1727
- </button>
1728
- </div>` : nothing}
1729
- </div>
1730
+ >
1731
+ <office-ui-menu-item
1732
+ label="New Excel workbook"
1733
+ command="new-workbook"
1734
+ ></office-ui-menu-item>
1735
+ </office-ui-menu-button>
1730
1736
  <button
1731
1737
  type="button"
1732
1738
  ?disabled=${disabled}
1733
1739
  @click=${() => this.renderRoot.querySelector('input[type="file"]')?.click()}
1734
1740
  >
1735
- Upload
1741
+ ${icon("upload")} Upload
1736
1742
  </button>
1737
1743
  <input
1738
1744
  type="file"
@@ -1790,9 +1796,8 @@ var TeamsFilesPanel = class extends LitElement {
1790
1796
  <table aria-label="Shared files">
1791
1797
  <thead>
1792
1798
  <tr>
1793
- <th scope="col">Name</th>
1794
- <th scope="col">Shared on</th>
1795
- <th scope="col">Shared by</th>
1799
+ ${this.sortHeading("name", "Name")} ${this.sortHeading("ts", "Shared on")}
1800
+ ${this.sortHeading("author", "Shared by")}
1796
1801
  <th scope="col">Location</th>
1797
1802
  <th scope="col"><span class="visually-hidden">Actions</span></th>
1798
1803
  </tr>
@@ -1845,7 +1850,7 @@ function defineTeamsFilesPanel() {
1845
1850
  }
1846
1851
 
1847
1852
  // raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/teams-settings.css?raw
1848
- var teams_settings_default = ":host {\n font: var(--office-font-size) var(--office-font);\n color: var(--office-foreground);\n}\ndialog {\n box-sizing: border-box;\n width: min(76em, 94vw);\n max-height: 90dvh;\n overflow: hidden;\n padding: 0;\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-lg);\n background: var(--office-popover);\n color: inherit;\n box-shadow: var(--office-shadow-teams);\n}\ndialog::backdrop {\n background: var(--office-overlay);\n}\nform {\n display: grid;\n gap: var(--office-space-3);\n padding: var(--office-space-5);\n}\nheader {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--office-space-4) var(--office-space-5);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n gap: var(--office-space-3);\n}\nheader input {\n margin-inline-start: auto;\n width: min(24em, 50%);\n min-width: 0;\n}\n.settings-results ul {\n list-style: none;\n padding: 0;\n display: grid;\n gap: var(--office-space-3);\n}\n.settings-results button {\n display: grid;\n gap: var(--office-space-2);\n width: 100%;\n text-align: start;\n}\n.settings-results button:hover {\n background: var(--office-selected);\n}\nh1 {\n margin: 0;\n font-size: var(--office-font-size-lg);\n}\n.settings-layout {\n display: grid;\n grid-template-columns: 19em minmax(0, 1fr);\n height: min(42em, calc(90dvh - 5em));\n min-height: 0;\n}\nnav {\n min-height: 0;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: var(--office-space-1);\n padding: var(--office-space-3);\n background: var(--office-teams-panel);\n border-inline-end: var(--office-border-width) solid var(--office-teams-divider);\n}\nnav button {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n min-height: 3em;\n text-align: start;\n border: 0;\n background: transparent;\n}\nnav button:hover {\n background: var(--office-selected);\n}\n.icon {\n width: 1.4em;\n height: 1.4em;\n flex-shrink: 0;\n fill: none;\n stroke: currentColor;\n stroke-width: 1.5;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\nnav button[aria-selected='true'] {\n background: var(--office-teams-brand-subtle);\n color: var(--office-teams-brand);\n font-weight: var(--office-font-weight-bold);\n}\n.settings-content {\n min-width: 0;\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n}\nsection {\n padding: var(--office-space-5);\n}\nsection h3 {\n margin: var(--office-space-5) 0 var(--office-space-3);\n font-size: var(--office-font-size);\n}\nsection h2 + h3 {\n margin-top: var(--office-space-4);\n}\n[hidden] {\n display: none !important;\n}\n.description {\n color: var(--office-teams-text-subtle);\n line-height: 1.5;\n}\noffice-ui-switch {\n --office-switch-track-on: var(--office-teams-brand);\n}\n.preference {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-block: var(--office-space-3);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n font-weight: normal;\n}\nh2 {\n position: sticky;\n top: 0;\n z-index: 1;\n margin: calc(-1 * var(--office-space-5)) calc(-1 * var(--office-space-5)) var(--office-space-4);\n padding: var(--office-space-5);\n background: var(--office-popover);\n border-bottom: var(--office-border-width) solid var(--office-teams-divider);\n font-size: var(--office-font-size-lg);\n}\nlabel {\n display: grid;\n gap: var(--office-space-1);\n font-weight: var(--office-font-weight-bold);\n}\nsmall {\n color: var(--office-teams-text-subtle);\n font-weight: normal;\n}\ninput,\ntextarea,\nselect {\n padding: var(--office-space-2);\n border: var(--office-border-width) solid var(--office-field-border);\n border-radius: var(--office-radius);\n background: var(--office-field-background);\n color: inherit;\n font: inherit;\n}\ntextarea {\n min-height: 5.5em;\n font-family: ui-monospace, monospace;\n font-size: 0.9em;\n}\n.issues {\n margin: 0;\n padding-inline-start: 1.2em;\n color: var(--office-danger);\n font-size: var(--office-font-size-sm);\n}\n.actions {\n display: flex;\n justify-content: flex-end;\n gap: var(--office-space-2);\n}\nbutton {\n padding: var(--office-space-2) var(--office-space-4);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n background: var(--office-background);\n color: inherit;\n font: inherit;\n cursor: pointer;\n}\nbutton.primary {\n border-color: transparent;\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n}\nbutton.primary:hover {\n background: var(--office-teams-brand-hover);\n}\n:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n@media (max-width: 48em) {\n .settings-layout {\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: auto minmax(0, 1fr);\n min-height: 0;\n }\n nav {\n max-height: 30dvh;\n border-inline-end: 0;\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n }\n}\n";
1853
+ var teams_settings_default = ":host {\n font: var(--office-font-size) var(--office-font);\n color: var(--office-foreground);\n}\ndialog {\n box-sizing: border-box;\n width: min(76em, 94vw);\n max-height: 90dvh;\n overflow: hidden;\n padding: 0;\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-lg);\n background: var(--office-popover);\n color: inherit;\n box-shadow: var(--office-shadow-teams);\n}\ndialog::backdrop {\n background: var(--office-overlay);\n}\n:host([embedded]) {\n display: block;\n height: 100%;\n min-height: 0;\n}\n:host([embedded]:not([open])) {\n display: none;\n}\n:host([embedded]) dialog {\n position: relative;\n width: 100%;\n height: 100%;\n max-width: none;\n max-height: none;\n margin: 0;\n border: 0;\n border-radius: 0;\n box-shadow: none;\n}\n:host([embedded]) dialog[open] {\n display: flex;\n flex-direction: column;\n}\n:host([embedded]) .settings-layout {\n flex: 1;\n height: auto;\n}\nform {\n display: grid;\n gap: var(--office-space-3);\n padding: var(--office-space-5);\n}\nheader {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--office-space-4) var(--office-space-5);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n gap: var(--office-space-3);\n}\nheader input {\n margin-inline-start: auto;\n width: min(24em, 50%);\n min-width: 0;\n}\n.settings-results ul {\n list-style: none;\n padding: 0;\n display: grid;\n gap: var(--office-space-3);\n}\n.settings-results button {\n display: grid;\n gap: var(--office-space-2);\n width: 100%;\n text-align: start;\n}\n.settings-results button:hover {\n background: var(--office-selected);\n}\nh1 {\n margin: 0;\n font-size: var(--office-font-size-lg);\n}\n.settings-layout {\n display: grid;\n grid-template-columns: 19em minmax(0, 1fr);\n height: min(42em, calc(90dvh - 5em));\n min-height: 0;\n}\nnav {\n min-height: 0;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: var(--office-space-1);\n padding: var(--office-space-3);\n background: var(--office-teams-panel);\n border-inline-end: var(--office-border-width) solid var(--office-teams-divider);\n}\nnav button {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n min-height: 3em;\n text-align: start;\n border: 0;\n background: transparent;\n}\nnav button:hover {\n background: var(--office-selected);\n}\n.icon {\n width: 1.4em;\n height: 1.4em;\n flex-shrink: 0;\n fill: none;\n stroke: currentColor;\n stroke-width: 1.5;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\nnav button[aria-selected='true'] {\n background: var(--office-teams-brand-subtle);\n color: var(--office-teams-brand);\n font-weight: var(--office-font-weight-bold);\n}\n.settings-content {\n min-width: 0;\n min-height: 0;\n overflow: auto;\n overscroll-behavior: contain;\n}\nsection {\n padding: var(--office-space-5);\n}\nsection h3 {\n margin: var(--office-space-5) 0 var(--office-space-3);\n font-size: var(--office-font-size);\n}\nsection h2 + h3 {\n margin-top: var(--office-space-4);\n}\n[hidden] {\n display: none !important;\n}\n.description {\n color: var(--office-teams-text-subtle);\n line-height: 1.5;\n}\noffice-ui-switch {\n --office-switch-track-on: var(--office-teams-brand);\n}\n.preference {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-block: var(--office-space-3);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n font-weight: normal;\n}\nh2 {\n position: sticky;\n top: 0;\n z-index: 1;\n margin: calc(-1 * var(--office-space-5)) calc(-1 * var(--office-space-5)) var(--office-space-4);\n padding: var(--office-space-5);\n background: var(--office-popover);\n border-bottom: var(--office-border-width) solid var(--office-teams-divider);\n font-size: var(--office-font-size-lg);\n}\nlabel {\n display: grid;\n gap: var(--office-space-1);\n font-weight: var(--office-font-weight-bold);\n}\nsmall {\n color: var(--office-teams-text-subtle);\n font-weight: normal;\n}\ninput,\ntextarea,\nselect {\n padding: var(--office-space-2);\n border: var(--office-border-width) solid var(--office-field-border);\n border-radius: var(--office-radius);\n background: var(--office-field-background);\n color: inherit;\n font: inherit;\n}\ntextarea {\n min-height: 5.5em;\n font-family: ui-monospace, monospace;\n font-size: 0.9em;\n}\n.issues {\n margin: 0;\n padding-inline-start: 1.2em;\n color: var(--office-danger);\n font-size: var(--office-font-size-sm);\n}\n.actions {\n display: flex;\n justify-content: flex-end;\n gap: var(--office-space-2);\n}\nbutton {\n padding: var(--office-space-2) var(--office-space-4);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n background: var(--office-background);\n color: inherit;\n font: inherit;\n cursor: pointer;\n}\nbutton.primary {\n border-color: transparent;\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n}\nbutton.primary:hover {\n background: var(--office-teams-brand-hover);\n}\n:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n@media (max-width: 48em) {\n .settings-layout {\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: auto minmax(0, 1fr);\n min-height: 0;\n }\n nav {\n max-height: 30dvh;\n border-inline-end: 0;\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n }\n}\n";
1849
1854
 
1850
1855
  // raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/settings-previews.css?raw
1851
1856
  var settings_previews_default = ".theme-options,\n.density-options {\n display: flex;\n flex-wrap: wrap;\n gap: var(--office-space-3);\n}\n.theme-options button {\n display: grid;\n gap: var(--office-space-3);\n padding: var(--office-space-2);\n text-align: start;\n min-width: 9em;\n}\n.theme-options button[aria-pressed='true'],\n.density-choice:has(input:checked) {\n border-color: var(--office-teams-brand);\n box-shadow: inset 0 0 0 var(--office-border-width) var(--office-teams-brand);\n}\n.theme-swatch {\n --preview-paper: var(--office-call-foreground);\n --preview-ink: var(--office-call-background);\n display: grid;\n grid-template-columns: 0.7em 2.4em 1fr;\n grid-template-rows: 0.7em 1fr;\n width: 9em;\n height: 5.5em;\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius);\n overflow: hidden;\n background: var(--preview-paper);\n}\n.theme-swatch[data-theme='dark'] {\n --preview-paper: var(--office-call-background);\n --preview-ink: var(--office-call-foreground);\n}\n.theme-swatch[data-theme='system'] {\n background: linear-gradient(\n 90deg,\n var(--office-call-foreground) 50%,\n var(--office-call-background) 50%\n );\n}\n.preview-toolbar {\n grid-column: 1 / -1;\n background: var(--office-teams-brand);\n}\n.preview-rail,\n.preview-sidebar {\n background: color-mix(in srgb, var(--preview-ink) 8%, var(--preview-paper));\n border-inline-end: var(--office-border-width) solid var(--office-teams-divider);\n}\n.preview-sidebar,\n.preview-conversation {\n display: flex;\n flex-direction: column;\n gap: var(--office-space-2);\n padding: var(--office-space-2);\n}\n.preview-sidebar i,\n.preview-conversation i {\n height: 0.4em;\n border-radius: var(--office-radius);\n background: color-mix(in srgb, var(--preview-ink) 25%, var(--preview-paper));\n}\n.preview-conversation i {\n height: 0.8em;\n width: 80%;\n}\n.preview-conversation i:nth-child(2) {\n align-self: flex-end;\n background: var(--office-teams-brand-subtle);\n}\n.density-options {\n margin: var(--office-space-5) 0 0;\n padding: var(--office-space-5) 0 0;\n border: 0;\n border-top: var(--office-border-width) solid var(--office-teams-divider);\n}\n.density-options legend {\n float: inline-start;\n width: 100%;\n font-weight: var(--office-font-weight-bold);\n margin-bottom: var(--office-space-3);\n}\n.density-choice {\n position: relative;\n display: flex;\n flex-direction: column;\n gap: var(--office-space-3);\n width: 13em;\n padding: var(--office-space-2);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n cursor: pointer;\n font-weight: normal;\n}\n.density-choice input {\n position: absolute;\n inset-inline-end: var(--office-space-2);\n inset-block-end: var(--office-space-2);\n accent-color: var(--office-teams-brand);\n}\n.density-caption {\n display: grid;\n gap: var(--office-space-1);\n padding-inline-end: var(--office-space-5);\n}\n.density-preview {\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: var(--office-space-3);\n height: 7em;\n padding: var(--office-space-3);\n border-radius: var(--office-radius);\n background: var(--office-teams-panel);\n}\n.preview-message {\n display: flex;\n gap: var(--office-space-2);\n align-items: flex-start;\n}\n.preview-message > i {\n width: 1.1em;\n height: 1.1em;\n border-radius: 50%;\n background: var(--office-teams-brand-subtle);\n border: var(--office-border-width) solid var(--office-teams-brand);\n}\n.preview-message > span {\n display: grid;\n gap: var(--office-space-1);\n flex: 1;\n}\n.preview-message b {\n height: 0.3em;\n width: 75%;\n background: var(--office-teams-text-subtle);\n border-radius: var(--office-radius);\n}\n.preview-message b + b {\n width: 100%;\n opacity: 0.4;\n}\n.density-preview[data-density='compact'] {\n gap: var(--office-space-1);\n}\n.density-preview[data-density='compact'] .preview-message > i {\n width: 0.7em;\n height: 0.7em;\n}\n.density-preview[data-density='compact'] .preview-message > span {\n display: flex;\n align-items: center;\n}\n@media (forced-colors: active) {\n .theme-options button[aria-pressed='true'],\n .density-choice:has(input:checked) {\n outline: var(--office-focus-width) solid Highlight;\n }\n}\n";
@@ -1984,6 +1989,7 @@ var TeamsSettings = class extends LitElement {
1984
1989
  static properties = {
1985
1990
  config: { attribute: false },
1986
1991
  open: { type: Boolean, reflect: true },
1992
+ embedded: { type: Boolean, reflect: true },
1987
1993
  issues: { state: true },
1988
1994
  category: { state: true },
1989
1995
  theme: { attribute: false },
@@ -1998,6 +2004,7 @@ var TeamsSettings = class extends LitElement {
1998
2004
  super();
1999
2005
  this.config = { mode: "local", iceServers: [] };
2000
2006
  this.open = false;
2007
+ this.embedded = false;
2001
2008
  this.issues = [];
2002
2009
  this.category = "general";
2003
2010
  this.theme = "system";
@@ -2030,7 +2037,11 @@ var TeamsSettings = class extends LitElement {
2030
2037
  }))
2031
2038
  this.field(id).value = value;
2032
2039
  }
2033
- if (this.open && !dialog.open) dialog.showModal();
2040
+ if (this.open && !dialog.open) {
2041
+ if (this.embedded) dialog.show();
2042
+ else dialog.showModal();
2043
+ this.renderRoot.querySelector('input[type="search"]')?.focus();
2044
+ }
2034
2045
  if (!this.open && dialog.open) dialog.close();
2035
2046
  }
2036
2047
  field(id) {
@@ -2063,7 +2074,22 @@ var TeamsSettings = class extends LitElement {
2063
2074
  render() {
2064
2075
  const c = this.config;
2065
2076
  return html`
2066
- <dialog aria-label="Settings" @close=${this.close} @cancel=${this.close}>
2077
+ <dialog
2078
+ aria-label="Settings"
2079
+ @close=${() => {
2080
+ if (this.open) this.close();
2081
+ }}
2082
+ @cancel=${(event) => {
2083
+ event.preventDefault();
2084
+ this.close();
2085
+ }}
2086
+ @keydown=${(event) => {
2087
+ if (this.embedded && event.key === "Escape" && !event.defaultPrevented) {
2088
+ event.preventDefault();
2089
+ this.close();
2090
+ }
2091
+ }}
2092
+ >
2067
2093
  <header>
2068
2094
  <h1>Settings</h1>
2069
2095
  <input
@@ -2330,7 +2356,7 @@ function loadConfig() {
2330
2356
  var saveConfig = (config) => safeStorage.setItem("teams:config", JSON.stringify(config));
2331
2357
 
2332
2358
  // raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/teams/app/teams-app.css?raw
2333
- var teams_app_default = "/* <teams-app>: the shell. Colours, spacing and radii come from the ooxml-ui tokens, so a host\n retheme or dark mode reaches the whole app. The elements inside bring their own styles. */\n:host {\n display: block;\n height: 100%;\n min-height: 28em;\n font: var(--office-font-size) var(--office-font);\n color: var(--office-foreground);\n background: var(--office-background);\n}\n:host([data-office-theme='dark']) {\n --office-background: var(--office-teams-panel);\n --office-surface: var(--office-teams-bubble);\n --office-popover: var(--office-teams-panel);\n}\n:host([data-chat-density='compact']) {\n --office-teams-message-gap: var(--office-space-1);\n --office-teams-message-padding: var(--office-space-1) var(--office-space-2);\n}\n@media (prefers-color-scheme: dark) {\n :host(:not([data-office-theme='light'])) {\n --office-background: var(--office-teams-panel);\n --office-surface: var(--office-teams-bubble);\n --office-popover: var(--office-teams-panel);\n }\n}\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\nbutton {\n font: inherit;\n color: inherit;\n cursor: pointer;\n}\n:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n\n.shell {\n display: grid;\n grid-template-rows: auto minmax(0, 1fr);\n height: 100%;\n}\n\n/* ---- top bar ---------------------------------------------------------------------------- */\n.topbar {\n display: grid;\n grid-template-columns: 16em minmax(0, 1fr) auto;\n align-items: center;\n gap: var(--office-space-4);\n padding: var(--office-space-2) var(--office-space-4);\n background: var(--office-teams-rail);\n border-bottom: var(--office-border-width) solid var(--office-teams-divider);\n}\n.navigation-toggle {\n display: none;\n padding: var(--office-space-2);\n border: 0;\n border-radius: var(--office-radius-md);\n background: transparent;\n}\n.navigation-toggle:hover {\n background: var(--office-selected);\n}\n.navigation-toggle svg {\n width: 1.3em;\n height: 1.3em;\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n}\n.brand {\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n font-size: var(--office-font-size-lg);\n font-weight: var(--office-font-weight-bold);\n}\n.logo {\n display: inline-grid;\n place-items: center;\n width: 1.8em;\n height: 1.8em;\n border-radius: var(--office-radius-md);\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n font-size: 0.85em;\n}\n.search {\n position: relative;\n justify-self: center;\n width: min(34em, 100%);\n}\n.search input {\n width: 100%;\n padding: var(--office-space-2) var(--office-space-4);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-full);\n background: var(--office-background);\n color: inherit;\n font: inherit;\n}\n.results {\n position: absolute;\n inset-inline: 0;\n inset-block-start: calc(100% + var(--office-space-1));\n z-index: 5;\n max-height: 22em;\n margin: 0;\n padding: var(--office-space-1);\n overflow: auto;\n list-style: none;\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n background: var(--office-popover);\n box-shadow: var(--office-shadow-teams);\n}\n.results button {\n display: grid;\n width: 100%;\n padding: var(--office-space-2) var(--office-space-3);\n border: 0;\n border-radius: var(--office-radius);\n background: transparent;\n text-align: start;\n}\n.results button:hover {\n background: var(--office-selected);\n}\n.results .in,\n.results .none {\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-sm);\n}\n.results .none {\n padding: var(--office-space-3);\n}\n.snippet {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.me {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n}\n.me office-ui-menu-button::part(caret) {\n display: none;\n}\n.channel-head office-ui-menu-button::part(caret) {\n display: none;\n}\n.channel-head svg {\n width: 1em;\n height: 1em;\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n/* ---- body ------------------------------------------------------------------------------- */\n.body {\n display: grid;\n grid-template-columns: auto 19em minmax(0, 1fr);\n min-height: 0;\n}\n.side {\n min-height: 0;\n overflow: auto;\n background: var(--office-teams-panel);\n border-inline-end: var(--office-border-width) solid var(--office-teams-divider);\n}\n.side h2 {\n margin: 0;\n padding: var(--office-space-3) var(--office-space-4);\n font-size: var(--office-font-size-lg);\n}\n.main {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n}\n.popout-view {\n display: flex;\n height: 100%;\n min-height: 0;\n}\n.popout-view teams-content-preview {\n flex: 1;\n}\n.main office-ui-chat-list,\n.main office-ui-prejoin {\n flex: 1;\n}\n\nul.plain {\n margin: 0;\n padding: 0 var(--office-space-3);\n list-style: none;\n}\nul.plain li {\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n padding: var(--office-space-2) var(--office-space-2);\n}\nul.plain li > :first-child:not(office-ui-avatar) {\n flex: 1;\n}\n.hint {\n padding: 0 var(--office-space-4);\n color: var(--office-teams-text-subtle);\n}\n.join {\n padding: var(--office-space-1) var(--office-space-3);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n background: var(--office-background);\n}\n.join.live {\n border-color: transparent;\n background: var(--office-call-live);\n color: var(--office-call-foreground);\n}\n\n/* ---- conversation ----------------------------------------------------------------------- */\n.channel-head {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--office-space-4);\n padding: var(--office-space-2) var(--office-space-5);\n border-bottom: var(--office-border-width) solid var(--office-teams-divider);\n}\n.channel-head > button:not(.meet),\n.thread-head button {\n padding: var(--office-space-2) var(--office-space-3);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n background: var(--office-background);\n}\n.channel-head > button:hover:not(:disabled),\n.thread-head button:hover {\n background: var(--office-selected);\n}\n.channel-head > button:disabled {\n opacity: 0.5;\n cursor: default;\n}\n.channel-head h1 {\n margin: 0;\n font-size: var(--office-font-size-lg);\n white-space: nowrap;\n}\n.hash {\n color: var(--office-teams-text-subtle);\n}\n.tabs {\n display: flex;\n gap: var(--office-space-1);\n}\n.tabs button {\n padding: var(--office-space-2) var(--office-space-3);\n border: 0;\n border-bottom: var(--office-border-width-thick) solid transparent;\n background: transparent;\n}\n.tabs button[aria-selected='true'] {\n border-bottom-color: var(--office-teams-brand);\n font-weight: var(--office-font-weight-bold);\n}\n.topic {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n color: var(--office-teams-text-subtle);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.people {\n display: flex;\n align-items: center;\n gap: var(--office-space-0);\n}\n.more {\n margin-inline-start: var(--office-space-1);\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-sm);\n}\n.meet {\n padding: var(--office-space-2) var(--office-space-4);\n border: 0;\n border-radius: var(--office-radius-md);\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n font-weight: var(--office-font-weight-bold);\n}\n.meet:hover:not(:disabled) {\n background: var(--office-teams-brand-hover);\n}\n.meet:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n.callbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--office-space-2) var(--office-space-5);\n background: var(--office-call-live);\n color: var(--office-call-foreground);\n}\n.callbar button {\n padding: 0 var(--office-space-3);\n border: var(--office-border-width) solid currentColor;\n border-radius: var(--office-radius);\n background: transparent;\n}\n\n/* ---- files ------------------------------------------------------------------------------ */\n/* ---- meeting ---------------------------------------------------------------------------- */\n.meeting {\n display: grid;\n grid-template-rows: auto minmax(0, 1fr);\n height: 100%;\n background: var(--office-call-background);\n}\n.stage {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n min-height: 0;\n}\n.panel {\n display: flex;\n flex-direction: column;\n width: 22em;\n min-height: 0;\n background: var(--office-background);\n border-inline-start: var(--office-border-width) solid var(--office-teams-divider);\n}\n.panel office-ui-chat-list {\n flex: 1;\n padding-inline: var(--office-space-3);\n}\n.panel office-ui-chat-composer {\n padding-inline: var(--office-space-3);\n}\n.people-panel h2 {\n margin: 0;\n padding: var(--office-space-3) var(--office-space-4);\n font-size: var(--office-font-size-lg);\n}\n\n/* ---- welcome and toast ------------------------------------------------------------------ */\n.welcome {\n display: grid;\n place-items: center;\n height: 100%;\n background: var(--office-teams-panel);\n}\n.welcome form {\n display: grid;\n justify-items: center;\n gap: var(--office-space-3);\n width: min(24em, 90%);\n padding: var(--office-space-6);\n border-radius: var(--office-radius-lg);\n background: var(--office-background);\n box-shadow: var(--office-shadow-teams);\n}\n.welcome h1 {\n margin: 0;\n font-size: var(--office-font-size-xl);\n}\n.welcome p {\n margin: 0;\n color: var(--office-teams-text-subtle);\n}\n.welcome input {\n width: 100%;\n padding: var(--office-space-3);\n border: var(--office-border-width) solid var(--office-field-border);\n border-radius: var(--office-radius);\n background: var(--office-field-background);\n color: inherit;\n font: inherit;\n}\n.welcome button {\n width: 100%;\n padding: var(--office-space-3);\n border: 0;\n border-radius: var(--office-radius-md);\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n font-weight: var(--office-font-weight-bold);\n}\n.toast {\n position: fixed;\n inset-block-end: var(--office-space-4);\n inset-inline-start: 50%;\n z-index: 10;\n transform: translateX(-50%);\n padding: var(--office-space-2) var(--office-space-4);\n border-radius: var(--office-radius-md);\n background: var(--office-call-background);\n color: var(--office-call-foreground);\n}\n\n.conversation-grid {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n flex: 1;\n min-height: 0;\n}\n.conversation-grid[data-thread='true'] {\n grid-template-columns: minmax(0, 1fr) minmax(18em, 0.8fr);\n}\n.conversation-main,\n.thread-pane {\n display: flex;\n flex-direction: column;\n min-height: 0;\n min-width: 0;\n}\n.tab-conversation teams-channel-tab {\n flex: 1;\n min-height: 0;\n}\n.thread-pane {\n border-inline-start: var(--office-border-width) solid var(--office-teams-divider);\n}\n.thread-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--office-space-3);\n padding: var(--office-space-3);\n}\n.thread-head h2 {\n margin: 0;\n font-size: 1em;\n}\n.followed-threads {\n overflow: auto;\n padding: var(--office-space-4);\n}\n.message-transfer {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--office-space-3);\n padding: var(--office-space-3);\n background: var(--office-teams-panel);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n}\n.message-transfer span {\n flex: 1;\n overflow-wrap: anywhere;\n}\n.message-transfer button {\n font: inherit;\n color: inherit;\n background: var(--office-background);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n padding: var(--office-space-2) var(--office-space-3);\n cursor: pointer;\n}\n.followed-threads ul {\n list-style: none;\n padding: 0;\n}\n.followed-threads fieldset {\n display: flex;\n flex-wrap: wrap;\n gap: var(--office-space-4);\n padding: var(--office-space-3);\n margin-block: var(--office-space-3);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n}\n.followed-threads li {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--office-space-3);\n padding-block: var(--office-space-3);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n}\n.followed-threads button {\n font: inherit;\n color: inherit;\n background: var(--office-background);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n padding: var(--office-space-2) var(--office-space-3);\n cursor: pointer;\n}\n.followed-threads button:hover {\n background: var(--office-selected);\n}\n.followed-threads li button:first-child {\n display: grid;\n gap: var(--office-space-2);\n flex: 1;\n text-align: start;\n min-width: 0;\n overflow-wrap: anywhere;\n border-color: transparent;\n}\n.followed-threads li[data-unread='true'] button:first-child span {\n font-weight: var(--office-font-weight-bold);\n}\n@media (max-width: 56em) {\n .conversation-grid[data-thread='true'] {\n grid-template-columns: minmax(0, 1fr);\n }\n .conversation-grid[data-thread='true'] .conversation-main {\n display: none;\n }\n}\n.tabs {\n overflow-x: auto;\n min-width: 0;\n flex: 1 1 16em;\n}\n\n@media (max-width: 56.25em) {\n .navigation-toggle {\n display: inline-flex;\n }\n .brand > .logo,\n .brand > span:last-child {\n display: none;\n }\n .channel-head .topic,\n .channel-head .people {\n display: none;\n }\n .channel-head .tabs {\n flex-basis: 100%;\n }\n .body {\n grid-template-columns: auto minmax(0, 1fr);\n }\n .side {\n display: none;\n }\n .topbar {\n grid-template-columns: auto minmax(0, 1fr) auto;\n }\n}\n";
2359
+ var teams_app_default = "/* <teams-app>: the shell. Colours, spacing and radii come from the ooxml-ui tokens, so a host\n retheme or dark mode reaches the whole app. The elements inside bring their own styles. */\n:host {\n display: block;\n height: 100%;\n min-height: 28em;\n font: var(--office-font-size) var(--office-font);\n color: var(--office-foreground);\n background: var(--office-background);\n}\n:host([data-office-theme='dark']) {\n --office-background: var(--office-teams-panel);\n --office-surface: var(--office-teams-bubble);\n --office-popover: var(--office-teams-panel);\n}\n:host([data-chat-density='compact']) {\n --office-teams-message-gap: var(--office-space-1);\n --office-teams-message-padding: var(--office-space-1) var(--office-space-2);\n}\n@media (prefers-color-scheme: dark) {\n :host(:not([data-office-theme='light'])) {\n --office-background: var(--office-teams-panel);\n --office-surface: var(--office-teams-bubble);\n --office-popover: var(--office-teams-panel);\n }\n}\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\nbutton {\n font: inherit;\n color: inherit;\n cursor: pointer;\n}\n:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n\n.shell {\n display: grid;\n grid-template-rows: auto minmax(0, 1fr);\n height: 100%;\n}\n\n/* ---- top bar ---------------------------------------------------------------------------- */\n.topbar {\n display: grid;\n grid-template-columns: 16em minmax(0, 1fr) auto;\n align-items: center;\n gap: var(--office-space-4);\n padding: var(--office-space-2) var(--office-space-4);\n background: var(--office-teams-rail);\n border-bottom: var(--office-border-width) solid var(--office-teams-divider);\n}\n.navigation-toggle {\n display: none;\n padding: var(--office-space-2);\n border: 0;\n border-radius: var(--office-radius-md);\n background: transparent;\n}\n.navigation-toggle:hover {\n background: var(--office-selected);\n}\n.navigation-toggle svg {\n width: 1.3em;\n height: 1.3em;\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n}\n.brand {\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n font-size: var(--office-font-size-lg);\n font-weight: var(--office-font-weight-bold);\n}\n.logo {\n display: inline-grid;\n place-items: center;\n width: 1.8em;\n height: 1.8em;\n border-radius: var(--office-radius-md);\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n font-size: 0.85em;\n}\n.search {\n position: relative;\n justify-self: center;\n width: min(34em, 100%);\n}\n.search input {\n width: 100%;\n padding: var(--office-space-2) var(--office-space-4);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-full);\n background: var(--office-background);\n color: inherit;\n font: inherit;\n}\n.results {\n position: absolute;\n inset-inline: 0;\n inset-block-start: calc(100% + var(--office-space-1));\n z-index: 5;\n max-height: 22em;\n margin: 0;\n padding: var(--office-space-1);\n overflow: auto;\n list-style: none;\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n background: var(--office-popover);\n box-shadow: var(--office-shadow-teams);\n}\n.results button {\n display: grid;\n width: 100%;\n padding: var(--office-space-2) var(--office-space-3);\n border: 0;\n border-radius: var(--office-radius);\n background: transparent;\n text-align: start;\n}\n.results button:hover {\n background: var(--office-selected);\n}\n.results .in,\n.results .none {\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-sm);\n}\n.results .none {\n padding: var(--office-space-3);\n}\n.snippet {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.me {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n}\n.me office-ui-menu-button::part(caret) {\n display: none;\n}\n.channel-head office-ui-menu-button::part(caret) {\n display: none;\n}\n.channel-head svg {\n width: 1em;\n height: 1em;\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n/* ---- body ------------------------------------------------------------------------------- */\n.body {\n display: grid;\n grid-template-columns: auto 19em minmax(0, 1fr);\n min-height: 0;\n grid-template-rows: minmax(0, 1fr);\n}\n.body > office-ui-app-rail {\n grid-column: 1;\n grid-row: 1;\n}\n.body > .side {\n grid-column: 2;\n grid-row: 1;\n}\n.body > .main {\n grid-column: 3;\n grid-row: 1;\n}\n.body > teams-settings {\n grid-column: 2 / -1;\n grid-row: 1;\n min-width: 0;\n min-height: 0;\n z-index: 1;\n}\n.body > teams-settings:not([open]) {\n display: none;\n}\n.body > [inert] {\n visibility: hidden;\n}\n.side {\n min-height: 0;\n overflow: auto;\n background: var(--office-teams-panel);\n border-inline-end: var(--office-border-width) solid var(--office-teams-divider);\n}\n.side h2 {\n margin: 0;\n padding: var(--office-space-3) var(--office-space-4);\n font-size: var(--office-font-size-lg);\n}\n.main {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n}\n.popout-view {\n display: flex;\n height: 100%;\n min-height: 0;\n}\n.popout-view teams-content-preview {\n flex: 1;\n}\n.main office-ui-chat-list,\n.main office-ui-prejoin {\n flex: 1;\n}\n\nul.plain {\n margin: 0;\n padding: 0 var(--office-space-3);\n list-style: none;\n}\nul.plain li {\n display: flex;\n align-items: center;\n gap: var(--office-space-2);\n padding: var(--office-space-2) var(--office-space-2);\n}\nul.plain li > :first-child:not(office-ui-avatar) {\n flex: 1;\n}\n.hint {\n padding: 0 var(--office-space-4);\n color: var(--office-teams-text-subtle);\n}\n.join {\n padding: var(--office-space-1) var(--office-space-3);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n background: var(--office-background);\n}\n.join.live {\n border-color: transparent;\n background: var(--office-call-live);\n color: var(--office-call-foreground);\n}\n\n/* ---- conversation ----------------------------------------------------------------------- */\n.channel-head {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--office-space-4);\n padding: var(--office-space-2) var(--office-space-5);\n border-bottom: var(--office-border-width) solid var(--office-teams-divider);\n}\n.channel-head > button:not(.meet),\n.thread-head button {\n padding: var(--office-space-2) var(--office-space-3);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n background: var(--office-background);\n}\n.channel-head > button:hover:not(:disabled),\n.thread-head button:hover {\n background: var(--office-selected);\n}\n.channel-head > button:disabled {\n opacity: 0.5;\n cursor: default;\n}\n.channel-head h1 {\n margin: 0;\n font-size: var(--office-font-size-lg);\n white-space: nowrap;\n}\n.hash {\n color: var(--office-teams-text-subtle);\n}\n.tabs {\n display: flex;\n gap: var(--office-space-1);\n}\n.tabs button {\n padding: var(--office-space-2) var(--office-space-3);\n border: 0;\n border-bottom: var(--office-border-width-thick) solid transparent;\n background: transparent;\n}\n.tabs button[aria-selected='true'] {\n border-bottom-color: var(--office-teams-brand);\n font-weight: var(--office-font-weight-bold);\n}\n.topic {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n color: var(--office-teams-text-subtle);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.people {\n display: flex;\n align-items: center;\n gap: var(--office-space-0);\n}\n.more {\n margin-inline-start: var(--office-space-1);\n color: var(--office-teams-text-subtle);\n font-size: var(--office-font-size-sm);\n}\n.meet {\n padding: var(--office-space-2) var(--office-space-4);\n border: 0;\n border-radius: var(--office-radius-md);\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n font-weight: var(--office-font-weight-bold);\n}\n.meet:hover:not(:disabled) {\n background: var(--office-teams-brand-hover);\n}\n.meet:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n.callbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--office-space-2) var(--office-space-5);\n background: var(--office-call-live);\n color: var(--office-call-foreground);\n}\n.callbar button {\n padding: 0 var(--office-space-3);\n border: var(--office-border-width) solid currentColor;\n border-radius: var(--office-radius);\n background: transparent;\n}\n\n/* ---- files ------------------------------------------------------------------------------ */\n/* ---- meeting ---------------------------------------------------------------------------- */\n.meeting {\n display: grid;\n grid-template-rows: auto minmax(0, 1fr);\n height: 100%;\n background: var(--office-call-background);\n}\n.stage {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n min-height: 0;\n}\n.panel {\n display: flex;\n flex-direction: column;\n width: 22em;\n min-height: 0;\n background: var(--office-background);\n border-inline-start: var(--office-border-width) solid var(--office-teams-divider);\n}\n.panel office-ui-chat-list {\n flex: 1;\n padding-inline: var(--office-space-3);\n}\n.panel office-ui-chat-composer {\n padding-inline: var(--office-space-3);\n}\n.people-panel h2 {\n margin: 0;\n padding: var(--office-space-3) var(--office-space-4);\n font-size: var(--office-font-size-lg);\n}\n\n/* ---- welcome and toast ------------------------------------------------------------------ */\n.welcome {\n display: grid;\n place-items: center;\n height: 100%;\n background: var(--office-teams-panel);\n}\n.welcome form {\n display: grid;\n justify-items: center;\n gap: var(--office-space-3);\n width: min(24em, 90%);\n padding: var(--office-space-6);\n border-radius: var(--office-radius-lg);\n background: var(--office-background);\n box-shadow: var(--office-shadow-teams);\n}\n.welcome h1 {\n margin: 0;\n font-size: var(--office-font-size-xl);\n}\n.welcome p {\n margin: 0;\n color: var(--office-teams-text-subtle);\n}\n.welcome input {\n width: 100%;\n padding: var(--office-space-3);\n border: var(--office-border-width) solid var(--office-field-border);\n border-radius: var(--office-radius);\n background: var(--office-field-background);\n color: inherit;\n font: inherit;\n}\n.welcome button {\n width: 100%;\n padding: var(--office-space-3);\n border: 0;\n border-radius: var(--office-radius-md);\n background: var(--office-teams-brand);\n color: var(--office-teams-brand-foreground);\n font-weight: var(--office-font-weight-bold);\n}\n.toast {\n position: fixed;\n inset-block-end: var(--office-space-4);\n inset-inline-start: 50%;\n z-index: 10;\n transform: translateX(-50%);\n padding: var(--office-space-2) var(--office-space-4);\n border-radius: var(--office-radius-md);\n background: var(--office-call-background);\n color: var(--office-call-foreground);\n}\n\n.conversation-grid {\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n flex: 1;\n min-height: 0;\n}\n.conversation-grid[data-thread='true'] {\n grid-template-columns: minmax(0, 1fr) minmax(18em, 0.8fr);\n}\n.conversation-main,\n.thread-pane {\n display: flex;\n flex-direction: column;\n min-height: 0;\n min-width: 0;\n}\n.tab-conversation teams-channel-tab {\n flex: 1;\n min-height: 0;\n}\n.thread-pane {\n border-inline-start: var(--office-border-width) solid var(--office-teams-divider);\n}\n.thread-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--office-space-3);\n padding: var(--office-space-3);\n}\n.thread-head h2 {\n margin: 0;\n font-size: 1em;\n}\n.followed-threads {\n overflow: auto;\n padding: var(--office-space-4);\n}\n.message-transfer {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--office-space-3);\n padding: var(--office-space-3);\n background: var(--office-teams-panel);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n}\n.message-transfer span {\n flex: 1;\n overflow-wrap: anywhere;\n}\n.message-transfer button {\n font: inherit;\n color: inherit;\n background: var(--office-background);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n padding: var(--office-space-2) var(--office-space-3);\n cursor: pointer;\n}\n.followed-threads ul {\n list-style: none;\n padding: 0;\n}\n.followed-threads fieldset {\n display: flex;\n flex-wrap: wrap;\n gap: var(--office-space-4);\n padding: var(--office-space-3);\n margin-block: var(--office-space-3);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n}\n.followed-threads li {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--office-space-3);\n padding-block: var(--office-space-3);\n border-block-end: var(--office-border-width) solid var(--office-teams-divider);\n}\n.followed-threads button {\n font: inherit;\n color: inherit;\n background: var(--office-background);\n border: var(--office-border-width) solid var(--office-teams-divider);\n border-radius: var(--office-radius-md);\n padding: var(--office-space-2) var(--office-space-3);\n cursor: pointer;\n}\n.followed-threads button:hover {\n background: var(--office-selected);\n}\n.followed-threads li button:first-child {\n display: grid;\n gap: var(--office-space-2);\n flex: 1;\n text-align: start;\n min-width: 0;\n overflow-wrap: anywhere;\n border-color: transparent;\n}\n.followed-threads li[data-unread='true'] button:first-child span {\n font-weight: var(--office-font-weight-bold);\n}\n@media (max-width: 56em) {\n .conversation-grid[data-thread='true'] {\n grid-template-columns: minmax(0, 1fr);\n }\n .conversation-grid[data-thread='true'] .conversation-main {\n display: none;\n }\n}\n.tabs {\n overflow-x: auto;\n min-width: 0;\n flex: 1 1 16em;\n}\n\n@media (max-width: 56.25em) {\n .navigation-toggle {\n display: inline-flex;\n }\n .brand > .logo,\n .brand > span:last-child {\n display: none;\n }\n .channel-head .topic,\n .channel-head .people {\n display: none;\n }\n .channel-head .tabs {\n flex-basis: 100%;\n }\n .body {\n grid-template-columns: auto minmax(0, 1fr);\n }\n .body > .main {\n grid-column: 2;\n }\n .side {\n display: none;\n }\n .topbar {\n grid-template-columns: auto minmax(0, 1fr) auto;\n }\n}\n";
2334
2360
  function threadPane(state, client, openFile, close) {
2335
2361
  const thread = state.thread;
2336
2362
  if (!thread) return nothing;
@@ -3207,6 +3233,7 @@ var TeamsApp = class extends LitElement {
3207
3233
  this.addingTab = false;
3208
3234
  this.creatingChannel = false;
3209
3235
  this.navigationOpen = false;
3236
+ this.settingsOpen = false;
3210
3237
  this.openRequest++;
3211
3238
  const named = this.userName ? { id: this.userId || loadIdentity()?.id || crypto.randomUUID(), name: this.userName } : this.identity ?? loadIdentity();
3212
3239
  if (this.userName && !this.userId) saveIdentity(named);
@@ -3360,6 +3387,7 @@ var TeamsApp = class extends LitElement {
3360
3387
  }
3361
3388
  selectChannel(id) {
3362
3389
  if (!this.closePreview()) return false;
3390
+ this.settingsOpen = false;
3363
3391
  this.addingTab = false;
3364
3392
  this.creatingChannel = false;
3365
3393
  this.teams.client?.select(id);
@@ -3386,8 +3414,15 @@ var TeamsApp = class extends LitElement {
3386
3414
  }
3387
3415
  }
3388
3416
  askSettings() {
3417
+ this.navigationOpen = false;
3389
3418
  this.settingsOpen = true;
3390
3419
  }
3420
+ async closeSettings() {
3421
+ this.settingsOpen = false;
3422
+ await this.updateComplete;
3423
+ if (!this.isConnected || this.settingsOpen) return;
3424
+ this.renderRoot.querySelector('office-ui-menu-button[label="Settings and more"]')?.shadowRoot?.querySelector("button")?.focus();
3425
+ }
3391
3426
  applyTheme() {
3392
3427
  if (this.theme === "system") this.removeAttribute("data-office-theme");
3393
3428
  else this.setAttribute("data-office-theme", this.theme);
@@ -3420,34 +3455,22 @@ var TeamsApp = class extends LitElement {
3420
3455
  selected=${this.rail}
3421
3456
  @office-rail-select=${(e) => {
3422
3457
  if (!this.closePreview()) return;
3458
+ this.settingsOpen = false;
3423
3459
  this.rail = e.detail.id;
3424
3460
  this.meeting = false;
3425
3461
  }}
3426
3462
  ></office-ui-app-rail>
3427
- <aside class="side">${this.sidebar(s)}</aside>
3428
- <main class="main">${this.main(s)}</main>
3429
- </div>
3430
- <teams-create-channel-dialog
3431
- ?open=${this.creatingChannel}
3432
- .create=${(name, description) => this.commitChannel(name, description, this.client)}
3433
- @teams-create-channel-close=${() => this.creatingChannel = false}
3434
- ></teams-create-channel-dialog>
3435
- <teams-navigation-drawer
3436
- .heading=${this.rail === "calls" ? "Calls" : "Teams and channels"}
3437
- ?open=${this.navigationOpen}
3438
- @teams-navigation-close=${() => void this.closeNavigation()}
3439
- >
3440
- ${this.navigationOpen ? this.sidebar(s) : nothing}
3441
- </teams-navigation-drawer>
3442
- ${this.toast ? html`<div class="toast" role="status">${this.toast}</div>` : nothing}
3443
- <teams-settings
3444
- ?open=${this.settingsOpen}
3445
- .config=${this.resolveConfig()}
3446
- .theme=${this.theme}
3447
- .fileOpenPreference=${this.fileOpenPreference}
3448
- .chatDensity=${this.chatDensity}
3449
- .showAppNames=${this.showAppNames}
3450
- @teams-settings-app-names=${(event) => {
3463
+ <aside class="side" ?inert=${this.settingsOpen}>${this.sidebar(s)}</aside>
3464
+ <main class="main" ?inert=${this.settingsOpen}>${this.main(s)}</main>
3465
+ <teams-settings
3466
+ embedded
3467
+ ?open=${this.settingsOpen}
3468
+ .config=${this.resolveConfig()}
3469
+ .theme=${this.theme}
3470
+ .fileOpenPreference=${this.fileOpenPreference}
3471
+ .chatDensity=${this.chatDensity}
3472
+ .showAppNames=${this.showAppNames}
3473
+ @teams-settings-app-names=${(event) => {
3451
3474
  if (typeof event.detail.show !== "boolean") return;
3452
3475
  this.showAppNames = event.detail.show;
3453
3476
  safeStorage.setItem(
@@ -3455,7 +3478,7 @@ var TeamsApp = class extends LitElement {
3455
3478
  String(this.showAppNames)
3456
3479
  );
3457
3480
  }}
3458
- @teams-settings-density=${(event) => {
3481
+ @teams-settings-density=${(event) => {
3459
3482
  if (!["comfy", "compact"].includes(event.detail.density)) return;
3460
3483
  this.chatDensity = event.detail.density;
3461
3484
  safeStorage.setItem(
@@ -3463,7 +3486,7 @@ var TeamsApp = class extends LitElement {
3463
3486
  this.chatDensity
3464
3487
  );
3465
3488
  }}
3466
- @teams-settings-file-open=${(event) => {
3489
+ @teams-settings-file-open=${(event) => {
3467
3490
  if (!["teams", "browser"].includes(event.detail.preference)) return;
3468
3491
  this.fileOpenPreference = event.detail.preference;
3469
3492
  safeStorage.setItem(
@@ -3471,17 +3494,17 @@ var TeamsApp = class extends LitElement {
3471
3494
  this.fileOpenPreference
3472
3495
  );
3473
3496
  }}
3474
- .followSettings=${s.threadFollowSettings}
3475
- .userName=${s.user.name}
3476
- @teams-settings-theme=${(event) => {
3497
+ .followSettings=${s.threadFollowSettings}
3498
+ .userName=${s.user.name}
3499
+ @teams-settings-theme=${(event) => {
3477
3500
  if (!["system", "light", "dark"].includes(event.detail.theme)) return;
3478
3501
  this.theme = event.detail.theme;
3479
3502
  this.applyTheme();
3480
3503
  safeStorage.setItem(this.themeStorageKey, this.theme);
3481
3504
  }}
3482
- @teams-settings-follow=${(event) => this.teams.client?.setThreadFollowSettings(event.detail)}
3483
- @teams-settings-close=${() => this.settingsOpen = false}
3484
- @teams-settings-apply=${(e) => {
3505
+ @teams-settings-follow=${(event) => this.teams.client?.setThreadFollowSettings(event.detail)}
3506
+ @teams-settings-close=${() => void this.closeSettings()}
3507
+ @teams-settings-apply=${(e) => {
3485
3508
  if (!this.closePreview()) return;
3486
3509
  saveConfig(e.detail.config);
3487
3510
  this.config = e.detail.config;
@@ -3494,7 +3517,22 @@ var TeamsApp = class extends LitElement {
3494
3517
  })
3495
3518
  );
3496
3519
  }}
3497
- ></teams-settings>
3520
+ ></teams-settings>
3521
+ </div>
3522
+ <teams-create-channel-dialog
3523
+ ?open=${this.creatingChannel}
3524
+ .create=${(name, description) => this.commitChannel(name, description, this.client)}
3525
+ @teams-create-channel-close=${() => this.creatingChannel = false}
3526
+ ></teams-create-channel-dialog>
3527
+ <teams-navigation-drawer
3528
+ .heading=${this.rail === "calls" ? "Calls" : "Teams and channels"}
3529
+ ?open=${this.navigationOpen}
3530
+ @teams-navigation-close=${() => void this.closeNavigation()}
3531
+ >
3532
+ ${this.navigationOpen ? this.sidebar(s) : nothing}
3533
+ </teams-navigation-drawer>
3534
+ ${this.toast ? html`<div class="toast" role="status">${this.toast}</div>` : nothing}
3535
+
3498
3536
  <teams-add-tab-dialog
3499
3537
  .open=${this.addingTab}
3500
3538
  .client=${this.teams.client}