@budibase/bbui 1.58.13 → 2.0.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/LICENSE +375 -0
- package/dist/bbui.es.js +14 -0
- package/dist/bbui.es.js.map +1 -0
- package/package.json +68 -32
- package/src/ActionButton/ActionButton.svelte +102 -0
- package/src/ActionGroup/ActionGroup.svelte +26 -0
- package/src/ActionMenu/ActionMenu.svelte +44 -0
- package/src/Actions/autoresize_textarea.js +9 -9
- package/src/Actions/click_outside.js +5 -5
- package/src/Actions/position_dropdown.js +46 -37
- package/src/Avatar/Avatar.svelte +62 -0
- package/src/Badge/Badge.svelte +29 -0
- package/src/Banner/Banner.svelte +72 -0
- package/src/Banner/BannerDisplay.svelte +41 -0
- package/src/Button/Button.svelte +102 -200
- package/src/ButtonGroup/ButtonGroup.svelte +30 -0
- package/src/ClearButton/ClearButton.svelte +19 -0
- package/src/ColorPicker/ColorPicker.svelte +297 -0
- package/src/DetailSummary/DetailSummary.svelte +83 -0
- package/src/Divider/Divider.svelte +28 -0
- package/src/Drawer/Drawer.svelte +76 -51
- package/src/Drawer/DrawerContent.svelte +46 -0
- package/src/Form/Checkbox.svelte +21 -132
- package/src/Form/Combobox.svelte +45 -0
- package/src/Form/Core/Checkbox.svelte +69 -0
- package/src/Form/Core/CheckboxGroup.svelte +68 -0
- package/src/Form/Core/Combobox.svelte +142 -0
- package/src/Form/Core/DatePicker.svelte +257 -0
- package/src/Form/Core/Dropzone.svelte +453 -0
- package/src/Form/Core/InputDropdown.svelte +228 -0
- package/src/Form/Core/Multiselect.svelte +90 -0
- package/src/Form/Core/Picker.svelte +259 -0
- package/src/Form/Core/PickerDropdown.svelte +415 -0
- package/src/Form/Core/RadioGroup.svelte +48 -0
- package/src/Form/Core/RichTextField.svelte +42 -0
- package/src/Form/Core/Search.svelte +105 -0
- package/src/Form/Core/Select.svelte +75 -0
- package/src/Form/Core/Slider.svelte +86 -0
- package/src/Form/Core/Stepper.svelte +172 -0
- package/src/Form/Core/Switch.svelte +37 -0
- package/src/Form/Core/TextArea.svelte +78 -0
- package/src/Form/Core/TextField.svelte +119 -0
- package/src/Form/Core/index.js +15 -0
- package/src/Form/DatePicker.svelte +39 -0
- package/src/Form/Dropzone.svelte +42 -0
- package/src/Form/Field.svelte +42 -0
- package/src/Form/FieldLabel.svelte +32 -0
- package/src/Form/Input.svelte +41 -187
- package/src/Form/InputDropdown.svelte +55 -0
- package/src/Form/Multiselect.svelte +36 -320
- package/src/Form/PickerDropdown.svelte +132 -0
- package/src/Form/RadioGroup.svelte +42 -0
- package/src/Form/RichTextField.svelte +36 -0
- package/src/Form/Search.svelte +36 -0
- package/src/Form/Select.svelte +48 -88
- package/src/Form/Slider.svelte +16 -91
- package/src/Form/Stepper.svelte +45 -0
- package/src/Form/TextArea.svelte +30 -128
- package/src/Form/Toggle.svelte +20 -110
- package/src/Icon/Icon.svelte +91 -0
- package/src/Icon/IconAvatar.svelte +58 -0
- package/src/IconPicker/IconPicker.svelte +177 -0
- package/src/IconSideNav/IconSideNav.svelte +14 -0
- package/src/IconSideNav/IconSideNavItem.svelte +56 -0
- package/src/InlineAlert/InlineAlert.svelte +60 -0
- package/src/Label/Label.svelte +29 -0
- package/src/Layout/Layout.svelte +94 -0
- package/src/Layout/Page.svelte +32 -0
- package/src/Link/Link.svelte +24 -0
- package/src/List/List.svelte +28 -0
- package/src/List/ListItem.svelte +90 -0
- package/src/Markdown/MarkdownEditor.svelte +60 -0
- package/src/Markdown/MarkdownViewer.svelte +70 -0
- package/src/Markdown/SpectrumMDE.svelte +184 -0
- package/src/Menu/Item.svelte +96 -0
- package/src/Menu/Menu.svelte +7 -0
- package/src/Menu/Menu.svench +19 -0
- package/src/Menu/Section.svelte +10 -0
- package/src/Menu/Separator.svelte +1 -0
- package/src/Modal/Content.svelte +0 -11
- package/src/Modal/CustomContent.svelte +9 -6
- package/src/Modal/Modal.svelte +104 -51
- package/src/Modal/ModalContent.svelte +131 -73
- package/src/Modal/QuizModal.svelte +16 -17
- package/src/Notification/Notification.svelte +70 -0
- package/src/Notification/NotificationDisplay.svelte +43 -0
- package/src/Pagination/Pagination.svelte +57 -0
- package/src/Popover/Popover.svelte +43 -33
- package/src/ProgressBar/ProgressBar.svelte +67 -0
- package/src/ProgressCircle/ProgressCircle.svelte +62 -0
- package/src/SideNavigation/Item.svelte +61 -0
- package/src/SideNavigation/Navigation.svelte +12 -0
- package/src/StatusLight/StatusLight.svelte +80 -0
- package/src/Stores/Notifications.svench.svx +1 -1
- package/src/Stores/banner.js +65 -0
- package/src/Stores/notifications.js +75 -38
- package/src/Table/ArrayRenderer.svelte +17 -0
- package/src/Table/AttachmentRenderer.svelte +73 -0
- package/src/Table/BoldRenderer.svelte +15 -0
- package/src/Table/BooleanRenderer.svelte +42 -0
- package/src/Table/CellRenderer.svelte +69 -0
- package/src/Table/CodeRenderer.svelte +14 -0
- package/src/Table/DateTimeRenderer.svelte +29 -0
- package/src/Table/InternalRenderer.svelte +24 -0
- package/src/Table/RelationshipRenderer.svelte +40 -0
- package/src/Table/SelectEditRenderer.svelte +28 -0
- package/src/Table/StringRenderer.svelte +14 -0
- package/src/Table/Table.svelte +635 -0
- package/src/Table/index.js +1 -0
- package/src/Tabs/Tab.svelte +88 -0
- package/src/Tabs/Tabs.svelte +130 -0
- package/src/Tags/Tag.svelte +43 -0
- package/src/Tags/Tags.svelte +7 -0
- package/src/Tooltip/Tooltip.svelte +34 -0
- package/src/Tooltip/TooltipWrapper.svelte +60 -0
- package/src/TreeView/Item.svelte +41 -0
- package/src/TreeView/Tree.svelte +16 -0
- package/src/Typography/Body.svelte +21 -0
- package/src/Typography/Code.svelte +10 -0
- package/src/Typography/Detail.svelte +19 -0
- package/src/Typography/Heading.svelte +17 -0
- package/{dist → src}/bbui.css +2 -99
- package/src/context.js +1 -1
- package/src/helpers.js +134 -0
- package/src/index.js +95 -40
- package/src/spectrum-icons-rollup.js +31 -0
- package/src/spectrum-icons-vite.js +31 -0
- package/dist/dist/bundle.css +0 -42
- package/dist/dist/bundle.css.map +0 -64
- package/dist/index.js +0 -36193
- package/dist/index.mjs +0 -36147
- package/src/Button/Close.svelte +0 -59
- package/src/Button/Close.svench +0 -36
- package/src/Button/TextButton.svelte +0 -128
- package/src/Button/TextButton.svench +0 -69
- package/src/DatePicker/DatePicker.svelte +0 -45
- package/src/DatePicker/DatePicker.svench +0 -17
- package/src/DropdownMenu/DropdownMenu.svelte +0 -77
- package/src/DropdownMenu/DropdownMenu.svench +0 -161
- package/src/Dropzone/Dropzone.svelte +0 -294
- package/src/Dropzone/Dropzone.svench +0 -17
- package/src/Dropzone/fileTypes.js +0 -5
- package/src/Form/Checkbox.svench.svx +0 -67
- package/src/Form/DataList.svelte +0 -158
- package/src/Form/DataList.svench +0 -57
- package/src/Form/Input.svench +0 -62
- package/src/Form/Multiselect.svench +0 -63
- package/src/Form/Radio.svelte +0 -133
- package/src/Form/Radio.svench.svx +0 -64
- package/src/Form/RichText.svelte +0 -61
- package/src/Form/RichText.svench.svx +0 -40
- package/src/Form/Select.svench +0 -62
- package/src/Form/Slider.svench +0 -26
- package/src/Form/TextArea.svench +0 -30
- package/src/Form/Toggle.svench +0 -21
- package/src/Icons/Contribution.svelte +0 -14
- package/src/Icons/Icon.svelte +0 -36
- package/src/Icons/Icon.svench +0 -109
- package/src/Icons/icon-paths.js +0 -136
- package/src/Links/Home.svelte +0 -51
- package/src/Links/Home.svench +0 -19
- package/src/List/Items/DetailSummary.svelte +0 -85
- package/src/List/Items/DetailSummary.svench +0 -53
- package/src/List/Search.svelte +0 -34
- package/src/List/Search.svench +0 -8
- package/src/Spacer/Spacer.svelte +0 -50
- package/src/Spacer/Spacer.svench +0 -51
- package/src/Styleguide/Body.svelte +0 -72
- package/src/Styleguide/Borders.svench +0 -175
- package/src/Styleguide/Budibase-logo.svelte +0 -68
- package/src/Styleguide/Color.svench +0 -201
- package/src/Styleguide/Heading.svelte +0 -74
- package/src/Styleguide/Label.svelte +0 -70
- package/src/Styleguide/Logo.svelte +0 -16
- package/src/Styleguide/Logo.svench +0 -8
- package/src/Styleguide/Spacing.svench +0 -191
- package/src/Styleguide/Typography.svench +0 -227
- package/src/Switcher/Switcher.svelte +0 -47
- package/src/Switcher/Switcher.svench +0 -27
- package/src/index.svench.svx +0 -35
- package/src/utils/buildStyle.js +0 -14
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { View } from "svench";
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<h1>2 Scales, 1 Spatial System</h1>
|
|
6
|
-
<p>Budibase has 2 scales, spacing and layout, and follows a 4pt grid system.</p>
|
|
7
|
-
<p><strong>Spacing</strong> is used for smaller, more refined spacing needs, specifically within the context of a component.</p>
|
|
8
|
-
<p><strong>Layout</strong> is used for laying out your page and positing components within that page.</p>
|
|
9
|
-
<p>Spacing and layout will mostly exist alongside margin and padding.</p>
|
|
10
|
-
<p><code>margin: var(--spacing-s);</code></p>
|
|
11
|
-
<code>padding: var(--spacing-s) var(--spacing-l);</code>
|
|
12
|
-
|
|
13
|
-
<hr>
|
|
14
|
-
|
|
15
|
-
<h2>Spacing</h2>
|
|
16
|
-
|
|
17
|
-
<table>
|
|
18
|
-
<tr>
|
|
19
|
-
<th>Var</th>
|
|
20
|
-
<th>rem</th>
|
|
21
|
-
<th>px</th>
|
|
22
|
-
<th>Visual</th>
|
|
23
|
-
</tr>
|
|
24
|
-
<tr>
|
|
25
|
-
<td>var(--spacing-xs)</td>
|
|
26
|
-
<td>0.25</td>
|
|
27
|
-
<td>4</td>
|
|
28
|
-
<td><div class="xs"></div></td>
|
|
29
|
-
</tr>
|
|
30
|
-
<tr>
|
|
31
|
-
<td>var(--spacing-s)</td>
|
|
32
|
-
<td>0.5</td>
|
|
33
|
-
<td>8</td>
|
|
34
|
-
<td><div class="s"></div></td>
|
|
35
|
-
</tr>
|
|
36
|
-
<tr>
|
|
37
|
-
<td>var(--spacing-m)</td>
|
|
38
|
-
<td>.75</td>
|
|
39
|
-
<td>12</td>
|
|
40
|
-
<td><div class="m"></div></td>
|
|
41
|
-
</tr>
|
|
42
|
-
<tr>
|
|
43
|
-
<td>var(--spacing-l)</td>
|
|
44
|
-
<td>1</td>
|
|
45
|
-
<td>16</td>
|
|
46
|
-
<td><div class="l"></div></td>
|
|
47
|
-
</tr>
|
|
48
|
-
<tr>
|
|
49
|
-
<td>var(--spacing-xl)</td>
|
|
50
|
-
<td>1.25</td>
|
|
51
|
-
<td>20</td>
|
|
52
|
-
<td><div class="xl"></div></td>
|
|
53
|
-
</tr>
|
|
54
|
-
</table>
|
|
55
|
-
|
|
56
|
-
<hr>
|
|
57
|
-
|
|
58
|
-
<h2>Layout</h2>
|
|
59
|
-
|
|
60
|
-
<table>
|
|
61
|
-
<tr>
|
|
62
|
-
<th>Var</th>
|
|
63
|
-
<th>rem</th>
|
|
64
|
-
<th>px</th>
|
|
65
|
-
<th>Visual</th>
|
|
66
|
-
</tr>
|
|
67
|
-
<tr>
|
|
68
|
-
<td>var(--layout-xs)</td>
|
|
69
|
-
<td>1.25</td>
|
|
70
|
-
<td>20</td>
|
|
71
|
-
<td><div class="layout-xs"></div></td>
|
|
72
|
-
</tr>
|
|
73
|
-
<tr>
|
|
74
|
-
<td>var(--layout-s)</td>
|
|
75
|
-
<td>1.5</td>
|
|
76
|
-
<td>24</td>
|
|
77
|
-
<td><div class="layout-s"></div></td>
|
|
78
|
-
</tr>
|
|
79
|
-
<tr>
|
|
80
|
-
<td>var(--layout-m)</td>
|
|
81
|
-
<td>2</td>
|
|
82
|
-
<td>32</td>
|
|
83
|
-
<td><div class="layout-m"></div></td>
|
|
84
|
-
</tr>
|
|
85
|
-
<tr>
|
|
86
|
-
<td>var(--layout-l)</td>
|
|
87
|
-
<td>3</td>
|
|
88
|
-
<td>48</td>
|
|
89
|
-
<td><div class="layout-l"></div></td>
|
|
90
|
-
</tr>
|
|
91
|
-
<tr>
|
|
92
|
-
<td>var(--layout-xl)</td>
|
|
93
|
-
<td>4</td>
|
|
94
|
-
<td>64</td>
|
|
95
|
-
<td><div class="layout-xl"></div></td>
|
|
96
|
-
</tr>
|
|
97
|
-
</table>
|
|
98
|
-
|
|
99
|
-
<style>
|
|
100
|
-
|
|
101
|
-
table {
|
|
102
|
-
font-family: var(--font-sans);
|
|
103
|
-
border-collapse: collapse;
|
|
104
|
-
width: 100%;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
code {
|
|
108
|
-
display: inline-block;
|
|
109
|
-
box-sizing: border-box;
|
|
110
|
-
padding: var(--spacing-s) var(--spacing-l);
|
|
111
|
-
margin: var(--spacing-s) 0;
|
|
112
|
-
background-color: var(--grey-2);
|
|
113
|
-
color: var(--red-dark);
|
|
114
|
-
border-radius: var(--spacing-xs);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
td, th {
|
|
118
|
-
border: 1px solid var(--grey-4);
|
|
119
|
-
text-align: left;
|
|
120
|
-
padding: var(--spacing-m);
|
|
121
|
-
width: 25%;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
tr:nth-child(even) {
|
|
125
|
-
background-color: var(--grey-3);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
hr {
|
|
129
|
-
margin: var(--layout-xl) 0px;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.xs {
|
|
133
|
-
height: var(--spacing-xs);
|
|
134
|
-
width: var(--spacing-xs);
|
|
135
|
-
background-color: var(--purple);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.s {
|
|
139
|
-
height: var(--spacing-s);
|
|
140
|
-
width: var(--spacing-s);
|
|
141
|
-
background-color: var(--purple);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.m {
|
|
145
|
-
height: var(--spacing-m);
|
|
146
|
-
width: var(--spacing-m);
|
|
147
|
-
background-color: var(--purple);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.l {
|
|
151
|
-
height: var(--spacing-l);
|
|
152
|
-
width: var(--spacing-l);
|
|
153
|
-
background-color: var(--purple);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.xl {
|
|
157
|
-
height: var(--spacing-xl);
|
|
158
|
-
width: var(--spacing-xl);
|
|
159
|
-
background-color: var(--purple);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.layout-xs {
|
|
163
|
-
height: var(--layout-xs);
|
|
164
|
-
width: var(--layout-xs);
|
|
165
|
-
background-color: var(--blue);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.layout-s {
|
|
169
|
-
height: var(--layout-s);
|
|
170
|
-
width: var(--layout-s);
|
|
171
|
-
background-color: var(--blue);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.layout-m {
|
|
175
|
-
height: var(--layout-m);
|
|
176
|
-
width: var(--layout-m);
|
|
177
|
-
background-color: var(--blue);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.layout-l {
|
|
181
|
-
height: var(--layout-l);
|
|
182
|
-
width: var(--layout-l);
|
|
183
|
-
background-color: var(--blue);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.layout-xl {
|
|
187
|
-
height: var(--layout-xl);
|
|
188
|
-
width: var(--layout-xl);
|
|
189
|
-
background-color: var(--blue);
|
|
190
|
-
}
|
|
191
|
-
</style>
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { View } from "svench";
|
|
3
|
-
import Heading from "./Heading.svelte";
|
|
4
|
-
import Body from "./Body.svelte";
|
|
5
|
-
import Label from "./Label.svelte";
|
|
6
|
-
|
|
7
|
-
const username = "bbuserexample";
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<style>
|
|
11
|
-
.typography-container {
|
|
12
|
-
display: grid;
|
|
13
|
-
grid-template-columns: 1fr 1fr;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.typography-column {
|
|
17
|
-
padding: var(--spacing-l);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.typography-column--grey {
|
|
21
|
-
background-color: var(--grey-5);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.label-wrapper {
|
|
25
|
-
padding: var(--spacing-m);
|
|
26
|
-
}
|
|
27
|
-
</style>
|
|
28
|
-
|
|
29
|
-
<h1 class="bb-heading bb-heading--large bb-heading--heavy">Typography</h1>
|
|
30
|
-
<p>
|
|
31
|
-
Budibase uses Inter as its typeface and three types can be used,
|
|
32
|
-
<strong>heading</strong>
|
|
33
|
-
,
|
|
34
|
-
<strong>body</strong>
|
|
35
|
-
and
|
|
36
|
-
<strong>label</strong>
|
|
37
|
-
</p>
|
|
38
|
-
<p>Each type has 5 sizes, xs, s, m l and xl.</p>
|
|
39
|
-
<p>Each type is available in the colors white, grey or black.</p>
|
|
40
|
-
|
|
41
|
-
<View name="Heading">
|
|
42
|
-
<div class="typography-container">
|
|
43
|
-
<div class="typography-column">
|
|
44
|
-
<Heading extraLarge black>Heading Extra Large Black</Heading>
|
|
45
|
-
|
|
46
|
-
<Heading large black>Heading Large Black</Heading>
|
|
47
|
-
|
|
48
|
-
<Heading medium black>Heading Medium Black</Heading>
|
|
49
|
-
|
|
50
|
-
<Heading small black>Heading Small Black</Heading>
|
|
51
|
-
|
|
52
|
-
<Heading extraSmall black>Heading Extra Small Black</Heading>
|
|
53
|
-
</div>
|
|
54
|
-
|
|
55
|
-
<div class="typography-column">
|
|
56
|
-
<Heading extraLarge grey>Heading Extra Large Grey</Heading>
|
|
57
|
-
|
|
58
|
-
<Heading large grey>Heading Large Grey</Heading>
|
|
59
|
-
|
|
60
|
-
<Heading medium grey>Heading Medium Grey</Heading>
|
|
61
|
-
|
|
62
|
-
<Heading small grey>Heading Small Grey</Heading>
|
|
63
|
-
|
|
64
|
-
<Heading extraSmall grey>Heading Extra Small Grey</Heading>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<div class="typography-column typography-column--grey">
|
|
68
|
-
<Heading extraLarge white>Heading Extra Large White</Heading>
|
|
69
|
-
|
|
70
|
-
<Heading large white>Heading Large White</Heading>
|
|
71
|
-
|
|
72
|
-
<Heading medium white>Heading Medium White</Heading>
|
|
73
|
-
|
|
74
|
-
<Heading small white>Heading Small White</Heading>
|
|
75
|
-
|
|
76
|
-
<Heading extraSmall white>Heading Extra Small White</Heading>
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
<div class="typography-column">
|
|
80
|
-
<Heading extraLarge black lh>Heading Extra Large Black Line Height</Heading>
|
|
81
|
-
|
|
82
|
-
<Heading large black lh>Heading Large Black Line Height</Heading>
|
|
83
|
-
|
|
84
|
-
<Heading medium black lh>Heading Medium Black Line Height</Heading>
|
|
85
|
-
|
|
86
|
-
<Heading small black lh>Heading Small Black Line Height</Heading>
|
|
87
|
-
|
|
88
|
-
<Heading extraSmall black lh>Heading Extra Small Black Line Height</Heading>
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</View>
|
|
92
|
-
|
|
93
|
-
<View name="Body">
|
|
94
|
-
<div class="typography-container">
|
|
95
|
-
<div class="typography-column">
|
|
96
|
-
<Body extraLarge black>Body Extra Large Black</Body>
|
|
97
|
-
|
|
98
|
-
<Body large black>Body Large Black</Body>
|
|
99
|
-
|
|
100
|
-
<Body medium black>Body Medium Black</Body>
|
|
101
|
-
|
|
102
|
-
<Body small black>Body Small Black</Body>
|
|
103
|
-
|
|
104
|
-
<Body extraSmall black>Body Extra Small Black</Body>
|
|
105
|
-
</div>
|
|
106
|
-
|
|
107
|
-
<div class="typography-column">
|
|
108
|
-
<Body extraLarge lh black>Body Extra Large Black Line-height</Body>
|
|
109
|
-
|
|
110
|
-
<Body large lh black>Body Large Black Line-height</Body>
|
|
111
|
-
|
|
112
|
-
<Body medium lh black>Body Medium Black Line-height</Body>
|
|
113
|
-
|
|
114
|
-
<Body small lh black>Body Small Black Line-height</Body>
|
|
115
|
-
|
|
116
|
-
<Body extraSmall lh black>Body Extra Small Black Line-height</Body>
|
|
117
|
-
</div>
|
|
118
|
-
|
|
119
|
-
<div class="typography-column">
|
|
120
|
-
<Body extraLarge grey>Body Extra Large Grey</Body>
|
|
121
|
-
|
|
122
|
-
<Body large grey>Body Large Grey</Body>
|
|
123
|
-
|
|
124
|
-
<Body medium grey>Body Medium Grey</Body>
|
|
125
|
-
|
|
126
|
-
<Body small grey>Body Small Grey</Body>
|
|
127
|
-
|
|
128
|
-
<Body extraSmall grey>Body Extra Small Grey</Body>
|
|
129
|
-
</div>
|
|
130
|
-
|
|
131
|
-
<div class="typography-column typography-column--grey">
|
|
132
|
-
<Body extraLarge white>Body Extra Large White</Body>
|
|
133
|
-
|
|
134
|
-
<Body large white>Body Large White</Body>
|
|
135
|
-
|
|
136
|
-
<Body medium white>Body Medium White</Body>
|
|
137
|
-
|
|
138
|
-
<Body small white>Body Small White</Body>
|
|
139
|
-
|
|
140
|
-
<Body extraSmall white>Body Extra Small White</Body>
|
|
141
|
-
</div>
|
|
142
|
-
</div>
|
|
143
|
-
</View>
|
|
144
|
-
|
|
145
|
-
<View name="Label">
|
|
146
|
-
<div class="typography-container">
|
|
147
|
-
<div class="label-wrapper">
|
|
148
|
-
<Label extraLarge black forAttr={username}>Label Extra Large Black</Label>
|
|
149
|
-
<input type="text" />
|
|
150
|
-
</div>
|
|
151
|
-
|
|
152
|
-
<div class="label-wrapper">
|
|
153
|
-
<Label large black forAttr={username}>Label Large Black</Label>
|
|
154
|
-
<input type="text" />
|
|
155
|
-
</div>
|
|
156
|
-
|
|
157
|
-
<div class="label-wrapper">
|
|
158
|
-
<Label medium black forAttr={username}>Label Medium Black</Label>
|
|
159
|
-
<input type="text" />
|
|
160
|
-
</div>
|
|
161
|
-
|
|
162
|
-
<div class="label-wrapper">
|
|
163
|
-
<Label small black forAttr={username}>Label Small Black</Label>
|
|
164
|
-
<input type="text" />
|
|
165
|
-
</div>
|
|
166
|
-
|
|
167
|
-
<div class="label-wrapper">
|
|
168
|
-
<Label extraSmall black forAttr={username}>Label Extra Small Black</Label>
|
|
169
|
-
<input type="text" />
|
|
170
|
-
</div>
|
|
171
|
-
</div>
|
|
172
|
-
|
|
173
|
-
<div class="typography-container">
|
|
174
|
-
<div class="label-wrapper">
|
|
175
|
-
<Label extraLarge grey forAttr={username}>Label Extra Large Grey</Label>
|
|
176
|
-
<input type="text" />
|
|
177
|
-
</div>
|
|
178
|
-
|
|
179
|
-
<div class="label-wrapper">
|
|
180
|
-
<Label large grey forAttr={username}>Label Large Grey</Label>
|
|
181
|
-
<input type="text" />
|
|
182
|
-
</div>
|
|
183
|
-
|
|
184
|
-
<div class="label-wrapper">
|
|
185
|
-
<Label medium grey forAttr={username}>Label Medium Grey</Label>
|
|
186
|
-
<input type="text" />
|
|
187
|
-
</div>
|
|
188
|
-
|
|
189
|
-
<div class="label-wrapper">
|
|
190
|
-
<Label small grey forAttr={username}>Label Small Grey</Label>
|
|
191
|
-
<input type="text" />
|
|
192
|
-
</div>
|
|
193
|
-
|
|
194
|
-
<div class="label-wrapper">
|
|
195
|
-
<Label extraSmall grey forAttr={username}>Label Extra Small Grey</Label>
|
|
196
|
-
<input type="text" />
|
|
197
|
-
</div>
|
|
198
|
-
</div>
|
|
199
|
-
|
|
200
|
-
<div class="typography-container typography-column--grey">
|
|
201
|
-
<div class="label-wrapper">
|
|
202
|
-
<Label extraLarge white forAttr={username}>Label Extra Large White</Label>
|
|
203
|
-
<input type="text" />
|
|
204
|
-
</div>
|
|
205
|
-
|
|
206
|
-
<div class="label-wrapper">
|
|
207
|
-
<Label large white forAttr={username}>Label Large White</Label>
|
|
208
|
-
|
|
209
|
-
<input type="text" />
|
|
210
|
-
</div>
|
|
211
|
-
|
|
212
|
-
<div class="label-wrapper">
|
|
213
|
-
<Label medium white forAttr={username}>Label Medium White</Label>
|
|
214
|
-
<input type="text" />
|
|
215
|
-
</div>
|
|
216
|
-
|
|
217
|
-
<div class="label-wrapper">
|
|
218
|
-
<Label small white forAttr={username}>Label Small White</Label>
|
|
219
|
-
<input type="text" />
|
|
220
|
-
</div>
|
|
221
|
-
|
|
222
|
-
<div class="label-wrapper">
|
|
223
|
-
<Label extraSmall white forAttr={username}>Label Extra Small White</Label>
|
|
224
|
-
<input type="text" />
|
|
225
|
-
</div>
|
|
226
|
-
</div>
|
|
227
|
-
</View>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { createEventDispatcher } from "svelte";
|
|
3
|
-
|
|
4
|
-
const dispatch = createEventDispatcher();
|
|
5
|
-
|
|
6
|
-
export let headings;
|
|
7
|
-
export let value;
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<style>
|
|
11
|
-
header {
|
|
12
|
-
font-family: var(--font-sans);
|
|
13
|
-
display: flex;
|
|
14
|
-
margin-bottom: var(--spacing-l);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
span {
|
|
18
|
-
margin-right: var(--spacing-xl);
|
|
19
|
-
font-size: var(--font-size-m);
|
|
20
|
-
font-weight: 500;
|
|
21
|
-
color: var(--grey-5);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
span:hover {
|
|
25
|
-
cursor: pointer;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.selected {
|
|
29
|
-
color: var(--ink);
|
|
30
|
-
}
|
|
31
|
-
</style>
|
|
32
|
-
|
|
33
|
-
<section>
|
|
34
|
-
<header>
|
|
35
|
-
{#each headings as heading}
|
|
36
|
-
<span
|
|
37
|
-
class:selected={value === heading.key}
|
|
38
|
-
on:click={() => {
|
|
39
|
-
value = heading.key
|
|
40
|
-
dispatch("change", { heading })
|
|
41
|
-
}}>
|
|
42
|
-
{heading.title}
|
|
43
|
-
</span>
|
|
44
|
-
{/each}
|
|
45
|
-
</header>
|
|
46
|
-
<slot />
|
|
47
|
-
</section>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { View } from "svench";
|
|
3
|
-
import Switcher from "./Switcher.svelte";
|
|
4
|
-
|
|
5
|
-
const items = [
|
|
6
|
-
{
|
|
7
|
-
title: "Apps",
|
|
8
|
-
key: "APPS"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
title: "Deploy",
|
|
12
|
-
key: "DEPLOY"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
title: "Settings",
|
|
16
|
-
key: "SETTINGS"
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
|
|
20
|
-
let value = "APPS"
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<View name="default">
|
|
24
|
-
<Switcher headings={items} bind:value={value}>
|
|
25
|
-
Content
|
|
26
|
-
</Switcher>
|
|
27
|
-
</View>
|
package/src/index.svench.svx
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<article>
|
|
2
|
-
<h1>
|
|
3
|
-
<span class="icon">🔬</span>
|
|
4
|
-
Svench
|
|
5
|
-
</h1>
|
|
6
|
-
|
|
7
|
-
## This is your workbench.
|
|
8
|
-
|
|
9
|
-
This is a [Svench](https://github.com/rixo/svench) project, created with [Svench's component template](https://github.com/rixo/svench-component-template).
|
|
10
|
-
|
|
11
|
-
Edit <code>index.svench.svx</code> to customize this page.
|
|
12
|
-
|
|
13
|
-
Check `example` for inspiration.
|
|
14
|
-
</article>
|
|
15
|
-
|
|
16
|
-
<style>
|
|
17
|
-
article > * {
|
|
18
|
-
text-align: center;
|
|
19
|
-
margin-top: 3em;
|
|
20
|
-
}
|
|
21
|
-
h1 {
|
|
22
|
-
font-size: 3em;
|
|
23
|
-
margin-top: 1em;
|
|
24
|
-
color: var(--gray);
|
|
25
|
-
}
|
|
26
|
-
h1 .icon {
|
|
27
|
-
opacity: 0.5;
|
|
28
|
-
display: inline-block;
|
|
29
|
-
transform: rotateY(180deg);
|
|
30
|
-
margin-left: -0.6em;
|
|
31
|
-
width: 0.6em;
|
|
32
|
-
font-weight: normal;
|
|
33
|
-
font-size: 1.25em;
|
|
34
|
-
}
|
|
35
|
-
</style>
|
package/src/utils/buildStyle.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export default function buildStyle(styles) {
|
|
2
|
-
const convertCamel = (str) => {
|
|
3
|
-
return str.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`);
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
let str = "";
|
|
7
|
-
for (let s in styles) {
|
|
8
|
-
if (styles[s]) {
|
|
9
|
-
let key = convertCamel(s);
|
|
10
|
-
str += `${key}: ${styles[s]}; `;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return str;
|
|
14
|
-
}
|