@dmitriikapustin/ui 0.4.5 → 0.5.1

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/index.d.cts CHANGED
@@ -948,6 +948,17 @@ interface Testimonial {
948
948
  role: string;
949
949
  avatarSrc?: string;
950
950
  }
951
+ interface PromoTestimonialsRating {
952
+ /** Числовое значение рейтинга, например 4.9. Форматируется через `toFixed(1)`. */
953
+ value: number;
954
+ /** Кол-во отзывов. Если undefined / 0 — рендерится только `value ★`. */
955
+ count?: number;
956
+ /**
957
+ * Локализуемый формат count'а. Default — `${count}`. Передавай свою pluralization
958
+ * (например `(n) => \`${n} ${pluralRu(n, ['отзыв','отзыва','отзывов'])}\``).
959
+ */
960
+ countLabel?: (count: number) => string;
961
+ }
951
962
  interface PromoTestimonialsProps {
952
963
  heading: ReactNode;
953
964
  subtitle?: string;
@@ -964,9 +975,16 @@ interface PromoTestimonialsProps {
964
975
  * Используй `'md'` для density-aware admin / dashboard контекстов.
965
976
  */
966
977
  headingSize?: 'sm' | 'md' | 'lg';
978
+ /**
979
+ * Опциональная плашка рейтинга под heading: `«4.9 ★ · 530 отзывов»`.
980
+ * Стилизуется через token `--testimonial-rating-fg` (default `var(--fg-secondary)`).
981
+ * Pluralization count'а — на стороне потребителя через `countLabel` callback (пакет
982
+ * не тащит i18n).
983
+ */
984
+ rating?: PromoTestimonialsRating;
967
985
  className?: string;
968
986
  }
969
- declare function PromoTestimonials({ heading, subtitle, testimonials, media, verticalPadding, headingSize, className, }: PromoTestimonialsProps): react_jsx_runtime.JSX.Element;
987
+ declare function PromoTestimonials({ heading, subtitle, testimonials, media, verticalPadding, headingSize, rating, className, }: PromoTestimonialsProps): react_jsx_runtime.JSX.Element;
970
988
 
971
989
  interface PromoHeroProps {
972
990
  title: ReactNode;
package/dist/index.d.ts CHANGED
@@ -948,6 +948,17 @@ interface Testimonial {
948
948
  role: string;
949
949
  avatarSrc?: string;
950
950
  }
951
+ interface PromoTestimonialsRating {
952
+ /** Числовое значение рейтинга, например 4.9. Форматируется через `toFixed(1)`. */
953
+ value: number;
954
+ /** Кол-во отзывов. Если undefined / 0 — рендерится только `value ★`. */
955
+ count?: number;
956
+ /**
957
+ * Локализуемый формат count'а. Default — `${count}`. Передавай свою pluralization
958
+ * (например `(n) => \`${n} ${pluralRu(n, ['отзыв','отзыва','отзывов'])}\``).
959
+ */
960
+ countLabel?: (count: number) => string;
961
+ }
951
962
  interface PromoTestimonialsProps {
952
963
  heading: ReactNode;
953
964
  subtitle?: string;
@@ -964,9 +975,16 @@ interface PromoTestimonialsProps {
964
975
  * Используй `'md'` для density-aware admin / dashboard контекстов.
965
976
  */
966
977
  headingSize?: 'sm' | 'md' | 'lg';
978
+ /**
979
+ * Опциональная плашка рейтинга под heading: `«4.9 ★ · 530 отзывов»`.
980
+ * Стилизуется через token `--testimonial-rating-fg` (default `var(--fg-secondary)`).
981
+ * Pluralization count'а — на стороне потребителя через `countLabel` callback (пакет
982
+ * не тащит i18n).
983
+ */
984
+ rating?: PromoTestimonialsRating;
967
985
  className?: string;
968
986
  }
969
- declare function PromoTestimonials({ heading, subtitle, testimonials, media, verticalPadding, headingSize, className, }: PromoTestimonialsProps): react_jsx_runtime.JSX.Element;
987
+ declare function PromoTestimonials({ heading, subtitle, testimonials, media, verticalPadding, headingSize, rating, className, }: PromoTestimonialsProps): react_jsx_runtime.JSX.Element;
970
988
 
971
989
  interface PromoHeroProps {
972
990
  title: ReactNode;