odj-svelte-ui 0.4.5 → 0.5.1
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 +1 -0
- package/dist/badge/Badge.svelte +6 -13
- package/dist/forms/select/MultiSelect.svelte +3 -2
- package/dist/forms/select/Select.svelte +57 -10
- package/dist/forms/select/Select.svelte.d.ts +0 -5
- package/dist/forms/select/theme.d.ts +36 -0
- package/dist/forms/select/theme.js +11 -5
- package/dist/forms/select/type.d.ts +2 -1
- package/dist/forms/toggle/theme.js +1 -1
- package/dist/sidebar/theme.d.ts +84 -0
- package/dist/sidebar/theme.js +39 -9
- package/package.json +23 -23
package/README.md
CHANGED
|
@@ -38,6 +38,7 @@ This is a fork from [Flowbite for Svelte 5 with Runes](https://svelte-5-ui-lib.c
|
|
|
38
38
|
- New `MultiSelect` input;
|
|
39
39
|
- `Table` can be rounded with `rounded` prop.
|
|
40
40
|
- Change the placeholder value for `Select`.
|
|
41
|
+
- Using custom `Select` for supported browsers with CSS-only approach.
|
|
41
42
|
|
|
42
43
|
## Installation
|
|
43
44
|
|
package/dist/badge/Badge.svelte
CHANGED
|
@@ -11,20 +11,13 @@
|
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
13
|
{#if badgeStatus}
|
|
14
|
-
<div {...restProps} transition:transition={params as ParamsType} class={base({ className })}>
|
|
15
|
-
{
|
|
16
|
-
<a {href} {target} class={hrefClass({ class: aClass })}>
|
|
17
|
-
{@render children()}
|
|
18
|
-
</a>
|
|
19
|
-
{:else}
|
|
20
|
-
{@render children()}
|
|
21
|
-
{/if}
|
|
22
|
-
|
|
14
|
+
<svelte:element this={href ? "a" : "div"} {href} {target} {...restProps} transition:transition={params as ParamsType} class={[base({ className }), href && hrefClass({ class: aClass })]}>
|
|
15
|
+
{@render children()}
|
|
23
16
|
{#if dismissable}
|
|
24
17
|
{#if icon}
|
|
25
18
|
<button
|
|
26
19
|
type="button"
|
|
27
|
-
class="
|
|
20
|
+
class="text-primary-500 hover:bg-primary-200 focus:ring-primary-400 dark:hover:bg-primary-800 dark:hover:text-primary-300 m-0.5 ms-1.5 -me-1.5 rounded-sm p-0.5 whitespace-normal focus:ring-1 focus:outline-hidden"
|
|
28
21
|
aria-label="Remove badge"
|
|
29
22
|
onclick={() => {
|
|
30
23
|
badgeStatus = false;
|
|
@@ -34,10 +27,10 @@
|
|
|
34
27
|
{@render icon()}
|
|
35
28
|
</button>
|
|
36
29
|
{:else if onclick}
|
|
37
|
-
<CloseButton class="-
|
|
30
|
+
<CloseButton class="ms-1.5 -me-1.5" {color} size={large ? "sm" : "xs"} ariaLabel="Remove badge" {onclick} />
|
|
38
31
|
{:else}
|
|
39
32
|
<CloseButton
|
|
40
|
-
class="-
|
|
33
|
+
class="ms-1.5 -me-1.5"
|
|
41
34
|
{color}
|
|
42
35
|
size={large ? "sm" : "xs"}
|
|
43
36
|
ariaLabel="Remove badge"
|
|
@@ -47,7 +40,7 @@
|
|
|
47
40
|
/>
|
|
48
41
|
{/if}
|
|
49
42
|
{/if}
|
|
50
|
-
</
|
|
43
|
+
</svelte:element>
|
|
51
44
|
{/if}
|
|
52
45
|
|
|
53
46
|
<!--
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
let {
|
|
6
6
|
outerDivClass,
|
|
7
7
|
ulOptionsClass,
|
|
8
|
+
liOptionsClass,
|
|
8
9
|
ulSelectedClass,
|
|
9
10
|
liSelectedClass,
|
|
10
11
|
inputClass,
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
|
|
26
27
|
...restProps
|
|
27
28
|
}: Props<T> = $props();
|
|
28
|
-
const { outerDiv: outerDivCls, ulOptions, ulSelected, liSelected, input: inputCls } = $derived(multiselect());
|
|
29
|
+
const { outerDiv: outerDivCls, ulOptions, ulSelected, liSelected, input: inputCls, liOptions } = $derived(multiselect());
|
|
29
30
|
</script>
|
|
30
31
|
|
|
31
|
-
<MultiSelect bind:selected bind:value bind:searchText bind:open bind:activeIndex bind:activeOption bind:invalid bind:input bind:outerDiv bind:form_input bind:options bind:matchingOptions {...restProps} outerDivClass={outerDivCls({ className: outerDivClass })} ulOptionsClass={ulOptions({ class: ulOptionsClass })} ulSelectedClass={ulSelected({ class: ulSelectedClass })} liSelectedClass={liSelected({ class: liSelectedClass })} inputClass={inputCls({ class: inputClass })} --sms-remove-btn-hover-color="white" />
|
|
32
|
+
<MultiSelect bind:selected bind:value bind:searchText bind:open bind:activeIndex bind:activeOption bind:invalid bind:input bind:outerDiv bind:form_input bind:options bind:matchingOptions {...restProps} outerDivClass={outerDivCls({ className: outerDivClass })} ulOptionsClass={ulOptions({ class: ulOptionsClass })} ulSelectedClass={ulSelected({ class: ulSelectedClass })} liSelectedClass={liSelected({ class: liSelectedClass })} inputClass={inputCls({ class: inputClass })} liOptionClass={liOptions({ class: liOptionsClass })} --sms-remove-btn-hover-color="white" />
|
|
@@ -1,19 +1,35 @@
|
|
|
1
1
|
<script lang="ts" generics="T">
|
|
2
|
+
import { browser } from "$app/environment";
|
|
2
3
|
import { type SelectProps as Props, select as selectCls } from ".";
|
|
3
4
|
|
|
4
5
|
let { children, items, value = $bindable(), underline, size = "md", class: className, placeholder = "Choose option...", placeholderValue = undefined, ...restProps }: Props<T> = $props();
|
|
5
6
|
|
|
6
|
-
const
|
|
7
|
+
const customSelect = $derived(browser ? CSS.supports("appearance: base-select") : true);
|
|
8
|
+
const selectStyle = $derived(selectCls({ underline, size, customSelect, className }));
|
|
7
9
|
</script>
|
|
8
10
|
|
|
9
|
-
<select {
|
|
11
|
+
<select class={selectStyle} class:custom-select={customSelect} bind:value {...restProps}>
|
|
12
|
+
{#if customSelect}
|
|
13
|
+
<!-- svelte-ignore node_invalid_placement_ssr -->
|
|
14
|
+
<button class="flex w-full items-center justify-between" aria-label="Select Picker">
|
|
15
|
+
<selectedcontent></selectedcontent>
|
|
16
|
+
<span class="picker transition-rotate duration-400">
|
|
17
|
+
<svg class="text-light-surface-800 size-3 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
|
|
18
|
+
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5 5 1 1 5" />
|
|
19
|
+
</svg>
|
|
20
|
+
</span>
|
|
21
|
+
</button>
|
|
22
|
+
{/if}
|
|
23
|
+
|
|
10
24
|
{#if placeholder}
|
|
11
|
-
<option disabled selected value={placeholderValue}>{placeholder}</option>
|
|
25
|
+
<option disabled selected value={placeholderValue} class={[customSelect && "flex flex-row items-center gap-3 rounded-lg rounded-md px-3 py-2 text-sm"]}>{placeholder}</option>
|
|
12
26
|
{/if}
|
|
13
27
|
|
|
14
28
|
{#if items}
|
|
15
29
|
{#each items as { value, name }}
|
|
16
|
-
<option {value} class="text-dark-surface-950 required:invalid:text-dark-surface-400 dark:text-white"
|
|
30
|
+
<option {value} class={["text-dark-surface-950 required:invalid:text-dark-surface-400 dark:text-white", customSelect && "hover:bg-light-surface-200/70 dark:hover:bg-dark-surface-600 hover:text-light-surface-900 flex cursor-pointer flex-row items-center gap-3 rounded-lg rounded-md px-3 py-2 text-sm dark:hover:text-white"]}>
|
|
31
|
+
{name}
|
|
32
|
+
</option>
|
|
17
33
|
{/each}
|
|
18
34
|
{/if}
|
|
19
35
|
|
|
@@ -22,9 +38,40 @@
|
|
|
22
38
|
{/if}
|
|
23
39
|
</select>
|
|
24
40
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
41
|
+
<style>
|
|
42
|
+
select.custom-select {
|
|
43
|
+
&,
|
|
44
|
+
&::picker(select) {
|
|
45
|
+
appearance: base-select;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&::picker-icon {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
.picker {
|
|
52
|
+
rotate: 180deg;
|
|
53
|
+
:open & {
|
|
54
|
+
rotate: 0deg;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&::picker(select) {
|
|
59
|
+
border-radius: var(--radius-lg);
|
|
60
|
+
padding: calc(var(--spacing) * 1);
|
|
61
|
+
margin-block: 0.5rem;
|
|
62
|
+
border: none;
|
|
63
|
+
box-shadow:
|
|
64
|
+
0 10px 15px -3px rgba(0, 0, 0, 0.1),
|
|
65
|
+
0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
|
|
66
|
+
background-color: #ffffff;
|
|
67
|
+
color: var(--color-light-surface-700);
|
|
68
|
+
border: 1px solid var(--color-light-surface-200);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:global(.dark &::picker(select)) {
|
|
72
|
+
background-color: var(--color-dark-surface-700);
|
|
73
|
+
color: var(--color-dark-surface-200);
|
|
74
|
+
border-color: var(--color-dark-surface-600);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
</style>
|
|
@@ -20,11 +20,6 @@ interface $$IsomorphicComponent {
|
|
|
20
20
|
<T>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
|
|
21
21
|
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
22
22
|
}
|
|
23
|
-
/**
|
|
24
|
-
* [Go to docs](https://svelte-5-ui-lib.codewithshin.com/)
|
|
25
|
-
* ## Props
|
|
26
|
-
* @props:
|
|
27
|
-
*/
|
|
28
23
|
declare const Select: $$IsomorphicComponent;
|
|
29
24
|
type Select<T> = InstanceType<typeof Select<T>>;
|
|
30
25
|
export default Select;
|
|
@@ -8,6 +8,10 @@ export declare const select: import("tailwind-variants").TVReturnType<{
|
|
|
8
8
|
md: string;
|
|
9
9
|
lg: string;
|
|
10
10
|
};
|
|
11
|
+
customSelect: {
|
|
12
|
+
true: string;
|
|
13
|
+
false: string;
|
|
14
|
+
};
|
|
11
15
|
}, undefined, "block w-full disabled:cursor-not-allowed disabled:opacity-50", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
12
16
|
underline: {
|
|
13
17
|
true: string;
|
|
@@ -18,6 +22,10 @@ export declare const select: import("tailwind-variants").TVReturnType<{
|
|
|
18
22
|
md: string;
|
|
19
23
|
lg: string;
|
|
20
24
|
};
|
|
25
|
+
customSelect: {
|
|
26
|
+
true: string;
|
|
27
|
+
false: string;
|
|
28
|
+
};
|
|
21
29
|
}, {
|
|
22
30
|
underline: {
|
|
23
31
|
true: string;
|
|
@@ -28,6 +36,10 @@ export declare const select: import("tailwind-variants").TVReturnType<{
|
|
|
28
36
|
md: string;
|
|
29
37
|
lg: string;
|
|
30
38
|
};
|
|
39
|
+
customSelect: {
|
|
40
|
+
true: string;
|
|
41
|
+
false: string;
|
|
42
|
+
};
|
|
31
43
|
}>, {
|
|
32
44
|
underline: {
|
|
33
45
|
true: string;
|
|
@@ -38,6 +50,10 @@ export declare const select: import("tailwind-variants").TVReturnType<{
|
|
|
38
50
|
md: string;
|
|
39
51
|
lg: string;
|
|
40
52
|
};
|
|
53
|
+
customSelect: {
|
|
54
|
+
true: string;
|
|
55
|
+
false: string;
|
|
56
|
+
};
|
|
41
57
|
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
42
58
|
underline: {
|
|
43
59
|
true: string;
|
|
@@ -48,6 +64,10 @@ export declare const select: import("tailwind-variants").TVReturnType<{
|
|
|
48
64
|
md: string;
|
|
49
65
|
lg: string;
|
|
50
66
|
};
|
|
67
|
+
customSelect: {
|
|
68
|
+
true: string;
|
|
69
|
+
false: string;
|
|
70
|
+
};
|
|
51
71
|
}, undefined, "block w-full disabled:cursor-not-allowed disabled:opacity-50", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
52
72
|
underline: {
|
|
53
73
|
true: string;
|
|
@@ -58,6 +78,10 @@ export declare const select: import("tailwind-variants").TVReturnType<{
|
|
|
58
78
|
md: string;
|
|
59
79
|
lg: string;
|
|
60
80
|
};
|
|
81
|
+
customSelect: {
|
|
82
|
+
true: string;
|
|
83
|
+
false: string;
|
|
84
|
+
};
|
|
61
85
|
}, {
|
|
62
86
|
underline: {
|
|
63
87
|
true: string;
|
|
@@ -68,6 +92,10 @@ export declare const select: import("tailwind-variants").TVReturnType<{
|
|
|
68
92
|
md: string;
|
|
69
93
|
lg: string;
|
|
70
94
|
};
|
|
95
|
+
customSelect: {
|
|
96
|
+
true: string;
|
|
97
|
+
false: string;
|
|
98
|
+
};
|
|
71
99
|
}>, unknown, unknown, undefined>>;
|
|
72
100
|
export declare const multiselect: import("tailwind-variants").TVReturnType<{
|
|
73
101
|
[key: string]: {
|
|
@@ -77,6 +105,7 @@ export declare const multiselect: import("tailwind-variants").TVReturnType<{
|
|
|
77
105
|
ulOptions?: import("tailwind-variants").ClassValue;
|
|
78
106
|
ulSelected?: import("tailwind-variants").ClassValue;
|
|
79
107
|
liSelected?: import("tailwind-variants").ClassValue;
|
|
108
|
+
liOptions?: import("tailwind-variants").ClassValue;
|
|
80
109
|
};
|
|
81
110
|
};
|
|
82
111
|
} | {
|
|
@@ -87,11 +116,13 @@ export declare const multiselect: import("tailwind-variants").TVReturnType<{
|
|
|
87
116
|
ulOptions?: import("tailwind-variants").ClassValue;
|
|
88
117
|
ulSelected?: import("tailwind-variants").ClassValue;
|
|
89
118
|
liSelected?: import("tailwind-variants").ClassValue;
|
|
119
|
+
liOptions?: import("tailwind-variants").ClassValue;
|
|
90
120
|
};
|
|
91
121
|
};
|
|
92
122
|
} | {}, {
|
|
93
123
|
outerDiv: string;
|
|
94
124
|
ulOptions: string;
|
|
125
|
+
liOptions: string;
|
|
95
126
|
ulSelected: string;
|
|
96
127
|
liSelected: string;
|
|
97
128
|
input: string;
|
|
@@ -103,6 +134,7 @@ export declare const multiselect: import("tailwind-variants").TVReturnType<{
|
|
|
103
134
|
ulOptions?: import("tailwind-variants").ClassValue;
|
|
104
135
|
ulSelected?: import("tailwind-variants").ClassValue;
|
|
105
136
|
liSelected?: import("tailwind-variants").ClassValue;
|
|
137
|
+
liOptions?: import("tailwind-variants").ClassValue;
|
|
106
138
|
};
|
|
107
139
|
};
|
|
108
140
|
} | {}>, {
|
|
@@ -113,17 +145,20 @@ export declare const multiselect: import("tailwind-variants").TVReturnType<{
|
|
|
113
145
|
ulOptions?: import("tailwind-variants").ClassValue;
|
|
114
146
|
ulSelected?: import("tailwind-variants").ClassValue;
|
|
115
147
|
liSelected?: import("tailwind-variants").ClassValue;
|
|
148
|
+
liOptions?: import("tailwind-variants").ClassValue;
|
|
116
149
|
};
|
|
117
150
|
};
|
|
118
151
|
} | {}, {
|
|
119
152
|
outerDiv: string;
|
|
120
153
|
ulOptions: string;
|
|
154
|
+
liOptions: string;
|
|
121
155
|
ulSelected: string;
|
|
122
156
|
liSelected: string;
|
|
123
157
|
input: string;
|
|
124
158
|
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
125
159
|
outerDiv: string;
|
|
126
160
|
ulOptions: string;
|
|
161
|
+
liOptions: string;
|
|
127
162
|
ulSelected: string;
|
|
128
163
|
liSelected: string;
|
|
129
164
|
input: string;
|
|
@@ -135,6 +170,7 @@ export declare const multiselect: import("tailwind-variants").TVReturnType<{
|
|
|
135
170
|
ulOptions?: import("tailwind-variants").ClassValue;
|
|
136
171
|
ulSelected?: import("tailwind-variants").ClassValue;
|
|
137
172
|
liSelected?: import("tailwind-variants").ClassValue;
|
|
173
|
+
liOptions?: import("tailwind-variants").ClassValue;
|
|
138
174
|
};
|
|
139
175
|
};
|
|
140
176
|
} | {}>, unknown, unknown, undefined>>;
|
|
@@ -8,20 +8,26 @@ export const select = tv({
|
|
|
8
8
|
false: "text-light-surface-900 bg-light-surface-50 border border-light-surface-300 rounded-lg focus:ring-primary-500 focus:border-primary-500 dark:bg-dark-surface-700 dark:border-dark-surface-600 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 dark:placeholder-dark-surface-400 required:invalid:text-dark-surface-400 outline-hidden focus:ring-1"
|
|
9
9
|
},
|
|
10
10
|
size: {
|
|
11
|
-
sm: "text-
|
|
12
|
-
md: "text-sm p-2.5",
|
|
13
|
-
lg: "text-base
|
|
11
|
+
sm: "text-xs ps-9 pe-9 p-2",
|
|
12
|
+
md: "text-sm ps-10 pe-10 p-2.5",
|
|
13
|
+
lg: "sm:text-base ps-11 pe-11 p-3"
|
|
14
|
+
},
|
|
15
|
+
customSelect: {
|
|
16
|
+
true: "",
|
|
17
|
+
false: ""
|
|
14
18
|
}
|
|
15
19
|
},
|
|
16
20
|
defaultVariants: {
|
|
17
21
|
underline: false,
|
|
18
|
-
size: "md"
|
|
22
|
+
size: "md",
|
|
23
|
+
customSelect: true
|
|
19
24
|
}
|
|
20
25
|
});
|
|
21
26
|
export const multiselect = tv({
|
|
22
27
|
slots: {
|
|
23
28
|
outerDiv: "!text-light-surface-900 !bg-light-surface-50 !border !border-light-surface-300 !rounded-lg !outline-none focus-within:!ring-1 focus-within:!ring-primary-500 focus-within:!border-primary-500 dark:!bg-dark-surface-700 dark:!border-dark-surface-600 dark:!placeholder-dark-surface-400 dark:!text-white dark:focus-within:!ring-primary-500 dark:focus-within:!border-primary-500 !px-2 !py-1 !min-h-[2.7rem]",
|
|
24
|
-
ulOptions: "!bg-white dark:!bg-dark-surface-700 !max-h-40",
|
|
29
|
+
ulOptions: "!bg-white dark:!bg-dark-surface-700 !max-h-40 !border-1 !outline-none drop-shadow-lg dark:!border-dark-surface-600 !border-light-surface-200 !p-1 text-light-surface-700 dark:text-dark-surface-200",
|
|
30
|
+
liOptions: "!bg-transparent !text-dark-surface-950 required:invalid:!text-dark-surface-400 dark:!text-white hover:!bg-light-surface-200/70 dark:hover:!bg-dark-surface-600 hover:!text-light-surface-900 flex cursor-pointer flex-row items-center gap-3 rounded-md !px-3 !py-2 text-sm dark:hover:!text-white",
|
|
25
31
|
ulSelected: "!flex !gap-1.5 !mx-2",
|
|
26
32
|
liSelected: "!border-light-surface-200 dark:!border-dark-surface-700 !divide-light-surface-200 dark:!divide-dark-surface-700 !font-medium !text-xs !text-light-surface-800 dark:!text-dark-surface-300 !rounded !bg-light-surface-200 dark:!bg-dark-surface-600 !py-1 !px-2 !m-0",
|
|
27
33
|
input: "placeholder:!text-light-surface-400"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Snippet } from "svelte";
|
|
2
|
-
import type { MultiSelectParameters } from "svelte-multiselect";
|
|
2
|
+
import type { MultiSelectProps as MultiSelectParameters } from "svelte-multiselect";
|
|
3
3
|
import type { HTMLSelectAttributes } from "svelte/elements";
|
|
4
4
|
type SelectSize = "sm" | "md" | "lg";
|
|
5
5
|
type SelectOptionType<T> = {
|
|
@@ -17,6 +17,7 @@ interface SelectProps<T> extends Omit<HTMLSelectAttributes, "size"> {
|
|
|
17
17
|
interface MultiSelectProps<T> extends MultiSelectParameters {
|
|
18
18
|
outerDivClass?: string;
|
|
19
19
|
ulOptionsClass?: string;
|
|
20
|
+
liOptionsClass?: string;
|
|
20
21
|
ulSelectedClass?: string;
|
|
21
22
|
liSelectedClass?: string;
|
|
22
23
|
inputClass?: string;
|
|
@@ -2,7 +2,7 @@ import { tv } from "tailwind-variants";
|
|
|
2
2
|
export const toggle = tv({
|
|
3
3
|
slots: {
|
|
4
4
|
span: "me-3 shrink-0 bg-light-surface-200 rounded-full peer-focus-visible:ring-4 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:bg-white after:border-light-surface-300 after:border after:rounded-full after:transition-all dark:bg-dark-surface-600 dark:border-dark-surface-500 relative cursor-pointer",
|
|
5
|
-
label: "flex items-center",
|
|
5
|
+
label: "flex items-center w-fit",
|
|
6
6
|
input: "w-4 h-4 bg-light-surface-100 border-light-surface-300 dark:ring-offset-dark-surface-800 focus:ring-2 rounded-sm dark:bg-dark-surface-700 dark:border-dark-surface-600 sr-only peer"
|
|
7
7
|
},
|
|
8
8
|
variants: {
|
package/dist/sidebar/theme.d.ts
CHANGED
|
@@ -14,26 +14,38 @@ export declare const sidebar: import("tailwind-variants").TVReturnType<{
|
|
|
14
14
|
none: {
|
|
15
15
|
base: string;
|
|
16
16
|
div: string;
|
|
17
|
+
active: string;
|
|
18
|
+
nonactive: string;
|
|
17
19
|
};
|
|
18
20
|
sm: {
|
|
19
21
|
base: string;
|
|
20
22
|
div: string;
|
|
23
|
+
active: string;
|
|
24
|
+
nonactive: string;
|
|
21
25
|
};
|
|
22
26
|
md: {
|
|
23
27
|
base: string;
|
|
24
28
|
div: string;
|
|
29
|
+
active: string;
|
|
30
|
+
nonactive: string;
|
|
25
31
|
};
|
|
26
32
|
lg: {
|
|
27
33
|
base: string;
|
|
28
34
|
div: string;
|
|
35
|
+
active: string;
|
|
36
|
+
nonactive: string;
|
|
29
37
|
};
|
|
30
38
|
xl: {
|
|
31
39
|
base: string;
|
|
32
40
|
div: string;
|
|
41
|
+
active: string;
|
|
42
|
+
nonactive: string;
|
|
33
43
|
};
|
|
34
44
|
"2xl": {
|
|
35
45
|
base: string;
|
|
36
46
|
div: string;
|
|
47
|
+
active: string;
|
|
48
|
+
nonactive: string;
|
|
37
49
|
};
|
|
38
50
|
};
|
|
39
51
|
}, {
|
|
@@ -57,26 +69,38 @@ export declare const sidebar: import("tailwind-variants").TVReturnType<{
|
|
|
57
69
|
none: {
|
|
58
70
|
base: string;
|
|
59
71
|
div: string;
|
|
72
|
+
active: string;
|
|
73
|
+
nonactive: string;
|
|
60
74
|
};
|
|
61
75
|
sm: {
|
|
62
76
|
base: string;
|
|
63
77
|
div: string;
|
|
78
|
+
active: string;
|
|
79
|
+
nonactive: string;
|
|
64
80
|
};
|
|
65
81
|
md: {
|
|
66
82
|
base: string;
|
|
67
83
|
div: string;
|
|
84
|
+
active: string;
|
|
85
|
+
nonactive: string;
|
|
68
86
|
};
|
|
69
87
|
lg: {
|
|
70
88
|
base: string;
|
|
71
89
|
div: string;
|
|
90
|
+
active: string;
|
|
91
|
+
nonactive: string;
|
|
72
92
|
};
|
|
73
93
|
xl: {
|
|
74
94
|
base: string;
|
|
75
95
|
div: string;
|
|
96
|
+
active: string;
|
|
97
|
+
nonactive: string;
|
|
76
98
|
};
|
|
77
99
|
"2xl": {
|
|
78
100
|
base: string;
|
|
79
101
|
div: string;
|
|
102
|
+
active: string;
|
|
103
|
+
nonactive: string;
|
|
80
104
|
};
|
|
81
105
|
};
|
|
82
106
|
}, {
|
|
@@ -95,26 +119,38 @@ export declare const sidebar: import("tailwind-variants").TVReturnType<{
|
|
|
95
119
|
none: {
|
|
96
120
|
base: string;
|
|
97
121
|
div: string;
|
|
122
|
+
active: string;
|
|
123
|
+
nonactive: string;
|
|
98
124
|
};
|
|
99
125
|
sm: {
|
|
100
126
|
base: string;
|
|
101
127
|
div: string;
|
|
128
|
+
active: string;
|
|
129
|
+
nonactive: string;
|
|
102
130
|
};
|
|
103
131
|
md: {
|
|
104
132
|
base: string;
|
|
105
133
|
div: string;
|
|
134
|
+
active: string;
|
|
135
|
+
nonactive: string;
|
|
106
136
|
};
|
|
107
137
|
lg: {
|
|
108
138
|
base: string;
|
|
109
139
|
div: string;
|
|
140
|
+
active: string;
|
|
141
|
+
nonactive: string;
|
|
110
142
|
};
|
|
111
143
|
xl: {
|
|
112
144
|
base: string;
|
|
113
145
|
div: string;
|
|
146
|
+
active: string;
|
|
147
|
+
nonactive: string;
|
|
114
148
|
};
|
|
115
149
|
"2xl": {
|
|
116
150
|
base: string;
|
|
117
151
|
div: string;
|
|
152
|
+
active: string;
|
|
153
|
+
nonactive: string;
|
|
118
154
|
};
|
|
119
155
|
};
|
|
120
156
|
}>, {
|
|
@@ -133,26 +169,38 @@ export declare const sidebar: import("tailwind-variants").TVReturnType<{
|
|
|
133
169
|
none: {
|
|
134
170
|
base: string;
|
|
135
171
|
div: string;
|
|
172
|
+
active: string;
|
|
173
|
+
nonactive: string;
|
|
136
174
|
};
|
|
137
175
|
sm: {
|
|
138
176
|
base: string;
|
|
139
177
|
div: string;
|
|
178
|
+
active: string;
|
|
179
|
+
nonactive: string;
|
|
140
180
|
};
|
|
141
181
|
md: {
|
|
142
182
|
base: string;
|
|
143
183
|
div: string;
|
|
184
|
+
active: string;
|
|
185
|
+
nonactive: string;
|
|
144
186
|
};
|
|
145
187
|
lg: {
|
|
146
188
|
base: string;
|
|
147
189
|
div: string;
|
|
190
|
+
active: string;
|
|
191
|
+
nonactive: string;
|
|
148
192
|
};
|
|
149
193
|
xl: {
|
|
150
194
|
base: string;
|
|
151
195
|
div: string;
|
|
196
|
+
active: string;
|
|
197
|
+
nonactive: string;
|
|
152
198
|
};
|
|
153
199
|
"2xl": {
|
|
154
200
|
base: string;
|
|
155
201
|
div: string;
|
|
202
|
+
active: string;
|
|
203
|
+
nonactive: string;
|
|
156
204
|
};
|
|
157
205
|
};
|
|
158
206
|
}, {
|
|
@@ -176,26 +224,38 @@ export declare const sidebar: import("tailwind-variants").TVReturnType<{
|
|
|
176
224
|
none: {
|
|
177
225
|
base: string;
|
|
178
226
|
div: string;
|
|
227
|
+
active: string;
|
|
228
|
+
nonactive: string;
|
|
179
229
|
};
|
|
180
230
|
sm: {
|
|
181
231
|
base: string;
|
|
182
232
|
div: string;
|
|
233
|
+
active: string;
|
|
234
|
+
nonactive: string;
|
|
183
235
|
};
|
|
184
236
|
md: {
|
|
185
237
|
base: string;
|
|
186
238
|
div: string;
|
|
239
|
+
active: string;
|
|
240
|
+
nonactive: string;
|
|
187
241
|
};
|
|
188
242
|
lg: {
|
|
189
243
|
base: string;
|
|
190
244
|
div: string;
|
|
245
|
+
active: string;
|
|
246
|
+
nonactive: string;
|
|
191
247
|
};
|
|
192
248
|
xl: {
|
|
193
249
|
base: string;
|
|
194
250
|
div: string;
|
|
251
|
+
active: string;
|
|
252
|
+
nonactive: string;
|
|
195
253
|
};
|
|
196
254
|
"2xl": {
|
|
197
255
|
base: string;
|
|
198
256
|
div: string;
|
|
257
|
+
active: string;
|
|
258
|
+
nonactive: string;
|
|
199
259
|
};
|
|
200
260
|
};
|
|
201
261
|
}, {
|
|
@@ -219,26 +279,38 @@ export declare const sidebar: import("tailwind-variants").TVReturnType<{
|
|
|
219
279
|
none: {
|
|
220
280
|
base: string;
|
|
221
281
|
div: string;
|
|
282
|
+
active: string;
|
|
283
|
+
nonactive: string;
|
|
222
284
|
};
|
|
223
285
|
sm: {
|
|
224
286
|
base: string;
|
|
225
287
|
div: string;
|
|
288
|
+
active: string;
|
|
289
|
+
nonactive: string;
|
|
226
290
|
};
|
|
227
291
|
md: {
|
|
228
292
|
base: string;
|
|
229
293
|
div: string;
|
|
294
|
+
active: string;
|
|
295
|
+
nonactive: string;
|
|
230
296
|
};
|
|
231
297
|
lg: {
|
|
232
298
|
base: string;
|
|
233
299
|
div: string;
|
|
300
|
+
active: string;
|
|
301
|
+
nonactive: string;
|
|
234
302
|
};
|
|
235
303
|
xl: {
|
|
236
304
|
base: string;
|
|
237
305
|
div: string;
|
|
306
|
+
active: string;
|
|
307
|
+
nonactive: string;
|
|
238
308
|
};
|
|
239
309
|
"2xl": {
|
|
240
310
|
base: string;
|
|
241
311
|
div: string;
|
|
312
|
+
active: string;
|
|
313
|
+
nonactive: string;
|
|
242
314
|
};
|
|
243
315
|
};
|
|
244
316
|
}, {
|
|
@@ -257,26 +329,38 @@ export declare const sidebar: import("tailwind-variants").TVReturnType<{
|
|
|
257
329
|
none: {
|
|
258
330
|
base: string;
|
|
259
331
|
div: string;
|
|
332
|
+
active: string;
|
|
333
|
+
nonactive: string;
|
|
260
334
|
};
|
|
261
335
|
sm: {
|
|
262
336
|
base: string;
|
|
263
337
|
div: string;
|
|
338
|
+
active: string;
|
|
339
|
+
nonactive: string;
|
|
264
340
|
};
|
|
265
341
|
md: {
|
|
266
342
|
base: string;
|
|
267
343
|
div: string;
|
|
344
|
+
active: string;
|
|
345
|
+
nonactive: string;
|
|
268
346
|
};
|
|
269
347
|
lg: {
|
|
270
348
|
base: string;
|
|
271
349
|
div: string;
|
|
350
|
+
active: string;
|
|
351
|
+
nonactive: string;
|
|
272
352
|
};
|
|
273
353
|
xl: {
|
|
274
354
|
base: string;
|
|
275
355
|
div: string;
|
|
356
|
+
active: string;
|
|
357
|
+
nonactive: string;
|
|
276
358
|
};
|
|
277
359
|
"2xl": {
|
|
278
360
|
base: string;
|
|
279
361
|
div: string;
|
|
362
|
+
active: string;
|
|
363
|
+
nonactive: string;
|
|
280
364
|
};
|
|
281
365
|
};
|
|
282
366
|
}>, unknown, unknown, undefined>>;
|
package/dist/sidebar/theme.js
CHANGED
|
@@ -2,8 +2,8 @@ import { tv } from "tailwind-variants";
|
|
|
2
2
|
export const sidebar = tv({
|
|
3
3
|
slots: {
|
|
4
4
|
base: "top-0 left-0 z-10 min-w-full",
|
|
5
|
-
div: "
|
|
6
|
-
active: "cursor-pointer flex items-center p-2 rounded-lg text-base font-normal text-light-surface-900 dark:text-white bg-light-surface-
|
|
5
|
+
div: "p-2 rounded-xl bg-light-surface-200 dark:bg-dark-surface-800",
|
|
6
|
+
active: "cursor-pointer flex items-center p-2 rounded-lg text-base font-normal text-light-surface-900 dark:text-white bg-light-surface-100 dark:bg-dark-surface-700 hover:bg-light-surface-300/50 dark:hover:bg-dark-surface-600",
|
|
7
7
|
nonactive: "cursor-pointer flex items-center p-2 rounded-lg text-base font-normal text-light-surface-700 dark:text-dark-surface-400 hover:bg-light-surface-300/50 dark:hover:bg-dark-surface-600 hover:text-light-surface-800 dark:hover:text-dark-surface-200"
|
|
8
8
|
},
|
|
9
9
|
variants: {
|
|
@@ -13,18 +13,48 @@ export const sidebar = tv({
|
|
|
13
13
|
static: { base: "static" }
|
|
14
14
|
},
|
|
15
15
|
breakpoint: {
|
|
16
|
-
none: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
none: {
|
|
17
|
+
base: "min-w-64 h-full",
|
|
18
|
+
div: "h-full sm:rounded-none",
|
|
19
|
+
active: "text-nowrap sm:text-wrap",
|
|
20
|
+
nonactive: "text-nowrap sm:text-wrap"
|
|
21
|
+
},
|
|
22
|
+
sm: {
|
|
23
|
+
base: "sm:min-w-64 sm:h-full",
|
|
24
|
+
div: "sm:h-full sm:rounded-none",
|
|
25
|
+
active: "text-nowrap sm:text-wrap",
|
|
26
|
+
nonactive: "text-nowrap sm:text-wrap"
|
|
27
|
+
},
|
|
28
|
+
md: {
|
|
29
|
+
base: "md:min-w-64 md:h-full",
|
|
30
|
+
div: "md:h-full md:rounded-none",
|
|
31
|
+
active: "text-nowrap md:text-wrap",
|
|
32
|
+
nonactive: "text-nowrap md:text-wrap"
|
|
33
|
+
},
|
|
34
|
+
lg: {
|
|
35
|
+
base: "lg:min-w-64 lg:h-full",
|
|
36
|
+
div: "lg:h-full lg:rounded-none",
|
|
37
|
+
active: "text-nowrap lg:text-wrap",
|
|
38
|
+
nonactive: "text-nowrap lg:text-wrap"
|
|
39
|
+
},
|
|
40
|
+
xl: {
|
|
41
|
+
base: "xl:min-w-64 xl:h-full",
|
|
42
|
+
div: "xl:h-full xl:rounded-none",
|
|
43
|
+
active: "text-nowrap xl:text-wrap",
|
|
44
|
+
nonactive: "text-nowrap xl:text-wrap"
|
|
45
|
+
},
|
|
46
|
+
"2xl": {
|
|
47
|
+
base: "2xl:min-w-64 2xl:h-full",
|
|
48
|
+
div: "2xl:h-full 2xl:rounded-none",
|
|
49
|
+
active: "text-nowrap 2xl:text-wrap",
|
|
50
|
+
nonactive: "text-nowrap 2xl:text-wrap"
|
|
51
|
+
}
|
|
22
52
|
}
|
|
23
53
|
}
|
|
24
54
|
});
|
|
25
55
|
export const sidebargroup = tv({
|
|
26
56
|
slots: {
|
|
27
|
-
base: "flex flex-row gap-2"
|
|
57
|
+
base: "overflow-y-auto flex flex-row gap-2"
|
|
28
58
|
},
|
|
29
59
|
variants: {
|
|
30
60
|
breakpoint: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "odj-svelte-ui",
|
|
3
3
|
"author": "orbitadajogatina",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.1",
|
|
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",
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
"cp": "npx changeset publish"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@changesets/cli": "^2.
|
|
41
|
-
"@playwright/test": "^1.
|
|
40
|
+
"@changesets/cli": "^2.31.0",
|
|
41
|
+
"@playwright/test": "^1.59.1",
|
|
42
42
|
"@popperjs/core": "^2.11.8",
|
|
43
|
-
"@sveltejs/adapter-vercel": "^5.10.
|
|
43
|
+
"@sveltejs/adapter-vercel": "^5.10.3",
|
|
44
44
|
"@sveltejs/enhanced-img": "^0.4.4",
|
|
45
|
-
"@sveltejs/kit": "^2.
|
|
46
|
-
"@sveltejs/package": "^2.5.
|
|
45
|
+
"@sveltejs/kit": "^2.57.1",
|
|
46
|
+
"@sveltejs/package": "^2.5.7",
|
|
47
47
|
"@sveltejs/vite-plugin-svelte": "^5.1.1",
|
|
48
48
|
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
|
|
49
49
|
"@types/eslint": "^9.6.1",
|
|
50
|
-
"@types/node": "^22.
|
|
51
|
-
"autoprefixer": "^10.
|
|
52
|
-
"eslint": "^9.
|
|
50
|
+
"@types/node": "^22.19.17",
|
|
51
|
+
"autoprefixer": "^10.5.0",
|
|
52
|
+
"eslint": "^9.39.4",
|
|
53
53
|
"eslint-config-prettier": "^9.1.2",
|
|
54
54
|
"eslint-plugin-svelte": "^2.46.1",
|
|
55
55
|
"flowbite": "^2.5.2",
|
|
@@ -57,23 +57,23 @@
|
|
|
57
57
|
"flowbite-svelte-icons": "^2.3.0",
|
|
58
58
|
"globals": "^15.15.0",
|
|
59
59
|
"highlight.js": "^11.11.1",
|
|
60
|
-
"postcss": "^8.5.
|
|
61
|
-
"prettier": "^3.
|
|
62
|
-
"prettier-plugin-svelte": "^3.
|
|
60
|
+
"postcss": "^8.5.10",
|
|
61
|
+
"prettier": "^3.8.3",
|
|
62
|
+
"prettier-plugin-svelte": "^3.5.1",
|
|
63
63
|
"prettier-plugin-tailwindcss": "^0.6.14",
|
|
64
64
|
"publint": "^0.2.12",
|
|
65
65
|
"runatics": "^0.1.4",
|
|
66
66
|
"runes-meta-tags": "^0.4.5",
|
|
67
|
-
"svelte": "^5.
|
|
67
|
+
"svelte": "^5.55.4",
|
|
68
68
|
"svelte-animated-icons": "^0.7.1",
|
|
69
|
-
"svelte-check": "^4.
|
|
69
|
+
"svelte-check": "^4.4.6",
|
|
70
70
|
"svelte-lib-helpers": "^0.4.31",
|
|
71
71
|
"svelte-rune-highlight": "^0.5.15",
|
|
72
72
|
"tslib": "^2.8.1",
|
|
73
|
-
"tsx": "^4.
|
|
74
|
-
"typescript": "^5.9.
|
|
75
|
-
"typescript-eslint": "^8.
|
|
76
|
-
"vite": "^6.
|
|
73
|
+
"tsx": "^4.21.0",
|
|
74
|
+
"typescript": "^5.9.3",
|
|
75
|
+
"typescript-eslint": "^8.59.0",
|
|
76
|
+
"vite": "^6.4.2",
|
|
77
77
|
"vite-imagetools": "^7.1.1"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
@@ -89,16 +89,16 @@
|
|
|
89
89
|
],
|
|
90
90
|
"type": "module",
|
|
91
91
|
"dependencies": {
|
|
92
|
-
"@floating-ui/dom": "^1.7.
|
|
92
|
+
"@floating-ui/dom": "^1.7.6",
|
|
93
93
|
"@skeletonlabs/floating-ui-svelte": "^0.3.9",
|
|
94
|
-
"@tailwindcss/postcss": "^4.
|
|
94
|
+
"@tailwindcss/postcss": "^4.2.4",
|
|
95
95
|
"apexcharts": "^3.54.1",
|
|
96
96
|
"clsx": "^2.1.1",
|
|
97
97
|
"deepmerge": "^4.3.1",
|
|
98
|
-
"svelte-multiselect": "^11.
|
|
99
|
-
"tailwind-merge": "^2.6.
|
|
98
|
+
"svelte-multiselect": "^11.7.0",
|
|
99
|
+
"tailwind-merge": "^2.6.1",
|
|
100
100
|
"tailwind-variants": "^0.3.1",
|
|
101
|
-
"tailwindcss": "^4.
|
|
101
|
+
"tailwindcss": "^4.2.4"
|
|
102
102
|
},
|
|
103
103
|
"exports": {
|
|
104
104
|
".": {
|