@energie360/ui-library 0.1.20 → 0.1.22

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 (55) hide show
  1. package/components/badge/u-badge.vue +9 -1
  2. package/components/card/card.scss +3 -1
  3. package/components/card/u-card.vue +1 -3
  4. package/components/card-cta-header/u-card-cta-header.vue +1 -1
  5. package/components/card-footer/u-card-footer.vue +1 -1
  6. package/components/card-highlight/card-highlight.scss +38 -44
  7. package/components/card-highlight/u-card-highlight.vue +16 -9
  8. package/components/chip/chip.scss +2 -2
  9. package/components/chip/u-chip.vue +2 -2
  10. package/components/collapsible/u-collapsible.vue +1 -1
  11. package/components/context-menu-link/u-context-menu-link.vue +2 -2
  12. package/components/data-card/data-card.scss +4 -4
  13. package/components/data-card/u-data-card.vue +4 -4
  14. package/components/download-list-item/download-list-item.scss +22 -1
  15. package/components/download-list-item/u-download-list-item.vue +46 -8
  16. package/components/hint/u-hint.vue +1 -1
  17. package/components/navigation-panel-tile/u-navigation-panel-tile.vue +5 -1
  18. package/components/navigation-toolbar-link/navigation-toolbar-link.scss +9 -1
  19. package/components/navigation-toolbar-link/u-navigation-toolbar-link.vue +1 -0
  20. package/components/panel/u-panel.vue +1 -1
  21. package/components/progress-avatar/u-progress-avatar.vue +4 -4
  22. package/components/richtext/u-richtext.vue +1 -1
  23. package/components/table/cell-ctas.scss +1 -0
  24. package/components/table/u-cell-icon-group.vue +9 -1
  25. package/components/table/u-cell-progress-bar.vue +1 -1
  26. package/components/table/u-table-cell.vue +1 -0
  27. package/components/table/u-table-heading.vue +3 -5
  28. package/components/tabs/u-tabs.vue +10 -4
  29. package/components/text-block/u-text-block.vue +1 -1
  30. package/components/welcome/u-welcome.vue +21 -10
  31. package/components/welcome/welcome.scss +36 -13
  32. package/dist/base-style.css +23 -22
  33. package/dist/base-style.css.map +1 -1
  34. package/elements/button/_button-plain.scss +7 -10
  35. package/elements/button/u-button.vue +9 -4
  36. package/elements/button-chip/u-button-chip.vue +13 -7
  37. package/elements/checkbox/u-checkbox.vue +1 -1
  38. package/elements/icon-button/u-icon-button.vue +1 -1
  39. package/elements/numeric-stepper/u-numeric-stepper.vue +1 -1
  40. package/elements/select-chip/u-select-chip.vue +4 -1
  41. package/elements/text-field/u-text-field.vue +9 -3
  42. package/elements/textarea/u-textarea.vue +1 -0
  43. package/elements/toggle-switch/u-toggle-switch.vue +1 -0
  44. package/layout/index.js +2 -1
  45. package/layout/portal/portal.scss +26 -42
  46. package/layout/portal/u-portal.vue +13 -34
  47. package/layout/portal-main/portal-main.scss +98 -0
  48. package/layout/portal-main/u-portal-main.vue +37 -0
  49. package/layout/tile-grid/u-tile-item.vue +7 -0
  50. package/modules/dialog/u-dialog.vue +16 -6
  51. package/modules/index.js +1 -2
  52. package/modules/navigation-panel/navigation-panel.scss +12 -1
  53. package/modules/toast/u-toast.vue +6 -0
  54. package/package.json +7 -7
  55. package/wizard/wizard-outro/u-wizard-outro.vue +1 -1
@@ -0,0 +1,98 @@
1
+ @use '../../base/abstracts' as a;
2
+ @use '../../layout/container/container' as c;
3
+
4
+ .portal-main {
5
+ --panel-width: 300px;
6
+ --panel-height-mobile: 180px;
7
+
8
+ width: 100%;
9
+ display: grid;
10
+ grid-template-rows: 1fr;
11
+ grid-template-columns: 0 minmax(0, 1fr);
12
+ grid-template-areas: 'panel main';
13
+ transition: grid a.$trs-default;
14
+
15
+ &.show-panel {
16
+ grid-template-columns: var(--panel-width) minmax(0, 1fr);
17
+
18
+ .portal-main__panel {
19
+ transform: none;
20
+ opacity: 1;
21
+ }
22
+ }
23
+
24
+ @include a.bp(lg) {
25
+ grid-template-areas: none;
26
+ grid-template-columns: minmax(0, 1fr);
27
+ grid-template-rows: 0 auto;
28
+ height: 100%;
29
+
30
+ &.show-panel {
31
+ grid-template-columns: minmax(0, 1fr);
32
+ grid-template-rows: var(--panel-height-mobile) auto;
33
+ }
34
+ }
35
+ }
36
+
37
+ .portal-main__main {
38
+ grid-area: main;
39
+ display: flex;
40
+ flex-direction: column;
41
+
42
+ @include a.bp(lg) {
43
+ grid-area: auto;
44
+ }
45
+ }
46
+
47
+ .portal-main__panel {
48
+ grid-area: panel;
49
+ position: sticky;
50
+ top: 0;
51
+ min-width: 0;
52
+ height: 100vh;
53
+ width: var(--panel-width);
54
+ opacity: 0;
55
+ transform: translateX(-100%);
56
+ overflow: hidden;
57
+ transition:
58
+ transform a.$trs-default,
59
+ opacity a.$trs-default;
60
+
61
+ @include a.bp(lg) {
62
+ grid-area: auto;
63
+ position: static;
64
+ width: 100%;
65
+ height: var(--panel-height-mobile);
66
+ transform: translateY(-100%);
67
+ }
68
+ }
69
+
70
+ .portal-main__sub-navigation {
71
+ position: sticky;
72
+ top: 0;
73
+ z-index: 10;
74
+ background-color: var(--e-c-mono-00);
75
+
76
+ @include a.bp(lg) {
77
+ background-color: var(--e-c-mono-50);
78
+ }
79
+ }
80
+
81
+ .portal-main__content {
82
+ padding-top: var(--e-space-10);
83
+ padding-bottom: var(--e-space-10);
84
+
85
+ @include c.portal-content-container;
86
+
87
+ @include a.bp(lg) {
88
+ padding-top: var(--e-space-8);
89
+ }
90
+
91
+ @include a.bp(m) {
92
+ padding-top: var(--e-space-6);
93
+ }
94
+ }
95
+
96
+ .portal-main__footer {
97
+ margin-top: auto;
98
+ }
@@ -0,0 +1,37 @@
1
+ <script setup lang="ts">
2
+ import { inject } from 'vue'
3
+
4
+ interface Props {
5
+ showPanel?: boolean
6
+ }
7
+
8
+ defineProps<Props>()
9
+
10
+ const portalFooterSlot = inject('portal-footer-slot')
11
+ </script>
12
+
13
+ <template>
14
+ <div :class="['portal-main', { 'show-panel': showPanel }]">
15
+ <div class="portal-main__panel">
16
+ <slot name="panel"></slot>
17
+ </div>
18
+
19
+ <div class="portal-main__main">
20
+ <div class="portal-main__sub-navigation">
21
+ <slot name="subNavigation"></slot>
22
+ </div>
23
+
24
+ <div class="portal-main__content">
25
+ <slot></slot>
26
+ </div>
27
+
28
+ <div v-if="portalFooterSlot || $slots.footer" class="portal-main__footer">
29
+ <slot name="footer">
30
+ <component :is="vnode" v-for="(vnode, idx) in portalFooterSlot()" :key="idx" />
31
+ </slot>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ </template>
36
+
37
+ <style scoped lang="scss" src="./portal-main.scss"></style>
@@ -13,3 +13,10 @@ const { width = '1' } = defineProps<Props>()
13
13
  </template>
14
14
 
15
15
  <style scoped lang="scss" src="./tile-item.scss"></style>
16
+ <style lang="scss">
17
+ .tile-item {
18
+ .card {
19
+ height: 100%;
20
+ }
21
+ }
22
+ </style>
@@ -12,11 +12,19 @@ interface Props {
12
12
  contentImage?: Image
13
13
  closeBtnLabel?: string
14
14
  autoHeight?: boolean
15
+ modal?: boolean
15
16
  mobileDialogStyle?: 'modal' | 'slideout'
16
17
  }
17
18
 
18
- const { mobileDialogStyle = 'modal', closeBtnLabel = getTranslation('close') } =
19
- defineProps<Props>()
19
+ const {
20
+ modal = false,
21
+ title = '',
22
+ text = '',
23
+ headerImage = undefined,
24
+ contentImage = undefined,
25
+ mobileDialogStyle = 'modal',
26
+ closeBtnLabel = getTranslation('close'),
27
+ } = defineProps<Props>()
20
28
 
21
29
  const visible = defineModel<boolean>('visible')
22
30
  const dialogEl = useTemplateRef('dialog')
@@ -53,10 +61,12 @@ watch(visible, (newV) => {
53
61
  allowArrowLeftRight: true,
54
62
  })
55
63
 
56
- requestAnimationFrame(() => {
57
- window.addEventListener('keydown', onKeydown)
58
- document.addEventListener('click', onDocumentClick)
59
- })
64
+ if (!modal) {
65
+ requestAnimationFrame(() => {
66
+ window.addEventListener('keydown', onKeydown)
67
+ document.addEventListener('click', onDocumentClick)
68
+ })
69
+ }
60
70
  } else {
61
71
  focusTrapInstance.release()
62
72
 
package/modules/index.js CHANGED
@@ -5,8 +5,7 @@ export { default as UNavigationToolbarTop } from './navigation-toolbar-top/u-nav
5
5
  export { default as UNavigationToolbarSide } from './navigation-toolbar-side/u-navigation-toolbar-side.vue'
6
6
  export { default as UNavigationPanel } from './navigation-panel/u-navigation-panel.vue'
7
7
  export { default as UProgressIndicator } from './progress-indicator/u-progress-indicator.vue'
8
- export { default as UToast } from './toast/u-toast.vue'
9
- export { toast } from './toast/useToast.ts'
8
+ export { default as UToast, toast } from './toast/u-toast.vue'
10
9
  export { default as UDialog } from './dialog/u-dialog.vue'
11
10
  export { default as USearchFilter } from './search-filter/u-search-filter.vue'
12
11
  export { default as UContentTitle } from './content-title/u-content-title.vue'
@@ -1,4 +1,4 @@
1
- @use '../../base/abstracts/' as a;
1
+ @use '../../base/abstracts' as a;
2
2
 
3
3
  .navigation-panel {
4
4
  overflow: auto;
@@ -61,5 +61,16 @@
61
61
  @include a.type(200, strong);
62
62
 
63
63
  margin-bottom: var(--e-space-4);
64
+ white-space: nowrap;
65
+ overflow: hidden;
66
+ width: 100%;
67
+ text-overflow: ellipsis;
68
+
69
+ // This is a bit experimental.
70
+ // Because we accept here an HTML string, which can contain <div> or <p>, we'll 'ignore' these tags.
71
+ // This way the text-overflow: ellipsis works as intended.
72
+ * {
73
+ display: contents;
74
+ }
64
75
  }
65
76
  }
@@ -1,3 +1,9 @@
1
+ <script lang="ts">
2
+ import { toast } from './useToast'
3
+
4
+ export { toast }
5
+ </script>
6
+
1
7
  <script setup lang="ts">
2
8
  import UToastMessage from './u-toast-message.vue'
3
9
  import { toasts } from './useToast'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energie360/ui-library",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,21 +24,21 @@
24
24
  "author": "",
25
25
  "license": "MIT",
26
26
  "devDependencies": {
27
- "@tsconfig/node22": "^22.0.1",
28
- "@types/node": "^22.14.0",
27
+ "@tsconfig/node22": "^22.0.2",
28
+ "@types/node": "^22.16.5",
29
29
  "@vue/tsconfig": "^0.7.0",
30
30
  "autoprefixer": "^10.4.21",
31
31
  "chokidar": "^4.0.3",
32
- "postcss": "^8.5.3",
33
- "sass": "^1.86.3",
32
+ "postcss": "^8.5.6",
33
+ "sass": "^1.89.2",
34
34
  "typescript": "^5.8.3"
35
35
  },
36
36
  "dependencies": {
37
37
  "@energie360/design-tokens": "^1.3.0"
38
38
  },
39
39
  "peerDependencies": {
40
- "vue": "^3.5.0",
41
- "sass": "^1.86.3"
40
+ "sass": "^1.86.3",
41
+ "vue": "^3.5.0"
42
42
  },
43
43
  "scripts": {
44
44
  "watch": "node ./watch.js",
@@ -10,7 +10,7 @@ interface Props {
10
10
  cta?: Cta
11
11
  }
12
12
 
13
- const { text, cta } = defineProps<Props>()
13
+ const { text = '', image = undefined, cta = undefined, title = '' } = defineProps<Props>()
14
14
 
15
15
  const slots = useSlots()
16
16
  const hasCta = computed(() => !!slots.cta || cta)