@leabankab/component-library 8.7.0 → 8.8.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/component-library.es.js +27 -26
  3. package/dist/component-library.es.js.map +1 -1
  4. package/dist/component-library.umd.js +2 -2
  5. package/dist/component-library.umd.js.map +1 -1
  6. package/dist/components/form/slider.d.ts +15 -2
  7. package/dist/index.css +1 -1
  8. package/dist/website/brand-letters.d.ts +40 -0
  9. package/dist/website/calculator.d.ts +58 -0
  10. package/dist/website/carousel.d.ts +55 -0
  11. package/dist/website/cta-banner.d.ts +42 -0
  12. package/dist/website/expanding-cards-context.d.ts +8 -0
  13. package/dist/website/expanding-cards-item.d.ts +69 -0
  14. package/dist/website/expanding-cards.d.ts +48 -0
  15. package/dist/website/hero-service-grid.d.ts +52 -0
  16. package/dist/website/hero.d.ts +57 -0
  17. package/dist/website/index.d.ts +33 -0
  18. package/dist/website/navigation-grid.d.ts +39 -0
  19. package/dist/website/paragraphs.d.ts +11 -0
  20. package/dist/website/partner-list.d.ts +79 -0
  21. package/dist/website/payment-feature.d.ts +85 -0
  22. package/dist/website/promo-grid.d.ts +71 -0
  23. package/dist/website/section-header.d.ts +53 -0
  24. package/dist/website/section.d.ts +53 -0
  25. package/dist/website/service-card-grid.d.ts +33 -0
  26. package/dist/website/split-content.d.ts +69 -0
  27. package/dist/website/stats.d.ts +52 -0
  28. package/dist/website/testimonials.d.ts +100 -0
  29. package/dist/website/use-brand-letters-labels.d.ts +2 -0
  30. package/dist/website/use-carousel-labels.d.ts +6 -0
  31. package/dist/website/use-carousel.d.ts +50 -0
  32. package/dist/website/use-partner-list-labels.d.ts +6 -0
  33. package/dist/website/use-testimonials-labels.d.ts +6 -0
  34. package/dist/website.cjs +2 -0
  35. package/dist/website.cjs.map +1 -0
  36. package/dist/website.css +1 -0
  37. package/dist/website.mjs +1226 -0
  38. package/dist/website.mjs.map +1 -0
  39. package/package.json +7 -2
@@ -1,9 +1,15 @@
1
1
  import { Slider as BaseSlider } from '@base-ui/react/slider';
2
2
  import { ReactNode } from 'react';
3
+ import { ColorRoles } from '../color-roles';
3
4
  /**
4
5
  * Requires an accessible name so the slider is never nameless. Provide a
5
6
  * visible `label`, or an `aria-label` when the design has none.
6
7
  */
8
+ /**
9
+ * `"primary"` for a light surface; `"contrast"` for a dark one
10
+ * (`bg.contrast`, `bg.contrast-accent`, the website `Calculator`'s panel).
11
+ */
12
+ export type SliderColor = ColorRoles<"primary" | "contrast">;
7
13
  type SliderAccessibleName = {
8
14
  label: ReactNode;
9
15
  "aria-label"?: never;
@@ -16,6 +22,13 @@ export type SliderProps = Omit<BaseSlider.Root.Props<number>, "children" | "orie
16
22
  helperText?: ReactNode;
17
23
  /** Puts the slider and its helper text into the error state. */
18
24
  error?: boolean;
25
+ /**
26
+ * `"primary"`: purple on a light surface. `"contrast"`: white text, a
27
+ * white fill and thumb, for a dark surface such as the website's
28
+ * `Calculator`.
29
+ * @default "primary"
30
+ */
31
+ color?: SliderColor;
19
32
  };
20
33
  /**
21
34
  * A single-value slider built on Base UI's accessible `Slider` primitive.
@@ -28,7 +41,7 @@ export type SliderProps = Omit<BaseSlider.Root.Props<number>, "children" | "orie
28
41
  * `name` is set.
29
42
  *
30
43
  * Pass `format` and `locale` to control how the value, `min` and `max` are
31
- * written and announced.
44
+ * written and announced. On a dark surface, pass `color="contrast"`.
32
45
  *
33
46
  * ```tsx
34
47
  * <Slider
@@ -43,5 +56,5 @@ export type SliderProps = Omit<BaseSlider.Root.Props<number>, "children" | "orie
43
56
  * />
44
57
  * ```
45
58
  */
46
- export declare function Slider({ label, "aria-label": ariaLabel, helperText, error, min, max, format, locale, className, ...rest }: SliderProps): import("react").JSX.Element;
59
+ export declare function Slider({ label, "aria-label": ariaLabel, helperText, error, color, min, max, format, locale, className, ...rest }: SliderProps): import("react").JSX.Element;
47
60
  export {};