spoko-design-system 0.2.82 → 0.2.83
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/content-assets.mjs +1 -0
- package/.astro/content-modules.mjs +1 -0
- package/.astro/data-store.json +1 -0
- package/.astro/settings.json +1 -1
- package/.github/workflows/deploy.yml +1 -1
- package/package.json +50 -50
- package/src/components/Button.vue +9 -1
- package/src/components/Category/CategoryDetails.astro +31 -7
- package/src/pages/components/buttons.mdx +17 -0
- package/uno.config.ts +14 -20
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default new Map();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default new Map();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[["Map",1,2],"meta::meta",["Map",3,4,5,6],"astro-version","5.2.5","astro-config-digest","{\"root\":{},\"srcDir\":{},\"publicDir\":{},\"outDir\":{},\"cacheDir\":{},\"site\":\"https://sds.spoko.space/\",\"compressHTML\":true,\"base\":\"/\",\"trailingSlash\":\"ignore\",\"output\":\"static\",\"scopedStyleStrategy\":\"attribute\",\"build\":{\"format\":\"directory\",\"client\":{},\"server\":{},\"assets\":\"_astro\",\"serverEntry\":\"entry.mjs\",\"redirects\":true,\"inlineStylesheets\":\"auto\",\"concurrency\":1},\"server\":{\"open\":false,\"host\":false,\"port\":1234,\"streaming\":true},\"redirects\":{},\"image\":{\"endpoint\":{\"route\":\"/_image\"},\"service\":{\"entrypoint\":\"astro/assets/services/sharp\",\"config\":{}},\"domains\":[\"placehold.co\",\"api.polo.blue\",\"polo.blue\",\"media.istockphoto.com\",\"img.freepik.com\"],\"remotePatterns\":[]},\"devToolbar\":{\"enabled\":true},\"markdown\":{\"syntaxHighlight\":\"shiki\",\"shikiConfig\":{\"langs\":[],\"langAlias\":{},\"theme\":\"github-dark\",\"themes\":{},\"wrap\":false,\"transformers\":[]},\"remarkPlugins\":[],\"rehypePlugins\":[],\"remarkRehype\":{},\"gfm\":true,\"smartypants\":true},\"security\":{\"checkOrigin\":true},\"env\":{\"schema\":{},\"validateSecrets\":false},\"experimental\":{\"clientPrerender\":false,\"contentIntellisense\":false,\"responsiveImages\":false,\"serializeConfig\":false},\"legacy\":{\"collections\":false}}"]
|
package/.astro/settings.json
CHANGED
|
@@ -21,7 +21,7 @@ jobs:
|
|
|
21
21
|
- name: Checkout your repository using git
|
|
22
22
|
uses: actions/checkout@v4
|
|
23
23
|
- name: Install, build, and upload your site
|
|
24
|
-
uses: withastro/action@
|
|
24
|
+
uses: withastro/action@v3
|
|
25
25
|
with:
|
|
26
26
|
pnpm@latest
|
|
27
27
|
# path: . # The root location of your Astro project inside the repository. (optional)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spoko-design-system",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.83",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "./index.ts",
|
|
6
6
|
"module": "./index.ts",
|
|
@@ -37,69 +37,69 @@
|
|
|
37
37
|
"spoko design system"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@algolia/client-search": "^5.
|
|
41
|
-
"@astrojs/mdx": "^4.0.
|
|
42
|
-
"@astrojs/node": "^9.0.
|
|
40
|
+
"@algolia/client-search": "^5.20.1",
|
|
41
|
+
"@astrojs/mdx": "^4.0.8",
|
|
42
|
+
"@astrojs/node": "^9.0.2",
|
|
43
43
|
"@astrojs/sitemap": "^3.2.1",
|
|
44
44
|
"@astrojs/ts-plugin": "^1.10.4",
|
|
45
|
-
"@astrojs/vue": "^5.0.
|
|
46
|
-
"@docsearch/css": "^3.8.
|
|
47
|
-
"@iconify-json/ant-design": "^1.2.
|
|
48
|
-
"@iconify-json/bi": "^1.2.
|
|
49
|
-
"@iconify-json/bx": "^1.2.
|
|
50
|
-
"@iconify-json/carbon": "^1.2.
|
|
51
|
-
"@iconify-json/circle-flags": "^1.2.
|
|
52
|
-
"@iconify-json/el": "^1.2.
|
|
53
|
-
"@iconify-json/eos-icons": "^1.2.
|
|
54
|
-
"@iconify-json/flowbite": "^1.2.
|
|
55
|
-
"@iconify-json/fluent": "^1.2.
|
|
56
|
-
"@iconify-json/fluent-emoji": "1.2.
|
|
57
|
-
"@iconify-json/icon-park-outline": "^1.2.
|
|
58
|
-
"@iconify-json/la": "^1.2.
|
|
59
|
-
"@iconify-json/mdi": "^1.2.
|
|
60
|
-
"@iconify-json/noto-v1": "^1.2.
|
|
61
|
-
"@iconify-json/octicon": "^1.2.
|
|
62
|
-
"@iconify-json/ph": "^1.2.
|
|
63
|
-
"@iconify-json/simple-icons": "^1.2.
|
|
64
|
-
"@iconify-json/uil": "^1.2.
|
|
65
|
-
"@iconify/json": "^2.2.
|
|
66
|
-
"@iconify/vue": "^4.
|
|
67
|
-
"@playform/compress": "^0.1.
|
|
45
|
+
"@astrojs/vue": "^5.0.6",
|
|
46
|
+
"@docsearch/css": "^3.8.3",
|
|
47
|
+
"@iconify-json/ant-design": "^1.2.5",
|
|
48
|
+
"@iconify-json/bi": "^1.2.2",
|
|
49
|
+
"@iconify-json/bx": "^1.2.2",
|
|
50
|
+
"@iconify-json/carbon": "^1.2.6",
|
|
51
|
+
"@iconify-json/circle-flags": "^1.2.6",
|
|
52
|
+
"@iconify-json/el": "^1.2.1",
|
|
53
|
+
"@iconify-json/eos-icons": "^1.2.2",
|
|
54
|
+
"@iconify-json/flowbite": "^1.2.4",
|
|
55
|
+
"@iconify-json/fluent": "^1.2.13",
|
|
56
|
+
"@iconify-json/fluent-emoji": "1.2.3",
|
|
57
|
+
"@iconify-json/icon-park-outline": "^1.2.2",
|
|
58
|
+
"@iconify-json/la": "^1.2.1",
|
|
59
|
+
"@iconify-json/mdi": "^1.2.3",
|
|
60
|
+
"@iconify-json/noto-v1": "^1.2.1",
|
|
61
|
+
"@iconify-json/octicon": "^1.2.3",
|
|
62
|
+
"@iconify-json/ph": "^1.2.2",
|
|
63
|
+
"@iconify-json/simple-icons": "^1.2.23",
|
|
64
|
+
"@iconify-json/uil": "^1.2.3",
|
|
65
|
+
"@iconify/json": "^2.2.303",
|
|
66
|
+
"@iconify/vue": "^4.3.0",
|
|
67
|
+
"@playform/compress": "^0.1.7",
|
|
68
68
|
"@playform/inline": "github:playform/inline",
|
|
69
|
-
"@types/node": "^22.
|
|
70
|
-
"@unocss/astro": "^
|
|
71
|
-
"@unocss/preset-attributify": "^
|
|
72
|
-
"@unocss/preset-typography": "^
|
|
73
|
-
"@unocss/preset-uno": "^
|
|
74
|
-
"@unocss/preset-web-fonts": "^
|
|
75
|
-
"@unocss/preset-wind": "^
|
|
76
|
-
"@unocss/reset": "^
|
|
77
|
-
"@vite-pwa/astro": "^0.
|
|
78
|
-
"@vueuse/core": "^12.
|
|
69
|
+
"@types/node": "^22.13.1",
|
|
70
|
+
"@unocss/astro": "^65.4.3",
|
|
71
|
+
"@unocss/preset-attributify": "^65.4.3",
|
|
72
|
+
"@unocss/preset-typography": "^65.4.3",
|
|
73
|
+
"@unocss/preset-uno": "^65.4.3",
|
|
74
|
+
"@unocss/preset-web-fonts": "^65.4.3",
|
|
75
|
+
"@unocss/preset-wind": "^65.4.3",
|
|
76
|
+
"@unocss/reset": "^65.4.3",
|
|
77
|
+
"@vite-pwa/astro": "^0.5.0",
|
|
78
|
+
"@vueuse/core": "^12.5.0",
|
|
79
79
|
"astro-i18next": "1.0.0-beta.21",
|
|
80
|
-
"astro-icon": "^1.1.
|
|
80
|
+
"astro-icon": "^1.1.5",
|
|
81
81
|
"astro-meta-tags": "^0.3.1",
|
|
82
|
-
"astro-navbar": "^2.3.
|
|
83
|
-
"astro-pagefind": "^1.
|
|
82
|
+
"astro-navbar": "^2.3.9",
|
|
83
|
+
"astro-pagefind": "^1.8.0",
|
|
84
84
|
"astro-remote": "^0.3.3",
|
|
85
85
|
"dotenv": "^16.4.7",
|
|
86
|
-
"i18next": "^24.
|
|
87
|
-
"i18next-browser-languagedetector": "^8.0.
|
|
86
|
+
"i18next": "^24.2.2",
|
|
87
|
+
"i18next-browser-languagedetector": "^8.0.2",
|
|
88
88
|
"i18next-fs-backend": "^2.6.0",
|
|
89
|
-
"i18next-http-backend": "^3.0.
|
|
89
|
+
"i18next-http-backend": "^3.0.2",
|
|
90
90
|
"i18next-vue": "^5.0.0",
|
|
91
|
-
"swiper": "^11.
|
|
92
|
-
"unocss": "^
|
|
93
|
-
"vite": "^6.0
|
|
91
|
+
"swiper": "^11.2.2",
|
|
92
|
+
"unocss": "^65.4.3",
|
|
93
|
+
"vite": "^6.1.0",
|
|
94
94
|
"vue": "^3.5.13"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@unocss/transformer-variant-group": "^
|
|
97
|
+
"@unocss/transformer-variant-group": "^65.4.3",
|
|
98
98
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
99
|
-
"astro": "^5.
|
|
100
|
-
"unocss": "^0.
|
|
99
|
+
"astro": "^5.2.5",
|
|
100
|
+
"unocss": "^0.65.0"
|
|
101
101
|
},
|
|
102
|
-
"packageManager": "pnpm@9.
|
|
102
|
+
"packageManager": "pnpm@9.15.3",
|
|
103
103
|
"pnpm": {
|
|
104
104
|
"default": "8.15.2",
|
|
105
105
|
"overrides": {
|
|
@@ -14,6 +14,10 @@ const props = defineProps<{
|
|
|
14
14
|
small?: boolean;
|
|
15
15
|
medium?: boolean;
|
|
16
16
|
rounded?: boolean;
|
|
17
|
+
whiteHover?: boolean;
|
|
18
|
+
lightHover?: boolean;
|
|
19
|
+
mediumHover?: boolean;
|
|
20
|
+
darkHover?: boolean;
|
|
17
21
|
}>();
|
|
18
22
|
|
|
19
23
|
const tag = props.href && props.href.length ? 'a' : 'button'
|
|
@@ -29,7 +33,11 @@ const classes = {
|
|
|
29
33
|
"btn-sm": props.medium,
|
|
30
34
|
"btn-xs": props.small,
|
|
31
35
|
"btn-normal": !props.small && !props.medium,
|
|
32
|
-
"rounded-full": props.rounded
|
|
36
|
+
"rounded-full": props.rounded,
|
|
37
|
+
"btn-white-hover": props.whiteHover,
|
|
38
|
+
"btn-light-hover": props.lightHover,
|
|
39
|
+
"btn-medium-hover": props.mediumHover,
|
|
40
|
+
"btn-dark-hover": props.darkHover
|
|
33
41
|
};
|
|
34
42
|
</script>
|
|
35
43
|
|
|
@@ -57,23 +57,47 @@ const baseURL = locale === 'en' ? '' : `/${locale}`;
|
|
|
57
57
|
|
|
58
58
|
<script is:inline>
|
|
59
59
|
function toggleSidebar() {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
const sidebar = document.getElementById('sidebar');
|
|
61
|
+
const isMobile = window.matchMedia("(max-width: 768px)").matches;
|
|
62
|
+
|
|
63
|
+
if (sidebar) {
|
|
64
|
+
if (isMobile) {
|
|
63
65
|
document.body.classList.toggle('overflow-hidden');
|
|
64
66
|
sidebar.classList.toggle('show');
|
|
67
|
+
localStorage.setItem('sidebarState', sidebar.classList.contains('show') ? 'open' : 'closed');
|
|
65
68
|
} else {
|
|
66
69
|
document.body.classList.remove('overflow-hidden');
|
|
67
70
|
sidebar.classList.toggle('collapsed');
|
|
71
|
+
localStorage.setItem('sidebarState', sidebar.classList.contains('collapsed') ? 'closed' : 'open');
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
|
-
|
|
71
|
-
var x = window.matchMedia("(max-width: 768px)");
|
|
72
|
-
handleToggle(x); // Call listener at runtime
|
|
73
|
-
x.addListener(handleToggle); // Attach listener for state changes
|
|
74
74
|
}
|
|
75
|
+
|
|
76
|
+
// Read status from localStorage on page load
|
|
77
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
78
|
+
const sidebar = document.getElementById('sidebar');
|
|
79
|
+
const isMobile = window.matchMedia("(max-width: 768px)").matches;
|
|
80
|
+
const savedState = localStorage.getItem('sidebarState');
|
|
81
|
+
|
|
82
|
+
if (sidebar) {
|
|
83
|
+
if (savedState === 'open') {
|
|
84
|
+
if (isMobile) {
|
|
85
|
+
sidebar.classList.add('show');
|
|
86
|
+
} else {
|
|
87
|
+
sidebar.classList.remove('collapsed');
|
|
88
|
+
}
|
|
89
|
+
} else if (savedState === 'closed') {
|
|
90
|
+
if (isMobile) {
|
|
91
|
+
sidebar.classList.remove('show');
|
|
92
|
+
} else {
|
|
93
|
+
sidebar.classList.add('collapsed');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
});
|
|
75
98
|
</script>
|
|
76
99
|
|
|
100
|
+
|
|
77
101
|
<style>
|
|
78
102
|
.category-toggler {
|
|
79
103
|
right: -1px;
|
|
@@ -222,6 +222,23 @@ Text buttons are used for actions that do not require a primary or secondary but
|
|
|
222
222
|
<Button tertiary-outline rounded title="Title">Text button</Button>
|
|
223
223
|
```
|
|
224
224
|
|
|
225
|
+
### Outline button - custom hover
|
|
226
|
+
|
|
227
|
+
<div class="component-preview">
|
|
228
|
+
<Button tertiary-outline rounded light-hover title="Title">Text button</Button>
|
|
229
|
+
<Button tertiary-outline rounded medium-hover title="Title">Text button</Button>
|
|
230
|
+
<Button tertiary-outline rounded dark-hover title="Title">Text button</Button>
|
|
231
|
+
<Button tertiary-outline rounded white-hover title="Title">Text button</Button>
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
```js
|
|
235
|
+
<Button tertiary-outline rounded light-hover title="Title">Text button</Button>
|
|
236
|
+
<Button tertiary-outline rounded medium-hover title="Title">Text button</Button>
|
|
237
|
+
<Button tertiary-outline rounded dark-hover title="Title">Text button</Button>
|
|
238
|
+
<Button tertiary-outline rounded white-hover title="Title">Text button</Button>
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
|
|
225
242
|
|
|
226
243
|
## Link button `<a>`
|
|
227
244
|
|
package/uno.config.ts
CHANGED
|
@@ -10,24 +10,17 @@ import {
|
|
|
10
10
|
transformerDirectives,
|
|
11
11
|
} from 'unocss'
|
|
12
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
13
|
export default defineConfig({
|
|
25
|
-
// ...
|
|
26
14
|
transformers: [
|
|
27
15
|
transformerDirectives(),
|
|
28
16
|
transformerVariantGroup(),
|
|
29
17
|
],
|
|
30
18
|
shortcuts: [
|
|
19
|
+
['btn-white-hover', 'hover:(text-blue-700 bg-white border-blue-700)'],
|
|
20
|
+
['btn-light-hover', 'hover:(text-blue-700 bg-lightBlue-400 border-lightBlue-400)'],
|
|
21
|
+
['btn-medium-hover', 'hover:(text-white bg-blue-400 border-blue-700)'],
|
|
22
|
+
['btn-dark-hover', 'hover:(bg-blue-700 text-white border-blue-700)'],
|
|
23
|
+
['img-base', 'relative object-cover bg-gray-100 h-auto max-w-full'],
|
|
31
24
|
['close-light','@apply before:bg-white after:bg-white'],
|
|
32
25
|
['close-dark','@apply before:bg-black after:bg-black'],
|
|
33
26
|
['headline-light', 'font-headlight font-300 tracking-tight'],
|
|
@@ -37,13 +30,13 @@ export default defineConfig({
|
|
|
37
30
|
['headline','font-headlight font-bold '],
|
|
38
31
|
['badge', 'px-1.5 py-px text-white text-xs mb-1 max-w-fit whitespace-nowrap'],
|
|
39
32
|
['img--overlay','after:(content-empty bg-black bg-opacity-[.03] absolute w-full h-full top-0)'],
|
|
40
|
-
['img--4/3', 'aspect-[4/3]
|
|
41
|
-
['img--3/4', 'aspect-[3/4]
|
|
42
|
-
['img--1/1', 'aspect-square
|
|
43
|
-
['img--3/2', 'aspect-[3/2]
|
|
44
|
-
['img--2/3', 'aspect-[2/3]
|
|
45
|
-
['img--3/1', 'aspect-[3/1]
|
|
46
|
-
['img--16/9', 'aspect-video
|
|
33
|
+
['img--4/3', 'aspect-[4/3] img-base'],
|
|
34
|
+
['img--3/4', 'aspect-[3/4] img-base'],
|
|
35
|
+
['img--1/1', 'aspect-square img-base'],
|
|
36
|
+
['img--3/2', 'aspect-[3/2] img-base'],
|
|
37
|
+
['img--2/3', 'aspect-[2/3] img-base'],
|
|
38
|
+
['img--3/1', 'aspect-[3/1] img-base'],
|
|
39
|
+
['img--16/9', 'aspect-video img-base'],
|
|
47
40
|
['img--small', 'h-full w-60 sm:(w-22) xl:(w-30)'],
|
|
48
41
|
['img--medium', 'h-full w-60'],
|
|
49
42
|
['underline-on-hover', 'relative flex w-full bg-white pb-1 dark:bg-blue-901 after:absolute after:bg-lightBlue-500 after:w-[calc(100%-1rem)] after:left-0 after:h-px after:top-[calc(100%-1px)] after:bottom-1 after:content-empty after:scale-x-0 after:transition-transform-300 after:origin-top-right hover:after:origin-top-left hover:after:scale-x-100'],
|
|
@@ -53,7 +46,7 @@ export default defineConfig({
|
|
|
53
46
|
['btn-secondary', 'bg-gray-500 border border-transparent font-medium hover:bg-gray-600 inline-flex items-center justify-center shadow text-base text-white'],
|
|
54
47
|
['btn-secondary-outline', 'border-gray-500 border text-gray-500 font-medium inline-flex items-center justify-center shadow text-base hover:(text-white bg-gray-500)'],
|
|
55
48
|
['btn-tertiary', 'inline-flex border border-transparent items-center font-medium text-center text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300'],
|
|
56
|
-
['btn-tertiary-outline', 'inline-flex border items-center font-medium text-center text-blue-700 border-blue-700 transition-
|
|
49
|
+
['btn-tertiary-outline', 'inline-flex border items-center font-medium text-center text-blue-700 border-blue-700 transition-colors focus:(ring-2 outline-none ring-blue-300)'],
|
|
57
50
|
['btn-text', 'text-gray-500 border border-transparent hover:underline transition-all'],
|
|
58
51
|
['btn-tag', 'bg-blue-100 text-blue-800 font-medium mr-2 dark:bg-gray-700 dark:text-blue-400 border border-blue-400 hover:border-blue-600 justify-center'],
|
|
59
52
|
['btn-normal', 'md:px-10 md:py-2 md:text-lg px-8 py-3 whitespace-nowrap'],
|
|
@@ -118,6 +111,7 @@ export default defineConfig({
|
|
|
118
111
|
theme: {
|
|
119
112
|
colors: {
|
|
120
113
|
blue: {
|
|
114
|
+
400: '#0040c5',
|
|
121
115
|
500: '#3b82f6',
|
|
122
116
|
540: '#0069ff',
|
|
123
117
|
545: '#005ad7',
|