@nvidia-elements/core 2.0.4 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/_virtual/{_@oxc-project_runtime@0.133.0 → _@oxc-project_runtime@0.139.0}/helpers/esm/decorate.js +2 -2
- package/dist/accordion/accordion.d.ts +17 -12
- package/dist/accordion/accordion2.js +5 -5
- package/dist/accordion/accordion2.js.map +1 -1
- package/dist/accordion/define.d.ts +1 -1
- package/dist/alert/alert-group.d.ts +6 -4
- package/dist/alert/alert-group2.js +2 -2
- package/dist/alert/alert-group2.js.map +1 -1
- package/dist/alert/alert.d.ts +7 -6
- package/dist/alert/alert2.js +2 -2
- package/dist/alert/alert2.js.map +1 -1
- package/dist/alert/define.d.ts +1 -1
- package/dist/avatar/avatar-group.d.ts +2 -2
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar.d.ts +4 -3
- package/dist/avatar/avatar2.js +2 -2
- package/dist/avatar/avatar2.js.map +1 -1
- package/dist/avatar/define.d.ts +1 -1
- package/dist/badge/badge.d.ts +8 -6
- package/dist/badge/badge2.js +2 -2
- package/dist/badge/badge2.js.map +1 -1
- package/dist/badge/define.d.ts +1 -1
- package/dist/breadcrumb/breadcrumb.d.ts +5 -4
- package/dist/breadcrumb/breadcrumb2.js +2 -2
- package/dist/breadcrumb/breadcrumb2.js.map +1 -1
- package/dist/breadcrumb/define.d.ts +1 -1
- package/dist/bundle.d.ts +136 -67
- package/dist/bundles/index.d.ts +152 -0
- package/dist/bundles/index.js +4 -4
- package/dist/button/button.d.ts +5 -4
- package/dist/button/button2.js +2 -2
- package/dist/button/button2.js.map +1 -1
- package/dist/button/define.d.ts +1 -1
- package/dist/button-group/button-group.d.ts +6 -4
- package/dist/button-group/button-group2.js +2 -2
- package/dist/button-group/button-group2.js.map +1 -1
- package/dist/button-group/define.d.ts +1 -1
- package/dist/card/card.d.ts +13 -9
- package/dist/card/card2.js +5 -5
- package/dist/card/card2.js.map +1 -1
- package/dist/card/define.d.ts +1 -1
- package/dist/chat-message/chat-message.d.ts +4 -3
- package/dist/chat-message/chat-message2.js +2 -2
- package/dist/chat-message/chat-message2.js.map +1 -1
- package/dist/chat-message/define.d.ts +1 -1
- package/dist/checkbox/checkbox-group.d.ts +2 -2
- package/dist/checkbox/checkbox-group2.js +2 -2
- package/dist/checkbox/checkbox.d.ts +3 -2
- package/dist/checkbox/checkbox2.js +2 -2
- package/dist/checkbox/checkbox2.js.map +1 -1
- package/dist/checkbox/define.d.ts +1 -1
- package/dist/color/color.d.ts +6 -5
- package/dist/color/color2.js +2 -2
- package/dist/color/color2.js.map +1 -1
- package/dist/color/define.d.ts +1 -1
- package/dist/combobox/combobox.d.ts +13 -11
- package/dist/combobox/combobox2.js +2 -2
- package/dist/combobox/combobox2.js.map +1 -1
- package/dist/combobox/define.d.ts +1 -1
- package/dist/copy-button/copy-button.d.ts +8 -7
- package/dist/copy-button/copy-button2.js +2 -2
- package/dist/copy-button/copy-button2.js.map +1 -1
- package/dist/copy-button/define.d.ts +1 -1
- package/dist/custom-elements-jsx.d.ts +52 -0
- package/dist/custom-elements-vue.d.ts +52 -0
- package/dist/custom-elements.json +518 -1
- package/dist/data.html.json +388 -349
- package/dist/date/date.d.ts +6 -5
- package/dist/date/date2.js +2 -2
- package/dist/date/date2.js.map +1 -1
- package/dist/date/define.d.ts +1 -1
- package/dist/datetime/datetime.d.ts +6 -5
- package/dist/datetime/datetime2.js +2 -2
- package/dist/datetime/datetime2.js.map +1 -1
- package/dist/datetime/define.d.ts +1 -1
- package/dist/dialog/define.d.ts +1 -1
- package/dist/dialog/dialog-footer.d.ts +3 -2
- package/dist/dialog/dialog-footer2.js +2 -2
- package/dist/dialog/dialog-footer2.js.map +1 -1
- package/dist/dialog/dialog-header.d.ts +3 -2
- package/dist/dialog/dialog-header2.js +2 -2
- package/dist/dialog/dialog-header2.js.map +1 -1
- package/dist/dialog/dialog.d.ts +7 -5
- package/dist/dialog/dialog2.js +2 -2
- package/dist/dialog/dialog2.js.map +1 -1
- package/dist/divider/define.d.ts +1 -1
- package/dist/divider/divider.d.ts +5 -3
- package/dist/divider/divider2.js +2 -2
- package/dist/divider/divider2.js.map +1 -1
- package/dist/dot/define.d.ts +1 -1
- package/dist/dot/dot.d.ts +4 -3
- package/dist/dot/dot2.js +2 -2
- package/dist/dot/dot2.js.map +1 -1
- package/dist/drawer/define.d.ts +1 -1
- package/dist/drawer/drawer-content.d.ts +2 -2
- package/dist/drawer/drawer-content2.js +2 -2
- package/dist/drawer/drawer-footer.d.ts +3 -2
- package/dist/drawer/drawer-footer2.js +2 -2
- package/dist/drawer/drawer-footer2.js.map +1 -1
- package/dist/drawer/drawer-header.d.ts +3 -2
- package/dist/drawer/drawer-header2.js +2 -2
- package/dist/drawer/drawer-header2.js.map +1 -1
- package/dist/drawer/drawer.d.ts +7 -5
- package/dist/drawer/drawer2.js +2 -2
- package/dist/drawer/drawer2.js.map +1 -1
- package/dist/dropdown/define.d.ts +1 -1
- package/dist/dropdown/dropdown-footer.d.ts +3 -2
- package/dist/dropdown/dropdown-footer2.js +2 -2
- package/dist/dropdown/dropdown-footer2.js.map +1 -1
- package/dist/dropdown/dropdown-header.d.ts +3 -2
- package/dist/dropdown/dropdown-header2.js +2 -2
- package/dist/dropdown/dropdown-header2.js.map +1 -1
- package/dist/dropdown/dropdown.d.ts +7 -5
- package/dist/dropdown/dropdown2.js +2 -2
- package/dist/dropdown/dropdown2.js.map +1 -1
- package/dist/dropdown-group/define.d.ts +1 -1
- package/dist/dropdown-group/dropdown-group.d.ts +4 -3
- package/dist/dropdown-group/dropdown-group.js +2 -2
- package/dist/dropdown-group/dropdown-group.js.map +1 -1
- package/dist/dropzone/define.d.ts +1 -1
- package/dist/dropzone/dropzone.d.ts +13 -12
- package/dist/dropzone/dropzone.util.d.ts +1 -1
- package/dist/dropzone/dropzone.util.js.map +1 -1
- package/dist/dropzone/dropzone2.js +2 -2
- package/dist/dropzone/dropzone2.js.map +1 -1
- package/dist/file/define.d.ts +1 -1
- package/dist/file/file.d.ts +3 -2
- package/dist/file/file2.js +1 -1
- package/dist/file/file2.js.map +1 -1
- package/dist/format-datetime/define.d.ts +1 -1
- package/dist/format-datetime/format-datetime.d.ts +3 -2
- package/dist/format-datetime/format-datetime2.js +2 -2
- package/dist/format-datetime/format-datetime2.js.map +1 -1
- package/dist/format-number/define.d.ts +1 -1
- package/dist/format-number/format-number.d.ts +3 -2
- package/dist/format-number/format-number2.js +3 -3
- package/dist/format-number/format-number2.js.map +1 -1
- package/dist/format-relative-time/define.d.ts +1 -1
- package/dist/format-relative-time/format-relative-time.d.ts +3 -2
- 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/control.d.ts +5 -3
- package/dist/forms/control/control2.js +2 -2
- package/dist/forms/control/control2.js.map +1 -1
- package/dist/forms/control-group/control-group.d.ts +5 -3
- 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-message.d.ts +5 -4
- 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.d.ts +1 -1
- package/dist/forms/utils/layout.d.ts +2 -2
- package/dist/forms/utils/layout.js +1 -1
- package/dist/forms/utils/layout.js.map +1 -1
- package/dist/forms/utils/states.d.ts +2 -2
- package/dist/forms/utils/states.js +1 -1
- package/dist/forms/utils/states.js.map +1 -1
- package/dist/gauge/define.d.ts +6 -0
- package/dist/gauge/define.js +7 -0
- package/dist/gauge/define.js.map +1 -0
- package/dist/gauge/gauge.d.ts +53 -0
- package/dist/gauge/gauge.examples.js +6 -0
- package/dist/gauge/gauge.examples.js.map +1 -0
- package/dist/gauge/gauge.examples.json +147 -0
- package/dist/gauge/gauge.js +6 -0
- package/dist/gauge/gauge.js.map +1 -0
- package/dist/gauge/gauge2.js +106 -0
- package/dist/gauge/gauge2.js.map +1 -0
- package/dist/gauge/index.d.ts +1 -0
- package/dist/gauge/index.js +2 -0
- package/dist/grid/cell/cell.d.ts +3 -2
- package/dist/grid/cell/cell2.js +1 -1
- package/dist/grid/cell/cell2.js.map +1 -1
- package/dist/grid/column/column.d.ts +5 -3
- package/dist/grid/column/column2.js +2 -2
- package/dist/grid/column/column2.js.map +1 -1
- package/dist/grid/define.d.ts +1 -1
- package/dist/grid/footer/footer.d.ts +2 -2
- package/dist/grid/footer/footer2.js +2 -2
- package/dist/grid/grid.d.ts +7 -5
- package/dist/grid/grid2.js +2 -2
- package/dist/grid/grid2.js.map +1 -1
- package/dist/grid/header/header.d.ts +5 -3
- package/dist/grid/header/header2.js +2 -2
- package/dist/grid/header/header2.js.map +1 -1
- package/dist/grid/placeholder/placeholder.d.ts +2 -2
- package/dist/grid/placeholder/placeholder2.js +1 -1
- package/dist/grid/row/row.d.ts +3 -2
- package/dist/grid/row/row2.js +2 -2
- package/dist/grid/row/row2.js.map +1 -1
- package/dist/icon/define.d.ts +1 -1
- package/dist/icon/icon.d.ts +7 -5
- package/dist/icon/icon2.js +3 -3
- package/dist/icon/icon2.js.map +1 -1
- package/dist/icon/icons.js.map +1 -1
- package/dist/icon-button/define.d.ts +1 -1
- package/dist/icon-button/icon-button.d.ts +7 -5
- package/dist/icon-button/icon-button2.js +2 -2
- package/dist/icon-button/icon-button2.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/input/define.d.ts +1 -1
- package/dist/input/input-group.d.ts +3 -2
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input-group2.js.map +1 -1
- package/dist/input/input.d.ts +4 -3
- package/dist/input/input2.js +2 -2
- package/dist/input/input2.js.map +1 -1
- package/dist/internal/controllers/audit.controller.d.ts +1 -1
- package/dist/internal/controllers/i18n.controller.d.ts +3 -3
- package/dist/internal/controllers/i18n.controller.js +1 -1
- package/dist/internal/controllers/i18n.controller.js.map +1 -1
- package/dist/internal/controllers/keynav-grid.controller.d.ts +1 -1
- package/dist/internal/controllers/keynav-grid.controller.js.map +1 -1
- package/dist/internal/controllers/keynav-list.controller.d.ts +1 -1
- package/dist/internal/controllers/keynav-list.controller.js.map +1 -1
- package/dist/internal/controllers/state-expanded.controller.d.ts +1 -1
- package/dist/internal/controllers/state-highlighted.controller.d.ts +1 -1
- package/dist/internal/controllers/state-scroll.controller.d.ts +1 -1
- package/dist/internal/controllers/state-selected.controller.d.ts +1 -1
- package/dist/internal/controllers/state-selected.controller.js.map +1 -1
- package/dist/internal/controllers/type-anchor.controller.d.ts +1 -1
- package/dist/internal/controllers/type-anchor.controller.js.map +1 -1
- package/dist/internal/controllers/type-closable.controller.d.ts +1 -1
- package/dist/internal/controllers/type-expandable.controller.d.ts +1 -1
- package/dist/internal/controllers/type-native-popover.controller.d.ts +2 -2
- 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.d.ts +1 -1
- package/dist/internal/controllers/type-ssr.controller.d.ts +1 -1
- package/dist/internal/controllers/type-ssr.controller.js.map +1 -1
- package/dist/internal/controllers/type-touch.controller.d.ts +2 -2
- package/dist/internal/controllers/type-touch.controller.js.map +1 -1
- package/dist/internal/decorators/host-attr.d.ts +2 -2
- package/dist/internal/services/global.service.d.ts +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.map +1 -1
- package/dist/internal/services/i18n.service.js.map +1 -1
- package/dist/internal/services/transition.service.js.map +1 -1
- package/dist/internal/styles/index.d.ts +1 -1
- package/dist/internal/types/index.d.ts +3 -3
- package/dist/internal/utils/a11y.js.map +1 -1
- package/dist/internal/utils/audit-logs.js +1 -1
- package/dist/internal/utils/audit.js.map +1 -1
- package/dist/internal/utils/dom.d.ts +1 -1
- package/dist/internal/utils/dom.js +10 -10
- package/dist/internal/utils/dom.js.map +1 -1
- package/dist/internal/utils/focus.js.map +1 -1
- package/dist/internal/utils/objects.js.map +1 -1
- package/dist/internal/utils/strings.js +1 -1
- package/dist/internal/utils/strings.js.map +1 -1
- package/dist/logo/define.d.ts +1 -1
- package/dist/logo/logo.d.ts +4 -3
- package/dist/logo/logo2.js +2 -2
- package/dist/logo/logo2.js.map +1 -1
- package/dist/menu/define.d.ts +1 -1
- package/dist/menu/menu-item.d.ts +4 -3
- package/dist/menu/menu-item2.js +2 -2
- package/dist/menu/menu-item2.js.map +1 -1
- package/dist/menu/menu.d.ts +5 -4
- package/dist/menu/menu2.js +2 -2
- package/dist/menu/menu2.js.map +1 -1
- package/dist/month/define.d.ts +1 -1
- package/dist/month/month.d.ts +6 -5
- package/dist/month/month2.js +2 -2
- package/dist/month/month2.js.map +1 -1
- package/dist/notification/define.d.ts +1 -1
- package/dist/notification/notification-group.d.ts +5 -3
- package/dist/notification/notification-group2.js +2 -2
- package/dist/notification/notification-group2.js.map +1 -1
- package/dist/notification/notification.d.ts +10 -7
- package/dist/notification/notification2.js +2 -2
- package/dist/notification/notification2.js.map +1 -1
- package/dist/page/define.d.ts +1 -1
- package/dist/page/page-panel/page-panel-content.d.ts +3 -2
- 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-footer.d.ts +3 -2
- 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-header.d.ts +3 -2
- 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-panel.d.ts +5 -4
- package/dist/page/page-panel/page-panel2.js +2 -2
- package/dist/page/page-panel/page-panel2.js.map +1 -1
- package/dist/page/page.d.ts +3 -2
- package/dist/page/page2.js +2 -2
- package/dist/page/page2.js.map +1 -1
- package/dist/page-header/define.d.ts +1 -1
- package/dist/page-header/page-header.d.ts +3 -2
- package/dist/page-header/page-header2.js +1 -1
- package/dist/page-header/page-header2.js.map +1 -1
- package/dist/page-loader/define.d.ts +1 -1
- package/dist/page-loader/page-loader.d.ts +6 -4
- package/dist/page-loader/page-loader2.js +2 -2
- package/dist/page-loader/page-loader2.js.map +1 -1
- package/dist/pagination/define.d.ts +1 -1
- package/dist/pagination/pagination.d.ts +9 -8
- package/dist/pagination/pagination2.js +2 -2
- package/dist/pagination/pagination2.js.map +1 -1
- package/dist/panel/define.d.ts +1 -1
- package/dist/panel/panel.d.ts +14 -10
- package/dist/panel/panel2.js +5 -5
- package/dist/panel/panel2.js.map +1 -1
- package/dist/password/define.d.ts +1 -1
- package/dist/password/password.d.ts +6 -5
- 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.d.ts +13 -0
- package/dist/preferences-input/define.d.ts +1 -1
- package/dist/preferences-input/preferences-input.d.ts +14 -13
- package/dist/preferences-input/preferences-input2.js +2 -2
- package/dist/preferences-input/preferences-input2.js.map +1 -1
- package/dist/progress-bar/define.d.ts +1 -1
- package/dist/progress-bar/progress-bar.d.ts +4 -3
- package/dist/progress-bar/progress-bar2.js +2 -2
- package/dist/progress-bar/progress-bar2.js.map +1 -1
- package/dist/progress-ring/define.d.ts +1 -1
- package/dist/progress-ring/progress-ring.d.ts +8 -6
- package/dist/progress-ring/progress-ring2.js +4 -4
- package/dist/progress-ring/progress-ring2.js.map +1 -1
- package/dist/progressive-filter-chip/define.d.ts +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip.d.ts +8 -7
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +2 -2
- package/dist/progressive-filter-chip/progressive-filter-chip2.js.map +1 -1
- package/dist/pulse/define.d.ts +1 -1
- package/dist/pulse/pulse.d.ts +5 -4
- package/dist/pulse/pulse2.js +2 -2
- package/dist/pulse/pulse2.js.map +1 -1
- package/dist/radio/define.d.ts +1 -1
- package/dist/radio/radio-group.d.ts +2 -2
- package/dist/radio/radio-group2.js +2 -2
- package/dist/radio/radio.d.ts +3 -2
- package/dist/radio/radio2.js +2 -2
- package/dist/radio/radio2.js.map +1 -1
- package/dist/range/define.d.ts +1 -1
- package/dist/range/range.d.ts +6 -4
- package/dist/range/range2.js +2 -2
- package/dist/range/range2.js.map +1 -1
- package/dist/resize-handle/define.d.ts +1 -1
- package/dist/resize-handle/resize-handle.d.ts +7 -6
- package/dist/resize-handle/resize-handle2.js +2 -2
- package/dist/resize-handle/resize-handle2.js.map +1 -1
- package/dist/search/define.d.ts +1 -1
- package/dist/search/search.d.ts +6 -5
- package/dist/search/search2.js +2 -2
- package/dist/search/search2.js.map +1 -1
- package/dist/select/define.d.ts +1 -1
- package/dist/select/select.d.ts +12 -10
- package/dist/select/select2.js +2 -2
- package/dist/select/select2.js.map +1 -1
- package/dist/skeleton/define.d.ts +1 -1
- package/dist/skeleton/skeleton.d.ts +4 -3
- package/dist/skeleton/skeleton2.js +2 -2
- package/dist/skeleton/skeleton2.js.map +1 -1
- package/dist/sort-button/define.d.ts +1 -1
- package/dist/sort-button/sort-button.d.ts +6 -5
- package/dist/sort-button/sort-button2.js +2 -2
- package/dist/sort-button/sort-button2.js.map +1 -1
- package/dist/sparkline/define.d.ts +1 -1
- package/dist/sparkline/sparkline.d.ts +6 -4
- package/dist/sparkline/sparkline.utils.d.ts +1 -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.d.ts +1 -1
- package/dist/star-rating/star-rating.d.ts +6 -5
- package/dist/star-rating/star-rating2.js +2 -2
- package/dist/star-rating/star-rating2.js.map +1 -1
- package/dist/steps/define.d.ts +1 -1
- package/dist/steps/steps.d.ts +12 -9
- package/dist/steps/steps2.js +3 -3
- package/dist/steps/steps2.js.map +1 -1
- package/dist/switch/define.d.ts +1 -1
- package/dist/switch/switch-group.d.ts +2 -2
- package/dist/switch/switch-group2.js +2 -2
- package/dist/switch/switch.d.ts +3 -2
- package/dist/switch/switch2.js +2 -2
- package/dist/switch/switch2.js.map +1 -1
- package/dist/tabs/define.d.ts +1 -1
- package/dist/tabs/tabs-group.d.ts +5 -3
- package/dist/tabs/tabs-group2.js +2 -2
- package/dist/tabs/tabs-group2.js.map +1 -1
- package/dist/tabs/tabs.d.ts +10 -7
- package/dist/tabs/tabs2.js +3 -3
- package/dist/tabs/tabs2.js.map +1 -1
- package/dist/tag/define.d.ts +1 -1
- package/dist/tag/tag.d.ts +7 -6
- package/dist/tag/tag2.js +2 -2
- package/dist/tag/tag2.js.map +1 -1
- package/dist/textarea/define.d.ts +1 -1
- package/dist/textarea/textarea.d.ts +3 -2
- package/dist/textarea/textarea2.js +1 -1
- package/dist/textarea/textarea2.js.map +1 -1
- package/dist/time/define.d.ts +1 -1
- package/dist/time/time.d.ts +6 -5
- package/dist/time/time2.js +2 -2
- package/dist/time/time2.js.map +1 -1
- package/dist/toast/define.d.ts +1 -1
- package/dist/toast/toast.d.ts +8 -6
- package/dist/toast/toast2.js +2 -2
- package/dist/toast/toast2.js.map +1 -1
- package/dist/toggletip/define.d.ts +1 -1
- package/dist/toggletip/toggletip-footer.d.ts +3 -2
- package/dist/toggletip/toggletip-footer2.js +2 -2
- package/dist/toggletip/toggletip-footer2.js.map +1 -1
- package/dist/toggletip/toggletip-header.d.ts +3 -2
- package/dist/toggletip/toggletip-header2.js +2 -2
- package/dist/toggletip/toggletip-header2.js.map +1 -1
- package/dist/toggletip/toggletip.d.ts +7 -5
- package/dist/toggletip/toggletip2.js +2 -2
- package/dist/toggletip/toggletip2.js.map +1 -1
- package/dist/toolbar/define.d.ts +1 -1
- package/dist/toolbar/toolbar.d.ts +6 -4
- package/dist/toolbar/toolbar2.js +2 -2
- package/dist/toolbar/toolbar2.js.map +1 -1
- package/dist/tooltip/define.d.ts +1 -1
- package/dist/tooltip/tooltip.d.ts +5 -3
- package/dist/tooltip/tooltip2.js +2 -2
- package/dist/tooltip/tooltip2.js.map +1 -1
- package/dist/tree/define.d.ts +1 -1
- package/dist/tree/tree-node.d.ts +7 -6
- package/dist/tree/tree-node2.js +2 -2
- package/dist/tree/tree-node2.js.map +1 -1
- package/dist/tree/tree.d.ts +6 -4
- package/dist/tree/tree2.js +2 -2
- package/dist/tree/tree2.js.map +1 -1
- package/dist/week/define.d.ts +1 -1
- package/dist/week/week.d.ts +6 -5
- package/dist/week/week2.js +2 -2
- package/dist/week/week2.js.map +1 -1
- package/package.json +23 -11
package/dist/panel/panel2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel2.js","names":["#i18nController","#direction","#typeExpandableController"],"sources":["../../src/panel/panel.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { when } from 'lit/directives/when.js';\nimport {\n stateExpanded,\n I18nController,\n TypeExpandableController,\n useStyles,\n attachInternals,\n scopedRegistry\n} from '@nvidia-elements/core/internal';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport panelStyleSheet from './panel.css?inline';\nimport panelHeaderStyleSheet from './panel-header.css?inline';\nimport panelContentStyleSheet from './panel-content.css?inline';\nimport panelFooterStyleSheet from './panel-footer.css?inline';\n\n/**\n * @element nve-panel-header\n * @description Displays the title, subtitle, and optional action controls at the top of a panel.\n * @since 0.10.0\n * @entrypoint \\@nvidia-elements/core/panel\n * @slot - default content slot\n * @slot title - Title Text\n * @slot subtitle - Subtitle Text\n * @slot action-icon - Extra Action Button\n * @cssprop --padding\n * @cssprop --border-bottom\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/\n * @deprecated use `nve-page-panel-header` with `nve-page-panel` instead\n */\nexport class PanelHeader extends LitElement {\n static styles = useStyles([panelHeaderStyleSheet]);\n\n static readonly metadata = {\n tag: 'nve-panel-header',\n version: '0.0.0'\n };\n\n render() {\n return html`\n <div internal-host>\n <div id=\"titles\">\n <slot name=\"title\"></slot>\n <slot name=\"subtitle\"></slot>\n <slot></slot>\n </div>\n\n <slot name=\"action-icon\"></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback(); // Do not override connectedCallback w/out supering\n this.slot = 'header';\n }\n}\n\n/**\n * @element nve-panel-content\n * @description Contains the main body content within a panel, providing a structured region for detailed information.\n * @since 0.10.0\n * @entrypoint \\@nvidia-elements/core/panel\n * @slot - This is a default/unnamed slot for panel content\n * @cssprop --padding\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/\n * @deprecated use `nve-page-panel-content` with `nve-page-panel` instead\n */\nexport class PanelContent extends LitElement {\n static styles = useStyles([panelContentStyleSheet]);\n\n static readonly metadata = {\n tag: 'nve-panel-content',\n version: '0.0.0'\n };\n\n render() {\n return html`\n <slot></slot>\n `;\n }\n}\n\n/**\n * @element nve-panel-footer\n * @description Provides a designated area at the bottom of a panel for actions or supplementary controls.\n * @since 0.10.0\n * @entrypoint \\@nvidia-elements/core/panel\n * @slot - This is a default/unnamed slot for panel footer content\n * @cssprop --padding\n * @cssprop --border-top\n * @cssprop --gap\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/\n * @deprecated use `nve-page-panel-footer` with `nve-page-panel` instead\n */\nexport class PanelFooter extends LitElement {\n static styles = useStyles([panelFooterStyleSheet]);\n\n static readonly metadata = {\n tag: 'nve-panel-footer',\n version: '0.0.0'\n };\n\n render() {\n return html`\n <footer internal-host>\n <slot></slot>\n </footer>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback(); // Do not override connectedCallback w/out supering\n this.slot = 'footer';\n }\n}\n\n/**\n * @element nve-panel\n * @description Panel is inline container for content that couples to the content on the page (details, extra actions/options). Or [Drawer](./docs/elements/drawer/) is out of context of the rest of the page (notifications, navigations, settings).\n * @since 0.10.0\n * @entrypoint \\@nvidia-elements/core/panel\n * @event open - Dispatched when the panel opens.\n * @event close - Dispatched when the panel closes.\n * @slot - This is a default/unnamed slot for panel content\n * @slot header - header element (Use `panel-header` or custom content)\n * @slot content - content element (Use `panel-content` or custom content)\n * @slot footer - footer element (Use `panel-footer` or custom content)\n * @cssprop --background\n * @cssprop --color\n * @cssprop --box-shadow\n * @cssprop --panel-button-border-radius - Border radius of the panel expand/collapse button\n * @csspart icon-button - The expand/collapse icon button element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/\n * @deprecated use `nve-page-panel` with `nve-page` instead\n */\n\n@scopedRegistry()\n@stateExpanded<Panel>()\nexport class Panel extends LitElement {\n /**\n * Determines whether the panel is fully expanded, displaying its contents, or not.\n */\n @property({ type: Boolean, reflect: true }) expanded = false;\n\n /**\n * Determines whether the panel collapses down to an expand icon, or fully hides.\n */\n @property({ type: Boolean }) closable = false;\n\n /**\n * Determines whether the panel should handle auto-closing behavior vs. defaults to off.\n */\n @property({ type: Boolean, attribute: 'behavior-expand' }) behaviorExpand = false;\n\n /**\n * Sets the proper collapse icon and collapse animation, based on which side of the page the panel occupies.\n */\n @property({ type: String }) side: 'left' | 'right' = 'left';\n\n static styles = useStyles([panelStyleSheet]);\n\n static readonly metadata = {\n tag: 'nve-panel',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n /** @private */\n declare _internals: ElementInternals;\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n #typeExpandableController = new TypeExpandableController(this);\n\n /**\n * Enables updating internal string values for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n get #direction() {\n if (this.side === 'left') {\n return this.expanded ? 'left' : 'right';\n } else {\n return this.expanded ? 'right' : 'left';\n }\n }\n\n render() {\n return html`\n <div internal-host>\n <div class=\"header\">\n <slot name=\"header\"></slot>\n\n ${when(\n !this.closable,\n () => html`\n <nve-icon-button part=\"icon-button\" exportparts=\"icon:icon-button-icon\" .container=${this.expanded ? 'flat' : undefined} icon-name=\"double-chevron\"\n @click=${() => this.#typeExpandableController.toggle()}\n .direction=${this.#direction}\n .expanded=${this.expanded}\n .ariaLabel=${this.expanded ? this.i18n.close : this.i18n.expand}\n ></nve-icon-button>\n `,\n () => html`\n <nve-icon-button part=\"icon-button\" exportparts=\"icon:icon-button-icon\" container=\"flat\" icon-name=\"cancel\"\n @click=${() => this.#typeExpandableController.close()}\n .expanded=${this.expanded}\n .ariaLabel=${this.expanded ? this.i18n.hide : this.i18n.show}\n ></nve-icon-button>\n `\n )}\n </div>\n\n <div class=\"content\">\n <slot></slot>\n </div>\n\n <slot name=\"footer\"></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'region';\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"panel2.js","names":["#i18nController","#direction","#typeExpandableController"],"sources":["../../src/panel/panel.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { when } from 'lit/directives/when.js';\nimport {\n stateExpanded,\n I18nController,\n TypeExpandableController,\n useStyles,\n attachInternals,\n scopedRegistry\n} from '@nvidia-elements/core/internal';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport panelStyleSheet from './panel.css?inline';\nimport panelHeaderStyleSheet from './panel-header.css?inline';\nimport panelContentStyleSheet from './panel-content.css?inline';\nimport panelFooterStyleSheet from './panel-footer.css?inline';\n\n/**\n * @element nve-panel-header\n * @description Displays the title, subtitle, and optional action controls at the top of a panel.\n * @documentation https://nvidia.github.io/elements/docs/elements/panel/\n * @since 0.10.0\n * @entrypoint \\@nvidia-elements/core/panel\n * @slot - default content slot\n * @slot title - Title Text\n * @slot subtitle - Subtitle Text\n * @slot action-icon - Extra Action Button\n * @cssprop --padding\n * @cssprop --border-bottom\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/\n * @deprecated use `nve-page-panel-header` with `nve-page-panel` instead\n */\nexport class PanelHeader extends LitElement {\n static styles = useStyles([panelHeaderStyleSheet]);\n\n static readonly metadata = {\n tag: 'nve-panel-header',\n version: '0.0.0'\n };\n\n render() {\n return html`\n <div internal-host>\n <div id=\"titles\">\n <slot name=\"title\"></slot>\n <slot name=\"subtitle\"></slot>\n <slot></slot>\n </div>\n\n <slot name=\"action-icon\"></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback(); // Do not override connectedCallback w/out supering\n this.slot = 'header';\n }\n}\n\n/**\n * @element nve-panel-content\n * @description Contains the main body content within a panel, providing a structured region for detailed information.\n * @documentation https://nvidia.github.io/elements/docs/elements/panel/\n * @since 0.10.0\n * @entrypoint \\@nvidia-elements/core/panel\n * @slot - This is a default/unnamed slot for panel content\n * @cssprop --padding\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/\n * @deprecated use `nve-page-panel-content` with `nve-page-panel` instead\n */\nexport class PanelContent extends LitElement {\n static styles = useStyles([panelContentStyleSheet]);\n\n static readonly metadata = {\n tag: 'nve-panel-content',\n version: '0.0.0'\n };\n\n render() {\n return html`\n <slot></slot>\n `;\n }\n}\n\n/**\n * @element nve-panel-footer\n * @description Provides a designated area at the bottom of a panel for actions or supplementary controls.\n * @documentation https://nvidia.github.io/elements/docs/elements/panel/\n * @since 0.10.0\n * @entrypoint \\@nvidia-elements/core/panel\n * @slot - This is a default/unnamed slot for panel footer content\n * @cssprop --padding\n * @cssprop --border-top\n * @cssprop --gap\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/\n * @deprecated use `nve-page-panel-footer` with `nve-page-panel` instead\n */\nexport class PanelFooter extends LitElement {\n static styles = useStyles([panelFooterStyleSheet]);\n\n static readonly metadata = {\n tag: 'nve-panel-footer',\n version: '0.0.0'\n };\n\n render() {\n return html`\n <footer internal-host>\n <slot></slot>\n </footer>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback(); // Do not override connectedCallback w/out supering\n this.slot = 'footer';\n }\n}\n\n/**\n * @element nve-panel\n * @description Panel is inline container for content that couples to the content on the page (details, extra actions/options). Or [Drawer](./docs/elements/drawer/) is out of context of the rest of the page (notifications, navigations, settings).\n * @documentation https://nvidia.github.io/elements/docs/elements/panel/\n * @since 0.10.0\n * @entrypoint \\@nvidia-elements/core/panel\n * @event open - Dispatched when the panel opens.\n * @event close - Dispatched when the panel closes.\n * @slot - This is a default/unnamed slot for panel content\n * @slot header - header element (Use `panel-header` or custom content)\n * @slot content - content element (Use `panel-content` or custom content)\n * @slot footer - footer element (Use `panel-footer` or custom content)\n * @cssprop --background\n * @cssprop --color\n * @cssprop --box-shadow\n * @cssprop --panel-button-border-radius - Border radius of the panel expand/collapse button\n * @csspart icon-button - The expand/collapse icon button element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/\n * @deprecated use `nve-page-panel` with `nve-page` instead\n */\n\n@scopedRegistry()\n@stateExpanded<Panel>()\nexport class Panel extends LitElement {\n /**\n * Determines whether the panel is fully expanded, displaying its contents, or not.\n */\n @property({ type: Boolean, reflect: true }) expanded = false;\n\n /**\n * Determines whether the panel collapses down to an expand icon, or fully hides.\n */\n @property({ type: Boolean }) closable = false;\n\n /**\n * Determines whether the panel should handle auto-closing behavior vs. defaults to off.\n */\n @property({ type: Boolean, attribute: 'behavior-expand' }) behaviorExpand = false;\n\n /**\n * Sets the proper collapse icon and collapse animation, based on which side of the page the panel occupies.\n */\n @property({ type: String }) side: 'left' | 'right' = 'left';\n\n static styles = useStyles([panelStyleSheet]);\n\n static readonly metadata = {\n tag: 'nve-panel',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n /** @private */\n declare _internals: ElementInternals;\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n #typeExpandableController = new TypeExpandableController(this);\n\n /**\n * Enables updating internal string values for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n get #direction() {\n if (this.side === 'left') {\n return this.expanded ? 'left' : 'right';\n } else {\n return this.expanded ? 'right' : 'left';\n }\n }\n\n render() {\n return html`\n <div internal-host>\n <div class=\"header\">\n <slot name=\"header\"></slot>\n\n ${when(\n !this.closable,\n () => html`\n <nve-icon-button part=\"icon-button\" exportparts=\"icon:icon-button-icon\" .container=${this.expanded ? 'flat' : undefined} icon-name=\"double-chevron\"\n @click=${() => this.#typeExpandableController.toggle()}\n .direction=${this.#direction}\n .expanded=${this.expanded}\n .ariaLabel=${this.expanded ? this.i18n.close : this.i18n.expand}\n ></nve-icon-button>\n `,\n () => html`\n <nve-icon-button part=\"icon-button\" exportparts=\"icon:icon-button-icon\" container=\"flat\" icon-name=\"cancel\"\n @click=${() => this.#typeExpandableController.close()}\n .expanded=${this.expanded}\n .ariaLabel=${this.expanded ? this.i18n.hide : this.i18n.show}\n ></nve-icon-button>\n `\n )}\n </div>\n\n <div class=\"content\">\n <slot></slot>\n </div>\n\n <slot name=\"footer\"></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'region';\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAmCA,IAAa,IAAb,cAAiC,EAAW;;gBAC1B,EAAU,CAAC,CAAqB,CAAC;;;kBAEtB;GACzB,KAAK;GACL,SAAS;EACX;;CAEA,SAAS;EACP,OAAO,CAAI;CAWb;CAEA,oBAAoB;EAElB,AADA,MAAM,kBAAkB,GACxB,KAAK,OAAO;CACd;AACF,GAaa,IAAb,cAAkC,EAAW;;gBAC3B,EAAU,CAAC,CAAsB,CAAC;;;kBAEvB;GACzB,KAAK;GACL,SAAS;EACX;;CAEA,SAAS;EACP,OAAO,CAAI;CAGb;AACF,GAea,IAAb,cAAiC,EAAW;;gBAC1B,EAAU,CAAC,CAAqB,CAAC;;;kBAEtB;GACzB,KAAK;GACL,SAAS;EACX;;CAEA,SAAS;EACP,OAAO,CAAI;CAKb;CAEA,oBAAoB;EAElB,AADA,MAAM,kBAAkB,GACxB,KAAK,OAAO;CACd;AACF,GAyBO,IAAA,cAAoB,EAAW;;+BAImB,oBAKf,0BAKoC,gBAKvB,kBAgBb,IAAI,EAAqB,IAAI,aACzC,IAAI,EAAyB,IAAI,eAK1B,KAAKA,GAAgB;;;gBApBxC,EAAU,CAAC,CAAe,CAAC;;;kBAEhB;GACzB,KAAK;GACL,SAAS;EACX;;;4BAE4B,GACzB,EAAW,SAAS,MAAM,EAC7B;;CAKA;CACA;CAOA,IAAIC,KAAa;EAIb,OAHE,KAAK,SAAS,SACT,KAAK,WAAW,SAAS,UAEzB,KAAK,WAAW,UAAU;CAErC;CAEA,SAAS;EACP,OAAO,CAAI,qEAKH,EACA,CAAC,KAAK,gBACA,CAAI,uFAC6E,KAAK,WAAW,SAAS,KAAA,EAAU,6CACvG,KAAKC,GAA0B,OAAO,EAAE,gBAC1C,KAAKD,GAAW,eACjB,KAAK,SAAS,gBACb,KAAK,WAAW,KAAK,KAAK,QAAQ,KAAK,KAAK,OAAO,6BAG9D,CAAI,6HAES,KAAKC,GAA0B,MAAM,EAAE,eAC1C,KAAK,SAAS,gBACb,KAAK,WAAW,KAAK,KAAK,OAAO,KAAK,KAAK,KAAK,qBAGnE,EAAE;CAUV;CAEA,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO;CACzB;AACF;GAvFG,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,MAKzC,EAAS,EAAE,MAAM,QAAQ,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,MAK1B,EAAS;CAAE,MAAM;CAAS,WAAW;AAAkB,CAAC,CAAA,GAAA,EAAA,WAAA,kBAAA,KAAA,CAAA,MAKxD,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,MAsBzB,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,UA3C3B,EAAe,GACf,EAAqB,CAAA,GAAA,CAAA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ContainerElement } from '
|
|
2
|
-
import { Control } from '
|
|
3
|
-
import { IconButton } from '
|
|
1
|
+
import type { ContainerElement } from '@nvidia-elements/core/internal';
|
|
2
|
+
import { Control } from '@nvidia-elements/core/forms';
|
|
3
|
+
import { IconButton } from '@nvidia-elements/core/icon-button';
|
|
4
4
|
/**
|
|
5
5
|
* @element nve-password
|
|
6
6
|
* @description A password is a control that enables users to enter password text.
|
|
7
|
+
* @documentation https://nvidia.github.io/elements/docs/elements/password/
|
|
7
8
|
* @since 0.3.0
|
|
8
9
|
* @entrypoint \@nvidia-elements/core/password
|
|
9
10
|
* @cssprop --padding
|
|
@@ -24,7 +25,7 @@ export declare class Password extends Control implements ContainerElement {
|
|
|
24
25
|
*/
|
|
25
26
|
container?: 'flat';
|
|
26
27
|
private pressed;
|
|
27
|
-
static styles: import(
|
|
28
|
+
static styles: import("lit").CSSResult[];
|
|
28
29
|
static readonly metadata: {
|
|
29
30
|
tag: string;
|
|
30
31
|
version: string;
|
|
@@ -32,5 +33,5 @@ export declare class Password extends Control implements ContainerElement {
|
|
|
32
33
|
static elementDefinitions: {
|
|
33
34
|
[IconButton.metadata.tag]: typeof IconButton;
|
|
34
35
|
};
|
|
35
|
-
protected get suffixContent(): import(
|
|
36
|
+
protected get suffixContent(): import("lit").TemplateResult<1>;
|
|
36
37
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { scopedRegistry as e } from "../internal/decorators/scoped-registry.js";
|
|
2
2
|
import { useStyles as t } from "../internal/styles/index.js";
|
|
3
|
-
import
|
|
3
|
+
import n from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
4
4
|
import { Control as r } from "../forms/control/control2.js";
|
|
5
5
|
import { IconButton as i } from "../icon-button/icon-button2.js";
|
|
6
6
|
import { inputStyles as a } from "../input/input2.js";
|
|
@@ -23,7 +23,7 @@ var u = class extends r {
|
|
|
23
23
|
static {
|
|
24
24
|
this.metadata = {
|
|
25
25
|
tag: "nve-password",
|
|
26
|
-
version: "2.
|
|
26
|
+
version: "2.1.1"
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
static {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password2.js","names":["#toggleVisibility"],"sources":["../../src/password/password.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 { state } from 'lit/decorators/state.js';\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 './password.css?inline';\n\n/**\n * @element nve-password\n * @description A password is a control that enables users to enter password text.\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/password\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 visibility toggle icon button element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/password\n */\n@scopedRegistry()\nexport class Password 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 @state() private pressed = false;\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-password',\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\" @click=${() => this.#toggleVisibility()} .pressed=${this.pressed} .iconName=${this.pressed ? 'eye-hidden' : 'eye'} container=\"inline\" .ariaLabel=${this.pressed ? this.i18n.hide : this.i18n.show}></nve-icon-button>`;\n }\n\n #toggleVisibility() {\n this.pressed = !this.pressed;\n this.input.type = this.pressed ? 'text' : 'password';\n }\n}\n"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"password2.js","names":["#toggleVisibility"],"sources":["../../src/password/password.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 { state } from 'lit/decorators/state.js';\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 './password.css?inline';\n\n/**\n * @element nve-password\n * @description A password is a control that enables users to enter password text.\n * @documentation https://nvidia.github.io/elements/docs/elements/password/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/password\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 visibility toggle icon button element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/password\n */\n@scopedRegistry()\nexport class Password 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 @state() private pressed = false;\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-password',\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\" @click=${() => this.#toggleVisibility()} .pressed=${this.pressed} .iconName=${this.pressed ? 'eye-hidden' : 'eye'} container=\"inline\" .ariaLabel=${this.pressed ? this.i18n.hide : this.i18n.show}></nve-icon-button>`;\n }\n\n #toggleVisibility() {\n this.pressed = !this.pressed;\n this.input.type = this.pressed ? 'text' : 'password';\n }\n}\n"],"mappings":";;;;;;;;;;;AA8BO,IAAA,IAAA,cAAuB,EAAoC;;8BAOrC;;;gBAEX,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,qDAAoD,KAAKA,GAAkB,EAAE,cAAY,KAAK,QAAQ,eAAa,KAAK,UAAU,eAAe,MAAM,mCAAiC,KAAK,UAAU,KAAK,KAAK,OAAO,KAAK,KAAK,KAAK;CACpP;CAEA,KAAoB;EAElB,AADA,KAAK,UAAU,CAAC,KAAK,SACrB,KAAK,MAAM,OAAO,KAAK,UAAU,SAAS;CAC5C;AACF;GAvBG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,MAExC,EAAM,CAAA,GAAA,EAAA,WAAA,WAAA,KAAA,CAAA,UARR,EAAe,CAAA,GAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-state-set.js","names":[],"sources":["../../src/polyfills/custom-state-set.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nconst SUPPORTS_CUSTOM_STATES = CSS.supports('selector(:state(test))');\n\n/**\n * CustomStateSet Polyfill for :state() syntax downleveled to legacy :--state syntax (Chromium < v123)\n * https://html.spec.whatwg.org/multipage/custom-elements.html#exposing-custom-element-states\n *\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1588763\n */\n\nclass CustomStateSetPolyfill extends Set {\n // not using native private fields due to terser bug\n private _stateSet: CustomStateSet; // eslint-disable-line no-restricted-syntax\n private _element: HTMLElement; // eslint-disable-line no-restricted-syntax\n\n constructor(stateSet: CustomStateSet, element: HTMLElement) {\n super();\n this._stateSet = stateSet;\n this._element = element;\n }\n\n add(state: string) {\n super.add(state);\n try {\n this._stateSet?.add(state.replace('--', ''));\n // try latest syntax :state()\n } catch {\n // else fallback to legacy syntax [state--*]\n this._element.setAttribute(`state--${state.replace('--', '')}`, '');\n }\n return this;\n }\n\n delete(state: string) {\n super.delete(state);\n try {\n this._stateSet?.delete(state);\n } catch {\n this._element.removeAttribute(`state--${state.replace('--', '')}`);\n }\n return true;\n }\n\n clear() {\n for (const state of this) this.delete(state);\n }\n}\n\ncustomStateSetPolyfill();\n\nfunction customStateSetPolyfill() {\n const attachInternals = HTMLElement.prototype.attachInternals;\n Object.defineProperty(HTMLElement.prototype, 'attachInternals', {\n value: function (..._args: unknown[]) {\n const internals = attachInternals.call(this) as unknown as ElementInternals;\n Object.defineProperty(internals, 'states', { value: new CustomStateSetPolyfill(internals.states, this) });\n return internals;\n }\n });\n\n const matches = Element.prototype.matches;\n Object.defineProperty(Element.prototype, 'matches', {\n value: function (text: string) {\n return matches.call(this, replaceToLegacyState(text));\n }\n });\n\n const replaceSync = CSSStyleSheet.prototype.replaceSync;\n Object.defineProperty(CSSStyleSheet.prototype, 'replaceSync', {\n value: function (text: string) {\n replaceSync.call(this, replaceToLegacyState(text));\n }\n });\n}\n\nfunction replaceToLegacyState(value: string) {\n // if the browser does not support :state(*) selectors replace any CSS state selectors with attribute fallbacks [state-*]\n if (!SUPPORTS_CUSTOM_STATES) {\n return value.replace(/:--([^\\)]+)/g, '[state--$1]').replace(/:state\\(([^\\)]+)\\)/g, '[state--$1]');\n } else {\n return value.replace(/:--([^\\)]+)/g, ':state($1)');\n }\n}\n"],"mappings":";AAGA,IAAM,IAAyB,IAAI,SAAS,wBAAwB,GAS9D,IAAN,cAAqC,IAAI;CAKvC,YAAY,GAA0B,GAAsB;EAG1D,AAFA,MAAM,GACN,KAAK,YAAY,GACjB,KAAK,WAAW;CAClB;CAEA,IAAI,GAAe;EACjB,MAAM,IAAI,CAAK;EACf,IAAI;GACF,KAAK,WAAW,IAAI,EAAM,QAAQ,MAAM,EAAE,CAAC;EAE7C,QAAQ;GAEN,KAAK,SAAS,aAAa,UAAU,EAAM,QAAQ,MAAM,EAAE,KAAK,EAAE;EACpE;EACA,OAAO;CACT;CAEA,OAAO,GAAe;EACpB,MAAM,OAAO,CAAK;EAClB,IAAI;GACF,KAAK,WAAW,OAAO,CAAK;EAC9B,QAAQ;GACN,KAAK,SAAS,gBAAgB,UAAU,EAAM,QAAQ,MAAM,EAAE,GAAG;EACnE;EACA,OAAO;CACT;CAEA,QAAQ;EACN,KAAK,IAAM,KAAS,MAAM,KAAK,OAAO,CAAK;CAC7C;AACF;AAEA,EAAuB;AAEvB,SAAS,IAAyB;CAChC,IAAM,IAAkB,YAAY,UAAU;CAC9C,OAAO,eAAe,YAAY,WAAW,mBAAmB,EAC9D,OAAO,SAAU,GAAG,GAAkB;EACpC,IAAM,IAAY,EAAgB,KAAK,IAAI;EAE3C,OADA,OAAO,eAAe,GAAW,UAAU,EAAE,OAAO,IAAI,EAAuB,EAAU,QAAQ,IAAI,EAAE,CAAC,GACjG;CACT,EACF,CAAC;CAED,IAAM,IAAU,QAAQ,UAAU;CAClC,OAAO,eAAe,QAAQ,WAAW,WAAW,EAClD,OAAO,SAAU,GAAc;EAC7B,OAAO,EAAQ,KAAK,MAAM,EAAqB,CAAI,CAAC;CACtD,EACF,CAAC;CAED,IAAM,IAAc,cAAc,UAAU;CAC5C,OAAO,eAAe,cAAc,WAAW,eAAe,EAC5D,OAAO,SAAU,GAAc;EAC7B,EAAY,KAAK,MAAM,EAAqB,CAAI,CAAC;CACnD,EACF,CAAC;AACH;AAEA,SAAS,EAAqB,GAAe;CAGzC,OADG,IAGI,EAAM,QAAQ,gBAAgB,YAAY,IAF1C,EAAM,QAAQ,gBAAgB,aAAa,
|
|
1
|
+
{"version":3,"file":"custom-state-set.js","names":[],"sources":["../../src/polyfills/custom-state-set.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nconst SUPPORTS_CUSTOM_STATES = CSS.supports('selector(:state(test))');\n\n/**\n * CustomStateSet Polyfill for :state() syntax downleveled to legacy :--state syntax (Chromium < v123)\n * https://html.spec.whatwg.org/multipage/custom-elements.html#exposing-custom-element-states\n *\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1588763\n */\n\nclass CustomStateSetPolyfill extends Set {\n // not using native private fields due to terser bug\n private _stateSet: CustomStateSet; // eslint-disable-line no-restricted-syntax\n private _element: HTMLElement; // eslint-disable-line no-restricted-syntax\n\n constructor(stateSet: CustomStateSet, element: HTMLElement) {\n super();\n this._stateSet = stateSet;\n this._element = element;\n }\n\n add(state: string) {\n super.add(state);\n try {\n this._stateSet?.add(state.replace('--', ''));\n // try latest syntax :state()\n } catch {\n // else fallback to legacy syntax [state--*]\n this._element.setAttribute(`state--${state.replace('--', '')}`, '');\n }\n return this;\n }\n\n delete(state: string) {\n super.delete(state);\n try {\n this._stateSet?.delete(state);\n } catch {\n this._element.removeAttribute(`state--${state.replace('--', '')}`);\n }\n return true;\n }\n\n clear() {\n for (const state of this) this.delete(state);\n }\n}\n\ncustomStateSetPolyfill();\n\nfunction customStateSetPolyfill() {\n const attachInternals = HTMLElement.prototype.attachInternals;\n Object.defineProperty(HTMLElement.prototype, 'attachInternals', {\n value: function (..._args: unknown[]) {\n const internals = attachInternals.call(this) as unknown as ElementInternals;\n Object.defineProperty(internals, 'states', { value: new CustomStateSetPolyfill(internals.states, this) });\n return internals;\n }\n });\n\n const matches = Element.prototype.matches;\n Object.defineProperty(Element.prototype, 'matches', {\n value: function (text: string) {\n return matches.call(this, replaceToLegacyState(text));\n }\n });\n\n const replaceSync = CSSStyleSheet.prototype.replaceSync;\n Object.defineProperty(CSSStyleSheet.prototype, 'replaceSync', {\n value: function (text: string) {\n replaceSync.call(this, replaceToLegacyState(text));\n }\n });\n}\n\nfunction replaceToLegacyState(value: string) {\n // if the browser does not support :state(*) selectors replace any CSS state selectors with attribute fallbacks [state-*]\n if (!SUPPORTS_CUSTOM_STATES) {\n return value.replace(/:--([^\\)]+)/g, '[state--$1]').replace(/:state\\(([^\\)]+)\\)/g, '[state--$1]');\n } else {\n return value.replace(/:--([^\\)]+)/g, ':state($1)');\n }\n}\n"],"mappings":";AAGA,IAAM,IAAyB,IAAI,SAAS,wBAAwB,GAS9D,IAAN,cAAqC,IAAI;CAKvC,YAAY,GAA0B,GAAsB;EAG1D,AAFA,MAAM,GACN,KAAK,YAAY,GACjB,KAAK,WAAW;CAClB;CAEA,IAAI,GAAe;EACjB,MAAM,IAAI,CAAK;EACf,IAAI;GACF,KAAK,WAAW,IAAI,EAAM,QAAQ,MAAM,EAAE,CAAC;EAE7C,QAAQ;GAEN,KAAK,SAAS,aAAa,UAAU,EAAM,QAAQ,MAAM,EAAE,KAAK,EAAE;EACpE;EACA,OAAO;CACT;CAEA,OAAO,GAAe;EACpB,MAAM,OAAO,CAAK;EAClB,IAAI;GACF,KAAK,WAAW,OAAO,CAAK;EAC9B,QAAQ;GACN,KAAK,SAAS,gBAAgB,UAAU,EAAM,QAAQ,MAAM,EAAE,GAAG;EACnE;EACA,OAAO;CACT;CAEA,QAAQ;EACN,KAAK,IAAM,KAAS,MAAM,KAAK,OAAO,CAAK;CAC7C;AACF;AAEA,EAAuB;AAEvB,SAAS,IAAyB;CAChC,IAAM,IAAkB,YAAY,UAAU;CAC9C,OAAO,eAAe,YAAY,WAAW,mBAAmB,EAC9D,OAAO,SAAU,GAAG,GAAkB;EACpC,IAAM,IAAY,EAAgB,KAAK,IAAI;EAE3C,OADA,OAAO,eAAe,GAAW,UAAU,EAAE,OAAO,IAAI,EAAuB,EAAU,QAAQ,IAAI,EAAE,CAAC,GACjG;CACT,EACF,CAAC;CAED,IAAM,IAAU,QAAQ,UAAU;CAClC,OAAO,eAAe,QAAQ,WAAW,WAAW,EAClD,OAAO,SAAU,GAAc;EAC7B,OAAO,EAAQ,KAAK,MAAM,EAAqB,CAAI,CAAC;CACtD,EACF,CAAC;CAED,IAAM,IAAc,cAAc,UAAU;CAC5C,OAAO,eAAe,cAAc,WAAW,eAAe,EAC5D,OAAO,SAAU,GAAc;EAC7B,EAAY,KAAK,MAAM,EAAqB,CAAI,CAAC;CACnD,EACF,CAAC;AACH;AAEA,SAAS,EAAqB,GAAe;CAGzC,OADG,IAGI,EAAM,QAAQ,gBAAgB,YAAY,IAF1C,EAAM,QAAQ,gBAAgB,aAAa,CAAC,CAAC,QAAQ,uBAAuB,aAAa;AAIpG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* - Vitest (happy-dom/js-dom)
|
|
3
|
+
* - Safari
|
|
4
|
+
*
|
|
5
|
+
* Used for Custom Elements Form/A11y APIs
|
|
6
|
+
* https://github.com/whatwg/html/pull/8467
|
|
7
|
+
* https://bugs.webkit.org/show_bug.cgi?id=215911
|
|
8
|
+
* https://bugzilla.mozilla.org/show_bug.cgi?id=1588763
|
|
9
|
+
*/
|
|
10
|
+
import 'construct-style-sheets-polyfill';
|
|
11
|
+
import 'element-internals-polyfill';
|
|
12
|
+
import 'formdata-polyfill';
|
|
13
|
+
import './custom-state-set.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { Icon } from '
|
|
3
|
-
import { Control } from '
|
|
4
|
-
import { Divider } from '
|
|
5
|
-
import { Menu, MenuItem } from '
|
|
6
|
-
import { Switch } from '
|
|
2
|
+
import { Icon } from '@nvidia-elements/core/icon';
|
|
3
|
+
import { Control } from '@nvidia-elements/core/forms';
|
|
4
|
+
import { Divider } from '@nvidia-elements/core/divider';
|
|
5
|
+
import { Menu, MenuItem } from '@nvidia-elements/core/menu';
|
|
6
|
+
import { Switch } from '@nvidia-elements/core/switch';
|
|
7
7
|
export type ColorScheme = 'auto' | 'light' | 'dark' | 'high-contrast';
|
|
8
8
|
export type Scale = 'default' | 'compact' | 'relaxed';
|
|
9
9
|
export type Variant = 'reduced-motion';
|
|
@@ -12,10 +12,11 @@ export interface PreferencesInputValue {
|
|
|
12
12
|
scale?: Scale | string;
|
|
13
13
|
'reduced-motion'?: boolean;
|
|
14
14
|
}
|
|
15
|
-
declare const PreferencesInput_base: import(
|
|
15
|
+
declare const PreferencesInput_base: import("@nvidia-elements/forms/mixins").FormControlMixinReturn<typeof LitElement, PreferencesInputValue>;
|
|
16
16
|
/**
|
|
17
17
|
* @element nve-preferences-input
|
|
18
18
|
* @description A preferences input is a widget for controlling apperance. Stylesheets register to the preferences input by including a css-property, see Standard for an example.
|
|
19
|
+
* @documentation https://nvidia.github.io/elements/docs/elements/preferences-input/
|
|
19
20
|
* @since 1.23.7
|
|
20
21
|
* @entrypoint \@nvidia-elements/core/preferences-input
|
|
21
22
|
* @event input - Dispatched when the value has changed
|
|
@@ -37,24 +38,24 @@ export declare class PreferencesInput extends PreferencesInput_base {
|
|
|
37
38
|
/**
|
|
38
39
|
* Enables updating internal string values for internationalization.
|
|
39
40
|
*/
|
|
40
|
-
i18n: Partial<import(
|
|
41
|
+
i18n: Partial<import("@nvidia-elements/core/internal").I18nStrings & {
|
|
41
42
|
__set: boolean;
|
|
42
43
|
}>;
|
|
43
|
-
static styles: import(
|
|
44
|
+
static styles: import("lit").CSSResult[];
|
|
44
45
|
static readonly metadata: {
|
|
45
46
|
tag: string;
|
|
46
47
|
version: string;
|
|
47
48
|
valueSchema: {
|
|
48
|
-
type:
|
|
49
|
+
type: 'object';
|
|
49
50
|
properties: {
|
|
50
51
|
'color-scheme': {
|
|
51
|
-
type:
|
|
52
|
+
type: 'string';
|
|
52
53
|
};
|
|
53
54
|
scale: {
|
|
54
|
-
type:
|
|
55
|
+
type: 'string';
|
|
55
56
|
};
|
|
56
57
|
'reduced-motion': {
|
|
57
|
-
type:
|
|
58
|
+
type: 'boolean';
|
|
58
59
|
};
|
|
59
60
|
};
|
|
60
61
|
};
|
|
@@ -68,7 +69,7 @@ export declare class PreferencesInput extends PreferencesInput_base {
|
|
|
68
69
|
[Switch.metadata.tag]: typeof Switch;
|
|
69
70
|
};
|
|
70
71
|
private activePreferences;
|
|
71
|
-
render(): import(
|
|
72
|
+
render(): import("lit").TemplateResult<1>;
|
|
72
73
|
constructor();
|
|
73
74
|
connectedCallback(): void;
|
|
74
75
|
/** @private */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { I18nController as e } from "../internal/controllers/i18n.controller.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
|
-
import
|
|
4
|
+
import r from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
5
5
|
import { Icon as i } from "../icon/icon2.js";
|
|
6
6
|
import { Control as a } from "../forms/control/control2.js";
|
|
7
7
|
import { Switch as o } from "../switch/switch2.js";
|
|
@@ -43,7 +43,7 @@ var x = class extends g(d) {
|
|
|
43
43
|
static {
|
|
44
44
|
this.metadata = {
|
|
45
45
|
tag: "nve-preferences-input",
|
|
46
|
-
version: "2.
|
|
46
|
+
version: "2.1.1",
|
|
47
47
|
valueSchema: {
|
|
48
48
|
type: "object",
|
|
49
49
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences-input2.js","names":["#setColorScheme","#setScale","#setReducedMotion","#i18nController","#updatePreferences","#update"],"sources":["../../src/preferences-input/preferences-input.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, isServer, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { I18nController, scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { state } from 'lit/decorators/state.js';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixins';\nimport { type IconName, Icon } from '@nvidia-elements/core/icon';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { Divider } from '@nvidia-elements/core/divider';\nimport { Menu, MenuItem } from '@nvidia-elements/core/menu';\nimport { Switch } from '@nvidia-elements/core/switch';\nimport styles from './preferences-input.css?inline';\n\nexport type ColorScheme = 'auto' | 'light' | 'dark' | 'high-contrast';\nexport type Scale = 'default' | 'compact' | 'relaxed';\nexport type Variant = 'reduced-motion';\n\nconst colorSchemes: ColorScheme[] = ['auto', 'light', 'dark', 'high-contrast'];\nconst scales: Scale[] = ['default', 'compact'];\nconst colorSchemesIcons = {\n auto: 'computer',\n light: 'sun',\n dark: 'moon',\n 'high-contrast': 'circle-half'\n} satisfies Record<ColorScheme, IconName>;\n\nfunction getActivePreferences(element = globalThis.document.documentElement) {\n const computedStyle = getComputedStyle(element);\n\n return {\n light: computedStyle.getPropertyValue('--nve-config-color-scheme-light') === 'true',\n dark: computedStyle.getPropertyValue('--nve-config-color-scheme-dark') === 'true',\n 'high-contrast': computedStyle.getPropertyValue('--nve-config-color-scheme-high-contrast') === 'true',\n compact: computedStyle.getPropertyValue('--nve-config-scale-compact') === 'true',\n 'reduced-motion': computedStyle.getPropertyValue('--nve-config-reduced-motion') === 'true'\n } satisfies Partial<Record<ColorScheme | Scale | Variant, boolean>>;\n}\n\nexport interface PreferencesInputValue {\n 'color-scheme'?: ColorScheme | string;\n scale?: Scale | string;\n 'reduced-motion'?: boolean;\n}\n\n/**\n * @element nve-preferences-input\n * @description A preferences input is a widget for controlling apperance. Stylesheets register to the preferences input by including a css-property, see Standard for an example.\n * @since 1.23.7\n * @entrypoint \\@nvidia-elements/core/preferences-input\n * @event input - Dispatched when the value has changed\n * @event change - Dispatched when the value has changed\n * @cssprop --color\n * @cssprop --width\n * @csspart control - The control wrapper elements that contain the labels and menus\n * @csspart menu - The menu elements that display color scheme and scale options\n * @csspart menu-item - The individual menu item elements for each selectable option\n * @csspart icon - The icon element displayed next to color scheme options\n * @csspart divider - The divider elements that separate preference sections\n * @csspart switch - The switch element for the reduced motion toggle\n *\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/listbox/\n *\n */\n@scopedRegistry()\nexport class PreferencesInput extends FormControlMixin<typeof LitElement, PreferencesInputValue>(LitElement) {\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /**\n * Enables updating internal string values for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-preferences-input',\n version: '0.0.0',\n valueSchema: {\n type: 'object' as const,\n properties: {\n 'color-scheme': { type: 'string' as const },\n scale: { type: 'string' as const },\n 'reduced-motion': { type: 'boolean' as const }\n }\n }\n };\n\n static elementDefinitions = {\n [Control.metadata.tag]: Control,\n [Divider.metadata.tag]: Divider,\n [Icon.metadata.tag]: Icon,\n [Menu.metadata.tag]: Menu,\n [MenuItem.metadata.tag]: MenuItem,\n [Switch.metadata.tag]: Switch\n };\n\n @state() private activePreferences: ReturnType<typeof getActivePreferences> = {\n light: false,\n dark: false,\n 'high-contrast': false,\n compact: false,\n 'reduced-motion': false\n };\n\n // eslint-disable-next-line max-lines-per-function\n render() {\n return html`\n <div internal-host>\n <nve-control part=\"control\">\n <label>${this.i18n.colorScheme}</label>\n <nve-menu part=\"menu\" nve-control>\n ${colorSchemes.map(\n value => html`\n <nve-menu-item part=\"menu-item\"\n .selected=${this.value?.['color-scheme'] === value}\n .value=${value}\n @click=${() => this.#setColorScheme(value)}\n >\n <nve-icon part=\"icon\" name=${colorSchemesIcons[value]}></nve-icon> ${value}\n </nve-menu-item>\n `\n )}\n </nve-menu>\n </nve-control>\n ${\n this.activePreferences['compact']\n ? html`\n <nve-divider part=\"divider\"></nve-divider>\n <nve-control part=\"control\">\n <label>${this.i18n.scale}</label>\n <nve-menu part=\"menu\" nve-control>\n ${scales.map(\n value => html`\n <nve-menu-item part=\"menu-item\"\n .selected=${this.value?.['scale'] === value}\n .value=${value}\n @click=${() => this.#setScale(value)}\n >\n ${value}\n </nve-menu-item>\n `\n )}\n </nve-menu>\n </nve-control>\n `\n : ''\n }\n ${\n this.activePreferences['reduced-motion']\n ? html`\n <nve-divider part=\"divider\"></nve-divider>\n <nve-switch part=\"switch\">\n <label>${this.i18n.reducedMotion}</label>\n <input\n type=\"checkbox\"\n value=\"reduced-motion\"\n .checked=${this.value?.['reduced-motion']}\n @change=${(e: { target: HTMLInputElement }) => this.#setReducedMotion(e.target.checked)}\n />\n </nve-switch>`\n : ''\n }\n </div>\n `;\n }\n\n constructor() {\n super();\n this.value = {\n 'color-scheme': 'auto',\n 'reduced-motion': false,\n scale: 'default'\n };\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('nve-control', '');\n this.#updatePreferences();\n }\n\n /** @private */\n updateValue(value: PreferencesInputValue) {\n super.updateValue({ ...this.value, ...value });\n this.#updatePreferences();\n }\n\n #updatePreferences() {\n /* istanbul ignore else -- Lit SSR mode is not reachable in browser unit tests. */\n if (!isServer) {\n const preferences = getActivePreferences();\n if (JSON.stringify(this.activePreferences) !== JSON.stringify(preferences)) {\n this.activePreferences = preferences;\n }\n }\n }\n\n #setColorScheme(value: ColorScheme) {\n this.value = { ...this.value, 'color-scheme': value };\n this.#update();\n }\n\n #setScale(value: Scale) {\n this.value = { ...this.value, scale: value };\n this.#update();\n }\n\n #setReducedMotion(value: boolean) {\n this.value = { ...this.value, 'reduced-motion': value };\n this.#update();\n }\n\n #update() {\n this.dispatchInputEvent();\n this.dispatchChangeEvent();\n }\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"preferences-input2.js","names":["#setColorScheme","#setScale","#setReducedMotion","#i18nController","#updatePreferences","#update"],"sources":["../../src/preferences-input/preferences-input.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, isServer, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { I18nController, scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { state } from 'lit/decorators/state.js';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixins';\nimport { type IconName, Icon } from '@nvidia-elements/core/icon';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { Divider } from '@nvidia-elements/core/divider';\nimport { Menu, MenuItem } from '@nvidia-elements/core/menu';\nimport { Switch } from '@nvidia-elements/core/switch';\nimport styles from './preferences-input.css?inline';\n\nexport type ColorScheme = 'auto' | 'light' | 'dark' | 'high-contrast';\nexport type Scale = 'default' | 'compact' | 'relaxed';\nexport type Variant = 'reduced-motion';\n\nconst colorSchemes: ColorScheme[] = ['auto', 'light', 'dark', 'high-contrast'];\nconst scales: Scale[] = ['default', 'compact'];\nconst colorSchemesIcons = {\n auto: 'computer',\n light: 'sun',\n dark: 'moon',\n 'high-contrast': 'circle-half'\n} satisfies Record<ColorScheme, IconName>;\n\nfunction getActivePreferences(element = globalThis.document.documentElement) {\n const computedStyle = getComputedStyle(element);\n\n return {\n light: computedStyle.getPropertyValue('--nve-config-color-scheme-light') === 'true',\n dark: computedStyle.getPropertyValue('--nve-config-color-scheme-dark') === 'true',\n 'high-contrast': computedStyle.getPropertyValue('--nve-config-color-scheme-high-contrast') === 'true',\n compact: computedStyle.getPropertyValue('--nve-config-scale-compact') === 'true',\n 'reduced-motion': computedStyle.getPropertyValue('--nve-config-reduced-motion') === 'true'\n } satisfies Partial<Record<ColorScheme | Scale | Variant, boolean>>;\n}\n\nexport interface PreferencesInputValue {\n 'color-scheme'?: ColorScheme | string;\n scale?: Scale | string;\n 'reduced-motion'?: boolean;\n}\n\n/**\n * @element nve-preferences-input\n * @description A preferences input is a widget for controlling apperance. Stylesheets register to the preferences input by including a css-property, see Standard for an example.\n * @documentation https://nvidia.github.io/elements/docs/elements/preferences-input/\n * @since 1.23.7\n * @entrypoint \\@nvidia-elements/core/preferences-input\n * @event input - Dispatched when the value has changed\n * @event change - Dispatched when the value has changed\n * @cssprop --color\n * @cssprop --width\n * @csspart control - The control wrapper elements that contain the labels and menus\n * @csspart menu - The menu elements that display color scheme and scale options\n * @csspart menu-item - The individual menu item elements for each selectable option\n * @csspart icon - The icon element displayed next to color scheme options\n * @csspart divider - The divider elements that separate preference sections\n * @csspart switch - The switch element for the reduced motion toggle\n *\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/listbox/\n *\n */\n@scopedRegistry()\nexport class PreferencesInput extends FormControlMixin<typeof LitElement, PreferencesInputValue>(LitElement) {\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /**\n * Enables updating internal string values for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-preferences-input',\n version: '0.0.0',\n valueSchema: {\n type: 'object' as const,\n properties: {\n 'color-scheme': { type: 'string' as const },\n scale: { type: 'string' as const },\n 'reduced-motion': { type: 'boolean' as const }\n }\n }\n };\n\n static elementDefinitions = {\n [Control.metadata.tag]: Control,\n [Divider.metadata.tag]: Divider,\n [Icon.metadata.tag]: Icon,\n [Menu.metadata.tag]: Menu,\n [MenuItem.metadata.tag]: MenuItem,\n [Switch.metadata.tag]: Switch\n };\n\n @state() private activePreferences: ReturnType<typeof getActivePreferences> = {\n light: false,\n dark: false,\n 'high-contrast': false,\n compact: false,\n 'reduced-motion': false\n };\n\n // eslint-disable-next-line max-lines-per-function\n render() {\n return html`\n <div internal-host>\n <nve-control part=\"control\">\n <label>${this.i18n.colorScheme}</label>\n <nve-menu part=\"menu\" nve-control>\n ${colorSchemes.map(\n value => html`\n <nve-menu-item part=\"menu-item\"\n .selected=${this.value?.['color-scheme'] === value}\n .value=${value}\n @click=${() => this.#setColorScheme(value)}\n >\n <nve-icon part=\"icon\" name=${colorSchemesIcons[value]}></nve-icon> ${value}\n </nve-menu-item>\n `\n )}\n </nve-menu>\n </nve-control>\n ${\n this.activePreferences['compact']\n ? html`\n <nve-divider part=\"divider\"></nve-divider>\n <nve-control part=\"control\">\n <label>${this.i18n.scale}</label>\n <nve-menu part=\"menu\" nve-control>\n ${scales.map(\n value => html`\n <nve-menu-item part=\"menu-item\"\n .selected=${this.value?.['scale'] === value}\n .value=${value}\n @click=${() => this.#setScale(value)}\n >\n ${value}\n </nve-menu-item>\n `\n )}\n </nve-menu>\n </nve-control>\n `\n : ''\n }\n ${\n this.activePreferences['reduced-motion']\n ? html`\n <nve-divider part=\"divider\"></nve-divider>\n <nve-switch part=\"switch\">\n <label>${this.i18n.reducedMotion}</label>\n <input\n type=\"checkbox\"\n value=\"reduced-motion\"\n .checked=${this.value?.['reduced-motion']}\n @change=${(e: { target: HTMLInputElement }) => this.#setReducedMotion(e.target.checked)}\n />\n </nve-switch>`\n : ''\n }\n </div>\n `;\n }\n\n constructor() {\n super();\n this.value = {\n 'color-scheme': 'auto',\n 'reduced-motion': false,\n scale: 'default'\n };\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.setAttribute('nve-control', '');\n this.#updatePreferences();\n }\n\n /** @private */\n updateValue(value: PreferencesInputValue) {\n super.updateValue({ ...this.value, ...value });\n this.#updatePreferences();\n }\n\n #updatePreferences() {\n /* istanbul ignore else -- Lit SSR mode is not reachable in browser unit tests. */\n if (!isServer) {\n const preferences = getActivePreferences();\n if (JSON.stringify(this.activePreferences) !== JSON.stringify(preferences)) {\n this.activePreferences = preferences;\n }\n }\n }\n\n #setColorScheme(value: ColorScheme) {\n this.value = { ...this.value, 'color-scheme': value };\n this.#update();\n }\n\n #setScale(value: Scale) {\n this.value = { ...this.value, scale: value };\n this.#update();\n }\n\n #setReducedMotion(value: boolean) {\n this.value = { ...this.value, 'reduced-motion': value };\n this.#update();\n }\n\n #update() {\n this.dispatchInputEvent();\n this.dispatchChangeEvent();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAmBA,IAAM,IAA8B;CAAC;CAAQ;CAAS;CAAQ;AAAe,GACvE,IAAkB,CAAC,WAAW,SAAS,GACvC,IAAoB;CACxB,MAAM;CACN,OAAO;CACP,MAAM;CACN,iBAAiB;AACnB;AAEA,SAAS,EAAqB,IAAU,WAAW,SAAS,iBAAiB;CAC3E,IAAM,IAAgB,iBAAiB,CAAO;CAE9C,OAAO;EACL,OAAO,EAAc,iBAAiB,iCAAiC,MAAM;EAC7E,MAAM,EAAc,iBAAiB,gCAAgC,MAAM;EAC3E,iBAAiB,EAAc,iBAAiB,yCAAyC,MAAM;EAC/F,SAAS,EAAc,iBAAiB,4BAA4B,MAAM;EAC1E,kBAAkB,EAAc,iBAAiB,6BAA6B,MAAM;CACtF;AACF;AA6BO,IAAA,IAAA,cAA+B,EAA2D,CAAU,CAAC,CAAC;CAC3G;;gBAOgB,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;GACT,aAAa;IACX,MAAM;IACN,YAAY;KACV,gBAAgB,EAAE,MAAM,SAAkB;KAC1C,OAAO,EAAE,MAAM,SAAkB;KACjC,kBAAkB,EAAE,MAAM,UAAmB;IAC/C;GACF;EACF;;;4BAE4B;IACzB,EAAQ,SAAS,MAAM;IACvB,EAAQ,SAAS,MAAM;IACvB,EAAK,SAAS,MAAM;IACpB,EAAK,SAAS,MAAM;IACpB,EAAS,SAAS,MAAM;IACxB,EAAO,SAAS,MAAM;EACzB;;CAWA,SAAS;EACP,OAAO,CAAI,yDAGI,KAAK,KAAK,YAAY,4CAE7B,EAAa,KACb,MAAS,CAAI,8CAEC,KAAK,QAAQ,oBAAoB,EAAM,YAC1C,EAAM,kBACA,KAAKA,GAAgB,CAAK,EAAE,gCAEd,EAAkB,GAAO,eAAe,EAAM,iBAG/E,EAAE,2BAIF,KAAK,kBAAkB,UACnB,CAAI,gFAGC,KAAK,KAAK,MAAM,4CAEvB,EAAO,KACP,MAAS,CAAI,8CAEC,KAAK,OAAQ,UAAa,EAAM,YACnC,EAAM,kBACA,KAAKC,GAAU,CAAK,EAAE,IAEnC,EAAM,iBAGZ,EAAE,6BAIE,GACL,GAEC,KAAK,kBAAkB,oBACnB,CAAI,8EAGC,KAAK,KAAK,cAAc,mEAIpB,KAAK,QAAQ,kBAAkB,cAC/B,MAAoC,KAAKC,GAAkB,EAAE,OAAO,OAAO,EAAE,mBAGtF,GACL;CAGP;CAEA,cAAc;EAEZ,AADA,MAAM,aAtGgC,IAAI,EAAqB,IAAI,eAKlC,KAAKC,GAAgB,+BA0BsB;GAC5E,OAAO;GACP,MAAM;GACN,iBAAiB;GACjB,SAAS;GACT,kBAAkB;EACpB,GAkEE,KAAK,QAAQ;GACX,gBAAgB;GAChB,kBAAkB;GAClB,OAAO;EACT;CACF;CAEA,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxB,KAAK,aAAa,eAAe,EAAE,GACnC,KAAKC,GAAmB;CAC1B;CAGA,YAAY,GAA8B;EAExC,AADA,MAAM,YAAY;GAAE,GAAG,KAAK;GAAO,GAAG;EAAM,CAAC,GAC7C,KAAKA,GAAmB;CAC1B;CAEA,KAAqB;;EAEnB,IAAI,CAAC,GAAU;GACb,IAAM,IAAc,EAAqB;GACzC,AAAI,KAAK,UAAU,KAAK,iBAAiB,MAAM,KAAK,UAAU,CAAW,MACvE,KAAK,oBAAoB;EAE7B;CACF;CAEA,GAAgB,GAAoB;EAElC,AADA,KAAK,QAAQ;GAAE,GAAG,KAAK;GAAO,gBAAgB;EAAM,GACpD,KAAKC,GAAQ;CACf;CAEA,GAAU,GAAc;EAEtB,AADA,KAAK,QAAQ;GAAE,GAAG,KAAK;GAAO,OAAO;EAAM,GAC3C,KAAKA,GAAQ;CACf;CAEA,GAAkB,GAAgB;EAEhC,AADA,KAAK,QAAQ;GAAE,GAAG,KAAK;GAAO,kBAAkB;EAAM,GACtD,KAAKA,GAAQ;CACf;CAEA,KAAU;EAER,AADA,KAAK,mBAAmB,GACxB,KAAK,oBAAoB;CAC3B;AACF;GAlJG,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,MA0BzB,EAAM,CAAA,GAAA,EAAA,WAAA,qBAAA,KAAA,CAAA,UAjCR,EAAe,CAAA,GAAA,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { SupportStatus } from '
|
|
2
|
+
import type { SupportStatus } from '@nvidia-elements/core/internal';
|
|
3
3
|
/**
|
|
4
4
|
* @element nve-progress-bar
|
|
5
5
|
* @description A progress bar is a visual indicator of the status of a running task. Under the hood, the component uses the native HTML `progress` element to achieve proper a11y concerns.
|
|
6
|
+
* @documentation https://nvidia.github.io/elements/docs/elements/progress-bar/
|
|
6
7
|
* @since 0.16.0
|
|
7
8
|
* @entrypoint \@nvidia-elements/core/progress-bar
|
|
8
9
|
* @cssprop --height
|
|
@@ -13,7 +14,7 @@ import { SupportStatus } from '../internal';
|
|
|
13
14
|
* @aria https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/progressbar_role
|
|
14
15
|
*/
|
|
15
16
|
export declare class ProgressBar extends LitElement {
|
|
16
|
-
static styles: import(
|
|
17
|
+
static styles: import("lit").CSSResult[];
|
|
17
18
|
static readonly metadata: {
|
|
18
19
|
tag: string;
|
|
19
20
|
version: string;
|
|
@@ -24,5 +25,5 @@ export declare class ProgressBar extends LitElement {
|
|
|
24
25
|
max?: number | undefined;
|
|
25
26
|
/** Defines visual treatment to represent a ongoing task or support status. */
|
|
26
27
|
status: SupportStatus;
|
|
27
|
-
render(): import(
|
|
28
|
+
render(): import("lit").TemplateResult<1>;
|
|
28
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { scopedRegistry as e } from "../internal/decorators/scoped-registry.js";
|
|
2
2
|
import { useStyles as t } from "../internal/styles/index.js";
|
|
3
|
-
import
|
|
3
|
+
import n from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
4
4
|
import r from "./progress-bar.js";
|
|
5
5
|
import { LitElement as i, html as a } from "lit";
|
|
6
6
|
import { property as o } from "lit/decorators/property.js";
|
|
@@ -16,7 +16,7 @@ var c = class extends i {
|
|
|
16
16
|
static {
|
|
17
17
|
this.metadata = {
|
|
18
18
|
tag: "nve-progress-bar",
|
|
19
|
-
version: "2.
|
|
19
|
+
version: "2.1.1"
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar2.js","names":[],"sources":["../../src/progress-bar/progress-bar.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 type { SupportStatus } from '@nvidia-elements/core/internal';\nimport { scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { property } from 'lit/decorators/property.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport styles from './progress-bar.css?inline';\n\n/**\n * @element nve-progress-bar\n * @description A progress bar is a visual indicator of the status of a running task. Under the hood, the component uses the native HTML `progress` element to achieve proper a11y concerns.\n * @since 0.16.0\n * @entrypoint \\@nvidia-elements/core/progress-bar\n * @cssprop --height\n * @cssprop --opacity\n * @cssprop --background\n * @cssprop --accent-color\n * @cssprop --indeterminate-gradient - Gradient used for indeterminate state animation\n * @aria https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/progressbar_role\n */\n@scopedRegistry()\nexport class ProgressBar extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-progress-bar',\n version: '0.0.0'\n };\n\n /** The current `value` of the progress indicator, set to the native HTML progress element. */\n @property({ type: Number, reflect: true }) value?: number;\n\n /** The `max` property sets the highest value that `value` scales to. */\n @property({ type: Number }) max? = 100;\n\n /** Defines visual treatment to represent a ongoing task or support status. */\n @property({ type: String, reflect: true }) status: SupportStatus;\n\n render() {\n const classes = {\n full: this.value === this.max,\n 'min-width': this.value !== undefined && this.value > 0,\n indeterminate: this.value === undefined\n };\n\n return html`\n <progress internal-host .max=${this.max as number} .value=${this.value === undefined ? (100 as number) : (this.value as number)} class=${classMap(classes)}></progress>\n `;\n }\n}\n"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"progress-bar2.js","names":[],"sources":["../../src/progress-bar/progress-bar.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 type { SupportStatus } from '@nvidia-elements/core/internal';\nimport { scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { property } from 'lit/decorators/property.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport styles from './progress-bar.css?inline';\n\n/**\n * @element nve-progress-bar\n * @description A progress bar is a visual indicator of the status of a running task. Under the hood, the component uses the native HTML `progress` element to achieve proper a11y concerns.\n * @documentation https://nvidia.github.io/elements/docs/elements/progress-bar/\n * @since 0.16.0\n * @entrypoint \\@nvidia-elements/core/progress-bar\n * @cssprop --height\n * @cssprop --opacity\n * @cssprop --background\n * @cssprop --accent-color\n * @cssprop --indeterminate-gradient - Gradient used for indeterminate state animation\n * @aria https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/progressbar_role\n */\n@scopedRegistry()\nexport class ProgressBar extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-progress-bar',\n version: '0.0.0'\n };\n\n /** The current `value` of the progress indicator, set to the native HTML progress element. */\n @property({ type: Number, reflect: true }) value?: number;\n\n /** The `max` property sets the highest value that `value` scales to. */\n @property({ type: Number }) max? = 100;\n\n /** Defines visual treatment to represent a ongoing task or support status. */\n @property({ type: String, reflect: true }) status: SupportStatus;\n\n render() {\n const classes = {\n full: this.value === this.max,\n 'min-width': this.value !== undefined && this.value > 0,\n indeterminate: this.value === undefined\n };\n\n return html`\n <progress internal-host .max=${this.max as number} .value=${this.value === undefined ? (100 as number) : (this.value as number)} class=${classMap(classes)}></progress>\n `;\n }\n}\n"],"mappings":";;;;;;;;AAwBO,IAAA,IAAA,cAA0B,EAAW;;0BAYP;;;gBAXnB,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;EACX;;CAWA,SAAS;EACP,IAAM,IAAU;GACd,MAAM,KAAK,UAAU,KAAK;GAC1B,aAAa,KAAK,UAAU,KAAA,KAAa,KAAK,QAAQ;GACtD,eAAe,KAAK,UAAU,KAAA;EAChC;EAEA,OAAO,CAAI,iCACsB,KAAK,IAAc,YAAU,KAAK,UAAU,KAAA,IAAa,MAAkB,KAAK,MAAiB,WAAS,EAAS,CAAO,EAAE;CAE/J;AACF;GAnBG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,MAGxC,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,OAAA,KAAA,CAAA,MAGzB,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,UAhB1C,EAAe,CAAA,GAAA,CAAA"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { PropertyValues
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { PropertyValues } from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import type { Size, SupportStatus } from '@nvidia-elements/core/internal';
|
|
4
|
+
import { Icon } from '@nvidia-elements/core/icon';
|
|
4
5
|
/**
|
|
5
6
|
* @element nve-progress-ring
|
|
6
7
|
* @description The `progress-ring` component shows the status of a pending task. It also serves the basis of the page loading element.
|
|
8
|
+
* @documentation https://nvidia.github.io/elements/docs/elements/progress-ring/
|
|
7
9
|
* @since 0.17.0
|
|
8
10
|
* @entrypoint \@nvidia-elements/core/progress-ring
|
|
9
11
|
* @slot - Content to display in the ring center. Defaults to a status icon.
|
|
@@ -20,7 +22,7 @@ import { Icon } from '../icon';
|
|
|
20
22
|
*/
|
|
21
23
|
export declare class ProgressRing extends LitElement {
|
|
22
24
|
#private;
|
|
23
|
-
static styles: import(
|
|
25
|
+
static styles: import("lit").CSSResult[];
|
|
24
26
|
static readonly metadata: {
|
|
25
27
|
tag: string;
|
|
26
28
|
version: string;
|
|
@@ -39,10 +41,10 @@ export declare class ProgressRing extends LitElement {
|
|
|
39
41
|
/** T-shirt `size` of the progress indicator, used to scale the ring. */
|
|
40
42
|
size?: Size | 'xxs' | 'xs' | 'xl';
|
|
41
43
|
/** Enables updating internal string values for internationalization. */
|
|
42
|
-
i18n: Partial<import(
|
|
44
|
+
i18n: Partial<import("@nvidia-elements/core/internal").I18nStrings & {
|
|
43
45
|
__set: boolean;
|
|
44
46
|
}>;
|
|
45
|
-
render(): import(
|
|
47
|
+
render(): import("lit").TemplateResult<1>;
|
|
46
48
|
connectedCallback(): void;
|
|
47
49
|
updated(props: PropertyValues<this>): void;
|
|
48
50
|
}
|
|
@@ -3,7 +3,7 @@ import { attachInternals as t } from "../internal/utils/a11y.js";
|
|
|
3
3
|
import { scopedRegistry as n } from "../internal/decorators/scoped-registry.js";
|
|
4
4
|
import { useStyles as r } from "../internal/styles/index.js";
|
|
5
5
|
import { statusIcons as i } from "../internal/types/index.js";
|
|
6
|
-
import
|
|
6
|
+
import a from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
7
7
|
import { Icon as o } from "../icon/icon2.js";
|
|
8
8
|
import s from "./progress-ring.js";
|
|
9
9
|
import { LitElement as c, html as l } from "lit";
|
|
@@ -19,7 +19,7 @@ var d = class extends c {
|
|
|
19
19
|
static {
|
|
20
20
|
this.metadata = {
|
|
21
21
|
tag: "nve-progress-ring",
|
|
22
|
-
version: "2.
|
|
22
|
+
version: "2.1.1"
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
static {
|
|
@@ -34,8 +34,8 @@ var d = class extends c {
|
|
|
34
34
|
}
|
|
35
35
|
updated(e) {
|
|
36
36
|
super.updated(e), this._internals.ariaValueNow = `${this.value === void 0 ? "" : this.value}`, this._internals.ariaValueMax = `${this.max}`;
|
|
37
|
-
let t = this.i18n;
|
|
38
|
-
this._internals.ariaLabel =
|
|
37
|
+
let { status: t } = this, n = t !== void 0 && t !== "neutral" && t !== "accent" ? this.i18n[t] : void 0;
|
|
38
|
+
this._internals.ariaLabel = n ?? this.i18n.information ?? null;
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
a([u({ type: Number })], d.prototype, "value", void 0), a([u({ type: Number })], d.prototype, "max", void 0), a([u({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-ring2.js","names":["#i18nController"],"sources":["../../src/progress-ring/progress-ring.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { PropertyValues } from 'lit';\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { Size, SupportStatus } from '@nvidia-elements/core/internal';\nimport {\n attachInternals,\n I18nController,\n scopedRegistry,\n statusIcons,\n useStyles\n} from '@nvidia-elements/core/internal';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport styles from './progress-ring.css?inline';\n\n/**\n * @element nve-progress-ring\n * @description The `progress-ring` component shows the status of a pending task. It also serves the basis of the page loading element.\n * @since 0.17.0\n * @entrypoint \\@nvidia-elements/core/progress-ring\n * @slot - Content to display in the ring center. Defaults to a status icon.\n * @cssprop --background-color\n * @cssprop --ring-color\n * @cssprop --ring-background-opacity\n * @cssprop --ring-width\n * @cssprop --width\n * @cssprop --height\n * @cssprop --animation-duration\n * @cssprop --color\n * @csspart icon - The icon element\n * @aria https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/progressbar_role\n */\n@scopedRegistry()\nexport class ProgressRing extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-progress-ring',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon\n };\n\n /** @private */\n declare _internals: ElementInternals;\n\n /** The current `value` of the progress ring. When not set, an indeterminate animation will show. */\n @property({ type: Number }) value?: number;\n\n /** The `max` value of the progress ring that the `value` is proportionally scaled to. */\n @property({ type: Number }) max? = 100;\n\n /** Four visual treatments represent the `status` of tasks. When `status` changes to `warning`, `success`, or `danger`, the component embeds appropriate icons. */\n @property({ type: String, reflect: true }) status?: SupportStatus | 'neutral' = 'neutral';\n\n /** T-shirt `size` of the progress indicator, used to scale the ring. */\n @property({ type: String, reflect: true }) size?: Size | 'xxs' | 'xs' | 'xl';\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /** Enables updating internal string values for internationalization. */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n render() {\n return html`\n <div internal-host ?indeterminate=${this.value === undefined}>\n <svg viewBox=\"0 0 16 16\" role=\"presentation\">\n <circle cx=\"8px\" cy=\"8px\" r=\"6.5px\" class=\"background\"></circle>\n <circle cx=\"8px\" cy=\"8px\" r=\"6.5px\" class=\"ring\"\n stroke-dasharray=${`${((this.value ?? 0) / (this.max ?? 100)) * 44}px 44px`}>\n </circle>\n </svg>\n <slot>\n ${\n this.status !== 'accent'\n ? html`<nve-icon part=\"icon\" .name=${this.status ? statusIcons[this.status] : undefined} .status=${this.status as SupportStatus} aria-hidden=\"true\"></nve-icon>`\n : ''\n }\n </slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'progressbar';\n }\n\n updated(props: PropertyValues<this>) {\n super.updated(props);\n this._internals.ariaValueNow = `${this.value === undefined ? '' : this.value}`;\n this._internals.ariaValueMax = `${this.max}`;\n const
|
|
1
|
+
{"version":3,"file":"progress-ring2.js","names":["#i18nController"],"sources":["../../src/progress-ring/progress-ring.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { PropertyValues } from 'lit';\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { Size, SupportStatus } from '@nvidia-elements/core/internal';\nimport {\n attachInternals,\n I18nController,\n scopedRegistry,\n statusIcons,\n useStyles\n} from '@nvidia-elements/core/internal';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport styles from './progress-ring.css?inline';\n\n/**\n * @element nve-progress-ring\n * @description The `progress-ring` component shows the status of a pending task. It also serves the basis of the page loading element.\n * @documentation https://nvidia.github.io/elements/docs/elements/progress-ring/\n * @since 0.17.0\n * @entrypoint \\@nvidia-elements/core/progress-ring\n * @slot - Content to display in the ring center. Defaults to a status icon.\n * @cssprop --background-color\n * @cssprop --ring-color\n * @cssprop --ring-background-opacity\n * @cssprop --ring-width\n * @cssprop --width\n * @cssprop --height\n * @cssprop --animation-duration\n * @cssprop --color\n * @csspart icon - The icon element\n * @aria https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/progressbar_role\n */\n@scopedRegistry()\nexport class ProgressRing extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-progress-ring',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon\n };\n\n /** @private */\n declare _internals: ElementInternals;\n\n /** The current `value` of the progress ring. When not set, an indeterminate animation will show. */\n @property({ type: Number }) value?: number;\n\n /** The `max` value of the progress ring that the `value` is proportionally scaled to. */\n @property({ type: Number }) max? = 100;\n\n /** Four visual treatments represent the `status` of tasks. When `status` changes to `warning`, `success`, or `danger`, the component embeds appropriate icons. */\n @property({ type: String, reflect: true }) status?: SupportStatus | 'neutral' = 'neutral';\n\n /** T-shirt `size` of the progress indicator, used to scale the ring. */\n @property({ type: String, reflect: true }) size?: Size | 'xxs' | 'xs' | 'xl';\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /** Enables updating internal string values for internationalization. */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n render() {\n return html`\n <div internal-host ?indeterminate=${this.value === undefined}>\n <svg viewBox=\"0 0 16 16\" role=\"presentation\">\n <circle cx=\"8px\" cy=\"8px\" r=\"6.5px\" class=\"background\"></circle>\n <circle cx=\"8px\" cy=\"8px\" r=\"6.5px\" class=\"ring\"\n stroke-dasharray=${`${((this.value ?? 0) / (this.max ?? 100)) * 44}px 44px`}>\n </circle>\n </svg>\n <slot>\n ${\n this.status !== 'accent'\n ? html`<nve-icon part=\"icon\" .name=${this.status ? statusIcons[this.status] : undefined} .status=${this.status as SupportStatus} aria-hidden=\"true\"></nve-icon>`\n : ''\n }\n </slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'progressbar';\n }\n\n updated(props: PropertyValues<this>) {\n super.updated(props);\n this._internals.ariaValueNow = `${this.value === undefined ? '' : this.value}`;\n this._internals.ariaValueMax = `${this.max}`;\n const { status } = this;\n const statusLabel =\n status !== undefined && status !== 'neutral' && status !== 'accent' ? this.i18n[status] : undefined;\n this._internals.ariaLabel = statusLabel ?? this.i18n.information ?? null;\n }\n}\n"],"mappings":";;;;;;;;;;;AAoCO,IAAA,IAAA,cAA2B,EAAW;;0BAmBR,mBAG6C,qBAKxC,IAAI,EAAqB,IAAI,eAGlC,KAAKA,GAAgB;;;gBA7BxC,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;EACX;;;4BAE4B,GACzB,EAAK,SAAS,MAAM,EACvB;;CAiBA;CAKA,SAAS;EACP,OAAO,CAAI,sCAC2B,KAAK,UAAU,KAAA,EAAU,oLAIpC,IAAK,KAAK,SAAS,MAAM,KAAK,OAAO,OAAQ,GAAG,SAAS,yBAK5E,KAAK,WAAW,WAEZ,KADA,CAAI,gCAA+B,KAAK,SAAS,EAAY,KAAK,UAAU,KAAA,EAAU,aAAW,KAAK,OAAwB,kCAEnI;CAIT;CAEA,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO;CACzB;CAEA,QAAQ,GAA6B;EAGnC,AAFA,MAAM,QAAQ,CAAK,GACnB,KAAK,WAAW,eAAe,GAAG,KAAK,UAAU,KAAA,IAAY,KAAK,KAAK,SACvE,KAAK,WAAW,eAAe,GAAG,KAAK;EACvC,IAAM,EAAE,cAAW,MACb,IACJ,MAAW,KAAA,KAAa,MAAW,aAAa,MAAW,WAAW,KAAK,KAAK,KAAU,KAAA;EAC5F,KAAK,WAAW,YAAY,KAAe,KAAK,KAAK,eAAe;CACtE;AACF;GAnDG,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,MAGzB,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,OAAA,KAAA,CAAA,MAGzB,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,MAGxC,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,MAKxC,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,UA/B3B,EAAe,CAAA,GAAA,CAAA"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { Input } from '
|
|
3
|
-
import { Select } from '
|
|
4
|
-
import { Date } from '
|
|
5
|
-
import { IconButton } from '
|
|
2
|
+
import { Input } from '@nvidia-elements/core/input';
|
|
3
|
+
import { Select } from '@nvidia-elements/core/select';
|
|
4
|
+
import { Date } from '@nvidia-elements/core/date';
|
|
5
|
+
import { IconButton } from '@nvidia-elements/core/icon-button';
|
|
6
6
|
/**
|
|
7
7
|
* @element nve-progressive-filter-chip
|
|
8
8
|
* @description A filter chip is a control that enables users to select many options from a set of choices.
|
|
9
|
+
* @documentation https://nvidia.github.io/elements/docs/elements/progressive-filter-chip/
|
|
9
10
|
* @since 0.16.0
|
|
10
11
|
* @entrypoint \@nvidia-elements/core/progressive-filter-chip
|
|
11
12
|
* @slot - default slot for content
|
|
@@ -38,13 +39,13 @@ export declare class ProgressiveFilterChip extends LitElement {
|
|
|
38
39
|
/** Determines if a close button should render within filter chip */
|
|
39
40
|
closable: boolean;
|
|
40
41
|
/** Enables updating internal string values for internationalization. */
|
|
41
|
-
i18n: Partial<import(
|
|
42
|
+
i18n: Partial<import("@nvidia-elements/core/internal").I18nStrings & {
|
|
42
43
|
__set: boolean;
|
|
43
44
|
}>;
|
|
44
45
|
private inputs;
|
|
45
|
-
static styles: import(
|
|
46
|
+
static styles: import("lit").CSSResult[];
|
|
46
47
|
/** @private */
|
|
47
48
|
_internals: ElementInternals;
|
|
48
|
-
render(): import(
|
|
49
|
+
render(): import("lit").TemplateResult<1>;
|
|
49
50
|
connectedCallback(): void;
|
|
50
51
|
}
|
|
@@ -5,7 +5,7 @@ import { TypeClosableController as i } from "../internal/controllers/type-closab
|
|
|
5
5
|
import { typeSSR as a } from "../internal/controllers/type-ssr.controller.js";
|
|
6
6
|
import { scopedRegistry as o } from "../internal/decorators/scoped-registry.js";
|
|
7
7
|
import { useStyles as s } from "../internal/styles/index.js";
|
|
8
|
-
import
|
|
8
|
+
import c from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
9
9
|
import { IconButton as l } from "../icon-button/icon-button2.js";
|
|
10
10
|
import { Input as u } from "../input/input2.js";
|
|
11
11
|
import { Select as d } from "../select/select2.js";
|
|
@@ -23,7 +23,7 @@ var b = class extends h {
|
|
|
23
23
|
static {
|
|
24
24
|
this.metadata = {
|
|
25
25
|
tag: "nve-progressive-filter-chip",
|
|
26
|
-
version: "2.
|
|
26
|
+
version: "2.1.1"
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
static {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressive-filter-chip2.js","names":["#i18nController","#removeItem","#getControlTemplate","#typeClosableController","#createItems","#resetItems"],"sources":["../../src/progressive-filter-chip/progressive-filter-chip.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { state } from 'lit/decorators/state.js';\nimport {\n appendRootNodeStyle,\n attachInternals,\n generateId,\n I18nController,\n scopedRegistry,\n TypeClosableController,\n typeSSR,\n useStyles\n} from '@nvidia-elements/core/internal';\nimport { Input } from '@nvidia-elements/core/input';\nimport { Select } from '@nvidia-elements/core/select';\nimport { Date } from '@nvidia-elements/core/date';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport globalStyles from './progressive-filter-chip.global.css?inline';\nimport styles from './progressive-filter-chip.css?inline';\n\n/**\n * @element nve-progressive-filter-chip\n * @description A filter chip is a control that enables users to select many options from a set of choices.\n * @since 0.16.0\n * @entrypoint \\@nvidia-elements/core/progressive-filter-chip\n * @slot - default slot for content\n * @event close - Dispatched when the filter chip closes.\n * @cssprop --gap\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --background\n * @cssprop --font-weight\n * @cssprop --padding\n * @cssprop --width\n * @csspart select - The select element\n * @csspart date - The date input element\n * @csspart input - The input element\n * @csspart icon-button - The icon button element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/\n */\n@typeSSR()\n@scopedRegistry()\nexport class ProgressiveFilterChip extends LitElement {\n static readonly metadata = {\n tag: 'nve-progressive-filter-chip',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Input.metadata.tag]: Input,\n [Select.metadata.tag]: Select,\n [Date.metadata.tag]: Date,\n [IconButton.metadata.tag]: IconButton\n };\n\n /** Determines if a close button should render within filter chip */\n @property({ type: Boolean }) closable: boolean;\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /** Enables updating internal string values for internationalization. */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n @state() private inputs: Element[] = [];\n\n static styles = useStyles([styles]);\n\n #typeClosableController = new TypeClosableController(this);\n\n /** @private */\n declare _internals: ElementInternals;\n\n #getControlTemplate(el: Element) {\n const slot = html`<slot name=${el.slot} @slotchange=${this.#removeItem}></slot>`;\n if (el.tagName === 'SELECT') {\n return html`<nve-select part=\"select\" multiple-overflow ?fit-text=${!(el as HTMLSelectElement).multiple}>${slot}</nve-select>`;\n } else if (el.tagName === 'INPUT' && (el as HTMLInputElement).type === 'date') {\n return html`<nve-date part=\"date\">${slot}</nve-date>`;\n } else if (el.tagName === 'INPUT') {\n return html`<nve-input part=\"input\">${slot}</nve-input>`;\n } else {\n return slot;\n }\n }\n\n render() {\n return html`\n <div internal-host>\n ${this.inputs.map(el => this.#getControlTemplate(el))}\n ${this.closable ? html`<nve-icon-button part=\"icon-button\" exportparts=\"icon:icon-button-icon\" @click=${() => this.#typeClosableController.close()} .ariaLabel=${this.i18n.close} icon-name=\"cancel\"></nve-icon-button>` : nothing}\n </div>\n <slot hidden-slot @slotchange=${this.#createItems}></slot>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'toolbar';\n this.setAttribute('nve-control', '');\n appendRootNodeStyle(this, globalStyles);\n }\n\n #removeItem(e: Event) {\n if (!(e.target as HTMLSlotElement).assignedElements().length) {\n this.#resetItems();\n }\n }\n\n #createItems(e: Event) {\n if (e.target && (e.target as HTMLSlotElement).assignedElements().length) {\n this.#resetItems();\n const items = Array.from(\n this.shadowRoot!.querySelector<HTMLSlotElement>('slot:not([name])')!.assignedElements()\n ).filter(i => i.matches('input, select, nve-button, [nve-control]'));\n items.forEach(i => (i.slot = generateId()));\n this.inputs = items.length ? items : this.inputs;\n }\n }\n\n #resetItems() {\n Array.from(this.shadowRoot!.querySelectorAll('slot'))\n .flatMap(i => i.assignedElements())\n .forEach(i => (i.slot = ''));\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"progressive-filter-chip2.js","names":["#i18nController","#removeItem","#getControlTemplate","#typeClosableController","#createItems","#resetItems"],"sources":["../../src/progressive-filter-chip/progressive-filter-chip.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { state } from 'lit/decorators/state.js';\nimport {\n appendRootNodeStyle,\n attachInternals,\n generateId,\n I18nController,\n scopedRegistry,\n TypeClosableController,\n typeSSR,\n useStyles\n} from '@nvidia-elements/core/internal';\nimport { Input } from '@nvidia-elements/core/input';\nimport { Select } from '@nvidia-elements/core/select';\nimport { Date } from '@nvidia-elements/core/date';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport globalStyles from './progressive-filter-chip.global.css?inline';\nimport styles from './progressive-filter-chip.css?inline';\n\n/**\n * @element nve-progressive-filter-chip\n * @description A filter chip is a control that enables users to select many options from a set of choices.\n * @documentation https://nvidia.github.io/elements/docs/elements/progressive-filter-chip/\n * @since 0.16.0\n * @entrypoint \\@nvidia-elements/core/progressive-filter-chip\n * @slot - default slot for content\n * @event close - Dispatched when the filter chip closes.\n * @cssprop --gap\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --background\n * @cssprop --font-weight\n * @cssprop --padding\n * @cssprop --width\n * @csspart select - The select element\n * @csspart date - The date input element\n * @csspart input - The input element\n * @csspart icon-button - The icon button element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/\n */\n@typeSSR()\n@scopedRegistry()\nexport class ProgressiveFilterChip extends LitElement {\n static readonly metadata = {\n tag: 'nve-progressive-filter-chip',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Input.metadata.tag]: Input,\n [Select.metadata.tag]: Select,\n [Date.metadata.tag]: Date,\n [IconButton.metadata.tag]: IconButton\n };\n\n /** Determines if a close button should render within filter chip */\n @property({ type: Boolean }) closable: boolean;\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /** Enables updating internal string values for internationalization. */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n @state() private inputs: Element[] = [];\n\n static styles = useStyles([styles]);\n\n #typeClosableController = new TypeClosableController(this);\n\n /** @private */\n declare _internals: ElementInternals;\n\n #getControlTemplate(el: Element) {\n const slot = html`<slot name=${el.slot} @slotchange=${this.#removeItem}></slot>`;\n if (el.tagName === 'SELECT') {\n return html`<nve-select part=\"select\" multiple-overflow ?fit-text=${!(el as HTMLSelectElement).multiple}>${slot}</nve-select>`;\n } else if (el.tagName === 'INPUT' && (el as HTMLInputElement).type === 'date') {\n return html`<nve-date part=\"date\">${slot}</nve-date>`;\n } else if (el.tagName === 'INPUT') {\n return html`<nve-input part=\"input\">${slot}</nve-input>`;\n } else {\n return slot;\n }\n }\n\n render() {\n return html`\n <div internal-host>\n ${this.inputs.map(el => this.#getControlTemplate(el))}\n ${this.closable ? html`<nve-icon-button part=\"icon-button\" exportparts=\"icon:icon-button-icon\" @click=${() => this.#typeClosableController.close()} .ariaLabel=${this.i18n.close} icon-name=\"cancel\"></nve-icon-button>` : nothing}\n </div>\n <slot hidden-slot @slotchange=${this.#createItems}></slot>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'toolbar';\n this.setAttribute('nve-control', '');\n appendRootNodeStyle(this, globalStyles);\n }\n\n #removeItem(e: Event) {\n if (!(e.target as HTMLSlotElement).assignedElements().length) {\n this.#resetItems();\n }\n }\n\n #createItems(e: Event) {\n if (e.target && (e.target as HTMLSlotElement).assignedElements().length) {\n this.#resetItems();\n const items = Array.from(\n this.shadowRoot!.querySelector<HTMLSlotElement>('slot:not([name])')!.assignedElements()\n ).filter(i => i.matches('input, select, nve-button, [nve-control]'));\n items.forEach(i => (i.slot = generateId()));\n this.inputs = items.length ? items : this.inputs;\n }\n }\n\n #resetItems() {\n Array.from(this.shadowRoot!.querySelectorAll('slot'))\n .flatMap(i => i.assignedElements())\n .forEach(i => (i.slot = ''));\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA8CO,IAAA,IAAA,cAAoC,EAAW;;yBAgBZ,IAAI,EAAqB,IAAI,eAGlC,KAAKA,GAAgB,oBAEnB,CAAC,aAIZ,IAAI,EAAuB,IAAI;;;kBAxB9B;GACzB,KAAK;GACL,SAAS;EACX;;;4BAE4B;IACzB,EAAM,SAAS,MAAM;IACrB,EAAO,SAAS,MAAM;IACtB,EAAK,SAAS,MAAM;IACpB,EAAW,SAAS,MAAM;EAC7B;;CAKA;;gBAOgB,EAAU,CAAC,CAAM,CAAC;;CAElC;CAKA,GAAoB,GAAa;EAC/B,IAAM,IAAO,CAAI,eAAc,EAAG,KAAK,iBAAe,KAAKC,GAAY;EAQrE,OAPE,EAAG,YAAY,WACV,CAAI,0DAAyD,CAAE,EAAyB,SAAS,IAAG,EAAK,iBACvG,EAAG,YAAY,WAAY,EAAwB,SAAS,SAC9D,CAAI,yBAAyB,EAAK,eAChC,EAAG,YAAY,UACjB,CAAI,2BAA2B,EAAK,gBAEpC;CAEX;CAEA,SAAS;EACP,OAAO,CAAI,sBAEP,KAAK,OAAO,KAAI,MAAM,KAAKC,GAAoB,CAAE,CAAC,EAAE,GACpD,KAAK,WAAW,CAAI,yFAAwF,KAAKC,GAAwB,MAAM,EAAE,gBAAc,KAAK,KAAK,MAAM,2CAA0C,EAAQ,uCAErM,KAAKC,GAAa;CAEpD;CAEA,oBAAoB;EAKlB,AAJA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO,WACvB,KAAK,aAAa,eAAe,EAAE,GACnC,EAAoB,MAAM,CAAY;CACxC;CAEA,GAAY,GAAU;EACpB,AAAM,EAAE,OAA2B,iBAAiB,CAAC,CAAC,UACpD,KAAKC,GAAY;CAErB;CAEA,GAAa,GAAU;EACrB,IAAI,EAAE,UAAW,EAAE,OAA2B,iBAAiB,CAAC,CAAC,QAAQ;GACvE,KAAKA,GAAY;GACjB,IAAM,IAAQ,MAAM,KAClB,KAAK,WAAY,cAA+B,kBAAkB,CAAC,CAAE,iBAAiB,CACxF,CAAC,CAAC,QAAO,MAAK,EAAE,QAAQ,0CAA0C,CAAC;GAEnE,AADA,EAAM,SAAQ,MAAM,EAAE,OAAO,EAAW,CAAE,GAC1C,KAAK,SAAS,EAAM,SAAS,IAAQ,KAAK;EAC5C;CACF;CAEA,KAAc;EACZ,MAAM,KAAK,KAAK,WAAY,iBAAiB,MAAM,CAAC,CAAC,CAClD,SAAQ,MAAK,EAAE,iBAAiB,CAAC,CAAC,CAClC,SAAQ,MAAM,EAAE,OAAO,EAAG;CAC/B;AACF;GArEG,EAAS,EAAE,MAAM,QAAQ,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,MAK1B,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,MAEzB,EAAM,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,UAvBR,EAAQ,GACR,EAAe,CAAA,GAAA,CAAA"}
|
package/dist/pulse/define.d.ts
CHANGED