diff --git a/packages/bbui/src/ColorPicker/ColorPicker.svelte b/packages/bbui/src/ColorPicker/ColorPicker.svelte index ff6a292d1b..1fa950fadc 100644 --- a/packages/bbui/src/ColorPicker/ColorPicker.svelte +++ b/packages/bbui/src/ColorPicker/ColorPicker.svelte @@ -5,7 +5,7 @@ import { fly } from "svelte/transition" import Icon from "../Icon/Icon.svelte" import Input from "../Form/Input.svelte" - import { capitalise } from "../utils/helpers" + import { capitalise } from "../helpers" export let value export let size = "M" diff --git a/packages/bbui/src/Form/Core/DatePicker.svelte b/packages/bbui/src/Form/Core/DatePicker.svelte index 8edb68a38e..e179eb81dc 100644 --- a/packages/bbui/src/Form/Core/DatePicker.svelte +++ b/packages/bbui/src/Form/Core/DatePicker.svelte @@ -5,7 +5,7 @@ import "@spectrum-css/textfield/dist/index-vars.css" import "@spectrum-css/picker/dist/index-vars.css" import { createEventDispatcher } from "svelte" - import { generateID } from "../../utils/helpers" + import { uuid } from "../../helpers" export let id = null export let disabled = false @@ -16,7 +16,7 @@ export let appendTo = undefined const dispatch = createEventDispatcher() - const flatpickrId = `${generateID()}-wrapper` + const flatpickrId = `${uuid()}-wrapper` let open = false let flatpickr $: flatpickrOptions = { diff --git a/packages/bbui/src/Form/Core/Dropzone.svelte b/packages/bbui/src/Form/Core/Dropzone.svelte index f7fed78b70..53c2534c0b 100644 --- a/packages/bbui/src/Form/Core/Dropzone.svelte +++ b/packages/bbui/src/Form/Core/Dropzone.svelte @@ -3,7 +3,7 @@ import "@spectrum-css/typography/dist/index-vars.css" import "@spectrum-css/illustratedmessage/dist/index-vars.css" import { createEventDispatcher } from "svelte" - import { generateID } from "../../utils/helpers" + import { uuid } from "../../helpers" import Icon from "../../Icon/Icon.svelte" import Link from "../../Link/Link.svelte" import Tag from "../../Tags/Tag.svelte" @@ -37,7 +37,7 @@ "jfif", ] - const fieldId = id || generateID() + const fieldId = id || uuid() let selectedImageIdx = 0 let fileDragged = false let selectedUrl diff --git a/packages/bbui/src/Label/Label.svelte b/packages/bbui/src/Label/Label.svelte index 7ec378fc29..06669cd988 100644 --- a/packages/bbui/src/Label/Label.svelte +++ b/packages/bbui/src/Label/Label.svelte @@ -21,6 +21,7 @@ class="icon" class:icon-small={size === "M" || size === "S"} on:mouseover={() => (showTooltip = true)} + on:focus={() => (showTooltip = true)} on:mouseleave={() => (showTooltip = false)} > diff --git a/packages/bbui/src/Table/Table.svelte b/packages/bbui/src/Table/Table.svelte index 09ade22627..2aea31857e 100644 --- a/packages/bbui/src/Table/Table.svelte +++ b/packages/bbui/src/Table/Table.svelte @@ -4,7 +4,7 @@ import CellRenderer from "./CellRenderer.svelte" import SelectEditRenderer from "./SelectEditRenderer.svelte" import { cloneDeep } from "lodash" - import { deepGet } from "../utils/helpers" + import { deepGet } from "../helpers" /** * The expected schema is our normal couch schemas for our tables. diff --git a/packages/frontend-core/src/utils/helpers.js b/packages/bbui/src/helpers.js similarity index 100% rename from packages/frontend-core/src/utils/helpers.js rename to packages/bbui/src/helpers.js diff --git a/packages/bbui/src/index.js b/packages/bbui/src/index.js index 3e86d01a0d..f2fbad9aff 100644 --- a/packages/bbui/src/index.js +++ b/packages/bbui/src/index.js @@ -81,3 +81,6 @@ export { default as clickOutside } from "./Actions/click_outside" // Stores export { notifications, createNotificationStore } from "./Stores/notifications" + +// Helpers +export * as Helpers from "./helpers"