diff --git a/models/all/src/version.json b/models/all/src/version.json index e8364c8f59..b5f2c03606 100644 --- a/models/all/src/version.json +++ b/models/all/src/version.json @@ -1 +1 @@ -{ "major": 0, "minor": 6, "patch": 120 } \ No newline at end of file +{ "major": 0, "minor": 6, "patch": 120 } diff --git a/packages/theme/styles/_colors.scss b/packages/theme/styles/_colors.scss index 63a38c407c..01892a6b8a 100644 --- a/packages/theme/styles/_colors.scss +++ b/packages/theme/styles/_colors.scss @@ -144,6 +144,7 @@ --theme-editbox-focus-color: rgba(255, 255, 255, .04); --theme-editbox-focus-border: #5190EC; + --theme-editbox-default-focus-border: #205DC2; // Light --theme-tablist-color: rgba(0, 0, 0, .02); --theme-tablist-plain-color: #2A64C4; // Light --theme-tablist-plain-divider: rgba(255, 255, 255, .07); // Light invert @@ -339,6 +340,7 @@ --theme-editbox-focus-color: rgba(0, 0, 0, .08); --theme-editbox-focus-border: #5190EC; + --theme-editbox-default-focus-border: #205DC2; --theme-tablist-color: rgba(0, 0, 0, .02); --theme-tablist-plain-color: #2A64C4; --theme-tablist-plain-divider: rgba(0, 0, 0, .07); diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index e664471549..dd2dd67bd1 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -265,8 +265,11 @@ input.search { .justify-center { justify-content: center; } .justify-stretch { justify-content: stretch; } .items-baseline { align-items: baseline; } +.items-start { align-items: flex-start; } .items-center { align-items: center; } -.self-end { align-self: end; } +.items-stretch { align-items: stretch; } +.self-start { align-self: flex-start; } +.self-end { align-self: flex-end; } .flex-gap-4 { gap: 1rem; } .flex-gap-3 { gap: .75rem; } @@ -465,6 +468,7 @@ input.search { .ml-2 { margin-left: .5rem; } .ml-3 { margin-left: .75rem; } .ml-4 { margin-left: 1rem; } +.ml-5-5 { margin-left: 1.375rem; } .ml-6 { margin-left: 1.5rem; } .ml-8 { margin-left: 2rem; } .ml-10 { margin-left: 2.5rem; } @@ -524,6 +528,7 @@ input.search { .pl-2 { padding-left: .5rem; } .pl-3 { padding-left: .75rem; } .pl-4 { padding-left: 1rem; } +.pl-5-5 { padding-left: 1.375rem; } .pl-7 { padding-left: 1.75rem; } .pl-8 { padding-left: 2rem; } .pl-9 { padding-left: 2.25rem; } @@ -534,10 +539,12 @@ input.search { .pr-4 { padding-right: 1rem; } .pr-8 { padding-right: 2rem; } .pr-24 { padding-right: 6rem; } +.pt-1 { padding-top: .25rem; } .pt-2 { padding-top: .5rem; } .pt-3 { padding-top: .75rem; } .pt-4 { padding-top: 1rem; } .pt-6 { padding-top: 1.5rem; } +.pb-0-5 { padding-bottom: .125rem; } .pb-1 { padding-bottom: .25rem !important; } .pb-2 { padding-bottom: .5rem; } .pb-3 { padding-bottom: .75rem; } @@ -550,6 +557,7 @@ input.search { .px-4 { padding: 0 1rem; } .px-6 { padding: 0 1.5rem; } .px-10 { padding: 0 2.5rem; } +.py-0-5 { padding: 0.125rem 0; } .py-1 { padding: 0.25rem 0; } .py-4 { padding: 1rem 0; } .py-8 { padding: 2rem 0; } @@ -560,6 +568,7 @@ input.search { .p-2 { padding: .5rem; } .p-3 { padding: .75rem; } .p-4 { padding: 1rem; } +.p-5 { padding: 1.25rem; } .p-6 { padding: 1.5rem; } .p-10 { padding: 2.5rem; } @@ -568,6 +577,8 @@ input.search { .step-lr25 + .step-lr25 { margin-left: .25rem; } .step-lr75 + .step-lr75 { margin-left: .75rem; } +.step-tb25 + .step-tb25 { margin-top: .25rem; } +.step-tb375 + .step-tb375 { margin-top: .375rem; } .step-tb75 + .step-tb75 { margin-top: .75rem; } .step-tb-6 + .step-tb-6 { margin-top: 1.5rem; } .step-tb-12 + .step-tb-12 { margin-top: 3rem; } @@ -640,6 +651,7 @@ input.search { .h-18 { height: 4.5rem; } .h-50 { height: 12.5rem; } .h-60 { height: 15.0rem; } +.w-min { width: min-content; } .w-full { width: 100%; } .w-2 { width: .5rem; } .w-4 { width: 1rem; } @@ -659,6 +671,7 @@ input.search { .min-w-4 { min-width: 1rem; } .min-w-8 { min-width: 2rem; } .min-w-9 { min-width: 2.25rem; } +.min-w-12 { min-width: 3rem; } .min-w-60 { min-width: 15rem; } .min-w-80 { min-width: 20rem; } .min-w-100 { min-width: 25rem; } @@ -669,6 +682,7 @@ input.search { .min-h-4 { min-height: 1rem; } .min-h-5 { min-height: 1.25rem; } .min-h-7 { min-height: 1.75rem; } +.min-h-8 { min-height: 2rem; } .min-h-30 { min-height: 7.5rem; } .min-h-60 { min-height: 15rem; } .max-w-2 { max-width: .5rem; } @@ -786,6 +800,7 @@ a.no-line { user-select: none; } .text-xs { font-size: .625rem; } +.text-11px { font-size: .6875rem; } .text-sm { font-size: .75rem; } .text-md { font-size: .8125rem; } .text-normal { font-size: var(--body-font-size); } diff --git a/packages/theme/styles/button.scss b/packages/theme/styles/button.scss index 0534c809d2..e68b365f88 100644 --- a/packages/theme/styles/button.scss +++ b/packages/theme/styles/button.scss @@ -27,7 +27,7 @@ font-size: .8125rem; &.only-icon { width: 1.75rem; } } - &.medium { + &.medium:not(.stepper) { height: 2rem; &.only-icon { width: 2rem; } } @@ -59,6 +59,7 @@ &.short { max-width: 8.5rem; } &.accent { font-weight: 500; } &.sh-no-shape { border-radius: .25rem; } + &.sh-round-sm { border-radius: .375rem; } &.sh-round { border-radius: .5rem; } &.sh-round2 { border-radius: .75rem; } &.sh-circle { border-radius: 1rem; } @@ -89,7 +90,8 @@ &.jf-center { justify-content: center; } &.only-icon { flex-shrink: 0 !important; - padding: 0; + + &:not(.stepper) { padding: 0; } } &.regular { @@ -133,7 +135,7 @@ } } } - &.ghost { + &.ghost, &.stepper { &:hover { background-color: var(--theme-button-hovered); } &:active { background-color: var(--theme-button-pressed); } &.selected { background-color: var(--highlight-select); } @@ -265,6 +267,14 @@ background-color: var(--theme-button-contrast-disabled); } } + &.stepper { + padding: 0; + width: 1rem; + height: .8125rem; + min-width: 1rem; + + &:focus { box-shadow: 0 0 0 1px var(--accented-button-outline); } + } &.notSelected { color: var(--theme-dark-color); diff --git a/packages/theme/styles/common.scss b/packages/theme/styles/common.scss index bef1bd5f41..2723514475 100644 --- a/packages/theme/styles/common.scss +++ b/packages/theme/styles/common.scss @@ -403,6 +403,7 @@ &:not(.withMargins) { margin: 0 !important; } + &.x0-5 { height: .125rem; } &.x1-5 { height: .375rem; } &.x2 { height: .5rem; } &.x3 { height: .75rem; } diff --git a/packages/theme/styles/components.scss b/packages/theme/styles/components.scss index ecdaab50c3..8fa86252e2 100644 --- a/packages/theme/styles/components.scss +++ b/packages/theme/styles/components.scss @@ -788,6 +788,41 @@ } } +/* Option */ +.antiOption { + position: relative; + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 .25rem; + height: 2rem; + min-width: 0; + font-size: .8125rem; + border-radius: .375rem; + outline: none; + z-index: 1; + + .tools { opacity: 0; } + + &.leftPadding { padding-left: 0.625rem; } + &::before { + position: absolute; + top: -.125rem; + bottom: -.125rem; + left: -.125rem; + right: -.125rem; + border: 1px solid var(--theme-editbox-default-focus-border); + border-radius: .5rem; + z-index: -1; + } + &:hover { + background-color: var(--theme-button-hovered); + + .tools { opacity: 1; } + } + &:focus-within::before, &:focus::before { content: ''; } +} + /* Wraps */ .antiWrapper { position: relative; diff --git a/packages/theme/styles/editors.scss b/packages/theme/styles/editors.scss new file mode 100644 index 0000000000..1a2228ed31 --- /dev/null +++ b/packages/theme/styles/editors.scss @@ -0,0 +1,97 @@ +.antiEditBox { + display: inline-flex; + flex-direction: column; + align-items: flex-start; + min-width: 0; + + .large-style { + font-weight: 400; + font-size: 1.25rem; + } + .small-style { + font-weight: 400; + font-size: 0.75rem; + } + .search-style { + font-weight: 400; + padding: 0.625rem 0.75rem; + } + .underline { + font-weight: 500; + + input { + padding: 0.25rem 0.5rem; + background-color: var(--theme-editbox-focus-color); + border-radius: 0.25rem; + + &:focus { box-shadow: 0 0 0 1px var(--theme-editbox-focus-border); } + } + } + .focusable:not(.default, .default-large, .ghost, .ghost-large) { + margin: 0 -0.75rem; + padding: 0.625rem 0.75rem; + width: calc(100% + 1.5rem); + border-radius: 0.25rem; + transition: border-color 0.15s ease-in-out; + + &:focus-within { box-shadow: 0 0 0 1px var(--theme-editbox-focus-border); } + } + + input { + margin: 0; + padding: 0; + min-width: 0; + color: var(--theme-caption-color); + border: none; + border-radius: 2px; + + &::-webkit-contacts-auto-fill-button, + &::-webkit-credentials-auto-fill-button { + visibility: hidden; + display: none !important; + pointer-events: none; + height: 0; + width: 0; + margin: 0; + } + &.number::-webkit-outer-spin-button, + &.number::-webkit-inner-spin-button { -webkit-appearance: none; } + } + input[type='number'] { -moz-appearance: textfield; } + &.uppercase .hidden-text, + &.uppercase input { text-transform: uppercase; } + + .default, .ghost { + font-weight: 400; + font-size: .8125rem; + } + .default-large, .ghost-large { + font-weight: 500; + font-size: 1rem; + } + .default, .ghost { padding: 0.3125rem 0.5rem; } + .default-large, .ghost-large { padding: 0.4375rem 0.5rem; } + .default, .ghost, .default-large, .ghost-large { + box-sizing: border-box; + line-height: 1.25rem; + border-radius: .375rem; + border: 1px solid transparent; + + input { + color: inherit; + + &::placeholder { color: var(--theme-darker-color); } + } + &:hover { background-color: var(--theme-button-hovered); } + &.focusable:focus-within { + background-color: var(--theme-button-focused); + border-color: var(--theme-editbox-default-focus-border); + } + &.disabled { + color: var(--theme-dark-color); + background-color: transparent; + border-color: var(--theme-divider-color); + } + } + .default, .default-large { border-color: var(--theme-divider-color); } +} diff --git a/packages/theme/styles/global.scss b/packages/theme/styles/global.scss index 1227ae872f..3117780afc 100644 --- a/packages/theme/styles/global.scss +++ b/packages/theme/styles/global.scss @@ -17,6 +17,7 @@ @import "./_layouts.scss"; @import "./common.scss"; @import "./button.scss"; +@import "./editors.scss"; @import "./components.scss"; @import "./dialogs.scss"; @import "./popups.scss"; diff --git a/packages/theme/styles/popups.scss b/packages/theme/styles/popups.scss index eea2361c7c..27faf42724 100644 --- a/packages/theme/styles/popups.scss +++ b/packages/theme/styles/popups.scss @@ -222,6 +222,7 @@ .ap-space { flex-shrink: 0; height: .25rem; + &.x1-5 { height: .375rem; } &.x2 { height: .5rem; } &.x3 { height: .75rem; } } @@ -255,11 +256,13 @@ cursor: pointer; &:not(.separator) { - margin: 0 .5rem; min-height: 2.25rem; border-radius: .25rem; } - &:not(.separator, .withComp) { padding: .25rem .5rem; } + &:not(.separator, .noMargin) { + margin-left: .5rem; + margin-right: .5rem; + } &.withComp { display: flex; align-items: center; @@ -340,6 +343,21 @@ &.halfMargin { margin: .25rem 0; } } } + &:not(.thinStyle) .ap-menuItem:not(.separator, .withComp) { padding: .25rem .5rem; } + &.thinStyle { + border-radius: .75rem; + + .ap-menuItem:not(.separator) { + padding: 0 .5rem; + min-height: 2rem; + font-size: .8125rem; + border-radius: .375rem; + } + .ap-menuItem:not(.separator, .noMargin) { + margin-left: .375rem; + margin-right: .375rem; + } + } .ap-check { flex-shrink: 0; margin-left: 1rem; diff --git a/packages/ui/lang/en.json b/packages/ui/lang/en.json index 25f6c1528a..45c40bb6da 100644 --- a/packages/ui/lang/en.json +++ b/packages/ui/lang/en.json @@ -9,6 +9,9 @@ "Days": "{days, plural, =0 {today} =1 {yesterday} other {# days ago}}", "Months": "{months, plural, =0 {this month} =1 {a month ago} other {# months ago}}", "Years": "{years, plural, =0 {this year} =1 {a year ago} other {# years ago}}", + "MinutesShort": "{value}m", + "HoursShort": "{value}h", + "DaysShort": "{value}d", "ShowMore": "Show more", "ShowLess": "Show less", "Search": "Search", diff --git a/packages/ui/lang/ru.json b/packages/ui/lang/ru.json index 9cf8af2297..0a16530a39 100644 --- a/packages/ui/lang/ru.json +++ b/packages/ui/lang/ru.json @@ -9,6 +9,9 @@ "Days": "{days, plural, =0 {сегодня} =1 {вчера} one {# день назад} few {# дня назад} other {# дней назад}}", "Months": "{months, plural, =0 {в этом месяце} =1 {месяц назад} one {# месяц назад} few {# месяца назад} other {# месяцев назад}}", "Years": "{years, plural, =0 {в этом году} =1 {год назад} one {# год назад} few {# год назад} other {# лет назад}}", + "MinutesShort": "{value}м", + "HoursShort": "{value}ч", + "DaysShort": "{value}д", "ShowMore": "Показать больше", "ShowLess": "Показать меньше", "Search": "Поиск", diff --git a/packages/ui/src/components/EditBox.svelte b/packages/ui/src/components/EditBox.svelte index a821ecdea3..17c1957da9 100644 --- a/packages/ui/src/components/EditBox.svelte +++ b/packages/ui/src/components/EditBox.svelte @@ -133,7 +133,7 @@