nuxt-hs-ui 2.0.19 → 2.0.20

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
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.15.0"
6
6
  },
7
- "version": "2.0.19",
7
+ "version": "2.0.20",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -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="$slots.overlay" #overlay>
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="!props.readonly" #left-icons="{ disabled: iconDisabled }">
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="iconDisabled"
753
+ :disabled="disabled"
743
754
  :class="
744
- !iconDisabled
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
- #right-icons="{ disabled: iconDisabled }"
827
- >
828
- <div
829
- :class="
830
- !iconDisabled
831
- ? 'text-error cursor-pointer hover:bg-error/[0.1] active:bg-error/[0.2]'
832
- : ''
833
- "
834
- @click="iconEventDelete()"
835
- >
836
- <i class="fa-solid fa-delete-left"></i>
837
- </div>
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 v-if="row.deleted" class="text-error text-[0.7em] leading-[1em]"
498
+ <span
499
+ v-if="row.deleted"
500
+ class="text-error text-[0.7em] leading-[1em]"
483
501
  >※削除済み</span
484
502
  >
485
- <span v-if="row.hidden" class="text-error text-[0.7em] leading-[1em]"
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
- "right-icons"(): any;
134
- "left-icons"(): any;
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="left-icons" />
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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-hs-ui",
3
- "version": "2.0.19",
3
+ "version": "2.0.20",
4
4
  "description": "My new Nuxt module",
5
5
  "repository": "https://github.com/hare-systems-ryo/nuxt-hs-ui",
6
6
  "license": "MIT",