@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,5 +1,11 @@
1
1
  # @splendidlabz/svelte
2
2
 
3
+ ## 4.0.0-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Temporarily remove running of layout scripts in tabs.js
8
+
3
9
  ## 4.0.0-alpha.2
4
10
 
5
11
  ### Patch Changes
@@ -21,6 +21,7 @@
21
21
  background,
22
22
  } = p
23
23
 
24
+ // svelte-ignore non_reactive_update
24
25
  let { tablistItems = [] } = p
25
26
  const tabs = tablistItems.length > 0
26
27
  if (tablistItems.length > 0) {
@@ -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
- <slot />
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}" role="tabpanel" hidden={!active}>
6
- <slot />
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
- <slot />
8
+ {#if children}
9
+ {@render children()}
10
+ {/if}
9
11
  </div>
@@ -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
- setTimeout(_ => layoutScripts(activePanel), 0)
253
- }
251
+ // if (Tab.options.runLayoutScripts) {
252
+ // setTimeout(_ => layoutScripts(activePanel), 0)
253
+ // }
254
254
 
255
255
  const { useHash, autoplay } = Tab.options
256
256
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@splendidlabz/svelte",
3
3
  "type": "module",
4
- "version": "4.0.0-alpha.2",
4
+ "version": "4.0.0-alpha.3",
5
5
  "sideEffects": false,
6
6
  "scripts": {
7
7
  "lint": "eslint . --fix",