@veeqo/ui 14.6.0 → 14.7.1
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/dist/components/Button/Button.cjs +30 -16
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.ts +8 -0
- package/dist/components/Button/Button.js +30 -16
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.module.scss.cjs +9 -0
- package/dist/components/Button/Button.module.scss.cjs.map +1 -0
- package/dist/components/Button/Button.module.scss.js +7 -0
- package/dist/components/Button/Button.module.scss.js.map +1 -0
- package/dist/components/Button/types.d.ts +9 -1
- package/dist/components/DimensionsInput/DimensionsInput.d.ts +1 -0
- package/dist/components/Pagination/styled.d.ts +5 -0
- package/dist/components/PhoneInput/index.d.ts +1 -0
- package/dist/components/Search/Search.d.ts +1 -0
- package/dist/components/Search/styled.d.ts +1 -0
- package/dist/components/Select/Select.cjs +20 -3
- package/dist/components/Select/Select.cjs.map +1 -1
- package/dist/components/Select/Select.d.ts +11 -0
- package/dist/components/Select/Select.js +20 -3
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/Select.module.scss.cjs +9 -0
- package/dist/components/Select/Select.module.scss.cjs.map +1 -0
- package/dist/components/Select/Select.module.scss.js +7 -0
- package/dist/components/Select/Select.module.scss.js.map +1 -0
- package/dist/components/TextField/TextField.cjs +23 -6
- package/dist/components/TextField/TextField.cjs.map +1 -1
- package/dist/components/TextField/TextField.d.ts +1 -0
- package/dist/components/TextField/TextField.js +23 -6
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField/TextField.module.scss.cjs +9 -0
- package/dist/components/TextField/TextField.module.scss.cjs.map +1 -0
- package/dist/components/TextField/TextField.module.scss.js +7 -0
- package/dist/components/TextField/TextField.module.scss.js.map +1 -0
- package/dist/components/TextField/index.d.ts +1 -0
- package/dist/components/TextField/types.d.ts +12 -1
- package/dist/components/VideoModal/styled.d.ts +4 -0
- package/dist/hoc/withLabels/withLabels.cjs +3 -3
- package/dist/hoc/withLabels/withLabels.cjs.map +1 -1
- package/dist/hoc/withLabels/withLabels.js +3 -3
- package/dist/hoc/withLabels/withLabels.js.map +1 -1
- package/dist/theme/index.js +1 -1
- package/package.json +1 -1
- package/dist/components/Button/components/styled.cjs +0 -72
- package/dist/components/Button/components/styled.cjs.map +0 -1
- package/dist/components/Button/components/styled.d.ts +0 -20
- package/dist/components/Button/components/styled.js +0 -58
- package/dist/components/Button/components/styled.js.map +0 -1
- package/dist/components/Select/styled.cjs +0 -16
- package/dist/components/Select/styled.cjs.map +0 -1
- package/dist/components/Select/styled.d.ts +0 -2
- package/dist/components/Select/styled.js +0 -9
- package/dist/components/Select/styled.js.map +0 -1
- package/dist/components/TextField/styled.cjs +0 -16
- package/dist/components/TextField/styled.cjs.map +0 -1
- package/dist/components/TextField/styled.d.ts +0 -2
- package/dist/components/TextField/styled.js +0 -9
- package/dist/components/TextField/styled.js.map +0 -1
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
import React__default, { forwardRef, useCallback } from 'react';
|
|
2
|
-
import { SelectInput } from './styled.js';
|
|
3
2
|
import { withLabels } from '../../hoc/withLabels/withLabels.js';
|
|
3
|
+
import { buildClassnames } from '../../utils/buildClassnames.js';
|
|
4
|
+
import 'uid/secure';
|
|
5
|
+
import formStyles from '../../utils/forms/form.module.scss.js';
|
|
6
|
+
import styles from './Select.module.scss.js';
|
|
4
7
|
|
|
5
|
-
const Select = withLabels(forwardRef(({ className, options, value, onChange, size, disabled, hasError, ...otherProps }, ref) => {
|
|
8
|
+
const Select = withLabels(forwardRef(({ className, options, value, onChange, size, disabled, disabledMessage, hasError, id, ...otherProps }, ref) => {
|
|
6
9
|
const handleChange = useCallback((e) => {
|
|
7
10
|
if (!onChange)
|
|
8
11
|
return;
|
|
9
12
|
onChange(e.currentTarget.value);
|
|
10
13
|
}, [onChange]);
|
|
11
|
-
|
|
14
|
+
const getAriaDescribedBy = () => {
|
|
15
|
+
if (hasError && id)
|
|
16
|
+
return `${id}-error`;
|
|
17
|
+
if (disabledMessage && id)
|
|
18
|
+
return `${id}-disabled`;
|
|
19
|
+
return undefined;
|
|
20
|
+
};
|
|
21
|
+
return (React__default.createElement("select", { className: buildClassnames([
|
|
22
|
+
formStyles.base,
|
|
23
|
+
formStyles.fullStyles,
|
|
24
|
+
styles.select,
|
|
25
|
+
size === 'sm' && formStyles.compact,
|
|
26
|
+
hasError && formStyles.error,
|
|
27
|
+
className,
|
|
28
|
+
]), id: id, value: value !== null && value !== void 0 ? value : undefined, onChange: handleChange, disabled: disabled, "aria-describedby": getAriaDescribedBy(), ref: ref, ...otherProps }, !!options &&
|
|
12
29
|
options.map((option) => (React__default.createElement("option", { key: option.label, value: option.value, disabled: option.disabled, hidden: option.hidden }, option.label)))));
|
|
13
30
|
}));
|
|
14
31
|
Select.displayName = 'Select';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import React, { ChangeEvent, forwardRef, useCallback } from 'react';\n\nimport {
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import React, { ChangeEvent, forwardRef, useCallback } from 'react';\n\nimport { withLabels } from '../../hoc';\nimport { buildClassnames } from '../../utils';\n\nimport formStyles from '../../utils/forms/form.module.scss';\nimport styles from './Select.module.scss';\n\nexport type SelectOption = {\n label: string;\n value: string;\n disabled?: boolean;\n hidden?: boolean;\n};\n\nexport interface SelectProps\n extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'size' | 'onChange'> {\n id?: string;\n className?: string;\n /** Array of options to render in the select dropdown. */\n options: Array<SelectOption>;\n /** Currently selected value. */\n value?: string;\n /** Component size variant. Defaults to `'base'`. */\n size?: 'sm' | 'base';\n /** Disables the select element. */\n disabled?: boolean;\n /**\n * When provided, links the select to the disabled message element via `aria-describedby`.\n * Passed through from `withLabels` — the HOC renders the visible message and sets `disabled`.\n */\n disabledMessage?: React.ReactNode;\n /** When true, applies error styling. Used with `withLabels` to display an error message. */\n hasError?: boolean;\n /** Callback fired with the new value on change. */\n onChange?: (value: string) => void;\n}\n\nexport const Select = withLabels(\n forwardRef<HTMLSelectElement, SelectProps>(\n (\n {\n className,\n options,\n value,\n onChange,\n size,\n disabled,\n disabledMessage,\n hasError,\n id,\n ...otherProps\n }: SelectProps,\n ref,\n ) => {\n const handleChange = useCallback(\n (e: ChangeEvent<HTMLSelectElement>) => {\n if (!onChange) return;\n onChange(e.currentTarget.value);\n },\n [onChange],\n );\n\n const getAriaDescribedBy = () => {\n if (hasError && id) return `${id}-error`;\n if (disabledMessage && id) return `${id}-disabled`;\n return undefined;\n };\n\n return (\n <select\n className={buildClassnames([\n formStyles.base,\n formStyles.fullStyles,\n styles.select,\n size === 'sm' && formStyles.compact,\n hasError && formStyles.error,\n className,\n ])}\n id={id}\n value={value ?? undefined}\n onChange={handleChange}\n disabled={disabled}\n aria-describedby={getAriaDescribedBy()}\n ref={ref}\n {...otherProps}\n >\n {!!options &&\n options.map((option) => (\n <option\n key={option.label}\n value={option.value}\n disabled={option.disabled}\n hidden={option.hidden}\n >\n {option.label}\n </option>\n ))}\n </select>\n );\n },\n ),\n);\n\nSelect.displayName = 'Select';\n"],"names":["React"],"mappings":";;;;;;;AAsCO,MAAM,MAAM,GAAG,UAAU,CAC9B,UAAU,CACR,CACE,EACE,SAAS,EACT,OAAO,EACP,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,EAAE,EACF,GAAG,UAAU,EACD,EACd,GAAG,KACD;AACF,IAAA,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,CAAiC,KAAI;AACpC,QAAA,IAAI,CAAC,QAAQ;YAAE;AACf,QAAA,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC;AACjC,IAAA,CAAC,EACD,CAAC,QAAQ,CAAC,CAC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+
___$insertStyle("._select_1kp7e_1 {\n --padding-right: var(--sizes-9);\n padding-right: var(--padding-right);\n background-image: url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M4 6L8 10L12 6H4Z' fill='currentColor' /%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right var(--sizes-3) top 50%, 0 0;\n}\n._select_1kp7e_1:has(option:disabled:checked) {\n color: var(--colors-neutral-ink-light);\n}");
|
|
6
|
+
var styles = {"select":"_select_1kp7e_1"};
|
|
7
|
+
|
|
8
|
+
module.exports = styles;
|
|
9
|
+
//# sourceMappingURL=Select.module.scss.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.module.scss.cjs","sources":["../../../src/components/Select/Select.module.scss"],"sourcesContent":[".select {\n --padding-right: var(--sizes-9);\n\n padding-right: var(--padding-right);\n background-image: url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M4 6L8 10L12 6H4Z' fill='currentColor' /%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position:\n right var(--sizes-3) top 50%,\n 0 0;\n\n &:has(option:disabled:checked) {\n color: var(--colors-neutral-ink-light);\n }\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,0hBAAA;AAEA,aAAA,CAAA,QAAA,CAAA,iBAAA;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import insertStyle from '../../_virtual/____insertStyle.js';
|
|
2
|
+
|
|
3
|
+
insertStyle("._select_1kp7e_1 {\n --padding-right: var(--sizes-9);\n padding-right: var(--padding-right);\n background-image: url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M4 6L8 10L12 6H4Z' fill='currentColor' /%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right var(--sizes-3) top 50%, 0 0;\n}\n._select_1kp7e_1:has(option:disabled:checked) {\n color: var(--colors-neutral-ink-light);\n}");
|
|
4
|
+
var styles = {"select":"_select_1kp7e_1"};
|
|
5
|
+
|
|
6
|
+
export { styles as default };
|
|
7
|
+
//# sourceMappingURL=Select.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.module.scss.js","sources":["../../../src/components/Select/Select.module.scss"],"sourcesContent":[".select {\n --padding-right: var(--sizes-9);\n\n padding-right: var(--padding-right);\n background-image: url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M4 6L8 10L12 6H4Z' fill='currentColor' /%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position:\n right var(--sizes-3) top 50%,\n 0 0;\n\n &:has(option:disabled:checked) {\n color: var(--colors-neutral-ink-light);\n }\n}\n"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,0hBAAA;AAEA,aAAA,CAAA,QAAA,CAAA,iBAAA;;;;"}
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var generateId = require('../../utils/generateId.cjs');
|
|
5
|
-
var
|
|
5
|
+
var buildClassnames = require('../../utils/buildClassnames.cjs');
|
|
6
|
+
var form_module = require('../../utils/forms/form.module.scss.cjs');
|
|
7
|
+
var TextField_module = require('./TextField.module.scss.cjs');
|
|
6
8
|
|
|
7
9
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
10
|
|
|
9
11
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
12
|
|
|
11
13
|
const NUMBER_REGEX = /^-?[0-9]*\.?[0-9]+$/;
|
|
12
|
-
const TextField = React.forwardRef(({ id, className, disabled = false, hasError, multiline = false, spellCheck = false, name, onChange, placeholder, size = 'base', type = 'text', value, ...otherProps }, ref) => {
|
|
14
|
+
const TextField = React.forwardRef(({ id, className, disabled = false, disabledMessage, hasError, multiline = false, spellCheck = false, name, onChange, placeholder, size = 'base', type = 'text', value, ...otherProps }, ref) => {
|
|
13
15
|
const handleChange = React.useCallback((event) => {
|
|
14
16
|
if (!onChange)
|
|
15
17
|
return;
|
|
@@ -32,14 +34,29 @@ const TextField = React.forwardRef(({ id, className, disabled = false, hasError,
|
|
|
32
34
|
const ariaDescribedBy = React.useMemo(() => {
|
|
33
35
|
if (hasError)
|
|
34
36
|
return `${componentId}-error`;
|
|
35
|
-
if (
|
|
37
|
+
if (disabledMessage)
|
|
36
38
|
return `${componentId}-disabled`;
|
|
37
39
|
return undefined;
|
|
38
|
-
}, [hasError,
|
|
40
|
+
}, [hasError, disabledMessage, componentId]);
|
|
41
|
+
const isCompact = size === 'sm';
|
|
39
42
|
if (type === 'text' && multiline) {
|
|
40
|
-
return (React__default.default.createElement(
|
|
43
|
+
return (React__default.default.createElement("textarea", { className: buildClassnames.buildClassnames([
|
|
44
|
+
form_module.base,
|
|
45
|
+
form_module.fullStyles,
|
|
46
|
+
TextField_module.textarea,
|
|
47
|
+
isCompact && form_module.compact,
|
|
48
|
+
hasError && form_module.error,
|
|
49
|
+
className,
|
|
50
|
+
]), disabled: disabled, id: componentId, name: name, onChange: handleChange, placeholder: placeholder, value: value, ref: ref, spellCheck: spellCheck, "aria-describedby": ariaDescribedBy, ...otherProps }));
|
|
41
51
|
}
|
|
42
|
-
return (React__default.default.createElement(
|
|
52
|
+
return (React__default.default.createElement("input", { className: buildClassnames.buildClassnames([
|
|
53
|
+
form_module.base,
|
|
54
|
+
form_module.fullStyles,
|
|
55
|
+
TextField_module.input,
|
|
56
|
+
isCompact && form_module.compact,
|
|
57
|
+
hasError && form_module.error,
|
|
58
|
+
className,
|
|
59
|
+
]), disabled: disabled, id: componentId, name: name, "aria-label": name, onChange: handleChange, placeholder: placeholder, type: type, value: value, ref: ref, spellCheck: spellCheck, "aria-describedby": ariaDescribedBy, ...otherProps }));
|
|
43
60
|
});
|
|
44
61
|
|
|
45
62
|
exports.TextField = TextField;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.cjs","sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import React, { useCallback, ChangeEvent, forwardRef, useMemo } from 'react';\nimport { TextFieldProps } from './types';\nimport { generateId } from '../../utils/generateId';\n\nimport
|
|
1
|
+
{"version":3,"file":"TextField.cjs","sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import React, { useCallback, ChangeEvent, forwardRef, useMemo } from 'react';\nimport { TextFieldProps } from './types';\nimport { generateId } from '../../utils/generateId';\nimport { buildClassnames } from '../../utils';\n\nimport formStyles from '../../utils/forms/form.module.scss';\nimport styles from './TextField.module.scss';\n\nconst NUMBER_REGEX = /^-?[0-9]*\\.?[0-9]+$/;\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n id,\n className,\n disabled = false,\n disabledMessage,\n hasError,\n multiline = false,\n spellCheck = false,\n name,\n onChange,\n placeholder,\n size = 'base',\n type = 'text',\n value,\n ...otherProps\n }: TextFieldProps,\n ref,\n ) => {\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (!onChange) return;\n const newValue = event.currentTarget.value;\n\n if (newValue === '') {\n onChange(newValue);\n return;\n }\n\n if (type !== 'number') {\n onChange(newValue);\n return;\n }\n\n const reg = new RegExp(NUMBER_REGEX);\n if (!reg.test(newValue)) {\n return;\n }\n\n onChange(newValue);\n },\n [onChange, type],\n );\n\n const componentId = useMemo(() => id ?? generateId('textfield'), [id]);\n const ariaDescribedBy = useMemo(() => {\n if (hasError) return `${componentId}-error`;\n if (disabledMessage) return `${componentId}-disabled`;\n return undefined;\n }, [hasError, disabledMessage, componentId]);\n\n const isCompact = size === 'sm';\n\n if (type === 'text' && multiline) {\n return (\n <textarea\n className={buildClassnames([\n formStyles.base,\n formStyles.fullStyles,\n styles.textarea,\n isCompact && formStyles.compact,\n hasError && formStyles.error,\n className,\n ])}\n disabled={disabled}\n id={componentId}\n name={name}\n onChange={handleChange}\n placeholder={placeholder}\n value={value}\n ref={ref as React.Ref<HTMLTextAreaElement>}\n spellCheck={spellCheck}\n aria-describedby={ariaDescribedBy}\n {...otherProps}\n />\n );\n }\n\n return (\n <input\n className={buildClassnames([\n formStyles.base,\n formStyles.fullStyles,\n styles.input,\n isCompact && formStyles.compact,\n hasError && formStyles.error,\n className,\n ])}\n disabled={disabled}\n id={componentId}\n name={name}\n aria-label={name}\n onChange={handleChange}\n placeholder={placeholder}\n type={type}\n value={value}\n ref={ref}\n spellCheck={spellCheck}\n aria-describedby={ariaDescribedBy}\n {...otherProps}\n />\n );\n },\n);\n"],"names":["forwardRef","useCallback","useMemo","generateId","React","buildClassnames","formStyles","styles"],"mappings":";;;;;;;;;;;;AAQA,MAAM,YAAY,GAAG,qBAAqB;MAE7B,SAAS,GAAGA,gBAAU,CACjC,CACE,EACE,EAAE,EACF,SAAS,EACT,QAAQ,GAAG,KAAK,EAChB,eAAe,EACf,QAAQ,EACR,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,MAAM,EACb,KAAK,EACL,GAAG,UAAU,EACE,EACjB,GAAG,KACD;AACF,IAAA,MAAM,YAAY,GAAGC,iBAAW,CAC9B,CAAC,KAA0D,KAAI;AAC7D,QAAA,IAAI,CAAC,QAAQ;YAAE;AACf,QAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK;QAE1C,IAAI,QAAQ,KAAK,EAAE,EAAE;YACnB,QAAQ,CAAC,QAAQ,CAAC;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EACf,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAqC,EAC1C,UAAU,EAAE,UAAU,EAAA,kBAAA,EACJ,eAAe,KAC7B,UAAU,EAAA,CACd;AAEL,IAAA;AAED,IAAA,QACEF,sBAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EACE,SAAS,EAAEC,+BAAe,CAAC;AACzB,YAAAC,WAAU,CAAC,IAAI;AACf,YAAAA,WAAU,CAAC,UAAU;AACrB,YAAAC,gBAAM,CAAC,KAAK;YACZ,SAAS,IAAID,WAAU,CAAC,OAAO;YAC/B,QAAQ,IAAIA,WAAU,CAAC,KAAK;YAC5B,SAAS;SACV,CAAC,EACF,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,WAAW,EACf,IAAI,EAAE,IAAI,EAAA,YAAA,EACE,IAAI,EAChB,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EAAA,kBAAA,EACJ,eAAe,KAC7B,UAAU,EAAA,CACd;AAEN,CAAC;;;;"}
|
|
@@ -296,6 +296,7 @@ export declare const TextField: React.ForwardRefExoticComponent<{
|
|
|
296
296
|
type?: import("./types").TextFieldType | undefined;
|
|
297
297
|
onChange?: ((value: string) => void) | undefined;
|
|
298
298
|
hasError?: boolean | undefined;
|
|
299
|
+
disabledMessage?: React.ReactNode;
|
|
299
300
|
size?: "base" | "sm" | undefined;
|
|
300
301
|
multiline?: boolean | undefined;
|
|
301
302
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React__default, { forwardRef, useCallback, useMemo } from 'react';
|
|
2
2
|
import { generateId } from '../../utils/generateId.js';
|
|
3
|
-
import {
|
|
3
|
+
import { buildClassnames } from '../../utils/buildClassnames.js';
|
|
4
|
+
import formStyles from '../../utils/forms/form.module.scss.js';
|
|
5
|
+
import styles from './TextField.module.scss.js';
|
|
4
6
|
|
|
5
7
|
const NUMBER_REGEX = /^-?[0-9]*\.?[0-9]+$/;
|
|
6
|
-
const TextField = forwardRef(({ id, className, disabled = false, hasError, multiline = false, spellCheck = false, name, onChange, placeholder, size = 'base', type = 'text', value, ...otherProps }, ref) => {
|
|
8
|
+
const TextField = forwardRef(({ id, className, disabled = false, disabledMessage, hasError, multiline = false, spellCheck = false, name, onChange, placeholder, size = 'base', type = 'text', value, ...otherProps }, ref) => {
|
|
7
9
|
const handleChange = useCallback((event) => {
|
|
8
10
|
if (!onChange)
|
|
9
11
|
return;
|
|
@@ -26,14 +28,29 @@ const TextField = forwardRef(({ id, className, disabled = false, hasError, multi
|
|
|
26
28
|
const ariaDescribedBy = useMemo(() => {
|
|
27
29
|
if (hasError)
|
|
28
30
|
return `${componentId}-error`;
|
|
29
|
-
if (
|
|
31
|
+
if (disabledMessage)
|
|
30
32
|
return `${componentId}-disabled`;
|
|
31
33
|
return undefined;
|
|
32
|
-
}, [hasError,
|
|
34
|
+
}, [hasError, disabledMessage, componentId]);
|
|
35
|
+
const isCompact = size === 'sm';
|
|
33
36
|
if (type === 'text' && multiline) {
|
|
34
|
-
return (React__default.createElement(
|
|
37
|
+
return (React__default.createElement("textarea", { className: buildClassnames([
|
|
38
|
+
formStyles.base,
|
|
39
|
+
formStyles.fullStyles,
|
|
40
|
+
styles.textarea,
|
|
41
|
+
isCompact && formStyles.compact,
|
|
42
|
+
hasError && formStyles.error,
|
|
43
|
+
className,
|
|
44
|
+
]), disabled: disabled, id: componentId, name: name, onChange: handleChange, placeholder: placeholder, value: value, ref: ref, spellCheck: spellCheck, "aria-describedby": ariaDescribedBy, ...otherProps }));
|
|
35
45
|
}
|
|
36
|
-
return (React__default.createElement(
|
|
46
|
+
return (React__default.createElement("input", { className: buildClassnames([
|
|
47
|
+
formStyles.base,
|
|
48
|
+
formStyles.fullStyles,
|
|
49
|
+
styles.input,
|
|
50
|
+
isCompact && formStyles.compact,
|
|
51
|
+
hasError && formStyles.error,
|
|
52
|
+
className,
|
|
53
|
+
]), disabled: disabled, id: componentId, name: name, "aria-label": name, onChange: handleChange, placeholder: placeholder, type: type, value: value, ref: ref, spellCheck: spellCheck, "aria-describedby": ariaDescribedBy, ...otherProps }));
|
|
37
54
|
});
|
|
38
55
|
|
|
39
56
|
export { TextField };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import React, { useCallback, ChangeEvent, forwardRef, useMemo } from 'react';\nimport { TextFieldProps } from './types';\nimport { generateId } from '../../utils/generateId';\n\nimport
|
|
1
|
+
{"version":3,"file":"TextField.js","sources":["../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import React, { useCallback, ChangeEvent, forwardRef, useMemo } from 'react';\nimport { TextFieldProps } from './types';\nimport { generateId } from '../../utils/generateId';\nimport { buildClassnames } from '../../utils';\n\nimport formStyles from '../../utils/forms/form.module.scss';\nimport styles from './TextField.module.scss';\n\nconst NUMBER_REGEX = /^-?[0-9]*\\.?[0-9]+$/;\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n id,\n className,\n disabled = false,\n disabledMessage,\n hasError,\n multiline = false,\n spellCheck = false,\n name,\n onChange,\n placeholder,\n size = 'base',\n type = 'text',\n value,\n ...otherProps\n }: TextFieldProps,\n ref,\n ) => {\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n if (!onChange) return;\n const newValue = event.currentTarget.value;\n\n if (newValue === '') {\n onChange(newValue);\n return;\n }\n\n if (type !== 'number') {\n onChange(newValue);\n return;\n }\n\n const reg = new RegExp(NUMBER_REGEX);\n if (!reg.test(newValue)) {\n return;\n }\n\n onChange(newValue);\n },\n [onChange, type],\n );\n\n const componentId = useMemo(() => id ?? generateId('textfield'), [id]);\n const ariaDescribedBy = useMemo(() => {\n if (hasError) return `${componentId}-error`;\n if (disabledMessage) return `${componentId}-disabled`;\n return undefined;\n }, [hasError, disabledMessage, componentId]);\n\n const isCompact = size === 'sm';\n\n if (type === 'text' && multiline) {\n return (\n <textarea\n className={buildClassnames([\n formStyles.base,\n formStyles.fullStyles,\n styles.textarea,\n isCompact && formStyles.compact,\n hasError && formStyles.error,\n className,\n ])}\n disabled={disabled}\n id={componentId}\n name={name}\n onChange={handleChange}\n placeholder={placeholder}\n value={value}\n ref={ref as React.Ref<HTMLTextAreaElement>}\n spellCheck={spellCheck}\n aria-describedby={ariaDescribedBy}\n {...otherProps}\n />\n );\n }\n\n return (\n <input\n className={buildClassnames([\n formStyles.base,\n formStyles.fullStyles,\n styles.input,\n isCompact && formStyles.compact,\n hasError && formStyles.error,\n className,\n ])}\n disabled={disabled}\n id={componentId}\n name={name}\n aria-label={name}\n onChange={handleChange}\n placeholder={placeholder}\n type={type}\n value={value}\n ref={ref}\n spellCheck={spellCheck}\n aria-describedby={ariaDescribedBy}\n {...otherProps}\n />\n );\n },\n);\n"],"names":["React"],"mappings":";;;;;;AAQA,MAAM,YAAY,GAAG,qBAAqB;MAE7B,SAAS,GAAG,UAAU,CACjC,CACE,EACE,EAAE,EACF,SAAS,EACT,QAAQ,GAAG,KAAK,EAChB,eAAe,EACf,QAAQ,EACR,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,MAAM,EACb,KAAK,EACL,GAAG,UAAU,EACE,EACjB,GAAG,KACD;AACF,IAAA,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,KAA0D,KAAI;AAC7D,QAAA,IAAI,CAAC,QAAQ;YAAE;AACf,QAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK;QAE1C,IAAI,QAAQ,KAAK,EAAE,EAA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B,EAAE,EAAE,WAAW,EACf,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAqC,EAC1C,UAAU,EAAE,UAAU,EAAA,kBAAA,EACJ,eAAe,KAC7B,UAAU,EAAA,CACd;AAEL,IAAA;AAED,IAAA,QACEA,cAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EACE,SAAS,EAAE,eAAe,CAAC;AACzB,YAAA,UAAU,CAAC,IAAI;AACf,YAAA,UAAU,CAAC,UAAU;AACrB,YAAA,MAAM,CAAC,KAAK;YACZ,SAAS,IAAI,UAAU,CAAC,OAAO;YAC/B,QAAQ,IAAI,UAAU,CAAC,KAAK;YAC5B,SAAS;SACV,CAAC,EACF,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,WAAW,EACf,IAAI,EAAE,IAAI,EAAA,YAAA,EACE,IAAI,EAChB,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,WAAW,EACxB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,UAAU,EAAA,kBAAA,EACJ,eAAe,KAC7B,UAAU,EAAA,CACd;AAEN,CAAC;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ___$insertStyle = require('../../_virtual/____insertStyle.cjs');
|
|
4
|
+
|
|
5
|
+
___$insertStyle("._input_qtip3_1 {\n /* Overrides browser default width - note: this breaks the native [size] attribute */\n width: 100%;\n /* Hide number arrows/spinners */\n}\n._input_qtip3_1::-webkit-outer-spin-button, ._input_qtip3_1::-webkit-inner-spin-button {\n appearance: none;\n margin: 0;\n}\n._input_qtip3_1[type=number] {\n appearance: textfield;\n min-width: 8ch;\n text-align: right;\n}\n\n._textarea_qtip3_16 {\n padding-block: var(--sizes-2);\n}");
|
|
6
|
+
var styles = {"input":"_input_qtip3_1","textarea":"_textarea_qtip3_16"};
|
|
7
|
+
|
|
8
|
+
module.exports = styles;
|
|
9
|
+
//# sourceMappingURL=TextField.module.scss.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextField.module.scss.cjs","sources":["../../../src/components/TextField/TextField.module.scss"],"sourcesContent":[".input {\n /* Overrides browser default width - note: this breaks the native [size] attribute */\n width: 100%;\n\n /* Hide number arrows/spinners */\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n appearance: none;\n margin: 0;\n }\n\n &[type='number'] {\n appearance: textfield;\n min-width: 8ch;\n text-align: right;\n }\n}\n\n.textarea {\n padding-block: var(--sizes-2);\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,ycAAA;AACA,aAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,UAAA,CAAA,oBAAA;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import insertStyle from '../../_virtual/____insertStyle.js';
|
|
2
|
+
|
|
3
|
+
insertStyle("._input_qtip3_1 {\n /* Overrides browser default width - note: this breaks the native [size] attribute */\n width: 100%;\n /* Hide number arrows/spinners */\n}\n._input_qtip3_1::-webkit-outer-spin-button, ._input_qtip3_1::-webkit-inner-spin-button {\n appearance: none;\n margin: 0;\n}\n._input_qtip3_1[type=number] {\n appearance: textfield;\n min-width: 8ch;\n text-align: right;\n}\n\n._textarea_qtip3_16 {\n padding-block: var(--sizes-2);\n}");
|
|
4
|
+
var styles = {"input":"_input_qtip3_1","textarea":"_textarea_qtip3_16"};
|
|
5
|
+
|
|
6
|
+
export { styles as default };
|
|
7
|
+
//# sourceMappingURL=TextField.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextField.module.scss.js","sources":["../../../src/components/TextField/TextField.module.scss"],"sourcesContent":[".input {\n /* Overrides browser default width - note: this breaks the native [size] attribute */\n width: 100%;\n\n /* Hide number arrows/spinners */\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n appearance: none;\n margin: 0;\n }\n\n &[type='number'] {\n appearance: textfield;\n min-width: 8ch;\n text-align: right;\n }\n}\n\n.textarea {\n padding-block: var(--sizes-2);\n}\n"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,ycAAA;AACA,aAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,UAAA,CAAA,oBAAA;;;;"}
|
|
@@ -297,6 +297,7 @@ export declare const TextField: import("react").ForwardRefExoticComponent<Omit<{
|
|
|
297
297
|
type?: import("./types").TextFieldType | undefined;
|
|
298
298
|
onChange?: ((value: string) => void) | undefined;
|
|
299
299
|
hasError?: boolean | undefined;
|
|
300
|
+
disabledMessage?: import("react").ReactNode;
|
|
300
301
|
size?: "base" | "sm" | undefined;
|
|
301
302
|
multiline?: boolean | undefined;
|
|
302
303
|
} & import("react").RefAttributes<HTMLInputElement> & import("../../hoc/withLabels/withLabels").WithLabelsProps, "ref"> & import("react").RefAttributes<unknown>>;
|
|
@@ -1,14 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { ComponentSizeType } from '../types';
|
|
3
3
|
export type TextFieldType = 'text' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'url' | 'date' | 'datetime-local' | 'month' | 'time' | 'week' | 'currency';
|
|
4
4
|
export declare const textFieldTypes: readonly ["text", "email", "number", "password", "search", "tel", "url", "date", "datetime-local", "month", "time", "week", "currency"];
|
|
5
5
|
type CommonAttributes = Omit<React.InputHTMLAttributes<HTMLInputElement> & React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange' | 'size' | 'type' | 'value'>;
|
|
6
6
|
export type TextFieldProps = CommonAttributes & {
|
|
7
|
+
/** Current input value. */
|
|
7
8
|
value?: string;
|
|
9
|
+
/** HTML input type. Defaults to `'text'`. */
|
|
8
10
|
type?: TextFieldType;
|
|
11
|
+
/** Callback fired with the new value on change. */
|
|
9
12
|
onChange?: (value: string) => void;
|
|
13
|
+
/** When true, applies error styling. Used with `withLabels` to display an error message. */
|
|
10
14
|
hasError?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* When provided, links the input to the disabled message element via `aria-describedby`.
|
|
17
|
+
* Passed through from `withLabels` — the HOC renders the visible message and sets `disabled`.
|
|
18
|
+
*/
|
|
19
|
+
disabledMessage?: React.ReactNode;
|
|
20
|
+
/** Component size variant. Defaults to `'base'`. */
|
|
11
21
|
size?: ComponentSizeType;
|
|
22
|
+
/** Renders a `<textarea>` instead of `<input>` when `type` is `'text'`. */
|
|
12
23
|
multiline?: boolean;
|
|
13
24
|
};
|
|
14
25
|
export {};
|
|
@@ -9,4 +9,8 @@ export declare const ButtonSC: import("styled-components").StyledComponent<impor
|
|
|
9
9
|
dropdown?: boolean | undefined;
|
|
10
10
|
loading?: boolean | undefined;
|
|
11
11
|
contentStyles?: import("react").CSSProperties | undefined;
|
|
12
|
+
as?: import("react").ElementType | undefined;
|
|
13
|
+
href?: string | undefined;
|
|
14
|
+
target?: string | undefined;
|
|
15
|
+
rel?: string | undefined;
|
|
12
16
|
} & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("../../hoc/withTokens").WithTokensProps & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
@@ -21,14 +21,14 @@ const withLabels = (Component) => {
|
|
|
21
21
|
const ComponentWithLabels = React.forwardRef(({ label, hint, error, disabledMessage, tooltip, tooltipContent, id, ...otherProps }, ref) => {
|
|
22
22
|
const componentId = useId.useId({ id, prefix: Component.name });
|
|
23
23
|
if (!label)
|
|
24
|
-
return (React__default.default.createElement(Component, { ref: ref, id: componentId, hasError: !!error, disabled: !!disabledMessage, ...otherProps }));
|
|
24
|
+
return (React__default.default.createElement(Component, { ref: ref, id: componentId, hasError: !!error, disabled: !!disabledMessage, disabledMessage: disabledMessage, ...otherProps }));
|
|
25
25
|
return (React__default.default.createElement(FlexCol.FlexCol, { className: withLabels_module.rootStack },
|
|
26
26
|
React__default.default.createElement(FlexRow.FlexRow, null,
|
|
27
27
|
React__default.default.createElement(Text.Text, { variant: "inputLabel", id: `${componentId}-label`, htmlFor: componentId }, label),
|
|
28
28
|
(tooltip || tooltipContent) && (React__default.default.createElement(styled.BlockTooltip, { text: tooltip, content: tooltipContent },
|
|
29
29
|
React__default.default.createElement(HelpIcon.ReactComponent, { "data-testid": "tooltip-help", width: index.theme.sizes.base, height: index.theme.sizes.base, color: index.theme.colors.neutral.ink.light })))),
|
|
30
|
-
hint && React__default.default.createElement(Text.Text, { variant: "hintText", as: "span", className: withLabels_module.hint, id: `${componentId}-hint` }, hint),
|
|
31
|
-
React__default.default.createElement(Component, { ref: ref, id: componentId, hasError: !!error, disabled: !!disabledMessage, ...otherProps }),
|
|
30
|
+
hint && (React__default.default.createElement(Text.Text, { variant: "hintText", as: "span", className: withLabels_module.hint, id: `${componentId}-hint` }, hint)),
|
|
31
|
+
React__default.default.createElement(Component, { ref: ref, id: componentId, hasError: !!error, disabled: !!disabledMessage, disabledMessage: disabledMessage, ...otherProps }),
|
|
32
32
|
error && (React__default.default.createElement(FlexRow.FlexRow, { id: `${componentId}-error`, gap: "xs" },
|
|
33
33
|
React__default.default.createElement(CriticalIcon.ReactComponent, { width: 16, height: 16, color: index.theme.colors.secondary.red.base }),
|
|
34
34
|
React__default.default.createElement(Text.Text, { variant: "error", as: "span", className: withLabels_module.error }, error))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withLabels.cjs","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, forwardRef, ReactNode } from 'react';\n\nimport { FlexCol } from '../../components/Flex/FlexCol';\nimport { FlexRow } from '../../components/Flex/FlexRow';\nimport { Text } from '../../components/Text';\nimport { useId } from '../../hooks/useId';\nimport { CriticalIcon, HelpIcon, LockIcon } from '../../icons';\nimport { theme } from '../../theme';\n\nimport { BlockTooltip } from './styled';\nimport styles from './withLabels.module.scss';\n\nexport interface WithLabelsProps {\n id?: string;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n disabledMessage?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n}\n\n// eslint-disable-next-line @typescript-eslint/comma-dangle -- comma is required so TS knows this is a generic, not JSX\nexport const withLabels = <P, R = unknown>(Component: ComponentType<P>) => {\n const ComponentWithLabels = forwardRef<R, P & WithLabelsProps>(\n ({ label, hint, error, disabledMessage, tooltip, tooltipContent, id, ...otherProps }, ref) => {\n const componentId = useId({ id, prefix: Component.name });\n\n if (!label)\n return (\n <Component\n ref={ref}\n id={componentId}\n hasError={!!error}\n disabled={!!disabledMessage}\n {...(otherProps as P)}\n />\n );\n\n return (\n <FlexCol className={styles.rootStack}>\n <FlexRow>\n <Text variant=\"inputLabel\" id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Text>\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n width={theme.sizes.base}\n height={theme.sizes.base}\n color={theme.colors.neutral.ink.light}\n />\n </BlockTooltip>\n )}\n </FlexRow>\n {hint && <Text variant=\"hintText\" as=\"span\" className={styles.hint} id={`${componentId}-hint`}
|
|
1
|
+
{"version":3,"file":"withLabels.cjs","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, forwardRef, ReactNode } from 'react';\n\nimport { FlexCol } from '../../components/Flex/FlexCol';\nimport { FlexRow } from '../../components/Flex/FlexRow';\nimport { Text } from '../../components/Text';\nimport { useId } from '../../hooks/useId';\nimport { CriticalIcon, HelpIcon, LockIcon } from '../../icons';\nimport { theme } from '../../theme';\n\nimport { BlockTooltip } from './styled';\nimport styles from './withLabels.module.scss';\n\nexport interface WithLabelsProps {\n id?: string;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n disabledMessage?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n}\n\n// eslint-disable-next-line @typescript-eslint/comma-dangle -- comma is required so TS knows this is a generic, not JSX\nexport const withLabels = <P, R = unknown>(Component: ComponentType<P>) => {\n const ComponentWithLabels = forwardRef<R, P & WithLabelsProps>(\n ({ label, hint, error, disabledMessage, tooltip, tooltipContent, id, ...otherProps }, ref) => {\n const componentId = useId({ id, prefix: Component.name });\n\n if (!label)\n return (\n <Component\n ref={ref}\n id={componentId}\n hasError={!!error}\n disabled={!!disabledMessage}\n disabledMessage={disabledMessage}\n {...(otherProps as P)}\n />\n );\n\n return (\n <FlexCol className={styles.rootStack}>\n <FlexRow>\n <Text variant=\"inputLabel\" id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Text>\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n width={theme.sizes.base}\n height={theme.sizes.base}\n color={theme.colors.neutral.ink.light}\n />\n </BlockTooltip>\n )}\n </FlexRow>\n {hint && (\n <Text variant=\"hintText\" as=\"span\" className={styles.hint} id={`${componentId}-hint`}>\n {hint}\n </Text>\n )}\n <Component\n ref={ref}\n id={componentId}\n hasError={!!error}\n disabled={!!disabledMessage}\n disabledMessage={disabledMessage}\n {...(otherProps as P)}\n />\n {error && (\n <FlexRow id={`${componentId}-error`} gap=\"xs\">\n <CriticalIcon width={16} height={16} color={theme.colors.secondary.red.base} />\n <Text variant=\"error\" as=\"span\" className={styles.error}>\n {error}\n </Text>\n </FlexRow>\n )}\n {disabledMessage && (\n <FlexRow id={`${componentId}-disabled`} gap=\"xs\">\n <LockIcon width={16} height={16} color={theme.colors.neutral.ink.light} />\n <Text variant=\"bodyBold\" as=\"span\">\n {disabledMessage}\n </Text>\n </FlexRow>\n )}\n </FlexCol>\n );\n },\n );\n\n ComponentWithLabels.displayName = `withLabels(${Component.displayName || Component.name || 'Component'})`;\n\n return ComponentWithLabels;\n};\n"],"names":["forwardRef","useId","React","FlexCol","styles","FlexRow","Text","BlockTooltip","HelpIcon","theme","CriticalIcon","Lock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K,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAEF,WAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAA,CAAI;AAC1E,gBAAAP,sBAAA,CAAA,aAAA,CAACI,SAAI,EAAA,EAAC,OAAO,EAAC,UAAU,EAAC,EAAE,EAAC,MAAM,EAAA,EAC/B,eAAe,CACX,CACC,CACX,CACO;AAEd,IAAA,CAAC,CACF;AAED,IAAA,mBAAmB,CAAC,WAAW,GAAG,CAAA,WAAA,EAAc,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,GAAG;AAEzG,IAAA,OAAO,mBAAmB;AAC5B;;;;"}
|
|
@@ -15,14 +15,14 @@ const withLabels = (Component) => {
|
|
|
15
15
|
const ComponentWithLabels = forwardRef(({ label, hint, error, disabledMessage, tooltip, tooltipContent, id, ...otherProps }, ref) => {
|
|
16
16
|
const componentId = useId({ id, prefix: Component.name });
|
|
17
17
|
if (!label)
|
|
18
|
-
return (React__default.createElement(Component, { ref: ref, id: componentId, hasError: !!error, disabled: !!disabledMessage, ...otherProps }));
|
|
18
|
+
return (React__default.createElement(Component, { ref: ref, id: componentId, hasError: !!error, disabled: !!disabledMessage, disabledMessage: disabledMessage, ...otherProps }));
|
|
19
19
|
return (React__default.createElement(FlexCol, { className: labelStyles.rootStack },
|
|
20
20
|
React__default.createElement(FlexRow, null,
|
|
21
21
|
React__default.createElement(Text, { variant: "inputLabel", id: `${componentId}-label`, htmlFor: componentId }, label),
|
|
22
22
|
(tooltip || tooltipContent) && (React__default.createElement(BlockTooltip, { text: tooltip, content: tooltipContent },
|
|
23
23
|
React__default.createElement(HelpIcon, { "data-testid": "tooltip-help", width: theme.sizes.base, height: theme.sizes.base, color: theme.colors.neutral.ink.light })))),
|
|
24
|
-
hint && React__default.createElement(Text, { variant: "hintText", as: "span", className: labelStyles.hint, id: `${componentId}-hint` }, hint),
|
|
25
|
-
React__default.createElement(Component, { ref: ref, id: componentId, hasError: !!error, disabled: !!disabledMessage, ...otherProps }),
|
|
24
|
+
hint && (React__default.createElement(Text, { variant: "hintText", as: "span", className: labelStyles.hint, id: `${componentId}-hint` }, hint)),
|
|
25
|
+
React__default.createElement(Component, { ref: ref, id: componentId, hasError: !!error, disabled: !!disabledMessage, disabledMessage: disabledMessage, ...otherProps }),
|
|
26
26
|
error && (React__default.createElement(FlexRow, { id: `${componentId}-error`, gap: "xs" },
|
|
27
27
|
React__default.createElement(CriticalIcon, { width: 16, height: 16, color: theme.colors.secondary.red.base }),
|
|
28
28
|
React__default.createElement(Text, { variant: "error", as: "span", className: labelStyles.error }, error))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withLabels.js","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, forwardRef, ReactNode } from 'react';\n\nimport { FlexCol } from '../../components/Flex/FlexCol';\nimport { FlexRow } from '../../components/Flex/FlexRow';\nimport { Text } from '../../components/Text';\nimport { useId } from '../../hooks/useId';\nimport { CriticalIcon, HelpIcon, LockIcon } from '../../icons';\nimport { theme } from '../../theme';\n\nimport { BlockTooltip } from './styled';\nimport styles from './withLabels.module.scss';\n\nexport interface WithLabelsProps {\n id?: string;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n disabledMessage?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n}\n\n// eslint-disable-next-line @typescript-eslint/comma-dangle -- comma is required so TS knows this is a generic, not JSX\nexport const withLabels = <P, R = unknown>(Component: ComponentType<P>) => {\n const ComponentWithLabels = forwardRef<R, P & WithLabelsProps>(\n ({ label, hint, error, disabledMessage, tooltip, tooltipContent, id, ...otherProps }, ref) => {\n const componentId = useId({ id, prefix: Component.name });\n\n if (!label)\n return (\n <Component\n ref={ref}\n id={componentId}\n hasError={!!error}\n disabled={!!disabledMessage}\n {...(otherProps as P)}\n />\n );\n\n return (\n <FlexCol className={styles.rootStack}>\n <FlexRow>\n <Text variant=\"inputLabel\" id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Text>\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n width={theme.sizes.base}\n height={theme.sizes.base}\n color={theme.colors.neutral.ink.light}\n />\n </BlockTooltip>\n )}\n </FlexRow>\n {hint && <Text variant=\"hintText\" as=\"span\" className={styles.hint} id={`${componentId}-hint`}
|
|
1
|
+
{"version":3,"file":"withLabels.js","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, forwardRef, ReactNode } from 'react';\n\nimport { FlexCol } from '../../components/Flex/FlexCol';\nimport { FlexRow } from '../../components/Flex/FlexRow';\nimport { Text } from '../../components/Text';\nimport { useId } from '../../hooks/useId';\nimport { CriticalIcon, HelpIcon, LockIcon } from '../../icons';\nimport { theme } from '../../theme';\n\nimport { BlockTooltip } from './styled';\nimport styles from './withLabels.module.scss';\n\nexport interface WithLabelsProps {\n id?: string;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n disabledMessage?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n}\n\n// eslint-disable-next-line @typescript-eslint/comma-dangle -- comma is required so TS knows this is a generic, not JSX\nexport const withLabels = <P, R = unknown>(Component: ComponentType<P>) => {\n const ComponentWithLabels = forwardRef<R, P & WithLabelsProps>(\n ({ label, hint, error, disabledMessage, tooltip, tooltipContent, id, ...otherProps }, ref) => {\n const componentId = useId({ id, prefix: Component.name });\n\n if (!label)\n return (\n <Component\n ref={ref}\n id={componentId}\n hasError={!!error}\n disabled={!!disabledMessage}\n disabledMessage={disabledMessage}\n {...(otherProps as P)}\n />\n );\n\n return (\n <FlexCol className={styles.rootStack}>\n <FlexRow>\n <Text variant=\"inputLabel\" id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Text>\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n width={theme.sizes.base}\n height={theme.sizes.base}\n color={theme.colors.neutral.ink.light}\n />\n </BlockTooltip>\n )}\n </FlexRow>\n {hint && (\n <Text variant=\"hintText\" as=\"span\" className={styles.hint} id={`${componentId}-hint`}>\n {hint}\n </Text>\n )}\n <Component\n ref={ref}\n id={componentId}\n hasError={!!error}\n disabled={!!disabledMessage}\n disabledMessage={disabledMessage}\n {...(otherProps as P)}\n />\n {error && (\n <FlexRow id={`${componentId}-error`} gap=\"xs\">\n <CriticalIcon width={16} height={16} color={theme.colors.secondary.red.base} />\n <Text variant=\"error\" as=\"span\" className={styles.error}>\n {error}\n </Text>\n </FlexRow>\n )}\n {disabledMessage && (\n <FlexRow id={`${componentId}-disabled`} gap=\"xs\">\n <LockIcon width={16} height={16} color={theme.colors.neutral.ink.light} />\n <Text variant=\"bodyBold\" as=\"span\">\n {disabledMessage}\n </Text>\n </FlexRow>\n )}\n </FlexCol>\n );\n },\n );\n\n ComponentWithLabels.displayName = `withLabels(${Component.displayName || Component.name || 'Component'})`;\n\n return ComponentWithLabels;\n};\n"],"names":["React","styles"],"mappings":";;;;;;;;;;;;AAsBA;AACO,MAAM,UAAU,GAAG,CAAiB,SAA2B,KAAI;IACxE,MAAM,mBAAmB,GAAG,UAAU,CACpC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,GAAG,UAAU,EAAE,EAAE,GAAG,KAAI;AAC3F,QAAA,MAAM,WAAW,GAAG,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;AAEzD,QAAA,IAAI,CAAC,KAAK;AACR,YAAA,QACEA,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EACR,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,WAAW,EACf,QAAQ,EAAE,CAAC,CAAC,KAAK,EACjB,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YAAA,KAAK,KACJA,cAAA,CAAA,aAAA,CAAC,OAAO,EAAA,EAAC,EAAE,EAAE,CAAA,EAAG,WAAW,CAAA,MAAA,CAAQ,EAAE,GAAG,EAAC,IAAI,EAAA;gBAC3CA,cAAA,CAAA,aAAA,CAAC,YAAY,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAA,CAAI;AAC/E,gBAAAA,cAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAC,OAAO,EAAC,OAAO,EAAC,EAAE,EAAC,MAAM,EAAC,SAAS,EAAEC,WAAM,CAAC,KAAK,IACpD,KAAK,CACD,CACC,CACX;AACA,YAAA,eAAe,KACdD,cAAA,CAAA,aAAA,CAAC,OAAO,EAAA,EAAC,EAAE,EAAE,CAAA,EAAG,WAAW,CAAA,SAAA,CAAW,EAAE,GAAG,EAAC,IAAI,EAAA;gBAC9CA,cAAA,CAAA,aAAA,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAA,CAAI;AAC1E,gBAAAA,cAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAC,OAAO,EAAC,UAAU,EAAC,EAAE,EAAC,MAAM,EAAA,EAC/B,eAAe,CACX,CACC,CACX,CACO;AAEd,IAAA,CAAC,CACF;AAED,IAAA,mBAAmB,CAAC,WAAW,GAAG,CAAA,WAAA,EAAc,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,WAAW,GAAG;AAEzG,IAAA,OAAO,mBAAmB;AAC5B;;;;"}
|
package/dist/theme/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { layers } from './modules/layers.js';
|
|
|
4
4
|
import { radius } from './modules/radius.js';
|
|
5
5
|
import { Shadows } from './modules/shadows.js';
|
|
6
6
|
import { sizes } from './modules/sizes.js';
|
|
7
|
-
import {
|
|
7
|
+
import { text, common } from './modules/text.js';
|
|
8
8
|
import 'styled-components';
|
|
9
9
|
|
|
10
10
|
const theme = {
|
package/package.json
CHANGED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var styled = require('styled-components');
|
|
4
|
-
var index = require('../../../theme/index.cjs');
|
|
5
|
-
var sizes = require('../../../theme/modules/sizes.cjs');
|
|
6
|
-
|
|
7
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
|
-
|
|
9
|
-
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
10
|
-
|
|
11
|
-
const MainContent = styled__default.default.span.withConfig({ displayName: "vui--MainContent", componentId: "vui--exbqdz" }) `display:inline-flex;align-items:center;gap:${({ hasText }) => (hasText ? '8px' : '4px')};${({ $loading }) => ($loading ? 'opacity: 0;' : null)};svg{width:${({ size }) => sizes.sizes[size]};height:${({ size }) => sizes.sizes[size]};}`;
|
|
12
|
-
const BaseButton = styled__default.default.button.withConfig({ displayName: "vui--BaseButton", componentId: "vui--nvz516" }) `position:relative;box-sizing:border-box;appearance:none;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-family:${index.theme.fontFamily};font-weight:400;border:1px solid;background-color:transparent;white-space:nowrap;${(props) => {
|
|
13
|
-
let height = '40px';
|
|
14
|
-
let paddingLeft = '24px';
|
|
15
|
-
let paddingRight = '24px';
|
|
16
|
-
let borderRadius = '8px';
|
|
17
|
-
let fontSize = '16px';
|
|
18
|
-
let outlineWidth = '4px';
|
|
19
|
-
if (props.hasIcon) {
|
|
20
|
-
paddingLeft = '16px';
|
|
21
|
-
}
|
|
22
|
-
if (props.hasDropdown) {
|
|
23
|
-
paddingRight = '16px';
|
|
24
|
-
}
|
|
25
|
-
if (props.size === 'sm') {
|
|
26
|
-
height = '32px';
|
|
27
|
-
paddingLeft = '16px';
|
|
28
|
-
paddingRight = '16px';
|
|
29
|
-
borderRadius = '4px';
|
|
30
|
-
fontSize = '14px';
|
|
31
|
-
outlineWidth = '2px';
|
|
32
|
-
if (props.hasIcon) {
|
|
33
|
-
paddingLeft = '8px';
|
|
34
|
-
}
|
|
35
|
-
if (props.hasDropdown) {
|
|
36
|
-
paddingRight = '8px';
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
if (!props.hasText) {
|
|
40
|
-
paddingLeft = '8px';
|
|
41
|
-
paddingRight = '8px';
|
|
42
|
-
}
|
|
43
|
-
return `
|
|
44
|
-
--outline-width: ${outlineWidth};
|
|
45
|
-
|
|
46
|
-
height: ${height};
|
|
47
|
-
padding-left: ${paddingLeft};
|
|
48
|
-
padding-right: ${paddingRight};
|
|
49
|
-
border-radius: ${borderRadius};
|
|
50
|
-
font-size: ${fontSize};
|
|
51
|
-
line-height: ${fontSize};
|
|
52
|
-
`;
|
|
53
|
-
}} &:hover{cursor:pointer;}&:disabled{pointer-events:none;cursor:unset !important;}`;
|
|
54
|
-
const DefaultButton = styled__default.default(BaseButton).withConfig({ displayName: "vui--DefaultButton", componentId: "vui--1xzjfje" }) `border-color:${index.theme.colors.neutral.grey.dark};background-color:white;box-shadow:0 1px 3px rgba(55, 66, 77, 0.15);color:${({ hasText }) => hasText ? index.theme.colors.neutral.ink.base : index.theme.colors.secondary.blue.base};&:hover{background-color:${index.theme.colors.neutral.grey.lightest};}&:active{background-color:${index.theme.colors.neutral.grey.lightest};border-color:${index.theme.colors.secondary.blue.base};box-shadow:0 0 0 var(--outline-width)${index.theme.colors.secondary.blue.light};}&:focus-visible{box-shadow:0 0 0 var(--outline-width)${index.theme.colors.secondary.blue.light};outline:0;}&:disabled{box-shadow:none !important;background-color:${index.theme.colors.neutral.grey.base} !important;border-color:${index.theme.colors.neutral.grey.base} !important;color:${index.theme.colors.neutral.ink.light} !important;}`;
|
|
55
|
-
const DefaultDestructiveButton = styled__default.default(DefaultButton).withConfig({ displayName: "vui--DefaultDestructiveButton", componentId: "vui--1ixaf03" }) `color:${index.theme.colors.secondary.red.base};&:hover{color:${index.theme.colors.secondary.red.dark};}&:active{border-color:${index.theme.colors.secondary.red.base};box-shadow:0 0 0 var(--outline-width)${index.theme.colors.secondary.red.light};color:${index.theme.colors.secondary.red.dark};}&:focus-visible{box-shadow:0 0 0 var(--outline-width)${index.theme.colors.secondary.red.light};}`;
|
|
56
|
-
const PrimaryButton = styled__default.default(DefaultButton).withConfig({ displayName: "vui--PrimaryButton", componentId: "vui--16w0ufk" }) `background-color:var(--theme-primary, ${index.theme.colors.secondary.blue.base});border-color:var(--theme-primary, ${index.theme.colors.secondary.blue.base});color:var(--theme-on-primary, white);&:hover{background-color:var(--theme-primary-hover, ${index.theme.colors.secondary.blue.dark});border-color:var(--theme-primary-hover, ${index.theme.colors.secondary.blue.dark});}&:active{background-color:var(--theme-primary-hover, ${index.theme.colors.secondary.blue.dark});border-color:var(--theme-primary-hover, ${index.theme.colors.secondary.blue.dark});box-shadow:0 0 0 var(--outline-width)${index.theme.colors.secondary.blue.light};}&:focus-visible{box-shadow:0 0 0 var(--outline-width)${index.theme.colors.secondary.blue.light};}`;
|
|
57
|
-
const PrimaryDestructiveButton = styled__default.default(PrimaryButton).withConfig({ displayName: "vui--PrimaryDestructiveButton", componentId: "vui--1w3lv3r" }) `background-color:${index.theme.colors.secondary.red.base};border-color:${index.theme.colors.secondary.red.base};color:white;&:hover{background-color:${index.theme.colors.secondary.red.dark};border-color:${index.theme.colors.secondary.red.dark};}&:active{background-color:${index.theme.colors.secondary.red.dark};border-color:${index.theme.colors.secondary.red.dark};box-shadow:0 0 0 var(--outline-width)${index.theme.colors.secondary.red.light};}&:focus-visible{box-shadow:0 0 0 var(--outline-width)${index.theme.colors.secondary.red.light};}`;
|
|
58
|
-
const FlatButton = styled__default.default(BaseButton).withConfig({ displayName: "vui--FlatButton", componentId: "vui--fqczse" }) `border-color:transparent;box-shadow:none;color:${index.theme.colors.neutral.ink.base};&:hover{background-color:${index.theme.colors.neutral.grey.light};}&:active{background-color:${index.theme.colors.neutral.grey.light};box-shadow:0 0 0 var(--outline-width)${index.theme.colors.secondary.blue.light};}&:focus-visible{box-shadow:0 0 0 var(--outline-width)${index.theme.colors.secondary.blue.light};outline:0;}&:disabled{background-color:transparent;border-color:transparent;}`;
|
|
59
|
-
const UnstyledButton = styled__default.default.button.withConfig({ displayName: "vui--UnstyledButton", componentId: "vui--1fxilc" }) `appearance:none;border:0;background-color:transparent;padding:0;font:inherit;&:hover{cursor:pointer;}`;
|
|
60
|
-
const LinkButton = styled__default.default(UnstyledButton).withConfig({ displayName: "vui--LinkButton", componentId: "vui--z932nb" }) `display:inline-flex;flex-direction:row;align-items:center;font-family:${index.theme.text.link.fontFamily};font-size:${index.theme.text.link.fontSize};line-height:${index.theme.text.link.fontSize};font-weight:${index.theme.text.link.fontWeight};line-height:${index.theme.text.link.lineHeight};text-decoration:${index.theme.text.link.textDecoration};color:${index.theme.colors.secondary.blue.base};&:hover{color:${index.theme.colors.secondary.blue.dark};}& > * + *{margin-left:${index.theme.sizes.xs};}&:focus-visible{outline:0;box-shadow:0 0 0 4px white,0 0 0 8px ${index.theme.colors.secondary.blue.light};border-radius:4px;}`;
|
|
61
|
-
const LoadingWrapper = styled__default.default.div.withConfig({ displayName: "vui--LoadingWrapper", componentId: "vui--1qt232p" }) `position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;margin-left:0;`;
|
|
62
|
-
|
|
63
|
-
exports.DefaultButton = DefaultButton;
|
|
64
|
-
exports.DefaultDestructiveButton = DefaultDestructiveButton;
|
|
65
|
-
exports.FlatButton = FlatButton;
|
|
66
|
-
exports.LinkButton = LinkButton;
|
|
67
|
-
exports.LoadingWrapper = LoadingWrapper;
|
|
68
|
-
exports.MainContent = MainContent;
|
|
69
|
-
exports.PrimaryButton = PrimaryButton;
|
|
70
|
-
exports.PrimaryDestructiveButton = PrimaryDestructiveButton;
|
|
71
|
-
exports.UnstyledButton = UnstyledButton;
|
|
72
|
-
//# sourceMappingURL=styled.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styled.cjs","sources":["../../../../src/components/Button/components/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { theme } from '../../../theme';\nimport { sizes } from '../../../theme/modules/sizes';\n\ninterface ButtonDisplayProps {\n size: 'sm' | 'base';\n hasText: boolean;\n hasIcon: boolean;\n hasDropdown: boolean;\n}\n\nexport const MainContent = styled.span<{\n $loading?: boolean;\n hasText: boolean;\n size: 'base' | 'md';\n}>`\n display: inline-flex;\n align-items: center;\n\n gap: ${({ hasText }) => (hasText ? '8px' : '4px')};\n ${({ $loading }) => ($loading ? 'opacity: 0;' : null)};\n\n svg {\n width: ${({ size }) => sizes[size]};\n height: ${({ size }) => sizes[size]};\n }\n`;\n\nconst BaseButton = styled.button<ButtonDisplayProps>`\n position: relative;\n box-sizing: border-box;\n appearance: none;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n font-family: ${theme.fontFamily};\n font-weight: 400;\n border: 1px solid;\n background-color: transparent;\n white-space: nowrap;\n\n ${(props) => {\n let height = '40px';\n let paddingLeft = '24px';\n let paddingRight = '24px';\n let borderRadius = '8px';\n let fontSize = '16px';\n let outlineWidth = '4px';\n\n if (props.hasIcon) {\n paddingLeft = '16px';\n }\n\n if (props.hasDropdown) {\n paddingRight = '16px';\n }\n\n if (props.size === 'sm') {\n height = '32px';\n paddingLeft = '16px';\n paddingRight = '16px';\n borderRadius = '4px';\n fontSize = '14px';\n outlineWidth = '2px';\n\n if (props.hasIcon) {\n paddingLeft = '8px';\n }\n\n if (props.hasDropdown) {\n paddingRight = '8px';\n }\n }\n\n if (!props.hasText) {\n paddingLeft = '8px';\n paddingRight = '8px';\n }\n\n return `\n --outline-width: ${outlineWidth};\n\n height: ${height};\n padding-left: ${paddingLeft};\n padding-right: ${paddingRight};\n border-radius: ${borderRadius};\n font-size: ${fontSize};\n line-height: ${fontSize};\n `;\n }}\n\n &:hover {\n cursor: pointer;\n }\n\n &:disabled {\n pointer-events: none;\n cursor: unset !important;\n }\n`;\n\nexport const DefaultButton = styled(BaseButton as any)`\n border-color: ${theme.colors.neutral.grey.dark};\n background-color: white;\n box-shadow: 0 1px 3px rgba(55, 66, 77, 0.15);\n color: ${({ hasText }) =>\n hasText ? theme.colors.neutral.ink.base : theme.colors.secondary.blue.base};\n\n &:hover {\n background-color: ${theme.colors.neutral.grey.lightest};\n }\n\n &:active {\n background-color: ${theme.colors.neutral.grey.lightest};\n border-color: ${theme.colors.secondary.blue.base};\n box-shadow: 0 0 0 var(--outline-width) ${theme.colors.secondary.blue.light};\n }\n\n &:focus-visible {\n box-shadow: 0 0 0 var(--outline-width) ${theme.colors.secondary.blue.light};\n outline: 0;\n }\n\n &:disabled {\n box-shadow: none !important;\n background-color: ${theme.colors.neutral.grey.base} !important;\n border-color: ${theme.colors.neutral.grey.base} !important;\n color: ${theme.colors.neutral.ink.light} !important;\n }\n`;\n\nexport const DefaultDestructiveButton = styled(DefaultButton as any)`\n color: ${theme.colors.secondary.red.base};\n\n &:hover {\n color: ${theme.colors.secondary.red.dark};\n }\n\n &:active {\n border-color: ${theme.colors.secondary.red.base};\n box-shadow: 0 0 0 var(--outline-width) ${theme.colors.secondary.red.light};\n color: ${theme.colors.secondary.red.dark};\n }\n\n &:focus-visible {\n box-shadow: 0 0 0 var(--outline-width) ${theme.colors.secondary.red.light};\n }\n`;\n\nexport const PrimaryButton = styled(DefaultButton as any)`\n background-color: var(--theme-primary, ${theme.colors.secondary.blue.base});\n border-color: var(--theme-primary, ${theme.colors.secondary.blue.base});\n color: var(--theme-on-primary, white);\n\n &:hover {\n background-color: var(--theme-primary-hover, ${theme.colors.secondary.blue.dark});\n border-color: var(--theme-primary-hover, ${theme.colors.secondary.blue.dark});\n }\n\n &:active {\n background-color: var(--theme-primary-hover, ${theme.colors.secondary.blue.dark});\n border-color: var(--theme-primary-hover, ${theme.colors.secondary.blue.dark});\n box-shadow: 0 0 0 var(--outline-width) ${theme.colors.secondary.blue.light};\n }\n\n &:focus-visible {\n box-shadow: 0 0 0 var(--outline-width) ${theme.colors.secondary.blue.light};\n }\n`;\n\nexport const PrimaryDestructiveButton = styled(PrimaryButton as any)`\n background-color: ${theme.colors.secondary.red.base};\n border-color: ${theme.colors.secondary.red.base};\n color: white;\n\n &:hover {\n background-color: ${theme.colors.secondary.red.dark};\n border-color: ${theme.colors.secondary.red.dark};\n }\n\n &:active {\n background-color: ${theme.colors.secondary.red.dark};\n border-color: ${theme.colors.secondary.red.dark};\n box-shadow: 0 0 0 var(--outline-width) ${theme.colors.secondary.red.light};\n }\n\n &:focus-visible {\n box-shadow: 0 0 0 var(--outline-width) ${theme.colors.secondary.red.light};\n }\n`;\n\nexport const FlatButton = styled(BaseButton as any)`\n border-color: transparent;\n box-shadow: none;\n color: ${theme.colors.neutral.ink.base};\n\n &:hover {\n background-color: ${theme.colors.neutral.grey.light};\n }\n\n &:active {\n background-color: ${theme.colors.neutral.grey.light};\n box-shadow: 0 0 0 var(--outline-width) ${theme.colors.secondary.blue.light};\n }\n\n &:focus-visible {\n box-shadow: 0 0 0 var(--outline-width) ${theme.colors.secondary.blue.light};\n outline: 0;\n }\n\n &:disabled {\n background-color: transparent;\n border-color: transparent;\n }\n`;\n\nexport const UnstyledButton = styled.button`\n appearance: none;\n border: 0;\n background-color: transparent;\n padding: 0;\n font: inherit;\n\n &:hover {\n cursor: pointer;\n }\n`;\n\nexport const LinkButton = styled(UnstyledButton)<ButtonDisplayProps>`\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n\n font-family: ${theme.text.link.fontFamily};\n font-size: ${theme.text.link.fontSize};\n line-height: ${theme.text.link.fontSize};\n font-weight: ${theme.text.link.fontWeight};\n line-height: ${theme.text.link.lineHeight};\n text-decoration: ${theme.text.link.textDecoration};\n color: ${theme.colors.secondary.blue.base};\n\n &:hover {\n color: ${theme.colors.secondary.blue.dark};\n }\n\n & > * + * {\n margin-left: ${theme.sizes.xs};\n }\n\n &:focus-visible {\n outline: 0;\n box-shadow:\n 0 0 0 4px white,\n 0 0 0 8px ${theme.colors.secondary.blue.light};\n border-radius: 4px;\n }\n`;\n\nexport const LoadingWrapper = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: 0;\n`;\n"],"names":["styled","sizes","theme"],"mappings":";;;;;;;;;;AAWO,MAAM,WAAW,GAAGA,uBAAM,CAAC,IAAI,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,kBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,2CAAA,EAQ7B,CAAC,EAAE,OAAO,EAAE,MAAM,OAAO,GAAG,KAAK,GAAG,KAAK,CAAC,CAAA,CAAA,EAC/C,CAAC,EAAE,QAAQ,EAAE,MAAM,QAAQ,GAAG,aAAa,GAAG,IAAI,CAAC,CAAA,WAAA,EAG1C,CAAC,EAAE,IAAI,EAAE,KAAKC,WAAK,CAAC,IAAI,CAAC,CAAA,QAAA,EACxB,CAAC,EAAE,IAAI,EAAE,KAAKA,WAAK,CAAC,IAAI,CAAC;AAIvC,MAAM,UAAU,GAAGD,uBAAM,CAAC,MAAM,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,yIAAA,EAQfE,WAAK,CAAC,UAAU,CAAA,kFAAA,EAM7B,CAAC,KAAK,KAAI;IACV,IAAI,MAAM,GAAG,MAAM;IACnB,IAAI,WAAW,GAAG,MAAM;IACxB,IAAI,YAAY,GAAG,MAAM;IACzB,IAAI,YAAY,GAAG,KAAK;IACxB,IAAI,QAAQ,GAAG,MAAM;IACrB,IAAI,YAAY,GAAG,KAAK;IAExB,IAAI,KAAK,CAAC,OAAO,EAAE;QACjB,WAAW,GAAG,MAAM;AACrB,IAAA;IAED,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