From 44b4bdce73a09989ba9fc733bec8d720e80310b1 Mon Sep 17 00:00:00 2001 From: OlgaLarina Date: Wed, 30 Oct 2024 10:12:24 +0300 Subject: [PATCH 01/22] work for #5991 Replace the icon size with 'auto' and write css styles for them --- .../add-question-type-selector.component.html | 4 +- .../src/add-question.component.html | 2 +- .../adorners/image-item-value.component.html | 10 ++-- .../src/adorners/item-value.component.html | 2 +- .../src/adorners/matrix-cell.component.html | 5 +- .../adorners/question-image.component.html | 2 +- .../components/question-error.component.html | 2 +- .../src/header/logo-image.component.html | 4 +- .../page-navigator.component.html | 2 +- .../src/page.component.html | 2 +- .../src/panel.component.html | 4 +- .../src/question-widget.component.html | 3 +- .../src/question.component.html | 2 +- .../questions/logic-operator.component.html | 2 +- .../src/side-bar/tab-button.component.html | 2 +- .../src/components/item-value.scss | 13 ++++- .../src/components/matrix-cell.scss | 12 ---- .../page-navigator/page-navigator.scss | 13 +++-- .../src/components/page.scss | 32 ++++++++--- .../src/components/question.scss | 7 ++- .../src/components/side-bar/tab-control.scss | 5 ++ .../blocks/spg-question.scss | 12 ++-- .../survey-creator-core/src/themes/default.ts | 56 +++++++++++++++++++ .../src/utils/context-button.scss | 15 ++++- .../src/action-button.html | 4 +- .../src/add-question-type-selector.html | 2 +- .../src/add-question.html | 2 +- .../src/adorners/image-item-value.html | 9 +-- .../src/adorners/item-value.html | 2 +- .../src/adorners/matrix-cell.html | 4 +- .../src/adorners/panel.html | 4 +- .../src/adorners/question-image.html | 2 +- .../src/adorners/question.html | 2 +- .../src/header/logo-image.html | 4 +- .../src/page-navigator/page-navigator.html | 2 +- .../survey-creator-knockout/src/page.html | 2 +- .../src/question-widget.html | 2 +- .../src/side-bar/tab-button.html | 2 +- .../question-error/question-error.html | 2 +- .../src/AddQuestionButton.tsx | 4 +- .../src/ImageItemValueWrapper.tsx | 8 +-- .../src/ItemValueWrapper.tsx | 2 +- .../survey-creator-react/src/LogoImage.tsx | 4 +- .../src/MatrixCellWrapper.tsx | 4 +- .../src/PageNavigator.tsx | 2 +- .../src/adorners/Page.tsx | 2 +- .../src/adorners/Panel.tsx | 2 +- .../src/adorners/QuestionHeader.tsx | 2 +- .../src/adorners/QuestionImage.tsx | 2 +- .../src/side-bar/TabButton.tsx | 2 +- .../src/adorners/CustomWidget.vue | 2 +- .../survey-creator-vue/src/adorners/Image.vue | 2 +- .../src/adorners/ImageItemValue.vue | 8 +-- .../src/adorners/ItemValue.vue | 2 +- .../src/adorners/MatrixCell.vue | 4 +- .../survey-creator-vue/src/adorners/Panel.vue | 4 +- .../src/adorners/QuestionBase.vue | 2 +- .../src/components/QuestionError.vue | 2 +- .../survey-creator-vue/src/header/Logo.vue | 4 +- .../src/page-navigator/PageNavigator.vue | 2 +- .../src/side-bar/TabButton.vue | 2 +- .../src/tabs/designer/AddQuestion.vue | 2 +- .../tabs/designer/AddQuestionTypeSelector.vue | 2 +- .../src/tabs/designer/Page.vue | 2 +- 64 files changed, 215 insertions(+), 117 deletions(-) diff --git a/packages/survey-creator-angular/src/add-question-type-selector.component.html b/packages/survey-creator-angular/src/add-question-type-selector.component.html index a40569c0ff..a2318d2e61 100644 --- a/packages/survey-creator-angular/src/add-question-type-selector.component.html +++ b/packages/survey-creator-angular/src/add-question-type-selector.component.html @@ -1,8 +1,8 @@ \ No newline at end of file diff --git a/packages/survey-creator-angular/src/add-question.component.html b/packages/survey-creator-angular/src/add-question.component.html index e371edad46..12f19c5fd8 100644 --- a/packages/survey-creator-angular/src/add-question.component.html +++ b/packages/survey-creator-angular/src/add-question.component.html @@ -3,7 +3,7 @@ (click)="addNewQuestion($event)" (mouseover)="adorner.hoverStopper && adorner.hoverStopper($event, $event.currentTarget)" data-bind="clickBubble: false"> - + {{ adorner.addNewQuestionText }} diff --git a/packages/survey-creator-angular/src/adorners/image-item-value.component.html b/packages/survey-creator-angular/src/adorners/image-item-value.component.html index 9a65299dcf..0a29fe7bb9 100644 --- a/packages/survey-creator-angular/src/adorners/image-item-value.component.html +++ b/packages/survey-creator-angular/src/adorners/image-item-value.component.html @@ -14,17 +14,19 @@ - +
- + - +
@@ -48,7 +50,7 @@ - + diff --git a/packages/survey-creator-angular/src/adorners/item-value.component.html b/packages/survey-creator-angular/src/adorners/item-value.component.html index 70ec6dc2d4..bf19985e35 100644 --- a/packages/survey-creator-angular/src/adorners/item-value.component.html +++ b/packages/survey-creator-angular/src/adorners/item-value.component.html @@ -6,7 +6,7 @@
-
- - + +
diff --git a/packages/survey-creator-angular/src/adorners/question-image.component.html b/packages/survey-creator-angular/src/adorners/question-image.component.html index b7179b990a..49372754e4 100644 --- a/packages/survey-creator-angular/src/adorners/question-image.component.html +++ b/packages/survey-creator-angular/src/adorners/question-image.component.html @@ -4,7 +4,7 @@ - + diff --git a/packages/survey-creator-angular/src/components/question-error.component.html b/packages/survey-creator-angular/src/components/question-error.component.html index 0e5e5dbf76..0aaf80df21 100644 --- a/packages/survey-creator-angular/src/components/question-error.component.html +++ b/packages/survey-creator-angular/src/components/question-error.component.html @@ -1,5 +1,5 @@
- +
\ No newline at end of file diff --git a/packages/survey-creator-angular/src/header/logo-image.component.html b/packages/survey-creator-angular/src/header/logo-image.component.html index d009201eec..9c732b0a7b 100644 --- a/packages/survey-creator-angular/src/header/logo-image.component.html +++ b/packages/survey-creator-angular/src/header/logo-image.component.html @@ -15,11 +15,11 @@
- + - +
diff --git a/packages/survey-creator-angular/src/page-navigator/page-navigator.component.html b/packages/survey-creator-angular/src/page-navigator/page-navigator.component.html index 141076c7fd..b1eb6ef05e 100644 --- a/packages/survey-creator-angular/src/page-navigator/page-navigator.component.html +++ b/packages/survey-creator-angular/src/page-navigator/page-navigator.component.html @@ -2,7 +2,7 @@
- +
diff --git a/packages/survey-creator-angular/src/page.component.html b/packages/survey-creator-angular/src/page.component.html index c789b33fbb..f26defcfcd 100644 --- a/packages/survey-creator-angular/src/page.component.html +++ b/packages/survey-creator-angular/src/page.component.html @@ -6,7 +6,7 @@
-
diff --git a/packages/survey-creator-angular/src/panel.component.html b/packages/survey-creator-angular/src/panel.component.html index 0759598990..9c61065b3d 100644 --- a/packages/survey-creator-angular/src/panel.component.html +++ b/packages/survey-creator-angular/src/panel.component.html @@ -16,7 +16,7 @@
-
@@ -29,7 +29,7 @@
{{ adorner.placeholderText }}
- {{ adorner.addNewQuestionText }} diff --git a/packages/survey-creator-angular/src/question-widget.component.html b/packages/survey-creator-angular/src/question-widget.component.html index 2ea5c9cd54..c19791ede9 100644 --- a/packages/survey-creator-angular/src/question-widget.component.html +++ b/packages/survey-creator-angular/src/question-widget.component.html @@ -2,7 +2,8 @@
- +
diff --git a/packages/survey-creator-angular/src/question.component.html b/packages/survey-creator-angular/src/question.component.html index 9da82574ea..afa04630ae 100644 --- a/packages/survey-creator-angular/src/question.component.html +++ b/packages/survey-creator-angular/src/question.component.html @@ -14,7 +14,7 @@
-
diff --git a/packages/survey-creator-angular/src/questions/logic-operator.component.html b/packages/survey-creator-angular/src/questions/logic-operator.component.html index 02f1c9c5d3..62864bf3e0 100644 --- a/packages/survey-creator-angular/src/questions/logic-operator.component.html +++ b/packages/survey-creator-angular/src/questions/logic-operator.component.html @@ -17,7 +17,7 @@
{{model.readOnlyText}}
- +
diff --git a/packages/survey-creator-angular/src/side-bar/tab-button.component.html b/packages/survey-creator-angular/src/side-bar/tab-button.component.html index 86fc3f2336..d4c0ee2f29 100644 --- a/packages/survey-creator-angular/src/side-bar/tab-button.component.html +++ b/packages/survey-creator-angular/src/side-bar/tab-button.component.html @@ -3,7 +3,7 @@
- +
diff --git a/packages/survey-creator-core/src/components/item-value.scss b/packages/survey-creator-core/src/components/item-value.scss index 73681f2e46..0c6a01ba96 100644 --- a/packages/survey-creator-core/src/components/item-value.scss +++ b/packages/survey-creator-core/src/components/item-value.scss @@ -78,6 +78,13 @@ .svc-item-value-controls__drag-icon { display: block; transition: opacity $creator-transition-duration; + width: var(--ctr-survey-item-actionbar-drag-indicator-width, calcSize(3)); + height: var(--ctr-survey-item-actionbar-drag-indicator-height, calcSize(3)); + + .sv-svg-icon { + width: var(--ctr-survey-item-actionbar-drag-indicator-width, calcSize(3)); + height: var(--ctr-survey-item-actionbar-drag-indicator-height, calcSize(3)); + } } .svc-item-value-wrapper:hover:not(.svc-item-value--ghost), @@ -88,7 +95,11 @@ } .svc-item-value-controls__drag { - padding: calcSize(0.5) calcSize(1); + padding: var(--ctr-survey-item-actionbar-drag-indicator-padding-top, calcSize(0.5)) + var(--ctr-survey-item-actionbar-drag-indicator-padding-right, calcSize(1)) + var(--ctr-survey-item-actionbar-drag-indicator-padding-bottom, calcSize(0.5)) + var(--ctr-survey-item-actionbar-drag-indicator-padding-left, calcSize(1)); + cursor: move; opacity: 0.25; diff --git a/packages/survey-creator-core/src/components/matrix-cell.scss b/packages/survey-creator-core/src/components/matrix-cell.scss index aae70c76ee..c8dd9304c0 100644 --- a/packages/survey-creator-core/src/components/matrix-cell.scss +++ b/packages/survey-creator-core/src/components/matrix-cell.scss @@ -53,19 +53,7 @@ } .svc-matrix-cell__question-controls-button { - display: block; - width: calcSize(6); - height: calcSize(6); - background: $background; border: 1px solid $border; - box-sizing: border-box; - border-radius: 50%; - padding: calcSize(1.5); - cursor: pointer; - - use { - fill: $foreground-light; - } } .svc-matrix-cell:hover .svc-matrix-cell__question-controls { diff --git a/packages/survey-creator-core/src/components/page-navigator/page-navigator.scss b/packages/survey-creator-core/src/components/page-navigator/page-navigator.scss index 2cb9bd5545..21a3ce2ef6 100644 --- a/packages/survey-creator-core/src/components/page-navigator/page-navigator.scss +++ b/packages/survey-creator-core/src/components/page-navigator/page-navigator.scss @@ -8,13 +8,18 @@ svc-page-navigator, .svc-page-navigator__navigator-icon { display: block; - height: calcSize(3); - width: calcSize(3); - padding: calcSize(1.25); - border-radius: 50%; + width: var(--ctr-page-navigator-button-icon-width, calcSize(3)); + height: var(--ctr-page-navigator-button-icon-height, calcSize(3)); + padding: var(--ctr-page-navigator-button-padding, calcSize(1.25)); + border-radius: var(--ctr-page-navigator-button-corner-radius, 50%); cursor: pointer; transition: background-color $creator-transition-duration; + .sv-svg-icon { + width: var(--ctr-page-navigator-button-icon-width, calcSize(3)); + height: var(--ctr-page-navigator-button-icon-height, calcSize(3)); + } + use { fill: var(--ctr-page-navigator-button-icon-color, $foreground-light); transition: fill $creator-transition-duration; diff --git a/packages/survey-creator-core/src/components/page.scss b/packages/survey-creator-core/src/components/page.scss index 0de0f9b642..054dd952f8 100644 --- a/packages/survey-creator-core/src/components/page.scss +++ b/packages/survey-creator-core/src/components/page.scss @@ -140,6 +140,8 @@ svc-page { z-index: 1; .svc-question__drag-element { + width: var(--ctr-survey-page-drag-indicator-width, calcSize(3)); + height: var(--ctr-survey-page-drag-indicator-height, calcSize(2)); opacity: var(--ctr-survey-page-drag-indicator-opacity, 0.5); } } @@ -245,6 +247,7 @@ svc-page { .svc-element__add-new-question { -webkit-tap-highlight-color: transparent; + height: auto; } .svc-add-new-item-button__text { @@ -255,21 +258,20 @@ svc-page { .svc-element__question-type-selector { appearance: none; display: flex; - height: calcSize(5); - padding: calcSize(1); + padding: var(--ctr-button-contextual-button-padding-top, calcSize(1)) + var(--ctr-button-contextual-button-padding-right, calcSize(1)) + var(--ctr-button-contextual-button-padding-bottom, calcSize(1)) + var(--ctr-button-contextual-button-padding-left, calcSize(1)); + border-radius: var(--ctr-button-contextual-button-corner-radius, 2px); box-sizing: border-box; border: none; - border-radius: 2px; background-color: transparent; cursor: pointer; - margin-inline-end: calcSize(1); // margin-right + margin: var(--ctr-button-contextual-button-margin-vertical, calcSize(1)) + var(--ctr-button-contextual-button-margin-horizontal, calcSize(1)); outline: none; transition: background-color $creator-transition-duration; - use { - fill: var(--ctr-library-contextual-button-icon-color, $foreground-light); - } - &:hover { background-color: var(--ctr-button-contextual-button-background-color-hovered, $background-dim); } @@ -279,6 +281,20 @@ svc-page { } } +.svc-element__question-type-selector-icon { + width: var(--ctr-button-contextual-button-icon-width, calcSize(3)); + height: var(--ctr-button-contextual-button-icon-height, calcSize(3)); + + .sv-svg-icon { + width: var(--ctr-button-contextual-button-icon-width, calcSize(3)); + height: var(--ctr-button-contextual-button-icon-height, calcSize(3)); + } + + use { + fill: var(--ctr-button-contextual-button-icon-color, $foreground-light); + } +} + .svc-page--drag-over-empty:after { content: " "; position: absolute; diff --git a/packages/survey-creator-core/src/components/question.scss b/packages/survey-creator-core/src/components/question.scss index be611a3a64..fab2701669 100644 --- a/packages/survey-creator-core/src/components/question.scss +++ b/packages/survey-creator-core/src/components/question.scss @@ -736,11 +736,11 @@ svc-question, // EO reset styles for drag-drop-ghost-survey-element to avoid layout jumping while dragging .svc-hovered > .svc-question__content > .svc-question__drag-area > .svc-question__drag-element { - opacity: 0.5; + opacity: var(--ctr-survey-question-panel-drag-area-drag-indicator-opacity, 0.5); } .svc-question__content.svc-question__content--selected > .svc-question__drag-area > .svc-question__drag-element { - opacity: 0.5; + opacity: var(--ctr-survey-question-panel-drag-area-drag-indicator-opacity, 0.5); z-index: 1; } .svc-element__header--hidden { @@ -868,9 +868,10 @@ svc-question, .svc-question__drag-element { width: 100%; - height: calcSize(4); opacity: 0; transition: opacity $creator-transition-duration; + width: var(--ctr-survey-question-panel-drag-area-drag-indicator-width, calcSize(3)); + height: var(--ctr-survey-question-panel-drag-area-drag-indicator-height, calcSize(2)); use { fill: var(--ctr-survey-question-panel-drag-area-drag-indicator-color, $foreground-light); diff --git a/packages/survey-creator-core/src/components/side-bar/tab-control.scss b/packages/survey-creator-core/src/components/side-bar/tab-control.scss index de511e956c..cef088bd22 100644 --- a/packages/survey-creator-core/src/components/side-bar/tab-control.scss +++ b/packages/survey-creator-core/src/components/side-bar/tab-control.scss @@ -160,6 +160,11 @@ justify-content: center; align-items: center; + .sv-svg-icon { + width: var(--ctr-menu-toolbar-button-icon-width, 24px); + height: var(--ctr-menu-toolbar-button-icon-height, 24px); + } + use { fill: var(--ctr-menu-toolbar-button-icon-color, $foreground-light); } diff --git a/packages/survey-creator-core/src/property-grid-theme/blocks/spg-question.scss b/packages/survey-creator-core/src/property-grid-theme/blocks/spg-question.scss index 376b522fcb..528ecd4222 100644 --- a/packages/survey-creator-core/src/property-grid-theme/blocks/spg-question.scss +++ b/packages/survey-creator-core/src/property-grid-theme/blocks/spg-question.scss @@ -129,10 +129,12 @@ .spg-question__erbox { @include ctrDefaultFont; - padding: calcSize(1) calcSize(1.5) calcSize(1) calcSize(1.5); + padding: var(--ctr-error-message-padding-top, calcSize(1)) var(--ctr-error-message-padding-right, calcSize(1.5)) + var(--ctr-error-message-padding-bottom, calcSize(1)) var(--ctr-error-message-padding-left, calcSize(1.5)); + color: var(--ctr-error-message-text-color, $foreground); background-color: var(--ctr-error-message-background-color, $red-light); - border-radius: calcSize(0.5); + border-radius: var(--ctr-error-message-corner-radius, calcSize(0.5)); } .spg-question__erbox, @@ -140,15 +142,15 @@ sv-question-error { & > div { display: flex; - gap: calcSize(1); + gap: var(--ctr-error-message-gap, calcSize(1)); } } - - .spg-question__erbox-icon { .sv-svg-icon { vertical-align: top; + width: var(--ctr-error-message-icon-width, calcSize(3)); + height: var(--ctr-error-message-icon-height, calcSize(3)); } use { diff --git a/packages/survey-creator-core/src/themes/default.ts b/packages/survey-creator-core/src/themes/default.ts index 5237a94d71..1f961f04c4 100644 --- a/packages/survey-creator-core/src/themes/default.ts +++ b/packages/survey-creator-core/src/themes/default.ts @@ -49,6 +49,7 @@ const Theme = { "--ctr-toolbox-separator-padding-right": "0px", "--ctr-survey-question-panel-toolbar-item-opacity-pressed": 0.5, "--ctr-survey-question-panel-toolbar-item-opacity-disabled": 0.25, + "--ctr-survey-question-panel-drag-area-drag-indicator-opacity": "50px", "--ctr-survey-action-button-opacity-disabled": 0.25, "--ctr-property-grid-form-border-width-bottom": "0px", "--lbr-shadow-x-large-offset-y": "32px", @@ -56,6 +57,7 @@ const Theme = { "--lbr-shadow-large-offset-y": "16px", "--lbr-shadow-large-blur": "32px", "--lbr-shadow-medium-blur": "8px", + "--ctr-button-group-item-text-opacity-disabled": 0.25, "--ctr-toolbox-item-shadow-hovered-1-color": "#00000000", "--ctr-toolbox-item-shadow-pressed-color": "#00000000", "--ctr-toolbox-item-shadow-hovered-2-color": "#00000000", @@ -102,6 +104,7 @@ const Theme = { "--ctr-editor-background-color-disabled": "var(--sjs-layer-1-background-500)", "--ctr-editor-button-icon-color": "var(--sjs-layer-3-foreground-75)", "--ctr-editor-button-corner-radius": "var(--sjs-corner-radius-x05)", + "--ctr-button-group-item-background-color-selected": "var(--sjs-layer-1-background-500)", "--ctr-radio-button-background-color": "var(--sjs-layer-3-background-500)", "--ctr-radio-button-border-color": "var(--sjs-border-10)", "--ctr-checkbox-background-color": "var(--sjs-layer-3-background-500)", @@ -119,6 +122,7 @@ const Theme = { "--ctr-actionbar-button-corner-radius": "var(--sjs-corner-radius-x1)", "--ctr-popup-menu-corner-radius": "var(--sjs-corner-radius-x1)", "--ctr-popup-menu-footer-padding-left": "var(--sjs-spacing-x1)", + "--ctr-button-contextual-button-icon-color": "var(--sjs-layer-1-foreground-50)", "--ctr-button-group-item-background-color-disabled": "var(--sjs-layer-1-background-500)", "--ctr-radio-button-background-color-selected-hovered": "var(--sjs-layer-1-background-500)", "--ctr-checkbox-background-color-selected-hovered": "var(--sjs-layer-1-background-500)", @@ -129,8 +133,11 @@ const Theme = { "--ctr-button-group-background-color": "var(--sjs-layer-3-background-500)", "--ctr-button-group-border-color": "var(--sjs-border-10)", "--ctr-button-group-border-width": "var(--sjs-stroke-x1)", + "--ctr-button-group-item-border-width-selected": "var(--sjs-stroke-x1)", + "--ctr-button-group-item-padding-horizontal": "var(--sjs-spacing-x2)", "--ctr-button-group-item-padding-vertical": "var(--sjs-spacing-x1)", "--ctr-button-group-border-color-focused": "var(--sjs-primary-background-500)", + "--ctr-button-group-border-width-focused": "var(--sjs-stroke-x2)", "--ctr-button-group-item-text-color-disabled": "var(--sjs-layer-3-foreground-100)", "--ctr-survey-page-background-color-selected": "var(--sjs-special-background)", "--ctr-surface-background-color": "var(--sjs-special-background)", @@ -139,6 +146,8 @@ const Theme = { "--ctr-popup-corner-radius": "var(--sjs-corner-radius-x2)", "--ctr-shadow-large-color": "var(--sjs-special-glow)", "--ctr-shadow-medium-color": "var(--sjs-special-glow)", + "--ctr-button-contextual-button-margin-horizontal": "var(--sjs-spacing-x1)", + "--ctr-button-contextual-button-margin-vertical": "var(--sjs-spacing-x1)", "--ctr-button-padding-horizontal-small": "var(--sjs-spacing-x4)", "--ctr-button-padding-vertical-small": "var(--sjs-spacing-x150)", "--ctr-button-corner-radius": "var(--sjs-corner-radius-x075)", @@ -250,6 +259,9 @@ const Theme = { "--ctr-page-navigator-item-background-color-hovered": "var(--sjs-layer-1-background-500)", "--ctr-page-navigator-item-text-color-hovered": "var(--sjs-layer-1-foreground-100)", "--ctr-page-navigator-item-corner-radius": "var(--sjs-corner-radius-x075)", + "--ctr-page-navigator-button-padding": "var(--sjs-spacing-x125)", + "--ctr-page-navigator-button-icon-width": "var(--sjs-size-x3)", + "--ctr-page-navigator-button-icon-height": "var(--sjs-size-x3)", "--ctr-page-navigator-button-corner-radius": "var(--sjs-corner-radius-x1)", "--ctr-page-navigator-button-background-color-hovered": "var(--sjs-primary-background-10)", "--ctr-button-background-color": "var(--sjs-layer-1-background-500)", @@ -320,6 +332,10 @@ const Theme = { "--ctr-notification-text-color": "var(--sjs-layer-1-foreground-100)", "--ctr-notification-text-color-error": "var(--sjs-semantic-red-foreground-100)", "--ctr-notification-background-color-error": "var(--sjs-semantic-red-background-500)", + "--ctr-string-table-row-padding-left": "var(--sjs-spacing-x3)", + "--ctr-string-table-row-padding-right": "var(--sjs-spacing-x3)", + "--ctr-string-table-row-padding-top": "var(--sjs-spacing-x1)", + "--ctr-string-table-row-padding-bottom": "var(--sjs-spacing-x1)", "--ctr-string-table-row-background-color": "var(--sjs-layer-1-background-500)", "--ctr-string-table-row-border-color": "var(--sjs-border-10)", "--ctr-string-table-row-text-color-title": "var(--sjs-layer-1-foreground-100)", @@ -339,6 +355,8 @@ const Theme = { "--ctr-property-grid-header-border-width-bottom": "var(--sjs-stroke-x2)", "--ctr-caption-with-actions-description-text-color": "var(--sjs-layer-1-foreground-50)", "--ctr-caption-with-actions-description-text-color-disabled": "var(--sjs-layer-1-foreground-100)", + "--ctr-data-table-cell-padding-left": "var(--sjs-spacing-x1)", + "--ctr-data-table-cell-padding-right": "var(--sjs-spacing-x1)", "--ctr-data-table-cell-text-color-header": "var(--sjs-layer-3-foreground-50)", "--ctr-data-table-cell-border-color-focused": "var(--sjs-primary-background-500)", "--ctr-data-table-cell-corner-radius-focused": "var(--sjs-corner-radius-x075)", @@ -346,8 +364,18 @@ const Theme = { "--ctr-data-table-row-background-color-header": "var(--sjs-layer-3-background-500)", "--ctr-data-table-row-border-color": "var(--sjs-border-10)", "--ctr-data-table-row-drag-area-icon-color": "var(--sjs-layer-1-foreground-50)", + "--ctr-data-table-row-padding-top-header": "var(--sjs-spacing-x1)", + "--ctr-data-table-row-padding-bottom-header": "var(--sjs-spacing-x1)", "--ctr-data-table-row-background-color-drop-spot": "var(--sjs-layer-1-background-400)", "--ctr-error-message-background-color": "var(--sjs-semantic-red-background-10)", + "--ctr-error-message-corner-radius": "var(--sjs-corner-radius-x05)", + "--ctr-error-message-gap": "var(--sjs-spacing-x1)", + "--ctr-error-message-padding-left": "var(--sjs-spacing-x150)", + "--ctr-error-message-padding-right": "var(--sjs-spacing-x150)", + "--ctr-error-message-padding-top": "var(--sjs-spacing-x1)", + "--ctr-error-message-padding-bottom": "var(--sjs-spacing-x1)", + "--ctr-error-message-icon-width": "var(--sjs-size-x3)", + "--ctr-error-message-icon-height": "var(--sjs-size-x3)", "--ctr-error-message-icon-color": "var(--sjs-semantic-red-background-500)", "--ctr-error-message-text-color": "var(--sjs-layer-1-foreground-100)", "--ctr-toolbox-separator-color": "var(--sjs-border-25)", @@ -359,7 +387,14 @@ const Theme = { "--ctr-toolbox-group-gap": "var(--sjs-spacing-x05)", "--ctr-toolbox-group-padding-left": "var(--sjs-spacing-x150)", "--ctr-toolbox-group-padding-right": "var(--sjs-spacing-x150)", + "--ctr-button-contextual-button-corner-radius": "var(--sjs-corner-radius-x05)", + "--ctr-button-contextual-button-padding-left": "var(--sjs-spacing-x1)", + "--ctr-button-contextual-button-padding-right": "var(--sjs-spacing-x1)", + "--ctr-button-contextual-button-padding-top": "var(--sjs-spacing-x1)", + "--ctr-button-contextual-button-padding-bottom": "var(--sjs-spacing-x1)", "--ctr-button-contextual-button-background-color-hovered": "var(--sjs-layer-3-background-500)", + "--ctr-button-contextual-button-icon-width": "var(--sjs-size-x3)", + "--ctr-button-contextual-button-icon-height": "var(--sjs-size-x3)", "--ctr-button-contextual-button-background-color-focused": "var(--sjs-primary-background-10)", "--ctr-survey-question-panel-toolbar-item-background-color-hovered": "var(--sjs-layer-1-background-400)", "--ctr-survey-question-panel-toolbar-item-icon-color": "var(--sjs-secondary-background-500)", @@ -369,6 +404,8 @@ const Theme = { "--ctr-survey-page-toolbar-item-text-color": "var(--sjs-layer-3-foreground-100)", "--ctr-survey-page-toolbar-item-background-color-selected": "var(--sjs-primary-background-10)", "--ctr-survey-question-panel-drag-area-drag-indicator-color": "var(--sjs-layer-1-foreground-50)", + "--ctr-survey-question-panel-drag-area-drag-indicator-width": "var(--sjs-size-x3)", + "--ctr-survey-question-panel-drag-area-drag-indicator-height": "var(--sjs-size-x2)", "--ctr-preview-pager-background-color": "var(--sjs-layer-1-background-500)", "--ctr-preview-pager-border-color": "var(--sjs-border-25)", "--ctr-code-viewer-line-number-panel-background-color": "var(--sjs-layer-2-background-500)", @@ -406,6 +443,12 @@ const Theme = { "--ctr-survey-action-button-background-color-hovered-positive": "var(--sjs-primary-background-10)", "--ctr-survey-action-button-background-color-hovered-negative": "var(--sjs-semantic-red-background-10)", "--ctr-survey-action-button-icon-color-disabled": "var(--sjs-layer-1-foreground-50)", + "--ctr-survey-contextual-button-width": "var(--sjs-size-x6)", + "--ctr-survey-contextual-button-height": "var(--sjs-size-x6)", + "--ctr-survey-contextual-button-padding-left": "var(--sjs-spacing-x150)", + "--ctr-survey-contextual-button-padding-right": "var(--sjs-spacing-x150)", + "--ctr-survey-contextual-button-padding-top": "var(--sjs-spacing-x150)", + "--ctr-survey-contextual-button-padding-bottom": "var(--sjs-spacing-x150)", "--lbr-action-button-icon-color-negative": "var(--sjs-semantic-red-background-500)", "--ctr-property-grid-background-color": "var(--sjs-layer-1-background-500)", "--ctr-survey-header-logo-placeholder-icon-color": "var(--sjs-layer-3-foreground-50)", @@ -418,6 +461,12 @@ const Theme = { "--ctr-survey-image-picker-drop-spot-color": "var(--sjs-layer-2-background-500)", "--ctr-data-table-row-corner-radius-floating": "var(--sjs-corner-radius-x05)", "--ctr-survey-item-actionbar-drag-indicator-color": "var(--sjs-layer-1-foreground-50)", + "--ctr-survey-item-actionbar-drag-indicator-padding-left": "var(--sjs-spacing-x1)", + "--ctr-survey-item-actionbar-drag-indicator-padding-right": "var(--sjs-spacing-x1)", + "--ctr-survey-item-actionbar-drag-indicator-padding-top": "var(--sjs-spacing-x05)", + "--ctr-survey-item-actionbar-drag-indicator-padding-bottom": "var(--sjs-spacing-x05)", + "--ctr-survey-item-actionbar-drag-indicator-width": "var(--sjs-size-x3)", + "--ctr-survey-item-actionbar-drag-indicator-height": "var(--sjs-size-x3)", "--ctr-toolbox-search-padding-left": "var(--sjs-spacing-x3)", "--ctr-toolbox-search-padding-right": "var(--sjs-spacing-x2)", "--ctr-toolbox-search-padding-top": "var(--sjs-spacing-x250)", @@ -435,12 +484,16 @@ const Theme = { "--ctr-toolbox-group-header-margin-bottom": "var(--sjs-spacing-x1)", "--ctr-toolbox-separator-padding-left-compact": "var(--sjs-spacing-x2)", "--ctr-toolbox-separator-padding-right-compact": "var(--sjs-spacing-x2)", + "--ctr-font-large-size": "var(--sjs-font-size-x4)", + "--ctr-font-large-line-height": "var(--sjs-line-height-x5)", "--ctr-font-medium-size": "var(--sjs-font-size-x3)", "--ctr-font-medium-line-height": "var(--sjs-line-height-x4)", "--ctr-font-default-size": "var(--sjs-font-size-x2)", "--ctr-font-default-line-height": "var(--sjs-line-height-x3)", "--ctr-font-small-size": "var(--sjs-font-size-x150)", "--ctr-font-small-line-height": "var(--sjs-line-height-x2)", + "--ctr-font-code-size": "var(--sjs-font-size-x2)", + "--ctr-font-code-line-height": "var(--sjs-line-height-x3)", "--ctr-survey-checkboxes-item-corner-radius-floating": "var(--sjs-corner-radius-x1)", "--ctr-survey-radio-button-group-item-corner-radius-floating": "var(--sjs-corner-radius-x1)", "--ctr-survey-radio-button-group-item-background-color-floating": "var(--sjs-layer-1-background-500)", @@ -500,6 +553,7 @@ const Theme = { "--ctr-toolbox-item-background-color-submenu": "var(--sjs-layer-1-background-500)", "--ctr-toolbox-item-text-color-submenu": "var(--sjs-layer-2-foreground-100)", "--ctr-toolbox-min-width": "var(--sjs-size-x32)", + "--ctr-font-default-line-height-all-caps": "var(--sjs-line-height-x2)", "--ctr-page-banner-background-color": "var(--sjs-secondary-background-500)", "--ctr-page-banner-text-color": "var(--sjs-secondary-foreground-100)", "--ctr-toolbox-group-padding-left-compact": "var(--sjs-spacing-x150)", @@ -546,6 +600,8 @@ const Theme = { "--ctr-data-table-form-border-color": "var(--sjs-border-10)", "--ctr-menu-toolbar-button-padding-left-with-description": "var(--sjs-spacing-x150)", "--ctr-menu-toolbar-button-padding-right-with-description": "var(--sjs-spacing-x150)", + "--ctr-survey-page-drag-indicator-width": "var(--sjs-size-x3)", + "--ctr-survey-page-drag-indicator-height": "var(--sjs-size-x2)", "--ctr-survey-resize-frame-grip-width": "var(--sjs-size-x150)", "--ctr-survey-resize-frame-grip-height": "var(--sjs-size-x150)", "--ctr-survey-resize-frame-margin": "var(--sjs-spacing-x1n)", diff --git a/packages/survey-creator-core/src/utils/context-button.scss b/packages/survey-creator-core/src/utils/context-button.scss index 02a47801ee..4446eeeb4d 100644 --- a/packages/survey-creator-core/src/utils/context-button.scss +++ b/packages/survey-creator-core/src/utils/context-button.scss @@ -11,12 +11,21 @@ box-sizing: border-box; background-color: $background; border-radius: 50%; - width: calcSize(6); - height: calcSize(6); + width: var(--ctr-survey-contextual-button-width, calcSize(6)); + height: var(--ctr-survey-contextual-button-height, calcSize(6)); + padding: var(--ctr-survey-contextual-button-padding-top, calcSize(1.5)) + var(--ctr-survey-contextual-button-padding-right, calcSize(1.5)) + var(--ctr-survey-contextual-button-padding-bottom, calcSize(1.5)) + var(--ctr-survey-contextual-button-padding-left, calcSize(1.5)); + cursor: pointer; - padding: calcSize(1.5); outline: none; + .sv-svg-icon { + width: var(--ctr-button-contextual-button-icon-width, calcSize(3)); + height: var(--ctr-button-contextual-button-icon-height, calcSize(3)); + } + use { fill: $foreground-light; transition: fill $creator-transition-duration; diff --git a/packages/survey-creator-knockout/src/action-button.html b/packages/survey-creator-knockout/src/action-button.html index ed4c2989be..2cf6acb09b 100644 --- a/packages/survey-creator-knockout/src/action-button.html +++ b/packages/survey-creator-knockout/src/action-button.html @@ -12,13 +12,13 @@ + data-bind="class: data.classes, attr: { title: data.title}" params="iconName: data.iconName, size: 'auto'"> + params="iconName: data.iconName, size: 'auto'"> \ No newline at end of file diff --git a/packages/survey-creator-knockout/src/add-question-type-selector.html b/packages/survey-creator-knockout/src/add-question-type-selector.html index 57100cb35d..81c7a425e8 100644 --- a/packages/survey-creator-knockout/src/add-question-type-selector.html +++ b/packages/survey-creator-knockout/src/add-question-type-selector.html @@ -2,7 +2,7 @@