spoko-design-system 0.0.1 → 0.0.5
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/icon.d.ts +8109 -10
- package/.github/workflows/deploy.yml +39 -39
- package/.stackblitzrc +5 -5
- package/.vscode/extensions.json +5 -4
- package/.vscode/launch.json +11 -11
- package/.vscode/settings.json +6 -0
- package/LICENSE +21 -21
- package/Layout/Header.astro +111 -89
- package/README.md +94 -69
- package/astro-i18next.config.mjs +17 -17
- package/astro-i18next.config.ts +10 -10
- package/astro.config.mjs +51 -42
- package/index.ts +6 -6
- package/package.json +25 -17
- package/public/astro-design-system-logo.svg +10 -10
- package/public/favicon.ico +0 -0
- package/public/favicon.svg +0 -0
- package/public/fonts/lg.svg +53 -53
- package/public/fonts/vwhead-bold-demo.html +549 -549
- package/public/fonts/vwhead-regular-demo.html +549 -549
- package/public/fonts/vwtext-bold-demo.html +549 -549
- package/public/fonts/vwtext-regular-demo.html +549 -549
- package/public/github.svg +3 -3
- package/public/grid_dot.svg +4 -4
- package/public/linkedin.svg +44 -44
- package/public/locales/en/translation.json +8 -5
- package/public/locales/pl/translation.json +8 -5
- package/public/make-scrollable-code-focusable.js +3 -3
- package/public/polo.blue.svg +29 -0
- package/public/spoko.space.svg +71 -0
- package/public/twitter.svg +46 -46
- package/sandbox.config.json +11 -11
- package/src/MyComponent.astro +8 -8
- package/src/components/Badge.vue +19 -19
- package/src/components/Badges.vue +24 -23
- package/src/components/Breadcrumbs.vue +108 -111
- package/src/components/Button.vue +37 -0
- package/src/components/ButtonCopy.vue +52 -0
- package/src/components/Card.astro +25 -0
- package/src/components/CategoryLink.astro +18 -0
- package/src/components/Copyright.astro +11 -11
- package/src/components/Date.astro +7 -0
- package/src/components/FuckRussia.vue +65 -65
- package/src/components/HandDrive.astro +29 -30
- package/src/components/HeadCommon.astro +40 -40
- package/src/components/HeadSEO.astro +41 -41
- package/src/components/Header/AstroLogo.astro +7 -27
- package/src/components/Header/Header.astro +44 -48
- package/src/components/Header/SkipToContent.astro +1 -1
- package/src/components/Headline.vue +60 -0
- package/src/components/Image.astro +30 -0
- package/src/components/Jumbatron.vue +46 -31
- package/src/components/LeftSidebar.astro +45 -44
- package/src/components/MainColors.vue +29 -29
- package/src/components/MainInput.vue +18 -18
- package/src/components/MainTable.vue +40 -45
- package/src/components/Modal.astro +30 -0
- package/src/components/PageContent.astro +14 -14
- package/src/components/PostHeader.astro +104 -0
- package/src/components/PrCode.vue +156 -0
- package/src/components/ProductNumber.astro +117 -0
- package/src/components/ProductTile.astro +54 -0
- package/src/components/RightSidebar.astro +15 -11
- package/src/components/SlimBanner.vue +59 -59
- package/src/components/TableOfContents.astro +11 -11
- package/src/components/Translations.vue +27 -0
- package/src/components/flags/FlagPL.vue +2 -2
- package/src/components/flags/FlagUA.vue +2 -2
- package/src/components/layout/Header.astro +50 -69
- package/src/config.ts +51 -42
- package/src/design.config.ts +73 -92
- package/src/env.d.ts +1 -1
- package/src/flag-poland.svg +1 -0
- package/src/flag-uk.svg +1 -0
- package/src/layouts/Layout.astro +43 -0
- package/src/layouts/MainLayout.astro +60 -50
- package/src/pages/components/badges.mdx +69 -35
- package/src/pages/components/breadcrumbs.mdx +136 -103
- package/src/pages/components/buttons.mdx +143 -60
- package/src/pages/components/card.mdx +40 -0
- package/src/pages/components/copyright.mdx +41 -24
- package/src/pages/components/flags.mdx +40 -26
- package/src/pages/components/fuck-russia.mdx +39 -16
- package/src/pages/components/hand-drive.mdx +38 -27
- package/src/pages/components/headline.mdx +148 -0
- package/src/pages/components/icons.astro +54 -45
- package/src/pages/components/image.mdx +502 -0
- package/src/pages/components/input.mdx +45 -14
- package/src/pages/components/jumbatron.mdx +71 -48
- package/src/pages/components/modal.mdx +64 -0
- package/src/pages/components/post-header.mdx +58 -0
- package/src/pages/components/pr-code.mdx +41 -0
- package/src/pages/components/product-number.mdx +65 -0
- package/src/pages/components/product-tile.mdx +39 -0
- package/src/pages/components/slimbanner.mdx +29 -27
- package/src/pages/components/table.mdx +39 -20
- package/src/pages/core/colors.mdx +8 -8
- package/src/pages/core/introduction.mdx +74 -68
- package/src/pages/core/shadows.astro +20 -20
- package/src/pages/core/typography.astro +46 -46
- package/src/pages/index.astro +70 -52
- package/src/pages/patterns/introduction.mdx +60 -61
- package/src/styles/_variables.scss +75 -75
- package/src/styles/base/_base.scss +166 -158
- package/src/styles/base/_typography.scss +147 -147
- package/src/styles/content.scss +66 -71
- package/src/styles/main.scss +22 -22
- package/tailwind.config.cjs +8 -8
- package/tsconfig.json +11 -11
- package/uno.config.ts +246 -227
- package/src/components/MainButton.vue +0 -26
- package/src/components/MainStatusPill.vue +0 -32
- package/src/pages/components/status-pill.mdx +0 -22
|
@@ -1,48 +1,71 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Jumbatron"
|
|
3
|
-
layout: "../../layouts/MainLayout.astro"
|
|
4
|
-
---
|
|
5
|
-
import Jumbatron from '../../components/Jumbatron.vue'
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
1
|
+
---
|
|
2
|
+
title: "Jumbatron"
|
|
3
|
+
layout: "../../layouts/MainLayout.astro"
|
|
4
|
+
---
|
|
5
|
+
import Jumbatron from '../../components/Jumbatron.vue'
|
|
6
|
+
import Button from '../../components/Button.vue'
|
|
7
|
+
|
|
8
|
+
## Jumbatron
|
|
9
|
+
|
|
10
|
+
This page is an example on how to document your button components, most of the copy was written by AI so don't take it very seriously.
|
|
11
|
+
|
|
12
|
+
Find the code for this page in the `src/pages/components/jumbatron.mdx` file.
|
|
13
|
+
<div class="component-preview">
|
|
14
|
+
<Jumbatron class="w-full">
|
|
15
|
+
<span slot="intro" set:html={`Lorem ipsum dolor sit amet, <span class=\"text-lightBlue-500\">consectetur</span> adipiscing elit.`} />
|
|
16
|
+
<p slot="subtitle"
|
|
17
|
+
class="mt-3 text-base text-gray-200 sm:mt-5 text-lg md:text-xl lg:mx-0 md:mt-5"
|
|
18
|
+
set:html="Nunc posuere massa eget turpis laoreet ultrices eget vel massa."
|
|
19
|
+
/>
|
|
20
|
+
<Button primary slot="cta"
|
|
21
|
+
href="#"
|
|
22
|
+
title="short text"
|
|
23
|
+
>
|
|
24
|
+
Read More
|
|
25
|
+
</Button>
|
|
26
|
+
</Jumbatron>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
<Jumbatron>
|
|
31
|
+
<span slot="intro" set:html="text-intro" />
|
|
32
|
+
<p slot="subtitle"
|
|
33
|
+
class="mt-3 text-base text-gray-200 sm:mt-5 text-lg md:text-xl lg:mx-0 md:mt-5"
|
|
34
|
+
set:html="subtitle"
|
|
35
|
+
/>
|
|
36
|
+
<Button primary slot="cta"
|
|
37
|
+
href="#"
|
|
38
|
+
title="short text"
|
|
39
|
+
>
|
|
40
|
+
Read More
|
|
41
|
+
</Button>
|
|
42
|
+
</Jumbatron>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Jumbatron smaller
|
|
46
|
+
|
|
47
|
+
<div class="component-preview">
|
|
48
|
+
<Jumbatron class="w-full" small>
|
|
49
|
+
<span slot="intro" set:html={`Lorem ipsum dolor sit amet, <span class=\"text-lightBlue-500\">consectetur</span> adipiscing elit.`} />
|
|
50
|
+
<p slot="subtitle"
|
|
51
|
+
class="mt-5 sm:mt-8 sm:flex sm:justify-center"
|
|
52
|
+
set:html="Nunc posuere massa eget turpis laoreet ultrices eget vel massa."
|
|
53
|
+
/>
|
|
54
|
+
</Jumbatron>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
<Jumbatron small>
|
|
59
|
+
<span slot="intro" set:html="text-intro" />
|
|
60
|
+
<p slot="subtitle"
|
|
61
|
+
class="mt-5 sm:mt-8 sm:flex sm:justify-center"
|
|
62
|
+
set:html="subtitle"
|
|
63
|
+
/>
|
|
64
|
+
<Button primary slot="cta"
|
|
65
|
+
href="#"
|
|
66
|
+
title="short text"
|
|
67
|
+
>
|
|
68
|
+
Read More
|
|
69
|
+
</Button>
|
|
70
|
+
</Jumbatron>
|
|
71
|
+
```
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Modal"
|
|
3
|
+
layout: "../../layouts/MainLayout.astro"
|
|
4
|
+
---
|
|
5
|
+
import Modal from '../../components/Modal.astro'
|
|
6
|
+
import Button from '../../components/Button.vue'
|
|
7
|
+
import { Icon } from 'astro-icon/components';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Modal
|
|
11
|
+
|
|
12
|
+
Native modal window based on `<dialog>` tag with `::backdrop` CSS pseudo-element (pure CSS3 modal window).
|
|
13
|
+
#
|
|
14
|
+
**Documentation:**
|
|
15
|
+
|
|
16
|
+
- https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog
|
|
17
|
+
- https://developer.mozilla.org/en-US/docs/Web/CSS/::backdrop
|
|
18
|
+
|
|
19
|
+
### Modal window
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
<div class="component-preview">
|
|
23
|
+
<Modal id="dialog" open="Open modal">
|
|
24
|
+
<main slot="main">
|
|
25
|
+
<p>Some extra content you would like here</p>
|
|
26
|
+
<hr />
|
|
27
|
+
</main>
|
|
28
|
+
<Button primary slot="close" class="mt-4">Close</Button>
|
|
29
|
+
</Modal>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
<Modal id="dialog" open="Open modal">
|
|
34
|
+
<main slot="main">
|
|
35
|
+
<p>Some extra content you would like here</p>
|
|
36
|
+
<hr />
|
|
37
|
+
<img width="60" height="80" src="/assets/logo.svg" alt="Astro logo">
|
|
38
|
+
</main>
|
|
39
|
+
<Button primary slot="close" class="mt-4">Close</Button>
|
|
40
|
+
</Modal>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Modal with different close button
|
|
44
|
+
|
|
45
|
+
<div class="component-preview">
|
|
46
|
+
<Modal id="dialog2" open="Open modal">
|
|
47
|
+
<main slot="main">
|
|
48
|
+
<p>Some extra content you would like here</p>
|
|
49
|
+
</main>
|
|
50
|
+
<Button primary slot="close" class="mt-4"><Icon name="octicon:x-24" /></Button>
|
|
51
|
+
</Modal>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
```js
|
|
55
|
+
<Modal id="dialog2" open="Open modal">
|
|
56
|
+
<main slot="main">
|
|
57
|
+
<p>Some extra content you would like here</p>
|
|
58
|
+
<img width="60" height="80" src="/assets/logo.svg" alt="Astro logo">
|
|
59
|
+
</main>
|
|
60
|
+
<Button primary slot="close" class="mt-4"><Icon name="octicon:x-24" /></Button>
|
|
61
|
+
</Modal>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "PostHeader"
|
|
3
|
+
layout: "../../layouts/MainLayout.astro"
|
|
4
|
+
---
|
|
5
|
+
import PostHeader from '../../components/PostHeader.astro'
|
|
6
|
+
export const author = { firstName: 'Szymon', name: 'CNK' }
|
|
7
|
+
export const categories = [{"name":"Tools & garage accessories","uri":"#"}, {"name":"Lorem Ipsum","uri":"#"}]
|
|
8
|
+
export const date = "2023-07-13T01:35:03"
|
|
9
|
+
|
|
10
|
+
## PostHeader
|
|
11
|
+
|
|
12
|
+
WordPress PostHeader - post top component for WordPress Single Post template data like categories etc. comes from WP Rest API.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
<div class="component-preview">
|
|
16
|
+
<div class="relative w-full">
|
|
17
|
+
<PostHeader
|
|
18
|
+
author={author}
|
|
19
|
+
categories={categories}
|
|
20
|
+
title="Lorem Ipsum"
|
|
21
|
+
date={date}
|
|
22
|
+
image="https://img.freepik.com/free-photo/morskie-oko-tatry_1204-510.jpg?w=1380&t=st=1706297574~exp=1706298174~hmac=5c93e7317e7dbe602d5dcd708c5b9708ffabcb5e8ab2b7f2790941975dfcefe4"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
<div class="relative">
|
|
29
|
+
<PostHeader
|
|
30
|
+
author={ { firstName: 'Szymon', name: 'CNK' } }
|
|
31
|
+
categories={ [{"name":"Tools & garage accessories","uri":"/category/garage/tools-garage-accessories/"}, , {"name":"Lorem Ipsum","uri":"#"}] }
|
|
32
|
+
title="Lorem Ipsum"
|
|
33
|
+
date="2023-07-13T01:35:03"
|
|
34
|
+
image="https://img.freepik.com/free-photo/morskie-oko-tatry_1204-510.jpg?w=1380&t=st=1706297574~exp=1706298174~hmac=5c93e7317e7dbe602d5dcd708c5b9708ffabcb5e8ab2b7f2790941975dfcefe4"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## PostHeader - only title
|
|
41
|
+
|
|
42
|
+
<div class="component-preview">
|
|
43
|
+
<div class="relative w-full">
|
|
44
|
+
<PostHeader
|
|
45
|
+
title="Lorem Ipsum"
|
|
46
|
+
image="https://img.freepik.com/free-photo/painting-mountain-lake-with-mountain-background_188544-9126.jpg?w=1380&t=st=1706297408~exp=1706298008~hmac=34fe549db6a665d24269d38a8ecdd7eb3f82cfea6346c8a4039ee3c03b62aad8"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
<div class="relative">
|
|
53
|
+
<PostHeader
|
|
54
|
+
title="Lorem Ipsum"
|
|
55
|
+
image="https://img.freepik.com/free-photo/painting-mountain-lake-with-mountain-background_188544-9126.jpg?w=1380&t=st=1706297408~exp=1706298008~hmac=34fe549db6a665d24269d38a8ecdd7eb3f82cfea6346c8a4039ee3c03b62aad8"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "PrCode"
|
|
3
|
+
layout: "../../layouts/MainLayout.astro"
|
|
4
|
+
---
|
|
5
|
+
import PrCode from '../../components/PrCode.vue'
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## PR-Code
|
|
9
|
+
|
|
10
|
+
PR Code are Production Codes for all of the installed equipment in the vehicle and is used by manufacturers including VW, Audi, Seat, Skoda, Porsche, Lamborghini etc.
|
|
11
|
+
PR Codes contain 3 characters comprising of letters and numbers.
|
|
12
|
+
|
|
13
|
+
PR codes are located on vehicle´s build sticker that is located on first pages of cars warranty booklet or there should be one in a trunk as well usually under the carpet or in spare tire area.
|
|
14
|
+
|
|
15
|
+
They are important when purchasing spare parts as they provide information about the manufacturer, make, model, year of manufacture, and other vehicle details.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
#### import:
|
|
21
|
+
|
|
22
|
+
```js
|
|
23
|
+
import PrCode from 'spoko-design-system/src/components/PrCode.vue'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### PR-Code
|
|
28
|
+
|
|
29
|
+
<div class="component-preview">
|
|
30
|
+
<div class="bg-white p-6 w-full">
|
|
31
|
+
<PrCode prcode="2JP" />
|
|
32
|
+
<PrCode prcode="1ZJ" />
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
<PrCode prcode="2JP" />
|
|
38
|
+
<PrCode prcode="1ZJ" />
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "ProductNumber"
|
|
3
|
+
layout: "../../layouts/MainLayout.astro"
|
|
4
|
+
---
|
|
5
|
+
import ProductNumber from '../../components/ProductNumber.astro'
|
|
6
|
+
|
|
7
|
+
## ProductNumber
|
|
8
|
+
|
|
9
|
+
ProductNumber - with additional formatting adding spacing for Volkswagen product numbers + additional copy button for easier copying.
|
|
10
|
+
|
|
11
|
+
<div class="component-preview">
|
|
12
|
+
<div class="grid grid-cols-2 lg:grid-cols-4 gap-4 w-full bg-white p-y-5 px-4">
|
|
13
|
+
<ProductNumber
|
|
14
|
+
big
|
|
15
|
+
productNumber="6R0920870F"
|
|
16
|
+
class="mb-2"
|
|
17
|
+
/>
|
|
18
|
+
|
|
19
|
+
<ProductNumber
|
|
20
|
+
big
|
|
21
|
+
isPdp
|
|
22
|
+
productNumber="000051443F"
|
|
23
|
+
class="mb-2"
|
|
24
|
+
/>
|
|
25
|
+
|
|
26
|
+
<ProductNumber
|
|
27
|
+
isPdp
|
|
28
|
+
productNumber="WHT005227"
|
|
29
|
+
class="mb-2"
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
<ProductNumber
|
|
33
|
+
isPdp
|
|
34
|
+
productNumber="N0385491"
|
|
35
|
+
class="mb-2"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
```js
|
|
41
|
+
<ProductNumber
|
|
42
|
+
big
|
|
43
|
+
productNumber="6R0920870F"
|
|
44
|
+
class="mb-2"
|
|
45
|
+
/>
|
|
46
|
+
|
|
47
|
+
<ProductNumber
|
|
48
|
+
big
|
|
49
|
+
isPdp
|
|
50
|
+
productNumber="000051443F"
|
|
51
|
+
class="mb-2"
|
|
52
|
+
/>
|
|
53
|
+
|
|
54
|
+
<ProductNumber
|
|
55
|
+
isPdp
|
|
56
|
+
productNumber="WHT005227"
|
|
57
|
+
class="mb-2"
|
|
58
|
+
/>
|
|
59
|
+
|
|
60
|
+
<ProductNumber
|
|
61
|
+
isPdp
|
|
62
|
+
productNumber="N0385491"
|
|
63
|
+
class="mb-2"
|
|
64
|
+
/>
|
|
65
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "ProductTile"
|
|
3
|
+
layout: "../../layouts/MainLayout.astro"
|
|
4
|
+
---
|
|
5
|
+
import ProductTile from '../../components/ProductTile.astro'
|
|
6
|
+
|
|
7
|
+
export const productObject = {
|
|
8
|
+
name: 'Combi-instrument MFA+',
|
|
9
|
+
url: 'https://google.com',
|
|
10
|
+
number: '6R0920870F',
|
|
11
|
+
photo: 'https://img.freepik.com/darmowe-wektory/tlo-retro-modeli-geometrycznych_52683-17902.jpg?w=1380&t=st=1706311337'
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
## ProductTile
|
|
15
|
+
|
|
16
|
+
ProductTile - product link component which can be used for carousels, section with related products, recently added etc.
|
|
17
|
+
|
|
18
|
+
<div class="component-preview">
|
|
19
|
+
<div class="flex flex-wrap bg-white w-full p-4 pb-0">
|
|
20
|
+
|
|
21
|
+
<ProductTile productObject={productObject} />
|
|
22
|
+
<ProductTile productObject={productObject} />
|
|
23
|
+
<ProductTile productObject={productObject} />
|
|
24
|
+
<ProductTile productObject={productObject} />
|
|
25
|
+
<ProductTile productObjec={productObject}t />
|
|
26
|
+
<ProductTile productObject={productObject} />
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
```js
|
|
31
|
+
export const productObject = {
|
|
32
|
+
name: 'Combi-instrument MFA+',
|
|
33
|
+
url: 'https://google.com',
|
|
34
|
+
number: '6R0920870F',
|
|
35
|
+
photo: 'https://img.freepik.com/darmowe-wektory/tlo-retro-modeli-geometrycznych_52683-17902.jpg?w=1380&t=st=1706311337'
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
<ProductTile productObject={productObject} />
|
|
39
|
+
```
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "SlimBanner"
|
|
3
|
-
layout: "../../layouts/MainLayout.astro"
|
|
4
|
-
---
|
|
5
|
-
import SlimBanner from '../../components/SlimBanner.vue'
|
|
6
|
-
|
|
7
|
-
## SlimBanner
|
|
8
|
-
|
|
9
|
-
SlimBanner - solidarity with Ukraine.
|
|
10
|
-
|
|
11
|
-
<div class="component-preview">
|
|
12
|
-
<SlimBanner
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
transition:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
---
|
|
2
|
+
title: "SlimBanner"
|
|
3
|
+
layout: "../../layouts/MainLayout.astro"
|
|
4
|
+
---
|
|
5
|
+
import SlimBanner from '../../components/SlimBanner.vue'
|
|
6
|
+
|
|
7
|
+
## SlimBanner
|
|
8
|
+
|
|
9
|
+
SlimBanner - solidarity with Ukraine.
|
|
10
|
+
|
|
11
|
+
<div class="component-preview">
|
|
12
|
+
<SlimBanner
|
|
13
|
+
class="w-full"
|
|
14
|
+
client:load
|
|
15
|
+
showCloseButton
|
|
16
|
+
transition:name="slim-banner"
|
|
17
|
+
transition:persist
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
<SlimBanner
|
|
23
|
+
class="w-full"
|
|
24
|
+
client:load
|
|
25
|
+
showCloseButton
|
|
26
|
+
transition:name="slim-banner"
|
|
27
|
+
transition:persist
|
|
28
|
+
/>
|
|
29
|
+
```
|
|
@@ -1,20 +1,39 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Table"
|
|
3
|
-
layout: "../../layouts/MainLayout.astro"
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
import MainTable from '../../components/MainTable.vue'
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
## Primary table
|
|
11
|
-
|
|
12
|
-
<div class="component-preview">
|
|
13
|
-
<MainTable></MainTable>
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
### Code
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
---
|
|
2
|
+
title: "Table"
|
|
3
|
+
layout: "../../layouts/MainLayout.astro"
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import MainTable from '../../components/MainTable.vue'
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Primary table
|
|
11
|
+
|
|
12
|
+
<div class="component-preview">
|
|
13
|
+
<MainTable></MainTable>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
### Code
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
const tableData = [
|
|
20
|
+
{
|
|
21
|
+
id: 1,
|
|
22
|
+
name: "Lorem Ipsum",
|
|
23
|
+
email: "lorem@email.com",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 2,
|
|
27
|
+
name: "Chuck Norris",
|
|
28
|
+
email: "ipsum@email.com",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: 3,
|
|
32
|
+
name: "Ipsum Lorem",
|
|
33
|
+
email: "lorem@email.com",
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
<MainTable :data="data"></MainTable>
|
|
39
|
+
```
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
---
|
|
2
|
-
layout: ../../layouts/MainLayout.astro
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
import MainColors from '../../components/MainColors.vue';
|
|
6
|
-
|
|
7
|
-
<h1>Colors</h1>
|
|
8
|
-
<MainColors />
|
|
1
|
+
---
|
|
2
|
+
layout: ../../layouts/MainLayout.astro
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
import MainColors from '../../components/MainColors.vue';
|
|
6
|
+
|
|
7
|
+
<h1>Colors</h1>
|
|
8
|
+
<MainColors />
|
|
@@ -1,68 +1,74 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Introduction
|
|
3
|
-
description: Docs intro
|
|
4
|
-
layout: ../../layouts/MainLayout.astro
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
{ text: "
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
1
|
+
---
|
|
2
|
+
title: Introduction
|
|
3
|
+
description: Docs intro
|
|
4
|
+
layout: ../../layouts/MainLayout.astro
|
|
5
|
+
---
|
|
6
|
+
import Button from '../../components/Button.vue'
|
|
7
|
+
|
|
8
|
+
# Spoko Design System Theme
|
|
9
|
+
|
|
10
|
+
SDS is the easiest way to start with some my websites.
|
|
11
|
+
Since Astro is compatible with many frameworks, we can import components and document them right in the markdown files.
|
|
12
|
+
|
|
13
|
+
The project is still in the development phase, use at your own risk ;-)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Getting started
|
|
17
|
+
|
|
18
|
+
### Adding new sections
|
|
19
|
+
|
|
20
|
+
Although it's not required, you can create folders for new sections.
|
|
21
|
+
|
|
22
|
+
To show the section on the left side navigation, add it to the navigation config file at `src/config.ts`.
|
|
23
|
+
|
|
24
|
+
Example:
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
export const SIDEBAR = [
|
|
28
|
+
{ text: "Core", header: true },
|
|
29
|
+
{ text: "Introduction", link: "/core/introduction" },
|
|
30
|
+
...,
|
|
31
|
+
{ text: "Components", header: true },
|
|
32
|
+
{ text: "Buttons", link: "/components/buttons" },
|
|
33
|
+
...,
|
|
34
|
+
{ text: "New section", header: true },
|
|
35
|
+
{ text: "New component", link: "/new-section/new-component.md" },
|
|
36
|
+
];
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Adding new pages
|
|
40
|
+
|
|
41
|
+
To add new pages just create an .astro or markdown file in `src/pages/[section]/my-page.mdx`. Remember to add it to the navigation config in `src/config.ts` so it shows up in the left side navigation.
|
|
42
|
+
|
|
43
|
+
You're free to organize the pages however you want.
|
|
44
|
+
|
|
45
|
+
### Customizing Core section (colors, typography, shadows...)
|
|
46
|
+
|
|
47
|
+
If you want to customize the default colors, typography or shadows you can find the configuration file at `src/design.config.ts`. I think I have prepared enough shades of blue ;-)
|
|
48
|
+
|
|
49
|
+
Feel free to add new pages to the Core section
|
|
50
|
+
|
|
51
|
+
### Customizing the page layout
|
|
52
|
+
|
|
53
|
+
You can find the css for the pages in `src/styles/content.scss`.
|
|
54
|
+
|
|
55
|
+
### Adding mew components
|
|
56
|
+
|
|
57
|
+
Astro is great for design systems because it allows you to import components from different frameworks like react, vue or svelte.
|
|
58
|
+
|
|
59
|
+
To get started check how the `Button` component is used in the `src/pages/buttons.mdx` file.
|
|
60
|
+
|
|
61
|
+
You can import your component library or create your own and document it easily.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### `.component-preview` utility
|
|
65
|
+
|
|
66
|
+
There's a class called `.component-preview` that you can use to wrap your component in a grid, and it will look like this:
|
|
67
|
+
|
|
68
|
+
<div class="component-preview">
|
|
69
|
+
<Button primary>Your component</Button>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
### Have fun!
|
|
73
|
+
|
|
74
|
+
Spoko Design System template was made by **[@spokospace](https://spoko.space)** for personal and commercial use.
|