@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,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<dl-avatar tooltip="kekokokkokok">
|
|
4
|
+
<dl-icon
|
|
5
|
+
icon="icon-dl-creator"
|
|
6
|
+
size="12px"
|
|
7
|
+
/>
|
|
8
|
+
</dl-avatar>
|
|
9
|
+
<dl-avatar
|
|
10
|
+
color="rgb(70, 200, 100)"
|
|
11
|
+
size="40px"
|
|
12
|
+
>
|
|
13
|
+
SA
|
|
14
|
+
</dl-avatar>
|
|
15
|
+
<dl-avatar
|
|
16
|
+
color="dl-color-warning"
|
|
17
|
+
size="48px"
|
|
18
|
+
tooltip="johndoe@mail.com"
|
|
19
|
+
name="John Doe"
|
|
20
|
+
/>
|
|
21
|
+
<dl-avatar
|
|
22
|
+
color="dl-color-darker"
|
|
23
|
+
size="64px"
|
|
24
|
+
tooltip="john@mail.com"
|
|
25
|
+
name="John"
|
|
26
|
+
/>
|
|
27
|
+
<dl-avatar
|
|
28
|
+
tooltip="popcat@gmail.com"
|
|
29
|
+
size="72px"
|
|
30
|
+
>
|
|
31
|
+
<img src="https://popcat.click/twitter-card.jpg">
|
|
32
|
+
</dl-avatar>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script lang="ts">
|
|
37
|
+
import { defineComponent } from 'vue-demi'
|
|
38
|
+
import DlAvatar from '../components/DlAvatar.vue'
|
|
39
|
+
import DlIcon from '../components/DlIcon.vue'
|
|
40
|
+
export default defineComponent({
|
|
41
|
+
components: { DlAvatar, DlIcon }
|
|
42
|
+
})
|
|
43
|
+
</script>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<dl-button>
|
|
4
|
+
<dl-badge
|
|
5
|
+
with-border
|
|
6
|
+
floating
|
|
7
|
+
align="top"
|
|
8
|
+
color="red"
|
|
9
|
+
/>
|
|
10
|
+
button with badge
|
|
11
|
+
</dl-button>
|
|
12
|
+
<p>Badge with content:</p>
|
|
13
|
+
<dl-badge color="green">
|
|
14
|
+
<p>21</p>
|
|
15
|
+
</dl-badge>
|
|
16
|
+
<p>Badge as indicator:</p>
|
|
17
|
+
<div style="display: flex; align-items: center">
|
|
18
|
+
<dl-badge color="green" /> Test indicator
|
|
19
|
+
</div>
|
|
20
|
+
<p>Badge with multi-line:</p>
|
|
21
|
+
<div style="display: flex; align-items: center">
|
|
22
|
+
<dl-badge
|
|
23
|
+
color="green"
|
|
24
|
+
multiline
|
|
25
|
+
>
|
|
26
|
+
<div style="width: 30px">
|
|
27
|
+
Test Multi
|
|
28
|
+
</div>
|
|
29
|
+
</dl-badge>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<p>Badge with single-line:</p>
|
|
33
|
+
<div style="display: flex; align-items: center">
|
|
34
|
+
<dl-badge style="max-width: 55px">
|
|
35
|
+
Test Single
|
|
36
|
+
</dl-badge>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<p>Outline badge:</p>
|
|
40
|
+
<div style="display: flex; align-items: center">
|
|
41
|
+
<dl-badge
|
|
42
|
+
color="green"
|
|
43
|
+
outline
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script lang="ts">
|
|
50
|
+
import { defineComponent } from 'vue-demi'
|
|
51
|
+
import { DlButton, DlBadge } from '../components'
|
|
52
|
+
|
|
53
|
+
export default defineComponent({
|
|
54
|
+
name: 'BadgeDemo',
|
|
55
|
+
components: {
|
|
56
|
+
DlButton,
|
|
57
|
+
DlBadge
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
</script>
|
|
61
|
+
<style scoped>
|
|
62
|
+
p {
|
|
63
|
+
margin: 0 auto;
|
|
64
|
+
}
|
|
65
|
+
</style>
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="width: 950px; padding-top: 20px">
|
|
3
|
+
<div
|
|
4
|
+
v-for="buttonSize in buttons"
|
|
5
|
+
:key="buttonSize"
|
|
6
|
+
>
|
|
7
|
+
<h3>Size {{ buttonSize }}</h3>
|
|
8
|
+
<div style="display: flex; gap: 10px; justify-content: center">
|
|
9
|
+
<div class="col">
|
|
10
|
+
<DlButton
|
|
11
|
+
:size="buttonSize"
|
|
12
|
+
color="dl-color-negative"
|
|
13
|
+
label="COntained text"
|
|
14
|
+
@click="log"
|
|
15
|
+
/>
|
|
16
|
+
<DlButton
|
|
17
|
+
:size="buttonSize"
|
|
18
|
+
outlined
|
|
19
|
+
@click="log"
|
|
20
|
+
>
|
|
21
|
+
Outlined
|
|
22
|
+
</DlButton>
|
|
23
|
+
<DlButton
|
|
24
|
+
:size="buttonSize"
|
|
25
|
+
flat
|
|
26
|
+
@click="log"
|
|
27
|
+
>
|
|
28
|
+
Flat Primary
|
|
29
|
+
</DlButton>
|
|
30
|
+
<DlButton
|
|
31
|
+
color="secondary"
|
|
32
|
+
:size="buttonSize"
|
|
33
|
+
flat
|
|
34
|
+
@click="log"
|
|
35
|
+
>
|
|
36
|
+
Flat Secondary
|
|
37
|
+
</DlButton>
|
|
38
|
+
<DlButton
|
|
39
|
+
flat
|
|
40
|
+
disabled
|
|
41
|
+
:size="buttonSize"
|
|
42
|
+
@click="log"
|
|
43
|
+
>
|
|
44
|
+
Disabled Flat
|
|
45
|
+
</DlButton>
|
|
46
|
+
<DlButton
|
|
47
|
+
disabled
|
|
48
|
+
:size="buttonSize"
|
|
49
|
+
@click="log"
|
|
50
|
+
>
|
|
51
|
+
Disabled
|
|
52
|
+
</DlButton>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<div
|
|
57
|
+
style="
|
|
58
|
+
display: flex;
|
|
59
|
+
gap: 10px;
|
|
60
|
+
justify-content: center;
|
|
61
|
+
margin-top: 50px;
|
|
62
|
+
"
|
|
63
|
+
>
|
|
64
|
+
<DlButton
|
|
65
|
+
:fluid="true"
|
|
66
|
+
size="xl"
|
|
67
|
+
@click="log"
|
|
68
|
+
>
|
|
69
|
+
Fluid Button
|
|
70
|
+
</DlButton>
|
|
71
|
+
<DlButton
|
|
72
|
+
size="xl"
|
|
73
|
+
outlined
|
|
74
|
+
@click="log"
|
|
75
|
+
>
|
|
76
|
+
Outlined
|
|
77
|
+
</DlButton>
|
|
78
|
+
<DlButton
|
|
79
|
+
size="xl"
|
|
80
|
+
flat
|
|
81
|
+
@click="log"
|
|
82
|
+
>
|
|
83
|
+
Flat
|
|
84
|
+
</DlButton>
|
|
85
|
+
<DlButton
|
|
86
|
+
size="xl"
|
|
87
|
+
disabled
|
|
88
|
+
@click="log"
|
|
89
|
+
>
|
|
90
|
+
Disabled
|
|
91
|
+
</DlButton>
|
|
92
|
+
</div>
|
|
93
|
+
<div
|
|
94
|
+
v-for="buttonSize in buttons"
|
|
95
|
+
:key="buttonSize"
|
|
96
|
+
>
|
|
97
|
+
<h3>Size {{ buttonSize }}</h3>
|
|
98
|
+
<div style="display: flex; gap: 10px; justify-content: center">
|
|
99
|
+
<DlButton
|
|
100
|
+
icon="icon-dl-add"
|
|
101
|
+
:size="buttonSize"
|
|
102
|
+
round
|
|
103
|
+
@click="log"
|
|
104
|
+
/>
|
|
105
|
+
<DlButton
|
|
106
|
+
icon="icon-dl-add"
|
|
107
|
+
:size="buttonSize"
|
|
108
|
+
@click="log"
|
|
109
|
+
/>
|
|
110
|
+
<DlButton
|
|
111
|
+
icon="icon-dl-add"
|
|
112
|
+
:size="buttonSize"
|
|
113
|
+
outlined
|
|
114
|
+
@click="log"
|
|
115
|
+
>
|
|
116
|
+
Outlined
|
|
117
|
+
</DlButton>
|
|
118
|
+
<DlButton
|
|
119
|
+
icon="icon-dl-add"
|
|
120
|
+
:size="buttonSize"
|
|
121
|
+
flat
|
|
122
|
+
@click="log"
|
|
123
|
+
>
|
|
124
|
+
Flat Primary
|
|
125
|
+
</DlButton>
|
|
126
|
+
<DlButton
|
|
127
|
+
icon="icon-dl-add"
|
|
128
|
+
color="secondary"
|
|
129
|
+
:size="buttonSize"
|
|
130
|
+
flat
|
|
131
|
+
@click="log"
|
|
132
|
+
>
|
|
133
|
+
Flat Secondary
|
|
134
|
+
</DlButton>
|
|
135
|
+
<DlButton
|
|
136
|
+
flat
|
|
137
|
+
icon="icon-dl-add"
|
|
138
|
+
disabled
|
|
139
|
+
:size="buttonSize"
|
|
140
|
+
@click="log"
|
|
141
|
+
>
|
|
142
|
+
Disabled Flat
|
|
143
|
+
</DlButton>
|
|
144
|
+
<DlButton
|
|
145
|
+
icon="icon-dl-add"
|
|
146
|
+
disabled
|
|
147
|
+
:size="buttonSize"
|
|
148
|
+
@click="log"
|
|
149
|
+
>
|
|
150
|
+
Disabled
|
|
151
|
+
</DlButton>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
<div
|
|
155
|
+
style="
|
|
156
|
+
display: flex;
|
|
157
|
+
gap: 10px;
|
|
158
|
+
justify-content: center;
|
|
159
|
+
margin-top: 50px;
|
|
160
|
+
"
|
|
161
|
+
>
|
|
162
|
+
<DlButton
|
|
163
|
+
icon="icon-dl-add"
|
|
164
|
+
:fluid="true"
|
|
165
|
+
size="xl"
|
|
166
|
+
@click="log"
|
|
167
|
+
>
|
|
168
|
+
Fluid Button
|
|
169
|
+
</DlButton>
|
|
170
|
+
<DlButton
|
|
171
|
+
icon="icon-dl-add"
|
|
172
|
+
size="xl"
|
|
173
|
+
outlined
|
|
174
|
+
@click="log"
|
|
175
|
+
>
|
|
176
|
+
Outlined
|
|
177
|
+
</DlButton>
|
|
178
|
+
<DlButton
|
|
179
|
+
icon="icon-dl-add"
|
|
180
|
+
size="xl"
|
|
181
|
+
flat
|
|
182
|
+
@click="log"
|
|
183
|
+
>
|
|
184
|
+
Flat
|
|
185
|
+
</DlButton>
|
|
186
|
+
<DlButton
|
|
187
|
+
icon="icon-dl-add"
|
|
188
|
+
size="xl"
|
|
189
|
+
disabled
|
|
190
|
+
@click="log"
|
|
191
|
+
>
|
|
192
|
+
Disabled
|
|
193
|
+
</DlButton>
|
|
194
|
+
</div>
|
|
195
|
+
<div>
|
|
196
|
+
<h3>With badge</h3>
|
|
197
|
+
|
|
198
|
+
<dl-button>
|
|
199
|
+
<dl-badge
|
|
200
|
+
with-border
|
|
201
|
+
floating
|
|
202
|
+
align="top"
|
|
203
|
+
color="red"
|
|
204
|
+
/>
|
|
205
|
+
button with badge
|
|
206
|
+
</dl-button>
|
|
207
|
+
</div>
|
|
208
|
+
<div>
|
|
209
|
+
<h3>Button with label and slot</h3>
|
|
210
|
+
|
|
211
|
+
<dl-button label="Hello">
|
|
212
|
+
World
|
|
213
|
+
</dl-button>
|
|
214
|
+
</div>
|
|
215
|
+
<div>
|
|
216
|
+
<h3>Button with icon and slot</h3>
|
|
217
|
+
|
|
218
|
+
<dl-button icon="icon-dl-search">
|
|
219
|
+
<dl-icon
|
|
220
|
+
size="16px"
|
|
221
|
+
icon="icon-dl-cart"
|
|
222
|
+
/>
|
|
223
|
+
<dl-badge
|
|
224
|
+
with-border
|
|
225
|
+
floating
|
|
226
|
+
align="top"
|
|
227
|
+
color="red"
|
|
228
|
+
/>
|
|
229
|
+
</dl-button>
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
</template>
|
|
233
|
+
|
|
234
|
+
<script lang="ts">
|
|
235
|
+
import { defineComponent, reactive } from 'vue-demi'
|
|
236
|
+
import { DlButton, DlBadge, DlIcon } from '../components'
|
|
237
|
+
import { ButtonSizes } from '../components/DlButton'
|
|
238
|
+
export default defineComponent({
|
|
239
|
+
name: 'DlButtonDemo',
|
|
240
|
+
components: {
|
|
241
|
+
DlButton,
|
|
242
|
+
DlBadge,
|
|
243
|
+
DlIcon
|
|
244
|
+
},
|
|
245
|
+
setup() {
|
|
246
|
+
const buttons = reactive<ButtonSizes[]>(['s', 'm', 'l', 'xl'])
|
|
247
|
+
|
|
248
|
+
const log = (e: Event) => console.log(e)
|
|
249
|
+
return { buttons, log }
|
|
250
|
+
}
|
|
251
|
+
})
|
|
252
|
+
</script>
|
|
253
|
+
|
|
254
|
+
<style scoped lang="scss">
|
|
255
|
+
.col {
|
|
256
|
+
width: auto;
|
|
257
|
+
display: flex;
|
|
258
|
+
flex-wrap: wrap;
|
|
259
|
+
min-width: 0;
|
|
260
|
+
max-width: 100%;
|
|
261
|
+
& > button,
|
|
262
|
+
& > div.dl-chip {
|
|
263
|
+
margin: 0 0 0 8px;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
</style>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<dl-checkbox
|
|
4
|
+
v-model="customValueCheck"
|
|
5
|
+
toggle-indeterminate
|
|
6
|
+
indeterminate-value="maybe"
|
|
7
|
+
false-value="no"
|
|
8
|
+
true-value="yes"
|
|
9
|
+
sub-label="this is a lot of text this is a lot of text this is a lot of text this is a lot of text this is a lot of text this is a lot of text "
|
|
10
|
+
@update:model-value="logValue"
|
|
11
|
+
>
|
|
12
|
+
Indeterminate checkbox component
|
|
13
|
+
</dl-checkbox>
|
|
14
|
+
<dl-checkbox
|
|
15
|
+
v-model="switchValue"
|
|
16
|
+
:value="3"
|
|
17
|
+
label="Option 3"
|
|
18
|
+
@update:model-value="logValue"
|
|
19
|
+
/>
|
|
20
|
+
<dl-checkbox
|
|
21
|
+
v-model="booleanValue"
|
|
22
|
+
label="Boolean v-model"
|
|
23
|
+
@update:model-value="logValue"
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script lang="ts">
|
|
29
|
+
import { defineComponent, ref } from 'vue-demi'
|
|
30
|
+
import { DlCheckbox } from '../components'
|
|
31
|
+
export default defineComponent({
|
|
32
|
+
name: 'DlCheckboxDemo',
|
|
33
|
+
components: {
|
|
34
|
+
DlCheckbox
|
|
35
|
+
},
|
|
36
|
+
setup() {
|
|
37
|
+
const logValue = (newValue: any) => console.log('New value:', newValue)
|
|
38
|
+
const switchValue = ref<number[]>([1, 3])
|
|
39
|
+
const booleanValue = ref(true)
|
|
40
|
+
const customValueCheck = ref('maybe')
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
switchValue,
|
|
44
|
+
booleanValue,
|
|
45
|
+
customValueCheck,
|
|
46
|
+
logValue
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
</script>
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="width: 800px">
|
|
3
|
+
<div
|
|
4
|
+
class="col"
|
|
5
|
+
style="margin-bottom: 30px"
|
|
6
|
+
>
|
|
7
|
+
<DlChip label="Lorem ipsum dolor" />
|
|
8
|
+
<DlChip
|
|
9
|
+
outlined
|
|
10
|
+
label="Chip outlined"
|
|
11
|
+
/>
|
|
12
|
+
<DlChip
|
|
13
|
+
disabled
|
|
14
|
+
label="Chip disabled"
|
|
15
|
+
/>
|
|
16
|
+
<DlChip label="Ellipsed Chip with a multiple words" />
|
|
17
|
+
<DlChip
|
|
18
|
+
label="Ellipsed Chip with a multiple words"
|
|
19
|
+
icon="icon-dl-search"
|
|
20
|
+
/>
|
|
21
|
+
<DlChip
|
|
22
|
+
label="custom max width (200px)"
|
|
23
|
+
icon="icon-dl-search"
|
|
24
|
+
max-width="200px"
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
<h4>Removable Chips</h4>
|
|
28
|
+
<div
|
|
29
|
+
class="col"
|
|
30
|
+
style="margin-bottom: 30px"
|
|
31
|
+
>
|
|
32
|
+
<DlChip
|
|
33
|
+
removable
|
|
34
|
+
label="Chip filled"
|
|
35
|
+
@remove="log"
|
|
36
|
+
/>
|
|
37
|
+
<DlChip
|
|
38
|
+
removable
|
|
39
|
+
outlined
|
|
40
|
+
label="Chip outlined"
|
|
41
|
+
@remove="log"
|
|
42
|
+
/>
|
|
43
|
+
<DlChip
|
|
44
|
+
removable
|
|
45
|
+
disabled
|
|
46
|
+
label="Chip disabled"
|
|
47
|
+
@remove="log"
|
|
48
|
+
/>
|
|
49
|
+
<DlChip
|
|
50
|
+
removable
|
|
51
|
+
label="Ellipsed Chip with a multiple words"
|
|
52
|
+
@remove="log"
|
|
53
|
+
/>
|
|
54
|
+
<DlChip
|
|
55
|
+
removable
|
|
56
|
+
label="custom max width (200px)"
|
|
57
|
+
max-width="200px"
|
|
58
|
+
@remove="log"
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
<h4>Removable Chips with icon</h4>
|
|
62
|
+
<div
|
|
63
|
+
class="col"
|
|
64
|
+
style="margin-bottom: 30px"
|
|
65
|
+
>
|
|
66
|
+
<DlChip
|
|
67
|
+
removable
|
|
68
|
+
icon="icon-dl-search"
|
|
69
|
+
label="Chip filled"
|
|
70
|
+
@remove="log"
|
|
71
|
+
/>
|
|
72
|
+
<DlChip
|
|
73
|
+
removable
|
|
74
|
+
icon="icon-dl-search"
|
|
75
|
+
@remove="log"
|
|
76
|
+
/>
|
|
77
|
+
<DlChip
|
|
78
|
+
removable
|
|
79
|
+
icon="icon-dl-search"
|
|
80
|
+
outlined
|
|
81
|
+
label="Chip outlined"
|
|
82
|
+
@remove="log"
|
|
83
|
+
/>
|
|
84
|
+
<DlChip
|
|
85
|
+
removable
|
|
86
|
+
icon="icon-dl-search"
|
|
87
|
+
disabled
|
|
88
|
+
label="Chip disabled"
|
|
89
|
+
@remove="log"
|
|
90
|
+
/>
|
|
91
|
+
<DlChip
|
|
92
|
+
removable
|
|
93
|
+
label="Ellipsed Chip with a multiple words"
|
|
94
|
+
icon="icon-dl-search"
|
|
95
|
+
@remove="log"
|
|
96
|
+
/>
|
|
97
|
+
<DlChip
|
|
98
|
+
removable
|
|
99
|
+
label="custom max width (200px)"
|
|
100
|
+
icon="icon-dl-search"
|
|
101
|
+
max-width="200px"
|
|
102
|
+
@remove="log"
|
|
103
|
+
/>
|
|
104
|
+
</div>
|
|
105
|
+
<h4>Removable Chips without icon and label</h4>
|
|
106
|
+
<div
|
|
107
|
+
class="col"
|
|
108
|
+
style="margin-bottom: 30px"
|
|
109
|
+
>
|
|
110
|
+
<DlChip
|
|
111
|
+
removable
|
|
112
|
+
@remove="log"
|
|
113
|
+
/>
|
|
114
|
+
<DlChip
|
|
115
|
+
removable
|
|
116
|
+
outlined
|
|
117
|
+
@remove="log"
|
|
118
|
+
/>
|
|
119
|
+
<DlChip
|
|
120
|
+
removable
|
|
121
|
+
disabled
|
|
122
|
+
@remove="log"
|
|
123
|
+
/>
|
|
124
|
+
</div>
|
|
125
|
+
<h4>Chips with icon and without label</h4>
|
|
126
|
+
<div
|
|
127
|
+
class="col"
|
|
128
|
+
style="margin-bottom: 30px"
|
|
129
|
+
>
|
|
130
|
+
<DlChip icon="icon-dl-search" />
|
|
131
|
+
<DlChip
|
|
132
|
+
icon="icon-dl-search"
|
|
133
|
+
outlined
|
|
134
|
+
/>
|
|
135
|
+
<DlChip
|
|
136
|
+
icon="icon-dl-search"
|
|
137
|
+
disabled
|
|
138
|
+
/>
|
|
139
|
+
</div>
|
|
140
|
+
<h4>Chips with overflow</h4>
|
|
141
|
+
<div
|
|
142
|
+
class="col"
|
|
143
|
+
style="margin-bottom: 30px"
|
|
144
|
+
>
|
|
145
|
+
<DlChip
|
|
146
|
+
label="Long Chip Label With Alot Of Text"
|
|
147
|
+
max-width="75px"
|
|
148
|
+
overflow
|
|
149
|
+
/>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</template>
|
|
153
|
+
|
|
154
|
+
<script lang="ts">
|
|
155
|
+
import { defineComponent } from 'vue-demi'
|
|
156
|
+
import { DlChip } from '../components'
|
|
157
|
+
export default defineComponent({
|
|
158
|
+
name: 'DlChipDemo',
|
|
159
|
+
components: {
|
|
160
|
+
DlChip
|
|
161
|
+
},
|
|
162
|
+
setup() {
|
|
163
|
+
const log = (e: Event) => console.log(e)
|
|
164
|
+
return { log }
|
|
165
|
+
}
|
|
166
|
+
})
|
|
167
|
+
</script>
|
|
168
|
+
|
|
169
|
+
<style scoped lang="scss">
|
|
170
|
+
.col {
|
|
171
|
+
width: auto;
|
|
172
|
+
display: flex;
|
|
173
|
+
flex-wrap: wrap;
|
|
174
|
+
min-width: 0;
|
|
175
|
+
max-width: 100%;
|
|
176
|
+
& > button,
|
|
177
|
+
& > div.dl-chip {
|
|
178
|
+
margin: 0 0 0 8px;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<DlColorPicker
|
|
4
|
+
theme="light"
|
|
5
|
+
:color="colorPickerValue"
|
|
6
|
+
:colors-history="colorsHistory"
|
|
7
|
+
@changeColor="onColorChange"
|
|
8
|
+
@updateColor="onColorUpdate"
|
|
9
|
+
/>
|
|
10
|
+
<h1 :style="{ color: colorPickerValue }">
|
|
11
|
+
The chosen color is {{ colorPickerValue }}
|
|
12
|
+
</h1>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script lang="ts">
|
|
17
|
+
import { defineComponent, ref } from 'vue-demi'
|
|
18
|
+
import { DlColorPicker } from '../components'
|
|
19
|
+
import { NewColor } from '../components/DlColorPicker'
|
|
20
|
+
|
|
21
|
+
export default defineComponent({
|
|
22
|
+
name: 'DlColorPickerDemo',
|
|
23
|
+
components: {
|
|
24
|
+
DlColorPicker
|
|
25
|
+
},
|
|
26
|
+
setup() {
|
|
27
|
+
const colorPickerValue = ref('#AF8F8F')
|
|
28
|
+
|
|
29
|
+
const colorsHistory = ref([])
|
|
30
|
+
|
|
31
|
+
const onColorChange = (e: NewColor) => {
|
|
32
|
+
colorPickerValue.value = e.hex
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const onColorUpdate = (e: NewColor) => {
|
|
36
|
+
colorsHistory.value = [
|
|
37
|
+
`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${e.rgba.a})`,
|
|
38
|
+
...colorsHistory.value
|
|
39
|
+
].slice(0, 7)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
</script>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<dl-counters
|
|
4
|
+
:items="[
|
|
5
|
+
{
|
|
6
|
+
value: 123,
|
|
7
|
+
text: 'lorem ipsum'
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
value: 45,
|
|
11
|
+
text: 'ipsum lorem',
|
|
12
|
+
subtext:
|
|
13
|
+
'Cupidatat est labore et nisi do culpa veniam reprehenderit anim consectetur dolor mollit.'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
value: 6789,
|
|
17
|
+
text: 'lorem lorem ipsum',
|
|
18
|
+
subtext: 'Minim exercitation ipsum elit cillum magna.'
|
|
19
|
+
}
|
|
20
|
+
]"
|
|
21
|
+
/>
|
|
22
|
+
<dl-counters
|
|
23
|
+
small
|
|
24
|
+
:items="[
|
|
25
|
+
{
|
|
26
|
+
text: 'lorem ipsum'
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
value: 45,
|
|
30
|
+
text: 'ipsum lorem',
|
|
31
|
+
subtext:
|
|
32
|
+
'Cupidatat est labore et nisi do culpa veniam reprehenderit anim consectetur dolor mollit.'
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
value: 6789,
|
|
36
|
+
text: 'lorem lorem ipsum',
|
|
37
|
+
subtext: 'Minim exercitation ipsum elit cillum magna.'
|
|
38
|
+
}
|
|
39
|
+
]"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script lang="ts">
|
|
45
|
+
import { defineComponent } from 'vue-demi'
|
|
46
|
+
import { DlCounters } from '../components'
|
|
47
|
+
export default defineComponent({
|
|
48
|
+
name: 'DlCounterDemo',
|
|
49
|
+
components: {
|
|
50
|
+
DlCounters
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
</script>
|