@r2digisolutions/ui 0.2.9 → 0.3.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.
@@ -0,0 +1 @@
1
+ export * from './ui/Alert/Alert.svelte';
@@ -0,0 +1 @@
1
+ export * from './ui/Alert/Alert.svelte';
@@ -0,0 +1,66 @@
1
+ <script lang="ts">
2
+ import { fade } from 'svelte/transition';
3
+ import type { Props } from './type.js';
4
+
5
+ const { message, type = 'error', errors, children, ...props }: Props = $props();
6
+ </script>
7
+
8
+ <div
9
+ in:fade={{ duration: 300 }}
10
+ out:fade={{ duration: 300 }}
11
+ class={[
12
+ 'rounded-lg border border-red-200 bg-red-50 p-4 text-sm text-red-800 dark:border-red-900 dark:bg-red-800/10 dark:text-red-500',
13
+ props.class
14
+ ]}
15
+ role="alert"
16
+ tabindex="-1"
17
+ aria-labelledby="hs-with-list-label"
18
+ >
19
+ <div class="flex">
20
+ <div class="shrink-0">
21
+ <svg
22
+ class="mt-0.5 size-4 shrink-0"
23
+ xmlns="http://www.w3.org/2000/svg"
24
+ width="24"
25
+ height="24"
26
+ viewBox="0 0 24 24"
27
+ fill="none"
28
+ stroke="currentColor"
29
+ stroke-width="2"
30
+ stroke-linecap="round"
31
+ stroke-linejoin="round"
32
+ >
33
+ <circle cx="12" cy="12" r="10"></circle>
34
+ <path d="m15 9-6 6"></path>
35
+ <path d="m9 9 6 6"></path>
36
+ </svg>
37
+ </div>
38
+ <div class="ms-4">
39
+ <h3 id="hs-with-list-label" class="text-sm font-semibold">
40
+ {message}
41
+ </h3>
42
+ {#if errors}
43
+ <div class="mt-2 text-sm text-red-700 dark:text-red-400">
44
+ <ul class="list-disc space-y-1 ps-5">
45
+ {#each Object.entries(errors ?? {}) as [key, value]}
46
+ <li>
47
+ <strong>
48
+ {key}
49
+ </strong>:
50
+ {#if value.length > 1}
51
+ <ul class="list-disc space-y-1 pl-5">
52
+ {#each value as error}
53
+ <li>{error}</li>
54
+ {/each}
55
+ </ul>
56
+ {:else}
57
+ {value}
58
+ {/if}
59
+ </li>
60
+ {/each}
61
+ </ul>
62
+ </div>
63
+ {/if}
64
+ </div>
65
+ </div>
66
+ </div>
@@ -0,0 +1,4 @@
1
+ import type { Props } from './type.js';
2
+ declare const Alert: import("svelte").Component<Props, {}, "">;
3
+ type Alert = ReturnType<typeof Alert>;
4
+ export default Alert;
@@ -0,0 +1,9 @@
1
+ import type { Snippet } from "svelte";
2
+ import type { ClassValue } from "svelte/elements";
3
+ export interface Props {
4
+ class?: ClassValue;
5
+ message: string;
6
+ type?: 'error' | 'success' | 'warning' | 'info';
7
+ errors?: Record<string, string>;
8
+ children?: Snippet;
9
+ }
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './stores/I18n.svelte.js';
2
2
  export * from './settings/index.js';
3
+ export * from './components/index.js';
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './stores/I18n.svelte.js';
2
2
  export * from './settings/index.js';
3
+ export * from './components/index.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/ui",
3
- "version": "0.2.9",
3
+ "version": "0.3.0",
4
4
  "private": false,
5
5
  "packageManager": "pnpm@9.5.0",
6
6
  "publishConfig": {
@@ -46,40 +46,41 @@
46
46
  "svelte": "^5.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@changesets/cli": "^2.27.11",
50
- "@chromatic-com/storybook": "^3.2.3",
51
- "@eslint/compat": "^1.2.4",
52
- "@playwright/test": "^1.49.1",
53
- "@storybook/addon-essentials": "^8.4.7",
54
- "@storybook/addon-interactions": "^8.4.7",
49
+ "@changesets/cli": "^2.28.1",
50
+ "@chromatic-com/storybook": "^3.2.6",
51
+ "@eslint/compat": "^1.2.7",
52
+ "@playwright/test": "^1.51.0",
53
+ "@storybook/addon-essentials": "^8.6.6",
54
+ "@storybook/addon-interactions": "^8.6.6",
55
55
  "@storybook/addon-svelte-csf": "5.0.0-next.21",
56
- "@storybook/blocks": "^8.4.7",
57
- "@storybook/svelte": "^8.4.7",
58
- "@storybook/sveltekit": "^8.4.7",
59
- "@storybook/test": "^8.4.7",
56
+ "@storybook/blocks": "^8.6.6",
57
+ "@storybook/svelte": "^8.6.6",
58
+ "@storybook/sveltekit": "^8.6.6",
59
+ "@storybook/test": "^8.6.6",
60
60
  "@sveltejs/adapter-static": "^3.0.8",
61
- "@sveltejs/kit": "^2.15.2",
62
- "@sveltejs/package": "^2.3.7",
61
+ "@sveltejs/kit": "^2.19.2",
62
+ "@sveltejs/package": "^2.3.10",
63
63
  "@sveltejs/vite-plugin-svelte": "^5.0.3",
64
- "@vitest/browser": "^2.1.8",
65
- "autoprefixer": "^10.4.20",
64
+ "@tailwindcss/postcss": "^4.0.14",
65
+ "@vitest/browser": "^3.0.8",
66
66
  "changeset": "^0.2.6",
67
- "eslint": "^9.17.0",
68
- "eslint-config-prettier": "^9.1.0",
69
- "eslint-plugin-svelte": "^2.46.1",
70
- "globals": "^15.14.0",
71
- "prettier": "^3.4.2",
72
- "prettier-plugin-svelte": "^3.3.2",
73
- "prettier-plugin-tailwindcss": "^0.6.9",
74
- "publint": "^0.3.0",
75
- "storybook": "^8.4.7",
76
- "svelte": "^5.17.0",
77
- "svelte-check": "^4.1.3",
78
- "tailwindcss": "^3.4.17",
79
- "typescript": "^5.7.2",
80
- "typescript-eslint": "^8.19.1",
81
- "vite": "^6.0.7",
82
- "vitest": "^2.1.8"
67
+ "eslint": "^9.22.0",
68
+ "eslint-config-prettier": "^10.1.1",
69
+ "eslint-plugin-svelte": "^3.1.0",
70
+ "globals": "^16.0.0",
71
+ "jsdom": "^26.0.0",
72
+ "prettier": "^3.5.3",
73
+ "prettier-plugin-svelte": "^3.3.3",
74
+ "prettier-plugin-tailwindcss": "^0.6.11",
75
+ "publint": "^0.3.9",
76
+ "storybook": "^8.6.6",
77
+ "svelte": "^5.23.0",
78
+ "svelte-check": "^4.1.5",
79
+ "tailwindcss": "^4.0.14",
80
+ "typescript": "^5.8.2",
81
+ "typescript-eslint": "^8.26.1",
82
+ "vite": "^6.2.2",
83
+ "vitest": "^3.0.8"
83
84
  },
84
85
  "dependencies": {
85
86
  "@tailwindcss/container-queries": "^0.1.1",