flowbite-svelte 0.24.11 → 0.24.12
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/skeleton/WidgetPlaceholder.svelte +0 -1
- package/skeleton/WidgetPlaceholder.svelte.d.ts +0 -1
- package/tabs/InteractiveTabHead.svelte +5 -2
- package/tabs/InteractiveTabHead.svelte.d.ts +3 -0
- package/tabs/InteractiveTabs.svelte +6 -3
- package/tabs/InteractiveTabs.svelte.d.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.24.12](https://github.com/themesberg/flowbite-svelte/compare/v0.24.11...v0.24.12) (2022-08-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add active color to InteractiveTabs and InteractiveTabHead component ([7995e21](https://github.com/themesberg/flowbite-svelte/commit/7995e210f98325350b055a43199fa4d7750ea225))
|
|
11
|
+
|
|
5
12
|
### [0.24.11](https://github.com/themesberg/flowbite-svelte/compare/v0.24.10...v0.24.11) (2022-08-15)
|
|
6
13
|
|
|
7
14
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>import classNames from 'classnames';
|
|
2
2
|
export let divClass = 'p-4 max-w-sm rounded border border-gray-200 shadow animate-pulse md:p-6 dark:border-gray-700';
|
|
3
|
-
export let size = '48';
|
|
4
3
|
</script>
|
|
5
4
|
|
|
6
5
|
<div role="status" class={classNames(divClass, $$props.class)}>
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<script>import { tabStore } from './tabStores';
|
|
2
|
+
import classNames from 'classnames';
|
|
2
3
|
export let tabs;
|
|
3
4
|
export let tabId = 'myTab';
|
|
4
5
|
export let activeTabValue = 1;
|
|
6
|
+
export let btnClass = 'inline-block py-4 px-4 text-sm font-medium text-center rounded-t-lg border-b-2 border-transparent';
|
|
7
|
+
export let activeClass = 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-400 border-blue-600 dark:border-blue-500';
|
|
8
|
+
export let inactiveClasses = 'text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300';
|
|
5
9
|
const handleClick = (tabValue) => () => {
|
|
6
10
|
tabStore.update((n) => (n = tabValue));
|
|
7
11
|
activeTabValue = tabValue;
|
|
@@ -36,12 +40,11 @@ Header part of Interactive tab component. Use with TabContent.
|
|
|
36
40
|
<li class="mr-2" role="presentation">
|
|
37
41
|
<button
|
|
38
42
|
on:click={handleClick(id)}
|
|
39
|
-
class=
|
|
43
|
+
class={classNames(btnClass, activeTabValue === id ? activeClass : inactiveClasses)}
|
|
40
44
|
id="{name}-tab"
|
|
41
45
|
data-tabs-target="#{name}"
|
|
42
46
|
type="button"
|
|
43
47
|
role="tab"
|
|
44
|
-
class:active={activeTabValue === id}
|
|
45
48
|
aria-controls={name}
|
|
46
49
|
aria-selected="false"
|
|
47
50
|
on:blur
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script>import classNames from 'classnames';
|
|
2
|
+
export let tabId = 'myTab';
|
|
2
3
|
export let activeTabValue = 1;
|
|
3
4
|
export let tabs;
|
|
5
|
+
export let btnClass = 'inline-block py-4 px-4 text-sm font-medium text-center rounded-t-lg border-b-2 border-transparent';
|
|
6
|
+
export let activeClass = 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-400 border-blue-600 dark:border-blue-500';
|
|
7
|
+
export let inactiveClasses = 'text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300';
|
|
4
8
|
const handleClick = (tabValue) => () => (activeTabValue = tabValue);
|
|
5
9
|
</script>
|
|
6
10
|
|
|
@@ -19,11 +23,10 @@ const handleClick = (tabValue) => () => (activeTabValue = tabValue);
|
|
|
19
23
|
on:mouseenter
|
|
20
24
|
on:mouseleave
|
|
21
25
|
on:mouseover
|
|
22
|
-
class=
|
|
26
|
+
class={classNames(btnClass, activeTabValue === id ? activeClass : inactiveClasses)}
|
|
23
27
|
id="{name}-tab"
|
|
24
28
|
type="button"
|
|
25
29
|
role="tab"
|
|
26
|
-
class:active={activeTabValue === id}
|
|
27
30
|
aria-controls={name}>{name}</button
|
|
28
31
|
>
|
|
29
32
|
</li>
|