@redvars/peacock 3.8.1 → 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 -286
- 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/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-D7sJyPy8.js +0 -586
- package/dist/button-colors-D7sJyPy8.js.map +0 -1
- package/dist/icon-CueRR7wx.js +0 -260
- package/dist/icon-CueRR7wx.js.map +0 -1
- package/dist/icon-button-CAzYr_qr.js +0 -318
- package/dist/icon-button-CAzYr_qr.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
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
@use '../../scss/mixin';
|
|
2
|
+
|
|
3
|
+
@include mixin.base-styles;
|
|
4
|
+
|
|
5
|
+
:host {
|
|
6
|
+
display: block;
|
|
7
|
+
width: 100%;
|
|
8
|
+
|
|
9
|
+
/* ---- Public custom properties ---- */
|
|
10
|
+
--app-bar-container-height: 4rem; /* 64dp */
|
|
11
|
+
--app-bar-padding-inline: 0.25rem;
|
|
12
|
+
--app-bar-shadow: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* ---- Base ---- */
|
|
16
|
+
|
|
17
|
+
.app-bar {
|
|
18
|
+
position: relative;
|
|
19
|
+
width: 100%;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
box-shadow: var(--app-bar-shadow);
|
|
22
|
+
color: var(--_app-bar-headline-color);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.background {
|
|
26
|
+
position: absolute;
|
|
27
|
+
inset: 0;
|
|
28
|
+
background-color: var(--_app-bar-container-color);
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
z-index: 0;
|
|
31
|
+
transition: background-color 200ms ease;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* ---- Row layout ---- */
|
|
35
|
+
|
|
36
|
+
.row {
|
|
37
|
+
position: relative;
|
|
38
|
+
z-index: 1;
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
padding-inline: var(--app-bar-padding-inline);
|
|
42
|
+
box-sizing: border-box;
|
|
43
|
+
width: 100%;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.row-top {
|
|
47
|
+
height: var(--app-bar-container-height);
|
|
48
|
+
gap: 0.25rem;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* ---- Slots ---- */
|
|
52
|
+
|
|
53
|
+
.leading,
|
|
54
|
+
.trailing {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
flex-shrink: 0;
|
|
58
|
+
gap: 0.25rem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.leading {
|
|
62
|
+
--icon-color: var(--_app-bar-leading-icon-color);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.trailing {
|
|
66
|
+
--icon-color: var(--_app-bar-trailing-icon-color);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.headline {
|
|
70
|
+
flex: 1;
|
|
71
|
+
min-width: 0;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
text-overflow: ellipsis;
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
font: var(--typescale-title-large-font);
|
|
76
|
+
font-size: var(--typescale-title-large-size);
|
|
77
|
+
font-weight: var(--typescale-title-large-weight);
|
|
78
|
+
line-height: var(--typescale-title-large-line-height);
|
|
79
|
+
letter-spacing: var(--typescale-title-large-tracking);
|
|
80
|
+
color: var(--_app-bar-headline-color);
|
|
81
|
+
padding-inline: 0.75rem;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* ---- Small variant (default) ---- */
|
|
85
|
+
|
|
86
|
+
:host([variant='small']),
|
|
87
|
+
:host(:not([variant])) {
|
|
88
|
+
.headline {
|
|
89
|
+
text-align: start;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* ---- Center-aligned variant ---- */
|
|
94
|
+
|
|
95
|
+
:host([variant='center-aligned']) {
|
|
96
|
+
.headline {
|
|
97
|
+
text-align: center;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* ---- Medium variant ---- */
|
|
102
|
+
|
|
103
|
+
:host([variant='medium']) {
|
|
104
|
+
.row-top {
|
|
105
|
+
.headline {
|
|
106
|
+
display: none;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.row-bottom {
|
|
111
|
+
height: 3rem; /* 48dp */
|
|
112
|
+
padding-inline: calc(var(--app-bar-padding-inline) + 1rem);
|
|
113
|
+
padding-block-end: 0.5rem;
|
|
114
|
+
align-items: flex-end;
|
|
115
|
+
|
|
116
|
+
.headline {
|
|
117
|
+
font: var(--typescale-headline-small-font, inherit);
|
|
118
|
+
font-size: var(--typescale-headline-small-size, 1.5rem);
|
|
119
|
+
font-weight: var(--typescale-headline-small-weight, 400);
|
|
120
|
+
line-height: var(--typescale-headline-small-line-height, 2rem);
|
|
121
|
+
letter-spacing: var(--typescale-headline-small-tracking, 0);
|
|
122
|
+
padding-inline: 0;
|
|
123
|
+
white-space: nowrap;
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
text-overflow: ellipsis;
|
|
126
|
+
width: 100%;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* ---- Large variant ---- */
|
|
132
|
+
|
|
133
|
+
:host([variant='large']) {
|
|
134
|
+
.row-top {
|
|
135
|
+
.headline {
|
|
136
|
+
display: none;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.row-bottom {
|
|
141
|
+
height: 5.5rem; /* 88dp */
|
|
142
|
+
padding-inline: calc(var(--app-bar-padding-inline) + 1rem);
|
|
143
|
+
padding-block-end: 1.75rem;
|
|
144
|
+
align-items: flex-end;
|
|
145
|
+
|
|
146
|
+
.headline {
|
|
147
|
+
font: var(--typescale-headline-medium-font, inherit);
|
|
148
|
+
font-size: var(--typescale-headline-medium-size, 1.75rem);
|
|
149
|
+
font-weight: var(--typescale-headline-medium-weight, 400);
|
|
150
|
+
line-height: var(--typescale-headline-medium-line-height, 2.25rem);
|
|
151
|
+
letter-spacing: var(--typescale-headline-medium-tracking, 0);
|
|
152
|
+
padding-inline: 0;
|
|
153
|
+
white-space: nowrap;
|
|
154
|
+
overflow: hidden;
|
|
155
|
+
text-overflow: ellipsis;
|
|
156
|
+
width: 100%;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* ---- Scrolled state ---- */
|
|
162
|
+
|
|
163
|
+
:host([scrolled]) {
|
|
164
|
+
--app-bar-shadow: var(--elevation-shadow-level-2, 0 2px 4px rgba(0, 0, 0, 0.12));
|
|
165
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { LitElement, html } from 'lit';
|
|
2
|
+
import { property } from 'lit/decorators.js';
|
|
3
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
5
|
+
import styles from './app-bar.scss';
|
|
6
|
+
import colorStyles from './app-bar-colors.scss';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @label App Bar
|
|
10
|
+
* @tag wc-app-bar
|
|
11
|
+
* @rawTag app-bar
|
|
12
|
+
*
|
|
13
|
+
* @summary A top app bar for page-level navigation and actions.
|
|
14
|
+
* @overview
|
|
15
|
+
* <p>The app bar component implements the top app bar pattern. It provides a
|
|
16
|
+
* consistent header for screens, housing a navigation icon, a page title/headline, and
|
|
17
|
+
* optional trailing action icons.</p>
|
|
18
|
+
*
|
|
19
|
+
* <p>Four size variants are available: <strong>small</strong> (64dp, single-row),
|
|
20
|
+
* <strong>center-aligned</strong> (64dp, centred headline), <strong>medium</strong>
|
|
21
|
+
* (112dp, headline below the row), and <strong>large</strong> (152dp, large headline).</p>
|
|
22
|
+
*
|
|
23
|
+
* <p>Use the <code>leading</code> slot for a navigation icon (e.g. a hamburger or back
|
|
24
|
+
* button), the default slot for the headline text, and the <code>trailing</code> slot for
|
|
25
|
+
* action icon buttons.</p>
|
|
26
|
+
*
|
|
27
|
+
* @slot leading - Navigation icon placed at the start of the bar.
|
|
28
|
+
* @slot - Headline / title text.
|
|
29
|
+
* @slot trailing - Trailing action icon buttons placed at the end of the bar.
|
|
30
|
+
*
|
|
31
|
+
* @cssprop --app-bar-container-color - Background color of the app bar.
|
|
32
|
+
* @cssprop --app-bar-container-height - Height of the bar in small / center-aligned variants.
|
|
33
|
+
* @cssprop --app-bar-headline-color - Color of the headline text.
|
|
34
|
+
* @cssprop --app-bar-leading-icon-color - Color of the leading slot icons.
|
|
35
|
+
* @cssprop --app-bar-trailing-icon-color - Color of the trailing slot icons.
|
|
36
|
+
* @cssprop --app-bar-shadow - Box-shadow applied when the bar is scrolled / elevated.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```html
|
|
40
|
+
* <!-- Small app bar (default) -->
|
|
41
|
+
* <wc-app-bar>
|
|
42
|
+
* <wc-icon-button slot="leading" variant="text"><wc-icon name="menu"></wc-icon></wc-icon-button>
|
|
43
|
+
* Page Title
|
|
44
|
+
* <wc-icon-button slot="trailing" variant="text"><wc-icon name="search"></wc-icon></wc-icon-button>
|
|
45
|
+
* <wc-icon-button slot="trailing" variant="text"><wc-icon name="more_vert"></wc-icon></wc-icon-button>
|
|
46
|
+
* </wc-app-bar>
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```html
|
|
51
|
+
* <!-- Center-aligned app bar -->
|
|
52
|
+
* <wc-app-bar variant="center-aligned">
|
|
53
|
+
* <wc-icon-button slot="leading" variant="text"><wc-icon name="arrow_back"></wc-icon></wc-icon-button>
|
|
54
|
+
* Details
|
|
55
|
+
* <wc-icon-button slot="trailing" variant="text"><wc-icon name="more_vert"></wc-icon></wc-icon-button>
|
|
56
|
+
* </wc-app-bar>
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```html
|
|
61
|
+
* <!-- Medium app bar -->
|
|
62
|
+
* <wc-app-bar variant="medium">
|
|
63
|
+
* <wc-icon-button slot="leading" variant="text"><wc-icon name="menu"></wc-icon></wc-icon-button>
|
|
64
|
+
* Medium Headline
|
|
65
|
+
* <wc-icon-button slot="trailing" variant="text"><wc-icon name="search"></wc-icon></wc-icon-button>
|
|
66
|
+
* </wc-app-bar>
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```html
|
|
71
|
+
* <!-- Large app bar -->
|
|
72
|
+
* <wc-app-bar variant="large">
|
|
73
|
+
* <wc-icon-button slot="leading" variant="text"><wc-icon name="arrow_back"></wc-icon></wc-icon-button>
|
|
74
|
+
* Large Headline
|
|
75
|
+
* <wc-icon-button slot="trailing" variant="text"><wc-icon name="more_vert"></wc-icon></wc-icon-button>
|
|
76
|
+
* </wc-app-bar>
|
|
77
|
+
* ```
|
|
78
|
+
* @tags navigation display
|
|
79
|
+
*/
|
|
80
|
+
@IndividualComponent
|
|
81
|
+
export class AppBar extends LitElement {
|
|
82
|
+
static styles = [styles, colorStyles];
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Visual variant of the app bar.
|
|
86
|
+
* - `"small"`: 64dp single-row bar with leading, title, and trailing (default).
|
|
87
|
+
* - `"center-aligned"`: 64dp single-row bar with a centred headline.
|
|
88
|
+
* - `"medium"`: Two-row bar (64dp top row + 48dp headline row).
|
|
89
|
+
* - `"large"`: Two-row bar with a larger headline (64dp top row + 88dp headline row).
|
|
90
|
+
*/
|
|
91
|
+
@property({ type: String, reflect: true })
|
|
92
|
+
variant: 'small' | 'center-aligned' | 'medium' | 'large' = 'small';
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Whether the bar is in its scrolled state, which adds a shadow and optionally
|
|
96
|
+
* changes the container color to indicate elevation above page content.
|
|
97
|
+
*/
|
|
98
|
+
@property({ type: Boolean, reflect: true })
|
|
99
|
+
scrolled: boolean = false;
|
|
100
|
+
|
|
101
|
+
override render() {
|
|
102
|
+
const isTwoRow = this.variant === 'medium' || this.variant === 'large';
|
|
103
|
+
|
|
104
|
+
const cssClasses = {
|
|
105
|
+
'app-bar': true,
|
|
106
|
+
[`variant-${this.variant}`]: true,
|
|
107
|
+
scrolled: this.scrolled,
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
if (isTwoRow) {
|
|
111
|
+
return this.__renderTwoRow(cssClasses);
|
|
112
|
+
}
|
|
113
|
+
return this.__renderSingleRow(cssClasses);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
private __renderSingleRow(cssClasses: Record<string, boolean>) {
|
|
117
|
+
return html`
|
|
118
|
+
<header class=${classMap(cssClasses)} role="banner">
|
|
119
|
+
<div class="background"></div>
|
|
120
|
+
<div class="row row-top">
|
|
121
|
+
<div class="leading">
|
|
122
|
+
<slot name="leading"></slot>
|
|
123
|
+
</div>
|
|
124
|
+
<div class="headline">
|
|
125
|
+
<slot></slot>
|
|
126
|
+
</div>
|
|
127
|
+
<div class="trailing">
|
|
128
|
+
<slot name="trailing"></slot>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</header>
|
|
132
|
+
`;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
private __renderTwoRow(cssClasses: Record<string, boolean>) {
|
|
136
|
+
return html`
|
|
137
|
+
<header class=${classMap(cssClasses)} role="banner">
|
|
138
|
+
<div class="background"></div>
|
|
139
|
+
<div class="row row-top">
|
|
140
|
+
<div class="leading">
|
|
141
|
+
<slot name="leading"></slot>
|
|
142
|
+
</div>
|
|
143
|
+
<div class="trailing">
|
|
144
|
+
<slot name="trailing"></slot>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
<div class="row row-bottom">
|
|
148
|
+
<div class="headline">
|
|
149
|
+
<slot></slot>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</header>
|
|
153
|
+
`;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AppBar } from './app-bar.js';
|
package/src/avatar/avatar.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { html, LitElement } 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 './avatar.scss';
|
|
5
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* @label Avatar
|
|
@@ -22,11 +23,14 @@ import styles from './avatar.scss';
|
|
|
22
23
|
*
|
|
23
24
|
* @tags display
|
|
24
25
|
*/
|
|
26
|
+
@IndividualComponent
|
|
25
27
|
export class Avatar extends LitElement {
|
|
26
28
|
static styles = [styles];
|
|
27
29
|
|
|
30
|
+
/** Full name of the person. Used to derive initials when no `src` is provided. */
|
|
28
31
|
@property({ type: String, reflect: true }) name: string = '';
|
|
29
32
|
|
|
33
|
+
/** URL of the avatar image. When provided, the image is displayed instead of initials. */
|
|
30
34
|
@property({ type: String, reflect: true }) src?: string;
|
|
31
35
|
|
|
32
36
|
render() {
|
package/src/badge/badge.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { html, LitElement } 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 './badge.scss';
|
|
5
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* @label Badge
|
|
@@ -17,6 +18,7 @@ import styles from './badge.scss';
|
|
|
17
18
|
* ```
|
|
18
19
|
* @tags display
|
|
19
20
|
*/
|
|
21
|
+
@IndividualComponent
|
|
20
22
|
export class Badge extends LitElement {
|
|
21
23
|
static styles = [styles];
|
|
22
24
|
|
|
@@ -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';
|
|
@@ -8,7 +8,7 @@ import styles from './bottom-sheet.scss';
|
|
|
8
8
|
* @label Bottom Sheet
|
|
9
9
|
* @tag wc-bottom-sheet
|
|
10
10
|
* @rawTag bottom-sheet
|
|
11
|
-
* @summary Bottom sheets slide up from the bottom of the screen to reveal additional content. Supports standard and modal variants
|
|
11
|
+
* @summary Bottom sheets slide up from the bottom of the screen to reveal additional content. Supports standard and modal variants.
|
|
12
12
|
*
|
|
13
13
|
* @cssprop --bottom-sheet-container-color - Background color of the sheet container.
|
|
14
14
|
* @cssprop --bottom-sheet-scrim-color - Color of the modal scrim overlay.
|
|
@@ -40,7 +40,9 @@ export class BottomSheet extends LitElement {
|
|
|
40
40
|
@property({ type: Boolean, attribute: 'show-handle' }) showHandle = true;
|
|
41
41
|
|
|
42
42
|
@state() private _dragging = false;
|
|
43
|
+
|
|
43
44
|
@state() private _dragStartY = 0;
|
|
45
|
+
|
|
44
46
|
@state() private _dragOffsetY = 0;
|
|
45
47
|
|
|
46
48
|
show() {
|
|
@@ -99,6 +101,9 @@ export class BottomSheet extends LitElement {
|
|
|
99
101
|
? html`<div
|
|
100
102
|
class=${classMap({ scrim: true, visible: this.open })}
|
|
101
103
|
@click=${this._handleScrimClick}
|
|
104
|
+
@keydown=${(e: KeyboardEvent) => {
|
|
105
|
+
if (e.key === 'Escape') this._close('esc');
|
|
106
|
+
}}
|
|
102
107
|
></div>`
|
|
103
108
|
: nothing}
|
|
104
109
|
|
|
@@ -111,6 +116,7 @@ export class BottomSheet extends LitElement {
|
|
|
111
116
|
})}
|
|
112
117
|
style=${translateY ? `transform: translateY(${translateY})` : ''}
|
|
113
118
|
role="dialog"
|
|
119
|
+
aria-label="${this.ariaLabel ?? 'Bottom sheet'}"
|
|
114
120
|
aria-modal=${this.variant === 'modal' ? 'true' : 'false'}
|
|
115
121
|
aria-hidden=${!this.open ? 'true' : 'false'}
|
|
116
122
|
>
|
|
@@ -2,6 +2,7 @@ import { html, LitElement } from 'lit';
|
|
|
2
2
|
import { property } from 'lit/decorators.js';
|
|
3
3
|
import styles from './breadcrumb.scss';
|
|
4
4
|
import { BreadcrumbItem } from '../breadcrumb-item/breadcrumb-item.js';
|
|
5
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* @label Breadcrumb
|
|
@@ -23,6 +24,7 @@ import { BreadcrumbItem } from '../breadcrumb-item/breadcrumb-item.js';
|
|
|
23
24
|
* </wc-breadcrumb>
|
|
24
25
|
* ```
|
|
25
26
|
*/
|
|
27
|
+
@IndividualComponent
|
|
26
28
|
export class Breadcrumb extends LitElement {
|
|
27
29
|
static styles = [styles];
|
|
28
30
|
|
|
@@ -3,6 +3,7 @@ import { property, state } from 'lit/decorators.js';
|
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
import styles from './breadcrumb-item.scss';
|
|
6
|
+
import IndividualComponent from '@/IndividualComponent.js';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* @label Breadcrumb Item
|
|
@@ -16,6 +17,7 @@ import styles from './breadcrumb-item.scss';
|
|
|
16
17
|
* <wc-breadcrumb-item href="#">Home</wc-breadcrumb-item>
|
|
17
18
|
* ```
|
|
18
19
|
*/
|
|
20
|
+
@IndividualComponent
|
|
19
21
|
export class BreadcrumbItem extends LitElement {
|
|
20
22
|
static styles = [styles];
|
|
21
23
|
|
|
@@ -39,6 +41,7 @@ export class BreadcrumbItem extends LitElement {
|
|
|
39
41
|
*/
|
|
40
42
|
@property({ type: String }) separator?: string;
|
|
41
43
|
|
|
44
|
+
/** 1-based position among sibling breadcrumb items, used for schema.org `ListItem` metadata. */
|
|
42
45
|
@state()
|
|
43
46
|
private position = 1;
|
|
44
47
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2
|
+
export type ButtonLevel = 'primary' | 'secondary' | 'tertiary' | 'danger';
|
|
3
|
+
export type ButtonShape = 'round' | 'square';
|
|
4
|
+
export type ButtonVariant =
|
|
5
|
+
| 'elevated'
|
|
6
|
+
| 'filled'
|
|
7
|
+
| 'tonal'
|
|
8
|
+
| 'outlined'
|
|
9
|
+
| 'text'
|
|
10
|
+
| 'neo';
|
|
11
|
+
export type ButtonColor =
|
|
12
|
+
| 'primary'
|
|
13
|
+
| 'success'
|
|
14
|
+
| 'danger'
|
|
15
|
+
| 'warning'
|
|
16
|
+
| 'surface'
|
|
17
|
+
| 'on-surface';
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import { property } from 'lit/decorators.js';
|
|
3
|
+
import { WithElementInternals } from '@/__internal/mixins/element-internals.js';
|
|
4
|
+
import { throttle } from '@/__internal/utils/throttle.js';
|
|
5
|
+
import { MixinBase, MixinReturn } from '@/__internal/mixins/mixin.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 1. Define an interface for the members the mixin adds.
|
|
9
|
+
* This makes the type annotation much cleaner.
|
|
10
|
+
*/
|
|
11
|
+
export interface BaseButton {
|
|
12
|
+
variant: string;
|
|
13
|
+
|
|
14
|
+
color: string;
|
|
15
|
+
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
|
|
18
|
+
softDisabled: boolean;
|
|
19
|
+
|
|
20
|
+
disabledReason: string;
|
|
21
|
+
|
|
22
|
+
throttleDelay?: number;
|
|
23
|
+
|
|
24
|
+
__dispatchClickWithThrottle: (event: MouseEvent | KeyboardEvent) => void;
|
|
25
|
+
|
|
26
|
+
__dispatchClick: (event: MouseEvent | KeyboardEvent) => void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function mixinBaseButton<
|
|
30
|
+
T extends MixinBase<LitElement & WithElementInternals>,
|
|
31
|
+
>(base: T): MixinReturn<T, BaseButton> {
|
|
32
|
+
abstract class BaseButtonElement extends base implements BaseButton {
|
|
33
|
+
@property({ type: String, reflect: true })
|
|
34
|
+
variant: string = '';
|
|
35
|
+
|
|
36
|
+
@property({ type: String, reflect: true })
|
|
37
|
+
color: string = '';
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* When `true`, the button is disabled and cannot be interacted with. Reflects to the `disabled` attribute. Defaults to `false`.
|
|
41
|
+
*/
|
|
42
|
+
@property({ type: Boolean, reflect: true })
|
|
43
|
+
disabled: boolean = false;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* When `true`, the button is visually styled as disabled and cannot be interacted with, but remains focusable.
|
|
47
|
+
* Use this in combination with `disabledReason` to communicate why the button is unavailable.
|
|
48
|
+
* Reflects to the `soft-disabled` attribute. Defaults to `false`.
|
|
49
|
+
*/
|
|
50
|
+
@property({ type: Boolean, reflect: true, attribute: 'soft-disabled' })
|
|
51
|
+
softDisabled: boolean = false;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A human-readable explanation of why the button is disabled or soft-disabled.
|
|
55
|
+
* Rendered as a visually hidden tooltip and linked via `aria-describedby` for accessibility.
|
|
56
|
+
* Maps to the `disabled-reason` attribute.
|
|
57
|
+
*/
|
|
58
|
+
@property({ attribute: 'disabled-reason' })
|
|
59
|
+
disabledReason: string = '';
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Sets the delay for throttle in milliseconds. When undefined (default), no throttle is applied.
|
|
63
|
+
*/
|
|
64
|
+
@property() throttleDelay?: number;
|
|
65
|
+
|
|
66
|
+
__dispatchClickWithThrottle: (event: MouseEvent | KeyboardEvent) => void =
|
|
67
|
+
event => {
|
|
68
|
+
this.__dispatchClick(event);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
abstract __dispatchClick: (event: MouseEvent | KeyboardEvent) => void;
|
|
72
|
+
|
|
73
|
+
override firstUpdated(changedProperties: PropertyValues) {
|
|
74
|
+
super.firstUpdated(changedProperties);
|
|
75
|
+
if (typeof this.throttleDelay === 'number') {
|
|
76
|
+
this.__dispatchClickWithThrottle = throttle(
|
|
77
|
+
this.__dispatchClick,
|
|
78
|
+
this.throttleDelay,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return BaseButtonElement;
|
|
85
|
+
}
|