@budibase/bbui 2.13.19 → 2.13.21

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/bbui",
3
3
  "description": "A UI solution used in the different Budibase projects.",
4
- "version": "2.13.19",
4
+ "version": "2.13.21",
5
5
  "license": "MPL-2.0",
6
6
  "svelte": "src/index.js",
7
7
  "module": "dist/bbui.es.js",
@@ -36,8 +36,8 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@adobe/spectrum-css-workflow-icons": "1.2.1",
39
- "@budibase/shared-core": "2.13.19",
40
- "@budibase/string-templates": "2.13.19",
39
+ "@budibase/shared-core": "2.13.21",
40
+ "@budibase/string-templates": "2.13.21",
41
41
  "@spectrum-css/accordion": "3.0.24",
42
42
  "@spectrum-css/actionbutton": "1.0.1",
43
43
  "@spectrum-css/actiongroup": "1.0.1",
@@ -104,5 +104,5 @@
104
104
  }
105
105
  }
106
106
  },
107
- "gitHead": "47d654819e1da6b03cfd923d323cb310ad77de67"
107
+ "gitHead": "0daf29381f4036c28b1bd476a9ddca787929c901"
108
108
  }
@@ -18,6 +18,7 @@
18
18
  checked={value}
19
19
  {disabled}
20
20
  on:change={onChange}
21
+ on:click
21
22
  {id}
22
23
  type="checkbox"
23
24
  class="spectrum-Switch-input"
@@ -20,7 +20,7 @@
20
20
  let focus = false
21
21
 
22
22
  const updateValue = newValue => {
23
- if (readonly) {
23
+ if (readonly || disabled) {
24
24
  return
25
25
  }
26
26
  if (type === "number") {
@@ -31,14 +31,14 @@
31
31
  }
32
32
 
33
33
  const onFocus = () => {
34
- if (readonly) {
34
+ if (readonly || disabled) {
35
35
  return
36
36
  }
37
37
  focus = true
38
38
  }
39
39
 
40
40
  const onBlur = event => {
41
- if (readonly) {
41
+ if (readonly || disabled) {
42
42
  return
43
43
  }
44
44
  focus = false
@@ -46,14 +46,14 @@
46
46
  }
47
47
 
48
48
  const onInput = event => {
49
- if (readonly || !updateOnChange) {
49
+ if (readonly || !updateOnChange || disabled) {
50
50
  return
51
51
  }
52
52
  updateValue(event.target.value)
53
53
  }
54
54
 
55
55
  const updateValueOnEnter = event => {
56
- if (readonly) {
56
+ if (readonly || disabled) {
57
57
  return
58
58
  }
59
59
  if (event.key === "Enter") {
@@ -69,6 +69,7 @@
69
69
  }
70
70
 
71
71
  onMount(() => {
72
+ if (disabled) return
72
73
  focus = autofocus
73
74
  if (focus) field.focus()
74
75
  })
@@ -108,4 +109,16 @@
108
109
  .spectrum-Textfield {
109
110
  width: 100%;
110
111
  }
112
+
113
+ input::placeholder {
114
+ color: var(--grey-7);
115
+ }
116
+
117
+ input:hover::placeholder {
118
+ color: var(--grey-7) !important;
119
+ }
120
+
121
+ input:focus::placeholder {
122
+ color: var(--grey-7) !important;
123
+ }
111
124
  </style>
@@ -19,5 +19,5 @@
19
19
  </script>
20
20
 
21
21
  <Field {helpText} {label} {labelPosition} {error}>
22
- <Switch {error} {disabled} {text} {value} on:change={onChange} />
22
+ <Switch {error} {disabled} {text} {value} on:change={onChange} on:click />
23
23
  </Field>