@bcgov/design-system-react-components 0.1.1 → 0.1.2

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 (43) hide show
  1. package/README.md +2 -0
  2. package/dist/cjs/index.cjs +272 -28
  3. package/dist/cjs/index.cjs.map +1 -1
  4. package/dist/cjs/types/components/Icons/SvgCheckCircleIcon/SvgCheckCircleIcon.d.ts +3 -0
  5. package/dist/cjs/types/components/Icons/SvgCheckCircleIcon/index.d.ts +1 -0
  6. package/dist/cjs/types/components/Icons/SvgCloseIcon/SvgCloseIcon.d.ts +3 -0
  7. package/dist/cjs/types/components/Icons/SvgCloseIcon/index.d.ts +1 -0
  8. package/dist/cjs/types/components/Icons/SvgExclamationCircleIcon/SvgExclamationCircleIcon.d.ts +3 -0
  9. package/dist/cjs/types/components/Icons/SvgExclamationCircleIcon/index.d.ts +1 -0
  10. package/dist/cjs/types/components/Icons/SvgInfoIcon/SvgInfoIcon.d.ts +3 -0
  11. package/dist/cjs/types/components/Icons/SvgInfoIcon/index.d.ts +1 -0
  12. package/dist/cjs/types/components/InlineAlert/InlineAlert.d.ts +12 -0
  13. package/dist/cjs/types/components/InlineAlert/index.d.ts +2 -0
  14. package/dist/cjs/types/components/Select/Select.d.ts +4 -1
  15. package/dist/cjs/types/components/Switch/Switch.d.ts +7 -0
  16. package/dist/cjs/types/components/Switch/index.d.ts +2 -0
  17. package/dist/cjs/types/components/index.d.ts +8 -1
  18. package/dist/esm/index.js +267 -30
  19. package/dist/esm/index.js.map +1 -1
  20. package/dist/esm/types/components/Icons/SvgCheckCircleIcon/SvgCheckCircleIcon.d.ts +3 -0
  21. package/dist/esm/types/components/Icons/SvgCheckCircleIcon/index.d.ts +1 -0
  22. package/dist/esm/types/components/Icons/SvgCloseIcon/SvgCloseIcon.d.ts +3 -0
  23. package/dist/esm/types/components/Icons/SvgCloseIcon/index.d.ts +1 -0
  24. package/dist/esm/types/components/Icons/SvgExclamationCircleIcon/SvgExclamationCircleIcon.d.ts +3 -0
  25. package/dist/esm/types/components/Icons/SvgExclamationCircleIcon/index.d.ts +1 -0
  26. package/dist/esm/types/components/Icons/SvgInfoIcon/SvgInfoIcon.d.ts +3 -0
  27. package/dist/esm/types/components/Icons/SvgInfoIcon/index.d.ts +1 -0
  28. package/dist/esm/types/components/InlineAlert/InlineAlert.d.ts +12 -0
  29. package/dist/esm/types/components/InlineAlert/index.d.ts +2 -0
  30. package/dist/esm/types/components/Select/Select.d.ts +4 -1
  31. package/dist/esm/types/components/Switch/Switch.d.ts +7 -0
  32. package/dist/esm/types/components/Switch/index.d.ts +2 -0
  33. package/dist/esm/types/components/index.d.ts +8 -1
  34. package/dist/index.d.ts +44 -4
  35. package/package.json +1 -1
  36. /package/dist/cjs/types/components/{SvgBcLogo → Icons/SvgBcLogo}/SvgBcLogo.d.ts +0 -0
  37. /package/dist/cjs/types/components/{SvgBcLogo → Icons/SvgBcLogo}/index.d.ts +0 -0
  38. /package/dist/cjs/types/components/{SvgExclamationIcon → Icons/SvgExclamationIcon}/SvgExclamationIcon.d.ts +0 -0
  39. /package/dist/cjs/types/components/{SvgExclamationIcon → Icons/SvgExclamationIcon}/index.d.ts +0 -0
  40. /package/dist/esm/types/components/{SvgBcLogo → Icons/SvgBcLogo}/SvgBcLogo.d.ts +0 -0
  41. /package/dist/esm/types/components/{SvgBcLogo → Icons/SvgBcLogo}/index.d.ts +0 -0
  42. /package/dist/esm/types/components/{SvgExclamationIcon → Icons/SvgExclamationIcon}/SvgExclamationIcon.d.ts +0 -0
  43. /package/dist/esm/types/components/{SvgExclamationIcon → Icons/SvgExclamationIcon}/index.d.ts +0 -0
@@ -0,0 +1,3 @@
1
+ export default function SvgCheckCircleIcon({ id }: {
2
+ id?: string | undefined;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from "./SvgCheckCircleIcon";
@@ -0,0 +1,3 @@
1
+ export default function SvgCloseIcon({ id }: {
2
+ id?: string | undefined;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from "./SvgCloseIcon";
@@ -0,0 +1,3 @@
1
+ export default function SvgExclamationCircleIcon({ id, }: {
2
+ id?: string | undefined;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from "./SvgExclamationCircleIcon";
@@ -0,0 +1,3 @@
1
+ export default function SvgInfoIcon({ id }: {
2
+ id?: string | undefined;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from "./SvgInfoIcon";
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import "./InlineAlert.css";
3
+ export interface InlineAlertProps extends React.PropsWithChildren {
4
+ variant?: "info" | "success" | "warning" | "danger";
5
+ title?: string;
6
+ description?: string;
7
+ isCloseable?: boolean;
8
+ isIconHidden?: boolean;
9
+ role?: React.AriaRole | undefined;
10
+ onClose?: () => void;
11
+ }
12
+ export default function InlineAlert({ variant, title, description, isIconHidden, isCloseable, role, children, onClose, ...props }: InlineAlertProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./InlineAlert";
2
+ export type { InlineAlertProps } from "./InlineAlert";
@@ -31,7 +31,10 @@ export interface SelectProps<T extends object> extends ReactAriaSelectProps<T> {
31
31
  placeholder?: string;
32
32
  /** Defaults to `medium` */
33
33
  size?: "small" | "medium";
34
+ /** Description or helper text that renders below the select input */
35
+ description?: string;
36
+ /** Used for data validation and error handling */
34
37
  errorMessage?: string | ((validation: ValidationResult) => string);
35
38
  }
36
39
  /** Select displays a collapsible list of options and allows a user to select one of them. */
37
- export default function Select<T extends object>({ items, sections, label, placeholder, size, errorMessage, ...props }: SelectProps<T>): import("react/jsx-runtime").JSX.Element;
40
+ export default function Select<T extends object>({ items, sections, label, description, placeholder, size, errorMessage, ...props }: SelectProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { SwitchProps as ReactAriaSwitchProps } from "react-aria-components";
2
+ import "./Switch.css";
3
+ export interface SwitchProps extends ReactAriaSwitchProps {
4
+ children?: React.ReactNode;
5
+ labelPosition?: "left" | "right";
6
+ }
7
+ export default function Switch({ labelPosition, children, ...props }: SwitchProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Switch";
2
+ export type { SwitchProps } from "./Switch";
@@ -1,13 +1,20 @@
1
1
  import "@bcgov/design-tokens/css/variables.css";
2
+ export { default as InlineAlert } from "./InlineAlert";
2
3
  export { default as Button } from "./Button";
3
4
  export { default as Header } from "./Header";
4
5
  export { default as Footer, FooterLinks } from "./Footer";
5
6
  export { default as Form } from "./Form";
6
7
  export { default as Select } from "./Select";
7
- export { default as SvgBcLogo } from "./SvgBcLogo";
8
+ export { default as SvgBcLogo } from "./Icons/SvgBcLogo";
9
+ export { default as SvgCheckCircleIcon } from "./Icons/SvgCheckCircleIcon";
10
+ export { default as SvgExclamationIcon } from "./Icons/SvgExclamationIcon";
11
+ export { default as SvgExclamationCircleIcon } from "./Icons/SvgExclamationCircleIcon";
12
+ export { default as SvgCloseIcon } from "./Icons/SvgCloseIcon";
13
+ export { default as SvgInfoIcon } from "./Icons/SvgInfoIcon";
8
14
  export { default as Tag } from "./Tag";
9
15
  export { default as TagGroup } from "./TagGroup";
10
16
  export { default as TagList } from "./TagList";
11
17
  export { default as TextArea } from "./TextArea";
12
18
  export { default as TextField } from "./TextField";
19
+ export { default as Switch } from "./Switch";
13
20
  export { default as Tooltip, TooltipTrigger } from "./Tooltip";