flowbite-svelte 0.27.13 → 0.27.14
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 +8 -0
- package/modals/Modal.svelte +16 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
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.27.14](https://github.com/themesberg/flowbite-svelte/compare/v0.27.13...v0.27.14) (2022-11-01)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* card breadcrumb_title ([1ac4820](https://github.com/themesberg/flowbite-svelte/commit/1ac4820ac2553a3c812fced3b9d627e56a9d5ec2))
|
|
11
|
+
* create MetaTag component ([#406](https://github.com/themesberg/flowbite-svelte/issues/406)) ([4d09e4a](https://github.com/themesberg/flowbite-svelte/commit/4d09e4acd14e04a07b3c01408de1be718b4eef1e))
|
|
12
|
+
|
|
5
13
|
### [0.27.13](https://github.com/themesberg/flowbite-svelte/compare/v0.27.12...v0.27.13) (2022-10-30)
|
|
6
14
|
|
|
7
15
|
|
package/modals/Modal.svelte
CHANGED
|
@@ -68,7 +68,9 @@ const hide = () => {
|
|
|
68
68
|
open = false;
|
|
69
69
|
};
|
|
70
70
|
let mainClass;
|
|
71
|
-
$: mainClass = classNames('flex overflow-hidden fixed top-0 right-0 left-0 z-50 w-full md:inset-0 h-modal md:h-full', backdropClasses, ...getPlacementClasses()
|
|
71
|
+
$: mainClass = classNames('flex overflow-hidden fixed top-0 right-0 left-0 z-50 w-full md:inset-0 h-modal md:h-full', backdropClasses, ...getPlacementClasses());
|
|
72
|
+
let frameClass;
|
|
73
|
+
$: frameClass = classNames('relative flex flex-col w-full h-full md:h-auto', $$props.class);
|
|
72
74
|
const isScrollable = (e) => [
|
|
73
75
|
e.scrollWidth > e.clientWidth && ['scroll', 'auto'].indexOf(getComputedStyle(e).overflowX) >= 0,
|
|
74
76
|
e.scrollHeight > e.clientHeight && ['scroll', 'auto'].indexOf(getComputedStyle(e).overflowY) >= 0
|
|
@@ -97,19 +99,24 @@ function handleKeys(e) {
|
|
|
97
99
|
on:click={autoclose ? onAutoClose : null}>
|
|
98
100
|
<div class="flex p-4 w-full {sizes[size]} h-full md:h-auto max-h-screen">
|
|
99
101
|
<!-- Modal content -->
|
|
100
|
-
<Frame {...$$restProps}
|
|
102
|
+
<Frame rounded shadow {...$$restProps} class={frameClass}>
|
|
101
103
|
<!-- Modal header -->
|
|
102
104
|
{#if $$slots.header || title}
|
|
103
|
-
<
|
|
105
|
+
<Frame color={$$restProps.color} class="flex justify-between items-center p-4 rounded-t border-b">
|
|
104
106
|
<slot name="header">
|
|
105
|
-
<h3
|
|
107
|
+
<h3
|
|
108
|
+
class="text-xl font-semibold {$$restProps.color ? '' : 'text-gray-900 dark:text-white'} p-0">
|
|
106
109
|
{title}
|
|
107
110
|
</h3>
|
|
108
111
|
</slot>
|
|
109
|
-
{#if !permanent}<CloseButton name="Close modal" on:click={hide} />{/if}
|
|
110
|
-
</
|
|
112
|
+
{#if !permanent}<CloseButton name="Close modal" on:click={hide} color={$$restProps.color} />{/if}
|
|
113
|
+
</Frame>
|
|
111
114
|
{:else if !permanent}
|
|
112
|
-
<CloseButton
|
|
115
|
+
<CloseButton
|
|
116
|
+
name="Close modal"
|
|
117
|
+
class="absolute top-3 right-2.5"
|
|
118
|
+
on:click={hide}
|
|
119
|
+
color={$$restProps.color} />
|
|
113
120
|
{/if}
|
|
114
121
|
<!-- Modal body -->
|
|
115
122
|
<div
|
|
@@ -121,10 +128,9 @@ function handleKeys(e) {
|
|
|
121
128
|
</div>
|
|
122
129
|
<!-- Modal footer -->
|
|
123
130
|
{#if $$slots.footer}
|
|
124
|
-
<
|
|
125
|
-
class="flex items-center p-6 space-x-2 rounded-b border-t border-gray-200 dark:border-gray-600">
|
|
131
|
+
<Frame color={$$restProps.color} class="flex items-center p-6 space-x-2 rounded-b border-t">
|
|
126
132
|
<slot name="footer" />
|
|
127
|
-
</
|
|
133
|
+
</Frame>
|
|
128
134
|
{/if}
|
|
129
135
|
</Frame>
|
|
130
136
|
</div>
|