@bcgov/design-system-react-components 0.4.1-rc1 → 0.5.0-pr510

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 (29) hide show
  1. package/README.md +23 -19
  2. package/dist/cjs/index.cjs +1649 -811
  3. package/dist/cjs/index.cjs.map +1 -1
  4. package/dist/cjs/types/components/Accordion/Accordion.d.ts +6 -0
  5. package/dist/cjs/types/components/Accordion/index.d.ts +2 -0
  6. package/dist/cjs/types/components/AccordionGroup/AccordionGroup.d.ts +7 -0
  7. package/dist/cjs/types/components/AccordionGroup/index.d.ts +2 -0
  8. package/dist/cjs/types/components/Heading/Heading.d.ts +7 -0
  9. package/dist/cjs/types/components/Heading/index.d.ts +2 -0
  10. package/dist/cjs/types/components/Link/Link.d.ts +15 -0
  11. package/dist/cjs/types/components/Link/index.d.ts +2 -0
  12. package/dist/cjs/types/components/Text/Text.d.ts +8 -0
  13. package/dist/cjs/types/components/Text/index.d.ts +2 -0
  14. package/dist/cjs/types/components/index.d.ts +5 -0
  15. package/dist/esm/index.js +1645 -812
  16. package/dist/esm/index.js.map +1 -1
  17. package/dist/esm/types/components/Accordion/Accordion.d.ts +6 -0
  18. package/dist/esm/types/components/Accordion/index.d.ts +2 -0
  19. package/dist/esm/types/components/AccordionGroup/AccordionGroup.d.ts +7 -0
  20. package/dist/esm/types/components/AccordionGroup/index.d.ts +2 -0
  21. package/dist/esm/types/components/Heading/Heading.d.ts +7 -0
  22. package/dist/esm/types/components/Heading/index.d.ts +2 -0
  23. package/dist/esm/types/components/Link/Link.d.ts +15 -0
  24. package/dist/esm/types/components/Link/index.d.ts +2 -0
  25. package/dist/esm/types/components/Text/Text.d.ts +8 -0
  26. package/dist/esm/types/components/Text/index.d.ts +2 -0
  27. package/dist/esm/types/components/index.d.ts +5 -0
  28. package/dist/index.d.ts +39 -2
  29. package/package.json +15 -15
@@ -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,7 @@
1
+ import { HeadingProps as ReactAriaHeadingProps } from "react-aria-components";
2
+ import "./Heading.css";
3
+ export interface HeadingProps extends ReactAriaHeadingProps {
4
+ color?: "primary" | "primaryInvert" | "secondary" | "secondaryInvert" | "disabled" | "danger";
5
+ isUnstyled?: boolean;
6
+ }
7
+ export default function Heading({ color, isUnstyled, ...props }: HeadingProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Heading";
2
+ export type { HeadingProps } from "./Heading";
@@ -0,0 +1,15 @@
1
+ import { LinkProps as ReactAriaLinkProps } from "react-aria-components";
2
+ import "./Link.css";
3
+ import "../Button/Button.css";
4
+ export interface LinkProps extends ReactAriaLinkProps {
5
+ children?: React.ReactNode;
6
+ size?: "small" | "medium" | "large";
7
+ isButton?: boolean;
8
+ buttonVariant?: "primary" | "secondary" | "tertiary";
9
+ ariaLabel?: string | undefined;
10
+ danger?: boolean;
11
+ isUnstyled?: boolean;
12
+ iconLeft?: React.ReactElement;
13
+ iconRight?: React.ReactElement;
14
+ }
15
+ export default function Link({ children, size, danger, isButton, buttonVariant, isUnstyled, iconLeft, iconRight, ariaLabel, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Link";
2
+ export type { LinkProps } from "./Link";
@@ -0,0 +1,8 @@
1
+ import { TextProps as ReactAriaTextProps } from "react-aria-components";
2
+ import "./Text.css";
3
+ export interface TextProps extends ReactAriaTextProps {
4
+ size?: "small" | "medium" | "large";
5
+ color?: "primary" | "primaryInvert" | "secondary" | "secondaryInvert" | "disabled" | "danger";
6
+ isUnstyled?: boolean;
7
+ }
8
+ export default function Text({ elementType, size, color, isUnstyled, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Text";
2
+ export type { TextProps } from "./Text";
@@ -1,4 +1,6 @@
1
1
  import "@bcgov/design-tokens/css/variables.css";
2
+ export { default as Accordion } from "./Accordion";
3
+ export { default as AccordionGroup } from "./AccordionGroup";
2
4
  export { default as AlertBanner } from "./AlertBanner";
3
5
  export { default as AlertDialog } from "./AlertDialog";
4
6
  export { default as Button } from "./Button";
@@ -10,7 +12,9 @@ export { default as Dialog, DialogTrigger } from "./Dialog";
10
12
  export { default as Footer, FooterLinks } from "./Footer";
11
13
  export { default as Form } from "./Form";
12
14
  export { default as Header } from "./Header";
15
+ export { default as Heading } from "./Heading";
13
16
  export { default as InlineAlert } from "./InlineAlert";
17
+ export { default as Link } from "./Link";
14
18
  export { default as Modal } from "./Modal";
15
19
  export { default as Radio } from "./Radio";
16
20
  export { default as RadioGroup } from "./RadioGroup";
@@ -31,6 +35,7 @@ export { default as SvgTooltipArrowUp } from "./Icons/SvgTooltipArrowUp";
31
35
  export { default as Tag } from "./Tag";
32
36
  export { default as TagGroup } from "./TagGroup";
33
37
  export { default as TagList } from "./TagList";
38
+ export { default as Text } from "./Text";
34
39
  export { default as TextArea } from "./TextArea";
35
40
  export { default as TextField } from "./TextField";
36
41
  export { default as Switch } from "./Switch";
package/dist/index.d.ts CHANGED
@@ -1,8 +1,19 @@
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, HeadingProps as HeadingProps$1, LinkProps as LinkProps$1, 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, TextProps as TextProps$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
+
6
17
  interface AlertBannerProps extends React.PropsWithChildren {
7
18
  variant?: "info" | "success" | "warning" | "danger" | "black";
8
19
  isIconHidden?: boolean;
@@ -168,6 +179,12 @@ interface HeaderProps {
168
179
  }
169
180
  declare function Header({ children, logoLinkElement, logoImage, skipLinks, title, titleElement, }: PropsWithChildren<HeaderProps>): react_jsx_runtime.JSX.Element;
170
181
 
182
+ interface HeadingProps extends HeadingProps$1 {
183
+ color?: "primary" | "primaryInvert" | "secondary" | "secondaryInvert" | "disabled" | "danger";
184
+ isUnstyled?: boolean;
185
+ }
186
+ declare function Heading({ color, isUnstyled, ...props }: HeadingProps): react_jsx_runtime.JSX.Element;
187
+
171
188
  interface InlineAlertProps extends React.PropsWithChildren {
172
189
  variant?: "info" | "success" | "warning" | "danger";
173
190
  title?: string;
@@ -180,6 +197,19 @@ interface InlineAlertProps extends React.PropsWithChildren {
180
197
  }
181
198
  declare function InlineAlert({ variant, title, description, isIconHidden, isCloseable, role, buttons, children, onClose, ...props }: InlineAlertProps): react_jsx_runtime.JSX.Element;
182
199
 
200
+ interface LinkProps extends LinkProps$1 {
201
+ children?: React.ReactNode;
202
+ size?: "small" | "medium" | "large";
203
+ isButton?: boolean;
204
+ buttonVariant?: "primary" | "secondary" | "tertiary";
205
+ ariaLabel?: string | undefined;
206
+ danger?: boolean;
207
+ isUnstyled?: boolean;
208
+ iconLeft?: React.ReactElement;
209
+ iconRight?: React.ReactElement;
210
+ }
211
+ declare function Link({ children, size, danger, isButton, buttonVariant, isUnstyled, iconLeft, iconRight, ariaLabel, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
212
+
183
213
  declare function Modal({ children, ...props }: ModalOverlayProps): react_jsx_runtime.JSX.Element;
184
214
 
185
215
  declare function Radio({ value, children, ...props }: RadioProps): react_jsx_runtime.JSX.Element;
@@ -330,6 +360,13 @@ interface TagListProps<T> extends Pick<TagListProps$1<T>, "children" | "renderEm
330
360
  }
331
361
  declare function TagList<T extends object>({ items, orientation, renderEmptyState, ...props }: TagListProps<T>): react_jsx_runtime.JSX.Element;
332
362
 
363
+ interface TextProps extends TextProps$1 {
364
+ size?: "small" | "medium" | "large";
365
+ color?: "primary" | "primaryInvert" | "secondary" | "secondaryInvert" | "disabled" | "danger";
366
+ isUnstyled?: boolean;
367
+ }
368
+ declare function Text({ elementType, size, color, isUnstyled, ...props }: TextProps): react_jsx_runtime.JSX.Element;
369
+
333
370
  interface TextAreaProps extends TextFieldProps$1 {
334
371
  label?: string;
335
372
  description?: string;
@@ -354,4 +391,4 @@ declare function Switch({ labelPosition, children, ...props }: SwitchProps): rea
354
391
 
355
392
  declare function Tooltip(props: TooltipProps): react_jsx_runtime.JSX.Element;
356
393
 
357
- export { 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 };
394
+ export { Accordion, AccordionGroup, AlertBanner, AlertDialog, Button, ButtonGroup, Callout, Checkbox, CheckboxGroup, Dialog, Footer, FooterLinks, Form, Header, Heading, InlineAlert, Link, Modal, Radio, RadioGroup, Select, SvgBcLogo, SvgBcOutlineIcon, SvgBetaIcon, SvgCheckCircleIcon, SvgCheckIcon, SvgChevronDownIcon, SvgChevronUpIcon, SvgCloseIcon, SvgDashIcon, SvgExclamationCircleIcon, SvgExclamationIcon, SvgInfoIcon, SvgTooltipArrowUp, Switch, Tag, TagGroup, TagList, Text, TextArea, TextField, Tooltip };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bcgov/design-system-react-components",
3
- "version": "0.4.1-rc1",
3
+ "version": "0.5.0-pr510",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "rollup": "rm -rf dist && rollup -c --bundleConfigAsCjs",
@@ -23,13 +23,13 @@
23
23
  ],
24
24
  "types": "dist/index.d.ts",
25
25
  "dependencies": {
26
- "@bcgov/design-tokens": "3.1.1",
27
- "react-aria-components": "1.3.3"
26
+ "@bcgov/design-tokens": "3.2.0",
27
+ "react-aria-components": "1.5.0"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@bcgov/bc-sans": "^2.1.0",
31
- "react": "^16.14.0 || ^17.0.0-rc.1 || ^18.0.0",
32
- "react-dom": "^16.14.0 || ^17.0.0-rc.1 || ^18.0.0"
31
+ "react": "^16.14.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0",
32
+ "react-dom": "^16.14.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@react-stately/data": "3.11.6",
@@ -37,15 +37,15 @@
37
37
  "@rollup/plugin-json": "6.1.0",
38
38
  "@rollup/plugin-node-resolve": "15.2.3",
39
39
  "@rollup/plugin-typescript": "11.1.6",
40
- "@storybook/addon-a11y": "8.3.2",
41
- "@storybook/addon-essentials": "8.3.2",
42
- "@storybook/addon-interactions": "8.3.2",
43
- "@storybook/addon-links": "8.3.2",
44
- "@storybook/blocks": "8.3.2",
45
- "@storybook/react": "8.3.2",
46
- "@storybook/react-vite": "8.3.2",
47
- "@storybook/test": "8.3.2",
48
- "@storybook/test-runner": "0.19.1",
40
+ "@storybook/addon-a11y": "8.4.7",
41
+ "@storybook/addon-essentials": "8.4.7",
42
+ "@storybook/addon-interactions": "8.4.7",
43
+ "@storybook/addon-links": "8.4.7",
44
+ "@storybook/blocks": "8.4.7",
45
+ "@storybook/react": "8.4.7",
46
+ "@storybook/react-vite": "8.4.7",
47
+ "@storybook/test": "8.4.7",
48
+ "@storybook/test-runner": "0.20.1",
49
49
  "@testing-library/jest-dom": "6.5.0",
50
50
  "@testing-library/react": "16.0.1",
51
51
  "@types/jest": "29.5.13",
@@ -66,7 +66,7 @@
66
66
  "rollup-plugin-dts": "6.1.1",
67
67
  "rollup-plugin-peer-deps-external": "2.2.4",
68
68
  "rollup-plugin-postcss": "4.0.2",
69
- "storybook": "8.3.2",
69
+ "storybook": "8.4.7",
70
70
  "ts-jest": "29.2.5",
71
71
  "ts-node": "10.9.2",
72
72
  "tslib": "2.7.0",