independer-design-system 1.3.2 → 1.4.0

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.
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=4.2.0"
6
6
  },
7
- "version": "1.3.2",
7
+ "version": "1.4.0",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
10
10
  "unbuild": "3.6.1"
@@ -1,19 +1,33 @@
1
1
  <template>
2
- <div class="w-full bg-white shadow-raised rounded-xl transition-all">
3
- <button class="group w-full flex items-center p-4 tablet:p-6" :class="{ 'cursor-pointer': expandable }" @click.prevent="toggle">
4
- <h3 class="transition-all group-hover:underline group-hover:decoration-1 group-hover:underline-offset-4">{{ title }}</h3>
2
+ <div class="w-full bg-white shadow-raised rounded-xl transition-all">
3
+ <button
4
+ class="group w-full flex items-center p-4 tablet:p-6"
5
+ :class="{ 'cursor-pointer': expandable }"
6
+ @click.prevent="toggle"
7
+ >
8
+ <h3 class="transition-all group-hover:underline group-hover:decoration-1 group-hover:underline-offset-4">
9
+ {{ title }}
10
+ </h3>
5
11
 
6
- <div class="flex ml-auto rounded-full transition-all duration-300 ring-4 ring-transparent group-hover:bg-purple-200 group-hover:ring-purple/20 group-active:bg-purple/40 group-active:ring-purple/40">
7
- <Icon v-if="expandable" name="eva:arrow-ios-downward-outline" class="text-purple transition-all duration-300 group-hover:text-purple-dark" :class="{ '-rotate-180' : expanded}" />
8
- </div>
9
- </button>
12
+ <div class="flex ml-auto rounded-full transition-all duration-300 ring-4 ring-transparent group-hover:bg-purple-200 group-hover:ring-purple/20 group-active:bg-purple/40 group-active:ring-purple/40">
13
+ <Icon
14
+ v-if="expandable"
15
+ name="eva:arrow-ios-downward-outline"
16
+ class="text-purple transition-all duration-300 group-hover:text-purple-dark"
17
+ :class="{ '-rotate-180': expanded }"
18
+ />
19
+ </div>
20
+ </button>
10
21
 
11
- <Collapse :when="expanded" class="v-collapse">
12
- <div class="p-4 pt-0 tablet:p-6 tablet:pt-0">
13
- <slot />
14
- </div>
15
- </Collapse>
16
- </div>
22
+ <Collapse
23
+ :when="expanded"
24
+ class="v-collapse"
25
+ >
26
+ <div class="p-4 pt-0 tablet:p-6 tablet:pt-0">
27
+ <slot />
28
+ </div>
29
+ </Collapse>
30
+ </div>
17
31
  </template>
18
32
 
19
33
  <script setup>
@@ -1,19 +1,30 @@
1
1
  <template>
2
- <div class="bg-white shadow-raised rounded-xl">
3
- <button class="group flex items-center w-full pt-4 px-4 tablet:pt-6 tablet:px-6" :class="{ 'cursor-pointer': expandable }" @click.prevent="toggle">
4
- <div class="font-serif font-semibold text-purple-dark line-clamp-1 text-left tablet:text-xl transition-all group-hover:underline group-hover:decoration-1 group-hover:underline-offset-4">{{ title }}</div>
2
+ <div class="bg-white shadow-raised rounded-xl">
3
+ <button
4
+ class="group flex items-center w-full pt-4 px-4 tablet:pt-6 tablet:px-6"
5
+ :class="{ 'cursor-pointer': expandable }"
6
+ @click.prevent="toggle"
7
+ >
8
+ <div class="font-serif font-semibold text-purple-dark line-clamp-1 text-left tablet:text-xl transition-all group-hover:underline group-hover:decoration-1 group-hover:underline-offset-4">
9
+ {{ title }}
10
+ </div>
5
11
 
6
- <div class="flex ml-auto rounded-full transition-all duration-300 ring-4 ring-transparent group-hover:bg-purple-200 group-hover:ring-purple/20 group-active:bg-purple/40 group-active:ring-purple/40">
7
- <Icon v-if="expandable" name="eva:arrow-ios-downward-outline" class="ml-auto text-purple transition-all duration-300 group-hover:text-purple-dark" :class="{ '-rotate-180' : expanded}" />
8
- </div>
9
- </button>
12
+ <div class="flex ml-auto rounded-full transition-all duration-300 ring-4 ring-transparent group-hover:bg-purple-200 group-hover:ring-purple/20 group-active:bg-purple/40 group-active:ring-purple/40">
13
+ <Icon
14
+ v-if="expandable"
15
+ name="eva:arrow-ios-downward-outline"
16
+ class="ml-auto text-purple transition-all duration-300 group-hover:text-purple-dark"
17
+ :class="{ '-rotate-180': expanded }"
18
+ />
19
+ </div>
20
+ </button>
10
21
 
11
- <div class="px-4 pb-4 tablet:px-6 tablet:pb-6">
12
- <Collapse :when="expanded">
13
- <slot />
14
- </Collapse>
15
- </div>
22
+ <div class="px-4 pb-4 tablet:px-6 tablet:pb-6">
23
+ <Collapse :when="expanded">
24
+ <slot />
25
+ </Collapse>
16
26
  </div>
27
+ </div>
17
28
  </template>
18
29
 
19
30
  <script setup>
@@ -27,10 +27,10 @@
27
27
  class="ml-2 cursor-pointer text-grey-dark"
28
28
  />
29
29
 
30
- <IndPill
31
- v-if="advice"
30
+ <IndPill
31
+ v-if="advice"
32
32
  :label="adviceLabel"
33
- class="ml-2"
33
+ class="ml-2"
34
34
  />
35
35
 
36
36
  <div
@@ -1,37 +1,61 @@
1
1
  <template>
2
- <label class="checkbox group flex flex-col p-4 cursor-pointer border border-grey-light rounded-lg transition-all hover:border-grey" :class="{ '!border-green ring-1 ring-green' : modelValue }" :for="id">
3
- <div class="flex pb-4">
4
- <input
5
- class="sr-only peer"
6
- type="checkbox"
7
- :id="id"
8
- :name="name"
9
- :value="value"
10
- :ref="name"
11
- :checked="modelValue"
12
- :disabled="disabled"
13
- @change="emit('update:modelValue', $event.target.checked)"
14
- @focus="emit('focus', $event)"
15
- />
16
- <div class="checkbox-icon " />
17
-
18
- <div class="flex flex-col w-full ml-2">
19
- <div class="flex">
20
- <span class="font-serif text-purple-dark font-bold" :class="{ 'text-grey-dark': disabled }">{{ label }}</span>
2
+ <label
3
+ class="checkbox group flex flex-col p-4 cursor-pointer border border-grey-light rounded-lg transition-all hover:border-grey"
4
+ :class="{ '!border-green ring-1 ring-green': modelValue }"
5
+ :for="id"
6
+ >
7
+ <div class="flex pb-4">
8
+ <input
9
+ :id="id"
10
+ :ref="name"
11
+ class="sr-only peer"
12
+ type="checkbox"
13
+ :name="name"
14
+ :value="value"
15
+ :checked="modelValue"
16
+ :disabled="disabled"
17
+ @change="emit('update:modelValue', $event.target.checked)"
18
+ @focus="emit('focus', $event)"
19
+ >
20
+ <div class="checkbox-icon " />
21
21
 
22
- <Icon v-if="tooltip" name="eva:info-outline" class="ml-2 cursor-pointer text-grey-dark" />
23
- </div>
24
-
25
- <p v-if="labelSecondary" class="text-grey-dark">{{ labelSecondary }}</p>
26
-
27
- <IndPriceQuote v-if="price" :price="price" :without-symbol="true" text-append=" per maand" class="font-semibold text-grey-darker" />
28
-
29
- <IndPill v-if="advice" class="mt-1 self-start" :label="adviceLabel" />
30
- </div>
22
+ <div class="flex flex-col w-full ml-2">
23
+ <div class="flex">
24
+ <span
25
+ class="font-serif text-purple-dark font-bold"
26
+ :class="{ 'text-grey-dark': disabled }"
27
+ >{{ label }}</span>
28
+
29
+ <Icon
30
+ v-if="tooltip"
31
+ name="eva:info-outline"
32
+ class="ml-2 cursor-pointer text-grey-dark"
33
+ />
31
34
  </div>
32
35
 
33
- <slot />
34
- </label>
36
+ <p
37
+ v-if="labelSecondary"
38
+ class="text-grey-dark"
39
+ >{{ labelSecondary }}</p>
40
+
41
+ <IndPriceQuote
42
+ v-if="price"
43
+ :price="price"
44
+ :without-symbol="true"
45
+ text-append=" per maand"
46
+ class="font-semibold text-grey-darker"
47
+ />
48
+
49
+ <IndPill
50
+ v-if="advice"
51
+ class="mt-1 self-start"
52
+ :label="adviceLabel"
53
+ />
54
+ </div>
55
+ </div>
56
+
57
+ <slot />
58
+ </label>
35
59
  </template>
36
60
 
37
61
  <script setup>
@@ -1,27 +1,52 @@
1
1
  <template>
2
- <fieldset class="card w-full shrink-0 grow-0 mb-4 p-4 bg-white rounded-xl tablet:p-6 transition-all shadow-raised scroll-mt-6 tablet:scroll-mt-8" ref="sectionRef" :class="classesCard">
3
- <header v-if="title" class="flex items-start border-b-grey-light" :class="classesHeader">
4
- <div v-if="step" class="hexagon w-7 h-7 tablet:w-8 tablet:h-8 mr-2 tablet:mr-4 z-10" :class="classesHexagon"></div>
2
+ <fieldset
3
+ ref="sectionRef"
4
+ class="card w-full shrink-0 grow-0 mb-4 p-4 bg-white rounded-xl tablet:p-6 transition-all shadow-raised scroll-mt-6 tablet:scroll-mt-8"
5
+ :class="classesCard"
6
+ >
7
+ <header
8
+ v-if="title"
9
+ class="flex items-start border-b-grey-light"
10
+ :class="classesHeader"
11
+ >
12
+ <div
13
+ v-if="step"
14
+ class="hexagon w-7 h-7 tablet:w-8 tablet:h-8 mr-2 tablet:mr-4 z-10"
15
+ :class="classesHexagon"
16
+ />
5
17
 
6
- <h3 class="transition-all" :class="classesTitle">
7
- {{ title }}
8
- </h3>
18
+ <h3
19
+ class="transition-all"
20
+ :class="classesTitle"
21
+ >
22
+ {{ title }}
23
+ </h3>
9
24
 
10
- <button v-if="section.state === 'saved' || section.state === 'paused'" class="!p-0 text-purple cursor-pointer hover:text-purple-dark ml-auto" @click.prevent="emit('edit', $event)">
11
- <Icon name="eva:edit-outline" />
12
- </button>
13
- </header>
25
+ <button
26
+ v-if="section.state === 'saved' || section.state === 'paused'"
27
+ class="!p-0 text-purple cursor-pointer hover:text-purple-dark ml-auto"
28
+ @click.prevent="emit('edit', $event)"
29
+ >
30
+ <Icon name="eva:edit-outline" />
31
+ </button>
32
+ </header>
14
33
 
15
- <div class="desktop:mx-12">
16
- <Collapse :when="section.state === 'saved' || section.state === 'paused'" class="v-collapse">
17
- <slot name="saved" />
18
- </Collapse>
34
+ <div class="desktop:mx-12">
35
+ <Collapse
36
+ :when="section.state === 'saved' || section.state === 'paused'"
37
+ class="v-collapse"
38
+ >
39
+ <slot name="saved" />
40
+ </Collapse>
19
41
 
20
- <Collapse :when="section.state === 'editing'" class="v-collapse">
21
- <slot name="editing" />
22
- </Collapse>
23
- </div>
24
- </fieldset>
42
+ <Collapse
43
+ :when="section.state === 'editing'"
44
+ class="v-collapse"
45
+ >
46
+ <slot name="editing" />
47
+ </Collapse>
48
+ </div>
49
+ </fieldset>
25
50
  </template>
26
51
 
27
52
  <script setup>
@@ -41,34 +66,34 @@ const props = defineProps({
41
66
  const sectionRef = ref(null);
42
67
  const classesCard = computed(() => {
43
68
  return {
44
- "editing": "card--editing",
45
- "paused": "card--paused",
46
- "saved": "card--saved",
47
- "closed": "card--closed cursor-not-allowed"
69
+ editing: "card--editing",
70
+ paused: "card--paused",
71
+ saved: "card--saved",
72
+ closed: "card--closed cursor-not-allowed"
48
73
  }[props.section.state];
49
74
  });
50
75
  const classesHeader = computed(() => {
51
76
  return {
52
- "editing": "pb-4",
53
- "paused": "pb-4",
54
- "saved": "pb-4",
55
- "closed": "!mb-0"
77
+ editing: "pb-4",
78
+ paused: "pb-4",
79
+ saved: "pb-4",
80
+ closed: "!mb-0"
56
81
  }[props.section.state];
57
82
  });
58
83
  const classesTitle = computed(() => {
59
84
  return {
60
- "editing": "text-purple-dark",
61
- "saved": "text-purple-dark",
62
- "paused": "text-purple-dark",
63
- "closed": "!text-grey-dark"
85
+ editing: "text-purple-dark",
86
+ saved: "text-purple-dark",
87
+ paused: "text-purple-dark",
88
+ closed: "!text-grey-dark"
64
89
  }[props.section.state];
65
90
  });
66
91
  const classesHexagon = computed(() => {
67
92
  return {
68
- "editing": "hexagon--editing",
69
- "paused": "hexagon--closed",
70
- "saved": "hexagon--saved",
71
- "closed": "hexagon--closed"
93
+ editing: "hexagon--editing",
94
+ paused: "hexagon--closed",
95
+ saved: "hexagon--saved",
96
+ closed: "hexagon--closed"
72
97
  }[props.section.state];
73
98
  });
74
99
  watch(() => props.section.state, (value) => {
@@ -22,6 +22,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
22
22
  placeholder: StringConstructor;
23
23
  labelClasses: StringConstructor;
24
24
  error: StringConstructor;
25
+ mask: (StringConstructor | ObjectConstructor)[];
25
26
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
27
  input: (...args: any[]) => void;
27
28
  blur: (...args: any[]) => void;
@@ -51,6 +52,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
51
52
  placeholder: StringConstructor;
52
53
  labelClasses: StringConstructor;
53
54
  error: StringConstructor;
55
+ mask: (StringConstructor | ObjectConstructor)[];
54
56
  }>> & Readonly<{
55
57
  onInput?: ((...args: any[]) => any) | undefined;
56
58
  onBlur?: ((...args: any[]) => any) | undefined;
@@ -44,6 +44,7 @@
44
44
  <input
45
45
  :id="name"
46
46
  :ref="name"
47
+ v-maska="mask"
47
48
  class="
48
49
  block
49
50
  h-12
@@ -94,6 +95,7 @@
94
95
  </template>
95
96
 
96
97
  <script setup>
98
+ import { vMaska } from "maska/vue";
97
99
  const emit = defineEmits(["update:modelValue", "input", "blur", "focus", "step-up", "step-down"]);
98
100
  defineProps({
99
101
  name: String,
@@ -116,7 +118,8 @@ defineProps({
116
118
  descriptionTop: String,
117
119
  placeholder: String,
118
120
  labelClasses: String,
119
- error: String
121
+ error: String,
122
+ mask: [String, Object]
120
123
  });
121
124
  const stepUp = () => {
122
125
  emit("step-up");
@@ -22,6 +22,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
22
22
  placeholder: StringConstructor;
23
23
  labelClasses: StringConstructor;
24
24
  error: StringConstructor;
25
+ mask: (StringConstructor | ObjectConstructor)[];
25
26
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
27
  input: (...args: any[]) => void;
27
28
  blur: (...args: any[]) => void;
@@ -51,6 +52,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
51
52
  placeholder: StringConstructor;
52
53
  labelClasses: StringConstructor;
53
54
  error: StringConstructor;
55
+ mask: (StringConstructor | ObjectConstructor)[];
54
56
  }>> & Readonly<{
55
57
  onInput?: ((...args: any[]) => any) | undefined;
56
58
  onBlur?: ((...args: any[]) => any) | undefined;
@@ -1,19 +1,24 @@
1
1
  <template>
2
- <label class="radio group flex flex-col p-4 cursor-pointer bg-white border border-grey-light rounded-lg transition-all" :class="{ '!border-green ring-1 ring-green' : value === modelValue }" :for="id">
3
- <div class="flex">
4
- <input
5
- class="sr-only peer"
6
- type="radio"
7
- :id="id"
8
- :name="name"
9
- :value="value"
10
- :ref="name"
11
- :checked="value === modelValue"
12
- :disabled="disabled"
13
- @change="emit('update:modelValue', $event.target.value)"
14
- @focus="emit('focus', $event)"
15
- />
16
- <div class="
2
+ <label
3
+ class="radio group flex flex-col p-4 cursor-pointer bg-white border border-grey-light rounded-lg transition-all"
4
+ :class="{ '!border-green ring-1 ring-green': value === modelValue }"
5
+ :for="id"
6
+ >
7
+ <div class="flex">
8
+ <input
9
+ :id="id"
10
+ :ref="name"
11
+ class="sr-only peer"
12
+ type="radio"
13
+ :name="name"
14
+ :value="value"
15
+ :checked="value === modelValue"
16
+ :disabled="disabled"
17
+ @change="emit('update:modelValue', $event.target.value)"
18
+ @focus="emit('focus', $event)"
19
+ >
20
+ <div
21
+ class="
17
22
  radio-icon
18
23
  relative
19
24
  block
@@ -44,25 +49,46 @@
44
49
  peer-checked:after:transition-all
45
50
  peer-checked:after:bg-green
46
51
  peer-disabled:bg-grey-light
47
- " />
48
-
49
- <div class="flex flex-col w-full">
50
- <div class="flex">
51
- <span class="font-serif text-purple-dark font-bold" :class="{ 'text-grey-dark': disabled }">{{ label }}</span>
52
+ "
53
+ />
52
54
 
53
- <Icon v-if="tooltip" name="eva:info-outline" class="ml-2 cursor-pointer text-grey-dark" />
54
- </div>
55
-
56
- <p v-if="labelSecondary" class="text-grey-dark">{{ labelSecondary }}</p>
57
-
58
- <IndPriceQuote v-if="price" :price="price" :without-symbol="true" text-append=" per maand" class="font-semibold text-grey-darker" />
55
+ <div class="flex flex-col w-full">
56
+ <div class="flex">
57
+ <span
58
+ class="font-serif text-purple-dark font-bold"
59
+ :class="{ 'text-grey-dark': disabled }"
60
+ >{{ label }}</span>
59
61
 
60
- <IndPill v-if="advice" class="mt-1 self-start" :label="adviceLabel" />
61
- </div>
62
+ <Icon
63
+ v-if="tooltip"
64
+ name="eva:info-outline"
65
+ class="ml-2 cursor-pointer text-grey-dark"
66
+ />
62
67
  </div>
63
-
64
- <slot />
65
- </label>
68
+
69
+ <p
70
+ v-if="labelSecondary"
71
+ class="text-grey-dark"
72
+ >{{ labelSecondary }}</p>
73
+
74
+ <IndPriceQuote
75
+ v-if="price"
76
+ :price="price"
77
+ :without-symbol="true"
78
+ text-append=" per maand"
79
+ class="font-semibold text-grey-darker"
80
+ />
81
+
82
+ <IndPill
83
+ v-if="advice"
84
+ class="mt-1 self-start"
85
+ :label="adviceLabel"
86
+ />
87
+ </div>
88
+ </div>
89
+
90
+ <slot />
91
+ </label>
66
92
  </template>
67
93
 
68
94
  <script setup>
@@ -8,7 +8,7 @@
8
8
  :label-classes="labelClasses"
9
9
  :tooltip="tooltip"
10
10
  />
11
-
11
+
12
12
  <div class="relative">
13
13
  <Icon
14
14
  v-if="leadingIcon"
@@ -16,23 +16,34 @@
16
16
  class="absolute ml-3 mt-3"
17
17
  />
18
18
 
19
- <Icon
20
- v-if="trailingIcon"
21
- :name="trailingIcon"
19
+ <Icon
20
+ v-if="trailingIcon"
21
+ :name="trailingIcon"
22
22
  class="absolute right-0 mr-3 mt-3 text-purple"
23
23
  />
24
24
 
25
- <div v-if="steps" class="flex gap-2 absolute right-0 mr-3 mt-3">
26
- <button class="text-purple hover:text-purple-dark" @click.prevent="stepDown">
25
+ <div
26
+ v-if="steps"
27
+ class="flex gap-2 absolute right-0 mr-3 mt-3"
28
+ >
29
+ <button
30
+ class="text-purple hover:text-purple-dark"
31
+ @click.prevent="stepDown"
32
+ >
27
33
  <Icon name="eva:minus-circle-outline" />
28
34
  </button>
29
35
 
30
- <button class="text-purple hover:text-purple-dark" @click.prevent="stepUp">
36
+ <button
37
+ class="text-purple hover:text-purple-dark"
38
+ @click.prevent="stepUp"
39
+ >
31
40
  <Icon name="eva:plus-circle-outline" />
32
41
  </button>
33
42
  </div>
34
43
 
35
44
  <textarea
45
+ :id="name"
46
+ :ref="name"
36
47
  class="
37
48
  block
38
49
  min-h-12
@@ -45,7 +56,7 @@
45
56
  ease-out
46
57
  bg-white
47
58
  hover:border-grey-dark
48
- outline-none
59
+ outline-none
49
60
  appearance-none
50
61
  disabled:bg-grey-light
51
62
  disabled:border-grey
@@ -53,13 +64,11 @@
53
64
  "
54
65
  :class="{ 'border-red-800': error, 'pl-10': leadingIcon, 'pr-12': trailingIcon, 'pr-20': steps }"
55
66
  :type="type"
56
- :id="name"
57
67
  :name="name"
58
68
  :value="modelValue"
59
69
  :inputmode="inputmode"
60
70
  :pattern="pattern"
61
71
  :min="min"
62
- :ref="name"
63
72
  :autocomplete="autocomplete"
64
73
  :disabled="disabled"
65
74
  :placeholder="placeholder"
@@ -69,8 +78,18 @@
69
78
  />
70
79
  </div>
71
80
 
72
- <div v-if="error" class="mt-1 text-red-800">{{ error }}</div>
73
- <div v-if="description" class="mt-2 text-grey-dark">{{ description }}</div>
81
+ <div
82
+ v-if="error"
83
+ class="mt-1 text-red-800"
84
+ >
85
+ {{ error }}
86
+ </div>
87
+ <div
88
+ v-if="description"
89
+ class="mt-2 text-grey-dark"
90
+ >
91
+ {{ description }}
92
+ </div>
74
93
  </div>
75
94
  </template>
76
95
 
@@ -1,13 +1,26 @@
1
1
  <template>
2
- <div v-if="show" class="notification flex gap-2 p-3 border rounded-lg" :class="classesBackground">
3
- <Icon v-if="icon" :name="icon" :class="classesIcon" />
2
+ <div
3
+ v-if="show"
4
+ class="notification flex gap-2 p-3 border rounded-lg"
5
+ :class="classesBackground"
6
+ >
7
+ <Icon
8
+ v-if="icon"
9
+ :name="icon"
10
+ :class="classesIcon"
11
+ />
4
12
 
5
- <div class="w-full">
6
- <slot />
7
- </div>
8
-
9
- <Icon v-if="closeButton" name="eva:close-outline" class="text-grey-dark cursor-pointer" @click.prevent="close" />
13
+ <div class="w-full">
14
+ <slot />
10
15
  </div>
16
+
17
+ <Icon
18
+ v-if="closeButton"
19
+ name="eva:close-outline"
20
+ class="text-grey-dark cursor-pointer"
21
+ @click.prevent="close"
22
+ />
23
+ </div>
11
24
  </template>
12
25
 
13
26
  <script setup>
@@ -23,16 +36,16 @@ const props = defineProps({
23
36
  const show = ref(true);
24
37
  const classesBackground = computed(() => {
25
38
  return {
26
- "info": "bg-blue-light text-blue-darkest border-blue-400",
27
- "warning": "bg-yellow-100 text-yellow-darkest border-yellow-400",
28
- "error": "bg-red-100 text-red-darkest border-red-400"
39
+ info: "bg-blue-light text-blue-darkest border-blue-400",
40
+ warning: "bg-yellow-100 text-yellow-darkest border-yellow-400",
41
+ error: "bg-red-100 text-red-darkest border-red-400"
29
42
  }[props.tone];
30
43
  });
31
44
  const classesIcon = computed(() => {
32
45
  return {
33
- "info": "text-blue-darkest",
34
- "error": "text-red-darkest",
35
- "warning": "text-yellow-darkest"
46
+ info: "text-blue-darkest",
47
+ error: "text-red-darkest",
48
+ warning: "text-yellow-darkest"
36
49
  }[props.tone];
37
50
  });
38
51
  const close = () => {
@@ -1,28 +1,48 @@
1
1
  <template>
2
- <div class="flex items-start justify-end">
3
- <div class="text-right">
4
- <div v-if="period" class="text-text-default">
5
- {{ period }}
6
- </div>
2
+ <div class="flex items-start justify-end">
3
+ <div class="text-right">
4
+ <div
5
+ v-if="period"
6
+ class="text-text-default"
7
+ >
8
+ {{ period }}
9
+ </div>
7
10
 
8
- <div v-if="premium" class="flex items-start justify-end font-semibold">
9
- <div :class="{ 'text-xl leading-6': size === 'small', 'text-[32px] leading-none': size === 'medium', 'text-[48px] leading-none': size === 'large' }">{{ premium.euro }}</div>
10
- <div :class="{ 'text-xs leading-5': size === 'small', 'text-[16px] leading-none mt-1': size === 'medium', 'text-[24px] leading-none mt-1': size === 'large' }">,{{ formatCent(premium.cent) }}</div>
11
- </div>
11
+ <div
12
+ v-if="premium"
13
+ class="flex items-start justify-end font-semibold"
14
+ >
15
+ <div :class="{ 'text-xl leading-6': size === 'small', 'text-[32px] leading-none': size === 'medium', 'text-[48px] leading-none': size === 'large' }">
16
+ {{ premium.euro }}
17
+ </div>
18
+ <div :class="{ 'text-xs leading-5': size === 'small', 'text-[16px] leading-none mt-1': size === 'medium', 'text-[24px] leading-none mt-1': size === 'large' }">
19
+ ,{{ formatCent(premium.cent) }}
20
+ </div>
21
+ </div>
12
22
 
13
- <div v-if="closable === false" class="text-grey-dark">
14
- Niet bij ons te koop
15
- </div>
23
+ <div
24
+ v-if="closable === false"
25
+ class="text-grey-dark"
26
+ >
27
+ Niet bij ons te koop
28
+ </div>
16
29
 
17
- <div v-if="discount">
18
- <div class="text-purple underline underline-offset-4 decoration-1 decoration-dotted cursor-pointer" @click.prevent="emit('discount')">€ {{ discount.euro }},{{ formatCent(discount.cent) }} korting</div>
19
- </div>
30
+ <div v-if="discount">
31
+ <div
32
+ class="text-purple underline underline-offset-4 decoration-1 decoration-dotted cursor-pointer"
33
+ @click.prevent="emit('discount')"
34
+ >
35
+ € {{ discount.euro }},{{ formatCent(discount.cent) }} korting
36
+ </div>
37
+ </div>
20
38
 
21
- <div v-if="savings">
22
- <div class="text-green-dark">Bespaar € {{ savings.euro }},{{ formatCent(savings.cent) }}/jr</div>
23
- </div>
39
+ <div v-if="savings">
40
+ <div class="text-green-dark">
41
+ Bespaar € {{ savings.euro }},{{ formatCent(savings.cent) }}/jr
24
42
  </div>
43
+ </div>
25
44
  </div>
45
+ </div>
26
46
  </template>
27
47
 
28
48
  <script setup>
@@ -1,5 +1,8 @@
1
1
  <template>
2
- <Transition name="price-fade" mode="out-in">
2
+ <Transition
3
+ name="price-fade"
4
+ mode="out-in"
5
+ >
3
6
  <div :key="price">
4
7
  {{ textPrepend }}
5
8
 
@@ -16,7 +19,7 @@
16
19
  </template>
17
20
 
18
21
  <script setup>
19
- const props = defineProps({
22
+ defineProps({
20
23
  price: {
21
24
  type: Number,
22
25
  required: true
@@ -1,11 +1,15 @@
1
1
  <template>
2
- <li class="flex gap-2">
3
- <Icon v-if="icon" :name="icon" :class="[iconColor, iconClass]" />
4
-
5
- {{ label }}
6
-
7
- <slot />
8
- </li>
2
+ <li class="flex gap-2">
3
+ <Icon
4
+ v-if="icon"
5
+ :name="icon"
6
+ :class="[iconColor, iconClass]"
7
+ />
8
+
9
+ {{ label }}
10
+
11
+ <slot />
12
+ </li>
9
13
  </template>
10
14
 
11
15
  <script setup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "independer-design-system",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
4
4
  "description": "Vue 3 component library for the Independer Design System (DS2)",
5
5
  "repository": "arjanvanrees/independer-design-system",
6
6
  "license": "MIT",
@@ -42,6 +42,7 @@
42
42
  "@nuxt/kit": "^4.3.1",
43
43
  "@nuxtjs/tailwindcss": "^6.14.0",
44
44
  "@tailwindcss/vite": "^4.2.1",
45
+ "maska": "^3.2.0",
45
46
  "tailwindcss": "^4.2.1",
46
47
  "vue-collapsed": "^1.3.5"
47
48
  },