@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,337 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
import componentStyles from '../../styles/component.styles.mjs';
|
|
3
|
+
|
|
4
|
+
const styles = css`
|
|
5
|
+
${componentStyles}
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
--grid-width: 280px;
|
|
9
|
+
--grid-height: 200px;
|
|
10
|
+
--grid-handle-size: 16px;
|
|
11
|
+
--slider-height: 15px;
|
|
12
|
+
--slider-handle-size: 17px;
|
|
13
|
+
--swatch-size: 25px;
|
|
14
|
+
|
|
15
|
+
display: inline-block;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.color-picker {
|
|
19
|
+
width: var(--grid-width);
|
|
20
|
+
font-family: var(--flow-ui-font-sans);
|
|
21
|
+
font-size: var(--flow-ui-font-size-medium);
|
|
22
|
+
font-weight: var(--flow-ui-font-weight-normal);
|
|
23
|
+
color: var(--color);
|
|
24
|
+
background-color: var(--flow-ui-panel-background-color);
|
|
25
|
+
border-radius: var(--flow-ui-border-radius-medium);
|
|
26
|
+
user-select: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.color-picker--inline {
|
|
30
|
+
border: solid var(--flow-ui-panel-border-width) var(--flow-ui-panel-border-color);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.color-picker--inline:focus-visible {
|
|
34
|
+
outline: var(--flow-ui-focus-ring);
|
|
35
|
+
outline-offset: var(--flow-ui-focus-ring-offset);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.color-picker__grid {
|
|
39
|
+
position: relative;
|
|
40
|
+
height: var(--grid-height);
|
|
41
|
+
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%),
|
|
42
|
+
linear-gradient(to right, #fff 0%, rgba(255, 255, 255, 0) 100%);
|
|
43
|
+
border-top-left-radius: var(--flow-ui-border-radius-medium);
|
|
44
|
+
border-top-right-radius: var(--flow-ui-border-radius-medium);
|
|
45
|
+
cursor: crosshair;
|
|
46
|
+
forced-color-adjust: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.color-picker__grid-handle {
|
|
50
|
+
position: absolute;
|
|
51
|
+
width: var(--grid-handle-size);
|
|
52
|
+
height: var(--grid-handle-size);
|
|
53
|
+
border-radius: 50%;
|
|
54
|
+
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
|
|
55
|
+
border: solid 2px white;
|
|
56
|
+
margin-top: calc(var(--grid-handle-size) / -2);
|
|
57
|
+
margin-left: calc(var(--grid-handle-size) / -2);
|
|
58
|
+
transition: var(--flow-ui-transition-fast) scale;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.color-picker__grid-handle--dragging {
|
|
62
|
+
cursor: none;
|
|
63
|
+
scale: 1.5;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.color-picker__grid-handle:focus-visible {
|
|
67
|
+
outline: var(--flow-ui-focus-ring);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.color-picker__controls {
|
|
71
|
+
padding: var(--flow-ui-spacing-small);
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.color-picker__sliders {
|
|
77
|
+
flex: 1 1 auto;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.color-picker__slider {
|
|
81
|
+
position: relative;
|
|
82
|
+
height: var(--slider-height);
|
|
83
|
+
border-radius: var(--flow-ui-border-radius-pill);
|
|
84
|
+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
|
|
85
|
+
forced-color-adjust: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.color-picker__slider:not(:last-of-type) {
|
|
89
|
+
margin-bottom: var(--flow-ui-spacing-small);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.color-picker__slider-handle {
|
|
93
|
+
position: absolute;
|
|
94
|
+
top: calc(50% - var(--slider-handle-size) / 2);
|
|
95
|
+
width: var(--slider-handle-size);
|
|
96
|
+
height: var(--slider-handle-size);
|
|
97
|
+
background-color: white;
|
|
98
|
+
border-radius: 50%;
|
|
99
|
+
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
|
|
100
|
+
margin-left: calc(var(--slider-handle-size) / -2);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.color-picker__slider-handle:focus-visible {
|
|
104
|
+
outline: var(--flow-ui-focus-ring);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.color-picker__hue {
|
|
108
|
+
background-image: linear-gradient(
|
|
109
|
+
to right,
|
|
110
|
+
rgb(255, 0, 0) 0%,
|
|
111
|
+
rgb(255, 255, 0) 17%,
|
|
112
|
+
rgb(0, 255, 0) 33%,
|
|
113
|
+
rgb(0, 255, 255) 50%,
|
|
114
|
+
rgb(0, 0, 255) 67%,
|
|
115
|
+
rgb(255, 0, 255) 83%,
|
|
116
|
+
rgb(255, 0, 0) 100%
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.color-picker__alpha .color-picker__alpha-gradient {
|
|
121
|
+
position: absolute;
|
|
122
|
+
top: 0;
|
|
123
|
+
left: 0;
|
|
124
|
+
width: 100%;
|
|
125
|
+
height: 100%;
|
|
126
|
+
border-radius: inherit;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.color-picker__preview {
|
|
130
|
+
flex: 0 0 auto;
|
|
131
|
+
display: inline-flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
justify-content: center;
|
|
134
|
+
position: relative;
|
|
135
|
+
width: 2.25rem;
|
|
136
|
+
height: 2.25rem;
|
|
137
|
+
border: none;
|
|
138
|
+
border-radius: var(--flow-ui-border-radius-circle);
|
|
139
|
+
background: none;
|
|
140
|
+
margin-left: var(--flow-ui-spacing-small);
|
|
141
|
+
cursor: copy;
|
|
142
|
+
forced-color-adjust: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.color-picker__preview:before {
|
|
146
|
+
content: '';
|
|
147
|
+
position: absolute;
|
|
148
|
+
top: 0;
|
|
149
|
+
left: 0;
|
|
150
|
+
width: 100%;
|
|
151
|
+
height: 100%;
|
|
152
|
+
border-radius: inherit;
|
|
153
|
+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
|
|
154
|
+
|
|
155
|
+
/* We use a custom property in lieu of currentColor because of https://bugs.webkit.org/show_bug.cgi?id=216780 */
|
|
156
|
+
background-color: var(--preview-color);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.color-picker__preview:focus-visible {
|
|
160
|
+
outline: var(--flow-ui-focus-ring);
|
|
161
|
+
outline-offset: var(--flow-ui-focus-ring-offset);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.color-picker__preview-color {
|
|
165
|
+
position: absolute;
|
|
166
|
+
top: 0;
|
|
167
|
+
left: 0;
|
|
168
|
+
width: 100%;
|
|
169
|
+
height: 100%;
|
|
170
|
+
border: solid 1px rgba(0, 0, 0, 0.125);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.color-picker__preview-color--copied {
|
|
174
|
+
animation: pulse 0.75s;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@keyframes pulse {
|
|
178
|
+
0% {
|
|
179
|
+
box-shadow: 0 0 0 0 var(--flow-ui-color-primary-400);
|
|
180
|
+
}
|
|
181
|
+
70% {
|
|
182
|
+
box-shadow: 0 0 0 0.5rem transparent;
|
|
183
|
+
}
|
|
184
|
+
100% {
|
|
185
|
+
box-shadow: 0 0 0 0 transparent;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.color-picker__user-input {
|
|
190
|
+
display: flex;
|
|
191
|
+
padding: 0 var(--flow-ui-spacing-small) var(--flow-ui-spacing-small) var(--flow-ui-spacing-small);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.color-picker__user-input flow-ui-input {
|
|
195
|
+
min-width: 0; /* fix input width in Safari */
|
|
196
|
+
flex: 1 1 auto;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.color-picker__user-input flow-ui-button-group {
|
|
200
|
+
margin-left: var(--flow-ui-spacing-small);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.color-picker__user-input flow-ui-button {
|
|
204
|
+
min-width: 3.25rem;
|
|
205
|
+
max-width: 3.25rem;
|
|
206
|
+
font-size: 1rem;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.color-picker__swatches {
|
|
210
|
+
display: grid;
|
|
211
|
+
grid-template-columns: repeat(8, 1fr);
|
|
212
|
+
grid-gap: 0.5rem;
|
|
213
|
+
justify-items: center;
|
|
214
|
+
border-top: solid 1px var(--flow-ui-color-neutral-200);
|
|
215
|
+
padding: var(--flow-ui-spacing-small);
|
|
216
|
+
forced-color-adjust: none;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.color-picker__swatch {
|
|
220
|
+
position: relative;
|
|
221
|
+
width: var(--swatch-size);
|
|
222
|
+
height: var(--swatch-size);
|
|
223
|
+
border-radius: var(--flow-ui-border-radius-small);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.color-picker__swatch .color-picker__swatch-color {
|
|
227
|
+
position: absolute;
|
|
228
|
+
top: 0;
|
|
229
|
+
left: 0;
|
|
230
|
+
width: 100%;
|
|
231
|
+
height: 100%;
|
|
232
|
+
border: solid 1px rgba(0, 0, 0, 0.125);
|
|
233
|
+
border-radius: inherit;
|
|
234
|
+
cursor: pointer;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.color-picker__swatch:focus-visible {
|
|
238
|
+
outline: var(--flow-ui-focus-ring);
|
|
239
|
+
outline-offset: var(--flow-ui-focus-ring-offset);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.color-picker__transparent-bg {
|
|
243
|
+
background-image: linear-gradient(45deg, var(--flow-ui-color-neutral-300) 25%, transparent 25%),
|
|
244
|
+
linear-gradient(45deg, transparent 75%, var(--flow-ui-color-neutral-300) 75%),
|
|
245
|
+
linear-gradient(45deg, transparent 75%, var(--flow-ui-color-neutral-300) 75%),
|
|
246
|
+
linear-gradient(45deg, var(--flow-ui-color-neutral-300) 25%, transparent 25%);
|
|
247
|
+
background-size: 10px 10px;
|
|
248
|
+
background-position: 0 0, 0 0, -5px -5px, 5px 5px;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.color-picker--disabled {
|
|
252
|
+
opacity: 0.5;
|
|
253
|
+
cursor: not-allowed;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.color-picker--disabled .color-picker__grid,
|
|
257
|
+
.color-picker--disabled .color-picker__grid-handle,
|
|
258
|
+
.color-picker--disabled .color-picker__slider,
|
|
259
|
+
.color-picker--disabled .color-picker__slider-handle,
|
|
260
|
+
.color-picker--disabled .color-picker__preview,
|
|
261
|
+
.color-picker--disabled .color-picker__swatch,
|
|
262
|
+
.color-picker--disabled .color-picker__swatch-color {
|
|
263
|
+
pointer-events: none;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/*
|
|
267
|
+
* Color dropdown
|
|
268
|
+
*/
|
|
269
|
+
|
|
270
|
+
.color-dropdown::part(panel) {
|
|
271
|
+
max-height: none;
|
|
272
|
+
background-color: var(--flow-ui-panel-background-color);
|
|
273
|
+
border: solid var(--flow-ui-panel-border-width) var(--flow-ui-panel-border-color);
|
|
274
|
+
border-radius: var(--flow-ui-border-radius-medium);
|
|
275
|
+
overflow: visible;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.color-dropdown__trigger {
|
|
279
|
+
display: inline-block;
|
|
280
|
+
vertical-align: bottom;
|
|
281
|
+
position: relative;
|
|
282
|
+
background-color: transparent;
|
|
283
|
+
border: none;
|
|
284
|
+
cursor: pointer;
|
|
285
|
+
forced-color-adjust: none;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.color-dropdown__trigger.color-dropdown__trigger--small {
|
|
289
|
+
width: var(--flow-ui-input-height-small);
|
|
290
|
+
height: var(--flow-ui-input-height-small);
|
|
291
|
+
border-radius: var(--flow-ui-border-radius-circle);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.color-dropdown__trigger.color-dropdown__trigger--medium {
|
|
295
|
+
width: var(--flow-ui-input-height-medium);
|
|
296
|
+
height: var(--flow-ui-input-height-medium);
|
|
297
|
+
border-radius: var(--flow-ui-border-radius-circle);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.color-dropdown__trigger.color-dropdown__trigger--large {
|
|
301
|
+
width: var(--flow-ui-input-height-large);
|
|
302
|
+
height: var(--flow-ui-input-height-large);
|
|
303
|
+
border-radius: var(--flow-ui-border-radius-circle);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.color-dropdown__trigger:before {
|
|
307
|
+
content: '';
|
|
308
|
+
position: absolute;
|
|
309
|
+
top: 0;
|
|
310
|
+
left: 0;
|
|
311
|
+
width: 100%;
|
|
312
|
+
height: 100%;
|
|
313
|
+
border-radius: inherit;
|
|
314
|
+
background-color: currentColor;
|
|
315
|
+
box-shadow: inset 0 0 0 var(--flow-ui-input-border-width) var(--flow-ui-input-border-color), inset 0 0 0 4px var(--flow-ui-color-neutral-0);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.color-dropdown__trigger--empty:before {
|
|
319
|
+
background-color: transparent;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.color-dropdown__trigger:focus-visible {
|
|
323
|
+
outline: none;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.color-dropdown__trigger:focus-visible:not(.color-dropdown__trigger--disabled) {
|
|
327
|
+
outline: var(--flow-ui-focus-ring);
|
|
328
|
+
outline-offset: var(--flow-ui-focus-ring-offset);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.color-dropdown__trigger.color-dropdown__trigger--disabled {
|
|
332
|
+
opacity: 0.5;
|
|
333
|
+
cursor: not-allowed;
|
|
334
|
+
}
|
|
335
|
+
`;
|
|
336
|
+
|
|
337
|
+
export { styles as default };
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { query, property } from 'lit/decorators.js';
|
|
3
|
+
import { choose } from 'lit/directives/choose.js';
|
|
4
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
5
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
6
|
+
import { boolean } from '../../internal/boolean.mjs';
|
|
7
|
+
import { FlowRdfFormControl } from '../../internal/flow-ui-rdf-element.mjs';
|
|
8
|
+
import { FormControlController, validValidityState, customErrorValidityState } from '../../internal/form.mjs';
|
|
9
|
+
import { isNumber, isNumeric } from '../../internal/type-checks.mjs';
|
|
10
|
+
import styles from './color-stop.styles.mjs';
|
|
11
|
+
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
15
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
16
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
17
|
+
if (decorator = decorators[i])
|
|
18
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
19
|
+
if (kind && result)
|
|
20
|
+
__defProp(target, key, result);
|
|
21
|
+
return result;
|
|
22
|
+
};
|
|
23
|
+
class FlowUiColorStop extends FlowRdfFormControl {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments);
|
|
26
|
+
// private readonly localize = new LocalizeController(this);
|
|
27
|
+
this.formControlController = new FormControlController(this, {
|
|
28
|
+
assumeInteractionOn: ["flow-ui-blur", "flow-ui-change"]
|
|
29
|
+
});
|
|
30
|
+
this.name = "";
|
|
31
|
+
this.form = "";
|
|
32
|
+
this.required = false;
|
|
33
|
+
this.size = "small";
|
|
34
|
+
this.placeholder = false;
|
|
35
|
+
this.fixed = void 0;
|
|
36
|
+
this.swatches = "";
|
|
37
|
+
}
|
|
38
|
+
connectedCallback() {
|
|
39
|
+
super.connectedCallback();
|
|
40
|
+
this.placeholder = boolean(this.placeholder, true);
|
|
41
|
+
this.required = boolean(this.required, true);
|
|
42
|
+
}
|
|
43
|
+
/** Gets the validity state object. */
|
|
44
|
+
get validity() {
|
|
45
|
+
return this.validate() ? validValidityState : customErrorValidityState;
|
|
46
|
+
}
|
|
47
|
+
/** Gets the validation message. */
|
|
48
|
+
get validationMessage() {
|
|
49
|
+
return this.validate() ? "" : "Invalid regular expression";
|
|
50
|
+
}
|
|
51
|
+
/** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
|
|
52
|
+
checkValidity() {
|
|
53
|
+
return this.validate();
|
|
54
|
+
}
|
|
55
|
+
/** Gets the associated form, if one exists. */
|
|
56
|
+
getForm() {
|
|
57
|
+
return this.formControlController.getForm();
|
|
58
|
+
}
|
|
59
|
+
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
60
|
+
reportValidity() {
|
|
61
|
+
this.input.setCustomValidity(this.validationMessage);
|
|
62
|
+
return this.input.reportValidity();
|
|
63
|
+
}
|
|
64
|
+
/** Sets a custom validation message. Pass an empty string to restore validity. */
|
|
65
|
+
setCustomValidity(message) {
|
|
66
|
+
this.input.setCustomValidity(message);
|
|
67
|
+
this.formControlController.updateValidity();
|
|
68
|
+
}
|
|
69
|
+
handleRemove() {
|
|
70
|
+
this.emit("flow-ui-remove");
|
|
71
|
+
}
|
|
72
|
+
async handleChange(event) {
|
|
73
|
+
const textOptions = this.textOptions?.value ?? [];
|
|
74
|
+
const newValue = {
|
|
75
|
+
value: this.input.value,
|
|
76
|
+
color: this.picker.value,
|
|
77
|
+
options: {
|
|
78
|
+
caseSensitive: textOptions.includes("match-case"),
|
|
79
|
+
regex: textOptions.includes("regex")
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
this.value = newValue;
|
|
83
|
+
event.stopPropagation();
|
|
84
|
+
event.preventDefault();
|
|
85
|
+
this.emitChange();
|
|
86
|
+
}
|
|
87
|
+
emitChange() {
|
|
88
|
+
this.emit("flow-ui-change");
|
|
89
|
+
}
|
|
90
|
+
validate() {
|
|
91
|
+
if (this.value.options?.regex) {
|
|
92
|
+
try {
|
|
93
|
+
new RegExp(this.value.value.toString());
|
|
94
|
+
} catch (e) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
textInputTemplate() {
|
|
101
|
+
const toolButtons = [];
|
|
102
|
+
if (this.value.options?.caseSensitive) {
|
|
103
|
+
toolButtons.push("match-case");
|
|
104
|
+
}
|
|
105
|
+
if (this.value.options?.regex) {
|
|
106
|
+
toolButtons.push("regex");
|
|
107
|
+
}
|
|
108
|
+
const textOptionsSize = this.size === "small" ? "x-small" : this.size === "medium" ? "small" : "medium";
|
|
109
|
+
return html`
|
|
110
|
+
<flow-ui-input
|
|
111
|
+
part="input"
|
|
112
|
+
class="color-stop__input"
|
|
113
|
+
type="text"
|
|
114
|
+
value=${this.value.value.toString()}
|
|
115
|
+
size=${this.size}
|
|
116
|
+
placeholder="Add a new value"
|
|
117
|
+
>
|
|
118
|
+
<flow-ui-tool-button-group
|
|
119
|
+
class="text-options-button-group"
|
|
120
|
+
slot="suffix"
|
|
121
|
+
size=${textOptionsSize}
|
|
122
|
+
mode="checkbox"
|
|
123
|
+
.value=${toolButtons}
|
|
124
|
+
@flow-ui-change=${this.handleChange}
|
|
125
|
+
>
|
|
126
|
+
<flow-ui-tool-button
|
|
127
|
+
icon-library="system"
|
|
128
|
+
icon="type"
|
|
129
|
+
value="match-case"
|
|
130
|
+
tooltip="Match case"
|
|
131
|
+
tooltip-placement="bottom-end"
|
|
132
|
+
></flow-ui-tool-button>
|
|
133
|
+
<flow-ui-tool-button
|
|
134
|
+
icon-library="system"
|
|
135
|
+
icon="regex"
|
|
136
|
+
value="regex"
|
|
137
|
+
tooltip="Use regular expression"
|
|
138
|
+
tooltip-placement="bottom-end"
|
|
139
|
+
></flow-ui-tool-button>
|
|
140
|
+
</flow-ui-tool-button-group>
|
|
141
|
+
</flow-ui-input>
|
|
142
|
+
`;
|
|
143
|
+
}
|
|
144
|
+
numberInputTemplate() {
|
|
145
|
+
const options = this.options;
|
|
146
|
+
return html`
|
|
147
|
+
<flow-ui-input
|
|
148
|
+
type="number"
|
|
149
|
+
part="input"
|
|
150
|
+
class="color-stop__input"
|
|
151
|
+
value=${isNumber(this.value.value) || isNumeric(this.value.value) ? this.value.value : ""}
|
|
152
|
+
min=${ifDefined(options.min)}
|
|
153
|
+
max=${ifDefined(options.max)}
|
|
154
|
+
step=${ifDefined(options.step)}
|
|
155
|
+
placeholder="Add a new number"
|
|
156
|
+
size=${this.size}
|
|
157
|
+
>
|
|
158
|
+
${options.units && html`
|
|
159
|
+
<span slot="suffix">${options.units}</span>
|
|
160
|
+
`}
|
|
161
|
+
</flow-ui-input>
|
|
162
|
+
`;
|
|
163
|
+
}
|
|
164
|
+
fixedInputTemplate() {
|
|
165
|
+
return html`
|
|
166
|
+
<flow-ui-input
|
|
167
|
+
class="color-stop__input"
|
|
168
|
+
type="text"
|
|
169
|
+
value=${this.fixed ?? "Fixed color"}
|
|
170
|
+
disabled
|
|
171
|
+
size=${this.size}
|
|
172
|
+
></flow-ui-input>
|
|
173
|
+
`;
|
|
174
|
+
}
|
|
175
|
+
selectInputTemplate() {
|
|
176
|
+
const options = this.options;
|
|
177
|
+
return html`
|
|
178
|
+
<flow-ui-select
|
|
179
|
+
part="select"
|
|
180
|
+
class="color-stop__input"
|
|
181
|
+
size=${this.size}
|
|
182
|
+
value=${this.value.value}
|
|
183
|
+
placeholder="Add a new value"
|
|
184
|
+
>
|
|
185
|
+
${options.options.map((option) => {
|
|
186
|
+
if (typeof option === "string") {
|
|
187
|
+
return html`
|
|
188
|
+
<flow-ui-option value=${option}>${option}</flow-ui-option>
|
|
189
|
+
`;
|
|
190
|
+
} else {
|
|
191
|
+
return html`
|
|
192
|
+
<flow-ui-option value=${option.value}>${option.name ?? option.value}</flow-ui-option>
|
|
193
|
+
`;
|
|
194
|
+
}
|
|
195
|
+
})}
|
|
196
|
+
</flow-ui-select>
|
|
197
|
+
`;
|
|
198
|
+
}
|
|
199
|
+
render() {
|
|
200
|
+
return html`
|
|
201
|
+
<div
|
|
202
|
+
part="base"
|
|
203
|
+
class=${classMap({
|
|
204
|
+
"color-stop": true,
|
|
205
|
+
"color-stop--small": this.size === "small",
|
|
206
|
+
"color-stop--medium": this.size === "medium",
|
|
207
|
+
"color-stop--large": this.size === "large",
|
|
208
|
+
"color-stop--placeholder": this.placeholder,
|
|
209
|
+
"color-stop--fixed": typeof this.fixed !== "undefined"
|
|
210
|
+
})}
|
|
211
|
+
@flow-ui-change=${this.handleChange}
|
|
212
|
+
>
|
|
213
|
+
<flow-ui-icon-button
|
|
214
|
+
class="color-stop__remove-button"
|
|
215
|
+
label="Remove color stop"
|
|
216
|
+
library="system"
|
|
217
|
+
name="dash-circle"
|
|
218
|
+
confirm="Are you sure?"
|
|
219
|
+
tooltip-placement="right"
|
|
220
|
+
tooltip-distance="1"
|
|
221
|
+
@click=${this.handleRemove}
|
|
222
|
+
></flow-ui-icon-button>
|
|
223
|
+
|
|
224
|
+
${choose(
|
|
225
|
+
this.fixed ? "fixed" : this.options.type,
|
|
226
|
+
[
|
|
227
|
+
["fixed", () => this.fixedInputTemplate()],
|
|
228
|
+
["number", () => this.numberInputTemplate()],
|
|
229
|
+
["select", () => this.selectInputTemplate()]
|
|
230
|
+
],
|
|
231
|
+
() => this.textInputTemplate()
|
|
232
|
+
)}
|
|
233
|
+
|
|
234
|
+
<flow-ui-color-picker
|
|
235
|
+
part="color-picker"
|
|
236
|
+
size=${this.size}
|
|
237
|
+
format="hex"
|
|
238
|
+
placement="bottom-end"
|
|
239
|
+
skidding="0"
|
|
240
|
+
distance="4"
|
|
241
|
+
opacity
|
|
242
|
+
class="color-stop__picker"
|
|
243
|
+
value=${this.placeholder ? "rgba(0,0,0,0)" : this.value.color}
|
|
244
|
+
.swatches=${this.swatches}
|
|
245
|
+
?disabled=${this.placeholder}
|
|
246
|
+
></flow-ui-color-picker>
|
|
247
|
+
</div>
|
|
248
|
+
`;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
FlowUiColorStop.styles = styles;
|
|
252
|
+
__decorateClass([
|
|
253
|
+
query(".color-stop__input")
|
|
254
|
+
], FlowUiColorStop.prototype, "input", 2);
|
|
255
|
+
__decorateClass([
|
|
256
|
+
query(".color-stop__picker")
|
|
257
|
+
], FlowUiColorStop.prototype, "picker", 2);
|
|
258
|
+
__decorateClass([
|
|
259
|
+
query(".text-options-button-group")
|
|
260
|
+
], FlowUiColorStop.prototype, "textOptions", 2);
|
|
261
|
+
__decorateClass([
|
|
262
|
+
property()
|
|
263
|
+
], FlowUiColorStop.prototype, "name", 2);
|
|
264
|
+
__decorateClass([
|
|
265
|
+
property({ reflect: true })
|
|
266
|
+
], FlowUiColorStop.prototype, "form", 2);
|
|
267
|
+
__decorateClass([
|
|
268
|
+
property({ type: Boolean, reflect: true })
|
|
269
|
+
], FlowUiColorStop.prototype, "required", 2);
|
|
270
|
+
__decorateClass([
|
|
271
|
+
property({ type: Object })
|
|
272
|
+
], FlowUiColorStop.prototype, "options", 2);
|
|
273
|
+
__decorateClass([
|
|
274
|
+
property({ type: Object })
|
|
275
|
+
], FlowUiColorStop.prototype, "value", 2);
|
|
276
|
+
__decorateClass([
|
|
277
|
+
property()
|
|
278
|
+
], FlowUiColorStop.prototype, "size", 2);
|
|
279
|
+
__decorateClass([
|
|
280
|
+
property({ type: Boolean, reflect: true })
|
|
281
|
+
], FlowUiColorStop.prototype, "placeholder", 2);
|
|
282
|
+
__decorateClass([
|
|
283
|
+
property({ type: String, reflect: true })
|
|
284
|
+
], FlowUiColorStop.prototype, "fixed", 2);
|
|
285
|
+
__decorateClass([
|
|
286
|
+
property()
|
|
287
|
+
], FlowUiColorStop.prototype, "swatches", 2);
|
|
288
|
+
|
|
289
|
+
export { FlowUiColorStop as default };
|