@privyid/persona 0.10.0 → 0.12.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 +3 -2
- 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/BreadcrumbItem.vue +1 -0
- package/dist/components/breadcrumbs/BreadcrumbItem.vue.d.ts +1 -1
- package/dist/components/breadcrumbs/BreadcrumbItemDropdown.vue +3 -0
- package/dist/components/breadcrumbs/index.d.ts +1 -1
- package/dist/components/button/Button.vue +69 -11
- package/dist/components/button/Button.vue.d.ts +4 -4
- package/dist/components/button/index.d.ts +4 -4
- 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 +15 -6
- 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 +2 -1
- 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 +8 -2
- package/dist/components/dot/Dot.vue +12 -2
- package/dist/components/dot/Dot.vue.d.ts +3 -2
- package/dist/components/dot/index.d.ts +1 -2
- package/dist/components/dropdown/Dropdown.vue +2 -0
- package/dist/components/dropdown/Dropdown.vue.d.ts +8 -8
- package/dist/components/dropdown/DropdownItem.vue +5 -1
- package/dist/components/dropdown/DropdownItem.vue.d.ts +3 -3
- 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 +68 -19
- package/dist/components/input/Input.vue.d.ts +3 -3
- package/dist/components/input-file/InputFile.vue +13 -2
- package/dist/components/input-file/InputFile.vue.d.ts +12 -12
- 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 +4 -4
- 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 +4 -5
- package/dist/components/label/index.d.ts +1 -0
- package/dist/components/label/index.mjs +0 -0
- package/dist/components/main/Main.vue +18 -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 +6 -6
- package/dist/components/nav/NavItemDropdown.vue +20 -2
- package/dist/components/nav/NavItemDropdown.vue.d.ts +26 -3
- 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 +5 -2
- 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 +10 -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 +0 -2
- package/dist/components/pdf-helipad/PdfHelipad.vue.d.ts +1 -1
- 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/PdfObjectAddon.vue +1 -0
- 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/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 +2 -2
- package/dist/components/pdf-text/PdfText.vue.d.ts +5 -5
- 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 +7 -1
- package/dist/components/pdf-viewer/PdfViewer.vue.d.ts +12 -12
- 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/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 +16 -7
- 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 +69 -1
- package/dist/components/table/Table.vue.d.ts +18 -9
- 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 +17 -7
- 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 +11 -3
- 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 +56 -2
- 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/module.json +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +16 -14
- 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-helipad/assets/helicopter.svg +0 -1
- 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
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type ElementVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
2
|
+
export type WeightVariant = 'normal' | 'medium' | 'bold';
|
|
3
|
+
export type TransformVariant = 'normalcase' | 'lowercase' | 'capitalize' | 'uppercase';
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
<div
|
|
3
3
|
class="input"
|
|
4
4
|
data-testid="input-container">
|
|
5
|
-
<
|
|
5
|
+
<span
|
|
6
|
+
v-if="$slots.prepend"
|
|
7
|
+
class="input__prepend">
|
|
8
|
+
<slot name="prepend" />
|
|
9
|
+
</span>
|
|
6
10
|
<input
|
|
7
11
|
v-model="model"
|
|
8
12
|
class="input__form"
|
|
@@ -16,17 +20,23 @@
|
|
|
16
20
|
class="input__clear"
|
|
17
21
|
data-testid="input-clear"
|
|
18
22
|
@click="clear" />
|
|
19
|
-
<
|
|
23
|
+
<span
|
|
24
|
+
v-if="$slots.append"
|
|
25
|
+
class="input__append">
|
|
26
|
+
<slot name="append" />
|
|
27
|
+
</span>
|
|
20
28
|
</div>
|
|
21
29
|
</template>
|
|
22
30
|
|
|
23
31
|
<script>
|
|
24
32
|
import {
|
|
25
33
|
computed,
|
|
26
|
-
defineComponent
|
|
34
|
+
defineComponent,
|
|
35
|
+
inject
|
|
27
36
|
} from "vue-demi";
|
|
28
37
|
import { useVModel } from ".";
|
|
29
38
|
import IconClear from "@carbon/icons-vue/lib/close--filled/16";
|
|
39
|
+
import { INPUTGROUP_SETTING } from "../input-group";
|
|
30
40
|
export default defineComponent({
|
|
31
41
|
components: { IconClear },
|
|
32
42
|
inheritAttrs: false,
|
|
@@ -61,11 +71,14 @@ export default defineComponent({
|
|
|
61
71
|
event: "update:modelValue"
|
|
62
72
|
},
|
|
63
73
|
emits: ["update:modelValue", "clear"],
|
|
64
|
-
setup(props, { emit }) {
|
|
74
|
+
setup(props, { emit, slots }) {
|
|
65
75
|
const model = useVModel(props);
|
|
76
|
+
const setting = inject(INPUTGROUP_SETTING, void 0, false);
|
|
66
77
|
const classNames = computed(() => {
|
|
67
78
|
const result = [];
|
|
68
|
-
if (
|
|
79
|
+
if (setting?.size.value)
|
|
80
|
+
result.push(`input--${setting?.size.value}`);
|
|
81
|
+
else if (props.size)
|
|
69
82
|
result.push(`input--${props.size}`);
|
|
70
83
|
if (props.disabled)
|
|
71
84
|
result.push("input--disabled");
|
|
@@ -75,6 +88,10 @@ export default defineComponent({
|
|
|
75
88
|
result.push("input--error", "state--error");
|
|
76
89
|
if (props.clearable)
|
|
77
90
|
result.push("input--clearable");
|
|
91
|
+
if (slots.prepend)
|
|
92
|
+
result.push("input--has-prepend");
|
|
93
|
+
if (slots.append)
|
|
94
|
+
result.push("input--has-append");
|
|
78
95
|
return result;
|
|
79
96
|
});
|
|
80
97
|
function clear(event) {
|
|
@@ -94,48 +111,51 @@ export default defineComponent({
|
|
|
94
111
|
<style lang="postcss">
|
|
95
112
|
.input {
|
|
96
113
|
@apply w-full relative bg-default rounded;
|
|
114
|
+
@apply dark:bg-dark-default;
|
|
97
115
|
|
|
98
116
|
&__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;
|
|
117
|
+
@apply py-[10px] px-3 text-base relative rounded border border-solid border-muted hover:border-subtle text-default placeholder:text-muted w-full outline-none;
|
|
118
|
+
@apply dark:border-dark-muted hover:dark:border-dark-subtle dark:text-dark-default placeholder:dark:text-dark-muted;
|
|
100
119
|
|
|
101
120
|
&:disabled,
|
|
102
121
|
&--disabled,
|
|
103
122
|
.state--disabled & {
|
|
104
|
-
@apply bg-
|
|
123
|
+
@apply bg-subtle border-subtle pointer-events-none text-muted;
|
|
124
|
+
@apply dark:bg-dark-subtle dark:border-dark-subtle dark:text-dark-muted;
|
|
105
125
|
}
|
|
106
126
|
|
|
107
127
|
&:focus {
|
|
108
128
|
@apply border-subtle ring-4 ring-subtle/10 z-[1];
|
|
129
|
+
@apply dark:border-dark-subtle dark:ring-dark-subtle/10;
|
|
109
130
|
}
|
|
110
131
|
}
|
|
111
132
|
|
|
112
133
|
&--xs {
|
|
113
|
-
@apply text-
|
|
134
|
+
@apply text-sm py-[2px] rounded-xs;
|
|
114
135
|
}
|
|
115
136
|
|
|
116
137
|
&--sm {
|
|
117
|
-
@apply
|
|
138
|
+
@apply py-[4px] rounded-sm;
|
|
118
139
|
}
|
|
119
140
|
|
|
120
141
|
&--md {
|
|
121
|
-
@apply
|
|
142
|
+
@apply py-[10px];
|
|
122
143
|
}
|
|
123
144
|
|
|
124
145
|
&--lg {
|
|
125
|
-
@apply
|
|
146
|
+
@apply py-4;
|
|
126
147
|
}
|
|
127
148
|
|
|
128
|
-
.state--error
|
|
129
|
-
&--error
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
@apply ring-danger border-danger-emphasis;
|
|
134
|
-
}
|
|
149
|
+
.state--error,
|
|
150
|
+
&--error,
|
|
151
|
+
&-group--error.input-group .input > .input__form {
|
|
152
|
+
@apply border-danger-emphasis hover:border-danger-emphasis focus:ring-danger focus:border-danger-emphasis;
|
|
153
|
+
@apply dark:border-dark-danger-emphasis hover:dark:border-dark-danger-emphasis focus:dark:ring-dark-danger focus:dark:border-dark-danger-emphasis;
|
|
135
154
|
}
|
|
136
155
|
|
|
137
156
|
.input__clear {
|
|
138
|
-
@apply cursor-pointer hover:text-danger z-1;
|
|
157
|
+
@apply text-default/30 cursor-pointer hover:text-danger z-1;
|
|
158
|
+
@apply dark:text-dark-default/30 hover:dark:text-dark-danger;
|
|
139
159
|
}
|
|
140
160
|
|
|
141
161
|
&--clearable {
|
|
@@ -144,6 +164,35 @@ export default defineComponent({
|
|
|
144
164
|
+ .input__clear {
|
|
145
165
|
@apply absolute right-3 top-1/2 -translate-y-1/2;
|
|
146
166
|
}
|
|
167
|
+
|
|
168
|
+
&:where(.input--has-append) {
|
|
169
|
+
+ .input__clear {
|
|
170
|
+
@apply right-10;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&__prepend,
|
|
176
|
+
&__append {
|
|
177
|
+
@apply absolute top-0 h-full flex items-center;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&__prepend {
|
|
181
|
+
@apply left-3;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&__append {
|
|
185
|
+
@apply right-3;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&--has {
|
|
189
|
+
&-prepend {
|
|
190
|
+
@apply pl-9;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&-append {
|
|
194
|
+
@apply pr-9;
|
|
195
|
+
}
|
|
147
196
|
}
|
|
148
197
|
}
|
|
149
198
|
</style>
|
|
@@ -55,13 +55,13 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
55
55
|
default: boolean;
|
|
56
56
|
};
|
|
57
57
|
}>> & {
|
|
58
|
-
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
59
|
-
onClear?: (...args: any[]) => any;
|
|
58
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
59
|
+
onClear?: ((...args: any[]) => any) | undefined;
|
|
60
60
|
}, {
|
|
61
61
|
error: boolean;
|
|
62
62
|
size: SizeVariant;
|
|
63
|
-
disabled: boolean;
|
|
64
63
|
modelValue: string | number;
|
|
64
|
+
disabled: boolean;
|
|
65
65
|
readonly: boolean;
|
|
66
66
|
clearable: boolean;
|
|
67
67
|
}>;
|
|
@@ -154,7 +154,7 @@ export default defineComponent({
|
|
|
154
154
|
<style lang="postcss">
|
|
155
155
|
.input-file {
|
|
156
156
|
> .input-group > .input-group__addon {
|
|
157
|
-
@apply
|
|
157
|
+
@apply py-1 pl-1 pr-2;
|
|
158
158
|
|
|
159
159
|
> .btn {
|
|
160
160
|
@apply py-0 px-3 h-full items-center mr-4;
|
|
@@ -169,7 +169,16 @@ export default defineComponent({
|
|
|
169
169
|
&:disabled {
|
|
170
170
|
.input-group__addon,
|
|
171
171
|
.input-group .input__form {
|
|
172
|
-
@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
|
+
}
|
|
173
182
|
}
|
|
174
183
|
}
|
|
175
184
|
|
|
@@ -177,6 +186,7 @@ export default defineComponent({
|
|
|
177
186
|
.input-group__addon,
|
|
178
187
|
.input-group .input__form {
|
|
179
188
|
@apply border-subtle;
|
|
189
|
+
@apply dark:border-dark-subtle;
|
|
180
190
|
}
|
|
181
191
|
}
|
|
182
192
|
|
|
@@ -190,6 +200,7 @@ export default defineComponent({
|
|
|
190
200
|
.input-group__addon,
|
|
191
201
|
.input-group .input__form {
|
|
192
202
|
@apply border-danger-emphasis;
|
|
203
|
+
@apply dark:border-dark-danger-emphasis;
|
|
193
204
|
}
|
|
194
205
|
}
|
|
195
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,7 +16,7 @@ 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;
|
|
@@ -55,14 +55,14 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
55
55
|
default: string;
|
|
56
56
|
};
|
|
57
57
|
}, {
|
|
58
|
-
model: import("vue-demi").Ref<string | string[] | File | File[]>;
|
|
58
|
+
model: import("vue-demi").Ref<string | string[] | File | File[] | undefined>;
|
|
59
59
|
classNames: import("vue-demi").ComputedRef<string[]>;
|
|
60
60
|
getFileNames: (files: Array<globalThis.File> | globalThis.File) => string;
|
|
61
61
|
clear: () => void;
|
|
62
|
-
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("
|
|
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<{
|
|
63
63
|
modelValue: {
|
|
64
64
|
type: PropType<string | string[] | File | File[]>;
|
|
65
|
-
default:
|
|
65
|
+
default: undefined;
|
|
66
66
|
};
|
|
67
67
|
modelModifiers: {
|
|
68
68
|
type: PropType<ModelModifier>;
|
|
@@ -74,7 +74,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
74
74
|
};
|
|
75
75
|
maxlength: {
|
|
76
76
|
type: (NumberConstructor | StringConstructor)[];
|
|
77
|
-
default:
|
|
77
|
+
default: undefined;
|
|
78
78
|
};
|
|
79
79
|
accept: {
|
|
80
80
|
type: StringConstructor;
|
|
@@ -113,21 +113,21 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
113
113
|
default: string;
|
|
114
114
|
};
|
|
115
115
|
}>> & {
|
|
116
|
-
onChange?: (...args: any[]) => any;
|
|
117
|
-
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
118
|
-
onCancel?: (...args: any[]) => any;
|
|
119
|
-
onClear?: (...args: any[]) => any;
|
|
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
120
|
}, {
|
|
121
121
|
error: boolean;
|
|
122
122
|
size: SizeVariant;
|
|
123
|
-
disabled: boolean;
|
|
124
123
|
modelValue: string | string[] | File | File[];
|
|
124
|
+
disabled: boolean;
|
|
125
125
|
readonly: boolean;
|
|
126
126
|
modelModifiers: ModelModifier;
|
|
127
127
|
multiple: boolean | MultipleType;
|
|
128
128
|
placeholder: string;
|
|
129
|
-
accept: string;
|
|
130
129
|
maxlength: string | number;
|
|
130
|
+
accept: string;
|
|
131
131
|
clearOnCancel: boolean;
|
|
132
132
|
clearable: boolean;
|
|
133
133
|
browseLabel: string;
|
|
@@ -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
|
-
error: boolean;
|
|
59
58
|
length: string | number;
|
|
60
|
-
|
|
59
|
+
error: 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 {
|