@marianmeres/stuic 2.1.14 → 2.1.16

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.
@@ -57,12 +57,12 @@
57
57
 
58
58
  let current = $derived(acp?.current!);
59
59
 
60
- let iconFn = $derived.by(() => {
61
- let out = current.iconFn;
60
+ let iconHtml = $derived.by(() => {
61
+ let fn = current.iconFn as any;
62
62
  if (current.iconFn === true) {
63
- out = defaultIcons[current.variant];
63
+ fn = defaultIcons[current.variant];
64
64
  }
65
- return out;
65
+ return fn?.();
66
66
  });
67
67
 
68
68
  let CmpButtonOk = $derived(current.CmpButtonOk ?? Button);
@@ -113,7 +113,7 @@
113
113
 
114
114
  const _classContent = `mt-2 mx-3 sm:mx-0 text-center sm:text-left text-sm opacity-75`;
115
115
 
116
- const _classMenu = `mt-6 sm:flex sm:space-x-4 justify-end space-y-3 sm:space-y-0`;
116
+ const _classMenu = `mt-6 sm:flex sm:space-x-4 justify-end space-y-4 sm:space-y-0`;
117
117
 
118
118
  const _classMenuLi = `flex-1 sm:flex-none w-full sm:w-auto sm:inline-block`;
119
119
 
@@ -124,7 +124,7 @@
124
124
 
125
125
  <div class={twMerge("stuic-acp", _class, classProp)}>
126
126
  <div class={twMerge("wrap", _classWrap, classWrap)}>
127
- {#if typeof iconFn === "function"}
127
+ {#if iconHtml}
128
128
  <div
129
129
  class={twMerge(
130
130
  "icon-box",
@@ -133,7 +133,7 @@
133
133
  classIconBox
134
134
  )}
135
135
  >
136
- {@html iconFn()}
136
+ {@html iconHtml}
137
137
  </div>
138
138
  {/if}
139
139
  <div class={twMerge("content-box", _classContentBox, classContentBox)}>
@@ -141,7 +141,7 @@
141
141
  class={twMerge(
142
142
  "title",
143
143
  _classTitle,
144
- typeof iconFn === "function" && "pt-2",
144
+ typeof iconHtml === "function" && "pt-2",
145
145
  classTitle
146
146
  )}
147
147
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "2.1.14",
3
+ "version": "2.1.16",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",