@budibase/bbui 1.1.25-alpha.2 → 1.1.27
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/dist/bbui.es.js +35 -35
- package/dist/bbui.es.js.map +1 -1
- package/package.json +3 -3
- package/src/Avatar/Avatar.svelte +3 -16
- package/src/Form/Core/Multiselect.svelte +0 -2
- package/src/Form/Core/Select.svelte +1 -0
- package/src/Form/Multiselect.svelte +1 -2
- package/src/List/Items/DetailSummary.svench +53 -0
- package/src/Table/Table.svelte +2 -19
- package/src/index.js +0 -6
- package/src/Form/Core/InputDropdown.svelte +0 -218
- package/src/Form/Core/PickerDropdown.svelte +0 -430
- package/src/Form/InputDropdown.svelte +0 -55
- package/src/Form/PickerDropdown.svelte +0 -125
- package/src/IconPicker/IconPicker.svelte +0 -177
- package/src/List/List.svelte +0 -28
- package/src/List/ListItem.svelte +0 -92
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
//import { createEventDispatcher } from "svelte"
|
|
3
|
-
import "@spectrum-css/popover/dist/index-vars.css"
|
|
4
|
-
import clickOutside from "../Actions/click_outside"
|
|
5
|
-
import { fly } from "svelte/transition"
|
|
6
|
-
import Icon from "../Icon/Icon.svelte"
|
|
7
|
-
import { createEventDispatcher } from "svelte"
|
|
8
|
-
|
|
9
|
-
export let value
|
|
10
|
-
export let size = "M"
|
|
11
|
-
export let alignRight = false
|
|
12
|
-
|
|
13
|
-
let open = false
|
|
14
|
-
|
|
15
|
-
const dispatch = createEventDispatcher()
|
|
16
|
-
|
|
17
|
-
const iconList = [
|
|
18
|
-
{
|
|
19
|
-
label: "Icons",
|
|
20
|
-
icons: [
|
|
21
|
-
"Apps",
|
|
22
|
-
"Actions",
|
|
23
|
-
"ConversionFunnel",
|
|
24
|
-
"App",
|
|
25
|
-
"Briefcase",
|
|
26
|
-
"Money",
|
|
27
|
-
"ShoppingCart",
|
|
28
|
-
"Form",
|
|
29
|
-
"Help",
|
|
30
|
-
"Monitoring",
|
|
31
|
-
"Sandbox",
|
|
32
|
-
"Project",
|
|
33
|
-
"Organisations",
|
|
34
|
-
"Magnify",
|
|
35
|
-
"Launch",
|
|
36
|
-
"Car",
|
|
37
|
-
"Camera",
|
|
38
|
-
"Bug",
|
|
39
|
-
"Channel",
|
|
40
|
-
"Calculator",
|
|
41
|
-
"Calendar",
|
|
42
|
-
"GraphDonut",
|
|
43
|
-
"GraphBarHorizontal",
|
|
44
|
-
"Demographic",
|
|
45
|
-
],
|
|
46
|
-
},
|
|
47
|
-
]
|
|
48
|
-
|
|
49
|
-
const onChange = value => {
|
|
50
|
-
dispatch("change", value)
|
|
51
|
-
open = false
|
|
52
|
-
}
|
|
53
|
-
</script>
|
|
54
|
-
|
|
55
|
-
<div class="container">
|
|
56
|
-
<div class="preview size--{size || 'M'}" on:click={() => (open = true)}>
|
|
57
|
-
<div
|
|
58
|
-
class="fill"
|
|
59
|
-
style={value ? `background: ${value};` : ""}
|
|
60
|
-
class:placeholder={!value}
|
|
61
|
-
>
|
|
62
|
-
<Icon name={value || "UserGroup"} />
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
{#if open}
|
|
66
|
-
<div
|
|
67
|
-
use:clickOutside={() => (open = false)}
|
|
68
|
-
transition:fly={{ y: -20, duration: 200 }}
|
|
69
|
-
class="spectrum-Popover spectrum-Popover--bottom spectrum-Picker-popover is-open"
|
|
70
|
-
class:spectrum-Popover--align-right={alignRight}
|
|
71
|
-
>
|
|
72
|
-
{#each iconList as icon}
|
|
73
|
-
<div class="category">
|
|
74
|
-
<div class="heading">{icon.label}</div>
|
|
75
|
-
<div class="icons">
|
|
76
|
-
{#each icon.icons as icon}
|
|
77
|
-
<div
|
|
78
|
-
on:click={() => {
|
|
79
|
-
onChange(icon)
|
|
80
|
-
}}
|
|
81
|
-
>
|
|
82
|
-
<Icon name={icon} />
|
|
83
|
-
</div>
|
|
84
|
-
{/each}
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
{/each}
|
|
88
|
-
</div>
|
|
89
|
-
{/if}
|
|
90
|
-
</div>
|
|
91
|
-
|
|
92
|
-
<style>
|
|
93
|
-
.container {
|
|
94
|
-
position: relative;
|
|
95
|
-
}
|
|
96
|
-
.preview {
|
|
97
|
-
width: 32px;
|
|
98
|
-
height: 32px;
|
|
99
|
-
position: relative;
|
|
100
|
-
box-shadow: 0 0 0 1px var(--spectrum-global-color-gray-400);
|
|
101
|
-
}
|
|
102
|
-
.preview:hover {
|
|
103
|
-
cursor: pointer;
|
|
104
|
-
}
|
|
105
|
-
.fill {
|
|
106
|
-
width: 100%;
|
|
107
|
-
height: 100%;
|
|
108
|
-
position: absolute;
|
|
109
|
-
top: 0;
|
|
110
|
-
left: 0;
|
|
111
|
-
display: grid;
|
|
112
|
-
place-items: center;
|
|
113
|
-
}
|
|
114
|
-
.size--S {
|
|
115
|
-
width: 20px;
|
|
116
|
-
height: 20px;
|
|
117
|
-
}
|
|
118
|
-
.size--M {
|
|
119
|
-
width: 32px;
|
|
120
|
-
height: 32px;
|
|
121
|
-
}
|
|
122
|
-
.size--L {
|
|
123
|
-
width: 48px;
|
|
124
|
-
height: 48px;
|
|
125
|
-
}
|
|
126
|
-
.spectrum-Popover {
|
|
127
|
-
width: 210px;
|
|
128
|
-
z-index: 999;
|
|
129
|
-
top: 100%;
|
|
130
|
-
padding: var(--spacing-l) var(--spacing-xl);
|
|
131
|
-
display: flex;
|
|
132
|
-
flex-direction: column;
|
|
133
|
-
justify-content: flex-start;
|
|
134
|
-
align-items: stretch;
|
|
135
|
-
gap: var(--spacing-xl);
|
|
136
|
-
}
|
|
137
|
-
.spectrum-Popover--align-right {
|
|
138
|
-
right: 0;
|
|
139
|
-
}
|
|
140
|
-
.icons {
|
|
141
|
-
display: grid;
|
|
142
|
-
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
|
|
143
|
-
gap: var(--spacing-m);
|
|
144
|
-
}
|
|
145
|
-
.heading {
|
|
146
|
-
font-size: var(--font-size-s);
|
|
147
|
-
font-weight: 600;
|
|
148
|
-
letter-spacing: 0.14px;
|
|
149
|
-
flex: 1 1 auto;
|
|
150
|
-
text-transform: uppercase;
|
|
151
|
-
grid-column: 1 / 5;
|
|
152
|
-
margin-bottom: var(--spacing-s);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.icon {
|
|
156
|
-
height: 16px;
|
|
157
|
-
width: 16px;
|
|
158
|
-
border-radius: 100%;
|
|
159
|
-
box-shadow: 0 0 0 1px var(--spectrum-global-color-gray-300);
|
|
160
|
-
position: relative;
|
|
161
|
-
}
|
|
162
|
-
.icon:hover {
|
|
163
|
-
cursor: pointer;
|
|
164
|
-
box-shadow: 0 0 2px 2px var(--spectrum-global-color-gray-300);
|
|
165
|
-
}
|
|
166
|
-
.custom {
|
|
167
|
-
display: grid;
|
|
168
|
-
grid-template-columns: 1fr auto;
|
|
169
|
-
align-items: center;
|
|
170
|
-
gap: var(--spacing-m);
|
|
171
|
-
margin-right: var(--spacing-xs);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.spectrum-wrapper {
|
|
175
|
-
background-color: transparent;
|
|
176
|
-
}
|
|
177
|
-
</style>
|
package/src/List/List.svelte
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import Detail from "../Typography/Detail.svelte"
|
|
3
|
-
|
|
4
|
-
export let title = null
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<div>
|
|
8
|
-
{#if title}
|
|
9
|
-
<div class="title">
|
|
10
|
-
<Detail>{title}</Detail>
|
|
11
|
-
</div>
|
|
12
|
-
{/if}
|
|
13
|
-
<div class="list-items">
|
|
14
|
-
<slot />
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<style>
|
|
19
|
-
.title {
|
|
20
|
-
margin-bottom: 6px;
|
|
21
|
-
}
|
|
22
|
-
.list-items {
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
justify-content: flex-start;
|
|
26
|
-
align-items: stretch;
|
|
27
|
-
}
|
|
28
|
-
</style>
|
package/src/List/ListItem.svelte
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import Body from "../Typography/Body.svelte"
|
|
3
|
-
import Icon from "../Icon/Icon.svelte"
|
|
4
|
-
import Label from "../Label/Label.svelte"
|
|
5
|
-
import Avatar from "../Avatar/Avatar.svelte"
|
|
6
|
-
|
|
7
|
-
export let icon = null
|
|
8
|
-
export let iconBackground = null
|
|
9
|
-
export let avatar = false
|
|
10
|
-
export let title = null
|
|
11
|
-
export let subtitle = null
|
|
12
|
-
|
|
13
|
-
$: initials = avatar ? title?.[0] : null
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<div class="list-item">
|
|
17
|
-
<div class="left">
|
|
18
|
-
{#if icon}
|
|
19
|
-
<div class="icon" style="background: {iconBackground || `transparent`};">
|
|
20
|
-
<Icon name={icon} size="S" color={iconBackground ? "white" : null} />
|
|
21
|
-
</div>
|
|
22
|
-
{/if}
|
|
23
|
-
{#if avatar}
|
|
24
|
-
<Avatar {initials} />
|
|
25
|
-
{/if}
|
|
26
|
-
{#if title}
|
|
27
|
-
<Body>{title}</Body>
|
|
28
|
-
{/if}
|
|
29
|
-
{#if subtitle}
|
|
30
|
-
<Label>{subtitle}</Label>
|
|
31
|
-
{/if}
|
|
32
|
-
</div>
|
|
33
|
-
<div class="right">
|
|
34
|
-
<slot />
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
<style>
|
|
39
|
-
.list-item {
|
|
40
|
-
padding: 0 16px;
|
|
41
|
-
height: 56px;
|
|
42
|
-
background: var(--spectrum-alias-background-color-tertiary);
|
|
43
|
-
display: flex;
|
|
44
|
-
flex-direction: row;
|
|
45
|
-
justify-content: space-between;
|
|
46
|
-
border: 1px solid var(--spectrum-global-color-gray-300);
|
|
47
|
-
}
|
|
48
|
-
.list-item:not(:first-child) {
|
|
49
|
-
border-top: none;
|
|
50
|
-
}
|
|
51
|
-
.list-item:first-child {
|
|
52
|
-
border-top-left-radius: 4px;
|
|
53
|
-
border-top-right-radius: 4px;
|
|
54
|
-
}
|
|
55
|
-
.list-item:last-child {
|
|
56
|
-
border-bottom-left-radius: 4px;
|
|
57
|
-
border-bottom-right-radius: 4px;
|
|
58
|
-
}
|
|
59
|
-
.left,
|
|
60
|
-
.right {
|
|
61
|
-
display: flex;
|
|
62
|
-
flex-direction: row;
|
|
63
|
-
align-items: center;
|
|
64
|
-
gap: var(--spacing-xl);
|
|
65
|
-
}
|
|
66
|
-
.left {
|
|
67
|
-
width: 0;
|
|
68
|
-
flex: 1 1 auto;
|
|
69
|
-
}
|
|
70
|
-
.right {
|
|
71
|
-
flex: 0 0 auto;
|
|
72
|
-
}
|
|
73
|
-
.list-item :global(.spectrum-Icon),
|
|
74
|
-
.list-item :global(.spectrum-Avatar) {
|
|
75
|
-
flex: 0 0 auto;
|
|
76
|
-
}
|
|
77
|
-
.list-item :global(.spectrum-Body) {
|
|
78
|
-
color: var(--spectrum-global-color-gray-900);
|
|
79
|
-
}
|
|
80
|
-
.list-item :global(.spectrum-Body) {
|
|
81
|
-
white-space: nowrap;
|
|
82
|
-
overflow: hidden;
|
|
83
|
-
text-overflow: ellipsis;
|
|
84
|
-
}
|
|
85
|
-
.icon {
|
|
86
|
-
width: var(--spectrum-alias-avatar-size-400);
|
|
87
|
-
height: var(--spectrum-alias-avatar-size-400);
|
|
88
|
-
display: grid;
|
|
89
|
-
place-items: center;
|
|
90
|
-
border-radius: 50%;
|
|
91
|
-
}
|
|
92
|
-
</style>
|