flowbite-svelte 0.25.7 → 0.25.8

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,15 @@
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.25.8](https://github.com/themesberg/flowbite-svelte/compare/v0.25.7...v0.25.8) (2022-08-21)
6
+
7
+
8
+ ### Features
9
+
10
+ * add H1, H2, A, P, Higlight components ([3f80473](https://github.com/themesberg/flowbite-svelte/commit/3f804731e6a093c1e34f8b3be6289f930c372a96))
11
+ * add Heading and removed H1 and H2 ([b2be994](https://github.com/themesberg/flowbite-svelte/commit/b2be9945c39bcbfe23a0df53348ce768c5958255))
12
+ * add Mark and TextGradient ([343e719](https://github.com/themesberg/flowbite-svelte/commit/343e719406bc146639882f97bbeafbc2de9514cb))
13
+
5
14
  ### [0.25.7](https://github.com/themesberg/flowbite-svelte/compare/v0.25.6...v0.25.7) (2022-08-21)
6
15
 
7
16
 
@@ -6,6 +6,7 @@ export let href = undefined;
6
6
  export let rounded = false;
7
7
  export let index = false;
8
8
  export let dismissable = false;
9
+ export let baseClass = 'inline-flex items-center justify-center -mb-0.5';
9
10
  let hidden = false;
10
11
  const colors = {
11
12
  blue: 'bg-blue-100 text-blue-800 dark:bg-blue-200 dark:text-blue-800',
@@ -36,7 +37,7 @@ const hovers = {
36
37
  pink: 'hover:bg-pink-200 dark:hover:bg-pink-300'
37
38
  };
38
39
  let badgeClass;
39
- $: badgeClass = classNames('inline-flex items-center justify-center -mb-0.5', large ? 'text-sm font-medium' : 'text-xs font-semibold', colors[color], href && (hovers[color] ?? hovers.blue), rounded ? 'rounded-full p-1' : 'rounded px-2.5 py-0.5', index && 'absolute font-bold border-2 border-white dark:border-gray-900', index && (large ? 'w-7 h-7 -top-3 -right-3' : 'w-6 h-6 -top-2 -right-2'), $$props.class);
40
+ $: badgeClass = classNames(baseClass, large ? 'text-sm font-medium' : 'text-xs font-semibold', colors[color], href && (hovers[color] ?? hovers.blue), rounded ? 'rounded-full p-1' : 'rounded px-2.5 py-0.5', index && 'absolute font-bold border-2 border-white dark:border-gray-900', index && (large ? 'w-7 h-7 -top-3 -right-3' : 'w-6 h-6 -top-2 -right-2'), $$props.class);
40
41
  const handleHide = () => {
41
42
  hidden = !hidden;
42
43
  };
@@ -9,6 +9,7 @@ declare const __propDef: {
9
9
  rounded?: boolean;
10
10
  index?: boolean;
11
11
  dismissable?: boolean;
12
+ baseClass?: string;
12
13
  };
13
14
  events: {
14
15
  [evt: string]: CustomEvent<any>;
@@ -3,7 +3,7 @@ export let navClass = 'flex';
3
3
  export let olClass = 'inline-flex items-center space-x-1 md:space-x-3';
4
4
  </script>
5
5
 
6
- <nav aria-label="Breadcrumb" {...$$restProps} class={classNames(navClass, $$props.classNav)}>
6
+ <nav aria-label="Breadcrumb" {...$$restProps} class={classNames(navClass, $$props.class)}>
7
7
  <ol class={classNames(olClass, $$props.classOl)}>
8
8
  <slot />
9
9
  </ol>
package/index.d.ts CHANGED
@@ -111,4 +111,12 @@ export { default as TimelineItemHorizontal } from './timelines/TimelineItemHoriz
111
111
  export { default as TimelineItemVertical } from './timelines/TimelineItemVertical.svelte';
112
112
  export { default as Toast } from './toasts/Toast.svelte';
113
113
  export { default as Tooltip } from './tooltips/Tooltip.svelte';
114
+ export { default as A } from './typography/A.svelte';
115
+ export { default as Heading } from './typography/Heading.svelte';
116
+ export { default as Highlight } from './typography/Highlight.svelte';
117
+ export { default as Mark } from './typography/Mark.svelte';
118
+ export { default as P } from './typography/P.svelte';
119
+ export { default as Secondary } from './typography/Secondary.svelte';
120
+ export { default as TextGradient } from './typography/TextGradient.svelte';
121
+ export { default as Underline } from './typography/Underline.svelte';
114
122
  export { default as CloseButton } from './utils/CloseButton.svelte';
package/index.js CHANGED
@@ -143,5 +143,14 @@ export { default as TimelineItemVertical } from './timelines/TimelineItemVertica
143
143
  export { default as Toast } from './toasts/Toast.svelte';
144
144
  // Tooltips
145
145
  export { default as Tooltip } from './tooltips/Tooltip.svelte';
146
+ // Typography
147
+ export { default as A } from './typography/A.svelte';
148
+ export { default as Heading } from './typography/Heading.svelte';
149
+ export { default as Highlight } from './typography/Highlight.svelte';
150
+ export { default as Mark } from './typography/Mark.svelte';
151
+ export { default as P } from './typography/P.svelte';
152
+ export { default as Secondary } from './typography/Secondary.svelte';
153
+ export { default as TextGradient } from './typography/TextGradient.svelte';
154
+ export { default as Underline } from './typography/Underline.svelte';
146
155
  // utils
147
156
  export { default as CloseButton } from './utils/CloseButton.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.25.7",
3
+ "version": "0.25.8",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -222,6 +222,14 @@
222
222
  "./toasts/Toast.svelte": "./toasts/Toast.svelte",
223
223
  "./tooltips/Tooltip.svelte": "./tooltips/Tooltip.svelte",
224
224
  "./types": "./types.js",
225
+ "./typography/A.svelte": "./typography/A.svelte",
226
+ "./typography/Heading.svelte": "./typography/Heading.svelte",
227
+ "./typography/Highlight.svelte": "./typography/Highlight.svelte",
228
+ "./typography/Mark.svelte": "./typography/Mark.svelte",
229
+ "./typography/P.svelte": "./typography/P.svelte",
230
+ "./typography/Secondary.svelte": "./typography/Secondary.svelte",
231
+ "./typography/TextGradient.svelte": "./typography/TextGradient.svelte",
232
+ "./typography/Underline.svelte": "./typography/Underline.svelte",
225
233
  "./utils/CloseButton.svelte": "./utils/CloseButton.svelte",
226
234
  "./utils/Popper.svelte": "./utils/Popper.svelte",
227
235
  "./utils/clickOutside": "./utils/clickOutside.js",
@@ -0,0 +1,9 @@
1
+ <script>import classNames from 'classnames';
2
+ export let href = '#';
3
+ export let textColor = 'text-blue-600 dark:text-blue-500';
4
+ export let aClass = 'inline-flex items-center text-lg hover:underline';
5
+ </script>
6
+
7
+ <a {href} class={classNames(aClass, textColor, $$props.class)}>
8
+ <slot />
9
+ </a>
@@ -0,0 +1,21 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ href?: string;
6
+ textColor?: string;
7
+ aClass?: string;
8
+ };
9
+ events: {
10
+ [evt: string]: CustomEvent<any>;
11
+ };
12
+ slots: {
13
+ default: {};
14
+ };
15
+ };
16
+ export declare type AProps = typeof __propDef.props;
17
+ export declare type AEvents = typeof __propDef.events;
18
+ export declare type ASlots = typeof __propDef.slots;
19
+ export default class A extends SvelteComponentTyped<AProps, AEvents, ASlots> {
20
+ }
21
+ export {};
@@ -0,0 +1,20 @@
1
+ <script>import classNames from 'classnames';
2
+ export let tag = 'h1';
3
+ export let textColor = 'text-gray-900 dark:text-white';
4
+ export let customSize;
5
+ const textSizes = {
6
+ h1: 'text-5xl font-extrabold',
7
+ h2: 'text-4xl font-bold',
8
+ h3: 'text-3xl font-bold',
9
+ h4: 'text-2xl font-bold',
10
+ h5: 'text-xl font-bold',
11
+ h6: 'text-lg font-bold'
12
+ };
13
+ </script>
14
+
15
+ <svelte:element
16
+ this={tag}
17
+ class={classNames(customSize ? customSize : textSizes[tag], textColor, $$props.class)}
18
+ >
19
+ <slot />
20
+ </svelte:element>
@@ -0,0 +1,21 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
6
+ textColor?: string;
7
+ customSize: string;
8
+ };
9
+ events: {
10
+ [evt: string]: CustomEvent<any>;
11
+ };
12
+ slots: {
13
+ default: {};
14
+ };
15
+ };
16
+ export declare type HeadingProps = typeof __propDef.props;
17
+ export declare type HeadingEvents = typeof __propDef.events;
18
+ export declare type HeadingSlots = typeof __propDef.slots;
19
+ export default class Heading extends SvelteComponentTyped<HeadingProps, HeadingEvents, HeadingSlots> {
20
+ }
21
+ export {};
@@ -0,0 +1,7 @@
1
+ <script>import classNames from 'classnames';
2
+ export let textColor = 'text-blue-600 dark:text-blue-500';
3
+ </script>
4
+
5
+ <span class={classNames(textColor, $$props.class)}>
6
+ <slot />
7
+ </span>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ textColor?: string;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {
11
+ default: {};
12
+ };
13
+ };
14
+ export declare type HighlightProps = typeof __propDef.props;
15
+ export declare type HighlightEvents = typeof __propDef.events;
16
+ export declare type HighlightSlots = typeof __propDef.slots;
17
+ export default class Highlight extends SvelteComponentTyped<HighlightProps, HighlightEvents, HighlightSlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,9 @@
1
+ <script>import classNames from 'classnames';
2
+ export let textColor = 'text-white dark:bg-blue-500';
3
+ export let bgColor = 'bg-blue-600';
4
+ export let markClass = 'px-2 rounded';
5
+ </script>
6
+
7
+ <mark class={classNames(markClass, bgColor, textColor, $$props.class)}>
8
+ <slot />
9
+ </mark>
@@ -0,0 +1,21 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ textColor?: string;
6
+ bgColor?: string;
7
+ markClass?: string;
8
+ };
9
+ events: {
10
+ [evt: string]: CustomEvent<any>;
11
+ };
12
+ slots: {
13
+ default: {};
14
+ };
15
+ };
16
+ export declare type MarkProps = typeof __propDef.props;
17
+ export declare type MarkEvents = typeof __propDef.events;
18
+ export declare type MarkSlots = typeof __propDef.slots;
19
+ export default class Mark extends SvelteComponentTyped<MarkProps, MarkEvents, MarkSlots> {
20
+ }
21
+ export {};
@@ -0,0 +1,9 @@
1
+ <script>import classNames from 'classnames';
2
+ export let textColor = 'text-gray-500 dark:text-gray-400';
3
+ export let size = 'text-lg';
4
+ export let pClass = 'font-normal';
5
+ </script>
6
+
7
+ <p class={classNames(pClass, size, textColor, $$props.class)}>
8
+ <slot />
9
+ </p>
@@ -0,0 +1,21 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ textColor?: string;
6
+ size?: string;
7
+ pClass?: string;
8
+ };
9
+ events: {
10
+ [evt: string]: CustomEvent<any>;
11
+ };
12
+ slots: {
13
+ default: {};
14
+ };
15
+ };
16
+ export declare type PProps = typeof __propDef.props;
17
+ export declare type PEvents = typeof __propDef.events;
18
+ export declare type PSlots = typeof __propDef.slots;
19
+ export default class P extends SvelteComponentTyped<PProps, PEvents, PSlots> {
20
+ }
21
+ export {};
@@ -0,0 +1,8 @@
1
+ <script>import classNames from 'classnames';
2
+ export let textColor = 'text-gray-500 dark:text-gray-400';
3
+ export let secondaryClass = 'font-semibold';
4
+ </script>
5
+
6
+ <small class={classNames(textColor, secondaryClass, $$props.class)}>
7
+ <slot />
8
+ </small>
@@ -0,0 +1,20 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ textColor?: string;
6
+ secondaryClass?: string;
7
+ };
8
+ events: {
9
+ [evt: string]: CustomEvent<any>;
10
+ };
11
+ slots: {
12
+ default: {};
13
+ };
14
+ };
15
+ export declare type SecondaryProps = typeof __propDef.props;
16
+ export declare type SecondaryEvents = typeof __propDef.events;
17
+ export declare type SecondarySlots = typeof __propDef.slots;
18
+ export default class Secondary extends SvelteComponentTyped<SecondaryProps, SecondaryEvents, SecondarySlots> {
19
+ }
20
+ export {};
@@ -0,0 +1,7 @@
1
+ <script>import classNames from 'classnames';
2
+ export let gradientClass = 'text-transparent bg-clip-text bg-gradient-to-r to-emerald-600 from-sky-400';
3
+ </script>
4
+
5
+ <span class={classNames(gradientClass, $$props.class)}>
6
+ <slot />
7
+ </span>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ gradientClass?: string;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {
11
+ default: {};
12
+ };
13
+ };
14
+ export declare type TextGradientProps = typeof __propDef.props;
15
+ export declare type TextGradientEvents = typeof __propDef.events;
16
+ export declare type TextGradientSlots = typeof __propDef.slots;
17
+ export default class TextGradient extends SvelteComponentTyped<TextGradientProps, TextGradientEvents, TextGradientSlots> {
18
+ }
19
+ export {};
@@ -0,0 +1,7 @@
1
+ <script>import classNames from 'classnames';
2
+ export let underlineClass = 'underline underline-offset-3 decoration-8 decoration-blue-400 dark:decoration-blue-600';
3
+ </script>
4
+
5
+ <span class={classNames(underlineClass, $$props.class)}>
6
+ <slot />
7
+ </span>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ [x: string]: any;
5
+ underlineClass?: string;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {
11
+ default: {};
12
+ };
13
+ };
14
+ export declare type UnderlineProps = typeof __propDef.props;
15
+ export declare type UnderlineEvents = typeof __propDef.events;
16
+ export declare type UnderlineSlots = typeof __propDef.slots;
17
+ export default class Underline extends SvelteComponentTyped<UnderlineProps, UnderlineEvents, UnderlineSlots> {
18
+ }
19
+ export {};