@budibase/bbui 2.2.12-alpha.57 → 2.2.12-alpha.59

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.2.12-alpha.57",
4
+ "version": "2.2.12-alpha.59",
5
5
  "license": "MPL-2.0",
6
6
  "svelte": "src/index.js",
7
7
  "module": "dist/bbui.es.js",
@@ -38,7 +38,7 @@
38
38
  ],
39
39
  "dependencies": {
40
40
  "@adobe/spectrum-css-workflow-icons": "1.2.1",
41
- "@budibase/string-templates": "2.2.12-alpha.57",
41
+ "@budibase/string-templates": "2.2.12-alpha.59",
42
42
  "@spectrum-css/accordion": "3.0.24",
43
43
  "@spectrum-css/actionbutton": "1.0.1",
44
44
  "@spectrum-css/actiongroup": "1.0.1",
@@ -89,5 +89,5 @@
89
89
  "resolutions": {
90
90
  "loader-utils": "1.4.1"
91
91
  },
92
- "gitHead": "8545cc3943a9a8f59a7587d84cd67bf8038d5219"
92
+ "gitHead": "7f14375222390ee3a60561cd5027c01fa56715f8"
93
93
  }
@@ -9,7 +9,6 @@
9
9
  export let longPressable = false
10
10
  export let disabled = false
11
11
  export let icon = ""
12
- export let dataCy = null
13
12
  export let size = "M"
14
13
  export let active = false
15
14
  export let fullWidth = false
@@ -37,7 +36,6 @@
37
36
  </script>
38
37
 
39
38
  <button
40
- data-cy={dataCy}
41
39
  use:longPress
42
40
  class:spectrum-ActionButton--quiet={quiet}
43
41
  class:spectrum-ActionButton--emphasized={emphasized}
@@ -6,7 +6,6 @@
6
6
  export let disabled = false
7
7
  export let align = "left"
8
8
  export let portalTarget
9
- export let dataCy
10
9
 
11
10
  let anchor
12
11
  let dropdown
@@ -37,7 +36,7 @@
37
36
  <div use:getAnchor on:click={openMenu}>
38
37
  <slot name="control" />
39
38
  </div>
40
- <Popover bind:this={dropdown} {anchor} {align} {portalTarget} {dataCy}>
39
+ <Popover bind:this={dropdown} {anchor} {align} {portalTarget}>
41
40
  <Menu>
42
41
  <slot />
43
42
  </Menu>
@@ -1,6 +1,6 @@
1
1
  export default function positionDropdown(
2
2
  element,
3
- { anchor, align, maxWidth, useAnchorWidth }
3
+ { anchor, align, maxWidth, useAnchorWidth, offset = 5 }
4
4
  ) {
5
5
  const update = () => {
6
6
  if (!anchor) {
@@ -20,9 +20,9 @@ export default function positionDropdown(
20
20
  if (align === "right-outside") {
21
21
  styles.top = anchorBounds.top
22
22
  } else if (window.innerHeight - anchorBounds.bottom < 100) {
23
- styles.top = anchorBounds.top - elementBounds.height - 5
23
+ styles.top = anchorBounds.top - elementBounds.height - offset
24
24
  } else {
25
- styles.top = anchorBounds.bottom + 5
25
+ styles.top = anchorBounds.bottom + offset
26
26
  styles.maxHeight = window.innerHeight - anchorBounds.bottom - 20
27
27
  }
28
28
 
@@ -36,7 +36,7 @@ export default function positionDropdown(
36
36
  if (align === "right") {
37
37
  styles.left = anchorBounds.left + anchorBounds.width - elementBounds.width
38
38
  } else if (align === "right-outside") {
39
- styles.left = anchorBounds.right + 10
39
+ styles.left = anchorBounds.right + offset
40
40
  } else {
41
41
  styles.left = anchorBounds.left
42
42
  }
@@ -13,7 +13,6 @@
13
13
  export let icon = undefined
14
14
  export let active = false
15
15
  export let tooltip = undefined
16
- export let dataCy
17
16
  export let newStyles = true
18
17
  export let id
19
18
 
@@ -33,7 +32,6 @@
33
32
  class:disabled
34
33
  class="spectrum-Button spectrum-Button--size{size.toUpperCase()}"
35
34
  {disabled}
36
- data-cy={dataCy}
37
35
  on:click|preventDefault
38
36
  on:mouseover={() => (showTooltip = true)}
39
37
  on:focus={() => (showTooltip = true)}
@@ -11,7 +11,6 @@
11
11
  export let id = null
12
12
  export let readonly = false
13
13
  export let updateOnChange = true
14
- export let dataCy
15
14
  export let align
16
15
  export let autofocus = false
17
16
  export let variables
@@ -123,7 +122,6 @@
123
122
  disabled={hbsValue.length || disabled}
124
123
  {readonly}
125
124
  {id}
126
- data-cy={dataCy}
127
125
  value={hbsValue.length ? `{{ ${hbsValue[0]} }}` : value}
128
126
  placeholder={placeholder || ""}
129
127
  on:click
@@ -6,7 +6,6 @@
6
6
  export let id = null
7
7
  export let text = null
8
8
  export let disabled = false
9
- export let dataCy = null
10
9
 
11
10
  const dispatch = createEventDispatcher()
12
11
  const onChange = event => {
@@ -16,7 +15,6 @@
16
15
 
17
16
  <div class="spectrum-Switch spectrum-Switch--emphasized">
18
17
  <input
19
- data-cy={dataCy}
20
18
  checked={value}
21
19
  {disabled}
22
20
  on:change={onChange}
@@ -11,7 +11,6 @@
11
11
  export let readonly = false
12
12
  export let updateOnChange = true
13
13
  export let quiet = false
14
- export let dataCy
15
14
  export let align
16
15
  export let autofocus = false
17
16
 
@@ -89,7 +88,6 @@
89
88
  {disabled}
90
89
  {readonly}
91
90
  {id}
92
- data-cy={dataCy}
93
91
  value={value || ""}
94
92
  placeholder={placeholder || ""}
95
93
  on:click
@@ -13,7 +13,6 @@
13
13
  export let error = null
14
14
  export let updateOnChange = true
15
15
  export let quiet = false
16
- export let dataCy
17
16
  export let autofocus
18
17
  export let variables
19
18
  export let showModal
@@ -28,7 +27,6 @@
28
27
 
29
28
  <Field {label} {labelPosition} {error}>
30
29
  <EnvDropdown
31
- {dataCy}
32
30
  {updateOnChange}
33
31
  {error}
34
32
  {disabled}
@@ -13,7 +13,6 @@
13
13
  export let error = null
14
14
  export let updateOnChange = true
15
15
  export let quiet = false
16
- export let dataCy
17
16
  export let autofocus
18
17
 
19
18
  const dispatch = createEventDispatcher()
@@ -25,7 +24,6 @@
25
24
 
26
25
  <Field {label} {labelPosition} {error}>
27
26
  <TextField
28
- {dataCy}
29
27
  {updateOnChange}
30
28
  {error}
31
29
  {disabled}
@@ -14,7 +14,6 @@
14
14
  export let error = null
15
15
  export let updateOnChange = true
16
16
  export let quiet = false
17
- export let dataCy
18
17
  export let autofocus
19
18
  export let options = []
20
19
 
@@ -32,7 +31,6 @@
32
31
 
33
32
  <Field {label} {labelPosition} {error}>
34
33
  <InputDropdown
35
- {dataCy}
36
34
  {updateOnChange}
37
35
  {error}
38
36
  {disabled}
@@ -21,7 +21,6 @@
21
21
  export let getSecondaryOptionColour = () => {}
22
22
  export let getSecondaryOptionIcon = () => {}
23
23
  export let quiet = false
24
- export let dataCy
25
24
  export let autofocus
26
25
  export let primaryOptions = []
27
26
  export let secondaryOptions = []
@@ -98,7 +97,6 @@
98
97
  <PickerDropdown
99
98
  {searchTerm}
100
99
  {autocomplete}
101
- {dataCy}
102
100
  {error}
103
101
  {disabled}
104
102
  {readonly}
@@ -9,7 +9,6 @@
9
9
  export let text = null
10
10
  export let disabled = false
11
11
  export let error = null
12
- export let dataCy = null
13
12
 
14
13
  const dispatch = createEventDispatcher()
15
14
  const onChange = e => {
@@ -19,5 +18,5 @@
19
18
  </script>
20
19
 
21
20
  <Field {label} {labelPosition} {error}>
22
- <Switch {dataCy} {error} {disabled} {text} {value} on:change={onChange} />
21
+ <Switch {error} {disabled} {text} {value} on:change={onChange} />
23
22
  </Field>
@@ -5,7 +5,6 @@
5
5
  const dispatch = createEventDispatcher()
6
6
  const actionMenu = getContext("actionMenu")
7
7
 
8
- export let dataCy
9
8
  export let icon = undefined
10
9
  export let disabled = undefined
11
10
  export let noClose = false
@@ -35,7 +34,6 @@
35
34
  </script>
36
35
 
37
36
  <li
38
- data-cy={dataCy}
39
37
  on:click|preventDefault={disabled ? null : onClick}
40
38
  class="spectrum-Menu-item"
41
39
  class:is-disabled={disabled}
@@ -23,7 +23,7 @@
23
23
  export let secondaryButtonText = undefined
24
24
  export let secondaryAction = undefined
25
25
  export let secondaryButtonWarning = false
26
- export let dataCy = null
26
+
27
27
  const { hide, cancel } = getContext(Context.Modal)
28
28
  let loading = false
29
29
  $: confirmDisabled = disabled || loading
@@ -63,7 +63,6 @@
63
63
  role="dialog"
64
64
  tabindex="-1"
65
65
  aria-modal="true"
66
- data-cy={dataCy}
67
66
  >
68
67
  <div class="spectrum-Dialog-grid">
69
68
  {#if title || $$slots.header}
@@ -13,11 +13,11 @@
13
13
  export let anchor
14
14
  export let align = "right"
15
15
  export let portalTarget
16
- export let dataCy
17
16
  export let maxWidth
18
17
  export let open = false
19
18
  export let useAnchorWidth = false
20
19
  export let dismissible = true
20
+ export let offset = 5
21
21
 
22
22
  $: target = portalTarget || getContext(Context.PopoverRoot) || ".spectrum"
23
23
 
@@ -66,7 +66,7 @@
66
66
  align,
67
67
  maxWidth,
68
68
  useAnchorWidth,
69
- showTip: false,
69
+ offset,
70
70
  }}
71
71
  use:clickOutside={{
72
72
  callback: dismissible ? handleOutsideClick : () => {},
@@ -75,7 +75,6 @@
75
75
  on:keydown={handleEscape}
76
76
  class="spectrum-Popover is-open"
77
77
  role="presentation"
78
- data-cy={dataCy}
79
78
  transition:fly|local={{ y: -20, duration: 200 }}
80
79
  >
81
80
  <slot />
@@ -8,7 +8,6 @@
8
8
  export let icon = ""
9
9
  export let selected = false
10
10
  export let disabled = false
11
- export let dataCy
12
11
  export let badge = ""
13
12
  </script>
14
13
 
@@ -17,7 +16,6 @@
17
16
  class:is-selected={selected}
18
17
  class:is-disabled={disabled}
19
18
  on:click
20
- data-cy={dataCy}
21
19
  >
22
20
  {#if heading}
23
21
  <h2 class="spectrum-SideNav-heading" id="nav-heading-{heading}">