@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/pulse/pulse.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { Size } from '
|
|
3
|
-
import { Icon } from '
|
|
2
|
+
import type { Size } from '@nvidia-elements/core/internal';
|
|
3
|
+
import { Icon } from '@nvidia-elements/core/icon';
|
|
4
4
|
/**
|
|
5
5
|
* @element nve-pulse
|
|
6
6
|
* @description Pulse component signals attention for a particular area of a UI. This helps with tutorial/getting started guides for new users.
|
|
7
|
+
* @documentation https://nvidia.github.io/elements/docs/elements/pulse/
|
|
7
8
|
* @since 1.16.3
|
|
8
9
|
* @entrypoint \@nvidia-elements/core/pulse
|
|
9
10
|
* @cssprop --background
|
|
@@ -14,7 +15,7 @@ import { Icon } from '../icon';
|
|
|
14
15
|
*
|
|
15
16
|
*/
|
|
16
17
|
export declare class Pulse extends LitElement {
|
|
17
|
-
static styles: import(
|
|
18
|
+
static styles: import("lit").CSSResult[];
|
|
18
19
|
static readonly metadata: {
|
|
19
20
|
tag: string;
|
|
20
21
|
version: string;
|
|
@@ -29,5 +30,5 @@ export declare class Pulse extends LitElement {
|
|
|
29
30
|
size?: Size | 'xs';
|
|
30
31
|
/** These visual treatments represent the `status` of different tasks. When `status` changes to `accent`, `warning` or `danger`, the component embeds appropriate colors. */
|
|
31
32
|
status?: 'accent' | 'warning' | 'danger';
|
|
32
|
-
render(): import(
|
|
33
|
+
render(): import("lit").TemplateResult<1>;
|
|
33
34
|
}
|
package/dist/pulse/pulse2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { attachInternals as e } from "../internal/utils/a11y.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 { Icon as r } from "../icon/icon2.js";
|
|
5
5
|
import i from "./pulse.js";
|
|
6
6
|
import { LitElement as a, html as o } from "lit";
|
|
@@ -13,7 +13,7 @@ var c = class extends a {
|
|
|
13
13
|
static {
|
|
14
14
|
this.metadata = {
|
|
15
15
|
tag: "nve-pulse",
|
|
16
|
-
version: "2.
|
|
16
|
+
version: "2.1.1"
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
19
|
static {
|
package/dist/pulse/pulse2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pulse2.js","names":[],"sources":["../../src/pulse/pulse.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { Size } from '@nvidia-elements/core/internal';\nimport { useStyles, attachInternals } from '@nvidia-elements/core/internal';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport styles from './pulse.css?inline';\n\n/**\n * @element nve-pulse\n * @description Pulse component signals attention for a particular area of a UI. This helps with tutorial/getting started guides for new users.\n * @since 1.16.3\n * @entrypoint \\@nvidia-elements/core/pulse\n * @cssprop --background\n * @cssprop --width\n * @cssprop --height\n * @cssprop --animation-duration\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/alert/\n *\n */\nexport class Pulse extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-pulse',\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 connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'alert';\n }\n\n /** Sets size of the pulse component. You can also update size using the `width + height` css props. */\n @property({ type: String, reflect: true }) size?: Size | 'xs';\n\n /** These visual treatments represent the `status` of different tasks. When `status` changes to `accent`, `warning` or `danger`, the component embeds appropriate colors. */\n @property({ type: String, reflect: true }) status?: 'accent' | 'warning' | 'danger';\n\n render() {\n return html`\n <svg internal-host width=\"100%\" height=\"100%\" viewBox=\"0 0 200 200\">\n <circle class=\"circle\" cx=\"100\" cy=\"100\" r=\"25\"></circle>\n <circle class=\"circle c1\" cx=\"100\" cy=\"100\" r=\"25\"></circle>\n <circle class=\"circle c2\" cx=\"100\" cy=\"100\" r=\"25\"></circle> \n <circle class=\"circle c3\" cx=\"100\" cy=\"100\" r=\"25\"></circle>\n </svg>\n `;\n }\n}\n"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"pulse2.js","names":[],"sources":["../../src/pulse/pulse.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { Size } from '@nvidia-elements/core/internal';\nimport { useStyles, attachInternals } from '@nvidia-elements/core/internal';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport styles from './pulse.css?inline';\n\n/**\n * @element nve-pulse\n * @description Pulse component signals attention for a particular area of a UI. This helps with tutorial/getting started guides for new users.\n * @documentation https://nvidia.github.io/elements/docs/elements/pulse/\n * @since 1.16.3\n * @entrypoint \\@nvidia-elements/core/pulse\n * @cssprop --background\n * @cssprop --width\n * @cssprop --height\n * @cssprop --animation-duration\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/alert/\n *\n */\nexport class Pulse extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-pulse',\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 connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'alert';\n }\n\n /** Sets size of the pulse component. You can also update size using the `width + height` css props. */\n @property({ type: String, reflect: true }) size?: Size | 'xs';\n\n /** These visual treatments represent the `status` of different tasks. When `status` changes to `accent`, `warning` or `danger`, the component embeds appropriate colors. */\n @property({ type: String, reflect: true }) status?: 'accent' | 'warning' | 'danger';\n\n render() {\n return html`\n <svg internal-host width=\"100%\" height=\"100%\" viewBox=\"0 0 200 200\">\n <circle class=\"circle\" cx=\"100\" cy=\"100\" r=\"25\"></circle>\n <circle class=\"circle c1\" cx=\"100\" cy=\"100\" r=\"25\"></circle>\n <circle class=\"circle c2\" cx=\"100\" cy=\"100\" r=\"25\"></circle> \n <circle class=\"circle c3\" cx=\"100\" cy=\"100\" r=\"25\"></circle>\n </svg>\n `;\n }\n}\n"],"mappings":";;;;;;;;AAuBA,IAAa,IAAb,cAA2B,EAAW;;gBACpB,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;EACX;;;4BAE4B,GACzB,EAAK,SAAS,MAAM,EACvB;;CAKA,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO;CACzB;CAQA,SAAS;EACP,OAAO,CAAI;CAQb;AACF;GAfG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,MAGxC,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA"}
|
package/dist/radio/define.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CSSResult } from 'lit';
|
|
2
|
-
import { ControlGroup } from '
|
|
1
|
+
import type { CSSResult } from 'lit';
|
|
2
|
+
import { ControlGroup } from '@nvidia-elements/core/forms';
|
|
3
3
|
/**
|
|
4
4
|
* @element nve-radio-group
|
|
5
5
|
* @description Groups related radio buttons together with a shared label and validation messaging for single-select form inputs.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { audit as e } from "../internal/controllers/audit.controller.js";
|
|
2
2
|
import { typeSSR as t } from "../internal/controllers/type-ssr.controller.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 { ControlGroup as i } from "../forms/control-group/control-group2.js";
|
|
6
6
|
import a from "./radio-group.js";
|
|
7
7
|
//#region src/radio/radio-group.ts
|
|
@@ -12,7 +12,7 @@ var o = class extends i {
|
|
|
12
12
|
static {
|
|
13
13
|
this.metadata = {
|
|
14
14
|
tag: "nve-radio-group",
|
|
15
|
-
version: "2.
|
|
15
|
+
version: "2.1.1",
|
|
16
16
|
children: [
|
|
17
17
|
"label",
|
|
18
18
|
"nve-control-message",
|
package/dist/radio/radio.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { CSSResult } from 'lit';
|
|
2
|
-
import { Control } from '
|
|
1
|
+
import type { CSSResult } from 'lit';
|
|
2
|
+
import { Control } from '@nvidia-elements/core/forms';
|
|
3
3
|
/**
|
|
4
4
|
* @element nve-radio
|
|
5
5
|
* @description A radio button is a control that enables users to choose one option from a list of mutually exclusive options.
|
|
6
|
+
* @documentation https://nvidia.github.io/elements/docs/elements/radio/
|
|
6
7
|
* @since 0.3.0
|
|
7
8
|
* @entrypoint \@nvidia-elements/core/radio
|
|
8
9
|
* @cssprop --cursor
|
package/dist/radio/radio2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { audit as e } from "../internal/controllers/audit.controller.js";
|
|
2
2
|
import { hostAttr as t } from "../internal/decorators/host-attr.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 { Control as i } from "../forms/control/control2.js";
|
|
6
6
|
import a from "./radio.js";
|
|
7
7
|
//#region src/radio/radio.ts
|
|
@@ -15,7 +15,7 @@ var o = class extends i {
|
|
|
15
15
|
static {
|
|
16
16
|
this.metadata = {
|
|
17
17
|
tag: "nve-radio",
|
|
18
|
-
version: "2.
|
|
18
|
+
version: "2.1.1",
|
|
19
19
|
children: [
|
|
20
20
|
"label",
|
|
21
21
|
"input",
|
package/dist/radio/radio2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio2.js","names":[],"sources":["../../src/radio/radio.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { CSSResult } from 'lit';\nimport { audit, hostAttr, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport styles from './radio.css?inline';\n\n/**\n * @element nve-radio\n * @description A radio button is a control that enables users to choose one option from a list of mutually exclusive options.\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/radio\n * @cssprop --cursor\n * @cssprop --width\n * @cssprop --height\n * @cssprop --border-width\n * @cssprop --border-radius\n * @cssprop --border-color\n * @cssprop --radio-color\n * @cssprop --background\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/radio/\n */\n@audit()\nexport class Radio extends Control {\n @hostAttr({ attribute: 'nve-control' }) protected nveControl = 'inline';\n\n /** @private - disable for inline control */\n declare fitText: boolean;\n\n /** @private - disable for inline control */\n declare fitContent: boolean;\n\n static styles: CSSResult[] = useStyles([...Control.styles, styles]);\n\n static readonly metadata = {\n tag: 'nve-radio',\n version: '0.0.0',\n children: ['label', 'input', 'nve-control-message']\n };\n}\n"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"radio2.js","names":[],"sources":["../../src/radio/radio.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { CSSResult } from 'lit';\nimport { audit, hostAttr, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport styles from './radio.css?inline';\n\n/**\n * @element nve-radio\n * @description A radio button is a control that enables users to choose one option from a list of mutually exclusive options.\n * @documentation https://nvidia.github.io/elements/docs/elements/radio/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/radio\n * @cssprop --cursor\n * @cssprop --width\n * @cssprop --height\n * @cssprop --border-width\n * @cssprop --border-radius\n * @cssprop --border-color\n * @cssprop --radio-color\n * @cssprop --background\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/radio/\n */\n@audit()\nexport class Radio extends Control {\n @hostAttr({ attribute: 'nve-control' }) protected nveControl = 'inline';\n\n /** @private - disable for inline control */\n declare fitText: boolean;\n\n /** @private - disable for inline control */\n declare fitContent: boolean;\n\n static styles: CSSResult[] = useStyles([...Control.styles, styles]);\n\n static readonly metadata = {\n tag: 'nve-radio',\n version: '0.0.0',\n children: ['label', 'input', 'nve-control-message']\n };\n}\n"],"mappings":";;;;;;;AAyBO,IAAA,IAAA,cAAoB,EAAQ;;iCAC8B;;;gBAQlC,EAAU,CAAC,GAAG,EAAQ,QAAQ,CAAM,CAAC;;;kBAEvC;GACzB,KAAK;GACL,SAAS;GACT,UAAU;IAAC;IAAS;IAAS;GAAqB;EACpD;;AACF;GAfG,EAAS,EAAE,WAAW,cAAc,CAAC,CAAA,GAAA,EAAA,WAAA,cAAA,KAAA,CAAA,UAFvC,EAAM,CAAA,GAAA,CAAA"}
|
package/dist/range/define.d.ts
CHANGED
package/dist/range/range.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { Control } from '
|
|
2
|
-
import { PropertyValues
|
|
1
|
+
import { Control } from '@nvidia-elements/core/forms';
|
|
2
|
+
import type { PropertyValues } from 'lit';
|
|
3
|
+
import { nothing } from 'lit';
|
|
3
4
|
/**
|
|
4
5
|
* @element nve-range
|
|
5
6
|
* @description A range slider is a control that enables users to choose a value from a continuous range of values.
|
|
7
|
+
* @documentation https://nvidia.github.io/elements/docs/elements/range/
|
|
6
8
|
* @since 0.3.0
|
|
7
9
|
* @entrypoint \@nvidia-elements/core/range
|
|
8
10
|
* @cssprop --background
|
|
@@ -20,7 +22,7 @@ import { PropertyValues, nothing } from 'lit';
|
|
|
20
22
|
*/
|
|
21
23
|
export declare class Range extends Control {
|
|
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;
|
|
@@ -30,5 +32,5 @@ export declare class Range extends Control {
|
|
|
30
32
|
connectedCallback(): void;
|
|
31
33
|
firstUpdated(props: PropertyValues<this>): void;
|
|
32
34
|
updated(props: PropertyValues<this>): void;
|
|
33
|
-
protected get suffixContent(): typeof nothing | import(
|
|
35
|
+
protected get suffixContent(): typeof nothing | import("lit").TemplateResult<1>;
|
|
34
36
|
}
|
package/dist/range/range2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { appendRootNodeStyle as e, getElementUpdate as t } from "../internal/utils/dom.js";
|
|
2
2
|
import { useStyles as n } from "../internal/styles/index.js";
|
|
3
|
-
import
|
|
3
|
+
import r from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
4
4
|
import { Control as i } from "../forms/control/control2.js";
|
|
5
5
|
import a from "./range.global.js";
|
|
6
6
|
import o from "./range.js";
|
|
@@ -17,7 +17,7 @@ var d = class extends i {
|
|
|
17
17
|
static {
|
|
18
18
|
this.metadata = {
|
|
19
19
|
tag: "nve-range",
|
|
20
|
-
version: "2.
|
|
20
|
+
version: "2.1.1"
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
connectedCallback() {
|
package/dist/range/range2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range2.js","names":["#setTrackWidth","#renderDatalistTicks"],"sources":["../../src/range/range.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { appendRootNodeStyle, getElementUpdate, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { property } from 'lit/decorators/property.js';\nimport globalStyles from './range.global.css?inline';\nimport styles from './range.css?inline';\nimport type { PropertyValues } from 'lit';\nimport { html, nothing, isServer } from 'lit';\n/**\n * @element nve-range\n * @description A range slider is a control that enables users to choose a value from a continuous range of values.\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/range\n * @cssprop --background\n * @cssprop --control-height\n * @cssprop --cursor\n * @cssprop --track-width\n * @cssprop --track-height\n * @cssprop --track-border-radius\n * @cssprop --track-background\n * @cssprop --thumb-width\n * @cssprop --thumb-height\n * @cssprop --thumb-background\n * @cssprop --thumb-border\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/slider/\n */\nexport class Range extends Control {\n static styles = useStyles([...Control.styles, styles]);\n\n static readonly metadata = {\n tag: 'nve-range',\n version: '0.0.0'\n };\n\n /** Determines the orientation of the range slider. */\n @property({ type: String, reflect: true }) orientation: 'vertical' | 'horizontal' = 'horizontal';\n\n connectedCallback() {\n super.connectedCallback();\n appendRootNodeStyle(this, globalStyles);\n this._internals.ariaOrientation = this.orientation;\n }\n\n firstUpdated(props: PropertyValues<this>) {\n super.firstUpdated(props);\n this.#setTrackWidth();\n this.input.addEventListener('input', () => this.#setTrackWidth());\n getElementUpdate(this.input, 'value', (value: unknown) => this.#setTrackWidth(value as number));\n }\n\n updated(props: PropertyValues<this>) {\n super.updated(props);\n if (props.has('orientation')) {\n this._internals.ariaOrientation = this.orientation;\n }\n }\n\n #setTrackWidth(val?: number) {\n const value = val ?? this.input.valueAsNumber;\n const min = this.input.min ? parseFloat(this.input.min) : 0;\n const max = this.input.max ? parseFloat(this.input.max) : 100;\n this.style.setProperty('--track-width', `${Math.floor(((value - min) / (max - min)) * 100) / 100}`);\n }\n\n protected get suffixContent() {\n const datalist = !isServer ? this.querySelector<HTMLDataListElement>('datalist') : null;\n return datalist ? this.#renderDatalistTicks(datalist) : nothing;\n }\n\n #renderDatalistTicks(datalist: HTMLDataListElement) {\n const options = Array.from(datalist.options);\n const min = this.input?.min ? parseFloat(this.input.min) : 0;\n const max = this.input?.max ? parseFloat(this.input.max) : 100;\n\n return html`<div class=\"datalist-labels\">\n ${options.map(option => {\n const value = parseFloat(option.value);\n const position = ((value - min) / (max - min)) * 100;\n const style =\n this.orientation === 'vertical'\n ? `bottom: ${position}%; transform: translateY(${position}%)`\n : `left: ${position}%; transform: translateX(-${position}%)`;\n return html`<span class=\"datalist-tick\" style=${style}>${option.textContent || value}</span>`;\n })}\n </div>`;\n }\n}\n"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"range2.js","names":["#setTrackWidth","#renderDatalistTicks"],"sources":["../../src/range/range.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { appendRootNodeStyle, getElementUpdate, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { property } from 'lit/decorators/property.js';\nimport globalStyles from './range.global.css?inline';\nimport styles from './range.css?inline';\nimport type { PropertyValues } from 'lit';\nimport { html, nothing, isServer } from 'lit';\n/**\n * @element nve-range\n * @description A range slider is a control that enables users to choose a value from a continuous range of values.\n * @documentation https://nvidia.github.io/elements/docs/elements/range/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/range\n * @cssprop --background\n * @cssprop --control-height\n * @cssprop --cursor\n * @cssprop --track-width\n * @cssprop --track-height\n * @cssprop --track-border-radius\n * @cssprop --track-background\n * @cssprop --thumb-width\n * @cssprop --thumb-height\n * @cssprop --thumb-background\n * @cssprop --thumb-border\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/slider/\n */\nexport class Range extends Control {\n static styles = useStyles([...Control.styles, styles]);\n\n static readonly metadata = {\n tag: 'nve-range',\n version: '0.0.0'\n };\n\n /** Determines the orientation of the range slider. */\n @property({ type: String, reflect: true }) orientation: 'vertical' | 'horizontal' = 'horizontal';\n\n connectedCallback() {\n super.connectedCallback();\n appendRootNodeStyle(this, globalStyles);\n this._internals.ariaOrientation = this.orientation;\n }\n\n firstUpdated(props: PropertyValues<this>) {\n super.firstUpdated(props);\n this.#setTrackWidth();\n this.input.addEventListener('input', () => this.#setTrackWidth());\n getElementUpdate(this.input, 'value', (value: unknown) => this.#setTrackWidth(value as number));\n }\n\n updated(props: PropertyValues<this>) {\n super.updated(props);\n if (props.has('orientation')) {\n this._internals.ariaOrientation = this.orientation;\n }\n }\n\n #setTrackWidth(val?: number) {\n const value = val ?? this.input.valueAsNumber;\n const min = this.input.min ? parseFloat(this.input.min) : 0;\n const max = this.input.max ? parseFloat(this.input.max) : 100;\n this.style.setProperty('--track-width', `${Math.floor(((value - min) / (max - min)) * 100) / 100}`);\n }\n\n protected get suffixContent() {\n const datalist = !isServer ? this.querySelector<HTMLDataListElement>('datalist') : null;\n return datalist ? this.#renderDatalistTicks(datalist) : nothing;\n }\n\n #renderDatalistTicks(datalist: HTMLDataListElement) {\n const options = Array.from(datalist.options);\n const min = this.input?.min ? parseFloat(this.input.min) : 0;\n const max = this.input?.max ? parseFloat(this.input.max) : 100;\n\n return html`<div class=\"datalist-labels\">\n ${options.map(option => {\n const value = parseFloat(option.value);\n const position = ((value - min) / (max - min)) * 100;\n const style =\n this.orientation === 'vertical'\n ? `bottom: ${position}%; transform: translateY(${position}%)`\n : `left: ${position}%; transform: translateX(-${position}%)`;\n return html`<span class=\"datalist-tick\" style=${style}>${option.textContent || value}</span>`;\n })}\n </div>`;\n }\n}\n"],"mappings":";;;;;;;;;AA6BA,IAAa,IAAb,cAA2B,EAAQ;;kCASmD;;;gBARpE,EAAU,CAAC,GAAG,EAAQ,QAAQ,CAAM,CAAC;;;kBAE1B;GACzB,KAAK;GACL,SAAS;EACX;;CAKA,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxB,EAAoB,MAAM,CAAY,GACtC,KAAK,WAAW,kBAAkB,KAAK;CACzC;CAEA,aAAa,GAA6B;EAIxC,AAHA,MAAM,aAAa,CAAK,GACxB,KAAKA,GAAe,GACpB,KAAK,MAAM,iBAAiB,eAAe,KAAKA,GAAe,CAAC,GAChE,EAAiB,KAAK,OAAO,UAAU,MAAmB,KAAKA,GAAe,CAAe,CAAC;CAChG;CAEA,QAAQ,GAA6B;EAEnC,AADA,MAAM,QAAQ,CAAK,GACf,EAAM,IAAI,aAAa,MACzB,KAAK,WAAW,kBAAkB,KAAK;CAE3C;CAEA,GAAe,GAAc;EAC3B,IAAM,IAAQ,KAAO,KAAK,MAAM,eAC1B,IAAM,KAAK,MAAM,MAAM,WAAW,KAAK,MAAM,GAAG,IAAI,GACpD,IAAM,KAAK,MAAM,MAAM,WAAW,KAAK,MAAM,GAAG,IAAI;EAC1D,KAAK,MAAM,YAAY,iBAAiB,GAAG,KAAK,OAAQ,IAAQ,MAAQ,IAAM,KAAQ,GAAG,IAAI,KAAK;CACpG;CAEA,IAAc,gBAAgB;EAC5B,IAAM,IAAY,IAAiE,OAAtD,KAAK,cAAmC,UAAU;EAC/E,OAAO,IAAW,KAAKC,GAAqB,CAAQ,IAAI;CAC1D;CAEA,GAAqB,GAA+B;EAClD,IAAM,IAAU,MAAM,KAAK,EAAS,OAAO,GACrC,IAAM,KAAK,OAAO,MAAM,WAAW,KAAK,MAAM,GAAG,IAAI,GACrD,IAAM,KAAK,OAAO,MAAM,WAAW,KAAK,MAAM,GAAG,IAAI;EAE3D,OAAO,CAAI,gCACP,EAAQ,KAAI,MAAU;GACtB,IAAM,IAAQ,WAAW,EAAO,KAAK,GAC/B,KAAa,IAAQ,MAAQ,IAAM,KAAQ;GAKjD,OAAO,CAAI,sCAHT,KAAK,gBAAgB,aACjB,WAAW,EAAS,2BAA2B,EAAS,MACxD,SAAS,EAAS,4BAA4B,EAAS,IACP,IAAG,EAAO,eAAe,EAAM;EACvF,CAAC,EAAE;CAEP;AACF;GAnDG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,eAAA,KAAA,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
-
declare const ResizeHandle_base: import(
|
|
1
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
2
|
+
declare const ResizeHandle_base: import("@nvidia-elements/forms/mixins").FormControlMixinReturn<typeof LitElement, number>;
|
|
3
3
|
/**
|
|
4
4
|
* @element nve-resize-handle
|
|
5
5
|
* @description A resize-handle slider is a control that enables users to resize views or panels vertically or horizontally.
|
|
6
|
+
* @documentation https://nvidia.github.io/elements/docs/elements/resize-handle/
|
|
6
7
|
* @since 1.27.0
|
|
7
8
|
* @entrypoint \@nvidia-elements/core/resize-handle
|
|
8
9
|
* @event toggle - Dispatched when the resize handle is double clicked.
|
|
@@ -32,21 +33,21 @@ export declare class ResizeHandle extends ResizeHandle_base {
|
|
|
32
33
|
* Determines the value step change.
|
|
33
34
|
*/
|
|
34
35
|
step: number;
|
|
35
|
-
static styles: import(
|
|
36
|
+
static styles: import("lit").CSSResult[];
|
|
36
37
|
static readonly metadata: {
|
|
37
38
|
tag: string;
|
|
38
39
|
version: string;
|
|
39
40
|
valueSchema: {
|
|
40
|
-
type:
|
|
41
|
+
type: 'number';
|
|
41
42
|
};
|
|
42
43
|
};
|
|
43
44
|
/**
|
|
44
45
|
* Updates internal string values for internationalization.
|
|
45
46
|
*/
|
|
46
|
-
i18n: Partial<import(
|
|
47
|
+
i18n: Partial<import("@nvidia-elements/core/internal").I18nStrings & {
|
|
47
48
|
__set: boolean;
|
|
48
49
|
}>;
|
|
49
|
-
render(): import(
|
|
50
|
+
render(): import("lit").TemplateResult<1>;
|
|
50
51
|
constructor();
|
|
51
52
|
connectedCallback(): void;
|
|
52
53
|
firstUpdated(props: PropertyValues): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { I18nController as e } from "../internal/controllers/i18n.controller.js";
|
|
2
2
|
import { typeTouch as t } from "../internal/controllers/type-touch.controller.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 i from "./resize-handle.js";
|
|
6
6
|
import { LitElement as a, html as o } from "lit";
|
|
7
7
|
import { property as s } from "lit/decorators/property.js";
|
|
@@ -18,7 +18,7 @@ var u = class extends c(a) {
|
|
|
18
18
|
static {
|
|
19
19
|
this.metadata = {
|
|
20
20
|
tag: "nve-resize-handle",
|
|
21
|
-
version: "2.
|
|
21
|
+
version: "2.1.1",
|
|
22
22
|
valueSchema: { type: "number" }
|
|
23
23
|
};
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resize-handle2.js","names":["#range","#setInput","#setChange","#i18nController","#offset","#touchStart","#touchEnd","#touchMove","#toggle","#updateValue"],"sources":["../../src/resize-handle/resize-handle.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement, type PropertyValues } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { property } from 'lit/decorators/property.js';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixins';\nimport { useStyles, typeTouch } from '@nvidia-elements/core/internal';\nimport { I18nController, type NveTouchEvent } from '@nvidia-elements/core/internal';\nimport styles from './resize-handle.css?inline';\n\n/**\n * @element nve-resize-handle\n * @description A resize-handle slider is a control that enables users to resize views or panels vertically or horizontally.\n * @since 1.27.0\n * @entrypoint \\@nvidia-elements/core/resize-handle\n * @event toggle - Dispatched when the resize handle is double clicked.\n * @cssprop --background\n * @cssprop --line-width\n * @cssprop --target-size\n * @cssprop --cursor\n\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/slider/\n *\n */\n@typeTouch<ResizeHandle>()\nexport class ResizeHandle extends FormControlMixin<typeof LitElement, number>(LitElement) {\n /**\n * Determines the orientation direction of the resize handle.\n */\n @property({ type: String, reflect: true }) orientation?: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Determines the min resize value.\n */\n @property({ type: Number, reflect: true }) min = 0;\n\n /**\n * Determines the max resize value.\n */\n @property({ type: Number, reflect: true }) max = 100;\n\n /**\n * Determines the value step change.\n */\n @property({ type: Number, reflect: true }) step = 10;\n\n static styles = useStyles([styles]);\n\n get #range() {\n return this.shadowRoot!.querySelector('input')!;\n }\n\n static readonly metadata = {\n tag: 'nve-resize-handle',\n version: '0.0.0',\n valueSchema: {\n type: 'number' as const\n }\n };\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /**\n * Updates internal string values for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n #offset = 0;\n\n render() {\n return html`\n <div internal-host>\n <div class=\"line\" part=\"_line\"></div>\n <input aria-label=${ifDefined(this.ariaLabel ?? this.i18n.resize)} type=\"range\" min=${this.min} max=${this.max} .valueAsNumber=${this.valueAsNumber} @input=${(e: Event) => this.#setInput((e.target as HTMLInputElement).valueAsNumber)} @change=${(e: Event) => this.#setChange((e.target as HTMLInputElement).valueAsNumber)} step=${this.step} />\n </div>\n `;\n }\n\n constructor() {\n super();\n this.value = this.value ?? 50;\n this.#offset = this.valueAsNumber;\n }\n\n connectedCallback() {\n super.connectedCallback();\n this._internals.role = 'none';\n }\n\n firstUpdated(props: PropertyValues) {\n super.firstUpdated(props);\n this.addEventListener('nve-touch-start', () => this.#touchStart());\n this.addEventListener('nve-touch-end', () => this.#touchEnd());\n this.addEventListener('nve-touch-move', ((e: NveTouchEvent) => this.#touchMove(e)) as EventListener);\n this.addEventListener('dblclick', () => {\n if (!this.dispatchEvent(new CustomEvent('toggle', { cancelable: true, bubbles: true, composed: true }))) {\n return;\n }\n this.#toggle();\n });\n }\n\n #toggle() {\n const value = this.valueAsNumber <= this.max && this.valueAsNumber !== this.min ? this.min : this.max;\n this.#setInput(value);\n this.#setChange(value);\n }\n\n #touchStart() {\n this.#range.step = '1';\n this._internals.states.add('active');\n this.#offset = this.valueAsNumber;\n }\n\n #touchMove(e: NveTouchEvent) {\n const offset = (this.orientation === 'vertical' ? e.offsetX : -e.offsetY) * (this.dir === 'rtl' ? -1 : 1);\n this.#offset = this.#offset + offset;\n this.#setInput(this.#offset);\n }\n\n #touchEnd() {\n this.#offset = this.valueAsNumber;\n this.#range.step = `${this.step}`;\n this.#setChange(this.#offset);\n this._internals.states.delete('active');\n }\n\n #setInput(value: number) {\n this.#updateValue(value);\n this.dispatchInputEvent();\n }\n\n #setChange(value: number) {\n this.#updateValue(value);\n this.dispatchChangeEvent();\n }\n\n #updateValue(value: number) {\n if (value <= this.max && value >= this.min) {\n this.valueAsNumber = value;\n }\n }\n}\n"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"resize-handle2.js","names":["#range","#setInput","#setChange","#i18nController","#offset","#touchStart","#touchEnd","#touchMove","#toggle","#updateValue"],"sources":["../../src/resize-handle/resize-handle.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement, type PropertyValues } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { property } from 'lit/decorators/property.js';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixins';\nimport { useStyles, typeTouch } from '@nvidia-elements/core/internal';\nimport { I18nController, type NveTouchEvent } from '@nvidia-elements/core/internal';\nimport styles from './resize-handle.css?inline';\n\n/**\n * @element nve-resize-handle\n * @description A resize-handle slider is a control that enables users to resize views or panels vertically or horizontally.\n * @documentation https://nvidia.github.io/elements/docs/elements/resize-handle/\n * @since 1.27.0\n * @entrypoint \\@nvidia-elements/core/resize-handle\n * @event toggle - Dispatched when the resize handle is double clicked.\n * @cssprop --background\n * @cssprop --line-width\n * @cssprop --target-size\n * @cssprop --cursor\n\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/slider/\n *\n */\n@typeTouch<ResizeHandle>()\nexport class ResizeHandle extends FormControlMixin<typeof LitElement, number>(LitElement) {\n /**\n * Determines the orientation direction of the resize handle.\n */\n @property({ type: String, reflect: true }) orientation?: 'horizontal' | 'vertical' = 'horizontal';\n\n /**\n * Determines the min resize value.\n */\n @property({ type: Number, reflect: true }) min = 0;\n\n /**\n * Determines the max resize value.\n */\n @property({ type: Number, reflect: true }) max = 100;\n\n /**\n * Determines the value step change.\n */\n @property({ type: Number, reflect: true }) step = 10;\n\n static styles = useStyles([styles]);\n\n get #range() {\n return this.shadowRoot!.querySelector('input')!;\n }\n\n static readonly metadata = {\n tag: 'nve-resize-handle',\n version: '0.0.0',\n valueSchema: {\n type: 'number' as const\n }\n };\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /**\n * Updates internal string values for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n #offset = 0;\n\n render() {\n return html`\n <div internal-host>\n <div class=\"line\" part=\"_line\"></div>\n <input aria-label=${ifDefined(this.ariaLabel ?? this.i18n.resize)} type=\"range\" min=${this.min} max=${this.max} .valueAsNumber=${this.valueAsNumber} @input=${(e: Event) => this.#setInput((e.target as HTMLInputElement).valueAsNumber)} @change=${(e: Event) => this.#setChange((e.target as HTMLInputElement).valueAsNumber)} step=${this.step} />\n </div>\n `;\n }\n\n constructor() {\n super();\n this.value = this.value ?? 50;\n this.#offset = this.valueAsNumber;\n }\n\n connectedCallback() {\n super.connectedCallback();\n this._internals.role = 'none';\n }\n\n firstUpdated(props: PropertyValues) {\n super.firstUpdated(props);\n this.addEventListener('nve-touch-start', () => this.#touchStart());\n this.addEventListener('nve-touch-end', () => this.#touchEnd());\n this.addEventListener('nve-touch-move', ((e: NveTouchEvent) => this.#touchMove(e)) as EventListener);\n this.addEventListener('dblclick', () => {\n if (!this.dispatchEvent(new CustomEvent('toggle', { cancelable: true, bubbles: true, composed: true }))) {\n return;\n }\n this.#toggle();\n });\n }\n\n #toggle() {\n const value = this.valueAsNumber <= this.max && this.valueAsNumber !== this.min ? this.min : this.max;\n this.#setInput(value);\n this.#setChange(value);\n }\n\n #touchStart() {\n this.#range.step = '1';\n this._internals.states.add('active');\n this.#offset = this.valueAsNumber;\n }\n\n #touchMove(e: NveTouchEvent) {\n const offset = (this.orientation === 'vertical' ? e.offsetX : -e.offsetY) * (this.dir === 'rtl' ? -1 : 1);\n this.#offset = this.#offset + offset;\n this.#setInput(this.#offset);\n }\n\n #touchEnd() {\n this.#offset = this.valueAsNumber;\n this.#range.step = `${this.step}`;\n this.#setChange(this.#offset);\n this._internals.states.delete('active');\n }\n\n #setInput(value: number) {\n this.#updateValue(value);\n this.dispatchInputEvent();\n }\n\n #setChange(value: number) {\n this.#updateValue(value);\n this.dispatchChangeEvent();\n }\n\n #updateValue(value: number) {\n if (value <= this.max && value >= this.min) {\n this.valueAsNumber = value;\n }\n }\n}\n"],"mappings":";;;;;;;;;;AA2BO,IAAA,IAAA,cAA2B,EAA4C,CAAU,CAAC,CAAC;;gBAqBxE,EAAU,CAAC,CAAM,CAAC;;CAElC,IAAIA,KAAS;EACX,OAAO,KAAK,WAAY,cAAc,OAAO;CAC/C;;kBAE2B;GACzB,KAAK;GACL,S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3B,IAAM,KAAU,KAAK,gBAAgB,aAAa,EAAE,UAAU,CAAC,EAAE,YAAY,KAAK,QAAQ,QAAQ,KAAK;EAEvG,AADA,KAAKA,MAAyB,GAC9B,KAAKH,GAAU,KAAKG,EAAO;CAC7B;CAEA,KAAY;EAIV,AAHA,KAAKA,KAAU,KAAK,eACpB,KAAKJ,GAAO,OAAO,GAAG,KAAK,QAC3B,KAAKE,GAAW,KAAKE,EAAO,GAC5B,KAAK,WAAW,OAAO,OAAO,QAAQ;CACxC;CAEA,GAAU,GAAe;EAEvB,AADA,KAAKK,GAAa,CAAK,GACvB,KAAK,mBAAmB;CAC1B;CAEA,GAAW,GAAe;EAExB,AADA,KAAKA,GAAa,CAAK,GACvB,KAAK,oBAAoB;CAC3B;CAEA,GAAa,GAAe;EAC1B,AAAI,KAAS,KAAK,OAAO,KAAS,KAAK,QACrC,KAAK,gBAAgB;CAEzB;AACF;GAjHG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,eAAA,KAAA,CAAA,MAKxC,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,OAAA,KAAA,CAAA,MAKxC,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,OAAA,KAAA,CAAA,MAKxC,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,MAqBxC,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,UAzC3B,EAAwB,CAAA,GAAA,CAAA"}
|
package/dist/search/define.d.ts
CHANGED
package/dist/search/search.d.ts
CHANGED
|
@@ -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-search
|
|
6
6
|
* @description A search is a control that enables users to enter text to search.
|
|
7
|
+
* @documentation https://nvidia.github.io/elements/docs/elements/search/
|
|
7
8
|
* @since 0.3.0
|
|
8
9
|
* @entrypoint \@nvidia-elements/core/search
|
|
9
10
|
* @cssprop --padding
|
|
@@ -26,7 +27,7 @@ export declare class Search extends Control implements ContainerElement {
|
|
|
26
27
|
* Sets the rounded visual style of the input.
|
|
27
28
|
*/
|
|
28
29
|
rounded: boolean;
|
|
29
|
-
static styles: import(
|
|
30
|
+
static styles: import("lit").CSSResult[];
|
|
30
31
|
static readonly metadata: {
|
|
31
32
|
tag: string;
|
|
32
33
|
version: string;
|
|
@@ -34,5 +35,5 @@ export declare class Search extends Control implements ContainerElement {
|
|
|
34
35
|
static elementDefinitions: {
|
|
35
36
|
[IconButton.metadata.tag]: typeof IconButton;
|
|
36
37
|
};
|
|
37
|
-
protected get prefixContent(): import(
|
|
38
|
+
protected get prefixContent(): import("lit").TemplateResult<1>;
|
|
38
39
|
}
|
package/dist/search/search2.js
CHANGED
|
@@ -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";
|
|
@@ -22,7 +22,7 @@ var l = class extends r {
|
|
|
22
22
|
static {
|
|
23
23
|
this.metadata = {
|
|
24
24
|
tag: "nve-search",
|
|
25
|
-
version: "2.
|
|
25
|
+
version: "2.1.1"
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
static {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search2.js","names":[],"sources":["../../src/search/search.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { ContainerElement } from '@nvidia-elements/core/internal';\nimport { scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { inputStyles } from '@nvidia-elements/core/input';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport styles from './search.css?inline';\n\n/**\n * @element nve-search\n * @description A search is a control that enables users to enter text to search.\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/search\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 icon button element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search\n */\n@scopedRegistry()\nexport class Search 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 /**\n * Sets the rounded visual style of the input.\n */\n @property({ type: Boolean, reflect: true }) rounded = false;\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-search',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n protected get prefixContent() {\n return html`<nve-icon-button part=\"icon-button\" icon-name=\"search\" container=\"inline\" aria-hidden=\"true\" readonly></nve-icon-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"search2.js","names":[],"sources":["../../src/search/search.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { ContainerElement } from '@nvidia-elements/core/internal';\nimport { scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { inputStyles } from '@nvidia-elements/core/input';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport styles from './search.css?inline';\n\n/**\n * @element nve-search\n * @description A search is a control that enables users to enter text to search.\n * @documentation https://nvidia.github.io/elements/docs/elements/search/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/search\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 icon button element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search\n */\n@scopedRegistry()\nexport class Search 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 /**\n * Sets the rounded visual style of the input.\n */\n @property({ type: Boolean, reflect: true }) rounded = false;\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-search',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n protected get prefixContent() {\n return html`<nve-icon-button part=\"icon-button\" icon-name=\"search\" container=\"inline\" aria-hidden=\"true\" readonly></nve-icon-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;AA6BO,IAAA,IAAA,cAAqB,EAAoC;;8BAUR;;;gBAEtC,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;CACb;AACF;GArBG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,MAKxC,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,WAAA,KAAA,CAAA,UAX3C,EAAe,CAAA,GAAA,CAAA"}
|
package/dist/select/define.d.ts
CHANGED
package/dist/select/select.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { PropertyValues
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import type { PropertyValues } from 'lit';
|
|
2
|
+
import { nothing } from 'lit';
|
|
3
|
+
import { Control } from '@nvidia-elements/core/forms';
|
|
4
|
+
import { Icon } from '@nvidia-elements/core/icon';
|
|
5
|
+
import { Menu, MenuItem } from '@nvidia-elements/core/menu';
|
|
6
|
+
import { Dropdown } from '@nvidia-elements/core/dropdown';
|
|
7
|
+
import { Tag } from '@nvidia-elements/core/tag';
|
|
7
8
|
/**
|
|
8
9
|
* @element nve-select
|
|
9
10
|
* @description A select is a control that enables users to select an option from a list of options.
|
|
11
|
+
* @documentation https://nvidia.github.io/elements/docs/elements/select/
|
|
10
12
|
* @since 0.3.0
|
|
11
13
|
* @entrypoint \@nvidia-elements/core/select
|
|
12
14
|
* @cssprop --padding
|
|
@@ -39,7 +41,7 @@ import { Tag } from '../tag';
|
|
|
39
41
|
*/
|
|
40
42
|
export declare class Select extends Control {
|
|
41
43
|
#private;
|
|
42
|
-
static styles: import(
|
|
44
|
+
static styles: import("lit").CSSResult[];
|
|
43
45
|
static readonly metadata: {
|
|
44
46
|
tag: string;
|
|
45
47
|
version: string;
|
|
@@ -54,11 +56,11 @@ export declare class Select extends Control {
|
|
|
54
56
|
/** Flat container option applies when embedding the component within another containing element */
|
|
55
57
|
container?: 'flat' | 'inline';
|
|
56
58
|
/** Updates internal string values for internationalization. */
|
|
57
|
-
i18n: Partial<import(
|
|
59
|
+
i18n: Partial<import("@nvidia-elements/core/internal").I18nStrings & {
|
|
58
60
|
__set: boolean;
|
|
59
61
|
}>;
|
|
60
|
-
protected get prefixContent(): typeof nothing | import(
|
|
61
|
-
protected get suffixContent(): import(
|
|
62
|
+
protected get prefixContent(): typeof nothing | import("lit").TemplateResult<1>;
|
|
63
|
+
protected get suffixContent(): import("lit").TemplateResult<1>;
|
|
62
64
|
firstUpdated(props: PropertyValues<this>): Promise<void>;
|
|
63
65
|
connectedCallback(): void;
|
|
64
66
|
disconnectedCallback(): void;
|
package/dist/select/select2.js
CHANGED
|
@@ -4,7 +4,7 @@ import { focusElementTimeout as r, onListboxActivate as i } from "../internal/ut
|
|
|
4
4
|
import { appendRootNodeStyle as a, getElementUpdate as o } from "../internal/utils/dom.js";
|
|
5
5
|
import { scopedRegistry as s } from "../internal/decorators/scoped-registry.js";
|
|
6
6
|
import { useStyles as c } from "../internal/styles/index.js";
|
|
7
|
-
import
|
|
7
|
+
import l from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
8
8
|
import { Icon as u } from "../icon/icon2.js";
|
|
9
9
|
import { Control as d } from "../forms/control/control2.js";
|
|
10
10
|
import { Tag as f } from "../tag/tag2.js";
|
|
@@ -27,7 +27,7 @@ var S = class extends d {
|
|
|
27
27
|
static {
|
|
28
28
|
this.metadata = {
|
|
29
29
|
tag: "nve-select",
|
|
30
|
-
version: "2.
|
|
30
|
+
version: "2.1.1"
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
static {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select2.js","names":["#i18nController","#select","#options","#dropdown","#menuItems","#input","#tags","#caret","#placeholderOption","#multipleSelectLabel","#selectValue","#menu","#closeDropdown","#openDropdown","#setupCustomSelectUI","#observers","#syncOptionSelectedStates","#disconnectObservers","#setupOverflowListener","#syncSelectValueStates","#optionObservers","#setupObservers","#updateMultipleOverflow"],"sources":["../../src/select/select.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, nothing } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport {\n focusElementTimeout,\n onListboxActivate,\n useStyles,\n i18n,\n I18nController,\n onChildListMutation,\n getElementUpdate,\n scopedRegistry,\n appendRootNodeStyle\n} from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport { Menu, MenuItem } from '@nvidia-elements/core/menu';\nimport { Dropdown } from '@nvidia-elements/core/dropdown';\nimport { Tag } from '@nvidia-elements/core/tag';\nimport styles from './select.css?inline';\nimport globalStyles from './select.global.css?inline';\n\n/**\n * @element nve-select\n * @description A select is a control that enables users to select an option from a list of options.\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/select\n * @cssprop --padding\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --background\n * @cssprop --color\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --border-bottom\n * @cssprop --cursor\n * @cssprop --font-weight\n * @cssprop --text-align\n * @cssprop --scroll-height\n * @cssprop --width\n * @cssprop --control-width\n * @cssprop --max-width\n * @cssprop --min-width\n * @cssprop --box-shadow\n * @cssprop --max-height\n * @cssprop --text-transform\n * @csspart tag\n * @csspart menu - The dropdown menu element\n * @csspart menu-item - The menu item elements\n * @csspart icon - The icon element\n * @csspart caret - The caret/chevron icon element\n * @csspart dropdown - The dropdown popup element\n * @slot - Select input element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select\n */\n@i18n<Select>()\n@scopedRegistry()\nexport class Select extends Control {\n static styles = useStyles([...Control.styles, styles]);\n\n static readonly metadata = {\n tag: 'nve-select',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon,\n [Dropdown.metadata.tag]: Dropdown,\n [Menu.metadata.tag]: Menu,\n [MenuItem.metadata.tag]: MenuItem,\n [Tag.metadata.tag]: Tag\n };\n\n /** Flat container option applies when embedding the component within another containing element */\n @property({ type: String, reflect: true }) container?: 'flat' | 'inline';\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /** Updates internal string values for internationalization. */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n get #select() {\n return this.input as unknown as HTMLSelectElement;\n }\n\n get #options() {\n return Array.from(this.#select?.options ? this.#select.options : []);\n }\n\n get #dropdown() {\n return this.shadowRoot!.querySelector<Dropdown>(Dropdown.metadata.tag);\n }\n\n get #menuItems() {\n return this.shadowRoot!.querySelectorAll<MenuItem>(MenuItem.metadata.tag);\n }\n\n get #input() {\n return this.shadowRoot!.querySelector<HTMLElement>('[input]');\n }\n\n get #tags() {\n return this.shadowRoot!.querySelector('.tags');\n }\n\n get #caret() {\n return this.shadowRoot!.querySelector<Icon>('[name=\"caret\"]');\n }\n\n get #placeholderOption() {\n return this.#options.find(o => o.selected && o.hidden && o.disabled);\n }\n\n #observers: (MutationObserver | ResizeObserver)[] = [];\n\n get #multipleSelectLabel() {\n const option = this.#placeholderOption;\n const label = option ? option.innerText : `${this.#select.selectedOptions.length} ${this.i18n.selected}`;\n return html`<div class=\"tags-label ${option ? 'placeholder' : ''}\" aria-hidden=\"true\">${label}</div>`;\n }\n\n protected get prefixContent() {\n return this.#select?.multiple && this.#select?.size === 0\n ? html`\n ${this.#multipleSelectLabel}\n <div class=\"tags\">\n ${this.#options\n .filter(o => o.selected && o !== this.#placeholderOption)\n .map(\n o => html`\n <nve-tag part=\"tag\" readonly color=\"gray-slate\" closable .value=${o.value} @click=${() => this.#selectValue(o, false)}>${o.textContent}</nve-tag>`\n )}\n </div>`\n : nothing;\n }\n\n get #menu() {\n return html`\n <nve-menu part=\"menu\" role=\"listbox\" style=\"--width: 100%; --min-width: fit-content\" aria-label=${ifDefined(this.i18n.select)}>\n ${this.#options\n .filter(o => o !== this.#placeholderOption)\n .map(\n (o, i) => html`\n <nve-menu-item part=\"menu-item\" role=\"option\" @click=${() => this.#selectValue(o, !o.selected)} ?selected=${o.selected} ?disabled=${o.disabled} ?hidden=${!!o.hidden} aria-selected=${o.selected}>\n <slot name=\"option-${i + 1}\">\n <nve-icon part=\"icon\" name=\"check\" size=\"sm\" aria-hidden=\"true\"></nve-icon> ${o.innerText}\n </slot>\n </nve-menu-item>`\n )}\n </nve-menu>`;\n }\n\n protected get suffixContent() {\n return this.#select?.size === 0\n ? html`\n <nve-icon name=\"caret\" part=\"caret\" direction=\"down\" size=\"sm\" aria-hidden=\"true\"></nve-icon>\n <nve-dropdown part=\"dropdown\" @close=${this.#closeDropdown} @open=${this.#openDropdown} hidden .anchor=${this.#input as HTMLElement} position=\"bottom\">\n ${this.#menu}\n </nve-dropdown>`\n : this.#menu;\n }\n\n async firstUpdated(props: PropertyValues<this>) {\n super.firstUpdated(props);\n await this.updateComplete;\n this.#setupCustomSelectUI();\n }\n\n #syncSelectValueStates() {\n this.#observers.push(\n getElementUpdate(this.#select, 'value', () => this.requestUpdate()),\n onChildListMutation(this.#select, () => this.requestUpdate(), { attributes: true, subtree: true }),\n onChildListMutation(this.#select, () => this.#syncOptionSelectedStates(), { subtree: true })\n );\n }\n\n #optionObservers = new Map<HTMLOptionElement, MutationObserver>();\n\n #setupObservers() {\n this.#disconnectObservers();\n this.#setupOverflowListener();\n this.#syncSelectValueStates();\n this.#syncOptionSelectedStates();\n }\n\n #disconnectObservers() {\n this.#observers.forEach(observer => observer.disconnect());\n this.#observers = [];\n this.#optionObservers.clear();\n }\n\n #syncOptionSelectedStates() {\n const options = new Set(this.#options);\n\n this.#optionObservers.forEach((observer, option) => {\n if (!options.has(option)) {\n observer.disconnect();\n this.#optionObservers.delete(option);\n this.#observers = this.#observers.filter(o => o !== observer);\n }\n });\n\n this.#options.forEach(o => {\n if (!this.#optionObservers.has(o)) {\n const observer = getElementUpdate(o, 'selected', () => this.requestUpdate());\n this.#optionObservers.set(o, observer);\n this.#observers.push(observer);\n }\n });\n }\n\n connectedCallback() {\n super.connectedCallback();\n appendRootNodeStyle(this, globalStyles);\n void this.updateComplete.then(() => {\n if (this.isConnected) {\n this.#setupObservers();\n }\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.#disconnectObservers();\n }\n\n async updated(props: PropertyValues<this>) {\n super.updated(props);\n if (this.#select?.size && this.#select?.size !== 0) {\n this._internals.states.add('size');\n this.style.setProperty('--size', `${this.#select?.size + 0.75}`);\n } else {\n this._internals.states.delete('size');\n this.style.removeProperty('--size');\n }\n\n if (this.#select?.multiple && this.#select?.size === 0) {\n this._internals.states.add('multiple');\n } else {\n this._internals.states.delete('multiple');\n }\n }\n\n #setupCustomSelectUI() {\n if (this.#select?.size === 0) {\n onListboxActivate(this.#select, () => {\n this.requestUpdate(); // update menu items\n this.#dropdown!.style.setProperty('--min-width', `${this.#input!.getBoundingClientRect().width}px`);\n this.#dropdown!.showPopover();\n focusElementTimeout(this.#menuItems[0] as HTMLElement);\n });\n }\n }\n\n #openDropdown() {\n this.#dropdown!.hidden = false;\n this.#caret!.direction = 'up';\n }\n\n #closeDropdown() {\n this.#dropdown!.hidden = true;\n this.#caret!.direction = 'down';\n }\n\n #setupOverflowListener() {\n const observer = new ResizeObserver(entries => this.#updateMultipleOverflow(entries[0]!.contentRect.width));\n this.#observers.push(observer);\n observer.observe(this.#input!);\n }\n\n async #selectValue(option: HTMLOptionElement, selected: boolean) {\n if (this.#select.multiple || (!this.#select.multiple && option.value !== this.#select.value)) {\n option.selected = selected;\n }\n\n // native select only the first selected option determines the select input value\n if (this.#select.selectedOptions.length < 1) {\n this.#select.value = selected ? option.value : '';\n }\n\n this.#select.dispatchEvent(new Event('input', { bubbles: true }));\n this.#select.dispatchEvent(new Event('change', { bubbles: true }));\n this.requestUpdate();\n\n if (!this.#select.multiple && this.#dropdown) {\n this.#dropdown.hidePopover();\n } else {\n await this.updateComplete;\n this.#updateMultipleOverflow(this.#input!.getBoundingClientRect().width);\n }\n }\n\n #updateMultipleOverflow(width: number) {\n const tags = this.#tags;\n if (this.#select?.multiple && tags && tags.getBoundingClientRect().width > width - 48) {\n this._internals.states.add('multiple-overflow');\n } else {\n this._internals.states.delete('multiple-overflow');\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA6DO,IAAA,IAAA,cAAqB,EAAQ;;yBAmBM,IAAI,EAAqB,IAAI,eAGlC,KAAKA,GAAgB,gBAkCJ,CAAC,6BA+DlC,IAAI,IAAyC;;;gBAtHhD,EAAU,CAAC,GAAG,EAAQ,QAAQ,CAAM,CAAC;;;kBAE1B;GACzB,KAAK;GACL,SAAS;EACX;;;4BAE4B;IACzB,EAAK,SAAS,MAAM;IACpB,EAAS,SAAS,MAAM;IACxB,EAAK,SAAS,MAAM;IACpB,EAAS,SAAS,MAAM;IACxB,EAAI,SAAS,MAAM;EACtB;;CAKA;CAKA,IAAIC,KAAU;EACZ,OAAO,KAAK;CACd;CAEA,IAAIC,KAAW;EACb,OAAO,MAAM,KAAK,KAAKD,IAAS,UAAU,KAAKA,GAAQ,UAAU,CAAC,CAAC;CACrE;CAEA,IAAIE,KAAY;EACd,OAAO,KAAK,WAAY,cAAwB,EAAS,SAAS,GAAG;CACvE;CAEA,IAAIC,KAAa;EACf,OAAO,KAAK,WAAY,iBAA2B,EAAS,SAAS,GAAG;CAC1E;CAEA,IAAIC,KAAS;EACX,OAAO,KAAK,WAAY,cAA2B,SAAS;CAC9D;CAEA,IAAIC,KAAQ;EACV,OAAO,KAAK,WAAY,cAAc,OAAO;CAC/C;CAEA,IAAIC,KAAS;EACX,OAAO,KAAK,WAAY,cAAoB,kBAAgB;CAC9D;CAEA,IAAIC,KAAqB;EACvB,OAAO,KAAKN,GAAS,MAAK,MAAK,EAAE,YAAY,EAAE,U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GAAK,CAAC,CAAC,GACjE,KAAK,cAAc,GAEf,CAAC,KAAKA,GAAQ,YAAY,KAAKE,KACjC,KAAKA,GAAU,YAAY,KAE3B,MAAM,KAAK,gBACX,KAAKmB,GAAwB,KAAKjB,GAAQ,sBAAsB,EAAE,KAAK;CAE3E;CAEA,GAAwB,GAAe;EACrC,IAAM,IAAO,KAAKC;EAClB,AAAI,KAAKL,IAAS,YAAY,KAAQ,EAAK,sBAAsB,EAAE,QAAQ,IAAQ,KACjF,KAAK,WAAW,OAAO,IAAI,mBAAmB,IAE9C,KAAK,WAAW,OAAO,OAAO,mBAAmB;CAErD;AACF;GAlOG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,MAKxC,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,UAxB3B,EAAa,GACb,EAAe,CAAA,GAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"select2.js","names":["#i18nController","#select","#options","#dropdown","#menuItems","#input","#tags","#caret","#placeholderOption","#multipleSelectLabel","#selectValue","#menu","#closeDropdown","#openDropdown","#setupCustomSelectUI","#observers","#syncOptionSelectedStates","#disconnectObservers","#setupOverflowListener","#syncSelectValueStates","#optionObservers","#setupObservers","#updateMultipleOverflow"],"sources":["../../src/select/select.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, nothing } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport {\n focusElementTimeout,\n onListboxActivate,\n useStyles,\n i18n,\n I18nController,\n onChildListMutation,\n getElementUpdate,\n scopedRegistry,\n appendRootNodeStyle\n} from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport { Menu, MenuItem } from '@nvidia-elements/core/menu';\nimport { Dropdown } from '@nvidia-elements/core/dropdown';\nimport { Tag } from '@nvidia-elements/core/tag';\nimport styles from './select.css?inline';\nimport globalStyles from './select.global.css?inline';\n\n/**\n * @element nve-select\n * @description A select is a control that enables users to select an option from a list of options.\n * @documentation https://nvidia.github.io/elements/docs/elements/select/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/select\n * @cssprop --padding\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --background\n * @cssprop --color\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --border-bottom\n * @cssprop --cursor\n * @cssprop --font-weight\n * @cssprop --text-align\n * @cssprop --scroll-height\n * @cssprop --width\n * @cssprop --control-width\n * @cssprop --max-width\n * @cssprop --min-width\n * @cssprop --box-shadow\n * @cssprop --max-height\n * @cssprop --text-transform\n * @csspart tag\n * @csspart menu - The dropdown menu element\n * @csspart menu-item - The menu item elements\n * @csspart icon - The icon element\n * @csspart caret - The caret/chevron icon element\n * @csspart dropdown - The dropdown popup element\n * @slot - Select input element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select\n */\n@i18n<Select>()\n@scopedRegistry()\nexport class Select extends Control {\n static styles = useStyles([...Control.styles, styles]);\n\n static readonly metadata = {\n tag: 'nve-select',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon,\n [Dropdown.metadata.tag]: Dropdown,\n [Menu.metadata.tag]: Menu,\n [MenuItem.metadata.tag]: MenuItem,\n [Tag.metadata.tag]: Tag\n };\n\n /** Flat container option applies when embedding the component within another containing element */\n @property({ type: String, reflect: true }) container?: 'flat' | 'inline';\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /** Updates internal string values for internationalization. */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n get #select() {\n return this.input as unknown as HTMLSelectElement;\n }\n\n get #options() {\n return Array.from(this.#select?.options ? this.#select.options : []);\n }\n\n get #dropdown() {\n return this.shadowRoot!.querySelector<Dropdown>(Dropdown.metadata.tag);\n }\n\n get #menuItems() {\n return this.shadowRoot!.querySelectorAll<MenuItem>(MenuItem.metadata.tag);\n }\n\n get #input() {\n return this.shadowRoot!.querySelector<HTMLElement>('[input]');\n }\n\n get #tags() {\n return this.shadowRoot!.querySelector('.tags');\n }\n\n get #caret() {\n return this.shadowRoot!.querySelector<Icon>('[name=\"caret\"]');\n }\n\n get #placeholderOption() {\n return this.#options.find(o => o.selected && o.hidden && o.disabled);\n }\n\n #observers: (MutationObserver | ResizeObserver)[] = [];\n\n get #multipleSelectLabel() {\n const option = this.#placeholderOption;\n const label = option ? option.innerText : `${this.#select.selectedOptions.length} ${this.i18n.selected}`;\n return html`<div class=\"tags-label ${option ? 'placeholder' : ''}\" aria-hidden=\"true\">${label}</div>`;\n }\n\n protected get prefixContent() {\n return this.#select?.multiple && this.#select?.size === 0\n ? html`\n ${this.#multipleSelectLabel}\n <div class=\"tags\">\n ${this.#options\n .filter(o => o.selected && o !== this.#placeholderOption)\n .map(\n o => html`\n <nve-tag part=\"tag\" readonly color=\"gray-slate\" closable .value=${o.value} @click=${() => this.#selectValue(o, false)}>${o.textContent}</nve-tag>`\n )}\n </div>`\n : nothing;\n }\n\n get #menu() {\n return html`\n <nve-menu part=\"menu\" role=\"listbox\" style=\"--width: 100%; --min-width: fit-content\" aria-label=${ifDefined(this.i18n.select)}>\n ${this.#options\n .filter(o => o !== this.#placeholderOption)\n .map(\n (o, i) => html`\n <nve-menu-item part=\"menu-item\" role=\"option\" @click=${() => this.#selectValue(o, !o.selected)} ?selected=${o.selected} ?disabled=${o.disabled} ?hidden=${!!o.hidden} aria-selected=${o.selected}>\n <slot name=\"option-${i + 1}\">\n <nve-icon part=\"icon\" name=\"check\" size=\"sm\" aria-hidden=\"true\"></nve-icon> ${o.innerText}\n </slot>\n </nve-menu-item>`\n )}\n </nve-menu>`;\n }\n\n protected get suffixContent() {\n return this.#select?.size === 0\n ? html`\n <nve-icon name=\"caret\" part=\"caret\" direction=\"down\" size=\"sm\" aria-hidden=\"true\"></nve-icon>\n <nve-dropdown part=\"dropdown\" @close=${this.#closeDropdown} @open=${this.#openDropdown} hidden .anchor=${this.#input as HTMLElement} position=\"bottom\">\n ${this.#menu}\n </nve-dropdown>`\n : this.#menu;\n }\n\n async firstUpdated(props: PropertyValues<this>) {\n super.firstUpdated(props);\n await this.updateComplete;\n this.#setupCustomSelectUI();\n }\n\n #syncSelectValueStates() {\n this.#observers.push(\n getElementUpdate(this.#select, 'value', () => this.requestUpdate()),\n onChildListMutation(this.#select, () => this.requestUpdate(), { attributes: true, subtree: true }),\n onChildListMutation(this.#select, () => this.#syncOptionSelectedStates(), { subtree: true })\n );\n }\n\n #optionObservers = new Map<HTMLOptionElement, MutationObserver>();\n\n #setupObservers() {\n this.#disconnectObservers();\n this.#setupOverflowListener();\n this.#syncSelectValueStates();\n this.#syncOptionSelectedStates();\n }\n\n #disconnectObservers() {\n this.#observers.forEach(observer => observer.disconnect());\n this.#observers = [];\n this.#optionObservers.clear();\n }\n\n #syncOptionSelectedStates() {\n const options = new Set(this.#options);\n\n this.#optionObservers.forEach((observer, option) => {\n if (!options.has(option)) {\n observer.disconnect();\n this.#optionObservers.delete(option);\n this.#observers = this.#observers.filter(o => o !== observer);\n }\n });\n\n this.#options.forEach(o => {\n if (!this.#optionObservers.has(o)) {\n const observer = getElementUpdate(o, 'selected', () => this.requestUpdate());\n this.#optionObservers.set(o, observer);\n this.#observers.push(observer);\n }\n });\n }\n\n connectedCallback() {\n super.connectedCallback();\n appendRootNodeStyle(this, globalStyles);\n void this.updateComplete.then(() => {\n if (this.isConnected) {\n this.#setupObservers();\n }\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.#disconnectObservers();\n }\n\n async updated(props: PropertyValues<this>) {\n super.updated(props);\n if (this.#select?.size && this.#select?.size !== 0) {\n this._internals.states.add('size');\n this.style.setProperty('--size', `${this.#select?.size + 0.75}`);\n } else {\n this._internals.states.delete('size');\n this.style.removeProperty('--size');\n }\n\n if (this.#select?.multiple && this.#select?.size === 0) {\n this._internals.states.add('multiple');\n } else {\n this._internals.states.delete('multiple');\n }\n }\n\n #setupCustomSelectUI() {\n if (this.#select?.size === 0) {\n onListboxActivate(this.#select, () => {\n this.requestUpdate(); // update menu items\n this.#dropdown!.style.setProperty('--min-width', `${this.#input!.getBoundingClientRect().width}px`);\n this.#dropdown!.showPopover();\n focusElementTimeout(this.#menuItems[0] as HTMLElement);\n });\n }\n }\n\n #openDropdown() {\n this.#dropdown!.hidden = false;\n this.#caret!.direction = 'up';\n }\n\n #closeDropdown() {\n this.#dropdown!.hidden = true;\n this.#caret!.direction = 'down';\n }\n\n #setupOverflowListener() {\n const observer = new ResizeObserver(entries => this.#updateMultipleOverflow(entries[0]!.contentRect.width));\n this.#observers.push(observer);\n observer.observe(this.#input!);\n }\n\n async #selectValue(option: HTMLOptionElement, selected: boolean) {\n if (this.#select.multiple || (!this.#select.multiple && option.value !== this.#select.value)) {\n option.selected = selected;\n }\n\n // native select only the first selected option determines the select input value\n if (this.#select.selectedOptions.length < 1) {\n this.#select.value = selected ? option.value : '';\n }\n\n this.#select.dispatchEvent(new Event('input', { bubbles: true }));\n this.#select.dispatchEvent(new Event('change', { bubbles: true }));\n this.requestUpdate();\n\n if (!this.#select.multiple && this.#dropdown) {\n this.#dropdown.hidePopover();\n } else {\n await this.updateComplete;\n this.#updateMultipleOverflow(this.#input!.getBoundingClientRect().width);\n }\n }\n\n #updateMultipleOverflow(width: number) {\n const tags = this.#tags;\n if (this.#select?.multiple && tags && tags.getBoundingClientRect().width > width - 48) {\n this._internals.states.add('multiple-overflow');\n } else {\n this._internals.states.delete('multiple-overflow');\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA8DO,IAAA,IAAA,cAAqB,EAAQ;;yBAmBM,IAAI,EAAqB,IAAI,eAGlC,KAAKA,GAAgB,gBAkCJ,CAAC,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BAAmB;CAErD;AACF;GAlOG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,MAKxC,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,UAxB3B,EAAa,GACb,EAAe,CAAA,GAAA,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { LitElement, PropertyValues } from 'lit';
|
|
1
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
2
2
|
/**
|
|
3
3
|
* @element nve-skeleton
|
|
4
4
|
* @description A loading placeholder component that displays animated placeholder shapes while content loads.
|
|
5
|
+
* @documentation https://nvidia.github.io/elements/docs/elements/skeleton/
|
|
5
6
|
* @since 1.44.0
|
|
6
7
|
* @entrypoint \@nvidia-elements/core/skeleton
|
|
7
8
|
* @slot - default content slot
|
|
@@ -12,7 +13,7 @@ import { LitElement, PropertyValues } from 'lit';
|
|
|
12
13
|
*/
|
|
13
14
|
export declare class Skeleton extends LitElement {
|
|
14
15
|
#private;
|
|
15
|
-
static styles: import(
|
|
16
|
+
static styles: import("lit").CSSResult[];
|
|
16
17
|
static readonly metadata: {
|
|
17
18
|
tag: string;
|
|
18
19
|
version: string;
|
|
@@ -25,7 +26,7 @@ export declare class Skeleton extends LitElement {
|
|
|
25
26
|
hidden: boolean;
|
|
26
27
|
/** @private */
|
|
27
28
|
_internals: ElementInternals;
|
|
28
|
-
render(): import(
|
|
29
|
+
render(): import("lit").TemplateResult<1>;
|
|
29
30
|
connectedCallback(): void;
|
|
30
31
|
updated(props: PropertyValues<this>): void;
|
|
31
32
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { attachInternals as e } from "../internal/utils/a11y.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 "./skeleton.js";
|
|
5
5
|
import { LitElement as i, html as a } from "lit";
|
|
6
6
|
import { property as o } from "lit/decorators/property.js";
|
|
@@ -15,7 +15,7 @@ var s = class extends i {
|
|
|
15
15
|
static {
|
|
16
16
|
this.metadata = {
|
|
17
17
|
tag: "nve-skeleton",
|
|
18
|
-
version: "2.
|
|
18
|
+
version: "2.1.1"
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
render() {
|