@budibase/bbui 2.29.21 → 2.29.23

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.29.21",
4
+ "version": "2.29.23",
5
5
  "license": "MPL-2.0",
6
6
  "svelte": "src/index.js",
7
7
  "module": "dist/bbui.es.js",
@@ -35,8 +35,8 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@adobe/spectrum-css-workflow-icons": "1.2.1",
38
- "@budibase/shared-core": "2.29.21",
39
- "@budibase/string-templates": "2.29.21",
38
+ "@budibase/shared-core": "2.29.23",
39
+ "@budibase/string-templates": "2.29.23",
40
40
  "@spectrum-css/accordion": "3.0.24",
41
41
  "@spectrum-css/actionbutton": "1.0.1",
42
42
  "@spectrum-css/actiongroup": "1.0.1",
@@ -103,5 +103,5 @@
103
103
  }
104
104
  }
105
105
  },
106
- "gitHead": "6678715072f390d56bd823f449ebd377fb7e0229"
106
+ "gitHead": "7e4c562339380dedd324b8a0cf23ef36baebe676"
107
107
  }
@@ -40,6 +40,15 @@
40
40
  {
41
41
  label: "Colors",
42
42
  colors: [
43
+ "red-100",
44
+ "orange-100",
45
+ "yellow-100",
46
+ "green-100",
47
+ "seafoam-100",
48
+ "blue-100",
49
+ "indigo-100",
50
+ "magenta-100",
51
+
43
52
  "red-400",
44
53
  "orange-400",
45
54
  "yellow-400",
@@ -108,12 +117,17 @@
108
117
 
109
118
  const getCheckColor = value => {
110
119
  // Use dynamic color for theme grays
111
- if (value?.includes("gray")) {
120
+ if (value?.includes("-gray-")) {
112
121
  return /^.*(gray-(50|75|100|200|300|400|500))\)$/.test(value)
113
122
  ? "var(--spectrum-global-color-gray-900)"
114
123
  : "var(--spectrum-global-color-gray-50)"
115
124
  }
116
125
 
126
+ // Use contrasating check for the dim colours
127
+ if (value?.includes("-100")) {
128
+ return "var(--spectrum-global-color-gray-900)"
129
+ }
130
+
117
131
  // Use black check for static white
118
132
  if (value?.includes("static-black")) {
119
133
  return "var(--spectrum-global-color-static-gray-50)"
@@ -62,7 +62,9 @@
62
62
  return placeholder || "Choose an option"
63
63
  }
64
64
 
65
- return getFieldAttribute(getOptionLabel, value, options)
65
+ return (
66
+ getFieldAttribute(getOptionLabel, value, options) || "Choose an option"
67
+ )
66
68
  }
67
69
 
68
70
  const selectOption = value => {
@@ -29,6 +29,7 @@
29
29
  >
30
30
  <div class="icon" class:newStyles>
31
31
  <svg
32
+ on:contextmenu
32
33
  on:click
33
34
  class:hoverable
34
35
  class:disabled
@@ -1,33 +1,22 @@
1
1
  <script>
2
2
  import "@spectrum-css/progressbar/dist/index-vars.css"
3
- import { tweened } from "svelte/motion"
4
- import { cubicOut } from "svelte/easing"
5
3
 
6
4
  export let value = false
7
- export let easing = cubicOut
8
5
  export let duration = 1000
9
6
  export let width = false
10
7
  export let sideLabel = false
11
8
  export let hidePercentage = true
12
9
  export let color // red, green, default = blue
13
-
14
10
  export let size = "M"
15
-
16
- const progress = tweened(0, {
17
- duration: duration,
18
- easing: easing,
19
- })
20
-
21
- $: if (value || value === 0) $progress = value
22
11
  </script>
23
12
 
24
13
  <div
25
14
  class:spectrum-ProgressBar--indeterminate={!value && value !== 0}
26
15
  class:spectrum-ProgressBar--sideLabel={sideLabel}
27
16
  class="spectrum-ProgressBar spectrum-ProgressBar--size{size}"
28
- value={$progress}
17
+ {value}
29
18
  role="progressbar"
30
- aria-valuenow={$progress}
19
+ aria-valuenow={value}
31
20
  aria-valuemin="0"
32
21
  aria-valuemax="100"
33
22
  style={width ? `width: ${width};` : ""}
@@ -43,7 +32,7 @@
43
32
  <div
44
33
  class="spectrum-FieldLabel spectrum-ProgressBar-percentage spectrum-FieldLabel--size{size}"
45
34
  >
46
- {Math.round($progress)}%
35
+ {Math.round(value)}%
47
36
  </div>
48
37
  {/if}
49
38
  <div class="spectrum-ProgressBar-track">
@@ -51,7 +40,7 @@
51
40
  class="spectrum-ProgressBar-fill"
52
41
  class:color-green={color === "green"}
53
42
  class:color-red={color === "red"}
54
- style={value || value === 0 ? `width: ${$progress}%` : ""}
43
+ style="width: {value}%; --duration: {duration}ms;"
55
44
  />
56
45
  </div>
57
46
  <div class="spectrum-ProgressBar-label" hidden="" />
@@ -64,4 +53,7 @@
64
53
  .color-red {
65
54
  background: #dd2019;
66
55
  }
56
+ .spectrum-ProgressBar-fill {
57
+ transition: width var(--duration) ease-out;
58
+ }
67
59
  </style>
package/src/bbui.css CHANGED
@@ -3,13 +3,13 @@
3
3
  --ink: #000000;
4
4
 
5
5
  /* Brand colours */
6
- --bb-coral: #FF4E4E;
7
- --bb-coral-light: #F97777;
8
- --bb-indigo: #6E56FF;
9
- --bb-indigo-light: #9F8FFF;
10
- --bb-lime: #ECFFB5;
6
+ --bb-coral: #ff4e4e;
7
+ --bb-coral-light: #f97777;
8
+ --bb-indigo: #6e56ff;
9
+ --bb-indigo-light: #9f8fff;
10
+ --bb-lime: #ecffb5;
11
11
  --bb-forest-green: #053835;
12
- --bb-beige: #F6EFEA;
12
+ --bb-beige: #f6efea;
13
13
 
14
14
  --grey-1: #fafafa;
15
15
  --grey-2: #f5f5f5;
@@ -49,10 +49,10 @@
49
49
  --rounded-medium: 8px;
50
50
  --rounded-large: 16px;
51
51
 
52
- --font-sans: "Source Sans Pro", -apple-system, BlinkMacSystemFont, Segoe UI, "Inter",
53
- "Helvetica Neue", Arial, "Noto Sans", sans-serif;
54
- --font-accent: "Source Sans Pro", -apple-system, BlinkMacSystemFont, Segoe UI, "Inter",
55
- "Helvetica Neue", Arial, "Noto Sans", sans-serif;
52
+ --font-sans: "Source Sans Pro", -apple-system, BlinkMacSystemFont, Segoe UI,
53
+ "Inter", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
54
+ --font-accent: "Source Sans Pro", -apple-system, BlinkMacSystemFont, Segoe UI,
55
+ "Inter", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
56
56
  --font-serif: "Georgia", Cambria, Times New Roman, Times, serif;
57
57
  --font-mono: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
58
58
  monospace;
@@ -111,17 +111,38 @@ a {
111
111
  /* Custom theme additions */
112
112
  .spectrum--darkest {
113
113
  --drop-shadow: rgba(0, 0, 0, 0.6);
114
- --spectrum-global-color-blue-100: rgb(28, 33, 43);
114
+ --spectrum-global-color-red-100: #570000;
115
+ --spectrum-global-color-orange-100: #481801;
116
+ --spectrum-global-color-yellow-100: #352400;
117
+ --spectrum-global-color-green-100: #002f07;
118
+ --spectrum-global-color-seafoam-100: #122b2a;
119
+ --spectrum-global-color-blue-100: #002651;
120
+ --spectrum-global-color-indigo-100: #1a1d61;
121
+ --spectrum-global-color-magenta-100: #530329;
122
+ --translucent-grey: rgba(255, 255, 255, 0.1);
115
123
  }
116
124
  .spectrum--dark {
117
125
  --drop-shadow: rgba(0, 0, 0, 0.3);
118
- --spectrum-global-color-blue-100: rgb(42, 47, 57);
119
- }
120
- .spectrum--light {
121
- --drop-shadow: rgba(0, 0, 0, 0.075);
122
- --spectrum-global-color-blue-100: rgb(240, 245, 255);
126
+ --spectrum-global-color-red-100: #7b0000;
127
+ --spectrum-global-color-orange-100: #662500;
128
+ --spectrum-global-color-yellow-100: #4c3600;
129
+ --spectrum-global-color-green-100: #00450a;
130
+ --spectrum-global-color-seafoam-100: #12413f;
131
+ --spectrum-global-color-blue-100: #003877;
132
+ --spectrum-global-color-indigo-100: #282c8c;
133
+ --spectrum-global-color-magenta-100: #76003a;
134
+ --translucent-grey: rgba(255, 255, 255, 0.065);
123
135
  }
136
+ .spectrum--light,
124
137
  .spectrum--lightest {
125
- --drop-shadow: rgba(0, 0, 0, 0.05);
126
- --spectrum-global-color-blue-100: rgb(240, 244, 255);
138
+ --drop-shadow: rgba(0, 0, 0, 0.075);
139
+ --spectrum-global-color-red-100: #ffddd6;
140
+ --spectrum-global-color-orange-100: #ffdfad;
141
+ --spectrum-global-color-yellow-100: #fbf198;
142
+ --spectrum-global-color-green-100: #cef8e0;
143
+ --spectrum-global-color-seafoam-100: #cef7f3;
144
+ --spectrum-global-color-blue-100: #e0f2ff;
145
+ --spectrum-global-color-indigo-100: #edeeff;
146
+ --spectrum-global-color-magenta-100: #ffeaf1;
147
+ --translucent-grey: rgba(0, 0, 0, 0.085);
127
148
  }