@budibase/bbui 3.16.1 → 3.17.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/bbui",
3
3
  "description": "A UI solution used in the different Budibase projects.",
4
- "version": "3.16.1",
4
+ "version": "3.17.0",
5
5
  "license": "MPL-2.0",
6
6
  "svelte": "src/index.ts",
7
7
  "module": "dist/bbui.mjs",
@@ -106,5 +106,5 @@
106
106
  }
107
107
  }
108
108
  },
109
- "gitHead": "6e6f06e392e69521daaf3f68263cf8c5e7978e03"
109
+ "gitHead": "1724cc3c4736c2c48e98aa490b47b2b6c28c05aa"
110
110
  }
@@ -60,6 +60,9 @@
60
60
  padding: 50px 50px 0 50px;
61
61
  z-index: 1;
62
62
  }
63
+ .content.noPadding {
64
+ padding: 0;
65
+ }
63
66
  .fix-scroll-padding {
64
67
  content: "";
65
68
  display: block;
@@ -6,6 +6,8 @@
6
6
  const actionMenu = getContext("actionMenu")
7
7
 
8
8
  export let icon: string | undefined = undefined
9
+ export let iconWeight: "regular" | "bold" | "fill" = "regular"
10
+ export let iconColour: string | undefined = undefined
9
11
  export let iconHidden: boolean = false
10
12
  export let iconAlign: "center" | "start" = "center"
11
13
  export let disabled: boolean | undefined = undefined
@@ -47,8 +49,9 @@
47
49
  <div class="icon" class:iconHidden style="align-self: {iconAlign}">
48
50
  <Icon
49
51
  name={icon}
52
+ weight={iconWeight}
50
53
  size="S"
51
- color="var(--spectrum-global-color-gray-700)"
54
+ color={iconColour || "var(--spectrum-global-color-gray-700)"}
52
55
  />
53
56
  </div>
54
57
  {/if}
@@ -59,7 +62,7 @@
59
62
  {#each keys as key}
60
63
  <div class="key">
61
64
  {#if key.startsWith("!")}
62
- <Icon size="XS" name={key.split("!")[1]} />
65
+ <Icon size="XS" weight={iconWeight} name={key.split("!")[1]} />
63
66
  {:else}
64
67
  {key}
65
68
  {/if}
@@ -1,3 +1,12 @@
1
+ <script lang="ts" context="module">
2
+ export interface ModalAPI {
3
+ show: () => void
4
+ hide: () => void
5
+ toggle: () => void
6
+ cancel: (_: ModalCancelFrom) => void
7
+ }
8
+ </script>
9
+
1
10
  <script lang="ts">
2
11
  import "@spectrum-css/modal/dist/index-vars.css"
3
12
  import "@spectrum-css/underlay/dist/index-vars.css"
package/src/helpers.ts CHANGED
@@ -211,7 +211,7 @@ const localeDateFormat = new Intl.DateTimeFormat()
211
211
 
212
212
  // Formats a dayjs date according to schema flags
213
213
  export const getDateDisplayValue = (
214
- value: dayjs.Dayjs | string | null,
214
+ value: dayjs.Dayjs | string | null | undefined,
215
215
  { enableTime = true, timeOnly = false } = {}
216
216
  ): string => {
217
217
  if (typeof value === "string") {
package/src/index.ts CHANGED
@@ -59,7 +59,7 @@ export { default as Menu } from "./Menu/Menu.svelte"
59
59
  export { default as MenuSection } from "./Menu/Section.svelte"
60
60
  export { default as MenuSeparator } from "./Menu/Separator.svelte"
61
61
  export { default as MenuItem } from "./Menu/Item.svelte"
62
- export { default as Modal } from "./Modal/Modal.svelte"
62
+ export { default as Modal, type ModalAPI } from "./Modal/Modal.svelte"
63
63
  export { default as ModalContent, keepOpen } from "./Modal/ModalContent.svelte"
64
64
  export { default as NotificationDisplay } from "./Notification/NotificationDisplay.svelte"
65
65
  export { default as Notification } from "./Notification/Notification.svelte"