@redvars/peacock 3.8.0 → 3.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BaseInput-14YmcfK7.js → BaseInput-CU1zZYKc.js} +3 -3
- package/dist/{BaseInput-14YmcfK7.js.map → BaseInput-CU1zZYKc.js.map} +1 -1
- package/dist/ButtonConstants-CahP2_NA.js +4 -0
- package/dist/ButtonConstants-CahP2_NA.js.map +1 -0
- package/dist/{IndividualComponent-DUINtMGK.js → IndividualComponent-Bdwyrvd6.js} +2 -2
- package/dist/{IndividualComponent-DUINtMGK.js.map → IndividualComponent-Bdwyrvd6.js.map} +1 -1
- package/dist/{NativeHyperlinkMixin-DrYXyfMQ.js → NativeHyperlinkMixin-D9J4aBTy.js} +4 -30
- package/dist/NativeHyperlinkMixin-D9J4aBTy.js.map +1 -0
- package/dist/accordion-item.js +338 -0
- package/dist/accordion-item.js.map +1 -0
- package/dist/accordion.js +159 -0
- package/dist/accordion.js.map +1 -0
- package/dist/alert.js +190 -0
- package/dist/alert.js.map +1 -0
- package/dist/app-bar.js +324 -0
- package/dist/app-bar.js.map +1 -0
- package/dist/assets/components.css +1 -1
- package/dist/assets/components.css.map +1 -1
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles.css.map +1 -1
- package/dist/attachable-controller-CAKVrfcG.js +119 -0
- package/dist/attachable-controller-CAKVrfcG.js.map +1 -0
- package/dist/avatar.js +114 -0
- package/dist/avatar.js.map +1 -0
- package/dist/badge.js +91 -0
- package/dist/badge.js.map +1 -0
- package/dist/base-Cl6v8-BZ.js +9 -0
- package/dist/base-Cl6v8-BZ.js.map +1 -0
- package/dist/bottom-sheet.js +14 -5
- package/dist/bottom-sheet.js.map +1 -1
- package/dist/breadcrumb-item.js +163 -0
- package/dist/breadcrumb-item.js.map +1 -0
- package/dist/breadcrumb.js +95 -0
- package/dist/breadcrumb.js.map +1 -0
- package/dist/button-group.js +87 -137
- package/dist/button-group.js.map +1 -1
- package/dist/button.js +863 -133
- package/dist/button.js.map +1 -1
- package/dist/calendar-column-view.js +8 -4
- package/dist/calendar-column-view.js.map +1 -1
- package/dist/calendar-month-view.js +8 -4
- package/dist/calendar-month-view.js.map +1 -1
- package/dist/calendar.js +8 -4
- package/dist/calendar.js.map +1 -1
- package/dist/canvas.js +8 -4
- package/dist/canvas.js.map +1 -1
- package/dist/card-content.js +1 -1
- package/dist/card.js +23 -45
- package/dist/card.js.map +1 -1
- package/dist/cb-compound-expression.js +6 -2
- package/dist/cb-compound-expression.js.map +1 -1
- package/dist/cb-divider.js +7 -3
- package/dist/cb-divider.js.map +1 -1
- package/dist/cb-expression.js +6 -2
- package/dist/cb-expression.js.map +1 -1
- package/dist/cb-predicate.js +7 -3
- package/dist/cb-predicate.js.map +1 -1
- package/dist/{chart-bar-cn6rrna-.js → chart-bar-CYoGNXnK.js} +6 -2
- package/dist/{chart-bar-cn6rrna-.js.map → chart-bar-CYoGNXnK.js.map} +1 -1
- package/dist/chart-bar.js +7 -6
- package/dist/chart-bar.js.map +1 -1
- package/dist/chart-doughnut.js +8 -3
- package/dist/chart-doughnut.js.map +1 -1
- package/dist/chart-pie.js +8 -3
- package/dist/chart-pie.js.map +1 -1
- package/dist/chart-stacked-bar.js +7 -6
- package/dist/chart-stacked-bar.js.map +1 -1
- package/dist/checkbox.js +526 -0
- package/dist/checkbox.js.map +1 -0
- package/dist/chip.js +459 -0
- package/dist/chip.js.map +1 -0
- package/dist/{class-map-YU7g0o3B.js → class-map-DG7CA1et.js} +2 -2
- package/dist/{class-map-YU7g0o3B.js.map → class-map-DG7CA1et.js.map} +1 -1
- package/dist/clock.js +6 -2
- package/dist/clock.js.map +1 -1
- package/dist/code-editor.js +45 -30
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +9 -5
- package/dist/code-highlighter.js.map +1 -1
- package/dist/condition-builder.js +5 -1
- package/dist/condition-builder.js.map +1 -1
- package/dist/container.js +141 -0
- package/dist/container.js.map +1 -0
- package/dist/custom-elements-jsdocs.json +721 -769
- package/dist/custom-elements.json +3213 -1979
- package/dist/datasource-B2eRh6Or.js +108 -0
- package/dist/datasource-B2eRh6Or.js.map +1 -0
- package/dist/dispatch-event-utils-CuEqjlPT.js.map +1 -1
- package/dist/divider.js +135 -0
- package/dist/divider.js.map +1 -0
- package/dist/dropdown-button.js +11 -6
- package/dist/dropdown-button.js.map +1 -1
- package/dist/element-internals-2CMts_0M.js +290 -0
- package/dist/element-internals-2CMts_0M.js.map +1 -0
- package/dist/elevation.js +94 -0
- package/dist/elevation.js.map +1 -0
- package/dist/empty-state.js +194 -0
- package/dist/empty-state.js.map +1 -0
- package/dist/{event-manager-D-QCmUgR.js → event-manager-DTyX2uYD.js} +2 -2
- package/dist/{event-manager-D-QCmUgR.js.map → event-manager-DTyX2uYD.js.map} +1 -1
- package/dist/fab.js +138 -145
- package/dist/fab.js.map +1 -1
- package/dist/field.js +461 -0
- package/dist/field.js.map +1 -0
- package/dist/{popover-DUPmMVWS.js → floating-controller-CnUZnOhK.js} +2 -171
- package/dist/floating-controller-CnUZnOhK.js.map +1 -0
- package/dist/{flow-designer-node-BWrPuxAR.js → flow-designer-node-DsVwQTac.js} +7 -3
- package/dist/{flow-designer-node-BWrPuxAR.js.map → flow-designer-node-DsVwQTac.js.map} +1 -1
- package/dist/flow-designer-node.js +3 -3
- package/dist/flow-designer.js +19 -12
- package/dist/flow-designer.js.map +1 -1
- package/dist/focus-ring.js +126 -0
- package/dist/focus-ring.js.map +1 -0
- package/dist/form-associated-BXADnjOB.js +388 -0
- package/dist/form-associated-BXADnjOB.js.map +1 -0
- package/dist/html-editor.js +21 -9
- package/dist/html-editor.js.map +1 -1
- package/dist/hyperlink-DLvb6MXE.js +98 -0
- package/dist/hyperlink-DLvb6MXE.js.map +1 -0
- package/dist/icon-button.js +1064 -0
- package/dist/icon-button.js.map +1 -0
- package/dist/icon.js +170 -0
- package/dist/icon.js.map +1 -0
- package/dist/if-defined-BXZpRQ4P.js +10 -0
- package/dist/if-defined-BXZpRQ4P.js.map +1 -0
- package/dist/image.js +201 -0
- package/dist/image.js.map +1 -0
- package/dist/index.js +73 -20
- package/dist/index.js.map +1 -1
- package/dist/is-dark-mode-DOcaw4Yq.js.map +1 -1
- package/dist/is-link-Dk2OV3PM.js +6 -0
- package/dist/is-link-Dk2OV3PM.js.map +1 -0
- package/dist/item.js +212 -0
- package/dist/item.js.map +1 -0
- package/dist/link.js +75 -0
- package/dist/link.js.map +1 -0
- package/dist/list-D6JLh1uh.js +352 -0
- package/dist/list-D6JLh1uh.js.map +1 -0
- package/dist/list.js +14 -0
- package/dist/list.js.map +1 -0
- package/dist/{peacock-loader.js → loader.js} +83 -22
- package/dist/loader.js.map +1 -0
- package/dist/menu-item.js +318 -0
- package/dist/menu-item.js.map +1 -0
- package/dist/menu.js +534 -0
- package/dist/menu.js.map +1 -0
- package/dist/modal.js +9 -5
- package/dist/modal.js.map +1 -1
- package/dist/navigation-rail-item.js +385 -0
- package/dist/navigation-rail-item.js.map +1 -0
- package/dist/navigation-rail.js +217 -0
- package/dist/navigation-rail.js.map +1 -0
- package/dist/notification-manager.js +8 -4
- package/dist/notification-manager.js.map +1 -1
- package/dist/notification.js +8 -4
- package/dist/notification.js.map +1 -1
- package/dist/number-counter.js +7 -3
- package/dist/number-counter.js.map +1 -1
- package/dist/{observe-slot-change-D8Xg-kSS.js → observe-slot-change-DPxaZrZF.js} +3 -4
- package/dist/observe-slot-change-DPxaZrZF.js.map +1 -0
- package/dist/option.js +121 -0
- package/dist/option.js.map +1 -0
- package/dist/pagination.js +255 -0
- package/dist/pagination.js.map +1 -0
- package/dist/popover-content.js +7 -3
- package/dist/popover-content.js.map +1 -1
- package/dist/popover.js +175 -3
- package/dist/popover.js.map +1 -1
- package/dist/{property-1psGvXOq.js → property-B49QQ8pS.js} +2 -2
- package/dist/{property-1psGvXOq.js.map → property-B49QQ8pS.js.map} +1 -1
- package/dist/query-CHb9Ft_d.js +10 -0
- package/dist/query-CHb9Ft_d.js.map +1 -0
- package/dist/query-assigned-elements-BJaGSqM0.js +10 -0
- package/dist/query-assigned-elements-BJaGSqM0.js.map +1 -0
- package/dist/radio.js +476 -0
- package/dist/radio.js.map +1 -0
- package/dist/ripple.js +506 -0
- package/dist/ripple.js.map +1 -0
- package/dist/search.js +12 -7
- package/dist/search.js.map +1 -1
- package/dist/segmented-button-group.js +137 -0
- package/dist/segmented-button-group.js.map +1 -0
- package/dist/segmented-button.js +289 -0
- package/dist/segmented-button.js.map +1 -0
- package/dist/select-Dwtk0RIU.js +3937 -0
- package/dist/select-Dwtk0RIU.js.map +1 -0
- package/dist/side-sheet.js +8 -4
- package/dist/side-sheet.js.map +1 -1
- package/dist/skeleton.js +122 -0
- package/dist/skeleton.js.map +1 -0
- package/dist/slider.js +346 -0
- package/dist/slider.js.map +1 -0
- package/dist/snackbar.js +335 -0
- package/dist/snackbar.js.map +1 -0
- package/dist/spinner.js +100 -0
- package/dist/spinner.js.map +1 -0
- package/dist/split-button.js +10 -5
- package/dist/split-button.js.map +1 -1
- package/dist/spread-B5cgadZl.js +32 -0
- package/dist/spread-B5cgadZl.js.map +1 -0
- package/dist/src/__internal/aria/aria.d.ts +98 -0
- package/dist/src/__internal/aria/delegate.d.ts +54 -0
- package/dist/src/__internal/events/dispatch-hooks.d.ts +80 -0
- package/dist/src/__internal/mixins/element-internals.d.ts +40 -0
- package/dist/src/__internal/mixins/form-associated.d.ts +174 -0
- package/dist/src/__internal/mixins/form-submitter.d.ts +59 -0
- package/dist/src/__internal/mixins/hyperlink.d.ts +42 -0
- package/dist/src/__internal/mixins/mixin.d.ts +49 -0
- package/dist/src/{__utils → __internal/utils}/observe-slot-change.d.ts +1 -0
- package/dist/src/accordion/accordion-item.d.ts +3 -1
- package/dist/src/accordion/accordion.d.ts +1 -1
- package/dist/src/alert/alert.d.ts +43 -0
- package/dist/src/alert/index.d.ts +1 -0
- package/dist/src/app-bar/app-bar.d.ts +92 -0
- package/dist/src/app-bar/index.d.ts +1 -0
- package/dist/src/avatar/avatar.d.ts +2 -0
- package/dist/src/bottom-sheet/bottom-sheet.d.ts +1 -1
- package/dist/src/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +1 -0
- package/dist/src/button/ButtonTypes.d.ts +5 -0
- package/dist/src/button/base-button/base-button.d.ts +18 -0
- package/dist/src/button/button/button.d.ts +29 -37
- package/dist/src/button/button-group/button-group.d.ts +17 -18
- package/dist/src/{fab → button/fab}/fab.d.ts +8 -26
- package/dist/src/button/icon-button/icon-button.d.ts +20 -27
- package/dist/src/button/index.d.ts +1 -0
- package/dist/src/calendar/calendar.d.ts +1 -1
- package/dist/src/canvas/canvas.d.ts +1 -1
- package/dist/src/card/card.d.ts +5 -6
- package/dist/src/chart-bar/chart-bar.d.ts +1 -1
- package/dist/src/chart-bar/chart-stacked-bar.d.ts +1 -1
- package/dist/src/checkbox/checkbox.d.ts +5 -1
- package/dist/src/chip/chip/chip.d.ts +9 -8
- package/dist/src/container/container.d.ts +5 -1
- package/dist/src/divider/divider.d.ts +2 -0
- package/dist/src/empty-state/empty-state.d.ts +1 -0
- package/dist/src/field/field.d.ts +19 -1
- package/dist/src/focus-ring/focus-ring.d.ts +3 -7
- package/dist/src/html-editor/html-editor.d.ts +1 -1
- package/dist/src/icon/icon.d.ts +9 -4
- package/dist/src/image/image.d.ts +4 -0
- package/dist/src/index.d.ts +7 -6
- package/dist/src/item/item.d.ts +20 -29
- package/dist/src/link/link.d.ts +1 -1
- package/dist/src/list/list-item.d.ts +7 -5
- package/dist/src/list/list.d.ts +3 -2
- package/dist/src/menu/menu/menu.d.ts +14 -0
- package/dist/src/menu/menu-item/menu-item.d.ts +10 -2
- package/dist/src/modal/modal.d.ts +1 -1
- package/dist/src/navigation-rail/navigation-rail-item.d.ts +5 -4
- package/dist/src/navigation-rail/navigation-rail.d.ts +1 -1
- package/dist/src/radio/radio.d.ts +5 -0
- package/dist/src/ripple/ripple.d.ts +10 -1
- package/dist/src/search/search.d.ts +1 -1
- package/dist/src/segmented-button/segmented-button-group.d.ts +2 -2
- package/dist/src/segmented-button/segmented-button.d.ts +2 -0
- package/dist/src/side-sheet/side-sheet.d.ts +1 -1
- package/dist/src/skeleton/skeleton.d.ts +1 -0
- package/dist/src/slider/slider.d.ts +1 -0
- package/dist/src/snackbar/snackbar.d.ts +12 -2
- package/dist/src/svg/svg.d.ts +5 -0
- package/dist/src/table/table.d.ts +5 -0
- package/dist/src/tabs/tab.d.ts +2 -7
- package/dist/src/toolbar/toolbar.d.ts +2 -2
- package/dist/{state-DwbEjqVk.js → state-DkTK9EGF.js} +2 -2
- package/dist/{state-DwbEjqVk.js.map → state-DkTK9EGF.js.map} +1 -1
- package/dist/{style-map-DVmWOuYy.js → style-map-BQD5Et1D.js} +2 -2
- package/dist/{style-map-DVmWOuYy.js.map → style-map-BQD5Et1D.js.map} +1 -1
- package/dist/sub-menu.js +241 -0
- package/dist/sub-menu.js.map +1 -0
- package/dist/svg.js +273 -0
- package/dist/svg.js.map +1 -0
- package/dist/tab-group.js +188 -0
- package/dist/tab-group.js.map +1 -0
- package/dist/tab-panel.js +61 -0
- package/dist/tab-panel.js.map +1 -0
- package/dist/tab.js +658 -0
- package/dist/tab.js.map +1 -0
- package/dist/table.js +620 -0
- package/dist/table.js.map +1 -0
- package/dist/tabs.js +240 -0
- package/dist/tabs.js.map +1 -0
- package/dist/throttle-C7ZAPqtu.js +24 -0
- package/dist/throttle-C7ZAPqtu.js.map +1 -0
- package/dist/toolbar.js +9 -5
- package/dist/toolbar.js.map +1 -1
- package/dist/tooltip.js +270 -0
- package/dist/tooltip.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{unsafe-html-BsGUjx94.js → unsafe-html-Ct0N2_UU.js} +2 -2
- package/dist/{unsafe-html-BsGUjx94.js.map → unsafe-html-Ct0N2_UU.js.map} +1 -1
- package/dist/when-DEJm_QN9.js +9 -0
- package/dist/when-DEJm_QN9.js.map +1 -0
- package/package.json +4 -2
- package/readme.md +3 -3
- package/scss/mixin.scss +8 -6
- package/src/__internal/aria/aria.ts +293 -0
- package/src/__internal/aria/delegate.ts +206 -0
- package/src/__internal/events/dispatch-hooks.ts +182 -0
- package/src/__internal/mixins/element-internals.ts +73 -0
- package/src/__internal/mixins/form-associated.ts +295 -0
- package/src/__internal/mixins/form-submitter.ts +133 -0
- package/src/__internal/mixins/hyperlink.ts +71 -0
- package/src/__internal/mixins/mixin.ts +58 -0
- package/src/{__utils → __internal/utils}/observe-slot-change.ts +2 -5
- package/src/accordion/accordion-item.ts +6 -2
- package/src/accordion/accordion.ts +4 -2
- package/src/accordion/demo/index.html +95 -90
- package/src/alert/alert.scss +82 -0
- package/src/{banner/banner.ts → alert/alert.ts} +22 -22
- package/src/alert/index.ts +1 -0
- package/src/app-bar/app-bar-colors.scss +17 -0
- package/src/app-bar/app-bar.scss +165 -0
- package/src/app-bar/app-bar.ts +155 -0
- package/src/app-bar/index.ts +1 -0
- package/src/avatar/avatar.ts +4 -0
- package/src/badge/badge.ts +2 -0
- package/src/bottom-sheet/bottom-sheet.ts +8 -2
- package/src/breadcrumb/breadcrumb/breadcrumb.ts +2 -0
- package/src/breadcrumb/breadcrumb-item/breadcrumb-item.ts +3 -0
- package/src/button/ButtonTypes.ts +17 -0
- package/src/button/base-button/base-button.ts +85 -0
- package/src/button/button/button-base.scss +306 -0
- package/src/button/button/button-colors.scss +27 -32
- package/src/button/button/button-layers.scss +126 -39
- package/src/button/button/button-shapes.scss +73 -0
- package/src/button/button/button.scss +12 -284
- package/src/button/button/button.ts +174 -194
- package/src/button/button-group/button-group.scss +43 -36
- package/src/button/button-group/button-group.ts +26 -137
- package/src/{fab → button/fab}/fab-colors.scss +0 -10
- package/src/button/fab/fab-sizes.scss +37 -0
- package/src/button/fab/fab.scss +172 -0
- package/src/{fab → button/fab}/fab.ts +69 -105
- package/src/button/icon-button/icon-button-sizes.scss +18 -3
- package/src/button/icon-button/icon-button.scss +5 -0
- package/src/button/icon-button/icon-button.ts +111 -141
- package/src/button/index.ts +7 -0
- package/src/calendar/calendar.ts +2 -2
- package/src/canvas/canvas.ts +2 -2
- package/src/card/card.scss +3 -3
- package/src/card/card.ts +20 -40
- package/src/chart-bar/chart-bar.ts +2 -2
- package/src/chart-bar/chart-stacked-bar.ts +2 -2
- package/src/checkbox/checkbox.ts +12 -4
- package/src/chip/chip/chip.scss +1 -1
- package/src/chip/chip/chip.ts +35 -55
- package/src/chip/demo/index.html +30 -26
- package/src/code-editor/code-editor.ts +68 -58
- package/src/code-editor/demo/index.html +32 -27
- package/src/code-highlighter/code-highlighter.ts +1 -1
- package/src/code-highlighter/demo/index.html +24 -21
- package/src/container/container.ts +8 -2
- package/src/date-picker/date-picker.ts +2 -3
- package/src/divider/divider.ts +5 -1
- package/src/dropdown-button/demo/index.html +106 -101
- package/src/dropdown-button/dropdown-button.ts +1 -1
- package/src/elevation/elevation.ts +2 -0
- package/src/empty-state/empty-state.ts +3 -0
- package/src/field/field.ts +52 -33
- package/src/focus-ring/demo/index.html +29 -36
- package/src/focus-ring/focus-ring.ts +5 -7
- package/src/html-editor/html-editor.ts +28 -16
- package/src/icon/datasource.ts +1 -1
- package/src/icon/icon.ts +27 -15
- package/src/image/image.ts +18 -6
- package/src/index.ts +24 -6
- package/src/input/input.ts +2 -2
- package/src/item/item.scss +126 -162
- package/src/item/item.ts +70 -323
- package/src/link/link.ts +3 -1
- package/src/list/list-item.scss +43 -31
- package/src/list/list-item.ts +79 -75
- package/src/list/list.scss +1 -13
- package/src/list/list.ts +6 -3
- package/src/{peacock-loader.ts → loader.ts} +91 -79
- package/src/menu/menu/menu.scss +14 -11
- package/src/menu/menu/menu.ts +20 -8
- package/src/menu/menu-item/menu-item.scss +35 -3
- package/src/menu/menu-item/menu-item.ts +40 -34
- package/src/menu/sub-menu/sub-menu.ts +3 -0
- package/src/modal/modal.ts +2 -2
- package/src/navigation-rail/navigation-rail-item.ts +21 -36
- package/src/navigation-rail/navigation-rail.scss +1 -0
- package/src/navigation-rail/navigation-rail.ts +4 -2
- package/src/number-field/number-field.ts +2 -2
- package/src/pagination/pagination.ts +2 -0
- package/src/popover/popover.ts +3 -3
- package/src/radio/radio.ts +13 -5
- package/src/ripple/ripple.ts +14 -1
- package/src/search/search.ts +3 -3
- package/src/segmented-button/segmented-button-group.ts +8 -4
- package/src/segmented-button/segmented-button.ts +4 -0
- package/src/select/option.ts +2 -0
- package/src/side-sheet/side-sheet.ts +2 -2
- package/src/sidebar-menu/sidebar-menu-item.ts +3 -2
- package/src/skeleton/skeleton.ts +3 -0
- package/src/slider/slider.ts +4 -1
- package/src/snackbar/snackbar.ts +40 -25
- package/src/spinner/spinner.ts +2 -0
- package/src/svg/svg.ts +27 -9
- package/src/switch/switch.ts +1 -1
- package/src/table/table.ts +16 -3
- package/src/tabs/demo/index.html +79 -79
- package/src/tabs/tab-group.ts +2 -0
- package/src/tabs/tab-panel.ts +2 -0
- package/src/tabs/tab.scss +4 -4
- package/src/tabs/tab.ts +16 -39
- package/src/tabs/tabs.ts +2 -0
- package/src/textarea/textarea.ts +2 -2
- package/src/time-picker/time-picker.ts +2 -2
- package/src/toolbar/toolbar.ts +3 -3
- package/src/tooltip/tooltip.ts +14 -8
- package/src/url-field/url-field.ts +2 -3
- package/dist/ButtonConstants-D06bY4uy.js +0 -114
- package/dist/ButtonConstants-D06bY4uy.js.map +0 -1
- package/dist/NativeHyperlinkMixin-DrYXyfMQ.js.map +0 -1
- package/dist/banner.js +0 -186
- package/dist/banner.js.map +0 -1
- package/dist/button-colors-DSuBHd-i.js +0 -585
- package/dist/button-colors-DSuBHd-i.js.map +0 -1
- package/dist/icon-CueRR7wx.js +0 -260
- package/dist/icon-CueRR7wx.js.map +0 -1
- package/dist/icon-button-CYqrnMnF.js +0 -318
- package/dist/icon-button-CYqrnMnF.js.map +0 -1
- package/dist/navigation-rail-CM_svs5_.js +0 -14184
- package/dist/navigation-rail-CM_svs5_.js.map +0 -1
- package/dist/observe-slot-change-D8Xg-kSS.js.map +0 -1
- package/dist/peacock-loader.js.map +0 -1
- package/dist/popover-DUPmMVWS.js.map +0 -1
- package/dist/query-QBcUV-L_.js +0 -15
- package/dist/query-QBcUV-L_.js.map +0 -1
- package/dist/src/banner/banner.d.ts +0 -43
- package/dist/src/banner/index.d.ts +0 -1
- package/dist/src/button/GroupButtonInterface.d.ts +0 -4
- package/src/banner/banner.scss +0 -82
- package/src/banner/index.ts +0 -1
- package/src/button/GroupButtonInterface.ts +0 -4
- package/src/button/button/only-button.scss +0 -13
- package/src/fab/fab-sizes.scss +0 -37
- package/src/fab/fab.scss +0 -143
- /package/dist/src/{__controllers → __internal/controllers}/attachable-controller.d.ts +0 -0
- /package/dist/src/{__controllers → __internal/controllers}/floating-controller.d.ts +0 -0
- /package/dist/src/{__directive → __internal/directive}/spread.d.ts +0 -0
- /package/dist/src/{__mixins → __internal/mixins}/MixinConstructor.d.ts +0 -0
- /package/dist/src/{__mixins → __internal/mixins}/NativeButtonMixin.d.ts +0 -0
- /package/dist/src/{__mixins → __internal/mixins}/NativeHyperlinkMixin.d.ts +0 -0
- /package/dist/src/{__utils → __internal/utils}/cache-fetch.d.ts +0 -0
- /package/dist/src/{__utils → __internal/utils}/copy-to-clipboard.d.ts +0 -0
- /package/dist/src/{__utils → __internal/utils}/dispatch-event-utils.d.ts +0 -0
- /package/dist/src/{__utils → __internal/utils}/is-dark-mode.d.ts +0 -0
- /package/dist/src/{__utils → __internal/utils}/is-in-viewport.d.ts +0 -0
- /package/dist/src/{__utils → __internal/utils}/is-link.d.ts +0 -0
- /package/dist/src/{__utils → __internal/utils}/observe-theme-change.d.ts +0 -0
- /package/dist/src/{__utils → __internal/utils}/sanitize-svg.d.ts +0 -0
- /package/dist/src/{__utils → __internal/utils}/throttle.d.ts +0 -0
- /package/dist/src/{fab → button/fab}/index.d.ts +0 -0
- /package/dist/src/{peacock-loader.d.ts → loader.d.ts} +0 -0
- /package/dist/test/{banner.test.d.ts → alert.test.d.ts} +0 -0
- /package/src/{__controllers → __internal/controllers}/attachable-controller.ts +0 -0
- /package/src/{__controllers → __internal/controllers}/floating-controller.ts +0 -0
- /package/src/{__directive → __internal/directive}/spread.ts +0 -0
- /package/src/{__mixins → __internal/mixins}/MixinConstructor.ts +0 -0
- /package/src/{__mixins → __internal/mixins}/NativeButtonMixin.ts +0 -0
- /package/src/{__mixins → __internal/mixins}/NativeHyperlinkMixin.ts +0 -0
- /package/src/{__mixins → __internal/mixins}/README.md +0 -0
- /package/src/{__utils → __internal/utils}/cache-fetch.ts +0 -0
- /package/src/{__utils → __internal/utils}/copy-to-clipboard.ts +0 -0
- /package/src/{__utils → __internal/utils}/dispatch-event-utils.ts +0 -0
- /package/src/{__utils → __internal/utils}/is-dark-mode.ts +0 -0
- /package/src/{__utils → __internal/utils}/is-in-viewport.ts +0 -0
- /package/src/{__utils → __internal/utils}/is-link.ts +0 -0
- /package/src/{__utils → __internal/utils}/observe-theme-change.ts +0 -0
- /package/src/{__utils → __internal/utils}/sanitize-svg.ts +0 -0
- /package/src/{__utils → __internal/utils}/throttle.ts +0 -0
- /package/src/{fab → button/fab}/index.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use '../../../scss/mixin';
|
|
2
2
|
|
|
3
3
|
@include mixin.base-styles;
|
|
4
4
|
|
|
@@ -13,8 +13,10 @@
|
|
|
13
13
|
|
|
14
14
|
.menu-item {
|
|
15
15
|
width: 100%;
|
|
16
|
-
--item-
|
|
17
|
-
--item-container-shape-start-start: var(
|
|
16
|
+
--item-padding-inline: 10px;
|
|
17
|
+
--item-container-shape-start-start: var(
|
|
18
|
+
--menu-item-container-shape-start-start
|
|
19
|
+
);
|
|
18
20
|
--item-container-shape-start-end: var(--menu-item-container-shape-start-end);
|
|
19
21
|
--item-container-shape-end-start: var(--menu-item-container-shape-end-start);
|
|
20
22
|
--item-container-shape-end-end: var(--menu-item-container-shape-end-end);
|
|
@@ -32,6 +34,36 @@
|
|
|
32
34
|
--item-container-selected-color: var(--menu-item-container-selected-color);
|
|
33
35
|
--item-label-text-selected-color: var(--menu-item-label-selected-color);
|
|
34
36
|
--item-icon-size: var(--button-icon-size, var(--_button-icon-size));
|
|
37
|
+
|
|
38
|
+
.background {
|
|
39
|
+
background-color: var(--_container-color);
|
|
40
|
+
opacity: var(--_container-opacity, 1);
|
|
41
|
+
border-radius: var(--shape-corner-medium);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.focus-ring {
|
|
45
|
+
--focus-ring-container-shape-start-start: var(--shape-corner-medium);
|
|
46
|
+
--focus-ring-container-shape-start-end: var(--shape-corner-medium);
|
|
47
|
+
--focus-ring-container-shape-end-start: var(--shape-corner-medium);
|
|
48
|
+
--focus-ring-container-shape-end-end: var(--shape-corner-medium);
|
|
49
|
+
z-index: 2;
|
|
50
|
+
--focus-ring-inset: 0px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ripple {
|
|
54
|
+
--ripple-state-opacity: var(--_container-state-opacity, 0);
|
|
55
|
+
--ripple-pressed-color: var(--_container-state-color);
|
|
56
|
+
border-radius: var(--shape-corner-medium);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.skeleton {
|
|
60
|
+
z-index: 2;
|
|
61
|
+
|
|
62
|
+
--skeleton-container-shape-start-start: var(--shape-corner-medium);
|
|
63
|
+
--skeleton-container-shape-start-end: var(--shape-corner-medium);
|
|
64
|
+
--skeleton-container-shape-end-start: var(--shape-corner-medium);
|
|
65
|
+
--skeleton-container-shape-end-end: var(--shape-corner-medium);
|
|
66
|
+
}
|
|
35
67
|
}
|
|
36
68
|
|
|
37
69
|
:host([selected]) {
|
|
@@ -3,9 +3,10 @@ import { property, query } from 'lit/decorators.js';
|
|
|
3
3
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
4
4
|
import styles from './menu-item.scss';
|
|
5
5
|
import colorStyles from './menu-item-colors.scss';
|
|
6
|
-
import NativeButtonMixin from '@/
|
|
7
|
-
import NativeHyperlinkMixin from '@/
|
|
6
|
+
import NativeButtonMixin from '@/__internal/mixins/NativeButtonMixin.js';
|
|
7
|
+
import NativeHyperlinkMixin from '@/__internal/mixins/NativeHyperlinkMixin.js';
|
|
8
8
|
import { Item } from '@/item/item.js';
|
|
9
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* @label Menu Item
|
|
@@ -19,30 +20,47 @@ import { Item } from '@/item/item.js';
|
|
|
19
20
|
* <wc-menu-item>Menu Item</wc-menu-item>
|
|
20
21
|
* ```
|
|
21
22
|
*/
|
|
23
|
+
@IndividualComponent
|
|
22
24
|
export class MenuItem extends NativeButtonMixin(
|
|
23
25
|
NativeHyperlinkMixin(LitElement),
|
|
24
26
|
) {
|
|
27
|
+
// ── Static ───────────────────────────────────────────────────────────────
|
|
28
|
+
|
|
29
|
+
static styles = [styles, colorStyles];
|
|
30
|
+
|
|
31
|
+
// ── Properties ───────────────────────────────────────────────────────────
|
|
32
|
+
|
|
33
|
+
/** The value associated with this menu item, used to identify it on selection. */
|
|
25
34
|
@property({ type: String }) value = '';
|
|
26
35
|
|
|
36
|
+
/** Whether this menu item is currently selected/highlighted. */
|
|
27
37
|
@property({ type: Boolean, reflect: true }) selected = false;
|
|
28
38
|
|
|
39
|
+
/** When true, the menu stays open after this item is activated. */
|
|
29
40
|
@property({ type: Boolean, attribute: 'keep-open' }) keepOpen = false;
|
|
30
41
|
|
|
42
|
+
/** When true, indicates this item has an associated submenu. */
|
|
31
43
|
@property({ type: Boolean, attribute: 'has-submenu' }) hasSubmenu = false;
|
|
32
44
|
|
|
45
|
+
/** Whether the associated submenu is currently open. */
|
|
33
46
|
@property({ type: Boolean, attribute: 'submenu-open' }) submenuOpen = false;
|
|
34
47
|
|
|
48
|
+
/** Visual variant of the menu item. */
|
|
35
49
|
@property({ type: String, reflect: true }) variant: 'standard' | 'vibrant' =
|
|
36
50
|
'standard';
|
|
37
51
|
|
|
38
|
-
|
|
52
|
+
// ── Queries ───────────────────────────────────────────────────────────────
|
|
39
53
|
|
|
40
54
|
@query('wc-item') readonly itemElement!: Item | null;
|
|
41
55
|
|
|
56
|
+
// ── Private fields ────────────────────────────────────────────────────────
|
|
57
|
+
|
|
58
|
+
/** MutationObserver that triggers re-render when slotted content changes. */
|
|
42
59
|
private readonly _contentObserver = new MutationObserver(() => {
|
|
43
60
|
this.requestUpdate();
|
|
44
61
|
});
|
|
45
62
|
|
|
63
|
+
/** Roving tabindex value managed by the parent Menu. */
|
|
46
64
|
private _rovingTabIndex = -1;
|
|
47
65
|
|
|
48
66
|
connectedCallback() {
|
|
@@ -105,7 +123,7 @@ export class MenuItem extends NativeButtonMixin(
|
|
|
105
123
|
|
|
106
124
|
return html`
|
|
107
125
|
<wc-item
|
|
108
|
-
id="item"
|
|
126
|
+
id="menu-item"
|
|
109
127
|
class="menu-item"
|
|
110
128
|
role="menuitem"
|
|
111
129
|
tabindex=${String(this.tabIndex)}
|
|
@@ -125,43 +143,31 @@ export class MenuItem extends NativeButtonMixin(
|
|
|
125
143
|
this.hasSubmenu ? String(this.submenuOpen) : undefined,
|
|
126
144
|
)}
|
|
127
145
|
>
|
|
146
|
+
<wc-focus-ring
|
|
147
|
+
class="focus-ring"
|
|
148
|
+
for="menu-item"
|
|
149
|
+
slot="container"
|
|
150
|
+
></wc-focus-ring>
|
|
151
|
+
<div class="background" slot="container"></div>
|
|
152
|
+
<wc-ripple class="ripple" for="menu-item" slot="container"></wc-ripple>
|
|
153
|
+
|
|
128
154
|
${this.renderContent()}
|
|
129
155
|
</wc-item>
|
|
130
156
|
`;
|
|
131
157
|
}
|
|
132
158
|
|
|
133
159
|
renderContent() {
|
|
134
|
-
const hasStart = this._hasNamedSlot('start');
|
|
135
|
-
const hasOverline = this._hasNamedSlot('overline');
|
|
136
|
-
const hasHeadline = this._hasNamedSlot('headline');
|
|
137
|
-
const hasDefault = this._hasDefaultSlot();
|
|
138
|
-
const hasSupportingText = this._hasNamedSlot('supporting-text');
|
|
139
|
-
const hasTrailingSupportingText = this._hasNamedSlot(
|
|
140
|
-
'trailing-supporting-text',
|
|
141
|
-
);
|
|
142
|
-
const hasEnd = this._hasNamedSlot('end');
|
|
143
|
-
|
|
144
160
|
return html`
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
: nothing}
|
|
156
|
-
${hasTrailingSupportingText
|
|
157
|
-
? html`
|
|
158
|
-
<slot
|
|
159
|
-
name="trailing-supporting-text"
|
|
160
|
-
slot="trailing-supporting-text"
|
|
161
|
-
></slot>
|
|
162
|
-
`
|
|
163
|
-
: nothing}
|
|
164
|
-
${hasEnd ? html`<slot name="end" slot="end"></slot>` : nothing}
|
|
161
|
+
<slot name="start" slot="start"></slot>
|
|
162
|
+
<slot name="overline" slot="overline"></slot>
|
|
163
|
+
<slot name="headline" slot="headline"></slot>
|
|
164
|
+
<slot></slot>
|
|
165
|
+
<slot name="supporting-text" slot="supporting-text"></slot>
|
|
166
|
+
<slot
|
|
167
|
+
name="trailing-supporting-text"
|
|
168
|
+
slot="trailing-supporting-text"
|
|
169
|
+
></slot>
|
|
170
|
+
<slot name="end" slot="end"></slot>
|
|
165
171
|
`;
|
|
166
172
|
}
|
|
167
173
|
}
|
|
@@ -3,6 +3,7 @@ import { property, queryAssignedElements } from 'lit/decorators.js';
|
|
|
3
3
|
import styles from './sub-menu.scss';
|
|
4
4
|
import { MenuItem } from '../menu-item/menu-item.js';
|
|
5
5
|
import { Menu } from '../menu/menu.js';
|
|
6
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
6
7
|
|
|
7
8
|
let subMenuIdCounter = 0;
|
|
8
9
|
|
|
@@ -12,6 +13,7 @@ let subMenuIdCounter = 0;
|
|
|
12
13
|
* @rawTag sub-menu
|
|
13
14
|
* @summary Connects a menu item to a nested menu.
|
|
14
15
|
*/
|
|
16
|
+
@IndividualComponent
|
|
15
17
|
export class SubMenu extends LitElement {
|
|
16
18
|
static styles = [styles];
|
|
17
19
|
|
|
@@ -38,6 +40,7 @@ export class SubMenu extends LitElement {
|
|
|
38
40
|
private _closeTimeout?: number;
|
|
39
41
|
|
|
40
42
|
private _resolveAnchorElement(item: MenuItem) {
|
|
43
|
+
//@ts-ignore
|
|
41
44
|
return item.itemElement?.itemElement ?? item.itemElement ?? item;
|
|
42
45
|
}
|
|
43
46
|
|
package/src/modal/modal.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement, html, nothing } from 'lit';
|
|
1
|
+
import { LitElement, html, nothing } from 'lit';
|
|
2
2
|
import { property, state } from 'lit/decorators.js';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import IndividualComponent from '../IndividualComponent.js';
|
|
@@ -10,7 +10,7 @@ type ModalSize = 'xs' | 'sm' | 'md' | 'lg' | 'fullscreen';
|
|
|
10
10
|
* @label Modal
|
|
11
11
|
* @tag wc-modal
|
|
12
12
|
* @rawTag modal
|
|
13
|
-
* @summary A
|
|
13
|
+
* @summary A dialog/modal for displaying content in a layer above the page, with optional header, body, and footer slots.
|
|
14
14
|
*
|
|
15
15
|
* @cssprop --modal-container-color - Background color of the dialog container.
|
|
16
16
|
* @cssprop --modal-scrim-color - Color of the scrim backdrop.
|
|
@@ -4,11 +4,12 @@ import { classMap } from 'lit/directives/class-map.js';
|
|
|
4
4
|
import {
|
|
5
5
|
dispatchActivationClick,
|
|
6
6
|
isActivationClick,
|
|
7
|
-
} from '@/
|
|
8
|
-
import { observerSlotChangesWithCallback } from '@/
|
|
9
|
-
import { throttle } from '@/
|
|
10
|
-
import { isLink } from '@/
|
|
7
|
+
} from '@/__internal/utils/dispatch-event-utils.js';
|
|
8
|
+
import { observerSlotChangesWithCallback } from '@/__internal/utils/observe-slot-change.js';
|
|
9
|
+
import { throttle } from '@/__internal/utils/throttle.js';
|
|
10
|
+
import { isLink } from '@/__internal/utils/is-link.js';
|
|
11
11
|
import styles from './navigation-rail-item.scss';
|
|
12
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* @label Navigation Rail Item
|
|
@@ -28,6 +29,7 @@ import styles from './navigation-rail-item.scss';
|
|
|
28
29
|
* ```
|
|
29
30
|
* @tags navigation
|
|
30
31
|
*/
|
|
32
|
+
@IndividualComponent
|
|
31
33
|
export class NavigationRailItem extends LitElement {
|
|
32
34
|
#id = crypto.randomUUID();
|
|
33
35
|
|
|
@@ -54,17 +56,22 @@ export class NavigationRailItem extends LitElement {
|
|
|
54
56
|
/** Reason the item is disabled (shown to screen readers). */
|
|
55
57
|
@property({ attribute: 'disabled-reason' }) disabledReason: string = '';
|
|
56
58
|
|
|
57
|
-
/** Sets the delay for throttle in milliseconds.
|
|
58
|
-
@property({ type: Number }) throttleDelay =
|
|
59
|
-
|
|
60
|
-
@state() private _isPressed = false;
|
|
59
|
+
/** Sets the delay for throttle in milliseconds. When null (default), no throttle is applied. */
|
|
60
|
+
@property({ type: Number }) throttleDelay: number | null = null;
|
|
61
61
|
|
|
62
|
+
/** True when the default slot contains label content. */
|
|
62
63
|
@state() private _hasLabel = false;
|
|
63
64
|
|
|
65
|
+
/** True when the `active-icon` slot contains content. */
|
|
64
66
|
@state() private _hasActiveIcon = false;
|
|
65
67
|
|
|
66
68
|
@query('.item-element') readonly itemElement!: HTMLElement | null;
|
|
67
69
|
|
|
70
|
+
constructor() {
|
|
71
|
+
super();
|
|
72
|
+
this.addEventListener('click', this.__dispatchClickWithThrottle);
|
|
73
|
+
}
|
|
74
|
+
|
|
68
75
|
override focus() {
|
|
69
76
|
this.itemElement?.focus();
|
|
70
77
|
}
|
|
@@ -74,10 +81,12 @@ export class NavigationRailItem extends LitElement {
|
|
|
74
81
|
}
|
|
75
82
|
|
|
76
83
|
override firstUpdated() {
|
|
77
|
-
this.
|
|
78
|
-
this.
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
if (typeof this.throttleDelay === 'number') {
|
|
85
|
+
this.__dispatchClickWithThrottle = throttle(
|
|
86
|
+
this.__dispatchClick,
|
|
87
|
+
this.throttleDelay,
|
|
88
|
+
);
|
|
89
|
+
}
|
|
81
90
|
|
|
82
91
|
observerSlotChangesWithCallback(
|
|
83
92
|
this.renderRoot.querySelector('slot.label'),
|
|
@@ -116,21 +125,6 @@ export class NavigationRailItem extends LitElement {
|
|
|
116
125
|
dispatchActivationClick(this.itemElement);
|
|
117
126
|
};
|
|
118
127
|
|
|
119
|
-
__handlePress = (event: KeyboardEvent | MouseEvent) => {
|
|
120
|
-
if (this.disabled) return;
|
|
121
|
-
if (
|
|
122
|
-
event instanceof KeyboardEvent &&
|
|
123
|
-
event.type === 'keydown' &&
|
|
124
|
-
(event.key === 'Enter' || event.key === ' ')
|
|
125
|
-
) {
|
|
126
|
-
this._isPressed = true;
|
|
127
|
-
} else if (event.type === 'mousedown') {
|
|
128
|
-
this._isPressed = true;
|
|
129
|
-
} else {
|
|
130
|
-
this._isPressed = false;
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
|
|
134
128
|
__getDisabledReasonID() {
|
|
135
129
|
return this.disabled && this.disabledReason
|
|
136
130
|
? `disabled-reason-${this.#id}`
|
|
@@ -176,7 +170,6 @@ export class NavigationRailItem extends LitElement {
|
|
|
176
170
|
'item-element': true,
|
|
177
171
|
active: this.active,
|
|
178
172
|
disabled: this.disabled,
|
|
179
|
-
pressed: this._isPressed,
|
|
180
173
|
'has-label': this._hasLabel,
|
|
181
174
|
'has-active-icon': this._hasActiveIcon,
|
|
182
175
|
};
|
|
@@ -189,10 +182,6 @@ export class NavigationRailItem extends LitElement {
|
|
|
189
182
|
aria-disabled=${`${this.disabled}`}
|
|
190
183
|
aria-current=${this.active ? 'page' : nothing}
|
|
191
184
|
?aria-describedby=${this.__getDisabledReasonID()}
|
|
192
|
-
@click=${this.__dispatchClickWithThrottle}
|
|
193
|
-
@mousedown=${this.__handlePress}
|
|
194
|
-
@keydown=${this.__handlePress}
|
|
195
|
-
@keyup=${this.__handlePress}
|
|
196
185
|
>
|
|
197
186
|
${this.__renderItemContent()}
|
|
198
187
|
</button>`;
|
|
@@ -206,10 +195,6 @@ export class NavigationRailItem extends LitElement {
|
|
|
206
195
|
aria-current=${this.active ? 'page' : nothing}
|
|
207
196
|
aria-disabled=${`${this.disabled}`}
|
|
208
197
|
?aria-describedby=${this.__getDisabledReasonID()}
|
|
209
|
-
@click=${this.__dispatchClickWithThrottle}
|
|
210
|
-
@mousedown=${this.__handlePress}
|
|
211
|
-
@keydown=${this.__handlePress}
|
|
212
|
-
@keyup=${this.__handlePress}
|
|
213
198
|
>
|
|
214
199
|
${this.__renderItemContent()}
|
|
215
200
|
</a>`;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { html, LitElement, PropertyValues } from 'lit';
|
|
1
|
+
import { html, LitElement, PropertyValues } from 'lit';
|
|
2
2
|
import { property } from 'lit/decorators.js';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import styles from './navigation-rail.scss';
|
|
5
5
|
import { NavigationRailItem } from './navigation-rail-item.js';
|
|
6
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* @label Navigation Rail
|
|
9
10
|
* @tag wc-navigation-rail
|
|
10
11
|
* @rawTag navigation-rail
|
|
11
12
|
*
|
|
12
|
-
* @summary A vertical side navigation for medium-sized screens
|
|
13
|
+
* @summary A vertical side navigation for medium-sized screens,.
|
|
13
14
|
* @overview
|
|
14
15
|
* <p>Navigation rail provides access to primary destinations in an app using icons—with or without labels—on a vertical rail.</p>
|
|
15
16
|
* <p>Use navigation rail on medium-sized screens (tablets) with 3–7 destinations.</p>
|
|
@@ -43,6 +44,7 @@ import { NavigationRailItem } from './navigation-rail-item.js';
|
|
|
43
44
|
* ```
|
|
44
45
|
* @tags navigation
|
|
45
46
|
*/
|
|
47
|
+
@IndividualComponent
|
|
46
48
|
export class NavigationRail extends LitElement {
|
|
47
49
|
static styles = [styles];
|
|
48
50
|
|
|
@@ -2,8 +2,8 @@ import { html, nothing } from 'lit';
|
|
|
2
2
|
import { property, query, state } from 'lit/decorators.js';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
|
|
5
|
-
import { redispatchEvent } from '@/
|
|
6
|
-
import { spread } from '@/
|
|
5
|
+
import { redispatchEvent } from '@/__internal/utils/dispatch-event-utils.js';
|
|
6
|
+
import { spread } from '@/__internal/directive/spread.js';
|
|
7
7
|
|
|
8
8
|
import BaseInput from '../input/BaseInput.js';
|
|
9
9
|
import styles from './number-field.scss';
|
|
@@ -2,6 +2,7 @@ import { html, LitElement } from 'lit';
|
|
|
2
2
|
import type { PropertyValues } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
4
|
import styles from './pagination.scss';
|
|
5
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
5
6
|
|
|
6
7
|
const DEFAULT_PAGE_SIZES = [10, 25, 50, 100];
|
|
7
8
|
|
|
@@ -21,6 +22,7 @@ const DEFAULT_PAGE_SIZES = [10, 25, 50, 100];
|
|
|
21
22
|
* ```
|
|
22
23
|
* @tags navigation, data
|
|
23
24
|
*/
|
|
25
|
+
@IndividualComponent
|
|
24
26
|
export class Pagination extends LitElement {
|
|
25
27
|
static styles = [styles];
|
|
26
28
|
|
package/src/popover/popover.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { html, LitElement } from 'lit';
|
|
|
2
2
|
import { property } from 'lit/decorators.js';
|
|
3
3
|
import type { Placement } from '@floating-ui/dom';
|
|
4
4
|
import IndividualComponent from '@/IndividualComponent.js';
|
|
5
|
-
import { FloatingController } from '../
|
|
5
|
+
import { FloatingController } from '../__internal/controllers/floating-controller.js';
|
|
6
6
|
import styles from './popover.scss';
|
|
7
7
|
import type { PopoverContent } from './popover-content.js';
|
|
8
8
|
|
|
@@ -73,7 +73,7 @@ export class Popover extends LitElement {
|
|
|
73
73
|
// Resolve the trigger element: first light-DOM child that is NOT wc-popover-content
|
|
74
74
|
this._triggerEl =
|
|
75
75
|
(Array.from(this.children).find(
|
|
76
|
-
|
|
76
|
+
c => c.tagName.toLowerCase() !== 'wc-popover-content',
|
|
77
77
|
) as HTMLElement) ?? null;
|
|
78
78
|
|
|
79
79
|
if (!this._triggerEl || !this._contentEl) return;
|
|
@@ -89,7 +89,7 @@ export class Popover extends LitElement {
|
|
|
89
89
|
offset: this.offset,
|
|
90
90
|
trigger: triggerMode,
|
|
91
91
|
closeOnClickOutside: true,
|
|
92
|
-
onOpenChange:
|
|
92
|
+
onOpenChange: isOpen => {
|
|
93
93
|
this.open = isOpen;
|
|
94
94
|
if (this._contentEl) {
|
|
95
95
|
this._contentEl.open = isOpen;
|
package/src/radio/radio.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { html, LitElement } from 'lit';
|
|
1
|
+
import { html, LitElement } from 'lit';
|
|
2
2
|
import { property, query, state } from 'lit/decorators.js';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
|
|
5
|
-
import { spread } from '@/
|
|
5
|
+
import { spread } from '@/__internal/directive/spread.js';
|
|
6
6
|
|
|
7
7
|
import styles from './radio.scss';
|
|
8
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* @label Radio
|
|
@@ -12,7 +13,7 @@ import styles from './radio.scss';
|
|
|
12
13
|
* @rawTag radio
|
|
13
14
|
* @summary Allows selection of a single option from a set.
|
|
14
15
|
* @overview
|
|
15
|
-
* <p>Radio buttons follow the
|
|
16
|
+
* <p>Radio buttons follow the specifications with clear focus, hover, and selected states.</p>
|
|
16
17
|
*
|
|
17
18
|
* @cssprop --radio-size: Size of the outer radio circle.
|
|
18
19
|
* @cssprop --radio-dot-size: Size of the inner dot when selected.
|
|
@@ -33,6 +34,7 @@ import styles from './radio.scss';
|
|
|
33
34
|
*/
|
|
34
35
|
type RadioDirection = 1 | -1;
|
|
35
36
|
|
|
37
|
+
@IndividualComponent
|
|
36
38
|
export class Radio extends LitElement {
|
|
37
39
|
private static readonly DIRECTION_NEXT: RadioDirection = 1;
|
|
38
40
|
private static readonly DIRECTION_PREVIOUS: RadioDirection = -1;
|
|
@@ -87,15 +89,19 @@ export class Radio extends LitElement {
|
|
|
87
89
|
@property({ type: Object })
|
|
88
90
|
configAria: Record<string, string> = {};
|
|
89
91
|
|
|
92
|
+
/** True while the radio container has keyboard focus. */
|
|
90
93
|
@state()
|
|
91
94
|
private hasFocus = false;
|
|
92
95
|
|
|
96
|
+
/** True while the user is actively pressing the radio (mouse/keyboard). */
|
|
93
97
|
@state()
|
|
94
98
|
private isActive = false;
|
|
95
99
|
|
|
100
|
+
/** True when slotted label content or `label` property is present. */
|
|
96
101
|
@state()
|
|
97
102
|
private slotHasContent = false;
|
|
98
103
|
|
|
104
|
+
/** True for the one radio in the group that should receive tab focus (roving tabindex). */
|
|
99
105
|
@state()
|
|
100
106
|
private isGroupFocusTarget = false;
|
|
101
107
|
|
|
@@ -105,6 +111,9 @@ export class Radio extends LitElement {
|
|
|
105
111
|
@query('.input-native')
|
|
106
112
|
private nativeElement?: HTMLInputElement;
|
|
107
113
|
|
|
114
|
+
// ── Private fields ────────────────────────────────────────────────────────
|
|
115
|
+
|
|
116
|
+
/** Captured `tabindex` attribute value forwarded to the inner container. */
|
|
108
117
|
private tabindex?: number;
|
|
109
118
|
|
|
110
119
|
connectedCallback() {
|
|
@@ -269,8 +278,7 @@ export class Radio extends LitElement {
|
|
|
269
278
|
return;
|
|
270
279
|
}
|
|
271
280
|
|
|
272
|
-
const target =
|
|
273
|
-
enabledGroup.find(radio => radio.checked) || enabledGroup[0];
|
|
281
|
+
const target = enabledGroup.find(radio => radio.checked) || enabledGroup[0];
|
|
274
282
|
|
|
275
283
|
group.forEach(radio => {
|
|
276
284
|
radio.isGroupFocusTarget = radio === target;
|
package/src/ripple/ripple.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { LitElement, html, css, PropertyValues, isServer } from 'lit';
|
|
2
2
|
import { property, query, state } from 'lit/decorators.js';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
4
5
|
import {
|
|
5
6
|
Attachable,
|
|
6
7
|
AttachableController,
|
|
7
|
-
} from '@/
|
|
8
|
+
} from '@/__internal/controllers/attachable-controller.js';
|
|
8
9
|
|
|
9
10
|
const PRESS_GROW_MS = 450;
|
|
10
11
|
const MINIMUM_PRESS_MS = 225;
|
|
@@ -118,6 +119,7 @@ const FORCED_COLORS = window.matchMedia('(forced-colors: active)');
|
|
|
118
119
|
* ```
|
|
119
120
|
* @tags display
|
|
120
121
|
*/
|
|
122
|
+
@IndividualComponent
|
|
121
123
|
export class Ripple extends LitElement implements Attachable {
|
|
122
124
|
static styles = css`
|
|
123
125
|
:host {
|
|
@@ -190,24 +192,35 @@ export class Ripple extends LitElement implements Attachable {
|
|
|
190
192
|
*/
|
|
191
193
|
@property({ type: Boolean, reflect: true }) disabled = false;
|
|
192
194
|
|
|
195
|
+
/** True while the pointer is hovering over the host element. */
|
|
193
196
|
@state() private hovered = false;
|
|
194
197
|
|
|
198
|
+
/** True while a press animation is playing. */
|
|
195
199
|
@state() private pressed = false;
|
|
196
200
|
|
|
197
201
|
@query('.surface') private readonly mdRoot!: HTMLElement | null;
|
|
198
202
|
|
|
203
|
+
// ── Private fields ────────────────────────────────────────────────────────
|
|
204
|
+
|
|
205
|
+
/** CSS size string (e.g. `"48px"`) for the growing ripple circle. */
|
|
199
206
|
private rippleSize = '';
|
|
200
207
|
|
|
208
|
+
/** CSS scale factor applied to the ripple at the end of its animation. */
|
|
201
209
|
private rippleScale = '';
|
|
202
210
|
|
|
211
|
+
/** Pixel size of the ripple at its initial (pre-grow) state. */
|
|
203
212
|
private initialSize = 0;
|
|
204
213
|
|
|
214
|
+
/** Reference to the currently running grow animation, if any. */
|
|
205
215
|
private growAnimation?: Animation;
|
|
206
216
|
|
|
217
|
+
/** Current interaction state of the ripple state machine. */
|
|
207
218
|
private state = State.INACTIVE;
|
|
208
219
|
|
|
220
|
+
/** Pointer event that initiated the current press, used to calculate start coordinates. */
|
|
209
221
|
private rippleStartEvent?: PointerEvent;
|
|
210
222
|
|
|
223
|
+
/** Bound reference to `handleEvent` passed to `addEventListener` / `removeEventListener`. */
|
|
211
224
|
private readonly _boundHandleEvent = this.handleEvent.bind(this);
|
|
212
225
|
|
|
213
226
|
get htmlFor() {
|
package/src/search/search.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { LitElement, html, nothing } from 'lit';
|
|
1
|
+
import { LitElement, html, nothing } from 'lit';
|
|
2
2
|
import { property, query, state } from 'lit/decorators.js';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import { live } from 'lit/directives/live.js';
|
|
5
5
|
import IndividualComponent from '@/IndividualComponent.js';
|
|
6
6
|
import styles from './search.scss';
|
|
7
7
|
import colorStyles from './search-colors.scss';
|
|
8
|
-
import { observerSlotChangesWithCallback } from '@/
|
|
8
|
+
import { observerSlotChangesWithCallback } from '@/__internal/utils/observe-slot-change.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @label Search
|
|
12
12
|
* @tag wc-search
|
|
13
13
|
* @rawTag search
|
|
14
14
|
*
|
|
15
|
-
* @summary A
|
|
15
|
+
* @summary A search bar for filtering and finding content.
|
|
16
16
|
* @overview
|
|
17
17
|
* <p>The search component provides a text input designed for search interactions.
|
|
18
18
|
* It supports outlined and filled variants, an optional clear button, and leading/trailing icon slots.</p>
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { html, LitElement } from 'lit';
|
|
1
|
+
import { html, LitElement } from 'lit';
|
|
2
2
|
import { property } from 'lit/decorators.js';
|
|
3
3
|
import styles from './segmented-button-group.scss';
|
|
4
4
|
import { SegmentedButton } from './segmented-button.js';
|
|
5
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* @label Segmented Button Group
|
|
8
9
|
* @tag wc-segmented-button-group
|
|
9
10
|
* @rawTag segmented-button-group
|
|
10
|
-
* @summary A container for segmented buttons
|
|
11
|
+
* @summary A container for segmented buttons.
|
|
11
12
|
* @overview
|
|
12
|
-
* <p>Segmented buttons help people select options, switch views, or sort elements. They follow the
|
|
13
|
+
* <p>Segmented buttons help people select options, switch views, or sort elements. They follow the specification.</p>
|
|
13
14
|
* <p>Use <code>multi-select</code> to allow more than one segment to be selected at a time. By default only one segment can be active (single-select).</p>
|
|
14
15
|
*
|
|
15
16
|
* @cssprop --segmented-button-group-shape: Border-radius of the group container.
|
|
@@ -27,6 +28,7 @@ import { SegmentedButton } from './segmented-button.js';
|
|
|
27
28
|
*
|
|
28
29
|
* @tags controls
|
|
29
30
|
*/
|
|
31
|
+
@IndividualComponent
|
|
30
32
|
export class SegmentedButtonGroup extends LitElement {
|
|
31
33
|
static styles = [styles];
|
|
32
34
|
|
|
@@ -64,7 +66,9 @@ export class SegmentedButtonGroup extends LitElement {
|
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
private _getSegments(): SegmentedButton[] {
|
|
67
|
-
return Array.from(
|
|
69
|
+
return Array.from(
|
|
70
|
+
this.querySelectorAll<SegmentedButton>('wc-segmented-button'),
|
|
71
|
+
);
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
private _onSegmentChange = (ev: CustomEvent) => {
|
|
@@ -2,6 +2,7 @@ import { html, LitElement, nothing } from 'lit';
|
|
|
2
2
|
import { property, state } from 'lit/decorators.js';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import styles from './segmented-button.scss';
|
|
5
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* @label Segmented Button
|
|
@@ -31,6 +32,7 @@ import styles from './segmented-button.scss';
|
|
|
31
32
|
*
|
|
32
33
|
* @tags controls
|
|
33
34
|
*/
|
|
35
|
+
@IndividualComponent
|
|
34
36
|
export class SegmentedButton extends LitElement {
|
|
35
37
|
static styles = [styles];
|
|
36
38
|
|
|
@@ -58,9 +60,11 @@ export class SegmentedButton extends LitElement {
|
|
|
58
60
|
@property({ type: String })
|
|
59
61
|
icon?: string;
|
|
60
62
|
|
|
63
|
+
/** True while the segment has keyboard focus. */
|
|
61
64
|
@state()
|
|
62
65
|
private hasFocus = false;
|
|
63
66
|
|
|
67
|
+
/** True while the user is actively pressing the segment. */
|
|
64
68
|
@state()
|
|
65
69
|
private isActive = false;
|
|
66
70
|
|