@veeqo/ui 14.1.1 → 14.3.0-beta-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/styled.cjs +19 -9
- package/dist/components/Accordion/styled.cjs.map +1 -1
- package/dist/components/Accordion/styled.d.ts +9 -23
- package/dist/components/Accordion/styled.js +19 -9
- package/dist/components/Accordion/styled.js.map +1 -1
- package/dist/components/Action/Action.cjs +19 -10
- package/dist/components/Action/Action.cjs.map +1 -1
- package/dist/components/Action/Action.d.ts +66 -19
- package/dist/components/Action/Action.js +19 -11
- package/dist/components/Action/Action.js.map +1 -1
- package/dist/components/Action/styles/button.module.scss.cjs +2 -2
- package/dist/components/Action/styles/button.module.scss.cjs.map +1 -1
- package/dist/components/Action/styles/button.module.scss.js +2 -2
- package/dist/components/Action/styles/button.module.scss.js.map +1 -1
- package/dist/components/Action/styles/link.module.scss.cjs +2 -2
- package/dist/components/Action/styles/link.module.scss.cjs.map +1 -1
- package/dist/components/Action/styles/link.module.scss.js +2 -2
- package/dist/components/Action/styles/link.module.scss.js.map +1 -1
- package/dist/components/Action/types.d.ts +17 -1
- package/dist/components/Action/utils.cjs +4 -2
- package/dist/components/Action/utils.cjs.map +1 -1
- package/dist/components/Action/utils.d.ts +3 -2
- package/dist/components/Action/utils.js +4 -2
- package/dist/components/Action/utils.js.map +1 -1
- package/dist/components/AnimatedDropdown/components/styled.d.ts +2 -1
- package/dist/components/AnimatedDropdown/styled.d.ts +2 -2
- package/dist/components/Badge/styled.cjs +27 -4
- package/dist/components/Badge/styled.cjs.map +1 -1
- package/dist/components/Badge/styled.d.ts +4 -3
- package/dist/components/Badge/styled.js +27 -4
- package/dist/components/Badge/styled.js.map +1 -1
- package/dist/components/Banner/styled.cjs +27 -8
- package/dist/components/Banner/styled.cjs.map +1 -1
- package/dist/components/Banner/styled.d.ts +7 -7
- package/dist/components/Banner/styled.js +27 -8
- package/dist/components/Banner/styled.js.map +1 -1
- package/dist/components/BaseContainer/BaseContainer.cjs +7 -3
- package/dist/components/BaseContainer/BaseContainer.cjs.map +1 -1
- package/dist/components/BaseContainer/BaseContainer.d.ts +2 -1
- package/dist/components/BaseContainer/BaseContainer.js +6 -2
- package/dist/components/BaseContainer/BaseContainer.js.map +1 -1
- package/dist/components/BaseContainer/BaseContainer.module.scss.cjs +9 -0
- package/dist/components/BaseContainer/BaseContainer.module.scss.cjs.map +1 -0
- package/dist/components/BaseContainer/BaseContainer.module.scss.js +7 -0
- package/dist/components/BaseContainer/BaseContainer.module.scss.js.map +1 -0
- package/dist/components/DataTable/components/ColumnHeader.d.ts +1 -1
- package/dist/components/DimensionsInput/DimensionsInput.cjs +8 -8
- package/dist/components/DimensionsInput/DimensionsInput.cjs.map +1 -1
- package/dist/components/DimensionsInput/DimensionsInput.d.ts +8 -8
- package/dist/components/DimensionsInput/DimensionsInput.js +1 -1
- package/dist/components/FilterTag/styled.d.ts +4 -4
- package/dist/components/Grid/index.cjs +7 -1
- package/dist/components/Grid/index.cjs.map +1 -1
- package/dist/components/Grid/index.d.ts +2 -1
- package/dist/components/Grid/index.js +7 -1
- package/dist/components/Grid/index.js.map +1 -1
- package/dist/components/InputAffix/InputAffix.cjs +3 -4
- package/dist/components/InputAffix/InputAffix.cjs.map +1 -1
- package/dist/components/InputAffix/InputAffix.js +1 -2
- package/dist/components/InputAffix/InputAffix.js.map +1 -1
- package/dist/components/InputGroup/InputGroup.cjs +21 -0
- package/dist/components/InputGroup/InputGroup.cjs.map +1 -0
- package/dist/components/InputGroup/InputGroup.d.ts +2 -0
- package/dist/components/InputGroup/InputGroup.js +15 -0
- package/dist/components/InputGroup/InputGroup.js.map +1 -0
- package/dist/components/InputGroup/InputGroup.module.scss.cjs +9 -0
- package/dist/components/InputGroup/InputGroup.module.scss.cjs.map +1 -0
- package/dist/components/InputGroup/InputGroup.module.scss.js +7 -0
- package/dist/components/InputGroup/InputGroup.module.scss.js.map +1 -0
- package/dist/components/InputGroup/index.d.ts +2 -4
- package/dist/components/InputGroup/types.d.ts +3 -0
- package/dist/components/LegacyDataTable/SpecificState/styled.d.ts +4 -4
- package/dist/components/Pagination/styled.d.ts +8 -8
- package/dist/components/PhoneInput/index.d.ts +8 -8
- package/dist/components/PriceInput/PriceInput.cjs +4 -4
- package/dist/components/PriceInput/PriceInput.cjs.map +1 -1
- package/dist/components/PriceInput/PriceInput.js +1 -1
- package/dist/components/Search/Search.d.ts +8 -8
- package/dist/components/Search/styled.cjs +12 -2
- package/dist/components/Search/styled.cjs.map +1 -1
- package/dist/components/Search/styled.d.ts +9 -9
- package/dist/components/Search/styled.js +12 -2
- package/dist/components/Search/styled.js.map +1 -1
- package/dist/components/SegmentedControl/styled.d.ts +2 -1
- package/dist/components/Stack/Stack.cjs +26 -45
- package/dist/components/Stack/Stack.cjs.map +1 -1
- package/dist/components/Stack/Stack.d.ts +9 -2
- package/dist/components/Stack/Stack.js +25 -44
- package/dist/components/Stack/Stack.js.map +1 -1
- package/dist/components/Stack/Stack.module.scss.cjs +9 -0
- package/dist/components/Stack/Stack.module.scss.cjs.map +1 -0
- package/dist/components/Stack/Stack.module.scss.js +7 -0
- package/dist/components/Stack/Stack.module.scss.js.map +1 -0
- package/dist/components/Stack/types.d.ts +6 -6
- package/dist/components/Stepper/styled.cjs +16 -3
- package/dist/components/Stepper/styled.cjs.map +1 -1
- package/dist/components/Stepper/styled.d.ts +9 -1
- package/dist/components/Stepper/styled.js +16 -3
- package/dist/components/Stepper/styled.js.map +1 -1
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/TextField/TextField.d.ts +8 -8
- package/dist/components/TextField/index.d.ts +8 -8
- package/dist/components/ToastsLayout/components/styled.cjs +37 -4
- package/dist/components/ToastsLayout/components/styled.cjs.map +1 -1
- package/dist/components/ToastsLayout/components/styled.d.ts +26 -5
- package/dist/components/ToastsLayout/components/styled.js +37 -4
- package/dist/components/ToastsLayout/components/styled.js.map +1 -1
- package/dist/components/Toggle/styled.d.ts +2 -1
- package/dist/components/VideoModal/components/styled.d.ts +4 -3
- package/dist/components/View/styled.d.ts +4 -4
- package/dist/components/ViewTab/ViewTab.d.ts +1 -1
- package/dist/components/WeightInput/WeightInput.cjs +8 -8
- package/dist/components/WeightInput/WeightInput.cjs.map +1 -1
- package/dist/components/WeightInput/WeightInput.js +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/hoc/withClassNames/withClassNames.d.ts +1 -1
- package/dist/hoc/withLabels/styled.d.ts +9 -1
- package/dist/index.cjs +10 -10
- package/dist/index.js +1 -1
- package/dist/utils/forms/inputStyles.cjs +1 -2
- package/dist/utils/forms/inputStyles.cjs.map +1 -1
- package/dist/utils/forms/inputStyles.js +1 -2
- package/dist/utils/forms/inputStyles.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/InputGroup/index.cjs +0 -13
- package/dist/components/InputGroup/index.cjs.map +0 -1
- package/dist/components/InputGroup/index.js +0 -7
- package/dist/components/InputGroup/index.js.map +0 -1
- package/dist/components/Stack/Alignments.cjs +0 -12
- package/dist/components/Stack/Alignments.cjs.map +0 -1
- package/dist/components/Stack/Alignments.js +0 -12
- package/dist/components/Stack/Alignments.js.map +0 -1
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Loader } from '../Loader';
|
|
3
3
|
declare const Input: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Omit<{
|
|
4
|
-
form?: string | undefined;
|
|
5
|
-
slot?: string | undefined;
|
|
6
|
-
style?: import("react").CSSProperties | undefined;
|
|
7
|
-
title?: string | undefined;
|
|
8
|
-
pattern?: string | undefined;
|
|
9
4
|
rel?: string | undefined;
|
|
10
|
-
placeholder?: string | undefined;
|
|
11
|
-
list?: string | undefined;
|
|
12
5
|
className?: string | undefined;
|
|
13
6
|
children?: import("react").ReactNode;
|
|
14
7
|
defaultChecked?: boolean | undefined;
|
|
@@ -25,8 +18,12 @@ declare const Input: import("styled-components").StyledComponent<import("react")
|
|
|
25
18
|
id?: string | undefined;
|
|
26
19
|
lang?: string | undefined;
|
|
27
20
|
nonce?: string | undefined;
|
|
21
|
+
placeholder?: string | undefined;
|
|
22
|
+
slot?: string | undefined;
|
|
28
23
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
24
|
+
style?: import("react").CSSProperties | undefined;
|
|
29
25
|
tabIndex?: number | undefined;
|
|
26
|
+
title?: string | undefined;
|
|
30
27
|
translate?: "yes" | "no" | undefined;
|
|
31
28
|
radioGroup?: string | undefined;
|
|
32
29
|
role?: import("react").AriaRole | undefined;
|
|
@@ -52,7 +49,7 @@ declare const Input: import("styled-components").StyledComponent<import("react")
|
|
|
52
49
|
results?: number | undefined;
|
|
53
50
|
security?: string | undefined;
|
|
54
51
|
unselectable?: "on" | "off" | undefined;
|
|
55
|
-
inputMode?: "
|
|
52
|
+
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
56
53
|
is?: string | undefined;
|
|
57
54
|
'aria-activedescendant'?: string | undefined;
|
|
58
55
|
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
@@ -264,6 +261,9 @@ declare const Input: import("styled-components").StyledComponent<import("react")
|
|
|
264
261
|
onAnimationIterationCapture?: (import("react").AnimationEventHandler<HTMLInputElement> & import("react").AnimationEventHandler<HTMLTextAreaElement>) | undefined;
|
|
265
262
|
onTransitionEnd?: (import("react").TransitionEventHandler<HTMLInputElement> & import("react").TransitionEventHandler<HTMLTextAreaElement>) | undefined;
|
|
266
263
|
onTransitionEndCapture?: (import("react").TransitionEventHandler<HTMLInputElement> & import("react").TransitionEventHandler<HTMLTextAreaElement>) | undefined;
|
|
264
|
+
form?: string | undefined;
|
|
265
|
+
pattern?: string | undefined;
|
|
266
|
+
list?: string | undefined;
|
|
267
267
|
alt?: string | undefined;
|
|
268
268
|
disabled?: boolean | undefined;
|
|
269
269
|
formAction?: string | undefined;
|
|
@@ -301,7 +301,7 @@ declare const Input: import("styled-components").StyledComponent<import("react")
|
|
|
301
301
|
multiline?: boolean | undefined;
|
|
302
302
|
} & import("react").RefAttributes<HTMLInputElement> & import("../../hoc/withLabels/withLabels").WithLabelsProps, "ref"> & import("react").RefAttributes<unknown>>, any, {}, never>;
|
|
303
303
|
declare const IconContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
304
|
-
declare const Container: import("styled-components").StyledComponent<"
|
|
304
|
+
declare const Container: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>, any, {
|
|
305
305
|
iconPosition: 'left' | 'right';
|
|
306
306
|
}, never>;
|
|
307
307
|
export { Container, Input, IconContainer, Loader };
|
|
@@ -5,7 +5,16 @@ import 'react';
|
|
|
5
5
|
|
|
6
6
|
const Input = styled(TextField).withConfig({ displayName: "vui--Input", componentId: "vui--je6y84" }) `flex-grow:2;margin-top:0;margin-bottom:0;`;
|
|
7
7
|
const IconContainer = styled.div.withConfig({ displayName: "vui--IconContainer", componentId: "vui--113gfe8" }) `position:absolute;`;
|
|
8
|
-
const Container = styled(BaseContainer).withConfig({
|
|
8
|
+
const Container = styled(BaseContainer).withConfig({
|
|
9
|
+
shouldForwardProp: (prop) => !['iconPosition'].includes(prop),
|
|
10
|
+
}) `
|
|
11
|
+
position: relative;
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: flex-start;
|
|
14
|
+
align-items: center;
|
|
15
|
+
border-radius: 0.25rem;
|
|
16
|
+
|
|
17
|
+
${({ iconPosition }) => {
|
|
9
18
|
let padding = 'padding-right: 2.5rem;';
|
|
10
19
|
let position = 'right: 0.5rem;';
|
|
11
20
|
if (iconPosition === 'left') {
|
|
@@ -21,7 +30,8 @@ const Container = styled(BaseContainer).withConfig({ displayName: "vui--Containe
|
|
|
21
30
|
${position}
|
|
22
31
|
}
|
|
23
32
|
`;
|
|
24
|
-
}}
|
|
33
|
+
}}
|
|
34
|
+
`;
|
|
25
35
|
|
|
26
36
|
export { Container, IconContainer, Input };
|
|
27
37
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../src/components/Search/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { TextField } from '../TextField';\nimport { BaseContainer } from '../BaseContainer';\nimport { Loader } from '../Loader';\n\nconst Input = styled(TextField)`\n flex-grow: 2;\n margin-top: 0;\n margin-bottom: 0;\n`;\n\nconst IconContainer = styled.div`\n position: absolute;\n`;\n\nconst Container = styled(BaseContainer)<{ iconPosition: 'left' | 'right' }>`\n position: relative;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n border-radius: 0.25rem;\n\n ${({ iconPosition }) => {\n let padding = 'padding-right: 2.5rem;';\n let position = 'right: 0.5rem;';\n\n if (iconPosition === 'left') {\n padding = 'padding-left: 2.5rem';\n position = 'left: 0.5rem;';\n }\n\n return `\n & ${Input} {\n ${padding}\n }\n\n & ${IconContainer} {\n ${position}\n }\n `;\n }}\n`;\n\nexport { Container, Input, IconContainer, Loader };\n"],"names":[],"mappings":";;;;;AAMA,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC;AAM/B,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG;AAIhC,MAAM,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../src/components/Search/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { TextField } from '../TextField';\nimport { BaseContainer } from '../BaseContainer';\nimport { Loader } from '../Loader';\n\nconst Input = styled(TextField)`\n flex-grow: 2;\n margin-top: 0;\n margin-bottom: 0;\n`;\n\nconst IconContainer = styled.div`\n position: absolute;\n`;\n\nconst Container = styled(BaseContainer).withConfig({\n shouldForwardProp: (prop) => !['iconPosition'].includes(prop),\n})<{ iconPosition: 'left' | 'right' }>`\n position: relative;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n border-radius: 0.25rem;\n\n ${({ iconPosition }) => {\n let padding = 'padding-right: 2.5rem;';\n let position = 'right: 0.5rem;';\n\n if (iconPosition === 'left') {\n padding = 'padding-left: 2.5rem';\n position = 'left: 0.5rem;';\n }\n\n return `\n & ${Input} {\n ${padding}\n }\n\n & ${IconContainer} {\n ${position}\n }\n `;\n }}\n`;\n\nexport { Container, Input, IconContainer, Loader };\n"],"names":[],"mappings":";;;;;AAMA,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC;AAM/B,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG;AAIhC,MAAM,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC;AACjD,IAAA,iBAAiB,EAAE,CAAC,IAAI,KAAK,CAAC,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;AAC9D,CAAA,CAAC,CAAoC;;;;;;;AAOlC,EAAA,EAAA,CAAC,EAAE,YAAY,EAAE,KAAI;IACrB,IAAI,OAAO,GAAG,wBAAwB;IACtC,IAAI,QAAQ,GAAG,gBAAgB;IAE/B,IAAI,YAAY,KAAK,MAAM,EAAE;QAC3B,OAAO,GAAG,sBAAsB;QAChC,QAAQ,GAAG,eAAe;AAC3B,IAAA;IAED,OAAO;UACD,KAAK,CAAA;UACL,OAAO;;;UAGP,aAAa,CAAA;UACb,QAAQ;;KAEb;AACH,CAAC;;;;;"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const SegmentedControlContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>, any, {}, never>;
|
|
@@ -1,59 +1,40 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var Alignments = require('./Alignments.cjs');
|
|
3
|
+
var React = require('react');
|
|
5
4
|
var index = require('../../theme/index.cjs');
|
|
5
|
+
var buildClassnames = require('../../utils/buildClassnames.cjs');
|
|
6
|
+
require('uid/secure');
|
|
7
|
+
var Stack_module = require('./Stack.module.scss.cjs');
|
|
6
8
|
|
|
7
9
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
10
|
|
|
9
|
-
var
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
12
|
|
|
11
13
|
/**
|
|
12
14
|
* @deprecated Replaced by {@link FlexCol} and {@link FlexRow}.
|
|
13
15
|
* Layout component.
|
|
14
16
|
*/
|
|
15
|
-
const Stack =
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// so instead we set the flex of child elements
|
|
37
|
-
if ((direction === 'vertical' && alignY === 'stretch') ||
|
|
38
|
-
(direction === 'horizontal' && alignX === 'stretch')) {
|
|
39
|
-
itemFlex = 1;
|
|
40
|
-
}
|
|
41
|
-
return `
|
|
42
|
-
align-items: ${alignItems};
|
|
43
|
-
justify-content: ${justifyContent};
|
|
44
|
-
flex-direction: ${flexDirection};
|
|
45
|
-
|
|
46
|
-
& > * {
|
|
47
|
-
flex: ${itemFlex};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/* applies the margin-top/left to all components inside a stack except the first component */
|
|
51
|
-
&& > * + * {
|
|
52
|
-
margin-top: ${marginTop};
|
|
53
|
-
margin-left: ${marginLeft};
|
|
54
|
-
}
|
|
55
|
-
`;
|
|
56
|
-
}}`;
|
|
17
|
+
const Stack = React__default.default.forwardRef(({ direction = 'vertical', alignX = 'start', alignY = 'start', spacing = 'base', as: Element = 'div', className, children, style, ...rest }, ref) => {
|
|
18
|
+
const isVertical = direction === 'vertical';
|
|
19
|
+
const alignItemsKey = isVertical ? alignX : alignY;
|
|
20
|
+
const justifyContentKey = isVertical ? alignY : alignX;
|
|
21
|
+
const isStretch = isVertical ? alignY === 'stretch' : alignX === 'stretch';
|
|
22
|
+
const spacingValue = index.theme.sizes[spacing];
|
|
23
|
+
const spacingStyle = isVertical
|
|
24
|
+
? { rowGap: spacingValue }
|
|
25
|
+
: { columnGap: spacingValue };
|
|
26
|
+
return (React__default.default.createElement(Element, { className: buildClassnames.buildClassnames([
|
|
27
|
+
Stack_module.base,
|
|
28
|
+
Stack_module[`${direction}-direction`],
|
|
29
|
+
Stack_module[`alignItems-${alignItemsKey}`],
|
|
30
|
+
Stack_module[`justifyContent-${justifyContentKey}`],
|
|
31
|
+
isStretch ? Stack_module['stretch-children'] : undefined,
|
|
32
|
+
className,
|
|
33
|
+
]), style: {
|
|
34
|
+
...spacingStyle,
|
|
35
|
+
...style,
|
|
36
|
+
}, ref: ref, ...rest }, children));
|
|
37
|
+
});
|
|
57
38
|
Stack.displayName = 'Stack';
|
|
58
39
|
|
|
59
40
|
exports.Stack = Stack;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.cjs","sources":["../../../src/components/Stack/Stack.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Stack.cjs","sources":["../../../src/components/Stack/Stack.tsx"],"sourcesContent":["import React from 'react';\n\nimport { StackProps } from './types';\n\nimport { theme } from '../../theme';\nimport { buildClassnames } from '../../utils';\nimport styles from './Stack.module.scss';\n\n/**\n * @deprecated Replaced by {@link FlexCol} and {@link FlexRow}.\n * Layout component.\n */\nexport const Stack = React.forwardRef<HTMLElement, StackProps>(\n (\n {\n direction = 'vertical',\n alignX = 'start',\n alignY = 'start',\n spacing = 'base',\n as: Element = 'div',\n className,\n children,\n style,\n ...rest\n },\n ref,\n ) => {\n const isVertical = direction === 'vertical';\n\n const alignItemsKey = isVertical ? alignX : alignY;\n const justifyContentKey = isVertical ? alignY : alignX;\n\n const isStretch = isVertical ? alignY === 'stretch' : alignX === 'stretch';\n\n const spacingValue = theme.sizes[spacing];\n\n const spacingStyle = isVertical\n ? { rowGap: spacingValue }\n : { columnGap: spacingValue };\n\n return (\n <Element\n className={buildClassnames([\n styles.base,\n styles[`${direction}-direction`],\n styles[`alignItems-${alignItemsKey}`],\n styles[`justifyContent-${justifyContentKey}`],\n isStretch ? styles['stretch-children'] : undefined,\n className,\n ])}\n style={{\n ...spacingStyle,\n ...style,\n }}\n ref={ref}\n {...rest}\n >\n {children}\n </Element>\n );\n },\n);\n\nStack.displayName = 'Stack';\n"],"names":["React","theme","buildClassnames","styles"],"mappings":";;;;;;;;;;;;AAQA;;;AAGG;MACU,KAAK,GAAGA,sBAAK,CAAC,UAAU,CACnC,CACE,EACE,SAAS,GAAG,UAAU,EACtB,MAAM,GAAG,OAAO,EAChB,MAAM,GAAG,OAAO,EAChB,OAAO,GAAG,MAAM,EAChB,EAAE,EAAE,OAAO,GAAG,KAAK,EACnB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAG,IAAI,EACR,EACD,GAAG,KACD;AACF,IAAA,MAAM,UAAU,GAAG,SAAS,KAAK,UAAU;IAE3C,MAAM,aAAa,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM;IAClD,MAAM,iBAAiB,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM;AAEtD,IAAA,MAAM,SAAS,GAAG,UAAU,GAAG,MAAM,KAAK,SAAS,GAAG,MAAM,KAAK,SAAS;IAE1E,MAAM,YAAY,GAAGC,WAAK,CAAC,KAAK,CAAC,OAAO,CAAC;IAEzC,MAAM,YAAY,GAAG;AACnB,UAAE,EAAE,MAAM,EAAE,YAAY;AACxB,UAAE,EAAE,SAAS,EAAE,YAAY,EAAE;AAE/B,IAAA,QACED,sBAAA,CAAA,aAAA,CAAC,OAAO,IACN,SAAS,EAAEE,+BAAe,CAAC;AACzB,YAAAC,YAAM,CAAC,IAAI;AACX,YAAAA,YAAM,CAAC,CAAA,EAAG,SAAS,CAAA,UAAA,CAAY,CAAC;AAChC,YAAAA,YAAM,CAAC,CAAA,WAAA,EAAc,aAAa,CAAA,CAAE,CAAC;AACrC,YAAAA,YAAM,CAAC,CAAA,eAAA,EAAkB,iBAAiB,CAAA,CAAE,CAAC;YAC7C,SAAS,GAAGA,YAAM,CAAC,kBAAkB,CAAC,GAAG,SAAS;YAClD,SAAS;SACV,CAAC,EACF,KAAK,EAAE;AACL,YAAA,GAAG,YAAY;AACf,YAAA,GAAG,KAAK;SACT,EACD,GAAG,EAAE,GAAG,EAAA,GACJ,IAAI,EAAA,EAEP,QAAQ,CACD;AAEd,CAAC;AAGH,KAAK,CAAC,WAAW,GAAG,OAAO;;;;"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* @deprecated Replaced by {@link FlexCol} and {@link FlexRow}.
|
|
4
4
|
* Layout component.
|
|
5
5
|
*/
|
|
6
|
-
export declare const Stack:
|
|
6
|
+
export declare const Stack: React.ForwardRefExoticComponent<{
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
direction?: "horizontal" | "vertical" | undefined;
|
|
9
|
+
alignX?: "start" | "end" | "center" | "stretch" | "between" | "around" | undefined;
|
|
10
|
+
alignY?: "start" | "end" | "center" | "stretch" | "between" | "around" | undefined;
|
|
11
|
+
spacing?: keyof import("./types").SizeScale | undefined;
|
|
12
|
+
as?: React.ElementType<any> | undefined;
|
|
13
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,53 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Alignments } from './Alignments.js';
|
|
1
|
+
import React__default from 'react';
|
|
3
2
|
import { theme } from '../../theme/index.js';
|
|
3
|
+
import { buildClassnames } from '../../utils/buildClassnames.js';
|
|
4
|
+
import 'uid/secure';
|
|
5
|
+
import styles from './Stack.module.scss.js';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* @deprecated Replaced by {@link FlexCol} and {@link FlexRow}.
|
|
7
9
|
* Layout component.
|
|
8
10
|
*/
|
|
9
|
-
const Stack =
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// so instead we set the flex of child elements
|
|
31
|
-
if ((direction === 'vertical' && alignY === 'stretch') ||
|
|
32
|
-
(direction === 'horizontal' && alignX === 'stretch')) {
|
|
33
|
-
itemFlex = 1;
|
|
34
|
-
}
|
|
35
|
-
return `
|
|
36
|
-
align-items: ${alignItems};
|
|
37
|
-
justify-content: ${justifyContent};
|
|
38
|
-
flex-direction: ${flexDirection};
|
|
39
|
-
|
|
40
|
-
& > * {
|
|
41
|
-
flex: ${itemFlex};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/* applies the margin-top/left to all components inside a stack except the first component */
|
|
45
|
-
&& > * + * {
|
|
46
|
-
margin-top: ${marginTop};
|
|
47
|
-
margin-left: ${marginLeft};
|
|
48
|
-
}
|
|
49
|
-
`;
|
|
50
|
-
}}`;
|
|
11
|
+
const Stack = React__default.forwardRef(({ direction = 'vertical', alignX = 'start', alignY = 'start', spacing = 'base', as: Element = 'div', className, children, style, ...rest }, ref) => {
|
|
12
|
+
const isVertical = direction === 'vertical';
|
|
13
|
+
const alignItemsKey = isVertical ? alignX : alignY;
|
|
14
|
+
const justifyContentKey = isVertical ? alignY : alignX;
|
|
15
|
+
const isStretch = isVertical ? alignY === 'stretch' : alignX === 'stretch';
|
|
16
|
+
const spacingValue = theme.sizes[spacing];
|
|
17
|
+
const spacingStyle = isVertical
|
|
18
|
+
? { rowGap: spacingValue }
|
|
19
|
+
: { columnGap: spacingValue };
|
|
20
|
+
return (React__default.createElement(Element, { className: buildClassnames([
|
|
21
|
+
styles.base,
|
|
22
|
+
styles[`${direction}-direction`],
|
|
23
|
+
styles[`alignItems-${alignItemsKey}`],
|
|
24
|
+
styles[`justifyContent-${justifyContentKey}`],
|
|
25
|
+
isStretch ? styles['stretch-children'] : undefined,
|
|
26
|
+
className,
|
|
27
|
+
]), style: {
|
|
28
|
+
...spacingStyle,
|
|
29
|
+
...style,
|
|
30
|
+
}, ref: ref, ...rest }, children));
|
|
31
|
+
});
|
|
51
32
|
Stack.displayName = 'Stack';
|
|
52
33
|
|
|
53
34
|
export { Stack };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stack.js","sources":["../../../src/components/Stack/Stack.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Stack.js","sources":["../../../src/components/Stack/Stack.tsx"],"sourcesContent":["import React from 'react';\n\nimport { StackProps } from './types';\n\nimport { theme } from '../../theme';\nimport { buildClassnames } from '../../utils';\nimport styles from './Stack.module.scss';\n\n/**\n * @deprecated Replaced by {@link FlexCol} and {@link FlexRow}.\n * Layout component.\n */\nexport const Stack = React.forwardRef<HTMLElement, StackProps>(\n (\n {\n direction = 'vertical',\n alignX = 'start',\n alignY = 'start',\n spacing = 'base',\n as: Element = 'div',\n className,\n children,\n style,\n ...rest\n },\n ref,\n ) => {\n const isVertical = direction === 'vertical';\n\n const alignItemsKey = isVertical ? alignX : alignY;\n const justifyContentKey = isVertical ? alignY : alignX;\n\n const isStretch = isVertical ? alignY === 'stretch' : alignX === 'stretch';\n\n const spacingValue = theme.sizes[spacing];\n\n const spacingStyle = isVertical\n ? { rowGap: spacingValue }\n : { columnGap: spacingValue };\n\n return (\n <Element\n className={buildClassnames([\n styles.base,\n styles[`${direction}-direction`],\n styles[`alignItems-${alignItemsKey}`],\n styles[`justifyContent-${justifyContentKey}`],\n isStretch ? styles['stretch-children'] : undefined,\n className,\n ])}\n style={{\n ...spacingStyle,\n ...style,\n }}\n ref={ref}\n {...rest}\n >\n {children}\n </Element>\n );\n },\n);\n\nStack.displayName = 'Stack';\n"],"names":["React"],"mappings":";;;;;;AAQA;;;AAGG;MACU,KAAK,GAAGA,cAAK,CAAC,UAAU,CACnC,CACE,EACE,SAAS,GAAG,UAAU,EACtB,MAAM,GAAG,OAAO,EAChB,MAAM,GAAG,OAAO,EAChB,OAAO,GAAG,MAAM,EAChB,EAAE,EAAE,OAAO,GAAG,KAAK,EACnB,SAAS,EACT,QAAQ,EACR,KAAK,EACL,GAAG,IAAI,EACR,EACD,GAAG,KACD;AACF,IAAA,MAAM,UAAU,GAAG,SAAS,KAAK,UAAU;IAE3C,MAAM,aAAa,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM;IAClD,MAAM,iBAAiB,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM;AAEtD,IAAA,MAAM,SAAS,GAAG,UAAU,GAAG,MAAM,KAAK,SAAS,GAAG,MAAM,KAAK,SAAS;IAE1E,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;IAEzC,MAAM,YAAY,GAAG;AACnB,UAAE,EAAE,MAAM,EAAE,YAAY;AACxB,UAAE,EAAE,SAAS,EAAE,YAAY,EAAE;AAE/B,IAAA,QACEA,cAAA,CAAA,aAAA,CAAC,OAAO,IACN,SAAS,EAAE,eAAe,CAAC;AACzB,YAAA,MAAM,CAAC,IAAI;AACX,YAAA,MAAM,CAAC,CAAA,EAAG,SAAS,CAAA,UAAA,CAAY,CAAC;AAChC,YAAA,MAAM,CAAC,CAAA,WAAA,EAAc,aAAa,CAAA,CAAE,CAAC;AACrC,YAAA,MAAM,CAAC,CAAA,eAAA,EAAkB,iBAAiB,CAAA,CAAE,CAAC;YAC7C,SAAS,GAAG,MAAM,CAAC,kBAAkB,CAAC,GAAG,SAAS;YAClD,SAAS;SACV,CAAC,EACF,KAAK,EAAE;AACL,YAAA,GAAG,YAAY;AACf,YAAA,GAAG,KAAK;SACT,EACD,GAAG,EAAE,GAAG,EAAA,GACJ,IAAI,EAAA,EAEP,QAAQ,CACD;AAEd,CAAC;AAGH,KAAK,CAAC,WAAW,GAAG,OAAO;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ___$insertStyle = require('../../_virtual/____insertStyle.cjs');
|
|
4
|
+
|
|
5
|
+
___$insertStyle("._base_1i7yi_1 {\n display: flex;\n}\n\n/* Direction classes */\n._vertical-direction_1i7yi_6 {\n flex-direction: column;\n}\n\n._horizontal-direction_1i7yi_10 {\n flex-direction: row;\n}\n\n/* Alignment classes from SCSS maps */\n._alignItems-start_1i7yi_15 {\n align-items: flex-start;\n}\n\n._alignItems-center_1i7yi_19 {\n align-items: center;\n}\n\n._alignItems-end_1i7yi_23 {\n align-items: flex-end;\n}\n\n._alignItems-stretch_1i7yi_27 {\n align-items: stretch;\n}\n\n._alignItems-between_1i7yi_31 {\n align-items: space-between;\n}\n\n._alignItems-around_1i7yi_35 {\n align-items: space-around;\n}\n\n._justifyContent-start_1i7yi_39 {\n justify-content: flex-start;\n}\n\n._justifyContent-center_1i7yi_43 {\n justify-content: center;\n}\n\n._justifyContent-end_1i7yi_47 {\n justify-content: flex-end;\n}\n\n._justifyContent-stretch_1i7yi_51 {\n justify-content: stretch;\n}\n\n._justifyContent-between_1i7yi_55 {\n justify-content: space-between;\n}\n\n._justifyContent-around_1i7yi_59 {\n justify-content: space-around;\n}\n\n/* Spacing is applied via row-gap / column-gap as an inline style on the\n container (see Stack.tsx). gap is resolved on the parent element, so nested\n Stacks cannot shadow each other's spacing values.\n Direct children have their directional margins reset so that gap is the sole\n spacing source, matching the old styled-components behavior where the\n && > * + * { margin } rule implicitly overrode child margins. */\n._base_1i7yi_1._vertical-direction_1i7yi_6 > * {\n margin-top: 0;\n margin-bottom: 0;\n}\n\n._base_1i7yi_1._horizontal-direction_1i7yi_10 > * {\n margin-left: 0;\n margin-right: 0;\n}\n\n/* Stretch modifier: child items get flex: 1 */\n._stretch-children_1i7yi_80 > * {\n flex: 1;\n}");
|
|
6
|
+
var styles = {"base":"_base_1i7yi_1","vertical-direction":"_vertical-direction_1i7yi_6","horizontal-direction":"_horizontal-direction_1i7yi_10","alignItems-start":"_alignItems-start_1i7yi_15","alignItems-center":"_alignItems-center_1i7yi_19","alignItems-end":"_alignItems-end_1i7yi_23","alignItems-stretch":"_alignItems-stretch_1i7yi_27","alignItems-between":"_alignItems-between_1i7yi_31","alignItems-around":"_alignItems-around_1i7yi_35","justifyContent-start":"_justifyContent-start_1i7yi_39","justifyContent-center":"_justifyContent-center_1i7yi_43","justifyContent-end":"_justifyContent-end_1i7yi_47","justifyContent-stretch":"_justifyContent-stretch_1i7yi_51","justifyContent-between":"_justifyContent-between_1i7yi_55","justifyContent-around":"_justifyContent-around_1i7yi_59","stretch-children":"_stretch-children_1i7yi_80"};
|
|
7
|
+
|
|
8
|
+
module.exports = styles;
|
|
9
|
+
//# sourceMappingURL=Stack.module.scss.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.module.scss.cjs","sources":["../../../src/components/Stack/Stack.module.scss"],"sourcesContent":["@use './variables.scss' as vars;\n\n.base {\n display: flex;\n}\n\n/* Direction classes */\n.vertical-direction {\n flex-direction: column;\n}\n\n.horizontal-direction {\n flex-direction: row;\n}\n\n/* Alignment classes from SCSS maps */\n@each $name, $value in vars.$align-items {\n .alignItems-#{$name} {\n align-items: $value;\n }\n}\n\n@each $name, $value in vars.$justify-content {\n .justifyContent-#{$name} {\n justify-content: $value;\n }\n}\n\n/* Spacing is applied via row-gap / column-gap as an inline style on the\n container (see Stack.tsx). gap is resolved on the parent element, so nested\n Stacks cannot shadow each other's spacing values.\n Direct children have their directional margins reset so that gap is the sole\n spacing source, matching the old styled-components behavior where the\n && > * + * { margin } rule implicitly overrode child margins. */\n.base.vertical-direction > * {\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.base.horizontal-direction > * {\n margin-left: 0;\n margin-right: 0;\n}\n\n/* Stretch modifier: child items get flex: 1 */\n.stretch-children > * {\n flex: 1;\n}\n"],"names":[],"mappings":";;;;AAGE,eAAA,CAAA,4uDAAA;;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import insertStyle from '../../_virtual/____insertStyle.js';
|
|
2
|
+
|
|
3
|
+
insertStyle("._base_1i7yi_1 {\n display: flex;\n}\n\n/* Direction classes */\n._vertical-direction_1i7yi_6 {\n flex-direction: column;\n}\n\n._horizontal-direction_1i7yi_10 {\n flex-direction: row;\n}\n\n/* Alignment classes from SCSS maps */\n._alignItems-start_1i7yi_15 {\n align-items: flex-start;\n}\n\n._alignItems-center_1i7yi_19 {\n align-items: center;\n}\n\n._alignItems-end_1i7yi_23 {\n align-items: flex-end;\n}\n\n._alignItems-stretch_1i7yi_27 {\n align-items: stretch;\n}\n\n._alignItems-between_1i7yi_31 {\n align-items: space-between;\n}\n\n._alignItems-around_1i7yi_35 {\n align-items: space-around;\n}\n\n._justifyContent-start_1i7yi_39 {\n justify-content: flex-start;\n}\n\n._justifyContent-center_1i7yi_43 {\n justify-content: center;\n}\n\n._justifyContent-end_1i7yi_47 {\n justify-content: flex-end;\n}\n\n._justifyContent-stretch_1i7yi_51 {\n justify-content: stretch;\n}\n\n._justifyContent-between_1i7yi_55 {\n justify-content: space-between;\n}\n\n._justifyContent-around_1i7yi_59 {\n justify-content: space-around;\n}\n\n/* Spacing is applied via row-gap / column-gap as an inline style on the\n container (see Stack.tsx). gap is resolved on the parent element, so nested\n Stacks cannot shadow each other's spacing values.\n Direct children have their directional margins reset so that gap is the sole\n spacing source, matching the old styled-components behavior where the\n && > * + * { margin } rule implicitly overrode child margins. */\n._base_1i7yi_1._vertical-direction_1i7yi_6 > * {\n margin-top: 0;\n margin-bottom: 0;\n}\n\n._base_1i7yi_1._horizontal-direction_1i7yi_10 > * {\n margin-left: 0;\n margin-right: 0;\n}\n\n/* Stretch modifier: child items get flex: 1 */\n._stretch-children_1i7yi_80 > * {\n flex: 1;\n}");
|
|
4
|
+
var styles = {"base":"_base_1i7yi_1","vertical-direction":"_vertical-direction_1i7yi_6","horizontal-direction":"_horizontal-direction_1i7yi_10","alignItems-start":"_alignItems-start_1i7yi_15","alignItems-center":"_alignItems-center_1i7yi_19","alignItems-end":"_alignItems-end_1i7yi_23","alignItems-stretch":"_alignItems-stretch_1i7yi_27","alignItems-between":"_alignItems-between_1i7yi_31","alignItems-around":"_alignItems-around_1i7yi_35","justifyContent-start":"_justifyContent-start_1i7yi_39","justifyContent-center":"_justifyContent-center_1i7yi_43","justifyContent-end":"_justifyContent-end_1i7yi_47","justifyContent-stretch":"_justifyContent-stretch_1i7yi_51","justifyContent-between":"_justifyContent-between_1i7yi_55","justifyContent-around":"_justifyContent-around_1i7yi_59","stretch-children":"_stretch-children_1i7yi_80"};
|
|
5
|
+
|
|
6
|
+
export { styles as default };
|
|
7
|
+
//# sourceMappingURL=Stack.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stack.module.scss.js","sources":["../../../src/components/Stack/Stack.module.scss"],"sourcesContent":["@use './variables.scss' as vars;\n\n.base {\n display: flex;\n}\n\n/* Direction classes */\n.vertical-direction {\n flex-direction: column;\n}\n\n.horizontal-direction {\n flex-direction: row;\n}\n\n/* Alignment classes from SCSS maps */\n@each $name, $value in vars.$align-items {\n .alignItems-#{$name} {\n align-items: $value;\n }\n}\n\n@each $name, $value in vars.$justify-content {\n .justifyContent-#{$name} {\n justify-content: $value;\n }\n}\n\n/* Spacing is applied via row-gap / column-gap as an inline style on the\n container (see Stack.tsx). gap is resolved on the parent element, so nested\n Stacks cannot shadow each other's spacing values.\n Direct children have their directional margins reset so that gap is the sole\n spacing source, matching the old styled-components behavior where the\n && > * + * { margin } rule implicitly overrode child margins. */\n.base.vertical-direction > * {\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.base.horizontal-direction > * {\n margin-left: 0;\n margin-right: 0;\n}\n\n/* Stretch modifier: child items get flex: 1 */\n.stretch-children > * {\n flex: 1;\n}\n"],"names":["___$insertStyle"],"mappings":";;AAGEA,WAAA,CAAA,4uDAAA;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { Alignments } from './Alignments';
|
|
3
3
|
type Alignment = keyof typeof Alignments;
|
|
4
4
|
declare enum SizeAlias {
|
|
@@ -23,10 +23,6 @@ declare const sizes: SizeScale;
|
|
|
23
23
|
export type Size = keyof typeof sizes;
|
|
24
24
|
export type StackProps = {
|
|
25
25
|
children: ReactNode;
|
|
26
|
-
/**
|
|
27
|
-
* Classname for description
|
|
28
|
-
*/
|
|
29
|
-
className?: string;
|
|
30
26
|
/**
|
|
31
27
|
* Direction of component
|
|
32
28
|
*/
|
|
@@ -34,5 +30,9 @@ export type StackProps = {
|
|
|
34
30
|
alignX?: Alignment;
|
|
35
31
|
alignY?: Alignment;
|
|
36
32
|
spacing?: Size;
|
|
37
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Polymorphic element type. Defaults to 'div'.
|
|
35
|
+
*/
|
|
36
|
+
as?: React.ElementType;
|
|
37
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
38
38
|
export {};
|
|
@@ -10,9 +10,22 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
11
11
|
|
|
12
12
|
const { colors: { neutral, secondary }, radius, } = index.theme;
|
|
13
|
-
const ContainerStack = styled__default.default(Stack.Stack).withConfig({
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const ContainerStack = styled__default.default(Stack.Stack).withConfig({
|
|
14
|
+
shouldForwardProp: (prop) => !['hasError', 'compact'].includes(prop),
|
|
15
|
+
}) `
|
|
16
|
+
--background-color: ${({ disabled }) => (disabled ? neutral.grey.light : 'white')};
|
|
17
|
+
--border-color: ${({ hasError }) => (hasError ? secondary.red.base : neutral.ink.lightest)};
|
|
18
|
+
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
background-color: var(--background-color);
|
|
22
|
+
border: ${index.theme.sizes.line} solid var(--border-color);
|
|
23
|
+
border-radius: ${radius.base};
|
|
24
|
+
|
|
25
|
+
height: ${({ compact }) => (compact ? index.theme.sizes[8] : index.theme.sizes[10])};
|
|
26
|
+
`;
|
|
27
|
+
const StepButton = styled__default.default.button.withConfig({ displayName: "vui--StepButton", componentId: "vui--1j6prbe" }) `appearance:none;border:0;background-color:transparent;border-radius:${radius.base};cursor:pointer;height:100%;aspect-ratio:1;&:hover{background-color:${neutral.grey.light};}${inputStyles.inputFocusStyles}`;
|
|
28
|
+
const StepperDivider = styled__default.default.div.withConfig({ displayName: "vui--StepperDivider", componentId: "vui--19ho080" }) `width:${index.theme.sizes.line};background-color:${neutral.ink.lightest};height:${({ compact }) => (compact ? index.theme.sizes[4] : index.theme.sizes[6])};`;
|
|
16
29
|
|
|
17
30
|
exports.ContainerStack = ContainerStack;
|
|
18
31
|
exports.StepButton = StepButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.cjs","sources":["../../../src/components/Stepper/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { theme } from '../../theme';\nimport { inputFocusStyles } from '../../utils/forms/inputStyles';\nimport { Stack } from '../Stack';\nimport { FormComponentProps } from '../types';\n\nconst {\n colors: { neutral, secondary },\n radius,\n} = theme;\n\nexport const ContainerStack = styled(Stack)<FormComponentProps>`\n --background-color: ${({ disabled }) => (disabled ? neutral.grey.light : 'white')};\n --border-color: ${({ hasError }) => (hasError ? secondary.red.base : neutral.ink.lightest)};\n\n box-sizing: border-box;\n display: inline-flex;\n background-color: var(--background-color);\n border: ${theme.sizes.line} solid var(--border-color);\n border-radius: ${radius.base};\n\n height: ${({ compact }) => (compact ? theme.sizes[8] : theme.sizes[10])};\n`;\n\nexport const StepButton = styled.button`\n appearance: none;\n border: 0;\n background-color: transparent;\n border-radius: ${radius.base};\n cursor: pointer;\n\n height: 100%;\n aspect-ratio: 1;\n\n &:hover {\n background-color: ${neutral.grey.light};\n }\n\n ${inputFocusStyles}\n`;\n\nexport const StepperDivider = styled.div<Pick<FormComponentProps, 'compact'>>`\n width: ${theme.sizes.line};\n background-color: ${neutral.ink.lightest};\n height: ${({ compact }) => (compact ? theme.sizes[4] : theme.sizes[6])};\n`;\n"],"names":["theme","styled","Stack","inputFocusStyles"],"mappings":";;;;;;;;;;;AAMA,MAAM,EACJ,MAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAC9B,MAAM,GACP,GAAGA,WAAK;
|
|
1
|
+
{"version":3,"file":"styled.cjs","sources":["../../../src/components/Stepper/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { theme } from '../../theme';\nimport { inputFocusStyles } from '../../utils/forms/inputStyles';\nimport { Stack } from '../Stack';\nimport { FormComponentProps } from '../types';\n\nconst {\n colors: { neutral, secondary },\n radius,\n} = theme;\n\nexport const ContainerStack = styled(Stack).withConfig({\n shouldForwardProp: (prop) => !['hasError', 'compact'].includes(prop),\n})<FormComponentProps>`\n --background-color: ${({ disabled }) => (disabled ? neutral.grey.light : 'white')};\n --border-color: ${({ hasError }) => (hasError ? secondary.red.base : neutral.ink.lightest)};\n\n box-sizing: border-box;\n display: inline-flex;\n background-color: var(--background-color);\n border: ${theme.sizes.line} solid var(--border-color);\n border-radius: ${radius.base};\n\n height: ${({ compact }) => (compact ? theme.sizes[8] : theme.sizes[10])};\n`;\n\nexport const StepButton = styled.button`\n appearance: none;\n border: 0;\n background-color: transparent;\n border-radius: ${radius.base};\n cursor: pointer;\n\n height: 100%;\n aspect-ratio: 1;\n\n &:hover {\n background-color: ${neutral.grey.light};\n }\n\n ${inputFocusStyles}\n`;\n\nexport const StepperDivider = styled.div<Pick<FormComponentProps, 'compact'>>`\n width: ${theme.sizes.line};\n background-color: ${neutral.ink.lightest};\n height: ${({ compact }) => (compact ? theme.sizes[4] : theme.sizes[6])};\n`;\n"],"names":["theme","styled","Stack","inputFocusStyles"],"mappings":";;;;;;;;;;;AAMA,MAAM,EACJ,MAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAC9B,MAAM,GACP,GAAGA,WAAK;AAEF,MAAM,cAAc,GAAGC,uBAAM,CAACC,WAAK,CAAC,CAAC,UAAU,CAAC;AACrD,IAAA,iBAAiB,EAAE,CAAC,IAAI,KAAK,CAAC,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;AACrE,CAAA,CAAC,CAAoB;wBACE,CAAC,EAAE,QAAQ,EAAE,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,CAAA;oBAC/D,CAAC,EAAE,QAAQ,EAAE,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;;;;;YAKhFF,WAAK,CAAC,KAAK,CAAC,IAAI,CAAA;AACT,iBAAA,EAAA,MAAM,CAAC,IAAI,CAAA;;YAElB,CAAC,EAAE,OAAO,EAAE,MAAM,OAAO,GAAGA,WAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAGA,WAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;;MAG5D,UAAU,GAAGC,uBAAM,CAAC,MAAM,oJAIpB,MAAM,CAAC,IAAI,CAAA,oEAAA,EAON,OAAO,CAAC,IAAI,CAAC,KAAK,CAAA,EAAA,EAGtCE,4BAAgB;MAGP,cAAc,GAAGF,uBAAM,CAAC,GAAG,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,qBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,MAAA,EAC7BD,WAAK,CAAC,KAAK,CAAC,IAAI,CAAA,kBAAA,EACL,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA,QAAA,EAC9B,CAAC,EAAE,OAAO,EAAE,MAAM,OAAO,GAAGA,WAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAGA,WAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA,CAAA;;;;;;"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FormComponentProps } from '../types';
|
|
2
|
-
export declare const ContainerStack: import("styled-components").StyledComponent<
|
|
3
|
+
export declare const ContainerStack: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
|
|
4
|
+
children: import("react").ReactNode;
|
|
5
|
+
direction?: "horizontal" | "vertical" | undefined;
|
|
6
|
+
alignX?: "start" | "end" | "center" | "stretch" | "between" | "around" | undefined;
|
|
7
|
+
alignY?: "start" | "end" | "center" | "stretch" | "between" | "around" | undefined;
|
|
8
|
+
spacing?: keyof import("../Stack").SizeScale | undefined;
|
|
9
|
+
as?: import("react").ElementType<any> | undefined;
|
|
10
|
+
} & import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLElement>>, any, FormComponentProps, never>;
|
|
3
11
|
export declare const StepButton: import("styled-components").StyledComponent<"button", any, FormComponentProps, never>;
|
|
4
12
|
export declare const StepperDivider: import("styled-components").StyledComponent<"div", any, Pick<FormComponentProps, "compact">, never>;
|
|
@@ -4,9 +4,22 @@ import { inputFocusStyles } from '../../utils/forms/inputStyles.js';
|
|
|
4
4
|
import { Stack } from '../Stack/Stack.js';
|
|
5
5
|
|
|
6
6
|
const { colors: { neutral, secondary }, radius, } = theme;
|
|
7
|
-
const ContainerStack = styled(Stack).withConfig({
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const ContainerStack = styled(Stack).withConfig({
|
|
8
|
+
shouldForwardProp: (prop) => !['hasError', 'compact'].includes(prop),
|
|
9
|
+
}) `
|
|
10
|
+
--background-color: ${({ disabled }) => (disabled ? neutral.grey.light : 'white')};
|
|
11
|
+
--border-color: ${({ hasError }) => (hasError ? secondary.red.base : neutral.ink.lightest)};
|
|
12
|
+
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
background-color: var(--background-color);
|
|
16
|
+
border: ${theme.sizes.line} solid var(--border-color);
|
|
17
|
+
border-radius: ${radius.base};
|
|
18
|
+
|
|
19
|
+
height: ${({ compact }) => (compact ? theme.sizes[8] : theme.sizes[10])};
|
|
20
|
+
`;
|
|
21
|
+
const StepButton = styled.button.withConfig({ displayName: "vui--StepButton", componentId: "vui--1j6prbe" }) `appearance:none;border:0;background-color:transparent;border-radius:${radius.base};cursor:pointer;height:100%;aspect-ratio:1;&:hover{background-color:${neutral.grey.light};}${inputFocusStyles}`;
|
|
22
|
+
const StepperDivider = styled.div.withConfig({ displayName: "vui--StepperDivider", componentId: "vui--19ho080" }) `width:${theme.sizes.line};background-color:${neutral.ink.lightest};height:${({ compact }) => (compact ? theme.sizes[4] : theme.sizes[6])};`;
|
|
10
23
|
|
|
11
24
|
export { ContainerStack, StepButton, StepperDivider };
|
|
12
25
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../src/components/Stepper/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { theme } from '../../theme';\nimport { inputFocusStyles } from '../../utils/forms/inputStyles';\nimport { Stack } from '../Stack';\nimport { FormComponentProps } from '../types';\n\nconst {\n colors: { neutral, secondary },\n radius,\n} = theme;\n\nexport const ContainerStack = styled(Stack)<FormComponentProps>`\n --background-color: ${({ disabled }) => (disabled ? neutral.grey.light : 'white')};\n --border-color: ${({ hasError }) => (hasError ? secondary.red.base : neutral.ink.lightest)};\n\n box-sizing: border-box;\n display: inline-flex;\n background-color: var(--background-color);\n border: ${theme.sizes.line} solid var(--border-color);\n border-radius: ${radius.base};\n\n height: ${({ compact }) => (compact ? theme.sizes[8] : theme.sizes[10])};\n`;\n\nexport const StepButton = styled.button`\n appearance: none;\n border: 0;\n background-color: transparent;\n border-radius: ${radius.base};\n cursor: pointer;\n\n height: 100%;\n aspect-ratio: 1;\n\n &:hover {\n background-color: ${neutral.grey.light};\n }\n\n ${inputFocusStyles}\n`;\n\nexport const StepperDivider = styled.div<Pick<FormComponentProps, 'compact'>>`\n width: ${theme.sizes.line};\n background-color: ${neutral.ink.lightest};\n height: ${({ compact }) => (compact ? theme.sizes[4] : theme.sizes[6])};\n`;\n"],"names":[],"mappings":";;;;;AAMA,MAAM,EACJ,MAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAC9B,MAAM,GACP,GAAG,KAAK;
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../src/components/Stepper/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { theme } from '../../theme';\nimport { inputFocusStyles } from '../../utils/forms/inputStyles';\nimport { Stack } from '../Stack';\nimport { FormComponentProps } from '../types';\n\nconst {\n colors: { neutral, secondary },\n radius,\n} = theme;\n\nexport const ContainerStack = styled(Stack).withConfig({\n shouldForwardProp: (prop) => !['hasError', 'compact'].includes(prop),\n})<FormComponentProps>`\n --background-color: ${({ disabled }) => (disabled ? neutral.grey.light : 'white')};\n --border-color: ${({ hasError }) => (hasError ? secondary.red.base : neutral.ink.lightest)};\n\n box-sizing: border-box;\n display: inline-flex;\n background-color: var(--background-color);\n border: ${theme.sizes.line} solid var(--border-color);\n border-radius: ${radius.base};\n\n height: ${({ compact }) => (compact ? theme.sizes[8] : theme.sizes[10])};\n`;\n\nexport const StepButton = styled.button`\n appearance: none;\n border: 0;\n background-color: transparent;\n border-radius: ${radius.base};\n cursor: pointer;\n\n height: 100%;\n aspect-ratio: 1;\n\n &:hover {\n background-color: ${neutral.grey.light};\n }\n\n ${inputFocusStyles}\n`;\n\nexport const StepperDivider = styled.div<Pick<FormComponentProps, 'compact'>>`\n width: ${theme.sizes.line};\n background-color: ${neutral.ink.lightest};\n height: ${({ compact }) => (compact ? theme.sizes[4] : theme.sizes[6])};\n`;\n"],"names":[],"mappings":";;;;;AAMA,MAAM,EACJ,MAAM,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAC9B,MAAM,GACP,GAAG,KAAK;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;AACrD,IAAA,iBAAiB,EAAE,CAAC,IAAI,KAAK,CAAC,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;AACrE,CAAA,CAAC,CAAoB;wBACE,CAAC,EAAE,QAAQ,EAAE,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,CAAA;oBAC/D,CAAC,EAAE,QAAQ,EAAE,MAAM,QAAQ,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;;;;;YAKhF,KAAK,CAAC,KAAK,CAAC,IAAI,CAAA;AACT,iBAAA,EAAA,MAAM,CAAC,IAAI,CAAA;;YAElB,CAAC,EAAE,OAAO,EAAE,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAA;;MAG5D,UAAU,GAAG,MAAM,CAAC,MAAM,oJAIpB,MAAM,CAAC,IAAI,CAAA,oEAAA,EAON,OAAO,CAAC,IAAI,CAAC,KAAK,CAAA,EAAA,EAGtC,gBAAgB;MAGP,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,qBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,MAAA,EAC7B,KAAK,CAAC,KAAK,CAAC,IAAI,CAAA,kBAAA,EACL,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAA,QAAA,EAC9B,CAAC,EAAE,OAAO,EAAE,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA,CAAA;;;;"}
|
|
@@ -7,5 +7,5 @@ import React from 'react';
|
|
|
7
7
|
export declare const Text: React.ForwardRefExoticComponent<{
|
|
8
8
|
as?: import("./types").ValidTextTag | undefined;
|
|
9
9
|
muted?: boolean | undefined;
|
|
10
|
-
variant?: "
|
|
10
|
+
variant?: "placeholder" | "link" | "body" | "button" | "headingXXL" | "headingXL" | "headingLarge" | "headingMedium" | "headingSmall" | "headingTable" | "subheadingLarge" | "subheadingMedium" | "subheadingSmall" | "subheadingSmallBold" | "bodySmall" | "bodyBold" | "bodyBoldDark" | "bodySmallBold" | "inputLabel" | "inputLabelSmall" | "hintText" | "placeholderSmall" | "placeholderCode" | "placeholderCodeSmall" | "error" | "errorSmall" | "successSmall" | "buttonSmall" | "linkLarge" | "linkMedium" | "linkSmall" | undefined;
|
|
11
11
|
} & React.HTMLAttributes<HTMLElement> & React.LabelHTMLAttributes<HTMLLabelElement> & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const TextField: React.ForwardRefExoticComponent<{
|
|
3
|
-
form?: string | undefined;
|
|
4
|
-
slot?: string | undefined;
|
|
5
|
-
style?: React.CSSProperties | undefined;
|
|
6
|
-
title?: string | undefined;
|
|
7
|
-
pattern?: string | undefined;
|
|
8
3
|
rel?: string | undefined;
|
|
9
|
-
placeholder?: string | undefined;
|
|
10
|
-
list?: string | undefined;
|
|
11
4
|
className?: string | undefined;
|
|
12
5
|
children?: React.ReactNode;
|
|
13
6
|
defaultChecked?: boolean | undefined;
|
|
@@ -24,8 +17,12 @@ export declare const TextField: React.ForwardRefExoticComponent<{
|
|
|
24
17
|
id?: string | undefined;
|
|
25
18
|
lang?: string | undefined;
|
|
26
19
|
nonce?: string | undefined;
|
|
20
|
+
placeholder?: string | undefined;
|
|
21
|
+
slot?: string | undefined;
|
|
27
22
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
23
|
+
style?: React.CSSProperties | undefined;
|
|
28
24
|
tabIndex?: number | undefined;
|
|
25
|
+
title?: string | undefined;
|
|
29
26
|
translate?: "yes" | "no" | undefined;
|
|
30
27
|
radioGroup?: string | undefined;
|
|
31
28
|
role?: React.AriaRole | undefined;
|
|
@@ -51,7 +48,7 @@ export declare const TextField: React.ForwardRefExoticComponent<{
|
|
|
51
48
|
results?: number | undefined;
|
|
52
49
|
security?: string | undefined;
|
|
53
50
|
unselectable?: "on" | "off" | undefined;
|
|
54
|
-
inputMode?: "
|
|
51
|
+
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
55
52
|
is?: string | undefined;
|
|
56
53
|
'aria-activedescendant'?: string | undefined;
|
|
57
54
|
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
@@ -263,6 +260,9 @@ export declare const TextField: React.ForwardRefExoticComponent<{
|
|
|
263
260
|
onAnimationIterationCapture?: (React.AnimationEventHandler<HTMLInputElement> & React.AnimationEventHandler<HTMLTextAreaElement>) | undefined;
|
|
264
261
|
onTransitionEnd?: (React.TransitionEventHandler<HTMLInputElement> & React.TransitionEventHandler<HTMLTextAreaElement>) | undefined;
|
|
265
262
|
onTransitionEndCapture?: (React.TransitionEventHandler<HTMLInputElement> & React.TransitionEventHandler<HTMLTextAreaElement>) | undefined;
|
|
263
|
+
form?: string | undefined;
|
|
264
|
+
pattern?: string | undefined;
|
|
265
|
+
list?: string | undefined;
|
|
266
266
|
alt?: string | undefined;
|
|
267
267
|
disabled?: boolean | undefined;
|
|
268
268
|
formAction?: string | undefined;
|