@prokodo/ui 0.1.11 → 0.1.13

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 (107) hide show
  1. package/README.md +6 -1
  2. package/dist/components/RTE/RTE.client.js +46 -5
  3. package/dist/components/RTE/RTE.css +226 -6
  4. package/dist/components/RTE/RTE.module.css +226 -6
  5. package/dist/components/RTE/RTE.module.scss.js +3 -0
  6. package/dist/components/RTE/RTE.utils.js +23 -1
  7. package/dist/components/accordion/Accordion.css +46 -0
  8. package/dist/components/accordion/Accordion.module.css +46 -0
  9. package/dist/components/accordion/Accordion.module.scss.js +4 -0
  10. package/dist/components/accordion/Accordion.view.js +25 -5
  11. package/dist/components/autocomplete/Autocomplete.client.js +132 -0
  12. package/dist/components/autocomplete/Autocomplete.css +317 -0
  13. package/dist/components/autocomplete/Autocomplete.js +12 -0
  14. package/dist/components/autocomplete/Autocomplete.lazy.js +12 -0
  15. package/dist/components/autocomplete/Autocomplete.module.css +317 -0
  16. package/dist/components/autocomplete/Autocomplete.module.scss.js +21 -0
  17. package/dist/components/autocomplete/Autocomplete.server.js +11 -0
  18. package/dist/components/autocomplete/Autocomplete.view.js +142 -0
  19. package/dist/components/autocomplete/index.js +4 -0
  20. package/dist/components/button/Button.css +1 -0
  21. package/dist/components/button/Button.module.css +1 -0
  22. package/dist/components/card/Card.css +9 -0
  23. package/dist/components/card/Card.module.css +9 -0
  24. package/dist/components/card/Card.module.scss.js +1 -0
  25. package/dist/components/dynamic-list/DynamicList.view.js +1 -1
  26. package/dist/components/input/Input.css +23 -4
  27. package/dist/components/input/Input.module.css +23 -4
  28. package/dist/components/pagination/Pagination.client.js +14 -0
  29. package/dist/components/pagination/Pagination.css +191 -0
  30. package/dist/components/pagination/Pagination.js +12 -0
  31. package/dist/components/pagination/Pagination.lazy.js +12 -0
  32. package/dist/components/pagination/Pagination.module.css +191 -0
  33. package/dist/components/pagination/Pagination.module.scss.js +12 -0
  34. package/dist/components/pagination/Pagination.server.js +11 -0
  35. package/dist/components/pagination/Pagination.utils.js +55 -0
  36. package/dist/components/pagination/Pagination.view.js +98 -0
  37. package/dist/components/pagination/index.js +4 -0
  38. package/dist/components/rich-text/RichText.css +0 -1
  39. package/dist/components/rich-text/RichText.module.css +0 -1
  40. package/dist/components/select/Select.client.js +230 -8
  41. package/dist/components/select/Select.css +47 -16
  42. package/dist/components/select/Select.module.css +47 -16
  43. package/dist/components/select/Select.module.scss.js +2 -0
  44. package/dist/components/select/Select.view.js +20 -57
  45. package/dist/components/switch/Switch.css +1 -1
  46. package/dist/components/switch/Switch.module.css +1 -1
  47. package/dist/components/switch/Switch.view.js +3 -1
  48. package/dist/components/tabs/Tabs.client.js +182 -0
  49. package/dist/components/tabs/Tabs.css +330 -0
  50. package/dist/components/tabs/Tabs.js +13 -0
  51. package/dist/components/tabs/Tabs.lazy.js +15 -0
  52. package/dist/components/tabs/Tabs.module.css +330 -0
  53. package/dist/components/tabs/Tabs.module.scss.js +19 -0
  54. package/dist/components/tabs/Tabs.server.js +11 -0
  55. package/dist/components/tabs/Tabs.view.js +157 -0
  56. package/dist/components/tabs/index.js +4 -0
  57. package/dist/components/tooltip/Tooltip.client.js +382 -0
  58. package/dist/components/tooltip/Tooltip.css +242 -0
  59. package/dist/components/tooltip/Tooltip.js +16 -0
  60. package/dist/components/tooltip/Tooltip.module.css +242 -0
  61. package/dist/components/tooltip/Tooltip.module.scss.js +15 -0
  62. package/dist/components/tooltip/Tooltip.server.js +12 -0
  63. package/dist/components/tooltip/Tooltip.view.js +127 -0
  64. package/dist/components/tooltip/index.js +4 -0
  65. package/dist/constants/project.js +1 -1
  66. package/dist/index.js +8 -0
  67. package/dist/theme.css +640 -22
  68. package/dist/tsconfig.build.tsbuildinfo +1 -1
  69. package/dist/types/components/RTE/RTE.utils.d.ts +1 -0
  70. package/dist/types/components/accordion/Accordion.d.ts +3 -0
  71. package/dist/types/components/accordion/Accordion.lazy.d.ts +3 -0
  72. package/dist/types/components/accordion/Accordion.model.d.ts +3 -0
  73. package/dist/types/components/accordion/Accordion.view.d.ts +1 -1
  74. package/dist/types/components/autocomplete/Autocomplete.client.d.ts +5 -0
  75. package/dist/types/components/autocomplete/Autocomplete.d.ts +4 -0
  76. package/dist/types/components/autocomplete/Autocomplete.lazy.d.ts +5 -0
  77. package/dist/types/components/autocomplete/Autocomplete.model.d.ts +58 -0
  78. package/dist/types/components/autocomplete/Autocomplete.server.d.ts +3 -0
  79. package/dist/types/components/autocomplete/Autocomplete.view.d.ts +3 -0
  80. package/dist/types/components/autocomplete/index.d.ts +2 -0
  81. package/dist/types/components/card/Card.model.d.ts +1 -1
  82. package/dist/types/components/grid/Grid.model.d.ts +37 -7
  83. package/dist/types/components/pagination/Pagination.client.d.ts +5 -0
  84. package/dist/types/components/pagination/Pagination.d.ts +4 -0
  85. package/dist/types/components/pagination/Pagination.lazy.d.ts +5 -0
  86. package/dist/types/components/pagination/Pagination.model.d.ts +22 -0
  87. package/dist/types/components/pagination/Pagination.server.d.ts +3 -0
  88. package/dist/types/components/pagination/Pagination.utils.d.ts +13 -0
  89. package/dist/types/components/pagination/Pagination.view.d.ts +3 -0
  90. package/dist/types/components/pagination/index.d.ts +2 -0
  91. package/dist/types/components/select/Select.model.d.ts +16 -1
  92. package/dist/types/components/tabs/Tabs.client.d.ts +5 -0
  93. package/dist/types/components/tabs/Tabs.d.ts +4 -0
  94. package/dist/types/components/tabs/Tabs.lazy.d.ts +5 -0
  95. package/dist/types/components/tabs/Tabs.model.d.ts +43 -0
  96. package/dist/types/components/tabs/Tabs.server.d.ts +3 -0
  97. package/dist/types/components/tabs/Tabs.view.d.ts +3 -0
  98. package/dist/types/components/tabs/index.d.ts +2 -0
  99. package/dist/types/components/tooltip/Tooltip.client.d.ts +5 -0
  100. package/dist/types/components/tooltip/Tooltip.d.ts +4 -0
  101. package/dist/types/components/tooltip/Tooltip.lazy.d.ts +5 -0
  102. package/dist/types/components/tooltip/Tooltip.model.d.ts +47 -0
  103. package/dist/types/components/tooltip/Tooltip.server.d.ts +3 -0
  104. package/dist/types/components/tooltip/Tooltip.view.d.ts +3 -0
  105. package/dist/types/components/tooltip/index.d.ts +2 -0
  106. package/dist/types/index.d.ts +4 -0
  107. package/package.json +23 -2
@@ -1,4 +1,5 @@
1
1
  export declare const bem: (element?: string, modifiers?: import("react-bem-helper").WordSet, extra?: import("react-bem-helper").WordSet) => string;
2
2
  export declare function addClasses(el: Element | null, className: string): void;
3
3
  export declare function decorateToolbar(toolbarEl: HTMLElement): void;
4
+ export declare function syncPickerSelected(toolbarEl: HTMLElement): void;
4
5
  export declare function cleanupQuill(surfaceEl: HTMLDivElement | null, mountEl: HTMLDivElement | null): void;
@@ -1,5 +1,8 @@
1
1
  export declare const Accordion: import("react").ComponentType<{
2
2
  id: string;
3
+ type?: "card" | "panel";
4
+ headerWrapperClassName?: string;
5
+ headerToggleClassName?: string;
3
6
  expanded?: number | null;
4
7
  className?: string;
5
8
  variant?: import("../../types/variants").Variants;
@@ -1,5 +1,8 @@
1
1
  declare const _default: import("react").ComponentType<{
2
2
  id: string;
3
+ type?: "card" | "panel";
4
+ headerWrapperClassName?: string;
5
+ headerToggleClassName?: string;
3
6
  expanded?: number | null;
4
7
  className?: string;
5
8
  variant?: import("../../types/variants").Variants;
@@ -18,6 +18,9 @@ export type AccordionItem = {
18
18
  };
19
19
  export type AccordionProps = {
20
20
  id: string;
21
+ type?: "card" | "panel";
22
+ headerWrapperClassName?: string;
23
+ headerToggleClassName?: string;
21
24
  expanded?: number | null;
22
25
  className?: string;
23
26
  variant?: Variants;
@@ -1,3 +1,3 @@
1
1
  import type { AccordionViewProps } from "./Accordion.model";
2
2
  import type { JSX } from "react";
3
- export declare function AccordionView({ id, variant, className, items, expandedIndex, onToggle, titleOptions, iconProps, ...domRest }: AccordionViewProps): JSX.Element;
3
+ export declare function AccordionView({ id, type, headerWrapperClassName, headerToggleClassName, variant, className, items, expandedIndex, onToggle, titleOptions, iconProps, ...domRest }: AccordionViewProps): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { type JSX } from "react";
2
+ import type { AutocompleteProps } from "./Autocomplete.model";
3
+ declare function AutocompleteClient({ name, value, items, minQueryLength, onChange, onSelect, ...rest }: AutocompleteProps): JSX.Element;
4
+ declare const _default: import("react").MemoExoticComponent<typeof AutocompleteClient>;
5
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import type { AutocompleteProps } from "./Autocomplete.model";
2
+ export declare const Autocomplete: import("react").ComponentType<AutocompleteProps & {
3
+ priority?: boolean;
4
+ }>;
@@ -0,0 +1,5 @@
1
+ import type { AutocompleteProps } from "./Autocomplete.model";
2
+ declare const _default: import("react").ComponentType<AutocompleteProps & {
3
+ priority?: boolean;
4
+ }>;
5
+ export default _default;
@@ -0,0 +1,58 @@
1
+ import type { InputProps } from "../input";
2
+ import type { KeyboardEventHandler } from "react";
3
+ type AutocompleteInputProps = Omit<Extract<InputProps, {
4
+ multiline?: false;
5
+ }>, "id" | "name" | "value" | "onChange" | "onFocus" | "onKeyDown" | "label" | "disabled" | "required" | "fullWidth" | "readOnly" | "autoComplete" | "aria-describedby" | "aria-labelledby" | "placeholder">;
6
+ export type AutocompleteItem = {
7
+ value: string;
8
+ label: string;
9
+ description?: string;
10
+ };
11
+ export type AutocompleteChangeEvent = {
12
+ query: string;
13
+ };
14
+ export type AutocompleteClientState = {
15
+ open: boolean;
16
+ listTop?: number;
17
+ activeIndex: number;
18
+ onInputChange: (query: string) => void;
19
+ onInputFocus: () => void;
20
+ onInputKeyDown: KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;
21
+ onSelectItem: (item: AutocompleteItem) => void;
22
+ };
23
+ export type AutocompleteProps = {
24
+ id?: string;
25
+ name: string;
26
+ label?: string;
27
+ placeholder?: string;
28
+ required?: boolean;
29
+ disabled?: boolean;
30
+ fullWidth?: boolean;
31
+ readOnly?: boolean;
32
+ autoComplete?: string;
33
+ "aria-describedby"?: string;
34
+ "aria-labelledby"?: string;
35
+ value?: string;
36
+ items?: AutocompleteItem[];
37
+ loading?: boolean;
38
+ loadingText?: string;
39
+ emptyText?: string;
40
+ minQueryLength?: number;
41
+ minQueryLengthText?: string;
42
+ className?: string;
43
+ inputClassName?: string;
44
+ listClassName?: string;
45
+ itemClassName?: string;
46
+ inputProps?: AutocompleteInputProps & {
47
+ hideLabel?: boolean;
48
+ };
49
+ onChange?: (event: AutocompleteChangeEvent) => void;
50
+ onSelect?: (item: AutocompleteItem) => void;
51
+ };
52
+ export type AutocompleteViewProps = Omit<AutocompleteProps, "onChange" | "onSelect"> & {
53
+ open?: boolean;
54
+ _clientState?: AutocompleteClientState;
55
+ onChange?: (event: AutocompleteChangeEvent) => void;
56
+ onSelect?: (item: AutocompleteItem) => void;
57
+ };
58
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { AutocompleteProps } from "./Autocomplete.model";
2
+ import type { JSX } from "react";
3
+ export default function AutocompleteServer(props: AutocompleteProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { AutocompleteViewProps } from "./Autocomplete.model";
2
+ import type { JSX } from "react";
3
+ export declare function AutocompleteView({ id, name, label, placeholder, required, disabled, fullWidth, readOnly, autoComplete, "aria-describedby": ariaDescribedBy, "aria-labelledby": ariaLabelledBy, value, items, loading, loadingText, emptyText, minQueryLength, minQueryLengthText, className, inputClassName, listClassName, itemClassName, inputProps, _clientState, onChange, onSelect, }: AutocompleteViewProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from "./Autocomplete";
2
+ export type { AutocompleteProps, AutocompleteItem, AutocompleteChangeEvent, } from "./Autocomplete.model";
@@ -5,7 +5,7 @@ import type { SkeletonProps } from "../skeleton";
5
5
  import type { Variants } from "@/types/variants";
6
6
  import type { StaticImageData } from "next/image";
7
7
  import type { Ref, ReactNode, KeyboardEvent } from "react";
8
- export type CardVariant = Variants;
8
+ export type CardVariant = Variants | "panel";
9
9
  export type CardBackgroundProps = {
10
10
  src?: string | StaticImageData;
11
11
  alt?: string;
@@ -1,17 +1,47 @@
1
- import type { HTMLAttributes, ReactNode } from "react";
2
- export type GridProps = HTMLAttributes<HTMLDivElement> & {
1
+ import type { CSSProperties, ReactNode } from "react";
2
+ export type ResponsiveGridValue = number | {
3
+ [key: string]: number;
4
+ };
5
+ export type GridGap = "xs" | "sm" | "md" | "lg" | "xl" | "none";
6
+ export type GridBreakpoint = "xs" | "sm" | "md" | "lg" | "xl";
7
+ export type GridColumns = number | ResponsiveGridValue;
8
+ export type GridItemSize = number | ResponsiveGridValue;
9
+ export type GridRowHeight = number | "auto";
10
+ export interface GridProps {
11
+ columns?: GridColumns;
12
+ gap?: GridGap | {
13
+ [key in GridBreakpoint]?: GridGap;
14
+ };
15
+ rowHeight?: GridRowHeight;
16
+ justifyItems?: CSSProperties["justifyItems"];
17
+ alignItems?: CSSProperties["alignItems"];
18
+ alignContent?: CSSProperties["alignContent"];
19
+ autoFlow?: CSSProperties["gridAutoFlow"];
3
20
  spacing?: number;
4
21
  className?: string;
22
+ style?: CSSProperties;
5
23
  children?: ReactNode;
6
- };
7
- export type GridRowProps = HTMLAttributes<HTMLDivElement> & {
8
- spacing?: number;
9
- align?: "left" | "center" | "right";
24
+ }
25
+ export interface GridItemProps {
26
+ columns?: number | {
27
+ [key in GridBreakpoint]?: number;
28
+ };
29
+ rows?: number;
30
+ size?: GridItemSize;
31
+ justifySelf?: CSSProperties["justifySelf"];
32
+ alignSelf?: CSSProperties["alignSelf"];
10
33
  className?: string;
34
+ style?: CSSProperties;
11
35
  children?: ReactNode;
36
+ }
37
+ export interface GridRowProps {
38
+ align?: "left" | "center" | "right";
12
39
  xs?: number;
13
40
  sm?: number;
14
41
  md?: number;
15
42
  lg?: number;
16
43
  xl?: number;
17
- };
44
+ className?: string;
45
+ style?: CSSProperties;
46
+ children?: ReactNode;
47
+ }
@@ -0,0 +1,5 @@
1
+ import { type JSX } from "react";
2
+ import type { PaginationProps } from "./Pagination.model";
3
+ declare function PaginationClient(p: PaginationProps): JSX.Element | null;
4
+ declare const _default: import("react").MemoExoticComponent<typeof PaginationClient>;
5
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import type { PaginationProps } from "./Pagination.model";
2
+ export declare const Pagination: import("react").ComponentType<PaginationProps & {
3
+ priority?: boolean;
4
+ }>;
@@ -0,0 +1,5 @@
1
+ import type { PaginationProps } from "./Pagination.model";
2
+ declare const _default: import("react").ComponentType<PaginationProps & {
3
+ priority?: boolean;
4
+ }>;
5
+ export default _default;
@@ -0,0 +1,22 @@
1
+ export type PaginationTranslations = {
2
+ pagination?: string;
3
+ prev?: string;
4
+ next?: string;
5
+ pageGoTo?: string;
6
+ pageCurrent?: string;
7
+ };
8
+ export type PaginationPageChangeHandler = (page: number) => void;
9
+ export type PaginationProps = {
10
+ translations?: PaginationTranslations;
11
+ page: number;
12
+ totalPages: number;
13
+ disabled?: boolean;
14
+ isPending?: boolean;
15
+ onPrev?: () => void;
16
+ onNext?: () => void;
17
+ onPageChange?: PaginationPageChangeHandler;
18
+ siblingCount?: number;
19
+ boundaryCount?: number;
20
+ readOnly?: boolean;
21
+ className?: string;
22
+ };
@@ -0,0 +1,3 @@
1
+ import type { PaginationProps } from "./Pagination.model";
2
+ import type { JSX } from "react";
3
+ export default function PaginationServer(p: PaginationProps): JSX.Element | null;
@@ -0,0 +1,13 @@
1
+ export type PaginationItem = {
2
+ type: "page";
3
+ value: number;
4
+ } | {
5
+ type: "ellipsis";
6
+ key: string;
7
+ };
8
+ export declare function buildPaginationItems(args: {
9
+ page: number;
10
+ totalPages: number;
11
+ siblingCount: number;
12
+ boundaryCount: number;
13
+ }): PaginationItem[];
@@ -0,0 +1,3 @@
1
+ import type { PaginationProps } from "./Pagination.model";
2
+ import type { JSX } from "react";
3
+ export declare function PaginationView({ className, page, totalPages, disabled, isPending, siblingCount, boundaryCount, onPrev, onNext, onPageChange, readOnly, translations: t, }: PaginationProps): JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ export * from "./Pagination";
2
+ export type { PaginationProps, PaginationTranslations, PaginationPageChangeHandler, } from "./Pagination.model";
@@ -1,5 +1,5 @@
1
1
  import type { LabelProps } from "../label";
2
- import type { ChangeEvent, RefObject, ReactNode, Ref, MouseEventHandler, KeyboardEventHandler } from "react";
2
+ import type { ChangeEvent, RefObject, ReactNode, Ref, MouseEventHandler, KeyboardEventHandler, CSSProperties, JSX } from "react";
3
3
  export type SelectEvent = {
4
4
  target: {
5
5
  dataset?: Record<string, unknown>;
@@ -41,6 +41,21 @@ type SelectClientState<V extends string = string> = {
41
41
  onButtonClick: MouseEventHandler<HTMLButtonElement>;
42
42
  onButtonKey: KeyboardEventHandler<HTMLButtonElement>;
43
43
  onOptionClick: (v: V | null) => void;
44
+ renderListbox?: (args: {
45
+ id: string;
46
+ className: string;
47
+ open: boolean;
48
+ style?: CSSProperties;
49
+ required?: boolean;
50
+ multiple?: boolean;
51
+ placeholder?: string;
52
+ items: SelectItem<V>[];
53
+ value: SelectValue<V>;
54
+ onOptionClick: (v: V | null) => void;
55
+ iconVisible?: boolean;
56
+ bemItem: (mods?: Record<string, boolean>) => string;
57
+ bemCheckbox: (mods?: Record<string, boolean>) => string;
58
+ }) => JSX.Element | null;
44
59
  };
45
60
  export type SelectViewProps<V extends string = string> = SelectProps<V> & {
46
61
  _clientState?: SelectClientState<V>;
@@ -0,0 +1,5 @@
1
+ import { type JSX } from "react";
2
+ import type { TabsProps } from "./Tabs.model";
3
+ declare function TabsClient<Value extends string = string>({ items, value, defaultValue, activationMode, disabled, onChange, ...rest }: TabsProps<Value>): JSX.Element;
4
+ declare const _default: import("react").MemoExoticComponent<typeof TabsClient>;
5
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import type { TabsProps } from "./Tabs.model";
2
+ export declare const Tabs: import("react").ComponentType<TabsProps & {
3
+ priority?: boolean;
4
+ }>;
@@ -0,0 +1,5 @@
1
+ import type { TabsProps } from "./Tabs.model";
2
+ declare const _default: import("react").ComponentType<TabsProps & {
3
+ priority?: boolean;
4
+ }>;
5
+ export default _default;
@@ -0,0 +1,43 @@
1
+ import type { ChipProps } from "../chip";
2
+ import type { KeyboardEvent, MouseEvent, ReactNode, RefObject } from "react";
3
+ export type TabsBadgeChipProps = Omit<ChipProps, "label">;
4
+ export type TabsItem<Value extends string = string> = {
5
+ value: Value;
6
+ label: ReactNode;
7
+ badge?: ReactNode;
8
+ badgeChipProps?: TabsBadgeChipProps;
9
+ disabled?: boolean;
10
+ className?: string;
11
+ content: ReactNode;
12
+ };
13
+ export type TabsChangeEvent<Value extends string = string> = {
14
+ value: Value;
15
+ index: number;
16
+ };
17
+ export type TabsProps<Value extends string = string> = {
18
+ id: string;
19
+ ariaLabel?: string;
20
+ items: TabsItem<Value>[];
21
+ value?: Value;
22
+ defaultValue?: Value;
23
+ activationMode?: "automatic" | "manual";
24
+ orientation?: "horizontal" | "vertical";
25
+ disabled?: boolean;
26
+ fullWidth?: boolean;
27
+ className?: string;
28
+ listClassName?: string;
29
+ tabClassName?: string;
30
+ panelsClassName?: string;
31
+ badgeChipProps?: TabsBadgeChipProps;
32
+ onChange?: (event: TabsChangeEvent<Value>) => void;
33
+ };
34
+ export type TabsClientState<Value extends string = string> = {
35
+ activeValue: Value;
36
+ focusIndex: number;
37
+ tabsRef: RefObject<Array<HTMLButtonElement | null>>;
38
+ onTabClick: (index: number, event: MouseEvent<HTMLButtonElement>) => void;
39
+ onTabKeyDown: (index: number, event: KeyboardEvent<HTMLButtonElement>) => void;
40
+ };
41
+ export type TabsViewProps<Value extends string = string> = TabsProps<Value> & {
42
+ _clientState?: TabsClientState<Value>;
43
+ };
@@ -0,0 +1,3 @@
1
+ import type { TabsProps } from "./Tabs.model";
2
+ import type { JSX } from "react";
3
+ export default function TabsServer<Value extends string = string>(props: TabsProps<Value>): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { TabsViewProps } from "./Tabs.model";
2
+ import type { JSX } from "react";
3
+ export declare function TabsView<Value extends string = string>({ id, ariaLabel, items, value, defaultValue, orientation, disabled, fullWidth, className, listClassName, tabClassName, panelsClassName, badgeChipProps, _clientState, }: TabsViewProps<Value>): JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ export * from "./Tabs";
2
+ export type { TabsChangeEvent, TabsItem, TabsProps } from "./Tabs.model";
@@ -0,0 +1,5 @@
1
+ import { type JSX } from "react";
2
+ import type { TooltipProps } from "./Tooltip.model";
3
+ declare function TooltipClient(props: TooltipProps): JSX.Element;
4
+ declare const _default: import("react").MemoExoticComponent<typeof TooltipClient>;
5
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import type { TooltipProps } from "./Tooltip.model";
2
+ export declare const Tooltip: import("react").ComponentType<TooltipProps & {
3
+ priority?: boolean;
4
+ }>;
@@ -0,0 +1,5 @@
1
+ import type { TooltipProps } from "./Tooltip.model";
2
+ declare const _default: import("react").ComponentType<TooltipProps & {
3
+ priority?: boolean;
4
+ }>;
5
+ export default _default;
@@ -0,0 +1,47 @@
1
+ import type { HTMLAttributes, ReactElement, ReactNode } from "react";
2
+ export type TooltipAnchor = "element" | "pointer";
3
+ export type TooltipPlacement = "top" | "bottom" | "left" | "right";
4
+ export type TooltipOpenChangeEvent = (open: boolean) => void;
5
+ export type TooltipTriggerElement = ReactElement<HTMLAttributes<HTMLElement>>;
6
+ export type TooltipProps = {
7
+ anchor?: TooltipAnchor;
8
+ content: ReactNode;
9
+ children: TooltipTriggerElement;
10
+ id?: string;
11
+ placement?: TooltipPlacement;
12
+ preventOverflow?: boolean;
13
+ portal?: boolean;
14
+ overlayRootId?: string;
15
+ zIndex?: number;
16
+ offset?: number;
17
+ mobileBreakpoint?: number;
18
+ disabled?: boolean;
19
+ open?: boolean;
20
+ defaultOpen?: boolean;
21
+ onOpenChange?: TooltipOpenChangeEvent;
22
+ delay?: number;
23
+ closeDelay?: number;
24
+ openOnHover?: boolean;
25
+ openOnFocus?: boolean;
26
+ className?: string;
27
+ tooltipClassName?: string;
28
+ triggerClassName?: string;
29
+ triggerProps?: HTMLAttributes<HTMLElement>;
30
+ };
31
+ export type TooltipViewBubbleStyle = React.CSSProperties & {
32
+ ["--pk-tt-x"]?: string;
33
+ ["--pk-tt-y"]?: string;
34
+ ["--pk-tt-arrow-x"]?: string;
35
+ ["--pk-tt-arrow-y"]?: string;
36
+ ["--pk-tt-z"]?: string;
37
+ };
38
+ export type TooltipViewProps = TooltipProps & {
39
+ __rootRef?: React.RefObject<HTMLSpanElement | null>;
40
+ __triggerRef?: React.RefObject<HTMLElement | null>;
41
+ __bubbleRef?: React.RefObject<HTMLSpanElement | null>;
42
+ __bubbleStyle?: TooltipViewBubbleStyle;
43
+ __renderVisualBubble?: boolean;
44
+ __open?: boolean;
45
+ __placement?: TooltipPlacement;
46
+ __tooltipId?: string;
47
+ };
@@ -0,0 +1,3 @@
1
+ import type { TooltipProps } from "./Tooltip.model";
2
+ import type { JSX } from "react";
3
+ export default function TooltipServer(props: TooltipProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { type JSX } from "react";
2
+ import type { TooltipViewProps } from "./Tooltip.model";
3
+ export declare function TooltipView(props: TooltipViewProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from "./Tooltip";
2
+ export type { TooltipProps, TooltipAnchor, TooltipPlacement, TooltipOpenChangeEvent, TooltipTriggerElement, } from "./Tooltip.model";
@@ -1,6 +1,7 @@
1
1
  export { Accordion } from "./components/accordion";
2
2
  export { Animated } from "./components/animated";
3
3
  export { AnimatedText } from "./components/animatedText";
4
+ export { Autocomplete } from "./components/autocomplete";
4
5
  export { Avatar } from "./components/avatar";
5
6
  export { BaseLink } from "./components/base-link";
6
7
  export { Button } from "./components/button";
@@ -26,6 +27,7 @@ export { List } from "./components/list";
26
27
  export { Loading } from "./components/loading";
27
28
  export { Lottie } from "./components/lottie";
28
29
  export { Map } from "./components/map";
30
+ export { Pagination } from "./components/pagination";
29
31
  export { PostItem } from "./components/post-item";
30
32
  export { PostTeaser } from "./components/post-teaser";
31
33
  export { PostWidget } from "./components/post-widget";
@@ -43,5 +45,7 @@ export { Snackbar } from "./components/snackbar";
43
45
  export { Stepper } from "./components/stepper";
44
46
  export { Switch } from "./components/switch";
45
47
  export { Table } from "./components/table";
48
+ export { Tabs } from "./components/tabs";
46
49
  export { Teaser } from "./components/teaser";
50
+ export { Tooltip } from "./components/tooltip";
47
51
  export { UIRuntimeProvider, useUIRuntime } from "./helpers/runtime.client";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prokodo/ui",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "type": "module",
5
5
  "description": "UI components for production-grade Next.js + Headless CMS (Strapi, Contentful, Headless WordPress) websites by prokodo – built for Core Web Vitals & SEO.",
6
6
  "sideEffects": [
@@ -46,6 +46,11 @@
46
46
  "import": "./dist/components/animatedText/index.js",
47
47
  "types": "./dist/types/components/animatedText/index.d.ts"
48
48
  },
49
+ "./autocomplete": {
50
+ "import": "./dist/components/autocomplete/index.js",
51
+ "types": "./dist/types/components/autocomplete/index.d.ts"
52
+ },
53
+ "./autocomplete.css": "./dist/components/autocomplete/Autocomplete.css",
49
54
  "./avatar": {
50
55
  "import": "./dist/components/avatar/index.js",
51
56
  "types": "./dist/types/components/avatar/index.d.ts"
@@ -166,6 +171,11 @@
166
171
  "import": "./dist/components/map/index.js",
167
172
  "types": "./dist/types/components/map/index.d.ts"
168
173
  },
174
+ "./pagination": {
175
+ "import": "./dist/components/pagination/index.js",
176
+ "types": "./dist/types/components/pagination/index.d.ts"
177
+ },
178
+ "./pagination.css": "./dist/components/pagination/Pagination.css",
169
179
  "./post-item": {
170
180
  "import": "./dist/components/post-item/index.js",
171
181
  "types": "./dist/types/components/post-item/index.d.ts"
@@ -246,11 +256,21 @@
246
256
  "types": "./dist/types/components/table/index.d.ts"
247
257
  },
248
258
  "./table.css": "./dist/components/table/Table.css",
259
+ "./tabs": {
260
+ "import": "./dist/components/tabs/index.js",
261
+ "types": "./dist/types/components/tabs/index.d.ts"
262
+ },
263
+ "./tabs.css": "./dist/components/tabs/Tabs.css",
249
264
  "./teaser": {
250
265
  "import": "./dist/components/teaser/index.js",
251
266
  "types": "./dist/types/components/teaser/index.d.ts"
252
267
  },
253
- "./teaser.css": "./dist/components/teaser/Teaser.css"
268
+ "./teaser.css": "./dist/components/teaser/Teaser.css",
269
+ "./tooltip": {
270
+ "import": "./dist/components/tooltip/index.js",
271
+ "types": "./dist/types/components/tooltip/index.d.ts"
272
+ },
273
+ "./tooltip.css": "./dist/components/tooltip/Tooltip.css"
254
274
  },
255
275
  "repository": {
256
276
  "type": "git",
@@ -320,6 +340,7 @@
320
340
  "@svgr/webpack": "^8.1.0",
321
341
  "@testing-library/jest-dom": "^6.5.0",
322
342
  "@testing-library/react": "^16.0.1",
343
+ "@testing-library/user-event": "^14.6.1",
323
344
  "@types/google.maps": "^3.55.11",
324
345
  "@types/hast": "^3.0.4",
325
346
  "@types/jest": "^29.5.13",