@limetech/lime-elements 38.1.3 → 38.1.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.
- package/CHANGELOG.md +18 -0
- package/dist/cjs/limel-chip_2.cjs.entry.js +4 -1
- package/dist/cjs/limel-chip_2.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-markdown.cjs.entry.js +1 -1
- package/dist/cjs/limel-markdown.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js.map +1 -1
- package/dist/collection/components/chip/chip.js +4 -1
- package/dist/collection/components/chip/chip.js.map +1 -1
- package/dist/collection/components/markdown/markdown.css +77 -0
- package/dist/collection/components/markdown/markdown.js +1 -0
- package/dist/collection/components/markdown/markdown.js.map +1 -1
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.css +82 -0
- package/dist/esm/limel-chip_2.entry.js +4 -1
- package/dist/esm/limel-chip_2.entry.js.map +1 -1
- package/dist/esm/limel-markdown.entry.js +1 -1
- package/dist/esm/limel-markdown.entry.js.map +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js.map +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-3451ab63.entry.js → p-261cc6f1.entry.js} +2 -2
- package/dist/lime-elements/p-261cc6f1.entry.js.map +1 -0
- package/dist/lime-elements/p-ddba6220.entry.js +2 -0
- package/dist/lime-elements/p-ddba6220.entry.js.map +1 -0
- package/dist/lime-elements/p-fdfd3e5a.entry.js +2 -0
- package/dist/lime-elements/{p-ca0fabc2.entry.js.map → p-fdfd3e5a.entry.js.map} +1 -1
- package/dist/types/components/chip/chip.d.ts +1 -0
- package/dist/types/components/markdown/markdown.d.ts +1 -0
- package/dist/types/components.d.ts +4 -0
- package/package.json +2 -2
- package/dist/lime-elements/p-3451ab63.entry.js.map +0 -1
- package/dist/lime-elements/p-5a543b0b.entry.js +0 -2
- package/dist/lime-elements/p-5a543b0b.entry.js.map +0 -1
- package/dist/lime-elements/p-ca0fabc2.entry.js +0 -2
|
@@ -102,6 +102,9 @@ export class Chip {
|
|
|
102
102
|
}
|
|
103
103
|
this.menuItemSelected.emit(menuItem);
|
|
104
104
|
};
|
|
105
|
+
this.handleActionMenuCancel = (event) => {
|
|
106
|
+
event.stopPropagation();
|
|
107
|
+
};
|
|
105
108
|
this.language = 'en';
|
|
106
109
|
this.text = undefined;
|
|
107
110
|
this.icon = undefined;
|
|
@@ -166,7 +169,7 @@ export class Chip {
|
|
|
166
169
|
}
|
|
167
170
|
const svgData = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" xml:space="preserve"><circle fill="currentColor" cx="16" cy="16" r="2"/><circle fill="currentColor" cx="16" cy="24" r="2"/><circle fill="currentColor" cx="16" cy="8" r="2"/></svg>';
|
|
168
171
|
const menuItems = this.getMenuItems();
|
|
169
|
-
return (h("limel-menu", { items: menuItems, onSelect: this.handleActionMenuSelect, openDirection: "bottom-end" }, h("button", { slot: "trigger", disabled: this.disabled, class: "trailing-button", "aria-label": this.actionMenuLabel, innerHTML: svgData })));
|
|
172
|
+
return (h("limel-menu", { items: menuItems, onSelect: this.handleActionMenuSelect, openDirection: "bottom-end", onCancel: this.handleActionMenuCancel }, h("button", { slot: "trigger", disabled: this.disabled, class: "trailing-button", "aria-label": this.actionMenuLabel, innerHTML: svgData })));
|
|
170
173
|
}
|
|
171
174
|
getMenuItems() {
|
|
172
175
|
let menuItems = [...this.menuItems];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.js","sourceRoot":"","sources":["../../../src/components/chip/chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,IAAI,GACP,MAAM,eAAe,CAAC;AAIvB,OAAO,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBJ","sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n} from '@stencil/core';\nimport { Icon } from '../../global/shared-types/icon.types';\nimport { Languages } from '../date-picker/date.types';\nimport { Link } from '../../global/shared-types/link.types';\nimport { getIconName } from '../icon/get-icon-props';\nimport {\n makeEnterClickable,\n removeEnterClickable,\n} from '../../util/make-enter-clickable';\nimport translate from '../../global/translations';\nimport { BACKSPACE, DELETE } from '../../util/keycodes';\nimport { ChipType, Chip as OldChipInterface } from '../chip-set/chip.types';\nimport { Image } from '../../global/shared-types/image.types';\nimport { isEmpty } from 'lodash-es';\n\nimport { ListSeparator } from '../list/list-item.types';\nimport { LimelMenuCustomEvent, MenuItem } from '../../components';\n\ninterface ChipInterface extends Omit<OldChipInterface, 'id' | 'badge'> {\n /**\n * Identifier for the chip. Must be unique.\n */\n identifier?: number | string;\n\n /**\n * The value of the badge.\n */\n badge?: string | number;\n}\n\n/**\n * Chips and buttons are both interactive elements in UI design,\n * but they serve different purposes and are used in different contexts.\n *\n * :::warning\n * Do not use the chip component carelessly, as an alternative for\n * [`limel-button`](#/component/limel-button/) in the UI design!\n *\n * **Buttons:**\n * Buttons are used to trigger actions. They are typically used to\n * submit forms, open dialogs, initiate a process, or perform any action\n * that changes the state of the application.\n * Buttons' labels usually contain action words, in other words, the labels is\n * a _verb in imperative mood_ such as \"Submit\" or \"Delete\".\n * Buttons are placed in areas where it's clear they will initiate\n * an action when clicked.\n *\n * **Chips:**\n * Chips however are elements which may look like buttons, but they are\n * representing choices, filters, or tags, in a small block\n * or clearly bundled into a group. Chips are rarely used alone in the\n * user interface.\n * They are often used in a so called \"chip-set\", or placed together in\n * a section of the UI, where the user can expect more than one chip to be present.\n *\n * For example, a chip may represent a filter in a filter bar, or a tag in a tag list,\n * or an item in a shopping list.\n * Clicking a chip can also trigger an action, for example toggling a filter ON or OFF,\n * or opening a page with all posts tagged with the tag represented by the chip,\n * or navigating to a page with more information about the item in the shopping list.\n * :::\n *\n * @exampleComponent limel-example-chip-button\n * @exampleComponent limel-example-chip-link\n * @exampleComponent limel-example-chip-icon-colors\n * @exampleComponent limel-example-chip-image\n * @exampleComponent limel-example-chip-badge\n * @exampleComponent limel-example-chip-filter\n * @exampleComponent limel-example-chip-removable\n * @exampleComponent limel-example-chip-menu\n * @exampleComponent limel-example-chip-loading\n * @exampleComponent limel-example-chip-progress\n * @exampleComponent limel-example-chip-aria-role\n */\n@Component({\n tag: 'limel-chip',\n shadow: { delegatesFocus: true },\n styleUrl: 'chip.scss',\n})\nexport class Chip implements ChipInterface {\n /**\n * Defines the language for translations.\n * Will translate the translatable strings on the components.\n */\n @Prop({ reflect: true })\n public language: Languages = 'en';\n\n /**\n * Label displayed on the chip\n */\n @Prop({ reflect: true })\n public text: string;\n\n /**\n * Icon of the chip.\n */\n @Prop()\n public icon?: string | Icon;\n\n /**\n * A picture to be displayed instead of the icon on the chip.\n */\n @Prop()\n public image?: Image;\n\n /**\n * If supplied, the chip will become a clickable link.\n */\n @Prop()\n public link?: Omit<Link, 'text'>;\n\n /**\n * The value of the badge, displayed on the chip.\n */\n @Prop({ reflect: true })\n public badge?: string | number;\n\n /**\n * Set to `true` to disable the chip.\n */\n @Prop({ reflect: true })\n public disabled = false;\n\n /**\n * Set to `true` to render the chip as a static UI element.\n * Useful when the parent component has a `readonly` state.\n */\n @Prop({ reflect: true })\n public readonly = false;\n\n /**\n * Set to `true` to visualize the chip in a \"selected\" state.\n * This is typically used when the chip is used in a chip-set\n * along with other chips.\n */\n @Prop({ reflect: true })\n public selected = false;\n\n /**\n * Set to `true` to visualize the chip in an \"invalid\" or \"error\" state.\n */\n @Prop({ reflect: true })\n public invalid = false;\n\n /**\n * Set to `true` to render a remove button on the chip.\n */\n @Prop({ reflect: true })\n public removable = false;\n\n /**\n * Set to `filter` to render the chip with a distinct style\n * suitable for visualizing filters.\n *\n * @beta\n */\n @Prop({ reflect: true })\n public type?: ChipType = 'default';\n\n /**\n * Set to `true` to put the component in the `loading` state,\n * and render an indeterminate progress indicator inside the chip.\n * This does _not_ disable the interactivity of the chip!\n */\n @Prop({ reflect: true })\n public loading? = false;\n\n /**\n * Reflects the current value of a progress bar on the chip,\n * visualizing the percentage of an ongoing process.\n * Must be a number between `0` and `100`.\n */\n @Prop({ reflect: true })\n public progress?: number;\n\n /**\n * Identifier for the chip. Must be unique.\n */\n @Prop({ reflect: true })\n public identifier?: number | string = crypto.randomUUID();\n\n /**\n * When provided, the chip will render an ellipsis menu with the supplied items.\n * Also, this will hide the \"remove button\" when `removable={true}`, as\n * the remove button will automatically become the last item in the menu.\n */\n @Prop()\n public menuItems?: Array<MenuItem | ListSeparator> = [];\n\n /**\n * Fired when clicking on the remove button of a `removable` chip.\n * The value of `identifier` is emitted as the event detail.\n */\n @Event()\n public remove: EventEmitter<number | string>;\n\n /**\n * Emitted when a menu item is selected from the actions menu.\n */\n @Event()\n public menuItemSelected: EventEmitter<MenuItem>;\n\n @Element()\n private host: HTMLLimelChipElement;\n\n public componentWillLoad() {\n makeEnterClickable(this.host);\n }\n\n public disconnectedCallback() {\n removeEnterClickable(this.host);\n }\n\n public render() {\n return (\n <Host onClick={this.filterClickWhenDisabled}>\n {this.link ? this.renderAsLink() : this.renderAsButton()}\n </Host>\n );\n }\n\n private renderAsButton = () => {\n return [\n <button\n id={'chip-' + this.identifier}\n class=\"chip\"\n role=\"button\"\n disabled={this.disabled || this.readonly}\n aria-busy={this.loading ? 'true' : 'false'}\n aria-live=\"polite\"\n onKeyDown={this.handleDeleteKeyDown}\n >\n {this.renderSpinner()}\n {this.renderPicture()}\n {this.renderLabel()}\n {this.renderBadge()}\n {this.renderProgressBar()}\n </button>,\n this.renderRemoveButton(),\n this.renderActionsMenu(),\n ];\n };\n\n private renderAsLink = () => {\n return [\n <a\n id={'chip-' + this.identifier}\n class=\"chip\"\n href={this.link.href}\n title={this.link.title}\n target={this.link.target}\n aria-disabled={this.disabled || this.readonly}\n tabindex={this.disabled || this.readonly ? -1 : 0}\n onKeyDown={this.handleDeleteKeyDown}\n >\n {this.renderSpinner()}\n {this.renderPicture()}\n {this.renderLabel()}\n {this.renderBadge()}\n {this.renderProgressBar()}\n </a>,\n this.renderRemoveButton(),\n this.renderActionsMenu(),\n ];\n };\n\n private renderLabel = () => {\n return <span class=\"text\">{this.text}</span>;\n };\n\n private renderPicture() {\n const icon = getIconName(this.icon);\n\n if (!icon && !this.image) {\n return;\n }\n\n if (!isEmpty(this.image)) {\n return (\n <img src={this.image.src} alt={this.image.alt} loading=\"lazy\" />\n );\n }\n\n return (\n <limel-icon\n badge={true}\n name={icon}\n style={{\n color: `${(this.icon as Icon)?.color}`,\n 'background-color': `${\n (this.icon as Icon)?.backgroundColor\n }`,\n }}\n />\n );\n }\n\n private renderBadge() {\n if (!this.badge) {\n return;\n }\n\n return <limel-badge label={this.badge} />;\n }\n\n private renderRemoveButton() {\n if (\n !this.removable ||\n this.readonly ||\n this.disabled ||\n !!this.menuItems?.length\n ) {\n return;\n }\n\n const svgData =\n '<svg viewBox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" d=\"m8 8 16 16M24 8 8 24\"/></svg>';\n\n return (\n <button\n class=\"trailing-button remove-button\"\n tabIndex={-1}\n aria-label={this.removeChipLabel}\n aria-controls={'chip-' + this.identifier}\n innerHTML={svgData}\n onClick={this.handleRemoveClick}\n />\n );\n }\n\n private renderActionsMenu() {\n if (!this.menuItems?.length) {\n return;\n }\n\n const svgData =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" xml:space=\"preserve\"><circle fill=\"currentColor\" cx=\"16\" cy=\"16\" r=\"2\"/><circle fill=\"currentColor\" cx=\"16\" cy=\"24\" r=\"2\"/><circle fill=\"currentColor\" cx=\"16\" cy=\"8\" r=\"2\"/></svg>';\n\n const menuItems = this.getMenuItems();\n\n return (\n <limel-menu\n items={menuItems}\n onSelect={this.handleActionMenuSelect}\n openDirection=\"bottom-end\"\n >\n <button\n slot=\"trigger\"\n disabled={this.disabled}\n class=\"trailing-button\"\n aria-label={this.actionMenuLabel}\n innerHTML={svgData}\n />\n </limel-menu>\n );\n }\n\n private getMenuItems() {\n let menuItems = [...this.menuItems];\n\n if (this.removable) {\n menuItems = [\n ...menuItems,\n { separator: true },\n {\n text: this.removeChipLabel(),\n icon: {\n name: 'delete_sign',\n color: 'rgb(var(--color-red-default))',\n },\n value: '_remove',\n },\n ];\n }\n\n return menuItems;\n }\n\n private filterClickWhenDisabled = (e) => {\n if (this.disabled || this.readonly) {\n e.preventDefault();\n }\n };\n\n private handleRemoveClick = (event: MouseEvent | KeyboardEvent) => {\n event.stopPropagation();\n this.remove.emit(this.identifier);\n };\n\n private handleDeleteKeyDown = (event: KeyboardEvent) => {\n if (!this.removable) {\n return;\n }\n\n const keys = [DELETE, BACKSPACE];\n\n if (keys.includes(event.key)) {\n this.handleRemoveClick(event);\n }\n };\n\n private removeChipLabel = (): string => {\n return translate.get('remove', this.language) + ' ' + this.text;\n };\n\n private actionMenuLabel = (): string => {\n return translate.get('file-viewer.more-actions', this.language);\n };\n\n private renderSpinner() {\n if (!this.loading) {\n return;\n }\n\n return <limel-linear-progress indeterminate={true} />;\n }\n\n private renderProgressBar() {\n if (!this.progress) {\n return;\n }\n\n const currentPercentage = this.progress + '%';\n\n return (\n <div\n role=\"progressbar\"\n aria-label=\"%\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-valuenow={this.progress}\n style={{\n '--limel-chip-progress-percentage': currentPercentage,\n }}\n />\n );\n }\n\n private handleActionMenuSelect = (\n event: LimelMenuCustomEvent<MenuItem>,\n ) => {\n const menuItem = event.detail;\n\n if (!menuItem) {\n return;\n }\n\n if (menuItem.value === '_remove') {\n this.remove.emit(this.identifier);\n\n return;\n }\n\n this.menuItemSelected.emit(menuItem);\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"chip.js","sourceRoot":"","sources":["../../../src/components/chip/chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,IAAI,GACP,MAAM,eAAe,CAAC;AAIvB,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACH,kBAAkB,EAClB,oBAAoB,GACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiBpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAMH,MAAM,OAAO,IAAI;;IA8IL,mBAAc,GAAG,GAAG,EAAE;MAC1B,OAAO;QACH,cACI,EAAE,EAAE,OAAO,GAAG,IAAI,CAAC,UAAU,EAC7B,KAAK,EAAC,MAAM,EACZ,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,eAC7B,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,eAChC,QAAQ,EAClB,SAAS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n} from '@stencil/core';\nimport { Icon } from '../../global/shared-types/icon.types';\nimport { Languages } from '../date-picker/date.types';\nimport { Link } from '../../global/shared-types/link.types';\nimport { getIconName } from '../icon/get-icon-props';\nimport {\n makeEnterClickable,\n removeEnterClickable,\n} from '../../util/make-enter-clickable';\nimport translate from '../../global/translations';\nimport { BACKSPACE, DELETE } from '../../util/keycodes';\nimport { ChipType, Chip as OldChipInterface } from '../chip-set/chip.types';\nimport { Image } from '../../global/shared-types/image.types';\nimport { isEmpty } from 'lodash-es';\n\nimport { ListSeparator } from '../list/list-item.types';\nimport { LimelMenuCustomEvent, MenuItem } from '../../components';\n\ninterface ChipInterface extends Omit<OldChipInterface, 'id' | 'badge'> {\n /**\n * Identifier for the chip. Must be unique.\n */\n identifier?: number | string;\n\n /**\n * The value of the badge.\n */\n badge?: string | number;\n}\n\n/**\n * Chips and buttons are both interactive elements in UI design,\n * but they serve different purposes and are used in different contexts.\n *\n * :::warning\n * Do not use the chip component carelessly, as an alternative for\n * [`limel-button`](#/component/limel-button/) in the UI design!\n *\n * **Buttons:**\n * Buttons are used to trigger actions. They are typically used to\n * submit forms, open dialogs, initiate a process, or perform any action\n * that changes the state of the application.\n * Buttons' labels usually contain action words, in other words, the labels is\n * a _verb in imperative mood_ such as \"Submit\" or \"Delete\".\n * Buttons are placed in areas where it's clear they will initiate\n * an action when clicked.\n *\n * **Chips:**\n * Chips however are elements which may look like buttons, but they are\n * representing choices, filters, or tags, in a small block\n * or clearly bundled into a group. Chips are rarely used alone in the\n * user interface.\n * They are often used in a so called \"chip-set\", or placed together in\n * a section of the UI, where the user can expect more than one chip to be present.\n *\n * For example, a chip may represent a filter in a filter bar, or a tag in a tag list,\n * or an item in a shopping list.\n * Clicking a chip can also trigger an action, for example toggling a filter ON or OFF,\n * or opening a page with all posts tagged with the tag represented by the chip,\n * or navigating to a page with more information about the item in the shopping list.\n * :::\n *\n * @exampleComponent limel-example-chip-button\n * @exampleComponent limel-example-chip-link\n * @exampleComponent limel-example-chip-icon-colors\n * @exampleComponent limel-example-chip-image\n * @exampleComponent limel-example-chip-badge\n * @exampleComponent limel-example-chip-filter\n * @exampleComponent limel-example-chip-removable\n * @exampleComponent limel-example-chip-menu\n * @exampleComponent limel-example-chip-loading\n * @exampleComponent limel-example-chip-progress\n * @exampleComponent limel-example-chip-aria-role\n */\n@Component({\n tag: 'limel-chip',\n shadow: { delegatesFocus: true },\n styleUrl: 'chip.scss',\n})\nexport class Chip implements ChipInterface {\n /**\n * Defines the language for translations.\n * Will translate the translatable strings on the components.\n */\n @Prop({ reflect: true })\n public language: Languages = 'en';\n\n /**\n * Label displayed on the chip\n */\n @Prop({ reflect: true })\n public text: string;\n\n /**\n * Icon of the chip.\n */\n @Prop()\n public icon?: string | Icon;\n\n /**\n * A picture to be displayed instead of the icon on the chip.\n */\n @Prop()\n public image?: Image;\n\n /**\n * If supplied, the chip will become a clickable link.\n */\n @Prop()\n public link?: Omit<Link, 'text'>;\n\n /**\n * The value of the badge, displayed on the chip.\n */\n @Prop({ reflect: true })\n public badge?: string | number;\n\n /**\n * Set to `true` to disable the chip.\n */\n @Prop({ reflect: true })\n public disabled = false;\n\n /**\n * Set to `true` to render the chip as a static UI element.\n * Useful when the parent component has a `readonly` state.\n */\n @Prop({ reflect: true })\n public readonly = false;\n\n /**\n * Set to `true` to visualize the chip in a \"selected\" state.\n * This is typically used when the chip is used in a chip-set\n * along with other chips.\n */\n @Prop({ reflect: true })\n public selected = false;\n\n /**\n * Set to `true` to visualize the chip in an \"invalid\" or \"error\" state.\n */\n @Prop({ reflect: true })\n public invalid = false;\n\n /**\n * Set to `true` to render a remove button on the chip.\n */\n @Prop({ reflect: true })\n public removable = false;\n\n /**\n * Set to `filter` to render the chip with a distinct style\n * suitable for visualizing filters.\n *\n * @beta\n */\n @Prop({ reflect: true })\n public type?: ChipType = 'default';\n\n /**\n * Set to `true` to put the component in the `loading` state,\n * and render an indeterminate progress indicator inside the chip.\n * This does _not_ disable the interactivity of the chip!\n */\n @Prop({ reflect: true })\n public loading? = false;\n\n /**\n * Reflects the current value of a progress bar on the chip,\n * visualizing the percentage of an ongoing process.\n * Must be a number between `0` and `100`.\n */\n @Prop({ reflect: true })\n public progress?: number;\n\n /**\n * Identifier for the chip. Must be unique.\n */\n @Prop({ reflect: true })\n public identifier?: number | string = crypto.randomUUID();\n\n /**\n * When provided, the chip will render an ellipsis menu with the supplied items.\n * Also, this will hide the \"remove button\" when `removable={true}`, as\n * the remove button will automatically become the last item in the menu.\n */\n @Prop()\n public menuItems?: Array<MenuItem | ListSeparator> = [];\n\n /**\n * Fired when clicking on the remove button of a `removable` chip.\n * The value of `identifier` is emitted as the event detail.\n */\n @Event()\n public remove: EventEmitter<number | string>;\n\n /**\n * Emitted when a menu item is selected from the actions menu.\n */\n @Event()\n public menuItemSelected: EventEmitter<MenuItem>;\n\n @Element()\n private host: HTMLLimelChipElement;\n\n public componentWillLoad() {\n makeEnterClickable(this.host);\n }\n\n public disconnectedCallback() {\n removeEnterClickable(this.host);\n }\n\n public render() {\n return (\n <Host onClick={this.filterClickWhenDisabled}>\n {this.link ? this.renderAsLink() : this.renderAsButton()}\n </Host>\n );\n }\n\n private renderAsButton = () => {\n return [\n <button\n id={'chip-' + this.identifier}\n class=\"chip\"\n role=\"button\"\n disabled={this.disabled || this.readonly}\n aria-busy={this.loading ? 'true' : 'false'}\n aria-live=\"polite\"\n onKeyDown={this.handleDeleteKeyDown}\n >\n {this.renderSpinner()}\n {this.renderPicture()}\n {this.renderLabel()}\n {this.renderBadge()}\n {this.renderProgressBar()}\n </button>,\n this.renderRemoveButton(),\n this.renderActionsMenu(),\n ];\n };\n\n private renderAsLink = () => {\n return [\n <a\n id={'chip-' + this.identifier}\n class=\"chip\"\n href={this.link.href}\n title={this.link.title}\n target={this.link.target}\n aria-disabled={this.disabled || this.readonly}\n tabindex={this.disabled || this.readonly ? -1 : 0}\n onKeyDown={this.handleDeleteKeyDown}\n >\n {this.renderSpinner()}\n {this.renderPicture()}\n {this.renderLabel()}\n {this.renderBadge()}\n {this.renderProgressBar()}\n </a>,\n this.renderRemoveButton(),\n this.renderActionsMenu(),\n ];\n };\n\n private renderLabel = () => {\n return <span class=\"text\">{this.text}</span>;\n };\n\n private renderPicture() {\n const icon = getIconName(this.icon);\n\n if (!icon && !this.image) {\n return;\n }\n\n if (!isEmpty(this.image)) {\n return (\n <img src={this.image.src} alt={this.image.alt} loading=\"lazy\" />\n );\n }\n\n return (\n <limel-icon\n badge={true}\n name={icon}\n style={{\n color: `${(this.icon as Icon)?.color}`,\n 'background-color': `${\n (this.icon as Icon)?.backgroundColor\n }`,\n }}\n />\n );\n }\n\n private renderBadge() {\n if (!this.badge) {\n return;\n }\n\n return <limel-badge label={this.badge} />;\n }\n\n private renderRemoveButton() {\n if (\n !this.removable ||\n this.readonly ||\n this.disabled ||\n !!this.menuItems?.length\n ) {\n return;\n }\n\n const svgData =\n '<svg viewBox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\"><path fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" d=\"m8 8 16 16M24 8 8 24\"/></svg>';\n\n return (\n <button\n class=\"trailing-button remove-button\"\n tabIndex={-1}\n aria-label={this.removeChipLabel}\n aria-controls={'chip-' + this.identifier}\n innerHTML={svgData}\n onClick={this.handleRemoveClick}\n />\n );\n }\n\n private renderActionsMenu() {\n if (!this.menuItems?.length) {\n return;\n }\n\n const svgData =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\" xml:space=\"preserve\"><circle fill=\"currentColor\" cx=\"16\" cy=\"16\" r=\"2\"/><circle fill=\"currentColor\" cx=\"16\" cy=\"24\" r=\"2\"/><circle fill=\"currentColor\" cx=\"16\" cy=\"8\" r=\"2\"/></svg>';\n\n const menuItems = this.getMenuItems();\n\n return (\n <limel-menu\n items={menuItems}\n onSelect={this.handleActionMenuSelect}\n openDirection=\"bottom-end\"\n onCancel={this.handleActionMenuCancel}\n >\n <button\n slot=\"trigger\"\n disabled={this.disabled}\n class=\"trailing-button\"\n aria-label={this.actionMenuLabel}\n innerHTML={svgData}\n />\n </limel-menu>\n );\n }\n\n private getMenuItems() {\n let menuItems = [...this.menuItems];\n\n if (this.removable) {\n menuItems = [\n ...menuItems,\n { separator: true },\n {\n text: this.removeChipLabel(),\n icon: {\n name: 'delete_sign',\n color: 'rgb(var(--color-red-default))',\n },\n value: '_remove',\n },\n ];\n }\n\n return menuItems;\n }\n\n private filterClickWhenDisabled = (e) => {\n if (this.disabled || this.readonly) {\n e.preventDefault();\n }\n };\n\n private handleRemoveClick = (event: MouseEvent | KeyboardEvent) => {\n event.stopPropagation();\n this.remove.emit(this.identifier);\n };\n\n private handleDeleteKeyDown = (event: KeyboardEvent) => {\n if (!this.removable) {\n return;\n }\n\n const keys = [DELETE, BACKSPACE];\n\n if (keys.includes(event.key)) {\n this.handleRemoveClick(event);\n }\n };\n\n private removeChipLabel = (): string => {\n return translate.get('remove', this.language) + ' ' + this.text;\n };\n\n private actionMenuLabel = (): string => {\n return translate.get('file-viewer.more-actions', this.language);\n };\n\n private renderSpinner() {\n if (!this.loading) {\n return;\n }\n\n return <limel-linear-progress indeterminate={true} />;\n }\n\n private renderProgressBar() {\n if (!this.progress) {\n return;\n }\n\n const currentPercentage = this.progress + '%';\n\n return (\n <div\n role=\"progressbar\"\n aria-label=\"%\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-valuenow={this.progress}\n style={{\n '--limel-chip-progress-percentage': currentPercentage,\n }}\n />\n );\n }\n\n private handleActionMenuSelect = (\n event: LimelMenuCustomEvent<MenuItem>,\n ) => {\n const menuItem = event.detail;\n\n if (!menuItem) {\n return;\n }\n\n if (menuItem.value === '_remove') {\n this.remove.emit(this.identifier);\n\n return;\n }\n\n this.menuItemSelected.emit(menuItem);\n };\n\n private handleActionMenuCancel = (event: LimelMenuCustomEvent<void>) => {\n event.stopPropagation();\n };\n}\n"]}
|
|
@@ -345,6 +345,83 @@ img {
|
|
|
345
345
|
border-radius: 0.25rem;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
+
/**
|
|
349
|
+
* Note! This file is exported to `dist/scss/` in the published
|
|
350
|
+
* node module, for consumer projects to import.
|
|
351
|
+
* That means this file cannot import from any file that isn't
|
|
352
|
+
* also exported, keeping the same relative path.
|
|
353
|
+
*
|
|
354
|
+
* Or, just don't import anything, that works too.
|
|
355
|
+
*/
|
|
356
|
+
/**
|
|
357
|
+
* This can be used on a trigger element that opens a dropdown menu or a popover.
|
|
358
|
+
*/
|
|
359
|
+
/**
|
|
360
|
+
* This mixin will mask out the content that is close to
|
|
361
|
+
* the edges of a scrollable area.
|
|
362
|
+
* - If the scrollable content has `overflow-y`, use `vertically`
|
|
363
|
+
* as an argument for `$direction`.
|
|
364
|
+
- If the scrollable content has `overflow-x`, use `horizontally`
|
|
365
|
+
* as an argument for `$direction`.
|
|
366
|
+
*
|
|
367
|
+
* For the visual effect to work smoothly, we need to make sure that
|
|
368
|
+
* the size of the fade-out edge effect is the same as the
|
|
369
|
+
* internal paddings of the scrollable area. Otherwise, content of a
|
|
370
|
+
* scrollable area that does not have a padding will fade out before
|
|
371
|
+
* any scrolling has been done.
|
|
372
|
+
* This is why this mixin already adds paddings, which automatically
|
|
373
|
+
* default to the size of the fade-out effect.
|
|
374
|
+
* This size defaults to `1rem`, but to override the size use
|
|
375
|
+
* `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
|
|
376
|
+
* when `vertically` argument is set, and use
|
|
377
|
+
* `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
|
|
378
|
+
* when `horizontally` argument is set.
|
|
379
|
+
* Of course you can also programmatically increase and decrease the
|
|
380
|
+
* size of these variables for each edge, based on the amount of
|
|
381
|
+
* scrolling that has been done by the user. In this case, make sure
|
|
382
|
+
* to add a custom padding where the mixin is used, to override
|
|
383
|
+
* the paddings that are automatically added by the mixin in the
|
|
384
|
+
* compiled CSS code.
|
|
385
|
+
*/
|
|
386
|
+
/**
|
|
387
|
+
* This mixin will add an animated underline to the bottom of an `a` elements.
|
|
388
|
+
* Note that you may need to add `all: unset;` –depending on your use case–
|
|
389
|
+
* before using this mixin.
|
|
390
|
+
*/
|
|
391
|
+
/**
|
|
392
|
+
* This mixin creates a cross-browser font stack.
|
|
393
|
+
* - `sans-serif` can be used for the UI of the components.
|
|
394
|
+
* - `monospace` can be used for code.
|
|
395
|
+
*
|
|
396
|
+
* ⚠️ If we change the font stacks, we need to update
|
|
397
|
+
* 1. the consumer documentation in `README.md`, and
|
|
398
|
+
* 2. the CSS variables of `--kompendium-example-font-family`
|
|
399
|
+
* in the `<style>` tag of `index.html`.
|
|
400
|
+
*/
|
|
401
|
+
/**
|
|
402
|
+
* This mixin is a hack, using old CSS syntax
|
|
403
|
+
* to enable you to truncate a piece of text,
|
|
404
|
+
* after a certain number of lines.
|
|
405
|
+
*/
|
|
406
|
+
kbd {
|
|
407
|
+
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
|
|
408
|
+
font-weight: 600;
|
|
409
|
+
color: rgb(var(--contrast-1100));
|
|
410
|
+
background-color: rgb(var(--contrast-200));
|
|
411
|
+
white-space: pre;
|
|
412
|
+
word-spacing: normal;
|
|
413
|
+
word-break: normal;
|
|
414
|
+
word-wrap: normal;
|
|
415
|
+
line-height: normal;
|
|
416
|
+
padding: 0.125rem 0.5rem;
|
|
417
|
+
margin: 0 0.25rem;
|
|
418
|
+
box-shadow: var(--button-shadow-normal), 0 0.03125rem 0.21875rem 0 rgba(var(--contrast-100), 0.5) inset;
|
|
419
|
+
border-radius: 0.125rem;
|
|
420
|
+
border-style: solid;
|
|
421
|
+
border-color: rgba(var(--contrast-600), 0.8);
|
|
422
|
+
border-width: 0 1px 0.125rem 1px;
|
|
423
|
+
}
|
|
424
|
+
|
|
348
425
|
:host(limel-markdown.adjust-for-table-cell) img {
|
|
349
426
|
max-height: 1.25rem;
|
|
350
427
|
vertical-align: middle;
|
|
@@ -14,6 +14,7 @@ import { globalConfig } from '../../global/config';
|
|
|
14
14
|
* @exampleComponent limel-example-markdown-footnotes
|
|
15
15
|
* @exampleComponent limel-example-markdown-tables
|
|
16
16
|
* @exampleComponent limel-example-markdown-html
|
|
17
|
+
* @exampleComponent limel-example-markdown-keys
|
|
17
18
|
* @exampleComponent limel-example-markdown-blockquotes
|
|
18
19
|
* @exampleComponent limel-example-markdown-horizontal-rule
|
|
19
20
|
* @exampleComponent limel-example-markdown-composite
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.js","sourceRoot":"","sources":["../../../src/components/markdown/markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD
|
|
1
|
+
{"version":3,"file":"markdown.js","sourceRoot":"","sources":["../../../src/components/markdown/markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD;;;;;;;;;;;;;;;;;;GAkBG;AAMH,MAAM,OAAO,QAAQ;;;qBAmBb,YAAY,CAAC,iBAAiB;;EAG3B,KAAK,CAAC,WAAW;;IACpB,IAAI;MACA,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE;QAC1C,mBAAmB,EAAE,IAAI;QACzB,SAAS,EAAE,MAAA,IAAI,CAAC,SAAS,mCAAI,EAAE;OAClC,CAAC,CAAC;MACH,IAAI,CAAC,WAAW,CAAC,SAAS,GAAG,IAAI,CAAC;KACrC;IAAC,OAAO,KAAK,EAAE;MACZ,sCAAsC;MACtC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KACxB;EACL,CAAC;EAEM,KAAK,CAAC,gBAAgB;IACzB,IAAI,CAAC,WAAW,EAAE,CAAC;EACvB,CAAC;EAIM,MAAM;IACT,OAAO;MACH,WACI,EAAE,EAAC,UAAU,EACb,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,EAAoB,CAAC,GACxD;KACL,CAAC;EACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Prop, Watch } from '@stencil/core';\nimport { markdownToHTML } from './markdown-parser';\nimport { globalConfig } from '../../global/config';\nimport { CustomElementDefinition } from '../../global/shared-types/custom-element.types';\n\n/**\n * The Markdown component receives markdown syntax\n * and renders it as HTML.\n *\n * @exampleComponent limel-example-markdown-headings\n * @exampleComponent limel-example-markdown-emphasis\n * @exampleComponent limel-example-markdown-lists\n * @exampleComponent limel-example-markdown-links\n * @exampleComponent limel-example-markdown-images\n * @exampleComponent limel-example-markdown-code\n * @exampleComponent limel-example-markdown-footnotes\n * @exampleComponent limel-example-markdown-tables\n * @exampleComponent limel-example-markdown-html\n * @exampleComponent limel-example-markdown-keys\n * @exampleComponent limel-example-markdown-blockquotes\n * @exampleComponent limel-example-markdown-horizontal-rule\n * @exampleComponent limel-example-markdown-composite\n * @exampleComponent limel-example-markdown-custom-component\n */\n@Component({\n tag: 'limel-markdown',\n styleUrl: 'markdown.scss',\n shadow: true,\n})\nexport class Markdown {\n /**\n * The input text. Treated as GitHub Flavored Markdown, with the addition\n * that any included HTML will be parsed and rendered as HTML, rather than\n * as text.\n */\n @Prop()\n public value: string;\n\n /**\n * Whitelisted html elements.\n *\n * Any custom element added here will not be sanitized and thus rendered.\n * Can also be set via `limel-config`. Setting this property will override\n * the global config.\n * @alpha\n */\n @Prop()\n public whitelist?: CustomElementDefinition[] =\n globalConfig.markdownWhitelist;\n\n @Watch('value')\n public async textChanged() {\n try {\n const html = await markdownToHTML(this.value, {\n forceHardLineBreaks: true,\n whitelist: this.whitelist ?? [],\n });\n this.rootElement.innerHTML = html;\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error);\n }\n }\n\n public async componentDidLoad() {\n this.textChanged();\n }\n\n private rootElement: HTMLDivElement;\n\n public render() {\n return [\n <div\n id=\"markdown\"\n ref={(el) => (this.rootElement = el as HTMLDivElement)}\n />,\n ];\n }\n}\n"]}
|
|
@@ -528,4 +528,86 @@ pre > code {
|
|
|
528
528
|
}
|
|
529
529
|
:host(limel-markdown:not(.no-table-styles)) tbody tr:hover td {
|
|
530
530
|
background-color: rgb(var(--contrast-300));
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Note! This file is exported to `dist/scss/` in the published
|
|
535
|
+
* node module, for consumer projects to import.
|
|
536
|
+
* That means this file cannot import from any file that isn't
|
|
537
|
+
* also exported, keeping the same relative path.
|
|
538
|
+
*
|
|
539
|
+
* Or, just don't import anything, that works too.
|
|
540
|
+
*/
|
|
541
|
+
/**
|
|
542
|
+
* This can be used on a trigger element that opens a dropdown menu or a popover.
|
|
543
|
+
*/
|
|
544
|
+
/**
|
|
545
|
+
* This mixin will mask out the content that is close to
|
|
546
|
+
* the edges of a scrollable area.
|
|
547
|
+
* - If the scrollable content has `overflow-y`, use `vertically`
|
|
548
|
+
* as an argument for `$direction`.
|
|
549
|
+
- If the scrollable content has `overflow-x`, use `horizontally`
|
|
550
|
+
* as an argument for `$direction`.
|
|
551
|
+
*
|
|
552
|
+
* For the visual effect to work smoothly, we need to make sure that
|
|
553
|
+
* the size of the fade-out edge effect is the same as the
|
|
554
|
+
* internal paddings of the scrollable area. Otherwise, content of a
|
|
555
|
+
* scrollable area that does not have a padding will fade out before
|
|
556
|
+
* any scrolling has been done.
|
|
557
|
+
* This is why this mixin already adds paddings, which automatically
|
|
558
|
+
* default to the size of the fade-out effect.
|
|
559
|
+
* This size defaults to `1rem`, but to override the size use
|
|
560
|
+
* `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
|
|
561
|
+
* when `vertically` argument is set, and use
|
|
562
|
+
* `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
|
|
563
|
+
* when `horizontally` argument is set.
|
|
564
|
+
* Of course you can also programmatically increase and decrease the
|
|
565
|
+
* size of these variables for each edge, based on the amount of
|
|
566
|
+
* scrolling that has been done by the user. In this case, make sure
|
|
567
|
+
* to add a custom padding where the mixin is used, to override
|
|
568
|
+
* the paddings that are automatically added by the mixin in the
|
|
569
|
+
* compiled CSS code.
|
|
570
|
+
*/
|
|
571
|
+
/**
|
|
572
|
+
* This mixin will add an animated underline to the bottom of an `a` elements.
|
|
573
|
+
* Note that you may need to add `all: unset;` –depending on your use case–
|
|
574
|
+
* before using this mixin.
|
|
575
|
+
*/
|
|
576
|
+
/**
|
|
577
|
+
* This mixin creates a cross-browser font stack.
|
|
578
|
+
* - `sans-serif` can be used for the UI of the components.
|
|
579
|
+
* - `monospace` can be used for code.
|
|
580
|
+
*
|
|
581
|
+
* ⚠️ If we change the font stacks, we need to update
|
|
582
|
+
* 1. the consumer documentation in `README.md`, and
|
|
583
|
+
* 2. the CSS variables of `--kompendium-example-font-family`
|
|
584
|
+
* in the `<style>` tag of `index.html`.
|
|
585
|
+
*/
|
|
586
|
+
/**
|
|
587
|
+
* This mixin is a hack, using old CSS syntax
|
|
588
|
+
* to enable you to truncate a piece of text,
|
|
589
|
+
* after a certain number of lines.
|
|
590
|
+
*/
|
|
591
|
+
kbd {
|
|
592
|
+
font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
|
|
593
|
+
font-weight: 600;
|
|
594
|
+
color: rgb(var(--contrast-1100));
|
|
595
|
+
background-color: rgb(var(--contrast-200));
|
|
596
|
+
white-space: pre;
|
|
597
|
+
word-spacing: normal;
|
|
598
|
+
word-break: normal;
|
|
599
|
+
word-wrap: normal;
|
|
600
|
+
line-height: normal;
|
|
601
|
+
padding: 0.125rem 0.5rem;
|
|
602
|
+
margin: 0 0.25rem;
|
|
603
|
+
box-shadow: var(--button-shadow-normal), 0 0.03125rem 0.21875rem 0 rgba(var(--contrast-100), 0.5) inset;
|
|
604
|
+
border-radius: 0.125rem;
|
|
605
|
+
border-style: solid;
|
|
606
|
+
border-color: rgba(var(--contrast-600), 0.8);
|
|
607
|
+
border-width: 0 1px 0.125rem 1px;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
img {
|
|
611
|
+
max-width: 100%;
|
|
612
|
+
border-radius: 0.25rem;
|
|
531
613
|
}
|
|
@@ -79,6 +79,9 @@ const Chip = class {
|
|
|
79
79
|
}
|
|
80
80
|
this.menuItemSelected.emit(menuItem);
|
|
81
81
|
};
|
|
82
|
+
this.handleActionMenuCancel = (event) => {
|
|
83
|
+
event.stopPropagation();
|
|
84
|
+
};
|
|
82
85
|
this.language = 'en';
|
|
83
86
|
this.text = undefined;
|
|
84
87
|
this.icon = undefined;
|
|
@@ -143,7 +146,7 @@ const Chip = class {
|
|
|
143
146
|
}
|
|
144
147
|
const svgData = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" xml:space="preserve"><circle fill="currentColor" cx="16" cy="16" r="2"/><circle fill="currentColor" cx="16" cy="24" r="2"/><circle fill="currentColor" cx="16" cy="8" r="2"/></svg>';
|
|
145
148
|
const menuItems = this.getMenuItems();
|
|
146
|
-
return (h("limel-menu", { items: menuItems, onSelect: this.handleActionMenuSelect, openDirection: "bottom-end" }, h("button", { slot: "trigger", disabled: this.disabled, class: "trailing-button", "aria-label": this.actionMenuLabel, innerHTML: svgData })));
|
|
149
|
+
return (h("limel-menu", { items: menuItems, onSelect: this.handleActionMenuSelect, openDirection: "bottom-end", onCancel: this.handleActionMenuCancel }, h("button", { slot: "trigger", disabled: this.disabled, class: "trailing-button", "aria-label": this.actionMenuLabel, innerHTML: svgData })));
|
|
147
150
|
}
|
|
148
151
|
getMenuItems() {
|
|
149
152
|
let menuItems = [...this.menuItems];
|