@dataloop-ai/components 0.18.0 → 0.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -3
- package/src/App.vue +5 -227
- package/src/assets/constants.scss +2 -1
- package/src/assets/globals.scss +21 -0
- package/src/components/basic/DlAccordion/DlAccordion.vue +26 -4
- package/src/components/basic/DlAccordion/components/AccordionHeader.vue +2 -1
- package/src/components/basic/DlAvatar/DlAvatar.vue +1 -1
- package/src/components/basic/DlButton/DlButton.vue +115 -25
- package/src/components/basic/DlButton/utils.ts +45 -2
- package/src/components/basic/DlChip/DlChip.vue +3 -7
- package/src/components/basic/DlChip/utils.ts +4 -4
- package/src/components/basic/DlContainer/DlContainer.vue +70 -0
- package/src/components/basic/DlContainer/index.ts +3 -0
- package/src/components/basic/DlEmptyState/DlEmptyState.vue +282 -0
- package/src/components/basic/DlEmptyState/index.ts +2 -0
- package/src/components/basic/DlEmptyState/types.ts +20 -0
- package/src/components/basic/DlGrid/DlGrid.vue +163 -0
- package/src/components/basic/DlGrid/index.ts +4 -0
- package/src/components/basic/DlGrid/types.ts +5 -0
- package/src/components/basic/DlKpi/components/KpiInfo.vue +2 -1
- package/src/components/basic/DlListItem/DlListItem.vue +96 -66
- package/src/components/basic/DlListItem/utils.ts +0 -3
- package/src/components/basic/DlPanelContainer/DlPanelContainer.vue +37 -13
- package/src/components/basic/DlPopup/DlPopup.vue +58 -11
- package/src/components/basic/DlPopup/components/PopupHeader.vue +11 -6
- package/src/components/basic/DlProgressChart/DlProgressChart.vue +2 -1
- package/src/components/basic/DlWidget/DlWidget.vue +273 -141
- package/src/components/basic/DlWidget/index.ts +1 -3
- package/src/components/basic/DlWidget/utils.ts +90 -8
- package/src/components/basic/index.ts +4 -2
- package/src/components/basic/types.ts +2 -0
- package/src/components/compound/DlCard/DlCard.vue +796 -0
- package/src/components/compound/DlCard/components/DescriptionModal.vue +137 -0
- package/src/components/compound/DlCard/types.ts +38 -0
- package/src/components/compound/DlCharts/charts/DlBarChart/DlBarChart.vue +39 -4
- package/src/components/compound/DlCharts/charts/DlColumnChart/DlColumnChart.vue +128 -36
- package/src/components/compound/DlCharts/charts/DlConfusionMatrix/DlConfusionMatrix.vue +167 -87
- package/src/components/compound/DlCharts/charts/DlConfusionMatrix/utils.ts +2 -1
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/DlDoughnutChart.vue +44 -3
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/DlDoughnutChartWidget.vue +1 -2
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/components/DlDoughnutChartLegend.vue +9 -18
- package/src/components/compound/DlCharts/charts/DlLineChart/DlLineChart.vue +48 -9
- package/src/components/compound/DlCharts/charts/DlScatterChart/DlScatterChart.vue +667 -0
- package/src/components/compound/DlCharts/charts/DlScatterChart/index.ts +2 -0
- package/src/components/compound/DlCharts/charts/index.ts +1 -0
- package/src/components/compound/DlCharts/components/DlBrush.vue +3 -2
- package/src/components/compound/DlCharts/components/DlChartLabels.vue +2 -1
- package/src/components/compound/DlCharts/components/DlChartScrollBar.vue +1 -0
- package/src/components/compound/DlCharts/types/props.ts +5 -1
- package/src/components/compound/DlCharts/utils.ts +1 -1
- package/src/components/compound/DlCodeEditor/DlCodeEditor.vue +173 -0
- package/src/components/compound/DlCodeEditor/README.md +11 -0
- package/src/components/compound/DlCodeEditor/components/CodeEditor.vue +705 -0
- package/src/components/compound/DlCodeEditor/index.ts +3 -0
- package/src/components/compound/DlCodeEditor/styles/themes-base16.css +12809 -0
- package/src/components/compound/DlCodeEditor/styles/themes.css +3999 -0
- package/src/components/compound/DlCodeEditor/types.ts +21 -0
- package/src/components/compound/DlDateTime/DlDatePicker/DlDatePicker.vue +9 -1
- package/src/components/compound/DlDateTime/DlDatePicker/components/DlCalendar.vue +4 -2
- package/src/components/compound/DlDateTime/DlDatePicker/components/DlMonthCalendar.vue +2 -1
- package/src/components/compound/DlDateTime/DlDateTimeRange/{DlCardSidebar.vue → CardSidebar.vue} +10 -11
- package/src/components/compound/DlDateTime/DlDateTimeRange/DlDateTimeRange.vue +18 -9
- package/src/components/compound/DlDateTime/DlTimePicker/DlTimePicker.vue +2 -2
- package/src/components/compound/DlDialogBox/DlDialogBox.vue +74 -15
- package/src/components/compound/DlDialogBox/components/DlDialogBoxFooter.vue +1 -1
- package/src/components/compound/DlDialogBox/components/DlDialogBoxHeader.vue +9 -7
- package/src/components/compound/DlDropdownButton/DlDropdownButton.vue +13 -4
- package/src/components/compound/DlInput/DlInput.vue +80 -17
- package/src/components/compound/DlJsonEditor/DlJsonEditor.vue +42 -219
- package/src/components/compound/DlOptionGroup/DlOptionGroup.vue +16 -17
- package/src/components/compound/DlOptionGroup/components/MenuItemWrapper.vue +2 -2
- package/src/components/compound/DlPagination/DlPagination.vue +1 -1
- package/src/components/compound/DlPagination/components/PaginationLegend.vue +0 -2
- package/src/components/compound/DlPagination/components/RowsSelector.vue +0 -2
- package/src/components/compound/DlRange/DlRange.vue +3 -2
- package/src/components/compound/DlSearches/DlSearch/DlSearch.vue +12 -5
- package/src/components/compound/DlSearches/DlSmartSearch/DlSmartSearch.vue +413 -97
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchFilters.vue +4 -1
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchInput.vue +100 -39
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSuggestionsDropdown.vue +12 -7
- package/src/components/compound/DlSearches/DlSmartSearch/components/FiltersQuery.vue +5 -6
- package/src/components/compound/DlSearches/DlSmartSearch/types.ts +14 -0
- package/src/components/compound/DlSearches/DlSmartSearch/utils/highlightSyntax.ts +10 -6
- package/src/components/compound/DlSearches/DlSmartSearch/utils/index.ts +172 -48
- package/src/components/compound/DlSelect/DlSelect.vue +264 -130
- package/src/components/compound/DlSelect/utils.ts +4 -1
- package/src/components/compound/DlSlider/DlSlider.vue +10 -2
- package/src/components/compound/DlSlider/components/DlSliderBase.vue +3 -3
- package/src/components/compound/DlSlider/components/DlSliderInput.vue +17 -26
- package/src/components/compound/DlSlider/sliderStyles.scss +5 -1
- package/src/components/compound/DlSlider/useSlider.ts +2 -2
- package/src/components/compound/DlSlider/utils.ts +2 -2
- package/src/components/compound/DlStepper/DlStepper.vue +46 -4
- package/src/components/compound/DlStepper/components/DlStepperContent.vue +6 -2
- package/src/components/compound/DlStepper/components/DlStepperFooter.vue +12 -0
- package/src/components/compound/DlStepper/components/DlStepperSidebar.vue +24 -11
- package/src/components/compound/DlStepper/models/Step.ts +37 -8
- package/src/components/compound/DlStepper/models/Stepper.ts +108 -15
- package/src/components/compound/DlStepper/models/interfaces.ts +2 -1
- package/src/components/compound/DlTable/DlTable.vue +49 -14
- package/src/components/compound/DlTable/components/DlTd.vue +9 -9
- package/src/components/compound/DlTable/components/DlTh.vue +3 -2
- package/src/components/compound/DlTable/hooks/tableColumnSelection.ts +35 -40
- package/src/components/compound/DlTable/hooks/tableFilter.ts +33 -21
- package/src/components/compound/DlTable/hooks/tablePagination.ts +18 -18
- package/src/components/compound/DlTable/hooks/tableRowExpand.ts +2 -1
- package/src/components/compound/DlTable/hooks/tableRowSelection.ts +0 -1
- package/src/components/compound/DlTable/hooks/tableSort.ts +52 -47
- package/src/components/compound/DlTable/styles/dl-table-styles.scss +8 -0
- package/src/components/compound/DlTabs/DlTabs.vue +83 -31
- package/src/components/compound/DlTabs/components/DlTab.vue +14 -4
- package/src/components/compound/DlTabs/components/TabsWrapper.vue +32 -27
- package/src/components/compound/DlThumbnailGallery/DlThumbnailGallery.vue +268 -0
- package/src/components/compound/DlThumbnailGallery/index.ts +2 -0
- package/src/components/compound/DlThumbnailGallery/types.ts +11 -0
- package/src/components/compound/DlToast/api/useToast.ts +42 -1
- package/src/components/compound/DlToast/components/ToastComponent.vue +24 -32
- package/src/components/compound/DlToast/types.ts +52 -0
- package/src/components/compound/DlTreeTable/DlTreeTable.vue +1293 -0
- package/src/components/compound/DlTreeTable/components/DlTdTree.vue +119 -0
- package/src/components/compound/DlTreeTable/components/DlTrTree.vue +52 -0
- package/src/components/compound/DlTreeTable/index.ts +3 -0
- package/src/components/compound/DlTreeTable/types.ts +1 -0
- package/src/components/compound/DlTreeTable/utils/convertToNestedObject.ts +51 -0
- package/src/components/compound/DlTreeTable/utils/flatTreeData.ts +19 -0
- package/src/components/compound/DlTreeTable/utils/getFromChildren.ts +39 -0
- package/src/components/compound/DlTreeTable/utils/trSpacing.ts +13 -0
- package/src/components/compound/DlTreeTable/utils/treeTableRowSelection.ts +184 -0
- package/src/components/compound/index.ts +14 -1
- package/src/components/compound/types.ts +2 -0
- package/src/components/essential/DlBadge/DlBadge.vue +3 -3
- package/src/components/essential/DlCheckbox/DlCheckbox.vue +10 -7
- package/src/components/essential/DlEllipsis/DlEllipsis.vue +141 -0
- package/src/components/essential/DlIcon/DlIcon.vue +5 -5
- package/src/components/essential/DlLabel/DlLabel.vue +190 -0
- package/src/components/essential/DlLabel/index.ts +2 -0
- package/src/components/essential/DlList/DlList.vue +3 -3
- package/src/components/essential/DlMenu/DlMenu.vue +41 -22
- package/src/components/essential/DlMenu/utils.ts +8 -7
- package/src/components/essential/DlPageLayout/DlPageLayout.vue +90 -0
- package/src/components/essential/DlPageLayout/index.ts +2 -0
- package/src/components/essential/DlProgressBar/DlProgressBar.vue +1 -1
- package/src/components/essential/DlRadio/DlRadio.vue +10 -5
- package/src/components/essential/DlSeparator/DlSeparator.vue +2 -2
- package/src/components/essential/DlSpinner/index.ts +1 -13
- package/src/components/essential/DlSpinner/styles/spinnerStyles.scss +7 -0
- package/src/components/essential/DlSwitch/DlSwitch.vue +6 -3
- package/src/components/essential/DlTextArea/DlTextArea.vue +212 -7
- package/src/components/essential/DlThemeProvider/DlThemeProvider.vue +6 -0
- package/src/components/essential/DlTypography/DlTypography.vue +7 -1
- package/src/components/essential/index.ts +3 -2
- package/src/components/shared/DlInfoErrorMessage/DlInfoErrorMessage.vue +1 -1
- package/src/components/{essential → shared}/DlTooltip/DlTooltip.vue +26 -19
- package/src/components/shared/DlVirtualScroll/DlVirtualScroll.vue +106 -43
- package/src/components/shared/DlVirtualScroll/useVirtualScroll.ts +28 -4
- package/src/components/shared/index.ts +1 -0
- package/src/components/types.ts +2 -0
- package/src/demos/BarChartDemo.vue +59 -2
- package/src/demos/ColumnChartDemo.vue +67 -2
- package/src/demos/DlAccordionDemo.vue +92 -43
- package/src/demos/DlAlertDemo.vue +14 -0
- package/src/demos/DlButtonDemo.vue +41 -4
- package/src/demos/DlCardDemo.vue +156 -19
- package/src/demos/DlChartDoughnutDemo.vue +49 -2
- package/src/demos/DlCheckboxDemo.vue +28 -3
- package/src/demos/DlCodeEditor/DlCodeEditorDemo.vue +247 -0
- package/src/demos/DlCodeEditor/index.ts +2 -0
- package/src/demos/DlConfusionMatrixDemo.vue +93 -37
- package/src/demos/DlDemoPage.vue +235 -0
- package/src/demos/DlDialogBoxDemo.vue +56 -51
- package/src/demos/DlDropdownButtonDemo.vue +35 -27
- package/src/demos/DlEmptyStateDemo.vue +81 -0
- package/src/demos/DlGridDemo.vue +40 -0
- package/src/demos/DlInputDemo.vue +21 -1
- package/src/demos/DlJsonEditorDemo.vue +59 -0
- package/src/demos/DlLabelDemo.vue +208 -0
- package/src/demos/DlLineChartDemo.vue +50 -2
- package/src/demos/DlListDemo.vue +12 -9
- package/src/demos/DlMenuDemo.vue +147 -20
- package/src/demos/DlPageLayoutDemo.vue +146 -0
- package/src/demos/DlPanelContainerDemo.vue +113 -2
- package/src/demos/DlPopupDemo.vue +82 -1
- package/src/demos/DlRadioDemo.vue +16 -1
- package/src/demos/DlScatterChartDemo.vue +161 -0
- package/src/demos/DlSearchDemo.vue +9 -0
- package/src/demos/DlSelectDemo.vue +124 -27
- package/src/demos/DlSpinnerDemo.vue +0 -2
- package/src/demos/DlStepperDemo/DlStepperDemo.vue +5 -1
- package/src/demos/DlStepperDemo/EmptyStateStepper.vue +149 -0
- package/src/demos/DlStepperDemo/SimpleStepper.vue +4 -0
- package/src/demos/DlStepperDemo/steps/GeneralStep.vue +1 -0
- package/src/demos/DlSwitchDemo.vue +12 -0
- package/src/demos/DlTableDemo.vue +84 -5
- package/src/demos/DlTabsDemo.vue +92 -3
- package/src/demos/DlTextAreaDemo.vue +14 -17
- package/src/demos/DlThumbnailGalleryDemo.vue +99 -0
- package/src/demos/DlToastDemo.vue +3 -9
- package/src/demos/DlTooltipDemo.vue +66 -2
- package/src/demos/DlTreeTableDemo.vue +694 -0
- package/src/demos/DlVirtualScrollDemo.vue +3 -12
- package/src/demos/DlWidgetDemo.vue +252 -61
- package/src/demos/SmartSearchDemo/DlSmartSearchDemo.vue +151 -32
- package/src/demos/index.ts +23 -4
- package/src/hooks/use-anchor.ts +15 -17
- package/src/hooks/use-arrow-navigation.ts +64 -21
- package/src/hooks/use-model-toggle.ts +14 -16
- package/src/hooks/use-portal.ts +9 -3
- package/src/hooks/use-scroll-target.ts +2 -4
- package/src/hooks/use-size-observer.ts +3 -2
- package/src/hooks/use-suggestions.ts +239 -49
- package/src/hooks/use-transition.ts +10 -4
- package/src/index.ts +22 -1
- package/src/layouts/DlDatasetBrowser/DemoComponents/DatasetFooter.vue +78 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/DatasetHeader.vue +22 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/DatasetLeftDrawer.vue +96 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/DatasetMainContent.vue +51 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/DatasetRightDrawer.vue +88 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/ActionsMenu.vue +70 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/AutomationMenu.vue +106 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/CardView.vue +101 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/CardViewGallery.vue +141 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/CardViewTable.vue +193 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/EmptyState/LayoutEmptyState.vue +227 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/EmptyState/UploadData.vue +106 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/MainContentImages.vue +540 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/MainContentNav.vue +329 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/NavbarKpi.vue +84 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/NavbarSearch.vue +132 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/SearchFilterMenu.vue +19 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/filters/AddFilter.vue +212 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/types/imageMetadata.ts +28 -0
- package/src/layouts/DlDatasetBrowser/DlDatasetBrowser.vue +42 -0
- package/src/layouts/DlStudioLayout/DlStudioLayout.vue +42 -0
- package/src/layouts/DlStudioLayout/components/Demo/LeftMenuContent.vue +23 -0
- package/src/layouts/DlStudioLayout/components/Demo/StudioFooter.vue +25 -0
- package/src/layouts/DlStudioLayout/components/Demo/StudioHeader.vue +121 -0
- package/src/layouts/DlStudioLayout/components/Demo/StudioLeftDrawer.vue +245 -0
- package/src/layouts/DlStudioLayout/components/Demo/StudioMainContent.vue +31 -0
- package/src/layouts/DlStudioLayout/components/Demo/StudioTabsMenu.vue +117 -0
- package/src/layouts/DlStudioLayout/components/Demo/TabMenu/FilterMenu.vue +62 -0
- package/src/layouts/DlStudioLayout/components/Demo/TabMenu/TabMenuAnnotations.vue +98 -0
- package/src/layouts/DlStudioLayout/components/Demo/TabMenu/TabMenuItem.vue +66 -0
- package/src/layouts/DlStudioLayout/components/LayoutNavbar.vue +24 -0
- package/src/layouts/DlStudioLayout/components/ListAutocomplete.vue +149 -0
- package/src/layouts/DlStudioLayout/components/NavigationDrawer.vue +147 -0
- package/src/layouts/DlStudioLayout/index.ts +2 -0
- package/src/layouts/DlStudioLayout/types/HorizontalItems.ts +9 -0
- package/src/layouts/DlStudioLayout/types/VerticalItems.ts +10 -0
- package/src/simple-code-editor.d.ts +1 -0
- package/src/utils/click-outside.ts +1 -1
- package/src/utils/dom.ts +5 -5
- package/src/utils/events.ts +3 -3
- package/src/utils/global-nodes.ts +2 -2
- package/src/utils/input-sizes.ts +5 -2
- package/src/utils/is-ellipsis-active.ts +4 -1
- package/src/utils/parse-smart-query.ts +209 -111
- package/src/utils/portal.ts +5 -5
- package/src/utils/position-engine.ts +7 -7
- package/src/utils/render.ts +1 -1
- package/src/utils/scroll.ts +2 -2
- package/src/utils/selection.ts +3 -3
- package/vite.config.ts +9 -1
- package/src/components/basic/DlCard/DlCard.vue +0 -241
- package/src/components/basic/DlCard/types.ts +0 -20
- package/src/components/basic/DlEllipsis/DlEllipsis.vue +0 -114
- package/src/components/basic/DlWidget/DlGrid.vue +0 -33
- package/src/components/basic/DlWidget/DlGridRow.vue +0 -32
- package/src/components/compound/DlSearches/DlSmartSearch/utils/utils.ts +0 -124
- package/src/components/compound/DlToast/utils/config.ts +0 -17
- package/src/components/essential/DlTextHolder/DlTextHolder.vue +0 -65
- package/src/components/essential/DlTextHolder/index.ts +0 -2
- package/src/demos/DlTextHolderDemo.vue +0 -42
- package/src/utils/swapNodes.ts +0 -30
- /package/src/components/{basic → compound}/DlCard/index.ts +0 -0
- /package/src/components/compound/DlDateTime/DlDateTimeRange/{DlDateInput.vue → DateInput.vue} +0 -0
- /package/src/components/{basic → essential}/DlEllipsis/index.ts +0 -0
- /package/src/components/{essential → shared}/DlTooltip/index.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dataloop-ai/components",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.2",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": "./index.ts",
|
|
6
6
|
"./models": "./models.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"dev": "vite",
|
|
11
|
-
"dev:2": "./misc/
|
|
11
|
+
"dev:2": "./misc/unpackAndRunV2.sh",
|
|
12
12
|
"build": "vue-tsc --noEmit --skipLibCheck && vite build",
|
|
13
13
|
"preview": "vite preview",
|
|
14
14
|
"storybook": "storybook dev -p 6006",
|
|
@@ -23,8 +23,11 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@dataloop-ai/icons": "^3.0.6",
|
|
26
|
+
"@types/flat": "^5.0.2",
|
|
26
27
|
"@types/lodash": "^4.14.184",
|
|
27
28
|
"chart.js": "^3.9.1",
|
|
29
|
+
"flat": "^5.0.2",
|
|
30
|
+
"highlight.js": "^11.8.0",
|
|
28
31
|
"lodash": "^4.17.21",
|
|
29
32
|
"moment": "^2.29.4",
|
|
30
33
|
"sass": "^1.51.0",
|
|
@@ -73,7 +76,7 @@
|
|
|
73
76
|
"storybook": "^7.0.4",
|
|
74
77
|
"storybook-addon-themes": "^6.1.0",
|
|
75
78
|
"typescript": "^4.5.4",
|
|
76
|
-
"vite": "^4.
|
|
79
|
+
"vite": "^4.2.3",
|
|
77
80
|
"vitest": "^0.29.2",
|
|
78
81
|
"vitest-canvas-mock": "^0.2.2",
|
|
79
82
|
"vue": "^3.2.25",
|
package/src/App.vue
CHANGED
|
@@ -1,242 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<div
|
|
4
|
-
style="display: flex; width: 100%; align-items: center; align-content; center;"
|
|
5
|
-
>
|
|
6
|
-
<dl-typography
|
|
7
|
-
color="dl-color-medium"
|
|
8
|
-
variant="p"
|
|
9
|
-
style="margin: 10px 0px 20px 0px; width: 90%"
|
|
10
|
-
>
|
|
11
|
-
<div
|
|
12
|
-
style="
|
|
13
|
-
background-image: url(https://dataloop.ai/wp-content/uploads/2020/03/logo.svg);
|
|
14
|
-
width: 160px;
|
|
15
|
-
height: 28px;
|
|
16
|
-
display: inline-block;
|
|
17
|
-
"
|
|
18
|
-
/>
|
|
19
|
-
Components library
|
|
20
|
-
</dl-typography>
|
|
21
|
-
<div style="display: flex; align-items: center">
|
|
22
|
-
<dl-icon
|
|
23
|
-
icon="icon-dl-light-theme"
|
|
24
|
-
size="24px"
|
|
25
|
-
:color="
|
|
26
|
-
!darkMode ? 'dl-color-secondary' : 'dl-color-darker'
|
|
27
|
-
"
|
|
28
|
-
/>
|
|
29
|
-
<dl-switch
|
|
30
|
-
v-model="darkMode"
|
|
31
|
-
style="margin: 0 20px"
|
|
32
|
-
/>
|
|
33
|
-
<dl-icon
|
|
34
|
-
icon="icon-dl-dark-theme"
|
|
35
|
-
size="20px"
|
|
36
|
-
:color="darkMode ? 'dl-color-secondary' : 'dl-color-darker'"
|
|
37
|
-
/>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
<div class="layout-wrapper">
|
|
41
|
-
<div class="sidebar">
|
|
42
|
-
<dl-search
|
|
43
|
-
v-model="filterTerm"
|
|
44
|
-
style="margin-bottom: 5px"
|
|
45
|
-
/>
|
|
46
|
-
|
|
47
|
-
<dl-button
|
|
48
|
-
v-if="activeDemo"
|
|
49
|
-
outlined
|
|
50
|
-
>
|
|
51
|
-
<span style="text-transform: capitalize">
|
|
52
|
-
Selected: {{ computeDemoName(activeDemo.name) }}
|
|
53
|
-
</span>
|
|
54
|
-
</dl-button>
|
|
55
|
-
<dl-list
|
|
56
|
-
bordered
|
|
57
|
-
clickable
|
|
58
|
-
style="
|
|
59
|
-
margin-top: 15px;
|
|
60
|
-
min-width: 200px;
|
|
61
|
-
height: 100%;
|
|
62
|
-
height: calc(100vh - 18vh);
|
|
63
|
-
overflow: auto;
|
|
64
|
-
"
|
|
65
|
-
>
|
|
66
|
-
<template #default="{ clickable }">
|
|
67
|
-
<dl-list-item
|
|
68
|
-
v-for="(demo, index) in filteredDemos"
|
|
69
|
-
:key="demo.name"
|
|
70
|
-
:bordered="index !== 0"
|
|
71
|
-
:clickable="clickable"
|
|
72
|
-
:class="isSelectedDemo(demo) ? 'selected' : ''"
|
|
73
|
-
style="text-transform: capitalize"
|
|
74
|
-
@click="setActiveDemo(demo)"
|
|
75
|
-
>
|
|
76
|
-
{{ computeDemoName(demo.name) }}
|
|
77
|
-
</dl-list-item>
|
|
78
|
-
</template>
|
|
79
|
-
</dl-list>
|
|
80
|
-
</div>
|
|
81
|
-
<div class="content">
|
|
82
|
-
<div style="display: flex; justify-content: center">
|
|
83
|
-
<dl-typography
|
|
84
|
-
size="h2"
|
|
85
|
-
variant="h2"
|
|
86
|
-
style="text-transform: capitalize"
|
|
87
|
-
>
|
|
88
|
-
{{
|
|
89
|
-
activeDemo
|
|
90
|
-
? computeDemoName(activeDemo.name)
|
|
91
|
-
: 'No selected'
|
|
92
|
-
}}
|
|
93
|
-
component
|
|
94
|
-
</dl-typography>
|
|
95
|
-
</div>
|
|
96
|
-
<component
|
|
97
|
-
:is="activeDemo.component"
|
|
98
|
-
v-if="activeDemo"
|
|
99
|
-
class="data-container"
|
|
100
|
-
/>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
</DlThemeProvider>
|
|
2
|
+
<DlDemoPage :is-dark="isDark" />
|
|
104
3
|
</template>
|
|
105
4
|
|
|
106
5
|
<script lang="ts">
|
|
107
|
-
import { defineComponent
|
|
108
|
-
import {
|
|
109
|
-
DlThemeProvider,
|
|
110
|
-
DlButton,
|
|
111
|
-
DlListItem,
|
|
112
|
-
DlList,
|
|
113
|
-
DlTypography,
|
|
114
|
-
DlSearch,
|
|
115
|
-
DlSwitch,
|
|
116
|
-
DlIcon
|
|
117
|
-
} from './components'
|
|
118
|
-
import Demos from './demos'
|
|
6
|
+
import { defineComponent } from 'vue-demi'
|
|
7
|
+
import { DlDemoPage } from './demos'
|
|
119
8
|
|
|
120
9
|
export default defineComponent({
|
|
121
10
|
name: 'DlComponentsDemo',
|
|
122
11
|
components: {
|
|
123
|
-
|
|
124
|
-
DlButton,
|
|
125
|
-
DlListItem,
|
|
126
|
-
DlList,
|
|
127
|
-
DlTypography,
|
|
128
|
-
DlSearch,
|
|
129
|
-
DlSwitch,
|
|
130
|
-
DlIcon
|
|
12
|
+
DlDemoPage
|
|
131
13
|
},
|
|
132
14
|
props: {
|
|
133
15
|
isDark: { required: false, default: false, type: Boolean }
|
|
134
|
-
},
|
|
135
|
-
setup(props) {
|
|
136
|
-
const darkMode = ref(props.isDark)
|
|
137
|
-
const filterTerm = ref('')
|
|
138
|
-
const names = Object.keys(Demos)
|
|
139
|
-
const demos: {
|
|
140
|
-
name: string
|
|
141
|
-
component: any
|
|
142
|
-
}[] = names.map((n: string) => ({
|
|
143
|
-
name: n,
|
|
144
|
-
// @ts-ignore
|
|
145
|
-
component: Demos[n]
|
|
146
|
-
}))
|
|
147
|
-
|
|
148
|
-
const filteredDemos = computed(() => {
|
|
149
|
-
if (!filterTerm.value || !filterTerm.value.length) {
|
|
150
|
-
return demos
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
return demos.filter((demo: { name: string; component: any }) => {
|
|
154
|
-
return demo.name
|
|
155
|
-
.toLowerCase()
|
|
156
|
-
.includes(filterTerm.value.toLowerCase())
|
|
157
|
-
})
|
|
158
|
-
})
|
|
159
|
-
|
|
160
|
-
const activeDemo = shallowRef(
|
|
161
|
-
window.localStorage.getItem('dl-active-demo')
|
|
162
|
-
? demos.find(
|
|
163
|
-
(d) =>
|
|
164
|
-
d.name ===
|
|
165
|
-
window.localStorage.getItem('dl-active-demo')
|
|
166
|
-
) ?? null
|
|
167
|
-
: null
|
|
168
|
-
)
|
|
169
|
-
|
|
170
|
-
const setActiveDemo = (demo: { name: string; component: any }) => {
|
|
171
|
-
activeDemo.value = demo
|
|
172
|
-
filterTerm.value = ''
|
|
173
|
-
window.localStorage.setItem('dl-active-demo', demo.name)
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
const computeDemoName = (name: string) => {
|
|
177
|
-
return name.includes('Dl')
|
|
178
|
-
? name.split('Demo')[0]
|
|
179
|
-
: 'Dl' + name.split('Demo')[0]
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
const isSelectedDemo = (demo: { name: string; component: any }) => {
|
|
183
|
-
return activeDemo.value?.name === demo.name
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
return {
|
|
187
|
-
darkMode,
|
|
188
|
-
activeDemo,
|
|
189
|
-
setActiveDemo,
|
|
190
|
-
filterTerm,
|
|
191
|
-
filteredDemos,
|
|
192
|
-
computeDemoName,
|
|
193
|
-
isSelectedDemo
|
|
194
|
-
}
|
|
195
16
|
}
|
|
196
17
|
})
|
|
197
18
|
</script>
|
|
198
19
|
|
|
199
|
-
<style scoped lang="scss">
|
|
200
|
-
#app {
|
|
201
|
-
-webkit-font-smoothing: antialiased;
|
|
202
|
-
-moz-osx-font-smoothing: grayscale;
|
|
203
|
-
text-align: center;
|
|
204
|
-
color: #2c3e50;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.layout-wrapper {
|
|
208
|
-
display: flex;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.sidebar {
|
|
212
|
-
display: flex;
|
|
213
|
-
flex-direction: column;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.content {
|
|
217
|
-
padding: 20px 30px;
|
|
218
|
-
flex-grow: 1;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.data-container {
|
|
222
|
-
display: flex;
|
|
223
|
-
gap: 1rem;
|
|
224
|
-
align-items: center;
|
|
225
|
-
max-width: 100%;
|
|
226
|
-
overflow: auto;
|
|
227
|
-
padding: 20px;
|
|
228
|
-
margin: 0 auto;
|
|
229
|
-
flex-direction: column;
|
|
230
|
-
justify-content: center;
|
|
231
|
-
width: 950px;
|
|
232
|
-
resize: both;
|
|
233
|
-
box-shadow: var(--dl-menu-shadow);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.selected {
|
|
237
|
-
::v-deep .row {
|
|
238
|
-
color: var(--dl-color-secondary) !important;
|
|
239
|
-
background-color: var(--dl-color-fill);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
</style>
|
|
20
|
+
<style scoped lang="scss"></style>
|
package/src/assets/globals.scss
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
|
|
2
2
|
@import 'constants';
|
|
3
3
|
|
|
4
|
+
|
|
4
5
|
body {
|
|
5
6
|
font-family: 'Roboto', sans-serif;
|
|
6
7
|
font-weight: 400;
|
|
@@ -32,6 +33,19 @@ body {
|
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
|
|
36
|
+
/* Inserting a collapsed row between two flex items will make
|
|
37
|
+
* the flex item that comes after it break to a new row */
|
|
38
|
+
.break {
|
|
39
|
+
flex-basis: 100%;
|
|
40
|
+
height: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Use a collapsed column to break to a new column */
|
|
44
|
+
.break-column {
|
|
45
|
+
flex-basis: 100%;
|
|
46
|
+
width: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
35
49
|
.scroll {
|
|
36
50
|
overflow: auto;
|
|
37
51
|
}
|
|
@@ -115,6 +129,9 @@ body {
|
|
|
115
129
|
.full-width {
|
|
116
130
|
width: 100%;
|
|
117
131
|
}
|
|
132
|
+
.full-height {
|
|
133
|
+
height: 100%;
|
|
134
|
+
}
|
|
118
135
|
|
|
119
136
|
|
|
120
137
|
:root {
|
|
@@ -129,6 +146,8 @@ body {
|
|
|
129
146
|
--dl-font-size-h2: 20px;
|
|
130
147
|
--dl-font-size-h3: 16px;
|
|
131
148
|
--dl-font-size-h4: 14px;
|
|
149
|
+
--dl-font-size-h5: 12px;
|
|
150
|
+
--dl-font-size-h6: 10px;
|
|
132
151
|
--dl-font-size-body: 12px;
|
|
133
152
|
--dl-font-size-small: 10px;
|
|
134
153
|
|
|
@@ -160,6 +179,7 @@ body {
|
|
|
160
179
|
--dl-color-fill-third: #FBFBFB;
|
|
161
180
|
--dl-color-link: #20ABFA;
|
|
162
181
|
--dl-color-cell-background: #FFFAE2;
|
|
182
|
+
--dl-color-disabled-slider: #E4E4E4;
|
|
163
183
|
--q-color-positive: #38D079;
|
|
164
184
|
--q-color-warning: #E1B75B;
|
|
165
185
|
|
|
@@ -213,6 +233,7 @@ body {
|
|
|
213
233
|
--dl-color-fill-third: #9E9E9E1A;
|
|
214
234
|
--dl-color-link: #53B2E8;
|
|
215
235
|
--dl-color-cell-background: #FFFAE2;
|
|
236
|
+
--dl-color-disabled-slider: #64686D;
|
|
216
237
|
--q-color-positive: #A1E5B6;
|
|
217
238
|
--q-color-warning: #F8D29A;
|
|
218
239
|
|
|
@@ -27,20 +27,37 @@
|
|
|
27
27
|
class="accordion-content"
|
|
28
28
|
:class="{ closed: !isOpen, 'right-side': rightSide }"
|
|
29
29
|
>
|
|
30
|
-
<slot v-if="isOpen" />
|
|
30
|
+
<slot v-if="isOpen && !isEmpty" />
|
|
31
|
+
<dl-empty-state
|
|
32
|
+
v-if="isOpen && isEmpty"
|
|
33
|
+
v-bind="emptyStateProps"
|
|
34
|
+
>
|
|
35
|
+
<template
|
|
36
|
+
v-for="(_, slot) in $slots"
|
|
37
|
+
#[slot]="props"
|
|
38
|
+
>
|
|
39
|
+
<slot
|
|
40
|
+
:name="slot"
|
|
41
|
+
v-bind="props"
|
|
42
|
+
/>
|
|
43
|
+
</template>
|
|
44
|
+
</dl-empty-state>
|
|
31
45
|
</div>
|
|
32
46
|
</div>
|
|
33
47
|
</template>
|
|
34
48
|
|
|
35
49
|
<script lang="ts">
|
|
36
50
|
import DlAccordionHeader from './components/AccordionHeader.vue'
|
|
37
|
-
import
|
|
51
|
+
import DlEmptyState from '../DlEmptyState/DlEmptyState.vue'
|
|
52
|
+
import { DlEmptyStateProps } from '../DlEmptyState/types'
|
|
53
|
+
import { defineComponent, PropType } from 'vue-demi'
|
|
38
54
|
import { v4 } from 'uuid'
|
|
39
55
|
|
|
40
56
|
export default defineComponent({
|
|
41
57
|
name: 'DlAccordion',
|
|
42
58
|
components: {
|
|
43
|
-
DlAccordionHeader
|
|
59
|
+
DlAccordionHeader,
|
|
60
|
+
DlEmptyState
|
|
44
61
|
},
|
|
45
62
|
model: {
|
|
46
63
|
prop: 'modelValue',
|
|
@@ -53,7 +70,12 @@ export default defineComponent({
|
|
|
53
70
|
fontSize: { type: String, default: '12px' },
|
|
54
71
|
titleColor: { type: String, default: 'dl-color-medium' },
|
|
55
72
|
modelValue: { type: Boolean, default: null },
|
|
56
|
-
rightSide: { type: Boolean, default: false }
|
|
73
|
+
rightSide: { type: Boolean, default: false },
|
|
74
|
+
isEmpty: Boolean,
|
|
75
|
+
emptyStateProps: {
|
|
76
|
+
type: Object as PropType<DlEmptyStateProps>,
|
|
77
|
+
default: null
|
|
78
|
+
}
|
|
57
79
|
},
|
|
58
80
|
emits: ['update:model-value', 'hide', 'show'],
|
|
59
81
|
data() {
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
</template>
|
|
44
44
|
|
|
45
45
|
<script lang="ts">
|
|
46
|
-
import {
|
|
46
|
+
import { DlTooltip } from '../../../shared'
|
|
47
|
+
import { DlIcon } from '../../../essential'
|
|
47
48
|
import { defineComponent, ref } from 'vue-demi'
|
|
48
49
|
import { getColor } from '../../../../utils'
|
|
49
50
|
import { useSizeObserver } from '../../../../hooks/use-size-observer'
|