flowbite-svelte 0.27.2 → 0.27.4

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,32 @@
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.27.4](https://github.com/themesberg/flowbite-svelte/compare/v0.27.3...v0.27.4) (2022-09-26)
6
+
7
+
8
+ ### Features
9
+
10
+ * toast fine tune ([f3ee6f3](https://github.com/themesberg/flowbite-svelte/commit/f3ee6f382aa3a004a8efdbed75f215b9dfe59b4e))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * app.css restored ([e40bc80](https://github.com/themesberg/flowbite-svelte/commit/e40bc80cace759b434bc889c1d143533de032345))
16
+ * change a to A component ([dc92c3f](https://github.com/themesberg/flowbite-svelte/commit/dc92c3f699986f6679805350f3a88effc0e2a0c8))
17
+ * remove type CrumbType ([4269359](https://github.com/themesberg/flowbite-svelte/commit/4269359c1bddb37fea064cab4dc31b3ea30772ee))
18
+ * toc stickiness ([#330](https://github.com/themesberg/flowbite-svelte/issues/330)) ([21a0409](https://github.com/themesberg/flowbite-svelte/commit/21a0409bd34323b2858f43952ef6de45982b262d))
19
+ * update props and types page ([#331](https://github.com/themesberg/flowbite-svelte/issues/331)) ([0be5900](https://github.com/themesberg/flowbite-svelte/commit/0be59006c6bf79df210838b21a17d3dfd18213ac))
20
+
21
+ ### [0.27.3](https://github.com/themesberg/flowbite-svelte/compare/v0.27.2...v0.27.3) (2022-09-26)
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * change a to A component ([33a8015](https://github.com/themesberg/flowbite-svelte/commit/33a8015ae3e7b3969359bcd67ba47bb53c7f7dad))
27
+ * correction in using style and color ([7ebbc5f](https://github.com/themesberg/flowbite-svelte/commit/7ebbc5fcac75fea0f9c19c51b6ea5dc8dfb241c8))
28
+ * remove workflows/release-please.yml ([30a3682](https://github.com/themesberg/flowbite-svelte/commit/30a3682d3652e779e5e4325edbf7b66ad02a8428))
29
+ * style for links ([040ff2e](https://github.com/themesberg/flowbite-svelte/commit/040ff2ea183d21836e8f3e5dddb5879cf9324a69))
30
+
5
31
  ### [0.27.2](https://github.com/themesberg/flowbite-svelte/compare/v0.27.1...v0.27.2) (2022-09-26)
6
32
 
7
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.27.2",
3
+ "version": "0.27.4",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -5,20 +5,23 @@ import { fade } from 'svelte/transition';
5
5
  export let color = 'blue';
6
6
  export let simple = false;
7
7
  // Absolute position
8
- export let position = undefined; // default not set
9
- export let visible = true;
8
+ export let position = 'none'; // default not set
9
+ export let open = true;
10
10
  export let divClass = 'w-full max-w-xs p-4';
11
- $: classDiv = classNames(divClass, {
12
- 'absolute top-5 left-5': position == 'tl',
13
- 'absolute top-5 right-5': position == 'tr',
14
- 'absolute bottom-5 left-5': position == 'bl',
15
- 'absolute bottom-5 right-5': position == 'br'
16
- }, $$props.class);
11
+ const positions = {
12
+ 'top-left': 'absolute top-5 left-5',
13
+ 'top-right': 'absolute top-5 right-5',
14
+ 'bottom-left': 'absolute bottom-5 left-5',
15
+ 'bottom-right': 'absolute bottom-5 right-5',
16
+ none: ''
17
+ };
18
+ let classDiv;
19
+ $: classDiv = classNames(divClass, positions[position], $$props.class);
17
20
  let iconClass;
18
21
  $: iconClass = classNames('inline-flex items-center justify-center flex-shrink-0 w-8 h-8 mr-3');
19
22
  </script>
20
23
 
21
- {#if visible}
24
+ {#if open}
22
25
  <Frame rounded border transition={fade} {...$$restProps} class={classDiv} role="alert">
23
26
  <div class="flex {$$slots.extra ? 'items-start' : 'items-center'}">
24
27
  {#if $$slots.icon}
@@ -30,7 +33,7 @@ $: iconClass = classNames('inline-flex items-center justify-center flex-shrink-0
30
33
  <slot name="extra" />
31
34
  </div>
32
35
  {#if !simple}
33
- <CloseButton on:click={() => (visible = false)} />
36
+ <CloseButton on:click={() => (open = false)} />
34
37
  {/if}
35
38
  </div>
36
39
  </Frame>
@@ -5,8 +5,8 @@ declare const __propDef: {
5
5
  [x: string]: any;
6
6
  color?: Colors | undefined;
7
7
  simple?: boolean | undefined;
8
- position?: "br" | "tr" | "tl" | "bl" | undefined;
9
- visible?: boolean | undefined;
8
+ position?: "none" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | undefined;
9
+ open?: boolean | undefined;
10
10
  divClass?: string | undefined;
11
11
  };
12
12
  events: {
@@ -1,26 +1,23 @@
1
1
  <script>import Popper from '../utils/Popper.svelte';
2
2
  import classNames from 'classnames';
3
- export let customColor = '';
4
3
  export let style = 'auto';
5
- export let tipClass = 'py-2 px-3 text-sm font-medium';
6
- const colors = {
4
+ export let defaultClass = 'py-2 px-3 text-sm font-medium';
5
+ const styles = {
7
6
  dark: 'border-gray-800 bg-gray-900 text-white dark:bg-gray-700 dark:border-gray-600',
8
7
  light: 'border-gray-200 bg-white text-gray-900',
9
8
  auto: 'border-gray-200 bg-white text-gray-900 dark:bg-gray-700 dark:text-white dark:border-gray-600',
10
- custom: customColor
9
+ custom: ''
11
10
  };
12
11
  let toolTipClass;
13
- $: toolTipClass = classNames('tooltip', tipClass, colors[style], $$props.class);
12
+ $: {
13
+ if ($$restProps.color)
14
+ style = 'custom';
15
+ else
16
+ $$restProps.color = 'none';
17
+ toolTipClass = classNames('tooltip', defaultClass, styles[style], $$props.class);
18
+ }
14
19
  </script>
15
20
 
16
- <Popper
17
- data-tooltip
18
- rounded
19
- border
20
- shadow
21
- customColor
22
- {...$$restProps}
23
- class={toolTipClass}
24
- on:show>
21
+ <Popper data-tooltip rounded border shadow {...$$restProps} class={toolTipClass} on:show>
25
22
  <slot />
26
23
  </Popper>
@@ -2,9 +2,8 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- customColor?: string | undefined;
6
5
  style?: "dark" | "light" | "custom" | "auto" | undefined;
7
- tipClass?: string | undefined;
6
+ defaultClass?: string | undefined;
8
7
  };
9
8
  events: {
10
9
  show: CustomEvent<any>;
package/types.d.ts CHANGED
@@ -58,10 +58,6 @@ export interface CheckboxType {
58
58
  helper?: string;
59
59
  }
60
60
  export declare type Colors = 'blue' | 'gray' | 'red' | 'yellow' | 'purple' | 'green' | 'indigo' | 'pink' | 'white' | 'custom';
61
- export declare type CrumbType = {
62
- label: string;
63
- href: string;
64
- };
65
61
  export interface DotType {
66
62
  top?: boolean;
67
63
  color?: string;