origam 2.38.0 → 2.38.2
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 +34 -0
- package/dist/src/assets/locales/en.json +1 -1
- package/dist/src/assets/locales/fr.json +2 -2
- package/dist/src/components/Alert/OrigamAlert.vue +739 -165
- package/dist/src/components/App/OrigamApp.vue +95 -19
- package/dist/src/components/App/OrigamAppBar.vue +751 -158
- package/dist/src/components/Audio/OrigamAudio.vue +1288 -346
- package/dist/src/components/Audio/OrigamAudioWaveform.vue +63 -7
- package/dist/src/components/Avatar/OrigamAvatar.vue +678 -126
- package/dist/src/components/Avatar/OrigamAvatarGroup.vue +700 -153
- package/dist/src/components/Badge/OrigamBadge.vue +548 -135
- package/dist/src/components/Blockquote/OrigamBlockquote.vue +698 -140
- package/dist/src/components/BottomNav/OrigamBottomNav.vue +864 -156
- package/dist/src/components/Bracket/OrigamBracket.vue +1013 -380
- package/dist/src/components/Bracket/OrigamBracketCompetitor.vue +674 -154
- package/dist/src/components/Bracket/OrigamBracketMatch.vue +663 -163
- package/dist/src/components/Bracket/OrigamBracketRound.vue +116 -34
- package/dist/src/components/Breadcrumb/OrigamBreadcrumb.vue +654 -119
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbDivider.vue +292 -54
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +657 -126
- package/dist/src/components/Btn/OrigamBtn.vue +928 -249
- package/dist/src/components/Btn/OrigamBtnGroup.vue +658 -141
- package/dist/src/components/Btn/OrigamBtnToggle.vue +578 -91
- package/dist/src/components/Calendar/OrigamCalendar.vue +1142 -484
- package/dist/src/components/Card/OrigamCard.vue +938 -194
- package/dist/src/components/Card/OrigamCardHeader.vue +593 -104
- package/dist/src/components/Card/OrigamCardText.vue +536 -84
- package/dist/src/components/Carousel/OrigamCarousel.vue +778 -202
- package/dist/src/components/Carousel/OrigamCarouselItem.vue +660 -109
- package/dist/src/components/Chart/OrigamChart.vue +942 -452
- package/dist/src/components/Chart/OrigamChartAxis.vue +111 -19
- package/dist/src/components/Chart/OrigamChartBoxPlot.vue +713 -297
- package/dist/src/components/Chart/OrigamChartBullet.vue +701 -286
- package/dist/src/components/Chart/OrigamChartCandlestick.vue +663 -243
- package/dist/src/components/Chart/OrigamChartCartesian.vue +1055 -487
- package/dist/src/components/Chart/OrigamChartGauge.vue +563 -164
- package/dist/src/components/Chart/OrigamChartHeatmap.vue +677 -251
- package/dist/src/components/Chart/OrigamChartHoneycomb.vue +700 -288
- package/dist/src/components/Chart/OrigamChartLegend.vue +108 -16
- package/dist/src/components/Chart/OrigamChartMap.vue +723 -299
- package/dist/src/components/Chart/OrigamChartPareto.vue +721 -276
- package/dist/src/components/Chart/OrigamChartPictorial.vue +777 -355
- package/dist/src/components/Chart/OrigamChartPolar.vue +603 -210
- package/dist/src/components/Chart/OrigamChartPolarBar.vue +674 -271
- package/dist/src/components/Chart/OrigamChartPyramid.vue +685 -250
- package/dist/src/components/Chart/OrigamChartRadar.vue +515 -165
- package/dist/src/components/Chart/OrigamChartRangeSelector.vue +50 -25
- package/dist/src/components/Chart/OrigamChartSankey.vue +913 -467
- package/dist/src/components/Chart/OrigamChartSparkline.vue +711 -268
- package/dist/src/components/Chart/OrigamChartStreamgraph.vue +810 -368
- package/dist/src/components/Chart/OrigamChartSunburst.vue +779 -368
- package/dist/src/components/Chart/OrigamChartTooltip.vue +78 -19
- package/dist/src/components/Chart/OrigamChartTreemap.vue +750 -288
- package/dist/src/components/Chart/OrigamChartVariwide.vue +679 -251
- package/dist/src/components/Chart/OrigamChartWordCloud.vue +674 -265
- package/dist/src/components/Checkbox/OrigamCheckbox.vue +781 -136
- package/dist/src/components/Checkbox/OrigamCheckboxBtn.vue +465 -81
- package/dist/src/components/Checkbox/OrigamCheckboxGroup.vue +824 -137
- package/dist/src/components/Chip/OrigamChip.vue +867 -202
- package/dist/src/components/Chip/OrigamChipGroup.vue +633 -121
- package/dist/src/components/ClientOnly/OrigamClientOnly.vue +30 -4
- package/dist/src/components/Clipboard/OrigamClipboard.vue +624 -105
- package/dist/src/components/Code/OrigamCode.vue +844 -206
- package/dist/src/components/CodeGroup/OrigamCodeGroup.vue +494 -83
- package/dist/src/components/ColorPicker/OrigamColorPicker.vue +777 -159
- package/dist/src/components/ColorPicker/OrigamColorPickerCanvas.vue +295 -181
- package/dist/src/components/ColorPicker/OrigamColorPickerEdit.vue +108 -45
- package/dist/src/components/ColorPicker/OrigamColorPickerPreview.vue +131 -46
- package/dist/src/components/ColorPicker/OrigamColorPickerSwatches.vue +128 -39
- package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +1123 -258
- package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +415 -162
- package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +389 -145
- package/dist/src/components/ContextualMenu/OrigamContextualMenu.vue +852 -147
- package/dist/src/components/Counter/OrigamCounter.vue +588 -96
- package/dist/src/components/DataList/OrigamDataList.vue +619 -113
- package/dist/src/components/DataList/OrigamDataText.vue +295 -65
- package/dist/src/components/DataList/OrigamDataTitle.vue +295 -65
- package/dist/src/components/DataTable/OrigamDataTable.vue +934 -222
- package/dist/src/components/DataTable/OrigamDataTableColumnCell.vue +196 -51
- package/dist/src/components/DataTable/OrigamDataTableFooter.vue +319 -78
- package/dist/src/components/DataTable/OrigamDataTableGroupHeaderRow.vue +124 -44
- package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +181 -70
- package/dist/src/components/DataTable/OrigamDataTableHeaders.vue +155 -46
- package/dist/src/components/DataTable/OrigamDataTableHeadersCell.vue +145 -27
- package/dist/src/components/DataTable/OrigamDataTableHeadersCellMobile.vue +126 -43
- package/dist/src/components/DataTable/OrigamDataTableRow.vue +151 -73
- package/dist/src/components/DataTable/OrigamDataTableRows.vue +261 -106
- package/dist/src/components/DatePicker/OrigamDatePicker.vue +1048 -261
- package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +155 -51
- package/dist/src/components/DatePicker/OrigamDatePickerHeader.vue +147 -46
- package/dist/src/components/DatePicker/OrigamDatePickerMonth.vue +312 -134
- package/dist/src/components/DatePicker/OrigamDatePickerMonths.vue +151 -61
- package/dist/src/components/DatePicker/OrigamDatePickerYears.vue +154 -67
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +1147 -306
- package/dist/src/components/DefaultsProvider/OrigamDefaultsProvider.vue +74 -14
- package/dist/src/components/Dialog/OrigamDialog.vue +953 -196
- package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +886 -148
- package/dist/src/components/Divider/OrigamDivider.vue +210 -50
- package/dist/src/components/Drawer/OrigamDrawer.vue +909 -207
- package/dist/src/components/EmptyState/OrigamEmptyState.vue +146 -35
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +746 -159
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +591 -95
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +663 -143
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanels.vue +675 -134
- package/dist/src/components/Field/OrigamField.vue +1118 -306
- package/dist/src/components/FileField/OrigamFileField.vue +1188 -311
- package/dist/src/components/FileField/OrigamFileFieldDragNDropItem.vue +155 -36
- package/dist/src/components/FileField/OrigamFileFieldListItem.vue +155 -36
- package/dist/src/components/Form/OrigamForm.vue +197 -74
- package/dist/src/components/Grid/OrigamGrid.vue +707 -147
- package/dist/src/components/Grid/OrigamGridItem.vue +110 -37
- package/dist/src/components/Grids/OrigamCol.vue +593 -110
- package/dist/src/components/Grids/OrigamContainer.vue +461 -80
- package/dist/src/components/Grids/OrigamRow.vue +573 -112
- package/dist/src/components/Grids/OrigamSpacer.vue +54 -17
- package/dist/src/components/Icon/OrigamClassIcon.vue +573 -98
- package/dist/src/components/Icon/OrigamComponentIcon.vue +561 -101
- package/dist/src/components/Icon/OrigamIcon.vue +561 -98
- package/dist/src/components/Icon/OrigamLigatureIcon.vue +558 -98
- package/dist/src/components/Icon/OrigamSvgIcon.vue +593 -100
- package/dist/src/components/Img/OrigamImg.vue +869 -228
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScroll.vue +319 -111
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScrollIntersect.vue +80 -17
- package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +476 -140
- package/dist/src/components/Input/OrigamInput.vue +747 -180
- package/dist/src/components/ItemGroup/OrigamItemGroup.vue +112 -36
- package/dist/src/components/ItemGroup/OrigamItemGroupItem.vue +80 -29
- package/dist/src/components/Kbd/OrigamKbd.vue +450 -75
- package/dist/src/components/Label/OrigamLabel.vue +584 -95
- package/dist/src/components/Layout/OrigamLayout.vue +563 -94
- package/dist/src/components/Lazy/OrigamLazy.vue +131 -34
- package/dist/src/components/List/OrigamList.vue +755 -170
- package/dist/src/components/List/OrigamListChildren.vue +59 -19
- package/dist/src/components/List/OrigamListGroup.vue +631 -134
- package/dist/src/components/List/OrigamListGroupActivator.vue +45 -17
- package/dist/src/components/List/OrigamListItem.vue +890 -224
- package/dist/src/components/List/OrigamListItemWrapper.vue +20 -10
- package/dist/src/components/List/OrigamListSubheader.vue +542 -93
- package/dist/src/components/Loader/OrigamLoader.vue +110 -25
- package/dist/src/components/Main/OrigamMain.vue +565 -96
- package/dist/src/components/Masonry/OrigamMasonry.vue +799 -187
- package/dist/src/components/Media/OrigamMediaController.vue +465 -182
- package/dist/src/components/Media/OrigamMediaScrubber.vue +389 -152
- package/dist/src/components/Media/OrigamMediaVolumeControl.vue +174 -44
- package/dist/src/components/Menu/OrigamMenu.vue +1079 -255
- package/dist/src/components/Messages/OrigamMessages.vue +606 -97
- package/dist/src/components/NumberField/OrigamNumberField.vue +1208 -333
- package/dist/src/components/NumberFormat/OrigamNumberFormat.vue +177 -57
- package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +1016 -272
- package/dist/src/components/Overlay/OrigamOverlay.vue +446 -158
- package/dist/src/components/Overlay/OrigamOverlayScrim.vue +122 -30
- package/dist/src/components/Pagination/OrigamPagination.vue +982 -313
- package/dist/src/components/Parallax/OrigamParallax.vue +800 -259
- package/dist/src/components/Parallax/OrigamParallaxElement.vue +694 -178
- package/dist/src/components/Parallax/OrigamParallaxLayer.vue +132 -47
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +1098 -265
- package/dist/src/components/Picker/OrigamPicker.vue +655 -108
- package/dist/src/components/Picker/OrigamPickerTitle.vue +108 -26
- package/dist/src/components/Progress/OrigamProgress.vue +436 -70
- package/dist/src/components/Progress/OrigamProgressCircular.vue +399 -82
- package/dist/src/components/Progress/OrigamProgressLinear.vue +468 -115
- package/dist/src/components/QrCode/OrigamQrCode.vue +642 -126
- package/dist/src/components/Radio/OrigamRadio.vue +772 -132
- package/dist/src/components/Radio/OrigamRadioBtn.vue +446 -71
- package/dist/src/components/Radio/OrigamRadioGroup.vue +808 -135
- package/dist/src/components/RatingField/OrigamRatingField.vue +963 -194
- package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +657 -106
- package/dist/src/components/Responsive/OrigamResponsive.vue +548 -91
- package/dist/src/components/Select/OrigamSelect.vue +1639 -567
- package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +564 -151
- package/dist/src/components/SelectionControl/OrigamSelectionControlGroup.vue +178 -62
- package/dist/src/components/Sheet/OrigamSheet.vue +773 -199
- package/dist/src/components/Skeleton/OrigamSkeleton.vue +249 -46
- package/dist/src/components/Skeleton/OrigamSkeletonGroup.vue +66 -11
- package/dist/src/components/Slide/OrigamSlideGroup.vue +772 -257
- package/dist/src/components/SliderField/OrigamSliderField.vue +1157 -335
- package/dist/src/components/SliderField/OrigamSliderFieldTrack.vue +236 -112
- package/dist/src/components/Snackbar/OrigamSnackbar.vue +871 -214
- package/dist/src/components/Snackbar/OrigamSnackbarGroup.vue +218 -51
- package/dist/src/components/Snackbar/OrigamSnackbarItem.vue +175 -43
- package/dist/src/components/Stepper/OrigamStepper.vue +618 -126
- package/dist/src/components/Stepper/OrigamStepperItem.vue +98 -37
- package/dist/src/components/Switch/OrigamSwitch.vue +879 -156
- package/dist/src/components/Switch/OrigamSwitchTrack.vue +431 -78
- package/dist/src/components/SystemBar/OrigamSystemBar.vue +517 -87
- package/dist/src/components/Table/OrigamTable.vue +585 -124
- package/dist/src/components/Tabs/OrigamTab.vue +239 -73
- package/dist/src/components/Tabs/OrigamTabPanel.vue +125 -39
- package/dist/src/components/Tabs/OrigamTabPanels.vue +148 -57
- package/dist/src/components/Tabs/OrigamTabs.vue +381 -109
- package/dist/src/components/TextField/OrigamTextField.vue +1077 -258
- package/dist/src/components/TextMask/OrigamTextMask.vue +150 -43
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +1162 -310
- package/dist/src/components/TextareaField/OrigamTextareaFieldRichToolbar.vue +77 -79
- package/dist/src/components/ThemeProvider/OrigamThemeProvider.vue +44 -9
- package/dist/src/components/Timeline/OrigamTimeline.vue +113 -43
- package/dist/src/components/Timeline/OrigamTimelineItem.vue +163 -76
- package/dist/src/components/Title/OrigamTitle.vue +505 -82
- package/dist/src/components/Toolbar/OrigamToolbar.vue +679 -142
- package/dist/src/components/Tooltip/OrigamTooltip.vue +288 -72
- package/dist/src/components/Transition/OrigamExpandX.vue +219 -106
- package/dist/src/components/Transition/OrigamExpandY.vue +219 -106
- package/dist/src/components/Transition/OrigamFade.vue +47 -9
- package/dist/src/components/Transition/OrigamReverseTranslatePicker.vue +52 -10
- package/dist/src/components/Transition/OrigamScaleRotate.vue +52 -10
- package/dist/src/components/Transition/OrigamSlideX.vue +52 -10
- package/dist/src/components/Transition/OrigamSlideY.vue +52 -10
- package/dist/src/components/Transition/OrigamSnack.vue +52 -10
- package/dist/src/components/Transition/OrigamTransition.vue +40 -12
- package/dist/src/components/Transition/OrigamTranslateBottom.vue +52 -10
- package/dist/src/components/Transition/OrigamTranslatePicker.vue +52 -10
- package/dist/src/components/Transition/OrigamTranslateScale.vue +209 -97
- package/dist/src/components/Transition/OrigamWindowXReverseTranslate.vue +40 -7
- package/dist/src/components/Transition/OrigamWindowXTranslate.vue +40 -7
- package/dist/src/components/Transition/OrigamWindowYReverseTranslate.vue +40 -7
- package/dist/src/components/Transition/OrigamWindowYTranslate.vue +40 -7
- package/dist/src/components/Treeview/OrigamTreeview.vue +258 -118
- package/dist/src/components/Treeview/OrigamTreeviewNode.vue +126 -88
- package/dist/src/components/Video/OrigamVideo.vue +1178 -331
- package/dist/src/components/VirtualScroll/OrigamVirtualScroll.vue +147 -55
- package/dist/src/components/VirtualScroll/OrigamVirtualScrollItem.vue +94 -19
- package/dist/src/components/Watermark/OrigamWatermark.vue +224 -124
- package/dist/src/components/Window/OrigamWindow.vue +745 -175
- package/dist/src/components/Window/OrigamWindowItem.vue +162 -69
- package/dist/src/composables/Commons/display.composable.cjs +2 -0
- package/dist/src/composables/Commons/display.composable.js +1 -1
- package/dist/src/interfaces/Pagination/pagination.interface.d.ts +1 -1
- package/package.json +8 -8
|
@@ -34,143 +34,415 @@ import { omitUndefined } from "../../utils/Commons/commons.util";
|
|
|
34
34
|
import { DENSITY } from "../../enums/Commons/density.enum";
|
|
35
35
|
import { DIRECTION } from "../../enums/Commons/direction.enum";
|
|
36
36
|
import { TAB_VARIANT } from "../../enums/Tabs/tab.enum";
|
|
37
|
+
/*********************************************************
|
|
38
|
+
* Global
|
|
39
|
+
********************************************************/
|
|
37
40
|
const props = defineProps({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
41
|
+
tag: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: false,
|
|
44
|
+
default: "div"
|
|
45
|
+
},
|
|
46
|
+
variant: {
|
|
47
|
+
type: null,
|
|
48
|
+
required: false,
|
|
49
|
+
default: TAB_VARIANT.DEFAULT
|
|
50
|
+
},
|
|
51
|
+
fixed: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
required: false,
|
|
54
|
+
default: false
|
|
55
|
+
},
|
|
56
|
+
centered: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
required: false,
|
|
59
|
+
default: false
|
|
60
|
+
},
|
|
61
|
+
id: {
|
|
62
|
+
type: String,
|
|
63
|
+
required: false
|
|
64
|
+
},
|
|
65
|
+
class: {
|
|
66
|
+
type: [
|
|
67
|
+
String,
|
|
68
|
+
Array,
|
|
69
|
+
Object
|
|
70
|
+
],
|
|
71
|
+
required: false
|
|
72
|
+
},
|
|
73
|
+
style: {
|
|
74
|
+
type: [
|
|
75
|
+
String,
|
|
76
|
+
Array,
|
|
77
|
+
Object,
|
|
78
|
+
Boolean,
|
|
79
|
+
null
|
|
80
|
+
],
|
|
81
|
+
required: false,
|
|
82
|
+
skipCheck: true
|
|
83
|
+
},
|
|
84
|
+
direction: {
|
|
85
|
+
type: null,
|
|
86
|
+
required: false,
|
|
87
|
+
default: DIRECTION.HORIZONTAL
|
|
88
|
+
},
|
|
89
|
+
density: {
|
|
90
|
+
type: null,
|
|
91
|
+
required: false,
|
|
92
|
+
default: DENSITY.DEFAULT
|
|
93
|
+
},
|
|
94
|
+
rounded: {
|
|
95
|
+
type: [
|
|
96
|
+
Boolean,
|
|
97
|
+
Number,
|
|
98
|
+
String,
|
|
99
|
+
null
|
|
100
|
+
],
|
|
101
|
+
required: false,
|
|
102
|
+
skipCheck: true
|
|
103
|
+
},
|
|
104
|
+
roundedTopRight: {
|
|
105
|
+
type: [
|
|
106
|
+
Boolean,
|
|
107
|
+
Number,
|
|
108
|
+
String
|
|
109
|
+
],
|
|
110
|
+
required: false
|
|
111
|
+
},
|
|
112
|
+
roundedTopLeft: {
|
|
113
|
+
type: [
|
|
114
|
+
Boolean,
|
|
115
|
+
Number,
|
|
116
|
+
String
|
|
117
|
+
],
|
|
118
|
+
required: false
|
|
119
|
+
},
|
|
120
|
+
roundedBottomLeft: {
|
|
121
|
+
type: [
|
|
122
|
+
Boolean,
|
|
123
|
+
Number,
|
|
124
|
+
String
|
|
125
|
+
],
|
|
126
|
+
required: false
|
|
127
|
+
},
|
|
128
|
+
roundedBottomRight: {
|
|
129
|
+
type: [
|
|
130
|
+
Boolean,
|
|
131
|
+
Number,
|
|
132
|
+
String
|
|
133
|
+
],
|
|
134
|
+
required: false
|
|
135
|
+
},
|
|
136
|
+
roundedStartStart: {
|
|
137
|
+
type: [
|
|
138
|
+
Boolean,
|
|
139
|
+
Number,
|
|
140
|
+
String
|
|
141
|
+
],
|
|
142
|
+
required: false
|
|
143
|
+
},
|
|
144
|
+
roundedStartEnd: {
|
|
145
|
+
type: [
|
|
146
|
+
Boolean,
|
|
147
|
+
Number,
|
|
148
|
+
String
|
|
149
|
+
],
|
|
150
|
+
required: false
|
|
151
|
+
},
|
|
152
|
+
roundedEndStart: {
|
|
153
|
+
type: [
|
|
154
|
+
Boolean,
|
|
155
|
+
Number,
|
|
156
|
+
String
|
|
157
|
+
],
|
|
158
|
+
required: false
|
|
159
|
+
},
|
|
160
|
+
roundedEndEnd: {
|
|
161
|
+
type: [
|
|
162
|
+
Boolean,
|
|
163
|
+
Number,
|
|
164
|
+
String
|
|
165
|
+
],
|
|
166
|
+
required: false
|
|
167
|
+
},
|
|
168
|
+
color: {
|
|
169
|
+
type: [
|
|
170
|
+
String,
|
|
171
|
+
Object,
|
|
172
|
+
Boolean,
|
|
173
|
+
null
|
|
174
|
+
],
|
|
175
|
+
required: false,
|
|
176
|
+
skipCheck: true
|
|
177
|
+
},
|
|
178
|
+
bgColor: {
|
|
179
|
+
type: [
|
|
180
|
+
String,
|
|
181
|
+
Object,
|
|
182
|
+
Boolean,
|
|
183
|
+
null
|
|
184
|
+
],
|
|
185
|
+
required: false,
|
|
186
|
+
skipCheck: true
|
|
187
|
+
},
|
|
188
|
+
disabled: {
|
|
189
|
+
type: Boolean,
|
|
190
|
+
required: false
|
|
191
|
+
},
|
|
192
|
+
modelValue: {
|
|
193
|
+
type: null,
|
|
194
|
+
required: false
|
|
195
|
+
},
|
|
196
|
+
multiple: {
|
|
197
|
+
type: Boolean,
|
|
198
|
+
required: false
|
|
199
|
+
},
|
|
200
|
+
mandatory: {
|
|
201
|
+
type: Boolean,
|
|
202
|
+
required: false,
|
|
203
|
+
default: true
|
|
204
|
+
},
|
|
205
|
+
max: {
|
|
206
|
+
type: Number,
|
|
207
|
+
required: false
|
|
208
|
+
},
|
|
209
|
+
selectedClass: {
|
|
210
|
+
type: String,
|
|
211
|
+
required: false,
|
|
212
|
+
default: "origam-tab--active"
|
|
213
|
+
}
|
|
64
214
|
});
|
|
65
215
|
defineEmits(["update:modelValue"]);
|
|
66
216
|
defineSlots();
|
|
67
217
|
const { filterProps } = useProps(props);
|
|
218
|
+
/*********************************************************
|
|
219
|
+
* Group orchestration
|
|
220
|
+
*
|
|
221
|
+
* @description
|
|
222
|
+
* Re-uses the shared `useGroup` registry — every child
|
|
223
|
+
* `<OrigamTab>` self-registers via `useGroupItem` against
|
|
224
|
+
* the same injection key.
|
|
225
|
+
********************************************************/
|
|
68
226
|
const { isSelected, select, next, prev, selected, items } = useGroup(props, ORIGAM_TABS_KEY);
|
|
227
|
+
/*********************************************************
|
|
228
|
+
* Sibling panels link (#441)
|
|
229
|
+
*
|
|
230
|
+
* @description
|
|
231
|
+
* `<OrigamTabPanels>` is documented as a SIBLING, never an
|
|
232
|
+
* ancestor — `<OrigamTab>` cannot `inject(ORIGAM_TAB_PANELS_KEY)`
|
|
233
|
+
* directly. Resolve the sibling's group once (walking the shared
|
|
234
|
+
* parent's render tree, see `useGroupSiblingLink`) and re-provide
|
|
235
|
+
* it down OUR OWN (real) ancestor chain so `<OrigamTab>` can read
|
|
236
|
+
* it via a plain `inject()`.
|
|
237
|
+
********************************************************/
|
|
69
238
|
const panelsGroupLink = useGroupSiblingLink(ORIGAM_TABS_KEY, ORIGAM_TAB_PANELS_KEY);
|
|
70
239
|
provide(ORIGAM_TAB_PANELS_LINK_KEY, panelsGroupLink);
|
|
71
240
|
const rootRef = ref();
|
|
241
|
+
/*********************************************************
|
|
242
|
+
* Slot scope + default propagation
|
|
243
|
+
********************************************************/
|
|
72
244
|
const slotProps = computed(() => ({
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
245
|
+
isSelected,
|
|
246
|
+
select,
|
|
247
|
+
next,
|
|
248
|
+
prev,
|
|
249
|
+
selected,
|
|
250
|
+
items: items.value
|
|
79
251
|
}));
|
|
252
|
+
// Forward ONLY what the consumer actually passed — see #263. `color` is
|
|
253
|
+
// `TColor` (includes `false`) and `fixed` is boolean, so Vue coerces both
|
|
254
|
+
// to a concrete `false` when unset; `omitUndefined` alone cannot see it.
|
|
255
|
+
//
|
|
256
|
+
// `variant` is kept unconditional, exactly as on `OrigamBtnGroup`: the
|
|
257
|
+
// tabs' own resolved variant (whether passed or resolved from a theme's
|
|
258
|
+
// `'origam-tabs'` block) must always reach the children, else a themed
|
|
259
|
+
// variant paints the tab bar but leaves every tab on its own default.
|
|
80
260
|
const wasPropPassed = usePassedProps(props);
|
|
81
|
-
const slotDefaults = computed(() => ({
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
261
|
+
const slotDefaults = computed(() => ({ "origam-tab": omitUndefined({
|
|
262
|
+
variant: props.variant,
|
|
263
|
+
density: wasPropPassed("density") ? props.density : undefined,
|
|
264
|
+
color: wasPropPassed("color") ? props.color : undefined,
|
|
265
|
+
fixed: wasPropPassed("fixed") ? props.fixed : undefined
|
|
266
|
+
}) }));
|
|
267
|
+
/*********************************************************
|
|
268
|
+
* tabsColor (#1253)
|
|
269
|
+
*
|
|
270
|
+
* @description
|
|
271
|
+
* Read reactively by each tab (pills active surface) — a provide, not a forwarded default, so no prop is injected on the tab.
|
|
272
|
+
********************************************************/
|
|
89
273
|
provide(ORIGAM_TABS_COLOR_KEY, toRef(props, "color"));
|
|
274
|
+
/*********************************************************
|
|
275
|
+
* ARIA + keyboard navigation
|
|
276
|
+
*
|
|
277
|
+
* @description
|
|
278
|
+
* `← / →` for horizontal, `↑ / ↓` for vertical. `Home`
|
|
279
|
+
* / `End` jump to first/last. Disabled items are skipped
|
|
280
|
+
* but `useGroup.step` already handles the wrap-around.
|
|
281
|
+
* Focus stays on the freshly-selected tab so screen
|
|
282
|
+
* readers announce the change — WAI-ARIA APG « Tabs with
|
|
283
|
+
* Automatic Activation » : la fleche deplace le focus ET
|
|
284
|
+
* la selection.
|
|
285
|
+
*
|
|
286
|
+
* @description
|
|
287
|
+
* ⛔ `next()` / `prev()` RENVOIENT l'id retenu et c'est CET id
|
|
288
|
+
* qu'on focalise (#786). La version precedente relisait
|
|
289
|
+
* `selected.value[0]` juste apres l'appel — sous `v-model` le
|
|
290
|
+
* getter de `useVModel` rend `props.modelValue`, donc encore
|
|
291
|
+
* l'ANCIEN id : le focus retournait sur l'onglet qu'on venait
|
|
292
|
+
* de quitter pendant que `aria-selected` basculait ailleurs.
|
|
293
|
+
* Mesure jsdom d'avant correctif, 3 onglets sous v-model,
|
|
294
|
+
* focus de depart sur l'onglet 0 :
|
|
295
|
+
*
|
|
296
|
+
* ArrowRight aria-selected -> 1 activeElement -> 0
|
|
297
|
+
* ArrowRight aria-selected -> 2 activeElement -> 1
|
|
298
|
+
*
|
|
299
|
+
* `Home` / `End` y echappaient parce que
|
|
300
|
+
* `focusFirstNonDisabled` PORTE l'id au lieu de le relire.
|
|
301
|
+
* `packages/tests/TU/components/Tabs/tabs-keyboard-focus.spec.ts`
|
|
302
|
+
* assert `document.activeElement` sur les 4 touches.
|
|
303
|
+
*
|
|
304
|
+
* @description
|
|
305
|
+
* ⛔ `focusTab` RESOLVES THE DOM NODE THROUGH THE ID THE TAB
|
|
306
|
+
* PUBLISHED on its own registry entry (`IGroupItem.domId`),
|
|
307
|
+
* never through a `data-` attribute carrying `groupItem.id`
|
|
308
|
+
* (#741). That counter is module-global and never reset, so on
|
|
309
|
+
* a persistent SSR process it differs between the served HTML
|
|
310
|
+
* and the client render. Vue does not rectify attribute
|
|
311
|
+
* mismatches in production: the attribute kept its SERVER value
|
|
312
|
+
* while this lookup ran with the CLIENT value, and matched
|
|
313
|
+
* nothing. `domId` is the very id rendered on the element, so
|
|
314
|
+
* the two sides cannot drift apart.
|
|
315
|
+
********************************************************/
|
|
90
316
|
const ariaOrientation = computed(() => props.direction === DIRECTION.VERTICAL ? "vertical" : "horizontal");
|
|
91
|
-
const focusTab = (
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
317
|
+
const focusTab = (id) => {
|
|
318
|
+
if (!rootRef.value) return;
|
|
319
|
+
const domId = items.value.find((item) => item.id === id)?.domId;
|
|
320
|
+
if (!domId) return;
|
|
321
|
+
const target = rootRef.value.querySelector(`[id=${JSON.stringify(domId)}]`);
|
|
322
|
+
target?.focus();
|
|
97
323
|
};
|
|
98
324
|
const focusFirstNonDisabled = (offset) => {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
325
|
+
const list = items.value;
|
|
326
|
+
if (!list.length) return;
|
|
327
|
+
const start = offset > 0 ? 0 : list.length - 1;
|
|
328
|
+
const end = offset > 0 ? list.length : -1;
|
|
329
|
+
for (let i = start; i !== end; i += offset) {
|
|
330
|
+
const item = list[i];
|
|
331
|
+
if (!item.disabled) {
|
|
332
|
+
select(item.id, true);
|
|
333
|
+
focusTab(item.id);
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
111
337
|
};
|
|
112
338
|
const handleKeydown = (event) => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
339
|
+
const isHorizontal = props.direction !== DIRECTION.VERTICAL;
|
|
340
|
+
const prevKey = isHorizontal ? "ArrowLeft" : "ArrowUp";
|
|
341
|
+
const nextKey = isHorizontal ? "ArrowRight" : "ArrowDown";
|
|
342
|
+
const currentId = selected.value[0];
|
|
343
|
+
if (event.key === prevKey) {
|
|
344
|
+
event.preventDefault();
|
|
345
|
+
const movedTo = prev();
|
|
346
|
+
if (movedTo != null) focusTab(movedTo);
|
|
347
|
+
} else if (event.key === nextKey) {
|
|
348
|
+
event.preventDefault();
|
|
349
|
+
const movedTo = next();
|
|
350
|
+
if (movedTo != null) focusTab(movedTo);
|
|
351
|
+
} else if (event.key === "Home") {
|
|
352
|
+
event.preventDefault();
|
|
353
|
+
focusFirstNonDisabled(1);
|
|
354
|
+
} else if (event.key === "End") {
|
|
355
|
+
event.preventDefault();
|
|
356
|
+
focusFirstNonDisabled(-1);
|
|
357
|
+
} else if (event.key === "Enter" || event.key === " ") {
|
|
358
|
+
if (currentId != null) {
|
|
359
|
+
event.preventDefault();
|
|
360
|
+
select(currentId, true);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
137
363
|
};
|
|
364
|
+
/*********************************************************
|
|
365
|
+
* Composables — visual chrome
|
|
366
|
+
********************************************************/
|
|
138
367
|
const { densityClasses } = useDensity(props);
|
|
139
368
|
const { roundedClasses, roundedStyles } = useRounded(props);
|
|
369
|
+
/*********************************************************
|
|
370
|
+
* bgColor
|
|
371
|
+
*
|
|
372
|
+
* @description
|
|
373
|
+
* #550 (critere C1) — `bgColor` etait DECLAREE (via `IBgColorProps`),
|
|
374
|
+
* exposee par DEUX controles de la story et documentee, et lue nulle
|
|
375
|
+
* part : la barre d'onglets restait sur son
|
|
376
|
+
* `--origam-tabs---background-color` quoi qu'on passe. Seul `color`
|
|
377
|
+
* etait lu, et uniquement pour etre RE-DIFFUSE aux `<origam-tab>`
|
|
378
|
+
* enfants via `slotDefaults` — jamais pour peindre le tablist lui-meme.
|
|
379
|
+
*
|
|
380
|
+
* @description
|
|
381
|
+
* `useBackgroundColor` (et non `useBothColor`) : le perimetre est
|
|
382
|
+
* `bgColor`. Y adjoindre `color` changerait le contrat de `color`, qui
|
|
383
|
+
* est aujourd'hui une valeur PROPAGEE aux onglets, pas une couleur de
|
|
384
|
+
* texte du conteneur. La paire de contraste reste assuree : quand
|
|
385
|
+
* `bgColor` est une intention, `useColor` emet aussi le `color:` associe
|
|
386
|
+
* (`bgIntentFg`), donc le texte reste lisible sur la surface peinte.
|
|
387
|
+
*
|
|
388
|
+
* @description
|
|
389
|
+
* La declaration inline est celle qui peint : la regle scopee
|
|
390
|
+
* `.origam-tabs { background-color: var(--origam-tabs---background-color,
|
|
391
|
+
* transparent) }` vaut (0,2,0) et battrait l'utilitaire
|
|
392
|
+
* `.origam--bg-{intention}` (0,1,0) — cf. « Strategie A » dans le
|
|
393
|
+
* CLAUDE.md racine. Les deux canaux sont branches quand meme, en
|
|
394
|
+
* parallele, comme partout ailleurs.
|
|
395
|
+
********************************************************/
|
|
140
396
|
const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(toRef(props, "bgColor"));
|
|
397
|
+
/*********************************************************
|
|
398
|
+
* Class & Style
|
|
399
|
+
********************************************************/
|
|
141
400
|
const tabsStyles = computed(() => {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
401
|
+
return [
|
|
402
|
+
roundedStyles.value,
|
|
403
|
+
backgroundColorStyles.value,
|
|
404
|
+
props.style
|
|
405
|
+
];
|
|
147
406
|
});
|
|
148
407
|
const tabsClasses = computed(() => {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
408
|
+
return [
|
|
409
|
+
"origam-tabs",
|
|
410
|
+
`origam-tabs--${props.variant}`,
|
|
411
|
+
`origam-tabs--direction-${props.direction}`,
|
|
412
|
+
{
|
|
413
|
+
"origam-tabs--fixed": props.fixed,
|
|
414
|
+
"origam-tabs--centered": props.centered
|
|
415
|
+
},
|
|
416
|
+
backgroundColorClasses.value,
|
|
417
|
+
densityClasses.value,
|
|
418
|
+
roundedClasses.value,
|
|
419
|
+
props.class
|
|
420
|
+
];
|
|
162
421
|
});
|
|
422
|
+
/*********************************************************
|
|
423
|
+
* useStyle
|
|
424
|
+
*
|
|
425
|
+
* @description
|
|
426
|
+
* #381 — the `id` returned by useStyle is a GENERATED identifier,
|
|
427
|
+
* only meant for the scoped stylesheet selector. Without
|
|
428
|
+
* `() => props.id` here, it shadowed the `id` PROP of the same
|
|
429
|
+
* name: the template's `:id="id"` on the root rendered the
|
|
430
|
+
* generated id, never the consumer's.
|
|
431
|
+
********************************************************/
|
|
163
432
|
const { id, css, load, isLoaded, unload } = useStyle(tabsStyles, () => props.id);
|
|
433
|
+
/*********************************************************
|
|
434
|
+
* Expose
|
|
435
|
+
********************************************************/
|
|
164
436
|
defineExpose({
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
437
|
+
filterProps,
|
|
438
|
+
next,
|
|
439
|
+
prev,
|
|
440
|
+
select,
|
|
441
|
+
css,
|
|
442
|
+
id,
|
|
443
|
+
load,
|
|
444
|
+
unload,
|
|
445
|
+
isLoaded
|
|
174
446
|
});
|
|
175
447
|
</script>
|
|
176
448
|
|