@vonage/vivid 3.31.0 → 3.34.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 (237) hide show
  1. package/accordion/index.js +5 -5
  2. package/accordion-item/index.js +4 -4
  3. package/action-group/index.js +1 -1
  4. package/alert/index.js +8 -7
  5. package/avatar/index.js +2 -2
  6. package/badge/index.js +2 -2
  7. package/banner/index.js +5 -5
  8. package/breadcrumb/index.js +1 -1
  9. package/breadcrumb-item/index.js +3 -3
  10. package/button/index.js +4 -4
  11. package/calendar/index.js +1 -1
  12. package/calendar-event/index.js +1 -1
  13. package/card/index.js +3 -3
  14. package/checkbox/index.js +7 -4
  15. package/combobox/index.js +10 -9
  16. package/custom-elements.json +996 -29
  17. package/data-grid/index.js +2 -2
  18. package/date-picker/index.js +35 -0
  19. package/dialog/index.js +6 -6
  20. package/divider/index.js +1 -1
  21. package/elevation/index.js +1 -1
  22. package/empty-state/index.js +2 -2
  23. package/fab/index.js +4 -4
  24. package/file-picker/index.js +7 -6
  25. package/focus/index.js +1 -1
  26. package/header/index.js +2 -2
  27. package/icon/index.js +1 -1
  28. package/index.d.ts +1 -0
  29. package/index.js +68 -66
  30. package/layout/index.js +1 -1
  31. package/lib/button/button.d.ts +2 -0
  32. package/lib/calendar/calendar.d.ts +1 -1
  33. package/lib/components.d.ts +20 -19
  34. package/lib/date-picker/calendar/calendarGrid.d.ts +17 -0
  35. package/lib/date-picker/calendar/dateStr.d.ts +7 -0
  36. package/lib/date-picker/calendar/month.d.ts +12 -0
  37. package/lib/date-picker/calendar/monthPickerGrid.d.ts +10 -0
  38. package/lib/date-picker/calendar/presentationDate.d.ts +4 -0
  39. package/lib/date-picker/calendar/year.d.ts +2 -0
  40. package/lib/date-picker/date-picker.d.ts +18 -0
  41. package/lib/date-picker/date-picker.template.d.ts +4 -0
  42. package/lib/date-picker/definition.d.ts +3 -0
  43. package/lib/date-picker/locale.d.ts +21 -0
  44. package/lib/icon/icon.d.ts +0 -1
  45. package/lib/listbox/listbox.d.ts +9 -1
  46. package/lib/select/select.d.ts +4 -2
  47. package/lib/text-field/text-field.d.ts +1 -0
  48. package/listbox/index.js +22 -17
  49. package/locales/en-GB.d.ts +3 -0
  50. package/locales/en-GB.js +59 -0
  51. package/locales/en-US.d.ts +3 -0
  52. package/locales/en-US.js +59 -0
  53. package/locales/ja-JP.d.ts +3 -0
  54. package/locales/ja-JP.js +59 -0
  55. package/locales/zh-CN.d.ts +3 -0
  56. package/locales/zh-CN.js +59 -0
  57. package/menu/index.js +8 -8
  58. package/menu-item/index.js +4 -4
  59. package/nav/index.js +1 -1
  60. package/nav-disclosure/index.js +3 -3
  61. package/nav-item/index.js +3 -3
  62. package/note/index.js +4 -4
  63. package/number-field/index.js +8 -7
  64. package/option/index.js +5 -4
  65. package/package.json +2 -15
  66. package/pagination/index.js +5 -5
  67. package/popup/index.js +6 -6
  68. package/progress/index.js +1 -1
  69. package/progress-ring/index.js +1 -1
  70. package/radio/index.js +2 -2
  71. package/radio-group/index.js +1 -1
  72. package/select/index.js +10 -9
  73. package/shared/affix.js +25 -9
  74. package/shared/apply-mixins.js +1 -1
  75. package/shared/breadcrumb-item.js +5 -5
  76. package/shared/button.js +13 -13
  77. package/shared/calendar-event.js +36 -16
  78. package/shared/definition.js +133 -194
  79. package/shared/definition10.js +225 -40
  80. package/shared/definition11.js +36 -32
  81. package/shared/definition12.js +763 -98
  82. package/shared/definition13.js +125 -89
  83. package/shared/definition14.js +207 -27
  84. package/shared/definition15.js +710 -731
  85. package/shared/definition16.js +1289 -47
  86. package/shared/definition17.js +6113 -93
  87. package/shared/definition18.js +242 -164
  88. package/shared/definition19.js +47 -692
  89. package/shared/definition2.js +199 -117
  90. package/shared/definition20.js +59 -1671
  91. package/shared/definition21.js +95 -255
  92. package/shared/definition22.js +2218 -1167
  93. package/shared/definition23.js +57 -219
  94. package/shared/definition24.js +27 -68
  95. package/shared/definition25.js +54 -38
  96. package/shared/definition26.js +395 -70
  97. package/shared/definition27.js +381 -2223
  98. package/shared/definition28.js +85 -44
  99. package/shared/definition29.js +27 -40
  100. package/shared/definition3.js +61 -24
  101. package/shared/definition30.js +13 -427
  102. package/shared/definition31.js +49 -360
  103. package/shared/definition32.js +466 -13
  104. package/shared/definition33.js +273 -63
  105. package/shared/definition34.js +195 -25
  106. package/shared/definition35.js +86 -35
  107. package/shared/definition36.js +66 -427
  108. package/shared/definition37.js +430 -190
  109. package/shared/definition38.js +34 -52
  110. package/shared/definition39.js +683 -31
  111. package/shared/definition4.js +157 -12
  112. package/shared/definition40.js +97 -422
  113. package/shared/definition41.js +473 -543
  114. package/shared/definition42.js +122 -73
  115. package/shared/definition43.js +103 -502
  116. package/shared/definition44.js +23 -101
  117. package/shared/definition45.js +76 -126
  118. package/shared/definition46.js +494 -48
  119. package/shared/definition47.js +23 -23
  120. package/shared/definition48.js +126 -476
  121. package/shared/definition49.js +275 -98
  122. package/shared/definition5.js +71 -36
  123. package/shared/definition50.js +157 -16
  124. package/shared/definition51.js +133 -263
  125. package/shared/definition52.js +131 -115
  126. package/shared/definition53.js +85 -120
  127. package/shared/definition54.js +295 -111
  128. package/shared/definition55.js +12 -71
  129. package/shared/definition56.js +39 -295
  130. package/shared/definition57.js +181 -0
  131. package/shared/definition6.js +56 -111
  132. package/shared/definition7.js +119 -187
  133. package/shared/definition8.js +58 -23
  134. package/shared/definition9.js +92 -66
  135. package/shared/focus.js +2 -1
  136. package/shared/focus2.js +1 -1
  137. package/shared/form-associated.js +2 -2
  138. package/shared/icon.js +48 -27
  139. package/shared/index.js +7 -27
  140. package/shared/index2.js +202 -0
  141. package/shared/key-codes.js +1 -1
  142. package/shared/listbox.js +88 -11
  143. package/shared/localization/Locale.d.ts +4 -0
  144. package/shared/localization/index.d.ts +7 -0
  145. package/shared/patterns/form-elements/form-elements.d.ts +4 -4
  146. package/shared/patterns/index.d.ts +1 -0
  147. package/shared/patterns/localized.d.ts +4 -0
  148. package/shared/radio.js +23 -7
  149. package/shared/repeat.js +1 -1
  150. package/shared/text-anchor.js +21 -4
  151. package/shared/text-anchor.template.js +37 -40
  152. package/shared/text-field.js +2 -2
  153. package/shared/text-field2.js +15 -15
  154. package/shared/tree-item.js +12 -12
  155. package/side-drawer/index.js +1 -1
  156. package/slider/index.js +2 -2
  157. package/split-button/index.js +3 -3
  158. package/style.css +6097 -0
  159. package/styles/core/all.css +25 -3
  160. package/styles/core/theme.css +1 -1
  161. package/styles/core/typography.css +25 -3
  162. package/styles/tokens/theme-dark.css +4 -4
  163. package/styles/tokens/theme-light.css +4 -4
  164. package/styles/tokens/vivid-2-compat.css +2 -2
  165. package/switch/index.js +5 -4
  166. package/tab/index.js +3 -3
  167. package/tab-panel/index.js +1 -1
  168. package/tabs/index.js +5 -5
  169. package/tag/index.js +3 -3
  170. package/tag-group/index.js +1 -1
  171. package/text-anchor/index.js +1 -1
  172. package/text-area/index.js +5 -4
  173. package/text-field/index.js +5 -4
  174. package/toggletip/index.js +7 -7
  175. package/tooltip/index.js +7 -7
  176. package/tree-item/index.js +3 -3
  177. package/tree-view/index.js +1 -1
  178. package/vivid.api.json +137 -0
  179. package/lib/accordion/index.d.ts +0 -1
  180. package/lib/accordion-item/index.d.ts +0 -1
  181. package/lib/action-group/index.d.ts +0 -1
  182. package/lib/alert/index.d.ts +0 -1
  183. package/lib/avatar/index.d.ts +0 -1
  184. package/lib/badge/index.d.ts +0 -1
  185. package/lib/banner/index.d.ts +0 -1
  186. package/lib/breadcrumb/index.d.ts +0 -1
  187. package/lib/breadcrumb-item/index.d.ts +0 -1
  188. package/lib/button/index.d.ts +0 -1
  189. package/lib/calendar/index.d.ts +0 -1
  190. package/lib/calendar-event/index.d.ts +0 -1
  191. package/lib/card/index.d.ts +0 -1
  192. package/lib/checkbox/index.d.ts +0 -1
  193. package/lib/combobox/index.d.ts +0 -1
  194. package/lib/data-grid/index.d.ts +0 -1
  195. package/lib/dialog/index.d.ts +0 -1
  196. package/lib/divider/index.d.ts +0 -1
  197. package/lib/elevation/index.d.ts +0 -1
  198. package/lib/empty-state/index.d.ts +0 -1
  199. package/lib/fab/index.d.ts +0 -1
  200. package/lib/file-picker/index.d.ts +0 -1
  201. package/lib/focus/index.d.ts +0 -1
  202. package/lib/header/index.d.ts +0 -1
  203. package/lib/icon/index.d.ts +0 -1
  204. package/lib/layout/index.d.ts +0 -1
  205. package/lib/listbox/index.d.ts +0 -1
  206. package/lib/menu/index.d.ts +0 -1
  207. package/lib/menu-item/index.d.ts +0 -1
  208. package/lib/nav/index.d.ts +0 -1
  209. package/lib/nav-disclosure/index.d.ts +0 -1
  210. package/lib/nav-item/index.d.ts +0 -1
  211. package/lib/note/index.d.ts +0 -1
  212. package/lib/number-field/index.d.ts +0 -1
  213. package/lib/option/index.d.ts +0 -1
  214. package/lib/pagination/index.d.ts +0 -1
  215. package/lib/popup/index.d.ts +0 -1
  216. package/lib/progress/index.d.ts +0 -1
  217. package/lib/progress-ring/index.d.ts +0 -1
  218. package/lib/radio/index.d.ts +0 -1
  219. package/lib/radio-group/index.d.ts +0 -1
  220. package/lib/select/index.d.ts +0 -1
  221. package/lib/side-drawer/index.d.ts +0 -1
  222. package/lib/slider/index.d.ts +0 -1
  223. package/lib/split-button/index.d.ts +0 -1
  224. package/lib/switch/index.d.ts +0 -1
  225. package/lib/tab/index.d.ts +0 -1
  226. package/lib/tab-panel/index.d.ts +0 -1
  227. package/lib/tabs/index.d.ts +0 -1
  228. package/lib/tag/index.d.ts +0 -1
  229. package/lib/tag-group/index.d.ts +0 -1
  230. package/lib/text-anchor/index.d.ts +0 -1
  231. package/lib/text-area/index.d.ts +0 -1
  232. package/lib/text-field/index.d.ts +0 -1
  233. package/lib/toggletip/index.d.ts +0 -1
  234. package/lib/tooltip/index.d.ts +0 -1
  235. package/lib/tree-item/index.d.ts +0 -1
  236. package/lib/tree-view/index.d.ts +0 -1
  237. package/shared/form-elements.js +0 -162
@@ -1,233 +1,71 @@
1
- import { F as FoundationElement, d as __classPrivateFieldGet, _ as __decorate, a as attr, b as __metadata, o as observable, f as __classPrivateFieldSet, h as html, r as registerFactory } from './index.js';
2
- import { i as iconRegistries } from './definition3.js';
3
- import { B as Button, b as buttonRegistries } from './definition7.js';
4
- import { E as Elevation, e as elevationRegistries } from './definition8.js';
5
- import { I as Icon } from './icon.js';
6
- import { w as when } from './when.js';
7
- import { s as slotted } from './slotted.js';
1
+ import { a as attr, F as FoundationElement, h as html, r as registerFactory } from './index.js';
2
+ import { E as Elevation, e as elevationRegistries } from './definition56.js';
8
3
  import { c as classNames } from './class-names.js';
9
4
 
10
- var css_248z$1 = "dialog {\n position: absolute;\n left: 0; right: 0;\n width: -moz-fit-content;\n width: -webkit-fit-content;\n width: fit-content;\n height: -moz-fit-content;\n height: -webkit-fit-content;\n height: fit-content;\n margin: auto;\n border: solid;\n padding: 1em;\n background: white;\n color: black;\n display: block;\n}\n\ndialog:not([open]) {\n display: none;\n}\n\ndialog + .backdrop {\n position: fixed;\n top: 0; right: 0; bottom: 0; left: 0;\n background: rgba(0,0,0,0.1);\n}\n\n._dialog_overlay {\n position: fixed;\n top: 0; right: 0; bottom: 0; left: 0;\n}\n\ndialog.fixed {\n position: fixed;\n top: 50%;\n transform: translate(0, -50%);\n}";
5
+ const styles = "/**\n * Do not edit directly\n * Generated on Mon, 04 Sep 2023 12:44:18 GMT\n */\n.base {\n z-index: 1;\n block-size: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) + calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n font: var(--vvd-typography-heading-4);\n inline-size: 100%;\n}\n.base .header-content {\n display: inline-flex;\n align-items: center;\n column-gap: 4px;\n}\n\n.container {\n display: flex;\n box-sizing: border-box;\n justify-content: space-between;\n background-color: var(--header-bg-color, var(--vvd-color-canvas));\n block-size: inherit;\n color: var(--vvd-color-canvas-text);\n column-gap: 12px;\n padding-block: 8px;\n padding-inline: 16px;\n}\n.container[part~=vvd-theme-alternate] {\n color-scheme: var(--vvd-color-scheme);\n}\n\n.app-content {\n --vvd-header-block-size: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) + calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}";
11
6
 
12
- var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 17 Aug 2023 11:13:18 GMT\n */\n.base {\n box-sizing: border-box;\n padding: 0;\n border: none;\n background-color: transparent;\n border-radius: 6px;\n color: var(--vvd-color-canvas-text);\n max-block-size: var(--dialog-max-block-size, calc(100vh - 64px));\n max-inline-size: var(--dialog-max-inline-size, var(--_dialog-default-max-inline-size));\n min-inline-size: var(--dialog-min-inline-size, 280px);\n}\n@media not all and (min-width: 600px) {\n .base {\n --_dialog-default-max-inline-size: 90vw;\n }\n}\n@media (min-width: 600px) {\n .base {\n --_dialog-default-max-inline-size: 560px;\n }\n}\n.base:not(.modal) {\n z-index: var(--dialog-z-index, 1);\n}\n.base.modal {\n position: fixed;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);\n}\n.base.modal::backdrop {\n background-color: var(--vvd-color-canvas-text, currentColor);\n opacity: 0.5;\n}\n\n.main-wrapper {\n display: flex;\n box-sizing: border-box;\n flex-direction: column;\n gap: 24px;\n padding-block: 24px;\n}\n.main-wrapper > * {\n box-sizing: border-box;\n}\n\n.header {\n display: grid;\n align-items: flex-start;\n justify-content: space-between;\n inline-size: 100%;\n padding-inline: 24px;\n}\n.base:not(.icon-placement-side) .header {\n grid-template-columns: 1fr auto;\n grid-template-rows: auto auto auto;\n}\n.base:not(.icon-placement-side) .header .icon {\n font-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n grid-column: 1/2;\n grid-row: 1/2;\n line-height: 1;\n margin-block-end: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.base.icon-placement-side .header {\n grid-template-columns: auto 1fr auto;\n grid-template-rows: auto auto;\n}\n.base.icon-placement-side .header .icon {\n font-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 12));\n}\n.base.icon-placement-side .header ::slotted(*),\n.base.icon-placement-side .header .icon {\n grid-column: 1/2;\n grid-row: 1/-1;\n margin-inline-end: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)) / 2);\n}\n.header.border {\n position: relative;\n}\n.header.border::after {\n position: absolute;\n bottom: -24px;\n left: 0;\n background-color: var(--vvd-color-neutral-200);\n block-size: 1px;\n content: \"\";\n inline-size: 100%;\n}\n.base.hide-body .header.border::after {\n content: none;\n}\n\n.body:not(.full-width) {\n padding-inline: 24px;\n}\n.hide-body .body {\n display: none;\n}\n\n.footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 24px;\n padding-inline: 24px;\n}\n.hide-footer .footer {\n display: none;\n}\n.footer .actions {\n display: flex;\n align-self: flex-end;\n gap: 8px;\n}\n\n.dismiss-button {\n flex-shrink: 0;\n grid-column: -2/-1;\n grid-row: 1/-1;\n margin-block-start: -8px;\n margin-inline-end: -8px;\n margin-inline-start: 4px;\n}\n\n.headline {\n font: var(--vvd-typography-heading-4);\n}\n\n.subtitle {\n font: var(--vvd-typography-base);\n}\n\nslot[name=main] {\n display: block;\n overflow: hidden auto;\n max-width: inherit;\n max-height: inherit;\n border-radius: inherit;\n}";
13
-
14
- var _Dialog_instances, _Dialog_modal, _Dialog_dialogElement, _Dialog_dialog_get, _Dialog_handleScrimClick, _Dialog_handleInternalFormSubmit, _Dialog_handleModal;
15
- const isDialogSupported = Boolean(HTMLDialogElement && HTMLDialogElement.prototype.showModal);
16
- let dialogPolyfill;
17
- (async () => {
18
- if (!isDialogSupported) {
19
- delete window.HTMLDialogElement;
20
- dialogPolyfill = await import('./dialog-polyfill.esm.js');
21
- }
22
- })();
23
- class Dialog extends FoundationElement {
7
+ var __defProp = Object.defineProperty;
8
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
9
+ var __decorateClass = (decorators, target, key, kind) => {
10
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
11
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
12
+ if (decorator = decorators[i])
13
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
14
+ if (kind && result)
15
+ __defProp(target, key, result);
16
+ return result;
17
+ };
18
+ class Header extends FoundationElement {
24
19
  constructor() {
25
20
  super(...arguments);
26
- _Dialog_instances.add(this);
27
- this.open = false;
28
- this.fullWidthBody = false;
29
- this.ariaLabelledBy = null;
30
- this.ariaLabel = null;
31
- this.ariaDescribedBy = null;
32
- _Dialog_modal.set(this, false);
33
- _Dialog_dialogElement.set(this, void 0);
34
- _Dialog_handleScrimClick.set(this, event => {
35
- if (event.target !== __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get)) {
36
- return;
37
- }
38
- const rect = __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).getBoundingClientRect();
39
- const clickedInDialog = rect.top <= event.clientY && event.clientY <= rect.top + rect.height && rect.left <= event.clientX && event.clientX <= rect.left + rect.width;
40
- this.open = clickedInDialog;
41
- });
42
- _Dialog_handleInternalFormSubmit.set(this, event => {
43
- if (event.target.method !== 'dialog') {
44
- return;
45
- }
46
- this.open = false;
47
- });
48
- }
49
- set returnValue(value) {
50
- __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).returnValue = value;
51
- }
52
- get returnValue() {
53
- var _a;
54
- return (_a = __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get)) === null || _a === void 0 ? void 0 : _a.returnValue;
55
- }
56
- get modal() {
57
- return __classPrivateFieldGet(this, _Dialog_modal, "f");
58
- }
59
- openChanged(oldValue, newValue) {
60
- if (oldValue === undefined) {
61
- return;
62
- }
63
- if (!newValue) {
64
- this.close();
65
- } else {
66
- if (__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get)) {
67
- __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).open = true;
68
- }
69
- }
70
- }
71
- close() {
72
- if (__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).open) {
73
- __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).close();
74
- this.$emit('close', this.returnValue, {
75
- bubbles: false
76
- });
77
- }
78
- this.open = false;
79
- __classPrivateFieldGet(this, _Dialog_instances, "m", _Dialog_handleModal).call(this, false);
80
- }
81
- show() {
82
- __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).show();
83
- this.open = true;
84
- }
85
- showModal() {
86
- __classPrivateFieldGet(this, _Dialog_instances, "m", _Dialog_handleModal).call(this, true);
87
- __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).showModal();
88
- this.open = true;
89
- }
90
- connectedCallback() {
91
- super.connectedCallback();
92
- __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).addEventListener('click', __classPrivateFieldGet(this, _Dialog_handleScrimClick, "f"));
93
- __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).addEventListener('submit', __classPrivateFieldGet(this, _Dialog_handleInternalFormSubmit, "f"));
94
- }
95
- disconnectedCallback() {
96
- super.disconnectedCallback();
97
- __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).removeEventListener('click', __classPrivateFieldGet(this, _Dialog_handleScrimClick, "f"));
98
- __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).removeEventListener('submit', __classPrivateFieldGet(this, _Dialog_handleInternalFormSubmit, "f"));
21
+ this.elevationShadow = false;
22
+ this.alternate = false;
99
23
  }
100
24
  }
101
- _Dialog_modal = new WeakMap(), _Dialog_dialogElement = new WeakMap(), _Dialog_handleScrimClick = new WeakMap(), _Dialog_handleInternalFormSubmit = new WeakMap(), _Dialog_instances = new WeakSet(), _Dialog_dialog_get = function _Dialog_dialog_get() {
102
- if (!__classPrivateFieldGet(this, _Dialog_dialogElement, "f")) {
103
- __classPrivateFieldSet(this, _Dialog_dialogElement, this.shadowRoot.querySelector('dialog'), "f");
104
- if (__classPrivateFieldGet(this, _Dialog_dialogElement, "f")) {
105
- __classPrivateFieldGet(this, _Dialog_dialogElement, "f").open = this.open;
106
- if (dialogPolyfill) {
107
- dialogPolyfill.registerDialog(__classPrivateFieldGet(this, _Dialog_dialogElement, "f"));
108
- }
109
- }
110
- }
111
- return __classPrivateFieldGet(this, _Dialog_dialogElement, "f");
112
- }, _Dialog_handleModal = function _Dialog_handleModal(show) {
113
- __classPrivateFieldSet(this, _Dialog_modal, show, "f");
114
- __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).toggleAttribute('aria-modal', show);
115
- __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).classList.toggle('modal', show);
116
- };
117
- __decorate([attr({
118
- mode: 'boolean'
119
- }), __metadata("design:type", Object)], Dialog.prototype, "open", void 0);
120
- __decorate([attr, __metadata("design:type", String)], Dialog.prototype, "icon", void 0);
121
- __decorate([attr({
122
- attribute: 'icon-placement'
123
- }), __metadata("design:type", String)], Dialog.prototype, "iconPlacement", void 0);
124
- __decorate([attr, __metadata("design:type", String)], Dialog.prototype, "subtitle", void 0);
125
- __decorate([attr, __metadata("design:type", String)], Dialog.prototype, "headline", void 0);
126
- __decorate([attr({
127
- attribute: 'full-width-body',
128
- mode: 'boolean'
129
- }), __metadata("design:type", Object)], Dialog.prototype, "fullWidthBody", void 0);
130
- __decorate([attr({
131
- attribute: 'aria-labelledby'
132
- }), __metadata("design:type", Object)], Dialog.prototype, "ariaLabelledBy", void 0);
133
- __decorate([attr({
134
- attribute: 'aria-label'
135
- }), __metadata("design:type", Object)], Dialog.prototype, "ariaLabel", void 0);
136
- __decorate([attr({
137
- attribute: 'aria-describedby'
138
- }), __metadata("design:type", Object)], Dialog.prototype, "ariaDescribedBy", void 0);
139
- __decorate([observable, __metadata("design:type", Array)], Dialog.prototype, "bodySlottedContent", void 0);
140
- __decorate([observable, __metadata("design:type", Array)], Dialog.prototype, "footerSlottedContent", void 0);
141
- __decorate([observable, __metadata("design:type", Array)], Dialog.prototype, "actionItemsSlottedContent", void 0);
25
+ __decorateClass([
26
+ attr({
27
+ attribute: "elevation-shadow",
28
+ mode: "boolean"
29
+ })
30
+ ], Header.prototype, "elevationShadow", 2);
31
+ __decorateClass([
32
+ attr({
33
+ mode: "boolean"
34
+ })
35
+ ], Header.prototype, "alternate", 2);
142
36
 
143
- const getClasses = ({
144
- iconPlacement,
145
- bodySlottedContent,
146
- footerSlottedContent,
147
- actionItemsSlottedContent
148
- }) => classNames('base', [`icon-placement-${iconPlacement}`, Boolean(iconPlacement)], ['hide-body', !(bodySlottedContent === null || bodySlottedContent === void 0 ? void 0 : bodySlottedContent.length)], ['hide-footer', !((footerSlottedContent === null || footerSlottedContent === void 0 ? void 0 : footerSlottedContent.length) || (actionItemsSlottedContent === null || actionItemsSlottedContent === void 0 ? void 0 : actionItemsSlottedContent.length))]);
149
- function icon(iconTag) {
150
- return html`
151
- <${iconTag} class="icon" name="${x => x.icon}"></${iconTag}>
152
- `;
153
- }
154
- function headline() {
155
- return html`
156
- <div class="headline">
157
- ${x => x.headline}
158
- </div>
159
- `;
160
- }
161
- function subtitle() {
162
- return html`
163
- <div class="subtitle">
164
- ${x => x.subtitle}
165
- </div>
166
- `;
167
- }
168
- function renderDismissButton(buttonTag) {
169
- return html`
170
- <${buttonTag}
171
- size="condensed"
172
- class="dismiss-button"
173
- icon="close-line"
174
- @click="${x => {
175
- x.open = false;
176
- }}">
177
- </${buttonTag}>`;
178
- }
179
- function handleEscapeKey(dialog, event) {
180
- if (event.key === 'Escape' && dialog.modal) {
181
- dialog.open = false;
182
- }
183
- return true;
184
- }
185
- const DialogTemplate = context => {
37
+ const getPartAlternate = ({ alternate }) => classNames(
38
+ ["vvd-theme-alternate", Boolean(alternate)]
39
+ );
40
+ const headerTemplate = (context) => {
186
41
  const elevationTag = context.tagFor(Elevation);
187
- const iconTag = context.tagFor(Icon);
188
- const buttonTag = context.tagFor(Button);
189
42
  return html`
190
- <${elevationTag} dp="8">
191
- <dialog class="${getClasses}"
192
- @keydown="${(x, c) => handleEscapeKey(x, c.event)}"
193
- returnValue="${x => x.returnValue}"
194
- aria-labelledby="${x => x.ariaLabelledBy}"
195
- aria-label="${x => x.ariaLabel}"
196
- aria-describedby="${x => x.ariaDescribedBy}"
197
- >
198
- <slot name="main">
199
- <div class="main-wrapper">
200
- <div class="header ${x => x.subtitle ? 'border' : ''}">
201
- <slot name="graphic">
202
- ${when(x => x.icon, icon(iconTag))}
203
- </slot>
204
- ${when(x => x.headline, headline())}
205
- ${when(x => x.subtitle, subtitle())}
206
- ${renderDismissButton(buttonTag)}
207
- </div>
208
- <div class="body ${x => x.fullWidthBody ? 'full-width' : ''}" >
209
- <slot name="body" ${slotted('bodySlottedContent')}></slot>
210
- </div>
211
- <div class="footer">
212
- <div>
213
- <slot name="footer" ${slotted('footerSlottedContent')}></slot>
214
- </div>
215
- <div class="actions">
216
- <slot name="action-items" ${slotted('actionItemsSlottedContent')}></slot>
217
- </div>
218
- </div>
219
- </div>
220
- </slot>
221
- </dialog>
222
- </${elevationTag}>`;
43
+ <${elevationTag} dp="4" ?no-shadow=${(x) => !x.elevationShadow}>
44
+ <header class="base" part="base">
45
+ <!-- a container is needed to distinguish the surface background color of the
46
+ element from its shadow when applying elevation with alternate -->
47
+ <div class="container" part="${getPartAlternate}">
48
+ <section class="header-content">
49
+ <slot></slot>
50
+ </section>
51
+ <section class="header-content">
52
+ <slot name="action-items"></slot>
53
+ </section>
54
+ </div>
55
+ </header>
56
+ </${elevationTag}>
57
+ <div class="app-content">
58
+ <slot name="app-content"></slot>
59
+ </div>
60
+ `;
223
61
  };
224
62
 
225
- const dialogDefinition = Dialog.compose({
226
- baseName: 'dialog',
227
- template: DialogTemplate,
228
- styles: isDialogSupported ? [css_248z] : [css_248z, css_248z$1]
63
+ const headerDefinition = Header.compose({
64
+ baseName: "header",
65
+ template: headerTemplate,
66
+ styles
229
67
  });
230
- const dialogRegistries = [dialogDefinition(), ...iconRegistries, ...buttonRegistries, ...elevationRegistries];
231
- const registerDialog = registerFactory(dialogRegistries);
68
+ const headerRegistries = [headerDefinition(), ...elevationRegistries];
69
+ const registerHeader = registerFactory(headerRegistries);
232
70
 
233
- export { dialogRegistries as a, dialogDefinition as d, registerDialog as r };
71
+ export { headerRegistries as a, headerDefinition as h, registerHeader as r };
@@ -1,76 +1,35 @@
1
- import { F as FoundationElement, _ as __decorate, a as attr, h as html, r as registerFactory } from './index.js';
2
- import { O as Orientation } from './aria.js';
1
+ import { h as html, r as registerFactory } from './index.js';
2
+ import { I as Icon } from './icon.js';
3
3
  import { c as classNames } from './class-names.js';
4
+ import { w as when } from './when.js';
4
5
 
5
- /**
6
- * Divider roles
7
- * @public
8
- */
9
- const DividerRole = {
10
- /**
11
- * The divider semantically separates content
12
- */
13
- separator: "separator",
14
- /**
15
- * The divider has no semantic value and is for visual presentation only.
16
- */
17
- presentation: "presentation",
18
- };
6
+ const styles = ":host {\n display: inline-block;\n vertical-align: sub;\n}\n\n.control {\n display: flex;\n margin: unset;\n block-size: var(--_icon-block-size);\n color: currentColor;\n contain: strict;\n inline-size: var(--_icon-block-size);\n}\n.control.connotation-accent {\n /* @cssprop [--vvd-icon-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-icon-accent-primary, var(--vvd-color-canvas-text));\n}\n.control.connotation-announcement {\n /* @cssprop [--vvd-icon-announcement-primary=var(--vvd-color-announcement-500)] */\n --_connotation-color-primary: var(--vvd-icon-announcement-primary, var(--vvd-color-announcement-500));\n}\n.control.connotation-cta {\n /* @cssprop [--vvd-icon-cta-primary=var(--vvd-color-cta-500)] */\n --_connotation-color-primary: var(--vvd-icon-cta-primary, var(--vvd-color-cta-500));\n}\n.control.connotation-success {\n /* @cssprop [--vvd-icon-success-primary=var(--vvd-color-success-500)] */\n --_connotation-color-primary: var(--vvd-icon-success-primary, var(--vvd-color-success-500));\n}\n.control.connotation-alert {\n /* @cssprop [--vvd-icon-alert-primary=var(--vvd-color-alert-500)] */\n --_connotation-color-primary: var(--vvd-icon-alert-primary, var(--vvd-color-alert-500));\n}\n.control.connotation-information {\n /* @cssprop [--vvd-icon-information-primary=var(--vvd-color-information-500)] */\n --_connotation-color-primary: var(--vvd-icon-information-primary, var(--vvd-color-information-500));\n}\n.control.size--6 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.size--5 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 20));\n}\n.control.size--4 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.size--3 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 12));\n}\n.control.size--2 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.control.size--1 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 4));\n}\n.control.size-0 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n}\n.control.size-1 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 4));\n}\n.control.size-2 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 8));\n}\n.control.size-3 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 12));\n}\n.control.size-4 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 16));\n}\n.control.size-5 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 20));\n}\n.control:not(.size--6, .size--5, .size--4, .size--3, .size--2, .size--1, .size-0, .size-1, .size-2, .size-3, .size-4, .size-5) {\n --_icon-block-size: 1em;\n}\n\n.control[class*=connotation] {\n color: var(--_connotation-color-primary);\n}\n\nslot, svg, ::slotted(:where(svg, img)) {\n margin: auto;\n block-size: inherit;\n inline-size: inherit;\n}";
19
7
 
20
- /**
21
- * A Divider Custom HTML Element.
22
- * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#separator | ARIA separator } or {@link https://www.w3.org/TR/wai-aria-1.1/#presentation | ARIA presentation}.
23
- *
24
- * @public
25
- */
26
- class Divider$1 extends FoundationElement {
27
- constructor() {
28
- super(...arguments);
29
- /**
30
- * The role of the element.
31
- *
32
- * @public
33
- * @remarks
34
- * HTML Attribute: role
35
- */
36
- this.role = DividerRole.separator;
37
- /**
38
- * The orientation of the divider.
39
- *
40
- * @public
41
- * @remarks
42
- * HTML Attribute: orientation
43
- */
44
- this.orientation = Orientation.horizontal;
45
- }
46
- }
47
- __decorate([
48
- attr
49
- ], Divider$1.prototype, "role", void 0);
50
- __decorate([
51
- attr
52
- ], Divider$1.prototype, "orientation", void 0);
53
-
54
- var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 17 Aug 2023 11:13:18 GMT\n */\n:host {\n display: block;\n}\n\n.base {\n display: block;\n background-color: var(--vvd-color-neutral-200);\n}\n.base:not(.vertical) {\n block-size: 1px;\n inline-size: 100%;\n}\n.base.vertical {\n block-size: 100%;\n inline-size: 1px;\n}";
8
+ const getClasses = ({
9
+ connotation,
10
+ size
11
+ }) => classNames(
12
+ "control",
13
+ [`connotation-${connotation}`, Boolean(connotation)],
14
+ [`size-${size}`, Boolean(size)]
15
+ );
16
+ const iconTemplate = () => html`
55
17
 
56
- class Divider extends Divider$1 {}
18
+ <figure class="${getClasses}">
19
+ <slot>
20
+ ${when((x) => !x.iconLoaded, html`<img alt="${(x) => x.name}" src="${(x) => x.iconUrl}"/>`)}
21
+ ${when((x) => x.iconLoaded && x._svg, (x) => html`${x._svg}`)}
22
+ </slot>
23
+ </figure>
57
24
 
58
- const getClasses = ({
59
- orientation
60
- }) => classNames('base', [`${orientation}`, Boolean(orientation)]);
61
- const DividerTemplate = () => html`
62
- <span
63
- class="${getClasses}"
64
- orientation="${x => x.orientation}"
65
- role="${x => x.role}"
66
- ></span>`;
25
+ `;
67
26
 
68
- const dividerDefinition = Divider.compose({
69
- baseName: 'divider',
70
- template: DividerTemplate,
71
- styles: css_248z
27
+ const iconDefinition = Icon.compose({
28
+ baseName: "icon",
29
+ template: iconTemplate,
30
+ styles
72
31
  });
73
- const dividerRegistries = [dividerDefinition()];
74
- const registerDivider = registerFactory(dividerRegistries);
32
+ const iconRegistries = [iconDefinition()];
33
+ const registerIcon = registerFactory(iconRegistries);
75
34
 
76
- export { Divider as D, dividerDefinition as a, dividerRegistries as d, registerDivider as r };
35
+ export { iconRegistries as a, iconDefinition as i, registerIcon as r };
@@ -1,46 +1,62 @@
1
- import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, o as observable, h as html, r as registerFactory } from './index.js';
2
- import { i as iconRegistries } from './definition3.js';
3
- import { I as Icon } from './icon.js';
4
- import { w as when } from './when.js';
5
- import { s as slotted } from './slotted.js';
1
+ import { a as attr, F as FoundationElement, h as html, r as registerFactory } from './index.js';
6
2
  import { c as classNames } from './class-names.js';
7
3
 
8
- var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 17 Aug 2023 11:13:18 GMT\n */\n:host {\n display: block;\n}\n\n.base {\n display: flex;\n box-sizing: border-box;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n block-size: 100%;\n gap: 24px;\n}\n\n.icon-container {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--vvd-color-neutral-100);\n block-size: 120px;\n border-radius: 50%;\n inline-size: 120px;\n}\n\n.content {\n display: flex;\n flex-direction: column;\n font: var(--vvd-typography-base);\n gap: 8px;\n text-align: center;\n}\n\nheader {\n font: var(--vvd-typography-base-bold);\n}\n\n.actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n gap: 8px;\n}\n.base.no-actions .actions {\n display: none;\n}";
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __decorateClass = (decorators, target, key, kind) => {
7
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
8
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
9
+ if (decorator = decorators[i])
10
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
11
+ if (kind && result)
12
+ __defProp(target, key, result);
13
+ return result;
14
+ };
15
+ class Layout extends FoundationElement {
16
+ }
17
+ __decorateClass([
18
+ attr
19
+ ], Layout.prototype, "gutters", 2);
20
+ __decorateClass([
21
+ attr({ attribute: "column-basis" })
22
+ ], Layout.prototype, "columnBasis", 2);
23
+ __decorateClass([
24
+ attr({ attribute: "column-spacing" })
25
+ ], Layout.prototype, "columnSpacing", 2);
26
+ __decorateClass([
27
+ attr({ attribute: "row-spacing" })
28
+ ], Layout.prototype, "rowSpacing", 2);
29
+ __decorateClass([
30
+ attr({ attribute: "auto-sizing" })
31
+ ], Layout.prototype, "autoSizing", 2);
9
32
 
10
- class EmptyState extends FoundationElement {}
11
- __decorate([attr, __metadata("design:type", String)], EmptyState.prototype, "headline", void 0);
12
- __decorate([attr, __metadata("design:type", String)], EmptyState.prototype, "icon", void 0);
13
- __decorate([observable, __metadata("design:type", Array)], EmptyState.prototype, "slottedActionItems", void 0);
33
+ const styles = "/* #region SIZEs */\n/* #region BASES */\n/* #region SPACES */\n.control {\n display: grid;\n grid-auto-rows: var(--layout-grid-template-rows, min-content);\n}\n.control.column-basis-small {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(160px, 1fr)));\n}\n.control:not(.column-basis-small):not(.column-basis-medium):not(.column-basis-large):not(.column-basis-block), .control.column-basis-medium {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(320px, 1fr)));\n}\n.control.column-basis-large {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(380px, 1fr)));\n}\n.control.column-basis-block {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(1fr, 1fr)));\n}\n.control.column-spacing-small {\n column-gap: var(--layout-column-gap, calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))));\n}\n.control.column-spacing-small-inline {\n column-gap: var(--layout-column-gap, 0 calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))));\n}\n.control.column-spacing-small-block {\n column-gap: var(--layout-column-gap, calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))) 0);\n}\n.control:not(.column-spacing-small):not(.column-spacing-small-inline):not(.column-spacing-small-block):not(.column-spacing-medium):not(.column-spacing-medium-inline):not(.column-spacing-medium-block):not(.column-spacing-large):not(.column-spacing-large-inline):not(.column-spacing-large-block), .control.column-spacing-medium {\n column-gap: var(--layout-column-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.column-spacing-medium-inline {\n column-gap: var(--layout-column-gap, 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.column-spacing-medium-block {\n column-gap: var(--layout-column-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)) 0);\n}\n.control.column-spacing-large {\n column-gap: var(--layout-column-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)));\n}\n.control.column-spacing-large-inline {\n column-gap: var(--layout-column-gap, 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)));\n}\n.control.column-spacing-large-block {\n column-gap: var(--layout-column-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)) 0);\n}\n.control.row-spacing-small {\n row-gap: var(--layout-row-gap, calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))));\n}\n.control.row-spacing-small-inline {\n row-gap: var(--layout-row-gap, 0 calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))));\n}\n.control.row-spacing-small-block {\n row-gap: var(--layout-row-gap, calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))) 0);\n}\n.control:not(.row-spacing-small):not(.row-spacing-small-inline):not(.row-spacing-small-block):not(.row-spacing-medium):not(.row-spacing-medium-inline):not(.row-spacing-medium-block):not(.row-spacing-large):not(.row-spacing-large-inline):not(.row-spacing-large-block), .control.row-spacing-medium {\n row-gap: var(--layout-row-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.row-spacing-medium-inline {\n row-gap: var(--layout-row-gap, 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.row-spacing-medium-block {\n row-gap: var(--layout-row-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)) 0);\n}\n.control.row-spacing-large {\n row-gap: var(--layout-row-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)));\n}\n.control.row-spacing-large-inline {\n row-gap: var(--layout-row-gap, 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)));\n}\n.control.row-spacing-large-block {\n row-gap: var(--layout-row-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)) 0);\n}\n.control.gutters-small {\n margin: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.gutters-small-inline {\n margin: 0 calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.gutters-small-block {\n margin: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))) 0;\n}\n.control.gutters-medium {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.gutters-medium-inline {\n margin: 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.gutters-medium-block {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)) 0;\n}\n.control.gutters-large {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.control.gutters-large-inline {\n margin: 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.control.gutters-large-block {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)) 0;\n}\n.control.auto-sizing-fill {\n --_auto-sizing: auto-fill;\n}\n.control:not(.auto-sizing-fill):not(.auto-sizing-fit), .control.auto-sizing-fit {\n --_auto-sizing: auto-fit;\n}";
14
34
 
15
- const getClasses = x => {
16
- var _a;
17
- return classNames('base', ['no-actions', ((_a = x.slottedActionItems) === null || _a === void 0 ? void 0 : _a.length) === 0]);
18
- };
19
- const EmptyStateTemplate = context => {
20
- const iconTag = context.tagFor(Icon);
21
- return html`
22
- <div class="${getClasses}">
23
- <slot name="graphic">
24
- ${when(x => x.icon, html`<div class="icon-container">
25
- <${iconTag} class="icon" name="${x => x.icon}" size="5"></${iconTag}>
26
- </div>`)}
27
- </slot>
28
- <div class="content">
29
- ${when(x => x.headline, html`<header>${x => x.headline}</header>`)}
30
- <slot></slot>
31
- </div>
32
- <div class="actions">
33
- <slot name="action-items" ${slotted('slottedActionItems')}></slot>
34
- </div>
35
+ const getClasses = ({
36
+ columnBasis,
37
+ gutters,
38
+ columnSpacing,
39
+ autoSizing,
40
+ rowSpacing
41
+ }) => classNames(
42
+ "control",
43
+ [`column-basis-${columnBasis}`, Boolean(columnBasis)],
44
+ [`gutters-${gutters}`, Boolean(gutters)],
45
+ [`column-spacing-${columnSpacing}`, Boolean(columnSpacing)],
46
+ [`row-spacing-${rowSpacing ? rowSpacing : columnSpacing}`, Boolean(rowSpacing) || Boolean(columnSpacing)],
47
+ [`auto-sizing-${autoSizing}`, Boolean(autoSizing)]
48
+ );
49
+ const layoutTemplate = () => html`
50
+ <div class="${getClasses}">
51
+ <slot></slot>
35
52
  </div>`;
36
- };
37
53
 
38
- const emptyStateDefinition = EmptyState.compose({
39
- baseName: 'empty-state',
40
- template: EmptyStateTemplate,
41
- styles: css_248z
54
+ const layoutDefinition = Layout.compose({
55
+ baseName: "layout",
56
+ template: layoutTemplate,
57
+ styles
42
58
  });
43
- const emptyStateRegistries = [emptyStateDefinition(), ...iconRegistries];
44
- const registerEmptyState = registerFactory(emptyStateRegistries);
59
+ const layoutRegistries = [layoutDefinition()];
60
+ const registerLayout = registerFactory(layoutRegistries);
45
61
 
46
- export { emptyStateRegistries as a, emptyStateDefinition as e, registerEmptyState as r };
62
+ export { layoutRegistries as a, layoutDefinition as l, registerLayout as r };