origam 2.5.0 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/assets/css/tokens/dark.css +3788 -3768
- package/dist/src/assets/css/tokens/light.css +1894 -1884
- package/dist/src/assets/css/tokens/primitive.css +2 -0
- package/dist/src/assets/css/tokens/themes-all.css +44226 -0
- package/dist/src/assets/locales/en.json +34 -2
- package/dist/src/assets/locales/fr.json +34 -2
- package/dist/src/assets/scss/tokens/_dark.scss +1894 -1884
- package/dist/src/assets/scss/tokens/_light.scss +1894 -1884
- package/dist/src/assets/scss/tokens/_primitive.scss +2 -0
- package/dist/src/assets/scss/tokens/_themes-all.scss +44241 -0
- package/dist/src/components/Alert/OrigamAlert.vue +16 -21
- package/dist/src/components/App/OrigamApp.vue +7 -38
- package/dist/src/components/App/OrigamAppBar.vue +35 -17
- package/dist/src/components/Audio/OrigamAudio.vue +77 -6
- package/dist/src/components/Avatar/OrigamAvatar.vue +11 -9
- package/dist/src/components/Avatar/OrigamAvatarGroup.vue +26 -8
- package/dist/src/components/Badge/OrigamBadge.vue +13 -3
- package/dist/src/components/Blockquote/OrigamBlockquote.vue +137 -13
- package/dist/src/components/BottomNav/OrigamBottomNav.vue +34 -4
- package/dist/src/components/Bracket/OrigamBracket.vue +386 -64
- package/dist/src/components/Bracket/OrigamBracketCompetitor.vue +190 -13
- package/dist/src/components/Bracket/OrigamBracketMatch.vue +197 -42
- package/dist/src/components/Bracket/OrigamBracketRound.vue +11 -3
- package/dist/src/components/Breadcrumb/OrigamBreadcrumb.vue +14 -12
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbDivider.vue +4 -1
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +3 -5
- package/dist/src/components/Btn/OrigamBtn.vue +69 -30
- package/dist/src/components/Btn/OrigamBtnGroup.vue +33 -7
- package/dist/src/components/Btn/OrigamBtnToggle.vue +4 -7
- package/dist/src/components/Calendar/OrigamCalendar.vue +785 -658
- package/dist/src/components/Card/OrigamCard.vue +24 -3
- package/dist/src/components/Card/OrigamCardHeader.vue +17 -3
- package/dist/src/components/Card/OrigamCardText.vue +29 -7
- package/dist/src/components/Carousel/OrigamCarousel.vue +29 -9
- package/dist/src/components/Carousel/OrigamCarouselItem.vue +2 -2
- package/dist/src/components/Chart/OrigamChart.vue +3 -1
- package/dist/src/components/Chart/OrigamChartAxis.vue +1 -1
- package/dist/src/components/Chart/OrigamChartBoxPlot.vue +7 -3
- package/dist/src/components/Chart/OrigamChartBullet.vue +7 -3
- package/dist/src/components/Chart/OrigamChartCandlestick.vue +7 -3
- package/dist/src/components/Chart/OrigamChartCartesian.vue +14 -10
- package/dist/src/components/Chart/OrigamChartGauge.vue +7 -3
- package/dist/src/components/Chart/OrigamChartHeatmap.vue +7 -3
- package/dist/src/components/Chart/OrigamChartHoneycomb.vue +7 -3
- package/dist/src/components/Chart/OrigamChartLegend.vue +1 -2
- package/dist/src/components/Chart/OrigamChartMap.vue +7 -3
- package/dist/src/components/Chart/OrigamChartPareto.vue +7 -3
- package/dist/src/components/Chart/OrigamChartPictorial.vue +9 -6
- package/dist/src/components/Chart/OrigamChartPolar.vue +13 -6
- package/dist/src/components/Chart/OrigamChartPolarBar.vue +7 -3
- package/dist/src/components/Chart/OrigamChartPyramid.vue +7 -3
- package/dist/src/components/Chart/OrigamChartRadar.vue +7 -5
- package/dist/src/components/Chart/OrigamChartRangeSelector.vue +3 -4
- package/dist/src/components/Chart/OrigamChartSankey.vue +7 -3
- package/dist/src/components/Chart/OrigamChartSparkline.vue +5 -3
- package/dist/src/components/Chart/OrigamChartStreamgraph.vue +9 -5
- package/dist/src/components/Chart/OrigamChartSunburst.vue +7 -3
- package/dist/src/components/Chart/OrigamChartTooltip.vue +1 -1
- package/dist/src/components/Chart/OrigamChartTreemap.vue +7 -3
- package/dist/src/components/Chart/OrigamChartVariwide.vue +7 -3
- package/dist/src/components/Chart/OrigamChartWordCloud.vue +3 -2
- package/dist/src/components/Checkbox/OrigamCheckbox.vue +18 -3
- package/dist/src/components/Checkbox/OrigamCheckboxBtn.vue +4 -2
- package/dist/src/components/Chip/OrigamChip.vue +25 -12
- package/dist/src/components/Chip/OrigamChipGroup.vue +5 -5
- package/dist/src/components/ClientOnly/OrigamClientOnly.vue +1 -1
- package/dist/src/components/Clipboard/OrigamClipboard.vue +12 -4
- package/dist/src/components/Code/OrigamCode.vue +144 -39
- package/dist/src/components/ColorPicker/OrigamColorPicker.vue +7 -2
- package/dist/src/components/ColorPicker/OrigamColorPickerCanvas.vue +3 -2
- package/dist/src/components/ColorPicker/OrigamColorPickerEdit.vue +2 -2
- package/dist/src/components/ColorPicker/OrigamColorPickerPreview.vue +1 -1
- package/dist/src/components/ColorPicker/OrigamColorPickerSwatches.vue +1 -1
- package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +15 -5
- package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +13 -3
- package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +1 -1
- package/dist/src/components/ContextualMenu/OrigamContextualMenu.vue +7 -2
- package/dist/src/components/Counter/OrigamCounter.vue +2 -1
- package/dist/src/components/DataList/OrigamDataList.vue +21 -5
- package/dist/src/components/DataList/OrigamDataText.vue +5 -1
- package/dist/src/components/DataList/OrigamDataTitle.vue +5 -1
- package/dist/src/components/DataTable/OrigamDataTable.vue +15 -7
- package/dist/src/components/DataTable/OrigamDataTableColumnCell.vue +1 -1
- package/dist/src/components/DataTable/OrigamDataTableFooter.vue +1 -1
- package/dist/src/components/DataTable/OrigamDataTableGroupHeaderRow.vue +1 -1
- package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +3 -2
- package/dist/src/components/DataTable/OrigamDataTableHeaders.vue +2 -1
- package/dist/src/components/DataTable/OrigamDataTableHeadersCell.vue +1 -1
- package/dist/src/components/DataTable/OrigamDataTableHeadersCellMobile.vue +1 -1
- package/dist/src/components/DataTable/OrigamDataTableRow.vue +5 -3
- package/dist/src/components/DataTable/OrigamDataTableRows.vue +3 -3
- package/dist/src/components/DatePicker/OrigamDatePicker.vue +21 -30
- package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +2 -2
- package/dist/src/components/DatePicker/OrigamDatePickerHeader.vue +1 -1
- package/dist/src/components/DatePicker/OrigamDatePickerMonth.vue +16 -28
- package/dist/src/components/DatePicker/OrigamDatePickerMonths.vue +3 -3
- package/dist/src/components/DatePicker/OrigamDatePickerYears.vue +3 -3
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +27 -16
- package/dist/src/components/DefaultsProvider/OrigamDefaultsProvider.vue +1 -1
- package/dist/src/components/Dialog/OrigamDialog.vue +1 -1
- package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +1 -1
- package/dist/src/components/Divider/OrigamDivider.vue +2 -2
- package/dist/src/components/Drawer/OrigamDrawer.vue +5 -11
- package/dist/src/components/EmptyState/OrigamEmptyState.vue +14 -4
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +12 -2
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +4 -2
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +14 -5
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanels.vue +2 -1
- package/dist/src/components/Field/OrigamField.vue +26 -9
- package/dist/src/components/FileField/OrigamFileField.vue +8 -3
- package/dist/src/components/FileField/OrigamFileFieldDragNDropItem.vue +14 -4
- package/dist/src/components/FileField/OrigamFileFieldListItem.vue +14 -4
- package/dist/src/components/Form/OrigamForm.vue +10 -2
- package/dist/src/components/Grid/OrigamGrid.vue +1 -1
- package/dist/src/components/Grid/OrigamGridItem.vue +1 -1
- package/dist/src/components/Grids/OrigamCol.vue +1 -1
- package/dist/src/components/Grids/OrigamContainer.vue +1 -1
- package/dist/src/components/Grids/OrigamRow.vue +6 -2
- package/dist/src/components/Grids/OrigamSpacer.vue +1 -1
- package/dist/src/components/Icon/OrigamClassIcon.vue +1 -1
- package/dist/src/components/Icon/OrigamComponentIcon.vue +1 -1
- package/dist/src/components/Icon/OrigamIcon.vue +1 -1
- package/dist/src/components/Icon/OrigamLigatureIcon.vue +1 -1
- package/dist/src/components/Icon/OrigamSvgIcon.vue +2 -2
- package/dist/src/components/Img/OrigamImg.vue +10 -9
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScroll.vue +14 -7
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScrollIntersect.vue +3 -2
- package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +13 -4
- package/dist/src/components/Input/OrigamInput.vue +17 -3
- package/dist/src/components/ItemGroup/OrigamItem.vue +1 -1
- package/dist/src/components/ItemGroup/OrigamItemGroup.vue +1 -1
- package/dist/src/components/Kbd/OrigamKbd.vue +18 -8
- package/dist/src/components/Label/OrigamLabel.vue +14 -3
- package/dist/src/components/Layout/OrigamLayout.vue +1 -1
- package/dist/src/components/Lazy/OrigamLazy.vue +1 -1
- package/dist/src/components/List/OrigamList.vue +1 -1
- package/dist/src/components/List/OrigamListChildren.vue +1 -1
- package/dist/src/components/List/OrigamListGroup.vue +4 -1
- package/dist/src/components/List/OrigamListGroupActivator.vue +1 -1
- package/dist/src/components/List/OrigamListItem.vue +14 -4
- package/dist/src/components/List/OrigamListSubheader.vue +13 -3
- package/dist/src/components/Loader/OrigamLoader.vue +1 -1
- package/dist/src/components/Main/OrigamMain.vue +1 -1
- package/dist/src/components/Masonry/OrigamMasonry.vue +2 -2
- package/dist/src/components/Media/OrigamMediaController.vue +1 -1
- package/dist/src/components/Media/OrigamMediaScrubber.vue +3 -2
- package/dist/src/components/Media/OrigamMediaVolumeControl.vue +3 -2
- package/dist/src/components/Menu/OrigamMenu.vue +9 -2
- package/dist/src/components/Messages/OrigamMessages.vue +13 -4
- package/dist/src/components/NumberField/OrigamNumberField.vue +80 -40
- package/dist/src/components/NumberFormat/OrigamNumberFormat.vue +1 -1
- package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +107 -11
- package/dist/src/components/Overlay/OrigamOverlay.vue +1 -1
- package/dist/src/components/Overlay/OrigamOverlayScrim.vue +1 -1
- package/dist/src/components/Pagination/OrigamPagination.vue +16 -4
- package/dist/src/components/Parallax/OrigamParallax.vue +9 -2
- package/dist/src/components/Parallax/OrigamParallaxElement.vue +1 -1
- package/dist/src/components/Parallax/OrigamParallaxLayer.vue +2 -2
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +9 -2
- package/dist/src/components/Picker/OrigamPicker.vue +8 -3
- package/dist/src/components/Picker/OrigamPickerTitle.vue +10 -3
- package/dist/src/components/Progress/OrigamProgress.vue +6 -3
- package/dist/src/components/Progress/OrigamProgressCircular.vue +3 -1
- package/dist/src/components/Progress/OrigamProgressLinear.vue +5 -6
- package/dist/src/components/{QRCode → QrCode}/OrigamQrCode.vue +1 -1
- package/dist/src/components/QrCode/index.d.ts +1 -0
- package/dist/src/components/Radio/OrigamRadio.vue +20 -11
- package/dist/src/components/Radio/OrigamRadioBtn.vue +4 -2
- package/dist/src/components/Radio/OrigamRadioGroup.vue +48 -41
- package/dist/src/components/RatingField/OrigamRatingField.vue +9 -13
- package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +3 -6
- package/dist/src/components/Responsive/OrigamResponsive.vue +1 -1
- package/dist/src/components/Section/OrigamSection.vue +1 -1
- package/dist/src/components/Select/OrigamSelect.vue +19 -10
- package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +12 -6
- package/dist/src/components/SelectionControl/OrigamSelectionControlGroup.vue +2 -2
- package/dist/src/components/Sheet/OrigamSheet.vue +11 -3
- package/dist/src/components/Skeleton/OrigamSkeleton.vue +2 -4
- package/dist/src/components/Slide/OrigamSlideGroup.vue +1 -1
- package/dist/src/components/SliderField/OrigamSliderField.vue +7 -6
- package/dist/src/components/SliderField/OrigamSliderFieldTrack.vue +1 -1
- package/dist/src/components/Snackbar/OrigamSnackbar.vue +5 -4
- package/dist/src/components/Snackbar/OrigamSnackbarGroup.vue +1 -1
- package/dist/src/components/Snackbar/OrigamSnackbarItem.vue +27 -26
- package/dist/src/components/Stepper/OrigamStepper.vue +6 -2
- package/dist/src/components/Stepper/OrigamStepperItem.vue +10 -3
- package/dist/src/components/Switch/OrigamSwitch.vue +35 -37
- package/dist/src/components/Switch/OrigamSwitchTrack.vue +9 -15
- package/dist/src/components/SystemBar/OrigamSystemBar.vue +14 -4
- package/dist/src/components/Table/OrigamTable.vue +15 -3
- package/dist/src/components/Tabs/OrigamTab.vue +13 -3
- package/dist/src/components/Tabs/OrigamTabPanel.vue +1 -1
- package/dist/src/components/Tabs/OrigamTabPanels.vue +1 -1
- package/dist/src/components/Tabs/OrigamTabs.vue +1 -1
- package/dist/src/components/TextField/OrigamTextField.vue +8 -1
- package/dist/src/components/TextMask/OrigamTextMask.vue +17 -27
- package/dist/src/components/TextareaField/OrigamRichToolbar.vue +15 -11
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +11 -1
- package/dist/src/components/ThemeProvider/OrigamThemeProvider.vue +4 -1
- package/dist/src/components/Timeline/OrigamTimeline.vue +3 -3
- package/dist/src/components/Timeline/OrigamTimelineItem.vue +3 -1
- package/dist/src/components/Title/OrigamTitle.vue +20 -8
- package/dist/src/components/Toolbar/OrigamToolbar.vue +17 -5
- package/dist/src/components/Tooltip/OrigamTooltip.vue +12 -3
- package/dist/src/components/Transition/OrigamExpandX.vue +1 -1
- package/dist/src/components/Transition/OrigamExpandY.vue +1 -1
- package/dist/src/components/Transition/OrigamFade.vue +1 -1
- package/dist/src/components/Transition/OrigamReverseTranslatePicker.vue +1 -1
- package/dist/src/components/Transition/OrigamScaleRotate.vue +1 -1
- package/dist/src/components/Transition/OrigamSlideX.vue +1 -1
- package/dist/src/components/Transition/OrigamSlideY.vue +1 -1
- package/dist/src/components/Transition/OrigamSnack.vue +1 -1
- package/dist/src/components/Transition/OrigamTransition.vue +1 -1
- package/dist/src/components/Transition/OrigamTranslateBottom.vue +1 -1
- package/dist/src/components/Transition/OrigamTranslatePicker.vue +1 -1
- package/dist/src/components/Transition/OrigamTranslateScale.vue +1 -1
- package/dist/src/components/Transition/OrigamWindowXReverseTranslate.vue +1 -1
- package/dist/src/components/Transition/OrigamWindowXTranslate.vue +1 -1
- package/dist/src/components/Transition/OrigamWindowYReverseTranslate.vue +1 -1
- package/dist/src/components/Transition/OrigamWindowYTranslate.vue +1 -1
- package/dist/src/components/Treeview/OrigamTreeview.vue +1 -1
- package/dist/src/components/Treeview/OrigamTreeviewNode.vue +7 -5
- package/dist/src/components/Video/OrigamVideo.vue +56 -63
- package/dist/src/components/VirtualScroll/OrigamVirtualScroll.vue +1 -1
- package/dist/src/components/VirtualScroll/OrigamVirtualScrollItem.vue +1 -6
- package/dist/src/components/Watermark/OrigamWatermark.vue +1 -1
- package/dist/src/components/Window/OrigamWindow.vue +32 -2
- package/dist/src/components/Window/OrigamWindowItem.vue +1 -1
- package/dist/src/components/index.cjs +1 -1
- package/dist/src/components/index.js +1 -1
- package/dist/src/composables/Chart/chart-gauge.composable.cjs +1 -1
- package/dist/src/composables/Chart/chart-gauge.composable.js +1 -1
- package/dist/src/composables/Chart/chart-header-typography.composable.cjs +20 -0
- package/dist/src/composables/Chart/chart-header-typography.composable.d.ts +27 -0
- package/dist/src/composables/Chart/chart-header-typography.composable.js +11 -0
- package/dist/src/composables/Chart/chart-zoom.composable.cjs +0 -1
- package/dist/src/composables/Chart/chart-zoom.composable.js +0 -1
- package/dist/src/composables/Chart/chart.composable.cjs +0 -11
- package/dist/src/composables/Chart/chart.composable.js +0 -11
- package/dist/src/composables/Code/code.composable.js +4 -1
- package/dist/src/composables/Commons/audio.composable.d.ts +97 -31
- package/dist/src/composables/Commons/border.composable.cjs +10 -0
- package/dist/src/composables/Commons/border.composable.js +7 -0
- package/dist/src/composables/Commons/color.composable.cjs +42 -42
- package/dist/src/composables/Commons/color.composable.d.ts +8 -3
- package/dist/src/composables/Commons/color.composable.js +2 -2
- package/dist/src/composables/Commons/date-picker-calendar.composable.cjs +1 -1
- package/dist/src/composables/Commons/date-picker-calendar.composable.d.ts +1 -1
- package/dist/src/composables/Commons/date-picker-calendar.composable.js +1 -1
- package/dist/src/composables/Commons/defaults.composable.cjs +10 -9
- package/dist/src/composables/Commons/defaults.composable.js +10 -9
- package/dist/src/composables/Commons/delay.composable.cjs +8 -3
- package/dist/src/composables/Commons/delay.composable.js +7 -4
- package/dist/src/composables/Commons/density.composable.cjs +1 -1
- package/dist/src/composables/Commons/density.composable.js +2 -2
- package/dist/src/composables/Commons/dragResizer.composable.cjs +7 -9
- package/dist/src/composables/Commons/dragResizer.composable.js +8 -9
- package/dist/src/composables/Commons/focus.composable.cjs +1 -1
- package/dist/src/composables/Commons/focus.composable.js +1 -1
- package/dist/src/composables/Commons/layout.composable.cjs +12 -0
- package/dist/src/composables/Commons/layout.composable.js +14 -0
- package/dist/src/composables/Commons/message.composable.cjs +1 -1
- package/dist/src/composables/Commons/message.composable.d.ts +1 -1
- package/dist/src/composables/Commons/message.composable.js +1 -1
- package/dist/src/composables/Commons/rounded.composable.cjs +15 -4
- package/dist/src/composables/Commons/rounded.composable.d.ts +1 -1
- package/dist/src/composables/Commons/rounded.composable.js +17 -6
- package/dist/src/composables/Commons/scroll.composable.cjs +2 -2
- package/dist/src/composables/Commons/scroll.composable.js +2 -2
- package/dist/src/composables/Commons/size.composable.d.ts +1 -1
- package/dist/src/composables/Commons/stateEffect.composable.cjs +36 -14
- package/dist/src/composables/Commons/stateEffect.composable.js +38 -14
- package/dist/src/composables/Commons/status.composable.cjs +11 -1
- package/dist/src/composables/Commons/status.composable.d.ts +2 -0
- package/dist/src/composables/Commons/status.composable.js +10 -1
- package/dist/src/composables/Commons/sticky.composable.d.ts +2 -14
- package/dist/src/composables/Commons/style.composable.cjs +5 -3
- package/dist/src/composables/Commons/style.composable.js +5 -3
- package/dist/src/composables/Commons/typography.composable.cjs +23 -0
- package/dist/src/composables/Commons/typography.composable.d.ts +7 -0
- package/dist/src/composables/Commons/typography.composable.js +21 -0
- package/dist/src/composables/DataTable/headers.composable.d.ts +4 -364
- package/dist/src/composables/Icon/icon.composable.cjs +6 -1
- package/dist/src/composables/Icon/icon.composable.js +4 -1
- package/dist/src/composables/InlineEdit/inline-edit.composable.cjs +16 -2
- package/dist/src/composables/InlineEdit/inline-edit.composable.js +16 -2
- package/dist/src/composables/Masonry/masonry.composable.d.ts +2 -1
- package/dist/src/composables/Parallax/transform.composable.d.ts +1 -1
- package/dist/src/composables/Responsive/aspect.composable.cjs +9 -1
- package/dist/src/composables/Responsive/aspect.composable.d.ts +1 -1
- package/dist/src/composables/Responsive/aspect.composable.js +9 -1
- package/dist/src/composables/Theme/installed-themes.composable.cjs +11 -0
- package/dist/src/composables/Theme/installed-themes.composable.d.ts +19 -0
- package/dist/src/composables/Theme/installed-themes.composable.js +5 -0
- package/dist/src/composables/Theme/theme.composable.cjs +86 -15
- package/dist/src/composables/Theme/theme.composable.d.ts +55 -10
- package/dist/src/composables/Theme/theme.composable.js +88 -17
- package/dist/src/composables/index.cjs +36 -0
- package/dist/src/composables/index.d.ts +3 -0
- package/dist/src/composables/index.js +3 -0
- package/dist/src/consts/Bracket/bracket.const.cjs +4 -2
- package/dist/src/consts/Bracket/bracket.const.d.ts +12 -0
- package/dist/src/consts/Bracket/bracket.const.js +2 -0
- package/dist/src/consts/Commons/density.const.cjs +2 -2
- package/dist/src/consts/Commons/density.const.d.ts +1 -1
- package/dist/src/consts/Commons/density.const.js +1 -1
- package/dist/src/consts/Commons/rounded.const.cjs +4 -2
- package/dist/src/consts/Commons/rounded.const.d.ts +22 -2
- package/dist/src/consts/Commons/rounded.const.js +3 -1
- package/dist/src/consts/DataTable/select.const.cjs +1 -1
- package/dist/src/consts/DataTable/select.const.js +1 -1
- package/dist/src/consts/Icon/mdi.const.cjs +6 -1
- package/dist/src/consts/Icon/mdi.const.js +10 -2
- package/dist/src/consts/Theme/theme.const.cjs +11 -1
- package/dist/src/consts/Theme/theme.const.d.ts +16 -0
- package/dist/src/consts/Theme/theme.const.js +10 -0
- package/dist/src/directives/Contrast/contrast.directive.cjs +150 -0
- package/dist/src/directives/Contrast/contrast.directive.d.ts +5 -0
- package/dist/src/directives/Contrast/contrast.directive.js +131 -0
- package/dist/src/directives/index.cjs +7 -0
- package/dist/src/directives/index.d.ts +1 -0
- package/dist/src/directives/index.js +1 -0
- package/dist/src/enums/BottomNav/bottom-nav-position.enum.cjs +12 -0
- package/dist/src/enums/BottomNav/bottom-nav-position.enum.d.ts +10 -0
- package/dist/src/enums/BottomNav/bottom-nav-position.enum.js +6 -0
- package/dist/src/enums/Toolbar/toolbar.enum.cjs +1 -0
- package/dist/src/enums/Toolbar/toolbar.enum.d.ts +2 -1
- package/dist/src/enums/Toolbar/toolbar.enum.js +1 -0
- package/dist/src/enums/index.cjs +22 -0
- package/dist/src/enums/index.d.ts +2 -0
- package/dist/src/enums/index.js +2 -0
- package/dist/src/interfaces/Alert/alert.interface.d.ts +2 -3
- package/dist/src/interfaces/App/app-bar.interface.d.ts +19 -1
- package/dist/src/interfaces/App/app.interface.cjs +1 -0
- package/dist/src/interfaces/App/app.interface.d.ts +24 -0
- package/dist/src/interfaces/Audio/audio-player.interface.d.ts +23 -2
- package/dist/src/interfaces/Avatar/avatar.interface.d.ts +2 -4
- package/dist/src/interfaces/Badge/badge.interface.d.ts +2 -2
- package/dist/src/interfaces/Blockquote/blockquote.interface.d.ts +23 -21
- package/dist/src/interfaces/BottomNav/bottom-nav.interface.d.ts +12 -4
- package/dist/src/interfaces/Bracket/bracket-competitor-component.interface.d.ts +17 -6
- package/dist/src/interfaces/Bracket/bracket-match-component.interface.d.ts +13 -6
- package/dist/src/interfaces/Bracket/bracket-match.interface.d.ts +22 -0
- package/dist/src/interfaces/Bracket/bracket-round-component.interface.d.ts +2 -2
- package/dist/src/interfaces/Bracket/bracket.interface.d.ts +17 -2
- package/dist/src/interfaces/Breadcrumb/breadcrumb-divider.interface.d.ts +2 -2
- package/dist/src/interfaces/Breadcrumb/breadcrumb.interface.d.ts +2 -3
- package/dist/src/interfaces/Btn/btn-group.interface.d.ts +2 -2
- package/dist/src/interfaces/Btn/btn.interface.d.ts +11 -3
- package/dist/src/interfaces/Calendar/calendar.interface.d.ts +7 -2
- package/dist/src/interfaces/Card/card-header.interface.d.ts +2 -2
- package/dist/src/interfaces/Card/card-text.interface.d.ts +2 -2
- package/dist/src/interfaces/Carousel/carousel.interface.d.ts +2 -2
- package/dist/src/interfaces/Chart/chart-base.interface.d.ts +9 -8
- package/dist/src/interfaces/Chart/chart-word-cloud.interface.d.ts +1 -1
- package/dist/src/interfaces/Chart/chart.interface.d.ts +12 -1
- package/dist/src/interfaces/Checkbox/checkbox-btn.interface.d.ts +3 -3
- package/dist/src/interfaces/Checkbox/checkbox.interface.d.ts +10 -9
- package/dist/src/interfaces/Chip/chip-group.interface.d.ts +3 -1
- package/dist/src/interfaces/Chip/chip.interface.d.ts +2 -2
- package/dist/src/interfaces/Clipboard/clipboard.interface.d.ts +2 -2
- package/dist/src/interfaces/Code/code.interface.d.ts +19 -2
- package/dist/src/interfaces/ColorPickerField/color-picker-field.interface.d.ts +2 -2
- package/dist/src/interfaces/CommandPalette/command-palette.interface.d.ts +2 -1
- package/dist/src/interfaces/Commons/calendar.interface.d.ts +3 -3
- package/dist/src/interfaces/Commons/commons.interface.d.ts +34 -1
- package/dist/src/interfaces/Commons/filters.interface.d.ts +2 -2
- package/dist/src/interfaces/Commons/hover.interface.d.ts +18 -3
- package/dist/src/interfaces/Commons/scroll.interface.d.ts +8 -1
- package/dist/src/interfaces/Commons/typography.interface.cjs +1 -0
- package/dist/src/interfaces/Commons/typography.interface.d.ts +52 -0
- package/dist/src/interfaces/Commons/typography.interface.js +0 -0
- package/dist/src/interfaces/Commons/validation.interface.d.ts +3 -1
- package/dist/src/interfaces/Counter/counter.interface.d.ts +2 -2
- package/dist/src/interfaces/DataList/data-list.interface.d.ts +2 -2
- package/dist/src/interfaces/DataList/data-text.interface.d.ts +5 -0
- package/dist/src/interfaces/DataList/data-title.interface.d.ts +5 -0
- package/dist/src/interfaces/DataTable/headers.interface.d.ts +5 -5
- package/dist/src/interfaces/DataTable/row.interface.d.ts +2 -2
- package/dist/src/interfaces/DatePicker/date-picker-controls.interface.d.ts +16 -8
- package/dist/src/interfaces/DatePicker/date-picker-header.interface.d.ts +6 -3
- package/dist/src/interfaces/DatePicker/date-picker-months.interface.d.ts +2 -2
- package/dist/src/interfaces/DatePicker/date-picker-years.interface.d.ts +1 -1
- package/dist/src/interfaces/DatePicker/date-picker.interface.d.ts +1 -1
- package/dist/src/interfaces/Dialog/dialog-confirmation.interface.d.ts +2 -2
- package/dist/src/interfaces/EmptyState/empty-state.interface.d.ts +9 -2
- package/dist/src/interfaces/ExpensionPanel/expansion-panel-header.interface.d.ts +2 -2
- package/dist/src/interfaces/Field/field.interface.d.ts +7 -2
- package/dist/src/interfaces/FileField/file-field-dragndrop-item.interface.d.ts +2 -2
- package/dist/src/interfaces/FileField/file-field-list-item.interface.d.ts +2 -2
- package/dist/src/interfaces/FileField/file-field.interface.d.ts +1 -1
- package/dist/src/interfaces/Form/form.interface.d.ts +2 -2
- package/dist/src/interfaces/Grids/row.interface.d.ts +2 -2
- package/dist/src/interfaces/InfiniteScroll/infinite-scroll.interface.d.ts +2 -2
- package/dist/src/interfaces/InlineEdit/inline-edit.interface.d.ts +31 -2
- package/dist/src/interfaces/Input/input.interface.d.ts +4 -3
- package/dist/src/interfaces/Kbd/kbd.interface.d.ts +2 -2
- package/dist/src/interfaces/Label/label.interface.d.ts +2 -2
- package/dist/src/interfaces/List/list-group.interface.d.ts +4 -1
- package/dist/src/interfaces/List/list-item.interface.d.ts +2 -2
- package/dist/src/interfaces/List/list-subheader.interface.d.ts +2 -2
- package/dist/src/interfaces/Media/media-scrubber.interface.d.ts +10 -2
- package/dist/src/interfaces/Messages/messages.interface.d.ts +2 -2
- package/dist/src/interfaces/NumberField/number-field.interface.d.ts +1 -1
- package/dist/src/interfaces/Nuxt/nuxt-module.interface.d.ts +55 -15
- package/dist/src/interfaces/OtpInputField/otp-input-field.interface.d.ts +4 -2
- package/dist/src/interfaces/Pagination/pagination.interface.d.ts +18 -3
- package/dist/src/interfaces/Parallax/parallax.interface.d.ts +2 -2
- package/dist/src/interfaces/PasswordField/password-field.interface.d.ts +1 -1
- package/dist/src/interfaces/Picker/picker-title.interface.d.ts +2 -2
- package/dist/src/interfaces/Progress/progress.interface.d.ts +8 -2
- package/dist/src/interfaces/RatingField/rating-field-item.interface.d.ts +2 -1
- package/dist/src/interfaces/SelectionControl/selection-control-group.interface.d.ts +2 -1
- package/dist/src/interfaces/SelectionControl/selection-control.interface.d.ts +23 -5
- package/dist/src/interfaces/Sheet/sheet.interface.d.ts +2 -2
- package/dist/src/interfaces/Snackbar/snackbar-item.interface.d.ts +2 -2
- package/dist/src/interfaces/SystemBar/system-bar.interface.d.ts +2 -2
- package/dist/src/interfaces/Table/table.interface.d.ts +2 -2
- package/dist/src/interfaces/Tabs/tab.interface.d.ts +7 -2
- package/dist/src/interfaces/TextField/text-field.interface.d.ts +1 -1
- package/dist/src/interfaces/TextMask/text-mask.interface.d.ts +7 -33
- package/dist/src/interfaces/TextareaField/textarea-field.interface.d.ts +3 -3
- package/dist/src/interfaces/Theme/origam-theme.interface.cjs +1 -0
- package/dist/src/interfaces/Theme/origam-theme.interface.d.ts +114 -0
- package/dist/src/interfaces/Theme/origam-theme.interface.js +0 -0
- package/dist/src/interfaces/Timeline/timeline.interface.d.ts +1 -1
- package/dist/src/interfaces/Title/title.interface.d.ts +2 -2
- package/dist/src/interfaces/Toolbar/toolbar.interface.d.ts +2 -2
- package/dist/src/interfaces/Tooltip/tooltip.interface.d.ts +2 -2
- package/dist/src/interfaces/Video/video.interface.d.ts +2 -2
- package/dist/src/interfaces/Window/window.interface.d.ts +2 -2
- package/dist/src/interfaces/index.cjs +33 -0
- package/dist/src/interfaces/index.d.ts +3 -0
- package/dist/src/interfaces/index.js +3 -0
- package/dist/src/nuxt/module.cjs +78 -8
- package/dist/src/nuxt/module.js +81 -9
- package/dist/src/nuxt/plugin.client.cjs +28 -10
- package/dist/src/nuxt/plugin.client.js +28 -10
- package/dist/src/nuxt/plugin.server.cjs +52 -12
- package/dist/src/nuxt/plugin.server.js +55 -13
- package/dist/src/origam.cjs +39 -2
- package/dist/src/origam.d.ts +19 -1
- package/dist/src/origam.js +46 -5
- package/dist/src/services/Commons/date-adapter.service.d.ts +1 -1
- package/dist/src/themes/index.cjs +24 -0
- package/dist/src/themes/index.d.ts +1 -0
- package/dist/src/themes/index.js +1 -0
- package/dist/src/themes/origam.theme.cjs +906 -0
- package/dist/src/themes/origam.theme.d.ts +4 -0
- package/dist/src/themes/origam.theme.js +379 -0
- package/dist/src/types/BottomNav/bottom-nav.type.d.ts +2 -0
- package/dist/src/types/Commons/font-family.type.cjs +1 -0
- package/dist/src/types/Commons/font-family.type.d.ts +5 -0
- package/dist/src/types/Commons/font-family.type.js +0 -0
- package/dist/src/types/Commons/font-size.type.cjs +1 -0
- package/dist/src/types/Commons/font-size.type.d.ts +6 -0
- package/dist/src/types/Commons/font-size.type.js +0 -0
- package/dist/src/types/Commons/font-weight.type.cjs +1 -0
- package/dist/src/types/Commons/font-weight.type.d.ts +5 -0
- package/dist/src/types/Commons/font-weight.type.js +0 -0
- package/dist/src/types/Commons/letter-spacing.type.cjs +1 -0
- package/dist/src/types/Commons/letter-spacing.type.d.ts +5 -0
- package/dist/src/types/Commons/letter-spacing.type.js +0 -0
- package/dist/src/types/Commons/line-height.type.cjs +1 -0
- package/dist/src/types/Commons/line-height.type.d.ts +5 -0
- package/dist/src/types/Commons/line-height.type.js +0 -0
- package/dist/src/types/Commons/mode.type.d.ts +1 -1
- package/dist/src/types/Theme/installed-theme.type.cjs +1 -0
- package/dist/src/types/Theme/installed-theme.type.d.ts +31 -0
- package/dist/src/types/Theme/installed-theme.type.js +0 -0
- package/dist/src/types/Theme/semantic-tree.type.cjs +1 -0
- package/dist/src/types/Theme/semantic-tree.type.d.ts +48 -0
- package/dist/src/types/Theme/semantic-tree.type.js +0 -0
- package/dist/src/types/Theme/theme.type.d.ts +27 -6
- package/dist/src/types/Theme/token-tree.type.cjs +1 -0
- package/dist/src/types/Theme/token-tree.type.d.ts +10 -0
- package/dist/src/types/Theme/token-tree.type.js +0 -0
- package/dist/src/types/index.cjs +88 -0
- package/dist/src/types/index.d.ts +8 -0
- package/dist/src/types/index.js +8 -0
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/dist/src/utils/Bracket/bracket-surface.util.cjs +106 -0
- package/dist/src/utils/Bracket/bracket-surface.util.d.ts +47 -0
- package/dist/src/utils/Bracket/bracket-surface.util.js +88 -0
- package/dist/src/utils/Commons/border.util.d.ts +1 -1
- package/dist/src/utils/Commons/color.util.cjs +4 -2
- package/dist/src/utils/Commons/color.util.js +4 -2
- package/dist/src/utils/Commons/commons.util.cjs +3 -2
- package/dist/src/utils/Commons/commons.util.d.ts +1 -1
- package/dist/src/utils/Commons/commons.util.js +3 -2
- package/dist/src/utils/Commons/date.util.d.ts +1 -1
- package/dist/src/utils/Commons/dom.util.d.ts +1 -1
- package/dist/src/utils/Commons/elevation.util.cjs +1 -1
- package/dist/src/utils/Commons/elevation.util.js +1 -1
- package/dist/src/utils/Commons/forwardRefs.util.cjs +1 -1
- package/dist/src/utils/Commons/forwardRefs.util.js +1 -1
- package/dist/src/utils/Commons/gradient.util.cjs +3 -3
- package/dist/src/utils/Commons/gradient.util.js +1 -1
- package/dist/src/utils/Commons/hover.util.cjs +5 -1
- package/dist/src/utils/Commons/hover.util.js +5 -1
- package/dist/src/utils/Commons/margin.util.d.ts +1 -1
- package/dist/src/utils/Commons/padding.util.d.ts +1 -1
- package/dist/src/utils/Commons/ripple.util.cjs +1 -2
- package/dist/src/utils/Commons/ripple.util.js +2 -3
- package/dist/src/utils/Commons/rounded.util.cjs +5 -0
- package/dist/src/utils/Commons/rounded.util.d.ts +10 -1
- package/dist/src/utils/Commons/rounded.util.js +4 -0
- package/dist/src/utils/DataTable/headers.util.cjs +1 -1
- package/dist/src/utils/DataTable/headers.util.js +1 -1
- package/dist/src/utils/DataTable/sort.util.cjs +2 -2
- package/dist/src/utils/DataTable/sort.util.js +2 -2
- package/dist/src/utils/List/list-item.util.d.ts +7 -0
- package/dist/src/utils/Theme/apply-theme.util.cjs +148 -0
- package/dist/src/utils/Theme/apply-theme.util.d.ts +65 -0
- package/dist/src/utils/Theme/apply-theme.util.js +125 -0
- package/dist/src/utils/Theme/token-name.util.cjs +47 -0
- package/dist/src/utils/Theme/token-name.util.d.ts +54 -0
- package/dist/src/utils/Theme/token-name.util.js +55 -0
- package/dist/src/utils/Transition/transition.util.d.ts +1 -1
- package/dist/src/utils/index.cjs +22 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/index.js +2 -0
- package/package.json +22 -63
- package/CHANGELOG.md +0 -807
- package/README.md +0 -275
- package/dist/src/App.vue +0 -25
- package/dist/src/main.cjs +0 -7
- package/dist/src/main.d.ts +0 -1
- package/dist/src/main.js +0 -4
- /package/dist/src/components/{QRCode → QrCode}/index.cjs +0 -0
- /package/dist/src/components/{QRCode → QrCode}/index.js +0 -0
- /package/dist/src/{components/QRCode/index.d.ts → interfaces/App/app.interface.js} +0 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.bracketDashArray = bracketDashArray;
|
|
7
|
+
exports.bracketSurfaceVars = bracketSurfaceVars;
|
|
8
|
+
exports.resolveBracketBorderColor = resolveBracketBorderColor;
|
|
9
|
+
exports.resolveBracketBorderWidth = resolveBracketBorderWidth;
|
|
10
|
+
exports.resolveBracketForeground = resolveBracketForeground;
|
|
11
|
+
exports.resolveBracketRadius = resolveBracketRadius;
|
|
12
|
+
exports.resolveBracketShadow = resolveBracketShadow;
|
|
13
|
+
exports.resolveBracketSurface = resolveBracketSurface;
|
|
14
|
+
var _commons = require("../Commons/commons.util.cjs");
|
|
15
|
+
var _color = require("../Commons/color.util.cjs");
|
|
16
|
+
const ROUNDED_RUNGS = ["none", "xs", "sm", "md", "lg", "xl", "full"];
|
|
17
|
+
const SHADOW_RUNGS = ["none", "xs", "sm", "md", "lg", "xl"];
|
|
18
|
+
const NAMED_RADIUS_VARS = {
|
|
19
|
+
"x-small": "var(--origam-radius---xs)",
|
|
20
|
+
"small": "var(--origam-radius---sm)",
|
|
21
|
+
"default": "var(--origam-radius---md)",
|
|
22
|
+
"medium": "var(--origam-radius---lg)",
|
|
23
|
+
"large": "var(--origam-radius---xl)",
|
|
24
|
+
"x-large": "var(--origam-radius---2xl)"
|
|
25
|
+
};
|
|
26
|
+
const BORDER_WIDTH_VARS = {
|
|
27
|
+
none: "var(--origam-border__width---0)",
|
|
28
|
+
thin: "var(--origam-border__width---thin)",
|
|
29
|
+
thick: "var(--origam-border__width---2)"
|
|
30
|
+
};
|
|
31
|
+
function resolveBracketSurface(value) {
|
|
32
|
+
if (!value) return null;
|
|
33
|
+
if ((0, _color.isIntent)(value)) return (0, _color.tokenStylesForIntent)(value, "default")["background-color"];
|
|
34
|
+
if (value === "transparent") return "transparent";
|
|
35
|
+
if (typeof value === "string" && (0, _color.isCssColor)(value)) return value;
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
function resolveBracketForeground(value) {
|
|
39
|
+
if (!value) return null;
|
|
40
|
+
if ((0, _color.isIntent)(value)) return (0, _color.tokenForegroundForIntent)(value);
|
|
41
|
+
if (value === "transparent") return "transparent";
|
|
42
|
+
if (typeof value === "string" && (0, _color.isCssColor)(value)) return value;
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
function resolveBracketRadius(value) {
|
|
46
|
+
if (value == null || value === false) return null;
|
|
47
|
+
if (typeof value === "string") {
|
|
48
|
+
if (value in NAMED_RADIUS_VARS) return NAMED_RADIUS_VARS[value];
|
|
49
|
+
if (ROUNDED_RUNGS.includes(value)) return `var(--origam-radius---${value})`;
|
|
50
|
+
if (value === "") return "var(--origam-radius---md)";
|
|
51
|
+
return value.includes(" ") ? value : (0, _commons.convertToUnit)(value) ?? value;
|
|
52
|
+
}
|
|
53
|
+
if (value === true) return "var(--origam-radius---md)";
|
|
54
|
+
return (0, _commons.convertToUnit)(value) ?? null;
|
|
55
|
+
}
|
|
56
|
+
function resolveBracketShadow(value) {
|
|
57
|
+
if (value == null || value === false) return null;
|
|
58
|
+
if (typeof value === "number") {
|
|
59
|
+
const rung = value <= 0 ? "none" : value <= 2 ? "xs" : value <= 4 ? "sm" : value <= 8 ? "md" : value <= 16 ? "lg" : "xl";
|
|
60
|
+
return `var(--origam-shadow---${rung})`;
|
|
61
|
+
}
|
|
62
|
+
if (typeof value === "string" && SHADOW_RUNGS.includes(value)) return `var(--origam-shadow---${value})`;
|
|
63
|
+
if (value === true) return "var(--origam-shadow---md)";
|
|
64
|
+
return typeof value === "string" ? value : null;
|
|
65
|
+
}
|
|
66
|
+
function resolveBracketBorderWidth(value) {
|
|
67
|
+
if (value == null || value === false) return null;
|
|
68
|
+
if (typeof value === "string" && value in BORDER_WIDTH_VARS) return BORDER_WIDTH_VARS[value];
|
|
69
|
+
if (value === true || value === "") return "var(--origam-border__width---thin)";
|
|
70
|
+
if (typeof value === "number") return (0, _commons.convertToUnit)(value) ?? null;
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
function resolveBracketBorderColor(value) {
|
|
74
|
+
if (!value) return null;
|
|
75
|
+
if ((0, _color.isIntent)(value)) return (0, _color.tokenForegroundForIntent)(value);
|
|
76
|
+
if (typeof value === "string" && (0, _color.isCssColor)(value)) return value;
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
function bracketDashArray(borderStyle) {
|
|
80
|
+
if (borderStyle === "dashed") return {
|
|
81
|
+
dasharray: "8 5"
|
|
82
|
+
};
|
|
83
|
+
if (borderStyle === "dotted") return {
|
|
84
|
+
dasharray: "1 5",
|
|
85
|
+
linecap: "round"
|
|
86
|
+
};
|
|
87
|
+
return {};
|
|
88
|
+
}
|
|
89
|
+
function bracketSurfaceVars(input) {
|
|
90
|
+
const vars = {};
|
|
91
|
+
const surface = resolveBracketSurface(input.bgColor);
|
|
92
|
+
if (surface) {
|
|
93
|
+
vars["--origam-bracket-match---background-color"] = surface;
|
|
94
|
+
vars["--origam-bracket-match--hover---background-color"] = surface;
|
|
95
|
+
}
|
|
96
|
+
const radius = resolveBracketRadius(input.rounded);
|
|
97
|
+
if (radius) vars["--origam-bracket-match---border-radius"] = radius;
|
|
98
|
+
const shadow = resolveBracketShadow(input.elevation);
|
|
99
|
+
if (shadow) vars["--origam-bracket-match---box-shadow"] = shadow;
|
|
100
|
+
const borderWidth = resolveBracketBorderWidth(input.border);
|
|
101
|
+
if (borderWidth) vars["--origam-bracket-match---border-width"] = borderWidth;
|
|
102
|
+
if (input.borderStyle) vars["--origam-bracket-match---border-style"] = input.borderStyle;
|
|
103
|
+
const borderColor = resolveBracketBorderColor(input.borderColor);
|
|
104
|
+
if (borderColor) vars["--origam-bracket-match---border-color"] = borderColor;
|
|
105
|
+
return vars;
|
|
106
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared resolvers for the Bracket family surface. The match card's
|
|
3
|
+
* background / radius / shadow / border are driven through
|
|
4
|
+
* `--origam-bracket-match---*` CSS custom properties; both `OrigamBracket`
|
|
5
|
+
* (which paints every match from the tree root) and `OrigamBracketMatch`
|
|
6
|
+
* (standalone) resolve their props the same way through here — single
|
|
7
|
+
* source of truth, no per-component duplication.
|
|
8
|
+
*
|
|
9
|
+
* Tokenised intents / rungs resolve to the generated theme vars; custom
|
|
10
|
+
* numbers and CSS values pass through `convertToUnit` (or verbatim).
|
|
11
|
+
*/
|
|
12
|
+
type TBracketColor = string | null | undefined;
|
|
13
|
+
type TBracketRounded = string | number | boolean | null | undefined;
|
|
14
|
+
type TBracketElevation = string | number | boolean | null | undefined;
|
|
15
|
+
type TBracketBorder = string | number | boolean | null | undefined;
|
|
16
|
+
/** `bgColor` → the match surface fill. */
|
|
17
|
+
export declare function resolveBracketSurface(value: TBracketColor): string | null;
|
|
18
|
+
/** `color` → text colour on the neutral surface (no auto-contrast). */
|
|
19
|
+
export declare function resolveBracketForeground(value: TBracketColor): string | null;
|
|
20
|
+
/** `rounded` → `border-radius` (named variant / utility rung / free-form). */
|
|
21
|
+
export declare function resolveBracketRadius(value: TBracketRounded): string | null;
|
|
22
|
+
/** `elevation` → `box-shadow` (numeric ladder bucketised to a shadow rung). */
|
|
23
|
+
export declare function resolveBracketShadow(value: TBracketElevation): string | null;
|
|
24
|
+
/** `border` → `border-width` (utility keyword / number / boolean). */
|
|
25
|
+
export declare function resolveBracketBorderWidth(value: TBracketBorder): string | null;
|
|
26
|
+
/** `borderColor` → a colour value (intent → its token, else the CSS value). */
|
|
27
|
+
export declare function resolveBracketBorderColor(value: TBracketColor): string | null;
|
|
28
|
+
/** SVG dash pattern for a connector matching a `border-style`. */
|
|
29
|
+
export declare function bracketDashArray(borderStyle: string | null | undefined): {
|
|
30
|
+
dasharray?: string;
|
|
31
|
+
linecap?: string;
|
|
32
|
+
};
|
|
33
|
+
export interface IBracketSurfaceInput {
|
|
34
|
+
bgColor?: TBracketColor;
|
|
35
|
+
rounded?: TBracketRounded;
|
|
36
|
+
elevation?: TBracketElevation;
|
|
37
|
+
border?: TBracketBorder;
|
|
38
|
+
borderColor?: TBracketColor;
|
|
39
|
+
borderStyle?: string | null;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Assemble the `--origam-bracket-match---*` custom properties for a match
|
|
43
|
+
* surface from a prop bag. Used by both `OrigamBracket` (root, all matches)
|
|
44
|
+
* and `OrigamBracketMatch` (standalone).
|
|
45
|
+
*/
|
|
46
|
+
export declare function bracketSurfaceVars(input: IBracketSurfaceInput): Record<string, string>;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { convertToUnit } from "../Commons/commons.util.js";
|
|
2
|
+
import { isCssColor, isIntent, tokenForegroundForIntent, tokenStylesForIntent } from "../Commons/color.util.js";
|
|
3
|
+
const ROUNDED_RUNGS = ["none", "xs", "sm", "md", "lg", "xl", "full"];
|
|
4
|
+
const SHADOW_RUNGS = ["none", "xs", "sm", "md", "lg", "xl"];
|
|
5
|
+
const NAMED_RADIUS_VARS = {
|
|
6
|
+
"x-small": "var(--origam-radius---xs)",
|
|
7
|
+
"small": "var(--origam-radius---sm)",
|
|
8
|
+
"default": "var(--origam-radius---md)",
|
|
9
|
+
"medium": "var(--origam-radius---lg)",
|
|
10
|
+
"large": "var(--origam-radius---xl)",
|
|
11
|
+
"x-large": "var(--origam-radius---2xl)"
|
|
12
|
+
};
|
|
13
|
+
const BORDER_WIDTH_VARS = {
|
|
14
|
+
none: "var(--origam-border__width---0)",
|
|
15
|
+
thin: "var(--origam-border__width---thin)",
|
|
16
|
+
thick: "var(--origam-border__width---2)"
|
|
17
|
+
};
|
|
18
|
+
export function resolveBracketSurface(value) {
|
|
19
|
+
if (!value) return null;
|
|
20
|
+
if (isIntent(value)) return tokenStylesForIntent(value, "default")["background-color"];
|
|
21
|
+
if (value === "transparent") return "transparent";
|
|
22
|
+
if (typeof value === "string" && isCssColor(value)) return value;
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
export function resolveBracketForeground(value) {
|
|
26
|
+
if (!value) return null;
|
|
27
|
+
if (isIntent(value)) return tokenForegroundForIntent(value);
|
|
28
|
+
if (value === "transparent") return "transparent";
|
|
29
|
+
if (typeof value === "string" && isCssColor(value)) return value;
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
export function resolveBracketRadius(value) {
|
|
33
|
+
if (value == null || value === false) return null;
|
|
34
|
+
if (typeof value === "string") {
|
|
35
|
+
if (value in NAMED_RADIUS_VARS) return NAMED_RADIUS_VARS[value];
|
|
36
|
+
if (ROUNDED_RUNGS.includes(value)) return `var(--origam-radius---${value})`;
|
|
37
|
+
if (value === "") return "var(--origam-radius---md)";
|
|
38
|
+
return value.includes(" ") ? value : convertToUnit(value) ?? value;
|
|
39
|
+
}
|
|
40
|
+
if (value === true) return "var(--origam-radius---md)";
|
|
41
|
+
return convertToUnit(value) ?? null;
|
|
42
|
+
}
|
|
43
|
+
export function resolveBracketShadow(value) {
|
|
44
|
+
if (value == null || value === false) return null;
|
|
45
|
+
if (typeof value === "number") {
|
|
46
|
+
const rung = value <= 0 ? "none" : value <= 2 ? "xs" : value <= 4 ? "sm" : value <= 8 ? "md" : value <= 16 ? "lg" : "xl";
|
|
47
|
+
return `var(--origam-shadow---${rung})`;
|
|
48
|
+
}
|
|
49
|
+
if (typeof value === "string" && SHADOW_RUNGS.includes(value)) return `var(--origam-shadow---${value})`;
|
|
50
|
+
if (value === true) return "var(--origam-shadow---md)";
|
|
51
|
+
return typeof value === "string" ? value : null;
|
|
52
|
+
}
|
|
53
|
+
export function resolveBracketBorderWidth(value) {
|
|
54
|
+
if (value == null || value === false) return null;
|
|
55
|
+
if (typeof value === "string" && value in BORDER_WIDTH_VARS) return BORDER_WIDTH_VARS[value];
|
|
56
|
+
if (value === true || value === "") return "var(--origam-border__width---thin)";
|
|
57
|
+
if (typeof value === "number") return convertToUnit(value) ?? null;
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
export function resolveBracketBorderColor(value) {
|
|
61
|
+
if (!value) return null;
|
|
62
|
+
if (isIntent(value)) return tokenForegroundForIntent(value);
|
|
63
|
+
if (typeof value === "string" && isCssColor(value)) return value;
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
export function bracketDashArray(borderStyle) {
|
|
67
|
+
if (borderStyle === "dashed") return { dasharray: "8 5" };
|
|
68
|
+
if (borderStyle === "dotted") return { dasharray: "1 5", linecap: "round" };
|
|
69
|
+
return {};
|
|
70
|
+
}
|
|
71
|
+
export function bracketSurfaceVars(input) {
|
|
72
|
+
const vars = {};
|
|
73
|
+
const surface = resolveBracketSurface(input.bgColor);
|
|
74
|
+
if (surface) {
|
|
75
|
+
vars["--origam-bracket-match---background-color"] = surface;
|
|
76
|
+
vars["--origam-bracket-match--hover---background-color"] = surface;
|
|
77
|
+
}
|
|
78
|
+
const radius = resolveBracketRadius(input.rounded);
|
|
79
|
+
if (radius) vars["--origam-bracket-match---border-radius"] = radius;
|
|
80
|
+
const shadow = resolveBracketShadow(input.elevation);
|
|
81
|
+
if (shadow) vars["--origam-bracket-match---box-shadow"] = shadow;
|
|
82
|
+
const borderWidth = resolveBracketBorderWidth(input.border);
|
|
83
|
+
if (borderWidth) vars["--origam-bracket-match---border-width"] = borderWidth;
|
|
84
|
+
if (input.borderStyle) vars["--origam-bracket-match---border-style"] = input.borderStyle;
|
|
85
|
+
const borderColor = resolveBracketBorderColor(input.borderColor);
|
|
86
|
+
if (borderColor) vars["--origam-bracket-match---border-color"] = borderColor;
|
|
87
|
+
return vars;
|
|
88
|
+
}
|
|
@@ -184,7 +184,7 @@ function HSVtoCSS(hsva) {
|
|
|
184
184
|
}
|
|
185
185
|
function toHex(v) {
|
|
186
186
|
const h = Math.round(v).toString(16);
|
|
187
|
-
return ("00".
|
|
187
|
+
return ("00".slice(0, 2 - h.length) + h).toUpperCase();
|
|
188
188
|
}
|
|
189
189
|
function RGBtoHex({
|
|
190
190
|
r,
|
|
@@ -273,7 +273,9 @@ function parseGradient(gradient, colors) {
|
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
function classToHex(color, colors) {
|
|
276
|
-
const
|
|
276
|
+
const parts = color.toString().trim().split(" ", 2);
|
|
277
|
+
const colorName = parts[0];
|
|
278
|
+
const colorModifier = parts[1]?.replace(/-/g, "");
|
|
277
279
|
let hexColor = "";
|
|
278
280
|
if (colorName && colorName in colors) {
|
|
279
281
|
if (colorModifier && colorModifier in colors[colorName]) {
|
|
@@ -133,7 +133,7 @@ export function HSVtoCSS(hsva) {
|
|
|
133
133
|
}
|
|
134
134
|
export function toHex(v) {
|
|
135
135
|
const h = Math.round(v).toString(16);
|
|
136
|
-
return ("00".
|
|
136
|
+
return ("00".slice(0, 2 - h.length) + h).toUpperCase();
|
|
137
137
|
}
|
|
138
138
|
export function RGBtoHex({ r, g, b, a }) {
|
|
139
139
|
return `#${[
|
|
@@ -207,7 +207,9 @@ export function parseGradient(gradient, colors) {
|
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
209
|
export function classToHex(color, colors) {
|
|
210
|
-
const
|
|
210
|
+
const parts = color.toString().trim().split(" ", 2);
|
|
211
|
+
const colorName = parts[0];
|
|
212
|
+
const colorModifier = parts[1]?.replace(/-/g, "");
|
|
211
213
|
let hexColor = "";
|
|
212
214
|
if (colorName && colorName in colors) {
|
|
213
215
|
if (colorModifier && colorModifier in colors[colorName]) {
|
|
@@ -89,7 +89,8 @@ function findChildrenWithProvide(key, vnode) {
|
|
|
89
89
|
} else if (Array.isArray(vnode.children)) {
|
|
90
90
|
return vnode.children.map(child => findChildrenWithProvide(key, child)).flat(1);
|
|
91
91
|
} else if (vnode.component) {
|
|
92
|
-
|
|
92
|
+
const componentProvides = vnode.component.provides ?? {};
|
|
93
|
+
if (Object.getOwnPropertySymbols(componentProvides).includes(key)) {
|
|
93
94
|
return [vnode.component];
|
|
94
95
|
} else if (vnode.component.subTree) {
|
|
95
96
|
return findChildrenWithProvide(key, vnode.component.subTree).flat(1);
|
|
@@ -132,7 +133,7 @@ function chunk(str, size = 1) {
|
|
|
132
133
|
const chunked = [];
|
|
133
134
|
let index = 0;
|
|
134
135
|
while (index < str.length) {
|
|
135
|
-
chunked.push(str.
|
|
136
|
+
chunked.push(str.slice(index, index + size));
|
|
136
137
|
index += size;
|
|
137
138
|
}
|
|
138
139
|
return chunked;
|
|
@@ -215,7 +215,7 @@ export declare function focusableChildren(el: Element, filterByTabIndex?: boolea
|
|
|
215
215
|
* @param location …
|
|
216
216
|
* @param condition …
|
|
217
217
|
*/
|
|
218
|
-
export declare function getNextElement(elements: Array<HTMLElement>, location?: 'next' | 'prev', condition?: (el: HTMLElement) => boolean):
|
|
218
|
+
export declare function getNextElement(elements: Array<HTMLElement>, location?: 'next' | 'prev', condition?: (el: HTMLElement) => boolean): HTMLElement;
|
|
219
219
|
/**
|
|
220
220
|
* Human readable file size.
|
|
221
221
|
*
|
|
@@ -50,7 +50,8 @@ export function findChildrenWithProvide(key, vnode) {
|
|
|
50
50
|
} else if (Array.isArray(vnode.children)) {
|
|
51
51
|
return vnode.children.map((child) => findChildrenWithProvide(key, child)).flat(1);
|
|
52
52
|
} else if (vnode.component) {
|
|
53
|
-
|
|
53
|
+
const componentProvides = vnode.component.provides ?? {};
|
|
54
|
+
if (Object.getOwnPropertySymbols(componentProvides).includes(key)) {
|
|
54
55
|
return [vnode.component];
|
|
55
56
|
} else if (vnode.component.subTree) {
|
|
56
57
|
return findChildrenWithProvide(key, vnode.component.subTree).flat(1);
|
|
@@ -91,7 +92,7 @@ export function chunk(str, size = 1) {
|
|
|
91
92
|
const chunked = [];
|
|
92
93
|
let index = 0;
|
|
93
94
|
while (index < str.length) {
|
|
94
|
-
chunked.push(str.
|
|
95
|
+
chunked.push(str.slice(index, index + size));
|
|
95
96
|
index += size;
|
|
96
97
|
}
|
|
97
98
|
return chunked;
|
|
@@ -293,7 +293,7 @@ export declare function endOfDay(date: Date): Date;
|
|
|
293
293
|
* @param locale …
|
|
294
294
|
* @param firstDayOfWeek …
|
|
295
295
|
*/
|
|
296
|
-
export declare function getWeekArray(date: Date, locale: string, firstDayOfWeek?: number):
|
|
296
|
+
export declare function getWeekArray(date: Date, locale: string, firstDayOfWeek?: number): Date[][];
|
|
297
297
|
/**
|
|
298
298
|
* Start of week.
|
|
299
299
|
*
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* - 'null' if the node is not attached to the DOM
|
|
4
4
|
* - the root node (HTMLDocument | ShadowRoot) otherwise
|
|
5
5
|
*/
|
|
6
|
-
export declare function attachedRoot(node: Node): null |
|
|
6
|
+
export declare function attachedRoot(node: Node): null | Document | ShadowRoot;
|
|
@@ -15,7 +15,7 @@ function formatElevationStyle(elevation = 0, bgColor) {
|
|
|
15
15
|
s: 0,
|
|
16
16
|
l: 0
|
|
17
17
|
};
|
|
18
|
-
if (bgColor && (0, _utils.isParsableColor)(bgColor)) {
|
|
18
|
+
if (typeof bgColor === "string" && (0, _utils.isParsableColor)(bgColor)) {
|
|
19
19
|
color = (0, _utils.HSVtoHSL)((0, _utils.RGBtoHSV)((0, _utils.parseColor)(bgColor)));
|
|
20
20
|
}
|
|
21
21
|
return `box-shadow: ${(0, _utils.convertToUnit)(offsetX)} ${(0, _utils.convertToUnit)(offsetY)} ${(0, _utils.convertToUnit)(blurRadius)} hsl(${(0, _utils.convertToUnit)(color.h, "deg")} ${(0, _utils.convertToUnit)(color.s * 100, "%")} ${(0, _utils.convertToUnit)(color.l * 100, "%")} / ${opacity.toFixed(2)})`;
|
|
@@ -5,7 +5,7 @@ export function formatElevationStyle(elevation = 0, bgColor) {
|
|
|
5
5
|
const offsetY = roundTo(normalize(elevation * 0.04, 0, 1, 0, 16), 1);
|
|
6
6
|
const opacity = roundTo(normalize(elevation * 0.04, 0, 1, 0.5, 0.25), 2);
|
|
7
7
|
let color = { h: 0, s: 0, l: 0 };
|
|
8
|
-
if (bgColor && isParsableColor(bgColor)) {
|
|
8
|
+
if (typeof bgColor === "string" && isParsableColor(bgColor)) {
|
|
9
9
|
color = HSVtoHSL(RGBtoHSV(parseColor(bgColor)));
|
|
10
10
|
}
|
|
11
11
|
return `box-shadow: ${convertToUnit(offsetX)} ${convertToUnit(offsetY)} ${convertToUnit(blurRadius)} hsl(${convertToUnit(color.h, "deg")} ${convertToUnit(color.s * 100, "%")} ${convertToUnit(color.l * 100, "%")} / ${opacity.toFixed(2)})`;
|
|
@@ -62,7 +62,7 @@ function forwardRefs(target, ...refs) {
|
|
|
62
62
|
const ref2 = queue.shift();
|
|
63
63
|
const descriptor2 = getDescriptor(ref2.value, key);
|
|
64
64
|
if (descriptor2) return descriptor2;
|
|
65
|
-
const childRefs2 = ref2.value
|
|
65
|
+
const childRefs2 = ref2.value?.[_consts.FORWARD_REFS];
|
|
66
66
|
if (childRefs2) queue.push(...childRefs2);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -55,7 +55,7 @@ export function forwardRefs(target, ...refs) {
|
|
|
55
55
|
const ref2 = queue.shift();
|
|
56
56
|
const descriptor2 = getDescriptor(ref2.value, key);
|
|
57
57
|
if (descriptor2) return descriptor2;
|
|
58
|
-
const childRefs2 = ref2.value
|
|
58
|
+
const childRefs2 = ref2.value?.[FORWARD_REFS];
|
|
59
59
|
if (childRefs2) queue.push(...childRefs2);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.gradientFromObject = gradientFromObject;
|
|
7
7
|
exports.isGradient = isGradient;
|
|
8
8
|
exports.resolveGradient = resolveGradient;
|
|
9
|
-
var
|
|
9
|
+
var _color = require("./color.util.cjs");
|
|
10
10
|
const GRADIENT_FN_RE = /^\s*(repeating-)?(linear|radial|conic)-gradient\s*\(/i;
|
|
11
11
|
const PRESET_PREFIX = "gradient-";
|
|
12
12
|
function isGradientString(value) {
|
|
@@ -29,8 +29,8 @@ function isGradient(value) {
|
|
|
29
29
|
return isGradientObject(value);
|
|
30
30
|
}
|
|
31
31
|
function resolveStopColor(color) {
|
|
32
|
-
if ((0,
|
|
33
|
-
return `var(--origam-color__${(0,
|
|
32
|
+
if ((0, _color.isIntent)(color)) {
|
|
33
|
+
return `var(--origam-color__${(0, _color.intentTokenBase)(color)}---bg)`;
|
|
34
34
|
}
|
|
35
35
|
return color;
|
|
36
36
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { intentTokenBase, isIntent } from "./color.util.
|
|
1
|
+
import { intentTokenBase, isIntent } from "./color.util.js";
|
|
2
2
|
const GRADIENT_FN_RE = /^\s*(repeating-)?(linear|radial|conic)-gradient\s*\(/i;
|
|
3
3
|
const PRESET_PREFIX = "gradient-";
|
|
4
4
|
function isGradientString(value) {
|
|
@@ -20,12 +20,14 @@ function updateHover(el, binding, wasEnabled, name) {
|
|
|
20
20
|
const options = {
|
|
21
21
|
class: `${name}--hover`
|
|
22
22
|
};
|
|
23
|
-
if ((0, _utils.isObject)(value) && value.class) {
|
|
23
|
+
if ((0, _utils.isObject)(value) && typeof value.class === "string") {
|
|
24
24
|
options.class = value.class;
|
|
25
25
|
}
|
|
26
26
|
el._hover = el._hover ?? {};
|
|
27
27
|
el._hover.enabled = enabled;
|
|
28
28
|
el._hover.class = options.class;
|
|
29
|
+
el._hover.mouseenter = (0, _utils.isObject)(value) ? value.mouseenter : void 0;
|
|
30
|
+
el._hover.mouseleave = (0, _utils.isObject)(value) ? value.mouseleave : void 0;
|
|
29
31
|
if (!enabled) {
|
|
30
32
|
_consts.HOVER.hide(el, options);
|
|
31
33
|
}
|
|
@@ -70,6 +72,7 @@ function hoverShow(e) {
|
|
|
70
72
|
value.class = element._hover.class;
|
|
71
73
|
}
|
|
72
74
|
_consts.HOVER.show(e, element, value);
|
|
75
|
+
element._hover.mouseenter?.(element, e);
|
|
73
76
|
}
|
|
74
77
|
function hoverStop(e) {
|
|
75
78
|
e[_consts.ORIGAM_HOVER_STOP_KEY] = true;
|
|
@@ -84,6 +87,7 @@ function hoverHide(e) {
|
|
|
84
87
|
value.class = element._hover.class;
|
|
85
88
|
}
|
|
86
89
|
_consts.HOVER.hide(element, value);
|
|
90
|
+
element._hover.mouseleave?.(element, e);
|
|
87
91
|
}
|
|
88
92
|
function hoverRemoveListeners(el) {
|
|
89
93
|
el.removeEventListener("mouseenter", hoverShow);
|
|
@@ -4,12 +4,14 @@ export function updateHover(el, binding, wasEnabled, name) {
|
|
|
4
4
|
const { value, modifiers } = binding;
|
|
5
5
|
const enabled = isHoverEnabled(value);
|
|
6
6
|
const options = { class: `${name}--hover` };
|
|
7
|
-
if (isObject(value) && value.class) {
|
|
7
|
+
if (isObject(value) && typeof value.class === "string") {
|
|
8
8
|
options.class = value.class;
|
|
9
9
|
}
|
|
10
10
|
el._hover = el._hover ?? {};
|
|
11
11
|
el._hover.enabled = enabled;
|
|
12
12
|
el._hover.class = options.class;
|
|
13
|
+
el._hover.mouseenter = isObject(value) ? value.mouseenter : void 0;
|
|
14
|
+
el._hover.mouseleave = isObject(value) ? value.mouseleave : void 0;
|
|
13
15
|
if (!enabled) {
|
|
14
16
|
HOVER.hide(el, options);
|
|
15
17
|
}
|
|
@@ -46,6 +48,7 @@ export function hoverShow(e) {
|
|
|
46
48
|
value.class = element._hover.class;
|
|
47
49
|
}
|
|
48
50
|
HOVER.show(e, element, value);
|
|
51
|
+
element._hover.mouseenter?.(element, e);
|
|
49
52
|
}
|
|
50
53
|
export function hoverStop(e) {
|
|
51
54
|
e[ORIGAM_HOVER_STOP_KEY] = true;
|
|
@@ -58,6 +61,7 @@ export function hoverHide(e) {
|
|
|
58
61
|
value.class = element._hover.class;
|
|
59
62
|
}
|
|
60
63
|
HOVER.hide(element, value);
|
|
64
|
+
element._hover.mouseleave?.(element, e);
|
|
61
65
|
}
|
|
62
66
|
export function hoverRemoveListeners(el) {
|
|
63
67
|
el.removeEventListener("mouseenter", hoverShow);
|
|
@@ -179,11 +179,10 @@ function rippleRemoveListeners(el) {
|
|
|
179
179
|
}
|
|
180
180
|
function rippleTransform(el, value) {
|
|
181
181
|
el.style.transform = value;
|
|
182
|
-
el.style.webkitTransform = value;
|
|
183
182
|
}
|
|
184
183
|
let keyboardRipple = false;
|
|
185
184
|
function keyboardRippleShow(e) {
|
|
186
|
-
if (!keyboardRipple && (e.
|
|
185
|
+
if (!keyboardRipple && (e.key === "Enter" || e.key === " ")) {
|
|
187
186
|
keyboardRipple = true;
|
|
188
187
|
rippleShow(e);
|
|
189
188
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DELAY_RIPPLE,
|
|
1
|
+
import { DELAY_RIPPLE, ORIGAM_RIPPLE_STOP_KEY, RIPPLES } from "../../consts/index.js";
|
|
2
2
|
import { isObject } from "../../utils/index.js";
|
|
3
3
|
export function updateRipple(el, binding, wasEnabled) {
|
|
4
4
|
const { value, modifiers } = binding;
|
|
@@ -140,11 +140,10 @@ export function rippleRemoveListeners(el) {
|
|
|
140
140
|
}
|
|
141
141
|
export function rippleTransform(el, value) {
|
|
142
142
|
el.style.transform = value;
|
|
143
|
-
el.style.webkitTransform = value;
|
|
144
143
|
}
|
|
145
144
|
let keyboardRipple = false;
|
|
146
145
|
export function keyboardRippleShow(e) {
|
|
147
|
-
if (!keyboardRipple && (e.
|
|
146
|
+
if (!keyboardRipple && (e.key === "Enter" || e.key === " ")) {
|
|
148
147
|
keyboardRipple = true;
|
|
149
148
|
rippleShow(e);
|
|
150
149
|
}
|
|
@@ -4,6 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.formatRoundedStylesVar = formatRoundedStylesVar;
|
|
7
|
+
exports.isCustomBorderRadius = isCustomBorderRadius;
|
|
8
|
+
var _consts = require("../../consts/index.cjs");
|
|
9
|
+
function isCustomBorderRadius(value) {
|
|
10
|
+
return _consts.CUSTOM_BORDER_RADIUS_REGEX.test(value.trim());
|
|
11
|
+
}
|
|
7
12
|
function formatRoundedStylesVar(values) {
|
|
8
13
|
const styles = [];
|
|
9
14
|
switch (values.length) {
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a string is a free-form custom `border-radius` value (a
|
|
3
|
+
* `var(...)` / `calc(...)` reference or a single CSS length outside the
|
|
4
|
+
* literal `BORDER_RADIUS_REGEX` whitelist) that should be emitted verbatim
|
|
5
|
+
* as an inline `border-radius` declaration.
|
|
6
|
+
*
|
|
7
|
+
* @param value …
|
|
8
|
+
*/
|
|
9
|
+
export declare function isCustomBorderRadius(value: string): boolean;
|
|
1
10
|
/**
|
|
2
11
|
* Format rounded styles var.
|
|
3
12
|
*
|
|
4
13
|
* @param values …
|
|
5
14
|
*/
|
|
6
|
-
export declare function formatRoundedStylesVar(values: Array<string>):
|
|
15
|
+
export declare function formatRoundedStylesVar(values: Array<string>): string[];
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { CUSTOM_BORDER_RADIUS_REGEX } from "../../consts/index.js";
|
|
2
|
+
export function isCustomBorderRadius(value) {
|
|
3
|
+
return CUSTOM_BORDER_RADIUS_REGEX.test(value.trim());
|
|
4
|
+
}
|
|
1
5
|
export function formatRoundedStylesVar(values) {
|
|
2
6
|
const styles = [];
|
|
3
7
|
switch (values.length) {
|
|
@@ -41,7 +41,7 @@ function convertToInternalHeaders(items) {
|
|
|
41
41
|
...defaultItem,
|
|
42
42
|
key,
|
|
43
43
|
value,
|
|
44
|
-
sortable: defaultItem.sortable ?? (
|
|
44
|
+
sortable: defaultItem.sortable ?? (key != null || !!defaultItem.sort),
|
|
45
45
|
children: defaultItem.children ? convertToInternalHeaders(defaultItem.children) : void 0
|
|
46
46
|
};
|
|
47
47
|
internalHeaders.push(internalItem);
|
|
@@ -25,7 +25,7 @@ export function convertToInternalHeaders(items) {
|
|
|
25
25
|
...defaultItem,
|
|
26
26
|
key,
|
|
27
27
|
value,
|
|
28
|
-
sortable: defaultItem.sortable ?? (
|
|
28
|
+
sortable: defaultItem.sortable ?? (key != null || !!defaultItem.sort),
|
|
29
29
|
children: defaultItem.children ? convertToInternalHeaders(defaultItem.children) : void 0
|
|
30
30
|
};
|
|
31
31
|
internalHeaders.push(internalItem);
|
|
@@ -32,13 +32,13 @@ function sortItems(items, sortByItems, options) {
|
|
|
32
32
|
const customResult = options.sortRawFunctions[sortKey](sortARaw, sortBRaw);
|
|
33
33
|
if (customResult == null) continue;
|
|
34
34
|
hasCustomResult = true;
|
|
35
|
-
if (customResult) return customResult;
|
|
35
|
+
if (customResult !== 0) return customResult;
|
|
36
36
|
}
|
|
37
37
|
if (options?.sortFunctions?.[sortKey]) {
|
|
38
38
|
const customResult = options.sortFunctions[sortKey](sortA, sortB);
|
|
39
39
|
if (customResult == null) continue;
|
|
40
40
|
hasCustomResult = true;
|
|
41
|
-
if (customResult) return customResult;
|
|
41
|
+
if (customResult !== 0) return customResult;
|
|
42
42
|
}
|
|
43
43
|
if (hasCustomResult) continue;
|
|
44
44
|
if (sortA instanceof Date && sortB instanceof Date) {
|
|
@@ -28,13 +28,13 @@ export function sortItems(items, sortByItems, options) {
|
|
|
28
28
|
const customResult = options.sortRawFunctions[sortKey](sortARaw, sortBRaw);
|
|
29
29
|
if (customResult == null) continue;
|
|
30
30
|
hasCustomResult = true;
|
|
31
|
-
if (customResult) return customResult;
|
|
31
|
+
if (customResult !== 0) return customResult;
|
|
32
32
|
}
|
|
33
33
|
if (options?.sortFunctions?.[sortKey]) {
|
|
34
34
|
const customResult = options.sortFunctions[sortKey](sortA, sortB);
|
|
35
35
|
if (customResult == null) continue;
|
|
36
36
|
hasCustomResult = true;
|
|
37
|
-
if (customResult) return customResult;
|
|
37
|
+
if (customResult !== 0) return customResult;
|
|
38
38
|
}
|
|
39
39
|
if (hasCustomResult) continue;
|
|
40
40
|
if (sortA instanceof Date && sortB instanceof Date) {
|
|
@@ -14,5 +14,12 @@ export declare function transformListItems(props: IItemProps & {
|
|
|
14
14
|
* @param props …
|
|
15
15
|
* @param item …
|
|
16
16
|
* @returns …
|
|
17
|
+
*
|
|
18
|
+
* @note When `props.itemValue` is `undefined`, `getPropertyFromItem` returns
|
|
19
|
+
* its fallback, which is `title` (the resolved title value). This is the
|
|
20
|
+
* intentional Vuetify-like behaviour: without an explicit `itemValue` mapping,
|
|
21
|
+
* the item's resolved title becomes both its display label and its selection
|
|
22
|
+
* value. This is NOT a bug — it enables string arrays to work without any
|
|
23
|
+
* additional configuration (e.g. `items: ['Alice', 'Bob']`).
|
|
17
24
|
*/
|
|
18
25
|
export declare function transformListItem(props: Omit<IItemProps, 'items'>, item: any): IInternalListItem;
|