@dxc-technology/halstack-react 0.0.0-dcd93c4 → 0.0.0-dddc3c4

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 (121) hide show
  1. package/accordion/types.d.ts +1 -1
  2. package/accordion-group/types.d.ts +1 -1
  3. package/bleed/Bleed.stories.tsx +63 -63
  4. package/bulleted-list/BulletedList.d.ts +7 -0
  5. package/bulleted-list/BulletedList.js +123 -0
  6. package/bulleted-list/BulletedList.stories.tsx +200 -0
  7. package/bulleted-list/types.d.ts +11 -0
  8. package/{inline → bulleted-list}/types.js +0 -0
  9. package/button/Button.js +43 -61
  10. package/button/Button.stories.tsx +9 -0
  11. package/button/types.d.ts +7 -7
  12. package/chip/types.d.ts +1 -1
  13. package/common/variables.js +52 -14
  14. package/date-input/DateInput.js +3 -3
  15. package/dialog/Dialog.js +52 -28
  16. package/dialog/Dialog.stories.tsx +1 -2
  17. package/dialog/Dialog.test.js +34 -4
  18. package/dialog/types.d.ts +2 -2
  19. package/dropdown/Dropdown.d.ts +1 -1
  20. package/dropdown/Dropdown.js +242 -246
  21. package/dropdown/Dropdown.stories.tsx +126 -63
  22. package/dropdown/Dropdown.test.js +510 -108
  23. package/dropdown/DropdownMenu.d.ts +4 -0
  24. package/dropdown/DropdownMenu.js +80 -0
  25. package/dropdown/DropdownMenuItem.d.ts +4 -0
  26. package/dropdown/DropdownMenuItem.js +92 -0
  27. package/dropdown/types.d.ts +25 -5
  28. package/flex/Flex.d.ts +4 -0
  29. package/flex/Flex.js +57 -0
  30. package/flex/Flex.stories.tsx +103 -0
  31. package/flex/types.d.ts +21 -0
  32. package/{list → flex}/types.js +0 -0
  33. package/footer/types.d.ts +1 -1
  34. package/header/Header.js +74 -72
  35. package/header/Header.stories.tsx +4 -4
  36. package/header/Icons.js +2 -2
  37. package/header/types.d.ts +2 -2
  38. package/inset/Inset.stories.tsx +4 -4
  39. package/layout/ApplicationLayout.d.ts +15 -6
  40. package/layout/ApplicationLayout.js +36 -64
  41. package/layout/ApplicationLayout.stories.tsx +80 -44
  42. package/layout/types.d.ts +17 -27
  43. package/link/Link.js +1 -1
  44. package/link/Link.stories.tsx +12 -5
  45. package/link/types.d.ts +1 -1
  46. package/main.d.ts +5 -9
  47. package/main.js +27 -59
  48. package/package.json +9 -9
  49. package/paragraph/Paragraph.d.ts +6 -0
  50. package/paragraph/Paragraph.js +38 -0
  51. package/paragraph/Paragraph.stories.tsx +44 -0
  52. package/progress-bar/ProgressBar.d.ts +2 -2
  53. package/progress-bar/ProgressBar.js +56 -50
  54. package/progress-bar/ProgressBar.stories.jsx +3 -1
  55. package/progress-bar/ProgressBar.test.js +67 -22
  56. package/progress-bar/types.d.ts +3 -4
  57. package/quick-nav/QuickNav.js +15 -13
  58. package/quick-nav/QuickNav.stories.tsx +41 -14
  59. package/radio-group/RadioGroup.js +11 -13
  60. package/select/Listbox.d.ts +1 -1
  61. package/select/Listbox.js +25 -1
  62. package/select/Select.js +14 -31
  63. package/select/Select.stories.tsx +6 -5
  64. package/select/Select.test.js +63 -50
  65. package/select/types.d.ts +2 -4
  66. package/sidenav/Sidenav.d.ts +6 -5
  67. package/sidenav/Sidenav.js +176 -55
  68. package/sidenav/Sidenav.stories.tsx +154 -156
  69. package/sidenav/Sidenav.test.js +25 -37
  70. package/sidenav/types.d.ts +50 -27
  71. package/slider/Slider.js +112 -97
  72. package/slider/Slider.stories.tsx +7 -1
  73. package/slider/Slider.test.js +121 -21
  74. package/slider/types.d.ts +2 -2
  75. package/switch/Switch.d.ts +1 -1
  76. package/switch/Switch.js +110 -54
  77. package/switch/Switch.stories.tsx +8 -30
  78. package/switch/Switch.test.js +122 -8
  79. package/switch/types.d.ts +3 -4
  80. package/tabs/Tab.d.ts +4 -0
  81. package/tabs/Tab.js +135 -0
  82. package/tabs/Tabs.js +360 -104
  83. package/tabs/Tabs.stories.tsx +74 -0
  84. package/tabs/Tabs.test.js +217 -6
  85. package/tabs/types.d.ts +15 -5
  86. package/tabs-nav/NavTabs.js +5 -5
  87. package/tabs-nav/Tab.js +3 -5
  88. package/tabs-nav/types.d.ts +1 -1
  89. package/tag/types.d.ts +1 -1
  90. package/text-input/TextInput.js +12 -21
  91. package/text-input/TextInput.stories.tsx +1 -2
  92. package/text-input/types.d.ts +1 -1
  93. package/toggle-group/types.d.ts +1 -1
  94. package/typography/Typography.d.ts +4 -0
  95. package/typography/Typography.js +131 -0
  96. package/typography/Typography.stories.tsx +198 -0
  97. package/typography/types.d.ts +18 -0
  98. package/{row → typography}/types.js +0 -0
  99. package/wizard/Wizard.js +9 -16
  100. package/wizard/Wizard.stories.tsx +20 -1
  101. package/wizard/types.d.ts +5 -4
  102. package/inline/Inline.d.ts +0 -4
  103. package/inline/Inline.js +0 -60
  104. package/inline/Inline.stories.tsx +0 -319
  105. package/inline/types.d.ts +0 -36
  106. package/list/List.d.ts +0 -4
  107. package/list/List.js +0 -47
  108. package/list/List.stories.tsx +0 -89
  109. package/list/types.d.ts +0 -7
  110. package/row/Row.d.ts +0 -3
  111. package/row/Row.js +0 -127
  112. package/row/Row.stories.tsx +0 -237
  113. package/row/types.d.ts +0 -28
  114. package/stack/Stack.d.ts +0 -4
  115. package/stack/Stack.js +0 -56
  116. package/stack/Stack.stories.tsx +0 -263
  117. package/stack/types.d.ts +0 -32
  118. package/stack/types.js +0 -5
  119. package/text/Text.d.ts +0 -7
  120. package/text/Text.js +0 -30
  121. package/text/Text.stories.tsx +0 -19
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import DxcApplicationLayout from "./ApplicationLayout";
3
- import DxcSidenav from "../sidenav/Sidenav";
4
3
  import Title from "../../.storybook/components/Title";
5
4
  import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
6
5
 
@@ -30,15 +29,25 @@ export const DefaultApplicationLayout = () => (
30
29
 
31
30
  export const ApplicationLayoutWithDefaultSidenav = () => (
32
31
  <>
33
- <DxcApplicationLayout>
34
- <DxcApplicationLayout.SideNav>
35
- <DxcSidenav.Title>Application layout with sidenav</DxcSidenav.Title>
36
- <p>SideNav Content</p>
37
- <p>SideNav Content</p>
38
- <p>SideNav Content</p>
39
- <p>SideNav Content</p>
40
- <p>SideNav Content</p>
41
- </DxcApplicationLayout.SideNav>
32
+ <DxcApplicationLayout
33
+ sidenav={
34
+ <DxcApplicationLayout.SideNav
35
+ title={
36
+ <DxcApplicationLayout.SideNav.Title>
37
+ Application layout with push sidenav
38
+ </DxcApplicationLayout.SideNav.Title>
39
+ }
40
+ >
41
+ <DxcApplicationLayout.SideNav.Section>
42
+ <p>SideNav Content</p>
43
+ <p>SideNav Content</p>
44
+ <p>SideNav Content</p>
45
+ <p>SideNav Content</p>
46
+ <p>SideNav Content</p>
47
+ </DxcApplicationLayout.SideNav.Section>
48
+ </DxcApplicationLayout.SideNav>
49
+ }
50
+ >
42
51
  <DxcApplicationLayout.Main>
43
52
  <p>Main Content</p>
44
53
  <p>Main Content</p>
@@ -51,15 +60,26 @@ export const ApplicationLayoutWithDefaultSidenav = () => (
51
60
 
52
61
  export const ApplicationLayoutWithResponsiveSidenav = () => (
53
62
  <>
54
- <DxcApplicationLayout visibilityToggleLabel="Example">
55
- <DxcApplicationLayout.SideNav>
56
- <DxcSidenav.Title>Application layout with push sidenav</DxcSidenav.Title>
57
- <p>SideNav Content</p>
58
- <p>SideNav Content</p>
59
- <p>SideNav Content</p>
60
- <p>SideNav Content</p>
61
- <p>SideNav Content</p>
62
- </DxcApplicationLayout.SideNav>
63
+ <DxcApplicationLayout
64
+ visibilityToggleLabel="Example"
65
+ sidenav={
66
+ <DxcApplicationLayout.SideNav
67
+ title={
68
+ <DxcApplicationLayout.SideNav.Title>
69
+ Application layout with push sidenav
70
+ </DxcApplicationLayout.SideNav.Title>
71
+ }
72
+ >
73
+ <DxcApplicationLayout.SideNav.Section>
74
+ <p>SideNav Content</p>
75
+ <p>SideNav Content</p>
76
+ <p>SideNav Content</p>
77
+ <p>SideNav Content</p>
78
+ <p>SideNav Content</p>
79
+ </DxcApplicationLayout.SideNav.Section>
80
+ </DxcApplicationLayout.SideNav>
81
+ }
82
+ >
63
83
  <DxcApplicationLayout.Main>
64
84
  <p>Main Content</p>
65
85
  <p>Main Content</p>
@@ -74,23 +94,31 @@ ApplicationLayoutWithResponsiveSidenav.parameters = {
74
94
  viewport: {
75
95
  defaultViewport: "pixel",
76
96
  },
97
+ chromatic: { viewports: [540] },
77
98
  };
78
99
 
79
100
  export const ApplicationLayoutWithCustomHeader = () => (
80
101
  <>
81
- <DxcApplicationLayout>
82
- <DxcApplicationLayout.Header>
83
- {" "}
84
- <p>Custom Header</p>{" "}
85
- </DxcApplicationLayout.Header>
86
- <DxcApplicationLayout.SideNav>
87
- <DxcSidenav.Title>Application layout with custom header</DxcSidenav.Title>
88
- <p>SideNav Content</p>
89
- <p>SideNav Content</p>
90
- <p>SideNav Content</p>
91
- <p>SideNav Content</p>
92
- <p>SideNav Content</p>
93
- </DxcApplicationLayout.SideNav>
102
+ <DxcApplicationLayout
103
+ header={<p>Custom Header</p>}
104
+ sidenav={
105
+ <DxcApplicationLayout.SideNav
106
+ title={
107
+ <DxcApplicationLayout.SideNav.Title>
108
+ Application layout with push sidenav
109
+ </DxcApplicationLayout.SideNav.Title>
110
+ }
111
+ >
112
+ <DxcApplicationLayout.SideNav.Section>
113
+ <p>SideNav Content</p>
114
+ <p>SideNav Content</p>
115
+ <p>SideNav Content</p>
116
+ <p>SideNav Content</p>
117
+ <p>SideNav Content</p>
118
+ </DxcApplicationLayout.SideNav.Section>
119
+ </DxcApplicationLayout.SideNav>
120
+ }
121
+ >
94
122
  <DxcApplicationLayout.Main>
95
123
  <p>Main Content</p>
96
124
  <p>Main Content</p>
@@ -103,24 +131,32 @@ export const ApplicationLayoutWithCustomHeader = () => (
103
131
 
104
132
  export const ApplicationLayoutWithCustomFooter = () => (
105
133
  <>
106
- <DxcApplicationLayout>
107
- <DxcApplicationLayout.SideNav>
108
- <DxcSidenav.Title>Application layout with custom footer</DxcSidenav.Title>
109
- <p>SideNav Content</p>
110
- <p>SideNav Content</p>
111
- <p>SideNav Content</p>
112
- <p>SideNav Content</p>
113
- <p>SideNav Content</p>
114
- </DxcApplicationLayout.SideNav>
134
+ <DxcApplicationLayout
135
+ footer={<p>Custom Footer</p>}
136
+ sidenav={
137
+ <DxcApplicationLayout.SideNav
138
+ title={
139
+ <DxcApplicationLayout.SideNav.Title>
140
+ Application layout with push sidenav
141
+ </DxcApplicationLayout.SideNav.Title>
142
+ }
143
+ >
144
+ <DxcApplicationLayout.SideNav.Section>
145
+ <p>SideNav Content</p>
146
+ <p>SideNav Content</p>
147
+ <p>SideNav Content</p>
148
+ <p>SideNav Content</p>
149
+ <p>SideNav Content</p>
150
+ </DxcApplicationLayout.SideNav.Section>
151
+ </DxcApplicationLayout.SideNav>
152
+ }
153
+ >
115
154
  <DxcApplicationLayout.Main>
116
155
  <p>Main Content</p>
117
156
  <p>Main Content</p>
118
157
  <p>Main Content</p>
119
158
  <p>Main Content</p>
120
159
  </DxcApplicationLayout.Main>
121
- <DxcApplicationLayout.Footer>
122
- <p>Custom Footer</p>
123
- </DxcApplicationLayout.Footer>
124
160
  </DxcApplicationLayout>
125
161
  </>
126
162
  );
package/layout/types.d.ts CHANGED
@@ -1,42 +1,20 @@
1
1
  /// <reference types="react" />
2
- declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
3
- declare type Padding = {
4
- top?: Space;
5
- bottom?: Space;
6
- left?: Space;
7
- right?: Space;
8
- };
9
- declare type ChildrenType = AppLayoutHeaderPropsType | AppLayoutMainPropsType | AppLayoutFooterPropsType | AppLayoutSidenavPropsType;
10
- export declare type AppLayoutHeaderPropsType = {
11
- /**
12
- * Everything between this tags will be displayed as a header, at the top of the screen.
13
- * This is optional and if it is not specified, the DxcHeader will be shown by default.
14
- */
15
- children?: React.ReactNode;
16
- };
2
+ declare type ChildrenType = AppLayoutMainPropsType | AppLayoutSidenavPropsType;
17
3
  export declare type AppLayoutMainPropsType = {
18
4
  /**
19
5
  * Everything between the tags will be displayed as the content of the main part of the application.
20
6
  */
21
7
  children: React.ReactNode;
22
8
  };
23
- export declare type AppLayoutFooterPropsType = {
24
- /**
25
- * Everything between the tags will be displayed as a footer, at the bottom of the screen.
26
- * This is optional and if it is not specified, the DxcFooter will be shown by default.
27
- */
28
- children?: React.ReactNode;
29
- };
30
9
  export declare type AppLayoutSidenavPropsType = {
31
10
  /**
32
- * Size of the padding to be applied to the custom area ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
33
- * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different padding sizes.
11
+ * The area inside the sidenav. This area can be used to render the content inside the sidenav.
34
12
  */
35
- padding?: Space | Padding;
13
+ children: React.ReactNode;
36
14
  /**
37
- * The area inside the sidenav. This area can be used to render custom content.
15
+ * The area assigned to render the sidenav title. It is highly recommended to use the sidenav title.
38
16
  */
39
- children: React.ReactNode;
17
+ title?: React.ReactNode;
40
18
  };
41
19
  declare type AppLayoutPropsType = {
42
20
  /**
@@ -44,6 +22,18 @@ declare type AppLayoutPropsType = {
44
22
  * visibility of the sidenav.
45
23
  */
46
24
  visibilityToggleLabel?: string;
25
+ /**
26
+ * Header content.
27
+ */
28
+ header?: React.ReactNode;
29
+ /**
30
+ * Sidenav content
31
+ */
32
+ sidenav?: React.ReactNode;
33
+ /**
34
+ * Footer content
35
+ */
36
+ footer?: React.ReactNode;
47
37
  /**
48
38
  * The area inside the sidenav. This area can be used to render custom content.
49
39
  */
package/link/Link.js CHANGED
@@ -82,7 +82,7 @@ var DxcLink = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
82
82
  })));
83
83
  });
84
84
 
85
- var StyledLink = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n font-size: ", ";\n font-weight: ", ";\n font-style: ", ";\n font-family: ", ";\n text-decoration-color: transparent;\n width: fit-content;\n\n ", "\n ", "\n color: ", ";\n ", "\n\n &:visited {\n color: ", ";\n &:hover {\n ", "\n }\n }\n &:hover {\n ", "\n }\n &:focus {\n border-radius: 2px;\n outline: 2px solid ", ";\n ", "\n }\n &:active {\n ", "\n }\n"])), function (props) {
85
+ var StyledLink = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n align-items: baseline;\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n font-size: ", ";\n font-weight: ", ";\n font-style: ", ";\n font-family: ", ";\n text-decoration-color: transparent;\n width: fit-content;\n\n ", "\n ", "\n color: ", ";\n ", "\n\n &:visited {\n color: ", ";\n &:hover {\n ", "\n }\n }\n &:hover {\n ", "\n }\n &:focus {\n border-radius: 2px;\n outline: 2px solid ", ";\n ", "\n }\n &:active {\n ", "\n }\n"])), function (props) {
86
86
  return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
87
87
  }, function (props) {
88
88
  return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
@@ -68,11 +68,18 @@ export const Chromatic = () => (
68
68
  </ExampleContainer>
69
69
  <ExampleContainer pseudoState="pseudo-hover">
70
70
  <Title title="Long text with hover" theme="light" level={4} />
71
- Lorem <DxcLink href="https://www.google.com">Test</DxcLink> ipsum dolor sit amet, consectetur adipiscing elit, sed
72
- do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
73
- ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit
74
- esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
75
- officia deserunt mollit anim id est laborum.
71
+ Lorem{" "}
72
+ <DxcLink href="https://www.google.com" icon={icon}>
73
+ Test
74
+ </DxcLink>{" "}
75
+ ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
76
+ aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
77
+ consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
78
+ Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit{" "}
79
+ <DxcLink href="https://www.google.com" icon={icon} iconPosition="after">
80
+ Test
81
+ </DxcLink>{" "}
82
+ anim id est laborum.
76
83
  </ExampleContainer>
77
84
  <ExampleContainer pseudoState="pseudo-focus">
78
85
  <Title title="Long text with focus" theme="light" level={4} />
package/link/types.d.ts CHANGED
@@ -6,7 +6,7 @@ export declare type Margin = {
6
6
  left?: Space;
7
7
  right?: Space;
8
8
  };
9
- declare type SVG = React.SVGProps<SVGSVGElement>;
9
+ declare type SVG = React.ReactNode & React.SVGProps<SVGSVGElement>;
10
10
  export declare type LinkProps = {
11
11
  /**
12
12
  * If true, the color is inherited from parent.
package/main.d.ts CHANGED
@@ -5,8 +5,6 @@ import DxcCard from "./card/Card";
5
5
  import DxcCheckbox from "./checkbox/Checkbox";
6
6
  import DxcDialog from "./dialog/Dialog";
7
7
  import DxcDropdown from "./dropdown/Dropdown";
8
- import DxcFooter from "./footer/Footer";
9
- import DxcHeader from "./header/Header";
10
8
  import DxcSlider from "./slider/Slider";
11
9
  import DxcSwitch from "./switch/Switch";
12
10
  import DxcTabs from "./tabs/Tabs";
@@ -16,7 +14,6 @@ import DxcTable from "./table/Table";
16
14
  import DxcBox from "./box/Box";
17
15
  import DxcTag from "./tag/Tag";
18
16
  import DxcPaginator from "./paginator/Paginator";
19
- import DxcSidenav from "./sidenav/Sidenav";
20
17
  import DxcWizard from "./wizard/Wizard";
21
18
  import DxcLink from "./link/Link";
22
19
  import DxcHeading from "./heading/Heading";
@@ -33,16 +30,15 @@ import DxcNumberInput from "./number-input/NumberInput";
33
30
  import DxcTextarea from "./textarea/Textarea";
34
31
  import DxcSelect from "./select/Select";
35
32
  import DxcFileInput from "./file-input/FileInput";
36
- import DxcStack from "./stack/Stack";
37
- import DxcRow from "./row/Row";
38
- import DxcText from "./text/Text";
39
- import DxcList from "./list/List";
40
33
  import DxcRadioGroup from "./radio-group/RadioGroup";
41
34
  import DxcBleed from "./bleed/Bleed";
42
35
  import DxcInset from "./inset/Inset";
43
36
  import DxcQuickNav from "./quick-nav/QuickNav";
44
37
  import DxcNavTabs from "./tabs-nav/NavTabs";
45
- import DxcInline from "./inline/Inline";
38
+ import DxcFlex from "./flex/Flex";
39
+ import DxcTypography from "./typography/Typography";
40
+ import DxcParagraph from "./paragraph/Paragraph";
41
+ import DxcBulletedList from "./bulleted-list/BulletedList";
46
42
  import HalstackContext, { HalstackProvider, HalstackLanguageContext } from "./HalstackContext";
47
43
  import { BackgroundColorProvider } from "./BackgroundColorContext";
48
- export { DxcAlert, DxcButton, DxcFooter, DxcCheckbox, DxcTextInput, DxcDropdown, DxcSwitch, DxcSlider, DxcHeader, DxcTable, DxcTabs, DxcToggleGroup, DxcDialog, DxcCard, DxcProgressBar, DxcAccordion, DxcSpinner, DxcBox, DxcTag, DxcPaginator, DxcSidenav, DxcWizard, DxcLink, DxcHeading, DxcResultsetTable, DxcChip, DxcApplicationLayout, HalstackContext, HalstackLanguageContext, HalstackProvider, BackgroundColorProvider, DxcAccordionGroup, DxcBadge, DxcPasswordInput, DxcDateInput, DxcNumberInput, DxcTextarea, DxcSelect, DxcFileInput, DxcStack, DxcRow, DxcText, DxcList, DxcRadioGroup, DxcBleed, DxcInset, DxcQuickNav, DxcNavTabs, DxcInline, };
44
+ export { DxcAlert, DxcButton, DxcCheckbox, DxcTextInput, DxcDropdown, DxcSwitch, DxcSlider, DxcTable, DxcTabs, DxcToggleGroup, DxcDialog, DxcCard, DxcProgressBar, DxcAccordion, DxcSpinner, DxcBox, DxcTag, DxcPaginator, DxcWizard, DxcLink, DxcHeading, DxcResultsetTable, DxcChip, DxcApplicationLayout, HalstackContext, HalstackLanguageContext, HalstackProvider, BackgroundColorProvider, DxcAccordionGroup, DxcBadge, DxcPasswordInput, DxcDateInput, DxcNumberInput, DxcTextarea, DxcSelect, DxcFileInput, DxcRadioGroup, DxcBleed, DxcInset, DxcQuickNav, DxcNavTabs, DxcFlex, DxcTypography, DxcParagraph, DxcBulletedList, };
package/main.js CHANGED
@@ -55,6 +55,12 @@ Object.defineProperty(exports, "DxcBox", {
55
55
  return _Box["default"];
56
56
  }
57
57
  });
58
+ Object.defineProperty(exports, "DxcBulletedList", {
59
+ enumerable: true,
60
+ get: function get() {
61
+ return _BulletedList["default"];
62
+ }
63
+ });
58
64
  Object.defineProperty(exports, "DxcButton", {
59
65
  enumerable: true,
60
66
  get: function get() {
@@ -103,16 +109,10 @@ Object.defineProperty(exports, "DxcFileInput", {
103
109
  return _FileInput["default"];
104
110
  }
105
111
  });
106
- Object.defineProperty(exports, "DxcFooter", {
112
+ Object.defineProperty(exports, "DxcFlex", {
107
113
  enumerable: true,
108
114
  get: function get() {
109
- return _Footer["default"];
110
- }
111
- });
112
- Object.defineProperty(exports, "DxcHeader", {
113
- enumerable: true,
114
- get: function get() {
115
- return _Header["default"];
115
+ return _Flex["default"];
116
116
  }
117
117
  });
118
118
  Object.defineProperty(exports, "DxcHeading", {
@@ -121,12 +121,6 @@ Object.defineProperty(exports, "DxcHeading", {
121
121
  return _Heading["default"];
122
122
  }
123
123
  });
124
- Object.defineProperty(exports, "DxcInline", {
125
- enumerable: true,
126
- get: function get() {
127
- return _Inline["default"];
128
- }
129
- });
130
124
  Object.defineProperty(exports, "DxcInset", {
131
125
  enumerable: true,
132
126
  get: function get() {
@@ -139,12 +133,6 @@ Object.defineProperty(exports, "DxcLink", {
139
133
  return _Link["default"];
140
134
  }
141
135
  });
142
- Object.defineProperty(exports, "DxcList", {
143
- enumerable: true,
144
- get: function get() {
145
- return _List["default"];
146
- }
147
- });
148
136
  Object.defineProperty(exports, "DxcNavTabs", {
149
137
  enumerable: true,
150
138
  get: function get() {
@@ -163,6 +151,12 @@ Object.defineProperty(exports, "DxcPaginator", {
163
151
  return _Paginator["default"];
164
152
  }
165
153
  });
154
+ Object.defineProperty(exports, "DxcParagraph", {
155
+ enumerable: true,
156
+ get: function get() {
157
+ return _Paragraph["default"];
158
+ }
159
+ });
166
160
  Object.defineProperty(exports, "DxcPasswordInput", {
167
161
  enumerable: true,
168
162
  get: function get() {
@@ -193,24 +187,12 @@ Object.defineProperty(exports, "DxcResultsetTable", {
193
187
  return _ResultsetTable["default"];
194
188
  }
195
189
  });
196
- Object.defineProperty(exports, "DxcRow", {
197
- enumerable: true,
198
- get: function get() {
199
- return _Row["default"];
200
- }
201
- });
202
190
  Object.defineProperty(exports, "DxcSelect", {
203
191
  enumerable: true,
204
192
  get: function get() {
205
193
  return _Select["default"];
206
194
  }
207
195
  });
208
- Object.defineProperty(exports, "DxcSidenav", {
209
- enumerable: true,
210
- get: function get() {
211
- return _Sidenav["default"];
212
- }
213
- });
214
196
  Object.defineProperty(exports, "DxcSlider", {
215
197
  enumerable: true,
216
198
  get: function get() {
@@ -223,12 +205,6 @@ Object.defineProperty(exports, "DxcSpinner", {
223
205
  return _Spinner["default"];
224
206
  }
225
207
  });
226
- Object.defineProperty(exports, "DxcStack", {
227
- enumerable: true,
228
- get: function get() {
229
- return _Stack["default"];
230
- }
231
- });
232
208
  Object.defineProperty(exports, "DxcSwitch", {
233
209
  enumerable: true,
234
210
  get: function get() {
@@ -253,12 +229,6 @@ Object.defineProperty(exports, "DxcTag", {
253
229
  return _Tag["default"];
254
230
  }
255
231
  });
256
- Object.defineProperty(exports, "DxcText", {
257
- enumerable: true,
258
- get: function get() {
259
- return _Text["default"];
260
- }
261
- });
262
232
  Object.defineProperty(exports, "DxcTextInput", {
263
233
  enumerable: true,
264
234
  get: function get() {
@@ -277,6 +247,12 @@ Object.defineProperty(exports, "DxcToggleGroup", {
277
247
  return _ToggleGroup["default"];
278
248
  }
279
249
  });
250
+ Object.defineProperty(exports, "DxcTypography", {
251
+ enumerable: true,
252
+ get: function get() {
253
+ return _Typography["default"];
254
+ }
255
+ });
280
256
  Object.defineProperty(exports, "DxcWizard", {
281
257
  enumerable: true,
282
258
  get: function get() {
@@ -316,10 +292,6 @@ var _Dialog = _interopRequireDefault(require("./dialog/Dialog"));
316
292
 
317
293
  var _Dropdown = _interopRequireDefault(require("./dropdown/Dropdown"));
318
294
 
319
- var _Footer = _interopRequireDefault(require("./footer/Footer"));
320
-
321
- var _Header = _interopRequireDefault(require("./header/Header"));
322
-
323
295
  var _Slider = _interopRequireDefault(require("./slider/Slider"));
324
296
 
325
297
  var _Switch = _interopRequireDefault(require("./switch/Switch"));
@@ -338,8 +310,6 @@ var _Tag = _interopRequireDefault(require("./tag/Tag"));
338
310
 
339
311
  var _Paginator = _interopRequireDefault(require("./paginator/Paginator"));
340
312
 
341
- var _Sidenav = _interopRequireDefault(require("./sidenav/Sidenav"));
342
-
343
313
  var _Wizard = _interopRequireDefault(require("./wizard/Wizard"));
344
314
 
345
315
  var _Link = _interopRequireDefault(require("./link/Link"));
@@ -372,14 +342,6 @@ var _Select = _interopRequireDefault(require("./select/Select"));
372
342
 
373
343
  var _FileInput = _interopRequireDefault(require("./file-input/FileInput"));
374
344
 
375
- var _Stack = _interopRequireDefault(require("./stack/Stack"));
376
-
377
- var _Row = _interopRequireDefault(require("./row/Row"));
378
-
379
- var _Text = _interopRequireDefault(require("./text/Text"));
380
-
381
- var _List = _interopRequireDefault(require("./list/List"));
382
-
383
345
  var _RadioGroup = _interopRequireDefault(require("./radio-group/RadioGroup"));
384
346
 
385
347
  var _Bleed = _interopRequireDefault(require("./bleed/Bleed"));
@@ -390,7 +352,13 @@ var _QuickNav = _interopRequireDefault(require("./quick-nav/QuickNav"));
390
352
 
391
353
  var _NavTabs = _interopRequireDefault(require("./tabs-nav/NavTabs"));
392
354
 
393
- var _Inline = _interopRequireDefault(require("./inline/Inline"));
355
+ var _Flex = _interopRequireDefault(require("./flex/Flex"));
356
+
357
+ var _Typography = _interopRequireDefault(require("./typography/Typography"));
358
+
359
+ var _Paragraph = _interopRequireDefault(require("./paragraph/Paragraph"));
360
+
361
+ var _BulletedList = _interopRequireDefault(require("./bulleted-list/BulletedList"));
394
362
 
395
363
  var _HalstackContext = _interopRequireWildcard(require("./HalstackContext"));
396
364
 
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@dxc-technology/halstack-react",
3
- "version": "0.0.0-dcd93c4",
3
+ "version": "0.0.0-dddc3c4",
4
4
  "description": "DXC Halstack React components library",
5
5
  "repository": "dxc-technology/halstack-react",
6
- "homepage": "http://developer.dxc.com/tools/react",
6
+ "homepage": "https://developer.dxc.com/halstack",
7
7
  "license": "Apache-2.0",
8
8
  "author": {
9
9
  "name": "DXC Technology",
10
10
  "email": "DigitalInsurance@dxc.com",
11
- "url": "https://dxc.com"
11
+ "url": "https://developer.dxc.com"
12
12
  },
13
13
  "main": "./main.js",
14
14
  "types": "./main.d.ts",
15
15
  "peerDependencies": {
16
- "react": "^17.0.1",
17
- "react-dom": "^17.0.1",
16
+ "react": "^18.2.0",
17
+ "react-dom": "^18.2.0",
18
18
  "styled-components": "^5.0.1"
19
19
  },
20
20
  "dependencies": {
@@ -56,9 +56,9 @@
56
56
  "@storybook/addon-links": "^6.4.9",
57
57
  "@storybook/react": "^6.4.9",
58
58
  "@storybook/testing-library": "0.0.7",
59
- "@testing-library/react": "^11.2.5",
59
+ "@testing-library/react": "^13.0.0",
60
60
  "@testing-library/user-event": "^12.6.3",
61
- "@types/react": "16.9.5",
61
+ "@types/react": "^18.0.18",
62
62
  "babel-jest": "^24.8.0",
63
63
  "babel-loader": "^8.0.6",
64
64
  "chromatic": "^6.3.3",
@@ -73,8 +73,8 @@
73
73
  "eslint-plugin-storybook": "^0.5.5",
74
74
  "identity-obj-proxy": "^3.0.0",
75
75
  "jest": "^25.5.4",
76
- "react": "^17.0.1",
77
- "react-dom": "^17.0.1",
76
+ "react": "^18.2.0",
77
+ "react-dom": "^18.2.0",
78
78
  "react-test-renderer": "^16.8.6",
79
79
  "storybook-addon-pseudo-states": "^1.0.0",
80
80
  "styled-components": "^5.0.1",
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ declare type ParagraphPropsType = {
3
+ children: React.ReactNode;
4
+ };
5
+ declare const Paragraph: ({ children }: ParagraphPropsType) => JSX.Element;
6
+ export default Paragraph;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports["default"] = void 0;
11
+
12
+ var _react = _interopRequireWildcard(require("react"));
13
+
14
+ var _Typography = _interopRequireDefault(require("../typography/Typography"));
15
+
16
+ var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext"));
17
+
18
+ var _useTheme = _interopRequireDefault(require("../useTheme"));
19
+
20
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
+
22
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
+
24
+ var Paragraph = function Paragraph(_ref) {
25
+ var children = _ref.children;
26
+ var colorsTheme = (0, _useTheme["default"])();
27
+ var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
28
+ return /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
29
+ as: "p",
30
+ display: colorsTheme.paragraph.display,
31
+ fontSize: colorsTheme.paragraph.fontSize,
32
+ fontWeight: colorsTheme.paragraph.fontWeight,
33
+ color: backgroundType && backgroundType === "dark" ? colorsTheme.paragraph.fontColorOnDark : colorsTheme.paragraph.fontColor
34
+ }, children);
35
+ };
36
+
37
+ var _default = Paragraph;
38
+ exports["default"] = _default;
@@ -0,0 +1,44 @@
1
+ import React from "react";
2
+ import Title from "../../.storybook/components/Title";
3
+ import DxcParagraph from "./Paragraph";
4
+ import { BackgroundColorProvider } from "../BackgroundColorContext";
5
+ import ExampleContainer from "../../.storybook/components/ExampleContainer";
6
+ import DarkContainer from "../../.storybook/components/DarkSection";
7
+
8
+ export default {
9
+ title: "Paragraph",
10
+ component: DxcParagraph,
11
+ };
12
+
13
+ export const Chromatic = () => (
14
+ <>
15
+ <ExampleContainer>
16
+ <Title title="Default Paragraph" level={4} />
17
+ <DxcParagraph>
18
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla id tortor sit amet velit auctor cursus id eget
19
+ nisl. Vivamus luctus egestas eros, at mattis libero eleifend ac. Integer vel urna rutrum, pretium arcu
20
+ dignissim, fringilla turpis. Nullam luctus odio quis magna finibus, a pharetra magna euismod. Nullam efficitur
21
+ semper pellentesque. Nulla eget arcu ac diam fringilla vehicula. In imperdiet nisl hendrerit, elementum metus
22
+ eu, ornare risus. Aenean neque nibh, vestibulum vitae elit vel, imperdiet suscipit leo. Curabitur blandit
23
+ iaculis pretium. Fusce id imperdiet dui, ut laoreet justo. Sed maximus sollicitudin ipsum, et varius massa
24
+ condimentum eget. Vivamus id mauris et nisl mattis consequat et id lectus. Quisque mollis lacinia nisl.
25
+ Suspendisse sed quam tincidunt, commodo dolor vel, tincidunt nisl.
26
+ </DxcParagraph>
27
+ </ExampleContainer>
28
+ <BackgroundColorProvider color="#333333">
29
+ <DarkContainer>
30
+ <Title title="Default Paragraph" theme="dark" level={4} />
31
+ <DxcParagraph>
32
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla id tortor sit amet velit auctor cursus id eget
33
+ nisl. Vivamus luctus egestas eros, at mattis libero eleifend ac. Integer vel urna rutrum, pretium arcu
34
+ dignissim, fringilla turpis. Nullam luctus odio quis magna finibus, a pharetra magna euismod. Nullam efficitur
35
+ semper pellentesque. Nulla eget arcu ac diam fringilla vehicula. In imperdiet nisl hendrerit, elementum metus
36
+ eu, ornare risus. Aenean neque nibh, vestibulum vitae elit vel, imperdiet suscipit leo. Curabitur blandit
37
+ iaculis pretium. Fusce id imperdiet dui, ut laoreet justo. Sed maximus sollicitudin ipsum, et varius massa
38
+ condimentum eget. Vivamus id mauris et nisl mattis consequat et id lectus. Quisque mollis lacinia nisl.
39
+ Suspendisse sed quam tincidunt, commodo dolor vel, tincidunt nisl.
40
+ </DxcParagraph>
41
+ </DarkContainer>
42
+ </BackgroundColorProvider>
43
+ </>
44
+ );
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import ProgressBarPropsType from "./types";
3
- declare const DxcProgressBar: ({ label, helperText, overlay, value, showValue, margin, }: ProgressBarPropsType) => JSX.Element;
2
+ import { Props } from "./types";
3
+ declare const DxcProgressBar: ({ label, helperText, overlay, value, showValue, margin, }: Props) => JSX.Element;
4
4
  export default DxcProgressBar;