@servicetitan/mpa-components 2.0.0 → 2.1.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/CHANGELOG.md +16 -0
- package/lib/components/brands/brand-card/actions-button-section.d.ts +1 -1
- package/lib/components/brands/brand-card/actions-button-section.d.ts.map +1 -1
- package/lib/components/brands/brand-card/actions-button-section.js +7 -8
- package/lib/components/brands/brand-card/actions-button-section.js.map +1 -1
- package/lib/components/brands/brand-card/brand-card.d.ts.map +1 -1
- package/lib/components/brands/brand-card/brand-card.js +3 -5
- package/lib/components/brands/brand-card/brand-card.js.map +1 -1
- package/lib/components/brands/brand-card/info-section.d.ts +11 -0
- package/lib/components/brands/brand-card/info-section.d.ts.map +1 -0
- package/lib/components/brands/brand-card/info-section.js +4 -0
- package/lib/components/brands/brand-card/info-section.js.map +1 -0
- package/lib/components/brands/styles.module.less +0 -23
- package/package.json +2 -2
- package/src/components/brands/brand-card/actions-button-section.tsx +12 -25
- package/src/components/brands/brand-card/brand-card.tsx +16 -10
- package/src/components/brands/brand-card/info-section.tsx +32 -0
- package/src/components/brands/styles.module.less +0 -23
- package/src/components/brands/styles.module.less.d.ts +0 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/lib/components/brands/brand-card/brand-logo.d.ts +0 -6
- package/lib/components/brands/brand-card/brand-logo.d.ts.map +0 -1
- package/lib/components/brands/brand-card/brand-logo.js +0 -8
- package/lib/components/brands/brand-card/brand-logo.js.map +0 -1
- package/lib/components/brands/brand-card/cart-tags.d.ts +0 -6
- package/lib/components/brands/brand-card/cart-tags.d.ts.map +0 -1
- package/lib/components/brands/brand-card/cart-tags.js +0 -10
- package/lib/components/brands/brand-card/cart-tags.js.map +0 -1
- package/lib/components/brands/brand-card/name-and-mail-section.d.ts +0 -7
- package/lib/components/brands/brand-card/name-and-mail-section.d.ts.map +0 -1
- package/lib/components/brands/brand-card/name-and-mail-section.js +0 -7
- package/lib/components/brands/brand-card/name-and-mail-section.js.map +0 -1
- package/src/components/brands/brand-card/brand-logo.tsx +0 -21
- package/src/components/brands/brand-card/cart-tags.tsx +0 -20
- package/src/components/brands/brand-card/name-and-mail-section.tsx +0 -28
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand-logo.d.ts","sourceRoot":"","sources":["../../../../src/components/brands/brand-card/brand-logo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAS3B,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAWrD,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { Flex, Icon } from '@servicetitan/anvil2';
|
|
4
|
-
import ImageIcon from '@servicetitan/anvil2/assets/icons/material/round/image.svg';
|
|
5
|
-
import { tokens } from '@servicetitan/tokens/core/index';
|
|
6
|
-
import * as Styles from '../styles.module.less';
|
|
7
|
-
export const BrandLogo = ({ logo, alt }) => logo ? (_jsx("img", { className: classNames(Styles.brandImg, 'qa-brand-logo'), src: logo, alt: alt })) : (_jsx(Flex, { className: classNames(Styles.brandImgPlaceholder, 'qa-brand-logo-placeholder'), alignItems: "center", justifyContent: "center", children: _jsx(Icon, { svg: ImageIcon, size: "large", color: tokens.colorNeutral90 }) }));
|
|
8
|
-
//# sourceMappingURL=brand-logo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"brand-logo.js","sourceRoot":"","sources":["../../../../src/components/brands/brand-card/brand-logo.tsx"],"names":[],"mappings":";AACA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,SAAS,MAAM,4DAA4D,CAAC;AACnF,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAEzD,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,MAAM,CAAC,MAAM,SAAS,GAAwC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,CAC5E,IAAI,CAAC,CAAC,CAAC,CACH,cAAK,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,QAAQ,EAAE,eAAe,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,GAAI,CACxF,CAAC,CAAC,CAAC,CACA,KAAC,IAAI,IACD,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,mBAAmB,EAAE,2BAA2B,CAAC,EAC9E,UAAU,EAAC,QAAQ,EACnB,cAAc,EAAC,QAAQ,YAEvB,KAAC,IAAI,IAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,MAAM,CAAC,cAAc,GAAI,GAChE,CACV,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cart-tags.d.ts","sourceRoot":"","sources":["../../../../src/components/brands/brand-card/cart-tags.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAK3B,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAcpE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Chip, Flex } from '@servicetitan/anvil2';
|
|
3
|
-
import { tokens } from '@servicetitan/tokens/core/index';
|
|
4
|
-
export const CardTags = ({ isDefault, isShared, }) => {
|
|
5
|
-
if (!isDefault && !isShared) {
|
|
6
|
-
return null;
|
|
7
|
-
}
|
|
8
|
-
return (_jsxs(Flex, { direction: "column", alignItems: "flex-end", className: "qa-brand-card-tags", gap: "1", children: [isShared && _jsx(Chip, { color: tokens.colorPurple100, label: "Corporate HQ", size: "small" }), isDefault && _jsx(Chip, { label: "Default", color: tokens.colorNeutral50, size: "small" })] }));
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=cart-tags.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cart-tags.js","sourceRoot":"","sources":["../../../../src/components/brands/brand-card/cart-tags.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAEzD,MAAM,CAAC,MAAM,QAAQ,GAAoD,CAAC,EACtE,SAAS,EACT,QAAQ,GACX,EAAE,EAAE;IACD,IAAI,CAAC,SAAS,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,MAAC,IAAI,IAAC,SAAS,EAAC,QAAQ,EAAC,UAAU,EAAC,UAAU,EAAC,SAAS,EAAC,oBAAoB,EAAC,GAAG,EAAC,GAAG,aAChF,QAAQ,IAAI,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,cAAc,EAAE,KAAK,EAAC,cAAc,EAAC,IAAI,EAAC,OAAO,GAAG,EACpF,SAAS,IAAI,KAAC,IAAI,IAAC,KAAK,EAAC,SAAS,EAAC,KAAK,EAAE,MAAM,CAAC,cAAc,EAAE,IAAI,EAAC,OAAO,GAAG,IAC9E,CACV,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"name-and-mail-section.d.ts","sourceRoot":"","sources":["../../../../src/components/brands/brand-card/name-and-mail-section.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAQ3B,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAmBxF,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { BodyText, Headline } from '@servicetitan/design-system';
|
|
4
|
-
import { Flex } from '@servicetitan/anvil2';
|
|
5
|
-
import * as Styles from '../styles.module.less';
|
|
6
|
-
export const NameAndMailSection = ({ name, email, nameToShow, }) => (_jsxs(Flex, { justifyContent: "space-between", direction: "column", className: classNames(Styles.cardLeftSectionTexts, 'qa-brand-card-name-and-mail'), children: [_jsx(Headline, { el: "p", subdued: !name, className: "t-truncate-i m-0", title: nameToShow, children: nameToShow }), email && (_jsx(BodyText, { subdued: true, title: email, className: "t-truncate-i", children: email }))] }));
|
|
7
|
-
//# sourceMappingURL=name-and-mail-section.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"name-and-mail-section.js","sourceRoot":"","sources":["../../../../src/components/brands/brand-card/name-and-mail-section.tsx"],"names":[],"mappings":";AACA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE5C,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,MAAM,CAAC,MAAM,kBAAkB,GAA8D,CAAC,EAC1F,IAAI,EACJ,KAAK,EACL,UAAU,GACb,EAAE,EAAE,CAAC,CACF,MAAC,IAAI,IACD,cAAc,EAAC,eAAe,EAC9B,SAAS,EAAC,QAAQ,EAClB,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,oBAAoB,EAAE,6BAA6B,CAAC,aAEjF,KAAC,QAAQ,IAAC,EAAE,EAAC,GAAG,EAAC,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,EAAC,kBAAkB,EAAC,KAAK,EAAE,UAAU,YAC1E,UAAU,GACJ,EACV,KAAK,IAAI,CACN,KAAC,QAAQ,IAAC,OAAO,QAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAC,cAAc,YACnD,KAAK,GACC,CACd,IACE,CACV,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
|
|
4
|
-
import { Flex, Icon } from '@servicetitan/anvil2';
|
|
5
|
-
import ImageIcon from '@servicetitan/anvil2/assets/icons/material/round/image.svg';
|
|
6
|
-
import { tokens } from '@servicetitan/tokens/core/index';
|
|
7
|
-
|
|
8
|
-
import * as Styles from '../styles.module.less';
|
|
9
|
-
|
|
10
|
-
export const BrandLogo: FC<{ logo?: string; alt?: string }> = ({ logo, alt }) =>
|
|
11
|
-
logo ? (
|
|
12
|
-
<img className={classNames(Styles.brandImg, 'qa-brand-logo')} src={logo} alt={alt} />
|
|
13
|
-
) : (
|
|
14
|
-
<Flex
|
|
15
|
-
className={classNames(Styles.brandImgPlaceholder, 'qa-brand-logo-placeholder')}
|
|
16
|
-
alignItems="center"
|
|
17
|
-
justifyContent="center"
|
|
18
|
-
>
|
|
19
|
-
<Icon svg={ImageIcon} size="large" color={tokens.colorNeutral90} />
|
|
20
|
-
</Flex>
|
|
21
|
-
);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
|
|
3
|
-
import { Chip, Flex } from '@servicetitan/anvil2';
|
|
4
|
-
import { tokens } from '@servicetitan/tokens/core/index';
|
|
5
|
-
|
|
6
|
-
export const CardTags: FC<{ isDefault?: boolean; isShared?: boolean }> = ({
|
|
7
|
-
isDefault,
|
|
8
|
-
isShared,
|
|
9
|
-
}) => {
|
|
10
|
-
if (!isDefault && !isShared) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<Flex direction="column" alignItems="flex-end" className="qa-brand-card-tags" gap="1">
|
|
16
|
-
{isShared && <Chip color={tokens.colorPurple100} label="Corporate HQ" size="small" />}
|
|
17
|
-
{isDefault && <Chip label="Default" color={tokens.colorNeutral50} size="small" />}
|
|
18
|
-
</Flex>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
|
|
4
|
-
import { BodyText, Headline } from '@servicetitan/design-system';
|
|
5
|
-
import { Flex } from '@servicetitan/anvil2';
|
|
6
|
-
|
|
7
|
-
import * as Styles from '../styles.module.less';
|
|
8
|
-
|
|
9
|
-
export const NameAndMailSection: FC<{ name?: string; nameToShow: string; email?: string }> = ({
|
|
10
|
-
name,
|
|
11
|
-
email,
|
|
12
|
-
nameToShow,
|
|
13
|
-
}) => (
|
|
14
|
-
<Flex
|
|
15
|
-
justifyContent="space-between"
|
|
16
|
-
direction="column"
|
|
17
|
-
className={classNames(Styles.cardLeftSectionTexts, 'qa-brand-card-name-and-mail')}
|
|
18
|
-
>
|
|
19
|
-
<Headline el="p" subdued={!name} className="t-truncate-i m-0" title={nameToShow}>
|
|
20
|
-
{nameToShow}
|
|
21
|
-
</Headline>
|
|
22
|
-
{email && (
|
|
23
|
-
<BodyText subdued title={email} className="t-truncate-i">
|
|
24
|
-
{email}
|
|
25
|
-
</BodyText>
|
|
26
|
-
)}
|
|
27
|
-
</Flex>
|
|
28
|
-
);
|