@rokkit/ui 1.0.0-next.112 → 1.0.0-next.113

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/ui",
3
- "version": "1.0.0-next.112",
3
+ "version": "1.0.0-next.113",
4
4
  "description": "Organisms are larger, more complex building blocks that are composed of multiple molecules",
5
5
  "author": "Jerry Thomas <me@jerrythomas.name>",
6
6
  "license": "MIT",
@@ -10,9 +10,9 @@
10
10
  "access": "public"
11
11
  },
12
12
  "scripts": {
13
- "prepublishOnly": "bunx tsc --project tsconfig.build.json",
13
+ "prepublishOnly": "bun clean && bun tsc --project tsconfig.build.json",
14
14
  "clean": "rm -rf dist",
15
- "build": "bun clean && bun prepublishOnly"
15
+ "build": "bun prepublishOnly"
16
16
  },
17
17
  "files": [
18
18
  "src/**/*.js",
package/src/Button.svelte CHANGED
@@ -1,4 +1,5 @@
1
1
  <script>
2
+ import Icon from './Icon.svelte'
2
3
  /**
3
4
  * @typedef {Object} ButtonProps
4
5
  * @property {'default' | 'primary' | 'secondary' | 'tertiary'} variant - The variant of the button.
@@ -13,6 +14,7 @@
13
14
  */
14
15
  /** @type {ButtonProps} */
15
16
  let {
17
+ class: classes = '',
16
18
  variant = 'default',
17
19
  type = 'button',
18
20
  leftIcon = null,
@@ -20,9 +22,8 @@
20
22
  label = null,
21
23
  children = null,
22
24
  description = null,
23
- onclick,
24
- onsubmit,
25
- onreset
25
+ disabled = false,
26
+ onclick
26
27
  } = $props()
27
28
 
28
29
  const primary = $derived(variant === 'primary')
@@ -35,10 +36,9 @@
35
36
  class:secondary
36
37
  class:tertiary
37
38
  class={classes}
39
+ {disabled}
38
40
  {type}
39
41
  {onclick}
40
- {onsubmit}
41
- {onreset}
42
42
  aria-label={description ?? label}
43
43
  >
44
44
  {#if typeof leftIcon === 'string'}