@nvidia-elements/core 2.19.0 → 2.19.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/CHANGELOG.md +12 -0
- package/dist/_virtual/_rolldown/runtime.js +17 -0
- package/dist/accordion/accordion2.js +60 -57
- package/dist/accordion/accordion2.js.map +1 -1
- package/dist/alert/alert-group2.js +1 -1
- package/dist/alert/alert2.js +37 -31
- package/dist/alert/alert2.js.map +1 -1
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar2.js +1 -1
- package/dist/badge/badge.d.ts +0 -6
- package/dist/badge/badge2.js +31 -36
- package/dist/badge/badge2.js.map +1 -1
- package/dist/breadcrumb/breadcrumb2.js +1 -1
- package/dist/bundles/index.d.ts +25 -27
- package/dist/bundles/index.js +9 -9
- package/dist/button/button2.js +1 -1
- package/dist/button-group/button-group2.js +1 -1
- package/dist/card/card2.js +4 -4
- package/dist/chat-message/chat-message2.js +1 -1
- package/dist/checkbox/checkbox-group2.js +1 -1
- package/dist/checkbox/checkbox2.js +1 -1
- package/dist/color/color.d.ts +2 -0
- package/dist/color/color2.js +7 -4
- package/dist/color/color2.js.map +1 -1
- package/dist/combobox/combobox.d.ts +2 -0
- package/dist/combobox/combobox2.js +14 -6
- package/dist/combobox/combobox2.js.map +1 -1
- package/dist/copy-button/copy-button2.js +26 -23
- package/dist/copy-button/copy-button2.js.map +1 -1
- package/dist/custom-elements-jsx.d.ts +0 -4
- package/dist/custom-elements-vue.d.ts +0 -4
- package/dist/custom-elements.json +3 -173
- package/dist/data.html.json +0 -10
- package/dist/data.snippets.json +27 -27
- package/dist/date/date.d.ts +2 -0
- package/dist/date/date2.js +7 -4
- package/dist/date/date2.js.map +1 -1
- package/dist/datetime/datetime.d.ts +2 -0
- package/dist/datetime/datetime2.js +7 -4
- package/dist/datetime/datetime2.js.map +1 -1
- package/dist/dialog/dialog-footer2.js +1 -1
- package/dist/dialog/dialog-header2.js +1 -1
- package/dist/dialog/dialog2.js +27 -27
- package/dist/dialog/dialog2.js.map +1 -1
- package/dist/divider/divider2.js +1 -1
- package/dist/dot/dot2.js +1 -1
- package/dist/drag-handle/drag-handle2.js +1 -1
- package/dist/drawer/drawer-content2.js +1 -1
- package/dist/drawer/drawer-footer2.js +1 -1
- package/dist/drawer/drawer-header2.js +1 -1
- package/dist/drawer/drawer2.js +27 -27
- package/dist/drawer/drawer2.js.map +1 -1
- package/dist/dropdown/dropdown-footer2.js +1 -1
- package/dist/dropdown/dropdown-header2.js +1 -1
- package/dist/dropdown/dropdown2.js +23 -23
- package/dist/dropdown/dropdown2.js.map +1 -1
- package/dist/dropdown-group/dropdown-group.js +1 -1
- package/dist/dropzone/dropzone2.js +28 -22
- package/dist/dropzone/dropzone2.js.map +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/format-bytes/format-bytes2.js +1 -1
- package/dist/format-datetime/format-datetime2.js +1 -1
- package/dist/format-number/format-number2.js +1 -1
- package/dist/format-relative-time/format-relative-time2.js +1 -1
- package/dist/format-truncate/format-truncate2.js +1 -1
- package/dist/forms/control/control.d.ts +3 -0
- package/dist/forms/control/control2.js +34 -31
- package/dist/forms/control/control2.js.map +1 -1
- package/dist/forms/control-group/control-group2.js +1 -1
- package/dist/forms/control-message/control-message2.js +1 -1
- package/dist/gauge/gauge2.js +26 -21
- package/dist/gauge/gauge2.js.map +1 -1
- package/dist/grid/cell/cell2.js +1 -1
- package/dist/grid/column/column2.js +1 -1
- package/dist/grid/footer/footer2.js +1 -1
- package/dist/grid/grid2.js +1 -1
- package/dist/grid/header/header2.js +1 -1
- package/dist/grid/placeholder/placeholder2.js +1 -1
- package/dist/grid/row/row2.js +1 -1
- package/dist/icon/icon2.js +2 -2
- package/dist/icon-button/icon-button2.js +1 -1
- package/dist/iframe/iframe2.js +1 -1
- package/dist/index.js +5 -6
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +1 -1
- package/dist/internal/index.d.ts +1 -2
- package/dist/internal/index.js +150 -33
- package/dist/internal/index.js.map +1 -0
- package/dist/internal/types/index.d.ts +1 -1
- package/dist/internal/types/index.js.map +1 -1
- package/dist/logo/logo2.js +1 -1
- package/dist/menu/menu-group2.js +1 -1
- package/dist/menu/menu-item2.js +1 -1
- package/dist/menu/menu2.js +1 -1
- package/dist/month/month.d.ts +2 -0
- package/dist/month/month2.js +7 -4
- package/dist/month/month2.js.map +1 -1
- package/dist/notification/notification-group2.js +1 -1
- package/dist/notification/notification2.js +38 -32
- package/dist/notification/notification2.js.map +1 -1
- package/dist/page/page-panel/page-panel-content2.js +1 -1
- package/dist/page/page-panel/page-panel-footer2.js +1 -1
- package/dist/page/page-panel/page-panel-header2.js +1 -1
- package/dist/page/page-panel/page-panel.d.ts +0 -7
- package/dist/page/page-panel/page-panel2.js +18 -20
- package/dist/page/page-panel/page-panel2.js.map +1 -1
- package/dist/page/page2.js +1 -1
- package/dist/page-header/page-header2.js +1 -1
- package/dist/page-loader/page-loader2.js +1 -1
- package/dist/pagination/pagination2.js +45 -38
- package/dist/pagination/pagination2.js.map +1 -1
- package/dist/panel/panel2.js +43 -38
- package/dist/panel/panel2.js.map +1 -1
- package/dist/password/password.d.ts +2 -0
- package/dist/password/password2.js +10 -4
- package/dist/password/password2.js.map +1 -1
- package/dist/preferences-input/preferences-input2.js +32 -27
- package/dist/preferences-input/preferences-input2.js.map +1 -1
- package/dist/progress-bar/progress-bar2.js +1 -1
- package/dist/progress-dot/progress-dot2.js +17 -17
- package/dist/progress-dot/progress-dot2.js.map +1 -1
- package/dist/progress-ring/progress-ring2.js +27 -22
- package/dist/progress-ring/progress-ring2.js.map +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +30 -30
- package/dist/progressive-filter-chip/progressive-filter-chip2.js.map +1 -1
- package/dist/pulse/pulse2.js +1 -1
- package/dist/radio/radio-group2.js +1 -1
- package/dist/radio/radio2.js +1 -1
- package/dist/range/range2.js +1 -1
- package/dist/resize-handle/resize-handle2.js +17 -17
- package/dist/resize-handle/resize-handle2.js.map +1 -1
- package/dist/search/search2.js +1 -1
- package/dist/select/select2.js +44 -41
- package/dist/select/select2.js.map +1 -1
- package/dist/skeleton/skeleton2.js +1 -1
- package/dist/sort-button/sort-button2.js +20 -20
- package/dist/sort-button/sort-button2.js.map +1 -1
- package/dist/sparkline/sparkline2.js +1 -1
- package/dist/star-rating/star-rating2.js +1 -1
- package/dist/steps/steps2.js +2 -2
- package/dist/switch/switch-group2.js +1 -1
- package/dist/switch/switch2.js +1 -1
- package/dist/tabs/tabs-group2.js +1 -1
- package/dist/tabs/tabs-item-group2.js +1 -1
- package/dist/tabs/tabs2.js +2 -2
- package/dist/tag/tag2.js +19 -19
- package/dist/tag/tag2.js.map +1 -1
- package/dist/textarea/textarea2.js +1 -1
- package/dist/time/time.d.ts +2 -0
- package/dist/time/time2.js +7 -4
- package/dist/time/time2.js.map +1 -1
- package/dist/toast/toast2.js +35 -29
- package/dist/toast/toast2.js.map +1 -1
- package/dist/toggletip/toggletip-footer2.js +1 -1
- package/dist/toggletip/toggletip-header2.js +1 -1
- package/dist/toggletip/toggletip2.js +25 -25
- package/dist/toggletip/toggletip2.js.map +1 -1
- package/dist/toolbar/toolbar2.js +1 -1
- package/dist/tooltip/tooltip2.js +1 -1
- package/dist/tree/tree-node2.js +45 -45
- package/dist/tree/tree-node2.js.map +1 -1
- package/dist/tree/tree2.js +1 -1
- package/dist/week/week.d.ts +2 -0
- package/dist/week/week2.js +7 -4
- package/dist/week/week2.js.map +1 -1
- package/package.json +2 -2
- package/dist/internal/controllers/i18n.controller.d.ts +0 -19
- package/dist/internal/controllers/i18n.controller.examples.js +0 -6
- package/dist/internal/controllers/i18n.controller.examples.js.map +0 -1
- package/dist/internal/controllers/i18n.controller.examples.json +0 -16
- package/dist/internal/controllers/i18n.controller.js +0 -38
- package/dist/internal/controllers/i18n.controller.js.map +0 -1
- package/dist/internal/services/i18n.service.d.ts +0 -64
- package/dist/internal/services/i18n.service.js +0 -73
- package/dist/internal/services/i18n.service.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification2.js","names":[],"sources":["../../src/notification/notification.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { PropertyValues } from 'lit';\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport type { PopoverAlign, PopoverType, SupportStatus, PopoverPosition } from '@nvidia-elements/core/internal';\nimport {\n attachInternals,\n popoverStyles,\n statusIcons,\n useStyles,\n I18nController,\n TypeNativePopoverController,\n scopedRegistry\n} from '@nvidia-elements/core/internal';\nimport styles from './notification.css?inline';\n\n/**\n * @element nve-notification\n * @description Displays real time updates without interrupting the user's workflow to communicate an important message or status.\n * @documentation https://nvidia.github.io/elements/docs/elements/notification/\n * @since 0.6.0\n * @entrypoint \\@nvidia-elements/core/notification\n * @event beforetoggle - Dispatched on a popover just before showing or hiding. [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/beforetoggle_event)\n * @event toggle - Dispatched on a popover element just after showing or hiding. [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/toggle_event)\n * @event open - Dispatched when the notification opens.\n * @event close - Dispatched when the notification closes.\n * @slot - The message communicated by the notification.\n * @slot icon - content slot for the status icon\n * @cssprop --border-radius\n * @cssprop --background\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --box-shadow\n * @cssprop --min-width\n * @cssprop --width\n * @cssprop --max-width\n * @cssprop --border\n * @cssprop --status-border\n * @cssprop --gap\n * @cssprop --status-color\n * @cssprop --animation-duration - Duration of notification open/close animations\n * @csspart status-icon - The status icon element\n * @csspart icon-button - The close icon button element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/\n */\n@scopedRegistry()\nexport class Notification extends LitElement {\n /**\n * (optional) By default the popover will automatically anchor itself relative to the trigger element.\n * Pass an optional custom anchor element as an idref string within the same render root or a HTMLElement DOM reference.\n */\n @property({ type: String }) anchor: string | HTMLElement = globalThis.document?.body;\n\n /**\n * @deprecated Use the popover API instead.\n * The trigger defines what element triggers an `open` interaction event.\n * A trigger can accept a idref string within the same render root or a HTMLElement DOM reference.\n */\n @property({ type: String }) trigger: string | HTMLElement;\n\n /**\n * Sets the side position of the popover relative to the provided anchor element.\n */\n @property({ type: String, reflect: true }) position: PopoverPosition;\n\n /**\n * Sets the alignment of the popover relative to the provided anchor element.\n */\n @property({ type: String, reflect: true }) alignment: PopoverAlign;\n\n /**\n * @deprecated Use the popover API instead.\n * Determines if popover visibility behavior should be automatically controlled by the trigger.\n */\n @property({ type: Boolean, reflect: true, attribute: 'behavior-trigger' }) behaviorTrigger: boolean;\n\n /**\n * Determines if a close button should render within notification.\n */\n @property({ type: Boolean }) closable = false;\n\n /**\n * A delayed `close` event will occur determined from the provided millisecond value.\n */\n @property({ type: Number, attribute: 'close-timeout' }) closeTimeout = 0;\n\n /**\n * Determines the visual status of the notification.\n */\n @property({ type: String, reflect: true }) status: SupportStatus;\n\n /**\n * Flat container option applies when embedding within another containing element such as a drawer.\n */\n @property({ type: String, reflect: true }) container?: 'flat';\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /**\n * Enables updating internal string values for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n /**\n * @private\n */\n @property({ type: Boolean }) inline = false;\n\n /** @private */\n get popoverType(): PopoverType {\n return 'manual';\n }\n\n /** @private */\n get popoverInline() {\n return this.parentElement?.localName === 'nve-notification-group' || this.inline || this.container === 'flat';\n }\n\n /** @private */\n declare _internals: ElementInternals;\n\n protected typeNativePopoverController: TypeNativePopoverController<Notification>;\n\n #closeTimeout?: ReturnType<typeof setTimeout>;\n\n #hiddenAttributeObserver?: MutationObserver;\n\n get #popoverContent() {\n return html`\n <slot name=\"icon\"><nve-icon .name=${statusIcons[this.status]} .ariaLabel=${(this.status ? (this.i18n as Record<string, string>)[this.status] : undefined) ?? this.i18n.information} part=\"status-icon\"></nve-icon></slot>\n ${this.closable ? html`<nve-icon-button part=\"icon-button\" @click=${this.hidePopover} icon-name=\"cancel\" size=\"sm\" container=\"flat\" .ariaLabel=${this.i18n.close}></nve-icon-button>` : ''}\n <slot></slot>`;\n }\n\n static styles = useStyles([popoverStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-notification',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon,\n [IconButton.metadata.tag]: IconButton\n };\n\n render() {\n return html`\n <div internal-host>\n ${this.#popoverContent}\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this.#hiddenAttributeObserver = new MutationObserver(() => this.#syncInlineCloseTimeout());\n this.#hiddenAttributeObserver.observe(this, { attributeFilter: ['hidden'] });\n this._internals.role = 'alert';\n this.#syncInlineCloseTimeout();\n }\n\n disconnectedCallback() {\n this.#clearCloseTimeout();\n this.#hiddenAttributeObserver?.disconnect();\n this.#hiddenAttributeObserver = undefined;\n super.disconnectedCallback();\n }\n\n async firstUpdated(props: PropertyValues<this>) {\n super.firstUpdated(props);\n\n if (!this.popoverInline) {\n this.typeNativePopoverController = new TypeNativePopoverController<Notification>(this);\n } else {\n this.setAttribute('nve-popover', '');\n }\n\n this.#syncInlineCloseTimeout();\n }\n\n updated(props: PropertyValues<this>) {\n super.updated(props);\n\n if (props.has('closeTimeout') || props.has('container') || props.has('inline')) {\n this.#syncInlineCloseTimeout();\n }\n }\n\n hidePopover(): void {\n this.#clearCloseTimeout();\n\n if (this.popoverInline) {\n this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true }));\n } else {\n super.hidePopover();\n }\n }\n\n /**\n * The popover controller provides this functionality.\n * But when the notification is in inline mode the\n * controller does not run so this sets it up directly.\n */\n #syncInlineCloseTimeout() {\n this.#clearCloseTimeout();\n\n if (this.popoverInline && this.closeTimeout && !this.hidden) {\n this.#closeTimeout = setTimeout(() => this.hidePopover(), this.closeTimeout);\n }\n }\n\n #clearCloseTimeout() {\n if (this.#closeTimeout !== undefined) {\n clearTimeout(this.#closeTimeout);\n this.#closeTimeout = undefined;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAkDO,IAAM,IAAN,cAA2B,EAAW;;EA4DL,aAvDqB,KAAA,SAAA,WAAW,UAAU,MA4BxC,KAAA,WAAA,IAK+B,KAAA,eAAA,GAY/B,KAAA,KAAA,IAAI,EAAqB,IAAI,GAKlC,KAAA,OAAA,KAAK,GAAgB,MAKlB,KAAA,SAAA;;CAVtC;CAaA,IAAI,cAA2B;EAC7B,OAAO;CACT;CAGA,IAAI,gBAAgB;EAClB,OAAO,KAAK,eAAe,cAAc,4BAA4B,KAAK,UAAU,KAAK,cAAc;CACzG;CAOA;CAEA;CAEA,IAAI,KAAkB;EACpB,OAAO,CAAI,sCACyB,EAAY,KAAK,QAAQ,iBAAe,KAAK,SAAU,KAAK,KAAgC,KAAK,UAAU,KAAA,MAAc,KAAK,KAAK,YAAY,yCACjL,KAAK,WAAW,CAAI,+CAA8C,KAAK,YAAY,8DAA4D,KAAK,KAAK,MAAM,wBAAuB,GAAG;CAE7L;;EAEgB,KAAA,SAAA,EAAU,CAAC,GAAe,CAAM,CAAC;;;EAEtB,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;;EAE4B,KAAA,qBAAA;IACzB,EAAK,SAAS,MAAM;IACpB,EAAW,SAAS,MAAM;EAC7B;;CAEA,SAAS;EACP,OAAO,CAAI,sBAEP,KAAK,GAAgB;CAG3B;CAEA,oBAAoB;EAMlB,AALA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,KAA2B,IAAI,uBAAuB,KAAK,GAAwB,CAAC,GACzF,KAAK,GAAyB,QAAQ,MAAM,EAAE,iBAAiB,CAAC,QAAQ,EAAE,CAAC,GAC3E,KAAK,W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AS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAMxC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,WAAW;AAAmB,CAAC,CAAA,GAAA,EAAA,WAAA,mBAAA,KAAA,CAAA,GAKxE,EAAA,CAAA,EAAS,EAAE,MAAM,QAAQ,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,GAK1B,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAgB,CAAC,CAAA,GAAA,EAAA,WAAA,gBAAA,KAAA,CAAA,GAKrD,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,GAKxC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAOxC,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GAKzB,EAAA,CAAA,EAAS,EAAE,MAAM,QAAQ,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,GA7D5B,IAAA,EAAA,CAAA,EAAe,CAAA,GAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"notification2.js","names":[],"sources":["../../src/notification/notification.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { PropertyValues } from 'lit';\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport type { PopoverAlign, PopoverType, SupportStatus, PopoverPosition } from '@nvidia-elements/core/internal';\nimport {\n attachInternals,\n popoverStyles,\n statusIcons,\n useStyles,\n TypeNativePopoverController,\n scopedRegistry\n} from '@nvidia-elements/core/internal';\nimport { I18nController, type I18nDefaults } from '@nvidia-elements/foundations/internal/i18n';\nimport styles from './notification.css?inline';\n\nconst i18nDefaults = {\n close: 'close',\n danger: 'danger',\n information: 'information',\n success: 'success',\n warning: 'warning'\n} satisfies I18nDefaults;\n\n/**\n * @element nve-notification\n * @description Displays real time updates without interrupting the user's workflow to communicate an important message or status.\n * @documentation https://nvidia.github.io/elements/docs/elements/notification/\n * @since 0.6.0\n * @entrypoint \\@nvidia-elements/core/notification\n * @event beforetoggle - Dispatched on a popover just before showing or hiding. [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/beforetoggle_event)\n * @event toggle - Dispatched on a popover element just after showing or hiding. [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/toggle_event)\n * @event open - Dispatched when the notification opens.\n * @event close - Dispatched when the notification closes.\n * @slot - The message communicated by the notification.\n * @slot icon - content slot for the status icon\n * @cssprop --border-radius\n * @cssprop --background\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --box-shadow\n * @cssprop --min-width\n * @cssprop --width\n * @cssprop --max-width\n * @cssprop --border\n * @cssprop --status-border\n * @cssprop --gap\n * @cssprop --status-color\n * @cssprop --animation-duration - Duration of notification open/close animations\n * @csspart status-icon - The status icon element\n * @csspart icon-button - The close icon button element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/\n */\n@scopedRegistry()\nexport class Notification extends LitElement {\n /**\n * (optional) By default the popover will automatically anchor itself relative to the trigger element.\n * Pass an optional custom anchor element as an idref string within the same render root or a HTMLElement DOM reference.\n */\n @property({ type: String }) anchor: string | HTMLElement = globalThis.document?.body;\n\n /**\n * @deprecated Use the popover API instead.\n * The trigger defines what element triggers an `open` interaction event.\n * A trigger can accept a idref string within the same render root or a HTMLElement DOM reference.\n */\n @property({ type: String }) trigger: string | HTMLElement;\n\n /**\n * Sets the side position of the popover relative to the provided anchor element.\n */\n @property({ type: String, reflect: true }) position: PopoverPosition;\n\n /**\n * Sets the alignment of the popover relative to the provided anchor element.\n */\n @property({ type: String, reflect: true }) alignment: PopoverAlign;\n\n /**\n * @deprecated Use the popover API instead.\n * Determines if popover visibility behavior should be automatically controlled by the trigger.\n */\n @property({ type: Boolean, reflect: true, attribute: 'behavior-trigger' }) behaviorTrigger: boolean;\n\n /**\n * Determines if a close button should render within notification.\n */\n @property({ type: Boolean }) closable = false;\n\n /**\n * A delayed `close` event will occur determined from the provided millisecond value.\n */\n @property({ type: Number, attribute: 'close-timeout' }) closeTimeout = 0;\n\n /**\n * Determines the visual status of the notification.\n */\n @property({ type: String, reflect: true }) status: SupportStatus;\n\n /**\n * Flat container option applies when embedding within another containing element such as a drawer.\n */\n @property({ type: String, reflect: true }) container?: 'flat';\n\n #i18nController: I18nController<this> = new I18nController<this>(this, i18nDefaults);\n\n /**\n * Enables updating internal string values for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n /**\n * @private\n */\n @property({ type: Boolean }) inline = false;\n\n /** @private */\n get popoverType(): PopoverType {\n return 'manual';\n }\n\n /** @private */\n get popoverInline() {\n return this.parentElement?.localName === 'nve-notification-group' || this.inline || this.container === 'flat';\n }\n\n /** @private */\n declare _internals: ElementInternals;\n\n protected typeNativePopoverController: TypeNativePopoverController<Notification>;\n\n #closeTimeout?: ReturnType<typeof setTimeout>;\n\n #hiddenAttributeObserver?: MutationObserver;\n\n get #popoverContent() {\n return html`\n <slot name=\"icon\"><nve-icon .name=${statusIcons[this.status]} .ariaLabel=${(this.status ? (this.i18n as Record<string, string>)[this.status] : undefined) ?? this.i18n.information} part=\"status-icon\"></nve-icon></slot>\n ${this.closable ? html`<nve-icon-button part=\"icon-button\" @click=${this.hidePopover} icon-name=\"cancel\" size=\"sm\" container=\"flat\" .ariaLabel=${this.i18n.close}></nve-icon-button>` : ''}\n <slot></slot>`;\n }\n\n static styles = useStyles([popoverStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-notification',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon,\n [IconButton.metadata.tag]: IconButton\n };\n\n render() {\n return html`\n <div internal-host>\n ${this.#popoverContent}\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this.#hiddenAttributeObserver = new MutationObserver(() => this.#syncInlineCloseTimeout());\n this.#hiddenAttributeObserver.observe(this, { attributeFilter: ['hidden'] });\n this._internals.role = 'alert';\n this.#syncInlineCloseTimeout();\n }\n\n disconnectedCallback() {\n this.#clearCloseTimeout();\n this.#hiddenAttributeObserver?.disconnect();\n this.#hiddenAttributeObserver = undefined;\n super.disconnectedCallback();\n }\n\n async firstUpdated(props: PropertyValues<this>) {\n super.firstUpdated(props);\n\n if (!this.popoverInline) {\n this.typeNativePopoverController = new TypeNativePopoverController<Notification>(this);\n } else {\n this.setAttribute('nve-popover', '');\n }\n\n this.#syncInlineCloseTimeout();\n }\n\n updated(props: PropertyValues<this>) {\n super.updated(props);\n\n if (props.has('closeTimeout') || props.has('container') || props.has('inline')) {\n this.#syncInlineCloseTimeout();\n }\n }\n\n hidePopover(): void {\n this.#clearCloseTimeout();\n\n if (this.popoverInline) {\n this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true }));\n } else {\n super.hidePopover();\n }\n }\n\n /**\n * The popover controller provides this functionality.\n * But when the notification is in inline mode the\n * controller does not run so this sets it up directly.\n */\n #syncInlineCloseTimeout() {\n this.#clearCloseTimeout();\n\n if (this.popoverInline && this.closeTimeout && !this.hidden) {\n this.#closeTimeout = setTimeout(() => this.hidePopover(), this.closeTimeout);\n }\n }\n\n #clearCloseTimeout() {\n if (this.#closeTimeout !== undefined) {\n clearTimeout(this.#closeTimeout);\n this.#closeTimeout = undefined;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAoBA,IAAM,IAAe;CACnB,OAAO;CACP,QAAQ;CACR,aAAa;CACb,SAAS;CACT,SAAS;AACX,GAgCa,IAAN,cAA2B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AAA,EAAA,WAAA,YAAA,KAAA,CAAA,GAK1B,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAgB,CAAC,CAAA,GAAA,EAAA,WAAA,gBAAA,KAAA,CAAA,GAKrD,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,GAKxC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAOxC,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GAKzB,EAAA,CAAA,EAAS,EAAE,MAAM,QAAQ,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,GA7D5B,IAAA,EAAA,CAAA,EAAe,CAAA,GAAA,CAAA"}
|
|
@@ -27,17 +27,10 @@ import type { Size } from '@nvidia-elements/core/internal';
|
|
|
27
27
|
*
|
|
28
28
|
*/
|
|
29
29
|
export declare class PagePanel extends LitElement {
|
|
30
|
-
#private;
|
|
31
30
|
/**
|
|
32
31
|
* Sets the max size of the panel.
|
|
33
32
|
*/
|
|
34
33
|
size?: Size;
|
|
35
|
-
/**
|
|
36
|
-
* Enables updating internal string values for internationalization.
|
|
37
|
-
*/
|
|
38
|
-
i18n: Partial<import("@nvidia-elements/core/internal").I18nStrings & {
|
|
39
|
-
__set: boolean;
|
|
40
|
-
}>;
|
|
41
34
|
static styles: import("lit").CSSResult[];
|
|
42
35
|
static readonly metadata: {
|
|
43
36
|
tag: string;
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import a from "
|
|
7
|
-
import o from "./page-panel.js";
|
|
8
|
-
import s from "
|
|
9
|
-
import {
|
|
10
|
-
import { property as u } from "lit/decorators/property.js";
|
|
1
|
+
import { appendRootNodeStyle as e } from "../../internal/utils/dom.js";
|
|
2
|
+
import { attachInternals as t } from "../../internal/utils/a11y.js";
|
|
3
|
+
import { TypeExpandableController as n } from "../../internal/controllers/type-expandable.controller.js";
|
|
4
|
+
import { useStyles as r } from "../../internal/styles/index.js";
|
|
5
|
+
import i from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
6
|
+
import a from "./page-panel.js";
|
|
7
|
+
import o from "./page-panel.global.js";
|
|
8
|
+
import { LitElement as s, html as c } from "lit";
|
|
9
|
+
import { property as l } from "lit/decorators/property.js";
|
|
11
10
|
//#region src/page/page-panel/page-panel.ts
|
|
12
|
-
var
|
|
13
|
-
#e;
|
|
11
|
+
var u = class extends s {
|
|
14
12
|
static {
|
|
15
|
-
this.styles =
|
|
13
|
+
this.styles = r([a]);
|
|
16
14
|
}
|
|
17
15
|
static {
|
|
18
16
|
this.metadata = {
|
|
19
17
|
tag: "nve-page-panel",
|
|
20
|
-
version: "2.19.
|
|
18
|
+
version: "2.19.1",
|
|
21
19
|
parents: ["nve-page"]
|
|
22
20
|
};
|
|
23
21
|
}
|
|
@@ -25,23 +23,23 @@ var d = class extends c {
|
|
|
25
23
|
return [...super.observedAttributes, "hidden"];
|
|
26
24
|
}
|
|
27
25
|
constructor() {
|
|
28
|
-
super(),
|
|
26
|
+
super(), new n(this, { useHidden: !0 });
|
|
29
27
|
}
|
|
30
28
|
render() {
|
|
31
|
-
return
|
|
29
|
+
return c`<div internal-host><div part="_header"><slot name="header"></slot><slot name="actions"></slot></div><div class="content"><slot></slot></div><div><slot name="footer"></slot></div></div>`;
|
|
32
30
|
}
|
|
33
31
|
connectedCallback() {
|
|
34
|
-
super.connectedCallback(),
|
|
32
|
+
super.connectedCallback(), t(this), this._internals.states.delete("reopened"), e(this, o), this._internals.role = "region";
|
|
35
33
|
}
|
|
36
34
|
attributeChangedCallback(e, t, n) {
|
|
37
35
|
super.attributeChangedCallback(e, t, n), e === "hidden" && t !== null && n === null && this.isConnected && this._internals.states.add("reopened");
|
|
38
36
|
}
|
|
39
37
|
};
|
|
40
|
-
|
|
38
|
+
i([l({
|
|
41
39
|
type: String,
|
|
42
40
|
reflect: !0
|
|
43
|
-
})],
|
|
41
|
+
})], u.prototype, "size", void 0);
|
|
44
42
|
//#endregion
|
|
45
|
-
export {
|
|
43
|
+
export { u as PagePanel };
|
|
46
44
|
|
|
47
45
|
//# sourceMappingURL=page-panel2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-panel2.js","names":[],"sources":["../../../src/page/page-panel/page-panel.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { Size } from '@nvidia-elements/core/internal';\nimport {\n appendRootNodeStyle,\n attachInternals,\n
|
|
1
|
+
{"version":3,"file":"page-panel2.js","names":[],"sources":["../../../src/page/page-panel/page-panel.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { Size } from '@nvidia-elements/core/internal';\nimport {\n appendRootNodeStyle,\n attachInternals,\n TypeExpandableController,\n useStyles\n} from '@nvidia-elements/core/internal';\nimport styles from './page-panel.css?inline';\nimport globalStyles from './page-panel.global.css?inline';\n\n/**\n * @element nve-page-panel\n * @description Child panel for embedded panels within the page component. Typically used for left/right/bottom page slot positions.\n * @documentation https://nvidia.github.io/elements/docs/elements/page/\n * @entrypoint \\@nvidia-elements/core/page\n * @since 1.15.0\n * @event open - Dispatched after an invoker command removes `hidden` and opens the panel.\n * @event close - Dispatched after an invoker command sets `hidden` and closes the panel.\n * @slot - `nve-page-panel-content` elements that provide the panel body.\n * @slot actions - slot for action / dismiss buttons\n * @command --open - Removes `hidden` and dispatches `open`.\n * @command --close - Sets `hidden` and dispatches `close`.\n * @command --toggle - Toggles `hidden` and dispatches `open` or `close`.\n * @cssprop --background\n * @cssprop --border\n * @cssprop --color\n * @cssprop --gap\n * @cssprop --padding\n * @cssprop --height\n * @cssprop --width\n * @cssprop --max-width\n * @cssprop --max-height\n * @cssprop --animation-duration - Duration of panel open/close animations\n * @aria https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/region_role\n *\n */\nexport class PagePanel extends LitElement {\n /**\n * Sets the max size of the panel.\n */\n @property({ type: String, reflect: true }) size?: Size;\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-page-panel',\n version: '0.0.0',\n parents: ['nve-page']\n };\n\n static get observedAttributes() {\n return [...super.observedAttributes, 'hidden'];\n }\n\n constructor() {\n super();\n new TypeExpandableController(this, { useHidden: true });\n }\n\n /** @private */\n declare _internals: ElementInternals;\n\n render() {\n return html`\n <div internal-host>\n <div part=\"_header\">\n <slot name=\"header\"></slot>\n <slot name=\"actions\"></slot>\n </div>\n <div class=\"content\">\n <slot></slot>\n </div>\n <div>\n <slot name=\"footer\"></slot>\n </div>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.states.delete('reopened');\n appendRootNodeStyle(this, globalStyles);\n this._internals.role = 'region';\n }\n\n attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) {\n super.attributeChangedCallback(name, oldValue, newValue);\n if (name === 'hidden' && oldValue !== null && newValue === null && this.isConnected) {\n this._internals.states.add('reopened');\n }\n }\n}\n"],"mappings":";;;;;;;;;;AAyCA,IAAa,IAAb,cAA+B,EAAW;;EAMxB,KAAA,SAAA,EAAU,CAAC,CAAM,CAAC;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;GACT,SAAS,CAAC,UAAU;EACtB;;CAEA,WAAW,qBAAqB;EAC9B,OAAO,CAAC,GAAG,MAAM,oBAAoB,QAAQ;CAC/C;CAEA,cAAc;EAEZ,AADA,MAAM,GACN,IAAI,EAAyB,MAAM,EAAE,WAAW,GAAK,CAAC;CACxD;CAKA,SAAS;EACP,OAAO,CAAI;CAcb;CAEA,oBAAoB;EAKlB,AAJA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO,OAAO,UAAU,GACxC,EAAoB,MAAM,CAAY,GACtC,KAAK,WAAW,OAAO;CACzB;CAEA,yBAAyB,GAAc,GAAyB,GAAyB;EAEvF,AADA,MAAM,yBAAyB,GAAM,GAAU,CAAQ,GACnD,MAAS,YAAY,MAAa,QAAQ,MAAa,QAAQ,KAAK,eACtE,KAAK,WAAW,OAAO,IAAI,UAAU;CAEzC;AACF;AArDG,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA"}
|
package/dist/page/page2.js
CHANGED
|
@@ -1,39 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import s from "../
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import u from "
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
1
|
+
import { keyNavigationList as e } from "../internal/controllers/keynav-list.controller.js";
|
|
2
|
+
import { attachInternals as t } from "../internal/utils/a11y.js";
|
|
3
|
+
import { typeSSR as n } from "../internal/controllers/type-ssr.controller.js";
|
|
4
|
+
import { scopedRegistry as r } from "../internal/decorators/scoped-registry.js";
|
|
5
|
+
import { useStyles as i } from "../internal/styles/index.js";
|
|
6
|
+
import { formatStandardNumber as a } from "../internal/utils/objects.js";
|
|
7
|
+
import o from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
8
|
+
import { IconButton as s } from "../icon-button/icon-button2.js";
|
|
9
|
+
import { Select as c } from "../select/select2.js";
|
|
10
|
+
import l from "./pagination.js";
|
|
11
|
+
import { LitElement as u, html as d, nothing as f } from "lit";
|
|
12
|
+
import { property as p } from "lit/decorators/property.js";
|
|
13
|
+
import { I18nController as m } from "@nvidia-elements/foundations/internal/i18n";
|
|
14
14
|
import { FormControlMixin as h } from "@nvidia-elements/forms/mixins";
|
|
15
15
|
//#region src/pagination/pagination.ts
|
|
16
|
-
var g =
|
|
16
|
+
var g = {
|
|
17
|
+
of: "of",
|
|
18
|
+
previous: "previous",
|
|
19
|
+
next: "next",
|
|
20
|
+
start: "start",
|
|
21
|
+
end: "end",
|
|
22
|
+
currentPage: "current page"
|
|
23
|
+
}, _ = class extends h(u) {
|
|
17
24
|
#e;
|
|
18
25
|
static {
|
|
19
|
-
this.styles =
|
|
26
|
+
this.styles = i([l]);
|
|
20
27
|
}
|
|
21
28
|
static {
|
|
22
29
|
this.metadata = {
|
|
23
30
|
tag: "nve-pagination",
|
|
24
|
-
version: "2.19.
|
|
31
|
+
version: "2.19.1",
|
|
25
32
|
valueSchema: { type: "number" }
|
|
26
33
|
};
|
|
27
34
|
}
|
|
28
35
|
static {
|
|
29
36
|
this.elementDefinitions = {
|
|
30
|
-
[
|
|
31
|
-
[
|
|
37
|
+
[s.metadata.tag]: s,
|
|
38
|
+
[c.metadata.tag]: c
|
|
32
39
|
};
|
|
33
40
|
}
|
|
34
41
|
get keynavListConfig() {
|
|
35
42
|
return {
|
|
36
|
-
items: this.shadowRoot.querySelectorAll(`${
|
|
43
|
+
items: this.shadowRoot.querySelectorAll(`${s.metadata.tag}, input, select`),
|
|
37
44
|
layout: "horizontal"
|
|
38
45
|
};
|
|
39
46
|
}
|
|
@@ -48,29 +55,29 @@ var g = class extends h(d) {
|
|
|
48
55
|
}
|
|
49
56
|
get #i() {
|
|
50
57
|
let e = (this.value - 1) * this.step + 1, t = Math.min(this.value * this.step, this.items || Infinity);
|
|
51
|
-
return `${
|
|
58
|
+
return `${a(e)}-${a(t)}`;
|
|
52
59
|
}
|
|
53
60
|
get #a() {
|
|
54
|
-
return this.items ?
|
|
61
|
+
return this.items ? d`<label><slot name="suffix-label">${this.i18n.of} ${a(this.items)}</slot></label>` : f;
|
|
55
62
|
}
|
|
56
63
|
get #o() {
|
|
57
|
-
return
|
|
64
|
+
return d`<nve-icon-button part="icon-button previous-icon-button" @click="${() => this.#m(this.value - 1)}" .disabled="${this.disabled || this.#t <= this.step}" .ariaLabel="${this.i18n.previous}" container="inline" icon-name="chevron" direction="left"></nve-icon-button>`;
|
|
58
65
|
}
|
|
59
66
|
get #s() {
|
|
60
|
-
return
|
|
67
|
+
return d`<nve-icon-button part="icon-button next-icon-button" @click="${() => this.#m(this.value + 1)}" .disabled="${this.disabled || this.#t >= this.items}" .ariaLabel="${this.i18n.next}" container="inline" icon-name="chevron" direction="right"></nve-icon-button>`;
|
|
61
68
|
}
|
|
62
69
|
get #c() {
|
|
63
|
-
return
|
|
70
|
+
return d`<nve-icon-button part="icon-button start-icon-button" @click="${() => this.#m(1)}" .disabled="${this.disabled || this.#t <= this.step}" .ariaLabel="${this.i18n.start}" container="inline" icon-name="arrow-stop" direction="left"></nve-icon-button>`;
|
|
64
71
|
}
|
|
65
72
|
get #l() {
|
|
66
|
-
return
|
|
73
|
+
return d`<nve-icon-button part="icon-button end-icon-button" @click="${() => this.#m(this.items / this.step)}" .disabled="${this.disabled || (this.value - 1) * this.step + this.step >= this.items}" .ariaLabel="${this.i18n.end}" container="inline" icon-name="arrow-stop" direction="right"></nve-icon-button>`;
|
|
67
74
|
}
|
|
68
75
|
#u;
|
|
69
76
|
get #d() {
|
|
70
|
-
return this.disableStep ?
|
|
77
|
+
return this.disableStep ? d`<label>${this.#i} </label>` : d`<nve-select part="select" .container="${this.container}"><select .ariaLabel="${this.i18n.currentPage}" @change="${(e) => this.#p(parseInt(e.target.value, 10))}" value="${this.step}" .disabled="${this.disabled || this.disableStep}">${this.stepSizes.map((e) => d`<option ?selected="${this.step === e}" value="${e}">${e}</option>`)}</select><div class="select-label">${this.#i}</div></nve-select>`;
|
|
71
78
|
}
|
|
72
79
|
render() {
|
|
73
|
-
return
|
|
80
|
+
return d`<div internal-host role="presentation">${this.skippable && this.items ? d`${this.#c} ${this.#o} ${this.#d} ${this.#a} ${this.#s} ${this.#l}` : d`${this.#d} ${this.#a} ${this.#o} ${this.#s}`}</div>`;
|
|
74
81
|
}
|
|
75
82
|
constructor() {
|
|
76
83
|
super(), this.step = 10, this.stepSizes = [
|
|
@@ -78,10 +85,10 @@ var g = class extends h(d) {
|
|
|
78
85
|
20,
|
|
79
86
|
50,
|
|
80
87
|
100
|
|
81
|
-
], this.#e = new
|
|
88
|
+
], this.#e = new m(this, g), this.i18n = this.#e.i18n, this.value = 1;
|
|
82
89
|
}
|
|
83
90
|
async connectedCallback() {
|
|
84
|
-
super.connectedCallback(),
|
|
91
|
+
super.connectedCallback(), t(this), this._internals.role = "toolbar", await this.updateComplete, this.#f();
|
|
85
92
|
}
|
|
86
93
|
disconnectedCallback() {
|
|
87
94
|
super.disconnectedCallback(), this.#u?.unobserve(this);
|
|
@@ -107,21 +114,21 @@ var g = class extends h(d) {
|
|
|
107
114
|
}));
|
|
108
115
|
}
|
|
109
116
|
};
|
|
110
|
-
|
|
117
|
+
o([p({ type: Number })], _.prototype, "step", void 0), o([p({
|
|
111
118
|
type: Array,
|
|
112
119
|
attribute: "step-sizes"
|
|
113
|
-
})],
|
|
120
|
+
})], _.prototype, "stepSizes", void 0), o([p({ type: Number })], _.prototype, "items", void 0), o([p({ type: Boolean })], _.prototype, "skippable", void 0), o([p({
|
|
114
121
|
type: Boolean,
|
|
115
122
|
attribute: "disable-step"
|
|
116
|
-
})],
|
|
123
|
+
})], _.prototype, "disableStep", void 0), o([p({
|
|
117
124
|
type: String,
|
|
118
125
|
reflect: !0
|
|
119
|
-
})],
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
],
|
|
126
|
+
})], _.prototype, "container", void 0), o([p({ type: Object })], _.prototype, "i18n", void 0), _ = o([
|
|
127
|
+
n(),
|
|
128
|
+
e(),
|
|
129
|
+
r()
|
|
130
|
+
], _);
|
|
124
131
|
//#endregion
|
|
125
|
-
export {
|
|
132
|
+
export { _ as Pagination };
|
|
126
133
|
|
|
127
134
|
//# sourceMappingURL=pagination2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination2.js","names":[],"sources":["../../src/pagination/pagination.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixins';\nimport type { KeynavListConfig } from '@nvidia-elements/core/internal';\nimport {\n attachInternals,\n I18nController,\n formatStandardNumber,\n keyNavigationList,\n typeSSR,\n useStyles,\n scopedRegistry\n} from '@nvidia-elements/core/internal';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport { Select } from '@nvidia-elements/core/select';\nimport styles from './pagination.css?inline';\n\n/* eslint-disable jsdoc/no-types */\n// explicit jsdoc annotation due to inheritance context lost with CEM generator\n\n/**\n * @element nve-pagination\n * @description Pagination is a control that enables users to navigate through pages of content.\n * @documentation https://nvidia.github.io/elements/docs/elements/pagination/\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/pagination\n * @event input - Dispatched when the value (page) has changed\n * @event change - Dispatched when the value (page) has changed\n * @event first-page - Dispatched when the first page is active\n * @event last-page - Dispatched when the last page is active\n * @event step-change - Dispatched after the page size changes with the current page size in `detail`. The event bubbles and crosses shadow boundaries.\n * @slot suffix-label - Overrides the \"of total\" label when the total is an approximation.\n * @cssprop --background\n * @cssprop --font-size\n * @cssprop --width\n * @csspart icon-button - Base part applied to all icon button elements\n * @csspart previous-icon-button - The previous page icon button\n * @csspart next-icon-button - The next page icon button\n * @csspart start-icon-button - The first page icon button\n * @csspart end-icon-button - The last page icon button\n * @csspart select - The page size select element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/\n * @property {number} value - value the current page number\n * @attribute {string} step-sizes - A JSON-serialized array of page-size options available in the selector.\n */\n@typeSSR()\n@keyNavigationList<Pagination>()\n@scopedRegistry()\nexport class Pagination extends FormControlMixin<typeof LitElement, number>(LitElement) {\n /**\n * The number of items per page.\n */\n @property({ type: Number }) step = 10;\n /**\n * Page-size options available in the selector.\n */\n @property({ type: Array, attribute: 'step-sizes' }) stepSizes: number[] = [10, 20, 50, 100];\n\n /**\n * The total number of items.\n */\n @property({ type: Number }) items: number;\n\n /**\n * Whether the pagination is skippable to start/end.\n */\n @property({ type: Boolean }) skippable: boolean;\n\n /**\n * Whether the step selector has a disabled state.\n */\n @property({ type: Boolean, attribute: 'disable-step' }) disableStep: boolean;\n\n /**\n * Determines the container styles of component. Flat applies when nesting within other containers. Inline applies when placing within other inline content.\n */\n @property({ type: String, reflect: true }) container?: 'flat' | 'inline';\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /**\n * Enables updating internal string values for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-pagination',\n version: '0.0.0',\n valueSchema: {\n type: 'number' as const\n }\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton,\n [Select.metadata.tag]: Select\n };\n\n /** @private */\n get keynavListConfig(): KeynavListConfig {\n return {\n items: this.shadowRoot!.querySelectorAll<HTMLElement>(`${IconButton.metadata.tag}, input, select`),\n layout: 'horizontal'\n };\n }\n\n get #currentPage() {\n return (this.value! - 1) * this.step + this.step;\n }\n\n get #isLastPage() {\n return this.items / this.value! === this.step;\n }\n\n get #isFirstPage() {\n return this.value === 1;\n }\n\n get #selectLabel() {\n const start = (this.value! - 1) * this.step + 1;\n const end = Math.min(this.value! * this.step, this.items || Infinity);\n return `${formatStandardNumber(start)}-${formatStandardNumber(end)}`;\n }\n\n get #label() {\n return this.items\n ? html`<label><slot name=\"suffix-label\">${this.i18n.of} ${formatStandardNumber(this.items)}</slot></label>`\n : nothing;\n }\n\n get #previousButton() {\n return html`<nve-icon-button part=\"icon-button previous-icon-button\"\n @click=${() => this.#setValue(this.value! - 1)}\n .disabled=${this.disabled || this.#currentPage <= this.step}\n .ariaLabel=${this.i18n.previous}\n container=\"inline\"\n icon-name=\"chevron\"\n direction=\"left\"\n ></nve-icon-button>`;\n }\n\n get #nextButton() {\n return html`<nve-icon-button part=\"icon-button next-icon-button\"\n @click=${() => this.#setValue(this.value! + 1)}\n .disabled=${this.disabled || this.#currentPage >= this.items}\n .ariaLabel=${this.i18n.next}\n container=\"inline\"\n icon-name=\"chevron\"\n direction=\"right\"\n ></nve-icon-button>`;\n }\n\n get #startButton() {\n return html`<nve-icon-button part=\"icon-button start-icon-button\"\n @click=${() => this.#setValue(1)}\n .disabled=${this.disabled || this.#currentPage <= this.step}\n .ariaLabel=${this.i18n.start}\n container=\"inline\"\n icon-name=\"arrow-stop\"\n direction=\"left\"\n ></nve-icon-button>`;\n }\n\n get #endButton() {\n return html`<nve-icon-button part=\"icon-button end-icon-button\"\n @click=${() => this.#setValue(this.items / this.step)}\n .disabled=${this.disabled || (this.value! - 1) * this.step + this.step >= this.items}\n .ariaLabel=${this.i18n.end}\n container=\"inline\"\n icon-name=\"arrow-stop\"\n direction=\"right\"\n ></nve-icon-button>`;\n }\n\n #resizeObserver: ResizeObserver;\n\n get #select() {\n return this.disableStep\n ? html`<label>${this.#selectLabel} </label>`\n : html`\n <nve-select part=\"select\" .container=${this.container}>\n <select\n .ariaLabel=${this.i18n.currentPage}\n @change=${(e: Event) => this.#setStep(parseInt((e.target as HTMLSelectElement).value, 10))}\n value=${this.step}\n .disabled=${this.disabled || this.disableStep}\n >\n ${this.stepSizes.map(i => html`<option ?selected=${this.step === i} value=${i}>${i}</option>`)}\n </select>\n <div class=\"select-label\">${this.#selectLabel}</div>\n </nve-select>\n `;\n }\n\n render() {\n return html`\n <div internal-host role=\"presentation\">\n ${\n this.skippable && this.items\n ? html`\n ${this.#startButton} ${this.#previousButton} ${this.#select} ${this.#label} ${this.#nextButton}\n ${this.#endButton}\n `\n : html` ${this.#select} ${this.#label} ${this.#previousButton} ${this.#nextButton} `\n }\n </div>\n `;\n }\n\n constructor() {\n super();\n this.value = 1;\n }\n\n async connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'toolbar';\n await this.updateComplete;\n this.#setupLabelWidth();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#resizeObserver?.unobserve(this);\n }\n\n #setupLabelWidth() {\n const label = this.shadowRoot!.querySelector('.select-label');\n const select = this.shadowRoot!.querySelector('select');\n if (label && select) {\n this.#resizeObserver = new ResizeObserver(\n entries => (select!.style.minWidth = `${entries[0]!.contentRect.width + 36}px`)\n );\n this.#resizeObserver.observe(label);\n }\n }\n\n #setStep(value: number) {\n /* eslint-disable-next-line */\n this.step = value; // stateful due to internalized select element\n this.dispatchEvent(new CustomEvent('step-change', { detail: this.step, bubbles: true, composed: true }));\n this.#setValue(this.value!);\n }\n\n #setValue(value: number) {\n if (this.value !== value) {\n this.value = value;\n this.dispatchInputEvent();\n this.dispatchChangeEvent();\n }\n\n if (this.#isLastPage) {\n this.dispatchEvent(new CustomEvent('last-page', { bubbles: true, composed: true }));\n }\n\n if (this.#isFirstPage) {\n this.dispatchEvent(new CustomEvent('first-page', { bubbles: true, composed: true }));\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAmDO,IAAM,IAAN,cAAyB,EAA4C,CAAU,CAAC,CAAC;CA8BtF;;EAOgB,KAAA,SAAA,EAAU,CAAC,CAAM,CAAC;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;GACT,aAAa,EACX,MAAM,SACR;EACF;;;EAE4B,KAAA,qBAAA;IACzB,EAAW,SA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EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA;CAtC3B,EAAQ;CACR,EAA8B;CAC9B,EAAe"}
|
|
1
|
+
{"version":3,"file":"pagination2.js","names":[],"sources":["../../src/pagination/pagination.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixins';\nimport type { KeynavListConfig } from '@nvidia-elements/core/internal';\nimport {\n attachInternals,\n formatStandardNumber,\n keyNavigationList,\n typeSSR,\n useStyles,\n scopedRegistry\n} from '@nvidia-elements/core/internal';\nimport { I18nController, type I18nDefaults } from '@nvidia-elements/foundations/internal/i18n';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport { Select } from '@nvidia-elements/core/select';\nimport styles from './pagination.css?inline';\n\nconst i18nDefaults = {\n of: 'of',\n previous: 'previous',\n next: 'next',\n start: 'start',\n end: 'end',\n currentPage: 'current page'\n} satisfies I18nDefaults;\n\n/* eslint-disable jsdoc/no-types */\n// explicit jsdoc annotation due to inheritance context lost with CEM generator\n\n/**\n * @element nve-pagination\n * @description Pagination is a control that enables users to navigate through pages of content.\n * @documentation https://nvidia.github.io/elements/docs/elements/pagination/\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/pagination\n * @event input - Dispatched when the value (page) has changed\n * @event change - Dispatched when the value (page) has changed\n * @event first-page - Dispatched when the first page is active\n * @event last-page - Dispatched when the last page is active\n * @event step-change - Dispatched after the page size changes with the current page size in `detail`. The event bubbles and crosses shadow boundaries.\n * @slot suffix-label - Overrides the \"of total\" label when the total is an approximation.\n * @cssprop --background\n * @cssprop --font-size\n * @cssprop --width\n * @csspart icon-button - Base part applied to all icon button elements\n * @csspart previous-icon-button - The previous page icon button\n * @csspart next-icon-button - The next page icon button\n * @csspart start-icon-button - The first page icon button\n * @csspart end-icon-button - The last page icon button\n * @csspart select - The page size select element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/\n * @property {number} value - value the current page number\n * @attribute {string} step-sizes - A JSON-serialized array of page-size options available in the selector.\n */\n@typeSSR()\n@keyNavigationList<Pagination>()\n@scopedRegistry()\nexport class Pagination extends FormControlMixin<typeof LitElement, number>(LitElement) {\n /**\n * The number of items per page.\n */\n @property({ type: Number }) step = 10;\n /**\n * Page-size options available in the selector.\n */\n @property({ type: Array, attribute: 'step-sizes' }) stepSizes: number[] = [10, 20, 50, 100];\n\n /**\n * The total number of items.\n */\n @property({ type: Number }) items: number;\n\n /**\n * Whether the pagination is skippable to start/end.\n */\n @property({ type: Boolean }) skippable: boolean;\n\n /**\n * Whether the step selector has a disabled state.\n */\n @property({ type: Boolean, attribute: 'disable-step' }) disableStep: boolean;\n\n /**\n * Determines the container styles of component. Flat applies when nesting within other containers. Inline applies when placing within other inline content.\n */\n @property({ type: String, reflect: true }) container?: 'flat' | 'inline';\n\n #i18nController: I18nController<this> = new I18nController<this>(this, i18nDefaults);\n\n /**\n * Enables updating internal string values for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-pagination',\n version: '0.0.0',\n valueSchema: {\n type: 'number' as const\n }\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton,\n [Select.metadata.tag]: Select\n };\n\n /** @private */\n get keynavListConfig(): KeynavListConfig {\n return {\n items: this.shadowRoot!.querySelectorAll<HTMLElement>(`${IconButton.metadata.tag}, input, select`),\n layout: 'horizontal'\n };\n }\n\n get #currentPage() {\n return (this.value! - 1) * this.step + this.step;\n }\n\n get #isLastPage() {\n return this.items / this.value! === this.step;\n }\n\n get #isFirstPage() {\n return this.value === 1;\n }\n\n get #selectLabel() {\n const start = (this.value! - 1) * this.step + 1;\n const end = Math.min(this.value! * this.step, this.items || Infinity);\n return `${formatStandardNumber(start)}-${formatStandardNumber(end)}`;\n }\n\n get #label() {\n return this.items\n ? html`<label><slot name=\"suffix-label\">${this.i18n.of} ${formatStandardNumber(this.items)}</slot></label>`\n : nothing;\n }\n\n get #previousButton() {\n return html`<nve-icon-button part=\"icon-button previous-icon-button\"\n @click=${() => this.#setValue(this.value! - 1)}\n .disabled=${this.disabled || this.#currentPage <= this.step}\n .ariaLabel=${this.i18n.previous}\n container=\"inline\"\n icon-name=\"chevron\"\n direction=\"left\"\n ></nve-icon-button>`;\n }\n\n get #nextButton() {\n return html`<nve-icon-button part=\"icon-button next-icon-button\"\n @click=${() => this.#setValue(this.value! + 1)}\n .disabled=${this.disabled || this.#currentPage >= this.items}\n .ariaLabel=${this.i18n.next}\n container=\"inline\"\n icon-name=\"chevron\"\n direction=\"right\"\n ></nve-icon-button>`;\n }\n\n get #startButton() {\n return html`<nve-icon-button part=\"icon-button start-icon-button\"\n @click=${() => this.#setValue(1)}\n .disabled=${this.disabled || this.#currentPage <= this.step}\n .ariaLabel=${this.i18n.start}\n container=\"inline\"\n icon-name=\"arrow-stop\"\n direction=\"left\"\n ></nve-icon-button>`;\n }\n\n get #endButton() {\n return html`<nve-icon-button part=\"icon-button end-icon-button\"\n @click=${() => this.#setValue(this.items / this.step)}\n .disabled=${this.disabled || (this.value! - 1) * this.step + this.step >= this.items}\n .ariaLabel=${this.i18n.end}\n container=\"inline\"\n icon-name=\"arrow-stop\"\n direction=\"right\"\n ></nve-icon-button>`;\n }\n\n #resizeObserver: ResizeObserver;\n\n get #select() {\n return this.disableStep\n ? html`<label>${this.#selectLabel} </label>`\n : html`\n <nve-select part=\"select\" .container=${this.container}>\n <select\n .ariaLabel=${this.i18n.currentPage}\n @change=${(e: Event) => this.#setStep(parseInt((e.target as HTMLSelectElement).value, 10))}\n value=${this.step}\n .disabled=${this.disabled || this.disableStep}\n >\n ${this.stepSizes.map(i => html`<option ?selected=${this.step === i} value=${i}>${i}</option>`)}\n </select>\n <div class=\"select-label\">${this.#selectLabel}</div>\n </nve-select>\n `;\n }\n\n render() {\n return html`\n <div internal-host role=\"presentation\">\n ${\n this.skippable && this.items\n ? html`\n ${this.#startButton} ${this.#previousButton} ${this.#select} ${this.#label} ${this.#nextButton}\n ${this.#endButton}\n `\n : html` ${this.#select} ${this.#label} ${this.#previousButton} ${this.#nextButton} `\n }\n </div>\n `;\n }\n\n constructor() {\n super();\n this.value = 1;\n }\n\n async connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'toolbar';\n await this.updateComplete;\n this.#setupLabelWidth();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.#resizeObserver?.unobserve(this);\n }\n\n #setupLabelWidth() {\n const label = this.shadowRoot!.querySelector('.select-label');\n const select = this.shadowRoot!.querySelector('select');\n if (label && select) {\n this.#resizeObserver = new ResizeObserver(\n entries => (select!.style.minWidth = `${entries[0]!.contentRect.width + 36}px`)\n );\n this.#resizeObserver.observe(label);\n }\n }\n\n #setStep(value: number) {\n /* eslint-disable-next-line */\n this.step = value; // stateful due to internalized select element\n this.dispatchEvent(new CustomEvent('step-change', { detail: this.step, bubbles: true, composed: true }));\n this.#setValue(this.value!);\n }\n\n #setValue(value: number) {\n if (this.value !== value) {\n this.value = value;\n this.dispatchInputEvent();\n this.dispatchChangeEvent();\n }\n\n if (this.#isLastPage) {\n this.dispatchEvent(new CustomEvent('last-page', { bubbles: true, composed: true }));\n }\n\n if (this.#isFirstPage) {\n this.dispatchEvent(new CustomEvent('first-page', { bubbles: true, composed: true }));\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAoBA,IAAM,IAAe;CACnB,IAAI;CACJ,UAAU;CACV,MAAM;CACN,OAAO;CACP,KAAK;CACL,aAAa;AACf,GAiCa,IAAN,cAAyB,EAA4C,CAAU,CAAC,CAAC;CA8BtF;;EAOgB,KAAA,SAAA,EAAU,CAAC,CAAM,CAAC;;;EAEP,KAAA,WAAA;GACzB,KA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Q,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAOxC,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA;CAtC3B,EAAQ;CACR,EAA8B;CAC9B,EAAe"}
|
package/dist/panel/panel2.js
CHANGED
|
@@ -1,79 +1,84 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import o from "../
|
|
8
|
-
import
|
|
9
|
-
import c from "./panel.js";
|
|
10
|
-
import l from "./panel-
|
|
11
|
-
import u from "./panel-
|
|
12
|
-
import d from "
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import { attachInternals as e } from "../internal/utils/a11y.js";
|
|
2
|
+
import { stateExpanded as t } from "../internal/controllers/state-expanded.controller.js";
|
|
3
|
+
import { TypeExpandableController as n } from "../internal/controllers/type-expandable.controller.js";
|
|
4
|
+
import { scopedRegistry as r } from "../internal/decorators/scoped-registry.js";
|
|
5
|
+
import { useStyles as i } from "../internal/styles/index.js";
|
|
6
|
+
import a from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
7
|
+
import { IconButton as o } from "../icon-button/icon-button2.js";
|
|
8
|
+
import s from "./panel.js";
|
|
9
|
+
import c from "./panel-header.js";
|
|
10
|
+
import l from "./panel-content.js";
|
|
11
|
+
import u from "./panel-footer.js";
|
|
12
|
+
import { LitElement as d, html as f } from "lit";
|
|
13
|
+
import { property as p } from "lit/decorators/property.js";
|
|
14
|
+
import { I18nController as m } from "@nvidia-elements/foundations/internal/i18n";
|
|
15
15
|
import { when as h } from "lit/directives/when.js";
|
|
16
16
|
//#region src/panel/panel.ts
|
|
17
|
-
var g =
|
|
17
|
+
var g = {
|
|
18
|
+
close: "close",
|
|
19
|
+
expand: "expand",
|
|
20
|
+
hide: "hide",
|
|
21
|
+
show: "show"
|
|
22
|
+
}, _ = class extends d {
|
|
18
23
|
static {
|
|
19
|
-
this.styles =
|
|
24
|
+
this.styles = i([c]);
|
|
20
25
|
}
|
|
21
26
|
static {
|
|
22
27
|
this.metadata = {
|
|
23
28
|
tag: "nve-panel-header",
|
|
24
|
-
version: "2.19.
|
|
29
|
+
version: "2.19.1"
|
|
25
30
|
};
|
|
26
31
|
}
|
|
27
32
|
render() {
|
|
28
|
-
return
|
|
33
|
+
return f`<div internal-host><div id="titles"><slot name="title"></slot><slot name="subtitle"></slot><slot></slot></div><slot name="action-icon"></slot></div>`;
|
|
29
34
|
}
|
|
30
35
|
connectedCallback() {
|
|
31
36
|
super.connectedCallback(), this.slot = "header";
|
|
32
37
|
}
|
|
33
|
-
},
|
|
38
|
+
}, v = class extends d {
|
|
34
39
|
static {
|
|
35
|
-
this.styles =
|
|
40
|
+
this.styles = i([l]);
|
|
36
41
|
}
|
|
37
42
|
static {
|
|
38
43
|
this.metadata = {
|
|
39
44
|
tag: "nve-panel-content",
|
|
40
|
-
version: "2.19.
|
|
45
|
+
version: "2.19.1"
|
|
41
46
|
};
|
|
42
47
|
}
|
|
43
48
|
render() {
|
|
44
|
-
return
|
|
49
|
+
return f`<slot></slot>`;
|
|
45
50
|
}
|
|
46
|
-
},
|
|
51
|
+
}, y = class extends d {
|
|
47
52
|
static {
|
|
48
|
-
this.styles =
|
|
53
|
+
this.styles = i([u]);
|
|
49
54
|
}
|
|
50
55
|
static {
|
|
51
56
|
this.metadata = {
|
|
52
57
|
tag: "nve-panel-footer",
|
|
53
|
-
version: "2.19.
|
|
58
|
+
version: "2.19.1"
|
|
54
59
|
};
|
|
55
60
|
}
|
|
56
61
|
render() {
|
|
57
|
-
return
|
|
62
|
+
return f`<footer internal-host><slot></slot></footer>`;
|
|
58
63
|
}
|
|
59
64
|
connectedCallback() {
|
|
60
65
|
super.connectedCallback(), this.slot = "footer";
|
|
61
66
|
}
|
|
62
|
-
},
|
|
63
|
-
constructor(...
|
|
64
|
-
super(...
|
|
67
|
+
}, b = class extends d {
|
|
68
|
+
constructor(...e) {
|
|
69
|
+
super(...e), this.expanded = !1, this.closable = !1, this.behaviorExpand = !1, this.side = "left", this.#e = new m(this, g), this.#t = new n(this), this.i18n = this.#e.i18n;
|
|
65
70
|
}
|
|
66
71
|
static {
|
|
67
|
-
this.styles =
|
|
72
|
+
this.styles = i([s]);
|
|
68
73
|
}
|
|
69
74
|
static {
|
|
70
75
|
this.metadata = {
|
|
71
76
|
tag: "nve-panel",
|
|
72
|
-
version: "2.19.
|
|
77
|
+
version: "2.19.1"
|
|
73
78
|
};
|
|
74
79
|
}
|
|
75
80
|
static {
|
|
76
|
-
this.elementDefinitions = { [
|
|
81
|
+
this.elementDefinitions = { [o.metadata.tag]: o };
|
|
77
82
|
}
|
|
78
83
|
#e;
|
|
79
84
|
#t;
|
|
@@ -81,20 +86,20 @@ var g = class extends f {
|
|
|
81
86
|
return this.side === "left" ? this.expanded ? "left" : "right" : this.expanded ? "right" : "left";
|
|
82
87
|
}
|
|
83
88
|
render() {
|
|
84
|
-
return
|
|
89
|
+
return f`<div internal-host><div class="header"><slot name="header"></slot>${h(!this.closable, () => f`<nve-icon-button part="icon-button" exportparts="icon:icon-button-icon" .container="${this.expanded ? "flat" : void 0}" icon-name="double-chevron" @click="${() => this.#t.toggle()}" .direction="${this.#n}" .expanded="${this.expanded}" .ariaLabel="${this.expanded ? this.i18n.close : this.i18n.expand}"></nve-icon-button>`, () => f`<nve-icon-button part="icon-button" exportparts="icon:icon-button-icon" container="flat" icon-name="cancel" @click="${() => this.#t.close()}" .expanded="${this.expanded}" .ariaLabel="${this.expanded ? this.i18n.hide : this.i18n.show}"></nve-icon-button>`)}</div><div class="content"><slot></slot></div><slot name="footer"></slot></div>`;
|
|
85
90
|
}
|
|
86
91
|
connectedCallback() {
|
|
87
|
-
super.connectedCallback(),
|
|
92
|
+
super.connectedCallback(), e(this), this._internals.role = "region";
|
|
88
93
|
}
|
|
89
94
|
};
|
|
90
|
-
|
|
95
|
+
a([p({
|
|
91
96
|
type: Boolean,
|
|
92
97
|
reflect: !0
|
|
93
|
-
})],
|
|
98
|
+
})], b.prototype, "expanded", void 0), a([p({ type: Boolean })], b.prototype, "closable", void 0), a([p({
|
|
94
99
|
type: Boolean,
|
|
95
100
|
attribute: "behavior-expand"
|
|
96
|
-
})],
|
|
101
|
+
})], b.prototype, "behaviorExpand", void 0), a([p({ type: String })], b.prototype, "side", void 0), a([p({ type: Object })], b.prototype, "i18n", void 0), b = a([r(), t()], b);
|
|
97
102
|
//#endregion
|
|
98
|
-
export {
|
|
103
|
+
export { b as Panel, v as PanelContent, y as PanelFooter, _ as PanelHeader };
|
|
99
104
|
|
|
100
105
|
//# sourceMappingURL=panel2.js.map
|