flowbite-svelte 0.37.1 → 0.37.3
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/dist/darkmode/DarkMode.svelte +14 -18
- package/dist/darkmode/DarkMode.svelte.d.ts +0 -1
- package/dist/darkmode/DarkMode.svelte.d.ts.map +1 -1
- package/dist/dropdowns/Dropdown.svelte +1 -1
- package/dist/forms/Checkbox.svelte +2 -2
- package/dist/forms/Checkbox.svelte.d.ts +1 -1
- package/dist/forms/Radio.svelte +2 -2
- package/dist/forms/Radio.svelte.d.ts +1 -1
- package/dist/forms/Select.svelte +2 -2
- package/dist/forms/Select.svelte.d.ts +1 -1
- package/dist/forms/Textarea.svelte +5 -3
- package/dist/forms/Textarea.svelte.d.ts +4 -0
- package/dist/forms/Textarea.svelte.d.ts.map +1 -1
- package/dist/forms/Toggle.svelte +1 -1
- package/dist/list-group/Listgroup.svelte +6 -2
- package/dist/list-group/Listgroup.svelte.d.ts +4 -2
- package/dist/list-group/Listgroup.svelte.d.ts.map +1 -1
- package/dist/list-group/ListgroupItem.svelte +16 -6
- package/dist/list-group/ListgroupItem.svelte.d.ts +12 -0
- package/dist/list-group/ListgroupItem.svelte.d.ts.map +1 -1
- package/dist/megamenu/MegaMenu.svelte +1 -1
- package/dist/megamenu/MegaMenu.svelte.d.ts +1 -1
- package/dist/modals/Modal.svelte +1 -1
- package/dist/modals/Modal.svelte.d.ts +1 -1
- package/dist/modals/Modal.svelte.d.ts.map +1 -1
- package/dist/navbar/NavBrand.svelte +1 -1
- package/dist/navbar/NavBrand.svelte.d.ts +1 -1
- package/dist/navbar/NavDropdown.svelte +1 -1
- package/dist/navbar/NavDropdown.svelte.d.ts +1 -1
- package/dist/navbar/NavHamburger.svelte +1 -1
- package/dist/navbar/NavHamburger.svelte.d.ts +1 -1
- package/dist/navbar/NavLi.svelte +1 -1
- package/dist/navbar/NavLi.svelte.d.ts +1 -1
- package/dist/navbar/NavSidebarHamburger.svelte +1 -1
- package/dist/navbar/NavSidebarHamburger.svelte.d.ts +1 -1
- package/dist/navbar/NavUl.svelte +1 -1
- package/dist/navbar/NavUl.svelte.d.ts +1 -1
- package/dist/navbar/Navbar.svelte +1 -1
- package/dist/navbar/Navbar.svelte.d.ts +1 -1
- package/dist/navbar/SidebarMenu.svelte +1 -1
- package/dist/navbar/SidebarMenu.svelte.d.ts +1 -1
- package/dist/progressbars/Progressbar.svelte +3 -2
- package/dist/progressbars/Progressbar.svelte.d.ts +2 -2
- package/dist/progressbars/Progressbar.svelte.d.ts.map +1 -1
- package/dist/ratings/ScoreRating.svelte +9 -8
- package/dist/ratings/ScoreRating.svelte.d.ts +5 -1
- package/dist/ratings/ScoreRating.svelte.d.ts.map +1 -1
- package/dist/spinners/Spinner.svelte +3 -2
- package/dist/spinners/Spinner.svelte.d.ts +2 -2
- package/dist/spinners/Spinner.svelte.d.ts.map +1 -1
- package/dist/tabs/Tabs.svelte +15 -15
- package/dist/tabs/Tabs.svelte.d.ts +1 -1
- package/dist/tabs/Tabs.svelte.d.ts.map +1 -1
- package/dist/timeline/TimelineItem.svelte +10 -6
- package/dist/timeline/TimelineItem.svelte.d.ts +4 -0
- package/dist/timeline/TimelineItem.svelte.d.ts.map +1 -1
- package/dist/utils/Frame.svelte +2 -1
- package/dist/utils/Frame.svelte.d.ts.map +1 -1
- package/dist/utils/Popper.svelte +8 -15
- package/dist/utils/Popper.svelte.d.ts.map +1 -1
- package/dist/utils/focusTrap.d.ts.map +1 -1
- package/dist/utils/focusTrap.js +2 -2
- package/package.json +17 -20
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
// declare initialTheme as a prop with a default value of 'light'
|
|
4
|
-
export let initialTheme = 'light';
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
5
2
|
export let btnClass = 'text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5';
|
|
6
3
|
export let size = 'md';
|
|
7
4
|
const sizes = {
|
|
@@ -9,22 +6,21 @@ const sizes = {
|
|
|
9
6
|
md: 'w-5 h-5',
|
|
10
7
|
lg: 'w-6 h-6'
|
|
11
8
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
localStorage.getItem('color-theme') === initialTheme ||
|
|
18
|
-
(!('color-theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)
|
|
19
|
-
? window.document.documentElement.classList.add(initialTheme)
|
|
20
|
-
: window.document.documentElement.classList.remove(initialTheme);
|
|
21
|
-
toggleTheme = () => {
|
|
22
|
-
const isDark = window.document.documentElement.classList.toggle('dark');
|
|
23
|
-
localStorage.setItem('color-theme', isDark ? 'dark' : 'light');
|
|
24
|
-
};
|
|
25
|
-
});
|
|
9
|
+
const toggleTheme = () => {
|
|
10
|
+
const isDark = window.document.documentElement.classList.toggle('dark');
|
|
11
|
+
localStorage.setItem('color-theme', isDark ? 'dark' : 'light');
|
|
12
|
+
};
|
|
26
13
|
</script>
|
|
27
14
|
|
|
15
|
+
<svelte:head>
|
|
16
|
+
<script>
|
|
17
|
+
localStorage.getItem('color-theme') === 'dark' ||
|
|
18
|
+
(!('color-theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)
|
|
19
|
+
? window.document.documentElement.classList.add('dark')
|
|
20
|
+
: window.document.documentElement.classList.remove('dark');
|
|
21
|
+
</script>
|
|
22
|
+
</svelte:head>
|
|
23
|
+
|
|
28
24
|
<button
|
|
29
25
|
on:click={toggleTheme}
|
|
30
26
|
aria-label="Dark mode"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DarkMode.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/darkmode/DarkMode.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;
|
|
1
|
+
{"version":3,"file":"DarkMode.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/darkmode/DarkMode.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAgDD,QAAA,MAAM,SAAS;;;;;;;;;;;;;CAA+D,CAAC;AAC/E,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACnD,MAAM,MAAM,cAAc,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACrD,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,oBAAoB,CAAC,aAAa,EAAE,cAAc,EAAE,aAAa,CAAC;CACvG"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { labelClass, inputClass } from './Radio.svelte';
|
|
3
3
|
import Label from './Label.svelte';
|
|
4
4
|
// properties forwarding
|
|
5
|
-
export let color = '
|
|
5
|
+
export let color = 'primary';
|
|
6
6
|
export let custom = false;
|
|
7
7
|
export let inline = false;
|
|
8
8
|
export let group = [];
|
|
@@ -84,7 +84,7 @@ function onChange() {
|
|
|
84
84
|
- Advanced layout
|
|
85
85
|
- Group variable
|
|
86
86
|
## Props
|
|
87
|
-
@prop color: FormColorType = '
|
|
87
|
+
@prop color: FormColorType = 'primary';
|
|
88
88
|
@prop custom: boolean = false;
|
|
89
89
|
@prop inline: boolean = false;
|
|
90
90
|
@prop group: (string | number)[] = [];
|
|
@@ -50,7 +50,7 @@ export type CheckboxSlots = typeof __propDef.slots;
|
|
|
50
50
|
* - Advanced layout
|
|
51
51
|
* - Group variable
|
|
52
52
|
* ## Props
|
|
53
|
-
* @prop color: FormColorType = '
|
|
53
|
+
* @prop color: FormColorType = 'primary';
|
|
54
54
|
* @prop custom: boolean = false;
|
|
55
55
|
* @prop inline: boolean = false;
|
|
56
56
|
* @prop group: (string | number)[] = [];
|
package/dist/forms/Radio.svelte
CHANGED
|
@@ -17,7 +17,7 @@ export const inputClass = (custom, color, rounded, tinted, extraClass) => classN
|
|
|
17
17
|
|
|
18
18
|
<script>import { getContext } from 'svelte';
|
|
19
19
|
import Label from './Label.svelte';
|
|
20
|
-
export let color = '
|
|
20
|
+
export let color = 'primary';
|
|
21
21
|
export let custom = false;
|
|
22
22
|
export let inline = false;
|
|
23
23
|
export let group = '';
|
|
@@ -64,7 +64,7 @@ let background = getContext('background');
|
|
|
64
64
|
- Colors
|
|
65
65
|
- Advanced layout
|
|
66
66
|
## Props
|
|
67
|
-
@prop color: FormColorType = '
|
|
67
|
+
@prop color: FormColorType = 'primary';
|
|
68
68
|
@prop custom: boolean = false;
|
|
69
69
|
@prop inline: boolean = false;
|
|
70
70
|
@prop group: number | string = '';
|
|
@@ -50,7 +50,7 @@ export type RadioSlots = typeof __propDef.slots;
|
|
|
50
50
|
* - Colors
|
|
51
51
|
* - Advanced layout
|
|
52
52
|
* ## Props
|
|
53
|
-
* @prop color: FormColorType = '
|
|
53
|
+
* @prop color: FormColorType = 'primary';
|
|
54
54
|
* @prop custom: boolean = false;
|
|
55
55
|
* @prop inline: boolean = false;
|
|
56
56
|
* @prop group: number | string = '';
|
package/dist/forms/Select.svelte
CHANGED
|
@@ -4,7 +4,7 @@ export let value;
|
|
|
4
4
|
export let placeholder = 'Choose option ...';
|
|
5
5
|
export let underline = false;
|
|
6
6
|
export let size = 'md';
|
|
7
|
-
export let defaultClass = 'text-gray-900 bg-gray-50 border border-gray-300 rounded-lg focus:ring-
|
|
7
|
+
export let defaultClass = 'text-gray-900 bg-gray-50 border border-gray-300 rounded-lg focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500';
|
|
8
8
|
export let underlineClass = 'text-gray-500 bg-transparent border-0 border-b-2 border-gray-200 appearance-none dark:text-gray-400 dark:border-gray-700 focus:outline-none focus:ring-0 focus:border-gray-200 peer';
|
|
9
9
|
const common = 'block w-full';
|
|
10
10
|
const sizes = {
|
|
@@ -45,7 +45,7 @@ $: selectClass = classNames(common, underline ? underlineClass : defaultClass, s
|
|
|
45
45
|
@prop placeholder: string = 'Choose option ...';
|
|
46
46
|
@prop underline: boolean = false;
|
|
47
47
|
@prop size: 'sm' | 'md' | 'lg' = 'md';
|
|
48
|
-
@prop defaultClass: string = 'text-gray-900 bg-gray-50 border border-gray-300 rounded-lg focus:ring-
|
|
48
|
+
@prop defaultClass: string = 'text-gray-900 bg-gray-50 border border-gray-300 rounded-lg focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500';
|
|
49
49
|
@prop underlineClass: string = 'text-gray-500 bg-transparent border-0 border-b-2 border-gray-200 appearance-none dark:text-gray-400 dark:border-gray-700 focus:outline-none focus:ring-0 focus:border-gray-200 peer';
|
|
50
50
|
## Example
|
|
51
51
|
```
|
|
@@ -41,7 +41,7 @@ export type SelectSlots = typeof __propDef.slots;
|
|
|
41
41
|
* @prop placeholder: string = 'Choose option ...';
|
|
42
42
|
* @prop underline: boolean = false;
|
|
43
43
|
* @prop size: 'sm' | 'md' | 'lg' = 'md';
|
|
44
|
-
* @prop defaultClass: string = 'text-gray-900 bg-gray-50 border border-gray-300 rounded-lg focus:ring-
|
|
44
|
+
* @prop defaultClass: string = 'text-gray-900 bg-gray-50 border border-gray-300 rounded-lg focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500';
|
|
45
45
|
* @prop underlineClass: string = 'text-gray-500 bg-transparent border-0 border-b-2 border-gray-200 appearance-none dark:text-gray-400 dark:border-gray-700 focus:outline-none focus:ring-0 focus:border-gray-200 peer';
|
|
46
46
|
* ## Example
|
|
47
47
|
* ```
|
|
@@ -3,14 +3,14 @@ import { getContext } from 'svelte';
|
|
|
3
3
|
import Wrapper from '../utils/Wrapper.svelte';
|
|
4
4
|
const background = getContext('background');
|
|
5
5
|
export let value = '';
|
|
6
|
+
export let wrappedClass = 'block w-full text-sm border-0 px-0 bg-inherit dark:bg-inherit focus:outline-none focus:ring-0';
|
|
7
|
+
export let unWrappedClass = 'p-2.5 text-sm focus:ring-primary-500 focus:border-primary-500 dark:focus:ring-primary-500 dark:focus:border-primary-500';
|
|
6
8
|
let wrapped;
|
|
7
9
|
$: wrapped = $$slots.header || $$slots.footer;
|
|
8
10
|
let wrapperClass;
|
|
9
11
|
$: wrapperClass = classNames('w-full rounded-lg', background ? 'bg-white dark:bg-gray-800' : 'bg-gray-50 dark:bg-gray-700', 'text-gray-900 dark:placeholder-gray-400 dark:text-white ', 'border border-gray-200 dark:border-gray-600', $$props.class);
|
|
10
12
|
let textareaClass;
|
|
11
|
-
$: textareaClass = wrapped
|
|
12
|
-
? classNames('block w-full', 'text-sm', 'border-0 px-0', 'bg-inherit dark:bg-inherit', 'focus:outline-none focus:ring-0')
|
|
13
|
-
: classNames(wrapperClass, 'p-2.5 text-sm', 'focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-blue-500 dark:focus:border-blue-500');
|
|
13
|
+
$: textareaClass = wrapped ? classNames(wrappedClass) : classNames(wrapperClass, unWrappedClass);
|
|
14
14
|
const headerClass = (header) => classNames(header ? 'border-b' : 'border-t', 'py-2 px-3 border-gray-200 dark:border-gray-600');
|
|
15
15
|
let innerWrapperClass;
|
|
16
16
|
$: innerWrapperClass = classNames('py-2 px-4 bg-white dark:bg-gray-800', $$slots.footer || 'rounded-b-lg', $$slots.header || 'rounded-t-lg');
|
|
@@ -59,6 +59,8 @@ $: innerWrapperClass = classNames('py-2 px-4 bg-white dark:bg-gray-800', $$slots
|
|
|
59
59
|
- Chatroom input
|
|
60
60
|
## Props
|
|
61
61
|
@prop value: string = '';
|
|
62
|
+
@prop wrappedClass: string = 'block w-full text-sm border-0 px-0 bg-inherit dark:bg-inherit focus:outline-none focus:ring-0';
|
|
63
|
+
@prop unWrappedClass: string = 'p-2.5 text-sm focus:ring-primary-500 focus:border-primary-500 dark:focus:ring-primary-500 dark:focus:border-primary-500';
|
|
62
64
|
## Event
|
|
63
65
|
- on:blur
|
|
64
66
|
- on:change
|
|
@@ -3,6 +3,8 @@ declare const __propDef: {
|
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
5
|
value?: string | undefined;
|
|
6
|
+
wrappedClass?: string | undefined;
|
|
7
|
+
unWrappedClass?: string | undefined;
|
|
6
8
|
};
|
|
7
9
|
events: {
|
|
8
10
|
blur: FocusEvent;
|
|
@@ -39,6 +41,8 @@ export type TextareaSlots = typeof __propDef.slots;
|
|
|
39
41
|
* - Chatroom input
|
|
40
42
|
* ## Props
|
|
41
43
|
* @prop value: string = '';
|
|
44
|
+
* @prop wrappedClass: string = 'block w-full text-sm border-0 px-0 bg-inherit dark:bg-inherit focus:outline-none focus:ring-0';
|
|
45
|
+
* @prop unWrappedClass: string = 'p-2.5 text-sm focus:ring-primary-500 focus:border-primary-500 dark:focus:ring-primary-500 dark:focus:border-primary-500';
|
|
42
46
|
* ## Event
|
|
43
47
|
* - on:blur
|
|
44
48
|
* - on:change
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/forms/Textarea.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;
|
|
1
|
+
{"version":3,"file":"Textarea.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/forms/Textarea.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAgED,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA+D,CAAC;AAC/E,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACnD,MAAM,MAAM,cAAc,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACrD,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,oBAAoB,CAAC,aAAa,EAAE,cAAc,EAAE,aAAa,CAAC;CACvG"}
|
package/dist/forms/Toggle.svelte
CHANGED
|
@@ -27,7 +27,7 @@ const sizes = {
|
|
|
27
27
|
custom: customSize
|
|
28
28
|
};
|
|
29
29
|
let divClass;
|
|
30
|
-
$: divClass = classNames(common, background ? 'dark:bg-gray-600 dark:border-gray-500' : 'dark:bg-gray-700 dark:border-gray-600', colors[$$restProps.color ?? '
|
|
30
|
+
$: divClass = classNames(common, background ? 'dark:bg-gray-600 dark:border-gray-500' : 'dark:bg-gray-700 dark:border-gray-600', colors[$$restProps.color ?? 'primary'], sizes[size], 'relative');
|
|
31
31
|
</script>
|
|
32
32
|
|
|
33
33
|
<Checkbox custom {...$$restProps} class={$$props.class} {value} bind:checked bind:group on:click on:change>
|
|
@@ -12,9 +12,13 @@ $: groupClass = classNames(defaultClass, $$props.class);
|
|
|
12
12
|
|
|
13
13
|
<Frame tag={active ? 'div' : 'ul'} {...$$restProps} rounded border class={groupClass}>
|
|
14
14
|
{#each items as item, index}
|
|
15
|
-
|
|
15
|
+
{#if typeof item === 'object'}
|
|
16
|
+
<ListgroupItem {active} {...item} {index} on:click><slot {item} {index} /></ListgroupItem>
|
|
17
|
+
{:else}
|
|
18
|
+
<ListgroupItem {active} {index} on:click><slot {item} {index} /></ListgroupItem>
|
|
19
|
+
{/if}
|
|
16
20
|
{:else}
|
|
17
|
-
<slot />
|
|
21
|
+
<slot item={items[0]} />
|
|
18
22
|
{/each}
|
|
19
23
|
</Frame>
|
|
20
24
|
|
|
@@ -243,7 +243,7 @@ declare const __propDef: {
|
|
|
243
243
|
node?: HTMLElement | undefined;
|
|
244
244
|
use?: import("svelte/action").Action<HTMLElement, any, Record<never, any>> | undefined;
|
|
245
245
|
options?: object | undefined;
|
|
246
|
-
items?: ListGroupItemType[] | undefined;
|
|
246
|
+
items?: string[] | ListGroupItemType[] | undefined;
|
|
247
247
|
active?: boolean | undefined;
|
|
248
248
|
};
|
|
249
249
|
events: {
|
|
@@ -252,7 +252,9 @@ declare const __propDef: {
|
|
|
252
252
|
[evt: string]: CustomEvent<any>;
|
|
253
253
|
};
|
|
254
254
|
slots: {
|
|
255
|
-
default: {
|
|
255
|
+
default: {
|
|
256
|
+
item: string | ListGroupItemType;
|
|
257
|
+
};
|
|
256
258
|
};
|
|
257
259
|
};
|
|
258
260
|
export type ListgroupProps = typeof __propDef.props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listgroup.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/list-group/Listgroup.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAGD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"Listgroup.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/list-group/Listgroup.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAGD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AA2ClD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwC,CAAC;AACxD,MAAM,MAAM,cAAc,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACpD,MAAM,MAAM,eAAe,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACtD,MAAM,MAAM,cAAc,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,oBAAoB,CAAC,cAAc,EAAE,eAAe,EAAE,cAAc,CAAC;CAC3G"}
|
|
@@ -4,17 +4,21 @@ export let active = getContext('active');
|
|
|
4
4
|
export let current = false;
|
|
5
5
|
export let disabled = false;
|
|
6
6
|
export let href = '';
|
|
7
|
+
export let currentClass = 'text-white bg-primary-700 dark:text-white dark:bg-gray-800';
|
|
8
|
+
export let normalClass = '';
|
|
9
|
+
export let disabledClass = 'text-gray-900 bg-gray-100 dark:bg-gray-600 dark:text-gray-400';
|
|
10
|
+
export let focusClass = 'focus:z-40 focus:outline-none focus:ring-2 focus:ring-primary-700 focus:text-primary-700 dark:focus:ring-gray-500 dark:focus:text-white';
|
|
11
|
+
export let hoverClass = 'hover:bg-gray-100 hover:text-primary-700 dark:hover:bg-gray-600 dark:hover:text-white';
|
|
12
|
+
export let itemDefaultClass = 'py-2 px-4 w-full text-sm font-medium list-none first:rounded-t-lg last:rounded-b-lg';
|
|
7
13
|
const states = {
|
|
8
|
-
current:
|
|
9
|
-
normal:
|
|
10
|
-
disabled:
|
|
14
|
+
current: currentClass,
|
|
15
|
+
normal: normalClass,
|
|
16
|
+
disabled: disabledClass
|
|
11
17
|
};
|
|
12
|
-
let focusClass = 'focus:z-40 focus:outline-none focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:focus:ring-gray-500 dark:focus:text-white';
|
|
13
|
-
let hoverClass = 'hover:bg-gray-100 hover:text-blue-700 dark:hover:bg-gray-600 dark:hover:text-white';
|
|
14
18
|
let state;
|
|
15
19
|
$: state = disabled ? 'disabled' : current ? 'current' : 'normal';
|
|
16
20
|
let itemClass;
|
|
17
|
-
$: itemClass = classNames(
|
|
21
|
+
$: itemClass = classNames(itemDefaultClass, states[state], active && state === 'disabled' && 'cursor-not-allowed', active && state === 'normal' && hoverClass, active && state === 'normal' && focusClass, $$props.class);
|
|
18
22
|
</script>
|
|
19
23
|
|
|
20
24
|
{#if !active}
|
|
@@ -67,6 +71,12 @@ $: itemClass = classNames('py-2 px-4 w-full text-sm font-medium', 'first:rounded
|
|
|
67
71
|
@prop current: boolean = false;
|
|
68
72
|
@prop disabled: boolean = false;
|
|
69
73
|
@prop href: string = '';
|
|
74
|
+
@prop currentClass: string = 'text-white bg-primary-700 dark:text-white dark:bg-gray-800';
|
|
75
|
+
@prop normalClass: string = '';
|
|
76
|
+
export let disabledClass: string = 'text-gray-900 bg-gray-100 dark:bg-gray-600 dark:text-gray-400';
|
|
77
|
+
@prop focusClass: string = 'focus:z-40 focus:outline-none focus:ring-2 focus:ring-primary-700 focus:text-primary-700 dark:focus:ring-gray-500 dark:focus:text-white';
|
|
78
|
+
@prop hoverClass: string = 'hover:bg-gray-100 hover:text-primary-700 dark:hover:bg-gray-600 dark:hover:text-white';
|
|
79
|
+
@prop itemDefaultClass: string = 'py-2 px-4 w-full text-sm font-medium list-none first:rounded-t-lg last:rounded-b-lg';
|
|
70
80
|
## Event
|
|
71
81
|
- on:blur
|
|
72
82
|
- on:change
|
|
@@ -6,6 +6,12 @@ declare const __propDef: {
|
|
|
6
6
|
current?: boolean | undefined;
|
|
7
7
|
disabled?: boolean | undefined;
|
|
8
8
|
href?: string | undefined;
|
|
9
|
+
currentClass?: string | undefined;
|
|
10
|
+
normalClass?: string | undefined;
|
|
11
|
+
disabledClass?: string | undefined;
|
|
12
|
+
focusClass?: string | undefined;
|
|
13
|
+
hoverClass?: string | undefined;
|
|
14
|
+
itemDefaultClass?: string | undefined;
|
|
9
15
|
};
|
|
10
16
|
events: {
|
|
11
17
|
blur: FocusEvent;
|
|
@@ -38,6 +44,12 @@ export type ListgroupItemSlots = typeof __propDef.slots;
|
|
|
38
44
|
* @prop current: boolean = false;
|
|
39
45
|
* @prop disabled: boolean = false;
|
|
40
46
|
* @prop href: string = '';
|
|
47
|
+
* @prop currentClass: string = 'text-white bg-primary-700 dark:text-white dark:bg-gray-800';
|
|
48
|
+
* @prop normalClass: string = '';
|
|
49
|
+
* export let disabledClass: string = 'text-gray-900 bg-gray-100 dark:bg-gray-600 dark:text-gray-400';
|
|
50
|
+
* @prop focusClass: string = 'focus:z-40 focus:outline-none focus:ring-2 focus:ring-primary-700 focus:text-primary-700 dark:focus:ring-gray-500 dark:focus:text-white';
|
|
51
|
+
* @prop hoverClass: string = 'hover:bg-gray-100 hover:text-primary-700 dark:hover:bg-gray-600 dark:hover:text-white';
|
|
52
|
+
* @prop itemDefaultClass: string = 'py-2 px-4 w-full text-sm font-medium list-none first:rounded-t-lg last:rounded-b-lg';
|
|
41
53
|
* ## Event
|
|
42
54
|
* - on:blur
|
|
43
55
|
* - on:change
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListgroupItem.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/list-group/ListgroupItem.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;
|
|
1
|
+
{"version":3,"file":"ListgroupItem.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/list-group/ListgroupItem.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AA4DD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA+D,CAAC;AAC/E,MAAM,MAAM,kBAAkB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACxD,MAAM,MAAM,mBAAmB,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AAC1D,MAAM,MAAM,kBAAkB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,oBAAoB,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,CAAC;CAC3H"}
|
|
@@ -71,7 +71,7 @@ $: ulClass = classNames('grid grid-flow-row gap-y-4 md:gap-x-0 auto-col-max auto
|
|
|
71
71
|
|
|
72
72
|
<Navbar let:hidden let:toggle>
|
|
73
73
|
<NavBrand href="/">
|
|
74
|
-
<img src="
|
|
74
|
+
<img src="/images/flowbite-svelte-icon-logo.svg" class="mr-3 h-6 sm:h-9" alt="Flowbite Logo"/>
|
|
75
75
|
<span class="self-center whitespace-nowrap text-xl font-semibold dark:text-white">Flowbite</span>
|
|
76
76
|
</NavBrand>
|
|
77
77
|
<NavHamburger on:click={toggle} />
|
|
@@ -56,7 +56,7 @@ export type MegaMenuSlots = typeof __propDef.slots;
|
|
|
56
56
|
*
|
|
57
57
|
* <Navbar let:hidden let:toggle>
|
|
58
58
|
* <NavBrand href="/">
|
|
59
|
-
* <img src="
|
|
59
|
+
* <img src="/images/flowbite-svelte-icon-logo.svg" class="mr-3 h-6 sm:h-9" alt="Flowbite Logo"/>
|
|
60
60
|
* <span class="self-center whitespace-nowrap text-xl font-semibold dark:text-white">Flowbite</span>
|
|
61
61
|
* </NavBrand>
|
|
62
62
|
* <NavHamburger on:click={toggle} />
|
package/dist/modals/Modal.svelte
CHANGED
|
@@ -73,7 +73,7 @@ const hide = (e) => {
|
|
|
73
73
|
open = false;
|
|
74
74
|
};
|
|
75
75
|
let frameClass;
|
|
76
|
-
$: frameClass = classNames(defaultClass, $$props.class);
|
|
76
|
+
$: frameClass = classNames(defaultClass, 'w-full', $$props.class);
|
|
77
77
|
const isScrollable = (e) => [
|
|
78
78
|
e.scrollWidth > e.clientWidth && ['scroll', 'auto'].indexOf(getComputedStyle(e).overflowX) >= 0,
|
|
79
79
|
e.scrollHeight > e.clientHeight && ['scroll', 'auto'].indexOf(getComputedStyle(e).overflowY) >= 0
|
|
@@ -22,7 +22,7 @@ declare const __propDef: {
|
|
|
22
22
|
draggable?: import("svelte/elements").Booleanish | null | undefined;
|
|
23
23
|
enterkeyhint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | null | undefined;
|
|
24
24
|
hidden?: boolean | null | undefined;
|
|
25
|
-
id?: string | undefined;
|
|
25
|
+
id?: string | null | undefined;
|
|
26
26
|
lang?: string | null | undefined;
|
|
27
27
|
part?: string | null | undefined;
|
|
28
28
|
placeholder?: string | null | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/modals/Modal.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAMD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Modal.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/modals/Modal.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAMD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAsK3C,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwC,CAAC;AACxD,MAAM,MAAM,UAAU,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAChD,MAAM,MAAM,WAAW,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AAClD,MAAM,MAAM,UAAU,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,oBAAoB,CAAC,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC;CAC3F"}
|
|
@@ -27,7 +27,7 @@ export type NavBrandSlots = typeof __propDef.slots;
|
|
|
27
27
|
* <Navbar let:hidden let:toggle>
|
|
28
28
|
* <NavBrand href="/">
|
|
29
29
|
* <img
|
|
30
|
-
* src="
|
|
30
|
+
* src="/images/flowbite-svelte-icon-logo.svg"
|
|
31
31
|
* class="mr-3 h-6 sm:h-9"
|
|
32
32
|
* alt="Flowbite Logo"
|
|
33
33
|
* />
|
|
@@ -81,7 +81,7 @@ let liClass = 'flex justify-center py-2 pr-4 pl-3 text-gray-700 border-b border-
|
|
|
81
81
|
<Navbar let:hidden let:toggle>
|
|
82
82
|
<NavBrand href="/">
|
|
83
83
|
<img
|
|
84
|
-
src="
|
|
84
|
+
src="/images/flowbite-svelte-icon-logo.svg"
|
|
85
85
|
class="mr-3 h-6 sm:h-9"
|
|
86
86
|
alt="Flowbite Logo"
|
|
87
87
|
/>
|
|
@@ -59,7 +59,7 @@ export type NavDropdownSlots = typeof __propDef.slots;
|
|
|
59
59
|
* <Navbar let:hidden let:toggle>
|
|
60
60
|
* <NavBrand href="/">
|
|
61
61
|
* <img
|
|
62
|
-
* src="
|
|
62
|
+
* src="/images/flowbite-svelte-icon-logo.svg"
|
|
63
63
|
* class="mr-3 h-6 sm:h-9"
|
|
64
64
|
* alt="Flowbite Logo"
|
|
65
65
|
* />
|
|
@@ -27,7 +27,7 @@ export type NavHamburgerSlots = typeof __propDef.slots;
|
|
|
27
27
|
* <Navbar let:hidden let:toggle>
|
|
28
28
|
* <NavBrand href="/">
|
|
29
29
|
* <img
|
|
30
|
-
* src="
|
|
30
|
+
* src="/images/flowbite-svelte-icon-logo.svg"
|
|
31
31
|
* class="mr-3 h-6 sm:h-9"
|
|
32
32
|
* alt="Flowbite Logo"
|
|
33
33
|
* />
|
package/dist/navbar/NavLi.svelte
CHANGED
|
@@ -53,7 +53,7 @@ $: liClass = classNames('block py-2 pr-4 pl-3 md:p-0 rounded md:border-0', activ
|
|
|
53
53
|
```
|
|
54
54
|
<Navbar let:hidden let:toggle>
|
|
55
55
|
<NavBrand href="/">
|
|
56
|
-
<img src="
|
|
56
|
+
<img src="/images/flowbite-svelte-icon-logo.svg" class="mr-3 h-6 sm:h-9" alt="Flowbite Logo" />
|
|
57
57
|
<span class="self-center whitespace-nowrap text-xl font-semibold dark:text-white"> Flowbite </span>
|
|
58
58
|
</NavBrand>
|
|
59
59
|
<NavHamburger on:click={toggle} />
|
|
@@ -51,7 +51,7 @@ export type NavLiSlots = typeof __propDef.slots;
|
|
|
51
51
|
* ```
|
|
52
52
|
* <Navbar let:hidden let:toggle>
|
|
53
53
|
* <NavBrand href="/">
|
|
54
|
-
* <img src="
|
|
54
|
+
* <img src="/images/flowbite-svelte-icon-logo.svg" class="mr-3 h-6 sm:h-9" alt="Flowbite Logo" />
|
|
55
55
|
* <span class="self-center whitespace-nowrap text-xl font-semibold dark:text-white"> Flowbite </span>
|
|
56
56
|
* </NavBrand>
|
|
57
57
|
* <NavHamburger on:click={toggle} />
|
|
@@ -27,7 +27,7 @@ export type NavSidebarHamburgerSlots = typeof __propDef.slots;
|
|
|
27
27
|
* <Navbar let:hidden let:toggle>
|
|
28
28
|
* <NavBrand href="/">
|
|
29
29
|
* <img
|
|
30
|
-
* src="
|
|
30
|
+
* src="/images/flowbite-svelte-icon-logo.svg"
|
|
31
31
|
* class="mr-3 h-6 sm:h-9"
|
|
32
32
|
* alt="Flowbite Logo"
|
|
33
33
|
* />
|
package/dist/navbar/NavUl.svelte
CHANGED
|
@@ -50,7 +50,7 @@ $$props.class);
|
|
|
50
50
|
```
|
|
51
51
|
<Navbar let:hidden let:toggle>
|
|
52
52
|
<NavBrand href="/">
|
|
53
|
-
<img src="
|
|
53
|
+
<img src="/images/flowbite-svelte-icon-logo.svg" class="mr-3 h-6 sm:h-9" alt="Flowbite Logo" />
|
|
54
54
|
<span class="self-center whitespace-nowrap text-xl font-semibold dark:text-white"> Flowbite </span>
|
|
55
55
|
</NavBrand>
|
|
56
56
|
<NavHamburger on:click={toggle} />
|
|
@@ -40,7 +40,7 @@ export type NavUlSlots = typeof __propDef.slots;
|
|
|
40
40
|
* ```
|
|
41
41
|
* <Navbar let:hidden let:toggle>
|
|
42
42
|
* <NavBrand href="/">
|
|
43
|
-
* <img src="
|
|
43
|
+
* <img src="/images/flowbite-svelte-icon-logo.svg" class="mr-3 h-6 sm:h-9" alt="Flowbite Logo" />
|
|
44
44
|
* <span class="self-center whitespace-nowrap text-xl font-semibold dark:text-white"> Flowbite </span>
|
|
45
45
|
* </NavBrand>
|
|
46
46
|
* <NavHamburger on:click={toggle} />
|
|
@@ -274,7 +274,7 @@ export type NavbarSlots = typeof __propDef.slots;
|
|
|
274
274
|
* <Navbar let:hidden let:toggle>
|
|
275
275
|
* <NavBrand href="/">
|
|
276
276
|
* <img
|
|
277
|
-
* src="
|
|
277
|
+
* src="/images/flowbite-svelte-icon-logo.svg"
|
|
278
278
|
* class="mr-3 h-6 sm:h-9"
|
|
279
279
|
* alt="Flowbite Logo"
|
|
280
280
|
* />
|
|
@@ -32,7 +32,7 @@ export type SidebarMenuSlots = typeof __propDef.slots;
|
|
|
32
32
|
* <Navbar let:hidden let:toggle>
|
|
33
33
|
* <NavBrand href="/">
|
|
34
34
|
* <img
|
|
35
|
-
* src="
|
|
35
|
+
* src="/images/flowbite-svelte-icon-logo.svg"
|
|
36
36
|
* class="mr-3 h-6 sm:h-9"
|
|
37
37
|
* alt="Flowbite Logo"
|
|
38
38
|
* />
|
|
@@ -3,10 +3,11 @@ export let progress = '45';
|
|
|
3
3
|
export let size = 'h-2.5';
|
|
4
4
|
export let labelInside = false;
|
|
5
5
|
export let labelOutside = '';
|
|
6
|
-
export let color = '
|
|
6
|
+
export let color = 'primary';
|
|
7
7
|
export let labelInsideClass = 'text-blue-100 text-xs font-medium text-center p-0.5 leading-none rounded-full';
|
|
8
8
|
// let barColor: string;
|
|
9
9
|
const barColors = {
|
|
10
|
+
primary: 'bg-primary-600',
|
|
10
11
|
blue: 'bg-blue-600',
|
|
11
12
|
gray: 'bg-gray-600 dark:bg-gray-300',
|
|
12
13
|
red: 'bg-red-600 dark:bg-red-500',
|
|
@@ -42,7 +43,7 @@ const barColors = {
|
|
|
42
43
|
@prop size: string = 'h-2.5';
|
|
43
44
|
@prop labelInside: boolean = false;
|
|
44
45
|
@prop labelOutside: string = '';
|
|
45
|
-
@prop color: 'blue' | 'gray' | 'red' | 'green' | 'yellow' | 'purple' | 'indigo' = '
|
|
46
|
+
@prop color: 'primary'| 'blue' | 'gray' | 'red' | 'green' | 'yellow' | 'purple' | 'indigo' = 'primary';
|
|
46
47
|
@prop labelInsideClass: string = 'text-blue-100 text-xs font-medium text-center p-0.5 leading-none rounded-full';
|
|
47
48
|
## Example
|
|
48
49
|
```
|
|
@@ -6,7 +6,7 @@ declare const __propDef: {
|
|
|
6
6
|
size?: string | undefined;
|
|
7
7
|
labelInside?: boolean | undefined;
|
|
8
8
|
labelOutside?: string | undefined;
|
|
9
|
-
color?: "gray" | "red" | "yellow" | "green" | "indigo" | "purple" | "blue" | undefined;
|
|
9
|
+
color?: "gray" | "red" | "yellow" | "green" | "indigo" | "purple" | "blue" | "primary" | undefined;
|
|
10
10
|
labelInsideClass?: string | undefined;
|
|
11
11
|
};
|
|
12
12
|
events: {
|
|
@@ -25,7 +25,7 @@ export type ProgressbarSlots = typeof __propDef.slots;
|
|
|
25
25
|
* @prop size: string = 'h-2.5';
|
|
26
26
|
* @prop labelInside: boolean = false;
|
|
27
27
|
* @prop labelOutside: string = '';
|
|
28
|
-
* @prop color: 'blue' | 'gray' | 'red' | 'green' | 'yellow' | 'purple' | 'indigo' = '
|
|
28
|
+
* @prop color: 'primary'| 'blue' | 'gray' | 'red' | 'green' | 'yellow' | 'purple' | 'indigo' = 'primary';
|
|
29
29
|
* @prop labelInsideClass: string = 'text-blue-100 text-xs font-medium text-center p-0.5 leading-none rounded-full';
|
|
30
30
|
* ## Example
|
|
31
31
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progressbar.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/progressbars/Progressbar.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;
|
|
1
|
+
{"version":3,"file":"Progressbar.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/progressbars/Progressbar.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAgDD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;CAA+D,CAAC;AAC/E,MAAM,MAAM,gBAAgB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACtD,MAAM,MAAM,iBAAiB,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACxD,MAAM,MAAM,gBAAgB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,oBAAoB,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,CAAC;CACnH"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<script>export let ratings = [];
|
|
2
2
|
export let ratings2 = [];
|
|
3
3
|
export let headerLabel;
|
|
4
|
-
export let desc1Class = 'bg-
|
|
4
|
+
export let desc1Class = 'bg-primary-100 w-8 text-primary-800 text-sm font-semibold inline-flex items-center p-1.5 rounded dark:bg-primary-200 dark:text-primary-800';
|
|
5
5
|
export let desc2Class = 'ml-2 w-24 font-medium text-gray-900 dark:text-white';
|
|
6
6
|
export let desc3spanClass = 'mx-2 w-1 h-1 bg-gray-900 rounded-full dark:bg-gray-500';
|
|
7
7
|
export let desc3pClass = 'text-sm w-24 font-medium text-gray-500 dark:text-gray-400';
|
|
8
|
+
export let linkClass = 'ml-auto w-32 text-sm font-medium text-primary-600 hover:underline dark:text-primary-500';
|
|
9
|
+
export let barColor = 'bg-primary-600 h-2.5 rounded dark:bg-primary-500';
|
|
8
10
|
</script>
|
|
9
11
|
|
|
10
12
|
<div class="flex items-center mb-5">
|
|
@@ -19,10 +21,7 @@ export let desc3pClass = 'text-sm w-24 font-medium text-gray-500 dark:text-gray
|
|
|
19
21
|
<p class={desc3pClass}>{headerLabel.desc3}</p>
|
|
20
22
|
{/if}
|
|
21
23
|
{#if headerLabel.link}
|
|
22
|
-
<a
|
|
23
|
-
href={headerLabel.link.url}
|
|
24
|
-
class="ml-auto w-32 text-sm font-medium text-blue-600 hover:underline dark:text-blue-500"
|
|
25
|
-
>{headerLabel.link.label}</a>
|
|
24
|
+
<a href={headerLabel.link.url} class={linkClass}>{headerLabel.link.label}</a>
|
|
26
25
|
{/if}
|
|
27
26
|
</div>
|
|
28
27
|
<div class="gap-8 sm:grid sm:grid-cols-2">
|
|
@@ -32,7 +31,7 @@ export let desc3pClass = 'text-sm w-24 font-medium text-gray-500 dark:text-gray
|
|
|
32
31
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">{label}</dt>
|
|
33
32
|
<dd class="flex items-center mb-3">
|
|
34
33
|
<div class="w-full bg-gray-200 rounded h-2.5 dark:bg-gray-700 mr-2">
|
|
35
|
-
<div class=
|
|
34
|
+
<div class={barColor} style="width: {rating * 10}%" />
|
|
36
35
|
</div>
|
|
37
36
|
<span class="text-sm font-medium text-gray-500 dark:text-gray-400">{rating}</span>
|
|
38
37
|
</dd>
|
|
@@ -45,7 +44,7 @@ export let desc3pClass = 'text-sm w-24 font-medium text-gray-500 dark:text-gray
|
|
|
45
44
|
<dt class="text-sm font-medium text-gray-500 dark:text-gray-400">{label}</dt>
|
|
46
45
|
<dd class="flex items-center mb-3">
|
|
47
46
|
<div class="w-full bg-gray-200 rounded h-2.5 dark:bg-gray-700 mr-2">
|
|
48
|
-
<div class=
|
|
47
|
+
<div class={barColor} style="width: {rating * 10}%" />
|
|
49
48
|
</div>
|
|
50
49
|
<span class="text-sm font-medium text-gray-500 dark:text-gray-400">{rating}</span>
|
|
51
50
|
</dd>
|
|
@@ -68,10 +67,12 @@ export let desc3pClass = 'text-sm w-24 font-medium text-gray-500 dark:text-gray
|
|
|
68
67
|
link: { label: string; url: string };
|
|
69
68
|
};
|
|
70
69
|
@prop desc1Class: string =
|
|
71
|
-
'bg-
|
|
70
|
+
'bg-primary-100 w-8 text-primary-800 text-sm font-semibold inline-flex items-center p-1.5 rounded dark:bg-primary-200 dark:text-primary-800';
|
|
72
71
|
@prop desc2Class: string = 'ml-2 w-24 font-medium text-gray-900 dark:text-white';
|
|
73
72
|
@prop desc3spanClass: string = 'mx-2 w-1 h-1 bg-gray-900 rounded-full dark:bg-gray-500';
|
|
74
73
|
@prop desc3pClass: string = 'text-sm w-24 font-medium text-gray-500 dark:text-gray-400';
|
|
74
|
+
@prop linkClass: string = 'ml-auto w-32 text-sm font-medium text-primary-600 hover:underline dark:text-primary-500';
|
|
75
|
+
@prop barColor: string = 'bg-primary-600 h-2.5 rounded dark:bg-primary-500';
|
|
75
76
|
## Example
|
|
76
77
|
```
|
|
77
78
|
<script>
|
|
@@ -22,6 +22,8 @@ declare const __propDef: {
|
|
|
22
22
|
desc2Class?: string | undefined;
|
|
23
23
|
desc3spanClass?: string | undefined;
|
|
24
24
|
desc3pClass?: string | undefined;
|
|
25
|
+
linkClass?: string | undefined;
|
|
26
|
+
barColor?: string | undefined;
|
|
25
27
|
};
|
|
26
28
|
events: {
|
|
27
29
|
[evt: string]: CustomEvent<any>;
|
|
@@ -44,10 +46,12 @@ export type ScoreRatingSlots = typeof __propDef.slots;
|
|
|
44
46
|
* link: { label: string; url: string };
|
|
45
47
|
* };
|
|
46
48
|
* @prop desc1Class: string =
|
|
47
|
-
* 'bg-
|
|
49
|
+
* 'bg-primary-100 w-8 text-primary-800 text-sm font-semibold inline-flex items-center p-1.5 rounded dark:bg-primary-200 dark:text-primary-800';
|
|
48
50
|
* @prop desc2Class: string = 'ml-2 w-24 font-medium text-gray-900 dark:text-white';
|
|
49
51
|
* @prop desc3spanClass: string = 'mx-2 w-1 h-1 bg-gray-900 rounded-full dark:bg-gray-500';
|
|
50
52
|
* @prop desc3pClass: string = 'text-sm w-24 font-medium text-gray-500 dark:text-gray-400';
|
|
53
|
+
* @prop linkClass: string = 'ml-auto w-32 text-sm font-medium text-primary-600 hover:underline dark:text-primary-500';
|
|
54
|
+
* @prop barColor: string = 'bg-primary-600 h-2.5 rounded dark:bg-primary-500';
|
|
51
55
|
* ## Example
|
|
52
56
|
* ```
|
|
53
57
|
* <script>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScoreRating.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/ratings/ScoreRating.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;
|
|
1
|
+
{"version":3,"file":"ScoreRating.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/ratings/ScoreRating.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAyED,QAAA,MAAM,SAAS;;;mBANqP,MAAM;oBAAU,MAAM;;;mBAA0B,MAAM;oBAAU,MAAM;;qBAAmB;YACzV,KAAK,EAAE,MAAM,CAAC;YACd,KAAK,EAAE,MAAM,CAAC;YACd,KAAK,EAAE,MAAM,CAAC;YACd,IAAI,EAAE;gBAAE,KAAK,EAAE,MAAM,CAAC;gBAAC,GAAG,EAAE,MAAM,CAAA;aAAE,CAAC;SACtC;;;;;;;;;;;;CACoD,CAAC;AACxD,MAAM,MAAM,gBAAgB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACtD,MAAM,MAAM,iBAAiB,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACxD,MAAM,MAAM,gBAAgB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,oBAAoB,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,CAAC;CACnH"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
|
-
export let color = '
|
|
2
|
+
export let color = 'primary';
|
|
3
3
|
export let bg = 'text-gray-300';
|
|
4
4
|
export let customColor = '';
|
|
5
5
|
export let size = '8';
|
|
@@ -11,6 +11,7 @@ if (currentFill !== 'currentFill') {
|
|
|
11
11
|
color = undefined;
|
|
12
12
|
}
|
|
13
13
|
const fillColorClasses = {
|
|
14
|
+
primary: 'fill-primary-600',
|
|
14
15
|
blue: 'fill-blue-600',
|
|
15
16
|
gray: 'fill-gray-600 dark:fill-gray-300',
|
|
16
17
|
green: 'fill-green-500',
|
|
@@ -55,7 +56,7 @@ let fillColorClass = color === undefined ? '' : fillColorClasses[color] ?? fillC
|
|
|
55
56
|
- Alignment
|
|
56
57
|
- Buttons
|
|
57
58
|
## Props
|
|
58
|
-
@prop color: | 'blue' | 'gray' | 'green' | 'red' | 'yellow' | 'pink'| 'purple' | 'white' | 'custom' | undefined = '
|
|
59
|
+
@prop color: | 'primary' | 'blue' | 'gray' | 'green' | 'red' | 'yellow' | 'pink'| 'purple' | 'white' | 'custom' | undefined = 'primary';
|
|
59
60
|
@prop bg: string = 'text-gray-300';
|
|
60
61
|
@prop customColor: string = '';
|
|
61
62
|
@prop size: string = '8';
|
|
@@ -2,7 +2,7 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
color?: 'blue' | 'gray' | 'green' | 'red' | 'yellow' | 'pink' | 'purple' | 'white' | 'custom' | undefined;
|
|
5
|
+
color?: 'primary' | 'blue' | 'gray' | 'green' | 'red' | 'yellow' | 'pink' | 'purple' | 'white' | 'custom' | undefined;
|
|
6
6
|
bg?: string | undefined;
|
|
7
7
|
customColor?: string | undefined;
|
|
8
8
|
size?: string | undefined;
|
|
@@ -27,7 +27,7 @@ export type SpinnerSlots = typeof __propDef.slots;
|
|
|
27
27
|
* - Alignment
|
|
28
28
|
* - Buttons
|
|
29
29
|
* ## Props
|
|
30
|
-
* @prop color: | 'blue' | 'gray' | 'green' | 'red' | 'yellow' | 'pink'| 'purple' | 'white' | 'custom' | undefined = '
|
|
30
|
+
* @prop color: | 'primary' | 'blue' | 'gray' | 'green' | 'red' | 'yellow' | 'pink'| 'purple' | 'white' | 'custom' | undefined = 'primary';
|
|
31
31
|
* @prop bg: string = 'text-gray-300';
|
|
32
32
|
* @prop customColor: string = '';
|
|
33
33
|
* @prop size: string = '8';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/spinners/Spinner.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;
|
|
1
|
+
{"version":3,"file":"Spinner.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/spinners/Spinner.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAwED,QAAA,MAAM,SAAS;;;gBAXuI,SAAS,GACzJ,MAAM,GACN,MAAM,GACN,OAAO,GACP,KAAK,GACL,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,SAAS;;;;;;;;;;;CAC+D,CAAC;AAC/E,MAAM,MAAM,YAAY,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAClD,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACpD,MAAM,MAAM,YAAY,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,oBAAoB,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,CAAC;CACnG"}
|
package/dist/tabs/Tabs.svelte
CHANGED
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
<script context="module">import { writable } from 'svelte/store';
|
|
2
|
-
// styles
|
|
3
|
-
const styledActiveClasses = {
|
|
4
|
-
full: 'p-4 w-full group-first:rounded-l-lg group-last:rounded-r-lg text-gray-900 bg-gray-100 focus:ring-4 focus:ring-blue-300 focus:outline-none dark:bg-gray-700 dark:text-white',
|
|
5
|
-
pill: 'py-3 px-4 text-white bg-blue-600 rounded-lg',
|
|
6
|
-
underline: 'p-4 text-blue-600 border-b-2 border-blue-600 dark:text-blue-500 dark:border-blue-500',
|
|
7
|
-
none: ''
|
|
8
|
-
};
|
|
9
|
-
const styledInactiveClasses = {
|
|
10
|
-
full: 'p-4 w-full group-first:rounded-l-lg group-last:rounded-r-lg text-gray-500 dark:text-gray-400 bg-white hover:text-gray-700 hover:bg-gray-50 focus:ring-4 focus:ring-blue-300 focus:outline-none dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700',
|
|
11
|
-
pill: 'py-3 px-4 text-gray-500 rounded-lg hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-white',
|
|
12
|
-
underline: 'p-4 border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 text-gray-500 dark:text-gray-400',
|
|
13
|
-
none: ''
|
|
14
|
-
};
|
|
15
2
|
</script>
|
|
16
3
|
|
|
17
4
|
<script>import classNames from 'classnames';
|
|
@@ -20,8 +7,21 @@ export let style = 'none';
|
|
|
20
7
|
export let defaultClass = 'flex flex-wrap space-x-2';
|
|
21
8
|
export let contentClass = 'p-4 bg-gray-50 rounded-lg dark:bg-gray-800 mt-4';
|
|
22
9
|
export let divider = true;
|
|
23
|
-
export let activeClasses = 'p-4 text-
|
|
10
|
+
export let activeClasses = 'p-4 text-primary-600 bg-gray-100 rounded-t-lg dark:bg-gray-800 dark:text-primary-500';
|
|
24
11
|
export let inactiveClasses = 'p-4 text-gray-500 rounded-t-lg hover:text-gray-600 hover:bg-gray-50 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300';
|
|
12
|
+
// styles
|
|
13
|
+
const styledActiveClasses = {
|
|
14
|
+
full: 'p-4 w-full group-first:rounded-l-lg group-last:rounded-r-lg text-gray-900 bg-gray-100 focus:ring-4 focus:ring-primary-300 focus:outline-none dark:bg-gray-700 dark:text-white',
|
|
15
|
+
pill: 'py-3 px-4 text-white bg-primary-600 rounded-lg',
|
|
16
|
+
underline: 'p-4 text-primary-600 border-b-2 border-primary-600 dark:text-primary-500 dark:border-primary-500',
|
|
17
|
+
none: ''
|
|
18
|
+
};
|
|
19
|
+
const styledInactiveClasses = {
|
|
20
|
+
full: 'p-4 w-full group-first:rounded-l-lg group-last:rounded-r-lg text-gray-500 dark:text-gray-400 bg-white hover:text-gray-700 hover:bg-gray-50 focus:ring-4 focus:ring-primary-300 focus:outline-none dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700',
|
|
21
|
+
pill: 'py-3 px-4 text-gray-500 rounded-lg hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-white',
|
|
22
|
+
underline: 'p-4 border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 text-gray-500 dark:text-gray-400',
|
|
23
|
+
none: ''
|
|
24
|
+
};
|
|
25
25
|
const ctx = {
|
|
26
26
|
activeClasses: styledActiveClasses[style] || activeClasses,
|
|
27
27
|
inactiveClasses: styledInactiveClasses[style] || inactiveClasses,
|
|
@@ -67,7 +67,7 @@ $: ulClass = classNames(defaultClass, style === 'underline' && '-mb-px', $$props
|
|
|
67
67
|
@prop contentClass: string = 'p-4 bg-gray-50 rounded-lg dark:bg-gray-800 mt-4';
|
|
68
68
|
@prop divider: boolean = true;
|
|
69
69
|
@prop activeClasses: string =
|
|
70
|
-
'p-4 text-
|
|
70
|
+
'p-4 text-primary-600 bg-gray-100 rounded-t-lg dark:bg-gray-800 dark:text-primary-500';
|
|
71
71
|
@prop inactiveClasses: string =
|
|
72
72
|
'p-4 text-gray-500 rounded-t-lg hover:text-gray-600 hover:bg-gray-50 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300';
|
|
73
73
|
## Example
|
|
@@ -45,7 +45,7 @@ export type TabsSlots = typeof __propDef.slots;
|
|
|
45
45
|
* @prop contentClass: string = 'p-4 bg-gray-50 rounded-lg dark:bg-gray-800 mt-4';
|
|
46
46
|
* @prop divider: boolean = true;
|
|
47
47
|
* @prop activeClasses: string =
|
|
48
|
-
* 'p-4 text-
|
|
48
|
+
* 'p-4 text-primary-600 bg-gray-100 rounded-t-lg dark:bg-gray-800 dark:text-primary-500';
|
|
49
49
|
* @prop inactiveClasses: string =
|
|
50
50
|
* 'p-4 text-gray-500 rounded-t-lg hover:text-gray-600 hover:bg-gray-50 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300';
|
|
51
51
|
* ## Example
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/tabs/Tabs.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AACC,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;CACjC;
|
|
1
|
+
{"version":3,"file":"Tabs.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/tabs/Tabs.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AACC,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,WAAW,UAAU;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;CACjC;AAyEH,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;CAA+D,CAAC;AAC/E,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAC/C,MAAM,MAAM,UAAU,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACjD,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,oBAAoB,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,CAAC;CACvF"}
|
|
@@ -4,6 +4,8 @@ export let title = '';
|
|
|
4
4
|
export let date = '';
|
|
5
5
|
export let customDiv = '';
|
|
6
6
|
export let customTimeClass = '';
|
|
7
|
+
export let customLiClass = '';
|
|
8
|
+
export let svgClass = 'w-3 h-3 text-primary-600 dark:text-primary-400';
|
|
7
9
|
let order = 'default';
|
|
8
10
|
order = getContext('order');
|
|
9
11
|
const liClasses = {
|
|
@@ -12,13 +14,13 @@ const liClasses = {
|
|
|
12
14
|
horizontal: 'relative mb-6 sm:mb-0',
|
|
13
15
|
activity: 'mb-10 ml-6',
|
|
14
16
|
group: '',
|
|
15
|
-
custom:
|
|
17
|
+
custom: customLiClass
|
|
16
18
|
};
|
|
17
19
|
const divClasses = {
|
|
18
20
|
default: 'absolute w-3 h-3 bg-gray-200 rounded-full mt-1.5 -left-1.5 border border-white dark:border-gray-900 dark:bg-gray-700',
|
|
19
|
-
vertical: 'flex absolute -left-3 justify-center items-center w-6 h-6 bg-
|
|
21
|
+
vertical: 'flex absolute -left-3 justify-center items-center w-6 h-6 bg-primary-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-primary-900',
|
|
20
22
|
horizontal: 'flex items-center',
|
|
21
|
-
activity: 'flex absolute -left-3 justify-center items-center w-6 h-6 bg-
|
|
23
|
+
activity: 'flex absolute -left-3 justify-center items-center w-6 h-6 bg-primary-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-primary-900',
|
|
22
24
|
group: 'p-5 mb-4 bg-gray-50 rounded-lg border border-gray-100 dark:bg-gray-800 dark:border-gray-700',
|
|
23
25
|
custom: customDiv
|
|
24
26
|
};
|
|
@@ -54,7 +56,7 @@ const h3Class = classNames(order === 'vertical'
|
|
|
54
56
|
{:else}
|
|
55
57
|
<svg
|
|
56
58
|
aria-hidden="true"
|
|
57
|
-
class=
|
|
59
|
+
class={svgClass}
|
|
58
60
|
fill="currentColor"
|
|
59
61
|
viewBox="0 0 20 20"
|
|
60
62
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -79,7 +81,7 @@ const h3Class = classNames(order === 'vertical'
|
|
|
79
81
|
{:else}
|
|
80
82
|
<svg
|
|
81
83
|
aria-hidden="true"
|
|
82
|
-
class=
|
|
84
|
+
class={svgClass}
|
|
83
85
|
fill="currentColor"
|
|
84
86
|
viewBox="0 0 20 20"
|
|
85
87
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -104,7 +106,7 @@ const h3Class = classNames(order === 'vertical'
|
|
|
104
106
|
{:else}
|
|
105
107
|
<svg
|
|
106
108
|
aria-hidden="true"
|
|
107
|
-
class=
|
|
109
|
+
class={svgClass}
|
|
108
110
|
fill="currentColor"
|
|
109
111
|
viewBox="0 0 20 20"
|
|
110
112
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -140,6 +142,8 @@ const h3Class = classNames(order === 'vertical'
|
|
|
140
142
|
@prop date: string = '';
|
|
141
143
|
@prop customDiv: string = '';
|
|
142
144
|
@prop customTimeClass: string = '';
|
|
145
|
+
@prop customLiClass: string ='';
|
|
146
|
+
@prop svgCl
|
|
143
147
|
## Example
|
|
144
148
|
```
|
|
145
149
|
<script>
|
|
@@ -5,6 +5,8 @@ declare const __propDef: {
|
|
|
5
5
|
date?: string | undefined;
|
|
6
6
|
customDiv?: string | undefined;
|
|
7
7
|
customTimeClass?: string | undefined;
|
|
8
|
+
customLiClass?: string | undefined;
|
|
9
|
+
svgClass?: string | undefined;
|
|
8
10
|
};
|
|
9
11
|
events: {
|
|
10
12
|
[evt: string]: CustomEvent<any>;
|
|
@@ -31,6 +33,8 @@ export type TimelineItemSlots = typeof __propDef.slots;
|
|
|
31
33
|
* @prop date: string = '';
|
|
32
34
|
* @prop customDiv: string = '';
|
|
33
35
|
* @prop customTimeClass: string = '';
|
|
36
|
+
* @prop customLiClass: string ='';
|
|
37
|
+
* @prop svgCl
|
|
34
38
|
* ## Example
|
|
35
39
|
* ```
|
|
36
40
|
* <script>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimelineItem.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/timeline/TimelineItem.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;
|
|
1
|
+
{"version":3,"file":"TimelineItem.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/timeline/TimelineItem.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAwHD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;CAAwC,CAAC;AACxD,MAAM,MAAM,iBAAiB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACvD,MAAM,MAAM,kBAAkB,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACzD,MAAM,MAAM,iBAAiB,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,oBAAoB,CAAC,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,CAAC;CACvH"}
|
package/dist/utils/Frame.svelte
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { setContext } from 'svelte';
|
|
3
3
|
import { noop } from 'svelte/internal';
|
|
4
4
|
setContext('background', true);
|
|
5
|
-
$: setContext('color', color);
|
|
6
5
|
export let tag = 'div';
|
|
7
6
|
export let color = 'default';
|
|
8
7
|
export let rounded = false;
|
|
@@ -17,6 +16,8 @@ export let node = undefined;
|
|
|
17
16
|
// Action function and its params
|
|
18
17
|
export let use = noop;
|
|
19
18
|
export let options = {};
|
|
19
|
+
$: color = color ?? 'default'; // for cases when undefined
|
|
20
|
+
$: setContext('color', color);
|
|
20
21
|
// your script goes here
|
|
21
22
|
const bgColors = {
|
|
22
23
|
gray: 'bg-gray-50 dark:bg-gray-800',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Frame.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/Frame.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAKD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Frame.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/Frame.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAKD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AA2I1D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BA/HgB,WAAW,UAAU,GAAG,KAAK,gBAAgB;;eAWjE,WAAW,GAAG,SAAS;;;;;;;;;;;;;;;;CAoHqB,CAAC;AACxD,MAAM,MAAM,UAAU,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAChD,MAAM,MAAM,WAAW,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AAClD,MAAM,MAAM,UAAU,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEhD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,oBAAoB,CAAC,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC;CAC3F"}
|
package/dist/utils/Popper.svelte
CHANGED
|
@@ -67,7 +67,8 @@ function init(node, _triggerEl) {
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
{ name: 'eventListeners', enabled: open },
|
|
70
|
-
{ name: 'flip', enabled: false }
|
|
70
|
+
{ name: 'flip', enabled: false },
|
|
71
|
+
{ name: 'arrow', enabled: true }
|
|
71
72
|
]
|
|
72
73
|
});
|
|
73
74
|
return {
|
|
@@ -115,12 +116,10 @@ onMount(() => {
|
|
|
115
116
|
function optional(pred, func) {
|
|
116
117
|
return (pred && func) || null;
|
|
117
118
|
}
|
|
118
|
-
let
|
|
119
|
-
$:
|
|
119
|
+
let position;
|
|
120
|
+
$: position = placement.split('-', 1)[0];
|
|
120
121
|
let arrowClass = 'bottom';
|
|
121
|
-
$: arrowClass = classNames('absolute w-[9px] h-[9px] rotate-45
|
|
122
|
-
let arrowOffset = '-4px';
|
|
123
|
-
$: arrowOffset = $$props.border ? '-5px' : '-4px';
|
|
122
|
+
$: arrowClass = classNames('absolute w-[9px] h-[9px] rotate-45 bg-inherit', position === 'top' && ($$props.border ? 'border-b border-r -bottom-[5px]' : '-bottom-[4px]'), position === 'bottom' && ($$props.border ? 'border-t border-l -top-[5px]' : '-top-[4px]'), position === 'left' && ($$props.border ? 'border-t border-r -right-[5px]' : '-right-[4px]'), position === 'right' && ($$props.border ? 'border-b border-l -left-[5px]' : '-left-[4px]'));
|
|
124
123
|
</script>
|
|
125
124
|
|
|
126
125
|
{#if !triggerEl}
|
|
@@ -138,19 +137,13 @@ $: arrowOffset = $$props.border ? '-5px' : '-4px';
|
|
|
138
137
|
on:mouseenter={optional(activeContent && !clickable, showHandler)}
|
|
139
138
|
on:mouseleave={optional(activeContent && !clickable, hideHandler)}
|
|
140
139
|
{...$$restProps}
|
|
141
|
-
class={classNames('
|
|
140
|
+
class={classNames('outline-none', $$props.class)}>
|
|
142
141
|
<slot />
|
|
143
|
-
{#if arrow}<div
|
|
144
|
-
class={arrowClass}
|
|
145
|
-
style:margin-left={placement_primary === 'right' ? arrowOffset : undefined}
|
|
146
|
-
style:margin-right={placement_primary === 'left' ? arrowOffset : undefined}
|
|
147
|
-
style:margin-top={placement_primary === 'bottom' ? arrowOffset : undefined}
|
|
148
|
-
style:margin-bottom={placement_primary === 'top' ? arrowOffset : undefined} />
|
|
149
|
-
{/if}
|
|
142
|
+
{#if arrow}<div data-popper-arrow class={arrowClass} />{/if}
|
|
150
143
|
</Frame>
|
|
151
144
|
{/if}
|
|
152
145
|
|
|
153
|
-
<!--
|
|
146
|
+
<!--
|
|
154
147
|
@component
|
|
155
148
|
## Props
|
|
156
149
|
@prop activeContent: boolean = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popper.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/Popper.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAID,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Popper.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/Popper.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAID,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,gBAAgB,CAAC;AA6K1D,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwC,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACjD,MAAM,MAAM,YAAY,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEjD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,oBAAoB,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,CAAC;CAC/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focusTrap.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/focusTrap.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"focusTrap.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/focusTrap.js"],"names":[],"mappings":"AA0Ci4B,oJAA2G"}
|
package/dist/utils/focusTrap.js
CHANGED
|
@@ -12,8 +12,6 @@ const selectorTabbable = `
|
|
|
12
12
|
|
|
13
13
|
/** @type {import('svelte/action').Action} */
|
|
14
14
|
export default function focusTrap(node) {
|
|
15
|
-
const tabbable = Array.from(node.querySelectorAll(selectorTabbable));
|
|
16
|
-
|
|
17
15
|
/** @type {(e:KeyboardEvent)=>void} */
|
|
18
16
|
function handleFocusTrap(e) {
|
|
19
17
|
let isTabPressed = e.key === 'Tab' || e.keyCode === 9;
|
|
@@ -22,6 +20,8 @@ export default function focusTrap(node) {
|
|
|
22
20
|
return;
|
|
23
21
|
}
|
|
24
22
|
|
|
23
|
+
const tabbable = Array.from(node.querySelectorAll(selectorTabbable));
|
|
24
|
+
|
|
25
25
|
let index = tabbable.indexOf(document.activeElement ?? node);
|
|
26
26
|
if (index === -1 && e.shiftKey) index = 0;
|
|
27
27
|
index += tabbable.length + (e.shiftKey ? -1 : 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.37.
|
|
3
|
+
"version": "0.37.3",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": {
|
|
@@ -28,20 +28,14 @@
|
|
|
28
28
|
"package:publish": "standard-version && git push --follow-tags origin main && npm run package && npm run add-exports && npm run write-package-json && npm publish",
|
|
29
29
|
"gen:props": "createprops && npm run format"
|
|
30
30
|
},
|
|
31
|
-
"peerDependencies": {
|
|
32
|
-
"@popperjs/core": "^2.11.6",
|
|
33
|
-
"classnames": "^2.3.2",
|
|
34
|
-
"flowbite": "^1.6.3",
|
|
35
|
-
"svelte": "^3.55.1"
|
|
36
|
-
},
|
|
37
31
|
"devDependencies": {
|
|
38
|
-
"@docsearch/js": "^3.
|
|
39
|
-
"@playwright/test": "^1.34.
|
|
32
|
+
"@docsearch/js": "^3.4.0",
|
|
33
|
+
"@playwright/test": "^1.34.3",
|
|
40
34
|
"@sveltejs/adapter-vercel": "^3.0.0",
|
|
41
|
-
"@sveltejs/kit": "^1.
|
|
35
|
+
"@sveltejs/kit": "^1.20.0",
|
|
42
36
|
"@sveltejs/package": "2.0.2",
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "^5.59.
|
|
44
|
-
"@typescript-eslint/parser": "^5.59.
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^5.59.8",
|
|
38
|
+
"@typescript-eslint/parser": "^5.59.8",
|
|
45
39
|
"autoprefixer": "^10.4.14",
|
|
46
40
|
"createprops": "^0.5.5",
|
|
47
41
|
"esbuild": "0.17.19",
|
|
@@ -50,22 +44,25 @@
|
|
|
50
44
|
"eslint-plugin-svelte3": "^4.0.0",
|
|
51
45
|
"mdsvex": "^0.10.6",
|
|
52
46
|
"mdsvexamples": "^0.3.3",
|
|
53
|
-
"postcss": "^8.4.
|
|
47
|
+
"postcss": "^8.4.24",
|
|
54
48
|
"postcss-load-config": "^4.0.1",
|
|
55
49
|
"prettier": "^2.8.8",
|
|
56
|
-
"prettier-plugin-svelte": "^2.10.
|
|
50
|
+
"prettier-plugin-svelte": "^2.10.1",
|
|
57
51
|
"prism-themes": "^1.9.0",
|
|
58
52
|
"publint": "^0.1.12",
|
|
59
53
|
"svelte": "^3.59.1",
|
|
60
|
-
"svelte-check": "^3.3
|
|
54
|
+
"svelte-check": "^3.4.3",
|
|
61
55
|
"svelte-meta-tags": "^2.7.2",
|
|
62
|
-
"svelte-preprocess": "^5.0.
|
|
63
|
-
"svelte2tsx": "^0.6.
|
|
56
|
+
"svelte-preprocess": "^5.0.4",
|
|
57
|
+
"svelte2tsx": "^0.6.15",
|
|
64
58
|
"tailwindcss": "^3.3.2",
|
|
65
59
|
"tslib": "^2.5.2",
|
|
66
60
|
"typescript": "^5.0.4",
|
|
67
|
-
"vite": "^4.3.
|
|
68
|
-
"vitest": "^0.31.
|
|
61
|
+
"vite": "^4.3.9",
|
|
62
|
+
"vitest": "^0.31.3"
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"svelte": "^3.55.1 || ^4.0.0"
|
|
69
66
|
},
|
|
70
67
|
"type": "module",
|
|
71
68
|
"keywords": [
|
|
@@ -111,7 +108,7 @@
|
|
|
111
108
|
"url": "https://github.com/themesberg/flowbite-svelte"
|
|
112
109
|
},
|
|
113
110
|
"dependencies": {
|
|
114
|
-
"@popperjs/core": "^2.11.
|
|
111
|
+
"@popperjs/core": "^2.11.8",
|
|
115
112
|
"classnames": "^2.3.2",
|
|
116
113
|
"flowbite": "^1.6.5"
|
|
117
114
|
},
|