diff --git a/packages/presentation/src/components/Card.svelte b/packages/presentation/src/components/Card.svelte index 37813827e1..18ff368881 100644 --- a/packages/presentation/src/components/Card.svelte +++ b/packages/presentation/src/components/Card.svelte @@ -32,7 +32,7 @@ export let hideSubheader: boolean = false export let accentHeader: boolean = false export let gap: string | undefined = undefined - export let width: 'large' | 'medium' | 'small' | 'x-small' = 'large' + export let width: 'large' | 'medium' | 'small' | 'x-small' | 'menu' = 'large' const dispatch = createEventDispatcher() diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index 70f2e475b4..9479b4c802 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -406,6 +406,7 @@ input.search { &:not(.reverse) > *:not(:first-child) { margin-left: .5rem; } &.reverse > *:not(:last-child) { margin-right: .5rem; } } +.gapV-2 > *:not(:last-child) { margin-bottom: .5rem; } .gap-3 { &:not(.reverse) > *:not(:first-child) { margin-left: .75rem; } &.reverse > *:not(:last-child) { margin-right: .75rem; } diff --git a/packages/theme/styles/components.scss b/packages/theme/styles/components.scss index 7879679449..130e854c81 100644 --- a/packages/theme/styles/components.scss +++ b/packages/theme/styles/components.scss @@ -366,6 +366,79 @@ } } +/* Contact Card */ +.antiContactCard { + display: flex; + flex-direction: column; + padding: 1rem 1.5rem 1.25rem; + background-color: var(--theme-button-enabled); + border: 1px solid var(--theme-button-border); + border-radius: 0.5rem; + transition-property: box-shadow, background-color, border-color; + transition-timing-function: var(--timing-shadow); + transition-duration: 0.15s; + user-select: text; + height: 100%; + min-width: 15rem; + min-height: 15rem; + + &:hover { + background-color: var(--theme-button-hovered); + box-shadow: var(--accent-shadow); + } + + .logo { + width: 4.5rem; + height: 4.5rem; + color: var(--primary-button-color); + background-color: var(--primary-button-enabled); + border-radius: 50%; + } + .label { + margin-bottom: 1.75rem; + font-weight: 500; + font-size: 0.625rem; + color: var(--theme-dark-color); + } + .name { + margin: 1rem 0 0.25rem; + font-weight: 500; + font-size: 1rem; + color: var(--theme-caption-color); + } + .description { + font-size: 0.75rem; + color: var(--theme-dark-color); + } + .footer { + display: flex; + flex-direction: row-reverse; + justify-content: space-between; + align-items: flex-end; + flex-grow: 1; + margin-top: 1.5rem; + width: 100%; + min-width: 0; + } + + &.inline { + padding: 0.5rem 0.5rem 0.25rem; + min-width: 1rem; + min-height: 1rem; + + background-color: inherit; + border: inherit; + border-radius: inherit; + .name { + margin: 0.25rem 0 0.25rem; + font-size: 0.75rem; + } + .label { + margin-bottom: 0rem; + } + } +} + /* Table */ .antiTable { position: relative; diff --git a/packages/theme/styles/dialogs.scss b/packages/theme/styles/dialogs.scss index 49f827435f..ea87028f7a 100644 --- a/packages/theme/styles/dialogs.scss +++ b/packages/theme/styles/dialogs.scss @@ -164,6 +164,37 @@ } } + .antiCard-menu__item { + display: flex; + justify-content: space-between; + align-items: center; + flex-shrink: 0; + margin: 0 .5rem; + padding: .25rem .5rem; + min-width: 0; + min-height: 2.5rem; + border-radius: .25rem; + + &.hoverable{ + cursor: pointer; + + &:hover { background-color: var(--theme-popup-hover); } + } + span { + margin-right: .5rem; + color: var(--theme-caption-color); + } + } + .antiCard-menu__spacer { + flex-shrink: 0; + height: .5rem; + } + .antiCard-menu__divider { + flex-shrink: 0; + margin: .5rem 0; + height: 1px; + background-color: var(--theme-popup-divider); + } .antiCard-group { padding: .5rem 1rem; @@ -195,22 +226,26 @@ height: auto; max-height: inherit; - &.large { + &.large { // 720 width: 45rem; max-width: 60rem; } - &.medium { + &.medium { // 600 width: 37.5rem; max-width: 37.5rem; } - &.small { + &.small { // 480 width: 30rem; max-width: 30rem; } - &.x-small { + &.x-small { // 400 width: 25rem; max-width: 25rem; } + &.menu { // 280 + width: 17.5rem; + max-width: 17.5rem; + } &.full { width: max-content; // max-width: 100%; diff --git a/packages/theme/styles/panel.scss b/packages/theme/styles/panel.scss index 7980e65827..eb2e0c95ff 100644 --- a/packages/theme/styles/panel.scss +++ b/packages/theme/styles/panel.scss @@ -195,6 +195,7 @@ display: flex; justify-content: center; align-items: center; + flex-shrink: 0; width: 100%; min-width: 0; min-height: 3.5rem; diff --git a/packages/theme/styles/popups.scss b/packages/theme/styles/popups.scss index 299498434e..04887c46f7 100644 --- a/packages/theme/styles/popups.scss +++ b/packages/theme/styles/popups.scss @@ -23,6 +23,7 @@ max-width: 17rem; max-height: 22rem; background: var(--theme-popup-color); + border: 1px solid var(--theme-popup-divider); border-radius: .5rem; box-shadow: var(--theme-popup-shadow); @@ -217,6 +218,7 @@ min-width: 0; max-width: 30rem; background: var(--theme-popup-color); + border: 1px solid var(--theme-popup-divider); border-radius: .5rem; box-shadow: var(--theme-popup-shadow); user-select: none; diff --git a/packages/ui/src/components/DropdownLabelsIntl.svelte b/packages/ui/src/components/DropdownLabelsIntl.svelte index 9fa01846dc..24a6b7ff40 100644 --- a/packages/ui/src/components/DropdownLabelsIntl.svelte +++ b/packages/ui/src/components/DropdownLabelsIntl.svelte @@ -23,6 +23,7 @@ import DropdownLabelsPopupIntl from './DropdownLabelsPopupIntl.svelte' import Label from './Label.svelte' import ui from '../plugin' + import DropdownIcon from './icons/Dropdown.svelte' export let icon: Asset | AnySvelteComponent | undefined = undefined export let label: IntlString = ui.string.DropdownDefaultLabel @@ -84,8 +85,11 @@ showTooltip={{ label, direction: labelDirection }} on:click={openPopup} > - + + + + diff --git a/packages/ui/src/components/DropdownLabelsPopupIntl.svelte b/packages/ui/src/components/DropdownLabelsPopupIntl.svelte index 02f4435fa0..84d69f0257 100644 --- a/packages/ui/src/components/DropdownLabelsPopupIntl.svelte +++ b/packages/ui/src/components/DropdownLabelsPopupIntl.svelte @@ -15,7 +15,7 @@ + + + + diff --git a/plugins/contact-resources/src/components/EditMember.svelte b/plugins/contact-resources/src/components/EditMember.svelte index 46fd06eae3..41c8605cb4 100644 --- a/plugins/contact-resources/src/components/EditMember.svelte +++ b/plugins/contact-resources/src/components/EditMember.svelte @@ -16,6 +16,7 @@ import contact, { Contact, Member, Organization } from '@hcengineering/contact' import { Ref } from '@hcengineering/core' import { createQuery } from '@hcengineering/presentation' + import { Scroller } from '@hcengineering/ui' import { createEventDispatcher, onMount } from 'svelte' import ExpandRightDouble from './icons/ExpandRightDouble.svelte' import OrganizationCard from './OrganizationCard.svelte' @@ -51,11 +52,13 @@ {#if object !== undefined && refContact !== undefined && organization !== undefined} -
-
-
-
-
+ +
+
+
+
+
+
{/if} diff --git a/plugins/contact-resources/src/components/PersonCard.svelte b/plugins/contact-resources/src/components/PersonCard.svelte index effb0e1ee0..831f97779c 100644 --- a/plugins/contact-resources/src/components/PersonCard.svelte +++ b/plugins/contact-resources/src/components/PersonCard.svelte @@ -37,7 +37,7 @@ ) -
+
{object.city ?? ''}
-