origam 2.38.1 → 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 +24 -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 +6 -6
|
@@ -143,302 +143,968 @@ import vRipple from "../../directives/Ripple/ripple.directive";
|
|
|
143
143
|
import { KEYBOARD_VALUES } from "../../enums/Commons/hotkey.enum";
|
|
144
144
|
import { LIST_ITEM_ROLE } from "../../enums/List/list-item.enum";
|
|
145
145
|
const attrs = useAttrs();
|
|
146
|
+
/*********************************************************
|
|
147
|
+
* Global
|
|
148
|
+
********************************************************/
|
|
149
|
+
/*********************************************************
|
|
150
|
+
* inheritAttrs (#1249)
|
|
151
|
+
*
|
|
152
|
+
* @description
|
|
153
|
+
* The root is `ListItemWrapper`, which forwards no attrs: they are bound to the interactive element.
|
|
154
|
+
********************************************************/
|
|
146
155
|
defineOptions({ inheritAttrs: false });
|
|
147
156
|
const props = defineProps({
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
157
|
+
active: {
|
|
158
|
+
type: Boolean,
|
|
159
|
+
required: false
|
|
160
|
+
},
|
|
161
|
+
activeClass: {
|
|
162
|
+
type: String,
|
|
163
|
+
required: false
|
|
164
|
+
},
|
|
165
|
+
disabled: {
|
|
166
|
+
type: Boolean,
|
|
167
|
+
required: false
|
|
168
|
+
},
|
|
169
|
+
lines: {
|
|
170
|
+
type: null,
|
|
171
|
+
required: false
|
|
172
|
+
},
|
|
173
|
+
link: {
|
|
174
|
+
type: Boolean,
|
|
175
|
+
required: false
|
|
176
|
+
},
|
|
177
|
+
nav: {
|
|
178
|
+
type: Boolean,
|
|
179
|
+
required: false
|
|
180
|
+
},
|
|
181
|
+
slim: {
|
|
182
|
+
type: Boolean,
|
|
183
|
+
required: false
|
|
184
|
+
},
|
|
185
|
+
subtitle: {
|
|
186
|
+
type: [String, Number],
|
|
187
|
+
required: false
|
|
188
|
+
},
|
|
189
|
+
title: {
|
|
190
|
+
type: [String, Number],
|
|
191
|
+
required: false
|
|
192
|
+
},
|
|
193
|
+
value: {
|
|
194
|
+
type: null,
|
|
195
|
+
required: false
|
|
196
|
+
},
|
|
197
|
+
border: {
|
|
198
|
+
type: [
|
|
199
|
+
Boolean,
|
|
200
|
+
Number,
|
|
201
|
+
String,
|
|
202
|
+
Array
|
|
203
|
+
],
|
|
204
|
+
required: false,
|
|
205
|
+
skipCheck: true
|
|
206
|
+
},
|
|
207
|
+
borderTop: {
|
|
208
|
+
type: [
|
|
209
|
+
Boolean,
|
|
210
|
+
Number,
|
|
211
|
+
String
|
|
212
|
+
],
|
|
213
|
+
required: false
|
|
214
|
+
},
|
|
215
|
+
borderLeft: {
|
|
216
|
+
type: [
|
|
217
|
+
Boolean,
|
|
218
|
+
Number,
|
|
219
|
+
String
|
|
220
|
+
],
|
|
221
|
+
required: false
|
|
222
|
+
},
|
|
223
|
+
borderBottom: {
|
|
224
|
+
type: [
|
|
225
|
+
Boolean,
|
|
226
|
+
Number,
|
|
227
|
+
String
|
|
228
|
+
],
|
|
229
|
+
required: false
|
|
230
|
+
},
|
|
231
|
+
borderRight: {
|
|
232
|
+
type: [
|
|
233
|
+
Boolean,
|
|
234
|
+
Number,
|
|
235
|
+
String
|
|
236
|
+
],
|
|
237
|
+
required: false
|
|
238
|
+
},
|
|
239
|
+
borderBlock: {
|
|
240
|
+
type: [
|
|
241
|
+
Boolean,
|
|
242
|
+
Number,
|
|
243
|
+
String
|
|
244
|
+
],
|
|
245
|
+
required: false
|
|
246
|
+
},
|
|
247
|
+
borderInline: {
|
|
248
|
+
type: [
|
|
249
|
+
Boolean,
|
|
250
|
+
Number,
|
|
251
|
+
String
|
|
252
|
+
],
|
|
253
|
+
required: false
|
|
254
|
+
},
|
|
255
|
+
borderInlineStart: {
|
|
256
|
+
type: [
|
|
257
|
+
Boolean,
|
|
258
|
+
Number,
|
|
259
|
+
String
|
|
260
|
+
],
|
|
261
|
+
required: false
|
|
262
|
+
},
|
|
263
|
+
borderInlineEnd: {
|
|
264
|
+
type: [
|
|
265
|
+
Boolean,
|
|
266
|
+
Number,
|
|
267
|
+
String
|
|
268
|
+
],
|
|
269
|
+
required: false
|
|
270
|
+
},
|
|
271
|
+
borderBlockStart: {
|
|
272
|
+
type: [
|
|
273
|
+
Boolean,
|
|
274
|
+
Number,
|
|
275
|
+
String
|
|
276
|
+
],
|
|
277
|
+
required: false
|
|
278
|
+
},
|
|
279
|
+
borderBlockEnd: {
|
|
280
|
+
type: [
|
|
281
|
+
Boolean,
|
|
282
|
+
Number,
|
|
283
|
+
String
|
|
284
|
+
],
|
|
285
|
+
required: false
|
|
286
|
+
},
|
|
287
|
+
borderColor: {
|
|
288
|
+
type: String,
|
|
289
|
+
required: false
|
|
290
|
+
},
|
|
291
|
+
borderStyle: {
|
|
292
|
+
type: String,
|
|
293
|
+
required: false
|
|
294
|
+
},
|
|
295
|
+
borderTopColor: {
|
|
296
|
+
type: [
|
|
297
|
+
String,
|
|
298
|
+
Object,
|
|
299
|
+
Boolean,
|
|
300
|
+
null
|
|
301
|
+
],
|
|
302
|
+
required: false,
|
|
303
|
+
skipCheck: true
|
|
304
|
+
},
|
|
305
|
+
borderRightColor: {
|
|
306
|
+
type: [
|
|
307
|
+
String,
|
|
308
|
+
Object,
|
|
309
|
+
Boolean,
|
|
310
|
+
null
|
|
311
|
+
],
|
|
312
|
+
required: false,
|
|
313
|
+
skipCheck: true
|
|
314
|
+
},
|
|
315
|
+
borderBottomColor: {
|
|
316
|
+
type: [
|
|
317
|
+
String,
|
|
318
|
+
Object,
|
|
319
|
+
Boolean,
|
|
320
|
+
null
|
|
321
|
+
],
|
|
322
|
+
required: false,
|
|
323
|
+
skipCheck: true
|
|
324
|
+
},
|
|
325
|
+
borderLeftColor: {
|
|
326
|
+
type: [
|
|
327
|
+
String,
|
|
328
|
+
Object,
|
|
329
|
+
Boolean,
|
|
330
|
+
null
|
|
331
|
+
],
|
|
332
|
+
required: false,
|
|
333
|
+
skipCheck: true
|
|
334
|
+
},
|
|
335
|
+
borderInlineStartColor: {
|
|
336
|
+
type: [
|
|
337
|
+
String,
|
|
338
|
+
Object,
|
|
339
|
+
Boolean,
|
|
340
|
+
null
|
|
341
|
+
],
|
|
342
|
+
required: false,
|
|
343
|
+
skipCheck: true
|
|
344
|
+
},
|
|
345
|
+
borderInlineEndColor: {
|
|
346
|
+
type: [
|
|
347
|
+
String,
|
|
348
|
+
Object,
|
|
349
|
+
Boolean,
|
|
350
|
+
null
|
|
351
|
+
],
|
|
352
|
+
required: false,
|
|
353
|
+
skipCheck: true
|
|
354
|
+
},
|
|
355
|
+
borderBlockStartColor: {
|
|
356
|
+
type: [
|
|
357
|
+
String,
|
|
358
|
+
Object,
|
|
359
|
+
Boolean,
|
|
360
|
+
null
|
|
361
|
+
],
|
|
362
|
+
required: false,
|
|
363
|
+
skipCheck: true
|
|
364
|
+
},
|
|
365
|
+
borderBlockEndColor: {
|
|
366
|
+
type: [
|
|
367
|
+
String,
|
|
368
|
+
Object,
|
|
369
|
+
Boolean,
|
|
370
|
+
null
|
|
371
|
+
],
|
|
372
|
+
required: false,
|
|
373
|
+
skipCheck: true
|
|
374
|
+
},
|
|
375
|
+
id: {
|
|
376
|
+
type: String,
|
|
377
|
+
required: false
|
|
378
|
+
},
|
|
379
|
+
class: {
|
|
380
|
+
type: [
|
|
381
|
+
String,
|
|
382
|
+
Array,
|
|
383
|
+
Object
|
|
384
|
+
],
|
|
385
|
+
required: false
|
|
386
|
+
},
|
|
387
|
+
style: {
|
|
388
|
+
type: [
|
|
389
|
+
String,
|
|
390
|
+
Array,
|
|
391
|
+
Object,
|
|
392
|
+
Boolean,
|
|
393
|
+
null
|
|
394
|
+
],
|
|
395
|
+
required: false,
|
|
396
|
+
skipCheck: true
|
|
397
|
+
},
|
|
398
|
+
density: {
|
|
399
|
+
type: null,
|
|
400
|
+
required: false
|
|
401
|
+
},
|
|
402
|
+
height: {
|
|
403
|
+
type: [Number, String],
|
|
404
|
+
required: false
|
|
405
|
+
},
|
|
406
|
+
maxHeight: {
|
|
407
|
+
type: [Number, String],
|
|
408
|
+
required: false
|
|
409
|
+
},
|
|
410
|
+
maxWidth: {
|
|
411
|
+
type: [Number, String],
|
|
412
|
+
required: false
|
|
413
|
+
},
|
|
414
|
+
minHeight: {
|
|
415
|
+
type: [Number, String],
|
|
416
|
+
required: false
|
|
417
|
+
},
|
|
418
|
+
minWidth: {
|
|
419
|
+
type: [Number, String],
|
|
420
|
+
required: false
|
|
421
|
+
},
|
|
422
|
+
width: {
|
|
423
|
+
type: [Number, String],
|
|
424
|
+
required: false
|
|
425
|
+
},
|
|
426
|
+
elevation: {
|
|
427
|
+
type: [Number, String],
|
|
428
|
+
required: false
|
|
429
|
+
},
|
|
430
|
+
rounded: {
|
|
431
|
+
type: [
|
|
432
|
+
Boolean,
|
|
433
|
+
Number,
|
|
434
|
+
String,
|
|
435
|
+
null
|
|
436
|
+
],
|
|
437
|
+
required: false,
|
|
438
|
+
skipCheck: true
|
|
439
|
+
},
|
|
440
|
+
roundedTopRight: {
|
|
441
|
+
type: [
|
|
442
|
+
Boolean,
|
|
443
|
+
Number,
|
|
444
|
+
String
|
|
445
|
+
],
|
|
446
|
+
required: false
|
|
447
|
+
},
|
|
448
|
+
roundedTopLeft: {
|
|
449
|
+
type: [
|
|
450
|
+
Boolean,
|
|
451
|
+
Number,
|
|
452
|
+
String
|
|
453
|
+
],
|
|
454
|
+
required: false
|
|
455
|
+
},
|
|
456
|
+
roundedBottomLeft: {
|
|
457
|
+
type: [
|
|
458
|
+
Boolean,
|
|
459
|
+
Number,
|
|
460
|
+
String
|
|
461
|
+
],
|
|
462
|
+
required: false
|
|
463
|
+
},
|
|
464
|
+
roundedBottomRight: {
|
|
465
|
+
type: [
|
|
466
|
+
Boolean,
|
|
467
|
+
Number,
|
|
468
|
+
String
|
|
469
|
+
],
|
|
470
|
+
required: false
|
|
471
|
+
},
|
|
472
|
+
roundedStartStart: {
|
|
473
|
+
type: [
|
|
474
|
+
Boolean,
|
|
475
|
+
Number,
|
|
476
|
+
String
|
|
477
|
+
],
|
|
478
|
+
required: false
|
|
479
|
+
},
|
|
480
|
+
roundedStartEnd: {
|
|
481
|
+
type: [
|
|
482
|
+
Boolean,
|
|
483
|
+
Number,
|
|
484
|
+
String
|
|
485
|
+
],
|
|
486
|
+
required: false
|
|
487
|
+
},
|
|
488
|
+
roundedEndStart: {
|
|
489
|
+
type: [
|
|
490
|
+
Boolean,
|
|
491
|
+
Number,
|
|
492
|
+
String
|
|
493
|
+
],
|
|
494
|
+
required: false
|
|
495
|
+
},
|
|
496
|
+
roundedEndEnd: {
|
|
497
|
+
type: [
|
|
498
|
+
Boolean,
|
|
499
|
+
Number,
|
|
500
|
+
String
|
|
501
|
+
],
|
|
502
|
+
required: false
|
|
503
|
+
},
|
|
504
|
+
size: {
|
|
505
|
+
type: null,
|
|
506
|
+
required: false
|
|
507
|
+
},
|
|
508
|
+
tag: {
|
|
509
|
+
type: String,
|
|
510
|
+
required: false,
|
|
511
|
+
default: "div"
|
|
512
|
+
},
|
|
513
|
+
href: {
|
|
514
|
+
type: String,
|
|
515
|
+
required: false
|
|
516
|
+
},
|
|
517
|
+
replace: {
|
|
518
|
+
type: Boolean,
|
|
519
|
+
required: false
|
|
520
|
+
},
|
|
521
|
+
to: {
|
|
522
|
+
type: null,
|
|
523
|
+
required: false
|
|
524
|
+
},
|
|
525
|
+
exact: {
|
|
526
|
+
type: Boolean,
|
|
527
|
+
required: false
|
|
528
|
+
},
|
|
529
|
+
color: {
|
|
530
|
+
type: [
|
|
531
|
+
String,
|
|
532
|
+
Object,
|
|
533
|
+
Boolean,
|
|
534
|
+
null
|
|
535
|
+
],
|
|
536
|
+
required: false,
|
|
537
|
+
skipCheck: true
|
|
538
|
+
},
|
|
539
|
+
bgColor: {
|
|
540
|
+
type: [
|
|
541
|
+
String,
|
|
542
|
+
Object,
|
|
543
|
+
Boolean,
|
|
544
|
+
null
|
|
545
|
+
],
|
|
546
|
+
required: false,
|
|
547
|
+
skipCheck: true
|
|
548
|
+
},
|
|
549
|
+
ripple: {
|
|
550
|
+
type: [Boolean, Object],
|
|
551
|
+
required: false
|
|
552
|
+
},
|
|
553
|
+
padding: {
|
|
554
|
+
type: [
|
|
555
|
+
Boolean,
|
|
556
|
+
Number,
|
|
557
|
+
String
|
|
558
|
+
],
|
|
559
|
+
required: false
|
|
560
|
+
},
|
|
561
|
+
paddingTop: {
|
|
562
|
+
type: [
|
|
563
|
+
Boolean,
|
|
564
|
+
Number,
|
|
565
|
+
String
|
|
566
|
+
],
|
|
567
|
+
required: false
|
|
568
|
+
},
|
|
569
|
+
paddingLeft: {
|
|
570
|
+
type: [
|
|
571
|
+
Boolean,
|
|
572
|
+
Number,
|
|
573
|
+
String
|
|
574
|
+
],
|
|
575
|
+
required: false
|
|
576
|
+
},
|
|
577
|
+
paddingBottom: {
|
|
578
|
+
type: [
|
|
579
|
+
Boolean,
|
|
580
|
+
Number,
|
|
581
|
+
String
|
|
582
|
+
],
|
|
583
|
+
required: false
|
|
584
|
+
},
|
|
585
|
+
paddingRight: {
|
|
586
|
+
type: [
|
|
587
|
+
Boolean,
|
|
588
|
+
Number,
|
|
589
|
+
String
|
|
590
|
+
],
|
|
591
|
+
required: false
|
|
592
|
+
},
|
|
593
|
+
paddingBlock: {
|
|
594
|
+
type: [
|
|
595
|
+
Boolean,
|
|
596
|
+
Number,
|
|
597
|
+
String
|
|
598
|
+
],
|
|
599
|
+
required: false
|
|
600
|
+
},
|
|
601
|
+
paddingInline: {
|
|
602
|
+
type: [
|
|
603
|
+
Boolean,
|
|
604
|
+
Number,
|
|
605
|
+
String
|
|
606
|
+
],
|
|
607
|
+
required: false
|
|
608
|
+
},
|
|
609
|
+
paddingInlineStart: {
|
|
610
|
+
type: [
|
|
611
|
+
Boolean,
|
|
612
|
+
Number,
|
|
613
|
+
String
|
|
614
|
+
],
|
|
615
|
+
required: false
|
|
616
|
+
},
|
|
617
|
+
paddingInlineEnd: {
|
|
618
|
+
type: [
|
|
619
|
+
Boolean,
|
|
620
|
+
Number,
|
|
621
|
+
String
|
|
622
|
+
],
|
|
623
|
+
required: false
|
|
624
|
+
},
|
|
625
|
+
paddingBlockStart: {
|
|
626
|
+
type: [
|
|
627
|
+
Boolean,
|
|
628
|
+
Number,
|
|
629
|
+
String
|
|
630
|
+
],
|
|
631
|
+
required: false
|
|
632
|
+
},
|
|
633
|
+
paddingBlockEnd: {
|
|
634
|
+
type: [
|
|
635
|
+
Boolean,
|
|
636
|
+
Number,
|
|
637
|
+
String
|
|
638
|
+
],
|
|
639
|
+
required: false
|
|
640
|
+
},
|
|
641
|
+
margin: {
|
|
642
|
+
type: [
|
|
643
|
+
Boolean,
|
|
644
|
+
Number,
|
|
645
|
+
String
|
|
646
|
+
],
|
|
647
|
+
required: false
|
|
648
|
+
},
|
|
649
|
+
marginTop: {
|
|
650
|
+
type: [
|
|
651
|
+
Boolean,
|
|
652
|
+
Number,
|
|
653
|
+
String
|
|
654
|
+
],
|
|
655
|
+
required: false
|
|
656
|
+
},
|
|
657
|
+
marginLeft: {
|
|
658
|
+
type: [
|
|
659
|
+
Boolean,
|
|
660
|
+
Number,
|
|
661
|
+
String
|
|
662
|
+
],
|
|
663
|
+
required: false
|
|
664
|
+
},
|
|
665
|
+
marginBottom: {
|
|
666
|
+
type: [
|
|
667
|
+
Boolean,
|
|
668
|
+
Number,
|
|
669
|
+
String
|
|
670
|
+
],
|
|
671
|
+
required: false
|
|
672
|
+
},
|
|
673
|
+
marginRight: {
|
|
674
|
+
type: [
|
|
675
|
+
Boolean,
|
|
676
|
+
Number,
|
|
677
|
+
String
|
|
678
|
+
],
|
|
679
|
+
required: false
|
|
680
|
+
},
|
|
681
|
+
marginBlock: {
|
|
682
|
+
type: [
|
|
683
|
+
Boolean,
|
|
684
|
+
Number,
|
|
685
|
+
String
|
|
686
|
+
],
|
|
687
|
+
required: false
|
|
688
|
+
},
|
|
689
|
+
marginInline: {
|
|
690
|
+
type: [
|
|
691
|
+
Boolean,
|
|
692
|
+
Number,
|
|
693
|
+
String
|
|
694
|
+
],
|
|
695
|
+
required: false
|
|
696
|
+
},
|
|
697
|
+
marginInlineStart: {
|
|
698
|
+
type: [
|
|
699
|
+
Boolean,
|
|
700
|
+
Number,
|
|
701
|
+
String
|
|
702
|
+
],
|
|
703
|
+
required: false
|
|
704
|
+
},
|
|
705
|
+
marginInlineEnd: {
|
|
706
|
+
type: [
|
|
707
|
+
Boolean,
|
|
708
|
+
Number,
|
|
709
|
+
String
|
|
710
|
+
],
|
|
711
|
+
required: false
|
|
712
|
+
},
|
|
713
|
+
marginBlockStart: {
|
|
714
|
+
type: [
|
|
715
|
+
Boolean,
|
|
716
|
+
Number,
|
|
717
|
+
String
|
|
718
|
+
],
|
|
719
|
+
required: false
|
|
720
|
+
},
|
|
721
|
+
marginBlockEnd: {
|
|
722
|
+
type: [
|
|
723
|
+
Boolean,
|
|
724
|
+
Number,
|
|
725
|
+
String
|
|
726
|
+
],
|
|
727
|
+
required: false
|
|
728
|
+
},
|
|
729
|
+
appendAvatar: {
|
|
730
|
+
type: String,
|
|
731
|
+
required: false
|
|
732
|
+
},
|
|
733
|
+
appendIcon: {
|
|
734
|
+
type: null,
|
|
735
|
+
required: false
|
|
736
|
+
},
|
|
737
|
+
prependAvatar: {
|
|
738
|
+
type: String,
|
|
739
|
+
required: false
|
|
740
|
+
},
|
|
741
|
+
prependIcon: {
|
|
742
|
+
type: null,
|
|
743
|
+
required: false
|
|
744
|
+
},
|
|
745
|
+
prependAriaLabel: {
|
|
746
|
+
type: String,
|
|
747
|
+
required: false
|
|
748
|
+
},
|
|
749
|
+
appendAriaLabel: {
|
|
750
|
+
type: String,
|
|
751
|
+
required: false
|
|
752
|
+
},
|
|
753
|
+
hover: {
|
|
754
|
+
type: [Boolean, Object],
|
|
755
|
+
required: false
|
|
756
|
+
},
|
|
757
|
+
hoverClass: {
|
|
758
|
+
type: String,
|
|
759
|
+
required: false
|
|
760
|
+
},
|
|
761
|
+
fontSize: {
|
|
762
|
+
type: null,
|
|
763
|
+
required: false
|
|
764
|
+
},
|
|
765
|
+
fontWeight: {
|
|
766
|
+
type: null,
|
|
767
|
+
required: false
|
|
768
|
+
},
|
|
769
|
+
lineHeight: {
|
|
770
|
+
type: null,
|
|
771
|
+
required: false
|
|
772
|
+
},
|
|
773
|
+
letterSpacing: {
|
|
774
|
+
type: null,
|
|
775
|
+
required: false
|
|
776
|
+
}
|
|
242
777
|
});
|
|
243
|
-
const emits = defineEmits([
|
|
778
|
+
const emits = defineEmits([
|
|
779
|
+
"click",
|
|
780
|
+
"click:append",
|
|
781
|
+
"click:prepend"
|
|
782
|
+
]);
|
|
244
783
|
defineSlots();
|
|
245
784
|
const { filterProps } = useProps(props);
|
|
246
785
|
const slots = useSlots();
|
|
247
786
|
const link = useLink(props, attrs);
|
|
248
|
-
const id = computed(() => props.value ===
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
isGroupActivator,
|
|
254
|
-
root,
|
|
255
|
-
parent,
|
|
256
|
-
openOnSelect
|
|
257
|
-
} = useNestedItem(id, false);
|
|
787
|
+
const id = computed(() => props.value === undefined ? link.href.value : props.value);
|
|
788
|
+
/*********************************************************
|
|
789
|
+
* Composables
|
|
790
|
+
********************************************************/
|
|
791
|
+
const { select, isSelected, isIndeterminate, isGroupActivator, root, parent, openOnSelect } = useNestedItem(id, false);
|
|
258
792
|
const list = useList();
|
|
793
|
+
/*********************************************************
|
|
794
|
+
* Colour — BOTH channels (#436)
|
|
795
|
+
*
|
|
796
|
+
* @description
|
|
797
|
+
* The row only ever consumed `bgColor`, through
|
|
798
|
+
* `useBackgroundColor(toRef(props, 'bgColor'))`. `IListItemProps`
|
|
799
|
+
* extends `IColorProps` all the same, so `color` was a declared,
|
|
800
|
+
* documented, story-exposed prop that painted nothing.
|
|
801
|
+
* @description
|
|
802
|
+
* It is not an exotic prop either: `<origam-list>` AND
|
|
803
|
+
* `<origam-list-group>` both forward `color` down to every descendant
|
|
804
|
+
* `<origam-list-item>` through their defaults provider — that
|
|
805
|
+
* forwarding landed on a prop the row dropped. `useBothColor` is the
|
|
806
|
+
* same hook `<origam-list>` / `<origam-list-subheader>` already use;
|
|
807
|
+
* it resolves the pair and delegates to `useColor`.
|
|
808
|
+
********************************************************/
|
|
809
|
+
// Phase 3 (Vague D) — class-first companion alongside inline styles.
|
|
259
810
|
const { colorClasses, colorStyles } = useBothColor(toRef(props, "bgColor"), toRef(props, "color"));
|
|
260
811
|
const { densityClasses } = useDensity(props);
|
|
812
|
+
// Only `sizeClasses` is consumed — NEVER `sizeStyles`. Its non-tokenised
|
|
813
|
+
// branch emits an identical `width` AND `height` (a square), which would
|
|
814
|
+
// destroy a list row. The rung classes below drive `min-height` + block
|
|
815
|
+
// padding instead; see the `&--size-*` rules in the style block.
|
|
261
816
|
const { sizeClasses } = useSize(props);
|
|
262
817
|
const { isOn: isHover, config: hoverState } = useStateFlag(props, { state: "hover" });
|
|
263
818
|
const { isOn: isActiveFlag } = useStateFlag(props, { state: "active" });
|
|
264
|
-
const {
|
|
265
|
-
borderClasses,
|
|
266
|
-
borderStyles,
|
|
267
|
-
roundedClasses,
|
|
268
|
-
roundedStyles,
|
|
269
|
-
elevationClasses,
|
|
270
|
-
paddingClasses,
|
|
271
|
-
paddingStyles,
|
|
272
|
-
marginClasses,
|
|
273
|
-
marginStyles
|
|
274
|
-
} = useStateEffect(props, isHover, void 0, hoverState, void 0);
|
|
819
|
+
const { borderClasses, borderStyles, roundedClasses, roundedStyles, elevationClasses, paddingClasses, paddingStyles, marginClasses, marginStyles } = useStateEffect(props, isHover, undefined, hoverState, undefined);
|
|
275
820
|
const { dimensionStyles } = useDimension(props);
|
|
821
|
+
/*********************************************************
|
|
822
|
+
* Typography — dual-surface (title + subtitle children)
|
|
823
|
+
*
|
|
824
|
+
* One ITypographyProps set drives both BEM children.
|
|
825
|
+
* SCSS reads the 4 vars on each surface at root level
|
|
826
|
+
* (no per-size suffix) → fontSize / fontWeight /
|
|
827
|
+
* letterSpacing / lineHeight all have a real visual effect.
|
|
828
|
+
* fontFamily is not read by either surface → not exposed.
|
|
829
|
+
********************************************************/
|
|
276
830
|
const { typographyStyles: titleTypographyStyles } = useTypography(props, "list-item__title");
|
|
277
831
|
const { typographyStyles: subtitleTypographyStyles } = useTypography(props, "list-item__subtitle");
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
832
|
+
/*********************************************************
|
|
833
|
+
* Icon
|
|
834
|
+
********************************************************/
|
|
835
|
+
const { onClickPrepend: handleClickPrepend, onClickAppend: handleClickAppend, onKeydownPrepend: handleKeydownPrepend, onKeydownAppend: handleKeydownAppend, isPrependClickable, isAppendClickable, hasAppend, hasPrepend } = useAdjacent(props, toRef(props, "prependIcon"), toRef(props, "appendIcon"));
|
|
836
|
+
/*********************************************************
|
|
837
|
+
* isPrependZoneFocusable / isAppendZoneFocusable
|
|
838
|
+
*
|
|
839
|
+
* @description
|
|
840
|
+
* issue #443 — same <a>-content-model gating as OrigamChip/OrigamBreadcrumbItem:
|
|
841
|
+
* the root is `<a>` whenever `link.isLink` is true, and a <button>/<a>
|
|
842
|
+
* forbids any descendant with a `tabindex` attribute specified.
|
|
843
|
+
********************************************************/
|
|
288
844
|
const isPrependZoneFocusable = computed(() => isPrependClickable.value && !link.isLink.value);
|
|
289
845
|
const isAppendZoneFocusable = computed(() => isAppendClickable.value && !link.isLink.value);
|
|
846
|
+
/*********************************************************
|
|
847
|
+
* prependCommandAttrs / appendCommandAttrs — #747
|
|
848
|
+
*
|
|
849
|
+
* @description
|
|
850
|
+
* Built locally rather than taken from `useAdjacent`, because the gate
|
|
851
|
+
* is `isXxxZoneFocusable` (link-aware) and not raw clickability. The
|
|
852
|
+
* hook's own pair is never read here, so its lazy warning never fires
|
|
853
|
+
* twice for the same zone.
|
|
854
|
+
********************************************************/
|
|
290
855
|
const prependCommandAttrs = useAccessibleCommand({
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
856
|
+
component: "OrigamListItem",
|
|
857
|
+
zone: "prepend",
|
|
858
|
+
prop: "prependAriaLabel",
|
|
859
|
+
active: isPrependZoneFocusable,
|
|
860
|
+
label: () => props.prependAriaLabel
|
|
296
861
|
});
|
|
297
862
|
const appendCommandAttrs = useAccessibleCommand({
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
863
|
+
component: "OrigamListItem",
|
|
864
|
+
zone: "append",
|
|
865
|
+
prop: "appendAriaLabel",
|
|
866
|
+
active: isAppendZoneFocusable,
|
|
867
|
+
label: () => props.appendAriaLabel
|
|
303
868
|
});
|
|
304
869
|
const isActive = computed(() => {
|
|
305
|
-
|
|
870
|
+
return isActiveFlag.value || link.isActive?.value || isSelected.value;
|
|
306
871
|
});
|
|
872
|
+
/*********************************************************
|
|
873
|
+
* itemRole (#424)
|
|
874
|
+
*
|
|
875
|
+
* @description
|
|
876
|
+
* The row never picks its own role — it reads the one its list
|
|
877
|
+
* PUBLISHED through `ORIGAM_LIST_KEY` (`listitem` in list mode,
|
|
878
|
+
* `option` in selection mode). That way the container and its rows
|
|
879
|
+
* can never disagree: an `option` outside a `listbox`, or a
|
|
880
|
+
* `listitem` inside one, is a broken ARIA contract and neither is
|
|
881
|
+
* reachable from here.
|
|
882
|
+
* @description
|
|
883
|
+
* Two rows still get no role at all. A bare `<OrigamListItem>` used
|
|
884
|
+
* outside any list (`list` falsy — no ancestor provided the key): no
|
|
885
|
+
* ARIA is better than a role whose promised container doesn't exist.
|
|
886
|
+
* And a group activator, which only toggles expand/collapse and never
|
|
887
|
+
* fires `select()` (see `click` below) — it is a control, not one of
|
|
888
|
+
* the list's own rows.
|
|
889
|
+
********************************************************/
|
|
307
890
|
const itemRole = computed(() => {
|
|
308
|
-
|
|
891
|
+
return list && !isGroupActivator ? list.itemRole.value : undefined;
|
|
309
892
|
});
|
|
893
|
+
/*********************************************************
|
|
894
|
+
* ariaSelected / ariaDisabled
|
|
895
|
+
*
|
|
896
|
+
* @description
|
|
897
|
+
* `aria-selected` is REQUIRED state on `option` and meaningless on
|
|
898
|
+
* `listitem` — a plain list row that reports "not selected" invents a
|
|
899
|
+
* selection the list does not offer. Both attributes are therefore
|
|
900
|
+
* gated on the option role, and both are computed here rather than in
|
|
901
|
+
* the template: no logic in the markup, and the role comparison has a
|
|
902
|
+
* single home if the role set ever grows.
|
|
903
|
+
********************************************************/
|
|
904
|
+
/*********************************************************
|
|
905
|
+
* wrapperRole / anchorRole (#1249)
|
|
906
|
+
*
|
|
907
|
+
* @description
|
|
908
|
+
* An explicit `role` REPLACES the implicit one: `role="listitem"` on
|
|
909
|
+
* the `<a>` made a link announce as a list item (WCAG 4.1.2). In list
|
|
910
|
+
* mode a link row therefore renders `<div role="listitem"><a>`: the
|
|
911
|
+
* role moves to a wrapper and the `<a>` keeps its implicit `link`
|
|
912
|
+
* role. The `<a>` stays the whole visual row, so classes, styles,
|
|
913
|
+
* ripple, tabindex and handlers stay on it. Selection mode (`option`)
|
|
914
|
+
* and every non-link row keep the flat structure.
|
|
915
|
+
********************************************************/
|
|
310
916
|
const isListitemLink = computed(() => {
|
|
311
|
-
|
|
917
|
+
return link.isLink.value && itemRole.value === LIST_ITEM_ROLE.LISTITEM;
|
|
312
918
|
});
|
|
313
919
|
const wrapperRole = computed(() => {
|
|
314
|
-
|
|
920
|
+
return isListitemLink.value ? itemRole.value : undefined;
|
|
315
921
|
});
|
|
316
922
|
const anchorRole = computed(() => {
|
|
317
|
-
|
|
923
|
+
return isListitemLink.value ? undefined : itemRole.value;
|
|
318
924
|
});
|
|
319
925
|
const isOption = computed(() => {
|
|
320
|
-
|
|
926
|
+
return itemRole.value === LIST_ITEM_ROLE.OPTION;
|
|
321
927
|
});
|
|
322
928
|
const ariaSelected = computed(() => {
|
|
323
|
-
|
|
929
|
+
return isOption.value ? isSelected.value : undefined;
|
|
324
930
|
});
|
|
325
931
|
const ariaDisabled = computed(() => {
|
|
326
|
-
|
|
932
|
+
return isOption.value ? props.disabled : undefined;
|
|
327
933
|
});
|
|
328
934
|
const isLink = computed(() => {
|
|
329
|
-
|
|
935
|
+
return props.link && link.isLink.value;
|
|
330
936
|
});
|
|
937
|
+
// `isClickable` drives cursor: pointer, the ripple, the keydown
|
|
938
|
+
// handler, the `--link` modifier class, the focusable tabindex, and
|
|
939
|
+
// the click bridge. It must be true whenever the item is interactive
|
|
940
|
+
// for any reason — i.e. when ANY of the following holds:
|
|
941
|
+
// • `props.link` toggles explicit router-link mode
|
|
942
|
+
// • `link.isClickable.value` — useLink detects an `href`, a `to`,
|
|
943
|
+
// OR an `onClick` listener (on attrs or props)
|
|
944
|
+
// • `props.value != null && !!list` — selectable value inside a
|
|
945
|
+
// list group (e.g. the items inside the Select dropdown)
|
|
946
|
+
//
|
|
947
|
+
// Pre-fix the chain was `… && props.link && (props.link || …)`. The
|
|
948
|
+
// middle `props.link` short-circuited the whole expression to false
|
|
949
|
+
// whenever the consumer didn't opt into link mode, killing cursor
|
|
950
|
+
// feedback / ripple / keyboard activation on every click-only item
|
|
951
|
+
// (notably Select dropdown items, which only carry `onClick` in
|
|
952
|
+
// `menuListItemProps`). Drop the redundant precondition and let the
|
|
953
|
+
// OR chain own the decision.
|
|
331
954
|
const isClickable = computed(() => {
|
|
332
|
-
|
|
955
|
+
return !props.disabled && (props.link || link.isClickable.value || props.value != null && !!list);
|
|
333
956
|
});
|
|
334
957
|
const lineClasses = computed(() => {
|
|
335
|
-
|
|
336
|
-
props.lines ? `origam-list-item--${props.lines}-line` : void 0
|
|
337
|
-
];
|
|
958
|
+
return [props.lines ? `origam-list-item--${props.lines}-line` : undefined];
|
|
338
959
|
});
|
|
339
960
|
const listItemTabIndex = computed(() => {
|
|
340
|
-
|
|
961
|
+
return isClickable.value ? list ? -2 : 0 : undefined;
|
|
341
962
|
});
|
|
342
963
|
const setActiveLink = () => {
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
964
|
+
if (parent.value != null) {
|
|
965
|
+
root.open(parent.value, true);
|
|
966
|
+
}
|
|
967
|
+
openOnSelect(true);
|
|
347
968
|
};
|
|
348
969
|
watch(() => link.isActive?.value, (val) => {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
970
|
+
if (!val) {
|
|
971
|
+
return;
|
|
972
|
+
}
|
|
973
|
+
setActiveLink();
|
|
353
974
|
});
|
|
975
|
+
/*********************************************************
|
|
976
|
+
* Events
|
|
977
|
+
********************************************************/
|
|
354
978
|
const click = (e) => {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
979
|
+
emits("click", e);
|
|
980
|
+
if (isGroupActivator || !isClickable.value) return;
|
|
981
|
+
link.navigate?.(e);
|
|
982
|
+
if (props.value != null) {
|
|
983
|
+
select(!isSelected.value, e);
|
|
984
|
+
}
|
|
361
985
|
};
|
|
986
|
+
/*********************************************************
|
|
987
|
+
* Event handlers
|
|
988
|
+
********************************************************/
|
|
362
989
|
const handleClick = (e) => {
|
|
363
|
-
|
|
990
|
+
click(e);
|
|
364
991
|
};
|
|
992
|
+
/*********************************************************
|
|
993
|
+
* handleKeyDown (#439)
|
|
994
|
+
*
|
|
995
|
+
* @description
|
|
996
|
+
* `@keydown="isClickable && !isLink && handleKeyDown"` used to compile
|
|
997
|
+
* to `$event => (cond && _ctx.handleKeyDown)` — Vue's inline-statement
|
|
998
|
+
* form for anything more complex than a bare member expression. The
|
|
999
|
+
* expression EVALUATES `handleKeyDown` (a function reference) and
|
|
1000
|
+
* stops there; it never CALLS it.
|
|
1001
|
+
* @description
|
|
1002
|
+
* Root cause fixed at the binding (`@keydown="handleKeyDown"`, the one
|
|
1003
|
+
* form Vue auto-invokes with `$event`) — the guard moves in here,
|
|
1004
|
+
* where wrapping it in `&&`/`?:` again can't silently undo the fix
|
|
1005
|
+
* (see issue #439 / #397).
|
|
1006
|
+
********************************************************/
|
|
365
1007
|
const handleKeyDown = (e) => {
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
1008
|
+
if (!isClickable.value || isLink.value) return;
|
|
1009
|
+
if (e.key === KEYBOARD_VALUES.ENTER || e.key === " ") {
|
|
1010
|
+
e.preventDefault();
|
|
1011
|
+
click(e);
|
|
1012
|
+
}
|
|
371
1013
|
};
|
|
1014
|
+
/*********************************************************
|
|
1015
|
+
* Slots
|
|
1016
|
+
********************************************************/
|
|
372
1017
|
const slotProps = computed(() => {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
1018
|
+
return {
|
|
1019
|
+
isActive: isActive.value,
|
|
1020
|
+
select,
|
|
1021
|
+
isSelected: isSelected.value,
|
|
1022
|
+
isIndeterminate: isIndeterminate.value
|
|
1023
|
+
};
|
|
379
1024
|
});
|
|
380
1025
|
const hasTitle = computed(() => {
|
|
381
|
-
|
|
1026
|
+
return slots.title || props.title != null;
|
|
382
1027
|
});
|
|
383
1028
|
const hasSubtitle = computed(() => {
|
|
384
|
-
|
|
1029
|
+
return slots.subtitle || props.subtitle != null;
|
|
385
1030
|
});
|
|
386
1031
|
list?.updateHasPrepend(hasPrepend);
|
|
387
1032
|
list?.updateHasAppend(hasAppend);
|
|
388
1033
|
onBeforeMount(() => {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
1034
|
+
if (link.isActive?.value) {
|
|
1035
|
+
setActiveLink();
|
|
1036
|
+
}
|
|
392
1037
|
});
|
|
1038
|
+
/*********************************************************
|
|
1039
|
+
* Class & Style
|
|
1040
|
+
********************************************************/
|
|
393
1041
|
const listItemStyles = computed(() => {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
1042
|
+
return [
|
|
1043
|
+
dimensionStyles.value,
|
|
1044
|
+
borderStyles.value,
|
|
1045
|
+
colorStyles.value,
|
|
1046
|
+
paddingStyles.value,
|
|
1047
|
+
marginStyles.value,
|
|
1048
|
+
roundedStyles.value,
|
|
1049
|
+
props.style
|
|
1050
|
+
];
|
|
403
1051
|
});
|
|
404
1052
|
const listItemClasses = computed(() => {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
1053
|
+
return [
|
|
1054
|
+
"origam-list-item",
|
|
1055
|
+
{
|
|
1056
|
+
"origam-list-item--active": isActive.value,
|
|
1057
|
+
"origam-list-item--disabled": props.disabled,
|
|
1058
|
+
"origam-list-item--link": isClickable.value,
|
|
1059
|
+
"origam-list-item--nav": props.nav,
|
|
1060
|
+
"origam-list-item--prepend": !hasPrepend && list && list.hasPrepend.value,
|
|
1061
|
+
"origam-list-item--append": !hasAppend && list && list.hasAppend.value,
|
|
1062
|
+
"origam-list-item--slim": props.slim,
|
|
1063
|
+
[`${props.activeClass}`]: props.activeClass && isActive.value
|
|
1064
|
+
},
|
|
1065
|
+
colorClasses.value,
|
|
1066
|
+
borderClasses.value,
|
|
1067
|
+
densityClasses.value,
|
|
1068
|
+
sizeClasses.value,
|
|
1069
|
+
elevationClasses.value,
|
|
1070
|
+
lineClasses.value,
|
|
1071
|
+
roundedClasses.value,
|
|
1072
|
+
paddingClasses.value,
|
|
1073
|
+
marginClasses.value,
|
|
1074
|
+
props.class
|
|
1075
|
+
];
|
|
428
1076
|
});
|
|
1077
|
+
/*********************************************************
|
|
1078
|
+
* useStyle
|
|
1079
|
+
*
|
|
1080
|
+
* @description
|
|
1081
|
+
* #375 — the template used to write `:id="props.id"` explicitly,
|
|
1082
|
+
* because the bare name `id` is ALREADY a local (the nested-item
|
|
1083
|
+
* registration key computed above from `value`/`href` — DO NOT feed
|
|
1084
|
+
* `props.id` into that one, `useNestedItem` uses it synchronously as
|
|
1085
|
+
* a Map key, see #372/#442).
|
|
1086
|
+
* @description
|
|
1087
|
+
* Renaming this SEPARATE `useStyle` local to `styleId` and seeding it
|
|
1088
|
+
* with `() => props.id` gives the template an unambiguous,
|
|
1089
|
+
* rule-compliant binding (`:id="styleId"`) without touching the
|
|
1090
|
+
* registration identity at all.
|
|
1091
|
+
********************************************************/
|
|
429
1092
|
const { id: styleId, css, load, isLoaded, unload } = useStyle(listItemStyles, () => props.id);
|
|
1093
|
+
/*********************************************************
|
|
1094
|
+
* Expose
|
|
1095
|
+
********************************************************/
|
|
430
1096
|
defineExpose({
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
1097
|
+
isGroupActivator,
|
|
1098
|
+
isSelected,
|
|
1099
|
+
list,
|
|
1100
|
+
select,
|
|
1101
|
+
filterProps,
|
|
1102
|
+
css,
|
|
1103
|
+
id,
|
|
1104
|
+
load,
|
|
1105
|
+
unload,
|
|
1106
|
+
isLoaded,
|
|
1107
|
+
styleId
|
|
442
1108
|
});
|
|
443
1109
|
</script>
|
|
444
1110
|
|