@energie360/ui-library 0.1.39 → 0.1.40

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.
@@ -13,17 +13,17 @@
13
13
  flex-direction: column;
14
14
  }
15
15
 
16
- .card-contact__name {
17
- @include a.type(700, strong);
18
- }
19
-
20
16
  .card-contact__role {
21
17
  @include a.type(200);
18
+ }
19
+
20
+ .card-contact__name {
21
+ @include a.type(700, strong);
22
22
 
23
23
  margin-top: var(--e-space-1);
24
24
 
25
25
  &:has(+ .card-contact__contacts) {
26
- margin-bottom: var(--e-space-4);
26
+ margin-bottom: var(--e-space-2);
27
27
  }
28
28
  }
29
29
 
@@ -21,16 +21,16 @@ defineSlots<{
21
21
  <template>
22
22
  <div class="card-contact">
23
23
  <div class="card-contact__left-column">
24
- <p class="card-contact__name">
25
- <slot name="name">{{ name }}</slot>
26
- </p>
27
-
28
24
  <p class="card-contact__role">
29
25
  <slot name="role">{{ role }}</slot>
30
26
  </p>
31
27
 
28
+ <p class="card-contact__name">
29
+ <slot name="name">{{ name }}</slot>
30
+ </p>
31
+
32
32
  <div v-if="$slots.contacts || contacts" class="card-contact__contacts">
33
- <URichtext>
33
+ <URichtext small>
34
34
  <slot name="contacts">
35
35
  <div v-html="contacts"></div>
36
36
  </slot>
@@ -13,6 +13,21 @@
13
13
  opacity: 0;
14
14
  }
15
15
 
16
+ // Modifiers
17
+ &.fit-height {
18
+ height: 100%;
19
+
20
+ .large {
21
+ aspect-ratio: 49 / 10;
22
+ height: 100%;
23
+ }
24
+
25
+ .mini {
26
+ aspect-ratio: 1;
27
+ height: 100%;
28
+ }
29
+ }
30
+
16
31
  // States
17
32
  &.minified {
18
33
  .mini {
@@ -7,6 +7,7 @@ interface Props {
7
7
  minified?: boolean
8
8
  minifying?: boolean
9
9
  expanding?: boolean
10
+ fitHeight?: boolean
10
11
  }
11
12
 
12
13
  const {
@@ -22,7 +23,7 @@ const {
22
23
  </script>
23
24
 
24
25
  <template>
25
- <div :class="['portal-logo', { minified, minifying, expanding }]">
26
+ <div :class="['portal-logo', { minified, minifying, expanding, 'fit-height': fitHeight }]">
26
27
  <img v-bind="logoImage" class="large" />
27
28
  <img v-bind="logoMinifiedImage" class="mini" />
28
29
  </div>
@@ -101,3 +101,13 @@
101
101
  }
102
102
  }
103
103
  }
104
+
105
+ .tabs.portal {
106
+ .tabs__row {
107
+ padding-left: var(--e-space-2);
108
+
109
+ @include a.bp(lg) {
110
+ padding-left: var(--e-space-5);
111
+ }
112
+ }
113
+ }
@@ -13,9 +13,10 @@ interface Props {
13
13
  activation?: 'manual' | 'automatic'
14
14
  items?: Tab[]
15
15
  noGradient?: boolean
16
+ variant: 'default' | 'portal'
16
17
  }
17
18
 
18
- const { items = [], activation = 'manual' } = defineProps<Props>()
19
+ const { items = [], activation = 'manual', variant = 'portal' } = defineProps<Props>()
19
20
  const emit = defineEmits<{ (e: 'tabFocus', id: string): void }>()
20
21
 
21
22
  const model = defineModel<string>()
@@ -122,7 +123,7 @@ onResize()
122
123
  </script>
123
124
 
124
125
  <template>
125
- <div :class="['tabs', { 'no-gradient': noGradient }]">
126
+ <div :class="['tabs', variant, { 'no-gradient': noGradient }]">
126
127
  <div class="tabs__row">
127
128
  <div class="tabs__col">
128
129
  <div class="tabs__wrapper">
@@ -42,4 +42,16 @@
42
42
  &:last-child {
43
43
  margin-bottom: 0;
44
44
  }
45
+
46
+ // Modifiers
47
+ &.fill-centered {
48
+ flex: 1 0 auto;
49
+ display: flex;
50
+ width: 100%;
51
+ align-items: center;
52
+
53
+ .portal-block__inner {
54
+ width: 100%;
55
+ }
56
+ }
45
57
  }
@@ -2,20 +2,31 @@
2
2
  /*
3
3
  Preferably only use `bottom-space`.
4
4
  `top-space` can make sense for last portal-block for example.
5
- This works because parent container is `display: block`, meaning that the vertical margins will collapse.
5
+ IMPORTANT: Because when the parent container (e.g., `.portal-main__content`) is flexbox, the vertical margins won't collapse.
6
+ Also, `fill-centered` will only work with a flexbox parent.
6
7
  */
7
8
  interface Props {
8
9
  big?: boolean
9
10
  bottomSpace?: '0' | '100' | '300' | '500' | '700'
10
11
  topSpace?: '0' | '100' | '300' | '500' | '700'
12
+ fillCentered?: boolean
11
13
  }
12
14
 
13
- const { bottomSpace = '100', topSpace = '0' } = defineProps<Props>()
15
+ const { bottomSpace = '100', topSpace = '0', fillCentered = false } = defineProps<Props>()
14
16
  </script>
15
17
 
16
18
  <template>
17
- <div :class="['portal-block', `bottom-space-${bottomSpace}`, `top-space-${topSpace}`]">
18
- <slot />
19
+ <div
20
+ :class="[
21
+ 'portal-block',
22
+ `bottom-space-${bottomSpace}`,
23
+ `top-space-${topSpace}`,
24
+ { 'fill-centered': fillCentered },
25
+ ]"
26
+ >
27
+ <div class="portal-block__inner">
28
+ <slot />
29
+ </div>
19
30
  </div>
20
31
  </template>
21
32
 
@@ -82,6 +82,9 @@
82
82
  padding-top: var(--e-space-10);
83
83
  padding-bottom: var(--e-space-10);
84
84
  flex: 1 1 100%;
85
+ display: flex;
86
+ flex-direction: column;
87
+ flex-wrap: nowrap;
85
88
 
86
89
  @include c.portal-content-container;
87
90
 
@@ -1,4 +1,4 @@
1
- @use '../../base/abstracts/' as a;
1
+ @use '../../base/abstracts' as a;
2
2
 
3
3
  .navigation-toolbar-top {
4
4
  --transition-ease-out: cubic-bezier(0.215, 0.61, 0.355, 1); /* easeOutCubic */
@@ -74,8 +74,10 @@
74
74
  }
75
75
 
76
76
  .navigation-toolbar-top__top-bar-logo {
77
+ height: a.rem(24);
78
+
77
79
  img {
78
- height: a.rem(24);
80
+ height: 100%;
79
81
  }
80
82
  }
81
83
 
@@ -93,13 +93,13 @@ watch(model, (newV) => {
93
93
  ]"
94
94
  >
95
95
  <div class="navigation-toolbar-top__top-bar">
96
- <a
97
- class="navigation-toolbar-top__top-bar-logo"
98
- :href="logoLink.href"
99
- :target="logoLink.target"
100
- >
101
- <img :src="logoImage.src" :alt="logoImage.alt" />
102
- </a>
96
+ <div class="navigation-toolbar-top__top-bar-logo">
97
+ <slot name="logo">
98
+ <a :href="logoLink.href" :target="logoLink.target">
99
+ <img :src="logoImage.src" :alt="logoImage.alt" />
100
+ </a>
101
+ </slot>
102
+ </div>
103
103
 
104
104
  <div class="navigation-toolbar-top__top-bar-ctas">
105
105
  <UContextMenu placement="bottom-full">
@@ -125,13 +125,13 @@ watch(model, (newV) => {
125
125
  class="navigation-toolbar-top__nav-panel"
126
126
  :class="{ 'is-opening': isMobilePanelOpening, 'is-closing': isMobilePanelClosing }"
127
127
  >
128
- <a
129
- class="navigation-toolbar-top__nav-panel-logo"
130
- :href="logoLink.href"
131
- :target="logoLink.target"
132
- >
133
- <img :src="logoImage.src" :alt="logoImage.alt" />
134
- </a>
128
+ <div class="navigation-toolbar-top__nav-panel-logo">
129
+ <slot name="panelLogo">
130
+ <a :href="logoLink.href" :target="logoLink.target">
131
+ <img :src="logoImage.src" :alt="logoImage.alt" />
132
+ </a>
133
+ </slot>
134
+ </div>
135
135
 
136
136
  <div class="navigation-toolbar-top__nav-panel-close">
137
137
  <UIconButton
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energie360/ui-library",
3
- "version": "0.1.39",
3
+ "version": "0.1.40",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",