@francofantomius/material-components 1.0.2 → 1.1.1

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 (168) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +41 -9
  3. package/custom-elements.json +19060 -9017
  4. package/dist/chunks/account-menu-Dau0UHTl.js +1290 -0
  5. package/dist/chunks/account-menu-Dau0UHTl.js.map +1 -0
  6. package/dist/chunks/app-drawer-Du1ePzxZ.js +903 -0
  7. package/dist/chunks/app-drawer-Du1ePzxZ.js.map +1 -0
  8. package/dist/chunks/bottom-sheet-q79BBYAj.js +402 -0
  9. package/dist/chunks/bottom-sheet-q79BBYAj.js.map +1 -0
  10. package/dist/chunks/{button-B4TSZ7Sl.js → button-D2vn7kJ8.js} +9 -8
  11. package/dist/chunks/button-D2vn7kJ8.js.map +1 -0
  12. package/dist/chunks/button-group-CNqvJx1n.js +143 -0
  13. package/dist/chunks/button-group-CNqvJx1n.js.map +1 -0
  14. package/dist/chunks/carousel-item-BG6kjjjk.js +371 -0
  15. package/dist/chunks/carousel-item-BG6kjjjk.js.map +1 -0
  16. package/dist/chunks/date-picker-DJeHi4w-.js +777 -0
  17. package/dist/chunks/date-picker-DJeHi4w-.js.map +1 -0
  18. package/dist/chunks/fab-menu.css-3pu930sZ.js +320 -0
  19. package/dist/chunks/fab-menu.css-3pu930sZ.js.map +1 -0
  20. package/dist/chunks/{icon-button-BdSc7eot.js → icon-button-BQz73GLa.js} +2 -2
  21. package/dist/chunks/icon-button-BQz73GLa.js.map +1 -0
  22. package/dist/chunks/loading-indicator-CvWnZr9o.js +193 -0
  23. package/dist/chunks/loading-indicator-CvWnZr9o.js.map +1 -0
  24. package/dist/chunks/menu-item-BBSp5Cqc.js +390 -0
  25. package/dist/chunks/menu-item-BBSp5Cqc.js.map +1 -0
  26. package/dist/chunks/navigation-bar-item-C9DfOEzg.js +397 -0
  27. package/dist/chunks/navigation-bar-item-C9DfOEzg.js.map +1 -0
  28. package/dist/chunks/navigation-rail-item-6pdhNHJK.js +357 -0
  29. package/dist/chunks/navigation-rail-item-6pdhNHJK.js.map +1 -0
  30. package/dist/chunks/{search-bar-TXnqJ-gd.js → search-bar-fUD0qU2P.js} +22 -4
  31. package/dist/chunks/search-bar-fUD0qU2P.js.map +1 -0
  32. package/dist/chunks/segmented-button-B0BvGSQ7.js +265 -0
  33. package/dist/chunks/segmented-button-B0BvGSQ7.js.map +1 -0
  34. package/dist/chunks/side-sheet-S2w081AK.js +360 -0
  35. package/dist/chunks/side-sheet-S2w081AK.js.map +1 -0
  36. package/dist/chunks/slider-D-mnO8yQ.js +450 -0
  37. package/dist/chunks/slider-D-mnO8yQ.js.map +1 -0
  38. package/dist/chunks/split-button-DUfjukQY.js +450 -0
  39. package/dist/chunks/split-button-DUfjukQY.js.map +1 -0
  40. package/dist/chunks/{table-aRTYzDyE.js → table-CqHnneAj.js} +2 -2
  41. package/dist/chunks/{table-aRTYzDyE.js.map → table-CqHnneAj.js.map} +1 -1
  42. package/dist/chunks/time-picker-CZnb2sWz.js +785 -0
  43. package/dist/chunks/time-picker-CZnb2sWz.js.map +1 -0
  44. package/dist/chunks/toolbar-DXVQbQKJ.js +271 -0
  45. package/dist/chunks/toolbar-DXVQbQKJ.js.map +1 -0
  46. package/dist/chunks/tooltip-CE7JMHMu.js +398 -0
  47. package/dist/chunks/tooltip-CE7JMHMu.js.map +1 -0
  48. package/dist/components/account-menu/account-menu.js +8 -0
  49. package/dist/components/app-drawer/app-drawer.js +9 -0
  50. package/dist/components/bottom-sheet/bottom-sheet.css.d.ts +2 -0
  51. package/dist/components/bottom-sheet/bottom-sheet.css.d.ts.map +1 -0
  52. package/dist/components/bottom-sheet/bottom-sheet.d.ts +69 -0
  53. package/dist/components/bottom-sheet/bottom-sheet.d.ts.map +1 -0
  54. package/dist/components/bottom-sheet/bottom-sheet.js +4 -0
  55. package/dist/components/button/button.css.d.ts.map +1 -1
  56. package/dist/components/button/button.js +1 -1
  57. package/dist/components/button-group/button-group.css.d.ts +2 -0
  58. package/dist/components/button-group/button-group.css.d.ts.map +1 -0
  59. package/dist/components/button-group/button-group.d.ts +28 -0
  60. package/dist/components/button-group/button-group.d.ts.map +1 -0
  61. package/dist/components/button-group/button-group.js +4 -0
  62. package/dist/components/carousel/carousel-item.d.ts +33 -0
  63. package/dist/components/carousel/carousel-item.d.ts.map +1 -0
  64. package/dist/components/carousel/carousel-item.js +4 -0
  65. package/dist/components/carousel/carousel.css.d.ts +3 -0
  66. package/dist/components/carousel/carousel.css.d.ts.map +1 -0
  67. package/dist/components/carousel/carousel.d.ts +81 -0
  68. package/dist/components/carousel/carousel.d.ts.map +1 -0
  69. package/dist/components/carousel/carousel.js +284 -0
  70. package/dist/components/carousel/carousel.js.map +1 -0
  71. package/dist/components/date-picker/date-picker.css.d.ts +2 -0
  72. package/dist/components/date-picker/date-picker.css.d.ts.map +1 -0
  73. package/dist/components/date-picker/date-picker.d.ts +59 -0
  74. package/dist/components/date-picker/date-picker.d.ts.map +1 -0
  75. package/dist/components/date-picker/date-picker.js +4 -0
  76. package/dist/components/fab-menu/fab-menu-item.d.ts +35 -0
  77. package/dist/components/fab-menu/fab-menu-item.d.ts.map +1 -0
  78. package/dist/components/fab-menu/fab-menu-item.js +93 -0
  79. package/dist/components/fab-menu/fab-menu-item.js.map +1 -0
  80. package/dist/components/fab-menu/fab-menu.css.d.ts +3 -0
  81. package/dist/components/fab-menu/fab-menu.css.d.ts.map +1 -0
  82. package/dist/components/fab-menu/fab-menu.d.ts +72 -0
  83. package/dist/components/fab-menu/fab-menu.d.ts.map +1 -0
  84. package/dist/components/fab-menu/fab-menu.js +148 -0
  85. package/dist/components/fab-menu/fab-menu.js.map +1 -0
  86. package/dist/components/icon-button/icon-button.js +1 -1
  87. package/dist/components/loading-indicator/loading-indicator.css.d.ts +2 -0
  88. package/dist/components/loading-indicator/loading-indicator.css.d.ts.map +1 -0
  89. package/dist/components/loading-indicator/loading-indicator.d.ts +48 -0
  90. package/dist/components/loading-indicator/loading-indicator.d.ts.map +1 -0
  91. package/dist/components/loading-indicator/loading-indicator.js +4 -0
  92. package/dist/components/menu/menu-item.d.ts +41 -0
  93. package/dist/components/menu/menu-item.d.ts.map +1 -0
  94. package/dist/components/menu/menu-item.js +4 -0
  95. package/dist/components/menu/menu.css.d.ts +3 -0
  96. package/dist/components/menu/menu.css.d.ts.map +1 -0
  97. package/dist/components/menu/menu.d.ts +91 -0
  98. package/dist/components/menu/menu.d.ts.map +1 -0
  99. package/dist/components/menu/menu.js +205 -0
  100. package/dist/components/menu/menu.js.map +1 -0
  101. package/dist/components/navigation-bar/navigation-bar-item.d.ts +49 -0
  102. package/dist/components/navigation-bar/navigation-bar-item.d.ts.map +1 -0
  103. package/dist/components/navigation-bar/navigation-bar-item.js +5 -0
  104. package/dist/components/navigation-bar/navigation-bar.css.d.ts +3 -0
  105. package/dist/components/navigation-bar/navigation-bar.css.d.ts.map +1 -0
  106. package/dist/components/navigation-bar/navigation-bar.d.ts +50 -0
  107. package/dist/components/navigation-bar/navigation-bar.d.ts.map +1 -0
  108. package/dist/components/navigation-bar/navigation-bar.js +150 -0
  109. package/dist/components/navigation-bar/navigation-bar.js.map +1 -0
  110. package/dist/components/navigation-rail/navigation-rail-item.d.ts +36 -0
  111. package/dist/components/navigation-rail/navigation-rail-item.d.ts.map +1 -0
  112. package/dist/components/navigation-rail/navigation-rail-item.js +5 -0
  113. package/dist/components/navigation-rail/navigation-rail.css.d.ts +3 -0
  114. package/dist/components/navigation-rail/navigation-rail.css.d.ts.map +1 -0
  115. package/dist/components/navigation-rail/navigation-rail.d.ts +43 -0
  116. package/dist/components/navigation-rail/navigation-rail.d.ts.map +1 -0
  117. package/dist/components/navigation-rail/navigation-rail.js +121 -0
  118. package/dist/components/navigation-rail/navigation-rail.js.map +1 -0
  119. package/dist/components/search-bar/search-bar.css.d.ts.map +1 -1
  120. package/dist/components/search-bar/search-bar.js +1 -1
  121. package/dist/components/segmented-button/segmented-button.css.d.ts +3 -0
  122. package/dist/components/segmented-button/segmented-button.css.d.ts.map +1 -0
  123. package/dist/components/segmented-button/segmented-button.d.ts +40 -0
  124. package/dist/components/segmented-button/segmented-button.d.ts.map +1 -0
  125. package/dist/components/segmented-button/segmented-button.js +5 -0
  126. package/dist/components/side-sheet/side-sheet.css.d.ts +2 -0
  127. package/dist/components/side-sheet/side-sheet.css.d.ts.map +1 -0
  128. package/dist/components/side-sheet/side-sheet.d.ts +57 -0
  129. package/dist/components/side-sheet/side-sheet.d.ts.map +1 -0
  130. package/dist/components/side-sheet/side-sheet.js +4 -0
  131. package/dist/components/slider/slider.css.d.ts +2 -0
  132. package/dist/components/slider/slider.css.d.ts.map +1 -0
  133. package/dist/components/slider/slider.d.ts +51 -0
  134. package/dist/components/slider/slider.d.ts.map +1 -0
  135. package/dist/components/slider/slider.js +4 -0
  136. package/dist/components/split-button/split-button.css.d.ts +2 -0
  137. package/dist/components/split-button/split-button.css.d.ts.map +1 -0
  138. package/dist/components/split-button/split-button.d.ts +89 -0
  139. package/dist/components/split-button/split-button.d.ts.map +1 -0
  140. package/dist/components/split-button/split-button.js +4 -0
  141. package/dist/components/table/table.js +1 -1
  142. package/dist/components/time-picker/time-picker.css.d.ts +2 -0
  143. package/dist/components/time-picker/time-picker.css.d.ts.map +1 -0
  144. package/dist/components/time-picker/time-picker.d.ts +87 -0
  145. package/dist/components/time-picker/time-picker.d.ts.map +1 -0
  146. package/dist/components/time-picker/time-picker.js +4 -0
  147. package/dist/components/toolbar/toolbar.css.d.ts +2 -0
  148. package/dist/components/toolbar/toolbar.css.d.ts.map +1 -0
  149. package/dist/components/toolbar/toolbar.d.ts +53 -0
  150. package/dist/components/toolbar/toolbar.d.ts.map +1 -0
  151. package/dist/components/toolbar/toolbar.js +4 -0
  152. package/dist/components/tooltip/tooltip.css.d.ts +2 -0
  153. package/dist/components/tooltip/tooltip.css.d.ts.map +1 -0
  154. package/dist/components/tooltip/tooltip.d.ts +89 -0
  155. package/dist/components/tooltip/tooltip.d.ts.map +1 -0
  156. package/dist/components/tooltip/tooltip.js +4 -0
  157. package/dist/index.d.ts +21 -0
  158. package/dist/index.d.ts.map +1 -1
  159. package/dist/index.js +148 -2263
  160. package/dist/tokens/index.js +4 -2
  161. package/dist/tokens/index.js.map +1 -1
  162. package/dist/tokens/theme.css.d.ts.map +1 -1
  163. package/llms.txt +919 -0
  164. package/package.json +97 -1
  165. package/dist/chunks/button-B4TSZ7Sl.js.map +0 -1
  166. package/dist/chunks/icon-button-BdSc7eot.js.map +0 -1
  167. package/dist/chunks/search-bar-TXnqJ-gd.js.map +0 -1
  168. package/dist/index.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-D2vn7kJ8.js","names":[],"sources":["../../src/components/button/button.css.ts","../../src/components/button/button.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const buttonStyles = css`\n :host {\n display: inline-flex;\n outline: none;\n vertical-align: middle;\n -webkit-tap-highlight-color: transparent;\n }\n\n :host([disabled]) {\n pointer-events: none;\n }\n\n button, a {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 100%;\n min-width: 64px;\n height: 40px;\n padding: 0 24px;\n border: none;\n border-radius: var(--md-button-border-radius, var(--md-button-shape, var(--md-sys-shape-corner-full, 9999px)));\n font-family: var(--md-sys-typescale-font-family, inherit);\n font-size: var(--md-sys-typescale-label-large-size, 14px);\n font-weight: 500;\n line-height: 20px;\n letter-spacing: 0.1px;\n text-decoration: none;\n text-align: center;\n cursor: pointer;\n user-select: none;\n outline: none;\n transition: box-shadow 200ms cubic-bezier(0.2, 0, 0, 1),\n background-color 200ms cubic-bezier(0.2, 0, 0, 1),\n color 200ms cubic-bezier(0.2, 0, 0, 1);\n overflow: hidden;\n }\n\n :host([has-icon]) button,\n :host([has-icon]) a {\n padding-left: 16px;\n }\n\n :host([has-trailing-icon]) button,\n :host([has-trailing-icon]) a {\n padding-right: 16px;\n }\n\n /* --- Filled (Default) --- */\n :host(:not([variant])) button,\n :host(:not([variant])) a,\n :host([variant=\"filled\"]) button,\n :host([variant=\"filled\"]) a {\n background-color: var(--md-sys-color-primary, #6750a4);\n color: var(--md-sys-color-on-primary, #ffffff);\n box-shadow: var(--md-sys-elevation-level0, none);\n }\n\n :host([variant=\"filled\"]:hover) button,\n :host([variant=\"filled\"]:hover) a,\n :host(:not([variant]):hover) button,\n :host(:not([variant]):hover) a {\n box-shadow: var(--md-sys-elevation-level1, 0px 1px 3px 1px rgba(0,0,0,0.15));\n }\n\n /* --- Elevated --- */\n :host([variant=\"elevated\"]) button,\n :host([variant=\"elevated\"]) a {\n background-color: var(--md-sys-color-surface-container-low, #f7f2fa);\n color: var(--md-sys-color-primary, #6750a4);\n box-shadow: var(--md-sys-elevation-level1, 0px 1px 3px 1px rgba(0,0,0,0.15));\n }\n\n :host([variant=\"elevated\"]:hover) button,\n :host([variant=\"elevated\"]:hover) a {\n box-shadow: var(--md-sys-elevation-level2, 0px 2px 6px 2px rgba(0,0,0,0.15));\n }\n\n /* --- Filled Tonal --- */\n :host([variant=\"tonal\"]) button,\n :host([variant=\"tonal\"]) a {\n background-color: var(--md-sys-color-secondary-container, #e8def8);\n color: var(--md-sys-color-on-secondary-container, #1d192b);\n box-shadow: var(--md-sys-elevation-level0, none);\n }\n\n :host([variant=\"tonal\"]:hover) button,\n :host([variant=\"tonal\"]:hover) a {\n box-shadow: var(--md-sys-elevation-level1, 0px 1px 3px 1px rgba(0,0,0,0.15));\n }\n\n /* --- Outlined --- */\n :host([variant=\"outlined\"]) button,\n :host([variant=\"outlined\"]) a {\n background-color: transparent;\n color: var(--md-sys-color-primary, #6750a4);\n border: 1px solid var(--md-sys-color-outline, #79747e);\n }\n\n /* --- Text --- */\n :host([variant=\"text\"]) button,\n :host([variant=\"text\"]) a {\n background-color: transparent;\n color: var(--md-sys-color-primary, #6750a4);\n padding: 0 12px;\n }\n\n /* --- Disabled --- */\n :host([disabled]) button,\n :host([disabled]) a {\n cursor: not-allowed;\n box-shadow: none;\n }\n\n :host([disabled]:not([variant=\"outlined\"]):not([variant=\"text\"])) button,\n :host([disabled]:not([variant=\"outlined\"]):not([variant=\"text\"])) a {\n background-color: rgba(29, 27, 32, 0.12);\n color: rgba(29, 27, 32, 0.38);\n }\n\n :host([disabled][variant=\"outlined\"]) button,\n :host([disabled][variant=\"outlined\"]) a {\n border-color: rgba(29, 27, 32, 0.12);\n color: rgba(29, 27, 32, 0.38);\n }\n\n :host([disabled][variant=\"text\"]) button,\n :host([disabled][variant=\"text\"]) a {\n color: rgba(29, 27, 32, 0.38);\n }\n\n .content {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n position: relative;\n z-index: 1;\n }\n\n .spinner {\n width: 18px;\n height: 18px;\n border: 2px solid currentColor;\n border-top-color: transparent;\n border-radius: 50%;\n animation: md-spin 800ms linear infinite;\n }\n\n @keyframes md-spin {\n to {\n transform: rotate(360deg);\n }\n }\n`;\n\n","import { html, nothing } from 'lit';\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js';\nimport { MdBaseElement } from '../../internal/base-component.js';\nimport '../../internal/ripple/ripple.js';\nimport '../../internal/focus-ring/focus-ring.js';\nimport '../icon/icon.js';\nimport { buttonStyles } from './button.css.js';\n\nexport type ButtonVariant = 'filled' | 'elevated' | 'tonal' | 'outlined' | 'text';\n\n@customElement('md-button')\nexport class MdButton extends MdBaseElement {\n static override styles = [MdBaseElement.styles, buttonStyles];\n\n @property({ type: String, reflect: true })\n variant: ButtonVariant = 'filled';\n\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n @property({ type: Boolean, reflect: true })\n loading = false;\n\n @property({ type: String })\n type: 'button' | 'submit' | 'reset' = 'button';\n\n @property({ type: String })\n href = '';\n\n @property({ type: String })\n target = '';\n\n @property({ type: String })\n icon = '';\n\n @property({ type: String, attribute: 'trailing-icon' })\n trailingIcon = '';\n\n @queryAssignedElements({ slot: 'icon' })\n private assignedIcons!: HTMLElement[];\n\n @queryAssignedElements({ slot: 'trailing-icon' })\n private assignedTrailingIcons!: HTMLElement[];\n\n private handleClick = (event: MouseEvent): void => {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopImmediatePropagation();\n return;\n }\n\n if (this.type === 'submit' || this.type === 'reset') {\n const form = this.closest('form');\n if (form) {\n if (this.type === 'submit') {\n form.requestSubmit();\n } else {\n form.reset();\n }\n }\n }\n };\n\n private handleSlotChange(): void {\n const hasLeading = Boolean(this.icon || (this.assignedIcons && this.assignedIcons.length > 0));\n const hasTrailing = Boolean(this.trailingIcon || (this.assignedTrailingIcons && this.assignedTrailingIcons.length > 0));\n\n this.toggleAttribute('has-icon', hasLeading);\n this.toggleAttribute('has-trailing-icon', hasTrailing);\n }\n\n override firstUpdated() {\n this.handleSlotChange();\n }\n\n override render() {\n const content = html`\n <md-ripple ?disabled=${this.disabled || this.loading}></md-ripple>\n <md-focus-ring></md-focus-ring>\n <span class=\"content\">\n ${this.loading\n ? html`<span class=\"spinner\" aria-hidden=\"true\"></span>`\n : html`\n <slot name=\"icon\" @slotchange=${this.handleSlotChange}>\n ${this.icon ? html`<md-icon name=${this.icon}></md-icon>` : nothing}\n </slot>\n `}\n <slot @slotchange=${this.handleSlotChange}></slot>\n ${!this.loading\n ? html`\n <slot name=\"trailing-icon\" @slotchange=${this.handleSlotChange}>\n ${this.trailingIcon ? html`<md-icon name=${this.trailingIcon}></md-icon>` : nothing}\n </slot>\n `\n : nothing}\n </span>\n `;\n\n if (this.href) {\n return html`\n <a\n href=${this.disabled ? nothing : this.href}\n target=${this.target || nothing}\n aria-disabled=${this.disabled ? 'true' : nothing}\n tabindex=${this.disabled ? '-1' : '0'}\n @click=${this.handleClick}\n >\n ${content}\n </a>\n `;\n }\n\n return html`\n <button\n type=${this.type}\n ?disabled=${this.disabled || this.loading}\n @click=${this.handleClick}\n >\n ${content}\n </button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'md-button': MdButton;\n }\n}\n\n"],"mappings":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customElement as p, property as a, queryAssignedElements as f } from "lit/decorators.js";
4
+ var y = c`
5
+ :host {
6
+ display: inline-flex;
7
+ flex-direction: row;
8
+ align-items: center;
9
+ gap: var(--md-button-group-gap, 8px);
10
+ box-sizing: border-box;
11
+ vertical-align: middle;
12
+ }
13
+
14
+ :host([hidden]) {
15
+ display: none;
16
+ }
17
+
18
+ :host([orientation='vertical']) {
19
+ flex-direction: column;
20
+ align-items: stretch;
21
+ }
22
+
23
+ :host([full-width]) {
24
+ display: flex;
25
+ width: 100%;
26
+ }
27
+
28
+ :host([full-width]:not([orientation='vertical'])) ::slotted(*) {
29
+ flex: 1 1 0;
30
+ width: 100%;
31
+ }
32
+
33
+ :host([full-width][orientation='vertical']) ::slotted(*) {
34
+ width: 100%;
35
+ }
36
+
37
+ /* --- Connected Button Group --- */
38
+ :host([connected]) {
39
+ gap: 0;
40
+ }
41
+
42
+ :host([connected]:not([orientation='vertical'])) ::slotted(*:not(:first-child)) {
43
+ margin-inline-start: -1px;
44
+ }
45
+
46
+ :host([connected][orientation='vertical']) ::slotted(*:not(:first-child)) {
47
+ margin-top: -1px;
48
+ }
49
+
50
+ ::slotted(*) {
51
+ position: relative;
52
+ z-index: 0;
53
+ }
54
+
55
+ ::slotted(*:hover),
56
+ ::slotted(*:focus-within),
57
+ ::slotted(*:active) {
58
+ z-index: 1;
59
+ }
60
+
61
+ :host([disabled]) {
62
+ pointer-events: none;
63
+ }
64
+ `, r = class extends h {
65
+ constructor(...i) {
66
+ super(...i), this.orientation = "horizontal", this.connected = !1, this.shape = "pill", this.variant = "", this.fullWidth = !1, this.disabled = !1, this.handleSlotChange = () => {
67
+ this.syncChildren();
68
+ }, this.handleKeyDown = (t) => {
69
+ const e = this.getInteractiveChildren().filter((l) => !l.disabled && !l.hasAttribute("disabled"));
70
+ if (e.length === 0) return;
71
+ const d = document.activeElement, s = e.findIndex((l) => l === d || l.shadowRoot && l.shadowRoot.activeElement === d);
72
+ let o = -1;
73
+ t.key === "ArrowRight" || t.key === "ArrowDown" ? (t.preventDefault(), o = s >= 0 && s < e.length - 1 ? s + 1 : 0) : t.key === "ArrowLeft" || t.key === "ArrowUp" ? (t.preventDefault(), o = s > 0 ? s - 1 : e.length - 1) : t.key === "Home" ? (t.preventDefault(), o = 0) : t.key === "End" && (t.preventDefault(), o = e.length - 1), o !== -1 && e[o] && e[o]?.focus();
74
+ };
75
+ }
76
+ static {
77
+ this.styles = [h.styles, y];
78
+ }
79
+ connectedCallback() {
80
+ super.connectedCallback(), this.hasAttribute("role") || this.setAttribute("role", "group"), this.addEventListener("keydown", this.handleKeyDown);
81
+ }
82
+ disconnectedCallback() {
83
+ super.disconnectedCallback(), this.removeEventListener("keydown", this.handleKeyDown);
84
+ }
85
+ updated(i) {
86
+ super.updated(i), (i.has("connected") || i.has("orientation") || i.has("shape") || i.has("variant") || i.has("disabled")) && this.syncChildren();
87
+ }
88
+ getInteractiveChildren() {
89
+ return this.slottedElements ? this.slottedElements.filter((i) => i.nodeType === Node.ELEMENT_NODE && !i.hasAttribute("slot")) : [];
90
+ }
91
+ syncChildren() {
92
+ const i = this.getInteractiveChildren();
93
+ if (i.length !== 0)
94
+ if (this.disabled && i.forEach((t) => {
95
+ "disabled" in t ? t.disabled = !0 : t.setAttribute("disabled", "");
96
+ }), this.variant && i.forEach((t) => {
97
+ "variant" in t && (t.variant = this.variant);
98
+ }), this.connected) {
99
+ let t = "var(--md-sys-shape-corner-full, 9999px)", e = "var(--md-sys-shape-corner-extra-small, 4px)";
100
+ this.shape === "rounded" ? (t = "var(--md-sys-shape-corner-medium, 12px)", e = "var(--md-sys-shape-corner-extra-small, 4px)") : this.shape === "square" && (t = "var(--md-sys-shape-corner-extra-small, 4px)", e = "0px"), i.length === 1 ? (i[0].style.setProperty("--md-button-border-radius", t), i[0].style.borderRadius = t) : i.forEach((d, s) => {
101
+ let o = "";
102
+ this.orientation === "vertical" ? s === 0 ? o = `${t} ${t} ${e} ${e}` : s === i.length - 1 ? o = `${e} ${e} ${t} ${t}` : o = `${e} ${e} ${e} ${e}` : s === 0 ? o = `${t} ${e} ${e} ${t}` : s === i.length - 1 ? o = `${e} ${t} ${t} ${e}` : o = `${e} ${e} ${e} ${e}`, d.style.setProperty("--md-button-border-radius", o), d.style.borderRadius = o;
103
+ });
104
+ } else i.forEach((t) => {
105
+ t.style.removeProperty("--md-button-border-radius"), t.style.borderRadius = "";
106
+ });
107
+ }
108
+ render() {
109
+ return u`<slot @slotchange=${this.handleSlotChange}></slot>`;
110
+ }
111
+ };
112
+ n([a({
113
+ type: String,
114
+ reflect: !0
115
+ })], r.prototype, "orientation", void 0);
116
+ n([a({
117
+ type: Boolean,
118
+ reflect: !0
119
+ })], r.prototype, "connected", void 0);
120
+ n([a({
121
+ type: String,
122
+ reflect: !0
123
+ })], r.prototype, "shape", void 0);
124
+ n([a({
125
+ type: String,
126
+ reflect: !0
127
+ })], r.prototype, "variant", void 0);
128
+ n([a({
129
+ type: Boolean,
130
+ attribute: "full-width",
131
+ reflect: !0
132
+ })], r.prototype, "fullWidth", void 0);
133
+ n([a({
134
+ type: Boolean,
135
+ reflect: !0
136
+ })], r.prototype, "disabled", void 0);
137
+ n([f({ flatten: !0 })], r.prototype, "slottedElements", void 0);
138
+ r = n([p("md-button-group")], r);
139
+ export {
140
+ r as t
141
+ };
142
+
143
+ //# sourceMappingURL=button-group-CNqvJx1n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-group-CNqvJx1n.js","names":[],"sources":["../../src/components/button-group/button-group.css.ts","../../src/components/button-group/button-group.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const buttonGroupStyles = css`\n :host {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n gap: var(--md-button-group-gap, 8px);\n box-sizing: border-box;\n vertical-align: middle;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n :host([orientation='vertical']) {\n flex-direction: column;\n align-items: stretch;\n }\n\n :host([full-width]) {\n display: flex;\n width: 100%;\n }\n\n :host([full-width]:not([orientation='vertical'])) ::slotted(*) {\n flex: 1 1 0;\n width: 100%;\n }\n\n :host([full-width][orientation='vertical']) ::slotted(*) {\n width: 100%;\n }\n\n /* --- Connected Button Group --- */\n :host([connected]) {\n gap: 0;\n }\n\n :host([connected]:not([orientation='vertical'])) ::slotted(*:not(:first-child)) {\n margin-inline-start: -1px;\n }\n\n :host([connected][orientation='vertical']) ::slotted(*:not(:first-child)) {\n margin-top: -1px;\n }\n\n ::slotted(*) {\n position: relative;\n z-index: 0;\n }\n\n ::slotted(*:hover),\n ::slotted(*:focus-within),\n ::slotted(*:active) {\n z-index: 1;\n }\n\n :host([disabled]) {\n pointer-events: none;\n }\n`;\n","import { html } from 'lit';\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js';\nimport { MdBaseElement } from '../../internal/base-component.js';\nimport type { ButtonVariant } from '../button/button.js';\nimport { buttonGroupStyles } from './button-group.css.js';\n\nexport type ButtonGroupOrientation = 'horizontal' | 'vertical';\nexport type ButtonGroupShape = 'pill' | 'rounded' | 'square';\n\n@customElement('md-button-group')\nexport class MdButtonGroup extends MdBaseElement {\n static override styles = [MdBaseElement.styles, buttonGroupStyles];\n\n @property({ type: String, reflect: true })\n orientation: ButtonGroupOrientation = 'horizontal';\n\n @property({ type: Boolean, reflect: true })\n connected = false;\n\n @property({ type: String, reflect: true })\n shape: ButtonGroupShape = 'pill';\n\n @property({ type: String, reflect: true })\n variant: ButtonVariant | '' = '';\n\n @property({ type: Boolean, attribute: 'full-width', reflect: true })\n fullWidth = false;\n\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n @queryAssignedElements({ flatten: true })\n private slottedElements!: HTMLElement[];\n\n override connectedCallback() {\n super.connectedCallback();\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'group');\n }\n this.addEventListener('keydown', this.handleKeyDown);\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener('keydown', this.handleKeyDown);\n }\n\n override updated(changedProperties: Map<string, unknown>) {\n super.updated(changedProperties);\n if (\n changedProperties.has('connected') ||\n changedProperties.has('orientation') ||\n changedProperties.has('shape') ||\n changedProperties.has('variant') ||\n changedProperties.has('disabled')\n ) {\n this.syncChildren();\n }\n }\n\n private handleSlotChange = () => {\n this.syncChildren();\n };\n\n private getInteractiveChildren(): HTMLElement[] {\n if (!this.slottedElements) return [];\n return this.slottedElements.filter(\n (el): el is HTMLElement =>\n el.nodeType === Node.ELEMENT_NODE &&\n !el.hasAttribute('slot')\n );\n }\n\n private syncChildren() {\n const buttons = this.getInteractiveChildren();\n if (buttons.length === 0) return;\n\n // Sync disabled state\n if (this.disabled) {\n buttons.forEach((btn) => {\n if ('disabled' in btn) {\n (btn as any).disabled = true;\n } else {\n btn.setAttribute('disabled', '');\n }\n });\n }\n\n // Sync variant if specified\n if (this.variant) {\n buttons.forEach((btn) => {\n if ('variant' in btn) {\n (btn as any).variant = this.variant;\n }\n });\n }\n\n // Sync shape-shifting border radiuses for connected buttons\n if (this.connected) {\n let outer = 'var(--md-sys-shape-corner-full, 9999px)';\n let inner = 'var(--md-sys-shape-corner-extra-small, 4px)';\n\n if (this.shape === 'rounded') {\n outer = 'var(--md-sys-shape-corner-medium, 12px)';\n inner = 'var(--md-sys-shape-corner-extra-small, 4px)';\n } else if (this.shape === 'square') {\n outer = 'var(--md-sys-shape-corner-extra-small, 4px)';\n inner = '0px';\n }\n\n if (buttons.length === 1) {\n buttons[0]!.style.setProperty('--md-button-border-radius', outer);\n buttons[0]!.style.borderRadius = outer;\n } else {\n buttons.forEach((btn, index) => {\n let radius = '';\n if (this.orientation === 'vertical') {\n if (index === 0) {\n radius = `${outer} ${outer} ${inner} ${inner}`;\n } else if (index === buttons.length - 1) {\n radius = `${inner} ${inner} ${outer} ${outer}`;\n } else {\n radius = `${inner} ${inner} ${inner} ${inner}`;\n }\n } else {\n // Horizontal\n if (index === 0) {\n radius = `${outer} ${inner} ${inner} ${outer}`;\n } else if (index === buttons.length - 1) {\n radius = `${inner} ${outer} ${outer} ${inner}`;\n } else {\n radius = `${inner} ${inner} ${inner} ${inner}`;\n }\n }\n btn.style.setProperty('--md-button-border-radius', radius);\n btn.style.borderRadius = radius;\n });\n }\n } else {\n buttons.forEach((btn) => {\n btn.style.removeProperty('--md-button-border-radius');\n btn.style.borderRadius = '';\n });\n }\n }\n\n private handleKeyDown = (event: KeyboardEvent) => {\n const buttons = this.getInteractiveChildren().filter((b) => !(b as any).disabled && !b.hasAttribute('disabled'));\n if (buttons.length === 0) return;\n\n const currentFocus = document.activeElement;\n const currentIndex = buttons.findIndex(\n (b) => b === currentFocus || (b.shadowRoot && b.shadowRoot.activeElement === currentFocus)\n );\n\n let nextIndex = -1;\n if (event.key === 'ArrowRight' || event.key === 'ArrowDown') {\n event.preventDefault();\n nextIndex = currentIndex >= 0 && currentIndex < buttons.length - 1 ? currentIndex + 1 : 0;\n } else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') {\n event.preventDefault();\n nextIndex = currentIndex > 0 ? currentIndex - 1 : buttons.length - 1;\n } else if (event.key === 'Home') {\n event.preventDefault();\n nextIndex = 0;\n } else if (event.key === 'End') {\n event.preventDefault();\n nextIndex = buttons.length - 1;\n }\n\n if (nextIndex !== -1 && buttons[nextIndex]) {\n buttons[nextIndex]?.focus();\n }\n };\n\n override render() {\n return html`<slot @slotchange=${this.handleSlotChange}></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'md-button-group': MdButtonGroup;\n }\n}\n"],"mappings":";;;AAEA,IAAa,IAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,MAAA;AAGzC,EAAA,CAAA,EAAsB,EAAE,SAAS,GAAK,CAAC,CAAA,GAAA,EAAA,WAAA,mBAAA,MAAA;AAtBzC,IAAA,EAAA,CAAA,EAAc,iBAAiB,CAAA,GAAA,CAAA"}
@@ -0,0 +1,371 @@
1
+ import { n as l, t as e } from "./decorate-DXuynaiA.js";
2
+ import "./ripple-squbKHhj.js";
3
+ import "./focus-ring-CuiJuM-y.js";
4
+ import { css as c, html as i, nothing as r } from "lit";
5
+ import { customElement as p, property as o } from "lit/decorators.js";
6
+ var f = c`
7
+ :host {
8
+ display: block;
9
+ position: relative;
10
+ box-sizing: border-box;
11
+ width: 100%;
12
+ --md-carousel-spacing: 8px;
13
+ --md-carousel-height: auto;
14
+ --md-carousel-item-shape: var(--md-sys-shape-corner-extra-large, 28px);
15
+ --md-carousel-control-size: 44px;
16
+ --md-carousel-control-bg: var(--md-sys-color-surface-container-highest, rgba(255, 255, 255, 0.9));
17
+ --md-carousel-control-color: var(--md-sys-color-on-surface, #1d1b20);
18
+ --md-carousel-indicator-color: var(--md-sys-color-outline-variant, #cac4d0);
19
+ --md-carousel-indicator-active-color: var(--md-sys-color-primary, #6750a4);
20
+ }
21
+
22
+ .carousel-root {
23
+ position: relative;
24
+ width: 100%;
25
+ display: flex;
26
+ flex-direction: column;
27
+ box-sizing: border-box;
28
+ }
29
+
30
+ .carousel-viewport-wrapper {
31
+ position: relative;
32
+ width: 100%;
33
+ overflow: hidden;
34
+ border-radius: var(--md-carousel-radius, 0px);
35
+ }
36
+
37
+ .carousel-scroller {
38
+ display: flex;
39
+ gap: var(--md-carousel-spacing, 8px);
40
+ overflow-x: auto;
41
+ overflow-y: hidden;
42
+ -webkit-overflow-scrolling: touch;
43
+ scrollbar-width: none;
44
+ -ms-overflow-style: none;
45
+ scroll-snap-type: x mandatory;
46
+ padding: 4px 0;
47
+ margin: 0;
48
+ box-sizing: border-box;
49
+ width: 100%;
50
+ height: var(--md-carousel-height, auto);
51
+ touch-action: pan-y pinch-zoom;
52
+ user-select: none;
53
+ -webkit-user-select: none;
54
+ }
55
+
56
+ .carousel-scroller::-webkit-scrollbar {
57
+ display: none;
58
+ }
59
+
60
+ .carousel-scroller.is-dragging {
61
+ scroll-snap-type: none;
62
+ cursor: grabbing;
63
+ }
64
+
65
+ /* Layout variations applied on items via CSS variables */
66
+ :host([layout="full-width"]) {
67
+ --md-carousel-item-width: 100%;
68
+ }
69
+
70
+ :host([layout="hero"]) {
71
+ --md-carousel-item-width: clamp(280px, 80%, 720px);
72
+ }
73
+
74
+ :host([layout="multi-browse"]),
75
+ :host(:not([layout])) {
76
+ --md-carousel-item-width: clamp(220px, 32%, 360px);
77
+ }
78
+
79
+ :host([layout="uncontained"]) {
80
+ --md-carousel-item-width: auto;
81
+ }
82
+
83
+ /* Controls (Previous & Next buttons) */
84
+ .control-button {
85
+ position: absolute;
86
+ top: 50%;
87
+ transform: translateY(-50%);
88
+ z-index: 3;
89
+ display: inline-flex;
90
+ align-items: center;
91
+ justify-content: center;
92
+ width: var(--md-carousel-control-size, 44px);
93
+ height: var(--md-carousel-control-size, 44px);
94
+ border-radius: var(--md-sys-shape-corner-full, 9999px);
95
+ background-color: var(--md-carousel-control-bg, rgba(255, 255, 255, 0.9));
96
+ color: var(--md-carousel-control-color, #1d1b20);
97
+ border: none;
98
+ outline: none;
99
+ cursor: pointer;
100
+ box-shadow: var(--md-sys-elevation-level2, 0px 2px 6px 2px rgba(0, 0, 0, 0.15));
101
+ transition: opacity 0.2s cubic-bezier(0.2, 0, 0, 1),
102
+ background-color 0.2s,
103
+ transform 0.2s;
104
+ user-select: none;
105
+ -webkit-tap-highlight-color: transparent;
106
+ }
107
+
108
+ .control-button:hover:not(:disabled) {
109
+ background-color: var(--md-sys-color-surface-container-high, #e6e0e9);
110
+ box-shadow: var(--md-sys-elevation-level3, 0px 4px 8px 3px rgba(0, 0, 0, 0.15));
111
+ }
112
+
113
+ .control-button:active:not(:disabled) {
114
+ transform: translateY(-50%) scale(0.94);
115
+ }
116
+
117
+ .control-button:disabled {
118
+ opacity: 0;
119
+ pointer-events: none;
120
+ }
121
+
122
+ .control-button.prev {
123
+ left: 12px;
124
+ }
125
+
126
+ .control-button.next {
127
+ right: 12px;
128
+ }
129
+
130
+ /* Indicators / Pagination Dots */
131
+ .indicators {
132
+ display: flex;
133
+ justify-content: center;
134
+ align-items: center;
135
+ gap: 8px;
136
+ margin-top: 12px;
137
+ padding: 4px 0;
138
+ }
139
+
140
+ .indicator-dot {
141
+ position: relative;
142
+ width: 8px;
143
+ height: 8px;
144
+ border-radius: var(--md-sys-shape-corner-full, 9999px);
145
+ background-color: var(--md-carousel-indicator-color, #cac4d0);
146
+ border: none;
147
+ padding: 0;
148
+ cursor: pointer;
149
+ transition: width 0.3s cubic-bezier(0.2, 0, 0, 1),
150
+ background-color 0.3s cubic-bezier(0.2, 0, 0, 1),
151
+ border-radius 0.3s;
152
+ }
153
+
154
+ .indicator-dot::before {
155
+ content: '';
156
+ position: absolute;
157
+ top: 50%;
158
+ left: 50%;
159
+ transform: translate(-50%, -50%);
160
+ width: 28px;
161
+ height: 28px;
162
+ }
163
+
164
+ .indicator-dot.active {
165
+ width: 24px;
166
+ border-radius: 4px;
167
+ background-color: var(--md-carousel-indicator-active-color, #6750a4);
168
+ }
169
+
170
+ .indicator-dot:focus-visible {
171
+ outline: 2px solid var(--md-carousel-indicator-active-color, #6750a4);
172
+ outline-offset: 2px;
173
+ }
174
+ `, h = c`
175
+ :host {
176
+ display: inline-block;
177
+ flex: 0 0 auto;
178
+ box-sizing: border-box;
179
+ position: relative;
180
+ overflow: hidden;
181
+ scroll-snap-align: start;
182
+ scroll-snap-stop: normal;
183
+ border-radius: var(--md-carousel-item-shape, var(--md-sys-shape-corner-extra-large, 28px));
184
+ background-color: var(--md-sys-color-surface-container-low, #f7f2fa);
185
+ width: var(--md-carousel-item-width, clamp(220px, 32%, 360px));
186
+ height: var(--md-carousel-item-height, 100%);
187
+ min-height: 180px;
188
+ transition: transform 250ms cubic-bezier(0.2, 0, 0, 1),
189
+ box-shadow 250ms cubic-bezier(0.2, 0, 0, 1);
190
+ }
191
+
192
+ :host([snap-align="center"]) {
193
+ scroll-snap-align: center;
194
+ }
195
+
196
+ :host([snap-align="end"]) {
197
+ scroll-snap-align: end;
198
+ }
199
+
200
+ :host([snap-align="start"]) {
201
+ scroll-snap-align: start;
202
+ }
203
+
204
+ :host([interactive]) {
205
+ cursor: pointer;
206
+ }
207
+
208
+ :host([disabled]) {
209
+ pointer-events: none;
210
+ opacity: 0.38;
211
+ }
212
+
213
+ .item-container {
214
+ position: relative;
215
+ width: 100%;
216
+ height: 100%;
217
+ display: flex;
218
+ flex-direction: column;
219
+ justify-content: flex-end;
220
+ overflow: hidden;
221
+ text-decoration: none;
222
+ color: inherit;
223
+ box-sizing: border-box;
224
+ }
225
+
226
+ .media-container {
227
+ position: absolute;
228
+ inset: 0;
229
+ width: 100%;
230
+ height: 100%;
231
+ z-index: 0;
232
+ overflow: hidden;
233
+ }
234
+
235
+ .media-container img,
236
+ ::slotted(img) {
237
+ width: 100%;
238
+ height: 100%;
239
+ object-fit: cover;
240
+ display: block;
241
+ }
242
+
243
+ .scrim {
244
+ position: absolute;
245
+ bottom: 0;
246
+ left: 0;
247
+ right: 0;
248
+ z-index: 1;
249
+ padding: 20px 16px 16px;
250
+ background: linear-gradient(
251
+ to top,
252
+ rgba(0, 0, 0, 0.8) 0%,
253
+ rgba(0, 0, 0, 0.4) 60%,
254
+ transparent 100%
255
+ );
256
+ color: #ffffff;
257
+ display: flex;
258
+ flex-direction: column;
259
+ gap: 4px;
260
+ pointer-events: none;
261
+ }
262
+
263
+ .headline {
264
+ font-size: 1.125rem;
265
+ font-weight: 500;
266
+ line-height: 1.4;
267
+ margin: 0;
268
+ color: inherit;
269
+ }
270
+
271
+ .subhead {
272
+ font-size: 0.875rem;
273
+ font-weight: 400;
274
+ line-height: 1.3;
275
+ margin: 0;
276
+ opacity: 0.88;
277
+ color: inherit;
278
+ }
279
+
280
+ .content-slot {
281
+ position: relative;
282
+ z-index: 2;
283
+ height: 100%;
284
+ width: 100%;
285
+ box-sizing: border-box;
286
+ }
287
+ `, t = class extends l {
288
+ constructor(...s) {
289
+ super(...s), this.src = "", this.alt = "", this.headline = "", this.subhead = "", this.href = "", this.target = "", this.interactive = !1, this.disabled = !1, this.snapAlign = "start", this.layout = "", this.handleClick = (a) => {
290
+ if (this.disabled) {
291
+ a.preventDefault(), a.stopImmediatePropagation();
292
+ return;
293
+ }
294
+ this.emitEvent("carousel-item-click", { item: this });
295
+ };
296
+ }
297
+ static {
298
+ this.styles = [l.styles, h];
299
+ }
300
+ connectedCallback() {
301
+ super.connectedCallback(), this.hasAttribute("role") || this.setAttribute("role", "group"), this.hasAttribute("aria-roledescription") || this.setAttribute("aria-roledescription", "slide"), this.addEventListener("click", this.handleClick);
302
+ }
303
+ disconnectedCallback() {
304
+ super.disconnectedCallback(), this.removeEventListener("click", this.handleClick);
305
+ }
306
+ render() {
307
+ const s = !!this.src, a = !!(this.headline || this.subhead), d = !!(this.interactive || this.href), n = i`
308
+ ${d ? i`<md-ripple ?disabled=${this.disabled}></md-ripple><md-focus-ring></md-focus-ring>` : r}
309
+ ${s ? i`
310
+ <div class="media-container">
311
+ <img src=${this.src} alt=${this.alt} loading="lazy" />
312
+ </div>
313
+ ` : i`
314
+ <slot name="media"></slot>
315
+ `}
316
+ <div class="content-slot">
317
+ <slot></slot>
318
+ </div>
319
+ ${a ? i`
320
+ <div class="scrim">
321
+ ${this.headline ? i`<div class="headline"><slot name="headline">${this.headline}</slot></div>` : r}
322
+ ${this.subhead ? i`<div class="subhead"><slot name="subhead">${this.subhead}</slot></div>` : r}
323
+ </div>
324
+ ` : r}
325
+ `;
326
+ return this.href ? i`
327
+ <a
328
+ class="item-container"
329
+ href=${this.disabled ? r : this.href}
330
+ target=${this.target || r}
331
+ rel=${this.target === "_blank" ? "noopener noreferrer" : r}
332
+ >
333
+ ${n}
334
+ </a>
335
+ ` : i`
336
+ <div class="item-container">
337
+ ${n}
338
+ </div>
339
+ `;
340
+ }
341
+ };
342
+ e([o({ type: String })], t.prototype, "src", void 0);
343
+ e([o({ type: String })], t.prototype, "alt", void 0);
344
+ e([o({ type: String })], t.prototype, "headline", void 0);
345
+ e([o({ type: String })], t.prototype, "subhead", void 0);
346
+ e([o({ type: String })], t.prototype, "href", void 0);
347
+ e([o({ type: String })], t.prototype, "target", void 0);
348
+ e([o({
349
+ type: Boolean,
350
+ reflect: !0
351
+ })], t.prototype, "interactive", void 0);
352
+ e([o({
353
+ type: Boolean,
354
+ reflect: !0
355
+ })], t.prototype, "disabled", void 0);
356
+ e([o({
357
+ type: String,
358
+ reflect: !0,
359
+ attribute: "snap-align"
360
+ })], t.prototype, "snapAlign", void 0);
361
+ e([o({
362
+ type: String,
363
+ reflect: !0
364
+ })], t.prototype, "layout", void 0);
365
+ t = e([p("md-carousel-item")], t);
366
+ export {
367
+ f as n,
368
+ t
369
+ };
370
+
371
+ //# sourceMappingURL=carousel-item-BG6kjjjk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"carousel-item-BG6kjjjk.js","names":[],"sources":["../../src/components/carousel/carousel.css.ts","../../src/components/carousel/carousel-item.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const carouselStyles = css`\n :host {\n display: block;\n position: relative;\n box-sizing: border-box;\n width: 100%;\n --md-carousel-spacing: 8px;\n --md-carousel-height: auto;\n --md-carousel-item-shape: var(--md-sys-shape-corner-extra-large, 28px);\n --md-carousel-control-size: 44px;\n --md-carousel-control-bg: var(--md-sys-color-surface-container-highest, rgba(255, 255, 255, 0.9));\n --md-carousel-control-color: var(--md-sys-color-on-surface, #1d1b20);\n --md-carousel-indicator-color: var(--md-sys-color-outline-variant, #cac4d0);\n --md-carousel-indicator-active-color: var(--md-sys-color-primary, #6750a4);\n }\n\n .carousel-root {\n position: relative;\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n }\n\n .carousel-viewport-wrapper {\n position: relative;\n width: 100%;\n overflow: hidden;\n border-radius: var(--md-carousel-radius, 0px);\n }\n\n .carousel-scroller {\n display: flex;\n gap: var(--md-carousel-spacing, 8px);\n overflow-x: auto;\n overflow-y: hidden;\n -webkit-overflow-scrolling: touch;\n scrollbar-width: none;\n -ms-overflow-style: none;\n scroll-snap-type: x mandatory;\n padding: 4px 0;\n margin: 0;\n box-sizing: border-box;\n width: 100%;\n height: var(--md-carousel-height, auto);\n touch-action: pan-y pinch-zoom;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .carousel-scroller::-webkit-scrollbar {\n display: none;\n }\n\n .carousel-scroller.is-dragging {\n scroll-snap-type: none;\n cursor: grabbing;\n }\n\n /* Layout variations applied on items via CSS variables */\n :host([layout=\"full-width\"]) {\n --md-carousel-item-width: 100%;\n }\n\n :host([layout=\"hero\"]) {\n --md-carousel-item-width: clamp(280px, 80%, 720px);\n }\n\n :host([layout=\"multi-browse\"]),\n :host(:not([layout])) {\n --md-carousel-item-width: clamp(220px, 32%, 360px);\n }\n\n :host([layout=\"uncontained\"]) {\n --md-carousel-item-width: auto;\n }\n\n /* Controls (Previous & Next buttons) */\n .control-button {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n z-index: 3;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--md-carousel-control-size, 44px);\n height: var(--md-carousel-control-size, 44px);\n border-radius: var(--md-sys-shape-corner-full, 9999px);\n background-color: var(--md-carousel-control-bg, rgba(255, 255, 255, 0.9));\n color: var(--md-carousel-control-color, #1d1b20);\n border: none;\n outline: none;\n cursor: pointer;\n box-shadow: var(--md-sys-elevation-level2, 0px 2px 6px 2px rgba(0, 0, 0, 0.15));\n transition: opacity 0.2s cubic-bezier(0.2, 0, 0, 1),\n background-color 0.2s,\n transform 0.2s;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n }\n\n .control-button:hover:not(:disabled) {\n background-color: var(--md-sys-color-surface-container-high, #e6e0e9);\n box-shadow: var(--md-sys-elevation-level3, 0px 4px 8px 3px rgba(0, 0, 0, 0.15));\n }\n\n .control-button:active:not(:disabled) {\n transform: translateY(-50%) scale(0.94);\n }\n\n .control-button:disabled {\n opacity: 0;\n pointer-events: none;\n }\n\n .control-button.prev {\n left: 12px;\n }\n\n .control-button.next {\n right: 12px;\n }\n\n /* Indicators / Pagination Dots */\n .indicators {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 8px;\n margin-top: 12px;\n padding: 4px 0;\n }\n\n .indicator-dot {\n position: relative;\n width: 8px;\n height: 8px;\n border-radius: var(--md-sys-shape-corner-full, 9999px);\n background-color: var(--md-carousel-indicator-color, #cac4d0);\n border: none;\n padding: 0;\n cursor: pointer;\n transition: width 0.3s cubic-bezier(0.2, 0, 0, 1),\n background-color 0.3s cubic-bezier(0.2, 0, 0, 1),\n border-radius 0.3s;\n }\n\n .indicator-dot::before {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 28px;\n height: 28px;\n }\n\n .indicator-dot.active {\n width: 24px;\n border-radius: 4px;\n background-color: var(--md-carousel-indicator-active-color, #6750a4);\n }\n\n .indicator-dot:focus-visible {\n outline: 2px solid var(--md-carousel-indicator-active-color, #6750a4);\n outline-offset: 2px;\n }\n`;\n\nexport const carouselItemStyles = css`\n :host {\n display: inline-block;\n flex: 0 0 auto;\n box-sizing: border-box;\n position: relative;\n overflow: hidden;\n scroll-snap-align: start;\n scroll-snap-stop: normal;\n border-radius: var(--md-carousel-item-shape, var(--md-sys-shape-corner-extra-large, 28px));\n background-color: var(--md-sys-color-surface-container-low, #f7f2fa);\n width: var(--md-carousel-item-width, clamp(220px, 32%, 360px));\n height: var(--md-carousel-item-height, 100%);\n min-height: 180px;\n transition: transform 250ms cubic-bezier(0.2, 0, 0, 1),\n box-shadow 250ms cubic-bezier(0.2, 0, 0, 1);\n }\n\n :host([snap-align=\"center\"]) {\n scroll-snap-align: center;\n }\n\n :host([snap-align=\"end\"]) {\n scroll-snap-align: end;\n }\n\n :host([snap-align=\"start\"]) {\n scroll-snap-align: start;\n }\n\n :host([interactive]) {\n cursor: pointer;\n }\n\n :host([disabled]) {\n pointer-events: none;\n opacity: 0.38;\n }\n\n .item-container {\n position: relative;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n overflow: hidden;\n text-decoration: none;\n color: inherit;\n box-sizing: border-box;\n }\n\n .media-container {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n z-index: 0;\n overflow: hidden;\n }\n\n .media-container img,\n ::slotted(img) {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n }\n\n .scrim {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n z-index: 1;\n padding: 20px 16px 16px;\n background: linear-gradient(\n to top,\n rgba(0, 0, 0, 0.8) 0%,\n rgba(0, 0, 0, 0.4) 60%,\n transparent 100%\n );\n color: #ffffff;\n display: flex;\n flex-direction: column;\n gap: 4px;\n pointer-events: none;\n }\n\n .headline {\n font-size: 1.125rem;\n font-weight: 500;\n line-height: 1.4;\n margin: 0;\n color: inherit;\n }\n\n .subhead {\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 1.3;\n margin: 0;\n opacity: 0.88;\n color: inherit;\n }\n\n .content-slot {\n position: relative;\n z-index: 2;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n }\n`;\n","import { html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { MdBaseElement } from '../../internal/base-component.js';\nimport '../../internal/ripple/ripple.js';\nimport '../../internal/focus-ring/focus-ring.js';\nimport { carouselItemStyles } from './carousel.css.js';\n\nexport type CarouselSnapAlign = 'start' | 'center' | 'end';\n\n/**\n * Material Design 3 Carousel Item component.\n *\n * @slot - Default slot for custom content or media.\n * @slot media - Specific slot for image or video elements.\n * @slot headline - Custom headline content.\n * @slot subhead - Custom subhead or description content.\n */\n@customElement('md-carousel-item')\nexport class MdCarouselItem extends MdBaseElement {\n static override styles = [MdBaseElement.styles, carouselItemStyles];\n\n @property({ type: String })\n src = '';\n\n @property({ type: String })\n alt = '';\n\n @property({ type: String })\n headline = '';\n\n @property({ type: String })\n subhead = '';\n\n @property({ type: String })\n href = '';\n\n @property({ type: String })\n target = '';\n\n @property({ type: Boolean, reflect: true })\n interactive = false;\n\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n @property({ type: String, reflect: true, attribute: 'snap-align' })\n snapAlign: CarouselSnapAlign = 'start';\n\n @property({ type: String, reflect: true })\n layout = '';\n\n override connectedCallback() {\n super.connectedCallback();\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'group');\n }\n if (!this.hasAttribute('aria-roledescription')) {\n this.setAttribute('aria-roledescription', 'slide');\n }\n this.addEventListener('click', this.handleClick);\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener('click', this.handleClick);\n }\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n return;\n }\n this.emitEvent('carousel-item-click', { item: this });\n };\n\n override render() {\n const hasMedia = Boolean(this.src);\n const hasScrim = Boolean(this.headline || this.subhead);\n const isClickable = Boolean(this.interactive || this.href);\n\n const innerContent = html`\n ${isClickable ? html`<md-ripple ?disabled=${this.disabled}></md-ripple><md-focus-ring></md-focus-ring>` : nothing}\n ${hasMedia ? html`\n <div class=\"media-container\">\n <img src=${this.src} alt=${this.alt} loading=\"lazy\" />\n </div>\n ` : html`\n <slot name=\"media\"></slot>\n `}\n <div class=\"content-slot\">\n <slot></slot>\n </div>\n ${hasScrim ? html`\n <div class=\"scrim\">\n ${this.headline ? html`<div class=\"headline\"><slot name=\"headline\">${this.headline}</slot></div>` : nothing}\n ${this.subhead ? html`<div class=\"subhead\"><slot name=\"subhead\">${this.subhead}</slot></div>` : nothing}\n </div>\n ` : nothing}\n `;\n\n if (this.href) {\n return html`\n <a\n class=\"item-container\"\n href=${this.disabled ? nothing : this.href}\n target=${this.target || nothing}\n rel=${this.target === '_blank' ? 'noopener noreferrer' : nothing}\n >\n ${innerContent}\n </a>\n `;\n }\n\n return html`\n <div class=\"item-container\">\n ${innerContent}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'md-carousel-item': MdCarouselItem;\n }\n}\n"],"mappings":";;;;;AAEA,IAAa,IAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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