flowbite-svelte 0.26.0 → 0.26.3

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.
Files changed (63) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/alerts/Alert.svelte +7 -49
  3. package/alerts/Alert.svelte.d.ts +1 -3
  4. package/cards/Card.svelte +4 -5
  5. package/dropdowns/Dropdown.svelte +10 -11
  6. package/footer/FooterIcon.svelte +2 -5
  7. package/footer/FooterIcon.svelte.d.ts +3 -5
  8. package/forms/Iconinput.svelte +13 -38
  9. package/forms/Iconinput.svelte.d.ts +3 -6
  10. package/forms/Input.svelte +1 -2
  11. package/index.d.ts +6 -10
  12. package/index.js +6 -10
  13. package/list-group/List.svelte +4 -4
  14. package/modals/Modal.svelte +6 -11
  15. package/package.json +11 -15
  16. package/popover/Popover.svelte +0 -1
  17. package/popover/Popover.svelte.d.ts +0 -3
  18. package/ratings/Review.svelte +9 -13
  19. package/ratings/Review.svelte.d.ts +4 -3
  20. package/sidebars/SidebarDropdownWrapper.svelte +1 -6
  21. package/sidebars/SidebarDropdownWrapper.svelte.d.ts +1 -2
  22. package/sidebars/SidebarItem.svelte +2 -9
  23. package/sidebars/SidebarItem.svelte.d.ts +1 -2
  24. package/tabs/TabContentItem.svelte +10 -0
  25. package/tabs/TabContentItem.svelte.d.ts +20 -0
  26. package/tabs/TabContentWrapper.svelte +8 -0
  27. package/tabs/TabContentWrapper.svelte.d.ts +16 -0
  28. package/tabs/TabHead.svelte +27 -0
  29. package/tabs/TabHead.svelte.d.ts +21 -0
  30. package/tabs/TabHeadItem.svelte +54 -0
  31. package/tabs/TabHeadItem.svelte.d.ts +34 -0
  32. package/tabs/TabWrapper.svelte +10 -0
  33. package/tabs/TabWrapper.svelte.d.ts +25 -0
  34. package/toasts/Toast.svelte +7 -24
  35. package/toasts/Toast.svelte.d.ts +1 -3
  36. package/types.d.ts +3 -7
  37. package/typography/A.svelte +4 -3
  38. package/typography/A.svelte.d.ts +1 -0
  39. package/utils/Frame.svelte +73 -0
  40. package/utils/Frame.svelte.d.ts +26 -0
  41. package/utils/InformationCircle.svelte +37 -0
  42. package/utils/InformationCircle.svelte.d.ts +22 -0
  43. package/utils/UserCircle.svelte +37 -0
  44. package/utils/UserCircle.svelte.d.ts +22 -0
  45. package/tabs/DefaultTabs.svelte +0 -26
  46. package/tabs/DefaultTabs.svelte.d.ts +0 -27
  47. package/tabs/FullWidthTabs.svelte +0 -42
  48. package/tabs/FullWidthTabs.svelte.d.ts +0 -28
  49. package/tabs/IconTabs.svelte +0 -33
  50. package/tabs/IconTabs.svelte.d.ts +0 -28
  51. package/tabs/InteractiveTabHead.svelte +0 -65
  52. package/tabs/InteractiveTabHead.svelte.d.ts +0 -54
  53. package/tabs/InteractiveTabs.svelte +0 -56
  54. package/tabs/InteractiveTabs.svelte.d.ts +0 -32
  55. package/tabs/PillTabs.svelte +0 -25
  56. package/tabs/PillTabs.svelte.d.ts +0 -27
  57. package/tabs/TabContent.svelte +0 -32
  58. package/tabs/TabContent.svelte.d.ts +0 -36
  59. package/tabs/Tabs.svelte +0 -115
  60. package/tabs/Tabs.svelte.d.ts +0 -39
  61. package/tabs/UnderlineTabs.svelte +0 -28
  62. package/tabs/UnderlineTabs.svelte.d.ts +0 -27
  63. package/tabs/tabStores.js +0 -3
@@ -15,29 +15,26 @@ export let liClass = 'flex items-center';
15
15
  <p>{review.name}</p>
16
16
  {#if review.address}
17
17
  <div class="flex items-center text-sm text-gray-500 dark:text-gray-400">
18
- {#if review.addressIcon}
19
- <svelte:component this={review.addressIcon} size="16" class="mr-2" />
20
- {/if}
21
- {review.address}
18
+ <slot name="address" />
22
19
  </div>
23
20
  {/if}
24
21
  </div>
25
22
  </div>
26
- {#if $$slots.item || $$slots.option1 || $$slots.option2}
23
+ {#if $$slots.item1 || $$slots.item2 || $$slots.item3}
27
24
  <ul class={classNames(ulClass, $$props.classUl)}>
28
- {#if $$slots.item}
25
+ {#if $$slots.item1}
29
26
  <li class={classNames(liClass, $$props.classLi)}>
30
- <slot name="item" />
27
+ <slot name="item1" />
31
28
  </li>
32
29
  {/if}
33
- {#if $$slots.option1}
30
+ {#if $$slots.item2}
34
31
  <li class={classNames(liClass, $$props.classLi)}>
35
- <slot name="option1" />
32
+ <slot name="item2" />
36
33
  </li>
37
34
  {/if}
38
- {#if $$slots.option2}
35
+ {#if $$slots.item3}
39
36
  <li class={classNames(liClass, $$props.classLi)}>
40
- <slot name="option2" />
37
+ <slot name="item3" />
41
38
  </li>
42
39
  {/if}
43
40
  </ul>
@@ -58,8 +55,7 @@ export let liClass = 'flex items-center';
58
55
  </h4>
59
56
  </div>
60
57
  <p
61
- class="bg-blue-700 text-white text-sm font-semibold inline-flex items-center p-1.5 rounded"
62
- >
58
+ class="bg-blue-700 text-white text-sm font-semibold inline-flex items-center p-1.5 rounded">
63
59
  {review.rating}
64
60
  </p>
65
61
  </div>
@@ -14,9 +14,10 @@ declare const __propDef: {
14
14
  [evt: string]: CustomEvent<any>;
15
15
  };
16
16
  slots: {
17
- item: {};
18
- option1: {};
19
- option2: {};
17
+ address: {};
18
+ item1: {};
19
+ item2: {};
20
+ item3: {};
20
21
  default: {};
21
22
  };
22
23
  };
@@ -6,7 +6,6 @@ export let btnClass = 'flex items-center p-2 w-full text-base font-normal text-g
6
6
  export let label = '';
7
7
  export let spanClass = 'flex-1 ml-3 text-left whitespace-nowrap';
8
8
  export let ulClass = 'py-2 space-y-2';
9
- export let icon;
10
9
  let isOpen = false;
11
10
  const handleDropdown = () => {
12
11
  isOpen = !isOpen;
@@ -20,11 +19,7 @@ const handleDropdown = () => {
20
19
  type="button"
21
20
  class={classNames(btnClass, $$props.class)}
22
21
  aria-controls="sidebar-dropdown">
23
- <svelte:component
24
- this={icon.name}
25
- size={icon.size}
26
- color={icon.color}
27
- class="mr-2 {icon.class}" />
22
+ <slot name="icon" />
28
23
  <span class={spanClass} sidebar-toggle-item>{label}</span>
29
24
  <ChevronDown />
30
25
  </button>
@@ -1,5 +1,4 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { IconType } from '../types';
3
2
  declare const __propDef: {
4
3
  props: {
5
4
  [x: string]: any;
@@ -7,12 +6,12 @@ declare const __propDef: {
7
6
  label?: string;
8
7
  spanClass?: string;
9
8
  ulClass?: string;
10
- icon: IconType;
11
9
  };
12
10
  events: {
13
11
  [evt: string]: CustomEvent<any>;
14
12
  };
15
13
  slots: {
14
+ icon: {};
16
15
  default: {};
17
16
  };
18
17
  };
@@ -3,7 +3,6 @@ export let aClass = 'flex items-center p-2 text-base font-normal text-gray-900 r
3
3
  export let href = '';
4
4
  export let label = '';
5
5
  export let spanClass = 'ml-3';
6
- export let icon;
7
6
  </script>
8
7
 
9
8
  <li>
@@ -19,14 +18,8 @@ export let icon;
19
18
  on:mouseenter
20
19
  on:mouseleave
21
20
  on:mouseover
22
- class={classNames(aClass, $$props.class)}
23
- >
24
- <svelte:component
25
- this={icon.name}
26
- size={icon.size}
27
- color={icon.color}
28
- class="mr-2 {icon.class}"
29
- />
21
+ class={classNames(aClass, $$props.class)}>
22
+ <slot name="icon" />
30
23
  <span class={spanClass}>{label}</span>
31
24
  {#if $$slots.subtext}
32
25
  <slot name="subtext" />
@@ -1,5 +1,4 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { IconType } from '../types';
3
2
  declare const __propDef: {
4
3
  props: {
5
4
  [x: string]: any;
@@ -7,7 +6,6 @@ declare const __propDef: {
7
6
  href?: string;
8
7
  label?: string;
9
8
  spanClass?: string;
10
- icon: IconType;
11
9
  };
12
10
  events: {
13
11
  blur: FocusEvent;
@@ -23,6 +21,7 @@ declare const __propDef: {
23
21
  [evt: string]: CustomEvent<any>;
24
22
  };
25
23
  slots: {
24
+ icon: {};
26
25
  subtext: {};
27
26
  };
28
27
  };
@@ -0,0 +1,10 @@
1
+ <script>export let activeTabValue;
2
+ export let id;
3
+ export let contentDivClass = 'p-4 bg-gray-50 rounded-lg dark:bg-gray-800';
4
+ </script>
5
+
6
+ {#if activeTabValue === id}
7
+ <div class={contentDivClass} id="{id}-tabitem" role="tabpanel" aria-labelledby="{id}-tab">
8
+ <slot />
9
+ </div>
10
+ {/if}
@@ -0,0 +1,20 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ activeTabValue: number;
5
+ id: number;
6
+ contentDivClass?: string;
7
+ };
8
+ events: {
9
+ [evt: string]: CustomEvent<any>;
10
+ };
11
+ slots: {
12
+ default: {};
13
+ };
14
+ };
15
+ export declare type TabContentItemProps = typeof __propDef.props;
16
+ export declare type TabContentItemEvents = typeof __propDef.events;
17
+ export declare type TabContentItemSlots = typeof __propDef.slots;
18
+ export default class TabContentItem extends SvelteComponentTyped<TabContentItemProps, TabContentItemEvents, TabContentItemSlots> {
19
+ }
20
+ export {};
@@ -0,0 +1,8 @@
1
+ <script>import { getContext } from 'svelte';
2
+ let tabId;
3
+ tabId = getContext('tabId');
4
+ </script>
5
+
6
+ <div id="{tabId}-content">
7
+ <slot />
8
+ </div>
@@ -0,0 +1,16 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {};
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {
8
+ default: {};
9
+ };
10
+ };
11
+ export declare type TabContentWrapperProps = typeof __propDef.props;
12
+ export declare type TabContentWrapperEvents = typeof __propDef.events;
13
+ export declare type TabContentWrapperSlots = typeof __propDef.slots;
14
+ export default class TabContentWrapper extends SvelteComponentTyped<TabContentWrapperProps, TabContentWrapperEvents, TabContentWrapperSlots> {
15
+ }
16
+ export {};
@@ -0,0 +1,27 @@
1
+ <script>export let tabStyle;
2
+ export let tabId;
3
+ export let customDivClass = '';
4
+ export let customUlClass = '';
5
+ const divClasses = {
6
+ default: 'mb-4 border-b border-gray-200 dark:border-gray-700',
7
+ full: 'mb-4',
8
+ icon: 'mb-4 border-b border-gray-200 dark:border-gray-700',
9
+ pill: 'mb-4 ',
10
+ underline: 'mb-4 text-sm font-medium text-center text-gray-500 border-b border-gray-200 dark:text-gray-400 dark:border-gray-700',
11
+ custom: customDivClass
12
+ };
13
+ const ulClasses = {
14
+ default: 'flex flex-wrap -mb-px',
15
+ full: 'hidden text-sm font-medium text-center text-gray-500 rounded-lg divide-x divide-gray-200 shadow sm:flex dark:divide-gray-700 dark:text-gray-400 mb-1',
16
+ icon: 'flex flex-wrap -mb-px text-sm font-medium text-center text-gray-500 dark:text-gray-400',
17
+ pill: 'flex flex-wrap',
18
+ underline: 'flex flex-wrap -mb-px',
19
+ custom: customUlClass
20
+ };
21
+ </script>
22
+
23
+ <div class={divClasses[tabStyle]}>
24
+ <ul class={ulClasses[tabStyle]} id={tabId} role="tablist">
25
+ <slot />
26
+ </ul>
27
+ </div>
@@ -0,0 +1,21 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ tabStyle: any;
5
+ tabId: any;
6
+ customDivClass?: string;
7
+ customUlClass?: string;
8
+ };
9
+ events: {
10
+ [evt: string]: CustomEvent<any>;
11
+ };
12
+ slots: {
13
+ default: {};
14
+ };
15
+ };
16
+ export declare type TabHeadProps = typeof __propDef.props;
17
+ export declare type TabHeadEvents = typeof __propDef.events;
18
+ export declare type TabHeadSlots = typeof __propDef.slots;
19
+ export default class TabHead extends SvelteComponentTyped<TabHeadProps, TabHeadEvents, TabHeadSlots> {
20
+ }
21
+ export {};
@@ -0,0 +1,54 @@
1
+ <script>import classNames from 'classnames';
2
+ export let id;
3
+ export let tabStyle;
4
+ export let activeTabValue;
5
+ export let customActiveClass = '';
6
+ export let customInActiveClass = '';
7
+ export let customLiClass = '';
8
+ const activeClasses = {
9
+ default: 'inline-block py-4 px-4 text-sm font-medium text-center text-blue-600 bg-gray-100 rounded-t-lg active dark:bg-gray-800 dark:text-blue-500',
10
+ full: 'inline-block p-4 w-full text-gray-900 bg-gray-100 focus:ring-4 focus:ring-blue-300 active focus:outline-none dark:bg-gray-700 dark:text-white',
11
+ icon: 'inline-flex p-4 text-blue-600 rounded-t-lg border-b-2 border-blue-600 active dark:text-blue-500 dark:border-blue-500 group',
12
+ pill: 'active inline-block py-3 px-4 text-sm font-medium text-center text-white bg-blue-600 rounded-lg',
13
+ underline: 'inline-block p-4 text-blue-600 rounded-t-lg border-b-2 border-blue-600 active dark:text-blue-500 dark:border-blue-500',
14
+ custom: customActiveClass
15
+ };
16
+ const inactiveClasses = {
17
+ default: 'inline-block py-4 px-4 text-sm font-medium text-center text-gray-500 rounded-t-lg hover:text-gray-600 hover:bg-gray-50 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300',
18
+ full: 'inline-block p-4 w-full bg-white hover:text-gray-700 hover:bg-gray-50 focus:ring-4 focus:ring-blue-300 focus:outline-none dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700',
19
+ icon: 'inline-flex p-4 rounded-t-lg border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 group ',
20
+ pill: 'inline-block py-3 px-4 text-sm font-medium text-center text-gray-500 rounded-lg hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-white',
21
+ underline: 'inline-block p-4 rounded-t-lg border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300',
22
+ custom: customInActiveClass
23
+ };
24
+ const liClasses = {
25
+ default: 'mr-2',
26
+ full: 'w-full',
27
+ icon: 'mr-2',
28
+ pill: 'mr-2',
29
+ underline: 'mr-2',
30
+ custom: customLiClass
31
+ };
32
+ </script>
33
+
34
+ <li class={liClasses[tabStyle]} role="presentation">
35
+ <button
36
+ {...$$restProps}
37
+ on:click
38
+ on:blur
39
+ on:click
40
+ on:focus
41
+ on:keydown
42
+ on:keypress
43
+ on:keyup
44
+ on:mouseenter
45
+ on:mouseleave
46
+ on:mouseover
47
+ class={classNames(activeTabValue === id ? activeClasses[tabStyle] : inactiveClasses[tabStyle])}
48
+ id="{id}-tabhead"
49
+ type="button"
50
+ role="tab"
51
+ {...$$restProps}>
52
+ <slot />
53
+ </button>
54
+ </li>
@@ -0,0 +1,34 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ id: number;
6
+ tabStyle: string;
7
+ activeTabValue: number;
8
+ customActiveClass?: string;
9
+ customInActiveClass?: string;
10
+ customLiClass?: string;
11
+ };
12
+ events: {
13
+ click: MouseEvent;
14
+ blur: FocusEvent;
15
+ focus: FocusEvent;
16
+ keydown: KeyboardEvent;
17
+ keypress: KeyboardEvent;
18
+ keyup: KeyboardEvent;
19
+ mouseenter: MouseEvent;
20
+ mouseleave: MouseEvent;
21
+ mouseover: MouseEvent;
22
+ } & {
23
+ [evt: string]: CustomEvent<any>;
24
+ };
25
+ slots: {
26
+ default: {};
27
+ };
28
+ };
29
+ export declare type TabHeadItemProps = typeof __propDef.props;
30
+ export declare type TabHeadItemEvents = typeof __propDef.events;
31
+ export declare type TabHeadItemSlots = typeof __propDef.slots;
32
+ export default class TabHeadItem extends SvelteComponentTyped<TabHeadItemProps, TabHeadItemEvents, TabHeadItemSlots> {
33
+ }
34
+ export {};
@@ -0,0 +1,10 @@
1
+ <script>import classNames from 'classnames';
2
+ export let divClass = 'w-full';
3
+ export let tabStyle = 'default';
4
+ let tabId;
5
+ export let activeTabValue;
6
+ </script>
7
+
8
+ <div class={classNames(divClass, $$props.class)}>
9
+ <slot {tabStyle} {tabId} {activeTabValue} />
10
+ </div>
@@ -0,0 +1,25 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ divClass?: string;
6
+ tabStyle?: 'default' | 'full' | 'icon' | 'pill' | 'underline' | 'custom';
7
+ activeTabValue: number;
8
+ };
9
+ events: {
10
+ [evt: string]: CustomEvent<any>;
11
+ };
12
+ slots: {
13
+ default: {
14
+ tabStyle: "default" | "custom" | "full" | "icon" | "pill" | "underline";
15
+ tabId: number;
16
+ activeTabValue: number;
17
+ };
18
+ };
19
+ };
20
+ export declare type TabWrapperProps = typeof __propDef.props;
21
+ export declare type TabWrapperEvents = typeof __propDef.events;
22
+ export declare type TabWrapperSlots = typeof __propDef.slots;
23
+ export default class TabWrapper extends SvelteComponentTyped<TabWrapperProps, TabWrapperEvents, TabWrapperSlots> {
24
+ }
25
+ export {};
@@ -1,29 +1,12 @@
1
- <script>import classNames from 'classnames';
2
- import * as transitions from 'svelte/transition';
1
+ <script>import Frame from '../utils/Frame.svelte';
2
+ import classNames from 'classnames';
3
3
  import CloseButton from '../utils/CloseButton.svelte';
4
4
  export let color = 'blue';
5
5
  export let simple = false;
6
- // Export a prop through which you can set a desired transition
7
- export let transition = 'fade';
8
- // Pass in extra transition params
9
- export let params = {};
10
6
  // Absolute position
11
7
  export let position = undefined; // default not set
12
8
  export let visible = true;
13
- export let divClass = 'w-full max-w-xs p-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800';
14
- const colors = {
15
- blue: 'text-blue-500 bg-blue-100 dark:bg-blue-800 dark:text-blue-200',
16
- green: 'text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200',
17
- red: 'text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200',
18
- gray: 'text-gray-500 bg-gray-100 dark:bg-gray-800 dark:text-gray-200',
19
- purple: 'text-purple-500 bg-purple-100 dark:bg-purple-800 dark:text-purple-200',
20
- indigo: 'text-indigo-500 bg-indigo-100 dark:bg-indigo-800 dark:text-indigo-200',
21
- yellow: 'text-yellow-500 bg-yellow-100 dark:bg-yellow-800 dark:text-yellow-200',
22
- pink: 'text-pink-500 bg-pink-100 dark:bg-pink-800 dark:text-pink-200'
23
- };
24
- // have a custom transition function that returns the desired transition
25
- let transitionFunc;
26
- $: transitionFunc = transitions[transition] ?? transitions.fade;
9
+ export let divClass = 'w-full max-w-xs p-4';
27
10
  $: classDiv = classNames(divClass, {
28
11
  'absolute top-5 left-5': position == 'tl',
29
12
  'absolute top-5 right-5': position == 'tr',
@@ -31,14 +14,14 @@ $: classDiv = classNames(divClass, {
31
14
  'absolute bottom-5 right-5': position == 'br'
32
15
  }, $$props.class);
33
16
  let iconClass;
34
- $: iconClass = classNames('inline-flex items-center justify-center flex-shrink-0 rounded-lg w-8 h-8 mr-3', colors[color]);
17
+ $: iconClass = classNames('inline-flex items-center justify-center flex-shrink-0 w-8 h-8 mr-3');
35
18
  </script>
36
19
 
37
20
  {#if visible}
38
- <div transition:transitionFunc={params} class={classDiv} role="alert">
21
+ <Frame rounded border transition="fade" {...$$restProps} class={classDiv} role="alert">
39
22
  <div class="flex {$$slots.extra ? 'items-start' : 'items-center'}">
40
23
  {#if $$slots.icon}
41
- <div class={iconClass}><slot name="icon" /></div>
24
+ <Frame {color} rounded class={iconClass}><slot name="icon" /></Frame>
42
25
  {/if}
43
26
 
44
27
  <div class="text-sm font-normal w-full">
@@ -49,5 +32,5 @@ $: iconClass = classNames('inline-flex items-center justify-center flex-shrink-0
49
32
  <CloseButton on:click={() => (visible = false)} />
50
33
  {/if}
51
34
  </div>
52
- </div>
35
+ </Frame>
53
36
  {/if}
@@ -1,12 +1,10 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { Colors, TransitionTypes, TransitionParamTypes } from '../types';
2
+ import type { Colors } from '../types';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  [x: string]: any;
6
6
  color?: Colors;
7
7
  simple?: boolean;
8
- transition?: TransitionTypes;
9
- params?: TransitionParamTypes;
10
8
  position?: 'tl' | 'tr' | 'bl' | 'br';
11
9
  visible?: boolean;
12
10
  divClass?: string;
package/types.d.ts CHANGED
@@ -157,16 +157,12 @@ export declare type ReviewType = {
157
157
  imgSrc: string;
158
158
  imgAlt: string;
159
159
  address: string | undefined;
160
- addressIcon: typeof SvelteComponent | undefined;
161
160
  reviewDate: string | undefined;
162
161
  title: string;
163
162
  rating: number;
164
- item: string | undefined;
165
- itemIcon: typeof SvelteComponent | undefined;
166
- option1: string | undefined;
167
- option1Icon: typeof SvelteComponent | undefined;
168
- option2: string | undefined;
169
- option2Icon: typeof SvelteComponent | undefined;
163
+ item1: string | undefined;
164
+ item2: string | undefined;
165
+ item3: string | undefined;
170
166
  };
171
167
  export declare type SelectOptionType = {
172
168
  name: string;
@@ -1,9 +1,10 @@
1
1
  <script>import classNames from 'classnames';
2
2
  export let href = '#';
3
3
  export let textColor = 'text-blue-600 dark:text-blue-500';
4
- export let aClass = 'inline-flex items-center text-lg hover:underline';
4
+ export let aClass = 'inline-flex items-center hover:underline';
5
+ export let textSize = 'text-lg';
5
6
  </script>
6
7
 
7
- <a {href} class={classNames(aClass, textColor, $$props.class)}>
8
- <slot />
8
+ <a {href} class={classNames(aClass, textColor, textSize, $$props.class)}>
9
+ <slot />
9
10
  </a>
@@ -5,6 +5,7 @@ declare const __propDef: {
5
5
  href?: string;
6
6
  textColor?: string;
7
7
  aClass?: string;
8
+ textSize?: string;
8
9
  };
9
10
  events: {
10
11
  [evt: string]: CustomEvent<any>;
@@ -0,0 +1,73 @@
1
+ <script>import classNames from 'classnames';
2
+ import { setContext } from 'svelte';
3
+ import * as transitions from 'svelte/transition';
4
+ setContext('background', true);
5
+ $: setContext('color', color);
6
+ export let tag = 'div';
7
+ export let color = 'default';
8
+ export let rounded = false;
9
+ export let border = false;
10
+ export let shadow = false;
11
+ // Export a prop through which you can set a desired transition
12
+ export let transition = undefined;
13
+ // Pass in extra transition params
14
+ export let params = {};
15
+ // your script goes here
16
+ const bgColors = {
17
+ gray: 'bg-gray-100 dark:bg-gray-200 ',
18
+ red: 'bg-red-100 dark:bg-red-200',
19
+ yellow: 'bg-yellow-100 dark:bg-yellow-200 ',
20
+ green: 'bg-green-100 dark:bg-green-200 ',
21
+ indigo: 'bg-indigo-100 dark:bg-indigo-200 ',
22
+ purple: 'bg-purple-100 dark:bg-purple-200 ',
23
+ pink: 'bg-pink-100 dark:bg-pink-200 ',
24
+ blue: 'bg-blue-100 dark:bg-blue-200 ',
25
+ light: 'bg-gray-50 dark:bg-gray-700',
26
+ dark: 'bg-gray-100 dark:bg-gray-700',
27
+ default: 'bg-white dark:bg-gray-800',
28
+ none: ''
29
+ };
30
+ const textColors = {
31
+ gray: 'text-gray-700 dark:text-gray-800',
32
+ red: 'text-red-700 dark:text-red-800',
33
+ yellow: 'text-yellow-700 dark:text-yellow-800',
34
+ green: 'text-green-700 dark:text-green-800',
35
+ indigo: 'text-indigo-700 dark:text-indigo-800',
36
+ purple: 'text-purple-700 dark:text-purple-800',
37
+ pink: 'text-pink-700 dark:text-pink-800',
38
+ blue: 'text-blue-700 dark:text-blue-800',
39
+ light: 'text-gray-700 dark:text-gray-300',
40
+ dark: 'text-gray-700 dark:text-gray-300',
41
+ default: 'text-gray-500 dark:text-gray-400',
42
+ none: ''
43
+ };
44
+ const borderColors = {
45
+ gray: 'border-gray-500 dark:bg-gray-200 ',
46
+ red: 'border-red-500 dark:bg-red-200 ',
47
+ yellow: 'border-yellow-500 dark:bg-tellow-200 ',
48
+ green: 'border-green-500 dark:bg-green-200 ',
49
+ indigo: 'border-indigo-500 dark:bg-indigo-200 ',
50
+ purple: 'border-purple-500 dark:bg-purple-200 ',
51
+ pink: 'border-pink-500 dark:bg-pink-200 ',
52
+ blue: 'border-blue-500 dark:bg-blue-200 ',
53
+ light: 'border-gray-500',
54
+ dark: 'border-gray-500',
55
+ default: 'border-gray-200 dark:border-gray-700',
56
+ none: ''
57
+ };
58
+ // have a custom transition function that returns the desired transition
59
+ let transitionFunc;
60
+ $: transitionFunc = transitions[transition];
61
+ let divClass;
62
+ $: divClass = classNames(bgColors[color], textColors[color], rounded && 'rounded-lg ', border && 'border', borderColors[color], shadow && 'shadow-md', $$props.class);
63
+ </script>
64
+
65
+ {#if transitionFunc}
66
+ <svelte:element this={tag} transition:transitionFunc={params} {...$$restProps} class={divClass}>
67
+ <slot />
68
+ </svelte:element>
69
+ {:else}
70
+ <svelte:element this={tag} {...$$restProps} class={divClass}>
71
+ <slot />
72
+ </svelte:element>
73
+ {/if}
@@ -0,0 +1,26 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import type { TransitionTypes, TransitionParamTypes } from '../types';
3
+ declare const __propDef: {
4
+ props: {
5
+ [x: string]: any;
6
+ tag?: string;
7
+ color?: string;
8
+ rounded?: boolean;
9
+ border?: boolean;
10
+ shadow?: boolean;
11
+ transition?: TransitionTypes;
12
+ params?: TransitionParamTypes;
13
+ };
14
+ events: {
15
+ [evt: string]: CustomEvent<any>;
16
+ };
17
+ slots: {
18
+ default: {};
19
+ };
20
+ };
21
+ export declare type FrameProps = typeof __propDef.props;
22
+ export declare type FrameEvents = typeof __propDef.events;
23
+ export declare type FrameSlots = typeof __propDef.slots;
24
+ export default class Frame extends SvelteComponentTyped<FrameProps, FrameEvents, FrameSlots> {
25
+ }
26
+ export {};
@@ -0,0 +1,37 @@
1
+ <script>export let size = '24';
2
+ export let color = 'currentColor';
3
+ export let variation = 'outline';
4
+ let viewBox;
5
+ let svgpath;
6
+ let svgoutline = `<path d="M11.25 11.25L11.2915 11.2293C11.8646 10.9427 12.5099 11.4603 12.3545 12.082L11.6455 14.918C11.4901 15.5397 12.1354 16.0573 12.7085 15.7707L12.75 15.75M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12ZM12 8.25H12.0075V8.2575H12V8.25Z" stroke="${color}" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> `;
7
+ let svgsolid = `<path fill-rule="evenodd" clip-rule="evenodd" d="M2.25 12C2.25 6.61522 6.61522 2.25 12 2.25C17.3848 2.25 21.75 6.61522 21.75 12C21.75 17.3848 17.3848 21.75 12 21.75C6.61522 21.75 2.25 17.3848 2.25 12ZM10.9562 10.5584C12.1025 9.98533 13.3931 11.0206 13.0823 12.2639L12.3733 15.0999L12.4148 15.0792C12.7852 14.894 13.2357 15.0441 13.421 15.4146C13.6062 15.7851 13.4561 16.2356 13.0856 16.4208L13.0441 16.4416C11.8979 17.0147 10.6072 15.9794 10.9181 14.7361L11.6271 11.9001L11.5856 11.9208C11.2151 12.1061 10.7646 11.9559 10.5793 11.5854C10.3941 11.2149 10.5443 10.7644 10.9148 10.5792L10.9562 10.5584ZM12 9C12.4142 9 12.75 8.66421 12.75 8.25C12.75 7.83579 12.4142 7.5 12 7.5C11.5858 7.5 11.25 7.83579 11.25 8.25C11.25 8.66421 11.5858 9 12 9Z" fill="${color}"/> `;
8
+ $: switch (variation) {
9
+ case 'outline':
10
+ svgpath = svgoutline;
11
+ viewBox = '0 0 24 24';
12
+ break;
13
+ case 'solid':
14
+ svgpath = svgsolid;
15
+ viewBox = '0 0 24 24';
16
+ break;
17
+ default:
18
+ svgpath = svgoutline;
19
+ viewBox = '0 0 24 24';
20
+ }
21
+ export let ariaLabel = 'information circle';
22
+ </script>
23
+
24
+ <svg
25
+ xmlns="http://www.w3.org/2000/svg"
26
+ width={size}
27
+ height={size}
28
+ class={$$props.class}
29
+ {...$$restProps}
30
+ aria-label={ariaLabel}
31
+ fill="none"
32
+ {viewBox}
33
+ stroke-width="2"
34
+ on:click
35
+ >
36
+ {@html svgpath}
37
+ </svg>