@adyen/bento-vue3 1.4.0 → 1.4.1
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/accordion.js +2 -2
- package/dist/alert.js +3 -3
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -1
- package/dist/assets/index31.css +1 -1
- package/dist/assets/index32.css +1 -1
- package/dist/assets/index33.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index35.css +1 -1
- package/dist/assets/index36.css +1 -1
- package/dist/assets/index37.css +1 -1
- package/dist/assets/index38.css +1 -1
- package/dist/assets/index39.css +1 -1
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index40.css +1 -1
- package/dist/assets/index41.css +1 -1
- package/dist/assets/index42.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/avatar-image.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/button.js +5 -5
- package/dist/card.js +2 -2
- package/dist/checkbox.js +6 -6
- package/dist/chunks/{base-button.6d2843c2.js → base-button.c4ac1ad1.js} +2 -2
- package/dist/chunks/{base-button.6d2843c2.js.map → base-button.c4ac1ad1.js.map} +1 -1
- package/dist/chunks/{base-modal.3ccb9eb5.js → base-modal.db7a9829.js} +4 -4
- package/dist/chunks/{base-modal.3ccb9eb5.js.map → base-modal.db7a9829.js.map} +1 -1
- package/dist/chunks/{button.a8462029.js → button.7d09c245.js} +2 -2
- package/dist/chunks/{button.a8462029.js.map → button.7d09c245.js.map} +1 -1
- package/dist/chunks/{calendar.3f930683.js → calendar.0e42130b.js} +4 -4
- package/dist/chunks/{calendar.3f930683.js.map → calendar.0e42130b.js.map} +1 -1
- package/dist/chunks/{checkbox.5e1e05ae.js → checkbox.17462cb0.js} +3 -3
- package/dist/chunks/{checkbox.5e1e05ae.js.map → checkbox.17462cb0.js.map} +1 -1
- package/dist/chunks/{controls-group.3b0dfb94.js → controls-group.0d6db9c0.js} +2 -2
- package/dist/chunks/{controls-group.3b0dfb94.js.map → controls-group.0d6db9c0.js.map} +1 -1
- package/dist/chunks/{copy.1d14b783.js → copy.c9a29be0.js} +3 -3
- package/dist/chunks/{copy.1d14b783.js.map → copy.c9a29be0.js.map} +1 -1
- package/dist/chunks/{dropdown-default-textbox.a90e84f9.js → dropdown-default-textbox.cd789a95.js} +2 -2
- package/dist/chunks/{dropdown-default-textbox.a90e84f9.js.map → dropdown-default-textbox.cd789a95.js.map} +1 -1
- package/dist/chunks/{dropdown.b798a82e.js → dropdown.ff4f94a8.js} +22 -22
- package/dist/chunks/{dropdown.b798a82e.js.map → dropdown.ff4f94a8.js.map} +1 -1
- package/dist/chunks/{error-message.9acead25.js → error-message.8c67a507.js} +2 -2
- package/dist/chunks/{error-message.9acead25.js.map → error-message.8c67a507.js.map} +1 -1
- package/dist/chunks/{footer-actions.9537d0df.js → footer-actions.a587e374.js} +3 -3
- package/dist/chunks/{footer-actions.9537d0df.js.map → footer-actions.a587e374.js.map} +1 -1
- package/dist/chunks/{index.e84dbeae.js → index.140bf28f.js} +2 -2
- package/dist/chunks/{index.e84dbeae.js.map → index.140bf28f.js.map} +1 -1
- package/dist/chunks/{index.228ecda0.js → index.450b70d5.js} +3 -3
- package/dist/chunks/{index.228ecda0.js.map → index.450b70d5.js.map} +1 -1
- package/dist/chunks/{index.89b00b94.js → index.77c651df.js} +2 -2
- package/dist/chunks/{index.89b00b94.js.map → index.77c651df.js.map} +1 -1
- package/dist/chunks/{index.9d8273fc.js → index.ee69b530.js} +6 -6
- package/dist/chunks/{index.9d8273fc.js.map → index.ee69b530.js.map} +1 -1
- package/dist/chunks/{index.c2a80208.js → index.fd1cd23a.js} +20 -20
- package/dist/chunks/{index.c2a80208.js.map → index.fd1cd23a.js.map} +1 -1
- package/dist/chunks/{index.d26fdf71.js → index.fdb0c13d.js} +2 -2
- package/dist/chunks/{index.d26fdf71.js.map → index.fdb0c13d.js.map} +1 -1
- package/dist/chunks/{listbox-option-tag.0c9c571e.js → listbox-option-tag.ffe70226.js} +3 -3
- package/dist/chunks/{listbox-option-tag.0c9c571e.js.map → listbox-option-tag.ffe70226.js.map} +1 -1
- package/dist/chunks/{listbox.6b52af1a.js → listbox.f535a736.js} +4 -4
- package/dist/chunks/{listbox.6b52af1a.js.map → listbox.f535a736.js.map} +1 -1
- package/dist/chunks/{loading-button.081adbf3.js → loading-button.bc6e3967.js} +2 -2
- package/dist/chunks/{loading-button.081adbf3.js.map → loading-button.bc6e3967.js.map} +1 -1
- package/dist/chunks/{tooltip.e4e34b86.js → tooltip.973c86d3.js} +2 -2
- package/dist/chunks/{tooltip.e4e34b86.js.map → tooltip.973c86d3.js.map} +1 -1
- package/dist/code-snippet.js +7 -7
- package/dist/country.js +2 -2
- package/dist/currency.js +1 -1
- package/dist/data-grid.js +192 -189
- package/dist/data-grid.js.map +1 -1
- package/dist/date-picker.js +20 -20
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-picker.js +2 -2
- package/dist/date.js +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.js +4 -4
- package/dist/empty-state.js +3 -3
- package/dist/filter-bar.js +13 -13
- package/dist/focus-trap.js +1 -1
- package/dist/form-layout.js +2 -2
- package/dist/header.js +2 -2
- package/dist/index.js +14 -14
- package/dist/info-icon.js +2 -2
- package/dist/input-field.js +4 -4
- package/dist/internal.js +6 -6
- package/dist/link.js +2 -2
- package/dist/loading-indicator.js +1 -1
- package/dist/menu.js +4 -4
- package/dist/modal.js +3 -3
- package/dist/pagination.js +3 -3
- package/dist/payment-method.js +2 -2
- package/dist/popover.js +3 -3
- package/dist/popper-container.js +2 -2
- package/dist/radio-group.js +4 -4
- package/dist/search-bar.js +2 -2
- package/dist/segmented-control.js +4 -4
- package/dist/sidepanel.js +5 -5
- package/dist/status.js +1 -1
- package/dist/structured-list.js +1 -1
- package/dist/summary-grid.js +3 -3
- package/dist/tabs.js +2 -2
- package/dist/tag.js +3 -3
- package/dist/textarea.js +4 -4
- package/dist/timeline.js +5 -5
- package/dist/toast.js +3 -3
- package/dist/toggle.js +2 -2
- package/dist/typography.js +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +2 -2
package/dist/date-picker.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { ref as I, computed as g, defineComponent as X, toRef as U, watch as Z, nextTick as M, resolveComponent as v, resolveDirective as x, withDirectives as ee, openBlock as l, createElementBlock as $, withKeys as h, createVNode as T, withCtx as y, createTextVNode as P, toDisplayString as E, createBlock as c, createCommentVNode as u, createElementVNode as ae, normalizeClass as te } from "vue";
|
|
2
2
|
import { B as re } from "./chunks/directive.0408e565.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c as ne } from "./chunks/dropdown-default-textbox.cd789a95.js";
|
|
4
|
+
import { BentoPopover as oe } from "./popover.js";
|
|
4
5
|
import { g as k } from "./chunks/unique-id.a2a2b458.js";
|
|
5
|
-
import { B as
|
|
6
|
+
import { B as le } from "./chunks/index.77c651df.js";
|
|
6
7
|
import { u as K } from "./chunks/i18n.6c402773.js";
|
|
7
|
-
import { D as A, v as
|
|
8
|
-
import { f as q } from "./chunks/index.
|
|
9
|
-
import { e as S, d as
|
|
10
|
-
import { d as
|
|
11
|
-
import { u as
|
|
12
|
-
import { C as _ } from "./chunks/calendar.
|
|
13
|
-
import { b as Le } from "./chunks/calendar.
|
|
14
|
-
import {
|
|
15
|
-
import { E as fe } from "./chunks/error-message.9acead25.js";
|
|
8
|
+
import { D as A, v as ie, f as se } from "./chunks/date-input.9186a0bf.js";
|
|
9
|
+
import { f as q } from "./chunks/index.140bf28f.js";
|
|
10
|
+
import { e as S, d as de, f as ue } from "./chunks/index.f55fdc32.js";
|
|
11
|
+
import { d as pe } from "./chunks/debounce.f8d92e44.js";
|
|
12
|
+
import { u as ce } from "./chunks/use-form-layout-loading.d03e5d48.js";
|
|
13
|
+
import { C as _ } from "./chunks/calendar.0e42130b.js";
|
|
14
|
+
import { b as Le } from "./chunks/calendar.0e42130b.js";
|
|
15
|
+
import { E as fe } from "./chunks/error-message.8c67a507.js";
|
|
16
16
|
import { _ as De } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
17
|
-
import "./assets/
|
|
17
|
+
import "./assets/index40.css";
|
|
18
18
|
var p = /* @__PURE__ */ ((e) => (e.INPUT = "input", e))(p || {});
|
|
19
19
|
const me = ({ datePickerValue: e, isDateIncorrect: t }) => {
|
|
20
|
-
const { locale: i, t: f } = K(), D = { de
|
|
20
|
+
const { locale: i, t: f } = K(), D = { de, enUS: S, fr: ue }, s = I(null);
|
|
21
21
|
return {
|
|
22
22
|
// Values
|
|
23
23
|
dateDisplayValue: g(() => t.value ? s.value : e.value ? q(e.value, A.FULL_DATE, {
|
|
@@ -45,11 +45,11 @@ const me = ({ datePickerValue: e, isDateIncorrect: t }) => {
|
|
|
45
45
|
i18n: { messages: F },
|
|
46
46
|
name: "bento-date-picker",
|
|
47
47
|
components: {
|
|
48
|
-
BentoTypography:
|
|
49
|
-
BentoPopover:
|
|
48
|
+
BentoTypography: le,
|
|
49
|
+
BentoPopover: oe,
|
|
50
50
|
Calendar: _,
|
|
51
51
|
ErrorMessage: fe,
|
|
52
|
-
DropdownInputDefault:
|
|
52
|
+
DropdownInputDefault: ne
|
|
53
53
|
},
|
|
54
54
|
directives: { BentoClickOutsideDirective: re },
|
|
55
55
|
props: {
|
|
@@ -96,7 +96,7 @@ const me = ({ datePickerValue: e, isDateIncorrect: t }) => {
|
|
|
96
96
|
},
|
|
97
97
|
emits: [p.INPUT],
|
|
98
98
|
setup(e, { emit: t }) {
|
|
99
|
-
const { t: i } = K({ messages: F }), f = k("bento-date-picker-container"), D = k("bento-date-picker-label"), s = k("bento-date-picker-description"), o = k("bento-date-picker-error"), m = k("bento-date-picker-date-error"), d = g(() => e.label || i("datePicker", { name: f })), C = I(null), B = I(null), r = I(!1), n = I(!1), { isReadOnly: L } =
|
|
99
|
+
const { t: i } = K({ messages: F }), f = k("bento-date-picker-container"), D = k("bento-date-picker-label"), s = k("bento-date-picker-description"), o = k("bento-date-picker-error"), m = k("bento-date-picker-date-error"), d = g(() => e.label || i("datePicker", { name: f })), C = I(null), B = I(null), r = I(!1), n = I(!1), { isReadOnly: L } = ce(U(e, "readonly"));
|
|
100
100
|
Z(
|
|
101
101
|
() => e.disabled,
|
|
102
102
|
(a) => {
|
|
@@ -119,8 +119,8 @@ const me = ({ datePickerValue: e, isDateIncorrect: t }) => {
|
|
|
119
119
|
}, H = async () => {
|
|
120
120
|
r.value && (r.value = !1, b.value = null), t(p.INPUT, null);
|
|
121
121
|
}, J = (a) => {
|
|
122
|
-
|
|
123
|
-
}, Q =
|
|
122
|
+
ie(a);
|
|
123
|
+
}, Q = pe((a) => {
|
|
124
124
|
if (a.length < 10)
|
|
125
125
|
return;
|
|
126
126
|
/^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/.test(a) && z(new Date(a)) ? (r.value = !1, t(p.INPUT, new Date(a))) : a && (r.value = !0, t(p.INPUT, null));
|
|
@@ -151,7 +151,7 @@ const me = ({ datePickerValue: e, isDateIncorrect: t }) => {
|
|
|
151
151
|
openDatePicker: N,
|
|
152
152
|
onDateKeyDown: J,
|
|
153
153
|
onDateInputChange: (a) => {
|
|
154
|
-
b.value =
|
|
154
|
+
b.value = se(a), Q(b.value);
|
|
155
155
|
},
|
|
156
156
|
// Keyboard navigation
|
|
157
157
|
onSpaceBarOrEnter: async (a) => {
|
package/dist/date-picker.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.js","sources":["../../vue2/src/components/date-picker/date-picker.types.ts","../../vue2/src/components/date-picker/composables/use-date-picker-single-calendar-text.ts","../../vue2/src/components/date-picker/date-picker.vue"],"sourcesContent":["export { CalendarFirstDayOfWeek as BentoDatePickerFirstDayOfWeek } from '@/internal';\nexport type {\n CalendarIsDateDisabled as BentoDatePickerIsDateDisabled,\n CalendarSingleDateValue as BentoDatePickerValue,\n} from '@/internal';\n\nexport enum BentoDatePickerEvent {\n INPUT = 'input',\n}\n","import { computed, ref } from 'vue';\nimport { de, enUS, fr } from 'date-fns/locale';\nimport { useI18n } from '@/utils/ts/i18n';\nimport { UseDateDisplayText } from './use-date-picker-single-calendar-text.types';\nimport { DateFormat } from '@/types';\nimport format from 'date-fns/format';\n\n/**\n * Composable that sets and formats the date to be displayed in the input box of a Single Date Picker\n * @param {Ref<Date>} option.datePickerValue Ref to the datePickerValue set in the DatePicker component\n * @param {Ref<boolean>} option.isDateIncorrect Indicates if the date is correct or not\n */\nexport const useDatePickerSingleCalendarText: UseDateDisplayText<Date> = ({ datePickerValue, isDateIncorrect }) => {\n const { locale, t } = useI18n();\n const locales = { de, enUS, fr };\n\n const textInputValue = ref(null);\n\n const dateDisplayValue = computed(() => {\n // Display incorrect date when there's an error with the input\n if (isDateIncorrect.value) {\n return textInputValue.value;\n }\n\n // Display \"Select a date\" when there's no date selected or input\n if (!datePickerValue.value) {\n return t('selectDate') as string;\n }\n\n // Display the date in format \"dd MMM, yyyy (25 Jun, 2023)\" if there's a valid date selected\n return format(datePickerValue.value as Date, DateFormat.FULL_DATE, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n });\n\n /**\n * Formats the \"dateToFormat\" date value with the yyyy-MM-dd format and sets it as \"formatTextInputDisplayValue\" value\n * @param {DATE} dateToFormat - Date to be assigned and formatted\n */\n const formatTextInputDisplayValue = (dateToFormat: Date = datePickerValue.value) => {\n // If date is incorrect, leave the textInputValue intact\n if (isDateIncorrect.value) {\n return;\n }\n\n textInputValue.value = dateToFormat\n ? format(dateToFormat, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n })\n : null;\n };\n\n return {\n // Values\n dateDisplayValue,\n textInputValue,\n\n // Methods\n formatTextInputDisplayValue,\n };\n};\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div\n v-bento-click-outside-directive=\"closeDatePicker\"\n class=\"b-date-picker\"\n @keydown.space.capture=\"onSpaceBarOrEnter\"\n @keydown.enter.capture=\"onSpaceBarOrEnter\"\n >\n <!-- Label -->\n <div v-if=\"label\" :id=\"labelId\" class=\"b-date-picker__label\">\n <bento-typography el=\"span\" stronger>{{ label }}</bento-typography>\n <bento-typography v-if=\"optional\" class=\"b-date-picker__label-requirement\" el=\"span\">\n ({{ $t('optional') }})\n </bento-typography>\n <bento-typography v-if=\"required\" class=\"b-date-picker__label-requirement\" el=\"span\">\n ({{ $t('required') }})\n </bento-typography>\n </div>\n\n <!-- Input -->\n <div>\n <dropdown-input-default\n ref=\"inputContainerRef\"\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDatePickerOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :disabled=\"disabled\"\n dynamic-filtering\n :is-invalid=\"!!errorMessage || !!dateErrorText\"\n :open=\"isDatePickerOpen\"\n :value=\"textInputValue\"\n :display-value=\"dateDisplayValue\"\n :debounce-time=\"0\"\n :readonly=\"isReadOnly\"\n @input=\"onDateInputChange\"\n @open=\"openDatePicker\"\n @keydown=\"onDateKeyDown\"\n @clear=\"clearDatePickerValue\"\n @close=\"closeDatePicker\"\n />\n </div>\n\n <!-- Error Messages -->\n <error-message\n v-if=\"dateErrorText\"\n :id=\"dateErrorId\"\n :error-message=\"dateErrorText\"\n class=\"b-date-picker__error-message\"\n />\n <error-message\n v-if=\"errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-date-picker__error-message\"\n />\n\n <!-- Description -->\n <bento-typography\n v-if=\"description\"\n class=\"b-date-picker__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n {{ description }}\n </bento-typography>\n\n <!-- Calendar container -->\n <bento-popover\n v-if=\"inputContainerRef\"\n :id=\"datePickerContainerId\"\n class=\"b-date-picker__container\"\n role=\"dialog\"\n :open=\"isDatePickerOpen\"\n :target-element=\"inputContainerRef\"\n :disable-focus-trap=\"true\"\n :aria-label=\"popoverAriaLabel\"\n :aria-modal=\"true\"\n position=\"bottom-start\"\n fit-content\n >\n <calendar\n ref=\"calendarContainerRef\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :number-of-months=\"1\"\n :value=\"value\"\n @input=\"onDateSelected\"\n />\n </bento-popover>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, Ref, ref, toRef, watch } from 'vue';\n import { BentoClickOutsideDirective } from '@/directives';\n import { BentoDatePickerEvent, BentoDatePickerValue } from './date-picker.types';\n import { Calendar, ErrorMessage } from '@/internal';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n import { BentoPopover } from '@/components/popover';\n import { generateUid } from '@/utils/ts/unique-id';\n import { BentoTypography } from '../typography';\n import { useDatePickerSingleCalendarText } from './composables/use-date-picker-single-calendar-text';\n import { formatDateInputValue, validateDateInput } from '@/utils/ts/date-input';\n import { useI18n } from '@/utils/ts/i18n';\n import { debounce } from '@/utils/ts/debounce';\n import { useFormLayoutFieldLoading } from '@/composables';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const DEBOUNCE_TIME = 1000;\n\n /**\n * Date picker selector.\n *\n * @example\n * import { BentoDatePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDatePicker },\n * template: `\n * <bento-date-picker\n * label=\"Label\"\n * description=\"Supporting text\"\n * required\n * optional\n * disabled\n * @input=\"onDateChanged\"\n * v-model=\"selectedDate\"\n * />\n * `,\n * setup() {\n * const selectedDate = ref(new Date()); // reactive({ startDate: new Date(), endDate: new Date() })\n * return {\n * selectedDate,\n * }\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-date-picker',\n components: {\n BentoTypography,\n BentoPopover,\n Calendar,\n ErrorMessage,\n DropdownInputDefault,\n },\n directives: { BentoClickOutsideDirective },\n props: {\n /**\n * Descriptive supporting text visbile underneath the dropdown.\n */\n description: { type: String, default: undefined },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Displays component in an error state with an error message\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: Calendar.props.firstDayOfWeek,\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: Calendar.props.isDateDisabled,\n\n /**\n * Text that is displayed as a label above the element.\n */\n label: { type: String, default: undefined },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * The Boolean readonly property, when present, makes the element not mutable, meaning the user can not edit the date picker.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Selected date\n */\n value: { type: [Date, Object] as PropType<BentoDatePickerValue>, default: null },\n },\n emits: [BentoDatePickerEvent.INPUT],\n setup(props, { emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const datePickerContainerId = generateUid('bento-date-picker-container');\n const labelId = generateUid('bento-date-picker-label');\n const descriptionId = generateUid('bento-date-picker-description');\n const errorId = generateUid('bento-date-picker-error');\n const dateErrorId = generateUid('bento-date-picker-date-error');\n const popoverAriaLabel = computed(() => props.label || t('datePicker', { name: datePickerContainerId }));\n\n // Refs\n const calendarContainerRef = ref(null);\n const inputContainerRef = ref(null);\n\n // Values\n const isDateIncorrect = ref(false);\n const isDatePickerOpen = ref(false);\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n watch(\n () => props.disabled,\n disabled => {\n // Close date picker popover if it's opened when it's disabled\n if (disabled && isDatePickerOpen.value) {\n isDatePickerOpen.value = false;\n }\n }\n );\n\n const { dateDisplayValue, textInputValue, formatTextInputDisplayValue } = useDatePickerSingleCalendarText({\n datePickerValue: toRef(props, 'value') as Ref<Date>,\n isDateIncorrect,\n });\n\n const dateErrorText = computed(() => {\n if (props.isDateDisabled && props.isDateDisabled(new Date(textInputValue.value))) {\n return t('selectedDateIsNotAvailable');\n }\n\n return isDateIncorrect.value ? t('provideDateInAFormat') : null;\n });\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-picker__description--error': props.errorMessage || dateErrorText.value,\n }));\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n dateErrorText.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const isDateEnabled = (date: Date) => {\n // Check if function is set, otherwise all dates are enabled\n if (props.isDateDisabled) {\n return !props.isDateDisabled(date);\n }\n\n return true;\n };\n\n const closeDatePicker = () => {\n isDatePickerOpen.value = false;\n };\n\n const openDatePicker = () => {\n isDatePickerOpen.value = true;\n\n formatTextInputDisplayValue();\n };\n\n const onDateSelected = (selectedDate: Date) => {\n // Reset the error state when a valid date is selected\n isDateIncorrect.value = false;\n\n closeDatePicker();\n emit(BentoDatePickerEvent.INPUT, selectedDate);\n };\n\n const clearDatePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n textInputValue.value = null;\n }\n emit(BentoDatePickerEvent.INPUT, null);\n };\n\n const onDateKeyDown = (event: KeyboardEvent) => {\n validateDateInput(event);\n };\n\n const validateDate = debounce((stringDate: string) => {\n // Validate only if the date is complete\n if (stringDate.length < 10) {\n return;\n }\n\n // Checks for YYYY-MM-DD format\n const dateRegex = /^\\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;\n const isValidDate = dateRegex.test(stringDate) && isDateEnabled(new Date(stringDate));\n if (isValidDate) {\n isDateIncorrect.value = false;\n emit(BentoDatePickerEvent.INPUT, new Date(stringDate));\n } else if (stringDate) {\n // Only set to true if the value exists (not null/undefined)\n isDateIncorrect.value = true;\n emit(BentoDatePickerEvent.INPUT, null);\n }\n }, DEBOUNCE_TIME);\n\n const onDateInputChange = (stringDate: string) => {\n textInputValue.value = formatDateInputValue(stringDate);\n validateDate(textInputValue.value);\n };\n\n /**\n * Space bar and Enter keyDown event handler.\n *\n * * Opens the date picker dialog on the first keydown.\n * * Move focus to selected date, i.e., the date displayed in the date input text field. If no date has been selected, places focus on the current date.\n * @param {KeyboardEvent} event Event being triggered\n */\n const onSpaceBarOrEnter = async (event: KeyboardEvent) => {\n if (isDatePickerOpen.value) {\n return;\n }\n event.preventDefault();\n\n openDatePicker();\n\n // Wait for the date picker dialog to open\n await nextTick();\n\n // Set current date (today) if no date is selected\n if (!props.value) {\n // Format the opened date picker date to YYYY-MM-DD\n formatTextInputDisplayValue(new Date());\n emit(BentoDatePickerEvent.INPUT, new Date());\n\n // Wait for new value to be set with the emit\n await nextTick();\n }\n\n // Focus on date\n calendarContainerRef.value?.$refs.calendarRef[0].focusOnDate(props.value);\n };\n\n return {\n // Refs\n inputContainerRef,\n calendarContainerRef,\n\n // Values,\n dateDisplayValue,\n datePickerContainerId,\n descriptionConditionalClasses,\n isDateIncorrect,\n isDatePickerOpen,\n isReadOnly,\n dateErrorText,\n labelId,\n descriptionId,\n errorId,\n dateErrorId,\n popoverAriaLabel,\n ariaDescribedBy,\n textInputValue,\n\n // Events\n closeDatePicker,\n clearDatePickerValue,\n onDateSelected,\n openDatePicker,\n onDateKeyDown,\n onDateInputChange,\n\n // Keyboard navigation\n onSpaceBarOrEnter,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-picker.scss\" />\n"],"names":["BentoDatePickerEvent","BentoDatePickerEvent2","useDatePickerSingleCalendarText","datePickerValue","isDateIncorrect","locale","t","useI18n","locales","de","enUS","fr","textInputValue","ref","computed","format","DateFormat","dateToFormat","DEBOUNCE_TIME","_sfc_main","defineComponent","messages","BentoTypography","BentoPopover","Calendar","ErrorMessage","DropdownInputDefault","BentoClickOutsideDirective","props","emit","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","calendarContainerRef","inputContainerRef","isDatePickerOpen","isReadOnly","useFormLayoutFieldLoading","toRef","watch","disabled","dateDisplayValue","formatTextInputDisplayValue","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","isDateEnabled","date","closeDatePicker","openDatePicker","onDateSelected","selectedDate","clearDatePickerValue","onDateKeyDown","event","validateDateInput","validateDate","debounce","stringDate","formatDateInputValue","nextTick","_a","_ctx","createCommentVNode","openBlock","createBlock","_component_bento_typography","_hoisted_1","createElementVNode","createVNode","_component_dropdown_input_default","_component_error_message","normalizeClass","_component_bento_popover","withCtx","_component_calendar"],"mappings":";;;;;;;;;;;;;;;;;AAMY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,QAAA,SADQA,IAAAD,KAAA,CAAA,CAAA;ACML,MAAAE,KAAA,CAAA,EAAA,iBAAAC,GAAA,iBAAAC,EAAA,MAAA;AACH,QAAA,EAAA,QAAAC,GAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAA,EAAA,IAAAC,IAAA,MAAAC,GAAA,IAAAC,GAAA,GAEAC,IAAAC,EAAA,IAAA;AAoCA,SAAA;AAAA;A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,SAAAY,EAAA,MAAA;AAAA,QAAAL,EAAAM,GAAA;AAAA,UACgB,KAAA;AAAA,UACnB,qBAAAb,EAAA;AAAA,UACmB,oBAAAA,EAAA;AAAA,UACP,oBAAA;AAAA,UACL,OAAAA,EAAA;AAAA;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"date-picker.js","sources":["../../vue2/src/components/date-picker/date-picker.types.ts","../../vue2/src/components/date-picker/composables/use-date-picker-single-calendar-text.ts","../../vue2/src/components/date-picker/date-picker.vue"],"sourcesContent":["export { CalendarFirstDayOfWeek as BentoDatePickerFirstDayOfWeek } from '@/internal';\nexport type {\n CalendarIsDateDisabled as BentoDatePickerIsDateDisabled,\n CalendarSingleDateValue as BentoDatePickerValue,\n} from '@/internal';\n\nexport enum BentoDatePickerEvent {\n INPUT = 'input',\n}\n","import { computed, ref } from 'vue';\nimport { de, enUS, fr } from 'date-fns/locale';\nimport { useI18n } from '@/utils/ts/i18n';\nimport { UseDateDisplayText } from './use-date-picker-single-calendar-text.types';\nimport { DateFormat } from '@/types';\nimport format from 'date-fns/format';\n\n/**\n * Composable that sets and formats the date to be displayed in the input box of a Single Date Picker\n * @param {Ref<Date>} option.datePickerValue Ref to the datePickerValue set in the DatePicker component\n * @param {Ref<boolean>} option.isDateIncorrect Indicates if the date is correct or not\n */\nexport const useDatePickerSingleCalendarText: UseDateDisplayText<Date> = ({ datePickerValue, isDateIncorrect }) => {\n const { locale, t } = useI18n();\n const locales = { de, enUS, fr };\n\n const textInputValue = ref(null);\n\n const dateDisplayValue = computed(() => {\n // Display incorrect date when there's an error with the input\n if (isDateIncorrect.value) {\n return textInputValue.value;\n }\n\n // Display \"Select a date\" when there's no date selected or input\n if (!datePickerValue.value) {\n return t('selectDate') as string;\n }\n\n // Display the date in format \"dd MMM, yyyy (25 Jun, 2023)\" if there's a valid date selected\n return format(datePickerValue.value as Date, DateFormat.FULL_DATE, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n });\n });\n\n /**\n * Formats the \"dateToFormat\" date value with the yyyy-MM-dd format and sets it as \"formatTextInputDisplayValue\" value\n * @param {DATE} dateToFormat - Date to be assigned and formatted\n */\n const formatTextInputDisplayValue = (dateToFormat: Date = datePickerValue.value) => {\n // If date is incorrect, leave the textInputValue intact\n if (isDateIncorrect.value) {\n return;\n }\n\n textInputValue.value = dateToFormat\n ? format(dateToFormat, DateFormat.NUMERIC_DATE_YEAR_FIRST, {\n locale: locales[locale.value.substring(0, 2)] || enUS,\n })\n : null;\n };\n\n return {\n // Values\n dateDisplayValue,\n textInputValue,\n\n // Methods\n formatTextInputDisplayValue,\n };\n};\n","<!-- TODO: Remove aria props as these are part of JSX elements /vue/types/jsx.d.ts -->\n<!-- eslint-disable vue/attribute-hyphenation -->\n<template>\n <div\n v-bento-click-outside-directive=\"closeDatePicker\"\n class=\"b-date-picker\"\n @keydown.space.capture=\"onSpaceBarOrEnter\"\n @keydown.enter.capture=\"onSpaceBarOrEnter\"\n >\n <!-- Label -->\n <div v-if=\"label\" :id=\"labelId\" class=\"b-date-picker__label\">\n <bento-typography el=\"span\" stronger>{{ label }}</bento-typography>\n <bento-typography v-if=\"optional\" class=\"b-date-picker__label-requirement\" el=\"span\">\n ({{ $t('optional') }})\n </bento-typography>\n <bento-typography v-if=\"required\" class=\"b-date-picker__label-requirement\" el=\"span\">\n ({{ $t('required') }})\n </bento-typography>\n </div>\n\n <!-- Input -->\n <div>\n <dropdown-input-default\n ref=\"inputContainerRef\"\n :ariaControls=\"datePickerContainerId\"\n :ariaExpanded=\"isDatePickerOpen\"\n :aria-labelledby=\"label ? labelId : null\"\n :aria-describedby=\"ariaDescribedBy\"\n :disabled=\"disabled\"\n dynamic-filtering\n :is-invalid=\"!!errorMessage || !!dateErrorText\"\n :open=\"isDatePickerOpen\"\n :value=\"textInputValue\"\n :display-value=\"dateDisplayValue\"\n :debounce-time=\"0\"\n :readonly=\"isReadOnly\"\n @input=\"onDateInputChange\"\n @open=\"openDatePicker\"\n @keydown=\"onDateKeyDown\"\n @clear=\"clearDatePickerValue\"\n @close=\"closeDatePicker\"\n />\n </div>\n\n <!-- Error Messages -->\n <error-message\n v-if=\"dateErrorText\"\n :id=\"dateErrorId\"\n :error-message=\"dateErrorText\"\n class=\"b-date-picker__error-message\"\n />\n <error-message\n v-if=\"errorMessage\"\n :id=\"errorId\"\n :error-message=\"errorMessage\"\n class=\"b-date-picker__error-message\"\n />\n\n <!-- Description -->\n <bento-typography\n v-if=\"description\"\n class=\"b-date-picker__description\"\n :class=\"descriptionConditionalClasses\"\n el=\"span\"\n >\n {{ description }}\n </bento-typography>\n\n <!-- Calendar container -->\n <bento-popover\n v-if=\"inputContainerRef\"\n :id=\"datePickerContainerId\"\n class=\"b-date-picker__container\"\n role=\"dialog\"\n :open=\"isDatePickerOpen\"\n :target-element=\"inputContainerRef\"\n :disable-focus-trap=\"true\"\n :aria-label=\"popoverAriaLabel\"\n :aria-modal=\"true\"\n position=\"bottom-start\"\n fit-content\n >\n <calendar\n ref=\"calendarContainerRef\"\n :first-day-of-week=\"firstDayOfWeek\"\n :is-date-disabled=\"isDateDisabled\"\n :number-of-months=\"1\"\n :value=\"value\"\n @input=\"onDateSelected\"\n />\n </bento-popover>\n </div>\n</template>\n\n<script lang=\"ts\">\n import { computed, defineComponent, nextTick, PropType, Ref, ref, toRef, watch } from 'vue';\n import { BentoClickOutsideDirective } from '@/directives';\n import { BentoDatePickerEvent, BentoDatePickerValue } from './date-picker.types';\n import { Calendar, ErrorMessage } from '@/internal';\n import { DropdownInputDefault } from '@/components/dropdown/components';\n import { BentoPopover } from '@/components/popover';\n import { generateUid } from '@/utils/ts/unique-id';\n import { BentoTypography } from '../typography';\n import { useDatePickerSingleCalendarText } from './composables/use-date-picker-single-calendar-text';\n import { formatDateInputValue, validateDateInput } from '@/utils/ts/date-input';\n import { useI18n } from '@/utils/ts/i18n';\n import { debounce } from '@/utils/ts/debounce';\n import { useFormLayoutFieldLoading } from '@/composables';\n\n import messages from './messages.json';\n\n type MessageSchema = (typeof messages)['en-US'];\n const DEBOUNCE_TIME = 1000;\n\n /**\n * Date picker selector.\n *\n * @example\n * import { BentoDatePicker } from '@adyen/bento-vue2';\n *\n * export default {\n * components: { BentoDatePicker },\n * template: `\n * <bento-date-picker\n * label=\"Label\"\n * description=\"Supporting text\"\n * required\n * optional\n * disabled\n * @input=\"onDateChanged\"\n * v-model=\"selectedDate\"\n * />\n * `,\n * setup() {\n * const selectedDate = ref(new Date()); // reactive({ startDate: new Date(), endDate: new Date() })\n * return {\n * selectedDate,\n * }\n * }\n * }\n */\n export default defineComponent({\n i18n: { messages },\n name: 'bento-date-picker',\n components: {\n BentoTypography,\n BentoPopover,\n Calendar,\n ErrorMessage,\n DropdownInputDefault,\n },\n directives: { BentoClickOutsideDirective },\n props: {\n /**\n * Descriptive supporting text visbile underneath the dropdown.\n */\n description: { type: String, default: undefined },\n\n /**\n * Disables dropdown functionality.\n */\n disabled: { type: Boolean, default: false },\n\n /**\n * Displays component in an error state with an error message\n */\n errorMessage: { type: String, default: null },\n\n /**\n * Allows you to set the first day of the week. 0 is sunday, 1 is monday, 6 is saturday\n */\n firstDayOfWeek: Calendar.props.firstDayOfWeek,\n\n /**\n * Indicate if a date should be disabled or not\n */\n isDateDisabled: Calendar.props.isDateDisabled,\n\n /**\n * Text that is displayed as a label above the element.\n */\n label: { type: String, default: undefined },\n\n /**\n * Highlights the dropdown is optional.\n */\n optional: { type: Boolean, default: false },\n\n /**\n * The Boolean readonly property, when present, makes the element not mutable, meaning the user can not edit the date picker.\n */\n readonly: { type: Boolean, default: false },\n\n /**\n * Highlights the dropdown is required.\n */\n required: { type: Boolean, default: false },\n\n /**\n * Selected date\n */\n value: { type: [Date, Object] as PropType<BentoDatePickerValue>, default: null },\n },\n emits: [BentoDatePickerEvent.INPUT],\n setup(props, { emit }) {\n const { t } = useI18n<{ message: MessageSchema }>({ messages });\n const datePickerContainerId = generateUid('bento-date-picker-container');\n const labelId = generateUid('bento-date-picker-label');\n const descriptionId = generateUid('bento-date-picker-description');\n const errorId = generateUid('bento-date-picker-error');\n const dateErrorId = generateUid('bento-date-picker-date-error');\n const popoverAriaLabel = computed(() => props.label || t('datePicker', { name: datePickerContainerId }));\n\n // Refs\n const calendarContainerRef = ref(null);\n const inputContainerRef = ref(null);\n\n // Values\n const isDateIncorrect = ref(false);\n const isDatePickerOpen = ref(false);\n const { isReadOnly } = useFormLayoutFieldLoading(toRef(props, 'readonly'));\n\n watch(\n () => props.disabled,\n disabled => {\n // Close date picker popover if it's opened when it's disabled\n if (disabled && isDatePickerOpen.value) {\n isDatePickerOpen.value = false;\n }\n }\n );\n\n const { dateDisplayValue, textInputValue, formatTextInputDisplayValue } = useDatePickerSingleCalendarText({\n datePickerValue: toRef(props, 'value') as Ref<Date>,\n isDateIncorrect,\n });\n\n const dateErrorText = computed(() => {\n if (props.isDateDisabled && props.isDateDisabled(new Date(textInputValue.value))) {\n return t('selectedDateIsNotAvailable');\n }\n\n return isDateIncorrect.value ? t('provideDateInAFormat') : null;\n });\n\n const descriptionConditionalClasses = computed(() => ({\n 'b-date-picker__description--error': props.errorMessage || dateErrorText.value,\n }));\n\n const ariaDescribedBy = computed(\n () =>\n `${props.description ? descriptionId : ''} ${props.errorMessage ? errorId : ''} ${\n dateErrorText.value ? dateErrorId : ''\n }`.trim() || null\n );\n\n const isDateEnabled = (date: Date) => {\n // Check if function is set, otherwise all dates are enabled\n if (props.isDateDisabled) {\n return !props.isDateDisabled(date);\n }\n\n return true;\n };\n\n const closeDatePicker = () => {\n isDatePickerOpen.value = false;\n };\n\n const openDatePicker = () => {\n isDatePickerOpen.value = true;\n\n formatTextInputDisplayValue();\n };\n\n const onDateSelected = (selectedDate: Date) => {\n // Reset the error state when a valid date is selected\n isDateIncorrect.value = false;\n\n closeDatePicker();\n emit(BentoDatePickerEvent.INPUT, selectedDate);\n };\n\n const clearDatePickerValue = async () => {\n if (isDateIncorrect.value) {\n isDateIncorrect.value = false;\n textInputValue.value = null;\n }\n emit(BentoDatePickerEvent.INPUT, null);\n };\n\n const onDateKeyDown = (event: KeyboardEvent) => {\n validateDateInput(event);\n };\n\n const validateDate = debounce((stringDate: string) => {\n // Validate only if the date is complete\n if (stringDate.length < 10) {\n return;\n }\n\n // Checks for YYYY-MM-DD format\n const dateRegex = /^\\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$/;\n const isValidDate = dateRegex.test(stringDate) && isDateEnabled(new Date(stringDate));\n if (isValidDate) {\n isDateIncorrect.value = false;\n emit(BentoDatePickerEvent.INPUT, new Date(stringDate));\n } else if (stringDate) {\n // Only set to true if the value exists (not null/undefined)\n isDateIncorrect.value = true;\n emit(BentoDatePickerEvent.INPUT, null);\n }\n }, DEBOUNCE_TIME);\n\n const onDateInputChange = (stringDate: string) => {\n textInputValue.value = formatDateInputValue(stringDate);\n validateDate(textInputValue.value);\n };\n\n /**\n * Space bar and Enter keyDown event handler.\n *\n * * Opens the date picker dialog on the first keydown.\n * * Move focus to selected date, i.e., the date displayed in the date input text field. If no date has been selected, places focus on the current date.\n * @param {KeyboardEvent} event Event being triggered\n */\n const onSpaceBarOrEnter = async (event: KeyboardEvent) => {\n if (isDatePickerOpen.value) {\n return;\n }\n event.preventDefault();\n\n openDatePicker();\n\n // Wait for the date picker dialog to open\n await nextTick();\n\n // Set current date (today) if no date is selected\n if (!props.value) {\n // Format the opened date picker date to YYYY-MM-DD\n formatTextInputDisplayValue(new Date());\n emit(BentoDatePickerEvent.INPUT, new Date());\n\n // Wait for new value to be set with the emit\n await nextTick();\n }\n\n // Focus on date\n calendarContainerRef.value?.$refs.calendarRef[0].focusOnDate(props.value);\n };\n\n return {\n // Refs\n inputContainerRef,\n calendarContainerRef,\n\n // Values,\n dateDisplayValue,\n datePickerContainerId,\n descriptionConditionalClasses,\n isDateIncorrect,\n isDatePickerOpen,\n isReadOnly,\n dateErrorText,\n labelId,\n descriptionId,\n errorId,\n dateErrorId,\n popoverAriaLabel,\n ariaDescribedBy,\n textInputValue,\n\n // Events\n closeDatePicker,\n clearDatePickerValue,\n onDateSelected,\n openDatePicker,\n onDateKeyDown,\n onDateInputChange,\n\n // Keyboard navigation\n onSpaceBarOrEnter,\n };\n },\n });\n</script>\n\n<style lang=\"scss\" scoped src=\"./date-picker.scss\" />\n"],"names":["BentoDatePickerEvent","BentoDatePickerEvent2","useDatePickerSingleCalendarText","datePickerValue","isDateIncorrect","locale","t","useI18n","locales","enUS","fr","textInputValue","ref","computed","format","DateFormat","dateToFormat","DEBOUNCE_TIME","_sfc_main","defineComponent","messages","BentoTypography","BentoPopover","Calendar","ErrorMessage","DropdownInputDefault","BentoClickOutsideDirective","props","emit","datePickerContainerId","generateUid","labelId","descriptionId","errorId","dateErrorId","popoverAriaLabel","calendarContainerRef","inputContainerRef","isDatePickerOpen","isReadOnly","useFormLayoutFieldLoading","toRef","watch","disabled","dateDisplayValue","formatTextInputDisplayValue","dateErrorText","descriptionConditionalClasses","ariaDescribedBy","isDateEnabled","date","closeDatePicker","openDatePicker","onDateSelected","selectedDate","clearDatePickerValue","onDateKeyDown","event","validateDateInput","validateDate","debounce","stringDate","formatDateInputValue","nextTick","_a","_ctx","createCommentVNode","openBlock","createBlock","_component_bento_typography","_hoisted_1","createElementVNode","createVNode","_component_dropdown_input_default","_component_error_message","normalizeClass","_component_bento_popover","withCtx","_component_calendar"],"mappings":";;;;;;;;;;;;;;;;;AAMY,IAAAA,IAAA,kBAAAC,OACRA,EAAA,QAAA,SADQA,IAAAD,KAAA,CAAA,CAAA;ACML,MAAAE,KAAA,CAAA,EAAA,iBAAAC,GAAA,iBAAAC,EAAA,MAAA;AACH,QAAA,EAAA,QAAAC,GAAA,GAAAC,EAAA,IAAAC,EAAA,GACAC,IAAA,EAAA,IAAA,MAAAC,GAAA,IAAAC,GAAA,GAEAC,IAAAC,EAAA,IAAA;AAoCA,SAAA;AAAA;AAAA,IAAO,kBAlCPC,EAAA,MAEIT,EAAA,QACIO,EAAA,QAIJR,EAAA,QAKAW,EAAAX,EAA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AA;AAAA,UACmB,oBAAAA,EAAA;AAAA,UACP,oBAAA;AAAA,UACL,OAAAA,EAAA;AAAA;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as t, a as r } from "./chunks/index.
|
|
2
|
-
import { b as o } from "./chunks/calendar.
|
|
1
|
+
import { B as t, a as r } from "./chunks/index.fd1cd23a.js";
|
|
2
|
+
import { b as o } from "./chunks/calendar.0e42130b.js";
|
|
3
3
|
export {
|
|
4
4
|
t as BentoDateRangePicker,
|
|
5
5
|
r as BentoDateRangePickerEvent,
|
package/dist/date.js
CHANGED
package/dist/divider.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as i, computed as o, openBlock as s, createElementBlock as n } from "vue";
|
|
2
2
|
import { _ } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
3
|
-
import "./assets/
|
|
3
|
+
import "./assets/index26.css";
|
|
4
4
|
const d = i({
|
|
5
5
|
name: "bento-divider",
|
|
6
6
|
setup(t, { attrs: r }) {
|
package/dist/dropdown.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { B as d } from "./chunks/dropdown.
|
|
1
|
+
import { B as d } from "./chunks/dropdown.ff4f94a8.js";
|
|
2
2
|
import { defineComponent as _, computed as I, resolveComponent as u, openBlock as l, createElementBlock as b, createVNode as m, mergeProps as f, withCtx as y, toRefs as g, provide as h, createBlock as v } from "vue";
|
|
3
|
-
import { B as C, L as B } from "./chunks/listbox-option-tag.
|
|
3
|
+
import { B as C, L as B } from "./chunks/listbox-option-tag.ffe70226.js";
|
|
4
4
|
import { _ as w } from "./chunks/_plugin-vue_export-helper.dad06003.js";
|
|
5
5
|
import { BentoCountry as D, BentoCountryVariant as $ } from "./country.js";
|
|
6
6
|
import { u as A } from "./chunks/useCountryItems.e83ef8f0.js";
|
|
7
|
-
import { d as k } from "./chunks/index.
|
|
7
|
+
import { d as k } from "./chunks/index.77c651df.js";
|
|
8
8
|
import { BentoPaymentMethod as M } from "./payment-method.js";
|
|
9
|
-
import "./assets/
|
|
9
|
+
import "./assets/index31.css";
|
|
10
10
|
const T = _({
|
|
11
11
|
name: "bento-dropdown-avatar",
|
|
12
12
|
components: {
|