@dataloop-ai/components 0.18.102 → 0.18.104

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.18.102",
3
+ "version": "0.18.104",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -333,6 +333,20 @@ export default defineComponent({
333
333
  flat: this.flat,
334
334
  color: this.textColor
335
335
  }),
336
+ '--dl-button-icon-color-hover': setColorOnHover({
337
+ disabled: this.disabled,
338
+ outlined: this.outlined,
339
+ shaded: this.shaded,
340
+ flat: this.flat,
341
+ color: this.getIconColor
342
+ }),
343
+ '--dl-icon-color': setColorOnHover({
344
+ disabled: this.disabled,
345
+ outlined: this.outlined,
346
+ shaded: this.shaded,
347
+ flat: this.flat,
348
+ color: this.getIconColor
349
+ }),
336
350
  '--dl-button-border-hover': setBorderOnHover({
337
351
  disabled: this.disabled,
338
352
  flat: this.flat,
@@ -505,6 +519,9 @@ export default defineComponent({
505
519
 
506
520
  .dl-button-icon {
507
521
  transition: var(--dl-button-text-transition-duration);
522
+ &:hover:enabled:not(:active) {
523
+ color: var(--dl-button-icon-color-hover);
524
+ }
508
525
  }
509
526
 
510
527
  .dl-button-container {
@@ -300,7 +300,7 @@ export default defineComponent({
300
300
  const setInputFromSuggestion = (value: string) => {
301
301
  let stringValue = ''
302
302
  if (searchQuery.value.length) {
303
- const query = searchQuery.value
303
+ let query = searchQuery.value
304
304
  .replace(new RegExp(' ', 'g'), ' ')
305
305
  .split(' ')
306
306
  .map((string: string) => string.trim())
@@ -316,6 +316,14 @@ export default defineComponent({
316
316
  query[query.length - 1] = query[
317
317
  query.length - 1
318
318
  ].replace('.', '')
319
+ } else if (
320
+ value
321
+ .toLowerCase()
322
+ .startsWith(
323
+ query[query.length - 1].toLowerCase()
324
+ )
325
+ ) {
326
+ query = query.slice(0, query.length - 1)
319
327
  }
320
328
  stringValue = [...query, value, ''].join(' ')
321
329
  }
@@ -324,7 +332,14 @@ export default defineComponent({
324
332
  query[query.length - 1] = query[
325
333
  query.length - 1
326
334
  ].replace('.', '')
335
+ } else if (
336
+ value
337
+ .toLowerCase()
338
+ .startsWith(query[query.length - 1].toLowerCase())
339
+ ) {
340
+ query = query.slice(0, query.length - 1)
327
341
  }
342
+
328
343
  stringValue = [...query, value, ''].join(' ')
329
344
  }
330
345
  } else {
@@ -89,7 +89,7 @@ export default defineComponent({
89
89
  cssIconVars(): Record<string, string> {
90
90
  return {
91
91
  '--dl-icon-font-size': `${this.size}`,
92
- '--dl-icon-color': this.color
92
+ '--icon-color': this.color
93
93
  ? // todo: remove this. this is needed for now until the swap of DLBTN in OA
94
94
  getColor(
95
95
  this.color === 'secondary'
@@ -157,7 +157,7 @@ export default defineComponent({
157
157
  <style scoped lang="scss">
158
158
  .dl-icon {
159
159
  display: inline-flex;
160
- color: var(--dl-icon-color);
160
+ color: var(var(--dl-icon-color), var(--color-icon));
161
161
  font-size: var(--dl-icon-font-size);
162
162
  }
163
163
  </style>
@@ -293,6 +293,16 @@
293
293
  outlined
294
294
  />
295
295
  </div>
296
+ <div>
297
+ <h3>hover color</h3>
298
+ <dl-button
299
+ icon="icon-dl-search"
300
+ flat
301
+ dense
302
+ label="test me"
303
+ text-color="red"
304
+ />
305
+ </div>
296
306
  <div>
297
307
  <h3>button with icon color</h3>
298
308
  <dl-button
@@ -25,8 +25,7 @@
25
25
  <dl-tooltip
26
26
  color="rgb(0, 255, 0)"
27
27
  background-color="dl-color-side-panel"
28
- >
29
- lorem ipsum dolor, sit amet consectetur adipisicing elit.
28
+ >lorem ipsum dolor, sit amet consectetur adipisicing elit.
30
29
  Assumenda corporis alias cupiditate natus? Ipsum quos quia
31
30
  temporibus ipsam magnam, alias rerum aut, a quaerat dicta,
32
31
  quasi aperiam facere asperiores saepe.
@@ -1,79 +0,0 @@
1
- <template>
2
- <div
3
- :id="uuid"
4
- class="dl-filters-wrapper"
5
- >
6
- <dl-tabs
7
- v-model="currentTab"
8
- volatile
9
- full-width
10
- :items="tabItems"
11
- font-size="14px"
12
- />
13
- <div class="dl-filters-tabs">
14
- <dl-tab-panels v-model="currentTab">
15
- <dl-tab-panel
16
- v-for="tab in tabItems"
17
- :key="tab.name"
18
- :name="tab.name"
19
- >
20
- <div>
21
- <filters-query
22
- v-for="(query, index) in filters[currentTab]"
23
- :key="index"
24
- :type="currentTab"
25
- :name="query.name"
26
- @select="$emit('filters-select', currentTab, query)"
27
- @delete="$emit('filters-delete', currentTab, query)"
28
- />
29
- </div>
30
- </dl-tab-panel>
31
- </dl-tab-panels>
32
- </div>
33
- </div>
34
- </template>
35
-
36
- <script lang="ts">
37
- import { defineComponent, PropType } from 'vue-demi'
38
- import { DlTabs } from '../../../../DlTabs'
39
- import { DlTabPanels, DlTabPanel } from '../../../../DlTabPanels'
40
- import { Filters } from '../../types'
41
- import { getTabItems } from '../../utils'
42
- import FiltersQuery from './components/FiltersQuery.vue'
43
- import { v4 } from 'uuid'
44
-
45
- export default defineComponent({
46
- components: {
47
- DlTabs,
48
- DlTabPanels,
49
- DlTabPanel,
50
- FiltersQuery
51
- },
52
- props: {
53
- filters: {
54
- type: Object as PropType<Filters>,
55
- default: (): Filters => ({ saved: [], recent: [], suggested: [] })
56
- }
57
- },
58
- emits: ['filters-delete', 'filters-select'],
59
- data() {
60
- return {
61
- uuid: `dl-smart-search-filters-${v4()}`,
62
- currentTab: 'saved'
63
- }
64
- },
65
- computed: {
66
- tabItems(): { label: string; name: string }[] {
67
- return getTabItems(this.filters)
68
- }
69
- }
70
- })
71
- </script>
72
- <style scoped lang="scss">
73
- .dl-filters-wrapper {
74
- min-height: 300px;
75
- }
76
- .dl-filters-tabs {
77
- margin-top: 5px;
78
- }
79
- </style>
@@ -1,100 +0,0 @@
1
- <template>
2
- <div
3
- class="query"
4
- @mouseenter="actionsVisible = true"
5
- @mouseleave="actionsVisible = false"
6
- >
7
- <div
8
- class="query__header"
9
- @mousedown="$emit('select')"
10
- >
11
- <dl-icon :icon="icon" />
12
- <span class="query__header--title">
13
- {{ name }}
14
- </span>
15
- </div>
16
- <div
17
- v-if="actionsVisible"
18
- class="query__actions"
19
- >
20
- <div
21
- class="query__actions--icon"
22
- @mousedown="$emit('delete')"
23
- >
24
- <dl-icon
25
- :inline="false"
26
- size="14px"
27
- icon="icon-dl-delete"
28
- />
29
- <dl-tooltip>Delete</dl-tooltip>
30
- </div>
31
- </div>
32
- </div>
33
- </template>
34
-
35
- <script lang="ts">
36
- import { defineComponent } from 'vue-demi'
37
- import { DlIcon } from '../../../../../../essential'
38
- import { DlTooltip } from '../../../../../../shared'
39
-
40
- export default defineComponent({
41
- components: {
42
- DlIcon,
43
- DlTooltip
44
- },
45
- props: {
46
- type: {
47
- type: String,
48
- default: 'saved'
49
- },
50
- name: {
51
- type: String,
52
- default: ''
53
- }
54
- },
55
- emits: ['delete', 'select'],
56
- data() {
57
- return {
58
- actionsVisible: false
59
- }
60
- },
61
- computed: {
62
- icon(): string {
63
- return this.type === 'saved' ? 'icon-dl-save' : 'icon-dl-time'
64
- }
65
- }
66
- })
67
- </script>
68
-
69
- <style lang="scss" scoped>
70
- .query {
71
- height: 18px;
72
- padding: 5px 10px;
73
- border-radius: 3px;
74
- display: flex;
75
- justify-content: space-between;
76
- color: var(--dl-color-darker);
77
- &__header {
78
- cursor: pointer;
79
- display: flex;
80
- align-items: center;
81
- &--title {
82
- font-size: 12px;
83
- margin: 0px 12px;
84
- }
85
- }
86
-
87
- &__actions {
88
- display: flex;
89
- align-items: center;
90
- &--icon {
91
- cursor: pointer;
92
- margin: 0px 5px;
93
- }
94
- }
95
-
96
- &:hover {
97
- background-color: var(--dl-color-fill);
98
- }
99
- }
100
- </style>
@@ -1,124 +0,0 @@
1
- <!-- <template>
2
- <dl-button
3
- class="dl-smart-search__buttons--filters"
4
- shaded
5
- outlined
6
- size="s"
7
- >
8
- Saved Filters
9
- <dl-menu
10
- v-model="filtersModel"
11
- :offset="[0, 5]"
12
- anchor="bottom middle"
13
- self="top middle"
14
- >
15
- <dl-smart-search-filters
16
- :filters="filters"
17
- @filters-select="handleFiltersSelect"
18
- @filters-delete="handleFiltersDelete"
19
- />
20
- </dl-menu>
21
- </dl-button>
22
- </template>
23
-
24
- <script lang="ts">
25
- import {
26
- defineComponent,
27
- ref,
28
- watch,
29
- PropType,
30
- toRefs,
31
- computed
32
- } from 'vue-demi'
33
- import { DlSelect } from '../../../DlSelect'
34
- import { DlSelectOption } from '../../../DlSelect/types'
35
- import { DlButton } from '../../../../basic'
36
- import { DlDialogBox, DlDialogBoxHeader } from '../../../DlDialogBox'
37
- import { DlJsonEditor } from '../../../DlJsonEditor'
38
- import { DlTypography } from '../../../../essential'
39
- import { DlInput } from '../../../DlInput'
40
-
41
- export default defineComponent({
42
- components: {
43
- DlDialogBox,
44
- DlDialogBoxHeader,
45
- DlJsonEditor,
46
- DlButton,
47
- DlSelect,
48
- DlTypography,
49
- DlInput
50
- },
51
- model: {
52
- prop: 'modelValue',
53
- event: 'update:modelValue'
54
- },
55
- props: {
56
- modelValue: {
57
- required: false,
58
- type: Boolean,
59
- default: false
60
- },
61
- json: {
62
- required: true,
63
- type: String
64
- },
65
- options: {
66
- required: true,
67
- type: Array as PropType<DlSelectOption[]>,
68
- default: () => [] as DlSelectOption[]
69
- }
70
- },
71
- emits: ['update:modelValue', 'search', 'update:json', 'save', 'delete'],
72
- setup(props, { emit }) {
73
- const { modelValue, options, json } = toRefs(props)
74
-
75
- const isOpen = computed({
76
- get: () => modelValue.value,
77
- set: (val) => emit('update:modelValue', val)
78
- })
79
-
80
- const jsonEditor = ref<typeof DlJsonEditor>(null)
81
- const showSaveDialog = ref(false)
82
- const showDeleteDialog = ref(false)
83
- const stringifiedJSON = ref(json.value)
84
- const newQueryName = ref('')
85
- const selectedOption = ref<DlSelectOption>(
86
- options.value.find((o) => o.value === json.value) ?? {
87
- label: 'New Query',
88
- value: json.value
89
- }
90
- )
91
-
92
- const canDelete = computed(
93
- () =>
94
- !options.value?.filter(
95
- (q: DlSelectOption) => q.value === stringifiedJSON
96
- ).length
97
- )
98
-
99
- const alignJSON = () => {
100
- jsonEditor.value.format()
101
- }
102
-
103
- const onQuerySelect = (option: DlSelectOption) => {
104
- selectedOption.value = option
105
- stringifiedJSON.value = option.value
106
- }
107
-
108
- return {
109
- isOpen,
110
- jsonEditor,
111
- showSaveDialog,
112
- stringifiedJSON,
113
- selectedOption,
114
- canDelete,
115
- alignJSON,
116
- onQuerySelect,
117
- newQueryName,
118
- showDeleteDialog
119
- }
120
- }
121
- })
122
- </script>
123
-
124
- <style scoped lang="scss"></style> -->