flowbite-svelte 0.26.12 → 0.26.15

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,29 @@
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.26.15](https://github.com/themesberg/flowbite-svelte/compare/v0.26.14...v0.26.15) (2022-09-06)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * dropdowns events docs ([a6d86b6](https://github.com/themesberg/flowbite-svelte/commit/a6d86b671a5c481288a20c1fe68cfcfe0faea880))
11
+ * dropdowns tweaks ([ad797ca](https://github.com/themesberg/flowbite-svelte/commit/ad797ca4a4a60abd7723b3b1415e70fb6e1328a6))
12
+
13
+ ### [0.26.14](https://github.com/themesberg/flowbite-svelte/compare/v0.26.13...v0.26.14) (2022-09-06)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * Heading and P update ([2313e3e](https://github.com/themesberg/flowbite-svelte/commit/2313e3e5ecb38ee69839a26b12b7c41cc099f75e))
19
+ * toast transitions ([6659682](https://github.com/themesberg/flowbite-svelte/commit/6659682250ab9d2337f06c2b424431366cf9ced0))
20
+
21
+ ### [0.26.13](https://github.com/themesberg/flowbite-svelte/compare/v0.26.12...v0.26.13) (2022-09-05)
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * add track to video component for A11y ([ef69a83](https://github.com/themesberg/flowbite-svelte/commit/ef69a83325ab11e4d3548e5e28033ae9e02bfe40))
27
+
5
28
  ### [0.26.12](https://github.com/themesberg/flowbite-svelte/compare/v0.26.11...v0.26.12) (2022-09-05)
6
29
 
7
30
 
@@ -8,20 +8,26 @@ const colors = {
8
8
  };
9
9
  </script>
10
10
 
11
- <li>
12
- <svelte:element
13
- this={href ? 'a' : 'div'}
14
- {href}
15
- {...$$restProps}
16
- class={classNames(liClass, colors[color] ?? colors.default, $$props.class)}
17
- on:click
18
- on:change
19
- on:keydown
20
- on:keyup
21
- on:focus
22
- on:blur
23
- on:mouseenter
24
- on:mouseleave>
11
+ {#if href}
12
+ <li>
13
+ <svelte:element
14
+ this={href ? 'a' : 'div'}
15
+ {href}
16
+ {...$$restProps}
17
+ class={classNames(liClass, colors[color] ?? colors.default, $$props.class)}
18
+ on:click
19
+ on:change
20
+ on:keydown
21
+ on:keyup
22
+ on:focus
23
+ on:blur
24
+ on:mouseenter
25
+ on:mouseleave>
26
+ <slot />
27
+ </svelte:element>
28
+ </li>
29
+ {:else}
30
+ <li class={classNames(liClass, colors[color] ?? colors.default, $$props.class)}>
25
31
  <slot />
26
- </svelte:element>
27
- </li>
32
+ </li>
33
+ {/if}
@@ -37,7 +37,7 @@ export let value = '';
37
37
  let background = getContext('background');
38
38
  </script>
39
39
 
40
- <Label class={labelClass(inline, $$props.class)} show={!!$$slots.default}>
40
+ <Label class={labelClass(inline, $$props.class)} show={$$slots.default}>
41
41
  <input
42
42
  type="radio"
43
43
  bind:group
@@ -54,6 +54,5 @@ let background = getContext('background');
54
54
  on:paste
55
55
  {value}
56
56
  {...$$restProps}
57
- class={inputClass(custom, color, false, background, $$slots.default || $$props.class)}
58
- /><slot />
57
+ class={inputClass(custom, color, false, background, $$slots.default || $$props.class)} /><slot />
59
58
  </Label>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.26.12",
3
+ "version": "0.26.15",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -49,11 +49,11 @@
49
49
  "accordion",
50
50
  "alert",
51
51
  "avatar",
52
- "badges",
53
- "breadcrumbs",
54
- "button-groups",
55
- "buttons",
56
- "cards",
52
+ "badge",
53
+ "breadcrumb",
54
+ "button-group",
55
+ "button",
56
+ "card",
57
57
  "carousel",
58
58
  "darkmode",
59
59
  "dropdown",
@@ -61,19 +61,22 @@
61
61
  "forms",
62
62
  "kbd",
63
63
  "list group",
64
+ "mega menu",
64
65
  "modal",
65
66
  "navbar",
66
- "paginations",
67
- "progress bars",
67
+ "pagination",
68
+ "progressbar",
68
69
  "rating",
69
- "sidebars",
70
+ "sidebar",
70
71
  "skeleton",
71
- "spinners",
72
- "tables",
73
- "tabs",
74
- "timelines",
75
- "toasts",
76
- "tooltip"
72
+ "spinner",
73
+ "table",
74
+ "tab",
75
+ "timeline",
76
+ "toast",
77
+ "tooltip",
78
+ "typography",
79
+ "video"
77
80
  ],
78
81
  "repository": {
79
82
  "type": "git",
@@ -93,7 +96,8 @@
93
96
  "Zoltán Szőgyényi <zoltan@themesberg.com>",
94
97
  "Robert Tanislav <robert@themesberg.com>",
95
98
  "Victor Cordos <victor@themesberg.com>",
96
- "Shinichi Okada <okada.shin@gmail.com>"
99
+ "Shinichi Okada <okada.shin@gmail.com>",
100
+ "Jakub Jagielka <jjagielka@gmail.com>"
97
101
  ],
98
102
  "exports": {
99
103
  "./package.json": "./package.json",
@@ -1,6 +1,7 @@
1
1
  <script>import Frame from '../utils/Frame.svelte';
2
2
  import classNames from 'classnames';
3
3
  import CloseButton from '../utils/CloseButton.svelte';
4
+ import { fade } from 'svelte/transition';
4
5
  export let color = 'blue';
5
6
  export let simple = false;
6
7
  // Absolute position
@@ -18,19 +19,19 @@ $: iconClass = classNames('inline-flex items-center justify-center flex-shrink-0
18
19
  </script>
19
20
 
20
21
  {#if visible}
21
- <Frame rounded border transition="fade" {...$$restProps} class={classDiv} role="alert">
22
- <div class="flex {$$slots.extra ? 'items-start' : 'items-center'}">
23
- {#if $$slots.icon}
24
- <Frame {color} rounded class={iconClass}><slot name="icon" /></Frame>
25
- {/if}
22
+ <Frame rounded border transition={fade} {...$$restProps} class={classDiv} role="alert">
23
+ <div class="flex {$$slots.extra ? 'items-start' : 'items-center'}">
24
+ {#if $$slots.icon}
25
+ <Frame {color} rounded class={iconClass}><slot name="icon" /></Frame>
26
+ {/if}
26
27
 
27
- <div class="text-sm font-normal w-full">
28
- <slot />
29
- <slot name="extra" />
30
- </div>
31
- {#if !simple}
32
- <CloseButton on:click={() => (visible = false)} />
33
- {/if}
34
- </div>
35
- </Frame>
28
+ <div class="text-sm font-normal w-full">
29
+ <slot />
30
+ <slot name="extra" />
31
+ </div>
32
+ {#if !simple}
33
+ <CloseButton on:click={() => (visible = false)} />
34
+ {/if}
35
+ </div>
36
+ </Frame>
36
37
  {/if}
@@ -1,7 +1,7 @@
1
1
  <script>import classNames from 'classnames';
2
2
  export let tag = 'h1';
3
3
  export let color = 'text-gray-900 dark:text-white';
4
- export let customSize;
4
+ export let customSize = '';
5
5
  const textSizes = {
6
6
  h1: 'text-5xl font-extrabold',
7
7
  h2: 'text-4xl font-bold',
@@ -4,7 +4,7 @@ declare const __propDef: {
4
4
  [x: string]: any;
5
5
  tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
6
6
  color?: string;
7
- customSize: string;
7
+ customSize?: string;
8
8
  };
9
9
  events: {
10
10
  [evt: string]: CustomEvent<any>;
@@ -10,7 +10,7 @@ export let opacity;
10
10
  export let whitespace = 'normal';
11
11
  export let size = 'base';
12
12
  export let space;
13
- export let weight;
13
+ export let weight = 'normal';
14
14
  const sizes = {
15
15
  xs: 'text-xs',
16
16
  sm: 'text-sm',
@@ -67,8 +67,6 @@ let colorAndopacity = color
67
67
  .map((element) => element.trim())
68
68
  .map((element) => element + '/' + String(opacity))
69
69
  .join(' ');
70
- // console.log('colorArr', colorAndopacity);
71
- // console.log(typeof colorAndopacity);
72
70
  let classP = classNames(size && sizes[size], (opacity && colorAndopacity) || (color && color), height && heights[height], weight && weights[weight], space && spaces[space], align && aligns[align], justify && 'text-justify', italic && 'italic', firstupper && upperClass, whitespace && whitespaces[whitespace], $$props.class);
73
71
  </script>
74
72
 
@@ -13,7 +13,7 @@ declare const __propDef: {
13
13
  whitespace?: 'normal' | 'nowrap' | 'pre' | 'preline' | 'prewrap';
14
14
  size?: 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl';
15
15
  space: 'tighter' | 'tight' | 'normal' | 'wide' | 'wider' | 'widest';
16
- weight: 'thin' | 'extralight' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black';
16
+ weight?: 'thin' | 'extralight' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black';
17
17
  };
18
18
  events: {
19
19
  [evt: string]: CustomEvent<any>;
@@ -61,11 +61,13 @@ function init(node, _triggerEl) {
61
61
  name: 'offset',
62
62
  options: {
63
63
  offset: ({ placement, reference, popper }) => {
64
+ // for full screen mega menu
64
65
  return [yOnly ? popper.width / 2 - reference.width / 2 - reference.x : 0, offset];
65
66
  }
66
67
  }
67
68
  },
68
- { name: 'eventListeners', enabled: open }
69
+ { name: 'eventListeners', enabled: open },
70
+ { name: 'flip', enabled: false }
69
71
  ]
70
72
  });
71
73
  return {
@@ -127,8 +129,7 @@ onMount(() => {
127
129
  on:mouseenter={showHandler}
128
130
  on:mouseleave={activeContent && !clickable ? hideHandler : undefined}
129
131
  {...$$restProps}
130
- class={classNames('z-10', $$props.class)}
131
- style="position: absolute;">
132
+ class={classNames('z-10', $$props.class)}>
132
133
  <slot />
133
134
  {#if arrow}<div data-popper-arrow />{/if}
134
135
  </Frame>
@@ -4,6 +4,9 @@
4
4
  // export let autoplay: boolean = false;
5
5
  export let src;
6
6
  export let type = 'video/mp4';
7
+ export let trackSrc = '';
8
+ export let srclang = 'en';
9
+ export let label = 'english_captions';
7
10
  // export let attribute = '';
8
11
  let videoClass = classNames($$props.class);
9
12
  // const setAttribute = (node, params) => {
@@ -14,5 +17,6 @@ let videoClass = classNames($$props.class);
14
17
  <video {...$$restProps} class={videoClass}>
15
18
  <source {src} {type} />
16
19
  <slot />
20
+ <track src={trackSrc} kind="captions" {srclang} {label} />
17
21
  Your browser does not support the video tag.
18
22
  </video>
@@ -4,6 +4,9 @@ declare const __propDef: {
4
4
  [x: string]: any;
5
5
  src: string;
6
6
  type?: string;
7
+ trackSrc?: string;
8
+ srclang?: string;
9
+ label?: string;
7
10
  };
8
11
  events: {
9
12
  [evt: string]: CustomEvent<any>;