@openedx/paragon 23.18.1 → 23.19.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 (34) hide show
  1. package/dist/Badge/index.d.ts +15 -0
  2. package/dist/Badge/index.js +12 -19
  3. package/dist/Badge/index.js.map +1 -1
  4. package/dist/Breadcrumb/BreadcrumbLink.d.ts +13 -0
  5. package/dist/Breadcrumb/BreadcrumbLink.js +1 -14
  6. package/dist/Breadcrumb/BreadcrumbLink.js.map +1 -1
  7. package/dist/Breadcrumb/index.d.ts +32 -0
  8. package/dist/Breadcrumb/index.js +6 -43
  9. package/dist/Breadcrumb/index.js.map +1 -1
  10. package/dist/Card/CardCarousel/CardCarouselSubtitle.d.ts +11 -0
  11. package/dist/Card/CardCarousel/CardCarouselSubtitle.js +0 -13
  12. package/dist/Card/CardCarousel/CardCarouselSubtitle.js.map +1 -1
  13. package/dist/Card/CardCarousel/CardCarouselTitle.d.ts +8 -0
  14. package/dist/Card/CardCarousel/CardCarouselTitle.js +0 -10
  15. package/dist/Card/CardCarousel/CardCarouselTitle.js.map +1 -1
  16. package/dist/IconButton/index.d.ts +1 -1
  17. package/dist/IconButton/index.js.map +1 -1
  18. package/dist/IconButtonToggle/index.js +1 -1
  19. package/dist/IconButtonToggle/index.js.map +1 -1
  20. package/dist/index.d.ts +2 -2
  21. package/dist/index.js +2 -4
  22. package/dist/index.js.map +1 -1
  23. package/package.json +1 -1
  24. package/src/Badge/index.tsx +33 -0
  25. package/src/Breadcrumb/{Breadcrumb.test.jsx → Breadcrumb.test.tsx} +25 -0
  26. package/src/Breadcrumb/{BreadcrumbLink.jsx → BreadcrumbLink.tsx} +18 -17
  27. package/src/Breadcrumb/{index.jsx → index.tsx} +31 -43
  28. package/src/Card/CardCarousel/{CardCarouselSubtitle.jsx → CardCarouselSubtitle.tsx} +10 -16
  29. package/src/Card/CardCarousel/CardCarouselTitle.tsx +19 -0
  30. package/src/IconButton/index.tsx +1 -1
  31. package/src/IconButtonToggle/index.jsx +1 -1
  32. package/src/index.ts +2 -4
  33. package/src/Badge/index.jsx +0 -36
  34. package/src/Card/CardCarousel/CardCarouselTitle.jsx +0 -25
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { ComponentWithAsProp } from '../utils/types/bootstrap';
3
+ declare const STYLE_VARIANTS: string[];
4
+ interface BadgeProps {
5
+ /** Specifies element type for this component */
6
+ as?: React.ElementType;
7
+ /** Visual style of the badge. The full type definition can be seen [here](https://github.com/openedx/paragon/blob/release-23.x/src/Badge/index.tsx) */
8
+ variant?: typeof STYLE_VARIANTS[number];
9
+ /** Add the `pill` modifier to make badges more rounded with some additional horizontal padding */
10
+ pill?: boolean;
11
+ /** Overrides underlying component base CSS class name */
12
+ bsPrefix?: string;
13
+ }
14
+ declare const Badge: ComponentWithAsProp<'span', BadgeProps>;
15
+ export default Badge;
@@ -1,26 +1,19 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import BaseBadge from 'react-bootstrap/Badge';
4
- const Badge = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(BaseBadge, {
3
+ const STYLE_VARIANTS = ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'];
4
+ const Badge = /*#__PURE__*/React.forwardRef(({
5
+ as = 'span',
6
+ variant = 'primary',
7
+ pill = false,
8
+ bsPrefix = 'badge',
9
+ ...props
10
+ }, ref) => /*#__PURE__*/React.createElement(BaseBadge, {
11
+ as: as,
12
+ variant: variant,
13
+ pill: pill,
14
+ bsPrefix: bsPrefix,
5
15
  ...props,
6
16
  ref: ref
7
17
  }));
8
- const STYLE_VARIANTS = ['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark'];
9
- Badge.propTypes = {
10
- /** Specifies element type for this component */
11
- as: PropTypes.elementType,
12
- /** Visual style of the badge */
13
- variant: PropTypes.oneOf(STYLE_VARIANTS),
14
- /** Add the `pill` modifier to make badges more rounded with some additional horizontal padding */
15
- pill: PropTypes.bool,
16
- /** Overrides underlying component base CSS class name */
17
- bsPrefix: PropTypes.string
18
- };
19
- Badge.defaultProps = {
20
- as: 'span',
21
- variant: 'primary',
22
- pill: false,
23
- bsPrefix: 'badge'
24
- };
25
18
  export default Badge;
26
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","BaseBadge","Badge","forwardRef","props","ref","createElement","STYLE_VARIANTS","propTypes","as","elementType","variant","oneOf","pill","bool","bsPrefix","string","defaultProps"],"sources":["../../src/Badge/index.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport BaseBadge from 'react-bootstrap/Badge';\n\nconst Badge = React.forwardRef((props, ref) => <BaseBadge {...props} ref={ref} />);\n\nconst STYLE_VARIANTS = [\n 'primary',\n 'secondary',\n 'success',\n 'danger',\n 'warning',\n 'info',\n 'light',\n 'dark',\n];\n\nBadge.propTypes = {\n /** Specifies element type for this component */\n as: PropTypes.elementType,\n /** Visual style of the badge */\n variant: PropTypes.oneOf(STYLE_VARIANTS),\n /** Add the `pill` modifier to make badges more rounded with some additional horizontal padding */\n pill: PropTypes.bool,\n /** Overrides underlying component base CSS class name */\n bsPrefix: PropTypes.string,\n};\n\nBadge.defaultProps = {\n as: 'span',\n variant: 'primary',\n pill: false,\n bsPrefix: 'badge',\n};\n\nexport default Badge;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,SAAS,MAAM,uBAAuB;AAE7C,MAAMC,KAAK,gBAAGH,KAAK,CAACI,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,kBAAKN,KAAA,CAAAO,aAAA,CAACL,SAAS;EAAA,GAAKG,KAAK;EAAEC,GAAG,EAAEA;AAAI,CAAE,CAAC,CAAC;AAElF,MAAME,cAAc,GAAG,CACrB,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,MAAM,CACP;AAEDL,KAAK,CAACM,SAAS,GAAG;EAChB;EACAC,EAAE,EAAET,SAAS,CAACU,WAAW;EACzB;EACAC,OAAO,EAAEX,SAAS,CAACY,KAAK,CAACL,cAAc,CAAC;EACxC;EACAM,IAAI,EAAEb,SAAS,CAACc,IAAI;EACpB;EACAC,QAAQ,EAAEf,SAAS,CAACgB;AACtB,CAAC;AAEDd,KAAK,CAACe,YAAY,GAAG;EACnBR,EAAE,EAAE,MAAM;EACVE,OAAO,EAAE,SAAS;EAClBE,IAAI,EAAE,KAAK;EACXE,QAAQ,EAAE;AACZ,CAAC;AAED,eAAeb,KAAK","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","BaseBadge","STYLE_VARIANTS","Badge","forwardRef","as","variant","pill","bsPrefix","props","ref","createElement"],"sources":["../../src/Badge/index.tsx"],"sourcesContent":["import React, { ForwardedRef } from 'react';\nimport BaseBadge from 'react-bootstrap/Badge';\nimport { ComponentWithAsProp } from '../utils/types/bootstrap';\n\nconst STYLE_VARIANTS = [\n 'primary',\n 'secondary',\n 'success',\n 'danger',\n 'warning',\n 'info',\n 'light',\n 'dark',\n];\n\ninterface BadgeProps {\n /** Specifies element type for this component */\n as?: React.ElementType;\n /** Visual style of the badge. The full type definition can be seen [here](https://github.com/openedx/paragon/blob/release-23.x/src/Badge/index.tsx) */\n variant?: typeof STYLE_VARIANTS[number];\n /** Add the `pill` modifier to make badges more rounded with some additional horizontal padding */\n pill?: boolean;\n /** Overrides underlying component base CSS class name */\n bsPrefix?: string;\n}\n\nconst Badge: ComponentWithAsProp<'span', BadgeProps> = React.forwardRef(({\n as = 'span', variant = 'primary', pill = false, bsPrefix = 'badge', ...props\n}: BadgeProps, ref: ForwardedRef<HTMLSpanElement>) => (\n <BaseBadge as={as} variant={variant} pill={pill} bsPrefix={bsPrefix} {...props} ref={ref} />\n));\n\nexport default Badge;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAwB,OAAO;AAC3C,OAAOC,SAAS,MAAM,uBAAuB;AAG7C,MAAMC,cAAc,GAAG,CACrB,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,MAAM,CACP;AAaD,MAAMC,KAA8C,gBAAGH,KAAK,CAACI,UAAU,CAAC,CAAC;EACvEC,EAAE,GAAG,MAAM;EAAEC,OAAO,GAAG,SAAS;EAAEC,IAAI,GAAG,KAAK;EAAEC,QAAQ,GAAG,OAAO;EAAE,GAAGC;AAC7D,CAAC,EAAEC,GAAkC,kBAC/CV,KAAA,CAAAW,aAAA,CAACV,SAAS;EAACI,EAAE,EAAEA,EAAG;EAACC,OAAO,EAAEA,OAAQ;EAACC,IAAI,EAAEA,IAAK;EAACC,QAAQ,EAAEA,QAAS;EAAA,GAAKC,KAAK;EAAEC,GAAG,EAAEA;AAAI,CAAE,CAC5F,CAAC;AAEF,eAAeP,KAAK","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ interface BreadcrumbLinkProps {
3
+ as: React.ElementType;
4
+ clickHandler?: (event: React.MouseEvent, link: any) => void;
5
+ linkProps: {
6
+ label: string;
7
+ url?: string;
8
+ className?: string;
9
+ [key: string]: any;
10
+ };
11
+ }
12
+ export default function BreadcrumbLink({ as, clickHandler, linkProps }: BreadcrumbLinkProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
13
+ export {};
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import classNames from 'classnames';
4
3
  export default function BreadcrumbLink({
5
4
  as,
6
- clickHandler,
5
+ clickHandler = undefined,
7
6
  linkProps
8
7
  }) {
9
8
  const {
@@ -27,16 +26,4 @@ export default function BreadcrumbLink({
27
26
  className: classNames('link-muted', className)
28
27
  }, label);
29
28
  }
30
- BreadcrumbLink.propTypes = {
31
- as: PropTypes.elementType.isRequired,
32
- clickHandler: PropTypes.func,
33
- linkProps: PropTypes.shape({
34
- label: PropTypes.string.isRequired,
35
- url: PropTypes.string,
36
- className: PropTypes.string
37
- }).isRequired
38
- };
39
- BreadcrumbLink.defaultProps = {
40
- clickHandler: undefined
41
- };
42
29
  //# sourceMappingURL=BreadcrumbLink.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BreadcrumbLink.js","names":["React","PropTypes","classNames","BreadcrumbLink","as","clickHandler","linkProps","label","url","className","props","addtlProps","console","warn","href","onClick","createElement","propTypes","elementType","isRequired","func","shape","string","defaultProps","undefined"],"sources":["../../src/Breadcrumb/BreadcrumbLink.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nexport default function BreadcrumbLink({ as, clickHandler, linkProps }) {\n const {\n label,\n url,\n className,\n ...props\n } = linkProps;\n const addtlProps = {};\n\n if (as === 'a' && url) {\n // eslint-disable-next-line no-console\n console.warn(\n '[Deprecated]: using \"url\" parameter to specify link\\'s destination in Breadcrumb component is '\n + 'deprecated. Please use \"href\" instead when rendering links as anchor tag.',\n );\n addtlProps.href = url;\n }\n\n if (clickHandler) {\n addtlProps.onClick = clickHandler;\n }\n\n return React.createElement(\n as,\n {\n ...props,\n ...addtlProps,\n className: classNames('link-muted', className),\n },\n label,\n );\n}\n\nBreadcrumbLink.propTypes = {\n as: PropTypes.elementType.isRequired,\n clickHandler: PropTypes.func,\n linkProps: PropTypes.shape({\n label: PropTypes.string.isRequired,\n url: PropTypes.string,\n className: PropTypes.string,\n }).isRequired,\n};\n\nBreadcrumbLink.defaultProps = {\n clickHandler: undefined,\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,eAAe,SAASC,cAAcA,CAAC;EAAEC,EAAE;EAAEC,YAAY;EAAEC;AAAU,CAAC,EAAE;EACtE,MAAM;IACJC,KAAK;IACLC,GAAG;IACHC,SAAS;IACT,GAAGC;EACL,CAAC,GAAGJ,SAAS;EACb,MAAMK,UAAU,GAAG,CAAC,CAAC;EAErB,IAAIP,EAAE,KAAK,GAAG,IAAII,GAAG,EAAE;IACrB;IACAI,OAAO,CAACC,IAAI,CACV,gGAAgG,GAC9F,2EACJ,CAAC;IACDF,UAAU,CAACG,IAAI,GAAGN,GAAG;EACvB;EAEA,IAAIH,YAAY,EAAE;IAChBM,UAAU,CAACI,OAAO,GAAGV,YAAY;EACnC;EAEA,oBAAOL,KAAK,CAACgB,aAAa,CACxBZ,EAAE,EACF;IACE,GAAGM,KAAK;IACR,GAAGC,UAAU;IACbF,SAAS,EAAEP,UAAU,CAAC,YAAY,EAAEO,SAAS;EAC/C,CAAC,EACDF,KACF,CAAC;AACH;AAEAJ,cAAc,CAACc,SAAS,GAAG;EACzBb,EAAE,EAAEH,SAAS,CAACiB,WAAW,CAACC,UAAU;EACpCd,YAAY,EAAEJ,SAAS,CAACmB,IAAI;EAC5Bd,SAAS,EAAEL,SAAS,CAACoB,KAAK,CAAC;IACzBd,KAAK,EAAEN,SAAS,CAACqB,MAAM,CAACH,UAAU;IAClCX,GAAG,EAAEP,SAAS,CAACqB,MAAM;IACrBb,SAAS,EAAER,SAAS,CAACqB;EACvB,CAAC,CAAC,CAACH;AACL,CAAC;AAEDhB,cAAc,CAACoB,YAAY,GAAG;EAC5BlB,YAAY,EAAEmB;AAChB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"BreadcrumbLink.js","names":["React","classNames","BreadcrumbLink","as","clickHandler","undefined","linkProps","label","url","className","props","addtlProps","console","warn","href","onClick","createElement"],"sources":["../../src/Breadcrumb/BreadcrumbLink.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\n\ninterface BreadcrumbLinkProps {\n as: React.ElementType;\n clickHandler?: (event: React.MouseEvent, link: any) => void;\n linkProps: {\n label: string;\n url?: string; // deprecated, use href instead when rendering as 'a'\n className?: string;\n [key: string]: any;\n };\n}\n\ninterface AdditionalProps {\n href?: string;\n onClick?: (event: React.MouseEvent, link: any) => void;\n}\n\nexport default function BreadcrumbLink({ as, clickHandler = undefined, linkProps }: BreadcrumbLinkProps) {\n const {\n label,\n url,\n className,\n ...props\n } = linkProps;\n const addtlProps: AdditionalProps = {};\n\n if (as === 'a' && url) {\n // eslint-disable-next-line no-console\n console.warn(\n '[Deprecated]: using \"url\" parameter to specify link\\'s destination in Breadcrumb component is '\n + 'deprecated. Please use \"href\" instead when rendering links as anchor tag.',\n );\n addtlProps.href = url;\n }\n\n if (clickHandler) {\n addtlProps.onClick = clickHandler;\n }\n\n return React.createElement(\n as,\n {\n ...props,\n ...addtlProps,\n className: classNames('link-muted', className),\n },\n label,\n );\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AAkBnC,eAAe,SAASC,cAAcA,CAAC;EAAEC,EAAE;EAAEC,YAAY,GAAGC,SAAS;EAAEC;AAA+B,CAAC,EAAE;EACvG,MAAM;IACJC,KAAK;IACLC,GAAG;IACHC,SAAS;IACT,GAAGC;EACL,CAAC,GAAGJ,SAAS;EACb,MAAMK,UAA2B,GAAG,CAAC,CAAC;EAEtC,IAAIR,EAAE,KAAK,GAAG,IAAIK,GAAG,EAAE;IACrB;IACAI,OAAO,CAACC,IAAI,CACV,gGAAgG,GAC9F,2EACJ,CAAC;IACDF,UAAU,CAACG,IAAI,GAAGN,GAAG;EACvB;EAEA,IAAIJ,YAAY,EAAE;IAChBO,UAAU,CAACI,OAAO,GAAGX,YAAY;EACnC;EAEA,oBAAOJ,KAAK,CAACgB,aAAa,CACxBb,EAAE,EACF;IACE,GAAGO,KAAK;IACR,GAAGC,UAAU;IACbF,SAAS,EAAER,UAAU,CAAC,YAAY,EAAEQ,SAAS;EAC/C,CAAC,EACDF,KACF,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ interface BreadcrumbProps {
3
+ /** An array of objects describing links to be rendered. The contents of an object depend on the value of `linkAs`
4
+ * prop as these objects will get passed down as props to the underlying component defined by `linkAs` prop.
5
+ */
6
+ links: Array<{
7
+ label: string;
8
+ [key: string]: any;
9
+ }>;
10
+ /** allows to add a label that is not a link to the end of the breadcrumb. */
11
+ activeLabel?: string;
12
+ /** label of the element */
13
+ ariaLabel?: string;
14
+ /** allows to add a custom element between the breadcrumb items.
15
+ * Defaults to `>` rendered using the `Icon` component. */
16
+ spacer?: React.ReactElement;
17
+ /** allows to add a custom function to be called `onClick` of a breadcrumb link.
18
+ * The use case for this is for adding custom analytics to the component. */
19
+ clickHandler?: (event: React.MouseEvent<HTMLAnchorElement>, link: any) => void;
20
+ /** The `Breadcrumbs` style variant to use. */
21
+ variant?: 'light' | 'dark';
22
+ /** The `Breadcrumbs` mobile variant view. */
23
+ isMobile?: boolean;
24
+ /** Specifies the base element to use when rendering links, you should generally use either plain 'a' or
25
+ * [react-router's Link](https://reactrouter.com/en/main/components/link).
26
+ */
27
+ linkAs?: React.ElementType;
28
+ /** Optional class name(s) to append to the base `<nav>` element. */
29
+ className?: string;
30
+ }
31
+ declare function Breadcrumb({ links, activeLabel, spacer, clickHandler, className, variant, isMobile, ariaLabel, linkAs, }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element;
32
+ export default Breadcrumb;
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import classNames from 'classnames';
4
3
  import BreadcrumbLink from './BreadcrumbLink';
5
4
  import { ChevronRight } from '../../icons';
@@ -9,18 +8,17 @@ function Breadcrumb({
9
8
  activeLabel,
10
9
  spacer,
11
10
  clickHandler,
12
- variant,
13
- isMobile,
14
- ariaLabel,
15
- linkAs,
16
- ...props
11
+ className,
12
+ variant = 'light',
13
+ isMobile = false,
14
+ ariaLabel = 'breadcrumb',
15
+ linkAs = 'a'
17
16
  }) {
18
17
  const linkCount = links.length;
19
18
  const displayLinks = isMobile ? [links[linkCount - 1]] : links;
20
19
  return /*#__PURE__*/React.createElement("nav", {
21
20
  "aria-label": ariaLabel,
22
- className: classNames('pgn__breadcrumb', `pgn__breadcrumb-${variant}`),
23
- ...props
21
+ className: classNames('pgn__breadcrumb', `pgn__breadcrumb-${variant}`, className)
24
22
  }, /*#__PURE__*/React.createElement("ol", {
25
23
  className: classNames('list-inline', {
26
24
  'is-mobile': isMobile
@@ -45,40 +43,5 @@ function Breadcrumb({
45
43
  "aria-current": "page"
46
44
  }, activeLabel)));
47
45
  }
48
- Breadcrumb.propTypes = {
49
- /** An array of objects describing links to be rendered. The contents of an object depend on the value of `linkAs`
50
- * prop as these objects will get passed down as props to the underlying component defined by `linkAs` prop.
51
- */
52
- links: PropTypes.arrayOf(PropTypes.shape({
53
- label: PropTypes.string
54
- })).isRequired,
55
- /** allows to add a label that is not a link to the end of the breadcrumb. */
56
- activeLabel: PropTypes.string,
57
- /** label of the element */
58
- ariaLabel: PropTypes.string,
59
- /** allows to add a custom element between the breadcrumb items.
60
- * Defaults to `>` rendered using the `Icon` component. */
61
- spacer: PropTypes.element,
62
- /** allows to add a custom function to be called `onClick` of a breadcrumb link.
63
- * The use case for this is for adding custom analytics to the component. */
64
- clickHandler: PropTypes.func,
65
- /** The `Breadcrumbs` style variant to use. */
66
- variant: PropTypes.oneOf(['light', 'dark']),
67
- /** The `Breadcrumbs` mobile variant view. */
68
- isMobile: PropTypes.bool,
69
- /** Specifies the base element to use when rendering links, you should generally use either plain 'a' or
70
- * [react-router's Link](https://reactrouter.com/en/main/components/link).
71
- */
72
- linkAs: PropTypes.elementType
73
- };
74
- Breadcrumb.defaultProps = {
75
- activeLabel: undefined,
76
- ariaLabel: 'breadcrumb',
77
- spacer: undefined,
78
- clickHandler: undefined,
79
- variant: 'light',
80
- isMobile: false,
81
- linkAs: 'a'
82
- };
83
46
  export default Breadcrumb;
84
47
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","PropTypes","classNames","BreadcrumbLink","ChevronRight","Icon","Breadcrumb","links","activeLabel","spacer","clickHandler","variant","isMobile","ariaLabel","linkAs","props","linkCount","length","displayLinks","createElement","className","map","link","i","Fragment","key","label","as","linkProps","role","src","id","propTypes","arrayOf","shape","string","isRequired","element","func","oneOf","bool","elementType","defaultProps","undefined"],"sources":["../../src/Breadcrumb/index.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nimport BreadcrumbLink from './BreadcrumbLink';\nimport { ChevronRight } from '../../icons';\nimport Icon from '../Icon';\n\nfunction Breadcrumb({\n links, activeLabel, spacer, clickHandler,\n variant, isMobile, ariaLabel, linkAs, ...props\n}) {\n const linkCount = links.length;\n const displayLinks = isMobile ? [links[linkCount - 1]] : links;\n\n return (\n <nav\n aria-label={ariaLabel}\n className={classNames('pgn__breadcrumb', `pgn__breadcrumb-${variant}`)}\n {...props}\n >\n <ol className={classNames('list-inline', { 'is-mobile': isMobile })}>\n {displayLinks.map((link, i) => (\n <React.Fragment key={link.label}>\n <li className={classNames('list-inline-item')}>\n <BreadcrumbLink as={linkAs} clickHandler={clickHandler} linkProps={link} />\n </li>\n {(activeLabel || ((i + 1) < linkCount))\n && (\n <li className=\"list-inline-item\" role=\"presentation\">\n {spacer || <Icon src={ChevronRight} id={`spacer-${i}`} />}\n </li>\n )}\n </React.Fragment>\n ))}\n {!isMobile && activeLabel && <li className=\"list-inline-item active\" key=\"active\" aria-current=\"page\">{activeLabel}</li>}\n </ol>\n </nav>\n );\n}\n\nBreadcrumb.propTypes = {\n /** An array of objects describing links to be rendered. The contents of an object depend on the value of `linkAs`\n * prop as these objects will get passed down as props to the underlying component defined by `linkAs` prop.\n */\n links: PropTypes.arrayOf(PropTypes.shape({\n label: PropTypes.string,\n })).isRequired,\n /** allows to add a label that is not a link to the end of the breadcrumb. */\n activeLabel: PropTypes.string,\n /** label of the element */\n ariaLabel: PropTypes.string,\n /** allows to add a custom element between the breadcrumb items.\n * Defaults to `>` rendered using the `Icon` component. */\n spacer: PropTypes.element,\n /** allows to add a custom function to be called `onClick` of a breadcrumb link.\n * The use case for this is for adding custom analytics to the component. */\n clickHandler: PropTypes.func,\n /** The `Breadcrumbs` style variant to use. */\n variant: PropTypes.oneOf(['light', 'dark']),\n /** The `Breadcrumbs` mobile variant view. */\n isMobile: PropTypes.bool,\n /** Specifies the base element to use when rendering links, you should generally use either plain 'a' or\n * [react-router's Link](https://reactrouter.com/en/main/components/link).\n */\n linkAs: PropTypes.elementType,\n};\n\nBreadcrumb.defaultProps = {\n activeLabel: undefined,\n ariaLabel: 'breadcrumb',\n spacer: undefined,\n clickHandler: undefined,\n variant: 'light',\n isMobile: false,\n linkAs: 'a',\n};\n\nexport default Breadcrumb;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,SAASC,YAAY,QAAQ,aAAa;AAC1C,OAAOC,IAAI,MAAM,SAAS;AAE1B,SAASC,UAAUA,CAAC;EAClBC,KAAK;EAAEC,WAAW;EAAEC,MAAM;EAAEC,YAAY;EACxCC,OAAO;EAAEC,QAAQ;EAAEC,SAAS;EAAEC,MAAM;EAAE,GAAGC;AAC3C,CAAC,EAAE;EACD,MAAMC,SAAS,GAAGT,KAAK,CAACU,MAAM;EAC9B,MAAMC,YAAY,GAAGN,QAAQ,GAAG,CAACL,KAAK,CAACS,SAAS,GAAG,CAAC,CAAC,CAAC,GAAGT,KAAK;EAE9D,oBACEP,KAAA,CAAAmB,aAAA;IACE,cAAYN,SAAU;IACtBO,SAAS,EAAElB,UAAU,CAAC,iBAAiB,EAAE,mBAAmBS,OAAO,EAAE,CAAE;IAAA,GACnEI;EAAK,gBAETf,KAAA,CAAAmB,aAAA;IAAIC,SAAS,EAAElB,UAAU,CAAC,aAAa,EAAE;MAAE,WAAW,EAAEU;IAAS,CAAC;EAAE,GACjEM,YAAY,CAACG,GAAG,CA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,KAAK,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;EAC3C;EACA3B,QAAQ,EAAEX,SAAS,CAACuC,IAAI;EACxB;AACF;AACA;EACE1B,MAAM,EAAEb,SAAS,CAACwC;AACpB,CAAC;AAEDnC,UAAU,CAACoC,YAAY,GAAG;EACxBlC,WAAW,EAAEmC,SAAS;EACtB9B,SAAS,EAAE,YAAY;EACvBJ,MAAM,EAAEkC,SAAS;EACjBjC,YAAY,EAAEiC,SAAS;EACvBhC,OAAO,EAAE,OAAO;EAChBC,QAAQ,EAAE,KAAK;EACfE,MAAM,EAAE;AACV,CAAC;AAED,eAAeR,UAAU","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","classNames","BreadcrumbLink","ChevronRight","Icon","Breadcrumb","links","activeLabel","spacer","clickHandler","className","variant","isMobile","ariaLabel","linkAs","linkCount","length","displayLinks","createElement","map","link","i","Fragment","key","label","as","linkProps","role","src","id"],"sources":["../../src/Breadcrumb/index.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\n\nimport BreadcrumbLink from './BreadcrumbLink';\nimport { ChevronRight } from '../../icons';\nimport Icon from '../Icon';\n\ninterface BreadcrumbProps {\n /** An array of objects describing links to be rendered. The contents of an object depend on the value of `linkAs`\n * prop as these objects will get passed down as props to the underlying component defined by `linkAs` prop.\n */\n links: Array<{ label: string, [key: string]: any }>;\n /** allows to add a label that is not a link to the end of the breadcrumb. */\n activeLabel?: string;\n /** label of the element */\n ariaLabel?: string;\n /** allows to add a custom element between the breadcrumb items.\n * Defaults to `>` rendered using the `Icon` component. */\n spacer?: React.ReactElement;\n /** allows to add a custom function to be called `onClick` of a breadcrumb link.\n * The use case for this is for adding custom analytics to the component. */\n clickHandler?: (event: React.MouseEvent<HTMLAnchorElement>, link: any) => void;\n /** The `Breadcrumbs` style variant to use. */\n variant?: 'light' | 'dark';\n /** The `Breadcrumbs` mobile variant view. */\n isMobile?: boolean;\n /** Specifies the base element to use when rendering links, you should generally use either plain 'a' or\n * [react-router's Link](https://reactrouter.com/en/main/components/link).\n */\n linkAs?: React.ElementType;\n /** Optional class name(s) to append to the base `<nav>` element. */\n className?: string;\n}\n\nfunction Breadcrumb({\n links, activeLabel, spacer, clickHandler, className,\n variant = 'light', isMobile = false, ariaLabel = 'breadcrumb', linkAs = 'a',\n}: BreadcrumbProps) {\n const linkCount = links.length;\n const displayLinks = isMobile ? [links[linkCount - 1]] : links;\n\n return (\n <nav\n aria-label={ariaLabel}\n className={classNames('pgn__breadcrumb', `pgn__breadcrumb-${variant}`, className)}\n >\n <ol className={classNames('list-inline', { 'is-mobile': isMobile })}>\n {displayLinks.map((link, i) => (\n <React.Fragment key={link.label}>\n <li className={classNames('list-inline-item')}>\n <BreadcrumbLink as={linkAs} clickHandler={clickHandler} linkProps={link} />\n </li>\n {(activeLabel || ((i + 1) < linkCount))\n && (\n <li className=\"list-inline-item\" role=\"presentation\">\n {spacer || <Icon src={ChevronRight} id={`spacer-${i}`} />}\n </li>\n )}\n </React.Fragment>\n ))}\n {!isMobile && activeLabel && <li className=\"list-inline-item active\" key=\"active\" aria-current=\"page\">{activeLabel}</li>}\n </ol>\n </nav>\n );\n}\n\nexport default Breadcrumb;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,cAAc,MAAM,kBAAkB;AAC7C,SAASC,YAAY,QAAQ,aAAa;AAC1C,OAAOC,IAAI,MAAM,SAAS;AA6B1B,SAASC,UAAUA,CAAC;EAClBC,KAAK;EAAEC,WAAW;EAAEC,MAAM;EAAEC,YAAY;EAAEC,SAAS;EACnDC,OAAO,GAAG,OAAO;EAAEC,QAAQ,GAAG,KAAK;EAAEC,SAAS,GAAG,YAAY;EAAEC,MAAM,GAAG;AACzD,CAAC,EAAE;EAClB,MAAMC,SAAS,GAAGT,KAAK,CAACU,MAAM;EAC9B,MAAMC,YAAY,GAAGL,QAAQ,GAAG,CAACN,KAAK,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contents of the component. */
4
+ children: React.ReactNode;
5
+ /** Specifies the base element */
6
+ as?: React.ElementType;
7
+ /** A class name to append to the base element. */
8
+ className?: string;
9
+ }
10
+ declare function CardCarouselSubtitle({ children, as, className }: CardCarouselSubtitleProps): import("react/jsx-runtime").JSX.Element;
11
+ export default CardCarouselSubtitle;
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import classNames from 'classnames';
4
3
  function CardCarouselSubtitle({
5
4
  children,
@@ -11,17 +10,5 @@ function CardCarouselSubtitle({
11
10
  className: classNames('pgn__card-carousel-subtitle', className)
12
11
  }, children);
13
12
  }
14
- CardCarouselSubtitle.propTypes = {
15
- /** Specifies contents of the component. */
16
- children: PropTypes.node.isRequired,
17
- /** Specifies the base element */
18
- as: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
19
- /** A class name to append to the base element. */
20
- className: PropTypes.string
21
- };
22
- CardCarouselSubtitle.defaultProps = {
23
- as: undefined,
24
- className: undefined
25
- };
26
13
  export default CardCarouselSubtitle;
27
14
  //# sourceMappingURL=CardCarouselSubtitle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardCarouselSubtitle.js","names":["React","PropTypes","classNames","CardCarouselSubtitle","children","as","className","Component","createElement","propTypes","node","isRequired","oneOfType","string","elementType","defaultProps","undefined"],"sources":["../../../src/Card/CardCarousel/CardCarouselSubtitle.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nfunction CardCarouselSubtitle({ children, as, className }) {\n const Component = as || 'p';\n return (\n <Component className={classNames('pgn__card-carousel-subtitle', className)}>\n {children}\n </Component>\n );\n}\n\nCardCarouselSubtitle.propTypes = {\n /** Specifies contents of the component. */\n children: PropTypes.node.isRequired,\n /** Specifies the base element */\n as: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),\n /** A class name to append to the base element. */\n className: PropTypes.string,\n};\n\nCardCarouselSubtitle.defaultProps = {\n as: undefined,\n className: undefined,\n};\n\nexport default CardCarouselSubtitle;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,oBAAoBA,CAAC;EAAEC,QAAQ;EAAEC,EAAE;EAAEC;AAAU,CAAC,EAAE;EACzD,MAAMC,SAAS,GAAGF,EAAE,IAAI,GAAG;EAC3B,oBACEL,KAAA,CAAAQ,aAAA,CAACD,SAAS;IAACD,SAAS,EAAEJ,UAAU,CAAC,6BAA6B,EAAEI,SAAS;EAAE,GACxEF,QACQ,CAAC;AAEhB;AAEAD,oBAAoB,CAACM,SAAS,GAAG;EAC/B;EACAL,QAAQ,EAAEH,SAAS,CAACS,IAAI,CAACC,UAAU;EACnC;EACAN,EAAE,EAAEJ,SAAS,CAACW,SAAS,CAAC,CAACX,SAAS,CAACY,MAAM,EAAEZ,SAAS,CAACa,WAAW,CAAC,CAAC;EAClE;EACAR,SAAS,EAAEL,SAAS,CAACY;AACvB,CAAC;AAEDV,oBAAoB,CAACY,YAAY,GAAG;EAClCV,EAAE,EAAEW,SAAS;EACbV,SAAS,EAAEU;AACb,CAAC;AAED,eAAeb,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"CardCarouselSubtitle.js","names":["React","classNames","CardCarouselSubtitle","children","as","className","Component","createElement"],"sources":["../../../src/Card/CardCarousel/CardCarouselSubtitle.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\n\ninterface CardCarouselSubtitleProps {\n /** Specifies contents of the component. */\n children: React.ReactNode;\n /** Specifies the base element */\n as?: React.ElementType;\n /** A class name to append to the base element. */\n className?: string;\n}\n\nfunction CardCarouselSubtitle({ children, as, className }: CardCarouselSubtitleProps) {\n const Component = as || 'p';\n return (\n <Component className={classNames('pgn__card-carousel-subtitle', className)}>\n {children}\n </Component>\n );\n}\n\nexport default CardCarouselSubtitle;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AAWnC,SAASC,oBAAoBA,CAAC;EAAEC,QAAQ;EAAEC,EAAE;EAAEC;AAAqC,CAAC,EAAE;EACpF,MAAMC,SAAS,GAAGF,EAAE,IAAI,GAAG;EAC3B,oBACEJ,KAAA,CAAAO,aAAA,CAACD,SAAS;IAACD,SAAS,EAAEJ,UAAU,CAAC,6BAA6B,EAAEI,SAAS;EAAE,GACxEF,QACQ,CAAC;AAEhB;AAEA,eAAeD,oBAAoB","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface CardCarouselTitleProps {
3
+ children: React.ReactNode;
4
+ as?: React.ElementType;
5
+ className?: string;
6
+ }
7
+ declare function CardCarouselTitle({ children, as, className }: CardCarouselTitleProps): import("react/jsx-runtime").JSX.Element;
8
+ export default CardCarouselTitle;
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import classNames from 'classnames';
4
3
  function CardCarouselTitle({
5
4
  children,
@@ -11,14 +10,5 @@ function CardCarouselTitle({
11
10
  className: classNames('pgn__card-carousel-title', className)
12
11
  }, children);
13
12
  }
14
- CardCarouselTitle.propTypes = {
15
- children: PropTypes.node.isRequired,
16
- as: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
17
- className: PropTypes.string
18
- };
19
- CardCarouselTitle.defaultProps = {
20
- as: undefined,
21
- className: undefined
22
- };
23
13
  export default CardCarouselTitle;
24
14
  //# sourceMappingURL=CardCarouselTitle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardCarouselTitle.js","names":["React","PropTypes","classNames","CardCarouselTitle","children","as","className","Component","createElement","propTypes","node","isRequired","oneOfType","string","elementType","defaultProps","undefined"],"sources":["../../../src/Card/CardCarousel/CardCarouselTitle.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nfunction CardCarouselTitle({ children, as, className }) {\n const Component = as || 'h2';\n return (\n <Component className={classNames('pgn__card-carousel-title', className)}>\n {children}\n </Component>\n );\n}\n\nCardCarouselTitle.propTypes = {\n children: PropTypes.node.isRequired,\n as: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),\n className: PropTypes.string,\n};\n\nCardCarouselTitle.defaultProps = {\n as: undefined,\n className: undefined,\n};\n\nexport default CardCarouselTitle;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,iBAAiBA,CAAC;EAAEC,QAAQ;EAAEC,EAAE;EAAEC;AAAU,CAAC,EAAE;EACtD,MAAMC,SAAS,GAAGF,EAAE,IAAI,IAAI;EAC5B,oBACEL,KAAA,CAAAQ,aAAA,CAACD,SAAS;IAACD,SAAS,EAAEJ,UAAU,CAAC,0BAA0B,EAAEI,SAAS;EAAE,GACrEF,QACQ,CAAC;AAEhB;AAEAD,iBAAiB,CAACM,SAAS,GAAG;EAC5BL,QAAQ,EAAEH,SAAS,CAACS,IAAI,CAACC,UAAU;EACnCN,EAAE,EAAEJ,SAAS,CAACW,SAAS,CAAC,CAACX,SAAS,CAACY,MAAM,EAAEZ,SAAS,CAACa,WAAW,CAAC,CAAC;EAClER,SAAS,EAAEL,SAAS,CAACY;AACvB,CAAC;AAEDV,iBAAiB,CAACY,YAAY,GAAG;EAC/BV,EAAE,EAAEW,SAAS;EACbV,SAAS,EAAEU;AACb,CAAC;AAED,eAAeb,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"CardCarouselTitle.js","names":["React","classNames","CardCarouselTitle","children","as","className","Component","createElement"],"sources":["../../../src/Card/CardCarousel/CardCarouselTitle.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\n\ninterface CardCarouselTitleProps {\n children: React.ReactNode;\n as?: React.ElementType;\n className?: string;\n}\n\nfunction CardCarouselTitle({ children, as, className }: CardCarouselTitleProps) {\n const Component = as || 'h2';\n return (\n <Component className={classNames('pgn__card-carousel-title', className)}>\n {children}\n </Component>\n );\n}\n\nexport default CardCarouselTitle;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AAQnC,SAASC,iBAAiBA,CAAC;EAAEC,QAAQ;EAAEC,EAAE;EAAEC;AAAkC,CAAC,EAAE;EAC9E,MAAMC,SAAS,GAAGF,EAAE,IAAI,IAAI;EAC5B,oBACEJ,KAAA,CAAAO,aAAA,CAACD,SAAS;IAACD,SAAS,EAAEJ,UAAU,CAAC,0BAA0B,EAAEI,SAAS;EAAE,GACrEF,QACQ,CAAC;AAEhB;AAEA,eAAeD,iBAAiB","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type Placement } from 'react-bootstrap/Overlay';
3
- interface Props extends React.HTMLAttributes<HTMLButtonElement> {
3
+ interface Props extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
4
  /** Component that renders the icon, currently defaults to `Icon` */
5
5
  iconAs?: React.ComponentType<any>;
6
6
  /** Additional CSS class[es] to apply to this button */
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","classNames","OverlayTrigger","Tooltip","Icon","IconButton","forwardRef","className","alt","invertColors","icon","src","iconClassNames","onClick","size","variant","iconAs","isActive","children","attrs","ref","invert","activeStyle","IconComponent","createElement","type","IconButtonWithTooltip","tooltipPlacement","tooltipContent","props","placement","overlay","id","undefined"],"sources":["../../src/IconButton/index.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { type Placement } from 'react-bootstrap/Overlay';\nimport { OverlayTrigger } from '../Overlay';\nimport Tooltip from '../Tooltip';\nimport Icon from '../Icon';\n\ninterface Props extends React.HTMLAttributes<HTMLButtonElement> {\n /** Component that renders the icon, currently defaults to `Icon` */\n iconAs?: React.ComponentType<any>,\n /** Additional CSS class[es] to apply to this button */\n className?: string;\n /** Alt text for your icon. For best practice, avoid using alt text to describe\n * the image in the `IconButton`. Instead, we recommend describing the function\n * of the button. */\n alt: string;\n /** Changes icon styles for dark background */\n invertColors?: boolean;\n /** An icon component to render. Example import of a Paragon icon component:\n * `import { Check } from '@openedx/paragon/icons';`\n * */\n // Note: React.ComponentType is what we want here. React.ElementType would allow some element type strings like \"div\",\n // but we only want to allow components like 'Add' (a specific icon component function/class)\n src?: React.ComponentType;\n /** Extra class names that will be added to the icon */\n iconClassNames?: string;\n /** Click handler for the button */\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n /** Whether to show the `IconButton` in an active state, whose styling is distinct from default state */\n isActive?: boolean;\n /** @deprecated Using FontAwesome icons is deprecated. Instead, pass iconAs={Icon} src={...} */\n icon?: { prefix?: string; iconName?: string, icon?: any[] },\n /** Type of button (uses Bootstrap options). */\n variant?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'light' | 'dark' | 'black' | 'brand';\n /** Size of button to render */\n size?: 'sm' | 'md' | 'inline';\n /** No children */\n children?: never;\n}\n\nconst IconButton = React.forwardRef(({\n className,\n alt,\n invertColors = false,\n icon,\n src,\n iconClassNames,\n onClick = () => {},\n size = 'md',\n variant = 'primary',\n iconAs = Icon,\n isActive = false,\n children, // unused, just here because we don't want it to be part of 'attrs'\n ...attrs\n} : Props, ref: React.ForwardedRef<HTMLButtonElement>) => {\n const invert = invertColors ? 'inverse-' : '';\n const activeStyle = isActive ? `${variant}-` : '';\n const IconComponent = iconAs;\n\n return (\n <button\n aria-label={alt}\n className={classNames(\n 'btn-icon',\n `btn-icon-${invert}${variant}`,\n `btn-icon-${size}`,\n {\n [`btn-icon-${invert}${activeStyle}active`]: isActive,\n },\n className,\n )}\n onClick={onClick}\n type=\"button\"\n ref={ref}\n {...attrs}\n >\n <span className=\"btn-icon__icon-container\">\n {IconComponent && (\n <IconComponent\n className={classNames('btn-icon__icon', iconClassNames)}\n icon={icon as any}\n src={src}\n />\n )}\n </span>\n </button>\n );\n});\n\ninterface PropsWithTooltip extends Props {\n /** Tooltip placement can be top, left, right etc, choose from https://popper.js.org/docs/v2/constructors/#options */\n tooltipPlacement?: Placement,\n /** Any content to pass to tooltip content area */\n tooltipContent: React.ReactNode,\n}\n\n/**\n * An icon button wrapped in overlaytrigger to display a tooltip.\n */\nfunction IconButtonWithTooltip({\n tooltipPlacement = 'top', tooltipContent, ...props\n}: PropsWithTooltip) {\n const invert = props.invertColors ? 'inverse-' : '';\n return (\n <OverlayTrigger\n placement={tooltipPlacement}\n overlay={(\n <Tooltip\n id={`iconbutton-tooltip-${tooltipPlacement}`}\n variant={invert ? 'light' : undefined}\n >\n {tooltipContent}\n </Tooltip>\n )}\n >\n <IconButton {...props} />\n </OverlayTrigger>\n );\n}\n\n(IconButton as any).IconButtonWithTooltip = IconButtonWithTooltip;\n\nexport default IconButton as typeof IconButton & {\n IconButtonWithTooltip: typeof IconButtonWithTooltip,\n};\nexport { IconButtonWithTooltip };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,cAAc,QAAQ,YAAY;AAC3C,OAAOC,OAAO,MAAM,YAAY;AAChC,OAAOC,IAAI,MAAM,SAAS;AAmC1B,MAAMC,UAAU,gBAAGL,KAAK,CAACM,UAAU,CAAC,CAAC;EACnCC,SAAS;EACTC,GAAG;EACHC,YAAY,GAAG,KAAK;EACpBC,IAAI;EACJC,GAAG;EACHC,cAAc;EACdC,OAAO,GAAGA,CAAA,KAAM,CAAC,CAAC;EAClBC,IAAI,GAAG,IAAI;EACXC,OAAO,GAAG,SAAS;EACnBC,MAAM,GAAGZ,IAAI;EACba,QAAQ,GAAG,KAAK;EAChBC,QAAQ;EAAE;EACV,GAAGC;AACG,CAAC,EAAEC,GAA0C,KAAK;EACxD,MAAMC,MAAM,GAAGZ,YAAY,GAAG,UAAU,GAAG,EAAE;EAC7C,MAAMa,WAAW,GAAGL,QAAQ,GAAG,GAAGF,OAAO,GAAG,GAAG,EAAE;EACjD,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qBAAqB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","classNames","OverlayTrigger","Tooltip","Icon","IconButton","forwardRef","className","alt","invertColors","icon","src","iconClassNames","onClick","size","variant","iconAs","isActive","children","attrs","ref","invert","activeStyle","IconComponent","createElement","type","IconButtonWithTooltip","tooltipPlacement","tooltipContent","props","placement","overlay","id","undefined"],"sources":["../../src/IconButton/index.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\nimport { type Placement } from 'react-bootstrap/Overlay';\nimport { OverlayTrigger } from '../Overlay';\nimport Tooltip from '../Tooltip';\nimport Icon from '../Icon';\n\ninterface Props extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Component that renders the icon, currently defaults to `Icon` */\n iconAs?: React.ComponentType<any>,\n /** Additional CSS class[es] to apply to this button */\n className?: string;\n /** Alt text for your icon. For best practice, avoid using alt text to describe\n * the image in the `IconButton`. Instead, we recommend describing the function\n * of the button. */\n alt: string;\n /** Changes icon styles for dark background */\n invertColors?: boolean;\n /** An icon component to render. Example import of a Paragon icon component:\n * `import { Check } from '@openedx/paragon/icons';`\n * */\n // Note: React.ComponentType is what we want here. React.ElementType would allow some element type strings like \"div\",\n // but we only want to allow components like 'Add' (a specific icon component function/class)\n src?: React.ComponentType;\n /** Extra class names that will be added to the icon */\n iconClassNames?: string;\n /** Click handler for the button */\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n /** Whether to show the `IconButton` in an active state, whose styling is distinct from default state */\n isActive?: boolean;\n /** @deprecated Using FontAwesome icons is deprecated. Instead, pass iconAs={Icon} src={...} */\n icon?: { prefix?: string; iconName?: string, icon?: any[] },\n /** Type of button (uses Bootstrap options). */\n variant?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'light' | 'dark' | 'black' | 'brand';\n /** Size of button to render */\n size?: 'sm' | 'md' | 'inline';\n /** No children */\n children?: never;\n}\n\nconst IconButton = React.forwardRef(({\n className,\n alt,\n invertColors = false,\n icon,\n src,\n iconClassNames,\n onClick = () => {},\n size = 'md',\n variant = 'primary',\n iconAs = Icon,\n isActive = false,\n children, // unused, just here because we don't want it to be part of 'attrs'\n ...attrs\n} : Props, ref: React.ForwardedRef<HTMLButtonElement>) => {\n const invert = invertColors ? 'inverse-' : '';\n const activeStyle = isActive ? `${variant}-` : '';\n const IconComponent = iconAs;\n\n return (\n <button\n aria-label={alt}\n className={classNames(\n 'btn-icon',\n `btn-icon-${invert}${variant}`,\n `btn-icon-${size}`,\n {\n [`btn-icon-${invert}${activeStyle}active`]: isActive,\n },\n className,\n )}\n onClick={onClick}\n type=\"button\"\n ref={ref}\n {...attrs}\n >\n <span className=\"btn-icon__icon-container\">\n {IconComponent && (\n <IconComponent\n className={classNames('btn-icon__icon', iconClassNames)}\n icon={icon as any}\n src={src}\n />\n )}\n </span>\n </button>\n );\n});\n\ninterface PropsWithTooltip extends Props {\n /** Tooltip placement can be top, left, right etc, choose from https://popper.js.org/docs/v2/constructors/#options */\n tooltipPlacement?: Placement,\n /** Any content to pass to tooltip content area */\n tooltipContent: React.ReactNode,\n}\n\n/**\n * An icon button wrapped in overlaytrigger to display a tooltip.\n */\nfunction IconButtonWithTooltip({\n tooltipPlacement = 'top', tooltipContent, ...props\n}: PropsWithTooltip) {\n const invert = props.invertColors ? 'inverse-' : '';\n return (\n <OverlayTrigger\n placement={tooltipPlacement}\n overlay={(\n <Tooltip\n id={`iconbutton-tooltip-${tooltipPlacement}`}\n variant={invert ? 'light' : undefined}\n >\n {tooltipContent}\n </Tooltip>\n )}\n >\n <IconButton {...props} />\n </OverlayTrigger>\n );\n}\n\n(IconButton as any).IconButtonWithTooltip = IconButtonWithTooltip;\n\nexport default IconButton as typeof IconButton & {\n IconButtonWithTooltip: typeof IconButtonWithTooltip,\n};\nexport { IconButtonWithTooltip };\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AAEnC,SAASC,cAAc,QAAQ,YAAY;AAC3C,OAAOC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B,GAAG,KAAK;EAAEC,cAAc;EAAE,GAAGC;AAC7B,CAAC,EAAE;EACnB,MAAMR,MAAM,GAAGQ,KAAK,CAACpB,YAAY,GAAG,UAAU,GAAG,EAAE;EACnD,oBACET,KAAA,CAAAwB,aAAA,CAACtB,cAAc;IACb4B,SAAS,EAAEH,gBAAiB;IAC5BI,OAAO,eACL/B,KAAA,CAAAwB,aAAA,CAACrB,OAAO;MACN6B,EAAE,EAAE,sBAAsBL,gBAAgB,EAAG;MAC7CZ,OAAO,EAAEM,MAAM,GAAG,OAAO,GAAGY;IAAU,GAErCL,cACM;EACT,gBAEF5B,KAAA,CAAAwB,aAAA,CAACnB,UAAU;IAAA,GAAKwB;EAAK,CAAG,CACV,CAAC;AAErB;AAECxB,UAAU,CAASqB,qBAAqB,GAAGA,qBAAqB;AAEjE,eAAerB,UAAU;AAGzB,SAASqB,qBAAqB","ignoreList":[]}
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
4
4
  /**
5
5
  *
6
6
  * @param {object} args arguments
7
- * @param {boolean} args.activeValue the current value of the active/selected iconButton.
7
+ * @param {string} args.activeValue the current value of the active/selected iconButton.
8
8
  * if not provided, none of the iconButtons will initially be active
9
9
  * @param {Function} args.onChange callback to call when toggle value changes.
10
10
  * Receives value of the selected toggle button.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useMemo","PropTypes","IconButtonToggle","activeValue","onChange","children","iconButtons","Children","map","iconButton","isActive","props","value","cloneElement","onClick","createElement","className","defaultProps","undefined","propTypes","string","func","node","isRequired"],"sources":["../../src/IconButtonToggle/index.jsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\n\n/**\n *\n * @param {object} args arguments\n * @param {boolean} args.activeValue the current value of the active/selected iconButton.\n * if not provided, none of the iconButtons will initially be active\n * @param {Function} args.onChange callback to call when toggle value changes.\n * Receives value of the selected toggle button.\n * @param {Array<IconButton>} args.children children components expected to be IconButton\n * @returns {React.Component} A React component\n */\nfunction IconButtonToggle({ activeValue, onChange, children }) {\n const iconButtons = useMemo(\n () => React.Children.map(children, iconButton => {\n const isActive = iconButton.props.value === activeValue;\n return React.cloneElement(iconButton, {\n onClick: () => { onChange(iconButton.props.value); },\n isActive,\n 'aria-selected': isActive,\n 'data-testid': `icon-btn-val-${iconButton.props.value}`,\n });\n }),\n [children, activeValue, onChange],\n );\n return <div className=\"pgn__icon-button-toggle__container\">{iconButtons}</div>;\n}\n\nIconButtonToggle.defaultProps = {\n onChange: () => {},\n activeValue: undefined,\n};\n\nIconButtonToggle.propTypes = {\n /** value to use to check which button to set to active */\n activeValue: PropTypes.string,\n /** handler that is passed the currently active button's value when a button is selected */\n onChange: PropTypes.func,\n /** child nodes of type `IconButton` (or its subcomponents) to be rendered within toggle group */\n children: PropTypes.node.isRequired,\n};\n\nexport default IconButtonToggle;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,OAAOC,SAAS,MAAM,YAAY;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CAAC;EAAEC,WAAW;EAAEC,QAAQ;EAAEC;AAAS,CAAC,EAAE;EAC7D,MAAMC,WAAW,GAAGN,OAAO,CACzB,MAAMD,KAAK,CAACQ,QAAQ,CAACC,GAAG,CAACH,QAAQ,EAAEI,UAAU,IAAI;IAC/C,MAAMC,QAAQ,GAAGD,UAAU,CAACE,KAAK,CAACC,KAAK,KAAKT,WAAW;IACvD,oBAAOJ,KAAK,CAACc,YAAY,CAACJ,UAAU,EAAE;MACpCK,OAAO,EAAEA,CAAA,KAAM;QAAEV,QAAQ,CAACK,UAAU,CAACE,KAAK,CAACC,KAAK,CAAC;MAAE,CAAC;MACpDF,QAAQ;MACR,eAAe,EAAEA,QAAQ;MACzB,aAAa,EAAE,gBAAgBD,UAAU,CAACE,KAAK,CAACC,KAAK;IACvD,CAAC,CAAC;EACJ,CAAC,CAAC,EACF,CAACP,QAAQ,EAAEF,WAAW,EAAEC,QAAQ,CAClC,CAAC;EACD,oBAAOL,KAAA,CAAAgB,aAAA;IAAKC,SAAS,EAAC;EAAoC,GAAEV,WAAiB,CAAC;AAChF;AAEAJ,gBAAgB,CAACe,YAAY,GAAG;EAC9Bb,QAAQ,EAAEA,CAAA,KAAM,CAAC,CAAC;EAClBD,WAAW,EAAEe;AACf,CAAC;AAEDhB,gBAAgB,CAACiB,SAAS,GAAG;EAC3B;EACAhB,WAAW,EAAEF,SAAS,CAACmB,MAAM;EAC7B;EACAhB,QAAQ,EAAEH,SAAS,CAACoB,IAAI;EACxB;EACAhB,QAAQ,EAAEJ,SAAS,CAACqB,IAAI,CAACC;AAC3B,CAAC;AAED,eAAerB,gBAAgB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","useMemo","PropTypes","IconButtonToggle","activeValue","onChange","children","iconButtons","Children","map","iconButton","isActive","props","value","cloneElement","onClick","createElement","className","defaultProps","undefined","propTypes","string","func","node","isRequired"],"sources":["../../src/IconButtonToggle/index.jsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\n\n/**\n *\n * @param {object} args arguments\n * @param {string} args.activeValue the current value of the active/selected iconButton.\n * if not provided, none of the iconButtons will initially be active\n * @param {Function} args.onChange callback to call when toggle value changes.\n * Receives value of the selected toggle button.\n * @param {Array<IconButton>} args.children children components expected to be IconButton\n * @returns {React.Component} A React component\n */\nfunction IconButtonToggle({ activeValue, onChange, children }) {\n const iconButtons = useMemo(\n () => React.Children.map(children, iconButton => {\n const isActive = iconButton.props.value === activeValue;\n return React.cloneElement(iconButton, {\n onClick: () => { onChange(iconButton.props.value); },\n isActive,\n 'aria-selected': isActive,\n 'data-testid': `icon-btn-val-${iconButton.props.value}`,\n });\n }),\n [children, activeValue, onChange],\n );\n return <div className=\"pgn__icon-button-toggle__container\">{iconButtons}</div>;\n}\n\nIconButtonToggle.defaultProps = {\n onChange: () => {},\n activeValue: undefined,\n};\n\nIconButtonToggle.propTypes = {\n /** value to use to check which button to set to active */\n activeValue: PropTypes.string,\n /** handler that is passed the currently active button's value when a button is selected */\n onChange: PropTypes.func,\n /** child nodes of type `IconButton` (or its subcomponents) to be rendered within toggle group */\n children: PropTypes.node.isRequired,\n};\n\nexport default IconButtonToggle;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,OAAOC,SAAS,MAAM,YAAY;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CAAC;EAAEC,WAAW;EAAEC,QAAQ;EAAEC;AAAS,CAAC,EAAE;EAC7D,MAAMC,WAAW,GAAGN,OAAO,CACzB,MAAMD,KAAK,CAACQ,QAAQ,CAACC,GAAG,CAACH,QAAQ,EAAEI,UAAU,IAAI;IAC/C,MAAMC,QAAQ,GAAGD,UAAU,CAACE,KAAK,CAACC,KAAK,KAAKT,WAAW;IACvD,oBAAOJ,KAAK,CAACc,YAAY,CAACJ,UAAU,EAAE;MACpCK,OAAO,EAAEA,CAAA,KAAM;QAAEV,QAAQ,CAACK,UAAU,CAACE,KAAK,CAACC,KAAK,CAAC;MAAE,CAAC;MACpDF,QAAQ;MACR,eAAe,EAAEA,QAAQ;MACzB,aAAa,EAAE,gBAAgBD,UAAU,CAACE,KAAK,CAACC,KAAK;IACvD,CAAC,CAAC;EACJ,CAAC,CAAC,EACF,CAACP,QAAQ,EAAEF,WAAW,EAAEC,QAAQ,CAClC,CAAC;EACD,oBAAOL,KAAA,CAAAgB,aAAA;IAAKC,SAAS,EAAC;EAAoC,GAAEV,WAAiB,CAAC;AAChF;AAEAJ,gBAAgB,CAACe,YAAY,GAAG;EAC9Bb,QAAQ,EAAEA,CAAA,KAAM,CAAC,CAAC;EAClBD,WAAW,EAAEe;AACf,CAAC;AAEDhB,gBAAgB,CAACiB,SAAS,GAAG;EAC3B;EACAhB,WAAW,EAAEF,SAAS,CAACmB,MAAM;EAC7B;EACAhB,QAAQ,EAAEH,SAAS,CAACoB,IAAI;EACxB;EACAhB,QAAQ,EAAEJ,SAAS,CAACqB,IAAI,CAACC;AAC3B,CAAC;AAED,eAAerB,gBAAgB","ignoreList":[]}
package/dist/index.d.ts CHANGED
@@ -3,6 +3,8 @@ export { default as Alert, ALERT_CLOSE_LABEL_TEXT } from './Alert';
3
3
  export { default as Annotation } from './Annotation';
4
4
  export { default as Avatar } from './Avatar';
5
5
  export { default as AvatarButton } from './AvatarButton';
6
+ export { default as Badge } from './Badge';
7
+ export { default as Breadcrumb } from './Breadcrumb';
6
8
  export { default as Bubble } from './Bubble';
7
9
  export { default as Button, ButtonGroup, ButtonToolbar } from './Button';
8
10
  export { default as Chip, CHIP_PGN_CLASS } from './Chip';
@@ -28,8 +30,6 @@ export { default as useIndexOfLastVisibleChild } from './hooks/useIndexOfLastVis
28
30
  export { default as useIsVisible } from './hooks/useIsVisibleHook';
29
31
  export { default as breakpoints } from './utils/breakpoints';
30
32
  export { default as asInput } from './asInput';
31
- export { default as Badge } from './Badge';
32
- export { default as Breadcrumb } from './Breadcrumb';
33
33
  export { default as Card, CardColumns, CardDeck, CardImg, CardGroup, CardGrid, CardCarousel, CARD_VARIANTS, } from './Card';
34
34
  export { default as Carousel, CarouselItem, CAROUSEL_NEXT_LABEL_TEXT, CAROUSEL_PREV_LABEL_TEXT, } from './Carousel';
35
35
  export { default as CloseButton } from './CloseButton';
package/dist/index.js CHANGED
@@ -6,6 +6,8 @@ export { default as Alert, ALERT_CLOSE_LABEL_TEXT } from './Alert';
6
6
  export { default as Annotation } from './Annotation';
7
7
  export { default as Avatar } from './Avatar';
8
8
  export { default as AvatarButton } from './AvatarButton';
9
+ export { default as Badge } from './Badge';
10
+ export { default as Breadcrumb } from './Breadcrumb';
9
11
  export { default as Bubble } from './Bubble';
10
12
  export { default as Button, ButtonGroup, ButtonToolbar } from './Button';
11
13
  export { default as Chip, CHIP_PGN_CLASS } from './Chip';
@@ -36,10 +38,6 @@ export { default as breakpoints } from './utils/breakpoints';
36
38
  // // // // // // // // // // // // // // // // // // // // // // // // // // //
37
39
  // @ts-ignore: has yet to be converted to TypeScript
38
40
  export { default as asInput } from './asInput';
39
- // @ts-ignore: has yet to be converted to TypeScript
40
- export { default as Badge } from './Badge';
41
- // @ts-ignore: has yet to be converted to TypeScript
42
- export { default as Breadcrumb } from './Breadcrumb';
43
41
  export { default as Card, CardColumns, CardDeck, CardImg, CardGroup, CardGrid, CardCarousel, CARD_VARIANTS
44
42
  // @ts-ignore: has yet to be converted to TypeScript
45
43
  } from './Card';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","ActionRow","Alert","ALERT_CLOSE_LABEL_TEXT","Annotation","Avatar","AvatarButton","Bubble","Button","ButtonGroup","ButtonToolbar","Chip","CHIP_PGN_CLASS","ChipCarousel","Container","Form","RadioControl","CheckboxControl","SwitchControl","FormSwitchSet","FormControl","FormControlDecoratorGroup","FormControlFeedback","FormCheck","FormFile","FormRadio","FormRadioSet","FormRadioSetContext","FormGroup","FormLabel","useCheckboxSetValues","FormText","FormAutosuggest","FormAutosuggestOption","InputGroup","Hyperlink","Icon","IconButton","IconButtonWithTooltip","ModalContext","ModalDialog","ModalLayer","Overlay","OverlayTrigger","Portal","Spinner","Stack","Toast","TOAST_CLOSE_LABEL_TEXT","TOAST_DELAY","Tooltip","useWindowSize","useToggle","useArrowKeyNavigation","useIndexOfLastVisibleChild","useIsVisible","breakpoints","asInput","Badge","Breadcrumb","Card","CardColumns","CardDeck","CardImg","CardGroup","CardGrid","CardCarousel","CARD_VARIANTS","Carousel","CarouselItem","CAROUSEL_NEXT_LABEL_TEXT","CAROUSEL_PREV_LABEL_TEXT","CloseButton","Layout","Col","Row","Collapse","Collapsible","Scrollable","Dropdown","DropdownToggle","DropdownButton","SplitButton","Fade","IconButtonToggle","Image","Figure","MailtoLink","MAIL_TO_LINK_EXTERNAL_LINK_ALTERNATIVE_TEXT","MAIL_TO_LINK_EXTERNAL_LINK_TITLE","Media","Menu","MenuItem","SelectMenu","SELECT_MENU_DEFAULT_MESSAGE","ModalCloseButton","FullscreenModal","FULLSCREEN_MODAL_CLOSE_LABEL","MarketingModal","StandardModal","STANDARD_MODAL_CLOSE_LABEL","AlertModal","ModalPopup","PopperElement","Nav","NavDropdown","NavItem","NavLink","Navbar","NavbarBrand","NAVBAR_LABEL","PageBanner","PAGE_BANNER_DISMISS_ALT_TEXT","Pagination","PAGINATION_BUTTON_LABEL_PREV","PAGINATION_BUTTON_ICON_BUTTON_NEXT_ALT","PAGINATION_BUTTON_ICON_BUTTON_PREV_ALT","PAGINATION_BUTTON_LABEL_PAGE_OF_COUNT","PAGINATION_BUTTON_LABEL_CURRENT_PAGE","PAGINATION_BUTTON_LABEL_NEXT","PAGINATION_BUTTON_LABEL_PAGE","Popover","PopoverTitle","PopoverContent","ProgressBar","ProductTour","ResponsiveEmbed","SearchField","SEARCH_FIELD_SCREEN_READER_TEXT_LABEL","SEARCH_FIELD_SCREEN_READER_TEXT_CLEAR_BUTTON","SEARCH_FIELD_SCREEN_READER_TEXT_SUBMIT_BUTTON","SEARCH_FIELD_BUTTON_TEXT","Sheet","Stepper","StatefulButton","Tabs","Tab","TabContainer","TabContent","TabPane","TransitionReplace","ValidationMessage","DataTable","TextFilter","CheckboxFilter","DropdownFilter","MultiSelectDropdownFilter","TableHeaderCell","TableCell","TableFilters","TABLE_FILTERS_BUTTON_TEXT","TableHeader","TableRow","TablePagination","TablePaginationMinimal","DataTableContext","BulkActions","TableControlBar","TableFooter","CardView","Skeleton","SkeletonTheme","ToggleButton","ToggleButtonGroup","Sticky","SelectableBox","Variant","OverflowScrollContext","OverflowScroll","useOverflowScroll","useOverflowScrollItems","Dropzone","messages","Truncate","ColorPicker","MediaQuery","useMediaQuery","Context","ResponsiveContext","useTable","useFilters","useGlobalFilter","useSortBy","useGroupBy","useExpanded","usePagination","useRowSelect","useRowState","useColumnOrder","useResizeColumns","useBlockLayout","useAbsoluteLayout","useFlexLayout"],"sources":["../src/index.ts"],"sourcesContent":["// // // // // // // // // // // // // // // // // // // // // // // // // // //\n// Things that have types\n// // // // // // // // // // // // // // // // // // // // // // // // // // //\nexport { default as ActionRow } from './ActionRow';\nexport { default as Alert, ALERT_CLOSE_LABEL_TEXT } from './Alert';\nexport { default as Annotation } from './Annotation';\nexport { default as Avatar } from './Avatar';\nexport { default as AvatarButton } from './AvatarButton';\nexport { default as Bubble } from './Bubble';\nexport { default as Button, ButtonGroup, ButtonToolbar } from './Button';\nexport { default as Chip, CHIP_PGN_CLASS } from './Chip';\nexport { default as ChipCarousel } from './ChipCarousel';\nexport { default as Container, type ContainerSize } from './Container';\nexport {\n default as Form,\n RadioControl,\n CheckboxControl,\n SwitchControl,\n FormSwitchSet,\n FormControl,\n FormControlDecoratorGroup,\n FormControlFeedback,\n FormCheck,\n FormFile,\n FormRadio,\n FormRadioSet,\n FormRadioSetContext,\n FormGroup,\n FormLabel,\n useCheckboxSetValues,\n FormText,\n FormAutosuggest,\n FormAutosuggestOption,\n InputGroup,\n} from './Form';\nexport { default as Hyperlink } from './Hyperlink';\nexport { default as Icon } from './Icon';\nexport { default as IconButton, IconButtonWithTooltip } from './IconButton';\nexport { default as ModalContext } from './Modal/ModalContext';\nexport { default as ModalDialog } from './Modal/ModalDialog';\nexport { default as ModalLayer } from './Modal/ModalLayer';\nexport { default as Overlay, OverlayTrigger } from './Overlay';\nexport { default as Portal } from './Modal/Portal';\nexport { default as Spinner } from './Spinner';\nexport { default as Stack } from './Stack';\nexport { default as Toast, TOAST_CLOSE_LABEL_TEXT, TOAST_DELAY } from './Toast';\nexport { default as Tooltip } from './Tooltip';\nexport { default as useWindowSize, type WindowSizeData } from './hooks/useWindowSizeHook';\nexport { default as useToggle, type Toggler, type ToggleHandlers } from './hooks/useToggleHook';\nexport { default as useArrowKeyNavigation, type ArrowKeyNavProps } from './hooks/useArrowKeyNavigationHook';\nexport { default as useIndexOfLastVisibleChild } from './hooks/useIndexOfLastVisibleChildHook';\nexport { default as useIsVisible } from './hooks/useIsVisibleHook';\nexport { default as breakpoints } from './utils/breakpoints';\n\n// // // // // // // // // // // // // // // // // // // // // // // // // // //\n// Things that don't have types\n// // // // // // // // // // // // // // // // // // // // // // // // // // //\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as asInput } from './asInput';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Badge } from './Badge';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Breadcrumb } from './Breadcrumb';\n\nexport {\n default as Card,\n CardColumns,\n CardDeck,\n CardImg,\n CardGroup,\n CardGrid,\n CardCarousel,\n CARD_VARIANTS,\n // @ts-ignore: has yet to be converted to TypeScript\n} from './Card';\nexport {\n default as Carousel, CarouselItem, CAROUSEL_NEXT_LABEL_TEXT, CAROUSEL_PREV_LABEL_TEXT,\n // @ts-ignore: has yet to be converted to TypeScript\n} from './Carousel';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as CloseButton } from './CloseButton';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Layout, Col, Row } from './Layout';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Collapse } from './Collapse';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Collapsible } from './Collapsible';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Scrollable } from './Scrollable';\nexport {\n default as Dropdown,\n DropdownToggle,\n DropdownButton,\n SplitButton,\n // @ts-ignore: has yet to be converted to TypeScript\n} from './Dropdown';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Fade } from './Fade';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as IconButtonToggle } from './IconButtonToggle';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Image, Figure } from './Image';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as MailtoLink, MAIL_TO_LINK_EXTERNAL_LINK_ALTERNATIVE_TEXT, MAIL_TO_LINK_EXTERNAL_LINK_TITLE } from './MailtoLink';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Media } from './Media';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Menu } from './Menu';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as MenuItem } from './Menu/MenuItem';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as SelectMenu, SELECT_MENU_DEFAULT_MESSAGE } from './Menu/SelectMenu';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ModalCloseButton } from './Modal/ModalCloseButton';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as FullscreenModal, FULLSCREEN_MODAL_CLOSE_LABEL } from './Modal/FullscreenModal';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as MarketingModal } from './Modal/MarketingModal';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as StandardModal, STANDARD_MODAL_CLOSE_LABEL } from './Modal/StandardModal';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as AlertModal } from './Modal/AlertModal';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ModalPopup } from './Modal/ModalPopup';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as PopperElement } from './Modal/PopperElement';\n\nexport {\n default as Nav,\n NavDropdown,\n NavItem,\n NavLink,\n // @ts-ignore: has yet to be converted to TypeScript\n} from './Nav';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Navbar, NavbarBrand, NAVBAR_LABEL } from './Navbar';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as PageBanner, PAGE_BANNER_DISMISS_ALT_TEXT } from './PageBanner';\nexport {\n default as Pagination,\n PAGINATION_BUTTON_LABEL_PREV,\n PAGINATION_BUTTON_ICON_BUTTON_NEXT_ALT,\n PAGINATION_BUTTON_ICON_BUTTON_PREV_ALT,\n PAGINATION_BUTTON_LABEL_PAGE_OF_COUNT,\n PAGINATION_BUTTON_LABEL_CURRENT_PAGE,\n PAGINATION_BUTTON_LABEL_NEXT,\n PAGINATION_BUTTON_LABEL_PAGE,\n // @ts-ignore: has yet to be converted to TypeScript\n} from './Pagination';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Popover, PopoverTitle, PopoverContent } from './Popover';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ProgressBar } from './ProgressBar';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ProductTour } from './ProductTour';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ResponsiveEmbed } from './ResponsiveEmbed';\nexport {\n default as SearchField,\n SEARCH_FIELD_SCREEN_READER_TEXT_LABEL,\n SEARCH_FIELD_SCREEN_READER_TEXT_CLEAR_BUTTON,\n SEARCH_FIELD_SCREEN_READER_TEXT_SUBMIT_BUTTON,\n SEARCH_FIELD_BUTTON_TEXT,\n // @ts-ignore: has yet to be converted to TypeScript\n} from './SearchField';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Sheet } from './Sheet';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Stepper } from './Stepper';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as StatefulButton } from './StatefulButton';\nexport {\n default as Tabs,\n Tab,\n TabContainer,\n TabContent,\n TabPane,\n// @ts-ignore: has yet to be converted to TypeScript\n} from './Tabs';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TransitionReplace } from './TransitionReplace';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ValidationMessage } from './ValidationMessage';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as DataTable } from './DataTable';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TextFilter } from './DataTable/filters/TextFilter';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as CheckboxFilter } from './DataTable/filters/CheckboxFilter';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as DropdownFilter } from './DataTable/filters/DropdownFilter';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as MultiSelectDropdownFilter } from './DataTable/filters/MultiSelectDropdownFilter';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TableHeaderCell } from './DataTable/TableHeaderCell';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TableCell } from './DataTable/TableCell';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TableFilters, TABLE_FILTERS_BUTTON_TEXT } from './DataTable/TableFilters';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TableHeader } from './DataTable/TableHeaderRow';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TableRow } from './DataTable/TableRow';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TablePagination } from './DataTable/TablePagination';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TablePaginationMinimal } from './DataTable/TablePaginationMinimal';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as DataTableContext } from './DataTable/DataTableContext';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as BulkActions } from './DataTable/BulkActions';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TableControlBar } from './DataTable/TableControlBar';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TableFooter } from './DataTable/TableFooter';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as CardView } from './DataTable/CardView';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Skeleton, SkeletonTheme } from './Skeleton/index';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ToggleButton, ToggleButtonGroup } from './ToggleButton';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Sticky } from './Sticky';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as SelectableBox } from './SelectableBox';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Variant } from './utils/constants';\nexport {\n OverflowScrollContext,\n OverflowScroll,\n useOverflowScroll,\n useOverflowScrollItems,\n // @ts-ignore: has yet to be converted to TypeScript\n} from './OverflowScroll';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Dropzone } from './Dropzone';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as messages } from './i18n';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Truncate } from './Truncate';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ColorPicker } from './ColorPicker';\n\n// // // // // // // // // // // // // // // // // // // // // // // // // // //\n// Pass through any needed whole third-party library functionality\n// useTable for example is needed to use the DataTable component seamlessly\n// rather than setting a peer dependency in this project, we opt to tightly\n// couple these dependencies by passing through needed functionality.\n// // // // // // // // // // // // // // // // // // // // // // // // // // //\nexport {\n default as MediaQuery,\n useMediaQuery,\n Context as ResponsiveContext,\n} from 'react-responsive';\nexport {\n useTable,\n useFilters,\n useGlobalFilter,\n useSortBy,\n useGroupBy,\n useExpanded,\n usePagination,\n useRowSelect,\n useRowState,\n useColumnOrder,\n useResizeColumns,\n useBlockLayout,\n useAbsoluteLayout,\n useFlexLayout,\n} from 'react-table';\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,SAAS,QAAQ,aAAa;AAClD,SAASD,OAAO,IAAIE,KAAK,EAAEC,sBAAsB,QAAQ,SAAS;AAClE,SAASH,OAAO,IAAII,UAAU,QAAQ,cAAc;AACpD,SAASJ,OAAO,IAAIK,MAAM,QAAQ,UAAU;AAC5C,SAASL,OAAO,IAAIM,YAAY,QAAQ,gBAAgB;AACxD,SAASN,OAAO,IAAIO,MAAM,QAAQ,UAAU;AAC5C,SAASP,OAAO,IAAIQ,MAAM,EAAEC,WAAW,EAAEC,aAAa,QAAQ,UAAU;AACxE,SAASV,OAAO,IAAIW,IAAI,EAAEC,cAAc,QAAQ,QAAQ;AACxD,SAASZ,OAAO,IAAIa,YAAY,QAAQ,gBAAgB;AACxD,SAASb,OAAO,IAAIc,SAAS,QAA4B,aAAa;AACtE,SACEd,OAAO,IAAIe,IAAI,EACfC,YAAY,EACZC,eAAe,EACfC,aAAa,EACbC,aAAa,EACbC,WAAW,EACXC,yBAAyB,EACzBC,mBAAmB,EACnBC,SAAS,EACTC,QAAQ,EACRC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EC,aAAa,QAAQ,kBAAkB;AACrE;AACA,SAASjK,OAAO,IAAIkK,YAAY,EAAEC,iBAAiB,QAAQ,gBAAgB;AAC3E;AACA,SAASnK,OAAO,IAAIoK,MAAM,QAAQ,UAAU;AAC5C;AACA,SAASpK,OAAO,IAAIqK,aAAa,QAAQ,iBAAiB;AAC1D;AACA,SAASrK,OAAO,IAAIsK,OAAO,QAAQ,mBAAmB;AACtD,SACEC,qBAAqB,EACrBC,cAAc,EACdC,iBAAiB,EACjBC;AACA;AAAA,OACK,kBAAkB;AACzB;AACA,SAAS1K,OAAO,IAAI2K,QAAQ,QAAQ,YAAY;AAChD;AACA,SAAS3K,OAAO,IAAI4K,QAAQ,QAAQ,QAAQ;AAC5C;AACA,SAAS5K,OAAO,IAAI6K,QAAQ,QAAQ,YAAY;AAChD;AACA,SAAS7K,OAAO,IAAI8K,WAAW,QAAQ,eAAe;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA,SACE9K,OAAO,IAAI+K,UAAU,EACrBC,aAAa,EACbC,OAAO,IAAIC,iBAAiB,QACvB,kBAAkB;AACzB,SACEC,QAAQ,EACRC,UAAU,EACVC,eAAe,EACfC,SAAS,EACTC,UAAU,EACVC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,WAAW,EACXC,cAAc,EACdC,gBAAgB,EAChBC,cAAc,EACdC,iBAAiB,EACjBC,aAAa,QACR,aAAa","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["default","ActionRow","Alert","ALERT_CLOSE_LABEL_TEXT","Annotation","Avatar","AvatarButton","Badge","Breadcrumb","Bubble","Button","ButtonGroup","ButtonToolbar","Chip","CHIP_PGN_CLASS","ChipCarousel","Container","Form","RadioControl","CheckboxControl","SwitchControl","FormSwitchSet","FormControl","FormControlDecoratorGroup","FormControlFeedback","FormCheck","FormFile","FormRadio","FormRadioSet","FormRadioSetContext","FormGroup","FormLabel","useCheckboxSetValues","FormText","FormAutosuggest","FormAutosuggestOption","InputGroup","Hyperlink","Icon","IconButton","IconButtonWithTooltip","ModalContext","ModalDialog","ModalLayer","Overlay","OverlayTrigger","Portal","Spinner","Stack","Toast","TOAST_CLOSE_LABEL_TEXT","TOAST_DELAY","Tooltip","useWindowSize","useToggle","useArrowKeyNavigation","useIndexOfLastVisibleChild","useIsVisible","breakpoints","asInput","Card","CardColumns","CardDeck","CardImg","CardGroup","CardGrid","CardCarousel","CARD_VARIANTS","Carousel","CarouselItem","CAROUSEL_NEXT_LABEL_TEXT","CAROUSEL_PREV_LABEL_TEXT","CloseButton","Layout","Col","Row","Collapse","Collapsible","Scrollable","Dropdown","DropdownToggle","DropdownButton","SplitButton","Fade","IconButtonToggle","Image","Figure","MailtoLink","MAIL_TO_LINK_EXTERNAL_LINK_ALTERNATIVE_TEXT","MAIL_TO_LINK_EXTERNAL_LINK_TITLE","Media","Menu","MenuItem","SelectMenu","SELECT_MENU_DEFAULT_MESSAGE","ModalCloseButton","FullscreenModal","FULLSCREEN_MODAL_CLOSE_LABEL","MarketingModal","StandardModal","STANDARD_MODAL_CLOSE_LABEL","AlertModal","ModalPopup","PopperElement","Nav","NavDropdown","NavItem","NavLink","Navbar","NavbarBrand","NAVBAR_LABEL","PageBanner","PAGE_BANNER_DISMISS_ALT_TEXT","Pagination","PAGINATION_BUTTON_LABEL_PREV","PAGINATION_BUTTON_ICON_BUTTON_NEXT_ALT","PAGINATION_BUTTON_ICON_BUTTON_PREV_ALT","PAGINATION_BUTTON_LABEL_PAGE_OF_COUNT","PAGINATION_BUTTON_LABEL_CURRENT_PAGE","PAGINATION_BUTTON_LABEL_NEXT","PAGINATION_BUTTON_LABEL_PAGE","Popover","PopoverTitle","PopoverContent","ProgressBar","ProductTour","ResponsiveEmbed","SearchField","SEARCH_FIELD_SCREEN_READER_TEXT_LABEL","SEARCH_FIELD_SCREEN_READER_TEXT_CLEAR_BUTTON","SEARCH_FIELD_SCREEN_READER_TEXT_SUBMIT_BUTTON","SEARCH_FIELD_BUTTON_TEXT","Sheet","Stepper","StatefulButton","Tabs","Tab","TabContainer","TabContent","TabPane","TransitionReplace","ValidationMessage","DataTable","TextFilter","CheckboxFilter","DropdownFilter","MultiSelectDropdownFilter","TableHeaderCell","TableCell","TableFilters","TABLE_FILTERS_BUTTON_TEXT","TableHeader","TableRow","TablePagination","TablePaginationMinimal","DataTableContext","BulkActions","TableControlBar","TableFooter","CardView","Skeleton","SkeletonTheme","ToggleButton","ToggleButtonGroup","Sticky","SelectableBox","Variant","OverflowScrollContext","OverflowScroll","useOverflowScroll","useOverflowScrollItems","Dropzone","messages","Truncate","ColorPicker","MediaQuery","useMediaQuery","Context","ResponsiveContext","useTable","useFilters","useGlobalFilter","useSortBy","useGroupBy","useExpanded","usePagination","useRowSelect","useRowState","useColumnOrder","useResizeColumns","useBlockLayout","useAbsoluteLayout","useFlexLayout"],"sources":["../src/index.ts"],"sourcesContent":["// // // // // // // // // // // // // // // // // // // // // // // // // // //\n// Things that have types\n// // // // // // // // // // // // // // // // // // // // // // // // // // //\nexport { default as ActionRow } from './ActionRow';\nexport { default as Alert, ALERT_CLOSE_LABEL_TEXT } from './Alert';\nexport { default as Annotation } from './Annotation';\nexport { default as Avatar } from './Avatar';\nexport { default as AvatarButton } from './AvatarButton';\nexport { default as Badge } from './Badge';\nexport { default as Breadcrumb } from './Breadcrumb';\nexport { default as Bubble } from './Bubble';\nexport { default as Button, ButtonGroup, ButtonToolbar } from './Button';\nexport { default as Chip, CHIP_PGN_CLASS } from './Chip';\nexport { default as ChipCarousel } from './ChipCarousel';\nexport { default as Container, type ContainerSize } from './Container';\nexport {\n default as Form,\n RadioControl,\n CheckboxControl,\n SwitchControl,\n FormSwitchSet,\n FormControl,\n FormControlDecoratorGroup,\n FormControlFeedback,\n FormCheck,\n FormFile,\n FormRadio,\n FormRadioSet,\n FormRadioSetContext,\n FormGroup,\n FormLabel,\n useCheckboxSetValues,\n FormText,\n FormAutosuggest,\n FormAutosuggestOption,\n InputGroup,\n} from './Form';\nexport { default as Hyperlink } from './Hyperlink';\nexport { default as Icon } from './Icon';\nexport { default as IconButton, IconButtonWithTooltip } from './IconButton';\nexport { default as ModalContext } from './Modal/ModalContext';\nexport { default as ModalDialog } from './Modal/ModalDialog';\nexport { default as ModalLayer } from './Modal/ModalLayer';\nexport { default as Overlay, OverlayTrigger } from './Overlay';\nexport { default as Portal } from './Modal/Portal';\nexport { default as Spinner } from './Spinner';\nexport { default as Stack } from './Stack';\nexport { default as Toast, TOAST_CLOSE_LABEL_TEXT, TOAST_DELAY } from './Toast';\nexport { default as Tooltip } from './Tooltip';\nexport { default as useWindowSize, type WindowSizeData } from './hooks/useWindowSizeHook';\nexport { default as useToggle, type Toggler, type ToggleHandlers } from './hooks/useToggleHook';\nexport { default as useArrowKeyNavigation, type ArrowKeyNavProps } from './hooks/useArrowKeyNavigationHook';\nexport { default as useIndexOfLastVisibleChild } from './hooks/useIndexOfLastVisibleChildHook';\nexport { default as useIsVisible } from './hooks/useIsVisibleHook';\nexport { default as breakpoints } from './utils/breakpoints';\n\n// // // // // // // // // // // // // // // // // // // // // // // // // // //\n// Things that don't have types\n// // // // // // // // // // // // // // // // // // // // // // // // // // //\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as asInput } from './asInput';\n\nexport {\n default as Card,\n CardColumns,\n CardDeck,\n CardImg,\n CardGroup,\n CardGrid,\n CardCarousel,\n CARD_VARIANTS,\n // @ts-ignore: has yet to be converted to TypeScript\n} from './Card';\nexport {\n default as Carousel, CarouselItem, CAROUSEL_NEXT_LABEL_TEXT, CAROUSEL_PREV_LABEL_TEXT,\n // @ts-ignore: has yet to be converted to TypeScript\n} from './Carousel';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as CloseButton } from './CloseButton';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Layout, Col, Row } from './Layout';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Collapse } from './Collapse';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Collapsible } from './Collapsible';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Scrollable } from './Scrollable';\nexport {\n default as Dropdown,\n DropdownToggle,\n DropdownButton,\n SplitButton,\n // @ts-ignore: has yet to be converted to TypeScript\n} from './Dropdown';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Fade } from './Fade';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as IconButtonToggle } from './IconButtonToggle';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Image, Figure } from './Image';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as MailtoLink, MAIL_TO_LINK_EXTERNAL_LINK_ALTERNATIVE_TEXT, MAIL_TO_LINK_EXTERNAL_LINK_TITLE } from './MailtoLink';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Media } from './Media';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Menu } from './Menu';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as MenuItem } from './Menu/MenuItem';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as SelectMenu, SELECT_MENU_DEFAULT_MESSAGE } from './Menu/SelectMenu';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ModalCloseButton } from './Modal/ModalCloseButton';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as FullscreenModal, FULLSCREEN_MODAL_CLOSE_LABEL } from './Modal/FullscreenModal';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as MarketingModal } from './Modal/MarketingModal';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as StandardModal, STANDARD_MODAL_CLOSE_LABEL } from './Modal/StandardModal';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as AlertModal } from './Modal/AlertModal';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ModalPopup } from './Modal/ModalPopup';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as PopperElement } from './Modal/PopperElement';\n\nexport {\n default as Nav,\n NavDropdown,\n NavItem,\n NavLink,\n // @ts-ignore: has yet to be converted to TypeScript\n} from './Nav';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Navbar, NavbarBrand, NAVBAR_LABEL } from './Navbar';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as PageBanner, PAGE_BANNER_DISMISS_ALT_TEXT } from './PageBanner';\nexport {\n default as Pagination,\n PAGINATION_BUTTON_LABEL_PREV,\n PAGINATION_BUTTON_ICON_BUTTON_NEXT_ALT,\n PAGINATION_BUTTON_ICON_BUTTON_PREV_ALT,\n PAGINATION_BUTTON_LABEL_PAGE_OF_COUNT,\n PAGINATION_BUTTON_LABEL_CURRENT_PAGE,\n PAGINATION_BUTTON_LABEL_NEXT,\n PAGINATION_BUTTON_LABEL_PAGE,\n // @ts-ignore: has yet to be converted to TypeScript\n} from './Pagination';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Popover, PopoverTitle, PopoverContent } from './Popover';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ProgressBar } from './ProgressBar';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ProductTour } from './ProductTour';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ResponsiveEmbed } from './ResponsiveEmbed';\nexport {\n default as SearchField,\n SEARCH_FIELD_SCREEN_READER_TEXT_LABEL,\n SEARCH_FIELD_SCREEN_READER_TEXT_CLEAR_BUTTON,\n SEARCH_FIELD_SCREEN_READER_TEXT_SUBMIT_BUTTON,\n SEARCH_FIELD_BUTTON_TEXT,\n // @ts-ignore: has yet to be converted to TypeScript\n} from './SearchField';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Sheet } from './Sheet';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Stepper } from './Stepper';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as StatefulButton } from './StatefulButton';\nexport {\n default as Tabs,\n Tab,\n TabContainer,\n TabContent,\n TabPane,\n// @ts-ignore: has yet to be converted to TypeScript\n} from './Tabs';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TransitionReplace } from './TransitionReplace';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ValidationMessage } from './ValidationMessage';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as DataTable } from './DataTable';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TextFilter } from './DataTable/filters/TextFilter';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as CheckboxFilter } from './DataTable/filters/CheckboxFilter';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as DropdownFilter } from './DataTable/filters/DropdownFilter';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as MultiSelectDropdownFilter } from './DataTable/filters/MultiSelectDropdownFilter';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TableHeaderCell } from './DataTable/TableHeaderCell';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TableCell } from './DataTable/TableCell';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TableFilters, TABLE_FILTERS_BUTTON_TEXT } from './DataTable/TableFilters';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TableHeader } from './DataTable/TableHeaderRow';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TableRow } from './DataTable/TableRow';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TablePagination } from './DataTable/TablePagination';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TablePaginationMinimal } from './DataTable/TablePaginationMinimal';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as DataTableContext } from './DataTable/DataTableContext';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as BulkActions } from './DataTable/BulkActions';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TableControlBar } from './DataTable/TableControlBar';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as TableFooter } from './DataTable/TableFooter';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as CardView } from './DataTable/CardView';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Skeleton, SkeletonTheme } from './Skeleton/index';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ToggleButton, ToggleButtonGroup } from './ToggleButton';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Sticky } from './Sticky';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as SelectableBox } from './SelectableBox';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Variant } from './utils/constants';\nexport {\n OverflowScrollContext,\n OverflowScroll,\n useOverflowScroll,\n useOverflowScrollItems,\n // @ts-ignore: has yet to be converted to TypeScript\n} from './OverflowScroll';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Dropzone } from './Dropzone';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as messages } from './i18n';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as Truncate } from './Truncate';\n// @ts-ignore: has yet to be converted to TypeScript\nexport { default as ColorPicker } from './ColorPicker';\n\n// // // // // // // // // // // // // // // // // // // // // // // // // // //\n// Pass through any needed whole third-party library functionality\n// useTable for example is needed to use the DataTable component seamlessly\n// rather than setting a peer dependency in this project, we opt to tightly\n// couple these dependencies by passing through needed functionality.\n// // // // // // // // // // // // // // // // // // // // // // // // // // //\nexport {\n default as MediaQuery,\n useMediaQuery,\n Context as ResponsiveContext,\n} from 'react-responsive';\nexport {\n useTable,\n useFilters,\n useGlobalFilter,\n useSortBy,\n useGroupBy,\n useExpanded,\n usePagination,\n useRowSelect,\n useRowState,\n useColumnOrder,\n useResizeColumns,\n useBlockLayout,\n useAbsoluteLayout,\n useFlexLayout,\n} from 'react-table';\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,IAAIC,SAAS,QAAQ,aAAa;AAClD,SAASD,OAAO,IAAIE,KAAK,EAAEC,sBAAsB,QAAQ,SAAS;AAClE,SAASH,OAAO,IAAII,UAAU,QAAQ,cAAc;AACpD,SAASJ,OAAO,IAAIK,MAAM,QAAQ,UAAU;AAC5C,SAASL,OAAO,IAAIM,YAA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Ac,EACdC,gBAAgB,EAChBC,cAAc,EACdC,iBAAiB,EACjBC,aAAa,QACR,aAAa","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openedx/paragon",
3
- "version": "23.18.1",
3
+ "version": "23.19.0",
4
4
  "description": "Accessible, responsive UI component library based on Bootstrap.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -0,0 +1,33 @@
1
+ import React, { ForwardedRef } from 'react';
2
+ import BaseBadge from 'react-bootstrap/Badge';
3
+ import { ComponentWithAsProp } from '../utils/types/bootstrap';
4
+
5
+ const STYLE_VARIANTS = [
6
+ 'primary',
7
+ 'secondary',
8
+ 'success',
9
+ 'danger',
10
+ 'warning',
11
+ 'info',
12
+ 'light',
13
+ 'dark',
14
+ ];
15
+
16
+ interface BadgeProps {
17
+ /** Specifies element type for this component */
18
+ as?: React.ElementType;
19
+ /** Visual style of the badge. The full type definition can be seen [here](https://github.com/openedx/paragon/blob/release-23.x/src/Badge/index.tsx) */
20
+ variant?: typeof STYLE_VARIANTS[number];
21
+ /** Add the `pill` modifier to make badges more rounded with some additional horizontal padding */
22
+ pill?: boolean;
23
+ /** Overrides underlying component base CSS class name */
24
+ bsPrefix?: string;
25
+ }
26
+
27
+ const Badge: ComponentWithAsProp<'span', BadgeProps> = React.forwardRef(({
28
+ as = 'span', variant = 'primary', pill = false, bsPrefix = 'badge', ...props
29
+ }: BadgeProps, ref: ForwardedRef<HTMLSpanElement>) => (
30
+ <BaseBadge as={as} variant={variant} pill={pill} bsPrefix={bsPrefix} {...props} ref={ref} />
31
+ ));
32
+
33
+ export default Badge;
@@ -95,4 +95,29 @@ describe('<Breadcrumb />', () => {
95
95
  expect(links.getAttribute('target')).toBe('_blank');
96
96
  expect(links.getAttribute('href')).toBe('/link-1');
97
97
  });
98
+
99
+ it('renders with a custom CSS class', () => {
100
+ render(<Breadcrumb {...baseProps} ariaLabel="Breadcrumbs" className="foobar" />);
101
+ const nav = screen.getByLabelText('Breadcrumbs');
102
+ expect(nav.classList).toContain('foobar');
103
+ expect(nav.classList).toContain('pgn__breadcrumb');
104
+ expect(nav.classList).toContain('pgn__breadcrumb-light');
105
+ });
106
+
107
+ it('can access data-xxxxx attributes on the links in clickHandler', async () => {
108
+ const user = userEvent.setup();
109
+ const clickHandler = jest.fn();
110
+ render(
111
+ <Breadcrumb
112
+ ariaLabel="Location"
113
+ links={[
114
+ { label: 'Link1', href: '/link1', 'data-parent-index': 17 },
115
+ ]}
116
+ clickHandler={({ currentTarget }) => clickHandler(currentTarget.dataset.parentIndex)}
117
+ />,
118
+ );
119
+ const link = screen.getByRole('link', { name: 'Link1' });
120
+ await user.click(link);
121
+ expect(clickHandler).toHaveBeenCalledWith('17');
122
+ });
98
123
  });
@@ -1,15 +1,30 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import classNames from 'classnames';
4
3
 
5
- export default function BreadcrumbLink({ as, clickHandler, linkProps }) {
4
+ interface BreadcrumbLinkProps {
5
+ as: React.ElementType;
6
+ clickHandler?: (event: React.MouseEvent, link: any) => void;
7
+ linkProps: {
8
+ label: string;
9
+ url?: string; // deprecated, use href instead when rendering as 'a'
10
+ className?: string;
11
+ [key: string]: any;
12
+ };
13
+ }
14
+
15
+ interface AdditionalProps {
16
+ href?: string;
17
+ onClick?: (event: React.MouseEvent, link: any) => void;
18
+ }
19
+
20
+ export default function BreadcrumbLink({ as, clickHandler = undefined, linkProps }: BreadcrumbLinkProps) {
6
21
  const {
7
22
  label,
8
23
  url,
9
24
  className,
10
25
  ...props
11
26
  } = linkProps;
12
- const addtlProps = {};
27
+ const addtlProps: AdditionalProps = {};
13
28
 
14
29
  if (as === 'a' && url) {
15
30
  // eslint-disable-next-line no-console
@@ -34,17 +49,3 @@ export default function BreadcrumbLink({ as, clickHandler, linkProps }) {
34
49
  label,
35
50
  );
36
51
  }
37
-
38
- BreadcrumbLink.propTypes = {
39
- as: PropTypes.elementType.isRequired,
40
- clickHandler: PropTypes.func,
41
- linkProps: PropTypes.shape({
42
- label: PropTypes.string.isRequired,
43
- url: PropTypes.string,
44
- className: PropTypes.string,
45
- }).isRequired,
46
- };
47
-
48
- BreadcrumbLink.defaultProps = {
49
- clickHandler: undefined,
50
- };
@@ -1,23 +1,48 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import classNames from 'classnames';
4
3
 
5
4
  import BreadcrumbLink from './BreadcrumbLink';
6
5
  import { ChevronRight } from '../../icons';
7
6
  import Icon from '../Icon';
8
7
 
8
+ interface BreadcrumbProps {
9
+ /** An array of objects describing links to be rendered. The contents of an object depend on the value of `linkAs`
10
+ * prop as these objects will get passed down as props to the underlying component defined by `linkAs` prop.
11
+ */
12
+ links: Array<{ label: string, [key: string]: any }>;
13
+ /** allows to add a label that is not a link to the end of the breadcrumb. */
14
+ activeLabel?: string;
15
+ /** label of the element */
16
+ ariaLabel?: string;
17
+ /** allows to add a custom element between the breadcrumb items.
18
+ * Defaults to `>` rendered using the `Icon` component. */
19
+ spacer?: React.ReactElement;
20
+ /** allows to add a custom function to be called `onClick` of a breadcrumb link.
21
+ * The use case for this is for adding custom analytics to the component. */
22
+ clickHandler?: (event: React.MouseEvent<HTMLAnchorElement>, link: any) => void;
23
+ /** The `Breadcrumbs` style variant to use. */
24
+ variant?: 'light' | 'dark';
25
+ /** The `Breadcrumbs` mobile variant view. */
26
+ isMobile?: boolean;
27
+ /** Specifies the base element to use when rendering links, you should generally use either plain 'a' or
28
+ * [react-router's Link](https://reactrouter.com/en/main/components/link).
29
+ */
30
+ linkAs?: React.ElementType;
31
+ /** Optional class name(s) to append to the base `<nav>` element. */
32
+ className?: string;
33
+ }
34
+
9
35
  function Breadcrumb({
10
- links, activeLabel, spacer, clickHandler,
11
- variant, isMobile, ariaLabel, linkAs, ...props
12
- }) {
36
+ links, activeLabel, spacer, clickHandler, className,
37
+ variant = 'light', isMobile = false, ariaLabel = 'breadcrumb', linkAs = 'a',
38
+ }: BreadcrumbProps) {
13
39
  const linkCount = links.length;
14
40
  const displayLinks = isMobile ? [links[linkCount - 1]] : links;
15
41
 
16
42
  return (
17
43
  <nav
18
44
  aria-label={ariaLabel}
19
- className={classNames('pgn__breadcrumb', `pgn__breadcrumb-${variant}`)}
20
- {...props}
45
+ className={classNames('pgn__breadcrumb', `pgn__breadcrumb-${variant}`, className)}
21
46
  >
22
47
  <ol className={classNames('list-inline', { 'is-mobile': isMobile })}>
23
48
  {displayLinks.map((link, i) => (
@@ -39,41 +64,4 @@ function Breadcrumb({
39
64
  );
40
65
  }
41
66
 
42
- Breadcrumb.propTypes = {
43
- /** An array of objects describing links to be rendered. The contents of an object depend on the value of `linkAs`
44
- * prop as these objects will get passed down as props to the underlying component defined by `linkAs` prop.
45
- */
46
- links: PropTypes.arrayOf(PropTypes.shape({
47
- label: PropTypes.string,
48
- })).isRequired,
49
- /** allows to add a label that is not a link to the end of the breadcrumb. */
50
- activeLabel: PropTypes.string,
51
- /** label of the element */
52
- ariaLabel: PropTypes.string,
53
- /** allows to add a custom element between the breadcrumb items.
54
- * Defaults to `>` rendered using the `Icon` component. */
55
- spacer: PropTypes.element,
56
- /** allows to add a custom function to be called `onClick` of a breadcrumb link.
57
- * The use case for this is for adding custom analytics to the component. */
58
- clickHandler: PropTypes.func,
59
- /** The `Breadcrumbs` style variant to use. */
60
- variant: PropTypes.oneOf(['light', 'dark']),
61
- /** The `Breadcrumbs` mobile variant view. */
62
- isMobile: PropTypes.bool,
63
- /** Specifies the base element to use when rendering links, you should generally use either plain 'a' or
64
- * [react-router's Link](https://reactrouter.com/en/main/components/link).
65
- */
66
- linkAs: PropTypes.elementType,
67
- };
68
-
69
- Breadcrumb.defaultProps = {
70
- activeLabel: undefined,
71
- ariaLabel: 'breadcrumb',
72
- spacer: undefined,
73
- clickHandler: undefined,
74
- variant: 'light',
75
- isMobile: false,
76
- linkAs: 'a',
77
- };
78
-
79
67
  export default Breadcrumb;
@@ -1,8 +1,16 @@
1
1
  import React from 'react';
2
- import PropTypes from 'prop-types';
3
2
  import classNames from 'classnames';
4
3
 
5
- function CardCarouselSubtitle({ children, as, className }) {
4
+ interface CardCarouselSubtitleProps {
5
+ /** Specifies contents of the component. */
6
+ children: React.ReactNode;
7
+ /** Specifies the base element */
8
+ as?: React.ElementType;
9
+ /** A class name to append to the base element. */
10
+ className?: string;
11
+ }
12
+
13
+ function CardCarouselSubtitle({ children, as, className }: CardCarouselSubtitleProps) {
6
14
  const Component = as || 'p';
7
15
  return (
8
16
  <Component className={classNames('pgn__card-carousel-subtitle', className)}>
@@ -11,18 +19,4 @@ function CardCarouselSubtitle({ children, as, className }) {
11
19
  );
12
20
  }
13
21
 
14
- CardCarouselSubtitle.propTypes = {
15
- /** Specifies contents of the component. */
16
- children: PropTypes.node.isRequired,
17
- /** Specifies the base element */
18
- as: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
19
- /** A class name to append to the base element. */
20
- className: PropTypes.string,
21
- };
22
-
23
- CardCarouselSubtitle.defaultProps = {
24
- as: undefined,
25
- className: undefined,
26
- };
27
-
28
22
  export default CardCarouselSubtitle;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import classNames from 'classnames';
3
+
4
+ interface CardCarouselTitleProps {
5
+ children: React.ReactNode;
6
+ as?: React.ElementType;
7
+ className?: string;
8
+ }
9
+
10
+ function CardCarouselTitle({ children, as, className }: CardCarouselTitleProps) {
11
+ const Component = as || 'h2';
12
+ return (
13
+ <Component className={classNames('pgn__card-carousel-title', className)}>
14
+ {children}
15
+ </Component>
16
+ );
17
+ }
18
+
19
+ export default CardCarouselTitle;
@@ -5,7 +5,7 @@ import { OverlayTrigger } from '../Overlay';
5
5
  import Tooltip from '../Tooltip';
6
6
  import Icon from '../Icon';
7
7
 
8
- interface Props extends React.HTMLAttributes<HTMLButtonElement> {
8
+ interface Props extends React.ButtonHTMLAttributes<HTMLButtonElement> {
9
9
  /** Component that renders the icon, currently defaults to `Icon` */
10
10
  iconAs?: React.ComponentType<any>,
11
11
  /** Additional CSS class[es] to apply to this button */
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
4
4
  /**
5
5
  *
6
6
  * @param {object} args arguments
7
- * @param {boolean} args.activeValue the current value of the active/selected iconButton.
7
+ * @param {string} args.activeValue the current value of the active/selected iconButton.
8
8
  * if not provided, none of the iconButtons will initially be active
9
9
  * @param {Function} args.onChange callback to call when toggle value changes.
10
10
  * Receives value of the selected toggle button.
package/src/index.ts CHANGED
@@ -6,6 +6,8 @@ export { default as Alert, ALERT_CLOSE_LABEL_TEXT } from './Alert';
6
6
  export { default as Annotation } from './Annotation';
7
7
  export { default as Avatar } from './Avatar';
8
8
  export { default as AvatarButton } from './AvatarButton';
9
+ export { default as Badge } from './Badge';
10
+ export { default as Breadcrumb } from './Breadcrumb';
9
11
  export { default as Bubble } from './Bubble';
10
12
  export { default as Button, ButtonGroup, ButtonToolbar } from './Button';
11
13
  export { default as Chip, CHIP_PGN_CLASS } from './Chip';
@@ -57,10 +59,6 @@ export { default as breakpoints } from './utils/breakpoints';
57
59
  // // // // // // // // // // // // // // // // // // // // // // // // // // //
58
60
  // @ts-ignore: has yet to be converted to TypeScript
59
61
  export { default as asInput } from './asInput';
60
- // @ts-ignore: has yet to be converted to TypeScript
61
- export { default as Badge } from './Badge';
62
- // @ts-ignore: has yet to be converted to TypeScript
63
- export { default as Breadcrumb } from './Breadcrumb';
64
62
 
65
63
  export {
66
64
  default as Card,
@@ -1,36 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import BaseBadge from 'react-bootstrap/Badge';
4
-
5
- const Badge = React.forwardRef((props, ref) => <BaseBadge {...props} ref={ref} />);
6
-
7
- const STYLE_VARIANTS = [
8
- 'primary',
9
- 'secondary',
10
- 'success',
11
- 'danger',
12
- 'warning',
13
- 'info',
14
- 'light',
15
- 'dark',
16
- ];
17
-
18
- Badge.propTypes = {
19
- /** Specifies element type for this component */
20
- as: PropTypes.elementType,
21
- /** Visual style of the badge */
22
- variant: PropTypes.oneOf(STYLE_VARIANTS),
23
- /** Add the `pill` modifier to make badges more rounded with some additional horizontal padding */
24
- pill: PropTypes.bool,
25
- /** Overrides underlying component base CSS class name */
26
- bsPrefix: PropTypes.string,
27
- };
28
-
29
- Badge.defaultProps = {
30
- as: 'span',
31
- variant: 'primary',
32
- pill: false,
33
- bsPrefix: 'badge',
34
- };
35
-
36
- export default Badge;
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import classNames from 'classnames';
4
-
5
- function CardCarouselTitle({ children, as, className }) {
6
- const Component = as || 'h2';
7
- return (
8
- <Component className={classNames('pgn__card-carousel-title', className)}>
9
- {children}
10
- </Component>
11
- );
12
- }
13
-
14
- CardCarouselTitle.propTypes = {
15
- children: PropTypes.node.isRequired,
16
- as: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
17
- className: PropTypes.string,
18
- };
19
-
20
- CardCarouselTitle.defaultProps = {
21
- as: undefined,
22
- className: undefined,
23
- };
24
-
25
- export default CardCarouselTitle;