odj-svelte-ui 0.4.3 → 0.4.5
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/README.md
CHANGED
|
@@ -23,7 +23,6 @@ This is a fork from [Flowbite for Svelte 5 with Runes](https://svelte-5-ui-lib.c
|
|
|
23
23
|
- `Avatar` has better borders;
|
|
24
24
|
- `Sidebar` has better hover colors and some other design tweaks, like border radius;
|
|
25
25
|
- `Card` is now rounded-xl;
|
|
26
|
-
- `Table` is now w-auto;
|
|
27
26
|
- `Tabs` styles are fixed and introduced underline animations and a complete modern redesign for "Full" style;
|
|
28
27
|
- The `Tooltip` component received a rework;
|
|
29
28
|
- `Modal` has <kbd>Esc</kbd> to close again;
|
|
@@ -36,8 +35,9 @@ This is a fork from [Flowbite for Svelte 5 with Runes](https://svelte-5-ui-lib.c
|
|
|
36
35
|
- `SidebarButton` has been removed. Please use the `Drawer` component to maintain the old sidebar behaviour;
|
|
37
36
|
- `Card` can be a button now adding `clickable` prop;
|
|
38
37
|
- `Accordion` has a new design and 4 options to the new prop `accordionStyle`: `none`, `flush`, `outlined` and `cards`;
|
|
39
|
-
- New `MultiSelect` input
|
|
38
|
+
- New `MultiSelect` input;
|
|
40
39
|
- `Table` can be rounded with `rounded` prop.
|
|
40
|
+
- Change the placeholder value for `Select`.
|
|
41
41
|
|
|
42
42
|
## Installation
|
|
43
43
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<script lang="ts" generics="T">
|
|
2
2
|
import { type SelectProps as Props, select as selectCls } from ".";
|
|
3
3
|
|
|
4
|
-
let { children, items, value = $bindable(), underline, size = "md", class: className, placeholder = "Choose option...", ...restProps }: Props<T> = $props();
|
|
4
|
+
let { children, items, value = $bindable(), underline, size = "md", class: className, placeholder = "Choose option...", placeholderValue = undefined, ...restProps }: Props<T> = $props();
|
|
5
5
|
|
|
6
6
|
const selectStyle = $derived(selectCls({ underline, size, className }));
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<select {...restProps} bind:value class={selectStyle}>
|
|
10
10
|
{#if placeholder}
|
|
11
|
-
<option disabled selected value={
|
|
11
|
+
<option disabled selected value={placeholderValue}>{placeholder}</option>
|
|
12
12
|
{/if}
|
|
13
13
|
|
|
14
14
|
{#if items}
|
|
@@ -12,6 +12,7 @@ interface SelectProps<T> extends Omit<HTMLSelectAttributes, "size"> {
|
|
|
12
12
|
underline?: boolean;
|
|
13
13
|
size?: SelectSize;
|
|
14
14
|
placeholder?: string;
|
|
15
|
+
placeholderValue?: any;
|
|
15
16
|
}
|
|
16
17
|
interface MultiSelectProps<T> extends MultiSelectParameters {
|
|
17
18
|
outerDivClass?: string;
|
package/dist/table/Table.svelte
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { setContext } from "svelte";
|
|
3
3
|
import { type TableProps as Props, table as tableCls, type TableCtxType, TableHead, TableBody, type HeadItemType } from ".";
|
|
4
4
|
|
|
5
|
-
let { children, footerSlot, captionSlot, tableItems, divClass = "relative
|
|
5
|
+
let { children, footerSlot, captionSlot, tableItems, divClass = "relative overflow-x-auto", striped, hoverable, noborder, shadow, rounded, color = "default", class: className, ...restProps }: Props = $props();
|
|
6
6
|
|
|
7
7
|
const { base, table } = $derived(tableCls({ color, shadow, rounded }));
|
|
8
8
|
|
package/dist/table/theme.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "odj-svelte-ui",
|
|
3
3
|
"author": "orbitadajogatina",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.5",
|
|
5
5
|
"description": "This is a fork from Flowbite Svelte 5 with Runes. I just made some changes that fits better my taste.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/index.js",
|