@hostlink/nuxt-light 1.39.0 → 1.40.1

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.39.0",
4
+ "version": "1.40.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.1",
7
7
  "unbuild": "3.5.0"
package/dist/module.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineNuxtModule, createResolver, extendPages, installModule, addComponentsDir, addImportsDir, resolveFiles, addPlugin } from '@nuxt/kit';
1
+ import { defineNuxtModule, createResolver, extendPages, addComponentsDir, addImportsDir, resolveFiles, addPlugin } from '@nuxt/kit';
2
2
 
3
3
  const routes = [
4
4
  {
@@ -254,8 +254,46 @@ const module = defineNuxtModule({
254
254
  name: "light",
255
255
  configKey: "light"
256
256
  },
257
- // Default configuration options of the Nuxt module
258
- defaults: {},
257
+ moduleDependencies: {
258
+ "nuxt-quasar-ui": {
259
+ defaults: {
260
+ config: {
261
+ brand: {
262
+ primary: "#7367f0",
263
+ secondary: "#82868b",
264
+ accent: "#9C27B0",
265
+ dark: "#4b4b4b",
266
+ darkPage: "#121212",
267
+ positive: "#28c76f",
268
+ negative: "#ea5455",
269
+ info: "#00cfe8",
270
+ warning: "#ff9f43"
271
+ }
272
+ },
273
+ components: {
274
+ defaults: {
275
+ QInput: {
276
+ stackLabel: true
277
+ },
278
+ QSelect: {
279
+ stackLabel: true
280
+ },
281
+ QCard: {
282
+ flat: true,
283
+ bordered: true
284
+ },
285
+ QTable: {
286
+ dense: true,
287
+ flat: true,
288
+ bordered: true,
289
+ separator: "cell"
290
+ }
291
+ }
292
+ },
293
+ plugins: ["Dialog", "Loading", "LoadingBar", "Notify", "AppFullscreen"]
294
+ }
295
+ }
296
+ },
259
297
  /* hooks: {
260
298
  async 'pages:extend'(pages) {
261
299
  pages.push(...routes);
@@ -286,42 +324,6 @@ const module = defineNuxtModule({
286
324
  });
287
325
  }
288
326
  });
289
- await installModule("nuxt-quasar-ui", {
290
- config: {
291
- brand: {
292
- primary: "#7367f0",
293
- secondary: "#82868b",
294
- accent: "#9C27B0",
295
- dark: "#4b4b4b",
296
- darkPage: "#121212",
297
- positive: "#28c76f",
298
- negative: "#ea5455",
299
- info: "#00cfe8",
300
- warning: "#ff9f43"
301
- }
302
- },
303
- components: {
304
- defaults: {
305
- QInput: {
306
- stackLabel: true
307
- },
308
- QSelect: {
309
- stackLabel: true
310
- },
311
- QCard: {
312
- flat: true,
313
- bordered: true
314
- },
315
- QTable: {
316
- dense: true,
317
- flat: true,
318
- bordered: true,
319
- separator: "cell"
320
- }
321
- }
322
- },
323
- plugins: ["Dialog", "Loading", "LoadingBar", "Notify", "AppFullscreen"]
324
- });
325
327
  nuxt.options.imports = nuxt.options.imports || {};
326
328
  nuxt.options.imports.presets = nuxt.options.imports.presets || [];
327
329
  nuxt.options.imports.presets.push({ from: "quasar", imports: ["useQuasar"] });
@@ -1 +1 @@
1
- body{font-family:Noto Sans,Noto Sans HK,Noto Sans TC,-apple-system,Helvetica Neue,Helvetica,Arial,sans-serif}.q-card__actions .q-btn--rectangle{padding:4px 16px}.q-table--dense .q-table td,.q-table--dense .q-table td:first-child,.q-table--dense .q-table th,.q-table--dense .q-table th:first-child{padding:2px 4px}.q-tab-panel{padding:8px}::-webkit-scrollbar{background:transparent;height:12px;overflow:visible;width:14px;z-index:12}::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#c1c1c1;border:4px solid transparent;border-radius:10px;margin:4px;min-height:32px;min-width:32px;-webkit-transition:background-color .32s ease-in-out;transition:background-color .32s ease-in-out;width:10px;z-index:12}::-webkit-scrollbar-thumb:hover{background:#c1c1c1}
1
+ body{font-family:Noto Sans,Noto Sans HK,Noto Sans TC,-apple-system,Helvetica Neue,Helvetica,Arial,sans-serif}.q-field--dense .q-field__before,.q-field--dense .q-field__prepend{padding-right:5px}.q-field--dense .q-field__after,.q-field--dense .q-field__append{padding-left:5px}.q-field--outlined .q-field__control{padding:0 10px}.q-field__before,.q-field__prepend{padding-right:10px}.q-field--filled .q-field__control{padding:0 10px}.q-card__actions .q-btn--rectangle{padding:4px 16px}.q-table--dense .q-table td,.q-table--dense .q-table td:first-child,.q-table--dense .q-table th,.q-table--dense .q-table th:first-child{padding:2px 4px}.q-tab-panel{padding:8px}::-webkit-scrollbar{background:transparent;height:12px;overflow:visible;width:14px;z-index:12}::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:#c1c1c1;border:4px solid transparent;border-radius:10px;margin:4px;min-height:32px;min-width:32px;-webkit-transition:background-color .32s ease-in-out;transition:background-color .32s ease-in-out;width:10px;z-index:12}::-webkit-scrollbar-thumb:hover{background:#c1c1c1}
@@ -23,7 +23,10 @@ const onSubmit = async (d) => {
23
23
 
24
24
  <form-kit label="Password based" type="l-checkbox" name="authentication_password_based" true-value="1"
25
25
  false-value="0" />
26
- <q-separator />
26
+
27
+ <div class="col-12">
28
+ <q-separator />
29
+ </div>
27
30
 
28
31
  <form-kit label="Google Client ID" type="l-input" name="authentication_google_client_id" />
29
32
 
@@ -14,7 +14,7 @@ const onSubmit = async (d) => {
14
14
  </script>
15
15
 
16
16
  <template>
17
- <form-kit type="l-form" :value="{
17
+ <form-kit :bordered="false" type="l-form" :value="{
18
18
  forget_password_enabled: processedEnabled,
19
19
  forget_password_subject: processedSubject,
20
20
  forget_password_template: processedTemplate
@@ -7,8 +7,9 @@ defineProps({
7
7
 
8
8
  <template>
9
9
  <form-kit type="l-form" :bordered="false" :value="$props" @submit="$emit('submit', $event)">
10
- <l-field :label="$t('File Manager')" stack-label :color="$light.color" hide-bottom-space>
10
+ <l-field :label="$t('File Manager')" stack-label :color="$light.color" hide-bottom-space class="col-6">
11
11
  <form-kit type="l-checkbox" label="Show" name="file_manager" true-value="1" false-value="0" />
12
12
  </l-field>
13
+
13
14
  </form-kit>
14
15
  </template>
@@ -81,11 +81,8 @@ const onSubmit = (e) => {
81
81
  <template>
82
82
  <q-form ref="form" @submit="onSubmit">
83
83
  <l-card :bordered="bordered">
84
- <q-card-section>
85
- <div :class="`q-gutter-${gutter}`">
86
- <slot></slot>
87
- </div>
88
-
84
+ <q-card-section class="row q-col-gutter-md">
85
+ <slot></slot>
89
86
  </q-card-section>
90
87
 
91
88
  <q-card-actions align="right">
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { computed, ref } from "vue";
2
+ import { computed, ref, useAttrs } from "vue";
3
3
  import { useI18n } from "vue-i18n";
4
4
  import tc2sc from "../composables/tc2sc";
5
5
  const { t } = useI18n();
@@ -136,10 +136,17 @@ const localShowPassword = computed(() => {
136
136
  const onClickTc2Sc = () => {
137
137
  modelValue.value = tc2sc(modelValue.value ?? "");
138
138
  };
139
+ const attrs = useAttrs();
140
+ const localClass = computed(() => {
141
+ if (attrs.class) {
142
+ return attrs.class;
143
+ }
144
+ return "col-12";
145
+ });
139
146
  </script>
140
147
 
141
148
  <template>
142
- <q-input v-bind="$light.getInputProps($props)" :rules="new_rules" :type="localType">
149
+ <q-input v-bind="$light.getInputProps($props)" :rules="new_rules" :type="localType" :class="localClass">
143
150
  <template v-if="translate" #prepend>
144
151
  <q-btn icon="sym_o_translate" flat dense rounded>
145
152
  <q-menu dense>
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { ref } from "vue";
2
+ import { ref, useAttrs, computed } from "vue";
3
3
  const props = defineProps({
4
4
  name: { type: null, required: false },
5
5
  virtualScrollHorizontal: { type: Boolean, required: false, skipCheck: true },
@@ -150,8 +150,15 @@ const filterFn = (val, update, abort) => {
150
150
  });
151
151
  });
152
152
  };
153
+ const attrs = useAttrs();
154
+ const localClass = computed(() => {
155
+ if (attrs.class) {
156
+ return attrs.class;
157
+ }
158
+ return "col-12";
159
+ });
153
160
  </script>
154
161
 
155
162
  <template>
156
- <q-select v-bind="$light.getInputProps($props)" :options="select_options" @filter="filterFn" />
163
+ <q-select v-bind="$light.getInputProps($props)" :options="select_options" @filter="filterFn" :class="localClass" />
157
164
  </template>
@@ -77,10 +77,8 @@ const isNoDirtyCheck = computed(() => {
77
77
  <template>
78
78
  <form v-bind="context.attrs">
79
79
  <l-card :bordered="bordered">
80
- <q-card-section>
81
- <div :class="`q-gutter-${gutter}`">
82
- <slot v-bind="context"></slot>
83
- </div>
80
+ <q-card-section class="row q-col-gutter-md">
81
+ <slot v-bind="context"></slot>
84
82
  </q-card-section>
85
83
 
86
84
  <q-card-actions align="right" v-if="context.actions">
@@ -24,9 +24,9 @@ const onSave = async () => {
24
24
 
25
25
  <template>
26
26
  <l-page>
27
- <l-form @save="onSave">
27
+ <l-form @submit="onSave">
28
28
 
29
- <l-input label="Permission name" v-model="obj.value" required></l-input>
29
+ <l-input label="Permission name" v-model="obj.value" required class="col-12"></l-input>
30
30
 
31
31
  <l-field label="Roles" stack-label>
32
32
  <q-option-group type="checkbox" :options="roles" v-model="obj.roles" inline :color="$light.color">
@@ -52,7 +52,7 @@ const languages = tt.app.languages.map((lang) => {
52
52
  <l-page>
53
53
 
54
54
  <FormKit type="l-form" :value="obj">
55
- <l-row>
55
+ <l-row class="col">
56
56
  <l-col md="6">
57
57
  <FormKit type="l-input" label="Username" name="username" validation="required" />
58
58
  <FormKit type="l-input" label="Password" name="password" :validation="system.passwordPolicy"
@@ -84,73 +84,69 @@ const inputDesign = computed({
84
84
  <div class="q-pa-md">
85
85
  <l-row>
86
86
  <l-col md="6">
87
- <l-form @save="onSave" :bordered="false" class="q-ma-none">
88
- <l-card title="Table" minimizable>
89
- <q-card-section>
90
- <q-toggle v-model="styles.table.dense" label="Dense" :color="$light.color" />
91
- <q-toggle v-model="styles.table.flat" label="Flat" :color="$light.color" />
92
- <q-toggle v-model="styles.table.bordered" label="Bordered" :color="$light.color" />
93
- <q-toggle v-model="styles.table.square" label="Square" :color="$light.color" />
94
-
95
- <q-field :label="`Separator`" stack-label :color="$light.color">
96
- <q-option-group v-model="styles.table.separator" inline :options="[
97
- { label: 'Horizontal', value: 'horizontal' },
98
- { label: 'Vertical', value: 'vertical' },
99
- { label: 'Cell', value: 'cell' },
100
- { label: 'None', value: 'none' },
101
- ]" :color="$light.color" />
102
- </q-field>
103
-
104
- </q-card-section>
105
- </l-card>
106
-
107
- <l-card title="Card" minimizable>
108
- <q-card-section>
109
- <q-toggle v-model="styles.card.flat" label="Flat" :color="$light.color" />
110
- <q-toggle v-model="styles.card.bordered" label="Bordered" :color="$light.color" />
111
- <q-toggle v-model="styles.card.square" label="Square" :color="$light.color" />
112
- </q-card-section>
113
- </l-card>
114
-
115
- <l-card title="Button" minimizable>
116
- <q-card-section>
117
- <q-toggle v-model="styles.button.outline" label="Outline" :color="$light.color" />
118
- <q-toggle v-model="styles.button.flat" label="Flat" :color="$light.color" />
119
- <q-toggle v-model="styles.button.unelevated" label="Unelevated" :color="$light.color" />
120
- <q-toggle v-model="styles.button.rounded" label="Rounded" :color="$light.color" />
121
- <q-toggle v-model="styles.button.push" label="Push" :color="$light.color" />
122
- <q-toggle v-model="styles.button.square" label="Square" :color="$light.color" />
123
- <q-toggle v-model="styles.button.glossy" label="Glossy" :color="$light.color" />
124
- <q-toggle v-model="styles.button.dense" label="Dense" :color="$light.color" />
125
-
126
- </q-card-section>
127
- </l-card>
128
-
129
- <l-card title="Input" minimizable>
130
- <q-card-section>
131
-
132
- <q-option-group v-model="inputDesign" inline :options="[
87
+ <l-card title="Table" minimizable class="col-12">
88
+ <q-card-section>
89
+ <q-toggle v-model="styles.table.dense" label="Dense" :color="$light.color" />
90
+ <q-toggle v-model="styles.table.flat" label="Flat" :color="$light.color" />
91
+ <q-toggle v-model="styles.table.bordered" label="Bordered" :color="$light.color" />
92
+ <q-toggle v-model="styles.table.square" label="Square" :color="$light.color" />
93
+
94
+ <q-field :label="`Separator`" stack-label :color="$light.color">
95
+ <q-option-group v-model="styles.table.separator" inline :options="[
96
+ { label: 'Horizontal', value: 'horizontal' },
97
+ { label: 'Vertical', value: 'vertical' },
98
+ { label: 'Cell', value: 'cell' },
133
99
  { label: 'None', value: 'none' },
134
- { label: 'Filled', value: 'filled' },
135
- { label: 'Outlined', value: 'outlined' },
136
- { label: 'Standout', value: 'standout' },
137
- { label: 'Borderless', value: 'borderless' },
138
100
  ]" :color="$light.color" />
101
+ </q-field>
139
102
 
103
+ </q-card-section>
104
+ </l-card>
105
+
106
+ <l-card title="Card" minimizable>
107
+ <q-card-section>
108
+ <q-toggle v-model="styles.card.flat" label="Flat" :color="$light.color" />
109
+ <q-toggle v-model="styles.card.bordered" label="Bordered" :color="$light.color" />
110
+ <q-toggle v-model="styles.card.square" label="Square" :color="$light.color" />
111
+ </q-card-section>
112
+ </l-card>
113
+
114
+ <l-card title="Button" minimizable>
115
+ <q-card-section>
116
+ <q-toggle v-model="styles.button.outline" label="Outline" :color="$light.color" />
117
+ <q-toggle v-model="styles.button.flat" label="Flat" :color="$light.color" />
118
+ <q-toggle v-model="styles.button.unelevated" label="Unelevated" :color="$light.color" />
119
+ <q-toggle v-model="styles.button.rounded" label="Rounded" :color="$light.color" />
120
+ <q-toggle v-model="styles.button.push" label="Push" :color="$light.color" />
121
+ <q-toggle v-model="styles.button.square" label="Square" :color="$light.color" />
122
+ <q-toggle v-model="styles.button.glossy" label="Glossy" :color="$light.color" />
123
+ <q-toggle v-model="styles.button.dense" label="Dense" :color="$light.color" />
140
124
 
125
+ </q-card-section>
126
+ </l-card>
127
+
128
+ <l-card title="Input" minimizable>
129
+ <q-card-section>
141
130
 
142
- <q-toggle v-model="styles.input.rounded" label="Rounded" :color="$light.color" />
143
- <q-toggle v-model="styles.input.dense" label="Dense" :color="$light.color" />
144
- <q-toggle v-model="styles.input.square" label="Square" :color="$light.color" />
145
- <q-toggle v-model="styles.input.stackLabel" label="Stack label" :color="$light.color" />
146
- </q-card-section>
147
- </l-card>
131
+ <q-option-group v-model="inputDesign" inline :options="[
132
+ { label: 'None', value: 'none' },
133
+ { label: 'Filled', value: 'filled' },
134
+ { label: 'Outlined', value: 'outlined' },
135
+ { label: 'Standout', value: 'standout' },
136
+ { label: 'Borderless', value: 'borderless' },
137
+ ]" :color="$light.color" />
148
138
 
149
- <l-btn @click="setDefault()" icon="sym_o_refresh" label="Default"></l-btn>
150
139
 
151
140
 
141
+ <q-toggle v-model="styles.input.rounded" label="Rounded" :color="$light.color" />
142
+ <q-toggle v-model="styles.input.dense" label="Dense" :color="$light.color" />
143
+ <q-toggle v-model="styles.input.square" label="Square" :color="$light.color" />
144
+ <q-toggle v-model="styles.input.stackLabel" label="Stack label" :color="$light.color" />
145
+ </q-card-section>
146
+ </l-card>
152
147
 
153
- </l-form>
148
+ <l-btn @click="setDefault()" icon="sym_o_refresh" label="Default"></l-btn>
149
+ <l-btn icon="sym_o_save" label="Save" @click="onSave" />
154
150
  </l-col>
155
151
 
156
152
  <l-col md="6">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.39.0",
3
+ "version": "1.40.1",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",