spoko-design-system 0.2.80 → 0.2.81

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.
Files changed (155) hide show
  1. package/.github/dependabot.yml +11 -11
  2. package/.github/todo.yml +3 -3
  3. package/.github/workflows/deploy.yml +39 -39
  4. package/.stackblitzrc +5 -5
  5. package/.vscode/extensions.json +5 -5
  6. package/.vscode/launch.json +11 -11
  7. package/.vscode/settings.json +5 -5
  8. package/LICENSE +21 -21
  9. package/README.md +113 -113
  10. package/astro-i18next.config.mjs +17 -17
  11. package/astro-i18next.config.ts +10 -10
  12. package/astro.config.mjs +147 -147
  13. package/dev-dist/sw.js +91 -91
  14. package/dev-dist/workbox-c676b6d3.js +3391 -3391
  15. package/index.ts +65 -65
  16. package/package.json +3 -3
  17. package/public/fonts/lg.svg +53 -53
  18. package/public/fonts/vwhead-bold-demo.html +549 -549
  19. package/public/fonts/vwhead-regular-demo.html +549 -549
  20. package/public/fonts/vwtext-bold-demo.html +549 -549
  21. package/public/fonts/vwtext-regular-demo.html +549 -549
  22. package/public/github.svg +3 -3
  23. package/public/grid_dot.svg +4 -4
  24. package/public/linkedin.svg +44 -44
  25. package/public/locales/en/translation.json +8 -8
  26. package/public/locales/pl/translation.json +8 -8
  27. package/public/make-scrollable-code-focusable.js +3 -3
  28. package/public/pagefind.yml +3 -3
  29. package/public/polo.blue.svg +29 -29
  30. package/public/spoko.space.svg +71 -71
  31. package/public/twitter.svg +46 -46
  32. package/renovate.json +6 -6
  33. package/sandbox.config.json +11 -11
  34. package/src/MyComponent.astro +8 -8
  35. package/src/components/Badge.vue +19 -19
  36. package/src/components/Badges.vue +21 -21
  37. package/src/components/Breadcrumbs.vue +107 -107
  38. package/src/components/Button.vue +55 -55
  39. package/src/components/ButtonCopy.vue +36 -36
  40. package/src/components/Card.astro +27 -27
  41. package/src/components/Carousel.astro +26 -26
  42. package/src/components/Category/CategoriesCarousel.astro +101 -101
  43. package/src/components/Category/CategoriesSidebar.astro +186 -186
  44. package/src/components/Category/CategoryDetails.astro +82 -82
  45. package/src/components/Category/CategoryLink.vue +23 -23
  46. package/src/components/Category/CategorySection.astro +69 -69
  47. package/src/components/Category/CategorySidebarToggler.vue +9 -9
  48. package/src/components/Category/CategoryTile.astro +49 -49
  49. package/src/components/Category/SubCategoryLink.vue +29 -29
  50. package/src/components/CategoryLink.astro +18 -18
  51. package/src/components/Copyright.astro +12 -12
  52. package/src/components/Date.astro +7 -7
  53. package/src/components/Faq.astro +33 -33
  54. package/src/components/FaqItem.astro +96 -96
  55. package/src/components/FeaturesList.vue +41 -41
  56. package/src/components/FuckRussia.vue +62 -62
  57. package/src/components/HandDrive.astro +29 -29
  58. package/src/components/Header/Header.astro +210 -210
  59. package/src/components/Header/SkipToContent.astro +1 -1
  60. package/src/components/Headline.vue +48 -48
  61. package/src/components/Image.astro +30 -30
  62. package/src/components/Jumbatron.vue +40 -40
  63. package/src/components/LeftSidebar.astro +53 -53
  64. package/src/components/MainColors.vue +23 -23
  65. package/src/components/MainInput.vue +15 -15
  66. package/src/components/Modal.astro +27 -27
  67. package/src/components/PageContent.astro +5 -5
  68. package/src/components/PartNumber.vue +27 -27
  69. package/src/components/PostHeader.astro +103 -103
  70. package/src/components/PrCode.vue +141 -141
  71. package/src/components/Product/ProductButton.vue +18 -18
  72. package/src/components/Product/ProductCarousel.astro +35 -35
  73. package/src/components/Product/ProductCodes.vue +174 -174
  74. package/src/components/Product/ProductEngineType.vue +42 -42
  75. package/src/components/Product/ProductImage.astro +40 -40
  76. package/src/components/Product/ProductLink.astro +101 -101
  77. package/src/components/Product/ProductLink.vue +59 -59
  78. package/src/components/Product/ProductLinkInfo.astro +37 -37
  79. package/src/components/Product/ProductNumber.astro +61 -61
  80. package/src/components/ProductCarousel.astro +38 -38
  81. package/src/components/ProductCodes.vue +39 -39
  82. package/src/components/ProductDetailName.vue +52 -52
  83. package/src/components/ProductDetailsList.vue +65 -65
  84. package/src/components/ProductTile.astro +48 -48
  85. package/src/components/Quote.vue +23 -23
  86. package/src/components/ReloadPrompt.astro +50 -50
  87. package/src/components/SlimBanner.vue +72 -72
  88. package/src/components/Table.vue +32 -32
  89. package/src/components/TableOfContents.astro +15 -15
  90. package/src/components/Translations.vue +23 -23
  91. package/src/components/flags/FlagPL.vue +3 -3
  92. package/src/components/flags/FlagUA.vue +2 -2
  93. package/src/components/layout/Container.astro +7 -7
  94. package/src/components/layout/Header.astro +80 -80
  95. package/src/config.ts +56 -56
  96. package/src/design.config.ts +81 -81
  97. package/src/env.d.ts +1 -1
  98. package/src/layouts/Layout.astro +60 -60
  99. package/src/layouts/MainLayout.astro +81 -81
  100. package/src/layouts/partials/FooterCommon.astro +4 -4
  101. package/src/layouts/partials/HeadCommon.astro +44 -44
  102. package/src/layouts/partials/HeadSEO.astro +41 -41
  103. package/src/pages/components/badges.mdx +57 -57
  104. package/src/pages/components/breadcrumbs.mdx +139 -139
  105. package/src/pages/components/buttons.mdx +236 -236
  106. package/src/pages/components/card.mdx +294 -294
  107. package/src/pages/components/carousel.mdx +62 -62
  108. package/src/pages/components/copyright.mdx +42 -42
  109. package/src/pages/components/details-list.mdx +115 -115
  110. package/src/pages/components/features-list.mdx +37 -37
  111. package/src/pages/components/flags.mdx +49 -49
  112. package/src/pages/components/fuck-russia.mdx +39 -39
  113. package/src/pages/components/hand-drive.mdx +38 -38
  114. package/src/pages/components/headline.mdx +152 -152
  115. package/src/pages/components/icons.astro +48 -48
  116. package/src/pages/components/image.mdx +513 -513
  117. package/src/pages/components/input.mdx +45 -45
  118. package/src/pages/components/jumbatron.mdx +95 -95
  119. package/src/pages/components/modal.mdx +64 -64
  120. package/src/pages/components/post-header.mdx +60 -60
  121. package/src/pages/components/pr-code.mdx +65 -65
  122. package/src/pages/components/product-number.mdx +58 -58
  123. package/src/pages/components/product-tile.mdx +51 -51
  124. package/src/pages/components/quote.mdx +33 -33
  125. package/src/pages/components/slimbanner.mdx +35 -35
  126. package/src/pages/components/table.mdx +108 -108
  127. package/src/pages/core/colors.mdx +10 -10
  128. package/src/pages/core/grid.mdx +89 -89
  129. package/src/pages/core/introduction.mdx +77 -77
  130. package/src/pages/core/shadows.astro +20 -20
  131. package/src/pages/core/typography.astro +47 -47
  132. package/src/pages/index.astro +126 -126
  133. package/src/pages/patterns/introduction.mdx +60 -60
  134. package/src/pwa.ts +12 -12
  135. package/src/styles/_variables.scss +70 -70
  136. package/src/styles/base/base.css +184 -184
  137. package/src/styles/base/grid.css +92 -92
  138. package/src/styles/base/typography.css +70 -70
  139. package/src/styles/content.css +73 -73
  140. package/src/styles/main.css +7 -7
  141. package/src/types/Product.ts +31 -31
  142. package/src/types/astro.d.ts +3 -3
  143. package/src/utils/product/getPriceFormatted.ts +15 -15
  144. package/src/utils/product/getProductChecklist.ts +17 -17
  145. package/src/utils/product/useFormatProductNumber.ts +41 -41
  146. package/src/utils/seo/getShorterDescription.ts +14 -14
  147. package/src/utils/text/formatDate.ts +5 -5
  148. package/src/utils/text/formatLocaleNumber.ts +6 -6
  149. package/src/utils/text/formatPad.ts +12 -12
  150. package/src/utils/text/getNumberFormatted.ts +33 -33
  151. package/src/utils/text/getTranslatedLink.ts +5 -5
  152. package/src/utils/text.ts +28 -28
  153. package/tailwind.config.cjs +8 -8
  154. package/tsconfig.json +28 -28
  155. package/uno.config.ts +256 -256
package/tsconfig.json CHANGED
@@ -1,29 +1,29 @@
1
- {
2
- "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.astro", "src/**/*.d.ts"],
3
- "compilerOptions": {
4
- "baseUrl": "src",
5
-
6
- // Enable JSON imports.
7
- "resolveJsonModule": true,
8
-
9
- // Enable stricter transpilation for better output.
10
- "isolatedModules": true,
11
-
12
- // Astro will directly run your TypeScript code, no transpilation needed.
13
- "noEmit": true,
14
-
15
- "target": "esnext",
16
- "useDefineForClassFields": true,
17
- "module": "esnext",
18
- "moduleResolution": "node",
19
- "jsx": "preserve",
20
- "allowJs": true,
21
- "types": ["vite/client", "vitest", "@vue/runtime-dom", "@astrojs/ts", "@astrojs/ts-plugin", "unplugin-vue-macros/macros-global", "unplugin-icons/types/astro"],
22
- "paths": {
23
- "@components/*": ["components/*"],
24
- "@utils/*": ["utils/*"],
25
- "@types/*": ["types/*"]
26
- }
27
- },
28
- "exclude": ["dist", "node_modules"]
1
+ {
2
+ "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "src/**/*.astro", "src/**/*.d.ts"],
3
+ "compilerOptions": {
4
+ "baseUrl": "src",
5
+
6
+ // Enable JSON imports.
7
+ "resolveJsonModule": true,
8
+
9
+ // Enable stricter transpilation for better output.
10
+ "isolatedModules": true,
11
+
12
+ // Astro will directly run your TypeScript code, no transpilation needed.
13
+ "noEmit": true,
14
+
15
+ "target": "esnext",
16
+ "useDefineForClassFields": true,
17
+ "module": "esnext",
18
+ "moduleResolution": "node",
19
+ "jsx": "preserve",
20
+ "allowJs": true,
21
+ "types": ["vite/client", "vitest", "@vue/runtime-dom", "@astrojs/ts", "@astrojs/ts-plugin", "unplugin-vue-macros/macros-global", "unplugin-icons/types/astro"],
22
+ "paths": {
23
+ "@components/*": ["components/*"],
24
+ "@utils/*": ["utils/*"],
25
+ "@types/*": ["types/*"]
26
+ }
27
+ },
28
+ "exclude": ["dist", "node_modules"]
29
29
  }
package/uno.config.ts CHANGED
@@ -1,257 +1,257 @@
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'
12
-
13
-
14
- // import transformerVariantGroup from '@unocss/transformer-variant-group'
15
-
16
- // import presetWind from '@unocss/preset-wind';
17
- // import presetUno from '@unocss/preset-uno';
18
- // import presetAttributify from '@unocss/preset-attributify';
19
- // import presetTypography from '@unocss/preset-typography';
20
- // import presetWebFonts from '@unocss/preset-web-fonts';
21
-
22
-
23
-
24
- export default defineConfig({
25
- // ...
26
- transformers: [
27
- transformerDirectives(),
28
- transformerVariantGroup(),
29
- ],
30
- shortcuts: [
31
- ['close-light','@apply before:bg-white after:bg-white'],
32
- ['close-dark','@apply before:bg-black after:bg-black'],
33
- ['headline-light', 'font-headlight font-300 tracking-tight'],
34
- ['detail-name', 'text-gray-900 leading-tight font-textlight line-clamp-3 whitespace-normal md:(whitespace-pre-wrap line-clamp-9 font-textregular)'],
35
- ['product-number','font-novamono content-center flex flex-wrap flex-col content-start pr-5 bg-white'],
36
- ['colon-after', 'after:content-[":"]'],
37
- ['headline','font-headlight font-bold '],
38
- ['badge', 'px-1.5 py-px text-white text-xs mb-1 max-w-fit whitespace-nowrap'],
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-gray-100 h-auto max-w-full'],
41
- ['img--3/4', 'aspect-[3/4] relative object-cover bg-gray-100 h-auto max-w-full'],
42
- ['img--1/1', 'aspect-square relative object-cover bg-gray-100 h-auto max-w-full'],
43
- ['img--3/2', 'aspect-[3/2] relative object-cover bg-gray-100 h-auto max-w-full'],
44
- ['img--2/3', 'aspect-[2/3] relative object-cover bg-gray-100 h-auto max-w-full'],
45
- ['img--3/1', 'aspect-[3/1] relative object-cover bg-gray-100 h-auto max-w-full'],
46
- ['img--16/9', 'aspect-video relative object-cover bg-gray-100 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
- ['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'],
50
- ['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'],
51
- ['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'],
52
- ['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)'],
53
- ['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'],
54
- ['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)'],
55
- ['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'],
56
- ['btn-tertiary-outline', 'inline-flex border items-center font-medium text-center text-blue-700 border-blue-700 transition-all hover:(bg-blue-700 text-white) focus:ring-4 focus:outline-none focus:ring-blue-300 '],
57
- ['btn-text', 'text-gray-500 border border-transparent hover:underline transition-all'],
58
- ['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'],
59
- ['btn-normal', 'md:px-10 md:py-2 md:text-lg px-8 py-3 whitespace-nowrap'],
60
- ['btn-sm', 'px-6 py-2 text-sm whitespace-nowrap '],
61
- ['btn-xs', 'px-4 py-1 text-sm whitespace-nowrap '],
62
-
63
- ['main','text-gray-700 dark:text-gray-200 dark:bg-blue-700 pt-24 sm:pt-14 relative'],
64
- ['nav','bg-white dark:bg-black absolute sm:fixed w-full top-0 z-40 sm:z-30 max-w-screen'],
65
- ['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'],
66
- ['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'],
67
- ['cats-img','w-full h-8 md:h-icon group-hover:filter-invert dark:filter-invert relative'],
68
- ['subcat', 'cursor-pointer text-light-blue-700 hover:text-lightBlue-600 font-light mb-1 py-2 md:py-0'],
69
- ['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'],
70
- ['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
71
- ['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)'],
72
- ['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)'],
73
- ['product-date', 'inline-block text-xxs md:text-xs leading-none mt-1 md:(mt-4 mb-1) mr-2'],
74
-
75
- ['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)'],
76
- ['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'],
77
- ['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
78
- ['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'],
79
- ['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'],
80
- ['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)'],
81
- ['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'],
82
- ['product-info','text-gray-500 text-xxs font-textlight leading-none mt-0.5 md:(mt-0 text-xs)'],
83
- ['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)'],
84
- ['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'],
85
- ['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'],
86
- ['pdp-slide','h-full bg-gray-100 aspect-[4/3] relative overflow-hidden border border-transparent'],
87
- ['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'],
88
- ['slide-img','cursor-zoom-in my-auto z-50 h-full max-w-screen-2xl object-center object-contain pointer-events-none'],
89
- ['slide-pic','w-full flex justify-end absolute top-0 bottom-0'],
90
- ['slide-thumb','bg-gray-100 aspect-[4/3] w-auto h-auto cursor-grab active:cursor-grabbing max-h-44'],
91
- ['slide-thumb__img','pointer-events-none pb-px h-full m-auto object-cover bg-white dark:bg-blue-901'],
92
- ['cat-card','p-4 text-base md:text-sm'],
93
- ['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%]'],
94
- ['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'],
95
- ['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'],
96
- ['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]'],
97
- ['cat-link','whitespace-nowrap cursor-pointer text-blue-901 dark:text-white hover:text-lightBlue-400 font-light uppercase py-2 md:py-0'],
98
- ['plp-name','flex items-center leading-none font-headregular cursor-pointer sm:pr-6 md:pr-12'],
99
- ['plp-replacements','col-span-3 md:col-span-1 md:col-start-2 text-xs mt-3 md:mt-4'],
100
- ['product-code','text-blue-600 mr-1 leading-none tracking-wide select-all'],
101
- ['code-formatted','font-novamono leading-none mt-0 relative text-xs'],
102
- ['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'],
103
- ['btn-copy-text','shadow-sm py-0.5 px-1 bg-gray-100 -ml-1 -mt-4 text-xxs whitespace-nowrap'],
104
- ['plp-icons','absolute top-0 -right-2 md:(top-0.5 right-0) w-12 bottom-auto flex justify-end text-sm'],
105
- ['plp-desc','hidden sm:block col-span-3 md:col-span-1 md:col-start-3 relative px-2 sm:px-0'],
106
- ['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'],
107
- ['plp-b-desc','whitespace-pre-wrap text-xs md:text-sm font-textlight leading-4 md:leading-5'],
108
- ['carousel-tile', 'w-52 min-w-52 flex ml-1 lg:ml-1.5'],
109
- ['category-carousel__link', 'uppercase ml-auto px-4 text-xs flex items-center mt-3 hover:underline'],
110
- ['adsbygoogle', 'w-full text-center'],
111
- ['search-container', 'mb-2 sm:mb-0'],
112
- ['l-main', 'text-gray-700 dark:text-gray-200 pt-24 sm:pt-14 bg-white dark:bg-blue-901'],
113
- ['category-section', 'pb-4 w-full bg-white mb-4 overflow-x-hidden flex flex-wrap max-w-full'],
114
- ['number-secondary', 'block absolute inset-0 text-gray-500 select-all bg-white dark:bg-blue-901'],
115
- ['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'],
116
- ['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)']
117
- ],
118
- theme: {
119
- colors: {
120
- blue: {
121
- 500: '#3b82f6',
122
- 540: '#0069ff',
123
- 545: '#005ad7',
124
- 550: '#0040c5',
125
- 600: '#02307d',
126
- 601: '#002059',
127
- 700: '#001e50',
128
- 800: '#00437a',
129
- 900: '#000f28',
130
- 901: '#0c1a32',
131
- wrc: '#0000c8'
132
- },
133
- lightBlue: {
134
- 400: '#00b0f0',
135
- 500: '#0099da',
136
- 600: '#0087c1',
137
- 700: '#006ea6',
138
- },
139
- gray: {
140
- 100: '#f3f4f6',
141
- 200: '#e5e7eb',
142
- 300: '#b5bbc5',
143
- 400: '#9ca3af',
144
- 500: '#64748B'
145
- }
146
- },
147
- gridTemplateColumn: {
148
- 16: 'repeat(16, minmax(0, 1fr))',
149
- product: '15rem 20rem minmax(15rem, 1fr) ',
150
- productGalleryDesktop: 'calc(100% - 14% - 0.9375rem) 14%',
151
- replacement: '6.25rem 12rem auto', // minmax(10rem, 1fr)
152
- 'details-desktop': '12.5rem calc(100% - 12.5rem - 1rem)'
153
- },
154
- height: {
155
- 'tile': ' 104px',
156
- 'tile-mobile': ' 78px',
157
- 'sidebar': 'calc(100vh - 5.125rem)',
158
- 'full-mobile': 'calc(var(--vh, 1vh) * 100)',
159
- icon: '46px',
160
- },
161
- filter: {
162
- blur: 'blur(5px)',
163
- },
164
- backgroundSize: {
165
- full: '100% 100%',
166
- },
167
- maxHeight: {
168
- icon: '46px',
169
- sidebar: 'calc(100vh - 5.125rem)',
170
- },
171
- minHeight: {
172
- 'tile': ' 104px',
173
- 'tile-mobile': ' 78px',
174
- },
175
- scale: ['group-hover'],
176
- cursor: {
177
- 'zoom-in': 'zoom-in',
178
- },
179
- breakpoints: {
180
- 'sm': '640px',
181
- 'md': '768px',
182
- 'lg': '1024px',
183
- 'xl': '1280px',
184
- '2xl': '1536px',
185
- '3xl': '1920px',
186
- '4xl': '2400px',
187
- },
188
- screens: {
189
- 'sm': '640px',
190
- 'md': '768px',
191
- 'lg': '1024px',
192
- 'xl': '1280px',
193
- '2xl': '1536px',
194
- '3xl': '1920px',
195
- 'print': { 'raw': 'print' },
196
- },
197
- fontSize: {
198
- xxs: '.625rem',
199
- },
200
- aspectRatio: {
201
- '4/3': '4 / 3',
202
- },
203
- },
204
- presets: [
205
- presetUno(),
206
- presetAttributify(),
207
- presetIcons({
208
- scale: 1.2,
209
- warn: true,
210
- prefix: 'i-',
211
- extraProperties: {
212
- 'display': 'inline-block',
213
- 'vertical-align': 'middle',
214
- // ...
215
- },
216
- }),
217
- // presetTypography(),
218
- presetWebFonts({
219
- provider: 'none',
220
- fonts: {
221
- sans: [{
222
- name: 'vw_textregular',
223
- provider: 'none'
224
- }],
225
- novamono: [{
226
- name: 'Nova Mono',
227
- provider: 'none'
228
- }],
229
- mono: [{
230
- name: 'Nova Mono',
231
- provider: 'none'
232
- }],
233
- headlight: ['vw_headlight', 'system-ui', 'ui-sans-serif'],
234
- headregular: [{
235
- name: 'vw_headregular',
236
- provider: 'none'
237
- }],
238
- headbold: [{
239
- name: 'vw_headbold',
240
- provider: 'none'
241
- }],
242
- textlight: [{
243
- name: 'vw_textlight',
244
- provider: 'none'
245
- }],
246
- textregular: [{
247
- name: 'vw_textregular',
248
- provider: 'none'
249
- }],
250
- textbold: [{
251
- name: 'vw_textbold',
252
- provider: 'none'
253
- }]
254
- }
255
- })
256
- ]
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'
12
+
13
+
14
+ // import transformerVariantGroup from '@unocss/transformer-variant-group'
15
+
16
+ // import presetWind from '@unocss/preset-wind';
17
+ // import presetUno from '@unocss/preset-uno';
18
+ // import presetAttributify from '@unocss/preset-attributify';
19
+ // import presetTypography from '@unocss/preset-typography';
20
+ // import presetWebFonts from '@unocss/preset-web-fonts';
21
+
22
+
23
+
24
+ export default defineConfig({
25
+ // ...
26
+ transformers: [
27
+ transformerDirectives(),
28
+ transformerVariantGroup(),
29
+ ],
30
+ shortcuts: [
31
+ ['close-light','@apply before:bg-white after:bg-white'],
32
+ ['close-dark','@apply before:bg-black after:bg-black'],
33
+ ['headline-light', 'font-headlight font-300 tracking-tight'],
34
+ ['detail-name', 'text-gray-900 leading-tight font-textlight line-clamp-3 whitespace-normal md:(whitespace-pre-wrap line-clamp-9 font-textregular)'],
35
+ ['product-number','font-novamono content-center flex flex-wrap flex-col content-start pr-5 bg-white'],
36
+ ['colon-after', 'after:content-[":"]'],
37
+ ['headline','font-headlight font-bold '],
38
+ ['badge', 'px-1.5 py-px text-white text-xs mb-1 max-w-fit whitespace-nowrap'],
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-gray-100 h-auto max-w-full'],
41
+ ['img--3/4', 'aspect-[3/4] relative object-cover bg-gray-100 h-auto max-w-full'],
42
+ ['img--1/1', 'aspect-square relative object-cover bg-gray-100 h-auto max-w-full'],
43
+ ['img--3/2', 'aspect-[3/2] relative object-cover bg-gray-100 h-auto max-w-full'],
44
+ ['img--2/3', 'aspect-[2/3] relative object-cover bg-gray-100 h-auto max-w-full'],
45
+ ['img--3/1', 'aspect-[3/1] relative object-cover bg-gray-100 h-auto max-w-full'],
46
+ ['img--16/9', 'aspect-video relative object-cover bg-gray-100 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
+ ['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'],
50
+ ['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'],
51
+ ['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'],
52
+ ['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)'],
53
+ ['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'],
54
+ ['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)'],
55
+ ['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'],
56
+ ['btn-tertiary-outline', 'inline-flex border items-center font-medium text-center text-blue-700 border-blue-700 transition-all hover:(bg-blue-700 text-white) focus:ring-4 focus:outline-none focus:ring-blue-300 '],
57
+ ['btn-text', 'text-gray-500 border border-transparent hover:underline transition-all'],
58
+ ['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'],
59
+ ['btn-normal', 'md:px-10 md:py-2 md:text-lg px-8 py-3 whitespace-nowrap'],
60
+ ['btn-sm', 'px-6 py-2 text-sm whitespace-nowrap '],
61
+ ['btn-xs', 'px-4 py-1 text-sm whitespace-nowrap '],
62
+
63
+ ['main','text-gray-700 dark:text-gray-200 dark:bg-blue-700 pt-24 sm:pt-14 relative'],
64
+ ['nav','bg-white dark:bg-black absolute sm:fixed w-full top-0 z-40 sm:z-30 max-w-screen'],
65
+ ['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'],
66
+ ['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'],
67
+ ['cats-img','w-full h-8 md:h-icon group-hover:filter-invert dark:filter-invert relative'],
68
+ ['subcat', 'cursor-pointer text-light-blue-700 hover:text-lightBlue-600 font-light mb-1 py-2 md:py-0'],
69
+ ['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'],
70
+ ['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
71
+ ['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)'],
72
+ ['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)'],
73
+ ['product-date', 'inline-block text-xxs md:text-xs leading-none mt-1 md:(mt-4 mb-1) mr-2'],
74
+
75
+ ['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)'],
76
+ ['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'],
77
+ ['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
78
+ ['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'],
79
+ ['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'],
80
+ ['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)'],
81
+ ['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'],
82
+ ['product-info','text-gray-500 text-xxs font-textlight leading-none mt-0.5 md:(mt-0 text-xs)'],
83
+ ['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)'],
84
+ ['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'],
85
+ ['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'],
86
+ ['pdp-slide','h-full bg-gray-100 aspect-[4/3] relative overflow-hidden border border-transparent'],
87
+ ['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'],
88
+ ['slide-img','cursor-zoom-in my-auto z-50 h-full max-w-screen-2xl object-center object-contain pointer-events-none'],
89
+ ['slide-pic','w-full flex justify-end absolute top-0 bottom-0'],
90
+ ['slide-thumb','bg-gray-100 aspect-[4/3] w-auto h-auto cursor-grab active:cursor-grabbing max-h-44'],
91
+ ['slide-thumb__img','pointer-events-none pb-px h-full m-auto object-cover bg-white dark:bg-blue-901'],
92
+ ['cat-card','p-4 text-base md:text-sm'],
93
+ ['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%]'],
94
+ ['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'],
95
+ ['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'],
96
+ ['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]'],
97
+ ['cat-link','whitespace-nowrap cursor-pointer text-blue-901 dark:text-white hover:text-lightBlue-400 font-light uppercase py-2 md:py-0'],
98
+ ['plp-name','flex items-center leading-none font-headregular cursor-pointer sm:pr-6 md:pr-12'],
99
+ ['plp-replacements','col-span-3 md:col-span-1 md:col-start-2 text-xs mt-3 md:mt-4'],
100
+ ['product-code','text-blue-600 mr-1 leading-none tracking-wide select-all'],
101
+ ['code-formatted','font-novamono leading-none mt-0 relative text-xs'],
102
+ ['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'],
103
+ ['btn-copy-text','shadow-sm py-0.5 px-1 bg-gray-100 -ml-1 -mt-4 text-xxs whitespace-nowrap'],
104
+ ['plp-icons','absolute top-0 -right-2 md:(top-0.5 right-0) w-12 bottom-auto flex justify-end text-sm'],
105
+ ['plp-desc','hidden sm:block col-span-3 md:col-span-1 md:col-start-3 relative px-2 sm:px-0'],
106
+ ['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'],
107
+ ['plp-b-desc','whitespace-pre-wrap text-xs md:text-sm font-textlight leading-4 md:leading-5'],
108
+ ['carousel-tile', 'w-52 min-w-52 flex ml-1 lg:ml-1.5'],
109
+ ['category-carousel__link', 'uppercase ml-auto px-4 text-xs flex items-center mt-3 hover:underline'],
110
+ ['adsbygoogle', 'w-full text-center'],
111
+ ['search-container', 'mb-2 sm:mb-0'],
112
+ ['l-main', 'text-gray-700 dark:text-gray-200 pt-24 sm:pt-14 bg-white dark:bg-blue-901'],
113
+ ['category-section', 'pb-4 w-full bg-white mb-4 overflow-x-hidden flex flex-wrap max-w-full'],
114
+ ['number-secondary', 'block absolute inset-0 text-gray-500 select-all bg-white dark:bg-blue-901'],
115
+ ['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'],
116
+ ['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)']
117
+ ],
118
+ theme: {
119
+ colors: {
120
+ blue: {
121
+ 500: '#3b82f6',
122
+ 540: '#0069ff',
123
+ 545: '#005ad7',
124
+ 550: '#0040c5',
125
+ 600: '#02307d',
126
+ 601: '#002059',
127
+ 700: '#001e50',
128
+ 800: '#00437a',
129
+ 900: '#000f28',
130
+ 901: '#0c1a32',
131
+ wrc: '#0000c8'
132
+ },
133
+ lightBlue: {
134
+ 400: '#00b0f0',
135
+ 500: '#0099da',
136
+ 600: '#0087c1',
137
+ 700: '#006ea6',
138
+ },
139
+ gray: {
140
+ 100: '#f3f4f6',
141
+ 200: '#e5e7eb',
142
+ 300: '#b5bbc5',
143
+ 400: '#9ca3af',
144
+ 500: '#64748B'
145
+ }
146
+ },
147
+ gridTemplateColumn: {
148
+ 16: 'repeat(16, minmax(0, 1fr))',
149
+ product: '15rem 20rem minmax(15rem, 1fr) ',
150
+ productGalleryDesktop: 'calc(100% - 14% - 0.9375rem) 14%',
151
+ replacement: '6.25rem 12rem auto', // minmax(10rem, 1fr)
152
+ 'details-desktop': '12.5rem calc(100% - 12.5rem - 1rem)'
153
+ },
154
+ height: {
155
+ 'tile': ' 104px',
156
+ 'tile-mobile': ' 78px',
157
+ 'sidebar': 'calc(100vh - 5.125rem)',
158
+ 'full-mobile': 'calc(var(--vh, 1vh) * 100)',
159
+ icon: '46px',
160
+ },
161
+ filter: {
162
+ blur: 'blur(5px)',
163
+ },
164
+ backgroundSize: {
165
+ full: '100% 100%',
166
+ },
167
+ maxHeight: {
168
+ icon: '46px',
169
+ sidebar: 'calc(100vh - 5.125rem)',
170
+ },
171
+ minHeight: {
172
+ 'tile': ' 104px',
173
+ 'tile-mobile': ' 78px',
174
+ },
175
+ scale: ['group-hover'],
176
+ cursor: {
177
+ 'zoom-in': 'zoom-in',
178
+ },
179
+ breakpoints: {
180
+ 'sm': '640px',
181
+ 'md': '768px',
182
+ 'lg': '1024px',
183
+ 'xl': '1280px',
184
+ '2xl': '1536px',
185
+ '3xl': '1920px',
186
+ '4xl': '2400px',
187
+ },
188
+ screens: {
189
+ 'sm': '640px',
190
+ 'md': '768px',
191
+ 'lg': '1024px',
192
+ 'xl': '1280px',
193
+ '2xl': '1536px',
194
+ '3xl': '1920px',
195
+ 'print': { 'raw': 'print' },
196
+ },
197
+ fontSize: {
198
+ xxs: '.625rem',
199
+ },
200
+ aspectRatio: {
201
+ '4/3': '4 / 3',
202
+ },
203
+ },
204
+ presets: [
205
+ presetUno(),
206
+ presetAttributify(),
207
+ presetIcons({
208
+ scale: 1.2,
209
+ warn: true,
210
+ prefix: 'i-',
211
+ extraProperties: {
212
+ 'display': 'inline-block',
213
+ 'vertical-align': 'middle',
214
+ // ...
215
+ },
216
+ }),
217
+ // presetTypography(),
218
+ presetWebFonts({
219
+ provider: 'none',
220
+ fonts: {
221
+ sans: [{
222
+ name: 'vw_textregular',
223
+ provider: 'none'
224
+ }],
225
+ novamono: [{
226
+ name: 'Nova Mono',
227
+ provider: 'none'
228
+ }],
229
+ mono: [{
230
+ name: 'Nova Mono',
231
+ provider: 'none'
232
+ }],
233
+ headlight: ['vw_headlight', 'system-ui', 'ui-sans-serif'],
234
+ headregular: [{
235
+ name: 'vw_headregular',
236
+ provider: 'none'
237
+ }],
238
+ headbold: [{
239
+ name: 'vw_headbold',
240
+ provider: 'none'
241
+ }],
242
+ textlight: [{
243
+ name: 'vw_textlight',
244
+ provider: 'none'
245
+ }],
246
+ textregular: [{
247
+ name: 'vw_textregular',
248
+ provider: 'none'
249
+ }],
250
+ textbold: [{
251
+ name: 'vw_textbold',
252
+ provider: 'none'
253
+ }]
254
+ }
255
+ })
256
+ ]
257
257
  })