@redvars/peacock 4.1.0 → 4.2.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.
- package/dist/{BaseField-BMumJpkW.js → BaseField-D8ByB0l3.js} +40 -4
- package/dist/BaseField-D8ByB0l3.js.map +1 -0
- package/dist/{BaseInput-mWdyYv27.js → BaseInput-xCHvT4AN.js} +3 -3
- package/dist/BaseInput-xCHvT4AN.js.map +1 -0
- package/dist/ai-badge.js +32 -6
- package/dist/ai-badge.js.map +1 -1
- package/dist/ai-summary.js +2 -2
- package/dist/alert.js +2 -2
- package/dist/anchor-nav.js +2 -2
- package/dist/app-shell.js +2 -2
- package/dist/assistant-panel.js +2 -2
- package/dist/assistant-step.js +2 -2
- package/dist/assistant-steps.js +2 -2
- package/dist/avatar-group.js +2 -2
- package/dist/banner.js +2 -2
- package/dist/{base-progress-CvLVSjuy.js → base-progress-DxNgAQtw.js} +2 -2
- package/dist/{base-progress-CvLVSjuy.js.map → base-progress-DxNgAQtw.js.map} +1 -1
- package/dist/bottom-sheet.js +2 -2
- package/dist/breadcrumb.js +2 -2
- package/dist/button.js +11 -5
- package/dist/button.js.map +1 -1
- package/dist/calendar.js +2 -2
- package/dist/{canvas-base-BTQMEVn_.js → canvas-base-DHKf2CmA.js} +2 -2
- package/dist/{canvas-base-BTQMEVn_.js.map → canvas-base-DHKf2CmA.js.map} +1 -1
- package/dist/{cartesian-chart-DM1FC_XT.js → cartesian-chart-G6VX1aKk.js} +2 -2
- package/dist/{cartesian-chart-DM1FC_XT.js.map → cartesian-chart-G6VX1aKk.js.map} +1 -1
- package/dist/{cb-group-base-B6fa4Lll.js → cb-group-base-CZLzCnXK.js} +2 -2
- package/dist/{cb-group-base-B6fa4Lll.js.map → cb-group-base-CZLzCnXK.js.map} +1 -1
- package/dist/cb-group.js +3 -3
- package/dist/cb-rule.js +3 -3
- package/dist/chart-area.js +4 -4
- package/dist/chart-bar.js +4 -4
- package/dist/{chart-base-Dhxuw_Mw.js → chart-base-DREru2P0.js} +2 -2
- package/dist/{chart-base-Dhxuw_Mw.js.map → chart-base-DREru2P0.js.map} +1 -1
- package/dist/chart-doughnut.js +3 -3
- package/dist/chart-line.js +4 -4
- package/dist/chart-pie.js +3 -3
- package/dist/chat-event.js +152 -0
- package/dist/chat-event.js.map +1 -0
- package/dist/chat-message.js +195 -19
- package/dist/chat-message.js.map +1 -1
- package/dist/chat-thread.js +26 -9
- package/dist/chat-thread.js.map +1 -1
- package/dist/checkbox-group.js +4 -4
- package/dist/checkbox.js +4 -4
- package/dist/chip-set.js +3 -3
- package/dist/chip.js +2 -2
- package/dist/circular-progress.js +3 -3
- package/dist/citation.js +2 -2
- package/dist/code-editor.js +4 -4
- package/dist/code-highlighter.js +2 -2
- package/dist/color-field.js +5 -5
- package/dist/color-picker.js +2 -2
- package/dist/command-palette.js +2 -2
- package/dist/comment-composer.js +25 -13
- package/dist/comment-composer.js.map +1 -1
- package/dist/condition-builder.js +3 -3
- package/dist/confirm-dialog.js +2 -2
- package/dist/copy-button.js +2 -2
- package/dist/currency-field.js +5 -5
- package/dist/custom-elements-jsdocs.json +228 -22
- package/dist/custom-elements.json +1255 -110
- package/dist/date-field.js +6 -6
- package/dist/date-picker.js +2 -2
- package/dist/date-range-field.js +6 -6
- package/dist/datetime-field.js +6 -6
- package/dist/dependency-map.js +3 -3
- package/dist/description-item.js +2 -2
- package/dist/description-list.js +2 -2
- package/dist/{diagram-2r11KySs.js → diagram-CHF70xTL.js} +2 -2
- package/dist/{diagram-2r11KySs.js.map → diagram-CHF70xTL.js.map} +1 -1
- package/dist/diagram-controls.js +2 -2
- package/dist/diagram-minimap.js +2 -2
- package/dist/diagram.js +4 -4
- package/dist/diff-viewer.js +2 -2
- package/dist/discussion-activity.js +4 -4
- package/dist/discussion-comment.js +4 -4
- package/dist/{discussion-time-BegaYfhf.js → discussion-time-DqykqvNy.js} +2 -2
- package/dist/{discussion-time-BegaYfhf.js.map → discussion-time-DqykqvNy.js.map} +1 -1
- package/dist/discussion.js +7 -7
- package/dist/{document-editor-BnEugM3E.js → document-editor-Cb9fCxvA.js} +22 -10
- package/dist/{document-editor-BnEugM3E.js.map → document-editor-Cb9fCxvA.js.map} +1 -1
- package/dist/document-editor.js +3 -3
- package/dist/draft-card.js +14 -4
- package/dist/draft-card.js.map +1 -1
- package/dist/dropdown-button.js +3 -2
- package/dist/dropdown-button.js.map +1 -1
- package/dist/erd.js +3 -3
- package/dist/file-upload.js +4 -4
- package/dist/filter-bar.js +2 -2
- package/dist/flow.js +4 -4
- package/dist/form.js +3 -3
- package/dist/{generative-view-BgOcLRXr.js → generative-view-C4fJ2zI7.js} +2 -2
- package/dist/{generative-view-BgOcLRXr.js.map → generative-view-C4fJ2zI7.js.map} +1 -1
- package/dist/generative-view.js +3 -3
- package/dist/html-editor.js +30 -13
- package/dist/html-editor.js.map +1 -1
- package/dist/{i18n-controller-Cp43HjJl.js → i18n-controller-CH4e9sju.js} +2 -2
- package/dist/{i18n-controller-Cp43HjJl.js.map → i18n-controller-CH4e9sju.js.map} +1 -1
- package/dist/icon-button.js +7 -5
- package/dist/icon-button.js.map +1 -1
- package/dist/image.js +2 -2
- package/dist/index.js +21 -20
- package/dist/index.js.map +1 -1
- package/dist/inline-edit.js +2 -2
- package/dist/input.js +4 -4
- package/dist/json-viewer.js +2 -2
- package/dist/kanban.js +2 -2
- package/dist/kbd.js +2 -2
- package/dist/linear-progress.js +3 -3
- package/dist/link-button.js +7 -5
- package/dist/link-button.js.map +1 -1
- package/dist/listbox.js +3 -3
- package/dist/loader-full.js +13 -12
- package/dist/loader-full.js.map +1 -1
- package/dist/loader.js +16 -12
- package/dist/loader.js.map +1 -1
- package/dist/markdown-editor.js +30 -13
- package/dist/markdown-editor.js.map +1 -1
- package/dist/mention-input.js +5 -5
- package/dist/{menu-trigger-controller-DyLpTxM7.js → menu-trigger-controller-CEJq1ugC.js} +11 -14
- package/dist/menu-trigger-controller-CEJq1ugC.js.map +1 -0
- package/dist/modal.js +2 -2
- package/dist/navigation-bar.js +2 -2
- package/dist/navigation-drawer.js +2 -2
- package/dist/navigation-rail.js +2 -2
- package/dist/notification-center.js +3 -3
- package/dist/number-field.js +5 -5
- package/dist/page-header.js +2 -2
- package/dist/pagination.js +2 -2
- package/dist/password-field.js +5 -5
- package/dist/password-rules.js +2 -2
- package/dist/phone-field.js +5 -5
- package/dist/{picker-field-dTlIMAQn.js → picker-field-loXW-xrW.js} +3 -3
- package/dist/{picker-field-dTlIMAQn.js.map → picker-field-loXW-xrW.js.map} +1 -1
- package/dist/pin-input.js +5 -5
- package/dist/presence-indicator.js +2 -2
- package/dist/prompt-input.js +25 -13
- package/dist/prompt-input.js.map +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/radio.js +4 -4
- package/dist/rating.js +4 -4
- package/dist/redvars-loader.js +2 -2
- package/dist/{relative-time-BVQXLuHm.js → relative-time-BNxqvEbg.js} +13 -2
- package/dist/relative-time-BNxqvEbg.js.map +1 -0
- package/dist/relative-time.js +3 -3
- package/dist/resizable-panels.js +2 -2
- package/dist/{rich-text-input-DM_BOzgk.js → rich-text-input-B5j0eqCJ.js} +21 -18
- package/dist/rich-text-input-B5j0eqCJ.js.map +1 -0
- package/dist/{schema-B8g30A_n.js → schema-BJzlGRP1.js} +2 -2
- package/dist/{schema-B8g30A_n.js.map → schema-BJzlGRP1.js.map} +1 -1
- package/dist/search.js +4 -4
- package/dist/select.js +5 -5
- package/dist/side-sheet.js +2 -2
- package/dist/signature-pad.js +4 -4
- package/dist/slider.js +4 -4
- package/dist/snackbar.js +2 -2
- package/dist/sparkline.js +2 -2
- package/dist/split-button.js +109 -21
- package/dist/split-button.js.map +1 -1
- package/dist/src/__internal/ai/suggestion-controller.d.ts +2 -0
- package/dist/src/__internal/i18n/strings.d.ts +6 -1
- package/dist/src/__internal/menu-trigger-controller.d.ts +11 -8
- package/dist/src/__internal/rich-text/rich-text-input.d.ts +6 -1
- package/dist/src/__internal/utils/relative-time.d.ts +5 -0
- package/dist/src/ai-badge/ai-badge.d.ts +8 -0
- package/dist/src/button/button/button.d.ts +4 -0
- package/dist/src/chat-message/chat-message.d.ts +51 -10
- package/dist/src/chat-message/index.d.ts +1 -1
- package/dist/src/chat-thread/chat-event.d.ts +37 -0
- package/dist/src/chat-thread/chat-thread.d.ts +7 -4
- package/dist/src/chat-thread/index.d.ts +1 -0
- package/dist/src/html-editor/html-editor.d.ts +5 -0
- package/dist/src/index.d.ts +2 -2
- package/dist/src/input/BaseField.d.ts +12 -1
- package/dist/src/input/BaseInput.d.ts +1 -0
- package/dist/src/markdown-editor/markdown-editor.d.ts +5 -0
- package/dist/src/split-button/split-button.d.ts +7 -2
- package/dist/src/textarea/textarea.d.ts +2 -0
- package/dist/stat.js +2 -2
- package/dist/status-indicator.js +2 -2
- package/dist/step.js +2 -2
- package/dist/stepper.js +2 -2
- package/dist/{strings-BJPuhKJk.js → strings-o6v6Hrmn.js} +7 -2
- package/dist/strings-o6v6Hrmn.js.map +1 -0
- package/dist/{suggestion-controller-CW17adxd.js → suggestion-controller-7YRQqkaI.js} +3 -1
- package/dist/{suggestion-controller-CW17adxd.js.map → suggestion-controller-7YRQqkaI.js.map} +1 -1
- package/dist/svg.js +2 -2
- package/dist/switch.js +4 -4
- package/dist/table.js +50 -11
- package/dist/table.js.map +1 -1
- package/dist/textarea.js +10 -5
- package/dist/textarea.js.map +1 -1
- package/dist/time-field.js +6 -6
- package/dist/time-picker.js +2 -2
- package/dist/timeline-item.js +2 -2
- package/dist/timeline.js +2 -2
- package/dist/{toggle-base-BlaHalfS.js → toggle-base-BSzBnLZN.js} +2 -2
- package/dist/{toggle-base-BlaHalfS.js.map → toggle-base-BSzBnLZN.js.map} +1 -1
- package/dist/tour.js +2 -2
- package/dist/transfer-list.js +4 -4
- package/dist/tree-chart.js +3 -3
- package/dist/tree-item.js +2 -2
- package/dist/tree.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typing-indicator.js +2 -2
- package/dist/url-field.js +5 -5
- package/dist/user-menu.js +3 -3
- package/dist/virtual-list.js +2 -2
- package/dist/workflow-timeline.js +2 -2
- package/dist/workflow.js +3 -3
- package/dist/workspace-switcher.js +3 -3
- package/package.json +1 -1
- package/src/__internal/ai/suggestion-controller.ts +3 -1
- package/src/__internal/i18n/strings.ts +6 -1
- package/src/__internal/menu-trigger-controller.ts +11 -15
- package/src/__internal/rich-text/editor-chrome.scss +27 -10
- package/src/__internal/rich-text/rich-text-input.ts +17 -16
- package/src/__internal/utils/relative-time.ts +20 -0
- package/src/ai-badge/ai-badge.scss +8 -0
- package/src/ai-badge/ai-badge.ts +21 -4
- package/src/button/button/button-base.scss +9 -2
- package/src/button/button/button-layers.scss +3 -1
- package/src/button/button/button.ts +4 -0
- package/src/chat-message/chat-message.scss +72 -0
- package/src/chat-message/chat-message.ts +137 -18
- package/src/chat-message/index.ts +1 -0
- package/src/chat-thread/chat-event.scss +36 -0
- package/src/chat-thread/chat-event.ts +79 -0
- package/src/chat-thread/chat-thread.scss +4 -1
- package/src/chat-thread/chat-thread.ts +22 -6
- package/src/chat-thread/index.ts +1 -0
- package/src/draft-card/draft-card.scss +16 -2
- package/src/dropdown-button/dropdown-button.ts +2 -1
- package/src/html-editor/html-editor.ts +5 -0
- package/src/index.ts +2 -1
- package/src/input/BaseField.ts +42 -2
- package/src/input/BaseInput.ts +1 -1
- package/src/loader.ts +4 -0
- package/src/markdown-editor/markdown-editor.ts +5 -0
- package/src/split-button/split-button-colors.scss +9 -0
- package/src/split-button/split-button-sizes.scss +32 -5
- package/src/split-button/split-button.scss +61 -8
- package/src/split-button/split-button.ts +15 -8
- package/src/table/table.scss +57 -9
- package/src/table/table.ts +3 -1
- package/src/textarea/textarea.ts +7 -0
- package/dist/BaseField-BMumJpkW.js.map +0 -1
- package/dist/BaseInput-mWdyYv27.js.map +0 -1
- package/dist/menu-trigger-controller-DyLpTxM7.js.map +0 -1
- package/dist/relative-time-BVQXLuHm.js.map +0 -1
- package/dist/rich-text-input-DM_BOzgk.js.map +0 -1
- package/dist/strings-BJPuhKJk.js.map +0 -1
package/dist/html-editor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-editor.js","sources":["../../src/html-editor/html-editor.ts"],"sourcesContent":["import type { Editor } from '@tiptap/core';\n\nimport IndividualComponent from '@/IndividualComponent.js';\nimport RichTextInput, {\n type RichTextContent,\n} from '@/__internal/rich-text/rich-text-input.js';\n\nimport styles from './html-editor.scss';\n\n/**\n * @label HTML Editor\n * @tag wc-html-editor\n * @rawTag html-editor\n *\n * @summary A rich-text field whose value is HTML, with the same toolbar and mentions as the Markdown editor.\n * @overview\n * <p>Use it where the value has to be HTML, such as an email body or a CMS field. It works like\n * <code>wc-markdown-editor</code>: a toolbar, a selection bubble, a slash menu, a block handle,\n * mentions and a <strong>View source</strong> button that shows the HTML in\n * <code>wc-code-editor</code>. HTML can store underline and resizable table columns, which\n * Markdown cannot, so the HTML editor offers them.</p>\n *\n * <p>Get and set the HTML through <code>value</code>; an empty editor has the value\n * <code>''</code>. Only what the editor supports is kept: other tags, attributes and scripts in a\n * value are dropped when it loads.</p>\n *\n * <p><strong>Mentions.</strong> Typing a character from <code>triggers</code> (<code>@</code> by\n * default) fires <code>search</code> with <code>{ trigger, query }</code>; answer by setting\n * <code>suggestions</code>. A mention is stored as\n * <code><span data-type=\"mention\" data-id=\"usr_142\" data-label=\"Ana Lima\">@Ana Lima</span></code>.</p>\n *\n * <p>The editor is form-associated, fires <code>input</code> and <code>change</code> with\n * <code>{ value }</code>, and supports <code>required</code>, <code>maxlength</code>,\n * <code>rows</code> and <code>max-rows</code>, as the Markdown editor does.</p>\n *\n * @cssprop --rich-text-editor-background - Background behind the text.\n * @cssprop --prose-link-color - Color of links.\n * @cssprop --prose-mention-background - Background of mention chips.\n * @cssprop --prose-mention-color - Text color of mention chips.\n * @cssprop --prose-code-background - Background of inline code and code blocks.\n * @cssprop --mention-list-width - Width of the mention suggestion list.\n * @cssprop --mention-list-max-height - Maximum height of the mention suggestion list.\n *\n * @fires {CustomEvent<{value: string}>} input - Dispatched as the content changes, after `debounce` milliseconds without typing.\n * @fires {CustomEvent<{value: string}>} change - Dispatched when focus leaves the editor after an edit.\n * @fires {CustomEvent<{trigger: string, query: string}>} search - Dispatched as a mention is typed; answer with `suggestions`.\n * @fires {CustomEvent<{mention: {id: string, label: string, trigger: string}, suggestion: MentionSuggestion}>} mention - Dispatched when a suggestion is inserted as a mention.\n *\n * @example\n * ```html\n * <wc-html-editor\n * label=\"Email body\"\n * value=\"<p>Hello <strong>world</strong></p>\"\n * ></wc-html-editor>\n * ```\n * @tags input editor\n */\n@IndividualComponent\nexport class HtmlEditor extends RichTextInput {\n // ── Static ────────────────────────────────────────────────────────────────\n\n static styles = [styles];\n\n // ── Protected fields ──────────────────────────────────────────────────────\n\n protected readonly profile = 'html' as const;\n\n protected readonly sourceLanguage = 'html' as const;\n\n protected readonly sourceIcon = 'html';\n\n // ── Protected methods ─────────────────────────────────────────────────────\n\n protected readFromEditor(editor: Editor): string {\n return this.isEditorEmpty(editor) ? '' : editor.getHTML();\n }\n\n protected contentFor(value: string): RichTextContent {\n return { content: value ?? '', contentType: 'html' };\n }\n\n protected defaultPlaceholder(): string {\n return this.i18n.t('enterTextPlaceholder');\n }\n}\n"],"names":["styles"],"mappings":"
|
|
1
|
+
{"version":3,"file":"html-editor.js","sources":["../../src/html-editor/html-editor.ts"],"sourcesContent":["import type { Editor } from '@tiptap/core';\n\nimport IndividualComponent from '@/IndividualComponent.js';\nimport RichTextInput, {\n type RichTextContent,\n} from '@/__internal/rich-text/rich-text-input.js';\n\nimport styles from './html-editor.scss';\n\n/**\n * @label HTML Editor\n * @tag wc-html-editor\n * @rawTag html-editor\n *\n * @summary A rich-text field whose value is HTML, with the same toolbar and mentions as the Markdown editor.\n * @overview\n * <p>Use it where the value has to be HTML, such as an email body or a CMS field. It works like\n * <code>wc-markdown-editor</code>: a toolbar, a selection bubble, a slash menu, a block handle,\n * mentions and a <strong>View source</strong> button that shows the HTML in\n * <code>wc-code-editor</code>. HTML can store underline and resizable table columns, which\n * Markdown cannot, so the HTML editor offers them.</p>\n *\n * <p>Get and set the HTML through <code>value</code>; an empty editor has the value\n * <code>''</code>. Only what the editor supports is kept: other tags, attributes and scripts in a\n * value are dropped when it loads.</p>\n *\n * <p><strong>Mentions.</strong> Typing a character from <code>triggers</code> (<code>@</code> by\n * default) fires <code>search</code> with <code>{ trigger, query }</code>; answer by setting\n * <code>suggestions</code>. A mention is stored as\n * <code><span data-type=\"mention\" data-id=\"usr_142\" data-label=\"Ana Lima\">@Ana Lima</span></code>.</p>\n *\n * <p>The editor is form-associated, fires <code>input</code> and <code>change</code> with\n * <code>{ value }</code>, and supports <code>required</code>, <code>maxlength</code>,\n * <code>rows</code> and <code>max-rows</code>, as the Markdown editor does.</p>\n *\n * <p><strong>Read-only and disabled.</strong> <code>readonly</code> keeps the text at full contrast\n * and leaves only <strong>View source</strong> in the toolbar, which shows the HTML read-only.\n * <code>disabled</code> dims the toolbar and the text. <code>show-readonly-badge</code> adds a\n * lock badge to the toolbar in either state.</p>\n *\n * @cssprop --rich-text-editor-background - Background behind the text.\n * @cssprop --prose-link-color - Color of links.\n * @cssprop --prose-mention-background - Background of mention chips.\n * @cssprop --prose-mention-color - Text color of mention chips.\n * @cssprop --prose-code-background - Background of inline code and code blocks.\n * @cssprop --mention-list-width - Width of the mention suggestion list.\n * @cssprop --mention-list-max-height - Maximum height of the mention suggestion list.\n *\n * @fires {CustomEvent<{value: string}>} input - Dispatched as the content changes, after `debounce` milliseconds without typing.\n * @fires {CustomEvent<{value: string}>} change - Dispatched when focus leaves the editor after an edit.\n * @fires {CustomEvent<{trigger: string, query: string}>} search - Dispatched as a mention is typed; answer with `suggestions`.\n * @fires {CustomEvent<{mention: {id: string, label: string, trigger: string}, suggestion: MentionSuggestion}>} mention - Dispatched when a suggestion is inserted as a mention.\n *\n * @example\n * ```html\n * <wc-html-editor\n * label=\"Email body\"\n * value=\"<p>Hello <strong>world</strong></p>\"\n * ></wc-html-editor>\n * ```\n * @tags input editor\n */\n@IndividualComponent\nexport class HtmlEditor extends RichTextInput {\n // ── Static ────────────────────────────────────────────────────────────────\n\n static styles = [styles];\n\n // ── Protected fields ──────────────────────────────────────────────────────\n\n protected readonly profile = 'html' as const;\n\n protected readonly sourceLanguage = 'html' as const;\n\n protected readonly sourceIcon = 'html';\n\n // ── Protected methods ─────────────────────────────────────────────────────\n\n protected readFromEditor(editor: Editor): string {\n return this.isEditorEmpty(editor) ? '' : editor.getHTML();\n }\n\n protected contentFor(value: string): RichTextContent {\n return { content: value ?? '', contentType: 'html' };\n }\n\n protected defaultPlaceholder(): string {\n return this.i18n.t('enterTextPlaceholder');\n }\n}\n"],"names":["styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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Change, p as peacockString } from './strings-
|
|
1
|
+
import { o as onPeacockStringsChange, p as peacockString } from './strings-o6v6Hrmn.js';
|
|
2
2
|
import { r as resolveLocale } from './locale-DEsJZCQG.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -33,4 +33,4 @@ class I18nController {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export { I18nController as I };
|
|
36
|
-
//# sourceMappingURL=i18n-controller-
|
|
36
|
+
//# sourceMappingURL=i18n-controller-CH4e9sju.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-controller-
|
|
1
|
+
{"version":3,"file":"i18n-controller-CH4e9sju.js","sources":["../../src/__internal/i18n/i18n-controller.ts"],"sourcesContent":["import type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport {\n onPeacockStringsChange,\n peacockString,\n type PeacockStringKey,\n type PeacockStrings,\n} from './strings.js';\nimport { resolveLocale } from './locale.js';\n\ntype Host = ReactiveControllerHost &\n HTMLElement & {\n /** Per-instance string overrides, on components that render many strings. */\n strings?: Partial<PeacockStrings>;\n /** The component's own locale, on components that format numbers or dates. */\n locale?: string;\n };\n\n/**\n * Gives a component its strings and locale, and re-renders it when the app calls\n * `setPeacockStrings()`.\n *\n * @example\n * private readonly i18n = new I18nController(this);\n * // in render(): aria-label=${this.i18n.t('dismiss')}\n */\nexport class I18nController implements ReactiveController {\n private readonly host: Host;\n\n private stopListening?: () => void;\n\n constructor(host: Host) {\n this.host = host;\n host.addController(this);\n }\n\n hostConnected() {\n this.stopListening = onPeacockStringsChange(() =>\n this.host.requestUpdate(),\n );\n }\n\n hostDisconnected() {\n this.stopListening?.();\n this.stopListening = undefined;\n }\n\n /** The string for `key`: the instance's override, else the app's, else the English default. */\n t<K extends PeacockStringKey>(key: K): PeacockStrings[K] {\n const override = this.host.strings?.[key];\n return (override ?? peacockString(key)) as PeacockStrings[K];\n }\n\n /** The locale to format with: the host's `locale`, else the nearest `lang`, else the browser's. */\n get locale(): string {\n return resolveLocale(this.host.locale, this.host);\n }\n}\n"],"names":[],"mappings":";;;AAiBA;;;;;;;AAOG;MACU,cAAc,CAAA;AAKzB,IAAA,WAAA,CAAY,IAAU,EAAA;AACpB,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;IAC1B;IAEA,aAAa,GAAA;AACX,QAAA,IAAI,CAAC,aAAa,GAAG,sBAAsB,CAAC,MAC1C,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAC1B;IACH;IAEA,gBAAgB,GAAA;AACd,QAAA,IAAI,CAAC,aAAa,IAAI;AACtB,QAAA,IAAI,CAAC,aAAa,GAAG,SAAS;IAChC;;AAGA,IAAA,CAAC,CAA6B,GAAM,EAAA;QAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC;QACzC,QAAQ,QAAQ,IAAI,aAAa,CAAC,GAAG,CAAC;IACxC;;AAGA,IAAA,IAAI,MAAM,GAAA;AACR,QAAA,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;IACnD;AACD;;;;"}
|
package/dist/icon-button.js
CHANGED
|
@@ -18,7 +18,7 @@ import './directive-ZPhl09Yt.js';
|
|
|
18
18
|
import './warn-once-BNxX1Y98.js';
|
|
19
19
|
|
|
20
20
|
var css_248z = i`.button {
|
|
21
|
-
transition-property: inset, width, height, transform, opacity;
|
|
21
|
+
transition-property: inset, width, height, transform, opacity, border-start-start-radius, border-start-end-radius, border-end-start-radius, border-end-end-radius;
|
|
22
22
|
transition-duration: 200ms;
|
|
23
23
|
transition-timing-function: var(--easing-standard);
|
|
24
24
|
will-change: inset, transform, opacity;
|
|
@@ -36,7 +36,7 @@ var css_248z = i`.button {
|
|
|
36
36
|
border-end-start-radius: var(--_button-container-shape-end-start, var(--_button-container-shape));
|
|
37
37
|
border-end-end-radius: var(--_button-container-shape-end-end, var(--_button-container-shape));
|
|
38
38
|
corner-shape: var(--_button-container-shape-variant);
|
|
39
|
-
transition-property: inset, width, height, transform, opacity;
|
|
39
|
+
transition-property: inset, width, height, transform, opacity, border-start-start-radius, border-start-end-radius, border-end-start-radius, border-end-end-radius;
|
|
40
40
|
transition-duration: 200ms;
|
|
41
41
|
transition-timing-function: var(--easing-standard);
|
|
42
42
|
will-change: inset, transform, opacity;
|
|
@@ -54,7 +54,7 @@ var css_248z = i`.button {
|
|
|
54
54
|
border-end-start-radius: var(--_button-container-shape-end-start, var(--_button-container-shape));
|
|
55
55
|
border-end-end-radius: var(--_button-container-shape-end-end, var(--_button-container-shape));
|
|
56
56
|
corner-shape: var(--_button-container-shape-variant);
|
|
57
|
-
transition-property: inset, width, height, transform, opacity;
|
|
57
|
+
transition-property: inset, width, height, transform, opacity, border-start-start-radius, border-start-end-radius, border-end-start-radius, border-end-end-radius;
|
|
58
58
|
transition-duration: 200ms;
|
|
59
59
|
transition-timing-function: var(--easing-standard);
|
|
60
60
|
will-change: inset, transform, opacity;
|
|
@@ -158,7 +158,7 @@ var css_248z = i`.button {
|
|
|
158
158
|
border-end-start-radius: var(--_button-container-shape-end-start, var(--_button-container-shape));
|
|
159
159
|
border-end-end-radius: var(--_button-container-shape-end-end, var(--_button-container-shape));
|
|
160
160
|
corner-shape: var(--_button-container-shape-variant);
|
|
161
|
-
transition-property: inset, width, height, transform, opacity;
|
|
161
|
+
transition-property: inset, width, height, transform, opacity, border-start-start-radius, border-start-end-radius, border-end-start-radius, border-end-end-radius;
|
|
162
162
|
transition-duration: 200ms;
|
|
163
163
|
transition-timing-function: var(--easing-standard);
|
|
164
164
|
will-change: inset, transform, opacity;
|
|
@@ -261,7 +261,9 @@ var css_248z = i`.button {
|
|
|
261
261
|
align-items: center;
|
|
262
262
|
justify-content: center;
|
|
263
263
|
height: var(--button-height);
|
|
264
|
-
padding: 0
|
|
264
|
+
padding-block: 0;
|
|
265
|
+
padding-inline-start: var(--button-container-padding-start, var(--button-container-padding, var(--_button-container-padding)));
|
|
266
|
+
padding-inline-end: var(--button-container-padding-end, var(--button-container-padding, var(--_button-container-padding)));
|
|
265
267
|
width: 100%;
|
|
266
268
|
}
|
|
267
269
|
.button .label {
|
package/dist/icon-button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.js","sources":["../../src/button/icon-button/icon-button.ts"],"sourcesContent":["import { html, LitElement, nothing, type PropertyValues } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { when } from 'lit/directives/when.js';\nimport styles from './icon-button.scss';\nimport { isLink } from '@/__internal/utils/is-link.js';\nimport {\n dispatchActivationClick,\n isActivationClick,\n} from '@/__internal/utils/dispatch-event-utils.js';\nimport { DISABLED_REASON_ID } from '@/button/ButtonConstants.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport {\n iconButtonLabel,\n mixinBaseButton,\n mixinButtonLevel,\n toggleButtonSelected,\n warnIfUnnamed,\n} from '../base-button/base-button.js';\nimport { mixinHyperlink } from '@/__internal/mixins/hyperlink.js';\nimport { mixinDelegatesAria } from '@/__internal/aria/delegate.js';\nimport { mixinFormSubmitter } from '@/__internal/mixins/form-submitter.js';\nimport { mixinFormAssociated } from '@/__internal/mixins/form-associated.js';\nimport { mixinElementInternals } from '@/__internal/mixins/element-internals.js';\nimport { ARIAMixinStrict } from '@/__internal/aria/aria.js';\nimport type { ButtonShape, ButtonSize } from '@/button/ButtonTypes.js';\n\n/**\n * @label Icon Button\n * @tag wc-icon-button\n * @rawTag icon-button\n *\n * @summary A button that shows only an icon, for compact actions such as close or more options; it can also toggle.\n *\n * @overview\n * <p>An icon button has no visible text, so give it an <code>aria-label</code>. Without one, its <code>tooltip</code> text is used as the accessible name; with neither, a warning is logged once.</p>\n * <p><code>level</code> is a preset of <code>color</code> and <code>variant</code>, the same as on <code>wc-button</code>. Set <code>toggle</code> for a toggle button with <code>aria-pressed</code>; <code>selected</code> does nothing without it. Link mode (<code>href</code>) stays supported, for toolbar links.</p>\n *\n * @cssprop --button-container-shape: Defines the border radius of the button container shape.\n *\n * @cssprop --button-container-shape-start-start: Defines the start position of the button container shape.\n * @cssprop --button-container-shape-start-end: Defines the end position of the button container shape.\n * @cssprop --button-container-shape-end-start: Defines the start position of the button container shape.\n * @cssprop --button-container-shape-end-end: Defines the end position of the button container shape.\n *\n *\n * @cssprop --filled-button-container-color: Color of the filled button container.\n * @cssprop --filled-button-label-text-color: Text color of the filled button label.\n *\n * @cssprop --outlined-button-container-color: Color of the outlined button container.\n * @cssprop --outlined-button-label-text-color: Text color of the outlined button label.\n *\n * @cssprop --text-button-label-text-color: Text color of the text button label.\n *\n * @cssprop --tonal-button-container-color: Color of the tonal button container.\n * @cssprop --tonal-button-label-text-color: Text color of the tonal button label.\n *\n * @cssprop --elevated-button-container-color: Color of the elevated button container.\n * @cssprop --elevated-button-label-text-color: Text color of the elevated button label.\n *\n * @cssprop --neo-button-container-color: Color of the neo button container.\n * @cssprop --neo-button-label-text-color: Text color of the neo button label.\n *\n * @fires {MouseEvent} click - Dispatched when the button is clicked. Not dispatched while `loading`, `soft-disabled` or `skeleton`.\n * @fires {CustomEvent<{ selected: boolean }>} change - Dispatched by a `toggle` button after a click flips `selected`.\n *\n * @example\n * ```html\n * <wc-icon-button aria-label=\"Home\"><wc-icon name=\"home\"></wc-icon></wc-icon-button>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class IconButton extends mixinButtonLevel(\n mixinBaseButton(\n mixinHyperlink(\n mixinDelegatesAria(\n mixinFormSubmitter(\n mixinFormAssociated(mixinElementInternals(LitElement)),\n ),\n ),\n ),\n ),\n) {\n // ── Static ───────────────────────────────────────────────────────────────\n\n /** @nocollapse */ // eslint-disable-next-line\n static override shadowRootOptions: ShadowRootInit = {\n mode: 'open',\n delegatesFocus: true,\n };\n\n static override styles = [styles];\n\n // ── Properties ───────────────────────────────────────────────────────────\n\n /**\n * Button size.\n * Possible values are `\"xs\"`, `\"sm\"`, `\"md\"`, `\"lg\"`, `\"xl\"`. Defaults to `\"sm\"`.\n */\n @property({ reflect: true }) size: ButtonSize = 'sm';\n\n /** Shape of the button container. */\n @property({ type: String, reflect: true }) shape?: ButtonShape = 'square';\n\n /** When true, renders the button as a placeholder skeleton while the page loads. */\n @property({ type: Boolean, reflect: true }) skeleton: boolean = false;\n\n /**\n * When true, the button is busy: it shows a spinner in place of its icon, sets\n * `aria-busy=\"true\"` and ignores clicks, like `soft-disabled`.\n */\n @property({ type: Boolean, reflect: true }) loading: boolean = false;\n\n /**\n * When true, the button is a toggle button: it renders `aria-pressed`, flips `selected` on click\n * and fires `change`.\n */\n @property({ type: Boolean, reflect: true }) toggle: boolean = false;\n\n /** The pressed state of a `toggle` button. Has no effect without `toggle`. */\n @property({ type: Boolean, reflect: true }) selected: boolean = false;\n\n /**\n * Tooltip text displayed on hover. Also the accessible name when no `aria-label` is set.\n */\n @property() tooltip?: string;\n\n // ── Queries ───────────────────────────────────────────────────────────────\n\n @query('.button') readonly buttonElement!: HTMLElement | null;\n\n // ── Constructor ───────────────────────────────────────────────────────────\n\n constructor() {\n super();\n this.addEventListener('click', this.__dispatchClickWithThrottle);\n }\n\n // ── Lifecycle ─────────────────────────────────────────────────────────────\n\n override firstUpdated(changedProperties: PropertyValues<this>) {\n super.firstUpdated(changedProperties);\n warnIfUnnamed(this, (this as ARIAMixinStrict).ariaLabel, this.tooltip);\n }\n\n // ── Public methods ────────────────────────────────────────────────────────\n\n override focus() {\n this.buttonElement?.focus();\n }\n\n override blur() {\n this.buttonElement?.blur();\n }\n\n // ── Private methods ───────────────────────────────────────────────────────\n\n __dispatchClick = (event: MouseEvent | KeyboardEvent) => {\n // If the button is soft-disabled, loading or a disabled link, we need to\n // explicitly prevent the click from propagating to other event listeners\n // as well as prevent the default action.\n if (\n this.softDisabled ||\n this.loading ||\n (this.disabled && this.href) ||\n this.skeleton\n ) {\n event.stopImmediatePropagation();\n event.preventDefault();\n return;\n }\n\n // Each activation reaches this listener once: either the inner button's\n // click bubbling out, or a click fired at the host and forwarded below.\n if (!isLink(this)) toggleButtonSelected(this);\n\n if (!isActivationClick(event) || !this.buttonElement) {\n return;\n }\n\n this.focus();\n dispatchActivationClick(this.buttonElement);\n };\n\n // ── Render helpers ────────────────────────────────────────────────────────\n\n renderDisabledReason(softDisabled: boolean) {\n if (softDisabled)\n return html`<div\n id=${DISABLED_REASON_ID}\n role=\"tooltip\"\n aria-label=${this.disabledReason}\n class=\"screen-reader-only\"\n >\n ${this.disabledReason}\n </div>`;\n return nothing;\n }\n\n renderTooltip() {\n if (this.tooltip) {\n const buttonId = isLink(this) ? 'link' : 'button';\n return html`<wc-tooltip class=\"tooltip\" for=${buttonId}\n >${this.tooltip}</wc-tooltip\n >`;\n }\n return nothing;\n }\n\n renderLoadingIndicator() {\n if (!this.loading) return nothing;\n return html`<wc-circular-progress\n class=\"loading-indicator\"\n indeterminate\n aria-hidden=\"true\"\n ></wc-circular-progress>`;\n }\n\n renderButtonContent() {\n return html`\n ${this.renderLoadingIndicator()}\n <slot class=\"icon-slot\"></slot>\n <div class=\"touch\"></div>\n ${this.renderDisabledReason(this.softDisabled)}\n `;\n }\n\n renderButtonElement() {\n const isElementLink = isLink(this);\n const { ariaLabel, ariaHasPopup, ariaExpanded } = this as ARIAMixinStrict;\n const label = iconButtonLabel(ariaLabel, this.tooltip);\n\n const cssClasses = {\n button: true,\n 'native-button': !isElementLink,\n 'native-link': isElementLink,\n };\n\n if (!isElementLink) {\n return html`<button\n class=${classMap(cssClasses)}\n id=\"button\"\n aria-label=\"${label || nothing}\"\n aria-haspopup=\"${ariaHasPopup || nothing}\"\n aria-expanded=\"${ariaExpanded || nothing}\"\n aria-describedby=${ifDefined(\n this.softDisabled ? DISABLED_REASON_ID : undefined,\n )}\n aria-disabled=${this.softDisabled ? 'true' : nothing}\n aria-pressed=${this.toggle ? String(this.selected) : nothing}\n aria-busy=${this.loading ? 'true' : nothing}\n ?disabled=${this.disabled}\n >\n ${this.renderButtonContent()}\n </button>`;\n }\n return html`<a\n class=${classMap(cssClasses)}\n id=\"link\"\n href=${this.href}\n target=${this.target}\n rel=${this.rel || nothing}\n download=${this.download || nothing}\n tabindex=${this.disabled ? '-1' : '0'}\n aria-label=\"${label || nothing}\"\n aria-haspopup=\"${ariaHasPopup || nothing}\"\n aria-expanded=\"${ariaExpanded || nothing}\"\n aria-describedby=${ifDefined(\n this.softDisabled ? DISABLED_REASON_ID : undefined,\n )}\n aria-disabled=${this.softDisabled ? 'true' : nothing}\n aria-busy=${this.loading ? 'true' : nothing}\n >\n ${this.renderButtonContent()}\n </a>`;\n }\n\n // ── Render ────────────────────────────────────────────────────────────────\n\n override render() {\n const buttonId = isLink(this) ? 'link' : 'button';\n\n return html`\n <wc-focus-ring class=\"focus-ring\" for=${buttonId}></wc-focus-ring>\n <wc-elevation class=\"elevation\"></wc-elevation>\n ${when(\n this.variant === 'neo',\n () => html`<div class=\"neo-background\"></div>`,\n )}\n <div class=\"background\"></div>\n ${when(\n this.variant === 'outlined' || this.variant === 'neo',\n () => html`<div class=\"outline\"></div>`,\n )}\n <wc-ripple class=\"ripple\" for=${buttonId}></wc-ripple>\n <wc-skeleton class=\"skeleton\"></wc-skeleton>\n\n ${this.renderButtonElement()} ${this.renderTooltip()}\n `;\n }\n}\n"],"names":["LitElement","html","nothing","classMap","ifDefined","when","styles","property","query"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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xB,UAAA,CAAA;IAA3CA,GAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAA4B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAK1D,UAAA,CAAA;AAAX,IAAAA,GAAQ;AAAoB,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAIF,UAAA,CAAA;IAA1BC,GAAK,CAAC,SAAS;AAA8C,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;AAzDnD,UAAU,GAAA,UAAA,CAAA;IADtB;AACY,CAAA,EAAA,UAAU,CAoOtB;;;;"}
|
|
1
|
+
{"version":3,"file":"icon-button.js","sources":["../../src/button/icon-button/icon-button.ts"],"sourcesContent":["import { html, LitElement, nothing, type PropertyValues } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { when } from 'lit/directives/when.js';\nimport styles from './icon-button.scss';\nimport { isLink } from '@/__internal/utils/is-link.js';\nimport {\n dispatchActivationClick,\n isActivationClick,\n} from '@/__internal/utils/dispatch-event-utils.js';\nimport { DISABLED_REASON_ID } from '@/button/ButtonConstants.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport {\n iconButtonLabel,\n mixinBaseButton,\n mixinButtonLevel,\n toggleButtonSelected,\n warnIfUnnamed,\n} from '../base-button/base-button.js';\nimport { mixinHyperlink } from '@/__internal/mixins/hyperlink.js';\nimport { mixinDelegatesAria } from '@/__internal/aria/delegate.js';\nimport { mixinFormSubmitter } from '@/__internal/mixins/form-submitter.js';\nimport { mixinFormAssociated } from '@/__internal/mixins/form-associated.js';\nimport { mixinElementInternals } from '@/__internal/mixins/element-internals.js';\nimport { ARIAMixinStrict } from '@/__internal/aria/aria.js';\nimport type { ButtonShape, ButtonSize } from '@/button/ButtonTypes.js';\n\n/**\n * @label Icon Button\n * @tag wc-icon-button\n * @rawTag icon-button\n *\n * @summary A button that shows only an icon, for compact actions such as close or more options; it can also toggle.\n *\n * @overview\n * <p>An icon button has no visible text, so give it an <code>aria-label</code>. Without one, its <code>tooltip</code> text is used as the accessible name; with neither, a warning is logged once.</p>\n * <p><code>level</code> is a preset of <code>color</code> and <code>variant</code>, the same as on <code>wc-button</code>. Set <code>toggle</code> for a toggle button with <code>aria-pressed</code>; <code>selected</code> does nothing without it. Link mode (<code>href</code>) stays supported, for toolbar links.</p>\n *\n * @cssprop --button-container-shape: Defines the border radius of the button container shape.\n *\n * @cssprop --button-container-shape-start-start: Defines the start position of the button container shape.\n * @cssprop --button-container-shape-start-end: Defines the end position of the button container shape.\n * @cssprop --button-container-shape-end-start: Defines the start position of the button container shape.\n * @cssprop --button-container-shape-end-end: Defines the end position of the button container shape.\n *\n *\n * @cssprop --filled-button-container-color: Color of the filled button container.\n * @cssprop --filled-button-label-text-color: Text color of the filled button label.\n *\n * @cssprop --outlined-button-container-color: Color of the outlined button container.\n * @cssprop --outlined-button-label-text-color: Text color of the outlined button label.\n *\n * @cssprop --text-button-label-text-color: Text color of the text button label.\n *\n * @cssprop --tonal-button-container-color: Color of the tonal button container.\n * @cssprop --tonal-button-label-text-color: Text color of the tonal button label.\n *\n * @cssprop --elevated-button-container-color: Color of the elevated button container.\n * @cssprop --elevated-button-label-text-color: Text color of the elevated button label.\n *\n * @cssprop --neo-button-container-color: Color of the neo button container.\n * @cssprop --neo-button-label-text-color: Text color of the neo button label.\n *\n * @fires {MouseEvent} click - Dispatched when the button is clicked. Not dispatched while `loading`, `soft-disabled` or `skeleton`.\n * @fires {CustomEvent<{ selected: boolean }>} change - Dispatched by a `toggle` button after a click flips `selected`.\n *\n * @example\n * ```html\n * <wc-icon-button aria-label=\"Home\"><wc-icon name=\"home\"></wc-icon></wc-icon-button>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class IconButton extends mixinButtonLevel(\n mixinBaseButton(\n mixinHyperlink(\n mixinDelegatesAria(\n mixinFormSubmitter(\n mixinFormAssociated(mixinElementInternals(LitElement)),\n ),\n ),\n ),\n ),\n) {\n // ── Static ───────────────────────────────────────────────────────────────\n\n /** @nocollapse */ // eslint-disable-next-line\n static override shadowRootOptions: ShadowRootInit = {\n mode: 'open',\n delegatesFocus: true,\n };\n\n static override styles = [styles];\n\n // ── Properties ───────────────────────────────────────────────────────────\n\n /**\n * Button size.\n * Possible values are `\"xs\"`, `\"sm\"`, `\"md\"`, `\"lg\"`, `\"xl\"`. Defaults to `\"sm\"`.\n */\n @property({ reflect: true }) size: ButtonSize = 'sm';\n\n /** Shape of the button container. */\n @property({ type: String, reflect: true }) shape?: ButtonShape = 'square';\n\n /** When true, renders the button as a placeholder skeleton while the page loads. */\n @property({ type: Boolean, reflect: true }) skeleton: boolean = false;\n\n /**\n * When true, the button is busy: it shows a spinner in place of its icon, sets\n * `aria-busy=\"true\"` and ignores clicks, like `soft-disabled`.\n */\n @property({ type: Boolean, reflect: true }) loading: boolean = false;\n\n /**\n * When true, the button is a toggle button: it renders `aria-pressed`, flips `selected` on click\n * and fires `change`.\n */\n @property({ type: Boolean, reflect: true }) toggle: boolean = false;\n\n /** The pressed state of a `toggle` button. Has no effect without `toggle`. */\n @property({ type: Boolean, reflect: true }) selected: boolean = false;\n\n /**\n * Tooltip text displayed on hover. Also the accessible name when no `aria-label` is set.\n */\n @property() tooltip?: string;\n\n // ── Queries ───────────────────────────────────────────────────────────────\n\n @query('.button') readonly buttonElement!: HTMLElement | null;\n\n // ── Constructor ───────────────────────────────────────────────────────────\n\n constructor() {\n super();\n this.addEventListener('click', this.__dispatchClickWithThrottle);\n }\n\n // ── Lifecycle ─────────────────────────────────────────────────────────────\n\n override firstUpdated(changedProperties: PropertyValues<this>) {\n super.firstUpdated(changedProperties);\n warnIfUnnamed(this, (this as ARIAMixinStrict).ariaLabel, this.tooltip);\n }\n\n // ── Public methods ────────────────────────────────────────────────────────\n\n override focus() {\n this.buttonElement?.focus();\n }\n\n override blur() {\n this.buttonElement?.blur();\n }\n\n // ── Private methods ───────────────────────────────────────────────────────\n\n __dispatchClick = (event: MouseEvent | KeyboardEvent) => {\n // If the button is soft-disabled, loading or a disabled link, we need to\n // explicitly prevent the click from propagating to other event listeners\n // as well as prevent the default action.\n if (\n this.softDisabled ||\n this.loading ||\n (this.disabled && this.href) ||\n this.skeleton\n ) {\n event.stopImmediatePropagation();\n event.preventDefault();\n return;\n }\n\n // Each activation reaches this listener once: either the inner button's\n // click bubbling out, or a click fired at the host and forwarded below.\n if (!isLink(this)) toggleButtonSelected(this);\n\n if (!isActivationClick(event) || !this.buttonElement) {\n return;\n }\n\n this.focus();\n dispatchActivationClick(this.buttonElement);\n };\n\n // ── Render helpers ────────────────────────────────────────────────────────\n\n renderDisabledReason(softDisabled: boolean) {\n if (softDisabled)\n return html`<div\n id=${DISABLED_REASON_ID}\n role=\"tooltip\"\n aria-label=${this.disabledReason}\n class=\"screen-reader-only\"\n >\n ${this.disabledReason}\n </div>`;\n return nothing;\n }\n\n renderTooltip() {\n if (this.tooltip) {\n const buttonId = isLink(this) ? 'link' : 'button';\n return html`<wc-tooltip class=\"tooltip\" for=${buttonId}\n >${this.tooltip}</wc-tooltip\n >`;\n }\n return nothing;\n }\n\n renderLoadingIndicator() {\n if (!this.loading) return nothing;\n return html`<wc-circular-progress\n class=\"loading-indicator\"\n indeterminate\n aria-hidden=\"true\"\n ></wc-circular-progress>`;\n }\n\n renderButtonContent() {\n return html`\n ${this.renderLoadingIndicator()}\n <slot class=\"icon-slot\"></slot>\n <div class=\"touch\"></div>\n ${this.renderDisabledReason(this.softDisabled)}\n `;\n }\n\n renderButtonElement() {\n const isElementLink = isLink(this);\n const { ariaLabel, ariaHasPopup, ariaExpanded } = this as ARIAMixinStrict;\n const label = iconButtonLabel(ariaLabel, this.tooltip);\n\n const cssClasses = {\n button: true,\n 'native-button': !isElementLink,\n 'native-link': isElementLink,\n };\n\n if (!isElementLink) {\n return html`<button\n class=${classMap(cssClasses)}\n id=\"button\"\n aria-label=\"${label || nothing}\"\n aria-haspopup=\"${ariaHasPopup || nothing}\"\n aria-expanded=\"${ariaExpanded || nothing}\"\n aria-describedby=${ifDefined(\n this.softDisabled ? DISABLED_REASON_ID : undefined,\n )}\n aria-disabled=${this.softDisabled ? 'true' : nothing}\n aria-pressed=${this.toggle ? String(this.selected) : nothing}\n aria-busy=${this.loading ? 'true' : nothing}\n ?disabled=${this.disabled}\n >\n ${this.renderButtonContent()}\n </button>`;\n }\n return html`<a\n class=${classMap(cssClasses)}\n id=\"link\"\n href=${this.href}\n target=${this.target}\n rel=${this.rel || nothing}\n download=${this.download || nothing}\n tabindex=${this.disabled ? '-1' : '0'}\n aria-label=\"${label || nothing}\"\n aria-haspopup=\"${ariaHasPopup || nothing}\"\n aria-expanded=\"${ariaExpanded || nothing}\"\n aria-describedby=${ifDefined(\n this.softDisabled ? DISABLED_REASON_ID : undefined,\n )}\n aria-disabled=${this.softDisabled ? 'true' : nothing}\n aria-busy=${this.loading ? 'true' : nothing}\n >\n ${this.renderButtonContent()}\n </a>`;\n }\n\n // ── Render ────────────────────────────────────────────────────────────────\n\n override render() {\n const buttonId = isLink(this) ? 'link' : 'button';\n\n return html`\n <wc-focus-ring class=\"focus-ring\" for=${buttonId}></wc-focus-ring>\n <wc-elevation class=\"elevation\"></wc-elevation>\n ${when(\n this.variant === 'neo',\n () => html`<div class=\"neo-background\"></div>`,\n )}\n <div class=\"background\"></div>\n ${when(\n this.variant === 'outlined' || this.variant === 'neo',\n () => html`<div class=\"outline\"></div>`,\n )}\n <wc-ripple class=\"ripple\" for=${buttonId}></wc-ripple>\n <wc-skeleton class=\"skeleton\"></wc-skeleton>\n\n ${this.renderButtonElement()} ${this.renderTooltip()}\n `;\n }\n}\n"],"names":["LitElement","html","nothing","classMap","ifDefined","when","styles","property","query"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AE,IAAI,EAAE;AAA2B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAMzB,UAAA,CAAA;IAA3CA,GAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAA0B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;AAGxB,UAAA,CAAA;IAA3CA,GAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAA4B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAK1D,UAAA,CAAA;AAAX,IAAAA,GAAQ;AAAoB,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAIF,UAAA,CAAA;IAA1BC,GAAK,CAAC,SAAS;AAA8C,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;AAzDnD,UAAU,GAAA,UAAA,CAAA;IADtB;AACY,CAAA,EAAA,UAAU,CAoOtB;;;;"}
|
package/dist/image.js
CHANGED
|
@@ -3,9 +3,9 @@ import { n } from './property-B2TG3KEE.js';
|
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { e } from './query-CHb9Ft_d.js';
|
|
5
5
|
import { o as observeThemeChange } from './observe-theme-change-CkSENG98.js';
|
|
6
|
-
import { I as I18nController } from './i18n-controller-
|
|
6
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
7
7
|
import './base-Cl6v8-BZ.js';
|
|
8
|
-
import './strings-
|
|
8
|
+
import './strings-o6v6Hrmn.js';
|
|
9
9
|
import './locale-DEsJZCQG.js';
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as defaultStrings, s as setPeacockStrings } from './strings-
|
|
1
|
+
export { d as defaultStrings, s as setPeacockStrings } from './strings-o6v6Hrmn.js';
|
|
2
2
|
export { Icon } from './icon.js';
|
|
3
3
|
export { s as setIconBase } from './datasource-OwvH7SVq.js';
|
|
4
4
|
export { Avatar } from './avatar.js';
|
|
@@ -63,7 +63,7 @@ export { MarkdownEditor } from './markdown-editor.js';
|
|
|
63
63
|
export { Markdown } from './markdown.js';
|
|
64
64
|
export { e as extractMentions } from './markdown-lexer-Bx4Vkpu6.js';
|
|
65
65
|
export { m as mentionToMarkdown } from './mention--NNhafc7.js';
|
|
66
|
-
export { D as DocumentEditor, e as emptyDocument, n as normalizeDocument } from './document-editor-
|
|
66
|
+
export { D as DocumentEditor, e as emptyDocument, n as normalizeDocument } from './document-editor-Cb9fCxvA.js';
|
|
67
67
|
export { Image } from './image.js';
|
|
68
68
|
export { Svg } from './svg.js';
|
|
69
69
|
export { Tab } from './tab.js';
|
|
@@ -156,12 +156,13 @@ export { Citation } from './citation.js';
|
|
|
156
156
|
export { PromptInput } from './prompt-input.js';
|
|
157
157
|
export { ChatMessage } from './chat-message.js';
|
|
158
158
|
export { ChatThread } from './chat-thread.js';
|
|
159
|
+
export { ChatEvent } from './chat-event.js';
|
|
159
160
|
export { AssistantSteps } from './assistant-steps.js';
|
|
160
161
|
export { AssistantStep } from './assistant-step.js';
|
|
161
162
|
export { DraftCard } from './draft-card.js';
|
|
162
163
|
export { AiSummary } from './ai-summary.js';
|
|
163
|
-
export { G as GenerativeView, p as parsePartialJson } from './generative-view-
|
|
164
|
-
export { g as generativeViewSchema } from './schema-
|
|
164
|
+
export { G as GenerativeView, p as parsePartialJson } from './generative-view-C4fJ2zI7.js';
|
|
165
|
+
export { g as generativeViewSchema } from './schema-BJzlGRP1.js';
|
|
165
166
|
export { AssistantPanel } from './assistant-panel.js';
|
|
166
167
|
export { HoverCard } from './hover-card.js';
|
|
167
168
|
export { Kanban, applyKanbanMove } from './kanban.js';
|
|
@@ -177,7 +178,7 @@ export { I as Illustration, i as illustrationNames, r as registerIllustration }
|
|
|
177
178
|
export { Calendar } from './calendar.js';
|
|
178
179
|
export { CalendarColumnView } from './calendar-column-view.js';
|
|
179
180
|
export { CalendarMonthView } from './calendar-month-view.js';
|
|
180
|
-
export { D as Diagram } from './diagram-
|
|
181
|
+
export { D as Diagram } from './diagram-CHF70xTL.js';
|
|
181
182
|
export { Flow } from './flow.js';
|
|
182
183
|
export { DiagramControls } from './diagram-controls.js';
|
|
183
184
|
export { Workflow } from './workflow.js';
|
|
@@ -188,7 +189,7 @@ export { Erd } from './erd.js';
|
|
|
188
189
|
export { DiagramMinimap } from './diagram-minimap.js';
|
|
189
190
|
export { ConditionBuilder } from './condition-builder.js';
|
|
190
191
|
export { CbGroup } from './cb-group.js';
|
|
191
|
-
export { C as CbRule } from './cb-group-base-
|
|
192
|
+
export { C as CbRule } from './cb-group-base-CZLzCnXK.js';
|
|
192
193
|
export { CbDivider } from './cb-divider.js';
|
|
193
194
|
export { W as WORKFLOW_LOGIC_STEPS } from './workflow-model-CauduOG2.js';
|
|
194
195
|
import './IndividualComponent-BK7XZjE2.js';
|
|
@@ -214,38 +215,38 @@ import './warn-once-BNxX1Y98.js';
|
|
|
214
215
|
import './form-associated-BHbg72PG.js';
|
|
215
216
|
import './is-link-Dk2OV3PM.js';
|
|
216
217
|
import './hyperlink-DycWPKwU.js';
|
|
217
|
-
import './i18n-controller-
|
|
218
|
-
import './menu-trigger-controller-
|
|
218
|
+
import './i18n-controller-CH4e9sju.js';
|
|
219
|
+
import './menu-trigger-controller-CEJq1ugC.js';
|
|
219
220
|
import './attachable-controller-DofeyflD.js';
|
|
220
221
|
import './query-assigned-elements-BJaGSqM0.js';
|
|
221
222
|
import './roving-focus-controller-fm95JkZJ.js';
|
|
222
223
|
import './NativeHyperlinkMixin-WdY0fM-H.js';
|
|
223
224
|
import './spread-B5cgadZl.js';
|
|
224
|
-
import './BaseInput-
|
|
225
|
-
import './suggestion-controller-
|
|
225
|
+
import './BaseInput-xCHvT4AN.js';
|
|
226
|
+
import './suggestion-controller-7YRQqkaI.js';
|
|
226
227
|
import './style-map-CHOg6N_R.js';
|
|
227
|
-
import './base-progress-
|
|
228
|
-
import './BaseField-
|
|
228
|
+
import './base-progress-DxNgAQtw.js';
|
|
229
|
+
import './BaseField-D8ByB0l3.js';
|
|
229
230
|
import './date-vFrYT1S9.js';
|
|
230
231
|
import './utils-D92ldd1V.js';
|
|
231
|
-
import './picker-field-
|
|
232
|
+
import './picker-field-loXW-xrW.js';
|
|
232
233
|
import './range-utils-BoKOhxVX.js';
|
|
233
|
-
import './toggle-base-
|
|
234
|
+
import './toggle-base-BSzBnLZN.js';
|
|
234
235
|
import './floating-controller-CABF4tBT.js';
|
|
235
236
|
import './placement-C4GO0JP9.js';
|
|
236
237
|
import './overlay-controller-BOk-kfil.js';
|
|
237
238
|
import './query-all-ThKhg-Lp.js';
|
|
238
239
|
import './token-colors-DEO6rvEu.js';
|
|
239
240
|
import './observe-theme-change-CkSENG98.js';
|
|
240
|
-
import './rich-text-input-
|
|
241
|
+
import './rich-text-input-B5j0eqCJ.js';
|
|
241
242
|
import './slash-controller-DAsDquPA.js';
|
|
242
243
|
import './diff-CT416thw.js';
|
|
243
244
|
import './sparkle-BmtM0vbq.js';
|
|
244
245
|
import './url-BFUh__RO.js';
|
|
245
246
|
import './transform-CxeQFXXB.js';
|
|
246
|
-
import './chart-base-
|
|
247
|
+
import './chart-base-DREru2P0.js';
|
|
247
248
|
import './path-CJ0Arqcy.js';
|
|
248
|
-
import './cartesian-chart-
|
|
249
|
+
import './cartesian-chart-G6VX1aKk.js';
|
|
249
250
|
import './repeat-D_ERDRYT.js';
|
|
250
251
|
import './directive-helpers-Bx3mu42O.js';
|
|
251
252
|
import './virtual-window-5OYyIqZh.js';
|
|
@@ -254,11 +255,11 @@ import './live-D_5OfuGD.js';
|
|
|
254
255
|
import './navigation-item-base-kUrvJgCx.js';
|
|
255
256
|
import './indicator-navigation-item-CmyhsOmy.js';
|
|
256
257
|
import './platform-BUuoTAmr.js';
|
|
257
|
-
import './relative-time-
|
|
258
|
-
import './discussion-time-
|
|
258
|
+
import './relative-time-BNxqvEbg.js';
|
|
259
|
+
import './discussion-time-DqykqvNy.js';
|
|
259
260
|
import './calendar-event-_OYdAT3c.js';
|
|
260
261
|
import './event-manager-CWAWPOUE.js';
|
|
261
|
-
import './canvas-base-
|
|
262
|
+
import './canvas-base-DHKf2CmA.js';
|
|
262
263
|
import './geometry-INg82Lxq.js';
|
|
263
264
|
import './host-CZK7xhzh.js';
|
|
264
265
|
import './measure-controller-Dmc5hZKg.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/inline-edit.js
CHANGED
|
@@ -3,10 +3,10 @@ import { n } from './property-B2TG3KEE.js';
|
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { e } from './query-CHb9Ft_d.js';
|
|
5
5
|
import { e as e$1 } from './class-map-NDIkZErE.js';
|
|
6
|
-
import { I as I18nController } from './i18n-controller-
|
|
6
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
7
7
|
import './base-Cl6v8-BZ.js';
|
|
8
8
|
import './directive-ZPhl09Yt.js';
|
|
9
|
-
import './strings-
|
|
9
|
+
import './strings-o6v6Hrmn.js';
|
|
10
10
|
import './locale-DEsJZCQG.js';
|
|
11
11
|
|
|
12
12
|
var css_248z = i`* {
|
package/dist/input.js
CHANGED
|
@@ -2,15 +2,15 @@ import { i, _ as __decorate, I as IndividualComponent, A, b } from './Individual
|
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
3
|
import { e } from './query-CHb9Ft_d.js';
|
|
4
4
|
import { s as spread } from './spread-B5cgadZl.js';
|
|
5
|
-
import { B as BaseField } from './BaseField-
|
|
6
|
-
import { n as nativeValidity } from './BaseInput-
|
|
5
|
+
import { B as BaseField } from './BaseField-D8ByB0l3.js';
|
|
6
|
+
import { n as nativeValidity } from './BaseInput-xCHvT4AN.js';
|
|
7
7
|
import './base-Cl6v8-BZ.js';
|
|
8
8
|
import './directive-ZPhl09Yt.js';
|
|
9
9
|
import './state-BCeDVCI9.js';
|
|
10
|
-
import './strings-
|
|
10
|
+
import './strings-o6v6Hrmn.js';
|
|
11
11
|
import './element-internals-QME0yEz4.js';
|
|
12
12
|
import './form-associated-BHbg72PG.js';
|
|
13
|
-
import './suggestion-controller-
|
|
13
|
+
import './suggestion-controller-7YRQqkaI.js';
|
|
14
14
|
import './ai-controller-DR_Tg0sN.js';
|
|
15
15
|
import './locale-DEsJZCQG.js';
|
|
16
16
|
|
package/dist/json-viewer.js
CHANGED
|
@@ -2,12 +2,12 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, A, b } from './
|
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { c } from './repeat-D_ERDRYT.js';
|
|
5
|
-
import { I as I18nController } from './i18n-controller-
|
|
5
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
6
6
|
import { R as RovingFocusController } from './roving-focus-controller-fm95JkZJ.js';
|
|
7
7
|
import { w as writeClipboardText } from './clipboard-C7hBdUXP.js';
|
|
8
8
|
import './directive-ZPhl09Yt.js';
|
|
9
9
|
import './directive-helpers-Bx3mu42O.js';
|
|
10
|
-
import './strings-
|
|
10
|
+
import './strings-o6v6Hrmn.js';
|
|
11
11
|
import './locale-DEsJZCQG.js';
|
|
12
12
|
|
|
13
13
|
/** Keys that JSONPath can write with dot notation. */
|
package/dist/kanban.js
CHANGED
|
@@ -2,11 +2,11 @@ import { i, _ as __decorate, I as IndividualComponent, a as i$1, D, A, b } from
|
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
3
|
import { r } from './state-BCeDVCI9.js';
|
|
4
4
|
import { c } from './repeat-D_ERDRYT.js';
|
|
5
|
-
import { I as I18nController } from './i18n-controller-
|
|
5
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
6
6
|
import { i as isRtl } from './locale-DEsJZCQG.js';
|
|
7
7
|
import './directive-ZPhl09Yt.js';
|
|
8
8
|
import './directive-helpers-Bx3mu42O.js';
|
|
9
|
-
import './strings-
|
|
9
|
+
import './strings-o6v6Hrmn.js';
|
|
10
10
|
|
|
11
11
|
var css_248z = i`* {
|
|
12
12
|
box-sizing: border-box;
|
package/dist/kbd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i, _ as __decorate, I as IndividualComponent, a as i$1, b, A } from './IndividualComponent-BK7XZjE2.js';
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
|
-
import { I as I18nController } from './i18n-controller-
|
|
3
|
+
import { I as I18nController } from './i18n-controller-CH4e9sju.js';
|
|
4
4
|
import { i as isApplePlatform } from './platform-BUuoTAmr.js';
|
|
5
|
-
import './strings-
|
|
5
|
+
import './strings-o6v6Hrmn.js';
|
|
6
6
|
import './locale-DEsJZCQG.js';
|
|
7
7
|
|
|
8
8
|
var css_248z = i`* {
|
package/dist/linear-progress.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { i, _ as __decorate, I as IndividualComponent, A, b } from './IndividualComponent-BK7XZjE2.js';
|
|
2
2
|
import { e } from './class-map-NDIkZErE.js';
|
|
3
3
|
import { o } from './style-map-CHOg6N_R.js';
|
|
4
|
-
import { B as BaseProgress } from './base-progress-
|
|
4
|
+
import { B as BaseProgress } from './base-progress-DxNgAQtw.js';
|
|
5
5
|
import './directive-ZPhl09Yt.js';
|
|
6
6
|
import './property-B2TG3KEE.js';
|
|
7
|
-
import './i18n-controller-
|
|
8
|
-
import './strings-
|
|
7
|
+
import './i18n-controller-CH4e9sju.js';
|
|
8
|
+
import './strings-o6v6Hrmn.js';
|
|
9
9
|
import './locale-DEsJZCQG.js';
|
|
10
10
|
import './delegate-Bw2wdPFP.js';
|
|
11
11
|
|
package/dist/link-button.js
CHANGED
|
@@ -14,7 +14,7 @@ import './base-Cl6v8-BZ.js';
|
|
|
14
14
|
import './warn-once-BNxX1Y98.js';
|
|
15
15
|
|
|
16
16
|
var css_248z = i`.button {
|
|
17
|
-
transition-property: inset, width, height, transform, opacity;
|
|
17
|
+
transition-property: inset, width, height, transform, opacity, border-start-start-radius, border-start-end-radius, border-end-start-radius, border-end-end-radius;
|
|
18
18
|
transition-duration: 200ms;
|
|
19
19
|
transition-timing-function: var(--easing-standard);
|
|
20
20
|
will-change: inset, transform, opacity;
|
|
@@ -32,7 +32,7 @@ var css_248z = i`.button {
|
|
|
32
32
|
border-end-start-radius: var(--_button-container-shape-end-start, var(--_button-container-shape));
|
|
33
33
|
border-end-end-radius: var(--_button-container-shape-end-end, var(--_button-container-shape));
|
|
34
34
|
corner-shape: var(--_button-container-shape-variant);
|
|
35
|
-
transition-property: inset, width, height, transform, opacity;
|
|
35
|
+
transition-property: inset, width, height, transform, opacity, border-start-start-radius, border-start-end-radius, border-end-start-radius, border-end-end-radius;
|
|
36
36
|
transition-duration: 200ms;
|
|
37
37
|
transition-timing-function: var(--easing-standard);
|
|
38
38
|
will-change: inset, transform, opacity;
|
|
@@ -50,7 +50,7 @@ var css_248z = i`.button {
|
|
|
50
50
|
border-end-start-radius: var(--_button-container-shape-end-start, var(--_button-container-shape));
|
|
51
51
|
border-end-end-radius: var(--_button-container-shape-end-end, var(--_button-container-shape));
|
|
52
52
|
corner-shape: var(--_button-container-shape-variant);
|
|
53
|
-
transition-property: inset, width, height, transform, opacity;
|
|
53
|
+
transition-property: inset, width, height, transform, opacity, border-start-start-radius, border-start-end-radius, border-end-start-radius, border-end-end-radius;
|
|
54
54
|
transition-duration: 200ms;
|
|
55
55
|
transition-timing-function: var(--easing-standard);
|
|
56
56
|
will-change: inset, transform, opacity;
|
|
@@ -154,7 +154,7 @@ var css_248z = i`.button {
|
|
|
154
154
|
border-end-start-radius: var(--_button-container-shape-end-start, var(--_button-container-shape));
|
|
155
155
|
border-end-end-radius: var(--_button-container-shape-end-end, var(--_button-container-shape));
|
|
156
156
|
corner-shape: var(--_button-container-shape-variant);
|
|
157
|
-
transition-property: inset, width, height, transform, opacity;
|
|
157
|
+
transition-property: inset, width, height, transform, opacity, border-start-start-radius, border-start-end-radius, border-end-start-radius, border-end-end-radius;
|
|
158
158
|
transition-duration: 200ms;
|
|
159
159
|
transition-timing-function: var(--easing-standard);
|
|
160
160
|
will-change: inset, transform, opacity;
|
|
@@ -257,7 +257,9 @@ var css_248z = i`.button {
|
|
|
257
257
|
align-items: center;
|
|
258
258
|
justify-content: center;
|
|
259
259
|
height: var(--button-height);
|
|
260
|
-
padding: 0
|
|
260
|
+
padding-block: 0;
|
|
261
|
+
padding-inline-start: var(--button-container-padding-start, var(--button-container-padding, var(--_button-container-padding)));
|
|
262
|
+
padding-inline-end: var(--button-container-padding-end, var(--button-container-padding, var(--_button-container-padding)));
|
|
261
263
|
width: 100%;
|
|
262
264
|
}
|
|
263
265
|
.button .label {
|
package/dist/link-button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-button.js","sources":["../../src/button/link-button/link-button.ts"],"sourcesContent":["import { html, LitElement, nothing, type PropertyValues } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { when } from 'lit/directives/when.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './link-button.scss';\n\nimport type { ButtonShape, ButtonSize } from '@/button/ButtonTypes.js';\nimport { observerSlotChangesWithCallback } from '@/__internal/utils/observe-slot-change.js';\nimport {\n dispatchActivationClick,\n isActivationClick,\n} from '@/__internal/utils/dispatch-event-utils.js';\nimport { DISABLED_REASON_ID } from '@/button/ButtonConstants.js';\nimport { mixinDelegatesAria } from '@/__internal/aria/delegate.js';\nimport { ARIAMixinStrict } from '@/__internal/aria/aria.js';\nimport { mixinElementInternals } from '@/__internal/mixins/element-internals.js';\nimport { mixinHyperlink } from '@/__internal/mixins/hyperlink.js';\nimport {\n mixinBaseButton,\n mixinButtonLevel,\n} from '../base-button/base-button.js';\n\n/**\n * @label Link Button\n * @tag wc-link-button\n * @rawTag link-button\n *\n * @summary A link that looks like a button, for navigation that should read as a call to action.\n * @overview\n * <p>The link button renders a native <code><a></code> with the button's look: the same <code>variant</code>, <code>color</code>, <code>level</code>, <code>size</code>, <code>shape</code> and icon slot as <code>wc-button</code>. Use it when activating the control navigates (<code>href</code>, <code>target</code>, <code>rel</code>, <code>download</code>); use <code>wc-button</code> when it performs an action or submits a form.</p>\n * @cssprop --button-container-shape - Defines the border radius of the button container shape.\n * @cssprop --filled-button-container-color - Color of the filled button container.\n * @cssprop --filled-button-label-text-color - Text color of the filled button label.\n * @cssprop --outlined-button-label-text-color - Text color of the outlined button label.\n * @cssprop --text-button-label-text-color - Text color of the text button label.\n * @cssprop --tonal-button-container-color - Color of the tonal button container.\n * @cssprop --tonal-button-label-text-color - Text color of the tonal button label.\n *\n * @fires {MouseEvent} click - Dispatched when the link is clicked. Not dispatched while `disabled`, `soft-disabled` or `skeleton`.\n *\n * @example\n * ```html\n * <wc-link-button href=\"/docs\">Read the docs</wc-link-button>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class LinkButton extends mixinButtonLevel(\n mixinBaseButton(\n mixinHyperlink(mixinDelegatesAria(mixinElementInternals(LitElement))),\n ),\n) {\n // ── Static ───────────────────────────────────────────────────────────────\n\n /** @nocollapse */ // eslint-disable-next-line\n static override shadowRootOptions: ShadowRootInit = {\n mode: 'open',\n delegatesFocus: true,\n };\n\n static override styles = [styles];\n\n // ── Properties ───────────────────────────────────────────────────────────\n\n /**\n * When `true`, the icon is placed after the label (trailing).\n * When `false` (default), the icon is placed before the label (leading).\n */\n @property({ type: Boolean, reflect: true, attribute: 'trailing-icon' })\n trailingIcon = false;\n\n /**\n * Button size.\n * Possible values are `\"xs\"`, `\"sm\"`, `\"md\"`, `\"lg\"`, `\"xl\"`. Defaults to `\"sm\"`.\n */\n @property({ reflect: true }) size: ButtonSize = 'sm';\n\n /** Shape of the button container. */\n @property({ type: String, reflect: true }) shape: ButtonShape = 'square';\n\n /** When true, renders the link as a placeholder skeleton while the page loads. */\n @property({ type: Boolean, reflect: true }) skeleton: boolean = false;\n\n /** Optional tooltip text displayed on hover. */\n @property() tooltip?: string;\n\n // ── Queries ───────────────────────────────────────────────────────────────\n\n @query('.button') private readonly linkElement!: HTMLElement | null;\n\n // ── Private fields ────────────────────────────────────────────────────────\n\n private __iconSlotCleanup: (() => void) | null = null;\n\n private __labelSlotCleanup: (() => void) | null = null;\n\n // ── Constructor ───────────────────────────────────────────────────────────\n\n constructor() {\n super();\n this.addEventListener('click', this.__dispatchClickWithThrottle);\n }\n\n // ── Lifecycle ─────────────────────────────────────────────────────────────\n\n override disconnectedCallback() {\n this.__iconSlotCleanup?.();\n this.__labelSlotCleanup?.();\n this.__iconSlotCleanup = null;\n this.__labelSlotCleanup = null;\n super.disconnectedCallback();\n }\n\n override firstUpdated(changedProperties: PropertyValues<this>) {\n super.firstUpdated(changedProperties);\n const iconSlot =\n this.renderRoot.querySelector<HTMLSlotElement>('slot[name=\"icon\"]');\n const labelSlot =\n this.renderRoot.querySelector<HTMLSlotElement>('slot.label');\n if (iconSlot) {\n this.__iconSlotCleanup = observerSlotChangesWithCallback(iconSlot, has =>\n this.toggleAttribute('has-icon', has),\n );\n }\n if (labelSlot) {\n this.__labelSlotCleanup = observerSlotChangesWithCallback(\n labelSlot,\n has => this.toggleAttribute('has-label', has),\n );\n }\n }\n\n // ── Public methods ────────────────────────────────────────────────────────\n\n override focus() {\n this.linkElement?.focus();\n }\n\n override blur() {\n this.linkElement?.blur();\n }\n\n // ── Private methods ───────────────────────────────────────────────────────\n\n __dispatchClick = (event: MouseEvent | KeyboardEvent) => {\n // A link has no native disabled state, so a disabled, soft-disabled or\n // skeleton link swallows the click and stops the navigation.\n if (this.disabled || this.softDisabled || this.skeleton) {\n event.stopImmediatePropagation();\n event.preventDefault();\n return;\n }\n\n if (!isActivationClick(event) || !this.linkElement) {\n return;\n }\n\n this.focus();\n dispatchActivationClick(this.linkElement);\n };\n\n // ── Render helpers ────────────────────────────────────────────────────────\n\n renderDisabledReason() {\n if (!this.softDisabled) return nothing;\n return html`<div\n id=${DISABLED_REASON_ID}\n role=\"tooltip\"\n aria-label=${this.disabledReason}\n class=\"screen-reader-only\"\n >\n ${this.disabledReason}\n </div>`;\n }\n\n renderTooltip() {\n if (!this.tooltip) return nothing;\n return html`<wc-tooltip class=\"tooltip\" for=\"link\"\n >${this.tooltip}</wc-tooltip\n >`;\n }\n\n // ── Render ────────────────────────────────────────────────────────────────\n\n override render() {\n const { ariaLabel, ariaHasPopup, ariaExpanded } = this as ARIAMixinStrict;\n const inert = this.disabled || this.softDisabled;\n\n return html`\n <wc-focus-ring class=\"focus-ring\" for=\"link\"></wc-focus-ring>\n <wc-elevation class=\"elevation\"></wc-elevation>\n ${when(\n this.variant === 'neo',\n () => html`<div class=\"neo-background\"></div>`,\n )}\n <div class=\"background\"></div>\n ${when(\n this.variant === 'outlined' || this.variant === 'neo',\n () => html`<div class=\"outline\"></div>`,\n )}\n <wc-ripple class=\"ripple\" for=\"link\"></wc-ripple>\n <wc-skeleton class=\"skeleton\"></wc-skeleton>\n\n <a\n class=\"button native-link\"\n id=\"link\"\n href=${ifDefined(this.href)}\n target=${this.target || nothing}\n rel=${this.rel || nothing}\n download=${this.download || nothing}\n tabindex=${this.disabled ? '-1' : nothing}\n aria-label=${ariaLabel || nothing}\n aria-haspopup=${ariaHasPopup || nothing}\n aria-expanded=${ariaExpanded || nothing}\n aria-describedby=${ifDefined(\n this.softDisabled ? DISABLED_REASON_ID : undefined,\n )}\n aria-disabled=${inert ? 'true' : nothing}\n >\n <slot class=\"icon-slot\" name=\"icon\"></slot>\n <slot class=\"label\"></slot>\n <div class=\"touch\"></div>\n ${this.renderDisabledReason()}\n </a>\n ${this.renderTooltip()}\n `;\n }\n}\n"],"names":["LitElement","nothing","html","when","ifDefined","styles","property","query"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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E,IAAI;AACrB,CAHgC;AAKjB,UAAA,CAAA,MAAM,GAAG,CAACI,QAAM,CAAC;AASjC,UAAA,CAAA;AADC,IAAAC,GAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE;AACjD,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAMQ,UAAA,CAAA;AAA5B,IAAAA,GAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;AAA0B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAGV,UAAA,CAAA;IAA1CA,GAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AAAgC,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAG7B,UAAA,CAAA;IAA3CA,GAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAA4B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAG1D,UAAA,CAAA;AAAX,IAAAA,GAAQ;AAAoB,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAIM,UAAA,CAAA;IAAlCC,CAAK,CAAC,SAAS;AAAoD,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAzCzD,UAAU,GAAA,UAAA,CAAA;IADtB;AACY,CAAA,EAAA,UAAU,CAoLtB;;;;"}
|
|
1
|
+
{"version":3,"file":"link-button.js","sources":["../../src/button/link-button/link-button.ts"],"sourcesContent":["import { html, LitElement, nothing, type PropertyValues } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { when } from 'lit/directives/when.js';\nimport IndividualComponent from '@/IndividualComponent.js';\nimport styles from './link-button.scss';\n\nimport type { ButtonShape, ButtonSize } from '@/button/ButtonTypes.js';\nimport { observerSlotChangesWithCallback } from '@/__internal/utils/observe-slot-change.js';\nimport {\n dispatchActivationClick,\n isActivationClick,\n} from '@/__internal/utils/dispatch-event-utils.js';\nimport { DISABLED_REASON_ID } from '@/button/ButtonConstants.js';\nimport { mixinDelegatesAria } from '@/__internal/aria/delegate.js';\nimport { ARIAMixinStrict } from '@/__internal/aria/aria.js';\nimport { mixinElementInternals } from '@/__internal/mixins/element-internals.js';\nimport { mixinHyperlink } from '@/__internal/mixins/hyperlink.js';\nimport {\n mixinBaseButton,\n mixinButtonLevel,\n} from '../base-button/base-button.js';\n\n/**\n * @label Link Button\n * @tag wc-link-button\n * @rawTag link-button\n *\n * @summary A link that looks like a button, for navigation that should read as a call to action.\n * @overview\n * <p>The link button renders a native <code><a></code> with the button's look: the same <code>variant</code>, <code>color</code>, <code>level</code>, <code>size</code>, <code>shape</code> and icon slot as <code>wc-button</code>. Use it when activating the control navigates (<code>href</code>, <code>target</code>, <code>rel</code>, <code>download</code>); use <code>wc-button</code> when it performs an action or submits a form.</p>\n * @cssprop --button-container-shape - Defines the border radius of the button container shape.\n * @cssprop --filled-button-container-color - Color of the filled button container.\n * @cssprop --filled-button-label-text-color - Text color of the filled button label.\n * @cssprop --outlined-button-label-text-color - Text color of the outlined button label.\n * @cssprop --text-button-label-text-color - Text color of the text button label.\n * @cssprop --tonal-button-container-color - Color of the tonal button container.\n * @cssprop --tonal-button-label-text-color - Text color of the tonal button label.\n *\n * @fires {MouseEvent} click - Dispatched when the link is clicked. Not dispatched while `disabled`, `soft-disabled` or `skeleton`.\n *\n * @example\n * ```html\n * <wc-link-button href=\"/docs\">Read the docs</wc-link-button>\n * ```\n * @tags display\n */\n@IndividualComponent\nexport class LinkButton extends mixinButtonLevel(\n mixinBaseButton(\n mixinHyperlink(mixinDelegatesAria(mixinElementInternals(LitElement))),\n ),\n) {\n // ── Static ───────────────────────────────────────────────────────────────\n\n /** @nocollapse */ // eslint-disable-next-line\n static override shadowRootOptions: ShadowRootInit = {\n mode: 'open',\n delegatesFocus: true,\n };\n\n static override styles = [styles];\n\n // ── Properties ───────────────────────────────────────────────────────────\n\n /**\n * When `true`, the icon is placed after the label (trailing).\n * When `false` (default), the icon is placed before the label (leading).\n */\n @property({ type: Boolean, reflect: true, attribute: 'trailing-icon' })\n trailingIcon = false;\n\n /**\n * Button size.\n * Possible values are `\"xs\"`, `\"sm\"`, `\"md\"`, `\"lg\"`, `\"xl\"`. Defaults to `\"sm\"`.\n */\n @property({ reflect: true }) size: ButtonSize = 'sm';\n\n /** Shape of the button container. */\n @property({ type: String, reflect: true }) shape: ButtonShape = 'square';\n\n /** When true, renders the link as a placeholder skeleton while the page loads. */\n @property({ type: Boolean, reflect: true }) skeleton: boolean = false;\n\n /** Optional tooltip text displayed on hover. */\n @property() tooltip?: string;\n\n // ── Queries ───────────────────────────────────────────────────────────────\n\n @query('.button') private readonly linkElement!: HTMLElement | null;\n\n // ── Private fields ────────────────────────────────────────────────────────\n\n private __iconSlotCleanup: (() => void) | null = null;\n\n private __labelSlotCleanup: (() => void) | null = null;\n\n // ── Constructor ───────────────────────────────────────────────────────────\n\n constructor() {\n super();\n this.addEventListener('click', this.__dispatchClickWithThrottle);\n }\n\n // ── Lifecycle ─────────────────────────────────────────────────────────────\n\n override disconnectedCallback() {\n this.__iconSlotCleanup?.();\n this.__labelSlotCleanup?.();\n this.__iconSlotCleanup = null;\n this.__labelSlotCleanup = null;\n super.disconnectedCallback();\n }\n\n override firstUpdated(changedProperties: PropertyValues<this>) {\n super.firstUpdated(changedProperties);\n const iconSlot =\n this.renderRoot.querySelector<HTMLSlotElement>('slot[name=\"icon\"]');\n const labelSlot =\n this.renderRoot.querySelector<HTMLSlotElement>('slot.label');\n if (iconSlot) {\n this.__iconSlotCleanup = observerSlotChangesWithCallback(iconSlot, has =>\n this.toggleAttribute('has-icon', has),\n );\n }\n if (labelSlot) {\n this.__labelSlotCleanup = observerSlotChangesWithCallback(\n labelSlot,\n has => this.toggleAttribute('has-label', has),\n );\n }\n }\n\n // ── Public methods ────────────────────────────────────────────────────────\n\n override focus() {\n this.linkElement?.focus();\n }\n\n override blur() {\n this.linkElement?.blur();\n }\n\n // ── Private methods ───────────────────────────────────────────────────────\n\n __dispatchClick = (event: MouseEvent | KeyboardEvent) => {\n // A link has no native disabled state, so a disabled, soft-disabled or\n // skeleton link swallows the click and stops the navigation.\n if (this.disabled || this.softDisabled || this.skeleton) {\n event.stopImmediatePropagation();\n event.preventDefault();\n return;\n }\n\n if (!isActivationClick(event) || !this.linkElement) {\n return;\n }\n\n this.focus();\n dispatchActivationClick(this.linkElement);\n };\n\n // ── Render helpers ────────────────────────────────────────────────────────\n\n renderDisabledReason() {\n if (!this.softDisabled) return nothing;\n return html`<div\n id=${DISABLED_REASON_ID}\n role=\"tooltip\"\n aria-label=${this.disabledReason}\n class=\"screen-reader-only\"\n >\n ${this.disabledReason}\n </div>`;\n }\n\n renderTooltip() {\n if (!this.tooltip) return nothing;\n return html`<wc-tooltip class=\"tooltip\" for=\"link\"\n >${this.tooltip}</wc-tooltip\n >`;\n }\n\n // ── Render ────────────────────────────────────────────────────────────────\n\n override render() {\n const { ariaLabel, ariaHasPopup, ariaExpanded } = this as ARIAMixinStrict;\n const inert = this.disabled || this.softDisabled;\n\n return html`\n <wc-focus-ring class=\"focus-ring\" for=\"link\"></wc-focus-ring>\n <wc-elevation class=\"elevation\"></wc-elevation>\n ${when(\n this.variant === 'neo',\n () => html`<div class=\"neo-background\"></div>`,\n )}\n <div class=\"background\"></div>\n ${when(\n this.variant === 'outlined' || this.variant === 'neo',\n () => html`<div class=\"outline\"></div>`,\n )}\n <wc-ripple class=\"ripple\" for=\"link\"></wc-ripple>\n <wc-skeleton class=\"skeleton\"></wc-skeleton>\n\n <a\n class=\"button native-link\"\n id=\"link\"\n href=${ifDefined(this.href)}\n target=${this.target || nothing}\n rel=${this.rel || nothing}\n download=${this.download || nothing}\n tabindex=${this.disabled ? '-1' : nothing}\n aria-label=${ariaLabel || nothing}\n aria-haspopup=${ariaHasPopup || nothing}\n aria-expanded=${ariaExpanded || nothing}\n aria-describedby=${ifDefined(\n this.softDisabled ? DISABLED_REASON_ID : undefined,\n )}\n aria-disabled=${inert ? 'true' : nothing}\n >\n <slot class=\"icon-slot\" name=\"icon\"></slot>\n <slot class=\"label\"></slot>\n <div class=\"touch\"></div>\n ${this.renderDisabledReason()}\n </a>\n ${this.renderTooltip()}\n `;\n }\n}\n"],"names":["LitElement","nothing","html","when","ifDefined","styles","property","query"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA,MAAM,GAAG,CAACI,QAAM,CAAC;AASjC,UAAA,CAAA;AADC,IAAAC,GAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE;AACjD,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAMQ,UAAA,CAAA;AAA5B,IAAAA,GAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;AAA0B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAGV,UAAA,CAAA;IAA1CA,GAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;AAAgC,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,OAAA,EAAA,MAAA,CAAA;AAG7B,UAAA,CAAA;IAA3CA,GAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAA4B,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAG1D,UAAA,CAAA;AAAX,IAAAA,GAAQ;AAAoB,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAIM,UAAA,CAAA;IAAlCC,CAAK,CAAC,SAAS;AAAoD,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AAzCzD,UAAU,GAAA,UAAA,CAAA;IADtB;AACY,CAAA,EAAA,UAAU,CAoLtB;;;;"}
|
package/dist/listbox.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { i, _ as __decorate, I as IndividualComponent, b } from './IndividualComponent-BK7XZjE2.js';
|
|
2
2
|
import { n } from './property-B2TG3KEE.js';
|
|
3
|
-
import { B as BaseInput } from './BaseInput-
|
|
3
|
+
import { B as BaseInput } from './BaseInput-xCHvT4AN.js';
|
|
4
4
|
import { R as RovingFocusController } from './roving-focus-controller-fm95JkZJ.js';
|
|
5
5
|
import { g as getFormValue } from './form-associated-BHbg72PG.js';
|
|
6
|
-
import { p as peacockString } from './strings-
|
|
6
|
+
import { p as peacockString } from './strings-o6v6Hrmn.js';
|
|
7
7
|
import { ListboxOption } from './listbox-option.js';
|
|
8
8
|
import './state-BCeDVCI9.js';
|
|
9
9
|
import './element-internals-QME0yEz4.js';
|
|
10
|
-
import './suggestion-controller-
|
|
10
|
+
import './suggestion-controller-7YRQqkaI.js';
|
|
11
11
|
import './ai-controller-DR_Tg0sN.js';
|
|
12
12
|
import './locale-DEsJZCQG.js';
|
|
13
13
|
|