From 4c0fb8ea535beaa1cfc6fa3ff40b602ea7125d77 Mon Sep 17 00:00:00 2001 From: Nelya Klyusa <77396171+nelyaklyusa@users.noreply.github.com> Date: Thu, 9 May 2024 16:17:44 +0300 Subject: [PATCH] add components (#15) --- package.json | 4 +- src/assets/arrow-left-primary.svg | 5 + src/assets/arrow-right-primary.svg | 5 + src/assets/upload.svg | 5 + .../BaseAccordion/BaseAccordion.vue | 4 +- .../BaseAccordion/BaseAccordionItem.vue | 10 +- src/components/BaseAccordion/index.sass | 4 + .../BaseBreadcrumbs/BaseBreadcrumbs.vue | 68 ++ src/components/BaseBreadcrumbs/index.sass | 2 + src/components/BaseButton/BaseButton.vue | 4 +- .../BaseContentSwitcher.vue | 83 +++ src/components/BaseContentSwitcher/index.sass | 2 + src/components/BaseContentSwitcher/index.ts | 4 + src/components/BaseContentSwitcher/types.ts | 4 + src/components/BaseDropdown/BaseDropdown.vue | 85 +++ .../BaseDropdown/assets/chevron-down.svg | 5 + src/components/BaseDropdown/index.sass | 3 + src/components/BaseFilter/BaseFilter.vue | 184 ++++++ src/components/BaseFilter/filter.svg | 5 + src/components/BaseFilter/index.sass | 2 + src/components/BaseForm/index.sass | 2 + .../BaseFormCheckbox/BaseFormCheckbox.vue | 6 +- .../BaseFormCheckboxGroup.vue | 13 +- .../BaseFormGroup/BaseFormGroup.vue | 108 ++-- src/components/BaseFormGroup/index.sass | 2 + .../BaseFormInput/BaseFormInput.vue | 10 +- .../BaseFormInputSearch.vue | 69 ++ src/components/BaseFormInputSearch/index.sass | 3 + src/components/BaseFormInputSearch/index.ts | 4 + .../BaseFormRadio/BaseFormRadio.vue | 6 +- src/components/BaseFormRadio/index.sass | 6 +- .../BaseFormSelect/BaseFormSelect.vue | 15 +- .../BaseFormTextarea/BaseFormTextarea.vue | 5 +- src/components/BaseFormTextarea/index.sass | 13 +- .../BaseModal/BaseModal.component.ts | 89 +++ src/components/BaseModal/BaseModal.vue | 86 +++ src/components/BaseModal/BaseModalLayout.vue | 309 +++++++++ src/components/BaseModal/blocked-body.ts | 55 ++ src/components/BaseModal/index.sass | 2 + src/components/BaseModal/index.ts | 1 + src/components/BaseModal/useModal.ts | 167 +++++ .../BaseProgressBar/BaseProgressBar.vue | 61 ++ src/components/BaseProgressBar/index.sass | 2 + src/components/BaseSkeleton/BaseSkeleton.vue | 60 +- src/components/BaseSkeleton/index.sass | 2 + src/components/BaseSpinner/BaseSpinner.vue | 3 +- src/components/BaseSpinner/index.sass | 2 + src/components/BaseStepper/BaseStepper.vue | 159 +++++ src/components/BaseStepper/index.sass | 2 + src/components/BaseTable/BaseTable.vue | 32 +- src/components/BaseTable/index.sass | 16 +- src/components/BaseTag/BaseTag.vue | 4 +- src/components/BaseTimeline/BaseTimeline.vue | 40 ++ .../BaseTimeline/BaseTimelineCard.vue | 168 +++++ .../BaseTimeline/BaseTimelineCircle.vue | 88 +++ .../BaseTimeline/BaseTimelineItem.vue | 126 ++++ src/components/BaseTimeline/assets/check.svg | 5 + src/components/BaseTimeline/index.sass | 2 + src/components/BaseTooltip/BaseTooltip.vue | 605 ++++++++---------- src/components/BaseTooltip/index.sass | 2 + src/components/BaseUploader/BaseUploader.vue | 240 +++++++ src/components/BaseUploader/file.svg | 5 + src/components/BaseUploader/index.sass | 2 + src/components/BaseUploader/upload.svg | 5 + .../CardCheckmarked/CardCheckmarked.vue | 94 +++ .../common/CardCheckmarked/assets/check.svg | 5 + .../common/CardCheckmarked/index.sass | 2 + .../common/CardCheckmarked/types.ts | 6 + .../common/SliderSwiper/SliderSwiper.vue | 79 +++ src/components/common/SliderSwiper/index.sass | 2 + .../SliderWithPaginationAutoPlay.vue | 114 ++++ .../SliderWithPaginationAutoPlay/index.sass | 2 + .../WhatOurClientsSay/WhatOurClientsSay.vue | 69 ++ .../WhatOurClientsSaySlider.vue | 112 ++++ .../common/WhatOurClientsSay/index.sass | 2 + .../common/WhatOurClientsSay/utils.ts | 39 ++ src/helpers/blocked-body.ts | 55 ++ src/styles/_fonts.sass | 14 +- src/styles/_global.sass | 7 +- yarn.lock | 82 ++- 80 files changed, 3308 insertions(+), 466 deletions(-) create mode 100644 src/assets/arrow-left-primary.svg create mode 100644 src/assets/arrow-right-primary.svg create mode 100644 src/assets/upload.svg create mode 100644 src/components/BaseBreadcrumbs/BaseBreadcrumbs.vue create mode 100644 src/components/BaseBreadcrumbs/index.sass create mode 100644 src/components/BaseContentSwitcher/BaseContentSwitcher.vue create mode 100644 src/components/BaseContentSwitcher/index.sass create mode 100644 src/components/BaseContentSwitcher/index.ts create mode 100644 src/components/BaseContentSwitcher/types.ts create mode 100644 src/components/BaseDropdown/BaseDropdown.vue create mode 100644 src/components/BaseDropdown/assets/chevron-down.svg create mode 100644 src/components/BaseDropdown/index.sass create mode 100644 src/components/BaseFilter/BaseFilter.vue create mode 100644 src/components/BaseFilter/filter.svg create mode 100644 src/components/BaseFilter/index.sass create mode 100644 src/components/BaseForm/index.sass create mode 100644 src/components/BaseFormGroup/index.sass create mode 100644 src/components/BaseFormInputSearch/BaseFormInputSearch.vue create mode 100644 src/components/BaseFormInputSearch/index.sass create mode 100644 src/components/BaseFormInputSearch/index.ts create mode 100644 src/components/BaseModal/BaseModal.component.ts create mode 100644 src/components/BaseModal/BaseModal.vue create mode 100644 src/components/BaseModal/BaseModalLayout.vue create mode 100644 src/components/BaseModal/blocked-body.ts create mode 100644 src/components/BaseModal/index.sass create mode 100644 src/components/BaseModal/index.ts create mode 100644 src/components/BaseModal/useModal.ts create mode 100644 src/components/BaseProgressBar/BaseProgressBar.vue create mode 100644 src/components/BaseProgressBar/index.sass create mode 100644 src/components/BaseSkeleton/index.sass create mode 100644 src/components/BaseSpinner/index.sass create mode 100644 src/components/BaseStepper/BaseStepper.vue create mode 100644 src/components/BaseStepper/index.sass create mode 100644 src/components/BaseTimeline/BaseTimeline.vue create mode 100644 src/components/BaseTimeline/BaseTimelineCard.vue create mode 100644 src/components/BaseTimeline/BaseTimelineCircle.vue create mode 100644 src/components/BaseTimeline/BaseTimelineItem.vue create mode 100644 src/components/BaseTimeline/assets/check.svg create mode 100644 src/components/BaseTimeline/index.sass create mode 100644 src/components/BaseTooltip/index.sass create mode 100644 src/components/BaseUploader/BaseUploader.vue create mode 100644 src/components/BaseUploader/file.svg create mode 100644 src/components/BaseUploader/index.sass create mode 100644 src/components/BaseUploader/upload.svg create mode 100644 src/components/common/CardCheckmarked/CardCheckmarked.vue create mode 100644 src/components/common/CardCheckmarked/assets/check.svg create mode 100644 src/components/common/CardCheckmarked/index.sass create mode 100644 src/components/common/CardCheckmarked/types.ts create mode 100644 src/components/common/SliderSwiper/SliderSwiper.vue create mode 100644 src/components/common/SliderSwiper/index.sass create mode 100644 src/components/common/SliderWithPaginationAutoPlay/SliderWithPaginationAutoPlay.vue create mode 100644 src/components/common/SliderWithPaginationAutoPlay/index.sass create mode 100644 src/components/common/WhatOurClientsSay/WhatOurClientsSay.vue create mode 100644 src/components/common/WhatOurClientsSay/WhatOurClientsSaySlider.vue create mode 100644 src/components/common/WhatOurClientsSay/index.sass create mode 100644 src/components/common/WhatOurClientsSay/utils.ts create mode 100644 src/helpers/blocked-body.ts diff --git a/package.json b/package.json index e3a0104..925821e 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,11 @@ "build": "storybook build -o dist/" }, "dependencies": { - "@dafcoe/vue-collapsible-panel": "^0.2.0", + "@swoga/vue-collapsible-panel": "^0.3.0", "@vue/compiler-core": "^3.4.19", + "@vueuse/core": "^10.9.0", "sass": "^1.71.1", + "swiper": "^11.1.1", "vite-svg-loader": "^5.1.0", "vue": "^3.4.19", "vue-select": "^4.0.0-beta.6" diff --git a/src/assets/arrow-left-primary.svg b/src/assets/arrow-left-primary.svg new file mode 100644 index 0000000..47e4f0f --- /dev/null +++ b/src/assets/arrow-left-primary.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/arrow-right-primary.svg b/src/assets/arrow-right-primary.svg new file mode 100644 index 0000000..7652cfb --- /dev/null +++ b/src/assets/arrow-right-primary.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/assets/upload.svg b/src/assets/upload.svg new file mode 100644 index 0000000..94046fb --- /dev/null +++ b/src/assets/upload.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/BaseAccordion/BaseAccordion.vue b/src/components/BaseAccordion/BaseAccordion.vue index 2057e1e..0a3b78c 100644 --- a/src/components/BaseAccordion/BaseAccordion.vue +++ b/src/components/BaseAccordion/BaseAccordion.vue @@ -1,10 +1,10 @@ diff --git a/src/components/BaseAccordion/BaseAccordionItem.vue b/src/components/BaseAccordion/BaseAccordionItem.vue index f9e291f..7009e9a 100644 --- a/src/components/BaseAccordion/BaseAccordionItem.vue +++ b/src/components/BaseAccordion/BaseAccordionItem.vue @@ -2,10 +2,10 @@ import { withDefaults } from 'vue'; import { VueCollapsiblePanel, -} from '@dafcoe/vue-collapsible-panel'; +} from '@swoga/vue-collapsible-panel'; // IMPORTANT: before using this component you need to install library -// type in the terminal: yarn add @dafcoe/vue-collapsible-panel +// type in the terminal: yarn add @swoga/vue-collapsible-panel withDefaults(defineProps<{ /** @@ -93,6 +93,12 @@ withDefaults(defineProps<{ +mt(.2s) :deep(.vcp__body) height: 0 + background-color: $accordion-item-active-content-background + :deep(.vcp__header) + background-color: $accordion-item-active-header-background + box-shadow: $accordion-item-active-header-box-shadow + z-index: 1 + position: relative &__title-text padding: 12px 16px margin-bottom: 0 diff --git a/src/components/BaseAccordion/index.sass b/src/components/BaseAccordion/index.sass index 3b13150..c8498c2 100644 --- a/src/components/BaseAccordion/index.sass +++ b/src/components/BaseAccordion/index.sass @@ -1,5 +1,6 @@ @import 'UiKit/styles/_colors.sass' @import 'UiKit/styles/_mixins.sass' +@import 'UiKit/styles/_global.sass' $border-color: $gray-30 $border-color-white: $gray-10 @@ -8,3 +9,6 @@ $white-link-color: $gray-10 $link-color: $primary $open-close-icon-fill: $black +$accordion-item-active-header-background: $white +$accordion-item-active-header-box-shadow: $box-shadow-small +$accordion-item-active-content-background: $gray-10 \ No newline at end of file diff --git a/src/components/BaseBreadcrumbs/BaseBreadcrumbs.vue b/src/components/BaseBreadcrumbs/BaseBreadcrumbs.vue new file mode 100644 index 0000000..ecb21da --- /dev/null +++ b/src/components/BaseBreadcrumbs/BaseBreadcrumbs.vue @@ -0,0 +1,68 @@ + + + + + + + + + {{ item.name }} + + + + / + + + + + + + diff --git a/src/components/BaseBreadcrumbs/index.sass b/src/components/BaseBreadcrumbs/index.sass new file mode 100644 index 0000000..6b6f492 --- /dev/null +++ b/src/components/BaseBreadcrumbs/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/BaseButton/BaseButton.vue b/src/components/BaseButton/BaseButton.vue index f95952d..7452046 100644 --- a/src/components/BaseButton/BaseButton.vue +++ b/src/components/BaseButton/BaseButton.vue @@ -147,7 +147,7 @@ &:hover background-color: $base-button-danger-hover-color &.is--variant-outlined - background-color: transparent + background-color: $white border-style: solid border-width: $base-button-border-width &.is--color-primary @@ -190,7 +190,7 @@ &:hover background-color: rgba($base-button-secondary-color, 0.1) &.is--color-success - color: $base-button-success-color + color: $base-button-success-text-color &:hover background-color: rgba($base-button-success-color, 0.1) &.is--color-warning diff --git a/src/components/BaseContentSwitcher/BaseContentSwitcher.vue b/src/components/BaseContentSwitcher/BaseContentSwitcher.vue new file mode 100644 index 0000000..bb9a0db --- /dev/null +++ b/src/components/BaseContentSwitcher/BaseContentSwitcher.vue @@ -0,0 +1,83 @@ + + + + + + + + {{ tab.label }} + + + + + + + diff --git a/src/components/BaseContentSwitcher/index.sass b/src/components/BaseContentSwitcher/index.sass new file mode 100644 index 0000000..f765c89 --- /dev/null +++ b/src/components/BaseContentSwitcher/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_mixins.sass' diff --git a/src/components/BaseContentSwitcher/index.ts b/src/components/BaseContentSwitcher/index.ts new file mode 100644 index 0000000..eca0c5a --- /dev/null +++ b/src/components/BaseContentSwitcher/index.ts @@ -0,0 +1,4 @@ +import BaseContentSwitcher from './BaseContentSwitcher.vue'; + +export { BaseContentSwitcher }; +export * from './types'; diff --git a/src/components/BaseContentSwitcher/types.ts b/src/components/BaseContentSwitcher/types.ts new file mode 100644 index 0000000..44d3b22 --- /dev/null +++ b/src/components/BaseContentSwitcher/types.ts @@ -0,0 +1,4 @@ +export type Tab = object & { + value: string | number; + label?: string; +}; diff --git a/src/components/BaseDropdown/BaseDropdown.vue b/src/components/BaseDropdown/BaseDropdown.vue new file mode 100644 index 0000000..18d164f --- /dev/null +++ b/src/components/BaseDropdown/BaseDropdown.vue @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/BaseDropdown/assets/chevron-down.svg b/src/components/BaseDropdown/assets/chevron-down.svg new file mode 100644 index 0000000..d0331b6 --- /dev/null +++ b/src/components/BaseDropdown/assets/chevron-down.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/BaseDropdown/index.sass b/src/components/BaseDropdown/index.sass new file mode 100644 index 0000000..ba26af6 --- /dev/null +++ b/src/components/BaseDropdown/index.sass @@ -0,0 +1,3 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_mixins.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/BaseFilter/BaseFilter.vue b/src/components/BaseFilter/BaseFilter.vue new file mode 100644 index 0000000..a330808 --- /dev/null +++ b/src/components/BaseFilter/BaseFilter.vue @@ -0,0 +1,184 @@ + + + + + + + Filters + + ({{ selectedFilters }}) + + + + + + + + {{ item.title }} + + + + + + + Apply + + + Clear Selected + + + + + + + + diff --git a/src/components/BaseFilter/filter.svg b/src/components/BaseFilter/filter.svg new file mode 100644 index 0000000..6ff7a77 --- /dev/null +++ b/src/components/BaseFilter/filter.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/BaseFilter/index.sass b/src/components/BaseFilter/index.sass new file mode 100644 index 0000000..6b6f492 --- /dev/null +++ b/src/components/BaseFilter/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/BaseForm/index.sass b/src/components/BaseForm/index.sass new file mode 100644 index 0000000..6b6f492 --- /dev/null +++ b/src/components/BaseForm/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/BaseFormCheckbox/BaseFormCheckbox.vue b/src/components/BaseFormCheckbox/BaseFormCheckbox.vue index b424af7..122f6f2 100644 --- a/src/components/BaseFormCheckbox/BaseFormCheckbox.vue +++ b/src/components/BaseFormCheckbox/BaseFormCheckbox.vue @@ -102,7 +102,7 @@ function onChange(event: Event) { - diff --git a/src/components/BaseFormGroup/BaseFormGroup.vue b/src/components/BaseFormGroup/BaseFormGroup.vue index 9ba4dec..671b7b1 100644 --- a/src/components/BaseFormGroup/BaseFormGroup.vue +++ b/src/components/BaseFormGroup/BaseFormGroup.vue @@ -4,7 +4,7 @@ import { } from 'vue'; import get from 'lodash/get'; import merge from 'lodash/merge'; -import { resolveRef } from '@/helpers/validation/general'; +import { toRaw } from 'vue'; const props = defineProps<{ label?: string; @@ -14,23 +14,46 @@ const props = defineProps<{ schemaBack?: object; schemaFront?: object; errorText?: string[]; + required?: boolean; }>(); const schema = ref(); -function extractFieldName(path: string): string | null { - const parts = path.split('/'); - if (parts.length > 1) return parts[parts.length - 1]; - if (parts.length === 1) return parts[0]; - return null; +function resolveRef(ref, schema) { + const refPath = ref.replace('#/', '').split('/'); + let currentSchema = schema; + return get(currentSchema, refPath.join('.')); +} + +function isFieldRequiredInSchema(fieldName, schema) { + return schema.required ? schema.required.includes(fieldName) : false; +} + +function getFieldSchema(path, ref, schema) { + if (!path || !ref) return undefined; + const objectFromRefPath = resolveRef(ref, schema); + const pathSegments = path.split('.'); + const firstChild = pathSegments.shift(); + const restSegments = pathSegments.join('.'); + const segment0Property = objectFromRefPath.properties[firstChild]; + if (segment0Property?.$ref) { + return getFieldSchema(restSegments, segment0Property.$ref, schema); + } + return objectFromRefPath; +} + +function isFieldRequiredAtPath(path, schema) { + const parentSchema = getFieldSchema(path, schema.$ref, schema); + if (!parentSchema) return false; + const fieldName = path.split('.').pop(); + return isFieldRequiredInSchema(fieldName, parentSchema); } const required = computed(() => { - if (!props.path) return false; - const fieldName = extractFieldName(props.path); - const schemaObject = resolveRef(schema.value); + if (props.required) return true; + if (!props.path || !schema.value) return false; // eslint-disable-next-line - return schemaObject?.required?.includes(fieldName); + return isFieldRequiredAtPath(props.path, schema.value); }); const errorText = computed(() => { @@ -45,7 +68,9 @@ const errorText = computed(() => { const isError = computed(() => (errorText.value.length > 0)); watch(() => [props.schemaBack, props.schemaFront], () => { - schema.value = merge(props.schemaBack, props.schemaFront); + const schema1 = structuredClone(toRaw(props.schemaBack)) + const schema2 = structuredClone(toRaw(props.schemaFront)) + schema.value = merge(schema1, schema2); }, { immediate: true, deep: true }); @@ -80,37 +105,32 @@ watch(() => [props.schemaBack, props.schemaFront], () => { - diff --git a/src/components/BaseFormGroup/index.sass b/src/components/BaseFormGroup/index.sass new file mode 100644 index 0000000..6b6f492 --- /dev/null +++ b/src/components/BaseFormGroup/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/BaseFormInput/BaseFormInput.vue b/src/components/BaseFormInput/BaseFormInput.vue index 31fe06f..abbdd02 100644 --- a/src/components/BaseFormInput/BaseFormInput.vue +++ b/src/components/BaseFormInput/BaseFormInput.vue @@ -52,7 +52,10 @@ const moneyFormatOptions = { }, } -const emit = defineEmits<{ (e: 'update:modelValue', value: string): void }>(); +const emit = defineEmits<{ + (e: 'update:modelValue', value: string): void, + (e: 'enter'): void, +}>(); const localValue = ref(''); const focused = ref(false); @@ -131,7 +134,7 @@ function onInput(value: string) { // set filtered value localValue.value = String(value).replace(charsToCheck, ''); if (props.mask) localValue.value = mask.masked(localValue.value); - emit('update:modelValue', returnValue.value); + emit('update:modelValue', returnValue.value.trim()); } function onInputEvent() { @@ -192,6 +195,7 @@ watch(() => props.modelValue, () => onInput(props.modelValue)); @beforeinput="onBeforeInput" @focus="onFocus" @blur="onBlur" + @keypress.enter="emit('enter')" > props.modelValue, () => onInput(props.modelValue)); - diff --git a/src/components/BaseFormInputSearch/index.sass b/src/components/BaseFormInputSearch/index.sass new file mode 100644 index 0000000..825b792 --- /dev/null +++ b/src/components/BaseFormInputSearch/index.sass @@ -0,0 +1,3 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_mixins.sass' + diff --git a/src/components/BaseFormInputSearch/index.ts b/src/components/BaseFormInputSearch/index.ts new file mode 100644 index 0000000..06b3c8f --- /dev/null +++ b/src/components/BaseFormInputSearch/index.ts @@ -0,0 +1,4 @@ +import BaseFormInputSearch from './BaseFormInputSearch.vue'; + +export { BaseFormInputSearch }; +export default BaseFormInputSearch; diff --git a/src/components/BaseFormRadio/BaseFormRadio.vue b/src/components/BaseFormRadio/BaseFormRadio.vue index a0e1261..5a33f54 100644 --- a/src/components/BaseFormRadio/BaseFormRadio.vue +++ b/src/components/BaseFormRadio/BaseFormRadio.vue @@ -8,7 +8,7 @@ type FormRadioOption = { }; const props = withDefaults(defineProps<{ - modelValue: string | string[] | number[] + modelValue: string | string[] | number[] | boolean options?: Record | string[] | FormRadioOption[], row?: boolean, disabled?: boolean, @@ -91,7 +91,7 @@ function getLabelValue(option: string | number | FormRadioOption) { tabindex="1" class="base-form-radio__input" v-bind="$attrs" - @change="$emit('update:modelValue', $event.target.value)" + @change="$emit('update:modelValue', selectedOption);" > - diff --git a/src/components/BaseModal/BaseModalLayout.vue b/src/components/BaseModal/BaseModalLayout.vue new file mode 100644 index 0000000..9ea638a --- /dev/null +++ b/src/components/BaseModal/BaseModalLayout.vue @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + the content + + + + + + + + diff --git a/src/components/BaseModal/blocked-body.ts b/src/components/BaseModal/blocked-body.ts new file mode 100644 index 0000000..154d027 --- /dev/null +++ b/src/components/BaseModal/blocked-body.ts @@ -0,0 +1,55 @@ + +// https://stackoverflow.com/a/13382873 +const getScrollbarWidth = () => { + const outer = document.createElement('div'); + outer.style.visibility = 'hidden'; + outer.style.overflow = 'scroll'; + document.body.appendChild(outer); + + const inner = document.createElement('div'); + outer.appendChild(inner); + + const scrollbarWidth = (outer.offsetWidth - inner.offsetWidth); + + outer.parentNode?.removeChild(outer); + + return scrollbarWidth; +}; + + +const scrollbarVisible = (element: HTMLElement) => ( + element.scrollHeight > element.clientHeight +); + + +// from https://css-tricks.com/prevent-page-scrolling-when-a-modal-is-open/ + +let counter = 0; + +export const unBlockedBody = () => { + counter -= 1; + + if (counter) return; + const { style } = document.body; + style.paddingRight = ''; + style.overflow = ''; + style.backgroundColor = ''; +}; + +export const blockedBody = () => { + counter += 1; + + if (counter === 1) { + const { style } = document.body; + + if (scrollbarVisible(document.body)) { + const width = getScrollbarWidth(); + style.paddingRight = `${width}px`; + style.backgroundColor = '#f1f4fc'; // 'whitesmoke'; + } + + style.overflow = 'hidden'; + } + + return () => unBlockedBody(); +}; diff --git a/src/components/BaseModal/index.sass b/src/components/BaseModal/index.sass new file mode 100644 index 0000000..6b6f492 --- /dev/null +++ b/src/components/BaseModal/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/BaseModal/index.ts b/src/components/BaseModal/index.ts new file mode 100644 index 0000000..fcaecea --- /dev/null +++ b/src/components/BaseModal/index.ts @@ -0,0 +1 @@ +export * from './useModal'; diff --git a/src/components/BaseModal/useModal.ts b/src/components/BaseModal/useModal.ts new file mode 100644 index 0000000..89c82b1 --- /dev/null +++ b/src/components/BaseModal/useModal.ts @@ -0,0 +1,167 @@ +/* eslint-disable @typescript-eslint/unbound-method */ +/* eslint-disable vue/one-component-per-file */ + +// eslint-disable-next-line object-curly-newline +import { + App, + DefineComponent, + Component, + ComponentInternalInstance, + onBeforeUnmount, + + createApp, + defineAsyncComponent, + getCurrentInstance, + h, +} from 'vue'; +import { IWdModalBase } from './BaseModal.component'; + + +// From https://git.io/JlvW9 +function createChildApp(appCfg: Component, parentApp: App) { + const app = createApp(appCfg); + + app.config.globalProperties = parentApp.config.globalProperties; + + // @ts-ignore TODO: for reload + // eslint-disable-next-line no-underscore-dangle, @typescript-eslint/no-unused-vars + const { reload, ...appContext } = parentApp._context; + // eslint-disable-next-line no-underscore-dangle + Object.assign(app._context, appContext); + + return app; +} + +const WdModalBase = defineAsyncComponent(() => import( + './BaseModal.vue' +)); + +const MODAL_PARENT_KEY = '__modal_parent__'; + +const useModalInner = < + IPropsData extends Record = Record, + IReturnData = boolean + >( + asyncComponent: DefineComponent | ReturnType, + modalPropsData: IWdModalBase['$props'], + defaultPopsData: Record, + instance: ComponentInternalInstance, + ) => { + let isMounted = false; + let onCloseModal = (result?: IReturnData) => { + if (!isMounted) return; + // eslint-disable-next-line no-console + console.warn('[App warn]: empty onCloseModal', result); + }; + + const createAppModal = ( + defaultPopsData_2: typeof defaultPopsData, + propsData: IPropsData, + ) => { + const appModal = createChildApp({ + name: 'UnModal', + setup() { + const childProps = { + ...defaultPopsData_2, + ...propsData, + [MODAL_PARENT_KEY]: instance, + onClose: onCloseModal, + }; + + const component = asyncComponent as unknown as DefineComponent; + const getChildren = () => h(component, childProps); + + return () => h(WdModalBase, { + ...modalPropsData, + onClose: onCloseModal, + }, { default: getChildren }); + }, + }, instance.appContext.app); + + return appModal; + }; + + const show = ( + propsData: IPropsData, + ) => { + // eslint-disable-next-line no-underscore-dangle + const parentNode = instance.appContext.app._container as HTMLElement; + const element = document.createElement('div'); + element.classList.add('app-modal-root'); + parentNode.appendChild(element); + + return new Promise((resolve) => { + const appModal = createAppModal(defaultPopsData, propsData); + isMounted = true; + + onCloseModal = (result?: IReturnData) => { + try { + appModal.unmount(); + } catch { + // eslint-disable-next-line no-empty + } + + try { + element.parentNode?.removeChild(element); + } catch { + // eslint-disable-next-line no-empty + } + + resolve(result); + }; + + appModal.mount(element); + + // @ts-ignore TODO + // eslint-disable-next-line @typescript-eslint/no-use-before-define, no-underscore-dangle + result._appModal = appModal; + }); + }; + + // on hook @vnode-before + onBeforeUnmount(() => { + onCloseModal(); + }, instance); + + const result = { + show, + // TODO: close modal by instance + hide: () => onCloseModal(), + }; + + return result; +}; + +export const useModal = < + IPropsData extends Record = Record, + IReturnData = boolean + >( + asyncComponent: DefineComponent | ReturnType, + modalPropsData: IWdModalBase['$props'] = {}, + defaultPopsData: Record = {}, + parent: ComponentInternalInstance | null = null, + ) => { + let instance = (parent || getCurrentInstance()) as ComponentInternalInstance; + + { + let parent2: ComponentInternalInstance | null = instance; + while (parent2) { + if (parent2?.attrs[MODAL_PARENT_KEY]) { + instance = parent2?.attrs[MODAL_PARENT_KEY] as ComponentInternalInstance; + break; + } + parent2 = parent2?.parent; + } + } + + if (!instance) { + throw new Error('useModal: needs args.parent or use in hooks'); + } + + return useModalInner( + asyncComponent, + modalPropsData, + defaultPopsData, + instance, + ); +}; diff --git a/src/components/BaseProgressBar/BaseProgressBar.vue b/src/components/BaseProgressBar/BaseProgressBar.vue new file mode 100644 index 0000000..29fb1d1 --- /dev/null +++ b/src/components/BaseProgressBar/BaseProgressBar.vue @@ -0,0 +1,61 @@ + + + + + + {{ progress }}% Funded + + + + + + + + + diff --git a/src/components/BaseProgressBar/index.sass b/src/components/BaseProgressBar/index.sass new file mode 100644 index 0000000..6b6f492 --- /dev/null +++ b/src/components/BaseProgressBar/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/BaseSkeleton/BaseSkeleton.vue b/src/components/BaseSkeleton/BaseSkeleton.vue index 86889f6..3df927c 100644 --- a/src/components/BaseSkeleton/BaseSkeleton.vue +++ b/src/components/BaseSkeleton/BaseSkeleton.vue @@ -21,45 +21,29 @@ defineProps({ /> - diff --git a/src/components/BaseSkeleton/index.sass b/src/components/BaseSkeleton/index.sass new file mode 100644 index 0000000..6b6f492 --- /dev/null +++ b/src/components/BaseSkeleton/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/BaseSpinner/BaseSpinner.vue b/src/components/BaseSpinner/BaseSpinner.vue index aed2ce9..cb5bf45 100644 --- a/src/components/BaseSpinner/BaseSpinner.vue +++ b/src/components/BaseSpinner/BaseSpinner.vue @@ -70,7 +70,8 @@ const circleSizeAttrs = computed(() => { - diff --git a/src/components/BaseStepper/index.sass b/src/components/BaseStepper/index.sass new file mode 100644 index 0000000..6b6f492 --- /dev/null +++ b/src/components/BaseStepper/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/BaseTable/BaseTable.vue b/src/components/BaseTable/BaseTable.vue index f2a9c35..ed8d22a 100644 --- a/src/components/BaseTable/BaseTable.vue +++ b/src/components/BaseTable/BaseTable.vue @@ -1,10 +1,18 @@ @@ -12,7 +20,7 @@ withDefaults(defineProps<{ @@ -44,15 +52,16 @@ withDefaults(defineProps<{ :deep(thead) th background: $table-thead-background-color - +font(500) + color: $table-tbody-th-color - :deep(td), :deep(th) - font-size: $table-th-td-font-size - line-height: $table-th-td-line-height - padding: $table-th-td-padding - +font(400) + font-size: $table-th-font-size + line-height: $table-th-line-height + padding: $table-th-padding + +font(800) text-align: left + @media screen and (max-width: 768) + padding: $table-th-padding-mobile :deep(tbody) border-style: none !important @@ -64,6 +73,13 @@ withDefaults(defineProps<{ td background: $table-tbody-tr-td-background-color +mt(.3s) + font-size: $table-td-font-size + line-height: $table-td-line-height + padding: $table-td-padding + +font(400) + text-align: left + @media screen and (max-width: 768) + padding: $table-td-padding-mobile &:hover td background: $table-tbody-td-hover-background-color diff --git a/src/components/BaseTable/index.sass b/src/components/BaseTable/index.sass index eb22511..0deae18 100644 --- a/src/components/BaseTable/index.sass +++ b/src/components/BaseTable/index.sass @@ -5,9 +5,17 @@ $table-thead-background-color: $white $table-tbody-tr-border-bottom-color: $gray-20 $table-tbody-tr-td-background-color: $white $table-tbody-td-background-color: $white -$table-tbody-td-color: $gray-60 +$table-tbody-td-color: $gray-80 +$table-tbody-th-color: $gray-60 $table-tbody-td-hover-background-color: $gray-10 -$table-th-td-font-size: 14px -$table-th-td-line-height: 19.6px -$table-th-td-padding: 12px +$table-td-font-size: 16px +$table-td-line-height: 26px +$table-td-padding: 16px +$table-td-padding-small: 12px +$table-td-padding-mobile: 12px +$table-th-font-size: 14px +$table-th-line-height: 21px +$table-th-padding: 16px +$table-th-padding-mobile: 12px +$table-th-padding-small: 12px diff --git a/src/components/BaseTag/BaseTag.vue b/src/components/BaseTag/BaseTag.vue index f2fcbc8..27fb2f4 100644 --- a/src/components/BaseTag/BaseTag.vue +++ b/src/components/BaseTag/BaseTag.vue @@ -57,16 +57,16 @@ const tagClasses = computed(() => { $root: & &.is--size-small padding: $base-tag-small-padding + color: $base-tag-small-color #{$root}__text font-weight: $base-tag-small-font-weight - color: $base-tag-small-color &.is--round border-radius: $base-tag-round-border-radius &.is--strong-text #{$root}__text font-weight: $base-tag-font-weight &.is--white-text - color: $base-tag-white-text-color + color: $base-tag-white-text-color !important &__text font-size: $base-tag-font-size font-weight: $base-tag-font-weight diff --git a/src/components/BaseTimeline/BaseTimeline.vue b/src/components/BaseTimeline/BaseTimeline.vue new file mode 100644 index 0000000..037ed5e --- /dev/null +++ b/src/components/BaseTimeline/BaseTimeline.vue @@ -0,0 +1,40 @@ + + + + + + + {{ title }} + + + + + + + diff --git a/src/components/BaseTimeline/BaseTimelineCard.vue b/src/components/BaseTimeline/BaseTimelineCard.vue new file mode 100644 index 0000000..71bd31d --- /dev/null +++ b/src/components/BaseTimeline/BaseTimelineCard.vue @@ -0,0 +1,168 @@ + + + + + + + + + {{ title }} + + + + + Duration: + + {{ duration }} + + + + + + + + + diff --git a/src/components/BaseTimeline/BaseTimelineCircle.vue b/src/components/BaseTimeline/BaseTimelineCircle.vue new file mode 100644 index 0000000..0fbe56e --- /dev/null +++ b/src/components/BaseTimeline/BaseTimelineCircle.vue @@ -0,0 +1,88 @@ + + + + + + + + + diff --git a/src/components/BaseTimeline/BaseTimelineItem.vue b/src/components/BaseTimeline/BaseTimelineItem.vue new file mode 100644 index 0000000..78ecf13 --- /dev/null +++ b/src/components/BaseTimeline/BaseTimelineItem.vue @@ -0,0 +1,126 @@ + + + + + + + + + {{ title }} + + + + + + + + + + diff --git a/src/components/BaseTimeline/assets/check.svg b/src/components/BaseTimeline/assets/check.svg new file mode 100644 index 0000000..0905853 --- /dev/null +++ b/src/components/BaseTimeline/assets/check.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/BaseTimeline/index.sass b/src/components/BaseTimeline/index.sass new file mode 100644 index 0000000..6b6f492 --- /dev/null +++ b/src/components/BaseTimeline/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/BaseTooltip/BaseTooltip.vue b/src/components/BaseTooltip/BaseTooltip.vue index d1e448f..96cfd0a 100644 --- a/src/components/BaseTooltip/BaseTooltip.vue +++ b/src/components/BaseTooltip/BaseTooltip.vue @@ -1,90 +1,37 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/components/BaseTooltip/index.sass b/src/components/BaseTooltip/index.sass new file mode 100644 index 0000000..6b6f492 --- /dev/null +++ b/src/components/BaseTooltip/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/BaseUploader/BaseUploader.vue b/src/components/BaseUploader/BaseUploader.vue new file mode 100644 index 0000000..73ef2c6 --- /dev/null +++ b/src/components/BaseUploader/BaseUploader.vue @@ -0,0 +1,240 @@ + + + + + + + + + Drag & drop files here or click to upload + + + + + Upload + + + + + + + {{ file.name }} + + + + × + + + + + + {{ filesUploadError }} + + + Supported files: pdf. Maximum size 100mb. + + + + + diff --git a/src/components/BaseUploader/file.svg b/src/components/BaseUploader/file.svg new file mode 100644 index 0000000..e2d2669 --- /dev/null +++ b/src/components/BaseUploader/file.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/BaseUploader/index.sass b/src/components/BaseUploader/index.sass new file mode 100644 index 0000000..6b6f492 --- /dev/null +++ b/src/components/BaseUploader/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/BaseUploader/upload.svg b/src/components/BaseUploader/upload.svg new file mode 100644 index 0000000..94046fb --- /dev/null +++ b/src/components/BaseUploader/upload.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/common/CardCheckmarked/CardCheckmarked.vue b/src/components/common/CardCheckmarked/CardCheckmarked.vue new file mode 100644 index 0000000..8536073 --- /dev/null +++ b/src/components/common/CardCheckmarked/CardCheckmarked.vue @@ -0,0 +1,94 @@ + + + + + + + + + + {{ title }} + + + + {{ description }} + + + + + diff --git a/src/components/common/CardCheckmarked/assets/check.svg b/src/components/common/CardCheckmarked/assets/check.svg new file mode 100644 index 0000000..b12af60 --- /dev/null +++ b/src/components/common/CardCheckmarked/assets/check.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/common/CardCheckmarked/index.sass b/src/components/common/CardCheckmarked/index.sass new file mode 100644 index 0000000..6b6f492 --- /dev/null +++ b/src/components/common/CardCheckmarked/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/common/CardCheckmarked/types.ts b/src/components/common/CardCheckmarked/types.ts new file mode 100644 index 0000000..95fc97b --- /dev/null +++ b/src/components/common/CardCheckmarked/types.ts @@ -0,0 +1,6 @@ + + +export interface ICardCheckmarked { + title: string; + description: string; +} diff --git a/src/components/common/SliderSwiper/SliderSwiper.vue b/src/components/common/SliderSwiper/SliderSwiper.vue new file mode 100644 index 0000000..0c18376 --- /dev/null +++ b/src/components/common/SliderSwiper/SliderSwiper.vue @@ -0,0 +1,79 @@ + + + + + + + +// scoped cannot add + diff --git a/src/components/common/SliderSwiper/index.sass b/src/components/common/SliderSwiper/index.sass new file mode 100644 index 0000000..6b6f492 --- /dev/null +++ b/src/components/common/SliderSwiper/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/common/SliderWithPaginationAutoPlay/SliderWithPaginationAutoPlay.vue b/src/components/common/SliderWithPaginationAutoPlay/SliderWithPaginationAutoPlay.vue new file mode 100644 index 0000000..e35e441 --- /dev/null +++ b/src/components/common/SliderWithPaginationAutoPlay/SliderWithPaginationAutoPlay.vue @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + diff --git a/src/components/common/SliderWithPaginationAutoPlay/index.sass b/src/components/common/SliderWithPaginationAutoPlay/index.sass new file mode 100644 index 0000000..6b6f492 --- /dev/null +++ b/src/components/common/SliderWithPaginationAutoPlay/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/common/WhatOurClientsSay/WhatOurClientsSay.vue b/src/components/common/WhatOurClientsSay/WhatOurClientsSay.vue new file mode 100644 index 0000000..45b9749 --- /dev/null +++ b/src/components/common/WhatOurClientsSay/WhatOurClientsSay.vue @@ -0,0 +1,69 @@ + + + + + + + + + + + + {{ title }} + + + {{ text }} + + + + + + + + diff --git a/src/components/common/WhatOurClientsSay/WhatOurClientsSaySlider.vue b/src/components/common/WhatOurClientsSay/WhatOurClientsSaySlider.vue new file mode 100644 index 0000000..3c8b159 --- /dev/null +++ b/src/components/common/WhatOurClientsSay/WhatOurClientsSaySlider.vue @@ -0,0 +1,112 @@ + + + + + + + + + + {{ active?.text1 }} + + + {{ active?.author1 }} + + + + + + + + + {{ active?.text2 }} + + + {{ active?.author2 }} + + + + + + + + + diff --git a/src/components/common/WhatOurClientsSay/index.sass b/src/components/common/WhatOurClientsSay/index.sass new file mode 100644 index 0000000..6b6f492 --- /dev/null +++ b/src/components/common/WhatOurClientsSay/index.sass @@ -0,0 +1,2 @@ +@import 'UiKit/styles/_colors.sass' +@import 'UiKit/styles/_global.sass' diff --git a/src/components/common/WhatOurClientsSay/utils.ts b/src/components/common/WhatOurClientsSay/utils.ts new file mode 100644 index 0000000..5752fe3 --- /dev/null +++ b/src/components/common/WhatOurClientsSay/utils.ts @@ -0,0 +1,39 @@ + +export const WhatOurClientsSayTitle = 'What Our Clients Have to Say'; +export const WhatOurClientsSayText = 'From small businesses to large enterprises, our software solutions have helped many clients' + + 'streamline their operations, boost productivity, and achieve their goals.'; + +export const WhatOurClientsSaySlider = [ + { + id: 1, + text1: '“The development work delivered by Webdevelop PRO completely exceeded the ' + + 'client’s expectations for the project and enabled them to successfully launch ' + + 'and maintain their platform. Their team is dedicated to the long-term quality ' + + 'of what they create and put effort into meeting all deadlines.”', + author1: 'Ken Staut, Head of Corporate Development at Yieldstreet', + text2: '“Outstanding partnership with Webdevelop. Exceptional full-stack expertise ' + + 'tailored to our crypto needs. On-time delivery, cost-efficient, and superb ' + + 'post-launch support. A crucial asset for our growth. Highly recommend for any complex project.”', + author2: 'Howard Krieger, CEO at Unfederal Reserve', + }, + { + id: 2, + text1: '“Webdevelop PRO help us to build platform from scratch, affordably and efficiently. ' + + 'Their approach ensured that tech solutions perfectly aligned with our operational needs. Their ' + + 'helped us to allocate resources smartly. A transformative partnership we highly recommend.”', + author1: 'Leon Stiel, Head of Equities Risk Technology at Millennium', + text2: '“High-quality tech solutions at great value. Made complex tech simple for us, boosting ' + + 'our retail operations. A game-changer in quality-to-cost ratio.”', + author2: 'Ulrich Kratz, Co-Founder & CEO unybrands', + }, + { + id: 3, + text1: '“Exceptional full-stack capabilities enabled rapid project completion. Their end-to-end ' + + 'solution saved time, letting us focus on AI innovations. Essential partner for accelerated growth.”', + author1: 'Ryan Medlin, Speechlab.ai Head of Engineering', + text2: '“As a result of Webdevelop PRO’s work, I saw an improvement in page load time and a reduction in ' + + 'the bounce rate. Team was quick to act, understanding, and innovative. They brought great ideas to ' + + 'the table that added value to the project.”', + author2: 'Rick Richman, CEO at FirePie ', + }, +]; diff --git a/src/helpers/blocked-body.ts b/src/helpers/blocked-body.ts new file mode 100644 index 0000000..154d027 --- /dev/null +++ b/src/helpers/blocked-body.ts @@ -0,0 +1,55 @@ + +// https://stackoverflow.com/a/13382873 +const getScrollbarWidth = () => { + const outer = document.createElement('div'); + outer.style.visibility = 'hidden'; + outer.style.overflow = 'scroll'; + document.body.appendChild(outer); + + const inner = document.createElement('div'); + outer.appendChild(inner); + + const scrollbarWidth = (outer.offsetWidth - inner.offsetWidth); + + outer.parentNode?.removeChild(outer); + + return scrollbarWidth; +}; + + +const scrollbarVisible = (element: HTMLElement) => ( + element.scrollHeight > element.clientHeight +); + + +// from https://css-tricks.com/prevent-page-scrolling-when-a-modal-is-open/ + +let counter = 0; + +export const unBlockedBody = () => { + counter -= 1; + + if (counter) return; + const { style } = document.body; + style.paddingRight = ''; + style.overflow = ''; + style.backgroundColor = ''; +}; + +export const blockedBody = () => { + counter += 1; + + if (counter === 1) { + const { style } = document.body; + + if (scrollbarVisible(document.body)) { + const width = getScrollbarWidth(); + style.paddingRight = `${width}px`; + style.backgroundColor = '#f1f4fc'; // 'whitesmoke'; + } + + style.overflow = 'hidden'; + } + + return () => unBlockedBody(); +}; diff --git a/src/styles/_fonts.sass b/src/styles/_fonts.sass index 0b9189e..266c029 100644 --- a/src/styles/_fonts.sass +++ b/src/styles/_fonts.sass @@ -177,6 +177,7 @@ h6 text-decoration: underline transition: 0.3s all ease-in-out color: $primary + cursor: pointer &:hover text-decoration: none .is--link-2 @@ -186,10 +187,21 @@ h6 text-decoration: underline transition: 0.3s all ease-in-out color: $primary + cursor: pointer &:hover text-decoration: none .is--h1__mobile +font(900) font-size: 38px font-style: normal - line-height: 57px \ No newline at end of file + line-height: 57px +.is--link-regular + +font(800) + font-size: 14px + line-height: 21px + text-decoration: underline + transition: 0.3s all ease-in-out + color: $primary + cursor: pointer + &:hover + text-decoration: none \ No newline at end of file diff --git a/src/styles/_global.sass b/src/styles/_global.sass index 21e54d2..2f9b0a3 100644 --- a/src/styles/_global.sass +++ b/src/styles/_global.sass @@ -11,4 +11,9 @@ $box-shadow-large: 0 6px 7px -4px rgba(18, 22, 31, 0.05), 0 10px 32px 4px rgba(1 border-radius: 2px background: $white box-shadow: $box-shadow-medium - \ No newline at end of file + +.is--table-cell + display: flex + padding: 16px + align-items: center + gap: 16px \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 9953a98..1e39351 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1439,16 +1439,6 @@ __metadata: languageName: node linkType: hard -"@dafcoe/vue-collapsible-panel@npm:^0.2.0": - version: 0.2.0 - resolution: "@dafcoe/vue-collapsible-panel@npm:0.2.0" - dependencies: - "@types/uuid": ^8.3.0 - uuid: ^8.3.2 - checksum: 470017c8058a4e4cdc40b0d2e42593ec0cf3177707977809a21c9f5fd34590600f8518fb0abbf50c533837b57362da20662efafbd924e9944e74b0c6bc485572 - languageName: node - linkType: hard - "@discoveryjs/json-ext@npm:^0.5.3": version: 0.5.7 resolution: "@discoveryjs/json-ext@npm:0.5.7" @@ -3442,6 +3432,16 @@ __metadata: languageName: node linkType: hard +"@swoga/vue-collapsible-panel@npm:^0.3.0": + version: 0.3.0 + resolution: "@swoga/vue-collapsible-panel@npm:0.3.0" + dependencies: + "@types/uuid": ^8.3.0 + uuid: ^8.3.2 + checksum: a47725f514ff1c488040992c5ac5245a0bd7d714792f0ac6e588e0480c932b587d3769dd0fed42b990b819573d4f65aebed53e3aa5463f2666c8d48c58fc2a4c + languageName: node + linkType: hard + "@testing-library/dom@npm:^9.0.0": version: 9.3.4 resolution: "@testing-library/dom@npm:9.3.4" @@ -3822,6 +3822,13 @@ __metadata: languageName: node linkType: hard +"@types/web-bluetooth@npm:^0.0.20": + version: 0.0.20 + resolution: "@types/web-bluetooth@npm:0.0.20" + checksum: d6d61da683e876e8995ac57e2e5229d829d0f536deb3568d4430898fc626ebcb7e065fe7f655ac6a5205702f7f7049e6335abe689cd5291241eef6e39e8a4371 + languageName: node + linkType: hard + "@types/yargs-parser@npm:*": version: 21.0.3 resolution: "@types/yargs-parser@npm:21.0.3" @@ -4016,6 +4023,34 @@ __metadata: languageName: node linkType: hard +"@vueuse/core@npm:^10.9.0": + version: 10.9.0 + resolution: "@vueuse/core@npm:10.9.0" + dependencies: + "@types/web-bluetooth": ^0.0.20 + "@vueuse/metadata": 10.9.0 + "@vueuse/shared": 10.9.0 + vue-demi: ">=0.14.7" + checksum: 6d26660e4e88e2e6b34f84cb832d919d296a198e6c7f8ef93fb5d0442b53ba3872c617c1144190328992b44dde33a8e249b3182ac35128d460a457488a6df940 + languageName: node + linkType: hard + +"@vueuse/metadata@npm:10.9.0": + version: 10.9.0 + resolution: "@vueuse/metadata@npm:10.9.0" + checksum: e381d3134e1a5965e157503ddb1187f671316386ab0c779d3fc1b9c91d6658086c417414f4642554382ac43fd800d7565f5f25824b678433f937a917e931387e + languageName: node + linkType: hard + +"@vueuse/shared@npm:10.9.0": + version: 10.9.0 + resolution: "@vueuse/shared@npm:10.9.0" + dependencies: + vue-demi: ">=0.14.7" + checksum: e6fc1e04aa63ead37694b5543cacd8c1b55ade5ce7416699302a4db5e5c3c083b7ecda9156445e07a477eb86664740d368a03584b55859dbe0cf0abbec3e21ab + languageName: node + linkType: hard + "@yarnpkg/esbuild-plugin-pnp@npm:^3.0.0-rc.10": version: 3.0.0-rc.15 resolution: "@yarnpkg/esbuild-plugin-pnp@npm:3.0.0-rc.15" @@ -4373,7 +4408,6 @@ __metadata: version: 0.0.0-use.local resolution: "base-components@workspace:." dependencies: - "@dafcoe/vue-collapsible-panel": ^0.2.0 "@storybook/addon-essentials": ^7.6.17 "@storybook/addon-interactions": ^7.6.17 "@storybook/addon-links": ^7.6.17 @@ -4381,13 +4415,16 @@ __metadata: "@storybook/testing-library": ^0.2.2 "@storybook/vue3": ^7.6.17 "@storybook/vue3-vite": ^7.6.17 + "@swoga/vue-collapsible-panel": ^0.3.0 "@vitejs/plugin-vue": ^5.0.4 "@vue/compiler-core": ^3.4.19 + "@vueuse/core": ^10.9.0 maska: ^2.1.11 react: ^18.2.0 react-dom: ^18.2.0 sass: ^1.71.1 storybook: ^7.6.17 + swiper: ^11.1.1 typescript: ^5.3.3 vite: ^5.1.4 vite-svg-loader: ^5.1.0 @@ -9445,6 +9482,13 @@ __metadata: languageName: node linkType: hard +"swiper@npm:^11.1.1": + version: 11.1.1 + resolution: "swiper@npm:11.1.1" + checksum: fb3b12034f94036a32c3d229cc2a630d281d56100ec78f948a69d7a49892f6c744291e2a2c6ed89c0058dcb8718c24cc8535194c4a1e42f4de4f59c961472ee1 + languageName: node + linkType: hard + "synchronous-promise@npm:^2.0.15": version: 2.0.17 resolution: "synchronous-promise@npm:2.0.17" @@ -10027,6 +10071,22 @@ vue-component-type-helpers@latest: languageName: node linkType: hard +"vue-demi@npm:>=0.14.7": + version: 0.14.7 + resolution: "vue-demi@npm:0.14.7" + peerDependencies: + "@vue/composition-api": ^1.0.0-rc.1 + vue: ^3.0.0-0 || ^2.6.0 + peerDependenciesMeta: + "@vue/composition-api": + optional: true + bin: + vue-demi-fix: bin/vue-demi-fix.js + vue-demi-switch: bin/vue-demi-switch.js + checksum: 6819b1cd52355047ae899d7cdfa32f1b00e806e6c67455601d33ab0226f3172c48a5f6c3d547cb7fa32925b3b7100448bf18f98ea4d5f8bc4b9d28ae005a805d + languageName: node + linkType: hard + "vue-docgen-api@npm:^4.40.0": version: 4.75.1 resolution: "vue-docgen-api@npm:4.75.1"
+ {{ filesUploadError }} +
+ {{ text }} +
+ {{ active?.text1 }} +
+ {{ active?.text2 }} +