@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
|
@@ -1,53 +1,148 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<div
|
|
3
|
+
class="input"
|
|
4
|
+
data-testid="input-container">
|
|
5
|
+
<slot name="prepend" />
|
|
6
|
+
<input
|
|
7
|
+
v-model="model"
|
|
8
|
+
class="input__form"
|
|
9
|
+
data-testid="input"
|
|
10
|
+
:disabled="disabled"
|
|
11
|
+
:readonly="readonly"
|
|
12
|
+
:class="classNames"
|
|
13
|
+
v-bind="$attrs">
|
|
14
|
+
<IconClear
|
|
15
|
+
v-show="(clearable && model)"
|
|
16
|
+
class="input__clear"
|
|
17
|
+
data-testid="input-clear"
|
|
18
|
+
@click="clear" />
|
|
19
|
+
<slot name="append" />
|
|
20
|
+
</div>
|
|
8
21
|
</template>
|
|
9
22
|
|
|
10
23
|
<script>
|
|
11
|
-
import {
|
|
12
|
-
|
|
24
|
+
import {
|
|
25
|
+
computed,
|
|
26
|
+
defineComponent
|
|
27
|
+
} from "vue-demi";
|
|
28
|
+
import { useVModel } from ".";
|
|
29
|
+
import IconClear from "@carbon/icons-vue/lib/close--filled/16";
|
|
13
30
|
export default defineComponent({
|
|
31
|
+
components: { IconClear },
|
|
32
|
+
inheritAttrs: false,
|
|
14
33
|
props: {
|
|
15
34
|
modelValue: {
|
|
16
35
|
type: [String, Number],
|
|
17
36
|
default: ""
|
|
18
37
|
},
|
|
19
|
-
|
|
20
|
-
|
|
38
|
+
size: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: "md"
|
|
41
|
+
},
|
|
42
|
+
disabled: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false
|
|
45
|
+
},
|
|
46
|
+
readonly: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false
|
|
49
|
+
},
|
|
50
|
+
error: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false
|
|
53
|
+
},
|
|
54
|
+
clearable: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false
|
|
57
|
+
}
|
|
21
58
|
},
|
|
22
59
|
models: {
|
|
23
60
|
prop: "modelValue",
|
|
24
61
|
event: "update:modelValue"
|
|
25
62
|
},
|
|
26
|
-
emits: ["update:modelValue"],
|
|
27
|
-
setup(props) {
|
|
28
|
-
const
|
|
29
|
-
|
|
63
|
+
emits: ["update:modelValue", "clear"],
|
|
64
|
+
setup(props, { emit }) {
|
|
65
|
+
const model = useVModel(props);
|
|
66
|
+
const classNames = computed(() => {
|
|
67
|
+
const result = [];
|
|
68
|
+
if (props.size)
|
|
69
|
+
result.push(`input--${props.size}`);
|
|
70
|
+
if (props.disabled)
|
|
71
|
+
result.push("input--disabled");
|
|
72
|
+
if (props.readonly)
|
|
73
|
+
result.push("input--readonly");
|
|
74
|
+
if (props.error)
|
|
75
|
+
result.push("input--error", "state--error");
|
|
76
|
+
if (props.clearable)
|
|
77
|
+
result.push("input--clearable");
|
|
78
|
+
return result;
|
|
79
|
+
});
|
|
80
|
+
function clear() {
|
|
81
|
+
if (!props.disabled && !props.readonly)
|
|
82
|
+
model.value = "";
|
|
83
|
+
emit("clear");
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
classNames,
|
|
87
|
+
model,
|
|
88
|
+
clear
|
|
89
|
+
};
|
|
30
90
|
}
|
|
31
91
|
});
|
|
32
92
|
</script>
|
|
33
93
|
|
|
34
94
|
<style lang="postcss">
|
|
35
95
|
.input {
|
|
36
|
-
@apply
|
|
96
|
+
@apply w-full relative bg-default;
|
|
97
|
+
|
|
98
|
+
&__form {
|
|
99
|
+
@apply py-[10px] px-3 text-base relative rounded border border-solid border-muted hover:border-subtle placeholder:text-muted w-full outline-none ;
|
|
100
|
+
|
|
101
|
+
&:disabled,
|
|
102
|
+
&--disabled,
|
|
103
|
+
.state--disabled & {
|
|
104
|
+
@apply bg-muted border-muted pointer-events-none text-muted;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:focus {
|
|
108
|
+
@apply border-subtle ring-4 ring-subtle/10 z-[1];
|
|
109
|
+
}
|
|
110
|
+
}
|
|
37
111
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
@apply opacity-50 pointer-events-none;
|
|
112
|
+
&--xs {
|
|
113
|
+
@apply text-xs px-3 py-2;
|
|
41
114
|
}
|
|
42
115
|
|
|
43
|
-
|
|
44
|
-
@apply
|
|
116
|
+
&--sm {
|
|
117
|
+
@apply px-3 py-2;
|
|
45
118
|
}
|
|
46
119
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
120
|
+
&--md {
|
|
121
|
+
@apply px-3 py-3;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&--lg {
|
|
125
|
+
@apply px-3 py-4;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.state--error &__form,
|
|
129
|
+
&--error {
|
|
130
|
+
@apply border-danger-emphasis hover:border-danger-emphasis;
|
|
131
|
+
|
|
132
|
+
&:focus {
|
|
133
|
+
@apply ring-danger border-danger-emphasis;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.input__clear {
|
|
138
|
+
@apply cursor-pointer hover:text-danger z-1;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&--clearable {
|
|
142
|
+
@apply pr-9;
|
|
143
|
+
|
|
144
|
+
+ .input__clear {
|
|
145
|
+
@apply absolute right-3 top-1/2 -translate-y-1/2;
|
|
51
146
|
}
|
|
52
147
|
}
|
|
53
148
|
}
|
|
@@ -1,32 +1,68 @@
|
|
|
1
|
+
import { PropType } from 'vue-demi';
|
|
2
|
+
import { SizeVariant } from '../button';
|
|
1
3
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
2
4
|
modelValue: {
|
|
3
5
|
type: (StringConstructor | NumberConstructor)[];
|
|
4
6
|
default: string;
|
|
5
7
|
};
|
|
8
|
+
size: {
|
|
9
|
+
type: PropType<SizeVariant>;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
6
12
|
disabled: {
|
|
7
13
|
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
8
15
|
};
|
|
9
16
|
readonly: {
|
|
10
17
|
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
error: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
clearable: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
11
27
|
};
|
|
12
28
|
}, {
|
|
13
|
-
|
|
14
|
-
|
|
29
|
+
classNames: import("vue-demi").ComputedRef<string[]>;
|
|
30
|
+
model: import("vue-demi").Ref<string | number>;
|
|
31
|
+
clear: () => void;
|
|
32
|
+
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("update:modelValue" | "clear")[], "update:modelValue" | "clear", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
15
33
|
modelValue: {
|
|
16
34
|
type: (StringConstructor | NumberConstructor)[];
|
|
17
35
|
default: string;
|
|
18
36
|
};
|
|
37
|
+
size: {
|
|
38
|
+
type: PropType<SizeVariant>;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
19
41
|
disabled: {
|
|
20
42
|
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
21
44
|
};
|
|
22
45
|
readonly: {
|
|
23
46
|
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
error: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
clearable: {
|
|
54
|
+
type: BooleanConstructor;
|
|
55
|
+
default: boolean;
|
|
24
56
|
};
|
|
25
57
|
}>> & {
|
|
26
58
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
59
|
+
onClear?: (...args: any[]) => any;
|
|
27
60
|
}, {
|
|
61
|
+
error: boolean;
|
|
62
|
+
size: SizeVariant;
|
|
28
63
|
disabled: boolean;
|
|
29
64
|
modelValue: string | number;
|
|
30
65
|
readonly: boolean;
|
|
66
|
+
clearable: boolean;
|
|
31
67
|
}>;
|
|
32
68
|
export default _default;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<p-dropzone
|
|
3
|
+
ref="dropzone"
|
|
4
|
+
v-model="model"
|
|
5
|
+
class="input-file"
|
|
6
|
+
:class="classNames"
|
|
7
|
+
:model-modifiers="modelModifiers"
|
|
8
|
+
:multiple="multiple"
|
|
9
|
+
:maxlength="maxlength"
|
|
10
|
+
:accept="accept"
|
|
11
|
+
:disabled="disabled"
|
|
12
|
+
:readonly="readonly"
|
|
13
|
+
:clear-on-cancel="clearOnCancel">
|
|
14
|
+
<template #default="{ browse, rawModel }">
|
|
15
|
+
<p-input-group
|
|
16
|
+
:disabled="disabled"
|
|
17
|
+
:error="error"
|
|
18
|
+
:size="size">
|
|
19
|
+
<p-input-group-addon>
|
|
20
|
+
<p-button
|
|
21
|
+
:disabled="disabled"
|
|
22
|
+
:readonly="readonly"
|
|
23
|
+
@click="browse">
|
|
24
|
+
{{ browseLabel }}
|
|
25
|
+
</p-button>
|
|
26
|
+
</p-input-group-addon>
|
|
27
|
+
<p-input
|
|
28
|
+
readonly
|
|
29
|
+
:model-value="getFileNames(rawModel)"
|
|
30
|
+
:placeholder="placeholder" />
|
|
31
|
+
</p-input-group>
|
|
32
|
+
</template>
|
|
33
|
+
</p-dropzone>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script>
|
|
37
|
+
import {
|
|
38
|
+
computed,
|
|
39
|
+
defineComponent
|
|
40
|
+
} from "vue-demi";
|
|
41
|
+
import { useVModel } from "../input";
|
|
42
|
+
import pDropzone from "../dropzone/Dropzone.vue";
|
|
43
|
+
import pInput from "../input/Input.vue";
|
|
44
|
+
import pInputGroup from "../input-group/InputGroup.vue";
|
|
45
|
+
import pInputGroupAddon from "../input-group/InputGroupAddon.vue";
|
|
46
|
+
import pButton from "../button/Button.vue";
|
|
47
|
+
export default defineComponent({
|
|
48
|
+
components: {
|
|
49
|
+
pDropzone,
|
|
50
|
+
pInput,
|
|
51
|
+
pInputGroup,
|
|
52
|
+
pInputGroupAddon,
|
|
53
|
+
pButton
|
|
54
|
+
},
|
|
55
|
+
props: {
|
|
56
|
+
modelValue: {
|
|
57
|
+
type: [
|
|
58
|
+
globalThis.File,
|
|
59
|
+
Array,
|
|
60
|
+
String
|
|
61
|
+
],
|
|
62
|
+
default: void 0
|
|
63
|
+
},
|
|
64
|
+
modelModifiers: {
|
|
65
|
+
type: Object,
|
|
66
|
+
default: () => ({})
|
|
67
|
+
},
|
|
68
|
+
multiple: {
|
|
69
|
+
type: [Boolean, String],
|
|
70
|
+
default: false
|
|
71
|
+
},
|
|
72
|
+
maxlength: {
|
|
73
|
+
type: [Number, String],
|
|
74
|
+
default: void 0
|
|
75
|
+
},
|
|
76
|
+
accept: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: ""
|
|
79
|
+
},
|
|
80
|
+
clearOnCancel: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: false
|
|
83
|
+
},
|
|
84
|
+
placeholder: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: "No file chosen"
|
|
87
|
+
},
|
|
88
|
+
browseLabel: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: "Choose file"
|
|
91
|
+
},
|
|
92
|
+
disabled: {
|
|
93
|
+
type: Boolean,
|
|
94
|
+
default: false
|
|
95
|
+
},
|
|
96
|
+
readonly: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: false
|
|
99
|
+
},
|
|
100
|
+
error: {
|
|
101
|
+
type: Boolean,
|
|
102
|
+
default: false
|
|
103
|
+
},
|
|
104
|
+
size: {
|
|
105
|
+
type: String,
|
|
106
|
+
default: "md"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
setup(props) {
|
|
110
|
+
const model = useVModel(props);
|
|
111
|
+
const classNames = computed(() => {
|
|
112
|
+
const result = [];
|
|
113
|
+
if (props.readonly)
|
|
114
|
+
result.push("input-file--readonly");
|
|
115
|
+
if (props.disabled)
|
|
116
|
+
result.push("input-file--disabled");
|
|
117
|
+
if (props.error)
|
|
118
|
+
result.push("input-file--error");
|
|
119
|
+
return result;
|
|
120
|
+
});
|
|
121
|
+
function getFileNames(files) {
|
|
122
|
+
return Array.isArray(files) ? files.map((file) => file.name).join(", ") : files?.name ?? "";
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
model,
|
|
126
|
+
classNames,
|
|
127
|
+
getFileNames
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
</script>
|
|
132
|
+
|
|
133
|
+
<style lang="postcss">
|
|
134
|
+
.input-file {
|
|
135
|
+
> .input-group > .input-group__addon {
|
|
136
|
+
@apply p-1;
|
|
137
|
+
|
|
138
|
+
> .btn {
|
|
139
|
+
@apply py-0 px-3 h-full items-center;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&--disabled,
|
|
144
|
+
&:disabled {
|
|
145
|
+
.input-group__addon,
|
|
146
|
+
.input-group .input__form {
|
|
147
|
+
@apply bg-muted border-muted text-muted;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&:hover {
|
|
152
|
+
.input-group__addon,
|
|
153
|
+
.input-group .input__form {
|
|
154
|
+
@apply border-subtle;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&&--disabled {
|
|
159
|
+
> .input-group > .input-group__addon > .btn {
|
|
160
|
+
@apply opacity-100;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&&--error {
|
|
165
|
+
.input-group__addon,
|
|
166
|
+
.input-group .input__form {
|
|
167
|
+
@apply border-danger-emphasis;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
</style>
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { PropType } from 'vue-demi';
|
|
2
|
+
import { ModelModifier, MultipleType } from '../dropzone';
|
|
3
|
+
import { SizeVariant } from '../button';
|
|
4
|
+
declare const _default: import("vue-demi").DefineComponent<{
|
|
5
|
+
modelValue: {
|
|
6
|
+
type: PropType<string | string[] | File | File[]>;
|
|
7
|
+
default: any;
|
|
8
|
+
};
|
|
9
|
+
modelModifiers: {
|
|
10
|
+
type: PropType<ModelModifier>;
|
|
11
|
+
default: () => ModelModifier;
|
|
12
|
+
};
|
|
13
|
+
multiple: {
|
|
14
|
+
type: PropType<boolean | MultipleType>;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
maxlength: {
|
|
18
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
19
|
+
default: any;
|
|
20
|
+
};
|
|
21
|
+
accept: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
clearOnCancel: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
placeholder: {
|
|
30
|
+
type: StringConstructor;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
browseLabel: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
disabled: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
readonly: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
45
|
+
error: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
49
|
+
size: {
|
|
50
|
+
type: PropType<SizeVariant>;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
}, {
|
|
54
|
+
model: import("vue-demi").Ref<string | string[] | File | File[]>;
|
|
55
|
+
classNames: import("vue-demi").ComputedRef<string[]>;
|
|
56
|
+
getFileNames: (files: Array<globalThis.File> | globalThis.File) => string;
|
|
57
|
+
}, 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<{
|
|
58
|
+
modelValue: {
|
|
59
|
+
type: PropType<string | string[] | File | File[]>;
|
|
60
|
+
default: any;
|
|
61
|
+
};
|
|
62
|
+
modelModifiers: {
|
|
63
|
+
type: PropType<ModelModifier>;
|
|
64
|
+
default: () => ModelModifier;
|
|
65
|
+
};
|
|
66
|
+
multiple: {
|
|
67
|
+
type: PropType<boolean | MultipleType>;
|
|
68
|
+
default: boolean;
|
|
69
|
+
};
|
|
70
|
+
maxlength: {
|
|
71
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
72
|
+
default: any;
|
|
73
|
+
};
|
|
74
|
+
accept: {
|
|
75
|
+
type: StringConstructor;
|
|
76
|
+
default: string;
|
|
77
|
+
};
|
|
78
|
+
clearOnCancel: {
|
|
79
|
+
type: BooleanConstructor;
|
|
80
|
+
default: boolean;
|
|
81
|
+
};
|
|
82
|
+
placeholder: {
|
|
83
|
+
type: StringConstructor;
|
|
84
|
+
default: string;
|
|
85
|
+
};
|
|
86
|
+
browseLabel: {
|
|
87
|
+
type: StringConstructor;
|
|
88
|
+
default: string;
|
|
89
|
+
};
|
|
90
|
+
disabled: {
|
|
91
|
+
type: BooleanConstructor;
|
|
92
|
+
default: boolean;
|
|
93
|
+
};
|
|
94
|
+
readonly: {
|
|
95
|
+
type: BooleanConstructor;
|
|
96
|
+
default: boolean;
|
|
97
|
+
};
|
|
98
|
+
error: {
|
|
99
|
+
type: BooleanConstructor;
|
|
100
|
+
default: boolean;
|
|
101
|
+
};
|
|
102
|
+
size: {
|
|
103
|
+
type: PropType<SizeVariant>;
|
|
104
|
+
default: string;
|
|
105
|
+
};
|
|
106
|
+
}>>, {
|
|
107
|
+
error: boolean;
|
|
108
|
+
size: SizeVariant;
|
|
109
|
+
disabled: boolean;
|
|
110
|
+
modelValue: string | string[] | File | File[];
|
|
111
|
+
readonly: boolean;
|
|
112
|
+
modelModifiers: ModelModifier;
|
|
113
|
+
multiple: boolean | MultipleType;
|
|
114
|
+
placeholder: string;
|
|
115
|
+
accept: string;
|
|
116
|
+
maxlength: string | number;
|
|
117
|
+
clearOnCancel: boolean;
|
|
118
|
+
browseLabel: string;
|
|
119
|
+
}>;
|
|
120
|
+
export default _default;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="input-group"
|
|
4
|
+
data-testid="input-group"
|
|
5
|
+
:class="classNames">
|
|
6
|
+
<slot />
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import {
|
|
12
|
+
computed,
|
|
13
|
+
defineComponent
|
|
14
|
+
} from "vue-demi";
|
|
15
|
+
export default defineComponent({
|
|
16
|
+
props: {
|
|
17
|
+
size: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "md"
|
|
20
|
+
},
|
|
21
|
+
disabled: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false
|
|
24
|
+
},
|
|
25
|
+
readonly: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
error: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
setup(props) {
|
|
35
|
+
const classNames = computed(() => {
|
|
36
|
+
const result = [];
|
|
37
|
+
if (props.size)
|
|
38
|
+
result.push(`input-group--${props.size}`);
|
|
39
|
+
if (props.disabled)
|
|
40
|
+
result.push("input-group--disabled", "state--disabled");
|
|
41
|
+
if (props.readonly)
|
|
42
|
+
result.push("input-group--readonly");
|
|
43
|
+
if (props.error)
|
|
44
|
+
result.push("input-group--error", "state--error");
|
|
45
|
+
return result;
|
|
46
|
+
});
|
|
47
|
+
return { classNames };
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<style lang="postcss">
|
|
53
|
+
.input-group {
|
|
54
|
+
@apply flex w-full;
|
|
55
|
+
|
|
56
|
+
> .input-group__addon:not(:first-child),
|
|
57
|
+
> .input:not(:first-child) > .input__form,
|
|
58
|
+
> .select:not(:first-child) > .input > .input__form {
|
|
59
|
+
@apply rounded-l-none border-l-0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
> .input-group__addon:not(:last-child),
|
|
63
|
+
> .input:not(:last-child) > .input__form,
|
|
64
|
+
> .select:not(:last-child) > .input > .input__form {
|
|
65
|
+
@apply rounded-r-none border-r-0;
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.input,
|
|
70
|
+
.select > .input {
|
|
71
|
+
> .input__form {
|
|
72
|
+
&:focus,
|
|
73
|
+
&:hover {
|
|
74
|
+
@apply border-r border-l;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
> .btn:not(:first-child) {
|
|
80
|
+
@apply rounded-l-none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
> .btn:not(:last-child) {
|
|
84
|
+
@apply rounded-r-none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&__addon {
|
|
88
|
+
@apply flex-shrink-0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&&--xs {
|
|
92
|
+
.input > .input__form {
|
|
93
|
+
@apply text-xs px-3 py-2;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.btn {
|
|
97
|
+
@apply px-2 py-1 gap-1 text-sm;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&&--sm {
|
|
102
|
+
.input > .input__form {
|
|
103
|
+
@apply px-3 py-2;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.btn {
|
|
107
|
+
@apply px-4 py-2 gap-2 text-base;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&&--md {
|
|
112
|
+
.input > .input__form {
|
|
113
|
+
@apply px-3 py-3;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.btn {
|
|
117
|
+
@apply px-5 py-3 gap-3 text-base;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&&--lg {
|
|
122
|
+
.input > .input__form {
|
|
123
|
+
@apply px-3 py-4;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.btn {
|
|
127
|
+
@apply px-8 py-4 gap-4 text-base;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
</style>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { PropType } from 'vue-demi';
|
|
2
|
+
import { SizeVariant } from '../button';
|
|
3
|
+
declare const _default: import("vue-demi").DefineComponent<{
|
|
4
|
+
size: {
|
|
5
|
+
type: PropType<SizeVariant>;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
disabled: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
readonly: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
error: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
}, {
|
|
21
|
+
classNames: import("vue-demi").ComputedRef<string[]>;
|
|
22
|
+
}, 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<{
|
|
23
|
+
size: {
|
|
24
|
+
type: PropType<SizeVariant>;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
disabled: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
readonly: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
error: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
}>>, {
|
|
40
|
+
error: boolean;
|
|
41
|
+
size: SizeVariant;
|
|
42
|
+
disabled: boolean;
|
|
43
|
+
readonly: boolean;
|
|
44
|
+
}>;
|
|
45
|
+
export default _default;
|