@privyid/persona 0.19.0 → 0.21.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/components/accordion/Accordion.vue +118 -0
- package/dist/components/accordion/AccordionItem.vue +184 -0
- package/dist/components/accordion/index.d.ts +14 -0
- package/dist/components/accordion/index.mjs +10 -0
- package/dist/components/avatar/Avatar.vue.d.ts +2 -2
- package/dist/components/badge/Badge.vue.d.ts +1 -1
- package/dist/components/breadcrumbs/BreadcrumbItem.vue +3 -2
- package/dist/components/button/Button.vue +102 -65
- package/dist/components/calendar/Calendar.vue.d.ts +2 -2
- package/dist/components/calendar/adapter/adapter.mjs +1 -1
- package/dist/components/camera/Camera.vue.d.ts +4 -4
- package/dist/components/caption/Caption.vue +30 -2
- package/dist/components/card/Card.vue +9 -1
- package/dist/components/card/Card.vue.d.ts +1 -1
- package/dist/components/card/CardSection.vue.d.ts +1 -1
- package/dist/components/checkbox/Checkbox.vue.d.ts +6 -6
- package/dist/components/contextual-bar/ContextualBar.vue.d.ts +1 -1
- package/dist/components/cropper/Cropper.vue.d.ts +2 -2
- package/dist/components/datepicker/Datepicker.vue.d.ts +2 -2
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/dot/Dot.vue.d.ts +1 -1
- package/dist/components/dropdown/Dropdown.vue +5 -0
- package/dist/components/dropdown/Dropdown.vue.d.ts +6 -6
- package/dist/components/dropdown/DropdownItem.vue +1 -1
- package/dist/components/dropdown/index.d.ts +1 -1
- package/dist/components/dropdown-subitem/DropdownSubitem.vue.d.ts +1 -1
- package/dist/components/dropzone/Dropzone.vue.d.ts +2 -2
- package/dist/components/filterbar/pinned/PinnedDate.vue.d.ts +2 -2
- package/dist/components/filterbar/pinned/PinnedSelect.vue.d.ts +2 -2
- package/dist/components/filterbar/pinned/PinnedToggle.vue.d.ts +6 -6
- package/dist/components/form-group/FormGroup.vue +92 -65
- package/dist/components/global/store.d.ts +27 -0
- package/dist/components/global/store.mjs +31 -0
- package/dist/components/global/utils/queue.mjs +2 -0
- package/dist/components/heading/Heading.vue +26 -2
- package/dist/components/heading/index.d.ts +1 -1
- package/dist/components/input/Input.vue.d.ts +2 -2
- package/dist/components/input/utils/accept.d.ts +19 -19
- package/dist/components/input-file/InputFile.vue.d.ts +2 -2
- package/dist/components/input-password/InputPassword.vue.d.ts +1 -3
- package/dist/components/input-pin/InputPin.vue.d.ts +1 -1
- package/dist/components/input-range/InputRange.vue.d.ts +1 -1
- package/dist/components/label/Label.vue.d.ts +1 -1
- package/dist/components/list-group/ListGroupItem.vue +1 -1
- package/dist/components/main/Main.vue +47 -44
- package/dist/components/modal/Modal.vue +1 -1
- package/dist/components/modal/Modal.vue.d.ts +2 -2
- package/dist/components/modal/index.d.ts +1 -0
- package/dist/components/modal/index.mjs +0 -0
- package/dist/components/nav/Nav.vue +6 -4
- package/dist/components/nav/NavItem.vue +1 -1
- package/dist/components/nav/NavItem.vue.d.ts +2 -2
- package/dist/components/nav/NavItemDropdown.vue.d.ts +2 -2
- package/dist/components/navbar/NavbarBrand.vue +1 -1
- package/dist/components/navbar-menu/NavbarNavMenu.vue +1 -1
- package/dist/components/navbar-menu/NavbarNavMenu.vue.d.ts +3 -3
- package/dist/components/pagination/index.mjs +3 -1
- package/dist/components/pdf-object/PdfObject.vue +1 -1
- package/dist/components/pdf-text/PdfText.vue +6 -2
- package/dist/components/pdf-text/PdfText.vue.d.ts +3 -2
- package/dist/components/pdf-text/utils/text-to-image.d.ts +1 -1
- package/dist/components/pdf-text/utils/text-to-image.mjs +19 -17
- package/dist/components/pdf-viewer/PdfError.vue +12 -7
- package/dist/components/pdf-viewer/PdfError.vue.d.ts +3 -11
- package/dist/components/pdf-viewer/PdfNavigation.vue +5 -13
- package/dist/components/pdf-viewer/PdfNavigation.vue.d.ts +4 -4
- package/dist/components/pdf-viewer/PdfViewer.vue +42 -5
- package/dist/components/pdf-viewer/PdfViewer.vue.d.ts +4 -1
- package/dist/components/pdf-viewer/index.d.ts +8 -0
- package/dist/components/pdf-viewer/index.mjs +6 -1
- package/dist/components/pdf-viewer/utils/pdfjs.d.ts +8 -0
- package/dist/components/pdf-viewer/utils/pdfjs.mjs +40 -0
- package/dist/components/pdf-viewer/utils/use-sticky.mjs +7 -3
- package/dist/components/pdf-viewer/utils/use-viewer.d.ts +0 -2
- package/dist/components/pdf-viewer/utils/use-viewer.mjs +12 -18
- package/dist/components/progressbar/Progressbar.vue +110 -0
- package/dist/components/progressbar/Progressbar.vue.d.ts +63 -0
- package/dist/components/progressbar/index.d.ts +7 -0
- package/dist/components/progressbar/index.mjs +11 -0
- package/dist/components/radio/Radio.vue.d.ts +4 -4
- package/dist/components/ringbar/Ringbar.vue +148 -0
- package/dist/components/ringbar/Ringbar.vue.d.ts +66 -0
- package/dist/components/select/Select.vue.d.ts +3 -3
- package/dist/components/sheet/Sheet.vue +231 -0
- package/dist/components/sidebar/SidebarBrand.vue +1 -1
- package/dist/components/sidebar/SidebarNav.vue +6 -4
- package/dist/components/signature-draw/SignatureDrawMobile.vue +6 -1
- package/dist/components/signature-draw/utils/canvas.d.ts +1 -1
- package/dist/components/signature-draw/utils/canvas.mjs +5 -3
- package/dist/components/signature-draw/utils/smooth-line.d.ts +1 -1
- package/dist/components/signature-draw/utils/smooth-line.mjs +6 -1
- package/dist/components/signature-draw/utils/straight-line.mjs +2 -0
- package/dist/components/signature-text/SignatureText.vue +10 -7
- package/dist/components/signature-text/SignatureText.vue.d.ts +1 -0
- package/dist/components/signature-text/utils/generate-text.d.ts +1 -1
- package/dist/components/signature-text/utils/generate-text.mjs +3 -8
- package/dist/components/spread/Spread.vue +1 -1
- package/dist/components/spread/Spread.vue.d.ts +2 -2
- package/dist/components/steps/utils/hook.mjs +1 -0
- package/dist/components/subheading/Subheading.vue +36 -2
- package/dist/components/table/Table.vue +53 -9
- package/dist/components/table/Table.vue.d.ts +21 -3
- package/dist/components/table/index.d.ts +23 -6
- package/dist/components/table/index.mjs +18 -1
- package/dist/components/table-flex/TableFlex.vue +334 -0
- package/dist/components/table-static/TableStatic.vue +333 -0
- package/dist/components/tabs/Tab.vue.d.ts +1 -1
- package/dist/components/text/Text.vue +46 -13
- package/dist/components/text/Text.vue.d.ts +2 -2
- package/dist/components/toggle/Toggle.vue.d.ts +7 -7
- package/dist/components/tour/Tour.vue.d.ts +2 -4
- package/dist/components/tour/core/base.mjs +11 -0
- package/dist/components/tour/core/step/conditional.mjs +1 -0
- package/dist/components/tour/core/step/visit.mjs +1 -4
- package/dist/components/tour/core/step.mjs +1 -4
- package/dist/components/tour/core/tour.mjs +4 -0
- package/dist/components/utils/base64.mjs +3 -3
- package/dist/core/index.d.ts +5 -1
- package/dist/core/index.mjs +20 -3
- package/dist/module.d.mts +17 -0
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +0 -1
- package/dist/runtime/plugin.mjs +10 -3
- package/dist/types.d.mts +15 -0
- package/package.json +21 -21
- package/dist/components/button/Button.vue.d.ts +0 -74
- package/dist/components/form-group/FormGroup.vue.d.ts +0 -61
- package/dist/components/global/context.d.ts +0 -24
- package/dist/components/global/context.mjs +0 -18
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
data-testid="table-static"
|
|
4
|
+
class="table-static"
|
|
5
|
+
:class="classNames">
|
|
6
|
+
<table
|
|
7
|
+
class="table-static__table"
|
|
8
|
+
:class="tableClass">
|
|
9
|
+
<thead
|
|
10
|
+
v-if="!noLabel"
|
|
11
|
+
class="table-static__headers">
|
|
12
|
+
<tr :class="trClass">
|
|
13
|
+
<th
|
|
14
|
+
v-if="draggable"
|
|
15
|
+
class="table-static__header table-static__drag" />
|
|
16
|
+
<th
|
|
17
|
+
v-if="selectable"
|
|
18
|
+
class="table-static__header table-static__checkbox">
|
|
19
|
+
<Checkbox
|
|
20
|
+
v-model="selectAll"
|
|
21
|
+
data-testid="table-static-select-all"
|
|
22
|
+
:indeterminate="indeterminate" />
|
|
23
|
+
</th>
|
|
24
|
+
<th
|
|
25
|
+
v-for="field in fields"
|
|
26
|
+
:key="field.key"
|
|
27
|
+
class="table-static__header"
|
|
28
|
+
data-testid="table-static-header"
|
|
29
|
+
:style="field.width ? { width: withUnit(field.width) } : {}"
|
|
30
|
+
:class="field.thClass"
|
|
31
|
+
:data-header="field.key">
|
|
32
|
+
<slot
|
|
33
|
+
:name="`head(${field.key})`"
|
|
34
|
+
:label="field.label"
|
|
35
|
+
:field="field">
|
|
36
|
+
{{ field.label }}
|
|
37
|
+
</slot>
|
|
38
|
+
</th>
|
|
39
|
+
</tr>
|
|
40
|
+
</thead>
|
|
41
|
+
<Draggable
|
|
42
|
+
v-if="items.length > 0"
|
|
43
|
+
v-model="rows"
|
|
44
|
+
class="table-static__body"
|
|
45
|
+
handle=".table-static__drag"
|
|
46
|
+
item-key="_key"
|
|
47
|
+
tag="tbody"
|
|
48
|
+
:disabled="!draggable">
|
|
49
|
+
<template #item="{ element, index }">
|
|
50
|
+
<tr
|
|
51
|
+
class="table-static__row"
|
|
52
|
+
:class="trClass"
|
|
53
|
+
data-role="row">
|
|
54
|
+
<slot
|
|
55
|
+
name="row"
|
|
56
|
+
:item="element"
|
|
57
|
+
:index="index">
|
|
58
|
+
<td
|
|
59
|
+
v-if="draggable"
|
|
60
|
+
class="table-static__cell table-static__drag"
|
|
61
|
+
data-testid="table-static-drag-handle">
|
|
62
|
+
<IconDrag />
|
|
63
|
+
</td>
|
|
64
|
+
<td
|
|
65
|
+
v-if="selectable"
|
|
66
|
+
class="table-static__cell table-static__checkbox">
|
|
67
|
+
<Checkbox
|
|
68
|
+
v-model="model"
|
|
69
|
+
data-testid="table-static-select"
|
|
70
|
+
:value="withoutKey(element)"
|
|
71
|
+
:disabled="element._selectable === false" />
|
|
72
|
+
</td>
|
|
73
|
+
<td
|
|
74
|
+
v-for="field in fields"
|
|
75
|
+
:key="field.key"
|
|
76
|
+
class="table-static__cell"
|
|
77
|
+
data-testid="table-static-cell"
|
|
78
|
+
:class="field.tdClass"
|
|
79
|
+
:data-cell="field.key">
|
|
80
|
+
<slot
|
|
81
|
+
:name="`cell(${field.key})`"
|
|
82
|
+
:index="index"
|
|
83
|
+
:item="element">
|
|
84
|
+
{{ field.formatter(element[field.key], element) }}
|
|
85
|
+
</slot>
|
|
86
|
+
</td>
|
|
87
|
+
</slot>
|
|
88
|
+
</tr>
|
|
89
|
+
</template>
|
|
90
|
+
</Draggable>
|
|
91
|
+
<tbody
|
|
92
|
+
v-else
|
|
93
|
+
class="table-static__body">
|
|
94
|
+
<tr
|
|
95
|
+
class="table-static__row">
|
|
96
|
+
<td
|
|
97
|
+
:colspan="fields.length"
|
|
98
|
+
data-testid="table-static-empty"
|
|
99
|
+
class="table-static__cell table-static__cell--empty datatable__state-empty">
|
|
100
|
+
<slot name="empty">
|
|
101
|
+
<span class="flex items-center justify-center text-subtle dark:text-dark-subtle">
|
|
102
|
+
{{ emptyLabel }}
|
|
103
|
+
</span>
|
|
104
|
+
</slot>
|
|
105
|
+
</td>
|
|
106
|
+
</tr>
|
|
107
|
+
</tbody>
|
|
108
|
+
</table>
|
|
109
|
+
</div>
|
|
110
|
+
</template>
|
|
111
|
+
|
|
112
|
+
<script lang="ts" setup generic="T extends Record<string, unknown>">
|
|
113
|
+
import {
|
|
114
|
+
computed,
|
|
115
|
+
HTMLAttributes,
|
|
116
|
+
PropType,
|
|
117
|
+
VNode,
|
|
118
|
+
} from 'vue-demi'
|
|
119
|
+
import {
|
|
120
|
+
ApperanceVariant,
|
|
121
|
+
TableField,
|
|
122
|
+
withKey,
|
|
123
|
+
withoutKey,
|
|
124
|
+
withUnit,
|
|
125
|
+
} from '../table'
|
|
126
|
+
import Checkbox from '../checkbox/Checkbox.vue'
|
|
127
|
+
import { useVModel } from '../input'
|
|
128
|
+
import IconDrag from '@privyid/persona-icon/vue/draggable/20.vue'
|
|
129
|
+
import Draggable from 'vuedraggable'
|
|
130
|
+
|
|
131
|
+
const props = defineProps({
|
|
132
|
+
apperance: {
|
|
133
|
+
type : String as PropType<ApperanceVariant>,
|
|
134
|
+
default: 'table',
|
|
135
|
+
},
|
|
136
|
+
modelValue: {
|
|
137
|
+
type : Array as PropType<T[]>,
|
|
138
|
+
default: () => ([]),
|
|
139
|
+
},
|
|
140
|
+
fields: {
|
|
141
|
+
type : Array as PropType<TableField<T>[]>,
|
|
142
|
+
default: () => ([]),
|
|
143
|
+
},
|
|
144
|
+
items: {
|
|
145
|
+
type : Array as PropType<T[]>,
|
|
146
|
+
default: () => ([]),
|
|
147
|
+
},
|
|
148
|
+
selectable: {
|
|
149
|
+
type : Boolean,
|
|
150
|
+
default: false,
|
|
151
|
+
},
|
|
152
|
+
draggable: {
|
|
153
|
+
type : Boolean,
|
|
154
|
+
default: false,
|
|
155
|
+
},
|
|
156
|
+
emptyLabel: {
|
|
157
|
+
type : String,
|
|
158
|
+
default: 'There are no records to show',
|
|
159
|
+
},
|
|
160
|
+
noLabel: {
|
|
161
|
+
type : Boolean,
|
|
162
|
+
default: false,
|
|
163
|
+
},
|
|
164
|
+
tableClass: {
|
|
165
|
+
type: [
|
|
166
|
+
String,
|
|
167
|
+
Array,
|
|
168
|
+
Object,
|
|
169
|
+
] as PropType<HTMLAttributes['class']>,
|
|
170
|
+
default: undefined,
|
|
171
|
+
},
|
|
172
|
+
trClass: {
|
|
173
|
+
type: [
|
|
174
|
+
String,
|
|
175
|
+
Array,
|
|
176
|
+
Object,
|
|
177
|
+
] as PropType<HTMLAttributes['class']>,
|
|
178
|
+
default: undefined,
|
|
179
|
+
},
|
|
180
|
+
})
|
|
181
|
+
|
|
182
|
+
const model = useVModel(props)
|
|
183
|
+
|
|
184
|
+
// eslint-disable-next-line func-call-spacing
|
|
185
|
+
const emit = defineEmits<{
|
|
186
|
+
(event: 'update:modelValue', items: T[]): void,
|
|
187
|
+
(event: 'update:items', items: T[]): void,
|
|
188
|
+
}>()
|
|
189
|
+
|
|
190
|
+
const rows = computed<T[]>({
|
|
191
|
+
get () {
|
|
192
|
+
return props.items.map((item) => {
|
|
193
|
+
return withKey(item) as T
|
|
194
|
+
})
|
|
195
|
+
},
|
|
196
|
+
set (items) {
|
|
197
|
+
emit('update:items', items)
|
|
198
|
+
},
|
|
199
|
+
})
|
|
200
|
+
|
|
201
|
+
const classNames = computed(() => {
|
|
202
|
+
const result: string[] = []
|
|
203
|
+
|
|
204
|
+
if (props.apperance)
|
|
205
|
+
result.push(`table-static--${props.apperance}`)
|
|
206
|
+
|
|
207
|
+
if (props.selectable)
|
|
208
|
+
result.push('table-static--selectable')
|
|
209
|
+
|
|
210
|
+
if (props.draggable)
|
|
211
|
+
result.push('table-static--draggable')
|
|
212
|
+
|
|
213
|
+
if (props.noLabel)
|
|
214
|
+
result.push('table-static--no-label')
|
|
215
|
+
|
|
216
|
+
return result
|
|
217
|
+
})
|
|
218
|
+
|
|
219
|
+
const selectableRows = computed(() => {
|
|
220
|
+
return props.items.filter((item) => item._selectable !== false)
|
|
221
|
+
})
|
|
222
|
+
|
|
223
|
+
const selectAll = computed({
|
|
224
|
+
get () {
|
|
225
|
+
return model.value.length === selectableRows.value.length
|
|
226
|
+
},
|
|
227
|
+
set (value) {
|
|
228
|
+
if (selectAll.value !== value) {
|
|
229
|
+
model.value = value
|
|
230
|
+
? selectableRows.value.map((item) => withoutKey(item)) as T[]
|
|
231
|
+
: []
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
})
|
|
235
|
+
|
|
236
|
+
const indeterminate = computed(() => {
|
|
237
|
+
return model.value.length > 0
|
|
238
|
+
&& model.value.length < selectableRows.value.length
|
|
239
|
+
})
|
|
240
|
+
|
|
241
|
+
defineSlots<{
|
|
242
|
+
empty:() => VNode,
|
|
243
|
+
row:(props: { index: number, item: T, [key: string]: any }) => VNode,
|
|
244
|
+
[colKey: `head(${string})`]:(props: { label: string, field: TableField<T>, [key: string]: any }) => VNode,
|
|
245
|
+
[colKey: `cell(${string})`]:(props: { index: number, item: T, [key: string]: any }) => VNode,
|
|
246
|
+
}>()
|
|
247
|
+
</script>
|
|
248
|
+
|
|
249
|
+
<style lang="postcss">
|
|
250
|
+
.table-static {
|
|
251
|
+
--p-table-bg: theme(backgroundColor.default.DEFAULT);
|
|
252
|
+
--p-table-bg-dark: theme(backgroundColor.dark.default.DEFAULT);
|
|
253
|
+
--p-table-header-bg: var(--p-table-bg);
|
|
254
|
+
--p-table-header-bg-dark: var(--p-table-bg-dark);
|
|
255
|
+
--p-table-border: theme(borderColor.default.DEFAULT);
|
|
256
|
+
--p-table-border-dark: theme(borderColor.dark.default.DEFAULT);
|
|
257
|
+
|
|
258
|
+
@apply w-full overflow-auto overscroll-contain;
|
|
259
|
+
|
|
260
|
+
&__table {
|
|
261
|
+
@apply min-w-full table;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
&__headers {
|
|
265
|
+
@apply pt-4 bg-[color:var(--p-table-bg)];
|
|
266
|
+
@apply dark:bg-[color:var(--p-table-bg-dark)];
|
|
267
|
+
|
|
268
|
+
.table-static__header {
|
|
269
|
+
@apply px-3 text-xs border-x-0;
|
|
270
|
+
|
|
271
|
+
&.table-static__drag,
|
|
272
|
+
&.table-static__checkbox {
|
|
273
|
+
@apply w-[1%];
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
+ .table-static__body {
|
|
278
|
+
@apply pt-2;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
& &__row > &__cell {
|
|
283
|
+
@apply ml-2 py-4 px-3 text-sm text-default whitespace-pre;
|
|
284
|
+
@apply dark:text-dark-default;
|
|
285
|
+
|
|
286
|
+
&.table-static__drag {
|
|
287
|
+
@apply cursor-grabbing md:mx-3;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
& &__headers &__header {
|
|
292
|
+
@apply bg-[color:var(--p-table-header-bg)];
|
|
293
|
+
@apply dark:bg-[color:var(--p-table-header-bg-dark)];
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
& &__body > &__row {
|
|
297
|
+
@apply border-t border-[color:var(--p-table-border)] bg-[color:var(--p-table-bg)];
|
|
298
|
+
@apply dark:border-[color:var(--p-table-border-dark)] dark:bg-[color:var(--p-table-bg-dark)];
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
&--no-label {
|
|
302
|
+
.table-static__body > .table-static__row:first-child {
|
|
303
|
+
@apply border-t-0;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
&--table {
|
|
308
|
+
.table-static__row .table-static__cell,
|
|
309
|
+
.table-static__headers .table-static__header {
|
|
310
|
+
@apply border-0;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
&--card {
|
|
315
|
+
.table-static__table {
|
|
316
|
+
@apply border-separate border-spacing-y-2;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.table-static__row .table-static__cell,
|
|
320
|
+
.table-static__headers .table-static__header {
|
|
321
|
+
@apply border-x-0 border-y;
|
|
322
|
+
|
|
323
|
+
&:first-child {
|
|
324
|
+
@apply rounded-l border-l;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
&:last-child {
|
|
328
|
+
@apply rounded-r border-r;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
</style>
|
|
@@ -35,8 +35,7 @@ export default defineComponent({
|
|
|
35
35
|
},
|
|
36
36
|
setup(props) {
|
|
37
37
|
const hyperlink = computed(() => {
|
|
38
|
-
|
|
39
|
-
return tag;
|
|
38
|
+
return props.href ? "a" : "span";
|
|
40
39
|
});
|
|
41
40
|
const classNames = computed(() => {
|
|
42
41
|
const result = [""];
|
|
@@ -62,19 +61,30 @@ export default defineComponent({
|
|
|
62
61
|
|
|
63
62
|
<style lang="postcss">
|
|
64
63
|
.freetext {
|
|
65
|
-
&--hyperlink {
|
|
66
|
-
@apply underline decoration-solid text-info;
|
|
67
|
-
@apply dark:text-dark-info;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
64
|
/**
|
|
71
65
|
* Weight variant
|
|
72
66
|
* of text
|
|
73
67
|
*/
|
|
68
|
+
&--thin {
|
|
69
|
+
@apply font-thin;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&--extralight {
|
|
73
|
+
@apply font-extralight;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&--light {
|
|
77
|
+
@apply font-light;
|
|
78
|
+
}
|
|
79
|
+
|
|
74
80
|
&--normal {
|
|
75
81
|
@apply font-normal;
|
|
76
82
|
}
|
|
77
83
|
|
|
84
|
+
&--semibold {
|
|
85
|
+
@apply font-semibold;
|
|
86
|
+
}
|
|
87
|
+
|
|
78
88
|
&--medium {
|
|
79
89
|
@apply font-medium;
|
|
80
90
|
}
|
|
@@ -83,6 +93,14 @@ export default defineComponent({
|
|
|
83
93
|
@apply font-bold;
|
|
84
94
|
}
|
|
85
95
|
|
|
96
|
+
&--extrabold {
|
|
97
|
+
@apply font-extrabold;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&--black {
|
|
101
|
+
@apply font-black;
|
|
102
|
+
}
|
|
103
|
+
|
|
86
104
|
/**
|
|
87
105
|
* Text transform
|
|
88
106
|
* of text
|
|
@@ -103,6 +121,14 @@ export default defineComponent({
|
|
|
103
121
|
@apply uppercase;
|
|
104
122
|
}
|
|
105
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Hyperlink style
|
|
126
|
+
*/
|
|
127
|
+
&--hyperlink {
|
|
128
|
+
@apply underline decoration-solid text-info;
|
|
129
|
+
@apply dark:text-dark-info;
|
|
130
|
+
}
|
|
131
|
+
|
|
106
132
|
/**
|
|
107
133
|
* Heading Style
|
|
108
134
|
*/
|
|
@@ -130,6 +156,7 @@ export default defineComponent({
|
|
|
130
156
|
*/
|
|
131
157
|
&--subheading {
|
|
132
158
|
@apply text-base font-medium;
|
|
159
|
+
|
|
133
160
|
}
|
|
134
161
|
&--subheading2 {
|
|
135
162
|
@apply text-sm tracking-wide font-medium;
|
|
@@ -162,26 +189,32 @@ export default defineComponent({
|
|
|
162
189
|
@apply text-xs;
|
|
163
190
|
}
|
|
164
191
|
&--caption2 {
|
|
165
|
-
@apply text-tn;
|
|
192
|
+
@apply text-tn font-medium;
|
|
166
193
|
}
|
|
167
194
|
|
|
168
195
|
/**
|
|
169
196
|
* Form Label Style
|
|
170
197
|
*/
|
|
171
198
|
&--formlabel {
|
|
172
|
-
@apply font-medium text-sm tracking-wide
|
|
173
|
-
@apply dark:text-dark-subtle;
|
|
199
|
+
@apply font-medium text-sm tracking-wide;
|
|
174
200
|
}
|
|
175
201
|
&--formlabel2 {
|
|
176
|
-
@apply font-
|
|
177
|
-
|
|
202
|
+
@apply font-bold text-xs leading-tightest;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&--formlabel,
|
|
206
|
+
&--formlabel2 {
|
|
207
|
+
&:not([class^='text-'], [class*='text-']) {
|
|
208
|
+
@apply text-subtle;
|
|
209
|
+
@apply dark:text-dark-subtle;
|
|
210
|
+
}
|
|
178
211
|
}
|
|
179
212
|
|
|
180
213
|
/**
|
|
181
214
|
* Overline Style
|
|
182
215
|
*/
|
|
183
216
|
&--overline {
|
|
184
|
-
@apply text-tn tracking-widest uppercase;
|
|
217
|
+
@apply text-tn font-medium tracking-widest uppercase;
|
|
185
218
|
}
|
|
186
219
|
}
|
|
187
220
|
</style>
|
|
@@ -19,8 +19,8 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
19
19
|
default: string;
|
|
20
20
|
};
|
|
21
21
|
}, {
|
|
22
|
-
hyperlink: import("vue-demi").ComputedRef<
|
|
23
|
-
classNames: import("vue-demi").ComputedRef<
|
|
22
|
+
hyperlink: import("vue-demi").ComputedRef<"a" | "span">;
|
|
23
|
+
classNames: import("vue-demi").ComputedRef<string[]>;
|
|
24
24
|
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
25
25
|
variant: {
|
|
26
26
|
type: PropType<StyleVariant>;
|
|
@@ -6,15 +6,15 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
8
|
modelValue: {
|
|
9
|
-
type: (NumberConstructor | StringConstructor |
|
|
9
|
+
type: (NumberConstructor | StringConstructor | BooleanConstructor | ObjectConstructor | DateConstructor | ArrayConstructor)[];
|
|
10
10
|
default: boolean;
|
|
11
11
|
};
|
|
12
12
|
value: {
|
|
13
|
-
type: (NumberConstructor | StringConstructor |
|
|
13
|
+
type: (NumberConstructor | StringConstructor | BooleanConstructor | ObjectConstructor | DateConstructor | ArrayConstructor)[];
|
|
14
14
|
default: boolean;
|
|
15
15
|
};
|
|
16
16
|
uncheckedValue: {
|
|
17
|
-
type: (NumberConstructor | StringConstructor |
|
|
17
|
+
type: (NumberConstructor | StringConstructor | BooleanConstructor | ObjectConstructor | DateConstructor | ArrayConstructor)[];
|
|
18
18
|
default: boolean;
|
|
19
19
|
};
|
|
20
20
|
checked: {
|
|
@@ -51,15 +51,15 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
51
51
|
default: string;
|
|
52
52
|
};
|
|
53
53
|
modelValue: {
|
|
54
|
-
type: (NumberConstructor | StringConstructor |
|
|
54
|
+
type: (NumberConstructor | StringConstructor | BooleanConstructor | ObjectConstructor | DateConstructor | ArrayConstructor)[];
|
|
55
55
|
default: boolean;
|
|
56
56
|
};
|
|
57
57
|
value: {
|
|
58
|
-
type: (NumberConstructor | StringConstructor |
|
|
58
|
+
type: (NumberConstructor | StringConstructor | BooleanConstructor | ObjectConstructor | DateConstructor | ArrayConstructor)[];
|
|
59
59
|
default: boolean;
|
|
60
60
|
};
|
|
61
61
|
uncheckedValue: {
|
|
62
|
-
type: (NumberConstructor | StringConstructor |
|
|
62
|
+
type: (NumberConstructor | StringConstructor | BooleanConstructor | ObjectConstructor | DateConstructor | ArrayConstructor)[];
|
|
63
63
|
default: boolean;
|
|
64
64
|
};
|
|
65
65
|
checked: {
|
|
@@ -97,8 +97,8 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
97
97
|
readonly: boolean;
|
|
98
98
|
uncheckedValue: string | number | boolean | Record<string, any> | unknown[] | Date;
|
|
99
99
|
checked: boolean;
|
|
100
|
+
noLabel: boolean;
|
|
100
101
|
checkedLabel: string;
|
|
101
102
|
uncheckedLabel: string;
|
|
102
|
-
noLabel: boolean;
|
|
103
103
|
}, {}>;
|
|
104
104
|
export default _default;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import TourDialog from './TourDialog.vue';
|
|
2
|
-
type TourDialogProps = Partial<InstanceType<typeof TourDialog>['$props']>;
|
|
3
1
|
declare const _default: import("vue-demi").DefineComponent<{}, {
|
|
4
2
|
isShow: import("vue-demi").Ref<boolean>;
|
|
5
3
|
dialog: import("vue-demi").ShallowRef<any>;
|
|
6
4
|
target: import("vue-demi").ShallowRef<HTMLElement | undefined>;
|
|
7
|
-
show: (targetEl: HTMLElement, options:
|
|
5
|
+
show: (targetEl: HTMLElement, options: any) => void;
|
|
8
6
|
hide: () => void;
|
|
9
|
-
config: import("vue-demi").ShallowRef<
|
|
7
|
+
config: import("vue-demi").ShallowRef<any>;
|
|
10
8
|
}, {}, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{}>>, {}, {}>;
|
|
11
9
|
export default _default;
|
|
@@ -6,6 +6,17 @@ export var TourDirection = /* @__PURE__ */ ((TourDirection2) => {
|
|
|
6
6
|
return TourDirection2;
|
|
7
7
|
})(TourDirection || {});
|
|
8
8
|
export class AbstractTour {
|
|
9
|
+
name;
|
|
10
|
+
/**
|
|
11
|
+
* Step direction, 1 for forward (next), -1 for backward (prev)
|
|
12
|
+
*/
|
|
13
|
+
direction;
|
|
14
|
+
parent;
|
|
15
|
+
options;
|
|
16
|
+
onNextHooks;
|
|
17
|
+
onPrevHooks;
|
|
18
|
+
runOnPrevHooks;
|
|
19
|
+
runOnNextHooks;
|
|
9
20
|
constructor(options) {
|
|
10
21
|
this.direction = 1 /* FORWARD */;
|
|
11
22
|
this.name = options?.name ?? Symbol("TourID");
|
|
@@ -2,10 +2,7 @@ import { useRouter } from "../../../global/router.mjs";
|
|
|
2
2
|
import { TourDirection } from "../base.mjs";
|
|
3
3
|
import { AbstractStep } from "../step.mjs";
|
|
4
4
|
export default class StepVisit extends AbstractStep {
|
|
5
|
-
|
|
6
|
-
super(...arguments);
|
|
7
|
-
this.lastURL = "";
|
|
8
|
-
}
|
|
5
|
+
lastURL = "";
|
|
9
6
|
async run() {
|
|
10
7
|
const router = useRouter();
|
|
11
8
|
const options = this.getOptions();
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { AbstractTour, TourDirection } from "./base.mjs";
|
|
2
2
|
export class AbstractStep extends AbstractTour {
|
|
3
|
-
|
|
4
|
-
super(...arguments);
|
|
5
|
-
this.cleanFns = [];
|
|
6
|
-
}
|
|
3
|
+
cleanFns = [];
|
|
7
4
|
async dispose() {
|
|
8
5
|
return await Promise.allSettled(this.cleanFns.map((clean) => clean()));
|
|
9
6
|
}
|
|
@@ -26,10 +26,10 @@ export function fromBase64(dataurl, filename, mimeType) {
|
|
|
26
26
|
const [meta, body] = dataurl.split(",");
|
|
27
27
|
const mime = mimeType ?? meta.match(/:(.*?);/)[1];
|
|
28
28
|
const buffer = window.atob(body);
|
|
29
|
-
const
|
|
29
|
+
const uint8 = new Uint8Array(buffer.length);
|
|
30
30
|
for (let i = 0; i < buffer.length; i++)
|
|
31
|
-
|
|
32
|
-
return new globalThis.File([
|
|
31
|
+
uint8[i] = buffer.codePointAt(i);
|
|
32
|
+
return new globalThis.File([uint8], name, { type: mime });
|
|
33
33
|
} catch (error) {
|
|
34
34
|
if (import.meta.env.DEV)
|
|
35
35
|
console.warn(error);
|
package/dist/core/index.d.ts
CHANGED
|
@@ -13,9 +13,10 @@ export { toBase64, fromBase64, } from '../components/utils/base64';
|
|
|
13
13
|
export { default as CaptureAdapter, } from '../components/camera/adapter/capture';
|
|
14
14
|
export { default as LivenessAdapter, } from '../components/camera/adapter/liveness';
|
|
15
15
|
export { default as QrCodeAdapter, } from '../components/camera/adapter/qr-code';
|
|
16
|
+
export { defineAdapter, } from '../components/camera/adapter/adapter';
|
|
16
17
|
export { defineFilter, } from '../components/filterbar';
|
|
17
18
|
export { markdown, } from '../components/markdown';
|
|
18
|
-
export {
|
|
19
|
+
export { useStore, initStore, createStore, setStore, setLang, getLang, useLang, type State, } from '../components/global/store';
|
|
19
20
|
export { useRouter, installRouter, } from '../components/global/router';
|
|
20
21
|
export { createTour, } from '../components/tour';
|
|
21
22
|
export { usePasswordStrength, } from '../components/input-password';
|
|
@@ -23,3 +24,6 @@ export { usePreview, } from '../components/cropper';
|
|
|
23
24
|
export { usePdfContext, } from '../components/pdf-viewer';
|
|
24
25
|
export { defineNavigation, } from '../components/breadcrumbs';
|
|
25
26
|
export type { PdfHelipadResult, } from '../components/pdf-helipad';
|
|
27
|
+
export { useStep, } from '../components/steps';
|
|
28
|
+
export { defineAccordion, } from '../components/accordion';
|
|
29
|
+
export { useVModel, } from '../components/input';
|
package/dist/core/index.mjs
CHANGED
|
@@ -48,6 +48,9 @@ export {
|
|
|
48
48
|
export {
|
|
49
49
|
default as QrCodeAdapter
|
|
50
50
|
} from "../components/camera/adapter/qr-code";
|
|
51
|
+
export {
|
|
52
|
+
defineAdapter
|
|
53
|
+
} from "../components/camera/adapter/adapter";
|
|
51
54
|
export {
|
|
52
55
|
defineFilter
|
|
53
56
|
} from "../components/filterbar";
|
|
@@ -55,9 +58,14 @@ export {
|
|
|
55
58
|
markdown
|
|
56
59
|
} from "../components/markdown";
|
|
57
60
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
useStore,
|
|
62
|
+
initStore,
|
|
63
|
+
createStore,
|
|
64
|
+
setStore,
|
|
65
|
+
setLang,
|
|
66
|
+
getLang,
|
|
67
|
+
useLang
|
|
68
|
+
} from "../components/global/store";
|
|
61
69
|
export {
|
|
62
70
|
useRouter,
|
|
63
71
|
installRouter
|
|
@@ -77,3 +85,12 @@ export {
|
|
|
77
85
|
export {
|
|
78
86
|
defineNavigation
|
|
79
87
|
} from "../components/breadcrumbs";
|
|
88
|
+
export {
|
|
89
|
+
useStep
|
|
90
|
+
} from "../components/steps";
|
|
91
|
+
export {
|
|
92
|
+
defineAccordion
|
|
93
|
+
} from "../components/accordion";
|
|
94
|
+
export {
|
|
95
|
+
useVModel
|
|
96
|
+
} from "../components/input";
|