@awes-io/ui 2.66.0 → 2.68.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
@@ -3,6 +3,34 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.68.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.67.0...@awes-io/ui@2.68.0) (2023-08-25)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * checkbox value prop fixed ([783ff5a](https://github.com/awes-io/client/commit/783ff5ae3ccaa675910365eee1c134188465e556))
12
+
13
+
14
+ ### Features
15
+
16
+ * change partical props in checkbox and add object to value ([62e62d8](https://github.com/awes-io/client/commit/62e62d860a1b1ce5f818ade4750bf5440c4c328f))
17
+
18
+
19
+
20
+
21
+
22
+ # [2.67.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.66.0...@awes-io/ui@2.67.0) (2023-08-24)
23
+
24
+
25
+ ### Features
26
+
27
+ * add new props and page for aw alert ([be268b2](https://github.com/awes-io/client/commit/be268b219ee68c726092cd63458048b1b958fa5e))
28
+ * add partical for checkbox and new type for value ([77b77ef](https://github.com/awes-io/client/commit/77b77effc25faf8e3663df475fe1f08af932db3e))
29
+
30
+
31
+
32
+
33
+
6
34
  # [2.66.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.65.1...@awes-io/ui@2.66.0) (2023-08-22)
7
35
 
8
36
 
@@ -3,7 +3,8 @@
3
3
 
4
4
  padding: theme('spacing.4', 1rem);
5
5
  border-radius: theme('borderRadius.md', 0.25rem);
6
- border: 1px solid var(--c-mono-800);
6
+ border: 1px solid var(--aw-alert-border);
7
+ background: var(--aw-alert-bg);
7
8
 
8
9
  &__icon {
9
10
  padding-right: theme('spacing.4', 1rem);
@@ -11,6 +12,14 @@
11
12
  line-height: 0.75em;
12
13
  }
13
14
 
15
+ .aw-description {
16
+ color: var(--aw-alert-on-color);
17
+
18
+ a {
19
+ color: var(--aw-alert-on-color);
20
+ }
21
+ }
22
+
14
23
  &__title {
15
24
  display: flex;
16
25
  margin: 0;
@@ -28,6 +37,10 @@
28
37
  margin-top: theme('spacing.4', 1rem);
29
38
  margin-left: theme('spacing.4', 1rem);
30
39
  }
40
+
41
+ .aw-icon, a {
42
+ color: var(--aw-alert-on-color);
43
+ }
31
44
  }
32
45
  }
33
46
 
@@ -44,6 +44,12 @@
44
44
  &:checked {
45
45
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.707 7.293a1 1 0 0 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l4-4a1 1 0 0 0-1.414-1.414L7 8.586 5.707 7.293z'/%3e%3c/svg%3e");
46
46
  }
47
+
48
+ &--partial {
49
+ &:checked {
50
+ background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 20 20' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M3.33089 10.8334H16.6667C16.8877 10.8334 17.0997 10.7456 17.256 10.5893C17.4123 10.4331 17.5001 10.2211 17.5001 10.0001C17.5001 9.77907 17.4123 9.56711 17.256 9.41083C17.0997 9.25455 16.8877 9.16675 16.6667 9.16675H3.33089C3.10988 9.16675 2.89792 9.25455 2.74164 9.41083C2.58536 9.56711 2.49756 9.77907 2.49756 10.0001C2.49756 10.2211 2.58536 10.4331 2.74164 10.5893C2.89792 10.7456 3.10988 10.8334 3.33089 10.8334Z'/%3e%3c/svg%3e");
51
+ }
52
+ }
47
53
  }
48
54
 
49
55
 
@@ -11,8 +11,9 @@
11
11
  >
12
12
  <input
13
13
  class="aw-switch-field__element"
14
+ :class="{ 'aw-switch-field__element--partial': partial }"
14
15
  type="checkbox"
15
- v-bind="{ value, checked: isChecked, ...skipAttr, ...$attrs }"
16
+ v-bind="{ value: _valueAttr, checked: isChecked, ...skipAttr, ...$attrs }"
16
17
  :id="id || defaultId"
17
18
  :aria-describedby="errorText ? errorId : null"
18
19
  v-tooltip:top-start.show.prepend="errorTooltip"
@@ -31,6 +32,7 @@
31
32
  </template>
32
33
 
33
34
  <script>
35
+ import { isType } from 'rambdax'
34
36
  import FieldMixin from '@AwMixins/field'
35
37
  import ErrorMixin from '@AwMixins/error'
36
38
 
@@ -47,14 +49,16 @@ export default {
47
49
  props: {
48
50
  // Value that checkbox emits when checked
49
51
  value: {
50
- type: String,
52
+ type: [String, Number, Boolean, Object],
51
53
  default: 'on'
52
54
  },
53
55
 
54
56
  checked: {
55
57
  type: [Array, Boolean, Number],
56
58
  default: false
57
- }
59
+ },
60
+
61
+ partial: Boolean
58
62
  },
59
63
 
60
64
  computed: {
@@ -62,6 +66,10 @@ export default {
62
66
  return null
63
67
  },
64
68
 
69
+ _valueAttr() {
70
+ return isType('Object', this.value) ? null : this.value
71
+ },
72
+
65
73
  wrapperClasses() {
66
74
  return {
67
75
  'fb-field': !this.$slots.default,
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="aw-alert">
2
+ <div class="aw-alert" :style="styleVariables">
3
3
  <AwDescription tag="div" class="aw-alert__title">
4
4
  <span v-if="icon || $scopedSlots.icon" class="aw-alert__icon">
5
5
  <slot name="icon">
@@ -31,6 +31,16 @@ export default {
31
31
  default: ''
32
32
  },
33
33
 
34
+ color: {
35
+ type: String,
36
+ default: ''
37
+ },
38
+
39
+ onColor: {
40
+ type: String,
41
+ default: ''
42
+ },
43
+
34
44
  iconColor: {
35
45
  type: String,
36
46
  default: ''
@@ -40,6 +50,22 @@ export default {
40
50
  type: String,
41
51
  default: ''
42
52
  }
53
+ },
54
+
55
+ computed: {
56
+ styleVariables() {
57
+ return {
58
+ '--aw-alert-bg': this.color
59
+ ? `var(--c-${this.color})`
60
+ : 'current',
61
+ '--aw-alert-border': this.onColor
62
+ ? `var(--c-${this.onColor})`
63
+ : 'var(--c-mono-800)',
64
+ '--aw-alert-on-color': this.onColor
65
+ ? `var(--c-${this.onColor})`
66
+ : 'current'
67
+ }
68
+ }
43
69
  }
44
70
  }
45
71
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awes-io/ui",
3
- "version": "2.66.0",
3
+ "version": "2.68.0",
4
4
  "description": "User Interface (UI) components",
5
5
  "keywords": [
6
6
  "ui",
@@ -112,5 +112,5 @@
112
112
  "rollup-plugin-visualizer": "^2.6.0",
113
113
  "rollup-plugin-vue": "^5.0.1"
114
114
  },
115
- "gitHead": "e4ed44423c6121c453da0e931c079ce739b5dd3c"
115
+ "gitHead": "edd8fd3c45b6b35236833b217f4865dc120d96cd"
116
116
  }