spoko-design-system 0.8.6 → 0.8.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/.astro/content.d.ts +43 -0
- package/.astro/types.d.ts +1 -0
- package/icon.config.ts +1 -0
- package/index.ts +3 -1
- package/package.json +2 -1
- package/public/arrow-bottom.svg +7 -0
- package/src/components/Layout/CallToAction.astro +53 -0
- package/uno-config/theme/shortcuts/components.ts +1 -1
- package/uno-config/theme/shortcuts/layout.ts +1 -1
- /package/src/components/{layout → Layout}/Container.astro +0 -0
- /package/src/components/{layout → Layout}/Header.astro +0 -0
package/.astro/content.d.ts
CHANGED
|
@@ -56,6 +56,10 @@ declare module 'astro:content' {
|
|
|
56
56
|
collection: C;
|
|
57
57
|
slug: E;
|
|
58
58
|
};
|
|
59
|
+
export type ReferenceLiveEntry<C extends keyof LiveContentConfig['collections']> = {
|
|
60
|
+
collection: C;
|
|
61
|
+
id: string;
|
|
62
|
+
};
|
|
59
63
|
|
|
60
64
|
/** @deprecated Use `getEntry` instead. */
|
|
61
65
|
export function getEntryBySlug<
|
|
@@ -84,6 +88,13 @@ declare module 'astro:content' {
|
|
|
84
88
|
filter?: (entry: CollectionEntry<C>) => unknown,
|
|
85
89
|
): Promise<CollectionEntry<C>[]>;
|
|
86
90
|
|
|
91
|
+
export function getLiveCollection<C extends keyof LiveContentConfig['collections']>(
|
|
92
|
+
collection: C,
|
|
93
|
+
filter?: LiveLoaderCollectionFilterType<C>,
|
|
94
|
+
): Promise<
|
|
95
|
+
import('astro').LiveDataCollectionResult<LiveLoaderDataType<C>, LiveLoaderErrorType<C>>
|
|
96
|
+
>;
|
|
97
|
+
|
|
87
98
|
export function getEntry<
|
|
88
99
|
C extends keyof ContentEntryMap,
|
|
89
100
|
E extends ValidContentEntrySlug<C> | (string & {}),
|
|
@@ -120,6 +131,10 @@ declare module 'astro:content' {
|
|
|
120
131
|
? Promise<DataEntryMap[C][E]> | undefined
|
|
121
132
|
: Promise<DataEntryMap[C][E]>
|
|
122
133
|
: Promise<CollectionEntry<C> | undefined>;
|
|
134
|
+
export function getLiveEntry<C extends keyof LiveContentConfig['collections']>(
|
|
135
|
+
collection: C,
|
|
136
|
+
filter: string | LiveLoaderEntryFilterType<C>,
|
|
137
|
+
): Promise<import('astro').LiveDataEntryResult<LiveLoaderDataType<C>, LiveLoaderErrorType<C>>>;
|
|
123
138
|
|
|
124
139
|
/** Resolve an array of entry references from the same collection */
|
|
125
140
|
export function getEntries<C extends keyof ContentEntryMap>(
|
|
@@ -163,5 +178,33 @@ declare module 'astro:content' {
|
|
|
163
178
|
|
|
164
179
|
type AnyEntryMap = ContentEntryMap & DataEntryMap;
|
|
165
180
|
|
|
181
|
+
type ExtractLoaderTypes<T> = T extends import('astro/loaders').LiveLoader<
|
|
182
|
+
infer TData,
|
|
183
|
+
infer TEntryFilter,
|
|
184
|
+
infer TCollectionFilter,
|
|
185
|
+
infer TError
|
|
186
|
+
>
|
|
187
|
+
? { data: TData; entryFilter: TEntryFilter; collectionFilter: TCollectionFilter; error: TError }
|
|
188
|
+
: { data: never; entryFilter: never; collectionFilter: never; error: never };
|
|
189
|
+
type ExtractDataType<T> = ExtractLoaderTypes<T>['data'];
|
|
190
|
+
type ExtractEntryFilterType<T> = ExtractLoaderTypes<T>['entryFilter'];
|
|
191
|
+
type ExtractCollectionFilterType<T> = ExtractLoaderTypes<T>['collectionFilter'];
|
|
192
|
+
type ExtractErrorType<T> = ExtractLoaderTypes<T>['error'];
|
|
193
|
+
|
|
194
|
+
type LiveLoaderDataType<C extends keyof LiveContentConfig['collections']> =
|
|
195
|
+
LiveContentConfig['collections'][C]['schema'] extends undefined
|
|
196
|
+
? ExtractDataType<LiveContentConfig['collections'][C]['loader']>
|
|
197
|
+
: import('astro/zod').infer<
|
|
198
|
+
Exclude<LiveContentConfig['collections'][C]['schema'], undefined>
|
|
199
|
+
>;
|
|
200
|
+
type LiveLoaderEntryFilterType<C extends keyof LiveContentConfig['collections']> =
|
|
201
|
+
ExtractEntryFilterType<LiveContentConfig['collections'][C]['loader']>;
|
|
202
|
+
type LiveLoaderCollectionFilterType<C extends keyof LiveContentConfig['collections']> =
|
|
203
|
+
ExtractCollectionFilterType<LiveContentConfig['collections'][C]['loader']>;
|
|
204
|
+
type LiveLoaderErrorType<C extends keyof LiveContentConfig['collections']> = ExtractErrorType<
|
|
205
|
+
LiveContentConfig['collections'][C]['loader']
|
|
206
|
+
>;
|
|
207
|
+
|
|
166
208
|
export type ContentConfig = typeof import("./../src/content.config.mjs");
|
|
209
|
+
export type LiveContentConfig = never;
|
|
167
210
|
}
|
package/.astro/types.d.ts
CHANGED
package/icon.config.ts
CHANGED
package/index.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { default as ProductDetailsList } from './src/components/ProductDetailsLi
|
|
|
16
16
|
export { default as FeaturesList } from './src/components/FeaturesList.vue';
|
|
17
17
|
export { default as ProductCodes } from './src/components/ProductCodes.vue';
|
|
18
18
|
export { default as Headline } from './src/components/Headline.vue';
|
|
19
|
+
export { default as Quote } from './src/components/Quote.vue';
|
|
19
20
|
|
|
20
21
|
export { default as ProductEngineType } from './src/components/Product/ProductEngineType.vue';
|
|
21
22
|
export { default as ProductButton } from './src/components/Product/ProductButton.vue';
|
|
@@ -43,7 +44,8 @@ export { default as Copyright } from './src/components/Copyright.astro';
|
|
|
43
44
|
export { default as HandDrive } from './src/components/HandDrive.astro';
|
|
44
45
|
export { default as Faq } from './src/components/Faq.astro';
|
|
45
46
|
export { default as FaqItem } from './src/components/FaqItem.astro';
|
|
46
|
-
export { default as ButtonCopy } from './src/components/ButtonCopy.astro';
|
|
47
|
+
export { default as ButtonCopy } from './src/components/ButtonCopy.astro';
|
|
48
|
+
export { default as CallToAction } from './src/components/Layout/CallToAction.vue';
|
|
47
49
|
|
|
48
50
|
export { default as ProductImage } from './src/components/Product/ProductImage.astro';
|
|
49
51
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spoko-design-system",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "./index.ts",
|
|
6
6
|
"module": "./index.ts",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"@iconify-json/ic": "^1.2.2",
|
|
63
63
|
"@iconify-json/icon-park-outline": "^1.2.2",
|
|
64
64
|
"@iconify-json/la": "^1.2.1",
|
|
65
|
+
"@iconify-json/lucide": "^1.2.54",
|
|
65
66
|
"@iconify-json/material-symbols-light": "^1.2.28",
|
|
66
67
|
"@iconify-json/mdi": "^1.2.3",
|
|
67
68
|
"@iconify-json/noto-v1": "^1.2.2",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
3
|
+
<svg width="100%" height="100%" viewBox="0 0 18 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
|
|
4
|
+
<g transform="matrix(-0.0247114,-3.02628e-18,2.90782e-18,-0.0237442,23.7506,13.5573)">
|
|
5
|
+
<path d="M254.6,477.479C259.711,473.272 561.717,170.223 561.717,170.223C561.717,170.223 576.205,153.951 597.839,153.983C621.181,154.019 636.425,170.096 636.425,170.096C636.425,170.096 939.167,475.94 940.854,477.463C967.2,501.255 956.012,536.939 942.827,551.356C928.606,566.906 896.33,575.498 868.319,549.101C865.351,546.304 604.846,285.516 604.846,285.516C604.846,285.516 601.137,280.823 597.481,280.661C594.25,280.517 589.683,285.449 589.683,285.449C589.683,285.449 332.794,543.858 326.478,549.801C312.614,562.847 276.463,576.895 252.279,552.019C218.24,517.006 250.72,480.673 254.6,477.479Z" style="fill:rgb(48,53,59);"/>
|
|
6
|
+
</g>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
import Button from "./../Button.vue"
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
class?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { class: additionalClasses, title: propTitle, description: propDescription } = Astro.props;
|
|
11
|
+
|
|
12
|
+
// Sprawdzamy, czy slot 'description' ma jakąkolwiek zawartość
|
|
13
|
+
const hasDescriptionSlotContent = Astro.slots.has('description');
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
<section
|
|
17
|
+
class:list={[
|
|
18
|
+
"full-width border-blue-medium bg-blue-darker/5 border-t-4 md:(border-t-0 px-6 bg-white) my-8",
|
|
19
|
+
additionalClasses,
|
|
20
|
+
]}
|
|
21
|
+
>
|
|
22
|
+
<div class="flex flex-col items-center gap-4 md:(flex-row border-l-4 border-blue-medium bg-blue-darker/5 px-6) py-6">
|
|
23
|
+
<div class="flex-shrink-0 hidden md:block">
|
|
24
|
+
<slot name="icon">
|
|
25
|
+
<span i-ph:sparkle-thin class="mr-1 text-8 md:text-10 text-brand-secondary"></span>
|
|
26
|
+
</slot>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="flex-1 text-center md:text-left">
|
|
29
|
+
<h3 class="text-lg font-semibold text-blue-darker">
|
|
30
|
+
<slot name="title">
|
|
31
|
+
{propTitle || 'Domyślny tytuł akcji'}
|
|
32
|
+
</slot>
|
|
33
|
+
</h3>
|
|
34
|
+
{(propDescription || hasDescriptionSlotContent) && (
|
|
35
|
+
<p class="text-blue-darker mt-1">
|
|
36
|
+
<slot name="description">
|
|
37
|
+
{propDescription || 'Domyślny opis, który zachęca do działania.'}
|
|
38
|
+
</slot>
|
|
39
|
+
</p>
|
|
40
|
+
)}
|
|
41
|
+
</div>
|
|
42
|
+
<slot name="action">
|
|
43
|
+
<Button
|
|
44
|
+
type="button"
|
|
45
|
+
class:list="w-fit place-self-center gap-2"
|
|
46
|
+
tertiary
|
|
47
|
+
rounded
|
|
48
|
+
title="Domyślny przycisk akcji">
|
|
49
|
+
Kliknij mnie!
|
|
50
|
+
</Button>
|
|
51
|
+
</slot>
|
|
52
|
+
</div>
|
|
53
|
+
</section>
|
|
@@ -46,7 +46,7 @@ export const componentShortcuts = [
|
|
|
46
46
|
// Carousel
|
|
47
47
|
['carousel-tile', `${LAYOUT.flex.base} w-52 min-w-52 ml-1 lg:ml-1.5`],
|
|
48
48
|
['carousel-product-tile', `${LAYOUT.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`],
|
|
49
|
-
['carousel-item', `w-full w-full group-hover:filter-invert relative ${LAYOUT.flex.col}`],
|
|
49
|
+
['carousel-item', `w-full pt-1 w-full group-hover:filter-invert relative ${LAYOUT.flex.col}`],
|
|
50
50
|
['carousel-big', 'shadow-[inset_0_10px_60px_-15px_rgba(0,0,0,0.1)] w-full h-full'],
|
|
51
51
|
|
|
52
52
|
// PDP (Product Detail Page)
|
|
@@ -44,7 +44,7 @@ export const layoutShortcuts = [
|
|
|
44
44
|
['cat-menu', `fixed h-21 bottom-[-6px] w-full z-10 border-t-1 border-neutral-light ${COLORS.bgWhite} dark:bg-blue-darkest text-center sm:(static z-auto border-t-none h-28)`],
|
|
45
45
|
['cat-card', 'p-4 text-base break-inside-avoid-column'],
|
|
46
46
|
['cat-name', 'mt-2 h-[2em] text-xs leading-none group-hover:filter-invert 3xl:text-3.25'],
|
|
47
|
-
['cats-slide', `${TRANSITIONS.base} mb-0.5 min-h-tile-mobile sm:(min-h-tile h-tile mb-2 p-3) text-black ${COLORS.textNeutralLight} hover:(text-white even:bg-blue-medium odd:bg-accent-light) cursor-pointer ${LAYOUT.flex.colCenter} px-1.5 cursor-grab active:cursor-grabbing overflow-hidden`],
|
|
47
|
+
['cats-slide', `${TRANSITIONS.base} pt-1 mb-0.5 min-h-tile-mobile sm:(min-h-tile h-tile mb-2 p-3) text-black ${COLORS.textNeutralLight} hover:(text-white even:bg-blue-medium odd:bg-accent-light) cursor-pointer ${LAYOUT.flex.colCenter} px-1.5 cursor-grab active:cursor-grabbing overflow-hidden`],
|
|
48
48
|
['cats-img', `max-w-full h-8 md:h-icon ${IMAGE_STYLES.objectContain} w-full left-0 right-0 top-0 bottom-0`],
|
|
49
49
|
|
|
50
50
|
// Sidebars and Navigation
|
|
File without changes
|
|
File without changes
|