@nvidia-elements/core 0.0.2 → 0.0.3
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 +17 -28
- package/README.md +1 -10
- package/dist/_virtual/{_@oxc-project_runtime@0.115.0 → _@oxc-project_runtime@0.123.0}/helpers/decorate.js +1 -1
- package/dist/accordion/accordion2.js +5 -5
- package/dist/alert/alert-banner2.js +1 -1
- package/dist/alert/alert-group2.js +2 -2
- package/dist/alert/alert2.js +2 -2
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar2.js +2 -2
- package/dist/badge/badge2.js +2 -2
- package/dist/breadcrumb/breadcrumb2.js +2 -2
- package/dist/bundles/index.d.ts +38 -34
- package/dist/bundles/index.js +13 -6952
- package/dist/button/button2.js +2 -2
- package/dist/button-group/button-group2.js +2 -2
- package/dist/card/card2.js +5 -5
- package/dist/chat-message/chat-message2.js +2 -2
- package/dist/checkbox/checkbox-group2.js +2 -2
- package/dist/checkbox/checkbox2.js +2 -2
- package/dist/checkbox/define.js +6 -3
- package/dist/checkbox/define.js.map +1 -1
- package/dist/color/color2.js +2 -2
- package/dist/color/define.js +5 -3
- package/dist/color/define.js.map +1 -1
- package/dist/combobox/combobox.d.ts +1 -0
- package/dist/combobox/combobox.examples.js.map +1 -1
- package/dist/combobox/combobox.examples.json +11 -0
- package/dist/combobox/combobox2.js +76 -55
- package/dist/combobox/combobox2.js.map +1 -1
- package/dist/combobox/define.js +5 -3
- package/dist/combobox/define.js.map +1 -1
- package/dist/copy-button/copy-button2.js +2 -2
- package/dist/custom-elements-jsx.d.ts +9 -62
- package/dist/custom-elements-vue.d.ts +9 -62
- package/dist/custom-elements.json +61 -733
- package/dist/data.html.json +4 -42
- package/dist/date/date2.js +2 -2
- package/dist/date/define.js +5 -3
- package/dist/date/define.js.map +1 -1
- package/dist/datetime/datetime2.js +2 -2
- package/dist/datetime/define.js +5 -3
- package/dist/datetime/define.js.map +1 -1
- package/dist/dialog/dialog-footer2.js +2 -2
- package/dist/dialog/dialog-header2.js +2 -2
- package/dist/dialog/dialog2.js +2 -2
- package/dist/divider/divider2.js +2 -2
- package/dist/dot/dot2.js +2 -2
- package/dist/drawer/drawer-content2.js +2 -2
- package/dist/drawer/drawer-footer2.js +2 -2
- package/dist/drawer/drawer-header2.js +2 -2
- package/dist/drawer/drawer2.js +2 -2
- package/dist/dropdown/dropdown-footer2.js +2 -2
- package/dist/dropdown/dropdown-header2.js +2 -2
- package/dist/dropdown/dropdown2.js +2 -2
- package/dist/dropdown-group/dropdown-group.js +2 -2
- package/dist/dropzone/dropzone2.js +2 -2
- package/dist/file/define.js +5 -3
- package/dist/file/define.js.map +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/forms/control/control2.js +2 -2
- package/dist/forms/control-group/control-group2.js +2 -2
- package/dist/forms/control-message/control-message2.js +2 -2
- package/dist/grid/cell/cell2.js +1 -1
- package/dist/grid/column/column.d.ts +1 -0
- package/dist/grid/column/column2.js +5 -2
- package/dist/grid/column/column2.js.map +1 -1
- package/dist/grid/footer/footer2.js +2 -2
- package/dist/grid/grid2.js +2 -2
- package/dist/grid/header/header2.js +2 -2
- package/dist/grid/placeholder/placeholder2.js +1 -1
- package/dist/grid/row/row2.js +2 -2
- package/dist/icon/icon2.js +3 -3
- package/dist/icon-button/icon-button2.js +2 -2
- package/dist/index.js +1 -1
- package/dist/input/define.js +6 -3
- package/dist/input/define.js.map +1 -1
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +2 -2
- package/dist/internal/base/button.js +1 -1
- package/dist/internal/index.js +40 -40
- package/dist/internal/services/global.service.js +1 -1
- package/dist/internal/utils/dom.d.ts +2 -0
- package/dist/internal/utils/dom.js +51 -51
- package/dist/internal/utils/dom.js.map +1 -1
- package/dist/logo/logo2.js +2 -2
- package/dist/menu/menu-item2.js +2 -2
- package/dist/menu/menu.d.ts +3 -0
- package/dist/menu/menu2.js +23 -2
- package/dist/menu/menu2.js.map +1 -1
- package/dist/month/define.js +5 -3
- package/dist/month/define.js.map +1 -1
- package/dist/month/month2.js +2 -2
- package/dist/notification/notification-group2.js +2 -2
- package/dist/notification/notification2.js +2 -2
- package/dist/page/page-panel/page-panel-content2.js +1 -1
- package/dist/page/page-panel/page-panel-footer2.js +2 -2
- package/dist/page/page-panel/page-panel-header2.js +2 -2
- package/dist/page/page-panel/page-panel2.js +2 -2
- package/dist/page/page.examples.js.map +1 -1
- package/dist/page/page2.js +2 -2
- package/dist/page-header/page-header.examples.js.map +1 -1
- package/dist/page-header/page-header2.js +1 -1
- package/dist/page-loader/page-loader.js +1 -1
- package/dist/page-loader/page-loader.js.map +1 -1
- package/dist/page-loader/page-loader2.js +2 -2
- package/dist/pagination/pagination2.js +2 -2
- package/dist/panel/panel2.js +5 -5
- package/dist/password/define.js +5 -3
- package/dist/password/define.js.map +1 -1
- package/dist/password/password2.js +2 -2
- package/dist/preferences-input/preferences-input2.js +2 -2
- package/dist/progress-bar/progress-bar2.js +2 -2
- package/dist/progress-ring/progress-ring2.js +2 -2
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +2 -2
- package/dist/pulse/pulse2.js +2 -2
- package/dist/radio/define.js +6 -3
- package/dist/radio/define.js.map +1 -1
- package/dist/radio/radio-group2.js +2 -2
- package/dist/radio/radio2.js +2 -2
- package/dist/range/define.js +5 -3
- package/dist/range/define.js.map +1 -1
- package/dist/range/range2.js +2 -2
- package/dist/resize-handle/resize-handle2.js +2 -2
- package/dist/search/define.js +5 -3
- package/dist/search/define.js.map +1 -1
- package/dist/search/search2.js +2 -2
- package/dist/select/define.js +5 -3
- package/dist/select/define.js.map +1 -1
- package/dist/select/select2.js +2 -2
- package/dist/skeleton/skeleton2.js +2 -2
- package/dist/sort-button/sort-button2.js +2 -2
- package/dist/sparkline/sparkline.utils.js +2 -8
- package/dist/sparkline/sparkline.utils.js.map +1 -1
- package/dist/sparkline/sparkline2.js +2 -2
- package/dist/star-rating/define.js +5 -3
- package/dist/star-rating/define.js.map +1 -1
- package/dist/star-rating/star-rating2.js +2 -2
- package/dist/steps/steps2.js +3 -3
- package/dist/switch/define.js +6 -3
- package/dist/switch/define.js.map +1 -1
- package/dist/switch/switch-group2.js +2 -2
- package/dist/switch/switch2.js +2 -2
- package/dist/tabs/tabs2.js +3 -3
- package/dist/tag/tag2.js +2 -2
- package/dist/textarea/define.js +5 -3
- package/dist/textarea/define.js.map +1 -1
- package/dist/textarea/textarea2.js +1 -1
- package/dist/time/define.js +5 -3
- package/dist/time/define.js.map +1 -1
- package/dist/time/time2.js +2 -2
- package/dist/toast/toast2.js +2 -2
- package/dist/toggletip/toggletip-footer2.js +2 -2
- package/dist/toggletip/toggletip-header2.js +2 -2
- package/dist/toggletip/toggletip2.js +2 -2
- package/dist/toolbar/toolbar2.js +2 -2
- package/dist/tooltip/tooltip2.js +2 -2
- package/dist/tree/tree-node2.js +2 -2
- package/dist/tree/tree2.js +2 -2
- package/dist/week/define.js +5 -3
- package/dist/week/define.js.map +1 -1
- package/dist/week/week2.js +2 -2
- package/package.json +10 -36
- package/dist/app-header/app-header.d.ts +0 -39
- package/dist/app-header/app-header.js +0 -6
- package/dist/app-header/app-header.js.map +0 -1
- package/dist/app-header/app-header2.js +0 -54
- package/dist/app-header/app-header2.js.map +0 -1
- package/dist/app-header/define.d.ts +0 -6
- package/dist/app-header/define.js +0 -7
- package/dist/app-header/define.js.map +0 -1
- package/dist/app-header/index.d.ts +0 -1
- package/dist/app-header/index.js +0 -2
- package/dist/bundles/audit-logs.js +0 -50
- package/dist/bundles/icons.js +0 -285
- package/dist/bundles/index.css +0 -2
- package/dist/bundles/log.service.js +0 -90
- package/dist/bundles/rolldown-runtime.js +0 -11
- package/dist/css/module.layout.css +0 -1
- package/dist/css/module.typography.css +0 -1
- package/dist/index.css +0 -1
- package/dist/json-viewer/define.d.ts +0 -8
- package/dist/json-viewer/define.js +0 -8
- package/dist/json-viewer/define.js.map +0 -1
- package/dist/json-viewer/index.d.ts +0 -2
- package/dist/json-viewer/index.js +0 -3
- package/dist/json-viewer/json-viewer.d.ts +0 -25
- package/dist/json-viewer/json-viewer.js +0 -6
- package/dist/json-viewer/json-viewer.js.map +0 -1
- package/dist/json-viewer/json-viewer2.js +0 -39
- package/dist/json-viewer/json-viewer2.js.map +0 -1
- package/dist/json-viewer/node/node.d.ts +0 -21
- package/dist/json-viewer/node/node.js +0 -6
- package/dist/json-viewer/node/node.js.map +0 -1
- package/dist/json-viewer/node/node2.js +0 -72
- package/dist/json-viewer/node/node2.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column2.js","names":["#grid","#computeColumnAlignment","#computeColumnPositions","#positionStylesheet","#buildFixedStyles","#buildBorderStyle"],"sources":["../../../src/grid/column/column.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 { useStyles, attachInternals, appendRootNodeStyle, tagSelector } from '@nvidia-elements/core/internal';\nimport type { Grid } from '@nvidia-elements/core/grid';\nimport styles from './column.css?inline';\n\n/**\n * @element nve-grid-column\n * @description Defines a column header within a grid, specifying the column's label, width, and alignment for all cells beneath it.\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/grid\n * @slot - default slot for content\n * @slot actions - slot for column actions\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --font-weight\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --min-width\n * @cssprop --justify-content\n * @cssprop --border-left\n * @cssprop --border-right\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/grid/\n */\nexport class GridColumn extends LitElement {\n /**\n * Only set a fixed px width when you know the grid width. Most cases this should remain unset.\n * If the total width of all columns is less than the grid width then the last column fills the remaining space.\n * By default column widths are evenly divided unless width is explicitly provided.\n */\n @property({ type: String, reflect: true }) width: string;\n\n /**\n * Set the `position` property or attribute to `fixed` or `sticky` to make the column fixed or sticky.\n * Fixed columns do not scroll horizontally with the grid. Sticky columns scroll horizontally with the grid\n * until the column reaches the edge of the grid.\n */\n @property({ type: String, reflect: true }) position: 'fixed' | 'sticky' | '';\n\n /**\n * Control the content alignment within a given column.\n */\n @property({ type: String, reflect: true, attribute: 'column-align' }) columnAlign: 'start' | 'center' | 'end';\n\n /**\n * @private\n */\n @property({ type: String, reflect: true, attribute: 'aria-colindex' }) ariaColIndex: string; // eslint-disable-line local/reserved-property-names\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-grid-column',\n version: '0.0.0'\n };\n\n /** @private */\n declare _internals: ElementInternals;\n\n get #grid() {\n return this.parentElement!.parentElement as Grid;\n }\n\n render() {\n return html`\n <div internal-host focusable=\"active\">\n <slot></slot>\n <slot name=\"actions\"></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'columnheader';\n this.addEventListener('sort', ((e: CustomEvent) => (this.ariaSort = e.detail.next)) as EventListener);\n }\n\n async updated(props: PropertyValues<this>) {\n super.updated(props);\n\n if (props.get('columnAlign') !== this.columnAlign) {\n this.#computeColumnAlignment();\n }\n\n if (props.get('position') !== this.position) {\n this.#computeColumnPositions();\n }\n\n if (props.get('ariaColIndex') !== this.ariaColIndex) {\n this.#computeColumnPositions();\n this.#computeColumnAlignment();\n }\n\n if (props.get('width') !== this.width) {\n this.dispatchEvent(new CustomEvent('nve-grid-column-resize', { bubbles: true, composed: true }));\n }\n }\n\n #positionStylesheet: CSSStyleSheet;\n\n #computeColumnPositions() {\n if (this.position !== 'fixed') {\n this.removeAttribute('left');\n this.removeAttribute('right');\n this.#positionStylesheet?.replaceSync('');\n return;\n }\n\n const { side, positionStyle, borderStyle } = this.#buildFixedStyles();\n const combinedStyle = `${positionStyle}\\n${borderStyle}`;\n\n if (this.#positionStylesheet) {\n this.#positionStylesheet.replaceSync(combinedStyle);\n } else {\n this.#positionStylesheet = appendRootNodeStyle(this.#grid, combinedStyle);\n }\n\n this.setAttribute(side, '');\n }\n\n #buildFixedStyles() {\n const columns = Array.from(this.parentElement!.querySelectorAll<GridColumn>(tagSelector(GridColumn.metadata.tag)));\n const rightColumns = columns.slice(columns.indexOf(this) + 1, columns.length);\n const position = this.getBoundingClientRect();\n const gridPosition = this.#grid.getBoundingClientRect();\n const side = this.offsetLeft < gridPosition.width / 2 ? 'left' : 'right';\n const leftStyle = position.left - gridPosition.left;\n const rightStyle = rightColumns.reduce((width, c) => width + c.getBoundingClientRect().width, 0);\n const selector = `[id='${this.#grid.id}'] nve-grid-column:nth-of-type(${this.ariaColIndex}),\n [id='${this.#grid.id}'] nve-grid-cell:nth-of-type(${this.ariaColIndex})`;\n\n const positionStyle = `\n ${selector} {\n position: sticky;\n z-index: 99;\n ${side === 'left' ? `left: ${leftStyle}px;` : `right: ${rightStyle}px;`}\n }\n `;\n\n const borderStyle = this.#buildBorderStyle(selector, side);\n return { side, positionStyle, borderStyle };\n }\n\n #buildBorderStyle(selector: string, side: 'left' | 'right') {\n const isLastLeft = side === 'left' && (this.nextElementSibling as GridColumn)?.position !== this.position;\n const isLastRight = side === 'right' && (this.previousElementSibling as GridColumn)?.position !== this.position;\n\n if (!isLastLeft && !isLastRight) {\n return '';\n }\n\n return `\n ${selector} {\n box-shadow: var(--scroll-shadow);\n clip-path: inset(0px ${isLastLeft ? '-4px' : '0'} 0px ${isLastRight ? '-4px' : '0'});\n --border-${side === 'right' ? 'left' : 'right'}: var(--nve-ref-border-width-sm) solid var(--nve-ref-border-color-muted);\n }\n `;\n }\n\n #computeColumnAlignment() {\n if (this.columnAlign !== undefined) {\n appendRootNodeStyle(\n this.#grid,\n `[id='${this.#grid.id}'] nve-grid-column:nth-of-type(${this.ariaColIndex}),\n [id='${this.#grid.id}'] nve-grid-cell:nth-of-type(${this.ariaColIndex}) {\n --justify-content: ${this.columnAlign}\n }`\n );\n }\n }\n}\n"],"mappings":";;;;;;;;AA4BA,IAAa,IAAb,MAAa,UAAmB,EAAW;;gBAyBzB,EAAU,CAAC,EAAO,CAAC;;;kBAER;GACzB,KAAK;GACL,SAAS;GACV;;CAKD,KAAA,IAAY;AACV,SAAO,KAAK,cAAe;;CAG7B,SAAS;AACP,SAAO,CAAI;;CAQb,oBAAoB;AAIlB,EAHA,MAAM,mBAAmB,EACzB,EAAgB,KAAK,EACrB,KAAK,WAAW,OAAO,gBACvB,KAAK,iBAAiB,UAAU,MAAoB,KAAK,WAAW,EAAE,OAAO,MAAwB;;CAGvG,MAAM,QAAQ,GAA6B;AAgBzC,EAfA,MAAM,QAAQ,EAAM,EAEhB,EAAM,IAAI,cAAc,KAAK,KAAK,eACpC,MAAA,GAA8B,EAG5B,EAAM,IAAI,WAAW,KAAK,KAAK,YACjC,MAAA,GAA8B,EAG5B,EAAM,IAAI,eAAe,KAAK,KAAK,iBACrC,MAAA,GAA8B,EAC9B,MAAA,GAA8B,GAG5B,EAAM,IAAI,QAAQ,KAAK,KAAK,SAC9B,KAAK,cAAc,IAAI,YAAY,0BAA0B;GAAE,SAAS;GAAM,UAAU;GAAM,CAAC,CAAC;;CAIpG;CAEA,KAA0B;AACxB,MAAI,KAAK,aAAa,SAAS;AAG7B,GAFA,KAAK,gBAAgB,OAAO,EAC5B,KAAK,gBAAgB,QAAQ,EAC7B,MAAA,GAA0B,YAAY,GAAG;AACzC;;EAGF,IAAM,EAAE,SAAM,kBAAe,mBAAgB,MAAA,GAAwB,EAC/D,IAAgB,GAAG,EAAc,IAAI;AAQ3C,EANI,MAAA,IACF,MAAA,EAAyB,YAAY,EAAc,GAEnD,MAAA,IAA2B,EAAoB,MAAA,GAAY,EAAc,EAG3E,KAAK,aAAa,GAAM,GAAG;;CAG7B,KAAoB;EAClB,IAAM,IAAU,MAAM,KAAK,KAAK,cAAe,iBAA6B,EAAY,EAAW,SAAS,IAAI,CAAC,CAAC,EAC5G,IAAe,EAAQ,MAAM,EAAQ,QAAQ,KAAK,GAAG,GAAG,EAAQ,OAAO,EACvE,IAAW,KAAK,uBAAuB,EACvC,IAAe,MAAA,EAAW,uBAAuB,EACjD,IAAO,KAAK,aAAa,EAAa,QAAQ,IAAI,SAAS,SAC3D,IAAY,EAAS,OAAO,EAAa,MACzC,IAAa,EAAa,QAAQ,GAAO,MAAM,IAAQ,EAAE,uBAAuB,CAAC,OAAO,EAAE,EAC1F,IAAW,QAAQ,MAAA,EAAW,GAAG,iCAAiC,KAAK,aAAa;eAC/E,MAAA,EAAW,GAAG,+BAA+B,KAAK,aAAa;AAW1E,SAAO;GAAE;GAAM,eATO;UAChB,EAAS;;;YAGP,MAAS,SAAS,SAAS,EAAU,OAAO,UAAU,EAAW,KAAA;;;GAK3C,aADV,MAAA,EAAuB,GAAU,EAAK;GACf;;CAG7C,GAAkB,GAAkB,GAAwB;EAC1D,IAAM,IAAa,MAAS,UAAW,KAAK,oBAAmC,aAAa,KAAK,UAC3F,IAAc,MAAS,WAAY,KAAK,wBAAuC,aAAa,KAAK;AAMvG,SAJI,CAAC,KAAc,CAAC,IACX,KAGF;UACD,EAAS;;iCAEc,IAAa,SAAS,IAAI,OAAO,IAAc,SAAS,IAAI;qBACxE,MAAS,UAAU,SAAS,QAAQ;;;;CAKvD,KAA0B;AACxB,EAAI,KAAK,gBAAgB,KAAA,KACvB,EACE,MAAA,GACA,QAAQ,MAAA,EAAW,GAAG,iCAAiC,KAAK,aAAa;eAClE,MAAA,EAAW,GAAG,+BAA+B,KAAK,aAAa;+BAC/C,KAAK,YAAA;WAE7B;;;
|
|
1
|
+
{"version":3,"file":"column2.js","names":["#grid","#computeColumnAlignment","#computeColumnPositions","#positionStylesheet","#buildFixedStyles","#buildBorderStyle"],"sources":["../../../src/grid/column/column.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 { useStyles, attachInternals, appendRootNodeStyle, tagSelector } from '@nvidia-elements/core/internal';\nimport type { Grid } from '@nvidia-elements/core/grid';\nimport styles from './column.css?inline';\n\n/**\n * @element nve-grid-column\n * @description Defines a column header within a grid, specifying the column's label, width, and alignment for all cells beneath it.\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/grid\n * @slot - default slot for content\n * @slot actions - slot for column actions\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --font-weight\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --min-width\n * @cssprop --justify-content\n * @cssprop --border-left\n * @cssprop --border-right\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/grid/\n */\nexport class GridColumn extends LitElement {\n /**\n * Only set a fixed px width when you know the grid width. Most cases this should remain unset.\n * If the total width of all columns is less than the grid width then the last column fills the remaining space.\n * By default column widths are evenly divided unless width is explicitly provided.\n */\n @property({ type: String, reflect: true }) width: string;\n\n /**\n * Set the `position` property or attribute to `fixed` or `sticky` to make the column fixed or sticky.\n * Fixed columns do not scroll horizontally with the grid. Sticky columns scroll horizontally with the grid\n * until the column reaches the edge of the grid.\n */\n @property({ type: String, reflect: true }) position: 'fixed' | 'sticky' | '';\n\n /**\n * Control the content alignment within a given column.\n */\n @property({ type: String, reflect: true, attribute: 'column-align' }) columnAlign: 'start' | 'center' | 'end';\n\n /**\n * @private\n */\n @property({ type: String, reflect: true, attribute: 'aria-colindex' }) ariaColIndex: string; // eslint-disable-line local/reserved-property-names\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-grid-column',\n version: '0.0.0'\n };\n\n /** @private */\n declare _internals: ElementInternals;\n\n get #grid() {\n return this.parentElement!.parentElement as Grid;\n }\n\n render() {\n return html`\n <div internal-host focusable=\"active\">\n <slot></slot>\n <slot name=\"actions\"></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'columnheader';\n this.addEventListener('sort', ((e: CustomEvent) => (this.ariaSort = e.detail.next)) as EventListener);\n }\n\n willUpdate(props: PropertyValues<this>) {\n if (props.has('width') && this.width && Number.isFinite(Number(this.width))) {\n this.width = `${this.width}px`; // eslint-disable-line local/stateless-property\n }\n }\n\n async updated(props: PropertyValues<this>) {\n super.updated(props);\n\n if (props.get('columnAlign') !== this.columnAlign) {\n this.#computeColumnAlignment();\n }\n\n if (props.get('position') !== this.position) {\n this.#computeColumnPositions();\n }\n\n if (props.get('ariaColIndex') !== this.ariaColIndex) {\n this.#computeColumnPositions();\n this.#computeColumnAlignment();\n }\n\n if (props.get('width') !== this.width) {\n this.dispatchEvent(new CustomEvent('nve-grid-column-resize', { bubbles: true, composed: true }));\n }\n }\n\n #positionStylesheet: CSSStyleSheet;\n\n #computeColumnPositions() {\n if (this.position !== 'fixed') {\n this.removeAttribute('left');\n this.removeAttribute('right');\n this.#positionStylesheet?.replaceSync('');\n return;\n }\n\n const { side, positionStyle, borderStyle } = this.#buildFixedStyles();\n const combinedStyle = `${positionStyle}\\n${borderStyle}`;\n\n if (this.#positionStylesheet) {\n this.#positionStylesheet.replaceSync(combinedStyle);\n } else {\n this.#positionStylesheet = appendRootNodeStyle(this.#grid, combinedStyle);\n }\n\n this.setAttribute(side, '');\n }\n\n #buildFixedStyles() {\n const columns = Array.from(this.parentElement!.querySelectorAll<GridColumn>(tagSelector(GridColumn.metadata.tag)));\n const rightColumns = columns.slice(columns.indexOf(this) + 1, columns.length);\n const position = this.getBoundingClientRect();\n const gridPosition = this.#grid.getBoundingClientRect();\n const side = this.offsetLeft < gridPosition.width / 2 ? 'left' : 'right';\n const leftStyle = position.left - gridPosition.left;\n const rightStyle = rightColumns.reduce((width, c) => width + c.getBoundingClientRect().width, 0);\n const selector = `[id='${this.#grid.id}'] nve-grid-column:nth-of-type(${this.ariaColIndex}),\n [id='${this.#grid.id}'] nve-grid-cell:nth-of-type(${this.ariaColIndex})`;\n\n const positionStyle = `\n ${selector} {\n position: sticky;\n z-index: 99;\n ${side === 'left' ? `left: ${leftStyle}px;` : `right: ${rightStyle}px;`}\n }\n `;\n\n const borderStyle = this.#buildBorderStyle(selector, side);\n return { side, positionStyle, borderStyle };\n }\n\n #buildBorderStyle(selector: string, side: 'left' | 'right') {\n const isLastLeft = side === 'left' && (this.nextElementSibling as GridColumn)?.position !== this.position;\n const isLastRight = side === 'right' && (this.previousElementSibling as GridColumn)?.position !== this.position;\n\n if (!isLastLeft && !isLastRight) {\n return '';\n }\n\n return `\n ${selector} {\n box-shadow: var(--scroll-shadow);\n clip-path: inset(0px ${isLastLeft ? '-4px' : '0'} 0px ${isLastRight ? '-4px' : '0'});\n --border-${side === 'right' ? 'left' : 'right'}: var(--nve-ref-border-width-sm) solid var(--nve-ref-border-color-muted);\n }\n `;\n }\n\n #computeColumnAlignment() {\n if (this.columnAlign !== undefined) {\n appendRootNodeStyle(\n this.#grid,\n `[id='${this.#grid.id}'] nve-grid-column:nth-of-type(${this.ariaColIndex}),\n [id='${this.#grid.id}'] nve-grid-cell:nth-of-type(${this.ariaColIndex}) {\n --justify-content: ${this.columnAlign}\n }`\n );\n }\n }\n}\n"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { attachInternals as e } from "../../internal/utils/a11y.js";
|
|
2
|
-
import { __decorate as t } from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import { __decorate as t } from "../../_virtual/_@oxc-project_runtime@0.123.0/helpers/decorate.js";
|
|
3
3
|
import { hostAttr as n } from "../../internal/decorators/host-attr.js";
|
|
4
4
|
import { useStyles as r } from "../../internal/styles/index.js";
|
|
5
5
|
import i from "./footer.js";
|
|
@@ -15,7 +15,7 @@ var s = class extends a {
|
|
|
15
15
|
static {
|
|
16
16
|
this.metadata = {
|
|
17
17
|
tag: "nve-grid-footer",
|
|
18
|
-
version: "0.0.
|
|
18
|
+
version: "0.0.3"
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
static {
|
package/dist/grid/grid2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { appendRootNodeStyle as e, generateId as t, tagSelector as n } from "../internal/utils/dom.js";
|
|
2
2
|
import { attachInternals as r } from "../internal/utils/a11y.js";
|
|
3
|
-
import { __decorate as i } from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import { __decorate as i } from "../_virtual/_@oxc-project_runtime@0.123.0/helpers/decorate.js";
|
|
4
4
|
import { audit as a } from "../internal/controllers/audit.controller.js";
|
|
5
5
|
import { keyNavigationGrid as o } from "../internal/controllers/keynav-grid.controller.js";
|
|
6
6
|
import { useStyles as s } from "../internal/styles/index.js";
|
|
@@ -22,7 +22,7 @@ var y = class extends g {
|
|
|
22
22
|
static {
|
|
23
23
|
this.metadata = {
|
|
24
24
|
tag: "nve-grid",
|
|
25
|
-
version: "0.0.
|
|
25
|
+
version: "0.0.3",
|
|
26
26
|
children: [
|
|
27
27
|
d.metadata.tag,
|
|
28
28
|
f.metadata.tag,
|
|
@@ -3,7 +3,7 @@ import { tagSelector as t } from "../../internal/utils/dom.js";
|
|
|
3
3
|
import { attachInternals as n } from "../../internal/utils/a11y.js";
|
|
4
4
|
import { debounce as r } from "../../internal/utils/events.js";
|
|
5
5
|
import { LogService as i } from "../../internal/services/log.service.js";
|
|
6
|
-
import { __decorate as a } from "../../_virtual/_@oxc-project_runtime@0.
|
|
6
|
+
import { __decorate as a } from "../../_virtual/_@oxc-project_runtime@0.123.0/helpers/decorate.js";
|
|
7
7
|
import { audit as o } from "../../internal/controllers/audit.controller.js";
|
|
8
8
|
import { useStyles as s } from "../../internal/styles/index.js";
|
|
9
9
|
import c from "./header.js";
|
|
@@ -20,7 +20,7 @@ var h = class extends f {
|
|
|
20
20
|
static {
|
|
21
21
|
this.metadata = {
|
|
22
22
|
tag: "nve-grid-header",
|
|
23
|
-
version: "0.0.
|
|
23
|
+
version: "0.0.3",
|
|
24
24
|
children: [l.metadata.tag]
|
|
25
25
|
};
|
|
26
26
|
}
|
package/dist/grid/row/row2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { attachInternals as e } from "../../internal/utils/a11y.js";
|
|
2
2
|
import { stateSelected as t } from "../../internal/controllers/state-selected.controller.js";
|
|
3
|
-
import { __decorate as n } from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import { __decorate as n } from "../../_virtual/_@oxc-project_runtime@0.123.0/helpers/decorate.js";
|
|
4
4
|
import { audit as r } from "../../internal/controllers/audit.controller.js";
|
|
5
5
|
import { useStyles as i } from "../../internal/styles/index.js";
|
|
6
6
|
import { GridCell as a } from "../cell/cell2.js";
|
|
@@ -15,7 +15,7 @@ var u = class extends s {
|
|
|
15
15
|
static {
|
|
16
16
|
this.metadata = {
|
|
17
17
|
tag: "nve-grid-row",
|
|
18
|
-
version: "0.0.
|
|
18
|
+
version: "0.0.3",
|
|
19
19
|
children: [a.metadata.tag]
|
|
20
20
|
};
|
|
21
21
|
}
|
package/dist/icon/icon2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parseVersion as e } from "../internal/utils/objects.js";
|
|
2
2
|
import { attachInternals as t } from "../internal/utils/a11y.js";
|
|
3
|
-
import { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.123.0/helpers/decorate.js";
|
|
4
4
|
import { useStyles as r } from "../internal/styles/index.js";
|
|
5
5
|
import { ICON_IMPORTS as i } from "./icons.js";
|
|
6
6
|
import a from "./icon.js";
|
|
@@ -16,7 +16,7 @@ var f = class e extends o {
|
|
|
16
16
|
static {
|
|
17
17
|
this.metadata = {
|
|
18
18
|
tag: "nve-icon",
|
|
19
|
-
version: "0.0.
|
|
19
|
+
version: "0.0.3"
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
@@ -86,7 +86,7 @@ n([l({
|
|
|
86
86
|
})], f.prototype, "name", void 0), n([d()], f.prototype, "svg", void 0);
|
|
87
87
|
function p(t) {
|
|
88
88
|
if (typeof globalThis.customElements?.get == "function") {
|
|
89
|
-
let n = e(t.metadata.version), r = e("0.0.
|
|
89
|
+
let n = e(t.metadata.version), r = e("0.0.3");
|
|
90
90
|
n.minor <= r.minor && n.major <= r.major && (t._icons = {
|
|
91
91
|
...t._icons,
|
|
92
92
|
...i
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { removeEmptySlotWhitespace as e } from "../internal/utils/dom.js";
|
|
2
|
-
import { __decorate as t } from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import { __decorate as t } from "../_virtual/_@oxc-project_runtime@0.123.0/helpers/decorate.js";
|
|
3
3
|
import { scopedRegistry as n } from "../internal/decorators/scoped-registry.js";
|
|
4
4
|
import { useStyles as r } from "../internal/styles/index.js";
|
|
5
5
|
import { Icon as i } from "../icon/icon2.js";
|
|
@@ -15,7 +15,7 @@ var l = class extends a {
|
|
|
15
15
|
static {
|
|
16
16
|
this.metadata = {
|
|
17
17
|
tag: "nve-icon-button",
|
|
18
|
-
version: "0.0.
|
|
18
|
+
version: "0.0.3"
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
static {
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { getThemeTokens as e } from "./internal/utils/dom.js";
|
|
|
2
2
|
import { I18nService as t } from "./internal/services/i18n.service.js";
|
|
3
3
|
import { statusIcons as n } from "./internal/types/index.js";
|
|
4
4
|
//#region src/index.ts
|
|
5
|
-
var r = "0.0.
|
|
5
|
+
var r = "0.0.3", i = "@nvidia-elements";
|
|
6
6
|
//#endregion
|
|
7
7
|
export { t as I18nService, i as SCOPE, r as VERSION, e as getThemeTokens, n as statusIcons };
|
|
8
8
|
|
package/dist/input/define.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { define as e } from "../internal/utils/dom.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { ControlMessage as t } from "../forms/control-message/control-message2.js";
|
|
3
|
+
import { Control as n } from "../forms/control/control2.js";
|
|
4
|
+
import { ControlGroup as r } from "../forms/control-group/control-group2.js";
|
|
5
|
+
import { Input as i } from "./input2.js";
|
|
6
|
+
import { InputGroup as a } from "./input-group2.js";
|
|
7
|
+
e(i), e(a), e(n), e(r), e(t);
|
|
5
8
|
//#endregion
|
|
6
9
|
|
|
7
10
|
//# sourceMappingURL=define.js.map
|
package/dist/input/define.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.js","names":[],"sources":["../../src/input/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/core/internal';\nimport { Input, InputGroup } from '@nvidia-elements/core/input';\nimport '@nvidia-elements/core/forms
|
|
1
|
+
{"version":3,"file":"define.js","names":[],"sources":["../../src/input/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/core/internal';\nimport { Input, InputGroup } from '@nvidia-elements/core/input';\nimport { Control, ControlGroup, ControlMessage } from '@nvidia-elements/core/forms';\n\ndefine(Input);\ndefine(InputGroup);\ndefine(Control);\ndefine(ControlGroup);\ndefine(ControlMessage);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-input': Input;\n 'nve-input-group': InputGroup;\n }\n}\n"],"mappings":";;;;;;AAOA,EAAO,EAAM,EACb,EAAO,EAAW,EAClB,EAAO,EAAQ,EACf,EAAO,EAAa,EACpB,EAAO,EAAe"}
|
package/dist/input/input2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __decorate as e } from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import { __decorate as e } from "../_virtual/_@oxc-project_runtime@0.123.0/helpers/decorate.js";
|
|
2
2
|
import { useStyles as t } from "../internal/styles/index.js";
|
|
3
3
|
import { Control as n } from "../forms/control/control2.js";
|
|
4
4
|
import r from "./input.js";
|
|
@@ -14,7 +14,7 @@ var a = r, o = class extends n {
|
|
|
14
14
|
static {
|
|
15
15
|
this.metadata = {
|
|
16
16
|
tag: "nve-input",
|
|
17
|
-
version: "0.0.
|
|
17
|
+
version: "0.0.3"
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
};
|
|
@@ -11,7 +11,7 @@ import { typeNativePopoverTrigger as l } from "../controllers/type-native-popove
|
|
|
11
11
|
import { stateCurrent as u } from "../controllers/state-current.controller.js";
|
|
12
12
|
import { typeCommand as d } from "../controllers/type-command.controller.js";
|
|
13
13
|
import { typeInterest as f } from "../controllers/type-interest.controller.js";
|
|
14
|
-
import { __decorate as p } from "../../_virtual/_@oxc-project_runtime@0.
|
|
14
|
+
import { __decorate as p } from "../../_virtual/_@oxc-project_runtime@0.123.0/helpers/decorate.js";
|
|
15
15
|
import { LitElement as m, html as h, isServer as g } from "lit";
|
|
16
16
|
import { property as _ } from "lit/decorators/property.js";
|
|
17
17
|
//#region src/internal/base/button.ts
|
package/dist/internal/index.js
CHANGED
|
@@ -2,43 +2,43 @@ import { DOCS_URL as e, formatFileSize as t, shiftLeft as n } from "./utils/stri
|
|
|
2
2
|
import { deepMerge as r, formatStandardNumber as i, getDifference as a, isObject as o, isObjectLiteral as s, parseVersion as c } from "./utils/objects.js";
|
|
3
3
|
import { GlobalState as l, GlobalStateService as u } from "./services/global.service.js";
|
|
4
4
|
import { focusElement as d, focusElementTimeout as f, getActiveElement as p, initializeKeyListItems as m, isFocusable as h, isSimpleFocusable as g, onListboxActivate as _, setActiveKeyListItem as v } from "./utils/focus.js";
|
|
5
|
-
import { KeynavCode as y, appendAnchorName as b, appendRootNodeStyle as x, applySlotContentStates as S, clickOutsideElementBounds as C, createGhostElement as w, define as T, defineElement as E, endOfScrollBox as D, generateId as O, getAnchorNames as k, getAttributeChanges as A, getAttributeListChanges as j, getChildren as M, getDisplayValue as N, getElementUpdate as P, getFlattenedDOMTree as F, getFlattenedFocusableItems as I,
|
|
6
|
-
import { associateAriaDescribedBy as
|
|
7
|
-
import { StateActiveController as
|
|
8
|
-
import { StateDisabledController as
|
|
9
|
-
import { StateExpandedController as
|
|
10
|
-
import { StatePressedController as
|
|
11
|
-
import { StateSelectedController as
|
|
12
|
-
import { TypeButtonController as
|
|
13
|
-
import { TypeAnchorController as
|
|
14
|
-
import { debounce as
|
|
15
|
-
import { createLightDismiss as
|
|
16
|
-
import { TypeSubmitController as
|
|
17
|
-
import { LogService as
|
|
18
|
-
import { TypeNativePopoverTriggerController as
|
|
19
|
-
import { StateCurrentController as
|
|
20
|
-
import { TypeCommandController as
|
|
21
|
-
import { TypeInterestController as
|
|
22
|
-
import { BaseButton as
|
|
23
|
-
import { auditParentElement as
|
|
24
|
-
import { AuditController as
|
|
25
|
-
import { I18nService as
|
|
26
|
-
import { I18nController as
|
|
27
|
-
import { KeyNavigationGridController as
|
|
28
|
-
import { KeyNavigationListController as
|
|
29
|
-
import { StateHighlightedController as
|
|
30
|
-
import { StateScrollController as
|
|
31
|
-
import { TypeClosableController as
|
|
32
|
-
import { TypeExpandableController as
|
|
33
|
-
import { TypeSelectableController as
|
|
34
|
-
import { TypeNativePopoverController as
|
|
35
|
-
import { TypeSSRController as
|
|
36
|
-
import { NveTouchEvent as
|
|
37
|
-
import { hostAttr as
|
|
38
|
-
import { scopedRegistry as
|
|
39
|
-
import { colorStateStyles as
|
|
40
|
-
import { supportsCSSLegacyInsetArea as
|
|
41
|
-
import { popoverStyles as
|
|
42
|
-
import { TransitionService as
|
|
43
|
-
import { statusIcons as
|
|
44
|
-
export {
|
|
5
|
+
import { KeynavCode as y, appendAnchorName as b, appendRootNodeStyle as x, applySlotContentStates as S, clickOutsideElementBounds as C, createGhostElement as w, define as T, defineElement as E, endOfScrollBox as D, generateId as O, getAnchorNames as k, getAttributeChanges as A, getAttributeListChanges as j, getChildren as M, getDisplayValue as N, getElementUpdate as P, getFlattenedDOMTree as F, getFlattenedFocusableItems as I, getPropertyChanges as L, getThemeTokens as R, hasHorizontalScrollBar as z, hasInvalidDOMGrid as B, hasScrollBar as V, isContextMenuClick as H, matchesElementName as U, openEyeDropper as W, parseTokenNumber as G, removeAnchorName as K, removeEmptySlotWhitespace as q, removeEmptyTextNode as J, sameRenderRoot as Y, scrollBarWidth as X, slotContainsOnlyWhitespace as Z, styleSheetToString as Q, supportsScopedRegistry as $, tagSelector as ee, validKeyNavigationCode as te } from "./utils/dom.js";
|
|
6
|
+
import { associateAriaDescribedBy as ne, associateAriaLabel as re, associateControlGroup as ie, associateDataList as ae, associateLabel as oe, attachInternals as se } from "./utils/a11y.js";
|
|
7
|
+
import { StateActiveController as ce, stateActive as le } from "./controllers/state-active.controller.js";
|
|
8
|
+
import { StateDisabledController as ue, stateDisabled as de } from "./controllers/state-disabled.controller.js";
|
|
9
|
+
import { StateExpandedController as fe, stateExpanded as pe } from "./controllers/state-expanded.controller.js";
|
|
10
|
+
import { StatePressedController as me, statePressed as he } from "./controllers/state-pressed.controller.js";
|
|
11
|
+
import { StateSelectedController as ge, stateSelected as _e } from "./controllers/state-selected.controller.js";
|
|
12
|
+
import { TypeButtonController as ve, typeButton as ye } from "./controllers/type-button.controller.js";
|
|
13
|
+
import { TypeAnchorController as be, typeAnchor as xe } from "./controllers/type-anchor.controller.js";
|
|
14
|
+
import { debounce as Se, onChildListMutation as Ce, stopEvent as we, throttle as Te } from "./utils/events.js";
|
|
15
|
+
import { createLightDismiss as Ee, onKeys as De } from "./utils/keynav.js";
|
|
16
|
+
import { TypeSubmitController as Oe, typeSubmit as ke } from "./controllers/type-submit.controller.js";
|
|
17
|
+
import { LogService as Ae } from "./services/log.service.js";
|
|
18
|
+
import { TypeNativePopoverTriggerController as je, typeNativePopoverTrigger as Me } from "./controllers/type-native-popover-trigger.controller.js";
|
|
19
|
+
import { StateCurrentController as Ne, stateCurrent as Pe } from "./controllers/state-current.controller.js";
|
|
20
|
+
import { TypeCommandController as Fe, typeCommand as Ie } from "./controllers/type-command.controller.js";
|
|
21
|
+
import { TypeInterestController as Le, typeInterest as Re } from "./controllers/type-interest.controller.js";
|
|
22
|
+
import { BaseButton as ze } from "./base/button.js";
|
|
23
|
+
import { auditParentElement as Be, auditSlots as Ve } from "./utils/audit.js";
|
|
24
|
+
import { AuditController as He, audit as Ue, excessiveInstanceLimit as We } from "./controllers/audit.controller.js";
|
|
25
|
+
import { I18nService as Ge, I18nService_ as Ke } from "./services/i18n.service.js";
|
|
26
|
+
import { I18nController as qe, i18n as Je } from "./controllers/i18n.controller.js";
|
|
27
|
+
import { KeyNavigationGridController as Ye, getNextKeyGridItem as Xe, keyNavigationGrid as Ze } from "./controllers/keynav-grid.controller.js";
|
|
28
|
+
import { KeyNavigationListController as Qe, getNextKeyListItem as $e, keyNavigationList as et } from "./controllers/keynav-list.controller.js";
|
|
29
|
+
import { StateHighlightedController as tt, stateHighlighted as nt } from "./controllers/state-highlighted.controller.js";
|
|
30
|
+
import { StateScrollController as rt, stateScroll as it } from "./controllers/state-scroll.controller.js";
|
|
31
|
+
import { TypeClosableController as at } from "./controllers/type-closable.controller.js";
|
|
32
|
+
import { TypeExpandableController as ot } from "./controllers/type-expandable.controller.js";
|
|
33
|
+
import { TypeSelectableController as st } from "./controllers/type-selectable.controller.js";
|
|
34
|
+
import { TypeNativePopoverController as ct } from "./controllers/type-native-popover.controller.js";
|
|
35
|
+
import { TypeSSRController as lt, typeSSR as ut } from "./controllers/type-ssr.controller.js";
|
|
36
|
+
import { NveTouchEvent as dt, TypeTouchController as ft, typeTouch as pt } from "./controllers/type-touch.controller.js";
|
|
37
|
+
import { hostAttr as mt } from "./decorators/host-attr.js";
|
|
38
|
+
import { scopedRegistry as ht } from "./decorators/scoped-registry.js";
|
|
39
|
+
import { colorStateStyles as gt, statusStateStyles as _t, supportStateStyles as vt, useStyles as yt } from "./styles/index.js";
|
|
40
|
+
import { supportsCSSLegacyInsetArea as bt, supportsCSSPositionArea as xt, supportsNativeCSSAnchorPosition as St } from "./utils/supports.js";
|
|
41
|
+
import { popoverStyles as Ct } from "./styles/popover2.js";
|
|
42
|
+
import { TransitionService as wt } from "./services/transition.service.js";
|
|
43
|
+
import { statusIcons as Tt } from "./types/index.js";
|
|
44
|
+
export { He as AuditController, ze as BaseButton, e as DOCS_URL, l as GlobalState, u as GlobalStateService, qe as I18nController, Ge as I18nService, Ke as I18nService_, Ye as KeyNavigationGridController, Qe as KeyNavigationListController, y as KeynavCode, Ae as LogService, dt as NveTouchEvent, ce as StateActiveController, Ne as StateCurrentController, ue as StateDisabledController, fe as StateExpandedController, tt as StateHighlightedController, me as StatePressedController, rt as StateScrollController, ge as StateSelectedController, wt as TransitionService, be as TypeAnchorController, ve as TypeButtonController, at as TypeClosableController, Fe as TypeCommandController, ot as TypeExpandableController, Le as TypeInterestController, ct as TypeNativePopoverController, je as TypeNativePopoverTriggerController, lt as TypeSSRController, st as TypeSelectableController, Oe as TypeSubmitController, ft as TypeTouchController, b as appendAnchorName, x as appendRootNodeStyle, S as applySlotContentStates, ne as associateAriaDescribedBy, re as associateAriaLabel, ie as associateControlGroup, ae as associateDataList, oe as associateLabel, se as attachInternals, Ue as audit, Be as auditParentElement, Ve as auditSlots, C as clickOutsideElementBounds, gt as colorStateStyles, w as createGhostElement, Ee as createLightDismiss, Se as debounce, r as deepMerge, T as define, E as defineElement, D as endOfScrollBox, We as excessiveInstanceLimit, d as focusElement, f as focusElementTimeout, t as formatFileSize, i as formatStandardNumber, O as generateId, p as getActiveElement, k as getAnchorNames, A as getAttributeChanges, j as getAttributeListChanges, M as getChildren, a as getDifference, N as getDisplayValue, P as getElementUpdate, F as getFlattenedDOMTree, I as getFlattenedFocusableItems, Xe as getNextKeyGridItem, $e as getNextKeyListItem, L as getPropertyChanges, R as getThemeTokens, z as hasHorizontalScrollBar, B as hasInvalidDOMGrid, V as hasScrollBar, mt as hostAttr, Je as i18n, m as initializeKeyListItems, H as isContextMenuClick, h as isFocusable, o as isObject, s as isObjectLiteral, g as isSimpleFocusable, Ze as keyNavigationGrid, et as keyNavigationList, U as matchesElementName, Ce as onChildListMutation, De as onKeys, _ as onListboxActivate, W as openEyeDropper, G as parseTokenNumber, c as parseVersion, Ct as popoverStyles, K as removeAnchorName, q as removeEmptySlotWhitespace, J as removeEmptyTextNode, Y as sameRenderRoot, ht as scopedRegistry, X as scrollBarWidth, v as setActiveKeyListItem, n as shiftLeft, Z as slotContainsOnlyWhitespace, le as stateActive, Pe as stateCurrent, de as stateDisabled, pe as stateExpanded, nt as stateHighlighted, he as statePressed, it as stateScroll, _e as stateSelected, Tt as statusIcons, _t as statusStateStyles, we as stopEvent, Q as styleSheetToString, vt as supportStateStyles, bt as supportsCSSLegacyInsetArea, xt as supportsCSSPositionArea, St as supportsNativeCSSAnchorPosition, $ as supportsScopedRegistry, ee as tagSelector, Te as throttle, xe as typeAnchor, ye as typeButton, Ie as typeCommand, Re as typeInterest, Me as typeNativePopoverTrigger, ut as typeSSR, ke as typeSubmit, pt as typeTouch, yt as useStyles, te as validKeyNavigationCode };
|
|
@@ -19,7 +19,7 @@ var a = class {
|
|
|
19
19
|
i18nRegistry: {},
|
|
20
20
|
audit: {}
|
|
21
21
|
}
|
|
22
|
-
}, globalThis.MLV_ELEMENTS = globalThis.NVE_ELEMENTS, globalThis.NVE_ELEMENTS.state.versions = Array.from(new Set([...globalThis.NVE_ELEMENTS.state.versions, "0.0.
|
|
22
|
+
}, globalThis.MLV_ELEMENTS = globalThis.NVE_ELEMENTS, globalThis.NVE_ELEMENTS.state.versions = Array.from(new Set([...globalThis.NVE_ELEMENTS.state.versions, "0.0.3"])), globalThis.NVE_ELEMENTS.state.scopedRegistry ??= {}, globalThis.NVE_ELEMENTS.state.scopedRegistry["0.0.3"] = i(), globalThis.NVE_ELEMENTS.state.versions.length > 1 && globalThis.NVE_ELEMENTS.state.env !== "production" && console.warn(e(), `\n\n${JSON.stringify(globalThis.NVE_ELEMENTS.state.versions, null, 2)}`);
|
|
23
23
|
}
|
|
24
24
|
get state() {
|
|
25
25
|
return globalThis.NVE_ELEMENTS.state;
|
|
@@ -10,6 +10,8 @@ export declare function getAttributeListChanges(element: HTMLElement, attrs: str
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function appendRootNodeStyle(host: HTMLElement, styles: string): CSSStyleSheet;
|
|
12
12
|
export declare function styleSheetToString(stylesheet: CSSStyleSheet): string;
|
|
13
|
+
/** Intercepts a property setter on an element so `callback` fires on every assignment. Does not use a MutationObserver. */
|
|
14
|
+
export declare function getPropertyChanges(element: HTMLElement, key: string, callback: (value: unknown) => void): void;
|
|
13
15
|
export declare function getElementUpdate(element: HTMLElement, key: string, callback: (value: unknown) => void): MutationObserver;
|
|
14
16
|
export declare function clickOutsideElementBounds(event: PointerEvent | MouseEvent, element: HTMLElement): boolean;
|
|
15
17
|
/** parses number out of basic calc generated by the design tokens */
|
|
@@ -45,77 +45,77 @@ function s(e) {
|
|
|
45
45
|
return e.cssRules ? Array.from(e.cssRules).map((e) => e.cssText || "").join("\n") : "";
|
|
46
46
|
}
|
|
47
47
|
function c(e, t, n) {
|
|
48
|
-
e.hasAttribute(t) ? n(e.getAttribute(t)) : e[t] !== void 0 && n(e[t]);
|
|
49
48
|
let r = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e), t);
|
|
50
|
-
if (r)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
return i(e, t, (e) => n(e));
|
|
49
|
+
if (!r) return;
|
|
50
|
+
let i = Object.getOwnPropertyDescriptor(e, t);
|
|
51
|
+
i && i.configurable === !1 || Object.defineProperty(e, t, {
|
|
52
|
+
configurable: !0,
|
|
53
|
+
get: r.get,
|
|
54
|
+
set: (t) => {
|
|
55
|
+
r.set.call(e, t), n(t);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
61
58
|
}
|
|
62
|
-
function l(e, t) {
|
|
59
|
+
function l(e, t, n) {
|
|
60
|
+
return e.hasAttribute(t) ? n(e.getAttribute(t)) : e[t] !== void 0 && n(e[t]), c(e, t, n), i(e, t, (e) => n(e));
|
|
61
|
+
}
|
|
62
|
+
function u(e, t) {
|
|
63
63
|
let { left: n, right: r, top: i, bottom: a } = t.getBoundingClientRect();
|
|
64
64
|
return e.clientX < n || e.clientX > r || e.clientY < i || e.clientY > a;
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function d(e) {
|
|
67
67
|
return parseInt(e.includes("calc") ? e.split("*")[1].replace("px)", "").trim() : e, 10) || 0;
|
|
68
68
|
}
|
|
69
|
-
var
|
|
70
|
-
function
|
|
69
|
+
var f = globalThis.CustomElementRegistry && "initialize" in CustomElementRegistry.prototype;
|
|
70
|
+
function p(t, n) {
|
|
71
71
|
Object.entries(t.elementDefinitions ?? {}).filter(([e, t]) => !n.get(t.metadata.tag)).forEach(([e, t]) => {
|
|
72
|
-
|
|
72
|
+
p(t, n);
|
|
73
73
|
}), n.get(t.metadata.tag) || (n.define(t.metadata.tag, t), n === customElements && e.dispatch("NVE_ELEMENT_DEFINE", { elementRegistry: { [t.metadata.tag]: t.metadata.version } }));
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function m(t) {
|
|
76
76
|
let { version: n } = t.metadata;
|
|
77
|
-
|
|
77
|
+
f && !customElements.get(t.metadata.tag) ? (customElements.define(t.metadata.tag, t), e.dispatch("NVE_ELEMENT_DEFINE", { elementRegistry: { [t.metadata.tag]: t.metadata.version } })) : p(t, customElements), e.state.elementRegistry[t.metadata.tag] !== n && globalThis?.location?.hostname === "localhost" && import("./audit-logs.js").then((e) => console.warn(e.getDuplicatePackageVersionWarning(t.metadata.tag, n)));
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function h(e) {
|
|
80
80
|
return e.buttons === 2 && !e.ctrlKey || e.buttons === 1 && e.ctrlKey;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
return
|
|
82
|
+
function g(e, n = 10) {
|
|
83
|
+
return _(e, n).filter((e) => t(e));
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
return Array.from(n(e)).reduce((e, r) => [...e, [r, [...Array.from(n(r)).map((e) => [e,
|
|
85
|
+
function _(e, t = 10) {
|
|
86
|
+
return Array.from(n(e)).reduce((e, r) => [...e, [r, [...Array.from(n(r)).map((e) => [e, _(e, t)])]]], []).flat(t);
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
return
|
|
88
|
+
function v(e) {
|
|
89
|
+
return b.has(e.code);
|
|
90
90
|
}
|
|
91
|
-
var
|
|
91
|
+
var y = /* @__PURE__ */ function(e) {
|
|
92
92
|
return e.End = "End", e.Home = "Home", e.PageUp = "PageUp", e.PageDown = "PageDown", e.ArrowUp = "ArrowUp", e.ArrowDown = "ArrowDown", e.ArrowLeft = "ArrowLeft", e.ArrowRight = "ArrowRight", e;
|
|
93
|
-
}({}),
|
|
94
|
-
function
|
|
93
|
+
}({}), b = new Set(Object.values(y));
|
|
94
|
+
function x(e) {
|
|
95
95
|
return e.some((t) => t.children.length !== e[0].children.length);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function S(e) {
|
|
98
98
|
e?.wholeText?.trim() === "" && e.remove();
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function C() {
|
|
101
101
|
let e = globalThis.document.createElement("div");
|
|
102
102
|
e.style.setProperty("width", "100px"), e.style.setProperty("height", "100px"), e.style.setProperty("overflow", "scroll"), e.style.setProperty("position", "absolute"), e.style.setProperty("top", "-9999px"), globalThis.document.body.appendChild(e);
|
|
103
103
|
let t = e.offsetWidth - e.clientWidth;
|
|
104
104
|
return globalThis.document.body.removeChild(e), t;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function w(e) {
|
|
107
107
|
return e.scrollHeight > e.clientHeight;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function T(e) {
|
|
110
110
|
return e.scrollWidth > e.clientWidth;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function E(e, t = 0) {
|
|
113
113
|
return e.scrollTop + e.offsetHeight + t >= e.scrollHeight;
|
|
114
114
|
}
|
|
115
|
-
async function
|
|
115
|
+
async function D() {
|
|
116
116
|
return await new globalThis.EyeDropper().open().then((e) => e.sRGBHex);
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function O(e = globalThis.document.querySelector(":root")) {
|
|
119
119
|
let t = getComputedStyle(e), n = [];
|
|
120
120
|
try {
|
|
121
121
|
n = Array.from(globalThis.parent.document.styleSheets);
|
|
@@ -134,45 +134,45 @@ function D(e = globalThis.document.querySelector(":root")) {
|
|
|
134
134
|
[n[0]]: t.getPropertyValue(n[0])
|
|
135
135
|
}), {});
|
|
136
136
|
}
|
|
137
|
-
function O(e) {
|
|
138
|
-
k(e) && e.assignedNodes().forEach((e) => e.parentNode?.removeChild(e));
|
|
139
|
-
}
|
|
140
137
|
function k(e) {
|
|
138
|
+
A(e) && e.assignedNodes().forEach((e) => e.parentNode?.removeChild(e));
|
|
139
|
+
}
|
|
140
|
+
function A(e) {
|
|
141
141
|
let t = !e.assignedNodes().find((e) => e.nodeType !== Node.TEXT_NODE), n = !e.assignedNodes().find((e) => e.nodeType === Node.TEXT_NODE && (e.textContent ?? "").trim() !== "");
|
|
142
142
|
return t && n;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function j(e, t) {
|
|
145
145
|
let n = e.assignedNodes(), r = e.name ?? "slot";
|
|
146
146
|
n.length ? t._internals.states.add(`has-${r}`) : t._internals.states.delete(`has-${r}`);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function M(e) {
|
|
149
149
|
return e?.label || e?.value || "";
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function N(e) {
|
|
152
152
|
return `${e.replaceAll("nve-", "nve-")}, ${e.replaceAll("nve-", "nve-")}`;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function P(e, t) {
|
|
155
155
|
return e.localName === t.metadata.tag.replace("nve-", "nve-") || e.localName === t.metadata.tag.replace("nve-", "nve-");
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function F(e) {
|
|
158
158
|
let t = globalThis.document.createElement("div"), { width: n } = e.getBoundingClientRect();
|
|
159
159
|
return t.setAttribute("nve-ghost", ""), t.style.minWidth = `${n}px`, t.style.maxWidth = `${n}px`, t.style.height = "1px", t.slot = e.slot, t;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function I(e, t) {
|
|
162
162
|
let n = e.getRootNode(), r = t.getRootNode(), i = n instanceof ShadowRoot && r instanceof ShadowRoot && n === r, a = n === globalThis.document && r === globalThis.document;
|
|
163
163
|
return i || a || n === r;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function L(e) {
|
|
166
166
|
return e.style.anchorName?.split(",")?.map((e) => e.trim())?.filter((e) => e !== "none" && e !== "") ?? [];
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
let n =
|
|
168
|
+
function R(e, t) {
|
|
169
|
+
let n = L(e);
|
|
170
170
|
e.style.anchorName = n.filter((e) => e !== t).join(",");
|
|
171
171
|
}
|
|
172
|
-
function
|
|
173
|
-
e.style.anchorName = Array.from(new Set([...
|
|
172
|
+
function z(e, t) {
|
|
173
|
+
e.style.anchorName = Array.from(new Set([...L(e), t])).join(",");
|
|
174
174
|
}
|
|
175
175
|
//#endregion
|
|
176
|
-
export {
|
|
176
|
+
export { y as KeynavCode, z as appendAnchorName, o as appendRootNodeStyle, j as applySlotContentStates, u as clickOutsideElementBounds, F as createGhostElement, m as define, p as defineElement, E as endOfScrollBox, r as generateId, L as getAnchorNames, i as getAttributeChanges, a as getAttributeListChanges, n as getChildren, M as getDisplayValue, l as getElementUpdate, _ as getFlattenedDOMTree, g as getFlattenedFocusableItems, c as getPropertyChanges, O as getThemeTokens, T as hasHorizontalScrollBar, x as hasInvalidDOMGrid, w as hasScrollBar, h as isContextMenuClick, P as matchesElementName, D as openEyeDropper, d as parseTokenNumber, R as removeAnchorName, k as removeEmptySlotWhitespace, S as removeEmptyTextNode, I as sameRenderRoot, C as scrollBarWidth, A as slotContainsOnlyWhitespace, s as styleSheetToString, f as supportsScopedRegistry, N as tagSelector, v as validKeyNavigationCode };
|
|
177
177
|
|
|
178
178
|
//# sourceMappingURL=dom.js.map
|