@hazelcast/ui 1.3.2-next.61 → 1.3.2-next.63
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/lib/Button.d.ts +2 -1
- package/lib/Button.js +7 -5
- package/lib/Button.js.map +1 -1
- package/lib/Button.module.scss +30 -0
- package/lib/FieldHeader.d.ts +3 -1
- package/lib/FieldHeader.js +2 -2
- package/lib/FieldHeader.js.map +1 -1
- package/lib/Label.d.ts +1 -0
- package/lib/Label.js +1 -1
- package/lib/Label.js.map +1 -1
- package/lib/Label.module.scss +4 -0
- package/lib/PasswordField.d.ts +3 -1
- package/lib/PasswordField.js +7 -3
- package/lib/PasswordField.js.map +1 -1
- package/lib/PasswordField.module.scss +6 -0
- package/lib/TextField.d.ts +3 -1
- package/lib/TextField.js +3 -2
- package/lib/TextField.js.map +1 -1
- package/lib/TextField.module.scss +7 -0
- package/package.json +2 -2
- package/styles/constants/_colors.scss +2 -1
- package/styles/constants/_sizes.scss +1 -0
- package/styles/constants/_typography.scss +2 -2
- package/styles/helpers/_gradients.scss +11 -0
- package/styles/helpers/_index.scss +1 -0
package/lib/Button.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { TooltipProps } from './Tooltip';
|
|
|
4
4
|
import { LinkRel, LinkTarget } from './Link';
|
|
5
5
|
export type ButtonKind = 'primary' | 'secondary' | 'danger' | 'transparent';
|
|
6
6
|
export type ButtonVariant = 'contained' | 'outlined' | 'text';
|
|
7
|
-
export type ButtonColor = 'primary' | 'secondary' | 'warning' | 'brand';
|
|
7
|
+
export type ButtonColor = 'primary' | 'secondary' | 'warning' | 'brand' | 'authPrimary';
|
|
8
8
|
export type ButtonSize = 'medium' | 'small';
|
|
9
9
|
export type ButtonAccessibleIconLeftProps = {
|
|
10
10
|
iconLeft: IconProps['icon'];
|
|
@@ -47,6 +47,7 @@ export type ButtonCommonProps = {
|
|
|
47
47
|
*/
|
|
48
48
|
kind?: ButtonKind;
|
|
49
49
|
children: string | ReactElement;
|
|
50
|
+
size?: ButtonSize;
|
|
50
51
|
color?: ButtonColor;
|
|
51
52
|
capitalize?: boolean;
|
|
52
53
|
bodyClassName?: string;
|
package/lib/Button.js
CHANGED
|
@@ -59,8 +59,9 @@ disabled, disabledTooltip, disabledTooltipVisible, disabledTooltipPlacement,
|
|
|
59
59
|
// Left icon
|
|
60
60
|
iconLeft, iconLeftAriaLabel, iconLeftColor, iconLeftClassName,
|
|
61
61
|
// Right icon
|
|
62
|
-
iconRight, iconRightAriaLabel, iconRightColor, iconRightClassName, rel = 'noopener', target, type = 'button', loading, variant = 'contained', color = 'primary', tooltip, ...rest }, ref) => {
|
|
62
|
+
iconRight, iconRightAriaLabel, iconRightColor, iconRightClassName, rel = 'noopener', target, type = 'button', loading, variant = 'contained', color = 'primary', tooltip, size = 'small', ...rest }, ref) => {
|
|
63
63
|
const tooltipId = useUID();
|
|
64
|
+
const iconSize = size === 'medium' ? 'smallMedium' : 'small';
|
|
64
65
|
const relFinal = Array.isArray(rel) ? rel.join(' ') : rel;
|
|
65
66
|
const loadingAnimationOnRight = loading && iconRight && iconRightAriaLabel && !(iconLeft && iconLeftAriaLabel);
|
|
66
67
|
return (React.createElement(Tooltip, { id: tooltipId, content: disabled ? disabledTooltip : tooltip, visible: disabled && disabledTooltipVisible, placement: disabledTooltipPlacement }, (tooltipRef, onMouseEnter, onMouseLeave) => (React.createElement(Component, { "data-test": "button", className: cn(styles.button, {
|
|
@@ -70,11 +71,12 @@ iconRight, iconRightAriaLabel, iconRightColor, iconRightClassName, rel = 'noopen
|
|
|
70
71
|
[styles[`color${capitalizeFirstCharacter(color)}`]]: true,
|
|
71
72
|
[styles[`variant${capitalizeFirstCharacter(variant)}`]]: true,
|
|
72
73
|
}),
|
|
74
|
+
[styles[size]]: size !== 'small',
|
|
73
75
|
}, className), "aria-describedby": disabled ? tooltipId : undefined, disabled: disabled !== null && disabled !== void 0 ? disabled : loading, rel: Component === 'a' ? relFinal : undefined, target: Component === 'a' ? target : undefined, type: Component === 'button' ? type : undefined, ref: mergeRefs([ref, tooltipRef]), ...rest },
|
|
74
76
|
React.createElement("span", { "data-test": "button-outline", className: cn(styles.outline, { [styles.inset]: outline === 'inset' }, outlineClassName) }),
|
|
75
77
|
React.createElement("span", { className: cn(styles.body, bodyClassName), onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave },
|
|
76
|
-
loading && !loadingAnimationOnRight && React.createElement(Loader, { className: styles.iconLeft, size:
|
|
77
|
-
iconLeft && iconLeftAriaLabel && !loading && (React.createElement(Icon, { icon: iconLeft, ariaLabel: iconLeftAriaLabel, "data-test": "button-icon-left", className: cn(styles.iconLeft, iconLeftClassName), size:
|
|
78
|
+
loading && !loadingAnimationOnRight && React.createElement(Loader, { className: styles.iconLeft, size: iconSize }),
|
|
79
|
+
iconLeft && iconLeftAriaLabel && !loading && (React.createElement(Icon, { icon: iconLeft, ariaLabel: iconLeftAriaLabel, "data-test": "button-icon-left", className: cn(styles.iconLeft, iconLeftClassName), size: iconSize, color: iconLeftColor })),
|
|
78
80
|
React.createElement(TruncatedText, { text: capitalize && typeof children === 'string' ? children.toUpperCase() : children,
|
|
79
81
|
/*
|
|
80
82
|
If a button is disabled and text is long we don't want to show 2 popups.
|
|
@@ -83,8 +85,8 @@ iconRight, iconRightAriaLabel, iconRightColor, iconRightClassName, rel = 'noopen
|
|
|
83
85
|
the truncated popup -> setting it to undefined will leave the default behaviour.
|
|
84
86
|
*/
|
|
85
87
|
tooltipVisible: disabled && disabledTooltipVisible !== false ? false : undefined }),
|
|
86
|
-
loadingAnimationOnRight && React.createElement(Loader, { className: styles.iconRight, size:
|
|
87
|
-
!loadingAnimationOnRight && iconRight && iconRightAriaLabel && (React.createElement(Icon, { icon: iconRight, ariaLabel: iconRightAriaLabel, "data-test": "button-icon-right", className: cn(styles.iconRight, iconRightClassName), size:
|
|
88
|
+
loadingAnimationOnRight && React.createElement(Loader, { className: styles.iconRight, size: iconSize }),
|
|
89
|
+
!loadingAnimationOnRight && iconRight && iconRightAriaLabel && (React.createElement(Icon, { icon: iconRight, ariaLabel: iconRightAriaLabel, "data-test": "button-icon-right", className: cn(styles.iconRight, iconRightClassName), size: iconSize, color: iconRightColor })))))));
|
|
88
90
|
});
|
|
89
91
|
Button.displayName = 'Button';
|
|
90
92
|
//# sourceMappingURL=Button.js.map
|
package/lib/Button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAwB,UAAU,EAAgC,MAAM,OAAO,CAAA;AAC7F,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,SAAS,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAElC,OAAO,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAwB,UAAU,EAAgC,MAAM,OAAO,CAAA;AAC7F,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,SAAS,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAElC,OAAO,EAAE,IAAI,EAAuB,MAAM,QAAQ,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAgB,MAAM,WAAW,CAAA;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,OAAO,MAAM,MAAM,sBAAsB,CAAA;AA8FzC,MAAM,wBAAwB,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;AAE1F,MAAM,uBAAuB,GA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cAAc,EAAE,QAAQ,IAAI,sBAAsB,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,GAChF;YACD,uBAAuB,IAAI,oBAAC,MAAM,IAAC,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,IAAI,EAAE,QAAQ,GAAI;YAClF,CAAC,uBAAuB,IAAI,SAAS,IAAI,kBAAkB,IAAI,CAC9D,oBAAC,IAAI,IACH,IAAI,EAAE,SAAS,EACf,SAAS,EAAE,kBAAkB,eACnB,mBAAmB,EAC7B,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,kBAAkB,CAAC,EACnD,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,cAAc,GACrB,CACH,CACI,CACG,CACb,CACO,CACX,CAAA;AACH,CAAC,CACF,CAAA;AAED,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAA"}
|
package/lib/Button.module.scss
CHANGED
|
@@ -29,6 +29,12 @@
|
|
|
29
29
|
|
|
30
30
|
@include c.typographyButton('small');
|
|
31
31
|
|
|
32
|
+
&.medium {
|
|
33
|
+
height: c.$grid * 10.75;
|
|
34
|
+
|
|
35
|
+
@include c.typographyButton('medium');
|
|
36
|
+
}
|
|
37
|
+
|
|
32
38
|
.outline {
|
|
33
39
|
position: absolute;
|
|
34
40
|
border-radius: c.$borderRadiusButtonSmall;
|
|
@@ -184,6 +190,30 @@
|
|
|
184
190
|
@include disabledButtonColor;
|
|
185
191
|
}
|
|
186
192
|
}
|
|
193
|
+
|
|
194
|
+
&AuthPrimary {
|
|
195
|
+
@include buttonColor(c.$authPrimary);
|
|
196
|
+
|
|
197
|
+
&:hover,
|
|
198
|
+
&.hover,
|
|
199
|
+
&:focus,
|
|
200
|
+
&.focus {
|
|
201
|
+
@include buttonColor(lighten(c.$authPrimary, 10%));
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
&:active,
|
|
205
|
+
&.active {
|
|
206
|
+
@include buttonColor(darken(c.$authPrimary, 10%));
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
&.variantContained {
|
|
210
|
+
color: c.$colorText;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&:disabled {
|
|
214
|
+
@include disabledButtonColor;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
187
217
|
}
|
|
188
218
|
|
|
189
219
|
&.variant {
|
package/lib/FieldHeader.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { HelpProps } from './Help';
|
|
3
3
|
import { DataTestProp } from '@hazelcast/helpers';
|
|
4
|
-
export type FieldHeaderSize = 'small' | 'medium';
|
|
4
|
+
export type FieldHeaderSize = 'small' | 'medium' | 'large';
|
|
5
|
+
export type FieldHeaderVariant = 'primary' | 'secondary';
|
|
5
6
|
export type FieldHeaderLabelProps = {
|
|
6
7
|
label?: string;
|
|
7
8
|
labelClassName?: string;
|
|
@@ -16,6 +17,7 @@ export type FieldHeaderNoLabelProps = {
|
|
|
16
17
|
};
|
|
17
18
|
export type FieldHeaderProps = {
|
|
18
19
|
size?: FieldHeaderSize;
|
|
20
|
+
variant?: FieldHeaderVariant;
|
|
19
21
|
id: string;
|
|
20
22
|
showAriaLabel?: boolean;
|
|
21
23
|
} & DataTestProp & (FieldHeaderNoLabelProps | FieldHeaderLabelProps);
|
package/lib/FieldHeader.js
CHANGED
|
@@ -4,12 +4,12 @@ import { Label } from './Label';
|
|
|
4
4
|
import { Help } from './Help';
|
|
5
5
|
import styles from './FieldHeader.module.scss';
|
|
6
6
|
export const FieldHeader = (props) => {
|
|
7
|
-
const { label, id, helperText, size = 'medium', labelClassName, 'data-test': dataTest, showAriaLabel, helperTextTooltipWordBreak } = props;
|
|
7
|
+
const { label, id, variant, helperText, size = 'medium', labelClassName, 'data-test': dataTest, showAriaLabel, helperTextTooltipWordBreak, } = props;
|
|
8
8
|
if (showAriaLabel) {
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
11
11
|
return label ? (React.createElement("div", { className: styles.root },
|
|
12
|
-
React.createElement(Label, { id: id, label: label, "data-test": dataTest ? `${dataTest}-label` : undefined, className: cn(styles.label, { [styles.small]: size === 'small' }, labelClassName) }),
|
|
12
|
+
React.createElement(Label, { id: id, label: label, variant: variant, "data-test": dataTest ? `${dataTest}-label` : undefined, className: cn(styles.label, { [styles.small]: size === 'small' }, labelClassName) }),
|
|
13
13
|
helperText && (React.createElement(Help, { parentId: id, helperText: helperText, className: styles.helperText, tooltipWordBreak: helperTextTooltipWordBreak, "data-test": dataTest ? `${dataTest}-helperText` : undefined })))) : null;
|
|
14
14
|
};
|
|
15
15
|
//# sourceMappingURL=FieldHeader.js.map
|
package/lib/FieldHeader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldHeader.js","sourceRoot":"","sources":["../src/FieldHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAA;AAGxC,OAAO,MAAM,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"FieldHeader.js","sourceRoot":"","sources":["../src/FieldHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,IAAI,EAAa,MAAM,QAAQ,CAAA;AAGxC,OAAO,MAAM,MAAM,2BAA2B,CAAA;AAwB9C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAE,EAAE;IACrD,MAAM,EACJ,KAAK,EACL,EAAE,EACF,OAAO,EACP,UAAU,EACV,IAAI,GAAG,QAAQ,EACf,cAAc,EACd,WAAW,EAAE,QAAQ,EACrB,aAAa,EACb,0BAA0B,GAC3B,GAAG,KAAK,CAAA;IAET,IAAI,aAAa,EAAE;QACjB,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,6BAAK,SAAS,EAAE,MAAM,CAAC,IAAI;QACzB,oBAAC,KAAK,IACJ,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,eACL,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,QAAQ,CAAC,CAAC,CAAC,SAAS,EACrD,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,KAAK,OAAO,EAAE,EAAE,cAAc,CAAC,GACjF;QACD,UAAU,IAAI,CACb,oBAAC,IAAI,IACH,QAAQ,EAAE,EAAE,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,MAAM,CAAC,UAAU,EAC5B,gBAAgB,EAAE,0BAA0B,eACjC,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,aAAa,CAAC,CAAC,CAAC,SAAS,GAC1D,CACH,CACG,CACP,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC,CAAA"}
|
package/lib/Label.d.ts
CHANGED
package/lib/Label.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import styles from './Label.module.scss';
|
|
4
|
-
export const Label = ({ id, label, className }) => (React.createElement("label", { htmlFor: id, className: cn(styles.label, className) }, label));
|
|
4
|
+
export const Label = ({ id, label, className, variant = 'primary' }) => (React.createElement("label", { htmlFor: id, className: cn(styles.label, styles[variant], className) }, label));
|
|
5
5
|
//# sourceMappingURL=Label.js.map
|
package/lib/Label.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../src/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAA;AAC/C,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,MAAM,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../src/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAA;AAC/C,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B,OAAO,MAAM,MAAM,qBAAqB,CAAA;AASxC,MAAM,CAAC,MAAM,KAAK,GAAmB,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,GAAG,SAAS,EAAE,EAAE,EAAE,CAAC,CACtF,+BAAO,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,IACxE,KAAK,CACA,CACT,CAAA"}
|
package/lib/Label.module.scss
CHANGED
package/lib/PasswordField.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataTestProp } from '@hazelcast/helpers';
|
|
2
2
|
import { FC, FocusEvent, ChangeEvent, InputHTMLAttributes } from 'react';
|
|
3
|
-
import { TextFieldSize } from './TextField';
|
|
3
|
+
import { TextFieldSize, TextFieldVariant } from './TextField';
|
|
4
4
|
import { HelpProps } from './Help';
|
|
5
5
|
type PasswordFieldCoreProps = {
|
|
6
6
|
name: string;
|
|
@@ -8,6 +8,7 @@ type PasswordFieldCoreProps = {
|
|
|
8
8
|
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
9
9
|
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
10
10
|
error?: string;
|
|
11
|
+
hideToggle?: boolean;
|
|
11
12
|
};
|
|
12
13
|
export type PasswordFieldExtraProps = {
|
|
13
14
|
showIconLabel?: string;
|
|
@@ -15,6 +16,7 @@ export type PasswordFieldExtraProps = {
|
|
|
15
16
|
label: string;
|
|
16
17
|
helperText?: HelpProps['helperText'];
|
|
17
18
|
size?: TextFieldSize;
|
|
19
|
+
variant?: TextFieldVariant;
|
|
18
20
|
labelClassName?: string;
|
|
19
21
|
className?: string;
|
|
20
22
|
inputClassName?: string;
|
package/lib/PasswordField.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import React, { useMemo, useState } from 'react';
|
|
2
2
|
import { Eye, EyeOff, Lock } from 'react-feather';
|
|
3
|
+
import cls from 'classnames';
|
|
3
4
|
import { TextField } from './TextField';
|
|
4
5
|
import { IconButton } from './IconButton';
|
|
5
6
|
import styles from './PasswordField.module.scss';
|
|
6
|
-
export const PasswordField = ({ showIconLabel = 'Show password', hideIconLabel = 'Hide password', inputClassName, withIcon, disabled, initiallyVisible = false, ...props }) => {
|
|
7
|
+
export const PasswordField = ({ showIconLabel = 'Show password', hideIconLabel = 'Hide password', inputClassName, withIcon, disabled, initiallyVisible = false, hideToggle = false, ...props }) => {
|
|
7
8
|
const [visible, setVisible] = useState(initiallyVisible);
|
|
8
9
|
const overlay = useMemo(() => {
|
|
10
|
+
if (hideToggle) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
9
13
|
let disabledProps = {};
|
|
10
14
|
if (disabled) {
|
|
11
15
|
// The IconButton is disabled only when the entire input is disabled. No need for a tooltip.
|
|
@@ -16,7 +20,7 @@ export const PasswordField = ({ showIconLabel = 'Show password', hideIconLabel =
|
|
|
16
20
|
};
|
|
17
21
|
}
|
|
18
22
|
return (React.createElement(IconButton, { size: "small", icon: visible ? EyeOff : Eye, ariaLabel: visible ? hideIconLabel : showIconLabel, className: styles.toggle, onClick: () => setVisible((prev) => !prev), kind: "primary", "data-test": "password-field-toggle", type: "button", ...disabledProps }));
|
|
19
|
-
}, [visible, hideIconLabel, showIconLabel, disabled]);
|
|
20
|
-
return (React.createElement(TextField, { ...props, type: visible ? 'text' : 'password', inputContainerChild: overlay, inputContainerClassName: styles.inputContainer, inputClassName: inputClassName, inputIcon: withIcon ? Lock : undefined, disabled: disabled }));
|
|
23
|
+
}, [visible, hideToggle, hideIconLabel, showIconLabel, disabled]);
|
|
24
|
+
return (React.createElement(TextField, { ...props, type: visible ? 'text' : 'password', inputContainerChild: overlay, inputContainerClassName: cls(styles.inputContainer, { [styles.withoutToggle]: hideToggle }), inputClassName: inputClassName, inputIcon: withIcon ? Lock : undefined, disabled: disabled }));
|
|
21
25
|
};
|
|
22
26
|
//# sourceMappingURL=PasswordField.js.map
|
package/lib/PasswordField.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordField.js","sourceRoot":"","sources":["../src/PasswordField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAoD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"PasswordField.js","sourceRoot":"","sources":["../src/PasswordField.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAoD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClG,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,GAAG,MAAM,YAAY,CAAA;AAE5B,OAAO,EAAE,SAAS,EAAmC,MAAM,aAAa,CAAA;AACxE,OAAO,EAAE,UAAU,EAAuD,MAAM,cAAc,CAAA;AAG9F,OAAO,MAAM,MAAM,6BAA6B,CAAA;AA2BhD,MAAM,CAAC,MAAM,aAAa,GAA2B,CAAC,EACpD,aAAa,GAAG,eAAe,EAC/B,aAAa,GAAG,eAAe,EAC/B,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,gBAAgB,GAAG,KAAK,EACxB,UAAU,GAAG,KAAK,EAClB,GAAG,KAAK,EACT,EAAE,EAA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AC,CAAC,CAAC,SAAS,EACtC,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAA;AACH,CAAC,CAAA"}
|
package/lib/TextField.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ import { Icon as IconType } from 'react-feather';
|
|
|
4
4
|
import { FieldHeaderProps } from './FieldHeader';
|
|
5
5
|
import { IconSize } from './Icon';
|
|
6
6
|
import { TooltipProps } from './Tooltip';
|
|
7
|
-
export type TextFieldSize = 'medium' | 'small';
|
|
7
|
+
export type TextFieldSize = 'medium' | 'small' | 'large';
|
|
8
|
+
export type TextFieldVariant = 'primary' | 'secondary';
|
|
8
9
|
type TextFieldTrailingIcon = {
|
|
9
10
|
inputTrailingIcon: IconType;
|
|
10
11
|
inputTrailingIconLabel: string;
|
|
@@ -24,6 +25,7 @@ type TextFieldCoreProps<T extends TextFieldTypes> = {
|
|
|
24
25
|
export type TextFieldExtraProps<T extends TextFieldTypes> = {
|
|
25
26
|
ariaLabel?: string;
|
|
26
27
|
size?: TextFieldSize;
|
|
28
|
+
variant?: TextFieldVariant;
|
|
27
29
|
iconSize?: IconSize;
|
|
28
30
|
className?: string;
|
|
29
31
|
inputContainerClassName?: string;
|
package/lib/TextField.js
CHANGED
|
@@ -26,7 +26,7 @@ import styles from './TextField.module.scss';
|
|
|
26
26
|
* Use a text input when the expected user input is a single line of text.
|
|
27
27
|
*/
|
|
28
28
|
const TextFieldInternal = (props, ref) => {
|
|
29
|
-
const { 'data-test': dataTest, ariaLabel, className, disabled, error, errorClassName, helperText, helperTextTooltipWordBreak, id: explicitId, inputClassName, inputContainerChild, inputContainerClassName, inputIcon, inputTrailingIcon, inputTrailingIconLabel, label, labelClassName, showAriaLabel = false, name, size = 'medium', onBlur, onChange, onKeyPress, placeholder, required, type = 'text', value, readOnly, onClick, clearable, iconSize = size, errorTooltipPlacement = 'top', ...htmlAttrs } = props;
|
|
29
|
+
const { 'data-test': dataTest, ariaLabel, className, disabled, error, errorClassName, helperText, helperTextTooltipWordBreak, id: explicitId, inputClassName, inputContainerChild, inputContainerClassName, inputIcon, inputTrailingIcon, inputTrailingIconLabel, label, labelClassName, showAriaLabel = false, name, size = 'medium', variant = 'primary', onBlur, onChange, onKeyPress, placeholder, required, type = 'text', value, readOnly, onClick, clearable, iconSize = size, errorTooltipPlacement = 'top', ...htmlAttrs } = props;
|
|
30
30
|
const autoId = useUID();
|
|
31
31
|
const id = explicitId !== null && explicitId !== void 0 ? explicitId : autoId;
|
|
32
32
|
const inputRef = useRef(null);
|
|
@@ -40,12 +40,13 @@ const TextFieldInternal = (props, ref) => {
|
|
|
40
40
|
return (React.createElement("div", { "data-test": dataTest, className: cn(styles.container, {
|
|
41
41
|
[styles.withError]: 'error' in props,
|
|
42
42
|
[styles.small]: size === 'small',
|
|
43
|
+
[styles.large]: size === 'large',
|
|
43
44
|
[styles.disabled]: disabled,
|
|
44
45
|
[styles.hasError]: error,
|
|
45
46
|
[styles.withIcon]: inputIcon,
|
|
46
47
|
[styles.empty]: value === undefined,
|
|
47
48
|
}, className) },
|
|
48
|
-
React.createElement(FieldHeader, { id: id, size: size, label: label, helperText: helperText, showAriaLabel: showAriaLabel, labelClassName: labelClassName, helperTextTooltipWordBreak: helperTextTooltipWordBreak }),
|
|
49
|
+
React.createElement(FieldHeader, { id: id, size: size, label: label, variant: variant, helperText: helperText, showAriaLabel: showAriaLabel, labelClassName: labelClassName, helperTextTooltipWordBreak: helperTextTooltipWordBreak }),
|
|
49
50
|
React.createElement("div", { className: styles.inputBlock },
|
|
50
51
|
React.createElement("div", { className: cn(styles.inputContainer, inputContainerClassName) },
|
|
51
52
|
React.createElement("input", { type: type, id: id, ref: mergedRef, value: value !== null && value !== void 0 ? value : '', name: name, onChange: onChange, onBlur: onBlur, readOnly: readOnly, onKeyPress: onKeyPress, onClick: onClick, "aria-label": showAriaLabel ? ariaLabel : undefined, "aria-invalid": !!error, "aria-required": required, "aria-describedby": helperText && helpTooltipId(id), "aria-errormessage": error && errorId(id), disabled: disabled, placeholder: placeholder, className: cn(inputClassName, {
|
package/lib/TextField.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../src/TextField.tsx"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,KAAK,EAAE,EAQZ,UAAU,EACV,MAAM,GACP,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAgB,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAC3E,OAAO,EAAoB,CAAC,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,SAAS,MAAM,kBAAkB,CAAA;AAExC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAE,WAAW,EAAoB,MAAM,eAAe,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAIzC,OAAO,MAAM,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../src/TextField.tsx"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,KAAK,EAAE,EAQZ,UAAU,EACV,MAAM,GACP,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAgB,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAC3E,OAAO,EAAoB,CAAC,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,SAAS,MAAM,kBAAkB,CAAA;AAExC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,M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AkB,EAAE,MAAM,CAAC,0BAA0B,CAAC,EACpF,SAAS,EAAE,MAAM,CAAC,iBAAiB,EACnC,IAAI,EAAE,QAAQ,GACd,CACH,CACG,CACF;QACN,oBAAC,KAAK,IACJ,SAAS,QACT,OAAO,EAAE,EAAE,EACX,KAAK,EAAE,KAAK,EACZ,gBAAgB,EAAE,qBAAqB,EACvC,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,cAAc,CAAC,GACpD,CACE,CACP,CAAA;AACH,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAA;AAEtD,MAAM,CAAC,MAAM,SAAS,GAAG,CAA2B,EAAE,IAAI,EAAE,GAAG,KAAK,EAAwD,EAAE,EAAE,CAAC,CAC/H,oBAAC,gBAAgB,IAAC,GAAG,EAAE,IAAI,KAAM,KAAK,GAAI,CAC3C,CAAA"}
|
|
@@ -21,6 +21,7 @@ $marginLeftWithIcon: c.$grid * 5;
|
|
|
21
21
|
flex: 1 1 auto;
|
|
22
22
|
display: flex;
|
|
23
23
|
flex-direction: row;
|
|
24
|
+
overflow: hidden;
|
|
24
25
|
box-sizing: border-box;
|
|
25
26
|
height: c.$inputHeight;
|
|
26
27
|
background-color: c.$colorOverlayBackground;
|
|
@@ -115,6 +116,12 @@ $marginLeftWithIcon: c.$grid * 5;
|
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
118
|
|
|
119
|
+
&.large {
|
|
120
|
+
.inputContainer {
|
|
121
|
+
height: c.$inputHeightLarge;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
118
125
|
&.mockAutofill {
|
|
119
126
|
input {
|
|
120
127
|
@include h.mockChromeAutofill;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hazelcast/ui",
|
|
3
|
-
"version": "1.3.2-next.
|
|
3
|
+
"version": "1.3.2-next.63+7c60143",
|
|
4
4
|
"description": "Hazelcast design system components",
|
|
5
5
|
"author": "",
|
|
6
6
|
"homepage": "https://github.com/hazelcast/frontend-shared#readme",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"react": "^17 || ^18",
|
|
118
118
|
"react-dom": "^17 || ^18"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "7c601437902adfbe3d4bd51ab913239e726241ab"
|
|
121
121
|
}
|
|
@@ -18,7 +18,7 @@ $colorWarningDark: #ad6200 !default;
|
|
|
18
18
|
$colorErrorLight: #e75851 !default;
|
|
19
19
|
$colorError: #b00020 !default;
|
|
20
20
|
$colorErrorDark: #891b15 !default;
|
|
21
|
-
$colorText: #
|
|
21
|
+
$colorText: #061827 !default;
|
|
22
22
|
$colorTextSecondary: #707482 !default;
|
|
23
23
|
$colorTextSubdued: #69707d !default;
|
|
24
24
|
$colorOverlayBackground: #f0f6ff !default;
|
|
@@ -26,3 +26,4 @@ $colorAccessibilityOutline: #9648bd !default;
|
|
|
26
26
|
$colorBrand: #00bac6 !default;
|
|
27
27
|
$colorShadow: rgb(53 61 73 / 20%) !default;
|
|
28
28
|
$colorMenuDark: #333 !default;
|
|
29
|
+
$authPrimary: #c6ff3a !default;
|
|
@@ -29,6 +29,7 @@ $buttonMaxWidth: 370px !default;
|
|
|
29
29
|
$toastMaxWidth: 580px !default;
|
|
30
30
|
$inputHeight: $grid * 10 !default;
|
|
31
31
|
$inputHeightSmall: $grid * 7.5 !default;
|
|
32
|
+
$inputHeightLarge: $grid * 13 !default;
|
|
32
33
|
$cardShadowSize: 1px !default;
|
|
33
34
|
$cardShadowBlur: 4px !default;
|
|
34
35
|
$selectMenuShadowSize: 1px !default;
|
|
@@ -11,7 +11,7 @@ $fontSizeH1Hero: 2.875rem !default; // 46px
|
|
|
11
11
|
$fontSizeH1: 2.125rem !default; // 34px
|
|
12
12
|
$fontSizeH2: 1.625rem !default; // 26px
|
|
13
13
|
$fontSizeH3: 1.25rem !default; // 20px
|
|
14
|
-
$fontSizeButton:
|
|
14
|
+
$fontSizeButton: 1rem !default;
|
|
15
15
|
$fontSizeButtonSmall: 0.875rem !default;
|
|
16
16
|
$fontSizeBodyNormal: 1rem !default;
|
|
17
17
|
$fontSizeBodySmall: 0.875rem !default;
|
|
@@ -78,7 +78,7 @@ $lineHeightBodyTiny: normal !default;
|
|
|
78
78
|
line-height: $lineHeightButton;
|
|
79
79
|
|
|
80
80
|
@if $size == 'medium' {
|
|
81
|
-
font-weight: $
|
|
81
|
+
font-weight: $fontWeightTextBold;
|
|
82
82
|
font-size: $fontSizeButton;
|
|
83
83
|
letter-spacing: $letterSpacingButton;
|
|
84
84
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@use '../constants' as c;
|
|
2
|
+
|
|
3
|
+
@mixin gradientLime {
|
|
4
|
+
background: c.$authPrimary;
|
|
5
|
+
background: linear-gradient(270deg, c.$authPrimary 0%, #00b8b8 100%);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@mixin gradientOcean {
|
|
9
|
+
background: c.$colorText;
|
|
10
|
+
background: linear-gradient(270deg, #0c6f8e 0%, #1b2939 100%);
|
|
11
|
+
}
|