not-bulma 2.0.18 → 2.0.20

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": "not-bulma",
3
- "version": "2.0.18",
3
+ "version": "2.0.20",
4
4
  "description": "not-* family UI components on Bulma CSS Framework",
5
5
  "main": "src/index.js",
6
6
  "svelte": "src/index.js",
@@ -47,6 +47,8 @@
47
47
  styling = " is-rounded is-success ",
48
48
  validated = false,
49
49
  errors = false,
50
+ itemClass = "",
51
+ contentWrapper,
50
52
  formErrors = false,
51
53
  formLevelError = false,
52
54
  onchange = () => {},
@@ -118,7 +120,7 @@
118
120
  }
119
121
  </script>
120
122
 
121
- <div class="control">
123
+ {#snippet content()}
122
124
  {#if readonly}
123
125
  {#if value}
124
126
  {variants
@@ -128,7 +130,7 @@
128
130
  {/if}
129
131
  {:else}
130
132
  {#each variants as variant (variant.id)}
131
- <div class="switch-list-item">
133
+ <div class="switch-list-item {itemClass}">
132
134
  <input
133
135
  type="checkbox"
134
136
  class="switch {styling}"
@@ -153,6 +155,14 @@
153
155
  </div>
154
156
  {/each}
155
157
  {/if}
158
+ {/snippet}
159
+
160
+ <div class="control">
161
+ {#if contentWrapper}
162
+ {@render contentWrapper?.(content)}
163
+ {:else}
164
+ {@render content?.()}
165
+ {/if}
156
166
  </div>
157
167
  <ErrorsList
158
168
  bind:errors={allErrors}
@@ -18,6 +18,7 @@
18
18
  centered = false,
19
19
  right = false,
20
20
  joined = true,
21
+ size = "",
21
22
  } = $props();
22
23
 
23
24
  if (!values.every((itm) => Object.hasOwn(itm, "id"))) {
@@ -41,7 +42,7 @@
41
42
  <div
42
43
  class="buttons {centered ? 'is-centered' : ''} {right
43
44
  ? 'is-right'
44
- : ''} {classes}"
45
+ : ''} {classes} {size ? 'are-' + size : ''}"
45
46
  >
46
47
  {#each values as item (item.id)}
47
48
  <UILink {...item} />