@budibase/bbui 1.4.1 → 1.4.2
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/README.md +19 -17
- package/dist/bbui.es.js +14 -0
- package/dist/bbui.es.js.map +1 -0
- package/package.json +71 -26
- package/src/ActionButton/ActionButton.svelte +102 -0
- package/src/ActionGroup/ActionGroup.svelte +26 -0
- package/src/ActionMenu/ActionMenu.svelte +44 -0
- package/src/Actions/ClickOutside.svench.svx +30 -0
- package/src/Actions/PositionDropdown.svench.svx +81 -0
- package/src/Actions/autoresize_textarea.js +14 -0
- package/src/Actions/click_outside.js +18 -0
- package/src/Actions/position_dropdown.js +75 -0
- 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 +114 -0
- package/src/Button/Button.svench +138 -0
- 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 +113 -0
- package/src/Drawer/Drawer.svench +42 -0
- package/src/Drawer/DrawerContent.svelte +46 -0
- package/src/Form/Checkbox.svelte +23 -0
- 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 +450 -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 +436 -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 +40 -45
- package/src/Form/InputDropdown.svelte +55 -0
- package/src/Form/Multiselect.svelte +40 -0
- package/src/Form/PickerDropdown.svelte +134 -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 -43
- package/src/Form/Slider.svelte +24 -0
- package/src/Form/Stepper.svelte +45 -0
- package/src/Form/TextArea.svelte +29 -44
- package/src/Form/Toggle.svelte +23 -0
- package/src/Icon/Icon.svelte +91 -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 +98 -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 +6 -0
- package/src/Modal/CustomContent.svelte +38 -0
- package/src/Modal/Modal.svelte +165 -0
- package/src/Modal/Modal.svench +117 -0
- package/src/Modal/ModalContent.svelte +190 -0
- package/src/Modal/QuizModal.svelte +54 -0
- 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 +78 -0
- package/src/Popover/Popover.svench +121 -0
- 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 +78 -0
- package/src/Stores/banner.js +65 -0
- package/src/Stores/notifications.js +84 -0
- package/src/Table/ArrayRenderer.svelte +17 -0
- package/src/Table/AttachmentRenderer.svelte +67 -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/src/bbui.css +96 -0
- package/src/context.js +3 -0
- package/src/helpers.js +134 -0
- package/src/index.js +98 -12
- package/src/spectrum-icons-rollup.js +31 -0
- package/src/spectrum-icons-vite.js +31 -0
- package/dist/bundle.css +0 -8
- package/dist/bundle.css.map +0 -22
- package/dist/index.js +0 -1275
- package/dist/index.mjs +0 -1260
- package/src/Branding/Budibase-logo.svelte +0 -68
- package/src/Branding/Logo.svelte +0 -16
- package/src/Branding/Logo.svench +0 -8
- package/src/Form/Button.svelte +0 -131
- package/src/Form/Button.svench +0 -49
- package/src/Form/Input.svench +0 -8
- package/src/Form/Select.svench +0 -8
- package/src/Form/TextArea.svench +0 -8
- package/src/Links/Home.svelte +0 -49
- package/src/Links/Home.svench +0 -19
- package/src/List/Items/DetailSummary.svelte +0 -66
- package/src/List/Items/DetailSummary.svench +0 -15
- package/src/Switcher/Switcher.svelte +0 -39
- package/src/Switcher/Switcher.svench +0 -25
- package/src/actions/autoresize_textarea.js +0 -14
- package/src/icons/Contribution.svelte +0 -14
- package/src/index.svench.svx +0 -35
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
version="1.1"
|
|
3
|
-
id="Layer_1"
|
|
4
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
6
|
-
x="0px"
|
|
7
|
-
y="0px"
|
|
8
|
-
viewBox="0 0 115 40"
|
|
9
|
-
style="enable-background:new 0 0 115 40;"
|
|
10
|
-
xml:space="preserve">
|
|
11
|
-
<path
|
|
12
|
-
class="st0"
|
|
13
|
-
d="M111.16,40H3.91c-2.15,0-3.89-1.74-3.89-3.89V4.04c0-2.15,1.74-3.89,3.89-3.89h107.25
|
|
14
|
-
c2.15,0,3.89,1.74,3.89,3.89v32.07C115.05,38.26,113.31,40,111.16,40z" />
|
|
15
|
-
<path
|
|
16
|
-
class="st1"
|
|
17
|
-
d="M10.37,10.03v8.57c0.93-1.26,2.33-1.67,3.61-1.67c1.58,0,3.01,0.59,4.02,1.54c1.12,1.05,1.82,2.62,1.82,4.53
|
|
18
|
-
c0,1.78-0.62,3.42-1.82,4.61c-1.01,1.03-2.26,1.57-3.97,1.57c-2.05,0-3.09-0.95-3.66-1.78v1.39H6.63V10.03H10.37z
|
|
19
|
-
M10.97,20.98
|
|
20
|
-
c-0.44,0.46-0.82,1.13-0.82,2.11c0,0.95,0.41,1.64,0.85,2.05c0.59,0.57,1.41,0.85,2.11,0.85c0.64,0,1.36-0.26,1.93-0.8
|
|
21
|
-
c0.54-0.51,0.9-1.26,0.9-2.11c0-0.92-0.36-1.67-0.9-2.18c-0.59-0.57-1.23-0.77-1.98-0.77C12.26,20.14,11.56,20.37,10.97,20.98z" />
|
|
22
|
-
<path
|
|
23
|
-
class="st1"
|
|
24
|
-
d="M25.08,17.35v6.32c0,0.51,0.05,1.31,0.64,1.85c0.26,0.23,0.72,0.54,1.54,0.54c0.69,0,1.23-0.23,1.56-0.54
|
|
25
|
-
c0.54-0.51,0.62-1.28,0.62-1.85v-6.32h3.74v6.68c0,1.31-0.13,2.54-1.28,3.67c-1.31,1.28-3.23,1.49-4.59,1.49
|
|
26
|
-
c-1.41,0-3.31-0.21-4.62-1.49c-1.05-1.03-1.26-2.18-1.26-3.44v-6.91H25.08z" />
|
|
27
|
-
<path
|
|
28
|
-
class="st1"
|
|
29
|
-
d="M47.88,28.79h-3.74V27.4c-0.57,0.82-1.61,1.78-3.66,1.78c-1.71,0-2.96-0.54-3.97-1.57
|
|
30
|
-
c-1.19-1.18-1.82-2.83-1.82-4.61c0-1.9,0.7-3.47,1.82-4.53c1.01-0.95,2.44-1.54,4.02-1.54c1.27,0,2.67,0.41,3.61,1.67v-8.57h3.74
|
|
31
|
-
V28.79z
|
|
32
|
-
M39.53,20.91c-0.54,0.51-0.9,1.26-0.9,2.18c0,0.85,0.36,1.59,0.9,2.11c0.57,0.54,1.28,0.8,1.93,0.8
|
|
33
|
-
c0.69,0,1.52-0.28,2.11-0.85c0.44-0.41,0.85-1.1,0.85-2.05c0-0.98-0.39-1.64-0.82-2.11c-0.59-0.62-1.28-0.85-2.08-0.85
|
|
34
|
-
C40.77,20.14,40.12,20.34,39.53,20.91z" />
|
|
35
|
-
<path
|
|
36
|
-
class="st1"
|
|
37
|
-
d="M52.32,10.3c1.21,0,2.16,0.95,2.16,2.16c0,1.21-0.95,2.16-2.16,2.16c-1.21,0-2.16-0.95-2.16-2.16
|
|
38
|
-
C50.17,11.25,51.12,10.3,52.32,10.3z M54.19,17.35v11.44h-3.74V17.35H54.19z" />
|
|
39
|
-
<path
|
|
40
|
-
class="st1"
|
|
41
|
-
d="M60.49,10.03v8.57c0.93-1.26,2.33-1.67,3.61-1.67c1.58,0,3.01,0.59,4.02,1.54c1.12,1.05,1.82,2.62,1.82,4.53
|
|
42
|
-
c0,1.78-0.62,3.42-1.82,4.61c-1.01,1.03-2.26,1.57-3.97,1.57c-2.05,0-3.09-0.95-3.66-1.78v1.39h-3.74V10.03H60.49z
|
|
43
|
-
M61.06,20.98
|
|
44
|
-
c-0.44,0.46-0.82,1.13-0.82,2.11c0,0.95,0.41,1.64,0.85,2.05c0.59,0.57,1.41,0.85,2.11,0.85c0.64,0,1.36-0.26,1.93-0.8
|
|
45
|
-
c0.54-0.51,0.9-1.26,0.9-2.11c0-0.92-0.36-1.67-0.9-2.18c-0.59-0.57-1.23-0.77-1.98-0.77C62.34,20.14,61.65,20.37,61.06,20.98z" />
|
|
46
|
-
<path
|
|
47
|
-
class="st1"
|
|
48
|
-
d="M80.26,17.35H84v11.44h-3.74v-1.39c-1.01,1.54-2.46,1.77-3.42,1.77c-1.66,0-3.06-0.41-4.33-1.74
|
|
49
|
-
c-1.22-1.28-1.69-2.77-1.69-4.28c0-1.92,0.73-3.57,1.79-4.62c1.01-1,2.41-1.56,4.02-1.56c0.99,0,2.57,0.23,3.63,1.67V17.35z
|
|
50
|
-
M75.57,20.96c-0.39,0.39-0.85,1.05-0.85,2.08c0,1.03,0.44,1.7,0.77,2.05c0.51,0.54,1.31,0.9,2.18,0.9c0.74,0,1.44-0.31,1.93-0.8
|
|
51
|
-
c0.49-0.46,0.9-1.18,0.9-2.16c0-0.82-0.31-1.59-0.85-2.11c-0.57-0.54-1.39-0.8-2.05-0.8C76.8,20.14,76.06,20.47,75.57,20.96z" />
|
|
52
|
-
<path
|
|
53
|
-
class="st1"
|
|
54
|
-
d="M93.21,20.26c-0.57-0.33-1.31-0.64-2.03-0.64c-0.39,0-0.82,0.1-1.05,0.33c-0.13,0.13-0.23,0.33-0.23,0.51
|
|
55
|
-
c0,0.26,0.18,0.41,0.36,0.51c0.26,0.15,0.64,0.23,1.1,0.39l0.98,0.31c0.64,0.21,1.31,0.46,1.9,1c0.67,0.62,0.9,1.31,0.9,2.18
|
|
56
|
-
c0,1.52-0.67,2.49-1.18,3.01c-1.13,1.13-2.52,1.31-3.72,1.31c-1.54,0-3.21-0.33-4.7-1.64l1.57-2.49c0.36,0.31,0.87,0.67,1.26,0.85
|
|
57
|
-
c0.51,0.26,1.05,0.36,1.54,0.36c0.23,0,0.82,0,1.16-0.26c0.23-0.18,0.39-0.46,0.39-0.74c0-0.21-0.08-0.46-0.41-0.67
|
|
58
|
-
c-0.26-0.15-0.59-0.26-1.13-0.41l-0.92-0.28c-0.67-0.21-1.36-0.57-1.85-1.05c-0.54-0.57-0.82-1.21-0.82-2.08
|
|
59
|
-
c0-1.1,0.44-2.03,1.1-2.65c1.03-0.95,2.41-1.16,3.47-1.16c1.7,0,2.88,0.44,3.8,0.98L93.21,20.26z" />
|
|
60
|
-
<path
|
|
61
|
-
class="st1"
|
|
62
|
-
d="M108.43,23.73h-8.55c0,0.62,0.23,1.44,0.69,1.95c0.57,0.62,1.34,0.72,1.9,0.72c0.54,0,1.1-0.1,1.49-0.33
|
|
63
|
-
c0.05-0.03,0.49-0.31,0.8-0.95l3.49,0.36c-0.51,1.62-1.54,2.47-2.21,2.88c-1.1,0.67-2.34,0.85-3.62,0.85
|
|
64
|
-
c-1.72,0-3.24-0.31-4.57-1.64c-1-1-1.72-2.52-1.72-4.42c0-1.64,0.59-3.34,1.75-4.52c1.39-1.39,3.11-1.64,4.39-1.64
|
|
65
|
-
c1.28,0,3.13,0.23,4.55,1.72c1.36,1.44,1.62,3.24,1.62,4.65V23.73z
|
|
66
|
-
M105.03,21.48c-0.03-0.1-0.21-0.82-0.74-1.34
|
|
67
|
-
c-0.41-0.39-1-0.64-1.75-0.64c-0.95,0-1.52,0.39-1.87,0.74c-0.28,0.31-0.54,0.72-0.64,1.23H105.03z" />
|
|
68
|
-
</svg>
|
package/src/Branding/Logo.svelte
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import BudibaseLogo from "./Budibase-logo.svelte";
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<style>
|
|
6
|
-
.home-logo {
|
|
7
|
-
cursor: pointer;
|
|
8
|
-
height: 40px;
|
|
9
|
-
width: 100px;
|
|
10
|
-
margin-bottom: 20px;
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
|
|
14
|
-
<div class="home-logo">
|
|
15
|
-
<BudibaseLogo />
|
|
16
|
-
</div>
|
package/src/Branding/Logo.svench
DELETED
package/src/Form/Button.svelte
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export let
|
|
3
|
-
primary = false,
|
|
4
|
-
secondary = false,
|
|
5
|
-
attention = false,
|
|
6
|
-
disabled = false,
|
|
7
|
-
error = false,
|
|
8
|
-
warning = false,
|
|
9
|
-
small = false,
|
|
10
|
-
medium = false,
|
|
11
|
-
wide = false,
|
|
12
|
-
large = false;
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<style>
|
|
16
|
-
button {
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
font-weight: 500;
|
|
19
|
-
font-size: 14px;
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
overflow: hidden;
|
|
22
|
-
border-radius: 3px;
|
|
23
|
-
color: var(--white);
|
|
24
|
-
padding: 0px 24px;
|
|
25
|
-
height: 32px;
|
|
26
|
-
transition: all 0.2s ease 0s;
|
|
27
|
-
display: inline-block;
|
|
28
|
-
text-rendering: optimizeLegibility;
|
|
29
|
-
-webkit-font-smoothing: antialiased;
|
|
30
|
-
min-width: auto;
|
|
31
|
-
outline: none;
|
|
32
|
-
font-feature-settings: "case" 1,"rlig" 1,"calt" 0;
|
|
33
|
-
-webkit-box-align: center;
|
|
34
|
-
user-select: none;
|
|
35
|
-
flex-shrink: 0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.primary {
|
|
39
|
-
border: solid 1px var(--ink);
|
|
40
|
-
background-color: var(--ink);
|
|
41
|
-
}
|
|
42
|
-
button.primary:hover:not([disabled]) {
|
|
43
|
-
border: solid 1px var(--grey);
|
|
44
|
-
background-color: var(--white);
|
|
45
|
-
color: var(--ink);
|
|
46
|
-
}
|
|
47
|
-
.secondary {
|
|
48
|
-
border: solid 1px var(--grey);
|
|
49
|
-
background-color: white;
|
|
50
|
-
color: var(--ink);
|
|
51
|
-
}
|
|
52
|
-
button.secondary:hover:not([disabled]) {
|
|
53
|
-
border: solid 1px var(--ink);
|
|
54
|
-
background-color: var(--ink);
|
|
55
|
-
color: white;
|
|
56
|
-
}
|
|
57
|
-
.attention {
|
|
58
|
-
background-color: var(--blue);
|
|
59
|
-
border: solid 1px var(--blue);
|
|
60
|
-
}
|
|
61
|
-
button.attention:hover:not([disabled]) {
|
|
62
|
-
border: solid 1px var(--blue);
|
|
63
|
-
background-color: var(--white);
|
|
64
|
-
color: var(--blue);
|
|
65
|
-
}
|
|
66
|
-
.error {
|
|
67
|
-
border: solid 1px var(--red);
|
|
68
|
-
background-color: var(--red);
|
|
69
|
-
color: white;
|
|
70
|
-
}
|
|
71
|
-
button.error:hover:not([disabled]) {
|
|
72
|
-
border: solid 1px var(--red);
|
|
73
|
-
background-color: white;
|
|
74
|
-
color: var(--red);
|
|
75
|
-
}
|
|
76
|
-
.warning {
|
|
77
|
-
border: solid 1px var(--yellow);
|
|
78
|
-
background-color: var(--yellow);
|
|
79
|
-
color: white;
|
|
80
|
-
}
|
|
81
|
-
button.warning:hover:not([disabled]) {
|
|
82
|
-
border: solid 1px var(--yellow);
|
|
83
|
-
background-color: white;
|
|
84
|
-
color: var(--yellow);
|
|
85
|
-
}
|
|
86
|
-
.small {
|
|
87
|
-
width: 100px;
|
|
88
|
-
height: 24px;
|
|
89
|
-
line-height: 22px;
|
|
90
|
-
padding: 0px 10px;
|
|
91
|
-
font-weight: 500;
|
|
92
|
-
}
|
|
93
|
-
.medium {
|
|
94
|
-
width: 200px;
|
|
95
|
-
height: 40px;
|
|
96
|
-
}
|
|
97
|
-
.large {
|
|
98
|
-
width: 200px;
|
|
99
|
-
height: 50px;
|
|
100
|
-
font-weight: 500;
|
|
101
|
-
font-size: 18px;
|
|
102
|
-
}
|
|
103
|
-
.wide {
|
|
104
|
-
width: 100%;
|
|
105
|
-
max-width: 260px;
|
|
106
|
-
height: 32px;
|
|
107
|
-
line-height: 22px;
|
|
108
|
-
padding: 0px 10px;
|
|
109
|
-
font-weight: 500;
|
|
110
|
-
}
|
|
111
|
-
button:disabled {
|
|
112
|
-
background-color: var(--grey-dark);
|
|
113
|
-
cursor: not-allowed;
|
|
114
|
-
border: solid 1px var(--grey-dark);
|
|
115
|
-
}
|
|
116
|
-
</style>
|
|
117
|
-
|
|
118
|
-
<button
|
|
119
|
-
class:primary
|
|
120
|
-
class:secondary
|
|
121
|
-
class:attention
|
|
122
|
-
class:error
|
|
123
|
-
class:warning
|
|
124
|
-
class:small
|
|
125
|
-
class:medium
|
|
126
|
-
class:wide
|
|
127
|
-
class:large
|
|
128
|
-
{disabled}
|
|
129
|
-
on:click|preventDefault>
|
|
130
|
-
<slot />
|
|
131
|
-
</button>
|
package/src/Form/Button.svench
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { View } from "svench";
|
|
3
|
-
import Button from "./Button.svelte";
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<View name="Primary">
|
|
7
|
-
<Button primary small on:click={() => alert('Clicked!')}>Small</Button>
|
|
8
|
-
<Button primary on:click={() => alert('Clicked!')}>Default</Button>
|
|
9
|
-
<Button primary medium on:click={() => alert('Clicked!')}>Large</Button>
|
|
10
|
-
<Button primary large on:click={() => alert('Clicked!')}>Large</Button>
|
|
11
|
-
<Button primary wide on:click={() => alert('Clicked!')}>Wide</Button>
|
|
12
|
-
</View>
|
|
13
|
-
<View name="Secondary">
|
|
14
|
-
<Button secondary small on:click={() => alert('Clicked!')}>Small</Button>
|
|
15
|
-
<Button secondary on:click={() => alert('Clicked!')}>Default</Button>
|
|
16
|
-
<Button secondary medium on:click={() => alert('Clicked!')}>Medium</Button>
|
|
17
|
-
<Button secondary large on:click={() => alert('Clicked!')}>Large</Button>
|
|
18
|
-
<Button secondary wide on:click={() => alert('Clicked!')}>Wide</Button>
|
|
19
|
-
</View>
|
|
20
|
-
<View name="Attention / Success">
|
|
21
|
-
<Button attention small on:click={() => alert('Clicked!')}>Small</Button>
|
|
22
|
-
<Button attention on:click={() => alert('Clicked!')}>Default</Button>
|
|
23
|
-
<Button attention medium on:click={() => alert('Clicked!')}>Medium</Button>
|
|
24
|
-
<Button attention large on:click={() => alert('Clicked!')}>Large</Button>
|
|
25
|
-
<Button attention wide on:click={() => alert('Clicked!')}>Wide</Button>
|
|
26
|
-
</View>
|
|
27
|
-
<View name="Error">
|
|
28
|
-
<Button error small on:click={() => alert('Clicked!')}>Small</Button>
|
|
29
|
-
<Button error on:click={() => alert('Clicked!')}>Default</Button>
|
|
30
|
-
<Button error medium on:click={() => alert('Clicked!')}>Medium</Button>
|
|
31
|
-
<Button error large on:click={() => alert('Clicked!')}>Large</Button>
|
|
32
|
-
<Button error wide on:click={() => alert('Clicked!')}>Wide</Button>
|
|
33
|
-
</View>
|
|
34
|
-
<View name="Warning">
|
|
35
|
-
<Button warning small on:click={() => alert('Clicked!')}>Small</Button>
|
|
36
|
-
<Button warning on:click={() => alert('Clicked!')}>Default</Button>
|
|
37
|
-
<Button warning medium on:click={() => alert('Clicked!')}>Medium</Button>
|
|
38
|
-
<Button warning large on:click={() => alert('Clicked!')}>Large</Button>
|
|
39
|
-
<Button warning wide on:click={() => alert('Clicked!')}>Wide</Button>
|
|
40
|
-
</View>
|
|
41
|
-
<View name="Disabled">
|
|
42
|
-
<Button primary disabled on:click={() => alert('Clicked!')}>Disabled</Button>
|
|
43
|
-
</View>
|
|
44
|
-
<View
|
|
45
|
-
name="use Knobs"
|
|
46
|
-
knobs={{ primary: true, secondary: false, attention: false, error: false, disabled: false, small: false, medium: false, large: false, wide: false }}
|
|
47
|
-
let:knobs>
|
|
48
|
-
<Button {...knobs} on:click={() => alert('Clicked!')}>Knooby</Button>
|
|
49
|
-
</View>
|
package/src/Form/Input.svench
DELETED
package/src/Form/Select.svench
DELETED
package/src/Form/TextArea.svench
DELETED
package/src/Links/Home.svelte
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export let href,
|
|
3
|
-
icon,
|
|
4
|
-
title,
|
|
5
|
-
active = false;
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<style>
|
|
9
|
-
.nav-item {
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
padding: 12px;
|
|
12
|
-
height: 40px;
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: row;
|
|
15
|
-
align-items: center;
|
|
16
|
-
box-sizing: border-box;
|
|
17
|
-
border-radius: 3px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.nav-item:hover {
|
|
21
|
-
background-color: var(--grey-light);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.nav-item-title {
|
|
25
|
-
font-size: 14px;
|
|
26
|
-
color: var(--ink);
|
|
27
|
-
font-weight: 400;
|
|
28
|
-
margin-left: 12px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.nav-item-icon {
|
|
32
|
-
color: var(--ink-light);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.active {
|
|
36
|
-
background-color: var(--blue-light);
|
|
37
|
-
}
|
|
38
|
-
</style>
|
|
39
|
-
|
|
40
|
-
<a {href} target="_blank" class="nav-item" class:active>
|
|
41
|
-
{#if icon}
|
|
42
|
-
<span class="nav-item-icon">
|
|
43
|
-
<svelte:component this={icon} />
|
|
44
|
-
</span>
|
|
45
|
-
{/if}
|
|
46
|
-
{#if title}
|
|
47
|
-
<div class="nav-item-title">{title}</div>
|
|
48
|
-
{/if}
|
|
49
|
-
</a>
|
package/src/Links/Home.svench
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { View } from "svench";
|
|
3
|
-
import Home from "./Home.svelte";
|
|
4
|
-
import Contribution from "../icons/Contribution.svelte";
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<View name="default">
|
|
8
|
-
<Home
|
|
9
|
-
href="https://github.com/Budibase/budibase/blob/master/CONTRIBUTING.md"
|
|
10
|
-
title="Contribute"
|
|
11
|
-
icon={Contribution} />
|
|
12
|
-
</View>
|
|
13
|
-
<View name="active">
|
|
14
|
-
<Home
|
|
15
|
-
active
|
|
16
|
-
href="https://github.com/Budibase/budibase/blob/master/CONTRIBUTING.md"
|
|
17
|
-
title="Contribute"
|
|
18
|
-
icon={Contribution} />
|
|
19
|
-
</View>
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export let name,
|
|
3
|
-
show = false;
|
|
4
|
-
|
|
5
|
-
const capitalize = name => name[0].toUpperCase() + name.slice(1);
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<style>
|
|
9
|
-
.property-group-container {
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
height: auto;
|
|
13
|
-
background: var(--grey-light);
|
|
14
|
-
margin: 0px 0px 4px 0px;
|
|
15
|
-
padding: 8px 12px;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
border-radius: 4px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.property-group-name {
|
|
21
|
-
cursor: pointer;
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-flow: row nowrap;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.name {
|
|
27
|
-
flex: 1;
|
|
28
|
-
text-align: left;
|
|
29
|
-
padding-top: 2px;
|
|
30
|
-
font-size: 14px;
|
|
31
|
-
font-weight: 500;
|
|
32
|
-
letter-spacing: 0.14px;
|
|
33
|
-
color: var(--ink);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.icon {
|
|
37
|
-
flex: 0 0 20px;
|
|
38
|
-
text-align: center;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.property-panel {
|
|
42
|
-
/* height: 0px;
|
|
43
|
-
overflow: hidden; */
|
|
44
|
-
display: none;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.show {
|
|
48
|
-
/* overflow: auto;
|
|
49
|
-
height: auto; */
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-direction: column;
|
|
52
|
-
flex: 1;
|
|
53
|
-
}
|
|
54
|
-
</style>
|
|
55
|
-
|
|
56
|
-
<div class="property-group-container">
|
|
57
|
-
<div class="property-group-name" on:click={() => (show = !show)}>
|
|
58
|
-
<div class="icon">
|
|
59
|
-
<i class={show ? 'ri-arrow-down-s-fill' : 'ri-arrow-right-s-fill'} />
|
|
60
|
-
</div>
|
|
61
|
-
<div class="name">{capitalize(name)}</div>
|
|
62
|
-
</div>
|
|
63
|
-
<div class="property-panel" class:show>
|
|
64
|
-
<slot />
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { View } from "svench";
|
|
3
|
-
import DetailSummary from "./DetailSummary.svelte";
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<View name="default">
|
|
7
|
-
<DetailSummary name="Layout">
|
|
8
|
-
<ul>
|
|
9
|
-
<li>1</li>
|
|
10
|
-
<li>2</li>
|
|
11
|
-
<li>3</li>
|
|
12
|
-
<li>4</li>
|
|
13
|
-
</ul>
|
|
14
|
-
</DetailSummary>
|
|
15
|
-
</View>
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export let headings;
|
|
3
|
-
export let value;
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<style>
|
|
7
|
-
header {
|
|
8
|
-
display: grid;
|
|
9
|
-
grid-gap: 20px;
|
|
10
|
-
grid-auto-flow: column;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
span {
|
|
14
|
-
font-size: 18px;
|
|
15
|
-
font-weight: bold;
|
|
16
|
-
color: var(--ink-lighter);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
span:hover {
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.selected {
|
|
24
|
-
color: var(--ink);
|
|
25
|
-
}
|
|
26
|
-
</style>
|
|
27
|
-
|
|
28
|
-
<section>
|
|
29
|
-
<header>
|
|
30
|
-
{#each headings as heading}
|
|
31
|
-
<span
|
|
32
|
-
class:selected={value === heading.key}
|
|
33
|
-
on:click={() => (value = heading.key)}>
|
|
34
|
-
{heading.title}
|
|
35
|
-
</span>
|
|
36
|
-
{/each}
|
|
37
|
-
</header>
|
|
38
|
-
<slot />
|
|
39
|
-
</section>
|
|
@@ -1,25 +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
|
-
</View>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
function resize({ target }) {
|
|
2
|
-
target.style.height = "1px";
|
|
3
|
-
target.style.height = (+target.scrollHeight) + "px";
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export function text_area_resize(el) {
|
|
7
|
-
resize({ target: el });
|
|
8
|
-
el.style.overflow = 'hidden';
|
|
9
|
-
el.addEventListener('input', resize);
|
|
10
|
-
|
|
11
|
-
return {
|
|
12
|
-
destroy: () => el.removeEventListener('input', resize)
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
-
viewBox="0 0 24 24"
|
|
4
|
-
width="24"
|
|
5
|
-
height="24">
|
|
6
|
-
<path fill="none" d="M0 0h24v24H0z" />
|
|
7
|
-
<path
|
|
8
|
-
d="M14.121 10.48a1 1 0 0 0-1.414 0l-.707.706a2 2 0 1
|
|
9
|
-
1-2.828-2.828l5.63-5.632a6.5 6.5 0 0 1 6.377 10.568l-2.108
|
|
10
|
-
2.135-4.95-4.95zM3.161 4.468a6.503 6.503 0 0 1 8.009-.938L7.757 6.944a4 4 0
|
|
11
|
-
0 0 5.513 5.794l.144-.137 4.243 4.242-4.243 4.243a2 2 0 0 1-2.828 0L3.16
|
|
12
|
-
13.66a6.5 6.5 0 0 1 0-9.192z"
|
|
13
|
-
fill="rgba(128,129,146,1)" />
|
|
14
|
-
</svg>
|
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>
|