@budibase/bbui 3.5.2 → 3.6.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.
Files changed (51) hide show
  1. package/dist/bbui.mjs +14368 -16206
  2. package/package.json +2 -2
  3. package/src/ActionMenu/ActionMenu.svelte +14 -13
  4. package/src/Avatar/Avatar.svelte +1 -1
  5. package/src/ColorPicker/ColorPicker.svelte +66 -34
  6. package/src/Form/Core/File.svelte +27 -21
  7. package/src/Form/Core/Multiselect.svelte +1 -1
  8. package/src/Form/Core/TextArea.svelte +49 -17
  9. package/src/Form/DatePicker.svelte +1 -1
  10. package/src/Form/File.svelte +14 -15
  11. package/src/Form/Multiselect.svelte +15 -14
  12. package/src/Form/Select.svelte +6 -9
  13. package/src/Form/TextArea.svelte +15 -6
  14. package/src/Form/Toggle.svelte +2 -2
  15. package/src/Icon/Icon.svelte +1 -1
  16. package/src/Icon/IconAvatar.svelte +7 -8
  17. package/src/IconPicker/IconPicker.svelte +16 -11
  18. package/src/InlineAlert/InlineAlert.svelte +10 -10
  19. package/src/Input/CopyInput.svelte +13 -11
  20. package/src/Label/Label.svelte +4 -4
  21. package/src/Layout/Layout.svelte +14 -9
  22. package/src/Layout/Page.svelte +6 -6
  23. package/src/List/List.svelte +2 -2
  24. package/src/List/ListItem.svelte +2 -2
  25. package/src/Markdown/MarkdownEditor.svelte +12 -12
  26. package/src/Markdown/MarkdownViewer.svelte +5 -4
  27. package/src/Markdown/SpectrumMDE.svelte +11 -11
  28. package/src/Menu/Item.svelte +7 -7
  29. package/src/Menu/Menu.svelte +1 -1
  30. package/src/Menu/Section.svelte +2 -2
  31. package/src/Modal/Content.svelte +2 -2
  32. package/src/Modal/CustomContent.svelte +4 -4
  33. package/src/Modal/Modal.svelte +36 -33
  34. package/src/Modal/ModalContent.svelte +33 -31
  35. package/src/Notification/Notification.svelte +9 -9
  36. package/src/Notification/NotificationDisplay.svelte +1 -1
  37. package/src/Pagination/Pagination.svelte +6 -8
  38. package/src/ProgressBar/ProgressBar.svelte +15 -14
  39. package/src/ProgressCircle/ProgressCircle.svelte +11 -11
  40. package/src/Tooltip/TooltipWrapper.svelte +1 -1
  41. package/src/bbui.css +10 -0
  42. package/src/context.d.ts +8 -0
  43. package/src/index.ts +0 -3
  44. package/src/types/actionMenu.ts +3 -0
  45. package/src/Form/PickerDropdown.svelte +0 -132
  46. package/src/IconSideNav/IconSideNav.svelte +0 -14
  47. package/src/IconSideNav/IconSideNavItem.svelte +0 -58
  48. package/src/Menu/Menu.svench +0 -19
  49. package/src/Modal/Modal.svench +0 -116
  50. package/src/Modal/QuizModal.svelte +0 -53
  51. package/src/Stores/Notifications.svench.svx +0 -78
@@ -1,78 +0,0 @@
1
- <script>
2
- import { flip } from 'svelte/animate';
3
- import { fly } from "svelte/transition"
4
- import { View } from "svench";
5
- import { notifications } from "./notifications";
6
-
7
- export let themes = {
8
- danger: "#E26D69",
9
- success: "#84C991",
10
- warning: "#f0ad4e",
11
- info: "#5bc0de",
12
- default: "#aaaaaa",
13
- }
14
- </script>
15
-
16
- ## Notification Store
17
-
18
- This custom can be used to display toast messages. It has 5 different methods: `send`, `danger`, `warning`, `success`, `info`.
19
-
20
-
21
- <View name="danger">
22
- <button on:click={() => notifications.error('This is a danger!')}>Danger</button>
23
- </View>
24
- <View name="warning">
25
- <button on:click={() => notifications.warning('This is a warning!')}>Warning</button>
26
- </View>
27
- <View name="success">
28
- <button on:click={() => notifications.success('This is a success!')}>Success</button>
29
- </View>
30
- <View name="info">
31
- <button on:click={() => notifications.info('This is an info toast!')}>Info</button>
32
- </View>
33
-
34
- <div class="notifications">
35
- {#each $notifications as notification (notification.id)}
36
- <div
37
- animate:flip
38
- class="toast"
39
- style="background: {themes[notification.type]};"
40
- transition:fly={{ y: -30 }}>
41
- <div class="content">{notification.message}</div>
42
- {#if notification.icon}<i class={notification.icon} />{/if}
43
- </div>
44
- {/each}
45
- </div>
46
-
47
- <style>
48
- .notifications {
49
- position: fixed;
50
- top: 10px;
51
- left: 0;
52
- right: 0;
53
- margin: 0 auto;
54
- padding: 0;
55
- z-index: 9999;
56
- display: flex;
57
- flex-direction: column;
58
- justify-content: flex-start;
59
- align-items: center;
60
- pointer-events: none;
61
- }
62
-
63
- .toast {
64
- flex: 0 0 auto;
65
- margin-bottom: 10px;
66
- border-radius: var(--border-radius-s);
67
- /* The toasts now support being auto sized, so this static width could be removed */
68
- width: 40vw;
69
- }
70
-
71
- .content {
72
- padding: 10px;
73
- display: block;
74
- color: white;
75
- font-weight: 500;
76
- }
77
- </style>
78
-