@veeqo/ui 11.4.2 → 12.0.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/Alerts/Alert/Alert.cjs +2 -1
- package/dist/components/Alerts/Alert/Alert.cjs.map +1 -1
- package/dist/components/Alerts/Alert/Alert.d.ts +1 -1
- package/dist/components/Alerts/Alert/Alert.js +2 -1
- package/dist/components/Alerts/Alert/Alert.js.map +1 -1
- package/dist/components/Alerts/MiniAlert/MiniAlert.cjs +2 -2
- package/dist/components/Alerts/MiniAlert/MiniAlert.cjs.map +1 -1
- package/dist/components/Alerts/MiniAlert/MiniAlert.d.ts +1 -1
- package/dist/components/Alerts/MiniAlert/MiniAlert.js +2 -2
- package/dist/components/Alerts/MiniAlert/MiniAlert.js.map +1 -1
- package/dist/components/Alerts/MiniAlert/types.d.ts +2 -1
- package/dist/components/Avatar/Avatar.cjs +28 -5
- package/dist/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.js +28 -5
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/Avatar.module.scss.cjs +9 -0
- package/dist/components/Avatar/Avatar.module.scss.cjs.map +1 -0
- package/dist/components/Avatar/Avatar.module.scss.js +7 -0
- package/dist/components/Avatar/Avatar.module.scss.js.map +1 -0
- package/dist/components/Avatar/types.d.ts +14 -8
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +11 -0
- package/dist/components/AvatarGroup/index.d.ts +1 -0
- package/dist/components/SelectDropdown/ListItem/ListItem.cjs +2 -2
- package/dist/components/SelectDropdown/ListItem/ListItem.cjs.map +1 -1
- package/dist/components/SelectDropdown/ListItem/ListItem.d.ts +1 -1
- package/dist/components/SelectDropdown/ListItem/ListItem.js +2 -2
- package/dist/components/SelectDropdown/ListItem/ListItem.js.map +1 -1
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.cjs +3 -1
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.cjs.map +1 -1
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.d.ts +1 -1
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.js +3 -1
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.js.map +1 -1
- package/dist/icons/custom/components/CriticalIcon.cjs +14 -0
- package/dist/icons/custom/components/CriticalIcon.cjs.map +1 -0
- package/dist/icons/custom/components/CriticalIcon.d.ts +1 -1
- package/dist/icons/custom/components/CriticalIcon.js +8 -0
- package/dist/icons/custom/components/CriticalIcon.js.map +1 -0
- package/package.json +1 -1
- package/dist/components/Avatar/styled.cjs +0 -13
- package/dist/components/Avatar/styled.cjs.map +0 -1
- package/dist/components/Avatar/styled.d.ts +0 -2
- package/dist/components/Avatar/styled.js +0 -7
- package/dist/components/Avatar/styled.js.map +0 -1
|
@@ -17,13 +17,14 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
17
17
|
|
|
18
18
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
19
19
|
|
|
20
|
-
const Alert = ({ size = 'base', variant = 'default', colours: passedColours, rightActions, rightActionsSlot, title, titleSlot, messageSlot, message, children, iconSlot, onClickClose, ...divProps }) => {
|
|
20
|
+
const Alert = ({ size = 'base', variant = 'default', colours: passedColours, rightActions, rightActionsSlot, title, titleSlot, messageSlot, message, children, iconSlot, onClickClose, className, ...divProps }) => {
|
|
21
21
|
const DefaultIcon = constants.IconMap[variant];
|
|
22
22
|
const isXsSize = size === 'xs';
|
|
23
23
|
return (React__default.default.createElement(FlexRow.FlexRow, { justifyContent: "space-between", className: buildClassnames.buildClassnames([
|
|
24
24
|
Alert_module.alertContainer,
|
|
25
25
|
Alert_module[`${size}-size`],
|
|
26
26
|
Alerts_module[`${variant}-alert-variant`],
|
|
27
|
+
className,
|
|
27
28
|
]), ...divProps },
|
|
28
29
|
React__default.default.createElement(FlexRow.FlexRow, { alignItems: isXsSize ? 'center' : 'start', className: Alert_module.iconTextContainer },
|
|
29
30
|
React__default.default.createElement(FlexRow.FlexRow, { style: assignCssVars.assignCssVars({ iconColor: passedColours === null || passedColours === undefined ? undefined : passedColours.primary }), className: Alerts_module.icon }, iconSlot || React__default.default.createElement(DefaultIcon, { role: "presentation" })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.cjs","sources":["../../../../src/components/Alerts/Alert/Alert.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Text } from '../../Text';\nimport { Button } from '../../Button';\nimport { CrossIcon } from '../../../icons';\nimport { IconMap } from '../constants';\nimport { AlertProps } from './types';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { FlexCol } from '../../Flex/FlexCol';\nimport { assignCssVars, buildClassnames } from '../../../utils';\n\nimport alertStyles from '../Alerts.module.scss';\nimport styles from './Alert.module.scss';\n\nexport const Alert = ({\n size = 'base',\n variant = 'default',\n colours: passedColours,\n rightActions,\n rightActionsSlot,\n title,\n titleSlot,\n messageSlot,\n message,\n children,\n iconSlot,\n onClickClose,\n ...divProps\n}: AlertProps) => {\n const DefaultIcon = IconMap[variant];\n\n const isXsSize = size === 'xs';\n\n return (\n <FlexRow\n justifyContent=\"space-between\"\n className={buildClassnames([\n styles.alertContainer,\n styles[`${size}-size`],\n alertStyles[`${variant}-alert-variant`],\n ])}\n {...divProps}\n >\n <FlexRow alignItems={isXsSize ? 'center' : 'start'} className={styles.iconTextContainer}>\n <FlexRow\n style={assignCssVars({ iconColor: passedColours?.primary })}\n className={alertStyles.icon}\n >\n {iconSlot || <DefaultIcon role=\"presentation\" />}\n </FlexRow>\n\n {children || (\n <FlexCol gap={isXsSize ? 'xs' : 'sm'}>\n {titleSlot || (\n <Text variant=\"bodyBold\" style={size === 'base' ? { lineHeight: '24px' } : {}}>\n {title}\n </Text>\n )}\n {messageSlot || <Text variant=\"body\">{message}</Text>}\n </FlexCol>\n )}\n </FlexRow>\n\n <FlexRow justifyContent=\"flex-end\" className={styles.rightActionsContainer}>\n {rightActionsSlot}\n\n {rightActions && (\n <FlexCol justifyContent=\"center\" className={styles.rightActions}>\n {rightActions.map(({ label, ...actionProps }) => (\n <Button key={label} type=\"button\" size=\"sm\" {...actionProps}>\n {label}\n </Button>\n ))}\n </FlexCol>\n )}\n\n {onClickClose && (\n <FlexCol className={styles.closeContainer}>\n <Button\n variant=\"flat\"\n iconSlot={<CrossIcon />}\n onClick={onClickClose}\n aria-label=\"Close\"\n size=\"sm\"\n />\n </FlexCol>\n )}\n </FlexRow>\n </FlexRow>\n );\n};\n"],"names":["IconMap","React","FlexRow","buildClassnames","styles","alertStyles","assignCssVars","FlexCol","Text","Button","CrossIcon"],"mappings":";;;;;;;;;;;;;;;;;;;AAca,MAAA,KAAK,GAAG,CAAC,EACpB,IAAI,GAAG,MAAM,EACb,OAAO,GAAG,SAAS,EACnB,OAAO,EAAE,aAAa,EACtB,YAAY,EACZ,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,WAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,GAAG,QAAQ,EACA,KAAI;AACf,IAAA,MAAM,WAAW,GAAGA,iBAAO,CAAC,OAAO,CAAC;AAEpC,IAAA,MAAM,QAAQ,GAAG,IAAI,KAAK,IAAI;IAE9B,QACEC,sBAAC,CAAA,aAAA,CAAAC,eAAO,EACN,EAAA,cAAc,EAAC,eAAe,EAC9B,SAAS,EAAEC,+BAAe,CAAC;AACzB,YAAAC,YAAM,CAAC,cAAc;AACrB,YAAAA,YAAM,CAAC,CAAA,EAAG,IAAI,CAAA,KAAA,CAAO,CAAC;AACtB,YAAAC,aAAW,CAAC,CAAA,EAAG,OAAO,CAAA,cAAA,CAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Alert.cjs","sources":["../../../../src/components/Alerts/Alert/Alert.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Text } from '../../Text';\nimport { Button } from '../../Button';\nimport { CrossIcon } from '../../../icons';\nimport { IconMap } from '../constants';\nimport { AlertProps } from './types';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { FlexCol } from '../../Flex/FlexCol';\nimport { assignCssVars, buildClassnames } from '../../../utils';\n\nimport alertStyles from '../Alerts.module.scss';\nimport styles from './Alert.module.scss';\n\nexport const Alert = ({\n size = 'base',\n variant = 'default',\n colours: passedColours,\n rightActions,\n rightActionsSlot,\n title,\n titleSlot,\n messageSlot,\n message,\n children,\n iconSlot,\n onClickClose,\n className,\n ...divProps\n}: AlertProps) => {\n const DefaultIcon = IconMap[variant];\n\n const isXsSize = size === 'xs';\n\n return (\n <FlexRow\n justifyContent=\"space-between\"\n className={buildClassnames([\n styles.alertContainer,\n styles[`${size}-size`],\n alertStyles[`${variant}-alert-variant`],\n className,\n ])}\n {...divProps}\n >\n <FlexRow alignItems={isXsSize ? 'center' : 'start'} className={styles.iconTextContainer}>\n <FlexRow\n style={assignCssVars({ iconColor: passedColours?.primary })}\n className={alertStyles.icon}\n >\n {iconSlot || <DefaultIcon role=\"presentation\" />}\n </FlexRow>\n\n {children || (\n <FlexCol gap={isXsSize ? 'xs' : 'sm'}>\n {titleSlot || (\n <Text variant=\"bodyBold\" style={size === 'base' ? { lineHeight: '24px' } : {}}>\n {title}\n </Text>\n )}\n {messageSlot || <Text variant=\"body\">{message}</Text>}\n </FlexCol>\n )}\n </FlexRow>\n\n <FlexRow justifyContent=\"flex-end\" className={styles.rightActionsContainer}>\n {rightActionsSlot}\n\n {rightActions && (\n <FlexCol justifyContent=\"center\" className={styles.rightActions}>\n {rightActions.map(({ label, ...actionProps }) => (\n <Button key={label} type=\"button\" size=\"sm\" {...actionProps}>\n {label}\n </Button>\n ))}\n </FlexCol>\n )}\n\n {onClickClose && (\n <FlexCol className={styles.closeContainer}>\n <Button\n variant=\"flat\"\n iconSlot={<CrossIcon />}\n onClick={onClickClose}\n aria-label=\"Close\"\n size=\"sm\"\n />\n </FlexCol>\n )}\n </FlexRow>\n </FlexRow>\n );\n};\n"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,EACV,YAAA,EAAA,OAAO,EAClB,IAAI,EAAC,IAAI,EACT,CAAA,CACM,CACX,CACO,CACF;AAEd;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AlertProps } from './types';
|
|
3
|
-
export declare const Alert: ({ size, variant, colours: passedColours, rightActions, rightActionsSlot, title, titleSlot, messageSlot, message, children, iconSlot, onClickClose, ...divProps }: AlertProps) => React.JSX.Element;
|
|
3
|
+
export declare const Alert: ({ size, variant, colours: passedColours, rightActions, rightActionsSlot, title, titleSlot, messageSlot, message, children, iconSlot, onClickClose, className, ...divProps }: AlertProps) => React.JSX.Element;
|
|
@@ -11,13 +11,14 @@ import { assignCssVars } from '../../../utils/assignCssVars.js';
|
|
|
11
11
|
import alertStyles from '../Alerts.module.scss.js';
|
|
12
12
|
import styles from './Alert.module.scss.js';
|
|
13
13
|
|
|
14
|
-
const Alert = ({ size = 'base', variant = 'default', colours: passedColours, rightActions, rightActionsSlot, title, titleSlot, messageSlot, message, children, iconSlot, onClickClose, ...divProps }) => {
|
|
14
|
+
const Alert = ({ size = 'base', variant = 'default', colours: passedColours, rightActions, rightActionsSlot, title, titleSlot, messageSlot, message, children, iconSlot, onClickClose, className, ...divProps }) => {
|
|
15
15
|
const DefaultIcon = IconMap[variant];
|
|
16
16
|
const isXsSize = size === 'xs';
|
|
17
17
|
return (React__default.createElement(FlexRow, { justifyContent: "space-between", className: buildClassnames([
|
|
18
18
|
styles.alertContainer,
|
|
19
19
|
styles[`${size}-size`],
|
|
20
20
|
alertStyles[`${variant}-alert-variant`],
|
|
21
|
+
className,
|
|
21
22
|
]), ...divProps },
|
|
22
23
|
React__default.createElement(FlexRow, { alignItems: isXsSize ? 'center' : 'start', className: styles.iconTextContainer },
|
|
23
24
|
React__default.createElement(FlexRow, { style: assignCssVars({ iconColor: passedColours === null || passedColours === undefined ? undefined : passedColours.primary }), className: alertStyles.icon }, iconSlot || React__default.createElement(DefaultIcon, { role: "presentation" })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sources":["../../../../src/components/Alerts/Alert/Alert.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Text } from '../../Text';\nimport { Button } from '../../Button';\nimport { CrossIcon } from '../../../icons';\nimport { IconMap } from '../constants';\nimport { AlertProps } from './types';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { FlexCol } from '../../Flex/FlexCol';\nimport { assignCssVars, buildClassnames } from '../../../utils';\n\nimport alertStyles from '../Alerts.module.scss';\nimport styles from './Alert.module.scss';\n\nexport const Alert = ({\n size = 'base',\n variant = 'default',\n colours: passedColours,\n rightActions,\n rightActionsSlot,\n title,\n titleSlot,\n messageSlot,\n message,\n children,\n iconSlot,\n onClickClose,\n ...divProps\n}: AlertProps) => {\n const DefaultIcon = IconMap[variant];\n\n const isXsSize = size === 'xs';\n\n return (\n <FlexRow\n justifyContent=\"space-between\"\n className={buildClassnames([\n styles.alertContainer,\n styles[`${size}-size`],\n alertStyles[`${variant}-alert-variant`],\n ])}\n {...divProps}\n >\n <FlexRow alignItems={isXsSize ? 'center' : 'start'} className={styles.iconTextContainer}>\n <FlexRow\n style={assignCssVars({ iconColor: passedColours?.primary })}\n className={alertStyles.icon}\n >\n {iconSlot || <DefaultIcon role=\"presentation\" />}\n </FlexRow>\n\n {children || (\n <FlexCol gap={isXsSize ? 'xs' : 'sm'}>\n {titleSlot || (\n <Text variant=\"bodyBold\" style={size === 'base' ? { lineHeight: '24px' } : {}}>\n {title}\n </Text>\n )}\n {messageSlot || <Text variant=\"body\">{message}</Text>}\n </FlexCol>\n )}\n </FlexRow>\n\n <FlexRow justifyContent=\"flex-end\" className={styles.rightActionsContainer}>\n {rightActionsSlot}\n\n {rightActions && (\n <FlexCol justifyContent=\"center\" className={styles.rightActions}>\n {rightActions.map(({ label, ...actionProps }) => (\n <Button key={label} type=\"button\" size=\"sm\" {...actionProps}>\n {label}\n </Button>\n ))}\n </FlexCol>\n )}\n\n {onClickClose && (\n <FlexCol className={styles.closeContainer}>\n <Button\n variant=\"flat\"\n iconSlot={<CrossIcon />}\n onClick={onClickClose}\n aria-label=\"Close\"\n size=\"sm\"\n />\n </FlexCol>\n )}\n </FlexRow>\n </FlexRow>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;AAca,MAAA,KAAK,GAAG,CAAC,EACpB,IAAI,GAAG,MAAM,EACb,OAAO,GAAG,SAAS,EACnB,OAAO,EAAE,aAAa,EACtB,YAAY,EACZ,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,WAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,GAAG,QAAQ,EACA,KAAI;AACf,IAAA,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;AAEpC,IAAA,MAAM,QAAQ,GAAG,IAAI,KAAK,IAAI;IAE9B,QACEA,cAAC,CAAA,aAAA,CAAA,OAAO,EACN,EAAA,cAAc,EAAC,eAAe,EAC9B,SAAS,EAAE,eAAe,CAAC;AACzB,YAAA,MAAM,CAAC,cAAc;AACrB,YAAA,MAAM,CAAC,CAAA,EAAG,IAAI,CAAA,KAAA,CAAO,CAAC;AACtB,YAAA,WAAW,CAAC,CAAA,EAAG,OAAO,CAAA,cAAA,CAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Alert.js","sources":["../../../../src/components/Alerts/Alert/Alert.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Text } from '../../Text';\nimport { Button } from '../../Button';\nimport { CrossIcon } from '../../../icons';\nimport { IconMap } from '../constants';\nimport { AlertProps } from './types';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { FlexCol } from '../../Flex/FlexCol';\nimport { assignCssVars, buildClassnames } from '../../../utils';\n\nimport alertStyles from '../Alerts.module.scss';\nimport styles from './Alert.module.scss';\n\nexport const Alert = ({\n size = 'base',\n variant = 'default',\n colours: passedColours,\n rightActions,\n rightActionsSlot,\n title,\n titleSlot,\n messageSlot,\n message,\n children,\n iconSlot,\n onClickClose,\n className,\n ...divProps\n}: AlertProps) => {\n const DefaultIcon = IconMap[variant];\n\n const isXsSize = size === 'xs';\n\n return (\n <FlexRow\n justifyContent=\"space-between\"\n className={buildClassnames([\n styles.alertContainer,\n styles[`${size}-size`],\n alertStyles[`${variant}-alert-variant`],\n className,\n ])}\n {...divProps}\n >\n <FlexRow alignItems={isXsSize ? 'center' : 'start'} className={styles.iconTextContainer}>\n <FlexRow\n style={assignCssVars({ iconColor: passedColours?.primary })}\n className={alertStyles.icon}\n >\n {iconSlot || <DefaultIcon role=\"presentation\" />}\n </FlexRow>\n\n {children || (\n <FlexCol gap={isXsSize ? 'xs' : 'sm'}>\n {titleSlot || (\n <Text variant=\"bodyBold\" style={size === 'base' ? { lineHeight: '24px' } : {}}>\n {title}\n </Text>\n )}\n {messageSlot || <Text variant=\"body\">{message}</Text>}\n </FlexCol>\n )}\n </FlexRow>\n\n <FlexRow justifyContent=\"flex-end\" className={styles.rightActionsContainer}>\n {rightActionsSlot}\n\n {rightActions && (\n <FlexCol justifyContent=\"center\" className={styles.rightActions}>\n {rightActions.map(({ label, ...actionProps }) => (\n <Button key={label} type=\"button\" size=\"sm\" {...actionProps}>\n {label}\n </Button>\n ))}\n </FlexCol>\n )}\n\n {onClickClose && (\n <FlexCol className={styles.closeContainer}>\n <Button\n variant=\"flat\"\n iconSlot={<CrossIcon />}\n onClick={onClickClose}\n aria-label=\"Close\"\n size=\"sm\"\n />\n </FlexCol>\n )}\n </FlexRow>\n </FlexRow>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;AAca,MAAA,KAAK,GAAG,CAAC,EACpB,IAAI,GAAG,MAAM,EACb,OAAO,GAAG,SAAS,EACnB,OAAO,EAAE,aAAa,EACtB,YAAY,EACZ,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,WAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,GAAG,QAAQ,EAC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A,CAAA,aAAA,CAAC,IAAI,EAAA,EAAC,OAAO,EAAC,MAAM,EAAA,EAAE,OAAO,CAAQ,CAC7C,CACX,CACO;QAEVA,cAAC,CAAA,aAAA,CAAA,OAAO,EAAC,EAAA,cAAc,EAAC,UAAU,EAAC,SAAS,EAAE,MAAM,CAAC,qBAAqB,EAAA;YACvE,gBAAgB;YAEhB,YAAY,KACXA,cAAA,CAAA,aAAA,CAAC,OAAO,EAAA,EAAC,cAAc,EAAC,QAAQ,EAAC,SAAS,EAAE,MAAM,CAAC,YAAY,EAAA,EAC5D,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,MAC1CA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,IAAI,EAAA,GAAK,WAAW,EAAA,EACxD,KAAK,CACC,CACV,CAAC,CACM,CACX;YAEA,YAAY,KACXA,cAAC,CAAA,aAAA,CAAA,OAAO,IAAC,SAAS,EAAE,MAAM,CAAC,cAAc,EAAA;gBACvCA,cAAC,CAAA,aAAA,CAAA,MAAM,EACL,EAAA,OAAO,EAAC,MAAM,EACd,QAAQ,EAAEA,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,IAAA,CAAG,EACvB,OAAO,EAAE,YAAY,EACV,YAAA,EAAA,OAAO,EAClB,IAAI,EAAC,IAAI,EACT,CAAA,CACM,CACX,CACO,CACF;AAEd;;;;"}
|
|
@@ -14,9 +14,9 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
16
|
|
|
17
|
-
const MiniAlert = ({ title, variant = 'default', iconSlot, customTitleColour, customIconColour, }) => {
|
|
17
|
+
const MiniAlert = ({ title, variant = 'default', iconSlot, customTitleColour, customIconColour, className, ...divProps }) => {
|
|
18
18
|
const DefaultIcon = constants.IconMap[variant];
|
|
19
|
-
return (React__default.default.createElement(FlexRow.FlexRow, { gap: "xs", role: "status" },
|
|
19
|
+
return (React__default.default.createElement(FlexRow.FlexRow, { gap: "xs", role: "status", ...divProps, className: className },
|
|
20
20
|
React__default.default.createElement(FlexRow.FlexRow, { style: assignCssVars.assignCssVars({ iconColor: customIconColour }), className: buildClassnames.buildClassnames([
|
|
21
21
|
Alerts_module.icon,
|
|
22
22
|
Alerts_module[`${variant}-alert-variant`],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MiniAlert.cjs","sources":["../../../../src/components/Alerts/MiniAlert/MiniAlert.tsx"],"sourcesContent":["import React from 'react';\nimport { buildClassnames, assignCssVars } from '../../../utils';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { IconMap } from '../constants';\nimport { Text } from '../../Text';\n\nimport { MiniAlertProps } from './types';\n\nimport styles from './MiniAlert.module.scss';\nimport alertStyles from '../Alerts.module.scss';\n\nexport const MiniAlert = ({\n title,\n variant = 'default',\n iconSlot,\n customTitleColour,\n customIconColour,\n}: MiniAlertProps) => {\n const DefaultIcon = IconMap[variant];\n\n return (\n <FlexRow gap=\"xs\" role=\"status\">\n <FlexRow\n style={assignCssVars({ iconColor: customIconColour })}\n className={buildClassnames([\n alertStyles.icon,\n alertStyles[`${variant}-alert-variant`],\n styles['mini-alert-size'],\n ])}\n >\n {iconSlot || <DefaultIcon role=\"presentation\" />}\n </FlexRow>\n <Text\n variant=\"bodyBold\"\n style={assignCssVars({ textColor: customTitleColour })}\n className={buildClassnames([styles.text, styles[`${variant}-variant`]])}\n >\n {title}\n </Text>\n </FlexRow>\n );\n};\n"],"names":["IconMap","React","FlexRow","assignCssVars","buildClassnames","alertStyles","styles","Text"],"mappings":";;;;;;;;;;;;;;;;AAWa,MAAA,SAAS,GAAG,CAAC,EACxB,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MiniAlert.cjs","sources":["../../../../src/components/Alerts/MiniAlert/MiniAlert.tsx"],"sourcesContent":["import React from 'react';\nimport { buildClassnames, assignCssVars } from '../../../utils';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { IconMap } from '../constants';\nimport { Text } from '../../Text';\n\nimport { MiniAlertProps } from './types';\n\nimport styles from './MiniAlert.module.scss';\nimport alertStyles from '../Alerts.module.scss';\n\nexport const MiniAlert = ({\n title,\n variant = 'default',\n iconSlot,\n customTitleColour,\n customIconColour,\n className,\n ...divProps\n}: MiniAlertProps) => {\n const DefaultIcon = IconMap[variant];\n\n return (\n <FlexRow gap=\"xs\" role=\"status\" {...divProps} className={className}>\n <FlexRow\n style={assignCssVars({ iconColor: customIconColour })}\n className={buildClassnames([\n alertStyles.icon,\n alertStyles[`${variant}-alert-variant`],\n styles['mini-alert-size'],\n ])}\n >\n {iconSlot || <DefaultIcon role=\"presentation\" />}\n </FlexRow>\n <Text\n variant=\"bodyBold\"\n style={assignCssVars({ textColor: customTitleColour })}\n className={buildClassnames([styles.text, styles[`${variant}-variant`]])}\n >\n {title}\n </Text>\n </FlexRow>\n );\n};\n"],"names":["IconMap","React","FlexRow","assignCssVars","buildClassnames","alertStyles","styles","Text"],"mappings":";;;;;;;;;;;;;;;;AAWa,MAAA,SAAS,GAAG,CAAC,EACxB,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,EACT,GAAG,QAAQ,EACI,KAAI;AACnB,IAAA,MAAM,WAAW,GAAGA,iBAAO,CAAC,OAAO,CAAC;AAEpC,IAAA,QACEC,sBAAC,CAAA,aAAA,CAAAC,eAAO,EAAC,EAAA,GAAG,EAAC,IAAI,EAAC,IAAI,EAAC,QAAQ,EAAK,GAAA,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAA;AAChE,QAAAD,sBAAA,CAAA,aAAA,CAACC,eAAO,EACN,EAAA,KAAK,EAAEC,2BAAa,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,EACrD,SAAS,EAAEC,+BAAe,CAAC;AACzB,gBAAAC,aAAW,CAAC,IAAI;AAChB,gBAAAA,aAAW,CAAC,CAAA,EAAG,OAAO,CAAA,cAAA,CAAgB,CAAC;gBACvCC,gBAAM,CAAC,iBAAiB,CAAC;aAC1B,CAAC,EAAA,EAED,QAAQ,IAAIL,sBAAC,CAAA,aAAA,CAAA,WAAW,IAAC,IAAI,EAAC,cAAc,EAAA,CAAG,CACxC;AACV,QAAAA,sBAAA,CAAA,aAAA,CAACM,SAAI,EACH,EAAA,OAAO,EAAC,UAAU,EAClB,KAAK,EAAEJ,2BAAa,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC,EACtD,SAAS,EAAEC,+BAAe,CAAC,CAACE,gBAAM,CAAC,IAAI,EAAEA,gBAAM,CAAC,CAAG,EAAA,OAAO,CAAU,QAAA,CAAA,CAAC,CAAC,CAAC,EAAA,EAEtE,KAAK,CACD,CACC;AAEd;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MiniAlertProps } from './types';
|
|
3
|
-
export declare const MiniAlert: ({ title, variant, iconSlot, customTitleColour, customIconColour, }: MiniAlertProps) => React.JSX.Element;
|
|
3
|
+
export declare const MiniAlert: ({ title, variant, iconSlot, customTitleColour, customIconColour, className, ...divProps }: MiniAlertProps) => React.JSX.Element;
|
|
@@ -8,9 +8,9 @@ import { Text } from '../../Text/Text.js';
|
|
|
8
8
|
import styles from './MiniAlert.module.scss.js';
|
|
9
9
|
import alertStyles from '../Alerts.module.scss.js';
|
|
10
10
|
|
|
11
|
-
const MiniAlert = ({ title, variant = 'default', iconSlot, customTitleColour, customIconColour, }) => {
|
|
11
|
+
const MiniAlert = ({ title, variant = 'default', iconSlot, customTitleColour, customIconColour, className, ...divProps }) => {
|
|
12
12
|
const DefaultIcon = IconMap[variant];
|
|
13
|
-
return (React__default.createElement(FlexRow, { gap: "xs", role: "status" },
|
|
13
|
+
return (React__default.createElement(FlexRow, { gap: "xs", role: "status", ...divProps, className: className },
|
|
14
14
|
React__default.createElement(FlexRow, { style: assignCssVars({ iconColor: customIconColour }), className: buildClassnames([
|
|
15
15
|
alertStyles.icon,
|
|
16
16
|
alertStyles[`${variant}-alert-variant`],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MiniAlert.js","sources":["../../../../src/components/Alerts/MiniAlert/MiniAlert.tsx"],"sourcesContent":["import React from 'react';\nimport { buildClassnames, assignCssVars } from '../../../utils';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { IconMap } from '../constants';\nimport { Text } from '../../Text';\n\nimport { MiniAlertProps } from './types';\n\nimport styles from './MiniAlert.module.scss';\nimport alertStyles from '../Alerts.module.scss';\n\nexport const MiniAlert = ({\n title,\n variant = 'default',\n iconSlot,\n customTitleColour,\n customIconColour,\n}: MiniAlertProps) => {\n const DefaultIcon = IconMap[variant];\n\n return (\n <FlexRow gap=\"xs\" role=\"status\">\n <FlexRow\n style={assignCssVars({ iconColor: customIconColour })}\n className={buildClassnames([\n alertStyles.icon,\n alertStyles[`${variant}-alert-variant`],\n styles['mini-alert-size'],\n ])}\n >\n {iconSlot || <DefaultIcon role=\"presentation\" />}\n </FlexRow>\n <Text\n variant=\"bodyBold\"\n style={assignCssVars({ textColor: customTitleColour })}\n className={buildClassnames([styles.text, styles[`${variant}-variant`]])}\n >\n {title}\n </Text>\n </FlexRow>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;AAWa,MAAA,SAAS,GAAG,CAAC,EACxB,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MiniAlert.js","sources":["../../../../src/components/Alerts/MiniAlert/MiniAlert.tsx"],"sourcesContent":["import React from 'react';\nimport { buildClassnames, assignCssVars } from '../../../utils';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { IconMap } from '../constants';\nimport { Text } from '../../Text';\n\nimport { MiniAlertProps } from './types';\n\nimport styles from './MiniAlert.module.scss';\nimport alertStyles from '../Alerts.module.scss';\n\nexport const MiniAlert = ({\n title,\n variant = 'default',\n iconSlot,\n customTitleColour,\n customIconColour,\n className,\n ...divProps\n}: MiniAlertProps) => {\n const DefaultIcon = IconMap[variant];\n\n return (\n <FlexRow gap=\"xs\" role=\"status\" {...divProps} className={className}>\n <FlexRow\n style={assignCssVars({ iconColor: customIconColour })}\n className={buildClassnames([\n alertStyles.icon,\n alertStyles[`${variant}-alert-variant`],\n styles['mini-alert-size'],\n ])}\n >\n {iconSlot || <DefaultIcon role=\"presentation\" />}\n </FlexRow>\n <Text\n variant=\"bodyBold\"\n style={assignCssVars({ textColor: customTitleColour })}\n className={buildClassnames([styles.text, styles[`${variant}-variant`]])}\n >\n {title}\n </Text>\n </FlexRow>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;AAWa,MAAA,SAAS,GAAG,CAAC,EACxB,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,EACT,GAAG,QAAQ,EACI,KAAI;AACnB,IAAA,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;AAEpC,IAAA,QACEA,cAAC,CAAA,aAAA,CAAA,OAAO,EAAC,EAAA,GAAG,EAAC,IAAI,EAAC,IAAI,EAAC,QAAQ,EAAK,GAAA,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAA;AAChE,QAAAA,cAAA,CAAA,aAAA,CAAC,OAAO,EACN,EAAA,KAAK,EAAE,aAAa,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,EACrD,SAAS,EAAE,eAAe,CAAC;AACzB,gBAAA,WAAW,CAAC,IAAI;AAChB,gBAAA,WAAW,CAAC,CAAA,EAAG,OAAO,CAAA,cAAA,CAAgB,CAAC;gBACvC,MAAM,CAAC,iBAAiB,CAAC;aAC1B,CAAC,EAAA,EAED,QAAQ,IAAIA,cAAC,CAAA,aAAA,CAAA,WAAW,IAAC,IAAI,EAAC,cAAc,EAAA,CAAG,CACxC;AACV,QAAAA,cAAA,CAAA,aAAA,CAAC,IAAI,EACH,EAAA,OAAO,EAAC,UAAU,EAClB,KAAK,EAAE,aAAa,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC,EACtD,SAAS,EAAE,eAAe,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAG,EAAA,OAAO,CAAU,QAAA,CAAA,CAAC,CAAC,CAAC,EAAA,EAEtE,KAAK,CACD,CACC;AAEd;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { BaseAlertProps } from '../types';
|
|
2
|
-
export type MiniAlertProps = BaseAlertProps & {
|
|
3
|
+
export type MiniAlertProps = React.HTMLAttributes<HTMLDivElement> & BaseAlertProps & {
|
|
3
4
|
customIconColour?: string;
|
|
4
5
|
customTitleColour?: string;
|
|
5
6
|
};
|
|
@@ -1,17 +1,40 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
+
var buildClassnames = require('../../utils/buildClassnames.cjs');
|
|
5
|
+
require('uid/secure');
|
|
6
|
+
var assignCssVars = require('../../utils/assignCssVars.cjs');
|
|
7
|
+
var CriticalIcon = require('../../icons/custom/components/CriticalIcon.cjs');
|
|
4
8
|
var index = require('../../theme/index.cjs');
|
|
5
|
-
var
|
|
9
|
+
var Avatar_module = require('./Avatar.module.scss.cjs');
|
|
10
|
+
var Text = require('../Text/Text.cjs');
|
|
11
|
+
var FlexRow = require('../Flex/FlexRow/FlexRow.cjs');
|
|
6
12
|
|
|
7
13
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
14
|
|
|
9
15
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
const textVariantMapping = {
|
|
18
|
+
md: 'bodySmallBold',
|
|
19
|
+
lg: 'bodySmallBold',
|
|
20
|
+
xl: 'headingSmall',
|
|
21
|
+
xxl: 'headingMedium',
|
|
22
|
+
};
|
|
23
|
+
const Avatar = ({ size = 'lg', name, bgColor, textColor, iconSlot, imageUrl, hasIndicator = false, ariaLabel = `Avatar of ${name}`, className, }) => {
|
|
24
|
+
var _a;
|
|
25
|
+
const textVariant = textVariantMapping[size];
|
|
26
|
+
return (React__default.default.createElement(FlexRow.FlexRow, { justifyContent: "center", className: buildClassnames.buildClassnames([Avatar_module.avatar, Avatar_module[`${size}-size`], className]), style: {
|
|
27
|
+
...assignCssVars.assignCssVars({
|
|
28
|
+
avatarBgColor: iconSlot ? index.theme.colors.neutral.grey.lightest : bgColor,
|
|
29
|
+
avatarTextColor: textColor,
|
|
30
|
+
}),
|
|
31
|
+
}, "aria-label": ariaLabel },
|
|
32
|
+
hasIndicator && (React__default.default.createElement(CriticalIcon.CriticalIcon, { className: Avatar_module.indicatorIcon, color: index.theme.colors.secondary.red.base, fill: index.theme.colors.neutral.grey.lightest, role: "status", "aria-live": "polite", "aria-label": "Avatar has an error" })),
|
|
33
|
+
imageUrl && React__default.default.createElement("img", { src: imageUrl, alt: name, className: Avatar_module.avatarImage }),
|
|
34
|
+
!!iconSlot && iconSlot,
|
|
35
|
+
!imageUrl && !iconSlot && (React__default.default.createElement(Text.Text, { variant: textVariant, className: Avatar_module.avatarText }, (_a = name
|
|
36
|
+
.toUpperCase()
|
|
37
|
+
.match(/(\b\w|\+)/g)) === null || _a === undefined ? undefined : _a.slice(0, 2)))));
|
|
15
38
|
};
|
|
16
39
|
|
|
17
40
|
exports.Avatar = Avatar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.cjs","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"Avatar.cjs","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import React from 'react';\nimport { assignCssVars, buildClassnames } from '../../utils';\nimport { CriticalIcon } from '../../icons/custom/components/CriticalIcon';\nimport { theme } from '../../theme';\nimport styles from './Avatar.module.scss';\nimport { AvatarProps } from './types';\nimport { Text } from '../Text';\nimport { FlexRow } from '../Flex/FlexRow';\n\nconst textVariantMapping: Record<string, any> = {\n md: 'bodySmallBold',\n lg: 'bodySmallBold',\n xl: 'headingSmall',\n xxl: 'headingMedium',\n};\n\nexport const Avatar = ({\n size = 'lg',\n name,\n bgColor,\n textColor,\n iconSlot,\n imageUrl,\n hasIndicator = false,\n ariaLabel = `Avatar of ${name}`,\n className,\n}: AvatarProps) => {\n const textVariant = textVariantMapping[size];\n\n return (\n <FlexRow\n justifyContent=\"center\"\n className={buildClassnames([styles.avatar, styles[`${size}-size`], className])}\n style={\n {\n ...assignCssVars({\n avatarBgColor: iconSlot ? theme.colors.neutral.grey.lightest : bgColor,\n avatarTextColor: textColor,\n }),\n } as React.CSSProperties\n }\n aria-label={ariaLabel}\n >\n {hasIndicator && (\n <CriticalIcon\n className={styles.indicatorIcon}\n color={theme.colors.secondary.red.base}\n fill={theme.colors.neutral.grey.lightest}\n role=\"status\"\n aria-live=\"polite\"\n aria-label=\"Avatar has an error\"\n />\n )}\n {imageUrl && <img src={imageUrl} alt={name} className={styles.avatarImage} />}\n {!!iconSlot && iconSlot}\n {!imageUrl && !iconSlot && (\n <Text variant={textVariant} className={styles.avatarText}>\n {name\n .toUpperCase()\n .match(/(\\b\\w|\\+)/g)\n ?.slice(0, 2)}\n </Text>\n )}\n </FlexRow>\n );\n};\n"],"names":["React","FlexRow","buildClassnames","styles","assignCssVars","theme","CriticalIcon","Text"],"mappings":";;;;;;;;;;;;;;;;AASA,MAAM,kBAAkB,GAAwB;AAC9C,IAAA,EAAE,EAAE,eAAe;AACnB,IAAA,EAAE,EAA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EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAEG,aAAM,CAAC,WAAW,EAAI,CAAA;QAC5E,CAAC,CAAC,QAAQ,IAAI,QAAQ;QACtB,CAAC,QAAQ,IAAI,CAAC,QAAQ,KACrBH,sBAAA,CAAA,aAAA,CAACO,SAAI,EAAC,EAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAEJ,aAAM,CAAC,UAAU,EAAA,EACrD,MAAA;AACE,aAAA,WAAW;AACX,aAAA,KAAK,CAAC,YAAY,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,SAAA,GAAA,SAAA,GAAA,EAAA,CAClB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CACV,CACR,CACO;AAEd;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AvatarProps } from './types';
|
|
3
|
-
export declare const Avatar: ({
|
|
3
|
+
export declare const Avatar: ({ size, name, bgColor, textColor, iconSlot, imageUrl, hasIndicator, ariaLabel, className, }: AvatarProps) => React.JSX.Element;
|
|
@@ -1,11 +1,34 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
+
import { buildClassnames } from '../../utils/buildClassnames.js';
|
|
3
|
+
import 'uid/secure';
|
|
4
|
+
import { assignCssVars } from '../../utils/assignCssVars.js';
|
|
5
|
+
import { CriticalIcon } from '../../icons/custom/components/CriticalIcon.js';
|
|
2
6
|
import { theme } from '../../theme/index.js';
|
|
3
|
-
import
|
|
7
|
+
import styles from './Avatar.module.scss.js';
|
|
8
|
+
import { Text } from '../Text/Text.js';
|
|
9
|
+
import { FlexRow } from '../Flex/FlexRow/FlexRow.js';
|
|
4
10
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
const textVariantMapping = {
|
|
12
|
+
md: 'bodySmallBold',
|
|
13
|
+
lg: 'bodySmallBold',
|
|
14
|
+
xl: 'headingSmall',
|
|
15
|
+
xxl: 'headingMedium',
|
|
16
|
+
};
|
|
17
|
+
const Avatar = ({ size = 'lg', name, bgColor, textColor, iconSlot, imageUrl, hasIndicator = false, ariaLabel = `Avatar of ${name}`, className, }) => {
|
|
18
|
+
var _a;
|
|
19
|
+
const textVariant = textVariantMapping[size];
|
|
20
|
+
return (React__default.createElement(FlexRow, { justifyContent: "center", className: buildClassnames([styles.avatar, styles[`${size}-size`], className]), style: {
|
|
21
|
+
...assignCssVars({
|
|
22
|
+
avatarBgColor: iconSlot ? theme.colors.neutral.grey.lightest : bgColor,
|
|
23
|
+
avatarTextColor: textColor,
|
|
24
|
+
}),
|
|
25
|
+
}, "aria-label": ariaLabel },
|
|
26
|
+
hasIndicator && (React__default.createElement(CriticalIcon, { className: styles.indicatorIcon, color: theme.colors.secondary.red.base, fill: theme.colors.neutral.grey.lightest, role: "status", "aria-live": "polite", "aria-label": "Avatar has an error" })),
|
|
27
|
+
imageUrl && React__default.createElement("img", { src: imageUrl, alt: name, className: styles.avatarImage }),
|
|
28
|
+
!!iconSlot && iconSlot,
|
|
29
|
+
!imageUrl && !iconSlot && (React__default.createElement(Text, { variant: textVariant, className: styles.avatarText }, (_a = name
|
|
30
|
+
.toUpperCase()
|
|
31
|
+
.match(/(\b\w|\+)/g)) === null || _a === undefined ? undefined : _a.slice(0, 2)))));
|
|
9
32
|
};
|
|
10
33
|
|
|
11
34
|
export { Avatar };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"Avatar.js","sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import React from 'react';\nimport { assignCssVars, buildClassnames } from '../../utils';\nimport { CriticalIcon } from '../../icons/custom/components/CriticalIcon';\nimport { theme } from '../../theme';\nimport styles from './Avatar.module.scss';\nimport { AvatarProps } from './types';\nimport { Text } from '../Text';\nimport { FlexRow } from '../Flex/FlexRow';\n\nconst textVariantMapping: Record<string, any> = {\n md: 'bodySmallBold',\n lg: 'bodySmallBold',\n xl: 'headingSmall',\n xxl: 'headingMedium',\n};\n\nexport const Avatar = ({\n size = 'lg',\n name,\n bgColor,\n textColor,\n iconSlot,\n imageUrl,\n hasIndicator = false,\n ariaLabel = `Avatar of ${name}`,\n className,\n}: AvatarProps) => {\n const textVariant = textVariantMapping[size];\n\n return (\n <FlexRow\n justifyContent=\"center\"\n className={buildClassnames([styles.avatar, styles[`${size}-size`], className])}\n style={\n {\n ...assignCssVars({\n avatarBgColor: iconSlot ? theme.colors.neutral.grey.lightest : bgColor,\n avatarTextColor: textColor,\n }),\n } as React.CSSProperties\n }\n aria-label={ariaLabel}\n >\n {hasIndicator && (\n <CriticalIcon\n className={styles.indicatorIcon}\n color={theme.colors.secondary.red.base}\n fill={theme.colors.neutral.grey.lightest}\n role=\"status\"\n aria-live=\"polite\"\n aria-label=\"Avatar has an error\"\n />\n )}\n {imageUrl && <img src={imageUrl} alt={name} className={styles.avatarImage} />}\n {!!iconSlot && iconSlot}\n {!imageUrl && !iconSlot && (\n <Text variant={textVariant} className={styles.avatarText}>\n {name\n .toUpperCase()\n .match(/(\\b\\w|\\+)/g)\n ?.slice(0, 2)}\n </Text>\n )}\n </FlexRow>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;AASA,MAAM,kBAAkB,GAAwB;AAC9C,IAAA,EAAE,EAAE,eAAe;AACnB,IAAA,EAAE,EAAE,eAAe;AACnB,IAAA,EAAE,EAAE,cAAc;AAClB,IAAA,GAAG,EAAE,eAAe;CACrB;AAEM,MAAM,MAAM,GAAG,CAAC,EACrB,IAAI,GAAG,IAAI,EACX,IAAI,EACJ,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,YAAY,GAAG,KAAK,EACpB,SAAS,GAAG,CAAA,UAAA,EAAa,IAAI,CAAE,CAAA,EAC/B,SAAS,GACG,KAAI;;AAChB,IAAA,MAAM,WAAW,GAAG,kBAAkB,CAAC,IAAI,CAAC;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AAA,SAAA,GAAA,EAAA,CAClB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CACV,CACR,CACO;AAEd;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ___$insertStyle = require('../../_virtual/____insertStyle.cjs');
|
|
4
|
+
|
|
5
|
+
___$insertStyle("._avatar_1oval_1 {\n border: var(--sizes-line) solid var(--colors-neutral-grey-base);\n border-radius: var(--radius-full);\n background-size: cover;\n background-color: var(--avatar-bg-color, var(--colors-secondary-blue-base));\n position: relative;\n width: var(--avatar-size, var(--sizes-lg));\n height: var(--avatar-size, var(--sizes-lg));\n}\n\n._avatarImage_1oval_11 {\n width: 100%;\n height: 100%;\n border-radius: var(--radius-full);\n object-fit: cover;\n}\n\n._avatarText_1oval_18 {\n color: var(--avatar-text-color, #fff) !important;\n}\n\n._indicatorIcon_1oval_22 {\n position: absolute;\n /* Calculate offset as roughly 30% of icon size, with fallback */\n top: calc(-0.3 * var(--indicator-icon-size, 16px));\n right: calc(-0.3 * var(--indicator-icon-size, 16px));\n width: var(--indicator-icon-size, var(--sizes-lg));\n height: var(--indicator-icon-size, var(--sizes-lg));\n}\n\n._md-size_1oval_31 {\n --avatar-size: var(--sizes-md);\n --indicator-icon-size: var(--sizes-3);\n}\n\n._lg-size_1oval_36 {\n --avatar-size: var(--sizes-lg);\n --indicator-icon-size: var(--sizes-base);\n}\n\n._xl-size_1oval_41 {\n --avatar-size: var(--sizes-xl);\n --indicator-icon-size: var(--sizes-7);\n}\n\n._xxl-size_1oval_46 {\n --avatar-size: var(--sizes-xxl);\n --indicator-icon-size: var(--sizes-lg);\n}");
|
|
6
|
+
var styles = {"avatar":"_avatar_1oval_1","avatarImage":"_avatarImage_1oval_11","avatarText":"_avatarText_1oval_18","indicatorIcon":"_indicatorIcon_1oval_22","md-size":"_md-size_1oval_31","lg-size":"_lg-size_1oval_36","xl-size":"_xl-size_1oval_41","xxl-size":"_xxl-size_1oval_46"};
|
|
7
|
+
|
|
8
|
+
module.exports = styles;
|
|
9
|
+
//# sourceMappingURL=Avatar.module.scss.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.module.scss.cjs","sources":["../../../src/components/Avatar/Avatar.module.scss"],"sourcesContent":[".avatar {\n border: var(--sizes-line) solid var(--colors-neutral-grey-base);\n border-radius: var(--radius-full);\n background-size: cover;\n background-color: var(--avatar-bg-color, var(--colors-secondary-blue-base));\n position: relative;\n width: var(--avatar-size, var(--sizes-lg));\n height: var(--avatar-size, var(--sizes-lg));\n}\n\n.avatarImage {\n width: 100%;\n height: 100%;\n border-radius: var(--radius-full);\n object-fit: cover;\n}\n\n.avatarText {\n color: var(--avatar-text-color, #fff) !important;\n}\n\n.indicatorIcon {\n position: absolute;\n /* Calculate offset as roughly 30% of icon size, with fallback */\n top: calc(-0.3 * var(--indicator-icon-size, 16px));\n right: calc(-0.3 * var(--indicator-icon-size, 16px));\n width: var(--indicator-icon-size, var(--sizes-lg));\n height: var(--indicator-icon-size, var(--sizes-lg));\n}\n\n.md-size {\n --avatar-size: var(--sizes-md);\n --indicator-icon-size: var(--sizes-3);\n}\n\n.lg-size {\n --avatar-size: var(--sizes-lg);\n --indicator-icon-size: var(--sizes-base);\n}\n\n.xl-size {\n --avatar-size: var(--sizes-xl);\n --indicator-icon-size: var(--sizes-7);\n}\n\n.xxl-size {\n --avatar-size: var(--sizes-xxl);\n --indicator-icon-size: var(--sizes-lg);\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,mzCAAA;AACA,aAAA,CAAA,QAAA,CAAA,iBAAA,CAAA,aAAA,CAAA,uBAAA,CAAA,YAAA,CAAA,sBAAA,CAAA,eAAA,CAAA,yBAAA,CAAA,SAAA,CAAA,mBAAA,CAAA,SAAA,CAAA,mBAAA,CAAA,SAAA,CAAA,mBAAA,CAAA,UAAA,CAAA,oBAAA;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import insertStyle from '../../_virtual/____insertStyle.js';
|
|
2
|
+
|
|
3
|
+
insertStyle("._avatar_1oval_1 {\n border: var(--sizes-line) solid var(--colors-neutral-grey-base);\n border-radius: var(--radius-full);\n background-size: cover;\n background-color: var(--avatar-bg-color, var(--colors-secondary-blue-base));\n position: relative;\n width: var(--avatar-size, var(--sizes-lg));\n height: var(--avatar-size, var(--sizes-lg));\n}\n\n._avatarImage_1oval_11 {\n width: 100%;\n height: 100%;\n border-radius: var(--radius-full);\n object-fit: cover;\n}\n\n._avatarText_1oval_18 {\n color: var(--avatar-text-color, #fff) !important;\n}\n\n._indicatorIcon_1oval_22 {\n position: absolute;\n /* Calculate offset as roughly 30% of icon size, with fallback */\n top: calc(-0.3 * var(--indicator-icon-size, 16px));\n right: calc(-0.3 * var(--indicator-icon-size, 16px));\n width: var(--indicator-icon-size, var(--sizes-lg));\n height: var(--indicator-icon-size, var(--sizes-lg));\n}\n\n._md-size_1oval_31 {\n --avatar-size: var(--sizes-md);\n --indicator-icon-size: var(--sizes-3);\n}\n\n._lg-size_1oval_36 {\n --avatar-size: var(--sizes-lg);\n --indicator-icon-size: var(--sizes-base);\n}\n\n._xl-size_1oval_41 {\n --avatar-size: var(--sizes-xl);\n --indicator-icon-size: var(--sizes-7);\n}\n\n._xxl-size_1oval_46 {\n --avatar-size: var(--sizes-xxl);\n --indicator-icon-size: var(--sizes-lg);\n}");
|
|
4
|
+
var styles = {"avatar":"_avatar_1oval_1","avatarImage":"_avatarImage_1oval_11","avatarText":"_avatarText_1oval_18","indicatorIcon":"_indicatorIcon_1oval_22","md-size":"_md-size_1oval_31","lg-size":"_lg-size_1oval_36","xl-size":"_xl-size_1oval_41","xxl-size":"_xxl-size_1oval_46"};
|
|
5
|
+
|
|
6
|
+
export { styles as default };
|
|
7
|
+
//# sourceMappingURL=Avatar.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.module.scss.js","sources":["../../../src/components/Avatar/Avatar.module.scss"],"sourcesContent":[".avatar {\n border: var(--sizes-line) solid var(--colors-neutral-grey-base);\n border-radius: var(--radius-full);\n background-size: cover;\n background-color: var(--avatar-bg-color, var(--colors-secondary-blue-base));\n position: relative;\n width: var(--avatar-size, var(--sizes-lg));\n height: var(--avatar-size, var(--sizes-lg));\n}\n\n.avatarImage {\n width: 100%;\n height: 100%;\n border-radius: var(--radius-full);\n object-fit: cover;\n}\n\n.avatarText {\n color: var(--avatar-text-color, #fff) !important;\n}\n\n.indicatorIcon {\n position: absolute;\n /* Calculate offset as roughly 30% of icon size, with fallback */\n top: calc(-0.3 * var(--indicator-icon-size, 16px));\n right: calc(-0.3 * var(--indicator-icon-size, 16px));\n width: var(--indicator-icon-size, var(--sizes-lg));\n height: var(--indicator-icon-size, var(--sizes-lg));\n}\n\n.md-size {\n --avatar-size: var(--sizes-md);\n --indicator-icon-size: var(--sizes-3);\n}\n\n.lg-size {\n --avatar-size: var(--sizes-lg);\n --indicator-icon-size: var(--sizes-base);\n}\n\n.xl-size {\n --avatar-size: var(--sizes-xl);\n --indicator-icon-size: var(--sizes-7);\n}\n\n.xxl-size {\n --avatar-size: var(--sizes-xxl);\n --indicator-icon-size: var(--sizes-lg);\n}\n"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,mzCAAA;AACA,aAAA,CAAA,QAAA,CAAA,iBAAA,CAAA,aAAA,CAAA,uBAAA,CAAA,YAAA,CAAA,sBAAA,CAAA,eAAA,CAAA,yBAAA,CAAA,SAAA,CAAA,mBAAA,CAAA,SAAA,CAAA,mBAAA,CAAA,SAAA,CAAA,mBAAA,CAAA,UAAA,CAAA,oBAAA;;;;"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare enum AvatarSize {
|
|
3
|
+
md = "md",
|
|
4
|
+
lg = "lg",
|
|
5
|
+
xl = "xl",
|
|
6
|
+
xxl = "xxl"
|
|
7
|
+
}
|
|
8
|
+
export type AvatarProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
2
9
|
name: string;
|
|
3
|
-
|
|
10
|
+
size?: keyof typeof AvatarSize;
|
|
4
11
|
bgColor?: string;
|
|
5
12
|
textColor?: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
13
|
+
iconSlot?: React.ReactNode;
|
|
14
|
+
imageUrl?: string;
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
hasIndicator?: boolean;
|
|
17
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AvatarProps } from '../Avatar/types';
|
|
3
|
+
type AvatarGroupProps = React.HTMLAttributes<HTMLUListElement> & {
|
|
4
|
+
avatars: Omit<AvatarProps, 'hasIndicator'>[];
|
|
5
|
+
maxVisible?: number;
|
|
6
|
+
compact?: boolean;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
hasIndicator?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const AvatarGroup: ({ avatars, maxVisible, compact, ariaLabel, hasIndicator, className, ...listProps }: AvatarGroupProps) => React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AvatarGroup } from './AvatarGroup';
|
|
@@ -14,9 +14,9 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
16
|
|
|
17
|
-
const ListItem = ({ id, label, href, appearance = 'primary', ...props }) => {
|
|
17
|
+
const ListItem = ({ id, label, href, appearance = 'primary', className, ...props }) => {
|
|
18
18
|
const idComputed = useId.useId({ id, prefix: 'list-item' });
|
|
19
|
-
return (React__default.default.createElement(reactAriaComponents.ListBoxItem, { id: idComputed, textValue: label, href: href, className: buildClassnames.buildClassnames([ListItem_module.listItem, ListItem_module[`appearance-${appearance}`]]), ...props }, ({ selectionMode, allowsDragging, isSelected }) => (React__default.default.createElement(ListItemContent.ListItemContent, { selectionMode: selectionMode, allowsDragging: allowsDragging, isSelected: isSelected, label: label, isLink: Boolean(href), appearance: appearance, ...props }))));
|
|
19
|
+
return (React__default.default.createElement(reactAriaComponents.ListBoxItem, { id: idComputed, textValue: label, href: href, className: buildClassnames.buildClassnames([ListItem_module.listItem, ListItem_module[`appearance-${appearance}`], className]), ...props }, ({ selectionMode, allowsDragging, isSelected }) => (React__default.default.createElement(ListItemContent.ListItemContent, { selectionMode: selectionMode, allowsDragging: allowsDragging, isSelected: isSelected, label: label, isLink: Boolean(href), appearance: appearance, ...props }))));
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
exports.ListItem = ListItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.cjs","sources":["../../../../src/components/SelectDropdown/ListItem/ListItem.tsx"],"sourcesContent":["import React from 'react';\nimport { ListBoxItem, ListBoxItemRenderProps } from 'react-aria-components';\nimport { useId } from '../../../hooks';\nimport { ListItemProps } from './types';\nimport { ListItemContent } from './components/ListItemContent';\nimport styles from './ListItem.module.scss';\nimport { buildClassnames } from '../../../utils';\n\nexport const ListItem = ({
|
|
1
|
+
{"version":3,"file":"ListItem.cjs","sources":["../../../../src/components/SelectDropdown/ListItem/ListItem.tsx"],"sourcesContent":["import React from 'react';\nimport { ListBoxItem, ListBoxItemRenderProps } from 'react-aria-components';\nimport { useId } from '../../../hooks';\nimport { ListItemProps } from './types';\nimport { ListItemContent } from './components/ListItemContent';\nimport styles from './ListItem.module.scss';\nimport { buildClassnames } from '../../../utils';\n\nexport const ListItem = ({\n id,\n label,\n href,\n appearance = 'primary',\n className,\n ...props\n}: ListItemProps) => {\n const idComputed = useId({ id, prefix: 'list-item' });\n\n return (\n <ListBoxItem\n id={idComputed}\n textValue={label}\n href={href}\n className={buildClassnames([styles.listItem, styles[`appearance-${appearance}`], className])}\n {...props}\n >\n {/* use react aria's render props to add more such as isHovered */}\n {({ selectionMode, allowsDragging, isSelected }: ListBoxItemRenderProps) => (\n <ListItemContent\n selectionMode={selectionMode}\n allowsDragging={allowsDragging}\n isSelected={isSelected}\n label={label}\n isLink={Boolean(href)}\n appearance={appearance}\n {...props}\n />\n )}\n </ListBoxItem>\n );\n};\n"],"names":["useId","React","ListBoxItem","buildClassnames","styles","ListItemContent"],"mappings":";;;;;;;;;;;;;;;;MAQa,QAAQ,GAAG,CAAC,EACvB,EAAE,EACF,KAAK,EACL,IAAI,EACJ,UAAU,GAAG,SAAS,EACtB,SAAS,EACT,GAAG,KAAK,EACM,KAAI;AAClB,IAAA,MAAM,UAAU,GAAGA,WAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AAErD,IAAA,QACEC,sBAAC,CAAA,aAAA,CAAAC,+BAAW,IACV,EAAE,EAAE,UAAU,EACd,SAAS,EAAE,KAAK,EAChB,IAAI,EAAE,IAAI,EACV,SAAS,EAAEC,+BAAe,CAAC,CAACC,eAAM,CAAC,QAAQ,EAAEA,eAAM,CAAC,CAAA,WAAA,EAAc,UAAU,CAAE,CAAA,CAAC,EAAE,SAAS,CAAC,CAAC,EAAA,GACxF,KAAK,EAGR,EAAA,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAA0B,MACrEH,qCAACI,+BAAe,EAAA,EACd,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EACrB,UAAU,EAAE,UAAU,EAClB,GAAA,KAAK,GACT,CACH,CACW;AAElB;;;;"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ListItemProps } from './types';
|
|
3
|
-
export declare const ListItem: ({ id, label, href, appearance, ...props }: ListItemProps) => React.JSX.Element;
|
|
3
|
+
export declare const ListItem: ({ id, label, href, appearance, className, ...props }: ListItemProps) => React.JSX.Element;
|
|
@@ -8,9 +8,9 @@ import styles from './ListItem.module.scss.js';
|
|
|
8
8
|
import { buildClassnames } from '../../../utils/buildClassnames.js';
|
|
9
9
|
import 'uid/secure';
|
|
10
10
|
|
|
11
|
-
const ListItem = ({ id, label, href, appearance = 'primary', ...props }) => {
|
|
11
|
+
const ListItem = ({ id, label, href, appearance = 'primary', className, ...props }) => {
|
|
12
12
|
const idComputed = useId({ id, prefix: 'list-item' });
|
|
13
|
-
return (React__default.createElement(ListBoxItem, { id: idComputed, textValue: label, href: href, className: buildClassnames([styles.listItem, styles[`appearance-${appearance}`]]), ...props }, ({ selectionMode, allowsDragging, isSelected }) => (React__default.createElement(ListItemContent, { selectionMode: selectionMode, allowsDragging: allowsDragging, isSelected: isSelected, label: label, isLink: Boolean(href), appearance: appearance, ...props }))));
|
|
13
|
+
return (React__default.createElement(ListBoxItem, { id: idComputed, textValue: label, href: href, className: buildClassnames([styles.listItem, styles[`appearance-${appearance}`], className]), ...props }, ({ selectionMode, allowsDragging, isSelected }) => (React__default.createElement(ListItemContent, { selectionMode: selectionMode, allowsDragging: allowsDragging, isSelected: isSelected, label: label, isLink: Boolean(href), appearance: appearance, ...props }))));
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export { ListItem };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","sources":["../../../../src/components/SelectDropdown/ListItem/ListItem.tsx"],"sourcesContent":["import React from 'react';\nimport { ListBoxItem, ListBoxItemRenderProps } from 'react-aria-components';\nimport { useId } from '../../../hooks';\nimport { ListItemProps } from './types';\nimport { ListItemContent } from './components/ListItemContent';\nimport styles from './ListItem.module.scss';\nimport { buildClassnames } from '../../../utils';\n\nexport const ListItem = ({
|
|
1
|
+
{"version":3,"file":"ListItem.js","sources":["../../../../src/components/SelectDropdown/ListItem/ListItem.tsx"],"sourcesContent":["import React from 'react';\nimport { ListBoxItem, ListBoxItemRenderProps } from 'react-aria-components';\nimport { useId } from '../../../hooks';\nimport { ListItemProps } from './types';\nimport { ListItemContent } from './components/ListItemContent';\nimport styles from './ListItem.module.scss';\nimport { buildClassnames } from '../../../utils';\n\nexport const ListItem = ({\n id,\n label,\n href,\n appearance = 'primary',\n className,\n ...props\n}: ListItemProps) => {\n const idComputed = useId({ id, prefix: 'list-item' });\n\n return (\n <ListBoxItem\n id={idComputed}\n textValue={label}\n href={href}\n className={buildClassnames([styles.listItem, styles[`appearance-${appearance}`], className])}\n {...props}\n >\n {/* use react aria's render props to add more such as isHovered */}\n {({ selectionMode, allowsDragging, isSelected }: ListBoxItemRenderProps) => (\n <ListItemContent\n selectionMode={selectionMode}\n allowsDragging={allowsDragging}\n isSelected={isSelected}\n label={label}\n isLink={Boolean(href)}\n appearance={appearance}\n {...props}\n />\n )}\n </ListBoxItem>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;MAQa,QAAQ,GAAG,CAAC,EACvB,EAAE,EACF,KAAK,EACL,IAAI,EACJ,UAAU,GAAG,SAAS,EACtB,SAAS,EACT,GAAG,KAAK,EACM,KAAI;AAClB,IAAA,MAAM,UAAU,GAAG,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AAErD,IAAA,QACEA,cAAC,CAAA,aAAA,CAAA,WAAW,IACV,EAAE,EAAE,UAAU,EACd,SAAS,EAAE,KAAK,EAChB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,eAAe,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA,WAAA,EAAc,UAAU,CAAE,CAAA,CAAC,EAAE,SAAS,CAAC,CAAC,EAAA,GACxF,KAAK,EAGR,EAAA,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAA0B,MACrEA,6BAAC,eAAe,EAAA,EACd,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EACrB,UAAU,EAAE,UAAU,EAClB,GAAA,KAAK,GACT,CACH,CACW;AAElB;;;;"}
|
|
@@ -7,12 +7,14 @@ var FlexCol = require('../../Flex/FlexCol/FlexCol.cjs');
|
|
|
7
7
|
var Text = require('../../Text/Text.cjs');
|
|
8
8
|
var ListItem = require('../ListItem/ListItem.cjs');
|
|
9
9
|
var ListItemSection_module = require('./ListItemSection.module.scss.cjs');
|
|
10
|
+
var buildClassnames = require('../../../utils/buildClassnames.cjs');
|
|
11
|
+
require('uid/secure');
|
|
10
12
|
|
|
11
13
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
14
|
|
|
13
15
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
16
|
|
|
15
|
-
const ListItemSection = ({ label, hint, itemInfoSlot, items, children, ...props }) => (React__default.default.createElement(reactAriaComponents.Section, { className: ListItemSection_module.section, ...props },
|
|
17
|
+
const ListItemSection = ({ label, hint, itemInfoSlot, items, children, className, ...props }) => (React__default.default.createElement(reactAriaComponents.Section, { className: buildClassnames.buildClassnames([ListItemSection_module.section, className]), ...props },
|
|
16
18
|
React__default.default.createElement(reactAriaComponents.Header, null,
|
|
17
19
|
React__default.default.createElement(FlexCol.FlexCol, { gap: "xs" },
|
|
18
20
|
React__default.default.createElement(FlexRow.FlexRow, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemSection.cjs","sources":["../../../../src/components/SelectDropdown/ListItemSection/ListItemSection.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport { Collection, Header, Section, SectionProps } from 'react-aria-components';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { FlexCol } from '../../Flex/FlexCol';\nimport { Text as VeeqoText } from '../../Text';\nimport { ListItemProps } from '../ListItem/types';\nimport { ListItem } from '../ListItem/ListItem';\nimport styles from './ListItemSection.module.scss';\n\nexport type ListItemSectionProps = Omit<SectionProps<ListItemProps>, 'items'> & {\n label: string;\n hint?: string;\n itemInfoSlot?: ReactElement;\n items?: ListItemProps[];\n};\n\nexport const ListItemSection = ({\n label,\n hint,\n itemInfoSlot,\n items,\n children,\n ...props\n}: ListItemSectionProps) => (\n <Section className={styles.section} {...props}>\n <Header>\n <FlexCol gap=\"xs\">\n <FlexRow>\n <VeeqoText variant=\"body\">{label}</VeeqoText>\n {itemInfoSlot}\n </FlexRow>\n {hint && <VeeqoText variant=\"hintText\">{hint}</VeeqoText>}\n </FlexCol>\n </Header>\n {children}\n {items && (\n <Collection items={items}>{(item: ListItemProps) => <ListItem {...item} />}</Collection>\n )}\n </Section>\n);\n"],"names":["React","Section","styles","Header","FlexCol","FlexRow","VeeqoText","Collection","ListItem"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItemSection.cjs","sources":["../../../../src/components/SelectDropdown/ListItemSection/ListItemSection.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport { Collection, Header, Section, SectionProps } from 'react-aria-components';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { FlexCol } from '../../Flex/FlexCol';\nimport { Text as VeeqoText } from '../../Text';\nimport { ListItemProps } from '../ListItem/types';\nimport { ListItem } from '../ListItem/ListItem';\nimport styles from './ListItemSection.module.scss';\nimport { buildClassnames } from '../../../utils';\n\nexport type ListItemSectionProps = Omit<SectionProps<ListItemProps>, 'items'> & {\n label: string;\n hint?: string;\n itemInfoSlot?: ReactElement;\n items?: ListItemProps[];\n};\n\nexport const ListItemSection = ({\n label,\n hint,\n itemInfoSlot,\n items,\n children,\n className,\n ...props\n}: ListItemSectionProps) => (\n <Section className={buildClassnames([styles.section, className])} {...props}>\n <Header>\n <FlexCol gap=\"xs\">\n <FlexRow>\n <VeeqoText variant=\"body\">{label}</VeeqoText>\n {itemInfoSlot}\n </FlexRow>\n {hint && <VeeqoText variant=\"hintText\">{hint}</VeeqoText>}\n </FlexCol>\n </Header>\n {children}\n {items && (\n <Collection items={items}>{(item: ListItemProps) => <ListItem {...item} />}</Collection>\n )}\n </Section>\n);\n"],"names":["React","Section","buildClassnames","styles","Header","FlexCol","FlexRow","VeeqoText","Collection","ListItem"],"mappings":";;;;;;;;;;;;;;;;AAiBa,MAAA,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACa,MACrBA,qCAACC,2BAAO,EAAA,EAAC,SAAS,EAAEC,+BAAe,CAAC,CAACC,sBAAM,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,KAAM,KAAK,EAAA;AACzE,IAAAH,sBAAA,CAAA,aAAA,CAACI,0BAAM,EAAA,IAAA;AACL,QAAAJ,sBAAA,CAAA,aAAA,CAACK,eAAO,EAAA,EAAC,GAAG,EAAC,IAAI,EAAA;AACf,YAAAL,sBAAA,CAAA,aAAA,CAACM,eAAO,EAAA,IAAA;AACN,gBAAAN,sBAAA,CAAA,aAAA,CAACO,SAAS,EAAC,EAAA,OAAO,EAAC,MAAM,EAAA,EAAE,KAAK,CAAa;AAC5C,gBAAA,YAAY,CACL;YACT,IAAI,IAAIP,sBAAC,CAAA,aAAA,CAAAO,SAAS,EAAC,EAAA,OAAO,EAAC,UAAU,EAAE,EAAA,IAAI,CAAa,CACjD,CACH;IACR,QAAQ;IACR,KAAK,KACJP,sBAAC,CAAA,aAAA,CAAAQ,8BAAU,IAAC,KAAK,EAAE,KAAK,EAAA,EAAG,CAAC,IAAmB,KAAKR,sBAAC,CAAA,aAAA,CAAAS,iBAAQ,EAAK,EAAA,GAAA,IAAI,GAAI,CAAc,CACzF,CACO;;;;"}
|
|
@@ -7,4 +7,4 @@ export type ListItemSectionProps = Omit<SectionProps<ListItemProps>, 'items'> &
|
|
|
7
7
|
itemInfoSlot?: ReactElement;
|
|
8
8
|
items?: ListItemProps[];
|
|
9
9
|
};
|
|
10
|
-
export declare const ListItemSection: ({ label, hint, itemInfoSlot, items, children, ...props }: ListItemSectionProps) => React.JSX.Element;
|
|
10
|
+
export declare const ListItemSection: ({ label, hint, itemInfoSlot, items, children, className, ...props }: ListItemSectionProps) => React.JSX.Element;
|
|
@@ -5,8 +5,10 @@ import { FlexCol } from '../../Flex/FlexCol/FlexCol.js';
|
|
|
5
5
|
import { Text } from '../../Text/Text.js';
|
|
6
6
|
import { ListItem } from '../ListItem/ListItem.js';
|
|
7
7
|
import styles from './ListItemSection.module.scss.js';
|
|
8
|
+
import { buildClassnames } from '../../../utils/buildClassnames.js';
|
|
9
|
+
import 'uid/secure';
|
|
8
10
|
|
|
9
|
-
const ListItemSection = ({ label, hint, itemInfoSlot, items, children, ...props }) => (React__default.createElement(Section, { className: styles.section, ...props },
|
|
11
|
+
const ListItemSection = ({ label, hint, itemInfoSlot, items, children, className, ...props }) => (React__default.createElement(Section, { className: buildClassnames([styles.section, className]), ...props },
|
|
10
12
|
React__default.createElement(Header, null,
|
|
11
13
|
React__default.createElement(FlexCol, { gap: "xs" },
|
|
12
14
|
React__default.createElement(FlexRow, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemSection.js","sources":["../../../../src/components/SelectDropdown/ListItemSection/ListItemSection.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport { Collection, Header, Section, SectionProps } from 'react-aria-components';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { FlexCol } from '../../Flex/FlexCol';\nimport { Text as VeeqoText } from '../../Text';\nimport { ListItemProps } from '../ListItem/types';\nimport { ListItem } from '../ListItem/ListItem';\nimport styles from './ListItemSection.module.scss';\n\nexport type ListItemSectionProps = Omit<SectionProps<ListItemProps>, 'items'> & {\n label: string;\n hint?: string;\n itemInfoSlot?: ReactElement;\n items?: ListItemProps[];\n};\n\nexport const ListItemSection = ({\n label,\n hint,\n itemInfoSlot,\n items,\n children,\n ...props\n}: ListItemSectionProps) => (\n <Section className={styles.section} {...props}>\n <Header>\n <FlexCol gap=\"xs\">\n <FlexRow>\n <VeeqoText variant=\"body\">{label}</VeeqoText>\n {itemInfoSlot}\n </FlexRow>\n {hint && <VeeqoText variant=\"hintText\">{hint}</VeeqoText>}\n </FlexCol>\n </Header>\n {children}\n {items && (\n <Collection items={items}>{(item: ListItemProps) => <ListItem {...item} />}</Collection>\n )}\n </Section>\n);\n"],"names":["React","VeeqoText"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItemSection.js","sources":["../../../../src/components/SelectDropdown/ListItemSection/ListItemSection.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport { Collection, Header, Section, SectionProps } from 'react-aria-components';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { FlexCol } from '../../Flex/FlexCol';\nimport { Text as VeeqoText } from '../../Text';\nimport { ListItemProps } from '../ListItem/types';\nimport { ListItem } from '../ListItem/ListItem';\nimport styles from './ListItemSection.module.scss';\nimport { buildClassnames } from '../../../utils';\n\nexport type ListItemSectionProps = Omit<SectionProps<ListItemProps>, 'items'> & {\n label: string;\n hint?: string;\n itemInfoSlot?: ReactElement;\n items?: ListItemProps[];\n};\n\nexport const ListItemSection = ({\n label,\n hint,\n itemInfoSlot,\n items,\n children,\n className,\n ...props\n}: ListItemSectionProps) => (\n <Section className={buildClassnames([styles.section, className])} {...props}>\n <Header>\n <FlexCol gap=\"xs\">\n <FlexRow>\n <VeeqoText variant=\"body\">{label}</VeeqoText>\n {itemInfoSlot}\n </FlexRow>\n {hint && <VeeqoText variant=\"hintText\">{hint}</VeeqoText>}\n </FlexCol>\n </Header>\n {children}\n {items && (\n <Collection items={items}>{(item: ListItemProps) => <ListItem {...item} />}</Collection>\n )}\n </Section>\n);\n"],"names":["React","VeeqoText"],"mappings":";;;;;;;;;;AAiBa,MAAA,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACa,MACrBA,6BAAC,OAAO,EAAA,EAAC,SAAS,EAAE,eAAe,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,KAAM,KAAK,EAAA;AACzE,IAAAA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAA,IAAA;AACL,QAAAA,cAAA,CAAA,aAAA,CAAC,OAAO,EAAA,EAAC,GAAG,EAAC,IAAI,EAAA;AACf,YAAAA,cAAA,CAAA,aAAA,CAAC,OAAO,EAAA,IAAA;AACN,gBAAAA,cAAA,CAAA,aAAA,CAACC,IAAS,EAAC,EAAA,OAAO,EAAC,MAAM,EAAA,EAAE,KAAK,CAAa;AAC5C,gBAAA,YAAY,CACL;YACT,IAAI,IAAID,cAAC,CAAA,aAAA,CAAAC,IAAS,EAAC,EAAA,OAAO,EAAC,UAAU,EAAE,EAAA,IAAI,CAAa,CACjD,CACH;IACR,QAAQ;IACR,KAAK,KACJD,cAAC,CAAA,aAAA,CAAA,UAAU,IAAC,KAAK,EAAE,KAAK,EAAA,EAAG,CAAC,IAAmB,KAAKA,cAAC,CAAA,aAAA,CAAA,QAAQ,EAAK,EAAA,GAAA,IAAI,GAAI,CAAc,CACzF,CACO;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
|
|
5
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
6
|
+
|
|
7
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
8
|
+
|
|
9
|
+
const CriticalIcon = ({ fill, ...props }) => (React__default.default.createElement("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props },
|
|
10
|
+
React__default.default.createElement("circle", { cx: 8, cy: 8, r: 6, fill: fill }),
|
|
11
|
+
React__default.default.createElement("path", { d: "M8 1.33334C4.32 1.33334 1.33334 4.32001 1.33334 8.00001C1.33334 11.68 4.32 14.6667 8 14.6667C11.68 14.6667 14.6667 11.68 14.6667 8.00001C14.6667 4.32001 11.68 1.33334 8 1.33334ZM8.66667 11.3333H7.33334V10H8.66667V11.3333ZM8.66667 8.66668H7.33334V4.66668H8.66667V8.66668Z", fill: "currentColor" })));
|
|
12
|
+
|
|
13
|
+
exports.CriticalIcon = CriticalIcon;
|
|
14
|
+
//# sourceMappingURL=CriticalIcon.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CriticalIcon.cjs","sources":["../../../../src/icons/custom/components/CriticalIcon.tsx"],"sourcesContent":["import React from 'react';\nimport { IconComponentProps } from 'src/icons/types';\n\nexport const CriticalIcon = ({ fill, ...props }: IconComponentProps) => (\n <svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <circle cx={8} cy={8} r={6} fill={fill} />\n <path\n d=\"M8 1.33334C4.32 1.33334 1.33334 4.32001 1.33334 8.00001C1.33334 11.68 4.32 14.6667 8 14.6667C11.68 14.6667 14.6667 11.68 14.6667 8.00001C14.6667 4.32001 11.68 1.33334 8 1.33334ZM8.66667 11.3333H7.33334V10H8.66667V11.3333ZM8.66667 8.66668H7.33334V4.66668H8.66667V8.66668Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n"],"names":["React"],"mappings":";;;;;;;;AAGO,MAAM,YAAY,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAsB,MACjEA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,EAAA,GAAK,KAAK,EAAA;AAC/E,IAAAA,sBAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAQ,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAI,CAAA;IAC1CA,sBACE,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,gRAAgR,EAClR,IAAI,EAAC,cAAc,EAAA,CACnB,CACE;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
const CriticalIcon = ({ fill, ...props }) => (React__default.createElement("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props },
|
|
4
|
+
React__default.createElement("circle", { cx: 8, cy: 8, r: 6, fill: fill }),
|
|
5
|
+
React__default.createElement("path", { d: "M8 1.33334C4.32 1.33334 1.33334 4.32001 1.33334 8.00001C1.33334 11.68 4.32 14.6667 8 14.6667C11.68 14.6667 14.6667 11.68 14.6667 8.00001C14.6667 4.32001 11.68 1.33334 8 1.33334ZM8.66667 11.3333H7.33334V10H8.66667V11.3333ZM8.66667 8.66668H7.33334V4.66668H8.66667V8.66668Z", fill: "currentColor" })));
|
|
6
|
+
|
|
7
|
+
export { CriticalIcon };
|
|
8
|
+
//# sourceMappingURL=CriticalIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CriticalIcon.js","sources":["../../../../src/icons/custom/components/CriticalIcon.tsx"],"sourcesContent":["import React from 'react';\nimport { IconComponentProps } from 'src/icons/types';\n\nexport const CriticalIcon = ({ fill, ...props }: IconComponentProps) => (\n <svg viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <circle cx={8} cy={8} r={6} fill={fill} />\n <path\n d=\"M8 1.33334C4.32 1.33334 1.33334 4.32001 1.33334 8.00001C1.33334 11.68 4.32 14.6667 8 14.6667C11.68 14.6667 14.6667 11.68 14.6667 8.00001C14.6667 4.32001 11.68 1.33334 8 1.33334ZM8.66667 11.3333H7.33334V10H8.66667V11.3333ZM8.66667 8.66668H7.33334V4.66668H8.66667V8.66668Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n"],"names":["React"],"mappings":";;AAGO,MAAM,YAAY,GAAG,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAsB,MACjEA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,EAAA,GAAK,KAAK,EAAA;AAC/E,IAAAA,cAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAQ,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAI,CAAA;IAC1CA,cACE,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,gRAAgR,EAClR,IAAI,EAAC,cAAc,EAAA,CACnB,CACE;;;;"}
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
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 AvatarSC = styled__default.default.div.withConfig({ displayName: "vui--AvatarSC", componentId: "vui--1gxc5tv" }) `width:${(props) => props.width};height:${(props) => props.width};border:3px solid ${index.theme.colors.neutral.grey.base};color:${(props) => props.textColor};background-color:${(props) => props.bgColor};cursor:pointer;border-radius:50%;display:flex;justify-content:center;align-items:center;background-size:cover;span{font-family:${index.theme.text.bodySmallBold.fontFamily};font-weight:${index.theme.text.bodySmallBold.fontWeight};font-size:${index.theme.text.bodySmallBold.fontSize};line-height:${index.theme.text.bodySmallBold.lineHeight};}`;
|
|
11
|
-
|
|
12
|
-
exports.AvatarSC = AvatarSC;
|
|
13
|
-
//# sourceMappingURL=styled.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styled.cjs","sources":["../../../src/components/Avatar/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { theme } from '../../theme';\nimport { AvatarSCProps } from './types';\n\nexport const AvatarSC = styled.div<AvatarSCProps>`\n width: ${(props) => props.width};\n height: ${(props) => props.width};\n border: 3px solid ${theme.colors.neutral.grey.base};\n color: ${(props) => props.textColor};\n background-color: ${(props) => props.bgColor};\n cursor: pointer;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-size: cover;\n\n span {\n font-family: ${theme.text.bodySmallBold.fontFamily};\n font-weight: ${theme.text.bodySmallBold.fontWeight};\n font-size: ${theme.text.bodySmallBold.fontSize};\n line-height: ${theme.text.bodySmallBold.lineHeight};\n }\n`;\n"],"names":["styled","theme"],"mappings":";;;;;;;;;AAIa,MAAA,QAAQ,GAAGA,uBAAM,CAAC,GAAG,CACvB,UAAA,CAAA,EAAA,WAAA,EAAA,eAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,MAAA,EAAA,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAA,QAAA,EACrB,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,qBACZC,WAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CACzC,OAAA,EAAA,CAAC,KAAK,KAAK,KAAK,CAAC,SAAS,CAAA,kBAAA,EACf,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,CAAA,gIAAA,EAS3BA,WAAK,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAA,aAAA,EACnCA,WAAK,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAA,WAAA,EACrCA,WAAK,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAC/B,aAAA,EAAAA,WAAK,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU;;;;"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
2
|
-
import { theme } from '../../theme/index.js';
|
|
3
|
-
|
|
4
|
-
const AvatarSC = styled.div.withConfig({ displayName: "vui--AvatarSC", componentId: "vui--1gxc5tv" }) `width:${(props) => props.width};height:${(props) => props.width};border:3px solid ${theme.colors.neutral.grey.base};color:${(props) => props.textColor};background-color:${(props) => props.bgColor};cursor:pointer;border-radius:50%;display:flex;justify-content:center;align-items:center;background-size:cover;span{font-family:${theme.text.bodySmallBold.fontFamily};font-weight:${theme.text.bodySmallBold.fontWeight};font-size:${theme.text.bodySmallBold.fontSize};line-height:${theme.text.bodySmallBold.lineHeight};}`;
|
|
5
|
-
|
|
6
|
-
export { AvatarSC };
|
|
7
|
-
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../src/components/Avatar/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { theme } from '../../theme';\nimport { AvatarSCProps } from './types';\n\nexport const AvatarSC = styled.div<AvatarSCProps>`\n width: ${(props) => props.width};\n height: ${(props) => props.width};\n border: 3px solid ${theme.colors.neutral.grey.base};\n color: ${(props) => props.textColor};\n background-color: ${(props) => props.bgColor};\n cursor: pointer;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n background-size: cover;\n\n span {\n font-family: ${theme.text.bodySmallBold.fontFamily};\n font-weight: ${theme.text.bodySmallBold.fontWeight};\n font-size: ${theme.text.bodySmallBold.fontSize};\n line-height: ${theme.text.bodySmallBold.lineHeight};\n }\n`;\n"],"names":[],"mappings":";;;AAIa,MAAA,QAAQ,GAAG,MAAM,CAAC,GAAG,CACvB,UAAA,CAAA,EAAA,WAAA,EAAA,eAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,MAAA,EAAA,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAA,QAAA,EACrB,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,qBACZ,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CACzC,OAAA,EAAA,CAAC,KAAK,KAAK,KAAK,CAAC,SAAS,CAAA,kBAAA,EACf,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,CAAA,gIAAA,EAS3B,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAA,aAAA,EACnC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAA,WAAA,EACrC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAC/B,aAAA,EAAA,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU;;;;"}
|