@energie360/ui-library 0.1.32 → 0.1.34

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 (63) hide show
  1. package/base/_resets.scss +4 -0
  2. package/components/badge/badge.scss +11 -4
  3. package/components/badge/u-badge.vue +3 -13
  4. package/components/button-group/button-group.scss +12 -0
  5. package/components/button-group/u-button-group.vue +15 -0
  6. package/components/card-amount/u-card-amount.vue +1 -1
  7. package/components/card-amount-illustrated/u-card-amount-illustrated.vue +1 -1
  8. package/components/card-contact/u-card-contact.vue +1 -1
  9. package/components/card-highlight/u-card-highlight.vue +2 -2
  10. package/components/card-price-list/u-card-price-list.vue +2 -2
  11. package/components/card-statistic/card-statistic.scss +31 -0
  12. package/components/card-statistic/u-card-statistic.vue +34 -0
  13. package/components/chip/chip.scss +1 -0
  14. package/components/chip/u-chip.vue +1 -0
  15. package/components/data-card/data-card.scss +15 -0
  16. package/components/data-card/u-data-card.vue +6 -1
  17. package/components/download-list-item/u-download-list-item.vue +1 -0
  18. package/components/empty/empty.scss +27 -0
  19. package/components/empty/u-empty.vue +32 -0
  20. package/components/hint/hint.scss +106 -35
  21. package/components/hint/u-hint.vue +35 -4
  22. package/components/index.js +3 -0
  23. package/components/navigation-panel-tile/navigation-panel-tile.scss +0 -18
  24. package/components/navigation-panel-tile/u-navigation-panel-tile.vue +8 -7
  25. package/components/navigation-toolbar-link/u-navigation-toolbar-link.vue +2 -2
  26. package/components/notification-item/notification-item.scss +1 -0
  27. package/components/progress-avatar/u-progress-avatar.vue +1 -1
  28. package/components/slider/u-slider.vue +1 -1
  29. package/components/slider-progress-animation/u-slider-progress-animation.vue +1 -1
  30. package/components/table/table-cell.scss +10 -0
  31. package/components/table/u-cell-icon-group.vue +1 -1
  32. package/components/table/u-cell-progress-bar.vue +1 -1
  33. package/components/table/u-table-cell.vue +3 -0
  34. package/components/text-block/u-text-block.vue +1 -1
  35. package/components/welcome/butterfly-sprite.json +9 -0
  36. package/components/welcome/butterfly-sprite.png +0 -0
  37. package/components/welcome/u-welcome.vue +69 -1
  38. package/components/welcome/welcome.scss +10 -0
  39. package/dist/base-style.css +6 -2
  40. package/dist/base-style.css.map +1 -1
  41. package/dist/elements/form.css +1 -1
  42. package/dist/layout/form-grid.css.map +1 -1
  43. package/elements/button/u-button.vue +2 -1
  44. package/elements/form/form.scss +1 -1
  45. package/i18n/i18n.ts +22 -20
  46. package/layout/form-grid/form-grid.scss +2 -0
  47. package/layout/form-grid/u-form-col.vue +1 -1
  48. package/layout/form-grid/u-form-fieldset.vue +36 -0
  49. package/layout/form-grid/u-form-row.vue +29 -3
  50. package/layout/form-grid/u-form-wrapper.vue +7 -0
  51. package/layout/index.js +2 -0
  52. package/layout/portal-block/portal-block.scss +36 -3
  53. package/layout/portal-block/u-portal-block.vue +9 -3
  54. package/modules/dialog/dialog.scss +34 -24
  55. package/modules/dialog/u-dialog.vue +14 -17
  56. package/modules/footer/footer.scss +30 -4
  57. package/modules/login-animation/login-animation.scss +1 -3
  58. package/modules/login-animation/u-login-animation.vue +11 -12
  59. package/modules/navigation-toolbar-top/u-navigation-toolbar-top.vue +24 -2
  60. package/package.json +9 -9
  61. package/utils/http/url.js +25 -0
  62. package/utils/vue/helpers.ts +27 -0
  63. package/wizard/wizard-outro/u-wizard-outro.vue +3 -0
@@ -82,24 +82,6 @@
82
82
  }
83
83
  }
84
84
 
85
- .badge {
86
- position: absolute;
87
- top: -2px;
88
- right: -2px;
89
- width: a.rem(13);
90
- height: a.rem(13);
91
- background-color: var(--e-c-mono-900);
92
- border-radius: 100%;
93
-
94
- &.inactive {
95
- background-image: url("data:image/svg+xml,%3Csvg width='13' height='13' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='6.5' cy='6.5' r='6.5' fill='%23333'/%3E%3Cpath d='m4.414 3 2.12 2.121L8.658 3l1.414 1.414-2.122 2.122 2.122 2.121-1.414 1.414-2.122-2.12-2.12 2.12L3 8.656l2.12-2.12L3 4.412 4.414 3Z' fill='%23fff'/%3E%3C/svg%3E");
96
- }
97
- }
98
-
99
85
  .navigation-panel-tile__text-column {
100
86
  flex: 1 1 auto;
101
87
  }
102
-
103
- .badge + .icon {
104
- color: var(--e-c-mono-500);
105
- }
@@ -1,8 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  import { computed } from 'vue'
3
3
  import { UIcon } from '../../elements'
4
-
5
- type IconBadge = 'inactive'
4
+ import UBadge from '../../components/badge/u-badge.vue'
5
+ import type { Badge } from '../badge/u-badge.vue'
6
6
 
7
7
  interface Props {
8
8
  active?: boolean
@@ -11,7 +11,7 @@ interface Props {
11
11
  greyed?: boolean
12
12
  href?: string
13
13
  icon?: string
14
- iconBadge?: IconBadge
14
+ badge?: Badge
15
15
  target?: string
16
16
  title?: string
17
17
  }
@@ -19,7 +19,7 @@ interface Props {
19
19
  const {
20
20
  description = '',
21
21
  icon = '',
22
- iconBadge = undefined,
22
+ badge = undefined,
23
23
  title = '',
24
24
  href = '',
25
25
  target = '_self',
@@ -53,9 +53,10 @@ const tag = computed(() => (href ? 'a' : 'div'))
53
53
 
54
54
  <div class="navigation-panel-tile__icon-column">
55
55
  <div v-if="icon" class="navigation-panel-tile__icon-wrapper">
56
- <span v-if="iconBadge" :class="['badge', iconBadge]" />
57
-
58
- <UIcon :name="icon" />
56
+ <UBadge v-if="badge" v-bind="badge">
57
+ <UIcon :name="icon" />
58
+ </UBadge>
59
+ <UIcon v-else :name="icon" />
59
60
  </div>
60
61
  </div>
61
62
  </component>
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { ref, watch, computed, useTemplateRef } from 'vue'
3
- import { UIcon } from '../../elements'
4
- import { UBadge } from '../../components'
3
+ import UIcon from '../../elements/icon/u-icon.vue'
4
+ import UBadge from '../../components/badge/u-badge.vue'
5
5
  import { Badge } from '../badge/u-badge.vue'
6
6
 
7
7
  // TODO: Label animation when collapsed is a mess. Refactor it as soon as possbile!
@@ -83,6 +83,7 @@
83
83
  }
84
84
 
85
85
  .notification-item__dot {
86
+ flex: 0 0 auto;
86
87
  display: block;
87
88
  width: 8px;
88
89
  height: 8px;
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { onMounted, useTemplateRef, ref } from 'vue'
3
3
  import { Image } from '../../elements/types'
4
- import { UCircularProgress } from '../'
4
+ import UCircularProgress from '../circular-progress/u-circular-progress.vue'
5
5
 
6
6
  interface Props {
7
7
  image: Image
@@ -2,7 +2,7 @@
2
2
  import { watch, useId, useTemplateRef, onMounted, ref } from 'vue'
3
3
  import { scaleValue } from '../../utils/math/scale-value'
4
4
  import { clamp } from '../../utils/math/clamp'
5
- import { UTooltip } from '../'
5
+ import UTooltip from '../tooltip/u-tooltip.vue'
6
6
 
7
7
  interface SliderDot {
8
8
  value: number
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { onMounted, onUnmounted, ref, useTemplateRef } from 'vue'
3
3
  import '@lottiefiles/lottie-player'
4
- import { USlider } from '../'
4
+ import USlider from '../slider/u-slider.vue'
5
5
  import { Slider } from '../slider/u-slider.vue'
6
6
  import { Image } from '../../elements/types'
7
7
 
@@ -27,3 +27,13 @@
27
27
  vertical-align: middle;
28
28
  color: var(--e-c-secondary-05-500);
29
29
  }
30
+
31
+ .table-cell__dot {
32
+ align-self: center;
33
+ flex: 0 0 auto;
34
+ display: block;
35
+ width: 8px;
36
+ height: 8px;
37
+ border-radius: 100%;
38
+ background-color: transparent;
39
+ }
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import UIcon from '../../elements/icon/u-icon.vue'
3
3
  import UTooltip from '../tooltip/u-tooltip.vue'
4
- import { UBadge } from '../'
4
+ import UBadge from '../badge/u-badge.vue'
5
5
  import { Badge } from '../badge/u-badge.vue'
6
6
  import { TableCellIconColor } from './table.type'
7
7
 
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { UProgressBar } from '../'
2
+ import UProgressBar from '../progress-bar/u-progress-bar.vue'
3
3
 
4
4
  interface Props {
5
5
  label?: string
@@ -7,6 +7,7 @@ interface Props extends TableCellBase {
7
7
  infoText?: string
8
8
  textStyle?: TableCellTextStyle
9
9
  nowrap?: boolean
10
+ dotColor?: string
10
11
  }
11
12
 
12
13
  const {
@@ -15,6 +16,7 @@ const {
15
16
  hAlign = TableCellHAlign.left,
16
17
  vAlign = TableCellVAlign.center,
17
18
  nowrap = false,
19
+ dotColor = '',
18
20
  } = defineProps<Props>()
19
21
  </script>
20
22
 
@@ -24,6 +26,7 @@ const {
24
26
  :class="['table-cell', `h-align-${hAlign}`, `v-align-${vAlign}`, { 'has-tooltip': infoText }]"
25
27
  >
26
28
  <div :class="['cell-content', `text-${textStyle}`, { nowrap }]">
29
+ <span v-if="dotColor" class="table-cell__dot" :style="{ backgroundColor: dotColor }"></span>
27
30
  <slot><span v-html="text" /></slot>
28
31
  </div>
29
32
 
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { URichtext } from '../'
2
+ import URichtext from '../richtext/u-richtext.vue'
3
3
 
4
4
  interface Props {
5
5
  variant: 'lead' | 'sub'
@@ -0,0 +1,9 @@
1
+ [
2
+ [0,0],
3
+ [202, 0],
4
+ [404, 0],
5
+ [606, 0],
6
+ [808, 0],
7
+ [1010, 0],
8
+ [1212, 0]
9
+ ]
@@ -1,15 +1,66 @@
1
1
  <script setup lang="ts">
2
+ import USpriteAnimation from '../sprite-animation/u-sprite-animation.vue'
2
3
  import { Image } from '../../elements/types'
4
+ import butterflySpritePositions from './butterfly-sprite.json'
5
+ import butterflySprite from './butterfly-sprite.png'
6
+ import { gsap } from 'gsap'
7
+ import { ref, useTemplateRef } from 'vue'
3
8
 
4
9
  interface Props {
5
10
  text?: string
6
11
  image?: Image
7
12
  }
8
13
  defineProps<Props>()
14
+
15
+ const butterfly = useTemplateRef('butterfly')
16
+ const container = useTemplateRef('container')
17
+ const butterflyWrapper = useTemplateRef('butterflyWrapper')
18
+ const mouseRightSide = ref(true)
19
+ const xOffset = -300
20
+
21
+ const onMouseleave = () => {
22
+ mouseRightSide.value = Number(gsap.getProperty(butterflyWrapper.value, 'x')) < 0
23
+
24
+ gsap.to(butterflyWrapper.value, {
25
+ x: 0,
26
+ y: 0,
27
+ ease: 'power2',
28
+ duration: 4,
29
+ overwrite: true,
30
+ })
31
+ }
32
+
33
+ const onMousemove = (e: MouseEvent) => {
34
+ const { left, top, width, height } = container.value.getBoundingClientRect()
35
+
36
+ const halfW = width / 2
37
+ const halfH = height / 2
38
+ const mouseX = e.x - left
39
+ const mouseY = e.y - top
40
+
41
+ const x = gsap.utils.interpolate(-halfW, halfW, mouseX / width)
42
+ const y = gsap.utils.interpolate(-halfH, halfH, mouseY / height)
43
+
44
+ gsap.to(butterflyWrapper.value, {
45
+ x: x + xOffset,
46
+ y: y,
47
+ duration: 10,
48
+ ease: 'power1',
49
+ overwrite: true,
50
+ onUpdate() {
51
+ mouseRightSide.value =
52
+ Number(gsap.getProperty(butterflyWrapper.value, 'x')) < mouseX + xOffset - width / 2
53
+ },
54
+ })
55
+ }
56
+
57
+ const onSpriteReady = () => {
58
+ butterfly.value.playLoop()
59
+ }
9
60
  </script>
10
61
 
11
62
  <template>
12
- <div class="welcome">
63
+ <div ref="container" class="welcome" @mousemove="onMousemove" @mouseleave="onMouseleave">
13
64
  <div class="welcome__content">
14
65
  <h2>
15
66
  <slot>{{ text }}</slot>
@@ -21,6 +72,23 @@ defineProps<Props>()
21
72
  <img :src="image.src" :alt="image.alt" />
22
73
  </slot>
23
74
  </div>
75
+
76
+ <div ref="butterflyWrapper" class="welcome__sprite-animation">
77
+ <USpriteAnimation
78
+ ref="butterfly"
79
+ :style="{
80
+ transform: mouseRightSide ? 'scaleX(1)' : 'scaleX(-1)',
81
+ }"
82
+ :spritesheet-path="butterflySprite"
83
+ :frame-positions="butterflySpritePositions"
84
+ :frame-width="202"
85
+ :frame-height="300"
86
+ :width="32"
87
+ :height="47"
88
+ :duration="1000"
89
+ @ready="onSpriteReady"
90
+ />
91
+ </div>
24
92
  </div>
25
93
  </template>
26
94
 
@@ -18,6 +18,7 @@
18
18
  min-height: a.rem(86);
19
19
  height: auto;
20
20
  padding: var(--e-space-3) var(--e-space-4);
21
+ pointer-events: none;
21
22
  }
22
23
  }
23
24
 
@@ -46,3 +47,12 @@
46
47
  display: none;
47
48
  }
48
49
  }
50
+
51
+ .welcome__sprite-animation {
52
+ position: absolute;
53
+ right: 290px;
54
+
55
+ @include a.bp(lg) {
56
+ right: 32px;
57
+ }
58
+ }
@@ -71,6 +71,10 @@ fieldset {
71
71
  border: 0;
72
72
  }
73
73
 
74
+ legend {
75
+ padding: 0;
76
+ }
77
+
74
78
  /* easeOutCubic */
75
79
  /* prettier-ignore */
76
80
  input,
@@ -317,8 +321,8 @@ body {
317
321
  --e-c-signal-02-700-rgb: 204, 122, 0;
318
322
  --e-c-signal-02-900: #703600;
319
323
  --e-c-signal-02-900-rgb: 112, 54, 0;
320
- --e-c-signal-03-100: #ffb5c4;
321
- --e-c-signal-03-100-rgb: 255, 181, 196;
324
+ --e-c-signal-03-100: #ffccd7;
325
+ --e-c-signal-03-100-rgb: 255, 204, 215;
322
326
  --e-c-signal-03-500: #ff0c3e;
323
327
  --e-c-signal-03-500-rgb: 255, 12, 62;
324
328
  --e-c-signal-03-700: #b90d31;
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../base/main-base.scss","../base/_resets.scss","../base/abstracts/_resets.scss","../base/abstracts/_variables.scss","../base/abstracts/_functions.scss","../base/_input-resets.scss","../base/abstracts/_mixins.scss","../base/_html.scss","../base/_body.scss","../base/_focus-handling.scss","../node_modules/@energie360/design-tokens/dist/fonts/fonts.css","../node_modules/@energie360/design-tokens/dist/css/design-tokens.css"],"names":[],"mappings":";AAAA;AAAA;AAAA;AAAA;ACEA;EACE;EACA;;;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;EAME;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;AAAA;AAAA;EAGE;;;AC1BA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADuBJ;AAAA;EAEE;EACA;EACA;;;AAGF;AAAA;AAAA;EAGE;;;AAGF;EACE;;;AAGF;AAAA;EAEE;EACA;;;AAGF;EACE;EACA;EACA;;;AErB+E;AChCjF;ACHA;AAAA;AAAA;EAGE;EACA;EACA;EACA;EACA;EACA;;;AAGF;AAAA;AAAA;EC8BE;EACA;EAKE;;;AD7BF;EACE;;AAGF;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;;;AAIA;EACE;;;AAIJ;EACE;;;AAGF;EAEE;;AAEA;EAEE;EACA;;;AEvDJ;EACE;EACA;EACA;;;AAGF;AAAA;AAAA;EAGE;;;ACTF;EACE;EACA;EACA;EACA;EACA;;;ACAF;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AChBF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBA;AAEA;AAEA;AAEA;AAEA;AACA;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;AACA;EACE;EACA;EACA;EACA;EACA,KACE;;AC/CJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAAA;EAEA;AAAA;EAEA;AAAA;EAEA;AAAA;EAEA;;;AX7MA;AAAA;AAAA;AAAA;EACE","file":"base-style.css"}
1
+ {"version":3,"sourceRoot":"","sources":["../base/main-base.scss","../base/_resets.scss","../base/abstracts/_resets.scss","../base/abstracts/_variables.scss","../base/abstracts/_functions.scss","../base/_input-resets.scss","../base/abstracts/_mixins.scss","../base/_html.scss","../base/_body.scss","../base/_focus-handling.scss","../node_modules/@energie360/design-tokens/dist/fonts/fonts.css","../node_modules/@energie360/design-tokens/dist/css/design-tokens.css"],"names":[],"mappings":";AAAA;AAAA;AAAA;AAAA;ACEA;EACE;EACA;;;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;EAME;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;AAAA;AAAA;EAGE;;;AC1BA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;ADuBJ;AAAA;EAEE;EACA;EACA;;;AAGF;AAAA;AAAA;EAGE;;;AAGF;EACE;;;AAGF;AAAA;EAEE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AEzB+E;AChCjF;ACHA;AAAA;AAAA;EAGE;EACA;EACA;EACA;EACA;EACA;;;AAGF;AAAA;AAAA;EC8BE;EACA;EAKE;;;AD7BF;EACE;;AAGF;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;;;AAIA;EACE;;;AAIJ;EACE;;;AAGF;EAEE;;AAEA;EAEE;EACA;;;AEvDJ;EACE;EACA;EACA;;;AAGF;AAAA;AAAA;EAGE;;;ACTF;EACE;EACA;EACA;EACA;EACA;;;ACAF;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AChBF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBA;AAEA;AAEA;AAEA;AAEA;AACA;EACE;EACA;EACA;EACA;EACA,KACE;;AAIJ;AACA;EACE;EACA;EACA;EACA;EACA,KACE;;AC/CJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAAA;EAEA;AAAA;EAEA;AAAA;EAEA;AAAA;EAEA;;;AX7MA;AAAA;AAAA;AAAA;EACE","file":"base-style.css"}
@@ -67,7 +67,7 @@
67
67
  }
68
68
  .form .form__cta-group {
69
69
  display: flex;
70
- grid-gap: var(--e-space-5);
70
+ gap: var(--e-space-5);
71
71
  }
72
72
  @media (max-width: 740px) {
73
73
  .form .form__cta-group {
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../base/abstracts/_variables.scss","../../base/abstracts/_functions.scss","../../layout/grid/grid.mixin.scss","../../layout/form-grid/form-grid.scss","../../base/abstracts/_mixins.scss"],"names":[],"mappings":"AAqCiF;AChCjF;ACFA;AAAA;AAAA;AAAA;AA0BA;AAAA;;AAAA;AAAA;AAAA;ACzBA;EACE;;;AAGF;EDIE;EACA;EACA,KFgBgB;;AIThB;EDbF;IDSI,KFca;;;AIVf;EDbF;IDaI,KFWY;;;AIXd;EDbF;IDiBI,KFQY;;;AGtBd;ED2BA;EACA,WAHY;;AEfZ;EDVA;IDiCE;IACA,WAHW;;;AErBb;EDVA;IDwCE;IACA,WAHU;;;AE5BZ;EDVA;ID+CE;IACA,WAHU;;;ACxCZ;EDsBA;EACA,WAHY;;AEfZ;EDLA;ID4BE;IACA,WAHW;;;AErBb;EDLA;IDmCE;IACA,WAHU;;;AE5BZ;EDLA;ID0CE;IACA,WAHU;;;ACpCZ;EDkBA;EACA,WAHY;;AEfZ;EDDA;IDwBE;IACA,WAHW;;;AErBb;EDDA;ID+BE;IACA,WAHU;;;AE5BZ;EDDA;IDsCE;IACA,WAHU;;;AC/BZ;EDaA;EACA,WAHY;;AEfZ;EDIA;IDmBE;IACA,WAHW;;;AErBb;EDIA;ID0BE;IACA,WAHU;;;AE5BZ;EDIA;IDiCE;IACA,WAHU;;;AC3BZ;EDSA;EACA,WAHY;;AEfZ;EDQA;IDeE;IACA,WAHW;;;AErBb;EDQA;IDsBE;IACA,WAHU;;;AE5BZ;EDQA;ID6BE;IACA,WAHU;;;AEnCZ;EDYA;AAAA;AAAA;AAAA;IDKA;IACA,WAHY;;;AEfZ;EDYA;AAAA;AAAA;AAAA;IDWE;IACA,WAHW;;;AErBb;EDYA;AAAA;AAAA;AAAA;IDkBE;IACA,WAHU;;;AE5BZ;EDYA;AAAA;AAAA;AAAA;IDyBE;IACA,WAHU;;;ACdZ;EACE","file":"form-grid.css"}
1
+ {"version":3,"sourceRoot":"","sources":["../../base/abstracts/_variables.scss","../../base/abstracts/_functions.scss","../../layout/grid/grid.mixin.scss","../../layout/form-grid/form-grid.scss","../../base/abstracts/_mixins.scss"],"names":[],"mappings":"AAqCiF;AChCjF;ACFA;AAAA;AAAA;AAAA;AA0BA;AAAA;;AAAA;AAAA;AAAA;ACvBA;EACE;;;AAGF;EDEE;EACA;EACA,KFgBgB;;AIThB;EDXF;IDOI,KFca;;;AIVf;EDXF;IDWI,KFWY;;;AIXd;EDXF;IDeI,KFQY;;;AGpBd;EDyBA;EACA,WAHY;;AEfZ;EDRA;ID+BE;IACA,WAHW;;;AErBb;EDRA;IDsCE;IACA,WAHU;;;AE5BZ;EDRA;ID6CE;IACA,WAHU;;;ACtCZ;EDoBA;EACA,WAHY;;AEfZ;EDHA;ID0BE;IACA,WAHW;;;AErBb;EDHA;IDiCE;IACA,WAHU;;;AE5BZ;EDHA;IDwCE;IACA,WAHU;;;AClCZ;EDgBA;EACA,WAHY;;AEfZ;EDCA;IDsBE;IACA,WAHW;;;AErBb;EDCA;ID6BE;IACA,WAHU;;;AE5BZ;EDCA;IDoCE;IACA,WAHU;;;AC7BZ;EDWA;EACA,WAHY;;AEfZ;EDMA;IDiBE;IACA,WAHW;;;AErBb;EDMA;IDwBE;IACA,WAHU;;;AE5BZ;EDMA;ID+BE;IACA,WAHU;;;ACzBZ;EDOA;EACA,WAHY;;AEfZ;EDUA;IDaE;IACA,WAHW;;;AErBb;EDUA;IDoBE;IACA,WAHU;;;AE5BZ;EDUA;ID2BE;IACA,WAHU;;;AEnCZ;EDcA;AAAA;AAAA;AAAA;IDGA;IACA,WAHY;;;AEfZ;EDcA;AAAA;AAAA;AAAA;IDSE;IACA,WAHW;;;AErBb;EDcA;AAAA;AAAA;AAAA;IDgBE;IACA,WAHU;;;AE5BZ;EDcA;AAAA;AAAA;AAAA;IDuBE;IACA,WAHU;;;ACZZ;EACE","file":"form-grid.css"}
@@ -1,5 +1,6 @@
1
1
  <script setup lang="ts">
2
- import { UIcon, ULoader } from '../'
2
+ import ULoader from '../loader/u-loader.vue'
3
+ import UIcon from '../icon/u-icon.vue'
3
4
  import { computed } from 'vue'
4
5
 
5
6
  // TODO: use enums for variant prop.
@@ -55,7 +55,7 @@
55
55
 
56
56
  .form__cta-group {
57
57
  display: flex;
58
- grid-gap: var(--e-space-5);
58
+ gap: var(--e-space-5);
59
59
 
60
60
  @include a.bp(m) {
61
61
  flex-direction: column;
package/i18n/i18n.ts CHANGED
@@ -1,3 +1,5 @@
1
+ // TODO: Update translations
2
+
1
3
  const translations = {
2
4
  DE: {
3
5
  yes: 'Ja',
@@ -26,13 +28,13 @@ const translations = {
26
28
  removeNotification: 'Benachrichtigung entfernen',
27
29
  },
28
30
  FR: {
29
- yes: 'Ja',
30
- no: 'Nein',
31
- optional: 'Optional',
32
- increaseValue: 'Wert erhöhen',
33
- decreaseValue: 'Wert vermindern',
34
- showPassword: 'Passwort anzeigen',
35
- hidePassword: 'Passwort verbergen',
31
+ yes: 'Oui',
32
+ no: 'Non',
33
+ optional: 'Facultatif',
34
+ increaseValue: 'Augmenter la valeur',
35
+ decreaseValue: 'Diminuer la valeur',
36
+ showPassword: 'Afficher le mot de passe',
37
+ hidePassword: 'Masquer le mot de passe',
36
38
  close: 'Fermer',
37
39
  passwordRequirements: 'Exigences relatives au mot de passe',
38
40
  edit: 'Modifier',
@@ -52,13 +54,13 @@ const translations = {
52
54
  removeNotification: 'supprimer la notification',
53
55
  },
54
56
  IT: {
55
- yes: 'Ja',
56
- no: 'Nein',
57
- optional: 'Optional',
58
- increaseValue: 'Wert erhöhen',
59
- decreaseValue: 'Wert vermindern',
60
- showPassword: 'Passwort anzeigen',
61
- hidePassword: 'Passwort verbergen',
57
+ yes: '',
58
+ no: 'No',
59
+ optional: 'Opzionale',
60
+ increaseValue: 'Aumentare il valore',
61
+ decreaseValue: 'Diminuire il valore',
62
+ showPassword: 'Mostra password',
63
+ hidePassword: 'Nascondi password',
62
64
  close: 'Chiudere',
63
65
  passwordRequirements: 'Requisiti per la password',
64
66
  edit: 'modificare',
@@ -78,13 +80,13 @@ const translations = {
78
80
  removeNotification: 'rimuovere la notifica',
79
81
  },
80
82
  EN: {
81
- yes: 'Ja',
82
- no: 'Nein',
83
+ yes: 'Yes',
84
+ no: 'No',
83
85
  optional: 'Optional',
84
- increaseValue: 'Wert erhöhen',
85
- decreaseValue: 'Wert vermindern',
86
- showPassword: 'Passwort anzeigen',
87
- hidePassword: 'Passwort verbergen',
86
+ increaseValue: 'Increase value',
87
+ decreaseValue: 'Decrease value',
88
+ showPassword: 'Show password',
89
+ hidePassword: 'Hide Password',
88
90
  close: 'Close',
89
91
  passwordRequirements: 'Password requirements',
90
92
  edit: 'Edit',
@@ -1,6 +1,8 @@
1
1
  @use '../grid/grid.mixin' as g;
2
2
  @use '../../base/abstracts' as a;
3
3
 
4
+ // TODO: Refactor form-grid. Implement styles from `elements/form/form.scss` here.
5
+
4
6
  // TODO: This class doesn't seem to be necessary. Check first then remove it.
5
7
  .form-grid {
6
8
  width: 100%;
@@ -7,7 +7,7 @@ const { col = '2/4' } = defineProps<Props>()
7
7
  </script>
8
8
 
9
9
  <template>
10
- <div :class="[`form-col-${col}`]">
10
+ <div :class="['form__input-col', `form-col-${col}`]">
11
11
  <slot />
12
12
  </div>
13
13
  </template>
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <fieldset class="form-fieldset">
3
+ <legend v-if="$slots.legend" class="form-fieldset__legend">
4
+ <slot name="legend" />
5
+ </legend>
6
+
7
+ <p v-if="$slots.text" class="form-fieldset__text">
8
+ <slot name="text" />
9
+ </p>
10
+
11
+ <slot />
12
+ </fieldset>
13
+ </template>
14
+
15
+ <style scoped lang="scss" src="./form-grid.scss"></style>
16
+ <style scoped lang="scss">
17
+ @use '../../base/abstracts' as a;
18
+
19
+ .form-fieldset + .form-fieldset {
20
+ margin-top: var(--e-space-10);
21
+ }
22
+
23
+ .form-fieldset__legend {
24
+ @include a.type(300, strong);
25
+
26
+ &:not(:has(+ .form-fieldset__text)) {
27
+ margin-bottom: var(--e-space-6);
28
+ }
29
+ }
30
+
31
+ .form-fieldset__text {
32
+ @include a.type(300);
33
+
34
+ margin-bottom: var(--e-space-6);
35
+ }
36
+ </style>
@@ -1,7 +1,33 @@
1
+ <script setup lang="ts">
2
+ interface Props {
3
+ type?: 'input' | 'cta'
4
+ }
5
+
6
+ const { type = 'input' } = defineProps<Props>()
7
+ </script>
8
+
1
9
  <template>
2
- <div class="form-row">
3
- <slot />
4
- </div>
10
+ <div :class="['form-row', `form__${type}-row`]"><slot /></div>
5
11
  </template>
6
12
 
7
13
  <style lang="scss" scoped src="./form-grid.scss"></style>
14
+
15
+ <style scoped lang="scss">
16
+ @use '../../base/abstracts' as a;
17
+
18
+ .form-row {
19
+ :slotted(.form__input-col + .form__input-col) {
20
+ @include a.bp(lg) {
21
+ margin-top: var(--e-space-6);
22
+ }
23
+ }
24
+ }
25
+
26
+ .form__input-row + .form__input-row {
27
+ margin-top: var(--e-space-6);
28
+ }
29
+
30
+ *:not(legend) + .form-row.form__cta-row {
31
+ margin-top: var(--e-space-10);
32
+ }
33
+ </style>
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <div class="form form-grid">
3
+ <slot></slot>
4
+ </div>
5
+ </template>
6
+
7
+ <style scoped lang="scss" src="./form-grid.scss"></style>
package/layout/index.js CHANGED
@@ -8,3 +8,5 @@ export { default as UPortalBlock } from './portal-block/u-portal-block.vue'
8
8
  export { default as USplitLayout } from './split/u-split-layout.vue'
9
9
  export { default as UFormRow } from './form-grid/u-form-row.vue'
10
10
  export { default as UFormCol } from './form-grid/u-form-col.vue'
11
+ export { default as UFormWrapper } from './form-grid/u-form-wrapper.vue'
12
+ export { default as UFormFieldset } from './form-grid/u-form-fieldset.vue'
@@ -1,8 +1,41 @@
1
1
  .portal-block {
2
- // default 'small'
3
- margin-bottom: var(--e-space-6);
2
+ &.bottom-space-0 {
3
+ margin-bottom: 0;
4
+ }
5
+
6
+ &.bottom-space-100 {
7
+ margin-bottom: var(--e-space-6);
8
+ }
4
9
 
5
- &.big {
10
+ &.bottom-space-300 {
6
11
  margin-bottom: var(--e-space-10);
7
12
  }
13
+
14
+ &.bottom-space-500 {
15
+ margin-bottom: var(--e-space-16);
16
+ }
17
+
18
+ &.bottom-space-700 {
19
+ margin-bottom: var(--e-space-28);
20
+ }
21
+
22
+ &.top-space-0 {
23
+ margin-top: 0;
24
+ }
25
+
26
+ &.top-space-100 {
27
+ margin-top: var(--e-space-6);
28
+ }
29
+
30
+ &.top-space-300 {
31
+ margin-top: var(--e-space-10);
32
+ }
33
+
34
+ &.top-space-500 {
35
+ margin-top: var(--e-space-16);
36
+ }
37
+
38
+ &.top-space-700 {
39
+ margin-top: var(--e-space-28);
40
+ }
8
41
  }
@@ -1,14 +1,20 @@
1
1
  <script setup lang="ts">
2
+ /*
3
+ Preferably only use `bottom-space`.
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.
6
+ */
2
7
  interface Props {
3
8
  big?: boolean
4
- space?: 'small' | 'big'
9
+ bottomSpace?: '0' | '100' | '300' | '500' | '700'
10
+ topSpace?: '0' | '100' | '300' | '500' | '700'
5
11
  }
6
12
 
7
- const { space = 'small' } = defineProps<Props>()
13
+ const { bottomSpace = '100', topSpace = '0' } = defineProps<Props>()
8
14
  </script>
9
15
 
10
16
  <template>
11
- <div :class="['portal-block', space]">
17
+ <div :class="['portal-block', `bottom-space-${bottomSpace}`, `top-space-${topSpace}`]">
12
18
  <slot />
13
19
  </div>
14
20
  </template>