quasar-ui-danx 0.2.28 → 0.2.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/dist/danx.es.js +1265 -1125
  2. package/dist/danx.es.js.map +1 -1
  3. package/dist/danx.umd.js +5 -5
  4. package/dist/danx.umd.js.map +1 -1
  5. package/dist/style.css +1 -1
  6. package/package.json +1 -1
  7. package/src/components/ActionTable/ActionTable.vue +1 -1
  8. package/src/components/ActionTable/Columns/ColumnListItem.vue +2 -2
  9. package/src/components/ActionTable/Columns/TitleColumnFormat.vue +1 -1
  10. package/src/components/ActionTable/Columns/VisibleColumnsToggleButtons.vue +1 -1
  11. package/src/components/ActionTable/Filters/FilterFieldItem.vue +1 -1
  12. package/src/components/ActionTable/Filters/FilterListToggle.vue +14 -3
  13. package/src/components/ActionTable/Form/Fields/EditableDiv.vue +1 -1
  14. package/src/components/ActionTable/Form/Fields/FieldLabel.vue +1 -1
  15. package/src/components/ActionTable/Form/Fields/InlineDateTimeField.vue +2 -2
  16. package/src/components/ActionTable/Form/Fields/MultiFileField.vue +2 -2
  17. package/src/components/ActionTable/Form/Fields/MultiKeywordField.vue +1 -1
  18. package/src/components/ActionTable/Form/Fields/SelectDrawer.vue +1 -1
  19. package/src/components/ActionTable/Form/Fields/SelectWithChildrenField.vue +2 -2
  20. package/src/components/ActionTable/Form/Fields/SingleFileField.vue +2 -2
  21. package/src/components/ActionTable/Form/Fields/TextField.vue +1 -1
  22. package/src/components/ActionTable/Form/Fields/WysiwygField.vue +1 -1
  23. package/src/components/ActionTable/TableSummaryRow.vue +2 -2
  24. package/src/components/ActionTable/tableColumns.ts +4 -2
  25. package/src/components/AuditHistory/AuditHistoryItem.vue +3 -3
  26. package/src/components/PanelsDrawer/PanelsDrawerPanels.vue +1 -1
  27. package/src/components/Utility/Controls/PreviousNextControls.vue +2 -2
  28. package/src/components/Utility/Dialogs/ConfirmDialog.vue +3 -3
  29. package/src/components/Utility/Dialogs/FullScreenDialog.vue +1 -1
  30. package/src/components/Utility/Dialogs/InfoDialog.vue +3 -3
  31. package/src/components/Utility/Files/FilePreview.vue +4 -4
  32. package/src/components/Utility/Tabs/BadgeTab.vue +1 -1
  33. package/src/components/Utility/Tabs/IndicatorTab.vue +2 -2
  34. package/src/helpers/formats.ts +11 -3
  35. package/src/styles/actions.scss +1 -1
@@ -6,7 +6,7 @@
6
6
  </slot>
7
7
  <span
8
8
  v-if="requiredLabel"
9
- class="text-red-dark ml-1 text-xs bottom-1 relative"
9
+ class="text-red-900 ml-1 text-xs bottom-1 relative"
10
10
  >{{ requiredLabel }}</span>
11
11
  </span>
12
12
  </template>
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div class="inline-block">
3
3
  <div
4
- class="cursor-pointer py-2 hover:bg-blue-light flex items-center justify-end"
4
+ class="cursor-pointer py-2 hover:bg-blue-200 flex items-center justify-end"
5
5
  >
6
6
  {{ fLocalizedDateTime(modelValue, { empty: "Never" }) }}
7
- <EditIcon class="w-4 font-bold ml-2 text-gray-base" />
7
+ <EditIcon class="w-4 font-bold ml-2 text-gray-400" />
8
8
  <QPopupEdit
9
9
  v-slot="scope"
10
10
  :model-value="modelValue"
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  class="max-w-full relative overflow-auto"
4
- :class="{'p-4 border rounded border-gray-medium': !readonly}"
4
+ :class="{'p-4 border rounded border-gray-300': !readonly}"
5
5
  @dragover.prevent
6
6
  @drop.prevent="onDrop"
7
7
  >
@@ -20,7 +20,7 @@
20
20
  >Upload</a>
21
21
  <a
22
22
  v-if="uploadedFiles.length > 0"
23
- class="ml-3 text-red-dark"
23
+ class="ml-3 text-red-900"
24
24
  @click="onClear"
25
25
  >Clear</a>
26
26
  <input
@@ -11,7 +11,7 @@
11
11
  v-model="textInput"
12
12
  :field="field"
13
13
  :no-label="!field.label"
14
- label-class="text-xs font-bold text-gray-dark"
14
+ label-class="text-xs font-bold text-zinc-800"
15
15
  parent-class="tight-label"
16
16
  input-class="!py-0"
17
17
  dense
@@ -10,7 +10,7 @@
10
10
  v-for="option in formattedOptions"
11
11
  :key="'select-drawer-' + option.value"
12
12
  :data-dusk="'drawer-opt-' + option.value"
13
- class="cursor-pointer hover:bg-gray-light px-8 py-3 flex items-center border-b border-gray-light"
13
+ class="cursor-pointer hover:bg-slate-200 px-8 py-3 flex items-center border-b border-slate-200"
14
14
  @click="toggleSelect(option)"
15
15
  >
16
16
  <QCheckbox
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div>
3
3
  <template v-if="!loading && !options.length">
4
- <div class="text-gray-silver">No options available</div>
4
+ <div class="text-zinc-500">No options available</div>
5
5
  </template>
6
6
  <SelectField
7
7
  v-model="selectedOption"
@@ -22,7 +22,7 @@
22
22
  @update:model-value="onSelectChild(child)"
23
23
  >
24
24
  <div>{{ child.label }}</div>
25
- <div class="text-xs text-gray-silver">{{ child.name }}</div>
25
+ <div class="text-xs text-zinc-500">{{ child.name }}</div>
26
26
  </QCheckbox>
27
27
  </div>
28
28
  </div>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  class="max-w-full relative overflow-auto"
4
- :class="{'p-4 border rounded border-gray-medium text-center': !readonly}"
4
+ :class="{'p-4 border rounded border-gray-300 text-center': !readonly}"
5
5
  @dragover.prevent
6
6
  @drop.prevent="onDrop"
7
7
  >
@@ -20,7 +20,7 @@
20
20
  >Upload</a>
21
21
  <a
22
22
  v-if="uploadedFile"
23
- class="ml-3 text-red-dark"
23
+ class="ml-3 text-red-900"
24
24
  @click="onClear"
25
25
  >Clear</a>
26
26
  <input
@@ -60,7 +60,7 @@ defineProps({
60
60
  },
61
61
  labelClass: {
62
62
  type: String,
63
- default: "text-sm text-gray-shadow"
63
+ default: "text-sm text-gray-700"
64
64
  },
65
65
  parentClass: {
66
66
  type: String,
@@ -4,7 +4,7 @@
4
4
  v-if="!noLabel"
5
5
  :field="field"
6
6
  :show-name="showName"
7
- class="text-sm font-semibold text-gray-shadow block mb-2"
7
+ class="text-sm font-semibold text-gray-700 block mb-2"
8
8
  />
9
9
  <template v-if="readonly">
10
10
  <div
@@ -1,12 +1,12 @@
1
1
  <template>
2
2
  <QTr
3
3
  class="sticky-column-1 transition-all sticky-row"
4
- :class="{'!bg-neutral-plus-7': !selectedCount, '!bg-blue-600 text-white selected': selectedCount, 'opacity-50': loading}"
4
+ :class="{'!bg-gray-100': !selectedCount, '!bg-blue-600 text-white selected': selectedCount, 'opacity-50': loading}"
5
5
  >
6
6
  <QTd
7
7
  :colspan="stickyColspan"
8
8
  class="font-bold transition-all"
9
- :class="{'!bg-neutral-plus-7 !pl-5': !selectedCount, '!bg-blue-600 text-white !pl-4': selectedCount}"
9
+ :class="{'!bg-gray-100 !pl-5': !selectedCount, '!bg-blue-600 text-white !pl-4': selectedCount}"
10
10
  >
11
11
  <div class="flex flex-nowrap items-center">
12
12
  <div
@@ -9,7 +9,9 @@ export interface TableColumn {
9
9
  field: string,
10
10
  format?: Function,
11
11
  innerClass?: string | object,
12
- isSaving?: boolean,
12
+ style?: string,
13
+ headerStyle?: string,
14
+ isSaving?: boolean | Function,
13
15
  label: string,
14
16
  maxWidth?: number,
15
17
  minWidth?: number,
@@ -20,7 +22,7 @@ export interface TableColumn {
20
22
  sortable?: boolean,
21
23
  sortBy?: string,
22
24
  sortByExpression?: string,
23
- titleColumns?: string[]
25
+ titleColumns?: Function,
24
26
  vnode?: Function,
25
27
  }
26
28
 
@@ -1,15 +1,15 @@
1
1
  <template>
2
- <div class="text-gray-shadow flex items-stretch flex-nowrap p-4">
2
+ <div class="text-gray-700 flex items-stretch flex-nowrap p-4">
3
3
  <div class="flex-grow text-sm w-3/5 overflow-auto">
4
4
  <h5>{{ change.label }} ({{ change.name }})</h5>
5
5
  <div class="flex flex-nowrap items-center mt-4">
6
- <div class="bg-red-light line-through p-2">
6
+ <div class="bg-red-200 line-through p-2">
7
7
  <AuditHistoryItemValue
8
8
  :type="change.type"
9
9
  :value="change.oldValue"
10
10
  />
11
11
  </div>
12
- <div class="bg-green-plus-4 ml-2.5 p-2">
12
+ <div class="bg-emerald-200 ml-2.5 p-2">
13
13
  <AuditHistoryItemValue
14
14
  :type="change.type"
15
15
  :value="change.newValue"
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <QTabPanels
3
3
  :model-value="activePanel"
4
- class="overflow-y-auto bg-neutral-plus-7 h-full transition-all"
4
+ class="overflow-y-auto bg-gray-100 h-full transition-all"
5
5
  >
6
6
  <QTabPanel v-for="panel in panels" :key="panel.name" :name="panel.name">
7
7
  <RenderVnode
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="previous-next-controls">
3
3
  <QBtn
4
- class="bg-slate-200 border-neutral-plus-4 border border-solid !rounded-r-none !p-2 !min-w-0"
4
+ class="bg-slate-200 border-gray-300 border border-solid !rounded-r-none !p-2 !min-w-0"
5
5
  :disable="isLoading"
6
6
  :loading="isLoading"
7
7
  @click="$emit('next', -1)"
@@ -9,7 +9,7 @@
9
9
  <SkipPreviousIcon class="w-6" />
10
10
  </QBtn>
11
11
  <QBtn
12
- class="bg-slate-200 border-neutral-plus-4 border border-solid border-l-0 !rounded-l-none !p-2 !min-w-0"
12
+ class="bg-slate-200 border-gray-300 border border-solid border-l-0 !rounded-l-none !p-2 !min-w-0"
13
13
  :disable="isLoading"
14
14
  :loading="isLoading"
15
15
  @click="$emit('next', 1)"
@@ -10,7 +10,7 @@
10
10
  <QCard class="flex flex-col flex-nowrap">
11
11
  <QCardSection
12
12
  v-if="title || $slots.title"
13
- class="pl-6 pr-10 border-b border-gray-medium"
13
+ class="pl-6 pr-10 border-b border-gray-300"
14
14
  >
15
15
  <h3
16
16
  class="font-normal flex items-center"
@@ -29,12 +29,12 @@
29
29
  </QCardSection>
30
30
  <QCardSection
31
31
  v-if="content || $slots.default"
32
- class="px-6 bg-neutral-plus-7 flex-grow max-h-full overflow-y-auto"
32
+ class="px-6 bg-gray-100 flex-grow max-h-full overflow-y-auto"
33
33
  :class="contentClass"
34
34
  >
35
35
  <slot>{{ content }}</slot>
36
36
  </QCardSection>
37
- <div class="flex px-6 py-4 border-t border-gray-medium">
37
+ <div class="flex px-6 py-4 border-t border-gray-300">
38
38
  <div class="flex-grow">
39
39
  <QBtn
40
40
  :label="cancelText"
@@ -34,7 +34,7 @@ const props = defineProps({
34
34
  let computedClass = computed(() => {
35
35
  return {
36
36
  "bg-blue-600 text-white": props.blue,
37
- "bg-white text-gray-base": !props.blue,
37
+ "bg-white text-gray-400": !props.blue,
38
38
  "items-center": props.center
39
39
  };
40
40
  });
@@ -10,7 +10,7 @@
10
10
  <QCard class="flex flex-col flex-nowrap">
11
11
  <QCardSection
12
12
  v-if="title || $slots.title"
13
- class="pl-6 pr-10 border-b border-gray-medium"
13
+ class="pl-6 pr-10 border-b border-gray-300"
14
14
  >
15
15
  <h3
16
16
  class="font-normal flex items-center"
@@ -26,12 +26,12 @@
26
26
  </QCardSection>
27
27
  <QCardSection
28
28
  v-if="content || $slots.default"
29
- class="px-6 bg-neutral-plus-7 flex-grow max-h-full overflow-y-auto"
29
+ class="px-6 bg-gray-100 flex-grow max-h-full overflow-y-auto"
30
30
  >
31
31
  <slot>{{ content }}</slot>
32
32
  </QCardSection>
33
33
  <div
34
- class="flex items-center justify-center px-6 py-4 border-t border-gray-medium"
34
+ class="flex items-center justify-center px-6 py-4 border-t border-gray-300"
35
35
  >
36
36
  <div class="flex-grow text-right">
37
37
  <QBtn
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="relative flex justify-center bg-neutral-plus-7" :class="{'rounded-2xl': !square}">
2
+ <div class="relative flex justify-center bg-gray-100" :class="{'rounded-2xl': !square}">
3
3
  <template v-if="computedImage">
4
4
  <div
5
5
  class="grow h-full overflow-hidden"
@@ -52,7 +52,7 @@
52
52
  <QLinearProgress
53
53
  :value="image.progress"
54
54
  size="15px"
55
- color="green-base"
55
+ color="green-600"
56
56
  stripe
57
57
  />
58
58
  </div>
@@ -61,7 +61,7 @@
61
61
  <slot name="missing">
62
62
  <component
63
63
  :is="missingIcon"
64
- class="w-full h-full p-2 text-gray-medium"
64
+ class="w-full h-full p-2 text-gray-300"
65
65
  />
66
66
  </slot>
67
67
  </template>
@@ -80,7 +80,7 @@
80
80
  <QBtn
81
81
  v-if="removable"
82
82
  size="sm"
83
- class="bg-red-dark text-white !p-1 opacity-50 hover:opacity-100"
83
+ class="bg-red-900 text-white !p-1 opacity-50 hover:opacity-100"
84
84
  @click.stop="onRemove"
85
85
  >
86
86
  <div v-if="isConfirmingRemove" class="font-bold text-[1rem] leading-[1.2rem]">?</div>
@@ -7,7 +7,7 @@
7
7
  <div class="flex items-center w-full">
8
8
  <div class="flex-grow text-sm">{{ label }}</div>
9
9
  <QBadge
10
- class="bg-gray-base"
10
+ class="bg-gray-400"
11
11
  :label="count"
12
12
  rounded
13
13
  />
@@ -10,11 +10,11 @@
10
10
  <OverdueIcon
11
11
  v-if="overdue"
12
12
  class="w-5 ml-2"
13
- :class="isActive ? 'text-white' : 'text-red-danger'"
13
+ :class="isActive ? 'text-white' : 'text-red-400'"
14
14
  />
15
15
  <WarningIcon
16
16
  v-else-if="warning"
17
- class="text-yellow-warning w-5"
17
+ class="text-yellow-600 w-5"
18
18
  />
19
19
  </div>
20
20
  </div>
@@ -166,20 +166,28 @@ export function centerTruncate(str, maxLength) {
166
166
  }
167
167
  }
168
168
 
169
+ interface FPercentOptions {
170
+ multiplier?: number,
171
+ maximumFractionDigits?: number,
172
+ NaN?: string
173
+ }
174
+
169
175
  /**
170
176
  * Formats a number into a percentage
171
177
  * @param num
172
178
  * @param options
173
179
  * @returns {string}
174
180
  */
175
- export function fPercent(num, options = { multiplier: 100, maximumFractionDigits: 1, NaN: "N/A" }) {
176
- num = parseFloat(num);
181
+ export function fPercent(num: string | number, options: FPercentOptions = {}) {
182
+ options = { multiplier: 100, maximumFractionDigits: 1, NaN: "N/A", ...options };
183
+
184
+ num = parseFloat("" + num);
177
185
 
178
186
  if (isNaN(num)) {
179
187
  return options.NaN;
180
188
  }
181
189
 
182
- return fNumber(num * options.multiplier, options) + "%";
190
+ return fNumber(num * (options.multiplier || 100), options) + "%";
183
191
  }
184
192
 
185
193
 
@@ -5,6 +5,6 @@
5
5
  outline: 1px solid transparent;
6
6
 
7
7
  &:hover {
8
- @apply bg-blue-light outline outline-blue-600;
8
+ @apply bg-blue-200 outline outline-blue-600;
9
9
  }
10
10
  }