@exakt/ui 0.0.55 → 0.0.58

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.d.ts CHANGED
@@ -28,6 +28,6 @@ interface ModuleOptions {
28
28
  weight?: number;
29
29
  };
30
30
  }
31
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
31
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
32
32
 
33
33
  export { ModuleOptions, _default as default };
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "exakt-ui",
3
3
  "configKey": "exakt",
4
- "version": "0.0.55"
4
+ "version": "0.0.58"
5
5
  }
package/dist/module.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineNuxtModule, createResolver, addPlugin, extendViteConfig, addImportsSources, addComponentsDir } from '@nuxt/kit';
1
+ import { defineNuxtModule, createResolver, addPlugin, extendViteConfig, addComponentsDir } from '@nuxt/kit';
2
2
  import fs from 'fs';
3
3
 
4
4
  const defaults = {
@@ -31,7 +31,7 @@ const defaults = {
31
31
  },
32
32
  borderRadius: "8px",
33
33
  corePaddingX: "1rem",
34
- font: { family: "Roboto, sans-serif", weight: 400 }
34
+ font: { family: "Open Sans, sans-serif", weight: 400 }
35
35
  };
36
36
  const module = defineNuxtModule({
37
37
  meta: {
@@ -79,20 +79,18 @@ const module = defineNuxtModule({
79
79
  css: {
80
80
  preprocessorOptions: {
81
81
  scss: {
82
- additionalData: `@use "sass:color"; @use "sass:map"; @import "${resolver.resolve(
82
+ api: "modern-compiler",
83
+ additionalData: `@use "sass:color"; @use "sass:map"; @use "${resolver.resolve(
83
84
  "../node_modules/.cache/exakt-ui/variables.scss"
84
- )}"; `
85
+ )}" as exakt; `
85
86
  }
86
87
  }
87
88
  }
88
89
  });
89
90
  });
90
- addImportsSources({
91
- from: "material-symbols",
92
- imports: ["material-symbols"]
93
- });
94
91
  nuxt.options.css.push(resolver.resolve("./runtime/css/main.scss"));
95
92
  nuxt.options.css.push(resolver.resolve("./runtime/css/util.scss"));
93
+ nuxt.options.css.push("material-symbols");
96
94
  nuxt.options.css.push(
97
95
  resolver.resolve("../node_modules/.cache/exakt-ui/variables.css")
98
96
  );
@@ -1,13 +1,20 @@
1
1
  <template>
2
- <div class="flex-center color-red">
2
+ <div
3
+ class="flex-center"
4
+ :class="{ [severityMatrix[severity].class]: true }"
5
+ >
3
6
  <e-icon
4
-
5
7
  size="19"
6
8
  class="mr-2"
7
9
  >
8
- warning
9
- </e-icon><small><slot /></small>
10
+ {{ severityMatrix[severity].icon }}
11
+ </e-icon><small>
12
+ <slot />
13
+ </small>
10
14
  </div>
11
15
  </template>
12
16
  <script setup lang="ts">
17
+ withDefaults(defineProps<{ severity?: 0 | 1 | 2 }>(), { severity: 2 })
18
+
19
+ const severityMatrix = { 0: { icon: "info", class: "" }, 1: { icon: "warning", class: "color-yellow" }, 2: { icon: "warning", class: "color-red" } }
13
20
  </script>
@@ -93,7 +93,7 @@ const props = withDefaults(
93
93
  align-items: stretch;
94
94
  }
95
95
 
96
- @media screen and (max-width: ($e-md-screen-breakpoint)) {
96
+ @media screen and (max-width: (exakt.$e-md-screen-breakpoint)) {
97
97
  .title-bar {
98
98
  display: unset;
99
99
  top: 0px;
@@ -25,7 +25,7 @@
25
25
  const props = withDefaults(defineProps<{
26
26
  src?: string;
27
27
  size?: number;
28
- }>(), { size: 120 });
28
+ }>(), { size: 120, src: undefined });
29
29
  </script>
30
30
  <style lang="scss" scoped>
31
31
  .avatar {
@@ -11,9 +11,9 @@
11
11
  block,
12
12
  rounded: solid,
13
13
  'e-disabled': disabled,
14
- 'my-2': solid,
15
14
  loading,
16
15
  fab,
16
+ compact,
17
17
  ...backgroundClass
18
18
  }"
19
19
  >
@@ -50,6 +50,7 @@ const props = withDefaults(
50
50
  active?: boolean;
51
51
  inactive?: boolean;
52
52
  solid?: boolean;
53
+ compact?: boolean;
53
54
  color?: string;
54
55
  background?: string;
55
56
  block?: boolean;
@@ -65,6 +66,7 @@ const props = withDefaults(
65
66
  solid: true,
66
67
  width: undefined,
67
68
  justify: "center",
69
+ compact: false,
68
70
  align: "center",
69
71
  color: undefined,
70
72
  }
@@ -88,13 +90,13 @@ const backgroundColorRgb = computed(() => {
88
90
  return parseColor($exakt.parseColor(props.background));
89
91
  });
90
92
 
91
- const isRootColor = computed(() => $exakt.rootColors.includes(props.background))
93
+ const isRootColor = computed(() => $exakt&&$exakt.rootColors && $exakt.rootColors.includes(props.background))
92
94
  const backgroundClass = computed(() => {
93
95
  const c: { [key: string]: boolean } = {}
94
96
 
95
- if(props.background == 'transparent'){
97
+ if (props.background == 'transparent') {
96
98
  c['transparent'] = true;
97
- }else if (isRootColor.value) {
99
+ } else if (isRootColor.value) {
98
100
  c["bg-" + props.background] = true
99
101
  } else {
100
102
  c['custom-color'] = true
@@ -170,9 +172,10 @@ const textColor = computed(() => {
170
172
  &.transparent {
171
173
  color: var(--e-color-text);
172
174
  background: rgba(0, 0, 0, 0);
175
+
173
176
  &:hover {
174
- background: rgba(98, 98, 98, 0.15);
175
- opacity: 1;
177
+ background: rgba(98, 98, 98, 0.15);
178
+ opacity: 1;
176
179
  }
177
180
  }
178
181
 
@@ -190,8 +193,8 @@ const textColor = computed(() => {
190
193
  }
191
194
 
192
195
  &:hover {
193
- // background: rgba(98, 98, 98, 0.15);
194
- opacity: 0.7;
196
+ // background: rgba(98, 98, 98, 0.15);
197
+ opacity: 0.7;
195
198
  border: transparent solid 0.1rem;
196
199
  }
197
200
 
@@ -220,17 +223,30 @@ const textColor = computed(() => {
220
223
  background-color: v-bind(backgroundColor);
221
224
  color: v-bind(textColor);
222
225
 
223
- /* &:hover {
226
+ /* &:hover {
224
227
  opacity: 0.9;
225
228
  } */
226
229
  }
227
230
 
228
231
  &.solid {
229
232
  padding: 0.7rem 0.9rem;
233
+
234
+ &.compact {
235
+ padding: 0.6rem 0.8rem;
236
+ }
230
237
  }
231
238
 
232
239
  &.active {
233
240
  color: var(--e-color-primary);
241
+
242
+ &.transparent {
243
+ background: rgba(var(--e-color-primary-rgb), 0.1);
244
+
245
+ &:hover {
246
+ background: rgba(var(--e-color-primary-rgb),0.075);
247
+ opacity: 1;
248
+ }
249
+ }
234
250
  }
235
251
 
236
252
  &.inactive {
@@ -239,7 +255,7 @@ const textColor = computed(() => {
239
255
  }
240
256
  }
241
257
 
242
- @media screen and (max-width: $e-md-screen-breakpoint) {
258
+ @media screen and (max-width: exakt.$e-md-screen-breakpoint) {
243
259
  .e-btn.fab {
244
260
  right: 1rem;
245
261
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="e-chip py-3 px-4 ma-1 d-flex flex-center"
3
+ class="e-chip py-3 px-4 ma-1 flex-center"
4
4
  :class="{ active, 'bg-i-active':active, 'bg-i-inactive':!active }"
5
5
  @click="active = !active"
6
6
  >
@@ -46,6 +46,7 @@ const active = computed({
46
46
  user-select: none;
47
47
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
48
48
  cursor: pointer;
49
+ display: inline-flex;
49
50
 
50
51
  &>.check {
51
52
  display: none;
@@ -30,7 +30,7 @@ withDefaults(
30
30
 
31
31
  width: 95%;
32
32
 
33
- @media (max-width: $e-md-screen-breakpoint) {
33
+ @media (max-width: exakt.$e-md-screen-breakpoint) {
34
34
  &.forceFullWidth {
35
35
  width: 100%;
36
36
  }
@@ -38,15 +38,15 @@ withDefaults(
38
38
 
39
39
  $padding: 0rem;
40
40
 
41
- @media (min-width: $e-md-screen-breakpoint) {
41
+ @media (min-width: exakt.$e-md-screen-breakpoint) {
42
42
  width: calc(100% - $padding);
43
43
  }
44
44
 
45
- @media (min-width: $e-lg-screen-breakpoint) {
45
+ @media (min-width: exakt.$e-lg-screen-breakpoint) {
46
46
  width: calc(95% - $padding);
47
47
  }
48
48
 
49
- @media (min-width: $e-xl-screen-breakpoint) {
49
+ @media (min-width: exakt.$e-xl-screen-breakpoint) {
50
50
  width: calc(85% - $padding);
51
51
  }
52
52
  }
@@ -51,7 +51,7 @@ const emit = defineEmits(["update:modelValue"]);
51
51
  overflow: clip;
52
52
  }
53
53
 
54
- @media (max-width: $e-md-screen-breakpoint) {
54
+ @media (max-width: exakt.$e-md-screen-breakpoint) {
55
55
  .dialog {
56
56
  width: 100%;
57
57
  max-width: 100vw;
@@ -73,7 +73,7 @@ const props = withDefaults(
73
73
  position?: { x: number, y: number }
74
74
  fixed?:boolean;
75
75
  }>(),
76
- { center: false, visible: null, paddingY: "", modelValue: undefined }
76
+ { center: false, visible: null, paddingY: "", modelValue: undefined, position: undefined}
77
77
  );
78
78
 
79
79
  const activator = ref<HTMLDivElement>();
@@ -230,7 +230,7 @@ const onActivatorClick = () => {
230
230
  }
231
231
  }
232
232
 
233
- @media screen and (max-width: $e-md-screen-breakpoint) {
233
+ @media screen and (max-width: exakt.$e-md-screen-breakpoint) {
234
234
  .list {
235
235
  position: fixed;
236
236
  top: unset;
@@ -33,7 +33,7 @@ const emit = defineEmits(["update:modelValue"]);
33
33
  }
34
34
  }
35
35
 
36
- @media screen and (max-width: $e-md-screen-breakpoint) {
36
+ @media screen and (max-width: exakt.$e-md-screen-breakpoint) {
37
37
  .focus-sheet {
38
38
  background-color: rgba(var(--e-color-bg-rgb), 0.7);
39
39
  }
@@ -8,7 +8,7 @@
8
8
  >
9
9
  <e-icon
10
10
  v-if="icon"
11
-
11
+ :fill="fill"
12
12
  :size="size"
13
13
  >
14
14
  {{ icon }}
@@ -18,8 +18,8 @@
18
18
  </template>
19
19
  <script setup lang="ts">
20
20
  withDefaults(
21
- defineProps<{ icon?: string; size?: string; loading?: boolean, type?: "button" | "submit" | "reset" }>(),
22
- { size: "21" }
21
+ defineProps<{ icon?: string; size?: number|`${number}`; loading?: boolean, type?: "button" | "submit" | "reset", fill?: boolean }>(),
22
+ { size: "21", icon: undefined, type:undefined }
23
23
  );
24
24
  </script>
25
25
  <style scoped>
@@ -0,0 +1,98 @@
1
+ <template>
2
+ <div>
3
+ <div
4
+ v-if="label"
5
+ class="pb-2"
6
+ >
7
+ <label
8
+ :for="id"
9
+ class="text-secondary"
10
+ >{{ label }}</label>
11
+ </div>
12
+ <input
13
+ :id="id"
14
+ v-model="currentText"
15
+ type="datetime-local"
16
+ class="py-3 px-4"
17
+ :name="name"
18
+ :required="required"
19
+ :disabled="disabled"
20
+ >
21
+ </div>
22
+ </template>
23
+ <script setup lang="ts">
24
+ import { ref, computed, useId, onMounted } from "#imports";
25
+
26
+
27
+ const props = withDefaults(
28
+ defineProps<{
29
+ label?: string;
30
+ name?: string;
31
+ modelValue?: string;
32
+ defaultValue?: string;
33
+ disabled?: boolean;
34
+ required?: boolean;
35
+ }>(),
36
+ {
37
+ label: "",
38
+ modelValue: "",
39
+ name: undefined,
40
+ defaultValue: undefined
41
+ }
42
+ );
43
+
44
+ const id = useId();
45
+
46
+ const internalText = ref<string | null>(null)
47
+ const emit = defineEmits(["update:modelValue"]);
48
+
49
+
50
+ const currentText = computed({
51
+ get: () => {
52
+ const setValue = props.modelValue == undefined ? internalText.value : props.modelValue
53
+
54
+ if (!setValue || !setValue.length) {
55
+ return props.defaultValue || ''
56
+ }
57
+
58
+ return setValue
59
+ },
60
+ set: (value) => { if (props.modelValue == undefined) { internalText.value = value } else { emit("update:modelValue", value) } },
61
+ });
62
+
63
+ onMounted(() => {
64
+ if (props.defaultValue) {
65
+ currentText.value = props.defaultValue
66
+ }
67
+ })
68
+
69
+
70
+ </script>
71
+ <style lang="scss" scoped>
72
+
73
+ input[type=datetime-local] {
74
+ border-radius: var(--e-rounded-border-radius);
75
+ border: none;
76
+ outline: var(--e-color-i-outline) solid 0.1rem;
77
+ background-color: var(--e-color-i-depressed);
78
+
79
+ transition: outline ease-in-out 0.15s, background-color ease-in-out 0.15s;
80
+
81
+ &:active {
82
+ background-color: var(--e-color-i-depressed-2) !important;
83
+ outline: var(--e-color-primary) solid 0.2rem !important;
84
+ }
85
+
86
+ &:focus-within {
87
+ outline: var(--e-color-primary) solid 0.125rem;
88
+ //box-shadow: 0 0 0 0.125rem var(--e-color-primary);
89
+ background-color: var(--e-color-i-depressed-active);
90
+ }
91
+
92
+ }
93
+
94
+
95
+ ::-webkit-datetime-edit {
96
+ font-family: var(--e-font-family);
97
+ }
98
+ </style>
@@ -1,58 +1,60 @@
1
1
  <template>
2
- <div
3
- v-if="label"
4
- class="mb-3 mt-6"
5
- >
6
- <label :for="id">
7
- {{ label }} </label>
8
- </div>
9
-
10
- <div
11
- class="wrapper fullwidth"
12
- :style="inputState.overtakeStyle"
13
- :class="{ rounded: rounded == undefined ? solid : rounded, solid }"
14
- @click="focus"
15
- >
16
- <e-icon
17
- v-if="icon"
18
- class="mr-2"
19
- size="19"
20
- fill="true"
2
+ <div>
3
+ <div
4
+ v-if="label"
5
+ class="mb-3 mt-6"
21
6
  >
22
- {{ icon }}
23
- </e-icon>
24
- <textarea
25
- v-if="type === 'textarea'"
26
- ref="input"
27
- v-model="currentText"
28
- class="input"
29
- :name="name"
30
- :placeholder="placeholder"
31
- autocomplete="off"
32
- auto-grow
33
- rows="5"
34
- @focus="inputState.focused = true"
35
- @blur="inputState.focused = false"
36
- />
37
- <input
38
- v-else
39
- :id="id"
40
- ref="input"
41
- v-model="currentText"
42
- :disabled="disabled"
43
- :type="type"
44
- :name="name"
45
- :autocomplete="autocomplete"
46
- :spellcheck="spellcheck"
47
- class="input"
48
- :required="required"
49
- :placeholder="placeholder"
50
- @click.stop=""
51
- @focus="inputState.focused = true"
52
- @blur="inputState.focused = false"
53
- @transitionend="transitionEnd"
7
+ <label :for="id">
8
+ {{ label }} </label>
9
+ </div>
10
+
11
+ <div
12
+ class="wrapper fullwidth"
13
+ :style="inputState.overtakeStyle"
14
+ :class="{ rounded: rounded == undefined ? solid : rounded, solid, compact }"
15
+ @click="focus"
54
16
  >
55
- <slot />
17
+ <e-icon
18
+ v-if="icon"
19
+ class="mr-2"
20
+ size="19"
21
+ fill="true"
22
+ >
23
+ {{ icon }}
24
+ </e-icon>
25
+ <textarea
26
+ v-if="type === 'textarea'"
27
+ ref="input"
28
+ v-model="currentText"
29
+ class="input"
30
+ :name="name"
31
+ :placeholder="placeholder"
32
+ autocomplete="off"
33
+ auto-grow
34
+ rows="5"
35
+ @focus="inputState.focused = true"
36
+ @blur="inputState.focused = false"
37
+ />
38
+ <input
39
+ v-else
40
+ :id="id"
41
+ ref="input"
42
+ v-model="currentText"
43
+ :disabled="disabled"
44
+ :type="type"
45
+ :name="name"
46
+ :autocomplete="autocomplete"
47
+ :spellcheck="spellcheck"
48
+ class="input"
49
+ :required="required"
50
+ :placeholder="placeholder"
51
+ @click.stop=""
52
+ @focus="inputState.focused = true"
53
+ @blur="inputState.focused = false"
54
+ @transitionend="transitionEnd"
55
+ >
56
+ <slot />
57
+ </div>
56
58
  </div>
57
59
  </template>
58
60
  <script setup lang="ts">
@@ -85,11 +87,12 @@ const focus = () => {
85
87
  input.value.focus();
86
88
  };
87
89
 
88
- const internalText = ref('')
90
+ const internalText = ref<string | null>(null)
91
+
89
92
 
90
93
  const currentText = computed({
91
94
  get: () => {
92
- const setValue = props.modelValue ? props.modelValue : internalText.value
95
+ const setValue = props.modelValue == undefined ? internalText.value : props.modelValue
93
96
 
94
97
  if (!setValue || !setValue.length) {
95
98
  return props.defaultValue || ''
@@ -97,7 +100,7 @@ const currentText = computed({
97
100
 
98
101
  return setValue
99
102
  },
100
- set: (value) => { if (props.modelValue) { emit("update:modelValue", value) } else { internalText.value = value } },
103
+ set: (value) => { if (props.modelValue == undefined) { internalText.value = value } else { emit("update:modelValue", value) } },
101
104
  });
102
105
 
103
106
  onMounted(() => {
@@ -123,6 +126,8 @@ const props = withDefaults(
123
126
  focus?: boolean;
124
127
  spellcheck?: boolean;
125
128
  height?: string;
129
+
130
+ compact?: boolean;
126
131
  }>(),
127
132
  {
128
133
  icon: undefined,
@@ -132,7 +137,11 @@ const props = withDefaults(
132
137
  modelValue: "",
133
138
  autocomplete: "off",
134
139
  height: "unset",
140
+ compact: false,
135
141
  rounded: undefined,
142
+ placeholder: undefined,
143
+ name: undefined,
144
+ defaultValue: undefined
136
145
  }
137
146
  );
138
147
 
@@ -240,10 +249,20 @@ const transitionEnd = () => {
240
249
  }
241
250
 
242
251
  .wrapper.solid {
243
- padding: 15px;
252
+ padding: 0.8rem 1rem;
244
253
  background-color: var(--e-color-i-depressed);
254
+
255
+ @media screen and (min-width: exakt.$e-md-screen-breakpoint) {
256
+ &.compact {
257
+ padding: 0.6rem 0.8rem;
258
+ }
259
+ }
245
260
  }
246
261
 
262
+
263
+
264
+
265
+
247
266
  .fullwidth {
248
267
  width: 100%;
249
268
  }
@@ -1,16 +1,6 @@
1
1
  <template>
2
- <nav
3
- class="nav bg-elev 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">
11
- <slot />
12
- </div>
13
- </e-container>
2
+ <nav :class="{ fixed }">
3
+ <slot />
14
4
  </nav>
15
5
  </template>
16
6
  <script setup lang="ts">
@@ -21,23 +11,39 @@ defineProps<{
21
11
  //const colorFromScriptSetup = "green";
22
12
  </script>
23
13
  <style lang="scss" scoped>
24
- .nav-content {
25
- display: flex;
26
- align-items: stretch;
27
- height: 100%;
28
- }
29
14
 
30
- .nav {
31
- z-index: 5;
32
- height: 3.5rem;
33
- box-shadow: 0 0 0 0.06rem rgba(0, 0, 0, 0.12) !important;
34
15
 
35
- position: sticky;
16
+ nav {
17
+ z-index: 5;
18
+ min-height: 3.5rem;
19
+ border-radius: var(--e-rounded-border-radius);
20
+ background: var(--e-color-bg);
21
+ overflow-y: none;
22
+ display: flex;
23
+ align-items: center;
24
+ // position: sticky;
36
25
  top: 0;
26
+ left: 0;
37
27
  }
38
28
 
39
- .nav.fixed {
29
+ nav.fixed {
40
30
  position: fixed;
41
31
  width: 100%;
42
32
  }
33
+
34
+
35
+ @media screen and (max-width: exakt.$e-md-screen-breakpoint) {
36
+ nav {
37
+ position: fixed;
38
+ bottom: 0;
39
+ top: unset;
40
+ border-radius: 0;
41
+ width: 100%;
42
+ justify-content: stretch;
43
+ margin: 0 !important;
44
+ padding: 0.2rem 0.6rem calc(0.2rem + env(safe-area-inset-bottom)) 0.6rem ;
45
+ background: var(--e-color-elev);
46
+ }
47
+ }
48
+
43
49
  </style>
@@ -1,45 +1,41 @@
1
1
  <template>
2
- <div class="flex-stretch nav-btn">
3
- <e-undecorated-link
4
- :to="to"
5
- class="flex-stretch fullwidth"
2
+ <e-undecorated-link
3
+ :to="to"
4
+ class="grow-on-mobile"
5
+ >
6
+ <e-btn
7
+ :solid="true"
8
+ background="transparent"
9
+ class="nav-btn grow-on-mobile"
10
+ align="center"
11
+ :active="active"
6
12
  >
7
- <e-btn
8
- :active="active"
9
- class="button fullwidth"
10
- :inactive="inactive"
11
- :solid="false"
12
- background="transparent"
13
- :class="{ responsive }"
14
- >
15
- <div class="content">
16
- <div
17
- v-if="icon"
18
- class="icon-wrapper flex-center"
19
- :class="{ 'mr-2': label, 'mx-4': !label }"
13
+ <div class="content">
14
+ <div
15
+ v-if="icon"
16
+ class="icon-wrapper flex-center mr-2"
17
+ >
18
+ <e-icon
19
+ class="icon"
20
+ size="20"
21
+ :fill="active"
20
22
  >
21
- <e-icon
22
-
23
- class="icon"
24
- :size="size"
25
- >
26
- {{ icon }}
27
- </e-icon>
28
- <transition name="fade">
29
- <div
30
- v-if="alert"
31
- class="icon-alert"
32
- />
33
- </transition>
34
- </div>
35
- <p v-if="label">
36
- {{ label }}
37
- </p>
23
+ {{ icon }}
24
+ </e-icon>
25
+ <transition name="fade">
26
+ <div
27
+ v-if="alert"
28
+ class="icon-alert"
29
+ />
30
+ </transition>
38
31
  </div>
32
+ <p v-if="label">
33
+ {{ label }}
34
+ </p>
39
35
  <slot />
40
- </e-btn>
41
- </e-undecorated-link>
42
- </div>
36
+ </div>
37
+ </e-btn>
38
+ </e-undecorated-link>
43
39
  </template>
44
40
  <script setup lang="ts">
45
41
  import { useRoute } from "vue-router";
@@ -50,55 +46,47 @@ const props = withDefaults(
50
46
  to?: string;
51
47
  label?: string;
52
48
  icon?: string;
53
- size?: string;
54
- responsive?: boolean;
55
49
  alert?: boolean;
56
50
  }>(),
57
- { to: "", label: "", icon: "", responsive: true, size: "20" }
51
+ { to: "", label: "", icon: "" }
58
52
  );
59
53
 
60
54
  const route = useRoute();
61
55
 
62
- const aspect = computed(() => {
63
- if (props.icon) {
64
- return "3/2";
65
- }
66
56
 
67
- return "unset";
68
- });
69
57
 
70
58
  const active = computed(() => {
71
59
  return route && route.path === props.to;
72
60
  });
73
- const inactive = computed(() => {
74
- return !active.value && Boolean(props.icon);
75
- });
61
+
76
62
  </script>
77
63
 
78
64
  <style scoped lang="scss">
65
+ /*a.router-link-active > .nav-btn {
66
+ color:var(--e-color-primary) !important;
67
+ background-color: rgba(var(--e-color-primary-rgb), 0.075);
68
+ }*/
79
69
 
80
- .nav-btn{
81
- flex-grow: 1;
82
- }
83
- .button:first-child {
84
- aspect-ratio: unset;
85
70
 
86
- .content {
87
- display: flex;
88
71
 
89
- flex-direction: row;
72
+ .content {
73
+ display: flex;
74
+ flex-direction: row;
75
+ justify-content: center;
76
+ align-content: center;
77
+ justify-items: center;
78
+ align-items: center;
90
79
 
91
- justify-content: center;
92
- align-content: center;
93
- justify-items: center;
94
- align-items: center;
80
+ p {
81
+ margin: 0;
82
+ padding: 0;
83
+ white-space: nowrap;
95
84
 
96
- .icon {
97
- font-size: 1.5rem;
98
- }
99
85
  }
86
+
100
87
  }
101
88
 
89
+
102
90
  .icon-wrapper {
103
91
  position: relative;
104
92
  box-sizing: border-box;
@@ -114,26 +102,31 @@ const inactive = computed(() => {
114
102
  border-radius: 100%;
115
103
  bottom: 0.1rem;
116
104
  right: 0px;
117
- background-color: var(--t-color-primary);
118
- outline: 0.1rem solid var(--t-elev-2);
105
+ background-color: var(--e-color-primary);
106
+ outline: 0.1rem solid var(--e-color-elev);
119
107
  }
120
108
  }
121
109
 
122
- @media screen and (max-width: $e-md-screen-breakpoint) {
123
- .button.responsive {
124
- aspect-ratio: v-bind(aspect);
125
110
 
126
- p {
127
- margin: 0px;
128
- white-space: nowrap;
129
- }
111
+ @media screen and (max-width: exakt.$e-md-screen-breakpoint) {
112
+
113
+ .grow-on-mobile {
114
+ flex-grow: 1;
115
+ width: 100%;
116
+ }
130
117
 
131
- .content {
132
- flex-direction: column;
118
+ p {
119
+ margin: 0px;
120
+ white-space: nowrap;
121
+ font-size: small;
122
+
123
+ }
124
+
125
+ .content {
126
+ flex-direction: column;
133
127
 
134
- .icon-wrapper {
135
- margin-right: 0rem;
136
- }
128
+ .icon-wrapper {
129
+ margin-right: 0rem;
137
130
  }
138
131
  }
139
132
  }
@@ -65,7 +65,7 @@
65
65
  </div>
66
66
  </template>
67
67
  <script setup lang="ts">
68
- import { computed, reactive } from "#imports";
68
+ import { computed } from "#imports";
69
69
  const props = withDefaults(
70
70
  defineProps<{
71
71
  collapsedWidth?: number | string;
@@ -91,9 +91,7 @@ const props = withDefaults(
91
91
  nestingLevel: 0,
92
92
  }
93
93
  );
94
- const state = reactive({
95
- hover: false,
96
- });
94
+
97
95
 
98
96
  const background = computed(() =>
99
97
  Number(props.elev) == 1
@@ -1,16 +1,26 @@
1
1
 
2
2
 
3
3
  <template>
4
- <div class="titlebar d-flex flex-align-center bg-elev-2">
5
- <h4>Title</h4>
6
- </div>
4
+ <header class="d-flex flex-align-center">
5
+ <h1><slot /></h1>
6
+ </header>
7
7
  </template>
8
8
  <style lang="scss" scoped>
9
- .titlebar{
9
+ header{
10
10
  position: sticky;
11
11
  top:0;
12
12
  left:0;
13
13
  height:3.5rem;
14
- padding-left: 3.5rem;
14
+ font-size: 0.75rem;
15
+ }
16
+
17
+ @media screen and (max-width: exakt.$e-md-screen-breakpoint) {
18
+ header {
19
+ position: fixed;
20
+ font-size: 0.5rem;
21
+ border-radius: 0;
22
+ width: 100%;
23
+ background: var(--e-color-elev);
24
+ }
15
25
  }
16
26
  </style>
@@ -1,3 +1,29 @@
1
+ /* CSS Reset */
2
+
3
+ html, body, div, span, applet, object, iframe,
4
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
5
+ a, abbr, acronym, address, big, cite, code,
6
+ del, dfn, em, img, ins, kbd, q, s, samp,
7
+ small, strike, strong, sub, sup, tt, var,
8
+ b, u, i, center,
9
+ dl, dt, dd, ol, ul, li,
10
+ fieldset, form, label, legend,
11
+ table, caption, tbody, tfoot, thead, tr, th, td,
12
+ article, aside, canvas, details, embed,
13
+ figure, figcaption, footer, header, hgroup,
14
+ menu, nav, output, ruby, section, summary,
15
+ time, mark, audio, video {
16
+ margin: 0;
17
+ padding: 0;
18
+ border: 0;
19
+ vertical-align: baseline;
20
+ box-sizing: border-box;
21
+ }
22
+
23
+ $margin-step: 0.2rem;
24
+
25
+
26
+
1
27
  /* This is very much a hack, but it will have to do for now */
2
28
 
3
29
  .rounded {
@@ -46,7 +72,7 @@ a {
46
72
  :root {
47
73
  @each $name, $color in $color-map {
48
74
  #{'--e-color-'+$name}: $color;
49
- #{'--e-color-'+$name+'-rgb'}: red($color), green($color), blue($color);
75
+ #{'--e-color-'+$name+'-rgb'}: color.channel($color, "red", $space: rgb), color.channel($color, "green", $space: rgb), color.channel($color, "blue", $space: rgb);
50
76
 
51
77
  }
52
78
  }
@@ -55,12 +81,12 @@ a {
55
81
  .bg-#{$name} {
56
82
  background: $color;
57
83
 
58
- @if (color.lightness($color) > 49%) {
59
- color: map.get($root-colors-light, "text");
84
+ @if (color.channel($color, "lightness", $space: hsl) > 49%) {
85
+ color: map.get(exakt.$root-colors-light, "text");
60
86
  }
61
87
 
62
88
  @else {
63
- color: map.get($root-colors-dark, "text");
89
+ color: map.get(exakt.$root-colors-dark, "text");
64
90
  }
65
91
  }
66
92
 
@@ -70,10 +96,10 @@ a {
70
96
  }
71
97
  }
72
98
 
73
- @mixin elev($lightness, $light, $color-map) {
99
+ @mixin elev($lightness, $contrast, $light, $color-map) {
74
100
 
75
- $source: hsl($root-hue, 15%, $lightness);
76
- $source-i: color.change($source, $saturation: 20%);
101
+ $source: hsl(exakt.$root-hue, 8%, $lightness);
102
+ $source-i: color.change($source, $saturation: 12%);
77
103
 
78
104
  $full: 0;
79
105
  $factor: 1;
@@ -82,6 +108,7 @@ a {
82
108
  $full: 100;
83
109
  $factor: -1;
84
110
  }
111
+ $color-map: map.set($color-map, "source", $source);
85
112
 
86
113
  $color-map: map.set($color-map, "i-depressed", color.adjust($source-i, $lightness: -2.5%));
87
114
  $color-map: map.set($color-map, "i-depressed-2", color.adjust($source-i, $lightness: -7.5%));
@@ -90,17 +117,18 @@ a {
90
117
 
91
118
  $color-map: map.set($color-map, "i-inactive", color.adjust($source-i, $lightness: 10%));
92
119
  $color-map: map.set($color-map, "i", color.adjust($source-i, $lightness: 20%));
93
- $color-map: map.set($color-map, "i-active", color.change(map.get($color-map, "primary"), $lightness: 30%));
120
+ $color-map: map.set($color-map, "i-active", color.scale(map.get($color-map, "i"), $saturation: 20%));
94
121
 
95
- $color-map: map.set($color-map, "i-outline", color.change($source-i, $lightness: $full + $factor*30%, $saturation: 20%));
122
+ $color-map: map.set($color-map, "i-outline", color.change($source-i, $lightness: $full + $factor*30%));
96
123
 
97
- $color-map: map.set($color-map, "bg", color.adjust($source, $lightness: -2%));
124
+ $color-map: map.set($color-map, "bg", $source);
98
125
  $color-map: map.set($color-map, "fg", color.adjust($source, $lightness: 2%));
99
126
 
100
127
 
101
- $color-map: map.set($color-map, "elev", color.scale($source, $lightness: $lightness));
102
- $color-map: map.set($color-map, "elev-2", color.scale($source, $lightness: $lightness));
103
- $color-map: map.set($color-map, "elev-3", color.scale($source, $lightness: $lightness));
128
+ $color-map: map.set($color-map, "elev", color.scale(map.get($color-map, "fg"), $lightness: $lightness*0.25));
129
+ $color-map: map.set($color-map, "elev-2", color.scale(map.get($color-map, "fg"), $lightness: $lightness*0.5));
130
+ $color-map: map.set($color-map, "elev-3", color.scale(map.get($color-map, "fg"), $lightness: $lightness));
131
+
104
132
 
105
133
 
106
134
 
@@ -116,7 +144,7 @@ a {
116
144
  color-scheme: light;
117
145
  }
118
146
 
119
- @include elev(83%, 1, $root-colors-light);
147
+ @include elev(95%,1, 1, exakt.$root-colors-light);
120
148
 
121
149
 
122
150
  @media (prefers-color-scheme: dark) {
@@ -124,7 +152,7 @@ a {
124
152
  color-scheme: dark;
125
153
  }
126
154
 
127
- @include elev(15%, 0, $root-colors-dark);
155
+ @include elev(8%,1,0, exakt.$root-colors-dark);
128
156
 
129
157
 
130
158
  }
@@ -158,11 +158,38 @@ body {
158
158
  width: 100%;
159
159
  }
160
160
 
161
+
162
+ @media screen and (min-width: (exakt.$e-md-screen-breakpoint)) {
163
+ .md-and-under {
164
+ display: none !important;
165
+
166
+ }
167
+ }
168
+
169
+ .flex-wrap {
170
+ flex-wrap: wrap;
171
+ }
172
+
173
+ @media screen and (max-width: (exakt.$e-md-screen-breakpoint)) {
174
+ .md-and-over {
175
+ display: none !important;
176
+
177
+ }
178
+ }
179
+
161
180
  .fullsize {
162
181
  @extend .fullheight;
163
182
  @extend .fullwidth;
164
183
  }
165
184
 
185
+ .text-left {
186
+ text-align: left;
187
+ }
188
+
189
+ .text-right {
190
+ text-align: right;
191
+ }
192
+
166
193
  .text-center {
167
194
  text-align: center;
168
195
  }
@@ -1,3 +1,2 @@
1
- import 'material-symbols';
2
1
  declare const _default: any;
3
2
  export default _default;
@@ -1,5 +1,4 @@
1
1
  import { defineNuxtPlugin } from "#app";
2
- import "material-symbols";
3
2
  export default defineNuxtPlugin(() => {
4
3
  return {
5
4
  provide: {
@@ -34,7 +33,8 @@ export default defineNuxtPlugin(() => {
34
33
  }
35
34
  return p;
36
35
  },
37
- rootColors: ["primary", "red", "text", "yellow", "elev"],
36
+ rootColors: ["primary", "red", "text", "yellow", "elev", "i"],
37
+ isRootColor: (c) => ["primary", "red", "text", "yellow", "elev", "i"].includes(c),
38
38
  /**
39
39
  * Generates an alphanumeric ID of a given length.
40
40
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exakt/ui",
3
- "version": "0.0.55",
3
+ "version": "0.0.58",
4
4
  "description": "A UI library for Nuxt.js",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,7 +27,6 @@
27
27
  "test:watch": "vitest watch"
28
28
  },
29
29
  "dependencies": {
30
- "@nuxt/kit": "^3.2.3",
31
30
  "blurhash": "^2.0.5",
32
31
  "lodash-es": "^4.17.21",
33
32
  "material-symbols": "latest",
@@ -35,8 +34,9 @@
35
34
  },
36
35
  "devDependencies": {
37
36
  "@nuxt/eslint-config": "^0.1.1",
37
+ "@nuxt/kit": "latest",
38
38
  "@nuxt/module-builder": "^0.2.1",
39
- "@nuxt/schema": "^3.2.3",
39
+ "@nuxt/schema": "latest",
40
40
  "@nuxt/test-utils": "^3.2.3",
41
41
  "@types/lodash": "^4.14.191",
42
42
  "@types/lodash-es": "^4.17.9",
@@ -45,7 +45,7 @@
45
45
  "eslint": "^8.35.0",
46
46
  "eslint-plugin-unused-imports": "^3.0.0",
47
47
  "mkdist": "^1.2.0",
48
- "nuxt": "^3.12.4",
48
+ "nuxt": "latest",
49
49
  "vitest": "^0.29.2"
50
50
  },
51
51
  "directories": {