@hyphen/hyphen-components 2.11.3 → 2.11.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyphen/hyphen-components",
3
- "version": "2.11.3",
3
+ "version": "2.11.5",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "@hyphen"
@@ -11,9 +11,4 @@
11
11
  &.disabled {
12
12
  color: var(--color-base-grey-300);
13
13
  }
14
-
15
- .help-text {
16
- margin-top: var(--INTERNAL_form-control-help-margin);
17
- font-weight: var(--INTERNAL_form-control-help-font-weight);
18
- }
19
14
  }
@@ -2,6 +2,7 @@ import React, { FC, ReactNode } from 'react';
2
2
  import classNames from 'classnames';
3
3
  import { Box, BoxProps } from '../Box/Box';
4
4
  import styles from './FormLabel.module.scss';
5
+ import { HelpText } from '../HelpText/HelpText';
5
6
 
6
7
  export interface FormLabelProps extends BoxProps {
7
8
  /**
@@ -80,17 +81,7 @@ export const FormLabel: FC<FormLabelProps> = ({
80
81
  >
81
82
  {children}
82
83
  {isFieldRequired && requiredIndicator && <span>{requiredIndicator}</span>}
83
- {helpText && (
84
- <Box
85
- as="p"
86
- display="block"
87
- fontSize="sm"
88
- color="secondary"
89
- className={styles['help-text']}
90
- >
91
- {helpText}
92
- </Box>
93
- )}
84
+ {helpText && <HelpText>{helpText}</HelpText>}
94
85
  </Box>
95
86
  );
96
87
  };
@@ -3,10 +3,7 @@
3
3
  --form-control-font-family,
4
4
  var(--INTERNAL_form-control-font-family)
5
5
  );
6
- margin-top: var(
7
- --form-control-help-margin,
8
- var(--INTERNAL_form-control-help-margin)
9
- );
6
+ margin-top: var(--size-spacing-xs);
10
7
  font-weight: var(
11
8
  --form-control-help-text-font-weight,
12
9
  var(--INTERNAL_form-control-help-text-font-weight)
@@ -20,7 +20,7 @@ export const InputValidationMessage: FC<InputValidationMessageProps> = ({
20
20
  styles['input-validation-message'],
21
21
  'font-color-danger',
22
22
  `font-size-${size}`,
23
- 'm-top-xs'
23
+ 'm-top-sm'
24
24
  );
25
25
 
26
26
  return <div className={classes}>{children}</div>;
@@ -99,7 +99,6 @@ export const Pagination: FC<PaginationProps> = ({
99
99
  direction="row"
100
100
  alignItems="center"
101
101
  justifyContent="space-between"
102
- padding="lg"
103
102
  className={classNames(className)}
104
103
  >
105
104
  <Box
@@ -2,7 +2,6 @@
2
2
  // ----GLOBALS----
3
3
  --INTERNAL_form-control-box-shadow-focus: 0 0 0 3px var(--color-border-subtle);
4
4
  --INTERNAL_form-control-label-margin: var(--size-spacing-xs);
5
- --INTERNAL_form-control-help-margin: var(--size-spacing-2xs);
6
5
  --INTERNAL_form-control-line-height: var(--size-line-height-input);
7
6
  --INTERNAL_form-control-label-font-weight: var(--size-font-weight-medium);
8
7
  --INTERNAL_form-control-legend-font-weight: var(--size-font-weight-medium);