spoko-design-system 0.0.2 → 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 +10291 -2199
- package/.vscode/extensions.json +2 -1
- package/.vscode/settings.json +6 -0
- package/Layout/Header.astro +3 -3
- package/README.md +38 -13
- package/astro.config.mjs +24 -18
- package/package.json +79 -75
- package/public/favicon.ico +0 -0
- package/public/favicon.svg +0 -0
- package/public/locales/en/translation.json +5 -2
- package/public/locales/pl/translation.json +5 -2
- package/src/components/Badge.vue +1 -1
- package/src/components/Badges.vue +1 -1
- package/src/components/Button.vue +17 -8
- package/src/components/ButtonCopy.vue +52 -0
- package/src/components/Card.astro +25 -0
- package/src/components/HandDrive.astro +0 -1
- package/src/components/Header/Header.astro +1 -1
- package/src/components/Headline.vue +37 -5
- package/src/components/Image.astro +30 -0
- package/src/components/Jumbatron.vue +23 -8
- package/src/components/LeftSidebar.astro +9 -8
- package/src/components/PrCode.vue +156 -0
- package/src/components/ProductNumber.astro +117 -0
- package/src/components/ProductTile.astro +54 -0
- package/src/components/layout/Header.astro +1 -1
- package/src/config.ts +5 -1
- package/src/layouts/Layout.astro +0 -8
- package/src/layouts/MainLayout.astro +6 -14
- package/src/pages/components/badges.mdx +39 -7
- package/src/pages/components/breadcrumbs.mdx +37 -1
- package/src/pages/components/buttons.mdx +92 -11
- package/src/pages/components/card.mdx +40 -0
- package/src/pages/components/hand-drive.mdx +6 -1
- package/src/pages/components/headline.mdx +22 -3
- package/src/pages/components/icons.astro +23 -21
- package/src/pages/components/image.mdx +502 -0
- package/src/pages/components/jumbatron.mdx +33 -10
- package/src/pages/components/modal.mdx +8 -2
- package/src/pages/components/post-header.mdx +24 -2
- 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/table.mdx +19 -0
- package/src/pages/core/introduction.mdx +3 -3
- package/src/pages/index.astro +25 -22
- package/src/styles/base/_base.scss +8 -0
- package/src/styles/content.scss +17 -1
- package/uno.config.ts +26 -7
|
@@ -3,6 +3,9 @@ title: "Buttons"
|
|
|
3
3
|
layout: "../../layouts/MainLayout.astro"
|
|
4
4
|
---
|
|
5
5
|
import Button from '../../components/Button.vue'
|
|
6
|
+
import ButtonCopy from '../../components/ButtonCopy.vue'
|
|
7
|
+
import { Icon } from 'astro-icon/components';
|
|
8
|
+
import { t } from "i18next";
|
|
6
9
|
|
|
7
10
|
## All buttons
|
|
8
11
|
|
|
@@ -13,27 +16,34 @@ Find the code for this page in the `src/pages/components/buttons.md` file.
|
|
|
13
16
|
<div class="component-preview">
|
|
14
17
|
<Button primary>Primary</Button>
|
|
15
18
|
<Button secondary>Secondary</Button>
|
|
16
|
-
<Button
|
|
17
|
-
|
|
19
|
+
<Button tertiary>Tertiary</Button>
|
|
20
|
+
|
|
21
|
+
<Button text medium>Text</Button>
|
|
22
|
+
<Button tag small>Tag Name</Button>
|
|
18
23
|
</div>
|
|
19
24
|
|
|
20
25
|
```js
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
<Button primary>Primary</Button>
|
|
27
|
+
<Button secondary>Secondary</Button>
|
|
28
|
+
<Button tertiary>Tertiary</Button>
|
|
29
|
+
<Button text medium>Text</Button>
|
|
30
|
+
<Button tag small>Tag Name</Button>
|
|
25
31
|
```
|
|
26
32
|
|
|
27
|
-
## Primary button
|
|
33
|
+
## Primary button `<button>`
|
|
28
34
|
|
|
29
35
|
We use the primary button for main actions like saving a form or creating a new item.
|
|
30
36
|
|
|
31
37
|
<div class="component-preview">
|
|
32
|
-
<Button primary>Primary
|
|
38
|
+
<Button primary>Primary</Button>
|
|
39
|
+
<Button primary medium>Primary</Button>
|
|
40
|
+
<Button primary small>Primary</Button>
|
|
33
41
|
</div>
|
|
34
42
|
|
|
35
43
|
```js
|
|
36
|
-
<Button primary>Primary
|
|
44
|
+
<Button primary>Primary</Button>
|
|
45
|
+
<Button primary medium>Primary</Button>
|
|
46
|
+
<Button primary small>Primary</Button>
|
|
37
47
|
```
|
|
38
48
|
|
|
39
49
|
## Secondary button
|
|
@@ -42,11 +52,15 @@ Secondary buttons accompany primary buttons to provide additional actions.
|
|
|
42
52
|
For example, cancel buttons are secondary buttons.
|
|
43
53
|
|
|
44
54
|
<div class="component-preview">
|
|
45
|
-
<Button secondary>Secondary
|
|
55
|
+
<Button secondary>Secondary</Button>
|
|
56
|
+
<Button secondary medium>Secondary</Button>
|
|
57
|
+
<Button secondary small>Secondary</Button>
|
|
46
58
|
</div>
|
|
47
59
|
|
|
48
60
|
```js
|
|
49
|
-
<Button secondary>Secondary
|
|
61
|
+
<Button secondary>Secondary</Button>
|
|
62
|
+
<Button secondary medium>Secondary</Button>
|
|
63
|
+
<Button secondary small>Secondary</Button>
|
|
50
64
|
```
|
|
51
65
|
|
|
52
66
|
## Text button
|
|
@@ -55,8 +69,75 @@ Text buttons are used for actions that do not require a primary or secondary but
|
|
|
55
69
|
|
|
56
70
|
<div class="component-preview">
|
|
57
71
|
<Button text>Text button</Button>
|
|
72
|
+
<Button text>Text button</Button>
|
|
73
|
+
<Button text>Text button</Button>
|
|
58
74
|
</div>
|
|
59
75
|
|
|
60
76
|
```js
|
|
61
77
|
<Button text>Text button</Button>
|
|
62
78
|
```
|
|
79
|
+
|
|
80
|
+
## Link tertiary
|
|
81
|
+
|
|
82
|
+
<div class="component-preview">
|
|
83
|
+
|
|
84
|
+
<Button tertiary>Tertiary</Button>
|
|
85
|
+
<Button tertiary medium>Tertiary</Button>
|
|
86
|
+
<Button tertiary small>Tertiary</Button>
|
|
87
|
+
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
```html
|
|
91
|
+
<Button tertiary>Tertiary</Button>
|
|
92
|
+
<Button tertiary medium>Tertiary</Button>
|
|
93
|
+
<Button tertiary small>Tertiary</Button>
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Tertiary with icon
|
|
97
|
+
<div class="component-preview">
|
|
98
|
+
<Button tertiary href="#">
|
|
99
|
+
Read more
|
|
100
|
+
<Icon name="flowbite:arrow-right-outline" class="ml-2 text-2xl -my-1 -mr-1" />
|
|
101
|
+
</Button>
|
|
102
|
+
|
|
103
|
+
<Button tertiary href="#" medium>
|
|
104
|
+
Read more
|
|
105
|
+
<Icon name="flowbite:arrow-right-outline" class="ml-2 text-2xl -my-1 -mr-1" />
|
|
106
|
+
</Button>
|
|
107
|
+
|
|
108
|
+
<Button tertiary href="#" small class="px-5">
|
|
109
|
+
Read more
|
|
110
|
+
<Icon name="flowbite:arrow-right-outline" class="ml-2 text-2xl -my-1 -mr-1" />
|
|
111
|
+
</Button>
|
|
112
|
+
</div>
|
|
113
|
+
|
|
114
|
+
```html
|
|
115
|
+
<Button tertiary href="#">
|
|
116
|
+
Read more
|
|
117
|
+
<Icon name="flowbite:arrow-right-outline" class="ml-2 text-2xl -my-1 -mr-1" />
|
|
118
|
+
</Button>
|
|
119
|
+
|
|
120
|
+
<Button tertiary href="#" medium>
|
|
121
|
+
Read more
|
|
122
|
+
<Icon name="flowbite:arrow-right-outline" class="ml-2 text-2xl -my-1 -mr-1" />
|
|
123
|
+
</Button>
|
|
124
|
+
|
|
125
|
+
<Button tertiary href="#" small class="px-5">
|
|
126
|
+
Read more
|
|
127
|
+
<Icon name="flowbite:arrow-right-outline" class="ml-2 text-2xl -my-1 -mr-1" />
|
|
128
|
+
</Button>
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
## Link button `<a>`
|
|
134
|
+
|
|
135
|
+
Text buttons are used for actions that do not require a primary or secondary button.
|
|
136
|
+
|
|
137
|
+
<div class="component-preview">
|
|
138
|
+
<Button primary href="#" title="Title">Text button</Button>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
```js
|
|
142
|
+
<Button primary href="#" title="Title">Text button</Button>
|
|
143
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Card"
|
|
3
|
+
layout: "../../layouts/MainLayout.astro"
|
|
4
|
+
---
|
|
5
|
+
import Button from '../../components/Button.vue';
|
|
6
|
+
import Card from '../../components/Card.astro'
|
|
7
|
+
import { Icon } from 'astro-icon/components';
|
|
8
|
+
import Image from '../../components/Image.astro'
|
|
9
|
+
|
|
10
|
+
## Card
|
|
11
|
+
|
|
12
|
+
Card - product link component which can be used for carousels, section with related products, recently added etc.
|
|
13
|
+
|
|
14
|
+
<div class="component-preview">
|
|
15
|
+
<div class="grid grid-cols-3 gap-8 w-full" itemscope itemtype="https://schema.org/ItemList">
|
|
16
|
+
<Card imgAlt="Image Alt" imgSrc="https://img.freepik.com/free-photo/beautiful-green-landscape-with-plantations-trees-cloudy-sky_181624-42918.jpg?w=826&t=st=1706315168~exp=1706315768~hmac=ed7872d0924dbda4322a3d346eef282edd77db3673fc209c933b02e37c29f9ac" >
|
|
17
|
+
<a href="#">
|
|
18
|
+
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white leading-none">Lorem Ipsum</h5>
|
|
19
|
+
</a>
|
|
20
|
+
<p class="mb-3 font-normal text-gray-700 dark:text-gray-400">
|
|
21
|
+
Magna magna mollit esse incididunt deserunt eiusmod ad id ullamco cupidatat laborum enim nostrud. Irure officia occaecat adipisicing amet labore et incididunt exercitation. Consequat aliqua excepteur duis dolore cupidatat.
|
|
22
|
+
</p>
|
|
23
|
+
<div class="flex items-center justify-between mb-4">
|
|
24
|
+
<span class="text-2xl font-bold text-gray-900 dark:text-white">€599.00</span>
|
|
25
|
+
</div>
|
|
26
|
+
<Button tertiary href="#">
|
|
27
|
+
Read more
|
|
28
|
+
<Icon name="flowbite:arrow-right-outline" class="ml-2 text-2xl leading-none" />
|
|
29
|
+
</Button>
|
|
30
|
+
</Card>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
```html
|
|
35
|
+
<div class="grid grid-cols-3 gap-8 w-full" itemscope itemtype="https://schema.org/ItemList">
|
|
36
|
+
|
|
37
|
+
</div>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
|
|
@@ -4,10 +4,15 @@ layout: "../../layouts/MainLayout.astro"
|
|
|
4
4
|
---
|
|
5
5
|
import HandDrive from '../../components/HandDrive.astro'
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
## HandDrive
|
|
9
|
+
RHD (right-hand drive) and LHD (left-hand drive) badges.
|
|
10
|
+
- https://en.wikipedia.org/wiki/Left-_and_right-hand_traffic
|
|
11
|
+
|
|
12
|
+
#### import:
|
|
8
13
|
|
|
9
14
|
```js
|
|
10
|
-
import HandDrive from '
|
|
15
|
+
import HandDrive from 'spoko-design-system/src/components/HandDrive.astro'
|
|
11
16
|
```
|
|
12
17
|
|
|
13
18
|
|
|
@@ -20,7 +20,7 @@ Thanks to this, I can make a header that always looks the same, regardless of wh
|
|
|
20
20
|
import Headline from 'spoko-design-system/src/components/Headline.vue';
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
## parameters
|
|
23
|
+
## settings (parameters)
|
|
24
24
|
```js
|
|
25
25
|
as: {
|
|
26
26
|
type: String as PropType<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span'>,
|
|
@@ -52,12 +52,12 @@ textSize: {
|
|
|
52
52
|
#### Headline H2
|
|
53
53
|
|
|
54
54
|
<div class="component-preview">
|
|
55
|
-
<Headline as="h2"><Icon name="ph:cat-thin" class="inline-block mb-0 sm:mb-2.5 md:mb-0 md:(mr-4)
|
|
55
|
+
<Headline as="h2"><Icon name="ph:cat-thin" class="inline-block mb-0 sm:mb-2.5 md:mb-0 md:(mr-4)" aria-hidden="true" />Lorem Ipsum</Headline>
|
|
56
56
|
</div>
|
|
57
57
|
|
|
58
58
|
```js
|
|
59
59
|
<Headline as="h2">
|
|
60
|
-
<Icon name="ph:cat-thin" class="mb-0 sm:mb-2.5 md:mb-0 md:(mr-4)
|
|
60
|
+
<Icon name="ph:cat-thin" class="mb-0 sm:mb-2.5 md:mb-0 md:(mr-4)" aria-hidden="true" />
|
|
61
61
|
Lorem Ipsum
|
|
62
62
|
</Headline>
|
|
63
63
|
|
|
@@ -127,3 +127,22 @@ textSize: {
|
|
|
127
127
|
</Headline>
|
|
128
128
|
|
|
129
129
|
```
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
#### Headline with underline
|
|
133
|
+
|
|
134
|
+
<div class="component-preview">
|
|
135
|
+
<Headline as="h1" text-size="4xl" underline><Icon name="ph:cat-thin" class="inline-block text-4xl mb-0 sm:mb-2.5 md:mb-0 md:(mr-4) text-4xl text-blue-wrc" aria-hidden="true" />Lorem Ipsum</Headline>
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
```js
|
|
139
|
+
<Headline as="h1" text-size="4xl" icon-color="blue-wrc" underline>
|
|
140
|
+
<Icon name="ph:cat-thin" class="inline-block text-4xl mb-0 sm:mb-2.5 md:mb-0 md:(mr-4) text-4xl text-blue-wrc" aria-hidden="true" />
|
|
141
|
+
Lorem Ipsum
|
|
142
|
+
</Headline>
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#
|
|
147
|
+
|
|
148
|
+
<div class="headline headline--underline"></div>
|
|
@@ -1,44 +1,46 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import { changeLanguage } from "i18next";
|
|
3
|
+
import MainLayout from "../../layouts/MainLayout.astro";
|
|
4
|
+
import { Icon } from "astro-icon/components";
|
|
4
5
|
|
|
5
|
-
const iconifyUrl = 'https://icon-sets.iconify.design/'
|
|
6
6
|
|
|
7
|
+
const iconifyUrl = "https://icon-sets.iconify.design/";
|
|
7
8
|
const ICONS = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
9
|
+
mdi: ["facebook", "instagram", "post-it-note-edit-outline", "car-hatchback", "car-door", "car-side", "car-windshield-outline", "car-light-alert", "car-tire-alert", "car-light-dimmed", "car-light-fog", "car-light-high", "car-parking-lights", "car-esp", "car-brake-abs", "car-horn", "engine-outline", "fan", "fan-off", "air-conditioner", "coolant-temperature", "car-brake-alert", "car-traction-control", "card-text-outline", "fuel", "oil", "hazard-lights", "credit-card-outline"],
|
|
10
|
+
el: ["star-empty", "star", "heart-empty", "heart", "map-marker", "fire", "quote-right", "qrcode", "car", "indent-left", "indent-right", "ok"], 'eos-icons': ["three-dots-loading", "bubble-loading", "loading", "installing"],
|
|
11
|
+
fluent: ["share-android-24-regular", "checkmark-24-filled", "tag-24-regular", "tag-multiple-24-regular" ],
|
|
12
|
+
"fluent-emoji": ["cookie", "construction", "warning", "wrench"],
|
|
13
|
+
la: ["arrow-right", "arrow-left", "car", "car-side"],
|
|
14
|
+
octicon: ["chevron-left-24", "x-24", "alert-24", "graph-24", "comment-24", "comment-discussion-24", "clock-24", "star-24", "star-fill-24", "file-media-24", "heart-24", "heart-fill-24", "project-roadmap-24", "location-24", "info-24", "mark-github-16"],
|
|
15
|
+
uil: ["map-marker", "envelope", "phone", "tag-alt"],
|
|
16
|
+
"simple-icons": ["ebay", "allegro", "volkswagen", "audi", "skoda", "seat", "whatsapp", "x", "facebook", "messenger", "instagram", "telegram"],
|
|
17
|
+
"icon-park-outline": ["shopping-bag", "comment", "comments", "tag-one"],
|
|
18
|
+
flowbite: ["arrow-left-outline", "arrow-right-outline", "angle-left-outline", "angle-right-outline", "chevron-left-outline", "chevron-right-outline","map-location-outline", "map-pin-alt-solid", "x-outline", "messages-outline", "arrow-down-to-bracket-outline", "check-outline"]
|
|
19
|
+
|
|
20
|
+
};
|
|
22
21
|
---
|
|
23
22
|
|
|
24
23
|
<MainLayout>
|
|
25
24
|
<h1>Icons</h1>
|
|
25
|
+
<p>Astro Icon is a straightforward icon system for the Astro framework.</p>
|
|
26
|
+
|
|
27
|
+
<a href="https://www.astroicon.dev/">https://www.astroicon.dev/</a>
|
|
26
28
|
|
|
27
29
|
<pre class="mt-6 astro-code bg-slate-800 text-white">import { Icon } from 'astro-icon/components';</pre>
|
|
28
30
|
<div class="">
|
|
29
31
|
{Object.keys(ICONS).map((key) => (
|
|
30
32
|
<h2 class="mt-6 mx-2">
|
|
31
|
-
<a href={`${iconifyUrl}
|
|
33
|
+
<a href={`${iconifyUrl}${key}/`} target="_blank">
|
|
32
34
|
{key}
|
|
33
35
|
</a>
|
|
34
36
|
</h2>
|
|
35
|
-
<div class="inline-grid grid-cols-4 gap-0 w-full">
|
|
37
|
+
<div class="inline-grid grid-cols-2 md:grid-cols-4 gap-0 w-full">
|
|
36
38
|
{ICONS[key].map((value) => (
|
|
37
39
|
<div class="mx-1 mb-2">
|
|
38
40
|
<div class="component-preview ">
|
|
39
|
-
<Icon name={`${key}:${value}`} />
|
|
41
|
+
<Icon name={`${key}:${value}`} class="text-3xl mx-auto" />
|
|
40
42
|
</div>
|
|
41
|
-
<pre class="astro-code bg-slate-800 text-white text-sm"><Icon name={
|
|
43
|
+
<pre class="astro-code bg-slate-800 text-white text-sm text-center"><Icon name={`"${key}:${value}"`} /></pre>
|
|
42
44
|
</div>
|
|
43
45
|
))}
|
|
44
46
|
</div>
|