@energie360/ui-library 0.1.17 → 0.1.19

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 (100) hide show
  1. package/base/_input-resets.scss +3 -0
  2. package/components/badge/badge.scss +56 -0
  3. package/components/badge/u-badge.vue +47 -0
  4. package/components/card-contact/card-contact.scss +39 -0
  5. package/components/card-contact/u-card-contact.vue +44 -0
  6. package/components/card-cta-bar/card-cta-bar.scss +4 -0
  7. package/components/card-cta-bar/u-card-cta-bar.vue +24 -0
  8. package/components/card-cta-header/u-card-cta-header.vue +10 -7
  9. package/components/card-footer/u-card-footer.vue +5 -3
  10. package/components/card-group/u-card-group.vue +1 -1
  11. package/components/card-header/card-header.scss +29 -4
  12. package/components/card-header/u-card-header.vue +22 -3
  13. package/components/card-highlight/card-highlight.scss +87 -0
  14. package/components/card-highlight/u-card-highlight.vue +54 -0
  15. package/components/card-price-list/card-price-list.scss +39 -0
  16. package/components/card-price-list/u-card-price-list.vue +37 -0
  17. package/components/card-section/card-section.scss +21 -1
  18. package/components/card-section/u-card-section.vue +9 -1
  19. package/components/chip/chip.scss +25 -0
  20. package/components/chip/u-chip.vue +31 -0
  21. package/components/data-card/data-card.scss +34 -0
  22. package/components/data-card/u-data-card.vue +49 -0
  23. package/components/data-card-group/data-card-group.scss +12 -0
  24. package/components/data-card-group/u-data-card-group.vue +7 -0
  25. package/components/download-list/download-list.scss +58 -0
  26. package/components/download-list/u-download-list.vue +44 -0
  27. package/components/download-list-item/download-list-item.scss +267 -0
  28. package/components/download-list-item/u-download-list-item.vue +65 -0
  29. package/components/file-upload/file-list.scss +68 -0
  30. package/components/file-upload/file-upload.scss +119 -0
  31. package/components/file-upload/u-file-list.vue +55 -0
  32. package/components/file-upload/u-file-upload.vue +220 -0
  33. package/components/hint/hint.scss +67 -6
  34. package/components/hint/u-hint.vue +11 -1
  35. package/components/index.js +16 -0
  36. package/components/progress-avatar/u-progress-avatar.vue +27 -3
  37. package/components/rating/rating.scss +76 -0
  38. package/components/rating/u-rating.vue +79 -0
  39. package/components/search-group/search-group.scss +59 -0
  40. package/components/search-group/u-search-group.vue +32 -0
  41. package/components/skeleton-loader/skeleton-loader.scss +39 -0
  42. package/components/skeleton-loader/u-skeleton-loader.vue +28 -0
  43. package/components/table/cell-ctas.scss +1 -7
  44. package/components/table/cell-icon-text.scss +15 -4
  45. package/components/table/table-cell.mixins.scss +3 -2
  46. package/components/table/table-cell.scss +5 -0
  47. package/components/table/table-heading.scss +7 -0
  48. package/components/table/u-cell-ctas.vue +15 -6
  49. package/components/table/u-cell-icon-text.vue +13 -5
  50. package/components/table/u-table-cell.vue +3 -1
  51. package/components/table/u-table-heading.vue +2 -1
  52. package/components/tabs/tabs.scss +10 -1
  53. package/components/tabs/u-tabs.vue +64 -25
  54. package/dist/base-style.css +3 -0
  55. package/dist/base-style.css.map +1 -1
  56. package/dist/layout/split.css.map +1 -1
  57. package/elements/button/_button-plain-small-spaceless.scss +10 -0
  58. package/elements/button/button.scss +32 -0
  59. package/elements/button/u-button.vue +47 -4
  60. package/elements/form-field/form-field-base.scss +4 -0
  61. package/elements/numeric-stepper/u-numeric-stepper.vue +35 -12
  62. package/elements/select/u-select.vue +6 -6
  63. package/elements/text-field/text-field.scss +15 -0
  64. package/elements/text-field/text-field.types.ts +1 -0
  65. package/elements/text-field/u-text-field.vue +27 -6
  66. package/elements/toggle-switch/toggle-switch-small.scss +10 -0
  67. package/elements/toggle-switch/toggle-switch.scss +25 -21
  68. package/elements/toggle-switch/u-toggle-switch.vue +22 -12
  69. package/i18n/i18n.ts +40 -0
  70. package/layout/container/container.scss +18 -0
  71. package/layout/index.js +4 -1
  72. package/layout/portal/portal.scss +35 -7
  73. package/layout/portal/u-portal.vue +33 -4
  74. package/layout/portal-content-aside/portal-content-aside.scss +35 -0
  75. package/layout/portal-content-aside/u-portal-content-aside.vue +15 -0
  76. package/layout/responsive-container/u-responsive-container.vue +35 -0
  77. package/layout/tile-grid/tile-grid.scss +13 -0
  78. package/layout/tile-grid/tile-item.scss +31 -0
  79. package/layout/tile-grid/u-tile-grid.vue +7 -0
  80. package/layout/tile-grid/u-tile-item.vue +15 -0
  81. package/modules/content-title/content-title.scss +43 -0
  82. package/modules/content-title/u-content-title.vue +19 -0
  83. package/modules/dialog/dialog.scss +11 -3
  84. package/modules/dialog/u-dialog.vue +8 -2
  85. package/modules/footer/footer.scss +8 -1
  86. package/modules/footer/u-footer.vue +1 -1
  87. package/modules/index.js +2 -0
  88. package/modules/search-filter/search-filter.scss +106 -0
  89. package/modules/search-filter/u-search-filter.vue +54 -0
  90. package/package.json +2 -1
  91. package/utils/array/intersect.js +7 -0
  92. package/utils/functions/breakpoint.js +4 -9
  93. package/utils/functions/format-bytes.js +17 -0
  94. package/utils/global/mime-types.js +8 -0
  95. package/utils/translations/translate.js +10 -2
  96. package/wizard/index.js +1 -0
  97. package/wizard/wizard-top-bar/u-wizard-top-bar.vue +31 -0
  98. package/wizard/wizard-top-bar/wizard-top-bar.scss +35 -0
  99. package/layout/settings/settings.scss +0 -33
  100. package/layout/settings/u-settings-layout.vue +0 -19
@@ -0,0 +1,17 @@
1
+ /**
2
+ *
3
+ * @param {number} bytes
4
+ * @param decimals
5
+ * @returns {string}
6
+ */
7
+ export const formatBytes = (bytes, decimals = 2) => {
8
+ if (!+bytes) return '0 Bytes'
9
+
10
+ const k = 1024
11
+ const dm = decimals < 0 ? 0 : decimals
12
+ const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
13
+
14
+ const i = Math.floor(Math.log(bytes) / Math.log(k))
15
+
16
+ return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`
17
+ }
@@ -0,0 +1,8 @@
1
+ // TODO: Add more possible types.
2
+ export const mimeTypes = {
3
+ 'image/png': ['png'],
4
+ 'application/pdf': ['pdf'],
5
+ 'image/jpeg': ['jpeg', 'jpg'],
6
+ 'image/svg+xml': ['svg'],
7
+ 'image/gif': ['gif'],
8
+ }
@@ -8,6 +8,14 @@ const getLanguage = () => {
8
8
  return langAttr === '' ? DEFAULT_LANGUAGE : langAttr
9
9
  }
10
10
 
11
- export const getTranslation = (key) => {
12
- return translations[getLanguage()][key]
11
+ export const getTranslation = (key, replace) => {
12
+ let translation = translations[getLanguage()][key]
13
+
14
+ if (replace) {
15
+ for (key in replace) {
16
+ translation = translation.replace(key, replace[key])
17
+ }
18
+ }
19
+
20
+ return translation
13
21
  }
package/wizard/index.js CHANGED
@@ -3,3 +3,4 @@ export { default as UWizardOutro } from './wizard-outro/u-wizard-outro.vue'
3
3
  export { default as UWizardLayout } from './wizard-layout/u-wizard-layout.vue'
4
4
  export { default as UWizardLayoutBlock } from './wizard-layout/u-wizard-layout-block.vue'
5
5
  export { default as UWizardLayoutElement } from './wizard-layout/u-wizard-layout-element.vue'
6
+ export { default as UWizardTopBar } from './wizard-top-bar/u-wizard-top-bar.vue'
@@ -0,0 +1,31 @@
1
+ <!--<script setup lang="ts">-->
2
+ <!--import { UIcon } from '../../elements'-->
3
+
4
+ <!--interface Props {-->
5
+ <!-- objectAddress?: string-->
6
+ <!--}-->
7
+ <!--</script>-->
8
+
9
+ <template>
10
+ <div class="wizard-top-bar">
11
+ <div class="container">
12
+ <div class="wizard-top-bar__inner">
13
+ <div class="wizard-top-bar__logo">
14
+ <img src="/static/ui-assets/images/logo.svg" alt="logo" />
15
+ </div>
16
+
17
+ <div class="wizard-top-bar__right-column">
18
+ <div class="wizard-top-bar__additional">
19
+ <slot name="additional"></slot>
20
+ </div>
21
+
22
+ <div class="wizard-top-bar__cta">
23
+ <slot name="cta"></slot>
24
+ </div>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </template>
30
+
31
+ <style scoped lang="scss" src="./wizard-top-bar.scss"></style>
@@ -0,0 +1,35 @@
1
+ @use '../../base/abstracts' as a;
2
+ @use '../../layout/container/container';
3
+
4
+ .wizard-top-bar__inner {
5
+ height: a.rem(98);
6
+ display: flex;
7
+ justify-content: space-between;
8
+ align-items: center;
9
+ }
10
+
11
+ .wizard-top-bar__logo {
12
+ flex: 0 0 auto;
13
+
14
+ img {
15
+ height: a.rem(40);
16
+
17
+ @include a.bp(lg) {
18
+ height: a.rem(24);
19
+ }
20
+ }
21
+ }
22
+
23
+ .wizard-top-bar__cta,
24
+ .wizard-top-bar__right-column {
25
+ display: flex;
26
+ column-gap: var(--e-space-6);
27
+ }
28
+
29
+ .wizard-top-bar__right-column {
30
+ .wizard-top-bar__additional {
31
+ @include a.bp(m) {
32
+ display: none;
33
+ }
34
+ }
35
+ }
@@ -1,33 +0,0 @@
1
- @use '../../base/abstracts' as a;
2
-
3
- .settings-layout {
4
- display: grid;
5
- grid-template-columns: auto a.rem(320);
6
- grid-template-rows: repeat(2, auto);
7
- grid-column-gap: var(--e-space-24);
8
- grid-row-gap: var(--e-space-12);
9
- padding: var(--e-space-10);
10
-
11
- @include a.bp(lg) {
12
- display: flex;
13
- flex-direction: column;
14
- row-gap: var(--e-space-6);
15
- padding: var(--e-space-6) var(--e-space-5) var(--e-space-10);
16
- }
17
- }
18
-
19
- .settings-layout__header {
20
- grid-area: 1 / 1 / 2 / 3;
21
- }
22
-
23
- .settings-layout__main {
24
- grid-area: 2 / 1 / 3 / 2;
25
- }
26
-
27
- .settings-layout__aside {
28
- grid-area: 2 / 2 / 3 / 3;
29
- }
30
-
31
- .settings-layout__title {
32
- @include a.type(500, strong);
33
- }
@@ -1,19 +0,0 @@
1
- <template>
2
- <div class="settings-layout">
3
- <div class="settings-layout__header">
4
- <h1 class="settings-layout__title">
5
- <slot name="title"></slot>
6
- </h1>
7
- </div>
8
-
9
- <div class="settings-layout__main">
10
- <slot name="main"></slot>
11
- </div>
12
-
13
- <aside class="settings-layout__aside">
14
- <slot name="aside"></slot>
15
- </aside>
16
- </div>
17
- </template>
18
-
19
- <style scoped lang="scss" src="./settings.scss"></style>