@inriver/inri 1.27.0 → 1.29.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/.changeset/lucky-baboons-watch.md +5 -0
- package/.changeset/witty-trains-attend.md +5 -0
- package/CHANGELOG.md +33 -0
- package/configs/base-tailwind-config.js +2 -0
- package/package.json +1 -1
- package/src/components/CSelect.vue +34 -3
- package/src/plugins/validationRules.ts +1 -1
- package/src/styles/_css-variables.scss +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# @inriver/inri
|
|
2
2
|
|
|
3
|
+
## 1.29.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Update documentation
|
|
8
|
+
- Wallop font is now included in the package
|
|
9
|
+
- Updating README and exporting tailwing config
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Fix CSelect placeholder color. Modularize Sass imports. Include inri typings when bundling
|
|
14
|
+
- Fix Sass warnings and errors by removing usage of @apply and updating Quasar + sass dependencies
|
|
15
|
+
- Add support for showing tooltips when hovering over CSelect and options. Add disable support and styling. Fix required validation to work with empty arrays.
|
|
16
|
+
- Add support for hiding the sidebars in CLayoutWithSidebars. Add support for entering a custom title in CLayoutWithSidebars
|
|
17
|
+
- Add support for showing placeholder ()in CSelect eoutside of use-input mode
|
|
18
|
+
- Fix error when CSelect is passed object options with falsy values
|
|
19
|
+
|
|
20
|
+
## 1.28.0
|
|
21
|
+
|
|
22
|
+
### Minor Changes
|
|
23
|
+
|
|
24
|
+
- Update documentation
|
|
25
|
+
- Wallop font is now included in the package
|
|
26
|
+
- Updating README and exporting tailwing config
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Fix CSelect placeholder color. Modularize Sass imports. Include inri typings when bundling
|
|
31
|
+
- Fix Sass warnings and errors by removing usage of @apply and updating Quasar + sass dependencies
|
|
32
|
+
- Add support for hiding the sidebars in CLayoutWithSidebars. Add support for entering a custom title in CLayoutWithSidebars
|
|
33
|
+
- Add support for showing placeholder ()in CSelect eoutside of use-input mode
|
|
34
|
+
- Fix error when CSelect is passed object options with falsy values
|
|
35
|
+
|
|
3
36
|
## 1.27.0
|
|
4
37
|
|
|
5
38
|
### Minor Changes
|
|
@@ -31,6 +31,7 @@ export const baseTailwindConfig = {
|
|
|
31
31
|
green: 'var(--color-green)',
|
|
32
32
|
'green-light': 'var(--color-green-light)',
|
|
33
33
|
'green-light-30': 'var(--color-green-light-30)',
|
|
34
|
+
'green-light-60': 'var(--color-green-light-60)',
|
|
34
35
|
|
|
35
36
|
primary: 'var(--q-primary)',
|
|
36
37
|
'on-primary': 'var(--on-primary-color)',
|
|
@@ -90,6 +91,7 @@ export const baseTailwindConfig = {
|
|
|
90
91
|
'bg-yellow-light',
|
|
91
92
|
'bg-green-light',
|
|
92
93
|
'bg-green-light-30',
|
|
94
|
+
'bg-green-light-60',
|
|
93
95
|
|
|
94
96
|
'text-blue-light',
|
|
95
97
|
'text-purple-light',
|
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
:model-value="modelValue"
|
|
6
6
|
v-bind="dense ? $inri.inputDense : $inri.input"
|
|
7
7
|
:options="internalOptions"
|
|
8
|
+
:disable="disable"
|
|
8
9
|
:multiple="multiple"
|
|
9
10
|
:use-input="dense || useInput"
|
|
10
11
|
:placeholder="selectedPlaceholder"
|
|
@@ -18,11 +19,23 @@
|
|
|
18
19
|
@update:model-value="onModelUpdate"
|
|
19
20
|
>
|
|
20
21
|
<template
|
|
21
|
-
v-if="!useInput && (modelValue === undefined || modelValue === null)"
|
|
22
|
+
v-if="!useInput && (modelValue === undefined || modelValue === null || (Array.isArray(modelValue) && !modelValue.length))"
|
|
22
23
|
#selected
|
|
23
24
|
>
|
|
24
|
-
<div
|
|
25
|
+
<div
|
|
26
|
+
class="text-grey"
|
|
27
|
+
:class="{
|
|
28
|
+
'w-full': placeholderFullWidth,
|
|
29
|
+
'pointer-events-auto cursor-not-allowed': disable
|
|
30
|
+
}"
|
|
31
|
+
>
|
|
25
32
|
{{ selectedPlaceholder }}
|
|
33
|
+
<c-tooltip
|
|
34
|
+
v-if="placeholderTooltip"
|
|
35
|
+
:offset="[24, 24]"
|
|
36
|
+
>
|
|
37
|
+
{{ placeholderTooltip }}
|
|
38
|
+
</c-tooltip>
|
|
26
39
|
</div>
|
|
27
40
|
</template>
|
|
28
41
|
|
|
@@ -58,6 +71,7 @@
|
|
|
58
71
|
<q-item
|
|
59
72
|
v-if="multiple"
|
|
60
73
|
v-bind="itemProps"
|
|
74
|
+
:class="!itemProps.disable || 'pointer-events-auto cursor-not-allowed'"
|
|
61
75
|
>
|
|
62
76
|
<q-item-section>
|
|
63
77
|
<q-checkbox
|
|
@@ -68,16 +82,25 @@
|
|
|
68
82
|
@click="toggleOption(opt)"
|
|
69
83
|
/>
|
|
70
84
|
</q-item-section>
|
|
85
|
+
|
|
86
|
+
<c-tooltip v-if="opt?.tooltip">
|
|
87
|
+
{{ opt.tooltip }}
|
|
88
|
+
</c-tooltip>
|
|
71
89
|
</q-item>
|
|
72
90
|
|
|
73
91
|
<!-- single -->
|
|
74
92
|
<q-item
|
|
75
93
|
v-else
|
|
76
94
|
v-bind="itemProps"
|
|
95
|
+
:class="!itemProps.disable || 'pointer-events-auto cursor-not-allowed'"
|
|
77
96
|
>
|
|
78
97
|
<q-item-section>
|
|
79
98
|
{{ getOptionLabel(opt) }}
|
|
80
99
|
</q-item-section>
|
|
100
|
+
|
|
101
|
+
<c-tooltip v-if="opt?.tooltip">
|
|
102
|
+
{{ opt.tooltip }}
|
|
103
|
+
</c-tooltip>
|
|
81
104
|
</q-item>
|
|
82
105
|
</template>
|
|
83
106
|
</q-select>
|
|
@@ -104,6 +127,7 @@ const props = defineProps({
|
|
|
104
127
|
type: Array,
|
|
105
128
|
default: () => [],
|
|
106
129
|
},
|
|
130
|
+
disable: Boolean,
|
|
107
131
|
multiple: Boolean,
|
|
108
132
|
dense: Boolean,
|
|
109
133
|
useInput: Boolean,
|
|
@@ -120,6 +144,11 @@ const props = defineProps({
|
|
|
120
144
|
type: String,
|
|
121
145
|
default: undefined,
|
|
122
146
|
},
|
|
147
|
+
placeholderFullWidth: Boolean,
|
|
148
|
+
placeholderTooltip: {
|
|
149
|
+
type: String,
|
|
150
|
+
default: undefined,
|
|
151
|
+
},
|
|
123
152
|
})
|
|
124
153
|
|
|
125
154
|
// State etc.
|
|
@@ -142,7 +171,9 @@ const selectedPlaceholder = computed(() => {
|
|
|
142
171
|
})
|
|
143
172
|
|
|
144
173
|
function getOptionLabel (opt) {
|
|
145
|
-
return opt
|
|
174
|
+
return typeof opt === 'object' && opt !== null && props.optionLabel in opt
|
|
175
|
+
? opt[props.optionLabel]
|
|
176
|
+
: opt
|
|
146
177
|
}
|
|
147
178
|
|
|
148
179
|
function filter (val, update) {
|
|
@@ -8,7 +8,7 @@ const $t = i18n.global.t
|
|
|
8
8
|
*/
|
|
9
9
|
export function required (msg?: string) {
|
|
10
10
|
return (value): true | string => {
|
|
11
|
-
return !!value || msg || $t('inri.validation.required')
|
|
11
|
+
return (Array.isArray(value) ? value.length > 0 : !!value) || msg || $t('inri.validation.required')
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
--color-green: #00b06e;
|
|
24
24
|
--color-green-light: #66d0a8;
|
|
25
25
|
--color-green-light-30: rgba(102,208,168,0.3);
|
|
26
|
+
--color-green-light-60: rgba(102,208,168,0.6);
|
|
26
27
|
--color-green-10: #e5f7f0;
|
|
27
28
|
|
|
28
29
|
// Surface is a special color defined in Material Design but not part of Quasar. We still want to use it though.
|