@exakt/ui 0.0.3 → 0.0.5

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 (30) hide show
  1. package/README.md +13 -13
  2. package/dist/module.d.ts +2 -1
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +5 -10
  5. package/dist/runtime/components/e/alert.vue +5 -2
  6. package/dist/runtime/components/e/app-bars.vue +74 -39
  7. package/dist/runtime/components/e/avatar.vue +7 -2
  8. package/dist/runtime/components/e/btn.vue +94 -60
  9. package/dist/runtime/components/e/container.vue +23 -16
  10. package/dist/runtime/components/e/dialog.vue +14 -6
  11. package/dist/runtime/components/e/dropdown.vue +57 -22
  12. package/dist/runtime/components/e/focus-sheet.vue +11 -9
  13. package/dist/runtime/components/e/icon.vue +1 -1
  14. package/dist/runtime/components/e/iconButton.vue +8 -2
  15. package/dist/runtime/components/e/image-lazy-view.vue +5 -3
  16. package/dist/runtime/components/e/input/radio.vue +28 -12
  17. package/dist/runtime/components/e/input/text.vue +34 -18
  18. package/dist/runtime/components/e/link.vue +9 -2
  19. package/dist/runtime/components/e/loading-spinner.vue +57 -32
  20. package/dist/runtime/components/e/{nav.vue → nav/bar.vue} +11 -4
  21. package/dist/runtime/components/e/nav/btn.vue +138 -0
  22. package/dist/runtime/components/e/passwordEye.vue +3 -1
  23. package/dist/runtime/components/e/progress/gradient.vue +36 -23
  24. package/dist/runtime/components/e/progress/linear.vue +11 -2
  25. package/dist/runtime/components/e/tr/scale.vue +4 -4
  26. package/dist/runtime/css/util.scss +177 -0
  27. package/dist/runtime/plugin.mjs +1 -1
  28. package/package.json +2 -2
  29. package/dist/runtime/css/util.css +0 -565
  30. /package/dist/runtime/css/{main.scssx → main.scss} +0 -0
package/README.md CHANGED
@@ -3,7 +3,7 @@ Get your module up and running quickly.
3
3
 
4
4
  Find and replace all on all files (CMD+SHIFT+F):
5
5
  - Name: exakt
6
- - Package name: exakt-ui
6
+ - Package name: @exakt/ui
7
7
  - Description: My new Nuxt module
8
8
  -->
9
9
 
@@ -28,25 +28,25 @@ a simple nuxt ui library focused on doing as much as possible with css
28
28
 
29
29
  ## Quick Setup
30
30
 
31
- 1. Add `exakt-ui` dependency to your project
31
+ 1. Add `@exakt/ui` dependency to your project
32
32
 
33
33
  ```bash
34
34
  # Using pnpm
35
- pnpm add -D exakt-ui
35
+ pnpm add -D @exakt/ui
36
36
 
37
37
  # Using yarn
38
- yarn add --dev exakt-ui
38
+ yarn add --dev @exakt/ui
39
39
 
40
40
  # Using npm
41
- npm install --save-dev exakt-ui
41
+ npm install --save-dev @exakt/ui
42
42
  ```
43
43
 
44
- 2. Add `exakt-ui` to the `modules` section of `nuxt.config.ts`
44
+ 2. Add `@exakt/ui` to the `modules` section of `nuxt.config.ts`
45
45
 
46
46
  ```js
47
47
  export default defineNuxtConfig({
48
48
  modules: [
49
- 'exakt-ui'
49
+ '@exakt/ui'
50
50
  ]
51
51
  })
52
52
  ```
@@ -80,14 +80,14 @@ npm run release
80
80
  ```
81
81
 
82
82
  <!-- Badges -->
83
- [npm-version-src]: https://img.shields.io/npm/v/exakt-ui/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
84
- [npm-version-href]: https://npmjs.com/package/exakt-ui
83
+ [npm-version-src]: https://img.shields.io/npm/v/@exakt/ui/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
84
+ [npm-version-href]: https://npmjs.com/package/@exakt/ui
85
85
 
86
- [npm-downloads-src]: https://img.shields.io/npm/dm/exakt-ui.svg?style=flat&colorA=18181B&colorB=28CF8D
87
- [npm-downloads-href]: https://npmjs.com/package/exakt-ui
86
+ [npm-downloads-src]: https://img.shields.io/npm/dm/@exakt/ui.svg?style=flat&colorA=18181B&colorB=28CF8D
87
+ [npm-downloads-href]: https://npmjs.com/package/@exakt/ui
88
88
 
89
- [license-src]: https://img.shields.io/npm/l/exakt-ui.svg?style=flat&colorA=18181B&colorB=28CF8D
90
- [license-href]: https://npmjs.com/package/exakt-ui
89
+ [license-src]: https://img.shields.io/npm/l/@exakt/ui.svg?style=flat&colorA=18181B&colorB=28CF8D
90
+ [license-href]: https://npmjs.com/package/@exakt/ui
91
91
 
92
92
  [nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
93
93
  [nuxt-href]: https://nuxt.com
package/dist/module.d.ts CHANGED
@@ -9,8 +9,9 @@ interface ModuleOptions {
9
9
  blue?: string;
10
10
  };
11
11
  breakpoints: {
12
+ sm?: string;
12
13
  md?: string;
13
- l?: string;
14
+ lg?: string;
14
15
  xl?: string;
15
16
  };
16
17
  borderRadius: string;
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "exakt-ui",
3
3
  "configKey": "exakt",
4
- "version": "0.0.3"
4
+ "version": "0.0.5"
5
5
  }
package/dist/module.mjs CHANGED
@@ -10,8 +10,9 @@ const defaults = {
10
10
  blue: "#2196f3"
11
11
  },
12
12
  breakpoints: {
13
+ sm: "16em",
13
14
  md: "33em",
14
- l: "48em",
15
+ lg: "48em",
15
16
  xl: "60em"
16
17
  },
17
18
  borderRadius: "8px",
@@ -40,7 +41,7 @@ const module = defineNuxtModule({
40
41
  SCSSvariables += `$root-${key}: ${value}; `;
41
42
  }
42
43
  for (const [key, value] of Object.entries(options.breakpoints)) {
43
- CSSvariables += `--e-${key}-screen-breakpoint: ${value}; `;
44
+ SCSSvariables += `$e-${key}-screen-breakpoint: ${value}; `;
44
45
  }
45
46
  CSSvariables += `--e-font-family: ${options.font}; `;
46
47
  CSSvariables += `--e-rounded-border-radius: ${options.borderRadius}; `;
@@ -66,14 +67,8 @@ const module = defineNuxtModule({
66
67
  }
67
68
  });
68
69
  });
69
- await fs.promises.copyFile(
70
- resolver.resolve("./runtime/css/main.scssx"),
71
- resolver.resolve("../node_modules/.cache/exakt-ui/main.scss")
72
- );
73
- nuxt.options.css.push(
74
- resolver.resolve("../node_modules/.cache/exakt-ui/main.scss")
75
- );
76
- nuxt.options.css.push(resolver.resolve("./runtime/css/util.css"));
70
+ nuxt.options.css.push(resolver.resolve("./runtime/css/main.scss"));
71
+ nuxt.options.css.push(resolver.resolve("./runtime/css/util.scss"));
77
72
  nuxt.options.css.push(
78
73
  resolver.resolve("../node_modules/.cache/exakt-ui/variables.css")
79
74
  );
@@ -1,7 +1,10 @@
1
1
  <template>
2
2
  <div class="flex-center color-red">
3
- <e-icon :icon="mdiAlert" size="19" class="mr-2"></e-icon
4
- ><small><slot /></small>
3
+ <e-icon
4
+ :icon="mdiAlert"
5
+ size="19"
6
+ class="mr-2"
7
+ /><small><slot /></small>
5
8
  </div>
6
9
  </template>
7
10
  <script setup lang="ts">
@@ -1,48 +1,53 @@
1
1
  <template>
2
+ <div class="title-bar">
3
+ <e-progress-linear :model-value="props.loading" />
4
+ <div class="pf-wrap">
5
+ <slot name="left" />
6
+ </div>
7
+ <slot name="center" />
2
8
 
3
- <div class="title-bar">
4
- <e-progress-linear :model-value="props.loading" />
5
- <div class="pf-wrap">
6
- <slot name="left"></slot>
7
- </div>
8
- <slot name="center"></slot>
9
-
10
- <div class="pf-wrap">
11
- <slot name="right"></slot>
12
- </div>
9
+ <div class="pf-wrap">
10
+ <slot name="right" />
13
11
  </div>
12
+ </div>
14
13
 
15
- <div class="bar-container">
16
- <e-container class="bar-e-container" :forceFullWidth="true">
17
- <div class="rounded bar">
18
- <e-progress-linear :model-value="props.loading" class="md-and-up-only" />
19
-
20
- <div class="md-and-up-only flex-stretch">
21
- <slot name="center"></slot>
22
- </div>
23
- <slot name="nav-items"></slot>
24
- <div class="md-and-up-only flex-stretch">
25
- <slot name="right" class="fullwidth"></slot>
26
- </div>
14
+ <div class="bar-container">
15
+ <e-container class="bar-e-container" :force-full-width="true">
16
+ <div class="rounded bar">
17
+ <e-progress-linear
18
+ :model-value="props.loading"
19
+ class="md-and-up-only"
20
+ />
21
+ <div class="bar-content">
22
+
23
+ <div class="bar-section">
24
+ <!-- Normally the logo -->
25
+ <div class="md-and-up-only flex-stretch">
26
+ <slot name="center" />
27
27
  </div>
28
- </e-container>
29
- </div>
28
+ <!-- All the links-->
29
+ <slot name="nav-items" />
30
+ </div>
30
31
 
32
+ <!-- Normally the sign in button -->
33
+ <div class="md-and-up-only bar-section">
34
+ <slot name="right" class="fullwidth" />
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </e-container>
39
+ </div>
31
40
  </template>
32
41
  <script setup lang="ts">
33
-
34
42
  const props = withDefaults(
35
43
  defineProps<{
36
- loading?: boolean
44
+ loading?: boolean;
37
45
  }>(),
38
- { loading:false }
46
+ { loading: false }
39
47
  );
40
-
41
- const { $store, $platform } = useNuxtApp();
42
-
43
48
  </script>
44
49
 
45
- <style scoped>
50
+ <style lang="scss" scoped>
46
51
  .title-bar {
47
52
  display: none;
48
53
  position: relative;
@@ -61,8 +66,10 @@ const { $store, $platform } = useNuxtApp();
61
66
  .bar-container {
62
67
  width: 100%;
63
68
  top: 1rem;
69
+
64
70
  height: 4rem;
65
71
  padding-bottom: 1rem;
72
+
66
73
  display: flex;
67
74
  justify-content: center;
68
75
  position: sticky;
@@ -70,7 +77,19 @@ const { $store, $platform } = useNuxtApp();
70
77
  z-index: 4;
71
78
  }
72
79
 
73
- @media screen and (max-width: var(--e-md-screen-breakpoint)) {
80
+ .bar-content{
81
+ display: flex;
82
+ justify-content: space-between;
83
+ align-items: stretch;
84
+ width: 100%;
85
+ }
86
+
87
+ .bar-section{
88
+ display:flex;
89
+ align-items: stretch;
90
+ }
91
+
92
+ @media screen and (max-width: ($e-md-screen-breakpoint)) {
74
93
  .title-bar {
75
94
  display: unset;
76
95
  top: 0px;
@@ -85,15 +104,18 @@ const { $store, $platform } = useNuxtApp();
85
104
  align-content: stretch;
86
105
  justify-items: space-between;
87
106
  align-items: stretch;
107
+
108
+ .pf-wrap {
109
+ display: flex;
110
+ align-items: stretch;
111
+ width: 5rem;
112
+ }
88
113
  }
89
- .title-bar .pf-wrap {
90
- display: flex;
91
- align-items: stretch;
92
- width: 5rem;
93
- }
114
+
94
115
  .md-and-up-only {
95
116
  display: none;
96
117
  }
118
+
97
119
  .bar-container {
98
120
  bottom: 0px;
99
121
  left: 0px;
@@ -102,15 +124,28 @@ const { $store, $platform } = useNuxtApp();
102
124
  padding: 0px;
103
125
  z-index: 3;
104
126
  }
127
+
105
128
  .bar-e-container {
106
129
  padding: 0px;
107
130
  margin: 0px;
108
131
  }
132
+
109
133
  .bar {
110
134
  border-radius: 0px;
111
135
  width: 100%;
112
136
  height: 100%;
113
- padding-bottom: calc(env(safe-area-insee-bottom));
137
+
138
+ padding-bottom: calc(env(safe-area-inset-bottom));
139
+ }
140
+
141
+ .bar-content{
142
+ justify-content: stretch;
143
+
144
+ }
145
+
146
+ .bar-section{
147
+ justify-content: stretch;
148
+ width: 100%;
114
149
  }
115
150
  }
116
- </style>
151
+ </style>
@@ -11,7 +11,12 @@
11
11
  :src="src"
12
12
  border-radius="100%"
13
13
  />
14
- <div v-else><e-icon :size="size" :icon="mdiAccountCircle"></e-icon></div>
14
+ <div v-else>
15
+ <e-icon
16
+ :size="size"
17
+ :icon="mdiAccountCircle"
18
+ />
19
+ </div>
15
20
  </div>
16
21
  </template>
17
22
  <script setup lang="ts">
@@ -22,7 +27,7 @@ defineProps<{
22
27
  src?: string;
23
28
  }>();
24
29
  </script>
25
- <style scoped>
30
+ <style lang="scss" scoped>
26
31
  .avatar {
27
32
  border-radius: 100%;
28
33
  width: fie-content;
@@ -1,5 +1,9 @@
1
1
  <template>
2
- <button class="e-btn " :style="{ width, justifyContent: justifyWrapper }" :type="type" :disabled="disabled || loading"
2
+ <button
3
+ class="e-btn "
4
+ :style="{ width, justifyContent: justifyWrapper }"
5
+ :type="type"
6
+ :disabled="disabled || loading"
3
7
  :class="{
4
8
  active,
5
9
  inactive,
@@ -12,14 +16,24 @@
12
16
  fab,
13
17
  loadingGradient,
14
18
  colored: background !== 'transparent' || color || solid,
15
- }">
16
- <e-progress-gradient class="prog-grad" color="primary" v-if="loading && loadingGradient" />
19
+ }"
20
+ >
21
+ <e-progress-gradient
22
+ v-if="loading && loadingGradient"
23
+ class="prog-grad"
24
+ color="primary"
25
+ />
17
26
 
18
- <div ref="content" class="e-btn-content" :style="contentStyles">
19
-
20
- <div class="load-overlay" v-if="loading && !loadingGradient">
27
+ <div
28
+ ref="content"
29
+ class="e-btn-content"
30
+ :style="contentStyles"
31
+ >
32
+ <div
33
+ v-if="loading && !loadingGradient"
34
+ class="load-overlay"
35
+ >
21
36
  <e-loading-spinner />
22
-
23
37
  </div>
24
38
  <span class="actual-content flex-center">
25
39
 
@@ -46,7 +60,6 @@ const props = withDefaults(
46
60
  loadingGradient?: boolean;
47
61
  fab?: boolean;
48
62
  disabled?: boolean;
49
- to?: string;
50
63
  type?: "button" | "submit" | "reset";
51
64
  }>(),
52
65
  { type: "button", background: "primary", solid: true }
@@ -119,7 +132,7 @@ const hoverColor = computed(() => {
119
132
  return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0.9)`;
120
133
  });
121
134
  </script>
122
- <style scoped>
135
+ <style lang="scss" scoped>
123
136
  .prog-grad {
124
137
  position: absolute;
125
138
  top: 0;
@@ -141,6 +154,7 @@ const hoverColor = computed(() => {
141
154
  background: rgba(0, 0, 0, 0);
142
155
  display: flex;
143
156
  font-size: 1rem;
157
+
144
158
  justify-content: center;
145
159
  align-content: center;
146
160
  align-items: center;
@@ -154,65 +168,85 @@ const hoverColor = computed(() => {
154
168
  cursor: pointer;
155
169
  position: relative;
156
170
  flex-shrink: 1;
171
+
157
172
  transition: background 0.4s, color 0.3s, opacity 0.4s;
173
+
158
174
  font-family: var(--e-font-family);
159
- }
160
- .e-btn.loading {
161
- pointer-events: none;
162
- }
163
- .e-btn.loading.loadingGradient {
164
- background: rgba(0, 0, 0, 0) !important;
165
- color: var(--e-color-dark) !important;
166
- transition: background 0.8s, color 0.5s, opacity 0.4s;
167
- }
168
- .e-btn.loading.loadingGradient .actual-content {
169
- opacity: 0.8;
170
- transition: opacity 0.5s;
171
- }
172
- .e-btn.loading .actual-content {
173
- opacity: 0;
174
- }
175
- .e-btn:hover {
176
- background: rgba(98, 98, 98, 0.15);
177
- }
178
- .e-btn:active .e-btn-content {
179
- transform: scale(0.85);
180
- }
181
- .e-btn.fab {
182
- position: fixed;
183
- right: 5rem;
184
- bottom: 5rem;
185
- aspect-ratio: 1;
186
- border-radius: 100%;
187
- height: 4.2rem;
188
- z-index: 3;
189
- }
190
- .e-btn.block {
191
- width: 100%;
192
- }
193
- .e-btn.colored {
194
- background-color: v-bind(parsedBackgroundProp);
195
- color: v-bind(textColor);
196
- }
197
- .e-btn.colored:hover {
198
- background-color: v-bind(hoverColor);
199
- }
200
- .e-btn.solid {
201
- padding: 0.7rem 0.9rem;
202
- }
203
- .e-btn.active {
204
- color: var(--e-color-primary);
205
- }
206
- .e-btn.inactive {
207
- color: var(--e-color-dark);
208
- opacity: 80%;
175
+
176
+ &.loading {
177
+ pointer-events: none;
178
+
179
+ &.loadingGradient {
180
+ background: rgba(0, 0, 0, 0) !important;
181
+ color: var(--e-color-dark) !important;
182
+ transition: background 0.8s, color 0.5s, opacity 0.4s;
183
+
184
+ .actual-content {
185
+
186
+ opacity: 0.8;
187
+ transition: opacity 0.5s;;
188
+ }
189
+ }
190
+
191
+ .actual-content {
192
+ opacity: 0;
193
+ }
194
+
195
+ }
196
+
197
+ &:hover {
198
+ background: rgba(98, 98, 98, 0.15);
199
+ }
200
+
201
+ &:active {
202
+ .e-btn-content {
203
+ transform: scale(0.85);
204
+ }
205
+ }
206
+
207
+ &.fab {
208
+ position: fixed;
209
+ right: 5rem;
210
+ bottom: 5rem;
211
+ aspect-ratio: 1;
212
+ border-radius: 100%;
213
+ height: 4.2rem;
214
+ z-index: 3;
215
+ }
216
+
217
+ &.block {
218
+ width: 100%;
219
+ }
220
+
221
+ &.colored {
222
+ background-color: v-bind(parsedBackgroundProp);
223
+ color: v-bind(textColor);
224
+
225
+ &:hover {
226
+ background-color: v-bind(hoverColor);
227
+ }
228
+ }
229
+
230
+ &.solid {
231
+ padding: 0.7rem 0.9rem;
232
+ }
233
+
234
+ &.active {
235
+ color: var(--e-color-primary);
236
+ }
237
+
238
+ &.inactive {
239
+ color: var(--e-color-dark);
240
+ opacity: 80%;
241
+ }
209
242
  }
210
243
 
211
- @media screen and (max-width: var(--e-md-screen-breakpoint)) {
244
+ @media screen and (max-width: $e-md-screen-breakpoint) {
212
245
  .e-btn.fab {
213
246
  right: 1rem;
214
247
  }
215
248
  }
249
+
216
250
  .loading-spinner {
217
251
  max-height: 1rem;
218
252
  }
@@ -8,32 +8,38 @@
8
8
  <script setup lang="ts">
9
9
  defineProps(["noBtnPadding", "forceFullWidth"]);
10
10
  </script>
11
- <style scoped>
11
+ <style lang="scss" scoped>
12
12
  .content {
13
13
  word-wrap: break-word;
14
+
14
15
  width: 95%;
15
- }
16
- @media (max-width: var(--e-md-screen-breakpoint)) {
17
- .content.forceFullWidth {
18
- width: 100%;
16
+
17
+ @media (max-width: $e-md-screen-breakpoint) {
18
+ &.forceFullWidth {
19
+ width: 100%;
20
+ }
19
21
  }
20
- }
21
- @media (min-width: var(--e-md-screen-breakpoint)) {
22
- .content {
23
- width: calc(85% - 0rem);
22
+
23
+ $padding: 0rem;
24
+
25
+ @media (min-width: $e-md-screen-breakpoint) {
26
+ width: calc(100% - $padding);
24
27
  }
25
- }
26
- @media (min-width: var(--e-l-screen-breakpoint)) {
27
- .content {
28
- width: calc(65% - 0rem);
28
+
29
+ @media (min-width: $e-lg-screen-breakpoint) {
30
+ width: calc(95% - $padding);
31
+ }
32
+
33
+ @media (min-width: $e-xl-screen-breakpoint) {
34
+ width: calc(85% - $padding);
29
35
  }
30
36
  }
31
37
 
32
38
  .container.no-btn-padding {
33
39
  padding: 0px 0px;
34
- }
35
- .container.no-btn-padding .content {
36
- margin: 0px 0px;
40
+ .content {
41
+ margin: 0px 0px;
42
+ }
37
43
  }
38
44
 
39
45
  .container {
@@ -43,6 +49,7 @@ defineProps(["noBtnPadding", "forceFullWidth"]);
43
49
  justify-content: center;
44
50
  word-wrap: break-word;
45
51
  box-sizing: border-box; /* Opera/IE 8+ */
52
+
46
53
  padding: 0px var(--e-core-padding-x);
47
54
  }
48
55
  </style>
@@ -1,10 +1,16 @@
1
1
  <template>
2
2
  <div>
3
- <e-focus-sheet :model-value="modelValue" :opaque-on-desktop="true"
4
- @update:model-value="emit('update:modelValue', $event)" />
3
+ <e-focus-sheet
4
+ :model-value="modelValue"
5
+ :opaque-on-desktop="true"
6
+ @update:model-value="emit('update:modelValue', $event)"
7
+ />
5
8
 
6
9
  <e-tr-scale :multiplier="1.3">
7
- <div class="dialog-wrap flex-center" v-if="modelValue">
10
+ <div
11
+ v-if="modelValue"
12
+ class="dialog-wrap flex-center"
13
+ >
8
14
  <div class="dialog rounded px-6 pe-6 pb-2">
9
15
  <div class="mb-4">
10
16
  <h2 class="ma-0 pa-0">
@@ -13,7 +19,7 @@
13
19
  </div>
14
20
  <slot />
15
21
  <div class="button-bar me-4 mb-3">
16
- <slot name="buttons"></slot>
22
+ <slot name="buttons" />
17
23
  </div>
18
24
  </div>
19
25
  </div>
@@ -28,7 +34,7 @@ const props = defineProps<{
28
34
  const emit = defineEmits(["update:modelValue"]);
29
35
  const state = reactive({ active: false });
30
36
  </script>
31
- <style scoped>
37
+ <style scoped lang="scss">
32
38
  .dialog-wrap {
33
39
  position: fixed;
34
40
  pointer-events: none;
@@ -48,17 +54,19 @@ const state = reactive({ active: false });
48
54
  overflow: clip;
49
55
  }
50
56
 
51
- @media (max-width: var(--e-md-screen-breakpoint)) {
57
+ @media (max-width: $e-md-screen-breakpoint) {
52
58
  .dialog {
53
59
  width: 100%;
54
60
  max-width: 100vw;
55
61
  min-width: unset;
56
62
  }
63
+
57
64
  .dialog-wrap {
58
65
  align-content: flex-end;
59
66
  align-items: flex-end;
60
67
  }
61
68
  }
69
+
62
70
  .button-bar {
63
71
  display: flex;
64
72
  align-items: stretch;