origam 2.17.0 → 2.18.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 +744 -1
- package/dist/src/assets/css/main.css +1 -1
- package/dist/src/assets/css/tokens/dark.css +125 -24
- package/dist/src/assets/css/tokens/light.css +49 -12
- 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 +2846 -12
- package/dist/src/assets/scss/tokens/_light.scss +49 -12
- 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 +21 -3
- 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 +43 -18
- 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 +34 -14
- 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 +83 -28
- package/dist/src/components/FileField/OrigamFileField.vue +20 -15
- 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 +19 -3
- package/dist/src/components/Menu/OrigamMenu.vue +79 -9
- package/dist/src/components/NumberField/OrigamNumberField.vue +26 -16
- package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +48 -24
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +20 -15
- 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 +57 -34
- 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/Switch/OrigamSwitchTrack.vue +20 -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 +20 -15
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +20 -15
- 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/VirtualScroll/OrigamVirtualScroll.vue +1 -1
- 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/border.const.cjs +2 -1
- package/dist/src/consts/Commons/border.const.d.ts +19 -0
- package/dist/src/consts/Commons/border.const.js +15 -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/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/Field/field.interface.d.ts +21 -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/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 -5
- package/dist/src/utils/Commons/color.util.d.ts +34 -5
- package/dist/src/utils/Commons/color.util.js +9 -5
- 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/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
|
@@ -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,21 @@ 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 },
|
|
198
|
+
border: { type: [Boolean, Number, String, Array], required: false, skipCheck: true, default: true },
|
|
199
|
+
borderTop: { type: [Boolean, Number, String], required: false },
|
|
200
|
+
borderLeft: { type: [Boolean, Number, String], required: false },
|
|
201
|
+
borderBottom: { type: [Boolean, Number, String], required: false },
|
|
202
|
+
borderRight: { type: [Boolean, Number, String], required: false },
|
|
203
|
+
borderBlock: { type: [Boolean, Number, String], required: false },
|
|
204
|
+
borderInline: { type: [Boolean, Number, String], required: false },
|
|
205
|
+
borderColor: { type: String, required: false },
|
|
206
|
+
borderStyle: { type: String, required: false },
|
|
207
|
+
borderTopColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
208
|
+
borderRightColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
209
|
+
borderBottomColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
210
|
+
borderLeftColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
195
211
|
focused: { type: Boolean, required: false },
|
|
196
212
|
text: { type: String, required: false },
|
|
197
213
|
floating: { type: Boolean, required: false },
|
|
@@ -210,19 +226,6 @@ const props = defineProps({
|
|
|
210
226
|
paddingRight: { type: [Boolean, Number, String], required: false },
|
|
211
227
|
paddingBlock: { type: [Boolean, Number, String], required: false },
|
|
212
228
|
paddingInline: { type: [Boolean, Number, String], required: false },
|
|
213
|
-
border: { type: [Boolean, Number, String, Array], required: false, skipCheck: true, default: true },
|
|
214
|
-
borderTop: { type: [Boolean, Number, String], required: false },
|
|
215
|
-
borderLeft: { type: [Boolean, Number, String], required: false },
|
|
216
|
-
borderBottom: { type: [Boolean, Number, String], required: false },
|
|
217
|
-
borderRight: { type: [Boolean, Number, String], required: false },
|
|
218
|
-
borderBlock: { type: [Boolean, Number, String], required: false },
|
|
219
|
-
borderInline: { type: [Boolean, Number, String], required: false },
|
|
220
|
-
borderColor: { type: String, required: false },
|
|
221
|
-
borderStyle: { type: String, required: false },
|
|
222
|
-
borderTopColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
223
|
-
borderRightColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
224
|
-
borderBottomColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
225
|
-
borderLeftColor: { type: [String, Object, Boolean, null], required: false, skipCheck: true },
|
|
226
229
|
rounded: { type: [Boolean, Number, String, null], required: false, skipCheck: true, default: true },
|
|
227
230
|
roundedTopRight: { type: [Boolean, Number, String], required: false },
|
|
228
231
|
roundedTopLeft: { 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"));
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
v-if="hasPrepend"
|
|
10
10
|
key="prepend"
|
|
11
11
|
class="origam-data-title__prepend"
|
|
12
|
-
|
|
13
|
-
:tabindex="isPrependClickable ? 0 : undefined"
|
|
12
|
+
v-bind="prependCommandAttrs"
|
|
14
13
|
@click="handleClickPrepend"
|
|
15
14
|
@keydown="handleKeydownPrepend"
|
|
16
15
|
>
|
|
@@ -46,8 +45,7 @@
|
|
|
46
45
|
v-if="hasAppend"
|
|
47
46
|
key="append"
|
|
48
47
|
class="origam-data-title__append"
|
|
49
|
-
|
|
50
|
-
:tabindex="isAppendClickable ? 0 : undefined"
|
|
48
|
+
v-bind="appendCommandAttrs"
|
|
51
49
|
@click="handleClickAppend"
|
|
52
50
|
@keydown="handleKeydownAppend"
|
|
53
51
|
>
|
|
@@ -90,6 +88,8 @@ const props = defineProps({
|
|
|
90
88
|
appendIcon: { type: null, required: false },
|
|
91
89
|
prependAvatar: { type: String, required: false },
|
|
92
90
|
prependIcon: { type: null, required: false },
|
|
91
|
+
prependAriaLabel: { type: String, required: false },
|
|
92
|
+
appendAriaLabel: { type: String, required: false },
|
|
93
93
|
density: { type: null, required: false },
|
|
94
94
|
margin: { type: [Boolean, Number, String], required: false },
|
|
95
95
|
marginTop: { type: [Boolean, Number, String], required: false },
|
|
@@ -119,8 +119,8 @@ const {
|
|
|
119
119
|
onClickAppend: handleClickAppend,
|
|
120
120
|
onKeydownPrepend: handleKeydownPrepend,
|
|
121
121
|
onKeydownAppend: handleKeydownAppend,
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
prependCommandAttrs,
|
|
123
|
+
appendCommandAttrs,
|
|
124
124
|
hasAppend,
|
|
125
125
|
hasPrepend
|
|
126
126
|
} = useAdjacent(props, toRef(props, "prependIcon"), toRef(props, "appendIcon"));
|
|
@@ -106,7 +106,7 @@ const getFixedStyles = (column, y) => {
|
|
|
106
106
|
return {
|
|
107
107
|
position: "sticky",
|
|
108
108
|
left: column.fixed ? convertToUnit(column.fixedOffset) : void 0,
|
|
109
|
-
top: props.sticky ? `calc(var(--origam-
|
|
109
|
+
top: props.sticky ? `calc(var(--origam-table__header-cell---height, 44px) * ${y})` : void 0
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
112
|
const hasColumn = (name) => {
|
|
@@ -77,7 +77,10 @@ const dataTableHeadersCellStyles = computed(() => {
|
|
|
77
77
|
];
|
|
78
78
|
});
|
|
79
79
|
const { id, css, load, isLoaded, unload } = useStyle(dataTableHeadersCellStyles, () => props.id);
|
|
80
|
-
const headerRowId = (index) =>
|
|
80
|
+
const headerRowId = (index) => {
|
|
81
|
+
if (!props.id) return void 0;
|
|
82
|
+
return index === 0 ? props.id : `${props.id}-row-${index}`;
|
|
83
|
+
};
|
|
81
84
|
defineExpose({
|
|
82
85
|
filterProps,
|
|
83
86
|
css,
|
|
@@ -213,6 +213,8 @@ const props = defineProps({
|
|
|
213
213
|
appendIcon: { type: null, required: false },
|
|
214
214
|
prependAvatar: { type: String, required: false },
|
|
215
215
|
prependIcon: { type: null, required: false },
|
|
216
|
+
prependAriaLabel: { type: String, required: false },
|
|
217
|
+
appendAriaLabel: { type: String, required: false },
|
|
216
218
|
density: { type: null, required: false }
|
|
217
219
|
});
|
|
218
220
|
const emits = defineEmits(["update:month", "update:year", "update:viewMode", "update:modelValue"]);
|