@dataloop-ai/components 0.13.0
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/.eslintrc.js +154 -0
- package/.prettierrc.json +7 -0
- package/Dockerfile +12 -0
- package/LICENSE +201 -0
- package/README.md +43 -0
- package/favicon.ico +0 -0
- package/index.html +13 -0
- package/index.ts +1 -0
- package/jest.config.js +16 -0
- package/jest.setup.js +59 -0
- package/models.ts +1 -0
- package/package.json +109 -0
- package/src/App.vue +201 -0
- package/src/assets/globals.scss +253 -0
- package/src/assets/globalsKeys.ts +28 -0
- package/src/components/DlAccordion/AccordionHeader.vue +148 -0
- package/src/components/DlAccordion/DlAccordion.vue +108 -0
- package/src/components/DlAccordion/index.ts +2 -0
- package/src/components/DlAlert.vue +227 -0
- package/src/components/DlAvatar.vue +99 -0
- package/src/components/DlBadge.vue +127 -0
- package/src/components/DlButton/DlButton.vue +370 -0
- package/src/components/DlButton/index.ts +4 -0
- package/src/components/DlButton/utils.ts +169 -0
- package/src/components/DlButtonGroup.vue +122 -0
- package/src/components/DlCheckbox.vue +298 -0
- package/src/components/DlChip/DlChip.vue +244 -0
- package/src/components/DlChip/index.ts +4 -0
- package/src/components/DlChip/utils.ts +100 -0
- package/src/components/DlColorPicker/DlAlpha.vue +142 -0
- package/src/components/DlColorPicker/DlBox.vue +75 -0
- package/src/components/DlColorPicker/DlColorPicker.vue +306 -0
- package/src/components/DlColorPicker/DlColors.vue +139 -0
- package/src/components/DlColorPicker/DlHue.vue +135 -0
- package/src/components/DlColorPicker/DlPreview.vue +61 -0
- package/src/components/DlColorPicker/DlSaturation.vue +152 -0
- package/src/components/DlColorPicker/constants.ts +16 -0
- package/src/components/DlColorPicker/index.ts +20 -0
- package/src/components/DlColorPicker/types.ts +11 -0
- package/src/components/DlColorPicker/utils.ts +128 -0
- package/src/components/DlCounters.vue +173 -0
- package/src/components/DlDatePicker/DlCalendar.vue +332 -0
- package/src/components/DlDatePicker/DlDatePicker.vue +315 -0
- package/src/components/DlDatePicker/DlMonthCalendar.vue +282 -0
- package/src/components/DlDatePicker/classes/Calendar.ts +110 -0
- package/src/components/DlDatePicker/classes/CalendarDate.ts +12 -0
- package/src/components/DlDatePicker/classes/CustomDate.ts +218 -0
- package/src/components/DlDatePicker/index.ts +3 -0
- package/src/components/DlDatePicker/isInRange.ts +44 -0
- package/src/components/DlDatePicker/types.ts +4 -0
- package/src/components/DlDatePicker/utils.ts +39 -0
- package/src/components/DlDateTimeRange/DlCardSidebar.vue +109 -0
- package/src/components/DlDateTimeRange/DlDateInput.vue +105 -0
- package/src/components/DlDateTimeRange/DlDateTimeRange.vue +468 -0
- package/src/components/DlDateTimeRange/index.ts +3 -0
- package/src/components/DlDateTimeRange/types.ts +42 -0
- package/src/components/DlDialogBox/DlDialogBox.vue +196 -0
- package/src/components/DlDialogBox/DlDialogBoxFooter.vue +22 -0
- package/src/components/DlDialogBox/DlDialogBoxHeader.vue +75 -0
- package/src/components/DlDialogBox/index.ts +5 -0
- package/src/components/DlDropdownButton.vue +463 -0
- package/src/components/DlIcon.vue +147 -0
- package/src/components/DlInfoErrorMessage.vue +91 -0
- package/src/components/DlItem/DlItem.vue +35 -0
- package/src/components/DlItem/index.ts +2 -0
- package/src/components/DlItemSection.vue +88 -0
- package/src/components/DlLink/DlLink.vue +76 -0
- package/src/components/DlLink/index.ts +4 -0
- package/src/components/DlLink/utils.ts +4 -0
- package/src/components/DlList.vue +61 -0
- package/src/components/DlListItem/DlListItem.vue +205 -0
- package/src/components/DlListItem/index.ts +3 -0
- package/src/components/DlListItem/utils.ts +14 -0
- package/src/components/DlMenu/DlMenu.vue +438 -0
- package/src/components/DlMenu/index.ts +3 -0
- package/src/components/DlMenu/utils.ts +138 -0
- package/src/components/DlOptionGroup/DlOptionGroup.vue +201 -0
- package/src/components/DlOptionGroup/MenuItemWrapper.vue +48 -0
- package/src/components/DlOptionGroup/OptionGroup.types.ts +36 -0
- package/src/components/DlOptionGroup/SimpleWrapper.vue +28 -0
- package/src/components/DlOptionGroup/index.ts +4 -0
- package/src/components/DlOptionGroup/utils.ts +40 -0
- package/src/components/DlPagination/DlPagination.vue +184 -0
- package/src/components/DlPagination/PageNavigation.vue +350 -0
- package/src/components/DlPagination/PaginationLegend.vue +41 -0
- package/src/components/DlPagination/QuickNavigation.vue +146 -0
- package/src/components/DlPagination/RowsSelector.vue +74 -0
- package/src/components/DlPagination/index.ts +3 -0
- package/src/components/DlPanelContainer/DlPanel.vue +213 -0
- package/src/components/DlPanelContainer/DlPanelContainer.vue +527 -0
- package/src/components/DlPanelContainer/index.ts +4 -0
- package/src/components/DlPopup/DlPopup.vue +478 -0
- package/src/components/DlPopup/DraggableUpper.vue +64 -0
- package/src/components/DlPopup/PopupHeader.vue +129 -0
- package/src/components/DlPopup/index.ts +1 -0
- package/src/components/DlProgressBar.vue +159 -0
- package/src/components/DlProgressChart.vue +299 -0
- package/src/components/DlRadio.vue +218 -0
- package/src/components/DlRange/DlRange.vue +439 -0
- package/src/components/DlRange/utils.ts +209 -0
- package/src/components/DlSearch.vue +155 -0
- package/src/components/DlSelect/DlSelect.vue +992 -0
- package/src/components/DlSelect/SelectOption.vue +261 -0
- package/src/components/DlSelect/index.ts +4 -0
- package/src/components/DlSelect/utils.ts +43 -0
- package/src/components/DlSkeleton.vue +72 -0
- package/src/components/DlSlider/DlSlider.vue +243 -0
- package/src/components/DlSlider/components/DlSliderBase.vue +380 -0
- package/src/components/DlSlider/components/DlSliderInput.vue +123 -0
- package/src/components/DlSlider/components/index.ts +4 -0
- package/src/components/DlSlider/index.ts +3 -0
- package/src/components/DlSlider/sliderStyles.scss +109 -0
- package/src/components/DlSlider/useSlider.ts +277 -0
- package/src/components/DlSlider/utils.ts +7 -0
- package/src/components/DlSmartSearch/DlJsonEditor.vue +309 -0
- package/src/components/DlSmartSearch/DlSmartSearch.vue +333 -0
- package/src/components/DlSmartSearch/DlSmartSearchInput.vue +741 -0
- package/src/components/DlSmartSearch/DlSuggestionsDropdown.vue +73 -0
- package/src/components/DlSmartSearch/highlightSyntax.ts +169 -0
- package/src/components/DlSmartSearch/index.ts +4 -0
- package/src/components/DlSmartSearch/types.ts +36 -0
- package/src/components/DlSmartSearch/utils.ts +45 -0
- package/src/components/DlStepper/DlStepper.vue +196 -0
- package/src/components/DlStepper/DlStepperContainer.vue +55 -0
- package/src/components/DlStepper/DlStepperContent.vue +101 -0
- package/src/components/DlStepper/DlStepperFooter.vue +133 -0
- package/src/components/DlStepper/DlStepperHeader.vue +49 -0
- package/src/components/DlStepper/DlStepperSidebar.vue +167 -0
- package/src/components/DlStepper/Step.ts +101 -0
- package/src/components/DlStepper/Stepper.ts +107 -0
- package/src/components/DlStepper/index.ts +7 -0
- package/src/components/DlStepper/interfaces.ts +11 -0
- package/src/components/DlSwitch.vue +280 -0
- package/src/components/DlTabPanels/DlTabPanel.vue +22 -0
- package/src/components/DlTabPanels/DlTabPanels.vue +41 -0
- package/src/components/DlTabPanels/index.ts +4 -0
- package/src/components/DlTabPanels/utils.ts +19 -0
- package/src/components/DlTable/DlTable.vue +1264 -0
- package/src/components/DlTable/DlTd.vue +109 -0
- package/src/components/DlTable/DlTh.vue +126 -0
- package/src/components/DlTable/DlTr.vue +44 -0
- package/src/components/DlTable/ResizableManager.ts +233 -0
- package/src/components/DlTable/dl-table-styles.scss +466 -0
- package/src/components/DlTable/hooks/tableActions.ts +64 -0
- package/src/components/DlTable/hooks/tableColumnSelection.ts +112 -0
- package/src/components/DlTable/hooks/tableFilter.ts +42 -0
- package/src/components/DlTable/hooks/tablePagination.ts +197 -0
- package/src/components/DlTable/hooks/tableRowExpand.ts +55 -0
- package/src/components/DlTable/hooks/tableRowSelection.ts +106 -0
- package/src/components/DlTable/hooks/tableSort.ts +125 -0
- package/src/components/DlTable/index.ts +6 -0
- package/src/components/DlTable/types.ts +96 -0
- package/src/components/DlTabs/DlTab.vue +146 -0
- package/src/components/DlTabs/DlTabs.vue +192 -0
- package/src/components/DlTabs/TabsWrapper.vue +104 -0
- package/src/components/DlTabs/index.ts +4 -0
- package/src/components/DlTabs/types.ts +8 -0
- package/src/components/DlTextArea.vue +151 -0
- package/src/components/DlTextHolder.vue +65 -0
- package/src/components/DlTextInput.vue +753 -0
- package/src/components/DlThemeProvider.vue +41 -0
- package/src/components/DlTimePicker/DlTimeCounter.vue +81 -0
- package/src/components/DlTimePicker/DlTimePicker.vue +151 -0
- package/src/components/DlTimePicker/DlTimePickerInput.vue +311 -0
- package/src/components/DlTimePicker/index.ts +3 -0
- package/src/components/DlTimePicker/types.ts +4 -0
- package/src/components/DlTooltip.vue +456 -0
- package/src/components/DlTrend.vue +97 -0
- package/src/components/DlTypography.vue +87 -0
- package/src/components/DlVirtualScroll/DlVirtualScroll.vue +290 -0
- package/src/components/DlVirtualScroll/index.ts +3 -0
- package/src/components/DlVirtualScroll/useVirtualScroll.ts +833 -0
- package/src/components/DlWidget/DlWidget.vue +50 -0
- package/src/components/DlWidget/DlWidgetGrid.vue +360 -0
- package/src/components/DlWidget/index.ts +4 -0
- package/src/components/DlWidget/types.ts +6 -0
- package/src/components/DlWidget/utils.ts +30 -0
- package/src/components/index.ts +118 -0
- package/src/demo/DlAccordionDemo.vue +60 -0
- package/src/demo/DlAlertDemo.vue +54 -0
- package/src/demo/DlAvatarDemo.vue +43 -0
- package/src/demo/DlBadgeDemo.vue +65 -0
- package/src/demo/DlButtonDemo.vue +266 -0
- package/src/demo/DlCheckboxDemo.vue +50 -0
- package/src/demo/DlChipDemo.vue +181 -0
- package/src/demo/DlColorPickerDemo.vue +43 -0
- package/src/demo/DlCounterDemo.vue +53 -0
- package/src/demo/DlDateTimeRangeDemo.vue +217 -0
- package/src/demo/DlDialogBoxDemo.vue +175 -0
- package/src/demo/DlDropdownButtonDemo.vue +260 -0
- package/src/demo/DlIconDemo.vue +47 -0
- package/src/demo/DlLinkDemo.vue +23 -0
- package/src/demo/DlListDemo.vue +177 -0
- package/src/demo/DlMenuDemo.vue +524 -0
- package/src/demo/DlOptionGroupDemo.vue +79 -0
- package/src/demo/DlPaginationDemo.vue +44 -0
- package/src/demo/DlPanelContainerDemo.vue +221 -0
- package/src/demo/DlPopupDemo.vue +58 -0
- package/src/demo/DlProgressBarDemo.vue +22 -0
- package/src/demo/DlProgressChartDemo.vue +71 -0
- package/src/demo/DlRadioDemo.vue +35 -0
- package/src/demo/DlRangeDemo.vue +44 -0
- package/src/demo/DlSearchDemo.vue +27 -0
- package/src/demo/DlSelectDemo.vue +355 -0
- package/src/demo/DlSkeletonDemo.vue +20 -0
- package/src/demo/DlSliderDemo.vue +47 -0
- package/src/demo/DlStepperDemo/CenteredStepperInDialogBox.vue +260 -0
- package/src/demo/DlStepperDemo/SimpleStepper.vue +202 -0
- package/src/demo/DlStepperDemo/StepperInDialogBox.vue +261 -0
- package/src/demo/DlStepperDemo/index.ts +5 -0
- package/src/demo/DlStepperDemo/steps/AssignmentsStep.vue +97 -0
- package/src/demo/DlStepperDemo/steps/DataStep.vue +158 -0
- package/src/demo/DlStepperDemo/steps/GeneralStep.vue +106 -0
- package/src/demo/DlStepperDemo/steps/InstructionStep.vue +176 -0
- package/src/demo/DlStepperDemo/steps/QualityStep.vue +65 -0
- package/src/demo/DlSwitchDemo.vue +49 -0
- package/src/demo/DlTableDemo.vue +475 -0
- package/src/demo/DlTabsDemo.vue +67 -0
- package/src/demo/DlTdDemo.vue +19 -0
- package/src/demo/DlTextAreaDemo.vue +37 -0
- package/src/demo/DlTextHolderDemo.vue +42 -0
- package/src/demo/DlTextInputDemo.vue +89 -0
- package/src/demo/DlThDemo.vue +32 -0
- package/src/demo/DlTooltipDemo.vue +60 -0
- package/src/demo/DlTrDemo.vue +18 -0
- package/src/demo/DlTrendDemo.vue +25 -0
- package/src/demo/DlTypographyDemo.vue +93 -0
- package/src/demo/DlWidgetDemo.vue +157 -0
- package/src/demo/SmartSearchDemo/DlSmartSearchDemo.vue +202 -0
- package/src/demo/SmartSearchDemo/schema.ts +44 -0
- package/src/demo/index.ts +141 -0
- package/src/directives/TouchPan.ts +525 -0
- package/src/env.d.ts +8 -0
- package/src/hooks/use-anchor.ts +223 -0
- package/src/hooks/use-model-toggle.ts +181 -0
- package/src/hooks/use-portal.ts +104 -0
- package/src/hooks/use-scroll-target.ts +53 -0
- package/src/hooks/use-size-observer.ts +24 -0
- package/src/hooks/use-suggestions.ts +355 -0
- package/src/hooks/use-tick.ts +32 -0
- package/src/hooks/use-timeout.ts +20 -0
- package/src/hooks/use-transition.ts +32 -0
- package/src/hooks/use-window-size.ts +25 -0
- package/src/hooks/useForm.ts +12 -0
- package/src/index.ts +7 -0
- package/src/main.ts +4 -0
- package/src/models.ts +4 -0
- package/src/types.ts +6 -0
- package/src/utils/calcs.ts +18 -0
- package/src/utils/click-outside.ts +108 -0
- package/src/utils/component-name-parser.ts +1 -0
- package/src/utils/css-color-names.ts +150 -0
- package/src/utils/dom.ts +55 -0
- package/src/utils/draggable-table.ts +416 -0
- package/src/utils/escape-key.ts +54 -0
- package/src/utils/events.ts +67 -0
- package/src/utils/focus-manager.ts +33 -0
- package/src/utils/focusout.ts +29 -0
- package/src/utils/format.ts +3 -0
- package/src/utils/getColor.ts +17 -0
- package/src/utils/getLighterGradient.ts +36 -0
- package/src/utils/getRootStyles.ts +52 -0
- package/src/utils/global-config.ts +6 -0
- package/src/utils/global-nodes.ts +42 -0
- package/src/utils/includes.ts +3 -0
- package/src/utils/index.ts +29 -0
- package/src/utils/inject-object-prop.ts +21 -0
- package/src/utils/input-sizes.ts +7 -0
- package/src/utils/is-ellipsis-active.ts +3 -0
- package/src/utils/is-in-viewport.ts +13 -0
- package/src/utils/is.ts +15 -0
- package/src/utils/key-composition.ts +17 -0
- package/src/utils/keyCodes.ts +12 -0
- package/src/utils/logger/ConsoleLogger.ts +65 -0
- package/src/utils/logger/ILogger.ts +8 -0
- package/src/utils/logger/index.ts +8 -0
- package/src/utils/nav-keys-constants.ts +1 -0
- package/src/utils/portal.ts +55 -0
- package/src/utils/position-engine.ts +381 -0
- package/src/utils/render.ts +36 -0
- package/src/utils/ripple.ts +7 -0
- package/src/utils/scroll.ts +73 -0
- package/src/utils/selection.ts +15 -0
- package/src/utils/sort.ts +7 -0
- package/src/utils/splitByQuotes.ts +32 -0
- package/src/utils/string.ts +6 -0
- package/src/utils/teleport.ts +14 -0
- package/src/utils/theme.ts +2 -0
- package/src/utils/vm.ts +16 -0
- package/storybook.js +8 -0
- package/tsconfig.json +44 -0
- package/tsconfig.node.json +8 -0
- package/types.ts +1 -0
- package/vite.config.ts +13 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<dl-text-input
|
|
4
|
+
v-model="textInputValue"
|
|
5
|
+
style="width: 220px"
|
|
6
|
+
placeholder="Select option"
|
|
7
|
+
size="l"
|
|
8
|
+
title="Input Title"
|
|
9
|
+
required
|
|
10
|
+
tooltip="Quis fugiat et non eu proident sit et amet."
|
|
11
|
+
top-message="Pariatur consequat non sit aliqua labore ad reprehenderit deserunt ullamco incididunt non irure laborum deserunt."
|
|
12
|
+
info-message="Ipsum amet quis velit amet. Anim consectetur nostrud sunt eu non non consequat sint eu amet."
|
|
13
|
+
:auto-suggest-items="[
|
|
14
|
+
'foo',
|
|
15
|
+
'bar',
|
|
16
|
+
'foobar',
|
|
17
|
+
'barfoo',
|
|
18
|
+
'foo bar foobarv'
|
|
19
|
+
]"
|
|
20
|
+
show-counter
|
|
21
|
+
:max-length="20"
|
|
22
|
+
/>
|
|
23
|
+
<dl-text-input
|
|
24
|
+
v-model="passFieldValue"
|
|
25
|
+
title="Password"
|
|
26
|
+
style="width: 220px"
|
|
27
|
+
placeholder="Select option"
|
|
28
|
+
size="m"
|
|
29
|
+
type="password"
|
|
30
|
+
error
|
|
31
|
+
error-message="The password entered is incorrect."
|
|
32
|
+
info-message="This won't show, error is true"
|
|
33
|
+
/>
|
|
34
|
+
<dl-text-input
|
|
35
|
+
v-model="warningFieldValue"
|
|
36
|
+
title="Warning Example"
|
|
37
|
+
style="width: 220px"
|
|
38
|
+
placeholder="Select option"
|
|
39
|
+
size="m"
|
|
40
|
+
warning
|
|
41
|
+
warning-message="Something isn't right."
|
|
42
|
+
info-message="This won't show, error is true"
|
|
43
|
+
optional
|
|
44
|
+
/>
|
|
45
|
+
<dl-text-input
|
|
46
|
+
v-model="errorFieldValue"
|
|
47
|
+
title="Error Example"
|
|
48
|
+
style="width: 220px"
|
|
49
|
+
placeholder="Select option"
|
|
50
|
+
size="m"
|
|
51
|
+
error
|
|
52
|
+
error-message="Error message is the strongest."
|
|
53
|
+
warning
|
|
54
|
+
warning-message="This won't show, error is true"
|
|
55
|
+
info-message="This won't show, error is true"
|
|
56
|
+
/>
|
|
57
|
+
<dl-text-input
|
|
58
|
+
style="width: 220px"
|
|
59
|
+
placeholder="Select option"
|
|
60
|
+
title="Min"
|
|
61
|
+
required
|
|
62
|
+
size="s"
|
|
63
|
+
/>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<script lang="ts">
|
|
68
|
+
import { defineComponent, ref } from 'vue-demi'
|
|
69
|
+
import { DlTextInput } from '../components'
|
|
70
|
+
export default defineComponent({
|
|
71
|
+
name: 'DlTextInputDemo',
|
|
72
|
+
components: {
|
|
73
|
+
DlTextInput
|
|
74
|
+
},
|
|
75
|
+
setup() {
|
|
76
|
+
const textInputValue = ref<string>('')
|
|
77
|
+
const passFieldValue = ref<string>('')
|
|
78
|
+
const warningFieldValue = ref<string>('')
|
|
79
|
+
const errorFieldValue = ref<string>('')
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
textInputValue,
|
|
83
|
+
passFieldValue,
|
|
84
|
+
warningFieldValue,
|
|
85
|
+
errorFieldValue
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
</script>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<DlTh> Table Th component </DlTh>
|
|
4
|
+
<DlTh :auto-width="true">
|
|
5
|
+
Table Th component auto width
|
|
6
|
+
</DlTh>
|
|
7
|
+
<DlTh
|
|
8
|
+
:props="{
|
|
9
|
+
sort: (el) => log(el),
|
|
10
|
+
col: { sortable: true, align: 'left' }
|
|
11
|
+
}"
|
|
12
|
+
>
|
|
13
|
+
Table Th component
|
|
14
|
+
</DlTh>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
import { DlTh } from '../components'
|
|
20
|
+
import { defineComponent } from 'vue-demi'
|
|
21
|
+
|
|
22
|
+
export default defineComponent({
|
|
23
|
+
components: {
|
|
24
|
+
DlTh
|
|
25
|
+
},
|
|
26
|
+
methods: {
|
|
27
|
+
log(e: Event) {
|
|
28
|
+
console.log(e)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
</script>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<p>
|
|
4
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laboriosam,
|
|
5
|
+
nemo! Enim alias odit, doloribus est nisi nihil? Nisi quibusdam
|
|
6
|
+
animi quia omnis itaque, maxime labore aliquam. Obcaecati et placeat
|
|
7
|
+
nemo.
|
|
8
|
+
</p>
|
|
9
|
+
<p>
|
|
10
|
+
<dl-link
|
|
11
|
+
href="https://console.dataloop.ai"
|
|
12
|
+
:size="30"
|
|
13
|
+
open-in-new-tab
|
|
14
|
+
>
|
|
15
|
+
Link With Tooltip
|
|
16
|
+
<dl-tooltip>
|
|
17
|
+
lorem ipsum dolor, sit amet consectetur adipisicing elit.
|
|
18
|
+
Assumenda corporis alias cupiditate natus? Ipsum quos quia
|
|
19
|
+
temporibus ipsam magnam, alias rerum aut, a quaerat dicta,
|
|
20
|
+
quasi aperiam facere asperiores saepe.
|
|
21
|
+
</dl-tooltip>
|
|
22
|
+
</dl-link>
|
|
23
|
+
<span>
|
|
24
|
+
Span With Tooltip
|
|
25
|
+
<dl-tooltip
|
|
26
|
+
color="rgb(0, 255, 0)"
|
|
27
|
+
background-color="dl-color-side-panel"
|
|
28
|
+
>
|
|
29
|
+
lorem ipsum dolor, sit amet consectetur adipisicing elit.
|
|
30
|
+
Assumenda corporis alias cupiditate natus? Ipsum quos quia
|
|
31
|
+
temporibus ipsam magnam, alias rerum aut, a quaerat dicta,
|
|
32
|
+
quasi aperiam facere asperiores saepe.
|
|
33
|
+
</dl-tooltip>
|
|
34
|
+
</span>
|
|
35
|
+
</p>
|
|
36
|
+
<p>
|
|
37
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Aspernatur
|
|
38
|
+
debitis, dolor tempora tenetur perspiciatis laborum illum, dolorem,
|
|
39
|
+
voluptate commodi molestiae animi fuga natus assumenda aliquam ad?
|
|
40
|
+
Dicta harum recusandae rem!
|
|
41
|
+
</p>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script lang="ts">
|
|
46
|
+
import { DlTooltip, DlLink } from '../components'
|
|
47
|
+
import { defineComponent } from 'vue-demi'
|
|
48
|
+
|
|
49
|
+
export default defineComponent({
|
|
50
|
+
name: 'DlTooltipDemo',
|
|
51
|
+
components: {
|
|
52
|
+
DlTooltip,
|
|
53
|
+
DlLink
|
|
54
|
+
},
|
|
55
|
+
data() {
|
|
56
|
+
return {}
|
|
57
|
+
},
|
|
58
|
+
template: 'dl-tooltip-demo'
|
|
59
|
+
})
|
|
60
|
+
</script>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<DlTr :no-hover="true">
|
|
4
|
+
Table Tr component
|
|
5
|
+
</DlTr>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script lang="ts">
|
|
10
|
+
import { DlTr } from '../components'
|
|
11
|
+
import { defineComponent } from 'vue-demi'
|
|
12
|
+
|
|
13
|
+
export default defineComponent({
|
|
14
|
+
components: {
|
|
15
|
+
DlTr
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<dl-trend :value="75" />
|
|
4
|
+
<dl-trend :value="0" />
|
|
5
|
+
<dl-trend
|
|
6
|
+
:value="25"
|
|
7
|
+
direction="down"
|
|
8
|
+
/>
|
|
9
|
+
<dl-trend
|
|
10
|
+
value="with some text"
|
|
11
|
+
direction="down"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script lang="ts">
|
|
17
|
+
import { defineComponent } from 'vue-demi'
|
|
18
|
+
import { DlTrend } from '../components'
|
|
19
|
+
export default defineComponent({
|
|
20
|
+
name: 'DlTrendDemo',
|
|
21
|
+
components: {
|
|
22
|
+
DlTrend
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
</script>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div
|
|
4
|
+
v-for="(item, index) in typographyTypes"
|
|
5
|
+
:key="index"
|
|
6
|
+
>
|
|
7
|
+
<DlTypography
|
|
8
|
+
:color="item.color"
|
|
9
|
+
:size="item.size || item.variant"
|
|
10
|
+
:variant="item.variant"
|
|
11
|
+
>
|
|
12
|
+
Typography {{ item ? item.variant : item }}
|
|
13
|
+
</DlTypography>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<DlButton>
|
|
17
|
+
<dl-typography
|
|
18
|
+
color="dl-color-tooltip-text"
|
|
19
|
+
variant="p"
|
|
20
|
+
size="small"
|
|
21
|
+
bold
|
|
22
|
+
>
|
|
23
|
+
Typography Bold
|
|
24
|
+
</dl-typography>
|
|
25
|
+
</DlButton>
|
|
26
|
+
<br>
|
|
27
|
+
<br>
|
|
28
|
+
<DlButton>
|
|
29
|
+
<dl-typography
|
|
30
|
+
color="dl-color-tooltip-text"
|
|
31
|
+
variant="p"
|
|
32
|
+
size="small"
|
|
33
|
+
uppercase
|
|
34
|
+
>
|
|
35
|
+
Typography Uppercase
|
|
36
|
+
</dl-typography>
|
|
37
|
+
</DlButton>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script lang="ts">
|
|
42
|
+
import DlTypography from '../components/DlTypography.vue'
|
|
43
|
+
import { DlButton } from '../components/DlButton'
|
|
44
|
+
import { defineComponent } from 'vue-demi'
|
|
45
|
+
|
|
46
|
+
export default defineComponent({
|
|
47
|
+
name: 'DlTypographyDemo',
|
|
48
|
+
components: {
|
|
49
|
+
DlTypography,
|
|
50
|
+
DlButton
|
|
51
|
+
},
|
|
52
|
+
data() {
|
|
53
|
+
return {
|
|
54
|
+
typographyTypes: [
|
|
55
|
+
{
|
|
56
|
+
variant: 'h1'
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
variant: 'h2'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
variant: 'h3'
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
variant: 'h4'
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
variant: 'h5'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
variant: 'h6'
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
variant: 'p'
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
variant: 'h1',
|
|
78
|
+
color: 'dl-color-secondary'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
variant: 'body',
|
|
82
|
+
size: '30px',
|
|
83
|
+
color: 'dl-color-positive'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
variant: 'p',
|
|
87
|
+
color: 'dl-color-warning'
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
})
|
|
93
|
+
</script>
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { defineComponent, ref } from 'vue-demi'
|
|
3
|
+
import DlWidgetGrid from '../components/DlWidget/DlWidgetGrid.vue'
|
|
4
|
+
import { DlButton } from '../components'
|
|
5
|
+
import BadgeDemo from './DlBadgeDemo.vue'
|
|
6
|
+
import { Widget } from '../components/DlWidget/types'
|
|
7
|
+
import DlDialogBox from '../components/DlDialogBox/DlDialogBox.vue'
|
|
8
|
+
import DlDialogBoxHeader from '../components/DlDialogBox/DlDialogBoxHeader.vue'
|
|
9
|
+
import DlDialogBoxFooter from '../components/DlDialogBox/DlDialogBoxFooter.vue'
|
|
10
|
+
import DlChip from '../components/DlChip/DlChip.vue'
|
|
11
|
+
|
|
12
|
+
export default defineComponent({
|
|
13
|
+
components: {
|
|
14
|
+
DlWidgetGrid,
|
|
15
|
+
DlButton,
|
|
16
|
+
DlDialogBox,
|
|
17
|
+
DlDialogBoxHeader,
|
|
18
|
+
DlDialogBoxFooter,
|
|
19
|
+
DlChip
|
|
20
|
+
},
|
|
21
|
+
setup() {
|
|
22
|
+
const isEditable = ref(false)
|
|
23
|
+
const addDialog = ref(false)
|
|
24
|
+
const handleEditMode = () => (isEditable.value = !isEditable.value)
|
|
25
|
+
|
|
26
|
+
const widgetLibrary = ref([
|
|
27
|
+
{
|
|
28
|
+
title: 'Widget 1',
|
|
29
|
+
subTitle: 'first widget',
|
|
30
|
+
content: BadgeDemo,
|
|
31
|
+
description:
|
|
32
|
+
'Lorem ipsum dolor sit amet consectetur. Ultricies odio sagittis bibendum tristique congue pretium ac massa proin. Leo blandit commodo sit nibh sem. dfsdfdsfsdf dfsdfsdfsdfsd'
|
|
33
|
+
}
|
|
34
|
+
] as Widget[])
|
|
35
|
+
|
|
36
|
+
const widgets = ref([
|
|
37
|
+
[
|
|
38
|
+
{
|
|
39
|
+
title: 'Widget 8',
|
|
40
|
+
subTitle: 'eighth widget',
|
|
41
|
+
content: `Do I contradict myself?
|
|
42
|
+
Very well then I contradict myself,
|
|
43
|
+
(I am large, I contain multitudes.)
|
|
44
|
+
I concentrate toward them that are nigh, I wait on the door-slab.
|
|
45
|
+
Who has done his day's work? who will soonest be through with his supper?
|
|
46
|
+
Who wishes to walk with me?`,
|
|
47
|
+
description:
|
|
48
|
+
'Lorem dolor sit amet consectetur. Ultricies odio sagittis bibendum tristique congue pretium ac massa proin. Leo blandit commodo sit nibh sem. dfsdfdsfsdf dfsdfsdfsdfsd'
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
{
|
|
53
|
+
title: 'Widget 2',
|
|
54
|
+
subTitle: 'second widget',
|
|
55
|
+
content: `“Later she remembered all the hours of the afternoon as happy -- one of those uneventful times that seem at the moment only a link between past and future pleasure, but turn out to have been the pleasure itself.”`,
|
|
56
|
+
description:
|
|
57
|
+
'Lorem ipsum dolor sit amet consectetur. Ultricies odio sagittis bibendum tristique congue pretium ac massa proin. Leo blandit commodo sit nibh sem. dfsdfdsfsdf dfsdfsdfsdfsd'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
title: 'Widget 3',
|
|
61
|
+
subTitle: 'third widget',
|
|
62
|
+
content: `The Bat that flits at close of Eve
|
|
63
|
+
Has left the Brain that wont Believe
|
|
64
|
+
The Owl that calls upon the Night
|
|
65
|
+
Speaks the Unbelievers fright`,
|
|
66
|
+
description:
|
|
67
|
+
'Lorem ipsum dolor sit amet consectetur. Ultricies odio sagittis bibendum tristique congue pretium ac massa proin. Leo blandit commodo sit nibh sem. dfsdfdsfsdf dfsdfsdfsdfsd'
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
[
|
|
71
|
+
{
|
|
72
|
+
title: 'Widget 4',
|
|
73
|
+
subTitle: 'fourth widget',
|
|
74
|
+
content: `That motley drama—oh, be sure
|
|
75
|
+
It shall not be forgot!
|
|
76
|
+
With its Phantom chased for evermore
|
|
77
|
+
By a crowd that seize it not,`,
|
|
78
|
+
description:
|
|
79
|
+
'Lorem ipsum dolor sit amet consectetur. Ultricies odio sagittis bibendum tristique congue pretium ac massa proin. Leo blandit commodo sit nibh sem. dfsdfdsfsdf dfsdfsdfsdfsd'
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
] as Widget[][])
|
|
83
|
+
|
|
84
|
+
const addWidget = (widget: Widget) => {
|
|
85
|
+
widgets.value[widgets.value.length - 1].push(widget)
|
|
86
|
+
addDialog.value = false
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const handleRemove = (widget: Widget) => {
|
|
90
|
+
widgetLibrary.value.push(widget)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
widgets,
|
|
95
|
+
widgetLibrary,
|
|
96
|
+
isEditable,
|
|
97
|
+
addDialog,
|
|
98
|
+
handleEditMode,
|
|
99
|
+
addWidget,
|
|
100
|
+
handleRemove
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
})
|
|
104
|
+
</script>
|
|
105
|
+
|
|
106
|
+
<template>
|
|
107
|
+
<div style="width: 900px">
|
|
108
|
+
<div
|
|
109
|
+
style="width: 200px; display: flex; justify-content: space-between"
|
|
110
|
+
>
|
|
111
|
+
<dl-button
|
|
112
|
+
:label="isEditable ? 'Done' : 'Edit'"
|
|
113
|
+
@click="handleEditMode"
|
|
114
|
+
/>
|
|
115
|
+
<dl-button
|
|
116
|
+
label="Add"
|
|
117
|
+
@click="addDialog = true"
|
|
118
|
+
/>
|
|
119
|
+
</div>
|
|
120
|
+
<dl-widget-grid
|
|
121
|
+
v-model="widgets"
|
|
122
|
+
:is-editable="isEditable"
|
|
123
|
+
@remove="handleRemove"
|
|
124
|
+
/>
|
|
125
|
+
|
|
126
|
+
<dl-dialog-box v-model="addDialog">
|
|
127
|
+
<template #header>
|
|
128
|
+
<dl-dialog-box-header
|
|
129
|
+
title="Add new widget"
|
|
130
|
+
@on-close="addDialog = false"
|
|
131
|
+
/>
|
|
132
|
+
</template>
|
|
133
|
+
<template #body>
|
|
134
|
+
<div
|
|
135
|
+
class="flex"
|
|
136
|
+
style="gap: 10px"
|
|
137
|
+
>
|
|
138
|
+
<dl-chip
|
|
139
|
+
v-for="(widget, index) in widgetLibrary"
|
|
140
|
+
:key="index"
|
|
141
|
+
style="cursor: pointer"
|
|
142
|
+
@click="addWidget(widget)"
|
|
143
|
+
>
|
|
144
|
+
{{ widget.title }}
|
|
145
|
+
</dl-chip>
|
|
146
|
+
</div>
|
|
147
|
+
</template>
|
|
148
|
+
<template #footer>
|
|
149
|
+
<dl-dialog-box-footer>
|
|
150
|
+
<dl-button @click="addDialog = false">
|
|
151
|
+
Close
|
|
152
|
+
</dl-button>
|
|
153
|
+
</dl-dialog-box-footer>
|
|
154
|
+
</template>
|
|
155
|
+
</dl-dialog-box>
|
|
156
|
+
</div>
|
|
157
|
+
</template>
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="width: 900px">
|
|
3
|
+
<div style="margin: 40px 0">
|
|
4
|
+
<dl-checkbox
|
|
5
|
+
v-model="switchState"
|
|
6
|
+
without-root-padding
|
|
7
|
+
label="Disabled"
|
|
8
|
+
/>
|
|
9
|
+
</div>
|
|
10
|
+
<div
|
|
11
|
+
style="width: 100px"
|
|
12
|
+
class="props"
|
|
13
|
+
>
|
|
14
|
+
<select
|
|
15
|
+
id="status_select"
|
|
16
|
+
class="prop"
|
|
17
|
+
placeholder="Status type"
|
|
18
|
+
@input="updateStatusType"
|
|
19
|
+
>
|
|
20
|
+
<option value="info">
|
|
21
|
+
Info
|
|
22
|
+
</option>
|
|
23
|
+
<option value="warning">
|
|
24
|
+
Warning
|
|
25
|
+
</option>
|
|
26
|
+
<option value="error">
|
|
27
|
+
Error
|
|
28
|
+
</option>
|
|
29
|
+
<option value="success">
|
|
30
|
+
Success
|
|
31
|
+
</option>
|
|
32
|
+
</select>
|
|
33
|
+
<input
|
|
34
|
+
class="prop"
|
|
35
|
+
placeholder="Status Messaee"
|
|
36
|
+
@input="updateStatusMessage"
|
|
37
|
+
>
|
|
38
|
+
</div>
|
|
39
|
+
<dl-smart-search
|
|
40
|
+
:status="status"
|
|
41
|
+
:aliases="aliases"
|
|
42
|
+
:schema="schema"
|
|
43
|
+
:color-schema="{
|
|
44
|
+
fields: 'blue',
|
|
45
|
+
operators: 'green',
|
|
46
|
+
keywords: 'bold'
|
|
47
|
+
}"
|
|
48
|
+
:filters="filters"
|
|
49
|
+
:disabled="switchState"
|
|
50
|
+
:is-loading="isLoading"
|
|
51
|
+
@remove-query="handleRemoveQuery"
|
|
52
|
+
@save-query="handleSaveQuery"
|
|
53
|
+
@search-query="handleSearchQuery"
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<script lang="ts">
|
|
59
|
+
import { defineComponent } from 'vue-demi'
|
|
60
|
+
import { DlSmartSearch, DlCheckbox } from '../../components'
|
|
61
|
+
import { Query } from '../../components/DlSmartSearch/types'
|
|
62
|
+
import { aliases, schema } from './schema'
|
|
63
|
+
|
|
64
|
+
export default defineComponent({
|
|
65
|
+
name: 'DlSmartSearchDemo',
|
|
66
|
+
components: {
|
|
67
|
+
DlSmartSearch,
|
|
68
|
+
DlCheckbox
|
|
69
|
+
},
|
|
70
|
+
setup() {
|
|
71
|
+
return { aliases, schema }
|
|
72
|
+
},
|
|
73
|
+
data() {
|
|
74
|
+
return {
|
|
75
|
+
switchState: false,
|
|
76
|
+
isLoading: false,
|
|
77
|
+
status: {
|
|
78
|
+
type: 'info',
|
|
79
|
+
message: ''
|
|
80
|
+
},
|
|
81
|
+
filters: [
|
|
82
|
+
{
|
|
83
|
+
label: 'Saved DQL Queries',
|
|
84
|
+
name: 'saved',
|
|
85
|
+
queries: [
|
|
86
|
+
{
|
|
87
|
+
name: 'Query 1',
|
|
88
|
+
query: '{"q": 1}'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'Query 2',
|
|
92
|
+
query: '{"query2": "query2"}'
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: 'Query 3',
|
|
96
|
+
query: ''
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'Query 4',
|
|
100
|
+
query: JSON.stringify({
|
|
101
|
+
aa: 'bb',
|
|
102
|
+
no: [{ as: 'sa' }, { zz: 'ss' }]
|
|
103
|
+
})
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
label: 'Recent Searches',
|
|
109
|
+
name: 'recent',
|
|
110
|
+
queries: [
|
|
111
|
+
{
|
|
112
|
+
name: 'Query 4',
|
|
113
|
+
query: ''
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'Query 5',
|
|
117
|
+
query: ''
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: 'Query 6',
|
|
121
|
+
query: ''
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
label: 'Suggested Searches',
|
|
127
|
+
name: 'suggested',
|
|
128
|
+
queries: [
|
|
129
|
+
{
|
|
130
|
+
name: 'Query 7',
|
|
131
|
+
query: ''
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: 'Query 8',
|
|
135
|
+
query: ''
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: 'Query 9',
|
|
139
|
+
query: ''
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
mounted() {},
|
|
148
|
+
methods: {
|
|
149
|
+
handleSearchQuery({ query }: { query: string }) {
|
|
150
|
+
this.isLoading = true
|
|
151
|
+
console.log(`Searching for: ${query}...`)
|
|
152
|
+
const search = setTimeout(() => {
|
|
153
|
+
console.log(`Results: ${query}`)
|
|
154
|
+
this.isLoading = false
|
|
155
|
+
}, 2000)
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
updateStatusType(e: Event) {
|
|
159
|
+
const newType = (e.target as HTMLInputElement).value
|
|
160
|
+
this.status = {
|
|
161
|
+
type: newType,
|
|
162
|
+
message: this.status.message
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
updateStatusMessage(e: Event) {
|
|
166
|
+
const newMessage = (e.target as HTMLInputElement).value
|
|
167
|
+
this.status = {
|
|
168
|
+
type: this.status.type,
|
|
169
|
+
message: newMessage
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
handleSaveQuery(query: Query) {
|
|
174
|
+
const saveQueryIndex = this.filters[0].queries.findIndex(
|
|
175
|
+
(q: Query) => q.name === query.name || q.query === query.query
|
|
176
|
+
)
|
|
177
|
+
if (saveQueryIndex !== -1) {
|
|
178
|
+
this.filters[0].queries[saveQueryIndex] = query
|
|
179
|
+
} else {
|
|
180
|
+
this.filters[0].queries.push(query)
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
handleRemoveQuery(query: Query) {
|
|
185
|
+
this.filters[0].queries = this.filters[0].queries.filter(
|
|
186
|
+
(q: Query) => q.name !== query.name
|
|
187
|
+
)
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
})
|
|
191
|
+
</script>
|
|
192
|
+
|
|
193
|
+
<style scoped>
|
|
194
|
+
.prop {
|
|
195
|
+
font-size: 12px;
|
|
196
|
+
width: 80px;
|
|
197
|
+
margin: 30px 0px;
|
|
198
|
+
}
|
|
199
|
+
.props {
|
|
200
|
+
display: flex;
|
|
201
|
+
}
|
|
202
|
+
</style>
|