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
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
ref,
|
|
4
|
+
toRef,
|
|
5
|
+
} from "vue";
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
detectColorFormat,
|
|
9
|
+
formatColor,
|
|
10
|
+
getContrastTextColor,
|
|
11
|
+
hsvToRgb,
|
|
12
|
+
parseColor,
|
|
13
|
+
rgbToHsv,
|
|
14
|
+
toCssColor,
|
|
15
|
+
} from "../utils/colorUtils";
|
|
16
|
+
import {
|
|
17
|
+
isEqual,
|
|
18
|
+
} from "lodash-es";
|
|
19
|
+
|
|
20
|
+
const COLOR_FALLBACK = { r: 255, g: 0, b: 0, a: 1 };
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* State of the panel (hsva) and the colors derived from it and from the model.
|
|
24
|
+
*/
|
|
25
|
+
export default function ColorStateAPI(props, {
|
|
26
|
+
currentFormat = ref("hex"),
|
|
27
|
+
} = {}) {
|
|
28
|
+
const modelValue = toRef(props, "modelValue");
|
|
29
|
+
const panelDefaultColor = toRef(props, "panelDefaultColor");
|
|
30
|
+
const showAlpha = toRef(props, "showAlpha");
|
|
31
|
+
|
|
32
|
+
const hsva = ref({ h: 0, s: 100, v: 100, a: 1 });
|
|
33
|
+
|
|
34
|
+
/*
|
|
35
|
+
* The model value as it was when the dialog was opened. As long as the color
|
|
36
|
+
* and the format are not changed, this text is shown and written back,
|
|
37
|
+
* so e.g. "hsl(145, 63%, 29%)" does not become "hsl(145, 64%, 29%)" by rounding.
|
|
38
|
+
*/
|
|
39
|
+
const modelSnapshot = ref(undefined);
|
|
40
|
+
|
|
41
|
+
const modelColor = computed(() => parseColor(modelValue.value));
|
|
42
|
+
|
|
43
|
+
const modelCssColor = computed(() => {
|
|
44
|
+
return modelColor.value ? toCssColor(modelColor.value) : undefined;
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const modelTextColor = computed(() => {
|
|
48
|
+
return modelColor.value ? getContrastTextColor(modelColor.value) : undefined;
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const rgbaLocal = computed(() => {
|
|
52
|
+
return {
|
|
53
|
+
...hsvToRgb(hsva.value),
|
|
54
|
+
a: showAlpha.value ? hsva.value.a : 1,
|
|
55
|
+
};
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const valueLocal = computed(() => {
|
|
59
|
+
if (modelSnapshot.value &&
|
|
60
|
+
modelSnapshot.value.format === currentFormat.value &&
|
|
61
|
+
isEqual(modelSnapshot.value.hsva, hsva.value)) {
|
|
62
|
+
return modelSnapshot.value.text;
|
|
63
|
+
}
|
|
64
|
+
return formatColor(rgbaLocal.value, currentFormat.value, showAlpha.value);
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
const cssColorLocal = computed(() => toCssColor(rgbaLocal.value));
|
|
68
|
+
|
|
69
|
+
const cssColorOpaqueLocal = computed(() => toCssColor({ ...rgbaLocal.value, a: 1 }));
|
|
70
|
+
|
|
71
|
+
const hueCssColor = computed(() => `hsl(${ hsva.value.h }, 100%, 50%)`);
|
|
72
|
+
|
|
73
|
+
const alphaBackground = computed(() => {
|
|
74
|
+
return `linear-gradient(to right, transparent, ${ cssColorOpaqueLocal.value })`;
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const alphaPercent = computed(() => Math.round(hsva.value.a * 100));
|
|
78
|
+
|
|
79
|
+
const setColor = ({ r, g, b, a = 1 }) => {
|
|
80
|
+
const HSV = rgbToHsv({ r, g, b });
|
|
81
|
+
// gray, black and white have no hue: keep the current one
|
|
82
|
+
const IS_HUE_KEPT = HSV.s === 0 || HSV.v === 0;
|
|
83
|
+
hsva.value = {
|
|
84
|
+
h: IS_HUE_KEPT ? hsva.value.h : Math.round(HSV.h),
|
|
85
|
+
s: Math.round(HSV.s),
|
|
86
|
+
v: Math.round(HSV.v),
|
|
87
|
+
a: showAlpha.value ? a : 1,
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const setColorFromModel = () => {
|
|
92
|
+
setColor(modelColor.value || parseColor(panelDefaultColor.value) || COLOR_FALLBACK);
|
|
93
|
+
const IS_SNAPSHOT = !!modelColor.value && (showAlpha.value || modelColor.value.a === 1);
|
|
94
|
+
modelSnapshot.value = IS_SNAPSHOT ?
|
|
95
|
+
{
|
|
96
|
+
format: detectColorFormat(modelValue.value),
|
|
97
|
+
hsva: { ...hsva.value },
|
|
98
|
+
text: modelValue.value.trim(),
|
|
99
|
+
} :
|
|
100
|
+
undefined;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const setHue = h => {
|
|
104
|
+
hsva.value = { ...hsva.value, h };
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const setSaturationBrightness = ({ saturation, brightness }) => {
|
|
108
|
+
hsva.value = { ...hsva.value, s: saturation, v: brightness };
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const setAlphaPercent = percent => {
|
|
112
|
+
hsva.value = { ...hsva.value, a: percent / 100 };
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
alphaBackground,
|
|
117
|
+
alphaPercent,
|
|
118
|
+
cssColorLocal,
|
|
119
|
+
cssColorOpaqueLocal,
|
|
120
|
+
hsva,
|
|
121
|
+
hueCssColor,
|
|
122
|
+
modelColor,
|
|
123
|
+
modelCssColor,
|
|
124
|
+
modelTextColor,
|
|
125
|
+
rgbaLocal,
|
|
126
|
+
setAlphaPercent,
|
|
127
|
+
setColor,
|
|
128
|
+
setColorFromModel,
|
|
129
|
+
setHue,
|
|
130
|
+
setSaturationBrightness,
|
|
131
|
+
valueLocal,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
toRef,
|
|
4
|
+
} from "vue";
|
|
5
|
+
|
|
6
|
+
export default function ConfirmAPI(props, {
|
|
7
|
+
applyInput = () => true,
|
|
8
|
+
changeModel = () => {},
|
|
9
|
+
closePopover = () => {},
|
|
10
|
+
valueLocal = computed(() => ""),
|
|
11
|
+
}) {
|
|
12
|
+
const modelUndefined = toRef(props, "modelUndefined");
|
|
13
|
+
|
|
14
|
+
const confirmColor = () => {
|
|
15
|
+
if (!applyInput()) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
changeModel({
|
|
19
|
+
model: valueLocal.value,
|
|
20
|
+
});
|
|
21
|
+
closePopover({ isFocusToggle: true });
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const clearColor = () => {
|
|
25
|
+
changeModel({
|
|
26
|
+
model: modelUndefined.value,
|
|
27
|
+
triggerDetails: "clear",
|
|
28
|
+
});
|
|
29
|
+
closePopover({ isFocusToggle: true });
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
clearColor,
|
|
34
|
+
confirmColor,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
ref,
|
|
4
|
+
toRef,
|
|
5
|
+
} from "vue";
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
COLOR_FORMATS,
|
|
9
|
+
detectColorFormat,
|
|
10
|
+
} from "../utils/colorUtils";
|
|
11
|
+
import {
|
|
12
|
+
isArray,
|
|
13
|
+
uniq,
|
|
14
|
+
} from "lodash-es";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Formats from the prop colorFormats (string or array, in the given order)
|
|
18
|
+
* and the format that is currently used in the dialog.
|
|
19
|
+
*/
|
|
20
|
+
export default function FormatAPI(props) {
|
|
21
|
+
const colorFormats = toRef(props, "colorFormats");
|
|
22
|
+
const modelValue = toRef(props, "modelValue");
|
|
23
|
+
|
|
24
|
+
const colorFormatsLocal = computed(() => {
|
|
25
|
+
const FORMATS = isArray(colorFormats.value) ? colorFormats.value : [colorFormats.value];
|
|
26
|
+
const VALID = uniq(FORMATS).filter(format => COLOR_FORMATS.indexOf(format) !== -1);
|
|
27
|
+
return VALID.length ? VALID : ["hex"];
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const currentFormat = ref(colorFormatsLocal.value[0]);
|
|
31
|
+
|
|
32
|
+
const isFormatSwitch = computed(() => colorFormatsLocal.value.length > 1);
|
|
33
|
+
|
|
34
|
+
const nextFormat = computed(() => {
|
|
35
|
+
const INDEX = colorFormatsLocal.value.indexOf(currentFormat.value);
|
|
36
|
+
return colorFormatsLocal.value[(INDEX + 1) % colorFormatsLocal.value.length];
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// The format of the model wins, if it is allowed. Otherwise the first format.
|
|
40
|
+
const setFormatFromModel = () => {
|
|
41
|
+
const FORMAT = detectColorFormat(modelValue.value);
|
|
42
|
+
currentFormat.value = colorFormatsLocal.value.indexOf(FORMAT) !== -1 ?
|
|
43
|
+
FORMAT :
|
|
44
|
+
colorFormatsLocal.value[0];
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const switchFormat = () => {
|
|
48
|
+
currentFormat.value = nextFormat.value;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
colorFormatsLocal,
|
|
53
|
+
currentFormat,
|
|
54
|
+
isFormatSwitch,
|
|
55
|
+
nextFormat,
|
|
56
|
+
setFormatFromModel,
|
|
57
|
+
switchFormat,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
ref,
|
|
4
|
+
watch,
|
|
5
|
+
} from "vue";
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
parseColor,
|
|
9
|
+
} from "../utils/colorUtils";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Text field in the panel: any supported format can be typed in.
|
|
13
|
+
* The value is applied with Enter or when the field loses focus.
|
|
14
|
+
*/
|
|
15
|
+
export default function InputAPI({
|
|
16
|
+
setColor = () => {},
|
|
17
|
+
valueLocal = computed(() => ""),
|
|
18
|
+
}) {
|
|
19
|
+
const inputErrors = ref(undefined);
|
|
20
|
+
const inputText = ref("");
|
|
21
|
+
|
|
22
|
+
watch(valueLocal, value => {
|
|
23
|
+
inputText.value = value;
|
|
24
|
+
inputErrors.value = undefined;
|
|
25
|
+
}, {
|
|
26
|
+
immediate: true,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const onInputChange = ({ model }) => {
|
|
30
|
+
inputText.value = model;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const applyInput = () => {
|
|
34
|
+
if (inputText.value === valueLocal.value) {
|
|
35
|
+
inputErrors.value = undefined;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
const COLOR = parseColor(inputText.value);
|
|
39
|
+
if (!COLOR) {
|
|
40
|
+
inputErrors.value = "_A_COLOR_PICKER_INVALID_";
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
setColor(COLOR);
|
|
44
|
+
inputText.value = valueLocal.value;
|
|
45
|
+
inputErrors.value = undefined;
|
|
46
|
+
return true;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const onInputKeydown = $event => {
|
|
50
|
+
if ($event.key === "Enter") {
|
|
51
|
+
$event.preventDefault();
|
|
52
|
+
applyInput();
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
applyInput,
|
|
58
|
+
inputErrors,
|
|
59
|
+
inputText,
|
|
60
|
+
onInputChange,
|
|
61
|
+
onInputKeydown,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
clamp,
|
|
3
|
+
} from "../utils/colorUtils";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* New value of a slider for a key (WAI-ARIA slider pattern).
|
|
7
|
+
* Returns undefined if the key is not handled.
|
|
8
|
+
* Arrows: step (with Shift: largeStep), Page Up / Page Down: largeStep, Home / End: min / max.
|
|
9
|
+
*/
|
|
10
|
+
export function getValueForKey({ key, shiftKey, value, min, max, step = 1, largeStep = 10, isVertical = false }) {
|
|
11
|
+
const STEP = shiftKey ? largeStep : step;
|
|
12
|
+
let next;
|
|
13
|
+
switch (key) {
|
|
14
|
+
case "ArrowRight":
|
|
15
|
+
next = isVertical ? undefined : value + STEP;
|
|
16
|
+
break;
|
|
17
|
+
case "ArrowLeft":
|
|
18
|
+
next = isVertical ? undefined : value - STEP;
|
|
19
|
+
break;
|
|
20
|
+
case "ArrowUp":
|
|
21
|
+
next = value + STEP;
|
|
22
|
+
break;
|
|
23
|
+
case "ArrowDown":
|
|
24
|
+
next = value - STEP;
|
|
25
|
+
break;
|
|
26
|
+
case "PageUp":
|
|
27
|
+
next = value + largeStep;
|
|
28
|
+
break;
|
|
29
|
+
case "PageDown":
|
|
30
|
+
next = value - largeStep;
|
|
31
|
+
break;
|
|
32
|
+
case "Home":
|
|
33
|
+
next = min;
|
|
34
|
+
break;
|
|
35
|
+
case "End":
|
|
36
|
+
next = max;
|
|
37
|
+
break;
|
|
38
|
+
default:
|
|
39
|
+
next = undefined;
|
|
40
|
+
}
|
|
41
|
+
return next === undefined ? undefined : clamp(next, min, max);
|
|
42
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
onBeforeUnmount,
|
|
3
|
+
ref,
|
|
4
|
+
toRef,
|
|
5
|
+
} from "vue";
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
clamp,
|
|
9
|
+
} from "../utils/colorUtils";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Drag with mouse, pen and touch (pointer events).
|
|
13
|
+
* onMove gets the position inside the element as { x, y } from 0 to 1.
|
|
14
|
+
*/
|
|
15
|
+
export default function PointerDragAPI(props, {
|
|
16
|
+
elementRef = ref(undefined),
|
|
17
|
+
onMove = () => {},
|
|
18
|
+
onStart = () => {},
|
|
19
|
+
}) {
|
|
20
|
+
const disabled = toRef(props, "disabled");
|
|
21
|
+
|
|
22
|
+
const isDragging = ref(false);
|
|
23
|
+
|
|
24
|
+
const getPosition = $event => {
|
|
25
|
+
const RECT = elementRef.value.getBoundingClientRect();
|
|
26
|
+
return {
|
|
27
|
+
x: RECT.width ? clamp(($event.clientX - RECT.left) / RECT.width, 0, 1) : 0,
|
|
28
|
+
y: RECT.height ? clamp(($event.clientY - RECT.top) / RECT.height, 0, 1) : 0,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const onPointerMove = $event => {
|
|
33
|
+
if (!isDragging.value) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
$event.preventDefault();
|
|
37
|
+
onMove(getPosition($event));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const removeEvents = () => {
|
|
41
|
+
window.removeEventListener("pointermove", onPointerMove);
|
|
42
|
+
window.removeEventListener("pointerup", onPointerUp);
|
|
43
|
+
window.removeEventListener("pointercancel", onPointerUp);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
function onPointerUp() {
|
|
47
|
+
isDragging.value = false;
|
|
48
|
+
removeEvents();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const onPointerDown = $event => {
|
|
52
|
+
if (disabled.value || $event.button > 0 || !elementRef.value) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
$event.preventDefault();
|
|
56
|
+
isDragging.value = true;
|
|
57
|
+
onStart();
|
|
58
|
+
onMove(getPosition($event));
|
|
59
|
+
window.addEventListener("pointermove", onPointerMove);
|
|
60
|
+
window.addEventListener("pointerup", onPointerUp);
|
|
61
|
+
window.addEventListener("pointercancel", onPointerUp);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
onBeforeUnmount(removeEvents);
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
isDragging,
|
|
68
|
+
onPointerDown,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
nextTick,
|
|
4
|
+
onBeforeUnmount,
|
|
5
|
+
ref,
|
|
6
|
+
toRef,
|
|
7
|
+
} from "vue";
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
autoUpdate,
|
|
11
|
+
computePosition,
|
|
12
|
+
flip,
|
|
13
|
+
limitShift,
|
|
14
|
+
offset,
|
|
15
|
+
shift,
|
|
16
|
+
} from "@floating-ui/vue";
|
|
17
|
+
|
|
18
|
+
import AEventOutsideAPI from "../../../compositionAPI/AEventOutsideAPI";
|
|
19
|
+
import {
|
|
20
|
+
closePopup,
|
|
21
|
+
openPopup,
|
|
22
|
+
} from "../../../compositionAPI/APopupAPI";
|
|
23
|
+
|
|
24
|
+
const FOCUSABLE = "button:not([disabled]), input:not([disabled]), [tabindex='0']";
|
|
25
|
+
|
|
26
|
+
export default function PopoverAPI(props, { emit }, {
|
|
27
|
+
htmlIdLocal = computed(() => ""),
|
|
28
|
+
setColorFromModel = () => {},
|
|
29
|
+
}) {
|
|
30
|
+
const disabled = toRef(props, "disabled");
|
|
31
|
+
const placement = toRef(props, "placement");
|
|
32
|
+
|
|
33
|
+
const cleanupPopper = ref(undefined);
|
|
34
|
+
const isOpen = ref(false);
|
|
35
|
+
|
|
36
|
+
/*
|
|
37
|
+
* The popup is hidden until floating-ui has positioned it. Otherwise it stays
|
|
38
|
+
* at the top of the page for a moment and focusing it scrolls the page up.
|
|
39
|
+
*/
|
|
40
|
+
const isPositioned = ref(false);
|
|
41
|
+
const popupRef = ref(undefined);
|
|
42
|
+
const toggleRef = ref(undefined);
|
|
43
|
+
|
|
44
|
+
const popupId = computed(() => `${ htmlIdLocal.value }_popup`);
|
|
45
|
+
|
|
46
|
+
const elementsForClickOutside = computed(() => [toggleRef.value, popupRef.value]);
|
|
47
|
+
|
|
48
|
+
const startPosition = ({ onPositioned = () => {} } = {}) => {
|
|
49
|
+
if (cleanupPopper.value || !toggleRef.value || !popupRef.value) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
cleanupPopper.value = autoUpdate(toggleRef.value, popupRef.value, () => {
|
|
53
|
+
if (!toggleRef.value || !popupRef.value) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
computePosition(toggleRef.value, popupRef.value, {
|
|
57
|
+
placement: placement.value,
|
|
58
|
+
middleware: [
|
|
59
|
+
offset(4),
|
|
60
|
+
flip(),
|
|
61
|
+
shift({ limiter: limitShift(), padding: 8 }),
|
|
62
|
+
],
|
|
63
|
+
}).then(({ x, y }) => {
|
|
64
|
+
if (!popupRef.value) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
Object.assign(popupRef.value.style, {
|
|
68
|
+
left: `${ x }px`,
|
|
69
|
+
top: `${ y }px`,
|
|
70
|
+
});
|
|
71
|
+
if (!isPositioned.value) {
|
|
72
|
+
isPositioned.value = true;
|
|
73
|
+
nextTick(onPositioned);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const stopPosition = () => {
|
|
80
|
+
if (cleanupPopper.value) {
|
|
81
|
+
cleanupPopper.value();
|
|
82
|
+
cleanupPopper.value = undefined;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const focusToggle = () => {
|
|
87
|
+
toggleRef.value?.focus();
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const getFocusableElements = () => {
|
|
91
|
+
return popupRef.value ? [...popupRef.value.querySelectorAll(FOCUSABLE)] : [];
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const {
|
|
95
|
+
destroyEventClickOutside,
|
|
96
|
+
setEventClickOutside,
|
|
97
|
+
} = AEventOutsideAPI({
|
|
98
|
+
$elements: elementsForClickOutside,
|
|
99
|
+
clickOutsideCallback: () => closePopover(),
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
function closePopover({ isFocusToggle = false } = {}) {
|
|
103
|
+
if (!isOpen.value) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
isOpen.value = false;
|
|
107
|
+
isPositioned.value = false;
|
|
108
|
+
stopPosition();
|
|
109
|
+
destroyEventClickOutside();
|
|
110
|
+
closePopup({ id: popupId.value });
|
|
111
|
+
emit("close");
|
|
112
|
+
if (isFocusToggle) {
|
|
113
|
+
focusToggle();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const openPopover = () => {
|
|
118
|
+
if (disabled.value || isOpen.value) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
setColorFromModel();
|
|
122
|
+
isOpen.value = true;
|
|
123
|
+
openPopup({ id: popupId.value });
|
|
124
|
+
emit("open");
|
|
125
|
+
nextTick(() => {
|
|
126
|
+
startPosition({
|
|
127
|
+
onPositioned: () => {
|
|
128
|
+
// only as much scrolling as needed to show the whole popup
|
|
129
|
+
popupRef.value?.scrollIntoView?.({ block: "nearest" });
|
|
130
|
+
getFocusableElements()[0]?.focus({ preventScroll: true });
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
setTimeout(setEventClickOutside, 100);
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
const togglePopover = () => {
|
|
138
|
+
if (isOpen.value) {
|
|
139
|
+
closePopover({ isFocusToggle: true });
|
|
140
|
+
} else {
|
|
141
|
+
openPopover();
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const onToggleKeydown = $event => {
|
|
146
|
+
if (!isOpen.value && ($event.key === "ArrowDown" || $event.key === "ArrowUp")) {
|
|
147
|
+
$event.preventDefault();
|
|
148
|
+
openPopover();
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
// The popup is a dialog: Escape closes it, Tab stays inside.
|
|
153
|
+
const onPopupKeydown = $event => {
|
|
154
|
+
if ($event.key === "Escape") {
|
|
155
|
+
$event.preventDefault();
|
|
156
|
+
$event.stopPropagation();
|
|
157
|
+
closePopover({ isFocusToggle: true });
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
if ($event.key !== "Tab") {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
const ELEMENTS = getFocusableElements();
|
|
164
|
+
if (!ELEMENTS.length) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const FIRST = ELEMENTS[0];
|
|
168
|
+
const LAST = ELEMENTS[ELEMENTS.length - 1];
|
|
169
|
+
if ($event.shiftKey && document.activeElement === FIRST) {
|
|
170
|
+
$event.preventDefault();
|
|
171
|
+
LAST.focus();
|
|
172
|
+
} else if (!$event.shiftKey && document.activeElement === LAST) {
|
|
173
|
+
$event.preventDefault();
|
|
174
|
+
FIRST.focus();
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
onBeforeUnmount(() => {
|
|
179
|
+
stopPosition();
|
|
180
|
+
if (isOpen.value) {
|
|
181
|
+
closePopup({ id: popupId.value });
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
return {
|
|
186
|
+
closePopover,
|
|
187
|
+
isOpen,
|
|
188
|
+
isPositioned,
|
|
189
|
+
onPopupKeydown,
|
|
190
|
+
onToggleKeydown,
|
|
191
|
+
popupId,
|
|
192
|
+
popupRef,
|
|
193
|
+
toggleRef,
|
|
194
|
+
togglePopover,
|
|
195
|
+
};
|
|
196
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
toRef,
|
|
4
|
+
} from "vue";
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
isSameColor,
|
|
8
|
+
parseColor,
|
|
9
|
+
toCssColor,
|
|
10
|
+
} from "../utils/colorUtils";
|
|
11
|
+
|
|
12
|
+
export default function PredefineAPI(props, {
|
|
13
|
+
rgbaLocal = computed(() => ({})),
|
|
14
|
+
setColor = () => {},
|
|
15
|
+
}) {
|
|
16
|
+
const predefine = toRef(props, "predefine");
|
|
17
|
+
|
|
18
|
+
const predefineLocal = computed(() => {
|
|
19
|
+
const ITEMS = [];
|
|
20
|
+
(predefine.value || []).forEach(value => {
|
|
21
|
+
const COLOR = parseColor(value);
|
|
22
|
+
if (COLOR) {
|
|
23
|
+
ITEMS.push({
|
|
24
|
+
value,
|
|
25
|
+
color: COLOR,
|
|
26
|
+
cssColor: toCssColor(COLOR),
|
|
27
|
+
isSelected: isSameColor(COLOR, rgbaLocal.value),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return ITEMS;
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const selectPredefine = item => {
|
|
35
|
+
setColor(item.color);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
predefineLocal,
|
|
40
|
+
selectPredefine,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
toRef,
|
|
4
|
+
} from "vue";
|
|
5
|
+
|
|
6
|
+
export default function ToggleClassAPI(props, {
|
|
7
|
+
isClearButtonLocal = computed(() => false),
|
|
8
|
+
isErrors = computed(() => false),
|
|
9
|
+
}) {
|
|
10
|
+
const errorIcon = toRef(props, "errorIcon");
|
|
11
|
+
|
|
12
|
+
const hasErrorIcon = computed(() => {
|
|
13
|
+
return !!(isErrors.value && errorIcon.value);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const toggleClassBtns = computed(() => {
|
|
17
|
+
return isClearButtonLocal.value ? "a_form_element_with_one_btn" : undefined;
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
hasErrorIcon,
|
|
22
|
+
toggleClassBtns,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import ar from "./ar.json";
|
|
2
|
+
import de from "./de.json";
|
|
3
|
+
import en from "./en.json";
|
|
4
|
+
import es from "./es.json";
|
|
5
|
+
import fr from "./fr.json";
|
|
6
|
+
import hr from "./hr.json";
|
|
7
|
+
import it from "./it.json";
|
|
8
|
+
import nl from "./nl.json";
|
|
9
|
+
import pl from "./pl.json";
|
|
10
|
+
import ru from "./ru.json";
|
|
11
|
+
import uk from "./uk.json";
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
ar,
|
|
15
|
+
de,
|
|
16
|
+
en,
|
|
17
|
+
es,
|
|
18
|
+
fr,
|
|
19
|
+
hr,
|
|
20
|
+
it,
|
|
21
|
+
nl,
|
|
22
|
+
pl,
|
|
23
|
+
ru,
|
|
24
|
+
uk,
|
|
25
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_A_COLOR_PICKER_ALPHA_": "العتامة",
|
|
3
|
+
"_A_COLOR_PICKER_CLEAR_": "مسح",
|
|
4
|
+
"_A_COLOR_PICKER_CONFIRM_": "موافق",
|
|
5
|
+
"_A_COLOR_PICKER_DIALOG_": "اختيار اللون",
|
|
6
|
+
"_A_COLOR_PICKER_EMPTY_": "لم يتم اختيار لون",
|
|
7
|
+
"_A_COLOR_PICKER_FORMAT_SWITCH_{{format}}_{{next}}_": "تنسيق اللون {{format}}، التبديل إلى {{next}}",
|
|
8
|
+
"_A_COLOR_PICKER_HUE_": "درجة اللون",
|
|
9
|
+
"_A_COLOR_PICKER_INPUT_{{format}}_": "قيمة اللون ({{format}})",
|
|
10
|
+
"_A_COLOR_PICKER_INVALID_": "قيمة لون غير صالحة. المسموح: #rrggbb و rgb() و hsl() و hsv().",
|
|
11
|
+
"_A_COLOR_PICKER_PREDEFINE_": "ألوان محددة مسبقًا",
|
|
12
|
+
"_A_COLOR_PICKER_SATURATION_": "التشبع والسطوع",
|
|
13
|
+
"_A_COLOR_PICKER_SATURATION_VALUE_{{saturation}}_{{brightness}}_": "التشبع {{saturation}} %، السطوع {{brightness}} %"
|
|
14
|
+
}
|