@globalbrain/sefirot 0.70.1 → 0.73.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 CHANGED
@@ -1,3 +1,28 @@
1
+ # [0.73.0](https://github.com/globalbrain/sefirot/compare/v0.72.0...v0.73.0) (2022-02-24)
2
+
3
+ ### Bug Fixes
4
+
5
+ * broken style on dark mode ([#110](https://github.com/globalbrain/sefirot/issues/110)) ([d667227](https://github.com/globalbrain/sefirot/commit/d667227bfce1ebce61cbe6fc0f420565c72a43ea))
6
+
7
+ ### Features
8
+
9
+ * **icon:** add circle icon ([#118](https://github.com/globalbrain/sefirot/issues/118)) ([489cace](https://github.com/globalbrain/sefirot/commit/489cace7220b3e55c259817e2a17f26bc0dfa27d))
10
+ * **icon:** add mail icon ([#116](https://github.com/globalbrain/sefirot/issues/116)) ([dcce170](https://github.com/globalbrain/sefirot/commit/dcce1703f389d0bcaf864ab846a8be675e16d1a6))
11
+
12
+ # [0.72.0](https://github.com/globalbrain/sefirot/compare/v0.71.0...v0.72.0) (2021-12-01)
13
+
14
+ ### Features
15
+
16
+ * **icon:** add `copy` icon ([#109](https://github.com/globalbrain/sefirot/issues/109)) ([a5dfd72](https://github.com/globalbrain/sefirot/commit/a5dfd726691baecc454efb7b14c9b0028305577b))
17
+ * **input-select:** add `small` size and `nullable` option ([b416612](https://github.com/globalbrain/sefirot/commit/b416612e8c2881920499dc36deb7f7c2b74d9bd3))
18
+ * **input-checkbox:** add size option to input checkbox ([cfddd90](https://github.com/globalbrain/sefirot/commit/cfddd9003685a4b4984f69bafaead92bc84219e3))
19
+
20
+ # [0.71.0](https://github.com/globalbrain/sefirot/compare/v0.70.1...v0.71.0) (2021-11-18)
21
+
22
+ ### Features
23
+
24
+ * **icon:** add `send` icon ([683a57a](https://github.com/globalbrain/sefirot/commit/683a57ad712952b1de122c35a8113cf8f1a738ee))
25
+
1
26
  ## [0.70.1](https://github.com/globalbrain/sefirot/compare/v0.70.0...v0.70.1) (2021-11-17)
2
27
 
3
28
  ### Bug Fixes
@@ -298,11 +298,12 @@
298
298
  --input-filled-bg-focus: var(--c-bg);
299
299
  --input-filled-bg-disabled: var(--c-gray-light-4);
300
300
 
301
+ --input-outlined-bg-focus: var(--c-bg);
301
302
  --input-outlined-bg-disabled: var(--c-white-mute);
302
303
  --input-outlined-border: var(--c-divider);
303
304
  --input-outlined-border-focus: var(--c-black);
304
305
 
305
- --input-clear-bg-disabled: var(--c-white);
306
+ --input-clear-bg-disabled: var(--c-bg);
306
307
 
307
308
  --input-focus-border: var(--c-black);
308
309
  --input-focus-bg: var(--c-white);
@@ -323,6 +324,12 @@
323
324
  --input-outlined-bg-disabled: var(--c-black-mute);
324
325
  --input-outlined-border-focus: var(--c-gray);
325
326
 
327
+ --input-filled-bg-disabled: var(--c-gray-dark-3);
328
+
329
+ --input-action-outlined-bg: var(--c-black-mute);
330
+ --input-action-outlined-bg-hover: var(--c-gray-dark-3);
331
+ --input-action-outlined-bg-focus: var(--c-gray-dark-2);
332
+
326
333
  --input-focus-border: var(--c-gray);
327
334
  }
328
335
 
@@ -331,8 +338,8 @@
331
338
  * -------------------------------------------------------------------------- */
332
339
 
333
340
  :root {
334
- --card-bg: var(--c-white);
335
- --card-bg-mute: var(--c-white-soft);
341
+ --card-bg: var(--c-bg);
342
+ --card-bg-mute: var(--c-bg-soft);
336
343
  --card-shadow-depth-1: var(--shadow-depth-1);
337
344
  --card-shadow-depth-2: var(--shadow-depth-2);
338
345
  --card-shadow-depth-3: var(--shadow-depth-3);
@@ -120,7 +120,7 @@ export default defineComponent({
120
120
  padding: 16px 12px 12px;
121
121
  font-size: 12px;
122
122
  font-weight: 700;
123
- color: var(--c-text-light-2);
123
+ color: var(--c-text-2);
124
124
  }
125
125
  }
126
126
 
@@ -148,7 +148,7 @@ export default defineComponent({
148
148
  }
149
149
 
150
150
  &:hover {
151
- background-color: var(--c-white-soft);
151
+ background-color: var(--c-bg-soft);
152
152
  }
153
153
 
154
154
  &.clickable {
@@ -162,7 +162,7 @@ export default defineComponent({
162
162
  padding: 0 12px;
163
163
  line-height: 20px;
164
164
  font-size: 14px;
165
- color: var(--c-text-light-1);
165
+ color: var(--c-text-1);
166
166
  white-space: nowrap;
167
167
  overflow: hidden;
168
168
  text-overflow: ellipsis;
@@ -190,7 +190,7 @@ export default defineComponent({
190
190
  width: 100%;
191
191
  font-size: 12px;
192
192
  font-weight: 500;
193
- color: var(--c-text-light-2);
193
+ color: var(--c-text-2);
194
194
  white-space: nowrap;
195
195
  overflow: hidden;
196
196
  text-overflow: ellipsis;
@@ -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 },
@@ -75,15 +79,15 @@ export default defineComponent({
75
79
 
76
80
  &:hover {
77
81
  .box {
78
- border-color: var(--c-black);
82
+ border-color: var(--input-focus-border);
79
83
  }
80
84
  }
81
85
  }
82
86
 
83
87
  .input.on {
84
88
  .box {
85
- border-color: var(--c-black);
86
- background-color: var(--c-black);
89
+ border-color: var(--c-text-1);
90
+ background-color: var(--c-text-1);
87
91
  box-shadow: var(--shadow-depth-3);
88
92
  }
89
93
 
@@ -117,7 +121,7 @@ export default defineComponent({
117
121
  .check-icon {
118
122
  width: 10px;
119
123
  height: 10px;
120
- fill: var(--c-white);
124
+ fill: var(--c-text-inverse-1);
121
125
  }
122
126
 
123
127
  .text {
@@ -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 },
@@ -136,9 +136,13 @@ export default defineComponent({
136
136
  .input {
137
137
  background-color: var(--input-filled-bg);
138
138
 
139
+ &:hover {
140
+ border-color: var(--input-focus-border);
141
+ }
142
+
139
143
  &:focus {
140
144
  border-color: var(--input-focus-border);
141
- background-color: var(--input-focus-bg);
145
+ background-color: var(--input-filled-bg-focus);
142
146
  }
143
147
  }
144
148
 
@@ -150,10 +154,14 @@ export default defineComponent({
150
154
  .SInputDate.outlined {
151
155
  .input {
152
156
  border-color: var(--input-outlined-border);
157
+ background-color: transparent;
158
+
159
+ &:hover {
160
+ border-color: var(--input-focus-border);
161
+ }
153
162
 
154
163
  &:focus {
155
164
  border-color: var(--input-focus-border);
156
- background-color: var(--input-focus-bg);
157
165
  }
158
166
  }
159
167
 
@@ -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
- export type Size = 'mini' | 'small' | 'medium'
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: 'medium' },
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 = 'medium' | 'mini'
58
- type Mode = 'filled' | 'outlined'
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: 'medium' },
80
- mode: { type: String as PropType<Mode>, default: 'filled' },
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
- options: { type: Array as PropType<Option[]>, required: true },
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
- medium: props.size === 'medium',
98
- mini: props.size === 'mini',
99
- filled: props.mode === 'filled',
100
- outlined: props.mode === 'outlined',
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 && props.validation.$touch()
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;
@@ -518,7 +518,7 @@ export default defineComponent({
518
518
 
519
519
  .input-area:focus + .input {
520
520
  border-color: var(--input-focus-border);
521
- background-color: var(--input-filled-bg-focus);
521
+ background-color: var(--input-outlined-bg-focus);
522
522
  }
523
523
 
524
524
  &.disabled .box:hover .input {
@@ -115,9 +115,13 @@ export default defineComponent({
115
115
  .input {
116
116
  background-color: var(--input-filled-bg);
117
117
 
118
+ &:hover {
119
+ border-color: var(--input-focus-border);
120
+ }
121
+
118
122
  &:focus {
119
123
  border-color: var(--input-focus-border);
120
- background-color: var(--input-focus-bg);
124
+ background-color: var(--input-filled-bg-focus);
121
125
  }
122
126
  }
123
127
 
@@ -152,6 +156,7 @@ export default defineComponent({
152
156
  .SInputTextarea.clear {
153
157
  .input {
154
158
  padding: 0;
159
+ background-color: transparent;
155
160
  }
156
161
 
157
162
  &.disabled .input {
@@ -3,7 +3,7 @@
3
3
  <transition name="fade">
4
4
  <div v-if="!loaded" class="loader">
5
5
  <div class="icon">
6
- <SIconPreloaderDark class="icon-svg" />
6
+ <SIconPreloader class="icon-svg" />
7
7
  </div>
8
8
  </div>
9
9
  </transition>
@@ -16,11 +16,11 @@
16
16
 
17
17
  <script lang="ts">
18
18
  import { computed, defineComponent } from '@vue/composition-api'
19
- import SIconPreloaderDark from './icons/SIconPreloaderDark.vue'
19
+ import SIconPreloader from './icons/SIconPreloader.vue'
20
20
 
21
21
  export default defineComponent({
22
22
  components: {
23
- SIconPreloaderDark
23
+ SIconPreloader
24
24
  },
25
25
 
26
26
  props: {
@@ -11,7 +11,7 @@
11
11
  margin: 0;
12
12
  padding: 14px 16px 10px;
13
13
  line-height: 20px;
14
- font-size: 16px;
14
+ font-size: 14px;
15
15
  font-weight: 500;
16
16
  }
17
17
  </style>
@@ -8,17 +8,7 @@
8
8
  @import "@/assets/styles/variables";
9
9
 
10
10
  .SSheetMedium {
11
- padding: 24px 16px;
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 {
@@ -11,7 +11,7 @@
11
11
  <SButton
12
12
  :type="action.type"
13
13
  :label="action.label"
14
- inverse
14
+ :inverse="$colorMode.value === 'light'"
15
15
  @click="action.callback"
16
16
  />
17
17
  </div>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
3
+ <path d="M12,23A11,11,0,1,1,23,12,11,11,0,0,1,12,23ZM12,3a9,9,0,1,0,9,9A9,9,0,0,0,12,3Z" />
4
+ </svg>
5
+ </template>
@@ -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>
@@ -0,0 +1,6 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
3
+ <path d="M20,21H4a3,3,0,0,1-3-3V6A3,3,0,0,1,4,3H20a3,3,0,0,1,3,3V18A3,3,0,0,1,20,21ZM4,5A1,1,0,0,0,3,6V18a1,1,0,0,0,1,1H20a1,1,0,0,0,1-1V6a1,1,0,0,0-1-1Z" />
4
+ <path d="M12,14a1,1,0,0,1-.57-.18l-10-7A1,1,0,1,1,2.57,5.18L12,11.78l9.43-6.6a1,1,0,1,1,1.14,1.64l-10,7A1,1,0,0,1,12,14Z" />
5
+ </svg>
6
+ </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
3
+ <path d="M23,1.9c0-0.1,0-0.2-0.1-0.3c0,0,0-0.1,0-0.1c0-0.1-0.1-0.2-0.2-0.3c-0.1-0.1-0.2-0.1-0.3-0.2c0,0-0.1,0-0.1,0c-0.1,0-0.2,0-0.3-0.1C22,1,22,1,22,1c-0.1,0-0.2,0-0.3,0.1l-20,7C1.3,8.2,1,8.5,1,9c0,0.4,0.2,0.8,0.6,1l8.6,3.8l3.8,8.6c0.2,0.4,0.5,0.6,0.9,0.6c0,0,0,0,0,0c0.4,0,0.8-0.3,0.9-0.7l7-20C23,2.2,23,2.1,23,1.9C23,2,23,2,23,1.9z M18.2,4.4l-7.4,7.4L4.7,9.1L18.2,4.4z M14.9,19.3l-2.7-6.1l7.4-7.4L14.9,19.3z" />
4
+ </svg>
5
+ </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@globalbrain/sefirot",
3
- "version": "0.70.1",
3
+ "version": "0.73.0",
4
4
  "description": "Vue Components for Global Brain Design System.",
5
5
  "files": [
6
6
  "lib"
package/lib/.DS_Store DELETED
Binary file
Binary file
Binary file