@prokodo/ui 0.0.49 → 0.0.50

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 (112) hide show
  1. package/dist/components/accordion/{Accordion.module.scss.js → Accordion.base.module.scss.js} +2 -8
  2. package/dist/components/accordion/Accordion.effects.client.js +16 -0
  3. package/dist/components/accordion/Accordion.effects.module.scss.js +8 -0
  4. package/dist/components/accordion/Accordion.view.js +84 -80
  5. package/dist/components/animated/Animated.module.scss.js +2 -8
  6. package/dist/components/avatar/Avatar.module.scss.js +2 -8
  7. package/dist/components/button/Button.module.scss.js +2 -8
  8. package/dist/components/calendly/Calendly.client.js +98 -22
  9. package/dist/components/calendly/Calendly.server.js +3 -2
  10. package/dist/components/calendly/Calendly.view.js +2 -1
  11. package/dist/components/card/{Card.module.scss.js → Card.base.module.scss.js} +2 -12
  12. package/dist/components/card/Card.effects.client.js +16 -0
  13. package/dist/components/card/Card.effects.module.scss.js +14 -0
  14. package/dist/components/card/Card.view.js +15 -4
  15. package/dist/components/carousel/Carousel.client.js +44 -20
  16. package/dist/components/carousel/Carousel.lazy.js +1 -1
  17. package/dist/components/carousel/Carousel.module.scss.js +2 -8
  18. package/dist/components/chip/Chip.module.scss.js +2 -8
  19. package/dist/components/datePicker/DatePicker.client.js +52 -51
  20. package/dist/components/datePicker/DatePicker.view.js +14 -3
  21. package/dist/components/dialog/Dialog.module.scss.js +2 -8
  22. package/dist/components/drawer/{Drawer.module.scss.js → Drawer.base.module.scss.js} +27 -32
  23. package/dist/components/drawer/Drawer.client.js +19 -2
  24. package/dist/components/drawer/Drawer.effects.client.js +16 -0
  25. package/dist/components/drawer/Drawer.effects.module.scss.js +29 -0
  26. package/dist/components/drawer/Drawer.server.js +0 -1
  27. package/dist/components/drawer/Drawer.view.js +44 -40
  28. package/dist/components/dynamic-list/DynamicList.module.scss.js +2 -8
  29. package/dist/components/form/Form.client.js +131 -54
  30. package/dist/components/form/Form.module.scss.js +2 -8
  31. package/dist/components/form/FormField.module.scss.js +2 -8
  32. package/dist/components/form/FormResponse.module.scss.js +2 -8
  33. package/dist/components/grid/Grid.module.scss.js +2 -8
  34. package/dist/components/grid/GridRow.module.scss.js +2 -8
  35. package/dist/components/headline/{Headline.module.scss.js → Headline.base.module.scss.js} +2 -15
  36. package/dist/components/headline/Headline.effects.client.js +14 -0
  37. package/dist/components/headline/Headline.effects.module.scss.js +13 -0
  38. package/dist/components/headline/Headline.js +28 -18
  39. package/dist/components/icon/Icon.module.scss.js +2 -8
  40. package/dist/components/image/Image.module.scss.js +2 -8
  41. package/dist/components/image-text/ImageText.module.scss.js +2 -8
  42. package/dist/components/input/Input.client.js +12 -1
  43. package/dist/components/input/Input.module.scss.js +3 -8
  44. package/dist/components/input/Input.view.js +10 -2
  45. package/dist/components/inputOTP/InputOTP.js +124 -41
  46. package/dist/components/inputOTP/InputOTP.module.scss.js +2 -8
  47. package/dist/components/label/Label.module.scss.js +2 -8
  48. package/dist/components/link/Link.module.scss.js +2 -8
  49. package/dist/components/list/List.module.scss.js +2 -8
  50. package/dist/components/loading/Loading.client.js +68 -0
  51. package/dist/components/loading/Loading.js +9 -55
  52. package/dist/components/loading/Loading.lazy.js +15 -0
  53. package/dist/components/loading/Loading.server.js +16 -0
  54. package/dist/components/loading/Loading.view.js +124 -0
  55. package/dist/components/lottie/Lottie.module.scss.js +2 -8
  56. package/dist/components/post-item/PostItem.module.scss.js +2 -8
  57. package/dist/components/post-item/PostItemAuthor.module.scss.js +2 -8
  58. package/dist/components/post-teaser/PostTeaser.module.scss.js +2 -8
  59. package/dist/components/post-widget/PostWidget.module.scss.js +2 -8
  60. package/dist/components/post-widget-carousel/PostWidgetCarousel.module.scss.js +2 -8
  61. package/dist/components/progressBar/ProgressBar.module.scss.js +1 -7
  62. package/dist/components/quote/Quote.module.scss.js +2 -8
  63. package/dist/components/rich-text/RichText.client.js +54 -23
  64. package/dist/components/rich-text/RichText.js +1 -1
  65. package/dist/components/rich-text/RichText.lazy.js +1 -1
  66. package/dist/components/rich-text/RichText.module.scss.js +4 -8
  67. package/dist/components/rich-text/RichText.server.js +2 -1
  68. package/dist/components/select/Select.module.scss.js +2 -8
  69. package/dist/components/sidenav/SideNav.module.scss.js +2 -8
  70. package/dist/components/skeleton/{Skeleton.module.scss.js → Skeleton.base.module.scss.js} +2 -8
  71. package/dist/components/skeleton/Skeleton.effects.client.js +16 -0
  72. package/dist/components/skeleton/Skeleton.effects.module.scss.js +7 -0
  73. package/dist/components/skeleton/Skeleton.js +21 -18
  74. package/dist/components/slider/Slider.client.js +70 -30
  75. package/dist/components/slider/Slider.module.scss.js +2 -8
  76. package/dist/components/snackbar/Snackbar.module.scss.js +2 -8
  77. package/dist/components/stepper/Stepper.module.scss.js +2 -8
  78. package/dist/components/switch/Switch.module.scss.js +2 -8
  79. package/dist/components/table/Table.module.scss.js +2 -8
  80. package/dist/components/table/TableCell.module.scss.js +2 -8
  81. package/dist/components/teaser/Teaser.module.scss.js +2 -8
  82. package/dist/constants/project.js +1 -1
  83. package/dist/hooks/useResponsiveValue.js +123 -0
  84. package/dist/tsconfig.build.tsbuildinfo +1 -1
  85. package/dist/types/components/accordion/Accordion.effects.client.d.ts +5 -0
  86. package/dist/types/components/calendly/Calendly.server.d.ts +1 -1
  87. package/dist/types/components/calendly/Calendly.view.d.ts +1 -1
  88. package/dist/types/components/card/Card.effects.client.d.ts +7 -0
  89. package/dist/types/components/carousel/Carousel.d.ts +2 -0
  90. package/dist/types/components/carousel/Carousel.lazy.d.ts +2 -0
  91. package/dist/types/components/carousel/Carousel.model.d.ts +14 -0
  92. package/dist/types/components/datePicker/DatePicker.view.d.ts +3 -5
  93. package/dist/types/components/drawer/Drawer.effects.client.d.ts +5 -0
  94. package/dist/types/components/headline/Headline.effects.client.d.ts +1 -0
  95. package/dist/types/components/input/Input.client.d.ts +1 -1
  96. package/dist/types/components/input/Input.view.d.ts +1 -1
  97. package/dist/types/components/loading/Loading.client.d.ts +4 -0
  98. package/dist/types/components/loading/Loading.d.ts +4 -2
  99. package/dist/types/components/loading/Loading.lazy.d.ts +5 -0
  100. package/dist/types/components/loading/Loading.model.d.ts +16 -1
  101. package/dist/types/components/loading/Loading.server.d.ts +4 -0
  102. package/dist/types/components/loading/Loading.view.d.ts +6 -0
  103. package/dist/types/components/loading/index.d.ts +2 -2
  104. package/dist/types/components/rich-text/RichText.d.ts +1 -1
  105. package/dist/types/components/rich-text/RichText.lazy.d.ts +1 -1
  106. package/dist/types/components/rich-text/RichText.model.d.ts +3 -3
  107. package/dist/types/components/skeleton/Skeleton.effects.client.d.ts +5 -0
  108. package/dist/types/components/slider/Slider.model.d.ts +1 -0
  109. package/dist/types/hooks/useResponsiveValue.d.ts +21 -0
  110. package/dist/ui.css +1078 -1543
  111. package/package.json +1 -1
  112. package/dist/components/loading/Loading.module.scss.js +0 -22
@@ -0,0 +1,5 @@
1
+ type Flags = {
2
+ useBorderShift?: boolean;
3
+ };
4
+ export declare function AccordionEffectsLoader({ useBorderShift }: Flags): null;
5
+ export {};
@@ -1,3 +1,3 @@
1
1
  import type { CalendlyProps } from "./Calendly.model";
2
2
  import type { JSX } from "react";
3
- export default function CalendlyServer(props: CalendlyProps): JSX.Element;
3
+ export default function CalendlyServer({ ...rest }: CalendlyProps): JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import type { CalendlyProps } from "./Calendly.model";
2
2
  import type { JSX } from "react";
3
- export declare function CalendlyView({ animationProps, hideLoading, LoadingComponent, ...rest }: CalendlyProps): JSX.Element;
3
+ export declare function CalendlyView({ animationProps, hideLoading, LoadingComponent, calendlyId: _calendlyId, ...rest }: CalendlyProps): JSX.Element;
@@ -0,0 +1,7 @@
1
+ type Flags = {
2
+ useReveal?: boolean;
3
+ useHighlight?: boolean;
4
+ useGradient?: boolean;
5
+ };
6
+ export declare function CardEffectsLoader({ useReveal, useHighlight, useGradient }: Flags): null;
7
+ export {};
@@ -12,6 +12,8 @@ export declare const Carousel: import("react").ComponentType<import("react").HTM
12
12
  classNameItem?: string;
13
13
  classNameDots?: string;
14
14
  classNameDot?: string;
15
+ classNameDotActive?: string;
16
+ responsive?: import("./Carousel.model").CarouselResponsiveConfig;
15
17
  children: import("react").ReactNode;
16
18
  } & {
17
19
  priority?: boolean;
@@ -12,6 +12,8 @@ declare const _default: import("react").ComponentType<import("react").HTMLAttrib
12
12
  classNameItem?: string;
13
13
  classNameDots?: string;
14
14
  classNameDot?: string;
15
+ classNameDotActive?: string;
16
+ responsive?: import("./Carousel.model").CarouselResponsiveConfig;
15
17
  children: import("react").ReactNode;
16
18
  } & {
17
19
  priority?: boolean;
@@ -1,10 +1,22 @@
1
1
  import type { PREV, NEXT } from "./Carousel.services";
2
+ import type { Breakpoints, BreakpointKey } from "@/hooks/useResponsiveValue";
2
3
  import type { Ref, ReactNode, CSSProperties, HTMLAttributes } from "react";
3
4
  export type CarouselRef = {
4
5
  slidePrev: () => void;
5
6
  slideNext: () => void;
6
7
  carouselContainer: HTMLDivElement | null;
7
8
  };
9
+ export type CarouselResponsiveConfig = {
10
+ fallback?: number;
11
+ breakpoints?: Breakpoints;
12
+ valuesByBreakpoint?: Partial<Record<BreakpointKey, number>>;
13
+ valuesByQueries?: ReadonlyArray<readonly [string, number]>;
14
+ containerRules?: ReadonlyArray<{
15
+ min?: number;
16
+ max?: number;
17
+ value: number;
18
+ }>;
19
+ };
8
20
  export type CarouselProps = HTMLAttributes<HTMLDivElement> & {
9
21
  ref?: Ref<CarouselRef>;
10
22
  autoplay?: number;
@@ -19,6 +31,8 @@ export type CarouselProps = HTMLAttributes<HTMLDivElement> & {
19
31
  classNameItem?: string;
20
32
  classNameDots?: string;
21
33
  classNameDot?: string;
34
+ classNameDotActive?: string;
35
+ responsive?: CarouselResponsiveConfig;
22
36
  children: ReactNode;
23
37
  };
24
38
  export type CarouselDirection = typeof PREV | typeof NEXT;
@@ -1,7 +1,5 @@
1
1
  import type { DatePickerProps } from "./DatePicker.model";
2
- import type { ChangeEvent, JSX } from "react";
3
- export declare function DatePickerView({ name, label, value, helperText, errorText, format, placeholder, minDate, maxDate, withTime, minuteStep, ...rest }: DatePickerProps & {
4
- onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
5
- onFocus?: React.FocusEventHandler<HTMLInputElement>;
6
- onBlur?: React.FocusEventHandler<HTMLInputElement>;
2
+ import type { JSX } from "react";
3
+ export declare function DatePickerView({ name, label, value, helperText, errorText, format, placeholder, minDate, maxDate, withTime, minuteStep, onChangeInput, ...rest }: DatePickerProps & {
4
+ onChangeInput?: (raw: string) => void;
7
5
  }): JSX.Element;
@@ -0,0 +1,5 @@
1
+ type Flags = {
2
+ useSlide?: boolean;
3
+ };
4
+ export declare function DrawerEffectsLoader({ useSlide }: Flags): null;
5
+ export {};
@@ -0,0 +1 @@
1
+ export declare function HeadlineEffectsLoader(): null;
@@ -1,5 +1,5 @@
1
1
  import { type JSX } from "react";
2
2
  import type { InputProps } from "./Input.model";
3
- declare function InputClient({ multiline, isFocused, type: rawType, name, value, required, min, max, maxLength, customRegexPattern, errorText, errorTranslations, onValidate, onChange, onFocus, onBlur, ...rest }: InputProps): JSX.Element;
3
+ declare function InputClient({ multiline, isFocused, type: rawType, name, value, required, min, max, maxLength, customRegexPattern, errorText, errorTranslations, readOnly, onValidate, onChange, onFocus, onBlur, ...rest }: InputProps): JSX.Element;
4
4
  declare const _default: import("react").MemoExoticComponent<typeof InputClient>;
5
5
  export default _default;
@@ -1,3 +1,3 @@
1
1
  import type { InputProps } from "./Input.model";
2
2
  import type { JSX } from "react";
3
- export declare function InputView({ name, label, disabled, placeholder, isFocused, labelProps, value, helperText, errorText, required, fullWidth, multiline, maxLength, className, fieldClassName, inputContainerClassName, inputClassName, rows, minRows, maxRows, type, ...rest }: InputProps): JSX.Element;
3
+ export declare function InputView({ inputRef, name, label, disabled, placeholder, isFocused, labelProps, value, helperText, errorText, required, fullWidth, multiline, maxLength, className, fieldClassName, inputContainerClassName, inputClassName, hideCounter, rows, minRows, maxRows, type, ...rest }: InputProps): JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { type FC } from "react";
2
+ import type { LoadingProps } from "./Loading.model";
3
+ declare const LoadingClient: FC<LoadingProps>;
4
+ export default LoadingClient;
@@ -1,3 +1,5 @@
1
1
  import type { LoadingProps } from "./Loading.model";
2
- import type { FC } from "react";
3
- export declare const Loading: FC<LoadingProps>;
2
+ export declare const Loading: import("react").ComponentType<LoadingProps & {
3
+ priority?: boolean;
4
+ }>;
5
+ export default Loading;
@@ -0,0 +1,5 @@
1
+ import type { LoadingProps } from "./Loading.model";
2
+ declare const _default: import("react").ComponentType<LoadingProps & {
3
+ priority?: boolean;
4
+ }>;
5
+ export default _default;
@@ -1,5 +1,20 @@
1
1
  export type LoadingSize = "xs" | "sm" | "md" | "lg" | "xl";
2
- export type LoadingProps = {
2
+ export type LoadingBaseProps = {
3
3
  className?: string;
4
+ style?: React.CSSProperties;
4
5
  size?: LoadingSize;
6
+ ariaLabel?: string;
7
+ reducedMotion?: boolean;
5
8
  };
9
+ export type LoadingOverlayProps = LoadingBaseProps & {
10
+ show?: boolean;
11
+ backdrop?: "light" | "dark" | "auto";
12
+ blur?: number;
13
+ zIndex?: number;
14
+ reducedMotion?: boolean;
15
+ };
16
+ export type LoadingProps = ({
17
+ variant?: "spinner";
18
+ } & LoadingBaseProps) | ({
19
+ variant: "overlay";
20
+ } & LoadingOverlayProps);
@@ -0,0 +1,4 @@
1
+ import type { LoadingProps } from "./Loading.model";
2
+ import type { FC } from "react";
3
+ declare const LoadingServer: FC<LoadingProps>;
4
+ export default LoadingServer;
@@ -0,0 +1,6 @@
1
+ import type { LoadingBaseProps, LoadingOverlayProps } from "./Loading.model";
2
+ import type { FC } from "react";
3
+ export declare const SpinnerView: FC<LoadingBaseProps>;
4
+ export declare const OverlayView: FC<LoadingOverlayProps & {
5
+ resolvedBackdrop: "light" | "dark";
6
+ }>;
@@ -1,2 +1,2 @@
1
- export * from "./Loading";
2
- export type { LoadingProps, LoadingSize } from "./Loading.model";
1
+ export { Loading } from "./Loading";
2
+ export type { LoadingProps, LoadingOverlayProps, LoadingSize } from "./Loading.model";
@@ -7,7 +7,7 @@ export declare const RichText: import("react").ComponentType<{
7
7
  itemProp?: string;
8
8
  linkComponent?: import("../link").LinkProps["linkComponent"];
9
9
  className?: string;
10
- overrideParagraph?: (textContent: string) => React.ReactNode;
10
+ overrideParagraph?: (textContent: string) => import("react").ReactNode;
11
11
  } & import("react").HTMLAttributes<HTMLDivElement> & {
12
12
  priority?: boolean;
13
13
  }>;
@@ -7,7 +7,7 @@ declare const _default: import("react").ComponentType<{
7
7
  itemProp?: string;
8
8
  linkComponent?: import("../link").LinkProps["linkComponent"];
9
9
  className?: string;
10
- overrideParagraph?: (textContent: string) => React.ReactNode;
10
+ overrideParagraph?: (textContent: string) => import("react").ReactNode;
11
11
  } & import("react").HTMLAttributes<HTMLDivElement> & {
12
12
  priority?: boolean;
13
13
  }>;
@@ -2,7 +2,7 @@ import type { AnimatedTextProps } from "@/components/animatedText";
2
2
  import type { LinkProps } from "@/components/link";
3
3
  import type { Schema } from "@/types/schema";
4
4
  import type { Variants } from "@/types/variants";
5
- import type { ReactNode } from "react";
5
+ import type { ReactNode, HTMLAttributes } from "react";
6
6
  export type RichTextProps = {
7
7
  children: ReactNode;
8
8
  animated?: boolean;
@@ -12,5 +12,5 @@ export type RichTextProps = {
12
12
  itemProp?: string;
13
13
  linkComponent?: LinkProps["linkComponent"];
14
14
  className?: string;
15
- overrideParagraph?: (textContent: string) => React.ReactNode;
16
- } & React.HTMLAttributes<HTMLDivElement>;
15
+ overrideParagraph?: (textContent: string) => ReactNode;
16
+ } & HTMLAttributes<HTMLDivElement>;
@@ -0,0 +1,5 @@
1
+ type Anim = 'wave' | 'pulse' | 'none' | undefined;
2
+ export declare function SkeletonEffectsLoader({ animation }: {
3
+ animation: Anim;
4
+ }): null;
5
+ export {};
@@ -24,6 +24,7 @@ export interface SliderProps {
24
24
  onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
25
25
  onChange?: (e: React.ChangeEvent<HTMLInputElement>, value: number) => void;
26
26
  className?: string;
27
+ snap?: "none" | "step" | "marks";
27
28
  }
28
29
  export interface SliderViewProps extends SliderProps {
29
30
  internalValue: number;
@@ -0,0 +1,21 @@
1
+ import { type RefObject } from "react";
2
+ export type BreakpointKey = "xs" | "sm" | "md" | "lg" | "xl";
3
+ export type Breakpoints = Record<BreakpointKey, number>;
4
+ type MQPair<T> = readonly [query: string, value: T];
5
+ export type ContainerRule<T> = {
6
+ min?: number;
7
+ max?: number;
8
+ value: T;
9
+ };
10
+ export type Options<T> = {
11
+ fallback: T;
12
+ breakpoints?: Breakpoints;
13
+ valuesByBreakpoint?: Partial<Record<BreakpointKey, T>>;
14
+ valuesByQueries?: ReadonlyArray<MQPair<T>>;
15
+ containerRules?: ReadonlyArray<ContainerRule<T>>;
16
+ };
17
+ export declare function useResponsiveValue<T>(opts: Options<T>): {
18
+ value: T;
19
+ ref: RefObject<HTMLElement | null>;
20
+ };
21
+ export {};