@dataloop-ai/components 0.15.7 → 0.16.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/package.json +1 -1
- package/src/assets/grid.css +9 -0
- package/src/components/{DlAccordion → basic/DlAccordion}/DlAccordion.vue +1 -1
- package/src/components/{DlAccordion → basic/DlAccordion/components}/AccordionHeader.vue +3 -5
- package/src/components/{DlAlert.vue → basic/DlAlert/DlAlert.vue} +3 -3
- package/src/components/basic/DlAlert/index.ts +2 -0
- package/src/components/{DlAvatar.vue → basic/DlAvatar/DlAvatar.vue} +2 -2
- package/src/components/basic/DlAvatar/index.ts +2 -0
- package/src/components/{DlButton → basic/DlButton}/DlButton.vue +5 -20
- package/src/components/{DlButton → basic/DlButton}/index.ts +0 -1
- package/src/components/basic/DlButton/types.ts +14 -0
- package/src/components/{DlButton → basic/DlButton}/utils.ts +9 -9
- package/src/components/{DlChip → basic/DlChip}/DlChip.vue +3 -4
- package/src/components/basic/DlChip/index.ts +3 -0
- package/src/components/{DlChip → basic/DlChip}/utils.ts +8 -8
- package/src/components/basic/DlKpi/DlKpi.vue +275 -0
- package/src/components/basic/DlKpi/components/KpiInfo.vue +54 -0
- package/src/components/basic/DlKpi/index.ts +2 -0
- package/src/components/basic/DlKpi/types/KpiItem.ts +28 -0
- package/src/components/basic/DlKpi/types.ts +1 -0
- package/src/components/{DlListItem → basic/DlListItem}/DlListItem.vue +3 -3
- package/src/components/{DlPanelContainer → basic/DlPanelContainer}/DlPanelContainer.vue +1 -2
- package/src/components/basic/DlPanelContainer/index.ts +2 -0
- package/src/components/{DlPopup → basic/DlPopup}/DlPopup.vue +23 -20
- package/src/components/{DlPopup → basic/DlPopup/components}/PopupHeader.vue +1 -2
- package/src/components/basic/DlPopup/index.ts +3 -0
- package/src/components/{DlProgressChart.vue → basic/DlProgressChart/DlProgressChart.vue} +3 -4
- package/src/components/basic/DlProgressChart/index.ts +2 -0
- package/src/components/{DlWidget → basic/DlWidget}/DlWidget.vue +2 -2
- package/src/components/basic/DlWidget/index.ts +5 -0
- package/src/components/basic/index.ts +11 -0
- package/src/components/basic/models.ts +1 -0
- package/src/components/basic/types.ts +8 -0
- package/src/components/{DlChart → compound/DlCharts/charts/DlBarChart}/DlBarChart.vue +13 -9
- package/src/components/compound/DlCharts/charts/DlBarChart/index.ts +2 -0
- package/src/components/{DlChart → compound/DlCharts/charts/DlColumnChart}/DlColumnChart.vue +13 -15
- package/src/components/compound/DlCharts/charts/DlColumnChart/index.ts +2 -0
- package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart}/DlDoughnutChart.vue +5 -5
- package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart}/DlDoughnutChartWidget.vue +1 -3
- package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart/components}/DlDoughnutChartLegend.vue +2 -4
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/index.ts +3 -0
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/types/index.ts +5 -0
- package/src/components/{DlChart → compound/DlCharts/charts/DlLineChart}/DlLineChart.vue +12 -8
- package/src/components/compound/DlCharts/charts/DlLineChart/index.ts +2 -0
- package/src/components/compound/DlCharts/charts/index.ts +4 -0
- package/src/components/{DlChart → compound/DlCharts/components}/DlBrush.vue +7 -7
- package/src/components/{DlChart → compound/DlCharts/components}/DlChartLabels.vue +2 -3
- package/src/components/{DlChart → compound/DlCharts/components}/DlChartLegend.vue +2 -3
- package/src/components/{DlChart/DlScrollBar.vue → compound/DlCharts/components/DlChartScrollBar.vue} +1 -1
- package/src/components/compound/DlCharts/index.ts +1 -0
- package/src/components/{DlChart → compound/DlCharts/models}/chart.ts +4 -4
- package/src/components/compound/DlCharts/models/index.ts +1 -0
- package/src/components/{DlChart → compound/DlCharts/shared}/BrushThumb.vue +3 -4
- package/src/components/compound/DlCharts/types/index.ts +1 -0
- package/src/components/{DlChart → compound/DlCharts/types}/props.ts +2 -2
- package/src/components/{DlChart → compound/DlCharts/types}/typedCharts.ts +5 -5
- package/src/components/{DlChart → compound/DlCharts/types}/types.ts +4 -4
- package/src/components/compound/DlCharts/types.ts +1 -0
- package/src/components/{DlCounters.vue → compound/DlCounters/DlCounters.vue} +15 -26
- package/src/components/compound/DlCounters/index.ts +2 -0
- package/src/components/{DlDatePicker → compound/DlDateTime/DlDatePicker}/DlDatePicker.vue +3 -4
- package/src/components/{DlDatePicker → compound/DlDateTime/DlDatePicker/components}/DlCalendar.vue +10 -12
- package/src/components/{DlDatePicker → compound/DlDateTime/DlDatePicker/components}/DlMonthCalendar.vue +4 -5
- package/src/components/compound/DlDateTime/DlDatePicker/models/index.ts +3 -0
- package/src/components/{DlDatePicker/isInRange.ts → compound/DlDateTime/DlDatePicker/utils.ts} +40 -1
- package/src/components/{DlDateTimeRange → compound/DlDateTime/DlDateTimeRange}/DlDateInput.vue +1 -1
- package/src/components/{DlDateTimeRange → compound/DlDateTime/DlDateTimeRange}/DlDateTimeRange.vue +6 -6
- package/src/components/{DlTimePicker → compound/DlDateTime/DlTimePicker}/DlTimePicker.vue +2 -2
- package/src/components/{DlTimePicker → compound/DlDateTime/DlTimePicker/components}/DlTimePickerInput.vue +2 -3
- package/src/components/compound/DlDateTime/index.ts +3 -0
- package/src/components/compound/DlDateTime/types.ts +3 -0
- package/src/components/{DlDialogBox → compound/DlDialogBox/components}/DlDialogBoxHeader.vue +1 -1
- package/src/components/compound/DlDialogBox/index.ts +5 -0
- package/src/components/compound/DlDialogBox/types.ts +1 -0
- package/src/components/{DlDropdownButton.vue → compound/DlDropdownButton/DlDropdownButton.vue} +10 -10
- package/src/components/{DlButtonGroup.vue → compound/DlDropdownButton/components/ButtonGroup.vue} +4 -3
- package/src/components/compound/DlDropdownButton/index.ts +2 -0
- package/src/components/{DlTextInput.vue → compound/DlInput/DlInput.vue} +12 -14
- package/src/components/compound/DlInput/index.ts +2 -0
- package/src/components/{DlItem → compound/DlItem}/DlItem.vue +2 -2
- package/src/components/{DlSmartSearch → compound/DlJsonEditor}/DlJsonEditor.vue +5 -6
- package/src/components/compound/DlJsonEditor/index.ts +2 -0
- package/src/components/compound/DlJsonEditor/types.ts +4 -0
- package/src/components/{DlOptionGroup → compound/DlOptionGroup}/DlOptionGroup.vue +9 -10
- package/src/components/{DlOptionGroup → compound/DlOptionGroup/components}/MenuItemWrapper.vue +3 -3
- package/src/components/{DlOptionGroup → compound/DlOptionGroup/components}/SimpleWrapper.vue +1 -1
- package/src/components/{DlOptionGroup → compound/DlOptionGroup}/index.ts +1 -1
- package/src/components/compound/DlOptionGroup/types.ts +40 -0
- package/src/components/compound/DlOptionGroup/utils.ts +46 -0
- package/src/components/{DlPagination → compound/DlPagination}/DlPagination.vue +4 -4
- package/src/components/{DlPagination → compound/DlPagination/components}/PageNavigation.vue +2 -2
- package/src/components/{DlPagination → compound/DlPagination/components}/QuickNavigation.vue +4 -4
- package/src/components/{DlPagination → compound/DlPagination/components}/RowsSelector.vue +2 -2
- package/src/components/{DlRange → compound/DlRange}/DlRange.vue +3 -3
- package/src/components/compound/DlRange/index.ts +2 -0
- package/src/components/{DlRange → compound/DlRange}/utils.ts +4 -4
- package/src/components/{DlSearch.vue → compound/DlSearches/DlSearch/DlSearch.vue} +6 -6
- package/src/components/compound/DlSearches/DlSearch/index.ts +2 -0
- package/src/components/compound/DlSearches/DlSearch/types.ts +1 -0
- package/src/components/{DlSmartSearch → compound/DlSearches/DlSmartSearch}/DlSmartSearch.vue +15 -11
- package/src/components/{DlSmartSearch → compound/DlSearches/DlSmartSearch/components}/DlSmartSearchInput.vue +15 -11
- package/src/components/{DlSmartSearch → compound/DlSearches/DlSmartSearch/components}/DlSuggestionsDropdown.vue +2 -3
- package/src/components/compound/DlSearches/DlSmartSearch/index.ts +3 -0
- package/src/components/{DlSmartSearch → compound/DlSearches/DlSmartSearch/utils}/highlightSyntax.ts +2 -4
- package/src/components/{DlSmartSearch/utils.ts → compound/DlSearches/DlSmartSearch/utils/index.ts} +4 -2
- package/src/components/compound/DlSearches/index.ts +2 -0
- package/src/components/compound/DlSearches/types.ts +2 -0
- package/src/components/{DlSelect → compound/DlSelect}/DlSelect.vue +14 -18
- package/src/components/{DlSelect/SelectOption.vue → compound/DlSelect/components/DlSelectOption.vue} +5 -6
- package/src/components/compound/DlSelect/index.ts +4 -0
- package/src/components/{DlSelect → compound/DlSelect}/utils.ts +4 -4
- package/src/components/{DlSlider → compound/DlSlider}/DlSlider.vue +3 -2
- package/src/components/{DlSlider → compound/DlSlider}/components/DlSliderBase.vue +2 -2
- package/src/components/{DlSlider → compound/DlSlider}/useSlider.ts +2 -2
- package/src/components/{DlStepper → compound/DlStepper}/DlStepper.vue +8 -8
- package/src/components/{DlStepper → compound/DlStepper/components}/DlStepperContent.vue +2 -2
- package/src/components/{DlStepper → compound/DlStepper/components}/DlStepperFooter.vue +2 -2
- package/src/components/{DlStepper → compound/DlStepper/components}/DlStepperHeader.vue +2 -1
- package/src/components/{DlStepper → compound/DlStepper/components}/DlStepperSidebar.vue +4 -4
- package/src/components/compound/DlStepper/index.ts +4 -0
- package/src/components/compound/DlStepper/models/index.ts +3 -0
- package/src/components/compound/DlStepper/types.ts +2 -0
- package/src/components/{DlTabPanels → compound/DlTabPanels}/DlTabPanels.vue +1 -1
- package/src/components/{DlTable → compound/DlTable}/DlTable.vue +20 -20
- package/src/components/{DlTable → compound/DlTable/components}/DlTd.vue +4 -4
- package/src/components/{DlTable → compound/DlTable/components}/DlTh.vue +3 -4
- package/src/components/{DlTable → compound/DlTable/components}/DlTr.vue +1 -1
- package/src/components/{DlTable → compound/DlTable}/hooks/tableColumnSelection.ts +6 -6
- package/src/components/{DlTable → compound/DlTable}/hooks/tableFilter.ts +2 -2
- package/src/components/{DlTable → compound/DlTable}/hooks/tableRowSelection.ts +6 -6
- package/src/components/{DlTable → compound/DlTable}/hooks/tableSort.ts +11 -11
- package/src/components/compound/DlTable/index.ts +6 -0
- package/src/components/compound/DlTable/types.ts +96 -0
- package/src/components/compound/DlTable/utils/index.ts +1 -0
- package/src/components/{DlTabs → compound/DlTabs}/DlTabs.vue +5 -5
- package/src/components/{DlTabs → compound/DlTabs/components}/DlTab.vue +2 -3
- package/src/components/{DlTabs → compound/DlTabs/components}/TabsWrapper.vue +2 -2
- package/src/components/{DlTabs → compound/DlTabs}/index.ts +1 -1
- package/src/components/{DlTabs → compound/DlTabs}/types.ts +1 -1
- package/src/components/{DlToastMessage → compound/DlToast}/components/ToastComponent.vue +2 -3
- package/src/components/compound/index.ts +18 -0
- package/src/components/compound/models.ts +1 -0
- package/src/components/compound/types.ts +10 -0
- package/src/components/essential/DlBadge/index.ts +2 -0
- package/src/components/{DlCheckbox.vue → essential/DlCheckbox/DlCheckbox.vue} +2 -2
- package/src/components/essential/DlCheckbox/index.ts +2 -0
- package/src/components/{DlColorPicker → essential/DlColorPicker}/DlColorPicker.vue +6 -6
- package/src/components/{DlColorPicker → essential/DlColorPicker/components}/DlAlpha.vue +1 -1
- package/src/components/{DlColorPicker → essential/DlColorPicker/components}/DlColors.vue +1 -1
- package/src/components/{DlColorPicker → essential/DlColorPicker/components}/DlPreview.vue +1 -1
- package/src/components/{DlColorPicker → essential/DlColorPicker/components}/DlSaturation.vue +1 -1
- package/src/components/essential/DlColorPicker/index.ts +17 -0
- package/src/components/{DlColorPicker → essential/DlColorPicker}/types.ts +3 -0
- package/src/components/{DlIcon.vue → essential/DlIcon/DlIcon.vue} +1 -1
- package/src/components/essential/DlIcon/index.ts +2 -0
- package/src/components/{DlLink → essential/DlLink}/index.ts +0 -1
- package/src/components/essential/DlList/index.ts +2 -0
- package/src/components/{DlMenu → essential/DlMenu}/DlMenu.vue +19 -17
- package/src/components/{DlMenu → essential/DlMenu}/utils.ts +5 -5
- package/src/components/essential/DlPanel/index.ts +2 -0
- package/src/components/{DlProgressBar.vue → essential/DlProgressBar/DlProgressBar.vue} +27 -2
- package/src/components/essential/DlProgressBar/index.ts +2 -0
- package/src/components/{DlRadio.vue → essential/DlRadio/DlRadio.vue} +1 -2
- package/src/components/essential/DlRadio/index.ts +2 -0
- package/src/components/essential/DlSkeleton/index.ts +2 -0
- package/src/components/essential/DlSpinner/index.ts +2 -0
- package/src/components/{DlSwitch.vue → essential/DlSwitch/DlSwitch.vue} +3 -3
- package/src/components/essential/DlSwitch/index.ts +2 -0
- package/src/components/essential/DlTextArea/index.ts +2 -0
- package/src/components/essential/DlTextHolder/index.ts +2 -0
- package/src/components/{DlThemeProvider.vue → essential/DlThemeProvider/DlThemeProvider.vue} +3 -3
- package/src/components/essential/DlThemeProvider/index.ts +2 -0
- package/src/components/{DlTooltip.vue → essential/DlTooltip/DlTooltip.vue} +15 -13
- package/src/components/essential/DlTooltip/index.ts +2 -0
- package/src/components/{DlTrend.vue → essential/DlTrend/DlTrend.vue} +1 -1
- package/src/components/essential/DlTrend/index.ts +2 -0
- package/src/components/{DlTypography.vue → essential/DlTypography/DlTypography.vue} +1 -1
- package/src/components/essential/DlTypography/index.ts +2 -0
- package/src/components/essential/index.ts +19 -0
- package/src/components/essential/models.ts +1 -0
- package/src/components/essential/types.ts +1 -0
- package/src/components/index.ts +4 -123
- package/src/components/models.ts +4 -0
- package/src/components/shared/DlInfoErrorMessage/index.ts +2 -0
- package/src/components/{DlItemSection.vue → shared/DlItemSection/DlItemSection.vue} +1 -1
- package/src/components/shared/DlItemSection/index.ts +2 -0
- package/src/components/{DlVirtualScroll → shared/DlVirtualScroll}/DlVirtualScroll.vue +3 -3
- package/src/components/shared/index.ts +3 -0
- package/src/components/shared/models.ts +1 -0
- package/src/components/shared/types.ts +1 -0
- package/src/components/types.ts +3 -0
- package/src/demo/BarChartDemo.vue +1 -1
- package/src/demo/ColumnChartDemo.vue +1 -2
- package/src/demo/DlAvatarDemo.vue +2 -2
- package/src/demo/DlButtonDemo.vue +1 -1
- package/src/demo/DlChartDoughnutDemo.vue +2 -2
- package/src/demo/DlColorPickerDemo.vue +1 -1
- package/src/demo/DlCounterDemo.vue +1 -1
- package/src/demo/DlDateTimeRangeDemo.vue +1 -1
- package/src/demo/DlDialogBoxDemo.vue +1 -1
- package/src/demo/{DlTextInputDemo.vue → DlInputDemo.vue} +8 -8
- package/src/demo/DlKpiDemo.vue +261 -0
- package/src/demo/DlOptionGroupDemo.vue +2 -2
- package/src/demo/DlPaginationDemo.vue +1 -1
- package/src/demo/DlPopupDemo.vue +2 -3
- package/src/demo/DlSpinnerDemo.vue +1 -1
- package/src/demo/DlStepperDemo/CenteredStepperInDialogBox.vue +3 -10
- package/src/demo/DlStepperDemo/SimpleStepper.vue +3 -9
- package/src/demo/DlStepperDemo/StepperInDialogBox.vue +3 -10
- package/src/demo/DlStepperDemo/steps/DataStep.vue +3 -3
- package/src/demo/DlStepperDemo/steps/GeneralStep.vue +4 -4
- package/src/demo/DlTableDemo.vue +3 -3
- package/src/demo/DlTabsDemo.vue +2 -2
- package/src/demo/{DlToastMessageDemo.vue → DlToastDemo.vue} +5 -11
- package/src/demo/DlTypographyDemo.vue +1 -2
- package/src/demo/DlWidgetDemo.vue +1 -4
- package/src/demo/SmartSearchDemo/DlSmartSearchDemo.vue +1 -1
- package/src/demo/index.ts +8 -6
- package/src/models.ts +1 -3
- package/src/types.ts +1 -6
- package/src/utils/formatNumber.ts +15 -0
- package/src/utils/index.ts +1 -0
- package/src/components/DlChart/index.ts +0 -36
- package/src/components/DlChip/index.ts +0 -4
- package/src/components/DlColorPicker/index.ts +0 -20
- package/src/components/DlDatePicker/utils.ts +0 -39
- package/src/components/DlDialogBox/index.ts +0 -5
- package/src/components/DlOptionGroup/OptionGroup.types.ts +0 -36
- package/src/components/DlOptionGroup/utils.ts +0 -40
- package/src/components/DlPanelContainer/index.ts +0 -4
- package/src/components/DlPopup/index.ts +0 -1
- package/src/components/DlSelect/index.ts +0 -4
- package/src/components/DlSmartSearch/index.ts +0 -4
- package/src/components/DlStepper/index.ts +0 -7
- package/src/components/DlTable/index.ts +0 -6
- package/src/components/DlTable/types.ts +0 -96
- package/src/components/DlWidget/index.ts +0 -4
- /package/src/components/{DlAccordion → basic/DlAccordion}/index.ts +0 -0
- /package/src/components/{DlListItem → basic/DlListItem}/index.ts +0 -0
- /package/src/components/{DlListItem → basic/DlListItem}/utils.ts +0 -0
- /package/src/components/{DlPopup → basic/DlPopup/components}/DraggableUpper.vue +0 -0
- /package/src/components/{DlWidget → basic/DlWidget}/DlGrid.vue +0 -0
- /package/src/components/{DlWidget → basic/DlWidget}/DlGridRow.vue +0 -0
- /package/src/components/{DlWidget → basic/DlWidget}/types.ts +0 -0
- /package/src/components/{DlWidget → basic/DlWidget}/utils.ts +0 -0
- /package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart}/types/TDoughnutChartAnimation.ts +0 -0
- /package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart}/types/TDoughnutChartData.ts +0 -0
- /package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart}/types/TDoughnutChartOptions.ts +0 -0
- /package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart}/types/TDoughnutChartProps.ts +0 -0
- /package/src/components/{DlChart/Doughnut → compound/DlCharts/charts/DlDoughnutChart}/types/TDoughnutWithOriginalColor.ts +0 -0
- /package/src/components/{DlChart → compound/DlCharts}/utils.ts +0 -0
- /package/src/components/{DlDatePicker → compound/DlDateTime/DlDatePicker}/index.ts +0 -0
- /package/src/components/{DlDatePicker/classes → compound/DlDateTime/DlDatePicker/models}/Calendar.ts +0 -0
- /package/src/components/{DlDatePicker/classes → compound/DlDateTime/DlDatePicker/models}/CalendarDate.ts +0 -0
- /package/src/components/{DlDatePicker/classes → compound/DlDateTime/DlDatePicker/models}/CustomDate.ts +0 -0
- /package/src/components/{DlDatePicker → compound/DlDateTime/DlDatePicker}/types.ts +0 -0
- /package/src/components/{DlDateTimeRange → compound/DlDateTime/DlDateTimeRange}/DlCardSidebar.vue +0 -0
- /package/src/components/{DlDateTimeRange → compound/DlDateTime/DlDateTimeRange}/index.ts +0 -0
- /package/src/components/{DlDateTimeRange → compound/DlDateTime/DlDateTimeRange}/types.ts +0 -0
- /package/src/components/{DlTimePicker → compound/DlDateTime/DlTimePicker/components}/DlTimeCounter.vue +0 -0
- /package/src/components/{DlTimePicker → compound/DlDateTime/DlTimePicker}/index.ts +0 -0
- /package/src/components/{DlTimePicker → compound/DlDateTime/DlTimePicker}/types.ts +0 -0
- /package/src/components/{DlDialogBox → compound/DlDialogBox}/DlDialogBox.vue +0 -0
- /package/src/components/{DlDialogBox → compound/DlDialogBox/components}/DlDialogBoxFooter.vue +0 -0
- /package/src/components/{DlItem → compound/DlItem}/index.ts +0 -0
- /package/src/components/{DlPagination → compound/DlPagination/components}/PaginationLegend.vue +0 -0
- /package/src/components/{DlPagination → compound/DlPagination}/index.ts +0 -0
- /package/src/components/{DlSmartSearch → compound/DlSearches/DlSmartSearch}/types.ts +0 -0
- /package/src/components/{DlSlider → compound/DlSlider}/components/DlSliderInput.vue +0 -0
- /package/src/components/{DlSlider → compound/DlSlider}/components/index.ts +0 -0
- /package/src/components/{DlSlider → compound/DlSlider}/index.ts +0 -0
- /package/src/components/{DlSlider → compound/DlSlider}/sliderStyles.scss +0 -0
- /package/src/components/{DlSlider → compound/DlSlider}/utils.ts +0 -0
- /package/src/components/{DlStepper → compound/DlStepper/components}/DlStepperContainer.vue +0 -0
- /package/src/components/{DlStepper → compound/DlStepper/models}/Step.ts +0 -0
- /package/src/components/{DlStepper → compound/DlStepper/models}/Stepper.ts +0 -0
- /package/src/components/{DlStepper → compound/DlStepper/models}/interfaces.ts +0 -0
- /package/src/components/{DlTabPanels → compound/DlTabPanels}/DlTabPanel.vue +0 -0
- /package/src/components/{DlTabPanels → compound/DlTabPanels}/index.ts +0 -0
- /package/src/components/{DlTabPanels → compound/DlTabPanels}/utils.ts +0 -0
- /package/src/components/{DlTable → compound/DlTable}/hooks/tableActions.ts +0 -0
- /package/src/components/{DlTable → compound/DlTable}/hooks/tablePagination.ts +0 -0
- /package/src/components/{DlTable → compound/DlTable}/hooks/tableRowExpand.ts +0 -0
- /package/src/components/{DlTable → compound/DlTable/styles}/dl-table-styles.scss +0 -0
- /package/src/components/{DlTable → compound/DlTable/utils}/ResizableManager.ts +0 -0
- /package/src/components/{DlToastMessage → compound/DlToast}/api/useToast.ts +0 -0
- /package/src/components/{DlToastMessage → compound/DlToast}/index.ts +0 -0
- /package/src/components/{DlToastMessage → compound/DlToast}/types.ts +0 -0
- /package/src/components/{DlToastMessage → compound/DlToast}/utils/config.ts +0 -0
- /package/src/components/{DlToastMessage → compound/DlToast}/utils/render.ts +0 -0
- /package/src/components/{DlBadge.vue → essential/DlBadge/DlBadge.vue} +0 -0
- /package/src/components/{DlColorPicker → essential/DlColorPicker/components}/DlBox.vue +0 -0
- /package/src/components/{DlColorPicker → essential/DlColorPicker/components}/DlHue.vue +0 -0
- /package/src/components/{DlColorPicker → essential/DlColorPicker}/constants.ts +0 -0
- /package/src/components/{DlColorPicker → essential/DlColorPicker}/utils.ts +0 -0
- /package/src/components/{DlLink → essential/DlLink}/DlLink.vue +0 -0
- /package/src/components/{DlLink → essential/DlLink}/utils.ts +0 -0
- /package/src/components/{DlList.vue → essential/DlList/DlList.vue} +0 -0
- /package/src/components/{DlMenu → essential/DlMenu}/index.ts +0 -0
- /package/src/components/{DlPanelContainer → essential/DlPanel}/DlPanel.vue +0 -0
- /package/src/components/{DlSkeleton.vue → essential/DlSkeleton/DlSkeleton.vue} +0 -0
- /package/src/components/{DlSpinner.vue → essential/DlSpinner/DlSpinner.vue} +0 -0
- /package/src/components/{DlTextArea.vue → essential/DlTextArea/DlTextArea.vue} +0 -0
- /package/src/components/{DlTextHolder.vue → essential/DlTextHolder/DlTextHolder.vue} +0 -0
- /package/src/components/{DlInfoErrorMessage.vue → shared/DlInfoErrorMessage/DlInfoErrorMessage.vue} +0 -0
- /package/src/components/{DlVirtualScroll → shared/DlVirtualScroll}/index.ts +0 -0
- /package/src/components/{DlVirtualScroll → shared/DlVirtualScroll}/useVirtualScroll.ts +0 -0
package/package.json
CHANGED
|
@@ -43,12 +43,10 @@
|
|
|
43
43
|
</template>
|
|
44
44
|
|
|
45
45
|
<script lang="ts">
|
|
46
|
-
import DlIcon from '
|
|
47
|
-
import DlTooltip from '../DlTooltip.vue'
|
|
46
|
+
import { DlIcon, DlTooltip } from '../../../essential'
|
|
48
47
|
import { defineComponent, ref } from 'vue-demi'
|
|
49
|
-
import { getColor } from '
|
|
50
|
-
import { useSizeObserver } from '
|
|
51
|
-
|
|
48
|
+
import { getColor } from '../../../../utils'
|
|
49
|
+
import { useSizeObserver } from '../../../../hooks/use-size-observer'
|
|
52
50
|
export default defineComponent({
|
|
53
51
|
name: 'AccordionHeader',
|
|
54
52
|
components: {
|
|
@@ -46,12 +46,12 @@ import {
|
|
|
46
46
|
defineComponent,
|
|
47
47
|
nextTick,
|
|
48
48
|
onMounted,
|
|
49
|
-
ref,
|
|
50
49
|
Ref,
|
|
50
|
+
ref,
|
|
51
51
|
watch
|
|
52
52
|
} from 'vue-demi'
|
|
53
|
-
import { getColor, includes } from '
|
|
54
|
-
import { DlIcon } from '
|
|
53
|
+
import { getColor, includes } from '../../../utils'
|
|
54
|
+
import { DlIcon } from '../../essential'
|
|
55
55
|
|
|
56
56
|
type AlertType = 'info' | 'success' | 'warning' | 'error'
|
|
57
57
|
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
|
|
20
20
|
<script lang="ts">
|
|
21
21
|
import { defineComponent } from 'vue-demi'
|
|
22
|
-
import DlTooltip from '
|
|
23
|
-
import { getColor } from '
|
|
22
|
+
import { DlTooltip } from '../../essential'
|
|
23
|
+
import { getColor } from '../../../utils'
|
|
24
24
|
import { v4 } from 'uuid'
|
|
25
25
|
|
|
26
26
|
export default defineComponent({
|
|
@@ -50,8 +50,7 @@
|
|
|
50
50
|
</template>
|
|
51
51
|
|
|
52
52
|
<script lang="ts">
|
|
53
|
-
import DlIcon from '
|
|
54
|
-
import DlTooltip from '../DlTooltip.vue'
|
|
53
|
+
import { DlTooltip, DlIcon } from '../../essential'
|
|
55
54
|
import {
|
|
56
55
|
setPadding,
|
|
57
56
|
setFontSize,
|
|
@@ -66,26 +65,12 @@ import {
|
|
|
66
65
|
setMaxHeight
|
|
67
66
|
} from './utils'
|
|
68
67
|
import type { ButtonSizes } from './utils'
|
|
69
|
-
import { textTransform } from '
|
|
68
|
+
import { textTransform } from '../../../utils/string'
|
|
70
69
|
import { defineComponent, PropType, ref } from 'vue-demi'
|
|
71
|
-
import { colorNames } from '
|
|
72
|
-
import { useSizeObserver } from '
|
|
70
|
+
import { colorNames } from '../../../utils/css-color-names'
|
|
71
|
+
import { useSizeObserver } from '../../../hooks/use-size-observer'
|
|
73
72
|
import { v4 } from 'uuid'
|
|
74
|
-
|
|
75
|
-
export enum ButtonState {
|
|
76
|
-
Active = 'ACTIVE',
|
|
77
|
-
Hover = 'HOVER',
|
|
78
|
-
Pressed = 'PRESSED',
|
|
79
|
-
Disabled = 'DISABLED'
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export enum ButtonPart {
|
|
83
|
-
Text = 'TEXT',
|
|
84
|
-
Background = 'BACKGROUND',
|
|
85
|
-
Border = 'BORDER'
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export type ButtonColors = Record<ButtonState, Record<ButtonPart, string>>
|
|
73
|
+
import { ButtonColors } from './types'
|
|
89
74
|
|
|
90
75
|
export default defineComponent({
|
|
91
76
|
name: 'DlButton',
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export enum ButtonState {
|
|
2
|
+
Active = 'ACTIVE',
|
|
3
|
+
Hover = 'HOVER',
|
|
4
|
+
Pressed = 'PRESSED',
|
|
5
|
+
Disabled = 'DISABLED'
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export enum ButtonPart {
|
|
9
|
+
Text = 'TEXT',
|
|
10
|
+
Background = 'BACKGROUND',
|
|
11
|
+
Border = 'BORDER'
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type ButtonColors = Record<ButtonState, Record<ButtonPart, string>>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getColor } from '
|
|
2
|
-
import { getLighterGradient } from '
|
|
1
|
+
import { getColor } from '../../../utils'
|
|
2
|
+
import { getLighterGradient } from '../../../utils/getLighterGradient'
|
|
3
3
|
|
|
4
4
|
export type ButtonSizes = 's' | 'm' | 'l' | 'xl'
|
|
5
5
|
|
|
@@ -38,7 +38,7 @@ const fontSizes = {
|
|
|
38
38
|
xl: '18px'
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
interface
|
|
41
|
+
export interface DlButtonProps {
|
|
42
42
|
disabled: boolean
|
|
43
43
|
outlined: boolean
|
|
44
44
|
flat: boolean
|
|
@@ -64,7 +64,7 @@ export const setTextColor = ({
|
|
|
64
64
|
color,
|
|
65
65
|
filled,
|
|
66
66
|
textColor
|
|
67
|
-
}:
|
|
67
|
+
}: DlButtonProps): string => {
|
|
68
68
|
if (disabled) {
|
|
69
69
|
return getColor('', 'dl-color-disabled')
|
|
70
70
|
}
|
|
@@ -90,7 +90,7 @@ export const setBgColor = ({
|
|
|
90
90
|
flat,
|
|
91
91
|
outlined,
|
|
92
92
|
color = ''
|
|
93
|
-
}: Partial<
|
|
93
|
+
}: Partial<DlButtonProps>) => {
|
|
94
94
|
if (disabled || flat || outlined) {
|
|
95
95
|
return 'var(--dl-color-transparent)'
|
|
96
96
|
}
|
|
@@ -102,7 +102,7 @@ export const setBorder = ({
|
|
|
102
102
|
disabled,
|
|
103
103
|
flat,
|
|
104
104
|
color = ''
|
|
105
|
-
}: Partial<
|
|
105
|
+
}: Partial<DlButtonProps>) => {
|
|
106
106
|
if (disabled) {
|
|
107
107
|
return flat
|
|
108
108
|
? 'var(--dl-color-transparent)'
|
|
@@ -120,7 +120,7 @@ export const setColorOnHover = ({
|
|
|
120
120
|
flat,
|
|
121
121
|
outlined,
|
|
122
122
|
color
|
|
123
|
-
}: Partial<
|
|
123
|
+
}: Partial<DlButtonProps>) => {
|
|
124
124
|
if (color) return getLighterGradient(color)
|
|
125
125
|
if (disabled) {
|
|
126
126
|
return flat ? 'var(--dl-color-transparent)' : 'var(--dl-color-disabled)'
|
|
@@ -136,7 +136,7 @@ export const setBorderOnHover = ({
|
|
|
136
136
|
disabled,
|
|
137
137
|
flat,
|
|
138
138
|
color
|
|
139
|
-
}: Partial<
|
|
139
|
+
}: Partial<DlButtonProps>) => {
|
|
140
140
|
if (disabled) {
|
|
141
141
|
return 'var(--dl-color-separator)'
|
|
142
142
|
}
|
|
@@ -155,7 +155,7 @@ export const setBgOnHover = ({
|
|
|
155
155
|
outlined,
|
|
156
156
|
filled,
|
|
157
157
|
color
|
|
158
|
-
}: Partial<
|
|
158
|
+
}: Partial<DlButtonProps>) => {
|
|
159
159
|
if (color) return getLighterGradient(color)
|
|
160
160
|
|
|
161
161
|
if (disabled || flat || outlined) {
|
|
@@ -49,9 +49,8 @@
|
|
|
49
49
|
|
|
50
50
|
<script lang="ts">
|
|
51
51
|
import { defineComponent, ref } from 'vue-demi'
|
|
52
|
-
import DlTooltip from '../../
|
|
53
|
-
import
|
|
54
|
-
import { useSizeObserver } from '../../hooks/use-size-observer'
|
|
52
|
+
import { DlIcon, DlTooltip } from '../../essential'
|
|
53
|
+
import { useSizeObserver } from '../../../hooks/use-size-observer'
|
|
55
54
|
import {
|
|
56
55
|
setTextColor,
|
|
57
56
|
setBgColor,
|
|
@@ -81,7 +80,7 @@ export default defineComponent({
|
|
|
81
80
|
name: 'DlChip',
|
|
82
81
|
components: {
|
|
83
82
|
'dl-tooltip': DlTooltip,
|
|
84
|
-
'dl-icon':
|
|
83
|
+
'dl-icon': DlIcon
|
|
85
84
|
},
|
|
86
85
|
props: {
|
|
87
86
|
disabled: Boolean,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getColor } from '
|
|
1
|
+
import { getColor } from '../../../utils'
|
|
2
2
|
|
|
3
|
-
interface
|
|
3
|
+
export interface DlChipProps {
|
|
4
4
|
hasIcon: boolean
|
|
5
5
|
hasLabel: boolean
|
|
6
6
|
removable: boolean
|
|
@@ -16,7 +16,7 @@ export const setTextColor = ({
|
|
|
16
16
|
outlined,
|
|
17
17
|
filled,
|
|
18
18
|
textColor = ''
|
|
19
|
-
}: Partial<
|
|
19
|
+
}: Partial<DlChipProps>): string => {
|
|
20
20
|
if (disabled) {
|
|
21
21
|
return getColor('', 'dl-color-disabled')
|
|
22
22
|
}
|
|
@@ -34,7 +34,7 @@ export const setBgColor = ({
|
|
|
34
34
|
disabled,
|
|
35
35
|
outlined,
|
|
36
36
|
color = ''
|
|
37
|
-
}: Partial<
|
|
37
|
+
}: Partial<DlChipProps>) => {
|
|
38
38
|
if (disabled || outlined) {
|
|
39
39
|
return 'transparent'
|
|
40
40
|
}
|
|
@@ -42,7 +42,7 @@ export const setBgColor = ({
|
|
|
42
42
|
return getColor(color, 'dl-color-secondary')
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export const setBorder = ({ disabled, color = '' }: Partial<
|
|
45
|
+
export const setBorder = ({ disabled, color = '' }: Partial<DlChipProps>) => {
|
|
46
46
|
if (disabled) {
|
|
47
47
|
return `1px solid var(--dl-color-disabled)`
|
|
48
48
|
}
|
|
@@ -54,7 +54,7 @@ export const setPadding = ({
|
|
|
54
54
|
hasLabel,
|
|
55
55
|
removable,
|
|
56
56
|
hasIcon
|
|
57
|
-
}: Partial<
|
|
57
|
+
}: Partial<DlChipProps>) => {
|
|
58
58
|
const left = hasIcon ? 20 : 5
|
|
59
59
|
const right = removable ? 20 : 5
|
|
60
60
|
|
|
@@ -76,7 +76,7 @@ export const setRemoveIconWidth = ({
|
|
|
76
76
|
hasLabel,
|
|
77
77
|
removable,
|
|
78
78
|
hasIcon
|
|
79
|
-
}: Partial<
|
|
79
|
+
}: Partial<DlChipProps>) => {
|
|
80
80
|
const iconWidth = (hasLabel || hasIcon) && removable ? 14 : 18
|
|
81
81
|
|
|
82
82
|
return `${iconWidth}px`
|
|
@@ -96,5 +96,5 @@ export const setMaxWidth = (maxWidth: string | number) => {
|
|
|
96
96
|
export const setLeftIconColor = ({
|
|
97
97
|
color = '',
|
|
98
98
|
disabled
|
|
99
|
-
}: Partial<
|
|
99
|
+
}: Partial<DlChipProps>) =>
|
|
100
100
|
getColor(disabled ? 'dl-color-disabled' : color, 'dl-color-secondary')
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="kpi_box"
|
|
4
|
+
:style="cssVars"
|
|
5
|
+
>
|
|
6
|
+
<div class="kpi_box__counter">
|
|
7
|
+
<dl-typography
|
|
8
|
+
color="dl-color-secondary"
|
|
9
|
+
variant="h1"
|
|
10
|
+
:size="counterFontSizeComputed"
|
|
11
|
+
>
|
|
12
|
+
{{ formatCounter(counter) }}
|
|
13
|
+
</dl-typography>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="kpi_box__title">
|
|
16
|
+
<div class="kpi_box__title__text">
|
|
17
|
+
<div>
|
|
18
|
+
<dl-typography
|
|
19
|
+
color="dl-color-darker"
|
|
20
|
+
variant="h3"
|
|
21
|
+
:size="titleFontSizeComputed"
|
|
22
|
+
>
|
|
23
|
+
{{ title }}
|
|
24
|
+
</dl-typography>
|
|
25
|
+
</div>
|
|
26
|
+
<div v-if="infoMessage">
|
|
27
|
+
<KpiInfo :info-message="infoMessage" />
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="kpi_box__title__subtext">
|
|
31
|
+
<dl-typography
|
|
32
|
+
color="dl-color-medium"
|
|
33
|
+
variant="h3"
|
|
34
|
+
:size="subtitleFontSize"
|
|
35
|
+
>
|
|
36
|
+
{{ subtitle }}
|
|
37
|
+
</dl-typography>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<div
|
|
41
|
+
v-if="withProgressBar"
|
|
42
|
+
class="kpi_box__progress_bar"
|
|
43
|
+
>
|
|
44
|
+
<dl-progress-bar
|
|
45
|
+
color="dl-color-darker"
|
|
46
|
+
:value="progressValue(progress)"
|
|
47
|
+
:show-value="true"
|
|
48
|
+
:show-percentage="true"
|
|
49
|
+
:summary="progress.text"
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<script lang="ts">
|
|
56
|
+
import { defineComponent, PropType, computed } from 'vue-demi'
|
|
57
|
+
import {
|
|
58
|
+
DlKpiCounterFormat,
|
|
59
|
+
DlKpiCounterType,
|
|
60
|
+
DlKpiProgressType
|
|
61
|
+
} from './types/KpiItem'
|
|
62
|
+
import { DlProgressBar, DlTypography } from '../../essential'
|
|
63
|
+
import { abbreviateNumber, numberWithComma } from '../../../utils/formatNumber'
|
|
64
|
+
import KpiInfo from './components/KpiInfo.vue'
|
|
65
|
+
|
|
66
|
+
export default defineComponent({
|
|
67
|
+
name: 'DlKpi',
|
|
68
|
+
components: {
|
|
69
|
+
DlProgressBar,
|
|
70
|
+
DlTypography,
|
|
71
|
+
KpiInfo
|
|
72
|
+
},
|
|
73
|
+
props: {
|
|
74
|
+
counter: {
|
|
75
|
+
type: Object as PropType<DlKpiCounterType | number>,
|
|
76
|
+
default: () => ({})
|
|
77
|
+
},
|
|
78
|
+
counterFontSize: {
|
|
79
|
+
type: String,
|
|
80
|
+
default: '1.88em',
|
|
81
|
+
required: true
|
|
82
|
+
},
|
|
83
|
+
title: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: '---',
|
|
86
|
+
required: true
|
|
87
|
+
},
|
|
88
|
+
titleFontSize: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: '16px',
|
|
91
|
+
required: false
|
|
92
|
+
},
|
|
93
|
+
subtitle: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: '',
|
|
96
|
+
required: false
|
|
97
|
+
},
|
|
98
|
+
subtitleFontSize: {
|
|
99
|
+
type: String,
|
|
100
|
+
default: '12px',
|
|
101
|
+
required: false
|
|
102
|
+
},
|
|
103
|
+
infoMessage: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: 'No data',
|
|
106
|
+
required: false
|
|
107
|
+
},
|
|
108
|
+
progress: {
|
|
109
|
+
type: Object as PropType<DlKpiProgressType>,
|
|
110
|
+
default: () => ({})
|
|
111
|
+
},
|
|
112
|
+
withBorder: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
default: false,
|
|
115
|
+
required: false
|
|
116
|
+
},
|
|
117
|
+
withProgressBar: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: false,
|
|
120
|
+
required: false
|
|
121
|
+
},
|
|
122
|
+
isSmall: {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
default: false,
|
|
125
|
+
required: false
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
setup(props) {
|
|
129
|
+
const progressValue = (progress: DlKpiProgressType) => {
|
|
130
|
+
return progress?.value ? progress.value / 100 : null
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const emptyString = '---'
|
|
134
|
+
|
|
135
|
+
const cssVars = computed(() => {
|
|
136
|
+
return {
|
|
137
|
+
'--dl-kpi-border': props.withBorder ? '1px solid #e4e4e4' : ''
|
|
138
|
+
}
|
|
139
|
+
})
|
|
140
|
+
|
|
141
|
+
const counterFontSizeComputed = computed(() =>
|
|
142
|
+
props.isSmall ? '20px' : props.counterFontSize
|
|
143
|
+
)
|
|
144
|
+
const titleFontSizeComputed = computed(() =>
|
|
145
|
+
props.isSmall ? '14px' : props.titleFontSize
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
const formatCounter = (counter: DlKpiCounterType) => {
|
|
149
|
+
if (!counter) {
|
|
150
|
+
return emptyString
|
|
151
|
+
}
|
|
152
|
+
if (typeof counter === 'number') {
|
|
153
|
+
return formatNumberCounter(counter)
|
|
154
|
+
}
|
|
155
|
+
if (!counter.value) {
|
|
156
|
+
return emptyString
|
|
157
|
+
}
|
|
158
|
+
if (typeof counter.value === 'number') {
|
|
159
|
+
return formatNumberCounter(counter.value, counter.format)
|
|
160
|
+
}
|
|
161
|
+
if (typeof counter.value === 'string') {
|
|
162
|
+
if (!counter.value.length) {
|
|
163
|
+
return emptyString
|
|
164
|
+
}
|
|
165
|
+
const [hour, minutes, seconds] = (
|
|
166
|
+
counter.value as string
|
|
167
|
+
).split(':')
|
|
168
|
+
switch (counter.format) {
|
|
169
|
+
case DlKpiCounterFormat.hms: {
|
|
170
|
+
return `${hour}:${minutes}:${seconds}`.toLowerCase()
|
|
171
|
+
}
|
|
172
|
+
case DlKpiCounterFormat.hm: {
|
|
173
|
+
return `${hour}:${minutes}`.toLowerCase()
|
|
174
|
+
}
|
|
175
|
+
case DlKpiCounterFormat.h: {
|
|
176
|
+
return `${hour}`.toLowerCase()
|
|
177
|
+
}
|
|
178
|
+
case DlKpiCounterFormat.ms: {
|
|
179
|
+
return `${minutes}:${seconds}`.toLowerCase()
|
|
180
|
+
}
|
|
181
|
+
case DlKpiCounterFormat.m: {
|
|
182
|
+
return `${minutes}`.toLowerCase()
|
|
183
|
+
}
|
|
184
|
+
case DlKpiCounterFormat.s: {
|
|
185
|
+
return `${seconds}`.toLowerCase()
|
|
186
|
+
}
|
|
187
|
+
default: {
|
|
188
|
+
return `${hour}:${minutes}:${seconds}`.toLowerCase()
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
const formatNumberCounter = (amount: number, format = '') => {
|
|
195
|
+
if (!amount) {
|
|
196
|
+
return emptyString
|
|
197
|
+
}
|
|
198
|
+
if (amount === 0) {
|
|
199
|
+
return 0
|
|
200
|
+
}
|
|
201
|
+
return format === 'short'
|
|
202
|
+
? (abbreviateNumber(amount as number) as string).toLowerCase()
|
|
203
|
+
: numberWithComma(amount as number)
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
return {
|
|
207
|
+
progressValue,
|
|
208
|
+
formatCounter,
|
|
209
|
+
cssVars,
|
|
210
|
+
titleFontSizeComputed,
|
|
211
|
+
counterFontSizeComputed
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
})
|
|
215
|
+
</script>
|
|
216
|
+
|
|
217
|
+
<style scoped lang="scss">
|
|
218
|
+
.kpi_box {
|
|
219
|
+
display: flex;
|
|
220
|
+
flex-direction: column;
|
|
221
|
+
box-sizing: border-box;
|
|
222
|
+
justify-content: center;
|
|
223
|
+
align-items: center;
|
|
224
|
+
padding: 20px 6px;
|
|
225
|
+
border-radius: 2px;
|
|
226
|
+
overflow: hidden;
|
|
227
|
+
border: var(--dl-kpi-border);
|
|
228
|
+
|
|
229
|
+
&__counter {
|
|
230
|
+
text-align: center;
|
|
231
|
+
text-transform: lowercase;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&__title {
|
|
235
|
+
display: flex;
|
|
236
|
+
flex-direction: column;
|
|
237
|
+
align-items: center;
|
|
238
|
+
width: 100%;
|
|
239
|
+
justify-content: center;
|
|
240
|
+
padding-top: 6px;
|
|
241
|
+
color: var(--dl-color-darker);
|
|
242
|
+
|
|
243
|
+
&__text {
|
|
244
|
+
display: flex;
|
|
245
|
+
flex-direction: row;
|
|
246
|
+
max-width: 90%;
|
|
247
|
+
max-height: 40px;
|
|
248
|
+
font-style: normal;
|
|
249
|
+
font-weight: 400;
|
|
250
|
+
font-size: 16px;
|
|
251
|
+
line-height: 19px;
|
|
252
|
+
text-transform: capitalize;
|
|
253
|
+
text-align: center;
|
|
254
|
+
overflow: hidden;
|
|
255
|
+
gap: 10px;
|
|
256
|
+
}
|
|
257
|
+
&__subtext {
|
|
258
|
+
max-width: 90%;
|
|
259
|
+
max-height: 40px;
|
|
260
|
+
font-style: normal;
|
|
261
|
+
font-weight: 400;
|
|
262
|
+
font-size: 12px;
|
|
263
|
+
line-height: 19px;
|
|
264
|
+
text-transform: capitalize;
|
|
265
|
+
text-align: center;
|
|
266
|
+
overflow: hidden;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
&__progress_bar {
|
|
271
|
+
width: 70%;
|
|
272
|
+
padding-top: 10px;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
</style>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
@mouseover="setIsVisibleInfoMessage(true)"
|
|
4
|
+
@mouseleave="setIsVisibleInfoMessage(false)"
|
|
5
|
+
>
|
|
6
|
+
<dl-tooltip
|
|
7
|
+
v-if="isVisibleInfoMessage"
|
|
8
|
+
anchor="top middle"
|
|
9
|
+
>
|
|
10
|
+
{{ message }}
|
|
11
|
+
</dl-tooltip>
|
|
12
|
+
<dl-icon
|
|
13
|
+
icon="icon-dl-info"
|
|
14
|
+
size="16px"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts">
|
|
20
|
+
import { defineComponent, ref, computed } from 'vue-demi'
|
|
21
|
+
import { DlTooltip, DlIcon } from '../../../essential'
|
|
22
|
+
|
|
23
|
+
export default defineComponent({
|
|
24
|
+
name: 'KpiInfo',
|
|
25
|
+
components: {
|
|
26
|
+
DlTooltip,
|
|
27
|
+
DlIcon
|
|
28
|
+
},
|
|
29
|
+
props: {
|
|
30
|
+
infoMessage: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: '',
|
|
33
|
+
required: false
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
setup(props) {
|
|
37
|
+
const isVisibleInfoMessage = ref(false)
|
|
38
|
+
const setIsVisibleInfoMessage = (value: boolean): void => {
|
|
39
|
+
isVisibleInfoMessage.value = value
|
|
40
|
+
}
|
|
41
|
+
const message = computed(() =>
|
|
42
|
+
props.infoMessage ? props.infoMessage : 'no data'
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
return {
|
|
46
|
+
isVisibleInfoMessage,
|
|
47
|
+
setIsVisibleInfoMessage,
|
|
48
|
+
message
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<style scoped></style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export enum DlKpiCounterFormat {
|
|
2
|
+
long = 'long',
|
|
3
|
+
short = 'short',
|
|
4
|
+
hms = 'h:m:s',
|
|
5
|
+
hm = 'h:m',
|
|
6
|
+
ms = 'm:s',
|
|
7
|
+
h = 'h',
|
|
8
|
+
m = 'm',
|
|
9
|
+
s = 's'
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type DlKpiCounterType = {
|
|
13
|
+
/* for string it should be have 0h:0m:0s format */
|
|
14
|
+
value: number | string
|
|
15
|
+
format: DlKpiCounterFormat
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type DlKpiProgressType = {
|
|
19
|
+
value?: number
|
|
20
|
+
text?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type DlKpiItem = {
|
|
24
|
+
counter: DlKpiCounterType | number
|
|
25
|
+
title: string
|
|
26
|
+
infoMessage?: string
|
|
27
|
+
progress?: DlKpiProgressType
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types/KpiItem'
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
|
|
49
49
|
<script lang="ts">
|
|
50
50
|
import { defineComponent } from 'vue-demi'
|
|
51
|
-
import DlItemSection from '
|
|
52
|
-
import DlIcon from '
|
|
51
|
+
import { DlItemSection } from '../../shared'
|
|
52
|
+
import { DlIcon } from '../../essential'
|
|
53
53
|
import {
|
|
54
54
|
itemHoverColor,
|
|
55
55
|
itemActiveColor,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
itemBorder,
|
|
58
58
|
itemColor
|
|
59
59
|
} from './utils'
|
|
60
|
-
import { wave, waveTrigger } from '
|
|
60
|
+
import { wave, waveTrigger } from '../../../utils'
|
|
61
61
|
import { v4 } from 'uuid'
|
|
62
62
|
|
|
63
63
|
export default defineComponent({
|