@redvars/peacock 3.8.3 → 3.8.5

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 (175) hide show
  1. package/dist/accordion-item.js +35 -36
  2. package/dist/accordion-item.js.map +1 -1
  3. package/dist/accordion.js +20 -11
  4. package/dist/accordion.js.map +1 -1
  5. package/dist/alert.js +1 -0
  6. package/dist/alert.js.map +1 -1
  7. package/dist/app-bar.js +1 -0
  8. package/dist/app-bar.js.map +1 -1
  9. package/dist/assets/components.css +1 -1
  10. package/dist/assets/components.css.map +1 -1
  11. package/dist/assets/styles.css +1 -1
  12. package/dist/assets/styles.css.map +1 -1
  13. package/dist/avatar.js +1 -0
  14. package/dist/avatar.js.map +1 -1
  15. package/dist/badge.js +1 -0
  16. package/dist/badge.js.map +1 -1
  17. package/dist/bottom-sheet.js +1 -0
  18. package/dist/bottom-sheet.js.map +1 -1
  19. package/dist/breadcrumb-item.js +1 -0
  20. package/dist/breadcrumb-item.js.map +1 -1
  21. package/dist/breadcrumb.js +1 -0
  22. package/dist/breadcrumb.js.map +1 -1
  23. package/dist/button-group.js +1 -0
  24. package/dist/button-group.js.map +1 -1
  25. package/dist/button.js +19 -18
  26. package/dist/button.js.map +1 -1
  27. package/dist/calendar-column-view.js +1 -0
  28. package/dist/calendar-column-view.js.map +1 -1
  29. package/dist/calendar-month-view.js +1 -0
  30. package/dist/calendar-month-view.js.map +1 -1
  31. package/dist/calendar.js +1 -0
  32. package/dist/calendar.js.map +1 -1
  33. package/dist/canvas.js +1 -0
  34. package/dist/canvas.js.map +1 -1
  35. package/dist/card.js +1 -0
  36. package/dist/card.js.map +1 -1
  37. package/dist/cb-compound-expression.js +1 -0
  38. package/dist/cb-compound-expression.js.map +1 -1
  39. package/dist/cb-divider.js +1 -0
  40. package/dist/cb-divider.js.map +1 -1
  41. package/dist/cb-expression.js +1 -0
  42. package/dist/cb-expression.js.map +1 -1
  43. package/dist/cb-predicate.js +1 -0
  44. package/dist/cb-predicate.js.map +1 -1
  45. package/dist/{chart-bar-CYoGNXnK.js → chart-bar-CapLbc2e.js} +2 -1
  46. package/dist/{chart-bar-CYoGNXnK.js.map → chart-bar-CapLbc2e.js.map} +1 -1
  47. package/dist/chart-bar.js +1 -1
  48. package/dist/chart-doughnut.js +1 -0
  49. package/dist/chart-doughnut.js.map +1 -1
  50. package/dist/chart-pie.js +1 -0
  51. package/dist/chart-pie.js.map +1 -1
  52. package/dist/chart-stacked-bar.js +1 -1
  53. package/dist/checkbox.js +1 -0
  54. package/dist/checkbox.js.map +1 -1
  55. package/dist/chip.js +1 -0
  56. package/dist/chip.js.map +1 -1
  57. package/dist/clock.js +1 -0
  58. package/dist/clock.js.map +1 -1
  59. package/dist/code-editor.js +1 -0
  60. package/dist/code-editor.js.map +1 -1
  61. package/dist/code-highlighter.js +1 -0
  62. package/dist/code-highlighter.js.map +1 -1
  63. package/dist/condition-builder.js +1 -0
  64. package/dist/condition-builder.js.map +1 -1
  65. package/dist/container.js +1 -0
  66. package/dist/container.js.map +1 -1
  67. package/dist/custom-elements-jsdocs.json +32 -23
  68. package/dist/custom-elements.json +49 -49
  69. package/dist/divider.js +1 -0
  70. package/dist/divider.js.map +1 -1
  71. package/dist/dropdown-button.js +1 -0
  72. package/dist/dropdown-button.js.map +1 -1
  73. package/dist/elevation.js +1 -0
  74. package/dist/elevation.js.map +1 -1
  75. package/dist/empty-state.js +1 -0
  76. package/dist/empty-state.js.map +1 -1
  77. package/dist/fab.js +1 -0
  78. package/dist/fab.js.map +1 -1
  79. package/dist/field.js +1 -0
  80. package/dist/field.js.map +1 -1
  81. package/dist/{flow-designer-node-DsVwQTac.js → flow-designer-node-CGSm6cUH.js} +2 -1
  82. package/dist/{flow-designer-node-DsVwQTac.js.map → flow-designer-node-CGSm6cUH.js.map} +1 -1
  83. package/dist/flow-designer-node.js +1 -1
  84. package/dist/flow-designer.js +1 -1
  85. package/dist/html-editor.js +1 -0
  86. package/dist/html-editor.js.map +1 -1
  87. package/dist/icon-button.js +1 -0
  88. package/dist/icon-button.js.map +1 -1
  89. package/dist/icon.js +1 -0
  90. package/dist/icon.js.map +1 -1
  91. package/dist/index.js +4 -4
  92. package/dist/item.js +1 -0
  93. package/dist/item.js.map +1 -1
  94. package/dist/link.js +1 -0
  95. package/dist/link.js.map +1 -1
  96. package/dist/{list-H0itjRte.js → list-BBmnHm8f.js} +3 -1
  97. package/dist/{list-H0itjRte.js.map → list-BBmnHm8f.js.map} +1 -1
  98. package/dist/list.js +1 -1
  99. package/dist/loader.js +2 -2
  100. package/dist/menu-item.js +1 -0
  101. package/dist/menu-item.js.map +1 -1
  102. package/dist/menu.js +1 -0
  103. package/dist/menu.js.map +1 -1
  104. package/dist/modal.js +1 -0
  105. package/dist/modal.js.map +1 -1
  106. package/dist/navigation-rail-item.js +1 -0
  107. package/dist/navigation-rail-item.js.map +1 -1
  108. package/dist/navigation-rail.js +1 -0
  109. package/dist/navigation-rail.js.map +1 -1
  110. package/dist/notification-manager.js +1 -0
  111. package/dist/notification-manager.js.map +1 -1
  112. package/dist/notification.js +1 -0
  113. package/dist/notification.js.map +1 -1
  114. package/dist/number-counter.js +1 -0
  115. package/dist/number-counter.js.map +1 -1
  116. package/dist/pagination.js +16 -10
  117. package/dist/pagination.js.map +1 -1
  118. package/dist/popover-content.js +1 -0
  119. package/dist/popover-content.js.map +1 -1
  120. package/dist/popover.js +1 -0
  121. package/dist/popover.js.map +1 -1
  122. package/dist/radio.js +1 -0
  123. package/dist/radio.js.map +1 -1
  124. package/dist/search.js +1 -0
  125. package/dist/search.js.map +1 -1
  126. package/dist/segmented-button-group.js +1 -0
  127. package/dist/segmented-button-group.js.map +1 -1
  128. package/dist/segmented-button.js +1 -0
  129. package/dist/segmented-button.js.map +1 -1
  130. package/dist/{select-CspawZ18.js → select-D85kpjUt.js} +16 -2
  131. package/dist/{select-CspawZ18.js.map → select-D85kpjUt.js.map} +1 -1
  132. package/dist/side-sheet.js +1 -0
  133. package/dist/side-sheet.js.map +1 -1
  134. package/dist/skeleton.js +1 -0
  135. package/dist/skeleton.js.map +1 -1
  136. package/dist/snackbar.js +1 -0
  137. package/dist/snackbar.js.map +1 -1
  138. package/dist/spinner.js +1 -0
  139. package/dist/spinner.js.map +1 -1
  140. package/dist/split-button.js +1 -0
  141. package/dist/split-button.js.map +1 -1
  142. package/dist/src/accordion/accordion-item.d.ts +1 -7
  143. package/dist/src/accordion/accordion.d.ts +8 -3
  144. package/dist/src/button/button/button.d.ts +18 -18
  145. package/dist/sub-menu.js +1 -0
  146. package/dist/sub-menu.js.map +1 -1
  147. package/dist/svg.js +1 -0
  148. package/dist/svg.js.map +1 -1
  149. package/dist/tab-group.js +1 -0
  150. package/dist/tab-group.js.map +1 -1
  151. package/dist/tab-panel.js +1 -0
  152. package/dist/tab-panel.js.map +1 -1
  153. package/dist/tab.js +1 -0
  154. package/dist/tab.js.map +1 -1
  155. package/dist/table.js +5 -9
  156. package/dist/table.js.map +1 -1
  157. package/dist/tabs.js +1 -0
  158. package/dist/tabs.js.map +1 -1
  159. package/dist/toolbar.js +1 -0
  160. package/dist/toolbar.js.map +1 -1
  161. package/dist/tooltip.js +1 -0
  162. package/dist/tooltip.js.map +1 -1
  163. package/dist/tsconfig.tsbuildinfo +1 -1
  164. package/package.json +1 -1
  165. package/readme.md +2 -2
  166. package/scss/mixin.scss +1 -0
  167. package/src/accordion/accordion-item.scss +34 -12
  168. package/src/accordion/accordion-item.ts +29 -30
  169. package/src/accordion/accordion.scss +2 -2
  170. package/src/accordion/accordion.ts +14 -7
  171. package/src/button/button/button.ts +18 -18
  172. package/src/pagination/pagination.scss +15 -10
  173. package/src/sidebar-menu/sidebar-menu-item.scss +2 -1
  174. package/src/table/table.scss +3 -9
  175. package/src/table/table.ts +1 -1
@@ -44,6 +44,7 @@ async function copyToClipboard(text) {
44
44
 
45
45
  var css_248z = i`* {
46
46
  box-sizing: border-box;
47
+ -webkit-tap-highlight-color: transparent;
47
48
  }
48
49
 
49
50
  .screen-reader-only {
@@ -1 +1 @@
1
- {"version":3,"file":"code-highlighter.js","sources":["../../src/__internal/utils/copy-to-clipboard.ts","../../src/code-highlighter/code-highlighter.ts"],"sourcesContent":["function fallbackCopyTextToClipboard(text: string) {\n const temporaryInput = document.createElement('textarea');\n temporaryInput.value = text;\n\n // Make the element non-visible but still in the DOM so it can be selected\n temporaryInput.setAttribute('readonly', '');\n temporaryInput.style.position = 'absolute';\n temporaryInput.style.left = '-9999px';\n\n document.body.appendChild(temporaryInput);\n temporaryInput.select();\n\n try {\n document.execCommand('copy');\n } catch (err) {\n console.error('Fallback: Failed to copy text: ', err);\n } finally {\n document.body.removeChild(temporaryInput);\n }\n}\n\nexport async function copyToClipboard(text: string) {\n if (navigator.clipboard && navigator.clipboard.writeText) {\n // Use the modern Clipboard API\n try {\n await navigator.clipboard.writeText(text);\n } catch (err) {\n console.error('Failed to copy text using Clipboard API: ', err);\n // Fallback if API fails for some reason\n fallbackCopyTextToClipboard(text);\n }\n } else {\n // Use the fallback method for older browsers\n fallbackCopyTextToClipboard(text);\n }\n}\n","import { html, LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport type { BundledLanguage, ShikiTransformer } from 'shiki';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport { copyToClipboard } from '@/__internal/utils/copy-to-clipboard.js';\nimport styles from './code-highlighter.scss';\n\n// Module-level promises – Rollup splits each import() specifier into a separate chunk.\n// Caching here prevents parallel loads when multiple instances initialise at the same time.\nlet _shiki: Promise<typeof import('shiki')> | null = null;\nlet _themes: Promise<\n [\n typeof import('@pierre/theme/pierre-dark'),\n typeof import('@pierre/theme/pierre-light'),\n ]\n> | null = null;\nlet _prettier: Promise<typeof import('prettier/standalone')> | null = null;\nlet _pluginBabel: Promise<typeof import('prettier/plugins/babel')> | null =\n null;\nlet _pluginHtml: Promise<typeof import('prettier/plugins/html')> | null = null;\nlet _pluginPostcss: Promise<typeof import('prettier/plugins/postcss')> | null =\n null;\nlet _pluginEstree: Promise<typeof import('prettier/plugins/estree')> | null =\n null;\n\nconst loadShiki = () => (_shiki ??= import('shiki'));\n\nconst loadThemes = () =>\n (_themes ??= Promise.all([\n import('@pierre/theme/pierre-dark'),\n import('@pierre/theme/pierre-light'),\n ]));\n\nconst loadPrettier = () => (_prettier ??= import('prettier/standalone'));\nconst loadPluginBabel = () =>\n (_pluginBabel ??= import('prettier/plugins/babel'));\nconst loadPluginHtml = () => (_pluginHtml ??= import('prettier/plugins/html'));\nconst loadPluginPostcss = () =>\n (_pluginPostcss ??= import('prettier/plugins/postcss'));\nconst loadPluginEstree = () =>\n (_pluginEstree ??= import('prettier/plugins/estree'));\n\nconst locale = {\n loading: 'Loading code...',\n copyToClipboard: 'Copy to clipboard',\n copied: 'Copied',\n copiedCode: 'Copied code',\n};\n\n/**\n * @label Code Highlighter\n * @tag wc-code-highlighter\n * @rawTag code-highlighter\n *\n * @summary A component that provides syntax highlighting for code snippets.\n *\n * @example\n * ```html\n * <wc-code-highlighter language=\"javascript\" style=\"height: 9rem\"><pre><code>\n * function helloWorld() {\n * console.log('Hello, world!');\n * }</code></pre>\n * </wc-code-highlighter>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class CodeHighlighter extends LitElement {\n static styles = [styles];\n\n private static readonly COPY_FEEDBACK_DURATION = 3000;\n\n @property({ type: String, reflect: true })\n language: BundledLanguage = 'javascript';\n\n @property({ attribute: 'line-numbers', type: Boolean, reflect: true })\n lineNumbers: boolean = false;\n\n @property({ type: String })\n value: string = '';\n\n @property({ type: Boolean, reflect: true })\n format?: boolean = true;\n\n @property({ type: Boolean })\n hideCopy: boolean = false;\n\n @state() private compiledCode: string | null = null;\n\n @state() private _copied = false;\n\n private parsedCode: string | null = null;\n\n private _copyFeedbackTimeout: number | null = null;\n\n async connectedCallback() {\n // eslint-disable-next-line wc/guard-super-call\n super.connectedCallback();\n }\n\n disconnectedCallback() {\n if (this._copyFeedbackTimeout !== null) {\n window.clearTimeout(this._copyFeedbackTimeout);\n this._copyFeedbackTimeout = null;\n }\n super.disconnectedCallback();\n }\n\n firstUpdated() {\n this.__highlightCode();\n }\n\n // eslint-disable-next-line class-methods-use-this\n private decode(str: string) {\n return str.replace(/&lt;/g, '<').replace(/&gt;/g, '>');\n }\n\n private async __highlightCode() {\n let codeString = '';\n if (this.value) {\n codeString = this.value;\n } else {\n // Accessing light DOM children\n const codeTag = this.querySelector('code');\n if (codeTag) {\n codeString = codeTag.innerHTML;\n } else if (this.childNodes.length > 0) {\n codeString = (this as HTMLElement).innerText;\n }\n }\n\n codeString = this.decode(codeString);\n\n if (this.format !== false) {\n // eslint-disable-next-line default-case\n switch (this.language) {\n case 'javascript': {\n const [prettier, pluginBabel, pluginEstree] = await Promise.all([\n loadPrettier(),\n loadPluginBabel(),\n loadPluginEstree(),\n ]);\n codeString = await prettier.format(codeString, {\n parser: 'babel',\n plugins: [pluginBabel, pluginEstree],\n bracketSameLine: true,\n htmlWhitespaceSensitivity: 'ignore',\n });\n break;\n }\n case 'html': {\n const [prettier, pluginHtml] = await Promise.all([\n loadPrettier(),\n loadPluginHtml(),\n ]);\n codeString = await prettier.format(codeString, {\n parser: 'html',\n plugins: [pluginHtml],\n bracketSameLine: true,\n htmlWhitespaceSensitivity: 'ignore',\n });\n break;\n }\n case 'css': {\n const [prettier, pluginPostcss] = await Promise.all([\n loadPrettier(),\n loadPluginPostcss(),\n ]);\n codeString = await prettier.format(codeString, {\n parser: 'css',\n plugins: [pluginPostcss],\n });\n break;\n }\n }\n }\n\n this.parsedCode = codeString;\n\n const transformers: ShikiTransformer[] = [];\n\n // If line numbers are enabled, we inject a transformer\n // that adds the 'line' class to every line node.\n if (this.lineNumbers) {\n transformers.push({\n name: 'add-line-class',\n line(node) {\n // Shiki v1 helper to add classes to the AST\n this.addClassToHast(node, 'line');\n },\n });\n }\n\n const [\n { codeToHtml },\n [{ default: pierreDark }, { default: pierreLight }],\n ] = await Promise.all([loadShiki(), loadThemes()]);\n\n this.compiledCode = await codeToHtml(codeString, {\n lang: this.language,\n themes: {\n // @ts-ignore\n light: pierreLight,\n // @ts-ignore\n dark: pierreDark,\n },\n transformers,\n });\n }\n\n protected updated(changed: Map<PropertyKey, unknown>) {\n // Only re-highlight when the source content or rendering options change,\n // not on unrelated state updates like the copy-button feedback toggle.\n if (\n changed.has('value') ||\n changed.has('language') ||\n changed.has('lineNumbers') ||\n changed.has('format')\n ) {\n this.__highlightCode();\n }\n }\n\n private async __handleCopyClick() {\n if (this.parsedCode == null) {\n return;\n }\n\n await copyToClipboard(this.parsedCode);\n this._copied = true;\n\n if (this._copyFeedbackTimeout !== null) {\n window.clearTimeout(this._copyFeedbackTimeout);\n }\n\n this._copyFeedbackTimeout = window.setTimeout(() => {\n this._copied = false;\n this._copyFeedbackTimeout = null;\n }, CodeHighlighter.COPY_FEEDBACK_DURATION);\n }\n\n render() {\n if (this.compiledCode === null) {\n return html`\n <div class=\"code-loader\">\n <wc-circular-progress indeterminate></wc-circular-progress>\n ${locale.loading}\n </div>\n `;\n }\n\n return html`\n <div\n class=${classMap({\n 'code-highlighter': true,\n 'line-numbers': this.lineNumbers,\n })}\n >\n <div class=\"header\">\n <div class=\"header-title\">\n <slot name=\"title\">${this.language?.toUpperCase()}</slot>\n </div>\n <div class=\"header-actions\">\n <wc-icon-button\n color=${this._copied ? 'success' : 'surface'}\n variant=\"text\"\n size=\"xs\"\n aria-label=${this._copied\n ? locale.copied\n : locale.copyToClipboard}\n tooltip=${this._copied ? locale.copied : locale.copyToClipboard}\n @click=${this.__handleCopyClick}\n >\n <wc-icon\n name=${this._copied ? 'check' : 'content_copy'}\n ></wc-icon>\n </wc-icon-button>\n </div>\n </div>\n\n <div class=\"scroll-wrapper\">\n <div class=\"highlighter\">${unsafeHTML(this.compiledCode || '')}</div>\n </div>\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","classMap","unsafeHTML","styles","property","state"],"mapp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AAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AACA,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAGzC,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACxC,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAG7B,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACP,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAGnB,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAClB,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;AAGxB,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE;AACD,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAET,UAAA,CAAA;AAAhB,IAAAC,CAAK;AAA8C,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAEnC,UAAA,CAAA;AAAhB,IAAAA,CAAK;AAA2B,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAtBtB,eAAe,GAAA,iBAAA,GAAA,UAAA,CAAA;IAD3B;AACY,CAAA,EAAA,eAAe,CA2N3B;;;;"}
1
+ {"version":3,"file":"code-highlighter.js","sources":["../../src/__internal/utils/copy-to-clipboard.ts","../../src/code-highlighter/code-highlighter.ts"],"sourcesContent":["function fallbackCopyTextToClipboard(text: string) {\n const temporaryInput = document.createElement('textarea');\n temporaryInput.value = text;\n\n // Make the element non-visible but still in the DOM so it can be selected\n temporaryInput.setAttribute('readonly', '');\n temporaryInput.style.position = 'absolute';\n temporaryInput.style.left = '-9999px';\n\n document.body.appendChild(temporaryInput);\n temporaryInput.select();\n\n try {\n document.execCommand('copy');\n } catch (err) {\n console.error('Fallback: Failed to copy text: ', err);\n } finally {\n document.body.removeChild(temporaryInput);\n }\n}\n\nexport async function copyToClipboard(text: string) {\n if (navigator.clipboard && navigator.clipboard.writeText) {\n // Use the modern Clipboard API\n try {\n await navigator.clipboard.writeText(text);\n } catch (err) {\n console.error('Failed to copy text using Clipboard API: ', err);\n // Fallback if API fails for some reason\n fallbackCopyTextToClipboard(text);\n }\n } else {\n // Use the fallback method for older browsers\n fallbackCopyTextToClipboard(text);\n }\n}\n","import { html, LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport type { BundledLanguage, ShikiTransformer } from 'shiki';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport { copyToClipboard } from '@/__internal/utils/copy-to-clipboard.js';\nimport styles from './code-highlighter.scss';\n\n// Module-level promises – Rollup splits each import() specifier into a separate chunk.\n// Caching here prevents parallel loads when multiple instances initialise at the same time.\nlet _shiki: Promise<typeof import('shiki')> | null = null;\nlet _themes: Promise<\n [\n typeof import('@pierre/theme/pierre-dark'),\n typeof import('@pierre/theme/pierre-light'),\n ]\n> | null = null;\nlet _prettier: Promise<typeof import('prettier/standalone')> | null = null;\nlet _pluginBabel: Promise<typeof import('prettier/plugins/babel')> | null =\n null;\nlet _pluginHtml: Promise<typeof import('prettier/plugins/html')> | null = null;\nlet _pluginPostcss: Promise<typeof import('prettier/plugins/postcss')> | null =\n null;\nlet _pluginEstree: Promise<typeof import('prettier/plugins/estree')> | null =\n null;\n\nconst loadShiki = () => (_shiki ??= import('shiki'));\n\nconst loadThemes = () =>\n (_themes ??= Promise.all([\n import('@pierre/theme/pierre-dark'),\n import('@pierre/theme/pierre-light'),\n ]));\n\nconst loadPrettier = () => (_prettier ??= import('prettier/standalone'));\nconst loadPluginBabel = () =>\n (_pluginBabel ??= import('prettier/plugins/babel'));\nconst loadPluginHtml = () => (_pluginHtml ??= import('prettier/plugins/html'));\nconst loadPluginPostcss = () =>\n (_pluginPostcss ??= import('prettier/plugins/postcss'));\nconst loadPluginEstree = () =>\n (_pluginEstree ??= import('prettier/plugins/estree'));\n\nconst locale = {\n loading: 'Loading code...',\n copyToClipboard: 'Copy to clipboard',\n copied: 'Copied',\n copiedCode: 'Copied code',\n};\n\n/**\n * @label Code Highlighter\n * @tag wc-code-highlighter\n * @rawTag code-highlighter\n *\n * @summary A component that provides syntax highlighting for code snippets.\n *\n * @example\n * ```html\n * <wc-code-highlighter language=\"javascript\" style=\"height: 9rem\"><pre><code>\n * function helloWorld() {\n * console.log('Hello, world!');\n * }</code></pre>\n * </wc-code-highlighter>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class CodeHighlighter extends LitElement {\n static styles = [styles];\n\n private static readonly COPY_FEEDBACK_DURATION = 3000;\n\n @property({ type: String, reflect: true })\n language: BundledLanguage = 'javascript';\n\n @property({ attribute: 'line-numbers', type: Boolean, reflect: true })\n lineNumbers: boolean = false;\n\n @property({ type: String })\n value: string = '';\n\n @property({ type: Boolean, reflect: true })\n format?: boolean = true;\n\n @property({ type: Boolean })\n hideCopy: boolean = false;\n\n @state() private compiledCode: string | null = null;\n\n @state() private _copied = false;\n\n private parsedCode: string | null = null;\n\n private _copyFeedbackTimeout: number | null = null;\n\n async connectedCallback() {\n // eslint-disable-next-line wc/guard-super-call\n super.connectedCallback();\n }\n\n disconnectedCallback() {\n if (this._copyFeedbackTimeout !== null) {\n window.clearTimeout(this._copyFeedbackTimeout);\n this._copyFeedbackTimeout = null;\n }\n super.disconnectedCallback();\n }\n\n firstUpdated() {\n this.__highlightCode();\n }\n\n // eslint-disable-next-line class-methods-use-this\n private decode(str: string) {\n return str.replace(/&lt;/g, '<').replace(/&gt;/g, '>');\n }\n\n private async __highlightCode() {\n let codeString = '';\n if (this.value) {\n codeString = this.value;\n } else {\n // Accessing light DOM children\n const codeTag = this.querySelector('code');\n if (codeTag) {\n codeString = codeTag.innerHTML;\n } else if (this.childNodes.length > 0) {\n codeString = (this as HTMLElement).innerText;\n }\n }\n\n codeString = this.decode(codeString);\n\n if (this.format !== false) {\n // eslint-disable-next-line default-case\n switch (this.language) {\n case 'javascript': {\n const [prettier, pluginBabel, pluginEstree] = await Promise.all([\n loadPrettier(),\n loadPluginBabel(),\n loadPluginEstree(),\n ]);\n codeString = await prettier.format(codeString, {\n parser: 'babel',\n plugins: [pluginBabel, pluginEstree],\n bracketSameLine: true,\n htmlWhitespaceSensitivity: 'ignore',\n });\n break;\n }\n case 'html': {\n const [prettier, pluginHtml] = await Promise.all([\n loadPrettier(),\n loadPluginHtml(),\n ]);\n codeString = await prettier.format(codeString, {\n parser: 'html',\n plugins: [pluginHtml],\n bracketSameLine: true,\n htmlWhitespaceSensitivity: 'ignore',\n });\n break;\n }\n case 'css': {\n const [prettier, pluginPostcss] = await Promise.all([\n loadPrettier(),\n loadPluginPostcss(),\n ]);\n codeString = await prettier.format(codeString, {\n parser: 'css',\n plugins: [pluginPostcss],\n });\n break;\n }\n }\n }\n\n this.parsedCode = codeString;\n\n const transformers: ShikiTransformer[] = [];\n\n // If line numbers are enabled, we inject a transformer\n // that adds the 'line' class to every line node.\n if (this.lineNumbers) {\n transformers.push({\n name: 'add-line-class',\n line(node) {\n // Shiki v1 helper to add classes to the AST\n this.addClassToHast(node, 'line');\n },\n });\n }\n\n const [\n { codeToHtml },\n [{ default: pierreDark }, { default: pierreLight }],\n ] = await Promise.all([loadShiki(), loadThemes()]);\n\n this.compiledCode = await codeToHtml(codeString, {\n lang: this.language,\n themes: {\n // @ts-ignore\n light: pierreLight,\n // @ts-ignore\n dark: pierreDark,\n },\n transformers,\n });\n }\n\n protected updated(changed: Map<PropertyKey, unknown>) {\n // Only re-highlight when the source content or rendering options change,\n // not on unrelated state updates like the copy-button feedback toggle.\n if (\n changed.has('value') ||\n changed.has('language') ||\n changed.has('lineNumbers') ||\n changed.has('format')\n ) {\n this.__highlightCode();\n }\n }\n\n private async __handleCopyClick() {\n if (this.parsedCode == null) {\n return;\n }\n\n await copyToClipboard(this.parsedCode);\n this._copied = true;\n\n if (this._copyFeedbackTimeout !== null) {\n window.clearTimeout(this._copyFeedbackTimeout);\n }\n\n this._copyFeedbackTimeout = window.setTimeout(() => {\n this._copied = false;\n this._copyFeedbackTimeout = null;\n }, CodeHighlighter.COPY_FEEDBACK_DURATION);\n }\n\n render() {\n if (this.compiledCode === null) {\n return html`\n <div class=\"code-loader\">\n <wc-circular-progress indeterminate></wc-circular-progress>\n ${locale.loading}\n </div>\n `;\n }\n\n return html`\n <div\n class=${classMap({\n 'code-highlighter': true,\n 'line-numbers': this.lineNumbers,\n })}\n >\n <div class=\"header\">\n <div class=\"header-title\">\n <slot name=\"title\">${this.language?.toUpperCase()}</slot>\n </div>\n <div class=\"header-actions\">\n <wc-icon-button\n color=${this._copied ? 'success' : 'surface'}\n variant=\"text\"\n size=\"xs\"\n aria-label=${this._copied\n ? locale.copied\n : locale.copyToClipboard}\n tooltip=${this._copied ? locale.copied : locale.copyToClipboard}\n @click=${this.__handleCopyClick}\n >\n <wc-icon\n name=${this._copied ? 'check' : 'content_copy'}\n ></wc-icon>\n </wc-icon-button>\n </div>\n </div>\n\n <div class=\"scroll-wrapper\">\n <div class=\"highlighter\">${unsafeHTML(this.compiledCode || '')}</div>\n </div>\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","classMap","unsafeHTML","styles","property","state"],"mappings":";;;;;;;AAAA,SAAS,2BAA2B,CAAC,IAAY,EAAA;IAC/C,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC;AACzD,IAAA,cAAc,CAAC,KAAK,GAAG,IAAI;;AAG3B,IAAA,cAAc,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,CAAC;AAC3C,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EAAE;AACxC,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAG7B,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;AACP,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAGnB,UAAA,CAAA;IADCA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAClB,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;AAGxB,UAAA,CAAA;AADC,IAAAA,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE;AACD,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAET,UAAA,CAAA;AAAhB,IAAAC,CAAK;AAA8C,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAEnC,UAAA,CAAA;AAAhB,IAAAA,CAAK;AAA2B,CAAA,EAAA,eAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAtBtB,eAAe,GAAA,iBAAA,GAAA,UAAA,CAAA;IAD3B;AACY,CAAA,EAAA,eAAe,CA2N3B;;;;"}
@@ -2,6 +2,7 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, b } from './Ind
2
2
 
3
3
  var css_248z = i`* {
4
4
  box-sizing: border-box;
5
+ -webkit-tap-highlight-color: transparent;
5
6
  }
6
7
 
7
8
  .screen-reader-only {
@@ -1 +1 @@
1
- {"version":3,"file":"condition-builder.js","sources":["../../src/condition-builder/condition-builder.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './condition-builder.scss';\n\n/**\n * @label Condition Builder\n * @tag wc-condition-builder\n * @rawTag condition-builder\n * @summary A condition builder component that allows users to construct complex filter conditions using a visual rule-based interface with predicates, compound expressions, and logical operators.\n * @tags condition-builder\n *\n * @example\n * ```html\n * <wc-condition-builder>\n * <wc-cb-predicate condition-operator=\"or\">\n * <wc-cb-predicate vertical condition-operator=\"and\">\n * <wc-cb-compound-expression field-label=\"Age\" condition-operator=\"or\">\n * <wc-cb-expression>\n * <wc-input inline placeholder=\"Enter value\"></wc-input>\n * </wc-cb-expression>\n * </wc-cb-compound-expression>\n * </wc-cb-predicate>\n * </wc-cb-predicate>\n * </wc-condition-builder>\n * ```\n */\n@IndividualComponent\nexport class ConditionBuilder extends LitElement {\n static styles = [styles];\n\n render() {\n return html`\n <div class=\"condition-builder\">\n <slot></slot>\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAIA;;;;;;;;;;;;;;;;;;;;;AAqBG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQA,GAAU,CAAA;IAG9C,MAAM,GAAA;AACJ,QAAA,OAAOC,CAAI,CAAA;;;;KAIV;IACH;;AARO,gBAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AADb,gBAAgB,GAAA,UAAA,CAAA;IAD5B;AACY,CAAA,EAAA,gBAAgB,CAU5B;;;;"}
1
+ {"version":3,"file":"condition-builder.js","sources":["../../src/condition-builder/condition-builder.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './condition-builder.scss';\n\n/**\n * @label Condition Builder\n * @tag wc-condition-builder\n * @rawTag condition-builder\n * @summary A condition builder component that allows users to construct complex filter conditions using a visual rule-based interface with predicates, compound expressions, and logical operators.\n * @tags condition-builder\n *\n * @example\n * ```html\n * <wc-condition-builder>\n * <wc-cb-predicate condition-operator=\"or\">\n * <wc-cb-predicate vertical condition-operator=\"and\">\n * <wc-cb-compound-expression field-label=\"Age\" condition-operator=\"or\">\n * <wc-cb-expression>\n * <wc-input inline placeholder=\"Enter value\"></wc-input>\n * </wc-cb-expression>\n * </wc-cb-compound-expression>\n * </wc-cb-predicate>\n * </wc-cb-predicate>\n * </wc-condition-builder>\n * ```\n */\n@IndividualComponent\nexport class ConditionBuilder extends LitElement {\n static styles = [styles];\n\n render() {\n return html`\n <div class=\"condition-builder\">\n <slot></slot>\n </div>\n `;\n }\n}\n"],"names":["LitElement","html","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;;;;;;;;;;;;;;;;;;;;AAqBG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQA,GAAU,CAAA;IAG9C,MAAM,GAAA;AACJ,QAAA,OAAOC,CAAI,CAAA;;;;KAIV;IACH;;AARO,gBAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AADb,gBAAgB,GAAA,UAAA,CAAA;IAD5B;AACY,CAAA,EAAA,gBAAgB,CAU5B;;;;"}
package/dist/container.js CHANGED
@@ -5,6 +5,7 @@ import './directive-ZPhl09Yt.js';
5
5
 
6
6
  var css_248z = i`* {
7
7
  box-sizing: border-box;
8
+ -webkit-tap-highlight-color: transparent;
8
9
  }
9
10
 
10
11
  .screen-reader-only {
@@ -1 +1 @@
1
- {"version":3,"file":"container.js","sources":["../../src/container/container.ts"],"sourcesContent":["import { LitElement, html, css } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport styles from './container.scss';\nimport IndividualComponent from '@/IndividualComponent.js';\n\ntype ContainerSize = 'max' | 'xl' | 'lg' | 'md' | 'sm' | 'full';\n\n/**\n * @label Container\n * @tag wc-container\n * @rawTag container\n * @summary A responsive container component for layout.\n * @cssprop --container-max-width - Controls the maximum width of the container.\n * @cssprop --container-padding - Controls the padding of the container.\n * @tags layout\n *\n * @example\n * ```html\n * <wc-container style=\"width: 80%; border: 1px dotted black;\" size=\"md\">Content</wc-container>\n * ```\n */\n@IndividualComponent\nexport class Container extends LitElement {\n static styles = [styles];\n\n /**\n * Max-width breakpoint of the container.\n * Possible values are `\"max\"`, `\"xl\"`, `\"lg\"`, `\"md\"`, `\"sm\"`, `\"full\"`. Defaults to `\"full\"`.\n */\n @property({ type: String, reflect: true })\n size: ContainerSize = 'full';\n\n render() {\n const wrapperClasses = {\n 'container-wrapper': true,\n [`size-${this.size}`]: true,\n };\n\n return html`\n <div class=${classMap(wrapperClasses)}>\n <div class=\"container\">\n <div class=\"content\">\n <slot></slot>\n </div>\n </div>\n </div>\n `;\n }\n}"],"names":["LitElement","html","classMap","styles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA;;;;;;;;;;;;;AAaG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQA,GAAU,CAAA;AAAlC,IAAA,WAAA,GAAA;;AAGL;;;AAGG;QAEH,IAAA,CAAA,IAAI,GAAkB,MAAM;IAkB9B;IAhBE,MAAM,GAAA;AACJ,QAAA,MAAM,cAAc,GAAG;AACrB,YAAA,mBAAmB,EAAE,IAAI;AACzB,YAAA,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAA,CAAE,GAAG,IAAI;SAC5B;AAED,QAAA,OAAOC,CAAI,CAAA;mBACIC,CAAQ,CAAC,cAAc,CAAC,CAAA;;;;;;;KAOtC;IACH;;AAxBO,SAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AAOxB,UAAA,CAAA;IADCC,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AACZ,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AARlB,SAAS,GAAA,UAAA,CAAA;IADrB;AACY,CAAA,EAAA,SAAS,CA0BrB;;;;"}
1
+ {"version":3,"file":"container.js","sources":["../../src/container/container.ts"],"sourcesContent":["import { LitElement, html, css } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport styles from './container.scss';\nimport IndividualComponent from '@/IndividualComponent.js';\n\ntype ContainerSize = 'max' | 'xl' | 'lg' | 'md' | 'sm' | 'full';\n\n/**\n * @label Container\n * @tag wc-container\n * @rawTag container\n * @summary A responsive container component for layout.\n * @cssprop --container-max-width - Controls the maximum width of the container.\n * @cssprop --container-padding - Controls the padding of the container.\n * @tags layout\n *\n * @example\n * ```html\n * <wc-container style=\"width: 80%; border: 1px dotted black;\" size=\"md\">Content</wc-container>\n * ```\n */\n@IndividualComponent\nexport class Container extends LitElement {\n static styles = [styles];\n\n /**\n * Max-width breakpoint of the container.\n * Possible values are `\"max\"`, `\"xl\"`, `\"lg\"`, `\"md\"`, `\"sm\"`, `\"full\"`. Defaults to `\"full\"`.\n */\n @property({ type: String, reflect: true })\n size: ContainerSize = 'full';\n\n render() {\n const wrapperClasses = {\n 'container-wrapper': true,\n [`size-${this.size}`]: true,\n };\n\n return html`\n <div class=${classMap(wrapperClasses)}>\n <div class=\"container\">\n <div class=\"content\">\n <slot></slot>\n </div>\n </div>\n </div>\n `;\n }\n}"],"names":["LitElement","html","classMap","styles","property"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA;;;;;;;;;;;;;AAaG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQA,GAAU,CAAA;AAAlC,IAAA,WAAA,GAAA;;AAGL;;;AAGG;QAEH,IAAA,CAAA,IAAI,GAAkB,MAAM;IAkB9B;IAhBE,MAAM,GAAA;AACJ,QAAA,MAAM,cAAc,GAAG;AACrB,YAAA,mBAAmB,EAAE,IAAI;AACzB,YAAA,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAA,CAAE,GAAG,IAAI;SAC5B;AAED,QAAA,OAAOC,CAAI,CAAA;mBACIC,CAAQ,CAAC,cAAc,CAAC,CAAA;;;;;;;KAOtC;IACH;;AAxBO,SAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AAOxB,UAAA,CAAA;IADCC,CAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AACZ,CAAA,EAAA,SAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AARlB,SAAS,GAAA,UAAA,CAAA;IADrB;AACY,CAAA,EAAA,SAAS,CA0BrB;;;;"}
@@ -11,22 +11,31 @@
11
11
  "description": "",
12
12
  "attributes": [
13
13
  {
14
- "name": "multi",
14
+ "name": "multiple",
15
15
  "type": {
16
16
  "text": "boolean"
17
17
  },
18
18
  "default": "false",
19
19
  "description": "Whether multiple panels can be expanded simultaneously.\nWhen `false` (default), expanding one panel collapses all others.",
20
- "fieldName": "multi"
20
+ "fieldName": "multiple"
21
21
  },
22
22
  {
23
- "name": "display-mode",
23
+ "name": "variant",
24
24
  "type": {
25
25
  "text": "'default' | 'flat'"
26
26
  },
27
27
  "default": "'default'",
28
- "description": "Display mode for the accordion.\n`'default'` renders panels with a subtle background on expand and dividers between items.\n`'flat'` renders panels without borders or background changes — suitable for use inside cards.",
29
- "fieldName": "displayMode"
28
+ "description": "Variant for the accordion.\n`'default'` renders panels with a subtle background on expand and dividers between items.\n`'flat'` renders panels without borders or background changes — suitable for use inside cards.",
29
+ "fieldName": "variant"
30
+ },
31
+ {
32
+ "name": "leading-toggle",
33
+ "type": {
34
+ "text": "boolean"
35
+ },
36
+ "default": "false",
37
+ "description": "When `true`, the toggle icon is placed at the leading start of the header.\nWhen `false` (default), the icon is placed at the trailing end.",
38
+ "fieldName": "leadingToggle"
30
39
  }
31
40
  ],
32
41
  "superclass": {
@@ -485,7 +494,7 @@
485
494
  "rawTag": "button",
486
495
  "summary": "Buttons help people initiate actions, from sending an email, to sharing a document, to liking a post.",
487
496
  "overview": "<p>Buttons are clickable elements that are used to trigger actions. They communicate calls to action to the user and allow users to interact with pages in a variety of ways. Button labels express what action will occur when the user interacts with it.</p>",
488
- "cssprop": "--neo-button-label-text-color: Text color of the neo button label.",
497
+ "cssprop": "--neo-button-label-text-color - Text color of the neo button label.",
489
498
  "fires": "click - Dispatched when the button is clicked.",
490
499
  "example": "```html\n<wc-button>Button</wc-button>\n```",
491
500
  "tags": "display",
@@ -495,67 +504,67 @@
495
504
  "cssProperties": [
496
505
  {
497
506
  "description": "Defines the border radius of the button container shape.",
498
- "name": "--button-container-shape:"
507
+ "name": "--button-container-shape"
499
508
  },
500
509
  {
501
510
  "description": "Defines the start position of the button container shape.",
502
- "name": "--button-container-shape-start-start:"
511
+ "name": "--button-container-shape-start-start"
503
512
  },
504
513
  {
505
514
  "description": "Defines the end position of the button container shape.",
506
- "name": "--button-container-shape-start-end:"
515
+ "name": "--button-container-shape-start-end"
507
516
  },
508
517
  {
509
518
  "description": "Defines the start position of the button container shape.",
510
- "name": "--button-container-shape-end-start:"
519
+ "name": "--button-container-shape-end-start"
511
520
  },
512
521
  {
513
522
  "description": "Defines the end position of the button container shape.",
514
- "name": "--button-container-shape-end-end:"
523
+ "name": "--button-container-shape-end-end"
515
524
  },
516
525
  {
517
526
  "description": "Color of the filled button container.",
518
- "name": "--filled-button-container-color:"
527
+ "name": "--filled-button-container-color"
519
528
  },
520
529
  {
521
530
  "description": "Text color of the filled button label.",
522
- "name": "--filled-button-label-text-color:"
531
+ "name": "--filled-button-label-text-color"
523
532
  },
524
533
  {
525
534
  "description": "Color of the outlined button container.",
526
- "name": "--outlined-button-container-color:"
535
+ "name": "--outlined-button-container-color"
527
536
  },
528
537
  {
529
538
  "description": "Text color of the outlined button label.",
530
- "name": "--outlined-button-label-text-color:"
539
+ "name": "--outlined-button-label-text-color"
531
540
  },
532
541
  {
533
542
  "description": "Text color of the text button label.",
534
- "name": "--text-button-label-text-color:"
543
+ "name": "--text-button-label-text-color"
535
544
  },
536
545
  {
537
546
  "description": "Color of the tonal button container.",
538
- "name": "--tonal-button-container-color:"
547
+ "name": "--tonal-button-container-color"
539
548
  },
540
549
  {
541
550
  "description": "Text color of the tonal button label.",
542
- "name": "--tonal-button-label-text-color:"
551
+ "name": "--tonal-button-label-text-color"
543
552
  },
544
553
  {
545
554
  "description": "Color of the elevated button container.",
546
- "name": "--elevated-button-container-color:"
555
+ "name": "--elevated-button-container-color"
547
556
  },
548
557
  {
549
558
  "description": "Text color of the elevated button label.",
550
- "name": "--elevated-button-label-text-color:"
559
+ "name": "--elevated-button-label-text-color"
551
560
  },
552
561
  {
553
562
  "description": "Color of the neo button container.",
554
- "name": "--neo-button-container-color:"
563
+ "name": "--neo-button-container-color"
555
564
  },
556
565
  {
557
566
  "description": "Text color of the neo button label.",
558
- "name": "--neo-button-label-text-color:"
567
+ "name": "--neo-button-label-text-color"
559
568
  }
560
569
  ],
561
570
  "events": [
@@ -574,7 +583,7 @@
574
583
  "text": "boolean"
575
584
  },
576
585
  "default": "false",
577
- "description": "Icon alignment.\nPossible values are `\"start\"`, `\"end\"`. Defaults to `\"end\"`.",
586
+ "description": "When `true` (default), the icon is placed after the label (trailing).\nWhen `false`, the icon is placed before the label (leading).",
578
587
  "fieldName": "trailingIcon"
579
588
  },
580
589
  {
@@ -2058,67 +2058,67 @@
2058
2058
  "cssProperties": [
2059
2059
  {
2060
2060
  "description": "Defines the border radius of the button container shape.",
2061
- "name": "--button-container-shape:"
2061
+ "name": "--button-container-shape"
2062
2062
  },
2063
2063
  {
2064
2064
  "description": "Defines the start position of the button container shape.",
2065
- "name": "--button-container-shape-start-start:"
2065
+ "name": "--button-container-shape-start-start"
2066
2066
  },
2067
2067
  {
2068
2068
  "description": "Defines the end position of the button container shape.",
2069
- "name": "--button-container-shape-start-end:"
2069
+ "name": "--button-container-shape-start-end"
2070
2070
  },
2071
2071
  {
2072
2072
  "description": "Defines the start position of the button container shape.",
2073
- "name": "--button-container-shape-end-start:"
2073
+ "name": "--button-container-shape-end-start"
2074
2074
  },
2075
2075
  {
2076
2076
  "description": "Defines the end position of the button container shape.",
2077
- "name": "--button-container-shape-end-end:"
2077
+ "name": "--button-container-shape-end-end"
2078
2078
  },
2079
2079
  {
2080
2080
  "description": "Color of the filled button container.",
2081
- "name": "--filled-button-container-color:"
2081
+ "name": "--filled-button-container-color"
2082
2082
  },
2083
2083
  {
2084
2084
  "description": "Text color of the filled button label.",
2085
- "name": "--filled-button-label-text-color:"
2085
+ "name": "--filled-button-label-text-color"
2086
2086
  },
2087
2087
  {
2088
2088
  "description": "Color of the outlined button container.",
2089
- "name": "--outlined-button-container-color:"
2089
+ "name": "--outlined-button-container-color"
2090
2090
  },
2091
2091
  {
2092
2092
  "description": "Text color of the outlined button label.",
2093
- "name": "--outlined-button-label-text-color:"
2093
+ "name": "--outlined-button-label-text-color"
2094
2094
  },
2095
2095
  {
2096
2096
  "description": "Text color of the text button label.",
2097
- "name": "--text-button-label-text-color:"
2097
+ "name": "--text-button-label-text-color"
2098
2098
  },
2099
2099
  {
2100
2100
  "description": "Color of the tonal button container.",
2101
- "name": "--tonal-button-container-color:"
2101
+ "name": "--tonal-button-container-color"
2102
2102
  },
2103
2103
  {
2104
2104
  "description": "Text color of the tonal button label.",
2105
- "name": "--tonal-button-label-text-color:"
2105
+ "name": "--tonal-button-label-text-color"
2106
2106
  },
2107
2107
  {
2108
2108
  "description": "Color of the elevated button container.",
2109
- "name": "--elevated-button-container-color:"
2109
+ "name": "--elevated-button-container-color"
2110
2110
  },
2111
2111
  {
2112
2112
  "description": "Text color of the elevated button label.",
2113
- "name": "--elevated-button-label-text-color:"
2113
+ "name": "--elevated-button-label-text-color"
2114
2114
  },
2115
2115
  {
2116
2116
  "description": "Color of the neo button container.",
2117
- "name": "--neo-button-container-color:"
2117
+ "name": "--neo-button-container-color"
2118
2118
  },
2119
2119
  {
2120
2120
  "description": "Text color of the neo button label.",
2121
- "name": "--neo-button-label-text-color:"
2121
+ "name": "--neo-button-label-text-color"
2122
2122
  }
2123
2123
  ],
2124
2124
  "members": [
@@ -2138,7 +2138,7 @@
2138
2138
  "text": "boolean"
2139
2139
  },
2140
2140
  "default": "false",
2141
- "description": "Icon alignment.\nPossible values are `\"start\"`, `\"end\"`. Defaults to `\"end\"`.",
2141
+ "description": "When `true` (default), the icon is placed after the label (trailing).\nWhen `false`, the icon is placed before the label (leading).",
2142
2142
  "attribute": "trailing-icon",
2143
2143
  "reflects": true
2144
2144
  },
@@ -2643,7 +2643,7 @@
2643
2643
  "text": "boolean"
2644
2644
  },
2645
2645
  "default": "false",
2646
- "description": "Icon alignment.\nPossible values are `\"start\"`, `\"end\"`. Defaults to `\"end\"`.",
2646
+ "description": "When `true` (default), the icon is placed after the label (trailing).\nWhen `false`, the icon is placed before the label (leading).",
2647
2647
  "fieldName": "trailingIcon"
2648
2648
  },
2649
2649
  {
@@ -6396,17 +6396,6 @@
6396
6396
  "attribute": "hide-toggle",
6397
6397
  "reflects": true
6398
6398
  },
6399
- {
6400
- "kind": "field",
6401
- "name": "togglePosition",
6402
- "type": {
6403
- "text": "'before' | 'after'"
6404
- },
6405
- "default": "'after'",
6406
- "description": "Position of the toggle icon relative to the panel title.\n`'after'` places it at the trailing end (default, matches M3).\n`'before'` places it at the leading start.",
6407
- "attribute": "toggle-position",
6408
- "reflects": true
6409
- },
6410
6399
  {
6411
6400
  "kind": "field",
6412
6401
  "name": "_hasDescriptionSlot",
@@ -6477,7 +6466,7 @@
6477
6466
  ],
6478
6467
  "events": [
6479
6468
  {
6480
- "name": "accordion-item:toggle",
6469
+ "name": "accordion-item-toggle",
6481
6470
  "type": {
6482
6471
  "text": "CustomEvent<{ open: boolean }>"
6483
6472
  },
@@ -6511,15 +6500,6 @@
6511
6500
  "default": "false",
6512
6501
  "description": "Whether to hide the expand/collapse toggle indicator icon.",
6513
6502
  "fieldName": "hideToggle"
6514
- },
6515
- {
6516
- "name": "toggle-position",
6517
- "type": {
6518
- "text": "'before' | 'after'"
6519
- },
6520
- "default": "'after'",
6521
- "description": "Position of the toggle icon relative to the panel title.\n`'after'` places it at the trailing end (default, matches M3).\n`'before'` places it at the leading start.",
6522
- "fieldName": "togglePosition"
6523
6503
  }
6524
6504
  ],
6525
6505
  "superclass": {
@@ -6557,24 +6537,35 @@
6557
6537
  "members": [
6558
6538
  {
6559
6539
  "kind": "field",
6560
- "name": "multi",
6540
+ "name": "multiple",
6561
6541
  "type": {
6562
6542
  "text": "boolean"
6563
6543
  },
6564
6544
  "default": "false",
6565
6545
  "description": "Whether multiple panels can be expanded simultaneously.\nWhen `false` (default), expanding one panel collapses all others.",
6566
- "attribute": "multi",
6546
+ "attribute": "multiple",
6567
6547
  "reflects": true
6568
6548
  },
6569
6549
  {
6570
6550
  "kind": "field",
6571
- "name": "displayMode",
6551
+ "name": "variant",
6572
6552
  "type": {
6573
6553
  "text": "'default' | 'flat'"
6574
6554
  },
6575
6555
  "default": "'default'",
6576
- "description": "Display mode for the accordion.\n`'default'` renders panels with a subtle background on expand and dividers between items.\n`'flat'` renders panels without borders or background changes — suitable for use inside cards.",
6577
- "attribute": "display-mode",
6556
+ "description": "Variant for the accordion.\n`'default'` renders panels with a subtle background on expand and dividers between items.\n`'flat'` renders panels without borders or background changes — suitable for use inside cards.",
6557
+ "attribute": "variant",
6558
+ "reflects": true
6559
+ },
6560
+ {
6561
+ "kind": "field",
6562
+ "name": "leadingToggle",
6563
+ "type": {
6564
+ "text": "boolean"
6565
+ },
6566
+ "default": "false",
6567
+ "description": "When `true`, the toggle icon is placed at the leading start of the header.\nWhen `false` (default), the icon is placed at the trailing end.",
6568
+ "attribute": "leading-toggle",
6578
6569
  "reflects": true
6579
6570
  },
6580
6571
  {
@@ -6619,22 +6610,31 @@
6619
6610
  ],
6620
6611
  "attributes": [
6621
6612
  {
6622
- "name": "multi",
6613
+ "name": "multiple",
6623
6614
  "type": {
6624
6615
  "text": "boolean"
6625
6616
  },
6626
6617
  "default": "false",
6627
6618
  "description": "Whether multiple panels can be expanded simultaneously.\nWhen `false` (default), expanding one panel collapses all others.",
6628
- "fieldName": "multi"
6619
+ "fieldName": "multiple"
6629
6620
  },
6630
6621
  {
6631
- "name": "display-mode",
6622
+ "name": "variant",
6632
6623
  "type": {
6633
6624
  "text": "'default' | 'flat'"
6634
6625
  },
6635
6626
  "default": "'default'",
6636
- "description": "Display mode for the accordion.\n`'default'` renders panels with a subtle background on expand and dividers between items.\n`'flat'` renders panels without borders or background changes — suitable for use inside cards.",
6637
- "fieldName": "displayMode"
6627
+ "description": "Variant for the accordion.\n`'default'` renders panels with a subtle background on expand and dividers between items.\n`'flat'` renders panels without borders or background changes — suitable for use inside cards.",
6628
+ "fieldName": "variant"
6629
+ },
6630
+ {
6631
+ "name": "leading-toggle",
6632
+ "type": {
6633
+ "text": "boolean"
6634
+ },
6635
+ "default": "false",
6636
+ "description": "When `true`, the toggle icon is placed at the leading start of the header.\nWhen `false` (default), the icon is placed at the trailing end.",
6637
+ "fieldName": "leadingToggle"
6638
6638
  }
6639
6639
  ],
6640
6640
  "superclass": {
package/dist/divider.js CHANGED
@@ -7,6 +7,7 @@ import './directive-ZPhl09Yt.js';
7
7
 
8
8
  var css_248z = i`* {
9
9
  box-sizing: border-box;
10
+ -webkit-tap-highlight-color: transparent;
10
11
  }
11
12
 
12
13
  .screen-reader-only {
@@ -1 +1 @@
1
- {"version":3,"file":"divider.js","sources":["../../src/divider/divider.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport { observerSlotChangesWithCallback } from '@/__internal/utils/observe-slot-change.js';\n\nimport styles from './divider.scss';\nimport IndividualComponent from '@/IndividualComponent.js';\n\n/**\n * @label Divider\n * @tag wc-divider\n * @rawTag divider\n *\n * @summary The divider component is used to visually separate content.\n * @overview\n * - Dividers are used to separate content into clear groups, making it easier for users to scan and understand the information presented.\n * - They can be oriented either vertically or horizontally, depending on the layout requirements.\n *\n * @cssprop --divider-color - Controls the color of the divider.\n * @cssprop --divider-padding - Controls the padding of the divider.\n *\n * @example\n * ```html\n * <wc-divider style=\"width: 12rem;\">or</wc-divider>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class Divider extends LitElement {\n static styles = [styles];\n\n /** When true, renders the divider vertically. Defaults to horizontal. */\n @property({ type: Boolean, reflect: true }) vertical = false;\n\n /** True when the default slot contains content, used to show the label variant. */\n @state()\n slotHasContent = false;\n\n firstUpdated() {\n observerSlotChangesWithCallback(\n this.renderRoot.querySelector('slot'),\n hasContent => {\n this.slotHasContent = hasContent;\n this.requestUpdate();\n },\n );\n }\n\n render() {\n return html`<div\n class=${classMap({\n divider: true,\n vertical: this.vertical,\n 'slot-has-content': this.slotHasContent,\n })}\n >\n <div class=\"line\"></div>\n <div class=\"slot-container\">\n <slot></slot>\n </div>\n <div class=\"line\"></div>\n </div>`;\n }\n}\n"],"names":["LitElement","html","classMap","styles","property","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA;;;;;;;;;;;;;;;;;;AAkBG;AAEI,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQA,GAAU,CAAA;AAAhC,IAAA,WAAA,GAAA;;;QAIuC,IAAA,CAAA,QAAQ,GAAG,KAAK;;QAI5D,IAAA,CAAA,cAAc,GAAG,KAAK;IA2BxB;IAzBE,YAAY,GAAA;AACV,QAAA,+BAA+B,CAC7B,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC,EACrC,UAAU,IAAG;AACX,YAAA,IAAI,CAAC,cAAc,GAAG,UAAU;YAChC,IAAI,CAAC,aAAa,EAAE;AACtB,QAAA,CAAC,CACF;IACH;IAEA,MAAM,GAAA;AACJ,QAAA,OAAOC,CAAI,CAAA,CAAA;AACD,YAAA,EAAAC,CAAQ,CAAC;AACf,YAAA,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,kBAAkB,EAAE,IAAI,CAAC,cAAc;SACxC,CAAC;;;;;;;WAOG;IACT;;AAjCO,OAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AAGoB,UAAA,CAAA;IAA3CC,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAAmB,CAAA,EAAA,OAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAI7D,UAAA,CAAA;AADC,IAAAC,CAAK;AACiB,CAAA,EAAA,OAAA,CAAA,SAAA,EAAA,gBAAA,EAAA,MAAA,CAAA;AARZ,OAAO,GAAA,UAAA,CAAA;IADnB;AACY,CAAA,EAAA,OAAO,CAmCnB;;;;"}
1
+ {"version":3,"file":"divider.js","sources":["../../src/divider/divider.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\n\nimport { observerSlotChangesWithCallback } from '@/__internal/utils/observe-slot-change.js';\n\nimport styles from './divider.scss';\nimport IndividualComponent from '@/IndividualComponent.js';\n\n/**\n * @label Divider\n * @tag wc-divider\n * @rawTag divider\n *\n * @summary The divider component is used to visually separate content.\n * @overview\n * - Dividers are used to separate content into clear groups, making it easier for users to scan and understand the information presented.\n * - They can be oriented either vertically or horizontally, depending on the layout requirements.\n *\n * @cssprop --divider-color - Controls the color of the divider.\n * @cssprop --divider-padding - Controls the padding of the divider.\n *\n * @example\n * ```html\n * <wc-divider style=\"width: 12rem;\">or</wc-divider>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class Divider extends LitElement {\n static styles = [styles];\n\n /** When true, renders the divider vertically. Defaults to horizontal. */\n @property({ type: Boolean, reflect: true }) vertical = false;\n\n /** True when the default slot contains content, used to show the label variant. */\n @state()\n slotHasContent = false;\n\n firstUpdated() {\n observerSlotChangesWithCallback(\n this.renderRoot.querySelector('slot'),\n hasContent => {\n this.slotHasContent = hasContent;\n this.requestUpdate();\n },\n );\n }\n\n render() {\n return html`<div\n class=${classMap({\n divider: true,\n vertical: this.vertical,\n 'slot-has-content': this.slotHasContent,\n })}\n >\n <div class=\"line\"></div>\n <div class=\"slot-container\">\n <slot></slot>\n </div>\n <div class=\"line\"></div>\n </div>`;\n }\n}\n"],"names":["LitElement","html","classMap","styles","property","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA;;;;;;;;;;;;;;;;;;AAkBG;AAEI,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQA,GAAU,CAAA;AAAhC,IAAA,WAAA,GAAA;;;QAIuC,IAAA,CAAA,QAAQ,GAAG,KAAK;;QAI5D,IAAA,CAAA,cAAc,GAAG,KAAK;IA2BxB;IAzBE,YAAY,GAAA;AACV,QAAA,+BAA+B,CAC7B,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC,EACrC,UAAU,IAAG;AACX,YAAA,IAAI,CAAC,cAAc,GAAG,UAAU;YAChC,IAAI,CAAC,aAAa,EAAE;AACtB,QAAA,CAAC,CACF;IACH;IAEA,MAAM,GAAA;AACJ,QAAA,OAAOC,CAAI,CAAA,CAAA;AACD,YAAA,EAAAC,CAAQ,CAAC;AACf,YAAA,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,kBAAkB,EAAE,IAAI,CAAC,cAAc;SACxC,CAAC;;;;;;;WAOG;IACT;;AAjCO,OAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AAGoB,UAAA,CAAA;IAA3CC,CAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAAmB,CAAA,EAAA,OAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAI7D,UAAA,CAAA;AADC,IAAAC,CAAK;AACiB,CAAA,EAAA,OAAA,CAAA,SAAA,EAAA,gBAAA,EAAA,MAAA,CAAA;AARZ,OAAO,GAAA,UAAA,CAAA;IADnB;AACY,CAAA,EAAA,OAAO,CAmCnB;;;;"}
@@ -8,6 +8,7 @@ import './directive-ZPhl09Yt.js';
8
8
 
9
9
  var css_248z = i`* {
10
10
  box-sizing: border-box;
11
+ -webkit-tap-highlight-color: transparent;
11
12
  }
12
13
 
13
14
  .screen-reader-only {
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-button.js","sources":["../../src/dropdown-button/dropdown-button.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './dropdown-button.scss';\n\n/**\n * @label Dropdown Button\n * @tag wc-dropdown-button\n * @rawTag dropdown-button\n *\n * @summary A button that opens a dropdown menu when clicked.\n * @overview\n * <p>The dropdown button combines a single button with a dropdown menu. Clicking the button toggles a menu of actions or options. It follows M3 Material Design, keeping a compact control while exposing related actions on demand.</p>\n *\n * @cssprop --dropdown-button-container-shape: Defines the border radius of the dropdown button container shape.\n *\n * @fires {CustomEvent} toggle-menu - Dispatched when the dropdown menu is opened or closed.\n *\n * @example\n * ```html\n * <wc-dropdown-button>\n * Actions\n * <wc-menu-item slot=\"menu\">Edit</wc-menu-item>\n * <wc-menu-item slot=\"menu\">Delete</wc-menu-item>\n * </wc-dropdown-button>\n * ```\n * @tags controls\n */\n@IndividualComponent\nexport class DropdownButton extends LitElement {\n static override styles = [styles];\n\n /**\n * Button size.\n * Possible values are `\"xs\"`, `\"sm\"`, `\"md\"`, `\"lg\"`, `\"xl\"`. Defaults to `\"sm\"`.\n */\n @property({ reflect: true }) size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'sm';\n\n /**\n * The visual style of the dropdown button.\n *\n * Possible variant values:\n * `\"filled\"` is a filled button.\n * `\"outlined\"` is an outlined button.\n * `\"text\"` is a transparent button.\n * `\"tonal\"` is a light color button.\n * `\"elevated\"` is an elevated button.\n */\n @property({ reflect: true }) variant:\n | 'elevated'\n | 'filled'\n | 'tonal'\n | 'outlined'\n | 'text' = 'filled';\n\n /**\n * Defines the primary color of the dropdown button.\n */\n @property({ reflect: true }) color:\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'success'\n | 'danger'\n | 'warning'\n | 'surface'\n | 'on-surface' = 'primary';\n\n /**\n * Whether the dropdown button is disabled.\n */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * Menu placement relative to the button.\n * Possible values are `\"bottom-start\"`, `\"bottom-end\"`, `\"top-start\"`, `\"top-end\"`. Defaults to `\"bottom-start\"`.\n */\n @property({ reflect: true }) placement:\n | 'bottom-start'\n | 'bottom-end'\n | 'top-start'\n | 'top-end' = 'bottom-start';\n\n @state() private _menuOpen = false;\n\n @query('.trigger-button') private readonly _triggerButton!: HTMLElement & {\n focus: () => void;\n };\n\n @query('wc-menu') private readonly _menu!: HTMLElement & {\n open: boolean;\n anchorElement: HTMLElement | null;\n show: () => void;\n close: () => void;\n focus: () => void;\n };\n\n private _menuId = `dropdown-menu-${Math.random().toString(36).slice(2, 9)}`;\n\n override focus() {\n this._triggerButton?.focus();\n }\n\n private _onButtonClick(event: MouseEvent) {\n event.stopPropagation();\n if (this.disabled) return;\n\n if (this._menuOpen) {\n this._menu?.close();\n } else {\n this._menu.anchorElement = this;\n this._menu?.show();\n }\n }\n\n private _onMenuOpened = () => {\n this._menuOpen = true;\n this.dispatchEvent(\n new CustomEvent('toggle-menu', {\n detail: { open: true },\n bubbles: true,\n composed: true,\n }),\n );\n };\n\n private _onMenuClosed = () => {\n this._menuOpen = false;\n this.dispatchEvent(\n new CustomEvent('toggle-menu', {\n detail: { open: false },\n bubbles: true,\n composed: true,\n }),\n );\n };\n\n private _onKeyDown = (event: KeyboardEvent) => {\n if (this.disabled) return;\n\n if (event.key === 'ArrowDown' && !this._menuOpen) {\n event.preventDefault();\n this._menu.anchorElement = this;\n this._menu?.show();\n requestAnimationFrame(() => this._menu?.focus());\n }\n\n if (event.key === 'Escape' && this._menuOpen) {\n this._menu?.close();\n this._triggerButton?.focus();\n }\n };\n\n override connectedCallback() {\n super.connectedCallback();\n this.addEventListener('keydown', this._onKeyDown);\n }\n\n override disconnectedCallback() {\n this.removeEventListener('keydown', this._onKeyDown);\n super.disconnectedCallback();\n }\n\n override render() {\n const buttonClasses = {\n 'trigger-button': true,\n active: this._menuOpen,\n disabled: this.disabled,\n };\n\n return html`\n <wc-button\n class=${classMap(buttonClasses)}\n size=${this.size}\n variant=${this.variant}\n color=${this.color}\n trailing-icon\n ?disabled=${this.disabled}\n .configAria=${{\n 'aria-haspopup': 'menu',\n 'aria-expanded': String(this._menuOpen),\n 'aria-controls': this._menuId,\n }}\n @click=${this._onButtonClick}\n >\n <slot></slot>\n <wc-icon\n slot=\"icon\"\n name=\"arrow_drop_down\"\n class=\"dropdown-icon\"\n aria-hidden=\"true\"\n ></wc-icon>\n </wc-button>\n\n <wc-menu\n id=${this._menuId}\n placement=${this.placement}\n @opened=${this._onMenuOpened}\n @closed=${this._onMenuClosed}\n >\n <slot name=\"menu\"></slot>\n </wc-menu>\n `;\n }\n}\n"],"names":["LitElement","html","classMap","styles","property","state","query"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;;;;;;;;;;;;;;;;;;;;;AAsBG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQA,GAAU,CAAA;AAAvC,IAAA,WAAA,GAAA;;AAGL;;;AAGG;QAC0B,IAAA,CAAA,IAAI,GAAqC,IAAI;AAE1E;;;;;;;;;AASG;QAC0B,IAAA,CAAA,OAAO,GAKvB,QAAQ;AAErB;;AAEG;QAC0B,IAAA,CAAA,KAAK,GAQf,SAAS;AAE5B;;AAEG;QACyC,IAAA,CAAA,QAAQ,GAAG,KAAK;AAE5D;;;AAGG;QAC0B,IAAA,CAAA,SAAS,GAItB,cAAc;QAEb,IAAA,CAAA,SAAS,GAAG,KAAK;AAc1B,QAAA,IAAA,CAAA,OAAO,GAAG,CAAA,cAAA,EAAiB,IAAI,CAA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AAEiC,UAAA,CAAA;IAAlCA,CAAK,CAAC,SAAS;AAMd,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAlES,cAAc,GAAA,UAAA,CAAA;IAD1B;AACY,CAAA,EAAA,cAAc,CA+K1B;;;;"}
1
+ {"version":3,"file":"dropdown-button.js","sources":["../../src/dropdown-button/dropdown-button.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './dropdown-button.scss';\n\n/**\n * @label Dropdown Button\n * @tag wc-dropdown-button\n * @rawTag dropdown-button\n *\n * @summary A button that opens a dropdown menu when clicked.\n * @overview\n * <p>The dropdown button combines a single button with a dropdown menu. Clicking the button toggles a menu of actions or options. It follows M3 Material Design, keeping a compact control while exposing related actions on demand.</p>\n *\n * @cssprop --dropdown-button-container-shape: Defines the border radius of the dropdown button container shape.\n *\n * @fires {CustomEvent} toggle-menu - Dispatched when the dropdown menu is opened or closed.\n *\n * @example\n * ```html\n * <wc-dropdown-button>\n * Actions\n * <wc-menu-item slot=\"menu\">Edit</wc-menu-item>\n * <wc-menu-item slot=\"menu\">Delete</wc-menu-item>\n * </wc-dropdown-button>\n * ```\n * @tags controls\n */\n@IndividualComponent\nexport class DropdownButton extends LitElement {\n static override styles = [styles];\n\n /**\n * Button size.\n * Possible values are `\"xs\"`, `\"sm\"`, `\"md\"`, `\"lg\"`, `\"xl\"`. Defaults to `\"sm\"`.\n */\n @property({ reflect: true }) size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'sm';\n\n /**\n * The visual style of the dropdown button.\n *\n * Possible variant values:\n * `\"filled\"` is a filled button.\n * `\"outlined\"` is an outlined button.\n * `\"text\"` is a transparent button.\n * `\"tonal\"` is a light color button.\n * `\"elevated\"` is an elevated button.\n */\n @property({ reflect: true }) variant:\n | 'elevated'\n | 'filled'\n | 'tonal'\n | 'outlined'\n | 'text' = 'filled';\n\n /**\n * Defines the primary color of the dropdown button.\n */\n @property({ reflect: true }) color:\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'success'\n | 'danger'\n | 'warning'\n | 'surface'\n | 'on-surface' = 'primary';\n\n /**\n * Whether the dropdown button is disabled.\n */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * Menu placement relative to the button.\n * Possible values are `\"bottom-start\"`, `\"bottom-end\"`, `\"top-start\"`, `\"top-end\"`. Defaults to `\"bottom-start\"`.\n */\n @property({ reflect: true }) placement:\n | 'bottom-start'\n | 'bottom-end'\n | 'top-start'\n | 'top-end' = 'bottom-start';\n\n @state() private _menuOpen = false;\n\n @query('.trigger-button') private readonly _triggerButton!: HTMLElement & {\n focus: () => void;\n };\n\n @query('wc-menu') private readonly _menu!: HTMLElement & {\n open: boolean;\n anchorElement: HTMLElement | null;\n show: () => void;\n close: () => void;\n focus: () => void;\n };\n\n private _menuId = `dropdown-menu-${Math.random().toString(36).slice(2, 9)}`;\n\n override focus() {\n this._triggerButton?.focus();\n }\n\n private _onButtonClick(event: MouseEvent) {\n event.stopPropagation();\n if (this.disabled) return;\n\n if (this._menuOpen) {\n this._menu?.close();\n } else {\n this._menu.anchorElement = this;\n this._menu?.show();\n }\n }\n\n private _onMenuOpened = () => {\n this._menuOpen = true;\n this.dispatchEvent(\n new CustomEvent('toggle-menu', {\n detail: { open: true },\n bubbles: true,\n composed: true,\n }),\n );\n };\n\n private _onMenuClosed = () => {\n this._menuOpen = false;\n this.dispatchEvent(\n new CustomEvent('toggle-menu', {\n detail: { open: false },\n bubbles: true,\n composed: true,\n }),\n );\n };\n\n private _onKeyDown = (event: KeyboardEvent) => {\n if (this.disabled) return;\n\n if (event.key === 'ArrowDown' && !this._menuOpen) {\n event.preventDefault();\n this._menu.anchorElement = this;\n this._menu?.show();\n requestAnimationFrame(() => this._menu?.focus());\n }\n\n if (event.key === 'Escape' && this._menuOpen) {\n this._menu?.close();\n this._triggerButton?.focus();\n }\n };\n\n override connectedCallback() {\n super.connectedCallback();\n this.addEventListener('keydown', this._onKeyDown);\n }\n\n override disconnectedCallback() {\n this.removeEventListener('keydown', this._onKeyDown);\n super.disconnectedCallback();\n }\n\n override render() {\n const buttonClasses = {\n 'trigger-button': true,\n active: this._menuOpen,\n disabled: this.disabled,\n };\n\n return html`\n <wc-button\n class=${classMap(buttonClasses)}\n size=${this.size}\n variant=${this.variant}\n color=${this.color}\n trailing-icon\n ?disabled=${this.disabled}\n .configAria=${{\n 'aria-haspopup': 'menu',\n 'aria-expanded': String(this._menuOpen),\n 'aria-controls': this._menuId,\n }}\n @click=${this._onButtonClick}\n >\n <slot></slot>\n <wc-icon\n slot=\"icon\"\n name=\"arrow_drop_down\"\n class=\"dropdown-icon\"\n aria-hidden=\"true\"\n ></wc-icon>\n </wc-button>\n\n <wc-menu\n id=${this._menuId}\n placement=${this.placement}\n @opened=${this._onMenuOpened}\n @closed=${this._onMenuClosed}\n >\n <slot name=\"menu\"></slot>\n </wc-menu>\n `;\n }\n}\n"],"names":["LitElement","html","classMap","styles","property","state","query"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;;;;;;;;;;;;;;;;;;;;;AAsBG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQA,GAAU,CAAA;AAAvC,IAAA,WAAA,GAAA;;AAGL;;;AAGG;QAC0B,IAAA,CAAA,IAAI,GAAqC,IAAI;AAE1E;;;;;;;;;AASG;QAC0B,IAAA,CAAA,OAAO,GAKvB,QAAQ;AAErB;;AAEG;QAC0B,IAAA,CAAA,KAAK,GAQf,SAAS;AAE5B;;AAEG;QACyC,IAAA,CAAA,QAAQ,GAAG,KAAK;AAE5D;;;AAGG;QAC0B,IAAA,CAAA,SAAS,GAItB,cAAc;QAEb,IAAA,CAAA,SAAS,GAAG,KAAK;AAc1B,QAAA,IAAA,CAAA,OAAO,GAAG,CAAA,cAAA,EAAiB,I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A,CAAA;AAEiC,UAAA,CAAA;IAAlCA,CAAK,CAAC,SAAS;AAMd,CAAA,EAAA,cAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAlES,cAAc,GAAA,UAAA,CAAA;IAD1B;AACY,CAAA,EAAA,cAAc,CA+K1B;;;;"}
package/dist/elevation.js CHANGED
@@ -2,6 +2,7 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, b } from './Ind
2
2
 
3
3
  var css_248z = i`* {
4
4
  box-sizing: border-box;
5
+ -webkit-tap-highlight-color: transparent;
5
6
  }
6
7
 
7
8
  .screen-reader-only {
@@ -1 +1 @@
1
- {"version":3,"file":"elevation.js","sources":["../../src/elevation/elevation.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport styles from './elevation.scss';\nimport IndividualComponent from '@/IndividualComponent.js';\n\n/**\n * @label Elevation\n * @tag wc-elevation\n * @rawTag elevation\n *\n * @summary Adds elevation to an element.\n * @overview\n * - Elevation adds a shadow effect to an element to give it depth.\n * - It can be used to create a sense of hierarchy or to draw attention to a particular element.\n *\n * @cssprop --elevation-level - Controls the elevation level of the shadow.\n * @cssprop --elevation-color - Controls the color of the shadow.\n *\n * @example\n * ```html\n * <div style=\"position: relative; padding: var(--spacing-200);\">\n * <wc-elevation style='--elevation-level: 2; --elevation-container-shape: var(--shape-corner-extra-small);'></wc-elevation>\n * Level 2\n * </div>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class Elevation extends LitElement {\n static styles = [styles];\n\n render() {\n return html`<span class=\"shadow\"></span>`;\n }\n}\n"],"names":["LitElement","html","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;;;;;;;;;;;;;;;;;;;;AAqBG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQA,GAAU,CAAA;IAGvC,MAAM,GAAA;QACJ,OAAOC,CAAI,CAAA,CAAA,4BAAA,CAA8B;IAC3C;;AAJO,SAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AADb,SAAS,GAAA,UAAA,CAAA;IADrB;AACY,CAAA,EAAA,SAAS,CAMrB;;;;"}
1
+ {"version":3,"file":"elevation.js","sources":["../../src/elevation/elevation.ts"],"sourcesContent":["import { html, LitElement } from 'lit';\nimport styles from './elevation.scss';\nimport IndividualComponent from '@/IndividualComponent.js';\n\n/**\n * @label Elevation\n * @tag wc-elevation\n * @rawTag elevation\n *\n * @summary Adds elevation to an element.\n * @overview\n * - Elevation adds a shadow effect to an element to give it depth.\n * - It can be used to create a sense of hierarchy or to draw attention to a particular element.\n *\n * @cssprop --elevation-level - Controls the elevation level of the shadow.\n * @cssprop --elevation-color - Controls the color of the shadow.\n *\n * @example\n * ```html\n * <div style=\"position: relative; padding: var(--spacing-200);\">\n * <wc-elevation style='--elevation-level: 2; --elevation-container-shape: var(--shape-corner-extra-small);'></wc-elevation>\n * Level 2\n * </div>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class Elevation extends LitElement {\n static styles = [styles];\n\n render() {\n return html`<span class=\"shadow\"></span>`;\n }\n}\n"],"names":["LitElement","html","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;;;;;;;;;;;;;;;;;;;;AAqBG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQA,GAAU,CAAA;IAGvC,MAAM,GAAA;QACJ,OAAOC,CAAI,CAAA,CAAA,4BAAA,CAA8B;IAC3C;;AAJO,SAAA,CAAA,MAAM,GAAG,CAACC,QAAM,CAAC;AADb,SAAS,GAAA,UAAA,CAAA;IADrB;AACY,CAAA,EAAA,SAAS,CAMrB;;;;"}
@@ -6,6 +6,7 @@ import './directive-ZPhl09Yt.js';
6
6
 
7
7
  var css_248z = i`* {
8
8
  box-sizing: border-box;
9
+ -webkit-tap-highlight-color: transparent;
9
10
  }
10
11
 
11
12
  .screen-reader-only {