spoko-design-system 0.2.84 → 0.2.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/astro.config.mjs +4 -68
- package/icon.config.ts +225 -0
- package/package.json +9 -5
- package/src/components/Badges.vue +1 -1
- package/src/components/Category/CategoriesCarousel.astro +1 -1
- package/src/components/Category/CategoryDetails.astro +73 -42
- package/src/components/Category/CategoryViewToggler.astro +107 -0
- package/src/components/Header/Header.astro +1 -1
- package/src/components/Modal.astro +1 -1
- package/src/components/Product/ProductDetails.vue +1 -1
- package/src/components/Product/ProductLink.astro +1 -1
- package/src/components/Product/ProductLink.vue +1 -1
- package/src/design.config.ts +76 -58
- package/src/pages/components/card.mdx +6 -6
- package/src/pages/components/icons.astro +126 -38
- package/src/pages/components/input.mdx +4 -4
- package/src/styles/_variables.scss +2 -2
- package/src/styles/content.css +1 -1
- package/src/uno-config/index.ts +59 -0
- package/src/uno-config/theme/breakpoints.ts +10 -0
- package/src/uno-config/theme/colors.ts +67 -0
- package/src/uno-config/theme/dimensions.ts +18 -0
- package/src/uno-config/theme/effects.ts +15 -0
- package/src/uno-config/theme/grid.ts +11 -0
- package/src/uno-config/theme/index.ts +26 -0
- package/src/uno-config/theme/shortcuts/buttons.ts +36 -0
- package/src/uno-config/theme/shortcuts/components.ts +62 -0
- package/src/uno-config/theme/shortcuts/index.ts +15 -0
- package/src/uno-config/theme/shortcuts/layout.ts +55 -0
- package/src/uno-config/theme/typography.ts +30 -0
- package/uno.config.ts +3 -250
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// theme/grid.ts
|
|
2
|
+
export const gridTemplates = {
|
|
3
|
+
columns: {
|
|
4
|
+
16: 'repeat(16, minmax(0, 1fr))',
|
|
5
|
+
product: '15rem 20rem minmax(15rem, 1fr)',
|
|
6
|
+
productGrid: '15rem minmax(20rem, 1fr)',
|
|
7
|
+
productGalleryDesktop: 'calc(100% - 14% - 0.9375rem) 14%',
|
|
8
|
+
replacement: '6.25rem 12rem auto',
|
|
9
|
+
'details-desktop': '12.5rem calc(100% - 12.5rem - 1rem)'
|
|
10
|
+
}
|
|
11
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// uno-config/theme/index.ts
|
|
2
|
+
import { colors } from './colors';
|
|
3
|
+
import { typography } from './typography';
|
|
4
|
+
import { breakpoints } from './breakpoints';
|
|
5
|
+
import { dimensions } from './dimensions';
|
|
6
|
+
import { effects } from './effects';
|
|
7
|
+
import { gridTemplates } from './grid';
|
|
8
|
+
|
|
9
|
+
export const theme = {
|
|
10
|
+
colors,
|
|
11
|
+
...typography,
|
|
12
|
+
...dimensions,
|
|
13
|
+
...effects,
|
|
14
|
+
gridTemplateColumns: gridTemplates.columns,
|
|
15
|
+
breakpoints,
|
|
16
|
+
screens: breakpoints,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
colors,
|
|
21
|
+
typography,
|
|
22
|
+
breakpoints,
|
|
23
|
+
dimensions,
|
|
24
|
+
effects,
|
|
25
|
+
gridTemplates,
|
|
26
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// shortcuts/buttons.ts
|
|
2
|
+
export const buttonShortcuts = [
|
|
3
|
+
// Primary buttons
|
|
4
|
+
['btn-primary', 'bg-accent-lightest border border-transparent hover:bg-accent-light inline-flex items-center justify-center shadow text-base text-blue-darker'],
|
|
5
|
+
['btn-primary-outline', 'border-accent-light border font-medium inline-flex items-center justify-center shadow text-base text-accent-default transition-all hover:(bg-accent-light text-white)'],
|
|
6
|
+
|
|
7
|
+
// Secondary buttons
|
|
8
|
+
['btn-secondary', 'bg-neutral-dark border border-transparent hover:bg-neutral-darker inline-flex items-center justify-center shadow text-base text-white'],
|
|
9
|
+
['btn-secondary-outline', 'border-neutral-dark border text-neutral-dark font-medium inline-flex items-center justify-center shadow text-base hover:(text-white bg-neutral-dark)'],
|
|
10
|
+
|
|
11
|
+
// Tertiary buttons
|
|
12
|
+
['btn-tertiary', 'inline-flex border border-transparent items-center font-medium text-center text-white bg-blue-darker hover:bg-accent-darker focus:ring-4 focus:outline-none focus:ring-blue-light'],
|
|
13
|
+
['btn-tertiary-outline', 'inline-flex border items-center font-medium text-center text-blue-darker border-blue-darker transition-colors focus:(ring-2 outline-none ring-blue-light)'],
|
|
14
|
+
|
|
15
|
+
// Utility buttons
|
|
16
|
+
['btn-text', 'text-neutral-dark border border-transparent hover:underline transition-all'],
|
|
17
|
+
['btn-tag', 'bg-blue-ultralight text-blue-darker font-medium mr-2 dark:bg-neutral-darker dark:text-blue-light border border-blue-default hover:border-blue-medium justify-center'],
|
|
18
|
+
|
|
19
|
+
// Size variants
|
|
20
|
+
['btn-normal', 'md:px-10 md:py-2 md:text-lg px-8 py-3 whitespace-nowrap'],
|
|
21
|
+
['btn-sm', 'px-6 py-2 text-sm whitespace-nowrap'],
|
|
22
|
+
['btn-xs', 'px-4 py-1 text-sm whitespace-nowrap'],
|
|
23
|
+
|
|
24
|
+
// Hover variants
|
|
25
|
+
['btn-white-hover', 'hover:(text-blue-darker bg-white border-blue-darker)'],
|
|
26
|
+
['btn-light-hover', 'hover:(text-blue-darker bg-accent-lightest border-accent-lightest)'],
|
|
27
|
+
['btn-medium-hover', 'hover:(text-white bg-brand-primary border-brand-primary)'],
|
|
28
|
+
['btn-dark-hover', 'hover:(bg-blue-darker text-white border-blue-darker)'],
|
|
29
|
+
|
|
30
|
+
['btn-copy', 'leading-none opacity-10 hover:opacity-80 ml-auto w-6 h-6 -right-7 sm:(h-4 w-4 -right-5) absolute'],
|
|
31
|
+
['btn-copy-text', 'shadow-sm py-0.5 px-1 bg-gray-100 -ml-1 -mt-4 text-xxs whitespace-nowrap'],
|
|
32
|
+
|
|
33
|
+
['btn-prcode', 'relative inline-block text-center leading-none px-1 py-0.5 mr-1 cursor-pointer font-mono border-solid border-1 border-gray-200 select-none text-gray-500 last:mr-0 not-last:mr-2 not-last:after:content-[+] after:(text-blue-700 absolute w-4 pl-0.5)']
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
];
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// shortcuts/components.ts
|
|
2
|
+
export const componentShortcuts = [
|
|
3
|
+
// Product related
|
|
4
|
+
['product-row', 'bg-white flex flex-wrap odd:(pr-2.5 pl-3.5 sm:px-0) even:(pl-2.5 pr-3.5 sm:px-0) w-1/2 sm:w-auto sm:grid sm:grid-cols-3 gap-x-1 gap-y-0 md:(grid-cols-product gap-x-4) justify-start content-start content-start place-content-start py-4 pb-6 sm:pb-4'],
|
|
5
|
+
['product-row__photo', 'aspect-ratio-[4/3] mb-2 sm:mb-0 after:(content-empty bg-black bg-opacity-[.03] absolute w-full h-full top-0) w-100 col-span-1 row-span-3 max-w-full text-left overflow-hidden relative bg-neutral-lightest md:(col-span-1 row-span-1) box-content'],
|
|
6
|
+
['product-row__description', 'text-xs text-slate-darkest dark:text-neutral-light leading-tight mt-2 font-textlight line-clamp-3 whitespace-normal md:(text-sm mt-0 font-textregular whitespace-pre-wrap)'],
|
|
7
|
+
['product-row__main', 'w-full sm:w-auto col-span-2 leading-none relative sm:pl-1 md:(pl-0 row-start-1 col-start-2 col-span-1)'],
|
|
8
|
+
['product-number', 'font-novamono content-center flex flex-wrap flex-col content-start pr-5 bg-white'],
|
|
9
|
+
['p-number', 'inline-flex leading-none relative'],
|
|
10
|
+
['tooltip', 'invisible absolute'],
|
|
11
|
+
['has-tooltip', 'hover:(visible z-50)'],
|
|
12
|
+
['product-code', 'text-blue-light mr-1 leading-none tracking-wide select-all'],
|
|
13
|
+
['product-info', 'text-slate-medium text-xxs font-textlight leading-none mt-0.5 md:(mt-0 text-xs)'],
|
|
14
|
+
['product-date', 'inline-block text-xxs md:text-xs leading-none mt-1 md:(mt-4 mb-1) mr-2'],
|
|
15
|
+
['product-thumb', 'h-full w-full object-cover object-center transform scale-100 group-hover:scale-110 absolute inset-0 will-change-transform bg-neutral-lightest'],
|
|
16
|
+
['product-thumb--plp', 'aspect-ratio-[4/3] flex items-center flex justify-center mb-3 sm:mb-0 after:(content-empty bg-black bg-opacity-[.03] absolute w-full h-full top-0)'],
|
|
17
|
+
['product-link--related', 'relative flex w-full bg-white dark:bg-accent-deepBlue after:absolute after:bg-accent-light after:w-full after:left-0 after:h-px after:-bottom-2 after:content-empty after:scale-x-0 after:transition-transform-300 after:origin-top-right hover:after:origin-top-left hover:after:scale-x-100'],
|
|
18
|
+
['product-model', 'font-400'],
|
|
19
|
+
['product-button', 'text-blue-500 cursor-pointer text-base leading-none inline-flex items-center justify-center w-8 h-8 min-w-8 transition-colors duration-150 bg-white dark:bg-accent-deepBlue focus:(text-blue-500) hover:(text-blue-500)'],
|
|
20
|
+
|
|
21
|
+
// Category related
|
|
22
|
+
['category-section', 'pb-4 w-full bg-white mb-4 overflow-x-hidden flex flex-wrap max-w-full'],
|
|
23
|
+
['category-tile', 'flex-wrap sm:flex-nowrap content-between w-64 min-w-64 lg:(w-28.57% min-w-28.57%) 2xl:(w-24.09% min-w-24.09%) 3xl:(w-19.60% min-w-19.60%) flex ml-1 lg:ml-1.5 first:ml-4'],
|
|
24
|
+
['category-toggler', 'sm:bg-opacity-20 pt-1 flex-inline items-center justify-center hover:text-light-blue-500 text-neutral-light hover:text-blue-500 px-4 leading-7 pb-0.5 md:pl-0'],
|
|
25
|
+
['category-link', 'w-full sm:w-auto text-neutral-default hover:(bg-gray-50 sm:bg-inherit) py-2 sm:py-0 text-lg font-medium text-left px-3 block sm:(text-base leading-4 mb-1.5) md:(px-4 py-1 table-cell)'],
|
|
26
|
+
['category-carousel__link', 'uppercase ml-auto px-4 text-xs flex items-center mt-3 hover:underline'],
|
|
27
|
+
|
|
28
|
+
// Navigation
|
|
29
|
+
['nav-link', 'text-slate-medium hover:bg-blue-darker hover:text-white px-3 py-3.5 md:py-1 rounded-full text-sm font-medium'],
|
|
30
|
+
['btn-navigation', 'bg-white drop-shadow-md rounded-full border flex items-center justify-center w-1/2 h-12 bottom-1 z-2 md:(bg-white/90 text-inherit hover:(text-light-blue-500 bg-white))'],
|
|
31
|
+
['btn-navigation__active', 'border border-transparent md:(border-neutral-lighter focus:ring-0) font-medium text-white bg-blue-darker hover:bg-accent-darker focus:ring-2 focus:outline-none focus:ring-blue-300'],
|
|
32
|
+
|
|
33
|
+
// Carousel
|
|
34
|
+
['carousel-tile', 'w-52 min-w-52 flex ml-1 lg:ml-1.5'],
|
|
35
|
+
['carousel-product-tile', 'flex flex-wrap sm:flex-nowrap content-between w-64 min-w-64 lg:(w-28.57% min-w-28.57%) 2xl:(w-24.09% min-w-24.09%) relative'],
|
|
36
|
+
['carousel-item', 'w-full w-full group-hover:filter-invert relative flex flex-col'],
|
|
37
|
+
['carousel-big', 'shadow-[inset_0_10px_60px_-15px_rgba(0,0,0,0.1)] w-full h-full'],
|
|
38
|
+
|
|
39
|
+
// PDP (Product Detail Page)
|
|
40
|
+
['pdp-headline', 'text-2xl mb-4 sm:(font-normal mb-6 text-4xl) lg:pr-0 2xl:text-5xl font-headbold text-black font-bold pr-7 pt-0 leading-none'],
|
|
41
|
+
['pdp-detail-row', 'text-sm mt-1 md:mt-4 mb-4 grid grid-cols-2 sm:(grid-cols-details-desktop grid-flow-col auto-cols-max) gap-4'],
|
|
42
|
+
['pdp-slider-thumb', 'block h-22.5 w-31 min-w-31 mb-2'],
|
|
43
|
+
|
|
44
|
+
// PLP (Product List Page)
|
|
45
|
+
['plp-name', 'flex items-center leading-none font-headregular cursor-pointer sm:pr-6 md:pr-12'],
|
|
46
|
+
['plp-desc', 'hidden sm:block col-span-3 md:col-span-1 md:col-start-3 relative px-2 sm:px-0'],
|
|
47
|
+
['plp-materials', 'text-xs md:text-sm text-slate-darkest dark:text-neutral-light leading-tight font-textlight md:font-textregular whitespace-normal md:whitespace-pre-wrap'],
|
|
48
|
+
['plp-b-desc', 'pb-4 bg-white text-base flex flex-wrap mt-6'],
|
|
49
|
+
['plp-icons', 'absolute top-0 -right-2 md:(top-0.5 right-0) w-12 bottom-auto flex justify-end text-sm'],
|
|
50
|
+
['plp-replacements', 'col-span-3 md:col-span-1 md:col-start-2 text-xs mt-3 md:mt-4'],
|
|
51
|
+
|
|
52
|
+
// Miscellaneous
|
|
53
|
+
['flag-ua', 'inline-block text-4xl w-6 h-3.5 min-w-[1.25rem] mr-3 bg-gradient-to-b stops-[#0057b7_50%,50%,#ffd700_100%]'],
|
|
54
|
+
['engine-info', 'absolute z-20 inline-block w-56 text-xs font-light text-slate-medium transition-opacity duration-300 bg-white border border-neutral-lighter rounded-lg shadow-sm dark:text-neutral-default dark:border-slate-default dark:bg-slate-darker bottom-full mb-2 invisible opacity-0 group-hover:(opacity-100 visible -left-full before:left-9) before:(absolute w-0 h-0 -bottom-3 border-l-transparent border-r-transparent border-t-neutral-lightest dark:border-t-slate-dark border-l-10 border-r-10 border-t-10 content-empty)'],
|
|
55
|
+
['engine-code', 'underline decoration-dotted underline-offset-4 py-0.5 decoration-neutral-light group-hover:(decoration-blue-500 dark:decoration-accent-light)'],
|
|
56
|
+
['number-secondary', 'block absolute inset-0 text-slate-medium select-all bg-white dark:bg-accent-deepBlue'],
|
|
57
|
+
['code-formatted', 'leading-none mt-0 relative text-xs'],
|
|
58
|
+
|
|
59
|
+
// Badges
|
|
60
|
+
['badge', 'px-1.5 py-px text-white text-xs mb-1 max-w-fit whitespace-nowrap'],
|
|
61
|
+
|
|
62
|
+
];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// shortcuts/index.ts
|
|
2
|
+
import type { UserShortcuts } from 'unocss'
|
|
3
|
+
import { buttonShortcuts } from './buttons';
|
|
4
|
+
import { layoutShortcuts } from './layout';
|
|
5
|
+
import { componentShortcuts } from './components';
|
|
6
|
+
|
|
7
|
+
const convertToShortcuts = (shortcuts: string[][]): UserShortcuts => {
|
|
8
|
+
return Object.fromEntries(shortcuts.map(([name, value]) => [name, value]));
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const shortcuts: UserShortcuts = {
|
|
12
|
+
...convertToShortcuts(buttonShortcuts),
|
|
13
|
+
...convertToShortcuts(layoutShortcuts),
|
|
14
|
+
...convertToShortcuts(componentShortcuts)
|
|
15
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// shortcuts/layout.ts
|
|
2
|
+
export const layoutShortcuts = [
|
|
3
|
+
// Main Layout
|
|
4
|
+
['l-main', 'text-slate-dark pt-24 sm:pt-14 bg-white'],
|
|
5
|
+
['main', 'text-slate-dark dark:text-neutral-lighter dark:bg-blue-darker pt-24 sm:pt-14 relative'],
|
|
6
|
+
['nav', 'bg-white dark:bg-black absolute sm:fixed w-full top-0 z-41 mx-auto px-4 pt-1 h-24 flex shadow-md justify-between items-center flex-wrap sm:(flex-nowrap pt-0 h-14) max-w-screen print-hidden'],
|
|
7
|
+
|
|
8
|
+
// View Toggles
|
|
9
|
+
['view-grid', 'grid grid-cols-2'],
|
|
10
|
+
['view-list', 'flex flex-col gap-4'],
|
|
11
|
+
|
|
12
|
+
// Containers
|
|
13
|
+
['products-container', 'products-wrapper'],
|
|
14
|
+
['products-wrapper', 'bg-white sm:(divide-y-1 divide-solid) divide-neutral-lighter mb-4 w-full mb-auto md:(pl-4 px-2 -mt-3)'],
|
|
15
|
+
['product-list', 'flex flex-wrap sm:block products-wrapper'],
|
|
16
|
+
['products-grid', 'flex w-full flex-nowrap items-center pr-4 md:grid grid-rows-1 overflow-hidden grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4 3xl:grid-cols-5 max-h-[6rem]'],
|
|
17
|
+
['similar-products', 'flex items-center space-y-4 gap-8 flex-wrap px-4 md:grid grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4 3xl:grid-cols-5'],
|
|
18
|
+
['similar-section', 'bg-white w-full drop-shadow-xl'],
|
|
19
|
+
['search-container', 'mb-2 sm:mb-0'],
|
|
20
|
+
|
|
21
|
+
// Category Menu
|
|
22
|
+
['cat-menu', 'fixed h-21 bottom-[-6px] w-full z-10 border-t-1 border-neutral-light bg-white dark:bg-blue-darkest text-center sm:(static z-auto border-t-none h-28)'],
|
|
23
|
+
['cat-card', 'p-4 text-base break-inside-avoid-column'],
|
|
24
|
+
['cat-name', 'mt-2 h-[2em] text-xs leading-none group-hover:filter-invert 3xl:text-3.25'],
|
|
25
|
+
['cats-slide', 'transition duration-300 ease-linear mb-0.5 min-h-tile-mobile sm:(min-h-tile h-tile mb-2 p-3) text-black dark:text-white hover:(text-white even:bg-blue-medium odd:bg-accent-light) cursor-pointer flex items-center flex-col justify-center transition ease-in-out duration-700 px-1.5 cursor-grab active:cursor-grabbing overflow-hidden'],
|
|
26
|
+
['cats-img', 'max-w-full h-8 md:h-icon object-contain object-center w-full left-0 right-0 top-0 bottom-0'],
|
|
27
|
+
|
|
28
|
+
// Sidebars and Navigation
|
|
29
|
+
['sidebar-title', 'font-headregular text-light-blue-500 text-xl md:(text-2xl px-4) mb-2 px-14 sm:px-3 flex items-center justify-center sm:justify-start py-3'],
|
|
30
|
+
['subcat', 'text-3.75 block cursor-pointer text-light-blue-darker hover:(text-accent-default underline) md:mb-1 py-2 md:py-0'],
|
|
31
|
+
['subsubcat', 'pl-2'],
|
|
32
|
+
|
|
33
|
+
// Headers and Banners
|
|
34
|
+
['headline', 'font-headlight font-bold'],
|
|
35
|
+
['headline-light', 'font-headlight font-300 tracking-tight'],
|
|
36
|
+
['slimbanner', 'px-4 sm:px-8 flex items-center justify-center text-xs sm:text-base leading-none relative bg-gray-50 z-2 px-4 py-3 sm:(text-base px-8) text-blue-darker print-hidden'],
|
|
37
|
+
|
|
38
|
+
// Image Styles
|
|
39
|
+
['img--overlay', 'after:(content-empty bg-black bg-opacity-[.03] absolute w-full h-full top-0)'],
|
|
40
|
+
['img--4/3', 'aspect-[4/3] relative object-cover bg-neutral-lightest h-auto max-w-full'],
|
|
41
|
+
['img--3/4', 'aspect-[3/4] relative object-cover bg-neutral-lightest h-auto max-w-full'],
|
|
42
|
+
['img--1/1', 'aspect-square relative object-cover bg-neutral-lightest h-auto max-w-full'],
|
|
43
|
+
['img--3/2', 'aspect-[3/2] relative object-cover bg-neutral-lightest h-auto max-w-full'],
|
|
44
|
+
['img--2/3', 'aspect-[2/3] relative object-cover bg-neutral-lightest h-auto max-w-full'],
|
|
45
|
+
['img--3/1', 'aspect-[3/1] relative object-cover bg-neutral-lightest h-auto max-w-full'],
|
|
46
|
+
['img--16/9', 'aspect-video relative object-cover bg-neutral-lightest h-auto max-w-full'],
|
|
47
|
+
['img--small', 'h-full w-60 sm:(w-22) xl:(w-30)'],
|
|
48
|
+
['img--medium', 'h-full w-60'],
|
|
49
|
+
|
|
50
|
+
// Utility
|
|
51
|
+
['close-light', '@apply before:bg-white after:bg-white'],
|
|
52
|
+
['close-dark', '@apply before:bg-black after:bg-black'],
|
|
53
|
+
['colon-after', 'after:content-[":"]'],
|
|
54
|
+
['adsbygoogle', 'w-full text-center'],
|
|
55
|
+
];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// theme/typography.ts
|
|
2
|
+
interface FontFamily {
|
|
3
|
+
[key: string]: string[];
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
interface FontSize {
|
|
7
|
+
[key: string]: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Typography {
|
|
11
|
+
fontFamily: FontFamily;
|
|
12
|
+
fontSize: FontSize;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const typography: Typography = {
|
|
16
|
+
fontFamily: {
|
|
17
|
+
sans: ['vw_textregular', 'system-ui', 'ui-sans-serif'],
|
|
18
|
+
novamono: ['Nova Mono'],
|
|
19
|
+
mono: ['Nova Mono'],
|
|
20
|
+
headlight: ['vw_headlight', 'system-ui'],
|
|
21
|
+
headregular: ['vw_headregular'],
|
|
22
|
+
headbold: ['vw_headbold'],
|
|
23
|
+
textlight: ['vw_textlight'],
|
|
24
|
+
textregular: ['vw_textregular'],
|
|
25
|
+
textbold: ['vw_textbold']
|
|
26
|
+
},
|
|
27
|
+
fontSize: {
|
|
28
|
+
xxs: '.625rem',
|
|
29
|
+
}
|
|
30
|
+
};
|
package/uno.config.ts
CHANGED
|
@@ -1,251 +1,4 @@
|
|
|
1
|
-
// uno.config.ts
|
|
2
|
-
import {
|
|
3
|
-
defineConfig,
|
|
4
|
-
transformerVariantGroup,
|
|
5
|
-
presetAttributify,
|
|
6
|
-
presetIcons,
|
|
7
|
-
presetTypography,
|
|
8
|
-
presetUno,
|
|
9
|
-
presetWebFonts,
|
|
10
|
-
transformerDirectives,
|
|
11
|
-
} from 'unocss'
|
|
1
|
+
// uno.config.ts w projekcie
|
|
2
|
+
import { createSdsConfig } from 'uno-config';
|
|
12
3
|
|
|
13
|
-
export default
|
|
14
|
-
transformers: [
|
|
15
|
-
transformerDirectives(),
|
|
16
|
-
transformerVariantGroup(),
|
|
17
|
-
],
|
|
18
|
-
shortcuts: [
|
|
19
|
-
['btn-white-hover', 'hover:(text-blue-700 bg-white border-blue-700)'],
|
|
20
|
-
['btn-light-hover', 'hover:(text-blue-700 bg-lightBlue-400 border-lightBlue-400)'],
|
|
21
|
-
['btn-medium-hover', 'hover:(text-white bg-blue-400 border-blue-700)'],
|
|
22
|
-
['btn-dark-hover', 'hover:(bg-blue-700 text-white border-blue-700)'],
|
|
23
|
-
['img-base', 'relative object-cover bg-gray-100 h-auto max-w-full'],
|
|
24
|
-
['close-light','@apply before:bg-white after:bg-white'],
|
|
25
|
-
['close-dark','@apply before:bg-black after:bg-black'],
|
|
26
|
-
['headline-light', 'font-headlight font-300 tracking-tight'],
|
|
27
|
-
['detail-name', 'text-gray-900 leading-tight font-textlight line-clamp-3 whitespace-normal md:(whitespace-pre-wrap line-clamp-9 font-textregular)'],
|
|
28
|
-
['product-number','font-novamono content-center flex flex-wrap flex-col content-start pr-5 bg-white'],
|
|
29
|
-
['colon-after', 'after:content-[":"]'],
|
|
30
|
-
['headline','font-headlight font-bold '],
|
|
31
|
-
['badge', 'px-1.5 py-px text-white text-xs mb-1 max-w-fit whitespace-nowrap'],
|
|
32
|
-
['img--overlay','after:(content-empty bg-black bg-opacity-[.03] absolute w-full h-full top-0)'],
|
|
33
|
-
['img--4/3', 'aspect-[4/3] img-base'],
|
|
34
|
-
['img--3/4', 'aspect-[3/4] img-base'],
|
|
35
|
-
['img--1/1', 'aspect-square img-base'],
|
|
36
|
-
['img--3/2', 'aspect-[3/2] img-base'],
|
|
37
|
-
['img--2/3', 'aspect-[2/3] img-base'],
|
|
38
|
-
['img--3/1', 'aspect-[3/1] img-base'],
|
|
39
|
-
['img--16/9', 'aspect-video img-base'],
|
|
40
|
-
['img--small', 'h-full w-60 sm:(w-22) xl:(w-30)'],
|
|
41
|
-
['img--medium', 'h-full w-60'],
|
|
42
|
-
['underline-on-hover', 'relative flex w-full bg-white pb-1 dark:bg-blue-901 after:absolute after:bg-lightBlue-500 after:w-[calc(100%-1rem)] after:left-0 after:h-px after:top-[calc(100%-1px)] after:bottom-1 after:content-empty after:scale-x-0 after:transition-transform-300 after:origin-top-right hover:after:origin-top-left hover:after:scale-x-100'],
|
|
43
|
-
['carousel-product-tile', 'flex flex-wrap sm:flex-nowrap content-between w-64 min-w-64 lg:(w-28.57% min-w-28.57%) 2xl:(w-24.09% min-w-24.09%) relative'],
|
|
44
|
-
['btn-primary', 'bg-lightBlue-400 border border-transparent font-medium hover:bg-lightBlue-500 inline-flex items-center justify-center shadow text-base text-blue-700'],
|
|
45
|
-
['btn-primary-outline', 'border-lightBlue-500 border font-medium inline-flex items-center justify-center shadow text-base text-lightBlue-500 transition-all hover:(bg-lightBlue-500 text-white)'],
|
|
46
|
-
['btn-secondary', 'bg-gray-500 border border-transparent font-medium hover:bg-gray-600 inline-flex items-center justify-center shadow text-base text-white'],
|
|
47
|
-
['btn-secondary-outline', 'border-gray-500 border text-gray-500 font-medium inline-flex items-center justify-center shadow text-base hover:(text-white bg-gray-500)'],
|
|
48
|
-
['btn-tertiary', 'inline-flex border border-transparent items-center font-medium text-center text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300'],
|
|
49
|
-
['btn-tertiary-outline', 'inline-flex border items-center font-medium text-center text-blue-700 border-blue-700 transition-colors focus:(ring-2 outline-none ring-blue-300)'],
|
|
50
|
-
['btn-text', 'text-gray-500 border border-transparent hover:underline transition-all'],
|
|
51
|
-
['btn-tag', 'bg-blue-100 text-blue-800 font-medium mr-2 dark:bg-gray-700 dark:text-blue-400 border border-blue-400 hover:border-blue-600 justify-center'],
|
|
52
|
-
['btn-normal', 'md:px-10 md:py-2 md:text-lg px-8 py-3 whitespace-nowrap'],
|
|
53
|
-
['btn-sm', 'px-6 py-2 text-sm whitespace-nowrap '],
|
|
54
|
-
['btn-xs', 'px-4 py-1 text-sm whitespace-nowrap '],
|
|
55
|
-
|
|
56
|
-
['main','text-gray-700 dark:text-gray-200 dark:bg-blue-700 pt-24 sm:pt-14 relative'],
|
|
57
|
-
['nav','bg-white dark:bg-black absolute sm:fixed w-full top-0 z-40 sm:z-30 max-w-screen'],
|
|
58
|
-
['cat-menu','fixed bottom-[-4px] w-full z-10 border-t-1 border-gray-300 bg-white dark:bg-blue-900 text-center sm:(static z-auto border-t-none) sm:min-h-32'],
|
|
59
|
-
['cats-slide','transition duration-300 ease-linear mb-0.5 min-h-tile-mobile sm:(min-h-tile h-tile mb-2 p-3) text-black dark:text-white hover:(text-white even:bg-blue-600 odd:bg-lightBlue-500) cursor-pointer flex items-center flex-col justify-center transition ease-in-out duration-700 px-1.5 cursor-grab active:cursor-grabbing overflow-hidden'],
|
|
60
|
-
['cats-img','w-full h-8 md:h-icon group-hover:filter-invert dark:filter-invert relative'],
|
|
61
|
-
['subcat', 'cursor-pointer text-light-blue-700 hover:text-lightBlue-600 font-light mb-1 py-2 md:py-0'],
|
|
62
|
-
['product-row','bg-white flex flex-wrap odd:(pr-2.5 pl-3.5 sm:px-0) even:(pl-2.5 pr-3.5 sm:px-0) w-1/2 sm:w-auto sm:grid sm:grid-cols-3 gap-x-1 gap-y-0 md:(grid-cols-product gap-x-4) justify-start content-start content-start place-content-start py-4 pb-6 sm:pb-4'],
|
|
63
|
-
['product-row__photo','aspect-ratio-[4/3] mb-2 sm:mb-0 after:(content-empty bg-black bg-opacity-[.03] absolute w-full h-full top-0) w-100 col-span-1 row-span-3 max-w-full text-left overflow-hidden relative bg-gray-100 md:(col-span-1 row-span-1) box-content'], //filter drop-shadow-sm
|
|
64
|
-
['product-row__description', 'text-xs text-gray-900 leading-tight mt-2 font-textlight line-clamp-3 whitespace-normal md:(text-sm mt-0 font-textregular whitespace-pre-wrap)'],
|
|
65
|
-
['product-row__main', 'w-full sm:w-auto col-span-2 leading-none relative sm:pl-1 md:(pl-0 row-start-1 col-start-2 col-span-1)'],
|
|
66
|
-
['product-date', 'inline-block text-xxs md:text-xs leading-none mt-1 md:(mt-4 mb-1) mr-2'],
|
|
67
|
-
|
|
68
|
-
['detail-row','text-sm mt-1 md:mt-4 mb-4 grid grid-cols-2 gap-4 sm:(grid-cols-details-desktop grid-flow-col auto-cols-max)'],
|
|
69
|
-
['product-thumb', 'h-full w-full object-cover object-center transform scale-100 group-hover:scale-110 absolute inset-0 will-change-transform bg-gray-100'],
|
|
70
|
-
['product-thumb--plp','aspect-ratio-[4/3] flex items-center flex justify-center mb-3 sm:mb-0 after:(content-empty bg-black bg-opacity-[.03] absolute w-full h-full top-0)'], //filter drop-shadow-sm
|
|
71
|
-
['product-link--related', 'relative flex w-full bg-white dark:bg-blue-901 after:absolute after:bg-lightBlue-500 after:w-full after:left-0 after:h-px after:-bottom-2 after:content-empty after:scale-x-0 after:transition-transform-300 after:origin-top-right hover:after:origin-top-left hover:after:scale-x-100'],
|
|
72
|
-
['btn', 'px-4 py-1 rounded inline-block bg-teal-600 text-white cursor-pointer hover:bg-teal-700 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50'],
|
|
73
|
-
['icon-btn', 'text-[0.9em] inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:(opacity-100 text-teal-600)'],
|
|
74
|
-
['sidebar-title','font-headregular text-light-blue-500 text-xl md:(text-2xl px-4) mb-2 px-14 sm:px-3 flex items-center justify-center sm:justify-start py-3'],
|
|
75
|
-
['product-info','text-gray-500 text-xxs font-textlight leading-none mt-0.5 md:(mt-0 text-xs)'],
|
|
76
|
-
['product-button', 'text-blue-500 cursor-pointer text-base leading-none inline-flex items-center justify-center w-8 h-8 min-w-8 transition-colors duration-150 bg-white dark:bg-blue-901 focus:(text-blue-500) hover:(text-blue-500)'],
|
|
77
|
-
['pdp-headline','text-2xl sm:text-4xl 2xl:text-5xl font-headlight mb-6 font-bold sm:font-normal pr-7 lg:pr-0 pt-0 leading-none'],
|
|
78
|
-
['pdp-detail-row','text-sm mt-1 md:mt-4 mb-4 grid grid-cols-2 sm:(grid-cols-details-desktop grid-flow-col auto-cols-max) gap-4'],
|
|
79
|
-
['pdp-slide','h-full bg-gray-100 aspect-[4/3] relative overflow-hidden border border-transparent'],
|
|
80
|
-
['slide-bg','scale-140 bg-center bg-no-repeat bg-contain h-full w-full absolute top-0 filter-blur overflow-hidden transform bg-gray-200 dark:bg-gray-700'],
|
|
81
|
-
['slide-img','cursor-zoom-in my-auto z-50 h-full max-w-screen-2xl object-center object-contain pointer-events-none'],
|
|
82
|
-
['slide-pic','w-full flex justify-end absolute top-0 bottom-0'],
|
|
83
|
-
['slide-thumb','bg-gray-100 aspect-[4/3] w-auto h-auto cursor-grab active:cursor-grabbing max-h-44'],
|
|
84
|
-
['slide-thumb__img','pointer-events-none pb-px h-full m-auto object-cover bg-white dark:bg-blue-901'],
|
|
85
|
-
['cat-card','p-4 text-base md:text-sm'],
|
|
86
|
-
['flag-ua', 'inline-block text-4xl w-6 h-3.5 min-w-[1.25rem] mr-3 bg-gradient-to-b stops-[#0057b7_50%,50%,#ffd700_100%]'],
|
|
87
|
-
['slimbanner','px-4 sm:px-8 flex items-center justify-center text-xs sm:text-base leading-none relative bg-gray-100 z-2 px-4 py-3 sm:(text-base px-8) text-blue-700 print-hidden'],
|
|
88
|
-
['similar-products','flex items-center space-y-4 gap-8 flex-wrap px-4 md:grid grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4 3xl:grid-cols-5'],
|
|
89
|
-
['products-grid','flex w-full flex-nowrap items-center pr-4 md:grid grid-rows-1 overflow-hidden grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4 3xl:grid-cols-5 max-h-[6rem]'],
|
|
90
|
-
['cat-link','whitespace-nowrap cursor-pointer text-blue-901 dark:text-white hover:text-lightBlue-400 font-light uppercase py-2 md:py-0'],
|
|
91
|
-
['plp-name','flex items-center leading-none font-headregular cursor-pointer sm:pr-6 md:pr-12'],
|
|
92
|
-
['plp-replacements','col-span-3 md:col-span-1 md:col-start-2 text-xs mt-3 md:mt-4'],
|
|
93
|
-
['product-code','text-blue-600 mr-1 leading-none tracking-wide select-all'],
|
|
94
|
-
['code-formatted','font-novamono leading-none mt-0 relative text-xs'],
|
|
95
|
-
['btn-copy', 'leading-none opacity-10 hover:opacity-80 ml-auto w-6 h-6 -right-7 sm:(h-4 w-4 -right-5) absolute'],
|
|
96
|
-
['btn-copy-text','shadow-sm py-0.5 px-1 bg-gray-100 -ml-1 -mt-4 text-xxs whitespace-nowrap'],
|
|
97
|
-
['plp-icons','absolute top-0 -right-2 md:(top-0.5 right-0) w-12 bottom-auto flex justify-end text-sm'],
|
|
98
|
-
['plp-desc','hidden sm:block col-span-3 md:col-span-1 md:col-start-3 relative px-2 sm:px-0'],
|
|
99
|
-
['plp-materials', 'text-xs md:text-sm text-gray-900 dark:text-gray-300 leading-tight font-textlight md:font-textregular whitespace-normal md:whitespace-pre-wrap'],
|
|
100
|
-
['plp-b-desc','whitespace-pre-wrap text-xs md:text-sm font-textlight leading-4 md:leading-5'],
|
|
101
|
-
['carousel-tile', 'w-52 min-w-52 flex ml-1 lg:ml-1.5'],
|
|
102
|
-
['category-carousel__link', 'uppercase ml-auto px-4 text-xs flex items-center mt-3 hover:underline'],
|
|
103
|
-
['adsbygoogle', 'w-full text-center'],
|
|
104
|
-
['search-container', 'mb-2 sm:mb-0'],
|
|
105
|
-
['l-main', 'text-gray-700 dark:text-gray-200 pt-24 sm:pt-14 bg-white dark:bg-blue-901'],
|
|
106
|
-
['category-section', 'pb-4 w-full bg-white mb-4 overflow-x-hidden flex flex-wrap max-w-full'],
|
|
107
|
-
['number-secondary', 'block absolute inset-0 text-gray-500 select-all bg-white dark:bg-blue-901'],
|
|
108
|
-
['product-list', 'flex flex-wrap sm:block bg-white dark:bg-blue-901 sm:divide-y-1 sm:divide-solid divide-gray-200 dark:divide-white dark:divide-opacity-10 md:px-2 md:pl-4 mb-4 w-full bg-gray-100 dark:bg-gray-700 mb-auto'],
|
|
109
|
-
['btn-prcode', 'relative inline-block text-center leading-none px-1 py-0.5 mr-1 cursor-pointer font-mono border-solid border-1 border-gray-200 select-none text-gray-500 last:mr-0 not-last:mr-2 not-last:after:content-[+] after:(text-blue-700 absolute w-4 pl-0.5)']
|
|
110
|
-
],
|
|
111
|
-
theme: {
|
|
112
|
-
colors: {
|
|
113
|
-
blue: {
|
|
114
|
-
400: '#0040c5',
|
|
115
|
-
500: '#3b82f6',
|
|
116
|
-
540: '#0069ff',
|
|
117
|
-
545: '#005ad7',
|
|
118
|
-
550: '#0040c5',
|
|
119
|
-
600: '#02307d',
|
|
120
|
-
601: '#002059',
|
|
121
|
-
700: '#001e50',
|
|
122
|
-
800: '#00437a',
|
|
123
|
-
900: '#000f28',
|
|
124
|
-
901: '#0c1a32',
|
|
125
|
-
wrc: '#0000c8'
|
|
126
|
-
},
|
|
127
|
-
lightBlue: {
|
|
128
|
-
400: '#00b0f0',
|
|
129
|
-
500: '#0099da',
|
|
130
|
-
600: '#0087c1',
|
|
131
|
-
700: '#006ea6',
|
|
132
|
-
},
|
|
133
|
-
gray: {
|
|
134
|
-
100: '#f3f4f6',
|
|
135
|
-
200: '#e5e7eb',
|
|
136
|
-
300: '#b5bbc5',
|
|
137
|
-
400: '#9ca3af',
|
|
138
|
-
500: '#64748B'
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
gridTemplateColumn: {
|
|
142
|
-
16: 'repeat(16, minmax(0, 1fr))',
|
|
143
|
-
product: '15rem 20rem minmax(15rem, 1fr) ',
|
|
144
|
-
productGalleryDesktop: 'calc(100% - 14% - 0.9375rem) 14%',
|
|
145
|
-
replacement: '6.25rem 12rem auto', // minmax(10rem, 1fr)
|
|
146
|
-
'details-desktop': '12.5rem calc(100% - 12.5rem - 1rem)'
|
|
147
|
-
},
|
|
148
|
-
height: {
|
|
149
|
-
'tile': ' 104px',
|
|
150
|
-
'tile-mobile': ' 78px',
|
|
151
|
-
'sidebar': 'calc(100vh - 5.125rem)',
|
|
152
|
-
'full-mobile': 'calc(var(--vh, 1vh) * 100)',
|
|
153
|
-
icon: '46px',
|
|
154
|
-
},
|
|
155
|
-
filter: {
|
|
156
|
-
blur: 'blur(5px)',
|
|
157
|
-
},
|
|
158
|
-
backgroundSize: {
|
|
159
|
-
full: '100% 100%',
|
|
160
|
-
},
|
|
161
|
-
maxHeight: {
|
|
162
|
-
icon: '46px',
|
|
163
|
-
sidebar: 'calc(100vh - 5.125rem)',
|
|
164
|
-
},
|
|
165
|
-
minHeight: {
|
|
166
|
-
'tile': ' 104px',
|
|
167
|
-
'tile-mobile': ' 78px',
|
|
168
|
-
},
|
|
169
|
-
scale: ['group-hover'],
|
|
170
|
-
cursor: {
|
|
171
|
-
'zoom-in': 'zoom-in',
|
|
172
|
-
},
|
|
173
|
-
breakpoints: {
|
|
174
|
-
'sm': '640px',
|
|
175
|
-
'md': '768px',
|
|
176
|
-
'lg': '1024px',
|
|
177
|
-
'xl': '1280px',
|
|
178
|
-
'2xl': '1536px',
|
|
179
|
-
'3xl': '1920px',
|
|
180
|
-
'4xl': '2400px',
|
|
181
|
-
},
|
|
182
|
-
screens: {
|
|
183
|
-
'sm': '640px',
|
|
184
|
-
'md': '768px',
|
|
185
|
-
'lg': '1024px',
|
|
186
|
-
'xl': '1280px',
|
|
187
|
-
'2xl': '1536px',
|
|
188
|
-
'3xl': '1920px',
|
|
189
|
-
'print': { 'raw': 'print' },
|
|
190
|
-
},
|
|
191
|
-
fontSize: {
|
|
192
|
-
xxs: '.625rem',
|
|
193
|
-
},
|
|
194
|
-
aspectRatio: {
|
|
195
|
-
'4/3': '4 / 3',
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
|
-
presets: [
|
|
199
|
-
presetUno(),
|
|
200
|
-
presetAttributify(),
|
|
201
|
-
presetIcons({
|
|
202
|
-
scale: 1.2,
|
|
203
|
-
warn: true,
|
|
204
|
-
prefix: 'i-',
|
|
205
|
-
extraProperties: {
|
|
206
|
-
'display': 'inline-block',
|
|
207
|
-
'vertical-align': 'middle',
|
|
208
|
-
// ...
|
|
209
|
-
},
|
|
210
|
-
}),
|
|
211
|
-
// presetTypography(),
|
|
212
|
-
presetWebFonts({
|
|
213
|
-
provider: 'none',
|
|
214
|
-
fonts: {
|
|
215
|
-
sans: [{
|
|
216
|
-
name: 'vw_textregular',
|
|
217
|
-
provider: 'none'
|
|
218
|
-
}],
|
|
219
|
-
novamono: [{
|
|
220
|
-
name: 'Nova Mono',
|
|
221
|
-
provider: 'none'
|
|
222
|
-
}],
|
|
223
|
-
mono: [{
|
|
224
|
-
name: 'Nova Mono',
|
|
225
|
-
provider: 'none'
|
|
226
|
-
}],
|
|
227
|
-
headlight: ['vw_headlight', 'system-ui', 'ui-sans-serif'],
|
|
228
|
-
headregular: [{
|
|
229
|
-
name: 'vw_headregular',
|
|
230
|
-
provider: 'none'
|
|
231
|
-
}],
|
|
232
|
-
headbold: [{
|
|
233
|
-
name: 'vw_headbold',
|
|
234
|
-
provider: 'none'
|
|
235
|
-
}],
|
|
236
|
-
textlight: [{
|
|
237
|
-
name: 'vw_textlight',
|
|
238
|
-
provider: 'none'
|
|
239
|
-
}],
|
|
240
|
-
textregular: [{
|
|
241
|
-
name: 'vw_textregular',
|
|
242
|
-
provider: 'none'
|
|
243
|
-
}],
|
|
244
|
-
textbold: [{
|
|
245
|
-
name: 'vw_textbold',
|
|
246
|
-
provider: 'none'
|
|
247
|
-
}]
|
|
248
|
-
}
|
|
249
|
-
})
|
|
250
|
-
]
|
|
251
|
-
})
|
|
4
|
+
export default createSdsConfig();
|