@splendidlabz/svelte 4.0.0-alpha.2 → 4.0.0-alpha.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
const { class: klass = '', active, ...rest } = $props()
|
|
2
|
+
const { class: klass = '', active, children, ...rest } = $props()
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
5
|
<button {...rest} class="tab {klass}" aria-selected={active} role="tab">
|
|
6
|
-
|
|
6
|
+
{#if children}
|
|
7
|
+
{@render children()}
|
|
8
|
+
{/if}
|
|
7
9
|
</button>
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
const { id, class: klass = '', active = false, ...rest } = $props()
|
|
2
|
+
const { id, class: klass = '', active = false, children, ...rest } = $props()
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
|
-
<div {...rest} {id} class="tabpanel {klass}"
|
|
6
|
-
|
|
5
|
+
<div {...rest} {id} class="tabpanel {klass}" hidden={!active} role="tabpanel">
|
|
6
|
+
{#if children}
|
|
7
|
+
{@render children()}
|
|
8
|
+
{/if}
|
|
7
9
|
</div>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { tabpanels } from './tabs.js'
|
|
3
3
|
|
|
4
|
-
const { id = null, class: klass = '', ...rest } = $props()
|
|
4
|
+
const { id = null, class: klass = '', children, ...rest } = $props()
|
|
5
5
|
</script>
|
|
6
6
|
|
|
7
7
|
<div {...rest} {id} class="tabpanels {klass}" use:tabpanels>
|
|
8
|
-
|
|
8
|
+
{#if children}
|
|
9
|
+
{@render children()}
|
|
10
|
+
{/if}
|
|
9
11
|
</div>
|
package/components/Tabs/tabs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { all as layoutScripts } from '@splendidlabz/styles/scripts'
|
|
1
|
+
// import { all as layoutScripts } from '@splendidlabz/styles/scripts'
|
|
2
2
|
import { omitEmpty } from '@splendidlabz/utils'
|
|
3
3
|
import {
|
|
4
4
|
Focusable,
|
|
@@ -22,7 +22,7 @@ export const DEFAULT_TABLIST_OPTIONS = {
|
|
|
22
22
|
loop: false,
|
|
23
23
|
autoplay: false,
|
|
24
24
|
autoplayInterval: 3000,
|
|
25
|
-
runLayoutScripts: false,
|
|
25
|
+
// runLayoutScripts: false,
|
|
26
26
|
},
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -248,9 +248,9 @@ export function selectTab(
|
|
|
248
248
|
// TODO: Does this break if we don't include splendidLabz/layout in the build?
|
|
249
249
|
// If it does, we need to import layout scripts with await import.
|
|
250
250
|
// Then we'll have to turn `selectTab` into an async function and manage the rest accordingly
|
|
251
|
-
if (Tab.options.runLayoutScripts) {
|
|
252
|
-
|
|
253
|
-
}
|
|
251
|
+
// if (Tab.options.runLayoutScripts) {
|
|
252
|
+
// setTimeout(_ => layoutScripts(activePanel), 0)
|
|
253
|
+
// }
|
|
254
254
|
|
|
255
255
|
const { useHash, autoplay } = Tab.options
|
|
256
256
|
|