@r2digisolutions/ui 0.18.5 → 0.19.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.
@@ -18,4 +18,5 @@ import Input from './ui/Input/Input.svelte';
18
18
  import InputRadio from './ui/InputRadio/InputRadio.svelte';
19
19
  import Textarea from './ui/Textarea/Textarea.svelte';
20
20
  import Checkbox from './ui/Checkbox/Checkbox.svelte';
21
- export { Alert, Avatar, Button, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Container, Checkbox, Field, Section, Loading, TableList, Heading, Label, Input, InputRadio, Textarea, };
21
+ import Badge from './ui/Badge/Badge.svelte';
22
+ export { Alert, Avatar, Button, Badge, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Container, Checkbox, Field, Section, Loading, TableList, Heading, Label, Input, InputRadio, Textarea, };
@@ -18,4 +18,5 @@ import Input from './ui/Input/Input.svelte';
18
18
  import InputRadio from './ui/InputRadio/InputRadio.svelte';
19
19
  import Textarea from './ui/Textarea/Textarea.svelte';
20
20
  import Checkbox from './ui/Checkbox/Checkbox.svelte';
21
- export { Alert, Avatar, Button, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Container, Checkbox, Field, Section, Loading, TableList, Heading, Label, Input, InputRadio, Textarea, };
21
+ import Badge from './ui/Badge/Badge.svelte';
22
+ export { Alert, Avatar, Button, Badge, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Container, Checkbox, Field, Section, Loading, TableList, Heading, Label, Input, InputRadio, Textarea, };
@@ -0,0 +1,17 @@
1
+ <script lang="ts">
2
+ import type { Props } from './type.js';
3
+
4
+ const { selected, children, ...props }: Props = $props();
5
+ </script>
6
+
7
+ <button
8
+ {...props}
9
+ type="button"
10
+ class={[
11
+ 'cursor-pointer rounded-full px-3 py-1 text-sm font-medium transition-colors',
12
+ selected ? 'bg-blue-600 text-white' : 'bg-gray-200 text-gray-700 hover:bg-gray-300',
13
+ props.class
14
+ ]}
15
+ >
16
+ {@render children()}
17
+ </button>
@@ -0,0 +1,4 @@
1
+ import type { Props } from './type.js';
2
+ declare const Badge: import("svelte").Component<Props, {}, "">;
3
+ type Badge = ReturnType<typeof Badge>;
4
+ export default Badge;
@@ -0,0 +1,8 @@
1
+ import type { Snippet } from "svelte";
2
+ import type { ClassValue } from "svelte/elements";
3
+ export interface Props {
4
+ onclick?: () => void;
5
+ children: Snippet;
6
+ selected?: boolean;
7
+ class?: ClassValue;
8
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -27,7 +27,7 @@
27
27
  }
28
28
  }}
29
29
  class={[
30
- 'block h-12 w-full rounded-lg border border-gray-300 py-3 font-normal transition-colors placeholder:text-gray-400 focus:border-transparent focus:ring-2 focus:ring-purple-500 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-600 dark:bg-neutral-900 dark:focus:ring-offset-gray-800',
30
+ 'block h-12 w-full rounded-lg border border-gray-300 py-3 font-normal transition-colors placeholder:text-gray-400 read-only:border-gray-300 read-only:bg-gray-200 read-only:text-gray-500 focus:border-transparent focus:ring-2 focus:ring-purple-500 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-600 dark:bg-neutral-900 read-only:dark:border-neutral-700 read-only:dark:bg-neutral-800 read-only:dark:text-gray-400 dark:focus:ring-offset-gray-800',
31
31
  props.class
32
32
  ]}
33
33
  />
@@ -12,7 +12,7 @@
12
12
  (onchange as (value: string | null, e: Event) => void)?.(value || null, e);
13
13
  }}
14
14
  class={[
15
- 'block w-full rounded-lg border border-gray-300 px-3 py-3 font-normal transition-colors placeholder:text-gray-400 focus:border-transparent focus:ring-2 focus:ring-purple-500 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-600 dark:bg-neutral-900 dark:focus:ring-offset-gray-800',
15
+ 'block w-full rounded-lg border border-gray-300 px-3 py-3 font-normal transition-colors placeholder:text-gray-400 read-only:border-gray-300 read-only:bg-gray-200 read-only:text-gray-500 focus:border-transparent focus:ring-2 focus:ring-purple-500 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-600 dark:bg-neutral-900 dark:focus:ring-offset-gray-800',
16
16
  props.class
17
17
  ]}
18
18
  ></textarea>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/ui",
3
- "version": "0.18.5",
3
+ "version": "0.19.0",
4
4
  "private": false,
5
5
  "packageManager": "bun@1.2.19",
6
6
  "publishConfig": {
@@ -77,11 +77,11 @@
77
77
  "prettier-plugin-tailwindcss": "^0.6.14",
78
78
  "publint": "^0.3.12",
79
79
  "storybook": "^9.0.17",
80
- "svelte": "^5.36.10",
80
+ "svelte": "^5.36.13",
81
81
  "svelte-check": "^4.3.0",
82
82
  "tailwindcss": "^4.1.11",
83
83
  "typescript": "^5.8.3",
84
- "typescript-eslint": "^8.37.0",
84
+ "typescript-eslint": "^8.38.0",
85
85
  "vite": "^7.0.5",
86
86
  "vitest": "^3.2.4"
87
87
  },