origam 2.5.0 → 2.6.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/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 +9 -9
- 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/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/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/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/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.js +3 -2
- 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/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 +9 -0
- 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/index.cjs +22 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/index.js +2 -0
- package/package.json +17 -58
- 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
|
@@ -9,15 +9,15 @@ exports.useColor = useColor;
|
|
|
9
9
|
exports.useColorEffect = useColorEffect;
|
|
10
10
|
exports.useTextColor = useTextColor;
|
|
11
11
|
var _vue = require("vue");
|
|
12
|
-
var
|
|
13
|
-
var
|
|
12
|
+
var _color = require("../../utils/Commons/color.util.cjs");
|
|
13
|
+
var _gradient = require("../../utils/Commons/gradient.util.cjs");
|
|
14
14
|
function useColor(colors) {
|
|
15
15
|
const colorClasses = (0, _vue.computed)(() => {
|
|
16
16
|
const classes = [];
|
|
17
|
-
if (colors.value.background && !(0,
|
|
17
|
+
if (colors.value.background && !(0, _gradient.isGradient)(colors.value.background) && (0, _color.isUtilityIntent)(colors.value.background)) {
|
|
18
18
|
classes.push(`origam--bg-${colors.value.background}`);
|
|
19
19
|
}
|
|
20
|
-
if (colors.value.text && !(0,
|
|
20
|
+
if (colors.value.text && !(0, _gradient.isGradient)(colors.value.text) && (0, _color.isUtilityIntent)(colors.value.text)) {
|
|
21
21
|
classes.push(`origam--color-${colors.value.text}`);
|
|
22
22
|
}
|
|
23
23
|
return classes;
|
|
@@ -28,47 +28,47 @@ function useColor(colors) {
|
|
|
28
28
|
let bgDecl = null;
|
|
29
29
|
let bgIsGradient = false;
|
|
30
30
|
if (colors.value.background) {
|
|
31
|
-
if ((0,
|
|
32
|
-
const grad = (0,
|
|
31
|
+
if ((0, _gradient.isGradient)(colors.value.background)) {
|
|
32
|
+
const grad = (0, _gradient.resolveGradient)(colors.value.background);
|
|
33
33
|
if (grad) {
|
|
34
34
|
bgDecl = `background-image: ${grad}`;
|
|
35
35
|
bgIsGradient = true;
|
|
36
36
|
}
|
|
37
|
-
} else if ((0,
|
|
38
|
-
const m = (0,
|
|
37
|
+
} else if ((0, _color.isIntent)(colors.value.background)) {
|
|
38
|
+
const m = (0, _color.tokenStylesForIntent)(colors.value.background, "default");
|
|
39
39
|
bgDecl = `background-color: ${m["background-color"]}`;
|
|
40
40
|
bgIntentFg = m.color;
|
|
41
41
|
} else if (colors.value.background === "transparent") {
|
|
42
42
|
bgDecl = `background-color: ${colors.value.background}`;
|
|
43
|
-
} else if (typeof colors.value.background === "string" && (0,
|
|
43
|
+
} else if (typeof colors.value.background === "string" && (0, _color.isCssColor)(colors.value.background)) {
|
|
44
44
|
bgDecl = `background-color: ${colors.value.background}`;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
let fgDecl = null;
|
|
48
48
|
if (colors.value.text) {
|
|
49
|
-
if ((0,
|
|
50
|
-
const grad = (0,
|
|
49
|
+
if ((0, _gradient.isGradient)(colors.value.text)) {
|
|
50
|
+
const grad = (0, _gradient.resolveGradient)(colors.value.text);
|
|
51
51
|
if (grad) {
|
|
52
52
|
fgDecl = "color: transparent";
|
|
53
53
|
styles.push(`background-image: ${grad}`);
|
|
54
54
|
styles.push("background-clip: text");
|
|
55
55
|
styles.push("-webkit-background-clip: text");
|
|
56
56
|
}
|
|
57
|
-
} else if ((0,
|
|
58
|
-
if (bgIntentFg && (0,
|
|
57
|
+
} else if ((0, _color.isIntent)(colors.value.text)) {
|
|
58
|
+
if (bgIntentFg && (0, _color.isIntent)(colors.value.background) && colors.value.text === colors.value.background) {
|
|
59
59
|
fgDecl = `color: ${bgIntentFg}`;
|
|
60
60
|
} else {
|
|
61
|
-
fgDecl = `color: ${(0,
|
|
61
|
+
fgDecl = `color: ${(0, _color.tokenForegroundForIntent)(colors.value.text)}`;
|
|
62
62
|
}
|
|
63
|
-
} else if (typeof colors.value.text === "string" && (0,
|
|
63
|
+
} else if (typeof colors.value.text === "string" && (0, _color.isCssColor)(colors.value.text)) {
|
|
64
64
|
fgDecl = `color: ${colors.value.text}`;
|
|
65
65
|
}
|
|
66
66
|
} else if (bgIntentFg && !bgIsGradient) {
|
|
67
67
|
fgDecl = `color: ${bgIntentFg}`;
|
|
68
|
-
} else if (bgDecl && !bgIsGradient && colors.value.background && typeof colors.value.background === "string" && colors.value.background !== "transparent" && (0,
|
|
69
|
-
const parsed = (0,
|
|
68
|
+
} else if (bgDecl && !bgIsGradient && colors.value.background && typeof colors.value.background === "string" && colors.value.background !== "transparent" && (0, _color.isParsableColor)(colors.value.background)) {
|
|
69
|
+
const parsed = (0, _color.parseColor)(colors.value.background);
|
|
70
70
|
if (parsed.a == null || parsed.a === 1) {
|
|
71
|
-
fgDecl = `color: ${(0,
|
|
71
|
+
fgDecl = `color: ${(0, _color.getForeground)(parsed)}`;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
if (bgDecl) styles.push(bgDecl);
|
|
@@ -131,21 +131,21 @@ function useColorEffect(props, isHover = (0, _vue.ref)(false), isActive = (0, _v
|
|
|
131
131
|
const classes = [];
|
|
132
132
|
const bgVal = bgColor.value;
|
|
133
133
|
const fgVal = color.value;
|
|
134
|
-
if (bgVal && (0,
|
|
134
|
+
if (bgVal && (0, _color.isUtilityIntent)(bgVal)) {
|
|
135
135
|
classes.push(`origam--bg-${bgVal}`);
|
|
136
136
|
}
|
|
137
|
-
if (fgVal && (0,
|
|
137
|
+
if (fgVal && (0, _color.isUtilityIntent)(fgVal)) {
|
|
138
138
|
classes.push(`origam--color-${fgVal}`);
|
|
139
|
-
} else if (!fgVal && bgVal && (0,
|
|
139
|
+
} else if (!fgVal && bgVal && (0, _color.isUtilityIntent)(bgVal)) {}
|
|
140
140
|
return classes;
|
|
141
141
|
});
|
|
142
142
|
const colorStyles = (0, _vue.computed)(() => {
|
|
143
143
|
void isDisabled.value;
|
|
144
144
|
const sameIntentBg = (a, b) => {
|
|
145
|
-
return !!a && !!b && a === b && (0,
|
|
145
|
+
return !!a && !!b && a === b && (0, _color.isIntent)(a);
|
|
146
146
|
};
|
|
147
147
|
const sameIntentFg = (a, b) => {
|
|
148
|
-
return !!a && !!b && a === b && (0,
|
|
148
|
+
return !!a && !!b && a === b && (0, _color.isIntent)(a);
|
|
149
149
|
};
|
|
150
150
|
const bgRole = isHover.value && (!props.hoverBgColor || sameIntentBg(props.hoverBgColor, props.bgColor)) ? "hover" : isActive.value && (!props.activeBgColor || sameIntentBg(props.activeBgColor, props.bgColor)) ? "active" : "default";
|
|
151
151
|
const _fgRole = isHover.value && (!props.hoverColor || sameIntentFg(props.hoverColor, props.color)) ? "hover" : isActive.value && (!props.activeColor || sameIntentFg(props.activeColor, props.color)) ? "active" : "default";
|
|
@@ -155,44 +155,44 @@ function useColorEffect(props, isHover = (0, _vue.ref)(false), isActive = (0, _v
|
|
|
155
155
|
let bgIntentFg = null;
|
|
156
156
|
let bgIsGradient = false;
|
|
157
157
|
let clipText = false;
|
|
158
|
-
if (bgColor.value && (0,
|
|
159
|
-
const grad = (0,
|
|
158
|
+
if (bgColor.value && (0, _gradient.isGradient)(bgColor.value)) {
|
|
159
|
+
const grad = (0, _gradient.resolveGradient)(bgColor.value);
|
|
160
160
|
if (grad) {
|
|
161
161
|
bgDecl = `background-image: ${grad}`;
|
|
162
162
|
bgIsGradient = true;
|
|
163
163
|
}
|
|
164
|
-
} else if (bgColor.value && (0,
|
|
165
|
-
const m = (0,
|
|
164
|
+
} else if (bgColor.value && (0, _color.isIntent)(bgColor.value)) {
|
|
165
|
+
const m = (0, _color.tokenStylesForIntent)(bgColor.value, bgRole);
|
|
166
166
|
bgDecl = `background-color: ${m["background-color"]}`;
|
|
167
|
-
bgIntentFg = (0,
|
|
167
|
+
bgIntentFg = (0, _color.tokenStylesForIntent)(bgColor.value, "default").color;
|
|
168
168
|
} else if (bgColor.value === "transparent") {
|
|
169
|
-
bgDecl = `background-color: ${(0,
|
|
170
|
-
} else if (bgColor.value && typeof bgColor.value === "string" && (0,
|
|
171
|
-
(0,
|
|
172
|
-
bgDecl = `background-color: ${(0,
|
|
169
|
+
bgDecl = `background-color: ${(0, _color.rawBgExprWithState)("transparent", bgRole)}`;
|
|
170
|
+
} else if (bgColor.value && typeof bgColor.value === "string" && (0, _color.isCssColor)(bgColor.value)) {
|
|
171
|
+
(0, _color.warnLegacyColor)("bgColor", bgColor.value);
|
|
172
|
+
bgDecl = `background-color: ${(0, _color.rawBgExprWithState)(bgColor.value, bgRole)}`;
|
|
173
173
|
}
|
|
174
|
-
if (color.value && (0,
|
|
175
|
-
const grad = (0,
|
|
174
|
+
if (color.value && (0, _gradient.isGradient)(color.value)) {
|
|
175
|
+
const grad = (0, _gradient.resolveGradient)(color.value);
|
|
176
176
|
if (grad) {
|
|
177
177
|
fgDecl = "color: transparent";
|
|
178
178
|
bgDecl = `background-image: ${grad}`;
|
|
179
179
|
clipText = true;
|
|
180
180
|
}
|
|
181
|
-
} else if (color.value && (0,
|
|
182
|
-
if (bgIntentFg && bgColor.value && (0,
|
|
181
|
+
} else if (color.value && (0, _color.isIntent)(color.value)) {
|
|
182
|
+
if (bgIntentFg && bgColor.value && (0, _color.isIntent)(bgColor.value) && color.value === bgColor.value) {
|
|
183
183
|
fgDecl = `color: ${bgIntentFg}`;
|
|
184
184
|
} else {
|
|
185
|
-
fgDecl = `color: ${(0,
|
|
185
|
+
fgDecl = `color: ${(0, _color.tokenForegroundForIntent)(color.value)}`;
|
|
186
186
|
}
|
|
187
|
-
} else if (color.value && typeof color.value === "string" && (0,
|
|
188
|
-
if (color.value !== "transparent") (0,
|
|
187
|
+
} else if (color.value && typeof color.value === "string" && (0, _color.isCssColor)(color.value)) {
|
|
188
|
+
if (color.value !== "transparent") (0, _color.warnLegacyColor)("color", color.value);
|
|
189
189
|
fgDecl = `color: ${color.value}`;
|
|
190
190
|
} else if (!color.value && bgIntentFg && !bgIsGradient) {
|
|
191
191
|
fgDecl = `color: ${bgIntentFg}`;
|
|
192
|
-
} else if (!color.value && !bgIsGradient && bgColor.value && typeof bgColor.value === "string" && bgColor.value !== "transparent" && (0,
|
|
193
|
-
const parsed = (0,
|
|
192
|
+
} else if (!color.value && !bgIsGradient && bgColor.value && typeof bgColor.value === "string" && bgColor.value !== "transparent" && (0, _color.isParsableColor)(bgColor.value)) {
|
|
193
|
+
const parsed = (0, _color.parseColor)(bgColor.value);
|
|
194
194
|
if (parsed.a == null || parsed.a === 1) {
|
|
195
|
-
fgDecl = `color: ${(0,
|
|
195
|
+
fgDecl = `color: ${(0, _color.getForeground)(parsed)}`;
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
const styles = [];
|
|
@@ -35,9 +35,14 @@ export declare function useBackgroundColor<T extends Record<K, TColor>, K extend
|
|
|
35
35
|
/*********************************************************
|
|
36
36
|
* useColorEffect
|
|
37
37
|
********************************************************/
|
|
38
|
-
export declare function useColorEffect(props: IColorProps & IBgColorProps
|
|
38
|
+
export declare function useColorEffect(props: IColorProps & IBgColorProps & {
|
|
39
|
+
hoverColor?: TColor;
|
|
40
|
+
activeColor?: TColor;
|
|
41
|
+
hoverBgColor?: TColor;
|
|
42
|
+
activeBgColor?: TColor;
|
|
43
|
+
}, isHover?: Ref<boolean> | ComputedRef<boolean>, isActive?: Ref<boolean> | ComputedRef<boolean>, isDisabled?: Ref<boolean> | ComputedRef<boolean>): {
|
|
39
44
|
colorClasses: ComputedRef<string[]>;
|
|
40
45
|
colorStyles: ComputedRef<string[]>;
|
|
41
|
-
color: ComputedRef<
|
|
42
|
-
bgColor: ComputedRef<
|
|
46
|
+
color: ComputedRef<TColor>;
|
|
47
|
+
bgColor: ComputedRef<TColor>;
|
|
43
48
|
};
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
tokenForegroundForIntent,
|
|
11
11
|
tokenStylesForIntent,
|
|
12
12
|
warnLegacyColor
|
|
13
|
-
} from "../../utils/Commons/color.util.
|
|
14
|
-
import { isGradient, resolveGradient } from "../../utils/Commons/gradient.util.
|
|
13
|
+
} from "../../utils/Commons/color.util.js";
|
|
14
|
+
import { isGradient, resolveGradient } from "../../utils/Commons/gradient.util.js";
|
|
15
15
|
export function useColor(colors) {
|
|
16
16
|
const colorClasses = computed(() => {
|
|
17
17
|
const classes = [];
|
|
@@ -88,7 +88,7 @@ function useDatePickerCalendar(props) {
|
|
|
88
88
|
isAdjacent,
|
|
89
89
|
isHidden: isAdjacent && !props.showAdjacentMonths,
|
|
90
90
|
isStart,
|
|
91
|
-
isSelected: model.value.some(value => adapter.isSameDay(date, value)),
|
|
91
|
+
isSelected: model.value.some(value => adapter.isSameDay(date, adapter.date(value))),
|
|
92
92
|
isEnd,
|
|
93
93
|
isSame,
|
|
94
94
|
localized: adapter.format(date, "dayOfMonth")
|
|
@@ -7,7 +7,7 @@ export declare function useDatePickerCalendar(props: ICalendarProps): {
|
|
|
7
7
|
daysInMonth: import("vue").ComputedRef<IDay[]>;
|
|
8
8
|
daysInWeek: import("vue").ComputedRef<IDay[]>;
|
|
9
9
|
genDays: (days: unknown[], today: unknown) => Array<IDay>;
|
|
10
|
-
model: import("../../types").TVModel<ICalendarProps, "date", unknown[]>;
|
|
10
|
+
model: import("../../types").TVModel<ICalendarProps, "date", readonly unknown[] | unknown[]>;
|
|
11
11
|
weeksInMonth: import("vue").ComputedRef<unknown[][]>;
|
|
12
12
|
weekDays: import("vue").ComputedRef<number[] | undefined>;
|
|
13
13
|
weekNumbers: import("vue").ComputedRef<(number | null)[]>;
|
|
@@ -99,7 +99,7 @@ export function useDatePickerCalendar(props) {
|
|
|
99
99
|
isAdjacent,
|
|
100
100
|
isHidden: isAdjacent && !props.showAdjacentMonths,
|
|
101
101
|
isStart,
|
|
102
|
-
isSelected: model.value.some((value) => adapter.isSameDay(date, value)),
|
|
102
|
+
isSelected: model.value.some((value) => adapter.isSameDay(date, adapter.date(value))),
|
|
103
103
|
isEnd,
|
|
104
104
|
isSame,
|
|
105
105
|
localized: adapter.format(date, "dayOfMonth")
|
|
@@ -17,22 +17,23 @@ function useDefaults(props, name = (0, _utils.getCurrentInstanceName)()) {
|
|
|
17
17
|
const vm = (0, _utils.getCurrentInstance)("useDefaults");
|
|
18
18
|
const propNames = Object.keys(props);
|
|
19
19
|
if (!propNames.length) return props;
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
const wasPropPassed = key => {
|
|
21
|
+
const vnodeProps = vm.vnode.props || {};
|
|
22
|
+
for (const k in vnodeProps) {
|
|
23
|
+
if (k === key || camelize(k) === key) return true;
|
|
24
|
+
}
|
|
25
|
+
return false;
|
|
26
|
+
};
|
|
26
27
|
const result = {};
|
|
27
28
|
for (const key of propNames) {
|
|
28
|
-
const wasPassed = passedKeys.has(key);
|
|
29
29
|
const c = (0, _vue.computed)(() => {
|
|
30
|
-
|
|
30
|
+
const ownValue = props[key];
|
|
31
|
+
if (wasPropPassed(key)) return ownValue;
|
|
31
32
|
const componentDefs = defaults.value?.[name];
|
|
32
33
|
if (componentDefs?.[key] !== void 0) return componentDefs[key];
|
|
33
34
|
const globalDefs = defaults.value?.global;
|
|
34
35
|
if (globalDefs?.[key] !== void 0) return globalDefs[key];
|
|
35
|
-
return
|
|
36
|
+
return ownValue;
|
|
36
37
|
});
|
|
37
38
|
Object.defineProperty(result, key, {
|
|
38
39
|
get: () => c.value,
|
|
@@ -9,22 +9,23 @@ export function useDefaults(props, name = getCurrentInstanceName()) {
|
|
|
9
9
|
const vm = getCurrentInstance("useDefaults");
|
|
10
10
|
const propNames = Object.keys(props);
|
|
11
11
|
if (!propNames.length) return props;
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
const wasPropPassed = (key) => {
|
|
13
|
+
const vnodeProps = vm.vnode.props || {};
|
|
14
|
+
for (const k in vnodeProps) {
|
|
15
|
+
if (k === key || camelize(k) === key) return true;
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
};
|
|
18
19
|
const result = {};
|
|
19
20
|
for (const key of propNames) {
|
|
20
|
-
const wasPassed = passedKeys.has(key);
|
|
21
21
|
const c = computed(() => {
|
|
22
|
-
|
|
22
|
+
const ownValue = props[key];
|
|
23
|
+
if (wasPropPassed(key)) return ownValue;
|
|
23
24
|
const componentDefs = defaults.value?.[name];
|
|
24
25
|
if (componentDefs?.[key] !== void 0) return componentDefs[key];
|
|
25
26
|
const globalDefs = defaults.value?.global;
|
|
26
27
|
if (globalDefs?.[key] !== void 0) return globalDefs[key];
|
|
27
|
-
return
|
|
28
|
+
return ownValue;
|
|
28
29
|
});
|
|
29
30
|
Object.defineProperty(result, key, {
|
|
30
31
|
get: () => c.value,
|
|
@@ -6,12 +6,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useDelay = useDelay;
|
|
7
7
|
var _utils = require("../../utils/index.cjs");
|
|
8
8
|
function useDelay(props, cb) {
|
|
9
|
-
|
|
9
|
+
const cancelRef = {
|
|
10
|
+
current: () => {}
|
|
11
|
+
};
|
|
10
12
|
const runDelay = isOpening => {
|
|
11
|
-
|
|
13
|
+
cancelRef.current();
|
|
12
14
|
const delay = Number(isOpening ? props.openDelay : props.closeDelay);
|
|
13
15
|
return new Promise(resolve => {
|
|
14
|
-
|
|
16
|
+
cancelRef.current = (0, _utils.defer)(delay, () => {
|
|
15
17
|
cb?.(isOpening);
|
|
16
18
|
resolve(isOpening);
|
|
17
19
|
});
|
|
@@ -23,6 +25,9 @@ function useDelay(props, cb) {
|
|
|
23
25
|
const runCloseDelay = () => {
|
|
24
26
|
return runDelay(false);
|
|
25
27
|
};
|
|
28
|
+
const clearDelay = () => {
|
|
29
|
+
cancelRef.current();
|
|
30
|
+
};
|
|
26
31
|
return {
|
|
27
32
|
clearDelay,
|
|
28
33
|
runOpenDelay,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defer } from "../../utils/index.js";
|
|
2
2
|
export function useDelay(props, cb) {
|
|
3
|
-
|
|
4
|
-
};
|
|
3
|
+
const cancelRef = { current: () => {
|
|
4
|
+
} };
|
|
5
5
|
const runDelay = (isOpening) => {
|
|
6
|
-
|
|
6
|
+
cancelRef.current();
|
|
7
7
|
const delay = Number(isOpening ? props.openDelay : props.closeDelay);
|
|
8
8
|
return new Promise((resolve) => {
|
|
9
|
-
|
|
9
|
+
cancelRef.current = defer(delay, () => {
|
|
10
10
|
cb?.(isOpening);
|
|
11
11
|
resolve(isOpening);
|
|
12
12
|
});
|
|
@@ -18,6 +18,9 @@ export function useDelay(props, cb) {
|
|
|
18
18
|
const runCloseDelay = () => {
|
|
19
19
|
return runDelay(false);
|
|
20
20
|
};
|
|
21
|
+
const clearDelay = () => {
|
|
22
|
+
cancelRef.current();
|
|
23
|
+
};
|
|
21
24
|
return {
|
|
22
25
|
clearDelay,
|
|
23
26
|
runOpenDelay,
|
|
@@ -12,7 +12,7 @@ function useDensity(props, name = (0, _utils.getCurrentInstanceName)()) {
|
|
|
12
12
|
const density = (0, _vue.isRef)(props) ? props.value : props.density;
|
|
13
13
|
const classes = [];
|
|
14
14
|
if (density == null) return classes;
|
|
15
|
-
if (density && _consts.
|
|
15
|
+
if (density && _consts.PREDEFINED_DENSITY.includes(density)) {
|
|
16
16
|
classes.push(`${name}--density-${density}`);
|
|
17
17
|
}
|
|
18
18
|
return classes;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { computed, isRef } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { PREDEFINED_DENSITY } from "../../consts/index.js";
|
|
3
3
|
import { getCurrentInstanceName } from "../../utils/index.js";
|
|
4
4
|
export function useDensity(props, name = getCurrentInstanceName()) {
|
|
5
5
|
const densityClasses = computed(() => {
|
|
6
6
|
const density = isRef(props) ? props.value : props.density;
|
|
7
7
|
const classes = [];
|
|
8
8
|
if (density == null) return classes;
|
|
9
|
-
if (density &&
|
|
9
|
+
if (density && PREDEFINED_DENSITY.includes(density)) {
|
|
10
10
|
classes.push(`${name}--density-${density}`);
|
|
11
11
|
}
|
|
12
12
|
return classes;
|
|
@@ -18,6 +18,10 @@ function useDragResizer(el, value, min, max, axis) {
|
|
|
18
18
|
const isHorizontal = (0, _vue.computed)(() => {
|
|
19
19
|
return axis === _enums.AXIS.X;
|
|
20
20
|
});
|
|
21
|
+
const onDragEnd = () => {
|
|
22
|
+
removeListeners.forEach(fn => fn());
|
|
23
|
+
resizing.value = false;
|
|
24
|
+
};
|
|
21
25
|
const onMouseDown = e => {
|
|
22
26
|
e.preventDefault();
|
|
23
27
|
e.stopPropagation();
|
|
@@ -29,10 +33,7 @@ function useDragResizer(el, value, min, max, axis) {
|
|
|
29
33
|
const delta = clickOffset - start;
|
|
30
34
|
value.value = (0, _utils.clamp)(initialStart + delta, min, max);
|
|
31
35
|
};
|
|
32
|
-
const onMouseUp =
|
|
33
|
-
removeListeners.forEach(fn => fn());
|
|
34
|
-
resizing.value = false;
|
|
35
|
-
};
|
|
36
|
+
const onMouseUp = onDragEnd;
|
|
36
37
|
removeListeners.push(...[(0, _utils.addWindowListener)("mousemove", onMouseMove, onUnmountedCleanupFns), (0, _utils.addWindowListener)("mouseup", onMouseUp, onUnmountedCleanupFns)]);
|
|
37
38
|
};
|
|
38
39
|
const onTouchStart = e => {
|
|
@@ -46,11 +47,8 @@ function useDragResizer(el, value, min, max, axis) {
|
|
|
46
47
|
const delta = clickOffset - start;
|
|
47
48
|
value.value = Math.max(min, Math.min(max, initialStart + delta));
|
|
48
49
|
};
|
|
49
|
-
const onTouchEnd =
|
|
50
|
-
|
|
51
|
-
resizing.value = false;
|
|
52
|
-
};
|
|
53
|
-
removeListeners.push(...[(0, _utils.addWindowListener)("touchmove", onTouchMove, onUnmountedCleanupFns), (0, _utils.addWindowListener)("touchend touchcancel", onTouchEnd, onUnmountedCleanupFns)]);
|
|
50
|
+
const onTouchEnd = onDragEnd;
|
|
51
|
+
removeListeners.push(...[(0, _utils.addWindowListener)("touchmove", onTouchMove, onUnmountedCleanupFns), (0, _utils.addWindowListener)("touchend", onTouchEnd, onUnmountedCleanupFns), (0, _utils.addWindowListener)("touchcancel", onTouchEnd, onUnmountedCleanupFns)]);
|
|
54
52
|
};
|
|
55
53
|
if (el) {
|
|
56
54
|
(0, _composables.useEventListener)(el, "mousedown", onMouseDown);
|
|
@@ -12,6 +12,10 @@ export function useDragResizer(el, value, min, max, axis) {
|
|
|
12
12
|
const isHorizontal = computed(() => {
|
|
13
13
|
return axis === AXIS.X;
|
|
14
14
|
});
|
|
15
|
+
const onDragEnd = () => {
|
|
16
|
+
removeListeners.forEach((fn) => fn());
|
|
17
|
+
resizing.value = false;
|
|
18
|
+
};
|
|
15
19
|
const onMouseDown = (e) => {
|
|
16
20
|
e.preventDefault();
|
|
17
21
|
e.stopPropagation();
|
|
@@ -23,10 +27,7 @@ export function useDragResizer(el, value, min, max, axis) {
|
|
|
23
27
|
const delta = clickOffset - start;
|
|
24
28
|
value.value = clamp(initialStart + delta, min, max);
|
|
25
29
|
};
|
|
26
|
-
const onMouseUp =
|
|
27
|
-
removeListeners.forEach((fn) => fn());
|
|
28
|
-
resizing.value = false;
|
|
29
|
-
};
|
|
30
|
+
const onMouseUp = onDragEnd;
|
|
30
31
|
removeListeners.push(...[
|
|
31
32
|
addWindowListener("mousemove", onMouseMove, onUnmountedCleanupFns),
|
|
32
33
|
addWindowListener("mouseup", onMouseUp, onUnmountedCleanupFns)
|
|
@@ -43,13 +44,11 @@ export function useDragResizer(el, value, min, max, axis) {
|
|
|
43
44
|
const delta = clickOffset - start;
|
|
44
45
|
value.value = Math.max(min, Math.min(max, initialStart + delta));
|
|
45
46
|
};
|
|
46
|
-
const onTouchEnd =
|
|
47
|
-
removeListeners.forEach((fn) => fn());
|
|
48
|
-
resizing.value = false;
|
|
49
|
-
};
|
|
47
|
+
const onTouchEnd = onDragEnd;
|
|
50
48
|
removeListeners.push(...[
|
|
51
49
|
addWindowListener("touchmove", onTouchMove, onUnmountedCleanupFns),
|
|
52
|
-
addWindowListener("touchend
|
|
50
|
+
addWindowListener("touchend", onTouchEnd, onUnmountedCleanupFns),
|
|
51
|
+
addWindowListener("touchcancel", onTouchEnd, onUnmountedCleanupFns)
|
|
53
52
|
]);
|
|
54
53
|
};
|
|
55
54
|
if (el) {
|
|
@@ -8,7 +8,7 @@ var _vue = require("vue");
|
|
|
8
8
|
var _composables = require("../../composables/index.cjs");
|
|
9
9
|
var _utils = require("../../utils/index.cjs");
|
|
10
10
|
function useFocus(props, name = (0, _utils.getCurrentInstanceName)()) {
|
|
11
|
-
const isFocused = (0, _composables.useVModel)(props, "focused");
|
|
11
|
+
const isFocused = (0, _composables.useVModel)(props, "focused", false);
|
|
12
12
|
const focusClasses = (0, _vue.computed)(() => {
|
|
13
13
|
return {
|
|
14
14
|
[`${name}--focused`]: isFocused.value
|
|
@@ -2,7 +2,7 @@ import { computed } from "vue";
|
|
|
2
2
|
import { useVModel } from "../../composables/index.js";
|
|
3
3
|
import { getCurrentInstanceName } from "../../utils/index.js";
|
|
4
4
|
export function useFocus(props, name = getCurrentInstanceName()) {
|
|
5
|
-
const isFocused = useVModel(props, "focused");
|
|
5
|
+
const isFocused = useVModel(props, "focused", false);
|
|
6
6
|
const focusClasses = computed(() => {
|
|
7
7
|
return {
|
|
8
8
|
[`${name}--focused`]: isFocused.value
|
|
@@ -176,6 +176,18 @@ function useCreateLayout(props) {
|
|
|
176
176
|
if (disableTransitions) {
|
|
177
177
|
disabledTransitions.set(id, disableTransitions);
|
|
178
178
|
}
|
|
179
|
+
const staleIds = registered.value.filter(existingId => existingId !== id && priorities.get(existingId)?.value === order.value && positions.get(existingId)?.value === position.value);
|
|
180
|
+
if (staleIds.length > 0) {
|
|
181
|
+
const staleSet = new Set(staleIds);
|
|
182
|
+
for (const staleId of staleIds) {
|
|
183
|
+
priorities.delete(staleId);
|
|
184
|
+
positions.delete(staleId);
|
|
185
|
+
layoutSizes.delete(staleId);
|
|
186
|
+
activeItems.delete(staleId);
|
|
187
|
+
disabledTransitions.delete(staleId);
|
|
188
|
+
}
|
|
189
|
+
registered.value = registered.value.filter(v => !staleSet.has(v));
|
|
190
|
+
}
|
|
179
191
|
const instances = (0, _utils.findChildrenWithProvide)(_consts.ORIGAM_LAYOUT_KEY, rootVm?.vnode);
|
|
180
192
|
const instanceIndex = instances.indexOf(vm);
|
|
181
193
|
if (instanceIndex > -1) registered.value.splice(instanceIndex, 0, id);else registered.value.push(id);
|
|
@@ -162,6 +162,20 @@ export function useCreateLayout(props) {
|
|
|
162
162
|
if (disableTransitions) {
|
|
163
163
|
disabledTransitions.set(id, disableTransitions);
|
|
164
164
|
}
|
|
165
|
+
const staleIds = registered.value.filter(
|
|
166
|
+
(existingId) => existingId !== id && priorities.get(existingId)?.value === order.value && positions.get(existingId)?.value === position.value
|
|
167
|
+
);
|
|
168
|
+
if (staleIds.length > 0) {
|
|
169
|
+
const staleSet = new Set(staleIds);
|
|
170
|
+
for (const staleId of staleIds) {
|
|
171
|
+
priorities.delete(staleId);
|
|
172
|
+
positions.delete(staleId);
|
|
173
|
+
layoutSizes.delete(staleId);
|
|
174
|
+
activeItems.delete(staleId);
|
|
175
|
+
disabledTransitions.delete(staleId);
|
|
176
|
+
}
|
|
177
|
+
registered.value = registered.value.filter((v) => !staleSet.has(v));
|
|
178
|
+
}
|
|
165
179
|
const instances = findChildrenWithProvide(ORIGAM_LAYOUT_KEY, rootVm?.vnode);
|
|
166
180
|
const instanceIndex = instances.indexOf(vm);
|
|
167
181
|
if (instanceIndex > -1) registered.value.splice(instanceIndex, 0, id);
|
|
@@ -8,7 +8,7 @@ var _vue = require("vue");
|
|
|
8
8
|
function useMessage(props, otherMessages = (0, _vue.ref)([])) {
|
|
9
9
|
const $slots = (0, _vue.useSlots)();
|
|
10
10
|
const hasMessages = (0, _vue.computed)(() => {
|
|
11
|
-
return Boolean(props.messages) || Boolean(props.errorMessages) ||
|
|
11
|
+
return Boolean(props.messages) || Boolean(props.errorMessages) || otherMessages.value.length > 0 || Boolean($slots.message);
|
|
12
12
|
});
|
|
13
13
|
const messages = (0, _vue.computed)(() => {
|
|
14
14
|
if (props.errorMessages?.length || otherMessages.value.length) {
|
|
@@ -3,6 +3,6 @@ import { ComputedRef, Ref } from 'vue';
|
|
|
3
3
|
* useMessage
|
|
4
4
|
********************************************************/
|
|
5
5
|
export declare function useMessage(props: any, otherMessages?: Ref<Array<any>> | ComputedRef<Array<any>>): {
|
|
6
|
-
hasMessages: ComputedRef<
|
|
6
|
+
hasMessages: ComputedRef<boolean>;
|
|
7
7
|
messages: ComputedRef<any>;
|
|
8
8
|
};
|
|
@@ -2,7 +2,7 @@ import { computed, ref, useSlots } from "vue";
|
|
|
2
2
|
export function useMessage(props, otherMessages = ref([])) {
|
|
3
3
|
const $slots = useSlots();
|
|
4
4
|
const hasMessages = computed(() => {
|
|
5
|
-
return Boolean(props.messages) || Boolean(props.errorMessages) ||
|
|
5
|
+
return Boolean(props.messages) || Boolean(props.errorMessages) || otherMessages.value.length > 0 || Boolean($slots.message);
|
|
6
6
|
});
|
|
7
7
|
const messages = computed(() => {
|
|
8
8
|
if (props.errorMessages?.length || otherMessages.value.length) {
|
|
@@ -20,7 +20,7 @@ function useRounded(props, name = (0, _utils.getCurrentInstanceName)()) {
|
|
|
20
20
|
classes.push(`origam--rounded-${rounded}`);
|
|
21
21
|
return classes;
|
|
22
22
|
}
|
|
23
|
-
if (typeof rounded === "string" && _consts.
|
|
23
|
+
if (typeof rounded === "string" && _consts.PREDEFINED_ROUNDED.includes(rounded)) {
|
|
24
24
|
classes.push(`${name}--rounded-${rounded}`);
|
|
25
25
|
return classes;
|
|
26
26
|
}
|
|
@@ -38,20 +38,29 @@ function useRounded(props, name = (0, _utils.getCurrentInstanceName)()) {
|
|
|
38
38
|
"large": "var(--origam-radius---xl, 16px)",
|
|
39
39
|
"x-large": "var(--origam-radius---2xl, 24px)"
|
|
40
40
|
};
|
|
41
|
+
const UTILITY_RADIUS_FALLBACK = {
|
|
42
|
+
none: "0",
|
|
43
|
+
xs: "2px",
|
|
44
|
+
sm: "4px",
|
|
45
|
+
md: "8px",
|
|
46
|
+
lg: "12px",
|
|
47
|
+
xl: "16px",
|
|
48
|
+
full: "9999px"
|
|
49
|
+
};
|
|
41
50
|
const roundedStyles = (0, _vue.computed)(() => {
|
|
42
51
|
const rounded = (0, _vue.isRef)(props) ? props.value : props.rounded;
|
|
43
52
|
const styles = [];
|
|
44
53
|
if (rounded == null || rounded === false) return styles;
|
|
45
54
|
if (isUtilityRounded(rounded)) {
|
|
46
|
-
styles.push(`border-radius: var(--origam-radius---${rounded})`);
|
|
55
|
+
styles.push(`border-radius: var(--origam-radius---${rounded}, ${UTILITY_RADIUS_FALLBACK[rounded]})`);
|
|
47
56
|
return styles;
|
|
48
57
|
}
|
|
49
|
-
if (typeof rounded === "string" && _consts.
|
|
58
|
+
if (typeof rounded === "string" && _consts.PREDEFINED_ROUNDED.includes(rounded) && rounded !== "shaped" && rounded !== "shaped-invert") {
|
|
50
59
|
const token = NAMED_RADIUS_TOKEN[rounded];
|
|
51
60
|
if (token) styles.push(`border-radius: ${token}`);
|
|
52
61
|
return styles;
|
|
53
62
|
}
|
|
54
|
-
if (rounded === true || rounded === "") {
|
|
63
|
+
if (rounded === true || typeof rounded === "string" && rounded === "") {
|
|
55
64
|
styles.push(`border-radius: var(--origam-radius---md, 8px)`);
|
|
56
65
|
return styles;
|
|
57
66
|
}
|
|
@@ -62,6 +71,8 @@ function useRounded(props, name = (0, _utils.getCurrentInstanceName)()) {
|
|
|
62
71
|
const values = String(match[key]).split(" ");
|
|
63
72
|
styles.push(...(0, _utils.formatRoundedStylesVar)(values));
|
|
64
73
|
});
|
|
74
|
+
} else if ((0, _utils.isCustomBorderRadius)(rounded)) {
|
|
75
|
+
styles.push(`border-radius: ${rounded.trim()}`);
|
|
65
76
|
}
|
|
66
77
|
} else if (typeof rounded === "number") {
|
|
67
78
|
styles.push(`border-radius: ${(0, _utils.convertToUnit)(rounded)}`);
|
|
@@ -5,7 +5,7 @@ import type { TRounded } from '../../types';
|
|
|
5
5
|
* Resolve the consumer's `rounded` prop into either a class (named variant
|
|
6
6
|
* or legacy boolean) or an inline `border-radius` declaration (free-form
|
|
7
7
|
* CSS value). Mirrors the origam-design-system implementation but uses a
|
|
8
|
-
* static `
|
|
8
|
+
* static `PREDEFINED_ROUNDED` whitelist instead of the origam
|
|
9
9
|
* theme-driven `useTheme().current.value.variables.rounded`, since origam
|
|
10
10
|
* ships its radius rungs as fixed primitive tokens.
|
|
11
11
|
*
|