@hashrytech/quick-components-kit 0.18.1 → 0.19.1
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/CHANGELOG.md +12 -0
- package/README.md +6 -0
- package/dist/components/button/Button.svelte +6 -5
- package/dist/components/button/Button.svelte.d.ts +3 -2
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/hamburger-menu/HamburgerMenu.svelte +2 -2
- package/dist/components/hamburger-menu/HamburgerMenu.svelte.d.ts +1 -1
- package/dist/components/select/Select.svelte +53 -21
- package/dist/components/select/Select.svelte.d.ts +8 -4
- package/dist/components/text-input/TextInput.svelte +96 -19
- package/dist/components/text-input/TextInput.svelte.d.ts +18 -4
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/modules/api-proxy.d.ts +2 -0
- package/dist/modules/api-proxy.js +3 -1
- package/dist/ui/banners/banner-1/Banner1.svelte +47 -0
- package/dist/ui/banners/banner-1/Banner1.svelte.d.ts +14 -0
- package/dist/ui/banners/banner-1/index.d.ts +1 -0
- package/dist/ui/banners/banner-1/index.js +1 -0
- package/dist/ui/breadcrumbs/breadcrumbs-1/Breadcrumbs1.svelte +30 -0
- package/dist/ui/breadcrumbs/breadcrumbs-1/Breadcrumbs1.svelte.d.ts +13 -0
- package/dist/ui/breadcrumbs/breadcrumbs-1/index.d.ts +1 -0
- package/dist/ui/breadcrumbs/breadcrumbs-1/index.js +1 -0
- package/dist/ui/featured-products/featured-products-1/FeaturedProducts1.svelte +56 -0
- package/dist/ui/featured-products/featured-products-1/FeaturedProducts1.svelte.d.ts +22 -0
- package/dist/ui/featured-products/featured-products-1/index.d.ts +1 -0
- package/dist/ui/featured-products/featured-products-1/index.js +1 -0
- package/dist/ui/footers/footer-1/Footer1.svelte +81 -0
- package/dist/ui/footers/footer-1/Footer1.svelte.d.ts +18 -0
- package/dist/ui/footers/footer-1/index.d.ts +1 -0
- package/dist/ui/footers/footer-1/index.js +1 -0
- package/dist/ui/headers/header-1/Header1.svelte +94 -0
- package/dist/ui/headers/header-1/Header1.svelte.d.ts +15 -0
- package/dist/ui/headers/header-1/index.d.ts +1 -0
- package/dist/ui/headers/header-1/index.js +1 -0
- package/dist/ui/order-product-line-item/order-product-line-item-1/OrderProductLineItem1.svelte +74 -0
- package/dist/ui/order-product-line-item/order-product-line-item-1/OrderProductLineItem1.svelte.d.ts +15 -0
- package/dist/ui/order-product-line-item/order-product-line-item-1/index.d.ts +1 -0
- package/dist/ui/order-product-line-item/order-product-line-item-1/index.js +1 -0
- package/dist/ui/product-filters/product-filter-1/ProductFilter1.svelte +42 -0
- package/dist/ui/product-filters/product-filter-1/ProductFilter1.svelte.d.ts +26 -0
- package/dist/ui/product-filters/product-filter-1/ProductFilterBlock.svelte +49 -0
- package/dist/ui/product-filters/product-filter-1/ProductFilterBlock.svelte.d.ts +17 -0
- package/dist/ui/product-filters/product-filter-1/index.d.ts +1 -0
- package/dist/ui/product-filters/product-filter-1/index.js +1 -0
- package/dist/ui/product-list/product-list-1/ProductList1.svelte +76 -0
- package/dist/ui/product-list/product-list-1/ProductList1.svelte.d.ts +24 -0
- package/dist/ui/product-list/product-list-1/index.d.ts +1 -0
- package/dist/ui/product-list/product-list-1/index.js +1 -0
- package/dist/ui/product-list-navigation/product-list-navigation-1/ProductListNavigation1.svelte +51 -0
- package/dist/ui/product-list-navigation/product-list-navigation-1/ProductListNavigation1.svelte.d.ts +12 -0
- package/dist/ui/product-list-navigation/product-list-navigation-1/index.d.ts +1 -0
- package/dist/ui/product-list-navigation/product-list-navigation-1/index.js +1 -0
- package/dist/ui/searchbox/Searchbox.svelte +46 -0
- package/dist/ui/searchbox/Searchbox.svelte.d.ts +13 -0
- package/dist/ui/searchbox/index.d.ts +1 -0
- package/dist/ui/searchbox/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ClassNameValue } from 'tailwind-merge';
|
|
2
|
+
export type Product = {
|
|
3
|
+
uid: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
price: string;
|
|
7
|
+
price_compare?: string;
|
|
8
|
+
image: string;
|
|
9
|
+
badges?: string[];
|
|
10
|
+
swatches?: string[];
|
|
11
|
+
};
|
|
12
|
+
export type ProductList1Props = {
|
|
13
|
+
products: Product[];
|
|
14
|
+
titleClass?: ClassNameValue;
|
|
15
|
+
imageClass?: ClassNameValue;
|
|
16
|
+
priceClass?: ClassNameValue;
|
|
17
|
+
priceCompareClass?: ClassNameValue;
|
|
18
|
+
onShowMore?: () => void;
|
|
19
|
+
onAddToCart?: (product: Product) => void;
|
|
20
|
+
class?: ClassNameValue;
|
|
21
|
+
};
|
|
22
|
+
declare const ProductList1: import("svelte").Component<ProductList1Props, {}, "">;
|
|
23
|
+
type ProductList1 = ReturnType<typeof ProductList1>;
|
|
24
|
+
export default ProductList1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ProductList1 } from './ProductList1.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ProductList1 } from './ProductList1.svelte';
|
package/dist/ui/product-list-navigation/product-list-navigation-1/ProductListNavigation1.svelte
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import Select from '../../../components/select/Select.svelte';
|
|
3
|
+
import Breadcrumbs1 from '../../breadcrumbs/breadcrumbs-1/Breadcrumbs1.svelte';
|
|
4
|
+
import type { ClassNameValue } from 'tailwind-merge';
|
|
5
|
+
|
|
6
|
+
export type ProductListNavigation1Props = {
|
|
7
|
+
filters: { key: string; value: string }[];
|
|
8
|
+
searchTerm: string;
|
|
9
|
+
class?: ClassNameValue;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/*let filters = $state([
|
|
13
|
+
{ key: 'brand', value: 'Nike' },
|
|
14
|
+
{ key: 'category', value: 'Shoes' },
|
|
15
|
+
{ key: 'size', value: '10' },
|
|
16
|
+
{ key: 'color', value: 'Red' },
|
|
17
|
+
{ key: 'material', value: 'Leather' },
|
|
18
|
+
{ key: 'style', value: 'Sporty' },
|
|
19
|
+
{ key: 'fitadjjadjadkjadkjadlkjadlkad', value: 'Regularad;kjadkadjkadjadlkjadlkjadlkjad' },
|
|
20
|
+
{ key: 'length', value: 'Medium' },
|
|
21
|
+
{ key: 'width', value: 'Standard' },
|
|
22
|
+
{ key: 'height', value: 'Regular' }
|
|
23
|
+
]);*/
|
|
24
|
+
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<script lang="ts">
|
|
28
|
+
import { twMerge } from "tailwind-merge";
|
|
29
|
+
|
|
30
|
+
let { filters=$bindable([]), searchTerm=$bindable(""), ...restProps }: ProductListNavigation1Props = $props();
|
|
31
|
+
|
|
32
|
+
function removeFilter(key: string, value: string) {
|
|
33
|
+
filters = filters.filter(f => !(f.key === key && f.value === value));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function clearFilters() {
|
|
37
|
+
filters = [];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<section class={twMerge("min-h-10 px-2 flex flex-row flex-wrap justify-between gap-10", restProps.class)}>
|
|
43
|
+
<div class="flex flex-row gap-2 items-center justify-end w-full">
|
|
44
|
+
<button class="cursor-pointer px-2 sm:hidden" aria-label="Filter Product List">
|
|
45
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="size-7 text-neutral-600" viewBox="0 0 24 24" fill="currentColor">
|
|
46
|
+
<path d="M10 14L4 5V3H20V5L14 14V20L10 22V14Z"></path>
|
|
47
|
+
</svg>
|
|
48
|
+
</button>
|
|
49
|
+
|
|
50
|
+
</div>
|
|
51
|
+
</section>
|
package/dist/ui/product-list-navigation/product-list-navigation-1/ProductListNavigation1.svelte.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ClassNameValue } from 'tailwind-merge';
|
|
2
|
+
export type ProductListNavigation1Props = {
|
|
3
|
+
filters: {
|
|
4
|
+
key: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}[];
|
|
7
|
+
searchTerm: string;
|
|
8
|
+
class?: ClassNameValue;
|
|
9
|
+
};
|
|
10
|
+
declare const ProductListNavigation1: import("svelte").Component<ProductListNavigation1Props, {}, "filters" | "searchTerm">;
|
|
11
|
+
type ProductListNavigation1 = ReturnType<typeof ProductListNavigation1>;
|
|
12
|
+
export default ProductListNavigation1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ProductListNavigation1 } from './ProductListNavigation1.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ProductListNavigation1 } from './ProductListNavigation1.svelte';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import TextInput from '../../components/text-input/TextInput.svelte';
|
|
3
|
+
import type { ClassNameValue } from 'tailwind-merge';
|
|
4
|
+
|
|
5
|
+
export type ProductListNavigation1Props = {
|
|
6
|
+
searchTerm?: string;
|
|
7
|
+
firstDivClass?: string;
|
|
8
|
+
secondDivClass?: string;
|
|
9
|
+
thirdDivClass?: string;
|
|
10
|
+
class?: ClassNameValue;
|
|
11
|
+
onclick?: (event: Event) => void;
|
|
12
|
+
onInput?: (value: string|number) => void
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<script lang="ts">
|
|
18
|
+
import { twMerge } from "tailwind-merge";
|
|
19
|
+
|
|
20
|
+
let { searchTerm = $bindable(""), firstDivClass, secondDivClass, thirdDivClass, onclick, onInput, ...restProps }: ProductListNavigation1Props = $props();
|
|
21
|
+
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<TextInput id="searchBox" placeholder="Product search..." bind:value={searchTerm} type="search" {onInput} {firstDivClass} {secondDivClass} {thirdDivClass} class={"pl-3 " + restProps.class} autocomplete="off">
|
|
25
|
+
|
|
26
|
+
<!--{#snippet leftIcon()}
|
|
27
|
+
<button aria-label="Search" class="w-fit ml-2 h-full hover:bg-primary-100 cursor-pointer hidden" {onclick}>
|
|
28
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="size-5 mx-auto text-neutral-400" viewBox="0 0 256 256">
|
|
29
|
+
<rect width="256" height="256" fill="none"/>
|
|
30
|
+
<circle cx="112" cy="112" r="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
|
|
31
|
+
<line x1="168.57" y1="168.57" x2="224" y2="224" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
|
|
32
|
+
</svg>
|
|
33
|
+
</button>
|
|
34
|
+
{/snippet}
|
|
35
|
+
-->
|
|
36
|
+
|
|
37
|
+
{#snippet rightIcon()}
|
|
38
|
+
<button aria-label="Search" class="size-10 hover:bg-primary-100 border-l-2 border-primary-500 cursor-pointer" {onclick}>
|
|
39
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="size-5 mx-auto text-neutral-400" viewBox="0 0 256 256">
|
|
40
|
+
<rect width="256" height="256" fill="none"/>
|
|
41
|
+
<circle cx="112" cy="112" r="80" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
|
|
42
|
+
<line x1="168.57" y1="168.57" x2="224" y2="224" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>
|
|
43
|
+
</svg>
|
|
44
|
+
</button>
|
|
45
|
+
{/snippet}
|
|
46
|
+
</TextInput>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ClassNameValue } from 'tailwind-merge';
|
|
2
|
+
export type ProductListNavigation1Props = {
|
|
3
|
+
searchTerm?: string;
|
|
4
|
+
firstDivClass?: string;
|
|
5
|
+
secondDivClass?: string;
|
|
6
|
+
thirdDivClass?: string;
|
|
7
|
+
class?: ClassNameValue;
|
|
8
|
+
onclick?: (event: Event) => void;
|
|
9
|
+
onInput?: (value: string | number) => void;
|
|
10
|
+
};
|
|
11
|
+
declare const Searchbox: import("svelte").Component<ProductListNavigation1Props, {}, "searchTerm">;
|
|
12
|
+
type Searchbox = ReturnType<typeof Searchbox>;
|
|
13
|
+
export default Searchbox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Searchbox } from './Searchbox.svelte';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Searchbox } from './Searchbox.svelte';
|