flowbite-svelte 0.24.13 → 0.24.16

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 CHANGED
@@ -2,6 +2,27 @@
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.16](https://github.com/themesberg/flowbite-svelte/compare/v0.24.15...v0.24.16) (2022-08-16)
6
+
7
+
8
+ ### Features
9
+
10
+ * add disabled and classes to InteractiveTabHead component ([869fb1b](https://github.com/themesberg/flowbite-svelte/commit/869fb1b34f5a0e5a254cdc09b25195bf621a25d6))
11
+
12
+ ### [0.24.15](https://github.com/themesberg/flowbite-svelte/compare/v0.24.14...v0.24.15) (2022-08-16)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * update prop names for Alert ([3775700](https://github.com/themesberg/flowbite-svelte/commit/377570061f48de43af44c5f87f46b049f4d87341))
18
+
19
+ ### [0.24.14](https://github.com/themesberg/flowbite-svelte/compare/v0.24.13...v0.24.14) (2022-08-16)
20
+
21
+
22
+ ### Features
23
+
24
+ * add custom color to Alert component and update props ([2e2a71b](https://github.com/themesberg/flowbite-svelte/commit/2e2a71b4fb83bca28a1bf6b107f4163acbb6b011))
25
+
5
26
  ### [0.24.13](https://github.com/themesberg/flowbite-svelte/compare/v0.24.12...v0.24.13) (2022-08-16)
6
27
 
7
28
 
@@ -9,6 +9,9 @@ export let icon = null;
9
9
  export let dismissable = false;
10
10
  export let rounded = true;
11
11
  export let accent = false;
12
+ export let customBgClass = '';
13
+ export let customBorderAccentClass = '';
14
+ export let customTextColor = '';
12
15
  let hidden = false;
13
16
  const handleAlert = () => {
14
17
  dispatch('handleAlert');
@@ -25,7 +28,8 @@ const bgClasses = {
25
28
  purple: 'bg-purple-100 dark:bg-purple-200 ',
26
29
  pink: 'bg-pink-100 dark:bg-pink-200 ',
27
30
  blue: 'bg-blue-100 dark:bg-blue-200 ',
28
- dark: 'bg-gray-100 dark:bg-gray-700'
31
+ dark: 'bg-gray-100 dark:bg-gray-700',
32
+ custom: customBgClass
29
33
  };
30
34
  const borderAccentClasses = {
31
35
  gray: 'border-gray-500 dark:bg-gray-200 ',
@@ -36,7 +40,8 @@ const borderAccentClasses = {
36
40
  purple: 'border-purple-500 dark:bg-purple-200 ',
37
41
  pink: 'border-pink-500 dark:bg-pink-200 ',
38
42
  blue: 'border-blue-500 dark:bg-blue-200 ',
39
- dark: 'border-gray-500'
43
+ dark: 'border-gray-500',
44
+ custom: customBorderAccentClass
40
45
  };
41
46
  const textColors = {
42
47
  gray: 'text-gray-700 dark:text-gray-800',
@@ -47,7 +52,8 @@ const textColors = {
47
52
  purple: 'text-purple-700 dark:text-purple-800',
48
53
  pink: 'text-pink-700 dark:text-pink-800',
49
54
  blue: 'text-blue-700 dark:text-blue-800',
50
- dark: 'text-gray-700 dark:text-gray-300'
55
+ dark: 'text-gray-700 dark:text-gray-300',
56
+ custom: customTextColor
51
57
  };
52
58
  let divClass;
53
59
  $: divClass = classNames('flex flex-col p-4 mb-4 gap-2 text-sm', bgClasses[color] ?? bgClasses.blue, accent && (borderAccentClasses[color] ?? borderAccentClasses.blue), rounded && 'rounded-lg ', accent && 'border-t-4 ', textColors[color], $$props.class);
@@ -9,6 +9,9 @@ declare const __propDef: {
9
9
  dismissable?: boolean;
10
10
  rounded?: boolean;
11
11
  accent?: boolean;
12
+ customBgClass?: string;
13
+ customBorderAccentClass?: string;
14
+ customTextColor?: string;
12
15
  };
13
16
  events: {
14
17
  click: MouseEvent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.24.13",
3
+ "version": "0.24.16",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -3,6 +3,10 @@ import classNames from 'classnames';
3
3
  export let tabs;
4
4
  export let tabId = 'myTab';
5
5
  export let activeTabValue = 1;
6
+ export let disabled = false;
7
+ export let divClass = 'mb-4 border-b border-gray-200';
8
+ export let ulClass = 'flex flex-wrap -mb-px text-sm font-medium text-center';
9
+ export let liClass = 'mr-2';
6
10
  export let btnClass = 'inline-block py-4 px-4 text-sm font-medium text-center rounded-t-lg border-b-2 border-transparent';
7
11
  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
12
  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';
@@ -29,15 +33,10 @@ Header part of Interactive tab component. Use with TabContent.
29
33
  </InteractiveHead>
30
34
  ```
31
35
  -->
32
- <div class="mb-4 border-b border-gray-200">
33
- <ul
34
- class="flex flex-wrap -mb-px text-sm font-medium text-center"
35
- id={tabId}
36
- data-tabs-toggle="#myTabContent"
37
- role="tablist"
38
- >
36
+ <div class={divClass}>
37
+ <ul class={ulClass} id={tabId} data-tabs-toggle="#myTabContent" role="tablist">
39
38
  {#each tabs as { name, id }}
40
- <li class="mr-2" role="presentation">
39
+ <li class={liClass} role="presentation">
41
40
  <button
42
41
  on:click={handleClick(id)}
43
42
  class={classNames(btnClass, activeTabValue === id ? activeClass : inactiveClasses)}
@@ -55,7 +54,8 @@ Header part of Interactive tab component. Use with TabContent.
55
54
  on:keyup
56
55
  on:mouseenter
57
56
  on:mouseleave
58
- on:mouseover>{name}</button
57
+ on:mouseover
58
+ {disabled}>{name}</button
59
59
  >
60
60
  </li>
61
61
  {/each}
@@ -5,6 +5,10 @@ declare const __propDef: {
5
5
  tabs: TabHeadType[];
6
6
  tabId?: string;
7
7
  activeTabValue?: number;
8
+ disabled?: boolean;
9
+ divClass?: string;
10
+ ulClass?: string;
11
+ liClass?: string;
8
12
  btnClass?: string;
9
13
  activeClass?: string;
10
14
  inactiveClasses?: string;
package/types.d.ts CHANGED
@@ -57,7 +57,7 @@ export interface CheckboxType {
57
57
  disabled?: boolean;
58
58
  helper?: string;
59
59
  }
60
- export declare type Colors = 'blue' | 'gray' | 'red' | 'yellow' | 'purple' | 'green' | 'indigo' | 'pink' | 'white';
60
+ export declare type Colors = 'blue' | 'gray' | 'red' | 'yellow' | 'purple' | 'green' | 'indigo' | 'pink' | 'white' | 'custom';
61
61
  export declare type CrumbType = {
62
62
  label: string;
63
63
  href: string;