@nvidia-elements/core 0.1.0 → 0.1.2
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 +48 -0
- package/dist/_virtual/{_@oxc-project_runtime@0.123.0 → _@oxc-project_runtime@0.130.0}/helpers/decorate.js +1 -1
- package/dist/accordion/accordion2.js +12 -12
- package/dist/accordion/accordion2.js.map +1 -1
- package/dist/accordion/define.js.map +1 -1
- package/dist/alert/alert-group2.js +2 -2
- package/dist/alert/alert-group2.js.map +1 -1
- package/dist/alert/alert2.js +5 -5
- package/dist/alert/alert2.js.map +1 -1
- package/dist/alert/define.js.map +1 -1
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar-group2.js.map +1 -1
- package/dist/avatar/avatar2.js +2 -2
- package/dist/avatar/avatar2.js.map +1 -1
- package/dist/avatar/define.js.map +1 -1
- package/dist/badge/badge2.js +4 -4
- package/dist/badge/badge2.js.map +1 -1
- package/dist/badge/define.js.map +1 -1
- package/dist/breadcrumb/breadcrumb2.js +2 -2
- package/dist/breadcrumb/breadcrumb2.js.map +1 -1
- package/dist/breadcrumb/define.js.map +1 -1
- package/dist/bundles/index.js +4 -4
- package/dist/button/button.js +1 -1
- package/dist/button/button.js.map +1 -1
- package/dist/button/button2.js +2 -2
- package/dist/button/button2.js.map +1 -1
- package/dist/button/define.js.map +1 -1
- package/dist/button-group/button-group2.js +4 -4
- package/dist/button-group/button-group2.js.map +1 -1
- package/dist/button-group/define.js.map +1 -1
- package/dist/card/card2.js +5 -5
- package/dist/card/card2.js.map +1 -1
- package/dist/card/define.js.map +1 -1
- package/dist/chat-message/chat-message2.js +2 -2
- package/dist/chat-message/chat-message2.js.map +1 -1
- package/dist/chat-message/define.js.map +1 -1
- package/dist/checkbox/checkbox-group2.js +2 -2
- package/dist/checkbox/checkbox-group2.js.map +1 -1
- package/dist/checkbox/checkbox2.js +2 -2
- package/dist/checkbox/checkbox2.js.map +1 -1
- package/dist/checkbox/define.js.map +1 -1
- package/dist/color/color2.js +2 -2
- package/dist/color/color2.js.map +1 -1
- package/dist/color/define.js.map +1 -1
- package/dist/combobox/combobox2.js +6 -6
- package/dist/combobox/combobox2.js.map +1 -1
- package/dist/combobox/define.js.map +1 -1
- package/dist/copy-button/copy-button2.js +17 -17
- package/dist/copy-button/copy-button2.js.map +1 -1
- package/dist/copy-button/define.js.map +1 -1
- package/dist/custom-elements.json +2 -53
- package/dist/data.snippets.json +18 -18
- package/dist/date/date2.js +2 -2
- package/dist/date/date2.js.map +1 -1
- package/dist/date/define.js.map +1 -1
- package/dist/datetime/datetime2.js +2 -2
- package/dist/datetime/datetime2.js.map +1 -1
- package/dist/datetime/define.js.map +1 -1
- package/dist/dialog/define.js.map +1 -1
- package/dist/dialog/dialog-footer2.js +2 -2
- package/dist/dialog/dialog-footer2.js.map +1 -1
- package/dist/dialog/dialog-header2.js +2 -2
- package/dist/dialog/dialog-header2.js.map +1 -1
- package/dist/dialog/dialog2.js +4 -4
- package/dist/dialog/dialog2.js.map +1 -1
- package/dist/divider/define.js.map +1 -1
- package/dist/divider/divider2.js +2 -2
- package/dist/divider/divider2.js.map +1 -1
- package/dist/dot/define.js.map +1 -1
- package/dist/dot/dot2.js +2 -2
- package/dist/dot/dot2.js.map +1 -1
- package/dist/drawer/define.js.map +1 -1
- package/dist/drawer/drawer-content2.js +2 -2
- package/dist/drawer/drawer-content2.js.map +1 -1
- package/dist/drawer/drawer-footer2.js +2 -2
- package/dist/drawer/drawer-footer2.js.map +1 -1
- package/dist/drawer/drawer-header2.js +2 -2
- package/dist/drawer/drawer-header2.js.map +1 -1
- package/dist/drawer/drawer2.js +8 -8
- package/dist/drawer/drawer2.js.map +1 -1
- package/dist/dropdown/define.js.map +1 -1
- package/dist/dropdown/dropdown-footer2.js +2 -2
- package/dist/dropdown/dropdown-footer2.js.map +1 -1
- package/dist/dropdown/dropdown-header2.js +2 -2
- package/dist/dropdown/dropdown-header2.js.map +1 -1
- package/dist/dropdown/dropdown2.js +4 -4
- package/dist/dropdown/dropdown2.js.map +1 -1
- package/dist/dropdown-group/define.js.map +1 -1
- package/dist/dropdown-group/dropdown-group.js +2 -2
- package/dist/dropdown-group/dropdown-group.js.map +1 -1
- package/dist/dropzone/define.js.map +1 -1
- package/dist/dropzone/dropzone.util.js.map +1 -1
- package/dist/dropzone/dropzone2.js +4 -4
- package/dist/dropzone/dropzone2.js.map +1 -1
- package/dist/file/define.js.map +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/file/file2.js.map +1 -1
- package/dist/format-datetime/define.js.map +1 -1
- package/dist/format-datetime/format-datetime2.js +2 -2
- package/dist/format-datetime/format-datetime2.js.map +1 -1
- package/dist/format-number/define.js.map +1 -1
- package/dist/format-number/format-number2.js +2 -2
- package/dist/format-number/format-number2.js.map +1 -1
- package/dist/format-relative-time/define.js.map +1 -1
- package/dist/format-relative-time/format-relative-time2.js +2 -2
- package/dist/format-relative-time/format-relative-time2.js.map +1 -1
- package/dist/forms/control/control2.js +19 -15
- package/dist/forms/control/control2.js.map +1 -1
- package/dist/forms/control-group/control-group2.js +2 -2
- package/dist/forms/control-group/control-group2.js.map +1 -1
- package/dist/forms/control-message/control-message2.js +2 -2
- package/dist/forms/control-message/control-message2.js.map +1 -1
- package/dist/forms/define.js.map +1 -1
- package/dist/forms/utils/layout.d.ts +2 -1
- package/dist/forms/utils/layout.js.map +1 -1
- package/dist/forms/utils/states.d.ts +0 -1
- package/dist/forms/utils/states.js.map +1 -1
- package/dist/forms/utils/types.d.ts +0 -24
- package/dist/grid/cell/cell2.js +1 -1
- package/dist/grid/cell/cell2.js.map +1 -1
- package/dist/grid/column/column2.js +2 -2
- package/dist/grid/column/column2.js.map +1 -1
- package/dist/grid/define.js.map +1 -1
- package/dist/grid/footer/footer2.js +2 -2
- package/dist/grid/footer/footer2.js.map +1 -1
- package/dist/grid/grid2.js +2 -2
- package/dist/grid/grid2.js.map +1 -1
- package/dist/grid/header/header2.js +2 -2
- package/dist/grid/header/header2.js.map +1 -1
- package/dist/grid/placeholder/placeholder2.js +1 -1
- package/dist/grid/placeholder/placeholder2.js.map +1 -1
- package/dist/grid/row/row2.js +2 -2
- package/dist/grid/row/row2.js.map +1 -1
- package/dist/icon/define.js.map +1 -1
- package/dist/icon/icon2.js +3 -3
- package/dist/icon/icon2.js.map +1 -1
- package/dist/icon/icons/academic-cap.js.map +1 -1
- package/dist/icon/icons/add-asset.js.map +1 -1
- package/dist/icon/icons/add-comment.js.map +1 -1
- package/dist/icon/icons/add-grid.js.map +1 -1
- package/dist/icon/icons/add-user.js.map +1 -1
- package/dist/icon/icons/add.js.map +1 -1
- package/dist/icon/icons/ancestors.js.map +1 -1
- package/dist/icon/icons/archive.js.map +1 -1
- package/dist/icon/icons/arrow-angle.js.map +1 -1
- package/dist/icon/icons/arrow-both.js.map +1 -1
- package/dist/icon/icons/arrow-cycle.js.map +1 -1
- package/dist/icon/icons/arrow-path-rounded-square.js.map +1 -1
- package/dist/icon/icons/arrow-stop.js.map +1 -1
- package/dist/icon/icons/arrow.js.map +1 -1
- package/dist/icon/icons/at-symbol.js.map +1 -1
- package/dist/icon/icons/backspace.js.map +1 -1
- package/dist/icon/icons/bar-pill-stack.js.map +1 -1
- package/dist/icon/icons/bars-3-bottom-left.js.map +1 -1
- package/dist/icon/icons/bars-3-bottom-right.js.map +1 -1
- package/dist/icon/icons/bars-3-center-left.js.map +1 -1
- package/dist/icon/icons/bars-3.js.map +1 -1
- package/dist/icon/icons/bars-4.js.map +1 -1
- package/dist/icon/icons/beaker.js.map +1 -1
- package/dist/icon/icons/bell-slash.js.map +1 -1
- package/dist/icon/icons/bell-stroke.js.map +1 -1
- package/dist/icon/icons/bell.js.map +1 -1
- package/dist/icon/icons/bold.js.map +1 -1
- package/dist/icon/icons/book.js.map +1 -1
- package/dist/icon/icons/bookmark-stroke.js.map +1 -1
- package/dist/icon/icons/bookmark.js.map +1 -1
- package/dist/icon/icons/bounding-box.js.map +1 -1
- package/dist/icon/icons/branch.js.map +1 -1
- package/dist/icon/icons/briefcase.js.map +1 -1
- package/dist/icon/icons/broadcast.js.map +1 -1
- package/dist/icon/icons/browser.js.map +1 -1
- package/dist/icon/icons/bug.js.map +1 -1
- package/dist/icon/icons/calendar.js.map +1 -1
- package/dist/icon/icons/camera.js.map +1 -1
- package/dist/icon/icons/cancel.js.map +1 -1
- package/dist/icon/icons/caret.js.map +1 -1
- package/dist/icon/icons/carets-closed-square.js.map +1 -1
- package/dist/icon/icons/carousel.js.map +1 -1
- package/dist/icon/icons/category-list.js.map +1 -1
- package/dist/icon/icons/chart-bar.js.map +1 -1
- package/dist/icon/icons/chat-bubble.js.map +1 -1
- package/dist/icon/icons/chat-bubbles.js.map +1 -1
- package/dist/icon/icons/check-badge.js.map +1 -1
- package/dist/icon/icons/check.js.map +1 -1
- package/dist/icon/icons/checklist.js.map +1 -1
- package/dist/icon/icons/checkmark-circle.js.map +1 -1
- package/dist/icon/icons/chevron.js.map +1 -1
- package/dist/icon/icons/chip.js.map +1 -1
- package/dist/icon/icons/circle-angled-line.js.map +1 -1
- package/dist/icon/icons/circle-dash.js.map +1 -1
- package/dist/icon/icons/circle-dot-arrows.js.map +1 -1
- package/dist/icon/icons/circle-dot.js.map +1 -1
- package/dist/icon/icons/circle-half.js.map +1 -1
- package/dist/icon/icons/circle-rule.js.map +1 -1
- package/dist/icon/icons/circle-tick.js.map +1 -1
- package/dist/icon/icons/circle.js.map +1 -1
- package/dist/icon/icons/clipboard.js.map +1 -1
- package/dist/icon/icons/clock-circle-arrow.js.map +1 -1
- package/dist/icon/icons/clock.js.map +1 -1
- package/dist/icon/icons/cloud-download.js.map +1 -1
- package/dist/icon/icons/cloud-upload.js.map +1 -1
- package/dist/icon/icons/cloud.js.map +1 -1
- package/dist/icon/icons/code.js.map +1 -1
- package/dist/icon/icons/collapse-all.js.map +1 -1
- package/dist/icon/icons/collapse-details.js.map +1 -1
- package/dist/icon/icons/color-palette.js.map +1 -1
- package/dist/icon/icons/columns.js.map +1 -1
- package/dist/icon/icons/compare.js.map +1 -1
- package/dist/icon/icons/computer.js.map +1 -1
- package/dist/icon/icons/connect-node.js.map +1 -1
- package/dist/icon/icons/connected-blocks.js.map +1 -1
- package/dist/icon/icons/copy.js.map +1 -1
- package/dist/icon/icons/cross-hairs.js.map +1 -1
- package/dist/icon/icons/cursor-rays.js.map +1 -1
- package/dist/icon/icons/cursor-ripples.js.map +1 -1
- package/dist/icon/icons/data-management.js.map +1 -1
- package/dist/icon/icons/delete-node.js.map +1 -1
- package/dist/icon/icons/delete.js.map +1 -1
- package/dist/icon/icons/doc-checkmark.js.map +1 -1
- package/dist/icon/icons/dock-bottom.js.map +1 -1
- package/dist/icon/icons/dock-none.js.map +1 -1
- package/dist/icon/icons/dock-side.js.map +1 -1
- package/dist/icon/icons/document-clipboard.js.map +1 -1
- package/dist/icon/icons/document.js.map +1 -1
- package/dist/icon/icons/dot-stroke.js.map +1 -1
- package/dist/icon/icons/dot.js.map +1 -1
- package/dist/icon/icons/double-chevron.js.map +1 -1
- package/dist/icon/icons/download.js.map +1 -1
- package/dist/icon/icons/drag.js.map +1 -1
- package/dist/icon/icons/dropper.js.map +1 -1
- package/dist/icon/icons/duplicate.js.map +1 -1
- package/dist/icon/icons/edit.js.map +1 -1
- package/dist/icon/icons/ellipses.js.map +1 -1
- package/dist/icon/icons/envelope.js.map +1 -1
- package/dist/icon/icons/exclamation-circle.js.map +1 -1
- package/dist/icon/icons/exclamation-mark.js.map +1 -1
- package/dist/icon/icons/exclamation-triangle.js.map +1 -1
- package/dist/icon/icons/expand-all.js.map +1 -1
- package/dist/icon/icons/expand-details.js.map +1 -1
- package/dist/icon/icons/expression.js.map +1 -1
- package/dist/icon/icons/eye-hidden.js.map +1 -1
- package/dist/icon/icons/eye.js.map +1 -1
- package/dist/icon/icons/face-frown.js.map +1 -1
- package/dist/icon/icons/face-smile.js.map +1 -1
- package/dist/icon/icons/fast-forward-10.js.map +1 -1
- package/dist/icon/icons/fast-forward.js.map +1 -1
- package/dist/icon/icons/film.js.map +1 -1
- package/dist/icon/icons/filter-stroke.js.map +1 -1
- package/dist/icon/icons/filter.js.map +1 -1
- package/dist/icon/icons/flag-stroke.js.map +1 -1
- package/dist/icon/icons/flag.js.map +1 -1
- package/dist/icon/icons/fold.js.map +1 -1
- package/dist/icon/icons/folder.js.map +1 -1
- package/dist/icon/icons/fork.js.map +1 -1
- package/dist/icon/icons/gear.js.map +1 -1
- package/dist/icon/icons/globe-alt-stroke.js.map +1 -1
- package/dist/icon/icons/globe.js.map +1 -1
- package/dist/icon/icons/group-boxes.js.map +1 -1
- package/dist/icon/icons/group.js.map +1 -1
- package/dist/icon/icons/hand.js.map +1 -1
- package/dist/icon/icons/hash.js.map +1 -1
- package/dist/icon/icons/heading.js.map +1 -1
- package/dist/icon/icons/home.js.map +1 -1
- package/dist/icon/icons/horizontal-rule.js.map +1 -1
- package/dist/icon/icons/hourglass-end.js.map +1 -1
- package/dist/icon/icons/hourglass-mid.js.map +1 -1
- package/dist/icon/icons/hourglass-start.js.map +1 -1
- package/dist/icon/icons/hourglass.js.map +1 -1
- package/dist/icon/icons/identification.js.map +1 -1
- package/dist/icon/icons/image.js.map +1 -1
- package/dist/icon/icons/inbox.js.map +1 -1
- package/dist/icon/icons/infinity.js.map +1 -1
- package/dist/icon/icons/information-circle-stroke.js.map +1 -1
- package/dist/icon/icons/inspect.js.map +1 -1
- package/dist/icon/icons/italic.js.map +1 -1
- package/dist/icon/icons/key.js.map +1 -1
- package/dist/icon/icons/keyboard.js.map +1 -1
- package/dist/icon/icons/laptop-phone.js.map +1 -1
- package/dist/icon/icons/layers.js.map +1 -1
- package/dist/icon/icons/lifebuoy.js.map +1 -1
- package/dist/icon/icons/lightbulb.js.map +1 -1
- package/dist/icon/icons/lightning-bolt.js.map +1 -1
- package/dist/icon/icons/link.js.map +1 -1
- package/dist/icon/icons/list-ordered.js.map +1 -1
- package/dist/icon/icons/list-unordered.js.map +1 -1
- package/dist/icon/icons/lock.js.map +1 -1
- package/dist/icon/icons/login.js.map +1 -1
- package/dist/icon/icons/logout.js.map +1 -1
- package/dist/icon/icons/looping-off.js.map +1 -1
- package/dist/icon/icons/looping.js.map +1 -1
- package/dist/icon/icons/map-drives.js.map +1 -1
- package/dist/icon/icons/map-pin.js.map +1 -1
- package/dist/icon/icons/map.js.map +1 -1
- package/dist/icon/icons/markdown.js.map +1 -1
- package/dist/icon/icons/maximize.js.map +1 -1
- package/dist/icon/icons/megaphone.js.map +1 -1
- package/dist/icon/icons/menu.js.map +1 -1
- package/dist/icon/icons/merge.js.map +1 -1
- package/dist/icon/icons/meter.js.map +1 -1
- package/dist/icon/icons/minimize.js.map +1 -1
- package/dist/icon/icons/minus-circle.js.map +1 -1
- package/dist/icon/icons/minus.js.map +1 -1
- package/dist/icon/icons/moon.js.map +1 -1
- package/dist/icon/icons/more-actions.js.map +1 -1
- package/dist/icon/icons/multiselect.js.map +1 -1
- package/dist/icon/icons/music-note.js.map +1 -1
- package/dist/icon/icons/newspaper.js.map +1 -1
- package/dist/icon/icons/not-allowed.js.map +1 -1
- package/dist/icon/icons/numbers.js.map +1 -1
- package/dist/icon/icons/office-building.js.map +1 -1
- package/dist/icon/icons/outline.js.map +1 -1
- package/dist/icon/icons/paper-airplane.js.map +1 -1
- package/dist/icon/icons/paper-clip.js.map +1 -1
- package/dist/icon/icons/pause.js.map +1 -1
- package/dist/icon/icons/pencil-square.js.map +1 -1
- package/dist/icon/icons/person-2.js.map +1 -1
- package/dist/icon/icons/person-3.js.map +1 -1
- package/dist/icon/icons/person-circle.js.map +1 -1
- package/dist/icon/icons/person.js.map +1 -1
- package/dist/icon/icons/phone.js.map +1 -1
- package/dist/icon/icons/picture-in-picture.js.map +1 -1
- package/dist/icon/icons/pie-chart.js.map +1 -1
- package/dist/icon/icons/pin.js.map +1 -1
- package/dist/icon/icons/pizza-slice.js.map +1 -1
- package/dist/icon/icons/placeholder.js.map +1 -1
- package/dist/icon/icons/play.js.map +1 -1
- package/dist/icon/icons/plug.js.map +1 -1
- package/dist/icon/icons/plus-circle.js.map +1 -1
- package/dist/icon/icons/plus-minus.js.map +1 -1
- package/dist/icon/icons/pointer-stroke.js.map +1 -1
- package/dist/icon/icons/pointer.js.map +1 -1
- package/dist/icon/icons/priority-high.js.map +1 -1
- package/dist/icon/icons/priority-low.js.map +1 -1
- package/dist/icon/icons/priority-medium.js.map +1 -1
- package/dist/icon/icons/projector.js.map +1 -1
- package/dist/icon/icons/pull-close.js.map +1 -1
- package/dist/icon/icons/pull-draft.js.map +1 -1
- package/dist/icon/icons/pull-open.js.map +1 -1
- package/dist/icon/icons/pulse.js.map +1 -1
- package/dist/icon/icons/puzzle-piece.js.map +1 -1
- package/dist/icon/icons/question-mark-circle-stroke.js.map +1 -1
- package/dist/icon/icons/question-mark-circle.js.map +1 -1
- package/dist/icon/icons/rectangle-group.js.map +1 -1
- package/dist/icon/icons/rectangle-stack-horizontal.js.map +1 -1
- package/dist/icon/icons/rectangle-stack-vertical.js.map +1 -1
- package/dist/icon/icons/redo.js.map +1 -1
- package/dist/icon/icons/refresh.js.map +1 -1
- package/dist/icon/icons/reply.js.map +1 -1
- package/dist/icon/icons/rewind-10.js.map +1 -1
- package/dist/icon/icons/rewind.js.map +1 -1
- package/dist/icon/icons/rocketship.js.map +1 -1
- package/dist/icon/icons/running.js.map +1 -1
- package/dist/icon/icons/scale.js.map +1 -1
- package/dist/icon/icons/scissors.js.map +1 -1
- package/dist/icon/icons/search.js.map +1 -1
- package/dist/icon/icons/sensor.js.map +1 -1
- package/dist/icon/icons/server-stack.js.map +1 -1
- package/dist/icon/icons/server.js.map +1 -1
- package/dist/icon/icons/shapes.js.map +1 -1
- package/dist/icon/icons/share.js.map +1 -1
- package/dist/icon/icons/signal-slash.js.map +1 -1
- package/dist/icon/icons/signal.js.map +1 -1
- package/dist/icon/icons/signpost.js.map +1 -1
- package/dist/icon/icons/sort-ascending.js.map +1 -1
- package/dist/icon/icons/sort-descending.js.map +1 -1
- package/dist/icon/icons/soundwave.js.map +1 -1
- package/dist/icon/icons/sparkles.js.map +1 -1
- package/dist/icon/icons/split-horizontal.js.map +1 -1
- package/dist/icon/icons/split-none.js.map +1 -1
- package/dist/icon/icons/split-vertical.js.map +1 -1
- package/dist/icon/icons/star-half.js.map +1 -1
- package/dist/icon/icons/star-stroke.js.map +1 -1
- package/dist/icon/icons/star.js.map +1 -1
- package/dist/icon/icons/start.js.map +1 -1
- package/dist/icon/icons/status-offline.js.map +1 -1
- package/dist/icon/icons/status-online.js.map +1 -1
- package/dist/icon/icons/stop-sign.js.map +1 -1
- package/dist/icon/icons/stop.js.map +1 -1
- package/dist/icon/icons/stopwatch.js.map +1 -1
- package/dist/icon/icons/strikethrough.js.map +1 -1
- package/dist/icon/icons/sun.js.map +1 -1
- package/dist/icon/icons/swatch.js.map +1 -1
- package/dist/icon/icons/switch-apps.js.map +1 -1
- package/dist/icon/icons/switch.js.map +1 -1
- package/dist/icon/icons/table.js.map +1 -1
- package/dist/icon/icons/tag.js.map +1 -1
- package/dist/icon/icons/task.js.map +1 -1
- package/dist/icon/icons/telescope.js.map +1 -1
- package/dist/icon/icons/template.js.map +1 -1
- package/dist/icon/icons/terminal.js.map +1 -1
- package/dist/icon/icons/thumb-stroke.js.map +1 -1
- package/dist/icon/icons/thumb.js.map +1 -1
- package/dist/icon/icons/traffic-cone.js.map +1 -1
- package/dist/icon/icons/transparent-box.js.map +1 -1
- package/dist/icon/icons/trend-down.js.map +1 -1
- package/dist/icon/icons/trend-up.js.map +1 -1
- package/dist/icon/icons/trophy.js.map +1 -1
- package/dist/icon/icons/truck.js.map +1 -1
- package/dist/icon/icons/typography.js.map +1 -1
- package/dist/icon/icons/undo.js.map +1 -1
- package/dist/icon/icons/unlock.js.map +1 -1
- package/dist/icon/icons/upload.js.map +1 -1
- package/dist/icon/icons/video-camera.js.map +1 -1
- package/dist/icon/icons/view-as-grid.js.map +1 -1
- package/dist/icon/icons/volume-muted.js.map +1 -1
- package/dist/icon/icons/volume.js.map +1 -1
- package/dist/icon/icons/wifi.js.map +1 -1
- package/dist/icon/icons/wrench.js.map +1 -1
- package/dist/icon/icons/x-circle.js.map +1 -1
- package/dist/icon/icons/zoom-in.js.map +1 -1
- package/dist/icon/icons/zoom-out.js.map +1 -1
- package/dist/icon/icons.js.map +1 -1
- package/dist/icon/server.js.map +1 -1
- package/dist/icon-button/define.js.map +1 -1
- package/dist/icon-button/icon-button2.js +2 -2
- package/dist/icon-button/icon-button2.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/input/define.js.map +1 -1
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input-group2.js.map +1 -1
- package/dist/input/input2.js +2 -2
- package/dist/input/input2.js.map +1 -1
- package/dist/internal/base/button.js +3 -3
- package/dist/internal/base/button.js.map +1 -1
- package/dist/internal/controllers/audit.controller.js.map +1 -1
- package/dist/internal/controllers/i18n.controller.js.map +1 -1
- package/dist/internal/controllers/keynav-grid.controller.js.map +1 -1
- package/dist/internal/controllers/keynav-list.controller.js.map +1 -1
- package/dist/internal/controllers/state-active.controller.js.map +1 -1
- package/dist/internal/controllers/state-current.controller.js.map +1 -1
- package/dist/internal/controllers/state-disabled.controller.js.map +1 -1
- package/dist/internal/controllers/state-expanded.controller.js.map +1 -1
- package/dist/internal/controllers/state-highlighted.controller.js.map +1 -1
- package/dist/internal/controllers/state-pressed.controller.js.map +1 -1
- package/dist/internal/controllers/state-scroll.controller.js.map +1 -1
- package/dist/internal/controllers/state-selected.controller.js.map +1 -1
- package/dist/internal/controllers/type-anchor.controller.js.map +1 -1
- package/dist/internal/controllers/type-button.controller.js.map +1 -1
- package/dist/internal/controllers/type-closable.controller.js.map +1 -1
- package/dist/internal/controllers/type-command.controller.js.map +1 -1
- package/dist/internal/controllers/type-expandable.controller.js.map +1 -1
- package/dist/internal/controllers/type-interest.controller.js.map +1 -1
- package/dist/internal/controllers/type-native-popover-trigger.controller.js.map +1 -1
- package/dist/internal/controllers/type-native-popover.controller.js.map +1 -1
- package/dist/internal/controllers/type-native-popover.utils.js.map +1 -1
- package/dist/internal/controllers/type-selectable.controller.js.map +1 -1
- package/dist/internal/controllers/type-ssr.controller.js +2 -2
- package/dist/internal/controllers/type-ssr.controller.js.map +1 -1
- package/dist/internal/controllers/type-submit.controller.js.map +1 -1
- package/dist/internal/controllers/type-touch.controller.js.map +1 -1
- package/dist/internal/decorators/host-attr.js.map +1 -1
- package/dist/internal/decorators/scoped-registry.js.map +1 -1
- package/dist/internal/services/global.service.js +1 -1
- package/dist/internal/services/global.service.js.map +1 -1
- package/dist/internal/services/global.utils.js +6 -8
- package/dist/internal/services/global.utils.js.map +1 -1
- package/dist/internal/services/i18n.service.js.map +1 -1
- package/dist/internal/services/log.service.js.map +1 -1
- package/dist/internal/services/transition.service.js.map +1 -1
- package/dist/internal/styles/index.js.map +1 -1
- package/dist/internal/styles/popover2.js.map +1 -1
- package/dist/internal/types/index.js.map +1 -1
- package/dist/internal/utils/a11y.js.map +1 -1
- package/dist/internal/utils/audit-logs.d.ts +0 -1
- package/dist/internal/utils/audit-logs.js +1 -4
- package/dist/internal/utils/audit-logs.js.map +1 -1
- package/dist/internal/utils/audit.js.map +1 -1
- package/dist/internal/utils/dom.js.map +1 -1
- package/dist/internal/utils/events.js.map +1 -1
- package/dist/internal/utils/focus.js.map +1 -1
- package/dist/internal/utils/keynav.js.map +1 -1
- package/dist/internal/utils/objects.js.map +1 -1
- package/dist/internal/utils/strings.js.map +1 -1
- package/dist/internal/utils/supports.js.map +1 -1
- package/dist/logo/define.js.map +1 -1
- package/dist/logo/logo2.js +2 -2
- package/dist/logo/logo2.js.map +1 -1
- package/dist/menu/define.js.map +1 -1
- package/dist/menu/menu-item2.js +2 -2
- package/dist/menu/menu-item2.js.map +1 -1
- package/dist/menu/menu2.js +2 -2
- package/dist/menu/menu2.js.map +1 -1
- package/dist/month/define.js.map +1 -1
- package/dist/month/month2.js +2 -2
- package/dist/month/month2.js.map +1 -1
- package/dist/notification/define.js.map +1 -1
- package/dist/notification/notification-group2.js +2 -2
- package/dist/notification/notification-group2.js.map +1 -1
- package/dist/notification/notification2.js +4 -4
- package/dist/notification/notification2.js.map +1 -1
- package/dist/page/define.js.map +1 -1
- package/dist/page/page-panel/page-panel-content2.js +1 -1
- package/dist/page/page-panel/page-panel-content2.js.map +1 -1
- package/dist/page/page-panel/page-panel-footer2.js +2 -2
- package/dist/page/page-panel/page-panel-footer2.js.map +1 -1
- package/dist/page/page-panel/page-panel-header2.js +2 -2
- package/dist/page/page-panel/page-panel-header2.js.map +1 -1
- package/dist/page/page-panel/page-panel2.js +5 -5
- package/dist/page/page-panel/page-panel2.js.map +1 -1
- package/dist/page/page2.js +2 -2
- package/dist/page/page2.js.map +1 -1
- package/dist/page-header/define.js.map +1 -1
- package/dist/page-header/page-header2.js +1 -1
- package/dist/page-header/page-header2.js.map +1 -1
- package/dist/page-loader/define.js.map +1 -1
- package/dist/page-loader/page-loader2.js +2 -2
- package/dist/page-loader/page-loader2.js.map +1 -1
- package/dist/pagination/define.js.map +1 -1
- package/dist/pagination/pagination2.js +4 -4
- package/dist/pagination/pagination2.js.map +1 -1
- package/dist/panel/define.js.map +1 -1
- package/dist/panel/panel2.js +8 -8
- package/dist/panel/panel2.js.map +1 -1
- package/dist/password/define.js.map +1 -1
- package/dist/password/password2.js +2 -2
- package/dist/password/password2.js.map +1 -1
- package/dist/polyfills/custom-state-set.js.map +1 -1
- package/dist/polyfills/index.js.map +1 -1
- package/dist/preferences-input/define.js.map +1 -1
- package/dist/preferences-input/preferences-input2.js +4 -4
- package/dist/preferences-input/preferences-input2.js.map +1 -1
- package/dist/progress-bar/define.js.map +1 -1
- package/dist/progress-bar/progress-bar2.js +2 -2
- package/dist/progress-bar/progress-bar2.js.map +1 -1
- package/dist/progress-ring/define.js.map +1 -1
- package/dist/progress-ring/progress-ring2.js +5 -5
- package/dist/progress-ring/progress-ring2.js.map +1 -1
- package/dist/progressive-filter-chip/define.js.map +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +5 -5
- package/dist/progressive-filter-chip/progressive-filter-chip2.js.map +1 -1
- package/dist/pulse/define.js.map +1 -1
- package/dist/pulse/pulse2.js +2 -2
- package/dist/pulse/pulse2.js.map +1 -1
- package/dist/radio/define.js.map +1 -1
- package/dist/radio/radio-group2.js +2 -2
- package/dist/radio/radio-group2.js.map +1 -1
- package/dist/radio/radio2.js +2 -2
- package/dist/radio/radio2.js.map +1 -1
- package/dist/range/define.js.map +1 -1
- package/dist/range/range2.js +2 -2
- package/dist/range/range2.js.map +1 -1
- package/dist/resize-handle/define.js.map +1 -1
- package/dist/resize-handle/resize-handle2.js +5 -5
- package/dist/resize-handle/resize-handle2.js.map +1 -1
- package/dist/search/define.js.map +1 -1
- package/dist/search/search2.js +2 -2
- package/dist/search/search2.js.map +1 -1
- package/dist/select/define.js.map +1 -1
- package/dist/select/select2.js +6 -6
- package/dist/select/select2.js.map +1 -1
- package/dist/skeleton/define.js.map +1 -1
- package/dist/skeleton/skeleton2.js +2 -2
- package/dist/skeleton/skeleton2.js.map +1 -1
- package/dist/sort-button/define.js.map +1 -1
- package/dist/sort-button/sort-button2.js +14 -14
- package/dist/sort-button/sort-button2.js.map +1 -1
- package/dist/sparkline/define.js.map +1 -1
- package/dist/sparkline/sparkline.utils.d.ts +0 -1
- package/dist/sparkline/sparkline.utils.js.map +1 -1
- package/dist/sparkline/sparkline2.js +2 -2
- package/dist/sparkline/sparkline2.js.map +1 -1
- package/dist/star-rating/define.js.map +1 -1
- package/dist/star-rating/star-rating2.js +4 -4
- package/dist/star-rating/star-rating2.js.map +1 -1
- package/dist/steps/define.js.map +1 -1
- package/dist/steps/steps2.js +7 -7
- package/dist/steps/steps2.js.map +1 -1
- package/dist/switch/define.js.map +1 -1
- package/dist/switch/switch-group2.js +2 -2
- package/dist/switch/switch-group2.js.map +1 -1
- package/dist/switch/switch2.js +2 -2
- package/dist/switch/switch2.js.map +1 -1
- package/dist/tabs/define.js.map +1 -1
- package/dist/tabs/tabs-group2.js +16 -16
- package/dist/tabs/tabs-group2.js.map +1 -1
- package/dist/tabs/tabs2.js +7 -7
- package/dist/tabs/tabs2.js.map +1 -1
- package/dist/tag/define.js.map +1 -1
- package/dist/tag/tag2.js +5 -5
- package/dist/tag/tag2.js.map +1 -1
- package/dist/textarea/define.js.map +1 -1
- package/dist/textarea/textarea2.js +1 -1
- package/dist/textarea/textarea2.js.map +1 -1
- package/dist/time/define.js.map +1 -1
- package/dist/time/time2.js +2 -2
- package/dist/time/time2.js.map +1 -1
- package/dist/toast/define.js.map +1 -1
- package/dist/toast/toast2.js +4 -4
- package/dist/toast/toast2.js.map +1 -1
- package/dist/toggletip/define.js.map +1 -1
- package/dist/toggletip/toggletip-footer2.js +2 -2
- package/dist/toggletip/toggletip-footer2.js.map +1 -1
- package/dist/toggletip/toggletip-header2.js +2 -2
- package/dist/toggletip/toggletip-header2.js.map +1 -1
- package/dist/toggletip/toggletip2.js +4 -4
- package/dist/toggletip/toggletip2.js.map +1 -1
- package/dist/toolbar/define.js.map +1 -1
- package/dist/toolbar/toolbar2.js +4 -4
- package/dist/toolbar/toolbar2.js.map +1 -1
- package/dist/tooltip/define.js.map +1 -1
- package/dist/tooltip/tooltip2.js +2 -2
- package/dist/tooltip/tooltip2.js.map +1 -1
- package/dist/tree/define.js.map +1 -1
- package/dist/tree/tree-node2.js +9 -9
- package/dist/tree/tree-node2.js.map +1 -1
- package/dist/tree/tree2.js +4 -4
- package/dist/tree/tree2.js.map +1 -1
- package/dist/tree/utils.js.map +1 -1
- package/dist/week/define.js.map +1 -1
- package/dist/week/week2.js +2 -2
- package/dist/week/week2.js.map +1 -1
- package/package.json +19 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/internal/types/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { TemplateResult } from 'lit';\nimport type { IconName } from '@nvidia-elements/core/icon';\nimport type { I18nStrings } from '../services/i18n.service.js';\n\nexport type Color =\n | 'red-cardinal'\n | 'gray-slate'\n | 'gray-denim'\n | 'blue-indigo'\n | 'blue-cobalt'\n | 'blue-sky'\n | 'teal-cyan'\n | 'green-mint'\n | 'teal-seafoam'\n | 'green-grass'\n | 'yellow-amber'\n | 'orange-pumpkin'\n | 'red-tomato'\n | 'pink-magenta'\n | 'purple-plum'\n | 'purple-violet'\n | 'purple-lavender'\n | 'pink-rose'\n | 'green-jade'\n | 'lime-pear'\n | 'yellow-nova'\n | 'brand-green';\n\n/** Controls the visual scale of an element to match its importance and available space.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n */\nexport type Size = 'sm' | 'md' | 'lg';\n\n/** Controls the visual scale of an element to match its importance and available space.\n * - `xs` - Extra small size for minimal elements or highly dense layouts.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n * - `xl` - Extra large size for emphasizing elements or sparse layouts.\n */\nexport type SizeExpanded = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/** Controls the visual prominence to establish hierarchy and guide user attention.\n * - `emphasis` - Increases visual weight to draw attention and highlight important elements.\n * - `muted` - Reduces visual weight for supporting content that should remain subtle and unobtrusive.\n */\nexport type Prominence = 'emphasis' | 'muted';\n\n/**\n * Determines the container bounds of the element\n * - `flat` Element has white space bounds but reduced visual container.\n * - `inline` Element container reduces to fit within inline content such as a block of text.\n * - `inset` Element container optimizes for embedding or inset placement inside another containing element.\n * - `full` Element container optimizes for filling its container bounds.\n * - `condensed` Element container optimizes for small, summarized or contained spaces.\n */\nexport type Container = 'inline' | 'flat' | 'inset' | 'full' | 'condensed';\n\n/** Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions.\n * - `accent` - Highlights important actions or draws attention to primary interactive elements.\n * - `warning` - Indicates cautionary actions that require careful consideration before proceeding.\n * - `success` - Represents positive outcomes, confirmations, or constructive actions.\n * - `danger` - Signals destructive or irreversible actions that need extra attention and confirmation.\n */\nexport type SupportStatus = 'accent' | 'warning' | 'success' | 'danger';\n\n/** Controls how the chart connects intermediate values between points in a data series.\n * - `linear` - Connects points with straight line segments.\n * - `smooth` - Connects points with smooth bezier curves.\n * - `step` - Connects points with horizontal and vertical step segments.\n */\nexport type Interpolation = 'linear' | 'smooth' | 'step';\n\n/** Determines the orientation of an element. */\nexport type Orientation = 'vertical' | 'horizontal';\n\n/** Communicates the current state of a task or process to keep users informed of progress and outcomes.\n * - `scheduled` - Task has a scheduled future execution at a specific time.\n * - `queued` - Task is waiting in line to begin after other tasks complete.\n * - `pending` - Task is awaiting approval, user input, or external conditions before proceeding.\n * - `starting` - Task is initializing and preparing to begin active execution.\n * - `running` - Task is actively executing and making progress.\n * - `restarting` - Task restarts after an interruption or reset.\n * - `stopping` - Task is gracefully shutting down and completing cleanup operations.\n * - `finished` - Task has completed successfully with the expected outcome.\n * - `failed` - Task encountered an error and did not complete as intended.\n * - `unknown` - Task status remains unknown or unavailable.\n * - `ignored` - Task was intentionally skipped or excluded from execution.\n */\nexport type TaskStatus =\n | 'scheduled'\n | 'queued'\n | 'pending'\n | 'starting'\n | 'running'\n | 'restarting'\n | 'stopping'\n | 'finished'\n | 'failed'\n | 'unknown'\n | 'ignored';\n\n/**\n * https://open-ui.org/components/popup.research.explainer#api-shape\n * - `auto` light dismiss, focus on open, return to trigger\n * - `manual` no light dismiss, no auto focus\n * - `hint` no light dismiss, no auto focus, open/close on hover/focus\n */\nexport type PopoverType = 'auto' | 'manual' | 'hint' | 'inline';\n\n/** Controls how the popover aligns along the edge of its anchor element.\n * - `start` - Aligns the popover to the beginning edge of the anchor for left or top alignment.\n * - `end` - Aligns the popover to the ending edge of the anchor for right or bottom alignment.\n * - `center` - Centers the popover along the anchor's edge for balanced positioning.\n */\nexport type PopoverAlign = 'start' | 'end' | 'center';\n\n/** Determines the popover position relative to its assigned anchor and alignment.\n * - `top` - Positions the popover above the anchor element.\n * - `bottom` - Positions the popover below the anchor element.\n * - `left` - Positions the popover to the left side of the anchor element.\n * - `right` - Positions the popover to the right side of the anchor element.\n */\nexport type PopoverSides = 'top' | 'bottom' | 'left' | 'right';\n\n/** Controls the placement of the popover relative to its anchor element.\n * - `center` - Centers the popover directly over the anchor element.\n * - `top` - Positions the popover above the anchor element.\n * - `bottom` - Positions the popover below the anchor element.\n * - `left` - Positions the popover to the left side of the anchor element.\n * - `right` - Positions the popover to the right side of the anchor element.\n */\nexport type PopoverPosition = 'center' | 'top' | 'bottom' | 'left' | 'right';\n\n/** Determines the position of an element relative to its anchor */\nexport type Placement = PopoverPosition | `${PopoverSides}-${PopoverAlign}`;\n\n/** Controls the directional arrangement and spacing behavior of the element's content.\n * - `vertical` - Arranges content in a vertical stack with block-level spacing.\n * - `vertical-inline` - Arranges content vertically with compact inline spacing for dense layouts.\n * - `horizontal` - Arranges content in a horizontal row with block-level spacing.\n * - `horizontal-inline` - Arranges content horizontally with compact inline spacing.\n */\nexport type ControlLayout = 'vertical' | 'vertical-inline' | 'horizontal' | 'horizontal-inline';\n\n/** Indicates the element that represents the user's current location or position within a set. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n * - `page` - Marks the current page within a set of navigation links.\n * - `step` - Marks the current step within a multi-step process or workflow.\n */\nexport type Current = 'page' | 'step';\n\n/** Controls how data points are visually encoded in a sparkline chart.\n * - `line` - Renders data as a connected line to emphasize macro trend.\n * - `area` - Renders data as a filled area beneath a line to emphasize magnitude over time.\n * - `gradient` - Renders a line with gradient color treatment to communicate value intensity across the series.\n * - `column` - Renders data as vertical columns for easy comparison of discrete values.\n * - `winloss` - Renders outcomes as binary or ternary bars to highlight wins, losses, and optional ties.\n */\nexport type SparklineMark = 'line' | 'area' | 'gradient' | 'column' | 'winloss';\n\nexport interface NveElement {\n /**\n * This Boolean attribute prevents the user from interacting with the element: it cannot receive press or focus events. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled)\n * - `true` - The element has a disabled state and does not accept interaction.\n * - `false` - The element has an enabled state and accepts interaction.\n */\n disabled?: boolean;\n\n /** Indicates whether the element is currently actively engaged through user interaction. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/:active)\n * - `true` - The user is pressing or activating the element (mousedown, keydown, or touch).\n * - `false` - No active user engagement on the element.\n */\n active?: boolean;\n\n /** Indicates whether collapsible content is currently visible or hidden from the user. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n * - `true` - The associated content expands and becomes visible to the user.\n * - `false` - The associated content collapses and hides from the user.\n */\n expanded?: boolean;\n\n /** Indicates the current state of a toggle button that switches on or off. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-pressed)\n * - `true` - The button is in the pressed (on) state and the associated action or setting is active.\n * - `false` - The button is in the unpressed (off) state and the associated action or setting is inactive.\n */\n pressed?: boolean;\n\n /** Indicates whether an element currently holds selection within a multi-option selection group. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n * - `true` - The element holds selection and represents the user's current choice within the group.\n * - `false` - The element does not hold selection and the user can choose it.\n */\n selected?: boolean;\n\n /** Indicates whether the user can change the element's value while it remains visible and focusable. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly)\n * - `true` - The element has a readonly state: the user cannot change its value, but can still focus and copy it.\n * - `false` - The element allows editing and the user can change its value through interaction.\n */\n readonly?: boolean;\n\n /** Defines the value associated with the element's name when submitting the form data. The server receives this value in params when the form submits through this button. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value) */\n value?: string;\n\n /** The name of the element, submitted as a pair with the element value as part of the form data. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-name) */\n name?: string;\n\n /** Indicates whether the user can dismiss or close the element.\n * - `true` - The element displays a close control and the user can dismiss it.\n * - `false` - The user cannot close the element and must dismiss it programmatically.\n */\n closable?: boolean;\n\n /** Enables updating internal string values for internationalization. */\n i18n?: Partial<I18nStrings & { __set: boolean }>;\n\n /** Indicates the element that represents the user's current location or position within a set. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n * - `page` - Marks the current page within a set of navigation links.\n * - `step` - Marks the current step within a multi-step process or workflow.\n */\n current?: 'page' | 'step';\n\n /** Controls the horizontal alignment of the element within its container, respecting the text direction. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout)\n * - `start` - Aligns the element to the beginning of the inline axis (left in LTR, right in RTL).\n * - `center` - Centers the element along the inline axis for balanced visual positioning.\n * - `end` - Aligns the element to the end of the inline axis (right in LTR, left in RTL).\n */\n inlinePosition?: 'start' | 'center' | 'end';\n\n /** Controls the vertical alignment of the element within its container. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout)\n * - `start` - Aligns the element to the top of the block axis for top-aligned positioning.\n * - `center` - Centers the element along the block axis for balanced vertical positioning.\n * - `end` - Aligns the element to the bottom of the block axis for bottom-aligned positioning.\n */\n blockPosition?: 'start' | 'center' | 'end';\n\n /** Controls the directional arrangement and spacing behavior of the element's content.\n * - `vertical` - Arranges content in a vertical stack with block-level spacing.\n * - `vertical-inline` - Arranges content vertically with compact inline spacing for dense layouts.\n * - `horizontal` - Arranges content in a horizontal row with block-level spacing.\n * - `horizontal-inline` - Arranges content horizontally with compact inline spacing.\n */\n layout?: 'vertical' | 'vertical-inline' | 'horizontal' | 'horizontal-inline';\n\n /** Controls the directional flow of the element's layout and interaction pattern.\n * - `vertical` - Element orients vertically with top-to-bottom flow.\n * - `horizontal` - Element orients horizontally with left-to-right flow.\n */\n orientation?: 'vertical' | 'horizontal';\n\n /** Controls the visual prominence to establish hierarchy and guide user attention.\n * - `emphasis` - Increases visual weight to draw attention and highlight important elements.\n * - `muted` - Reduces visual weight for supporting content that should remain subtle and unobtrusive.\n */\n prominence?: 'emphasis' | 'muted';\n\n /** The Interaction type provides a way to show the intent of an interactive element. This can help users quickly understand what each interaction does and reduce the potential for confusion or errors.\n * - `emphasis` Shows the interaction targets emphasis or highlighting primary actions.\n * - `destructive` Shows the interaction targets destructive actions such as deleting or removing.\n */\n interaction?: 'emphasis' | 'destructive';\n\n /** Defines a base color from the theme color palette */\n color?:\n | 'red-cardinal'\n | 'gray-slate'\n | 'gray-denim'\n | 'blue-indigo'\n | 'blue-cobalt'\n | 'blue-sky'\n | 'teal-cyan'\n | 'green-mint'\n | 'teal-seafoam'\n | 'green-grass'\n | 'yellow-amber'\n | 'orange-pumpkin'\n | 'red-tomato'\n | 'pink-magenta'\n | 'purple-plum'\n | 'purple-violet'\n | 'purple-lavender'\n | 'pink-rose'\n | 'green-jade'\n | 'lime-pear'\n | 'yellow-nova'\n | 'brand-green';\n\n /** Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions.\n * - `accent` - Highlights important actions or draws attention to primary interactive elements.\n * - `warning` - Indicates cautionary actions that require careful consideration before proceeding.\n * - `success` - Represents positive outcomes, confirmations, or constructive actions.\n * - `danger` - Signals destructive or irreversible actions that need extra attention and confirmation.\n */\n status?: 'accent' | 'warning' | 'success' | 'danger';\n\n /** Controls the visual scale of an element to match its importance and available space.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n */\n size?: 'sm' | 'md' | 'lg';\n\n /**\n * Demonstrates different container styles to accommodate visual weight and context.\n * - `flat` Element has white space bounds but reduced visual container.\n * - `inline` Element container reduces to fit within inline content such as a block of text.\n * - `inset` Element container optimizes for embedding or inset placement inside another containing element.\n * - `full` Element container optimizes for filling its container bounds.\n */\n container?: 'inline' | 'flat' | 'inset' | 'full';\n\n /** Determines the position of an element along both inline and block axis. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout) */\n position?:\n | 'top-start'\n | 'top-end'\n | 'top-center'\n | 'bottom-start'\n | 'bottom-end'\n | 'bottom-center'\n | 'left-start'\n | 'left-end'\n | 'left-center'\n | 'right-start'\n | 'right-end'\n | 'right-center';\n\n /** Determines the alignment of the popover relative to the provided anchor element. */\n alignment?: 'start' | 'end' | 'center';\n\n /** Provides the element that the popover should position relative to. Anchor can accept a idref string within the same render root or a HTMLElement DOM reference. */\n anchor?: string | HTMLElement;\n\n /** Defines what element triggers an `open` interaction event. A trigger can accept a idref string within the same render root or a HTMLElement DOM reference. */\n trigger?: string | HTMLElement;\n\n /** Defines named content areas where users can insert custom markup into the element.\n * - `default` - The primary content area for the element.\n * - `prefix` - Content that appears before the main element content.\n * - `suffix` - Content that appears after the main element content.\n * - `header` - Content that appears at the top of the element, used for titles or introductory information.\n * - `footer` - Content that appears at the bottom of the element, used for supplementary information or actions.\n * - `actions` - Content area specifically for interactive controls like buttons or links.\n * - `icon` - Content area for displaying an icon that represents the element's purpose or state.\n */\n slots?: 'default' | 'prefix' | 'suffix' | 'header' | 'footer' | 'actions' | 'icon';\n\n /**\n * Sets the automatic dismissal time in milliseconds before the element emits a `close` event. Allow ~200-250ms per word for comfortable reading.\n * - `0` - Warning or error messages requiring immediate acknowledgment.\n * - `3000` - Brief success or confirmation messages.\n * - `7000` - Standard informational messages.\n * - `10000` - Messages with actions or requiring user decision.\n */\n closeTimeout?: number;\n\n /**\n * Sets the delay in milliseconds before the element emits a `open` event.\n * - `0` - Keyboard focus interactions (always immediate for accessibility).\n * - `500` - Dense interfaces with many tooltips to reduce visual noise and prevent accidental triggers.\n */\n openDelay?: number;\n\n /** @private An instance of `ElementInternals` that decorators/controllers set dynamically */\n _internals: ElementInternals;\n\n render: TemplateResult;\n}\n\n/** Defines named content areas where users can insert custom markup into the element.\n * - `default` - The primary content area for the element.\n * - `prefix` - Content that appears before the main element content.\n * - `suffix` - Content that appears after the main element content.\n * - `header` - Content that appears at the top of the element, used for titles or introductory information.\n * - `footer` - Content that appears at the bottom of the element, used for supplementary information or actions.\n * - `actions` - Content area specifically for interactive controls like buttons or links.\n * - `icon` - Content area for displaying an icon that represents the element's purpose or state.\n */\nexport type SlotName = 'default' | 'prefix' | 'suffix' | 'header' | 'footer' | 'actions' | 'icon';\n\n/** @deprecated Determines the flat container element interaction. */\nexport type FlatInteraction = 'flat' | 'flat-emphasize' | `${'flat'}-${Interaction}`;\n\n/** @deprecated Determines if an element renders with an inverse contrast. */\nexport type Inverse = 'inverse';\n\n/** @deprecated Determines the trend status of an element. Should convey the trend of a metric. */\nexport type TrendStatus = 'trend-down' | 'trend-up' | 'trend-neutral';\n\n/** The Interaction type provides a way to show the intent of an interactive element. This can help users quickly understand what each interaction does and reduce the potential for confusion or errors.\n * - `emphasis` Shows the interaction targets emphasis or highlighting primary actions.\n * - `destructive` Shows the interaction targets destructive actions such as deleting or removing.\n */\nexport type Interaction = 'emphasis' | 'destructive';\n\nexport interface ContainerElement {\n container?: Partial<Container>;\n}\n\n/** An element that renders complex data structures (e.g., arrays, series, matrices) rather than composable UI content and values expressible with primitive attributes. */\nexport interface DataElement<T extends unknown[] | Record<string, unknown>> {\n data?: T;\n}\n\nexport const statusIcons: { [key: string]: IconName } = {\n '': 'information-circle-stroke',\n undefined: 'information-circle-stroke',\n default: 'information-circle-stroke',\n accent: 'information-circle-stroke',\n warning: 'exclamation-triangle',\n success: 'checkmark-circle',\n danger: 'exclamation-circle',\n scheduled: 'clock',\n failed: 'x-circle',\n finished: 'checkmark-circle',\n unknown: 'question-mark-circle',\n queued: 'bar-pill-stack',\n running: 'running',\n restarting: 'refresh',\n stopping: 'stop-sign',\n pending: 'circle-dash',\n starting: 'circle-dot',\n 'trend-up': 'trend-up',\n 'trend-down': 'trend-down',\n 'trend-neutral': 'minus',\n ignored: 'circle-angled-line'\n} as const;\n\ndeclare global {\n var NVE_ELEMENTS: {\n state: {\n bundle: boolean;\n env: 'watch' | 'production' | 'development';\n pageHost: string;\n moduleHost: string;\n versions: string[];\n scopedRegistry: { [key: string]: CustomElementRegistry };\n elementRegistry: Readonly<{ [key: string]: string }>;\n i18nRegistry: Readonly<{ [key: string]: string }>;\n audit: Readonly<{\n [key: string]: {\n count?: number;\n excessiveInstanceLimitAudited?: boolean;\n };\n }>;\n };\n debug: (log?: (...args: unknown[]) => void) => void;\n };\n\n interface HTMLElement {\n 'nve-text': string;\n 'nve-layout': string;\n }\n\n interface CustomElementRegistry {\n initialize(root: ShadowRoot | Document): void;\n }\n\n var CustomElementRegistry: {\n new (): CustomElementRegistry;\n prototype: CustomElementRegistry;\n };\n}\n\nexport interface ElementDefinition extends CustomElementConstructor {\n metadata: { version: string; tag: string };\n elementDefinitions?: { [key: string]: ElementDefinition };\n shadowRootOptions?: { customElementRegistry?: CustomElementRegistry | null };\n}\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport interface OffsetPoint {\n offsetX: number;\n offsetY: number;\n}\n\nexport interface Dimensions {\n width: number;\n height: number;\n}\n\nexport type Rect = Point & Dimensions;\n\nexport interface Scale {\n min: number;\n max: number;\n}\n\n/** https://github.com/tc39/proposal-decorators */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nexport type LegacyDecoratorTarget = Function & {\n addInitializer?: (initializer: (instance: any) => void) => void; // eslint-disable-line @typescript-eslint/no-explicit-any\n};\n"],"mappings":";AAqZA,IAAa,IAA2C;CACtD,IAAI;CACJ,WAAW;CACX,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,UAAU;CACV,SAAS;CACT,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,UAAU;CACV,SAAS;CACT,UAAU;CACV,YAAY;CACZ,cAAc;CACd,iBAAiB;CACjB,SAAS;CACV"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/internal/types/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { TemplateResult } from 'lit';\nimport type { IconName } from '@nvidia-elements/core/icon';\nimport type { I18nStrings } from '../services/i18n.service.js';\n\nexport type Color =\n | 'red-cardinal'\n | 'gray-slate'\n | 'gray-denim'\n | 'blue-indigo'\n | 'blue-cobalt'\n | 'blue-sky'\n | 'teal-cyan'\n | 'green-mint'\n | 'teal-seafoam'\n | 'green-grass'\n | 'yellow-amber'\n | 'orange-pumpkin'\n | 'red-tomato'\n | 'pink-magenta'\n | 'purple-plum'\n | 'purple-violet'\n | 'purple-lavender'\n | 'pink-rose'\n | 'green-jade'\n | 'lime-pear'\n | 'yellow-nova'\n | 'brand-green';\n\n/** Controls the visual scale of an element to match its importance and available space.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n */\nexport type Size = 'sm' | 'md' | 'lg';\n\n/** Controls the visual scale of an element to match its importance and available space.\n * - `xs` - Extra small size for minimal elements or highly dense layouts.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n * - `xl` - Extra large size for emphasizing elements or sparse layouts.\n */\nexport type SizeExpanded = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/** Controls the visual prominence to establish hierarchy and guide user attention.\n * - `emphasis` - Increases visual weight to draw attention and highlight important elements.\n * - `muted` - Reduces visual weight for supporting content that should remain subtle and unobtrusive.\n */\nexport type Prominence = 'emphasis' | 'muted';\n\n/**\n * Determines the container bounds of the element\n * - `flat` Element has white space bounds but reduced visual container.\n * - `inline` Element container reduces to fit within inline content such as a block of text.\n * - `inset` Element container optimizes for embedding or inset placement inside another containing element.\n * - `full` Element container optimizes for filling its container bounds.\n * - `condensed` Element container optimizes for small, summarized or contained spaces.\n */\nexport type Container = 'inline' | 'flat' | 'inset' | 'full' | 'condensed';\n\n/** Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions.\n * - `accent` - Highlights important actions or draws attention to primary interactive elements.\n * - `warning` - Indicates cautionary actions that require careful consideration before proceeding.\n * - `success` - Represents positive outcomes, confirmations, or constructive actions.\n * - `danger` - Signals destructive or irreversible actions that need extra attention and confirmation.\n */\nexport type SupportStatus = 'accent' | 'warning' | 'success' | 'danger';\n\n/** Controls how the chart connects intermediate values between points in a data series.\n * - `linear` - Connects points with straight line segments.\n * - `smooth` - Connects points with smooth bezier curves.\n * - `step` - Connects points with horizontal and vertical step segments.\n */\nexport type Interpolation = 'linear' | 'smooth' | 'step';\n\n/** Determines the orientation of an element. */\nexport type Orientation = 'vertical' | 'horizontal';\n\n/** Communicates the current state of a task or process to keep users informed of progress and outcomes.\n * - `scheduled` - Task has a scheduled future execution at a specific time.\n * - `queued` - Task is waiting in line to begin after other tasks complete.\n * - `pending` - Task is awaiting approval, user input, or external conditions before proceeding.\n * - `starting` - Task is initializing and preparing to begin active execution.\n * - `running` - Task is actively executing and making progress.\n * - `restarting` - Task restarts after an interruption or reset.\n * - `stopping` - Task is gracefully shutting down and completing cleanup operations.\n * - `finished` - Task has completed successfully with the expected outcome.\n * - `failed` - Task encountered an error and did not complete as intended.\n * - `unknown` - Task status remains unknown or unavailable.\n * - `ignored` - Task was intentionally skipped or excluded from execution.\n */\nexport type TaskStatus =\n | 'scheduled'\n | 'queued'\n | 'pending'\n | 'starting'\n | 'running'\n | 'restarting'\n | 'stopping'\n | 'finished'\n | 'failed'\n | 'unknown'\n | 'ignored';\n\n/**\n * https://open-ui.org/components/popup.research.explainer#api-shape\n * - `auto` light dismiss, focus on open, return to trigger\n * - `manual` no light dismiss, no auto focus\n * - `hint` no light dismiss, no auto focus, open/close on hover/focus\n */\nexport type PopoverType = 'auto' | 'manual' | 'hint' | 'inline';\n\n/** Controls how the popover aligns along the edge of its anchor element.\n * - `start` - Aligns the popover to the beginning edge of the anchor for left or top alignment.\n * - `end` - Aligns the popover to the ending edge of the anchor for right or bottom alignment.\n * - `center` - Centers the popover along the anchor's edge for balanced positioning.\n */\nexport type PopoverAlign = 'start' | 'end' | 'center';\n\n/** Determines the popover position relative to its assigned anchor and alignment.\n * - `top` - Positions the popover above the anchor element.\n * - `bottom` - Positions the popover below the anchor element.\n * - `left` - Positions the popover to the left side of the anchor element.\n * - `right` - Positions the popover to the right side of the anchor element.\n */\nexport type PopoverSides = 'top' | 'bottom' | 'left' | 'right';\n\n/** Controls the placement of the popover relative to its anchor element.\n * - `center` - Centers the popover directly over the anchor element.\n * - `top` - Positions the popover above the anchor element.\n * - `bottom` - Positions the popover below the anchor element.\n * - `left` - Positions the popover to the left side of the anchor element.\n * - `right` - Positions the popover to the right side of the anchor element.\n */\nexport type PopoverPosition = 'center' | 'top' | 'bottom' | 'left' | 'right';\n\n/** Determines the position of an element relative to its anchor */\nexport type Placement = PopoverPosition | `${PopoverSides}-${PopoverAlign}`;\n\n/** Controls the directional arrangement and spacing behavior of the element's content.\n * - `vertical` - Arranges content in a vertical stack with block-level spacing.\n * - `vertical-inline` - Arranges content vertically with compact inline spacing for dense layouts.\n * - `horizontal` - Arranges content in a horizontal row with block-level spacing.\n * - `horizontal-inline` - Arranges content horizontally with compact inline spacing.\n */\nexport type ControlLayout = 'vertical' | 'vertical-inline' | 'horizontal' | 'horizontal-inline';\n\n/** Indicates the element that represents the user's current location or position within a set. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n * - `page` - Marks the current page within a set of navigation links.\n * - `step` - Marks the current step within a multi-step process or workflow.\n */\nexport type Current = 'page' | 'step';\n\n/** Controls how data points are visually encoded in a sparkline chart.\n * - `line` - Renders data as a connected line to emphasize macro trend.\n * - `area` - Renders data as a filled area beneath a line to emphasize magnitude over time.\n * - `gradient` - Renders a line with gradient color treatment to communicate value intensity across the series.\n * - `column` - Renders data as vertical columns for easy comparison of discrete values.\n * - `winloss` - Renders outcomes as binary or ternary bars to highlight wins, losses, and optional ties.\n */\nexport type SparklineMark = 'line' | 'area' | 'gradient' | 'column' | 'winloss';\n\nexport interface NveElement {\n /**\n * This Boolean attribute prevents the user from interacting with the element: it cannot receive press or focus events. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled)\n * - `true` - The element has a disabled state and does not accept interaction.\n * - `false` - The element has an enabled state and accepts interaction.\n */\n disabled?: boolean;\n\n /** Indicates whether the element is currently actively engaged through user interaction. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/:active)\n * - `true` - The user is pressing or activating the element (mousedown, keydown, or touch).\n * - `false` - No active user engagement on the element.\n */\n active?: boolean;\n\n /** Indicates whether collapsible content is currently visible or hidden from the user. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n * - `true` - The associated content expands and becomes visible to the user.\n * - `false` - The associated content collapses and hides from the user.\n */\n expanded?: boolean;\n\n /** Indicates the current state of a toggle button that switches on or off. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-pressed)\n * - `true` - The button is in the pressed (on) state and the associated action or setting is active.\n * - `false` - The button is in the unpressed (off) state and the associated action or setting is inactive.\n */\n pressed?: boolean;\n\n /** Indicates whether an element currently holds selection within a multi-option selection group. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n * - `true` - The element holds selection and represents the user's current choice within the group.\n * - `false` - The element does not hold selection and the user can choose it.\n */\n selected?: boolean;\n\n /** Indicates whether the user can change the element's value while it remains visible and focusable. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly)\n * - `true` - The element has a readonly state: the user cannot change its value, but can still focus and copy it.\n * - `false` - The element allows editing and the user can change its value through interaction.\n */\n readonly?: boolean;\n\n /** Defines the value associated with the element's name when submitting the form data. The server receives this value in params when the form submits through this button. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value) */\n value?: string;\n\n /** The name of the element, submitted as a pair with the element value as part of the form data. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-name) */\n name?: string;\n\n /** Indicates whether the user can dismiss or close the element.\n * - `true` - The element displays a close control and the user can dismiss it.\n * - `false` - The user cannot close the element and must dismiss it programmatically.\n */\n closable?: boolean;\n\n /** Enables updating internal string values for internationalization. */\n i18n?: Partial<I18nStrings & { __set: boolean }>;\n\n /** Indicates the element that represents the user's current location or position within a set. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n * - `page` - Marks the current page within a set of navigation links.\n * - `step` - Marks the current step within a multi-step process or workflow.\n */\n current?: 'page' | 'step';\n\n /** Controls the horizontal alignment of the element within its container, respecting the text direction. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout)\n * - `start` - Aligns the element to the beginning of the inline axis (left in LTR, right in RTL).\n * - `center` - Centers the element along the inline axis for balanced visual positioning.\n * - `end` - Aligns the element to the end of the inline axis (right in LTR, left in RTL).\n */\n inlinePosition?: 'start' | 'center' | 'end';\n\n /** Controls the vertical alignment of the element within its container. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout)\n * - `start` - Aligns the element to the top of the block axis for top-aligned positioning.\n * - `center` - Centers the element along the block axis for balanced vertical positioning.\n * - `end` - Aligns the element to the bottom of the block axis for bottom-aligned positioning.\n */\n blockPosition?: 'start' | 'center' | 'end';\n\n /** Controls the directional arrangement and spacing behavior of the element's content.\n * - `vertical` - Arranges content in a vertical stack with block-level spacing.\n * - `vertical-inline` - Arranges content vertically with compact inline spacing for dense layouts.\n * - `horizontal` - Arranges content in a horizontal row with block-level spacing.\n * - `horizontal-inline` - Arranges content horizontally with compact inline spacing.\n */\n layout?: 'vertical' | 'vertical-inline' | 'horizontal' | 'horizontal-inline';\n\n /** Controls the directional flow of the element's layout and interaction pattern.\n * - `vertical` - Element orients vertically with top-to-bottom flow.\n * - `horizontal` - Element orients horizontally with left-to-right flow.\n */\n orientation?: 'vertical' | 'horizontal';\n\n /** Controls the visual prominence to establish hierarchy and guide user attention.\n * - `emphasis` - Increases visual weight to draw attention and highlight important elements.\n * - `muted` - Reduces visual weight for supporting content that should remain subtle and unobtrusive.\n */\n prominence?: 'emphasis' | 'muted';\n\n /** The Interaction type provides a way to show the intent of an interactive element. This can help users quickly understand what each interaction does and reduce the potential for confusion or errors.\n * - `emphasis` Shows the interaction targets emphasis or highlighting primary actions.\n * - `destructive` Shows the interaction targets destructive actions such as deleting or removing.\n */\n interaction?: 'emphasis' | 'destructive';\n\n /** Defines a base color from the theme color palette */\n color?:\n | 'red-cardinal'\n | 'gray-slate'\n | 'gray-denim'\n | 'blue-indigo'\n | 'blue-cobalt'\n | 'blue-sky'\n | 'teal-cyan'\n | 'green-mint'\n | 'teal-seafoam'\n | 'green-grass'\n | 'yellow-amber'\n | 'orange-pumpkin'\n | 'red-tomato'\n | 'pink-magenta'\n | 'purple-plum'\n | 'purple-violet'\n | 'purple-lavender'\n | 'pink-rose'\n | 'green-jade'\n | 'lime-pear'\n | 'yellow-nova'\n | 'brand-green';\n\n /** Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions.\n * - `accent` - Highlights important actions or draws attention to primary interactive elements.\n * - `warning` - Indicates cautionary actions that require careful consideration before proceeding.\n * - `success` - Represents positive outcomes, confirmations, or constructive actions.\n * - `danger` - Signals destructive or irreversible actions that need extra attention and confirmation.\n */\n status?: 'accent' | 'warning' | 'success' | 'danger';\n\n /** Controls the visual scale of an element to match its importance and available space.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n */\n size?: 'sm' | 'md' | 'lg';\n\n /**\n * Demonstrates different container styles to accommodate visual weight and context.\n * - `flat` Element has white space bounds but reduced visual container.\n * - `inline` Element container reduces to fit within inline content such as a block of text.\n * - `inset` Element container optimizes for embedding or inset placement inside another containing element.\n * - `full` Element container optimizes for filling its container bounds.\n */\n container?: 'inline' | 'flat' | 'inset' | 'full';\n\n /** Determines the position of an element along both inline and block axis. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout) */\n position?:\n | 'top-start'\n | 'top-end'\n | 'top-center'\n | 'bottom-start'\n | 'bottom-end'\n | 'bottom-center'\n | 'left-start'\n | 'left-end'\n | 'left-center'\n | 'right-start'\n | 'right-end'\n | 'right-center';\n\n /** Determines the alignment of the popover relative to the provided anchor element. */\n alignment?: 'start' | 'end' | 'center';\n\n /** Provides the element that the popover should position relative to. Anchor can accept a idref string within the same render root or a HTMLElement DOM reference. */\n anchor?: string | HTMLElement;\n\n /** Defines what element triggers an `open` interaction event. A trigger can accept a idref string within the same render root or a HTMLElement DOM reference. */\n trigger?: string | HTMLElement;\n\n /** Defines named content areas where users can insert custom markup into the element.\n * - `default` - The primary content area for the element.\n * - `prefix` - Content that appears before the main element content.\n * - `suffix` - Content that appears after the main element content.\n * - `header` - Content that appears at the top of the element, used for titles or introductory information.\n * - `footer` - Content that appears at the bottom of the element, used for supplementary information or actions.\n * - `actions` - Content area specifically for interactive controls like buttons or links.\n * - `icon` - Content area for displaying an icon that represents the element's purpose or state.\n */\n slots?: 'default' | 'prefix' | 'suffix' | 'header' | 'footer' | 'actions' | 'icon';\n\n /**\n * Sets the automatic dismissal time in milliseconds before the element emits a `close` event. Allow ~200-250ms per word for comfortable reading.\n * - `0` - Warning or error messages requiring immediate acknowledgment.\n * - `3000` - Brief success or confirmation messages.\n * - `7000` - Standard informational messages.\n * - `10000` - Messages with actions or requiring user decision.\n */\n closeTimeout?: number;\n\n /**\n * Sets the delay in milliseconds before the element emits a `open` event.\n * - `0` - Keyboard focus interactions (always immediate for accessibility).\n * - `500` - Dense interfaces with many tooltips to reduce visual noise and prevent accidental triggers.\n */\n openDelay?: number;\n\n /** @private An instance of `ElementInternals` that decorators/controllers set dynamically */\n _internals: ElementInternals;\n\n render: TemplateResult;\n}\n\n/** Defines named content areas where users can insert custom markup into the element.\n * - `default` - The primary content area for the element.\n * - `prefix` - Content that appears before the main element content.\n * - `suffix` - Content that appears after the main element content.\n * - `header` - Content that appears at the top of the element, used for titles or introductory information.\n * - `footer` - Content that appears at the bottom of the element, used for supplementary information or actions.\n * - `actions` - Content area specifically for interactive controls like buttons or links.\n * - `icon` - Content area for displaying an icon that represents the element's purpose or state.\n */\nexport type SlotName = 'default' | 'prefix' | 'suffix' | 'header' | 'footer' | 'actions' | 'icon';\n\n/** @deprecated Determines the flat container element interaction. */\nexport type FlatInteraction = 'flat' | 'flat-emphasize' | `${'flat'}-${Interaction}`;\n\n/** @deprecated Determines if an element renders with an inverse contrast. */\nexport type Inverse = 'inverse';\n\n/** @deprecated Determines the trend status of an element. Should convey the trend of a metric. */\nexport type TrendStatus = 'trend-down' | 'trend-up' | 'trend-neutral';\n\n/** The Interaction type provides a way to show the intent of an interactive element. This can help users quickly understand what each interaction does and reduce the potential for confusion or errors.\n * - `emphasis` Shows the interaction targets emphasis or highlighting primary actions.\n * - `destructive` Shows the interaction targets destructive actions such as deleting or removing.\n */\nexport type Interaction = 'emphasis' | 'destructive';\n\nexport interface ContainerElement {\n container?: Partial<Container>;\n}\n\n/** An element that renders complex data structures (e.g., arrays, series, matrices) rather than composable UI content and values expressible with primitive attributes. */\nexport interface DataElement<T extends unknown[] | Record<string, unknown>> {\n data?: T;\n}\n\nexport const statusIcons: { [key: string]: IconName } = {\n '': 'information-circle-stroke',\n undefined: 'information-circle-stroke',\n default: 'information-circle-stroke',\n accent: 'information-circle-stroke',\n warning: 'exclamation-triangle',\n success: 'checkmark-circle',\n danger: 'exclamation-circle',\n scheduled: 'clock',\n failed: 'x-circle',\n finished: 'checkmark-circle',\n unknown: 'question-mark-circle',\n queued: 'bar-pill-stack',\n running: 'running',\n restarting: 'refresh',\n stopping: 'stop-sign',\n pending: 'circle-dash',\n starting: 'circle-dot',\n 'trend-up': 'trend-up',\n 'trend-down': 'trend-down',\n 'trend-neutral': 'minus',\n ignored: 'circle-angled-line'\n} as const;\n\ndeclare global {\n var NVE_ELEMENTS: {\n state: {\n bundle: boolean;\n env: 'watch' | 'production' | 'development';\n pageHost: string;\n moduleHost: string;\n versions: string[];\n scopedRegistry: { [key: string]: CustomElementRegistry };\n elementRegistry: Readonly<{ [key: string]: string }>;\n i18nRegistry: Readonly<{ [key: string]: string }>;\n audit: Readonly<{\n [key: string]: {\n count?: number;\n excessiveInstanceLimitAudited?: boolean;\n };\n }>;\n };\n debug: (log?: (...args: unknown[]) => void) => void;\n };\n\n interface HTMLElement {\n 'nve-text': string;\n 'nve-layout': string;\n }\n\n interface CustomElementRegistry {\n initialize(root: ShadowRoot | Document): void;\n }\n\n var CustomElementRegistry: {\n new (): CustomElementRegistry;\n prototype: CustomElementRegistry;\n };\n}\n\nexport interface ElementDefinition extends CustomElementConstructor {\n metadata: { version: string; tag: string };\n elementDefinitions?: { [key: string]: ElementDefinition };\n shadowRootOptions?: { customElementRegistry?: CustomElementRegistry | null };\n}\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport interface OffsetPoint {\n offsetX: number;\n offsetY: number;\n}\n\nexport interface Dimensions {\n width: number;\n height: number;\n}\n\nexport type Rect = Point & Dimensions;\n\nexport interface Scale {\n min: number;\n max: number;\n}\n\n/** https://github.com/tc39/proposal-decorators */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nexport type LegacyDecoratorTarget = Function & {\n addInitializer?: (initializer: (instance: any) => void) => void; // eslint-disable-line @typescript-eslint/no-explicit-any\n};\n"],"mappings":";AAqZA,IAAa,IAA2C;CACtD,IAAI;CACJ,WAAW;CACX,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,UAAU;CACV,SAAS;CACT,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,UAAU;CACV,SAAS;CACT,UAAU;CACV,YAAY;CACZ,cAAc;CACd,iBAAiB;CACjB,SAAS;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y.js","names":[],"sources":["../../../src/internal/utils/a11y.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { generateId } from './dom.js';\n\nexport function attachInternals(element: HTMLElement & { _internals?: ElementInternals }) {\n if (element._internals === undefined) {\n element._internals = element.attachInternals() as unknown as ElementInternals;\n }\n}\n\nexport function associateLabel(label: HTMLLabelElement, input: HTMLInputElement) {\n if (label && input) {\n input.id = input.id ? input.id : generateId();\n label.htmlFor = input.id;\n }\n}\n\nexport function associateAriaLabel(label: HTMLElement, element: HTMLElement) {\n if (label && element) {\n label.id = label.id ? label.id : generateId();\n element.setAttribute('aria-labelledby', label.id);\n }\n}\n\nexport function associateAriaDescribedBy(messages: HTMLElement[], element: HTMLElement) {\n if (messages.length && element) {\n const ids = messages.map(m => (m.id = generateId())).join(' ');\n element.setAttribute('aria-describedby', ids);\n }\n}\n\nexport function associateDataList(datalist: HTMLDataListElement, element: HTMLInputElement) {\n if (datalist) {\n datalist.id = datalist.id?.length ? datalist.id : generateId();\n element.setAttribute('list', datalist.id);\n }\n}\n\nexport function associateControlGroup(elements: HTMLInputElement[]) {\n if (!elements.find(e => e?.name?.length)) {\n const name = generateId();\n elements.forEach(e => (e.name = name));\n }\n}\n"],"mappings":";;AAKA,SAAgB,EAAgB,GAA0D;
|
|
1
|
+
{"version":3,"file":"a11y.js","names":[],"sources":["../../../src/internal/utils/a11y.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { generateId } from './dom.js';\n\nexport function attachInternals(element: HTMLElement & { _internals?: ElementInternals }) {\n if (element._internals === undefined) {\n element._internals = element.attachInternals() as unknown as ElementInternals;\n }\n}\n\nexport function associateLabel(label: HTMLLabelElement, input: HTMLInputElement) {\n if (label && input) {\n input.id = input.id ? input.id : generateId();\n label.htmlFor = input.id;\n }\n}\n\nexport function associateAriaLabel(label: HTMLElement, element: HTMLElement) {\n if (label && element) {\n label.id = label.id ? label.id : generateId();\n element.setAttribute('aria-labelledby', label.id);\n }\n}\n\nexport function associateAriaDescribedBy(messages: HTMLElement[], element: HTMLElement) {\n if (messages.length && element) {\n const ids = messages.map(m => (m.id = generateId())).join(' ');\n element.setAttribute('aria-describedby', ids);\n }\n}\n\nexport function associateDataList(datalist: HTMLDataListElement, element: HTMLInputElement) {\n if (datalist) {\n datalist.id = datalist.id?.length ? datalist.id : generateId();\n element.setAttribute('list', datalist.id);\n }\n}\n\nexport function associateControlGroup(elements: HTMLInputElement[]) {\n if (!elements.find(e => e?.name?.length)) {\n const name = generateId();\n elements.forEach(e => (e.name = name));\n }\n}\n"],"mappings":";;AAKA,SAAgB,EAAgB,GAA0D;CACxF,AAAI,EAAQ,eAAe,KAAA,MACzB,EAAQ,aAAa,EAAQ,gBAAgB;AAEjD;AAEA,SAAgB,EAAe,GAAyB,GAAyB;CAC/E,AAAI,KAAS,MACX,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,EAAW,GAC5C,EAAM,UAAU,EAAM;AAE1B;AAEA,SAAgB,EAAmB,GAAoB,GAAsB;CAC3E,AAAI,KAAS,MACX,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,EAAW,GAC5C,EAAQ,aAAa,mBAAmB,EAAM,EAAE;AAEpD;AAEA,SAAgB,EAAyB,GAAyB,GAAsB;CACtF,IAAI,EAAS,UAAU,GAAS;EAC9B,IAAM,IAAM,EAAS,KAAI,MAAM,EAAE,KAAK,EAAW,CAAE,EAAE,KAAK,GAAG;EAC7D,EAAQ,aAAa,oBAAoB,CAAG;CAC9C;AACF;AAEA,SAAgB,EAAkB,GAA+B,GAA2B;CAC1F,AAAI,MACF,EAAS,KAAK,EAAS,IAAI,SAAS,EAAS,KAAK,EAAW,GAC7D,EAAQ,aAAa,QAAQ,EAAS,EAAE;AAE5C;AAEA,SAAgB,EAAsB,GAA8B;CAClE,IAAI,CAAC,EAAS,MAAK,MAAK,GAAG,MAAM,MAAM,GAAG;EACxC,IAAM,IAAO,EAAW;EACxB,EAAS,SAAQ,MAAM,EAAE,OAAO,CAAK;CACvC;AACF"}
|
|
@@ -7,4 +7,3 @@ export declare function getSSRMismatchWarning(localName: string): string;
|
|
|
7
7
|
export declare function getCrossShadowRootAnchorWarning(localName: string): string;
|
|
8
8
|
export declare function getDuplicatePackageVersionWarning(localName: string, version: string): string;
|
|
9
9
|
export declare function getDuplicatePackageGlobalVersionWarning(): string;
|
|
10
|
-
export declare function getEsmHostedWarning(): string;
|
|
@@ -22,10 +22,7 @@ function s(e, n) {
|
|
|
22
22
|
function c() {
|
|
23
23
|
return `@nve: Multiple versions of Elements loaded, please check for duplicate package versions. ${t}#duplicate-package-version`;
|
|
24
24
|
}
|
|
25
|
-
function l() {
|
|
26
|
-
return "@nve: Using esm.sh is not supported for production use.";
|
|
27
|
-
}
|
|
28
25
|
//#endregion
|
|
29
|
-
export { c as getDuplicatePackageGlobalVersionWarning, s as getDuplicatePackageVersionWarning,
|
|
26
|
+
export { c as getDuplicatePackageGlobalVersionWarning, s as getDuplicatePackageVersionWarning, n as getExcessiveInstanceLimitWarning, a as getIdMatchNotFoundWarning, i as getInvalidParentWarning, r as getInvalidSlottedChildrenWarning, o as getSSRMismatchWarning };
|
|
30
27
|
|
|
31
28
|
//# sourceMappingURL=audit-logs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-logs.js","names":[],"sources":["../../../src/internal/utils/audit-logs.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { DOCS_URL } from './strings.js';\n\nexport const DOCS_LOG_URL = `${DOCS_URL}docs/api-design/logs/`;\n\nexport function getExcessiveInstanceLimitWarning(count: number, localName: string) {\n return `Excessive rendering of ${count} ${localName} were detected in DOM. Recycle/reuse elements when possible to improve application performance. ${DOCS_LOG_URL}#excessive-instance-limit`;\n}\n\nexport function getInvalidSlottedChildrenWarning(localName: string, allowed: Array<string>) {\n return `Invalid slotted elements detected in ${localName}. Allowed: ${allowed.join(', ')}. ${DOCS_LOG_URL}#invalid-slotted-children`;\n}\n\nexport function getInvalidParentWarning(localName: string, allowedParent: string) {\n return `Element ${localName} can only be used as a direct child of ${allowedParent}. ${DOCS_LOG_URL}#invalid-parent`;\n}\n\nexport function getIdMatchNotFoundWarning(id: string) {\n return `Provided id \"${id}\" not found in DOM. ${DOCS_LOG_URL}#id-match-not-found`;\n}\n\nexport function getSSRMismatchWarning(localName: string) {\n return `${localName} rendered on the client with mismatched SSR content. ${DOCS_LOG_URL}#ssr-mismatch`;\n}\n\nexport function getCrossShadowRootAnchorWarning(localName: string) {\n return `(deprecated) ${localName} provided an anchor outside of its render root. ${DOCS_LOG_URL}#cross-shadow-root-anchor`;\n}\n\nexport function getDuplicatePackageVersionWarning(localName: string, version: string) {\n return `@nve: Element ${localName} version ${version} already defined, please check for duplicate package versions. ${DOCS_LOG_URL}#duplicate-package-version`;\n}\n\nexport function getDuplicatePackageGlobalVersionWarning() {\n return `@nve: Multiple versions of Elements loaded, please check for duplicate package versions. ${DOCS_LOG_URL}#duplicate-package-version`;\n}\n
|
|
1
|
+
{"version":3,"file":"audit-logs.js","names":[],"sources":["../../../src/internal/utils/audit-logs.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { DOCS_URL } from './strings.js';\n\nexport const DOCS_LOG_URL = `${DOCS_URL}docs/api-design/logs/`;\n\nexport function getExcessiveInstanceLimitWarning(count: number, localName: string) {\n return `Excessive rendering of ${count} ${localName} were detected in DOM. Recycle/reuse elements when possible to improve application performance. ${DOCS_LOG_URL}#excessive-instance-limit`;\n}\n\nexport function getInvalidSlottedChildrenWarning(localName: string, allowed: Array<string>) {\n return `Invalid slotted elements detected in ${localName}. Allowed: ${allowed.join(', ')}. ${DOCS_LOG_URL}#invalid-slotted-children`;\n}\n\nexport function getInvalidParentWarning(localName: string, allowedParent: string) {\n return `Element ${localName} can only be used as a direct child of ${allowedParent}. ${DOCS_LOG_URL}#invalid-parent`;\n}\n\nexport function getIdMatchNotFoundWarning(id: string) {\n return `Provided id \"${id}\" not found in DOM. ${DOCS_LOG_URL}#id-match-not-found`;\n}\n\nexport function getSSRMismatchWarning(localName: string) {\n return `${localName} rendered on the client with mismatched SSR content. ${DOCS_LOG_URL}#ssr-mismatch`;\n}\n\nexport function getCrossShadowRootAnchorWarning(localName: string) {\n return `(deprecated) ${localName} provided an anchor outside of its render root. ${DOCS_LOG_URL}#cross-shadow-root-anchor`;\n}\n\nexport function getDuplicatePackageVersionWarning(localName: string, version: string) {\n return `@nve: Element ${localName} version ${version} already defined, please check for duplicate package versions. ${DOCS_LOG_URL}#duplicate-package-version`;\n}\n\nexport function getDuplicatePackageGlobalVersionWarning() {\n return `@nve: Multiple versions of Elements loaded, please check for duplicate package versions. ${DOCS_LOG_URL}#duplicate-package-version`;\n}\n"],"mappings":";;AAKA,IAAa,IAAe,GAAG,EAAS;AAExC,SAAgB,EAAiC,GAAe,GAAmB;CACjF,OAAO,0BAA0B,EAAM,GAAG,EAAU,kGAAkG,EAAa;AACrK;AAEA,SAAgB,EAAiC,GAAmB,GAAwB;CAC1F,OAAO,wCAAwC,EAAU,aAAa,EAAQ,KAAK,IAAI,EAAE,IAAI,EAAa;AAC5G;AAEA,SAAgB,EAAwB,GAAmB,GAAuB;CAChF,OAAO,WAAW,EAAU,yCAAyC,EAAc,IAAI,EAAa;AACtG;AAEA,SAAgB,EAA0B,GAAY;CACpD,OAAO,gBAAgB,EAAG,sBAAsB,EAAa;AAC/D;AAEA,SAAgB,EAAsB,GAAmB;CACvD,OAAO,GAAG,EAAU,uDAAuD,EAAa;AAC1F;AAMA,SAAgB,EAAkC,GAAmB,GAAiB;CACpF,OAAO,iBAAiB,EAAU,WAAW,EAAQ,iEAAiE,EAAa;AACrI;AAEA,SAAgB,IAA0C;CACxD,OAAO,4FAA4F,EAAa;AAClH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","names":[],"sources":["../../../src/internal/utils/audit.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function auditSlots(\n host: HTMLElement & { constructor: { metadata?: { children?: string[]; disallowedChildren?: string[] } } }\n): [Element[], string[]] {\n const validElements = ['template', ...(host.constructor.metadata?.children ?? [])].filter(c => typeof c === 'string');\n const invalidElements = Array.from(host.shadowRoot!.querySelectorAll('slot')).flatMap(slot =>\n slot.assignedElements().filter(e => !validElements.map(i => i).includes(e.localName))\n );\n return [invalidElements, validElements];\n}\n\nexport function auditParentElement(\n host: HTMLElement & { constructor: { metadata?: { parents?: string[] } } }\n): [boolean, string[]] {\n const validParentTags = host.constructor.metadata?.parents ?? [];\n return validParentTags.length\n ? [!!validParentTags.find(p => host.parentElement?.localName === p), validParentTags]\n : [true, []];\n}\n"],"mappings":";AAGA,SAAgB,EACd,GACuB;CACvB,IAAM,IAAgB,CAAC,YAAY,GAAI,EAAK,YAAY,UAAU,YAAY,
|
|
1
|
+
{"version":3,"file":"audit.js","names":[],"sources":["../../../src/internal/utils/audit.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function auditSlots(\n host: HTMLElement & { constructor: { metadata?: { children?: string[]; disallowedChildren?: string[] } } }\n): [Element[], string[]] {\n const validElements = ['template', ...(host.constructor.metadata?.children ?? [])].filter(c => typeof c === 'string');\n const invalidElements = Array.from(host.shadowRoot!.querySelectorAll('slot')).flatMap(slot =>\n slot.assignedElements().filter(e => !validElements.map(i => i).includes(e.localName))\n );\n return [invalidElements, validElements];\n}\n\nexport function auditParentElement(\n host: HTMLElement & { constructor: { metadata?: { parents?: string[] } } }\n): [boolean, string[]] {\n const validParentTags = host.constructor.metadata?.parents ?? [];\n return validParentTags.length\n ? [!!validParentTags.find(p => host.parentElement?.localName === p), validParentTags]\n : [true, []];\n}\n"],"mappings":";AAGA,SAAgB,EACd,GACuB;CACvB,IAAM,IAAgB,CAAC,YAAY,GAAI,EAAK,YAAY,UAAU,YAAY,CAAC,CAAE,EAAE,QAAO,MAAK,OAAO,KAAM,QAAQ;CAIpH,OAAO,CAHiB,MAAM,KAAK,EAAK,WAAY,iBAAiB,MAAM,CAAC,EAAE,SAAQ,MACpF,EAAK,iBAAiB,EAAE,QAAO,MAAK,CAAC,EAAc,KAAI,MAAK,CAAC,EAAE,SAAS,EAAE,SAAS,CAAC,CAE9E,GAAiB,CAAa;AACxC;AAEA,SAAgB,EACd,GACqB;CACrB,IAAM,IAAkB,EAAK,YAAY,UAAU,WAAW,CAAC;CAC/D,OAAO,EAAgB,SACnB,CAAC,CAAC,CAAC,EAAgB,MAAK,MAAK,EAAK,eAAe,cAAc,CAAC,GAAG,CAAe,IAClF,CAAC,IAAM,CAAC,CAAC;AACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.js","names":[],"sources":["../../../src/internal/utils/dom.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { GlobalStateService } from '../services/global.service.js';\nimport type { ElementDefinition } from '../types/index.js';\nimport { isFocusable } from './focus.js';\n\nexport function getChildren(node: Document | Node | HTMLElement): Element[] {\n if (node instanceof Document && node.documentElement) {\n return Array.from(node.documentElement.children); // root document children\n } else if (node instanceof HTMLElement && node.shadowRoot) {\n return Array.from(node.shadowRoot.children); // shadow root direct children\n } else if (node instanceof HTMLSlotElement && node.assignedElements) {\n const slotted = node.assignedElements(); // slotted elements\n return slotted.length ? slotted : Array.from(node.children); // slot fallback\n } else {\n return Array.from((node as HTMLElement).children); // light DOM direct children\n }\n}\n\nexport function generateId() {\n const uint32 = self.crypto.getRandomValues(new Uint32Array(1))[0]!;\n return `_${uint32.toString(16)}`;\n}\n\nexport function getAttributeChanges(element: HTMLElement, attr: string, fn: (attrValue: string | null) => void) {\n fn(element.getAttribute(attr));\n const observer = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.attributeName === attr) {\n fn((mutation.target as HTMLElement).getAttribute(attr));\n }\n });\n });\n observer.observe(element, { attributes: true, subtree: true });\n return observer;\n}\n\nexport function getAttributeListChanges(element: HTMLElement, attrs: string[], fn: (mutation: MutationRecord) => void) {\n const observer = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.attributeName && attrs.includes(mutation.attributeName)) {\n fn(mutation);\n }\n });\n });\n observer.observe(element, { attributes: true, subtree: true });\n return observer;\n}\n\n/**\n * Appends styles to the render root of a given element. This is useful for\n * styles that apply outside the scope of the element's shadow\n * root such as UA styles --webkit-* that won't work in a ::slotted selector\n */\nexport function appendRootNodeStyle(host: HTMLElement, styles: string) {\n const stylesheet = new CSSStyleSheet();\n stylesheet.replaceSync(styles);\n const root = host.getRootNode() as Document | ShadowRoot;\n if (root.adoptedStyleSheets) {\n const hasStyleSheet = root.adoptedStyleSheets\n .map(s => styleSheetToString(s))\n .find(s => s === styleSheetToString(stylesheet));\n if (!hasStyleSheet) {\n root.adoptedStyleSheets = [...Array.from(root.adoptedStyleSheets), stylesheet];\n }\n }\n return stylesheet;\n}\n\nexport function styleSheetToString(stylesheet: CSSStyleSheet) {\n return stylesheet.cssRules\n ? Array.from(stylesheet.cssRules)\n .map(rule => rule.cssText || '')\n .join('\\n')\n : '';\n}\n\n/** Intercepts a property setter on an element so `callback` fires on every assignment. Does not use a MutationObserver. */\nexport function getPropertyChanges(element: HTMLElement, key: string, callback: (value: unknown) => void) {\n const proto = Object.getPrototypeOf(element);\n const descriptor = Object.getOwnPropertyDescriptor(proto, key);\n if (!descriptor) return;\n const own = Object.getOwnPropertyDescriptor(element, key);\n if (own && own.configurable === false) return;\n Object.defineProperty(element, key, {\n configurable: true,\n get: descriptor.get,\n set: (val: unknown) => {\n descriptor.set!.call(element, val);\n callback(val);\n }\n });\n}\n\n/* used for cases of needing to know a property update outside of lit, example a native input value prop change */\nexport function getElementUpdate(element: HTMLElement, key: string, callback: (value: unknown) => void) {\n if (element.hasAttribute(key)) {\n callback(element.getAttribute(key));\n } else if ((element as unknown as Record<string, unknown>)[key] !== undefined) {\n callback((element as unknown as Record<string, unknown>)[key]);\n }\n\n getPropertyChanges(element, key, callback);\n return getAttributeChanges(element, key, val => callback(val));\n}\n\nexport function clickOutsideElementBounds(event: PointerEvent | MouseEvent, element: HTMLElement) {\n const { left, right, top, bottom } = element.getBoundingClientRect();\n return event.clientX < left || event.clientX > right || event.clientY < top || event.clientY > bottom;\n}\n\n/** parses number out of basic calc generated by the design tokens */\nexport function parseTokenNumber(value: string) {\n return parseInt(value.includes('calc') ? value.split('*')[1]!.replace('px)', '').trim() : value, 10) || 0;\n}\n\n/** true if the browser supports scoped custom element registries */\nexport const supportsScopedRegistry =\n globalThis.CustomElementRegistry && 'initialize' in CustomElementRegistry.prototype;\n\n/** defines an element with the given custom element registry */\nexport function defineElement(element: ElementDefinition, customElementRegistry: CustomElementRegistry) {\n Object.entries(element.elementDefinitions ?? {})\n .filter(([_tag, e]) => !customElementRegistry.get(e.metadata.tag))\n .forEach(([_tag, e]) => {\n defineElement(e, customElementRegistry);\n });\n\n if (!customElementRegistry.get(element.metadata.tag)) {\n customElementRegistry.define(element.metadata.tag, element);\n\n if (customElementRegistry === customElements) {\n GlobalStateService.dispatch('NVE_ELEMENT_DEFINE', {\n elementRegistry: { [element.metadata.tag]: element.metadata.version }\n });\n }\n }\n}\n\n/** defines an element with the global custom element registry */\nexport function define(element: ElementDefinition) {\n const { version } = element.metadata;\n\n // if scoped registry supported, register only the root element to global registry\n if (supportsScopedRegistry && !customElements.get(element.metadata.tag)) {\n customElements.define(element.metadata.tag, element);\n GlobalStateService.dispatch('NVE_ELEMENT_DEFINE', {\n elementRegistry: { [element.metadata.tag]: element.metadata.version }\n });\n } else {\n // if scoped registry not supported, register the element and all its children to the global registry\n defineElement(element, customElements);\n }\n\n // warn on duplicate version\n if (\n GlobalStateService.state.elementRegistry[element.metadata.tag] !== version &&\n globalThis?.location?.hostname === 'localhost'\n ) {\n void import('./audit-logs.js').then(m =>\n console.warn(m.getDuplicatePackageVersionWarning(element.metadata.tag, version))\n );\n }\n}\n\nexport function isContextMenuClick(event: MouseEvent) {\n return (event.buttons === 2 && !event.ctrlKey) || (event.buttons === 1 && event.ctrlKey);\n}\n\nexport function getFlattenedFocusableItems(element: Node, depth = 10) {\n return getFlattenedDOMTree(element, depth).filter((e: HTMLElement) => isFocusable(e)) as HTMLElement[];\n}\n\n/**\n * Preserves visual DOM ordering when using slots within Shadow DOM\n * See more information/resources on Shadow DOM linear traversal\n * https://nolanlawson.com/2021/02/13/managing-focus-in-the-shadow-dom/\n * https://www.abeautifulsite.net/posts/querying-through-shadow-roots/\n */\nexport function getFlattenedDOMTree(node: Node, depth = 10): HTMLElement[] {\n return (\n Array.from(getChildren(node)).reduce(\n (p: unknown[], n: Node) => [\n ...p,\n [n, [...Array.from(getChildren(n)).map(i => [i, getFlattenedDOMTree(i, depth)])]]\n ],\n []\n ) as unknown as HTMLElement[]\n ).flat(depth);\n}\n\nexport function validKeyNavigationCode(e: KeyboardEvent) {\n return keynavCodes.has(e.code);\n}\n\nexport enum KeynavCode {\n End = 'End',\n Home = 'Home',\n PageUp = 'PageUp',\n PageDown = 'PageDown',\n ArrowUp = 'ArrowUp',\n ArrowDown = 'ArrowDown',\n ArrowLeft = 'ArrowLeft',\n ArrowRight = 'ArrowRight'\n}\n\nconst keynavCodes: Set<string> = new Set(Object.values(KeynavCode));\n\nexport function hasInvalidDOMGrid(rows: HTMLElement[]) {\n return rows.some(row => row.children.length !== rows[0]!.children.length);\n}\n\nexport function removeEmptyTextNode(node: Node) {\n if ((node as Text)?.wholeText?.trim() === '') {\n (node as Text).remove();\n }\n}\n\nexport function scrollBarWidth() {\n const div = globalThis.document.createElement('div');\n div.style.setProperty('width', '100px');\n div.style.setProperty('height', '100px');\n div.style.setProperty('overflow', 'scroll');\n div.style.setProperty('position', 'absolute');\n div.style.setProperty('top', '-9999px');\n globalThis.document.body.appendChild(div);\n const width = div.offsetWidth - div.clientWidth;\n globalThis.document.body.removeChild(div);\n return width;\n}\n\nexport function hasScrollBar(el: HTMLElement) {\n return el.scrollHeight > el.clientHeight;\n}\n\nexport function hasHorizontalScrollBar(el: HTMLElement) {\n return el.scrollWidth > el.clientWidth;\n}\n\nexport function endOfScrollBox(element: HTMLElement, offset = 0) {\n return element.scrollTop + element.offsetHeight + offset >= element.scrollHeight;\n}\n\nexport async function openEyeDropper(): Promise<string> {\n return await new (\n globalThis as unknown as { EyeDropper: new () => { open: () => Promise<{ sRGBHex: string }> } }\n ).EyeDropper()\n .open()\n .then((color: { sRGBHex: string }) => color.sRGBHex);\n}\n\n/**\n * provides a object with key/value of the currently applied design tokens\n */\nexport function getThemeTokens(element = globalThis.document.querySelector(':root')!) {\n // default root or provided element\n const styles = getComputedStyle(element);\n let parent: CSSStyleSheet[] = [];\n\n // check for parent iframe, same domain iframes change how the browser accesses style sheets\n try {\n parent = Array.from(globalThis.parent.document.styleSheets);\n } catch {\n // if not accessible, skip\n }\n\n return [...parent, ...Array.from(globalThis.document.styleSheets)]\n .reduce((finalArr: string[][], sheet) => {\n let rules: CSSRule[] = [];\n try {\n rules = [...sheet.cssRules];\n } catch {\n // if the style sheet is not accessible, skip\n }\n return finalArr.concat(\n rules\n .filter(rule => rule.type === 1)\n .reduce((propValArr: string[][], rule) => {\n const props = [...(rule as CSSStyleRule).style]\n .filter((p: string) => p.trim().includes('--nve'))\n .map((propName: string) => [\n propName.trim(),\n (rule as CSSStyleRule).style.getPropertyValue(propName).trim()\n ]);\n return [...propValArr, ...props];\n }, [])\n );\n }, [])\n .reduce(\n (p: Record<string, string>, token: string[]) => ({ ...p, [token[0]!]: styles.getPropertyValue(token[0]!) }),\n {}\n );\n}\n\nexport function removeEmptySlotWhitespace(slot: HTMLSlotElement) {\n if (slotContainsOnlyWhitespace(slot)) {\n slot.assignedNodes().forEach((node: Node) => node.parentNode?.removeChild(node));\n }\n}\n\nexport function slotContainsOnlyWhitespace(slot: HTMLSlotElement) {\n const hasNoElements = !slot.assignedNodes().find(i => i.nodeType !== Node.TEXT_NODE);\n const hasOnlyEmptyTextNodes = !slot\n .assignedNodes()\n .find(i => i.nodeType === Node.TEXT_NODE && (i.textContent ?? '').trim() !== '');\n return hasNoElements && hasOnlyEmptyTextNodes;\n}\n\nexport function applySlotContentStates(slot: HTMLSlotElement, element: HTMLElement & { _internals: ElementInternals }) {\n const nodes = slot.assignedNodes();\n const name = slot.name ?? 'slot';\n\n if (nodes.length) {\n element._internals.states.add(`has-${name}`);\n } else {\n element._internals.states.delete(`has-${name}`);\n }\n}\n\nexport function getDisplayValue(option?: { label?: string; value?: string }): string {\n return option?.label || option?.value || '';\n}\n\n/** determines if HTML element matches the given component tag */\nexport function matchesElementName(element: Partial<HTMLElement>, component: { metadata: { tag: string } }) {\n return element.localName === component.metadata.tag;\n}\n\nexport function createGhostElement(sourceElement: HTMLElement) {\n const ghost = globalThis.document.createElement('div');\n const { width } = sourceElement.getBoundingClientRect();\n ghost.setAttribute('nve-ghost', '');\n ghost.style.minWidth = `${width}px`;\n ghost.style.maxWidth = `${width}px`;\n ghost.style.height = '1px';\n ghost.slot = sourceElement.slot;\n return ghost;\n}\n\nexport function sameRenderRoot(element1: HTMLElement, element2: HTMLElement) {\n const root1 = element1.getRootNode();\n const root2 = element2.getRootNode();\n const sameShadowRoot = root1 instanceof ShadowRoot && root2 instanceof ShadowRoot && root1 === root2;\n const sameDocumentRoot = root1 === globalThis.document && root2 === globalThis.document;\n const sameUnattachedRoot = root1 === root2;\n return sameShadowRoot || sameDocumentRoot || sameUnattachedRoot;\n}\n\nexport function getAnchorNames(element: HTMLElement): string[] {\n return (\n element.style.anchorName\n ?.split(',')\n ?.map(name => name.trim())\n ?.filter(name => name !== 'none' && name !== '') ?? []\n );\n}\n\nexport function removeAnchorName(element: HTMLElement, name: string) {\n const anchorNames = getAnchorNames(element);\n element.style.anchorName = anchorNames.filter(i => i !== name).join(',');\n}\n\nexport function appendAnchorName(element: HTMLElement, name: string) {\n element.style.anchorName = Array.from(new Set([...getAnchorNames(element), name])).join(',');\n}\n\n/**\n * Returns true when both arrays have the same length and each index is strictly equal (`===`).\n */\nexport function sameOrderedStringArray(a: readonly string[], b: readonly string[]): boolean {\n return a.length === b.length && a.every((value, index) => value === b[index]);\n}\n\n/**\n * Returns unique non-empty strings in first-seen order (insertion order of a `Set` over the filtered list).\n */\nexport function uniqueNonEmptyStrings(values: Iterable<string | null | undefined>): string[] {\n return Array.from(\n new Set(Array.from(values).filter((value): value is string => typeof value === 'string' && value.length > 0))\n );\n}\n"],"mappings":";;;AAOA,SAAgB,EAAY,GAAgD;AAC1E,KAAI,aAAgB,YAAY,EAAK,gBACnC,QAAO,MAAM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AI;;AAM9F,SAAgB,EAAuB,GAAsB,GAA+B;AAC1F,QAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,GAAO,MAAU,MAAU,EAAE,GAAO;;AAM/E,SAAgB,EAAsB,GAAuD;AAC3F,QAAO,MAAM,KACX,IAAI,IAAI,MAAM,KAAK,EAAO,CAAC,QAAQ,MAA2B,OAAO,KAAU,YAAY,EAAM,SAAS,EAAE,CAAC,CAC9G"}
|
|
1
|
+
{"version":3,"file":"dom.js","names":[],"sources":["../../../src/internal/utils/dom.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { GlobalStateService } from '../services/global.service.js';\nimport type { ElementDefinition } from '../types/index.js';\nimport { isFocusable } from './focus.js';\n\nexport function getChildren(node: Document | Node | HTMLElement): Element[] {\n if (node instanceof Document && node.documentElement) {\n return Array.from(node.documentElement.children); // root document children\n } else if (node instanceof HTMLElement && node.shadowRoot) {\n return Array.from(node.shadowRoot.children); // shadow root direct children\n } else if (node instanceof HTMLSlotElement && node.assignedElements) {\n const slotted = node.assignedElements(); // slotted elements\n return slotted.length ? slotted : Array.from(node.children); // slot fallback\n } else {\n return Array.from((node as HTMLElement).children); // light DOM direct children\n }\n}\n\nexport function generateId() {\n const uint32 = self.crypto.getRandomValues(new Uint32Array(1))[0]!;\n return `_${uint32.toString(16)}`;\n}\n\nexport function getAttributeChanges(element: HTMLElement, attr: string, fn: (attrValue: string | null) => void) {\n fn(element.getAttribute(attr));\n const observer = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.attributeName === attr) {\n fn((mutation.target as HTMLElement).getAttribute(attr));\n }\n });\n });\n observer.observe(element, { attributes: true, subtree: true });\n return observer;\n}\n\nexport function getAttributeListChanges(element: HTMLElement, attrs: string[], fn: (mutation: MutationRecord) => void) {\n const observer = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.attributeName && attrs.includes(mutation.attributeName)) {\n fn(mutation);\n }\n });\n });\n observer.observe(element, { attributes: true, subtree: true });\n return observer;\n}\n\n/**\n * Appends styles to the render root of a given element. This is useful for\n * styles that apply outside the scope of the element's shadow\n * root such as UA styles --webkit-* that won't work in a ::slotted selector\n */\nexport function appendRootNodeStyle(host: HTMLElement, styles: string) {\n const stylesheet = new CSSStyleSheet();\n stylesheet.replaceSync(styles);\n const root = host.getRootNode() as Document | ShadowRoot;\n if (root.adoptedStyleSheets) {\n const hasStyleSheet = root.adoptedStyleSheets\n .map(s => styleSheetToString(s))\n .find(s => s === styleSheetToString(stylesheet));\n if (!hasStyleSheet) {\n root.adoptedStyleSheets = [...Array.from(root.adoptedStyleSheets), stylesheet];\n }\n }\n return stylesheet;\n}\n\nexport function styleSheetToString(stylesheet: CSSStyleSheet) {\n return stylesheet.cssRules\n ? Array.from(stylesheet.cssRules)\n .map(rule => rule.cssText || '')\n .join('\\n')\n : '';\n}\n\n/** Intercepts a property setter on an element so `callback` fires on every assignment. Does not use a MutationObserver. */\nexport function getPropertyChanges(element: HTMLElement, key: string, callback: (value: unknown) => void) {\n const proto = Object.getPrototypeOf(element);\n const descriptor = Object.getOwnPropertyDescriptor(proto, key);\n if (!descriptor) return;\n const own = Object.getOwnPropertyDescriptor(element, key);\n if (own && own.configurable === false) return;\n Object.defineProperty(element, key, {\n configurable: true,\n get: descriptor.get,\n set: (val: unknown) => {\n descriptor.set!.call(element, val);\n callback(val);\n }\n });\n}\n\n/* used for cases of needing to know a property update outside of lit, example a native input value prop change */\nexport function getElementUpdate(element: HTMLElement, key: string, callback: (value: unknown) => void) {\n if (element.hasAttribute(key)) {\n callback(element.getAttribute(key));\n } else if ((element as unknown as Record<string, unknown>)[key] !== undefined) {\n callback((element as unknown as Record<string, unknown>)[key]);\n }\n\n getPropertyChanges(element, key, callback);\n return getAttributeChanges(element, key, val => callback(val));\n}\n\nexport function clickOutsideElementBounds(event: PointerEvent | MouseEvent, element: HTMLElement) {\n const { left, right, top, bottom } = element.getBoundingClientRect();\n return event.clientX < left || event.clientX > right || event.clientY < top || event.clientY > bottom;\n}\n\n/** parses number out of basic calc generated by the design tokens */\nexport function parseTokenNumber(value: string) {\n return parseInt(value.includes('calc') ? value.split('*')[1]!.replace('px)', '').trim() : value, 10) || 0;\n}\n\n/** true if the browser supports scoped custom element registries */\nexport const supportsScopedRegistry =\n globalThis.CustomElementRegistry && 'initialize' in CustomElementRegistry.prototype;\n\n/** defines an element with the given custom element registry */\nexport function defineElement(element: ElementDefinition, customElementRegistry: CustomElementRegistry) {\n Object.entries(element.elementDefinitions ?? {})\n .filter(([_tag, e]) => !customElementRegistry.get(e.metadata.tag))\n .forEach(([_tag, e]) => {\n defineElement(e, customElementRegistry);\n });\n\n if (!customElementRegistry.get(element.metadata.tag)) {\n customElementRegistry.define(element.metadata.tag, element);\n\n if (customElementRegistry === customElements) {\n GlobalStateService.dispatch('NVE_ELEMENT_DEFINE', {\n elementRegistry: { [element.metadata.tag]: element.metadata.version }\n });\n }\n }\n}\n\n/** defines an element with the global custom element registry */\nexport function define(element: ElementDefinition) {\n const { version } = element.metadata;\n\n // if scoped registry supported, register only the root element to global registry\n if (supportsScopedRegistry && !customElements.get(element.metadata.tag)) {\n customElements.define(element.metadata.tag, element);\n GlobalStateService.dispatch('NVE_ELEMENT_DEFINE', {\n elementRegistry: { [element.metadata.tag]: element.metadata.version }\n });\n } else {\n // if scoped registry not supported, register the element and all its children to the global registry\n defineElement(element, customElements);\n }\n\n // warn on duplicate version\n if (\n GlobalStateService.state.elementRegistry[element.metadata.tag] !== version &&\n globalThis?.location?.hostname === 'localhost'\n ) {\n void import('./audit-logs.js').then(m =>\n console.warn(m.getDuplicatePackageVersionWarning(element.metadata.tag, version))\n );\n }\n}\n\nexport function isContextMenuClick(event: MouseEvent) {\n return (event.buttons === 2 && !event.ctrlKey) || (event.buttons === 1 && event.ctrlKey);\n}\n\nexport function getFlattenedFocusableItems(element: Node, depth = 10) {\n return getFlattenedDOMTree(element, depth).filter((e: HTMLElement) => isFocusable(e)) as HTMLElement[];\n}\n\n/**\n * Preserves visual DOM ordering when using slots within Shadow DOM\n * See more information/resources on Shadow DOM linear traversal\n * https://nolanlawson.com/2021/02/13/managing-focus-in-the-shadow-dom/\n * https://www.abeautifulsite.net/posts/querying-through-shadow-roots/\n */\nexport function getFlattenedDOMTree(node: Node, depth = 10): HTMLElement[] {\n return (\n Array.from(getChildren(node)).reduce(\n (p: unknown[], n: Node) => [\n ...p,\n [n, [...Array.from(getChildren(n)).map(i => [i, getFlattenedDOMTree(i, depth)])]]\n ],\n []\n ) as unknown as HTMLElement[]\n ).flat(depth);\n}\n\nexport function validKeyNavigationCode(e: KeyboardEvent) {\n return keynavCodes.has(e.code);\n}\n\nexport enum KeynavCode {\n End = 'End',\n Home = 'Home',\n PageUp = 'PageUp',\n PageDown = 'PageDown',\n ArrowUp = 'ArrowUp',\n ArrowDown = 'ArrowDown',\n ArrowLeft = 'ArrowLeft',\n ArrowRight = 'ArrowRight'\n}\n\nconst keynavCodes: Set<string> = new Set(Object.values(KeynavCode));\n\nexport function hasInvalidDOMGrid(rows: HTMLElement[]) {\n return rows.some(row => row.children.length !== rows[0]!.children.length);\n}\n\nexport function removeEmptyTextNode(node: Node) {\n if ((node as Text)?.wholeText?.trim() === '') {\n (node as Text).remove();\n }\n}\n\nexport function scrollBarWidth() {\n const div = globalThis.document.createElement('div');\n div.style.setProperty('width', '100px');\n div.style.setProperty('height', '100px');\n div.style.setProperty('overflow', 'scroll');\n div.style.setProperty('position', 'absolute');\n div.style.setProperty('top', '-9999px');\n globalThis.document.body.appendChild(div);\n const width = div.offsetWidth - div.clientWidth;\n globalThis.document.body.removeChild(div);\n return width;\n}\n\nexport function hasScrollBar(el: HTMLElement) {\n return el.scrollHeight > el.clientHeight;\n}\n\nexport function hasHorizontalScrollBar(el: HTMLElement) {\n return el.scrollWidth > el.clientWidth;\n}\n\nexport function endOfScrollBox(element: HTMLElement, offset = 0) {\n return element.scrollTop + element.offsetHeight + offset >= element.scrollHeight;\n}\n\nexport async function openEyeDropper(): Promise<string> {\n return await new (\n globalThis as unknown as { EyeDropper: new () => { open: () => Promise<{ sRGBHex: string }> } }\n ).EyeDropper()\n .open()\n .then((color: { sRGBHex: string }) => color.sRGBHex);\n}\n\n/**\n * provides a object with key/value of the currently applied design tokens\n */\nexport function getThemeTokens(element = globalThis.document.querySelector(':root')!) {\n // default root or provided element\n const styles = getComputedStyle(element);\n let parent: CSSStyleSheet[] = [];\n\n // check for parent iframe, same domain iframes change how the browser accesses style sheets\n try {\n parent = Array.from(globalThis.parent.document.styleSheets);\n } catch {\n // if not accessible, skip\n }\n\n return [...parent, ...Array.from(globalThis.document.styleSheets)]\n .reduce((finalArr: string[][], sheet) => {\n let rules: CSSRule[] = [];\n try {\n rules = [...sheet.cssRules];\n } catch {\n // if the style sheet is not accessible, skip\n }\n return finalArr.concat(\n rules\n .filter(rule => rule.type === 1)\n .reduce((propValArr: string[][], rule) => {\n const props = [...(rule as CSSStyleRule).style]\n .filter((p: string) => p.trim().includes('--nve'))\n .map((propName: string) => [\n propName.trim(),\n (rule as CSSStyleRule).style.getPropertyValue(propName).trim()\n ]);\n return [...propValArr, ...props];\n }, [])\n );\n }, [])\n .reduce(\n (p: Record<string, string>, token: string[]) => ({ ...p, [token[0]!]: styles.getPropertyValue(token[0]!) }),\n {}\n );\n}\n\nexport function removeEmptySlotWhitespace(slot: HTMLSlotElement) {\n if (slotContainsOnlyWhitespace(slot)) {\n slot.assignedNodes().forEach((node: Node) => node.parentNode?.removeChild(node));\n }\n}\n\nexport function slotContainsOnlyWhitespace(slot: HTMLSlotElement) {\n const hasNoElements = !slot.assignedNodes().find(i => i.nodeType !== Node.TEXT_NODE);\n const hasOnlyEmptyTextNodes = !slot\n .assignedNodes()\n .find(i => i.nodeType === Node.TEXT_NODE && (i.textContent ?? '').trim() !== '');\n return hasNoElements && hasOnlyEmptyTextNodes;\n}\n\nexport function applySlotContentStates(slot: HTMLSlotElement, element: HTMLElement & { _internals: ElementInternals }) {\n const nodes = slot.assignedNodes();\n const name = slot.name ?? 'slot';\n\n if (nodes.length) {\n element._internals.states.add(`has-${name}`);\n } else {\n element._internals.states.delete(`has-${name}`);\n }\n}\n\nexport function getDisplayValue(option?: { label?: string; value?: string }): string {\n return option?.label || option?.value || '';\n}\n\n/** determines if HTML element matches the given component tag */\nexport function matchesElementName(element: Partial<HTMLElement>, component: { metadata: { tag: string } }) {\n return element.localName === component.metadata.tag;\n}\n\nexport function createGhostElement(sourceElement: HTMLElement) {\n const ghost = globalThis.document.createElement('div');\n const { width } = sourceElement.getBoundingClientRect();\n ghost.setAttribute('nve-ghost', '');\n ghost.style.minWidth = `${width}px`;\n ghost.style.maxWidth = `${width}px`;\n ghost.style.height = '1px';\n ghost.slot = sourceElement.slot;\n return ghost;\n}\n\nexport function sameRenderRoot(element1: HTMLElement, element2: HTMLElement) {\n const root1 = element1.getRootNode();\n const root2 = element2.getRootNode();\n const sameShadowRoot = root1 instanceof ShadowRoot && root2 instanceof ShadowRoot && root1 === root2;\n const sameDocumentRoot = root1 === globalThis.document && root2 === globalThis.document;\n const sameUnattachedRoot = root1 === root2;\n return sameShadowRoot || sameDocumentRoot || sameUnattachedRoot;\n}\n\nexport function getAnchorNames(element: HTMLElement): string[] {\n return (\n element.style.anchorName\n ?.split(',')\n ?.map(name => name.trim())\n ?.filter(name => name !== 'none' && name !== '') ?? []\n );\n}\n\nexport function removeAnchorName(element: HTMLElement, name: string) {\n const anchorNames = getAnchorNames(element);\n element.style.anchorName = anchorNames.filter(i => i !== name).join(',');\n}\n\nexport function appendAnchorName(element: HTMLElement, name: string) {\n element.style.anchorName = Array.from(new Set([...getAnchorNames(element), name])).join(',');\n}\n\n/**\n * Returns true when both arrays have the same length and each index is strictly equal (`===`).\n */\nexport function sameOrderedStringArray(a: readonly string[], b: readonly string[]): boolean {\n return a.length === b.length && a.every((value, index) => value === b[index]);\n}\n\n/**\n * Returns unique non-empty strings in first-seen order (insertion order of a `Set` over the filtered list).\n */\nexport function uniqueNonEmptyStrings(values: Iterable<string | null | undefined>): string[] {\n return Array.from(\n new Set(Array.from(values).filter((value): value is string => typeof value === 'string' && value.length > 0))\n );\n}\n"],"mappings":";;;AAOA,SAAgB,EAAY,GAAgD;CAC1E,IAAI,aAAgB,YAAY,EAAK,iBACnC,OAAO,MAAM,KAAK,EAAK,gBAAgB,QAAQ;CAC1C,IAAI,aAAgB,eAAe,EAAK,YAC7C,OAAO,MAAM,KAAK,EAAK,WAAW,QAAQ;CACrC,IAAI,aAAgB,mBAAmB,EAAK,kBAAkB;EACnE,IAAM,IAAU,EAAK,iBAAiB;EACtC,OAAO,EAAQ,SAAS,IAAU,MAAM,KAAK,EAAK,QAAQ;CAC5D,OACE,OAAO,MAAM,KAAM,EAAqB,QAAQ;AAEpD;AAEA,SAAgB,IAAa;CAE3B,OAAO,IADQ,KAAK,OAAO,gBAAgB,IAAI,YAAY,CAAC,CAAC,EAAE,GAC7C,SAAS,EAAE;AAC/B;AAEA,SAAgB,EAAoB,GAAsB,GAAc,GAAwC;CAC9G,EAAG,EAAQ,aAAa,CAAI,CAAC;CAC7B,IAAM,IAAW,IAAI,kBAAiB,MAAa;EACjD,EAAU,SAAQ,MAAY;GAC5B,AAAI,EAAS,kBAAkB,KAC7B,EAAI,EAAS,OAAuB,aAAa,CAAI,CAAC;EAE1D,CAAC;CACH,CAAC;CAED,OADA,EAAS,QAAQ,GAAS;EAAE,YAAY;EAAM,SAAS;CAAK,CAAC,GACtD;AACT;AAEA,SAAgB,EAAwB,GAAsB,GAAiB,GAAwC;CACrH,IAAM,IAAW,IAAI,kBAAiB,MAAa;EACjD,EAAU,SAAQ,MAAY;GAC5B,AAAI,EAAS,iBAAiB,EAAM,SAAS,EAAS,aAAa,KACjE,EAAG,CAAQ;EAEf,CAAC;CACH,CAAC;CAED,OADA,EAAS,QAAQ,GAAS;EAAE,YAAY;EAAM,SAAS;CAAK,CAAC,GACtD;AAC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kB,KADE,MAAU;AAEvC;AAEA,SAAgB,EAAe,GAAgC;CAC7D,OACE,EAAQ,MAAM,YACV,MAAM,GAAG,GACT,KAAI,MAAQ,EAAK,KAAK,CAAC,GACvB,QAAO,MAAQ,MAAS,UAAU,MAAS,EAAE,KAAK,CAAC;AAE3D;AAEA,SAAgB,EAAiB,GAAsB,GAAc;CACnE,IAAM,IAAc,EAAe,CAAO;CAC1C,EAAQ,MAAM,aAAa,EAAY,QAAO,MAAK,MAAM,CAAI,EAAE,KAAK,GAAG;AACzE;AAEA,SAAgB,EAAiB,GAAsB,GAAc;CACnE,EAAQ,MAAM,aAAa,MAAM,KAAK,IAAI,IAAI,CAAC,GAAG,EAAe,CAAO,GAAG,CAAI,CAAC,CAAC,EAAE,KAAK,GAAG;AAC7F;AAKA,SAAgB,EAAuB,GAAsB,GAA+B;CAC1F,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,GAAO,MAAU,MAAU,EAAE,EAAM;AAC9E;AAKA,SAAgB,EAAsB,GAAuD;CAC3F,OAAO,MAAM,KACX,IAAI,IAAI,MAAM,KAAK,CAAM,EAAE,QAAQ,MAA2B,OAAO,KAAU,YAAY,EAAM,SAAS,CAAC,CAAC,CAC9G;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","names":[],"sources":["../../../src/internal/utils/events.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function stopEvent(event: Event) {\n event?.preventDefault();\n event?.stopPropagation();\n}\n\nexport function onChildListMutation(\n element: HTMLElement,\n fn: (mutation?: MutationRecord) => void,\n options: MutationObserverInit = {}\n) {\n const observer = new MutationObserver(mutations => {\n for (const mutation of mutations) {\n if (mutation.type === 'childList') {\n fn(mutation);\n }\n\n if (options.attributes && mutation.type === 'attributes') {\n fn(mutation);\n }\n }\n });\n observer.observe(element, { childList: true, ...options });\n return observer;\n}\n\nexport function throttle(func: (...args: unknown[]) => void, limit: number) {\n let wait = true;\n return (...args: unknown[]) => {\n if (wait) {\n func(...args);\n wait = false;\n /* istanbul ignore next */\n setTimeout(() => (wait = true), limit);\n }\n };\n}\n\nexport function debounce(func: (...args: unknown[]) => void, timeout = 0) {\n let timer: ReturnType<typeof setTimeout> | undefined;\n return (...args: unknown[]) => {\n clearTimeout(timer);\n /* istanbul ignore next */\n timer = setTimeout(() => {\n func(...args);\n }, timeout);\n };\n}\n"],"mappings":";AAGA,SAAgB,EAAU,GAAc;
|
|
1
|
+
{"version":3,"file":"events.js","names":[],"sources":["../../../src/internal/utils/events.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function stopEvent(event: Event) {\n event?.preventDefault();\n event?.stopPropagation();\n}\n\nexport function onChildListMutation(\n element: HTMLElement,\n fn: (mutation?: MutationRecord) => void,\n options: MutationObserverInit = {}\n) {\n const observer = new MutationObserver(mutations => {\n for (const mutation of mutations) {\n if (mutation.type === 'childList') {\n fn(mutation);\n }\n\n if (options.attributes && mutation.type === 'attributes') {\n fn(mutation);\n }\n }\n });\n observer.observe(element, { childList: true, ...options });\n return observer;\n}\n\nexport function throttle(func: (...args: unknown[]) => void, limit: number) {\n let wait = true;\n return (...args: unknown[]) => {\n if (wait) {\n func(...args);\n wait = false;\n /* istanbul ignore next */\n setTimeout(() => (wait = true), limit);\n }\n };\n}\n\nexport function debounce(func: (...args: unknown[]) => void, timeout = 0) {\n let timer: ReturnType<typeof setTimeout> | undefined;\n return (...args: unknown[]) => {\n clearTimeout(timer);\n /* istanbul ignore next */\n timer = setTimeout(() => {\n func(...args);\n }, timeout);\n };\n}\n"],"mappings":";AAGA,SAAgB,EAAU,GAAc;CAEtC,AADA,GAAO,eAAe,GACtB,GAAO,gBAAgB;AACzB;AAEA,SAAgB,EACd,GACA,GACA,IAAgC,CAAC,GACjC;CACA,IAAM,IAAW,IAAI,kBAAiB,MAAa;EACjD,KAAK,IAAM,KAAY,GAKrB,AAJI,EAAS,SAAS,eACpB,EAAG,CAAQ,GAGT,EAAQ,cAAc,EAAS,SAAS,gBAC1C,EAAG,CAAQ;CAGjB,CAAC;CAED,OADA,EAAS,QAAQ,GAAS;EAAE,WAAW;EAAM,GAAG;CAAQ,CAAC,GAClD;AACT;AAEA,SAAgB,EAAS,GAAoC,GAAe;CAC1E,IAAI,IAAO;CACX,QAAQ,GAAG,MAAoB;EAC7B,AAAI,MACF,EAAK,GAAG,CAAI,GACZ,IAAO,IAEP,iBAAkB,IAAO,IAAO,CAAK;CAEzC;AACF;AAEA,SAAgB,EAAS,GAAoC,IAAU,GAAG;CACxE,IAAI;CACJ,QAAQ,GAAG,MAAoB;;EAG7B,AAFA,aAAa,CAAK,GAElB,IAAQ,iBAAiB;GACvB,EAAK,GAAG,CAAI;EACd,GAAG,CAAO;CACZ;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focus.js","names":[],"sources":["../../../src/internal/utils/focus.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function isFocusable(element: Element) {\n return (\n element.matches(\n [\n 'a[href]',\n 'area[href]',\n 'input',\n 'button',\n 'select',\n 'textarea',\n 'iframe',\n 'object',\n 'embed',\n '*[tabindex]',\n '*[contenteditable=true]',\n '[role=button]'\n ].join(',')\n ) &&\n element.matches(':not([disabled], [inert])') &&\n !element.closest(`[inert]`) &&\n !element.closest('[popover]')?.matches(':not(:popover-open)')\n );\n}\n\n/** returns interactive elements that does not require advanced keyboard interactions like arrow/navigation */\nexport function isSimpleFocusable(element: Element) {\n return element.matches(\n [\n 'a[href]',\n 'button:not([disabled])',\n 'input[type=checkbox]',\n 'input[type=radio]',\n 'object',\n 'embed',\n '*[tabindex]',\n '[role=button]:not([disabled])'\n ].join(',')\n );\n}\n\nexport function getActiveElement(root: Document | ShadowRoot = globalThis.document): Element | null {\n if (root.activeElement && root.activeElement.shadowRoot) {\n return getActiveElement(root.activeElement.shadowRoot) ?? root.activeElement;\n } else {\n return root.activeElement;\n }\n}\n\nexport function focusElement(element: HTMLElement) {\n if (element && !isFocusable(element)) {\n element.setAttribute('tabindex', '-1');\n element.focus();\n element.addEventListener('blur', () => element.removeAttribute('tabindex'), { once: true });\n } else {\n element?.focus();\n }\n}\n\nexport function focusElementTimeout(element: HTMLElement) {\n setTimeout(() => focusElement(element));\n}\n\nexport function setActiveKeyListItem(items: NodeListOf<HTMLElement> | HTMLElement[], item: HTMLElement) {\n items.forEach(i => (i.tabIndex = -1));\n item.tabIndex = 0;\n}\n\nexport function initializeKeyListItems(items: NodeListOf<HTMLElement> | HTMLElement[]) {\n items.forEach(i => (i.tabIndex = -1));\n items[0] && (items[0].tabIndex = 0);\n}\n\n/** determines if user interaction is a valid interaction for activating a listbox type */\nexport function onListboxActivate(\n element: HTMLElement & { disabled?: boolean },\n fn: (event: KeyboardEvent | PointerEvent) => void\n) {\n const validKey = (e: KeyboardEvent) => e.code === 'Space' || e.code === 'ArrowUp' || e.code === 'ArrowDown';\n\n element.addEventListener('pointerdown', (e: PointerEvent) => {\n e.preventDefault();\n });\n\n element.addEventListener('pointerup', (e: PointerEvent) => {\n e.preventDefault();\n\n if (!element.disabled) {\n fn(e);\n }\n });\n\n element.addEventListener('keyup', (e: KeyboardEvent) => {\n if (validKey(e) && !element.disabled) {\n fn(e);\n }\n });\n\n element.addEventListener('keydown', (e: KeyboardEvent) => {\n if (validKey(e) && !element.disabled) {\n e.preventDefault();\n }\n });\n}\n"],"mappings":";AAGA,SAAgB,EAAY,GAAkB;
|
|
1
|
+
{"version":3,"file":"focus.js","names":[],"sources":["../../../src/internal/utils/focus.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function isFocusable(element: Element) {\n return (\n element.matches(\n [\n 'a[href]',\n 'area[href]',\n 'input',\n 'button',\n 'select',\n 'textarea',\n 'iframe',\n 'object',\n 'embed',\n '*[tabindex]',\n '*[contenteditable=true]',\n '[role=button]'\n ].join(',')\n ) &&\n element.matches(':not([disabled], [inert])') &&\n !element.closest(`[inert]`) &&\n !element.closest('[popover]')?.matches(':not(:popover-open)')\n );\n}\n\n/** returns interactive elements that does not require advanced keyboard interactions like arrow/navigation */\nexport function isSimpleFocusable(element: Element) {\n return element.matches(\n [\n 'a[href]',\n 'button:not([disabled])',\n 'input[type=checkbox]',\n 'input[type=radio]',\n 'object',\n 'embed',\n '*[tabindex]',\n '[role=button]:not([disabled])'\n ].join(',')\n );\n}\n\nexport function getActiveElement(root: Document | ShadowRoot = globalThis.document): Element | null {\n if (root.activeElement && root.activeElement.shadowRoot) {\n return getActiveElement(root.activeElement.shadowRoot) ?? root.activeElement;\n } else {\n return root.activeElement;\n }\n}\n\nexport function focusElement(element: HTMLElement) {\n if (element && !isFocusable(element)) {\n element.setAttribute('tabindex', '-1');\n element.focus();\n element.addEventListener('blur', () => element.removeAttribute('tabindex'), { once: true });\n } else {\n element?.focus();\n }\n}\n\nexport function focusElementTimeout(element: HTMLElement) {\n setTimeout(() => focusElement(element));\n}\n\nexport function setActiveKeyListItem(items: NodeListOf<HTMLElement> | HTMLElement[], item: HTMLElement) {\n items.forEach(i => (i.tabIndex = -1));\n item.tabIndex = 0;\n}\n\nexport function initializeKeyListItems(items: NodeListOf<HTMLElement> | HTMLElement[]) {\n items.forEach(i => (i.tabIndex = -1));\n items[0] && (items[0].tabIndex = 0);\n}\n\n/** determines if user interaction is a valid interaction for activating a listbox type */\nexport function onListboxActivate(\n element: HTMLElement & { disabled?: boolean },\n fn: (event: KeyboardEvent | PointerEvent) => void\n) {\n const validKey = (e: KeyboardEvent) => e.code === 'Space' || e.code === 'ArrowUp' || e.code === 'ArrowDown';\n\n element.addEventListener('pointerdown', (e: PointerEvent) => {\n e.preventDefault();\n });\n\n element.addEventListener('pointerup', (e: PointerEvent) => {\n e.preventDefault();\n\n if (!element.disabled) {\n fn(e);\n }\n });\n\n element.addEventListener('keyup', (e: KeyboardEvent) => {\n if (validKey(e) && !element.disabled) {\n fn(e);\n }\n });\n\n element.addEventListener('keydown', (e: KeyboardEvent) => {\n if (validKey(e) && !element.disabled) {\n e.preventDefault();\n }\n });\n}\n"],"mappings":";AAGA,SAAgB,EAAY,GAAkB;CAC5C,OACE,EAAQ,QACN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,EAAE,KAAK,GAAG,CACZ,KACA,EAAQ,QAAQ,2BAA2B,KAC3C,CAAC,EAAQ,QAAQ,SAAS,KAC1B,CAAC,EAAQ,QAAQ,WAAW,GAAG,QAAQ,qBAAqB;AAEhE;AAGA,SAAgB,EAAkB,GAAkB;CAClD,OAAO,EAAQ,QACb;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,EAAE,KAAK,GAAG,CACZ;AACF;AAEA,SAAgB,EAAiB,IAA8B,WAAW,UAA0B;CAIhG,OAHE,EAAK,iBAAiB,EAAK,cAAc,aACpC,EAAiB,EAAK,cAAc,UAAU,KAAK,EAAK,gBAExD,EAAK;AAEhB;AAEA,SAAgB,EAAa,GAAsB;CACjD,AAAI,KAAW,CAAC,EAAY,CAAO,KACjC,EAAQ,aAAa,YAAY,IAAI,GACrC,EAAQ,MAAM,GACd,EAAQ,iBAAiB,cAAc,EAAQ,gBAAgB,UAAU,GAAG,EAAE,MAAM,GAAK,CAAC,KAE1F,GAAS,MAAM;AAEnB;AAEA,SAAgB,EAAoB,GAAsB;CACxD,iBAAiB,EAAa,CAAO,CAAC;AACxC;AAEA,SAAgB,EAAqB,GAAgD,GAAmB;CAEtG,AADA,EAAM,SAAQ,MAAM,EAAE,WAAW,EAAG,GACpC,EAAK,WAAW;AAClB;AAEA,SAAgB,EAAuB,GAAgD;CAErF,AADA,EAAM,SAAQ,MAAM,EAAE,WAAW,EAAG,GACpC,EAAM,OAAO,EAAM,GAAG,WAAW;AACnC;AAGA,SAAgB,EACd,GACA,GACA;CACA,IAAM,KAAY,MAAqB,EAAE,SAAS,WAAW,EAAE,SAAS,aAAa,EAAE,SAAS;CAoBhG,AAlBA,EAAQ,iBAAiB,gBAAgB,MAAoB;EAC3D,EAAE,eAAe;CACnB,CAAC,GAED,EAAQ,iBAAiB,cAAc,MAAoB;EAGzD,AAFA,EAAE,eAAe,GAEZ,EAAQ,YACX,EAAG,CAAC;CAER,CAAC,GAED,EAAQ,iBAAiB,UAAU,MAAqB;EACtD,AAAI,EAAS,CAAC,KAAK,CAAC,EAAQ,YAC1B,EAAG,CAAC;CAER,CAAC,GAED,EAAQ,iBAAiB,YAAY,MAAqB;EACxD,AAAI,EAAS,CAAC,KAAK,CAAC,EAAQ,YAC1B,EAAE,eAAe;CAErB,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keynav.js","names":[],"sources":["../../../src/internal/utils/keynav.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { clickOutsideElementBounds } from './dom.js';\nimport { focusElementTimeout } from './focus.js';\n\nexport function onKeys(events: string[], event: KeyboardEvent, fn: () => void) {\n if (events.includes(event.code)) {\n fn();\n }\n}\n\nexport function createLightDismiss(\n options: { element: HTMLElement; focusElement?: HTMLElement; signal?: AbortSignal },\n fn: () => void\n) {\n const listenerOptions = options.signal ? { signal: options.signal } : undefined;\n\n globalThis.document.addEventListener(\n 'pointerup',\n (e: PointerEvent) => {\n if (\n !options.element.hidden &&\n clickOutsideElementBounds(e, options.element) &&\n clickOutsideElementBounds(e, options.focusElement!)\n ) {\n fn();\n }\n },\n listenerOptions\n );\n\n options.element.addEventListener(\n 'keydown',\n (e: KeyboardEvent) => {\n if (!options.element.hidden && e.code === 'Escape') {\n e.preventDefault();\n focusElementTimeout(options.focusElement!);\n fn();\n }\n },\n listenerOptions\n );\n}\n"],"mappings":";;;AAMA,SAAgB,EAAO,GAAkB,GAAsB,GAAgB;
|
|
1
|
+
{"version":3,"file":"keynav.js","names":[],"sources":["../../../src/internal/utils/keynav.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { clickOutsideElementBounds } from './dom.js';\nimport { focusElementTimeout } from './focus.js';\n\nexport function onKeys(events: string[], event: KeyboardEvent, fn: () => void) {\n if (events.includes(event.code)) {\n fn();\n }\n}\n\nexport function createLightDismiss(\n options: { element: HTMLElement; focusElement?: HTMLElement; signal?: AbortSignal },\n fn: () => void\n) {\n const listenerOptions = options.signal ? { signal: options.signal } : undefined;\n\n globalThis.document.addEventListener(\n 'pointerup',\n (e: PointerEvent) => {\n if (\n !options.element.hidden &&\n clickOutsideElementBounds(e, options.element) &&\n clickOutsideElementBounds(e, options.focusElement!)\n ) {\n fn();\n }\n },\n listenerOptions\n );\n\n options.element.addEventListener(\n 'keydown',\n (e: KeyboardEvent) => {\n if (!options.element.hidden && e.code === 'Escape') {\n e.preventDefault();\n focusElementTimeout(options.focusElement!);\n fn();\n }\n },\n listenerOptions\n );\n}\n"],"mappings":";;;AAMA,SAAgB,EAAO,GAAkB,GAAsB,GAAgB;CAC7E,AAAI,EAAO,SAAS,EAAM,IAAI,KAC5B,EAAG;AAEP;AAEA,SAAgB,EACd,GACA,GACA;CACA,IAAM,IAAkB,EAAQ,SAAS,EAAE,QAAQ,EAAQ,OAAO,IAAI,KAAA;CAgBtE,AAdA,WAAW,SAAS,iBAClB,cACC,MAAoB;EACnB,AACE,CAAC,EAAQ,QAAQ,UACjB,EAA0B,GAAG,EAAQ,OAAO,KAC5C,EAA0B,GAAG,EAAQ,YAAa,KAElD,EAAG;CAEP,GACA,CACF,GAEA,EAAQ,QAAQ,iBACd,YACC,MAAqB;EACpB,AAAI,CAAC,EAAQ,QAAQ,UAAU,EAAE,SAAS,aACxC,EAAE,eAAe,GACjB,EAAoB,EAAQ,YAAa,GACzC,EAAG;CAEP,GACA,CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objects.js","names":[],"sources":["../../../src/internal/utils/objects.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function isObject(item: unknown): item is Record<string, unknown> {\n return !!item && typeof item === 'object' && !Array.isArray(item);\n}\n\nexport function isObjectLiteral(item: unknown): item is Record<string, unknown> {\n if (!item || typeof item !== 'object' || Array.isArray(item)) {\n return false;\n }\n const proto = Object.getPrototypeOf(item);\n return proto === null || proto === Object.prototype;\n}\n\nexport function deepMerge(\n target: Record<string, unknown>,\n ...sources: Record<string, unknown>[]\n): Record<string, unknown> {\n if (!sources.length) {\n return target;\n }\n\n const source = sources.shift();\n\n if (isObjectLiteral(target) && isObjectLiteral(source)) {\n for (const key in source) {\n mergeProperty(target, source, key);\n }\n }\n\n return deepMerge(target, ...sources);\n}\n\nfunction mergeProperty(target: Record<string, unknown>, source: Record<string, unknown>, key: string) {\n const sourceValue = source[key];\n if (!isObjectLiteral(sourceValue)) {\n target[key] = sourceValue;\n return;\n }\n if (isObjectLiteral(target[key])) {\n deepMerge(target[key], sourceValue);\n } else {\n target[key] = sourceValue;\n }\n}\n\nexport function parseVersion(version: string) {\n const [major, minor, patch] = version.split('.').map(v => {\n const n = parseInt(v, 10);\n return Number.isNaN(n) ? -1 : n;\n });\n return { major: major ?? -1, minor: minor ?? -1, patch: patch ?? -1 };\n}\n\nexport function formatStandardNumber(number: number) {\n return new Intl.NumberFormat().format(number);\n}\n\nexport function getDifference(minuend: number, subtrahend: number) {\n return Math.sign(subtrahend - minuend) * Math.abs(minuend - subtrahend);\n}\n"],"mappings":";AAGA,SAAgB,EAAS,GAAgD;
|
|
1
|
+
{"version":3,"file":"objects.js","names":[],"sources":["../../../src/internal/utils/objects.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function isObject(item: unknown): item is Record<string, unknown> {\n return !!item && typeof item === 'object' && !Array.isArray(item);\n}\n\nexport function isObjectLiteral(item: unknown): item is Record<string, unknown> {\n if (!item || typeof item !== 'object' || Array.isArray(item)) {\n return false;\n }\n const proto = Object.getPrototypeOf(item);\n return proto === null || proto === Object.prototype;\n}\n\nexport function deepMerge(\n target: Record<string, unknown>,\n ...sources: Record<string, unknown>[]\n): Record<string, unknown> {\n if (!sources.length) {\n return target;\n }\n\n const source = sources.shift();\n\n if (isObjectLiteral(target) && isObjectLiteral(source)) {\n for (const key in source) {\n mergeProperty(target, source, key);\n }\n }\n\n return deepMerge(target, ...sources);\n}\n\nfunction mergeProperty(target: Record<string, unknown>, source: Record<string, unknown>, key: string) {\n const sourceValue = source[key];\n if (!isObjectLiteral(sourceValue)) {\n target[key] = sourceValue;\n return;\n }\n if (isObjectLiteral(target[key])) {\n deepMerge(target[key], sourceValue);\n } else {\n target[key] = sourceValue;\n }\n}\n\nexport function parseVersion(version: string) {\n const [major, minor, patch] = version.split('.').map(v => {\n const n = parseInt(v, 10);\n return Number.isNaN(n) ? -1 : n;\n });\n return { major: major ?? -1, minor: minor ?? -1, patch: patch ?? -1 };\n}\n\nexport function formatStandardNumber(number: number) {\n return new Intl.NumberFormat().format(number);\n}\n\nexport function getDifference(minuend: number, subtrahend: number) {\n return Math.sign(subtrahend - minuend) * Math.abs(minuend - subtrahend);\n}\n"],"mappings":";AAGA,SAAgB,EAAS,GAAgD;CACvE,OAAO,CAAC,CAAC,KAAQ,OAAO,KAAS,YAAY,CAAC,MAAM,QAAQ,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Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n/** formats a file size in bytes to a human readable string */\nexport function formatFileSize(size: number): string {\n const thresholds = new Map<number, string>([\n [1024 ** 4, 'TB'],\n [1024 ** 3, 'GB'],\n [1024 ** 2, 'MB'],\n [1024 ** 1, 'KB'],\n [1, 'B']\n ]);\n for (const [threshold, unit] of thresholds.entries()) {\n if (size >= threshold) {\n return `${(size / threshold).toFixed(2)} ${unit}`;\n }\n }\n return `0`;\n}\n\n/** removes leading white space for a multiline string */\nexport function shiftLeft(value: string) {\n const shift = value.replace(/^\\n|\\n$/g, '').search(/\\S|$/);\n return value\n .trim()\n .split('\\n')\n .map(line => {\n return line\n .split('')\n .filter((c, i) => i >= shift || c !== ' ')\n .join('');\n })\n .join('\\n');\n}\n\nexport let DOCS_URL = '';\n/* @ts-expect-error -- VITE_BUNDLE_CONFIG is only defined at build time */\nif (!import.meta.env.VITE_BUNDLE_CONFIG) {\n DOCS_URL = 'https://nvidia.github.io/elements';\n}\n"],"mappings":";AAIA,SAAgB,EAAe,GAAsB;CACnD,IAAM,IAAa,IAAI,IAAoB;EACzC,CAAC,QAAQ,GAAG,
|
|
1
|
+
{"version":3,"file":"strings.js","names":[],"sources":["../../../src/internal/utils/strings.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n/** formats a file size in bytes to a human readable string */\nexport function formatFileSize(size: number): string {\n const thresholds = new Map<number, string>([\n [1024 ** 4, 'TB'],\n [1024 ** 3, 'GB'],\n [1024 ** 2, 'MB'],\n [1024 ** 1, 'KB'],\n [1, 'B']\n ]);\n for (const [threshold, unit] of thresholds.entries()) {\n if (size >= threshold) {\n return `${(size / threshold).toFixed(2)} ${unit}`;\n }\n }\n return `0`;\n}\n\n/** removes leading white space for a multiline string */\nexport function shiftLeft(value: string) {\n const shift = value.replace(/^\\n|\\n$/g, '').search(/\\S|$/);\n return value\n .trim()\n .split('\\n')\n .map(line => {\n return line\n .split('')\n .filter((c, i) => i >= shift || c !== ' ')\n .join('');\n })\n .join('\\n');\n}\n\nexport let DOCS_URL = '';\n/* @ts-expect-error -- VITE_BUNDLE_CONFIG is only defined at build time */\nif (!import.meta.env.VITE_BUNDLE_CONFIG) {\n DOCS_URL = 'https://nvidia.github.io/elements';\n}\n"],"mappings":";AAIA,SAAgB,EAAe,GAAsB;CACnD,IAAM,IAAa,IAAI,IAAoB;EACzC,CAAC,QAAQ,GAAG,IAAI;EAChB,CAAC,QAAQ,GAAG,IAAI;EAChB,CAAC,QAAQ,GAAG,IAAI;EAChB,CAAC,QAAQ,GAAG,IAAI;EAChB,CAAC,GAAG,GAAG;CACT,CAAC;CACD,KAAK,IAAM,CAAC,GAAW,MAAS,EAAW,QAAQ,GACjD,IAAI,KAAQ,GACV,OAAO,IAAI,IAAO,GAAW,QAAQ,CAAC,EAAE,GAAG;CAG/C,OAAO;AACT;AAGA,SAAgB,EAAU,GAAe;CACvC,IAAM,IAAQ,EAAM,QAAQ,YAAY,EAAE,EAAE,OAAO,MAAM;CACzD,OAAO,EACJ,KAAK,EACL,MAAM,IAAI,EACV,KAAI,MACI,EACJ,MAAM,EAAE,EACR,QAAQ,GAAG,MAAM,KAAK,KAAS,MAAM,GAAG,EACxC,KAAK,EAAE,CACX,EACA,KAAK,IAAI;AACd;AAEA,IAAW,IAAW;AAGpB,IAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supports.js","names":[],"sources":["../../../src/internal/utils/supports.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function supportsNativeCSSAnchorPosition() {\n return globalThis.CSS?.supports?.('position-area', 'top') || globalThis.CSS?.supports?.('inset-area', 'top');\n}\n\nexport function supportsCSSPositionArea() {\n return globalThis.CSS?.supports?.('position-area', 'top');\n}\n\nexport function supportsCSSLegacyInsetArea() {\n return globalThis.CSS?.supports?.('inset-area', 'top');\n}\n"],"mappings":";AAGA,SAAgB,IAAkC;
|
|
1
|
+
{"version":3,"file":"supports.js","names":[],"sources":["../../../src/internal/utils/supports.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport function supportsNativeCSSAnchorPosition() {\n return globalThis.CSS?.supports?.('position-area', 'top') || globalThis.CSS?.supports?.('inset-area', 'top');\n}\n\nexport function supportsCSSPositionArea() {\n return globalThis.CSS?.supports?.('position-area', 'top');\n}\n\nexport function supportsCSSLegacyInsetArea() {\n return globalThis.CSS?.supports?.('inset-area', 'top');\n}\n"],"mappings":";AAGA,SAAgB,IAAkC;CAChD,OAAO,WAAW,KAAK,WAAW,iBAAiB,KAAK,KAAK,WAAW,KAAK,WAAW,cAAc,KAAK;AAC7G;AAEA,SAAgB,IAA0B;CACxC,OAAO,WAAW,KAAK,WAAW,iBAAiB,KAAK;AAC1D;AAEA,SAAgB,IAA6B;CAC3C,OAAO,WAAW,KAAK,WAAW,cAAc,KAAK;AACvD"}
|
package/dist/logo/define.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.js","names":[],"sources":["../../src/logo/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 { Logo } from '@nvidia-elements/core/logo';\n\ndefine(Logo);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-logo': Logo;\n }\n}\n"],"mappings":";;;AAMA,EAAO,
|
|
1
|
+
{"version":3,"file":"define.js","names":[],"sources":["../../src/logo/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 { Logo } from '@nvidia-elements/core/logo';\n\ndefine(Logo);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-logo': Logo;\n }\n}\n"],"mappings":";;;AAMA,EAAO,CAAI"}
|
package/dist/logo/logo2.js
CHANGED
|
@@ -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.130.0/helpers/decorate.js";
|
|
3
3
|
import { colorStateStyles as n, useStyles as r } from "../internal/styles/index.js";
|
|
4
4
|
import i from "./logo.js";
|
|
5
5
|
import { LitElement as a, html as o } from "lit";
|
|
@@ -12,7 +12,7 @@ var c = class extends a {
|
|
|
12
12
|
static {
|
|
13
13
|
this.metadata = {
|
|
14
14
|
tag: "nve-logo",
|
|
15
|
-
version: "0.1.
|
|
15
|
+
version: "0.1.2"
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
render() {
|
package/dist/logo/logo2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo2.js","names":[],"sources":["../../src/logo/logo.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 { Color, Size } from '@nvidia-elements/core/internal';\nimport { useStyles, colorStateStyles, attachInternals } from '@nvidia-elements/core/internal';\nimport styles from './logo.css?inline';\n\n/**\n * @element nve-logo\n * @description A visual indicator for a brand or application.\n * @since 0.10.0\n * @entrypoint \\@nvidia-elements/core/logo\n * @slot - default slot for content\n * @cssprop --background\n * @cssprop --gap\n * @cssprop --color\n * @cssprop --height\n * @cssprop --width\n * @cssprop --font-size\n * @cssprop --border-radius\n * @cssprop --font-weight\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img\n */\nexport class Logo extends LitElement {\n /**\n * Visual treatment to represent unique color of an application\n */\n @property({ type: String, reflect: true }) color: Color;\n\n /**\n * Determines size of logo\n */\n @property({ type: String, reflect: true }) size?: Size;\n\n static styles = useStyles([styles, colorStateStyles]);\n\n static readonly metadata = {\n tag: 'nve-logo',\n version: '0.0.0'\n };\n\n _internals: ElementInternals;\n\n render() {\n return html`\n <div internal-host>\n <slot></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'img';\n }\n}\n"],"mappings":";;;;;;;AAyBA,IAAa,IAAb,cAA0B,EAAW;;gBAWnB,EAAU,CAAC,GAAQ,
|
|
1
|
+
{"version":3,"file":"logo2.js","names":[],"sources":["../../src/logo/logo.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 { Color, Size } from '@nvidia-elements/core/internal';\nimport { useStyles, colorStateStyles, attachInternals } from '@nvidia-elements/core/internal';\nimport styles from './logo.css?inline';\n\n/**\n * @element nve-logo\n * @description A visual indicator for a brand or application.\n * @since 0.10.0\n * @entrypoint \\@nvidia-elements/core/logo\n * @slot - default slot for content\n * @cssprop --background\n * @cssprop --gap\n * @cssprop --color\n * @cssprop --height\n * @cssprop --width\n * @cssprop --font-size\n * @cssprop --border-radius\n * @cssprop --font-weight\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img\n */\nexport class Logo extends LitElement {\n /**\n * Visual treatment to represent unique color of an application\n */\n @property({ type: String, reflect: true }) color: Color;\n\n /**\n * Determines size of logo\n */\n @property({ type: String, reflect: true }) size?: Size;\n\n static styles = useStyles([styles, colorStateStyles]);\n\n static readonly metadata = {\n tag: 'nve-logo',\n version: '0.0.0'\n };\n\n _internals: ElementInternals;\n\n render() {\n return html`\n <div internal-host>\n <slot></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'img';\n }\n}\n"],"mappings":";;;;;;;AAyBA,IAAa,IAAb,cAA0B,EAAW;;gBAWnB,EAAU,CAAC,GAAQ,CAAgB,CAAC;;;kBAEzB;GACzB,KAAK;GACL,SAAS;EACX;;CAIA,SAAS;EACP,OAAO,CAAI;CAKb;CAEA,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO;CACzB;AACF;GA7BG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,MAKxC,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA"}
|
package/dist/menu/define.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.js","names":[],"sources":["../../src/menu/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 { Menu, MenuItem } from '@nvidia-elements/core/menu';\n\ndefine(Menu);\ndefine(MenuItem);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-menu': Menu;\n 'nve-menu-item': MenuItem;\n }\n}\n"],"mappings":";;;AAMA,EAAO,
|
|
1
|
+
{"version":3,"file":"define.js","names":[],"sources":["../../src/menu/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 { Menu, MenuItem } from '@nvidia-elements/core/menu';\n\ndefine(Menu);\ndefine(MenuItem);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-menu': Menu;\n 'nve-menu-item': MenuItem;\n }\n}\n"],"mappings":";;;AAMA,EAAO,CAAI,GACX,EAAO,CAAQ"}
|
package/dist/menu/menu-item2.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.130.0/helpers/decorate.js";
|
|
2
2
|
import { BaseButton as t } from "../internal/base/button.js";
|
|
3
3
|
import { audit as n } from "../internal/controllers/audit.controller.js";
|
|
4
4
|
import { useStyles as r } from "../internal/styles/index.js";
|
|
@@ -13,7 +13,7 @@ var s = class extends t {
|
|
|
13
13
|
static {
|
|
14
14
|
this.metadata = {
|
|
15
15
|
tag: "nve-menu-item",
|
|
16
|
-
version: "0.1.
|
|
16
|
+
version: "0.1.2",
|
|
17
17
|
parents: ["nve-menu"]
|
|
18
18
|
};
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-item2.js","names":[],"sources":["../../src/menu/menu-item.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { useStyles, BaseButton, audit } from '@nvidia-elements/core/internal';\nimport styles from './menu-item.css?inline';\n\n/**\n * @element nve-menu-item\n * @description Represents a selectable option within a menu, providing an interactive button for navigation or actions.\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/menu\n * @slot - default slot for content\n * @slot suffix - slot for suffix icon\n * @cssprop --background\n * @cssprop --border-radius\n * @cssprop --border-background\n * @cssprop --font-size\n * @cssprop --font-weight\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --gap\n * @cssprop --width\n * @cssprop --min-height\n * @cssprop --line-height\n * @cssprop --cursor\n * @cssprop --opacity\n * @cssprop --text-transform\n\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/menubar/\n */\n@audit()\nexport class MenuItem extends BaseButton {\n static styles = useStyles([styles]);\n\n @property({ type: String, reflect: true }) status: 'danger';\n\n static readonly metadata = {\n tag: 'nve-menu-item',\n version: '0.0.0',\n parents: ['nve-menu']\n };\n\n static elementDefinitions = {};\n\n render() {\n return html`\n <div internal-host interaction-state focus-within part=\"_internal\">\n <slot></slot>\n <slot name=\"suffix\"></slot>\n </div>\n `;\n }\n\n constructor() {\n super();\n this.type = 'button';\n }\n\n connectedCallback() {\n super.connectedCallback();\n this._internals.role = 'menuitem';\n }\n}\n"],"mappings":";;;;;;;;AAiCO,IAAA,IAAA,cAAuB,EAAW;;gBACvB,EAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"menu-item2.js","names":[],"sources":["../../src/menu/menu-item.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { useStyles, BaseButton, audit } from '@nvidia-elements/core/internal';\nimport styles from './menu-item.css?inline';\n\n/**\n * @element nve-menu-item\n * @description Represents a selectable option within a menu, providing an interactive button for navigation or actions.\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/menu\n * @slot - default slot for content\n * @slot suffix - slot for suffix icon\n * @cssprop --background\n * @cssprop --border-radius\n * @cssprop --border-background\n * @cssprop --font-size\n * @cssprop --font-weight\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --gap\n * @cssprop --width\n * @cssprop --min-height\n * @cssprop --line-height\n * @cssprop --cursor\n * @cssprop --opacity\n * @cssprop --text-transform\n\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/menubar/\n */\n@audit()\nexport class MenuItem extends BaseButton {\n static styles = useStyles([styles]);\n\n @property({ type: String, reflect: true }) status: 'danger';\n\n static readonly metadata = {\n tag: 'nve-menu-item',\n version: '0.0.0',\n parents: ['nve-menu']\n };\n\n static elementDefinitions = {};\n\n render() {\n return html`\n <div internal-host interaction-state focus-within part=\"_internal\">\n <slot></slot>\n <slot name=\"suffix\"></slot>\n </div>\n `;\n }\n\n constructor() {\n super();\n this.type = 'button';\n }\n\n connectedCallback() {\n super.connectedCallback();\n this._internals.role = 'menuitem';\n }\n}\n"],"mappings":";;;;;;;;AAiCO,IAAA,IAAA,cAAuB,EAAW;;gBACvB,EAAU,CAAC,CAAM,CAAC;;;kBAIP;GACzB,KAAK;GACL,SAAS;GACT,SAAS,CAAC,UAAU;EACtB;;;4BAE4B,CAAC;;CAE7B,SAAS;EACP,OAAO,CAAI;CAMb;CAEA,cAAc;EAEZ,AADA,MAAM,GACN,KAAK,OAAO;CACd;CAEA,oBAAoB;EAElB,AADA,MAAM,kBAAkB,GACxB,KAAK,WAAW,OAAO;CACzB;AACF;GA5BG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,UAJ1C,EAAM,CAAA,GAAA,CAAA"}
|
package/dist/menu/menu2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { appendRootNodeStyle as e } from "../internal/utils/dom.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.130.0/helpers/decorate.js";
|
|
4
4
|
import { audit as r } from "../internal/controllers/audit.controller.js";
|
|
5
5
|
import { keyNavigationList as i } from "../internal/controllers/keynav-list.controller.js";
|
|
6
6
|
import { useStyles as a } from "../internal/styles/index.js";
|
|
@@ -16,7 +16,7 @@ var d = class extends c {
|
|
|
16
16
|
static {
|
|
17
17
|
this.metadata = {
|
|
18
18
|
tag: "nve-menu",
|
|
19
|
-
version: "0.1.
|
|
19
|
+
version: "0.1.2",
|
|
20
20
|
children: ["nve-menu-item", "nve-divider"]
|
|
21
21
|
};
|
|
22
22
|
}
|
package/dist/menu/menu2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu2.js","names":["#scrollRAF","#handleScroll"],"sources":["../../src/menu/menu.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 { queryAssignedElements } from 'lit/decorators/query-assigned-elements.js';\nimport type { KeynavListConfig } from '@nvidia-elements/core/internal';\nimport {\n useStyles,\n attachInternals,\n keyNavigationList,\n appendRootNodeStyle,\n audit\n} from '@nvidia-elements/core/internal';\nimport type { MenuItem } from './menu-item.js';\nimport styles from './menu.css?inline';\nimport globalStyles from './menu.global.css?inline';\n\n/**\n * @element nve-menu\n * @description A menu offers a list of choices to the user, such as a set of actions or functions. Choosing an item in a menu typically opens a sub menu, or invokes a command.\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/menu\n * @slot - default slot for `nve-menu-item`\n * @cssprop --padding\n * @cssprop --gap\n * @cssprop --width\n * @cssprop --max-width\n * @cssprop --min-width\n * @cssprop --max-height\n * @event scroll - Fires when the user scrolls the menu list. Throttled to one dispatch per animation frame. `detail: { scrollTop, scrollHeight, clientHeight }`.\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/menubar/\n */\n@audit()\n@keyNavigationList<Menu>()\nexport class Menu extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-menu',\n version: '0.0.0',\n children: ['nve-menu-item', 'nve-divider']\n };\n\n static elementDefinitions = {};\n\n /** @private */\n get keynavListConfig(): KeynavListConfig {\n return {\n layout: 'vertical',\n items: this.items\n };\n }\n\n /** @private */\n declare _internals: ElementInternals;\n\n @queryAssignedElements() items!: MenuItem[];\n\n #scrollRAF: number | null = null;\n\n #handleScroll = () => {\n if (this.#scrollRAF !== null) return;\n this.#scrollRAF = requestAnimationFrame(() => {\n this.#scrollRAF = null;\n const container = this.shadowRoot?.querySelector<HTMLElement>('[internal-host]');\n if (!container) return;\n const { scrollTop, scrollHeight, clientHeight } = container;\n this.dispatchEvent(\n new CustomEvent('scroll', {\n bubbles: true,\n composed: true,\n detail: { scrollTop, scrollHeight, clientHeight }\n })\n );\n });\n };\n\n render() {\n return html`\n <div internal-host>\n <slot></slot>\n </div>\n `;\n }\n\n async firstUpdated() {\n await this.updateComplete;\n this.shadowRoot\n ?.querySelector('[internal-host]')\n ?.addEventListener('scroll', this.#handleScroll, { passive: true });\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'menu';\n appendRootNodeStyle(this, globalStyles);\n }\n}\n"],"mappings":";;;;;;;;;;;AAkCO,IAAA,IAAA,cAAmB,EAAW;;gBACnB,EAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"menu2.js","names":["#scrollRAF","#handleScroll"],"sources":["../../src/menu/menu.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 { queryAssignedElements } from 'lit/decorators/query-assigned-elements.js';\nimport type { KeynavListConfig } from '@nvidia-elements/core/internal';\nimport {\n useStyles,\n attachInternals,\n keyNavigationList,\n appendRootNodeStyle,\n audit\n} from '@nvidia-elements/core/internal';\nimport type { MenuItem } from './menu-item.js';\nimport styles from './menu.css?inline';\nimport globalStyles from './menu.global.css?inline';\n\n/**\n * @element nve-menu\n * @description A menu offers a list of choices to the user, such as a set of actions or functions. Choosing an item in a menu typically opens a sub menu, or invokes a command.\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/menu\n * @slot - default slot for `nve-menu-item`\n * @cssprop --padding\n * @cssprop --gap\n * @cssprop --width\n * @cssprop --max-width\n * @cssprop --min-width\n * @cssprop --max-height\n * @event scroll - Fires when the user scrolls the menu list. Throttled to one dispatch per animation frame. `detail: { scrollTop, scrollHeight, clientHeight }`.\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/menubar/\n */\n@audit()\n@keyNavigationList<Menu>()\nexport class Menu extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-menu',\n version: '0.0.0',\n children: ['nve-menu-item', 'nve-divider']\n };\n\n static elementDefinitions = {};\n\n /** @private */\n get keynavListConfig(): KeynavListConfig {\n return {\n layout: 'vertical',\n items: this.items\n };\n }\n\n /** @private */\n declare _internals: ElementInternals;\n\n @queryAssignedElements() items!: MenuItem[];\n\n #scrollRAF: number | null = null;\n\n #handleScroll = () => {\n if (this.#scrollRAF !== null) return;\n this.#scrollRAF = requestAnimationFrame(() => {\n this.#scrollRAF = null;\n const container = this.shadowRoot?.querySelector<HTMLElement>('[internal-host]');\n if (!container) return;\n const { scrollTop, scrollHeight, clientHeight } = container;\n this.dispatchEvent(\n new CustomEvent('scroll', {\n bubbles: true,\n composed: true,\n detail: { scrollTop, scrollHeight, clientHeight }\n })\n );\n });\n };\n\n render() {\n return html`\n <div internal-host>\n <slot></slot>\n </div>\n `;\n }\n\n async firstUpdated() {\n await this.updateComplete;\n this.shadowRoot\n ?.querySelector('[internal-host]')\n ?.addEventListener('scroll', this.#handleScroll, { passive: true });\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'menu';\n appendRootNodeStyle(this, globalStyles);\n }\n}\n"],"mappings":";;;;;;;;;;;AAkCO,IAAA,IAAA,cAAmB,EAAW;;gBACnB,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;GACT,UAAU,CAAC,iBAAiB,aAAa;EAC3C;;;4BAE4B,CAAC;;CAG7B,IAAI,mBAAqC;EACvC,OAAO;GACL,QAAQ;GACR,OAAO,KAAK;EACd;CACF;CAOA,KAA4B;CAE5B,WAAsB;EAChB,KAAKA,OAAe,SACxB,KAAKA,KAAa,4BAA4B;GAC5C,KAAKA,KAAa;GAClB,IAAM,IAAY,KAAK,YAAY,cAA2B,iBAAiB;GAC/E,IAAI,CAAC,GAAW;GAChB,IAAM,EAAE,cAAW,iBAAc,oBAAiB;GAClD,KAAK,cACH,IAAI,YAAY,UAAU;IACxB,SAAS;IACT,UAAU;IACV,QAAQ;KAAE;KAAW;KAAc;IAAa;GAClD,CAAC,CACH;EACF,CAAC;CACH;CAEA,SAAS;EACP,OAAO,CAAI;CAKb;CAEA,MAAM,eAAe;EAEnB,AADA,MAAM,KAAK,gBACX,KAAK,YACD,cAAc,iBAAiB,GAC/B,iBAAiB,UAAU,KAAKC,IAAe,EAAE,SAAS,GAAK,CAAC;CACtE;CAEA,oBAAoB;EAIlB,AAHA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO,QACvB,EAAoB,MAAM,CAAY;CACxC;AACF;GA1CG,EAAsB,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,UAxBxB,EAAM,GACN,EAAwB,CAAA,GAAA,CAAA"}
|
package/dist/month/define.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.js","names":[],"sources":["../../src/month/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 { Month } from '@nvidia-elements/core/month';\nimport { Control, ControlGroup, ControlMessage } from '@nvidia-elements/core/forms';\n\ndefine(Month);\ndefine(Control);\ndefine(ControlGroup);\ndefine(ControlMessage);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-month': Month;\n }\n}\n"],"mappings":";;;;;AAOA,EAAO,
|
|
1
|
+
{"version":3,"file":"define.js","names":[],"sources":["../../src/month/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 { Month } from '@nvidia-elements/core/month';\nimport { Control, ControlGroup, ControlMessage } from '@nvidia-elements/core/forms';\n\ndefine(Month);\ndefine(Control);\ndefine(ControlGroup);\ndefine(ControlMessage);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-month': Month;\n }\n}\n"],"mappings":";;;;;AAOA,EAAO,CAAK,GACZ,EAAO,CAAO,GACd,EAAO,CAAY,GACnB,EAAO,CAAc"}
|
package/dist/month/month2.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.130.0/helpers/decorate.js";
|
|
2
2
|
import { scopedRegistry as t } from "../internal/decorators/scoped-registry.js";
|
|
3
3
|
import { useStyles as n } from "../internal/styles/index.js";
|
|
4
4
|
import { Control as r } from "../forms/control/control2.js";
|
|
@@ -19,7 +19,7 @@ var l = class extends r {
|
|
|
19
19
|
static {
|
|
20
20
|
this.metadata = {
|
|
21
21
|
tag: "nve-month",
|
|
22
|
-
version: "0.1.
|
|
22
|
+
version: "0.1.2"
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
static {
|
package/dist/month/month2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"month2.js","names":[],"sources":["../../src/month/month.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { ContainerElement } from '@nvidia-elements/core/internal';\nimport { scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { inputStyles } from '@nvidia-elements/core/input';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport styles from './month.css?inline';\n\n/**\n * @element nve-month\n * @description A month picker is a control that enables users to choose a month value.\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/month\n * @cssprop --padding\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --background\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --cursor\n * @csspart icon-button - The calendar icon button element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/month\n */\n@scopedRegistry()\nexport class Month extends Control implements ContainerElement {\n /**\n * Reduces the visual container for a minimal borderless appearance while preserving whitespace bounds.\n * Use when embedding within another container such as a toolbar.\n */\n @property({ type: String, reflect: true }) container?: 'flat';\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-month',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n protected get suffixContent() {\n return html`<nve-icon-button part=\"icon-button\" .ariaLabel=${this.i18n.expand} icon-name=\"calendar\" container=\"inline\" @click=${this.showPicker}></nve-icon-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;AA4BO,IAAA,IAAA,cAAoB,EAAoC;;gBAO7C,EAAU;GAAC,GAAG,EAAQ;GAAQ;GAAa;
|
|
1
|
+
{"version":3,"file":"month2.js","names":[],"sources":["../../src/month/month.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { ContainerElement } from '@nvidia-elements/core/internal';\nimport { scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { inputStyles } from '@nvidia-elements/core/input';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport styles from './month.css?inline';\n\n/**\n * @element nve-month\n * @description A month picker is a control that enables users to choose a month value.\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/month\n * @cssprop --padding\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --background\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --cursor\n * @csspart icon-button - The calendar icon button element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/month\n */\n@scopedRegistry()\nexport class Month extends Control implements ContainerElement {\n /**\n * Reduces the visual container for a minimal borderless appearance while preserving whitespace bounds.\n * Use when embedding within another container such as a toolbar.\n */\n @property({ type: String, reflect: true }) container?: 'flat';\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-month',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n protected get suffixContent() {\n return html`<nve-icon-button part=\"icon-button\" .ariaLabel=${this.i18n.expand} icon-name=\"calendar\" container=\"inline\" @click=${this.showPicker}></nve-icon-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;AA4BO,IAAA,IAAA,cAAoB,EAAoC;;gBAO7C,EAAU;GAAC,GAAG,EAAQ;GAAQ;GAAa;EAAM,CAAC;;;kBAEvC;GACzB,KAAK;GACL,SAAS;EACX;;;4BAE4B,GACzB,EAAW,SAAS,MAAM,EAC7B;;CAEA,IAAc,gBAAgB;EAC5B,OAAO,CAAI,mDAAkD,KAAK,KAAK,OAAO,oDAAkD,KAAK,WAAW;CAClJ;AACF;GAhBG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,UAN1C,EAAe,CAAA,GAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.js","names":[],"sources":["../../src/notification/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 { Notification, NotificationGroup } from '@nvidia-elements/core/notification';\n\ndefine(Notification);\ndefine(NotificationGroup);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-notification': Notification;\n 'nve-notification-group': NotificationGroup;\n }\n}\n"],"mappings":";;;AAMA,EAAO,
|
|
1
|
+
{"version":3,"file":"define.js","names":[],"sources":["../../src/notification/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 { Notification, NotificationGroup } from '@nvidia-elements/core/notification';\n\ndefine(Notification);\ndefine(NotificationGroup);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-notification': Notification;\n 'nve-notification-group': NotificationGroup;\n }\n}\n"],"mappings":";;;AAMA,EAAO,CAAY,GACnB,EAAO,CAAiB"}
|