@energie360/ui-library 0.1.31 → 0.1.33

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 (44) hide show
  1. package/components/badge/badge.scss +11 -4
  2. package/components/badge/u-badge.vue +3 -13
  3. package/components/card-amount/u-card-amount.vue +1 -1
  4. package/components/card-amount-illustrated/u-card-amount-illustrated.vue +1 -1
  5. package/components/card-contact/u-card-contact.vue +1 -1
  6. package/components/card-highlight/u-card-highlight.vue +2 -2
  7. package/components/card-price-list/u-card-price-list.vue +2 -2
  8. package/components/card-statistic/card-statistic.scss +31 -0
  9. package/components/card-statistic/u-card-statistic.vue +34 -0
  10. package/components/chip/chip.scss +1 -0
  11. package/components/chip/u-chip.vue +1 -0
  12. package/components/download-list-item/u-download-list-item.vue +1 -0
  13. package/components/empty/empty.scss +27 -0
  14. package/components/empty/u-empty.vue +32 -0
  15. package/components/hint/hint.scss +144 -33
  16. package/components/hint/u-hint.vue +44 -4
  17. package/components/index.js +2 -0
  18. package/components/navigation-panel-tile/navigation-panel-tile.scss +0 -18
  19. package/components/navigation-panel-tile/u-navigation-panel-tile.vue +8 -7
  20. package/components/navigation-toolbar-link/u-navigation-toolbar-link.vue +2 -2
  21. package/components/progress-avatar/u-progress-avatar.vue +1 -1
  22. package/components/slider/u-slider.vue +1 -1
  23. package/components/slider-progress-animation/u-slider-progress-animation.vue +1 -1
  24. package/components/table/table-cell.scss +9 -0
  25. package/components/table/u-cell-icon-group.vue +1 -1
  26. package/components/table/u-cell-progress-bar.vue +1 -1
  27. package/components/table/u-table-cell.vue +3 -0
  28. package/components/text-block/u-text-block.vue +1 -1
  29. package/dist/base-style.css +2 -2
  30. package/elements/button/u-button.vue +2 -1
  31. package/layout/portal-block/portal-block.scss +36 -3
  32. package/layout/portal-block/u-portal-block.vue +9 -3
  33. package/modules/dialog/dialog.scss +28 -23
  34. package/modules/dialog/u-dialog.vue +14 -17
  35. package/modules/index.js +1 -0
  36. package/modules/login-animation/butterfly-sprite.json +9 -0
  37. package/modules/login-animation/butterfly-sprite.png +0 -0
  38. package/modules/login-animation/login-animation.scss +65 -0
  39. package/modules/login-animation/u-login-animation.vue +74 -0
  40. package/modules/navigation-toolbar-top/u-navigation-toolbar-top.vue +24 -2
  41. package/package.json +9 -9
  42. package/utils/http/url.js +25 -0
  43. package/utils/vue/helpers.ts +27 -0
  44. package/wizard/wizard-outro/u-wizard-outro.vue +3 -0
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Create query parameter for an url with an object or an array
3
+ * INFO: Use an array as parameter if you have multiple values for a key
4
+ *
5
+ * @param url {string} - url to append the query parameters
6
+ * @param params {(object | Array)} - object with key, value as query parameter
7
+ * e.q object => random/testing, data = {'test': 1, 'hello': 'world'} => random/testing?test=1&hello=world
8
+ * e.q array => random/testing, data = [['test', 2], ['hello', 'earth']] => random/testing?test=2&hello=earth
9
+ *
10
+ * @returns {string}
11
+ */
12
+ export function addQueryParameter(url, params) {
13
+ const queryParams = []
14
+
15
+ if (Array.isArray(params)) {
16
+ queryParams.push(params.map((param) => param.map(encodeURIComponent)))
17
+ } else {
18
+ queryParams.push(Object.keys(params).map((key) => [key, params[key]].map(encodeURIComponent)))
19
+ }
20
+
21
+ const queryString = queryParams.map((param) =>
22
+ param.map((keyValue) => keyValue.join('=')).join('&'),
23
+ )
24
+ return `${url}?${queryString}`
25
+ }
@@ -0,0 +1,27 @@
1
+ // From https://github.com/vuejs/core/issues/4733
2
+
3
+ import { Comment, Text, Fragment, type Slot, type VNode } from 'vue'
4
+
5
+ export function hasSlotContent(slot: Slot | undefined | null, props: any = {}) {
6
+ return !isSlotEmpty(slot, props)
7
+ }
8
+
9
+ export function isSlotEmpty(slot: Slot | undefined | null, props: any = {}) {
10
+ return isVNodeEmpty(slot?.(props))
11
+ }
12
+
13
+ export function isVNodeEmpty(vnode: VNode | VNode[] | undefined | null) {
14
+ return (
15
+ !vnode ||
16
+ asArray(vnode).every(
17
+ (vnode) =>
18
+ vnode.type === Comment ||
19
+ (vnode.type === Text && !vnode.children?.length) ||
20
+ (vnode.type === Fragment && !vnode.children?.length),
21
+ )
22
+ )
23
+ }
24
+
25
+ export function asArray<T>(arg: T | T[] | null) {
26
+ return Array.isArray(arg) ? arg : arg !== null ? [arg] : []
27
+ }
@@ -7,13 +7,16 @@ interface Props {
7
7
  title?: string
8
8
  text?: string
9
9
  image?: Image
10
+
10
11
  cta?: Cta
11
12
  }
12
13
 
13
14
  const { text = '', image = undefined, cta = undefined, title = '' } = defineProps<Props>()
14
15
 
15
16
  const slots = useSlots()
17
+
16
18
  const hasCta = computed(() => !!slots.cta || cta)
19
+
17
20
  const hasText = computed(() => !!slots.text || text)
18
21
  </script>
19
22