diff --git a/packages/bbui/package.json b/packages/bbui/package.json index d7fe9d9f26..ed9bba0d35 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -53,6 +53,7 @@ "@spectrum-css/popover": "^3.0.1", "@spectrum-css/progressbar": "^1.0.2", "@spectrum-css/progresscircle": "^1.0.2", + "@spectrum-css/radio": "^3.0.2", "@spectrum-css/table": "^3.0.1", "@spectrum-css/tabs": "^3.0.1", "@spectrum-css/textfield": "^3.0.1", diff --git a/packages/bbui/src/Form/Checkbox.svench.svx b/packages/bbui/src/Form/Checkbox.svench.svx deleted file mode 100644 index b3246ec9d2..0000000000 --- a/packages/bbui/src/Form/Checkbox.svench.svx +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - -## Multiple checkboxes -Use an array and an each block to use multiple checkboxes -```svelte - - -{#each menu as {text, checked}} - - - -{/each} -``` - - -
- {#each menu as {text, checked}} - - - - {/each} -
-
- - \ No newline at end of file diff --git a/packages/bbui/src/Form/Core/Checkbox.svelte b/packages/bbui/src/Form/Core/Checkbox.svelte index 21a79cf0c7..bc9b9a9fc7 100644 --- a/packages/bbui/src/Form/Core/Checkbox.svelte +++ b/packages/bbui/src/Form/Core/Checkbox.svelte @@ -5,7 +5,7 @@ export let value = false export let error = null - export let fieldId = null + export let id = null export let text = null export let disabled = false @@ -24,7 +24,7 @@ on:change={onChange} type="checkbox" class="spectrum-Checkbox-input" - id={fieldId} /> + {id} />
+ {#if options && Array.isArray(options)} + {#each options as option} +
+ + + +
+ {/each} + {/if} +
diff --git a/packages/bbui/src/Form/Core/Select.svelte b/packages/bbui/src/Form/Core/Select.svelte index 15640d93bf..24e8629e44 100644 --- a/packages/bbui/src/Form/Core/Select.svelte +++ b/packages/bbui/src/Form/Core/Select.svelte @@ -3,7 +3,7 @@ import Picker from "./Picker.svelte" export let value = null - export let fieldId = null + export let id = null export let placeholder = "Choose an option" export let disabled = false export let error = null @@ -39,7 +39,7 @@ - import { View } from "svench"; - import Select from "./Select.svelte"; - import DataList from "./DataList.svelte"; - import Spacer from "../Spacer/Spacer.svelte" - - const options = ["Chocolate", "Vanilla", "Strawberry Cheesecake"]; - - - - - {#each options as option} - - {/each} - - - - - - {#each options as option} - - {/each} - - - - - - {#each options as option} - - {/each} - - - - - - {#each options as option} - - {/each} - - - - - - {#each options as option} - - {/each} - - - - - - {#each options as option} - - {/each} - - - diff --git a/packages/bbui/src/Form/Input.svench b/packages/bbui/src/Form/Input.svench deleted file mode 100644 index 1b95727a1a..0000000000 --- a/packages/bbui/src/Form/Input.svench +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/bbui/src/Form/Multiselect.svench b/packages/bbui/src/Form/Multiselect.svench deleted file mode 100644 index 86ad0de529..0000000000 --- a/packages/bbui/src/Form/Multiselect.svench +++ /dev/null @@ -1,63 +0,0 @@ - - - - - {#each options as option} - - {/each} - - - - -
- - {#each options as option} - - {/each} - -
-
- - - - {#each options as option} - - {/each} - - - - - - {#each options as option} - - {/each} - - - - - - {#each options as option} - - {/each} - - - - - - {#each options as option} - - {/each} - - - - diff --git a/packages/bbui/src/Form/Radio.svelte b/packages/bbui/src/Form/Radio.svelte deleted file mode 100644 index b4a2637803..0000000000 --- a/packages/bbui/src/Form/Radio.svelte +++ /dev/null @@ -1,140 +0,0 @@ - - -
- -
-
-
-
-
- -
- - diff --git a/packages/bbui/src/Form/Radio.svench.svx b/packages/bbui/src/Form/Radio.svench.svx deleted file mode 100644 index 20d3c58c99..0000000000 --- a/packages/bbui/src/Form/Radio.svench.svx +++ /dev/null @@ -1,64 +0,0 @@ - - - ## Multiple checkboxes - Use an array and an each block to use the radio button. -```svelte - - -{#each menu as flavour} - -{/each} -``` - - - -
- {#each menu as flavour} - - - - {/each} -
-
- - -
- {#each menu as flavour} - - - - {/each} -
-
- - \ No newline at end of file diff --git a/packages/bbui/src/Form/RadioGroup.svelte b/packages/bbui/src/Form/RadioGroup.svelte new file mode 100644 index 0000000000..227555c802 --- /dev/null +++ b/packages/bbui/src/Form/RadioGroup.svelte @@ -0,0 +1,37 @@ + + + + + diff --git a/packages/bbui/src/Form/RichText.svench.svx b/packages/bbui/src/Form/RichText.svench.svx deleted file mode 100644 index 0a0a858866..0000000000 --- a/packages/bbui/src/Form/RichText.svench.svx +++ /dev/null @@ -1,40 +0,0 @@ - - -### Rich Text Component - -This component uses the QuillJS library to add Rich Text editing functionality. - -It exposes a content variable that you can bind to in order to get Markdown out of the component. - -As well as the content you can also pass in an option object that looks like so: - -```js -let options = { - modules: { - toolbar: [ - [{ header: [1, 2, 3, false] }], - ['bold', 'italic', 'underline', 'strike'] - ] - }, - placeholder: 'Type something...', - theme: 'snow' -} -``` - - - - - - - - - - - - diff --git a/packages/bbui/src/Form/Select.svench b/packages/bbui/src/Form/Select.svench deleted file mode 100644 index 750d7224ca..0000000000 --- a/packages/bbui/src/Form/Select.svench +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/bbui/src/Form/Slider.svench b/packages/bbui/src/Form/Slider.svench deleted file mode 100644 index 7ed59f78b8..0000000000 --- a/packages/bbui/src/Form/Slider.svench +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packages/bbui/src/Form/TextArea.svench b/packages/bbui/src/Form/TextArea.svench deleted file mode 100644 index 549d365b83..0000000000 --- a/packages/bbui/src/Form/TextArea.svench +++ /dev/null @@ -1,30 +0,0 @@ - - - -