@globalbrain/sefirot 0.71.0 → 0.72.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/CHANGELOG.md +8 -0
- package/lib/components/SInputCheckbox.vue +4 -0
- package/lib/components/SInputCheckboxes.vue +5 -1
- package/lib/components/SInputRadio.vue +4 -1
- package/lib/components/SInputRadios.vue +2 -2
- package/lib/components/SInputSelect.vue +35 -19
- package/lib/components/SSheetHeaderTitle.vue +1 -1
- package/lib/components/SSheetMedium.vue +1 -11
- package/lib/components/icons/SIconCopy.vue +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
# [0.72.0](https://github.com/globalbrain/sefirot/compare/v0.71.0...v0.72.0) (2021-12-01)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
* **icon:** add `copy` icon ([#109](https://github.com/globalbrain/sefirot/issues/109)) ([a5dfd72](https://github.com/globalbrain/sefirot/commit/a5dfd726691baecc454efb7b14c9b0028305577b))
|
|
6
|
+
* **input-select:** add `small` size and `nullable` option ([b416612](https://github.com/globalbrain/sefirot/commit/b416612e8c2881920499dc36deb7f7c2b74d9bd3))
|
|
7
|
+
* **input-checkbox:** add size option to input checkbox ([cfddd90](https://github.com/globalbrain/sefirot/commit/cfddd9003685a4b4984f69bafaead92bc84219e3))
|
|
8
|
+
|
|
1
9
|
# [0.71.0](https://github.com/globalbrain/sefirot/compare/v0.70.1...v0.71.0) (2021-11-18)
|
|
2
10
|
|
|
3
11
|
### Features
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<SInputBase
|
|
3
3
|
class="SInputCheckbox"
|
|
4
|
+
:class="[size]"
|
|
4
5
|
:name="name"
|
|
5
6
|
:label="label"
|
|
6
7
|
:note="note"
|
|
@@ -27,6 +28,8 @@ import { Validation } from '../validation/Validation'
|
|
|
27
28
|
import SIconCheck from './icons/SIconCheck.vue'
|
|
28
29
|
import SInputBase from './SInputBase.vue'
|
|
29
30
|
|
|
31
|
+
type Size = 'mini' | 'small' | 'medium'
|
|
32
|
+
|
|
30
33
|
export default defineComponent({
|
|
31
34
|
components: {
|
|
32
35
|
SIconCheck,
|
|
@@ -39,6 +42,7 @@ export default defineComponent({
|
|
|
39
42
|
},
|
|
40
43
|
|
|
41
44
|
props: {
|
|
45
|
+
size: { type: String as PropType<Size>, default: 'small' },
|
|
42
46
|
name: { type: String, default: null },
|
|
43
47
|
label: { type: String, default: null },
|
|
44
48
|
note: { type: String, default: null },
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<SInputBase
|
|
3
3
|
class="SInputCheckboxes"
|
|
4
|
+
:class="[size]"
|
|
4
5
|
:name="name"
|
|
5
6
|
:label="label"
|
|
6
7
|
:note="note"
|
|
@@ -21,10 +22,12 @@
|
|
|
21
22
|
</template>
|
|
22
23
|
|
|
23
24
|
<script lang="ts">
|
|
24
|
-
import { defineComponent } from '@vue/composition-api'
|
|
25
|
+
import { PropType, defineComponent } from '@vue/composition-api'
|
|
25
26
|
import SInputBase from './SInputBase.vue'
|
|
26
27
|
import SInputCheckbox from './SInputCheckbox.vue'
|
|
27
28
|
|
|
29
|
+
type Size = 'mini' | 'small' | 'medium'
|
|
30
|
+
|
|
28
31
|
export default defineComponent({
|
|
29
32
|
components: {
|
|
30
33
|
SInputBase,
|
|
@@ -37,6 +40,7 @@ export default defineComponent({
|
|
|
37
40
|
},
|
|
38
41
|
|
|
39
42
|
props: {
|
|
43
|
+
size: { type: String as PropType<Size>, default: 'small' },
|
|
40
44
|
name: { type: String, default: null },
|
|
41
45
|
label: { type: String, default: null },
|
|
42
46
|
note: { type: String, default: null },
|
|
@@ -19,9 +19,11 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script lang="ts">
|
|
22
|
-
import { defineComponent } from '@vue/composition-api'
|
|
22
|
+
import { PropType, defineComponent } from '@vue/composition-api'
|
|
23
23
|
import SInputBase from './SInputBase.vue'
|
|
24
24
|
|
|
25
|
+
type Size = 'mini' | 'small' | 'medium'
|
|
26
|
+
|
|
25
27
|
export default defineComponent({
|
|
26
28
|
components: {
|
|
27
29
|
SInputBase
|
|
@@ -33,6 +35,7 @@ export default defineComponent({
|
|
|
33
35
|
},
|
|
34
36
|
|
|
35
37
|
props: {
|
|
38
|
+
size: { type: String as PropType<Size>, default: 'small' },
|
|
36
39
|
name: { type: String, default: null },
|
|
37
40
|
label: { type: String, default: null },
|
|
38
41
|
note: { type: String, default: null },
|
|
@@ -26,7 +26,7 @@ import { PropType, defineComponent } from '@vue/composition-api'
|
|
|
26
26
|
import SInputBase from './SInputBase.vue'
|
|
27
27
|
import SInputRadio from './SInputRadio.vue'
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
type Size = 'mini' | 'small' | 'medium'
|
|
30
30
|
|
|
31
31
|
export default defineComponent({
|
|
32
32
|
components: {
|
|
@@ -40,7 +40,7 @@ export default defineComponent({
|
|
|
40
40
|
},
|
|
41
41
|
|
|
42
42
|
props: {
|
|
43
|
-
size: { type: String as PropType<Size>, default: '
|
|
43
|
+
size: { type: String as PropType<Size>, default: 'small' },
|
|
44
44
|
name: { type: String, default: null },
|
|
45
45
|
label: { type: String, default: null },
|
|
46
46
|
note: { type: String, default: null },
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
@change="emitChange"
|
|
21
21
|
>
|
|
22
22
|
<option
|
|
23
|
-
v-if="placeholder"
|
|
24
|
-
value=""
|
|
23
|
+
v-if="placeholder || nullable"
|
|
24
|
+
:value="JSON.stringify({ value: null })"
|
|
25
25
|
:selected="isNotSelected"
|
|
26
|
-
disabled
|
|
26
|
+
:disabled="!nullable"
|
|
27
27
|
>
|
|
28
|
-
{{ placeholder }}
|
|
28
|
+
{{ placeholder || 'Please select' }}
|
|
29
29
|
</option>
|
|
30
30
|
|
|
31
31
|
<option
|
|
@@ -54,8 +54,8 @@ import SIconChevronUp from './icons/SIconChevronUp.vue'
|
|
|
54
54
|
import SIconChevronDown from './icons/SIconChevronDown.vue'
|
|
55
55
|
import SInputBase from './SInputBase.vue'
|
|
56
56
|
|
|
57
|
-
type Size = '
|
|
58
|
-
type Mode = '
|
|
57
|
+
type Size = 'mini' | 'small' | 'medium'
|
|
58
|
+
type Mode = 'outlined' | 'filled'
|
|
59
59
|
|
|
60
60
|
interface Option {
|
|
61
61
|
label: string
|
|
@@ -76,30 +76,29 @@ export default defineComponent({
|
|
|
76
76
|
},
|
|
77
77
|
|
|
78
78
|
props: {
|
|
79
|
-
size: { type: String as PropType<Size>, default: '
|
|
80
|
-
mode: { type: String as PropType<Mode>, default: '
|
|
79
|
+
size: { type: String as PropType<Size>, default: 'small' },
|
|
80
|
+
mode: { type: String as PropType<Mode>, default: 'outlined' },
|
|
81
81
|
name: { type: String, default: null },
|
|
82
82
|
label: { type: String, default: null },
|
|
83
83
|
note: { type: String, default: null },
|
|
84
84
|
help: { type: String, default: null },
|
|
85
85
|
placeholder: { type: String, default: null },
|
|
86
|
+
options: { type: Array as PropType<Option[]>, required: true },
|
|
87
|
+
nullable: { type: Boolean, default: false },
|
|
86
88
|
disabled: { type: Boolean, default: false },
|
|
87
89
|
errorMessage: { type: Boolean, default: true },
|
|
88
|
-
|
|
89
|
-
validation: { type: Object, default: null }
|
|
90
|
-
value: { type: [String, Number, Boolean], default: null }
|
|
90
|
+
value: { type: [String, Number, Boolean], default: null },
|
|
91
|
+
validation: { type: Object, default: null }
|
|
91
92
|
},
|
|
92
93
|
|
|
93
94
|
setup(props, { emit }) {
|
|
94
95
|
const isFocused = ref(false)
|
|
95
96
|
|
|
96
|
-
const classes = computed(() =>
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
disabled: props.disabled
|
|
102
|
-
}))
|
|
97
|
+
const classes = computed(() => [
|
|
98
|
+
props.size,
|
|
99
|
+
props.mode,
|
|
100
|
+
{ disabled: props.disabled }
|
|
101
|
+
])
|
|
103
102
|
|
|
104
103
|
const isNotSelected = computed(() => {
|
|
105
104
|
return props.value === undefined || props.value === null || props.value === ''
|
|
@@ -118,7 +117,7 @@ export default defineComponent({
|
|
|
118
117
|
}
|
|
119
118
|
|
|
120
119
|
function emitChange(e: SyntheticInputEvent): void {
|
|
121
|
-
props.validation
|
|
120
|
+
props.validation?.$touch()
|
|
122
121
|
|
|
123
122
|
const option = JSON.parse(e.target.value)
|
|
124
123
|
|
|
@@ -158,6 +157,23 @@ export default defineComponent({
|
|
|
158
157
|
}
|
|
159
158
|
}
|
|
160
159
|
|
|
160
|
+
.SInputSelect.small {
|
|
161
|
+
.box {
|
|
162
|
+
height: 40px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.select {
|
|
166
|
+
padding: 7px 30px 5px 12px;
|
|
167
|
+
line-height: 24px;
|
|
168
|
+
font-size: 16px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.icon {
|
|
172
|
+
top: 7px;
|
|
173
|
+
right: 10px;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
161
177
|
.SInputSelect.medium {
|
|
162
178
|
.box {
|
|
163
179
|
height: 48px;
|
|
@@ -8,17 +8,7 @@
|
|
|
8
8
|
@import "@/assets/styles/variables";
|
|
9
9
|
|
|
10
10
|
.SSheetMedium {
|
|
11
|
-
padding:
|
|
12
|
-
|
|
13
|
-
@media (min-width: 768px) {
|
|
14
|
-
padding: 24px;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.SSheet.small .SSheetMedium {
|
|
19
|
-
@media (min-width: 768px) {
|
|
20
|
-
padding: 24px 16px;
|
|
21
|
-
}
|
|
11
|
+
padding: 16px;
|
|
22
12
|
}
|
|
23
13
|
|
|
24
14
|
.SSheetMedium >>> h1 {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
3
|
+
<path d="M20,23H11a2.9,2.9,0,0,1-3-3V11a2.9,2.9,0,0,1,3-3h9a2.9,2.9,0,0,1,3,3v9A2.9,2.9,0,0,1,20,23ZM11,10a.9.9,0,0,0-1,1v9a.9.9,0,0,0,1,1h9a.9.9,0,0,0,1-1V11a.9.9,0,0,0-1-1Z" />
|
|
4
|
+
<path d="M5,16H4a2.9,2.9,0,0,1-3-3V4A2.9,2.9,0,0,1,4,1h9a2.9,2.9,0,0,1,3,3V5a1,1,0,0,1-2,0V4a.9.9,0,0,0-1-1H4A.9.9,0,0,0,3,4v9a.9.9,0,0,0,1,1H5a1,1,0,0,1,0,2Z" />
|
|
5
|
+
</svg>
|
|
6
|
+
</template>
|