@arc-ui/components 11.14.0 → 11.16.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 (89) hide show
  1. package/dist/Breadcrumbs/Breadcrumbs.cjs.js +1 -1
  2. package/dist/Breadcrumbs/Breadcrumbs.esm.js +1 -1
  3. package/dist/Checkbox/Checkbox.cjs.js +2 -2
  4. package/dist/Checkbox/Checkbox.esm.js +2 -2
  5. package/dist/FormControl/FormControl.cjs.js +1 -1
  6. package/dist/FormControl/FormControl.esm.js +1 -1
  7. package/dist/InformationCard/InformationCard.cjs.js +25 -43
  8. package/dist/InformationCard/InformationCard.esm.js +24 -42
  9. package/dist/Modal/Modal.cjs.js +16 -40
  10. package/dist/Modal/Modal.esm.js +6 -30
  11. package/dist/PaginationSimple/PaginationSimple.cjs.js +19 -16
  12. package/dist/PaginationSimple/PaginationSimple.esm.js +19 -16
  13. package/dist/RadioGroup/RadioGroup.cjs.js +2 -2
  14. package/dist/RadioGroup/RadioGroup.esm.js +2 -2
  15. package/dist/Select/Select.cjs.js +2736 -619
  16. package/dist/Select/Select.esm.js +2535 -418
  17. package/dist/Switch/Switch.cjs.js +335 -11
  18. package/dist/Switch/Switch.esm.js +328 -4
  19. package/dist/Tabs/Tabs.cjs.js +7 -4
  20. package/dist/Tabs/Tabs.esm.js +7 -4
  21. package/dist/TextArea/TextArea.cjs.js +17 -12
  22. package/dist/TextArea/TextArea.esm.js +17 -12
  23. package/dist/TextInput/TextInput.cjs.js +2 -2
  24. package/dist/TextInput/TextInput.esm.js +2 -2
  25. package/dist/Toast/Toast.cjs.js +7 -4
  26. package/dist/Toast/Toast.esm.js +7 -4
  27. package/dist/TypographyCard/TypographyCard.cjs.js +93 -0
  28. package/dist/TypographyCard/TypographyCard.esm.js +85 -0
  29. package/dist/TypographyCard/package.json +7 -0
  30. package/dist/UniversalHeader/UniversalHeader.cjs.js +1 -1
  31. package/dist/UniversalHeader/UniversalHeader.esm.js +1 -1
  32. package/dist/_shared/cjs/{Breadcrumbs-ed70e75a.js → Breadcrumbs-ef659d2b.js} +5 -5
  33. package/dist/_shared/cjs/BtIconArrowRight.esm-8e8ac316.js +30 -0
  34. package/dist/_shared/cjs/BtIconArrowRightFill.esm-435cf4bd.js +26 -0
  35. package/dist/_shared/cjs/{Checkbox-b126194e.js → Checkbox-904ad028.js} +1 -1
  36. package/dist/_shared/cjs/{FormControl-7daf8110.js → FormControl-166e0957.js} +5 -1
  37. package/dist/_shared/cjs/{RadioGroup-56e3b0e5.js → RadioGroup-1eddf86f.js} +1 -1
  38. package/dist/_shared/cjs/{Tabs-2d2a517d.js → Tabs-cc77dabb.js} +17 -37
  39. package/dist/_shared/cjs/{TextInput-bf1fe052.js → TextInput-fd9c756f.js} +10 -4
  40. package/dist/_shared/cjs/{Toast-69108261.js → Toast-91e96744.js} +36 -54
  41. package/dist/_shared/cjs/{UniversalHeader-5e43d320.js → UniversalHeader-b8389447.js} +4 -2
  42. package/dist/_shared/cjs/index-1641d0b4.js +27 -0
  43. package/dist/_shared/cjs/{index-43458549.js → index-3d69ea00.js} +28 -1
  44. package/dist/_shared/cjs/index-49c72a87.js +131 -0
  45. package/dist/_shared/cjs/{index-6b2a9ac3.js → index-4ecad2dd.js} +6 -22
  46. package/dist/_shared/cjs/{index.module-dd1d7d0b.js → index-56a040f4.js} +87 -104
  47. package/dist/_shared/cjs/index-6542b467.js +23 -0
  48. package/dist/_shared/cjs/{index-adbb63da.js → index-84e6a68f.js} +1 -1
  49. package/dist/_shared/cjs/{index-b2fd6338.js → index-d31f2b65.js} +1 -1
  50. package/dist/_shared/cjs/index-dcfdd5da.js +11 -0
  51. package/dist/_shared/esm/{Breadcrumbs-87e2bd46.js → Breadcrumbs-36edfb3d.js} +5 -5
  52. package/dist/_shared/esm/BtIconArrowRight.esm-267916a4.js +24 -0
  53. package/dist/_shared/esm/BtIconArrowRightFill.esm-99019d1a.js +20 -0
  54. package/dist/_shared/esm/{Checkbox-d6ec5024.js → Checkbox-8a5bb9a1.js} +1 -1
  55. package/dist/_shared/esm/{FormControl-351e5f1b.js → FormControl-9d4ddfec.js} +5 -1
  56. package/dist/_shared/esm/{RadioGroup-c838764c.js → RadioGroup-238db88d.js} +1 -1
  57. package/dist/_shared/esm/{Tabs-f903187a.js → Tabs-8719d952.js} +7 -27
  58. package/dist/_shared/esm/{TextInput-991804b6.js → TextInput-c1e2a1dd.js} +10 -4
  59. package/dist/_shared/esm/{Toast-37549e68.js → Toast-7cb1e544.js} +6 -24
  60. package/dist/_shared/esm/{UniversalHeader-b4c1577c.js → UniversalHeader-80c7313f.js} +4 -2
  61. package/dist/_shared/esm/{index.module-44714d3f.js → index-12f3a407.js} +89 -105
  62. package/dist/_shared/esm/index-246b4f18.js +21 -0
  63. package/dist/_shared/esm/{index-a1d2d9b3.js → index-39019a9b.js} +1 -1
  64. package/dist/_shared/esm/{index-41d7af2b.js → index-3e2bc99d.js} +29 -3
  65. package/dist/_shared/esm/index-6b7b075c.js +25 -0
  66. package/dist/_shared/esm/{index-efd9ef1c.js → index-936b5179.js} +1 -1
  67. package/dist/_shared/esm/index-a624de47.js +9 -0
  68. package/dist/_shared/esm/{index-3797d77e.js → index-d0307140.js} +5 -21
  69. package/dist/_shared/esm/index-db47e95a.js +129 -0
  70. package/dist/index.es.js +3062 -865
  71. package/dist/index.es.js.map +1 -1
  72. package/dist/index.js +3062 -864
  73. package/dist/index.js.map +1 -1
  74. package/dist/styles.css +5 -5
  75. package/dist/types/components/MediaCard/MediaCard.d.ts +24 -30
  76. package/dist/types/components/Select/Select.d.ts +49 -0
  77. package/dist/types/components/TextInput/TextInput.d.ts +12 -1
  78. package/dist/types/components/TypographyCard/TypographyCard.d.ts +48 -0
  79. package/dist/types/components/TypographyCard/index.d.ts +1 -0
  80. package/dist/types/components/UniversalHeader/UniversalHeader.d.ts +4 -0
  81. package/dist/types/components/index.d.ts +1 -0
  82. package/dist/types/internal-components/ConditionalWrapper/ConditionalWrapper.d.ts +6 -0
  83. package/dist/types/internal-components/ConditionalWrapper/index.d.ts +1 -0
  84. package/dist/types/internal-components/index.d.ts +1 -0
  85. package/dist/types/styles.d.ts +2 -1
  86. package/package.json +2 -2
  87. package/dist/_shared/cjs/index-c575a255.js +0 -490
  88. package/dist/_shared/esm/index-13d575cc.js +0 -479
  89. package/dist/types/components/MediaCard/MediaCard.stories-wip.d.ts +0 -15
@@ -1,57 +1,51 @@
1
- import { loadingOptions } from "../Image";
2
1
  import React, { FC } from "react";
3
- import { BoxProps } from "../Box";
2
+ import { ImageProps } from "../Image/Image";
3
+ import { HeadingLevel } from "../Heading/Heading";
4
4
  /**
5
5
  * Use `MediaCard` to contain content and an image about a single subject.
6
6
  */
7
7
  export declare const MediaCard: FC<MediaCardProps>;
8
+ type MediaCardIcon = "play" | "arrow";
8
9
  export interface MediaCardProps {
9
10
  /**
10
- * Content of the MediaCard.
11
+ * Heading for the MediaCard.
11
12
  */
12
- children: React.ReactNode;
13
+ heading: string;
13
14
  /**
14
- * Footer Content of the MediaCard.
15
+ * Heading level for the MediaCard heading.
15
16
  */
16
- cardFooter?: React.ReactNode;
17
+ headingLevel?: HeadingLevel;
17
18
  /**
18
- * Add rounded corners to the MediaCard.
19
+ * Text content for the MediaCard
19
20
  */
20
- isBorderRadius?: BoxProps["isBorderRadius"];
21
+ text?: string;
21
22
  /**
22
- * The border width of the MediaCard.
23
+ * Uppercase label for the MediaCard.
23
24
  */
24
- borderWidth?: BoxProps["borderWidth"];
25
+ label?: string;
25
26
  /**
26
- * Box shadow for the MediaCard.
27
+ * Url for the MediaCard. Makes the whole card a link.
27
28
  */
28
- elevationLevel?: BoxProps["elevationLevel"];
29
+ url?: string;
29
30
  /**
30
- * Set MediaCard to fill parent element.
31
+ * Text to show adjacent to the cta
31
32
  */
32
- isFullHeight?: boolean;
33
+ metaText?: string;
33
34
  /**
34
- * Background color for the MediaCard.
35
+ * MediaCard will have a contained look and feel with a white background if set to true.
35
36
  */
36
- surface?: BoxProps["surface"];
37
+ isContained?: boolean;
37
38
  /**
38
- * image src for the MediaCard.
39
+ * Image props for the MediaCard.
39
40
  */
40
- imageSrc: string;
41
+ img: Pick<ImageProps, "src" | "alt" | "loading" | "sizes" | "srcSet" | "width" | "height">;
41
42
  /**
42
- * image alt for the MediaCard.
43
+ * Icon for the MediaCard Cta button
43
44
  */
44
- imageAlt?: string;
45
+ buttonIcon?: MediaCardIcon;
45
46
  /**
46
- * Loading behaviour of the MediaCard.
47
+ * Click handler for the MediaCard. Only applied when a url is provided.
47
48
  */
48
- imageLoading?: (typeof loadingOptions)[number];
49
- /**
50
- * The HTML [sizes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#Example_4_Using_the_srcset_and_sizes_attributes) attribute. Required if srcSet is defined.
51
- */
52
- imageSizes?: string;
53
- /**
54
- * A comma-separated list indicating a set of possible image sources for the user agent to use for different screen sizes. Same format as [srcSet](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#Example_4_Using_the_srcset_and_sizes_attributes), i.e. `my-image-200.png 200w, my-image-200.png 200w`.
55
- */
56
- imageSrcSet?: string;
49
+ onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
57
50
  }
51
+ export {};
@@ -3,22 +3,71 @@ import { FormControlProps } from "../FormControl/FormControl";
3
3
  /** Use `Select` to choose from a dropdown list of options. */
4
4
  export declare const Select: React.FC<SelectProps>;
5
5
  export interface SelectProps extends Omit<FormControlProps, "children" | "elementType" | "htmlFor" | "requirementStatus" | "id" | "helperUnderLabel" | "supplementaryInfo"> {
6
+ /**
7
+ * Name for the Select.
8
+ */
6
9
  name: string;
10
+ /**
11
+ * Label for the Select.
12
+ */
7
13
  label: string;
14
+ /**
15
+ * Aria label for the Select.
16
+ */
8
17
  ariaLabel?: string;
18
+ /**
19
+ * Placeholder text for the Select.
20
+ */
9
21
  placeholder: string;
22
+ /**
23
+ * Options for the Select.
24
+ */
10
25
  options: {
11
26
  name: string;
12
27
  value: string;
13
28
  }[];
29
+ /**
30
+ * error message for the Select.
31
+ */
14
32
  errorMessage?: string;
33
+ /**
34
+ * Default value for the Select.
35
+ */
15
36
  defaultValue?: string;
37
+ /**
38
+ * onChange handler for the Select.
39
+ */
16
40
  onChange?: (value: string) => void;
41
+ /**
42
+ * onBlur handler for the Select.
43
+ */
17
44
  onBlur?: (e: FocusEvent) => void;
45
+ /**
46
+ * onOpenChange handler for the Select.
47
+ */
18
48
  onOpenChange?: () => void;
49
+ /**
50
+ * select handler for the Select.
51
+ */
19
52
  selectSize?: "s" | "m" | "l";
53
+ /**
54
+ * Sets the Select to 100% width.
55
+ */
20
56
  isFluid?: boolean;
57
+ /**
58
+ * Sets the width of the Select.
59
+ */
60
+ width?: string;
61
+ /**
62
+ * Disables the Select.
63
+ */
21
64
  isDisabled?: boolean;
65
+ /**
66
+ * Sets the Select to be open by default.
67
+ */
22
68
  isDefaultOpen?: boolean;
69
+ /**
70
+ * Sets the Select to be open by default.
71
+ */
23
72
  isRequired?: boolean;
24
73
  }
@@ -63,9 +63,20 @@ export interface TextInputProps extends Omit<FormControlProps, "children" | "ele
63
63
  */
64
64
  inputSize?: "s" | "m" | "l";
65
65
  /**
66
- * Enable button to toggle TextInput type from `Selected Type` to `Text`
66
+ * Determine the alignment of the text within the input
67
+ */
68
+ inputAlignment?: "left" | "right";
69
+ /**
70
+ * Enable button to toggle TextInput type from `Selected Type` to `Text`. This will override any `suffix` elements
67
71
  */
68
72
  showPassword?: boolean;
73
+ /**
74
+ * Add a prefixed value within `TextInput`
75
+ */
76
+ prefix?: string;
77
+ /**
78
+ * Add a suffixed value within `TextInput`. If `showPassword` is true, suffix will not be displayed */
79
+ suffix?: string;
69
80
  /**
70
81
  * Type for the input. `number` will be changed to `text` and set the `numeric` inputMode.
71
82
  */
@@ -0,0 +1,48 @@
1
+ import React, { FC } from "react";
2
+ import { HeadingLevel } from "../Heading/Heading";
3
+ export declare const TypographyCard: FC<TypographyCardProps>;
4
+ type TypographyCardIcon = "play" | "arrow";
5
+ type TypographyCardPathway = "light" | "dark";
6
+ export interface TypographyCardProps {
7
+ /**
8
+ * Heading for the TypographyCard.
9
+ */
10
+ heading: string;
11
+ /**
12
+ * Url for the TypographyCard.
13
+ */
14
+ url: string;
15
+ /**
16
+ * Sets a dark or light background for the TypographyCard.
17
+ */
18
+ pathway?: TypographyCardPathway;
19
+ /**
20
+ * Icon for the TypographyCard Cta button.
21
+ */
22
+ buttonIcon?: TypographyCardIcon;
23
+ /**
24
+ * Heading level for the TypographyCard heading.
25
+ */
26
+ headingLevel?: HeadingLevel;
27
+ /**
28
+ * Uppercase label for the TypographyCard.
29
+ */
30
+ label?: string;
31
+ /**
32
+ * Click handler for the TypographyCard.
33
+ */
34
+ onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;
35
+ /**
36
+ *
37
+ * Text to show adjacent to the cta
38
+ */
39
+ metaText?: string;
40
+ /**
41
+ * Object of `data-` attributes to render on internal anchor element, e.g.
42
+ * `{ data-analytics-link: "My link"}` => `<a data-analytics-link="My link">`.
43
+ */
44
+ linkData?: {
45
+ [key: string]: string;
46
+ };
47
+ }
48
+ export {};
@@ -0,0 +1 @@
1
+ export { TypographyCard } from "./TypographyCard";
@@ -22,4 +22,8 @@ export interface UniversalHeaderProps {
22
22
  * UniversalHeader.Item components.
23
23
  */
24
24
  children: ReactNode;
25
+ /**
26
+ * A Slot to accept react node. Any content with this slot will be aligned right.
27
+ */
28
+ ContentSlot?: ReactNode;
25
29
  }
@@ -45,6 +45,7 @@ export { TextArea } from "./TextArea";
45
45
  export { TextInput } from "./TextInput";
46
46
  export { Toast } from "./Toast";
47
47
  export { Truncate } from "./Truncate";
48
+ export { TypographyCard } from "./TypographyCard";
48
49
  export { UniversalHeader } from "./UniversalHeader";
49
50
  export { VerticalSpace } from "./VerticalSpace";
50
51
  export { VisuallyHidden } from "./VisuallyHidden";
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export declare const ConditionalWrapper: React.FC<{
3
+ condition: boolean;
4
+ wrapper: (children: React.ReactNode) => React.ReactNode;
5
+ children: React.ReactNode;
6
+ }>;
@@ -0,0 +1 @@
1
+ export { ConditionalWrapper } from "./ConditionalWrapper";
@@ -0,0 +1 @@
1
+ export { ConditionalWrapper } from "./ConditionalWrapper";
@@ -2,10 +2,10 @@ import "./components/Alert/Alert.css";
2
2
  import "./components/Align/Align.css";
3
3
  import "./components/Badge/Badge.css";
4
4
  import "./components/Base/Base.css";
5
+ import "./components/Box/Box.css";
5
6
  import "./components/BrandLogo/BrandLogo.css";
6
7
  import "./components/Breadcrumbs/Breadcrumbs.css";
7
8
  import "./components/Card/Card.css";
8
- import "./components/Box/Box.css";
9
9
  import "./components/Button/Button.css";
10
10
  import "./components/Checkbox/Checkbox.css";
11
11
  import "./components/Clock/Clock.css";
@@ -74,3 +74,4 @@ import "./components/Switch/Switch.bt.css";
74
74
  import "./components/Toast/Toast.css";
75
75
  import "./components/ProgressStepper/ProgressStepper.css";
76
76
  import "./components/InformationCard/InformationCard.css";
77
+ import "./components/TypographyCard/TypographyCard.css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arc-ui/components",
3
- "version": "11.14.0",
3
+ "version": "11.16.0",
4
4
  "homepage": "https://ui.digital-ent-int.bt.com",
5
5
  "author": "BT Enterprise Digital UI Team <ui-digital-ent-int@bt.com>",
6
6
  "main": "./dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "@geometricpanda/storybook-addon-badges": "^2.0.0",
29
29
  "@radix-ui/react-dialog": "1.0.4",
30
30
  "@radix-ui/react-label": "2.0.0",
31
- "@radix-ui/react-select": "1.1.2",
31
+ "@radix-ui/react-select": "2.0.0",
32
32
  "@radix-ui/react-switch": "1.0.1",
33
33
  "@radix-ui/react-tabs": "1.0.4",
34
34
  "@radix-ui/react-toast": "1.1.4",