@emuanalytics/flow-rdf-ui 4.0.4 → 4.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/alert/alert.component.mjs +202 -0
- package/dist/components/alert/alert.mjs +5 -0
- package/dist/components/alert/alert.styles.mjs +107 -0
- package/dist/components/animation/animation.component.mjs +207 -0
- package/dist/components/animation/animation.mjs +5 -0
- package/dist/components/animation/animation.styles.mjs +12 -0
- package/dist/components/animation/animations.mjs +11 -0
- package/dist/components/avatar/avatar.component.mjs +95 -0
- package/dist/components/avatar/avatar.mjs +5 -0
- package/dist/components/avatar/avatar.styles.mjs +70 -0
- package/dist/components/badge/badge.component.mjs +62 -0
- package/dist/components/badge/badge.mjs +5 -0
- package/dist/components/badge/badge.styles.mjs +105 -0
- package/dist/components/breadcrumb/breadcrumb.component.mjs +82 -0
- package/dist/components/breadcrumb/breadcrumb.mjs +5 -0
- package/dist/components/breadcrumb/breadcrumb.styles.mjs +14 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.component.mjs +73 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.mjs +5 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.styles.mjs +90 -0
- package/dist/components/button/button.component.mjs +310 -0
- package/dist/components/button/button.mjs +5 -0
- package/dist/components/button/button.styles.mjs +690 -0
- package/dist/components/button-group/button-group.component.mjs +108 -0
- package/dist/components/button-group/button-group.mjs +5 -0
- package/dist/components/button-group/button-group.styles.mjs +21 -0
- package/dist/components/calendar/calendar.component.mjs +320 -0
- package/dist/components/calendar/calendar.mjs +5 -0
- package/dist/components/calendar/calendar.styles.mjs +145 -0
- package/dist/components/card/card.component.mjs +33 -0
- package/dist/components/card/card.mjs +5 -0
- package/dist/components/card/card.styles.mjs +73 -0
- package/dist/components/carousel/autoplay-controller.mjs +56 -0
- package/dist/components/carousel/carousel.component.mjs +406 -0
- package/dist/components/carousel/carousel.mjs +5 -0
- package/dist/components/carousel/carousel.styles.mjs +162 -0
- package/dist/components/carousel/scroll-controller.mjs +148 -0
- package/dist/components/carousel-item/carousel-item.component.mjs +22 -0
- package/dist/components/carousel-item/carousel-item.mjs +5 -0
- package/dist/components/carousel-item/carousel-item.styles.mjs +28 -0
- package/dist/components/chart/chart.component.mjs +82 -0
- package/dist/components/chart/chart.mjs +5 -0
- package/dist/components/chart/chart.styles.mjs +80 -0
- package/dist/components/chart/chartjs-plugins/interaction.interpolate.mjs +80 -0
- package/dist/components/chart/chartjs-plugins/plugin.flow-ui-colors.mjs +135 -0
- package/dist/components/chart/chartjs-plugins/positioner.cursor.mjs +14 -0
- package/dist/components/chart/chartjs-plugins/symlog.scale.mjs +42 -0
- package/dist/components/chart/chartjs-support.mjs +59 -0
- package/dist/components/checkbox/checkbox.component.mjs +246 -0
- package/dist/components/checkbox/checkbox.mjs +5 -0
- package/dist/components/checkbox/checkbox.styles.mjs +177 -0
- package/dist/components/color-mapper/color-mapper.component.mjs +260 -0
- package/dist/components/color-mapper/color-mapper.mjs +5 -0
- package/dist/components/color-mapper/color-mapper.styles.mjs +92 -0
- package/dist/components/color-mapper/helpers.mjs +55 -0
- package/dist/components/color-picker/color-picker.component.mjs +919 -0
- package/dist/components/color-picker/color-picker.mjs +5 -0
- package/dist/components/color-picker/color-picker.styles.mjs +337 -0
- package/dist/components/color-stop/color-stop.component.mjs +289 -0
- package/dist/components/color-stop/color-stop.mjs +5 -0
- package/dist/components/color-stop/color-stop.styles.mjs +103 -0
- package/dist/components/date-time-picker/date-time-picker.component.mjs +532 -0
- package/dist/components/date-time-picker/date-time-picker.mjs +5 -0
- package/dist/components/date-time-picker/date-time-picker.styles.mjs +260 -0
- package/dist/components/details/details.component.mjs +194 -0
- package/dist/components/details/details.mjs +5 -0
- package/dist/components/details/details.styles.mjs +85 -0
- package/dist/components/dialog/dialog.component.mjs +256 -0
- package/dist/components/dialog/dialog.mjs +5 -0
- package/dist/components/dialog/dialog.styles.mjs +125 -0
- package/dist/components/divider/divider.component.mjs +45 -0
- package/dist/components/divider/divider.mjs +5 -0
- package/dist/components/divider/divider.styles.mjs +34 -0
- package/dist/components/drawer/drawer.component.mjs +354 -0
- package/dist/components/drawer/drawer.mjs +5 -0
- package/dist/components/drawer/drawer.styles.mjs +161 -0
- package/dist/components/dropdown/dropdown.component.mjs +381 -0
- package/dist/components/dropdown/dropdown.mjs +5 -0
- package/dist/components/dropdown/dropdown.styles.mjs +56 -0
- package/dist/components/gauge/gauge.component.mjs +151 -0
- package/dist/components/gauge/gauge.mjs +5 -0
- package/dist/components/gauge/gauge.styles.mjs +127 -0
- package/dist/components/icon/icon.component.mjs +146 -0
- package/dist/components/icon/icon.mjs +5 -0
- package/dist/components/icon/icon.styles.mjs +35 -0
- package/dist/components/icon/library.default.mjs +38 -0
- package/dist/components/icon/library.mjs +38 -0
- package/dist/components/icon/library.system.mjs +158 -0
- package/dist/components/icon-button/icon-button.component.mjs +239 -0
- package/dist/components/icon-button/icon-button.mjs +5 -0
- package/dist/components/icon-button/icon-button.styles.mjs +81 -0
- package/dist/components/input/input.component.mjs +574 -0
- package/dist/components/input/input.mjs +5 -0
- package/dist/components/input/input.styles.mjs +310 -0
- package/dist/components/map/map.component.mjs +196 -0
- package/dist/components/map/map.mjs +5 -0
- package/dist/components/map/map.styles.mjs +90 -0
- package/dist/components/menu/menu.component.mjs +125 -0
- package/dist/components/menu/menu.mjs +5 -0
- package/dist/components/menu/menu.styles.mjs +23 -0
- package/dist/components/menu-item/menu-item.component.mjs +143 -0
- package/dist/components/menu-item/menu-item.mjs +5 -0
- package/dist/components/menu-item/menu-item.styles.mjs +103 -0
- package/dist/components/menu-label/menu-label.component.mjs +14 -0
- package/dist/components/menu-label/menu-label.mjs +5 -0
- package/dist/components/menu-label/menu-label.styles.mjs +24 -0
- package/dist/components/mutation-observer/mutation-observer.component.mjs +115 -0
- package/dist/components/mutation-observer/mutation-observer.mjs +5 -0
- package/dist/components/mutation-observer/mutation-observer.styles.mjs +12 -0
- package/dist/components/option/option.component.mjs +152 -0
- package/dist/components/option/option.mjs +5 -0
- package/dist/components/option/option.styles.mjs +102 -0
- package/dist/components/panel/panel.component.mjs +90 -0
- package/dist/components/panel/panel.mjs +5 -0
- package/dist/components/panel/panel.styles.mjs +51 -0
- package/dist/components/panel-header/panel-header.component.mjs +131 -0
- package/dist/components/panel-header/panel-header.mjs +5 -0
- package/dist/components/panel-header/panel-header.styles.mjs +67 -0
- package/dist/components/popup/popup.component.mjs +420 -0
- package/dist/components/popup/popup.mjs +5 -0
- package/dist/components/popup/popup.styles.mjs +63 -0
- package/dist/components/progress-bar/progress-bar.component.mjs +70 -0
- package/dist/components/progress-bar/progress-bar.mjs +5 -0
- package/dist/components/progress-bar/progress-bar.styles.mjs +87 -0
- package/dist/components/progress-ring/progress-ring.component.mjs +71 -0
- package/dist/components/progress-ring/progress-ring.mjs +5 -0
- package/dist/components/progress-ring/progress-ring.styles.mjs +72 -0
- package/dist/components/query-builder/converters/flow-query-converters.mjs +111 -0
- package/dist/components/query-builder/converters/map-layer-filter-converter.mjs +99 -0
- package/dist/components/query-builder/default-value-templates.mjs +151 -0
- package/dist/components/query-builder/helpers.mjs +42 -0
- package/dist/components/query-builder/query-builder.component.mjs +466 -0
- package/dist/components/query-builder/query-builder.mjs +5 -0
- package/dist/components/query-builder/query-builder.styles.mjs +261 -0
- package/dist/components/radio/radio.component.mjs +144 -0
- package/dist/components/radio/radio.mjs +5 -0
- package/dist/components/radio/radio.styles.mjs +164 -0
- package/dist/components/radio-group/radio-group.component.mjs +310 -0
- package/dist/components/radio-group/radio-group.mjs +5 -0
- package/dist/components/radio-group/radio-group.styles.mjs +49 -0
- package/dist/components/range/range.component.mjs +324 -0
- package/dist/components/range/range.mjs +5 -0
- package/dist/components/range/range.styles.mjs +233 -0
- package/dist/components/resize-observer/resize-observer.component.mjs +80 -0
- package/dist/components/resize-observer/resize-observer.mjs +5 -0
- package/dist/components/resize-observer/resize-observer.styles.mjs +12 -0
- package/dist/components/scroll-view/overlay-scrollbar.styles.mjs +686 -0
- package/dist/components/scroll-view/scroll-view.component.mjs +128 -0
- package/dist/components/scroll-view/scroll-view.mjs +5 -0
- package/dist/components/scroll-view/scroll-view.styles.mjs +57 -0
- package/dist/components/select/select.component.mjs +785 -0
- package/dist/components/select/select.mjs +5 -0
- package/dist/components/select/select.styles.mjs +339 -0
- package/dist/components/spinner/spinner.component.mjs +22 -0
- package/dist/components/spinner/spinner.mjs +5 -0
- package/dist/components/spinner/spinner.styles.mjs +64 -0
- package/dist/components/split-view/split-view.component.mjs +500 -0
- package/dist/components/split-view/split-view.mjs +5 -0
- package/dist/components/split-view/split-view.styles.mjs +33 -0
- package/dist/components/split-view-divider/split-view-divider.component.mjs +98 -0
- package/dist/components/split-view-divider/split-view-divider.mjs +5 -0
- package/dist/components/split-view-divider/split-view-divider.styles.mjs +96 -0
- package/dist/components/split-view-pane/split-view-pane.component.mjs +126 -0
- package/dist/components/split-view-pane/split-view-pane.mjs +5 -0
- package/dist/components/split-view-pane/split-view-pane.styles.mjs +49 -0
- package/dist/components/split-view-toggle-button/split-view-toggle-button.component.mjs +76 -0
- package/dist/components/split-view-toggle-button/split-view-toggle-button.mjs +5 -0
- package/dist/components/split-view-toggle-button/split-view-toggle-button.styles.mjs +40 -0
- package/dist/components/stepper/stepper.component.mjs +139 -0
- package/dist/components/stepper/stepper.mjs +5 -0
- package/dist/components/stepper/stepper.styles.mjs +103 -0
- package/dist/components/stepper-panel/stepper-panel.component.mjs +76 -0
- package/dist/components/stepper-panel/stepper-panel.mjs +5 -0
- package/dist/components/stepper-panel/stepper-panel.styles.mjs +22 -0
- package/dist/components/switch/switch.component.mjs +211 -0
- package/dist/components/switch/switch.mjs +5 -0
- package/dist/components/switch/switch.styles.mjs +166 -0
- package/dist/components/tab/tab.component.mjs +159 -0
- package/dist/components/tab/tab.mjs +5 -0
- package/dist/components/tab/tab.styles.mjs +107 -0
- package/dist/components/tab-group/tab-group.component.mjs +402 -0
- package/dist/components/tab-group/tab-group.mjs +5 -0
- package/dist/components/tab-group/tab-group.styles.mjs +386 -0
- package/dist/components/tab-panel/tab-panel.component.mjs +72 -0
- package/dist/components/tab-panel/tab-panel.mjs +5 -0
- package/dist/components/tab-panel/tab-panel.styles.mjs +55 -0
- package/dist/components/tag/tag.component.mjs +94 -0
- package/dist/components/tag/tag.mjs +5 -0
- package/dist/components/tag/tag.styles.mjs +130 -0
- package/dist/components/textarea/textarea.component.mjs +359 -0
- package/dist/components/textarea/textarea.mjs +5 -0
- package/dist/components/textarea/textarea.styles.mjs +171 -0
- package/dist/components/timer/ticker.mjs +78 -0
- package/dist/components/timer/timer.component.mjs +293 -0
- package/dist/components/timer/timer.mjs +5 -0
- package/dist/components/timer/timer.styles.mjs +94 -0
- package/dist/components/tool-button/tool-button.component.mjs +208 -0
- package/dist/components/tool-button/tool-button.mjs +5 -0
- package/dist/components/tool-button/tool-button.styles.mjs +251 -0
- package/dist/components/tool-button-group/tool-button-group.component.mjs +347 -0
- package/dist/components/tool-button-group/tool-button-group.mjs +5 -0
- package/dist/components/tool-button-group/tool-button-group.styles.mjs +59 -0
- package/dist/components/tooltip/tooltip.component.mjs +259 -0
- package/dist/components/tooltip/tooltip.mjs +5 -0
- package/dist/components/tooltip/tooltip.styles.mjs +57 -0
- package/dist/components/tree/tree.component.mjs +368 -0
- package/dist/components/tree/tree.mjs +5 -0
- package/dist/components/tree/tree.styles.mjs +41 -0
- package/dist/components/tree-item/tree-item.component.mjs +324 -0
- package/dist/components/tree-item/tree-item.mjs +5 -0
- package/dist/components/tree-item/tree-item.styles.mjs +178 -0
- package/dist/components/visually-hidden/visually-hidden.component.mjs +14 -0
- package/dist/components/visually-hidden/visually-hidden.mjs +5 -0
- package/dist/components/visually-hidden/visually-hidden.styles.mjs +20 -0
- package/dist/custom-elements.json +6494 -6508
- package/dist/index.d.mts +141 -132
- package/dist/index.d.ts +141 -132
- package/dist/index.mjs +78 -25094
- package/dist/internal/animate.mjs +47 -0
- package/dist/internal/animations/attention_seekers/bounce.mjs +17 -0
- package/dist/internal/animations/attention_seekers/flash.mjs +9 -0
- package/dist/internal/animations/attention_seekers/headShake.mjs +10 -0
- package/dist/internal/animations/attention_seekers/heartBeat.mjs +9 -0
- package/dist/internal/animations/attention_seekers/jello.mjs +14 -0
- package/dist/internal/animations/attention_seekers/pulse.mjs +7 -0
- package/dist/internal/animations/attention_seekers/rubberBand.mjs +11 -0
- package/dist/internal/animations/attention_seekers/shake.mjs +15 -0
- package/dist/internal/animations/attention_seekers/shakeX.mjs +15 -0
- package/dist/internal/animations/attention_seekers/shakeY.mjs +15 -0
- package/dist/internal/animations/attention_seekers/swing.mjs +9 -0
- package/dist/internal/animations/attention_seekers/tada.mjs +15 -0
- package/dist/internal/animations/attention_seekers/wobble.mjs +11 -0
- package/dist/internal/animations/back_entrances/backInDown.mjs +7 -0
- package/dist/internal/animations/back_entrances/backInLeft.mjs +7 -0
- package/dist/internal/animations/back_entrances/backInRight.mjs +7 -0
- package/dist/internal/animations/back_entrances/backInUp.mjs +7 -0
- package/dist/internal/animations/back_exits/backOutDown.mjs +7 -0
- package/dist/internal/animations/back_exits/backOutLeft.mjs +7 -0
- package/dist/internal/animations/back_exits/backOutRight.mjs +7 -0
- package/dist/internal/animations/back_exits/backOutUp.mjs +7 -0
- package/dist/internal/animations/bouncing_entrances/bounceIn.mjs +16 -0
- package/dist/internal/animations/bouncing_entrances/bounceInDown.mjs +14 -0
- package/dist/internal/animations/bouncing_entrances/bounceInLeft.mjs +14 -0
- package/dist/internal/animations/bouncing_entrances/bounceInRight.mjs +14 -0
- package/dist/internal/animations/bouncing_entrances/bounceInUp.mjs +14 -0
- package/dist/internal/animations/bouncing_exits/bounceOut.mjs +8 -0
- package/dist/internal/animations/bouncing_exits/bounceOutDown.mjs +8 -0
- package/dist/internal/animations/bouncing_exits/bounceOutLeft.mjs +6 -0
- package/dist/internal/animations/bouncing_exits/bounceOutRight.mjs +6 -0
- package/dist/internal/animations/bouncing_exits/bounceOutUp.mjs +8 -0
- package/dist/internal/animations/easings/easings.mjs +33 -0
- package/dist/internal/animations/fading_entrances/fadeIn.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInBottomLeft.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInBottomRight.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInDown.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInDownBig.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInLeft.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInLeftBig.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInRight.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInRightBig.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInTopLeft.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInTopRight.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInUp.mjs +6 -0
- package/dist/internal/animations/fading_entrances/fadeInUpBig.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOut.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutBottomLeft.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutBottomRight.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutDown.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutDownBig.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutLeft.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutLeftBig.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutRight.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutRightBig.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutTopLeft.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutTopRight.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutUp.mjs +6 -0
- package/dist/internal/animations/fading_exits/fadeOutUpBig.mjs +6 -0
- package/dist/internal/animations/flippers/flip.mjs +29 -0
- package/dist/internal/animations/flippers/flipInX.mjs +9 -0
- package/dist/internal/animations/flippers/flipInY.mjs +9 -0
- package/dist/internal/animations/flippers/flipOutX.mjs +7 -0
- package/dist/internal/animations/flippers/flipOutY.mjs +7 -0
- package/dist/internal/animations/index.mjs +99 -0
- package/dist/internal/animations/lightspeed/lightSpeedInLeft.mjs +8 -0
- package/dist/internal/animations/lightspeed/lightSpeedInRight.mjs +8 -0
- package/dist/internal/animations/lightspeed/lightSpeedOutLeft.mjs +6 -0
- package/dist/internal/animations/lightspeed/lightSpeedOutRight.mjs +6 -0
- package/dist/internal/animations/rotating_entrances/rotateIn.mjs +6 -0
- package/dist/internal/animations/rotating_entrances/rotateInDownLeft.mjs +6 -0
- package/dist/internal/animations/rotating_entrances/rotateInDownRight.mjs +6 -0
- package/dist/internal/animations/rotating_entrances/rotateInUpLeft.mjs +6 -0
- package/dist/internal/animations/rotating_entrances/rotateInUpRight.mjs +6 -0
- package/dist/internal/animations/rotating_exits/rotateOut.mjs +6 -0
- package/dist/internal/animations/rotating_exits/rotateOutDownLeft.mjs +6 -0
- package/dist/internal/animations/rotating_exits/rotateOutDownRight.mjs +6 -0
- package/dist/internal/animations/rotating_exits/rotateOutUpLeft.mjs +6 -0
- package/dist/internal/animations/rotating_exits/rotateOutUpRight.mjs +6 -0
- package/dist/internal/animations/sliding_entrances/slideInDown.mjs +6 -0
- package/dist/internal/animations/sliding_entrances/slideInLeft.mjs +6 -0
- package/dist/internal/animations/sliding_entrances/slideInRight.mjs +6 -0
- package/dist/internal/animations/sliding_entrances/slideInUp.mjs +6 -0
- package/dist/internal/animations/sliding_exits/slideOutDown.mjs +6 -0
- package/dist/internal/animations/sliding_exits/slideOutLeft.mjs +6 -0
- package/dist/internal/animations/sliding_exits/slideOutRight.mjs +6 -0
- package/dist/internal/animations/sliding_exits/slideOutUp.mjs +6 -0
- package/dist/internal/animations/specials/hinge.mjs +10 -0
- package/dist/internal/animations/specials/jackInTheBox.mjs +8 -0
- package/dist/internal/animations/specials/rollIn.mjs +6 -0
- package/dist/internal/animations/specials/rollOut.mjs +6 -0
- package/dist/internal/animations/zooming_entrances/zoomIn.mjs +6 -0
- package/dist/internal/animations/zooming_entrances/zoomInDown.mjs +16 -0
- package/dist/internal/animations/zooming_entrances/zoomInLeft.mjs +16 -0
- package/dist/internal/animations/zooming_entrances/zoomInRight.mjs +16 -0
- package/dist/internal/animations/zooming_entrances/zoomInUp.mjs +16 -0
- package/dist/internal/animations/zooming_exits/zoomOut.mjs +7 -0
- package/dist/internal/animations/zooming_exits/zoomOutDown.mjs +16 -0
- package/dist/internal/animations/zooming_exits/zoomOutLeft.mjs +6 -0
- package/dist/internal/animations/zooming_exits/zoomOutRight.mjs +6 -0
- package/dist/internal/animations/zooming_exits/zoomOutUp.mjs +16 -0
- package/dist/internal/boolean.mjs +17 -0
- package/dist/internal/datetime.mjs +65 -0
- package/dist/internal/debounce.mjs +14 -0
- package/dist/internal/default-value.mjs +21 -0
- package/dist/internal/drag.mjs +30 -0
- package/dist/internal/ensure-array.mjs +16 -0
- package/dist/internal/event.mjs +13 -0
- package/dist/internal/flow-ui-rdf-element.mjs +61 -0
- package/dist/internal/form.mjs +264 -0
- package/dist/internal/localize.mjs +124 -0
- package/dist/internal/math.mjs +12 -0
- package/dist/internal/modal.mjs +52 -0
- package/dist/internal/offset.mjs +8 -0
- package/dist/internal/orderby.mjs +18 -0
- package/dist/internal/scroll.mjs +47 -0
- package/dist/internal/slot.mjs +59 -0
- package/dist/internal/string.mjs +5 -0
- package/dist/internal/tabbable.mjs +49 -0
- package/dist/internal/throttle.mjs +28 -0
- package/dist/internal/type-checks.mjs +16 -0
- package/dist/internal/watch.mjs +27 -0
- package/dist/package.json.mjs +3 -0
- package/dist/public-api.mjs +10 -0
- package/dist/styles/component.styles.mjs +19 -0
- package/dist/styles/form-control.styles.mjs +63 -0
- package/dist/translations/en.mjs +34 -0
- package/dist/utilities/animation-registry.mjs +33 -0
- package/dist/utilities/announce.mjs +12 -0
- package/dist/utilities/locale.mjs +10 -0
- package/dist/utilities/localize.mjs +7 -0
- package/dist/utilities/register-components.mjs +203 -0
- package/dist/vscode.html-custom-data.json +429 -429
- package/package.json +5 -8
- package/dist/icons/index.cjs +0 -4053
- package/dist/icons/index.d.cts +0 -2027
- package/dist/index.cjs +0 -25187
- package/dist/index.d.cts +0 -5678
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { query, property } from 'lit/decorators.js';
|
|
3
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
+
import { stopAnimations, animateTo } from '../../internal/animate.mjs';
|
|
5
|
+
import { boolean } from '../../internal/boolean.mjs';
|
|
6
|
+
import { waitForEvent } from '../../internal/event.mjs';
|
|
7
|
+
import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
|
|
8
|
+
import { HasSlotController } from '../../internal/slot.mjs';
|
|
9
|
+
import { watch } from '../../internal/watch.mjs';
|
|
10
|
+
import { getAnimation, setDefaultAnimation } from '../../utilities/animation-registry.mjs';
|
|
11
|
+
import { LocalizeController } from '../../utilities/localize.mjs';
|
|
12
|
+
import styles from './alert.styles.mjs';
|
|
13
|
+
|
|
14
|
+
var __defProp = Object.defineProperty;
|
|
15
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
16
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
17
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
18
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
19
|
+
if (decorator = decorators[i])
|
|
20
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
21
|
+
if (kind && result)
|
|
22
|
+
__defProp(target, key, result);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
let toastStack;
|
|
26
|
+
class FlowUiAlert extends FlowRdfElement {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
this.hasSlotController = new HasSlotController(this, "icon", "suffix");
|
|
30
|
+
this.localize = new LocalizeController(this);
|
|
31
|
+
this.open = false;
|
|
32
|
+
this.closable = false;
|
|
33
|
+
this.variant = "primary";
|
|
34
|
+
this.duration = Infinity;
|
|
35
|
+
}
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
super.connectedCallback();
|
|
38
|
+
this.open = boolean(this.open, true);
|
|
39
|
+
}
|
|
40
|
+
firstUpdated() {
|
|
41
|
+
this.base.hidden = !this.open;
|
|
42
|
+
}
|
|
43
|
+
restartAutoHide() {
|
|
44
|
+
clearTimeout(this.autoHideTimeout);
|
|
45
|
+
if (this.open && this.duration < Infinity) {
|
|
46
|
+
this.autoHideTimeout = window.setTimeout(() => this.hide(), this.duration);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
handleCloseClick() {
|
|
50
|
+
this.hide();
|
|
51
|
+
}
|
|
52
|
+
handleMouseMove() {
|
|
53
|
+
this.restartAutoHide();
|
|
54
|
+
}
|
|
55
|
+
async handleOpenChange() {
|
|
56
|
+
if (this.open) {
|
|
57
|
+
this.emit("flow-ui-show");
|
|
58
|
+
if (this.duration < Infinity) {
|
|
59
|
+
this.restartAutoHide();
|
|
60
|
+
}
|
|
61
|
+
await stopAnimations(this.base);
|
|
62
|
+
this.base.hidden = false;
|
|
63
|
+
const { keyframes, options } = getAnimation(this, "alert.show", { dir: this.localize.dir() });
|
|
64
|
+
await animateTo(this.base, keyframes, options);
|
|
65
|
+
this.emit("flow-ui-after-show");
|
|
66
|
+
} else {
|
|
67
|
+
this.emit("flow-ui-hide");
|
|
68
|
+
clearTimeout(this.autoHideTimeout);
|
|
69
|
+
await stopAnimations(this.base);
|
|
70
|
+
const { keyframes, options } = getAnimation(this, "alert.hide", { dir: this.localize.dir() });
|
|
71
|
+
await animateTo(this.base, keyframes, options);
|
|
72
|
+
this.base.hidden = true;
|
|
73
|
+
this.emit("flow-ui-after-hide");
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
handleDurationChange() {
|
|
77
|
+
this.restartAutoHide();
|
|
78
|
+
}
|
|
79
|
+
/** Shows the alert. */
|
|
80
|
+
async show() {
|
|
81
|
+
if (this.open) {
|
|
82
|
+
return void 0;
|
|
83
|
+
}
|
|
84
|
+
this.open = true;
|
|
85
|
+
return waitForEvent(this, "flow-ui-after-show");
|
|
86
|
+
}
|
|
87
|
+
/** Hides the alert */
|
|
88
|
+
async hide() {
|
|
89
|
+
if (!this.open) {
|
|
90
|
+
return void 0;
|
|
91
|
+
}
|
|
92
|
+
this.open = false;
|
|
93
|
+
return waitForEvent(this, "flow-ui-after-hide");
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Displays the alert as a toast notification. This will move the alert out of its position in the DOM and, when
|
|
97
|
+
* dismissed, it will be removed from the DOM completely. By storing a reference to the alert, you can reuse it by
|
|
98
|
+
* calling this method again. The returned promise will resolve after the alert is hidden.
|
|
99
|
+
*/
|
|
100
|
+
async toast() {
|
|
101
|
+
return new Promise((resolve) => {
|
|
102
|
+
if (!toastStack) {
|
|
103
|
+
toastStack = Object.assign(document.createElement("div"), { className: "flow-ui-toast-stack" });
|
|
104
|
+
}
|
|
105
|
+
if (toastStack.parentElement === null) {
|
|
106
|
+
document.body.append(toastStack);
|
|
107
|
+
}
|
|
108
|
+
toastStack.appendChild(this);
|
|
109
|
+
requestAnimationFrame(() => {
|
|
110
|
+
this.clientWidth;
|
|
111
|
+
this.show();
|
|
112
|
+
});
|
|
113
|
+
this.addEventListener(
|
|
114
|
+
"flow-ui-after-hide",
|
|
115
|
+
() => {
|
|
116
|
+
toastStack.removeChild(this);
|
|
117
|
+
resolve();
|
|
118
|
+
if (toastStack.querySelector("flow-ui-alert") === null) {
|
|
119
|
+
toastStack.remove();
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{ once: true }
|
|
123
|
+
);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
render() {
|
|
127
|
+
return html`
|
|
128
|
+
<div
|
|
129
|
+
part="base"
|
|
130
|
+
class=${classMap({
|
|
131
|
+
alert: true,
|
|
132
|
+
"alert--open": this.open,
|
|
133
|
+
"alert--closable": this.closable,
|
|
134
|
+
"alert--has-icon": this.hasSlotController.test("icon"),
|
|
135
|
+
"alert--primary": this.variant === "primary",
|
|
136
|
+
"alert--secondary": this.variant === "secondary",
|
|
137
|
+
"alert--success": this.variant === "success",
|
|
138
|
+
"alert--neutral": this.variant === "neutral",
|
|
139
|
+
"alert--warning": this.variant === "warning",
|
|
140
|
+
"alert--danger": this.variant === "danger"
|
|
141
|
+
})}
|
|
142
|
+
role="alert"
|
|
143
|
+
aria-hidden=${this.open ? "false" : "true"}
|
|
144
|
+
@mousemove=${this.handleMouseMove}
|
|
145
|
+
>
|
|
146
|
+
<slot name="icon" part="icon" class="alert__icon"></slot>
|
|
147
|
+
|
|
148
|
+
<slot part="message" class="alert__message" aria-live="polite"></slot>
|
|
149
|
+
|
|
150
|
+
${this.closable ? html`
|
|
151
|
+
<flow-ui-icon-button
|
|
152
|
+
part="close-button"
|
|
153
|
+
exportparts="base:close-button__base"
|
|
154
|
+
class="alert__close-button"
|
|
155
|
+
name="x-lg"
|
|
156
|
+
library="system"
|
|
157
|
+
label=${this.localize.term("close")}
|
|
158
|
+
@click=${this.handleCloseClick}
|
|
159
|
+
></flow-ui-icon-button>
|
|
160
|
+
` : ""}
|
|
161
|
+
</div>
|
|
162
|
+
`;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
FlowUiAlert.styles = styles;
|
|
166
|
+
__decorateClass([
|
|
167
|
+
query('[part~="base"]')
|
|
168
|
+
], FlowUiAlert.prototype, "base", 2);
|
|
169
|
+
__decorateClass([
|
|
170
|
+
property({ type: Boolean, reflect: true })
|
|
171
|
+
], FlowUiAlert.prototype, "open", 2);
|
|
172
|
+
__decorateClass([
|
|
173
|
+
property({ type: Boolean, reflect: true })
|
|
174
|
+
], FlowUiAlert.prototype, "closable", 2);
|
|
175
|
+
__decorateClass([
|
|
176
|
+
property({ reflect: true })
|
|
177
|
+
], FlowUiAlert.prototype, "variant", 2);
|
|
178
|
+
__decorateClass([
|
|
179
|
+
property({ type: Number })
|
|
180
|
+
], FlowUiAlert.prototype, "duration", 2);
|
|
181
|
+
__decorateClass([
|
|
182
|
+
watch("open", { waitUntilFirstUpdate: true })
|
|
183
|
+
], FlowUiAlert.prototype, "handleOpenChange", 1);
|
|
184
|
+
__decorateClass([
|
|
185
|
+
watch("duration")
|
|
186
|
+
], FlowUiAlert.prototype, "handleDurationChange", 1);
|
|
187
|
+
setDefaultAnimation("alert.show", {
|
|
188
|
+
keyframes: [
|
|
189
|
+
{ opacity: 0, scale: 0.8 },
|
|
190
|
+
{ opacity: 1, scale: 1 }
|
|
191
|
+
],
|
|
192
|
+
options: { duration: 250, easing: "ease" }
|
|
193
|
+
});
|
|
194
|
+
setDefaultAnimation("alert.hide", {
|
|
195
|
+
keyframes: [
|
|
196
|
+
{ opacity: 1, scale: 1 },
|
|
197
|
+
{ opacity: 0, scale: 0.8 }
|
|
198
|
+
],
|
|
199
|
+
options: { duration: 250, easing: "ease" }
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
export { FlowUiAlert as default };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
import componentStyles from '../../styles/component.styles.mjs';
|
|
3
|
+
|
|
4
|
+
const styles = css`
|
|
5
|
+
${componentStyles}
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
display: contents;
|
|
9
|
+
|
|
10
|
+
/* For better DX, we'll reset the margin here so the base part can inherit it */
|
|
11
|
+
margin: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.alert {
|
|
15
|
+
position: relative;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: stretch;
|
|
18
|
+
background-color: var(--flow-ui-panel-background-color);
|
|
19
|
+
border: solid var(--flow-ui-panel-border-width) var(--flow-ui-panel-border-color);
|
|
20
|
+
border-top-width: calc(var(--flow-ui-panel-border-width) * 3);
|
|
21
|
+
border-radius: var(--flow-ui-border-radius-medium);
|
|
22
|
+
font-family: var(--flow-ui-font-sans);
|
|
23
|
+
font-size: var(--flow-ui-font-size-small);
|
|
24
|
+
font-weight: var(--flow-ui-font-weight-normal);
|
|
25
|
+
line-height: 1.6;
|
|
26
|
+
color: var(--flow-ui-color-neutral-700);
|
|
27
|
+
margin: inherit;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.alert:not(.alert--has-icon) .alert__icon,
|
|
31
|
+
.alert:not(.alert--closable) .alert__close-button {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.alert__icon {
|
|
36
|
+
flex: 0 0 auto;
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
font-size: var(--flow-ui-font-size-large);
|
|
40
|
+
padding-inline-start: var(--flow-ui-spacing-large);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.alert--primary {
|
|
44
|
+
border-top-color: var(--flow-ui-color-primary-500);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.alert--primary .alert__icon {
|
|
48
|
+
color: var(--flow-ui-color-primary-500);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.alert--secondary {
|
|
52
|
+
border-top-color: var(--flow-ui-color-secondary-500);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.alert--secondary .alert__icon {
|
|
56
|
+
color: var(--flow-ui-color-secondary-500);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.alert--success {
|
|
60
|
+
border-top-color: var(--flow-ui-color-success-600);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.alert--success .alert__icon {
|
|
64
|
+
color: var(--flow-ui-color-success-600);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.alert--neutral {
|
|
68
|
+
border-top-color: var(--flow-ui-color-neutral-600);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.alert--neutral .alert__icon {
|
|
72
|
+
color: var(--flow-ui-color-neutral-600);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.alert--warning {
|
|
76
|
+
border-top-color: var(--flow-ui-color-warning-600);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.alert--warning .alert__icon {
|
|
80
|
+
color: var(--flow-ui-color-warning-600);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.alert--danger {
|
|
84
|
+
border-top-color: var(--flow-ui-color-danger-600);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.alert--danger .alert__icon {
|
|
88
|
+
color: var(--flow-ui-color-danger-600);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.alert__message {
|
|
92
|
+
flex: 1 1 auto;
|
|
93
|
+
display: block;
|
|
94
|
+
padding: var(--flow-ui-spacing-large);
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.alert__close-button {
|
|
99
|
+
flex: 0 0 auto;
|
|
100
|
+
display: flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
font-size: var(--flow-ui-font-size-medium);
|
|
103
|
+
padding-inline-end: var(--flow-ui-spacing-medium);
|
|
104
|
+
}
|
|
105
|
+
`;
|
|
106
|
+
|
|
107
|
+
export { styles as default };
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { queryAsync, property } from 'lit/decorators.js';
|
|
3
|
+
import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
|
|
4
|
+
import { watch } from '../../internal/watch.mjs';
|
|
5
|
+
import componentStyles from '../../styles/component.styles.mjs';
|
|
6
|
+
import styles from './animation.styles.mjs';
|
|
7
|
+
import * as index from '../../internal/animations/index.mjs';
|
|
8
|
+
import { easings } from '../../internal/animations/easings/easings.mjs';
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
13
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
14
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
15
|
+
if (decorator = decorators[i])
|
|
16
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
17
|
+
if (kind && result)
|
|
18
|
+
__defProp(target, key, result);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
class FlowUiAnimation extends FlowRdfElement {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.hasStarted = false;
|
|
25
|
+
this.name = "none";
|
|
26
|
+
this.play = false;
|
|
27
|
+
this.delay = 0;
|
|
28
|
+
this.direction = "normal";
|
|
29
|
+
this.duration = 1e3;
|
|
30
|
+
this.easing = "linear";
|
|
31
|
+
this.endDelay = 0;
|
|
32
|
+
this.fill = "auto";
|
|
33
|
+
this.iterations = Infinity;
|
|
34
|
+
this.iterationStart = 0;
|
|
35
|
+
this.playbackRate = 1;
|
|
36
|
+
this.handleAnimationFinish = () => {
|
|
37
|
+
this.play = false;
|
|
38
|
+
this.hasStarted = false;
|
|
39
|
+
this.emit("flow-ui-finish");
|
|
40
|
+
};
|
|
41
|
+
this.handleAnimationCancel = () => {
|
|
42
|
+
this.play = false;
|
|
43
|
+
this.hasStarted = false;
|
|
44
|
+
this.emit("flow-ui-cancel");
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/** Gets and sets the current animation time. */
|
|
48
|
+
get currentTime() {
|
|
49
|
+
return this.animation?.currentTime ?? 0;
|
|
50
|
+
}
|
|
51
|
+
set currentTime(time) {
|
|
52
|
+
if (this.animation) {
|
|
53
|
+
this.animation.currentTime = time;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
connectedCallback() {
|
|
57
|
+
super.connectedCallback();
|
|
58
|
+
this.createAnimation();
|
|
59
|
+
}
|
|
60
|
+
disconnectedCallback() {
|
|
61
|
+
super.disconnectedCallback();
|
|
62
|
+
this.destroyAnimation();
|
|
63
|
+
}
|
|
64
|
+
handleSlotChange() {
|
|
65
|
+
this.destroyAnimation();
|
|
66
|
+
this.createAnimation();
|
|
67
|
+
}
|
|
68
|
+
async createAnimation() {
|
|
69
|
+
const easing = easings[this.easing] ?? this.easing;
|
|
70
|
+
const keyframes = this.keyframes ?? index[this.name];
|
|
71
|
+
const slot = await this.defaultSlot;
|
|
72
|
+
const element = slot.assignedElements()[0];
|
|
73
|
+
if (!element || !keyframes) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
this.destroyAnimation();
|
|
77
|
+
this.animation = element.animate(keyframes, {
|
|
78
|
+
delay: +this.delay,
|
|
79
|
+
direction: this.direction,
|
|
80
|
+
duration: this.duration,
|
|
81
|
+
easing,
|
|
82
|
+
endDelay: this.endDelay,
|
|
83
|
+
fill: this.fill,
|
|
84
|
+
iterationStart: this.iterationStart,
|
|
85
|
+
iterations: this.iterations
|
|
86
|
+
});
|
|
87
|
+
this.animation.playbackRate = this.playbackRate;
|
|
88
|
+
this.animation.addEventListener("cancel", this.handleAnimationCancel);
|
|
89
|
+
this.animation.addEventListener("finish", this.handleAnimationFinish);
|
|
90
|
+
if (this.play) {
|
|
91
|
+
this.hasStarted = true;
|
|
92
|
+
this.emit("flow-ui-start");
|
|
93
|
+
} else {
|
|
94
|
+
this.animation.pause();
|
|
95
|
+
}
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
destroyAnimation() {
|
|
99
|
+
if (this.animation) {
|
|
100
|
+
this.animation.cancel();
|
|
101
|
+
this.animation.removeEventListener("cancel", this.handleAnimationCancel);
|
|
102
|
+
this.animation.removeEventListener("finish", this.handleAnimationFinish);
|
|
103
|
+
this.hasStarted = false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
handleAnimationChange() {
|
|
107
|
+
if (!this.hasUpdated) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
this.createAnimation();
|
|
111
|
+
}
|
|
112
|
+
handlePlayChange() {
|
|
113
|
+
if (this.animation) {
|
|
114
|
+
if (this.play && !this.hasStarted) {
|
|
115
|
+
this.hasStarted = true;
|
|
116
|
+
this.emit("flow-ui-start");
|
|
117
|
+
}
|
|
118
|
+
if (this.play) {
|
|
119
|
+
this.animation.play();
|
|
120
|
+
} else {
|
|
121
|
+
this.animation.pause();
|
|
122
|
+
}
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
handlePlaybackRateChange() {
|
|
128
|
+
if (this.animation) {
|
|
129
|
+
this.animation.playbackRate = this.playbackRate;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/** Clears all keyframe effects caused by this animation and aborts its playback. */
|
|
133
|
+
cancel() {
|
|
134
|
+
this.animation?.cancel();
|
|
135
|
+
}
|
|
136
|
+
/** Sets the playback time to the end of the animation corresponding to the current playback direction. */
|
|
137
|
+
finish() {
|
|
138
|
+
this.animation?.finish();
|
|
139
|
+
}
|
|
140
|
+
render() {
|
|
141
|
+
return html`
|
|
142
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
143
|
+
`;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
FlowUiAnimation.styles = [componentStyles, styles];
|
|
147
|
+
__decorateClass([
|
|
148
|
+
queryAsync("slot")
|
|
149
|
+
], FlowUiAnimation.prototype, "defaultSlot", 2);
|
|
150
|
+
__decorateClass([
|
|
151
|
+
property()
|
|
152
|
+
], FlowUiAnimation.prototype, "name", 2);
|
|
153
|
+
__decorateClass([
|
|
154
|
+
property({ type: Boolean, reflect: true })
|
|
155
|
+
], FlowUiAnimation.prototype, "play", 2);
|
|
156
|
+
__decorateClass([
|
|
157
|
+
property({ type: Number })
|
|
158
|
+
], FlowUiAnimation.prototype, "delay", 2);
|
|
159
|
+
__decorateClass([
|
|
160
|
+
property()
|
|
161
|
+
], FlowUiAnimation.prototype, "direction", 2);
|
|
162
|
+
__decorateClass([
|
|
163
|
+
property({ type: Number })
|
|
164
|
+
], FlowUiAnimation.prototype, "duration", 2);
|
|
165
|
+
__decorateClass([
|
|
166
|
+
property()
|
|
167
|
+
], FlowUiAnimation.prototype, "easing", 2);
|
|
168
|
+
__decorateClass([
|
|
169
|
+
property({ attribute: "end-delay", type: Number })
|
|
170
|
+
], FlowUiAnimation.prototype, "endDelay", 2);
|
|
171
|
+
__decorateClass([
|
|
172
|
+
property()
|
|
173
|
+
], FlowUiAnimation.prototype, "fill", 2);
|
|
174
|
+
__decorateClass([
|
|
175
|
+
property({ type: Number })
|
|
176
|
+
], FlowUiAnimation.prototype, "iterations", 2);
|
|
177
|
+
__decorateClass([
|
|
178
|
+
property({ attribute: "iteration-start", type: Number })
|
|
179
|
+
], FlowUiAnimation.prototype, "iterationStart", 2);
|
|
180
|
+
__decorateClass([
|
|
181
|
+
property({ attribute: false })
|
|
182
|
+
], FlowUiAnimation.prototype, "keyframes", 2);
|
|
183
|
+
__decorateClass([
|
|
184
|
+
property({ attribute: "playback-rate", type: Number })
|
|
185
|
+
], FlowUiAnimation.prototype, "playbackRate", 2);
|
|
186
|
+
__decorateClass([
|
|
187
|
+
watch([
|
|
188
|
+
"name",
|
|
189
|
+
"delay",
|
|
190
|
+
"direction",
|
|
191
|
+
"duration",
|
|
192
|
+
"easing",
|
|
193
|
+
"endDelay",
|
|
194
|
+
"fill",
|
|
195
|
+
"iterations",
|
|
196
|
+
"iterationsStart",
|
|
197
|
+
"keyframes"
|
|
198
|
+
])
|
|
199
|
+
], FlowUiAnimation.prototype, "handleAnimationChange", 1);
|
|
200
|
+
__decorateClass([
|
|
201
|
+
watch("play")
|
|
202
|
+
], FlowUiAnimation.prototype, "handlePlayChange", 1);
|
|
203
|
+
__decorateClass([
|
|
204
|
+
watch("playbackRate")
|
|
205
|
+
], FlowUiAnimation.prototype, "handlePlaybackRateChange", 1);
|
|
206
|
+
|
|
207
|
+
export { FlowUiAnimation as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as index from '../../internal/animations/index.mjs';
|
|
2
|
+
import { easings } from '../../internal/animations/easings/easings.mjs';
|
|
3
|
+
|
|
4
|
+
function getAnimationNames() {
|
|
5
|
+
return Object.entries(index).filter(([name]) => name !== "easings").map(([name]) => name);
|
|
6
|
+
}
|
|
7
|
+
function getEasingNames() {
|
|
8
|
+
return Object.entries(easings).map(([name]) => name);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { index as animations, getAnimationNames, getEasingNames };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { state, property } from 'lit/decorators.js';
|
|
3
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
+
import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
|
|
5
|
+
import { watch } from '../../internal/watch.mjs';
|
|
6
|
+
import styles from './avatar.styles.mjs';
|
|
7
|
+
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
12
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
+
if (decorator = decorators[i])
|
|
14
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
15
|
+
if (kind && result)
|
|
16
|
+
__defProp(target, key, result);
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
class FlowUiAvatar extends FlowRdfElement {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.hasError = false;
|
|
23
|
+
this.image = "";
|
|
24
|
+
this.label = "";
|
|
25
|
+
this.initials = "";
|
|
26
|
+
this.loading = "eager";
|
|
27
|
+
this.shape = "circle";
|
|
28
|
+
}
|
|
29
|
+
handleImageChange() {
|
|
30
|
+
this.hasError = false;
|
|
31
|
+
}
|
|
32
|
+
render() {
|
|
33
|
+
const avatarWithImage = html`
|
|
34
|
+
<img
|
|
35
|
+
part="image"
|
|
36
|
+
class="avatar__image"
|
|
37
|
+
src="${this.image}"
|
|
38
|
+
loading="${this.loading}"
|
|
39
|
+
alt=""
|
|
40
|
+
@error="${() => this.hasError = true}"
|
|
41
|
+
/>
|
|
42
|
+
`;
|
|
43
|
+
let avatarWithoutImage = html``;
|
|
44
|
+
if (this.initials) {
|
|
45
|
+
avatarWithoutImage = html`
|
|
46
|
+
<div part="initials" class="avatar__initials">${this.initials}</div>
|
|
47
|
+
`;
|
|
48
|
+
} else {
|
|
49
|
+
avatarWithoutImage = html`
|
|
50
|
+
<slot name="icon" part="icon" class="avatar__icon" aria-hidden="true">
|
|
51
|
+
<flow-ui-icon name="person-fill" library="system"></flow-ui-icon>
|
|
52
|
+
</slot>
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
return html`
|
|
56
|
+
<div
|
|
57
|
+
part="base"
|
|
58
|
+
class=${classMap({
|
|
59
|
+
avatar: true,
|
|
60
|
+
"avatar--circle": this.shape === "circle",
|
|
61
|
+
"avatar--rounded": this.shape === "rounded",
|
|
62
|
+
"avatar--square": this.shape === "square"
|
|
63
|
+
})}
|
|
64
|
+
role="img"
|
|
65
|
+
aria-label=${this.label}
|
|
66
|
+
>
|
|
67
|
+
${this.image && !this.hasError ? avatarWithImage : avatarWithoutImage}
|
|
68
|
+
</div>
|
|
69
|
+
`;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
FlowUiAvatar.styles = styles;
|
|
73
|
+
__decorateClass([
|
|
74
|
+
state()
|
|
75
|
+
], FlowUiAvatar.prototype, "hasError", 2);
|
|
76
|
+
__decorateClass([
|
|
77
|
+
property()
|
|
78
|
+
], FlowUiAvatar.prototype, "image", 2);
|
|
79
|
+
__decorateClass([
|
|
80
|
+
property()
|
|
81
|
+
], FlowUiAvatar.prototype, "label", 2);
|
|
82
|
+
__decorateClass([
|
|
83
|
+
property()
|
|
84
|
+
], FlowUiAvatar.prototype, "initials", 2);
|
|
85
|
+
__decorateClass([
|
|
86
|
+
property()
|
|
87
|
+
], FlowUiAvatar.prototype, "loading", 2);
|
|
88
|
+
__decorateClass([
|
|
89
|
+
property({ reflect: true, type: String })
|
|
90
|
+
], FlowUiAvatar.prototype, "shape", 2);
|
|
91
|
+
__decorateClass([
|
|
92
|
+
watch("image")
|
|
93
|
+
], FlowUiAvatar.prototype, "handleImageChange", 1);
|
|
94
|
+
|
|
95
|
+
export { FlowUiAvatar as default };
|