@bcgov/design-system-react-components 0.3.1 → 0.4.0-pr504

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 (34) hide show
  1. package/dist/cjs/index.cjs +1494 -778
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs/types/components/Accordion/Accordion.d.ts +6 -0
  4. package/dist/cjs/types/components/Accordion/index.d.ts +2 -0
  5. package/dist/cjs/types/components/AccordionGroup/AccordionGroup.d.ts +7 -0
  6. package/dist/cjs/types/components/AccordionGroup/index.d.ts +2 -0
  7. package/dist/cjs/types/components/AlertBanner/AlertBanner.d.ts +10 -0
  8. package/dist/cjs/types/components/AlertBanner/index.d.ts +2 -0
  9. package/dist/cjs/types/components/Callout/Callout.d.ts +10 -0
  10. package/dist/cjs/types/components/Callout/index.d.ts +2 -0
  11. package/dist/cjs/types/components/Icons/SvgBcOutlineIcon/SvgBcOutlineIcon.d.ts +3 -0
  12. package/dist/cjs/types/components/Icons/SvgBcOutlineIcon/index.d.ts +1 -0
  13. package/dist/cjs/types/components/Icons/SvgBetaIcon/SvgBetaIcon.d.ts +3 -0
  14. package/dist/cjs/types/components/Icons/SvgBetaIcon/index.d.ts +1 -0
  15. package/dist/cjs/types/components/Tag/Tag.d.ts +9 -1
  16. package/dist/cjs/types/components/index.d.ts +6 -0
  17. package/dist/esm/index.js +1489 -779
  18. package/dist/esm/index.js.map +1 -1
  19. package/dist/esm/types/components/Accordion/Accordion.d.ts +6 -0
  20. package/dist/esm/types/components/Accordion/index.d.ts +2 -0
  21. package/dist/esm/types/components/AccordionGroup/AccordionGroup.d.ts +7 -0
  22. package/dist/esm/types/components/AccordionGroup/index.d.ts +2 -0
  23. package/dist/esm/types/components/AlertBanner/AlertBanner.d.ts +10 -0
  24. package/dist/esm/types/components/AlertBanner/index.d.ts +2 -0
  25. package/dist/esm/types/components/Callout/Callout.d.ts +10 -0
  26. package/dist/esm/types/components/Callout/index.d.ts +2 -0
  27. package/dist/esm/types/components/Icons/SvgBcOutlineIcon/SvgBcOutlineIcon.d.ts +3 -0
  28. package/dist/esm/types/components/Icons/SvgBcOutlineIcon/index.d.ts +1 -0
  29. package/dist/esm/types/components/Icons/SvgBetaIcon/SvgBetaIcon.d.ts +3 -0
  30. package/dist/esm/types/components/Icons/SvgBetaIcon/index.d.ts +1 -0
  31. package/dist/esm/types/components/Tag/Tag.d.ts +9 -1
  32. package/dist/esm/types/components/index.d.ts +6 -0
  33. package/dist/index.d.ts +50 -3
  34. package/package.json +2 -2
@@ -0,0 +1,6 @@
1
+ import { DisclosureProps as DisclosureProps } from "react-aria-components";
2
+ import "./Accordion.css";
3
+ export interface AccordionProps extends DisclosureProps {
4
+ label?: string;
5
+ }
6
+ export default function Accordion({ label, children, ...props }: AccordionProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Accordion";
2
+ export type { AccordionProps } from "./Accordion";
@@ -0,0 +1,7 @@
1
+ import { DisclosureGroupProps } from "react-aria-components";
2
+ import "./AccordionGroup.css";
3
+ export interface AccordionGroupProps extends DisclosureGroupProps {
4
+ title?: string;
5
+ titleElement?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
6
+ }
7
+ export default function AccordionGroup({ title, titleElement, children, ...props }: AccordionGroupProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./AccordionGroup";
2
+ export type { AccordionGroupProps } from "./AccordionGroup";
@@ -0,0 +1,10 @@
1
+ import "./AlertBanner.css";
2
+ export interface AlertBannerProps extends React.PropsWithChildren {
3
+ variant?: "info" | "success" | "warning" | "danger" | "black";
4
+ isIconHidden?: boolean;
5
+ isCloseable?: boolean;
6
+ role?: React.AriaRole | undefined;
7
+ customIcon?: React.ReactNode;
8
+ onClose?: () => void;
9
+ }
10
+ export default function AlertBanner({ variant, isIconHidden, isCloseable, role, onClose, children, customIcon, ...props }: AlertBannerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./AlertBanner";
2
+ export type { AlertBannerProps } from "./AlertBanner";
@@ -0,0 +1,10 @@
1
+ import "./Callout.css";
2
+ export interface CalloutProps extends React.PropsWithChildren {
3
+ variant?: "lightGrey" | "lightBlue" | "lightGold" | "Blue" | "Grey" | "Black";
4
+ title?: string;
5
+ description?: string;
6
+ buttons?: React.ReactNode;
7
+ role?: React.AriaRole | undefined;
8
+ isLeftBorderDisabled?: boolean;
9
+ }
10
+ export default function Callout({ variant, title, description, buttons, role, isLeftBorderDisabled, children, ...props }: CalloutProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Callout";
2
+ export type { CalloutProps } from "./Callout";
@@ -0,0 +1,3 @@
1
+ export default function SvgBcOutlineIcon({ id }: {
2
+ id?: string | undefined;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from "./SvgBcOutlineIcon";
@@ -0,0 +1,3 @@
1
+ export default function SvgBetaIcon({ id }: {
2
+ id?: string | undefined;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { default } from "./SvgBetaIcon";
@@ -9,5 +9,13 @@ export interface TagProps extends ReactAriaTagProps {
9
9
  * Background color
10
10
  */
11
11
  color?: "bc-blue" | "bc-gold" | "blue" | "dark" | "gray" | "grey" | "green" | "red" | "yellow";
12
+ /**
13
+ * tagStyle
14
+ */
15
+ tagStyle?: "rectangular" | "circular";
16
+ /**
17
+ * size
18
+ */
19
+ size?: "small" | "medium";
12
20
  }
13
- export default function Tag({ color, icon, id, textValue }: TagProps): import("react/jsx-runtime").JSX.Element;
21
+ export default function Tag({ color, tagStyle, size, icon, id, textValue, }: TagProps): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,11 @@
1
1
  import "@bcgov/design-tokens/css/variables.css";
2
+ export { default as Accordion } from "./Accordion";
3
+ export { default as AccordionGroup } from "./AccordionGroup";
4
+ export { default as AlertBanner } from "./AlertBanner";
2
5
  export { default as AlertDialog } from "./AlertDialog";
3
6
  export { default as Button } from "./Button";
4
7
  export { default as ButtonGroup } from "./ButtonGroup";
8
+ export { default as Callout } from "./Callout";
5
9
  export { default as Checkbox } from "./Checkbox";
6
10
  export { default as CheckboxGroup } from "./CheckboxGroup";
7
11
  export { default as Dialog, DialogTrigger } from "./Dialog";
@@ -14,6 +18,8 @@ export { default as Radio } from "./Radio";
14
18
  export { default as RadioGroup } from "./RadioGroup";
15
19
  export { default as Select } from "./Select";
16
20
  export { default as SvgBcLogo } from "./Icons/SvgBcLogo";
21
+ export { default as SvgBcOutlineIcon } from "./Icons/SvgBcOutlineIcon";
22
+ export { default as SvgBetaIcon } from "./Icons/SvgBetaIcon";
17
23
  export { default as SvgCheckIcon } from "./Icons/SvgCheckIcon";
18
24
  export { default as SvgCheckCircleIcon } from "./Icons/SvgCheckCircleIcon";
19
25
  export { default as SvgDashIcon } from "./Icons/SvgDashIcon";
package/dist/index.d.ts CHANGED
@@ -1,8 +1,29 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { DialogProps as DialogProps$1, ButtonProps as ButtonProps$1, CheckboxProps, CheckboxGroupProps as CheckboxGroupProps$1, ValidationResult, FormProps, ModalOverlayProps, RadioProps, RadioGroupProps as RadioGroupProps$1, SelectProps as SelectProps$1, ListBoxItemProps as ListBoxItemProps$1, Key, TagProps as TagProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1, TextFieldProps as TextFieldProps$1, SwitchProps as SwitchProps$1, TooltipProps } from 'react-aria-components';
2
+ import { DisclosureProps, DisclosureGroupProps, DialogProps as DialogProps$1, ButtonProps as ButtonProps$1, CheckboxProps, CheckboxGroupProps as CheckboxGroupProps$1, ValidationResult, FormProps, ModalOverlayProps, RadioProps, RadioGroupProps as RadioGroupProps$1, SelectProps as SelectProps$1, ListBoxItemProps as ListBoxItemProps$1, Key, TagProps as TagProps$1, TagGroupProps as TagGroupProps$1, TagListProps as TagListProps$1, TextFieldProps as TextFieldProps$1, SwitchProps as SwitchProps$1, TooltipProps } from 'react-aria-components';
3
3
  export { DialogTrigger, TooltipTrigger } from 'react-aria-components';
4
4
  import { PropsWithChildren } from 'react';
5
5
 
6
+ interface AccordionProps extends DisclosureProps {
7
+ label?: string;
8
+ }
9
+ declare function Accordion({ label, children, ...props }: AccordionProps): react_jsx_runtime.JSX.Element;
10
+
11
+ interface AccordionGroupProps extends DisclosureGroupProps {
12
+ title?: string;
13
+ titleElement?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
14
+ }
15
+ declare function AccordionGroup({ title, titleElement, children, ...props }: AccordionGroupProps): react_jsx_runtime.JSX.Element;
16
+
17
+ interface AlertBannerProps extends React.PropsWithChildren {
18
+ variant?: "info" | "success" | "warning" | "danger" | "black";
19
+ isIconHidden?: boolean;
20
+ isCloseable?: boolean;
21
+ role?: React.AriaRole | undefined;
22
+ customIcon?: React.ReactNode;
23
+ onClose?: () => void;
24
+ }
25
+ declare function AlertBanner({ variant, isIconHidden, isCloseable, role, onClose, children, customIcon, ...props }: AlertBannerProps): react_jsx_runtime.JSX.Element;
26
+
6
27
  interface AlertDialogProps extends DialogProps$1 {
7
28
  variant?: "info" | "confirmation" | "warning" | "error" | "destructive";
8
29
  title?: string;
@@ -39,6 +60,16 @@ interface ButtonGroupProps extends React.PropsWithChildren {
39
60
  }
40
61
  declare function ButtonGroup({ orientation, alignment, ariaLabel, children, ...props }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
41
62
 
63
+ interface CalloutProps extends React.PropsWithChildren {
64
+ variant?: "lightGrey" | "lightBlue" | "lightGold" | "Blue" | "Grey" | "Black";
65
+ title?: string;
66
+ description?: string;
67
+ buttons?: React.ReactNode;
68
+ role?: React.AriaRole | undefined;
69
+ isLeftBorderDisabled?: boolean;
70
+ }
71
+ declare function Callout({ variant, title, description, buttons, role, isLeftBorderDisabled, children, ...props }: CalloutProps): react_jsx_runtime.JSX.Element;
72
+
42
73
  declare function Checkbox({ value, children, ...props }: CheckboxProps): react_jsx_runtime.JSX.Element;
43
74
 
44
75
  interface CheckboxGroupProps extends CheckboxGroupProps$1 {
@@ -217,6 +248,14 @@ declare function SvgBcLogo({ id }: {
217
248
  id?: string | undefined;
218
249
  }): react_jsx_runtime.JSX.Element;
219
250
 
251
+ declare function SvgBcOutlineIcon({ id }: {
252
+ id?: string | undefined;
253
+ }): react_jsx_runtime.JSX.Element;
254
+
255
+ declare function SvgBetaIcon({ id }: {
256
+ id?: string | undefined;
257
+ }): react_jsx_runtime.JSX.Element;
258
+
220
259
  declare function SvgCheckIcon({ id }: {
221
260
  id?: string | undefined;
222
261
  }): react_jsx_runtime.JSX.Element;
@@ -266,8 +305,16 @@ interface TagProps extends TagProps$1 {
266
305
  * Background color
267
306
  */
268
307
  color?: "bc-blue" | "bc-gold" | "blue" | "dark" | "gray" | "grey" | "green" | "red" | "yellow";
308
+ /**
309
+ * tagStyle
310
+ */
311
+ tagStyle?: "rectangular" | "circular";
312
+ /**
313
+ * size
314
+ */
315
+ size?: "small" | "medium";
269
316
  }
270
- declare function Tag({ color, icon, id, textValue }: TagProps): react_jsx_runtime.JSX.Element;
317
+ declare function Tag({ color, tagStyle, size, icon, id, textValue, }: TagProps): react_jsx_runtime.JSX.Element;
271
318
 
272
319
  interface TagGroupProps extends TagGroupProps$1 {
273
320
  /**
@@ -318,4 +365,4 @@ declare function Switch({ labelPosition, children, ...props }: SwitchProps): rea
318
365
 
319
366
  declare function Tooltip(props: TooltipProps): react_jsx_runtime.JSX.Element;
320
367
 
321
- export { AlertDialog, Button, ButtonGroup, Checkbox, CheckboxGroup, Dialog, Footer, FooterLinks, Form, Header, InlineAlert, Modal, Radio, RadioGroup, Select, SvgBcLogo, SvgCheckCircleIcon, SvgCheckIcon, SvgChevronDownIcon, SvgChevronUpIcon, SvgCloseIcon, SvgDashIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, SvgTooltipArrowUp, Switch, Tag, TagGroup, TagList, TextArea, TextField, Tooltip };
368
+ export { Accordion, AccordionGroup, AlertBanner, AlertDialog, Button, ButtonGroup, Callout, Checkbox, CheckboxGroup, Dialog, Footer, FooterLinks, Form, Header, InlineAlert, Modal, Radio, RadioGroup, Select, SvgBcLogo, SvgBcOutlineIcon, SvgBetaIcon, SvgCheckCircleIcon, SvgCheckIcon, SvgChevronDownIcon, SvgChevronUpIcon, SvgCloseIcon, SvgDashIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, SvgTooltipArrowUp, Switch, Tag, TagGroup, TagList, TextArea, TextField, Tooltip };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bcgov/design-system-react-components",
3
- "version": "0.3.1",
3
+ "version": "0.4.0-pr504",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "rollup": "rm -rf dist && rollup -c --bundleConfigAsCjs",
@@ -24,7 +24,7 @@
24
24
  "types": "dist/index.d.ts",
25
25
  "dependencies": {
26
26
  "@bcgov/design-tokens": "3.1.1",
27
- "react-aria-components": "1.3.3"
27
+ "react-aria-components": "1.5.0"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@bcgov/bc-sans": "^2.1.0",