@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
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<component
|
|
3
|
+
:is="tagName"
|
|
4
|
+
:href="href"
|
|
3
5
|
data-testid="btn"
|
|
4
6
|
:class="classNames">
|
|
5
7
|
<slot />
|
|
6
|
-
</
|
|
8
|
+
</component>
|
|
7
9
|
</template>
|
|
8
10
|
|
|
9
11
|
<script>
|
|
10
12
|
import {
|
|
11
13
|
computed,
|
|
12
|
-
defineComponent
|
|
14
|
+
defineComponent,
|
|
15
|
+
inject
|
|
13
16
|
} from "vue-demi";
|
|
17
|
+
import { BUTTONGROUP_SETTING } from "../button-group";
|
|
18
|
+
import { INPUTGROUP_SETTING } from "../input-group";
|
|
14
19
|
export default defineComponent({
|
|
15
20
|
props: {
|
|
16
21
|
variant: {
|
|
@@ -32,16 +37,26 @@ export default defineComponent({
|
|
|
32
37
|
pill: {
|
|
33
38
|
type: Boolean,
|
|
34
39
|
default: false
|
|
40
|
+
},
|
|
41
|
+
href: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: void 0
|
|
35
44
|
}
|
|
36
45
|
},
|
|
37
46
|
setup(props) {
|
|
47
|
+
const inputSetting = inject(INPUTGROUP_SETTING, void 0, false);
|
|
48
|
+
const buttonSetting = inject(BUTTONGROUP_SETTING, void 0, false);
|
|
38
49
|
const classNames = computed(() => {
|
|
39
50
|
const result = ["btn"];
|
|
40
51
|
if (props.color)
|
|
41
52
|
result.push(`btn--${props.color}`);
|
|
42
53
|
if (props.variant)
|
|
43
54
|
result.push(`btn--variant-${props.variant}`);
|
|
44
|
-
if (
|
|
55
|
+
if (inputSetting?.size.value)
|
|
56
|
+
result.push(`btn--${inputSetting?.size.value}`);
|
|
57
|
+
else if (buttonSetting?.size.value)
|
|
58
|
+
result.push(`btn--${buttonSetting?.size.value}`);
|
|
59
|
+
else if (props.size)
|
|
45
60
|
result.push(`btn--${props.size}`);
|
|
46
61
|
if (props.icon)
|
|
47
62
|
result.push("btn--icon");
|
|
@@ -49,7 +64,13 @@ export default defineComponent({
|
|
|
49
64
|
result.push("btn--pill");
|
|
50
65
|
return result;
|
|
51
66
|
});
|
|
52
|
-
|
|
67
|
+
const tagName = computed(() => {
|
|
68
|
+
let tag = "button";
|
|
69
|
+
if (props.href)
|
|
70
|
+
tag = "a";
|
|
71
|
+
return tag;
|
|
72
|
+
});
|
|
73
|
+
return { classNames, tagName };
|
|
53
74
|
}
|
|
54
75
|
});
|
|
55
76
|
</script>
|
|
@@ -62,14 +83,26 @@ export default defineComponent({
|
|
|
62
83
|
* Last Update : Nov 21, 2022
|
|
63
84
|
*/
|
|
64
85
|
.btn {
|
|
65
|
-
--p-color-primary-hover: darken(theme(
|
|
66
|
-
--p-color-primary-
|
|
86
|
+
--p-color-primary-hover: darken(theme(colors.brand.accent), 5%);
|
|
87
|
+
--p-color-dark-primary-hover: darken(theme(colors.dark.brand.accent), 5%);
|
|
88
|
+
--p-color-primary-focus: darken(theme(colors.brand.accent), 10%);
|
|
89
|
+
--p-color-dark-primary-focus: darken(theme(colors.dark.brand.accent), 10%);
|
|
90
|
+
--p-color-info-hover: darken(theme(backgroundColor.info.emphasis), 5%);
|
|
91
|
+
--p-color-dark-info-hover: darken(theme(backgroundColor.dark.info.emphasis), 5%);
|
|
92
|
+
--p-color-info-focus: darken(theme(backgroundColor.info.emphasis), 10%);
|
|
93
|
+
--p-color-dark-info-focus: darken(theme(backgroundColor.dark.info.emphasis), 10%);
|
|
67
94
|
--p-color-success-hover: darken(theme(backgroundColor.success.emphasis), 5%);
|
|
95
|
+
--p-color-dark-success-hover: darken(theme(backgroundColor.dark.success.emphasis), 5%);
|
|
68
96
|
--p-color-success-focus: darken(theme(backgroundColor.success.emphasis), 10%);
|
|
97
|
+
--p-color-dark-success-focus: darken(theme(backgroundColor.dark.success.emphasis), 10%);
|
|
69
98
|
--p-color-warning-hover: darken(theme(backgroundColor.warning.emphasis), 5%);
|
|
99
|
+
--p-color-dark-warning-hover: darken(theme(backgroundColor.dark.warning.emphasis), 5%);
|
|
70
100
|
--p-color-warning-focus: darken(theme(backgroundColor.warning.emphasis), 10%);
|
|
101
|
+
--p-color-dark-warning-focus: darken(theme(backgroundColor.dark.warning.emphasis), 10%);
|
|
71
102
|
--p-color-danger-hover: darken(theme(backgroundColor.danger.emphasis), 5%);
|
|
103
|
+
--p-color-dark-danger-hover: darken(theme(backgroundColor.dark.danger.emphasis), 5%);
|
|
72
104
|
--p-color-danger-focus: darken(theme(backgroundColor.danger.emphasis), 10%);
|
|
105
|
+
--p-color-dark-danger-focus: darken(theme(backgroundColor.dark.danger.emphasis), 10%);
|
|
73
106
|
|
|
74
107
|
@apply inline-flex align-middle font-medium disabled:opacity-50 disabled:pointer-events-none transition-all ease-in-out duration-200;
|
|
75
108
|
|
|
@@ -106,27 +139,38 @@ export default defineComponent({
|
|
|
106
139
|
* default style variant
|
|
107
140
|
*/
|
|
108
141
|
&&--variant-solid {
|
|
109
|
-
@apply border border-solid hover:shadow-lg focus:shadow-none active:shadow-none text-
|
|
142
|
+
@apply border border-solid hover:shadow-lg focus:shadow-none active:shadow-none text-state-emphasis;
|
|
143
|
+
@apply dark:text-dark-state-emphasis;
|
|
110
144
|
|
|
111
145
|
&.btn {
|
|
112
146
|
&--default {
|
|
113
147
|
@apply bg-default-alpha focus:bg-subtle-alpha active:bg-subtle-alpha text-subtle hover:text-default focus:text-default;
|
|
148
|
+
@apply dark:bg-dark-default-alpha focus:dark:bg-dark-subtle-alpha active:dark:bg-dark-subtle-alpha dark:text-dark-subtle hover:dark:text-dark-default focus:dark:text-dark-default;
|
|
114
149
|
}
|
|
115
150
|
|
|
116
151
|
&--primary {
|
|
117
|
-
@apply bg-accent
|
|
152
|
+
@apply bg-brand-accent hover:bg-[color:var(--p-color-primary-hover)] focus:bg-[color:var(--p-color-primary-focus)] active:bg-[color:var(--p-color-primary-focus)];
|
|
153
|
+
@apply dark:bg-dark-brand-accent hover:dark:bg-[color:var(--p-color-dark-primary-hover)] focus:dark:bg-[color:var(--p-color-dark-primary-focus)] active:dark:bg-[color:var(--p-color-dark-primary-focus)];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&--info {
|
|
157
|
+
@apply bg-info-emphasis hover:bg-[color:var(--p-color-info-hover)] focus:bg-[color:var(--p-color-info-focus)] active:bg-[color:var(--p-color-info-focus)];
|
|
158
|
+
@apply dark:bg-dark-info-emphasis hover:dark:bg-[color:var(--p-color-dark-info-hover)] focus:dark:bg-[color:var(--p-color-dark-info-focus)] active:dark:bg-[color:var(--p-color-dark-info-focus)];
|
|
118
159
|
}
|
|
119
160
|
|
|
120
161
|
&--success {
|
|
121
162
|
@apply bg-success-emphasis hover:bg-[color:var(--p-color-success-hover)] focus:bg-[color:var(--p-color-success-focus)] active:bg-[color:var(--p-color-success-focus)];
|
|
163
|
+
@apply dark:bg-dark-success-emphasis hover:dark:bg-[color:var(--p-color-dark-success-hover)] focus:dark:bg-[color:var(--p-color-dark-success-focus)] active:dark:bg-[color:var(--p-color-dark-success-focus)]
|
|
122
164
|
}
|
|
123
165
|
|
|
124
166
|
&--warning {
|
|
125
167
|
@apply bg-warning-emphasis hover:bg-[color:var(--p-color-warning-hover)] focus:bg-[color:var(--p-color-warning-focus)] active:bg-[color:var(--p-color-warning-focus)];
|
|
168
|
+
@apply dark:bg-dark-warning-emphasis hover:dark:bg-[color:var(--p-color-dark-warning-hover)] focus:dark:bg-[color:var(--p-color-dark-warning-focus)] active:dark:bg-[color:var(--p-color-dark-warning-focus)];
|
|
126
169
|
}
|
|
127
170
|
|
|
128
171
|
&--danger {
|
|
129
172
|
@apply bg-danger-emphasis hover:bg-[color:var(--p-color-danger-hover)] focus:bg-[color:var(--p-color-danger-focus)] active:bg-[color:var(--p-color-danger-focus)];
|
|
173
|
+
@apply dark:bg-dark-danger-emphasis hover:dark:bg-[color:var(--p-color-dark-danger-hover)] focus:dark:bg-[color:var(--p-color-dark-danger-focus)] active:dark:bg-[color:var(--p-color-dark-danger-focus)]
|
|
130
174
|
}
|
|
131
175
|
}
|
|
132
176
|
}
|
|
@@ -134,6 +178,7 @@ export default defineComponent({
|
|
|
134
178
|
&&--variant-outline,
|
|
135
179
|
&&--variant-ghost {
|
|
136
180
|
@apply border border-solid text-subtle hover:text-default hover:shadow-lg focus:shadow-none active:shadow-none focus:text-default active:text-default;
|
|
181
|
+
@apply dark:text-dark-subtle hover:dark:text-dark-default focus:dark:text-dark-default active:dark:text-dark-default;
|
|
137
182
|
}
|
|
138
183
|
|
|
139
184
|
/**
|
|
@@ -147,22 +192,32 @@ export default defineComponent({
|
|
|
147
192
|
&.btn {
|
|
148
193
|
&--default {
|
|
149
194
|
@apply border-default-alpha hover:border-subtle-alpha active:border-subtle-alpha focus:border-subtle-alpha;
|
|
195
|
+
@apply dark:border-dark-default-alpha hover:dark:border-dark-subtle-alpha active:dark:border-dark-subtle-alpha focus:dark:border-dark-subtle-alpha;
|
|
150
196
|
}
|
|
151
197
|
|
|
152
198
|
&--primary {
|
|
153
|
-
@apply border-accent
|
|
199
|
+
@apply border-brand-accent hover:border-[color:var(--p-color-primary-hover)] focus:border-[color:var(--p-color-primary-focus)] active:border-[color:var(--p-color-primary-focus)];
|
|
200
|
+
@apply dark:border-dark-brand-accent hover:dark:border-[color:var(--p-color-dark-primary-hover)] focus:dark:border-[color:var(--p-color-dark-primary-focus)] active:dark:border-[color:var(--p-color-dark-primary-focus)];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
&--info {
|
|
204
|
+
@apply border-info-emphasis hover:border-[color:var(--p-color-info-hover)] focus:border-[color:var(--p-color-info-focus)] active:border-[color:var(--p-color-info-focus)];
|
|
205
|
+
@apply dark:border-dark-info-emphasis hover:dark:border-[color:var(--p-color-dark-info-hover)] focus:dark:border-[color:var(--p-color-dark-info-focus)] active:dark:border-[color:var(--p-color-dark-info-focus)];
|
|
154
206
|
}
|
|
155
207
|
|
|
156
208
|
&--success {
|
|
157
209
|
@apply border-success-emphasis hover:border-[color:var(--p-color-success-hover)] focus:border-[color:var(--p-color-success-focus)] active:border-[color:var(--p-color-success-focus)];
|
|
210
|
+
@apply dark:border-dark-success-emphasis hover:dark:border-[color:var(--p-color-dark-success-hover)] focus:dark:border-[color:var(--p-color-dark-success-focus)] active:dark:border-[color:var(--p-color-dark-success-fucus)];
|
|
158
211
|
}
|
|
159
212
|
|
|
160
213
|
&--warning {
|
|
161
214
|
@apply border-warning-emphasis hover:border-[color:var(--p-color-warning-hover)] focus:border-[color:var(--p-color-warning-focus)] active:border-[color:var(--p-color-warning-focus)];
|
|
215
|
+
@apply dark:border-dark-warning-emphasis hover:dark:border-[color:var(--p-color-dark-warning-hover)] focus:dark:border-[color:var(--p-color-dark-warning-focus)] active:dark:border-[color:var(--p-color-dark-warning-focus)]
|
|
162
216
|
}
|
|
163
217
|
|
|
164
218
|
&--danger {
|
|
165
219
|
@apply border-danger-emphasis hover:border-[color:var(--p-color-danger-hover)] focus:border-[color:var(--p-color-danger-focus)] active:border-[color:var(--p-color-danger-focus)];
|
|
220
|
+
@apply dark:border-dark-danger-emphasis hover:dark:border-[color:var(--p-color-dark-danger-hover)] focus:dark:border-[color:var(--p-color-dark-danger-focus)] active:dark:border-[color:var(--p-color-dark-danger-focus)];
|
|
166
221
|
}
|
|
167
222
|
}
|
|
168
223
|
}
|
|
@@ -171,7 +226,8 @@ export default defineComponent({
|
|
|
171
226
|
* Button ghost variant
|
|
172
227
|
*/
|
|
173
228
|
&&--variant-ghost {
|
|
174
|
-
@apply border-transparent bg-transparent hover:border-default-alpha hover:bg-default-alpha active:bg-default-alpha focus:bg-default-alpha active:border-default-alpha focus:border-default-alpha;
|
|
229
|
+
@apply border-transparent bg-transparent hover:border-default-alpha hover:bg-default-alpha active:bg-default-alpha focus:bg-default-alpha active:border-default-alpha focus:border-default-alpha ;
|
|
230
|
+
@apply dark:border-transparent dark:bg-transparent hover:dark:border-dark-default-alpha hover:dark:bg-dark-default-alpha active:dark:bg-dark-default-alpha focus:dark:bg-dark-default-alpha active:dark:border-dark-default-alpha focus:dark:border-dark-default-alpha;
|
|
175
231
|
}
|
|
176
232
|
|
|
177
233
|
/**
|
|
@@ -183,39 +239,53 @@ export default defineComponent({
|
|
|
183
239
|
|
|
184
240
|
&.btn {
|
|
185
241
|
&--default {
|
|
186
|
-
@apply text-subtle hover:text-default focus:text-default active:text-default;
|
|
242
|
+
@apply text-subtle hover:text-default focus:text-default active:text-default ;
|
|
243
|
+
@apply dark:text-dark-subtle hover:dark:text-dark-default focus:dark:text-dark-default active:dark:text-dark-default;
|
|
187
244
|
}
|
|
188
245
|
|
|
189
246
|
&--primary {
|
|
190
|
-
@apply text-accent hover:text-[color:var(--p-color-primary-hover)] focus:text-[color:var(--p-color-primary-focus)] active:text-[color:var(--p-color-primary-focus)];
|
|
247
|
+
@apply text-brand-accent hover:text-[color:var(--p-color-primary-hover)] focus:text-[color:var(--p-color-primary-focus)] active:text-[color:var(--p-color-primary-focus)];
|
|
248
|
+
@apply dark:text-dark-brand-accent hover:dark:text-[color:var(--p-color-dark-primary-hover)] focus:dark:text-[color:var(--p-color-dark-primary-focus)] active:dark:text-[color:var(--p-color-dark-primary-focus)];
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&--info {
|
|
252
|
+
@apply text-info hover:text-[color:var(--p-color-info-hover)] focus:text-[color:var(--p-color-info-focus)] active:text-[color:var(--p-color-info-focus)];
|
|
253
|
+
@apply dark:text-dark-info hover:dark:text-[color:var(--p-color-dark-info-hover)] focus:dark:text-[color:var(--p-color-dark-info-focus)] active:dark:text-[color:var(--p-color-dark-info-focus)];
|
|
191
254
|
}
|
|
192
255
|
|
|
193
256
|
&--success {
|
|
194
257
|
@apply text-success hover:text-[color:var(--p-color-success-hover)] focus:text-[color:var(--p-color-success-focus)] active:text-[color:var(--p-color-success-focus)];
|
|
258
|
+
@apply dark:text-dark-success hover:dark:text-[color:var(--p-color-dark-success-hover)] focus:dark:text-[color:var(--p-color-dark-success-focus)] active:dark:text-[color:var(--p-color-dark-success-focus)];
|
|
195
259
|
}
|
|
196
260
|
|
|
197
261
|
&--warning {
|
|
198
262
|
@apply text-warning hover:text-[color:var(--p-color-warning-hover)] focus:text-[color:var(--p-color-warning-focus)] active:text-[color:var(--p-color-warning-focus)];
|
|
263
|
+
@apply dark:text-dark-warning hover:dark:text-[color:var(--p-color-dark-warning-hover)] focus:dark:text-[color:var(--p-color-dark-warning-focus)] active:dark:text-[color:var(--p-color-dark-warning-focus)];
|
|
199
264
|
}
|
|
200
265
|
|
|
201
266
|
&--danger {
|
|
202
267
|
@apply text-danger hover:text-[color:var(--p-color-danger-hover)] focus:text-[color:var(--p-color-danger-focus)] active:text-[color:var(--p-color-danger-focus)];
|
|
268
|
+
@apply dark:text-dark-danger hover:dark:text-[color:var(--p-color-dark-danger-hover)] focus:dark:text-[color:var(--p-color-dark-danger-focus)] active:dark:text-[color:var(--p-color-dark-danger-focus)];
|
|
203
269
|
}
|
|
204
270
|
}
|
|
205
271
|
}
|
|
206
272
|
|
|
207
273
|
&&--variant-input {
|
|
208
274
|
@apply border border-solid border-muted text-subtle font-normal bg-default hover:border-subtle focus:border-subtle active:outline-default;
|
|
275
|
+
@apply dark:border-dark-muted dark:text-dark-subtle dark:bg-dark-default hover:dark:border-dark-subtle focus:dark:border-dark-subtle active:dark:outline-dark-default;
|
|
209
276
|
|
|
210
277
|
.state--disabled & {
|
|
211
|
-
@apply bg-
|
|
278
|
+
@apply bg-subtle border-muted pointer-events-none text-muted;
|
|
279
|
+
@apply dark:bg-dark-subtle dark:border-dark-muted dark:text-dark-muted;
|
|
212
280
|
}
|
|
213
281
|
|
|
214
282
|
.state--error & {
|
|
215
283
|
@apply border-danger-emphasis;
|
|
284
|
+
@apply dark:border-dark-danger-emphasis;
|
|
216
285
|
|
|
217
286
|
&:focus {
|
|
218
287
|
@apply ring-danger border-danger-emphasis;
|
|
288
|
+
@apply dark:ring-dark-danger dark:border-dark-danger-emphasis;
|
|
219
289
|
}
|
|
220
290
|
}
|
|
221
291
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
|
-
import { ColorVariant, SizeVariant, StyleVariant } from '.';
|
|
2
|
+
import { ColorVariant, SizeVariant, StyleVariant, TagVariant } from '.';
|
|
3
3
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
4
4
|
variant: {
|
|
5
5
|
type: PropType<StyleVariant>;
|
|
@@ -21,8 +21,13 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
21
21
|
type: BooleanConstructor;
|
|
22
22
|
default: boolean;
|
|
23
23
|
};
|
|
24
|
+
href: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: undefined;
|
|
27
|
+
};
|
|
24
28
|
}, {
|
|
25
29
|
classNames: import("vue-demi").ComputedRef<string[]>;
|
|
30
|
+
tagName: import("vue-demi").ComputedRef<TagVariant>;
|
|
26
31
|
}, 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<{
|
|
27
32
|
variant: {
|
|
28
33
|
type: PropType<StyleVariant>;
|
|
@@ -44,10 +49,15 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
44
49
|
type: BooleanConstructor;
|
|
45
50
|
default: boolean;
|
|
46
51
|
};
|
|
52
|
+
href: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
default: undefined;
|
|
55
|
+
};
|
|
47
56
|
}>>, {
|
|
48
|
-
icon: boolean;
|
|
49
57
|
variant: StyleVariant;
|
|
50
58
|
size: SizeVariant;
|
|
59
|
+
icon: boolean;
|
|
60
|
+
href: string;
|
|
51
61
|
color: ColorVariant;
|
|
52
62
|
pill: boolean;
|
|
53
63
|
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type StyleVariant = 'solid' | 'outline' | 'ghost' | 'link' | 'input';
|
|
2
|
+
export type ColorVariant = 'default' | 'primary' | 'info' | 'success' | 'warning' | 'danger';
|
|
3
|
+
export type SizeVariant = 'xs' | 'sm' | 'md' | 'lg';
|
|
4
|
+
export type TagVariant = 'a' | 'button';
|
|
@@ -9,8 +9,11 @@
|
|
|
9
9
|
<script>
|
|
10
10
|
import {
|
|
11
11
|
defineComponent,
|
|
12
|
-
computed
|
|
12
|
+
computed,
|
|
13
|
+
provide,
|
|
14
|
+
toRef
|
|
13
15
|
} from "vue-demi";
|
|
16
|
+
import { BUTTONGROUP_SETTING } from ".";
|
|
14
17
|
export default defineComponent({
|
|
15
18
|
props: {
|
|
16
19
|
size: {
|
|
@@ -23,6 +26,7 @@ export default defineComponent({
|
|
|
23
26
|
}
|
|
24
27
|
},
|
|
25
28
|
setup(props) {
|
|
29
|
+
provide(BUTTONGROUP_SETTING, { size: toRef(props, "size") });
|
|
26
30
|
const classNames = computed(() => {
|
|
27
31
|
const result = ["btn-group"];
|
|
28
32
|
if (props.size)
|
|
@@ -81,10 +85,12 @@ export default defineComponent({
|
|
|
81
85
|
@apply -ml-[1px];
|
|
82
86
|
|
|
83
87
|
&.btn--primary,
|
|
88
|
+
&.btn--info,
|
|
84
89
|
&.btn--success,
|
|
85
90
|
&.btn--warning,
|
|
86
91
|
&.btn--danger {
|
|
87
92
|
@apply border-l-subtle-alpha;
|
|
93
|
+
@apply dark:border-l-dark-subtle-alpha;
|
|
88
94
|
}
|
|
89
95
|
}
|
|
90
96
|
}
|
|
@@ -111,21 +117,20 @@ export default defineComponent({
|
|
|
111
117
|
&:not(:first-child) {
|
|
112
118
|
.btn {
|
|
113
119
|
@apply -ml-[1px] rounded-l-none border-l-subtle-alpha;
|
|
120
|
+
@apply dark:border-l-dark-subtle-alpha;
|
|
114
121
|
}
|
|
115
122
|
}
|
|
116
123
|
}
|
|
117
124
|
|
|
118
125
|
/**
|
|
119
|
-
* Sizing the button group
|
|
120
|
-
* and
|
|
121
|
-
*
|
|
126
|
+
* Sizing the button group,
|
|
127
|
+
* and set rounded of first
|
|
128
|
+
* & last button in each size
|
|
122
129
|
*/
|
|
123
130
|
&&--xs:not(&--pill) {
|
|
124
131
|
.btn {
|
|
125
132
|
&:not(.btn--icon),
|
|
126
133
|
.dropdown .btn {
|
|
127
|
-
@apply px-2 py-[2px] gap-1 text-sm;
|
|
128
|
-
|
|
129
134
|
&:first-child {
|
|
130
135
|
@apply rounded-l-xs;
|
|
131
136
|
}
|
|
@@ -145,8 +150,6 @@ export default defineComponent({
|
|
|
145
150
|
.btn {
|
|
146
151
|
&:not(.btn--icon),
|
|
147
152
|
.dropdown .btn {
|
|
148
|
-
@apply px-4 py-1 gap-2 text-base;
|
|
149
|
-
|
|
150
153
|
&:first-child {
|
|
151
154
|
@apply rounded-l-sm;
|
|
152
155
|
}
|
|
@@ -180,11 +183,6 @@ export default defineComponent({
|
|
|
180
183
|
|
|
181
184
|
&&--md {
|
|
182
185
|
.btn {
|
|
183
|
-
&:not(.btn--icon),
|
|
184
|
-
.dropdown .btn {
|
|
185
|
-
@apply px-5 py-[10px] gap-3 text-base;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
186
|
&:is(.btn--icon) {
|
|
189
187
|
@apply p-[12px];
|
|
190
188
|
}
|
|
@@ -193,11 +191,6 @@ export default defineComponent({
|
|
|
193
191
|
|
|
194
192
|
&&--lg:not(&--pill) {
|
|
195
193
|
.btn {
|
|
196
|
-
&:not(.btn--icon),
|
|
197
|
-
.dropdown .btn {
|
|
198
|
-
@apply px-8 py-4 gap-4 text-base;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
194
|
&:is(.btn--icon) {
|
|
202
195
|
@apply p-[18px];
|
|
203
196
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const BUTTONGROUP_SETTING = Symbol("ButtonGroupSetting");
|
|
@@ -89,6 +89,7 @@ const Adapters = {
|
|
|
89
89
|
};
|
|
90
90
|
export default defineComponent({
|
|
91
91
|
components: {
|
|
92
|
+
// eslint-disable-next-line vue/no-reserved-component-names
|
|
92
93
|
Button,
|
|
93
94
|
Card,
|
|
94
95
|
IconNext,
|
|
@@ -124,7 +125,7 @@ export default defineComponent({
|
|
|
124
125
|
setup(props, { emit }) {
|
|
125
126
|
const viewmode = ref(props.mode);
|
|
126
127
|
const transition = ref("slide-left");
|
|
127
|
-
const cursor = ref(startOfMonth(props.modelValue ?? new Date()));
|
|
128
|
+
const cursor = ref(startOfMonth(props.modelValue ?? /* @__PURE__ */ new Date()));
|
|
128
129
|
const model = useVModel(props);
|
|
129
130
|
const context = {
|
|
130
131
|
cursor,
|
|
@@ -214,6 +215,7 @@ export default defineComponent({
|
|
|
214
215
|
<style lang="postcss">
|
|
215
216
|
.calendar {
|
|
216
217
|
@apply flex flex-col space-y-2 text-sm shadow-xl border-transparent;
|
|
218
|
+
@apply dark:border-transparent;
|
|
217
219
|
|
|
218
220
|
&__nav {
|
|
219
221
|
@apply flex justify-between space-x-2 mb-2;
|
|
@@ -223,22 +225,25 @@ export default defineComponent({
|
|
|
223
225
|
}
|
|
224
226
|
}
|
|
225
227
|
|
|
226
|
-
.btn--variant-solid {
|
|
228
|
+
.btn.btn--variant-solid {
|
|
227
229
|
@apply justify-center;
|
|
228
230
|
|
|
229
231
|
&.btn--default {
|
|
230
232
|
@apply border-transparent bg-transparent text-default font-normal;
|
|
233
|
+
@apply dark:border-transparent dark:bg-transparent dark:text-dark-subtle hover:dark:text-dark-default;
|
|
231
234
|
|
|
232
235
|
&.calendar__nav-title {
|
|
233
236
|
@apply font-medium;
|
|
234
237
|
}
|
|
235
238
|
|
|
236
239
|
&[active="true"] {
|
|
237
|
-
@apply bg-
|
|
240
|
+
@apply bg-info-emphasis border-info-emphasis text-state-emphasis cursor-default;
|
|
241
|
+
@apply dark:bg-dark-info-emphasis dark:border-dark-info-emphasis dark:text-dark-state-emphasis;
|
|
238
242
|
}
|
|
239
243
|
|
|
240
244
|
&[disabled][active="false"] {
|
|
241
245
|
@apply text-muted;
|
|
246
|
+
@apply dark:text-dark-muted;
|
|
242
247
|
}
|
|
243
248
|
}
|
|
244
249
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { PropType } from 'vue-demi';
|
|
2
2
|
import { CalendarItem } from './adapter/adapter';
|
|
3
|
-
|
|
3
|
+
type TransitionMode = 'slide-left' | 'slide-right' | 'zoom-in' | 'zoom-out';
|
|
4
4
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
5
5
|
modelValue: {
|
|
6
6
|
type: DateConstructor;
|
|
7
|
-
default:
|
|
7
|
+
default: undefined;
|
|
8
8
|
};
|
|
9
9
|
disabled: {
|
|
10
10
|
type: BooleanConstructor;
|
|
11
|
-
default:
|
|
11
|
+
default: undefined;
|
|
12
12
|
};
|
|
13
13
|
readonly: {
|
|
14
14
|
type: BooleanConstructor;
|
|
15
|
-
default:
|
|
15
|
+
default: undefined;
|
|
16
16
|
};
|
|
17
17
|
max: {
|
|
18
18
|
type: DateConstructor;
|
|
19
|
-
default:
|
|
19
|
+
default: undefined;
|
|
20
20
|
};
|
|
21
21
|
min: {
|
|
22
22
|
type: DateConstructor;
|
|
23
|
-
default:
|
|
23
|
+
default: undefined;
|
|
24
24
|
};
|
|
25
25
|
mode: {
|
|
26
26
|
type: PropType<"date" | "month" | "year">;
|
|
@@ -37,18 +37,18 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
37
37
|
toTimeString: () => string;
|
|
38
38
|
toLocaleString: {
|
|
39
39
|
(): string;
|
|
40
|
-
(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
|
|
41
|
-
(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
40
|
+
(locales?: string | string[] | undefined, options?: Intl.DateTimeFormatOptions | undefined): string;
|
|
41
|
+
(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions | undefined): string;
|
|
42
42
|
};
|
|
43
43
|
toLocaleDateString: {
|
|
44
44
|
(): string;
|
|
45
|
-
(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
|
|
46
|
-
(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
45
|
+
(locales?: string | string[] | undefined, options?: Intl.DateTimeFormatOptions | undefined): string;
|
|
46
|
+
(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions | undefined): string;
|
|
47
47
|
};
|
|
48
48
|
toLocaleTimeString: {
|
|
49
49
|
(): string;
|
|
50
|
-
(locales?: string | string[], options?: Intl.DateTimeFormatOptions): string;
|
|
51
|
-
(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
|
|
50
|
+
(locales?: string | string[] | undefined, options?: Intl.DateTimeFormatOptions | undefined): string;
|
|
51
|
+
(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions | undefined): string;
|
|
52
52
|
};
|
|
53
53
|
valueOf: () => number;
|
|
54
54
|
getTime: () => number;
|
|
@@ -72,18 +72,18 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
72
72
|
setTime: (time: number) => number;
|
|
73
73
|
setMilliseconds: (ms: number) => number;
|
|
74
74
|
setUTCMilliseconds: (ms: number) => number;
|
|
75
|
-
setSeconds: (sec: number, ms?: number) => number;
|
|
76
|
-
setUTCSeconds: (sec: number, ms?: number) => number;
|
|
77
|
-
setMinutes: (min: number, sec?: number, ms?: number) => number;
|
|
78
|
-
setUTCMinutes: (min: number, sec?: number, ms?: number) => number;
|
|
79
|
-
setHours: (hours: number, min?: number, sec?: number, ms?: number) => number;
|
|
80
|
-
setUTCHours: (hours: number, min?: number, sec?: number, ms?: number) => number;
|
|
75
|
+
setSeconds: (sec: number, ms?: number | undefined) => number;
|
|
76
|
+
setUTCSeconds: (sec: number, ms?: number | undefined) => number;
|
|
77
|
+
setMinutes: (min: number, sec?: number | undefined, ms?: number | undefined) => number;
|
|
78
|
+
setUTCMinutes: (min: number, sec?: number | undefined, ms?: number | undefined) => number;
|
|
79
|
+
setHours: (hours: number, min?: number | undefined, sec?: number | undefined, ms?: number | undefined) => number;
|
|
80
|
+
setUTCHours: (hours: number, min?: number | undefined, sec?: number | undefined, ms?: number | undefined) => number;
|
|
81
81
|
setDate: (date: number) => number;
|
|
82
82
|
setUTCDate: (date: number) => number;
|
|
83
|
-
setMonth: (month: number, date?: number) => number;
|
|
84
|
-
setUTCMonth: (month: number, date?: number) => number;
|
|
85
|
-
setFullYear: (year: number, month?: number, date?: number) => number;
|
|
86
|
-
setUTCFullYear: (year: number, month?: number, date?: number) => number;
|
|
83
|
+
setMonth: (month: number, date?: number | undefined) => number;
|
|
84
|
+
setUTCMonth: (month: number, date?: number | undefined) => number;
|
|
85
|
+
setFullYear: (year: number, month?: number | undefined, date?: number | undefined) => number;
|
|
86
|
+
setUTCFullYear: (year: number, month?: number | undefined, date?: number | undefined) => number;
|
|
87
87
|
toUTCString: () => string;
|
|
88
88
|
toISOString: () => string;
|
|
89
89
|
toJSON: (key?: any) => string;
|
|
@@ -97,7 +97,7 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
97
97
|
}>;
|
|
98
98
|
canNext: import("vue-demi").ComputedRef<boolean>;
|
|
99
99
|
canPrev: import("vue-demi").ComputedRef<boolean>;
|
|
100
|
-
classNames: import("vue-demi").ComputedRef<
|
|
100
|
+
classNames: import("vue-demi").ComputedRef<never[]>;
|
|
101
101
|
next: () => void;
|
|
102
102
|
prev: () => void;
|
|
103
103
|
changeMode: (step?: number) => void;
|
|
@@ -105,36 +105,36 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
105
105
|
}, unknown, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<{
|
|
106
106
|
modelValue: {
|
|
107
107
|
type: DateConstructor;
|
|
108
|
-
default:
|
|
108
|
+
default: undefined;
|
|
109
109
|
};
|
|
110
110
|
disabled: {
|
|
111
111
|
type: BooleanConstructor;
|
|
112
|
-
default:
|
|
112
|
+
default: undefined;
|
|
113
113
|
};
|
|
114
114
|
readonly: {
|
|
115
115
|
type: BooleanConstructor;
|
|
116
|
-
default:
|
|
116
|
+
default: undefined;
|
|
117
117
|
};
|
|
118
118
|
max: {
|
|
119
119
|
type: DateConstructor;
|
|
120
|
-
default:
|
|
120
|
+
default: undefined;
|
|
121
121
|
};
|
|
122
122
|
min: {
|
|
123
123
|
type: DateConstructor;
|
|
124
|
-
default:
|
|
124
|
+
default: undefined;
|
|
125
125
|
};
|
|
126
126
|
mode: {
|
|
127
127
|
type: PropType<"date" | "month" | "year">;
|
|
128
128
|
default: string;
|
|
129
129
|
};
|
|
130
130
|
}>> & {
|
|
131
|
-
onChange?: (...args: any[]) => any;
|
|
132
|
-
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
131
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
132
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
133
133
|
}, {
|
|
134
|
-
disabled: boolean;
|
|
135
134
|
min: Date;
|
|
136
135
|
max: Date;
|
|
137
136
|
modelValue: Date;
|
|
137
|
+
disabled: boolean;
|
|
138
138
|
readonly: boolean;
|
|
139
139
|
mode: "date" | "month" | "year";
|
|
140
140
|
}>;
|
|
@@ -21,7 +21,7 @@ export interface CalendarAdapter {
|
|
|
21
21
|
canPrev: (this: this, context: CalendarContext) => boolean;
|
|
22
22
|
}
|
|
23
23
|
export declare const CalendarFormat: readonly ["date", "month", "year"];
|
|
24
|
-
export
|
|
24
|
+
export type CalendarMode = typeof CalendarFormat[number];
|
|
25
25
|
export declare function defineAdapter(adapter: CalendarAdapter): CalendarAdapter;
|
|
26
26
|
/**
|
|
27
27
|
* Format date using date-fns/format,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
defineAdapter,
|
|
19
19
|
formatDate
|
|
20
|
-
} from "./adapter";
|
|
20
|
+
} from "./adapter.mjs";
|
|
21
21
|
function getInterval(date) {
|
|
22
22
|
const start = startOfWeek(startOfMonth(date), { weekStartsOn: 1 });
|
|
23
23
|
const end = endOfWeek(endOfMonth(date), { weekStartsOn: 1 });
|
|
@@ -324,7 +324,8 @@ export default defineComponent({
|
|
|
324
324
|
|
|
325
325
|
<style lang="postcss">
|
|
326
326
|
.camera {
|
|
327
|
-
@apply bg-
|
|
327
|
+
@apply bg-inverse w-full flex flex-col select-none relative overflow-hidden;
|
|
328
|
+
@apply dark:bg-dark-inverse;
|
|
328
329
|
|
|
329
330
|
&__video {
|
|
330
331
|
@apply flex-grow min-h-full max-w-full h-auto object-cover;
|
|
@@ -366,6 +367,7 @@ export default defineComponent({
|
|
|
366
367
|
|
|
367
368
|
&__off-info {
|
|
368
369
|
@apply absolute bottom-20 text-on-emphasis left-0 right-0 text-center text-sm;
|
|
370
|
+
@apply dark:text-dark-on-emphasis;
|
|
369
371
|
}
|
|
370
372
|
|
|
371
373
|
&__controls {
|
|
@@ -373,10 +375,12 @@ export default defineComponent({
|
|
|
373
375
|
}
|
|
374
376
|
|
|
375
377
|
&__toast {
|
|
376
|
-
@apply absolute bottom-20 left-0 right-0 text-center text-on-emphasis
|
|
378
|
+
@apply absolute bottom-20 left-0 right-0 text-center text-on-emphasis;
|
|
379
|
+
@apply dark:text-dark-on-emphasis px-4;
|
|
377
380
|
|
|
378
381
|
&-text {
|
|
379
|
-
@apply bg-
|
|
382
|
+
@apply bg-inverse/80 px-4 py-1 text-sm rounded shadow-md inline-block max-w-full truncate;
|
|
383
|
+
@apply dark:bg-dark-inverse/80;
|
|
380
384
|
}
|
|
381
385
|
}
|
|
382
386
|
}
|