@wishbone-media/spark 0.24.0 → 0.26.0
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/dist/index.css +1 -1
- package/dist/index.js +702 -655
- package/formkit.config.js +12 -7
- package/formkit.theme.mjs +101 -97
- package/package.json +1 -1
- package/src/assets/css/spark-table.css +1 -1
- package/src/components/SparkButton.vue +5 -5
- package/src/components/SparkCard.vue +1 -1
- package/src/components/plugins/SparkTableFilterButtons.vue +1 -0
- package/src/components/plugins/SparkTableReset.vue +1 -0
- package/src/plugins/fontawesome.js +90 -1
- package/src/plugins/index.js +1 -1
package/package.json
CHANGED
|
@@ -93,23 +93,23 @@ const computedButtonClass = computed(() => {
|
|
|
93
93
|
|
|
94
94
|
switch (props.size) {
|
|
95
95
|
case 'xs':
|
|
96
|
-
classes += ' px-
|
|
96
|
+
classes += ' px-4 py-1 text-xs'
|
|
97
97
|
roundingSize = 'sm'
|
|
98
98
|
break
|
|
99
99
|
case 'sm':
|
|
100
|
-
classes += ' px-
|
|
100
|
+
classes += ' px-4 py-1 text-sm'
|
|
101
101
|
roundingSize = 'sm'
|
|
102
102
|
break
|
|
103
103
|
case 'md':
|
|
104
|
-
classes += ' px-
|
|
104
|
+
classes += ' px-5 py-1.5 text-sm'
|
|
105
105
|
roundingSize = 'md'
|
|
106
106
|
break
|
|
107
107
|
case 'lg':
|
|
108
|
-
classes += ' px-
|
|
108
|
+
classes += ' px-6 py-2 text-sm'
|
|
109
109
|
roundingSize = 'md'
|
|
110
110
|
break
|
|
111
111
|
case 'xl':
|
|
112
|
-
classes += ' px-
|
|
112
|
+
classes += ' px-7 py-2.5 min-h-[42px] text-sm'
|
|
113
113
|
roundingSize = 'md'
|
|
114
114
|
break
|
|
115
115
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { library } from '@fortawesome/fontawesome-svg-core'
|
|
1
|
+
import { library, icon as faIconToSvg } from '@fortawesome/fontawesome-svg-core'
|
|
2
2
|
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
|
3
3
|
|
|
4
4
|
import {
|
|
@@ -43,6 +43,19 @@ import {
|
|
|
43
43
|
faBolt,
|
|
44
44
|
faCloudDownload,
|
|
45
45
|
faInbox,
|
|
46
|
+
// Additional icons for FormKit genesis replacement
|
|
47
|
+
faPlus,
|
|
48
|
+
faArrowDown,
|
|
49
|
+
faArrowUp,
|
|
50
|
+
faCalendar,
|
|
51
|
+
faFile,
|
|
52
|
+
faCircle,
|
|
53
|
+
faCircleDot,
|
|
54
|
+
faSpinnerThird,
|
|
55
|
+
faStar,
|
|
56
|
+
faAnglesRight,
|
|
57
|
+
faAnglesLeft,
|
|
58
|
+
faEyeDropper,
|
|
46
59
|
} from '@fortawesome/pro-regular-svg-icons'
|
|
47
60
|
|
|
48
61
|
import {
|
|
@@ -97,6 +110,82 @@ export const Icons = {
|
|
|
97
110
|
fadSort: faSortDuotone,
|
|
98
111
|
fadSortDown: faSortDownDuotone,
|
|
99
112
|
fadSortUp: faSortUpDuotone,
|
|
113
|
+
|
|
114
|
+
// Additional icons for FormKit genesis replacement
|
|
115
|
+
farPlus: faPlus,
|
|
116
|
+
farArrowDown: faArrowDown,
|
|
117
|
+
farArrowUp: faArrowUp,
|
|
118
|
+
farCalendar: faCalendar,
|
|
119
|
+
farFile: faFile,
|
|
120
|
+
farCircle: faCircle,
|
|
121
|
+
farSpinner: faSpinnerThird,
|
|
122
|
+
farStar: faStar,
|
|
123
|
+
farAnglesRight: faAnglesRight,
|
|
124
|
+
farAnglesLeft: faAnglesLeft,
|
|
125
|
+
farEyeDropper: faEyeDropper,
|
|
126
|
+
farCircleDot: faCircleDot,
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Icons converted to SVG strings for FormKit's icon system.
|
|
131
|
+
* Use with FormKit's prefix-icon/suffix-icon props: prefix-icon="farCheck"
|
|
132
|
+
* These are registered in formkit.config.js and preloaded at app initialization.
|
|
133
|
+
*/
|
|
134
|
+
export const formKitIcons = Object.fromEntries(
|
|
135
|
+
Object.entries(Icons).map(([key, iconDef]) => {
|
|
136
|
+
const result = faIconToSvg(iconDef)
|
|
137
|
+
return [key, result?.html?.[0] || '']
|
|
138
|
+
})
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* FontAwesome replacements for FormKit's built-in genesis icons.
|
|
143
|
+
* These override the default icons used by FormKit components (datepicker, select, etc.)
|
|
144
|
+
* Keys match the genesis icon names so FormKit uses these instead.
|
|
145
|
+
*/
|
|
146
|
+
const genesisIconMapping = {
|
|
147
|
+
add: faPlus,
|
|
148
|
+
arrowDown: faArrowDown,
|
|
149
|
+
arrowUp: faArrowUp,
|
|
150
|
+
check: faCheck,
|
|
151
|
+
close: faXmark,
|
|
152
|
+
checkboxDecorator: faCheck,
|
|
153
|
+
date: faCalendar,
|
|
154
|
+
dragHandle: faGripDotsVertical,
|
|
155
|
+
fileItem: faFile,
|
|
156
|
+
fileRemove: faXmark,
|
|
157
|
+
noFiles: faFile,
|
|
158
|
+
radioDecorator: faCircleDot, // Circle with dot for radio indicator
|
|
159
|
+
select: faChevronDown,
|
|
160
|
+
spinner: faSpinnerThird,
|
|
161
|
+
star: faStar,
|
|
162
|
+
trash: faTrash,
|
|
163
|
+
fastForward: faAnglesRight,
|
|
164
|
+
right: faChevronRight,
|
|
165
|
+
left: faChevronLeft,
|
|
166
|
+
rewind: faAnglesLeft,
|
|
167
|
+
color: faEyeDropper,
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export const formKitGenesisOverride = Object.fromEntries(
|
|
171
|
+
Object.entries(genesisIconMapping).map(([key, iconDef]) => {
|
|
172
|
+
const result = faIconToSvg(iconDef)
|
|
173
|
+
return [key, result?.html?.[0] || '']
|
|
174
|
+
})
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* FormKit iconLoader that looks up icons from the Icons object.
|
|
179
|
+
* This handles icons added by consumer apps via addIcons() after FormKit is configured.
|
|
180
|
+
* Called lazily by FormKit when an icon isn't found in the pre-registered registry.
|
|
181
|
+
*/
|
|
182
|
+
export function formKitIconLoader(iconName) {
|
|
183
|
+
const iconDef = Icons[iconName]
|
|
184
|
+
if (iconDef) {
|
|
185
|
+
const result = faIconToSvg(iconDef)
|
|
186
|
+
return Promise.resolve(result?.html?.[0] || undefined)
|
|
187
|
+
}
|
|
188
|
+
return Promise.resolve(undefined)
|
|
100
189
|
}
|
|
101
190
|
|
|
102
191
|
export function addIcons(newIcons) {
|
package/src/plugins/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Icons, addIcons, setupFontAwesome } from './fontawesome.js'
|
|
1
|
+
export { Icons, addIcons, setupFontAwesome, formKitIcons, formKitIconLoader, formKitGenesisOverride } from './fontawesome.js'
|
|
2
2
|
export { createAuthRoutes, setupAuthGuards, create403Route, create404Route, setupBootstrapGuard } from './router.js'
|
|
3
3
|
export { createAxiosInstance, setupAxios, getAxiosInstance } from './axios.js'
|
|
4
4
|
export { createBootstrapService } from './app-bootstrap.js'
|