flowbite-svelte 0.40.2 → 0.41.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/dist/buttons/GradientButton.svelte +13 -1
- package/dist/dropdowns/Dropdown.svelte.d.ts +1 -0
- package/dist/dropdowns/Dropdown.svelte.d.ts.map +1 -1
- package/dist/forms/MultiSelect.svelte +1 -1
- package/dist/list-group/ListgroupItem.svelte +1 -1
- package/dist/megamenu/MegaMenu.svelte.d.ts +1 -0
- package/dist/megamenu/MegaMenu.svelte.d.ts.map +1 -1
- package/dist/popover/Popover.svelte.d.ts +1 -0
- package/dist/popover/Popover.svelte.d.ts.map +1 -1
- package/dist/speed-dial/SpeedDial.svelte +2 -2
- package/dist/speed-dial/SpeedDial.svelte.d.ts +1 -0
- package/dist/speed-dial/SpeedDial.svelte.d.ts.map +1 -1
- package/dist/tooltips/Tooltip.svelte.d.ts +1 -0
- package/dist/tooltips/Tooltip.svelte.d.ts.map +1 -1
- package/dist/utils/Popper.svelte +42 -26
- package/dist/utils/Popper.svelte.d.ts +1 -0
- package/dist/utils/Popper.svelte.d.ts.map +1 -1
- package/package.json +17 -16
|
@@ -53,7 +53,19 @@ $: divClass = twMerge($$props.outline && 'p-0.5', gradientClasses[color], shadow
|
|
|
53
53
|
<!-- Trick to prentend outline without using border
|
|
54
54
|
This has a limitation of no supporting transparency as
|
|
55
55
|
is set to bg-white dark:bg-gray-900 -->
|
|
56
|
-
<Button
|
|
56
|
+
<Button
|
|
57
|
+
{...$$restProps}
|
|
58
|
+
color="none"
|
|
59
|
+
class={gradientOutlineClass}
|
|
60
|
+
on:click
|
|
61
|
+
on:change
|
|
62
|
+
on:keydown
|
|
63
|
+
on:keyup
|
|
64
|
+
on:touchstart
|
|
65
|
+
on:touchend
|
|
66
|
+
on:touchcancel
|
|
67
|
+
on:mouseenter
|
|
68
|
+
on:mouseleave><slot /></Button>
|
|
57
69
|
</div>
|
|
58
70
|
{:else}
|
|
59
71
|
<Button
|
|
@@ -235,6 +235,7 @@ declare const __propDef: {
|
|
|
235
235
|
placement?: import("@floating-ui/dom").Placement | undefined;
|
|
236
236
|
trigger?: "click" | "hover" | undefined;
|
|
237
237
|
triggeredBy?: string | undefined;
|
|
238
|
+
reference?: string | undefined;
|
|
238
239
|
strategy?: "fixed" | "absolute" | undefined;
|
|
239
240
|
open?: boolean | undefined;
|
|
240
241
|
yOnly?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dropdown.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/dropdowns/Dropdown.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AA2DD,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"Dropdown.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/dropdowns/Dropdown.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AA2DD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwC,CAAC;AACxD,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACnD,MAAM,MAAM,cAAc,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACrD,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,oBAAoB,CAAC,aAAa,EAAE,cAAc,EAAE,aAAa,CAAC;CACvG"}
|
|
@@ -89,7 +89,7 @@ const clearThisOption = (select) => {
|
|
|
89
89
|
<div class="flex ml-auto gap-2">
|
|
90
90
|
<CloseButton on:click={clearAll} color="none" class="p-0 focus:ring-gray-400" />
|
|
91
91
|
<div class="w-[1px] bg-gray-300 dark:bg-gray-600" />
|
|
92
|
-
<button tabindex="-1">
|
|
92
|
+
<button type="button" tabindex="-1">
|
|
93
93
|
<ChevronDown class="h-4 w-4 mb-1 mr-1 cursor-pointer" />
|
|
94
94
|
</button>
|
|
95
95
|
</div>
|
|
@@ -45,7 +45,7 @@ $: itemClass = twMerge(itemDefaultClass, states[state], active && state === 'dis
|
|
|
45
45
|
{:else}
|
|
46
46
|
<button
|
|
47
47
|
type="button"
|
|
48
|
-
class="
|
|
48
|
+
class="flex items-center text-left {itemClass}"
|
|
49
49
|
{disabled}
|
|
50
50
|
on:blur
|
|
51
51
|
on:change
|
|
@@ -236,6 +236,7 @@ declare const __propDef: {
|
|
|
236
236
|
placement?: import("@floating-ui/dom").Placement | undefined;
|
|
237
237
|
trigger?: "click" | "hover" | undefined;
|
|
238
238
|
triggeredBy?: string | undefined;
|
|
239
|
+
reference?: string | undefined;
|
|
239
240
|
strategy?: "fixed" | "absolute" | undefined;
|
|
240
241
|
open?: boolean | undefined;
|
|
241
242
|
yOnly?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MegaMenu.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/megamenu/MegaMenu.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAED,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAyDzC,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"MegaMenu.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/megamenu/MegaMenu.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAED,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAyDzC,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA7CL,OAAO;iBACJ,MAAM;;;;;;;;;;;;;;;CA4CoC,CAAC;AACxD,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACnD,MAAM,MAAM,cAAc,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACrD,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,oBAAoB,CAAC,aAAa,EAAE,cAAc,EAAE,aAAa,CAAC;CACvG"}
|
|
@@ -235,6 +235,7 @@ declare const __propDef: {
|
|
|
235
235
|
placement?: import("@floating-ui/dom").Placement | undefined;
|
|
236
236
|
trigger?: "click" | "hover" | undefined;
|
|
237
237
|
triggeredBy?: string | undefined;
|
|
238
|
+
reference?: string | undefined;
|
|
238
239
|
strategy?: "fixed" | "absolute" | undefined;
|
|
239
240
|
open?: boolean | undefined;
|
|
240
241
|
yOnly?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/popover/Popover.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAmCD,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"Popover.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/popover/Popover.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AAmCD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwC,CAAC;AACxD,MAAM,MAAM,YAAY,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAClD,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACpD,MAAM,MAAM,YAAY,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAElD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,oBAAoB,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,CAAC;CACnG"}
|
|
@@ -17,12 +17,12 @@ export let textOutside = false;
|
|
|
17
17
|
export let id = generateId();
|
|
18
18
|
export let name = 'Open actions menu';
|
|
19
19
|
export let gradient = false;
|
|
20
|
+
export let open = false;
|
|
20
21
|
setContext('speed-dial', { pill, tooltip, textOutside });
|
|
21
22
|
let divClass;
|
|
22
23
|
$: divClass = twMerge(defaultClass, 'group', $$props.class);
|
|
23
24
|
let poperClass;
|
|
24
|
-
$: poperClass = twMerge(popperDefaultClass, ['top', 'bottom'].includes(placement) && 'flex-col');
|
|
25
|
-
let open = false;
|
|
25
|
+
$: poperClass = twMerge(popperDefaultClass, ['top', 'bottom'].includes(placement.split('-')[0]) && 'flex-col');
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<div class={divClass}>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpeedDial.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/speed-dial/SpeedDial.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AACC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"SpeedDial.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/speed-dial/SpeedDial.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AACC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC;IAC5B,WAAW,EAAE,OAAO,CAAC;CACtB;AAqEH,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;CAA+D,CAAC;AAC/E,MAAM,MAAM,cAAc,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACpD,MAAM,MAAM,eAAe,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACtD,MAAM,MAAM,cAAc,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,oBAAoB,CAAC,cAAc,EAAE,eAAe,EAAE,cAAc,CAAC;CAC3G"}
|
|
@@ -235,6 +235,7 @@ declare const __propDef: {
|
|
|
235
235
|
placement?: import("@floating-ui/dom").Placement | undefined;
|
|
236
236
|
trigger?: "click" | "hover" | undefined;
|
|
237
237
|
triggeredBy?: string | undefined;
|
|
238
|
+
reference?: string | undefined;
|
|
238
239
|
strategy?: "fixed" | "absolute" | undefined;
|
|
239
240
|
open?: boolean | undefined;
|
|
240
241
|
yOnly?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/tooltips/Tooltip.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AA4CD,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"Tooltip.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/tooltips/Tooltip.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AA4CD,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwC,CAAC;AACxD,MAAM,MAAM,YAAY,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAClD,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACpD,MAAM,MAAM,YAAY,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,oBAAoB,CAAC,YAAY,EAAE,aAAa,EAAE,YAAY,CAAC;CACnG"}
|
package/dist/utils/Popper.svelte
CHANGED
|
@@ -9,14 +9,16 @@ export let offset = 8;
|
|
|
9
9
|
export let placement = 'top';
|
|
10
10
|
export let trigger = 'hover';
|
|
11
11
|
export let triggeredBy = undefined;
|
|
12
|
+
export let reference = undefined;
|
|
12
13
|
export let strategy = 'absolute';
|
|
13
14
|
export let open = false;
|
|
14
15
|
export let yOnly = false;
|
|
15
16
|
const dispatch = createEventDispatcher();
|
|
16
17
|
let clickable;
|
|
17
18
|
$: clickable = trigger === 'click';
|
|
18
|
-
$: dispatch('show',
|
|
19
|
-
|
|
19
|
+
$: dispatch('show', referenceEl, open);
|
|
20
|
+
$: placement && (referenceEl = referenceEl);
|
|
21
|
+
let referenceEl;
|
|
20
22
|
let floatingEl;
|
|
21
23
|
let arrowEl;
|
|
22
24
|
let contentEl;
|
|
@@ -24,10 +26,10 @@ let triggerEls = [];
|
|
|
24
26
|
let _blocked = false; // management of the race condition between focusin and click events
|
|
25
27
|
const block = () => ((_blocked = true), setTimeout(() => (_blocked = false), 250));
|
|
26
28
|
const showHandler = (ev) => {
|
|
27
|
-
if (
|
|
29
|
+
if (referenceEl === undefined)
|
|
28
30
|
console.error('trigger undefined');
|
|
29
|
-
if (triggerEls.includes(ev.target) &&
|
|
30
|
-
|
|
31
|
+
if (!reference && triggerEls.includes(ev.target) && referenceEl !== ev.target) {
|
|
32
|
+
referenceEl = ev.target;
|
|
31
33
|
block();
|
|
32
34
|
}
|
|
33
35
|
if (clickable && ev.type === 'focusin' && !open)
|
|
@@ -40,7 +42,7 @@ const px = (n) => (n != null ? `${n}px` : '');
|
|
|
40
42
|
const hideHandler = (ev) => {
|
|
41
43
|
if (activeContent) {
|
|
42
44
|
setTimeout(() => {
|
|
43
|
-
const elements = [
|
|
45
|
+
const elements = [referenceEl, floatingEl, ...triggerEls].filter(Boolean);
|
|
44
46
|
if (ev.type === 'mouseleave' && elements.some(hasHover))
|
|
45
47
|
return;
|
|
46
48
|
if (ev.type === 'focusout' && elements.some(hasFocus))
|
|
@@ -58,23 +60,21 @@ const oppositeSideMap = {
|
|
|
58
60
|
bottom: 'top',
|
|
59
61
|
top: 'bottom'
|
|
60
62
|
};
|
|
63
|
+
let middleware;
|
|
64
|
+
$: middleware = [
|
|
65
|
+
dom.flip(),
|
|
66
|
+
dom.shift(),
|
|
67
|
+
dom.offset(+offset),
|
|
68
|
+
arrowEl && dom.arrow({ element: arrowEl, padding: 10 })
|
|
69
|
+
];
|
|
61
70
|
function updatePosition() {
|
|
62
71
|
dom
|
|
63
|
-
.computePosition(
|
|
64
|
-
placement,
|
|
65
|
-
strategy,
|
|
66
|
-
middleware: [
|
|
67
|
-
dom.flip(),
|
|
68
|
-
dom.shift(),
|
|
69
|
-
dom.offset(+offset),
|
|
70
|
-
arrowEl && dom.arrow({ element: arrowEl, padding: 10 })
|
|
71
|
-
]
|
|
72
|
-
})
|
|
72
|
+
.computePosition(referenceEl, floatingEl, { placement, strategy, middleware })
|
|
73
73
|
.then(({ x, y, middlewareData, placement, strategy }) => {
|
|
74
74
|
floatingEl.style.position = strategy;
|
|
75
75
|
floatingEl.style.left = yOnly ? '0' : px(x);
|
|
76
76
|
floatingEl.style.top = px(y);
|
|
77
|
-
if (middlewareData.arrow && arrowEl) {
|
|
77
|
+
if (middlewareData.arrow && arrowEl instanceof HTMLDivElement) {
|
|
78
78
|
arrowEl.style.left = px(middlewareData.arrow.x);
|
|
79
79
|
arrowEl.style.top = px(middlewareData.arrow.y);
|
|
80
80
|
arrowSide = oppositeSideMap[placement.split('-')[0]];
|
|
@@ -82,13 +82,13 @@ function updatePosition() {
|
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
function init(node,
|
|
85
|
+
function init(node, _referenceEl) {
|
|
86
86
|
floatingEl = node;
|
|
87
|
-
let cleanup = dom.autoUpdate(
|
|
87
|
+
let cleanup = dom.autoUpdate(_referenceEl, floatingEl, updatePosition);
|
|
88
88
|
return {
|
|
89
|
-
update(
|
|
89
|
+
update(_referenceEl) {
|
|
90
90
|
cleanup();
|
|
91
|
-
cleanup = dom.autoUpdate(
|
|
91
|
+
cleanup = dom.autoUpdate(_referenceEl, floatingEl, updatePosition);
|
|
92
92
|
},
|
|
93
93
|
destroy() {
|
|
94
94
|
cleanup();
|
|
@@ -117,7 +117,15 @@ onMount(() => {
|
|
|
117
117
|
if (cond)
|
|
118
118
|
element.addEventListener(name, handler);
|
|
119
119
|
});
|
|
120
|
-
|
|
120
|
+
if (reference) {
|
|
121
|
+
referenceEl = document.querySelector(reference) ?? document.body;
|
|
122
|
+
if (referenceEl === document.body) {
|
|
123
|
+
console.error(`Popup reference not found: '${reference}'`);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
referenceEl = triggerEls[0];
|
|
128
|
+
}
|
|
121
129
|
return () => {
|
|
122
130
|
triggerEls.forEach((element) => {
|
|
123
131
|
if (element) {
|
|
@@ -132,16 +140,24 @@ function optional(pred, func) {
|
|
|
132
140
|
}
|
|
133
141
|
let arrowClass;
|
|
134
142
|
$: arrowClass = twJoin('absolute pointer-events-none block w-[10px] h-[10px] rotate-45 bg-inherit border-inherit', $$props.border && arrowSide === 'bottom' && 'border-b border-r', $$props.border && arrowSide === 'top' && 'border-t border-l ', $$props.border && arrowSide === 'right' && 'border-t border-r ', $$props.border && arrowSide === 'left' && 'border-b border-l ');
|
|
143
|
+
function initArrow(node) {
|
|
144
|
+
arrowEl = node;
|
|
145
|
+
return {
|
|
146
|
+
destroy() {
|
|
147
|
+
arrowEl = null;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
}
|
|
135
151
|
</script>
|
|
136
152
|
|
|
137
|
-
{#if !
|
|
153
|
+
{#if !referenceEl}
|
|
138
154
|
<div bind:this={contentEl} />
|
|
139
155
|
{/if}
|
|
140
156
|
|
|
141
|
-
{#if open &&
|
|
157
|
+
{#if open && referenceEl}
|
|
142
158
|
<Frame
|
|
143
159
|
use={init}
|
|
144
|
-
options={
|
|
160
|
+
options={referenceEl}
|
|
145
161
|
role="tooltip"
|
|
146
162
|
tabindex={activeContent ? -1 : undefined}
|
|
147
163
|
on:focusin={optional(activeContent, showHandler)}
|
|
@@ -150,7 +166,7 @@ $: arrowClass = twJoin('absolute pointer-events-none block w-[10px] h-[10px] rot
|
|
|
150
166
|
on:mouseleave={optional(activeContent && !clickable, hideHandler)}
|
|
151
167
|
{...$$restProps}>
|
|
152
168
|
<slot />
|
|
153
|
-
{#if arrow}<div class={arrowClass}
|
|
169
|
+
{#if arrow}<div use:initArrow class={arrowClass} />{/if}
|
|
154
170
|
</Frame>
|
|
155
171
|
{/if}
|
|
156
172
|
|
|
@@ -236,6 +236,7 @@ declare const __propDef: {
|
|
|
236
236
|
placement?: Placement | undefined;
|
|
237
237
|
trigger?: "click" | "hover" | undefined;
|
|
238
238
|
triggeredBy?: string | undefined;
|
|
239
|
+
reference?: string | undefined;
|
|
239
240
|
strategy?: "fixed" | "absolute" | undefined;
|
|
240
241
|
open?: boolean | undefined;
|
|
241
242
|
yOnly?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popper.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/Popper.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AACD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Popper.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/Popper.svelte"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAE5C;AACD,OAAO,KAAK,EAAqC,SAAS,EAAQ,MAAM,kBAAkB,CAAC;AAiN3F,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwC,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AACjD,MAAM,MAAM,YAAY,GAAG,OAAO,SAAS,CAAC,MAAM,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG,OAAO,SAAS,CAAC,KAAK,CAAC;AAEjD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,oBAAoB,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,CAAC;CAC/F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.2",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"author": {
|
|
@@ -20,9 +20,10 @@
|
|
|
20
20
|
"prepublishOnly": "npm run add-exports && npm run write-package-json && npm run package && publint",
|
|
21
21
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
22
22
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
23
|
-
"test:unit": "vitest",
|
|
24
23
|
"lint": "prettier --plugin-search-dir . --check . && eslint .",
|
|
25
24
|
"format": "prettier --plugin-search-dir . --write .",
|
|
25
|
+
"test:integration": "playwright test",
|
|
26
|
+
"test:unit": "vitest",
|
|
26
27
|
"write-package-json": "node ./scripts/package-json-writer.js",
|
|
27
28
|
"add-exports": "node ./scripts/add-exports-to-package-json.js",
|
|
28
29
|
"package:publish": "standard-version && git push --follow-tags origin main && npm run package && npm run add-exports && npm run write-package-json && npm publish",
|
|
@@ -30,36 +31,36 @@
|
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
33
|
"@docsearch/js": "^3.5.1",
|
|
33
|
-
"@playwright/test": "^1.36.
|
|
34
|
-
"@sveltejs/adapter-vercel": "^3.0.
|
|
35
|
-
"@sveltejs/kit": "^1.22.
|
|
34
|
+
"@playwright/test": "^1.36.2",
|
|
35
|
+
"@sveltejs/adapter-vercel": "^3.0.3",
|
|
36
|
+
"@sveltejs/kit": "^1.22.4",
|
|
36
37
|
"@sveltejs/package": "2.1.0",
|
|
37
38
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
38
39
|
"@typescript-eslint/parser": "^5.62.0",
|
|
39
40
|
"autoprefixer": "^10.4.14",
|
|
40
41
|
"createprops": "^0.5.5",
|
|
41
42
|
"esbuild": "0.18.10",
|
|
42
|
-
"eslint": "^8.
|
|
43
|
-
"eslint-config-prettier": "^8.
|
|
44
|
-
"eslint-plugin-svelte": "^2.32.
|
|
43
|
+
"eslint": "^8.46.0",
|
|
44
|
+
"eslint-config-prettier": "^8.10.0",
|
|
45
|
+
"eslint-plugin-svelte": "^2.32.4",
|
|
45
46
|
"mdsvex": "^0.11.0",
|
|
46
|
-
"mdsvexamples": "^0.3.
|
|
47
|
-
"postcss": "^8.4.
|
|
47
|
+
"mdsvexamples": "^0.3.4",
|
|
48
|
+
"postcss": "^8.4.27",
|
|
48
49
|
"postcss-load-config": "^4.0.1",
|
|
49
50
|
"prettier": "^2.8.8",
|
|
50
51
|
"prettier-plugin-svelte": "^2.10.1",
|
|
51
52
|
"prism-themes": "^1.9.0",
|
|
52
53
|
"publint": "^0.1.16",
|
|
53
|
-
"svelte": "^4.
|
|
54
|
+
"svelte": "^4.1.2",
|
|
54
55
|
"svelte-check": "^3.4.6",
|
|
55
56
|
"svelte-meta-tags": "^2.8.0",
|
|
56
57
|
"svelte-preprocess": "^5.0.4",
|
|
57
58
|
"svelte2tsx": "^0.6.19",
|
|
58
59
|
"tailwind-merge": "^1.13.1",
|
|
59
60
|
"tailwindcss": "^3.3.3",
|
|
60
|
-
"tslib": "^2.6.
|
|
61
|
+
"tslib": "^2.6.1",
|
|
61
62
|
"typescript": "^5.1.6",
|
|
62
|
-
"vite": "^4.4.
|
|
63
|
+
"vite": "^4.4.8",
|
|
63
64
|
"vitest": "^0.32.4"
|
|
64
65
|
},
|
|
65
66
|
"peerDependencies": {
|
|
@@ -109,9 +110,9 @@
|
|
|
109
110
|
"url": "https://github.com/themesberg/flowbite-svelte"
|
|
110
111
|
},
|
|
111
112
|
"dependencies": {
|
|
112
|
-
"@floating-ui/dom": "^1.
|
|
113
|
-
"flowbite": "^1.
|
|
114
|
-
"tailwind-merge": "^1.
|
|
113
|
+
"@floating-ui/dom": "^1.5.1",
|
|
114
|
+
"flowbite": "^1.8.1",
|
|
115
|
+
"tailwind-merge": "^1.14.0"
|
|
115
116
|
},
|
|
116
117
|
"engines": {
|
|
117
118
|
"npm": ">=7.0.0",
|