@alfadocs/ui-kit-debug 0.9.1 → 0.10.0

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.
@@ -0,0 +1,29 @@
1
+ import { type HTMLAttributes } from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const ratingVariants: (props?: ({
4
+ size?: "sm" | "md" | "lg" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ interface RatingProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'aria-label'>, VariantProps<typeof ratingVariants> {
7
+ /** Average score, 0..max. Fractional values render as half-step fills. */
8
+ value: number;
9
+ /** Total number of stars. Defaults to 5. */
10
+ max?: number;
11
+ /** Optional inline review-count summary. Plural-aware via i18next. */
12
+ reviews?: {
13
+ count: number;
14
+ label?: string;
15
+ };
16
+ /** Underline the reviews summary text — useful when it's a link. */
17
+ underlined?: boolean;
18
+ /**
19
+ * When `true`, the rating is decorative — `aria-hidden`, no role, no
20
+ * computed label. Use when the surrounding context already announces
21
+ * the score (e.g. a card whose accessible name includes the value).
22
+ */
23
+ decorative?: boolean;
24
+ /** Override the default i18n-derived `aria-label`. */
25
+ 'aria-label'?: string;
26
+ }
27
+ export declare const Rating: import("react").ForwardRefExoticComponent<RatingProps & import("react").RefAttributes<HTMLSpanElement>>;
28
+ export type { RatingProps };
29
+ //# sourceMappingURL=rating.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rating.d.ts","sourceRoot":"","sources":["../../../src/components/rating/rating.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAEjE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAelE,QAAA,MAAM,cAAc;;8EAenB,CAAC;AA+DF,UAAU,WACR,SACE,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,YAAY,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,oEAAoE;IACpE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAmCD,eAAO,MAAM,MAAM,yGAoIlB,CAAC;AAGF,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { S as r, a as i, b as s, c as d, d as S, e as b, f as t, g as o, h as m, i as n, j as l, k as c, l as I, m as g, n as p, o as u, p as P, s as f, u as B, q as F } from "../../_chunks/sidebar-CoLHtVrP.js";
1
+ import { S as r, a as i, b as s, c as d, d as S, e as b, f as t, g as o, h as m, i as n, j as l, k as c, l as I, m as g, n as p, o as u, p as P, s as f, u as B, q as F } from "../../_chunks/sidebar-D8Lq065m.js";
2
2
  export {
3
3
  r as Sidebar,
4
4
  i as SidebarBody,
@@ -349,6 +349,14 @@ const a = {
349
349
  secondaryCta: "Contact support"
350
350
  }
351
351
  },
352
+ rating: {
353
+ // Default aria-label for a non-decorative Rating, plus the inline
354
+ // summary used when `reviews` is provided. `_one` / `_other` plurals
355
+ // make the i18next CLDR pluralizer pick the right form per locale.
356
+ label: "{{value}} out of {{max}} stars",
357
+ reviews_one: "{{value}} stars · 1 review",
358
+ reviews_other: "{{value}} stars · {{count}} reviews"
359
+ },
352
360
  sparkline: {
353
361
  summary: "{{label}}: min {{min}}, max {{max}}, current {{current}}, {{direction}}",
354
362
  summaryNoLabel: "min {{min}}, max {{max}}, current {{current}}, {{direction}}",
@@ -1321,6 +1329,11 @@ const a = {
1321
1329
  secondaryCta: "Contatta il supporto"
1322
1330
  }
1323
1331
  },
1332
+ rating: {
1333
+ label: "{{value}} stelle su {{max}}",
1334
+ reviews_one: "{{value}} stelle · 1 opinione",
1335
+ reviews_other: "{{value}} stelle · {{count}} opinioni"
1336
+ },
1324
1337
  sparkline: {
1325
1338
  summary: "{{label}}: min {{min}}, max {{max}}, attuale {{current}}, {{direction}}",
1326
1339
  summaryNoLabel: "min {{min}}, max {{max}}, attuale {{current}}, {{direction}}",
@@ -2266,6 +2279,11 @@ const a = {
2266
2279
  secondaryCta: "Support kontaktieren"
2267
2280
  }
2268
2281
  },
2282
+ rating: {
2283
+ label: "{{value}} von {{max}} Sternen",
2284
+ reviews_one: "{{value}} Sterne · 1 Bewertung",
2285
+ reviews_other: "{{value}} Sterne · {{count}} Bewertungen"
2286
+ },
2269
2287
  sparkline: {
2270
2288
  summary: "{{label}}: Min. {{min}}, Max. {{max}}, aktuell {{current}}, {{direction}}",
2271
2289
  summaryNoLabel: "Min. {{min}}, Max. {{max}}, aktuell {{current}}, {{direction}}",