-
+
+
diff --git a/blocks/CloudImageEditor/src/css/common.css b/blocks/CloudImageEditor/src/css/common.css
index 09b4060d9..c224c83c9 100644
--- a/blocks/CloudImageEditor/src/css/common.css
+++ b/blocks/CloudImageEditor/src/css/common.css
@@ -1,67 +1,39 @@
/* TODO: we shuoud use basic theme there */
-:host(.lr-cloud-image-editor),
-.lr-cloud-image-editor {
- /* Theme settings >>> */
- --rgb-primary-accent: 6, 2, 196;
- --rgb-text-base: 0, 0, 0;
- --rgb-text-accent-contrast: 255, 255, 255;
- --rgb-fill-contrast: 255, 255, 255;
- --rgb-fill-shaded: 245, 245, 245;
- --rgb-shadow: 0, 0, 0;
- --rgb-error: 209, 81, 81;
- --opacity-shade-mid: 0.2;
-
- /* <<< Theme settings */
-
- --color-primary-accent: rgb(var(--rgb-primary-accent));
- --color-text-base: rgb(var(--rgb-text-base));
- --color-text-accent-contrast: rgb(var(--rgb-text-accent-contrast));
- --color-text-soft: rgb(var(--rgb-fill-contrast));
- --color-text-error: rgb(var(--rgb-error));
- --color-fill-contrast: rgb(var(--rgb-fill-contrast));
- --color-modal-backdrop: rgba(var(--rgb-fill-shaded), 0.95);
- --color-image-background: rgba(var(--rgb-fill-shaded));
- --color-outline: rgba(var(--rgb-text-base), var(--opacity-shade-mid));
- --color-underline: rgba(var(--rgb-text-base), 0.08);
- --color-shade: rgba(var(--rgb-text-base), 0.02);
+[lr-cloud-image-editor] {
+ --color-primary-accent: var(--uc-primary);
+ --color-text-base: var(--uc-foreground);
+ --color-text-accent-contrast: var(--uc-background);
+ --color-fill-contrast: var(--uc-background);
+ --color-modal-backdrop: oklch(0 0 0 / 0.1);
+ --color-image-background: var(--uc-muted);
--color-focus-ring: var(--color-primary-accent);
- --color-input-placeholder: rgba(var(--rgb-text-base), 0.32);
- --color-error: rgb(var(--rgb-error));
+ --color-crop-guides: var(--uc-foreground);
- --font-size-ui: 16px;
- --font-size-title: 18px;
- --font-weight-title: 500;
- --font-size-soft: 14px;
+ --font-size-ui: var(--uc-font-size);
- --size-touch-area: 40px;
- --size-panel-heading: 66px;
+ --size-touch-area: var(--uc-button-size);
+ --size-panel-heading: calc(var(--uc-button-size) + var(--uc-padding) * 2);
--size-ui-min-width: 130px;
--size-line-width: 1px;
--size-modal-width: 650px;
+ --size-icon: calc(var(--uc-button-size) / 2); /* TODO: remove icon size overrides */
- --border-radius-connect: 2px;
- --border-radius-editor: 3px;
- --border-radius-thumb: 4px;
- --border-radius-ui: 5px;
- --border-radius-base: 6px;
+ --border-radius-editor: var(--uc-radius);
+ --border-radius-thumb: var(--uc-radius);
+ --border-radius-ui: var(--uc-radius);
+ --border-radius-base: var(--uc-radius);
--cldtr-gap-min: 5px;
--cldtr-gap-mid-1: 10px;
--cldtr-gap-mid-2: 15px;
--cldtr-gap-max: 20px;
- --opacity-min: var(--opacity-shade-mid);
- --opacity-mid: 0.1;
- --opacity-max: 0.05;
-
--transition-duration-2: var(--transition-duration-all, 0.2s);
--transition-duration-3: var(--transition-duration-all, 0.3s);
--transition-duration-4: var(--transition-duration-all, 0.4s);
--transition-duration-5: var(--transition-duration-all, 0.5s);
- --shadow-base: 0px 5px 15px rgba(var(--rgb-shadow), 0.1), 0px 1px 4px rgba(var(--rgb-shadow), 0.15);
-
--modal-header-opacity: 1;
--modal-header-height: var(--size-panel-heading);
--modal-toolbar-height: var(--size-panel-heading);
@@ -74,61 +46,54 @@
max-height: 100%;
}
-:host(.lr-cloud-image-editor) :is([can-handle-paste]:hover, [can-handle-paste]:focus),
-.lr-cloud-image-editor :is([can-handle-paste]:hover, [can-handle-paste]:focus) {
+[lr-cloud-image-editor] :is([can-handle-paste]:hover, [can-handle-paste]:focus) {
--can-handle-paste: 'true';
}
-:host(.lr-cloud-image-editor)
- :is([tabindex][focus-visible], [tabindex]:hover, [with-effects][focus-visible], [with-effects]:hover),
-.lr-cloud-image-editor
+[lr-cloud-image-editor]
:is([tabindex][focus-visible], [tabindex]:hover, [with-effects][focus-visible], [with-effects]:hover) {
--filter-effect: var(--hover-filter) !important;
--opacity-effect: var(--hover-opacity) !important;
--color-effect: var(--hover-color-rgb) !important;
+ --background-effect: var(--hover-background) !important;
}
-:host(.lr-cloud-image-editor) :is([tabindex]:active, [with-effects]:active),
-.lr-cloud-image-editor :is([tabindex]:active, [with-effects]:active) {
+[lr-cloud-image-editor] :is([tabindex]:active, [with-effects]:active) {
--filter-effect: var(--down-filter) !important;
--opacity-effect: var(--down-opacity) !important;
--color-effect: var(--down-color-rgb) !important;
+ --background-effect: var(--down-background) !important;
}
-:host(.lr-cloud-image-editor) :is([tabindex][active], [with-effects][active]),
-.lr-cloud-image-editor :is([tabindex][active], [with-effects][active]) {
+[lr-cloud-image-editor] :is([tabindex][active], [with-effects][active]) {
--filter-effect: var(--active-filter) !important;
--opacity-effect: var(--active-opacity) !important;
--color-effect: var(--active-color-rgb) !important;
+ --background-effect: var(--active-background) !important;
}
-:host(.lr-cloud-image-editor) [hidden-scrollbar]::-webkit-scrollbar,
-.lr-cloud-image-editor [hidden-scrollbar]::-webkit-scrollbar {
+[lr-cloud-image-editor] [hidden-scrollbar]::-webkit-scrollbar {
display: none;
}
-:host(.lr-cloud-image-editor) [hidden-scrollbar],
-.lr-cloud-image-editor [hidden-scrollbar] {
+[lr-cloud-image-editor] [hidden-scrollbar] {
-ms-overflow-style: none;
scrollbar-width: none;
}
-:host(.lr-cloud-image-editor.editor_ON),
-.lr-cloud-image-editor.editor_ON {
+[lr-cloud-image-editor].uc-editor_ON {
--modal-header-opacity: 0;
--modal-header-height: 0px;
--modal-toolbar-height: calc(var(--size-panel-heading) * 2);
}
-:host(.lr-cloud-image-editor.editor_OFF),
-.lr-cloud-image-editor.editor_OFF {
+[lr-cloud-image-editor].uc-editor_OFF {
--modal-header-opacity: 1;
--modal-header-height: var(--size-panel-heading);
--modal-toolbar-height: var(--size-panel-heading);
}
-:host(.lr-cloud-image-editor) > .wrapper,
-.lr-cloud-image-editor > .wrapper {
+[lr-cloud-image-editor] > .uc-wrapper {
--l-min-img-height: var(--modal-toolbar-height);
--l-max-img-height: 100%;
--l-edit-button-width: 120px;
@@ -143,23 +108,20 @@
}
@media only screen and (max-width: 800px) {
- :host(.lr-cloud-image-editor) > .wrapper,
- .lr-cloud-image-editor > .wrapper {
+ [lr-cloud-image-editor] > .uc-wrapper {
--l-edit-button-width: 70px;
--l-toolbar-horizontal-padding: var(--cldtr-gap-min);
}
}
-:host(.lr-cloud-image-editor) > .wrapper > .viewport,
-.lr-cloud-image-editor > .wrapper > .viewport {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-viewport {
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
-:host(.lr-cloud-image-editor) > .wrapper > .viewport > .image_container > .image,
-.lr-cloud-image-editor > .wrapper > .viewport > .image_container > .image {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-viewport > .uc-image_container > .uc-image {
--viewer-image-opacity: 1;
position: absolute;
@@ -178,15 +140,13 @@
pointer-events: auto;
}
-:host(.lr-cloud-image-editor) > .wrapper > .viewport > .image_container > .image.image_visible_viewer,
-.lr-cloud-image-editor > .wrapper > .viewport > .image_container > .image.image_visible_viewer {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-viewport > .uc-image_container > .uc-image.uc-image_visible_viewer {
transition:
opacity var(--transition-duration-3) ease-in-out,
transform var(--transition-duration-4);
}
-:host(.lr-cloud-image-editor) > .wrapper > .viewport > .image_container > .image.image_hidden_to_cropper,
-.lr-cloud-image-editor > .wrapper > .viewport > .image_container > .image.image_hidden_to_cropper {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-viewport > .uc-image_container > .uc-image.uc-image_hidden_to_cropper {
--viewer-image-opacity: 0;
background-image: var(--transparent-pixel);
@@ -197,8 +157,7 @@
pointer-events: none;
}
-:host(.lr-cloud-image-editor) > .wrapper > .viewport > .image_container > .image.image_hidden_effects,
-.lr-cloud-image-editor > .wrapper > .viewport > .image_container > .image.image_hidden_effects {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-viewport > .uc-image_container > .uc-image.uc-image_hidden_effects {
--viewer-image-opacity: 0;
transform: scale(1);
@@ -208,8 +167,7 @@
pointer-events: none;
}
-:host(.lr-cloud-image-editor) > .wrapper > .viewport > .image_container,
-.lr-cloud-image-editor > .wrapper > .viewport > .image_container {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-viewport > .uc-image_container {
position: relative;
display: block;
width: 100%;
@@ -218,14 +176,12 @@
transition: var(--transition-duration-3);
}
-:host(.lr-cloud-image-editor) > .wrapper > .toolbar,
-.lr-cloud-image-editor > .wrapper > .toolbar {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-toolbar {
position: relative;
transition: 0.3s;
}
-:host(.lr-cloud-image-editor) > .wrapper > .toolbar > .toolbar_content,
-.lr-cloud-image-editor > .wrapper > .toolbar > .toolbar_content {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-toolbar > .uc-toolbar_content {
position: absolute;
bottom: 0px;
left: 0px;
@@ -236,8 +192,7 @@
background-color: var(--color-fill-contrast);
}
-:host(.lr-cloud-image-editor) > .wrapper > .toolbar > .toolbar_content.toolbar_content__viewer,
-.lr-cloud-image-editor > .wrapper > .toolbar > .toolbar_content.toolbar_content__viewer {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-toolbar > .uc-toolbar_content.uc-toolbar_content__viewer {
display: flex;
align-items: center;
justify-content: space-between;
@@ -246,19 +201,16 @@
padding-left: var(--l-toolbar-horizontal-padding);
}
-:host(.lr-cloud-image-editor) > .wrapper > .toolbar > .toolbar_content.toolbar_content__editor,
-.lr-cloud-image-editor > .wrapper > .toolbar > .toolbar_content.toolbar_content__editor {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-toolbar > .uc-toolbar_content.uc-toolbar_content__editor {
display: flex;
}
-:host(.lr-cloud-image-editor) > .wrapper > .viewport > .info_pan,
-.lr-cloud-image-editor > .wrapper > .viewport > .info_pan {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-viewport > .uc-info_pan {
position: absolute;
user-select: none;
}
-:host(.lr-cloud-image-editor) > .wrapper > .viewport > .file_type_outer,
-.lr-cloud-image-editor > .wrapper > .viewport > .file_type_outer {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-viewport > .uc-file_type_outer {
position: absolute;
z-index: 2;
display: flex;
@@ -267,13 +219,11 @@
user-select: none;
}
-:host(.lr-cloud-image-editor) > .wrapper > .viewport > .file_type_outer > .file_type,
-.lr-cloud-image-editor > .wrapper > .viewport > .file_type_outer > .file_type {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-viewport > .uc-file_type_outer > .uc-file_type {
padding: 4px 0.8em;
}
-:host(.lr-cloud-image-editor) > .wrapper > .network_problems_splash,
-.lr-cloud-image-editor > .wrapper > .network_problems_splash {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-network_problems_splash {
position: absolute;
z-index: 4;
display: flex;
@@ -283,8 +233,7 @@
background-color: var(--color-fill-contrast);
}
-:host(.lr-cloud-image-editor) > .wrapper > .network_problems_splash > .network_problems_content,
-.lr-cloud-image-editor > .wrapper > .network_problems_splash > .network_problems_content {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-network_problems_splash > .uc-network_problems_content {
display: flex;
flex: 1;
flex-direction: column;
@@ -292,41 +241,39 @@
justify-content: center;
}
-:host(.lr-cloud-image-editor)
- > .wrapper
- > .network_problems_splash
- > .network_problems_content
- > .network_problems_icon,
-.lr-cloud-image-editor > .wrapper > .network_problems_splash > .network_problems_content > .network_problems_icon {
+[lr-cloud-image-editor]
+ > .uc-wrapper
+ > .uc-network_problems_splash
+ > .uc-network_problems_content
+ > .uc-network_problems_icon {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
- color: rgba(var(--rgb-text-base), 0.6);
- background-color: rgba(var(--rgb-fill-shaded));
+ color: var(--uc-foreground);
+ background-color: var(--uc-muted);
border-radius: 50%;
}
-:host(.lr-cloud-image-editor)
- > .wrapper
- > .network_problems_splash
- > .network_problems_content
- > .network_problems_text,
-.lr-cloud-image-editor > .wrapper > .network_problems_splash > .network_problems_content > .network_problems_text {
+[lr-cloud-image-editor]
+ > .uc-wrapper
+ > .uc-network_problems_splash
+ > .uc-network_problems_content
+ > .uc-network_problems_text {
margin-top: var(--cldtr-gap-max);
font-size: var(--font-size-ui);
+ color: var(--uc-foreground);
}
-:host(.lr-cloud-image-editor) > .wrapper > .network_problems_splash > .network_problems_footer,
-.lr-cloud-image-editor > .wrapper > .network_problems_splash > .network_problems_footer {
+[lr-cloud-image-editor] > .uc-wrapper > .uc-network_problems_splash > .uc-network_problems_footer {
display: flex;
align-items: center;
justify-content: center;
height: var(--size-panel-heading);
}
-lr-crop-frame > .svg {
+lr-crop-frame > .uc-svg {
position: absolute;
top: 0px;
left: 0px;
@@ -339,7 +286,7 @@ lr-crop-frame > .svg {
transition: var(--transition-duration-3);
}
-lr-crop-frame > .thumb {
+lr-crop-frame > .uc-thumb {
--idle-color-rgb: var(--color-text-base);
--hover-color-rgb: var(--color-primary-accent);
--focus-color-rgb: var(--color-primary-accent);
@@ -352,29 +299,29 @@ lr-crop-frame > .thumb {
opacity var(--transition-duration-3);
}
-lr-crop-frame > .thumb--visible {
+lr-crop-frame > .uc-thumb--visible {
opacity: 1;
pointer-events: auto;
}
-lr-crop-frame > .thumb--hidden {
+lr-crop-frame > .uc-thumb--hidden {
opacity: 0;
pointer-events: none;
}
-lr-crop-frame > .guides {
+lr-crop-frame > .uc-guides {
transition: var(--transition-duration-3);
}
-lr-crop-frame > .guides--hidden {
+lr-crop-frame > .uc-guides--hidden {
opacity: 0;
}
-lr-crop-frame > .guides--semi-hidden {
+lr-crop-frame > .uc-guides--semi-hidden {
opacity: 0.2;
}
-lr-crop-frame > .guides--visible {
+lr-crop-frame > .uc-guides--visible {
opacity: 1;
}
@@ -382,28 +329,40 @@ lr-editor-button-control,
lr-editor-crop-button-control,
lr-editor-filter-control,
lr-editor-operation-control {
- --l-base-min-width: 40px;
- --l-base-height: var(--l-base-min-width);
+ --l-base-min-width: var(--uc-button-size);
+ --l-base-height: var(--uc-button-size);
--opacity-effect: var(--idle-opacity);
--color-effect: var(--idle-color-rgb);
+ --background-effect: var(--idle-background);
--filter-effect: var(--idle-filter);
- --idle-color-rgb: var(--rgb-text-base);
- --idle-opacity: 0.05;
+
+ --idle-color-rgb: var(--uc-secondary-foreground);
+ --idle-opacity: 1;
--idle-filter: 1;
- --hover-color-rgb: var(--idle-color-rgb);
- --hover-opacity: 0.08;
+ --idle-background: var(--uc-secondary);
+ --hover-color-rgb: var(--uc-secondary-foreground);
+ --hover-opacity: 1;
--hover-filter: 0.8;
+ --hover-background: var(--uc-secondary-hover);
--down-color-rgb: var(--hover-color-rgb);
- --down-opacity: 0.12;
+ --down-opacity: 1;
--down-filter: 0.6;
+ --down-background: var(--uc-secondary);
+}
+lr-editor-button-control > button,
+lr-editor-crop-button-control > button,
+lr-editor-filter-control > button,
+lr-editor-operation-control > button {
+ all: unset;
position: relative;
display: grid;
grid-template-columns: var(--l-base-min-width) auto;
grid-template-rows: 100%;
align-items: center;
height: var(--l-base-height);
- color: rgba(var(--idle-color-rgb));
+ color: var(--color-effect);
+ opacity: var(--opacity-effect);
outline: none;
cursor: pointer;
transition: var(--l-width-transition);
@@ -412,67 +371,73 @@ lr-editor-operation-control {
:where(lr-editor-button-control, lr-editor-crop-button-control, lr-editor-filter-control, lr-editor-operation-control)
> lr-icon
> svg {
- width: 20px;
- height: 20px;
+ width: var(--size-icon);
+ height: var(--size-icon);
}
-lr-editor-filter-control > lr-icon.original-icon > svg {
+lr-editor-filter-control > lr-icon.uc-original-icon > svg {
width: 100%;
height: 100%;
}
-lr-editor-button-control.active,
-lr-editor-operation-control.active,
-lr-editor-crop-button-control.active,
-lr-editor-filter-control.active {
- --idle-color-rgb: var(--rgb-primary-accent);
+lr-editor-button-control.uc-active,
+lr-editor-operation-control.uc-active,
+lr-editor-crop-button-control.uc-active,
+lr-editor-filter-control.uc-active {
+ --idle-color-rgb: var(--uc-primary);
+ --idle-background: var(--uc-primary-transparent);
+ --idle-opacity: 0.9;
+ --hover-color-rgb: var(--uc-primary);
+ --hover-background: var(--uc-primary-transparent);
+ --hover-opacity: 1;
}
-lr-editor-filter-control.not_active .preview[loaded] {
+lr-editor-filter-control.uc-not_active .uc-preview[loaded] {
opacity: 1;
}
-lr-editor-filter-control.active .preview {
+lr-editor-filter-control.uc-active .uc-preview {
opacity: 0;
}
-lr-editor-button-control.not_active,
-lr-editor-operation-control.not_active,
-lr-editor-crop-button-control.not_active,
-lr-editor-filter-control.not_active {
- --idle-color-rgb: var(--rgb-text-base);
+lr-editor-button-control.uc-not_active,
+lr-editor-operation-control.uc-not_active,
+lr-editor-crop-button-control.uc-not_active,
+lr-editor-filter-control.uc-not_active {
+ --idle-color-rgb: var(--uc-secondary-foreground);
}
-lr-editor-button-control > .before,
-lr-editor-operation-control > .before,
-lr-editor-crop-button-control > .before,
-lr-editor-filter-control > .before {
+lr-editor-button-control > button::before,
+lr-editor-operation-control > button::before,
+lr-editor-crop-button-control > button::before,
+lr-editor-filter-control > button::before {
position: absolute;
- right: 0px;
- left: 0px;
+ content: '';
+ right: 0;
+ left: 0;
z-index: -1;
width: 100%;
height: 100%;
- background-color: rgba(var(--color-effect), var(--opacity-effect));
+ background-color: var(--background-effect);
border-radius: var(--border-radius-editor);
transition: var(--transition-duration-3);
}
-lr-editor-button-control > .title,
-lr-editor-operation-control > .title,
-lr-editor-crop-button-control > .title,
-lr-editor-filter-control > .title {
+lr-editor-button-control > button .uc-title,
+lr-editor-operation-control > button .uc-title,
+lr-editor-crop-button-control > button .uc-title,
+lr-editor-filter-control > button .uc-title {
padding-right: var(--cldtr-gap-mid-1);
font-size: 0.7em;
letter-spacing: 1.004px;
text-transform: uppercase;
}
-lr-editor-filter-control > .preview {
+lr-editor-filter-control > button .uc-preview {
position: absolute;
- right: 0px;
- left: 0px;
- z-index: 1;
+ right: 0;
+ left: 0;
+ z-index: -1;
width: 100%;
height: var(--l-base-height);
background-repeat: no-repeat;
@@ -483,8 +448,8 @@ lr-editor-filter-control > .preview {
transition: var(--transition-duration-3);
}
-lr-editor-filter-control > .original-icon {
- color: var(--color-text-base);
+lr-editor-filter-control > .uc-original-icon {
+ color: var(--color-effect);
opacity: 0.3;
}
@@ -499,9 +464,10 @@ lr-editor-image-cropper {
opacity: 0;
pointer-events: none;
touch-action: none;
+ color: var(--color-crop-guides);
}
-lr-editor-image-cropper.active_from_editor {
+lr-editor-image-cropper.uc-active_from_editor {
transform: scale(1) translate(0px, 0px);
opacity: 1;
transition:
@@ -510,7 +476,7 @@ lr-editor-image-cropper.active_from_editor {
pointer-events: auto;
}
-lr-editor-image-cropper.active_from_viewer {
+lr-editor-image-cropper.uc-active_from_viewer {
transform: scale(1) translate(0px, 0px);
opacity: 1;
transition:
@@ -519,7 +485,7 @@ lr-editor-image-cropper.active_from_viewer {
pointer-events: auto;
}
-lr-editor-image-cropper.inactive_to_editor {
+lr-editor-image-cropper.uc-inactive_to_editor {
opacity: 0;
transition:
transform var(--transition-duration-4) cubic-bezier(0.37, 0, 0.63, 1),
@@ -527,7 +493,7 @@ lr-editor-image-cropper.inactive_to_editor {
pointer-events: none;
}
-lr-editor-image-cropper > .canvas {
+lr-editor-image-cropper > .uc-canvas {
position: absolute;
top: 0px;
left: 0px;
@@ -546,7 +512,7 @@ lr-editor-image-fader {
height: 100%;
}
-lr-editor-image-fader.active_from_viewer {
+lr-editor-image-fader.uc-active_from_viewer {
z-index: 3;
transform: scale(1);
opacity: 1;
@@ -556,7 +522,7 @@ lr-editor-image-fader.active_from_viewer {
pointer-events: auto;
}
-lr-editor-image-fader.active_from_cropper {
+lr-editor-image-fader.uc-active_from_cropper {
z-index: 3;
transform: scale(1);
opacity: 1;
@@ -566,7 +532,7 @@ lr-editor-image-fader.active_from_cropper {
pointer-events: auto;
}
-lr-editor-image-fader.inactive_to_cropper {
+lr-editor-image-fader.uc-inactive_to_cropper {
z-index: 3;
transform: scale(1);
opacity: 0;
@@ -576,7 +542,7 @@ lr-editor-image-fader.inactive_to_cropper {
pointer-events: none;
}
-lr-editor-image-fader .fader-image {
+lr-editor-image-fader .uc-fader-image {
position: absolute;
top: 0px;
left: 0px;
@@ -589,7 +555,7 @@ lr-editor-image-fader .fader-image {
content-visibility: auto;
}
-lr-editor-image-fader .fader-image--preview {
+lr-editor-image-fader .uc-fader-image--preview {
background-color: var(--color-image-background);
border-top-left-radius: var(--border-radius-base);
border-top-right-radius: var(--border-radius-base);
@@ -611,7 +577,7 @@ lr-editor-slider {
align-items: center;
justify-content: center;
width: 100%;
- height: 66px;
+ height: var(--size-panel-heading);
}
lr-editor-toolbar {
@@ -623,27 +589,27 @@ lr-editor-toolbar {
@media only screen and (max-width: 600px) {
lr-editor-toolbar {
--l-tab-gap: var(--cldtr-gap-mid-1);
- --l-slider-padding: var(--cldtr-gap-min);
- --l-controls-padding: var(--cldtr-gap-min);
+ --l-slider-padding: var(--uc-padding);
+ --l-controls-padding: var(--uc-padding);
}
}
@media only screen and (min-width: 601px) {
lr-editor-toolbar {
- --l-tab-gap: calc(var(--cldtr-gap-mid-1) + var(--cldtr-gap-max));
- --l-slider-padding: var(--cldtr-gap-mid-1);
- --l-controls-padding: var(--cldtr-gap-mid-1);
+ --l-tab-gap: var(--cldtr-gap-max);
+ --l-slider-padding: var(--uc-padding);
+ --l-controls-padding: var(--uc-padding);
}
}
-lr-editor-toolbar > .toolbar-container {
+lr-editor-toolbar > .uc-toolbar-container {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar {
+lr-editor-toolbar > .uc-toolbar-container > .uc-sub-toolbar {
position: absolute;
display: grid;
grid-template-rows: 1fr 1fr;
@@ -656,25 +622,25 @@ lr-editor-toolbar > .toolbar-container > .sub-toolbar {
visibility var(--transition-duration-3) ease-in-out;
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar.sub-toolbar--visible {
+lr-editor-toolbar > .uc-toolbar-container > .uc-sub-toolbar.uc-sub-toolbar--visible {
transform: translateY(0px);
opacity: 1;
pointer-events: auto;
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar.sub-toolbar--top-hidden {
+lr-editor-toolbar > .uc-toolbar-container > .uc-sub-toolbar.uc-sub-toolbar--top-hidden {
transform: translateY(100%);
opacity: 0;
pointer-events: none;
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar.sub-toolbar--bottom-hidden {
+lr-editor-toolbar > .uc-toolbar-container > .uc-sub-toolbar.uc-sub-toolbar--bottom-hidden {
transform: translateY(-100%);
opacity: 0;
pointer-events: none;
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar > .controls-row {
+lr-editor-toolbar > .uc-toolbar-container > .uc-sub-toolbar > .uc-controls-row {
display: flex;
align-items: center;
justify-content: space-between;
@@ -682,7 +648,7 @@ lr-editor-toolbar > .toolbar-container > .sub-toolbar > .controls-row {
padding-left: var(--l-controls-padding);
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar > .controls-row > .tab-toggles {
+lr-editor-toolbar > .uc-toolbar-container > .uc-sub-toolbar > .uc-controls-row > .uc-tab-toggles {
position: relative;
display: grid;
grid-auto-flow: column;
@@ -691,22 +657,27 @@ lr-editor-toolbar > .toolbar-container > .sub-toolbar > .controls-row > .tab-tog
height: 100%;
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar > .controls-row > .tab-toggles > .tab-toggles_indicator {
+lr-editor-toolbar
+ > .uc-toolbar-container
+ > .uc-sub-toolbar
+ > .uc-controls-row
+ > .uc-tab-toggles
+ > .uc-tab-toggles_indicator {
position: absolute;
bottom: 0px;
left: 0px;
width: var(--size-touch-area);
height: 2px;
- background-color: var(--color-primary-accent);
+ background-color: var(--uc-secondary-foreground);
transform: translateX(0px);
transition: transform var(--transition-duration-3);
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar > .tab-content-row {
+lr-editor-toolbar > .uc-toolbar-container > .uc-sub-toolbar > .uc-tab-content-row {
position: relative;
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar > .tab-content-row > .tab-content {
+lr-editor-toolbar > .uc-toolbar-container > .uc-sub-toolbar > .uc-tab-content-row > .uc-tab-content {
position: absolute;
top: 0px;
left: 0px;
@@ -718,75 +689,113 @@ lr-editor-toolbar > .toolbar-container > .sub-toolbar > .tab-content-row > .tab-
content-visibility: auto;
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar > .tab-content-row > .tab-content.tab-content--visible {
+lr-editor-toolbar
+ > .uc-toolbar-container
+ > .uc-sub-toolbar
+ > .uc-tab-content-row
+ > .uc-tab-content.uc-tab-content--visible {
opacity: 1;
pointer-events: auto;
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar > .tab-content-row > .tab-content.tab-content--hidden {
+lr-editor-toolbar
+ > .uc-toolbar-container
+ > .uc-sub-toolbar
+ > .uc-tab-content-row
+ > .uc-tab-content.uc-tab-content--hidden {
opacity: 0;
pointer-events: none;
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar > .controls-row > .tab-toggles > .tab-toggle.tab-toggle--visible {
+lr-editor-toolbar
+ > .uc-toolbar-container
+ > .uc-sub-toolbar
+ > .uc-controls-row
+ > .uc-tab-toggles
+ > .uc-tab-toggle.uc-tab-toggle--visible {
display: contents;
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar > .controls-row > .tab-toggles > .tab-toggle.tab-toggle--hidden {
+lr-editor-toolbar
+ > .uc-toolbar-container
+ > .uc-sub-toolbar
+ > .uc-controls-row
+ > .uc-tab-toggles
+ > .uc-tab-toggle.uc-tab-toggle--hidden {
display: none;
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar > .controls-row > .tab-toggles.tab-toggles--hidden {
+lr-editor-toolbar
+ > .uc-toolbar-container
+ > .uc-sub-toolbar
+ > .uc-controls-row
+ > .uc-tab-toggles.uc-tab-toggles--hidden {
display: none;
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar > .controls-row > .tab-toggles > .tab-toggle > lr-btn-ui {
- width: 40px;
+lr-editor-toolbar
+ > .uc-toolbar-container
+ > .uc-sub-toolbar
+ > .uc-controls-row
+ > .uc-tab-toggles
+ > .uc-tab-toggle
+ > lr-btn-ui {
+ width: var(--uc-button-size);
}
lr-editor-toolbar
- > .toolbar-container
- > .sub-toolbar
- > .controls-row
- > .tab-toggles
- > .tab-toggle
+ > .uc-toolbar-container
+ > .uc-sub-toolbar
+ > .uc-controls-row
+ > .uc-tab-toggles
+ > .uc-tab-toggle
> lr-btn-ui
> lr-icon
> svg {
- width: 100%;
- height: 100%;
+ width: var(--size-icon);
+ height: var(--size-icon);
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar > .tab-content-row > .tab-content .controls-list_align {
+lr-editor-toolbar
+ > .uc-toolbar-container
+ > .uc-sub-toolbar
+ > .uc-tab-content-row
+ > .uc-tab-content
+ .uc-controls-list_align {
display: grid;
grid-template-areas: '. inner .';
grid-template-columns: 1fr auto 1fr;
box-sizing: border-box;
min-width: 100%;
- padding-left: var(--cldtr-gap-max);
+ padding-left: var(--uc-padding);
}
-lr-editor-toolbar > .toolbar-container > .sub-toolbar > .tab-content-row > .tab-content .controls-list_inner {
+lr-editor-toolbar
+ > .uc-toolbar-container
+ > .uc-sub-toolbar
+ > .uc-tab-content-row
+ > .uc-tab-content
+ .uc-controls-list_inner {
display: grid;
grid-area: inner;
grid-auto-flow: column;
- grid-gap: calc((var(--cldtr-gap-min) - 1px) * 3);
+ gap: 6px;
}
lr-editor-toolbar
- > .toolbar-container
- > .sub-toolbar
- > .tab-content-row
- > .tab-content
- .controls-list_inner:last-child {
- padding-right: var(--cldtr-gap-max);
+ > .uc-toolbar-container
+ > .uc-sub-toolbar
+ > .uc-tab-content-row
+ > .uc-tab-content
+ .uc-controls-list_inner:last-child {
+ padding-right: var(--uc-padding);
}
-lr-editor-toolbar .controls-list_last-item {
+lr-editor-toolbar .uc-controls-list_last-item {
margin-right: var(--cldtr-gap-max);
}
-lr-editor-toolbar .info-tooltip_container {
+lr-editor-toolbar .uc-info-tooltip_container {
position: absolute;
display: flex;
align-items: flex-start;
@@ -795,7 +804,7 @@ lr-editor-toolbar .info-tooltip_container {
height: 100%;
}
-lr-editor-toolbar .info-tooltip_wrapper {
+lr-editor-toolbar .uc-info-tooltip_wrapper {
position: absolute;
top: calc(-100% - var(--cldtr-gap-mid-2));
display: flex;
@@ -805,12 +814,9 @@ lr-editor-toolbar .info-tooltip_wrapper {
pointer-events: none;
}
-lr-editor-toolbar .info-tooltip {
+lr-editor-toolbar .uc-info-tooltip {
z-index: 3;
- padding-top: calc(var(--cldtr-gap-min) / 2);
- padding-right: var(--cldtr-gap-min);
- padding-bottom: calc(var(--cldtr-gap-min) / 2);
- padding-left: var(--cldtr-gap-min);
+ padding: 3px 6px;
color: var(--color-text-base);
font-size: 0.7em;
letter-spacing: 1px;
@@ -822,29 +828,40 @@ lr-editor-toolbar .info-tooltip {
transition: var(--transition-duration-3);
}
-lr-editor-toolbar .info-tooltip_visible {
+lr-editor-toolbar .uc-info-tooltip_visible {
transform: translateY(0px);
opacity: 1;
}
-lr-editor-toolbar .slider {
+lr-editor-toolbar .uc-slider {
padding-right: var(--l-slider-padding);
padding-left: var(--l-slider-padding);
}
-lr-btn-ui {
+lr-btn-ui > button {
--filter-effect: var(--idle-brightness);
--opacity-effect: var(--idle-opacity);
--color-effect: var(--idle-color-rgb);
- --l-transition-effect: var(--css-transition, color var(--transition-duration-2), filter var(--transition-duration-2));
-
+ --background-effect: var(--idle-background);
+ --l-transition-effect: var(
+ --css-transition,
+ color var(--transition-duration-2),
+ background-color var(--transition-duration-2),
+ filter var(--transition-duration-2)
+ );
+
+ all: unset;
display: inline-flex;
align-items: center;
box-sizing: var(--css-box-sizing, border-box);
- height: var(--css-height, var(--size-touch-area));
- padding-right: var(--css-padding-right, var(--cldtr-gap-mid-1));
- padding-left: var(--css-padding-left, var(--cldtr-gap-mid-1));
- color: rgba(var(--color-effect), var(--opacity-effect));
+ height: var(--css-height, var(--uc-button-size));
+ padding-right: var(--css-padding-right, 14px);
+ padding-left: var(--css-padding-left, 14px);
+ font-size: 1em;
+ color: var(--color-effect);
+ background-color: var(--background-effect);
+ border-radius: var(--uc-radius);
+ opacity: var(--opacity-effect);
outline: none;
cursor: pointer;
filter: brightness(var(--filter-effect));
@@ -852,82 +869,160 @@ lr-btn-ui {
user-select: none;
}
-lr-btn-ui .text {
+lr-btn-ui .uc-text {
white-space: nowrap;
}
-lr-btn-ui .icon {
+lr-btn-ui .uc-icon {
display: flex;
align-items: center;
justify-content: center;
- color: rgba(var(--color-effect), var(--opacity-effect));
+ color: var(--color-effect);
filter: brightness(var(--filter-effect));
transition: var(--l-transition-effect);
}
-lr-btn-ui .icon_left {
+lr-btn-ui .uc-icon_left {
margin-right: var(--cldtr-gap-mid-1);
margin-left: 0px;
}
-lr-btn-ui .icon_right {
+lr-btn-ui .uc-icon_right {
margin-right: 0px;
margin-left: var(--cldtr-gap-mid-1);
}
-lr-btn-ui .icon_single {
+lr-btn-ui .uc-icon_single {
margin-right: 0px;
margin-left: 0px;
}
-lr-btn-ui .icon_hidden {
+lr-btn-ui .uc-icon_hidden {
display: none;
margin: 0;
}
-lr-btn-ui.primary {
- --idle-color-rgb: var(--rgb-primary-accent);
+lr-btn-ui.uc-primary > button {
+ --idle-color-rgb: var(--uc-primary-foreground);
--idle-brightness: 1;
- --idle-opacity: 0.6;
- --hover-color-rgb: var(--idle-color-rgb);
+ --idle-opacity: 1;
+ --idle-background: var(--uc-primary);
+ --hover-color-rgb: var(--uc-primary-foreground);
--hover-brightness: 1;
--hover-opacity: 1;
- --down-color-rgb: var(--hover-color-rgb);
+ --hover-background: var(--uc-primary-hover);
+ --down-color-rgb: var(--uc-primary-foreground);
--down-brightness: 0.75;
--down-opacity: 1;
- --active-color-rgb: var(--rgb-primary-accent);
+ --down-background: var(--uc-primary);
+ --active-color-rgb: var(--uc-primary-foreground);
--active-brightness: 1;
--active-opacity: 1;
+ --active-background: var(--uc-primary);
}
-lr-btn-ui.boring {
- --idle-color-rgb: var(--rgb-text-base);
+lr-btn-ui.uc-primary-icon > button {
+ --idle-color-rgb: var(--uc-primary);
--idle-brightness: 1;
- --idle-opacity: 0.6;
- --hover-color-rgb: var(--rgb-text-base);
+ --idle-opacity: 1;
+ --idle-background: transparent;
+ --hover-color-rgb: var(--uc-primary);
--hover-brightness: 1;
--hover-opacity: 1;
- --down-color-rgb: var(--hover-color-rgb);
+ --hover-background: var(--uc-primary-transparent);
+ --down-color-rgb: var(--uc-primary);
+ --down-brightness: 0.75;
+ --down-opacity: 1;
+ --down-background: var(--uc-primary-transparent);
+ --active-color-rgb: var(--uc-primary-foreground);
+ --active-brightness: 1;
+ --active-opacity: 1;
+ --active-background: var(--uc-primary);
+
+ padding: 0;
+ width: var(--uc-button-size);
+}
+
+lr-btn-ui.uc-secondary > button {
+ --idle-color-rgb: var(--uc-secondary-foreground);
+ --idle-brightness: 1;
+ --idle-opacity: 1;
+ --idle-background: var(--uc-secondary);
+ --hover-color-rgb: var(--uc-secondary-foreground);
+ --hover-brightness: 1;
+ --hover-opacity: 1;
+ --hover-background: var(--uc-secondary-hover);
+ --down-color-rgb: var(--uc-secondary-foreground);
--down-brightness: 1;
--down-opacity: 1;
- --active-color-rgb: var(--rgb-primary-accent);
+ --down-background: var(--uc-secondary-hover);
+ --active-color-rgb: var(--uc-secondary-foreground);
--active-brightness: 1;
--active-opacity: 1;
+ --active-background: transparent;
}
-lr-btn-ui.default {
- --idle-color-rgb: var(--rgb-text-base);
+lr-btn-ui.uc-secondary-icon > button {
+ --idle-color-rgb: var(--uc-secondary-foreground);
--idle-brightness: 1;
- --idle-opacity: 0.6;
- --hover-color-rgb: var(--rgb-primary-accent);
+ --idle-opacity: 1;
+ --idle-background: transparent;
+ --hover-color-rgb: var(--uc-secondary-foreground);
--hover-brightness: 1;
--hover-opacity: 1;
- --down-color-rgb: var(--hover-color-rgb);
+ --hover-background: var(--uc-secondary);
+ --down-color-rgb: var(--uc-secondary-foreground);
+ --down-brightness: 1;
+ --down-opacity: 1;
+ --down-background: var(--uc-secondary);
+ --active-color-rgb: var(--uc-secondary-foreground);
+ --active-brightness: 1;
+ --active-opacity: 1;
+ --active-background: transparent;
+
+ padding: 0;
+ width: var(--uc-button-size);
+}
+
+lr-btn-ui.uc-tab > button {
+ --idle-color-rgb: var(--uc-secondary-foreground);
+ --idle-brightness: 1;
+ --idle-opacity: 1;
+ --idle-background: transparent;
+ --hover-color-rgb: var(--uc-secondary-foreground);
+ --hover-brightness: 1;
+ --hover-opacity: 1;
+ --hover-background: var(--uc-secondary);
+ --down-color-rgb: var(--uc-secondary-foreground);
+ --down-brightness: 1;
+ --down-opacity: 1;
+ --down-background: var(--uc-secondary);
+ --active-color-rgb: var(--uc-secondary-foreground);
+ --active-brightness: 1;
+ --active-opacity: 1;
+ --active-background: transparent;
+
+ padding: 0;
+ width: var(--uc-button-size);
+}
+
+lr-btn-ui.uc-default > button {
+ --idle-color-rgb: var(--uc-secondary-foreground);
+ --idle-brightness: 1;
+ --idle-opacity: 1;
+ --idle-background: var(--uc-secondary);
+ --hover-color-rgb: var(--uc-secondary-foreground);
+ --hover-brightness: 1;
+ --hover-opacity: 1;
+ --hover-background: var(--uc-secondary-hover);
+ --down-color-rgb: var(--uc-secondary-foreground);
--down-brightness: 0.75;
--down-opacity: 1;
- --active-color-rgb: var(--rgb-primary-accent);
+ --down-background: var(--uc-secondary);
+ --active-color-rgb: var(--uc-primary);
--active-brightness: 1;
--active-opacity: 1;
+ --active-background: var(--uc-primary-transparent);
}
lr-line-loader-ui {
@@ -940,16 +1035,16 @@ lr-line-loader-ui {
opacity: 0.5;
}
-lr-line-loader-ui .inner {
+lr-line-loader-ui .uc-inner {
width: 25%;
max-width: 200px;
height: 100%;
}
-lr-line-loader-ui .line {
+lr-line-loader-ui .uc-line {
width: 100%;
height: 100%;
- background-color: var(--color-primary-accent);
+ background-color: var(--uc-primary);
transform: translateX(-101%);
transition: transform 1s;
}
@@ -958,11 +1053,11 @@ lr-slider-ui {
--l-thumb-size: 24px;
--l-zero-dot-size: 5px;
--l-zero-dot-offset: 2px;
- --idle-color-rgb: var(--rgb-text-base);
- --hover-color-rgb: var(--rgb-primary-accent);
- --down-color-rgb: var(--rgb-primary-accent);
+ --idle-color-rgb: var(--uc-foreground);
+ --hover-color-rgb: var(--uc-primary);
+ --down-color-rgb: var(--uc-primary);
--color-effect: var(--idle-color-rgb);
- --l-color: rgb(var(--color-effect));
+ --l-color: var(--color-effect);
position: relative;
display: flex;
@@ -972,7 +1067,7 @@ lr-slider-ui {
height: calc(var(--l-thumb-size) + (var(--l-zero-dot-size) + var(--l-zero-dot-offset)) * 2);
}
-lr-slider-ui .thumb {
+lr-slider-ui .uc-thumb {
position: absolute;
left: 0px;
width: var(--l-thumb-size);
@@ -981,10 +1076,12 @@ lr-slider-ui .thumb {
border-radius: 50%;
transform: translateX(0px);
opacity: 1;
- transition: opacity var(--transition-duration-2);
+ transition:
+ opacity var(--transition-duration-2),
+ background-color var(--transition-duration-2);
}
-lr-slider-ui .steps {
+lr-slider-ui .uc-steps {
position: absolute;
display: flex;
align-items: center;
@@ -996,23 +1093,23 @@ lr-slider-ui .steps {
padding-left: calc(var(--l-thumb-size) / 2);
}
-lr-slider-ui .border-step {
+lr-slider-ui .uc-border-step {
width: 0px;
height: 10px;
border-right: 1px solid var(--l-color);
opacity: 0.6;
- transition: var(--transition-duration-2);
+ transition: border-color var(--transition-duration-2);
}
-lr-slider-ui .minor-step {
+lr-slider-ui .uc-minor-step {
width: 0px;
height: 4px;
border-right: 1px solid var(--l-color);
opacity: 0.2;
- transition: var(--transition-duration-2);
+ transition: border-color var(--transition-duration-2);
}
-lr-slider-ui .zero-dot {
+lr-slider-ui .uc-zero-dot {
position: absolute;
top: calc(100% - var(--l-zero-dot-offset) * 2);
left: calc(var(--l-thumb-size) / 2 - var(--l-zero-dot-size) / 2);
@@ -1024,7 +1121,7 @@ lr-slider-ui .zero-dot {
transition: var(--transition-duration-3);
}
-lr-slider-ui .input {
+lr-slider-ui .uc-input {
position: absolute;
width: calc(100% - 10px);
height: 100%;
@@ -1033,35 +1130,28 @@ lr-slider-ui .input {
opacity: 0;
}
-lr-presence-toggle.transition {
+lr-presence-toggle.uc-transition {
transition:
opacity var(--transition-duration-3),
visibility var(--transition-duration-3);
}
-lr-presence-toggle.visible {
+lr-presence-toggle.uc-visible {
opacity: 1;
pointer-events: inherit;
}
-lr-presence-toggle.hidden {
+lr-presence-toggle.uc-hidden {
opacity: 0;
pointer-events: none;
}
-/* TODO: remove ctx-provider */
-/* stylelint-disable-next-line plugin/stylelint-force-app-name-prefix */
-ctx-provider {
- --color-text-base: black;
- --color-primary-accent: blue;
+lr-presence-toggle.uc-initial {
+ display: none !important;
+ transition: none !important;
+}
- display: flex;
- align-items: center;
- justify-content: center;
- width: 190px;
- height: 40px;
- padding-right: 10px;
- padding-left: 10px;
- background-color: #f5f5f5;
- border-radius: 3px;
+[lr-cloud-image-editor] [role='button']:focus-visible,
+[lr-cloud-image-editor] button:focus-visible {
+ outline: 1px auto -webkit-focus-ring-color;
}
diff --git a/blocks/CloudImageEditor/src/css/icons.css b/blocks/CloudImageEditor/src/css/icons.css
index bedf8eb19..7fa07e5fa 100644
--- a/blocks/CloudImageEditor/src/css/icons.css
+++ b/blocks/CloudImageEditor/src/css/icons.css
@@ -1,7 +1,12 @@
-.lr-cloud-image-editor lr-icon {
+:where([lr-cloud-image-editor]) lr-icon {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
+
+:where([lr-cloud-image-editor]) lr-icon svg {
+ width: calc(var(--uc-button-size) / 2);
+ height: calc(var(--uc-button-size) / 2);
+}
diff --git a/blocks/CloudImageEditor/src/elements/button/LrBtnUi.js b/blocks/CloudImageEditor/src/elements/button/LrBtnUi.js
index 993954036..ca09ce851 100644
--- a/blocks/CloudImageEditor/src/elements/button/LrBtnUi.js
+++ b/blocks/CloudImageEditor/src/elements/button/LrBtnUi.js
@@ -15,6 +15,8 @@ export class LrBtnUi extends Block {
icon: '',
iconCss: this._iconCss(),
theme: null,
+ 'aria-role': '',
+ 'aria-controls': '',
};
this.defineAccessor('active', (active) => {
@@ -27,11 +29,11 @@ export class LrBtnUi extends Block {
}
_iconCss() {
- return classNames('icon', {
- icon_left: !this._iconReversed,
- icon_right: this._iconReversed,
- icon_hidden: this._iconHidden,
- icon_single: this._iconSingle,
+ return classNames('uc-icon', {
+ 'uc-icon_left': !this._iconReversed,
+ 'uc-icon_right': this._iconReversed,
+ 'uc-icon_hidden': this._iconHidden,
+ 'uc-icon_single': this._iconSingle,
});
}
@@ -46,7 +48,7 @@ export class LrBtnUi extends Block {
this.sub('theme', (theme) => {
if (theme !== 'custom') {
- this.className = theme;
+ this.className = `uc-${theme}`;
}
});
@@ -54,13 +56,17 @@ export class LrBtnUi extends Block {
this._iconSingle = false;
});
- this.setAttribute('role', 'button');
- if (this.tabIndex === -1) {
- this.tabIndex = 0;
- }
if (!this.hasAttribute('theme')) {
this.setAttribute('theme', 'default');
}
+
+ this.defineAccessor('aria-role', (value) => {
+ this.$['aria-role'] = value || '';
+ });
+
+ this.defineAccessor('aria-controls', (value) => {
+ this.$['aria-controls'] = value || '';
+ });
}
set reverse(val) {
@@ -73,9 +79,12 @@ export class LrBtnUi extends Block {
}
}
}
+
LrBtnUi.bindAttributes({ text: 'text', icon: 'icon', reverse: 'reverse', theme: 'theme' });
LrBtnUi.template = /* HTML */ `
-
-
{{text}}
+
`;
diff --git a/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.js b/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.js
index e66cadfb3..6cb45e6d4 100644
--- a/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.js
+++ b/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.js
@@ -46,7 +46,7 @@ export class LineLoaderUi extends Block {
}
LineLoaderUi.template = /* HTML */ `
-
-
+
`;
diff --git a/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.js b/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.js
index 35b16e57c..b53453378 100644
--- a/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.js
+++ b/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.js
@@ -10,9 +10,9 @@ import { Block } from '../../../../../abstract/Block.js';
/** @type {Style} */
const DEFAULT_STYLE = {
- transition: 'transition',
- visible: 'visible',
- hidden: 'hidden',
+ transition: 'uc-transition',
+ visible: 'uc-visible',
+ hidden: 'uc-hidden',
};
export class PresenceToggle extends Block {
@@ -55,14 +55,17 @@ export class PresenceToggle extends Block {
initCallback() {
super.initCallback();
- this.setAttribute('hidden', '');
+
+ this.classList.toggle('uc-initial', true);
if (!this._externalTransitions) {
this.classList.add(DEFAULT_STYLE.transition);
}
this._handleVisible();
- setTimeout(() => this.removeAttribute('hidden'), 0);
+ setTimeout(() => {
+ this.classList.toggle('uc-initial', false);
+ }, 0);
}
}
-PresenceToggle.template = /* HTML */ `
`;
+PresenceToggle.template = /* HTML */ `
`;
diff --git a/blocks/CloudImageEditor/src/elements/slider/SliderUi.js b/blocks/CloudImageEditor/src/elements/slider/SliderUi.js
index bab0180bc..4548c34b2 100644
--- a/blocks/CloudImageEditor/src/elements/slider/SliderUi.js
+++ b/blocks/CloudImageEditor/src/elements/slider/SliderUi.js
@@ -167,13 +167,12 @@ export class SliderUi extends Block {
}
}
SliderUi.template = /* HTML */ `
-
-
+
+
`;
diff --git a/blocks/CloudImageEditor/src/icons/closeMax.svg b/blocks/CloudImageEditor/src/icons/closeMax.svg
index 3e621f4de..88e57184c 100644
--- a/blocks/CloudImageEditor/src/icons/closeMax.svg
+++ b/blocks/CloudImageEditor/src/icons/closeMax.svg
@@ -1,3 +1,3 @@
-