@digitalpromise/design 4.7.1 → 4.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 (46) hide show
  1. package/dist/components/button.d.ts +10 -0
  2. package/dist/components/button.d.ts.map +1 -0
  3. package/dist/components/forms/checkbox.d.ts +7 -0
  4. package/dist/components/forms/checkbox.d.ts.map +1 -0
  5. package/dist/components/forms/dropzone.d.ts +11 -0
  6. package/dist/components/forms/dropzone.d.ts.map +1 -0
  7. package/dist/components/forms/form-field.d.ts +11 -0
  8. package/dist/components/forms/form-field.d.ts.map +1 -0
  9. package/dist/components/forms/form.d.ts +5 -0
  10. package/dist/components/forms/form.d.ts.map +1 -0
  11. package/dist/components/forms/index.d.ts +10 -0
  12. package/dist/components/forms/index.d.ts.map +1 -0
  13. package/dist/components/forms/label.d.ts +8 -0
  14. package/dist/components/forms/label.d.ts.map +1 -0
  15. package/dist/components/forms/list.d.ts +8 -0
  16. package/dist/components/forms/list.d.ts.map +1 -0
  17. package/dist/components/forms/select.d.ts +9 -0
  18. package/dist/components/forms/select.d.ts.map +1 -0
  19. package/dist/components/forms/text-input.d.ts +7 -0
  20. package/dist/components/forms/text-input.d.ts.map +1 -0
  21. package/dist/components/forms/textarea.d.ts +7 -0
  22. package/dist/components/forms/textarea.d.ts.map +1 -0
  23. package/dist/components/forms/types.d.ts +9 -0
  24. package/dist/components/forms/types.d.ts.map +1 -0
  25. package/dist/components/icon.d.ts +14 -0
  26. package/dist/components/icon.d.ts.map +1 -0
  27. package/dist/components/index.d.ts +9 -0
  28. package/dist/components/index.d.ts.map +1 -0
  29. package/dist/components/logo.d.ts +6 -0
  30. package/dist/components/logo.d.ts.map +1 -0
  31. package/dist/components/pagination.d.ts +8 -0
  32. package/dist/components/pagination.d.ts.map +1 -0
  33. package/dist/components/search.d.ts +13 -0
  34. package/dist/components/search.d.ts.map +1 -0
  35. package/dist/components/tab-list.d.ts +11 -0
  36. package/dist/components/tab-list.d.ts.map +1 -0
  37. package/dist/components/table.d.ts +16 -0
  38. package/dist/components/table.d.ts.map +1 -0
  39. package/dist/components/tag-list.d.ts +4 -0
  40. package/dist/components/tag-list.d.ts.map +1 -0
  41. package/dist/index.cjs +1 -1
  42. package/dist/index.js +1 -1
  43. package/dist/shims/next-navigation.d.ts +11 -0
  44. package/dist/shims/next-navigation.d.ts.map +1 -0
  45. package/dist/theme.css +1 -1
  46. package/package.json +3 -2
@@ -0,0 +1,10 @@
1
+ import type { ButtonHTMLAttributes } from "react";
2
+ declare const variants: readonly ["primary", "secondary", "tertiary"];
3
+ declare const states: readonly ["default", "danger", "inverse", "decolor"];
4
+ type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
5
+ variant?: (typeof variants)[number];
6
+ state?: (typeof states)[number];
7
+ };
8
+ export { variants, states };
9
+ export default function Button({ className, variant, state, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,QAAA,MAAM,QAAQ,+CAAgD,CAAC;AAC/D,QAAA,MAAM,MAAM,sDAAuD,CAAC;AAEpE,KAAK,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAC3D,OAAO,CAAC,EAAE,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;CACjC,CAAC;AAEF,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAE5B,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,SAAS,EACT,OAAmB,EACnB,KAAiB,EACjB,GAAG,KAAK,EACT,EAAE,WAAW,2CAKb"}
@@ -0,0 +1,7 @@
1
+ import type { FormInputProps, InputPropsWithoutType } from "./types";
2
+ type CheckboxProps = InputPropsWithoutType & FormInputProps & {
3
+ label: string;
4
+ };
5
+ export declare const Checkbox: ({ error, className, label, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/forms/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErE,KAAK,aAAa,GAAG,qBAAqB,GACxC,cAAc,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEJ,eAAO,MAAM,QAAQ,GAAI,uCAKtB,aAAa,4CAoBf,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { ReactElement, type ComponentPropsWithRef } from "react";
2
+ import type { FormInputProps } from "./types";
3
+ interface DropzoneProps extends Omit<ComponentPropsWithRef<"input">, "type">, FormInputProps {
4
+ instructions?: string;
5
+ remover?: ReactElement;
6
+ }
7
+ export declare const Dropzone: ({ children, error, instructions, className, ref: userRef, onChange: userOnChange, remover, ...props }: DropzoneProps) => import("react/jsx-runtime").JSX.Element;
8
+ type SingleImageDropzoneProps = Omit<DropzoneProps, "multiple" | "accept" | "children">;
9
+ export declare const SingleImageDropzone: (props: SingleImageDropzoneProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=dropzone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropzone.d.ts","sourceRoot":"","sources":["../../../src/components/forms/dropzone.tsx"],"names":[],"mappings":"AAEA,OAAO,EAKL,YAAY,EAGZ,KAAK,qBAAqB,EAC3B,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C,UAAU,aACR,SAAQ,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,EAClD,cAAc;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,eAAO,MAAM,QAAQ,GAAI,uGAStB,aAAa,4CA2Hf,CAAC;AAEF,KAAK,wBAAwB,GAAG,IAAI,CAClC,aAAa,EACb,UAAU,GAAG,QAAQ,GAAG,UAAU,CACnC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,OAAO,wBAAwB,4CAelE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { FormInputProps } from "./types";
2
+ interface FormFieldProps<C extends FormInputProps> {
3
+ Input: React.ComponentType<C>;
4
+ inputProps: C;
5
+ errorMessage?: string;
6
+ label: string;
7
+ labelClassname?: string;
8
+ }
9
+ export declare const FormField: <P extends FormInputProps>({ Input, inputProps, errorMessage, label, labelClassname, }: FormFieldProps<P>) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=form-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../../src/components/forms/form-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,UAAU,cAAc,CAAC,CAAC,SAAS,cAAc;IAC/C,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAC9B,UAAU,EAAE,CAAC,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,cAAc,EAAE,6DAMjD,cAAc,CAAC,CAAC,CAAC,4CAmBnB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { ComponentPropsWithRef } from "react";
2
+ type FormProps = ComponentPropsWithRef<"form">;
3
+ export declare const Form: ({ noValidate, className, ...props }: FormProps) => import("react/jsx-runtime").JSX.Element;
4
+ export {};
5
+ //# sourceMappingURL=form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/components/forms/form.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAE9C,KAAK,SAAS,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAE/C,eAAO,MAAM,IAAI,GAAI,qCAAqC,SAAS,4CAQlE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Checkbox } from "./checkbox";
2
+ import { Dropzone, SingleImageDropzone } from "./dropzone";
3
+ import { Form } from "./form";
4
+ import { FormField } from "./form-field";
5
+ import { Select } from "./select";
6
+ import { TextInput } from "./text-input";
7
+ import { Textarea } from "./textarea";
8
+ import { Label } from "./label";
9
+ export { Checkbox, Dropzone, SingleImageDropzone, Form, FormField, Label, Select, Textarea, TextInput, };
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/forms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EACL,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,IAAI,EACJ,SAAS,EACT,KAAK,EACL,MAAM,EACN,QAAQ,EACR,SAAS,GACV,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type ComponentPropsWithRef } from "react";
2
+ export interface LabelProps extends ComponentPropsWithRef<"label"> {
3
+ label: string;
4
+ error?: boolean;
5
+ required?: boolean;
6
+ }
7
+ export declare const Label: ({ className, label, required, error, ...props }: LabelProps) => import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/forms/label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEnD,MAAM,WAAW,UAAW,SAAQ,qBAAqB,CAAC,OAAO,CAAC;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,KAAK,GAAI,iDAMnB,UAAU,4CAWZ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { FormInputProps } from "./types";
2
+ type ListInputProps = FormInputProps & {
3
+ onChange?: (list: string[]) => void;
4
+ defaultValue?: string[];
5
+ };
6
+ export declare const ListInput: ({ onChange, defaultValue }: ListInputProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/components/forms/list.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,KAAK,cAAc,GAAG,cAAc,GAAG;IACrC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,4BAA4B,cAAc,4CAmEnE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { default as ReactSelect } from "react-select";
2
+ import { FormInputProps } from "./types";
3
+ import { ComponentPropsWithRef } from "react";
4
+ type ReactSelectProps = ComponentPropsWithRef<typeof ReactSelect>;
5
+ export type SelectProps = Omit<ReactSelectProps, "unstyled" | "classNames" | "components"> & FormInputProps;
6
+ export type Options = ReactSelectProps["options"];
7
+ export declare const Select: ({ error, id, ...userProps }: SelectProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/forms/select.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAG9C,KAAK,gBAAgB,GAAG,qBAAqB,CAAC,OAAO,WAAW,CAAC,CAAC;AAElE,MAAM,MAAM,WAAW,GAAG,IAAI,CAC5B,gBAAgB,EAChB,UAAU,GAAG,YAAY,GAAG,YAAY,CACzC,GACC,cAAc,CAAC;AAEjB,MAAM,MAAM,OAAO,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;AAElD,eAAO,MAAM,MAAM,GAAI,6BAA6B,WAAW,4CA6C9D,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ComponentPropsWithRef } from "react";
2
+ import type { FormInputProps } from "./types";
3
+ interface TextInputProps extends ComponentPropsWithRef<"input">, FormInputProps {
4
+ }
5
+ export declare const TextInput: ({ error, className, ...props }: TextInputProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=text-input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../../src/components/forms/text-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,UAAU,cAAe,SAAQ,qBAAqB,CAAC,OAAO,CAAC,EAAE,cAAc;CAAG;AAElF,eAAO,MAAM,SAAS,GAAI,gCAAgC,cAAc,4CASvE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ComponentPropsWithRef } from "react";
2
+ import type { FormInputProps } from "./types";
3
+ interface TextareaProps extends ComponentPropsWithRef<"textarea">, FormInputProps {
4
+ }
5
+ export declare const Textarea: ({ className, error, ...props }: TextareaProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=textarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/components/forms/textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,UAAU,aAAc,SAAQ,qBAAqB,CAAC,UAAU,CAAC,EAAE,cAAc;CAAG;AAEpF,eAAO,MAAM,QAAQ,GAAI,gCAAgC,aAAa,4CAQrE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { ComponentPropsWithRef } from "react";
2
+ export interface FormInputProps {
3
+ id?: string;
4
+ name?: string;
5
+ error?: boolean;
6
+ required?: boolean;
7
+ }
8
+ export type InputPropsWithoutType = Omit<ComponentPropsWithRef<"input">, "type">;
9
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/forms/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEnD,MAAM,WAAW,cAAc;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,qBAAqB,CAAC,OAAO,CAAC,EAC9B,MAAM,CACP,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { type DPGIconName } from "@digitalpromise/icons";
2
+ import { type ComponentPropsWithRef } from "react";
3
+ interface IconProps extends ComponentPropsWithRef<"svg"> {
4
+ name: DPGIconName;
5
+ }
6
+ export declare const Icon: ({ name, className, ...props }: IconProps) => import("react/jsx-runtime").JSX.Element;
7
+ type IconButtonProps = Omit<ComponentPropsWithRef<"button">, "type"> & {
8
+ icon: DPGIconName;
9
+ iconClassName?: string;
10
+ label?: string;
11
+ };
12
+ export declare const IconButton: ({ label, className, icon, iconClassName, ...props }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
14
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/components/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEnD,UAAU,SAAU,SAAQ,qBAAqB,CAAC,KAAK,CAAC;IACtD,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,eAAO,MAAM,IAAI,GAAI,+BAA+B,SAAS,4CAQ5D,CAAC;AAEF,KAAK,eAAe,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,GAAG;IACrE,IAAI,EAAE,WAAW,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,qDAMxB,eAAe,4CAWjB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { default as Button } from "./button";
2
+ import { Icon, IconButton } from "./icon";
3
+ import { default as Logo } from "./logo";
4
+ import { default as Pagination } from "./pagination";
5
+ import { default as Search } from "./search";
6
+ import { default as Table } from "./table";
7
+ export type { TableColumn } from "./table";
8
+ export { Button, IconButton, Icon, Logo, Pagination, Search, Table };
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ export type LogoVariant = "black" | "white" | "color";
2
+ export default function Logo({ variant, className, }: {
3
+ variant?: LogoVariant;
4
+ className?: string;
5
+ }): import("react/jsx-runtime").JSX.Element | null;
6
+ //# sourceMappingURL=logo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logo.d.ts","sourceRoot":"","sources":["../../src/components/logo.tsx"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAQtD,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAC3B,OAAiB,EACjB,SAAS,GACV,EAAE;IACD,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,kDAcA"}
@@ -0,0 +1,8 @@
1
+ type PaginationProps = {
2
+ count: number;
3
+ limit: number;
4
+ pageParamKey?: string;
5
+ };
6
+ export default function Pagination({ count, limit, pageParamKey, }: PaginationProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/components/pagination.tsx"],"names":[],"mappings":"AAKA,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,KAAK,EACL,KAAK,EACL,YAAqB,GACtB,EAAE,eAAe,2CA+GjB"}
@@ -0,0 +1,13 @@
1
+ type SearchProps = {
2
+ placeholder: string;
3
+ className?: string;
4
+ inputWidth?: number | string;
5
+ value?: string;
6
+ onChange?: (value: string) => void;
7
+ syncToUrl?: boolean;
8
+ id?: string;
9
+ paramKey?: string;
10
+ };
11
+ export default function Search({ placeholder, className, inputWidth, value, onChange, syncToUrl, id, paramKey, }: SearchProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/components/search.tsx"],"names":[],"mappings":"AAMA,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,WAAW,EACX,SAAS,EACT,UAAU,EACV,KAAK,EACL,QAAQ,EACR,SAAgB,EAChB,EAAa,EACb,QAAc,GACf,EAAE,WAAW,2CA4Fb"}
@@ -0,0 +1,11 @@
1
+ import { type ReactNode } from "react";
2
+ export interface TabProps {
3
+ id: string;
4
+ label: ReactNode;
5
+ content: ReactNode;
6
+ }
7
+ export interface TabListProps {
8
+ tabs: TabProps[];
9
+ }
10
+ export declare const TabList: ({ tabs }: TabListProps) => import("react/jsx-runtime").JSX.Element | ReactNode[];
11
+ //# sourceMappingURL=tab-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tab-list.d.ts","sourceRoot":"","sources":["../../src/components/tab-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjD,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,EAAE,CAAC;CAClB;AAED,eAAO,MAAM,OAAO,GAAI,UAAU,YAAY,0DA8B7C,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { ReactNode } from "react";
2
+ export type TableColumn<TRow> = {
3
+ key: string;
4
+ header: string;
5
+ headerClassName?: string;
6
+ cellClassName?: string;
7
+ render: (row: TRow) => ReactNode;
8
+ };
9
+ type TableProps<TRow> = {
10
+ columns: TableColumn<TRow>[];
11
+ rows: TRow[];
12
+ rowKey: (row: TRow, index: number) => string;
13
+ };
14
+ export default function Table<TRow>({ columns, rows, rowKey }: TableProps<TRow>): import("react/jsx-runtime").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/components/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,WAAW,CAAC,IAAI,IAAI;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,SAAS,CAAC;CAClC,CAAC;AAEF,KAAK,UAAU,CAAC,IAAI,IAAI;IACtB,OAAO,EAAE,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;IAC7B,IAAI,EAAE,IAAI,EAAE,CAAC;IACb,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAC9C,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,UAAU,CAAC,IAAI,CAAC,2CA+B9E"}
@@ -0,0 +1,4 @@
1
+ export declare const TagList: ({ tags }: {
2
+ tags: string[];
3
+ }) => import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=tag-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tag-list.d.ts","sourceRoot":"","sources":["../../src/components/tag-list.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,GAAI,UAAU;IAAE,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,4CAenD,CAAC"}
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./icon-1CrM76QC.cjs"),e=require("react/jsx-runtime"),v=require("next/navigation"),w=require("react"),C=new Map([["black","/primary-badge-engine-logo-black.svg"],["white","/primary-badge-engine-logo-white.svg"],["color","/primary-badge-engine-logo-color.svg"]]);function k({variant:c="color",className:b}){const r=C.get(c);return r===void 0?null:e.jsx("img",{src:r,width:186,height:36,alt:"Badge Engine",className:b})}function I({count:c,limit:b,pageParamKey:r="page"}){const s=v.useSearchParams(),h=v.usePathname(),l=v.useRouter(),y=s.get(r),d=y?Number.parseInt(y,10):Number.NaN,t=Number.isFinite(d)?d:1,n=Math.max(1,Math.ceil(c/b)),P=n<=7?Array.from({length:n},(a,i)=>i+1):t<=4?[1,2,3,4,5,"ellipsis",n]:t>=n-3?[1,"ellipsis",n-4,n-3,n-2,n-1,n]:[1,"ellipsis",t-1,t,t+1,"ellipsis",n],j=t===1,u=t===n,S=a=>{if(j&&a==="prev"||u&&a==="next")return;const i=a==="prev"?t-1:t+1,g=new URLSearchParams(s.toString());g.set(r,String(i)),l.push(`${h}?${g.toString()}`,{scroll:!1})},N=a=>{const i=new URLSearchParams(s.toString());i.set(r,String(a)),l.push(`${h}?${i.toString()}`,{scroll:!1})};return e.jsxs("ul",{className:"flex items-center justify-center gap-4 font-medium",children:[e.jsx("li",{className:"mr-2",children:e.jsx("button",{type:"button","aria-label":"Previous page",disabled:j,className:"inline-flex h-[42px] w-[42px] items-center justify-center rounded-[4px] bg-transparent p-[9px] text-gray-5 transition hover:bg-transparent hover:text-neutral-5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-4 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",onClick:()=>S("prev"),children:e.jsx(f.Icon,{name:"ArrowLineLeft"})})}),P.map((a,i)=>{const g=a==="ellipsis",x=g?void 0:a,m=x===t,p=g||m,o=g?"Pagination ellipsis":`Go to page ${x}`;return e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":o,"aria-current":m?"page":void 0,disabled:p,className:`flex h-[36px] w-[36px] items-center justify-center rounded-[4px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-4 ${m?"bg-blue-1 text-blue-4":""} ${p?"cursor-default":"cursor-pointer hover:bg-gray-1"}`.trim(),onClick:!p&&x?()=>N(x):void 0,children:g?"...":x})},`${a}-${i}`)}),e.jsx("li",{className:"ml-2",children:e.jsx("button",{type:"button","aria-label":"Next page",disabled:u,className:"inline-flex h-[42px] w-[42px] items-center justify-center rounded-[4px] bg-transparent p-[9px] text-gray-5 transition hover:bg-transparent hover:text-neutral-5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-4 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",onClick:()=>S("next"),children:e.jsx(f.Icon,{name:"ArrowLineRight"})})})]})}function L({placeholder:c,className:b,inputWidth:r,value:s,onChange:h,syncToUrl:l=!0,id:y="search",paramKey:d="s"}){const t=v.useSearchParams(),n=v.usePathname(),P=v.useRouter(),j=w.useRef(null),u=s!==void 0,[S,N]=w.useState(u?s:t.get(d)?.toString()??""),a=u?s:S,i=Math.max(c.length,1),g=`calc(${i}ch + 60px)`,x=r===void 0?g:typeof r=="number"?`${r}px`:r;w.useEffect(()=>{!l||u||N(t.get(d)?.toString()??"")},[u,d,t,l]);const m=p=>{if(!l)return;const o=new URLSearchParams(t.toString());p?(o.set(d,p),o.delete("page")):(o.delete(d),o.delete("page"));const $=o.toString();P.replace($?`${n}?${$}`:n)};return e.jsxs("form",{className:b??"",noValidate:!0,children:[e.jsx("label",{className:"sr-only",htmlFor:y,children:"Search"}),e.jsxs("div",{className:"relative max-w-full",style:{width:x},children:[e.jsx(f.Icon,{name:"Magnifier","aria-hidden":!0,className:"absolute left-[15px] top-1/2 z-10 -translate-y-1/2 text-large leading-5 text-gray-5"}),e.jsx("input",{ref:j,className:"hide-search-clear block w-full max-w-full rounded-sm bg-white py-[11px] pl-[15px] pr-[40px] text-base leading-6 indent-[30px] outline-1 outline-gray-5 transition focus:outline-2 focus:outline-blue-4",style:{color:"#000000",WebkitTextFillColor:"#000000"},size:i,id:y,type:"search",autoComplete:"off",value:a,placeholder:c,onChange:p=>{const o=p.target.value;u||N(o),h?.(o),m(o)}}),a.length>0&&e.jsx("button",{type:"button","aria-label":"Clear search",className:"absolute right-1 top-1/2 z-10 inline-flex h-8 w-8 -translate-y-1/2 items-center justify-center rounded-lg p-2 text-gray-5 hover:text-neutral-5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-4",onClick:()=>{u||N(""),h?.(""),m(""),j.current?.focus()},children:e.jsx(f.Icon,{name:"Close"})})]})]})}function R({columns:c,rows:b,rowKey:r}){return e.jsxs("table",{className:"w-full table-auto border-y border-gray-2 text-gray-5",children:[e.jsx("thead",{className:"font-bold",children:e.jsx("tr",{children:c.map(s=>e.jsx("td",{className:`px-3 py-4 ${s.headerClassName??""}`.trim(),children:s.header},s.key))})}),e.jsx("tbody",{children:b.map((s,h)=>e.jsx("tr",{className:"border-t border-gray-2",children:c.map(l=>e.jsx("td",{className:`${l.cellClassName??"px-3 py-4"}`.trim(),children:l.render(s)},l.key))},r(s,h)))})]})}exports.Button=f.Button;exports.Icon=f.Icon;exports.IconButton=f.IconButton;exports.Logo=k;exports.Pagination=I;exports.Search=L;exports.Table=R;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./icon-1CrM76QC.cjs"),e=require("react/jsx-runtime"),v=require("next/navigation"),w=require("react"),C=new Map([["black","/primary-badge-engine-logo-black.svg"],["white","/primary-badge-engine-logo-white.svg"],["color","/primary-badge-engine-logo-color.svg"]]);function k({variant:c="color",className:b}){const r=C.get(c);return r===void 0?null:e.jsx("img",{src:r,width:186,height:36,alt:"Badge Engine",className:b})}function I({count:c,limit:b,pageParamKey:r="page"}){const s=v.useSearchParams(),h=v.usePathname(),l=v.useRouter(),y=s.get(r),d=y?Number.parseInt(y,10):Number.NaN,t=Number.isFinite(d)?d:1,n=Math.max(1,Math.ceil(c/b)),P=n<=7?Array.from({length:n},(a,i)=>i+1):t<=4?[1,2,3,4,5,"ellipsis",n]:t>=n-3?[1,"ellipsis",n-4,n-3,n-2,n-1,n]:[1,"ellipsis",t-1,t,t+1,"ellipsis",n],j=t===1,u=t===n,S=a=>{if(j&&a==="prev"||u&&a==="next")return;const i=a==="prev"?t-1:t+1,g=new URLSearchParams(s.toString());g.set(r,String(i)),l.push(`${h}?${g.toString()}`,{scroll:!1})},N=a=>{const i=new URLSearchParams(s.toString());i.set(r,String(a)),l.push(`${h}?${i.toString()}`,{scroll:!1})};return e.jsxs("ul",{className:"flex items-center justify-center gap-4 font-medium",children:[e.jsx("li",{className:"mr-2",children:e.jsx("button",{type:"button","aria-label":"Previous page",disabled:j,className:"inline-flex h-[42px] w-[42px] items-center justify-center rounded-[4px] bg-transparent p-[9px] text-gray-5 transition hover:bg-transparent hover:text-neutral-5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-4 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",onClick:()=>S("prev"),children:e.jsx(f.Icon,{name:"ArrowLineLeft"})})}),P.map((a,i)=>{const g=a==="ellipsis",x=g?void 0:a,m=x===t,p=g||m,o=g?"Pagination ellipsis":`Go to page ${x}`;return e.jsx("li",{children:e.jsx("button",{type:"button","aria-label":o,"aria-current":m?"page":void 0,disabled:p,className:`flex h-[36px] w-[36px] items-center justify-center rounded-[4px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-4 ${m?"bg-blue-1 text-blue-4":""} ${p?"cursor-default":"cursor-pointer hover:bg-gray-1"}`.trim(),onClick:!p&&x?()=>N(x):void 0,children:g?"...":x})},`${a}-${i}`)}),e.jsx("li",{className:"ml-2",children:e.jsx("button",{type:"button","aria-label":"Next page",disabled:u,className:"inline-flex h-[42px] w-[42px] items-center justify-center rounded-[4px] bg-transparent p-[9px] text-gray-5 transition hover:bg-transparent hover:text-neutral-5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-4 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",onClick:()=>S("next"),children:e.jsx(f.Icon,{name:"ArrowLineRight"})})})]})}function L({placeholder:c,className:b,inputWidth:r,value:s,onChange:h,syncToUrl:l=!0,id:y="search",paramKey:d="s"}){const t=v.useSearchParams(),n=v.usePathname(),P=v.useRouter(),j=w.useRef(null),u=s!==void 0,[S,N]=w.useState(u?s:t.get(d)?.toString()??""),a=u?s:S,i=Math.max(c.length,1),g=`calc(${i}ch + 60px)`,x=r===void 0?g:typeof r=="number"?`${r}px`:r;w.useEffect(()=>{!l||u||N(t.get(d)?.toString()??"")},[u,d,t,l]);const m=p=>{if(!l)return;const o=new URLSearchParams(t.toString());p?(o.set(d,p),o.delete("page")):(o.delete(d),o.delete("page"));const $=o.toString();P.replace($?`${n}?${$}`:n)};return e.jsxs("form",{className:b??"",noValidate:!0,children:[e.jsx("label",{className:"sr-only",htmlFor:y,children:"Search"}),e.jsxs("div",{className:"relative max-w-full",style:{width:x},children:[e.jsx(f.Icon,{name:"Magnifier","aria-hidden":!0,className:"absolute left-[15px] top-1/2 z-10 -translate-y-1/2 text-large leading-5 text-gray-5"}),e.jsx("input",{ref:j,className:"hide-search-clear block w-full max-w-full rounded-sm bg-white py-[11px] pl-[15px] pr-[40px] text-base leading-5 indent-[30px] outline-1 outline-gray-5 transition focus:outline-2 focus:outline-blue-4",style:{color:"#000000",WebkitTextFillColor:"#000000"},size:i,id:y,type:"search",autoComplete:"off",value:a,placeholder:c,onChange:p=>{const o=p.target.value;u||N(o),h?.(o),m(o)}}),a.length>0&&e.jsx("button",{type:"button","aria-label":"Clear search",className:"absolute right-1 top-1/2 z-10 inline-flex h-8 w-8 -translate-y-1/2 items-center justify-center rounded-lg p-2 text-gray-5 hover:text-neutral-5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-4",onClick:()=>{u||N(""),h?.(""),m(""),j.current?.focus()},children:e.jsx(f.Icon,{name:"Close"})})]})]})}function R({columns:c,rows:b,rowKey:r}){return e.jsxs("table",{className:"w-full table-auto border-y border-gray-2 text-gray-5",children:[e.jsx("thead",{className:"font-bold",children:e.jsx("tr",{children:c.map(s=>e.jsx("td",{className:`px-3 py-4 ${s.headerClassName??""}`.trim(),children:s.header},s.key))})}),e.jsx("tbody",{children:b.map((s,h)=>e.jsx("tr",{className:"border-t border-gray-2",children:c.map(l=>e.jsx("td",{className:`${l.cellClassName??"px-3 py-4"}`.trim(),children:l.render(s)},l.key))},r(s,h)))})]})}exports.Button=f.Button;exports.Icon=f.Icon;exports.IconButton=f.IconButton;exports.Logo=k;exports.Pagination=I;exports.Search=L;exports.Table=R;
package/dist/index.js CHANGED
@@ -124,7 +124,7 @@ function q({
124
124
  "input",
125
125
  {
126
126
  ref: v,
127
- className: "hide-search-clear block w-full max-w-full rounded-sm bg-white py-[11px] pl-[15px] pr-[40px] text-base leading-6 indent-[30px] outline-1 outline-gray-5 transition focus:outline-2 focus:outline-blue-4",
127
+ className: "hide-search-clear block w-full max-w-full rounded-sm bg-white py-[11px] pl-[15px] pr-[40px] text-base leading-5 indent-[30px] outline-1 outline-gray-5 transition focus:outline-2 focus:outline-blue-4",
128
128
  style: {
129
129
  color: "#000000",
130
130
  WebkitTextFillColor: "#000000"
@@ -0,0 +1,11 @@
1
+ type NavigateOptions = {
2
+ scroll?: boolean;
3
+ };
4
+ export declare function usePathname(): string;
5
+ export declare function useSearchParams(): URLSearchParams;
6
+ export declare function useRouter(): {
7
+ push(href: string, options?: NavigateOptions): void;
8
+ replace(href: string, options?: NavigateOptions): void;
9
+ };
10
+ export {};
11
+ //# sourceMappingURL=next-navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next-navigation.d.ts","sourceRoot":"","sources":["../../src/shims/next-navigation.ts"],"names":[],"mappings":"AAEA,KAAK,eAAe,GAAG;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AA4BF,wBAAgB,WAAW,WAE1B;AAED,wBAAgB,eAAe,oBAI9B;AAED,wBAAgB,SAAS;eAEV,MAAM,YAAY,eAAe;kBAS9B,MAAM,YAAY,eAAe;EAUlD"}
package/dist/theme.css CHANGED
@@ -1 +1 @@
1
- @theme{--color-*: initial; --text-*: initial; --spacing-*: initial;}@theme{ --color-gray-1: #f4f4f4; --color-gray-2: #e6e6e6; --color-gray-3: #a3a3a3; --color-gray-4: #767676; --color-gray-5: #454545; --color-blue-1: #eaf4fb; --color-blue-2: #d5e8f5; --color-blue-3: #2077be; --color-blue-4: #1166aa; --color-blue-5: #075593; --color-indigo-1: #eef2f9; --color-indigo-2: #d9dff3; --color-indigo-3: #5770be; --color-indigo-4: #465faa; --color-indigo-5: #3a4f92; --color-purple-1: #f1eef6; --color-purple-2: #e4dcf0; --color-purple-3: #8164af; --color-purple-4: #72559f; --color-purple-5: #5e4586; --color-violet-1: #f5eef6; --color-violet-2: #ecddef; --color-violet-3: #9f57af; --color-violet-4: #8a4799; --color-violet-5: #713c7c; --color-magenta-1: #f6eef4; --color-magenta-2: #f0dce9; --color-magenta-3: #aa558e; --color-magenta-4: #8f4777; --color-magenta-5: #7d3c68; --color-red-1: #ffefea; --color-red-2: #fee0d7; --color-red-3: #cc4a22; --color-red-4: #bc3a11; --color-red-5: #a22a06; --color-orange-1: #fcf2e8; --color-orange-2: #fae3cb; --color-orange-3: #d46b00; --color-orange-4: #b55b00; --color-orange-5: #8c4500; --color-green-1: #f5f9eb; --color-green-2: #e6f1cd; --color-green-3: #69930d; --color-green-4: #577d04; --color-green-5: #426001; --color-jade-1: #eef7f1; --color-jade-2: #d4eadd; --color-jade-3: #299a55; --color-jade-4: #14833f; --color-jade-5: #07652c; --color-teal-1: #eaf8fb; --color-teal-2: #caeef4; --color-teal-3: #1692a9; --color-teal-4: #1a7b8d; --color-teal-5: #11606e; --color-neutral-1: #ffffff; --color-neutral-2: rgba(0, 0, 0, .08); --color-neutral-3: rgba(0, 0, 0, .15); --color-neutral-4: rgba(0, 0, 0, .45); --color-neutral-5: #000000; --color-primary: #1166aa; --color-primary-hover: #eaf4fb; --color-danger: #bc3a11; --color-danger-hover: #a22a06; --color-disabled: #a3a3a3; --text-small: .875rem; --text-medium: 1rem; --text-medium-large: 1.25rem; --text-large: 1.5rem; --text-x-large: 2rem; --text-xx-large: 3rem; --text-xxx-large: 4rem; --text-base: 1rem; --spacing-0: 0; --spacing-1: .25rem; --spacing-2: .5rem; --spacing-3: .75rem; --spacing-4: 1rem; --spacing-5: 1.5rem; --spacing-6: 2rem; --spacing-7: 3rem; --spacing-8: 4rem; --spacing-9: 5rem; --spacing-10: 6rem; --spacing-11: 15rem; --spacing-12: 22.5rem; }@source "./components";@layer components{.btn{@apply transition cursor-pointer font-semibold px-[1.375rem] py-[.625rem] rounded-3xl disabled:opacity-50;}.btn-primary{@apply bg-blue-3 border-2 border-blue-3 leading-5 text-neutral-1 hover:border-blue-4 hover:bg-blue-4 disabled:border-blue-3 disabled:bg-blue-3;}.btn-primary.btn-danger{@apply border-red-3 bg-red-3 text-neutral-1 hover:border-red-4 hover:bg-red-4;}.btn-primary.btn-inverse{@apply bg-neutral-1 text-blue-4 hover:bg-blue-1 hover:border-blue-5 hover:text-blue-5;}.btn-primary.btn-decolor{@apply border-gray-5 bg-gray-5 text-neutral-1 hover:border-neutral-5 hover:bg-neutral-5;}.btn-secondary{@apply bg-neutral-1 border-2 border-blue-3 text-blue-4 hover:border-blue-4 hover:bg-blue-1 hover:text-blue-5;}.btn-secondary.btn-danger{@apply border-red-3 text-red-3 hover:border-red-4 hover:text-red-4 hover:bg-red-1;}.btn-secondary.btn-inverse{@apply border-neutral-1 text-neutral-1 bg-indigo-3 hover:bg-indigo-4;}.btn-secondary.btn-decolor{@apply text-gray-5 border-gray-5 hover:text-neutral-5 hover:border-neutral-5 hover:bg-gray-1;}.btn-tertiary{@apply px-0 py-3 text-blue-4 underline hover:text-blue-5;}.btn-tertiary.btn-danger{@apply text-red-4 hover:text-red-5;}.btn-tertiary.btn-inverse{@apply text-neutral-1 hover:text-gray-1;}.btn-tertiary.btn-decolor{@apply text-gray-5 hover:text-neutral-5;}}@utility hide-search-clear{&::-webkit-search-cancel-button,&::-webkit-search-decoration {-webkit-appearance: none; appearance: none;} &::-ms-clear {display: none;}}
1
+ @theme{--color-*: initial; --text-*: initial; --spacing-*: initial;}@theme{ --color-gray-1: #f4f4f4; --color-gray-2: #e6e6e6; --color-gray-3: #a3a3a3; --color-gray-4: #767676; --color-gray-5: #454545; --color-blue-1: #eaf4fb; --color-blue-2: #d5e8f5; --color-blue-3: #2077be; --color-blue-4: #1166aa; --color-blue-5: #075593; --color-indigo-1: #eef2f9; --color-indigo-2: #d9dff3; --color-indigo-3: #5770be; --color-indigo-4: #465faa; --color-indigo-5: #3a4f92; --color-purple-1: #f1eef6; --color-purple-2: #e4dcf0; --color-purple-3: #8164af; --color-purple-4: #72559f; --color-purple-5: #5e4586; --color-violet-1: #f5eef6; --color-violet-2: #ecddef; --color-violet-3: #9f57af; --color-violet-4: #8a4799; --color-violet-5: #713c7c; --color-magenta-1: #f6eef4; --color-magenta-2: #f0dce9; --color-magenta-3: #aa558e; --color-magenta-4: #8f4777; --color-magenta-5: #7d3c68; --color-red-1: #ffefea; --color-red-2: #fee0d7; --color-red-3: #cc4a22; --color-red-4: #bc3a11; --color-red-5: #a22a06; --color-orange-1: #fcf2e8; --color-orange-2: #fae3cb; --color-orange-3: #d46b00; --color-orange-4: #b55b00; --color-orange-5: #8c4500; --color-green-1: #f5f9eb; --color-green-2: #e6f1cd; --color-green-3: #69930d; --color-green-4: #577d04; --color-green-5: #426001; --color-jade-1: #eef7f1; --color-jade-2: #d4eadd; --color-jade-3: #299a55; --color-jade-4: #14833f; --color-jade-5: #07652c; --color-teal-1: #eaf8fb; --color-teal-2: #caeef4; --color-teal-3: #1692a9; --color-teal-4: #1a7b8d; --color-teal-5: #11606e; --color-neutral-1: #ffffff; --color-neutral-2: rgba(0, 0, 0, .08); --color-neutral-3: rgba(0, 0, 0, .15); --color-neutral-4: rgba(0, 0, 0, .45); --color-neutral-5: #000000; --color-primary: #1166aa; --color-primary-hover: #eaf4fb; --color-danger: #bc3a11; --color-danger-hover: #a22a06; --color-disabled: #a3a3a3; --text-small: .875rem; --text-medium: 1rem; --text-medium-large: 1.25rem; --text-large: 1.5rem; --text-x-large: 2rem; --text-xx-large: 3rem; --text-xxx-large: 4rem; --text-base: 1rem; --spacing-0: 0; --spacing-1: .25rem; --spacing-2: .5rem; --spacing-3: .75rem; --spacing-4: 1rem; --spacing-5: 1.5rem; --spacing-6: 2rem; --spacing-7: 3rem; --spacing-8: 4rem; --spacing-9: 5rem; --spacing-10: 6rem; --spacing-11: 15rem; --spacing-12: 22.5rem; }@layer components{.btn{@apply transition cursor-pointer font-semibold px-[1.375rem] py-[.625rem] rounded-3xl disabled:opacity-50;}.btn-primary{@apply bg-blue-3 border-2 border-blue-3 leading-5 text-neutral-1 hover:border-blue-4 hover:bg-blue-4 disabled:border-blue-3 disabled:bg-blue-3;}.btn-primary.btn-danger{@apply border-red-3 bg-red-3 text-neutral-1 hover:border-red-4 hover:bg-red-4;}.btn-primary.btn-inverse{@apply bg-neutral-1 text-blue-4 hover:bg-blue-1 hover:border-blue-5 hover:text-blue-5;}.btn-primary.btn-decolor{@apply border-gray-5 bg-gray-5 text-neutral-1 hover:border-neutral-5 hover:bg-neutral-5;}.btn-secondary{@apply bg-neutral-1 border-2 border-blue-3 text-blue-4 hover:border-blue-4 hover:bg-blue-1 hover:text-blue-5;}.btn-secondary.btn-danger{@apply border-red-3 text-red-3 hover:border-red-4 hover:text-red-4 hover:bg-red-1;}.btn-secondary.btn-inverse{@apply border-neutral-1 text-neutral-1 bg-indigo-3 hover:bg-indigo-4;}.btn-secondary.btn-decolor{@apply text-gray-5 border-gray-5 hover:text-neutral-5 hover:border-neutral-5 hover:bg-gray-1;}.btn-tertiary{@apply px-0 py-3 text-blue-4 underline hover:text-blue-5;}.btn-tertiary.btn-danger{@apply text-red-4 hover:text-red-5;}.btn-tertiary.btn-inverse{@apply text-neutral-1 hover:text-gray-1;}.btn-tertiary.btn-decolor{@apply text-gray-5 hover:text-neutral-5;}}@utility hide-search-clear{&::-webkit-search-cancel-button,&::-webkit-search-decoration {-webkit-appearance: none; appearance: none;} &::-ms-clear {display: none;}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@digitalpromise/design",
3
3
  "private": false,
4
- "version": "4.7.1",
4
+ "version": "4.8.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "exports": {
@@ -58,11 +58,12 @@
58
58
  }
59
59
  },
60
60
  "scripts": {
61
+ "postinstall": "npm run build",
61
62
  "style-dictionary": "style-dictionary build",
62
63
  "prestorybook": "style-dictionary build",
63
64
  "prebuild-storybook": "style-dictionary build",
64
65
  "prebuild": "style-dictionary build",
65
- "build": "vite build",
66
+ "build": "vite build && tsc",
66
67
  "lint": "eslint ./src --ext ts,tsx",
67
68
  "preview": "vite preview",
68
69
  "storybook": "storybook dev -p 6006",