origam 2.41.0 → 2.42.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 +103 -0
- package/dist/src/assets/locales/en.json +10 -1
- package/dist/src/assets/locales/fr.json +10 -1
- package/dist/src/components/Alert/OrigamAlert.vue +1 -2
- package/dist/src/components/Audio/OrigamAudio.vue +15 -14
- package/dist/src/components/Badge/OrigamBadge.vue +6 -1
- package/dist/src/components/Bracket/OrigamBracket.vue +5 -5
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbDivider.vue +1 -2
- package/dist/src/components/Btn/OrigamBtn.vue +71 -27
- package/dist/src/components/Card/OrigamCard.vue +2 -1
- package/dist/src/components/Carousel/OrigamCarousel.vue +14 -13
- package/dist/src/components/Chart/OrigamChartBullet.vue +4 -1
- package/dist/src/components/Chart/OrigamChartPictorial.vue +3 -6
- package/dist/src/components/Chart/OrigamChartPolar.vue +2 -1
- package/dist/src/components/Chart/OrigamChartPolarBar.vue +3 -1
- package/dist/src/components/Chart/OrigamChartSankey.vue +9 -167
- package/dist/src/components/Chart/OrigamChartStreamgraph.vue +14 -12
- package/dist/src/components/Chart/OrigamChartSunburst.vue +10 -2
- package/dist/src/components/Chart/OrigamChartWordCloud.vue +39 -36
- package/dist/src/components/Checkbox/OrigamCheckboxBtn.vue +3 -4
- package/dist/src/components/Chip/OrigamChip.vue +14 -15
- package/dist/src/components/Chip/OrigamChipGroup.vue +2 -3
- package/dist/src/components/Clipboard/OrigamClipboard.vue +1 -1
- package/dist/src/components/Code/OrigamCode.vue +4 -2
- package/dist/src/components/ColorPicker/OrigamColorPicker.vue +5 -1
- package/dist/src/components/ColorPicker/OrigamColorPickerEdit.vue +1 -2
- package/dist/src/components/ColorPicker/OrigamColorPickerPreview.vue +1 -2
- package/dist/src/components/ColorPicker/OrigamColorPickerSwatches.vue +1 -2
- package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +6 -2
- package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +2 -4
- package/dist/src/components/Counter/OrigamCounter.vue +1 -0
- package/dist/src/components/DataTable/OrigamDataTable.vue +2 -3
- package/dist/src/components/DataTable/OrigamDataTableGroupHeaderRow.vue +1 -2
- package/dist/src/components/DataTable/OrigamDataTableHeadersCellMobile.vue +3 -2
- package/dist/src/components/DataTable/OrigamDataTableRow.vue +2 -3
- package/dist/src/components/DataTable/OrigamDataTableRows.vue +43 -39
- package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +3 -4
- package/dist/src/components/DatePicker/OrigamDatePickerMonth.vue +1 -1
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +1 -2
- package/dist/src/components/Dialog/OrigamDialog.vue +1 -2
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +2 -3
- package/dist/src/components/Field/OrigamField.vue +2 -6
- package/dist/src/components/FileField/OrigamFileField.vue +23 -6
- package/dist/src/components/FileField/OrigamFileFieldDragNDropItem.vue +3 -4
- package/dist/src/components/FileField/OrigamFileFieldListItem.vue +3 -4
- package/dist/src/components/Form/OrigamForm.vue +0 -2
- package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +7 -7
- package/dist/src/components/Input/OrigamInput.vue +3 -11
- package/dist/src/components/List/OrigamListGroup.vue +2 -3
- package/dist/src/components/List/OrigamListItem.vue +11 -5
- package/dist/src/components/Media/OrigamMediaController.vue +12 -13
- package/dist/src/components/Media/OrigamMediaScrubber.vue +15 -12
- package/dist/src/components/Media/OrigamMediaVolumeControl.vue +4 -5
- package/dist/src/components/Menu/OrigamMenu.vue +1 -2
- package/dist/src/components/NumberField/OrigamNumberField.vue +7 -10
- package/dist/src/components/NumberFormat/OrigamNumberFormat.vue +7 -1
- package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +1 -1
- package/dist/src/components/Pagination/OrigamPagination.vue +4 -5
- package/dist/src/components/Parallax/OrigamParallaxElement.vue +1 -4
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +37 -15
- package/dist/src/components/Progress/OrigamProgressLinear.vue +7 -6
- package/dist/src/components/Radio/OrigamRadio.vue +5 -2
- package/dist/src/components/Radio/OrigamRadioBtn.vue +7 -5
- package/dist/src/components/RatingField/OrigamRatingField.vue +1 -2
- package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +2 -3
- package/dist/src/components/Select/OrigamSelect.vue +174 -107
- package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +7 -2
- package/dist/src/components/Slide/OrigamSlideGroup.vue +7 -10
- package/dist/src/components/SliderField/OrigamSliderField.vue +1 -2
- package/dist/src/components/Snackbar/OrigamSnackbarItem.vue +9 -10
- package/dist/src/components/Stepper/OrigamStepper.vue +7 -11
- package/dist/src/components/Stepper/OrigamStepperItem.vue +2 -3
- package/dist/src/components/Switch/OrigamSwitch.vue +0 -9
- package/dist/src/components/Tabs/OrigamTabs.vue +1 -1
- package/dist/src/components/TextField/OrigamTextField.vue +2 -5
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +3 -2
- package/dist/src/components/TextareaField/OrigamTextareaFieldRichToolbar.vue +13 -14
- package/dist/src/components/Transition/OrigamExpandX.vue +4 -10
- package/dist/src/components/Transition/OrigamExpandY.vue +4 -10
- package/dist/src/components/Transition/OrigamSnack.vue +2 -8
- package/dist/src/components/Treeview/OrigamTreeviewNode.vue +24 -18
- package/dist/src/components/Video/OrigamVideo.vue +14 -19
- package/dist/src/components/Window/OrigamWindow.vue +2 -3
- package/dist/src/composables/Audio/use-waveform.composable.cjs +24 -19
- package/dist/src/composables/Audio/use-waveform.composable.js +24 -19
- package/dist/src/composables/Calendar/calendar.composable.cjs +11 -11
- package/dist/src/composables/Calendar/calendar.composable.js +1 -1
- package/dist/src/composables/Chart/chart.composable.cjs +541 -415
- package/dist/src/composables/Chart/chart.composable.d.ts +2 -5
- package/dist/src/composables/Chart/chart.composable.js +392 -338
- package/dist/src/composables/Code/code.composable.cjs +4 -4
- package/dist/src/composables/Code/code.composable.js +1 -1
- package/dist/src/composables/Commons/color.composable.cjs +106 -48
- package/dist/src/composables/Commons/color.composable.js +55 -48
- package/dist/src/composables/Commons/display.composable.cjs +7 -1
- package/dist/src/composables/Commons/display.composable.js +2 -2
- package/dist/src/composables/Commons/dragResizer.composable.cjs +11 -10
- package/dist/src/composables/Commons/dragResizer.composable.js +2 -1
- package/dist/src/composables/Commons/group.composable.cjs +17 -14
- package/dist/src/composables/Commons/group.composable.js +19 -15
- package/dist/src/composables/Commons/nested.composable.cjs +16 -16
- package/dist/src/composables/Commons/nested.composable.d.ts +1 -1
- package/dist/src/composables/Commons/nested.composable.js +1 -1
- package/dist/src/composables/Commons/nestedItem.composable.cjs +3 -3
- package/dist/src/composables/Commons/nestedItem.composable.d.ts +1 -1
- package/dist/src/composables/Commons/nestedItem.composable.js +1 -1
- package/dist/src/composables/Commons/size.composable.cjs +1 -1
- package/dist/src/composables/Commons/size.composable.js +1 -1
- package/dist/src/composables/Commons/stateEffect.composable.cjs +54 -32
- package/dist/src/composables/Commons/stateEffect.composable.js +43 -33
- package/dist/src/composables/Commons/teleport.composable.cjs +2 -1
- package/dist/src/composables/Commons/teleport.composable.js +4 -1
- package/dist/src/composables/Commons/touch.composable.cjs +77 -33
- package/dist/src/composables/Commons/touch.composable.js +77 -33
- package/dist/src/composables/Commons/vModel.composable.cjs +1 -1
- package/dist/src/composables/Commons/vModel.composable.js +1 -1
- package/dist/src/composables/Commons/validation.composable.cjs +1 -1
- package/dist/src/composables/Commons/validation.composable.js +1 -1
- package/dist/src/composables/Commons/velocity.composable.cjs +5 -1
- package/dist/src/composables/Commons/velocity.composable.js +5 -1
- package/dist/src/composables/DataTable/headers.composable.cjs +36 -30
- package/dist/src/composables/DataTable/headers.composable.d.ts +1 -1
- package/dist/src/composables/DataTable/headers.composable.js +29 -23
- package/dist/src/composables/DataTable/headersCell.composable.cjs +2 -2
- package/dist/src/composables/DataTable/headersCell.composable.js +1 -1
- package/dist/src/composables/DataTable/select.composable.cjs +4 -4
- package/dist/src/composables/DataTable/select.composable.js +1 -1
- package/dist/src/composables/DataTable/sort.composable.cjs +6 -6
- package/dist/src/composables/DataTable/sort.composable.js +1 -1
- package/dist/src/composables/Form/form.composable.cjs +1 -1
- package/dist/src/composables/Form/form.composable.js +3 -1
- package/dist/src/composables/Masonry/masonry.composable.cjs +29 -20
- package/dist/src/composables/Masonry/masonry.composable.d.ts +0 -14
- package/dist/src/composables/Masonry/masonry.composable.js +29 -20
- package/dist/src/composables/NumberFormat/number-format.composable.cjs +28 -23
- package/dist/src/composables/NumberFormat/number-format.composable.js +28 -23
- package/dist/src/composables/Parallax/parallax.composable.cjs +9 -9
- package/dist/src/composables/Parallax/parallax.composable.js +3 -3
- package/dist/src/composables/Parallax/transform.composable.cjs +14 -13
- package/dist/src/composables/Parallax/transform.composable.js +2 -1
- package/dist/src/composables/PasswordField/passwordStrength.composable.cjs +2 -2
- package/dist/src/composables/PasswordField/passwordStrength.composable.js +1 -1
- package/dist/src/composables/QrCode/qr-code.composable.cjs +1 -1
- package/dist/src/composables/QrCode/qr-code.composable.js +1 -1
- package/dist/src/composables/Sheet/sheetSwipe.composable.cjs +3 -4
- package/dist/src/composables/Sheet/sheetSwipe.composable.js +4 -4
- package/dist/src/composables/TextareaField/textarea-field-rich.composable.cjs +31 -31
- package/dist/src/composables/TextareaField/textarea-field-rich.composable.js +1 -1
- package/dist/src/composables/Watermark/watermark.composable.cjs +1 -1
- package/dist/src/composables/Watermark/watermark.composable.js +1 -1
- package/dist/src/consts/Audio/audio.const.cjs +5 -4
- package/dist/src/consts/Audio/audio.const.d.ts +2 -1
- package/dist/src/consts/Audio/audio.const.js +2 -1
- package/dist/src/consts/Blockquote/blockquote.const.cjs +3 -3
- package/dist/src/consts/Blockquote/blockquote.const.js +1 -1
- package/dist/src/consts/Bracket/bracket.const.cjs +4 -3
- package/dist/src/consts/Bracket/bracket.const.js +2 -1
- package/dist/src/consts/Code/code.const.cjs +3 -3
- package/dist/src/consts/Code/code.const.d.ts +1 -1
- package/dist/src/consts/Code/code.const.js +1 -1
- package/dist/src/consts/Commons/autocomplete.const.cjs +2 -2
- package/dist/src/consts/Commons/autocomplete.const.d.ts +1 -1
- package/dist/src/consts/Commons/autocomplete.const.js +1 -1
- package/dist/src/consts/Commons/display.const.cjs +2 -2
- package/dist/src/consts/Commons/display.const.js +1 -1
- package/dist/src/consts/Commons/hotkey.const.cjs +2 -2
- package/dist/src/consts/Commons/hotkey.const.js +1 -1
- package/dist/src/consts/Commons/margin.const.cjs +1 -1
- package/dist/src/consts/Commons/margin.const.js +1 -1
- package/dist/src/consts/Commons/padding.const.cjs +1 -1
- package/dist/src/consts/Commons/padding.const.js +1 -1
- package/dist/src/consts/Commons/rounded.const.cjs +6 -2
- package/dist/src/consts/Commons/rounded.const.js +6 -2
- package/dist/src/consts/EmptyState/empty-state.const.cjs +12 -12
- package/dist/src/consts/EmptyState/empty-state.const.js +6 -6
- package/dist/src/consts/PasswordField/password-field.const.cjs +20 -11
- package/dist/src/consts/PasswordField/password-field.const.d.ts +10 -5
- package/dist/src/consts/PasswordField/password-field.const.js +17 -10
- package/dist/src/consts/QrCode/qr-code.const.cjs +2 -2
- package/dist/src/consts/QrCode/qr-code.const.js +1 -1
- package/dist/src/consts/TextField/text-field.const.cjs +21 -21
- package/dist/src/consts/TextField/text-field.const.js +1 -1
- package/dist/src/consts/TextareaField/textarea-field.const.cjs +32 -4
- package/dist/src/consts/TextareaField/textarea-field.const.d.ts +1 -0
- package/dist/src/consts/TextareaField/textarea-field.const.js +29 -1
- package/dist/src/directives/Contrast/contrast.directive.cjs +5 -3
- package/dist/src/directives/Contrast/contrast.directive.js +5 -3
- package/dist/src/directives/Intersect/intersect.directive.cjs +2 -1
- package/dist/src/directives/Intersect/intersect.directive.js +2 -1
- package/dist/src/interfaces/Chart/chart.interface.d.ts +70 -1
- package/dist/src/interfaces/ColorPicker/color-picker.interface.d.ts +1 -1
- package/dist/src/interfaces/Commons/border.interface.d.ts +11 -10
- package/dist/src/interfaces/Commons/filters.interface.d.ts +7 -0
- package/dist/src/interfaces/Commons/margin.interface.d.ts +12 -11
- package/dist/src/interfaces/Commons/padding.interface.d.ts +12 -11
- package/dist/src/interfaces/Commons/ripple.interface.d.ts +1 -3
- package/dist/src/interfaces/Commons/rounded.interface.d.ts +10 -9
- package/dist/src/interfaces/DataTable/sort.interface.d.ts +6 -0
- package/dist/src/interfaces/Grid/grid.interface.d.ts +4 -4
- package/dist/src/interfaces/PasswordField/password-field.interface.d.ts +5 -1
- package/dist/src/interfaces/PasswordField/password-requirement.interface.d.ts +8 -0
- package/dist/src/interfaces/Radio/radio-btn.interface.d.ts +2 -2
- package/dist/src/interfaces/Radio/radio.interface.d.ts +2 -1
- package/dist/src/interfaces/Select/select.interface.d.ts +1 -0
- package/dist/src/interfaces/SelectionControl/selection-control.interface.d.ts +5 -1
- package/dist/src/interfaces/SliderField/slider-field.interface.d.ts +4 -4
- package/dist/src/origam-core.cjs +51 -33
- package/dist/src/origam-core.js +21 -27
- package/dist/src/types/Commons/box-value.type.cjs +1 -0
- package/dist/src/types/Commons/box-value.type.d.ts +1 -0
- package/dist/src/types/Commons/box-value.type.js +0 -0
- package/dist/src/types/Commons/location.type.d.ts +13 -0
- package/dist/src/types/Commons/point.type.d.ts +1 -1
- package/dist/src/types/DataTable/data-table.type.d.ts +1 -0
- package/dist/src/types/Grid/grid.type.d.ts +7 -0
- package/dist/src/types/SliderField/slider-field.type.d.ts +8 -0
- package/dist/src/utils/Bracket/bracket-surface.util.cjs +9 -2
- package/dist/src/utils/Bracket/bracket-surface.util.js +9 -2
- package/dist/src/utils/Calendar/rrule.util.cjs +12 -7
- package/dist/src/utils/Calendar/rrule.util.js +12 -7
- package/dist/src/utils/Chart/chart-point.util.cjs +15 -0
- package/dist/src/utils/Chart/chart-point.util.d.ts +11 -0
- package/dist/src/utils/Chart/chart-point.util.js +8 -0
- package/dist/src/utils/Chart/sankey-layout.util.cjs +144 -0
- package/dist/src/utils/Chart/sankey-layout.util.d.ts +27 -0
- package/dist/src/utils/Chart/sankey-layout.util.js +130 -0
- package/dist/src/utils/Code/parse-highlight-lines.util.cjs +17 -14
- package/dist/src/utils/Code/parse-highlight-lines.util.js +17 -14
- package/dist/src/utils/CommandPalette/fuzzy-match.util.cjs +13 -9
- package/dist/src/utils/CommandPalette/fuzzy-match.util.js +13 -9
- package/dist/src/utils/Commons/anchor.util.cjs +6 -1
- package/dist/src/utils/Commons/anchor.util.js +6 -1
- package/dist/src/utils/Commons/apply-mask.util.cjs +11 -14
- package/dist/src/utils/Commons/apply-mask.util.js +7 -10
- package/dist/src/utils/Commons/apply-theme.util.cjs +6 -4
- package/dist/src/utils/Commons/apply-theme.util.js +6 -4
- package/dist/src/utils/Commons/bindProps.util.cjs +3 -5
- package/dist/src/utils/Commons/bindProps.util.js +3 -5
- package/dist/src/utils/Commons/color.util.cjs +43 -36
- package/dist/src/utils/Commons/color.util.js +44 -31
- package/dist/src/utils/Commons/commons.util.cjs +3 -3
- package/dist/src/utils/Commons/commons.util.js +3 -3
- package/dist/src/utils/Commons/console.util.cjs +6 -0
- package/dist/src/utils/Commons/console.util.d.ts +11 -0
- package/dist/src/utils/Commons/console.util.js +5 -0
- package/dist/src/utils/Commons/date.util.cjs +2 -27
- package/dist/src/utils/Commons/date.util.js +2 -27
- package/dist/src/utils/Commons/display.util.cjs +10 -1
- package/dist/src/utils/Commons/display.util.d.ts +8 -1
- package/dist/src/utils/Commons/display.util.js +9 -1
- package/dist/src/utils/Commons/eventListener.util.cjs +1 -2
- package/dist/src/utils/Commons/eventListener.util.js +1 -2
- package/dist/src/utils/Commons/filters.util.cjs +48 -34
- package/dist/src/utils/Commons/filters.util.d.ts +3 -8
- package/dist/src/utils/Commons/filters.util.js +47 -34
- package/dist/src/utils/Commons/forwardRefs.util.cjs +44 -40
- package/dist/src/utils/Commons/forwardRefs.util.js +44 -40
- package/dist/src/utils/Commons/group.util.cjs +1 -1
- package/dist/src/utils/Commons/group.util.js +1 -1
- package/dist/src/utils/Commons/hotkey.util.cjs +65 -61
- package/dist/src/utils/Commons/hotkey.util.js +56 -53
- package/dist/src/utils/Commons/hover.util.cjs +2 -2
- package/dist/src/utils/Commons/hover.util.js +2 -2
- package/dist/src/utils/Commons/locale.util.cjs +1 -1
- package/dist/src/utils/Commons/locale.util.js +1 -1
- package/dist/src/utils/Commons/location.util.cjs +87 -92
- package/dist/src/utils/Commons/location.util.js +75 -83
- package/dist/src/utils/Commons/nested.util.cjs +11 -11
- package/dist/src/utils/Commons/nested.util.js +1 -1
- package/dist/src/utils/Commons/point.util.cjs +16 -14
- package/dist/src/utils/Commons/point.util.js +13 -8
- package/dist/src/utils/Commons/ripple.util.cjs +4 -4
- package/dist/src/utils/Commons/ripple.util.js +4 -4
- package/dist/src/utils/Commons/scroll.util.cjs +9 -6
- package/dist/src/utils/Commons/scroll.util.js +9 -6
- package/dist/src/utils/Commons/token-name.util.cjs +22 -21
- package/dist/src/utils/Commons/token-name.util.js +22 -21
- package/dist/src/utils/Commons/validate-pattern.util.cjs +6 -6
- package/dist/src/utils/Commons/validate-pattern.util.js +1 -1
- package/dist/src/utils/DataTable/headers.util.cjs +20 -26
- package/dist/src/utils/DataTable/headers.util.js +18 -26
- package/dist/src/utils/DataTable/sort.util.cjs +41 -47
- package/dist/src/utils/DataTable/sort.util.d.ts +2 -7
- package/dist/src/utils/DataTable/sort.util.js +49 -47
- package/dist/src/utils/List/list-item.util.cjs +6 -1
- package/dist/src/utils/List/list-item.util.js +6 -1
- package/dist/src/utils/Parallax/parallax-element.util.cjs +13 -14
- package/dist/src/utils/Parallax/parallax-element.util.js +10 -11
- package/dist/src/utils/Slide/slide-group.util.cjs +4 -4
- package/dist/src/utils/Slide/slide-group.util.js +4 -4
- package/dist/src/utils/TextareaField/html-to-markdown.util.cjs +5 -36
- package/dist/src/utils/TextareaField/html-to-markdown.util.js +5 -36
- package/dist/src/utils/TextareaField/sanitize-html.util.cjs +18 -22
- package/dist/src/utils/TextareaField/sanitize-html.util.js +19 -23
- 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 +1 -1
|
@@ -121,7 +121,16 @@
|
|
|
121
121
|
renderless
|
|
122
122
|
>
|
|
123
123
|
<template #item.renderless="{item, index, itemRef}">
|
|
124
|
+
<origam-divider
|
|
125
|
+
v-if="isDivider(item)"
|
|
126
|
+
v-bind="item.props"
|
|
127
|
+
/>
|
|
128
|
+
<origam-list-subheader
|
|
129
|
+
v-else-if="isSubheader(item)"
|
|
130
|
+
v-bind="item.props"
|
|
131
|
+
/>
|
|
124
132
|
<slot
|
|
133
|
+
v-else
|
|
125
134
|
name="item"
|
|
126
135
|
v-bind="{item, index, props: menuListItemProps(item, itemRef, index)}"
|
|
127
136
|
>
|
|
@@ -272,10 +281,12 @@ import { computed, getCurrentInstance, inject, mergeProps, nextTick, onBeforeUnm
|
|
|
272
281
|
import OrigamAvatar from "../Avatar/OrigamAvatar.vue";
|
|
273
282
|
import OrigamCheckboxBtn from "../Checkbox/OrigamCheckboxBtn.vue";
|
|
274
283
|
import OrigamChip from "../Chip/OrigamChip.vue";
|
|
284
|
+
import OrigamDivider from "../Divider/OrigamDivider.vue";
|
|
275
285
|
import OrigamExpandY from "../Transition/OrigamExpandY.vue";
|
|
276
286
|
import OrigamIcon from "../Icon/OrigamIcon.vue";
|
|
277
287
|
import OrigamList from "../List/OrigamList.vue";
|
|
278
288
|
import OrigamListItem from "../List/OrigamListItem.vue";
|
|
289
|
+
import OrigamListSubheader from "../List/OrigamListSubheader.vue";
|
|
279
290
|
import OrigamMenu from "../Menu/OrigamMenu.vue";
|
|
280
291
|
import OrigamTextField from "../TextField/OrigamTextField.vue";
|
|
281
292
|
import OrigamTranslateScale from "../Transition/OrigamTranslateScale.vue";
|
|
@@ -297,7 +308,7 @@ import { DENSITY } from "../../enums/Commons/density.enum";
|
|
|
297
308
|
import { DIRECTION } from "../../enums/Commons/direction.enum";
|
|
298
309
|
import { FILTERS_MODE } from "../../enums/Commons/filters.enum";
|
|
299
310
|
import { KEYBOARD_VALUES } from "../../enums/Commons/hotkey.enum";
|
|
300
|
-
import {
|
|
311
|
+
import { LIST_ITEM_TYPE } from "../../enums/List/list-item.enum";
|
|
301
312
|
import { SELECT_STRATEGY } from "../../enums/Commons/nested.enum";
|
|
302
313
|
import { SIZES } from "../../enums/Commons/size.enum";
|
|
303
314
|
import { TEXT_FIELD_TYPE } from "../../enums/TextField/text-field.enum";
|
|
@@ -331,6 +342,11 @@ const props = defineProps({
|
|
|
331
342
|
type: Object,
|
|
332
343
|
required: false
|
|
333
344
|
},
|
|
345
|
+
itemType: {
|
|
346
|
+
type: String,
|
|
347
|
+
required: false,
|
|
348
|
+
default: "type"
|
|
349
|
+
},
|
|
334
350
|
menu: {
|
|
335
351
|
type: Boolean,
|
|
336
352
|
required: false
|
|
@@ -338,7 +354,7 @@ const props = defineProps({
|
|
|
338
354
|
menuIcon: {
|
|
339
355
|
type: null,
|
|
340
356
|
required: false,
|
|
341
|
-
default:
|
|
357
|
+
default: "mdi:mdi-chevron-down"
|
|
342
358
|
},
|
|
343
359
|
menuProps: {
|
|
344
360
|
type: Object,
|
|
@@ -1380,11 +1396,24 @@ let keyboardLookupLastTime;
|
|
|
1380
1396
|
const listHasFocus = shallowRef(false);
|
|
1381
1397
|
const selectionIndex = shallowRef(-1);
|
|
1382
1398
|
const isSelecting = shallowRef(false);
|
|
1399
|
+
/*********************************************************
|
|
1400
|
+
* Structural rows (#1426)
|
|
1401
|
+
*
|
|
1402
|
+
* @description
|
|
1403
|
+
* `subheader` / `divider` entries are structure, not options: same
|
|
1404
|
+
* discriminant as `OrigamListChildren` (`item.type`, read through the
|
|
1405
|
+
* `itemType` prop). They are dropped while searching (a header title
|
|
1406
|
+
* would match the query) and stepped over by the arrow keys, Home/End.
|
|
1407
|
+
********************************************************/
|
|
1408
|
+
const isDivider = (item) => item.type === LIST_ITEM_TYPE.DIVIDER;
|
|
1409
|
+
const isSubheader = (item) => item.type === LIST_ITEM_TYPE.SUBHEADER;
|
|
1410
|
+
const isStructural = (item) => isDivider(item) || isSubheader(item);
|
|
1383
1411
|
const displayItems = computed(() => {
|
|
1412
|
+
let result = isPristine.value ? filteredItems.value : filteredItems.value.filter((item) => !isStructural(item));
|
|
1384
1413
|
if (props.hideSelected) {
|
|
1385
|
-
|
|
1414
|
+
result = result.filter((filteredItem) => !model.value.some((s) => s.value === filteredItem.value));
|
|
1386
1415
|
}
|
|
1387
|
-
return
|
|
1416
|
+
return result;
|
|
1388
1417
|
});
|
|
1389
1418
|
const menuDisabled = computed(() => {
|
|
1390
1419
|
return props.hideNoData && !displayItems.value.length || props.readonly || form?.isReadonly.value;
|
|
@@ -1542,31 +1571,37 @@ onBeforeUnmount(() => {
|
|
|
1542
1571
|
/*********************************************************
|
|
1543
1572
|
* Event handlers
|
|
1544
1573
|
********************************************************/
|
|
1574
|
+
const handleSelectMultiple = (item, set) => {
|
|
1575
|
+
const index = model.value.findIndex((selection) => props.valueComparator ? props.valueComparator(selection.value, item.value) : deepEqual(selection.value, item.value));
|
|
1576
|
+
const add = set == null ? !~index : set;
|
|
1577
|
+
if (~index) {
|
|
1578
|
+
const value = add ? [...model.value, item] : [...model.value];
|
|
1579
|
+
value.splice(index, 1);
|
|
1580
|
+
model.value = value;
|
|
1581
|
+
} else if (add) {
|
|
1582
|
+
model.value = [...model.value, item];
|
|
1583
|
+
}
|
|
1584
|
+
if (props.clearOnSelect && props.autocomplete) {
|
|
1585
|
+
search.value = "";
|
|
1586
|
+
}
|
|
1587
|
+
};
|
|
1588
|
+
const handleSelectSingle = (item, set) => {
|
|
1589
|
+
const add = set !== false;
|
|
1590
|
+
model.value = add ? [item] : [];
|
|
1591
|
+
if (props.autocomplete) {
|
|
1592
|
+
search.value = add ? item.title : "";
|
|
1593
|
+
}
|
|
1594
|
+
nextTick(() => {
|
|
1595
|
+
menu.value = false;
|
|
1596
|
+
isPristine.value = true;
|
|
1597
|
+
});
|
|
1598
|
+
};
|
|
1545
1599
|
const handleSelect = (item, set = true) => {
|
|
1546
1600
|
if (item.props?.disabled) return;
|
|
1547
1601
|
if (props.multiple) {
|
|
1548
|
-
|
|
1549
|
-
const add = set == null ? !~index : set;
|
|
1550
|
-
if (~index) {
|
|
1551
|
-
const value = add ? [...model.value, item] : [...model.value];
|
|
1552
|
-
value.splice(index, 1);
|
|
1553
|
-
model.value = value;
|
|
1554
|
-
} else if (add) {
|
|
1555
|
-
model.value = [...model.value, item];
|
|
1556
|
-
}
|
|
1557
|
-
if (props.clearOnSelect && props.autocomplete) {
|
|
1558
|
-
search.value = "";
|
|
1559
|
-
}
|
|
1602
|
+
handleSelectMultiple(item, set);
|
|
1560
1603
|
} else {
|
|
1561
|
-
|
|
1562
|
-
model.value = add ? [item] : [];
|
|
1563
|
-
if (props.autocomplete) {
|
|
1564
|
-
search.value = add ? item.title : "";
|
|
1565
|
-
}
|
|
1566
|
-
nextTick(() => {
|
|
1567
|
-
menu.value = false;
|
|
1568
|
-
isPristine.value = true;
|
|
1569
|
-
});
|
|
1604
|
+
handleSelectSingle(item, set);
|
|
1570
1605
|
}
|
|
1571
1606
|
};
|
|
1572
1607
|
const handleClear = (e) => {
|
|
@@ -1657,6 +1692,116 @@ const handleMousedownMenuIcon = (e) => {
|
|
|
1657
1692
|
// click double-toggles (icon → open, control → close again) because
|
|
1658
1693
|
// stopPropagation is only called after the first focus is set.
|
|
1659
1694
|
};
|
|
1695
|
+
/*********************************************************
|
|
1696
|
+
* Keyboard handling — split by concern (#1398). The helpers below keep
|
|
1697
|
+
* the exact evaluation order of the former single `handleKeydown`; the
|
|
1698
|
+
* `length` / `selectionStart` snapshots are taken once, up front, and
|
|
1699
|
+
* passed down.
|
|
1700
|
+
********************************************************/
|
|
1701
|
+
// WAI-ARIA combobox: highlight navigation stays on the <input>.
|
|
1702
|
+
// DOM focus never leaves the input — only aria-activedescendant changes.
|
|
1703
|
+
// Returns true when Enter selected the highlighted item (stop handling).
|
|
1704
|
+
const handleHighlightNavigation = (e) => {
|
|
1705
|
+
const itemCount = displayItems.value.length;
|
|
1706
|
+
if (!menu.value || itemCount <= 0) return false;
|
|
1707
|
+
const step = (from, dir) => {
|
|
1708
|
+
for (let n = 1; n <= itemCount; n++) {
|
|
1709
|
+
const i = ((from + dir * n) % itemCount + itemCount) % itemCount;
|
|
1710
|
+
if (!isStructural(displayItems.value[i])) return i;
|
|
1711
|
+
}
|
|
1712
|
+
return -1;
|
|
1713
|
+
};
|
|
1714
|
+
if (e.key === KEYBOARD_VALUES.DOWN) {
|
|
1715
|
+
highlightIndex.value = step(highlightIndex.value, 1);
|
|
1716
|
+
} else if (e.key === KEYBOARD_VALUES.UP) {
|
|
1717
|
+
highlightIndex.value = step(highlightIndex.value < 0 ? 0 : highlightIndex.value, -1);
|
|
1718
|
+
} else if (e.key === KEYBOARD_VALUES.HOME) {
|
|
1719
|
+
highlightIndex.value = step(-1, 1);
|
|
1720
|
+
} else if (e.key === KEYBOARD_VALUES.END) {
|
|
1721
|
+
highlightIndex.value = step(0, -1);
|
|
1722
|
+
} else if (e.key === KEYBOARD_VALUES.ENTER && highlightIndex.value >= 0) {
|
|
1723
|
+
handleSelect(displayItems.value[highlightIndex.value], null);
|
|
1724
|
+
highlightIndex.value = -1;
|
|
1725
|
+
return true;
|
|
1726
|
+
}
|
|
1727
|
+
return false;
|
|
1728
|
+
};
|
|
1729
|
+
// Backspace / Delete in autocomplete mode. Returns true when it removed the
|
|
1730
|
+
// single selection (the caller stops handling the key).
|
|
1731
|
+
const handleAutocompleteBack = (e, length) => {
|
|
1732
|
+
if (!props.multiple && model.value.length > 0 && !search.value) {
|
|
1733
|
+
handleSelect(model.value[0], false);
|
|
1734
|
+
return true;
|
|
1735
|
+
}
|
|
1736
|
+
if (~selectionIndex.value) {
|
|
1737
|
+
const originalSelectionIndex = selectionIndex.value;
|
|
1738
|
+
handleSelect(model.value[selectionIndex.value], false);
|
|
1739
|
+
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
1740
|
+
} else if (e.key === KEYBOARD_VALUES.BACKSPACE && !search.value) {
|
|
1741
|
+
selectionIndex.value = length - 1;
|
|
1742
|
+
}
|
|
1743
|
+
return false;
|
|
1744
|
+
};
|
|
1745
|
+
const handleSelectionLeft = (selectionStart, length) => {
|
|
1746
|
+
if (selectionIndex.value < 0 && (selectionStart ?? 0) > 0) return;
|
|
1747
|
+
const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;
|
|
1748
|
+
if (model.value[prev]) {
|
|
1749
|
+
selectionIndex.value = prev;
|
|
1750
|
+
} else {
|
|
1751
|
+
selectionIndex.value = -1;
|
|
1752
|
+
origamTextFieldRef.value?.setSelectionRange(search.value?.length ?? null, search.value?.length ?? null);
|
|
1753
|
+
}
|
|
1754
|
+
};
|
|
1755
|
+
const handleSelectionRight = () => {
|
|
1756
|
+
if (selectionIndex.value < 0) return;
|
|
1757
|
+
const next = selectionIndex.value + 1;
|
|
1758
|
+
if (model.value[next]) {
|
|
1759
|
+
selectionIndex.value = next;
|
|
1760
|
+
} else {
|
|
1761
|
+
selectionIndex.value = -1;
|
|
1762
|
+
origamTextFieldRef.value?.setSelectionRange(0, 0);
|
|
1763
|
+
}
|
|
1764
|
+
};
|
|
1765
|
+
const handleAutocompleteKeydown = (e, selectionStart, length) => {
|
|
1766
|
+
const keyAutocompleteEnter = [KEYBOARD_VALUES.ENTER, KEYBOARD_VALUES.TAB];
|
|
1767
|
+
if (highlightFirst.value && keyAutocompleteEnter.includes(e.key)) {
|
|
1768
|
+
handleSelect(displayItems.value[0]);
|
|
1769
|
+
}
|
|
1770
|
+
if (e.key === KEYBOARD_VALUES.DOWN && highlightFirst.value) {
|
|
1771
|
+
origamListRef.value?.focus("next");
|
|
1772
|
+
}
|
|
1773
|
+
const keyBack = [KEYBOARD_VALUES.BACKSPACE, KEYBOARD_VALUES.DELETE];
|
|
1774
|
+
if (keyBack.includes(e.key) && handleAutocompleteBack(e, length)) return;
|
|
1775
|
+
if (!props.multiple) return;
|
|
1776
|
+
if (e.key === KEYBOARD_VALUES.LEFT) handleSelectionLeft(selectionStart, length);
|
|
1777
|
+
if (e.key === KEYBOARD_VALUES.RIGHT) handleSelectionRight();
|
|
1778
|
+
};
|
|
1779
|
+
const handleTypeAheadKeydown = (e) => {
|
|
1780
|
+
// html select hotkeys
|
|
1781
|
+
const KEYBOARD_LOOKUP_THRESHOLD = 1e3;
|
|
1782
|
+
const checkPrintable = (e) => {
|
|
1783
|
+
const isPrintableChar = e.key.length === 1;
|
|
1784
|
+
const noModifier = !e.ctrlKey && !e.metaKey && !e.altKey;
|
|
1785
|
+
return isPrintableChar && noModifier;
|
|
1786
|
+
};
|
|
1787
|
+
if (props.multiple || !checkPrintable(e)) return;
|
|
1788
|
+
const now = performance.now();
|
|
1789
|
+
if (now - keyboardLookupLastTime > KEYBOARD_LOOKUP_THRESHOLD) {
|
|
1790
|
+
keyboardLookupPrefix = "";
|
|
1791
|
+
}
|
|
1792
|
+
keyboardLookupPrefix += e.key.toLowerCase();
|
|
1793
|
+
keyboardLookupLastTime = now;
|
|
1794
|
+
const item = items.value.find((item) => !isStructural(item) && item.title?.toLowerCase().startsWith(keyboardLookupPrefix));
|
|
1795
|
+
if (item !== undefined) {
|
|
1796
|
+
model.value = [item];
|
|
1797
|
+
const index = displayItems.value.indexOf(item);
|
|
1798
|
+
scheduleScrollFrame(() => {
|
|
1799
|
+
if (index >= 0) {
|
|
1800
|
+
origamVirtualScrollRef.value?.scrollToIndex(index);
|
|
1801
|
+
}
|
|
1802
|
+
});
|
|
1803
|
+
}
|
|
1804
|
+
};
|
|
1660
1805
|
const handleKeydown = (e) => {
|
|
1661
1806
|
if (!e.key || props.readonly || form?.isReadonly.value) return;
|
|
1662
1807
|
const selectionStart = origamTextFieldRef.value?.selectionStart;
|
|
@@ -1685,94 +1830,16 @@ const handleKeydown = (e) => {
|
|
|
1685
1830
|
highlightIndex.value = -1;
|
|
1686
1831
|
menu.value = false;
|
|
1687
1832
|
}
|
|
1688
|
-
|
|
1689
|
-
// DOM focus never leaves the input — only aria-activedescendant changes.
|
|
1690
|
-
const itemCount = displayItems.value.length;
|
|
1691
|
-
if (menu.value && itemCount > 0) {
|
|
1692
|
-
if (e.key === KEYBOARD_VALUES.DOWN) {
|
|
1693
|
-
highlightIndex.value = highlightIndex.value < itemCount - 1 ? highlightIndex.value + 1 : 0;
|
|
1694
|
-
} else if (e.key === KEYBOARD_VALUES.UP) {
|
|
1695
|
-
highlightIndex.value = highlightIndex.value > 0 ? highlightIndex.value - 1 : itemCount - 1;
|
|
1696
|
-
} else if (e.key === KEYBOARD_VALUES.HOME) {
|
|
1697
|
-
highlightIndex.value = 0;
|
|
1698
|
-
} else if (e.key === KEYBOARD_VALUES.END) {
|
|
1699
|
-
highlightIndex.value = itemCount - 1;
|
|
1700
|
-
} else if (e.key === KEYBOARD_VALUES.ENTER && highlightIndex.value >= 0) {
|
|
1701
|
-
handleSelect(displayItems.value[highlightIndex.value], null);
|
|
1702
|
-
highlightIndex.value = -1;
|
|
1703
|
-
return;
|
|
1704
|
-
}
|
|
1705
|
-
}
|
|
1833
|
+
if (handleHighlightNavigation(e)) return;
|
|
1706
1834
|
if (e.key === KEYBOARD_VALUES.HOME) {
|
|
1707
1835
|
origamListRef.value?.focus("first");
|
|
1708
1836
|
} else if (e.key === KEYBOARD_VALUES.END) {
|
|
1709
1837
|
origamListRef.value?.focus("last");
|
|
1710
1838
|
}
|
|
1711
|
-
const keyAutocompleteEnter = [KEYBOARD_VALUES.ENTER, KEYBOARD_VALUES.TAB];
|
|
1712
1839
|
if (props.autocomplete) {
|
|
1713
|
-
|
|
1714
|
-
handleSelect(displayItems.value[0]);
|
|
1715
|
-
}
|
|
1716
|
-
if (e.key === KEYBOARD_VALUES.DOWN && highlightFirst.value) {
|
|
1717
|
-
origamListRef.value?.focus("next");
|
|
1718
|
-
}
|
|
1719
|
-
const keyBack = [KEYBOARD_VALUES.BACKSPACE, KEYBOARD_VALUES.DELETE];
|
|
1720
|
-
if (keyBack.includes(e.key)) {
|
|
1721
|
-
if (!props.multiple && model.value.length > 0 && !search.value) return handleSelect(model.value[0], false);
|
|
1722
|
-
if (~selectionIndex.value) {
|
|
1723
|
-
const originalSelectionIndex = selectionIndex.value;
|
|
1724
|
-
handleSelect(model.value[selectionIndex.value], false);
|
|
1725
|
-
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
1726
|
-
} else if (e.key === KEYBOARD_VALUES.BACKSPACE && !search.value) {
|
|
1727
|
-
selectionIndex.value = length - 1;
|
|
1728
|
-
}
|
|
1729
|
-
}
|
|
1730
|
-
if (!props.multiple) return;
|
|
1731
|
-
if (e.key === KEYBOARD_VALUES.LEFT) {
|
|
1732
|
-
if (selectionIndex.value < 0 && (selectionStart ?? 0) > 0) return;
|
|
1733
|
-
const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;
|
|
1734
|
-
if (model.value[prev]) {
|
|
1735
|
-
selectionIndex.value = prev;
|
|
1736
|
-
} else {
|
|
1737
|
-
selectionIndex.value = -1;
|
|
1738
|
-
origamTextFieldRef.value?.setSelectionRange(search.value?.length ?? null, search.value?.length ?? null);
|
|
1739
|
-
}
|
|
1740
|
-
}
|
|
1741
|
-
if (e.key === KEYBOARD_VALUES.RIGHT) {
|
|
1742
|
-
if (selectionIndex.value < 0) return;
|
|
1743
|
-
const next = selectionIndex.value + 1;
|
|
1744
|
-
if (model.value[next]) {
|
|
1745
|
-
selectionIndex.value = next;
|
|
1746
|
-
} else {
|
|
1747
|
-
selectionIndex.value = -1;
|
|
1748
|
-
origamTextFieldRef.value?.setSelectionRange(0, 0);
|
|
1749
|
-
}
|
|
1750
|
-
}
|
|
1840
|
+
handleAutocompleteKeydown(e, selectionStart, length);
|
|
1751
1841
|
} else {
|
|
1752
|
-
|
|
1753
|
-
const KEYBOARD_LOOKUP_THRESHOLD = 1e3;
|
|
1754
|
-
const checkPrintable = (e) => {
|
|
1755
|
-
const isPrintableChar = e.key.length === 1;
|
|
1756
|
-
const noModifier = !e.ctrlKey && !e.metaKey && !e.altKey;
|
|
1757
|
-
return isPrintableChar && noModifier;
|
|
1758
|
-
};
|
|
1759
|
-
if (props.multiple || !checkPrintable(e)) return;
|
|
1760
|
-
const now = performance.now();
|
|
1761
|
-
if (now - keyboardLookupLastTime > KEYBOARD_LOOKUP_THRESHOLD) {
|
|
1762
|
-
keyboardLookupPrefix = "";
|
|
1763
|
-
}
|
|
1764
|
-
keyboardLookupPrefix += e.key.toLowerCase();
|
|
1765
|
-
keyboardLookupLastTime = now;
|
|
1766
|
-
const item = items.value.find((item) => item.title?.toLowerCase().startsWith(keyboardLookupPrefix));
|
|
1767
|
-
if (item !== undefined) {
|
|
1768
|
-
model.value = [item];
|
|
1769
|
-
const index = displayItems.value.indexOf(item);
|
|
1770
|
-
scheduleScrollFrame(() => {
|
|
1771
|
-
if (index >= 0) {
|
|
1772
|
-
origamVirtualScrollRef.value?.scrollToIndex(index);
|
|
1773
|
-
}
|
|
1774
|
-
});
|
|
1775
|
-
}
|
|
1842
|
+
handleTypeAheadKeydown(e);
|
|
1776
1843
|
}
|
|
1777
1844
|
};
|
|
1778
1845
|
const handleBlur = (e) => {
|
|
@@ -1897,7 +1964,7 @@ watch(isFocused, (val, oldVal) => {
|
|
|
1897
1964
|
// it must stay empty so it doesn't visually duplicate the
|
|
1898
1965
|
// selection.
|
|
1899
1966
|
if (props.autocomplete) {
|
|
1900
|
-
// @ts-expect-error
|
|
1967
|
+
// @ts-expect-error model items are loosely typed (props.title)
|
|
1901
1968
|
search.value = props.multiple ? "" : String(model.value?.at(-1)?.props.title ?? "");
|
|
1902
1969
|
}
|
|
1903
1970
|
isPristine.value = true;
|
|
@@ -516,7 +516,9 @@ const { isOn: isHover, config: hoverState } = useStateFlag(props, { state: "hove
|
|
|
516
516
|
********************************************************/
|
|
517
517
|
const modelValue = useVModel(props, "modelValue");
|
|
518
518
|
const trueValue = computed(() => {
|
|
519
|
-
|
|
519
|
+
if (props.trueValue !== undefined) return props.trueValue;
|
|
520
|
+
if (props.value !== undefined) return props.value;
|
|
521
|
+
return true;
|
|
520
522
|
});
|
|
521
523
|
const falseValue = computed(() => {
|
|
522
524
|
return props.falseValue !== undefined ? props.falseValue : false;
|
|
@@ -639,7 +641,10 @@ const handleInput = (e) => {
|
|
|
639
641
|
const [rootAttrs, inputAttrs] = filterInputAttrs(attrs);
|
|
640
642
|
const { colorClasses, colorStyles, borderClasses, borderStyles, roundedClasses, roundedStyles, elevationClasses, elevationStyles } = useStateEffect(props, isHover, undefined, hoverState, undefined, toRef(props, "disabled"));
|
|
641
643
|
const rippleProp = computed(() => {
|
|
642
|
-
return !!props.ripple && !props.disabled && !props.readonly
|
|
644
|
+
return !!props.ripple && !props.disabled && !props.readonly && {
|
|
645
|
+
center: true,
|
|
646
|
+
circle: true
|
|
647
|
+
};
|
|
643
648
|
});
|
|
644
649
|
/*********************************************************
|
|
645
650
|
* Class & Style
|
|
@@ -76,7 +76,6 @@ import { useStyle } from "../../composables/Commons/style.composable";
|
|
|
76
76
|
import { IN_BROWSER } from "../../consts/Commons/commons.const";
|
|
77
77
|
import { ORIGAM_SLIDE_GROUP_KEY } from "../../consts/Slide/slide-group.const";
|
|
78
78
|
import { DIRECTION } from "../../enums/Commons/direction.enum";
|
|
79
|
-
import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
80
79
|
import { calculateCenteredTarget, calculateUpdatedTarget, getClientSize, getOffsetSize, getScrollPosition, getScrollSize } from "../../utils/Slide/slide-group.util";
|
|
81
80
|
import { focusableChildren } from "../../utils/Commons/commons.util";
|
|
82
81
|
/*********************************************************
|
|
@@ -93,12 +92,12 @@ const props = defineProps({
|
|
|
93
92
|
nextIcon: {
|
|
94
93
|
type: null,
|
|
95
94
|
required: false,
|
|
96
|
-
default:
|
|
95
|
+
default: "mdi:mdi-chevron-right"
|
|
97
96
|
},
|
|
98
97
|
prevIcon: {
|
|
99
98
|
type: null,
|
|
100
99
|
required: false,
|
|
101
|
-
default:
|
|
100
|
+
default: "mdi:mdi-chevron-left"
|
|
102
101
|
},
|
|
103
102
|
showArrows: {
|
|
104
103
|
type: [Boolean, String],
|
|
@@ -677,7 +676,7 @@ if (IN_BROWSER) {
|
|
|
677
676
|
hasFocusableContent.value = focusableChildren(contentRef.value).length > 0;
|
|
678
677
|
}
|
|
679
678
|
if (firstSelectedIndex.value >= 0 && contentRef.value) {
|
|
680
|
-
//
|
|
679
|
+
// #1408 — Is this too naive? Should we store element references in group composable?
|
|
681
680
|
const selectedElement = contentRef.value.children[lastSelectedIndex.value];
|
|
682
681
|
scrollToChildren(selectedElement, props.centerActive);
|
|
683
682
|
}
|
|
@@ -780,12 +779,10 @@ const handleKeydown = (e) => {
|
|
|
780
779
|
} else if (e.key === "ArrowLeft") {
|
|
781
780
|
toFocus("prev");
|
|
782
781
|
}
|
|
783
|
-
} else {
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
toFocus("prev");
|
|
788
|
-
}
|
|
782
|
+
} else if (e.key === "ArrowDown") {
|
|
783
|
+
toFocus("next");
|
|
784
|
+
} else if (e.key === "ArrowUp") {
|
|
785
|
+
toFocus("prev");
|
|
789
786
|
}
|
|
790
787
|
if (e.key === "Home") {
|
|
791
788
|
toFocus("first");
|
|
@@ -2045,8 +2045,7 @@ defineExpose({
|
|
|
2045
2045
|
|
|
2046
2046
|
#{$this}__input {
|
|
2047
2047
|
writing-mode: vertical-lr;
|
|
2048
|
-
|
|
2049
|
-
appearance: slider-vertical;
|
|
2048
|
+
direction: rtl;
|
|
2050
2049
|
width: var(--origam-slider-field__thumb---size, 20px);
|
|
2051
2050
|
height: 100%;
|
|
2052
2051
|
top: 0;
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
v-if="dismissible !== false"
|
|
64
64
|
:aria-label="dismissLabel"
|
|
65
65
|
:data-cy="`${dataCy}-dismiss`"
|
|
66
|
-
:icon="
|
|
66
|
+
:icon="'mdi:mdi-close'"
|
|
67
67
|
class="origam-snackbar-item__dismiss"
|
|
68
68
|
size="x-small"
|
|
69
69
|
variant="text"
|
|
@@ -81,7 +81,6 @@ import { usePassedProps } from "../../composables/Commons/passedProps.composable
|
|
|
81
81
|
import { useProps } from "../../composables/Commons/props.composable";
|
|
82
82
|
import { useTypography } from "../../composables/Commons/typography.composable";
|
|
83
83
|
import vContrast from "../../directives/Contrast/contrast.directive";
|
|
84
|
-
import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
85
84
|
/*********************************************************
|
|
86
85
|
* Global
|
|
87
86
|
*
|
|
@@ -210,14 +209,14 @@ defineSlots();
|
|
|
210
209
|
* Intent helpers
|
|
211
210
|
********************************************************/
|
|
212
211
|
const INTENT_ICONS = {
|
|
213
|
-
primary:
|
|
214
|
-
secondary:
|
|
215
|
-
ghost:
|
|
216
|
-
neutral:
|
|
217
|
-
success:
|
|
218
|
-
warning:
|
|
219
|
-
danger:
|
|
220
|
-
info:
|
|
212
|
+
primary: "mdi:mdi-information",
|
|
213
|
+
secondary: "mdi:mdi-information",
|
|
214
|
+
ghost: "mdi:mdi-information",
|
|
215
|
+
neutral: "mdi:mdi-information",
|
|
216
|
+
success: "mdi:mdi-check-circle",
|
|
217
|
+
warning: "mdi:mdi-alert",
|
|
218
|
+
danger: "mdi:mdi-alert-circle",
|
|
219
|
+
info: "mdi:mdi-information"
|
|
221
220
|
};
|
|
222
221
|
const resolvedIcon = computed(() => {
|
|
223
222
|
if (wasIconPassed("icon")) return props.icon;
|
|
@@ -705,16 +705,6 @@ defineExpose({
|
|
|
705
705
|
|
|
706
706
|
&--vertical {
|
|
707
707
|
flex-direction: column;
|
|
708
|
-
|
|
709
|
-
.origam-stepper__connector {
|
|
710
|
-
width: var(--origam-stepper---connector-thickness, 2px);
|
|
711
|
-
height: var(--origam-stepper---gap, 16px);
|
|
712
|
-
min-width: 0;
|
|
713
|
-
min-height: 16px;
|
|
714
|
-
margin-inline-start: calc((var(--origam-stepper---indicator-size, 32px) / 2) - (var(--origam-stepper---connector-thickness, 2px) / 2));
|
|
715
|
-
margin-block: 4px;
|
|
716
|
-
align-self: flex-start;
|
|
717
|
-
}
|
|
718
708
|
}
|
|
719
709
|
|
|
720
710
|
&__connector {
|
|
@@ -736,9 +726,15 @@ defineExpose({
|
|
|
736
726
|
}
|
|
737
727
|
|
|
738
728
|
.origam-stepper--vertical & {
|
|
729
|
+
width: var(--origam-stepper---connector-thickness, 2px);
|
|
730
|
+
height: var(--origam-stepper---gap, 16px);
|
|
731
|
+
min-width: 0;
|
|
732
|
+
min-height: 16px;
|
|
733
|
+
margin-inline-start: calc((var(--origam-stepper---indicator-size, 32px) / 2) - (var(--origam-stepper---connector-thickness, 2px) / 2));
|
|
734
|
+
margin-block: 4px;
|
|
735
|
+
align-self: flex-start;
|
|
739
736
|
flex: 0 0 auto;
|
|
740
737
|
margin-block-start: 0;
|
|
741
|
-
align-self: flex-start;
|
|
742
738
|
}
|
|
743
739
|
}
|
|
744
740
|
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
aria-hidden="true"
|
|
17
17
|
>
|
|
18
18
|
<template v-if="resolvedStatus === STEPPER_ITEM_STATUS.DONE">
|
|
19
|
-
<origam-icon :icon="
|
|
19
|
+
<origam-icon :icon="'mdi:mdi-check'" />
|
|
20
20
|
</template>
|
|
21
21
|
<template v-else-if="resolvedStatus === STEPPER_ITEM_STATUS.ERROR">
|
|
22
|
-
<origam-icon :icon="
|
|
22
|
+
<origam-icon :icon="'mdi:mdi-exclamation'" />
|
|
23
23
|
</template>
|
|
24
24
|
<template v-else-if="icon">
|
|
25
25
|
<origam-icon :icon="icon" />
|
|
@@ -47,7 +47,6 @@ import { StyleValue, computed, inject } from "vue";
|
|
|
47
47
|
import OrigamIcon from "../Icon/OrigamIcon.vue";
|
|
48
48
|
import { ORIGAM_STEPPER_KEY } from "../../consts/Stepper/stepper.const";
|
|
49
49
|
import { DIRECTION } from "../../enums/Commons/direction.enum";
|
|
50
|
-
import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
51
50
|
import { STEPPER_ITEM_STATUS } from "../../enums/Stepper/stepper.enum";
|
|
52
51
|
import { useLocale } from "../../composables/Commons/locale.composable";
|
|
53
52
|
import { useProps } from "../../composables/Commons/props.composable";
|
|
@@ -1104,15 +1104,6 @@ defineExpose({
|
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
1106
|
|
|
1107
|
-
&__thumb {
|
|
1108
|
-
transition: none;
|
|
1109
|
-
|
|
1110
|
-
@media (forced-colors: active) {
|
|
1111
|
-
border: 1px solid;
|
|
1112
|
-
color: buttontext;
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
1107
|
.origam-selection-control {
|
|
1117
1108
|
min-height: calc(var(--origam-switch__selection-control---min-height, 56px) + var(--origam-input---density, 0px));
|
|
1118
1109
|
|
|
@@ -326,7 +326,7 @@ const focusFirstNonDisabled = (offset) => {
|
|
|
326
326
|
if (!list.length) return;
|
|
327
327
|
const start = offset > 0 ? 0 : list.length - 1;
|
|
328
328
|
const end = offset > 0 ? list.length : -1;
|
|
329
|
-
for (let i = start; i
|
|
329
|
+
for (let i = start; offset > 0 ? i < end : i > end; i += offset) {
|
|
330
330
|
const item = list[i];
|
|
331
331
|
if (!item.disabled) {
|
|
332
332
|
select(item.id, true);
|
|
@@ -202,7 +202,6 @@ import { ACTIVE_TEXT_FIELD_TYPE, INPUT_TEXT_FIELD_TYPE } from "../../consts/Text
|
|
|
202
202
|
import vIntersect from "../../directives/Intersect/intersect.directive";
|
|
203
203
|
import { DENSITY } from "../../enums/Commons/density.enum";
|
|
204
204
|
import { DIRECTION } from "../../enums/Commons/direction.enum";
|
|
205
|
-
import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
206
205
|
import { TEXT_FIELD_TYPE } from "../../enums/TextField/text-field.enum";
|
|
207
206
|
import { applyMask } from "../../utils/Commons/apply-mask.util";
|
|
208
207
|
import { filterInputAttrs } from "../../utils/Input/input.util";
|
|
@@ -409,7 +408,7 @@ const props = defineProps({
|
|
|
409
408
|
clearIcon: {
|
|
410
409
|
type: null,
|
|
411
410
|
required: false,
|
|
412
|
-
default:
|
|
411
|
+
default: "mdi:mdi-close-circle-outline"
|
|
413
412
|
},
|
|
414
413
|
clearable: {
|
|
415
414
|
type: Boolean,
|
|
@@ -1205,9 +1204,7 @@ const handleInput = (e) => {
|
|
|
1205
1204
|
const pos = r.masked.length;
|
|
1206
1205
|
try {
|
|
1207
1206
|
el.setSelectionRange(pos, pos);
|
|
1208
|
-
} catch
|
|
1209
|
-
void err;
|
|
1210
|
-
}
|
|
1207
|
+
} catch {}
|
|
1211
1208
|
});
|
|
1212
1209
|
return;
|
|
1213
1210
|
}
|
|
@@ -271,7 +271,6 @@ import { DEFAULT_TOOLBAR } from "../../consts/TextareaField/textarea-field.const
|
|
|
271
271
|
import vIntersect from "../../directives/Intersect/intersect.directive";
|
|
272
272
|
import { AXIS } from "../../enums/Commons/drag.enum";
|
|
273
273
|
import { DENSITY } from "../../enums/Commons/density.enum";
|
|
274
|
-
import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
275
274
|
import { TEXTAREA_MODE, TEXTAREA_OUTPUT } from "../../enums/TextareaField/textarea-field.enum";
|
|
276
275
|
import { TEXTAREA_TOOLBAR_POSITION } from "../../enums/TextareaField/textarea-field-rich-toolbar.enum";
|
|
277
276
|
import { clamp, convertToUnit } from "../../utils/Commons/commons.util";
|
|
@@ -479,7 +478,7 @@ const props = defineProps({
|
|
|
479
478
|
clearIcon: {
|
|
480
479
|
type: null,
|
|
481
480
|
required: false,
|
|
482
|
-
default:
|
|
481
|
+
default: "mdi:mdi-close-circle-outline"
|
|
483
482
|
},
|
|
484
483
|
clearable: {
|
|
485
484
|
type: Boolean,
|
|
@@ -1585,6 +1584,8 @@ defineExpose(forwardRefs({
|
|
|
1585
1584
|
}
|
|
1586
1585
|
|
|
1587
1586
|
:deep(textarea) {
|
|
1587
|
+
// UA `fieldtext` is black: inherit the field colour like `.origam-field__input` (#1150)
|
|
1588
|
+
color: inherit;
|
|
1588
1589
|
opacity: var(--origam-textarea-field__textarea---opacity, 0);
|
|
1589
1590
|
flex: 1;
|
|
1590
1591
|
min-width: 0;
|