diff --git a/packages/presentation/src/components/MessageBox.svelte b/packages/presentation/src/components/MessageBox.svelte
index 78f20ff449..b2470cb000 100644
--- a/packages/presentation/src/components/MessageBox.svelte
+++ b/packages/presentation/src/components/MessageBox.svelte
@@ -93,6 +93,11 @@
user-select: none;
box-shadow: var(--theme-popup-shadow);
+ @media screen and (max-width: 480px) {
+ width: 100%;
+ max-width: 100%;
+ }
+
.message {
margin-bottom: 1.75rem;
color: var(--theme-content-color);
diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss
index 54f7d76568..afdc52456e 100644
--- a/packages/theme/styles/_layouts.scss
+++ b/packages/theme/styles/_layouts.scss
@@ -900,6 +900,7 @@ a.no-line {
.leading-3 { line-height: .75rem; }
.tracking--05px { letter-spacing: -.5px; }
.tracking-1px { letter-spacing: 1px; }
+.text-balance { text-wrap: balance; }
.over-underline {
cursor: pointer;
diff --git a/packages/theme/styles/_lumia-colors.scss b/packages/theme/styles/_lumia-colors.scss
index 77fc78e02e..a7a8d71b4f 100644
--- a/packages/theme/styles/_lumia-colors.scss
+++ b/packages/theme/styles/_lumia-colors.scss
@@ -31,6 +31,8 @@
--tag-on-accent-PorpoiseText: #FFFFFF;
--tag-accent-SunshineBackground: #FFBD2E;
+
+ --border-color-global-error-border-color: #fb6863;
}
/* Dark Theme */
diff --git a/packages/theme/styles/_text-editor.scss b/packages/theme/styles/_text-editor.scss
index 2e006ee333..ae5b6235ad 100644
--- a/packages/theme/styles/_text-editor.scss
+++ b/packages/theme/styles/_text-editor.scss
@@ -444,4 +444,9 @@
&.delete {
background: var(--text-editor-highlighted-node-delete-background-color);
}
-}
\ No newline at end of file
+}
+
+// Hiding the selection of an empty line
+.select-text p > br.ProseMirror-trailingBreak::selection {
+ background: transparent;
+}
diff --git a/packages/theme/styles/_vars.scss b/packages/theme/styles/_vars.scss
index 97df9737e3..7fb56b667d 100644
--- a/packages/theme/styles/_vars.scss
+++ b/packages/theme/styles/_vars.scss
@@ -33,6 +33,7 @@
--spacing-4: 2rem;
--spacing-4_5: 2.25rem;
--spacing-5: 2.5rem;
+ --spacing-5_5: 2.75rem;
--spacing-6: 3rem;
--spacing-6_5: 3.5rem;
--spacing-7: 4rem;
diff --git a/packages/theme/styles/components.scss b/packages/theme/styles/components.scss
index 4d6339f176..4ea43b9f7f 100644
--- a/packages/theme/styles/components.scss
+++ b/packages/theme/styles/components.scss
@@ -543,6 +543,11 @@
.hulyModal-footer {
padding: var(--spacing-1_5);
}
+ @media screen and (max-width: 480px) {
+ width: 100vw;
+ height: var(--app-height);
+ min-width: 20rem;
+ }
}
&.type-aside,
&.type-popup {
diff --git a/packages/theme/styles/dialogs.scss b/packages/theme/styles/dialogs.scss
index b4441ddc4b..15e9d3b89f 100644
--- a/packages/theme/styles/dialogs.scss
+++ b/packages/theme/styles/dialogs.scss
@@ -50,6 +50,7 @@
}
&__title-wrap {
+ overflow-x: auto;
display: flex;
align-items: center;
min-width: 0;
@@ -277,6 +278,12 @@
max-width: 90vw;
max-height: 90vh;
+ @media screen and (max-width: 480px) {
+ width: 100%;
+ max-width: 100%;
+ max-height: 100%;
+ }
+
.antiCard-header {
padding: .75rem .75rem .375rem;
diff --git a/packages/ui/src/components/ModernCheckbox.svelte b/packages/ui/src/components/ModernCheckbox.svelte
new file mode 100644
index 0000000000..0f448f5ca1
--- /dev/null
+++ b/packages/ui/src/components/ModernCheckbox.svelte
@@ -0,0 +1,123 @@
+
+
+
+
+
diff --git a/packages/ui/src/components/ModernRadioButton.svelte b/packages/ui/src/components/ModernRadioButton.svelte
new file mode 100644
index 0000000000..8d3dd3cc4b
--- /dev/null
+++ b/packages/ui/src/components/ModernRadioButton.svelte
@@ -0,0 +1,111 @@
+
+
+
+
+
+ {#if label !== undefined || labelIntl !== undefined || $$slots.default !== undefined}
+
+ {#if labelIntl}{:else}{label}{/if}
+
+
+ {/if}
+
+
+
+
diff --git a/packages/ui/src/components/PopupInstance.svelte b/packages/ui/src/components/PopupInstance.svelte
index bb36c19e07..877591e3ff 100644
--- a/packages/ui/src/components/PopupInstance.svelte
+++ b/packages/ui/src/components/PopupInstance.svelte
@@ -76,6 +76,12 @@
$: document.body.style.cursor = drag ? 'all-scroll' : 'default'
$: docSize = checkAdaptiveMatching($deviceInfo.size, 'md')
+ $: isFullMobile =
+ $deviceInfo.isMobile &&
+ $deviceInfo.isPortrait &&
+ ['right', 'top', 'float', 'full', 'content', 'middle', 'centered', 'center', 'full-centered'].some(
+ (el) => element === el
+ )
function _update (result: any): void {
if (onUpdate !== undefined) onUpdate(result)
@@ -100,7 +106,7 @@
contentPanel: HTMLElement | undefined
): void => {
const device: DeviceOptions = $deviceInfo
- if ((fullSize || docSize) && (element === 'float' || element === 'centered')) {
+ if (((fullSize || docSize) && (element === 'float' || element === 'centered')) || isFullMobile) {
options = fitPopupElement(modalHTML, device, 'full', contentPanel, clientWidth, clientHeight)
options.props.maxHeight = '100vh'
if (!modalHTML.classList.contains('fullsize')) modalHTML.classList.add('fullsize')
diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts
index 53e08dd656..4e6151b557 100644
--- a/packages/ui/src/index.ts
+++ b/packages/ui/src/index.ts
@@ -158,6 +158,8 @@ export { default as HotkeyGroup } from './components/HotkeyGroup.svelte'
export { default as ModernWizardDialog } from './components/wizard/ModernWizardDialog.svelte'
export { default as ModernWizardBar } from './components/wizard/ModernWizardBar.svelte'
export { default as ModernTab } from './components/ModernTab.svelte'
+export { default as ModernCheckbox } from './components/ModernCheckbox.svelte'
+export { default as ModernRadioButton } from './components/ModernRadioButton.svelte'
export { default as IconAdd } from './components/icons/Add.svelte'
export { default as IconCircleAdd } from './components/icons/CircleAdd.svelte'
diff --git a/plugins/survey-assets/assets/icons.svg b/plugins/survey-assets/assets/icons.svg
index 0cad8bcca2..b39cee1083 100644
--- a/plugins/survey-assets/assets/icons.svg
+++ b/plugins/survey-assets/assets/icons.svg
@@ -1,7 +1,15 @@
diff --git a/plugins/survey-assets/src/index.ts b/plugins/survey-assets/src/index.ts
index 865fc8e649..53f41ec1ed 100644
--- a/plugins/survey-assets/src/index.ts
+++ b/plugins/survey-assets/src/index.ts
@@ -20,12 +20,12 @@ const icons = require('../assets/icons.svg') as string // eslint-disable-line
loadMetadata(survey.icon, {
Application: `${icons}#application`,
Info: `${icons}#info`,
- Poll: `${icons}#page`,
+ Poll: `${icons}#poll`,
Question: `${icons}#question`,
QuestionKindString: `${icons}#textline`,
QuestionKindOption: `${icons}#radio`,
QuestionKindOptions: `${icons}#checkbox`,
- Survey: `${icons}#application`,
+ Survey: `${icons}#survey`,
Submit: `${icons}#submit`,
QuestionIsMandatory: `${icons}#asterisk`,
QuestionHasCustomOption: `${icons}#star`,
diff --git a/plugins/survey-resources/src/components/EditPoll.svelte b/plugins/survey-resources/src/components/EditPoll.svelte
index fc15c188b2..a83cd47ffb 100644
--- a/plugins/survey-resources/src/components/EditPoll.svelte
+++ b/plugins/survey-resources/src/components/EditPoll.svelte
@@ -60,7 +60,7 @@
}
-
+
{#if hasText(object.prompt)}
-
-
diff --git a/plugins/survey-resources/src/components/EditQuestion.svelte b/plugins/survey-resources/src/components/EditQuestion.svelte
index 934abb3402..1fc0cb5b55 100644
--- a/plugins/survey-resources/src/components/EditQuestion.svelte
+++ b/plugins/survey-resources/src/components/EditQuestion.svelte
@@ -18,14 +18,14 @@
import { MessageBox, getClient } from '@hcengineering/presentation'
import { Question, QuestionKind, Survey } from '@hcengineering/survey'
import {
- Button,
EditBox,
Icon,
IconDelete,
SelectPopup,
eventToHTMLElement,
showPopup,
- tooltip
+ tooltip,
+ ButtonIcon
} from '@hcengineering/ui'
import { createEventDispatcher } from 'svelte'
import survey from '../plugin'
@@ -37,11 +37,14 @@
export let index: number
export let readonly: boolean = false
+ let editQuestion: EditBox
+ let hovered: boolean = false
+
$: question = parent?.questions?.[index] as Question
$: options = question?.options ?? []
$: questionIcon =
question === undefined
- ? undefined
+ ? survey.icon.Question
: question.kind === QuestionKind.OPTIONS
? survey.icon.QuestionKindOptions
: question.kind === QuestionKind.OPTION
@@ -134,6 +137,7 @@
}
function showQuestionParams (ev: MouseEvent): void {
+ hovered = true
showPopup(
SelectPopup,
{
@@ -215,11 +219,13 @@
console.error('Unknown command id', id)
}
}
+ hovered = false
}
)
}
function showOptionParams (ev: MouseEvent, index: number): void {
+ hovered = true
showPopup(
SelectPopup,
{
@@ -245,6 +251,7 @@
console.error('Unknown command id', id)
}
}
+ hovered = false
}
)
}
@@ -335,93 +342,105 @@
isRootDragging = false
dispatch('dragEnd')
}
+
+ const focusQuestion = (): void => {
+ editQuestion.focusInput()
+ }
-
-