@dxc-technology/halstack-react 0.0.0-e33af28 → 0.0.0-e35a79c

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 (299) hide show
  1. package/README.md +46 -0
  2. package/dist/index.d.mts +6540 -0
  3. package/dist/index.d.ts +6540 -0
  4. package/dist/index.js +12938 -0
  5. package/dist/index.mjs +12881 -0
  6. package/package.json +74 -72
  7. package/BackgroundColorContext.d.ts +0 -10
  8. package/BackgroundColorContext.js +0 -47
  9. package/ThemeContext.d.ts +0 -10
  10. package/ThemeContext.js +0 -243
  11. package/accordion/Accordion.d.ts +0 -4
  12. package/accordion/Accordion.js +0 -226
  13. package/accordion/Accordion.stories.tsx +0 -307
  14. package/accordion/Accordion.test.js +0 -72
  15. package/accordion/types.d.ts +0 -68
  16. package/accordion/types.js +0 -5
  17. package/accordion-group/AccordionGroup.d.ts +0 -7
  18. package/accordion-group/AccordionGroup.js +0 -168
  19. package/accordion-group/AccordionGroup.stories.tsx +0 -225
  20. package/accordion-group/AccordionGroup.test.js +0 -151
  21. package/accordion-group/types.d.ts +0 -72
  22. package/accordion-group/types.js +0 -5
  23. package/alert/Alert.d.ts +0 -4
  24. package/alert/Alert.js +0 -290
  25. package/alert/Alert.stories.tsx +0 -170
  26. package/alert/Alert.test.js +0 -92
  27. package/alert/types.d.ts +0 -49
  28. package/alert/types.js +0 -5
  29. package/badge/Badge.d.ts +0 -4
  30. package/badge/Badge.js +0 -59
  31. package/badge/types.d.ts +0 -4
  32. package/badge/types.js +0 -5
  33. package/bleed/Bleed.d.ts +0 -3
  34. package/bleed/Bleed.js +0 -84
  35. package/bleed/Bleed.stories.tsx +0 -342
  36. package/bleed/types.d.ts +0 -37
  37. package/bleed/types.js +0 -5
  38. package/box/Box.d.ts +0 -4
  39. package/box/Box.js +0 -126
  40. package/box/Box.stories.tsx +0 -132
  41. package/box/Box.test.js +0 -18
  42. package/box/types.d.ts +0 -43
  43. package/box/types.js +0 -5
  44. package/button/Button.d.ts +0 -4
  45. package/button/Button.js +0 -171
  46. package/button/Button.stories.tsx +0 -274
  47. package/button/Button.test.js +0 -35
  48. package/button/types.d.ts +0 -53
  49. package/button/types.js +0 -5
  50. package/card/Card.d.ts +0 -4
  51. package/card/Card.js +0 -164
  52. package/card/Card.stories.tsx +0 -201
  53. package/card/Card.test.js +0 -50
  54. package/card/ice-cream.jpg +0 -0
  55. package/card/types.d.ts +0 -67
  56. package/card/types.js +0 -5
  57. package/checkbox/Checkbox.d.ts +0 -4
  58. package/checkbox/Checkbox.js +0 -247
  59. package/checkbox/Checkbox.stories.tsx +0 -192
  60. package/checkbox/Checkbox.test.js +0 -78
  61. package/checkbox/types.d.ts +0 -64
  62. package/checkbox/types.js +0 -5
  63. package/chip/Chip.d.ts +0 -4
  64. package/chip/Chip.js +0 -161
  65. package/chip/Chip.stories.tsx +0 -119
  66. package/chip/Chip.test.js +0 -56
  67. package/chip/types.d.ts +0 -45
  68. package/chip/types.js +0 -5
  69. package/common/OpenSans.css +0 -81
  70. package/common/RequiredComponent.js +0 -32
  71. package/common/fonts/OpenSans-Bold.ttf +0 -0
  72. package/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  73. package/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  74. package/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  75. package/common/fonts/OpenSans-Italic.ttf +0 -0
  76. package/common/fonts/OpenSans-Light.ttf +0 -0
  77. package/common/fonts/OpenSans-LightItalic.ttf +0 -0
  78. package/common/fonts/OpenSans-Regular.ttf +0 -0
  79. package/common/fonts/OpenSans-SemiBold.ttf +0 -0
  80. package/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  81. package/common/utils.js +0 -22
  82. package/common/variables.js +0 -1372
  83. package/date-input/DateInput.d.ts +0 -4
  84. package/date-input/DateInput.js +0 -369
  85. package/date-input/DateInput.stories.tsx +0 -138
  86. package/date-input/DateInput.test.js +0 -479
  87. package/date-input/types.d.ts +0 -107
  88. package/date-input/types.js +0 -5
  89. package/dialog/Dialog.d.ts +0 -4
  90. package/dialog/Dialog.js +0 -138
  91. package/dialog/Dialog.stories.tsx +0 -212
  92. package/dialog/Dialog.test.js +0 -40
  93. package/dialog/types.d.ts +0 -43
  94. package/dialog/types.js +0 -5
  95. package/dropdown/Dropdown.d.ts +0 -4
  96. package/dropdown/Dropdown.js +0 -395
  97. package/dropdown/Dropdown.stories.tsx +0 -249
  98. package/dropdown/Dropdown.test.js +0 -189
  99. package/dropdown/types.d.ts +0 -80
  100. package/dropdown/types.js +0 -5
  101. package/file-input/FileInput.d.ts +0 -4
  102. package/file-input/FileInput.js +0 -590
  103. package/file-input/FileInput.stories.tsx +0 -507
  104. package/file-input/FileInput.test.js +0 -457
  105. package/file-input/FileItem.d.ts +0 -14
  106. package/file-input/FileItem.js +0 -184
  107. package/file-input/types.d.ts +0 -112
  108. package/file-input/types.js +0 -5
  109. package/footer/Footer.d.ts +0 -4
  110. package/footer/Footer.js +0 -183
  111. package/footer/Footer.stories.tsx +0 -130
  112. package/footer/Footer.test.js +0 -109
  113. package/footer/Icons.d.ts +0 -2
  114. package/footer/Icons.js +0 -77
  115. package/footer/types.d.ts +0 -65
  116. package/footer/types.js +0 -5
  117. package/header/Header.d.ts +0 -7
  118. package/header/Header.js +0 -300
  119. package/header/Header.stories.tsx +0 -172
  120. package/header/Header.test.js +0 -79
  121. package/header/Icons.d.ts +0 -2
  122. package/header/Icons.js +0 -34
  123. package/header/types.d.ts +0 -47
  124. package/header/types.js +0 -5
  125. package/heading/Heading.d.ts +0 -4
  126. package/heading/Heading.js +0 -159
  127. package/heading/Heading.stories.tsx +0 -54
  128. package/heading/Heading.test.js +0 -186
  129. package/heading/types.d.ts +0 -33
  130. package/heading/types.js +0 -5
  131. package/inset/Inset.d.ts +0 -3
  132. package/inset/Inset.js +0 -84
  133. package/inset/Inset.stories.tsx +0 -229
  134. package/inset/types.d.ts +0 -37
  135. package/inset/types.js +0 -5
  136. package/layout/ApplicationLayout.d.ts +0 -10
  137. package/layout/ApplicationLayout.js +0 -218
  138. package/layout/ApplicationLayout.stories.tsx +0 -171
  139. package/layout/Icons.js +0 -55
  140. package/layout/types.d.ts +0 -57
  141. package/layout/types.js +0 -5
  142. package/link/Link.d.ts +0 -3
  143. package/link/Link.js +0 -153
  144. package/link/Link.stories.tsx +0 -151
  145. package/link/Link.test.js +0 -91
  146. package/link/types.d.ts +0 -70
  147. package/link/types.js +0 -5
  148. package/list/List.d.ts +0 -4
  149. package/list/List.js +0 -47
  150. package/list/List.stories.tsx +0 -95
  151. package/list/types.d.ts +0 -7
  152. package/list/types.js +0 -5
  153. package/main.d.ts +0 -47
  154. package/main.js +0 -387
  155. package/number-input/NumberInput.d.ts +0 -4
  156. package/number-input/NumberInput.js +0 -76
  157. package/number-input/NumberInput.stories.tsx +0 -115
  158. package/number-input/NumberInput.test.js +0 -506
  159. package/number-input/NumberInputContext.d.ts +0 -4
  160. package/number-input/NumberInputContext.js +0 -19
  161. package/number-input/numberInputContextTypes.d.ts +0 -19
  162. package/number-input/numberInputContextTypes.js +0 -5
  163. package/number-input/types.d.ts +0 -124
  164. package/number-input/types.js +0 -5
  165. package/paginator/Icons.js +0 -66
  166. package/paginator/Paginator.d.ts +0 -4
  167. package/paginator/Paginator.js +0 -192
  168. package/paginator/Paginator.stories.tsx +0 -63
  169. package/paginator/Paginator.test.js +0 -266
  170. package/paginator/types.d.ts +0 -38
  171. package/paginator/types.js +0 -5
  172. package/password-input/PasswordInput.d.ts +0 -4
  173. package/password-input/PasswordInput.js +0 -163
  174. package/password-input/PasswordInput.stories.tsx +0 -131
  175. package/password-input/PasswordInput.test.js +0 -181
  176. package/password-input/types.d.ts +0 -110
  177. package/password-input/types.js +0 -5
  178. package/progress-bar/ProgressBar.d.ts +0 -4
  179. package/progress-bar/ProgressBar.js +0 -170
  180. package/progress-bar/ProgressBar.stories.jsx +0 -58
  181. package/progress-bar/ProgressBar.test.js +0 -65
  182. package/progress-bar/types.d.ts +0 -37
  183. package/progress-bar/types.js +0 -5
  184. package/quick-nav/QuickNav.d.ts +0 -4
  185. package/quick-nav/QuickNav.js +0 -66
  186. package/quick-nav/QuickNav.stories.tsx +0 -237
  187. package/quick-nav/types.d.ts +0 -21
  188. package/quick-nav/types.js +0 -5
  189. package/radio/Radio.d.ts +0 -4
  190. package/radio/Radio.js +0 -174
  191. package/radio/Radio.stories.tsx +0 -192
  192. package/radio/Radio.test.js +0 -71
  193. package/radio/types.d.ts +0 -54
  194. package/radio/types.js +0 -5
  195. package/radio-group/Radio.d.ts +0 -4
  196. package/radio-group/Radio.js +0 -141
  197. package/radio-group/RadioGroup.d.ts +0 -4
  198. package/radio-group/RadioGroup.js +0 -280
  199. package/radio-group/RadioGroup.stories.tsx +0 -100
  200. package/radio-group/RadioGroup.test.js +0 -695
  201. package/radio-group/types.d.ts +0 -114
  202. package/radio-group/types.js +0 -5
  203. package/resultsetTable/ResultsetTable.d.ts +0 -4
  204. package/resultsetTable/ResultsetTable.js +0 -254
  205. package/resultsetTable/ResultsetTable.stories.tsx +0 -275
  206. package/resultsetTable/ResultsetTable.test.js +0 -306
  207. package/resultsetTable/types.d.ts +0 -67
  208. package/resultsetTable/types.js +0 -5
  209. package/row/Row.d.ts +0 -3
  210. package/row/Row.js +0 -127
  211. package/row/Row.stories.tsx +0 -237
  212. package/row/types.d.ts +0 -28
  213. package/row/types.js +0 -5
  214. package/select/Icons.d.ts +0 -10
  215. package/select/Icons.js +0 -93
  216. package/select/Option.d.ts +0 -4
  217. package/select/Option.js +0 -110
  218. package/select/Select.d.ts +0 -4
  219. package/select/Select.js +0 -732
  220. package/select/Select.stories.tsx +0 -582
  221. package/select/Select.test.js +0 -2057
  222. package/select/types.d.ts +0 -194
  223. package/select/types.js +0 -5
  224. package/sidenav/Sidenav.d.ts +0 -9
  225. package/sidenav/Sidenav.js +0 -136
  226. package/sidenav/Sidenav.stories.tsx +0 -182
  227. package/sidenav/Sidenav.test.js +0 -56
  228. package/sidenav/types.d.ts +0 -50
  229. package/sidenav/types.js +0 -5
  230. package/slider/Slider.d.ts +0 -4
  231. package/slider/Slider.js +0 -318
  232. package/slider/Slider.stories.tsx +0 -177
  233. package/slider/Slider.test.js +0 -150
  234. package/slider/types.d.ts +0 -82
  235. package/slider/types.js +0 -5
  236. package/spinner/Spinner.d.ts +0 -4
  237. package/spinner/Spinner.js +0 -250
  238. package/spinner/Spinner.stories.jsx +0 -103
  239. package/spinner/Spinner.test.js +0 -64
  240. package/spinner/types.d.ts +0 -32
  241. package/spinner/types.js +0 -5
  242. package/stack/Stack.d.ts +0 -3
  243. package/stack/Stack.js +0 -97
  244. package/stack/Stack.stories.tsx +0 -164
  245. package/stack/types.d.ts +0 -24
  246. package/stack/types.js +0 -5
  247. package/switch/Switch.d.ts +0 -4
  248. package/switch/Switch.js +0 -192
  249. package/switch/Switch.stories.tsx +0 -160
  250. package/switch/Switch.test.js +0 -98
  251. package/switch/types.d.ts +0 -62
  252. package/switch/types.js +0 -5
  253. package/table/Table.d.ts +0 -4
  254. package/table/Table.js +0 -118
  255. package/table/Table.stories.jsx +0 -277
  256. package/table/Table.test.js +0 -26
  257. package/table/types.d.ts +0 -21
  258. package/table/types.js +0 -5
  259. package/tabs/Tabs.d.ts +0 -4
  260. package/tabs/Tabs.js +0 -211
  261. package/tabs/Tabs.stories.tsx +0 -118
  262. package/tabs/Tabs.test.js +0 -140
  263. package/tabs/types.d.ts +0 -82
  264. package/tabs/types.js +0 -5
  265. package/tag/Tag.d.ts +0 -4
  266. package/tag/Tag.js +0 -186
  267. package/tag/Tag.stories.tsx +0 -142
  268. package/tag/Tag.test.js +0 -60
  269. package/tag/types.d.ts +0 -69
  270. package/tag/types.js +0 -5
  271. package/text/Text.d.ts +0 -7
  272. package/text/Text.js +0 -30
  273. package/text/Text.stories.tsx +0 -19
  274. package/text-input/TextInput.d.ts +0 -4
  275. package/text-input/TextInput.js +0 -796
  276. package/text-input/TextInput.stories.tsx +0 -474
  277. package/text-input/TextInput.test.js +0 -1712
  278. package/text-input/types.d.ts +0 -166
  279. package/text-input/types.js +0 -5
  280. package/textarea/Textarea.d.ts +0 -4
  281. package/textarea/Textarea.js +0 -286
  282. package/textarea/Textarea.stories.jsx +0 -157
  283. package/textarea/Textarea.test.js +0 -437
  284. package/textarea/types.d.ts +0 -137
  285. package/textarea/types.js +0 -5
  286. package/toggle-group/ToggleGroup.d.ts +0 -4
  287. package/toggle-group/ToggleGroup.js +0 -215
  288. package/toggle-group/ToggleGroup.stories.tsx +0 -173
  289. package/toggle-group/ToggleGroup.test.js +0 -156
  290. package/toggle-group/types.d.ts +0 -105
  291. package/toggle-group/types.js +0 -5
  292. package/useTheme.d.ts +0 -2
  293. package/useTheme.js +0 -22
  294. package/wizard/Wizard.d.ts +0 -4
  295. package/wizard/Wizard.js +0 -286
  296. package/wizard/Wizard.stories.tsx +0 -214
  297. package/wizard/Wizard.test.js +0 -141
  298. package/wizard/types.d.ts +0 -64
  299. package/wizard/types.js +0 -5
@@ -1,66 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = void 0;
9
-
10
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
-
12
- var _react = _interopRequireDefault(require("react"));
13
-
14
- var _styledComponents = _interopRequireDefault(require("styled-components"));
15
-
16
- var _slugify = _interopRequireDefault(require("slugify"));
17
-
18
- var _Heading = _interopRequireDefault(require("../heading/Heading"));
19
-
20
- var _Stack = _interopRequireDefault(require("../stack/Stack"));
21
-
22
- var _Inset = _interopRequireDefault(require("../inset/Inset"));
23
-
24
- var _templateObject, _templateObject2;
25
-
26
- var DxcQuickNav = function DxcQuickNav(_ref) {
27
- var title = _ref.title,
28
- links = _ref.links;
29
- return /*#__PURE__*/_react["default"].createElement(QuickNavContainer, null, /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
30
- gutter: "small"
31
- }, /*#__PURE__*/_react["default"].createElement(_Heading["default"], {
32
- level: 4,
33
- text: title
34
- }), /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
35
- gutter: "xsmall"
36
- }, links.map(function (link) {
37
- var _link$links;
38
-
39
- return /*#__PURE__*/_react["default"].createElement(_Inset["default"], {
40
- space: "xxsmall"
41
- }, /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
42
- gutter: "xsmall"
43
- }, /*#__PURE__*/_react["default"].createElement(Link, {
44
- href: "#".concat((0, _slugify["default"])(link === null || link === void 0 ? void 0 : link.label, {
45
- lower: true
46
- }))
47
- }, link === null || link === void 0 ? void 0 : link.label), (_link$links = link.links) === null || _link$links === void 0 ? void 0 : _link$links.map(function (sublink) {
48
- return /*#__PURE__*/_react["default"].createElement(_Inset["default"], {
49
- horizontal: "xsmall"
50
- }, /*#__PURE__*/_react["default"].createElement(_Stack["default"], {
51
- gutter: "xsmall"
52
- }, /*#__PURE__*/_react["default"].createElement(Link, {
53
- href: "#".concat((0, _slugify["default"])(sublink === null || sublink === void 0 ? void 0 : sublink.label, {
54
- lower: true
55
- }))
56
- }, sublink === null || sublink === void 0 ? void 0 : sublink.label)));
57
- })));
58
- }))));
59
- };
60
-
61
- var QuickNavContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n padding: 5px 15px;\n border-left: 2px solid #bfbfbf;\n"])));
62
-
63
- var Link = _styledComponents["default"].a(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n text-decoration: none;\n font-size: 14px;\n color: #666666;\n &:hover {\n color: #ab63cf;\n }\n &:focus {\n border-radius: 2px;\n border-color: #0095ff;\n }\n"])));
64
-
65
- var _default = DxcQuickNav;
66
- exports["default"] = _default;
@@ -1,237 +0,0 @@
1
- import React from "react";
2
- import styled from "styled-components";
3
- import DxcQuickNav from "./QuickNav";
4
- import DxcHeading from "../heading/Heading";
5
- import DxcText from "../text/Text";
6
- import Title from "../../.storybook/components/Title";
7
- import ExampleContainer from "../../.storybook/components/ExampleContainer";
8
-
9
- export default {
10
- title: "QuickNav",
11
- component: DxcQuickNav,
12
- };
13
-
14
- const links = [
15
- {
16
- label: "Overview",
17
- id: "overview",
18
- links: [
19
- {
20
- label: "Introduction",
21
- id: "introduction",
22
- },
23
- ],
24
- },
25
- {
26
- label: "Principles",
27
- id: "principles",
28
- links: [
29
- { label: "Color", id: "color" },
30
- { label: "Spacing", id: "spacing" },
31
- { label: "Typography", id: "typography" },
32
- ],
33
- },
34
- ];
35
-
36
- export const Chromatic = () => (
37
- <>
38
- <ExampleContainer>
39
- <Title title="Default" level={4} />
40
- <QuickNavContainer>
41
- <DxcQuickNav title="Sections" links={links}></DxcQuickNav>
42
- </QuickNavContainer>
43
- </ExampleContainer>
44
- <ExampleContainer pseudoState="pseudo-hover">
45
- <Title title="Link hovered" level={4} />
46
- <QuickNavContainer>
47
- <DxcQuickNav title="Sections" links={links}></DxcQuickNav>
48
- </QuickNavContainer>
49
- </ExampleContainer>
50
- <ExampleContainer>
51
- <Title title="QuickNav with content" level={4} />
52
- <Container>
53
- <ContentContainer>
54
- <Content id="overview">
55
- <DxcHeading level={1} text="Overview" margin={{ bottom: "small" }} />
56
- <DxcText>
57
- Halstack is the DXC Technology's open source design system for insurance products and digital experiences.
58
- Our system provides all the tools and resources needed to create superior, beautiful but above all,
59
- functional user experiences. Halstack is the DXC Technology's open source design system for insurance
60
- products and digital experiences. Our system provides all the tools and resources needed to create
61
- superior, beautiful but above all, functional user experiences.Halstack is the DXC Technology's open
62
- source design system for insurance products and digital experiences. Our system provides all the tools and
63
- resources needed to create superior, beautiful but above all, functional user experiences.Halstack is the
64
- DXC Technology's open source design system for insurance products and digital experiences. Our system
65
- provides all the tools and resources needed to create superior, beautiful but above all, functional user
66
- experiences.Halstack is the DXC Technology's open source design system for insurance products and digital
67
- experiences. Our system provides all the tools and resources needed to create superior, beautiful but
68
- above all, functional user experiences.Halstack is the DXC Technology's open source design system for
69
- insurance products and digital experiences. Our system provides all the tools and resources needed to
70
- create superior, beautiful but above all, functional user experiences.Halstack is the DXC Technology's
71
- open source design system for insurance products and digital experiences. Our system provides all the
72
- tools and resources needed to create superior, beautiful but above all, functional user experiences.
73
- </DxcText>
74
- <Content id="introduction">
75
- <DxcHeading level={2} text="Introduction" margin={{ top: "xsmall", bottom: "xsmall" }} />
76
- <DxcText>
77
- Design principles Halstack design principles are the fundamental part of DXC Technology's approach to
78
- provide guidance for development teams in order to deliver delightful and consistent user experiences to
79
- our customers: Balance Consistency Visual hierarchy All our components, design tokens, accessibility
80
- guidelines, responsive design techniques, and layout proposals have been carefully curated by DXC design
81
- and engineering teams with the objective of creating a unique visual language and ecosystem for our
82
- applications. This is the DXC way of creating User Experiences. Open Source Halstack is an open source
83
- design system, this means that we work towards DXC Technology bussines needs, but it is open for anyone
84
- to use and contribute back to. We are charmed to receive external contributions to help us find bugs,
85
- design new features, or help us improve the project documentation. If you're interested, definitely
86
- check out our contribution guidelines.Design principles Halstack design principles are the fundamental
87
- part of DXC Technology's approach to provide guidance for development teams in order to deliver
88
- delightful and consistent user experiences to our customers: Balance Consistency Visual hierarchy All
89
- our components, design tokens, accessibility guidelines, responsive design techniques, and layout
90
- proposals have been carefully curated by DXC design and engineering teams with the objective of creating
91
- a unique visual language and ecosystem for our applications. This is the DXC way of creating User
92
- Experiences. Open Source Halstack is an open source design system, this means that we work towards DXC
93
- Technology bussines needs, but it is open for anyone to use and contribute back to. We are charmed to
94
- receive external contributions to help us find bugs, design new features, or help us improve the project
95
- documentation. If you're interested, definitely check out our contribution guidelines.Design principles
96
- Halstack design principles are the fundamental part of DXC Technology's approach to provide guidance for
97
- development teams in order to deliver delightful and consistent user experiences to our customers:
98
- Balance Consistency Visual hierarchy All our components, design tokens, accessibility guidelines,
99
- responsive design techniques, and layout proposals have been carefully curated by DXC design and
100
- engineering teams with the objective of creating a unique visual language and ecosystem for our
101
- applications. This is the DXC way of creating User Experiences. Open Source Halstack is an open source
102
- design system, this means that we work towards DXC Technology bussines needs, but it is open for anyone
103
- to use and contribute back to. We are charmed to receive external contributions to help us find bugs,
104
- design new features, or help us improve the project documentation. If you're interested, definitely
105
- check out our contribution guidelines.
106
- </DxcText>
107
- </Content>
108
- </Content>
109
- <Content id="principles">
110
- <DxcHeading level={1} text="Principles" margin={{ top: "small", bottom: "xsmall" }} />
111
- <Content id="color">
112
- <DxcHeading level={2} text="Color" margin={{ top: "xsmall", bottom: "xsmall" }} />
113
- <DxcText>
114
- The color palette is an essential asset as a communication resource of our design system. Halstack color
115
- palette brings a unified consistency and helps in guiding the user's perception order. Our color palette
116
- is based in the HSL model . All our color families are calculated using the lightness value of the
117
- standard DXC palette colors. Color Tokens Halstack uses tokens to manage color. Appart from a
118
- multi-purpose greyscale family, purple and blue are the core color families used in our set of
119
- components. Additional families as red, green and yellow help as feedback role-based color palettes and
120
- must not be used outside this context.The color palette is an essential asset as a communication
121
- resource of our design system. Halstack color palette brings a unified consistency and helps in guiding
122
- the user's perception order. Our color palette is based in the HSL model . All our color families are
123
- calculated using the lightness value of the standard DXC palette colors. Color Tokens Halstack uses
124
- tokens to manage color. Appart from a multi-purpose greyscale family, purple and blue are the core color
125
- families used in our set of components. Additional families as red, green and yellow help as feedback
126
- role-based color palettes and must not be used outside this context.The color palette is an essential
127
- asset as a communication resource of our design system. Halstack color palette brings a unified
128
- consistency and helps in guiding the user's perception order. Our color palette is based in the HSL
129
- model . All our color families are calculated using the lightness value of the standard DXC palette
130
- colors. Color Tokens Halstack uses tokens to manage color. Appart from a multi-purpose greyscale family,
131
- purple and blue are the core color families used in our set of components. Additional families as red,
132
- green and yellow help as feedback role-based color palettes and must not be used outside this
133
- context.The color palette is an essential asset as a communication resource of our design system.
134
- Halstack color palette brings a unified consistency and helps in guiding the user's perception order.
135
- Our color palette is based in the HSL model . All our color families are calculated using the lightness
136
- value of the standard DXC palette colors. Color Tokens Halstack uses tokens to manage color. Appart from
137
- a multi-purpose greyscale family, purple and blue are the core color families used in our set of
138
- components. Additional families as red, green and yellow help as feedback role-based color palettes and
139
- must not be used outside this context.The color palette is an essential asset as a communication
140
- resource of our design system. Halstack color palette brings a unified consistency and helps in guiding
141
- the user's perception order. Our color palette is based in the HSL model . All our color families are
142
- calculated using the lightness value of the standard DXC palette colors. Color Tokens Halstack uses
143
- tokens to manage color. Appart from a multi-purpose greyscale family, purple and blue are the core color
144
- families used in our set of components. Additional families as red, green and yellow help as feedback
145
- role-based color palettes and must not be used outside this context.
146
- </DxcText>
147
- </Content>
148
- <Content id="spacing">
149
- <DxcHeading level={2} text="Spacing" margin={{ top: "xsmall", bottom: "xsmall" }} />
150
- <DxcText>
151
- In the search of consistent alignment between the elements we provide a spacing scale based on a root
152
- values of 8px and 4px. The numbers 4 and 8 are easily multiplied, they provide flexible and consistent,
153
- yet distinct enough, steps between them.In the search of consistent alignment between the elements we
154
- provide a spacing scale based on a root values of 8px and 4px. The numbers 4 and 8 are easily
155
- multiplied, they provide flexible and consistent, yet distinct enough, steps between them.In the search
156
- of consistent alignment between the elements we provide a spacing scale based on a root values of 8px
157
- and 4px. The numbers 4 and 8 are easily multiplied, they provide flexible and consistent, yet distinct
158
- enough, steps between them.In the search of consistent alignment between the elements we provide a
159
- spacing scale based on a root values of 8px and 4px. The numbers 4 and 8 are easily multiplied, they
160
- provide flexible and consistent, yet distinct enough, steps between them.In the search of consistent
161
- alignment between the elements we provide a spacing scale based on a root values of 8px and 4px. The
162
- numbers 4 and 8 are easily multiplied, they provide flexible and consistent, yet distinct enough, steps
163
- between them.In the search of consistent alignment between the elements we provide a spacing scale based
164
- on a root values of 8px and 4px. The numbers 4 and 8 are easily multiplied, they provide flexible and
165
- consistent, yet distinct enough, steps between them.In the search of consistent alignment between the
166
- elements we provide a spacing scale based on a root values of 8px and 4px. The numbers 4 and 8 are
167
- easily multiplied, they provide flexible and consistent, yet distinct enough, steps between them.
168
- </DxcText>
169
- </Content>
170
- <Content id="typography">
171
- <DxcHeading level={2} text="Typography" margin={{ top: "xsmall", bottom: "xsmall" }} />
172
- <DxcText>
173
- Our selected typography helps in structuring our user's experience based on the visual impact that it
174
- has on the user interface content. It defines what is the first noticeable piece of information or data
175
- based on the font shape, size, color, or type and it highlights some pieces of text over the rest. Some
176
- typographic elements used in Halstack Design System include headers, body, taglines, captions, and
177
- labels. Make sure you include all the different typographic variants in order to enhance the
178
- application's content structure, including the Heading component which defines different levels of page
179
- and section titles.Our selected typography helps in structuring our user's experience based on the
180
- visual impact that it has on the user interface content. It defines what is the first noticeable piece
181
- of information or data based on the font shape, size, color, or type and it highlights some pieces of
182
- text over the rest. Some typographic elements used in Halstack Design System include headers, body,
183
- taglines, captions, and labels. Make sure you include all the different typographic variants in order to
184
- enhance the application's content structure, including the Heading component which defines different
185
- levels of page and section titles.Our selected typography helps in structuring our user's experience
186
- based on the visual impact that it has on the user interface content. It defines what is the first
187
- noticeable piece of information or data based on the font shape, size, color, or type and it highlights
188
- some pieces of text over the rest. Some typographic elements used in Halstack Design System include
189
- headers, body, taglines, captions, and labels. Make sure you include all the different typographic
190
- variants in order to enhance the application's content structure, including the Heading component which
191
- defines different levels of page and section titles.Our selected typography helps in structuring our
192
- user's experience based on the visual impact that it has on the user interface content. It defines what
193
- is the first noticeable piece of information or data based on the font shape, size, color, or type and
194
- it highlights some pieces of text over the rest. Some typographic elements used in Halstack Design
195
- System include headers, body, taglines, captions, and labels. Make sure you include all the different
196
- typographic variants in order to enhance the application's content structure, including the Heading
197
- component which defines different levels of page and section titles.Our selected typography helps in
198
- structuring our user's experience based on the visual impact that it has on the user interface content.
199
- It defines what is the first noticeable piece of information or data based on the font shape, size,
200
- color, or type and it highlights some pieces of text over the rest. Some typographic elements used in
201
- Halstack Design System include headers, body, taglines, captions, and labels. Make sure you include all
202
- the different typographic variants in order to enhance the application's content structure, including
203
- the Heading component which defines different levels of page and section titles.
204
- </DxcText>
205
- </Content>
206
- </Content>
207
- </ContentContainer>
208
- <QuickNavContainer>
209
- <DxcQuickNav title="Sections" links={links}></DxcQuickNav>
210
- </QuickNavContainer>
211
- </Container>
212
- </ExampleContainer>
213
- </>
214
- );
215
-
216
- const Container = styled.div`
217
- display: flex;
218
- flex-direction: row;
219
- width: 100%;
220
- `;
221
-
222
- const ContentContainer = styled.div`
223
- display: flex;
224
- flex-direction: column;
225
- padding: 60px;
226
- margin: 0 auto;
227
- width: 800px;
228
- `;
229
-
230
- const Content = styled.div``;
231
-
232
- const QuickNavContainer = styled.div`
233
- max-height: calc(100vh - 100px);
234
- position: sticky;
235
- top: 100px;
236
- width: 300px;
237
- `;
@@ -1,21 +0,0 @@
1
- declare type Props = {
2
- /**
3
- * Title of the quick nav component.
4
- */
5
- title: string;
6
- /**
7
- * Links to be shown inside the quick nav component.
8
- */
9
- links: Link[];
10
- };
11
- declare type Link = {
12
- /**
13
- * Label to be shown in the link.
14
- */
15
- label: string;
16
- /**
17
- * Sublinks of the link.
18
- */
19
- links?: Link[];
20
- };
21
- export default Props;
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
package/radio/Radio.d.ts DELETED
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import RadioPropsType from "./types";
3
- declare const DxcRadio: ({ checked, value, label, labelPosition, name, disabled, onClick, required, margin, size, }: RadioPropsType) => JSX.Element;
4
- export default DxcRadio;
package/radio/Radio.js DELETED
@@ -1,174 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- var _typeof3 = require("@babel/runtime/helpers/typeof");
6
-
7
- Object.defineProperty(exports, "__esModule", {
8
- value: true
9
- });
10
- exports["default"] = void 0;
11
-
12
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
13
-
14
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
15
-
16
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
17
-
18
- var _react = _interopRequireWildcard(require("react"));
19
-
20
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
21
-
22
- var _Radio = _interopRequireDefault(require("@material-ui/core/Radio"));
23
-
24
- var _RequiredComponent = _interopRequireDefault(require("../common/RequiredComponent"));
25
-
26
- var _variables = require("../common/variables.js");
27
-
28
- var _utils = require("../common/utils.js");
29
-
30
- var _useTheme = _interopRequireDefault(require("../useTheme"));
31
-
32
- var _BackgroundColorContext = _interopRequireDefault(require("../BackgroundColorContext"));
33
-
34
- var _templateObject, _templateObject2;
35
-
36
- 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); }
37
-
38
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(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; }
39
-
40
- var DxcRadio = function DxcRadio(_ref) {
41
- var _ref$checked = _ref.checked,
42
- checked = _ref$checked === void 0 ? false : _ref$checked,
43
- value = _ref.value,
44
- _ref$label = _ref.label,
45
- label = _ref$label === void 0 ? "" : _ref$label,
46
- _ref$labelPosition = _ref.labelPosition,
47
- labelPosition = _ref$labelPosition === void 0 ? "before" : _ref$labelPosition,
48
- name = _ref.name,
49
- _ref$disabled = _ref.disabled,
50
- disabled = _ref$disabled === void 0 ? false : _ref$disabled,
51
- onClick = _ref.onClick,
52
- _ref$required = _ref.required,
53
- required = _ref$required === void 0 ? false : _ref$required,
54
- margin = _ref.margin,
55
- _ref$size = _ref.size,
56
- size = _ref$size === void 0 ? "fitContent" : _ref$size;
57
-
58
- var _useState = (0, _react.useState)(false),
59
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
60
- innerChecked = _useState2[0],
61
- setInnerChecked = _useState2[1];
62
-
63
- var colorsTheme = (0, _useTheme["default"])();
64
- var backgroundType = (0, _react.useContext)(_BackgroundColorContext["default"]);
65
-
66
- var handlerRadioChange = function handlerRadioChange() {
67
- if (checked == null) {
68
- setInnerChecked(true);
69
- }
70
-
71
- if (typeof onClick === "function") {
72
- onClick(true);
73
- }
74
- };
75
-
76
- return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
77
- theme: colorsTheme.radio
78
- }, /*#__PURE__*/_react["default"].createElement(RadioContainer, {
79
- id: name,
80
- labelPosition: labelPosition,
81
- disabled: disabled,
82
- margin: margin,
83
- size: size,
84
- backgroundType: backgroundType
85
- }, /*#__PURE__*/_react["default"].createElement(_Radio["default"], {
86
- checked: checked != null && checked || innerChecked,
87
- name: name,
88
- onClick: handlerRadioChange,
89
- value: value,
90
- disabled: disabled,
91
- disableRipple: true
92
- }), /*#__PURE__*/_react["default"].createElement(LabelContainer, {
93
- checked: checked || innerChecked,
94
- labelPosition: labelPosition,
95
- disabled: disabled,
96
- onClick: !disabled && handlerRadioChange || null,
97
- backgroundType: backgroundType
98
- }, required && /*#__PURE__*/_react["default"].createElement(_RequiredComponent["default"], null), label)));
99
- };
100
-
101
- var sizes = {
102
- small: "120px",
103
- medium: "240px",
104
- large: "480px",
105
- fillParent: "100%",
106
- fitContent: "unset"
107
- };
108
-
109
- var calculateWidth = function calculateWidth(margin, size) {
110
- if (size === "fillParent") {
111
- return "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
112
- }
113
-
114
- return sizes[size];
115
- };
116
-
117
- var RadioContainer = _styledComponents["default"].span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n\n display: inline-flex;\n align-items: center;\n max-height: 42px;\n position: relative;\n flex-direction: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n cursor: ", ";\n .MuiButtonBase-root {\n width: auto;\n height: auto;\n padding: 10px;\n margin: 2px;\n ", ": ", ";\n padding-left: ", ";\n padding-right: ", ";\n margin-left: ", ";\n margin-right: ", ";\n .MuiIconButton-label {\n .MuiSvgIcon-root {\n height: ", ";\n width: ", ";\n }\n color: ", ";\n\n > div > :nth-child(2) path {\n color: ", ";\n }\n }\n\n &.Mui-focusVisible {\n background-color: transparent;\n .MuiSvgIcon-root {\n outline: ", "\n auto 1px;\n }\n }\n :hover {\n background-color: transparent;\n }\n .MuiTouchRipple-ripple {\n height: 40px !important;\n width: 40px !important;\n top: 0px !important;\n left: 0px !important;\n }\n }\n .MuiRadio-colorSecondary.Mui-checked {\n color: ", ";\n :hover {\n background-color: transparent;\n }\n }\n"])), function (props) {
118
- return calculateWidth(props.margin, props.size);
119
- }, function (props) {
120
- return props.labelPosition === "before" ? "row-reverse" : "row";
121
- }, function (props) {
122
- return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
123
- }, function (props) {
124
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
125
- }, function (props) {
126
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
127
- }, function (props) {
128
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
129
- }, function (props) {
130
- return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
131
- }, function (props) {
132
- return props.disabled === true ? "not-allowed" : "default";
133
- }, function (props) {
134
- return props.labelPosition === "after" ? "padding-right" : "padding-left";
135
- }, function (props) {
136
- return props.theme.circleLabelSpacing;
137
- }, function (props) {
138
- return props.labelPosition === "after" ? "0px" : "";
139
- }, function (props) {
140
- return props.labelPosition === "before" ? "0px" : "";
141
- }, function (props) {
142
- return props.labelPosition === "after" ? "0px" : "";
143
- }, function (props) {
144
- return props.labelPosition === "before" ? "0px" : "";
145
- }, function (props) {
146
- return props.theme.circleSize;
147
- }, function (props) {
148
- return props.theme.circleSize;
149
- }, function (props) {
150
- return props.backgroundType === "dark" ? props.disabled && props.theme.disabledColorOnDark || props.theme.colorOnDark : props.disabled && props.theme.disabledColor || props.theme.color;
151
- }, function (props) {
152
- return props.backgroundType === "dark" ? props.disabled && props.theme.disabledColorOnDark || props.theme.colorOnDark : props.disabled && props.theme.disabledColor || props.theme.color;
153
- }, function (props) {
154
- return props.backgroundType === "dark" ? props.theme.focusColorOnDark : props.theme.focusColor;
155
- }, function (props) {
156
- return props.backgroundType === "dark" ? props.disabled && props.theme.disabledColorOnDark || props.theme.colorOnDark : props.disabled && props.theme.disabledColor || props.theme.color;
157
- });
158
-
159
- var LabelContainer = _styledComponents["default"].span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n font-style: ", ";\n color: ", ";\n cursor: ", ";\n"])), function (props) {
160
- return props.theme.fontFamily;
161
- }, function (props) {
162
- return props.theme.fontSize;
163
- }, function (props) {
164
- return props.theme.fontWeight;
165
- }, function (props) {
166
- return props.theme.fontStyle;
167
- }, function (props) {
168
- return props.backgroundType === "dark" ? props.disabled && props.theme.disabledFontColorOnDark || props.theme.fontColorOnDark : props.disabled && props.theme.disabledFontColor || props.theme.fontColor;
169
- }, function (props) {
170
- return props.disabled === true ? "not-allowed" : "pointer";
171
- });
172
-
173
- var _default = DxcRadio;
174
- exports["default"] = _default;