@hashrytech/quick-components-kit 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ # quick-components-kit
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Initial testing and setup
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Hashry Tech
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # quick-components-kit
2
+ A Svelte component library and toolset
3
+
4
+ ## Install
5
+
6
+ You can install the library via npm.
7
+
8
+ ```bash
9
+ npm install @hashrytech/quick-components-kit
10
+ ```
11
+
12
+ or via yarn:
13
+
14
+ ```bash
15
+ yarn add @hashrytech/quick-components-kit
16
+ ```
@@ -0,0 +1,22 @@
1
+ <script lang="ts">
2
+ export let type: 'button' | 'submit' | 'reset' = 'button';
3
+ export let variant: 'primary' | 'secondary' | 'danger' = 'primary';
4
+ export let size: 'sm' | 'md' | 'lg' = 'md';
5
+ export let disabled: boolean = false;
6
+ export let className: string = ''; // Allow extra classes
7
+ </script>
8
+
9
+ <button
10
+ type={type}
11
+ class={`inline-flex items-center justify-center font-medium rounded-md
12
+ ${variant === 'primary' ? 'bg-blue-600 text-white hover:bg-blue-700' : ''}
13
+ ${variant === 'secondary' ? 'bg-gray-200 text-gray-800 hover:bg-gray-300' : ''}
14
+ ${variant === 'danger' ? 'bg-red-600 text-white hover:bg-red-700' : ''}
15
+ ${size === 'sm' ? 'px-2 py-1 text-sm' : ''}
16
+ ${size === 'md' ? 'px-4 py-2 text-base' : ''}
17
+ ${size === 'lg' ? 'px-6 py-3 text-lg' : ''}
18
+ ${disabled ? 'opacity-50 cursor-not-allowed' : ''}
19
+ ${className}`}
20
+ disabled={disabled}>
21
+ <slot />
22
+ </button>
@@ -0,0 +1,33 @@
1
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
15
+ default: any;
16
+ } ? Props extends Record<string, never> ? any : {
17
+ children?: any;
18
+ } : {});
19
+ declare const Button: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
20
+ type?: "button" | "submit" | "reset";
21
+ variant?: "primary" | "secondary" | "danger";
22
+ size?: "sm" | "md" | "lg";
23
+ disabled?: boolean;
24
+ className?: string;
25
+ }, {
26
+ default: {};
27
+ }>, {
28
+ [evt: string]: CustomEvent<any>;
29
+ }, {
30
+ default: {};
31
+ }, {}, string>;
32
+ type Button = InstanceType<typeof Button>;
33
+ export default Button;
@@ -0,0 +1 @@
1
+ export { default as Button } from './Button.svelte';
@@ -0,0 +1 @@
1
+ export { default as Button } from './Button.svelte';
@@ -0,0 +1,2 @@
1
+ export * from './button/index.js';
2
+ export * from './text-box/index.js';
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ // Reexport your entry components here
2
+ // lib/index.js
3
+ export * from './button/index.js';
4
+ export * from './text-box/index.js';
5
+ // Add more components here...
@@ -0,0 +1 @@
1
+ <p>Hello</p>
@@ -0,0 +1,26 @@
1
+ export default TextBox;
2
+ type TextBox = SvelteComponent<{
3
+ [x: string]: never;
4
+ }, {
5
+ [evt: string]: CustomEvent<any>;
6
+ }, {}> & {
7
+ $$bindings?: string | undefined;
8
+ };
9
+ declare const TextBox: $$__sveltets_2_IsomorphicComponent<{
10
+ [x: string]: never;
11
+ }, {
12
+ [evt: string]: CustomEvent<any>;
13
+ }, {}, {}, string>;
14
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
15
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
16
+ $$bindings?: Bindings;
17
+ } & Exports;
18
+ (internal: unknown, props: {
19
+ $$events?: Events;
20
+ $$slots?: Slots;
21
+ }): Exports & {
22
+ $set?: any;
23
+ $on?: any;
24
+ };
25
+ z_$$bindings?: Bindings;
26
+ }
@@ -0,0 +1 @@
1
+ export { default as TextBox } from './TextBox.svelte';
@@ -0,0 +1 @@
1
+ export { default as TextBox } from './TextBox.svelte';
package/package.json ADDED
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "@hashrytech/quick-components-kit",
3
+ "description": "A Svelte component library and toolset",
4
+ "version": "0.1.0",
5
+ "license": "MIT",
6
+ "author": "Hashry Tech",
7
+ "scripts": {
8
+ "dev": "vite dev",
9
+ "build": "vite build && npm run prepack",
10
+ "preview": "vite preview",
11
+ "prepare": "svelte-kit sync || echo ''",
12
+ "prepack": "svelte-kit sync && svelte-package && publint",
13
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
14
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
15
+ "format": "prettier --write .",
16
+ "lint": "prettier --check . && eslint .",
17
+ "test:unit": "vitest",
18
+ "test": "npm run test:unit -- --run && npm run test:e2e",
19
+ "test:e2e": "playwright test",
20
+ "storybook": "storybook dev -p 6006",
21
+ "build-storybook": "storybook build",
22
+ "package": "svelte-package"
23
+ },
24
+ "files": [
25
+ "dist",
26
+ "!dist/**/*.test.*",
27
+ "!dist/**/*.spec.*",
28
+ "LICENSE",
29
+ "README.md",
30
+ "CHANGELOG.md"
31
+ ],
32
+ "sideEffects": [
33
+ "**/*.css"
34
+ ],
35
+ "publishConfig": {
36
+ "access": "public"
37
+ },
38
+ "svelte": "./dist/index.js",
39
+ "types": "./dist/index.d.ts",
40
+ "type": "module",
41
+ "exports": {
42
+ ".": {
43
+ "types": "./dist/index.d.ts",
44
+ "svelte": "./dist/index.js"
45
+ }
46
+ },
47
+ "peerDependencies": {
48
+ "svelte": "^5.0.0"
49
+ },
50
+ "devDependencies": {
51
+ "@chromatic-com/storybook": "^4.0.0",
52
+ "@eslint/compat": "^1.2.9",
53
+ "@eslint/js": "^9.27.0",
54
+ "@playwright/test": "^1.52.0",
55
+ "@storybook/addon-a11y": "^9.0.0",
56
+ "@storybook/addon-docs": "^9.0.0",
57
+ "@storybook/addon-svelte-csf": "^5.0.3",
58
+ "@storybook/addon-vitest": "^9.0.0",
59
+ "@storybook/sveltekit": "^9.0.0",
60
+ "@sveltejs/adapter-auto": "^6.0.1",
61
+ "@sveltejs/kit": "^2.21.1",
62
+ "@sveltejs/package": "^2.3.11",
63
+ "@sveltejs/vite-plugin-svelte": "^5.0.3",
64
+ "@tailwindcss/forms": "^0.5.10",
65
+ "@tailwindcss/vite": "^4.1.8",
66
+ "@testing-library/jest-dom": "^6.6.3",
67
+ "@testing-library/svelte": "^5.2.8",
68
+ "@types/node": "^22",
69
+ "@vitest/browser": "^3.1.4",
70
+ "@vitest/coverage-v8": "^3.1.4",
71
+ "eslint": "^9.27.0",
72
+ "eslint-config-prettier": "^10.1.5",
73
+ "eslint-plugin-storybook": "^9.0.0",
74
+ "eslint-plugin-svelte": "^3.9.0",
75
+ "globals": "^16.2.0",
76
+ "jsdom": "^26.1.0",
77
+ "playwright": "^1.52.0",
78
+ "prettier": "^3.5.3",
79
+ "prettier-plugin-svelte": "^3.4.0",
80
+ "prettier-plugin-tailwindcss": "^0.6.11",
81
+ "publint": "^0.3.12",
82
+ "storybook": "^9.0.0",
83
+ "svelte": "^5.33.5",
84
+ "svelte-check": "^4.2.1",
85
+ "tailwindcss": "^4.1.8",
86
+ "typescript": "^5.8.3",
87
+ "typescript-eslint": "^8.33.0",
88
+ "vite": "^6.3.5",
89
+ "vitest": "^3.1.4"
90
+ },
91
+ "keywords": [
92
+ "svelte"
93
+ ],
94
+ "dependencies": {
95
+ "@changesets/cli": "^2.29.4"
96
+ }
97
+ }