@exakt/ui 0.0.3 → 0.0.4

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.
@@ -1,18 +1,42 @@
1
1
  <template>
2
2
  <div class="flex-stretch">
3
3
  <!-- class="flex-stretch fullwidth" -->
4
- <div @click="onClick" ref="activator">
4
+ <div
5
+ ref="activator"
6
+ @click="onClick"
7
+ >
5
8
  <slot />
6
9
  </div>
7
10
  <e-focus-sheet v-model="state.active" />
8
11
  <e-tr-scale>
9
- <div class="list rounded" v-if="state.active">
10
- <component v-for="(item, i) in items" :key="i" class="fullwidth" :is="item.href ? 'a' : 'div'"
11
- :href="item.href ? item.href : undefined">
12
- <e-btn justify="start" @click="select(i)" class="item fullwidth" :color="item.color" :solid="false"
13
- :background="item.background || 'transparent'" :class="{ active: currentItem === i }"><e-icon v-if="item.icon"
14
- :size="20" :icon="item.icon" class="mr-2" />
15
- {{ item.name }}</e-btn>
12
+ <div
13
+ v-if="state.active"
14
+ class="list rounded"
15
+ >
16
+ <component
17
+ :is="item.href ? 'a' : 'div'"
18
+ v-for="(item, i) in items"
19
+ :key="i"
20
+ class="fullwidth"
21
+ :href="item.href ? item.href : undefined"
22
+ >
23
+ <e-btn
24
+ justify="start"
25
+ class="item fullwidth"
26
+ :color="item.color"
27
+ :solid="false"
28
+ :background="item.background || 'transparent'"
29
+ :class="{ active: currentItem === i }"
30
+ @click="select(i)"
31
+ >
32
+ <e-icon
33
+ v-if="item.icon"
34
+ :size="20"
35
+ :icon="item.icon"
36
+ class="mr-2"
37
+ />
38
+ {{ item.name }}
39
+ </e-btn>
16
40
  </component>
17
41
  </div>
18
42
  </e-tr-scale>
@@ -108,43 +132,54 @@ const select = (i: number) => {
108
132
  currentItem.value = i;
109
133
  };
110
134
  </script>
111
- <style scoped>
135
+ <style scoped lang="scss">
112
136
  .list {
113
137
  position: fixed;
114
138
  left: v-bind('state.x + "px"');
115
139
  top: v-bind('state.y + "px"');
116
140
  width: v-bind(width);
117
141
  display: flex;
142
+
143
+
118
144
  background-color: var(--e-color-elev-2);
119
145
  color: var(--e-color-dark);
120
146
  z-index: 4;
147
+
121
148
  flex-shrink: 1;
122
149
  flex-direction: column;
123
150
  overflow: clip;
124
151
  justify-items: stretch;
152
+
153
+ .item {
154
+ // color: var(--e-color-dark);
155
+ font-size: 1rem;
156
+ padding: 0.7rem;
157
+ text-transform: capitalize;
158
+
159
+ &.active {
160
+ background-color: rgba(var(--e-color-primary-rgb), 0.2);
161
+
162
+ }
163
+ }
125
164
  }
126
- .list .item {
127
- font-size: 1rem;
128
- padding: 0.7rem;
129
- text-transform: capitalize;
130
- }
131
- .list .item.active {
132
- background-color: rgba(var(--e-color-primary-rgb), 0.2);
133
- }
134
165
 
135
- @media screen and (max-width: var(--e-md-screen-breakpoint)) {
166
+
167
+
168
+ @media screen and (max-width: $e-md-screen-breakpoint) {
136
169
  .list {
137
170
  top: unset;
138
171
  bottom: 0px;
139
172
  left: 0px;
140
173
  width: 100vw;
141
174
  flex-shrink: 0;
142
- }
143
- .list .item {
144
- padding: 1rem;
145
- font-size: 1.1rem;
175
+
176
+ .item {
177
+ padding: 1rem;
178
+ font-size: 1.1rem;
179
+ }
146
180
  }
147
181
  }
182
+
148
183
  .main-btn {
149
184
  font-size: 1rem;
150
185
  }
@@ -2,12 +2,12 @@
2
2
  <div>
3
3
  <Transition name="fade">
4
4
  <div
5
+ v-if="modelValue"
5
6
  class="focus-sheet"
6
- @click="emit('update:modelValue', false)"
7
7
  :class="{ 'opaque-on-desktop': opaqueOnDesktop }"
8
- v-if="modelValue"
9
- ></div
10
- ></Transition>
8
+ @click="emit('update:modelValue', false)"
9
+ />
10
+ </Transition>
11
11
  </div>
12
12
  </template>
13
13
  <script setup lang="ts">
@@ -18,7 +18,7 @@ const props = defineProps<{
18
18
  const emit = defineEmits(["update:modelValue"]);
19
19
  </script>
20
20
 
21
- <style scoped>
21
+ <style scoped lang="scss">
22
22
  .focus-sheet {
23
23
  position: fixed;
24
24
  width: 100%;
@@ -26,12 +26,14 @@ const emit = defineEmits(["update:modelValue"]);
26
26
  left: 0px;
27
27
  top: 0px;
28
28
  z-index: 3;
29
- }
30
- .focus-sheet.opaque-on-desktop {
31
- background-color: rgba(var(--e-color-light-rgb), 0.5);
29
+ //background-color: red;
30
+
31
+ &.opaque-on-desktop {
32
+ background-color: rgba(var(--e-color-light-rgb), 0.5);
33
+ }
32
34
  }
33
35
 
34
- @media screen and (max-width: var(--e-md-screen-breakpoint)) {
36
+ @media screen and (max-width: $e-md-screen-breakpoint) {
35
37
  .focus-sheet {
36
38
  background-color: rgba(var(--e-color-light-rgb), 0.5);
37
39
  }
@@ -5,7 +5,7 @@
5
5
  :width="size"
6
6
  :fill="color"
7
7
  >
8
- <path :d="icon"></path>
8
+ <path :d="icon" />
9
9
  </svg>
10
10
  </template>
11
11
  <script setup lang="ts">
@@ -1,6 +1,12 @@
1
1
  <template>
2
- <e-btn class="a-btn" :loading="loading">
3
- <e-icon :icon="icon" :size="size"></e-icon>
2
+ <e-btn
3
+ class="a-btn"
4
+ :loading="loading"
5
+ >
6
+ <e-icon
7
+ :icon="icon"
8
+ :size="size"
9
+ />
4
10
  </e-btn>
5
11
  </template>
6
12
  <script setup lang="ts">
@@ -30,7 +30,10 @@
30
30
  <!-- @transitionend.passive="transitionend" -->
31
31
  </div>
32
32
 
33
- <div v-if="slotContentPresent" class="sc-sloe-content fullsize">
33
+ <div
34
+ v-if="slotContentPresent"
35
+ class="sc-sloe-content fullsize"
36
+ >
34
37
  <slot />
35
38
  </div>
36
39
  </div>
@@ -185,11 +188,10 @@ const initialize = (blur = props.blur) => {
185
188
  };
186
189
  </script>
187
190
 
188
- <style scoped>
191
+ <style lang="scss" scoped>
189
192
  .border-rad-custom {
190
193
  border-radius: v-bind(borderRadius);
191
194
  }
192
-
193
195
  .lv-wrapper {
194
196
  position: relative;
195
197
  }
@@ -1,8 +1,17 @@
1
1
  <template>
2
- <label class="label mb-5" v-for="(item, i) in items" :key="i">
2
+ <label
3
+ v-for="(item, i) in items"
4
+ :key="i"
5
+ class="label mb-5"
6
+ >
3
7
  {{ item[useKey] }}
4
- <input type="radio" name="radio" :value="i" v-model="selected" />
5
- <span class="checkmark"></span>
8
+ <input
9
+ v-model="selected"
10
+ type="radio"
11
+ name="radio"
12
+ :value="i"
13
+ >
14
+ <span class="checkmark" />
6
15
  </label>
7
16
  </template>
8
17
  <script lang="ts" setup>
@@ -24,7 +33,7 @@ const selected = computed({
24
33
  },
25
34
  });
26
35
  </script>
27
- <style scoped>
36
+ <style scoped lang="scss">
28
37
  * {
29
38
  box-sizing: border-box;
30
39
  }
@@ -52,6 +61,7 @@ const selected = computed({
52
61
  /* Create a custom radio button */
53
62
  .checkmark {
54
63
  --size: 1.5rem;
64
+
55
65
  position: absolute;
56
66
  top: 0;
57
67
  left: 0;
@@ -63,19 +73,22 @@ const selected = computed({
63
73
  }
64
74
 
65
75
  /* Hover */
66
- .label:hover input ~ .checkmark {
76
+ .label:hover input~.checkmark {
67
77
  background-color: var(--e-color-elev-2);
68
78
  }
69
79
 
70
- .label:active input ~ .checkmark {
71
- transform: scale(0.85);
72
- }
73
- .label:active input ~ .checkmark::after {
74
- transform: scale(1) !important;
80
+ .label:active input {
81
+ &~.checkmark {
82
+ transform: scale(0.85);
83
+ }
84
+
85
+ &~.checkmark::after {
86
+ transform: scale(1) !important;
87
+ }
75
88
  }
76
89
 
77
90
  /* Checked */
78
- .label input:checked ~ .checkmark {
91
+ .label input:checked~.checkmark {
79
92
  background-color: var(--e-color-primary);
80
93
  }
81
94
 
@@ -87,13 +100,14 @@ const selected = computed({
87
100
  }
88
101
 
89
102
  /* Show the indicator (dot/circle) when checked */
90
- .label input:checked ~ .checkmark:after {
103
+ .label input:checked~.checkmark:after {
91
104
  transform: scale(1);
92
105
  }
93
106
 
94
107
  /* Style the indicator (dot/circle) */
95
108
  .label .checkmark:after {
96
109
  --size: 0.6rem;
110
+
97
111
  display: block;
98
112
  top: 50%;
99
113
  left: 50%;
@@ -106,5 +120,7 @@ const selected = computed({
106
120
  transform: scale(0);
107
121
  transition: transform 0.25s;
108
122
  box-sizing: border-box;
123
+
124
+
109
125
  }
110
126
  </style>
@@ -2,15 +2,19 @@
2
2
  <div class="pos-wrap">
3
3
  <div
4
4
  class="wrapper fullwidth"
5
- @click="focus"
6
5
  :style="inputState.overtakeStyle"
7
6
  :class="{ rounded: solid, solid }"
7
+ @click="focus"
8
8
  >
9
- <e-icon :icon="icon" size="21" v-if="icon"></e-icon>
9
+ <e-icon
10
+ v-if="icon"
11
+ :icon="icon"
12
+ size="21"
13
+ />
10
14
  <textarea
11
15
  v-if="type === 'textarea'"
12
- v-model="currentText"
13
16
  ref="input"
17
+ v-model="currentText"
14
18
  class="input"
15
19
  :placeholder="label"
16
20
  autocomplete="off"
@@ -21,20 +25,20 @@
21
25
  />
22
26
  <input
23
27
  v-else
28
+ ref="input"
29
+ v-model="currentText"
24
30
  :disabled="disabled"
25
31
  :type="type"
26
32
  :autocomplete="autocomplete"
27
33
  :spellcheck="spellcheck"
28
34
  class="input"
29
- @click.stop=""
30
35
  :required="required"
31
- v-model="currentText"
32
- ref="input"
33
36
  :placeholder="label"
37
+ @click.stop=""
34
38
  @focus="inputState.focused = true"
35
39
  @blur="inputState.focused = false"
36
40
  @transitionend="transitionEnd"
37
- />
41
+ >
38
42
  <slot />
39
43
  </div>
40
44
  </div>
@@ -111,7 +115,7 @@ const transitionEnd = (a) => {
111
115
  inputState.overtakeStyle = "";
112
116
  };
113
117
  </script>
114
- <style scoped>
118
+ <style scoped lang="scss">
115
119
  .pos-wrap {
116
120
  display: flex;
117
121
  align-content: stretch;
@@ -119,8 +123,9 @@ const transitionEnd = (a) => {
119
123
  justify-content: stretch;
120
124
  width: 100%;
121
125
  box-sizing: border-box;
122
- }
123
126
 
127
+ // padding: 0px var(--e-core-padding-x);
128
+ }
124
129
  .input {
125
130
  border: none;
126
131
  box-sizing: border-box;
@@ -132,15 +137,23 @@ const transitionEnd = (a) => {
132
137
  font-size: 1rem;
133
138
  color: var(--e-color-dark);
134
139
  font-family: var(--e-font-family);
135
- height: v-bind(height);
136
- }
137
- .input:-webkit-autofill {
138
- animation-name: onAutoFillStart;
139
- transition: background-color 0.1s ease-in-out 0s;
140
- }
141
- .input:not(:-webkit-autofill) {
142
- animation-name: onAutoFillCancel;
143
- transition: background-color 0.1s ease-in-out 0s;
140
+ height:v-bind(height);
141
+
142
+ &:-webkit-autofill {
143
+ // Expose a hook for JavaScript when auto fill is shown.
144
+ // JavaScript can capture 'animationstart' events
145
+ animation-name: onAutoFillStart;
146
+ //color: white !important;
147
+ // Make the backgound color become yellow _really slowly_
148
+ transition: background-color 0.1s ease-in-out 0s;
149
+ }
150
+
151
+ &:not(:-webkit-autofill) {
152
+ // Expose a hook for JS onAutoFillCancel
153
+ // JavaScript can capture 'animationstart' events
154
+ animation-name: onAutoFillCancel;
155
+ transition: background-color 0.1s ease-in-out 0s;
156
+ }
144
157
  }
145
158
 
146
159
  .itemform.textarea {
@@ -155,10 +168,13 @@ const transitionEnd = (a) => {
155
168
  justify-content: stretch;
156
169
  align-items: center;
157
170
  justify-items: stretch;
171
+
158
172
  position: relative;
173
+
159
174
  background-color: transparent;
160
175
  color: var(--e-color-dark);
161
176
  padding: 10px;
177
+
162
178
  overflow: clip;
163
179
  }
164
180
 
@@ -1,6 +1,13 @@
1
1
  <template>
2
- <div v-if="disabled || !to"><slot /></div>
3
- <router-link :to="to" v-else><slot /></router-link>
2
+ <div v-if="disabled || !to">
3
+ <slot />
4
+ </div>
5
+ <router-link
6
+ v-else
7
+ :to="to"
8
+ >
9
+ <slot />
10
+ </router-link>
4
11
  </template>
5
12
  <script setup lang="ts">
6
13
  defineProps<{
@@ -1,60 +1,85 @@
1
1
  <template>
2
2
  <div class="cont flex-center">
3
- <svg class="spinner" width="65px" height="65px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg">
4
- <circle class="op-1" fill="none" stroke-width="9" cx="33" cy="33" r="25"></circle>
3
+ <svg
4
+ class="spinner"
5
+ width="65px"
6
+ height="65px"
7
+ viewBox="0 0 66 66"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ >
10
+ <circle
11
+ class="op-1"
12
+ fill="none"
13
+ stroke-width="9"
14
+ cx="33"
15
+ cy="33"
16
+ r="25"
17
+ />
5
18
 
6
- <circle class="path" fill="none" stroke-width="9" stroke-linecap="round" cx="33" cy="33" r="25"></circle>
7
- </svg>
8
-
9
- </div>
19
+ <circle
20
+ class="path"
21
+ fill="none"
22
+ stroke-width="9"
23
+ stroke-linecap="round"
24
+ cx="33"
25
+ cy="33"
26
+ r="25"
27
+ />
28
+ </svg>
29
+ </div>
10
30
  </template>
11
- <style scoped>
31
+ <style scoped lang="scss">
12
32
  svg {
13
33
  stroke: currentColor;
14
34
  }
15
35
 
16
- .cont {
36
+
37
+
38
+
39
+
40
+ $offset: 120;
41
+ $duration: 1.5s;
42
+
43
+ .cont{
17
44
  position: relative;
18
45
  height: 100%;
19
- width: 100%;
46
+ width:100%;
20
47
  }
21
-
22
48
  .spinner {
23
- animation: rotator 1.5s linear infinite;
49
+ animation: rotator $duration linear infinite;
24
50
  position: absolute;
25
51
  z-index: 2;
26
- top: 0;
52
+ top:0;
27
53
  height: 100%;
28
- width: 100%;
54
+ width:100%;
29
55
  aspect-ratio: 1;
30
56
  }
31
57
 
32
58
  @keyframes rotator {
33
- 0% {
34
- transform: rotate(0deg);
35
- }
36
- 100% {
37
- transform: rotate(270deg);
38
- }
59
+ 0% { transform: rotate(0deg); }
60
+ 100% { transform: rotate(270deg); }
39
61
  }
62
+
40
63
  .path {
41
- stroke-dasharray: 120;
64
+ stroke-dasharray: $offset;
42
65
  stroke-dashoffset: 0;
43
66
  transform-origin: center;
44
- animation: dash 1.5s ease-in-out infinite;
67
+ animation:
68
+ dash $duration ease-in-out infinite,
69
+
45
70
  }
46
71
 
72
+
73
+
47
74
  @keyframes dash {
48
- 0% {
49
- stroke-dashoffset: 120;
50
- }
51
- 50% {
52
- stroke-dashoffset: 30;
53
- transform: rotate(5deg);
54
- }
55
- 100% {
56
- stroke-dashoffset: 120;
57
- transform: rotate(450deg);
58
- }
75
+ 0% { stroke-dashoffset: $offset; }
76
+ 50% {
77
+ stroke-dashoffset: calc($offset / 4);
78
+ transform:rotate(5deg);
79
+ }
80
+ 100% {
81
+ stroke-dashoffset: $offset;
82
+ transform:rotate(450deg);
83
+ }
59
84
  }
60
85
  </style>
@@ -1,7 +1,13 @@
1
1
  <template>
2
- <nav class="nav e-blur" :class="{ fixed }">
3
- <e-container :noBtnPadding="true"
4
- ><div class="nav-content">
2
+ <nav
3
+ class="nav e-blur"
4
+ :class="{ fixed }"
5
+ >
6
+ <e-container
7
+ :no-btn-padding="true"
8
+ :force-full-width="true"
9
+ >
10
+ <div class="nav-content">
5
11
  <slot />
6
12
  </div>
7
13
  </e-container>
@@ -14,7 +20,7 @@ defineProps<{
14
20
  }>();
15
21
  //const colorFromScriptSetup = "green";
16
22
  </script>
17
- <style scoped>
23
+ <style lang="scss" scoped>
18
24
  .nav-content {
19
25
  display: flex;
20
26
  align-items: stretch;
@@ -25,6 +31,7 @@ defineProps<{
25
31
  z-index: 5;
26
32
  height: 3.5rem;
27
33
  box-shadow: 0 0 0 0.06rem rgba(0, 0, 0, 0.12) !important;
34
+
28
35
  background-color: var(--e-color-elev);
29
36
  position: sticky;
30
37
  top: 0;