origam 2.17.1 → 2.18.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/CHANGELOG.md +895 -0
- package/dist/src/assets/css/main.css +1 -1
- package/dist/src/assets/css/tokens/dark.css +193 -26
- package/dist/src/assets/css/tokens/light.css +78 -11
- package/dist/src/assets/locales/en.json +21 -6
- package/dist/src/assets/locales/fr.json +21 -6
- package/dist/src/assets/scss/main.scss +10 -2
- package/dist/src/assets/scss/tokens/_dark.scss +2914 -13
- package/dist/src/assets/scss/tokens/_light.scss +78 -11
- package/dist/src/components/Alert/OrigamAlert.vue +6 -6
- package/dist/src/components/Avatar/OrigamAvatar.vue +15 -2
- package/dist/src/components/Badge/OrigamBadge.vue +7 -7
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +23 -4
- package/dist/src/components/Btn/OrigamBtn.vue +22 -16
- package/dist/src/components/Btn/OrigamBtnGroup.vue +1 -1
- package/dist/src/components/Calendar/OrigamCalendar.vue +1 -1
- package/dist/src/components/Card/OrigamCard.vue +2 -0
- package/dist/src/components/Card/OrigamCardHeader.vue +7 -7
- package/dist/src/components/Carousel/OrigamCarousel.vue +14 -1
- package/dist/src/components/Chart/OrigamChartBoxPlot.vue +1 -1
- package/dist/src/components/Chart/OrigamChartBullet.vue +3 -2
- package/dist/src/components/Chart/OrigamChartCandlestick.vue +2 -2
- package/dist/src/components/Chart/OrigamChartCartesian.vue +49 -4
- package/dist/src/components/Chart/OrigamChartLegend.vue +39 -18
- package/dist/src/components/Chart/OrigamChartPareto.vue +7 -1
- package/dist/src/components/Chart/OrigamChartPictorial.vue +2 -2
- package/dist/src/components/Chart/OrigamChartRadar.vue +3 -1
- package/dist/src/components/Chart/OrigamChartSparkline.vue +3 -1
- package/dist/src/components/Chart/OrigamChartStreamgraph.vue +2 -1
- package/dist/src/components/Checkbox/OrigamCheckbox.vue +2 -0
- package/dist/src/components/Checkbox/OrigamCheckboxGroup.vue +36 -11
- package/dist/src/components/Chip/OrigamChip.vue +19 -4
- package/dist/src/components/Code/OrigamCode.vue +20 -3
- package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +30 -5
- package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +3 -3
- package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +6 -6
- package/dist/src/components/ContextualMenu/OrigamContextualMenu.vue +0 -4
- package/dist/src/components/DataList/OrigamDataList.vue +2 -0
- package/dist/src/components/DataList/OrigamDataText.vue +6 -6
- package/dist/src/components/DataList/OrigamDataTitle.vue +6 -6
- package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +1 -1
- package/dist/src/components/DataTable/OrigamDataTableHeadersCell.vue +4 -1
- package/dist/src/components/DatePicker/OrigamDatePicker.vue +2 -0
- package/dist/src/components/DatePicker/OrigamDatePickerHeader.vue +6 -6
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +21 -1
- package/dist/src/components/Dialog/OrigamDialog.vue +25 -0
- package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +6 -0
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +2 -0
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +6 -6
- package/dist/src/components/Field/OrigamField.vue +47 -15
- package/dist/src/components/FileField/OrigamFileField.vue +5 -1
- package/dist/src/components/Icon/OrigamSvgIcon.vue +3 -1
- package/dist/src/components/Img/OrigamImg.vue +9 -2
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScroll.vue +34 -18
- package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +46 -5
- package/dist/src/components/Input/OrigamInput.vue +6 -6
- package/dist/src/components/List/OrigamListGroup.vue +4 -0
- package/dist/src/components/List/OrigamListItem.vue +68 -4
- package/dist/src/components/Masonry/OrigamMasonry.vue +18 -2
- package/dist/src/components/Menu/OrigamMenu.vue +79 -9
- package/dist/src/components/NumberField/OrigamNumberField.vue +13 -3
- package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +35 -11
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +5 -1
- package/dist/src/components/Radio/OrigamRadio.vue +2 -0
- package/dist/src/components/Radio/OrigamRadioGroup.vue +36 -11
- package/dist/src/components/RatingField/OrigamRatingField.vue +58 -7
- package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +78 -30
- package/dist/src/components/Select/OrigamSelect.vue +44 -21
- package/dist/src/components/SliderField/OrigamSliderField.vue +20 -10
- package/dist/src/components/Snackbar/OrigamSnackbarGroup.vue +1 -1
- package/dist/src/components/Switch/OrigamSwitch.vue +2 -0
- package/dist/src/components/Tabs/OrigamTab.vue +7 -4
- package/dist/src/components/Tabs/OrigamTabPanel.vue +4 -2
- package/dist/src/components/Tabs/OrigamTabs.vue +7 -5
- package/dist/src/components/TextField/OrigamTextField.vue +5 -1
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +5 -1
- package/dist/src/components/Transition/OrigamExpandX.vue +19 -3
- package/dist/src/components/Transition/OrigamExpandY.vue +19 -3
- package/dist/src/components/Transition/OrigamTranslateScale.vue +26 -4
- package/dist/src/components/Video/OrigamVideo.vue +3 -2
- package/dist/src/components/Window/OrigamWindow.vue +20 -3
- package/dist/src/composables/Commons/accessibleCommand.composable.cjs +26 -0
- package/dist/src/composables/Commons/accessibleCommand.composable.d.ts +78 -0
- package/dist/src/composables/Commons/accessibleCommand.composable.js +20 -0
- package/dist/src/composables/Commons/activator.composable.cjs +10 -1
- package/dist/src/composables/Commons/activator.composable.js +11 -2
- package/dist/src/composables/Commons/adjacent.composable.cjs +17 -0
- package/dist/src/composables/Commons/adjacent.composable.d.ts +12 -0
- package/dist/src/composables/Commons/adjacent.composable.js +17 -0
- package/dist/src/composables/Commons/adjacentInner.composable.cjs +20 -0
- package/dist/src/composables/Commons/adjacentInner.composable.d.ts +24 -5
- package/dist/src/composables/Commons/adjacentInner.composable.js +20 -0
- package/dist/src/composables/Commons/audio.composable.cjs +14 -1
- package/dist/src/composables/Commons/audio.composable.js +14 -1
- package/dist/src/composables/Commons/backButton.composable.cjs +3 -1
- package/dist/src/composables/Commons/backButton.composable.js +3 -1
- package/dist/src/composables/Commons/border.composable.d.ts +13 -0
- package/dist/src/composables/Commons/colorEffect.composable.cjs +58 -46
- package/dist/src/composables/Commons/colorEffect.composable.d.ts +10 -5
- package/dist/src/composables/Commons/colorEffect.composable.js +70 -46
- package/dist/src/composables/Commons/createLayout.composable.cjs +21 -12
- package/dist/src/composables/Commons/createLayout.composable.js +21 -12
- package/dist/src/composables/Commons/delay.composable.d.ts +16 -0
- package/dist/src/composables/Commons/dimension.composable.d.ts +11 -0
- package/dist/src/composables/Commons/elevation.composable.cjs +6 -2
- package/dist/src/composables/Commons/elevation.composable.d.ts +37 -1
- package/dist/src/composables/Commons/elevation.composable.js +7 -2
- package/dist/src/composables/Commons/goTo.composable.cjs +4 -2
- package/dist/src/composables/Commons/goTo.composable.js +5 -3
- package/dist/src/composables/Commons/group.composable.cjs +14 -14
- package/dist/src/composables/Commons/group.composable.js +14 -14
- package/dist/src/composables/Commons/hotkey.composable.d.ts +18 -7
- package/dist/src/composables/Commons/hydration.composable.d.ts +8 -0
- package/dist/src/composables/Commons/link.composable.d.ts +20 -0
- package/dist/src/composables/Commons/locationStrategies.composable.d.ts +17 -0
- package/dist/src/composables/Commons/message.composable.d.ts +19 -5
- package/dist/src/composables/Commons/position.composable.d.ts +17 -6
- package/dist/src/composables/Commons/refs.composable.d.ts +11 -5
- package/dist/src/composables/Commons/rounded.composable.d.ts +11 -1
- package/dist/src/composables/Commons/scrolling.composable.cjs +15 -12
- package/dist/src/composables/Commons/scrolling.composable.js +15 -12
- package/dist/src/composables/Commons/size.composable.d.ts +15 -0
- package/dist/src/composables/Commons/ssrBoot.composable.cjs +9 -1
- package/dist/src/composables/Commons/ssrBoot.composable.js +10 -2
- package/dist/src/composables/Commons/stack.composable.cjs +13 -1
- package/dist/src/composables/Commons/stack.composable.js +13 -1
- package/dist/src/composables/Commons/theme-props-resolver.composable.cjs +41 -32
- package/dist/src/composables/Commons/theme-props-resolver.composable.js +41 -32
- package/dist/src/composables/Commons/validation.composable.cjs +3 -3
- package/dist/src/composables/Commons/validation.composable.js +3 -3
- package/dist/src/composables/Commons/virtual.composable.cjs +24 -8
- package/dist/src/composables/Commons/virtual.composable.js +24 -8
- package/dist/src/composables/Masonry/masonry.composable.cjs +18 -11
- package/dist/src/composables/Masonry/masonry.composable.js +18 -11
- package/dist/src/composables/Parallax/parallax.composable.cjs +1 -1
- package/dist/src/composables/Parallax/parallax.composable.js +1 -1
- package/dist/src/composables/index.cjs +36 -0
- package/dist/src/composables/index.d.ts +3 -0
- package/dist/src/composables/index.js +3 -0
- package/dist/src/consts/Chart/chart-cartesian.const.cjs +5 -2
- package/dist/src/consts/Chart/chart-cartesian.const.d.ts +42 -0
- package/dist/src/consts/Chart/chart-cartesian.const.js +3 -0
- package/dist/src/consts/Commons/elevation.const.cjs +5 -1
- package/dist/src/consts/Commons/elevation.const.d.ts +52 -2
- package/dist/src/consts/Commons/elevation.const.js +4 -0
- package/dist/src/consts/Commons/ripple.const.cjs +13 -3
- package/dist/src/consts/Commons/ripple.const.js +13 -3
- package/dist/src/consts/RatingField/rating-field.const.cjs +10 -0
- package/dist/src/consts/RatingField/rating-field.const.d.ts +36 -0
- package/dist/src/consts/RatingField/rating-field.const.js +12 -0
- package/dist/src/consts/index.cjs +11 -0
- package/dist/src/consts/index.d.ts +1 -0
- package/dist/src/consts/index.js +1 -0
- package/dist/src/directives/ClickOutside/clickOutside.directive.cjs +2 -0
- package/dist/src/directives/ClickOutside/clickOutside.directive.js +2 -0
- package/dist/src/directives/Ripple/ripple.directive.cjs +2 -0
- package/dist/src/directives/Ripple/ripple.directive.js +2 -0
- package/dist/src/enums/Commons/color.enum.cjs +0 -1
- package/dist/src/enums/Commons/color.enum.d.ts +14 -5
- package/dist/src/enums/Commons/color.enum.js +0 -1
- package/dist/src/enums/Sheet/sheet.enum.d.ts +1 -1
- package/dist/src/interfaces/Btn/btn.interface.d.ts +7 -10
- package/dist/src/interfaces/Chart/chart-cartesian.interface.d.ts +6 -2
- package/dist/src/interfaces/Commons/activator.interface.d.ts +3 -2
- package/dist/src/interfaces/Commons/adjacent.interface.d.ts +29 -0
- package/dist/src/interfaces/Commons/group.interface.d.ts +13 -2
- package/dist/src/interfaces/Commons/ripple.interface.d.ts +16 -0
- package/dist/src/interfaces/Commons/scroll.interface.d.ts +3 -2
- package/dist/src/interfaces/DataTable/data-table-header.interface.d.ts +2 -2
- package/dist/src/interfaces/DatePicker/date-picker-month.interface.d.ts +2 -1
- package/dist/src/interfaces/Menu/menu.interface.d.ts +28 -1
- package/dist/src/interfaces/OtpInputField/otp-input-field.interface.d.ts +21 -1
- package/dist/src/interfaces/RatingField/rating-field-item.interface.d.ts +16 -1
- package/dist/src/interfaces/index.cjs +11 -0
- package/dist/src/interfaces/index.d.ts +1 -0
- package/dist/src/interfaces/index.js +1 -0
- package/dist/src/nuxt/module.cjs +2 -1
- package/dist/src/nuxt/module.js +2 -1
- package/dist/src/origam.cjs +1 -2
- package/dist/src/origam.js +1 -2
- package/dist/src/themes/origam.theme.cjs +8 -14
- package/dist/src/themes/origam.theme.js +6 -8
- package/dist/src/types/Commons/color.type.d.ts +4 -3
- package/dist/src/types/Commons/commons.type.d.ts +33 -0
- package/dist/src/types/Commons/theme.type.d.ts +2 -1
- package/dist/src/types/Sheet/sheet.type.d.ts +2 -1
- package/dist/src/types/index.cjs +22 -0
- package/dist/src/types/index.d.ts +2 -0
- package/dist/src/types/index.js +2 -0
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/dist/src/utils/Commons/a11y.util.cjs +35 -0
- package/dist/src/utils/Commons/a11y.util.d.ts +63 -0
- package/dist/src/utils/Commons/a11y.util.js +33 -0
- package/dist/src/utils/Commons/clickOutside.util.cjs +5 -1
- package/dist/src/utils/Commons/clickOutside.util.js +5 -1
- package/dist/src/utils/Commons/color.util.cjs +10 -15
- package/dist/src/utils/Commons/color.util.d.ts +34 -28
- package/dist/src/utils/Commons/color.util.js +9 -16
- package/dist/src/utils/Commons/goTo.util.cjs +31 -14
- package/dist/src/utils/Commons/goTo.util.d.ts +1 -1
- package/dist/src/utils/Commons/goTo.util.js +31 -16
- package/dist/src/utils/Commons/location.util.cjs +18 -3
- package/dist/src/utils/Commons/location.util.js +18 -3
- package/dist/src/utils/Commons/ripple.util.cjs +5 -1
- package/dist/src/utils/Commons/ripple.util.js +5 -1
- package/dist/src/utils/index.cjs +11 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/index.js +1 -0
- package/package.json +13 -2
- package/dist/src/consts/Btn/btn.const.cjs +0 -7
- package/dist/src/consts/Btn/btn.const.d.ts +0 -32
- package/dist/src/consts/Btn/btn.const.js +0 -1
- package/dist/src/types/Commons/locale.type.cjs +0 -1
- package/dist/src/types/Commons/locale.type.d.ts +0 -0
- package/dist/src/types/Commons/locale.type.js +0 -0
|
@@ -290,12 +290,12 @@
|
|
|
290
290
|
v-if="zoomable && isZoomed"
|
|
291
291
|
class="origam-chart__zoom-reset"
|
|
292
292
|
data-cy="origam-chart-zoom-reset"
|
|
293
|
-
:transform="`translate(${ plot.x1 -
|
|
293
|
+
:transform="`translate(${ plot.x1 - zoomResetWidth - CHART_ZOOM_RESET_GAP }, ${ plot.y0 })`"
|
|
294
294
|
>
|
|
295
295
|
<rect
|
|
296
296
|
x="0"
|
|
297
297
|
y="0"
|
|
298
|
-
width="
|
|
298
|
+
:width="zoomResetWidth"
|
|
299
299
|
height="20"
|
|
300
300
|
rx="4"
|
|
301
301
|
:style="{ fill: 'var(--origam-chart__zoom-reset---bg, rgba(59,130,246,0.9))', cursor: 'pointer' }"
|
|
@@ -308,13 +308,14 @@
|
|
|
308
308
|
@keydown.space.prevent="onZoomReset"
|
|
309
309
|
/>
|
|
310
310
|
<text
|
|
311
|
-
|
|
311
|
+
ref="zoomResetTextRef"
|
|
312
|
+
:x="zoomResetWidth / 2"
|
|
312
313
|
y="13"
|
|
313
314
|
text-anchor="middle"
|
|
314
315
|
dominant-baseline="auto"
|
|
315
316
|
pointer-events="none"
|
|
316
317
|
:style="{ fill: '#ffffff', fontSize: '0.6875rem', fontWeight: '600' }"
|
|
317
|
-
>
|
|
318
|
+
>{{ zoomResetAriaLabel }}</text>
|
|
318
319
|
</g>
|
|
319
320
|
|
|
320
321
|
<g
|
|
@@ -486,6 +487,7 @@
|
|
|
486
487
|
<script lang="ts" setup>
|
|
487
488
|
import {
|
|
488
489
|
computed,
|
|
490
|
+
nextTick,
|
|
489
491
|
ref,
|
|
490
492
|
watch
|
|
491
493
|
} from "vue";
|
|
@@ -506,6 +508,11 @@ import {
|
|
|
506
508
|
computePlotLineGeometry
|
|
507
509
|
} from "../../composables/Chart/chart.composable";
|
|
508
510
|
import { CHART_RANGE_SELECTOR_DEFAULT_BUTTONS } from "../../consts/Chart/chart.const";
|
|
511
|
+
import {
|
|
512
|
+
CHART_ZOOM_RESET_GAP,
|
|
513
|
+
CHART_ZOOM_RESET_MIN_WIDTH,
|
|
514
|
+
CHART_ZOOM_RESET_PADDING_X
|
|
515
|
+
} from "../../consts/Chart/chart-cartesian.const";
|
|
509
516
|
import { OrigamBtn } from "../Btn";
|
|
510
517
|
import OrigamChartAxis from "./OrigamChartAxis.vue";
|
|
511
518
|
import OrigamChartLegend from "./OrigamChartLegend.vue";
|
|
@@ -598,6 +605,28 @@ const breadcrumbItems = computed(() => {
|
|
|
598
605
|
const drilldownBackLabel = computed(() => props.drilldown?.backLabel ?? t("origam.chart.drilldown.back_label"));
|
|
599
606
|
const drilldownNavAriaLabel = computed(() => t(props.drilldown?.navAriaLabel ?? "origam.chart.drilldown.aria_label"));
|
|
600
607
|
const zoomResetAriaLabel = computed(() => t(props.zoomResetLabel));
|
|
608
|
+
const zoomResetTextRef = ref(null);
|
|
609
|
+
const zoomResetTextWidth = ref(0);
|
|
610
|
+
const zoomResetWidth = computed(() => {
|
|
611
|
+
if (!zoomResetTextWidth.value) return CHART_ZOOM_RESET_MIN_WIDTH;
|
|
612
|
+
return Math.max(
|
|
613
|
+
CHART_ZOOM_RESET_MIN_WIDTH,
|
|
614
|
+
zoomResetTextWidth.value + CHART_ZOOM_RESET_PADDING_X * 2
|
|
615
|
+
);
|
|
616
|
+
});
|
|
617
|
+
const measureZoomResetText = async () => {
|
|
618
|
+
await nextTick();
|
|
619
|
+
const el = zoomResetTextRef.value;
|
|
620
|
+
if (!el || typeof el.getBBox !== "function") {
|
|
621
|
+
zoomResetTextWidth.value = 0;
|
|
622
|
+
return;
|
|
623
|
+
}
|
|
624
|
+
try {
|
|
625
|
+
zoomResetTextWidth.value = el.getBBox().width;
|
|
626
|
+
} catch {
|
|
627
|
+
zoomResetTextWidth.value = 0;
|
|
628
|
+
}
|
|
629
|
+
};
|
|
601
630
|
const resolveDrilldownLink = (link) => {
|
|
602
631
|
if (!props.drilldown) return null;
|
|
603
632
|
const dataset = props.drilldown.datasets.find((d) => d.id === link.id);
|
|
@@ -665,6 +694,22 @@ const {
|
|
|
665
694
|
pxToCategoryIndex,
|
|
666
695
|
WHEEL_ZOOM_STEP
|
|
667
696
|
} = zoom;
|
|
697
|
+
watch(
|
|
698
|
+
[zoomResetAriaLabel, isZoomed, () => props.zoomable],
|
|
699
|
+
/*********************************************************
|
|
700
|
+
* Promesse flottante, deliberement
|
|
701
|
+
*
|
|
702
|
+
* @description
|
|
703
|
+
* La mesure se fait en `flush: 'post'` et rien n'attend la
|
|
704
|
+
* promesse. Le `void` qui marquait cette intention est retire
|
|
705
|
+
* (Sonar #771) : la valeur de retour reste ignoree a l'identique,
|
|
706
|
+
* et le callback rend toujours `undefined`.
|
|
707
|
+
********************************************************/
|
|
708
|
+
() => {
|
|
709
|
+
measureZoomResetText();
|
|
710
|
+
},
|
|
711
|
+
{ flush: "post", immediate: true }
|
|
712
|
+
);
|
|
668
713
|
const visibleCategories = computed(() => {
|
|
669
714
|
if (!props.zoomable) return activeCategories.value;
|
|
670
715
|
const len = activeCategories.value.length;
|
|
@@ -7,28 +7,30 @@
|
|
|
7
7
|
<li
|
|
8
8
|
v-for="entry in safeItems"
|
|
9
9
|
:key="entry.series?.name ?? entry.index"
|
|
10
|
-
:aria-label="itemAriaLabel(entry)"
|
|
11
|
-
:aria-pressed="!isHidden(entry)"
|
|
12
10
|
class="origam-chart__legend-item"
|
|
13
11
|
:class="{ 'origam-chart__legend-item--hidden': isHidden(entry) }"
|
|
14
12
|
:data-cy="`origam-chart-legend-${ entry.index }`"
|
|
15
|
-
role="button"
|
|
16
|
-
tabindex="0"
|
|
17
|
-
@click="onItemClick(entry)"
|
|
18
|
-
@keydown.enter.prevent="onItemClick(entry)"
|
|
19
|
-
@keydown.space.prevent="onItemClick(entry)"
|
|
20
13
|
>
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
<button
|
|
15
|
+
type="button"
|
|
16
|
+
class="origam-chart__legend-button"
|
|
17
|
+
:aria-label="itemAriaLabel(entry)"
|
|
18
|
+
:aria-pressed="!isHidden(entry)"
|
|
19
|
+
:data-cy="`origam-chart-legend-button-${ entry.index }`"
|
|
20
|
+
@click="handleItemClick(entry)"
|
|
24
21
|
>
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
<slot
|
|
23
|
+
name="legend-item"
|
|
24
|
+
v-bind="{ series: entry.series, index: entry.index, visible: entry.visible }"
|
|
25
|
+
>
|
|
26
|
+
<span
|
|
27
|
+
class="origam-chart__legend-swatch"
|
|
28
|
+
:style="{ backgroundColor: entry.color }"
|
|
29
|
+
aria-hidden="true"
|
|
30
|
+
/>
|
|
31
|
+
<span class="origam-chart__legend-label">{{ entry.series?.name ?? '' }}</span>
|
|
32
|
+
</slot>
|
|
33
|
+
</button>
|
|
32
34
|
</li>
|
|
33
35
|
</ul>
|
|
34
36
|
</template>
|
|
@@ -57,9 +59,28 @@ const itemAriaLabel = (entry) => {
|
|
|
57
59
|
const state = isHidden(entry) ? t("origam.chart.legend.item_hidden") : t("origam.chart.legend.item_visible");
|
|
58
60
|
return `${entry.series?.name ?? ""}: ${state}`;
|
|
59
61
|
};
|
|
60
|
-
const
|
|
62
|
+
const handleItemClick = (entry) => {
|
|
61
63
|
emit("legend-click", entry.series, entry.index);
|
|
62
64
|
const nextVisible = entry.visible === false;
|
|
63
65
|
emit("series-toggle", entry.series, nextVisible);
|
|
64
66
|
};
|
|
65
67
|
</script>
|
|
68
|
+
|
|
69
|
+
<style lang="scss" scoped>
|
|
70
|
+
.origam-chart__legend-button {
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
gap: inherit;
|
|
74
|
+
|
|
75
|
+
margin: 0;
|
|
76
|
+
padding: 0;
|
|
77
|
+
border: 0;
|
|
78
|
+
background: none;
|
|
79
|
+
|
|
80
|
+
font: inherit;
|
|
81
|
+
color: inherit;
|
|
82
|
+
text-align: inherit;
|
|
83
|
+
text-decoration: inherit;
|
|
84
|
+
cursor: inherit;
|
|
85
|
+
}
|
|
86
|
+
</style>
|
|
@@ -617,7 +617,13 @@ const svgDesc = computed(() => {
|
|
|
617
617
|
const n = bars.value.length;
|
|
618
618
|
return t("origam.chart.pareto.desc", n);
|
|
619
619
|
});
|
|
620
|
-
const barAriaLabel = (bar) =>
|
|
620
|
+
const barAriaLabel = (bar) => t(
|
|
621
|
+
"origam.chart.pareto.bar_aria_label",
|
|
622
|
+
bar.category,
|
|
623
|
+
bar.formattedValue,
|
|
624
|
+
Math.round(bar.share * 100),
|
|
625
|
+
Math.round(bar.cumulative * 100)
|
|
626
|
+
);
|
|
621
627
|
const onBarEnter = (bar) => {
|
|
622
628
|
hoveredIndex.value = bar.index;
|
|
623
629
|
};
|
|
@@ -618,7 +618,7 @@ const fillValueLabel = (col) => {
|
|
|
618
618
|
};
|
|
619
619
|
const fillColumnAriaLabel = (col) => {
|
|
620
620
|
const pct = Math.round(fillRatio(col) * 100);
|
|
621
|
-
return
|
|
621
|
+
return t("origam.chart.pictorial.fill_column_aria_label", col.category, col.formatted, pct);
|
|
622
622
|
};
|
|
623
623
|
const iconX = (col, slotIdx) => {
|
|
624
624
|
if (props.direction === DIRECTION.HORIZONTAL) {
|
|
@@ -739,7 +739,7 @@ const svgDesc = computed(() => {
|
|
|
739
739
|
const n = visibleColumns.value.length;
|
|
740
740
|
return t("origam.chart.pictorial.desc", n);
|
|
741
741
|
});
|
|
742
|
-
const columnAriaLabel = (col) =>
|
|
742
|
+
const columnAriaLabel = (col) => t("origam.chart.pictorial.column_aria_label", col.category, col.formatted, col.filledSlots, col.totalSlots);
|
|
743
743
|
const onColumnEnter = (col) => {
|
|
744
744
|
hoveredColKey.value = `${col.seriesIndex}-${col.dataIndex}`;
|
|
745
745
|
};
|
|
@@ -329,7 +329,9 @@ const pointAriaLabel = (path) => {
|
|
|
329
329
|
const entry = path.series.data[path.dataIndex ?? 0];
|
|
330
330
|
const y = typeof entry === "number" ? entry : entry.y;
|
|
331
331
|
const cat = props.categories[path.dataIndex ?? 0] ?? path.dataIndex;
|
|
332
|
-
|
|
332
|
+
const seriesName = path.series.name?.trim();
|
|
333
|
+
const value = `${cat}: ${y}`;
|
|
334
|
+
return seriesName ? `${seriesName}, ${value}` : value;
|
|
333
335
|
};
|
|
334
336
|
const onPointActivate = (path, originalEvent) => {
|
|
335
337
|
const dataIndex = path.dataIndex ?? 0;
|
|
@@ -432,7 +432,9 @@ const onSvgClick = (event) => {
|
|
|
432
432
|
const pointAriaLabel = (index) => {
|
|
433
433
|
const point = pointAt(index);
|
|
434
434
|
if (!point) return "";
|
|
435
|
-
|
|
435
|
+
const seriesName = point.seriesName?.trim();
|
|
436
|
+
const value = `${index}: ${point.y}`;
|
|
437
|
+
return seriesName ? `${seriesName}, ${value}` : value;
|
|
436
438
|
};
|
|
437
439
|
const rootClasses = computed(() => [
|
|
438
440
|
{
|
|
@@ -511,7 +511,8 @@ const rootClasses = computed(() => [
|
|
|
511
511
|
elevationClasses.value,
|
|
512
512
|
marginClasses.value,
|
|
513
513
|
paddingClasses.value,
|
|
514
|
-
roundedClasses.value
|
|
514
|
+
roundedClasses.value,
|
|
515
|
+
props.class
|
|
515
516
|
]);
|
|
516
517
|
const rootStyles = computed(() => {
|
|
517
518
|
const out = {};
|
|
@@ -138,6 +138,8 @@ const props = defineProps({
|
|
|
138
138
|
appendIcon: { type: null, required: false },
|
|
139
139
|
prependAvatar: { type: String, required: false },
|
|
140
140
|
prependIcon: { type: null, required: false },
|
|
141
|
+
prependAriaLabel: { type: String, required: false },
|
|
142
|
+
appendAriaLabel: { type: String, required: false },
|
|
141
143
|
size: { type: null, required: false },
|
|
142
144
|
fontSize: { type: null, required: false },
|
|
143
145
|
fontWeight: { type: null, required: false },
|
|
@@ -13,16 +13,21 @@
|
|
|
13
13
|
v-bind="{id, messagesId, isDisabled, isReadonly, isValid}"
|
|
14
14
|
>
|
|
15
15
|
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
<div
|
|
17
|
+
:id="groupLabelId"
|
|
18
|
+
class="origam-checkbox-group__label"
|
|
19
19
|
>
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
<slot
|
|
21
|
+
name="label"
|
|
22
|
+
v-bind="{label, required}"
|
|
23
|
+
>
|
|
24
|
+
<origam-label
|
|
25
|
+
:required="required"
|
|
26
|
+
:text="label"
|
|
27
|
+
tag="span"
|
|
28
|
+
/>
|
|
29
|
+
</slot>
|
|
30
|
+
</div>
|
|
26
31
|
|
|
27
32
|
<origam-defaults-provider :defaults="checkboxDefaults">
|
|
28
33
|
<origam-selection-control-group
|
|
@@ -30,7 +35,7 @@
|
|
|
30
35
|
ref="origamSelectionControlGroupRef"
|
|
31
36
|
v-model="model"
|
|
32
37
|
:aria-describedby="messagesId"
|
|
33
|
-
:aria-labelledby="
|
|
38
|
+
:aria-labelledby="groupLabelledBy"
|
|
34
39
|
:disabled="isDisabled"
|
|
35
40
|
:items="items"
|
|
36
41
|
:multiple="multiple"
|
|
@@ -141,6 +146,8 @@ const props = defineProps({
|
|
|
141
146
|
appendIcon: { type: null, required: false },
|
|
142
147
|
prependAvatar: { type: String, required: false },
|
|
143
148
|
prependIcon: { type: null, required: false },
|
|
149
|
+
prependAriaLabel: { type: String, required: false },
|
|
150
|
+
appendAriaLabel: { type: String, required: false },
|
|
144
151
|
size: { type: null, required: false },
|
|
145
152
|
fontSize: { type: null, required: false },
|
|
146
153
|
fontWeight: { type: null, required: false },
|
|
@@ -163,7 +170,7 @@ const props = defineProps({
|
|
|
163
170
|
activeClass: { type: String, required: false },
|
|
164
171
|
items: { type: [Array, Object], required: false }
|
|
165
172
|
});
|
|
166
|
-
defineSlots();
|
|
173
|
+
const slots = defineSlots();
|
|
167
174
|
defineEmits(["update:modelValue"]);
|
|
168
175
|
const { filterProps } = useProps(props);
|
|
169
176
|
const origamSelectionControlGroupRef = ref();
|
|
@@ -174,6 +181,10 @@ const id = computed(() => {
|
|
|
174
181
|
return props.id || `checkbox-group-${uid}`;
|
|
175
182
|
});
|
|
176
183
|
const model = useVModel(props, "modelValue");
|
|
184
|
+
const groupLabelId = computed(() => `${id.value}-label`);
|
|
185
|
+
const groupLabelledBy = computed(() => {
|
|
186
|
+
return props.label || slots.label ? groupLabelId.value : void 0;
|
|
187
|
+
});
|
|
177
188
|
const [rootAttrs, controlAttrs] = filterInputAttrs(attrs);
|
|
178
189
|
const inputProps = computed(() => {
|
|
179
190
|
return origamInputRef.value?.filterProps(props, ["modelValue", "id", "focused", "style", "class"]);
|
|
@@ -215,3 +226,17 @@ defineExpose({
|
|
|
215
226
|
styleId
|
|
216
227
|
});
|
|
217
228
|
</script>
|
|
229
|
+
|
|
230
|
+
<style lang="scss" scoped>
|
|
231
|
+
/*
|
|
232
|
+
* Le wrapper n'existe que pour porter l'id cible d'`aria-labelledby`
|
|
233
|
+
* (#814). `display: contents` le retire de l'arbre des boites : les
|
|
234
|
+
* enfants du slot `label` restent les elements flex directs de
|
|
235
|
+
* `.origam-input__control`, donc la mise en page est inchangee — mesure
|
|
236
|
+
* avant/apres identique au pixel sur les variantes « Default » et
|
|
237
|
+
* « Slots - Label ».
|
|
238
|
+
*/
|
|
239
|
+
.origam-checkbox-group__label {
|
|
240
|
+
display: contents;
|
|
241
|
+
}
|
|
242
|
+
</style>
|
|
@@ -44,8 +44,7 @@
|
|
|
44
44
|
v-if="hasPrepend"
|
|
45
45
|
key="prepend"
|
|
46
46
|
class="origam-chip__prepend"
|
|
47
|
-
|
|
48
|
-
:tabindex="isPrependZoneFocusable ? 0 : undefined"
|
|
47
|
+
v-bind="prependCommandAttrs"
|
|
49
48
|
@click="handleClickPrepend"
|
|
50
49
|
@keydown="handleKeydownPrepend"
|
|
51
50
|
>
|
|
@@ -81,8 +80,7 @@
|
|
|
81
80
|
v-if="hasAppend"
|
|
82
81
|
key="append"
|
|
83
82
|
class="origam-chip__append"
|
|
84
|
-
|
|
85
|
-
:tabindex="isAppendZoneFocusable ? 0 : undefined"
|
|
83
|
+
v-bind="appendCommandAttrs"
|
|
86
84
|
@click="handleClickAppend"
|
|
87
85
|
@keydown="handleKeydownAppend"
|
|
88
86
|
>
|
|
@@ -137,6 +135,7 @@ import OrigamAvatar from "../Avatar/OrigamAvatar.vue";
|
|
|
137
135
|
import OrigamBtn from "../Btn/OrigamBtn.vue";
|
|
138
136
|
import OrigamExpandX from "../Transition/OrigamExpandX.vue";
|
|
139
137
|
import OrigamIcon from "../Icon/OrigamIcon.vue";
|
|
138
|
+
import { useAccessibleCommand } from "../../composables/Commons/accessibleCommand.composable";
|
|
140
139
|
import { useAdjacent } from "../../composables/Commons/adjacent.composable";
|
|
141
140
|
import { useDensity } from "../../composables/Commons/density.composable";
|
|
142
141
|
import { useGroupItem } from "../../composables/Commons/groupItem.composable";
|
|
@@ -174,6 +173,8 @@ const props = defineProps({
|
|
|
174
173
|
appendIcon: { type: null, required: false },
|
|
175
174
|
prependAvatar: { type: String, required: false },
|
|
176
175
|
prependIcon: { type: null, required: false },
|
|
176
|
+
prependAriaLabel: { type: String, required: false },
|
|
177
|
+
appendAriaLabel: { type: String, required: false },
|
|
177
178
|
tag: { type: String, required: false, default: "span" },
|
|
178
179
|
color: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
179
180
|
bgColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
@@ -266,6 +267,20 @@ const {
|
|
|
266
267
|
} = useAdjacent(props, toRef(props, "prependIcon"), toRef(props, "appendIcon"));
|
|
267
268
|
const isPrependZoneFocusable = computed(() => isPrependClickable.value && !link.isLink.value);
|
|
268
269
|
const isAppendZoneFocusable = computed(() => isAppendClickable.value && !link.isLink.value);
|
|
270
|
+
const prependCommandAttrs = useAccessibleCommand({
|
|
271
|
+
component: "OrigamChip",
|
|
272
|
+
zone: "prepend",
|
|
273
|
+
prop: "prependAriaLabel",
|
|
274
|
+
active: isPrependZoneFocusable,
|
|
275
|
+
label: () => props.prependAriaLabel
|
|
276
|
+
});
|
|
277
|
+
const appendCommandAttrs = useAccessibleCommand({
|
|
278
|
+
component: "OrigamChip",
|
|
279
|
+
zone: "append",
|
|
280
|
+
prop: "appendAriaLabel",
|
|
281
|
+
active: isAppendZoneFocusable,
|
|
282
|
+
label: () => props.appendAriaLabel
|
|
283
|
+
});
|
|
269
284
|
const isButtonSafe = computed(() => {
|
|
270
285
|
return props.tag === "span" && isClickable.value && !link.isLink.value && !hasClose.value && !isPrependZoneFocusable.value && !isAppendZoneFocusable.value;
|
|
271
286
|
});
|
|
@@ -44,11 +44,28 @@
|
|
|
44
44
|
|
|
45
45
|
<span v-if="compact && prompt" class="origam-code__prompt" aria-hidden="true" data-cy="origam-code-prompt">{{ prompt }}</span>
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
<!--
|
|
48
|
+
⛔ #781 — `<section>`, not `<div role="region">`.
|
|
49
|
+
|
|
50
|
+
`<section>` maps to the `region` role natively AS SOON AS it
|
|
51
|
+
carries an accessible name (HTML-AAM), and `scrollerLabel` is
|
|
52
|
+
never empty (`code-scroller-aria-label.spec.ts` pins its two
|
|
53
|
+
forms). The explicit role was therefore restating what the tag
|
|
54
|
+
already says — "ARIA is a complement, never a replacement", the
|
|
55
|
+
DS's own rule.
|
|
56
|
+
|
|
57
|
+
`tabindex="0"` STAYS. It is not decoration on a non-interactive
|
|
58
|
+
element: this box scrolls (`overflow-x: auto`), and a scroll
|
|
59
|
+
container that no keyboard can reach fails WCAG 2.1.1 — the
|
|
60
|
+
`scrollable-region-focusable` rule axe-core enforces, already
|
|
61
|
+
documented in `a11y/marketing-a11y.spec.ts`. Removing it to
|
|
62
|
+
satisfy a "no tabindex on non-interactive elements" lint would
|
|
63
|
+
trade a naming nit for a level-A keyboard failure.
|
|
64
|
+
-->
|
|
65
|
+
<section
|
|
48
66
|
class="origam-code__scroller"
|
|
49
67
|
:aria-label="scrollerLabel"
|
|
50
68
|
:style="scrollerStyles"
|
|
51
|
-
role="region"
|
|
52
69
|
tabindex="0"
|
|
53
70
|
>
|
|
54
71
|
<pre class="origam-code__pre" :class="preClasses"><code
|
|
@@ -56,7 +73,7 @@
|
|
|
56
73
|
class="origam-code__code"
|
|
57
74
|
:data-lang="lang"
|
|
58
75
|
></code></pre>
|
|
59
|
-
</
|
|
76
|
+
</section>
|
|
60
77
|
|
|
61
78
|
<origam-btn
|
|
62
79
|
v-if="copyable && compact"
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
@blur="handleBlur"
|
|
17
17
|
@change="handleChange"
|
|
18
18
|
@click:clear="handleClear"
|
|
19
|
+
@input="handleInput"
|
|
19
20
|
@mousedown:control="handleMousedownControl"
|
|
20
21
|
>
|
|
21
22
|
<template
|
|
@@ -146,8 +147,8 @@ import { DENSITY } from "../../enums/Commons/density.enum";
|
|
|
146
147
|
import { DIRECTION } from "../../enums/Commons/direction.enum";
|
|
147
148
|
import { TEXT_FIELD_TYPE } from "../../enums/TextField/text-field.enum";
|
|
148
149
|
import { forwardRefs } from "../../utils/Commons/forwardRefs.util";
|
|
149
|
-
import { HSVtoCSS } from "../../utils/Commons/color.util";
|
|
150
|
-
import { matchesSelector } from "../../utils/Commons/commons.util";
|
|
150
|
+
import { HSVtoCSS, isCompleteCssColor } from "../../utils/Commons/color.util";
|
|
151
|
+
import { has, matchesSelector } from "../../utils/Commons/commons.util";
|
|
151
152
|
import { computed, inject, nextTick, ref, shallowRef, StyleValue, useSlots, watch } from "vue";
|
|
152
153
|
const props = defineProps({
|
|
153
154
|
menu: { type: Boolean, required: false },
|
|
@@ -192,6 +193,8 @@ const props = defineProps({
|
|
|
192
193
|
prependInnerIcon: { type: null, required: false },
|
|
193
194
|
clearIcon: { type: null, required: false },
|
|
194
195
|
clearable: { type: Boolean, required: false },
|
|
196
|
+
prependInnerAriaLabel: { type: String, required: false },
|
|
197
|
+
appendInnerAriaLabel: { type: String, required: false },
|
|
195
198
|
border: { type: [Boolean, Number, String, Array], required: false, skipCheck: true, default: true },
|
|
196
199
|
borderTop: { type: [Boolean, Number, String], required: false },
|
|
197
200
|
borderLeft: { type: [Boolean, Number, String], required: false },
|
|
@@ -260,6 +263,8 @@ const props = defineProps({
|
|
|
260
263
|
appendIcon: { type: null, required: false },
|
|
261
264
|
prependAvatar: { type: String, required: false },
|
|
262
265
|
prependIcon: { type: null, required: false },
|
|
266
|
+
prependAriaLabel: { type: String, required: false },
|
|
267
|
+
appendAriaLabel: { type: String, required: false },
|
|
263
268
|
transition: { type: [Boolean, String, Object], required: false, default: () => ({ component: OrigamTranslateScale }) }
|
|
264
269
|
});
|
|
265
270
|
const { filterProps } = useProps(props);
|
|
@@ -284,8 +289,18 @@ const handleSelectColor = (color) => {
|
|
|
284
289
|
});
|
|
285
290
|
};
|
|
286
291
|
const selectedValue = computed(() => {
|
|
287
|
-
|
|
292
|
+
const v = model.value;
|
|
293
|
+
return v !== null && typeof v === "object" && has(v, ["h", "s", "v", "a"]) ? null : v;
|
|
288
294
|
});
|
|
295
|
+
const commitTypedColor = (raw) => {
|
|
296
|
+
if (raw === "") {
|
|
297
|
+
model.value = null;
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
if (isCompleteCssColor(raw)) {
|
|
301
|
+
model.value = raw;
|
|
302
|
+
}
|
|
303
|
+
};
|
|
289
304
|
const effectiveValidationValue = computed(() => {
|
|
290
305
|
return props.validationValue === void 0 ? model.value : props.validationValue;
|
|
291
306
|
});
|
|
@@ -346,8 +361,12 @@ const handleBlur = (e) => {
|
|
|
346
361
|
isFocused.value = true;
|
|
347
362
|
}
|
|
348
363
|
};
|
|
349
|
-
const
|
|
364
|
+
const handleInput = (e) => {
|
|
365
|
+
commitTypedColor(e.target?.value ?? "");
|
|
366
|
+
};
|
|
367
|
+
const handleChange = (e) => {
|
|
350
368
|
if (matchesSelector(origamTextFieldRef.value, ":autofill") || matchesSelector(origamTextFieldRef.value, ":-webkit-autofill")) {
|
|
369
|
+
commitTypedColor(e.target?.value ?? "");
|
|
351
370
|
}
|
|
352
371
|
};
|
|
353
372
|
const handleAfterLeave = () => {
|
|
@@ -420,7 +439,13 @@ defineExpose(forwardRefs({
|
|
|
420
439
|
<style lang="scss" scoped>
|
|
421
440
|
.origam-color-picker-field {
|
|
422
441
|
:deep(.origam-field) {
|
|
423
|
-
|
|
442
|
+
// #800 — l'unite est obligatoire : sans elle, `0` est un `<number>`
|
|
443
|
+
// et tout `max()` / `calc()` qui lit ce token JETTE sa declaration.
|
|
444
|
+
// Sans effet de rendu ici (mesure Chromium, avant/apres identiques) :
|
|
445
|
+
// ce champ est TOUJOURS prepended — le `#prependInner` du swatch est
|
|
446
|
+
// inconditionnel — donc son `padding-inline` vient de la regle
|
|
447
|
+
// `.origam-field--prepended`, qui n'utilise pas de `max()`.
|
|
448
|
+
--origam-field---padding-start: 0px;
|
|
424
449
|
}
|
|
425
450
|
|
|
426
451
|
:deep(.origam-field__prepend-inner) {
|
|
@@ -373,9 +373,9 @@ watch(isActive, async (next) => {
|
|
|
373
373
|
returnFocusEl = null;
|
|
374
374
|
}
|
|
375
375
|
});
|
|
376
|
-
const navigateText = "
|
|
377
|
-
const selectText = "
|
|
378
|
-
const closeText = "
|
|
376
|
+
const navigateText = computed(() => t("origam.command_palette.footer_navigate"));
|
|
377
|
+
const selectText = computed(() => t("origam.command_palette.footer_select"));
|
|
378
|
+
const closeText = computed(() => t("origam.close"));
|
|
379
379
|
const hasDefaultFooter = computed(() => true);
|
|
380
380
|
const { typographyStyles: groupTitleTypographyStyles } = useTypography(props, "command-palette__group-title");
|
|
381
381
|
const { typographyStyles: inputTypographyStyles } = useTypography(props, "command-palette__input");
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
v-if="hasPrepend"
|
|
14
14
|
key="prepend"
|
|
15
15
|
class="origam-confirm-wrapper__prepend"
|
|
16
|
-
|
|
17
|
-
:tabindex="isPrependClickable ? 0 : undefined"
|
|
16
|
+
v-bind="prependCommandAttrs"
|
|
18
17
|
@click="handleClickPrepend"
|
|
19
18
|
@keydown="handleKeydownPrepend"
|
|
20
19
|
>
|
|
@@ -52,8 +51,7 @@
|
|
|
52
51
|
v-if="hasAppend"
|
|
53
52
|
key="append"
|
|
54
53
|
class="origam-confirm-wrapper__append"
|
|
55
|
-
|
|
56
|
-
:tabindex="isAppendClickable ? 0 : undefined"
|
|
54
|
+
v-bind="appendCommandAttrs"
|
|
57
55
|
@click="handleClickAppend"
|
|
58
56
|
@keydown="handleKeydownAppend"
|
|
59
57
|
>
|
|
@@ -172,6 +170,8 @@ const props = defineProps({
|
|
|
172
170
|
appendIcon: { type: null, required: false },
|
|
173
171
|
prependAvatar: { type: String, required: false },
|
|
174
172
|
prependIcon: { type: null, required: false },
|
|
173
|
+
prependAriaLabel: { type: String, required: false },
|
|
174
|
+
appendAriaLabel: { type: String, required: false },
|
|
175
175
|
direction: { type: null, required: false, default: DIRECTION.VERTICAL },
|
|
176
176
|
color: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
177
177
|
density: { type: null, required: false, default: DENSITY.DEFAULT },
|
|
@@ -197,8 +197,8 @@ const {
|
|
|
197
197
|
onClickAppend: handleClickAppend,
|
|
198
198
|
onKeydownPrepend: handleKeydownPrepend,
|
|
199
199
|
onKeydownAppend: handleKeydownAppend,
|
|
200
|
-
|
|
201
|
-
|
|
200
|
+
prependCommandAttrs,
|
|
201
|
+
appendCommandAttrs
|
|
202
202
|
} = useAdjacent(props);
|
|
203
203
|
const origamLabelRef = ref();
|
|
204
204
|
const hasTitle = computed(() => {
|
|
@@ -142,10 +142,6 @@ const props = defineProps({
|
|
|
142
142
|
to: { type: null, required: false },
|
|
143
143
|
exact: { type: Boolean, required: false },
|
|
144
144
|
ripple: { type: [Boolean, Object], required: false },
|
|
145
|
-
appendAvatar: { type: String, required: false },
|
|
146
|
-
appendIcon: { type: null, required: false },
|
|
147
|
-
prependAvatar: { type: String, required: false },
|
|
148
|
-
prependIcon: { type: null, required: false },
|
|
149
145
|
hover: { type: [Boolean, Object], required: false },
|
|
150
146
|
hoverClass: { type: String, required: false },
|
|
151
147
|
fontSize: { type: null, required: false },
|
|
@@ -199,6 +199,8 @@ const props = defineProps({
|
|
|
199
199
|
appendIcon: { type: null, required: false },
|
|
200
200
|
prependAvatar: { type: String, required: false },
|
|
201
201
|
prependIcon: { type: null, required: false },
|
|
202
|
+
prependAriaLabel: { type: String, required: false },
|
|
203
|
+
appendAriaLabel: { type: String, required: false },
|
|
202
204
|
color: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
203
205
|
bgColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
204
206
|
margin: { type: [Boolean, Number, String], required: false },
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
v-if="hasPrepend"
|
|
10
10
|
key="prepend"
|
|
11
11
|
class="origam-data-text__prepend"
|
|
12
|
-
|
|
13
|
-
:tabindex="isPrependClickable ? 0 : undefined"
|
|
12
|
+
v-bind="prependCommandAttrs"
|
|
14
13
|
@click="handleClickPrepend"
|
|
15
14
|
@keydown="handleKeydownPrepend"
|
|
16
15
|
>
|
|
@@ -43,8 +42,7 @@
|
|
|
43
42
|
v-if="hasAppend"
|
|
44
43
|
key="append"
|
|
45
44
|
class="origam-data-text__append"
|
|
46
|
-
|
|
47
|
-
:tabindex="isAppendClickable ? 0 : undefined"
|
|
45
|
+
v-bind="appendCommandAttrs"
|
|
48
46
|
@click="handleClickAppend"
|
|
49
47
|
@keydown="handleKeydownAppend"
|
|
50
48
|
>
|
|
@@ -87,6 +85,8 @@ const props = defineProps({
|
|
|
87
85
|
appendIcon: { type: null, required: false },
|
|
88
86
|
prependAvatar: { type: String, required: false },
|
|
89
87
|
prependIcon: { type: null, required: false },
|
|
88
|
+
prependAriaLabel: { type: String, required: false },
|
|
89
|
+
appendAriaLabel: { type: String, required: false },
|
|
90
90
|
density: { type: null, required: false },
|
|
91
91
|
margin: { type: [Boolean, Number, String], required: false },
|
|
92
92
|
marginTop: { type: [Boolean, Number, String], required: false },
|
|
@@ -116,8 +116,8 @@ const {
|
|
|
116
116
|
onClickAppend: handleClickAppend,
|
|
117
117
|
onKeydownPrepend: handleKeydownPrepend,
|
|
118
118
|
onKeydownAppend: handleKeydownAppend,
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
prependCommandAttrs,
|
|
120
|
+
appendCommandAttrs,
|
|
121
121
|
hasAppend,
|
|
122
122
|
hasPrepend
|
|
123
123
|
} = useAdjacent(props, toRef(props, "prependIcon"), toRef(props, "appendIcon"));
|