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,73 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
|
|
3
|
+
export const styles = css`
|
|
4
|
+
:host {
|
|
5
|
+
--divider-width: 2px;
|
|
6
|
+
--handle-size: 2.5rem;
|
|
7
|
+
display: inline-block;
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.comparer {
|
|
12
|
+
max-width: 100%;
|
|
13
|
+
max-height: 100%;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.comparer-before-content,
|
|
18
|
+
.comparer-after-content {
|
|
19
|
+
display: block;
|
|
20
|
+
pointer-events: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.comparer-before-content ::slotted(*),
|
|
24
|
+
.comparer-after-content ::slotted(*) {
|
|
25
|
+
display: block;
|
|
26
|
+
max-width: 100% !important;
|
|
27
|
+
height: auto;
|
|
28
|
+
border-radius: var(--pc-border-radius-m);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.comparer-after-content {
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: 0;
|
|
34
|
+
left: 0;
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 100%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.comparer-divider {
|
|
40
|
+
display: flex;
|
|
41
|
+
position: absolute;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
top: 0;
|
|
45
|
+
width: var(--divider-width);
|
|
46
|
+
height: 100%;
|
|
47
|
+
background-color: var(--pc-color-neutral-0);
|
|
48
|
+
translate: calc(var(--divider-width) / -2);
|
|
49
|
+
cursor: ew-resize;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.comparer-handle {
|
|
53
|
+
display: flex;
|
|
54
|
+
position: absolute;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
top: calc(50% - (var(--handle-size) / 2));
|
|
58
|
+
width: var(--handle-size);
|
|
59
|
+
height: var(--handle-size);
|
|
60
|
+
background-color: var(--pc-color-neutral-0);
|
|
61
|
+
border-radius: var(--pc-border-radius-circle);
|
|
62
|
+
font-size: calc(var(--handle-size) * 0.5);
|
|
63
|
+
color: var(--pc-color-neutral-700);
|
|
64
|
+
cursor: inherit;
|
|
65
|
+
z-index: 10;
|
|
66
|
+
transition: outline var(--pc-transition-fast) ease-in-out;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.comparer-handle:focus-visible {
|
|
70
|
+
outline: var(--pc-focus-ring);
|
|
71
|
+
outline-offset: var(--pc-focus-ring);
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
@@ -0,0 +1,272 @@
|
|
|
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 {
|
|
6
|
+
getAnimation,
|
|
7
|
+
setDefaultAnimation,
|
|
8
|
+
} from "../../utilities/animation-registry.js";
|
|
9
|
+
import { emit } from "../../internal/emit.js";
|
|
10
|
+
import { PcIcon } from "../icon/icon.js";
|
|
11
|
+
import { PcTooltip } from "../tooltip/tooltip.js";
|
|
12
|
+
import { styles } from "./copy-button.styles.js";
|
|
13
|
+
|
|
14
|
+
setDefaultAnimation("copy.in", {
|
|
15
|
+
keyframes: [
|
|
16
|
+
{ scale: "0.6", opacity: "0" },
|
|
17
|
+
{ scale: "1.1", opacity: "1" },
|
|
18
|
+
{ scale: "0.95", opacity: "1" },
|
|
19
|
+
{ scale: "1", opacity: "1" },
|
|
20
|
+
],
|
|
21
|
+
options: {
|
|
22
|
+
duration: 350,
|
|
23
|
+
easing: "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
setDefaultAnimation("copy.out", {
|
|
28
|
+
keyframes: [
|
|
29
|
+
{ scale: "1", opacity: "1" },
|
|
30
|
+
{ scale: "0.85", opacity: "0" },
|
|
31
|
+
],
|
|
32
|
+
options: {
|
|
33
|
+
duration: 200,
|
|
34
|
+
easing: "cubic-bezier(0.75, 0, 0.9, 0.05)",
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @summary Copies text data to the clipboard when the user clicks the trigger.
|
|
40
|
+
* @status experimental
|
|
41
|
+
* @since 0.5.1
|
|
42
|
+
*
|
|
43
|
+
* @dependency pc-icon
|
|
44
|
+
* @dependency pc-tooltip
|
|
45
|
+
*
|
|
46
|
+
* @slot copy-icon — The icon to show in the default copy state. Works best with `<pc-icon>`.
|
|
47
|
+
* @slot success-icon — The icon to show when the content is copied. Works best with `<pc-icon>`.
|
|
48
|
+
* @slot error-icon — The icon to show when a copy error occurs. Works best with `<pc-icon>`.
|
|
49
|
+
*
|
|
50
|
+
* @event pc-copy — Emitted when the data has been copied.
|
|
51
|
+
* @event pc-error — Emitted when the data could not be copied.
|
|
52
|
+
*
|
|
53
|
+
* @csspart button — The internal `<button>` element.
|
|
54
|
+
* @csspart copy-icon — The container that holds the copy icon.
|
|
55
|
+
* @csspart success-icon — The container that holds the success icon.
|
|
56
|
+
* @csspart error-icon — The container that holds the error icon.
|
|
57
|
+
* @csspart tooltip__base — The tooltip’s `base` part.
|
|
58
|
+
* @csspart tooltip__base__popup — The tooltip’s `popup` part.
|
|
59
|
+
* @csspart tooltip__base__arrow — The tooltip’s `arrow` part.
|
|
60
|
+
* @csspart tooltip__body — The tooltip’s `body` part.
|
|
61
|
+
*
|
|
62
|
+
* @cssproperty --success-color — The colour to use for success feedback.
|
|
63
|
+
* @cssproperty --error-color — The colour to use for error feedback.
|
|
64
|
+
*
|
|
65
|
+
* @animation copy.in — The animation to use when the icons animate in.
|
|
66
|
+
* @animation copy.out — The animation to use when the icons animate out.
|
|
67
|
+
*/
|
|
68
|
+
@customElement("pc-copy-button")
|
|
69
|
+
export class PcCopyButton extends LitElement {
|
|
70
|
+
static styles: CSSResultGroup = styles;
|
|
71
|
+
/** @internal This is an internal property. */
|
|
72
|
+
static dependencies = { "pc-icon": PcIcon, "pc-tooltip": PcTooltip };
|
|
73
|
+
|
|
74
|
+
/** @internal This is an internal property. */
|
|
75
|
+
@query('slot[name="copy-icon"]') copyIcon!: HTMLSlotElement;
|
|
76
|
+
/** @internal This is an internal property. */
|
|
77
|
+
@query('slot[name="success-icon"]') successIcon!: HTMLSlotElement;
|
|
78
|
+
/** @internal This is an internal property. */
|
|
79
|
+
@query('slot[name="error-icon"]') errorIcon!: HTMLSlotElement;
|
|
80
|
+
/** @internal This is an internal property. */
|
|
81
|
+
@query("pc-tooltip") tooltip!: PcTooltip;
|
|
82
|
+
|
|
83
|
+
/** @internal This is an internal property. */
|
|
84
|
+
@state() isCopying = false;
|
|
85
|
+
/** @internal This is an internal property. */
|
|
86
|
+
@state() status: "rest" | "success" | "error" = "rest";
|
|
87
|
+
|
|
88
|
+
/** The text value to copy. */
|
|
89
|
+
@property() value = "";
|
|
90
|
+
|
|
91
|
+
/**An id that references an element in the same document from which data will be copied. If both this and `value` are present, this value will take precedence. By default, the target element’s `textContent` will be copied. To copy an attribute, append the attribute name wrapped in square brackets (e.g., `from="element[value]"`). To copy a property, append a dot and the property name (e.g., `from="element.value"`). */
|
|
92
|
+
@property() from = "";
|
|
93
|
+
|
|
94
|
+
/** Disables the copy button. */
|
|
95
|
+
@property({ type: Boolean, reflect: true }) disabled = false;
|
|
96
|
+
|
|
97
|
+
/** A custom label to show in the tooltip. */
|
|
98
|
+
@property({ attribute: "copy-label" }) copyLabel = "";
|
|
99
|
+
|
|
100
|
+
/** A custom label to show in the tooltip after copying. */
|
|
101
|
+
@property({ attribute: "success-label" }) successLabel = "";
|
|
102
|
+
|
|
103
|
+
/** A custom label to show in the tooltip when a copy error occurs. */
|
|
104
|
+
@property({ attribute: "error-label" }) errorLabel = "";
|
|
105
|
+
|
|
106
|
+
/** The length of time to show feedback before restoring the default trigger. */
|
|
107
|
+
@property({ attribute: "feedback-duration", type: Number })
|
|
108
|
+
feedbackDuration = 1000;
|
|
109
|
+
|
|
110
|
+
/** The preferred placement of the tooltip. */
|
|
111
|
+
@property({ attribute: "tooltip-placement" }) tooltipPlacement:
|
|
112
|
+
| "top"
|
|
113
|
+
| "right"
|
|
114
|
+
| "bottom"
|
|
115
|
+
| "left" = "top";
|
|
116
|
+
|
|
117
|
+
/** Enable this option to prevent the tooltip from being clipped when the component is placed inside a container with `overflow: auto|hidden|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all situations. */
|
|
118
|
+
@property({ type: Boolean }) hoist = false;
|
|
119
|
+
|
|
120
|
+
private async handleCopy() {
|
|
121
|
+
if (this.disabled || this.isCopying) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
this.isCopying = true;
|
|
125
|
+
|
|
126
|
+
let valueToCopy = this.value;
|
|
127
|
+
|
|
128
|
+
if (this.from) {
|
|
129
|
+
const root = this.getRootNode() as ShadowRoot | Document;
|
|
130
|
+
|
|
131
|
+
const isProperty = this.from.includes(".");
|
|
132
|
+
const isAttribute =
|
|
133
|
+
this.from.includes("[") && this.from.includes("]");
|
|
134
|
+
let id = this.from;
|
|
135
|
+
let field = "";
|
|
136
|
+
|
|
137
|
+
if (isProperty) {
|
|
138
|
+
[id, field] = this.from.trim().split(".");
|
|
139
|
+
} else if (isAttribute) {
|
|
140
|
+
[id, field] = this.from.trim().replace(/\]$/, "").split("[");
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const target =
|
|
144
|
+
"getElementById" in root ? root.getElementById(id) : null;
|
|
145
|
+
|
|
146
|
+
if (target) {
|
|
147
|
+
if (isAttribute) {
|
|
148
|
+
valueToCopy = target.getAttribute(field) || "";
|
|
149
|
+
} else if (isProperty) {
|
|
150
|
+
// @ts-expect-error — Accessing a property with dynamic types
|
|
151
|
+
valueToCopy = target[field] || "";
|
|
152
|
+
} else {
|
|
153
|
+
valueToCopy = target.textContent || "";
|
|
154
|
+
}
|
|
155
|
+
} else {
|
|
156
|
+
this.showStatus("error");
|
|
157
|
+
emit(this, "pc-error");
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (!valueToCopy) {
|
|
162
|
+
this.showStatus("error");
|
|
163
|
+
emit(this, "pc-error");
|
|
164
|
+
} else {
|
|
165
|
+
try {
|
|
166
|
+
await navigator.clipboard.writeText(valueToCopy);
|
|
167
|
+
this.showStatus("success");
|
|
168
|
+
emit(this, "pc-copy", {
|
|
169
|
+
detail: {
|
|
170
|
+
value: valueToCopy,
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
} catch {
|
|
174
|
+
this.showStatus("error");
|
|
175
|
+
emit(this, "pc-error");
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
private async showStatus(status: "success" | "error") {
|
|
181
|
+
const copyLabel = this.copyLabel || "Copy";
|
|
182
|
+
const successLabel = this.successLabel || "Copied!";
|
|
183
|
+
const errorLabel = this.errorLabel || "Error";
|
|
184
|
+
const iconToShow =
|
|
185
|
+
status === "success" ? this.successIcon : this.errorIcon;
|
|
186
|
+
const showAnimation = getAnimation(this, "copy.in", { dir: "ltr" });
|
|
187
|
+
const hideAnimation = getAnimation(this, "copy.out", { dir: "ltr" });
|
|
188
|
+
|
|
189
|
+
this.tooltip.content = status === "success" ? successLabel : errorLabel;
|
|
190
|
+
|
|
191
|
+
await this.copyIcon.animate(
|
|
192
|
+
hideAnimation.keyframes,
|
|
193
|
+
hideAnimation.options,
|
|
194
|
+
).finished;
|
|
195
|
+
this.copyIcon.hidden = true;
|
|
196
|
+
this.status = status;
|
|
197
|
+
iconToShow.hidden = false;
|
|
198
|
+
await iconToShow.animate(showAnimation.keyframes, showAnimation.options)
|
|
199
|
+
.finished;
|
|
200
|
+
|
|
201
|
+
setTimeout(async () => {
|
|
202
|
+
await iconToShow.animate(
|
|
203
|
+
hideAnimation.keyframes,
|
|
204
|
+
hideAnimation.options,
|
|
205
|
+
).finished;
|
|
206
|
+
iconToShow.hidden = true;
|
|
207
|
+
this.status = "rest";
|
|
208
|
+
this.copyIcon.hidden = false;
|
|
209
|
+
await this.copyIcon.animate(
|
|
210
|
+
showAnimation.keyframes,
|
|
211
|
+
showAnimation.options,
|
|
212
|
+
).finished;
|
|
213
|
+
|
|
214
|
+
this.tooltip.content = copyLabel;
|
|
215
|
+
this.isCopying = false;
|
|
216
|
+
}, this.feedbackDuration);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
render() {
|
|
220
|
+
const copyLabel = this.copyLabel || "Copy";
|
|
221
|
+
|
|
222
|
+
return html`
|
|
223
|
+
<pc-tooltip
|
|
224
|
+
class=${classMap({
|
|
225
|
+
"copy-button-container": true,
|
|
226
|
+
"copy-button-success": this.status === "success",
|
|
227
|
+
"copy-button-error": this.status === "error",
|
|
228
|
+
})}
|
|
229
|
+
content=${copyLabel}
|
|
230
|
+
placement=${this.tooltipPlacement}
|
|
231
|
+
?disabled=${this.disabled}
|
|
232
|
+
?hoist=${this.hoist}
|
|
233
|
+
exportparts="
|
|
234
|
+
base:tooltip__base,
|
|
235
|
+
base-popup:tooltip__base__popup,
|
|
236
|
+
base-arrow:tooltip__base__arrow,
|
|
237
|
+
body:tooltip__body
|
|
238
|
+
"
|
|
239
|
+
>
|
|
240
|
+
<button
|
|
241
|
+
class="copy-button"
|
|
242
|
+
type="button"
|
|
243
|
+
part="button"
|
|
244
|
+
?disabled=${this.disabled}
|
|
245
|
+
@click=${this.handleCopy}
|
|
246
|
+
>
|
|
247
|
+
<slot part="copy-icon" name="copy-icon">
|
|
248
|
+
<pc-icon
|
|
249
|
+
library="system"
|
|
250
|
+
icon-style="regular"
|
|
251
|
+
name="copy"
|
|
252
|
+
></pc-icon>
|
|
253
|
+
</slot>
|
|
254
|
+
<slot part="success-icon" name="success-icon" hidden>
|
|
255
|
+
<pc-icon
|
|
256
|
+
library="system"
|
|
257
|
+
icon-style="solid"
|
|
258
|
+
name="check"
|
|
259
|
+
></pc-icon>
|
|
260
|
+
</slot>
|
|
261
|
+
<slot part="error-icon" name="error-icon" hidden>
|
|
262
|
+
<pc-icon
|
|
263
|
+
library="system"
|
|
264
|
+
icon-style="solid"
|
|
265
|
+
name="xmark"
|
|
266
|
+
></pc-icon>
|
|
267
|
+
</slot>
|
|
268
|
+
</button>
|
|
269
|
+
</pc-tooltip>
|
|
270
|
+
`;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
|
|
3
|
+
export const styles = css`
|
|
4
|
+
:host {
|
|
5
|
+
--error-color: var(--pc-color-danger-600);
|
|
6
|
+
--success-color: var(--pc-color-success-600);
|
|
7
|
+
display: inline-block;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.copy-button {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
flex: 0 0 auto;
|
|
14
|
+
background: transparent;
|
|
15
|
+
border: none;
|
|
16
|
+
border-radius: var(--pc-border-radius-m);
|
|
17
|
+
font-size: inherit;
|
|
18
|
+
color: inherit;
|
|
19
|
+
padding: var(--pc-spacing-s);
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
transition: all var(--pc-transition-fast) ease-in-out;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.copy-button:hover:not([disabled]),
|
|
25
|
+
.copy-button:focus-visible:not([disabled]) {
|
|
26
|
+
background-color: var(--pc-color-neutral-200);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.copy-button:active:not([disabled]) {
|
|
30
|
+
background-color: var(--pc-color-neutral-100);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.copy-button-success .copy-button {
|
|
34
|
+
color: var(--success-color);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.copy-button-error .copy-button {
|
|
38
|
+
color: var(--error-color);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.copy-button:focus-visible {
|
|
42
|
+
outline: var(--pc-focus-ring);
|
|
43
|
+
outline-offset: var(--pc-focus-ring-offset);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.copy-button[disabled] {
|
|
47
|
+
opacity: 0.6;
|
|
48
|
+
cursor: not-allowed !important;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
slot {
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* This is included since browsers don’t handle the hidden attribute well on slot elements */
|
|
56
|
+
slot[hidden] {
|
|
57
|
+
display: none !important;
|
|
58
|
+
}
|
|
59
|
+
`;
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { LitElement, html } from "lit";
|
|
2
|
+
import type { CSSResultGroup } from "lit";
|
|
3
|
+
import { customElement, property, query } from "lit/decorators.js";
|
|
4
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
5
|
+
import {
|
|
6
|
+
animateTo,
|
|
7
|
+
shimKeyframesHeightAuto,
|
|
8
|
+
stopAnimations,
|
|
9
|
+
} from "../../internal/animate.js";
|
|
10
|
+
import {
|
|
11
|
+
getAnimation,
|
|
12
|
+
setDefaultAnimation,
|
|
13
|
+
} from "../../utilities/animation-registry.js";
|
|
14
|
+
import { waitForEvent } from "../../internal/event.js";
|
|
15
|
+
import { watch } from "../../internal/watch.js";
|
|
16
|
+
import { emit } from "../../internal/emit.js";
|
|
17
|
+
import { PcIcon } from "../icon/icon.js";
|
|
18
|
+
import { styles } from "../details/details.styles.js";
|
|
19
|
+
|
|
20
|
+
setDefaultAnimation("details.show", {
|
|
21
|
+
keyframes: [
|
|
22
|
+
{ height: "0", opacity: "0" },
|
|
23
|
+
{ height: "auto", opacity: "1" },
|
|
24
|
+
],
|
|
25
|
+
options: { duration: 300, easing: "cubic-bezier(0.33, 1, 0.68, 1)" },
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
setDefaultAnimation("details.hide", {
|
|
29
|
+
keyframes: [
|
|
30
|
+
{ height: "auto", opacity: "1" },
|
|
31
|
+
{ height: "0", opacity: "0" },
|
|
32
|
+
],
|
|
33
|
+
options: { duration: 200, easing: "cubic-bezier(0.55, 0, 0.55, 0.2)" },
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
@customElement("pc-details")
|
|
37
|
+
export class PcDetails extends LitElement {
|
|
38
|
+
static styles: CSSResultGroup = styles;
|
|
39
|
+
static dependencies = { "pc-icon": PcIcon };
|
|
40
|
+
|
|
41
|
+
@query(".details") details!: HTMLDetailsElement;
|
|
42
|
+
@query(".details-header") header!: HTMLElement;
|
|
43
|
+
@query(".details-body") body!: HTMLElement;
|
|
44
|
+
@query(".details-expand-icon-slot") expandIconSlot!: HTMLSlotElement;
|
|
45
|
+
|
|
46
|
+
detailsObserver!: MutationObserver;
|
|
47
|
+
|
|
48
|
+
@property({ type: Boolean, reflect: true }) disabled = false;
|
|
49
|
+
|
|
50
|
+
@property({ type: Boolean, reflect: true }) open = false;
|
|
51
|
+
|
|
52
|
+
@property() summary?: string;
|
|
53
|
+
|
|
54
|
+
firstUpdated() {
|
|
55
|
+
this.body.style.height = this.open ? "auto" : "0";
|
|
56
|
+
|
|
57
|
+
if (this.open) {
|
|
58
|
+
this.details.open = true;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
this.detailsObserver = new MutationObserver((changes) => {
|
|
62
|
+
for (const change of changes) {
|
|
63
|
+
if (
|
|
64
|
+
change.type === "attributes" &&
|
|
65
|
+
change.attributeName === "open"
|
|
66
|
+
) {
|
|
67
|
+
if (this.details.open) {
|
|
68
|
+
this.show();
|
|
69
|
+
} else {
|
|
70
|
+
this.hide();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
this.detailsObserver.observe(this.details, { attributes: true });
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
disconnectedCallback() {
|
|
79
|
+
super.disconnectedCallback();
|
|
80
|
+
this.detailsObserver?.disconnect();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
private handleSummaryClick(event: MouseEvent) {
|
|
84
|
+
event.preventDefault();
|
|
85
|
+
|
|
86
|
+
if (!this.disabled) {
|
|
87
|
+
if (this.open) {
|
|
88
|
+
this.hide();
|
|
89
|
+
} else {
|
|
90
|
+
this.show();
|
|
91
|
+
}
|
|
92
|
+
this.header.focus();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
private handleSummaryKeyDown(event: KeyboardEvent) {
|
|
97
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
98
|
+
event.preventDefault();
|
|
99
|
+
|
|
100
|
+
if (this.open) {
|
|
101
|
+
this.hide();
|
|
102
|
+
} else {
|
|
103
|
+
this.show();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (event.key === "ArrowUp" || event.key === "ArrowLeft") {
|
|
108
|
+
event.preventDefault();
|
|
109
|
+
this.hide();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (event.key === "ArrowDown" || event.key === "ArrowRight") {
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
this.show();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@watch("open", { waitUntilFirstUpdate: true })
|
|
119
|
+
async handleOpenChange() {
|
|
120
|
+
if (this.open) {
|
|
121
|
+
this.details.open = true;
|
|
122
|
+
|
|
123
|
+
const pcShowEvent = emit(this, "pc-show", {
|
|
124
|
+
cancelable: true,
|
|
125
|
+
}) as unknown as Event;
|
|
126
|
+
|
|
127
|
+
if (pcShowEvent.defaultPrevented) {
|
|
128
|
+
this.open = false;
|
|
129
|
+
this.details.open = false;
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
await stopAnimations(this.body);
|
|
134
|
+
|
|
135
|
+
const { keyframes, options } = getAnimation(this, "details.show", {
|
|
136
|
+
dir: document.documentElement.dir || "ltr",
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
await animateTo(
|
|
140
|
+
this.body,
|
|
141
|
+
shimKeyframesHeightAuto(keyframes, this.body.scrollHeight),
|
|
142
|
+
options,
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
this.body.style.height = "auto";
|
|
146
|
+
emit(this, "pc-after-show");
|
|
147
|
+
} else {
|
|
148
|
+
const pcHide = emit(this, "pc-hide", {
|
|
149
|
+
cancelable: true,
|
|
150
|
+
}) as unknown as Event;
|
|
151
|
+
|
|
152
|
+
if (pcHide.defaultPrevented) {
|
|
153
|
+
this.details.open = true;
|
|
154
|
+
this.open = true;
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
await stopAnimations(this.body);
|
|
159
|
+
|
|
160
|
+
const { keyframes, options } = getAnimation(this, "details.hide", {
|
|
161
|
+
dir: document.documentElement.dir || "ltr",
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
await animateTo(
|
|
165
|
+
this.body,
|
|
166
|
+
shimKeyframesHeightAuto(keyframes, this.body.scrollHeight),
|
|
167
|
+
options,
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
this.body.style.height = "auto";
|
|
171
|
+
|
|
172
|
+
this.details.open = false;
|
|
173
|
+
emit(this, "pc-after-hide");
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
async show() {
|
|
178
|
+
if (this.open || this.disabled) {
|
|
179
|
+
return undefined;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
this.open = true;
|
|
183
|
+
return waitForEvent(this, "pc-after-show");
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
async hide() {
|
|
187
|
+
if (!this.open || this.disabled) {
|
|
188
|
+
return undefined;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
this.open = false;
|
|
192
|
+
return waitForEvent(this, "pc-after-hide");
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
render() {
|
|
196
|
+
const isRTL =
|
|
197
|
+
document.documentElement.dir === "rtl" ||
|
|
198
|
+
(!document.documentElement.dir &&
|
|
199
|
+
getComputedStyle(document.documentElement).direction === "rtl");
|
|
200
|
+
|
|
201
|
+
return html`
|
|
202
|
+
<details
|
|
203
|
+
part="base"
|
|
204
|
+
class=${classMap({
|
|
205
|
+
"details": true,
|
|
206
|
+
"details-open": this.open === true,
|
|
207
|
+
"details-disabled": this.disabled === true,
|
|
208
|
+
"details-rtl": isRTL === true,
|
|
209
|
+
})}
|
|
210
|
+
>
|
|
211
|
+
<summary
|
|
212
|
+
part="header"
|
|
213
|
+
class="details-header"
|
|
214
|
+
id="header"
|
|
215
|
+
role="button"
|
|
216
|
+
aria-expanded=${this.open ? "true" : "false"}
|
|
217
|
+
aria-controls="content"
|
|
218
|
+
aria-disabled=${this.disabled ? "true" : "false"}
|
|
219
|
+
tabindex=${this.disabled ? "-1" : "0"}
|
|
220
|
+
@click=${this.handleSummaryClick}
|
|
221
|
+
@keydown=${this.handleSummaryKeyDown}
|
|
222
|
+
>
|
|
223
|
+
<slot class="details-summary" part="summary" name="summary">
|
|
224
|
+
${this.summary}
|
|
225
|
+
</slot>
|
|
226
|
+
|
|
227
|
+
<span part="summary-icon" class="summary-icon">
|
|
228
|
+
<slot name="expand-icon">
|
|
229
|
+
<pc-icon
|
|
230
|
+
library="system"
|
|
231
|
+
icon-style="solid"
|
|
232
|
+
name=${isRTL ? "chevron-left" : "chevron-right"}
|
|
233
|
+
></pc-icon>
|
|
234
|
+
</slot>
|
|
235
|
+
<slot name="collapse-icon">
|
|
236
|
+
<pc-icon
|
|
237
|
+
library="system"
|
|
238
|
+
icon-style="solid"
|
|
239
|
+
name=${isRTL ? "chevron-left" : "chevron-right"}
|
|
240
|
+
></pc-icon>
|
|
241
|
+
</slot>
|
|
242
|
+
</span>
|
|
243
|
+
</summary>
|
|
244
|
+
|
|
245
|
+
<div
|
|
246
|
+
class="details-body"
|
|
247
|
+
role="region"
|
|
248
|
+
aria-labelledby="header"
|
|
249
|
+
>
|
|
250
|
+
<slot
|
|
251
|
+
class="details-content"
|
|
252
|
+
part="content"
|
|
253
|
+
id="content"
|
|
254
|
+
></slot>
|
|
255
|
+
</div>
|
|
256
|
+
</details>
|
|
257
|
+
`;
|
|
258
|
+
}
|
|
259
|
+
}
|