@bcgov/design-system-react-components 0.0.2 → 0.0.4

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 (39) hide show
  1. package/README.md +34 -11
  2. package/dist/assets/BCSans-Bold-ZqE3sZik.woff +0 -0
  3. package/dist/assets/BCSans-Bold-onJZunl0.woff2 +0 -0
  4. package/dist/assets/BCSans-BoldItalic-4P_OlA2s.woff +0 -0
  5. package/dist/assets/BCSans-BoldItalic-GxGpSOWy.woff2 +0 -0
  6. package/dist/assets/BCSans-Italic-Pz_cGW4F.woff2 +0 -0
  7. package/dist/assets/BCSans-Italic-UhTyhoET.woff +0 -0
  8. package/dist/assets/BCSans-Light-A03rbYd1.woff2 +0 -0
  9. package/dist/assets/BCSans-Light-playkmYo.woff +0 -0
  10. package/dist/assets/BCSans-LightItalic-HTeW1g69.woff2 +0 -0
  11. package/dist/assets/BCSans-LightItalic-tgMWPWlK.woff +0 -0
  12. package/dist/assets/BCSans-Regular-jMf6NRx3.woff +0 -0
  13. package/dist/assets/BCSans-Regular-ysGfRp0T.woff2 +0 -0
  14. package/dist/assets/index-t1vEzjyT.css +1 -0
  15. package/dist/assets/index-yaBoZILt.js +48 -0
  16. package/dist/cjs/index.cjs +5068 -733
  17. package/dist/cjs/index.cjs.map +1 -1
  18. package/dist/cjs/types/components/Header/Header.d.ts +11 -0
  19. package/dist/cjs/types/components/Header/index.d.ts +2 -0
  20. package/dist/cjs/types/components/Select/Select.d.ts +36 -0
  21. package/dist/cjs/types/components/Select/index.d.ts +2 -0
  22. package/dist/cjs/types/components/SelectItem/SelectItem.d.ts +16 -0
  23. package/dist/cjs/types/components/SelectItem/index.d.ts +2 -0
  24. package/dist/cjs/types/components/Tag/Tag.d.ts +1 -1
  25. package/dist/cjs/types/components/index.d.ts +2 -0
  26. package/dist/esm/index.js +5068 -736
  27. package/dist/esm/index.js.map +1 -1
  28. package/dist/esm/types/components/Header/Header.d.ts +11 -0
  29. package/dist/esm/types/components/Header/index.d.ts +2 -0
  30. package/dist/esm/types/components/Select/Select.d.ts +36 -0
  31. package/dist/esm/types/components/Select/index.d.ts +2 -0
  32. package/dist/esm/types/components/SelectItem/SelectItem.d.ts +16 -0
  33. package/dist/esm/types/components/SelectItem/index.d.ts +2 -0
  34. package/dist/esm/types/components/Tag/Tag.d.ts +1 -1
  35. package/dist/esm/types/components/index.d.ts +2 -0
  36. package/dist/index.d.ts +48 -3
  37. package/dist/index.html +14 -0
  38. package/dist/vite.svg +1 -0
  39. package/package.json +24 -24
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import "./Header.css";
3
+ export declare function SvgBcLogo(): import("react/jsx-runtime").JSX.Element;
4
+ export interface HeaderProps {
5
+ logoLinkElement?: React.ReactElement;
6
+ logoImage?: JSX.Element;
7
+ skipLinks?: React.ReactElement[];
8
+ title?: string;
9
+ titleElement?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "span" | "p";
10
+ }
11
+ export default function Header({ children, logoLinkElement, logoImage, skipLinks, title, titleElement, }: React.PropsWithChildren<HeaderProps>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default, SvgBcLogo } from "./Header";
2
+ export type { HeaderProps } from "./Header";
@@ -0,0 +1,36 @@
1
+ import React from "react";
2
+ import { Key, ListBoxItemProps as ReactAriaListBoxItemProps, SelectProps as ReactAriaSelectProps } from "react-aria-components";
3
+ import "./Select.css";
4
+ export interface ListBoxItemProps extends ReactAriaListBoxItemProps {
5
+ /** Text label for the option. Provide an `id` if this is not unique. */
6
+ label: string;
7
+ /** Descriptive text that appears below the option's label */
8
+ description?: string;
9
+ /** Marks an option visually with red text to indicate a destructive/dangerous option */
10
+ isDestructive?: boolean;
11
+ /** Left icon slot */
12
+ iconLeft?: React.ReactElement;
13
+ /** Right icon slot */
14
+ iconRight?: React.ReactElement;
15
+ }
16
+ export interface SelectionSectionProps {
17
+ id: Key;
18
+ /** Label for the section */
19
+ header?: string;
20
+ /** Flat list of options within the section */
21
+ items: ListBoxItemProps[];
22
+ }
23
+ export interface SelectProps<T extends object> extends ReactAriaSelectProps<T> {
24
+ /** Use `items` for a flat list of options */
25
+ items?: ListBoxItemProps[];
26
+ /** Use `sections` for a sectioned list with `items` options in each section */
27
+ sections?: SelectionSectionProps[];
28
+ /** Text label for the Select component */
29
+ label?: string;
30
+ /** Temporary text that occupies the select input when no option has been selected. */
31
+ placeholder?: string;
32
+ /** Defaults to `medium` */
33
+ size?: "small" | "medium";
34
+ }
35
+ /** Select displays a collapsible list of options and allows a user to select one of them. */
36
+ export default function Select<T extends object>({ items, sections, label, placeholder, size, ...props }: SelectProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Select";
2
+ export type { SelectProps } from "./Select";
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { ListBoxItemProps } from "react-aria-components";
3
+ import "./SelectItem.css";
4
+ export interface SelectItemProps extends ListBoxItemProps {
5
+ /** Text label for the option. Provide an `id` if this is not unique. */
6
+ label: string;
7
+ /** Descriptive text that appears below the option's label */
8
+ description?: string;
9
+ /** Marks an option visually with red text to indicate danger */
10
+ isDestructive?: boolean;
11
+ /** Left icon slot */
12
+ iconLeft?: React.ReactElement;
13
+ /** Right icon slot */
14
+ iconRight?: React.ReactElement;
15
+ }
16
+ export default function SelectItem({ description, id, iconLeft, iconRight, isDestructive, label, }: SelectItemProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./SelectItem";
2
+ export type { SelectItemProps } from "./SelectItem";
@@ -5,4 +5,4 @@ export interface TagProps extends ReactAriaTagProps {
5
5
  icon?: React.ReactNode;
6
6
  color?: "bc-blue" | "bc-gold" | "blue" | "dark" | "gray" | "grey" | "green" | "red" | "yellow";
7
7
  }
8
- export default function Tag({ className, color, icon, id, textValue, }: TagProps): import("react/jsx-runtime").JSX.Element;
8
+ export default function Tag({ color, icon, id, textValue }: TagProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,7 @@
1
1
  import "@bcgov/design-tokens/css/variables.css";
2
2
  export { default as Button } from "./Button";
3
+ export { default as Header, SvgBcLogo } from "./Header";
4
+ export { default as Select } from "./Select";
3
5
  export { default as Tag } from "./Tag";
4
6
  export { default as TagGroup } from "./TagGroup";
5
7
  export { default as TagList } from "./TagList";