@widgetic/editor 3.11.4 → 4.0.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/README.md +245 -0
- package/dist/assets/fonts.json +331 -0
- package/dist/assets/icons/ic-browser/audio.svg +7 -0
- package/dist/assets/icons/ic-browser/document.svg +11 -0
- package/dist/assets/icons/ic-browser/error.svg +5 -0
- package/dist/assets/icons/ic-browser/folder.svg +28 -0
- package/dist/assets/icons/ic-browser/player-pause.svg +1 -0
- package/dist/assets/icons/ic-browser/player-play.svg +1 -0
- package/dist/assets/icons/ic-browser/trash.svg +1 -0
- package/dist/assets/icons/ic-fixed-position/background-deselected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/background-selected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/bottom-left-background-deselected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/bottom-left-background-selected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/bottom-left-icon.svg +4 -0
- package/dist/assets/icons/ic-fixed-position/bottom-right-background-deselected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/bottom-right-background-selected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/bottom-right-icon.svg +4 -0
- package/dist/assets/icons/ic-fixed-position/center-bottom-icon.svg +5 -0
- package/dist/assets/icons/ic-fixed-position/center-center-icon.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/center-left-icon.svg +5 -0
- package/dist/assets/icons/ic-fixed-position/center-right-icon.svg +5 -0
- package/dist/assets/icons/ic-fixed-position/center-top-icon.svg +5 -0
- package/dist/assets/icons/ic-fixed-position/top-left-background-deselected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/top-left-background-selected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/top-left-icon.svg +4 -0
- package/dist/assets/icons/ic-fixed-position/top-right-background-deselected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/top-right-background-selected.svg +3 -0
- package/dist/assets/icons/ic-fixed-position/top-right-icon.svg +4 -0
- package/dist/assets/icons/trash.svg +1 -0
- package/dist/components/MockWidget.svelte +108 -0
- package/dist/components/MockWidget.svelte.d.ts +22 -0
- package/dist/components/WidgetPreview.svelte +852 -0
- package/dist/components/WidgetPreview.svelte.d.ts +100 -0
- package/dist/components/color-select/ColorSelect.svelte +258 -0
- package/dist/components/color-select/ColorSelect.svelte.d.ts +42 -0
- package/dist/components/color-select/color.d.ts +25 -0
- package/dist/components/color-select/color.js +21 -0
- package/dist/components/color-select/constants.d.ts +5 -0
- package/dist/components/color-select/constants.js +5 -0
- package/dist/components/color-select/render.d.ts +5 -0
- package/dist/components/color-select/render.js +77 -0
- package/dist/components/color-select/shaders.d.ts +3 -0
- package/dist/components/color-select/shaders.js +8 -0
- package/dist/components/editors/EmbedEditor.svelte +700 -0
- package/dist/components/editors/EmbedEditor.svelte.d.ts +50 -0
- package/dist/components/editors/PropsEditor.svelte +3952 -0
- package/dist/components/editors/PropsEditor.svelte.d.ts +62 -0
- package/dist/components/editors/props-editor.css +73 -0
- package/dist/components/ic/AngleInputController.svelte +276 -0
- package/dist/components/ic/AngleInputController.svelte.d.ts +26 -0
- package/dist/components/ic/BrowserInputController.svelte +724 -0
- package/dist/components/ic/BrowserInputController.svelte.d.ts +39 -0
- package/dist/components/ic/CheckboxInputController.svelte +203 -0
- package/dist/components/ic/CheckboxInputController.svelte.d.ts +41 -0
- package/dist/components/ic/ColorPickerInputController.svelte +1584 -0
- package/dist/components/ic/ColorPickerInputController.svelte.d.ts +50 -0
- package/dist/components/ic/DateFieldInputController.svelte +453 -0
- package/dist/components/ic/DateFieldInputController.svelte.d.ts +35 -0
- package/dist/components/ic/DatePickerInputController.svelte +364 -0
- package/dist/components/ic/DatePickerInputController.svelte.d.ts +28 -0
- package/dist/components/ic/DropdownInputController.svelte +226 -0
- package/dist/components/ic/DropdownInputController.svelte.d.ts +43 -0
- package/dist/components/ic/FixedPositionInputController.svelte +353 -0
- package/dist/components/ic/FixedPositionInputController.svelte.d.ts +23 -0
- package/dist/components/ic/FontInputController.svelte +2062 -0
- package/dist/components/ic/FontInputController.svelte.d.ts +47 -0
- package/dist/components/ic/InputControllerHeader.svelte +147 -0
- package/dist/components/ic/InputControllerHeader.svelte.d.ts +23 -0
- package/dist/components/ic/NumberControls.svelte +299 -0
- package/dist/components/ic/NumberControls.svelte.d.ts +30 -0
- package/dist/components/ic/NumberInputController.svelte +397 -0
- package/dist/components/ic/NumberInputController.svelte.d.ts +30 -0
- package/dist/components/ic/PositionInputController.svelte +252 -0
- package/dist/components/ic/PositionInputController.svelte.d.ts +37 -0
- package/dist/components/ic/RadioGroupInputController.svelte +162 -0
- package/dist/components/ic/RadioGroupInputController.svelte.d.ts +38 -0
- package/dist/components/ic/RangeCalendarInputController.svelte +262 -0
- package/dist/components/ic/RangeCalendarInputController.svelte.d.ts +32 -0
- package/dist/components/ic/RoundedCornersInputController.svelte +469 -0
- package/dist/components/ic/RoundedCornersInputController.svelte.d.ts +37 -0
- package/dist/components/ic/SliderInputController.svelte +411 -0
- package/dist/components/ic/SliderInputController.svelte.d.ts +46 -0
- package/dist/components/ic/SliderRangeInputController.svelte +155 -0
- package/dist/components/ic/SliderRangeInputController.svelte.d.ts +33 -0
- package/dist/components/ic/SwitchInputController.svelte +107 -0
- package/dist/components/ic/SwitchInputController.svelte.d.ts +24 -0
- package/dist/components/ic/TagsInputController.svelte +125 -0
- package/dist/components/ic/TagsInputController.svelte.d.ts +27 -0
- package/dist/components/ic/TextAreaInputController.svelte +1804 -0
- package/dist/components/ic/TextAreaInputController.svelte.d.ts +13 -0
- package/dist/components/ic/TextAreaPreviewInputController.svelte +476 -0
- package/dist/components/ic/TextAreaPreviewInputController.svelte.d.ts +28 -0
- package/dist/components/ic/TextInputController.svelte +70 -0
- package/dist/components/ic/TextInputController.svelte.d.ts +30 -0
- package/dist/components/ic/TimeInputController.svelte +434 -0
- package/dist/components/ic/TimeInputController.svelte.d.ts +25 -0
- package/dist/components/ic/VectorInputController.svelte +1826 -0
- package/dist/components/ic/VectorInputController.svelte.d.ts +47 -0
- package/dist/components/ic/index.d.ts +39 -0
- package/dist/components/ic/index.js +24 -0
- package/dist/components/ic/shared/CategoryTabs.svelte +40 -0
- package/dist/components/ic/shared/CategoryTabs.svelte.d.ts +25 -0
- package/dist/components/ic/shared/ItemGrid.svelte +181 -0
- package/dist/components/ic/shared/ItemGrid.svelte.d.ts +35 -0
- package/dist/components/ic/shared/RecentItemsSection.svelte +260 -0
- package/dist/components/ic/shared/RecentItemsSection.svelte.d.ts +35 -0
- package/dist/components/ic/shared/index.d.ts +8 -0
- package/dist/components/ic/shared/index.js +9 -0
- package/dist/components/icons/addnew.svelte +21 -0
- package/dist/components/icons/addnew.svelte.d.ts +20 -0
- package/dist/components/icons/drag.svelte +29 -0
- package/dist/components/icons/drag.svelte.d.ts +20 -0
- package/dist/components/icons/drag.svg +1 -0
- package/dist/components/icons/locked.svelte +4 -0
- package/dist/components/icons/locked.svelte.d.ts +26 -0
- package/dist/components/icons/locked.svg +4 -0
- package/dist/components/icons/ok.svelte +20 -0
- package/dist/components/icons/ok.svelte.d.ts +20 -0
- package/dist/components/icons/ok.svg +11 -0
- package/dist/components/icons/unlocked.svelte +4 -0
- package/dist/components/icons/unlocked.svelte.d.ts +26 -0
- package/dist/components/icons/unlocked.svg +4 -0
- package/dist/components/icons/x.svelte +14 -0
- package/dist/components/icons/x.svelte.d.ts +20 -0
- package/dist/components/icons/x.svg +5 -0
- package/dist/components/ui/arrows/OpacitySliderArrows.svelte +43 -0
- package/dist/components/ui/arrows/OpacitySliderArrows.svelte.d.ts +23 -0
- package/dist/components/ui/checkerboard-background/CheckerboardBackground.svelte +15 -0
- package/dist/components/ui/checkerboard-background/CheckerboardBackground.svelte.d.ts +20 -0
- package/dist/config.d.ts +5 -0
- package/dist/config.js +19 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -0
- package/dist/stores/userSession.d.ts +7 -0
- package/dist/stores/userSession.js +28 -0
- package/dist/utils/FontManager.d.ts +276 -0
- package/dist/utils/FontManager.js +1283 -0
- package/dist/utils/MediaManager.d.ts +35 -0
- package/dist/utils/MediaManager.js +59 -0
- package/dist/utils/VectorManager.d.ts +190 -0
- package/dist/utils/VectorManager.js +754 -0
- package/dist/utils/colorAutocomplete.d.ts +10 -0
- package/dist/utils/colorAutocomplete.js +28 -0
- package/dist/utils/colorNames.d.ts +3 -0
- package/dist/utils/colorNames.js +152 -0
- package/dist/utils/colorTransparency.d.ts +52 -0
- package/dist/utils/colorTransparency.js +114 -0
- package/dist/utils/fontUtils.d.ts +34 -0
- package/dist/utils/fontUtils.js +132 -0
- package/dist/utils/passiveEvents.js +20 -0
- package/dist/utils/recentColors.d.ts +10 -0
- package/dist/utils/recentColors.js +63 -0
- package/dist/utils/skipFonts.d.ts +3 -0
- package/dist/utils/skipFonts.js +49 -0
- package/dist/utils/vectorUtils.d.ts +34 -0
- package/dist/utils/vectorUtils.js +71 -0
- package/dist/utils.d.ts +11 -0
- package/dist/utils.js +38 -0
- package/package.json +134 -74
- package/.babelrc +0 -10
- package/.bowerrc +0 -4
- package/.nvmrc +0 -1
- package/Gruntfile.coffee +0 -69
- package/bower.json +0 -28
- package/css/browser/entries/activateable.styl +0 -29
- package/css/browser/entries/audio.styl +0 -39
- package/css/browser/entries/folder.styl +0 -79
- package/css/browser/entries/image.styl +0 -26
- package/css/browser/entries/index.styl +0 -66
- package/css/browser/entries/rss.styl +0 -11
- package/css/browser/entries/video.styl +0 -11
- package/css/browser/index.styl +0 -86
- package/css/browser/intent/index.styl +0 -61
- package/css/browser/nav/index.styl +0 -73
- package/css/browser/social-browser.styl +0 -23
- package/css/controls/clock.styl +0 -110
- package/css/controls/config.styl +0 -6
- package/css/controls/control-audio-details.styl +0 -63
- package/css/controls/control-audio.styl +0 -28
- package/css/controls/control-browser.styl +0 -48
- package/css/controls/control-color.styl +0 -423
- package/css/controls/control-date_time.styl +0 -191
- package/css/controls/control-dropdown.styl +0 -79
- package/css/controls/control-font.styl +0 -147
- package/css/controls/control-image-details.styl +0 -35
- package/css/controls/control-image.styl +0 -43
- package/css/controls/control-order-picker.styl +0 -29
- package/css/controls/control-position.styl +0 -390
- package/css/controls/control-range.styl +0 -68
- package/css/controls/control-scale.styl +0 -30
- package/css/controls/control-slider.styl +0 -38
- package/css/controls/control-spinner.styl +0 -39
- package/css/controls/control-textarea.styl +0 -52
- package/css/controls/control-toggle.styl +0 -34
- package/css/controls/control-url.styl +0 -32
- package/css/controls/control-video-details.styl +0 -85
- package/css/controls/control-video.styl +0 -43
- package/css/controls/general.styl +0 -98
- package/css/controls/index.styl +0 -25
- package/css/editor/colors.styl +0 -7
- package/css/editor/content/directinput.styl +0 -47
- package/css/editor/content/index.styl +0 -111
- package/css/editor/content/message.styl +0 -53
- package/css/editor/content/tabs.styl +0 -75
- package/css/editor/copied-from-old-style.styl +0 -197
- package/css/editor/details/bulk-editor.styl +0 -104
- package/css/editor/details/index.styl +0 -21
- package/css/editor/details/item.styl +0 -153
- package/css/editor/embed.styl +0 -106
- package/css/editor/footer.styl +0 -180
- package/css/editor/full-editor.styl +0 -16
- package/css/editor/index.styl +0 -124
- package/css/editor/login-popup.styl +0 -13
- package/css/editor/preview.styl +0 -257
- package/css/editor/skin/editor/index.styl +0 -54
- package/css/editor/skin/editor/tabs.styl +0 -111
- package/css/editor/skin/index.styl +0 -138
- package/css/editor/skin/popup.styl +0 -152
- package/css/editor/skin/presets/dropdown.styl +0 -61
- package/css/editor/skin/presets/index.styl +0 -86
- package/css/editor/skin/presets/list.styl +0 -244
- package/css/editor/tooltips.styl +0 -85
- package/css/fonts.styl +0 -47
- package/css/icons/BlogvioEditor.dev.svg +0 -112
- package/css/icons.styl +0 -16
- package/css/img/arrow-right-rounded-v-small.png +0 -0
- package/css/img/browser-folder-separator.png +0 -0
- package/css/img/calendar-input-icons.png +0 -0
- package/css/img/check.png +0 -0
- package/css/img/close.png +0 -0
- package/css/img/composition/edit-icon.png +0 -0
- package/css/img/content/audio-icon.png +0 -0
- package/css/img/content/folder-icon.png +0 -0
- package/css/img/content/messages/error-background.png +0 -0
- package/css/img/content/messages/error-icon.png +0 -0
- package/css/img/content/messages/notification-background.png +0 -0
- package/css/img/content/messages/notification-icon.png +0 -0
- package/css/img/content/no-files-audio.png +0 -0
- package/css/img/content/no-files-image.png +0 -0
- package/css/img/content/no-files-video.png +0 -0
- package/css/img/content/no-files.png +0 -0
- package/css/img/content/rss-icon.png +0 -0
- package/css/img/content/selected.png +0 -0
- package/css/img/content/video-icon.png +0 -0
- package/css/img/content/with-control-text.png +0 -0
- package/css/img/control-dropdown-arrow.png +0 -0
- package/css/img/control-image-valid.png +0 -0
- package/css/img/control-position-icon.png +0 -0
- package/css/img/control-scale-lock-icon.png +0 -0
- package/css/img/control-slider-arrows-hover.png +0 -0
- package/css/img/control-slider-arrows.png +0 -0
- package/css/img/control-spinner-buttons-hover.png +0 -0
- package/css/img/control-spinner-buttons.png +0 -0
- package/css/img/control-textarea-bold-active.png +0 -0
- package/css/img/control-textarea-bold.png +0 -0
- package/css/img/control-textarea-italic-active.png +0 -0
- package/css/img/control-textarea-italic.png +0 -0
- package/css/img/control-textarea-underline-active.png +0 -0
- package/css/img/control-textarea-underline.png +0 -0
- package/css/img/custom-checkbox-sprite.png +0 -0
- package/css/img/details/item-collapse-icon.png +0 -0
- package/css/img/details/item-expand-icon.png +0 -0
- package/css/img/details/item-sort-icon.png +0 -0
- package/css/img/done-arrow.png +0 -0
- package/css/img/fb-logo-icon-w.png +0 -0
- package/css/img/grid-icons.png +0 -0
- package/css/img/icon-reference.png +0 -0
- package/css/img/indicator.png +0 -0
- package/css/img/loader.gif +0 -0
- package/css/img/loaders/audio-white.png +0 -0
- package/css/img/loaders/audio.png +0 -0
- package/css/img/loaders/photo-white.png +0 -0
- package/css/img/loaders/photo.png +0 -0
- package/css/img/loaders/util-white.png +0 -0
- package/css/img/loaders/util.png +0 -0
- package/css/img/loaders/video-white.png +0 -0
- package/css/img/loaders/video.png +0 -0
- package/css/img/maximize.png +0 -0
- package/css/img/minimize.png +0 -0
- package/css/img/next-btn.png +0 -0
- package/css/img/search-icon-sprite.png +0 -0
- package/css/img/services/blogvio.png +0 -0
- package/css/img/services/drive.png +0 -0
- package/css/img/services/dropbox-login.png +0 -0
- package/css/img/services/dropbox.png +0 -0
- package/css/img/services/facebook-login.png +0 -0
- package/css/img/services/facebook.png +0 -0
- package/css/img/services/flickr-login.png +0 -0
- package/css/img/services/flickr.png +0 -0
- package/css/img/services/instagram-login.png +0 -0
- package/css/img/services/instagram.png +0 -0
- package/css/img/services/text.png +0 -0
- package/css/img/services/uploads.png +0 -0
- package/css/img/services/uploads.svg +0 -689
- package/css/img/services/webaddress-bw.png +0 -0
- package/css/img/services/webaddress.png +0 -0
- package/css/img/services/webadress.png +0 -0
- package/css/img/services/websearch.png +0 -0
- package/css/img/services/wix.png +0 -0
- package/css/img/skin/item-active-indicator.png +0 -0
- package/css/img/skin/item-hover-icon.png +0 -0
- package/css/img/skin/overwrite.png +0 -0
- package/css/img/skin/popup-name-icon.png +0 -0
- package/css/img/skin/popup-save.png +0 -0
- package/css/img/skin/preset.png +0 -0
- package/css/img/skin/presets-arrow-purple.png +0 -0
- package/css/img/tw-icon-w.png +0 -0
- package/css/img/warning.png +0 -0
- package/css/img/white-rounded-check.png +0 -0
- package/css/index.styl +0 -9
- package/css/mixins.styl +0 -62
- package/css/scrollable.styl +0 -101
- package/karma.conf.js +0 -73
- package/lib/control.js +0 -1
- package/lib/controls.js +0 -1
- package/lib/core.editor.js +0 -4
- package/lib/core.js +0 -1
- package/lib/core.vendor.js +0 -3
- package/lib/dev/control.js +0 -845
- package/lib/dev/controls.js +0 -7774
- package/lib/dev/core.editor.js +0 -6439
- package/lib/dev/core.js +0 -1486
- package/lib/dev/core.vendor.js +0 -10708
- package/lib/dev/editor.css +0 -166
- package/lib/dev/editor.js +0 -29710
- package/lib/dev/editor.vendor.js +0 -15119
- package/lib/dev/jquery.nanoscroller.js.map +0 -10
- package/lib/editor.css +0 -167
- package/lib/editor.js +0 -49
- package/lib/editor.vendor.js +0 -11
- package/src/api/index.coffee +0 -23
- package/src/api/mixin.coffee +0 -89
- package/src/browser/controller/entry/audio.coffee +0 -38
- package/src/browser/controller/entry/button.coffee +0 -16
- package/src/browser/controller/entry/file.coffee +0 -35
- package/src/browser/controller/entry/folder.coffee +0 -14
- package/src/browser/controller/entry/image.coffee +0 -24
- package/src/browser/controller/entry/index.coffee +0 -18
- package/src/browser/controller/entry/rss.coffee +0 -5
- package/src/browser/controller/entry/video.coffee +0 -4
- package/src/browser/controller/index.coffee +0 -289
- package/src/browser/controller/instagram.coffee +0 -129
- package/src/browser/controller/navbar.coffee +0 -48
- package/src/browser/controller/social.coffee +0 -213
- package/src/browser/model/entry.coffee +0 -18
- package/src/browser/model/index.coffee +0 -34
- package/src/core/controller/font-loader.coffee +0 -65
- package/src/core/controller/lazyload.coffee +0 -14
- package/src/core/controller/overlay.coffee +0 -146
- package/src/core/controller/popup.coffee +0 -36
- package/src/core/controller/scrollable.coffee +0 -68
- package/src/core/controls/audio.coffee +0 -56
- package/src/core/controls/browser.coffee +0 -271
- package/src/core/controls/color.coffee +0 -121
- package/src/core/controls/date-time/calendar/index.coffee +0 -99
- package/src/core/controls/date-time/calendar/months.coffee +0 -52
- package/src/core/controls/date-time/calendar/years.coffee +0 -58
- package/src/core/controls/date-time/clock.coffee +0 -62
- package/src/core/controls/date-time/helper.coffee +0 -31
- package/src/core/controls/date-time/index.coffee +0 -62
- package/src/core/controls/date-time/popup.coffee +0 -56
- package/src/core/controls/details/audio.coffee +0 -33
- package/src/core/controls/details/image.coffee +0 -19
- package/src/core/controls/details/video.coffee +0 -14
- package/src/core/controls/dropdown.coffee +0 -100
- package/src/core/controls/font/font-item.coffee +0 -22
- package/src/core/controls/font/font-list.coffee +0 -108
- package/src/core/controls/font/fonts-popup.coffee +0 -91
- package/src/core/controls/font/index.coffee +0 -66
- package/src/core/controls/image.coffee +0 -37
- package/src/core/controls/index.coffee +0 -88
- package/src/core/controls/orderPicker.coffee +0 -93
- package/src/core/controls/position/grid-panel.coffee +0 -75
- package/src/core/controls/position/index.coffee +0 -98
- package/src/core/controls/position/panel.coffee +0 -68
- package/src/core/controls/position/pixel-panel.coffee +0 -54
- package/src/core/controls/position/popup.coffee +0 -63
- package/src/core/controls/position/reference-panel.coffee +0 -26
- package/src/core/controls/range.coffee +0 -191
- package/src/core/controls/rss.coffee +0 -16
- package/src/core/controls/scale.coffee +0 -78
- package/src/core/controls/slider.coffee +0 -122
- package/src/core/controls/stepper.coffee +0 -97
- package/src/core/controls/text.coffee +0 -54
- package/src/core/controls/textarea.coffee +0 -78
- package/src/core/controls/toggle.coffee +0 -29
- package/src/core/controls/url.coffee +0 -88
- package/src/core/controls/video.coffee +0 -9
- package/src/core/embed/api.js +0 -178
- package/src/core/embed/controller.js +0 -331
- package/src/core/models/composition.coffee +0 -178
- package/src/core/models/content.coffee +0 -79
- package/src/core/models/skin.coffee +0 -91
- package/src/core/models/user.coffee +0 -6
- package/src/core/models/widget.coffee +0 -88
- package/src/core/router/index.coffee +0 -44
- package/src/core/services/container/index.js +0 -18
- package/src/core/services/container/instance.js +0 -3
- package/src/core/services/content.js +0 -80
- package/src/core/services/instagram.coffee +0 -47
- package/src/core/services/mixin/events.js +0 -17
- package/src/core/services/service.js +0 -1
- package/src/core/services/sounds.js +0 -81
- package/src/core/services/uploads.js +0 -299
- package/src/core/utils/popup.coffee +0 -67
- package/src/core/utils/should-show.coffee +0 -12
- package/src/core/views/audio-details.pug +0 -9
- package/src/core/views/audio.pug +0 -7
- package/src/core/views/browser.pug +0 -4
- package/src/core/views/color.pug +0 -8
- package/src/core/views/date-time/calendar.pug +0 -3
- package/src/core/views/date-time/clock.pug +0 -12
- package/src/core/views/date-time/grid.pug +0 -6
- package/src/core/views/date-time/input.pug +0 -4
- package/src/core/views/date-time/table.pug +0 -6
- package/src/core/views/dropdown.pug +0 -9
- package/src/core/views/font/font-item.pug +0 -3
- package/src/core/views/font/fonts-list.pug +0 -7
- package/src/core/views/font/fonts-popup.pug +0 -5
- package/src/core/views/font/index.pug +0 -7
- package/src/core/views/image-details.pug +0 -6
- package/src/core/views/image.pug +0 -5
- package/src/core/views/input-layout.pug +0 -15
- package/src/core/views/order-items.pug +0 -7
- package/src/core/views/order-picker.pug +0 -7
- package/src/core/views/pixelpanel.pug +0 -69
- package/src/core/views/position.pug +0 -10
- package/src/core/views/range.pug +0 -9
- package/src/core/views/scale.pug +0 -7
- package/src/core/views/slider.pug +0 -6
- package/src/core/views/stepper.pug +0 -6
- package/src/core/views/text.pug +0 -4
- package/src/core/views/textarea.pug +0 -8
- package/src/core/views/toggle.pug +0 -5
- package/src/core/views/video-details.pug +0 -7
- package/src/core/views/video.pug +0 -4
- package/src/core/widget/index.coffee +0 -66
- package/src/editor/content/browser/dropzone.html +0 -268
- package/src/editor/content/browser/file.html +0 -124
- package/src/editor/content/browser/scroll-pane.html +0 -32
- package/src/editor/content/browser/service.html +0 -53
- package/src/editor/content/browser/upload.coffee +0 -44
- package/src/editor/content/browser/upload.html +0 -439
- package/src/editor/content/index.coffee +0 -294
- package/src/editor/content/input/field.coffee +0 -45
- package/src/editor/content/input/index.coffee +0 -115
- package/src/editor/content/service/base/photoitem.coffee +0 -49
- package/src/editor/content/service/cache.coffee +0 -20
- package/src/editor/content/service/default.coffee +0 -59
- package/src/editor/content/service/dropbox.coffee +0 -71
- package/src/editor/content/service/facebook.coffee +0 -143
- package/src/editor/content/service/flickr.coffee +0 -85
- package/src/editor/content/service/google-drive-sdk.coffee +0 -18
- package/src/editor/content/service/google-drive.coffee +0 -144
- package/src/editor/content/service/instagram-social.coffee +0 -84
- package/src/editor/content/service/instagram.coffee +0 -168
- package/src/editor/content/service/share-popup.coffee +0 -15
- package/src/editor/content/service/soundcloud.coffee +0 -163
- package/src/editor/content/tab.coffee +0 -27
- package/src/editor/details/bulk-editor/attributes-panel.coffee +0 -11
- package/src/editor/details/bulk-editor/index.coffee +0 -86
- package/src/editor/details/index.coffee +0 -156
- package/src/editor/details/item/attributes.coffee +0 -45
- package/src/editor/details/item/index.coffee +0 -82
- package/src/editor/editor.coffee +0 -274
- package/src/editor/footer/breadcrumb.coffee +0 -17
- package/src/editor/footer/index.coffee +0 -36
- package/src/editor/index.coffee +0 -79
- package/src/editor/listeners/embed-listener.coffee +0 -143
- package/src/editor/login-popup.coffee +0 -29
- package/src/editor/notification-controller.coffee +0 -35
- package/src/editor/popup.coffee +0 -68
- package/src/editor/remote-preview.coffee +0 -68
- package/src/editor/save/index.coffee +0 -62
- package/src/editor/skin/delete.coffee +0 -33
- package/src/editor/skin/editor/index.coffee +0 -188
- package/src/editor/skin/editor/panel.coffee +0 -37
- package/src/editor/skin/index.coffee +0 -126
- package/src/editor/skin/save.coffee +0 -58
- package/src/editor/skin/selector/index.coffee +0 -59
- package/src/editor/skin/selector/item.coffee +0 -123
- package/src/editor/skin/selector/list.coffee +0 -97
- package/src/editor/views/embed.pug +0 -10
- package/src/editor/views/loginbutton.pug +0 -8
- package/src/editor/views/popup.pug +0 -17
- package/src/editor/views/presets.pug +0 -8
- package/src/editor/views/presetslist-header.pug +0 -8
- package/src/editor/views/skinitem.pug +0 -13
- package/src/modules/control.js +0 -3
- package/src/modules/controls.js +0 -29
- package/src/modules/core.js +0 -19
- package/src/modules/editor.js +0 -80
- package/test/config.js +0 -3
- package/test/core/models/skin-spec.js +0 -209
- package/webpack.config.js +0 -46
- package/webpack.config.prod.js +0 -9
- /package/{src/core/views/date-time/popup.pug → dist/utils/passiveEvents.d.ts} +0 -0
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* RoundedCornersInputController
|
|
3
|
+
*
|
|
4
|
+
* A specialized input controller for setting border radius values on all four corners
|
|
5
|
+
* of a rectangle, with the ability to lock/unlock synchronized editing across corners.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Visual representation of corners as a grid
|
|
9
|
+
* - Individual number inputs for each corner radius
|
|
10
|
+
* - Lock toggle to synchronize all corner values
|
|
11
|
+
* - Hover and focus states consistent with other input controllers
|
|
12
|
+
* - Accepts only positive integer values
|
|
13
|
+
-->
|
|
14
|
+
|
|
15
|
+
<script lang="ts">
|
|
16
|
+
import { onMount } from 'svelte';
|
|
17
|
+
import Lock from '../icons/locked.svelte';
|
|
18
|
+
import Unlock from '../icons/unlocked.svelte';
|
|
19
|
+
import type { InputControllerConfig } from './index';
|
|
20
|
+
|
|
21
|
+
// Constants
|
|
22
|
+
const MIN_RADIUS = 0;
|
|
23
|
+
const MAX_RADIUS = 120;
|
|
24
|
+
|
|
25
|
+
// Required props
|
|
26
|
+
export let label: string;
|
|
27
|
+
export let value: { topLeft: number; topRight: number; bottomRight: number; bottomLeft: number };
|
|
28
|
+
export let onChange: (newValue: { topLeft: number; topRight: number; bottomRight: number; bottomLeft: number }) => void;
|
|
29
|
+
export let config: InputControllerConfig = {};
|
|
30
|
+
export let helpText: string | undefined = undefined;
|
|
31
|
+
export let onFocus: () => void = () => {};
|
|
32
|
+
|
|
33
|
+
// Optional: Class prop for external styling
|
|
34
|
+
let className = '';
|
|
35
|
+
export { className as class };
|
|
36
|
+
|
|
37
|
+
// Internal state
|
|
38
|
+
let isLocked = true;
|
|
39
|
+
let focusedCorner: keyof typeof value | null = null;
|
|
40
|
+
let isEditing = false;
|
|
41
|
+
let isHovering = false;
|
|
42
|
+
|
|
43
|
+
// Reference to the input elements
|
|
44
|
+
let inputRefs: { [key in keyof typeof value]?: HTMLInputElement } = {};
|
|
45
|
+
|
|
46
|
+
// Helper function to update value while respecting lock state
|
|
47
|
+
function updateCorner(corner: keyof typeof value, newValue: number) {
|
|
48
|
+
// Ensure value is a non-negative integer within bounds
|
|
49
|
+
newValue = Math.max(MIN_RADIUS, Math.min(MAX_RADIUS, Math.floor(newValue)));
|
|
50
|
+
|
|
51
|
+
if (isLocked) {
|
|
52
|
+
// When locked, update all corners to the same value
|
|
53
|
+
onChange({
|
|
54
|
+
topLeft: newValue,
|
|
55
|
+
topRight: newValue,
|
|
56
|
+
bottomRight: newValue,
|
|
57
|
+
bottomLeft: newValue
|
|
58
|
+
});
|
|
59
|
+
} else {
|
|
60
|
+
// When unlocked, update only the specified corner
|
|
61
|
+
onChange({
|
|
62
|
+
...value,
|
|
63
|
+
[corner]: newValue
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Handler for input changes
|
|
69
|
+
function handleInputChange(corner: keyof typeof value, e: Event) {
|
|
70
|
+
const target = e.target as HTMLInputElement;
|
|
71
|
+
const newValue = parseInt(target.value) || 0;
|
|
72
|
+
updateCorner(corner, newValue);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Handler for input
|
|
76
|
+
function handleInput(corner: keyof typeof value, e: Event) {
|
|
77
|
+
const input = e.target as HTMLInputElement;
|
|
78
|
+
const inputValue = input.value;
|
|
79
|
+
|
|
80
|
+
// Handle empty input
|
|
81
|
+
if (inputValue === '') {
|
|
82
|
+
isEditing = true;
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Prevent multiple minus signs or any minus sign (we only want positive integers)
|
|
87
|
+
if (inputValue.includes('-')) {
|
|
88
|
+
input.value = inputValue.replace(/-/g, '');
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Validate numeric input - only allow digits
|
|
93
|
+
if (!/^\d*$/.test(inputValue)) {
|
|
94
|
+
input.value = inputValue.replace(/[^\d]/g, '');
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Handle leading zeros - normalize the input value
|
|
99
|
+
if (inputValue.length > 1 && inputValue.startsWith('0')) {
|
|
100
|
+
// Convert to number and back to string to remove leading zeros
|
|
101
|
+
const normalizedValue = String(parseInt(inputValue, 10));
|
|
102
|
+
if (normalizedValue !== inputValue) {
|
|
103
|
+
input.value = normalizedValue;
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Check if the value exceeds MAX_RADIUS during typing
|
|
109
|
+
const numValue = parseInt(inputValue);
|
|
110
|
+
if (!isNaN(numValue) && numValue > MAX_RADIUS) {
|
|
111
|
+
input.value = MAX_RADIUS.toString();
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (!isNaN(numValue)) {
|
|
116
|
+
// We're ok with temporarily having any positive integer during editing
|
|
117
|
+
if (corner === focusedCorner) {
|
|
118
|
+
isEditing = true;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Handler for input focus
|
|
124
|
+
function handleInputFocus(corner: keyof typeof value) {
|
|
125
|
+
focusedCorner = corner;
|
|
126
|
+
isEditing = true;
|
|
127
|
+
onFocus();
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Handler for input blur
|
|
131
|
+
function handleInputBlur(corner: keyof typeof value) {
|
|
132
|
+
const input = inputRefs[corner];
|
|
133
|
+
isEditing = false;
|
|
134
|
+
|
|
135
|
+
// Handle empty or invalid input
|
|
136
|
+
if (!input || input.value === '') {
|
|
137
|
+
const currentValue = value[corner];
|
|
138
|
+
input!.value = String(currentValue);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Validate and apply final value (ensure within bounds)
|
|
143
|
+
// This also normalizes the value (removing leading zeros)
|
|
144
|
+
const numValue = parseInt(input.value) || 0;
|
|
145
|
+
const finalValue = Math.max(MIN_RADIUS, Math.min(MAX_RADIUS, numValue));
|
|
146
|
+
|
|
147
|
+
// Always update the input with the normalized value (handles leading zeros)
|
|
148
|
+
input.value = finalValue.toString();
|
|
149
|
+
|
|
150
|
+
// Only trigger onChange if the value actually changed
|
|
151
|
+
if (value[corner] !== finalValue) {
|
|
152
|
+
updateCorner(corner, finalValue);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Reset focused corner if we're not focusing another input immediately
|
|
156
|
+
setTimeout(() => {
|
|
157
|
+
if (!document.activeElement ||
|
|
158
|
+
!(document.activeElement instanceof HTMLInputElement) ||
|
|
159
|
+
!Object.values(inputRefs).includes(document.activeElement)) {
|
|
160
|
+
focusedCorner = null;
|
|
161
|
+
}
|
|
162
|
+
}, 0);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Toggle the lock state
|
|
166
|
+
function toggleLock() {
|
|
167
|
+
isLocked = !isLocked;
|
|
168
|
+
|
|
169
|
+
// If locking, normalize all values to the first focused corner or top-left
|
|
170
|
+
if (isLocked && focusedCorner) {
|
|
171
|
+
const referenceValue = value[focusedCorner];
|
|
172
|
+
onChange({
|
|
173
|
+
topLeft: referenceValue,
|
|
174
|
+
topRight: referenceValue,
|
|
175
|
+
bottomRight: referenceValue,
|
|
176
|
+
bottomLeft: referenceValue
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// Get corner-specific CSS classes
|
|
182
|
+
function getCornerClasses(corner: keyof typeof value) {
|
|
183
|
+
const isTopLeft = corner === 'topLeft';
|
|
184
|
+
const isTopRight = corner === 'topRight';
|
|
185
|
+
const isBottomLeft = corner === 'bottomLeft';
|
|
186
|
+
const isBottomRight = corner === 'bottomRight';
|
|
187
|
+
|
|
188
|
+
return {
|
|
189
|
+
container: `
|
|
190
|
+
relative
|
|
191
|
+
${isTopLeft ? 'rounded-tl-[15px]' : ''}
|
|
192
|
+
${isTopRight ? 'rounded-tr-[15px]' : ''}
|
|
193
|
+
${isBottomLeft ? 'rounded-bl-[15px]' : ''}
|
|
194
|
+
${isBottomRight ? 'rounded-br-[15px]' : ''}
|
|
195
|
+
${focusedCorner === corner ? 'bg-sage-green' : 'bg-grey1'}
|
|
196
|
+
hover:bg-[${focusedCorner === corner ? 'hsl(var(--sage-green))' : 'hsl(var(--grey2))'}]
|
|
197
|
+
transition-colors
|
|
198
|
+
`,
|
|
199
|
+
input: `
|
|
200
|
+
w-full
|
|
201
|
+
h-full
|
|
202
|
+
bg-transparent
|
|
203
|
+
text-center
|
|
204
|
+
focus:outline-none
|
|
205
|
+
subtext
|
|
206
|
+
${focusedCorner === corner ? 'text-white' : 'text-grey7'}
|
|
207
|
+
hover:text-[${focusedCorner === corner ? 'white' : 'hsl(var(--grey7))'}]
|
|
208
|
+
`
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Keyboard event handler
|
|
213
|
+
function handleKeyDown(corner: keyof typeof value, e: KeyboardEvent) {
|
|
214
|
+
const input = e.target as HTMLInputElement;
|
|
215
|
+
|
|
216
|
+
// Allow selection shortcuts
|
|
217
|
+
if ((e.metaKey || e.ctrlKey) && e.key === 'a') {
|
|
218
|
+
isEditing = true;
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Allow navigation keys
|
|
223
|
+
if (e.key === 'Backspace' || e.key === 'Delete' ||
|
|
224
|
+
e.key === 'ArrowLeft' || e.key === 'ArrowRight' ||
|
|
225
|
+
e.key === 'Tab') {
|
|
226
|
+
isEditing = true;
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Allow copy/paste operations
|
|
231
|
+
if (e.metaKey || e.ctrlKey) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// Prevent leading zeros
|
|
236
|
+
if (e.key === '0') {
|
|
237
|
+
// If input is empty or the entire content is selected, just set to "0"
|
|
238
|
+
if (input.value === '' ||
|
|
239
|
+
(input.selectionStart === 0 && input.selectionEnd === input.value.length)) {
|
|
240
|
+
// Only set value if entering just a single 0
|
|
241
|
+
input.value = '0';
|
|
242
|
+
e.preventDefault();
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// If cursor is at the start and there's already a digit, prevent additional leading zeros
|
|
247
|
+
if (input.selectionStart === 0 && /^\d/.test(input.value)) {
|
|
248
|
+
e.preventDefault();
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// Prevent non-numeric inputs (except for navigation and editing keys)
|
|
254
|
+
if (!/^\d$/.test(e.key) &&
|
|
255
|
+
!['Backspace', 'Delete', 'ArrowLeft', 'ArrowRight', 'Tab', 'Enter'].includes(e.key) &&
|
|
256
|
+
!(e.ctrlKey || e.metaKey)) {
|
|
257
|
+
e.preventDefault();
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// Mouse hover handlers for the controller
|
|
262
|
+
function handleMouseEnter() {
|
|
263
|
+
isHovering = true;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
function handleMouseLeave() {
|
|
267
|
+
isHovering = false;
|
|
268
|
+
}
|
|
269
|
+
</script>
|
|
270
|
+
|
|
271
|
+
<!-- Main corner radius grid component -->
|
|
272
|
+
<div class="corners-container {className}"
|
|
273
|
+
on:mouseenter={handleMouseEnter}
|
|
274
|
+
on:mouseleave={handleMouseLeave}
|
|
275
|
+
on:focusin={onFocus}>
|
|
276
|
+
|
|
277
|
+
<!-- Corner radius grid -->
|
|
278
|
+
<div class="corners-grid">
|
|
279
|
+
<!-- Top Left -->
|
|
280
|
+
<div class={getCornerClasses('topLeft').container}>
|
|
281
|
+
<input
|
|
282
|
+
type="text"
|
|
283
|
+
inputmode="numeric"
|
|
284
|
+
pattern="[0-9]*"
|
|
285
|
+
bind:this={inputRefs['topLeft']}
|
|
286
|
+
value={value.topLeft}
|
|
287
|
+
on:input={(e) => handleInput('topLeft', e)}
|
|
288
|
+
on:change={(e) => handleInputChange('topLeft', e)}
|
|
289
|
+
on:focus={() => handleInputFocus('topLeft')}
|
|
290
|
+
on:blur={() => handleInputBlur('topLeft')}
|
|
291
|
+
on:keydown={(e) => handleKeyDown('topLeft', e)}
|
|
292
|
+
class={getCornerClasses('topLeft').input}
|
|
293
|
+
aria-label="Top left corner radius"
|
|
294
|
+
maxlength="3"
|
|
295
|
+
/>
|
|
296
|
+
</div>
|
|
297
|
+
|
|
298
|
+
<!-- Top Right -->
|
|
299
|
+
<div class={getCornerClasses('topRight').container}>
|
|
300
|
+
<input
|
|
301
|
+
type="text"
|
|
302
|
+
inputmode="numeric"
|
|
303
|
+
pattern="[0-9]*"
|
|
304
|
+
bind:this={inputRefs['topRight']}
|
|
305
|
+
value={value.topRight}
|
|
306
|
+
on:input={(e) => handleInput('topRight', e)}
|
|
307
|
+
on:change={(e) => handleInputChange('topRight', e)}
|
|
308
|
+
on:focus={() => handleInputFocus('topRight')}
|
|
309
|
+
on:blur={() => handleInputBlur('topRight')}
|
|
310
|
+
on:keydown={(e) => handleKeyDown('topRight', e)}
|
|
311
|
+
class={getCornerClasses('topRight').input}
|
|
312
|
+
aria-label="Top right corner radius"
|
|
313
|
+
maxlength="3"
|
|
314
|
+
/>
|
|
315
|
+
</div>
|
|
316
|
+
|
|
317
|
+
<!-- Bottom Left -->
|
|
318
|
+
<div class={getCornerClasses('bottomLeft').container}>
|
|
319
|
+
<input
|
|
320
|
+
type="text"
|
|
321
|
+
inputmode="numeric"
|
|
322
|
+
pattern="[0-9]*"
|
|
323
|
+
bind:this={inputRefs['bottomLeft']}
|
|
324
|
+
value={value.bottomLeft}
|
|
325
|
+
on:input={(e) => handleInput('bottomLeft', e)}
|
|
326
|
+
on:change={(e) => handleInputChange('bottomLeft', e)}
|
|
327
|
+
on:focus={() => handleInputFocus('bottomLeft')}
|
|
328
|
+
on:blur={() => handleInputBlur('bottomLeft')}
|
|
329
|
+
on:keydown={(e) => handleKeyDown('bottomLeft', e)}
|
|
330
|
+
class={getCornerClasses('bottomLeft').input}
|
|
331
|
+
aria-label="Bottom left corner radius"
|
|
332
|
+
maxlength="3"
|
|
333
|
+
/>
|
|
334
|
+
</div>
|
|
335
|
+
|
|
336
|
+
<!-- Bottom Right -->
|
|
337
|
+
<div class={getCornerClasses('bottomRight').container}>
|
|
338
|
+
<input
|
|
339
|
+
type="text"
|
|
340
|
+
inputmode="numeric"
|
|
341
|
+
pattern="[0-9]*"
|
|
342
|
+
bind:this={inputRefs['bottomRight']}
|
|
343
|
+
value={value.bottomRight}
|
|
344
|
+
on:input={(e) => handleInput('bottomRight', e)}
|
|
345
|
+
on:change={(e) => handleInputChange('bottomRight', e)}
|
|
346
|
+
on:focus={() => handleInputFocus('bottomRight')}
|
|
347
|
+
on:blur={() => handleInputBlur('bottomRight')}
|
|
348
|
+
on:keydown={(e) => handleKeyDown('bottomRight', e)}
|
|
349
|
+
class={getCornerClasses('bottomRight').input}
|
|
350
|
+
aria-label="Bottom right corner radius"
|
|
351
|
+
maxlength="3"
|
|
352
|
+
/>
|
|
353
|
+
</div>
|
|
354
|
+
|
|
355
|
+
<!-- Centered lock button -->
|
|
356
|
+
<button
|
|
357
|
+
class="lock-button"
|
|
358
|
+
on:click={toggleLock}
|
|
359
|
+
aria-label={isLocked ? "Unlock corner radius values" : "Lock corner radius values"}
|
|
360
|
+
aria-pressed={isLocked}
|
|
361
|
+
>
|
|
362
|
+
<div class="flex items-center justify-center w-full h-full {isLocked ? 'text-sage-green' : 'text-grey7'}">
|
|
363
|
+
<svelte:component
|
|
364
|
+
this={isLocked ? Lock : Unlock}
|
|
365
|
+
class="w-5 h-5"
|
|
366
|
+
/>
|
|
367
|
+
</div>
|
|
368
|
+
</button>
|
|
369
|
+
</div>
|
|
370
|
+
|
|
371
|
+
<!-- Border overlay -->
|
|
372
|
+
<div
|
|
373
|
+
class="border-overlay {isHovering ? 'hovered' : ''}"
|
|
374
|
+
aria-hidden="true"
|
|
375
|
+
/>
|
|
376
|
+
</div>
|
|
377
|
+
|
|
378
|
+
<style>
|
|
379
|
+
/* Hide number input spinners */
|
|
380
|
+
/* svelte-ignore css_unused_selector */
|
|
381
|
+
input[type="number"]::-webkit-inner-spin-button,
|
|
382
|
+
/* svelte-ignore css_unused_selector */
|
|
383
|
+
input[type="number"]::-webkit-outer-spin-button {
|
|
384
|
+
-webkit-appearance: none;
|
|
385
|
+
margin: 0;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
input {
|
|
389
|
+
-moz-appearance: textfield;
|
|
390
|
+
appearance: textfield;
|
|
391
|
+
padding: 8px 4px;
|
|
392
|
+
font-size: 16px;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/* Base corner container styles */
|
|
396
|
+
.corners-grid > div {
|
|
397
|
+
min-width: 60px;
|
|
398
|
+
min-height: 40px;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/* Focus states */
|
|
402
|
+
input:focus {
|
|
403
|
+
outline: none !important;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/* Main container */
|
|
407
|
+
.corners-container {
|
|
408
|
+
position: relative;
|
|
409
|
+
width: 185px;
|
|
410
|
+
height: 111px;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/* Grid styling */
|
|
414
|
+
.corners-grid {
|
|
415
|
+
position: relative;
|
|
416
|
+
width: 185px;
|
|
417
|
+
height: 111px;
|
|
418
|
+
display: grid;
|
|
419
|
+
grid-template-columns: 1fr 1fr;
|
|
420
|
+
grid-template-rows: 1fr 1fr;
|
|
421
|
+
gap: 1px;
|
|
422
|
+
background-color: white;
|
|
423
|
+
border-radius: var(--radius-large);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/* Lock button styling */
|
|
427
|
+
.lock-button {
|
|
428
|
+
position: absolute;
|
|
429
|
+
width: 40px;
|
|
430
|
+
height: 40px;
|
|
431
|
+
border-radius: 50%;
|
|
432
|
+
background-color: white;
|
|
433
|
+
display: flex;
|
|
434
|
+
align-items: center;
|
|
435
|
+
justify-content: center;
|
|
436
|
+
z-index: 10;
|
|
437
|
+
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
|
|
438
|
+
transition: all 0.2s ease;
|
|
439
|
+
top: 50%;
|
|
440
|
+
left: 50%;
|
|
441
|
+
transform: translate(-50%, -50%);
|
|
442
|
+
outline: none !important;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
.lock-button:focus-visible {
|
|
446
|
+
box-shadow: 0 0 0 2px hsl(var(--primary));
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/* Border overlay */
|
|
450
|
+
.border-overlay {
|
|
451
|
+
position: absolute;
|
|
452
|
+
inset: 0;
|
|
453
|
+
pointer-events: none;
|
|
454
|
+
border-radius: 15px;
|
|
455
|
+
border: 1px solid hsl(var(--grey2));
|
|
456
|
+
transition: border-color 0.2s ease;
|
|
457
|
+
z-index: 5;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.border-overlay.hovered {
|
|
461
|
+
border-color: hsl(var(--forest-green));
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
:global(.subtext) {
|
|
465
|
+
font-size: 14px;
|
|
466
|
+
line-height: 1.5;
|
|
467
|
+
font-weight: 400;
|
|
468
|
+
}
|
|
469
|
+
</style>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { InputControllerConfig } from './index';
|
|
2
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: Props & {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
|
+
};
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
declare const RoundedCornersInputController: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
+
label: string;
|
|
17
|
+
value: {
|
|
18
|
+
topLeft: number;
|
|
19
|
+
topRight: number;
|
|
20
|
+
bottomRight: number;
|
|
21
|
+
bottomLeft: number;
|
|
22
|
+
};
|
|
23
|
+
onChange: (newValue: {
|
|
24
|
+
topLeft: number;
|
|
25
|
+
topRight: number;
|
|
26
|
+
bottomRight: number;
|
|
27
|
+
bottomLeft: number;
|
|
28
|
+
}) => void;
|
|
29
|
+
config?: InputControllerConfig;
|
|
30
|
+
helpText?: string | undefined;
|
|
31
|
+
onFocus?: () => void;
|
|
32
|
+
class?: string;
|
|
33
|
+
}, {
|
|
34
|
+
[evt: string]: CustomEvent<any>;
|
|
35
|
+
}, {}, {}, string>;
|
|
36
|
+
type RoundedCornersInputController = InstanceType<typeof RoundedCornersInputController>;
|
|
37
|
+
export default RoundedCornersInputController;
|