@privyid/persona 0.9.0 → 0.11.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/avatar/Avatar.vue +1 -0
- package/dist/components/avatar/Avatar.vue.d.ts +13 -13
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/badge/Badge.vue +48 -8
- package/dist/components/badge/Badge.vue.d.ts +2 -1
- package/dist/components/badge/index.d.ts +1 -2
- package/dist/components/banner/Banner.vue +19 -7
- package/dist/components/banner/Banner.vue.d.ts +1 -1
- package/dist/components/banner/index.d.ts +1 -1
- package/dist/components/breadcrumbs/Breadcrumb.vue +60 -0
- package/dist/components/breadcrumbs/Breadcrumb.vue.d.ts +41 -0
- package/dist/components/breadcrumbs/BreadcrumbItem.vue +87 -0
- package/dist/components/breadcrumbs/BreadcrumbItem.vue.d.ts +28 -0
- package/dist/components/breadcrumbs/BreadcrumbItemDropdown.vue +68 -0
- package/dist/components/breadcrumbs/BreadcrumbItemDropdown.vue.d.ts +25 -0
- package/dist/components/breadcrumbs/index.d.ts +11 -0
- package/dist/components/breadcrumbs/index.mjs +3 -0
- package/dist/components/button/Button.vue +84 -14
- package/dist/components/button/Button.vue.d.ts +12 -2
- package/dist/components/button/index.d.ts +4 -3
- package/dist/components/button-group/ButtonGroup.vue +11 -18
- package/dist/components/button-group/index.d.ts +6 -0
- package/dist/components/button-group/index.mjs +1 -0
- package/dist/components/calendar/Calendar.vue +8 -3
- package/dist/components/calendar/Calendar.vue.d.ts +31 -31
- package/dist/components/calendar/adapter/adapter.d.ts +1 -1
- package/dist/components/calendar/adapter/date.mjs +1 -1
- package/dist/components/camera/Camera.vue +7 -3
- package/dist/components/camera/Camera.vue.d.ts +19 -19
- package/dist/components/camera/adapter/adapter.d.ts +2 -2
- package/dist/components/camera/adapter/liveness.mjs +1 -1
- package/dist/components/caption/Caption.vue +1 -0
- package/dist/components/caption/index.d.ts +1 -1
- package/dist/components/card/Card.vue +9 -3
- package/dist/components/card/Card.vue.d.ts +5 -5
- package/dist/components/card/CardSection.vue.d.ts +2 -2
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/chart/Chart.vue +1 -0
- package/dist/components/chart/ChartVal.vue.d.ts +2 -2
- package/dist/components/chart/adapter/index.d.ts +1 -1
- package/dist/components/chart/index.d.ts +1 -1
- package/dist/components/checkbox/Checkbox.vue +14 -5
- package/dist/components/checkbox/Checkbox.vue.d.ts +13 -13
- package/dist/components/collapse/Collapse.vue +2 -1
- package/dist/components/collapse/Collapse.vue.d.ts +1 -1
- package/dist/components/contextual-bar/ContextualBar.vue +15 -3
- package/dist/components/contextual-bar/ContextualBar.vue.d.ts +11 -11
- package/dist/components/contextual-bar/index.d.ts +1 -1
- package/dist/components/cropper/Cropper.vue +3 -2
- package/dist/components/cropper/Cropper.vue.d.ts +20 -20
- package/dist/components/cropper/utils/use-pinch.mjs +10 -2
- package/dist/components/datepicker/Datepicker.vue +1 -0
- package/dist/components/datepicker/Datepicker.vue.d.ts +16 -16
- package/dist/components/dialog/Dialog.vue.d.ts +2 -2
- package/dist/components/dialog/DialogFooter.vue +2 -2
- package/dist/components/dialog/DialogFooter.vue.d.ts +7 -7
- package/dist/components/dialog/index.d.ts +11 -16
- package/dist/components/divider/Divider.vue +12 -2
- package/dist/components/dot/Dot.vue +12 -2
- package/dist/components/dot/Dot.vue.d.ts +2 -1
- package/dist/components/dot/index.d.ts +1 -2
- package/dist/components/dropdown/Dropdown.vue +5 -3
- package/dist/components/dropdown/Dropdown.vue.d.ts +8 -8
- package/dist/components/dropdown/DropdownItem.vue +49 -6
- package/dist/components/dropdown/DropdownItem.vue.d.ts +22 -1
- package/dist/components/dropdown-subitem/DropdownSubitem.vue.d.ts +3 -3
- package/dist/components/dropzone/Dropzone.vue.d.ts +12 -12
- package/dist/components/dropzone/index.d.ts +1 -1
- package/dist/components/filterbar/Filterbar.vue +7 -6
- package/dist/components/filterbar/Filterbar.vue.d.ts +3 -3
- package/dist/components/filterbar/index.d.ts +1 -1
- package/dist/components/filterbar/pinned/{Date.vue.d.ts → PinnedDate.vue.d.ts} +8 -8
- package/dist/components/filterbar/pinned/{Multiselect.vue.d.ts → PinnedMultiselect.vue.d.ts} +5 -5
- package/dist/components/filterbar/pinned/{Select.vue.d.ts → PinnedSelect.vue.d.ts} +10 -10
- package/dist/components/filterbar/pinned/{Toggle.vue.d.ts → PinnedToggle.vue.d.ts} +11 -11
- package/dist/components/form-group/FormGroup.vue +9 -4
- package/dist/components/form-group/FormGroup.vue.d.ts +2 -2
- package/dist/components/global/context.d.ts +1 -1
- package/dist/components/global/use-singleton.d.ts +2 -2
- package/dist/components/global/utils/queue.d.ts +2 -2
- package/dist/components/heading/Heading.vue +6 -0
- package/dist/components/heading/index.d.ts +3 -3
- package/dist/components/input/Input.vue +27 -19
- package/dist/components/input/Input.vue.d.ts +4 -4
- package/dist/components/input-file/InputFile.vue +42 -6
- package/dist/components/input-file/InputFile.vue.d.ts +24 -9
- package/dist/components/input-group/InputGroup.vue +55 -41
- package/dist/components/input-group/InputGroupAddon.vue +10 -11
- package/dist/components/input-group/index.d.ts +6 -0
- package/dist/components/input-group/index.mjs +1 -0
- package/dist/components/input-password/InputPassword.vue +3 -1
- package/dist/components/input-pin/InputPin.vue +3 -3
- package/dist/components/input-pin/InputPin.vue.d.ts +3 -3
- package/dist/components/input-range/InputRange.vue +8 -5
- package/dist/components/input-range/InputRange.vue.d.ts +11 -11
- package/dist/components/input-range/utils/use-drag.mjs +5 -1
- package/dist/components/label/Label.vue +34 -7
- package/dist/components/label/Label.vue.d.ts +3 -4
- package/dist/components/label/index.d.ts +1 -0
- package/dist/components/label/index.mjs +0 -0
- package/dist/components/main/Main.vue +7 -3
- package/dist/components/modal/Modal.vue +19 -6
- package/dist/components/modal/Modal.vue.d.ts +9 -9
- package/dist/components/nav/Nav.vue +24 -8
- package/dist/components/nav/Nav.vue.d.ts +2 -2
- package/dist/components/nav/NavForm.vue +1 -1
- package/dist/components/nav/NavItem.vue +2 -0
- package/dist/components/nav/NavItem.vue.d.ts +8 -8
- package/dist/components/nav/NavItemDropdown.vue.d.ts +1 -1
- package/dist/components/nav/NavSubItem.vue +4 -0
- package/dist/components/nav/NavSubItem.vue.d.ts +2 -2
- package/dist/components/nav/index.d.ts +2 -2
- package/dist/components/navbar/Navbar.vue +6 -3
- package/dist/components/navbar/Navbar.vue.d.ts +5 -5
- package/dist/components/navbar/NavbarBrand.vue +2 -1
- package/dist/components/navbar/NavbarBrand.vue.d.ts +2 -2
- package/dist/components/navbar/NavbarNav.vue +16 -5
- package/dist/components/navbar/NavbarNav.vue.d.ts +2 -2
- package/dist/components/navbar/NavbarToggle.vue +2 -1
- package/dist/components/navbar/index.d.ts +1 -1
- package/dist/components/overlay/Overlay.vue +2 -1
- package/dist/components/page/Page.vue +13 -9
- package/dist/components/page/Page.vue.d.ts +3 -3
- package/dist/components/pagination/Pagination.vue +16 -9
- package/dist/components/pagination/Pagination.vue.d.ts +5 -5
- package/dist/components/pagination/index.d.ts +1 -1
- package/dist/components/pagination/index.mjs +1 -1
- package/dist/components/pagination/utils/calculate-page.d.ts +1 -1
- package/dist/components/pdf-helipad/PdfHelipad.vue +134 -0
- package/dist/components/pdf-helipad/PdfHelipad.vue.d.ts +45 -0
- package/dist/components/pdf-helipad/index.d.ts +7 -0
- package/dist/components/pdf-helipad/index.mjs +0 -0
- package/dist/components/pdf-helipad/utils/use-drag.d.ts +8 -0
- package/dist/components/pdf-helipad/utils/use-drag.mjs +38 -0
- package/dist/components/pdf-object/PdfObject.vue +3 -1
- package/dist/components/pdf-object/PdfObject.vue.d.ts +20 -20
- package/dist/components/pdf-object/PdfObjectDebugger.vue +4 -1
- package/dist/components/pdf-object/PdfObjectDebugger.vue.d.ts +5 -5
- package/dist/components/pdf-object/PdfObjects.vue +1 -0
- package/dist/components/pdf-object/index.d.ts +5 -5
- package/dist/components/pdf-object/utils/overlap.d.ts +1 -1
- package/dist/components/pdf-object/utils/position.d.ts +1 -1
- package/dist/components/pdf-object/utils/use-drop.mjs +1 -1
- package/dist/components/pdf-text/PdfText.vue +129 -0
- package/dist/components/pdf-text/PdfText.vue.d.ts +168 -0
- package/dist/components/pdf-text/utils/text-to-image.d.ts +68 -0
- package/dist/components/pdf-text/utils/text-to-image.mjs +118 -0
- package/dist/components/pdf-viewer/PdfError.vue +20 -3
- package/dist/components/pdf-viewer/PdfLoading.vue +1 -1
- package/dist/components/pdf-viewer/PdfNavigation.vue +9 -5
- package/dist/components/pdf-viewer/PdfViewer.vue +11 -3
- package/dist/components/pdf-viewer/PdfViewer.vue.d.ts +12 -12
- package/dist/components/pdf-viewer/assets/pdf-loading.svg +1 -100
- package/dist/components/pdf-viewer/index.d.ts +1 -1
- package/dist/components/pdf-viewer/utils/use-viewer.d.ts +7 -7
- package/dist/components/progress/Progress.vue +15 -7
- package/dist/components/progress/Progress.vue.d.ts +2 -2
- package/dist/components/progress/ProgressItem.vue.d.ts +1 -1
- package/dist/components/radio/Radio.vue +17 -6
- package/dist/components/radio/Radio.vue.d.ts +9 -9
- package/dist/components/radio/index.d.ts +1 -1
- package/dist/components/select/Select.vue +10 -1
- package/dist/components/select/Select.vue.d.ts +11 -11
- package/dist/components/select/adapter/async-adapter.d.ts +2 -2
- package/dist/components/sidebar/Sidebar.vue +10 -4
- package/dist/components/sidebar/Sidebar.vue.d.ts +3 -3
- package/dist/components/sidebar/SidebarBrand.vue +2 -1
- package/dist/components/sidebar/SidebarBrand.vue.d.ts +2 -2
- package/dist/components/sidebar/SidebarNav.vue +5 -17
- package/dist/components/sidebar/SidebarNav.vue.d.ts +4 -4
- package/dist/components/sidebar/index.d.ts +1 -1
- package/dist/components/sidebar-menu/SidebarMenu.vue +1 -1
- package/dist/components/sidebar-menu/SidebarMenu.vue.d.ts +4 -4
- package/dist/components/signature-draw/SignatureDraw.vue.d.ts +3 -3
- package/dist/components/signature-draw/SignatureDrawDesktop.vue +4 -1
- package/dist/components/signature-draw/SignatureDrawDesktop.vue.d.ts +3 -3
- package/dist/components/signature-draw/SignatureDrawMobile.vue +5 -0
- package/dist/components/signature-draw/SignatureDrawMobile.vue.d.ts +3 -3
- package/dist/components/signature-draw/utils/canvas.d.ts +1 -1
- package/dist/components/signature-draw/utils/smooth-line.mjs +15 -0
- package/dist/components/signature-draw/utils/use-draw.mjs +5 -1
- package/dist/components/signature-text/SignatureText.vue +9 -4
- package/dist/components/signature-text/SignatureText.vue.d.ts +17 -8
- package/dist/components/steps/Step.vue.d.ts +5 -5
- package/dist/components/steps/Steps.vue.d.ts +1 -1
- package/dist/components/steps/index.d.ts +9 -9
- package/dist/components/steps/utils/hook.d.ts +1 -1
- package/dist/components/strengthbar/Strengthbar.vue +4 -0
- package/dist/components/subheading/Subheading.vue +1 -1
- package/dist/components/subheading/Subheading.vue.d.ts +2 -2
- package/dist/components/subheading/index.d.ts +1 -1
- package/dist/components/table/Table.vue +82 -6
- package/dist/components/table/Table.vue.d.ts +19 -10
- package/dist/components/tabs/Tabs.vue +4 -1
- package/dist/components/tabs/Tabs.vue.d.ts +2 -2
- package/dist/components/text/Text.vue.d.ts +2 -2
- package/dist/components/text/index.d.ts +1 -1
- package/dist/components/textarea/Textarea.vue +8 -7
- package/dist/components/textarea/Textarea.vue.d.ts +5 -5
- package/dist/components/toast/Toast.vue +17 -3
- package/dist/components/toast/Toast.vue.d.ts +1 -1
- package/dist/components/toast/ToastContainer.vue.d.ts +4 -4
- package/dist/components/toast/index.d.ts +2 -2
- package/dist/components/toggle/Toggle.vue +26 -8
- package/dist/components/toggle/Toggle.vue.d.ts +12 -12
- package/dist/components/tooltip/Tooltip.vue +6 -2
- package/dist/components/tooltip/Tooltip.vue.d.ts +7 -7
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/index.mjs +1 -1
- package/dist/components/tooltip/utils/create-handler.d.ts +1 -1
- package/dist/components/tour/Tour.vue.d.ts +3 -3
- package/dist/components/tour/TourDialog.vue +9 -1
- package/dist/components/tour/TourDialog.vue.d.ts +8 -8
- package/dist/components/tour/TourHighlight.vue.d.ts +2 -2
- package/dist/components/tour/core/base.d.ts +1 -1
- package/dist/components/tour/core/base.mjs +15 -0
- package/dist/components/tour/core/step/action.d.ts +4 -4
- package/dist/components/tour/core/step.d.ts +3 -3
- package/dist/components/tour/core/step.mjs +19 -0
- package/dist/components/tour/core/story.d.ts +1 -1
- package/dist/components/tour/core/story.mjs +81 -0
- package/dist/components/tour/core/tour.d.ts +1 -1
- package/dist/components/tour/core/tour.mjs +55 -1
- package/dist/components/truncate/Truncate.vue +8 -0
- package/dist/components/utils/base64.mjs +1 -1
- package/dist/components/utils/value.d.ts +4 -4
- package/dist/components/wizard/Wizard.vue.d.ts +6 -6
- package/dist/components/wizard/WizardBody.vue.d.ts +1 -1
- package/dist/components/wizard/WizardStep.vue.d.ts +4 -4
- package/dist/core/index.d.ts +3 -1
- package/dist/core/index.mjs +4 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -0
- package/dist/types.d.ts +1 -1
- package/package.json +14 -12
- package/dist/components/badge/assets/images/img-guide-badge.svg +0 -1
- package/dist/components/card/assets/images/img-card-callout-01.svg +0 -1
- package/dist/components/contextual-bar/assets/images/img-background-contextualbar.svg +0 -14
- package/dist/components/contextual-bar/assets/images/img-bg-contextualbar.svg +0 -19
- package/dist/components/cropper/assets/sample-1.jpg +0 -0
- package/dist/components/modal/assets/images/img-modal-banner-sheet.jpg +0 -0
- package/dist/components/pdf-object-text/PdfObjectText.vue +0 -170
- package/dist/components/pdf-object-text/PdfObjectText.vue.d.ts +0 -140
- package/dist/components/pdf-object-text/utils/text-to-image.d.ts +0 -51
- package/dist/components/pdf-object-text/utils/text-to-image.mjs +0 -77
- package/dist/components/pdf-viewer/assets/Calibrator-v3.pdf +8 -99519
- package/dist/components/pdf-viewer/assets/Calibrator-v3_protected.pdf +0 -0
- package/dist/components/pdf-viewer/assets/fixed-vs-fit.svg +0 -186
- package/dist/components/pdf-viewer/assets/sample-3.pdf +0 -0
- package/dist/components/pdf-viewer/assets/sample-with-sign.pdf +0 -0
- package/dist/components/pdf-viewer/assets/sample.pdf +0 -18304
- package/dist/components/sidebar/assets/images/icon-flag.svg +0 -1
- package/dist/components/sidebar/assets/images/logo-privy-icon.svg +0 -1
- package/dist/components/sidebar/assets/images/logo-privy.svg +0 -1
- package/dist/components/sidebar-menu/assets/images/img-flag.svg +0 -1
- package/dist/components/signature-draw/assets/empty-img.png +0 -0
- package/dist/components/signature-text/sample/sample-signature.png +0 -0
- /package/dist/components/filterbar/pinned/{Date.vue → PinnedDate.vue} +0 -0
- /package/dist/components/filterbar/pinned/{Multiselect.vue → PinnedMultiselect.vue} +0 -0
- /package/dist/components/filterbar/pinned/{Select.vue → PinnedSelect.vue} +0 -0
- /package/dist/components/filterbar/pinned/{Toggle.vue → PinnedToggle.vue} +0 -0
|
@@ -26,8 +26,10 @@
|
|
|
26
26
|
</p-input-group-addon>
|
|
27
27
|
<p-input
|
|
28
28
|
readonly
|
|
29
|
+
:clearable="clearable"
|
|
29
30
|
:model-value="getFileNames(rawModel)"
|
|
30
|
-
:placeholder="placeholder"
|
|
31
|
+
:placeholder="placeholder"
|
|
32
|
+
@clear.stop.prevent="clear" />
|
|
31
33
|
</p-input-group>
|
|
32
34
|
</template>
|
|
33
35
|
</p-dropzone>
|
|
@@ -44,6 +46,7 @@ import pInput from "../input/Input.vue";
|
|
|
44
46
|
import pInputGroup from "../input-group/InputGroup.vue";
|
|
45
47
|
import pInputGroupAddon from "../input-group/InputGroupAddon.vue";
|
|
46
48
|
import pButton from "../button/Button.vue";
|
|
49
|
+
import { templateRef } from "@vueuse/core";
|
|
47
50
|
export default defineComponent({
|
|
48
51
|
components: {
|
|
49
52
|
pDropzone,
|
|
@@ -77,6 +80,10 @@ export default defineComponent({
|
|
|
77
80
|
type: String,
|
|
78
81
|
default: ""
|
|
79
82
|
},
|
|
83
|
+
clearable: {
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: false
|
|
86
|
+
},
|
|
80
87
|
clearOnCancel: {
|
|
81
88
|
type: Boolean,
|
|
82
89
|
default: false
|
|
@@ -106,8 +113,15 @@ export default defineComponent({
|
|
|
106
113
|
default: "md"
|
|
107
114
|
}
|
|
108
115
|
},
|
|
109
|
-
|
|
116
|
+
emits: [
|
|
117
|
+
"update:modelValue",
|
|
118
|
+
"clear",
|
|
119
|
+
"change",
|
|
120
|
+
"cancel"
|
|
121
|
+
],
|
|
122
|
+
setup(props, { emit }) {
|
|
110
123
|
const model = useVModel(props);
|
|
124
|
+
const dropzone = templateRef("dropzone");
|
|
111
125
|
const classNames = computed(() => {
|
|
112
126
|
const result = [];
|
|
113
127
|
if (props.readonly)
|
|
@@ -121,10 +135,17 @@ export default defineComponent({
|
|
|
121
135
|
function getFileNames(files) {
|
|
122
136
|
return Array.isArray(files) ? files.map((file) => file.name).join(", ") : files?.name ?? "";
|
|
123
137
|
}
|
|
138
|
+
function clear() {
|
|
139
|
+
const event = new Event("clear");
|
|
140
|
+
emit("clear", event);
|
|
141
|
+
if (!props.disabled && !props.readonly && !event.defaultPrevented)
|
|
142
|
+
dropzone.value.clear();
|
|
143
|
+
}
|
|
124
144
|
return {
|
|
125
145
|
model,
|
|
126
146
|
classNames,
|
|
127
|
-
getFileNames
|
|
147
|
+
getFileNames,
|
|
148
|
+
clear
|
|
128
149
|
};
|
|
129
150
|
}
|
|
130
151
|
});
|
|
@@ -133,18 +154,31 @@ export default defineComponent({
|
|
|
133
154
|
<style lang="postcss">
|
|
134
155
|
.input-file {
|
|
135
156
|
> .input-group > .input-group__addon {
|
|
136
|
-
@apply
|
|
157
|
+
@apply py-1 pl-1 pr-2;
|
|
137
158
|
|
|
138
159
|
> .btn {
|
|
139
|
-
@apply py-0 px-3 h-full items-center;
|
|
160
|
+
@apply py-0 px-3 h-full items-center mr-4;
|
|
140
161
|
}
|
|
141
162
|
}
|
|
142
163
|
|
|
164
|
+
.input__clear {
|
|
165
|
+
@apply pointer-events-auto;
|
|
166
|
+
}
|
|
167
|
+
|
|
143
168
|
&--disabled,
|
|
144
169
|
&:disabled {
|
|
145
170
|
.input-group__addon,
|
|
146
171
|
.input-group .input__form {
|
|
147
|
-
@apply bg-
|
|
172
|
+
@apply bg-subtle text-muted;
|
|
173
|
+
@apply dark:bg-dark-subtle dark:text-dark-muted;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.input-group__addon {
|
|
177
|
+
@apply rounded-l-sm;
|
|
178
|
+
|
|
179
|
+
+ .input {
|
|
180
|
+
@apply rounded-r-sm;
|
|
181
|
+
}
|
|
148
182
|
}
|
|
149
183
|
}
|
|
150
184
|
|
|
@@ -152,6 +186,7 @@ export default defineComponent({
|
|
|
152
186
|
.input-group__addon,
|
|
153
187
|
.input-group .input__form {
|
|
154
188
|
@apply border-subtle;
|
|
189
|
+
@apply dark:border-dark-subtle;
|
|
155
190
|
}
|
|
156
191
|
}
|
|
157
192
|
|
|
@@ -165,6 +200,7 @@ export default defineComponent({
|
|
|
165
200
|
.input-group__addon,
|
|
166
201
|
.input-group .input__form {
|
|
167
202
|
@apply border-danger-emphasis;
|
|
203
|
+
@apply dark:border-dark-danger-emphasis;
|
|
168
204
|
}
|
|
169
205
|
}
|
|
170
206
|
}
|
|
@@ -4,7 +4,7 @@ import { SizeVariant } from '../button';
|
|
|
4
4
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
5
5
|
modelValue: {
|
|
6
6
|
type: PropType<string | string[] | File | File[]>;
|
|
7
|
-
default:
|
|
7
|
+
default: undefined;
|
|
8
8
|
};
|
|
9
9
|
modelModifiers: {
|
|
10
10
|
type: PropType<ModelModifier>;
|
|
@@ -16,12 +16,16 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
16
16
|
};
|
|
17
17
|
maxlength: {
|
|
18
18
|
type: (NumberConstructor | StringConstructor)[];
|
|
19
|
-
default:
|
|
19
|
+
default: undefined;
|
|
20
20
|
};
|
|
21
21
|
accept: {
|
|
22
22
|
type: StringConstructor;
|
|
23
23
|
default: string;
|
|
24
24
|
};
|
|
25
|
+
clearable: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
25
29
|
clearOnCancel: {
|
|
26
30
|
type: BooleanConstructor;
|
|
27
31
|
default: boolean;
|
|
@@ -51,13 +55,14 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
51
55
|
default: string;
|
|
52
56
|
};
|
|
53
57
|
}, {
|
|
54
|
-
model: import("vue-demi").Ref<string | string[] | File | File[]>;
|
|
58
|
+
model: import("vue-demi").Ref<string | string[] | File | File[] | undefined>;
|
|
55
59
|
classNames: import("vue-demi").ComputedRef<string[]>;
|
|
56
60
|
getFileNames: (files: Array<globalThis.File> | globalThis.File) => string;
|
|
57
|
-
|
|
61
|
+
clear: () => void;
|
|
62
|
+
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("cancel" | "change" | "update:modelValue" | "clear")[], "cancel" | "change" | "update:modelValue" | "clear", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
58
63
|
modelValue: {
|
|
59
64
|
type: PropType<string | string[] | File | File[]>;
|
|
60
|
-
default:
|
|
65
|
+
default: undefined;
|
|
61
66
|
};
|
|
62
67
|
modelModifiers: {
|
|
63
68
|
type: PropType<ModelModifier>;
|
|
@@ -69,12 +74,16 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
69
74
|
};
|
|
70
75
|
maxlength: {
|
|
71
76
|
type: (NumberConstructor | StringConstructor)[];
|
|
72
|
-
default:
|
|
77
|
+
default: undefined;
|
|
73
78
|
};
|
|
74
79
|
accept: {
|
|
75
80
|
type: StringConstructor;
|
|
76
81
|
default: string;
|
|
77
82
|
};
|
|
83
|
+
clearable: {
|
|
84
|
+
type: BooleanConstructor;
|
|
85
|
+
default: boolean;
|
|
86
|
+
};
|
|
78
87
|
clearOnCancel: {
|
|
79
88
|
type: BooleanConstructor;
|
|
80
89
|
default: boolean;
|
|
@@ -103,18 +112,24 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
103
112
|
type: PropType<SizeVariant>;
|
|
104
113
|
default: string;
|
|
105
114
|
};
|
|
106
|
-
}
|
|
115
|
+
}>> & {
|
|
116
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
117
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
118
|
+
onCancel?: ((...args: any[]) => any) | undefined;
|
|
119
|
+
onClear?: ((...args: any[]) => any) | undefined;
|
|
120
|
+
}, {
|
|
107
121
|
error: boolean;
|
|
108
122
|
size: SizeVariant;
|
|
109
|
-
disabled: boolean;
|
|
110
123
|
modelValue: string | string[] | File | File[];
|
|
124
|
+
disabled: boolean;
|
|
111
125
|
readonly: boolean;
|
|
112
126
|
modelModifiers: ModelModifier;
|
|
113
127
|
multiple: boolean | MultipleType;
|
|
114
128
|
placeholder: string;
|
|
115
|
-
accept: string;
|
|
116
129
|
maxlength: string | number;
|
|
130
|
+
accept: string;
|
|
117
131
|
clearOnCancel: boolean;
|
|
132
|
+
clearable: boolean;
|
|
118
133
|
browseLabel: string;
|
|
119
134
|
}>;
|
|
120
135
|
export default _default;
|
|
@@ -10,8 +10,11 @@
|
|
|
10
10
|
<script>
|
|
11
11
|
import {
|
|
12
12
|
computed,
|
|
13
|
-
defineComponent
|
|
13
|
+
defineComponent,
|
|
14
|
+
provide,
|
|
15
|
+
toRef
|
|
14
16
|
} from "vue-demi";
|
|
17
|
+
import { INPUTGROUP_SETTING } from ".";
|
|
15
18
|
export default defineComponent({
|
|
16
19
|
props: {
|
|
17
20
|
size: {
|
|
@@ -32,6 +35,7 @@ export default defineComponent({
|
|
|
32
35
|
}
|
|
33
36
|
},
|
|
34
37
|
setup(props) {
|
|
38
|
+
provide(INPUTGROUP_SETTING, { size: toRef(props, "size") });
|
|
35
39
|
const classNames = computed(() => {
|
|
36
40
|
const result = [];
|
|
37
41
|
if (props.size)
|
|
@@ -55,9 +59,11 @@ export default defineComponent({
|
|
|
55
59
|
|
|
56
60
|
&:has(:first-child:is(.input-group__addon):nth-last-child(2)) {
|
|
57
61
|
@apply rounded bg-default focus-within:ring-4 focus-within:ring-subtle/10 border border-solid border-muted hover:border-subtle focus-within:border-subtle;
|
|
62
|
+
@apply dark:bg-dark-default focus-within:dark:ring-dark-subtle/10 dark:border-dark-muted hover:dark:border-dark-subtle focus-within:dark:border-dark-subtle;
|
|
58
63
|
|
|
59
64
|
.input {
|
|
60
65
|
@apply bg-transparent;
|
|
66
|
+
@apply dark:bg-transparent;
|
|
61
67
|
}
|
|
62
68
|
|
|
63
69
|
.input > .input__form,
|
|
@@ -68,21 +74,34 @@ export default defineComponent({
|
|
|
68
74
|
.input > .input__form {
|
|
69
75
|
@apply focus:ring-0;
|
|
70
76
|
}
|
|
77
|
+
|
|
78
|
+
&.input-group--disabled {
|
|
79
|
+
@apply border-subtle;
|
|
80
|
+
@apply dark:border-dark-subtle;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&.state--error,
|
|
84
|
+
&.input-group--error {
|
|
85
|
+
@apply border-danger-emphasis hover:border-danger-emphasis focus-within:ring-danger focus-within:border-danger-emphasis;
|
|
86
|
+
@apply dark:border-dark-danger-emphasis hover:dark:border-dark-danger-emphasis focus-within:dark:ring-dark-danger focus-within:dark:border-dark-danger-emphasis;
|
|
87
|
+
}
|
|
71
88
|
}
|
|
72
89
|
|
|
73
90
|
& > .input-group__addon:not(:first-child),
|
|
74
91
|
& > .input:not(:first-child) > .input__form,
|
|
75
92
|
& > .select:not(:first-child) > .input > .input__form {
|
|
76
93
|
@apply rounded-l-none border-l-transparent;
|
|
94
|
+
@apply dark:border-l-transparent;
|
|
77
95
|
}
|
|
78
96
|
|
|
79
97
|
& > .input-group__addon:not(:last-child),
|
|
80
98
|
& > .input:not(:last-child) > .input__form {
|
|
81
99
|
@apply rounded-r-none border-r-transparent;
|
|
100
|
+
@apply dark:border-r-transparent;
|
|
82
101
|
}
|
|
83
102
|
|
|
84
103
|
& > .select:not(:last-child) > .input > .input__form {
|
|
85
|
-
@apply rounded-r-none;
|
|
104
|
+
@apply rounded-r-none z-1;
|
|
86
105
|
}
|
|
87
106
|
|
|
88
107
|
& > .input-group__addon,
|
|
@@ -96,16 +115,27 @@ export default defineComponent({
|
|
|
96
115
|
|
|
97
116
|
.input,
|
|
98
117
|
.select > .input {
|
|
118
|
+
@apply rounded-none;
|
|
119
|
+
|
|
120
|
+
&:first-child {
|
|
121
|
+
@apply rounded-l;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&:last-child {
|
|
125
|
+
@apply rounded-r;
|
|
126
|
+
}
|
|
127
|
+
|
|
99
128
|
> .input__form {
|
|
100
129
|
&:hover,
|
|
101
130
|
&:focus {
|
|
102
131
|
@apply z-[2] border-l-subtle border-r-subtle;
|
|
132
|
+
@apply dark:border-l-dark-subtle dark:border-r-dark-subtle;
|
|
103
133
|
}
|
|
104
134
|
}
|
|
105
135
|
}
|
|
106
136
|
|
|
107
137
|
& > .btn {
|
|
108
|
-
@apply z-
|
|
138
|
+
@apply z-1;
|
|
109
139
|
|
|
110
140
|
&:not(:first-child) {
|
|
111
141
|
@apply rounded-l-none -ml-[1px];
|
|
@@ -116,53 +146,37 @@ export default defineComponent({
|
|
|
116
146
|
}
|
|
117
147
|
}
|
|
118
148
|
|
|
119
|
-
|
|
120
|
-
@apply
|
|
149
|
+
&&--disabled {
|
|
150
|
+
@apply border-subtle border-solid border rounded;
|
|
151
|
+
@apply dark:border-dark-subtle;
|
|
121
152
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
153
|
+
> .input > .input__form,
|
|
154
|
+
> .input-group__addon,
|
|
155
|
+
> .btn.btn--variant-input {
|
|
156
|
+
@apply border-transparent;
|
|
157
|
+
@apply dark:border-transparent;
|
|
126
158
|
}
|
|
127
|
-
}
|
|
128
159
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
160
|
+
> .input:first-child .input__form,
|
|
161
|
+
> .input-group__addon:first-child,
|
|
162
|
+
> .btn:first-child {
|
|
163
|
+
@apply rounded-l-sm;
|
|
132
164
|
}
|
|
133
165
|
|
|
134
|
-
.
|
|
135
|
-
|
|
166
|
+
> .input:last-child .input__form,
|
|
167
|
+
> .input-group__addon:last-child,
|
|
168
|
+
> .btn:last-child {
|
|
169
|
+
@apply rounded-r-sm;
|
|
136
170
|
}
|
|
137
171
|
}
|
|
138
172
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
@apply px-3 py-2;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.btn {
|
|
145
|
-
@apply px-4 py-2 gap-2 text-base;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
&&--md {
|
|
150
|
-
.input > .input__form {
|
|
151
|
-
@apply px-3 py-3;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.btn {
|
|
155
|
-
@apply px-5 py-3 gap-3 text-base;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
&&--lg {
|
|
160
|
-
.input > .input__form {
|
|
161
|
-
@apply px-3 py-4;
|
|
162
|
-
}
|
|
173
|
+
&:is(&--xs, &--sm, &--md, &--lg) > &__addon {
|
|
174
|
+
@apply flex-shrink-0;
|
|
163
175
|
|
|
164
|
-
.
|
|
165
|
-
|
|
176
|
+
+ .input {
|
|
177
|
+
> .input__form {
|
|
178
|
+
@apply pl-0;
|
|
179
|
+
}
|
|
166
180
|
}
|
|
167
181
|
}
|
|
168
182
|
}
|
|
@@ -7,36 +7,35 @@
|
|
|
7
7
|
<style lang="postcss">
|
|
8
8
|
.input-group {
|
|
9
9
|
&__addon {
|
|
10
|
-
@apply flex items-center
|
|
10
|
+
@apply flex px-3 items-center rounded border border-solid border-muted outline-none text-muted bg-default;
|
|
11
|
+
@apply dark:border-dark-muted dark:text-dark-muted dark:bg-dark-default;
|
|
11
12
|
|
|
12
13
|
.input-group--xs > & {
|
|
13
|
-
@apply text-
|
|
14
|
+
@apply text-sm py-[2px];
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
.input-group--sm > & {
|
|
17
|
-
@apply
|
|
18
|
+
@apply py-1;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
.input-group--md > & {
|
|
21
|
-
@apply
|
|
22
|
+
@apply py-[10px];
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
.input-group--lg > & {
|
|
25
|
-
@apply
|
|
26
|
+
@apply py-4;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
.state--error &,
|
|
29
30
|
.input-group--error & {
|
|
30
|
-
@apply border-danger-emphasis;
|
|
31
|
-
|
|
32
|
-
&:focus {
|
|
33
|
-
@apply ring-danger border-danger-emphasis;
|
|
34
|
-
}
|
|
31
|
+
@apply border-danger-emphasis focus:ring-danger focus:border-danger-emphasis;
|
|
32
|
+
@apply dark:border-dark-danger-emphasis focus:dark:ring-dark-danger focus:dark:border-dark-danger-emphasis;
|
|
35
33
|
}
|
|
36
34
|
|
|
37
35
|
.state--disabled &,
|
|
38
36
|
.input-group--disabled & {
|
|
39
|
-
@apply bg-
|
|
37
|
+
@apply bg-subtle border-subtle pointer-events-none text-muted;
|
|
38
|
+
@apply dark:bg-dark-subtle dark:border-dark-subtle dark:text-dark-muted;
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const INPUTGROUP_SETTING = Symbol("InputGroupSetting");
|
|
@@ -44,10 +44,12 @@ export default defineComponent({
|
|
|
44
44
|
@apply pr-9;
|
|
45
45
|
|
|
46
46
|
&__toggle {
|
|
47
|
-
@apply absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer z-1;
|
|
47
|
+
@apply absolute right-3 top-1/2 -translate-y-1/2 cursor-pointer z-1 text-default/30 hover:text-subtle;
|
|
48
|
+
@apply dark:text-dark-default/30 hover:dark:text-dark-subtle;
|
|
48
49
|
|
|
49
50
|
.input--disabled ~ & {
|
|
50
51
|
@apply pointer-events-none text-muted;
|
|
52
|
+
@apply dark:text-dark-muted;
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
|
|
@@ -70,7 +70,7 @@ export default defineComponent({
|
|
|
70
70
|
setup(props, { emit }) {
|
|
71
71
|
const root = templateRef("root");
|
|
72
72
|
const num = useToNumber(toRef(props, "length"));
|
|
73
|
-
const localModel = ref([...props.modelValue].slice(0, num.value)
|
|
73
|
+
const localModel = ref([...props.modelValue.padEnd(num.value)].slice(0, num.value));
|
|
74
74
|
const classNames = computed(() => {
|
|
75
75
|
const result = [];
|
|
76
76
|
if (props.disabled)
|
|
@@ -84,7 +84,7 @@ export default defineComponent({
|
|
|
84
84
|
const { next: nextFocus, prev: prevFocus } = useFocus(root, false);
|
|
85
85
|
const model = computed({
|
|
86
86
|
get() {
|
|
87
|
-
return [...props.modelValue].slice(0, num.value);
|
|
87
|
+
return [...props.modelValue.padEnd(num.value)].slice(0, num.value);
|
|
88
88
|
},
|
|
89
89
|
set(value) {
|
|
90
90
|
const text = value.map((val) => val || " ").join("").trimEnd();
|
|
@@ -110,7 +110,7 @@ export default defineComponent({
|
|
|
110
110
|
event.target.select();
|
|
111
111
|
}
|
|
112
112
|
function onDelete(event) {
|
|
113
|
-
if (root.value && !event.target.value)
|
|
113
|
+
if (root.value && !event.target.value.trim())
|
|
114
114
|
prevFocus();
|
|
115
115
|
}
|
|
116
116
|
function onPaste(event) {
|
|
@@ -52,13 +52,13 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
52
52
|
default: boolean;
|
|
53
53
|
};
|
|
54
54
|
}>> & {
|
|
55
|
-
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
56
|
-
onClear?: (...args: any[]) => any;
|
|
55
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
56
|
+
onClear?: ((...args: any[]) => any) | undefined;
|
|
57
57
|
}, {
|
|
58
58
|
error: boolean;
|
|
59
59
|
length: string | number;
|
|
60
|
-
disabled: boolean;
|
|
61
60
|
modelValue: string;
|
|
61
|
+
disabled: boolean;
|
|
62
62
|
readonly: boolean;
|
|
63
63
|
}>;
|
|
64
64
|
export default _default;
|
|
@@ -233,14 +233,16 @@ export default defineComponent({
|
|
|
233
233
|
@apply py-2 w-full;
|
|
234
234
|
|
|
235
235
|
&__tracks {
|
|
236
|
-
@apply relative flex w-full bg-
|
|
236
|
+
@apply relative flex w-full bg-base cursor-pointer overflow-visible rounded;
|
|
237
|
+
@apply dark:bg-dark-base;
|
|
237
238
|
}
|
|
238
239
|
|
|
239
240
|
&__track {
|
|
240
241
|
@apply h-2 rounded;
|
|
241
242
|
|
|
242
243
|
&-active {
|
|
243
|
-
@apply bg-
|
|
244
|
+
@apply bg-info-emphasis relative text-center;
|
|
245
|
+
@apply dark:bg-dark-info-emphasis;
|
|
244
246
|
}
|
|
245
247
|
|
|
246
248
|
&-upper {
|
|
@@ -249,12 +251,13 @@ export default defineComponent({
|
|
|
249
251
|
}
|
|
250
252
|
|
|
251
253
|
&__thumb {
|
|
252
|
-
@apply w-4 h-4 rounded-full bg-default shadow-sm absolute top-1/2 bottom-0 -translate-y-1/2 border border-
|
|
253
|
-
@apply
|
|
254
|
+
@apply w-4 h-4 rounded-full bg-default shadow-sm absolute top-1/2 bottom-0 -translate-y-1/2 border border-muted touch-none select-none;
|
|
255
|
+
@apply dark:bg-dark-layer-2 dark:border-dark-subtle;
|
|
254
256
|
|
|
255
257
|
&:hover,
|
|
256
258
|
&:active {
|
|
257
|
-
@apply ring ring-
|
|
259
|
+
@apply ring ring-info border-info-emphasis;
|
|
260
|
+
@apply dark:ring-dark-info dark:border-dark-info-emphasis;
|
|
258
261
|
}
|
|
259
262
|
|
|
260
263
|
&-start {
|
|
@@ -2,15 +2,15 @@ import { PropType, StyleValue } from 'vue-demi';
|
|
|
2
2
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
3
3
|
modelValue: {
|
|
4
4
|
type: PropType<number | [number, number]>;
|
|
5
|
-
default:
|
|
5
|
+
default: undefined;
|
|
6
6
|
};
|
|
7
7
|
start: {
|
|
8
8
|
type: NumberConstructor;
|
|
9
|
-
default:
|
|
9
|
+
default: undefined;
|
|
10
10
|
};
|
|
11
11
|
end: {
|
|
12
12
|
type: NumberConstructor;
|
|
13
|
-
default:
|
|
13
|
+
default: undefined;
|
|
14
14
|
};
|
|
15
15
|
step: {
|
|
16
16
|
type: (NumberConstructor | StringConstructor)[];
|
|
@@ -50,15 +50,15 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
50
50
|
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("change" | "update:modelValue" | "update:end" | "update:start")[], "change" | "update:modelValue" | "update:end" | "update:start", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
51
51
|
modelValue: {
|
|
52
52
|
type: PropType<number | [number, number]>;
|
|
53
|
-
default:
|
|
53
|
+
default: undefined;
|
|
54
54
|
};
|
|
55
55
|
start: {
|
|
56
56
|
type: NumberConstructor;
|
|
57
|
-
default:
|
|
57
|
+
default: undefined;
|
|
58
58
|
};
|
|
59
59
|
end: {
|
|
60
60
|
type: NumberConstructor;
|
|
61
|
-
default:
|
|
61
|
+
default: undefined;
|
|
62
62
|
};
|
|
63
63
|
step: {
|
|
64
64
|
type: (NumberConstructor | StringConstructor)[];
|
|
@@ -89,18 +89,18 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
89
89
|
default: boolean;
|
|
90
90
|
};
|
|
91
91
|
}>> & {
|
|
92
|
-
onChange?: (...args: any[]) => any;
|
|
93
|
-
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
94
|
-
"onUpdate:end"?: (...args: any[]) => any;
|
|
95
|
-
"onUpdate:start"?: (...args: any[]) => any;
|
|
92
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
93
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
94
|
+
"onUpdate:end"?: ((...args: any[]) => any) | undefined;
|
|
95
|
+
"onUpdate:start"?: ((...args: any[]) => any) | undefined;
|
|
96
96
|
}, {
|
|
97
97
|
error: boolean;
|
|
98
|
-
disabled: boolean;
|
|
99
98
|
min: string | number;
|
|
100
99
|
max: string | number;
|
|
101
100
|
start: number;
|
|
102
101
|
end: number;
|
|
103
102
|
modelValue: number | [number, number];
|
|
103
|
+
disabled: boolean;
|
|
104
104
|
readonly: boolean;
|
|
105
105
|
multiple: boolean;
|
|
106
106
|
step: string | number;
|
|
@@ -11,7 +11,11 @@ export default function useDrag(target, handler) {
|
|
|
11
11
|
instance.value.unset();
|
|
12
12
|
if (element) {
|
|
13
13
|
const { default: Interact } = await import("interactjs");
|
|
14
|
-
const onmove = throttle(
|
|
14
|
+
const onmove = throttle(
|
|
15
|
+
handler,
|
|
16
|
+
1e3 / 120
|
|
17
|
+
/* limit 120fps */
|
|
18
|
+
);
|
|
15
19
|
instance.value = Interact(element).styleCursor(false).draggable({ onmove });
|
|
16
20
|
}
|
|
17
21
|
});
|