nuxt-hs-ui 2.0.19 → 2.0.21
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 +1 -1
- package/dist/runtime/components/form/check-list.vue +14 -2
- package/dist/runtime/components/form/datepicker.vue +28 -17
- package/dist/runtime/components/form/radio.vue +22 -2
- package/dist/runtime/components/form/select.vue +16 -0
- package/dist/runtime/components/form/text-box.vue +8 -4
- package/dist/runtime/components/form/value-box.vue +14 -0
- package/dist/runtime/components/layout/divider-h.vue +57 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -123,7 +123,13 @@ type Emits = {
|
|
|
123
123
|
"value-change": [after: number[], before: number[], id: number];
|
|
124
124
|
};
|
|
125
125
|
const emit = defineEmits<Emits>();
|
|
126
|
-
|
|
126
|
+
// ----------------------------------------------------------------------------
|
|
127
|
+
const slots = defineSlots<{
|
|
128
|
+
default(props: { msg: string }): any;
|
|
129
|
+
overlay?(): any;
|
|
130
|
+
"right-icons"?(): any;
|
|
131
|
+
"left-icons"?(): any;
|
|
132
|
+
}>();
|
|
127
133
|
// ----------------------------------------------------------------------------
|
|
128
134
|
|
|
129
135
|
// [ 選択肢配列 ]
|
|
@@ -313,7 +319,13 @@ const itemClass = computed(() => {
|
|
|
313
319
|
:warn-time-out="props.warnTimeOut"
|
|
314
320
|
:size="props.size"
|
|
315
321
|
>
|
|
316
|
-
<template v-if="
|
|
322
|
+
<template v-if="slots['left-icons']" #left-icons>
|
|
323
|
+
<slot name="left-icons" :disabled="disabled" />
|
|
324
|
+
</template>
|
|
325
|
+
<template v-if="slots['right-icons']" #right-icons>
|
|
326
|
+
<slot name="right-icons" :disabled="disabled" />
|
|
327
|
+
</template>
|
|
328
|
+
<template v-if="slots.overlay" #overlay>
|
|
317
329
|
<slot name="overlay"></slot>
|
|
318
330
|
</template>
|
|
319
331
|
<div class="nac-input-box" @mousedown.stop="" @mouseup.stop="">
|
|
@@ -171,6 +171,13 @@ type Emits = {
|
|
|
171
171
|
};
|
|
172
172
|
const emit = defineEmits<Emits>();
|
|
173
173
|
// ----------------------------------------------------------------------------
|
|
174
|
+
const slots = defineSlots<{
|
|
175
|
+
default(props: { msg: string }): any;
|
|
176
|
+
overlay?(): any;
|
|
177
|
+
"right-icons"?(): any;
|
|
178
|
+
"left-icons"?(): any;
|
|
179
|
+
}>();
|
|
180
|
+
// ----------------------------------------------------------------------------
|
|
174
181
|
// ----------------------------------------------------------------------------
|
|
175
182
|
// [ getCurrentInstance ]
|
|
176
183
|
const uid = useId();
|
|
@@ -733,15 +740,19 @@ const computedIsFocusOpenBtn = computed(() => {
|
|
|
733
740
|
:warn-time-out="props.warnTimeOut"
|
|
734
741
|
:size="props.size"
|
|
735
742
|
>
|
|
736
|
-
<template v-if="
|
|
743
|
+
<template v-if="slots.overlay" #overlay>
|
|
744
|
+
<slot name="overlay"></slot>
|
|
745
|
+
</template>
|
|
746
|
+
<template v-if="!props.readonly" #left-icons>
|
|
747
|
+
<slot name="left-icons" :disabled="disabled" />
|
|
737
748
|
<button
|
|
738
749
|
ref="openBtn"
|
|
739
750
|
data-sep="right"
|
|
740
751
|
data-icon="calendar"
|
|
741
752
|
:tabindex="tabindex"
|
|
742
|
-
:disabled="
|
|
753
|
+
:disabled="disabled"
|
|
743
754
|
:class="
|
|
744
|
-
!
|
|
755
|
+
!disabled
|
|
745
756
|
? 'cursor-pointer hover:bg-accent1/[0.1] active:bg-accent1/[0.2]'
|
|
746
757
|
: ''
|
|
747
758
|
"
|
|
@@ -821,20 +832,20 @@ const computedIsFocusOpenBtn = computed(() => {
|
|
|
821
832
|
{{ props.mode === "month" ? "Now" : "Today" }}
|
|
822
833
|
</span>
|
|
823
834
|
</div>
|
|
824
|
-
<template
|
|
825
|
-
v-if="!props.hideDeleteBtn && !props.readonly"
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
835
|
+
<template v-if="slots['right-icons']" #right-icons>
|
|
836
|
+
<template v-if="!props.hideDeleteBtn && !props.readonly">
|
|
837
|
+
<div
|
|
838
|
+
:class="
|
|
839
|
+
!disabled
|
|
840
|
+
? 'text-error cursor-pointer hover:bg-error/[0.1] active:bg-error/[0.2]'
|
|
841
|
+
: ''
|
|
842
|
+
"
|
|
843
|
+
@click="iconEventDelete()"
|
|
844
|
+
>
|
|
845
|
+
<i class="fa-solid fa-delete-left"></i>
|
|
846
|
+
</div>
|
|
847
|
+
</template>
|
|
848
|
+
<slot name="right-icons" :disabled="disabled" />
|
|
838
849
|
</template>
|
|
839
850
|
</InputFrame>
|
|
840
851
|
</template>
|
|
@@ -130,6 +130,13 @@ type Emits = {
|
|
|
130
130
|
};
|
|
131
131
|
const emit = defineEmits<Emits>();
|
|
132
132
|
// ----------------------------------------------------------------------------
|
|
133
|
+
const slots = defineSlots<{
|
|
134
|
+
default(props: { msg: string }): any;
|
|
135
|
+
overlay?(): any;
|
|
136
|
+
"right-icons"?(): any;
|
|
137
|
+
"left-icons"?(): any;
|
|
138
|
+
}>();
|
|
139
|
+
// ----------------------------------------------------------------------------
|
|
133
140
|
// [ getCurrentInstance ]
|
|
134
141
|
const uid = useId();
|
|
135
142
|
// ----------------------------------------------------------------------------
|
|
@@ -380,6 +387,15 @@ const inputClass = computed(() => {
|
|
|
380
387
|
:warn-time-out="props.warnTimeOut"
|
|
381
388
|
:size="props.size"
|
|
382
389
|
>
|
|
390
|
+
<template v-if="slots['left-icons']" #left-icons>
|
|
391
|
+
<slot name="left-icons" :disabled="disabled" />
|
|
392
|
+
</template>
|
|
393
|
+
<template v-if="slots['right-icons']" #right-icons>
|
|
394
|
+
<slot name="right-icons" :disabled="disabled" />
|
|
395
|
+
</template>
|
|
396
|
+
<template v-if="slots.overlay" #overlay>
|
|
397
|
+
<slot name="overlay"></slot>
|
|
398
|
+
</template>
|
|
383
399
|
<div class="nac-input">
|
|
384
400
|
<div
|
|
385
401
|
class="radio-row"
|
|
@@ -479,10 +495,14 @@ const inputClass = computed(() => {
|
|
|
479
495
|
/>
|
|
480
496
|
<div class="radio-text truncate">
|
|
481
497
|
{{ tx(row.text) }}
|
|
482
|
-
<span
|
|
498
|
+
<span
|
|
499
|
+
v-if="row.deleted"
|
|
500
|
+
class="text-error text-[0.7em] leading-[1em]"
|
|
483
501
|
>※削除済み</span
|
|
484
502
|
>
|
|
485
|
-
<span
|
|
503
|
+
<span
|
|
504
|
+
v-if="row.hidden"
|
|
505
|
+
class="text-error text-[0.7em] leading-[1em]"
|
|
486
506
|
>※非表示</span
|
|
487
507
|
>
|
|
488
508
|
</div>
|
|
@@ -129,6 +129,13 @@ type Emits = {
|
|
|
129
129
|
};
|
|
130
130
|
const emit = defineEmits<Emits>();
|
|
131
131
|
// ----------------------------------------------------------------------------
|
|
132
|
+
const slots = defineSlots<{
|
|
133
|
+
default(props: { msg: string }): any;
|
|
134
|
+
overlay?(): any;
|
|
135
|
+
"right-icons"?(): any;
|
|
136
|
+
"left-icons"?(): any;
|
|
137
|
+
}>();
|
|
138
|
+
// ----------------------------------------------------------------------------
|
|
132
139
|
// [ getCurrentInstance ]
|
|
133
140
|
const uid = useId();
|
|
134
141
|
// ----------------------------------------------------------------------------
|
|
@@ -280,6 +287,15 @@ const selectClose = () => {
|
|
|
280
287
|
:warn-time-out="props.warnTimeOut"
|
|
281
288
|
:size="props.size"
|
|
282
289
|
>
|
|
290
|
+
<template v-if="slots['left-icons']" #left-icons>
|
|
291
|
+
<slot name="left-icons" :disabled="disabled" />
|
|
292
|
+
</template>
|
|
293
|
+
<template v-if="slots['right-icons']" #right-icons>
|
|
294
|
+
<slot name="right-icons" :disabled="disabled" />
|
|
295
|
+
</template>
|
|
296
|
+
<template v-if="slots.overlay" #overlay>
|
|
297
|
+
<slot name="overlay"></slot>
|
|
298
|
+
</template>
|
|
283
299
|
<div
|
|
284
300
|
v-if="displayData === null"
|
|
285
301
|
class="absolute inset-0 flex items-center px-1 pointer-events-none text-[0.9em]"
|
|
@@ -130,8 +130,9 @@ const emit = defineEmits<Emits>();
|
|
|
130
130
|
// ----------------------------------------------------------------------------
|
|
131
131
|
const slots = defineSlots<{
|
|
132
132
|
default(props: { msg: string }): any;
|
|
133
|
-
|
|
134
|
-
"
|
|
133
|
+
overlay?(): any;
|
|
134
|
+
"right-icons"?(): any;
|
|
135
|
+
"left-icons"?(): any;
|
|
135
136
|
}>();
|
|
136
137
|
// ----------------------------------------------------------------------------
|
|
137
138
|
// [ getCurrentInstance ]
|
|
@@ -307,10 +308,13 @@ const dataListId = ref(`textbox-list-${uid}`);
|
|
|
307
308
|
@click="elmFocus"
|
|
308
309
|
>
|
|
309
310
|
<template v-if="slots['left-icons']" #left-icons>
|
|
310
|
-
<slot name="left-icons" />
|
|
311
|
+
<slot name="left-icons" :disabled="disabled" />
|
|
311
312
|
</template>
|
|
312
313
|
<template v-if="slots['right-icons']" #right-icons>
|
|
313
|
-
<slot name="
|
|
314
|
+
<slot name="right-icons" :disabled="disabled" />
|
|
315
|
+
</template>
|
|
316
|
+
<template v-if="slots.overlay" #overlay>
|
|
317
|
+
<slot name="overlay"></slot>
|
|
314
318
|
</template>
|
|
315
319
|
<template v-if="props.maxLen > 0" #header-right="{ defaultClass }">
|
|
316
320
|
<div :class="[defaultClass, lenLabelClass]">
|
|
@@ -160,6 +160,13 @@ type Emits = {
|
|
|
160
160
|
};
|
|
161
161
|
const emit = defineEmits<Emits>();
|
|
162
162
|
// ----------------------------------------------------------------------------
|
|
163
|
+
const slots = defineSlots<{
|
|
164
|
+
default(props: { msg: string }): any;
|
|
165
|
+
overlay?(): any;
|
|
166
|
+
"right-icons"?(): any;
|
|
167
|
+
"left-icons"?(): any;
|
|
168
|
+
}>();
|
|
169
|
+
// ----------------------------------------------------------------------------
|
|
163
170
|
// [ getCurrentInstance ]
|
|
164
171
|
const uid = useId();
|
|
165
172
|
|
|
@@ -544,6 +551,12 @@ watch(
|
|
|
544
551
|
:size="props.size"
|
|
545
552
|
@click="elmFocus"
|
|
546
553
|
>
|
|
554
|
+
<template v-if="slots['left-icons']" #left-icons>
|
|
555
|
+
<slot name="left-icons" :disabled="disabled" />
|
|
556
|
+
</template>
|
|
557
|
+
<template v-if="slots.overlay" #overlay>
|
|
558
|
+
<slot name="overlay"></slot>
|
|
559
|
+
</template>
|
|
547
560
|
<div class="flex items-end justify-end">
|
|
548
561
|
<div class="flex-1">
|
|
549
562
|
<input
|
|
@@ -601,6 +614,7 @@ watch(
|
|
|
601
614
|
<i class="fas fa-caret-down"></i>
|
|
602
615
|
</div>
|
|
603
616
|
</div>
|
|
617
|
+
<slot name="right-icons" :disabled="disabled" />
|
|
604
618
|
</template>
|
|
605
619
|
</InputFrame>
|
|
606
620
|
</template>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/* ----------------------------------------------------------------------------
|
|
3
|
+
// src\runtime\components\layout\divider-h.vue
|
|
4
|
+
// ----------------------------------------------------------------------------
|
|
5
|
+
// DividerH
|
|
6
|
+
// DividerHDividerH
|
|
7
|
+
----------------------------------------------------------------------------- */
|
|
8
|
+
// [ tailwind ]
|
|
9
|
+
import { twMerge } from "tailwind-merge";
|
|
10
|
+
// [ NUXT ]
|
|
11
|
+
import { computed } from "#imports";
|
|
12
|
+
// [ utils ]
|
|
13
|
+
import { type ClassType, ClassTypeToString } from "../../utils/class-style";
|
|
14
|
+
import { Theme, GetGolorCode } from "../../utils/theme";
|
|
15
|
+
// ----------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
// [ Props ]
|
|
18
|
+
interface Props {
|
|
19
|
+
theme?: Theme;
|
|
20
|
+
size?: number;
|
|
21
|
+
span1?: number;
|
|
22
|
+
span2?: number;
|
|
23
|
+
class?: ClassType;
|
|
24
|
+
}
|
|
25
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
26
|
+
theme: Theme.main2,
|
|
27
|
+
size: 2,
|
|
28
|
+
span1: 4,
|
|
29
|
+
span2: 8,
|
|
30
|
+
class: "",
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const style = computed(() => {
|
|
34
|
+
return [
|
|
35
|
+
`--main-color:${GetGolorCode(props.theme)};`,
|
|
36
|
+
`--size:${props.size}px;`,
|
|
37
|
+
`--span1:${props.span1}px;`,
|
|
38
|
+
`--span2:${props.span2}px;`,
|
|
39
|
+
];
|
|
40
|
+
});
|
|
41
|
+
const classStyle = computed(() => {
|
|
42
|
+
return twMerge("h-[var(--size)] w-full", ClassTypeToString(props.class));
|
|
43
|
+
});
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<div class="divider" :class="classStyle" :style="style"></div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<style scoped>
|
|
51
|
+
.divider {
|
|
52
|
+
background-image: linear-gradient(to right, var(--main-color), var(--main-color) var(--span1), transparent var(--span1), transparent var(--span2));
|
|
53
|
+
background-size: var(--span2) var(--span1);
|
|
54
|
+
background-repeat: repeat-x;
|
|
55
|
+
background-position: left bottom;
|
|
56
|
+
}
|
|
57
|
+
</style>
|