negodesign 0.0.40 → 0.0.42

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}
@@ -13,6 +13,7 @@
13
13
  intervalMs = 5000,
14
14
  transitionMs = 1200,
15
15
  indicatorShow = false,
16
+ sectionClass,
16
17
  }: CarouselHeroProps & {
17
18
  children?: Snippet;
18
19
  intervalMs?: number;
@@ -110,7 +111,7 @@
110
111
  <NavMenu {...navMenu} />
111
112
 
112
113
  <section
113
- class="flex flex-col justify-center items-center flex-1 w-full h-auto text-center px-4"
114
+ class="flex flex-col justify-center items-center flex-1 w-full h-auto text-center px-4 {sectionClass}"
114
115
  >
115
116
  {#key selected.title}
116
117
  <div
@@ -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
  /**
@@ -90,4 +91,5 @@ export interface CarouselHeroProps {
90
91
  titleClass?: string;
91
92
  /** Classe CSS personalizada para a descrição */
92
93
  descriptionClass?: string;
94
+ sectionClass?: string;
93
95
  }
@@ -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/dist/index.d.ts CHANGED
@@ -19,6 +19,8 @@ import PageOtpVerification from "./components/pages/security/otp-verification/Pa
19
19
  import PageForgetPassword from "./components/pages/security/forget-password/PageForgetPassword.svelte";
20
20
  import PageResetPassword from "./components/pages/security/reset-password/PageResetPassword.svelte";
21
21
  import TabUnderline from "./components/core/tabs/ui/tab-underline.svelte";
22
+ import CarouselGridPromotion from "./components/core/carousel/grid/promotion/ui/CarouselGridPromotion.svelte";
23
+ import CarouselGridProduct from "./components/core/carousel/grid/product/ui/CarouselGridProduct.svelte";
22
24
  import CarouselGridProfile from "./components/core/carousel/grid/profile/ui/CarouselGridProfile.svelte";
23
25
  import CarouselHighlights from "./components/core/carousel/highlights/ui/CarouselHighlights.svelte";
24
26
  import CarouselGridMedia from "./components/core/carousel/grid/media/ui/CarouselGridMedia.svelte";
@@ -120,6 +122,18 @@ CarouselGridMedia,
120
122
  * @see CarouselProfileProps
121
123
  */
122
124
  CarouselGridProfile,
125
+ /**
126
+ * Layout em grid responsivo de cards de produto (imagens ou vídeos).
127
+ * Em telas mobile transforma-se num carousel com swipe.
128
+ * @see CarouselProductProps
129
+ */
130
+ CarouselGridProduct,
131
+ /**
132
+ * Layout em grid responsivo de cards de produto in promotion (imagens ou vídeos).
133
+ * Em telas mobile transforma-se num carousel com swipe.
134
+ * @see CarouselGridPromotion
135
+ */
136
+ CarouselGridPromotion,
123
137
  /**
124
138
  * Componente de abas com estilo underline. Troca o conteúdo (Snippet)
125
139
  * conforme a aba selecionada.
package/dist/index.js CHANGED
@@ -19,6 +19,8 @@ import PageOtpVerification from "./components/pages/security/otp-verification/Pa
19
19
  import PageForgetPassword from "./components/pages/security/forget-password/PageForgetPassword.svelte";
20
20
  import PageResetPassword from "./components/pages/security/reset-password/PageResetPassword.svelte";
21
21
  import TabUnderline from "./components/core/tabs/ui/tab-underline.svelte";
22
+ import CarouselGridPromotion from "./components/core/carousel/grid/promotion/ui/CarouselGridPromotion.svelte";
23
+ import CarouselGridProduct from "./components/core/carousel/grid/product/ui/CarouselGridProduct.svelte";
22
24
  import CarouselGridProfile from "./components/core/carousel/grid/profile/ui/CarouselGridProfile.svelte";
23
25
  import CarouselHighlights from "./components/core/carousel/highlights/ui/CarouselHighlights.svelte";
24
26
  import CarouselGridMedia from "./components/core/carousel/grid/media/ui/CarouselGridMedia.svelte";
@@ -120,6 +122,18 @@ CarouselGridMedia,
120
122
  * @see CarouselProfileProps
121
123
  */
122
124
  CarouselGridProfile,
125
+ /**
126
+ * Layout em grid responsivo de cards de produto (imagens ou vídeos).
127
+ * Em telas mobile transforma-se num carousel com swipe.
128
+ * @see CarouselProductProps
129
+ */
130
+ CarouselGridProduct,
131
+ /**
132
+ * Layout em grid responsivo de cards de produto in promotion (imagens ou vídeos).
133
+ * Em telas mobile transforma-se num carousel com swipe.
134
+ * @see CarouselGridPromotion
135
+ */
136
+ CarouselGridPromotion,
123
137
  /**
124
138
  * Componente de abas com estilo underline. Troca o conteúdo (Snippet)
125
139
  * conforme a aba selecionada.
@@ -5,7 +5,7 @@ import type { OtpVerificationRequestDto, PageOtpVerificationProps } from "../com
5
5
  import type { NavMenuLinksProps, NavMenuLogoProps, NavMenuActionsProps, NavMenuProps } from "../components/core/nav/data/nav-menu";
6
6
  import type { NavMenuSidebarProps, NavMenuAndSubmenuSidebarProps, GroupMenuSidebarProps, SubMenuSidebarProps, NavMenuItem } from "../components/core/nav/data/nav-menu-sidebar";
7
7
  import type { NavUserSidebarProps } from "../components/core/nav/data/nav-user-sidebar";
8
- import type { CardMediaProps, CardProfileProps, CardPromotionProps, CardHighlightProps, CardTagsProps } from "../components/core/card/types";
8
+ import type { CardMediaProps, CardProfileProps, CardPromotionProps, CardHighlightProps, CardTagsProps, CardProductProps } from "../components/core/card/types";
9
9
  import type { CarouselGridMediaProps } from "../components/core/carousel/grid/media/types";
10
10
  import type { CarouselGridProfileProps } from "../components/core/carousel/grid/profile/types";
11
11
  import type { CarouselHighlightsProps } from "../components/core/carousel/highlights/types";
@@ -25,6 +25,8 @@ import type { ProductDetailsProps, ProductDetailsData, ProductDetailsBreadcrumbI
25
25
  import type { PrivacyPolicyOrTermsOfUseProps, DocPageData, DocSection, ContentBlock, BreadcrumbItem, TocItem } from "../components/pages/privacy-policy-or-terms-of-use/types";
26
26
  import type { InputLabelProps } from "../components/core/form/data/InputLabel.svelte";
27
27
  import type { NegoDesignProps } from "../components/types";
28
+ import type { CarouselGridPromotionProps } from "../components/core/carousel/grid/promotion/types";
29
+ import type { CarouselGridProductProps } from "../components/core/carousel/grid/product/types";
28
30
  export type {
29
31
  /** Props de um link individual no menu de navegação. @see NavMenuLinksProps */
30
32
  NavMenuLinksProps,
@@ -56,6 +58,8 @@ CardProfileProps,
56
58
  CardPromotionProps,
57
59
  /** Props do CardHighlight — card de destaque/organização com botão de ação. @see CardHighlightProps */
58
60
  CardHighlightProps,
61
+ /** Props do CardProduct — card de produto com preço antigo/novo e botão comprar. @see CardProductProps */
62
+ CardProductProps,
59
63
  /** Props do cabeçalho de carousel (título, descrição, botão "Ver tudo"). @see CarouselHeaderProps */
60
64
  CarouselHeaderProps,
61
65
  /** Props do slot/container de carousel (botões navegação, plugins, bordas). @see CarouselSlotProps */
@@ -76,6 +80,10 @@ CarouselGridProfileProps,
76
80
  CarouselHighlightsProps,
77
81
  /** Props do CarouselPromotion — carousel de cards de promoção com preços. @see CarouselPromotionProps */
78
82
  CarouselPromotionProps,
83
+ /** Props do CarouselGridPromotion — grid de cards de produto em promoção. @see CarouselGridPromotionProps */
84
+ CarouselGridPromotionProps,
85
+ /** Props do CarouselGridProduct — grid de cards de produto @see CarouselGridProductProps */
86
+ CarouselGridProductProps,
79
87
  /** Props base do banner de anúncio (AdCardBanner). @see BannerProps */
80
88
  BannerProps,
81
89
  /** Alias para BannerProps — props do componente AdCardBanner. @see AdCardBannerProps */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "negodesign",
3
- "version": "0.0.40",
3
+ "version": "0.0.42",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "sideEffects": [