@prokodo/ui 0.1.13 → 0.1.14

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 (48) hide show
  1. package/README.md +2 -0
  2. package/dist/components/button/Button.css +114 -6
  3. package/dist/components/button/Button.module.css +114 -6
  4. package/dist/components/button/Button.module.scss.js +10 -2
  5. package/dist/components/button/Button.view.js +1 -0
  6. package/dist/components/checkbox/Checkbox.client.js +42 -0
  7. package/dist/components/checkbox/Checkbox.css +312 -0
  8. package/dist/components/checkbox/Checkbox.js +12 -0
  9. package/dist/components/checkbox/Checkbox.lazy.js +12 -0
  10. package/dist/components/checkbox/Checkbox.module.css +312 -0
  11. package/dist/components/checkbox/Checkbox.module.scss.js +20 -0
  12. package/dist/components/checkbox/Checkbox.server.js +20 -0
  13. package/dist/components/checkbox/Checkbox.view.js +86 -0
  14. package/dist/components/checkbox/index.js +4 -0
  15. package/dist/components/checkbox-group/CheckboxGroup.client.js +57 -0
  16. package/dist/components/checkbox-group/CheckboxGroup.css +238 -0
  17. package/dist/components/checkbox-group/CheckboxGroup.js +13 -0
  18. package/dist/components/checkbox-group/CheckboxGroup.lazy.js +12 -0
  19. package/dist/components/checkbox-group/CheckboxGroup.module.css +238 -0
  20. package/dist/components/checkbox-group/CheckboxGroup.module.scss.js +15 -0
  21. package/dist/components/checkbox-group/CheckboxGroup.server.js +25 -0
  22. package/dist/components/checkbox-group/CheckboxGroup.view.js +97 -0
  23. package/dist/components/checkbox-group/index.js +4 -0
  24. package/dist/components/dialog/Dialog.view.js +2 -1
  25. package/dist/components/snackbar/Snackbar.css +5 -1
  26. package/dist/components/snackbar/Snackbar.module.css +5 -1
  27. package/dist/constants/project.js +1 -1
  28. package/dist/index.js +4 -0
  29. package/dist/theme.css +430 -9
  30. package/dist/tsconfig.build.tsbuildinfo +1 -1
  31. package/dist/types/components/checkbox/Checkbox.client.d.ts +4 -0
  32. package/dist/types/components/checkbox/Checkbox.d.ts +18 -0
  33. package/dist/types/components/checkbox/Checkbox.lazy.d.ts +19 -0
  34. package/dist/types/components/checkbox/Checkbox.model.d.ts +23 -0
  35. package/dist/types/components/checkbox/Checkbox.server.d.ts +3 -0
  36. package/dist/types/components/checkbox/Checkbox.view.d.ts +3 -0
  37. package/dist/types/components/checkbox/index.d.ts +2 -0
  38. package/dist/types/components/checkbox-group/CheckboxGroup.client.d.ts +4 -0
  39. package/dist/types/components/checkbox-group/CheckboxGroup.d.ts +4 -0
  40. package/dist/types/components/checkbox-group/CheckboxGroup.lazy.d.ts +5 -0
  41. package/dist/types/components/checkbox-group/CheckboxGroup.model.d.ts +38 -0
  42. package/dist/types/components/checkbox-group/CheckboxGroup.server.d.ts +3 -0
  43. package/dist/types/components/checkbox-group/CheckboxGroup.view.d.ts +3 -0
  44. package/dist/types/components/checkbox-group/index.d.ts +2 -0
  45. package/dist/types/components/dialog/Dialog.model.d.ts +1 -0
  46. package/dist/types/components/dialog/Dialog.view.d.ts +1 -1
  47. package/dist/types/index.d.ts +2 -0
  48. package/package.json +11 -1
@@ -0,0 +1,4 @@
1
+ import type { CheckboxProps } from "./Checkbox.model";
2
+ declare function CheckboxClient<T extends string = string>(props: CheckboxProps<T>): import("react").JSX.Element;
3
+ declare const _default: typeof CheckboxClient;
4
+ export default _default;
@@ -0,0 +1,18 @@
1
+ export declare const Checkbox: import("react").ComponentType<Omit<import("react").HTMLAttributes<HTMLInputElement>, "title" | "onChange"> & {
2
+ name: string;
3
+ value: string;
4
+ title: import("react").ReactNode;
5
+ description?: import("react").ReactNode | null;
6
+ icon?: Omit<import("../icon").IconProps, "label"> | null;
7
+ iconLabel?: string | null;
8
+ checked?: boolean;
9
+ defaultChecked?: boolean;
10
+ required?: boolean;
11
+ showRequiredMark?: boolean;
12
+ disabled?: boolean;
13
+ variant?: import("./Checkbox.model").CheckboxVariant;
14
+ onChange?: (event: import("react").ChangeEvent<HTMLInputElement>, checked: boolean) => void;
15
+ className?: string;
16
+ } & {
17
+ priority?: boolean;
18
+ }>;
@@ -0,0 +1,19 @@
1
+ declare const _default: import("react").ComponentType<Omit<import("react").HTMLAttributes<HTMLInputElement>, "title" | "onChange"> & {
2
+ name: string;
3
+ value: string;
4
+ title: import("react").ReactNode;
5
+ description?: import("react").ReactNode | null;
6
+ icon?: Omit<import("../icon").IconProps, "label"> | null;
7
+ iconLabel?: string | null;
8
+ checked?: boolean;
9
+ defaultChecked?: boolean;
10
+ required?: boolean;
11
+ showRequiredMark?: boolean;
12
+ disabled?: boolean;
13
+ variant?: import("./Checkbox.model").CheckboxVariant;
14
+ onChange?: (event: import("react").ChangeEvent<HTMLInputElement>, checked: boolean) => void;
15
+ className?: string;
16
+ } & {
17
+ priority?: boolean;
18
+ }>;
19
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import type { IconProps } from "@/components/icon";
2
+ import type { ChangeEvent, HTMLAttributes, ReactNode } from "react";
3
+ export type CheckboxVariant = "plain" | "card";
4
+ export type CheckboxProps<T extends string = string> = Omit<HTMLAttributes<HTMLInputElement>, "onChange" | "title"> & {
5
+ name: string;
6
+ value: T;
7
+ title: ReactNode;
8
+ description?: ReactNode | null;
9
+ icon?: Omit<IconProps, "label"> | null;
10
+ iconLabel?: string | null;
11
+ checked?: boolean;
12
+ defaultChecked?: boolean;
13
+ required?: boolean;
14
+ showRequiredMark?: boolean;
15
+ disabled?: boolean;
16
+ variant?: CheckboxVariant;
17
+ onChange?: (event: ChangeEvent<HTMLInputElement>, checked: boolean) => void;
18
+ className?: string;
19
+ };
20
+ export type CheckboxViewProps<T extends string = string> = CheckboxProps<T> & {
21
+ isChecked: boolean;
22
+ onChangeInternal?: (event: ChangeEvent<HTMLInputElement>) => void;
23
+ };
@@ -0,0 +1,3 @@
1
+ import type { CheckboxProps } from "./Checkbox.model";
2
+ import type { JSX } from "react";
3
+ export default function CheckboxServer<T extends string = string>(props: CheckboxProps<T>): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { CheckboxViewProps } from "./Checkbox.model";
2
+ import type { JSX } from "react";
3
+ export declare function CheckboxView<T extends string = string>({ className, name, value, title, description, icon, iconLabel, required, showRequiredMark, disabled, variant, isChecked, onChangeInternal, }: CheckboxViewProps<T>): JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from "./Checkbox";
2
+ export type { CheckboxProps, CheckboxVariant } from "./Checkbox.model";
@@ -0,0 +1,4 @@
1
+ import type { CheckboxGroupProps } from "./CheckboxGroup.model";
2
+ declare function CheckboxGroupClient<T extends string>(props: CheckboxGroupProps<T>): import("react").JSX.Element;
3
+ declare const _default: typeof CheckboxGroupClient;
4
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import type { CheckboxGroupProps } from "./CheckboxGroup.model";
2
+ export declare const CheckboxGroup: import("react").ComponentType<CheckboxGroupProps<string> & {
3
+ priority?: boolean;
4
+ }>;
@@ -0,0 +1,5 @@
1
+ import type { CheckboxGroupProps } from "./CheckboxGroup.model";
2
+ declare const _default: import("react").ComponentType<CheckboxGroupProps<string> & {
3
+ priority?: boolean;
4
+ }>;
5
+ export default _default;
@@ -0,0 +1,38 @@
1
+ import type { IconProps } from "@/components/icon";
2
+ import type { HTMLAttributes } from "react";
3
+ export type CheckboxGroupOption<T extends string> = {
4
+ value: T;
5
+ title: string;
6
+ description?: string | null;
7
+ icon?: Omit<IconProps, "label"> | null;
8
+ iconLabel?: string | null;
9
+ required?: boolean;
10
+ disabled?: boolean;
11
+ };
12
+ export type CheckboxGroupVariant = "plain" | "card";
13
+ export type CheckboxGroupLayout = "stack" | "grid";
14
+ export type CheckboxGroupTranslations = {
15
+ ariaLabel?: string;
16
+ };
17
+ export type CheckboxGroupProps<T extends string> = {
18
+ ariaLabel?: string;
19
+ legend?: string | null;
20
+ hideLegend?: boolean;
21
+ legendProps?: HTMLAttributes<HTMLLegendElement>;
22
+ name: string;
23
+ disabled?: boolean;
24
+ required?: boolean;
25
+ values?: T[];
26
+ defaultValues?: T[];
27
+ options: CheckboxGroupOption<T>[];
28
+ onChange?: (next: T[]) => void;
29
+ hiddenInputName?: string;
30
+ layout?: CheckboxGroupLayout;
31
+ variant?: CheckboxGroupVariant;
32
+ translations?: CheckboxGroupTranslations;
33
+ };
34
+ export type CheckboxGroupViewProps<T extends string> = CheckboxGroupProps<T> & {
35
+ selectedValues: T[];
36
+ isChecked: (value: T) => boolean;
37
+ onToggle?: (value: T) => void;
38
+ };
@@ -0,0 +1,3 @@
1
+ import type { CheckboxGroupProps } from "./CheckboxGroup.model";
2
+ import type { JSX } from "react";
3
+ export default function CheckboxGroupServer<T extends string>(props: CheckboxGroupProps<T>): JSX.Element | null;
@@ -0,0 +1,3 @@
1
+ import type { CheckboxGroupViewProps } from "./CheckboxGroup.model";
2
+ import type { JSX } from "react";
3
+ export declare function CheckboxGroupView<T extends string>({ ariaLabel, legend, hideLegend, legendProps, name, disabled, required, options, selectedValues, hiddenInputName, layout, variant, translations: t, isChecked, onToggle, }: CheckboxGroupViewProps<T>): JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ export * from "./CheckboxGroup";
2
+ export type { CheckboxGroupProps, CheckboxGroupOption, CheckboxGroupVariant, CheckboxGroupLayout, CheckboxGroupTranslations, } from "./CheckboxGroup.model";
@@ -30,6 +30,7 @@ export type DialogViewProps = HTMLAttributes<HTMLDivElement> & {
30
30
  contentRef?: Ref<HTMLDivElement>;
31
31
  containerChildren?: ReactNode;
32
32
  classNameHeader?: string;
33
+ actionsClassName?: string;
33
34
  scroll?: "paper" | "body";
34
35
  fullScreen?: boolean;
35
36
  onClose?: () => void;
@@ -1,3 +1,3 @@
1
1
  import type { DialogViewProps } from "./Dialog.model";
2
2
  import type { JSX } from "react";
3
- export declare function DialogView({ open, title, containerRef, hideTitle, renderHeader, hideCloseButton, translations, actions, contentProps, contentRef, containerChildren, className, classNameHeader, height, scroll, fullScreen, titleProps, children, onClose, onCloseKeyDown, wrapperProps, closeOnBackdropClick, closeButtonProps, closeButtonRef, ...rest }: DialogViewProps): JSX.Element;
3
+ export declare function DialogView({ open, title, containerRef, hideTitle, renderHeader, hideCloseButton, translations, actions, contentProps, contentRef, containerChildren, className, classNameHeader, actionsClassName, height, scroll, fullScreen, titleProps, children, onClose, onCloseKeyDown, wrapperProps, closeOnBackdropClick, closeButtonProps, closeButtonRef, ...rest }: DialogViewProps): JSX.Element;
@@ -8,6 +8,8 @@ export { Button } from "./components/button";
8
8
  export { Calendly } from "./components/calendly";
9
9
  export { Card } from "./components/card";
10
10
  export { Carousel } from "./components/carousel";
11
+ export { Checkbox } from "./components/checkbox";
12
+ export { CheckboxGroup } from "./components/checkbox-group";
11
13
  export { Chip } from "./components/chip";
12
14
  export { DatePicker } from "./components/datePicker";
13
15
  export { Dialog } from "./components/dialog";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prokodo/ui",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
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": [
@@ -79,6 +79,16 @@
79
79
  "types": "./dist/types/components/carousel/index.d.ts"
80
80
  },
81
81
  "./carousel.css": "./dist/components/carousel/Carousel.css",
82
+ "./checkbox": {
83
+ "import": "./dist/components/checkbox/index.js",
84
+ "types": "./dist/types/components/checkbox/index.d.ts"
85
+ },
86
+ "./checkbox.css": "./dist/components/checkbox/Checkbox.css",
87
+ "./checkbox-group": {
88
+ "import": "./dist/components/checkbox-group/index.js",
89
+ "types": "./dist/types/components/checkbox-group/index.d.ts"
90
+ },
91
+ "./checkbox-group.css": "./dist/components/checkbox-group/CheckboxGroup.css",
82
92
  "./chip": {
83
93
  "import": "./dist/components/chip/index.js",
84
94
  "types": "./dist/types/components/chip/index.d.ts"