negodesign 0.0.40 → 0.0.41

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.
@@ -109,7 +109,7 @@
109
109
  {isImageButtonMaximized}
110
110
  {isVideoButtonMaximized}
111
111
  {isLoading}
112
- class="md:h-32.5 lg:h-44"
112
+ class="h-32.5 md:h-36 lg:h-44"
113
113
  />
114
114
 
115
115
  {#if onButtonProfile}
@@ -108,7 +108,7 @@
108
108
  {isImageButtonMaximized}
109
109
  {isVideoButtonMaximized}
110
110
  {isLoading}
111
- class="md:h-32.5 lg:h-44"
111
+ class="h-32.5 md:h-36 lg:h-44"
112
112
  />
113
113
 
114
114
  {#if onButtonProfile}
@@ -18,7 +18,8 @@
18
18
  $effect(() => {
19
19
  if (!textEl) return;
20
20
  const check = () =>
21
- (isTruncated = textEl!.scrollHeight > textEl!.clientHeight + 1);
21
+ (isTruncated =
22
+ (textEl?.scrollHeight ?? 0) > (textEl?.clientHeight ?? 0) + 1);
22
23
  // requestAnimationFrame garante que o layout com o clamp já foi aplicado
23
24
  // antes de medirmos — medir no mesmo tick pode dar valores desatualizados.
24
25
  requestAnimationFrame(check);
@@ -13,6 +13,7 @@
13
13
  activeClass = "bg-gradient text-white rounded-sm px-3",
14
14
  isLoading = false,
15
15
  orientation = "horizontal",
16
+ itemClass,
16
17
  onClick,
17
18
  }: CarouselBadgeProps = $props();
18
19
 
@@ -67,7 +68,9 @@
67
68
  <div
68
69
  class="flex gap-1 mx-2 p-0.5 justify-center items-center cursor-pointer
69
70
  {orientation === 'horizontal' ? 'flex-row' : 'flex-col'}
70
- {isSelected(item) ? activeClass : ''}"
71
+ {isSelected(item) ? activeClass : ''}
72
+ {itemClass}
73
+ "
71
74
  >
72
75
  {@render itemVisual(item)}
73
76
  <div class={labelClass}>{item.label}</div>
@@ -34,7 +34,7 @@
34
34
  {#if isLoading}
35
35
  {#each Array.from( { length: responsive.isMobile ? 3 : 6 }, ) as _, i (`loading-${i}`)}
36
36
  {#if responsive.isMobile}
37
- <Carousel.Item class="pl-2 basis-auto">
37
+ <Carousel.Item class="pl-2 basis-auto w-[300px]">
38
38
  <CardProduct id={i} {variant} isLoading />
39
39
  </Carousel.Item>
40
40
  {:else}
@@ -46,7 +46,7 @@
46
46
  {:else}
47
47
  {#each items as item, i (`product-${item.id ?? i}`)}
48
48
  {#if responsive.isMobile}
49
- <Carousel.Item class="pl-2 basis-auto">
49
+ <Carousel.Item class="pl-2 basis-auto w-[300px]">
50
50
  <CardProduct
51
51
  {...item}
52
52
  {variant}
@@ -38,7 +38,7 @@
38
38
  {#if isLoading}
39
39
  {#each Array.from( { length: responsive.isMobile ? 3 : 6 }, ) as _, i (`loading-${i}`)}
40
40
  {#if responsive.isMobile}
41
- <Carousel.Item class="pl-2 basis-auto">
41
+ <Carousel.Item class="pl-2 basis-auto w-[300px]">
42
42
  <CardProfile id={i} {variant} isLoading />
43
43
  </Carousel.Item>
44
44
  {:else}
@@ -50,7 +50,7 @@
50
50
  {:else}
51
51
  {#each items as item, i (`profile-${item.id ?? i}`)}
52
52
  {#if responsive.isMobile}
53
- <Carousel.Item class="pl-2 basis-auto">
53
+ <Carousel.Item class="pl-2 basis-auto w-[300px]">
54
54
  <CardProfile
55
55
  {...item}
56
56
  {variant}
@@ -33,7 +33,7 @@
33
33
  {#if isLoading}
34
34
  {#each Array.from( { length: responsive.isMobile ? 3 : 6 }, ) as _, i (`loading-${i}`)}
35
35
  {#if responsive.isMobile}
36
- <Carousel.Item class="pl-2 basis-auto">
36
+ <Carousel.Item class="pl-2 basis-auto w-[300px]">
37
37
  <CardPromotion id={i} isLoading />
38
38
  </Carousel.Item>
39
39
  {:else}
@@ -45,7 +45,7 @@
45
45
  {:else}
46
46
  {#each items as item, i (`promotion-${item.id ?? i}`)}
47
47
  {#if responsive.isMobile}
48
- <Carousel.Item class="pl-2 basis-auto">
48
+ <Carousel.Item class="pl-2 basis-auto w-[300px]">
49
49
  <CardPromotion
50
50
  {...item}
51
51
  {isDescriptionIcon}
@@ -61,6 +61,7 @@ export interface CarouselBadgeProps {
61
61
  activeClass?: string;
62
62
  /** Estado de carregamento (skeleton) */
63
63
  isLoading?: boolean;
64
+ itemClass?: string;
64
65
  onClick?: (value: string | number) => void;
65
66
  }
66
67
  /**
@@ -42,7 +42,7 @@
42
42
  {#if positionButtonPreviousAndNext == "top_right" || responsive.isMobile}
43
43
  {#if isButtonPreviousAndNext}
44
44
  <div
45
- class="absolute -top-16 md:-top-10 right-8 md:right-10 lg:right-12 z-20"
45
+ class="absolute -top-5 md:-top-10 right-8 md:right-10 lg:right-12 z-20"
46
46
  >
47
47
  <Carousel.Previous
48
48
  class={`${styleTopCenter} ${buttonPreviousAndNextClass}`}
package/dist/globals.css CHANGED
@@ -296,12 +296,12 @@
296
296
  .end-2 {
297
297
  inset-inline-end: calc(var(--spacing) * 2);
298
298
  }
299
+ .-top-5 {
300
+ top: calc(var(--spacing) * -5);
301
+ }
299
302
  .-top-12 {
300
303
  top: calc(var(--spacing) * -12);
301
304
  }
302
- .-top-16 {
303
- top: calc(var(--spacing) * -16);
304
- }
305
305
  .top-0 {
306
306
  top: 0px;
307
307
  }
@@ -801,6 +801,9 @@
801
801
  .h-32 {
802
802
  height: calc(var(--spacing) * 32);
803
803
  }
804
+ .h-32\.5 {
805
+ height: calc(var(--spacing) * 32.5);
806
+ }
804
807
  .h-36 {
805
808
  height: calc(var(--spacing) * 36);
806
809
  }
@@ -4017,8 +4020,8 @@
4017
4020
  .md\:h-25 {
4018
4021
  height: calc(var(--spacing) * 25);
4019
4022
  }
4020
- .md\:h-32\.5 {
4021
- height: calc(var(--spacing) * 32.5);
4023
+ .md\:h-36 {
4024
+ height: calc(var(--spacing) * 36);
4022
4025
  }
4023
4026
  .md\:h-44 {
4024
4027
  height: calc(var(--spacing) * 44);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "negodesign",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "sideEffects": [