@dxc-technology/halstack-react 0.0.0-aa1e975 → 0.0.0-ab373ef

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 (193) hide show
  1. package/README.md +27 -47
  2. package/dist/index.d.mts +6643 -0
  3. package/dist/index.d.ts +6643 -0
  4. package/dist/index.js +1 -0
  5. package/dist/index.mjs +1 -0
  6. package/package.json +79 -68
  7. package/babel.config.js +0 -8
  8. package/dist/BackgroundColorContext.js +0 -46
  9. package/dist/ThemeContext.js +0 -248
  10. package/dist/accordion/Accordion.js +0 -353
  11. package/dist/accordion-group/AccordionGroup.js +0 -186
  12. package/dist/alert/Alert.js +0 -403
  13. package/dist/alert/index.d.ts +0 -51
  14. package/dist/badge/Badge.js +0 -63
  15. package/dist/box/Box.js +0 -156
  16. package/dist/button/Button.js +0 -238
  17. package/dist/card/Card.js +0 -254
  18. package/dist/checkbox/Checkbox.js +0 -300
  19. package/dist/checkbox/Checkbox.stories.js +0 -144
  20. package/dist/checkbox/readme.md +0 -116
  21. package/dist/chip/Chip.js +0 -265
  22. package/dist/common/OpenSans.css +0 -81
  23. package/dist/common/RequiredComponent.js +0 -40
  24. package/dist/common/fonts/OpenSans-Bold.ttf +0 -0
  25. package/dist/common/fonts/OpenSans-BoldItalic.ttf +0 -0
  26. package/dist/common/fonts/OpenSans-ExtraBold.ttf +0 -0
  27. package/dist/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  28. package/dist/common/fonts/OpenSans-Italic.ttf +0 -0
  29. package/dist/common/fonts/OpenSans-Light.ttf +0 -0
  30. package/dist/common/fonts/OpenSans-LightItalic.ttf +0 -0
  31. package/dist/common/fonts/OpenSans-Regular.ttf +0 -0
  32. package/dist/common/fonts/OpenSans-SemiBold.ttf +0 -0
  33. package/dist/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
  34. package/dist/common/utils.js +0 -22
  35. package/dist/common/variables.js +0 -1546
  36. package/dist/date/Date.js +0 -379
  37. package/dist/date/Date.stories.js +0 -205
  38. package/dist/date/readme.md +0 -73
  39. package/dist/dialog/Dialog.js +0 -218
  40. package/dist/dropdown/Dropdown.js +0 -544
  41. package/dist/file-input/FileInput.js +0 -644
  42. package/dist/file-input/FileItem.js +0 -280
  43. package/dist/file-input/index.d.ts +0 -81
  44. package/dist/footer/Footer.js +0 -395
  45. package/dist/footer/Footer.stories.js +0 -94
  46. package/dist/footer/dxc_logo.svg +0 -15
  47. package/dist/footer/readme.md +0 -41
  48. package/dist/header/Header.js +0 -403
  49. package/dist/header/Header.stories.js +0 -176
  50. package/dist/header/close_icon.svg +0 -1
  51. package/dist/header/dxc_logo_black.svg +0 -8
  52. package/dist/header/hamb_menu_black.svg +0 -1
  53. package/dist/header/hamb_menu_white.svg +0 -1
  54. package/dist/header/readme.md +0 -33
  55. package/dist/heading/Heading.js +0 -218
  56. package/dist/input-text/InputText.js +0 -707
  57. package/dist/input-text/InputText.stories.js +0 -209
  58. package/dist/input-text/error.svg +0 -1
  59. package/dist/input-text/readme.md +0 -91
  60. package/dist/layout/ApplicationLayout.js +0 -331
  61. package/dist/layout/facebook.svg +0 -45
  62. package/dist/layout/linkedin.svg +0 -50
  63. package/dist/layout/twitter.svg +0 -53
  64. package/dist/link/Link.js +0 -237
  65. package/dist/link/readme.md +0 -51
  66. package/dist/main.d.ts +0 -8
  67. package/dist/main.js +0 -367
  68. package/dist/new-date/NewDate.js +0 -400
  69. package/dist/new-date/index.d.ts +0 -95
  70. package/dist/new-input-text/NewInputText.js +0 -967
  71. package/dist/new-input-text/index.d.ts +0 -135
  72. package/dist/new-select/NewSelect.js +0 -836
  73. package/dist/new-select/index.d.ts +0 -53
  74. package/dist/new-textarea/NewTextarea.js +0 -365
  75. package/dist/new-textarea/index.d.ts +0 -117
  76. package/dist/number/Number.js +0 -136
  77. package/dist/number/NumberContext.js +0 -16
  78. package/dist/number/index.d.ts +0 -113
  79. package/dist/paginator/Paginator.js +0 -289
  80. package/dist/paginator/images/next.svg +0 -3
  81. package/dist/paginator/images/nextPage.svg +0 -3
  82. package/dist/paginator/images/previous.svg +0 -3
  83. package/dist/paginator/images/previousPage.svg +0 -3
  84. package/dist/paginator/readme.md +0 -50
  85. package/dist/password/Password.js +0 -200
  86. package/dist/password/index.d.ts +0 -94
  87. package/dist/password/styles.css +0 -3
  88. package/dist/progress-bar/ProgressBar.js +0 -242
  89. package/dist/progress-bar/ProgressBar.stories.js +0 -280
  90. package/dist/progress-bar/readme.md +0 -63
  91. package/dist/radio/Radio.js +0 -209
  92. package/dist/radio/Radio.stories.js +0 -166
  93. package/dist/radio/readme.md +0 -70
  94. package/dist/resultsetTable/ResultsetTable.js +0 -358
  95. package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
  96. package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
  97. package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
  98. package/dist/select/Select.js +0 -549
  99. package/dist/sidenav/Sidenav.js +0 -179
  100. package/dist/slider/Slider.js +0 -394
  101. package/dist/slider/Slider.stories.js +0 -241
  102. package/dist/slider/readme.md +0 -64
  103. package/dist/spinner/Spinner.js +0 -381
  104. package/dist/spinner/Spinner.stories.js +0 -183
  105. package/dist/spinner/readme.md +0 -65
  106. package/dist/switch/Switch.js +0 -222
  107. package/dist/switch/Switch.stories.js +0 -134
  108. package/dist/switch/readme.md +0 -133
  109. package/dist/table/Table.js +0 -132
  110. package/dist/tabs/Tabs.js +0 -343
  111. package/dist/tabs/Tabs.stories.js +0 -130
  112. package/dist/tabs/readme.md +0 -78
  113. package/dist/tabs-for-sections/TabsForSections.js +0 -92
  114. package/dist/tabs-for-sections/readme.md +0 -78
  115. package/dist/tag/Tag.js +0 -282
  116. package/dist/textarea/Textarea.js +0 -264
  117. package/dist/toggle/Toggle.js +0 -220
  118. package/dist/toggle/Toggle.stories.js +0 -297
  119. package/dist/toggle/readme.md +0 -80
  120. package/dist/toggle-group/ToggleGroup.js +0 -223
  121. package/dist/upload/Upload.js +0 -205
  122. package/dist/upload/Upload.stories.js +0 -72
  123. package/dist/upload/buttons-upload/ButtonsUpload.js +0 -139
  124. package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
  125. package/dist/upload/buttons-upload/upload-button.svg +0 -1
  126. package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -329
  127. package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
  128. package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
  129. package/dist/upload/file-upload/FileToUpload.js +0 -184
  130. package/dist/upload/file-upload/audio-icon.svg +0 -4
  131. package/dist/upload/file-upload/close.svg +0 -4
  132. package/dist/upload/file-upload/file-icon.svg +0 -4
  133. package/dist/upload/file-upload/video-icon.svg +0 -4
  134. package/dist/upload/files-upload/FilesToUpload.js +0 -123
  135. package/dist/upload/readme.md +0 -37
  136. package/dist/upload/transaction/Transaction.js +0 -175
  137. package/dist/upload/transaction/audio-icon-err.svg +0 -4
  138. package/dist/upload/transaction/audio-icon.svg +0 -4
  139. package/dist/upload/transaction/error-icon.svg +0 -4
  140. package/dist/upload/transaction/file-icon-err.svg +0 -4
  141. package/dist/upload/transaction/file-icon.svg +0 -4
  142. package/dist/upload/transaction/image-icon-err.svg +0 -4
  143. package/dist/upload/transaction/image-icon.svg +0 -4
  144. package/dist/upload/transaction/success-icon.svg +0 -4
  145. package/dist/upload/transaction/video-icon-err.svg +0 -4
  146. package/dist/upload/transaction/video-icon.svg +0 -4
  147. package/dist/upload/transactions/Transactions.js +0 -138
  148. package/dist/useTheme.js +0 -22
  149. package/dist/wizard/Wizard.js +0 -411
  150. package/dist/wizard/invalid_icon.svg +0 -5
  151. package/dist/wizard/valid_icon.svg +0 -5
  152. package/dist/wizard/validation-wrong.svg +0 -6
  153. package/test/Accordion.test.js +0 -33
  154. package/test/AccordionGroup.test.js +0 -125
  155. package/test/Alert.test.js +0 -53
  156. package/test/Box.test.js +0 -10
  157. package/test/Button.test.js +0 -18
  158. package/test/Card.test.js +0 -30
  159. package/test/Checkbox.test.js +0 -45
  160. package/test/Chip.test.js +0 -25
  161. package/test/Date.test.js +0 -393
  162. package/test/Dialog.test.js +0 -23
  163. package/test/Dropdown.test.js +0 -145
  164. package/test/FileInput.test.js +0 -201
  165. package/test/Footer.test.js +0 -99
  166. package/test/Header.test.js +0 -39
  167. package/test/Heading.test.js +0 -35
  168. package/test/InputText.test.js +0 -240
  169. package/test/Link.test.js +0 -43
  170. package/test/NewDate.test.js +0 -232
  171. package/test/NewInputText.test.js +0 -734
  172. package/test/NewTextarea.test.js +0 -195
  173. package/test/Number.test.js +0 -257
  174. package/test/Paginator.test.js +0 -177
  175. package/test/Password.test.js +0 -83
  176. package/test/ProgressBar.test.js +0 -35
  177. package/test/Radio.test.js +0 -37
  178. package/test/ResultsetTable.test.js +0 -329
  179. package/test/Select.test.js +0 -212
  180. package/test/Sidenav.test.js +0 -45
  181. package/test/Slider.test.js +0 -82
  182. package/test/Spinner.test.js +0 -32
  183. package/test/Switch.test.js +0 -45
  184. package/test/Table.test.js +0 -36
  185. package/test/Tabs.test.js +0 -109
  186. package/test/TabsForSections.test.js +0 -34
  187. package/test/Tag.test.js +0 -32
  188. package/test/TextArea.test.js +0 -52
  189. package/test/ToggleGroup.test.js +0 -81
  190. package/test/Upload.test.js +0 -60
  191. package/test/Wizard.test.js +0 -130
  192. package/test/mocks/pngMock.js +0 -1
  193. package/test/mocks/svgMock.js +0 -1
@@ -1,135 +0,0 @@
1
- type Size = "small" | "medium" | "large" | "fillParent";
2
- type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
3
- type Margin = {
4
- top?: Space;
5
- bottom?: Space;
6
- left?: Space;
7
- right?: Space;
8
- };
9
- type SVG = string | (HTMLElement & SVGElement);
10
- type Action = {
11
- onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
12
- icon: SVG;
13
- };
14
-
15
- type Props = {
16
- /**
17
- * Text to be placed above the input. This label will be used as the aria-label attribute of the list of suggestions.
18
- */
19
- label?: string;
20
- /**
21
- * Name attribute of the input element.
22
- */
23
- name?: string;
24
- /**
25
- * Value of the input. If undefined, the component will be uncontrolled and the value will be managed internally by the component.
26
- */
27
- value?: string;
28
- /**
29
- * Helper text to be placed above the input.
30
- */
31
- helperText?: string;
32
- /**
33
- * Text to be put as placeholder of the input.
34
- */
35
- placeholder?: string;
36
- /**
37
- * Action to be shown in the input. This is an object composed of an onClick function and an icon,
38
- * being the latter either an inline svg or a URL to the image.
39
- */
40
- action?: Action;
41
- /**
42
- * If true, the input will have an action to clear the entered value.
43
- */
44
- clearable?: boolean;
45
- /**
46
- * If true, the component will be disabled.
47
- */
48
- disabled?: boolean;
49
- /**
50
- * If true, the input will be optional, showing '(Optional)'
51
- * next to the label. Otherwise, the field will be considered required and an error will be
52
- * passed as a parameter to the OnBlur and onChange functions when it has
53
- * not been filled.
54
- */
55
- optional?: boolean;
56
- /**
57
- * Prefix to be placed before the input value.
58
- */
59
- prefix?: string;
60
- /**
61
- * Suffix to be placed after the input value.
62
- */
63
- suffix?: string;
64
- /**
65
- * This function will be called when the user types within the input
66
- * element of the component. An object including the current value and
67
- * the error (if the value entered is not valid) will be passed to this
68
- * function. If there is no error, error will be null.
69
- */
70
- onChange?: (val: { value: string; error: string }) => void;
71
- /**
72
- * This function will be called when the input element loses the focus.
73
- * An object including the input value and the error (if the value
74
- * entered is not valid) will be passed to this function. If there is no error,
75
- * error will be null.
76
- */
77
- onBlur?: (obj: { value: string; error: string }) => void;
78
- /**
79
- * If it is defined, the component will change its appearance, showing
80
- * the error below the input component. If it is not defined, the error
81
- * messages will be managed internally, but never displayed on its own.
82
- */
83
- error?: string;
84
- /**
85
- * These are the options to be displayed as suggestions. It can be either an array or a function:
86
- * - Array: Array of options that will be filtered by the component.
87
- * - Function: This function will be called when the user changes the value, we will send as a parameter the new value;
88
- * apart from that this function should return one promise on which we should make 'then' to get the suggestions filtered.
89
- */
90
- suggestions?: string[] | (() => void);
91
- /**
92
- * Regular expression that defines the valid format allowed by the input.
93
- * This will be checked both when the input element loses the focus and
94
- * while typing within it. If the string entered does not match the
95
- * pattern, the onBlur and onChange functions will be called with the
96
- * current value and an internal error informing that this value does not
97
- * match the pattern. If the pattern is met, the error parameter of both
98
- * events will be null.
99
- */
100
- pattern?: string;
101
- /**
102
- * Specifies the minimun and maximum length allowed by the input.
103
- * This will be checked both when the input element loses the
104
- * focus and while typing within it. If the string entered does not
105
- * comply the length, the onBlur and onChange functions will be called
106
- * with the current value and an internal error informing that the value
107
- * length does not comply the specified range. If a valid length is
108
- * reached, the error parameter of both events will be null.
109
- */
110
- length?: { min?: number; max?: number };
111
- /**
112
- * HTML autocomplete attribute. Lets the user specify if any permission the user agent has to provide automated assistance in filling out the input value.
113
- * Its value must be one of all the possible values of the HTML autocomplete attribute: 'on', 'off', 'email', 'username', 'new-password', ...
114
- */
115
- autocomplete?: string;
116
- /**
117
- * Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
118
- * You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
119
- */
120
- margin?: Space | Margin;
121
- /**
122
- * Size of the component ('small' | 'medium' | 'large' | 'fillParent').
123
- */
124
- size?: Size;
125
- /**
126
- * Value of the tabindex attribute.
127
- */
128
- tabIndex?: number;
129
- /**
130
- * Reference to the component.
131
- */
132
- ref?: React.RefObject<HTMLDivElement>;
133
- };
134
-
135
- export default function DxcNewInputText(props: Props): JSX.Element;