@rokkit/core 1.0.0-next.26 → 1.0.0-next.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rokkit/core",
3
- "version": "1.0.0-next.26",
3
+ "version": "1.0.0-next.28",
4
4
  "description": "Core components, actions and stores for svelte apps.",
5
5
  "author": "Jerry Thomas <me@jerrythomas.name>",
6
6
  "license": "MIT",
@@ -28,7 +28,7 @@
28
28
  "validators": "latest",
29
29
  "vite": "^4.3.5",
30
30
  "vitest": "~0.31.0",
31
- "shared-config": "1.0.0-next.25"
31
+ "shared-config": "1.0.0-next.27"
32
32
  },
33
33
  "files": [
34
34
  "src/**/*.js",
package/src/Icon.svelte CHANGED
@@ -7,11 +7,13 @@
7
7
  export let label = name
8
8
  export let disabled = false
9
9
  export let tabindex = 0
10
+ export let checked = null
10
11
 
11
- $: tabindex = role !== 'button' || disabled ? -1 : tabindex
12
+ $: tabindex = role === 'img' || disabled ? -1 : tabindex
12
13
  $: small = size === 'small' || className.includes('small')
13
14
  $: medium = size === 'medium' || className.includes('medium')
14
15
  $: large = size === 'large' || className.includes('large')
16
+ $: checked = role !== 'checkbox' ? null : checked
15
17
  </script>
16
18
 
17
19
  <!-- svelte-ignore a11y-no-noninteractive-tabindex -->
@@ -23,6 +25,11 @@
23
25
  class:disabled
24
26
  {role}
25
27
  aria-label={label}
28
+ aria-checked={checked}
29
+ on:mouseenter
30
+ on:mouseleave
31
+ on:focus
32
+ on:blur
26
33
  on:click
27
34
  on:keydown={(e) => e.key === 'Enter' && e.currentTarget.click()}
28
35
  {tabindex}
package/src/Tabs.svelte CHANGED
@@ -1,7 +1,7 @@
1
1
  <script>
2
2
  import { defaultFields, defaultStateIcons } from './constants'
3
3
  import Icon from './Icon.svelte'
4
- import { ItemWrapper } from './items'
4
+ import { ItemWrapper, Item } from './items'
5
5
  import { navigator } from './actions'
6
6
  import { createEventDispatcher } from 'svelte'
7
7
 
@@ -35,7 +35,7 @@
35
35
 
36
36
  dispatch('select', { item: value, indices: cursor })
37
37
  }
38
- // $: using = {default: Item, ...using}
38
+ $: using = { default: Item, ...using }
39
39
  $: icons = { ...defaultStateIcons.action, ...icons }
40
40
  $: filtered = items.filter((item) => !item[fields.isDeleted])
41
41
  $: fields = { ...defaultFields, ...fields }