aloha-vue 2.85.0 → 2.87.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/CHANGELOG.md +1215 -1200
- package/README.md +117 -117
- package/dist/aloha-vue.css +13827 -13601
- package/dist/aloha-vue.css.map +1 -1
- package/dist/aloha-vue.es.js +60235 -57401
- package/dist/aloha-vue.umd.js +319 -319
- package/package.json +1 -1
- package/scss/components/AButton.scss +6 -6
- package/scss/components/ADivider.scss +9 -9
- package/scss/components/AElement.scss +6 -6
- package/scss/components/AGroupButtonDropdown.scss +4 -4
- package/scss/components/AIcon.scss +17 -17
- package/scss/components/ALoading.scss +18 -18
- package/scss/components/AMenu.scss +634 -634
- package/scss/components/AProgressCirle.scss +43 -43
- package/scss/components/AShowMore.scss +9 -9
- package/scss/components/ATableForm.scss +7 -7
- package/scss/components/ATabs.scss +186 -186
- package/scss/components/ui/AColorPicker.scss +243 -0
- package/scss/components/ui/AJson.scss +11 -11
- package/scss/components/ui/ui.scss +1 -0
- package/scss/text/text_line_height.scss +17 -17
- package/scss/text/text_size.scss +88 -88
- package/scss/utils/acordion.scss +173 -173
- package/scss/utils/alert.scss +81 -81
- package/scss/utils/aloha_prefix.scss +1 -1
- package/scss/utils/backdrop.scss +24 -24
- package/scss/utils/border.scss +65 -65
- package/scss/utils/breakpoint.scss +48 -48
- package/scss/utils/button_close.scss +22 -22
- package/scss/utils/button_group.scss +69 -69
- package/scss/utils/color_utils.scss +234 -234
- package/scss/utils/display.scss +67 -67
- package/scss/utils/flex.scss +141 -141
- package/scss/utils/float.scss +10 -10
- package/scss/utils/global.scss +44 -44
- package/scss/utils/global_variables.scss +26 -26
- package/scss/utils/grid.scss +95 -95
- package/scss/utils/list_columns.scss +31 -31
- package/scss/utils/list_group.scss +127 -127
- package/scss/utils/notification.scss +36 -36
- package/scss/utils/overflow.scss +40 -40
- package/scss/utils/pagination.scss +94 -94
- package/scss/utils/position.scss +90 -90
- package/scss/utils/progress.scss +70 -70
- package/scss/utils/screenreader.scss +16 -16
- package/scss/utils/spinner.scss +35 -35
- package/scss/utils/utils.scss +19 -19
- package/scss/utils/vars_global.scss +12 -12
- package/src/AAlert/i18n/AAlertI18n.js +4 -0
- package/src/AAlert/i18n/nl.json +3 -0
- package/src/AAlert/i18n/pl.json +3 -0
- package/src/ACarousel/i18n/ACarouselI18n.js +4 -0
- package/src/ACarousel/i18n/nl.json +9 -0
- package/src/ACarousel/i18n/pl.json +9 -0
- package/src/ACloak/i18n/ACloakI18n.js +4 -0
- package/src/ACloak/i18n/nl.json +3 -0
- package/src/ACloak/i18n/pl.json +3 -0
- package/src/ADisclosure/i18n/ADisclosureI18n.js +4 -0
- package/src/ADisclosure/i18n/nl.json +4 -0
- package/src/ADisclosure/i18n/pl.json +4 -0
- package/src/AFilters/i18n/AFiltersI18n.js +4 -0
- package/src/AFilters/i18n/nl.json +30 -0
- package/src/AFilters/i18n/pl.json +30 -0
- package/src/AGroupButtonDropdown/AGroupButtonDropdown.js +119 -119
- package/src/ALinkCopy/i18n/ALinkCopyI18n.js +4 -0
- package/src/ALinkCopy/i18n/nl.json +4 -0
- package/src/ALinkCopy/i18n/pl.json +4 -0
- package/src/ALoading/i18n/ALoadingI18n.js +4 -0
- package/src/ALoading/i18n/nl.json +3 -0
- package/src/ALoading/i18n/pl.json +3 -0
- package/src/AMenu/i18n/AMenu2I18n.js +4 -0
- package/src/AMenu/i18n/nl.json +14 -0
- package/src/AMenu/i18n/pl.json +14 -0
- package/src/AModal/compositionAPI/ZIndexAPI.js +48 -48
- package/src/AModal/i18n/AModalI18n.js +4 -0
- package/src/AModal/i18n/nl.json +7 -0
- package/src/AModal/i18n/pl.json +7 -0
- package/src/APagination/i18n/APaginationI18n.js +4 -0
- package/src/APagination/i18n/nl.json +12 -0
- package/src/APagination/i18n/pl.json +12 -0
- package/src/AProgress/AProgress.js +141 -141
- package/src/AProgressCircle/AProgressCircle.js +160 -160
- package/src/AShowMore/i18n/AShowMoreI18n.js +4 -0
- package/src/AShowMore/i18n/nl.json +6 -0
- package/src/AShowMore/i18n/pl.json +6 -0
- package/src/ASpinner/i18n/ASpinnerI18n.js +4 -0
- package/src/ASpinner/i18n/nl.json +3 -0
- package/src/ASpinner/i18n/pl.json +3 -0
- package/src/ATable/ATableHeaderTh/ATableHeaderTh.js +188 -188
- package/src/ATable/i18n/ATableI18n.js +4 -0
- package/src/ATable/i18n/nl.json +54 -0
- package/src/ATable/i18n/pl.json +54 -0
- package/src/ATableForm/i18n/ATableFormI18n.js +4 -0
- package/src/ATableForm/i18n/nl.json +18 -0
- package/src/ATableForm/i18n/pl.json +18 -0
- package/src/ATranslation/compositionAPI/UtilsAPI.js +6 -1
- package/src/ATranslation/compositionAPI/__tests__/UtilsAPI.getTranslatedText.test.js +38 -0
- package/src/AVerticalScroll/i18n/AVerticalScrollI18n.js +4 -0
- package/src/AVerticalScroll/i18n/nl.json +4 -0
- package/src/AVerticalScroll/i18n/pl.json +4 -0
- package/src/AWizard/i18n/AWizardI18n.js +4 -0
- package/src/AWizard/i18n/nl.json +16 -0
- package/src/AWizard/i18n/pl.json +16 -0
- package/src/PVP/new.txt +39 -39
- package/src/PuxDatepicker/PuxDatepicker.js +670 -670
- package/src/PuxDatepicker/PuxDatepicker.pug +131 -131
- package/src/PuxDatepicker/PuxDatepicker.vue +2 -2
- package/src/PuxDatepicker/PuxDatepickerCalendarPanel/PuxDatepickerCalendarPanel.pug +136 -136
- package/src/PuxDatepicker/PuxDatepickerCalendarPanel/PuxDatepickerCalendarPanel.vue +2 -2
- package/src/PuxDatepicker/PuxDatepickerIcon/PuxDatepickerIcon.js +30 -30
- package/src/PuxDatepicker/PuxDatepickerIcon/PuxDatepickerIcon.pug +6 -6
- package/src/PuxDatepicker/PuxDatepickerIcon/PuxDatepickerIcon.vue +2 -2
- package/src/PuxDatepicker/locale/languages.js +174 -174
- package/src/PuxDatepicker/mixins/PanelMixin.js +76 -76
- package/src/PuxDatepicker/panel/PanelDate/PanelDate.pug +41 -41
- package/src/PuxDatepicker/panel/PanelDate/PanelDate.vue +2 -2
- package/src/PuxDatepicker/panel/PanelMonth/PanelMonth.pug +16 -16
- package/src/PuxDatepicker/panel/PanelMonth/PanelMonth.vue +2 -2
- package/src/PuxDatepicker/panel/PanelTime/PanelTime.pug +20 -20
- package/src/PuxDatepicker/panel/PanelTime/PanelTime.vue +2 -2
- package/src/PuxDatepicker/panel/PanelYear/PanelYear.pug +16 -16
- package/src/PuxDatepicker/panel/PanelYear/PanelYear.vue +2 -2
- package/src/PuxDatepicker/panel/PanelYearItem/PanelYearItem.js +55 -55
- package/src/PuxDatepicker/panel/PanelYearItem/PanelYearItem.pug +9 -9
- package/src/PuxDatepicker/panel/PanelYearItem/PanelYearItem.vue +2 -2
- package/src/PuxDatepicker/utils/keysCode.js +9 -9
- package/src/PuxDatepicker/utils/scroll-into-view.js +23 -23
- package/src/PuxDatepicker/utils/transform.js +23 -23
- package/src/filters/i18n/Filters18n.js +4 -0
- package/src/filters/i18n/nl.json +11 -0
- package/src/filters/i18n/pl.json +11 -0
- package/src/i18n/allLanguages.js +96 -0
- package/src/i18n/nl.json +4 -0
- package/src/i18n/pl.json +4 -0
- package/src/index.js +4 -0
- package/src/ui/ACheckbox/ACheckbox.js +5 -0
- package/src/ui/ACheckbox/i18n/ACheckboxI18n.js +4 -0
- package/src/ui/ACheckbox/i18n/nl.json +5 -0
- package/src/ui/ACheckbox/i18n/pl.json +5 -0
- package/src/ui/AColorPicker/AColorPicker.js +743 -0
- package/src/ui/AColorPicker/AColorPickerSaturation/AColorPickerSaturation.js +102 -0
- package/src/ui/AColorPicker/AColorPickerSaturation/compositionAPI/SaturationAPI.js +77 -0
- package/src/ui/AColorPicker/AColorPickerSlider/AColorPickerSlider.js +125 -0
- package/src/ui/AColorPicker/AColorPickerSlider/compositionAPI/SliderAPI.js +73 -0
- package/src/ui/AColorPicker/__tests__/AColorPicker.test.js +204 -0
- package/src/ui/AColorPicker/__tests__/colorUtils.test.js +104 -0
- package/src/ui/AColorPicker/compositionAPI/ColorStateAPI.js +133 -0
- package/src/ui/AColorPicker/compositionAPI/ConfirmAPI.js +36 -0
- package/src/ui/AColorPicker/compositionAPI/FormatAPI.js +59 -0
- package/src/ui/AColorPicker/compositionAPI/InputAPI.js +63 -0
- package/src/ui/AColorPicker/compositionAPI/KeyboardStepAPI.js +42 -0
- package/src/ui/AColorPicker/compositionAPI/PointerDragAPI.js +70 -0
- package/src/ui/AColorPicker/compositionAPI/PopoverAPI.js +196 -0
- package/src/ui/AColorPicker/compositionAPI/PredefineAPI.js +42 -0
- package/src/ui/AColorPicker/compositionAPI/ToggleClassAPI.js +24 -0
- package/src/ui/AColorPicker/i18n/AColorPickerI18n.js +25 -0
- package/src/ui/AColorPicker/i18n/ar.json +14 -0
- package/src/ui/AColorPicker/i18n/de.json +14 -0
- package/src/ui/AColorPicker/i18n/en.json +14 -0
- package/src/ui/AColorPicker/i18n/es.json +14 -0
- package/src/ui/AColorPicker/i18n/fr.json +14 -0
- package/src/ui/AColorPicker/i18n/hr.json +14 -0
- package/src/ui/AColorPicker/i18n/it.json +14 -0
- package/src/ui/AColorPicker/i18n/nl.json +14 -0
- package/src/ui/AColorPicker/i18n/pl.json +14 -0
- package/src/ui/AColorPicker/i18n/ru.json +14 -0
- package/src/ui/AColorPicker/i18n/uk.json +14 -0
- package/src/ui/AColorPicker/utils/colorUtils.js +296 -0
- package/src/ui/ADatepicker/ADatepickerCalendarPanel/ADatepickerCalendarPanel.js +68 -68
- package/src/ui/ADatepicker/i18n/ADatepickerI18n.js +4 -0
- package/src/ui/ADatepicker/i18n/nl.json +58 -0
- package/src/ui/ADatepicker/i18n/pl.json +58 -0
- package/src/ui/ADatepicker/panel/APanelTime/APanelTime.js +147 -147
- package/src/ui/ADatepicker/panel/APanelYear/APanelYear.js +123 -123
- package/src/ui/ADatepickerAlt/ADatepickerCalendarPanel/ADatepickerCalendarPanel.js +804 -804
- package/src/ui/ADatepickerAlt/panel/APanelDate/APanelDate.js +353 -353
- package/src/ui/ADatepickerAlt/panel/APanelMonth/APanelMonth.js +187 -187
- package/src/ui/ADatepickerAlt/panel/APanelTime/APanelTime.js +303 -303
- package/src/ui/ADatepickerAlt/panel/APanelYear/APanelYear.js +162 -162
- package/src/ui/ADatepickerRange/i18n/ADatepickerRangeI18n.js +4 -0
- package/src/ui/ADatepickerRange/i18n/nl.json +4 -0
- package/src/ui/ADatepickerRange/i18n/pl.json +4 -0
- package/src/ui/AErrors/i18n/AErrorsI18n.js +4 -0
- package/src/ui/AErrors/i18n/nl.json +3 -0
- package/src/ui/AErrors/i18n/pl.json +3 -0
- package/src/ui/AFieldset/__tests__/AFieldset.ClassColumn.test.js +1 -0
- package/src/ui/AFieldset/i18n/AFieldsetI18n.js +4 -0
- package/src/ui/AFieldset/i18n/nl.json +4 -0
- package/src/ui/AFieldset/i18n/pl.json +4 -0
- package/src/ui/AFormElementBtnClear/i18n/AFormElementBtnClearI18n.js +4 -0
- package/src/ui/AFormElementBtnClear/i18n/nl.json +3 -0
- package/src/ui/AFormElementBtnClear/i18n/pl.json +3 -0
- package/src/ui/AInput/i18n/AInputI18n.js +4 -0
- package/src/ui/AInput/i18n/nl.json +4 -0
- package/src/ui/AInput/i18n/pl.json +4 -0
- package/src/ui/AInputCurrency/i18n/AInputCurrencyI18n.js +4 -0
- package/src/ui/AInputCurrency/i18n/nl.json +4 -0
- package/src/ui/AInputCurrency/i18n/pl.json +4 -0
- package/src/ui/AInputNumber/i18n/AInputNumberI18n.js +4 -0
- package/src/ui/AInputNumber/i18n/nl.json +4 -0
- package/src/ui/AInputNumber/i18n/pl.json +4 -0
- package/src/ui/AInputNumberRange/i18n/AInputNumberRangeI18n.js +4 -0
- package/src/ui/AInputNumberRange/i18n/nl.json +4 -0
- package/src/ui/AInputNumberRange/i18n/pl.json +4 -0
- package/src/ui/AJson/i18n/AJsonI18n.js +4 -0
- package/src/ui/AJson/i18n/nl.json +8 -0
- package/src/ui/AJson/i18n/pl.json +8 -0
- package/src/ui/AMultiselectOrdered/i18n/AMultiselectOrderedI18n.js +4 -0
- package/src/ui/AMultiselectOrdered/i18n/nl.json +12 -0
- package/src/ui/AMultiselectOrdered/i18n/pl.json +12 -0
- package/src/ui/ARadio/i18n/ARadioI18n.js +4 -0
- package/src/ui/ARadio/i18n/nl.json +5 -0
- package/src/ui/ARadio/i18n/pl.json +5 -0
- package/src/ui/ARequired/i18n/ARequiredI18n.js +4 -0
- package/src/ui/ARequired/i18n/nl.json +3 -0
- package/src/ui/ARequired/i18n/pl.json +3 -0
- package/src/ui/ARouterLinkConfig/i18n/ARouterLinkConfigI18n.js +4 -0
- package/src/ui/ARouterLinkConfig/i18n/nl.json +14 -0
- package/src/ui/ARouterLinkConfig/i18n/pl.json +14 -0
- package/src/ui/ASelect/i18n/ASelectI18n.js +4 -0
- package/src/ui/ASelect/i18n/ar.json +5 -5
- package/src/ui/ASelect/i18n/de.json +4 -4
- package/src/ui/ASelect/i18n/en.json +5 -5
- package/src/ui/ASelect/i18n/es.json +5 -5
- package/src/ui/ASelect/i18n/fr.json +5 -5
- package/src/ui/ASelect/i18n/hr.json +5 -5
- package/src/ui/ASelect/i18n/it.json +5 -5
- package/src/ui/ASelect/i18n/nl.json +11 -0
- package/src/ui/ASelect/i18n/pl.json +11 -0
- package/src/ui/ASelect/i18n/ru.json +5 -5
- package/src/ui/ASelectStyle/i18n/ASelectStyleI18n.js +4 -0
- package/src/ui/ASelectStyle/i18n/nl.json +292 -0
- package/src/ui/ASelectStyle/i18n/pl.json +292 -0
- package/src/ui/ASlider/i18n/ASliderI18n.js +4 -0
- package/src/ui/ASlider/i18n/nl.json +5 -0
- package/src/ui/ASlider/i18n/pl.json +5 -0
- package/src/ui/ASwitch/i18n/ASwitchI18n.js +4 -0
- package/src/ui/ASwitch/i18n/nl.json +5 -0
- package/src/ui/ASwitch/i18n/pl.json +5 -0
- package/src/ui/AUiComponents.js +2 -0
- package/src/ui/AValidatedJson/i18n/AValidatedJsonI18n.js +4 -0
- package/src/ui/AValidatedJson/i18n/nl.json +25 -0
- package/src/ui/AValidatedJson/i18n/pl.json +25 -0
- package/src/ui/compositionApi/__tests__/UiStyleHideAPI.test.js +9 -4
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
.pux_datepicker(
|
|
2
|
-
@mousedown="showPopup"
|
|
3
|
-
@touchstart="showPopup"
|
|
4
|
-
:class="{ pux_datepicker_range: range, disabled: disabled }"
|
|
5
|
-
:style="{ width: computedWidth }"
|
|
6
|
-
)
|
|
7
|
-
.pux_datepicker__input_wrapper(
|
|
8
|
-
role="application"
|
|
9
|
-
)
|
|
10
|
-
input.pux_datepicker__input(
|
|
11
|
-
:id="id"
|
|
12
|
-
:class="inputClass"
|
|
13
|
-
:name="inputName"
|
|
14
|
-
v-bind="inputAttr"
|
|
15
|
-
ref="input"
|
|
16
|
-
type="text"
|
|
17
|
-
autocomplete="off"
|
|
18
|
-
:disabled="disabled"
|
|
19
|
-
:readonly="!editable"
|
|
20
|
-
:value="text"
|
|
21
|
-
:placeholder="innerPlaceholder"
|
|
22
|
-
aria-haspopup="true"
|
|
23
|
-
:aria-owns="idForCalendar"
|
|
24
|
-
@keydown="handleKeydown"
|
|
25
|
-
@focus="handleFocus"
|
|
26
|
-
@blur="handleBlur"
|
|
27
|
-
@input="handleInput"
|
|
28
|
-
@change="handleChange"
|
|
29
|
-
)
|
|
30
|
-
span.pux_datepicker__input_wrapper__append.pux_datepicker__input_wrapper__clear_wrapper(
|
|
31
|
-
v-if="showClearIcon"
|
|
32
|
-
aria-hidden="true"
|
|
33
|
-
@mousedown.stop="clearDate"
|
|
34
|
-
)
|
|
35
|
-
slot(
|
|
36
|
-
name="clear-icon"
|
|
37
|
-
)
|
|
38
|
-
i.pux_datepicker__input__icon.pux_datepicker__input__clear_icon
|
|
39
|
-
span.pux_datepicker__input_wrapper__append
|
|
40
|
-
slot(
|
|
41
|
-
name="calendar-icon"
|
|
42
|
-
)
|
|
43
|
-
pux-datepicker-icon(
|
|
44
|
-
:type="type"
|
|
45
|
-
aria-hidden="true"
|
|
46
|
-
)
|
|
47
|
-
.pux_datepicker__popup(
|
|
48
|
-
v-show="popupVisible"
|
|
49
|
-
:id="idForCalendar"
|
|
50
|
-
ref="calendar"
|
|
51
|
-
:aria-hidden="ariaHiddenForCalendar"
|
|
52
|
-
:aria-expanded="ariaExpandedForCalendar"
|
|
53
|
-
:style="innerPopupStyle"
|
|
54
|
-
@click.stop.prevent
|
|
55
|
-
)
|
|
56
|
-
slot(
|
|
57
|
-
name="header"
|
|
58
|
-
)
|
|
59
|
-
.pux_datepicker__shortcuts_wrapper(
|
|
60
|
-
v-if="range && innerShortcuts.length"
|
|
61
|
-
)
|
|
62
|
-
a-button.pux_datepicker__shortcuts_wrapper__shortcuts(
|
|
63
|
-
v-for="(range, index) in innerShortcuts"
|
|
64
|
-
:key="index"
|
|
65
|
-
@click="selectRange(range)"
|
|
66
|
-
) {{ range.text }}
|
|
67
|
-
pux-datepicker-calendar-panel(
|
|
68
|
-
v-if="!range"
|
|
69
|
-
:id="idForPanel"
|
|
70
|
-
ref="calendarPanel"
|
|
71
|
-
v-bind="$attrs"
|
|
72
|
-
:index="-1"
|
|
73
|
-
:type="innerType"
|
|
74
|
-
:date-format="innerDateFormat"
|
|
75
|
-
:value="currentValue"
|
|
76
|
-
:visible="popupVisible"
|
|
77
|
-
:current-language="currentLanguage"
|
|
78
|
-
@select-date="selectDate"
|
|
79
|
-
@select-time="selectTime"
|
|
80
|
-
@close-popup="closePopup"
|
|
81
|
-
)
|
|
82
|
-
.pux_datepicker__range_wrapper(
|
|
83
|
-
v-else
|
|
84
|
-
)
|
|
85
|
-
pux-datepicker-calendar-panel(
|
|
86
|
-
:id="idsForPanelRange[0]"
|
|
87
|
-
ref="calendarPanel"
|
|
88
|
-
style="box-shadow: 1px 0 rgba(0, 0, 0, .1);"
|
|
89
|
-
v-bind="$attrs"
|
|
90
|
-
:index="0"
|
|
91
|
-
:type="innerType"
|
|
92
|
-
:date-format="innerDateFormat"
|
|
93
|
-
:value="currentValue[0]"
|
|
94
|
-
:end-at="currentValue[1]"
|
|
95
|
-
:start-at="null"
|
|
96
|
-
:visible="popupVisible"
|
|
97
|
-
:current-language="currentLanguage"
|
|
98
|
-
@select-date="selectStartDate"
|
|
99
|
-
@select-time="selectStartTime"
|
|
100
|
-
@close-popup="closePopup"
|
|
101
|
-
)
|
|
102
|
-
pux-datepicker-calendar-panel(
|
|
103
|
-
:id="idsForPanelRange[1]"
|
|
104
|
-
ref="calendarPanel2"
|
|
105
|
-
v-bind="$attrs"
|
|
106
|
-
:index="1"
|
|
107
|
-
:type="innerType"
|
|
108
|
-
:date-format="innerDateFormat"
|
|
109
|
-
:value="currentValue[1]"
|
|
110
|
-
:start-at="currentValue[0]"
|
|
111
|
-
:end-at="null"
|
|
112
|
-
:visible="popupVisible"
|
|
113
|
-
:current-language="currentLanguage"
|
|
114
|
-
@select-date="selectEndDate"
|
|
115
|
-
@select-time="selectEndTime"
|
|
116
|
-
@close-popup="closePopup"
|
|
117
|
-
)
|
|
118
|
-
slot(
|
|
119
|
-
name="footer"
|
|
120
|
-
:confirm="confirmDate"
|
|
121
|
-
)
|
|
122
|
-
.pux_datepicker__footer(
|
|
123
|
-
v-if="confirm"
|
|
124
|
-
)
|
|
125
|
-
a-button.pux_datepicker__footer__btn.pux_datepicker__footer__btn_confirm(
|
|
126
|
-
@click="confirmDate"
|
|
127
|
-
) {{ confirmText }}
|
|
128
|
-
div(
|
|
129
|
-
ref="focusByClose"
|
|
130
|
-
tabindex="-1"
|
|
131
|
-
)
|
|
1
|
+
.pux_datepicker(
|
|
2
|
+
@mousedown="showPopup"
|
|
3
|
+
@touchstart="showPopup"
|
|
4
|
+
:class="{ pux_datepicker_range: range, disabled: disabled }"
|
|
5
|
+
:style="{ width: computedWidth }"
|
|
6
|
+
)
|
|
7
|
+
.pux_datepicker__input_wrapper(
|
|
8
|
+
role="application"
|
|
9
|
+
)
|
|
10
|
+
input.pux_datepicker__input(
|
|
11
|
+
:id="id"
|
|
12
|
+
:class="inputClass"
|
|
13
|
+
:name="inputName"
|
|
14
|
+
v-bind="inputAttr"
|
|
15
|
+
ref="input"
|
|
16
|
+
type="text"
|
|
17
|
+
autocomplete="off"
|
|
18
|
+
:disabled="disabled"
|
|
19
|
+
:readonly="!editable"
|
|
20
|
+
:value="text"
|
|
21
|
+
:placeholder="innerPlaceholder"
|
|
22
|
+
aria-haspopup="true"
|
|
23
|
+
:aria-owns="idForCalendar"
|
|
24
|
+
@keydown="handleKeydown"
|
|
25
|
+
@focus="handleFocus"
|
|
26
|
+
@blur="handleBlur"
|
|
27
|
+
@input="handleInput"
|
|
28
|
+
@change="handleChange"
|
|
29
|
+
)
|
|
30
|
+
span.pux_datepicker__input_wrapper__append.pux_datepicker__input_wrapper__clear_wrapper(
|
|
31
|
+
v-if="showClearIcon"
|
|
32
|
+
aria-hidden="true"
|
|
33
|
+
@mousedown.stop="clearDate"
|
|
34
|
+
)
|
|
35
|
+
slot(
|
|
36
|
+
name="clear-icon"
|
|
37
|
+
)
|
|
38
|
+
i.pux_datepicker__input__icon.pux_datepicker__input__clear_icon
|
|
39
|
+
span.pux_datepicker__input_wrapper__append
|
|
40
|
+
slot(
|
|
41
|
+
name="calendar-icon"
|
|
42
|
+
)
|
|
43
|
+
pux-datepicker-icon(
|
|
44
|
+
:type="type"
|
|
45
|
+
aria-hidden="true"
|
|
46
|
+
)
|
|
47
|
+
.pux_datepicker__popup(
|
|
48
|
+
v-show="popupVisible"
|
|
49
|
+
:id="idForCalendar"
|
|
50
|
+
ref="calendar"
|
|
51
|
+
:aria-hidden="ariaHiddenForCalendar"
|
|
52
|
+
:aria-expanded="ariaExpandedForCalendar"
|
|
53
|
+
:style="innerPopupStyle"
|
|
54
|
+
@click.stop.prevent
|
|
55
|
+
)
|
|
56
|
+
slot(
|
|
57
|
+
name="header"
|
|
58
|
+
)
|
|
59
|
+
.pux_datepicker__shortcuts_wrapper(
|
|
60
|
+
v-if="range && innerShortcuts.length"
|
|
61
|
+
)
|
|
62
|
+
a-button.pux_datepicker__shortcuts_wrapper__shortcuts(
|
|
63
|
+
v-for="(range, index) in innerShortcuts"
|
|
64
|
+
:key="index"
|
|
65
|
+
@click="selectRange(range)"
|
|
66
|
+
) {{ range.text }}
|
|
67
|
+
pux-datepicker-calendar-panel(
|
|
68
|
+
v-if="!range"
|
|
69
|
+
:id="idForPanel"
|
|
70
|
+
ref="calendarPanel"
|
|
71
|
+
v-bind="$attrs"
|
|
72
|
+
:index="-1"
|
|
73
|
+
:type="innerType"
|
|
74
|
+
:date-format="innerDateFormat"
|
|
75
|
+
:value="currentValue"
|
|
76
|
+
:visible="popupVisible"
|
|
77
|
+
:current-language="currentLanguage"
|
|
78
|
+
@select-date="selectDate"
|
|
79
|
+
@select-time="selectTime"
|
|
80
|
+
@close-popup="closePopup"
|
|
81
|
+
)
|
|
82
|
+
.pux_datepicker__range_wrapper(
|
|
83
|
+
v-else
|
|
84
|
+
)
|
|
85
|
+
pux-datepicker-calendar-panel(
|
|
86
|
+
:id="idsForPanelRange[0]"
|
|
87
|
+
ref="calendarPanel"
|
|
88
|
+
style="box-shadow: 1px 0 rgba(0, 0, 0, .1);"
|
|
89
|
+
v-bind="$attrs"
|
|
90
|
+
:index="0"
|
|
91
|
+
:type="innerType"
|
|
92
|
+
:date-format="innerDateFormat"
|
|
93
|
+
:value="currentValue[0]"
|
|
94
|
+
:end-at="currentValue[1]"
|
|
95
|
+
:start-at="null"
|
|
96
|
+
:visible="popupVisible"
|
|
97
|
+
:current-language="currentLanguage"
|
|
98
|
+
@select-date="selectStartDate"
|
|
99
|
+
@select-time="selectStartTime"
|
|
100
|
+
@close-popup="closePopup"
|
|
101
|
+
)
|
|
102
|
+
pux-datepicker-calendar-panel(
|
|
103
|
+
:id="idsForPanelRange[1]"
|
|
104
|
+
ref="calendarPanel2"
|
|
105
|
+
v-bind="$attrs"
|
|
106
|
+
:index="1"
|
|
107
|
+
:type="innerType"
|
|
108
|
+
:date-format="innerDateFormat"
|
|
109
|
+
:value="currentValue[1]"
|
|
110
|
+
:start-at="currentValue[0]"
|
|
111
|
+
:end-at="null"
|
|
112
|
+
:visible="popupVisible"
|
|
113
|
+
:current-language="currentLanguage"
|
|
114
|
+
@select-date="selectEndDate"
|
|
115
|
+
@select-time="selectEndTime"
|
|
116
|
+
@close-popup="closePopup"
|
|
117
|
+
)
|
|
118
|
+
slot(
|
|
119
|
+
name="footer"
|
|
120
|
+
:confirm="confirmDate"
|
|
121
|
+
)
|
|
122
|
+
.pux_datepicker__footer(
|
|
123
|
+
v-if="confirm"
|
|
124
|
+
)
|
|
125
|
+
a-button.pux_datepicker__footer__btn.pux_datepicker__footer__btn_confirm(
|
|
126
|
+
@click="confirmDate"
|
|
127
|
+
) {{ confirmText }}
|
|
128
|
+
div(
|
|
129
|
+
ref="focusByClose"
|
|
130
|
+
tabindex="-1"
|
|
131
|
+
)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<template lang="pug" src="./PuxDatepicker.pug"></template>
|
|
2
|
-
<script src="./PuxDatepicker.js"></script>
|
|
1
|
+
<template lang="pug" src="./PuxDatepicker.pug"></template>
|
|
2
|
+
<script src="./PuxDatepicker.js"></script>
|
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
.pux_datepicker__calendar(
|
|
2
|
-
role="region"
|
|
3
|
-
:class="'pux_datepicker__calendar_' + panel.toLowerCase()"
|
|
4
|
-
:aria-labelledby="idForHeaderParent"
|
|
5
|
-
)
|
|
6
|
-
.sr-only(
|
|
7
|
-
role="header"
|
|
8
|
-
:id="idForHeaderParent"
|
|
9
|
-
)
|
|
10
|
-
div(
|
|
11
|
-
:id="idForHeader"
|
|
12
|
-
aria-live="polite"
|
|
13
|
-
)
|
|
14
|
-
span(
|
|
15
|
-
v-if="panel === 'DATE'"
|
|
16
|
-
) {{ months[calendarMonth] }}
|
|
17
|
-
span(
|
|
18
|
-
v-if="panel === 'DATE' || panel === 'MONTH'"
|
|
19
|
-
) {{ calendarYear }}
|
|
20
|
-
span(
|
|
21
|
-
v-if="panel === 'YEAR'"
|
|
22
|
-
) {{ yearHeader }}
|
|
23
|
-
span(
|
|
24
|
-
v-if="panel === 'TIME'"
|
|
25
|
-
) {{ timeHeader }}
|
|
26
|
-
div {{ suffixForHeader }}
|
|
27
|
-
|
|
28
|
-
.pux_datepicker__calendar__header
|
|
29
|
-
div
|
|
30
|
-
a-button.pux_datepicker__icon_last_year.pux_datepicker__calendar__tab(
|
|
31
|
-
v-if="panel !== 'TIME'"
|
|
32
|
-
:aria-label="ariaLabelForButtonLastYear"
|
|
33
|
-
@click="handleIconYear(-1)"
|
|
34
|
-
) «
|
|
35
|
-
a-button.pux_datepicker__icon_last_month.pux_datepicker__calendar__tab(
|
|
36
|
-
v-if="panel === 'DATE'"
|
|
37
|
-
:aria-label="ariaLabelForButtonLastMonth"
|
|
38
|
-
@click="handleIconMonth(-1)"
|
|
39
|
-
) ‹
|
|
40
|
-
div
|
|
41
|
-
a-button.pux_datepicker__current_month.pux_datepicker__calendar__tab(
|
|
42
|
-
v-if="panel === 'DATE'"
|
|
43
|
-
:aria-label="ariaLabelForButtonCurrentMonth"
|
|
44
|
-
@click="handleBtnMonth"
|
|
45
|
-
) {{ months[calendarMonth] }}
|
|
46
|
-
a-button.pux_datepicker__current_year.pux_datepicker__calendar__tab(
|
|
47
|
-
v-if="panel === 'DATE' || panel === 'MONTH'"
|
|
48
|
-
:aria-label="ariaLabelForButtonCurrentYear"
|
|
49
|
-
@click="handleBtnYear"
|
|
50
|
-
) {{ calendarYear }}
|
|
51
|
-
span.pux_datepicker__current_year(
|
|
52
|
-
v-if="panel === 'YEAR'"
|
|
53
|
-
) {{ yearHeader }}
|
|
54
|
-
template(
|
|
55
|
-
v-if="panel === 'TIME'"
|
|
56
|
-
)
|
|
57
|
-
span.pux_datepicker__time_header(
|
|
58
|
-
v-if="type === 'time'"
|
|
59
|
-
) {{ timeHeader }}
|
|
60
|
-
a-button.pux_datepicker__time_header.pux_datepicker__calendar__tab(
|
|
61
|
-
v-else
|
|
62
|
-
:aria-label="ariaLabelForButtonToDays"
|
|
63
|
-
@click="handleTimeHeader"
|
|
64
|
-
) {{ timeHeader }}
|
|
65
|
-
div
|
|
66
|
-
a-button.pux_datepicker__icon_next_month.pux_datepicker__calendar__tab(
|
|
67
|
-
v-if="panel === 'DATE'"
|
|
68
|
-
:aria-label="ariaLabelForButtonNextMonth"
|
|
69
|
-
@click="handleIconMonth(1)"
|
|
70
|
-
) ›
|
|
71
|
-
a-button.pux_datepicker__icon_next_year.pux_datepicker__calendar__tab(
|
|
72
|
-
v-if="panel !== 'TIME'"
|
|
73
|
-
:aria-label="ariaLabelForButtonNextYear"
|
|
74
|
-
@click="handleIconYear(1)"
|
|
75
|
-
) »
|
|
76
|
-
a-button.a_btn_close.a_m_2.absolute-top-right(
|
|
77
|
-
@click="closePopup"
|
|
78
|
-
aria-label="Close"
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
.pux_datepicker__calendar__content(
|
|
82
|
-
role="application"
|
|
83
|
-
)
|
|
84
|
-
panel-date(
|
|
85
|
-
v-show="panel === 'DATE'"
|
|
86
|
-
:id="id"
|
|
87
|
-
ref="panelDate"
|
|
88
|
-
tabindex="0"
|
|
89
|
-
:class="{ pux_datepicker__panel_focus: isFocusPanelChild, pux_datepicker__calendar__tab: panel === 'DATE' }"
|
|
90
|
-
:value="value"
|
|
91
|
-
:date-format="dateFormat"
|
|
92
|
-
:calendar-month="calendarMonth"
|
|
93
|
-
:calendar-year="calendarYear"
|
|
94
|
-
:start-at="startAt"
|
|
95
|
-
:end-at="endAt"
|
|
96
|
-
:first-day-of-week="firstDayOfWeek"
|
|
97
|
-
:disabled-date="isDisabledDate"
|
|
98
|
-
:current-language="currentLanguage"
|
|
99
|
-
@select="selectDate"
|
|
100
|
-
@handleIconMonth="handleIconMonth"
|
|
101
|
-
)
|
|
102
|
-
panel-year(
|
|
103
|
-
v-show="panel === 'YEAR'"
|
|
104
|
-
:id="id"
|
|
105
|
-
ref="panelYear"
|
|
106
|
-
:class="{ pux_datepicker__panel_focus: isFocusPanelChild, pux_datepicker__calendar__tab: panel === 'YEAR' }"
|
|
107
|
-
:value="value"
|
|
108
|
-
:disabled-year="isDisabledYear"
|
|
109
|
-
:first-year="firstYear"
|
|
110
|
-
@select="selectYear"
|
|
111
|
-
@handleIconYear="handleIconYear"
|
|
112
|
-
)
|
|
113
|
-
panel-month(
|
|
114
|
-
v-show="panel === 'MONTH'"
|
|
115
|
-
:id="id"
|
|
116
|
-
ref="panelMonth"
|
|
117
|
-
:class="{ pux_datepicker__panel_focus: isFocusPanelChild, pux_datepicker__calendar__tab: panel === 'MONTH' }"
|
|
118
|
-
:value="value"
|
|
119
|
-
:disabled-month="isDisabledMonth"
|
|
120
|
-
:calendar-year="calendarYear"
|
|
121
|
-
:current-language="currentLanguage"
|
|
122
|
-
@select="selectMonth"
|
|
123
|
-
@handleIconYear="handleIconYear"
|
|
124
|
-
)
|
|
125
|
-
panel-time(
|
|
126
|
-
v-show="panel === 'TIME'"
|
|
127
|
-
:id="id"
|
|
128
|
-
ref="panelTime"
|
|
129
|
-
:class="{ pux_datepicker__panel_focus: isFocusPanelChild, pux_datepicker__calendar__tab: panel === 'TIME' }"
|
|
130
|
-
:minute-step="minuteStep"
|
|
131
|
-
:value="value"
|
|
132
|
-
:disabled-time="isDisabledTime"
|
|
133
|
-
:time-type="timeType"
|
|
134
|
-
:current-language="currentLanguage"
|
|
135
|
-
@select="selectTime"
|
|
136
|
-
)
|
|
1
|
+
.pux_datepicker__calendar(
|
|
2
|
+
role="region"
|
|
3
|
+
:class="'pux_datepicker__calendar_' + panel.toLowerCase()"
|
|
4
|
+
:aria-labelledby="idForHeaderParent"
|
|
5
|
+
)
|
|
6
|
+
.sr-only(
|
|
7
|
+
role="header"
|
|
8
|
+
:id="idForHeaderParent"
|
|
9
|
+
)
|
|
10
|
+
div(
|
|
11
|
+
:id="idForHeader"
|
|
12
|
+
aria-live="polite"
|
|
13
|
+
)
|
|
14
|
+
span(
|
|
15
|
+
v-if="panel === 'DATE'"
|
|
16
|
+
) {{ months[calendarMonth] }}
|
|
17
|
+
span(
|
|
18
|
+
v-if="panel === 'DATE' || panel === 'MONTH'"
|
|
19
|
+
) {{ calendarYear }}
|
|
20
|
+
span(
|
|
21
|
+
v-if="panel === 'YEAR'"
|
|
22
|
+
) {{ yearHeader }}
|
|
23
|
+
span(
|
|
24
|
+
v-if="panel === 'TIME'"
|
|
25
|
+
) {{ timeHeader }}
|
|
26
|
+
div {{ suffixForHeader }}
|
|
27
|
+
|
|
28
|
+
.pux_datepicker__calendar__header
|
|
29
|
+
div
|
|
30
|
+
a-button.pux_datepicker__icon_last_year.pux_datepicker__calendar__tab(
|
|
31
|
+
v-if="panel !== 'TIME'"
|
|
32
|
+
:aria-label="ariaLabelForButtonLastYear"
|
|
33
|
+
@click="handleIconYear(-1)"
|
|
34
|
+
) «
|
|
35
|
+
a-button.pux_datepicker__icon_last_month.pux_datepicker__calendar__tab(
|
|
36
|
+
v-if="panel === 'DATE'"
|
|
37
|
+
:aria-label="ariaLabelForButtonLastMonth"
|
|
38
|
+
@click="handleIconMonth(-1)"
|
|
39
|
+
) ‹
|
|
40
|
+
div
|
|
41
|
+
a-button.pux_datepicker__current_month.pux_datepicker__calendar__tab(
|
|
42
|
+
v-if="panel === 'DATE'"
|
|
43
|
+
:aria-label="ariaLabelForButtonCurrentMonth"
|
|
44
|
+
@click="handleBtnMonth"
|
|
45
|
+
) {{ months[calendarMonth] }}
|
|
46
|
+
a-button.pux_datepicker__current_year.pux_datepicker__calendar__tab(
|
|
47
|
+
v-if="panel === 'DATE' || panel === 'MONTH'"
|
|
48
|
+
:aria-label="ariaLabelForButtonCurrentYear"
|
|
49
|
+
@click="handleBtnYear"
|
|
50
|
+
) {{ calendarYear }}
|
|
51
|
+
span.pux_datepicker__current_year(
|
|
52
|
+
v-if="panel === 'YEAR'"
|
|
53
|
+
) {{ yearHeader }}
|
|
54
|
+
template(
|
|
55
|
+
v-if="panel === 'TIME'"
|
|
56
|
+
)
|
|
57
|
+
span.pux_datepicker__time_header(
|
|
58
|
+
v-if="type === 'time'"
|
|
59
|
+
) {{ timeHeader }}
|
|
60
|
+
a-button.pux_datepicker__time_header.pux_datepicker__calendar__tab(
|
|
61
|
+
v-else
|
|
62
|
+
:aria-label="ariaLabelForButtonToDays"
|
|
63
|
+
@click="handleTimeHeader"
|
|
64
|
+
) {{ timeHeader }}
|
|
65
|
+
div
|
|
66
|
+
a-button.pux_datepicker__icon_next_month.pux_datepicker__calendar__tab(
|
|
67
|
+
v-if="panel === 'DATE'"
|
|
68
|
+
:aria-label="ariaLabelForButtonNextMonth"
|
|
69
|
+
@click="handleIconMonth(1)"
|
|
70
|
+
) ›
|
|
71
|
+
a-button.pux_datepicker__icon_next_year.pux_datepicker__calendar__tab(
|
|
72
|
+
v-if="panel !== 'TIME'"
|
|
73
|
+
:aria-label="ariaLabelForButtonNextYear"
|
|
74
|
+
@click="handleIconYear(1)"
|
|
75
|
+
) »
|
|
76
|
+
a-button.a_btn_close.a_m_2.absolute-top-right(
|
|
77
|
+
@click="closePopup"
|
|
78
|
+
aria-label="Close"
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
.pux_datepicker__calendar__content(
|
|
82
|
+
role="application"
|
|
83
|
+
)
|
|
84
|
+
panel-date(
|
|
85
|
+
v-show="panel === 'DATE'"
|
|
86
|
+
:id="id"
|
|
87
|
+
ref="panelDate"
|
|
88
|
+
tabindex="0"
|
|
89
|
+
:class="{ pux_datepicker__panel_focus: isFocusPanelChild, pux_datepicker__calendar__tab: panel === 'DATE' }"
|
|
90
|
+
:value="value"
|
|
91
|
+
:date-format="dateFormat"
|
|
92
|
+
:calendar-month="calendarMonth"
|
|
93
|
+
:calendar-year="calendarYear"
|
|
94
|
+
:start-at="startAt"
|
|
95
|
+
:end-at="endAt"
|
|
96
|
+
:first-day-of-week="firstDayOfWeek"
|
|
97
|
+
:disabled-date="isDisabledDate"
|
|
98
|
+
:current-language="currentLanguage"
|
|
99
|
+
@select="selectDate"
|
|
100
|
+
@handleIconMonth="handleIconMonth"
|
|
101
|
+
)
|
|
102
|
+
panel-year(
|
|
103
|
+
v-show="panel === 'YEAR'"
|
|
104
|
+
:id="id"
|
|
105
|
+
ref="panelYear"
|
|
106
|
+
:class="{ pux_datepicker__panel_focus: isFocusPanelChild, pux_datepicker__calendar__tab: panel === 'YEAR' }"
|
|
107
|
+
:value="value"
|
|
108
|
+
:disabled-year="isDisabledYear"
|
|
109
|
+
:first-year="firstYear"
|
|
110
|
+
@select="selectYear"
|
|
111
|
+
@handleIconYear="handleIconYear"
|
|
112
|
+
)
|
|
113
|
+
panel-month(
|
|
114
|
+
v-show="panel === 'MONTH'"
|
|
115
|
+
:id="id"
|
|
116
|
+
ref="panelMonth"
|
|
117
|
+
:class="{ pux_datepicker__panel_focus: isFocusPanelChild, pux_datepicker__calendar__tab: panel === 'MONTH' }"
|
|
118
|
+
:value="value"
|
|
119
|
+
:disabled-month="isDisabledMonth"
|
|
120
|
+
:calendar-year="calendarYear"
|
|
121
|
+
:current-language="currentLanguage"
|
|
122
|
+
@select="selectMonth"
|
|
123
|
+
@handleIconYear="handleIconYear"
|
|
124
|
+
)
|
|
125
|
+
panel-time(
|
|
126
|
+
v-show="panel === 'TIME'"
|
|
127
|
+
:id="id"
|
|
128
|
+
ref="panelTime"
|
|
129
|
+
:class="{ pux_datepicker__panel_focus: isFocusPanelChild, pux_datepicker__calendar__tab: panel === 'TIME' }"
|
|
130
|
+
:minute-step="minuteStep"
|
|
131
|
+
:value="value"
|
|
132
|
+
:disabled-time="isDisabledTime"
|
|
133
|
+
:time-type="timeType"
|
|
134
|
+
:current-language="currentLanguage"
|
|
135
|
+
@select="selectTime"
|
|
136
|
+
)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<template lang="pug" src="./PuxDatepickerCalendarPanel.pug"></template>
|
|
2
|
-
<script src="./PuxDatepickerCalendarPanel.js"></script>
|
|
1
|
+
<template lang="pug" src="./PuxDatepickerCalendarPanel.pug"></template>
|
|
2
|
+
<script src="./PuxDatepickerCalendarPanel.js"></script>
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
// @vue/component
|
|
2
|
-
export default {
|
|
3
|
-
name: "PuxDatepickerIcon",
|
|
4
|
-
props: {
|
|
5
|
-
type: {
|
|
6
|
-
type: String,
|
|
7
|
-
default: "date",
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
computed: {
|
|
11
|
-
svgHtml() {
|
|
12
|
-
if (this.type === "time") {
|
|
13
|
-
return `<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 16" class="bi bi-clock pux_datepicker__calendar_icon" style="stroke-width: .1px;">
|
|
14
|
-
<path d="M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71z"/>
|
|
15
|
-
<path d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m7-8A7 7 0 1 1 1 8a7 7 0 0 1 14 0"/>
|
|
16
|
-
</svg>`;
|
|
17
|
-
}
|
|
18
|
-
return `<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 200 200" class="pux_datepicker__calendar_icon">
|
|
19
|
-
<rect x="13" y="29" rx="14" ry="14" width="174" height="158" fill="transparent"></rect>
|
|
20
|
-
<line x1="46" x2="46" y1="8" y2="50"></line> <line x1="154" x2="154" y1="8" y2="50"></line>
|
|
21
|
-
<line x1="13" x2="187" y1="70" y2="70"></line>
|
|
22
|
-
<text x="50%" y="135" font-size="90" stroke-width="1" text-anchor="middle" dominant-baseline="middle">${ this.todayInDayFormat }</text>
|
|
23
|
-
</svg>`;
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
todayInDayFormat() {
|
|
27
|
-
return new Date().getDate();
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
};
|
|
1
|
+
// @vue/component
|
|
2
|
+
export default {
|
|
3
|
+
name: "PuxDatepickerIcon",
|
|
4
|
+
props: {
|
|
5
|
+
type: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: "date",
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
computed: {
|
|
11
|
+
svgHtml() {
|
|
12
|
+
if (this.type === "time") {
|
|
13
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 16" class="bi bi-clock pux_datepicker__calendar_icon" style="stroke-width: .1px;">
|
|
14
|
+
<path d="M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71z"/>
|
|
15
|
+
<path d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m7-8A7 7 0 1 1 1 8a7 7 0 0 1 14 0"/>
|
|
16
|
+
</svg>`;
|
|
17
|
+
}
|
|
18
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 200 200" class="pux_datepicker__calendar_icon">
|
|
19
|
+
<rect x="13" y="29" rx="14" ry="14" width="174" height="158" fill="transparent"></rect>
|
|
20
|
+
<line x1="46" x2="46" y1="8" y2="50"></line> <line x1="154" x2="154" y1="8" y2="50"></line>
|
|
21
|
+
<line x1="13" x2="187" y1="70" y2="70"></line>
|
|
22
|
+
<text x="50%" y="135" font-size="90" stroke-width="1" text-anchor="middle" dominant-baseline="middle">${ this.todayInDayFormat }</text>
|
|
23
|
+
</svg>`;
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
todayInDayFormat() {
|
|
27
|
+
return new Date().getDate();
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
span(
|
|
2
|
-
aria-hidden="true"
|
|
3
|
-
v-safe-html="svgHtml"
|
|
4
|
-
)
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
span(
|
|
2
|
+
aria-hidden="true"
|
|
3
|
+
v-safe-html="svgHtml"
|
|
4
|
+
)
|
|
5
|
+
|
|
6
|
+
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<template lang="pug" src="./PuxDatepickerIcon.pug"></template>
|
|
2
|
-
<script src="./PuxDatepickerIcon.js"></script>
|
|
1
|
+
<template lang="pug" src="./PuxDatepickerIcon.pug"></template>
|
|
2
|
+
<script src="./PuxDatepickerIcon.js"></script>
|