spoko-design-system 0.0.6 → 0.0.8
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/README.md +15 -2
- package/astro.config.mjs +55 -7
- package/package.json +23 -8
- package/public/pagefind.yml +4 -0
- package/src/components/Button.vue +10 -2
- package/src/components/ButtonCopy.vue +1 -6
- package/src/components/Card.astro +2 -2
- package/src/components/Carousel.astro +41 -0
- package/src/components/HeadCommon.astro +3 -3
- package/src/components/Header/Header.astro +171 -0
- package/src/components/Image.astro +0 -2
- package/src/components/Jumbatron.vue +17 -18
- package/src/components/MainTable.vue +20 -26
- package/src/components/Modal.astro +1 -4
- package/src/components/PageContent.astro +0 -1
- package/src/components/ProductTile.astro +30 -32
- package/src/components/RightSidebar.astro +0 -3
- package/src/config.ts +1 -0
- package/src/design.config.ts +4 -0
- package/src/layouts/Layout.astro +2 -2
- package/src/layouts/MainLayout.astro +7 -7
- package/src/pages/components/badges.mdx +17 -31
- package/src/pages/components/breadcrumbs.mdx +9 -6
- package/src/pages/components/buttons.mdx +106 -13
- package/src/pages/components/card.mdx +5 -5
- package/src/pages/components/carousel.mdx +20 -0
- package/src/pages/components/copyright.mdx +3 -2
- package/src/pages/components/flags.mdx +3 -2
- package/src/pages/components/fuck-russia.mdx +1 -1
- package/src/pages/components/hand-drive.mdx +4 -4
- package/src/pages/components/headline.mdx +19 -13
- package/src/pages/components/image.mdx +17 -5
- package/src/pages/components/input.mdx +1 -1
- package/src/pages/components/jumbatron.mdx +5 -3
- package/src/pages/components/modal.mdx +3 -3
- package/src/pages/components/post-header.mdx +3 -1
- package/src/pages/components/pr-code.mdx +6 -10
- package/src/pages/components/product-number.mdx +2 -1
- package/src/pages/components/product-tile.mdx +1 -1
- package/src/pages/components/slimbanner.mdx +1 -1
- package/src/pages/components/table.mdx +74 -4
- package/src/pages/core/colors.mdx +3 -1
- package/src/pages/core/introduction.mdx +1 -1
- package/src/pages/index.astro +8 -6
- package/src/styles/_variables.scss +6 -15
- package/src/styles/base/_base.scss +14 -5
- package/src/styles/base/_typography.scss +1 -80
- package/src/styles/content.scss +6 -9
- package/src/styles/main.scss +0 -16
- package/uno.config.ts +13 -11
- package/Layout/Header.astro +0 -111
package/src/styles/content.scss
CHANGED
|
@@ -18,16 +18,14 @@
|
|
|
18
18
|
}
|
|
19
19
|
&>h3 {
|
|
20
20
|
font-size: 15pt;
|
|
21
|
-
font-weight: 600;
|
|
22
21
|
}
|
|
23
22
|
&>h4 {
|
|
24
23
|
font-size: 13pt;
|
|
25
24
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// color: theme("colors.slate.600");
|
|
25
|
+
|
|
26
|
+
ul {
|
|
27
|
+
@apply list-disc pl-5
|
|
28
|
+
}
|
|
31
29
|
}
|
|
32
30
|
|
|
33
31
|
code {
|
|
@@ -36,7 +34,7 @@
|
|
|
36
34
|
}
|
|
37
35
|
|
|
38
36
|
.component-preview {
|
|
39
|
-
@apply bg-blue-600 bg-opacity-5 px-
|
|
37
|
+
@apply bg-blue-600 bg-opacity-5 px-4 py-4 mx-0 flex items-center overflow-x-auto sm:(p-8);
|
|
40
38
|
gap: 1rem;
|
|
41
39
|
border-radius: 0.33rem;
|
|
42
40
|
border: 1px solid theme("colors.slate.200");
|
|
@@ -49,7 +47,6 @@
|
|
|
49
47
|
}
|
|
50
48
|
}
|
|
51
49
|
|
|
52
|
-
|
|
53
50
|
table {
|
|
54
51
|
@apply table-auto text-left border bg-white shadow-md;
|
|
55
52
|
|
|
@@ -64,4 +61,4 @@ table {
|
|
|
64
61
|
thead {
|
|
65
62
|
@apply bg-gray-100;
|
|
66
63
|
}
|
|
67
|
-
}
|
|
64
|
+
}
|
package/src/styles/main.scss
CHANGED
|
@@ -3,20 +3,4 @@
|
|
|
3
3
|
@import "base/typography";
|
|
4
4
|
@import "base/base";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
6
|
@import "content.scss";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// body {
|
|
16
|
-
// font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
17
|
-
// Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
|
|
18
|
-
// }
|
|
19
|
-
|
|
20
|
-
// @tailwind base;
|
|
21
|
-
// @tailwind components;
|
|
22
|
-
// @tailwind utilities;
|
package/uno.config.ts
CHANGED
|
@@ -29,7 +29,7 @@ export default defineConfig({
|
|
|
29
29
|
],
|
|
30
30
|
shortcuts: [
|
|
31
31
|
['headline','font-headlight font-bold '],
|
|
32
|
-
['badge', 'px-1.5 py-px text-white text-xs mb-1 max-w-fit'],
|
|
32
|
+
['badge', 'px-1.5 py-px text-white text-xs mb-1 max-w-fit whitespace-nowrap'],
|
|
33
33
|
['img--overlay','after:(content-empty bg-black bg-opacity-[.03] absolute w-full h-full top-0)'],
|
|
34
34
|
['img--4/3', 'aspect-[4/3] relative object-cover bg-gray-100 h-auto max-w-full'],
|
|
35
35
|
['img--3/4', 'aspect-[3/4] relative object-cover bg-gray-100 h-auto max-w-full'],
|
|
@@ -40,17 +40,19 @@ export default defineConfig({
|
|
|
40
40
|
['img--16/9', 'aspect-video relative object-cover bg-gray-100 h-auto max-w-full'],
|
|
41
41
|
['img--small', 'w-60 sm:(w-22) xl:(w-30)'],
|
|
42
42
|
['img--medium', 'w-60'],
|
|
43
|
+
['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
44
|
|
|
44
|
-
['btn-primary', 'bg-lightBlue-500 border border-transparent font-medium hover:bg-lightBlue-600 inline-flex items-center justify-center
|
|
45
|
-
['btn-
|
|
46
|
-
['btn-
|
|
47
|
-
['btn-
|
|
48
|
-
['btn-
|
|
49
|
-
|
|
50
|
-
['btn-
|
|
51
|
-
['btn-
|
|
52
|
-
['btn-
|
|
53
|
-
|
|
45
|
+
['btn-primary', 'bg-lightBlue-500 border border-transparent font-medium hover:bg-lightBlue-600 inline-flex items-center justify-center shadow text-base text-white'],
|
|
46
|
+
['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)'],
|
|
47
|
+
['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'],
|
|
48
|
+
['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)'],
|
|
49
|
+
['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'],
|
|
50
|
+
['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 '],
|
|
51
|
+
['btn-text', 'text-gray-400 border border-transparent hover:underline transition-all'],
|
|
52
|
+
['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'],
|
|
53
|
+
['btn-normal', 'md:px-10 md:py-2 md:text-lg px-8 py-3 whitespace-nowrap'],
|
|
54
|
+
['btn-sm', 'px-6 py-2 text-sm whitespace-nowrap '],
|
|
55
|
+
['btn-xs', 'px-4 py-1 text-sm whitespace-nowrap '],
|
|
54
56
|
['product-number','font-mono content-center flex flex-wrap flex-col content-start pr-5 bg-white'],
|
|
55
57
|
['main','text-gray-700 dark:text-gray-200 dark:bg-blue-700 pt-24 sm:pt-14 relative'],
|
|
56
58
|
['nav','bg-white dark:bg-black absolute sm:fixed w-full top-0 z-40 sm:z-30 max-w-screen'],
|
package/Layout/Header.astro
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { Icon } from "astro-icon/components";
|
|
3
|
-
import Search from "astro-pagefind/components/Search";
|
|
4
|
-
import { t } from "i18next";
|
|
5
|
-
const { translation, locale } = Astro.props;
|
|
6
|
-
|
|
7
|
-
import { Image } from "astro:assets";
|
|
8
|
-
import vwLogo from "./../../../public/vw.svg";
|
|
9
|
-
|
|
10
|
-
const likes = {
|
|
11
|
-
list: {
|
|
12
|
-
ids: [0, 1, 2],
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
<nav class="nav print-hidden" itemscope itemtype="http://schema.org/WPHeader">
|
|
18
|
-
<div class="mx-auto px-4 shadow-md">
|
|
19
|
-
<div
|
|
20
|
-
class="relative flex items-center justify-between h-24 sm:h-14 flex-wrap pt-1 sm:pt-0"
|
|
21
|
-
>
|
|
22
|
-
<div class="flex items-center justify-start sm:items-stretch order-1">
|
|
23
|
-
<div class="flex-shrink-0 flex items-center h-8">
|
|
24
|
-
<a
|
|
25
|
-
class="flex items-center"
|
|
26
|
-
href={locale !== "en" ? `/${locale}/` : "/"}
|
|
27
|
-
title={t("catalog.title")}
|
|
28
|
-
>
|
|
29
|
-
<Image
|
|
30
|
-
src={vwLogo}
|
|
31
|
-
alt="VW"
|
|
32
|
-
width="25"
|
|
33
|
-
height="25"
|
|
34
|
-
class="logo mr-2 dark:text-white hover:animate-spin"
|
|
35
|
-
/>
|
|
36
|
-
<span class="text-xl brand text-left leading-none dark:text-white"
|
|
37
|
-
>catalog
|
|
38
|
-
<span
|
|
39
|
-
class="text-xs block leading-none -mt-0.5 text-lightBlue-500"
|
|
40
|
-
><strong class="text-black font-400">polo</strong>blue</span
|
|
41
|
-
>
|
|
42
|
-
</span>
|
|
43
|
-
</a>
|
|
44
|
-
</div>
|
|
45
|
-
<div class="hidden sm:(block ml-6)">
|
|
46
|
-
<div class="flex space-x-4" itemprop="hasPart">
|
|
47
|
-
<a
|
|
48
|
-
href={`https://polo.blue${locale === "pl" ? "/pl" : ""}`}
|
|
49
|
-
class="text-gray-400 hover:bg-blue-700 hover:text-white px-3 py-1 rounded-full text-sm font-medium"
|
|
50
|
-
title="Polo 6R Blog"
|
|
51
|
-
itemprop="url">Blog</a
|
|
52
|
-
>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
|
|
57
|
-
<div
|
|
58
|
-
class="relative w-full order-4 h-10 md:(w-64 ml-4 mr-auto order-2 block)"
|
|
59
|
-
>
|
|
60
|
-
<Search
|
|
61
|
-
id="search"
|
|
62
|
-
transition:name="search-field"
|
|
63
|
-
transition:persist
|
|
64
|
-
className="search-container"
|
|
65
|
-
uiOptions={{
|
|
66
|
-
showImages: true,
|
|
67
|
-
showEmptyFilters: false,
|
|
68
|
-
resetStyles: true,
|
|
69
|
-
translations: {
|
|
70
|
-
clear_search: t("search.clear"),
|
|
71
|
-
placeholder: t("search.type-to-search"),
|
|
72
|
-
search_label: t("search.search_label"),
|
|
73
|
-
filters_label: t("search.filters"),
|
|
74
|
-
zero_results: t("search.zero-results"),
|
|
75
|
-
many_results: `[COUNT] ${t("search.results-for")} [SEARCH_TERM]`,
|
|
76
|
-
one_result: `[COUNT] ${t("search.result-for")} [SEARCH_TERM]`,
|
|
77
|
-
alt_search: t("search.alt_search"),
|
|
78
|
-
search_suggestion: t("search.search_suggestion"),
|
|
79
|
-
searching: t("search.searching"),
|
|
80
|
-
load_more: t("search.load-more"),
|
|
81
|
-
},
|
|
82
|
-
}}
|
|
83
|
-
/>
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
<div
|
|
87
|
-
class="flex items-center pr-0 ml-auto sm:ml-6 -mr-2 dark:text-gray-400 print:hidden order-3 w-20 justify-end md:(static inset-auto order-3)"
|
|
88
|
-
itemprop="hasPart"
|
|
89
|
-
itemscope
|
|
90
|
-
itemtype="http://schema.org/SiteNavigationElement"
|
|
91
|
-
>
|
|
92
|
-
<a
|
|
93
|
-
class="icon-btn mx-2"
|
|
94
|
-
title={t("button.toggle_langs")}
|
|
95
|
-
href={translation}
|
|
96
|
-
itemprop="url"
|
|
97
|
-
data-astro-reload
|
|
98
|
-
>
|
|
99
|
-
<Icon name="carbon:language" />
|
|
100
|
-
</a>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
</nav>
|
|
105
|
-
|
|
106
|
-
<style lang="scss">
|
|
107
|
-
.logo {
|
|
108
|
-
max-height: 25px;
|
|
109
|
-
max-width: 25px;
|
|
110
|
-
}
|
|
111
|
-
</style>
|