@veeqo/ui 9.1.2 → 9.3.0
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/Choice/Choice.cjs +3 -3
- package/dist/components/Choice/Choice.cjs.map +1 -1
- package/dist/components/Choice/Choice.d.ts +5 -4
- package/dist/components/Choice/Choice.js +3 -3
- package/dist/components/Choice/Choice.js.map +1 -1
- package/dist/components/DimensionsInput/DimensionsInput.cjs +8 -8
- package/dist/components/DimensionsInput/DimensionsInput.cjs.map +1 -1
- package/dist/components/DimensionsInput/DimensionsInput.js +9 -9
- package/dist/components/DimensionsInput/DimensionsInput.js.map +1 -1
- package/dist/components/DimensionsInput/index.cjs +10 -0
- package/dist/components/DimensionsInput/index.cjs.map +1 -0
- package/dist/components/DimensionsInput/index.d.ts +2 -1
- package/dist/components/DimensionsInput/index.js +8 -0
- package/dist/components/DimensionsInput/index.js.map +1 -0
- package/dist/components/DimensionsInput/styled.cjs +2 -7
- package/dist/components/DimensionsInput/styled.cjs.map +1 -1
- package/dist/components/DimensionsInput/styled.d.ts +1 -11
- package/dist/components/DimensionsInput/styled.js +3 -7
- package/dist/components/DimensionsInput/styled.js.map +1 -1
- package/dist/components/DimensionsInput/types.d.ts +2 -5
- package/dist/components/InputGroup/components/InputGroupLabel/InputGroupLabel.cjs +15 -0
- package/dist/components/InputGroup/components/InputGroupLabel/InputGroupLabel.cjs.map +1 -0
- package/dist/components/InputGroup/components/InputGroupLabel/InputGroupLabel.d.ts +9 -0
- package/dist/components/InputGroup/components/InputGroupLabel/InputGroupLabel.js +9 -0
- package/dist/components/InputGroup/components/InputGroupLabel/InputGroupLabel.js.map +1 -0
- package/dist/components/InputGroup/components/InputGroupLabel/index.d.ts +1 -0
- package/dist/components/InputGroup/components/InputGroupLabel/styled.cjs +13 -0
- package/dist/components/InputGroup/components/InputGroupLabel/styled.cjs.map +1 -0
- package/dist/components/InputGroup/components/InputGroupLabel/styled.d.ts +4 -0
- package/dist/components/InputGroup/components/InputGroupLabel/styled.js +7 -0
- package/dist/components/InputGroup/components/InputGroupLabel/styled.js.map +1 -0
- package/dist/components/InputGroup/index.cjs +4 -1
- package/dist/components/InputGroup/index.cjs.map +1 -1
- package/dist/components/InputGroup/index.d.ts +1 -0
- package/dist/components/InputGroup/index.js +4 -1
- package/dist/components/InputGroup/index.js.map +1 -1
- package/dist/components/WeightInput/WeightInput.cjs +10 -9
- package/dist/components/WeightInput/WeightInput.cjs.map +1 -1
- package/dist/components/WeightInput/WeightInput.js +11 -10
- package/dist/components/WeightInput/WeightInput.js.map +1 -1
- package/dist/components/WeightInput/index.cjs +10 -0
- package/dist/components/WeightInput/index.cjs.map +1 -0
- package/dist/components/WeightInput/index.d.ts +2 -1
- package/dist/components/WeightInput/index.js +8 -0
- package/dist/components/WeightInput/index.js.map +1 -0
- package/dist/components/WeightInput/styled.cjs +1 -2
- package/dist/components/WeightInput/styled.cjs.map +1 -1
- package/dist/components/WeightInput/styled.js +2 -2
- package/dist/components/WeightInput/styled.js.map +1 -1
- package/dist/hoc/withLabels/withLabels.cjs +3 -3
- package/dist/hoc/withLabels/withLabels.cjs.map +1 -1
- package/dist/hoc/withLabels/withLabels.d.ts +5 -4
- package/dist/hoc/withLabels/withLabels.js +3 -3
- package/dist/hoc/withLabels/withLabels.js.map +1 -1
- package/dist/index.cjs +12 -12
- package/dist/index.js +2 -2
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ const generateClassNames = (prefix) => ({
|
|
|
17
17
|
tooltip: prefix ? 'choice__tooltip' : undefined,
|
|
18
18
|
error: prefix ? 'choice__error' : undefined,
|
|
19
19
|
});
|
|
20
|
-
const Choice = ({ id, className, label, hint, tooltip, error, bordered, Badge, Accessory, Footer, children, disabled = false, labelVariant = 'body', inputPosition = 'left', }) => {
|
|
20
|
+
const Choice = ({ id, className, label, hint, tooltip, tooltipContent, error, bordered, Badge, Accessory, Footer, children, disabled = false, labelVariant = 'body', inputPosition = 'left', }) => {
|
|
21
21
|
const classNames = generateClassNames(className);
|
|
22
22
|
const contentMarkup = (React__default.default.createElement(styled.RootLayout, null,
|
|
23
23
|
inputPosition === 'left' && (React__default.default.createElement(styled.InputLayout, { align: Accessory ? 'center' : 'top' }, children)),
|
|
@@ -26,8 +26,8 @@ const Choice = ({ id, className, label, hint, tooltip, error, bordered, Badge, A
|
|
|
26
26
|
React__default.default.createElement(Stack.Stack, { direction: "horizontal", alignY: "center", spacing: "sm" },
|
|
27
27
|
Badge,
|
|
28
28
|
label && (React__default.default.createElement(Text.Text, { variant: labelVariant, className: classNames.label }, label)),
|
|
29
|
-
tooltip && (React__default.default.createElement(styled.BlockTooltip, { text: tooltip, className: classNames.tooltip },
|
|
30
|
-
React__default.default.createElement(HelpIcon.HelpIcon, { name: "help", width: index.theme.sizes.base, color: index.theme.colors.neutral.ink.lightest })))),
|
|
29
|
+
(tooltip || tooltipContent) && (React__default.default.createElement(styled.BlockTooltip, { text: tooltip, content: tooltipContent, className: classNames.tooltip },
|
|
30
|
+
React__default.default.createElement(HelpIcon.HelpIcon, { "data-testid": "tooltip-help", name: "help", width: index.theme.sizes.base, color: index.theme.colors.neutral.ink.lightest })))),
|
|
31
31
|
hint && React__default.default.createElement(styled.HintText, { className: classNames.hint }, hint),
|
|
32
32
|
error && React__default.default.createElement(styled.ErrorText, { className: classNames.error }, error),
|
|
33
33
|
Footer)) : null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Choice.cjs","sources":["../../../src/components/Choice/Choice.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Stack } from '../Stack';\nimport { theme } from '../../theme';\n\nimport {\n Wrapper,\n BorderedWrapper,\n RootLayout,\n InputLayout,\n AccessoryLayout,\n TextLayout,\n HintText,\n ErrorText,\n BlockTooltip,\n} from './components/styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { Text } from '../Text';\nimport { TextVariant } from '../Text/types';\n\nexport interface ForwardedChoiceProps {\n className?: string;\n disabled?: boolean;\n label?:
|
|
1
|
+
{"version":3,"file":"Choice.cjs","sources":["../../../src/components/Choice/Choice.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Stack } from '../Stack';\nimport { theme } from '../../theme';\n\nimport {\n Wrapper,\n BorderedWrapper,\n RootLayout,\n InputLayout,\n AccessoryLayout,\n TextLayout,\n HintText,\n ErrorText,\n BlockTooltip,\n} from './components/styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { Text } from '../Text';\nimport { TextVariant } from '../Text/types';\n\nexport interface ForwardedChoiceProps {\n className?: string;\n disabled?: boolean;\n label?: ReactNode;\n hint?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n error?: ReactNode;\n bordered?: boolean;\n Badge?: ReactNode;\n Accessory?: ReactNode;\n Footer?: ReactNode;\n inputPosition?: 'left' | 'right';\n labelVariant?: TextVariant;\n}\n\nexport interface ChoiceProps extends ForwardedChoiceProps {\n id: string;\n children: ReactNode;\n}\n\nconst generateClassNames = (prefix?: string): any => ({\n hint: prefix ? 'choice__hint' : undefined,\n label: prefix ? 'choice__label' : undefined,\n tooltip: prefix ? 'choice__tooltip' : undefined,\n error: prefix ? 'choice__error' : undefined,\n});\n\nexport const Choice = ({\n id,\n className,\n label,\n hint,\n tooltip,\n tooltipContent,\n error,\n bordered,\n Badge,\n Accessory,\n Footer,\n children,\n disabled = false,\n labelVariant = 'body',\n inputPosition = 'left',\n}: ChoiceProps) => {\n const classNames = generateClassNames(className);\n\n const contentMarkup = (\n <RootLayout>\n {inputPosition === 'left' && (\n <InputLayout align={Accessory ? 'center' : 'top'}>{children}</InputLayout>\n )}\n {Accessory && <AccessoryLayout>{Accessory}</AccessoryLayout>}\n {label || hint || error || Badge || Footer ? (\n <TextLayout>\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"sm\">\n {Badge}\n {label && (\n <Text variant={labelVariant} className={classNames.label}>\n {label}\n </Text>\n )}\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent} className={classNames.tooltip}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n name=\"help\"\n width={theme.sizes.base}\n color={theme.colors.neutral.ink.lightest}\n />\n </BlockTooltip>\n )}\n </Stack>\n {hint && <HintText className={classNames.hint}>{hint}</HintText>}\n {error && <ErrorText className={classNames.error}>{error}</ErrorText>}\n {Footer}\n </TextLayout>\n ) : null}\n {inputPosition === 'right' && (\n <InputLayout align={Accessory ? 'center' : 'top'}>{children}</InputLayout>\n )}\n </RootLayout>\n );\n\n if (bordered) {\n return (\n <BorderedWrapper disabled={disabled} htmlFor={id} className={className}>\n {contentMarkup}\n </BorderedWrapper>\n );\n }\n\n return (\n <Wrapper disabled={disabled} htmlFor={id} className={className}>\n {contentMarkup}\n </Wrapper>\n );\n};\n"],"names":["React","RootLayout","InputLayout","AccessoryLayout","TextLayout","Stack","Text","BlockTooltip","HelpIcon","theme","HintText","ErrorText","BorderedWrapper","Wrapper"],"mappings":";;;;;;;;;;;;;AAwCA,MAAM,kBAAkB,GAAG,CAAC,MAAe,MAAW;IACpD,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IACzC,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAC3C,OAAO,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAC/C,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;AAC5C,CAAA,CAAC;AAEW,MAAA,MAAM,GAAG,CAAC,EACrB,EAAE,EACF,SAAS,EACT,KAAK,EACL,IAAI,EACJ,OAAO,EACP,cAAc,EACd,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EACT,MAAM,EACN,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,YAAY,GAAG,MAAM,EACrB,aAAa,GAAG,MAAM,GACV,KAAI;AAChB,IAAA,MAAM,UAAU,GAAG,kBAAkB,CAAC,SAAS,CAAC;AAEhD,IAAA,MAAM,aAAa,IACjBA,sBA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CAAAW,gBAAS,EAAC,EAAA,SAAS,EAAE,UAAU,CAAC,KAAK,EAAG,EAAA,KAAK,CAAa;AACpE,YAAA,MAAM,CACI,IACX,IAAI;QACP,aAAa,KAAK,OAAO,KACxBX,sBAAA,CAAA,aAAA,CAACE,kBAAW,EAAC,EAAA,KAAK,EAAE,SAAS,GAAG,QAAQ,GAAG,KAAK,EAAA,EAAG,QAAQ,CAAe,CAC3E,CACU,CACd;AAED,IAAA,IAAI,QAAQ,EAAE;AACZ,QAAA,QACEF,sBAAC,CAAA,aAAA,CAAAY,sBAAe,IAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,IACnE,aAAa,CACE;AAErB;AAED,IAAA,QACEZ,sBAAC,CAAA,aAAA,CAAAa,cAAO,IAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,IAC3D,aAAa,CACN;AAEd;;;;"}
|
|
@@ -3,10 +3,11 @@ import { TextVariant } from '../Text/types';
|
|
|
3
3
|
export interface ForwardedChoiceProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
|
-
label?:
|
|
7
|
-
hint?:
|
|
6
|
+
label?: ReactNode;
|
|
7
|
+
hint?: ReactNode;
|
|
8
8
|
tooltip?: string;
|
|
9
|
-
|
|
9
|
+
tooltipContent?: ReactNode;
|
|
10
|
+
error?: ReactNode;
|
|
10
11
|
bordered?: boolean;
|
|
11
12
|
Badge?: ReactNode;
|
|
12
13
|
Accessory?: ReactNode;
|
|
@@ -18,4 +19,4 @@ export interface ChoiceProps extends ForwardedChoiceProps {
|
|
|
18
19
|
id: string;
|
|
19
20
|
children: ReactNode;
|
|
20
21
|
}
|
|
21
|
-
export declare const Choice: ({ id, className, label, hint, tooltip, error, bordered, Badge, Accessory, Footer, children, disabled, labelVariant, inputPosition, }: ChoiceProps) => React.JSX.Element;
|
|
22
|
+
export declare const Choice: ({ id, className, label, hint, tooltip, tooltipContent, error, bordered, Badge, Accessory, Footer, children, disabled, labelVariant, inputPosition, }: ChoiceProps) => React.JSX.Element;
|
|
@@ -11,7 +11,7 @@ const generateClassNames = (prefix) => ({
|
|
|
11
11
|
tooltip: prefix ? 'choice__tooltip' : undefined,
|
|
12
12
|
error: prefix ? 'choice__error' : undefined,
|
|
13
13
|
});
|
|
14
|
-
const Choice = ({ id, className, label, hint, tooltip, error, bordered, Badge, Accessory, Footer, children, disabled = false, labelVariant = 'body', inputPosition = 'left', }) => {
|
|
14
|
+
const Choice = ({ id, className, label, hint, tooltip, tooltipContent, error, bordered, Badge, Accessory, Footer, children, disabled = false, labelVariant = 'body', inputPosition = 'left', }) => {
|
|
15
15
|
const classNames = generateClassNames(className);
|
|
16
16
|
const contentMarkup = (React.createElement(RootLayout, null,
|
|
17
17
|
inputPosition === 'left' && (React.createElement(InputLayout, { align: Accessory ? 'center' : 'top' }, children)),
|
|
@@ -20,8 +20,8 @@ const Choice = ({ id, className, label, hint, tooltip, error, bordered, Badge, A
|
|
|
20
20
|
React.createElement(Stack, { direction: "horizontal", alignY: "center", spacing: "sm" },
|
|
21
21
|
Badge,
|
|
22
22
|
label && (React.createElement(Text, { variant: labelVariant, className: classNames.label }, label)),
|
|
23
|
-
tooltip && (React.createElement(BlockTooltip, { text: tooltip, className: classNames.tooltip },
|
|
24
|
-
React.createElement(HelpIcon, { name: "help", width: theme.sizes.base, color: theme.colors.neutral.ink.lightest })))),
|
|
23
|
+
(tooltip || tooltipContent) && (React.createElement(BlockTooltip, { text: tooltip, content: tooltipContent, className: classNames.tooltip },
|
|
24
|
+
React.createElement(HelpIcon, { "data-testid": "tooltip-help", name: "help", width: theme.sizes.base, color: theme.colors.neutral.ink.lightest })))),
|
|
25
25
|
hint && React.createElement(HintText, { className: classNames.hint }, hint),
|
|
26
26
|
error && React.createElement(ErrorText, { className: classNames.error }, error),
|
|
27
27
|
Footer)) : null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Choice.js","sources":["../../../src/components/Choice/Choice.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Stack } from '../Stack';\nimport { theme } from '../../theme';\n\nimport {\n Wrapper,\n BorderedWrapper,\n RootLayout,\n InputLayout,\n AccessoryLayout,\n TextLayout,\n HintText,\n ErrorText,\n BlockTooltip,\n} from './components/styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { Text } from '../Text';\nimport { TextVariant } from '../Text/types';\n\nexport interface ForwardedChoiceProps {\n className?: string;\n disabled?: boolean;\n label?:
|
|
1
|
+
{"version":3,"file":"Choice.js","sources":["../../../src/components/Choice/Choice.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Stack } from '../Stack';\nimport { theme } from '../../theme';\n\nimport {\n Wrapper,\n BorderedWrapper,\n RootLayout,\n InputLayout,\n AccessoryLayout,\n TextLayout,\n HintText,\n ErrorText,\n BlockTooltip,\n} from './components/styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { Text } from '../Text';\nimport { TextVariant } from '../Text/types';\n\nexport interface ForwardedChoiceProps {\n className?: string;\n disabled?: boolean;\n label?: ReactNode;\n hint?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n error?: ReactNode;\n bordered?: boolean;\n Badge?: ReactNode;\n Accessory?: ReactNode;\n Footer?: ReactNode;\n inputPosition?: 'left' | 'right';\n labelVariant?: TextVariant;\n}\n\nexport interface ChoiceProps extends ForwardedChoiceProps {\n id: string;\n children: ReactNode;\n}\n\nconst generateClassNames = (prefix?: string): any => ({\n hint: prefix ? 'choice__hint' : undefined,\n label: prefix ? 'choice__label' : undefined,\n tooltip: prefix ? 'choice__tooltip' : undefined,\n error: prefix ? 'choice__error' : undefined,\n});\n\nexport const Choice = ({\n id,\n className,\n label,\n hint,\n tooltip,\n tooltipContent,\n error,\n bordered,\n Badge,\n Accessory,\n Footer,\n children,\n disabled = false,\n labelVariant = 'body',\n inputPosition = 'left',\n}: ChoiceProps) => {\n const classNames = generateClassNames(className);\n\n const contentMarkup = (\n <RootLayout>\n {inputPosition === 'left' && (\n <InputLayout align={Accessory ? 'center' : 'top'}>{children}</InputLayout>\n )}\n {Accessory && <AccessoryLayout>{Accessory}</AccessoryLayout>}\n {label || hint || error || Badge || Footer ? (\n <TextLayout>\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"sm\">\n {Badge}\n {label && (\n <Text variant={labelVariant} className={classNames.label}>\n {label}\n </Text>\n )}\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent} className={classNames.tooltip}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n name=\"help\"\n width={theme.sizes.base}\n color={theme.colors.neutral.ink.lightest}\n />\n </BlockTooltip>\n )}\n </Stack>\n {hint && <HintText className={classNames.hint}>{hint}</HintText>}\n {error && <ErrorText className={classNames.error}>{error}</ErrorText>}\n {Footer}\n </TextLayout>\n ) : null}\n {inputPosition === 'right' && (\n <InputLayout align={Accessory ? 'center' : 'top'}>{children}</InputLayout>\n )}\n </RootLayout>\n );\n\n if (bordered) {\n return (\n <BorderedWrapper disabled={disabled} htmlFor={id} className={className}>\n {contentMarkup}\n </BorderedWrapper>\n );\n }\n\n return (\n <Wrapper disabled={disabled} htmlFor={id} className={className}>\n {contentMarkup}\n </Wrapper>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAwCA,MAAM,kBAAkB,GAAG,CAAC,MAAe,MAAW;IACpD,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IACzC,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAC3C,OAAO,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAC/C,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;AAC5C,CAAA,CAAC;AAEW,MAAA,MAAM,GAAG,CAAC,EACrB,EAAE,EACF,SAAS,EACT,KAAK,EACL,IAAI,EACJ,OAAO,EACP,cAAc,EACd,K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AAC,GAAG,CAAC,QAAQ,EACxC,CAAA,CACW,CAChB,CACK;YACP,IAAI,IAAI,KAAC,CAAA,aAAA,CAAA,QAAQ,EAAC,EAAA,SAAS,EAAE,UAAU,CAAC,IAAI,EAAG,EAAA,IAAI,CAAY;YAC/D,KAAK,IAAI,KAAC,CAAA,aAAA,CAAA,SAAS,EAAC,EAAA,SAAS,EAAE,UAAU,CAAC,KAAK,EAAG,EAAA,KAAK,CAAa;AACpE,YAAA,MAAM,CACI,IACX,IAAI;QACP,aAAa,KAAK,OAAO,KACxB,KAAA,CAAA,aAAA,CAAC,WAAW,EAAC,EAAA,KAAK,EAAE,SAAS,GAAG,QAAQ,GAAG,KAAK,EAAA,EAAG,QAAQ,CAAe,CAC3E,CACU,CACd;AAED,IAAA,IAAI,QAAQ,EAAE;AACZ,QAAA,QACE,KAAC,CAAA,aAAA,CAAA,eAAe,IAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,IACnE,aAAa,CACE;AAErB;AAED,IAAA,QACE,KAAC,CAAA,aAAA,CAAA,OAAO,IAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,IAC3D,aAAa,CACN;AAEd;;;;"}
|
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var index$1 = require('../InputGroup/index.cjs');
|
|
5
5
|
var types = require('../types.cjs');
|
|
6
|
-
var withLabels = require('../../hoc/withLabels/withLabels.cjs');
|
|
7
6
|
var styled = require('./styled.cjs');
|
|
8
7
|
var CrossIcon = require('../../tempIcons/CrossIcon.cjs');
|
|
9
8
|
var index = require('../../theme/index.cjs');
|
|
10
9
|
var blockInvalidCharacters = require('../../utils/blockInvalidCharacters.cjs');
|
|
11
10
|
var invalidCharactersNumeric = require('../../utils/invalidCharactersNumeric.cjs');
|
|
11
|
+
var InputGroupLabel = require('../InputGroup/components/InputGroupLabel/InputGroupLabel.cjs');
|
|
12
12
|
|
|
13
13
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
14
14
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
16
|
|
|
17
17
|
const blockInvalidChars = (e) => blockInvalidCharacters.blockInvalidCharacters(e, invalidCharactersNumeric.invalidCharsList);
|
|
18
|
-
const DimensionsInput =
|
|
18
|
+
const DimensionsInput = ({ size = types.ComponentSize.base, handleChangeHeight, handleChangeWidth, handleChangeLength, className, height, width, length, unit = 'cm', ...rest }) => (React__default.default.createElement(styled.Container, { className: className, role: "group", "aria-label": "Dimensions" },
|
|
19
19
|
React__default.default.createElement(styled.Row, null,
|
|
20
|
-
React__default.default.createElement(styled.TextField, {
|
|
21
|
-
React__default.default.createElement(CrossIcon.CrossIcon, { height: index.theme.sizes.base, width: index.theme.sizes.base }),
|
|
22
|
-
React__default.default.createElement(styled.TextField, {
|
|
23
|
-
React__default.default.createElement(CrossIcon.CrossIcon, { height: index.theme.sizes.base, width: index.theme.sizes.base }),
|
|
20
|
+
React__default.default.createElement(styled.TextField, { name: "length", type: "number", value: length, "aria-label": "Length", "aria-describedby": "dimensions-unit", min: "0", step: "any", onChange: handleChangeLength, onKeyDown: blockInvalidChars, size: size, placeholder: "L", ...rest }),
|
|
21
|
+
React__default.default.createElement(CrossIcon.CrossIcon, { height: index.theme.sizes.base, width: index.theme.sizes.base, role: "presentation" }),
|
|
22
|
+
React__default.default.createElement(styled.TextField, { name: "width", type: "number", value: width, "aria-label": "Width", "aria-describedby": "dimensions-unit", min: "0", step: "any", onChange: handleChangeWidth, onKeyDown: blockInvalidChars, size: size, placeholder: "W", ...rest }),
|
|
23
|
+
React__default.default.createElement(CrossIcon.CrossIcon, { height: index.theme.sizes.base, width: index.theme.sizes.base, role: "presentation" }),
|
|
24
24
|
React__default.default.createElement(index$1.InputGroup, null,
|
|
25
|
-
React__default.default.createElement(styled.TextField, {
|
|
26
|
-
React__default.default.createElement(
|
|
25
|
+
React__default.default.createElement(styled.TextField, { name: "height", type: "number", value: height, "aria-label": "Height", "aria-describedby": "dimensions-unit", min: "0", step: "any", onChange: handleChangeHeight, onKeyDown: blockInvalidChars, size: size, placeholder: "H", ...rest }),
|
|
26
|
+
React__default.default.createElement(InputGroupLabel.InputGroupLabel, { size: size, unit: unit, id: "dimensions-unit" })))));
|
|
27
27
|
DimensionsInput.displayName = 'DimensionsInput';
|
|
28
28
|
|
|
29
29
|
exports.DimensionsInput = DimensionsInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DimensionsInput.cjs","sources":["../../../src/components/DimensionsInput/DimensionsInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { InputGroup } from '../InputGroup';\nimport { ComponentSize } from '../types';\
|
|
1
|
+
{"version":3,"file":"DimensionsInput.cjs","sources":["../../../src/components/DimensionsInput/DimensionsInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { InputGroup, InputGroupLabel } from '../InputGroup';\nimport { ComponentSize } from '../types';\n\nimport { Container, Row, TextField } from './styled';\n\nimport { DimensionsProps } from './types';\nimport { CrossIcon } from '../../tempIcons/CrossIcon';\nimport { theme } from '../../theme';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\n\nexport const DimensionsInput: FC<DimensionsProps> = ({\n size = ComponentSize.base,\n handleChangeHeight,\n handleChangeWidth,\n handleChangeLength,\n className,\n height,\n width,\n length,\n unit = 'cm',\n ...rest\n}: DimensionsProps) => (\n <Container className={className} role=\"group\" aria-label=\"Dimensions\">\n <Row>\n <TextField\n name=\"length\"\n type=\"number\"\n value={length}\n aria-label=\"Length\"\n aria-describedby=\"dimensions-unit\"\n min=\"0\"\n step=\"any\"\n onChange={handleChangeLength}\n onKeyDown={blockInvalidChars}\n size={size}\n placeholder=\"L\"\n {...rest}\n />\n <CrossIcon height={theme.sizes.base} width={theme.sizes.base} role=\"presentation\" />\n <TextField\n name=\"width\"\n type=\"number\"\n value={width}\n aria-label=\"Width\"\n aria-describedby=\"dimensions-unit\"\n min=\"0\"\n step=\"any\"\n onChange={handleChangeWidth}\n onKeyDown={blockInvalidChars}\n size={size}\n placeholder=\"W\"\n {...rest}\n />\n <CrossIcon height={theme.sizes.base} width={theme.sizes.base} role=\"presentation\" />\n <InputGroup>\n <TextField\n name=\"height\"\n type=\"number\"\n value={height}\n aria-label=\"Height\"\n aria-describedby=\"dimensions-unit\"\n min=\"0\"\n step=\"any\"\n onChange={handleChangeHeight}\n onKeyDown={blockInvalidChars}\n size={size}\n placeholder=\"H\"\n {...rest}\n />\n <InputGroupLabel size={size} unit={unit} id=\"dimensions-unit\" />\n </InputGroup>\n </Row>\n </Container>\n);\n\nDimensionsInput.displayName = 'DimensionsInput';\n"],"names":["blockInvalidCharacters","invalidCharsList","ComponentSize","React","Container","Row","TextField","CrossIcon","theme","InputGroup","InputGroupLabel"],"mappings":";;;;;;;;;;;;;;;;AAaA,MAAM,iBAAiB,GAAG,CAAC,CAAsB,KAAKA,6CAAsB,CAAC,CAAC,EAAEC,yCAAgB,CAAC;MAEpF,eAAe,GAAwB,CAAC,EACnD,IAAI,GAAGC,mBAAa,CAAC,IAAI,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,MAAM,EACN,KAAK,EACL,MAAM,EACN,IAAI,GAAG,IAAI,EACX,GAAG,IAAI,EACS,MAChBC,qCAACC,gBAAS,EAAA,EAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,OAAO,EAAA,YAAA,EAAY,YAAY,EAAA;AACnE,IAAAD,sBAAA,CAAA,aAAA,CAACE,UAAG,EAAA,IAAA;AACF,QAAAF,sBAAA,CAAA,aAAA,CAACG,gBAAS,EACR,EAAA,IAAI,EAAC,QAAQ,EAC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AkB,EAC5B,SAAS,EAAE,iBAAiB,EAC5B,IAAI,EAAE,IAAI,EACV,WAAW,EAAC,GAAG,EAAA,GACX,IAAI,EACR,CAAA;AACF,YAAAH,sBAAA,CAAA,aAAA,CAACO,+BAAe,EAAC,EAAA,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAC,iBAAiB,EAAA,CAAG,CACrD,CACT,CACI;AAGd,eAAe,CAAC,WAAW,GAAG,iBAAiB;;;;"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { InputGroup } from '../InputGroup/index.js';
|
|
3
3
|
import { ComponentSize } from '../types.js';
|
|
4
|
-
import {
|
|
5
|
-
import { Container, Row, TextField as StyledTextField, Button as StyledButton } from './styled.js';
|
|
4
|
+
import { Container, Row, TextField as StyledTextField } from './styled.js';
|
|
6
5
|
import { CrossIcon } from '../../tempIcons/CrossIcon.js';
|
|
7
6
|
import { theme } from '../../theme/index.js';
|
|
8
7
|
import { blockInvalidCharacters } from '../../utils/blockInvalidCharacters.js';
|
|
9
8
|
import { invalidCharsList } from '../../utils/invalidCharactersNumeric.js';
|
|
9
|
+
import { InputGroupLabel } from '../InputGroup/components/InputGroupLabel/InputGroupLabel.js';
|
|
10
10
|
|
|
11
11
|
const blockInvalidChars = (e) => blockInvalidCharacters(e, invalidCharsList);
|
|
12
|
-
const DimensionsInput =
|
|
12
|
+
const DimensionsInput = ({ size = ComponentSize.base, handleChangeHeight, handleChangeWidth, handleChangeLength, className, height, width, length, unit = 'cm', ...rest }) => (React.createElement(Container, { className: className, role: "group", "aria-label": "Dimensions" },
|
|
13
13
|
React.createElement(Row, null,
|
|
14
|
-
React.createElement(StyledTextField, {
|
|
15
|
-
React.createElement(CrossIcon, { height: theme.sizes.base, width: theme.sizes.base }),
|
|
16
|
-
React.createElement(StyledTextField, {
|
|
17
|
-
React.createElement(CrossIcon, { height: theme.sizes.base, width: theme.sizes.base }),
|
|
14
|
+
React.createElement(StyledTextField, { name: "length", type: "number", value: length, "aria-label": "Length", "aria-describedby": "dimensions-unit", min: "0", step: "any", onChange: handleChangeLength, onKeyDown: blockInvalidChars, size: size, placeholder: "L", ...rest }),
|
|
15
|
+
React.createElement(CrossIcon, { height: theme.sizes.base, width: theme.sizes.base, role: "presentation" }),
|
|
16
|
+
React.createElement(StyledTextField, { name: "width", type: "number", value: width, "aria-label": "Width", "aria-describedby": "dimensions-unit", min: "0", step: "any", onChange: handleChangeWidth, onKeyDown: blockInvalidChars, size: size, placeholder: "W", ...rest }),
|
|
17
|
+
React.createElement(CrossIcon, { height: theme.sizes.base, width: theme.sizes.base, role: "presentation" }),
|
|
18
18
|
React.createElement(InputGroup, null,
|
|
19
|
-
React.createElement(StyledTextField, {
|
|
20
|
-
React.createElement(
|
|
19
|
+
React.createElement(StyledTextField, { name: "height", type: "number", value: height, "aria-label": "Height", "aria-describedby": "dimensions-unit", min: "0", step: "any", onChange: handleChangeHeight, onKeyDown: blockInvalidChars, size: size, placeholder: "H", ...rest }),
|
|
20
|
+
React.createElement(InputGroupLabel, { size: size, unit: unit, id: "dimensions-unit" })))));
|
|
21
21
|
DimensionsInput.displayName = 'DimensionsInput';
|
|
22
22
|
|
|
23
23
|
export { DimensionsInput };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DimensionsInput.js","sources":["../../../src/components/DimensionsInput/DimensionsInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { InputGroup } from '../InputGroup';\nimport { ComponentSize } from '../types';\
|
|
1
|
+
{"version":3,"file":"DimensionsInput.js","sources":["../../../src/components/DimensionsInput/DimensionsInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { InputGroup, InputGroupLabel } from '../InputGroup';\nimport { ComponentSize } from '../types';\n\nimport { Container, Row, TextField } from './styled';\n\nimport { DimensionsProps } from './types';\nimport { CrossIcon } from '../../tempIcons/CrossIcon';\nimport { theme } from '../../theme';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\n\nexport const DimensionsInput: FC<DimensionsProps> = ({\n size = ComponentSize.base,\n handleChangeHeight,\n handleChangeWidth,\n handleChangeLength,\n className,\n height,\n width,\n length,\n unit = 'cm',\n ...rest\n}: DimensionsProps) => (\n <Container className={className} role=\"group\" aria-label=\"Dimensions\">\n <Row>\n <TextField\n name=\"length\"\n type=\"number\"\n value={length}\n aria-label=\"Length\"\n aria-describedby=\"dimensions-unit\"\n min=\"0\"\n step=\"any\"\n onChange={handleChangeLength}\n onKeyDown={blockInvalidChars}\n size={size}\n placeholder=\"L\"\n {...rest}\n />\n <CrossIcon height={theme.sizes.base} width={theme.sizes.base} role=\"presentation\" />\n <TextField\n name=\"width\"\n type=\"number\"\n value={width}\n aria-label=\"Width\"\n aria-describedby=\"dimensions-unit\"\n min=\"0\"\n step=\"any\"\n onChange={handleChangeWidth}\n onKeyDown={blockInvalidChars}\n size={size}\n placeholder=\"W\"\n {...rest}\n />\n <CrossIcon height={theme.sizes.base} width={theme.sizes.base} role=\"presentation\" />\n <InputGroup>\n <TextField\n name=\"height\"\n type=\"number\"\n value={height}\n aria-label=\"Height\"\n aria-describedby=\"dimensions-unit\"\n min=\"0\"\n step=\"any\"\n onChange={handleChangeHeight}\n onKeyDown={blockInvalidChars}\n size={size}\n placeholder=\"H\"\n {...rest}\n />\n <InputGroupLabel size={size} unit={unit} id=\"dimensions-unit\" />\n </InputGroup>\n </Row>\n </Container>\n);\n\nDimensionsInput.displayName = 'DimensionsInput';\n"],"names":["TextField"],"mappings":";;;;;;;;;;AAaA,MAAM,iBAAiB,GAAG,CAAC,CAAsB,KAAK,sBAAsB,CAAC,CAAC,EAAE,gBAAgB,CAAC;MAEpF,eAAe,GAAwB,CAAC,EACnD,IAAI,GAAG,aAAa,CAAC,IAAI,EACzB,kBAAk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AAC,IAAI,EAAE,IAAI,EAAC,cAAc,EAAG,CAAA;AACpF,QAAA,KAAA,CAAA,aAAA,CAAC,UAAU,EAAA,IAAA;AACT,YAAA,KAAA,CAAA,aAAA,CAACA,eAAS,EACR,EAAA,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,MAAM,EACF,YAAA,EAAA,QAAQ,sBACF,iBAAiB,EAClC,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,QAAQ,EAAE,kBAAkB,EAC5B,SAAS,EAAE,iBAAiB,EAC5B,IAAI,EAAE,IAAI,EACV,WAAW,EAAC,GAAG,EAAA,GACX,IAAI,EACR,CAAA;AACF,YAAA,KAAA,CAAA,aAAA,CAAC,eAAe,EAAC,EAAA,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAC,iBAAiB,EAAA,CAAG,CACrD,CACT,CACI;AAGd,eAAe,CAAC,WAAW,GAAG,iBAAiB;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var withLabels = require('../../hoc/withLabels/withLabels.cjs');
|
|
4
|
+
require('react');
|
|
5
|
+
var DimensionsInput$1 = require('./DimensionsInput.cjs');
|
|
6
|
+
|
|
7
|
+
const DimensionsInput = withLabels.withLabels(DimensionsInput$1.DimensionsInput);
|
|
8
|
+
|
|
9
|
+
exports.DimensionsInput = DimensionsInput;
|
|
10
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/DimensionsInput/index.ts"],"sourcesContent":["import { withLabels } from '../../hoc';\nimport { DimensionsInput as BaseDimensionsInput } from './DimensionsInput';\n\nexport const DimensionsInput = withLabels(BaseDimensionsInput);\n"],"names":["withLabels","BaseDimensionsInput"],"mappings":";;;;;;MAGa,eAAe,GAAGA,qBAAU,CAACC,iCAAmB;;;;"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const DimensionsInput: import("react").FC<import("./types").DimensionsProps & import("../../hoc/withLabels/withLabels").WithLabelsProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { withLabels } from '../../hoc/withLabels/withLabels.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import { DimensionsInput as DimensionsInput$1 } from './DimensionsInput.js';
|
|
4
|
+
|
|
5
|
+
const DimensionsInput = withLabels(DimensionsInput$1);
|
|
6
|
+
|
|
7
|
+
export { DimensionsInput };
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/DimensionsInput/index.ts"],"sourcesContent":["import { withLabels } from '../../hoc';\nimport { DimensionsInput as BaseDimensionsInput } from './DimensionsInput';\n\nexport const DimensionsInput = withLabels(BaseDimensionsInput);\n"],"names":["BaseDimensionsInput"],"mappings":";;;;MAGa,eAAe,GAAG,UAAU,CAACA,iBAAmB;;;;"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var styled = require('styled-components');
|
|
4
|
-
var Text = require('../Text/Text.cjs');
|
|
5
4
|
var index = require('../TextField/index.cjs');
|
|
6
|
-
var Button = require('../Button/Button.cjs');
|
|
7
5
|
var BaseContainer = require('../BaseContainer/BaseContainer.cjs');
|
|
8
6
|
var index$1 = require('../../theme/index.cjs');
|
|
9
7
|
|
|
@@ -14,12 +12,9 @@ var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
|
14
12
|
const Container = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Container", componentId: "vui--oxhxoy" }) `display:flex;flex-direction:column;position:relative;`;
|
|
15
13
|
const Row = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Row", componentId: "vui--w9sg63" }) `display:flex;align-items:center;margin-top:4px;gap:8px;`;
|
|
16
14
|
const StyledTextField = styled__default.default(index.TextField).withConfig({ displayName: "vui--StyledTextField", componentId: "vui--1dp86fg" }) `width:52px;margin:0;padding:0 6px;&&&{text-align:left;border-color:${index$1.theme.colors.neutral.ink.lightest};}`;
|
|
17
|
-
|
|
18
|
-
styled__default.default
|
|
19
|
-
styled__default.default.span.withConfig({ displayName: "vui--Error", componentId: "vui--1ln478r" }) `display:block;font-family:${index$1.theme.text.error.fontFamily};font-size:${index$1.theme.text.error.fontSize};font-weight:${index$1.theme.text.error.fontWeight};line-height:${index$1.theme.text.error.lineHeight};color:${index$1.theme.text.error.color};&::before{content:'';position:absolute;top:0;bottom:0;left:calc(${index$1.theme.sizes[2]} * -1);width:2px;background-color:${index$1.theme.colors.secondary.red.base};}`;
|
|
20
|
-
styled__default.default.span.withConfig({ displayName: "vui--Hint", componentId: "vui--5lfadq" }) `display:block;font-family:${index$1.theme.fontFamily};font-size:${index$1.theme.sizes[3]};line-height:${index$1.theme.sizes[4]};color:${index$1.theme.colors.neutral.ink.light};`;
|
|
15
|
+
styled__default.default.span.withConfig({ displayName: "vui--Error", componentId: "vui--1isax7l" }) `display:block;font-family:${index$1.theme.text.error.fontFamily};font-size:${index$1.theme.text.error.fontSize};font-weight:${index$1.theme.text.error.fontWeight};line-height:${index$1.theme.text.error.lineHeight};color:${index$1.theme.text.error.color};&::before{content:'';position:absolute;top:0;bottom:0;left:calc(${index$1.theme.sizes[2]} * -1);width:2px;background-color:${index$1.theme.colors.secondary.red.base};}`;
|
|
16
|
+
styled__default.default.span.withConfig({ displayName: "vui--Hint", componentId: "vui--gorpke" }) `display:block;font-family:${index$1.theme.fontFamily};font-size:${index$1.theme.sizes[3]};line-height:${index$1.theme.sizes[4]};color:${index$1.theme.colors.neutral.ink.light};`;
|
|
21
17
|
|
|
22
|
-
exports.Button = StyledButton;
|
|
23
18
|
exports.Container = Container;
|
|
24
19
|
exports.Row = Row;
|
|
25
20
|
exports.TextField = StyledTextField;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.cjs","sources":["../../../src/components/DimensionsInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport {
|
|
1
|
+
{"version":3,"file":"styled.cjs","sources":["../../../src/components/DimensionsInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { TextField } from '../TextField';\nimport { BaseContainer } from '../BaseContainer';\nimport { theme } from '../../theme';\n\nconst Container = styled(BaseContainer)`\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n\nconst Row = styled(BaseContainer)`\n display: flex;\n align-items: center;\n margin-top: 4px;\n\n gap: 8px;\n`;\n\nconst StyledTextField = styled(TextField)`\n width: 52px;\n margin: 0;\n padding: 0 6px;\n\n &&& {\n text-align: left;\n border-color: ${theme.colors.neutral.ink.lightest};\n }\n`;\n\nconst Error = styled.span`\n display: block;\n font-family: ${theme.text.error.fontFamily};\n font-size: ${theme.text.error.fontSize};\n font-weight: ${theme.text.error.fontWeight};\n line-height: ${theme.text.error.lineHeight};\n color: ${theme.text.error.color};\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: calc(${theme.sizes[2]} * -1);\n width: 2px;\n background-color: ${theme.colors.secondary.red.base};\n }\n`;\n\nconst Hint = styled.span`\n display: block;\n font-family: ${theme.fontFamily};\n font-size: ${theme.sizes[3]};\n line-height: ${theme.sizes[4]};\n color: ${theme.colors.neutral.ink.light};\n`;\n\nexport { Container, Row, Error, Hint, StyledTextField as TextField };\n"],"names":["styled","BaseContainer","TextField","theme"],"mappings":";;;;;;;;;;;AAMA,MAAM,SAAS,GAAGA,uBAAM,CAACC,2BAAa,CAAC;AAMvC,MAAM,GAAG,GAAGD,uBAAM,CAACC,2BAAa,CAAC;AAQjC,MAAM,eAAe,GAAGD,uBAAM,CAACE,eAAS,CAAC,CAOrB,UAAA,CAAA,EAAA,WAAA,EAAA,sBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,mEAAA,EAAAC,aAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ;AAIvCH,uBAAM,CAAC,IAAI,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,0BAAA,EAERG,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAA,WAAA,EAC7BA,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAA,aAAA,EACvBA,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAC3B,aAAA,EAAAA,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CACjC,OAAA,EAAAA,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,oEAOhBA,aAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAEP,kCAAA,EAAAA,aAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI;AAI1CH,uBAAM,CAAC,IAAI,CAEP,UAAA,CAAA,EAAA,WAAA,EAAA,WAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,0BAAA,EAAAG,aAAK,CAAC,UAAU,cAClBA,aAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,aAAA,EACZA,aAAK,CAAC,KAAK,CAAC,CAAC,CAAC,UACpBA,aAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK;;;;;;"}
|
|
@@ -303,16 +303,6 @@ declare const StyledTextField: import("styled-components").StyledComponent<impor
|
|
|
303
303
|
size?: "base" | "sm" | undefined;
|
|
304
304
|
multiline?: boolean | undefined;
|
|
305
305
|
} & import("react").RefAttributes<HTMLInputElement> & import("../../hoc/withLabels/withLabels").WithLabelsProps>, any, {}, never>;
|
|
306
|
-
declare const StyledButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
307
|
-
children?: import("react").ReactNode;
|
|
308
|
-
variant?: import("../Button/types").ButtonVariant | undefined;
|
|
309
|
-
size?: "base" | "sm" | undefined;
|
|
310
|
-
iconSlot?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
311
|
-
dropdown?: boolean | undefined;
|
|
312
|
-
loading?: boolean | undefined;
|
|
313
|
-
contentStyles?: import("react").CSSProperties | undefined;
|
|
314
|
-
} & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
315
|
-
declare const Label: import("styled-components").StyledComponent<"span", any, {} & import("../Text/types").TextProps, never>;
|
|
316
306
|
declare const Error: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
317
307
|
declare const Hint: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
318
|
-
export { Container, Row, Error, Hint, StyledTextField as TextField
|
|
308
|
+
export { Container, Row, Error, Hint, StyledTextField as TextField };
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import { Text } from '../Text/Text.js';
|
|
3
2
|
import { TextField } from '../TextField/index.js';
|
|
4
|
-
import { Button } from '../Button/Button.js';
|
|
5
3
|
import { BaseContainer } from '../BaseContainer/BaseContainer.js';
|
|
6
4
|
import { theme } from '../../theme/index.js';
|
|
7
5
|
|
|
8
6
|
const Container = styled(BaseContainer).withConfig({ displayName: "vui--Container", componentId: "vui--oxhxoy" }) `display:flex;flex-direction:column;position:relative;`;
|
|
9
7
|
const Row = styled(BaseContainer).withConfig({ displayName: "vui--Row", componentId: "vui--w9sg63" }) `display:flex;align-items:center;margin-top:4px;gap:8px;`;
|
|
10
8
|
const StyledTextField = styled(TextField).withConfig({ displayName: "vui--StyledTextField", componentId: "vui--1dp86fg" }) `width:52px;margin:0;padding:0 6px;&&&{text-align:left;border-color:${theme.colors.neutral.ink.lightest};}`;
|
|
11
|
-
|
|
12
|
-
styled
|
|
13
|
-
styled.span.withConfig({ displayName: "vui--Error", componentId: "vui--1ln478r" }) `display:block;font-family:${theme.text.error.fontFamily};font-size:${theme.text.error.fontSize};font-weight:${theme.text.error.fontWeight};line-height:${theme.text.error.lineHeight};color:${theme.text.error.color};&::before{content:'';position:absolute;top:0;bottom:0;left:calc(${theme.sizes[2]} * -1);width:2px;background-color:${theme.colors.secondary.red.base};}`;
|
|
14
|
-
styled.span.withConfig({ displayName: "vui--Hint", componentId: "vui--5lfadq" }) `display:block;font-family:${theme.fontFamily};font-size:${theme.sizes[3]};line-height:${theme.sizes[4]};color:${theme.colors.neutral.ink.light};`;
|
|
9
|
+
styled.span.withConfig({ displayName: "vui--Error", componentId: "vui--1isax7l" }) `display:block;font-family:${theme.text.error.fontFamily};font-size:${theme.text.error.fontSize};font-weight:${theme.text.error.fontWeight};line-height:${theme.text.error.lineHeight};color:${theme.text.error.color};&::before{content:'';position:absolute;top:0;bottom:0;left:calc(${theme.sizes[2]} * -1);width:2px;background-color:${theme.colors.secondary.red.base};}`;
|
|
10
|
+
styled.span.withConfig({ displayName: "vui--Hint", componentId: "vui--gorpke" }) `display:block;font-family:${theme.fontFamily};font-size:${theme.sizes[3]};line-height:${theme.sizes[4]};color:${theme.colors.neutral.ink.light};`;
|
|
15
11
|
|
|
16
|
-
export {
|
|
12
|
+
export { Container, Row, StyledTextField as TextField };
|
|
17
13
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../src/components/DimensionsInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport {
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../src/components/DimensionsInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { TextField } from '../TextField';\nimport { BaseContainer } from '../BaseContainer';\nimport { theme } from '../../theme';\n\nconst Container = styled(BaseContainer)`\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n\nconst Row = styled(BaseContainer)`\n display: flex;\n align-items: center;\n margin-top: 4px;\n\n gap: 8px;\n`;\n\nconst StyledTextField = styled(TextField)`\n width: 52px;\n margin: 0;\n padding: 0 6px;\n\n &&& {\n text-align: left;\n border-color: ${theme.colors.neutral.ink.lightest};\n }\n`;\n\nconst Error = styled.span`\n display: block;\n font-family: ${theme.text.error.fontFamily};\n font-size: ${theme.text.error.fontSize};\n font-weight: ${theme.text.error.fontWeight};\n line-height: ${theme.text.error.lineHeight};\n color: ${theme.text.error.color};\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n left: calc(${theme.sizes[2]} * -1);\n width: 2px;\n background-color: ${theme.colors.secondary.red.base};\n }\n`;\n\nconst Hint = styled.span`\n display: block;\n font-family: ${theme.fontFamily};\n font-size: ${theme.sizes[3]};\n line-height: ${theme.sizes[4]};\n color: ${theme.colors.neutral.ink.light};\n`;\n\nexport { Container, Row, Error, Hint, StyledTextField as TextField };\n"],"names":[],"mappings":";;;;;AAMA,MAAM,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC;AAMvC,MAAM,GAAG,GAAG,MAAM,CAAC,aAAa,CAAC;AAQjC,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC,CAOrB,UAAA,CAAA,EAAA,WAAA,EAAA,sBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,mEAAA,EAAA,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ;AAIvC,MAAM,CAAC,IAAI,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,0BAAA,EAER,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAA,WAAA,EAC7B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAA,aAAA,EACvB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAC3B,aAAA,EAAA,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CACjC,OAAA,EAAA,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,oEAOhB,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAEP,kCAAA,EAAA,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI;AAI1C,MAAM,CAAC,IAAI,CAEP,UAAA,CAAA,EAAA,WAAA,EAAA,WAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,0BAAA,EAAA,KAAK,CAAC,UAAU,cAClB,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,aAAA,EACZ,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,UACpB,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK;;;;"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { ComponentSize } from '../types';
|
|
2
|
-
export
|
|
2
|
+
export type DimensionsProps = {
|
|
3
3
|
size?: ComponentSize;
|
|
4
4
|
handleChangeHeight: (value: string) => void;
|
|
5
5
|
handleChangeWidth: (value: string) => void;
|
|
6
6
|
handleChangeLength: (value: string) => void;
|
|
7
|
-
label?: string;
|
|
8
|
-
hint?: string;
|
|
9
|
-
error?: string;
|
|
10
7
|
height: string;
|
|
11
8
|
width: string;
|
|
12
9
|
length: string;
|
|
13
10
|
unit?: string;
|
|
14
11
|
className?: string;
|
|
15
|
-
}
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var Text = require('../../../Text/Text.cjs');
|
|
5
|
+
var styled = require('./styled.cjs');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
|
+
|
|
11
|
+
const InputGroupLabel = ({ id, unit, size }) => (React__default.default.createElement(styled.GroupLabelWrapper, { size: size },
|
|
12
|
+
React__default.default.createElement(Text.Text, { variant: "body", id: id }, unit)));
|
|
13
|
+
|
|
14
|
+
exports.InputGroupLabel = InputGroupLabel;
|
|
15
|
+
//# sourceMappingURL=InputGroupLabel.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputGroupLabel.cjs","sources":["../../../../../src/components/InputGroup/components/InputGroupLabel/InputGroupLabel.tsx"],"sourcesContent":["import React from 'react';\nimport { ComponentSize } from 'src/components/types';\nimport { Text } from '../../../Text';\nimport { GroupLabelWrapper } from './styled';\n\ntype InputGroupLabelProps = {\n id?: string;\n unit: string;\n size: ComponentSize;\n};\n\nexport const InputGroupLabel = ({ id, unit, size }: InputGroupLabelProps) => (\n <GroupLabelWrapper size={size}>\n <Text variant=\"body\" id={id}>\n {unit}\n </Text>\n </GroupLabelWrapper>\n);\n"],"names":["React","GroupLabelWrapper","Text"],"mappings":";;;;;;;;;;MAWa,eAAe,GAAG,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAwB,MACtEA,qCAACC,wBAAiB,EAAA,EAAC,IAAI,EAAE,IAAI,EAAA;AAC3B,IAAAD,sBAAA,CAAA,aAAA,CAACE,SAAI,EAAA,EAAC,OAAO,EAAC,MAAM,EAAC,EAAE,EAAE,EAAE,EACxB,EAAA,IAAI,CACA,CACW;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentSize } from 'src/components/types';
|
|
3
|
+
type InputGroupLabelProps = {
|
|
4
|
+
id?: string;
|
|
5
|
+
unit: string;
|
|
6
|
+
size: ComponentSize;
|
|
7
|
+
};
|
|
8
|
+
export declare const InputGroupLabel: ({ id, unit, size }: InputGroupLabelProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text } from '../../../Text/Text.js';
|
|
3
|
+
import { GroupLabelWrapper } from './styled.js';
|
|
4
|
+
|
|
5
|
+
const InputGroupLabel = ({ id, unit, size }) => (React.createElement(GroupLabelWrapper, { size: size },
|
|
6
|
+
React.createElement(Text, { variant: "body", id: id }, unit)));
|
|
7
|
+
|
|
8
|
+
export { InputGroupLabel };
|
|
9
|
+
//# sourceMappingURL=InputGroupLabel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputGroupLabel.js","sources":["../../../../../src/components/InputGroup/components/InputGroupLabel/InputGroupLabel.tsx"],"sourcesContent":["import React from 'react';\nimport { ComponentSize } from 'src/components/types';\nimport { Text } from '../../../Text';\nimport { GroupLabelWrapper } from './styled';\n\ntype InputGroupLabelProps = {\n id?: string;\n unit: string;\n size: ComponentSize;\n};\n\nexport const InputGroupLabel = ({ id, unit, size }: InputGroupLabelProps) => (\n <GroupLabelWrapper size={size}>\n <Text variant=\"body\" id={id}>\n {unit}\n </Text>\n </GroupLabelWrapper>\n);\n"],"names":[],"mappings":";;;;MAWa,eAAe,GAAG,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAwB,MACtE,oBAAC,iBAAiB,EAAA,EAAC,IAAI,EAAE,IAAI,EAAA;AAC3B,IAAA,KAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAC,OAAO,EAAC,MAAM,EAAC,EAAE,EAAE,EAAE,EACxB,EAAA,IAAI,CACA,CACW;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InputGroupLabel } from './InputGroupLabel';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var styled = require('styled-components');
|
|
4
|
+
var index = require('../../../../theme/index.cjs');
|
|
5
|
+
|
|
6
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
7
|
+
|
|
8
|
+
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
9
|
+
|
|
10
|
+
const GroupLabelWrapper = styled__default.default.div.withConfig({ displayName: "vui--GroupLabelWrapper", componentId: "vui--1nbjbcg" }) `display:flex;align-items:center;padding:0 6px;border:1px solid;border-color:${index.theme.colors.neutral.ink.lightest};border-radius:${index.theme.radius.base};`;
|
|
11
|
+
|
|
12
|
+
exports.GroupLabelWrapper = GroupLabelWrapper;
|
|
13
|
+
//# sourceMappingURL=styled.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.cjs","sources":["../../../../../src/components/InputGroup/components/InputGroupLabel/styled.ts"],"sourcesContent":["import { ComponentSize } from 'src/components/types';\nimport styled from 'styled-components';\nimport { theme } from 'Theme';\n\nexport const GroupLabelWrapper = styled.div<{ size: ComponentSize }>`\n display: flex;\n align-items: center;\n\n padding: 0 6px;\n\n border: 1px solid;\n border-color: ${theme.colors.neutral.ink.lightest};\n border-radius: ${theme.radius.base};\n`;\n"],"names":["styled","theme"],"mappings":";;;;;;;;;AAIa,MAAA,iBAAiB,GAAGA,uBAAM,CAAC,GAAG,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,wBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,4EAAA,EAOzBC,WAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAChC,eAAA,EAAAA,WAAK,CAAC,MAAM,CAAC,IAAI,CAAA,CAAA;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { theme } from '../../../../theme/index.js';
|
|
3
|
+
|
|
4
|
+
const GroupLabelWrapper = styled.div.withConfig({ displayName: "vui--GroupLabelWrapper", componentId: "vui--1nbjbcg" }) `display:flex;align-items:center;padding:0 6px;border:1px solid;border-color:${theme.colors.neutral.ink.lightest};border-radius:${theme.radius.base};`;
|
|
5
|
+
|
|
6
|
+
export { GroupLabelWrapper };
|
|
7
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../src/components/InputGroup/components/InputGroupLabel/styled.ts"],"sourcesContent":["import { ComponentSize } from 'src/components/types';\nimport styled from 'styled-components';\nimport { theme } from 'Theme';\n\nexport const GroupLabelWrapper = styled.div<{ size: ComponentSize }>`\n display: flex;\n align-items: center;\n\n padding: 0 6px;\n\n border: 1px solid;\n border-color: ${theme.colors.neutral.ink.lightest};\n border-radius: ${theme.radius.base};\n`;\n"],"names":[],"mappings":";;;AAIa,MAAA,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,wBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,4EAAA,EAOzB,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAChC,eAAA,EAAA,KAAK,CAAC,MAAM,CAAC,IAAI,CAAA,CAAA;;;;"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var styled = require('styled-components');
|
|
4
|
+
require('react');
|
|
5
|
+
require('../Text/Text.cjs');
|
|
6
|
+
require('./components/InputGroupLabel/styled.cjs');
|
|
4
7
|
|
|
5
8
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
6
9
|
|
|
7
10
|
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
8
11
|
|
|
9
|
-
const InputGroup = styled__default.default.div.withConfig({ displayName: "vui--InputGroup", componentId: "vui--1w0e9jz" }) `display:flex;& > *{margin-left:0;margin-right:0;box-shadow:none;}& > *:not(:last-child){border-right-width:0 !important;}& > *:
|
|
12
|
+
const InputGroup = styled__default.default.div.withConfig({ displayName: "vui--InputGroup", componentId: "vui--1w0e9jz" }) `display:flex;& > *{margin-left:0;margin-right:0;box-shadow:none;}& > *:not(:last-child){border-right-width:0 !important;}& > *:focus,& > *:active{z-index:5;}& > *:not(:first-child):not(:last-child){border-top-left-radius:0 !important;border-top-right-radius:0 !important;border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important;}& > *:first-child{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;}& > *:last-child{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important;}`;
|
|
10
13
|
|
|
11
14
|
exports.InputGroup = InputGroup;
|
|
12
15
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/InputGroup/index.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const InputGroup = styled.div`\n display: flex;\n\n & > * {\n margin-left: 0;\n margin-right: 0;\n box-shadow: none;\n }\n\n & > *:not(:last-child) {\n border-right-width: 0 !important;\n }\n\n & > *:
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/InputGroup/index.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport { InputGroupLabel } from './components/InputGroupLabel';\n\nexport const InputGroup = styled.div`\n display: flex;\n\n & > * {\n margin-left: 0;\n margin-right: 0;\n box-shadow: none;\n }\n\n & > *:not(:last-child) {\n border-right-width: 0 !important;\n }\n\n & > *:focus,\n & > *:active {\n z-index: 5;\n }\n\n & > *:not(:first-child):not(:last-child) {\n border-top-left-radius: 0 !important;\n border-top-right-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n & > *:first-child {\n border-top-right-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n & > *:last-child {\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n }\n`;\n"],"names":["styled"],"mappings":";;;;;;;;;;;MAIa,UAAU,GAAGA,uBAAM,CAAC,GAAG;;;;"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
+
import 'react';
|
|
3
|
+
import '../Text/Text.js';
|
|
4
|
+
import './components/InputGroupLabel/styled.js';
|
|
2
5
|
|
|
3
|
-
const InputGroup = styled.div.withConfig({ displayName: "vui--InputGroup", componentId: "vui--1w0e9jz" }) `display:flex;& > *{margin-left:0;margin-right:0;box-shadow:none;}& > *:not(:last-child){border-right-width:0 !important;}& > *:
|
|
6
|
+
const InputGroup = styled.div.withConfig({ displayName: "vui--InputGroup", componentId: "vui--1w0e9jz" }) `display:flex;& > *{margin-left:0;margin-right:0;box-shadow:none;}& > *:not(:last-child){border-right-width:0 !important;}& > *:focus,& > *:active{z-index:5;}& > *:not(:first-child):not(:last-child){border-top-left-radius:0 !important;border-top-right-radius:0 !important;border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important;}& > *:first-child{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;}& > *:last-child{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important;}`;
|
|
4
7
|
|
|
5
8
|
export { InputGroup };
|
|
6
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/InputGroup/index.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const InputGroup = styled.div`\n display: flex;\n\n & > * {\n margin-left: 0;\n margin-right: 0;\n box-shadow: none;\n }\n\n & > *:not(:last-child) {\n border-right-width: 0 !important;\n }\n\n & > *:
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/InputGroup/index.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport { InputGroupLabel } from './components/InputGroupLabel';\n\nexport const InputGroup = styled.div`\n display: flex;\n\n & > * {\n margin-left: 0;\n margin-right: 0;\n box-shadow: none;\n }\n\n & > *:not(:last-child) {\n border-right-width: 0 !important;\n }\n\n & > *:focus,\n & > *:active {\n z-index: 5;\n }\n\n & > *:not(:first-child):not(:last-child) {\n border-top-left-radius: 0 !important;\n border-top-right-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n & > *:first-child {\n border-top-right-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n\n & > *:last-child {\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n }\n`;\n"],"names":[],"mappings":";;;;;MAIa,UAAU,GAAG,MAAM,CAAC,GAAG;;;;"}
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
+
var index$1 = require('../../theme/index.cjs');
|
|
4
5
|
var types = require('./types.cjs');
|
|
5
6
|
var types$1 = require('../types.cjs');
|
|
6
7
|
var index = require('../InputGroup/index.cjs');
|
|
7
|
-
var withLabels = require('../../hoc/withLabels/withLabels.cjs');
|
|
8
8
|
var styled = require('./styled.cjs');
|
|
9
9
|
var blockInvalidCharacters = require('../../utils/blockInvalidCharacters.cjs');
|
|
10
10
|
var invalidCharactersNumeric = require('../../utils/invalidCharactersNumeric.cjs');
|
|
11
|
+
var InputGroupLabel = require('../InputGroup/components/InputGroupLabel/InputGroupLabel.cjs');
|
|
11
12
|
|
|
12
13
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
13
14
|
|
|
14
15
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
16
|
|
|
16
17
|
const blockInvalidChars = (e) => blockInvalidCharacters.blockInvalidCharacters(e, invalidCharactersNumeric.invalidCharsList);
|
|
17
|
-
const WeightInput =
|
|
18
|
+
const WeightInput = ({ size = types$1.ComponentSize.base, hasError, className, ...rest }) => (React__default.default.createElement(styled.Container, { className: className, role: "group", "aria-label": "Weight" },
|
|
18
19
|
React__default.default.createElement(styled.Row, null,
|
|
19
20
|
types.isWeightMetric(rest) && (React__default.default.createElement(index.InputGroup, null,
|
|
20
|
-
React__default.default.createElement(styled.TextField, {
|
|
21
|
-
React__default.default.createElement(
|
|
21
|
+
React__default.default.createElement(styled.TextField, { name: "gram", type: "number", value: rest.gram, "aria-label": "Grams", min: "0", step: "any", size: size, hasError: hasError, onChange: rest.handleChangeGram, onKeyDown: blockInvalidChars }),
|
|
22
|
+
React__default.default.createElement(InputGroupLabel.InputGroupLabel, { unit: "g", size: size }))),
|
|
22
23
|
types.isWeightImperial(rest) && (React__default.default.createElement(React__default.default.Fragment, null,
|
|
24
|
+
React__default.default.createElement(index.InputGroup, { style: { marginRight: index$1.theme.sizes.xs } },
|
|
25
|
+
React__default.default.createElement(styled.TextField, { name: "pound", type: "number", value: rest.pound, "aria-label": "Pounds", min: "0", step: "any", size: size, hasError: hasError, onChange: rest.handleChangePound, onKeyDown: blockInvalidChars }),
|
|
26
|
+
React__default.default.createElement(InputGroupLabel.InputGroupLabel, { unit: "lb", size: size })),
|
|
23
27
|
React__default.default.createElement(index.InputGroup, null,
|
|
24
|
-
React__default.default.createElement(styled.TextField, {
|
|
25
|
-
React__default.default.createElement(
|
|
26
|
-
React__default.default.createElement(index.InputGroup, null,
|
|
27
|
-
React__default.default.createElement(styled.TextField, { size: size, onChange: rest.handleChangeOunce, name: "ounce", type: "number", value: rest.ounce, hasError: hasError, min: "0", step: "any", onKeyDown: blockInvalidChars, ...rest }),
|
|
28
|
-
React__default.default.createElement(styled.Button, { hasError: hasError, size: size }, "oz"))))))));
|
|
28
|
+
React__default.default.createElement(styled.TextField, { name: "ounce", type: "number", value: rest.ounce, "aria-label": "Ounces", min: "0", step: "any", size: size, hasError: hasError, onChange: rest.handleChangeOunce, onKeyDown: blockInvalidChars }),
|
|
29
|
+
React__default.default.createElement(InputGroupLabel.InputGroupLabel, { unit: "oz", size: size })))))));
|
|
29
30
|
WeightInput.displayName = 'WeightInput';
|
|
30
31
|
WeightInput.defaultProps = {
|
|
31
32
|
weightUnit: 'lb',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WeightInput.cjs","sources":["../../../src/components/WeightInput/WeightInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { WeightProps, isWeightImperial, isWeightMetric } from './types';\nimport { ComponentSize } from '../types';\nimport { InputGroup } from '../InputGroup';\
|
|
1
|
+
{"version":3,"file":"WeightInput.cjs","sources":["../../../src/components/WeightInput/WeightInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { theme } from 'Theme';\nimport { WeightProps, isWeightImperial, isWeightMetric } from './types';\nimport { ComponentSize } from '../types';\nimport { InputGroup, InputGroupLabel } from '../InputGroup';\n\nimport { Container, TextField, Row } from './styled';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\n\nexport const WeightInput: FC<WeightProps> = ({\n size = ComponentSize.base,\n hasError,\n className,\n ...rest\n}: WeightProps) => (\n <Container className={className} role=\"group\" aria-label=\"Weight\">\n <Row>\n {isWeightMetric(rest) && (\n <InputGroup>\n <TextField\n name=\"gram\"\n type=\"number\"\n value={rest.gram}\n aria-label=\"Grams\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangeGram}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"g\" size={size} />\n </InputGroup>\n )}\n\n {isWeightImperial(rest) && (\n <>\n <InputGroup style={{ marginRight: theme.sizes.xs }}>\n <TextField\n name=\"pound\"\n type=\"number\"\n value={rest.pound}\n aria-label=\"Pounds\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangePound}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"lb\" size={size} />\n </InputGroup>\n <InputGroup>\n <TextField\n name=\"ounce\"\n type=\"number\"\n value={rest.ounce}\n aria-label=\"Ounces\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangeOunce}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"oz\" size={size} />\n </InputGroup>\n </>\n )}\n </Row>\n </Container>\n);\n\nWeightInput.displayName = 'WeightInput';\n\nWeightInput.defaultProps = {\n weightUnit: 'lb',\n};\n"],"names":["blockInvalidCharacters","invalidCharsList","ComponentSize","React","Container","Row","isWeightMetric","InputGroup","TextField","InputGroupLabel","isWeightImperial","theme"],"mappings":";;;;;;;;;;;;;;;;AAWA,MAAM,iBAAiB,GAAG,CAAC,CAAsB,KAAKA,6CAAsB,CAAC,CAAC,EAAEC,yCAAgB,CAAC;AAE1F,MAAM,WAAW,GAAoB,CAAC,EAC3C,IAAI,GAAGC,qBAAa,CAAC,IAAI,EACzB,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACK,MACZC,qCAACC,gBAAS,EAAA,EAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,OAAO,gBAAY,QAAQ,EAAA;AAC/D,IAAAD,sBAAA,CAAA,aAAA,CAACE,UAAG,EAAA,IAAA;AACD,QAAAC,oBAAc,CAAC,IAAI,CAAC,KACnBH,qCAACI,gBAAU,EAAA,IAAA;AACT,YAAAJ,sBAAA,CAAA,aAAA,CAACK,gBAAS,EACR,EAAA,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,IAAI,CAAC,IAAI,gBACL,OAAO,EAClB,GAAG,EAAC,GAAG,EACP,IAAI,EAAC,KAAK,EACV,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAC/B,SAAS,EAAE,iBAAiB,EAC5B,CAAA;YACFL,sBAAC,CAAA,aAAA,CAAAM,+BAAe,EAAC,EAAA,IAAI,EAAC,GAAG,EAAC,IAAI,EAAE,IAAI,EAAI,CAAA,CAC7B,CACd;AAEA,QAAAC,sBAAgB,CAAC,IAAI,CAAC,KACrBP,sBAAA,CAAA,aAAA,CAAAA,sBAAA,CAAA,QAAA,EAAA,IAAA;AACE,YAAAA,sBAAA,CAAA,aAAA,CAACI,gBAAU,EAAA,EA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2
3
|
import { isWeightMetric, isWeightImperial } from './types.js';
|
|
3
4
|
import { ComponentSize } from '../types.js';
|
|
4
5
|
import { InputGroup } from '../InputGroup/index.js';
|
|
5
|
-
import {
|
|
6
|
-
import { Container, Row, TextField as StyledTextField, Button as StyledButton } from './styled.js';
|
|
6
|
+
import { Container, Row, TextField as StyledTextField } from './styled.js';
|
|
7
7
|
import { blockInvalidCharacters } from '../../utils/blockInvalidCharacters.js';
|
|
8
8
|
import { invalidCharsList } from '../../utils/invalidCharactersNumeric.js';
|
|
9
|
+
import { InputGroupLabel } from '../InputGroup/components/InputGroupLabel/InputGroupLabel.js';
|
|
9
10
|
|
|
10
11
|
const blockInvalidChars = (e) => blockInvalidCharacters(e, invalidCharsList);
|
|
11
|
-
const WeightInput =
|
|
12
|
+
const WeightInput = ({ size = ComponentSize.base, hasError, className, ...rest }) => (React.createElement(Container, { className: className, role: "group", "aria-label": "Weight" },
|
|
12
13
|
React.createElement(Row, null,
|
|
13
14
|
isWeightMetric(rest) && (React.createElement(InputGroup, null,
|
|
14
|
-
React.createElement(StyledTextField, {
|
|
15
|
-
React.createElement(
|
|
15
|
+
React.createElement(StyledTextField, { name: "gram", type: "number", value: rest.gram, "aria-label": "Grams", min: "0", step: "any", size: size, hasError: hasError, onChange: rest.handleChangeGram, onKeyDown: blockInvalidChars }),
|
|
16
|
+
React.createElement(InputGroupLabel, { unit: "g", size: size }))),
|
|
16
17
|
isWeightImperial(rest) && (React.createElement(React.Fragment, null,
|
|
18
|
+
React.createElement(InputGroup, { style: { marginRight: theme.sizes.xs } },
|
|
19
|
+
React.createElement(StyledTextField, { name: "pound", type: "number", value: rest.pound, "aria-label": "Pounds", min: "0", step: "any", size: size, hasError: hasError, onChange: rest.handleChangePound, onKeyDown: blockInvalidChars }),
|
|
20
|
+
React.createElement(InputGroupLabel, { unit: "lb", size: size })),
|
|
17
21
|
React.createElement(InputGroup, null,
|
|
18
|
-
React.createElement(StyledTextField, {
|
|
19
|
-
React.createElement(
|
|
20
|
-
React.createElement(InputGroup, null,
|
|
21
|
-
React.createElement(StyledTextField, { size: size, onChange: rest.handleChangeOunce, name: "ounce", type: "number", value: rest.ounce, hasError: hasError, min: "0", step: "any", onKeyDown: blockInvalidChars, ...rest }),
|
|
22
|
-
React.createElement(StyledButton, { hasError: hasError, size: size }, "oz"))))))));
|
|
22
|
+
React.createElement(StyledTextField, { name: "ounce", type: "number", value: rest.ounce, "aria-label": "Ounces", min: "0", step: "any", size: size, hasError: hasError, onChange: rest.handleChangeOunce, onKeyDown: blockInvalidChars }),
|
|
23
|
+
React.createElement(InputGroupLabel, { unit: "oz", size: size })))))));
|
|
23
24
|
WeightInput.displayName = 'WeightInput';
|
|
24
25
|
WeightInput.defaultProps = {
|
|
25
26
|
weightUnit: 'lb',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WeightInput.js","sources":["../../../src/components/WeightInput/WeightInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { WeightProps, isWeightImperial, isWeightMetric } from './types';\nimport { ComponentSize } from '../types';\nimport { InputGroup } from '../InputGroup';\
|
|
1
|
+
{"version":3,"file":"WeightInput.js","sources":["../../../src/components/WeightInput/WeightInput.tsx"],"sourcesContent":["import React, { FC } from 'react';\n\nimport { theme } from 'Theme';\nimport { WeightProps, isWeightImperial, isWeightMetric } from './types';\nimport { ComponentSize } from '../types';\nimport { InputGroup, InputGroupLabel } from '../InputGroup';\n\nimport { Container, TextField, Row } from './styled';\nimport { blockInvalidCharacters } from '../../utils/blockInvalidCharacters';\nimport { invalidCharsList } from '../../utils/invalidCharactersNumeric';\n\nconst blockInvalidChars = (e: React.KeyboardEvent) => blockInvalidCharacters(e, invalidCharsList);\n\nexport const WeightInput: FC<WeightProps> = ({\n size = ComponentSize.base,\n hasError,\n className,\n ...rest\n}: WeightProps) => (\n <Container className={className} role=\"group\" aria-label=\"Weight\">\n <Row>\n {isWeightMetric(rest) && (\n <InputGroup>\n <TextField\n name=\"gram\"\n type=\"number\"\n value={rest.gram}\n aria-label=\"Grams\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangeGram}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"g\" size={size} />\n </InputGroup>\n )}\n\n {isWeightImperial(rest) && (\n <>\n <InputGroup style={{ marginRight: theme.sizes.xs }}>\n <TextField\n name=\"pound\"\n type=\"number\"\n value={rest.pound}\n aria-label=\"Pounds\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangePound}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"lb\" size={size} />\n </InputGroup>\n <InputGroup>\n <TextField\n name=\"ounce\"\n type=\"number\"\n value={rest.ounce}\n aria-label=\"Ounces\"\n min=\"0\"\n step=\"any\"\n size={size}\n hasError={hasError}\n onChange={rest.handleChangeOunce}\n onKeyDown={blockInvalidChars}\n />\n <InputGroupLabel unit=\"oz\" size={size} />\n </InputGroup>\n </>\n )}\n </Row>\n </Container>\n);\n\nWeightInput.displayName = 'WeightInput';\n\nWeightInput.defaultProps = {\n weightUnit: 'lb',\n};\n"],"names":["TextField"],"mappings":";;;;;;;;;;AAWA,MAAM,iBAAiB,GAAG,CAAC,CAAsB,KAAK,sBAAsB,CAAC,CAAC,EAAE,gBAAgB,CAAC;AAE1F,MAAM,WAAW,GAAoB,CAAC,EAC3C,IAAI,GAAG,aAAa,CAAC,IAAI,EACzB,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACK,MACZ,oBAAC,SAAS,EAAA,EAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,OAAO,gBAAY,QAAQ,EAAA;AAC/D,IAAA,KAAA,CAAA,aAAA,CAAC,GAAG,EAAA,IAAA;AACD,QAAA,cAAc,CAAC,IAAI,CAAC,KACnB,oBAAC,UAAU,EAAA,IAAA;AACT,YAAA,KAAA,CAAA,aAAA,CAACA,eAAS,EACR,EAAA,IAAI,EAAC,MAAM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AG,EACP,IAAI,EAAC,KAAK,EACV,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAChC,SAAS,EAAE,iBAAiB,EAC5B,CAAA;AACF,gBAAA,KAAA,CAAA,aAAA,CAAC,eAAe,EAAC,EAAA,IAAI,EAAC,IAAI,EAAC,IAAI,EAAE,IAAI,EAAA,CAAI,CAC9B,CACZ,CACJ,CACG,CACI;AAGd,WAAW,CAAC,WAAW,GAAG,aAAa;AAEvC,WAAW,CAAC,YAAY,GAAG;AACzB,IAAA,UAAU,EAAE,IAAI;CACjB;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var withLabels = require('../../hoc/withLabels/withLabels.cjs');
|
|
4
|
+
require('react');
|
|
5
|
+
var WeightInput$1 = require('./WeightInput.cjs');
|
|
6
|
+
|
|
7
|
+
const WeightInput = withLabels.withLabels(WeightInput$1.WeightInput);
|
|
8
|
+
|
|
9
|
+
exports.WeightInput = WeightInput;
|
|
10
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/WeightInput/index.ts"],"sourcesContent":["import { withLabels } from '../../hoc';\nimport { WeightInput as BaseWeightInput } from './WeightInput';\n\nexport const WeightInput = withLabels(BaseWeightInput);\n"],"names":["withLabels","BaseWeightInput"],"mappings":";;;;;;MAGa,WAAW,GAAGA,qBAAU,CAACC,yBAAe;;;;"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const WeightInput: import("react").FC<import("./types").WeightProps & import("../../hoc/withLabels/withLabels").WithLabelsProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/WeightInput/index.ts"],"sourcesContent":["import { withLabels } from '../../hoc';\nimport { WeightInput as BaseWeightInput } from './WeightInput';\n\nexport const WeightInput = withLabels(BaseWeightInput);\n"],"names":["BaseWeightInput"],"mappings":";;;;MAGa,WAAW,GAAG,UAAU,CAACA,aAAe;;;;"}
|
|
@@ -13,12 +13,11 @@ var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
|
13
13
|
const Container = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Container", componentId: "vui--18asccd" }) `display:flex;flex-direction:column;position:relative;`;
|
|
14
14
|
const Row = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Row", componentId: "vui--hefld1" }) `display:flex;flex-direction:row;`;
|
|
15
15
|
const StyledTextField = styled__default.default(index.TextField).withConfig({ displayName: "vui--StyledTextField", componentId: "vui--1w2y0ok" }) `&&&{text-align:left;width:52px;}`;
|
|
16
|
-
|
|
16
|
+
styled__default.default(Button.Button).withConfig({ displayName: "vui--StyledButton", componentId: "vui--fqwvpz" }) `padding:0 4px;border-color:${index$1.theme.colors.neutral.ink.lightest};margin-right:4px;${(props) => props.hasError &&
|
|
17
17
|
`
|
|
18
18
|
border-color: ${index$1.theme.colors.secondary.red.base};
|
|
19
19
|
`};`;
|
|
20
20
|
|
|
21
|
-
exports.Button = StyledButton;
|
|
22
21
|
exports.Container = Container;
|
|
23
22
|
exports.Row = Row;
|
|
24
23
|
exports.TextField = StyledTextField;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.cjs","sources":["../../../src/components/WeightInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { theme } from '../../theme';\n\nimport { Button } from '../Button';\nimport { TextField } from '../TextField';\nimport { BaseContainer } from '../BaseContainer';\n\nconst Container = styled(BaseContainer)`\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n\nconst Row = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n`;\n\nconst StyledTextField = styled(TextField)`\n &&& {\n text-align: left;\n width: 52px;\n }\n`;\n\nconst StyledButton = styled(Button)<{ hasError?: boolean }>`\n padding: 0 4px;\n border-color: ${theme.colors.neutral.ink.lightest};\n margin-right: 4px;\n\n ${(props) =>\n props.hasError &&\n `\n border-color: ${theme.colors.secondary.red.base};\n `};\n`;\n\nexport { Container, Row, StyledTextField as TextField, StyledButton as Button };\n"],"names":["styled","BaseContainer","TextField","Button","theme"],"mappings":";;;;;;;;;;;;AAQA,MAAM,SAAS,GAAGA,uBAAM,CAACC,2BAAa,CAAC;AAMvC,MAAM,GAAG,GAAGD,uBAAM,CAACC,2BAAa,CAAC;AAKjC,MAAM,eAAe,GAAGD,uBAAM,CAACE,eAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"styled.cjs","sources":["../../../src/components/WeightInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { theme } from '../../theme';\n\nimport { Button } from '../Button';\nimport { TextField } from '../TextField';\nimport { BaseContainer } from '../BaseContainer';\n\nconst Container = styled(BaseContainer)`\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n\nconst Row = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n`;\n\nconst StyledTextField = styled(TextField)`\n &&& {\n text-align: left;\n width: 52px;\n }\n`;\n\nconst StyledButton = styled(Button)<{ hasError?: boolean }>`\n padding: 0 4px;\n border-color: ${theme.colors.neutral.ink.lightest};\n margin-right: 4px;\n\n ${(props) =>\n props.hasError &&\n `\n border-color: ${theme.colors.secondary.red.base};\n `};\n`;\n\nexport { Container, Row, StyledTextField as TextField, StyledButton as Button };\n"],"names":["styled","BaseContainer","TextField","Button","theme"],"mappings":";;;;;;;;;;;;AAQA,MAAM,SAAS,GAAGA,uBAAM,CAACC,2BAAa,CAAC;AAMvC,MAAM,GAAG,GAAGD,uBAAM,CAACC,2BAAa,CAAC;AAKjC,MAAM,eAAe,GAAGD,uBAAM,CAACE,eAAS,CAAC;AAOpBF,uBAAM,CAACG,aAAM,CAAC,CAEjB,UAAA,CAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,2BAAA,EAAAC,aAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA,kBAAA,EAG/C,CAAC,KAAK,KACN,KAAK,CAAC,QAAQ;AACd,IAAA;AACgB,kBAAA,EAAAA,aAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAA;AAChD,EAAA,CAAA,CAAA,CAAA;;;;;;"}
|
|
@@ -7,10 +7,10 @@ import { BaseContainer } from '../BaseContainer/BaseContainer.js';
|
|
|
7
7
|
const Container = styled(BaseContainer).withConfig({ displayName: "vui--Container", componentId: "vui--18asccd" }) `display:flex;flex-direction:column;position:relative;`;
|
|
8
8
|
const Row = styled(BaseContainer).withConfig({ displayName: "vui--Row", componentId: "vui--hefld1" }) `display:flex;flex-direction:row;`;
|
|
9
9
|
const StyledTextField = styled(TextField).withConfig({ displayName: "vui--StyledTextField", componentId: "vui--1w2y0ok" }) `&&&{text-align:left;width:52px;}`;
|
|
10
|
-
|
|
10
|
+
styled(Button).withConfig({ displayName: "vui--StyledButton", componentId: "vui--fqwvpz" }) `padding:0 4px;border-color:${theme.colors.neutral.ink.lightest};margin-right:4px;${(props) => props.hasError &&
|
|
11
11
|
`
|
|
12
12
|
border-color: ${theme.colors.secondary.red.base};
|
|
13
13
|
`};`;
|
|
14
14
|
|
|
15
|
-
export {
|
|
15
|
+
export { Container, Row, StyledTextField as TextField };
|
|
16
16
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../src/components/WeightInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { theme } from '../../theme';\n\nimport { Button } from '../Button';\nimport { TextField } from '../TextField';\nimport { BaseContainer } from '../BaseContainer';\n\nconst Container = styled(BaseContainer)`\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n\nconst Row = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n`;\n\nconst StyledTextField = styled(TextField)`\n &&& {\n text-align: left;\n width: 52px;\n }\n`;\n\nconst StyledButton = styled(Button)<{ hasError?: boolean }>`\n padding: 0 4px;\n border-color: ${theme.colors.neutral.ink.lightest};\n margin-right: 4px;\n\n ${(props) =>\n props.hasError &&\n `\n border-color: ${theme.colors.secondary.red.base};\n `};\n`;\n\nexport { Container, Row, StyledTextField as TextField, StyledButton as Button };\n"],"names":[],"mappings":";;;;;;AAQA,MAAM,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC;AAMvC,MAAM,GAAG,GAAG,MAAM,CAAC,aAAa,CAAC;AAKjC,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../src/components/WeightInput/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { theme } from '../../theme';\n\nimport { Button } from '../Button';\nimport { TextField } from '../TextField';\nimport { BaseContainer } from '../BaseContainer';\n\nconst Container = styled(BaseContainer)`\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n\nconst Row = styled(BaseContainer)`\n display: flex;\n flex-direction: row;\n`;\n\nconst StyledTextField = styled(TextField)`\n &&& {\n text-align: left;\n width: 52px;\n }\n`;\n\nconst StyledButton = styled(Button)<{ hasError?: boolean }>`\n padding: 0 4px;\n border-color: ${theme.colors.neutral.ink.lightest};\n margin-right: 4px;\n\n ${(props) =>\n props.hasError &&\n `\n border-color: ${theme.colors.secondary.red.base};\n `};\n`;\n\nexport { Container, Row, StyledTextField as TextField, StyledButton as Button };\n"],"names":[],"mappings":";;;;;;AAQA,MAAM,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC;AAMvC,MAAM,GAAG,GAAG,MAAM,CAAC,aAAa,CAAC;AAKjC,MAAM,eAAe,GAAG,MAAM,CAAC,SAAS,CAAC;AAOpB,MAAM,CAAC,MAAM,CAAC,CAEjB,UAAA,CAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,2BAAA,EAAA,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA,kBAAA,EAG/C,CAAC,KAAK,KACN,KAAK,CAAC,QAAQ;AACd,IAAA;AACgB,kBAAA,EAAA,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAA;AAChD,EAAA,CAAA,CAAA,CAAA;;;;"}
|
|
@@ -12,7 +12,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
14
|
|
|
15
|
-
const withLabels = (Component) => ({ label, hint, error, tooltip, ...otherProps }) => {
|
|
15
|
+
const withLabels = (Component) => ({ label, hint, error, tooltip, tooltipContent, ...otherProps }) => {
|
|
16
16
|
const componentId = useId.useId({ id: otherProps === null || otherProps === undefined ? undefined : otherProps.id, prefix: Component.name });
|
|
17
17
|
if (!label)
|
|
18
18
|
return React__default.default.createElement(Component, { hasError: !!error, ...otherProps });
|
|
@@ -20,8 +20,8 @@ const withLabels = (Component) => ({ label, hint, error, tooltip, ...otherProps
|
|
|
20
20
|
React__default.default.createElement("div", { style: { marginBottom: index.theme.sizes.xs } },
|
|
21
21
|
React__default.default.createElement(Stack.Stack, { direction: "horizontal", alignY: "center", spacing: "sm" },
|
|
22
22
|
React__default.default.createElement(styled.Label, { id: `${componentId}-label`, htmlFor: componentId }, label),
|
|
23
|
-
tooltip && (React__default.default.createElement(styled.BlockTooltip, { text: tooltip },
|
|
24
|
-
React__default.default.createElement(HelpIcon.HelpIcon, { width: index.theme.sizes.base, height: index.theme.sizes.base, color: index.theme.colors.neutral.ink.light })))),
|
|
23
|
+
(tooltip || tooltipContent) && (React__default.default.createElement(styled.BlockTooltip, { text: tooltip, content: tooltipContent },
|
|
24
|
+
React__default.default.createElement(HelpIcon.HelpIcon, { "data-testid": "tooltip-help", width: index.theme.sizes.base, height: index.theme.sizes.base, color: index.theme.colors.neutral.ink.light })))),
|
|
25
25
|
hint && React__default.default.createElement(styled.Hint, { id: `${componentId}-hint` }, hint)),
|
|
26
26
|
React__default.default.createElement(Component, { id: componentId, hasError: !!error, ...otherProps }),
|
|
27
27
|
error && (React__default.default.createElement(Stack.Stack, { direction: "horizontal", alignY: "center", spacing: "xs" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withLabels.cjs","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, FC } from 'react';\nimport { AttentionIcon } from '../../tempIcons/AttentionIcon';\nimport { theme } from '../../theme';\nimport { Stack } from '../../components/Stack';\n\nimport { RootStack, Label, Hint, Error, BlockTooltip } from './styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { useId } from '../../hooks/useId';\n\nexport interface WithLabelsProps {\n id?: string;\n label?:
|
|
1
|
+
{"version":3,"file":"withLabels.cjs","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactNode } from 'react';\nimport { AttentionIcon } from '../../tempIcons/AttentionIcon';\nimport { theme } from '../../theme';\nimport { Stack } from '../../components/Stack';\n\nimport { RootStack, Label, Hint, Error, BlockTooltip } from './styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { useId } from '../../hooks/useId';\n\nexport interface WithLabelsProps {\n id?: string;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n}\n\nexport const withLabels =\n <P extends object>(Component: ComponentType<P>): FC<P & WithLabelsProps> =>\n ({ label, hint, error, tooltip, tooltipContent, ...otherProps }: WithLabelsProps) => {\n const componentId = useId({ id: otherProps?.id, prefix: Component.name });\n\n if (!label) return <Component hasError={!!error} {...(otherProps as P)} />;\n\n return (\n <RootStack spacing=\"sm\" alignX=\"stretch\">\n <div style={{ marginBottom: theme.sizes.xs }}>\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"sm\">\n <Label id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Label>\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 </Stack>\n {hint && <Hint id={`${componentId}-hint`}>{hint}</Hint>}\n </div>\n <Component id={componentId} hasError={!!error} {...(otherProps as P)} />\n {error && (\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"xs\">\n <AttentionIcon width={16} height={16} color={theme.colors.secondary.red.base} />\n <Error>{error}</Error>\n </Stack>\n )}\n </RootStack>\n );\n };\n"],"names":["useId","React","RootStack","theme","Stack","Label","BlockTooltip","HelpIcon","Hint","AttentionIcon","Error"],"mappings":";;;;;;;;;;;;;;AAkBa,MAAA,UAAU,GACrB,CAAmB,SAA2B,KAC9C,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,UAAU,EAAmB,KAAI;IAClF,MAAM,WAAW,GAAGA,WAAK,CAAC,EAAE,EAAE,EAAE,UAAU,KAAA,IAAA,IAAV,UAAU,KAAA,SAAA,GAAA,SAAA,GAAV,UAAU,CAAE,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;AAEzE,IAAA,IAAI,CAAC,KAAK;QAAE,OAAOC,sBAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAC,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAA,GAAO,UAAgB,EAAA,CAAI;IAE1E,QACEA,sBAAC,CAAA,aAAA,CAAAC,gBAAS,EAAC,EAAA,OAAO,EAAC,IAAI,EAAC,MAAM,EAAC,SAAS,EAAA;QACtCD,sBAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,EAAE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AAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAEN,WAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAI,CAAA;YAChFF,sBAAC,CAAA,aAAA,CAAAS,YAAK,QAAE,KAAK,CAAS,CAChB,CACT,CACS;AAEhB;;;;"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React, { ComponentType, FC } from 'react';
|
|
1
|
+
import React, { ComponentType, FC, ReactNode } from 'react';
|
|
2
2
|
export interface WithLabelsProps {
|
|
3
3
|
id?: string;
|
|
4
|
-
label?:
|
|
5
|
-
hint?:
|
|
6
|
-
error?:
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
hint?: ReactNode;
|
|
6
|
+
error?: ReactNode;
|
|
7
7
|
tooltip?: string;
|
|
8
|
+
tooltipContent?: ReactNode;
|
|
8
9
|
}
|
|
9
10
|
export declare const withLabels: <P extends object>(Component: React.ComponentType<P>) => React.FC<P & WithLabelsProps>;
|
|
@@ -6,7 +6,7 @@ import { RootStack, Label, BlockTooltip, Hint, Error } from './styled.js';
|
|
|
6
6
|
import { HelpIcon } from '../../tempIcons/HelpIcon.js';
|
|
7
7
|
import { useId } from '../../hooks/useId.js';
|
|
8
8
|
|
|
9
|
-
const withLabels = (Component) => ({ label, hint, error, tooltip, ...otherProps }) => {
|
|
9
|
+
const withLabels = (Component) => ({ label, hint, error, tooltip, tooltipContent, ...otherProps }) => {
|
|
10
10
|
const componentId = useId({ id: otherProps === null || otherProps === undefined ? undefined : otherProps.id, prefix: Component.name });
|
|
11
11
|
if (!label)
|
|
12
12
|
return React.createElement(Component, { hasError: !!error, ...otherProps });
|
|
@@ -14,8 +14,8 @@ const withLabels = (Component) => ({ label, hint, error, tooltip, ...otherProps
|
|
|
14
14
|
React.createElement("div", { style: { marginBottom: theme.sizes.xs } },
|
|
15
15
|
React.createElement(Stack, { direction: "horizontal", alignY: "center", spacing: "sm" },
|
|
16
16
|
React.createElement(Label, { id: `${componentId}-label`, htmlFor: componentId }, label),
|
|
17
|
-
tooltip && (React.createElement(BlockTooltip, { text: tooltip },
|
|
18
|
-
React.createElement(HelpIcon, { width: theme.sizes.base, height: theme.sizes.base, color: theme.colors.neutral.ink.light })))),
|
|
17
|
+
(tooltip || tooltipContent) && (React.createElement(BlockTooltip, { text: tooltip, content: tooltipContent },
|
|
18
|
+
React.createElement(HelpIcon, { "data-testid": "tooltip-help", width: theme.sizes.base, height: theme.sizes.base, color: theme.colors.neutral.ink.light })))),
|
|
19
19
|
hint && React.createElement(Hint, { id: `${componentId}-hint` }, hint)),
|
|
20
20
|
React.createElement(Component, { id: componentId, hasError: !!error, ...otherProps }),
|
|
21
21
|
error && (React.createElement(Stack, { direction: "horizontal", alignY: "center", spacing: "xs" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withLabels.js","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, FC } from 'react';\nimport { AttentionIcon } from '../../tempIcons/AttentionIcon';\nimport { theme } from '../../theme';\nimport { Stack } from '../../components/Stack';\n\nimport { RootStack, Label, Hint, Error, BlockTooltip } from './styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { useId } from '../../hooks/useId';\n\nexport interface WithLabelsProps {\n id?: string;\n label?:
|
|
1
|
+
{"version":3,"file":"withLabels.js","sources":["../../../src/hoc/withLabels/withLabels.tsx"],"sourcesContent":["import React, { ComponentType, FC, ReactNode } from 'react';\nimport { AttentionIcon } from '../../tempIcons/AttentionIcon';\nimport { theme } from '../../theme';\nimport { Stack } from '../../components/Stack';\n\nimport { RootStack, Label, Hint, Error, BlockTooltip } from './styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { useId } from '../../hooks/useId';\n\nexport interface WithLabelsProps {\n id?: string;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n}\n\nexport const withLabels =\n <P extends object>(Component: ComponentType<P>): FC<P & WithLabelsProps> =>\n ({ label, hint, error, tooltip, tooltipContent, ...otherProps }: WithLabelsProps) => {\n const componentId = useId({ id: otherProps?.id, prefix: Component.name });\n\n if (!label) return <Component hasError={!!error} {...(otherProps as P)} />;\n\n return (\n <RootStack spacing=\"sm\" alignX=\"stretch\">\n <div style={{ marginBottom: theme.sizes.xs }}>\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"sm\">\n <Label id={`${componentId}-label`} htmlFor={componentId}>\n {label}\n </Label>\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 </Stack>\n {hint && <Hint id={`${componentId}-hint`}>{hint}</Hint>}\n </div>\n <Component id={componentId} hasError={!!error} {...(otherProps as P)} />\n {error && (\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"xs\">\n <AttentionIcon width={16} height={16} color={theme.colors.secondary.red.base} />\n <Error>{error}</Error>\n </Stack>\n )}\n </RootStack>\n );\n };\n"],"names":[],"mappings":";;;;;;;;AAkBa,MAAA,UAAU,GACrB,CAAmB,SAA2B,KAC9C,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,UAAU,EAAmB,KAAI;IAClF,MAAM,WAAW,GAAG,KAAK,CAAC,EAAE,EAAE,EAAE,UAAU,KAAA,IAAA,IAAV,UAAU,KAAA,SAAA,GAAA,SAAA,GAAV,UAAU,CAAE,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC;AAEzE,IAAA,IAAI,CAAC,KAAK;QAAE,OAAO,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAC,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAA,GAAO,UAAgB,EAAA,CAAI;IAE1E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KAAK,IAAC,SAAS,EAAC,YAAY,EAAC,MAAM,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAA;YACxD,KAAC,CAAA,aAAA,CAAA,aAAa,IAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAI,CAAA;YAChF,KAAC,CAAA,aAAA,CAAA,KAAK,QAAE,KAAK,CAAS,CAChB,CACT,CACS;AAEhB;;;;"}
|
package/dist/index.cjs
CHANGED
|
@@ -34,12 +34,12 @@ var useScrollPosition = require('./components/DataTable/hooks/useScrollPosition.
|
|
|
34
34
|
var useSelection = require('./components/DataTable/hooks/useSelection.cjs');
|
|
35
35
|
var DescriptionList = require('./components/DescriptionList/DescriptionList.cjs');
|
|
36
36
|
var DetailPage = require('./components/DetailPage/DetailPage.cjs');
|
|
37
|
-
var
|
|
37
|
+
var index$1 = require('./components/DimensionsInput/index.cjs');
|
|
38
38
|
var Dropdown = require('./components/Dropdown/Dropdown.cjs');
|
|
39
39
|
var FilterTag = require('./components/FilterTag/FilterTag.cjs');
|
|
40
|
-
var index$
|
|
40
|
+
var index$2 = require('./components/Grid/index.cjs');
|
|
41
41
|
var Image = require('./components/Image/Image.cjs');
|
|
42
|
-
var index$
|
|
42
|
+
var index$3 = require('./components/InputGroup/index.cjs');
|
|
43
43
|
var LegacyDataTable = require('./components/LegacyDataTable/LegacyDataTable.cjs');
|
|
44
44
|
var Loader = require('./components/Loader/Loader.cjs');
|
|
45
45
|
var LoginWithAmazonButton = require('./components/LoginWithAmazonButton/LoginWithAmazonButton.cjs');
|
|
@@ -61,7 +61,7 @@ var Stack = require('./components/Stack/Stack.cjs');
|
|
|
61
61
|
var Stepper = require('./components/Stepper/Stepper.cjs');
|
|
62
62
|
var Tag = require('./components/Tag/Tag.cjs');
|
|
63
63
|
var Text = require('./components/Text/Text.cjs');
|
|
64
|
-
var index$
|
|
64
|
+
var index$4 = require('./components/TextField/index.cjs');
|
|
65
65
|
var ToastsLayout = require('./components/ToastsLayout/ToastsLayout.cjs');
|
|
66
66
|
var Toggle = require('./components/Toggle/Toggle.cjs');
|
|
67
67
|
var ToggleButton = require('./components/ToggleButton/ToggleButton.cjs');
|
|
@@ -73,7 +73,7 @@ var Popup = require('./components/VideoModal/components/Popup.cjs');
|
|
|
73
73
|
var View = require('./components/View/View.cjs');
|
|
74
74
|
var ViewTab = require('./components/ViewTab/ViewTab.cjs');
|
|
75
75
|
var ViewsContainer = require('./components/ViewsContainer/ViewsContainer.cjs');
|
|
76
|
-
var
|
|
76
|
+
var index$5 = require('./components/WeightInput/index.cjs');
|
|
77
77
|
var Indicator = require('./components/Indicator/Indicator.cjs');
|
|
78
78
|
var useClickOutside = require('./hooks/useClickOutside.cjs');
|
|
79
79
|
var useDebounce = require('./hooks/useDebounce.cjs');
|
|
@@ -89,7 +89,7 @@ var buildClassnames = require('./utils/buildClassnames.cjs');
|
|
|
89
89
|
var color = require('./utils/color.cjs');
|
|
90
90
|
var generateId = require('./utils/generateId.cjs');
|
|
91
91
|
var isExternalLink = require('./utils/isExternalLink.cjs');
|
|
92
|
-
var index$
|
|
92
|
+
var index$6 = require('./theme/index.cjs');
|
|
93
93
|
var utils = require('./theme/utils.cjs');
|
|
94
94
|
|
|
95
95
|
|
|
@@ -135,12 +135,12 @@ exports.useScrollPosition = useScrollPosition.useScrollPosition;
|
|
|
135
135
|
exports.useSelection = useSelection.useSelection;
|
|
136
136
|
exports.DescriptionList = DescriptionList.DescriptionList;
|
|
137
137
|
exports.DetailPage = DetailPage.DetailPage;
|
|
138
|
-
exports.DimensionsInput =
|
|
138
|
+
exports.DimensionsInput = index$1.DimensionsInput;
|
|
139
139
|
exports.Dropdown = Dropdown.Dropdown;
|
|
140
140
|
exports.FilterTag = FilterTag.FilterTag;
|
|
141
|
-
exports.Grid = index$
|
|
141
|
+
exports.Grid = index$2.Grid;
|
|
142
142
|
exports.Image = Image.Image;
|
|
143
|
-
exports.InputGroup = index$
|
|
143
|
+
exports.InputGroup = index$3.InputGroup;
|
|
144
144
|
exports.LegacyDataTable = LegacyDataTable.LegacyDataTable;
|
|
145
145
|
exports.Loader = Loader.Loader;
|
|
146
146
|
exports.LoginWithAmazonButton = LoginWithAmazonButton.LoginWithAmazonButton;
|
|
@@ -162,7 +162,7 @@ exports.Stack = Stack.Stack;
|
|
|
162
162
|
exports.Stepper = Stepper.Stepper;
|
|
163
163
|
exports.Tag = Tag.Tag;
|
|
164
164
|
exports.Text = Text.Text;
|
|
165
|
-
exports.TextField = index$
|
|
165
|
+
exports.TextField = index$4.TextField;
|
|
166
166
|
exports.ToastsLayout = ToastsLayout.ToastsLayout;
|
|
167
167
|
exports.Toggle = Toggle.Toggle;
|
|
168
168
|
exports.ToggleButton = ToggleButton.ToggleButton;
|
|
@@ -181,7 +181,7 @@ exports.Popup = Popup.Popup;
|
|
|
181
181
|
exports.View = View.View;
|
|
182
182
|
exports.ViewTab = ViewTab.ViewTab;
|
|
183
183
|
exports.ViewsContainer = ViewsContainer.ViewsContainer;
|
|
184
|
-
exports.WeightInput =
|
|
184
|
+
exports.WeightInput = index$5.WeightInput;
|
|
185
185
|
exports.Indicator = Indicator.Indicator;
|
|
186
186
|
exports.useClickOutside = useClickOutside.useClickOutside;
|
|
187
187
|
exports.useDebounce = useDebounce.useDebounce;
|
|
@@ -199,6 +199,6 @@ exports.getOpaqueHexColor = color.getOpaqueHexColor;
|
|
|
199
199
|
exports.hexToRgb = color.hexToRgb;
|
|
200
200
|
exports.generateId = generateId.generateId;
|
|
201
201
|
exports.isExternalLink = isExternalLink.isExternalLink;
|
|
202
|
-
exports.theme = index$
|
|
202
|
+
exports.theme = index$6.theme;
|
|
203
203
|
exports.getTextStyles = utils.getTextStyles;
|
|
204
204
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -32,7 +32,7 @@ export { useScrollPosition } from './components/DataTable/hooks/useScrollPositio
|
|
|
32
32
|
export { useSelection } from './components/DataTable/hooks/useSelection.js';
|
|
33
33
|
export { DescriptionList } from './components/DescriptionList/DescriptionList.js';
|
|
34
34
|
export { DetailPage } from './components/DetailPage/DetailPage.js';
|
|
35
|
-
export { DimensionsInput } from './components/DimensionsInput/
|
|
35
|
+
export { DimensionsInput } from './components/DimensionsInput/index.js';
|
|
36
36
|
export { Dropdown } from './components/Dropdown/Dropdown.js';
|
|
37
37
|
export { FilterTag } from './components/FilterTag/FilterTag.js';
|
|
38
38
|
export { Grid } from './components/Grid/index.js';
|
|
@@ -71,7 +71,7 @@ export { Popup } from './components/VideoModal/components/Popup.js';
|
|
|
71
71
|
export { View } from './components/View/View.js';
|
|
72
72
|
export { ViewTab } from './components/ViewTab/ViewTab.js';
|
|
73
73
|
export { ViewsContainer } from './components/ViewsContainer/ViewsContainer.js';
|
|
74
|
-
export { WeightInput } from './components/WeightInput/
|
|
74
|
+
export { WeightInput } from './components/WeightInput/index.js';
|
|
75
75
|
export { Indicator } from './components/Indicator/Indicator.js';
|
|
76
76
|
export { useClickOutside } from './hooks/useClickOutside.js';
|
|
77
77
|
export { useDebounce } from './hooks/useDebounce.js';
|