flowbite-svelte 0.18.0 → 0.18.1

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.18.1](https://github.com/themesberg/flowbite-svelte/compare/v0.18.0...v0.18.1) (2022-06-18)
6
+
7
+
8
+ ### Features
9
+
10
+ * add voice search component ([8e6e610](https://github.com/themesberg/flowbite-svelte/commit/8e6e6101fb54c5307a4d3e32cf61042308532cae))
11
+
5
12
  ## [0.18.0](https://github.com/themesberg/flowbite-svelte/compare/v0.17.6...v0.18.0) (2022-06-17)
6
13
 
7
14
 
@@ -0,0 +1,63 @@
1
+ <script>import { createEventDispatcher } from 'svelte';
2
+ export let id = '';
3
+ export let labelClass = 'sr-only';
4
+ export let iconClass = 'w-5 h-5 text-gray-500 dark:text-gray-400';
5
+ export let iconDivClass = 'flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none';
6
+ export let inputClass = 'bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pl-10 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500';
7
+ export let btnClass = 'inline-flex items-center py-2.5 px-3 ml-2 text-sm font-medium text-white bg-blue-700 rounded-lg border border-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800';
8
+ export let voiceBtnClass = 'flex absolute inset-y-0 right-0 items-center pr-3';
9
+ export let voiceIconClass = 'w-4 h-4 text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white';
10
+ export let placeholder = 'Search Mockups, Logos, Design Templates...';
11
+ const dispatch = createEventDispatcher();
12
+ const handleVoiceBtn = () => {
13
+ dispatch('handleVoiceBtn');
14
+ };
15
+ </script>
16
+
17
+ <form class="flex items-center" on:submit>
18
+ <label for={id} class={labelClass}>Search</label>
19
+ <div class="relative w-full">
20
+ <div class={iconDivClass}>
21
+ <svg
22
+ class={iconClass}
23
+ fill="currentColor"
24
+ viewBox="0 0 20 20"
25
+ xmlns="http://www.w3.org/2000/svg"
26
+ ><path
27
+ fill-rule="evenodd"
28
+ d="M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z"
29
+ clip-rule="evenodd"
30
+ /></svg
31
+ >
32
+ </div>
33
+ <input type="text" {id} class={inputClass} {placeholder} {...$$restProps} />
34
+ <button type="button" class={voiceBtnClass} on:click={handleVoiceBtn}>
35
+ <svg
36
+ class={voiceIconClass}
37
+ fill="currentColor"
38
+ viewBox="0 0 20 20"
39
+ xmlns="http://www.w3.org/2000/svg"
40
+ ><path
41
+ fill-rule="evenodd"
42
+ d="M7 4a3 3 0 016 0v4a3 3 0 11-6 0V4zm4 10.93A7.001 7.001 0 0017 8a1 1 0 10-2 0A5 5 0 015 8a1 1 0 00-2 0 7.001 7.001 0 006 6.93V17H6a1 1 0 100 2h8a1 1 0 100-2h-3v-2.07z"
43
+ clip-rule="evenodd"
44
+ /></svg
45
+ >
46
+ </button>
47
+ </div>
48
+ <button type="submit" class={btnClass}
49
+ ><svg
50
+ class="mr-2 -ml-1 w-5 h-5"
51
+ fill="none"
52
+ stroke="currentColor"
53
+ viewBox="0 0 24 24"
54
+ xmlns="http://www.w3.org/2000/svg"
55
+ ><path
56
+ stroke-linecap="round"
57
+ stroke-linejoin="round"
58
+ stroke-width="2"
59
+ d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
60
+ /></svg
61
+ >Search</button
62
+ >
63
+ </form>
@@ -0,0 +1,28 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ id?: string;
6
+ labelClass?: string;
7
+ iconClass?: string;
8
+ iconDivClass?: string;
9
+ inputClass?: string;
10
+ btnClass?: string;
11
+ voiceBtnClass?: string;
12
+ voiceIconClass?: string;
13
+ placeholder?: string;
14
+ };
15
+ events: {
16
+ submit: SubmitEvent;
17
+ handleVoiceBtn: CustomEvent<any>;
18
+ } & {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ };
23
+ export declare type VoiceSearchProps = typeof __propDef.props;
24
+ export declare type VoiceSearchEvents = typeof __propDef.events;
25
+ export declare type VoiceSearchSlots = typeof __propDef.slots;
26
+ export default class VoiceSearch extends SvelteComponentTyped<VoiceSearchProps, VoiceSearchEvents, VoiceSearchSlots> {
27
+ }
28
+ export {};
package/index.d.ts CHANGED
@@ -41,6 +41,7 @@ export { default as Radio } from './forms/Radio.svelte';
41
41
  export { default as Range } from './forms/Range.svelte';
42
42
  export { default as Search } from './forms/Search.svelte';
43
43
  export { default as SimpleSearch } from './forms/SimpleSearch.svelte';
44
+ export { default as VoiceSearch } from './forms/VoiceSearch.svelte';
44
45
  export { default as Select } from './forms/Select.svelte';
45
46
  export { default as Textarea } from './forms/Textarea.svelte';
46
47
  export { default as Toggle } from './forms/Toggle.svelte';
package/index.js CHANGED
@@ -54,6 +54,7 @@ export { default as Radio } from './forms/Radio.svelte';
54
54
  export { default as Range } from './forms/Range.svelte';
55
55
  export { default as Search } from './forms/Search.svelte';
56
56
  export { default as SimpleSearch } from './forms/SimpleSearch.svelte';
57
+ export { default as VoiceSearch } from './forms/VoiceSearch.svelte';
57
58
  export { default as Select } from './forms/Select.svelte';
58
59
  export { default as Textarea } from './forms/Textarea.svelte';
59
60
  export { default as Toggle } from './forms/Toggle.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -144,6 +144,7 @@
144
144
  "./forms/SingleCheckbox.svelte": "./forms/SingleCheckbox.svelte",
145
145
  "./forms/Textarea.svelte": "./forms/Textarea.svelte",
146
146
  "./forms/Toggle.svelte": "./forms/Toggle.svelte",
147
+ "./forms/VoiceSearch.svelte": "./forms/VoiceSearch.svelte",
147
148
  ".": "./index.js",
148
149
  "./list-group/List.svelte": "./list-group/List.svelte",
149
150
  "./modals/ExtraLargeModal.svelte": "./modals/ExtraLargeModal.svelte",