@makolabs/ripple 0.3.0 → 0.4.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/LICENSE ADDED
@@ -0,0 +1,43 @@
1
+ Ripple UI License
2
+
3
+ Copyright (c) 2024 MakoLabs AI
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 use
7
+ the Software for personal, educational, and non-commercial purposes, subject
8
+ to the following conditions:
9
+
10
+ PERSONAL AND NON-COMMERCIAL USE:
11
+ - Personal projects and educational use are permitted free of charge
12
+ - Open source projects are permitted free of charge
13
+ - Non-profit organizations are permitted free of charge
14
+
15
+ COMMERCIAL USE RESTRICTIONS:
16
+ - Any commercial use of this Software requires a separate commercial license
17
+ - Commercial use includes, but is not limited to:
18
+ - Use in commercial products or services
19
+ - Use by for-profit organizations
20
+ - Use in products that generate revenue
21
+ - Integration into commercial applications
22
+
23
+ COMMERCIAL LICENSING:
24
+ For commercial use, please contact MakoLabs AI to obtain a commercial license:
25
+ - Email: licensing@makolabs.ai
26
+ - Website: https://makolabs.ai
27
+
28
+ CONDITIONS FOR ALL USE:
29
+ - The above copyright notice and this permission notice shall be included in
30
+ all copies or substantial portions of the Software
31
+ - Attribution to MakoLabs AI must be maintained in any derivative works
32
+
33
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
36
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
37
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
38
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39
+ SOFTWARE.
40
+
41
+ VIOLATION OF LICENSE:
42
+ Any commercial use without a proper commercial license constitutes copyright
43
+ infringement and may result in legal action.
@@ -114,12 +114,17 @@
114
114
  }
115
115
 
116
116
  function handleClickOutside(event: MouseEvent) {
117
+ // Only handle if this specific dropdown is open
118
+ if (!isOpen) return;
119
+
120
+ const target = event.target as Node;
121
+
122
+ // Check if click is outside both the dropdown and trigger
117
123
  if (
118
- isOpen &&
119
124
  dropdownRef &&
120
- !dropdownRef.contains(event.target as Node) &&
125
+ !dropdownRef.contains(target) &&
121
126
  triggerRef &&
122
- !triggerRef.contains(event.target as Node)
127
+ !triggerRef.contains(target)
123
128
  ) {
124
129
  isOpen = false;
125
130
  }
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ export { Color, Size, ChartColor };
17
17
  import type { ClassValue } from 'tailwind-variants';
18
18
  import type { Snippet } from 'svelte';
19
19
  import type { Component } from 'svelte';
20
- import type { HTMLButtonAttributes, HTMLAttributeAnchorTarget } from 'svelte/elements';
20
+ import type { HTMLButtonAttributes, HTMLAttributeAnchorTarget, DOMAttributes } from 'svelte/elements';
21
21
  import type { ECharts } from 'echarts/types/src/export/core.js';
22
22
  import type { SuperForm } from 'sveltekit-superforms';
23
23
  import type { FileAction, StorageAdapter } from './adapters/storage/types.js';
@@ -603,7 +603,9 @@ export interface FormProps<T extends Record<string, unknown>> {
603
603
  novalidate?: boolean;
604
604
  children?: Snippet;
605
605
  }
606
- export type BaseInputProps = {
606
+ export type InputProps = {
607
+ type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'date' | 'textarea';
608
+ value?: string | number;
607
609
  name: string;
608
610
  label?: string;
609
611
  placeholder?: string;
@@ -614,11 +616,7 @@ export type BaseInputProps = {
614
616
  color?: VariantColors;
615
617
  id?: string;
616
618
  errors?: string[];
617
- };
618
- export type InputProps = {
619
- type?: 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'date' | 'textarea';
620
- value?: string | number;
621
- } & BaseInputProps;
619
+ } & DOMAttributes<HTMLInputElement>;
622
620
  export type RadioOption = {
623
621
  value: string;
624
622
  label: string;
package/package.json CHANGED
@@ -1,114 +1,123 @@
1
1
  {
2
- "name": "@makolabs/ripple",
3
- "version": "0.3.0",
4
- "description": "Simple Svelte 5 powered component library ✨",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/makolabsai/ripple-ui.git"
8
- },
9
- "scripts": {
10
- "dev": "vite dev",
11
- "build": "vite build && npm run prepack",
12
- "preview": "vite preview",
13
- "prepare": "svelte-kit sync || echo ''",
14
- "prepack": "svelte-kit sync && svelte-package && publint",
15
- "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
16
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
17
- "format": "prettier --write .",
18
- "lint": "prettier --check . && eslint .",
19
- "test:unit": "vitest",
20
- "test": "npm run test:unit -- --run && npm run test:e2e",
21
- "test:e2e": "playwright test",
22
- "pub:minor": "git add . && git commit -m \"chore: prepare for publish minor\" && npm version minor && git push --follow-tags && npm publish",
23
- "pub:patch": "git add . && git commit -m \"chore: prepare for publish patch\" && npm version patch && git push --follow-tags && npm publish",
24
- "pub:prelish": "git add . && git commit -m \"chore: prepare for publish premajor\" && npm version premajor && git push --follow-tags && npm publish",
25
- "pub:major": "git add . && git commit -m \"chore: prepare for publish major\" && npm version major && git push --follow-tags && npm publish",
26
- "pub:preminor": "git add . && git commit -m \"chore: prepare for publish preminor\" && npm version preminor && git push --follow-tags && npm publish",
27
- "pub:prepatch": "git add . && git commit -m \"chore: prepare for publish prepatch\" && npm version prepatch && git push --follow-tags && npm publish",
28
- "pub:prerelease": "git add . && git commit -m \"chore: prepare for publish prerelease\" && npm version prerelease && git push --follow-tags && npm publish",
29
- "pub:from-git": "git add . && git commit -m \"chore: prepare for publish from-git\" && npm version from-git && git push --follow-tags && npm publish"
30
- },
31
- "files": [
32
- "dist",
33
- "!dist/**/*.test.*",
34
- "!dist/**/*.spec.*"
35
- ],
36
- "sideEffects": [
37
- "**/*.css"
38
- ],
39
- "svelte": "./dist/index.js",
40
- "types": "./dist/index.d.ts",
41
- "type": "module",
42
- "exports": {
43
- ".": {
44
- "types": "./dist/index.d.ts",
45
- "svelte": "./dist/index.js"
46
- }
47
- },
48
- "peerDependencies": {
49
- "svelte": "^5.0.0"
50
- },
51
- "devDependencies": {
52
- "@eslint/compat": "^1.2.5",
53
- "@eslint/js": "^9.18.0",
54
- "@playwright/test": "^1.49.1",
55
- "@sveltejs/adapter-cloudflare": "^5.0.1",
56
- "@sveltejs/kit": "^2.16.0",
57
- "@sveltejs/package": "^2.0.0",
58
- "@sveltejs/vite-plugin-svelte": "^5.0.0",
59
- "@tailwindcss/vite": "^4.0.14",
60
- "@testing-library/jest-dom": "^6.6.3",
61
- "@testing-library/svelte": "^5.2.4",
62
- "@types/node": "^22.13.10",
63
- "eslint": "^9.18.0",
64
- "eslint-config-prettier": "^10.0.1",
65
- "eslint-plugin-svelte": "^3.0.0",
66
- "globals": "^16.0.0",
67
- "jsdom": "^26.0.0",
68
- "prettier": "^3.4.2",
69
- "prettier-plugin-svelte": "^3.3.3",
70
- "prettier-plugin-tailwindcss": "^0.6.11",
71
- "publint": "^0.3.2",
72
- "svelte": "^5.0.0",
73
- "svelte-check": "^4.0.0",
74
- "sveltekit-superforms": "^2.24.0",
75
- "tailwindcss": "^4.0.0",
76
- "typescript": "^5.0.0",
77
- "typescript-eslint": "^8.20.0",
78
- "vite": "^6.0.0",
79
- "vitest": "^3.0.0",
80
- "zod": "^3.24.2"
81
- },
82
- "keywords": [
83
- "svelte",
84
- "ui",
85
- "svelte5",
86
- "modal",
87
- "navigation",
88
- "ripple",
89
- "button",
90
- "sidebar",
91
- "card",
92
- "select",
93
- "tooltip",
94
- "accordion",
95
- "tabs",
96
- "alert",
97
- "badge",
98
- "breadcrumb",
99
- "carousel",
100
- "collapse",
101
- "list-group",
102
- "pagination",
103
- "progress",
104
- "spinner",
105
- "toast"
106
- ],
107
- "dependencies": {
108
- "dayjs": "^1.11.13",
109
- "echarts": "^5.6.0",
110
- "svelte-sonner": "^0.3.28",
111
- "tailwind-merge": "^3.0.2",
112
- "tailwind-variants": "^1.0.0"
113
- }
2
+ "name": "@makolabs/ripple",
3
+ "version": "0.4.1-0",
4
+ "description": "Simple Svelte 5 powered component library ✨",
5
+ "license": "SEE LICENSE IN LICENSE",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/makolabsai/ripple-ui.git"
9
+ },
10
+ "scripts": {
11
+ "dev": "vite dev",
12
+ "build": "vite build && npm run prepack",
13
+ "preview": "vite preview",
14
+ "prepare": "svelte-kit sync || echo ''",
15
+ "prepack": "svelte-kit sync && svelte-package && publint",
16
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
17
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
18
+ "format": "prettier --write .",
19
+ "lint": "prettier --check . && eslint .",
20
+ "test:unit": "vitest",
21
+ "test": "npm run test:unit -- --run && npm run test:e2e",
22
+ "test:e2e": "playwright test",
23
+ "pub:minor": "git add . && git commit -m \"chore: prepare for publish minor\" && npm version minor && git push --follow-tags && npm publish",
24
+ "pub:patch": "git add . && git commit -m \"chore: prepare for publish patch\" && npm version patch && git push --follow-tags && npm publish",
25
+ "pub:prelish": "git add . && git commit -m \"chore: prepare for publish premajor\" && npm version premajor && git push --follow-tags && npm publish",
26
+ "pub:major": "git add . && git commit -m \"chore: prepare for publish major\" && npm version major && git push --follow-tags && npm publish",
27
+ "pub:preminor": "git add . && git commit -m \"chore: prepare for publish preminor\" && npm version preminor && git push --follow-tags && npm publish",
28
+ "pub:prepatch": "git add . && git commit -m \"chore: prepare for publish prepatch\" && npm version prepatch && git push --follow-tags && npm publish",
29
+ "pub:prerelease": "git add . && git commit -m \"chore: prepare for publish prerelease\" && npm version prerelease && git push --follow-tags && npm publish",
30
+ "pub:from-git": "git add . && git commit -m \"chore: prepare for publish from-git\" && npm version from-git && git push --follow-tags && npm publish",
31
+ "storybook": "storybook dev -p 6006",
32
+ "build-storybook": "storybook build"
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "!dist/**/*.test.*",
37
+ "!dist/**/*.spec.*"
38
+ ],
39
+ "sideEffects": [
40
+ "**/*.css"
41
+ ],
42
+ "svelte": "./dist/index.js",
43
+ "types": "./dist/index.d.ts",
44
+ "type": "module",
45
+ "exports": {
46
+ ".": {
47
+ "types": "./dist/index.d.ts",
48
+ "svelte": "./dist/index.js"
49
+ }
50
+ },
51
+ "peerDependencies": {
52
+ "svelte": "^5.0.0"
53
+ },
54
+ "devDependencies": {
55
+ "@eslint/compat": "^1.2.5",
56
+ "@eslint/js": "^9.18.0",
57
+ "@playwright/test": "^1.49.1",
58
+ "@storybook/addon-a11y": "^9.0.18",
59
+ "@storybook/addon-docs": "^9.0.18",
60
+ "@storybook/addon-svelte-csf": "^5.0.7",
61
+ "@storybook/sveltekit": "^9.0.18",
62
+ "@sveltejs/adapter-cloudflare": "^5.0.1",
63
+ "@sveltejs/kit": "^2.16.0",
64
+ "@sveltejs/package": "^2.0.0",
65
+ "@sveltejs/vite-plugin-svelte": "^5.0.0",
66
+ "@tailwindcss/vite": "^4.0.14",
67
+ "@testing-library/jest-dom": "^6.6.3",
68
+ "@testing-library/svelte": "^5.2.4",
69
+ "@types/node": "^22.13.10",
70
+ "eslint": "^9.18.0",
71
+ "eslint-config-prettier": "^10.0.1",
72
+ "eslint-plugin-storybook": "^9.0.18",
73
+ "eslint-plugin-svelte": "^3.0.0",
74
+ "globals": "^16.0.0",
75
+ "jsdom": "^26.0.0",
76
+ "prettier": "^3.4.2",
77
+ "prettier-plugin-svelte": "^3.3.3",
78
+ "prettier-plugin-tailwindcss": "^0.6.11",
79
+ "publint": "^0.3.2",
80
+ "storybook": "^9.0.18",
81
+ "svelte": "^5.0.0",
82
+ "svelte-check": "^4.0.0",
83
+ "sveltekit-superforms": "^2.24.0",
84
+ "tailwindcss": "^4.0.0",
85
+ "typescript": "^5.0.0",
86
+ "typescript-eslint": "^8.20.0",
87
+ "vite": "^6.0.0",
88
+ "vitest": "^3.0.0",
89
+ "zod": "^3.24.2"
90
+ },
91
+ "keywords": [
92
+ "svelte",
93
+ "ui",
94
+ "svelte5",
95
+ "modal",
96
+ "navigation",
97
+ "ripple",
98
+ "button",
99
+ "sidebar",
100
+ "card",
101
+ "select",
102
+ "tooltip",
103
+ "accordion",
104
+ "tabs",
105
+ "alert",
106
+ "badge",
107
+ "breadcrumb",
108
+ "carousel",
109
+ "collapse",
110
+ "list-group",
111
+ "pagination",
112
+ "progress",
113
+ "spinner",
114
+ "toast"
115
+ ],
116
+ "dependencies": {
117
+ "dayjs": "^1.11.13",
118
+ "echarts": "^5.6.0",
119
+ "svelte-sonner": "^0.3.28",
120
+ "tailwind-merge": "^3.0.2",
121
+ "tailwind-variants": "^1.0.0"
122
+ }
114
123
  }