Change BBUI to single bundle export and clean up some form components
This commit is contained in:
parent
d779fbbea4
commit
591d1c0fc5
|
@ -9,14 +9,10 @@
|
|||
".": {
|
||||
"import": "./dist/bbui.es.js"
|
||||
},
|
||||
"./internal": {
|
||||
"import": "./dist/internal.es.js"
|
||||
},
|
||||
"./package.json": "./package.json",
|
||||
"./dist/style.css": "./dist/style.css"
|
||||
},
|
||||
"scripts": {
|
||||
"dev:builder": "rollup -cw",
|
||||
"build": "rollup -c"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -5,12 +5,12 @@ import json from "@rollup/plugin-json"
|
|||
import { terser } from "rollup-plugin-terser"
|
||||
import postcss from "rollup-plugin-postcss"
|
||||
|
||||
const makeConfig = ({ input, name }) => ({
|
||||
input,
|
||||
export default {
|
||||
input: "src/index.js",
|
||||
output: {
|
||||
sourcemap: true,
|
||||
format: "esm",
|
||||
file: `dist/${name}.es.js`,
|
||||
file: "dist/bbui.es.js",
|
||||
},
|
||||
plugins: [
|
||||
resolve(),
|
||||
|
@ -22,9 +22,4 @@ const makeConfig = ({ input, name }) => ({
|
|||
terser(),
|
||||
json(),
|
||||
],
|
||||
})
|
||||
|
||||
export default [
|
||||
makeConfig({ input: "src/index.js", name: "bbui" }),
|
||||
makeConfig({ input: "src/Form/internal/index.js", name: "internal" }),
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
export { default as CoreTextField } from "./TextField.svelte"
|
||||
export { default as CoreSelect } from "./Select.svelte"
|
||||
export { default as CoreMultiselect } from "./Multiselect.svelte"
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import Field from "./Field.svelte"
|
||||
import TextField from "./internal/TextField.svelte"
|
||||
import TextField from "./Core/TextField.svelte"
|
||||
import { createEventDispatcher } from "svelte"
|
||||
|
||||
export let value = null
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import { createEventDispatcher } from "svelte"
|
||||
import Multiselect from "./internal/Multiselect.svelte"
|
||||
import Multiselect from "./Core/Multiselect.svelte"
|
||||
import Field from "./Field.svelte"
|
||||
|
||||
export let value = null
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script>
|
||||
import Field from "./Field.svelte"
|
||||
import Select from "./internal/Select.svelte"
|
||||
import Select from "./Core/Select.svelte"
|
||||
import { createEventDispatcher } from "svelte"
|
||||
|
||||
export let value = null
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
export { default as TextField } from "./TextField.svelte"
|
||||
export { default as Select } from "./Select.svelte"
|
||||
export { default as Multiselect } from "./Multiselect.svelte"
|
|
@ -40,6 +40,9 @@ export { default as Slider } from "./Form/Slider.svelte"
|
|||
export { default as Context } from "./context"
|
||||
export { default as Table } from "./Table/Table.svelte"
|
||||
|
||||
// Core form components to be used elsewhere (standard components)
|
||||
export * from "./Form/Core"
|
||||
|
||||
// Actions
|
||||
export { default as autoResizeTextArea } from "./Actions/autoresize_textarea"
|
||||
export { default as positionDropdown } from "./Actions/position_dropdown"
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
<script>
|
||||
import { Input } from "@budibase/bbui"
|
||||
export let validationErrors
|
||||
|
||||
let blurred = { api: false }
|
||||
</script>
|
||||
|
||||
<h2>Set up your API Key</h2>
|
||||
<div class="container">
|
||||
<Input
|
||||
on:input={() => (blurred.api = true)}
|
||||
label="API Key"
|
||||
name="apiKey"
|
||||
placeholder="Use command-V to paste your API Key"
|
||||
type="password"
|
||||
error={blurred.api && validationErrors.apiKey} />
|
||||
<a target="_blank" href="https://portal.budi.live/">Get API Key</a>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.container {
|
||||
display: grid;
|
||||
grid-gap: 40px;
|
||||
}
|
||||
a {
|
||||
color: var(--grey-7);
|
||||
font-weight: 500;
|
||||
font-size: var(--font-size-s);
|
||||
}
|
||||
a:hover {
|
||||
color: var(--ink);
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue