sprintify-ui 0.8.47 → 0.8.48

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.8.47",
3
+ "version": "0.8.48",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && vue-tsc && vite build",
@@ -65,11 +65,11 @@
65
65
  <div class="relative">
66
66
  <div
67
67
  v-show="dropdownOpened"
68
- class="w-full min-h-[110px] overflow-hidden bg-white border-b border-x border-slate-300 input-rounded rounded-t-none"
68
+ class="w-full min-h-[110px] overflow-hidden bg-white border-slate-300 input-rounded"
69
69
  :class="[
70
70
  inline
71
- ? 'relative'
72
- : ['absolute shadow-2xl z-menu'],
71
+ ? 'relative border-b border-x rounded-t-none'
72
+ : 'absolute top-1 border shadow-2xl z-menu',
73
73
  ]"
74
74
  >
75
75
  <BaseAutocompleteDrawer
@@ -533,14 +533,16 @@ const inputClasses = computed(() => {
533
533
  const base = 'w-full';
534
534
  const paddingRight = showRemoveButtonInternal.value ? 'pr-5' : '';
535
535
  const withSelect = props.select ? 'rounded-l-none' : '';
536
- // Remove focus style when open to avoid overlapping with dropdown
537
- const open = dropdownOpened.value ? 'rounded-b-none relative focus-within:ring-0' : '';
536
+
537
+ const inline = props.inline ? 'relative focus-within:ring-0 focus-within:border-slate-300' : '';
538
+ const inlineOpen = props.inline && dropdownOpened.value ? 'rounded-b-none' : '';
538
539
 
539
540
  const internalClasses = [
540
541
  base,
541
542
  withSelect,
542
543
  paddingRight,
543
- open,
544
+ inline,
545
+ inlineOpen,
544
546
  ];
545
547
 
546
548
  if (!props.twInput) {
@@ -552,12 +554,14 @@ const inputClasses = computed(() => {
552
554
 
553
555
  const selectClasses = computed(() => {
554
556
  const base = 'relative rounded-r-none min-w-0';
555
- // Remove focus style when open to avoid overlapping with dropdown
556
- const open = dropdownOpened.value ? 'rounded-b-none focus:ring-0' : '';
557
+
558
+ const inline = props.inline ? 'relative focus:ring-0 focus:border-slate-300' : '';
559
+ const inlineOpen = props.inline && dropdownOpened.value ? 'rounded-b-none' : '';
557
560
 
558
561
  const internalClasses = [
559
562
  base,
560
- open,
563
+ inline,
564
+ inlineOpen,
561
565
  ];
562
566
 
563
567
  if (!props.twSelect) {
@@ -46,11 +46,12 @@
46
46
 
47
47
  <div class="relative">
48
48
  <div
49
- v-if="opened || dropdownShow == 'always'"
49
+ v-if="dropdownOpened"
50
+ class="w-full min-h-[110px] overflow-hidden bg-white border-slate-300 input-rounded"
50
51
  :class="[
51
52
  inline
52
- ? 'relative'
53
- : 'absolute top-1 z-menu min-h-[110px] w-full overflow-hidden rounded border border-slate-300 bg-white shadow-md',
53
+ ? 'relative border-b border-x rounded-t-none'
54
+ : 'absolute top-1 border shadow-2xl z-menu',
54
55
  ]"
55
56
  >
56
57
  <BaseAutocompleteDrawer
@@ -60,7 +61,7 @@
60
61
  :size="size"
61
62
  :loading="loading"
62
63
  :loading-bottom="loadingBottom"
63
- :tw-drawer="inline ? 'pt-1' : 'p-1'"
64
+ tw-drawer="p-1"
64
65
  :keywords="keywords"
65
66
  @select="onSelect"
66
67
  @scroll-bottom="emit('scrollBottom')"
@@ -256,6 +257,8 @@ const shouldFilter = ref(false);
256
257
  const opened = ref(false);
257
258
  const selectionToDelete = ref<NormalizedOption | null>(null);
258
259
 
260
+ const dropdownOpened = computed(() => opened.value || props.dropdownShow == 'always');
261
+
259
262
  const isSelected = hasOptions.isSelected;
260
263
  const normalizedOptions = hasOptions.normalizedOptions;
261
264
  const normalizedModelValue = hasOptions.normalizedModelValue as ComputedRef<
@@ -432,9 +435,16 @@ const wrapperClass = computed(() => {
432
435
  'xl': 'min-h-control-xl gap-1 p-1',
433
436
  }[sizeInternal.value];
434
437
 
435
- const focus = opened.value ? 'input-focus border-blue-300' : '';
438
+ const focus = (dropdownOpened.value && !props.inline) ? 'input-focus border-blue-300' : '';
439
+ const inline = (dropdownOpened.value && props.inline) ? 'rounded-b-none' : '';
440
+
441
+ const internalClasses = [base, error, height, focus, inline];
436
442
 
437
- return twMerge(base, error, height, focus, props.twContainer);
443
+ if (props.twContainer) {
444
+ return twMerge(internalClasses, props.twContainer);
445
+ }
446
+
447
+ return internalClasses;
438
448
  });
439
449
 
440
450
  const innerHeight = computed(() => {
@@ -455,6 +465,9 @@ const inputClasses = computed(() => {
455
465
  const disabled = 'disabled:cursor-not-allowed';
456
466
  const sizeConfig = sizes[sizeInternal.value];
457
467
 
468
+ const inline = props.inline ? 'relative focus:ring-0 focus:border-slate-300' : '';
469
+ const inlineOpen = props.inline && dropdownOpened.value ? 'rounded-b-none' : '';
470
+
458
471
  const padding = {
459
472
  'xs': 'pl-1.5',
460
473
  'sm': 'pl-2',
@@ -463,7 +476,7 @@ const inputClasses = computed(() => {
463
476
  'xl': 'pl-2.5',
464
477
  }[sizeInternal.value];
465
478
 
466
- return [base, padding, innerHeight.value, focus, disabled, sizeConfig.fontSize];
479
+ return [base, padding, innerHeight.value, focus, disabled, sizeConfig.fontSize, inline, inlineOpen];
467
480
  });
468
481
 
469
482
  const selectionClass = (selection: NormalizedOption): string => {