@bagelink/vue 1.12.57 → 1.12.61
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/components/form/inputs/SignaturePad.vue.d.ts.map +1 -1
- package/dist/dialog/Dialog.vue.d.ts.map +1 -1
- package/dist/form-flow/FormFlow.vue.d.ts.map +1 -1
- package/dist/form-flow/form-flow.d.ts.map +1 -1
- package/dist/index.cjs +56 -56
- package/dist/index.mjs +3000 -2987
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/form/inputs/SignaturePad.vue +17 -0
- package/src/dialog/Dialog.vue +6 -0
- package/src/form-flow/FormFlow.vue +9 -2
- package/src/form-flow/form-flow.ts +4 -4
package/package.json
CHANGED
|
@@ -31,6 +31,8 @@ const props = withDefaults(defineProps<{
|
|
|
31
31
|
format?: FormatType
|
|
32
32
|
clearable?: boolean
|
|
33
33
|
required?: boolean
|
|
34
|
+
label?: string
|
|
35
|
+
helptext?: string
|
|
34
36
|
}>(), {
|
|
35
37
|
clearable: true,
|
|
36
38
|
})
|
|
@@ -218,6 +220,8 @@ defineExpose({
|
|
|
218
220
|
:class="{ 'bg-transparent': disabled }"
|
|
219
221
|
@touchmove.prevent
|
|
220
222
|
>
|
|
223
|
+
<label v-if="label" class="label">{{ label }}</label>
|
|
224
|
+
<p v-if="helptext" class="helptext">{{ helptext }}</p>
|
|
221
225
|
<Btn
|
|
222
226
|
v-if="clearable && !disabled"
|
|
223
227
|
flat
|
|
@@ -258,6 +262,19 @@ defineExpose({
|
|
|
258
262
|
border-radius: var(--input-border-radius);
|
|
259
263
|
}
|
|
260
264
|
|
|
265
|
+
.bgl_input.signature-pad > .label {
|
|
266
|
+
display: block;
|
|
267
|
+
font-size: 0.8rem;
|
|
268
|
+
padding: 0.25rem 0.5rem 0;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.bgl_input.signature-pad > .helptext {
|
|
272
|
+
font-size: 0.75rem;
|
|
273
|
+
padding: 0.15rem 0.5rem 0.25rem;
|
|
274
|
+
margin: 0;
|
|
275
|
+
line-height: 1.4;
|
|
276
|
+
}
|
|
277
|
+
|
|
261
278
|
.bgl_input.signature-pad .canvas[disabled] {
|
|
262
279
|
background: var(--input-disabled-bg);
|
|
263
280
|
border: 1px solid var(--bgl-gray);
|
package/src/dialog/Dialog.vue
CHANGED
|
@@ -399,12 +399,18 @@ dialog.dialog-right[style*="--dialog-width: 100%"] {
|
|
|
399
399
|
width: calc(100vw - 2rem);
|
|
400
400
|
}
|
|
401
401
|
|
|
402
|
+
dialog.dialog-left .grid-dialog,
|
|
403
|
+
dialog.dialog-right .grid-dialog {
|
|
404
|
+
height: 100%
|
|
405
|
+
}
|
|
406
|
+
|
|
402
407
|
/* Mobile adjustments */
|
|
403
408
|
@media screen and (max-width: 910px) {
|
|
404
409
|
|
|
405
410
|
dialog.dialog-left .grid-dialog,
|
|
406
411
|
dialog.dialog-right .grid-dialog {
|
|
407
412
|
max-height: 100vh;
|
|
413
|
+
height: unset !important;
|
|
408
414
|
}
|
|
409
415
|
|
|
410
416
|
dialog.dialog-left,
|
|
@@ -11,6 +11,7 @@ import NumberInput from '../components/form/inputs/NumberInput.vue'
|
|
|
11
11
|
import PasswordInput from '../components/form/inputs/PasswordInput.vue'
|
|
12
12
|
import RadioGroup from '../components/form/inputs/RadioGroup.vue'
|
|
13
13
|
import RichText from '../components/form/inputs/RichText/index.vue'
|
|
14
|
+
import SelectBtn from '../components/form/inputs/SelectBtn.vue'
|
|
14
15
|
import SelectInput from '../components/form/inputs/SelectInput.vue'
|
|
15
16
|
import TelInput from '../components/form/inputs/TelInput.vue'
|
|
16
17
|
import TextInput from '../components/form/inputs/TextInput.vue'
|
|
@@ -194,7 +195,13 @@ function generateLabel(key: string, field: FieldBuilder): string {
|
|
|
194
195
|
.join(' ')
|
|
195
196
|
}
|
|
196
197
|
|
|
197
|
-
function getFieldComponent(
|
|
198
|
+
function getFieldComponent(fieldOrType: FieldBuilder | string) {
|
|
199
|
+
// display: 'btn' on select/multiselect renders as SelectBtn
|
|
200
|
+
if (typeof fieldOrType !== 'string' && (fieldOrType._type === 'select' || fieldOrType._type === 'multiselect') && fieldOrType._config.display === 'btn') {
|
|
201
|
+
return SelectBtn
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
const type = typeof fieldOrType === 'string' ? fieldOrType : fieldOrType._type
|
|
198
205
|
const componentMap: Record<string, any> = {
|
|
199
206
|
text: TextInput,
|
|
200
207
|
email: EmailInput,
|
|
@@ -435,7 +442,7 @@ defineExpose({
|
|
|
435
442
|
</template>
|
|
436
443
|
|
|
437
444
|
<!-- Default field rendering -->
|
|
438
|
-
<component :is="getFieldComponent(field
|
|
445
|
+
<component :is="getFieldComponent(field)" v-else v-bind="getFieldProps(field, key)" />
|
|
439
446
|
</slot>
|
|
440
447
|
</div>
|
|
441
448
|
|
|
@@ -326,8 +326,8 @@ export const $ = {
|
|
|
326
326
|
|
|
327
327
|
select<T extends string = string>(
|
|
328
328
|
optionsOrLabel: SelectOptions<T> | string,
|
|
329
|
-
labelOrOptionsOrConfig?: string | SelectOptions<T> | (BaseFieldConfig & { searchable?: boolean }),
|
|
330
|
-
config?: BaseFieldConfig & { searchable?: boolean }
|
|
329
|
+
labelOrOptionsOrConfig?: string | SelectOptions<T> | (BaseFieldConfig & { searchable?: boolean, display?: 'btn', thin?: boolean, outline?: boolean }),
|
|
330
|
+
config?: BaseFieldConfig & { searchable?: boolean, display?: 'btn', thin?: boolean, outline?: boolean }
|
|
331
331
|
): FieldBuilder<T> {
|
|
332
332
|
// Label-first: $.select('Country', ['USA', 'Canada'])
|
|
333
333
|
if (typeof optionsOrLabel === 'string') {
|
|
@@ -341,8 +341,8 @@ export const $ = {
|
|
|
341
341
|
|
|
342
342
|
multiselect<T extends string = string>(
|
|
343
343
|
optionsOrLabel: SelectOptions<T> | string,
|
|
344
|
-
labelOrOptionsOrConfig?: string | SelectOptions<T> | (BaseFieldConfig & { searchable?: boolean }),
|
|
345
|
-
config?: BaseFieldConfig & { searchable?: boolean }
|
|
344
|
+
labelOrOptionsOrConfig?: string | SelectOptions<T> | (BaseFieldConfig & { searchable?: boolean, display?: 'btn', thin?: boolean, outline?: boolean }),
|
|
345
|
+
config?: BaseFieldConfig & { searchable?: boolean, display?: 'btn', thin?: boolean, outline?: boolean }
|
|
346
346
|
): FieldBuilder<T[]> {
|
|
347
347
|
// Label-first: $.multiselect('Tags', ['tech', 'news'])
|
|
348
348
|
if (typeof optionsOrLabel === 'string') {
|