flowbite-svelte 0.26.10 → 0.26.11

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,24 @@
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.11](https://github.com/themesberg/flowbite-svelte/compare/v0.26.10...v0.26.11) (2022-09-05)
6
+
7
+
8
+ ### Features
9
+
10
+ * range - clean up ([79d35ca](https://github.com/themesberg/flowbite-svelte/commit/79d35ca127094efb20e12ad3e14635cf607edddc))
11
+ * video component and page ([27cd7df](https://github.com/themesberg/flowbite-svelte/commit/27cd7df226dde37e8a598b6693ae8278671d5782))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * [#266](https://github.com/themesberg/flowbite-svelte/issues/266) change {id} to {...$$restProps} ([b02822f](https://github.com/themesberg/flowbite-svelte/commit/b02822f273fe5b14613ec77e39285078a740cda0))
17
+ * github issue template ([b6b8fd4](https://github.com/themesberg/flowbite-svelte/commit/b6b8fd46aa7491e29935fe62ca5dc617513ee5ee))
18
+ * github issue template 2 ([343c102](https://github.com/themesberg/flowbite-svelte/commit/343c102ee1901c8d14fc75ab06a0fe28ac594a98))
19
+ * github issue template 3 ([e8c6a1b](https://github.com/themesberg/flowbite-svelte/commit/e8c6a1b7d148d0137ca0e395bf5904e3a2ed408c))
20
+ * github issue template 4 ([5565625](https://github.com/themesberg/flowbite-svelte/commit/5565625e343c197bd4d903878a2955eaae08b788))
21
+ * video component and page ([cc8dcb5](https://github.com/themesberg/flowbite-svelte/commit/cc8dcb54843ecff1f9aacc82d9139aedf7d6e0c1))
22
+
5
23
  ### [0.26.10](https://github.com/themesberg/flowbite-svelte/compare/v0.26.9...v0.26.10) (2022-09-05)
6
24
 
7
25
 
@@ -1,34 +1,22 @@
1
- <script>export let id = 'range';
2
- export let min;
3
- export let max;
1
+ <script>import classNames from 'classnames';
4
2
  export let value;
5
- export let step;
6
- export let size;
7
- let inputClass = 'w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 ';
8
- if (size === 'small') {
9
- inputClass += 'h-1 mb-6 range-sm';
10
- }
11
- else if (size === 'large') {
12
- inputClass += 'h-3 range-lg';
13
- }
14
- else {
15
- inputClass += 'h-2 mb-6';
16
- }
3
+ export let size = 'md';
4
+ const sizes = {
5
+ sm: 'h-1 range-sm',
6
+ md: 'h-2',
7
+ lg: 'h-3 range-lg'
8
+ };
9
+ let inputClass;
10
+ $: inputClass = classNames('w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700', sizes[size] ?? sizes.md, $$props.class);
17
11
  </script>
18
12
 
19
13
  <input
20
- {...$$restProps}
21
- {id}
22
- name={id}
23
14
  type="range"
24
- {min}
25
- {max}
26
15
  bind:value
27
- {step}
16
+ {...$$restProps}
28
17
  class={inputClass}
29
18
  on:change
30
19
  on:click
31
20
  on:keydown
32
21
  on:keypress
33
- on:keyup
34
- />
22
+ on:keyup />
@@ -2,12 +2,8 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- id?: string;
6
- min: number;
7
- max: number;
8
5
  value: number;
9
- step: number;
10
- size: 'small' | 'large';
6
+ size?: 'sm' | 'md' | 'lg';
11
7
  };
12
8
  events: {
13
9
  change: Event;
package/index.d.ts CHANGED
@@ -127,3 +127,4 @@ export { default as ChevronUp } from './utils/ChevronUp.svelte';
127
127
  export { default as Chevron } from './utils/Chevron.svelte';
128
128
  export { default as InformationCircle } from './utils/InformationCircle.svelte';
129
129
  export { default as UserCircle } from './utils/UserCircle.svelte';
130
+ export { default as Video } from './video/Video.svelte';
package/index.js CHANGED
@@ -162,3 +162,5 @@ export { default as ChevronUp } from './utils/ChevronUp.svelte';
162
162
  export { default as Chevron } from './utils/Chevron.svelte';
163
163
  export { default as InformationCircle } from './utils/InformationCircle.svelte';
164
164
  export { default as UserCircle } from './utils/UserCircle.svelte';
165
+ // video
166
+ export { default as Video } from './video/Video.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.26.10",
3
+ "version": "0.26.11",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -248,7 +248,8 @@
248
248
  "./utils/clickOutside": "./utils/clickOutside.js",
249
249
  "./utils/createEventDispatcher": "./utils/createEventDispatcher.js",
250
250
  "./utils/focusTrap": "./utils/focusTrap.js",
251
- "./utils/generateId": "./utils/generateId.js"
251
+ "./utils/generateId": "./utils/generateId.js",
252
+ "./video/Video.svelte": "./video/Video.svelte"
252
253
  },
253
254
  "svelte": "./index.js"
254
255
  }
@@ -1,10 +1,9 @@
1
1
  <script>import classNames from 'classnames';
2
- export let id;
3
2
  export let href = '#';
4
3
  export let color = 'text-blue-600 dark:text-blue-500';
5
4
  export let aClass = 'inline-flex items-center hover:underline';
6
5
  </script>
7
6
 
8
- <a {href} {id} class={classNames(aClass, color, $$props.class)}>
7
+ <a {...$$restProps} {href} class={classNames(aClass, color, $$props.class)}>
9
8
  <slot />
10
9
  </a>
@@ -2,7 +2,6 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- id: string;
6
5
  href?: string;
7
6
  color?: string;
8
7
  aClass?: string;
@@ -1,5 +1,4 @@
1
1
  <script>import classNames from 'classnames';
2
- export let id;
3
2
  export let border = false;
4
3
  export let italic = true;
5
4
  export let borderClass = 'border-l-4 border-gray-300 dark:border-gray-500';
@@ -31,7 +30,7 @@ const sizes = {
31
30
  </script>
32
31
 
33
32
  <blockquote
34
- {id}
33
+ {...$$restProps}
35
34
  class={classNames(
36
35
  baseClass,
37
36
  alignmentClasses[alignment],
@@ -2,7 +2,6 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- id: string;
6
5
  border?: boolean;
7
6
  italic?: boolean;
8
7
  borderClass?: string;
@@ -1,11 +1,10 @@
1
1
  <script>import classNames from 'classnames';
2
- export let id;
3
2
  export let tag;
4
3
  export let dtClass = 'text-gray-500 md:text-lg dark:text-gray-400';
5
4
  export let ddClass = 'text-lg font-semibold';
6
5
  let classDesc = classNames(tag === 'dt' ? dtClass : ddClass, $$props.class);
7
6
  </script>
8
7
 
9
- <svelte:element this={tag} {id} class={classDesc}>
8
+ <svelte:element this={tag} {...$$restProps} class={classDesc}>
10
9
  <slot />
11
10
  </svelte:element>
@@ -2,7 +2,6 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- id: string;
6
5
  tag: 'dt' | 'dd';
7
6
  dtClass?: string;
8
7
  ddClass?: string;
@@ -2,7 +2,6 @@
2
2
  export let tag = 'h1';
3
3
  export let color = 'text-gray-900 dark:text-white';
4
4
  export let customSize;
5
- export let id;
6
5
  const textSizes = {
7
6
  h1: 'text-5xl font-extrabold',
8
7
  h2: 'text-4xl font-bold',
@@ -15,7 +14,7 @@ const textSizes = {
15
14
 
16
15
  <svelte:element
17
16
  this={tag}
18
- {id}
17
+ {...$$restProps}
19
18
  class={classNames(customSize ? customSize : textSizes[tag], color, 'w-full', $$props.class)}>
20
19
  <slot />
21
20
  </svelte:element>
@@ -5,7 +5,6 @@ declare const __propDef: {
5
5
  tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
6
6
  color?: string;
7
7
  customSize: string;
8
- id: string;
9
8
  };
10
9
  events: {
11
10
  [evt: string]: CustomEvent<any>;
@@ -1,5 +1,4 @@
1
1
  <script>import classNames from 'classnames';
2
- export let id;
3
2
  export let icon = false;
4
3
  export let width = 'w-full';
5
4
  export let height = 'h-px';
@@ -14,7 +13,7 @@ let middleClass = classNames(middleBgColor, icon ? iconDivClass : textSpanClass)
14
13
  </script>
15
14
 
16
15
  {#if $$slots}
17
- <div class={classDiv} {id}>
16
+ <div {...$$restProps} class={classDiv}>
18
17
  <hr class={horizontalClass} />
19
18
  <div class={middleClass}>
20
19
  <slot />
@@ -2,7 +2,6 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- id: string;
6
5
  icon?: boolean;
7
6
  width?: string;
8
7
  height?: string;
@@ -1,5 +1,4 @@
1
1
  <script>import classNames from 'classnames';
2
- export let id;
3
2
  export let caption = undefined;
4
3
  export let src = undefined;
5
4
  export let srcset = undefined;
@@ -23,7 +22,7 @@ export let captionClass = 'mt-2 text-sm text-center text-gray-500 dark:text-gray
23
22
  </figure>
24
23
  {:else}
25
24
  <img
26
- {id}
25
+ {...$$restProps}
27
26
  class={classNames(imgClass, size, alignment, effect, $$props.class)}
28
27
  {src}
29
28
  {srcset}
@@ -2,7 +2,6 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- id: string;
6
5
  caption?: string | undefined;
7
6
  src?: string | undefined;
8
7
  srcset?: string | undefined;
@@ -1,11 +1,10 @@
1
1
  <script>import classNames from 'classnames';
2
- export let id;
3
2
  export let divClass = 'grid';
4
3
  export let cols = 'grid-cols-1 sm:grid-cols-2';
5
4
  export let gap;
6
5
  let classDiv = classNames(divClass, 'gap-' + String(gap), cols);
7
6
  </script>
8
7
 
9
- <div {id} class={classDiv}>
8
+ <div {...$$restProps} class={classDiv}>
10
9
  <slot />
11
10
  </div>
@@ -1,7 +1,7 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
- id: string;
4
+ [x: string]: any;
5
5
  divClass?: string;
6
6
  cols?: string;
7
7
  gap: number;
@@ -1,10 +1,9 @@
1
1
  <script>import classNames from 'classnames';
2
- export let id;
3
2
  export let icon = false;
4
3
  export let liClass = '';
5
4
  let classLi = classNames(liClass, icon && 'flex items-center', $$props.class);
6
5
  </script>
7
6
 
8
- <li {id} class={classLi}>
7
+ <li {...$$restProps} class={classLi}>
9
8
  <slot />
10
9
  </li>
@@ -2,7 +2,6 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- id: string;
6
5
  icon?: boolean;
7
6
  liClass?: string;
8
7
  };
@@ -1,5 +1,4 @@
1
1
  <script>import classNames from 'classnames';
2
- export let id;
3
2
  export let tag = 'ul';
4
3
  export let list = 'disc';
5
4
  export let position = 'inside';
@@ -19,6 +18,6 @@ let positions = {
19
18
  let classList = classNames(color, tag === 'ul' ? ulClass : 'ol' ? olClass : dlClass, lists[list], positions[position], $$props.class);
20
19
  </script>
21
20
 
22
- <svelte:element this={tag} {id} class={classList}>
21
+ <svelte:element this={tag} {...$$restProps} class={classList}>
23
22
  <slot />
24
23
  </svelte:element>
@@ -2,7 +2,6 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- id: string;
6
5
  tag?: 'ul' | 'ol' | 'dl';
7
6
  list?: 'disc' | 'none' | 'decimal';
8
7
  position?: 'inside' | 'outside';
@@ -1,10 +1,9 @@
1
1
  <script>import classNames from 'classnames';
2
- export let id;
3
2
  export let color = 'text-white dark:bg-blue-500';
4
3
  export let bgColor = 'bg-blue-600';
5
4
  export let markClass = 'px-2 rounded';
6
5
  </script>
7
6
 
8
- <mark {id} class={classNames(markClass, bgColor, color, $$props.class)}>
7
+ <mark {...$$restProps} class={classNames(markClass, bgColor, color, $$props.class)}>
9
8
  <slot />
10
9
  </mark>
@@ -2,7 +2,6 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- id: string;
6
5
  color?: string;
7
6
  bgColor?: string;
8
7
  markClass?: string;
@@ -1,5 +1,4 @@
1
1
  <script>import classNames from 'classnames';
2
- export let id;
3
2
  export let color = 'text-gray-900 dark:text-white';
4
3
  export let height = 'normal';
5
4
  export let align = 'left';
@@ -73,6 +72,6 @@ let colorAndopacity = color
73
72
  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);
74
73
  </script>
75
74
 
76
- <p {id} class={classP}>
75
+ <p {...$$restProps} class={classP}>
77
76
  <slot />
78
77
  </p>
@@ -2,7 +2,6 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- id: string;
6
5
  color?: string;
7
6
  height?: 'normal' | 'relaxed' | 'loose';
8
7
  align?: 'left' | 'center' | 'right';
@@ -1,9 +1,8 @@
1
1
  <script>import classNames from 'classnames';
2
- export let id;
3
2
  export let color = 'text-gray-500 dark:text-gray-400';
4
3
  export let secondaryClass = 'font-semibold';
5
4
  </script>
6
5
 
7
- <small {id} class={classNames(color, secondaryClass, $$props.class)}>
6
+ <small {...$$restProps} class={classNames(color, secondaryClass, $$props.class)}>
8
7
  <slot />
9
8
  </small>
@@ -2,7 +2,6 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- id: string;
6
5
  color?: string;
7
6
  secondaryClass?: string;
8
7
  };
@@ -1,5 +1,4 @@
1
1
  <script>import classNames from 'classnames';
2
- export let id;
3
2
  export let italic = false;
4
3
  export let underline = false;
5
4
  export let linethrough = false;
@@ -13,6 +12,6 @@ let underlineClass = classNames('underline', decorationClass);
13
12
  let classSpan = classNames(italic && 'italic', underline && underlineClass, linethrough && 'line-through', uppercase && 'uppercase', gradient ? gradientClass : 'font-semibold text-gray-900 dark:text-white', highlight && highlightClass, $$props.class);
14
13
  </script>
15
14
 
16
- <span {id} class={classSpan}>
15
+ <span {...$$restProps} class={classSpan}>
17
16
  <slot />
18
17
  </span>
@@ -2,7 +2,6 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- id: string;
6
5
  italic?: boolean;
7
6
  underline?: boolean;
8
7
  linethrough?: boolean;
@@ -1,5 +1,4 @@
1
1
  <script>import classNames from 'classnames';
2
- export let id;
3
2
  export let list = 'disc';
4
3
  export let position = 'inside';
5
4
  export let ulClass = 'max-w-md text-gray-500 dark:text-gray-400';
@@ -16,6 +15,6 @@ let classUl = classNames(ulClass, lists[list], positions[position], $$props.clas
16
15
  console.log('list', list);
17
16
  </script>
18
17
 
19
- <ul {id} class={classUl} {list}>
18
+ <ul {...$$restProps} class={classUl} {list}>
20
19
  <slot />
21
20
  </ul>
@@ -2,7 +2,6 @@ import { SvelteComponentTyped } from "svelte";
2
2
  declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
- id: string;
6
5
  list?: 'disc' | 'none' | 'decimal';
7
6
  position?: 'inside' | 'outside';
8
7
  ulClass?: string;
@@ -0,0 +1,18 @@
1
+ <script>import classNames from 'classnames';
2
+ // export let width;
3
+ // export let controls: boolean = true;
4
+ // export let autoplay: boolean = false;
5
+ export let src;
6
+ export let type = 'video/mp4';
7
+ // export let attribute = '';
8
+ let videoClass = classNames($$props.class);
9
+ // const setAttribute = (node, params) => {
10
+ // node.setAttribute(params, '');
11
+ // };
12
+ </script>
13
+
14
+ <video {...$$restProps} class={videoClass}>
15
+ <source {src} {type} />
16
+ <slot />
17
+ Your browser does not support the video tag.
18
+ </video>
@@ -0,0 +1,20 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ src: string;
6
+ type?: string;
7
+ };
8
+ events: {
9
+ [evt: string]: CustomEvent<any>;
10
+ };
11
+ slots: {
12
+ default: {};
13
+ };
14
+ };
15
+ export declare type VideoProps = typeof __propDef.props;
16
+ export declare type VideoEvents = typeof __propDef.events;
17
+ export declare type VideoSlots = typeof __propDef.slots;
18
+ export default class Video extends SvelteComponentTyped<VideoProps, VideoEvents, VideoSlots> {
19
+ }
20
+ export {};