flowbite-svelte 0.24.13 → 0.24.14

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,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.14](https://github.com/themesberg/flowbite-svelte/compare/v0.24.13...v0.24.14) (2022-08-16)
6
+
7
+
8
+ ### Features
9
+
10
+ * add custom color to Alert component and update props ([2e2a71b](https://github.com/themesberg/flowbite-svelte/commit/2e2a71b4fb83bca28a1bf6b107f4163acbb6b011))
11
+
5
12
  ### [0.24.13](https://github.com/themesberg/flowbite-svelte/compare/v0.24.12...v0.24.13) (2022-08-16)
6
13
 
7
14
 
@@ -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 customBgClasses = '';
13
+ export let customBorderAccentClasses = '';
14
+ export let customTextColors = '';
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: customBgClasses
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: customBorderAccentClasses
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: customTextColors
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
+ customBgClasses?: string;
13
+ customBorderAccentClasses?: string;
14
+ customTextColors?: 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.14",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
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;