placer-toolkit 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +9 -0
- package/README.md +66 -0
- package/dist/animations/attention_seekers/bounce.d.ts +16 -0
- package/dist/animations/attention_seekers/bounce.js +45 -0
- package/dist/animations/attention_seekers/flash.d.ts +4 -0
- package/dist/animations/attention_seekers/flash.js +9 -0
- package/dist/animations/attention_seekers/headShake.d.ts +4 -0
- package/dist/animations/attention_seekers/headShake.js +10 -0
- package/dist/animations/attention_seekers/heartBeat.d.ts +4 -0
- package/dist/animations/attention_seekers/heartBeat.js +9 -0
- package/dist/animations/attention_seekers/jello.d.ts +4 -0
- package/dist/animations/attention_seekers/jello.js +17 -0
- package/dist/animations/attention_seekers/pulse.d.ts +4 -0
- package/dist/animations/attention_seekers/pulse.js +7 -0
- package/dist/animations/attention_seekers/rubberBand.d.ts +4 -0
- package/dist/animations/attention_seekers/rubberBand.js +11 -0
- package/dist/animations/attention_seekers/shake.d.ts +4 -0
- package/dist/animations/attention_seekers/shake.js +15 -0
- package/dist/animations/attention_seekers/shakeX.d.ts +4 -0
- package/dist/animations/attention_seekers/shakeX.js +15 -0
- package/dist/animations/attention_seekers/shakeY.d.ts +4 -0
- package/dist/animations/attention_seekers/shakeY.js +15 -0
- package/dist/animations/attention_seekers/swing.d.ts +4 -0
- package/dist/animations/attention_seekers/swing.js +9 -0
- package/dist/animations/attention_seekers/tada.d.ts +4 -0
- package/dist/animations/attention_seekers/tada.js +42 -0
- package/dist/animations/attention_seekers/wobble.d.ts +4 -0
- package/dist/animations/attention_seekers/wobble.js +26 -0
- package/dist/animations/back_entrances/backInDown.d.ts +5 -0
- package/dist/animations/back_entrances/backInDown.js +7 -0
- package/dist/animations/back_entrances/backInLeft.d.ts +5 -0
- package/dist/animations/back_entrances/backInLeft.js +7 -0
- package/dist/animations/back_entrances/backInRight.d.ts +5 -0
- package/dist/animations/back_entrances/backInRight.js +7 -0
- package/dist/animations/back_entrances/backInUp.d.ts +5 -0
- package/dist/animations/back_entrances/backInUp.js +7 -0
- package/dist/animations/back_exits/backOutDown.d.ts +5 -0
- package/dist/animations/back_exits/backOutDown.js +7 -0
- package/dist/animations/back_exits/backOutLeft.d.ts +5 -0
- package/dist/animations/back_exits/backOutLeft.js +7 -0
- package/dist/animations/back_exits/backOutRight.d.ts +5 -0
- package/dist/animations/back_exits/backOutRight.js +7 -0
- package/dist/animations/back_exits/backOutUp.d.ts +5 -0
- package/dist/animations/back_exits/backOutUp.js +7 -0
- package/dist/animations/bouncing_entrances/bounceIn.d.ts +16 -0
- package/dist/animations/bouncing_entrances/bounceIn.js +16 -0
- package/dist/animations/bouncing_entrances/bounceInDown.d.ts +16 -0
- package/dist/animations/bouncing_entrances/bounceInDown.js +22 -0
- package/dist/animations/bouncing_entrances/bounceInLeft.d.ts +16 -0
- package/dist/animations/bouncing_entrances/bounceInLeft.js +22 -0
- package/dist/animations/bouncing_entrances/bounceInRight.d.ts +16 -0
- package/dist/animations/bouncing_entrances/bounceInRight.js +22 -0
- package/dist/animations/bouncing_entrances/bounceInUp.d.ts +16 -0
- package/dist/animations/bouncing_entrances/bounceInUp.js +22 -0
- package/dist/animations/bouncing_exits/bounceOut.d.ts +9 -0
- package/dist/animations/bouncing_exits/bounceOut.js +8 -0
- package/dist/animations/bouncing_exits/bounceOutDown.d.ts +9 -0
- package/dist/animations/bouncing_exits/bounceOutDown.js +20 -0
- package/dist/animations/bouncing_exits/bounceOutLeft.d.ts +5 -0
- package/dist/animations/bouncing_exits/bounceOutLeft.js +14 -0
- package/dist/animations/bouncing_exits/bounceOutRight.d.ts +5 -0
- package/dist/animations/bouncing_exits/bounceOutRight.js +14 -0
- package/dist/animations/bouncing_exits/bounceOutUp.d.ts +9 -0
- package/dist/animations/bouncing_exits/bounceOutUp.js +20 -0
- package/dist/animations/easings/easings.d.ts +31 -0
- package/dist/animations/easings/easings.js +33 -0
- package/dist/animations/fading_entrances/fadeIn.d.ts +4 -0
- package/dist/animations/fading_entrances/fadeIn.js +6 -0
- package/dist/animations/fading_entrances/fadeInBottomLeft.d.ts +5 -0
- package/dist/animations/fading_entrances/fadeInBottomLeft.js +6 -0
- package/dist/animations/fading_entrances/fadeInBottomRight.d.ts +5 -0
- package/dist/animations/fading_entrances/fadeInBottomRight.js +6 -0
- package/dist/animations/fading_entrances/fadeInDown.d.ts +5 -0
- package/dist/animations/fading_entrances/fadeInDown.js +6 -0
- package/dist/animations/fading_entrances/fadeInDownBig.d.ts +5 -0
- package/dist/animations/fading_entrances/fadeInDownBig.js +6 -0
- package/dist/animations/fading_entrances/fadeInLeft.d.ts +5 -0
- package/dist/animations/fading_entrances/fadeInLeft.js +6 -0
- package/dist/animations/fading_entrances/fadeInLeftBig.d.ts +5 -0
- package/dist/animations/fading_entrances/fadeInLeftBig.js +6 -0
- package/dist/animations/fading_entrances/fadeInRight.d.ts +5 -0
- package/dist/animations/fading_entrances/fadeInRight.js +6 -0
- package/dist/animations/fading_entrances/fadeInRightBig.d.ts +5 -0
- package/dist/animations/fading_entrances/fadeInRightBig.js +6 -0
- package/dist/animations/fading_entrances/fadeInTopLeft.d.ts +5 -0
- package/dist/animations/fading_entrances/fadeInTopLeft.js +6 -0
- package/dist/animations/fading_entrances/fadeInTopRight.d.ts +5 -0
- package/dist/animations/fading_entrances/fadeInTopRight.js +6 -0
- package/dist/animations/fading_entrances/fadeInUp.d.ts +5 -0
- package/dist/animations/fading_entrances/fadeInUp.js +6 -0
- package/dist/animations/fading_entrances/fadeInUpBig.d.ts +5 -0
- package/dist/animations/fading_entrances/fadeInUpBig.js +6 -0
- package/dist/animations/fading_exits/fadeOut.d.ts +4 -0
- package/dist/animations/fading_exits/fadeOut.js +6 -0
- package/dist/animations/fading_exits/fadeOutBottomLeft.d.ts +5 -0
- package/dist/animations/fading_exits/fadeOutBottomLeft.js +6 -0
- package/dist/animations/fading_exits/fadeOutBottomRight.d.ts +5 -0
- package/dist/animations/fading_exits/fadeOutBottomRight.js +6 -0
- package/dist/animations/fading_exits/fadeOutDown.d.ts +9 -0
- package/dist/animations/fading_exits/fadeOutDown.js +6 -0
- package/dist/animations/fading_exits/fadeOutDownBig.d.ts +9 -0
- package/dist/animations/fading_exits/fadeOutDownBig.js +6 -0
- package/dist/animations/fading_exits/fadeOutLeft.d.ts +9 -0
- package/dist/animations/fading_exits/fadeOutLeft.js +6 -0
- package/dist/animations/fading_exits/fadeOutLeftBig.d.ts +9 -0
- package/dist/animations/fading_exits/fadeOutLeftBig.js +6 -0
- package/dist/animations/fading_exits/fadeOutRight.d.ts +9 -0
- package/dist/animations/fading_exits/fadeOutRight.js +6 -0
- package/dist/animations/fading_exits/fadeOutRightBig.d.ts +9 -0
- package/dist/animations/fading_exits/fadeOutRightBig.js +6 -0
- package/dist/animations/fading_exits/fadeOutTopLeft.d.ts +5 -0
- package/dist/animations/fading_exits/fadeOutTopLeft.js +6 -0
- package/dist/animations/fading_exits/fadeOutTopRight.d.ts +5 -0
- package/dist/animations/fading_exits/fadeOutTopRight.js +6 -0
- package/dist/animations/fading_exits/fadeOutUp.d.ts +9 -0
- package/dist/animations/fading_exits/fadeOutUp.js +6 -0
- package/dist/animations/fading_exits/fadeOutUpBig.d.ts +9 -0
- package/dist/animations/fading_exits/fadeOutUpBig.js +6 -0
- package/dist/animations/flippers/flip.d.ts +5 -0
- package/dist/animations/flippers/flip.js +29 -0
- package/dist/animations/flippers/flipInX.d.ts +21 -0
- package/dist/animations/flippers/flipInX.js +22 -0
- package/dist/animations/flippers/flipInY.d.ts +21 -0
- package/dist/animations/flippers/flipInY.js +22 -0
- package/dist/animations/flippers/flipOutX.d.ts +9 -0
- package/dist/animations/flippers/flipOutX.js +15 -0
- package/dist/animations/flippers/flipOutY.d.ts +9 -0
- package/dist/animations/flippers/flipOutY.js +15 -0
- package/dist/animations/index.d.ts +99 -0
- package/dist/animations/index.js +101 -0
- package/dist/animations/lightspeed/lightSpeedInLeft.d.ts +9 -0
- package/dist/animations/lightspeed/lightSpeedInLeft.js +12 -0
- package/dist/animations/lightspeed/lightSpeedInRight.d.ts +9 -0
- package/dist/animations/lightspeed/lightSpeedInRight.js +12 -0
- package/dist/animations/lightspeed/lightSpeedOutLeft.d.ts +9 -0
- package/dist/animations/lightspeed/lightSpeedOutLeft.js +10 -0
- package/dist/animations/lightspeed/lightSpeedOutRight.d.ts +9 -0
- package/dist/animations/lightspeed/lightSpeedOutRight.js +10 -0
- package/dist/animations/rotating_entrances/rotateIn.d.ts +5 -0
- package/dist/animations/rotating_entrances/rotateIn.js +6 -0
- package/dist/animations/rotating_entrances/rotateInDownLeft.d.ts +5 -0
- package/dist/animations/rotating_entrances/rotateInDownLeft.js +6 -0
- package/dist/animations/rotating_entrances/rotateInDownRight.d.ts +5 -0
- package/dist/animations/rotating_entrances/rotateInDownRight.js +6 -0
- package/dist/animations/rotating_entrances/rotateInUpLeft.d.ts +5 -0
- package/dist/animations/rotating_entrances/rotateInUpLeft.js +6 -0
- package/dist/animations/rotating_entrances/rotateInUpRight.d.ts +5 -0
- package/dist/animations/rotating_entrances/rotateInUpRight.js +6 -0
- package/dist/animations/rotating_exits/rotateOut.d.ts +9 -0
- package/dist/animations/rotating_exits/rotateOut.js +6 -0
- package/dist/animations/rotating_exits/rotateOutDownLeft.d.ts +9 -0
- package/dist/animations/rotating_exits/rotateOutDownLeft.js +6 -0
- package/dist/animations/rotating_exits/rotateOutDownRight.d.ts +9 -0
- package/dist/animations/rotating_exits/rotateOutDownRight.js +6 -0
- package/dist/animations/rotating_exits/rotateOutUpLeft.d.ts +9 -0
- package/dist/animations/rotating_exits/rotateOutUpLeft.js +6 -0
- package/dist/animations/rotating_exits/rotateOutUpRight.d.ts +9 -0
- package/dist/animations/rotating_exits/rotateOutUpRight.js +6 -0
- package/dist/animations/sliding_entrances/slideInDown.d.ts +9 -0
- package/dist/animations/sliding_entrances/slideInDown.js +6 -0
- package/dist/animations/sliding_entrances/slideInLeft.d.ts +9 -0
- package/dist/animations/sliding_entrances/slideInLeft.js +6 -0
- package/dist/animations/sliding_entrances/slideInRight.d.ts +9 -0
- package/dist/animations/sliding_entrances/slideInRight.js +6 -0
- package/dist/animations/sliding_entrances/slideInUp.d.ts +9 -0
- package/dist/animations/sliding_entrances/slideInUp.js +6 -0
- package/dist/animations/sliding_exits/slideOutDown.d.ts +9 -0
- package/dist/animations/sliding_exits/slideOutDown.js +6 -0
- package/dist/animations/sliding_exits/slideOutLeft.d.ts +9 -0
- package/dist/animations/sliding_exits/slideOutLeft.js +6 -0
- package/dist/animations/sliding_exits/slideOutRight.d.ts +9 -0
- package/dist/animations/sliding_exits/slideOutRight.js +6 -0
- package/dist/animations/sliding_exits/slideOutUp.d.ts +9 -0
- package/dist/animations/sliding_exits/slideOutUp.js +6 -0
- package/dist/animations/specials/hinge.d.ts +21 -0
- package/dist/animations/specials/hinge.js +28 -0
- package/dist/animations/specials/jackInTheBox.d.ts +16 -0
- package/dist/animations/specials/jackInTheBox.js +13 -0
- package/dist/animations/specials/rollIn.d.ts +5 -0
- package/dist/animations/specials/rollIn.js +10 -0
- package/dist/animations/specials/rollOut.d.ts +9 -0
- package/dist/animations/specials/rollOut.js +10 -0
- package/dist/animations/zooming_entrances/zoomIn.d.ts +9 -0
- package/dist/animations/zooming_entrances/zoomIn.js +6 -0
- package/dist/animations/zooming_entrances/zoomInDown.d.ts +6 -0
- package/dist/animations/zooming_entrances/zoomInDown.js +16 -0
- package/dist/animations/zooming_entrances/zoomInLeft.d.ts +6 -0
- package/dist/animations/zooming_entrances/zoomInLeft.js +16 -0
- package/dist/animations/zooming_entrances/zoomInRight.d.ts +6 -0
- package/dist/animations/zooming_entrances/zoomInRight.js +16 -0
- package/dist/animations/zooming_entrances/zoomInUp.d.ts +6 -0
- package/dist/animations/zooming_entrances/zoomInUp.js +16 -0
- package/dist/animations/zooming_exits/zoomOut.d.ts +9 -0
- package/dist/animations/zooming_exits/zoomOut.js +7 -0
- package/dist/animations/zooming_exits/zoomOutDown.d.ts +6 -0
- package/dist/animations/zooming_exits/zoomOutDown.js +16 -0
- package/dist/animations/zooming_exits/zoomOutLeft.d.ts +5 -0
- package/dist/animations/zooming_exits/zoomOutLeft.js +14 -0
- package/dist/animations/zooming_exits/zoomOutRight.d.ts +5 -0
- package/dist/animations/zooming_exits/zoomOutRight.js +14 -0
- package/dist/animations/zooming_exits/zoomOutUp.d.ts +6 -0
- package/dist/animations/zooming_exits/zoomOutUp.js +16 -0
- package/dist/components/animation/animation.component.d.ts +65 -0
- package/dist/components/animation/animation.component.js +247 -0
- package/dist/components/animation/animation.d.ts +8 -0
- package/dist/components/animation/animation.js +5 -0
- package/dist/components/animation/animation.styles.d.ts +1 -0
- package/dist/components/animation/animation.styles.js +9 -0
- package/dist/components/animation/animations.d.ts +4 -0
- package/dist/components/animation/animations.js +13 -0
- package/dist/components/avatar/avatar.component.d.ts +43 -0
- package/dist/components/avatar/avatar.component.js +137 -0
- package/dist/components/avatar/avatar.d.ts +8 -0
- package/dist/components/avatar/avatar.js +5 -0
- package/dist/components/avatar/avatar.styles.d.ts +1 -0
- package/dist/components/avatar/avatar.styles.js +68 -0
- package/dist/components/badge/badge.component.d.ts +21 -0
- package/dist/components/badge/badge.component.js +64 -0
- package/dist/components/badge/badge.d.ts +8 -0
- package/dist/components/badge/badge.js +5 -0
- package/dist/components/badge/badge.styles.d.ts +1 -0
- package/dist/components/badge/badge.styles.js +76 -0
- package/dist/components/button/button.component.d.ts +104 -0
- package/dist/components/button/button.component.js +346 -0
- package/dist/components/button/button.d.ts +8 -0
- package/dist/components/button/button.js +5 -0
- package/dist/components/button/button.styles.d.ts +1 -0
- package/dist/components/button/button.styles.js +322 -0
- package/dist/components/button-group/button-group.component.d.ts +26 -0
- package/dist/components/button-group/button-group.component.js +93 -0
- package/dist/components/button-group/button-group.d.ts +8 -0
- package/dist/components/button-group/button-group.js +5 -0
- package/dist/components/button-group/button-group.styles.d.ts +1 -0
- package/dist/components/button-group/button-group.styles.js +14 -0
- package/dist/components/callout/callout.component.d.ts +22 -0
- package/dist/components/callout/callout.component.js +63 -0
- package/dist/components/callout/callout.d.ts +8 -0
- package/dist/components/callout/callout.js +5 -0
- package/dist/components/callout/callout.styles.d.ts +1 -0
- package/dist/components/callout/callout.styles.js +68 -0
- package/dist/components/card/card.component.d.ts +29 -0
- package/dist/components/card/card.component.js +59 -0
- package/dist/components/card/card.d.ts +8 -0
- package/dist/components/card/card.js +5 -0
- package/dist/components/card/card.styles.d.ts +1 -0
- package/dist/components/card/card.styles.js +65 -0
- package/dist/components/checkbox/checkbox.component.d.ts +44 -0
- package/dist/components/checkbox/checkbox.component.js +287 -0
- package/dist/components/checkbox/checkbox.d.ts +8 -0
- package/dist/components/checkbox/checkbox.js +5 -0
- package/dist/components/checkbox/checkbox.styles.d.ts +1 -0
- package/dist/components/checkbox/checkbox.styles.js +166 -0
- package/dist/components/comparer/comparer.component.d.ts +43 -0
- package/dist/components/comparer/comparer.component.js +181 -0
- package/dist/components/comparer/comparer.d.ts +8 -0
- package/dist/components/comparer/comparer.js +5 -0
- package/dist/components/comparer/comparer.styles.d.ts +1 -0
- package/dist/components/comparer/comparer.styles.js +75 -0
- package/dist/components/copy-button/copy-button.component.d.ts +75 -0
- package/dist/components/copy-button/copy-button.component.js +289 -0
- package/dist/components/copy-button/copy-button.d.ts +8 -0
- package/dist/components/copy-button/copy-button.js +5 -0
- package/dist/components/copy-button/copy-button.styles.d.ts +1 -0
- package/dist/components/copy-button/copy-button.styles.js +61 -0
- package/dist/components/details/details.component.d.ts +25 -0
- package/dist/components/details/details.component.js +243 -0
- package/dist/components/details/details.d.ts +8 -0
- package/dist/components/details/details.js +5 -0
- package/dist/components/details/details.styles.d.ts +1 -0
- package/dist/components/details/details.styles.js +86 -0
- package/dist/components/dialog/dialog.component.d.ts +84 -0
- package/dist/components/dialog/dialog.component.js +362 -0
- package/dist/components/dialog/dialog.d.ts +8 -0
- package/dist/components/dialog/dialog.js +5 -0
- package/dist/components/dialog/dialog.styles.d.ts +1 -0
- package/dist/components/dialog/dialog.styles.js +123 -0
- package/dist/components/divider/divider.component.d.ts +20 -0
- package/dist/components/divider/divider.component.js +51 -0
- package/dist/components/divider/divider.d.ts +8 -0
- package/dist/components/divider/divider.js +5 -0
- package/dist/components/divider/divider.styles.d.ts +1 -0
- package/dist/components/divider/divider.styles.js +29 -0
- package/dist/components/drawer/drawer.component.d.ts +95 -0
- package/dist/components/drawer/drawer.component.js +509 -0
- package/dist/components/drawer/drawer.d.ts +8 -0
- package/dist/components/drawer/drawer.js +5 -0
- package/dist/components/drawer/drawer.styles.d.ts +1 -0
- package/dist/components/drawer/drawer.styles.js +157 -0
- package/dist/components/dropdown/dropdown.component.d.ts +44 -0
- package/dist/components/dropdown/dropdown.component.js +385 -0
- package/dist/components/dropdown/dropdown.d.ts +8 -0
- package/dist/components/dropdown/dropdown.js +5 -0
- package/dist/components/dropdown/dropdown.styles.d.ts +1 -0
- package/dist/components/dropdown/dropdown.styles.js +52 -0
- package/dist/components/icon/icon.component.d.ts +47 -0
- package/dist/components/icon/icon.component.js +225 -0
- package/dist/components/icon/icon.d.ts +8 -0
- package/dist/components/icon/icon.js +5 -0
- package/dist/components/icon/icon.styles.d.ts +1 -0
- package/dist/components/icon/icon.styles.js +49 -0
- package/dist/components/icon/library.d.ts +14 -0
- package/dist/components/icon/library.default.d.ts +3 -0
- package/dist/components/icon/library.default.js +8 -0
- package/dist/components/icon/library.js +34 -0
- package/dist/components/icon/library.system.d.ts +3 -0
- package/dist/components/icon/library.system.js +130 -0
- package/dist/components/icon-button/icon-button.component.d.ts +27 -0
- package/dist/components/icon-button/icon-button.component.js +151 -0
- package/dist/components/icon-button/icon-button.d.ts +8 -0
- package/dist/components/icon-button/icon-button.js +5 -0
- package/dist/components/icon-button/icon-button.styles.d.ts +1 -0
- package/dist/components/icon-button/icon-button.styles.js +53 -0
- package/dist/components/input/input.component.d.ts +78 -0
- package/dist/components/input/input.component.js +513 -0
- package/dist/components/input/input.d.ts +8 -0
- package/dist/components/input/input.js +5 -0
- package/dist/components/input/input.styles.d.ts +1 -0
- package/dist/components/input/input.styles.js +308 -0
- package/dist/components/menu/menu.component.d.ts +20 -0
- package/dist/components/menu/menu.component.js +123 -0
- package/dist/components/menu/menu.d.ts +8 -0
- package/dist/components/menu/menu.js +5 -0
- package/dist/components/menu/menu.styles.d.ts +1 -0
- package/dist/components/menu/menu.styles.js +20 -0
- package/dist/components/menu-item/menu-item.component.d.ts +34 -0
- package/dist/components/menu-item/menu-item.component.js +211 -0
- package/dist/components/menu-item/menu-item.d.ts +8 -0
- package/dist/components/menu-item/menu-item.js +5 -0
- package/dist/components/menu-item/menu-item.styles.d.ts +1 -0
- package/dist/components/menu-item/menu-item.styles.js +157 -0
- package/dist/components/menu-item/submenu-controller.d.ts +34 -0
- package/dist/components/menu-item/submenu-controller.js +246 -0
- package/dist/components/menu-label/menu-label.component.d.ts +15 -0
- package/dist/components/menu-label/menu-label.component.js +25 -0
- package/dist/components/menu-label/menu-label.d.ts +8 -0
- package/dist/components/menu-label/menu-label.js +5 -0
- package/dist/components/menu-label/menu-label.styles.d.ts +1 -0
- package/dist/components/menu-label/menu-label.styles.js +22 -0
- package/dist/components/option/option.component.d.ts +42 -0
- package/dist/components/option/option.component.js +161 -0
- package/dist/components/option/option.d.ts +8 -0
- package/dist/components/option/option.js +5 -0
- package/dist/components/option/option.styles.d.ts +1 -0
- package/dist/components/option/option.styles.js +108 -0
- package/dist/components/popup/popup.component.d.ts +44 -0
- package/dist/components/popup/popup.component.js +483 -0
- package/dist/components/popup/popup.d.ts +8 -0
- package/dist/components/popup/popup.js +6 -0
- package/dist/components/popup/popup.styles.d.ts +1 -0
- package/dist/components/popup/popup.styles.js +64 -0
- package/dist/components/qr-code/qr-code.component.d.ts +16 -0
- package/dist/components/qr-code/qr-code.component.js +94 -0
- package/dist/components/qr-code/qr-code.d.ts +8 -0
- package/dist/components/qr-code/qr-code.js +5 -0
- package/dist/components/qr-code/qr-code.styles.d.ts +1 -0
- package/dist/components/qr-code/qr-code.styles.js +9 -0
- package/dist/components/radio/radio.component.d.ts +19 -0
- package/dist/components/radio/radio.component.js +120 -0
- package/dist/components/radio/radio.d.ts +8 -0
- package/dist/components/radio/radio.js +5 -0
- package/dist/components/radio/radio.styles.d.ts +1 -0
- package/dist/components/radio/radio.styles.js +132 -0
- package/dist/components/radio-button/radio-button.component.d.ts +22 -0
- package/dist/components/radio-button/radio-button.component.js +131 -0
- package/dist/components/radio-button/radio-button.d.ts +8 -0
- package/dist/components/radio-button/radio-button.js +5 -0
- package/dist/components/radio-button/radio-button.styles.d.ts +1 -0
- package/dist/components/radio-button/radio-button.styles.js +25 -0
- package/dist/components/radio-group/radio-group.component.d.ts +46 -0
- package/dist/components/radio-group/radio-group.component.js +379 -0
- package/dist/components/radio-group/radio-group.d.ts +8 -0
- package/dist/components/radio-group/radio-group.js +5 -0
- package/dist/components/radio-group/radio-group.styles.d.ts +1 -0
- package/dist/components/radio-group/radio-group.styles.js +42 -0
- package/dist/components/rating/rating.component.d.ts +37 -0
- package/dist/components/rating/rating.component.js +308 -0
- package/dist/components/rating/rating.d.ts +8 -0
- package/dist/components/rating/rating.js +5 -0
- package/dist/components/rating/rating.styles.d.ts +1 -0
- package/dist/components/rating/rating.styles.js +94 -0
- package/dist/components/resize-observer/resize-observer.component.d.ts +26 -0
- package/dist/components/resize-observer/resize-observer.component.js +89 -0
- package/dist/components/resize-observer/resize-observer.d.ts +8 -0
- package/dist/components/resize-observer/resize-observer.js +5 -0
- package/dist/components/resize-observer/resize-observer.styles.d.ts +1 -0
- package/dist/components/resize-observer/resize-observer.styles.js +9 -0
- package/dist/components/select/select.component.d.ts +174 -0
- package/dist/components/select/select.component.js +960 -0
- package/dist/components/select/select.d.ts +8 -0
- package/dist/components/select/select.js +5 -0
- package/dist/components/select/select.styles.d.ts +1 -0
- package/dist/components/select/select.styles.js +363 -0
- package/dist/components/spinner/spinner.component.d.ts +20 -0
- package/dist/components/spinner/spinner.component.js +47 -0
- package/dist/components/spinner/spinner.d.ts +8 -0
- package/dist/components/spinner/spinner.js +5 -0
- package/dist/components/spinner/spinner.styles.d.ts +1 -0
- package/dist/components/spinner/spinner.styles.js +61 -0
- package/dist/components/switch/switch.component.d.ts +84 -0
- package/dist/components/switch/switch.component.js +281 -0
- package/dist/components/switch/switch.d.ts +8 -0
- package/dist/components/switch/switch.js +5 -0
- package/dist/components/switch/switch.styles.d.ts +1 -0
- package/dist/components/switch/switch.styles.js +178 -0
- package/dist/components/tab/tab.component.d.ts +22 -0
- package/dist/components/tab/tab.component.js +112 -0
- package/dist/components/tab/tab.d.ts +8 -0
- package/dist/components/tab/tab.js +5 -0
- package/dist/components/tab/tab.styles.d.ts +1 -0
- package/dist/components/tab/tab.styles.js +85 -0
- package/dist/components/tab-group/tab-group.component.d.ts +51 -0
- package/dist/components/tab-group/tab-group.component.js +513 -0
- package/dist/components/tab-group/tab-group.d.ts +8 -0
- package/dist/components/tab-group/tab-group.js +5 -0
- package/dist/components/tab-group/tab-group.styles.d.ts +1 -0
- package/dist/components/tab-group/tab-group.styles.js +219 -0
- package/dist/components/tab-panel/tab-panel.component.d.ts +12 -0
- package/dist/components/tab-panel/tab-panel.component.js +56 -0
- package/dist/components/tab-panel/tab-panel.d.ts +8 -0
- package/dist/components/tab-panel/tab-panel.js +5 -0
- package/dist/components/tab-panel/tab-panel.styles.d.ts +1 -0
- package/dist/components/tab-panel/tab-panel.styles.js +18 -0
- package/dist/components/tag/tag.component.d.ts +38 -0
- package/dist/components/tag/tag.component.js +109 -0
- package/dist/components/tag/tag.d.ts +8 -0
- package/dist/components/tag/tag.js +5 -0
- package/dist/components/tag/tag.styles.d.ts +1 -0
- package/dist/components/tag/tag.styles.js +155 -0
- package/dist/components/tooltip/tooltip.component.d.ts +38 -0
- package/dist/components/tooltip/tooltip.component.js +267 -0
- package/dist/components/tooltip/tooltip.d.ts +8 -0
- package/dist/components/tooltip/tooltip.js +5 -0
- package/dist/components/tooltip/tooltip.styles.d.ts +1 -0
- package/dist/components/tooltip/tooltip.styles.js +59 -0
- package/dist/default.css +1005 -0
- package/dist/events/events.d.ts +33 -0
- package/dist/events/events.js +1 -0
- package/dist/events/pc-after-collapse.d.ts +6 -0
- package/dist/events/pc-after-collapse.js +1 -0
- package/dist/events/pc-after-expand.d.ts +6 -0
- package/dist/events/pc-after-expand.js +1 -0
- package/dist/events/pc-after-hide.d.ts +6 -0
- package/dist/events/pc-after-hide.js +1 -0
- package/dist/events/pc-after-show.d.ts +6 -0
- package/dist/events/pc-after-show.js +1 -0
- package/dist/events/pc-blur.d.ts +6 -0
- package/dist/events/pc-blur.js +1 -0
- package/dist/events/pc-cancel.d.ts +6 -0
- package/dist/events/pc-cancel.js +1 -0
- package/dist/events/pc-change.d.ts +6 -0
- package/dist/events/pc-change.js +1 -0
- package/dist/events/pc-clear.d.ts +6 -0
- package/dist/events/pc-clear.js +1 -0
- package/dist/events/pc-close.d.ts +6 -0
- package/dist/events/pc-close.js +1 -0
- package/dist/events/pc-collapse.d.ts +6 -0
- package/dist/events/pc-collapse.js +1 -0
- package/dist/events/pc-copy.d.ts +8 -0
- package/dist/events/pc-copy.js +1 -0
- package/dist/events/pc-error.d.ts +8 -0
- package/dist/events/pc-error.js +1 -0
- package/dist/events/pc-expand.d.ts +6 -0
- package/dist/events/pc-expand.js +1 -0
- package/dist/events/pc-finish.d.ts +6 -0
- package/dist/events/pc-finish.js +1 -0
- package/dist/events/pc-focus.d.ts +6 -0
- package/dist/events/pc-focus.js +1 -0
- package/dist/events/pc-hide.d.ts +6 -0
- package/dist/events/pc-hide.js +1 -0
- package/dist/events/pc-hover.d.ts +9 -0
- package/dist/events/pc-hover.js +1 -0
- package/dist/events/pc-initial-focus.d.ts +6 -0
- package/dist/events/pc-initial-focus.js +1 -0
- package/dist/events/pc-input.d.ts +6 -0
- package/dist/events/pc-input.js +1 -0
- package/dist/events/pc-invalid.d.ts +6 -0
- package/dist/events/pc-invalid.js +1 -0
- package/dist/events/pc-lazy-change.d.ts +6 -0
- package/dist/events/pc-lazy-change.js +1 -0
- package/dist/events/pc-lazy-load.d.ts +6 -0
- package/dist/events/pc-lazy-load.js +1 -0
- package/dist/events/pc-load.d.ts +6 -0
- package/dist/events/pc-load.js +1 -0
- package/dist/events/pc-mutation.d.ts +8 -0
- package/dist/events/pc-mutation.js +1 -0
- package/dist/events/pc-remove.d.ts +6 -0
- package/dist/events/pc-remove.js +1 -0
- package/dist/events/pc-reposition.d.ts +6 -0
- package/dist/events/pc-reposition.js +1 -0
- package/dist/events/pc-request-close.d.ts +8 -0
- package/dist/events/pc-request-close.js +1 -0
- package/dist/events/pc-resize.d.ts +8 -0
- package/dist/events/pc-resize.js +1 -0
- package/dist/events/pc-select.d.ts +9 -0
- package/dist/events/pc-select.js +1 -0
- package/dist/events/pc-selection-change.js +1 -0
- package/dist/events/pc-show.d.ts +6 -0
- package/dist/events/pc-show.js +1 -0
- package/dist/events/pc-slide-change.js +1 -0
- package/dist/events/pc-start.d.ts +6 -0
- package/dist/events/pc-start.js +1 -0
- package/dist/events/pc-tab-hide.d.ts +8 -0
- package/dist/events/pc-tab-hide.js +1 -0
- package/dist/events/pc-tab-show.d.ts +8 -0
- package/dist/events/pc-tab-show.js +1 -0
- package/dist/global-shims.d.ts +18 -0
- package/dist/global-shims.js +96 -0
- package/dist/internal/active-elements.d.ts +2 -0
- package/dist/internal/active-elements.js +16 -0
- package/dist/internal/animate.d.ts +10 -0
- package/dist/internal/animate.js +45 -0
- package/dist/internal/close-active-element.d.ts +1 -0
- package/dist/internal/close-active-element.js +8 -0
- package/dist/internal/debounce.d.ts +1 -0
- package/dist/internal/debounce.js +14 -0
- package/dist/internal/default-value.d.ts +2 -0
- package/dist/internal/default-value.js +26 -0
- package/dist/internal/drag.d.ts +7 -0
- package/dist/internal/drag.js +27 -0
- package/dist/internal/emit.d.ts +1 -0
- package/dist/internal/emit.js +14 -0
- package/dist/internal/event.d.ts +1 -0
- package/dist/internal/event.js +13 -0
- package/dist/internal/form.d.ts +41 -0
- package/dist/internal/form.js +282 -0
- package/dist/internal/math.d.ts +1 -0
- package/dist/internal/math.js +12 -0
- package/dist/internal/modal.d.ts +19 -0
- package/dist/internal/modal.js +116 -0
- package/dist/internal/offset.d.ts +4 -0
- package/dist/internal/offset.js +10 -0
- package/dist/internal/scroll.d.ts +3 -0
- package/dist/internal/scroll.js +70 -0
- package/dist/internal/scrollend-polyfill.d.ts +1 -0
- package/dist/internal/scrollend-polyfill.js +65 -0
- package/dist/internal/slot.d.ts +14 -0
- package/dist/internal/slot.js +75 -0
- package/dist/internal/string.d.ts +1 -0
- package/dist/internal/string.js +5 -0
- package/dist/internal/tabbable.d.ts +5 -0
- package/dist/internal/tabbable.js +145 -0
- package/dist/internal/watch.d.ts +11 -0
- package/dist/internal/watch.js +32 -0
- package/dist/native-styles.css +261 -0
- package/dist/placer-autoloader.d.ts +1 -0
- package/dist/placer-autoloader.js +41 -0
- package/dist/placer.d.ts +44 -0
- package/dist/placer.js +43 -0
- package/dist/style-utilities/fouce.css +13 -0
- package/dist/style-utilities/style-utilities.css +2 -0
- package/dist/style-utilities/visually-hidden.css +12 -0
- package/dist/utilities/animation-registry.d.ts +14 -0
- package/dist/utilities/animation-registry.js +39 -0
- package/dist/utilities/animation.d.ts +1 -0
- package/dist/utilities/animation.js +1 -0
- package/dist/utilities/base-path.d.ts +2 -0
- package/dist/utilities/base-path.js +8 -0
- package/dist/utilities/form.d.ts +2 -0
- package/dist/utilities/form.js +39 -0
- package/dist/utilities/icon-library.d.ts +1 -0
- package/dist/utilities/icon-library.js +1 -0
- package/dist/utility.css +41 -0
- package/package.json +82 -0
- package/src/animations/attention_seekers/bounce.ts +43 -0
- package/src/animations/attention_seekers/flash.ts +7 -0
- package/src/animations/attention_seekers/headShake.ts +8 -0
- package/src/animations/attention_seekers/heartBeat.ts +7 -0
- package/src/animations/attention_seekers/jello.ts +15 -0
- package/src/animations/attention_seekers/pulse.ts +5 -0
- package/src/animations/attention_seekers/rubberBand.ts +9 -0
- package/src/animations/attention_seekers/shake.ts +13 -0
- package/src/animations/attention_seekers/shakeX.ts +13 -0
- package/src/animations/attention_seekers/shakeY.ts +13 -0
- package/src/animations/attention_seekers/swing.ts +7 -0
- package/src/animations/attention_seekers/tada.ts +40 -0
- package/src/animations/attention_seekers/wobble.ts +24 -0
- package/src/animations/back_entrances/backInDown.ts +5 -0
- package/src/animations/back_entrances/backInLeft.ts +5 -0
- package/src/animations/back_entrances/backInRight.ts +5 -0
- package/src/animations/back_entrances/backInUp.ts +5 -0
- package/src/animations/back_exits/backOutDown.ts +5 -0
- package/src/animations/back_exits/backOutLeft.ts +5 -0
- package/src/animations/back_exits/backOutRight.ts +5 -0
- package/src/animations/back_exits/backOutUp.ts +5 -0
- package/src/animations/bouncing_entrances/bounceIn.ts +14 -0
- package/src/animations/bouncing_entrances/bounceInDown.ts +20 -0
- package/src/animations/bouncing_entrances/bounceInLeft.ts +20 -0
- package/src/animations/bouncing_entrances/bounceInRight.ts +20 -0
- package/src/animations/bouncing_entrances/bounceInUp.ts +20 -0
- package/src/animations/bouncing_exits/bounceOut.ts +6 -0
- package/src/animations/bouncing_exits/bounceOutDown.ts +18 -0
- package/src/animations/bouncing_exits/bounceOutLeft.ts +12 -0
- package/src/animations/bouncing_exits/bounceOutRight.ts +12 -0
- package/src/animations/bouncing_exits/bounceOutUp.ts +18 -0
- package/src/animations/easings/easings.ts +31 -0
- package/src/animations/fading_entrances/fadeIn.ts +4 -0
- package/src/animations/fading_entrances/fadeInBottomLeft.ts +4 -0
- package/src/animations/fading_entrances/fadeInBottomRight.ts +4 -0
- package/src/animations/fading_entrances/fadeInDown.ts +4 -0
- package/src/animations/fading_entrances/fadeInDownBig.ts +4 -0
- package/src/animations/fading_entrances/fadeInLeft.ts +4 -0
- package/src/animations/fading_entrances/fadeInLeftBig.ts +4 -0
- package/src/animations/fading_entrances/fadeInRight.ts +4 -0
- package/src/animations/fading_entrances/fadeInRightBig.ts +4 -0
- package/src/animations/fading_entrances/fadeInTopLeft.ts +4 -0
- package/src/animations/fading_entrances/fadeInTopRight.ts +4 -0
- package/src/animations/fading_entrances/fadeInUp.ts +4 -0
- package/src/animations/fading_entrances/fadeInUpBig.ts +4 -0
- package/src/animations/fading_exits/fadeOut.ts +4 -0
- package/src/animations/fading_exits/fadeOutBottomLeft.ts +4 -0
- package/src/animations/fading_exits/fadeOutBottomRight.ts +4 -0
- package/src/animations/fading_exits/fadeOutDown.ts +4 -0
- package/src/animations/fading_exits/fadeOutDownBig.ts +4 -0
- package/src/animations/fading_exits/fadeOutLeft.ts +4 -0
- package/src/animations/fading_exits/fadeOutLeftBig.ts +4 -0
- package/src/animations/fading_exits/fadeOutRight.ts +4 -0
- package/src/animations/fading_exits/fadeOutRightBig.ts +4 -0
- package/src/animations/fading_exits/fadeOutTopLeft.ts +4 -0
- package/src/animations/fading_exits/fadeOutTopRight.ts +4 -0
- package/src/animations/fading_exits/fadeOutUp.ts +4 -0
- package/src/animations/fading_exits/fadeOutUpBig.ts +4 -0
- package/src/animations/flippers/flip.ts +32 -0
- package/src/animations/flippers/flipInX.ts +20 -0
- package/src/animations/flippers/flipInY.ts +20 -0
- package/src/animations/flippers/flipOutX.ts +13 -0
- package/src/animations/flippers/flipOutY.ts +13 -0
- package/src/animations/index.ts +101 -0
- package/src/animations/lightspeed/lightSpeedInLeft.ts +10 -0
- package/src/animations/lightspeed/lightSpeedInRight.ts +10 -0
- package/src/animations/lightspeed/lightSpeedOutLeft.ts +8 -0
- package/src/animations/lightspeed/lightSpeedOutRight.ts +8 -0
- package/src/animations/rotating_entrances/rotateIn.ts +4 -0
- package/src/animations/rotating_entrances/rotateInDownLeft.ts +4 -0
- package/src/animations/rotating_entrances/rotateInDownRight.ts +4 -0
- package/src/animations/rotating_entrances/rotateInUpLeft.ts +4 -0
- package/src/animations/rotating_entrances/rotateInUpRight.ts +4 -0
- package/src/animations/rotating_exits/rotateOut.ts +4 -0
- package/src/animations/rotating_exits/rotateOutDownLeft.ts +4 -0
- package/src/animations/rotating_exits/rotateOutDownRight.ts +4 -0
- package/src/animations/rotating_exits/rotateOutUpLeft.ts +4 -0
- package/src/animations/rotating_exits/rotateOutUpRight.ts +4 -0
- package/src/animations/sliding_entrances/slideInDown.ts +4 -0
- package/src/animations/sliding_entrances/slideInLeft.ts +4 -0
- package/src/animations/sliding_entrances/slideInRight.ts +4 -0
- package/src/animations/sliding_entrances/slideInUp.ts +4 -0
- package/src/animations/sliding_exits/slideOutDown.ts +4 -0
- package/src/animations/sliding_exits/slideOutLeft.ts +4 -0
- package/src/animations/sliding_exits/slideOutRight.ts +4 -0
- package/src/animations/sliding_exits/slideOutUp.ts +4 -0
- package/src/animations/specials/hinge.ts +26 -0
- package/src/animations/specials/jackInTheBox.ts +11 -0
- package/src/animations/specials/rollIn.ts +8 -0
- package/src/animations/specials/rollOut.ts +8 -0
- package/src/animations/zooming_entrances/zoomIn.ts +4 -0
- package/src/animations/zooming_entrances/zoomInDown.ts +14 -0
- package/src/animations/zooming_entrances/zoomInLeft.ts +14 -0
- package/src/animations/zooming_entrances/zoomInRight.ts +14 -0
- package/src/animations/zooming_entrances/zoomInUp.ts +14 -0
- package/src/animations/zooming_exits/zoomOut.ts +5 -0
- package/src/animations/zooming_exits/zoomOutDown.ts +14 -0
- package/src/animations/zooming_exits/zoomOutLeft.ts +12 -0
- package/src/animations/zooming_exits/zoomOutRight.ts +12 -0
- package/src/animations/zooming_exits/zoomOutUp.ts +14 -0
- package/src/components/animation/animation.component.ts +224 -0
- package/src/components/animation/animation.styles.ts +7 -0
- package/src/components/animation/animation.ts +10 -0
- package/src/components/animation/animations.ts +13 -0
- package/src/components/avatar/avatar.component.ts +113 -0
- package/src/components/avatar/avatar.styles.ts +66 -0
- package/src/components/avatar/avatar.ts +10 -0
- package/src/components/badge/badge.component.ts +54 -0
- package/src/components/badge/badge.styles.ts +74 -0
- package/src/components/badge/badge.ts +10 -0
- package/src/components/button/button.component.ts +335 -0
- package/src/components/button/button.styles.ts +320 -0
- package/src/components/button/button.ts +10 -0
- package/src/components/button-group/button-group.component.ts +101 -0
- package/src/components/button-group/button-group.styles.ts +12 -0
- package/src/components/button-group/button-group.ts +10 -0
- package/src/components/callout/callout.component.ts +60 -0
- package/src/components/callout/callout.styles.ts +66 -0
- package/src/components/callout/callout.ts +10 -0
- package/src/components/card/card.component.ts +59 -0
- package/src/components/card/card.styles.ts +63 -0
- package/src/components/card/card.ts +10 -0
- package/src/components/checkbox/checkbox.component.ts +244 -0
- package/src/components/checkbox/checkbox.styles.ts +164 -0
- package/src/components/checkbox/checkbox.ts +10 -0
- package/src/components/comparer/comparer.component.ts +188 -0
- package/src/components/comparer/comparer.styles.ts +73 -0
- package/src/components/comparer/comparer.ts +10 -0
- package/src/components/copy-button/copy-button.component.ts +272 -0
- package/src/components/copy-button/copy-button.styles.ts +59 -0
- package/src/components/copy-button/copy-button.ts +10 -0
- package/src/components/details/details.component.ts +259 -0
- package/src/components/details/details.styles.ts +84 -0
- package/src/components/details/details.ts +10 -0
- package/src/components/dialog/dialog.component.ts +403 -0
- package/src/components/dialog/dialog.styles.ts +121 -0
- package/src/components/dialog/dialog.ts +10 -0
- package/src/components/divider/divider.component.ts +42 -0
- package/src/components/divider/divider.styles.ts +27 -0
- package/src/components/divider/divider.ts +10 -0
- package/src/components/drawer/drawer.component.ts +565 -0
- package/src/components/drawer/drawer.styles.ts +155 -0
- package/src/components/drawer/drawer.ts +10 -0
- package/src/components/dropdown/dropdown.component.ts +430 -0
- package/src/components/dropdown/dropdown.styles.ts +50 -0
- package/src/components/dropdown/dropdown.ts +10 -0
- package/src/components/icon/icon.component.ts +239 -0
- package/src/components/icon/icon.styles.ts +47 -0
- package/src/components/icon/icon.ts +10 -0
- package/src/components/icon/library.default.ts +10 -0
- package/src/components/icon/library.system.ts +136 -0
- package/src/components/icon/library.ts +54 -0
- package/src/components/icon-button/icon-button.component.ts +129 -0
- package/src/components/icon-button/icon-button.styles.ts +51 -0
- package/src/components/icon-button/icon-button.ts +10 -0
- package/src/components/input/input.component.ts +496 -0
- package/src/components/input/input.styles.ts +306 -0
- package/src/components/input/input.ts +10 -0
- package/src/components/menu/menu.component.ts +161 -0
- package/src/components/menu/menu.styles.ts +18 -0
- package/src/components/menu/menu.ts +10 -0
- package/src/components/menu-item/menu-item.component.ts +190 -0
- package/src/components/menu-item/menu-item.styles.ts +155 -0
- package/src/components/menu-item/menu-item.ts +10 -0
- package/src/components/menu-item/submenu-controller.ts +337 -0
- package/src/components/menu-label/menu-label.component.ts +22 -0
- package/src/components/menu-label/menu-label.styles.ts +20 -0
- package/src/components/menu-label/menu-label.ts +10 -0
- package/src/components/option/option.component.ts +141 -0
- package/src/components/option/option.styles.ts +106 -0
- package/src/components/option/option.ts +10 -0
- package/src/components/popup/popup.component.ts +540 -0
- package/src/components/popup/popup.styles.ts +63 -0
- package/src/components/popup/popup.ts +12 -0
- package/src/components/qr-code/qr-code.component.ts +70 -0
- package/src/components/qr-code/qr-code.styles.ts +7 -0
- package/src/components/qr-code/qr-code.ts +10 -0
- package/src/components/radio/radio.component.ts +100 -0
- package/src/components/radio/radio.styles.ts +130 -0
- package/src/components/radio/radio.ts +10 -0
- package/src/components/radio-button/radio-button.component.ts +116 -0
- package/src/components/radio-button/radio-button.styles.ts +23 -0
- package/src/components/radio-button/radio-button.ts +10 -0
- package/src/components/radio-group/radio-group.component.ts +404 -0
- package/src/components/radio-group/radio-group.styles.ts +40 -0
- package/src/components/radio-group/radio-group.ts +10 -0
- package/src/components/rating/rating.component.ts +319 -0
- package/src/components/rating/rating.styles.ts +92 -0
- package/src/components/rating/rating.ts +10 -0
- package/src/components/resize-observer/resize-observer.component.ts +91 -0
- package/src/components/resize-observer/resize-observer.styles.ts +7 -0
- package/src/components/resize-observer/resize-observer.ts +10 -0
- package/src/components/select/select.component.ts +1013 -0
- package/src/components/select/select.styles.ts +361 -0
- package/src/components/select/select.ts +10 -0
- package/src/components/spinner/spinner.component.ts +38 -0
- package/src/components/spinner/spinner.styles.ts +59 -0
- package/src/components/spinner/spinner.ts +10 -0
- package/src/components/switch/switch.component.ts +253 -0
- package/src/components/switch/switch.styles.ts +176 -0
- package/src/components/switch/switch.ts +10 -0
- package/src/components/tab/tab.component.ts +87 -0
- package/src/components/tab/tab.styles.ts +83 -0
- package/src/components/tab/tab.ts +10 -0
- package/src/components/tab-group/tab-group.component.ts +607 -0
- package/src/components/tab-group/tab-group.styles.ts +217 -0
- package/src/components/tab-group/tab-group.ts +10 -0
- package/src/components/tab-panel/tab-panel.component.ts +43 -0
- package/src/components/tab-panel/tab-panel.styles.ts +16 -0
- package/src/components/tab-panel/tab-panel.ts +10 -0
- package/src/components/tag/tag.component.ts +94 -0
- package/src/components/tag/tag.styles.ts +153 -0
- package/src/components/tag/tag.ts +10 -0
- package/src/components/tooltip/tooltip.component.ts +276 -0
- package/src/components/tooltip/tooltip.styles.ts +57 -0
- package/src/components/tooltip/tooltip.ts +10 -0
- package/src/default.css +1005 -0
- package/src/events/events.ts +35 -0
- package/src/events/pc-after-collapse.ts +7 -0
- package/src/events/pc-after-expand.ts +7 -0
- package/src/events/pc-after-hide.ts +7 -0
- package/src/events/pc-after-show.ts +7 -0
- package/src/events/pc-blur.ts +7 -0
- package/src/events/pc-cancel.ts +7 -0
- package/src/events/pc-change.ts +7 -0
- package/src/events/pc-clear.ts +7 -0
- package/src/events/pc-close.ts +7 -0
- package/src/events/pc-collapse.ts +7 -0
- package/src/events/pc-copy.ts +7 -0
- package/src/events/pc-error.ts +7 -0
- package/src/events/pc-expand.ts +7 -0
- package/src/events/pc-finish.ts +7 -0
- package/src/events/pc-focus.ts +7 -0
- package/src/events/pc-hide.ts +7 -0
- package/src/events/pc-hover.ts +10 -0
- package/src/events/pc-initial-focus.ts +7 -0
- package/src/events/pc-input.ts +7 -0
- package/src/events/pc-invalid.ts +7 -0
- package/src/events/pc-lazy-change.ts +7 -0
- package/src/events/pc-lazy-load.ts +7 -0
- package/src/events/pc-load.ts +7 -0
- package/src/events/pc-mutation.ts +7 -0
- package/src/events/pc-remove.ts +7 -0
- package/src/events/pc-reposition.ts +7 -0
- package/src/events/pc-request-close.ts +9 -0
- package/src/events/pc-resize.ts +7 -0
- package/src/events/pc-select.ts +9 -0
- package/src/events/pc-selection-change.ts +10 -0
- package/src/events/pc-show.ts +7 -0
- package/src/events/pc-slide-change.ts +13 -0
- package/src/events/pc-start.ts +7 -0
- package/src/events/pc-tab-hide.ts +7 -0
- package/src/events/pc-tab-show.ts +7 -0
- package/src/global-shims.ts +126 -0
- package/src/global.d.ts +31 -0
- package/src/internal/active-elements.ts +21 -0
- package/src/internal/animate.ts +62 -0
- package/src/internal/close-active-element.ts +7 -0
- package/src/internal/debounce.ts +25 -0
- package/src/internal/default-value.ts +40 -0
- package/src/internal/drag.ts +36 -0
- package/src/internal/emit.ts +19 -0
- package/src/internal/event.ts +12 -0
- package/src/internal/form.ts +389 -0
- package/src/internal/math.ts +14 -0
- package/src/internal/modal.ts +157 -0
- package/src/internal/offset.ts +12 -0
- package/src/internal/scroll.ts +95 -0
- package/src/internal/scrollend-polyfill.ts +99 -0
- package/src/internal/slot.ts +110 -0
- package/src/internal/string.ts +3 -0
- package/src/internal/tabbable.ts +207 -0
- package/src/internal/watch.ts +58 -0
- package/src/native-styles.css +261 -0
- package/src/placer-autoloader.ts +53 -0
- package/src/placer.ts +53 -0
- package/src/style-utilities/fouce.css +13 -0
- package/src/style-utilities/style-utilities.css +2 -0
- package/src/style-utilities/visually-hidden.css +12 -0
- package/src/utilities/animation-registry.ts +72 -0
- package/src/utilities/animation.ts +4 -0
- package/src/utilities/base-path.ts +39 -0
- package/src/utilities/form.ts +41 -0
- package/src/utilities/icon-library.ts +4 -0
- package/src/utility.css +41 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
|
|
3
|
+
export const styles = css`
|
|
4
|
+
:host {
|
|
5
|
+
--submenu-offset: -2px;
|
|
6
|
+
display: block;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:host([inert]) {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.menu-item {
|
|
14
|
+
display: flex;
|
|
15
|
+
position: relative;
|
|
16
|
+
align-items: stretch;
|
|
17
|
+
font-family: var(--pc-font-sans);
|
|
18
|
+
font-size: var(--pc-font-size-m);
|
|
19
|
+
font-weight: var(--pc-font-weight-normal);
|
|
20
|
+
line-height: var(--pc-line-height-normal);
|
|
21
|
+
letter-spacing: var(--pc-letter-spacing-normal);
|
|
22
|
+
color: var(--pc-color-neutral-700);
|
|
23
|
+
padding: var(--pc-spacing-xs);
|
|
24
|
+
border-radius: var(--pc-border-radius-m);
|
|
25
|
+
user-select: none;
|
|
26
|
+
-webkit-user-select: none;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
transition: all var(--pc-transition-fast) ease-in-out;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.menu-item.menu-item-disabled {
|
|
33
|
+
outline: none;
|
|
34
|
+
opacity: 0.6;
|
|
35
|
+
cursor: not-allowed;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.menu-item.menu-item-loading {
|
|
39
|
+
outline: none;
|
|
40
|
+
cursor: wait;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.menu-item.menu-item-loading *:not(pc-spinner) {
|
|
44
|
+
opacity: 0.6;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.menu-item-loading pc-spinner {
|
|
48
|
+
--indicator-color: currentColor;
|
|
49
|
+
--track-width: 0.0625em;
|
|
50
|
+
position: absolute;
|
|
51
|
+
font-size: 0.75em;
|
|
52
|
+
top: calc(50% - 0.5em);
|
|
53
|
+
left: 0.65rem;
|
|
54
|
+
opacity: 1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.menu-item .label {
|
|
58
|
+
display: inline-block;
|
|
59
|
+
flex: 1 1 auto;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
text-overflow: ellipsis;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.menu-item .prefix {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
flex: 0 0 auto;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.menu-item .prefix::slotted(*) {
|
|
71
|
+
margin-inline-end: var(--pc-spacing-s);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.menu-item .suffix {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
flex: 0 0 auto;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.menu-item .suffix::slotted(*) {
|
|
81
|
+
margin-inline-start: var(--pc-spacing-s);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.menu-item-submenu-expanded::after {
|
|
85
|
+
content: "";
|
|
86
|
+
position: fixed;
|
|
87
|
+
inset: 0;
|
|
88
|
+
clip-path: polygon(
|
|
89
|
+
var(--safe-triangle-cursor-x, 0) var(--safe-triangle-cursor-y, 0),
|
|
90
|
+
var(--safe-triangle-submenu-start-x, 0)
|
|
91
|
+
var(--safe-triangle-submenu-start-y, 0),
|
|
92
|
+
var(--safe-triangle-submenu-end-x, 0)
|
|
93
|
+
var(--safe-triangle-submenu-end-y, 0)
|
|
94
|
+
);
|
|
95
|
+
z-index: calc(var(--pc-z-index-dropdown) - 1);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
:host(:focus-visible) {
|
|
99
|
+
outline: none;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
:host(:hover:not([aria-disabled="true"], :focus-visible)) .menu-item,
|
|
103
|
+
.menu-item-submenu-expanded {
|
|
104
|
+
background-color: var(--pc-color-neutral-100);
|
|
105
|
+
color: var(--pc-color-neutral-950);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:host(:active:not([aria-disabled="true"], :focus-visible)) .menu-item,
|
|
109
|
+
.menu-item-submenu-expanded {
|
|
110
|
+
filter: brightness(95%);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:host(:focus-visible) .menu-item {
|
|
114
|
+
outline: 2px var(--pc-focus-ring-style) var(--pc-focus-ring-color);
|
|
115
|
+
outline-offset: -2px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.menu-item .menu-item-check,
|
|
119
|
+
.menu-item .menu-item-chevron {
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
justify-content: center;
|
|
123
|
+
flex: 0 0 auto;
|
|
124
|
+
width: 1.75em;
|
|
125
|
+
visibility: hidden;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.menu-item-checked .menu-item-check,
|
|
129
|
+
.menu-item-has-submenu .menu-item-chevron {
|
|
130
|
+
visibility: visible;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
pc-popup::part(popup) {
|
|
134
|
+
margin-left: var(--submenu-offset);
|
|
135
|
+
z-index: var(--pc-z-index-dropdown);
|
|
136
|
+
box-shadow: var(--pc-shadow-l);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.menu-item-rtl pc-popup::part(popup) {
|
|
140
|
+
margin-left: calc(-1 * var(--submenu-offset));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
::slotted(pc-menu) {
|
|
144
|
+
max-width: var(--auto-size-available-width) !important;
|
|
145
|
+
max-height: var(--auto-size-available-height) !important;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@media (forced-colors: active) {
|
|
149
|
+
:host(:hover:not([aria-disabled="true"])) .menu-item,
|
|
150
|
+
:host(:focus-visible) .menu-item {
|
|
151
|
+
outline: 1px dashed SelectedItem;
|
|
152
|
+
outline-offset: -1px;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
`;
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
import { html, css } from "lit";
|
|
2
|
+
import type {
|
|
3
|
+
CSSResultGroup,
|
|
4
|
+
ReactiveController,
|
|
5
|
+
ReactiveControllerHost,
|
|
6
|
+
} from "lit";
|
|
7
|
+
import { createRef, ref, type Ref } from "lit/directives/ref.js";
|
|
8
|
+
import { type HasSlotController } from "../../internal/slot.js";
|
|
9
|
+
import type { PcMenuItem } from "./menu-item.js";
|
|
10
|
+
import type { PcPopup } from "../popup/popup.js";
|
|
11
|
+
|
|
12
|
+
export class SubmenuController implements ReactiveController {
|
|
13
|
+
static styles: CSSResultGroup = css`
|
|
14
|
+
slot[hidden] {
|
|
15
|
+
display: none !important;
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
private host: ReactiveControllerHost & PcMenuItem;
|
|
20
|
+
private popupRef: Ref<PcPopup> = createRef();
|
|
21
|
+
private enableSubmenuTimer = -1;
|
|
22
|
+
private isConnected = false;
|
|
23
|
+
private isPopupConnected = false;
|
|
24
|
+
private skidding = 0;
|
|
25
|
+
private readonly hasSlotController: HasSlotController;
|
|
26
|
+
private readonly submenuOpenDelay = 100;
|
|
27
|
+
|
|
28
|
+
constructor(
|
|
29
|
+
host: ReactiveControllerHost & PcMenuItem,
|
|
30
|
+
hasSlotController: HasSlotController,
|
|
31
|
+
) {
|
|
32
|
+
(this.host = host).addController(this);
|
|
33
|
+
this.hasSlotController = hasSlotController;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
hostConnected() {
|
|
37
|
+
if (this.hasSlotController.test("submenu") && !this.host.disabled) {
|
|
38
|
+
this.addListeners();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
hostDisconnected() {
|
|
43
|
+
this.removeListeners();
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
hostUpdated() {
|
|
47
|
+
if (this.hasSlotController.test("submenu") && !this.host.disabled) {
|
|
48
|
+
this.addListeners();
|
|
49
|
+
this.updateSkidding();
|
|
50
|
+
} else {
|
|
51
|
+
this.removeListeners();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
private addListeners() {
|
|
56
|
+
if (!this.isConnected) {
|
|
57
|
+
this.host.addEventListener("mousemove", this.handleMouseMove);
|
|
58
|
+
this.host.addEventListener("mouseover", this.handleMouseOver);
|
|
59
|
+
this.host.addEventListener("keydown", this.handleKeyDown);
|
|
60
|
+
this.host.addEventListener("click", this.handleClick);
|
|
61
|
+
this.host.addEventListener("focusout", this.handleFocusOut);
|
|
62
|
+
this.isConnected = true;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (!this.isPopupConnected) {
|
|
66
|
+
if (this.popupRef.value) {
|
|
67
|
+
this.popupRef.value.addEventListener(
|
|
68
|
+
"mouseover",
|
|
69
|
+
this.handlePopupMouseover,
|
|
70
|
+
);
|
|
71
|
+
this.popupRef.value.addEventListener(
|
|
72
|
+
"pc-reposition",
|
|
73
|
+
this.handlePopupReposition,
|
|
74
|
+
);
|
|
75
|
+
this.isPopupConnected = true;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
private removeListeners() {
|
|
81
|
+
if (this.isConnected) {
|
|
82
|
+
this.host.removeEventListener("mousemove", this.handleMouseMove);
|
|
83
|
+
this.host.removeEventListener("mouseover", this.handleMouseOver);
|
|
84
|
+
this.host.removeEventListener("keydown", this.handleKeyDown);
|
|
85
|
+
this.host.removeEventListener("click", this.handleClick);
|
|
86
|
+
this.host.removeEventListener("focusout", this.handleFocusOut);
|
|
87
|
+
this.isConnected = false;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (this.isPopupConnected) {
|
|
91
|
+
if (this.popupRef.value) {
|
|
92
|
+
this.popupRef.value.removeEventListener(
|
|
93
|
+
"mouseover",
|
|
94
|
+
this.handlePopupMouseover,
|
|
95
|
+
);
|
|
96
|
+
this.popupRef.value.removeEventListener(
|
|
97
|
+
"pc-reposition",
|
|
98
|
+
this.handlePopupReposition,
|
|
99
|
+
);
|
|
100
|
+
this.isPopupConnected = false;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
private handleMouseMove = (event: MouseEvent) => {
|
|
106
|
+
this.host.style.setProperty(
|
|
107
|
+
"--safe-triangle-cursor-x",
|
|
108
|
+
`${event.clientX}px`,
|
|
109
|
+
);
|
|
110
|
+
this.host.style.setProperty(
|
|
111
|
+
"--safe-triangle-cursor-y",
|
|
112
|
+
`${event.clientY}px`,
|
|
113
|
+
);
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
private handleMouseOver = () => {
|
|
117
|
+
if (this.hasSlotController.test("submenu")) {
|
|
118
|
+
this.enableSubmenu();
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
private handleSubmenuEntry(event: KeyboardEvent) {
|
|
123
|
+
const submenuSlot: HTMLSlotElement | null =
|
|
124
|
+
this.host.renderRoot.querySelector('slot[name="submenu"]');
|
|
125
|
+
|
|
126
|
+
if (!submenuSlot) {
|
|
127
|
+
console.error(
|
|
128
|
+
`Cannot activate a submenu if no corresponding menu item can be found. ${this}`,
|
|
129
|
+
);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
let menuItems: NodeListOf<Element> | null = null;
|
|
134
|
+
|
|
135
|
+
for (const element of submenuSlot.assignedElements()) {
|
|
136
|
+
menuItems = element.querySelectorAll(
|
|
137
|
+
'pc-menu-item, [role^="menuitem"]',
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
if (menuItems.length !== 0) {
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (!menuItems || menuItems.length === 0) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
menuItems[0].setAttribute("tabindex", "0");
|
|
150
|
+
|
|
151
|
+
for (let i = 1; i !== menuItems.length; ++i) {
|
|
152
|
+
menuItems[i].setAttribute("tabindex", "-1");
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (this.popupRef.value) {
|
|
156
|
+
event.preventDefault();
|
|
157
|
+
event.stopPropagation();
|
|
158
|
+
if (this.popupRef.value.active) {
|
|
159
|
+
if (menuItems[0] instanceof HTMLElement) {
|
|
160
|
+
menuItems[0].focus();
|
|
161
|
+
}
|
|
162
|
+
} else {
|
|
163
|
+
this.enableSubmenu(false);
|
|
164
|
+
this.host.updateComplete.then(() => {
|
|
165
|
+
if (menuItems[0] instanceof HTMLElement) {
|
|
166
|
+
menuItems[0].focus();
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
this.host.requestUpdate();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
private handleKeyDown = (event: KeyboardEvent) => {
|
|
175
|
+
switch (event.key) {
|
|
176
|
+
case "Escape":
|
|
177
|
+
case "Tab":
|
|
178
|
+
this.disableSubmenu();
|
|
179
|
+
break;
|
|
180
|
+
case "ArrowLeft":
|
|
181
|
+
if (event.target !== this.host) {
|
|
182
|
+
event.preventDefault();
|
|
183
|
+
event.stopPropagation();
|
|
184
|
+
this.host.focus();
|
|
185
|
+
this.disableSubmenu();
|
|
186
|
+
}
|
|
187
|
+
break;
|
|
188
|
+
case "ArrowRight":
|
|
189
|
+
case "Enter":
|
|
190
|
+
case " ":
|
|
191
|
+
this.handleSubmenuEntry(event);
|
|
192
|
+
break;
|
|
193
|
+
default:
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
private handleClick = (event: MouseEvent) => {
|
|
199
|
+
if (event.target === this.host) {
|
|
200
|
+
event.preventDefault();
|
|
201
|
+
event.stopPropagation();
|
|
202
|
+
} else if (
|
|
203
|
+
event.target instanceof Element &&
|
|
204
|
+
(event.target.tagName === "pc-menu-item" ||
|
|
205
|
+
event.target.role?.startsWith("menuitem"))
|
|
206
|
+
) {
|
|
207
|
+
this.disableSubmenu();
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
private handleFocusOut = (event: FocusEvent) => {
|
|
212
|
+
if (
|
|
213
|
+
event.relatedTarget &&
|
|
214
|
+
event.relatedTarget instanceof Element &&
|
|
215
|
+
this.host.contains(event.relatedTarget)
|
|
216
|
+
) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
this.disableSubmenu();
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
private handlePopupMouseover = (event: MouseEvent) => {
|
|
223
|
+
event.stopPropagation();
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
private handlePopupReposition = () => {
|
|
227
|
+
const submenuSlot: HTMLSlotElement | null =
|
|
228
|
+
this.host.renderRoot.querySelector('slot[name="submenu"]');
|
|
229
|
+
const menu = submenuSlot
|
|
230
|
+
?.assignedElements({ flatten: true })
|
|
231
|
+
.filter((element) => element.localName === "pc-menu")[0];
|
|
232
|
+
const isRTL = getComputedStyle(this.host).direction === "rtl";
|
|
233
|
+
|
|
234
|
+
if (!menu) {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
const { left, top, width, height } = menu.getBoundingClientRect();
|
|
239
|
+
|
|
240
|
+
this.host.style.setProperty(
|
|
241
|
+
"--safe-triangle-submenu-start-x",
|
|
242
|
+
`${isRTL ? left + width : left}px`,
|
|
243
|
+
);
|
|
244
|
+
this.host.style.setProperty(
|
|
245
|
+
"--safe-triangle-submenu-start-y",
|
|
246
|
+
`${top}px`,
|
|
247
|
+
);
|
|
248
|
+
this.host.style.setProperty(
|
|
249
|
+
"--safe-triangle-submenu-end-x",
|
|
250
|
+
`${isRTL ? left + width : left}px`,
|
|
251
|
+
);
|
|
252
|
+
this.host.style.setProperty(
|
|
253
|
+
"--safe-triangle-submenu-end-y",
|
|
254
|
+
`${top + height}px`,
|
|
255
|
+
);
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
private setSubmenuState(state: boolean) {
|
|
259
|
+
if (this.popupRef.value) {
|
|
260
|
+
if (this.popupRef.value.active !== state) {
|
|
261
|
+
this.popupRef.value.active = state;
|
|
262
|
+
this.host.requestUpdate();
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
private enableSubmenu(delay = true) {
|
|
268
|
+
if (delay) {
|
|
269
|
+
window.clearTimeout(this.enableSubmenuTimer);
|
|
270
|
+
this.enableSubmenuTimer = window.setTimeout(() => {
|
|
271
|
+
this.setSubmenuState(true);
|
|
272
|
+
}, this.submenuOpenDelay);
|
|
273
|
+
} else {
|
|
274
|
+
this.setSubmenuState(true);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
private disableSubmenu() {
|
|
279
|
+
window.clearTimeout(this.enableSubmenuTimer);
|
|
280
|
+
this.setSubmenuState(false);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
private updateSkidding(): void {
|
|
284
|
+
if (!this.host.parentElement?.computedStyleMap) {
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
const styleMap: StylePropertyMapReadOnly =
|
|
289
|
+
this.host.parentElement.computedStyleMap();
|
|
290
|
+
const attributes: string[] = [
|
|
291
|
+
"padding-top",
|
|
292
|
+
"border-top-width",
|
|
293
|
+
"margin-top",
|
|
294
|
+
];
|
|
295
|
+
|
|
296
|
+
const skidding = attributes.reduce((accumulator, attribute) => {
|
|
297
|
+
const styleValue: CSSStyleValue =
|
|
298
|
+
styleMap.get(attribute) ?? new CSSUnitValue(0, "px");
|
|
299
|
+
const unitValue =
|
|
300
|
+
styleValue instanceof CSSUnitValue
|
|
301
|
+
? styleValue
|
|
302
|
+
: new CSSUnitValue(0, "px");
|
|
303
|
+
const pxValue = unitValue.to("px");
|
|
304
|
+
return accumulator - pxValue.value;
|
|
305
|
+
}, 0);
|
|
306
|
+
|
|
307
|
+
this.skidding = skidding;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
isExpanded(): boolean {
|
|
311
|
+
return this.popupRef.value ? this.popupRef.value.active : false;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
renderSubmenu() {
|
|
315
|
+
const isRTL = getComputedStyle(this.host).direction === "rtl";
|
|
316
|
+
|
|
317
|
+
if (!this.isConnected) {
|
|
318
|
+
return html`<slot name="submenu" hidden></slot>`;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
return html`
|
|
322
|
+
<pc-popup
|
|
323
|
+
${ref(this.popupRef)}
|
|
324
|
+
placement=${isRTL ? "left-start" : "right-start"}
|
|
325
|
+
anchor="anchor"
|
|
326
|
+
flip-fallback-strategy="best-fit"
|
|
327
|
+
skidding=${this.skidding}
|
|
328
|
+
strategy="fixed"
|
|
329
|
+
auto-size="vertical"
|
|
330
|
+
auto-size-padding="10"
|
|
331
|
+
flip
|
|
332
|
+
>
|
|
333
|
+
<slot name="submenu"></slot>
|
|
334
|
+
</pc-popup>
|
|
335
|
+
`;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LitElement, html } from "lit";
|
|
2
|
+
import type { CSSResultGroup } from "lit";
|
|
3
|
+
import { customElement } from "lit/decorators.js";
|
|
4
|
+
import { styles } from "./menu-label.styles.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @summary Menu labels are used to describe a group of menu items.
|
|
8
|
+
* @status experimental
|
|
9
|
+
* @since 0.5.1
|
|
10
|
+
*
|
|
11
|
+
* @slot — The menu label’s content.
|
|
12
|
+
*
|
|
13
|
+
* @csspart base — The component’s base wrapper.
|
|
14
|
+
*/
|
|
15
|
+
@customElement("pc-menu-label")
|
|
16
|
+
export class PcMenuLabel extends LitElement {
|
|
17
|
+
static styles: CSSResultGroup = styles;
|
|
18
|
+
|
|
19
|
+
render() {
|
|
20
|
+
return html`<slot part="base" class="menu-label"></slot>`;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
|
|
3
|
+
export const styles = css`
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.menu-label {
|
|
9
|
+
display: inline-block;
|
|
10
|
+
font-family: var(--pc-font-sans);
|
|
11
|
+
font-size: var(--pc-font-size-s);
|
|
12
|
+
font-weight: var(--pc-font-weight-semibold);
|
|
13
|
+
line-height: var(--pc-line-height-normal);
|
|
14
|
+
letter-spacing: var(--pc-letter-spacing-normal);
|
|
15
|
+
color: var(--pc-color-neutral-500);
|
|
16
|
+
padding: var(--pc-spacing-s) 2rem;
|
|
17
|
+
user-select: none;
|
|
18
|
+
-webkit-user-select: none;
|
|
19
|
+
}
|
|
20
|
+
`;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { LitElement, html } from "lit";
|
|
2
|
+
import type { CSSResultGroup } from "lit";
|
|
3
|
+
import { customElement, property, query, state } from "lit/decorators.js";
|
|
4
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
5
|
+
import { watch } from "../../internal/watch.js";
|
|
6
|
+
import { PcIcon } from "../icon/icon.js";
|
|
7
|
+
import { styles } from "../option/option.styles.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @summary Options define the selectable items within various form controls such as a [select](/components/select).
|
|
11
|
+
* @status experimental
|
|
12
|
+
* @since 0.5.1
|
|
13
|
+
*
|
|
14
|
+
* @dependency pc-icon
|
|
15
|
+
*
|
|
16
|
+
* @slot — The option’s label.
|
|
17
|
+
* @slot prefix — Used to prepend an icon or similar element to the menu item.
|
|
18
|
+
* @slot suffix — Used to append an icon or similar element to the menu item.
|
|
19
|
+
*
|
|
20
|
+
* @csspart checked-icon — The checked icon, a `<pc-icon>` element.
|
|
21
|
+
* @csspart base — The component’s base wrapper.
|
|
22
|
+
* @csspart label — The option’s label.
|
|
23
|
+
* @csspart prefix — The container that wraps the prefix.
|
|
24
|
+
* @csspart suffix — The container that wraps the suffix.
|
|
25
|
+
*/
|
|
26
|
+
@customElement("pc-option")
|
|
27
|
+
export class PcOption extends LitElement {
|
|
28
|
+
static styles: CSSResultGroup = styles;
|
|
29
|
+
static dependencies = { "pc-icon": PcIcon };
|
|
30
|
+
|
|
31
|
+
private isInitialized = false;
|
|
32
|
+
|
|
33
|
+
@query(".option-label") defaultSlot!: HTMLSlotElement;
|
|
34
|
+
|
|
35
|
+
@state() current = false;
|
|
36
|
+
@state() selected = false;
|
|
37
|
+
|
|
38
|
+
/** The option’s value. When selected, the containing form control will receive this value. The value must be unique from other options in the same group. Values must not contain spaces, as spaces are used as delimiters when listing multiple values. */
|
|
39
|
+
@property({ reflect: true }) value = "";
|
|
40
|
+
|
|
41
|
+
/** Disables the option, preventing selection. */
|
|
42
|
+
@property({ type: Boolean, reflect: true }) disabled = false;
|
|
43
|
+
|
|
44
|
+
connectedCallback() {
|
|
45
|
+
super.connectedCallback();
|
|
46
|
+
this.setAttribute("role", "option");
|
|
47
|
+
this.setAttribute("aria-selected", "false");
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
private handleDefaultSlotChange() {
|
|
51
|
+
if (this.isInitialized) {
|
|
52
|
+
customElements.whenDefined("pc-select").then(() => {
|
|
53
|
+
const controller = this.closest("pc-select") as {
|
|
54
|
+
handleDefaultSlotChange?: () => void;
|
|
55
|
+
} | null;
|
|
56
|
+
if (
|
|
57
|
+
controller &&
|
|
58
|
+
typeof controller.handleDefaultSlotChange === "function"
|
|
59
|
+
) {
|
|
60
|
+
controller.handleDefaultSlotChange();
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
} else {
|
|
64
|
+
this.isInitialized = true;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@watch("disabled")
|
|
69
|
+
handleDisabledChange() {
|
|
70
|
+
this.setAttribute("aria-disabled", this.disabled ? "true" : "false");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@watch("selected")
|
|
74
|
+
handleSelectedChange() {
|
|
75
|
+
this.setAttribute("aria-selected", this.selected ? "true" : "false");
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@watch("value")
|
|
79
|
+
handleValueChange() {
|
|
80
|
+
if (typeof this.value !== "string") {
|
|
81
|
+
this.value = String(this.value);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (this.value.includes(" ")) {
|
|
85
|
+
console.warn(
|
|
86
|
+
`Option values must not contain a space. All spaces have been replaced with underscores. ${this}`,
|
|
87
|
+
);
|
|
88
|
+
this.value = this.value.replace(/ /g, "_");
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** Returns a plain text label based on the option’s content. */
|
|
93
|
+
getTextLabel() {
|
|
94
|
+
const nodes = this.childNodes;
|
|
95
|
+
let label = "";
|
|
96
|
+
|
|
97
|
+
[...nodes].forEach((node) => {
|
|
98
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
99
|
+
if (!(node as HTMLElement).hasAttribute("slot")) {
|
|
100
|
+
label += (node as HTMLElement).textContent;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
105
|
+
label += node.textContent;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
return label.trim();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
render() {
|
|
113
|
+
return html`
|
|
114
|
+
<div
|
|
115
|
+
part="base"
|
|
116
|
+
class=${classMap({
|
|
117
|
+
"option": true,
|
|
118
|
+
"option-current": this.current === true,
|
|
119
|
+
"option-selected": this.selected === true,
|
|
120
|
+
"option-disabled": this.disabled === true,
|
|
121
|
+
})}
|
|
122
|
+
>
|
|
123
|
+
<pc-icon
|
|
124
|
+
class="option-check"
|
|
125
|
+
part="checked-icon"
|
|
126
|
+
library="system"
|
|
127
|
+
icon-style="solid"
|
|
128
|
+
name="check"
|
|
129
|
+
aria-hidden="true"
|
|
130
|
+
></pc-icon>
|
|
131
|
+
<slot class="prefix" part="prefix" name="prefix"></slot>
|
|
132
|
+
<slot
|
|
133
|
+
class="label"
|
|
134
|
+
part="label"
|
|
135
|
+
@slotchange=${this.handleDefaultSlotChange}
|
|
136
|
+
></slot>
|
|
137
|
+
<slot class="suffix" part="suffix" name="prefix"></slot>
|
|
138
|
+
</div>
|
|
139
|
+
`;
|
|
140
|
+
}
|
|
141
|
+
}
|