origam 2.41.0 → 2.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- 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 +14 -15
- 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 +2 -3
- 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 +4 -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 +9 -7
- package/dist/src/components/Radio/OrigamRadioBtn.vue +2 -3
- 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 +135 -105
- package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +7 -2
- package/dist/src/components/Slide/OrigamSlideGroup.vue +7 -10
- 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 +1 -1
- package/dist/src/consts/PasswordField/password-field.const.js +1 -1
- 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/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
|
@@ -192,7 +192,6 @@ import { useStyle } from "../../composables/Commons/style.composable";
|
|
|
192
192
|
import { useTypography } from "../../composables/Commons/typography.composable";
|
|
193
193
|
import { useVModel } from "../../composables/Commons/vModel.composable";
|
|
194
194
|
import { KEYBOARD_VALUES } from "../../enums/Commons/hotkey.enum";
|
|
195
|
-
import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
196
195
|
import { VARIANT } from "../../enums/Commons/variant.enum";
|
|
197
196
|
import { createRange, int } from "../../utils/Commons/commons.util";
|
|
198
197
|
/*********************************************************
|
|
@@ -227,22 +226,22 @@ const props = defineProps({
|
|
|
227
226
|
firstIcon: {
|
|
228
227
|
type: null,
|
|
229
228
|
required: false,
|
|
230
|
-
default:
|
|
229
|
+
default: "mdi:mdi-chevron-double-left"
|
|
231
230
|
},
|
|
232
231
|
prevIcon: {
|
|
233
232
|
type: null,
|
|
234
233
|
required: false,
|
|
235
|
-
default:
|
|
234
|
+
default: "mdi:mdi-chevron-left"
|
|
236
235
|
},
|
|
237
236
|
nextIcon: {
|
|
238
237
|
type: null,
|
|
239
238
|
required: false,
|
|
240
|
-
default:
|
|
239
|
+
default: "mdi:mdi-chevron-right"
|
|
241
240
|
},
|
|
242
241
|
lastIcon: {
|
|
243
242
|
type: null,
|
|
244
243
|
required: false,
|
|
245
|
-
default:
|
|
244
|
+
default: "mdi:mdi-chevron-double-right"
|
|
246
245
|
},
|
|
247
246
|
ariaLabel: {
|
|
248
247
|
type: String,
|
|
@@ -653,12 +653,9 @@ const calculateMouseMovement = () => {
|
|
|
653
653
|
if (parallax.event.value !== PARALLAX_EVENT.SCROLL) {
|
|
654
654
|
movementX = props.axis === AXIS.Y ? 0 : x;
|
|
655
655
|
movementY = props.axis === AXIS.X ? 0 : y;
|
|
656
|
-
} else
|
|
656
|
+
} else {
|
|
657
657
|
movementX = props.axis === AXIS.X ? y : 0;
|
|
658
658
|
movementY = props.axis === AXIS.Y || !props.axis ? y : 0;
|
|
659
|
-
} else if (props.cycle > 0) {
|
|
660
|
-
movementX = props.axis === AXIS.X ? x : 0;
|
|
661
|
-
movementY = props.axis === AXIS.Y ? y : 0;
|
|
662
659
|
}
|
|
663
660
|
return {
|
|
664
661
|
x: movementX,
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
<div class="origam-password-field__validate">
|
|
104
104
|
<origam-icon
|
|
105
105
|
:color="isChecked(info.key) ? 'success' : 'accent'"
|
|
106
|
-
:icon="isChecked(info.key) ?
|
|
106
|
+
:icon="isChecked(info.key) ? 'mdi:mdi-check-circle-outline' : 'mdi:mdi-close-circle-outline'"
|
|
107
107
|
/>
|
|
108
108
|
</div>
|
|
109
109
|
<div
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
>
|
|
250
250
|
<origam-icon
|
|
251
251
|
class="origam-password-field__requirement-icon"
|
|
252
|
-
:icon="isRuleSatisfied(rule) ?
|
|
252
|
+
:icon="isRuleSatisfied(rule) ? 'mdi:mdi-check-circle-outline' : 'mdi:mdi-close-circle-outline'"
|
|
253
253
|
/>
|
|
254
254
|
<span class="origam-password-field__requirement-label">{{ rule.label }}</span>
|
|
255
255
|
</li>
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
isRuleSatisfied(rule) ? 'origam-password-field__requirement-chip--satisfied' : 'origam-password-field__requirement-chip--pending'
|
|
267
267
|
]"
|
|
268
268
|
:bg-color="isRuleSatisfied(rule) ? 'success' : undefined"
|
|
269
|
-
:prepend-icon="isRuleSatisfied(rule) ?
|
|
269
|
+
:prepend-icon="isRuleSatisfied(rule) ? 'mdi:mdi-check-circle-outline' : 'mdi:mdi-close-circle-outline'"
|
|
270
270
|
:text="rule.label"
|
|
271
271
|
:data-requirement-id="rule.id"
|
|
272
272
|
:data-satisfied="isRuleSatisfied(rule) ? 'true' : 'false'"
|
|
@@ -324,7 +324,6 @@ import vIntersect from "../../directives/Intersect/intersect.directive";
|
|
|
324
324
|
import { DENSITY } from "../../enums/Commons/density.enum";
|
|
325
325
|
import { DIRECTION } from "../../enums/Commons/direction.enum";
|
|
326
326
|
import { KEYBOARD_VALUES } from "../../enums/Commons/hotkey.enum";
|
|
327
|
-
import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
328
327
|
import { TEXT_FIELD_TYPE } from "../../enums/TextField/text-field.enum";
|
|
329
328
|
import { filterInputAttrs } from "../../utils/Input/input.util";
|
|
330
329
|
import { forwardRefs } from "../../utils/Commons/forwardRefs.util";
|
|
@@ -344,12 +343,12 @@ const props = defineProps({
|
|
|
344
343
|
onIcon: {
|
|
345
344
|
type: null,
|
|
346
345
|
required: false,
|
|
347
|
-
default:
|
|
346
|
+
default: "mdi:mdi-eye-outline"
|
|
348
347
|
},
|
|
349
348
|
offIcon: {
|
|
350
349
|
type: null,
|
|
351
350
|
required: false,
|
|
352
|
-
default:
|
|
351
|
+
default: "mdi:mdi-eye-off"
|
|
353
352
|
},
|
|
354
353
|
maxlength: {
|
|
355
354
|
type: Number,
|
|
@@ -1221,7 +1220,10 @@ const { onClickPrepend: handleClickPrepend, onClickAppend: handleClickAppend } =
|
|
|
1221
1220
|
* `autofocus` is set. Avoids stealing focus from off-screen forms.
|
|
1222
1221
|
********************************************************/
|
|
1223
1222
|
const handleIntersect = (isIntersecting, entries) => {
|
|
1224
|
-
if (!props.autofocus || !isIntersecting)
|
|
1223
|
+
if (!props.autofocus || !isIntersecting) {
|
|
1224
|
+
return;
|
|
1225
|
+
}
|
|
1226
|
+
;
|
|
1225
1227
|
entries[0].target?.focus?.();
|
|
1226
1228
|
};
|
|
1227
1229
|
const intersect = computed(() => {
|
|
@@ -44,7 +44,6 @@ import { useProps } from "../../composables/Commons/props.composable";
|
|
|
44
44
|
import { useStyle } from "../../composables/Commons/style.composable";
|
|
45
45
|
import { useVModel } from "../../composables/Commons/vModel.composable";
|
|
46
46
|
import { DENSITY } from "../../enums/Commons/density.enum";
|
|
47
|
-
import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
48
47
|
/*********************************************************
|
|
49
48
|
* Global
|
|
50
49
|
*
|
|
@@ -126,12 +125,12 @@ const props = defineProps({
|
|
|
126
125
|
falseIcon: {
|
|
127
126
|
type: null,
|
|
128
127
|
required: false,
|
|
129
|
-
default:
|
|
128
|
+
default: "mdi:mdi-radiobox-blank"
|
|
130
129
|
},
|
|
131
130
|
trueIcon: {
|
|
132
131
|
type: null,
|
|
133
132
|
required: false,
|
|
134
|
-
default:
|
|
133
|
+
default: "mdi:mdi-radiobox-marked"
|
|
135
134
|
},
|
|
136
135
|
multiple: {
|
|
137
136
|
type: Boolean,
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
<origam-btn
|
|
50
50
|
v-if="clearable && normalizedValue > 0 && !disabled && !readonly"
|
|
51
51
|
:aria-label="t('origam.rating.clear')"
|
|
52
|
-
:icon="
|
|
52
|
+
:icon="'mdi:mdi-close-circle-outline'"
|
|
53
53
|
:variant="VARIANT.TEXT"
|
|
54
54
|
class="origam-rating-field__clear"
|
|
55
55
|
data-cy="rating-field-clear"
|
|
@@ -177,7 +177,6 @@ import { RATING_FIELD_ENABLED_RADIO_SELECTOR, RATING_FIELD_MUTATING_KEYS, RATING
|
|
|
177
177
|
import { BLOCK } from "../../enums/Commons/anchor.enum";
|
|
178
178
|
import { DENSITY } from "../../enums/Commons/density.enum";
|
|
179
179
|
import { KEYBOARD_VALUES } from "../../enums/Commons/hotkey.enum";
|
|
180
|
-
import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
181
180
|
import { SIZES } from "../../enums/Commons/size.enum";
|
|
182
181
|
import { VARIANT } from "../../enums/Commons/variant.enum";
|
|
183
182
|
import { clamp, createRange } from "../../utils/Commons/commons.util";
|
|
@@ -46,7 +46,6 @@ import OrigamBtn from "../Btn/OrigamBtn.vue";
|
|
|
46
46
|
import { useLocale } from "../../composables/Commons/locale.composable";
|
|
47
47
|
import { useProps } from "../../composables/Commons/props.composable";
|
|
48
48
|
import { useStyle } from "../../composables/Commons/style.composable";
|
|
49
|
-
import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
50
49
|
import { VARIANT } from "../../enums/Commons/variant.enum";
|
|
51
50
|
/*********************************************************
|
|
52
51
|
* Global
|
|
@@ -105,12 +104,12 @@ const props = defineProps({
|
|
|
105
104
|
fullIcon: {
|
|
106
105
|
type: null,
|
|
107
106
|
required: false,
|
|
108
|
-
default:
|
|
107
|
+
default: "mdi:mdi-star"
|
|
109
108
|
},
|
|
110
109
|
emptyIcon: {
|
|
111
110
|
type: null,
|
|
112
111
|
required: false,
|
|
113
|
-
default:
|
|
112
|
+
default: "mdi:mdi-star-outline"
|
|
114
113
|
},
|
|
115
114
|
halfIncrements: {
|
|
116
115
|
type: Boolean,
|
|
@@ -297,7 +297,6 @@ import { DENSITY } from "../../enums/Commons/density.enum";
|
|
|
297
297
|
import { DIRECTION } from "../../enums/Commons/direction.enum";
|
|
298
298
|
import { FILTERS_MODE } from "../../enums/Commons/filters.enum";
|
|
299
299
|
import { KEYBOARD_VALUES } from "../../enums/Commons/hotkey.enum";
|
|
300
|
-
import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
301
300
|
import { SELECT_STRATEGY } from "../../enums/Commons/nested.enum";
|
|
302
301
|
import { SIZES } from "../../enums/Commons/size.enum";
|
|
303
302
|
import { TEXT_FIELD_TYPE } from "../../enums/TextField/text-field.enum";
|
|
@@ -338,7 +337,7 @@ const props = defineProps({
|
|
|
338
337
|
menuIcon: {
|
|
339
338
|
type: null,
|
|
340
339
|
required: false,
|
|
341
|
-
default:
|
|
340
|
+
default: "mdi:mdi-chevron-down"
|
|
342
341
|
},
|
|
343
342
|
menuProps: {
|
|
344
343
|
type: Object,
|
|
@@ -1542,31 +1541,37 @@ onBeforeUnmount(() => {
|
|
|
1542
1541
|
/*********************************************************
|
|
1543
1542
|
* Event handlers
|
|
1544
1543
|
********************************************************/
|
|
1544
|
+
const handleSelectMultiple = (item, set) => {
|
|
1545
|
+
const index = model.value.findIndex((selection) => props.valueComparator ? props.valueComparator(selection.value, item.value) : deepEqual(selection.value, item.value));
|
|
1546
|
+
const add = set == null ? !~index : set;
|
|
1547
|
+
if (~index) {
|
|
1548
|
+
const value = add ? [...model.value, item] : [...model.value];
|
|
1549
|
+
value.splice(index, 1);
|
|
1550
|
+
model.value = value;
|
|
1551
|
+
} else if (add) {
|
|
1552
|
+
model.value = [...model.value, item];
|
|
1553
|
+
}
|
|
1554
|
+
if (props.clearOnSelect && props.autocomplete) {
|
|
1555
|
+
search.value = "";
|
|
1556
|
+
}
|
|
1557
|
+
};
|
|
1558
|
+
const handleSelectSingle = (item, set) => {
|
|
1559
|
+
const add = set !== false;
|
|
1560
|
+
model.value = add ? [item] : [];
|
|
1561
|
+
if (props.autocomplete) {
|
|
1562
|
+
search.value = add ? item.title : "";
|
|
1563
|
+
}
|
|
1564
|
+
nextTick(() => {
|
|
1565
|
+
menu.value = false;
|
|
1566
|
+
isPristine.value = true;
|
|
1567
|
+
});
|
|
1568
|
+
};
|
|
1545
1569
|
const handleSelect = (item, set = true) => {
|
|
1546
1570
|
if (item.props?.disabled) return;
|
|
1547
1571
|
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
|
-
}
|
|
1572
|
+
handleSelectMultiple(item, set);
|
|
1560
1573
|
} 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
|
-
});
|
|
1574
|
+
handleSelectSingle(item, set);
|
|
1570
1575
|
}
|
|
1571
1576
|
};
|
|
1572
1577
|
const handleClear = (e) => {
|
|
@@ -1657,6 +1662,109 @@ const handleMousedownMenuIcon = (e) => {
|
|
|
1657
1662
|
// click double-toggles (icon → open, control → close again) because
|
|
1658
1663
|
// stopPropagation is only called after the first focus is set.
|
|
1659
1664
|
};
|
|
1665
|
+
/*********************************************************
|
|
1666
|
+
* Keyboard handling — split by concern (#1398). The helpers below keep
|
|
1667
|
+
* the exact evaluation order of the former single `handleKeydown`; the
|
|
1668
|
+
* `length` / `selectionStart` snapshots are taken once, up front, and
|
|
1669
|
+
* passed down.
|
|
1670
|
+
********************************************************/
|
|
1671
|
+
// WAI-ARIA combobox: highlight navigation stays on the <input>.
|
|
1672
|
+
// DOM focus never leaves the input — only aria-activedescendant changes.
|
|
1673
|
+
// Returns true when Enter selected the highlighted item (stop handling).
|
|
1674
|
+
const handleHighlightNavigation = (e) => {
|
|
1675
|
+
const itemCount = displayItems.value.length;
|
|
1676
|
+
if (!menu.value || itemCount <= 0) return false;
|
|
1677
|
+
if (e.key === KEYBOARD_VALUES.DOWN) {
|
|
1678
|
+
highlightIndex.value = highlightIndex.value < itemCount - 1 ? highlightIndex.value + 1 : 0;
|
|
1679
|
+
} else if (e.key === KEYBOARD_VALUES.UP) {
|
|
1680
|
+
highlightIndex.value = highlightIndex.value > 0 ? highlightIndex.value - 1 : itemCount - 1;
|
|
1681
|
+
} else if (e.key === KEYBOARD_VALUES.HOME) {
|
|
1682
|
+
highlightIndex.value = 0;
|
|
1683
|
+
} else if (e.key === KEYBOARD_VALUES.END) {
|
|
1684
|
+
highlightIndex.value = itemCount - 1;
|
|
1685
|
+
} else if (e.key === KEYBOARD_VALUES.ENTER && highlightIndex.value >= 0) {
|
|
1686
|
+
handleSelect(displayItems.value[highlightIndex.value], null);
|
|
1687
|
+
highlightIndex.value = -1;
|
|
1688
|
+
return true;
|
|
1689
|
+
}
|
|
1690
|
+
return false;
|
|
1691
|
+
};
|
|
1692
|
+
// Backspace / Delete in autocomplete mode. Returns true when it removed the
|
|
1693
|
+
// single selection (the caller stops handling the key).
|
|
1694
|
+
const handleAutocompleteBack = (e, length) => {
|
|
1695
|
+
if (!props.multiple && model.value.length > 0 && !search.value) {
|
|
1696
|
+
handleSelect(model.value[0], false);
|
|
1697
|
+
return true;
|
|
1698
|
+
}
|
|
1699
|
+
if (~selectionIndex.value) {
|
|
1700
|
+
const originalSelectionIndex = selectionIndex.value;
|
|
1701
|
+
handleSelect(model.value[selectionIndex.value], false);
|
|
1702
|
+
selectionIndex.value = originalSelectionIndex >= length - 1 ? length - 2 : originalSelectionIndex;
|
|
1703
|
+
} else if (e.key === KEYBOARD_VALUES.BACKSPACE && !search.value) {
|
|
1704
|
+
selectionIndex.value = length - 1;
|
|
1705
|
+
}
|
|
1706
|
+
return false;
|
|
1707
|
+
};
|
|
1708
|
+
const handleSelectionLeft = (selectionStart, length) => {
|
|
1709
|
+
if (selectionIndex.value < 0 && (selectionStart ?? 0) > 0) return;
|
|
1710
|
+
const prev = selectionIndex.value > -1 ? selectionIndex.value - 1 : length - 1;
|
|
1711
|
+
if (model.value[prev]) {
|
|
1712
|
+
selectionIndex.value = prev;
|
|
1713
|
+
} else {
|
|
1714
|
+
selectionIndex.value = -1;
|
|
1715
|
+
origamTextFieldRef.value?.setSelectionRange(search.value?.length ?? null, search.value?.length ?? null);
|
|
1716
|
+
}
|
|
1717
|
+
};
|
|
1718
|
+
const handleSelectionRight = () => {
|
|
1719
|
+
if (selectionIndex.value < 0) return;
|
|
1720
|
+
const next = selectionIndex.value + 1;
|
|
1721
|
+
if (model.value[next]) {
|
|
1722
|
+
selectionIndex.value = next;
|
|
1723
|
+
} else {
|
|
1724
|
+
selectionIndex.value = -1;
|
|
1725
|
+
origamTextFieldRef.value?.setSelectionRange(0, 0);
|
|
1726
|
+
}
|
|
1727
|
+
};
|
|
1728
|
+
const handleAutocompleteKeydown = (e, selectionStart, length) => {
|
|
1729
|
+
const keyAutocompleteEnter = [KEYBOARD_VALUES.ENTER, KEYBOARD_VALUES.TAB];
|
|
1730
|
+
if (highlightFirst.value && keyAutocompleteEnter.includes(e.key)) {
|
|
1731
|
+
handleSelect(displayItems.value[0]);
|
|
1732
|
+
}
|
|
1733
|
+
if (e.key === KEYBOARD_VALUES.DOWN && highlightFirst.value) {
|
|
1734
|
+
origamListRef.value?.focus("next");
|
|
1735
|
+
}
|
|
1736
|
+
const keyBack = [KEYBOARD_VALUES.BACKSPACE, KEYBOARD_VALUES.DELETE];
|
|
1737
|
+
if (keyBack.includes(e.key) && handleAutocompleteBack(e, length)) return;
|
|
1738
|
+
if (!props.multiple) return;
|
|
1739
|
+
if (e.key === KEYBOARD_VALUES.LEFT) handleSelectionLeft(selectionStart, length);
|
|
1740
|
+
if (e.key === KEYBOARD_VALUES.RIGHT) handleSelectionRight();
|
|
1741
|
+
};
|
|
1742
|
+
const handleTypeAheadKeydown = (e) => {
|
|
1743
|
+
// html select hotkeys
|
|
1744
|
+
const KEYBOARD_LOOKUP_THRESHOLD = 1e3;
|
|
1745
|
+
const checkPrintable = (e) => {
|
|
1746
|
+
const isPrintableChar = e.key.length === 1;
|
|
1747
|
+
const noModifier = !e.ctrlKey && !e.metaKey && !e.altKey;
|
|
1748
|
+
return isPrintableChar && noModifier;
|
|
1749
|
+
};
|
|
1750
|
+
if (props.multiple || !checkPrintable(e)) return;
|
|
1751
|
+
const now = performance.now();
|
|
1752
|
+
if (now - keyboardLookupLastTime > KEYBOARD_LOOKUP_THRESHOLD) {
|
|
1753
|
+
keyboardLookupPrefix = "";
|
|
1754
|
+
}
|
|
1755
|
+
keyboardLookupPrefix += e.key.toLowerCase();
|
|
1756
|
+
keyboardLookupLastTime = now;
|
|
1757
|
+
const item = items.value.find((item) => item.title?.toLowerCase().startsWith(keyboardLookupPrefix));
|
|
1758
|
+
if (item !== undefined) {
|
|
1759
|
+
model.value = [item];
|
|
1760
|
+
const index = displayItems.value.indexOf(item);
|
|
1761
|
+
scheduleScrollFrame(() => {
|
|
1762
|
+
if (index >= 0) {
|
|
1763
|
+
origamVirtualScrollRef.value?.scrollToIndex(index);
|
|
1764
|
+
}
|
|
1765
|
+
});
|
|
1766
|
+
}
|
|
1767
|
+
};
|
|
1660
1768
|
const handleKeydown = (e) => {
|
|
1661
1769
|
if (!e.key || props.readonly || form?.isReadonly.value) return;
|
|
1662
1770
|
const selectionStart = origamTextFieldRef.value?.selectionStart;
|
|
@@ -1685,94 +1793,16 @@ const handleKeydown = (e) => {
|
|
|
1685
1793
|
highlightIndex.value = -1;
|
|
1686
1794
|
menu.value = false;
|
|
1687
1795
|
}
|
|
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
|
-
}
|
|
1796
|
+
if (handleHighlightNavigation(e)) return;
|
|
1706
1797
|
if (e.key === KEYBOARD_VALUES.HOME) {
|
|
1707
1798
|
origamListRef.value?.focus("first");
|
|
1708
1799
|
} else if (e.key === KEYBOARD_VALUES.END) {
|
|
1709
1800
|
origamListRef.value?.focus("last");
|
|
1710
1801
|
}
|
|
1711
|
-
const keyAutocompleteEnter = [KEYBOARD_VALUES.ENTER, KEYBOARD_VALUES.TAB];
|
|
1712
1802
|
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
|
-
}
|
|
1803
|
+
handleAutocompleteKeydown(e, selectionStart, length);
|
|
1751
1804
|
} 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
|
-
}
|
|
1805
|
+
handleTypeAheadKeydown(e);
|
|
1776
1806
|
}
|
|
1777
1807
|
};
|
|
1778
1808
|
const handleBlur = (e) => {
|
|
@@ -1897,7 +1927,7 @@ watch(isFocused, (val, oldVal) => {
|
|
|
1897
1927
|
// it must stay empty so it doesn't visually duplicate the
|
|
1898
1928
|
// selection.
|
|
1899
1929
|
if (props.autocomplete) {
|
|
1900
|
-
// @ts-expect-error
|
|
1930
|
+
// @ts-expect-error model items are loosely typed (props.title)
|
|
1901
1931
|
search.value = props.multiple ? "" : String(model.value?.at(-1)?.props.title ?? "");
|
|
1902
1932
|
}
|
|
1903
1933
|
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");
|
|
@@ -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);
|