flowbite-svelte 0.24.18 → 0.25.2

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.24.19](https://github.com/themesberg/flowbite-svelte/compare/v0.24.18...v0.24.19) (2022-08-17)
6
+
7
+
8
+ ### Features
9
+
10
+ * add pointerEvent prop to Iconinput to show/hide cursor ([dffa324](https://github.com/themesberg/flowbite-svelte/commit/dffa3247856c7245ecb8a67554ce77b797fe8627))
11
+
5
12
  ### [0.24.18](https://github.com/themesberg/flowbite-svelte/compare/v0.24.17...v0.24.18) (2022-08-16)
6
13
 
7
14
 
@@ -7,21 +7,23 @@ export let noBorder = false;
7
7
  export let inputClass = 'rounded-none rounded-r-lg bg-gray-50 border border-gray-300 text-gray-900 focus:ring-blue-500 focus:border-blue-500 block flex-1 min-w-0 w-full border-gray-300 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';
8
8
  export let spanClass = 'inline-flex items-center px-3 text-sm text-gray-900 bg-gray-200 rounded-l-md border border-r-0 border-gray-300 dark:bg-gray-600 dark:text-gray-400 dark:border-gray-600';
9
9
  export let noBorderInputClass = 'bg-gray-50 border border-gray-300 text-gray-900 rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full pl-10 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';
10
- export let noBorderDivClass = 'flex absolute inset-y-0 left-0 items-center pl-3 pointer-events-none';
10
+ export let pointerEvent = false;
11
+ export let noBorderDivClass = 'flex absolute inset-y-0 left-0 items-center pl-3';
11
12
  export let iconClass = 'mr-2';
12
- const setType = (node) => {
13
- node.type = type;
14
- };
15
13
  </script>
16
14
 
17
15
  {#if noBorder}
18
16
  <div class="relative">
19
- <div
20
- class={classNames(noBorderDivClass, {
21
- 'p-2 sm:text-xs': size === 'sm',
22
- 'p-2.5 text-sm': size === 'md',
23
- 'sm:text-md p-4': size === 'lg'
24
- })}
17
+ <span
18
+ class={classNames(
19
+ noBorderDivClass,
20
+ {
21
+ 'p-2 sm:text-xs': size === 'sm',
22
+ 'p-2.5 text-sm': size === 'md',
23
+ 'sm:text-md p-4': size === 'lg'
24
+ },
25
+ pointerEvent ? 'cursor-pointer' : 'pointer-events-none'
26
+ )}
25
27
  >
26
28
  <svelte:component
27
29
  this={icon}
@@ -33,11 +35,10 @@ const setType = (node) => {
33
35
  })}
34
36
  class={iconClass}
35
37
  />
36
- </div>
38
+ </span>
37
39
  <input
38
40
  {...$$restProps}
39
- bind:value
40
- use:setType
41
+ {type}
41
42
  class={classNames(
42
43
  noBorderInputClass,
43
44
  {
@@ -51,7 +52,7 @@ const setType = (node) => {
51
52
  </div>
52
53
  {:else}
53
54
  <div class="flex">
54
- <span class={spanClass}>
55
+ <div class={spanClass}>
55
56
  <svelte:component
56
57
  this={icon}
57
58
  on:click
@@ -60,9 +61,9 @@ const setType = (node) => {
60
61
  18: size === 'md',
61
62
  20: size === 'lg'
62
63
  })}
63
- class={iconClass}
64
+ class={classNames(iconClass, pointerEvent ? 'cursor-pointer' : 'pointer-events-none')}
64
65
  />
65
- </span>
66
+ </div>
66
67
  <input
67
68
  {...$$restProps}
68
69
  {type}
@@ -12,6 +12,7 @@ declare const __propDef: {
12
12
  inputClass?: string;
13
13
  spanClass?: string;
14
14
  noBorderInputClass?: string;
15
+ pointerEvent?: boolean;
15
16
  noBorderDivClass?: string;
16
17
  iconClass?: string;
17
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.24.18",
3
+ "version": "0.25.2",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "index.js",
6
6
  "author": {
@@ -12,6 +12,7 @@
12
12
  "homepage": "https://flowbite-svelte.com/",
13
13
  "license": "MIT",
14
14
  "devDependencies": {
15
+ "@floating-ui/dom": "^1.0.1",
15
16
  "@playwright/test": "^1.25.0",
16
17
  "@sveltejs/adapter-auto": "next",
17
18
  "@sveltejs/kit": "next",
@@ -81,7 +82,6 @@
81
82
  "url": "https://github.com/themesberg/flowbite-svelte"
82
83
  },
83
84
  "dependencies": {
84
- "@floating-ui/dom": "^0.5.4",
85
85
  "classnames": "^2.3.1",
86
86
  "flowbite": "^1.5.2"
87
87
  },
@@ -225,4 +225,4 @@
225
225
  "./utils/generateId": "./utils/generateId.js"
226
226
  },
227
227
  "svelte": "./index.js"
228
- }
228
+ }