@privyid/persona 0.3.0 → 0.5.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/LICENSE +21 -0
- package/README.md +4 -0
- package/dist/components/app/App.vue +3 -2
- package/dist/components/aspect-ratio/index.d.ts +3 -0
- package/dist/components/aspect-ratio/index.mjs +21 -0
- package/dist/components/aspect-ratio/utils/calculate-ratio.d.ts +7 -0
- package/dist/components/aspect-ratio/utils/calculate-ratio.mjs +10 -0
- package/dist/components/aspect-ratio/utils/resize-observer.d.ts +1 -0
- package/dist/components/aspect-ratio/utils/resize-observer.mjs +22 -0
- package/dist/components/avatar/Avatar.vue +1 -1
- package/dist/components/avatar/Avatar.vue.d.ts +1 -2
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/avatar/index.mjs +0 -0
- package/dist/components/badge/Badge.vue +33 -58
- package/dist/components/badge/Badge.vue.d.ts +1 -2
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/index.mjs +0 -0
- package/dist/components/banner/Banner.vue +23 -9
- package/dist/components/banner/Banner.vue.d.ts +1 -1
- package/dist/components/banner/index.d.ts +1 -0
- package/dist/components/banner/index.mjs +0 -0
- package/dist/components/button/Button.vue +74 -77
- package/dist/components/button/Button.vue.d.ts +1 -3
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.mjs +0 -0
- package/dist/components/button-group/ButtonGroup.vue +126 -63
- package/dist/components/button-group/ButtonGroup.vue.d.ts +1 -0
- package/dist/components/calendar/Calendar.vue +31 -30
- package/dist/components/calendar/adapter/adapter.d.ts +7 -0
- package/dist/components/calendar/adapter/adapter.mjs +8 -0
- package/dist/components/calendar/adapter/date.mjs +6 -4
- package/dist/components/calendar/adapter/month.mjs +2 -3
- package/dist/components/camera/Camera.vue +383 -0
- package/dist/components/camera/Camera.vue.d.ts +94 -0
- package/dist/components/camera/adapter/adapter.d.ts +41 -0
- package/dist/components/camera/adapter/adapter.mjs +3 -0
- package/dist/components/camera/adapter/capture.d.ts +5 -0
- package/dist/components/camera/adapter/capture.mjs +12 -0
- package/dist/components/camera/adapter/liveness.d.ts +5 -0
- package/dist/components/camera/adapter/liveness.mjs +46 -0
- package/dist/components/camera/adapter/qr-code.d.ts +2 -0
- package/dist/components/camera/adapter/qr-code.mjs +19 -0
- package/dist/components/camera/assets/shutter.wav +0 -0
- package/dist/components/camera/utils/motion.d.ts +29 -0
- package/dist/components/camera/utils/motion.mjs +88 -0
- package/dist/components/camera/utils/take-picture.d.ts +1 -0
- package/dist/components/camera/utils/take-picture.mjs +14 -0
- package/dist/components/caption/Caption.vue +60 -7
- package/dist/components/caption/Caption.vue.d.ts +27 -7
- package/dist/components/card/Card.vue +14 -8
- package/dist/components/card/Card.vue.d.ts +10 -1
- package/dist/components/card/CardSection.vue +2 -1
- package/dist/components/card/index.d.ts +1 -0
- package/dist/components/card/index.mjs +0 -0
- package/dist/components/chart/Chart.vue +6 -3
- package/dist/components/chart/Chart.vue.d.ts +1 -2
- package/dist/components/chart/index.d.ts +2 -0
- package/dist/components/chart/index.mjs +0 -0
- package/dist/components/chart/{use-chart.d.ts → utils/use-chart.d.ts} +0 -0
- package/dist/components/chart/{use-chart.mjs → utils/use-chart.mjs} +0 -0
- package/dist/components/checkbox/Checkbox.vue +47 -14
- package/dist/components/checkbox/Checkbox.vue.d.ts +0 -4
- package/dist/components/checkbox/{use-checkbox.d.ts → index.d.ts} +1 -1
- package/dist/components/checkbox/{use-checkbox.mjs → index.mjs} +0 -0
- package/dist/components/collapse/Collapse.vue +88 -0
- package/dist/components/collapse/Collapse.vue.d.ts +29 -0
- package/dist/components/contextual-bar/ContextualBar.vue +292 -0
- package/dist/components/contextual-bar/ContextualBar.vue.d.ts +78 -0
- package/dist/components/contextual-bar/assets/images/img-background-contextualbar.svg +14 -0
- package/dist/components/contextual-bar/assets/images/img-bg-contextualbar.svg +19 -0
- package/dist/components/contextual-bar/index.d.ts +1 -0
- package/dist/components/contextual-bar/index.mjs +0 -0
- package/dist/components/cropper/Cropper.vue +423 -0
- package/dist/components/cropper/Cropper.vue.d.ts +149 -0
- package/dist/components/cropper/assets/ps-neutral.png +0 -0
- package/dist/components/cropper/assets/sample-1.jpg +0 -0
- package/dist/components/cropper/utils/crop-image.d.ts +44 -0
- package/dist/components/cropper/utils/crop-image.mjs +43 -0
- package/dist/components/cropper/utils/use-pinch.d.ts +8 -0
- package/dist/components/cropper/utils/use-pinch.mjs +42 -0
- package/dist/components/cropper/utils/use-ratio.d.ts +9 -0
- package/dist/components/cropper/utils/use-ratio.mjs +24 -0
- package/dist/components/datepicker/Datepicker.vue +14 -5
- package/dist/components/datepicker/Datepicker.vue.d.ts +9 -0
- package/dist/components/dialog/Dialog.vue +2 -0
- package/dist/components/dialog/Dialog.vue.d.ts +1 -1
- package/dist/components/dialog/DialogFooter.vue +4 -2
- package/dist/components/dialog/DialogFooter.vue.d.ts +2 -1
- package/dist/components/dialog/index.d.ts +31 -6
- package/dist/components/dialog/index.mjs +32 -5
- package/dist/components/divider/Divider.vue +22 -2
- package/dist/components/dot/Dot.vue +27 -20
- package/dist/components/dot/Dot.vue.d.ts +10 -1
- package/dist/components/dot/index.d.ts +2 -0
- package/dist/components/dot/index.mjs +0 -0
- package/dist/components/dropdown/Dropdown.vue +73 -21
- package/dist/components/dropdown/Dropdown.vue.d.ts +16 -12
- package/dist/components/dropdown/DropdownItem.vue +3 -3
- package/dist/components/dropdown/index.d.ts +9 -0
- package/dist/components/dropdown/index.mjs +1 -0
- package/dist/components/dropdown/utils/use-focus.d.ts +1 -1
- package/dist/components/dropdown/utils/use-focus.mjs +4 -2
- package/dist/components/dropdown-subitem/DropdownSubitem.vue +12 -12
- package/dist/components/dropdown-subitem/DropdownSubitem.vue.d.ts +1 -1
- package/dist/components/dropdown-subitem/{use-dropdown-subitem.d.ts → index.d.ts} +0 -0
- package/dist/components/dropdown-subitem/{use-dropdown-subitem.mjs → index.mjs} +0 -0
- package/dist/components/dropzone/Dropzone.vue +202 -0
- package/dist/components/dropzone/Dropzone.vue.d.ts +93 -0
- package/dist/components/dropzone/index.d.ts +4 -0
- package/dist/components/dropzone/index.mjs +0 -0
- package/dist/components/dropzone/utils/accept.d.ts +1 -0
- package/dist/components/dropzone/utils/accept.mjs +17 -0
- package/dist/components/filterbar/Filterbar.vue +7 -5
- package/dist/components/filterbar/Filterbar.vue.d.ts +1 -1
- package/dist/components/filterbar/{use-filterbar.d.ts → index.d.ts} +1 -1
- package/dist/components/filterbar/{use-filterbar.mjs → index.mjs} +0 -0
- package/dist/components/filterbar/pinned/Date.vue +9 -7
- package/dist/components/filterbar/pinned/Date.vue.d.ts +1 -1
- package/dist/components/filterbar/pinned/Multiselect.vue +16 -13
- package/dist/components/filterbar/pinned/Multiselect.vue.d.ts +2 -2
- package/dist/components/filterbar/pinned/Select.vue +11 -8
- package/dist/components/filterbar/pinned/Select.vue.d.ts +2 -2
- package/dist/components/filterbar/pinned/Toggle.vue +2 -1
- package/dist/components/filterbar/pinned/Toggle.vue.d.ts +1 -1
- package/dist/components/form-group/FormGroup.vue +103 -0
- package/dist/components/form-group/FormGroup.vue.d.ts +61 -0
- package/dist/components/global/context.d.ts +24 -0
- package/dist/components/global/context.mjs +18 -0
- package/dist/components/global/router.d.ts +23 -0
- package/dist/components/global/router.mjs +7 -0
- package/dist/components/global/use-singleton.d.ts +17 -2
- package/dist/components/global/use-singleton.mjs +18 -10
- package/dist/components/heading/Heading.vue +50 -0
- package/dist/components/heading/Heading.vue.d.ts +19 -1
- package/dist/components/heading/index.d.ts +3 -0
- package/dist/components/heading/index.mjs +0 -0
- package/dist/components/input/Input.vue +119 -24
- package/dist/components/input/Input.vue.d.ts +38 -2
- package/dist/components/input/{use-input.d.ts → index.d.ts} +0 -0
- package/dist/components/input/{use-input.mjs → index.mjs} +0 -0
- package/dist/components/input-file/InputFile.vue +171 -0
- package/dist/components/input-file/InputFile.vue.d.ts +120 -0
- package/dist/components/input-group/InputGroup.vue +131 -0
- package/dist/components/input-group/InputGroup.vue.d.ts +45 -0
- package/dist/components/input-group/InputGroupAddon.vue +43 -0
- package/dist/components/input-password/InputPassword.vue +62 -0
- package/dist/components/input-password/InputPassword.vue.d.ts +5 -0
- package/dist/components/input-password/index.d.ts +2 -0
- package/dist/components/input-password/index.mjs +17 -0
- package/dist/components/input-pin/InputPin.vue +145 -0
- package/dist/components/input-pin/InputPin.vue.d.ts +64 -0
- package/dist/components/input-range/InputRange.vue +274 -0
- package/dist/components/input-range/InputRange.vue.d.ts +108 -0
- package/dist/components/input-range/utils/use-drag.d.ts +3 -0
- package/dist/components/input-range/utils/use-drag.mjs +19 -0
- package/dist/components/label/Label.vue +29 -41
- package/dist/components/label/Label.vue.d.ts +1 -1
- package/dist/components/markdown/index.d.ts +20 -0
- package/dist/components/markdown/index.mjs +15 -0
- package/dist/components/modal/Modal.vue +71 -5
- package/dist/components/modal/Modal.vue.d.ts +30 -0
- package/dist/components/nav/Nav.vue +16 -14
- package/dist/components/nav/Nav.vue.d.ts +3 -4
- package/dist/components/nav/NavForm.vue +19 -0
- package/dist/components/nav/NavItem.vue +14 -4
- package/dist/components/nav/NavItem.vue.d.ts +3 -4
- package/dist/components/nav/NavItemDropdown.vue +5 -1
- package/dist/components/nav/NavItemDropdown.vue.d.ts +9 -0
- package/dist/components/nav/NavSubItem.vue +5 -5
- package/dist/components/nav/index.d.ts +2 -0
- package/dist/components/nav/index.mjs +0 -0
- package/dist/components/navbar/Navbar.vue +143 -0
- package/dist/components/navbar/Navbar.vue.d.ts +57 -0
- package/dist/components/navbar/NavbarBrand.vue +33 -0
- package/dist/components/navbar/NavbarBrand.vue.d.ts +14 -0
- package/dist/components/navbar/NavbarNav.vue +109 -0
- package/dist/components/navbar/NavbarNav.vue.d.ts +19 -0
- package/dist/components/navbar/NavbarToggle.vue +74 -0
- package/dist/components/navbar/NavbarToggle.vue.d.ts +6 -0
- package/dist/components/navbar/index.d.ts +10 -0
- package/dist/components/navbar/index.mjs +1 -0
- package/dist/components/navbar-menu/NavbarNavMenu.vue +62 -0
- package/dist/components/navbar-menu/NavbarNavMenu.vue.d.ts +16 -0
- package/dist/components/overlay/Overlay.vue +8 -3
- package/dist/components/overlay/Overlay.vue.d.ts +14 -3
- package/dist/components/overlay/{use-overlay.d.ts → index.d.ts} +0 -0
- package/dist/components/overlay/{use-overlay.mjs → index.mjs} +0 -0
- package/dist/components/progress/Progress.vue +200 -0
- package/dist/components/progress/Progress.vue.d.ts +42 -0
- package/dist/components/progress/ProgressItem.vue +50 -0
- package/dist/components/progress/ProgressItem.vue.d.ts +25 -0
- package/dist/components/radio/Radio.vue +88 -31
- package/dist/components/radio/Radio.vue.d.ts +6 -6
- package/dist/components/radio/{use-radio.d.ts → index.d.ts} +1 -1
- package/dist/components/radio/{use-radio.mjs → index.mjs} +0 -0
- package/dist/components/select/Select.vue +10 -4
- package/dist/components/select/Select.vue.d.ts +11 -2
- package/dist/components/select/adapter/adapter.d.ts +1 -1
- package/dist/components/select/adapter/async-adapter.d.ts +1 -1
- package/dist/components/select/{use-select.d.ts → index.d.ts} +0 -0
- package/dist/components/select/{use-select.mjs → index.mjs} +0 -0
- package/dist/components/sidebar/Sidebar.vue +3 -3
- package/dist/components/sidebar/Sidebar.vue.d.ts +4 -9
- package/dist/components/sidebar/SidebarNav.vue +11 -11
- package/dist/components/sidebar/SidebarNav.vue.d.ts +2 -2
- package/dist/components/sidebar/index.d.ts +9 -0
- package/dist/components/sidebar/index.mjs +1 -0
- package/dist/components/sidebar-menu/SidebarMenu.vue.d.ts +4 -2
- package/dist/components/sidebar-menu/{use-sidebar-menu.d.ts → index.d.ts} +2 -0
- package/dist/components/sidebar-menu/{use-sidebar-menu.mjs → index.mjs} +0 -0
- package/dist/components/signature-draw/SignatureDraw.vue +1 -1
- package/dist/components/signature-draw/SignatureDrawDesktop.vue +5 -5
- package/dist/components/signature-draw/SignatureDrawMobile.vue +17 -5
- package/dist/components/signature-draw/utils/canvas.d.ts +7 -1
- package/dist/components/signature-draw/utils/canvas.mjs +8 -2
- package/dist/components/signature-draw/utils/use-draw.mjs +6 -5
- package/dist/components/signature-text/SignatureText.vue +1 -1
- package/dist/components/signature-text/SignatureText.vue.d.ts +1 -1
- package/dist/components/signature-text/utils/formatter.mjs +1 -1
- package/dist/components/spinner/Spinner.vue +1 -0
- package/dist/components/spinner/SpinnerRing.vue +1 -0
- package/dist/components/spread/Spread.vue +55 -0
- package/dist/components/spread/Spread.vue.d.ts +14 -0
- package/dist/components/steps/Step.vue +55 -0
- package/dist/components/steps/Step.vue.d.ts +32 -0
- package/dist/components/steps/StepSlider.vue +39 -0
- package/dist/components/steps/StepSlider.vue.d.ts +25 -0
- package/dist/components/steps/Steps.vue +111 -0
- package/dist/components/steps/Steps.vue.d.ts +56 -0
- package/dist/components/steps/index.d.ts +26 -0
- package/dist/components/steps/index.mjs +52 -0
- package/dist/components/steps/utils/hook.d.ts +10 -0
- package/dist/components/steps/utils/hook.mjs +34 -0
- package/dist/components/strengthbar/Strengthbar.vue +96 -0
- package/dist/components/strengthbar/Strengthbar.vue.d.ts +45 -0
- package/dist/components/subheading/Subheading.vue +65 -20
- package/dist/components/subheading/Subheading.vue.d.ts +23 -5
- package/dist/components/subheading/index.d.ts +1 -0
- package/dist/components/subheading/index.mjs +0 -0
- package/dist/components/table/Table.vue +21 -9
- package/dist/components/table/Table.vue.d.ts +1 -1
- package/dist/components/table/{use-table.d.ts → index.d.ts} +0 -0
- package/dist/components/table/{use-table.mjs → index.mjs} +0 -0
- package/dist/components/tabs/TabContent.vue +2 -2
- package/dist/components/tabs/Tabs.vue +12 -9
- package/dist/components/tabs/Tabs.vue.d.ts +2 -1
- package/dist/components/textarea/Textarea.vue +27 -16
- package/dist/components/textarea/Textarea.vue.d.ts +10 -1
- package/dist/components/toast/Toast.vue +102 -72
- package/dist/components/toast/Toast.vue.d.ts +1 -1
- package/dist/components/toast/ToastContainer.vue +1 -1
- package/dist/components/toast/ToastContainer.vue.d.ts +3 -3
- package/dist/components/toast/{use-toast.d.ts → index.d.ts} +1 -1
- package/dist/components/toast/index.mjs +6 -0
- package/dist/components/toggle/Toggle.vue +17 -21
- package/dist/components/tooltip/Tooltip.vue +161 -0
- package/dist/components/tooltip/Tooltip.vue.d.ts +51 -0
- package/dist/components/tooltip/TooltipContainer.vue +66 -0
- package/dist/components/tooltip/TooltipContainer.vue.d.ts +11 -0
- package/dist/components/tooltip/index.d.ts +14 -0
- package/dist/components/tooltip/index.mjs +82 -0
- package/dist/components/tooltip/utils/create-handler.d.ts +9 -0
- package/dist/components/tooltip/utils/create-handler.mjs +16 -0
- package/dist/components/tooltip/utils/parse-bindings.d.ts +22 -0
- package/dist/components/tooltip/utils/parse-bindings.mjs +45 -0
- package/dist/components/tour/Tour.vue +105 -0
- package/dist/components/tour/Tour.vue.d.ts +11 -0
- package/dist/components/tour/TourDialog.vue +204 -0
- package/dist/components/tour/TourDialog.vue.d.ts +108 -0
- package/dist/components/tour/TourHighlight.vue +57 -0
- package/dist/components/tour/TourHighlight.vue.d.ts +15 -0
- package/dist/components/tour/core/base.d.ts +59 -0
- package/dist/components/tour/core/base.mjs +43 -0
- package/dist/components/tour/core/step/action.d.ts +15 -0
- package/dist/components/tour/core/step/action.mjs +14 -0
- package/dist/components/tour/core/step/conditional.d.ts +26 -0
- package/dist/components/tour/core/step/conditional.mjs +69 -0
- package/dist/components/tour/core/step/delay.d.ts +8 -0
- package/dist/components/tour/core/step/delay.mjs +9 -0
- package/dist/components/tour/core/step/dialog.d.ts +11 -0
- package/dist/components/tour/core/step/dialog.mjs +25 -0
- package/dist/components/tour/core/step/visit.d.ts +9 -0
- package/dist/components/tour/core/step/visit.mjs +18 -0
- package/dist/components/tour/core/step.d.ts +37 -0
- package/dist/components/tour/core/step.mjs +30 -0
- package/dist/components/tour/core/story.d.ts +130 -0
- package/dist/components/tour/core/story.mjs +85 -0
- package/dist/components/tour/core/tour.d.ts +120 -0
- package/dist/components/tour/core/tour.mjs +133 -0
- package/dist/components/tour/index.d.ts +3 -0
- package/dist/components/tour/index.mjs +4 -0
- package/dist/components/tour/utils/is-visible.d.ts +2 -0
- package/dist/components/tour/utils/is-visible.mjs +35 -0
- package/dist/components/tour/utils/use-selector.d.ts +3 -0
- package/dist/components/tour/utils/use-selector.mjs +25 -0
- package/dist/components/tour/utils/wait-element.d.ts +6 -0
- package/dist/components/tour/utils/wait-element.mjs +44 -0
- package/dist/components/utils/base64.d.ts +8 -0
- package/dist/components/utils/base64.mjs +29 -0
- package/dist/components/utils/color.d.ts +6 -1
- package/dist/components/utils/color.mjs +4 -0
- package/dist/components/utils/value.mjs +2 -1
- package/dist/components/utils/vnode.d.ts +14 -1
- package/dist/components/utils/vnode.mjs +5 -2
- package/dist/components/wizard/Wizard.vue +85 -0
- package/dist/components/wizard/Wizard.vue.d.ts +72 -0
- package/dist/components/wizard/WizardBody.vue +50 -0
- package/dist/components/wizard/WizardBody.vue.d.ts +23 -0
- package/dist/components/wizard/WizardHeader.vue +38 -0
- package/dist/components/wizard/WizardHeader.vue.d.ts +16 -0
- package/dist/components/wizard/WizardStep.vue +20 -0
- package/dist/components/wizard/WizardStep.vue.d.ts +34 -0
- package/dist/core/index.d.ts +16 -6
- package/dist/core/index.mjs +37 -6
- package/dist/directive/index.d.ts +3 -0
- package/dist/directive/index.mjs +12 -0
- package/dist/module.d.ts +9 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +1613 -4
- package/dist/runtime/plugin.d.ts +2 -0
- package/dist/runtime/plugin.mjs +14 -0
- package/dist/types.d.ts +5 -1
- package/package.json +46 -9
- package/dist/components/dialog/use-dialog.d.ts +0 -28
- package/dist/components/dialog/use-dialog.mjs +0 -31
- package/dist/components/dropdown/utils/use-popper.d.ts +0 -6
- package/dist/components/dropdown/utils/use-popper.mjs +0 -32
- package/dist/components/input/InputGroup.vue +0 -25
- package/dist/components/toast/use-toast.mjs +0 -5
- package/dist/core/index.cjs +0 -75
|
@@ -2,23 +2,26 @@
|
|
|
2
2
|
<Dropdown
|
|
3
3
|
v-model="isOpen"
|
|
4
4
|
variant="input"
|
|
5
|
+
size="sm"
|
|
5
6
|
class="filterbar__select"
|
|
6
7
|
:class="{'filterbar--active': selected !== undefined }"
|
|
8
|
+
divider
|
|
7
9
|
caret>
|
|
8
10
|
<template #button-content>
|
|
9
11
|
{{ selected ? selected.text : schema.label }}
|
|
10
12
|
</template>
|
|
11
|
-
<
|
|
12
|
-
class="px-
|
|
13
|
-
|
|
13
|
+
<Subheading
|
|
14
|
+
class="px-4 pt-4 pb-1"
|
|
15
|
+
weight="medium"
|
|
16
|
+
overline>
|
|
14
17
|
{{ schema.label }}
|
|
15
|
-
</
|
|
18
|
+
</Subheading>
|
|
16
19
|
<template
|
|
17
20
|
v-for="(item, i) in items"
|
|
18
21
|
:key="i">
|
|
19
22
|
<Radio
|
|
20
23
|
v-model="model"
|
|
21
|
-
|
|
24
|
+
appearance="option"
|
|
22
25
|
:value="item.value"
|
|
23
26
|
@click="close">
|
|
24
27
|
{{ item.text }}
|
|
@@ -33,15 +36,15 @@ import {
|
|
|
33
36
|
defineComponent,
|
|
34
37
|
ref
|
|
35
38
|
} from "vue-demi";
|
|
36
|
-
import
|
|
39
|
+
import Subheading from "../../subheading/Subheading.vue";
|
|
37
40
|
import Dropdown from "../../dropdown/Dropdown.vue";
|
|
38
41
|
import Radio from "../../radio/Radio.vue";
|
|
39
42
|
import { useOptionsProp } from "../../select/adapter/adapter";
|
|
40
|
-
import { useVModel } from "../../input
|
|
43
|
+
import { useVModel } from "../../input";
|
|
41
44
|
import { isEqual } from "../../utils/value";
|
|
42
45
|
export default defineComponent({
|
|
43
46
|
components: {
|
|
44
|
-
|
|
47
|
+
Subheading,
|
|
45
48
|
Dropdown,
|
|
46
49
|
Radio
|
|
47
50
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
import { FilterSelect } from '
|
|
3
|
-
import { SelectItem } from '../../select
|
|
2
|
+
import { FilterSelect } from '..';
|
|
3
|
+
import { SelectItem } from '../../select';
|
|
4
4
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
5
5
|
schema: {
|
|
6
6
|
type: PropType<FilterSelect>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<Button
|
|
3
3
|
class="filterbar__item filterbar--pinned"
|
|
4
4
|
variant="input"
|
|
5
|
+
size="sm"
|
|
5
6
|
:class="{ 'filterbar--active': model }"
|
|
6
7
|
@click="toggle">
|
|
7
8
|
{{ schema.label }}
|
|
@@ -11,7 +12,7 @@
|
|
|
11
12
|
<script>
|
|
12
13
|
import { defineComponent } from "vue-demi";
|
|
13
14
|
import Button from "../../button/Button.vue";
|
|
14
|
-
import { useVModel } from "../../checkbox
|
|
15
|
+
import { useVModel } from "../../checkbox";
|
|
15
16
|
export default defineComponent({
|
|
16
17
|
components: { Button },
|
|
17
18
|
props: {
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="form-group"
|
|
4
|
+
:class="classNames">
|
|
5
|
+
<label class="form-group__label">
|
|
6
|
+
<IconInfo
|
|
7
|
+
v-if="hint"
|
|
8
|
+
v-p-tooltip="hint"
|
|
9
|
+
class="form-group__hint" />
|
|
10
|
+
{{ label }}<sup v-if="required">*</sup>
|
|
11
|
+
<p-caption v-if="caption">{{ caption }}</p-caption>
|
|
12
|
+
</label>
|
|
13
|
+
|
|
14
|
+
<slot />
|
|
15
|
+
|
|
16
|
+
<transition
|
|
17
|
+
name="slide-up"
|
|
18
|
+
mode="out-in">
|
|
19
|
+
<p
|
|
20
|
+
v-if="error"
|
|
21
|
+
class="form-group__error">
|
|
22
|
+
{{ error }}
|
|
23
|
+
</p>
|
|
24
|
+
<p
|
|
25
|
+
v-else-if="description"
|
|
26
|
+
class="form-group__description">
|
|
27
|
+
{{ description }}
|
|
28
|
+
</p>
|
|
29
|
+
</transition>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
import IconInfo from "@carbon/icons-vue/lib/information--filled/16";
|
|
35
|
+
import pCaption from "../caption/Caption.vue";
|
|
36
|
+
import { pTooltip } from "../tooltip";
|
|
37
|
+
import { computed, defineComponent } from "vue-demi";
|
|
38
|
+
export default defineComponent({
|
|
39
|
+
components: { pCaption, IconInfo },
|
|
40
|
+
directives: { pTooltip },
|
|
41
|
+
props: {
|
|
42
|
+
required: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false
|
|
45
|
+
},
|
|
46
|
+
label: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: ""
|
|
49
|
+
},
|
|
50
|
+
caption: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: ""
|
|
53
|
+
},
|
|
54
|
+
description: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: ""
|
|
57
|
+
},
|
|
58
|
+
hint: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: ""
|
|
61
|
+
},
|
|
62
|
+
error: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: ""
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
setup(props) {
|
|
68
|
+
const classNames = computed(() => {
|
|
69
|
+
const result = [];
|
|
70
|
+
if (props.error)
|
|
71
|
+
result.push("form-group--error", "state--error");
|
|
72
|
+
return result;
|
|
73
|
+
});
|
|
74
|
+
return { classNames };
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<style lang="postcss">
|
|
80
|
+
.form-group {
|
|
81
|
+
@apply flex flex-col mb-4;
|
|
82
|
+
|
|
83
|
+
&__label {
|
|
84
|
+
@apply font-bold text-xs mb-2 relative;
|
|
85
|
+
|
|
86
|
+
> sup {
|
|
87
|
+
@apply text-danger;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&__description {
|
|
92
|
+
@apply text-xs;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&__error {
|
|
96
|
+
@apply text-xs text-danger;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&__hint {
|
|
100
|
+
@apply absolute bottom-0 right-0 text-accent cursor-pointer focus:outline-none;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
</style>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
declare const _default: import("vue-demi").DefineComponent<{
|
|
2
|
+
required: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
label: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
caption: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
description: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
hint: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
error: {
|
|
23
|
+
type: StringConstructor;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
}, {
|
|
27
|
+
classNames: import("vue-demi").ComputedRef<string[]>;
|
|
28
|
+
}, 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<{
|
|
29
|
+
required: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
33
|
+
label: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
caption: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
description: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
hint: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
error: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
}>>, {
|
|
54
|
+
error: string;
|
|
55
|
+
caption: string;
|
|
56
|
+
required: boolean;
|
|
57
|
+
label: string;
|
|
58
|
+
description: string;
|
|
59
|
+
hint: string;
|
|
60
|
+
}>;
|
|
61
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare type Lang = 'id' | 'en';
|
|
2
|
+
/**
|
|
3
|
+
* Simple vuex-like-store for global configuaration
|
|
4
|
+
*/
|
|
5
|
+
export interface AppContext {
|
|
6
|
+
lang: Lang;
|
|
7
|
+
}
|
|
8
|
+
export declare function initAppContext(context?: Partial<AppContext>): void;
|
|
9
|
+
export declare function useAppContext(): AppContext;
|
|
10
|
+
export declare function setLang(lang: Lang): void;
|
|
11
|
+
export declare function getLang(): Lang;
|
|
12
|
+
/**
|
|
13
|
+
* Return reactive global lang setting
|
|
14
|
+
* @example
|
|
15
|
+
* const lang = useLang()
|
|
16
|
+
*
|
|
17
|
+
* // set lang
|
|
18
|
+
* lang.value = 'en'
|
|
19
|
+
*
|
|
20
|
+
* // get lang
|
|
21
|
+
* console.log(lang.value)
|
|
22
|
+
*/
|
|
23
|
+
export declare function useLang(): import("vue-demi").Ref<Lang>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import defu from "defu";
|
|
2
|
+
import { reactive, toRef } from "vue-demi";
|
|
3
|
+
let appContext = reactive({ lang: "en" });
|
|
4
|
+
export function initAppContext(context) {
|
|
5
|
+
appContext = reactive(defu(context, { lang: "en" }));
|
|
6
|
+
}
|
|
7
|
+
export function useAppContext() {
|
|
8
|
+
return appContext;
|
|
9
|
+
}
|
|
10
|
+
export function setLang(lang) {
|
|
11
|
+
appContext.lang = lang;
|
|
12
|
+
}
|
|
13
|
+
export function getLang() {
|
|
14
|
+
return appContext.lang;
|
|
15
|
+
}
|
|
16
|
+
export function useLang() {
|
|
17
|
+
return toRef(appContext, "lang");
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Universal router which compatible in many enviroment
|
|
3
|
+
*/
|
|
4
|
+
interface RouterCompat {
|
|
5
|
+
/**
|
|
6
|
+
* redirect to URL
|
|
7
|
+
*/
|
|
8
|
+
toURL: (url: string) => unknown | Promise<unknown>;
|
|
9
|
+
/**
|
|
10
|
+
* Get current URL
|
|
11
|
+
*/
|
|
12
|
+
getURL: () => string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Init router compat
|
|
16
|
+
* @param router RouterInstance
|
|
17
|
+
*/
|
|
18
|
+
export declare function installRouter(router: RouterCompat): void;
|
|
19
|
+
/**
|
|
20
|
+
* Use Router Compat
|
|
21
|
+
*/
|
|
22
|
+
export declare function useRouter(): RouterCompat;
|
|
23
|
+
export {};
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
import { DefineComponent } from 'vue-demi';
|
|
1
|
+
import { DefineComponent, Ref } from 'vue-demi';
|
|
2
2
|
export declare type Component = DefineComponent<{}, {}, any>;
|
|
3
3
|
export declare type ComponentInstance<C extends Component> = InstanceType<C>;
|
|
4
|
+
export interface GlobalInstance<C extends Component> {
|
|
5
|
+
component: C;
|
|
6
|
+
ref: Ref<ComponentInstance<C>>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Reset all instances
|
|
10
|
+
*/
|
|
11
|
+
export declare function resetInstance(): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* Create global component, return one if component is exist
|
|
14
|
+
* @param component Vue Component
|
|
15
|
+
*/
|
|
4
16
|
export declare function useSingleton<C extends Component>(component: C): Promise<ComponentInstance<C>>;
|
|
17
|
+
/**
|
|
18
|
+
* Remove global component
|
|
19
|
+
* @param component Vue Component
|
|
20
|
+
*/
|
|
5
21
|
export declare function removeSingleton<C extends Component>(component: C): Promise<void>;
|
|
6
|
-
export declare function resetSingleton(): Promise<void>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import PQueue from "p-queue";
|
|
1
2
|
import {
|
|
2
3
|
createApp,
|
|
3
4
|
h,
|
|
@@ -9,7 +10,8 @@ import {
|
|
|
9
10
|
} from "vue-demi";
|
|
10
11
|
let instances;
|
|
11
12
|
let container;
|
|
12
|
-
|
|
13
|
+
const queue = new PQueue({ concurrency: 1 });
|
|
14
|
+
async function createInstance(id, component) {
|
|
13
15
|
if (!instances)
|
|
14
16
|
instances = shallowRef(/* @__PURE__ */ new Map());
|
|
15
17
|
if (!container) {
|
|
@@ -17,8 +19,8 @@ export async function useSingleton(component) {
|
|
|
17
19
|
const app = createApp({
|
|
18
20
|
name: "GlobalContainer",
|
|
19
21
|
render: () => {
|
|
20
|
-
return [...instances.value.
|
|
21
|
-
return h(
|
|
22
|
+
return [...instances.value.values()].map((item) => {
|
|
23
|
+
return h(item.component, { ref: item.ref });
|
|
22
24
|
});
|
|
23
25
|
}
|
|
24
26
|
});
|
|
@@ -27,26 +29,32 @@ export async function useSingleton(component) {
|
|
|
27
29
|
target.id = "global";
|
|
28
30
|
container = app;
|
|
29
31
|
}
|
|
30
|
-
let instance = instances.value.get(
|
|
32
|
+
let instance = instances.value.get(id);
|
|
31
33
|
if (!instance) {
|
|
32
|
-
instance = ref();
|
|
33
|
-
instances.value.set(
|
|
34
|
+
instance = { component, ref: ref() };
|
|
35
|
+
instances.value.set(id, instance);
|
|
34
36
|
triggerRef(instances);
|
|
35
37
|
await nextTick();
|
|
36
38
|
}
|
|
37
|
-
return unref(instance);
|
|
39
|
+
return unref(instance.ref);
|
|
38
40
|
}
|
|
39
|
-
|
|
41
|
+
async function removeInstance(id) {
|
|
40
42
|
if (instances && container) {
|
|
41
|
-
instances.value.delete(
|
|
43
|
+
instances.value.delete(id);
|
|
42
44
|
triggerRef(instances);
|
|
43
45
|
await nextTick();
|
|
44
46
|
}
|
|
45
47
|
}
|
|
46
|
-
export async function
|
|
48
|
+
export async function resetInstance() {
|
|
47
49
|
if (instances) {
|
|
48
50
|
instances.value.clear();
|
|
49
51
|
triggerRef(instances);
|
|
50
52
|
await nextTick();
|
|
51
53
|
}
|
|
52
54
|
}
|
|
55
|
+
export async function useSingleton(component) {
|
|
56
|
+
return await queue.add(() => createInstance(component, component));
|
|
57
|
+
}
|
|
58
|
+
export async function removeSingleton(component) {
|
|
59
|
+
return await queue.add(() => removeInstance(component));
|
|
60
|
+
}
|
|
@@ -17,6 +17,14 @@ export default defineComponent({
|
|
|
17
17
|
element: {
|
|
18
18
|
type: String,
|
|
19
19
|
default: "h3"
|
|
20
|
+
},
|
|
21
|
+
weight: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "normal"
|
|
24
|
+
},
|
|
25
|
+
transform: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "normalcase"
|
|
20
28
|
}
|
|
21
29
|
},
|
|
22
30
|
setup(props) {
|
|
@@ -25,6 +33,10 @@ export default defineComponent({
|
|
|
25
33
|
});
|
|
26
34
|
const classNames = computed(() => {
|
|
27
35
|
const result = [`${props.element}`];
|
|
36
|
+
if (props.transform)
|
|
37
|
+
result.push(`heading--${props.transform}`);
|
|
38
|
+
if (props.weight)
|
|
39
|
+
result.push(`heading--${props.weight}`);
|
|
28
40
|
return result;
|
|
29
41
|
});
|
|
30
42
|
return {
|
|
@@ -55,5 +67,43 @@ export default defineComponent({
|
|
|
55
67
|
&6 {
|
|
56
68
|
@apply text-xl;
|
|
57
69
|
}
|
|
70
|
+
|
|
71
|
+
&eading {
|
|
72
|
+
/**
|
|
73
|
+
* Weight variant
|
|
74
|
+
* of heading
|
|
75
|
+
*/
|
|
76
|
+
&--normal {
|
|
77
|
+
@apply font-normal;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&--medium {
|
|
81
|
+
@apply font-medium;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&--bold {
|
|
85
|
+
@apply font-bold;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Text transform
|
|
90
|
+
* of heading
|
|
91
|
+
*/
|
|
92
|
+
&--normalcase {
|
|
93
|
+
@apply normal-case;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&--lowercase {
|
|
97
|
+
@apply lowercase;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&--capitalize {
|
|
101
|
+
@apply capitalize;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&--uppercase {
|
|
105
|
+
@apply uppercase;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
58
108
|
}
|
|
59
109
|
</style>
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
|
|
2
|
+
import { ElementVariant, TransformVariant, WeightVariant } from '.';
|
|
3
3
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
4
4
|
element: {
|
|
5
5
|
type: PropType<ElementVariant>;
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
|
+
weight: {
|
|
9
|
+
type: PropType<WeightVariant>;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
transform: {
|
|
13
|
+
type: PropType<TransformVariant>;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
8
16
|
}, {
|
|
9
17
|
elementNames: import("vue-demi").ComputedRef<ElementVariant>;
|
|
10
18
|
classNames: import("vue-demi").ComputedRef<string[]>;
|
|
@@ -13,7 +21,17 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
13
21
|
type: PropType<ElementVariant>;
|
|
14
22
|
default: string;
|
|
15
23
|
};
|
|
24
|
+
weight: {
|
|
25
|
+
type: PropType<WeightVariant>;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
transform: {
|
|
29
|
+
type: PropType<TransformVariant>;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
16
32
|
}>>, {
|
|
33
|
+
weight: WeightVariant;
|
|
34
|
+
transform: TransformVariant;
|
|
17
35
|
element: ElementVariant;
|
|
18
36
|
}>;
|
|
19
37
|
export default _default;
|
|
File without changes
|