@activecollab/components 1.0.181 → 1.0.183
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/cjs/components/Chip/Chip.js +18 -6
- package/dist/cjs/components/Chip/Chip.js.map +1 -1
- package/dist/cjs/components/Chip/Styles.js +21 -2
- package/dist/cjs/components/Chip/Styles.js.map +1 -1
- package/dist/cjs/components/ComboBox/ComboBox.js +38 -16
- package/dist/cjs/components/ComboBox/ComboBox.js.map +1 -1
- package/dist/cjs/components/EditableContent/EditableContent.js +73 -0
- package/dist/cjs/components/EditableContent/EditableContent.js.map +1 -0
- package/dist/cjs/components/EditableContent/Styles.js +61 -0
- package/dist/cjs/components/EditableContent/Styles.js.map +1 -0
- package/dist/cjs/components/EditableContent/index.js +19 -0
- package/dist/cjs/components/EditableContent/index.js.map +1 -0
- package/dist/cjs/components/Entity/EntityCard.js +6 -1
- package/dist/cjs/components/Entity/EntityCard.js.map +1 -1
- package/dist/cjs/components/Entity/EntityProperty.js +2 -1
- package/dist/cjs/components/Entity/EntityProperty.js.map +1 -1
- package/dist/cjs/components/Entity/Styles.js +1 -1
- package/dist/cjs/components/Entity/Styles.js.map +1 -1
- package/dist/cjs/components/Select/OptionContent/Styles.js +3 -3
- package/dist/cjs/components/Select/OptionContent/Styles.js.map +1 -1
- package/dist/cjs/components/Typography/Typography.js.map +1 -1
- package/dist/cjs/components/index.js +13 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/esm/components/Chip/Chip.d.ts +4 -0
- package/dist/esm/components/Chip/Chip.d.ts.map +1 -1
- package/dist/esm/components/Chip/Chip.js +18 -6
- package/dist/esm/components/Chip/Chip.js.map +1 -1
- package/dist/esm/components/Chip/Styles.d.ts +3 -0
- package/dist/esm/components/Chip/Styles.d.ts.map +1 -1
- package/dist/esm/components/Chip/Styles.js +20 -2
- package/dist/esm/components/Chip/Styles.js.map +1 -1
- package/dist/esm/components/ComboBox/ComboBox.d.ts +1 -0
- package/dist/esm/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/dist/esm/components/ComboBox/ComboBox.js +38 -16
- package/dist/esm/components/ComboBox/ComboBox.js.map +1 -1
- package/dist/esm/components/EditableContent/EditableContent.d.ts +9 -0
- package/dist/esm/components/EditableContent/EditableContent.d.ts.map +1 -0
- package/dist/esm/components/EditableContent/EditableContent.js +39 -0
- package/dist/esm/components/EditableContent/EditableContent.js.map +1 -0
- package/dist/esm/components/EditableContent/Styles.d.ts +8 -0
- package/dist/esm/components/EditableContent/Styles.d.ts.map +1 -0
- package/dist/esm/components/EditableContent/Styles.js +44 -0
- package/dist/esm/components/EditableContent/Styles.js.map +1 -0
- package/dist/esm/components/EditableContent/index.d.ts +2 -0
- package/dist/esm/components/EditableContent/index.d.ts.map +1 -0
- package/dist/esm/components/EditableContent/index.js +2 -0
- package/dist/esm/components/EditableContent/index.js.map +1 -0
- package/dist/esm/components/Entity/EntityCard.d.ts.map +1 -1
- package/dist/esm/components/Entity/EntityCard.js +3 -1
- package/dist/esm/components/Entity/EntityCard.js.map +1 -1
- package/dist/esm/components/Entity/EntityProperty.d.ts.map +1 -1
- package/dist/esm/components/Entity/EntityProperty.js +2 -1
- package/dist/esm/components/Entity/EntityProperty.js.map +1 -1
- package/dist/esm/components/Entity/Styles.js +1 -1
- package/dist/esm/components/Entity/Styles.js.map +1 -1
- package/dist/esm/components/Select/OptionContent/Styles.d.ts +2 -1
- package/dist/esm/components/Select/OptionContent/Styles.d.ts.map +1 -1
- package/dist/esm/components/Select/OptionContent/Styles.js +2 -1
- package/dist/esm/components/Select/OptionContent/Styles.js.map +1 -1
- package/dist/esm/components/Typography/Typography.d.ts +2 -1
- package/dist/esm/components/Typography/Typography.d.ts.map +1 -1
- package/dist/esm/components/Typography/Typography.js.map +1 -1
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/index.js +308 -178
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Entity/EntityCard.tsx"],"names":["EntityCard","ref","children","isCollection","background","className","as","rest","EntityGroupContext","renderAs","paperType","Component","Card","displayName"],"mappings":";;;;;;;;;AAAA;;AAOA;;AAEA;;AAKA
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Entity/EntityCard.tsx"],"names":["EntityCard","ref","children","isCollection","background","className","as","rest","EntityGroupContext","renderAs","classSuffix","paperType","Component","Card","displayName"],"mappings":";;;;;;;;;AAAA;;AAOA;;AAEA;;AAKA;;AACA;;;;;;;;;;;;;;;;AAsBO,IAAMA,UAAsD,gBACjE,uBACE,gBASEC,GATF,EAUK;AAAA,MARDC,QAQC,QARDA,QAQC;AAAA,MAPDC,YAOC,QAPDA,YAOC;AAAA,MANDC,UAMC,QANDA,UAMC;AAAA,MALDC,SAKC,QALDA,SAKC;AAAA,MAJDC,EAIC,QAJDA,EAIC;AAAA,MAHEC,IAGF;;AACH,oBAAqB,uBAAWC,+BAAX,CAArB;AAAA,MAAQC,QAAR,eAAQA,QAAR;;AACA,MAAMC,WAAW,2BAAoBD,QAApB,CAAjB;AACA,MAAME,SAAS,GAAGF,QAAQ,KAAK,MAAb,GAAsB,SAAtB,GAAkC,SAApD;AACA,MAAMG,SAAS,GAAGN,EAAE,IAAIO,UAAxB;AACA,sBACE,6BAAC,wBAAD;AACE,IAAA,EAAE,EAAED,SADN;AAEE,IAAA,SAAS,EAAEH,QAFb;AAGE,IAAA,WAAW,EAAEL,UAHf;AAIE,IAAA,SAAS,EAAEO,SAJb;AAKE,IAAA,SAAS,EAAE,yBAAW,eAAX,EAA4BD,WAA5B,EAAyCL,SAAzC,CALb;AAME,IAAA,aAAa,EAAEF;AANjB,KAOMI,IAPN;AAQE,IAAA,GAAG,EAAEN;AARP,MAUGC,QAVH,CADF;AAcD,CA9BH,CADK;;AAkCPF,UAAU,CAACc,WAAX,GAAyB,YAAzB","sourcesContent":["import React, {\n BaseHTMLAttributes,\n CSSProperties,\n forwardRef,\n ReactElement,\n useContext,\n} from \"react\";\nimport { StyledEntityCard } from \"./Styles\";\n\nimport { Card, ICardProps } from \"../Card\";\nimport {\n PolymorphicComponentPropsWithRef,\n PolymorphicRef,\n} from \"../../utils/types\";\nimport { EntityGroupContext } from \"./EntityGroup\";\nimport classNames from \"classnames\";\n\nexport interface IEntityCardProps\n extends ICardProps,\n BaseHTMLAttributes<HTMLElement> {\n /** ClassName to add on Card */\n className?: string;\n /** Show as group of Cards on grid */\n isCollection?: boolean;\n /** Background color to override for Card */\n background?: string;\n /** CSSProperties to override for Card */\n style?: CSSProperties;\n}\n\nexport type EntityCardProps<C extends React.ElementType> =\n PolymorphicComponentPropsWithRef<C, IEntityCardProps>;\n\nexport type EntityComponent = <C extends React.ElementType = typeof Card>(\n props: EntityCardProps<C>\n) => ReactElement | null;\n\nexport const EntityCard: EntityComponent & { displayName?: string } =\n forwardRef(\n <C extends React.ElementType = typeof Card>(\n {\n children,\n isCollection,\n background,\n className,\n as,\n ...rest\n }: EntityCardProps<C>,\n ref?: PolymorphicRef<C>\n ) => {\n const { renderAs } = useContext(EntityGroupContext);\n const classSuffix = `c-entity-card-${renderAs}`;\n const paperType = renderAs === \"grid\" ? \"paper-1\" : \"paper-2\";\n const Component = as || Card;\n return (\n <StyledEntityCard\n as={Component}\n $renderAs={renderAs}\n $background={background}\n paperType={paperType}\n className={classNames(\"c-entity-card\", classSuffix, className)}\n $isCollection={isCollection}\n {...rest}\n ref={ref}\n >\n {children}\n </StyledEntityCard>\n );\n }\n );\n\nEntityCard.displayName = \"EntityCard\";\n"],"file":"EntityCard.js"}
|
|
@@ -39,8 +39,9 @@ var EntityProperty = function EntityProperty(_ref) {
|
|
|
39
39
|
var _useContext = (0, _react.useContext)(_EntityGroup.EntityGroupContext),
|
|
40
40
|
renderAs = _useContext.renderAs;
|
|
41
41
|
|
|
42
|
+
var classSuffix = "c-entity-property-".concat(renderAs);
|
|
42
43
|
return /*#__PURE__*/_react.default.createElement(_Styles.StyledEntityProperty, _extends({
|
|
43
|
-
className: (0, _classnames.default)("c-entity-property", className)
|
|
44
|
+
className: (0, _classnames.default)("c-entity-property", classSuffix, className)
|
|
44
45
|
}, props, {
|
|
45
46
|
$order: listOrder,
|
|
46
47
|
$width: listWidth,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Entity/EntityProperty.tsx"],"names":["EntityProperty","listOrder","listWidth","visibleFromBreakpoint","className","props","EntityGroupContext","renderAs","displayName"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAUO,IAAMA,cAAkD,GAAG,SAArDA,cAAqD,OAM5D;AAAA,MALJC,SAKI,QALJA,SAKI;AAAA,MAJJC,SAII,QAJJA,SAII;AAAA,MAHJC,qBAGI,QAHJA,qBAGI;AAAA,MAFJC,SAEI,QAFJA,SAEI;AAAA,MADDC,KACC;;AACJ,oBAAqB,uBAAWC,+BAAX,CAArB;AAAA,MAAQC,QAAR,eAAQA,QAAR;;AACA,sBACE,6BAAC,4BAAD;AACE,IAAA,SAAS,EAAE,yBAAW,mBAAX,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Entity/EntityProperty.tsx"],"names":["EntityProperty","listOrder","listWidth","visibleFromBreakpoint","className","props","EntityGroupContext","renderAs","classSuffix","displayName"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAUO,IAAMA,cAAkD,GAAG,SAArDA,cAAqD,OAM5D;AAAA,MALJC,SAKI,QALJA,SAKI;AAAA,MAJJC,SAII,QAJJA,SAII;AAAA,MAHJC,qBAGI,QAHJA,qBAGI;AAAA,MAFJC,SAEI,QAFJA,SAEI;AAAA,MADDC,KACC;;AACJ,oBAAqB,uBAAWC,+BAAX,CAArB;AAAA,MAAQC,QAAR,eAAQA,QAAR;;AACA,MAAMC,WAAW,+BAAwBD,QAAxB,CAAjB;AACA,sBACE,6BAAC,4BAAD;AACE,IAAA,SAAS,EAAE,yBAAW,mBAAX,EAAgCC,WAAhC,EAA6CJ,SAA7C;AADb,KAEMC,KAFN;AAGE,IAAA,MAAM,EAAEJ,SAHV;AAIE,IAAA,MAAM,EAAEC,SAJV;AAKE,IAAA,sBAAsB,EAAEC,qBAL1B;AAME,IAAA,SAAS,EAAEI;AANb,KADF;AAUD,CAnBM;;;AAqBPP,cAAc,CAACS,WAAf,GAA6B,gBAA7B","sourcesContent":["import React, { HTMLAttributes, useContext } from \"react\";\nimport { StyledEntityProperty } from \"./Styles\";\nimport classNames from \"classnames\";\nimport { EntityGroupContext } from \"./EntityGroup\";\n\nexport type VisibleFromBreakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\nexport interface IEntityCardPropertyProps\n extends HTMLAttributes<HTMLDivElement> {\n listOrder?: number;\n listWidth?: string | number;\n visibleFromBreakpoint?: VisibleFromBreakpoint;\n}\n\nexport const EntityProperty: React.FC<IEntityCardPropertyProps> = ({\n listOrder,\n listWidth,\n visibleFromBreakpoint,\n className,\n ...props\n}) => {\n const { renderAs } = useContext(EntityGroupContext);\n const classSuffix = `c-entity-property-${renderAs}`;\n return (\n <StyledEntityProperty\n className={classNames(\"c-entity-property\", classSuffix, className)}\n {...props}\n $order={listOrder}\n $width={listWidth}\n $visibleFromBreakpoint={visibleFromBreakpoint}\n $renderAs={renderAs}\n />\n );\n};\n\nEntityProperty.displayName = \"EntityProperty\";\n"],"file":"EntityProperty.js"}
|
|
@@ -41,7 +41,7 @@ var StyledEntityProperty = (0, _styledComponents.default)("div").withConfig({
|
|
|
41
41
|
})(["", " ", " ", " ", " ", " ", " ", " ", " ", ""], function (_ref4) {
|
|
42
42
|
var $renderAs = _ref4.$renderAs,
|
|
43
43
|
$width = _ref4.$width;
|
|
44
|
-
return $renderAs === "list" && (0, _styledComponents.css)(["display:flex;align-items:center;min-width:24px;flex:", ";"], $width ? "
|
|
44
|
+
return $renderAs === "list" && (0, _styledComponents.css)(["display:flex;align-items:center;min-width:24px;flex:", ";"], $width ? "initial" : 1);
|
|
45
45
|
}, function (props) {
|
|
46
46
|
return props.$renderAs === "list" && props.$order && (0, _styledComponents.css)(["order:", ";"], props.$order);
|
|
47
47
|
}, function (props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Entity/Styles.ts"],"names":["StyledEntityCard","Card","$renderAs","css","props","$background","$isCollection","PaperStyles","displayName","StyledEntityProperty","$width","$order","$visibleFromBreakpoint","StyledEntityGroup","$gap","StyledEntityActions"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;;;;;AAIO,IAAMA,gBAAgB,GAAG,+BAAOC,UAAP,CAAH;AAAA;AAAA;AAAA,8CAOzB;AAAA,MAAGC,SAAH,QAAGA,SAAH;AAAA,SACAA,SAAS,KAAK,MAAd,QACAC,qBADA,gJADA;AAAA,CAPyB,EAmBzB;AAAA,MAAGD,SAAH,SAAGA,SAAH;AAAA,SACAA,SAAS,KAAK,MAAd,QACAC,qBADA,2FADA;AAAA,CAnByB,EA8BzB,UAACC,KAAD;AAAA,SACAA,KAAK,CAACC,WAAN,QACAF,qBADA,8BAEsBC,KAAK,CAACC,WAF5B,CADA;AAAA,CA9ByB,EAoCzB;AAAA,MAAGC,aAAH,SAAGA,aAAH;AAAA,MAAkBD,WAAlB,SAAkBA,WAAlB;AAAA,SACAC,aAAa,QACbH,qBADa,2JAYPI,mBAZO,EAaWF,WAbX,CADb;AAAA,CApCyB,CAAtB;;AAsDPL,gBAAgB,CAACQ,WAAjB,GAA+B,kBAA/B;AAEO,IAAMC,oBAAoB,GAAG,+BAAO,KAAP,CAAH;AAAA;AAAA;AAAA,qDAM7B;AAAA,MAAGP,SAAH,SAAGA,SAAH;AAAA,MAAcQ,MAAd,SAAcA,MAAd;AAAA,SACAR,SAAS,KAAK,MAAd,QACAC,qBADA,iEAKUO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Entity/Styles.ts"],"names":["StyledEntityCard","Card","$renderAs","css","props","$background","$isCollection","PaperStyles","displayName","StyledEntityProperty","$width","$order","$visibleFromBreakpoint","StyledEntityGroup","$gap","StyledEntityActions"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;;;;;AAIO,IAAMA,gBAAgB,GAAG,+BAAOC,UAAP,CAAH;AAAA;AAAA;AAAA,8CAOzB;AAAA,MAAGC,SAAH,QAAGA,SAAH;AAAA,SACAA,SAAS,KAAK,MAAd,QACAC,qBADA,gJADA;AAAA,CAPyB,EAmBzB;AAAA,MAAGD,SAAH,SAAGA,SAAH;AAAA,SACAA,SAAS,KAAK,MAAd,QACAC,qBADA,2FADA;AAAA,CAnByB,EA8BzB,UAACC,KAAD;AAAA,SACAA,KAAK,CAACC,WAAN,QACAF,qBADA,8BAEsBC,KAAK,CAACC,WAF5B,CADA;AAAA,CA9ByB,EAoCzB;AAAA,MAAGC,aAAH,SAAGA,aAAH;AAAA,MAAkBD,WAAlB,SAAkBA,WAAlB;AAAA,SACAC,aAAa,QACbH,qBADa,2JAYPI,mBAZO,EAaWF,WAbX,CADb;AAAA,CApCyB,CAAtB;;AAsDPL,gBAAgB,CAACQ,WAAjB,GAA+B,kBAA/B;AAEO,IAAMC,oBAAoB,GAAG,+BAAO,KAAP,CAAH;AAAA;AAAA;AAAA,qDAM7B;AAAA,MAAGP,SAAH,SAAGA,SAAH;AAAA,MAAcQ,MAAd,SAAcA,MAAd;AAAA,SACAR,SAAS,KAAK,MAAd,QACAC,qBADA,iEAKUO,MAAM,GAAG,SAAH,GAAe,CAL/B,CADA;AAAA,CAN6B,EAe7B,UAACN,KAAD;AAAA,SACAA,KAAK,CAACF,SAAN,KAAoB,MAApB,IACAE,KAAK,CAACO,MADN,QAEAR,qBAFA,mBAGWC,KAAK,CAACO,MAHjB,CADA;AAAA,CAf6B,EAs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,IAAI,aAAMA,IAAN,UAAiB,SAHnC,CADA;AAAA,CAJ0B,EAW1B,UAACV,KAAD;AAAA,SACAA,KAAK,CAACF,SAAN,KAAoB,MAApB,QACAC,qBADA,0CADA;AAAA,CAX0B,CAAvB;;AAkBPU,iBAAiB,CAACL,WAAlB,GAAgC,mBAAhC;AAEO,IAAMO,mBAAmB,GAAG,+BAAO,KAAP,CAAH;AAAA;AAAA;AAAA,wEAK5B;AAAA,MAAGb,SAAH,UAAGA,SAAH;AAAA,SACAA,SAAS,KAAK,MAAd,QACAC,qBADA,6CADA;AAAA,CAL4B,EAa5B;AAAA,MAAGD,SAAH,UAAGA,SAAH;AAAA,SACAA,SAAS,KAAK,MAAd,QACAC,qBADA,6BADA;AAAA,CAb4B,CAAzB","sourcesContent":["import styled, { css } from \"styled-components\";\nimport { Card } from \"../Card\";\nimport { PaperStyles } from \"../Paper/Styles\";\nimport { VisibleFromBreakpoint } from \"./EntityProperty\";\nimport tw from \"twin.macro\";\n\nexport const StyledEntityCard = styled(Card)<{\n $renderAs: string;\n $gap?: number;\n $background?: string;\n $isCollection?: boolean;\n}>`\n line-height: 1.375;\n ${({ $renderAs }) =>\n $renderAs === \"list\" &&\n css`\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: 48px;\n margin-bottom: 4px;\n justify-content: space-between;\n padding: 0 16px 0 16px;\n `}\n\n ${({ $renderAs }) =>\n $renderAs === \"grid\" &&\n css`\n display: flex;\n flex-direction: column;\n position: relative;\n padding: 20px 24px;\n height: 280px;\n `}\n\n\n ${(props) =>\n props.$background &&\n css`\n background-color: ${props.$background};\n `}\n\n ${({ $isCollection, $background }) =>\n $isCollection &&\n css`\n &::after {\n display: block;\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n transform: rotate(-3deg);\n z-index: -1;\n ${PaperStyles};\n background-color: ${$background};\n }\n `}\n`;\nStyledEntityCard.displayName = \"StyledEntityCard\";\n\nexport const StyledEntityProperty = styled(\"div\")<{\n $renderAs?: string;\n $order?: number;\n $width?: number | string;\n $visibleFromBreakpoint?: VisibleFromBreakpoint;\n}>`\n ${({ $renderAs, $width }) =>\n $renderAs === \"list\" &&\n css`\n display: flex;\n align-items: center;\n min-width: 24px;\n flex: ${$width ? \"initial\" : 1};\n `}\n\n ${(props) =>\n props.$renderAs === \"list\" &&\n props.$order &&\n css`\n order: ${props.$order};\n `}\n\n ${(props) =>\n props.$renderAs === \"list\" &&\n props.$width &&\n css`\n width: ${props.$width};\n `}\n ${({ $visibleFromBreakpoint }) =>\n $visibleFromBreakpoint &&\n css`\n ${tw`tw-hidden`}\n `}\n ${({ $visibleFromBreakpoint }) =>\n $visibleFromBreakpoint === \"sm\" &&\n css`\n ${tw`sm:tw-flex`}\n `}\n ${({ $visibleFromBreakpoint }) =>\n $visibleFromBreakpoint === \"md\" &&\n css`\n ${tw`md:tw-flex`}\n `}\n ${({ $visibleFromBreakpoint }) =>\n $visibleFromBreakpoint === \"lg\" &&\n css`\n ${tw`lg:tw-flex`}\n `}\n ${({ $visibleFromBreakpoint }) =>\n $visibleFromBreakpoint === \"xl\" &&\n css`\n ${tw`xl:tw-flex`}\n `}\n ${({ $visibleFromBreakpoint }) =>\n $visibleFromBreakpoint === \"2xl\" &&\n css`\n ${tw`2xl:tw-flex`}\n `}\n`;\n\nStyledEntityProperty.displayName = \"StyledEntityProperty\";\n\nexport const StyledEntityGroup = styled(\"div\")<{\n $renderAs: string;\n $gap?: number;\n}>`\n ${({ $renderAs, $gap }) =>\n $renderAs === \"grid\" &&\n css`\n display: grid;\n grid-gap: ${$gap ? `${$gap}px` : \"initial\"};\n grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));\n `}\n ${(props) =>\n props.$renderAs === \"list\" &&\n css`\n display: flex;\n flex-direction: column;\n `}\n`;\nStyledEntityGroup.displayName = \"StyledEntityGroup\";\n\nexport const StyledEntityActions = styled(\"div\")<{ $renderAs?: string }>`\n display: flex;\n flex-direction: column;\n align-items: center;\n\n ${({ $renderAs }) =>\n $renderAs === \"grid\" &&\n css`\n position: absolute;\n right: 16px;\n top: 20px;\n `}\n\n ${({ $renderAs }) =>\n $renderAs === \"list\" &&\n css`\n justify-self: flex-end;\n `}\n`;\n"],"file":"Styles.js"}
|
|
@@ -9,6 +9,8 @@ exports.StyledOptionText = exports.StyledOptionIndicator = exports.StyledOptionC
|
|
|
9
9
|
|
|
10
10
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
11
11
|
|
|
12
|
+
var _Typography = require("../../Typography");
|
|
13
|
+
|
|
12
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
15
|
|
|
14
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -30,8 +32,7 @@ var StyledOptionIndicator = _styledComponents.default.div.withConfig({
|
|
|
30
32
|
|
|
31
33
|
exports.StyledOptionIndicator = StyledOptionIndicator;
|
|
32
34
|
StyledOptionIndicator.displayName = "StyledOptionIndicator";
|
|
33
|
-
|
|
34
|
-
var StyledOptionText = _styledComponents.default.span.withConfig({
|
|
35
|
+
var StyledOptionText = (0, _styledComponents.default)(_Typography.Body2).withConfig({
|
|
35
36
|
displayName: "Styles__StyledOptionText",
|
|
36
37
|
componentId: "sc-6fiqyy-2"
|
|
37
38
|
})(["", " flex-grow:1;line-height:28px;padding-right:10px;", ""], {
|
|
@@ -41,7 +42,6 @@ var StyledOptionText = _styledComponents.default.span.withConfig({
|
|
|
41
42
|
}, function (props) {
|
|
42
43
|
return props.textColor && (0, _styledComponents.css)(["color:", ";"], props.textColor);
|
|
43
44
|
});
|
|
44
|
-
|
|
45
45
|
exports.StyledOptionText = StyledOptionText;
|
|
46
46
|
StyledOptionText.displayName = "StyledOptionText";
|
|
47
47
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Select/OptionContent/Styles.ts"],"names":["StyledOptionContentWrapper","styled","div","displayName","StyledOptionIndicator","props","backgroundColor","children","css","StyledOptionText","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Select/OptionContent/Styles.ts"],"names":["StyledOptionContentWrapper","styled","div","displayName","StyledOptionIndicator","props","backgroundColor","children","css","StyledOptionText","Body2","textColor","StyledAdditionalInfo","span"],"mappings":";;;;;;;;;AAAA;;AAEA;;;;;;AAEO,IAAMA,0BAA0B,GAAGC,0BAAOC,GAAV;AAAA;AAAA;AAAA,0HAAhC;;;AAUPF,0BAA0B,CAACG,WAA3B,GAAyC,4BAAzC;;AAEO,IAAMC,qBAAqB,GAAGH,0BAAOC,GAAV;AAAA;AAAA;AAAA,sFAM9B,UAACG,KAAD;AAAA,SACAA,KAAK,CAACC,eAAN,IACA,CAACD,KAAK,CAACE,QADP,QAEAC,qBAFA,8BAGsBH,KAAK,CAACC,eAH5B,CADA;AAAA,CAN8B,CAA3B;;;AAcPF,qBAAqB,CAACD,WAAtB,GAAoC,uBAApC;AAEO,IAAMM,gBAAgB,GAAG,+BAAOC,iBAAP,CAAH;AAAA;AAAA;AAAA,kEACvB;AAAA;AAAA;AAAA;AAAA,CADuB,EAKzB,UAACL,KAAD;AAAA,SACAA,KAAK,CAACM,SAAN,QACAH,qBADA,mBAEWH,KAAK,CAACM,SAFjB,CADA;AAAA,CALyB,CAAtB;;AAYPF,gBAAgB,CAACN,WAAjB,GAA+B,kBAA/B;;AAEO,IAAMS,oBAAoB,GAAGX,0BAAOY,IAAV;AAAA;AAAA;AAAA,wDAA1B;;;AAMPD,oBAAoB,CAACT,WAArB,GAAmC,sBAAnC","sourcesContent":["import styled, { css } from \"styled-components\";\nimport tw from \"twin.macro\";\nimport { Body2 } from \"../../Typography\";\n\nexport const StyledOptionContentWrapper = styled.div`\n display: flex;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n align-items: center;\n height: 100%;\n flex-grow: 1;\n`;\n\nStyledOptionContentWrapper.displayName = \"StyledOptionContentWrapper\";\n\nexport const StyledOptionIndicator = styled.div<{ backgroundColor?: string }>`\n height: 24px;\n width: 24px;\n border-radius: 100%;\n margin-right: 8px;\n flex-shrink: 0;\n ${(props) =>\n props.backgroundColor &&\n !props.children &&\n css`\n background-color: ${props.backgroundColor};\n `}\n`;\n\nStyledOptionIndicator.displayName = \"StyledOptionIndicator\";\n\nexport const StyledOptionText = styled(Body2)<{ textColor?: string }>`\n ${tw`tw-truncate`}\n flex-grow: 1;\n line-height: 28px;\n padding-right: 10px;\n ${(props) =>\n props.textColor &&\n css`\n color: ${props.textColor};\n `}\n`;\n\nStyledOptionText.displayName = \"StyledOptionText\";\n\nexport const StyledAdditionalInfo = styled.span`\n margin: 0 0 0 5px;\n line-height: 18px;\n flex-shrink: 0;\n`;\n\nStyledAdditionalInfo.displayName = \"StyledAdditionalInfo\";\n"],"file":"Styles.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Typography/Typography.tsx"],"names":["Typography","ref","variant","as","color","italic","tabularNums","letterSpacing","lineHeight","align","decoration","transform","overflow","whitespace","wordBreak","weight","className","children","props","Component","displayName"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Typography/Typography.tsx"],"names":["Typography","ref","variant","as","color","italic","tabularNums","letterSpacing","lineHeight","align","decoration","transform","overflow","whitespace","wordBreak","weight","className","children","props","Component","displayName"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;;;;;;;AA0EO,IAAMA,UAA0D,gBACrE,uBACE,gBAoBEC,GApBF,EAqBK;AAAA,0BAnBDC,OAmBC;AAAA,MAnBDA,OAmBC,6BAnBS,SAmBT;AAAA,MAlBDC,EAkBC,QAlBDA,EAkBC;AAAA,wBAjBDC,KAiBC;AAAA,MAjBDA,KAiBC,2BAjBO,SAiBP;AAAA,yBAhBDC,MAgBC;AAAA,MAhBDA,MAgBC,4BAhBQ,KAgBR;AAAA,8BAfDC,WAeC;AAAA,MAfDA,WAeC,iCAfa,KAeb;AAAA,gCAdDC,aAcC;AAAA,MAdDA,aAcC,mCAde,OAcf;AAAA,6BAbDC,UAaC;AAAA,MAbDA,UAaC,gCAbY,SAaZ;AAAA,wBAZDC,KAYC;AAAA,MAZDA,KAYC,2BAZO,MAYP;AAAA,6BAXDC,UAWC;AAAA,MAXDA,UAWC,gCAXY,MAWZ;AAAA,4BAVDC,SAUC;AAAA,MAVDA,SAUC,+BAVW,SAUX;AAAA,2BATDC,QASC;AAAA,MATDA,QASC,8BATU,SASV;AAAA,6BARDC,UAQC;AAAA,MARDA,UAQC,gCARY,SAQZ;AAAA,4BAPDC,SAOC;AAAA,MAPDA,SAOC,+BAPW,SAOX;AAAA,yBANDC,MAMC;AAAA,MANDA,MAMC,4BANQ,SAMR;AAAA,MALDC,SAKC,QALDA,SAKC;AAAA,MAJDC,QAIC,QAJDA,QAIC;AAAA,MAHEC,KAGF;;AACH,MAAMC,SAAS,GAAGhB,EAAE,IAAI,KAAxB;AACA,sBACE,6BAAC,wBAAD;AACE,IAAA,EAAE,EAAEgB,SADN;AAEE,IAAA,SAAS,EAAE,yBAAW,YAAX,EAAyBH,SAAzB,CAFb;AAGE,IAAA,OAAO,EAAEX,MAHX;AAIE,IAAA,YAAY,EAAEC,WAJhB;AAKE,IAAA,cAAc,EAAEC,aALlB;AAME,IAAA,WAAW,EAAEC,UANf;AAOE,IAAA,MAAM,EAAEC,KAPV;AAQE,IAAA,WAAW,EAAEC,UARf;AASE,IAAA,UAAU,EAAEC,SATd;AAUE,IAAA,SAAS,EAAEC,QAVb;AAWE,IAAA,WAAW,EAAEC,UAXf;AAYE,IAAA,UAAU,EAAEC,SAZd;AAaE,IAAA,QAAQ,EAAEZ,OAbZ;AAcE,IAAA,MAAM,EAAEE,KAdV;AAeE,IAAA,OAAO,EAAEW,MAfX;AAgBE,IAAA,GAAG,EAAEd;AAhBP,KAiBMiB,KAjBN,GAmBGD,QAnBH,CADF;AAuBD,CA/CH,CADK;;AAmDPjB,UAAU,CAACoB,WAAX,GAAyB,YAAzB","sourcesContent":["import React, { HTMLAttributes, forwardRef } from \"react\";\nimport classNames from \"classnames\";\nimport { StyledTypography } from \"./Styles\";\nimport {\n PolymorphicComponentPropsWithRef,\n PolymorphicRef,\n} from \"../../utils/types\";\n\nexport type Variant =\n | \"Title 1\"\n | \"Title 2\"\n | \"Header 2\"\n | \"Header 3\"\n | \"Body 1\"\n | \"Body 2\"\n | \"Caption 1\"\n | \"Caption 2\";\n\nexport interface ITypographyProps extends HTMLAttributes<HTMLElement> {\n /** Font color. */\n color?:\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"quaternary\"\n | \"theme-primary\"\n | \"theme-secondary\"\n | \"only-white\"\n | \"only-black\"\n | \"page-paper\"\n | \"success\"\n | \"alert\"\n | \"warning\";\n /** Tabular numbers. */\n tabularNums?: boolean;\n /** Italic font style. */\n italic?: boolean;\n /** Font letter spacing. */\n letterSpacing?: \"tight\" | \"regular\" | \"wide\";\n /** Font line height. */\n lineHeight?: \"tight\" | \"regular\" | \"loose\";\n /** Font align. */\n align?: \"left\" | \"center\" | \"right\" | \"justify\";\n /** Underline font style. */\n decoration?: \"underline\" | \"line-through\" | \"none\";\n /** Font transform. */\n transform?: \"uppercase\" | \"lowercase\" | \"capitalize\" | \"regular\";\n /** Font overflow. */\n overflow?: \"truncate\" | \"ellipsis\" | \"visible\";\n /** Font whitespace. */\n whitespace?:\n | \"regular\"\n | \"no-wrap\"\n | \"pre\"\n | \"pre-wrap\"\n | \"pre-line\"\n | \"break-spaces\";\n /** Font word break. */\n wordBreak?: \"regular\" | \"smart\" | \"all\";\n /** Custom className for styling. */\n className?: string;\n /** Element variant. */\n variant?: Variant;\n /** Font weight. */\n weight?: \"light\" | \"regular\" | \"medium\" | \"bold\";\n /** Font size. */\n size?: \"32\" | \"18\" | \"16\" | \"14\" | \"12\" | \"10\";\n}\n\nexport type TypographyProps<C extends React.ElementType> =\n PolymorphicComponentPropsWithRef<C, ITypographyProps>;\n\nexport type TypographyComponent = <C extends React.ElementType = \"div\">(\n props: TypographyProps<C>\n) => React.ReactElement | null;\n\nexport const Typography: TypographyComponent & { displayName?: string } =\n forwardRef(\n <C extends React.ElementType = \"div\">(\n {\n variant = \"Title 1\",\n as,\n color = \"primary\",\n italic = false,\n tabularNums = false,\n letterSpacing = \"tight\",\n lineHeight = \"regular\",\n align = \"left\",\n decoration = \"none\",\n transform = \"regular\",\n overflow = \"visible\",\n whitespace = \"regular\",\n wordBreak = \"regular\",\n weight = \"regular\",\n className,\n children,\n ...props\n }: TypographyProps<C>,\n ref?: PolymorphicRef<C>\n ) => {\n const Component = as || \"div\";\n return (\n <StyledTypography\n as={Component}\n className={classNames(\"typography\", className)}\n $italic={italic}\n $tabularNums={tabularNums}\n $letterSpacing={letterSpacing}\n $lineHeight={lineHeight}\n $align={align}\n $decoration={decoration}\n $transform={transform}\n $overflow={overflow}\n $whitespace={whitespace}\n $wordBreak={wordBreak}\n $variant={variant}\n $color={color}\n $weight={weight}\n ref={ref}\n {...props}\n >\n {children}\n </StyledTypography>\n );\n }\n );\n\nTypography.displayName = \"Typography\";\n"],"file":"Typography.js"}
|
|
@@ -784,6 +784,19 @@ Object.keys(_ProgressRing).forEach(function (key) {
|
|
|
784
784
|
});
|
|
785
785
|
});
|
|
786
786
|
|
|
787
|
+
var _EditableContent = require("./EditableContent");
|
|
788
|
+
|
|
789
|
+
Object.keys(_EditableContent).forEach(function (key) {
|
|
790
|
+
if (key === "default" || key === "__esModule") return;
|
|
791
|
+
if (key in exports && exports[key] === _EditableContent[key]) return;
|
|
792
|
+
Object.defineProperty(exports, key, {
|
|
793
|
+
enumerable: true,
|
|
794
|
+
get: function get() {
|
|
795
|
+
return _EditableContent[key];
|
|
796
|
+
}
|
|
797
|
+
});
|
|
798
|
+
});
|
|
799
|
+
|
|
787
800
|
var _Folder = require("./Folder");
|
|
788
801
|
|
|
789
802
|
Object.keys(_Folder).forEach(function (key) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from \"./Button\";\nexport * from \"./ButtonGroup\";\nexport * from \"./Breadcrumbs\";\nexport * from \"./CounterButton\";\nexport * from \"./Steppers\";\nexport * from \"./Tables\";\nexport * from \"./CompleteCheckbox\";\nexport * from \"./Paper\";\nexport * from \"./ScaleBar\";\nexport * from \"./Card\";\nexport * from \"./EntityCard\";\nexport * from \"./Signifier\";\nexport * from \"./Avatar\";\nexport * from \"./Tag\";\nexport * from \"./Loaders\";\nexport * from \"./Nav\";\nexport * from \"./Bubble\";\nexport * from \"./Input\";\nexport * from \"./Menu\";\nexport * from \"./Expanders\";\nexport * from \"./Pickers\";\nexport * from \"./DatePicker\";\nexport * from \"./List\";\nexport * from \"./MenuSelector\";\nexport * from \"./MultiAvatar\";\nexport * from \"./RadioButton\";\nexport * from \"./ScrollShadow\";\nexport * from \"./Icons\";\nexport * from \"./Textarea\";\nexport * from \"./Modal\";\nexport * from \"./Sheet\";\nexport * from \"./Header\";\nexport * from \"./AutoResizeTextarea\";\nexport * from \"./Overlay\";\nexport * from \"./Accordion\";\nexport * from \"./Choose\";\nexport * from \"./Links\";\nexport * from \"./SelectDate\";\nexport * from \"./Popper\";\nexport * from \"./ToastMessage\";\nexport * from \"./Tooltip\";\nexport * from \"./Transitions\";\nexport * from \"./Pressed\";\nexport * from \"./Window\";\nexport * from \"./ValueButton\";\nexport * from \"./Select\";\nexport * from \"./SelectTrigger\";\nexport * from \"./Dialog\";\nexport * from \"./ConfirmDialog\";\nexport * from \"./Checkbox\";\nexport * from \"./Toggle\";\nexport * from \"./Typography\";\nexport * from \"./Autocomplete\";\nexport * from \"./ComboBox\";\nexport * from \"./Button/AddToListButton\";\nexport * from \"./ProgressBar\";\nexport * from \"./Reactions\";\nexport * from \"./Label\";\nexport * from \"./GlobalStyle\";\nexport * from \"./ProgressRing\";\nexport * from \"./Folder\";\nexport * from \"./Chip\";\nexport * from \"./Trigger\";\nexport * from \"./Dot\";\nexport * from \"./Entity\";\nexport * from \"./Filter\";\nexport * from \"./Wizard\";\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAA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export * from \"./CounterButton\";\nexport * from \"./Steppers\";\nexport * from \"./Tables\";\nexport * from \"./CompleteCheckbox\";\nexport * from \"./Paper\";\nexport * from \"./ScaleBar\";\nexport * from \"./Card\";\nexport * from \"./EntityCard\";\nexport * from \"./Signifier\";\nexport * from \"./Avatar\";\nexport * from \"./Tag\";\nexport * from \"./Loaders\";\nexport * from \"./Nav\";\nexport * from \"./Bubble\";\nexport * from \"./Input\";\nexport * from \"./Menu\";\nexport * from \"./Expanders\";\nexport * from \"./Pickers\";\nexport * from \"./DatePicker\";\nexport * from \"./List\";\nexport * from \"./MenuSelector\";\nexport * from \"./MultiAvatar\";\nexport * from \"./RadioButton\";\nexport * from \"./ScrollShadow\";\nexport * from \"./Icons\";\nexport * from \"./Textarea\";\nexport * from \"./Modal\";\nexport * from \"./Sheet\";\nexport * from \"./Header\";\nexport * from \"./AutoResizeTextarea\";\nexport * from \"./Overlay\";\nexport * from \"./Accordion\";\nexport * from \"./Choose\";\nexport * from \"./Links\";\nexport * from \"./SelectDate\";\nexport * from \"./Popper\";\nexport * from \"./ToastMessage\";\nexport * from \"./Tooltip\";\nexport * from \"./Transitions\";\nexport * from \"./Pressed\";\nexport * from \"./Window\";\nexport * from \"./ValueButton\";\nexport * from \"./Select\";\nexport * from \"./SelectTrigger\";\nexport * from \"./Dialog\";\nexport * from \"./ConfirmDialog\";\nexport * from \"./Checkbox\";\nexport * from \"./Toggle\";\nexport * from \"./Typography\";\nexport * from \"./Autocomplete\";\nexport * from \"./ComboBox\";\nexport * from \"./Button/AddToListButton\";\nexport * from \"./ProgressBar\";\nexport * from \"./Reactions\";\nexport * from \"./Label\";\nexport * from \"./GlobalStyle\";\nexport * from \"./ProgressRing\";\nexport * from \"./EditableContent\";\nexport * from \"./Folder\";\nexport * from \"./Chip\";\nexport * from \"./Trigger\";\nexport * from \"./Dot\";\nexport * from \"./Entity\";\nexport * from \"./Filter\";\nexport * from \"./Wizard\";\n"],"file":"index.js"}
|
|
@@ -5,6 +5,10 @@ export interface ChipProps {
|
|
|
5
5
|
onClose?: React.MouseEventHandler<HTMLButtonElement>;
|
|
6
6
|
leftAdornment?: ReactNode;
|
|
7
7
|
size?: InputSize;
|
|
8
|
+
color?: string;
|
|
9
|
+
backgroundColor?: string;
|
|
10
|
+
closeClassName?: string;
|
|
11
|
+
isLabel?: boolean;
|
|
8
12
|
}
|
|
9
13
|
export declare const Chip: React.ForwardRefExoticComponent<ChipProps & Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "key" | "css" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "cs" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "tw">, keyof ChipProps> & React.RefAttributes<HTMLDivElement>>;
|
|
10
14
|
//# sourceMappingURL=Chip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../../src/components/Chip/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../../src/components/Chip/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,IAAI,2sJA2DhB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
var _excluded = ["leftAdornment", "label", "onClose", "size"];
|
|
3
|
+
var _excluded = ["leftAdornment", "label", "onClose", "size", "color", "backgroundColor", "closeClassName", "isLabel"];
|
|
4
4
|
import React, { useMemo } from "react";
|
|
5
5
|
import { ChipCloseIcon, ChipContainer, ChipTrigger } from "./Styles";
|
|
6
6
|
import { Typography } from "../Typography/Typography";
|
|
@@ -10,10 +10,18 @@ export var Chip = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
10
10
|
onClose = _ref.onClose,
|
|
11
11
|
_ref$size = _ref.size,
|
|
12
12
|
size = _ref$size === void 0 ? "regular" : _ref$size,
|
|
13
|
+
color = _ref.color,
|
|
14
|
+
backgroundColor = _ref.backgroundColor,
|
|
15
|
+
closeClassName = _ref.closeClassName,
|
|
16
|
+
isLabel = _ref.isLabel,
|
|
13
17
|
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
14
18
|
|
|
15
19
|
var showClose = typeof onClose === "function";
|
|
16
20
|
var variant = useMemo(function () {
|
|
21
|
+
if (isLabel) {
|
|
22
|
+
return "Caption 2";
|
|
23
|
+
}
|
|
24
|
+
|
|
17
25
|
switch (size) {
|
|
18
26
|
case "regular":
|
|
19
27
|
return "Body 2";
|
|
@@ -24,20 +32,24 @@ export var Chip = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24
32
|
default:
|
|
25
33
|
return "Caption 1";
|
|
26
34
|
}
|
|
27
|
-
}, [size]);
|
|
35
|
+
}, [isLabel, size]);
|
|
28
36
|
return /*#__PURE__*/React.createElement(ChipContainer, _extends({}, rest, {
|
|
29
37
|
ref: ref,
|
|
30
38
|
$size: size,
|
|
31
|
-
$showClose: showClose
|
|
39
|
+
$showClose: showClose,
|
|
40
|
+
$color: color,
|
|
41
|
+
$backgroundColor: backgroundColor,
|
|
42
|
+
$isLabel: isLabel,
|
|
43
|
+
"data-testid": "chip-container"
|
|
32
44
|
}), leftAdornment, /*#__PURE__*/React.createElement(Typography, {
|
|
33
45
|
variant: variant,
|
|
34
|
-
|
|
46
|
+
"data-testid": "chip-typography"
|
|
35
47
|
}, label), showClose ? /*#__PURE__*/React.createElement(ChipTrigger, {
|
|
36
48
|
$size: size,
|
|
37
49
|
onClick: onClose,
|
|
38
|
-
className:
|
|
50
|
+
className: closeClassName
|
|
39
51
|
}, /*#__PURE__*/React.createElement(ChipCloseIcon, {
|
|
40
|
-
fill: "currentColor"
|
|
52
|
+
fill: color ? color : "currentColor"
|
|
41
53
|
})) : null);
|
|
42
54
|
});
|
|
43
55
|
Chip.displayName = "Chip";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Chip/Chip.tsx"],"names":["React","useMemo","ChipCloseIcon","ChipContainer","ChipTrigger","Typography","Chip","forwardRef","ref","leftAdornment","label","onClose","size","rest","showClose","variant","displayName"],"mappings":";;;AAAA,OAAOA,KAAP,IAA2BC,OAA3B,QAA0C,OAA1C;AACA,SAASC,aAAT,EAAwBC,aAAxB,EAAuCC,WAAvC,QAA0D,UAA1D;AAEA,SAASC,UAAT,QAA2B,0BAA3B;
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Chip/Chip.tsx"],"names":["React","useMemo","ChipCloseIcon","ChipContainer","ChipTrigger","Typography","Chip","forwardRef","ref","leftAdornment","label","onClose","size","color","backgroundColor","closeClassName","isLabel","rest","showClose","variant","displayName"],"mappings":";;;AAAA,OAAOA,KAAP,IAA2BC,OAA3B,QAA0C,OAA1C;AACA,SAASC,aAAT,EAAwBC,aAAxB,EAAuCC,WAAvC,QAA0D,UAA1D;AAEA,SAASC,UAAT,QAA2B,0BAA3B;AAaA,OAAO,IAAMC,IAAI,gBAAGN,KAAK,CAACO,UAAN,CAIlB,gBAYEC,GAZF,EAaK;AAAA,MAXDC,aAWC,QAXDA,aAWC;AAAA,MAVDC,KAUC,QAVDA,KAUC;AAAA,MATDC,OASC,QATDA,OASC;AAAA,uBARDC,IAQC;AAAA,MARDA,IAQC,0BARM,SAQN;AAAA,MAPDC,KAOC,QAPDA,KAOC;AAAA,MANDC,eAMC,QANDA,eAMC;AAAA,MALDC,cAKC,QALDA,cAKC;AAAA,MAJDC,OAIC,QAJDA,OAIC;AAAA,MAHEC,IAGF;;AACH,MAAMC,SAAS,GAAG,OAAOP,OAAP,KAAmB,UAArC;AACA,MAAMQ,OAAO,GAAGlB,OAAO,CAAC,YAAM;AAC5B,QAAIe,OAAJ,EAAa;AACX,aAAO,WAAP;AACD;;AACD,YAAQJ,IAAR;AACE,WAAK,SAAL;AACE,eAAO,QAAP;;AACF,WAAK,KAAL;AACE,eAAO,QAAP;;AACF;AACE,eAAO,WAAP;AANJ;AAQD,GAZsB,EAYpB,CAACI,OAAD,EAAUJ,IAAV,CAZoB,CAAvB;AAaA,sBACE,oBAAC,aAAD,eACMK,IADN;AAEE,IAAA,GAAG,EAAET,GAFP;AAGE,IAAA,KAAK,EAAEI,IAHT;AAIE,IAAA,UAAU,EAAEM,SAJd;AAKE,IAAA,MAAM,EAAEL,KALV;AAME,IAAA,gBAAgB,EAAEC,eANpB;AAOE,IAAA,QAAQ,EAAEE,OAPZ;AAQE,mBAAa;AARf,MAUGP,aAVH,eAWE,oBAAC,UAAD;AAAY,IAAA,OAAO,EAAEU,OAArB;AAA8B,mBAAa;AAA3C,KACGT,KADH,CAXF,EAcGQ,SAAS,gBACR,oBAAC,WAAD;AACE,IAAA,KAAK,EAAEN,IADT;AAEE,IAAA,OAAO,EAAED,OAFX;AAGE,IAAA,SAAS,EAAEI;AAHb,kBAKE,oBAAC,aAAD;AAAe,IAAA,IAAI,EAAEF,KAAK,GAAGA,KAAH,GAAW;AAArC,IALF,CADQ,GAQN,IAtBN,CADF;AA0BD,CA1DiB,CAAb;AA6DPP,IAAI,CAACc,WAAL,GAAmB,MAAnB","sourcesContent":["import React, { ReactNode, useMemo } from \"react\";\nimport { ChipCloseIcon, ChipContainer, ChipTrigger } from \"./Styles\";\nimport { InputSize } from \"../Input/types\";\nimport { Typography } from \"../Typography/Typography\";\n\nexport interface ChipProps {\n label: string;\n onClose?: React.MouseEventHandler<HTMLButtonElement>;\n leftAdornment?: ReactNode;\n size?: InputSize;\n color?: string;\n backgroundColor?: string;\n closeClassName?: string;\n isLabel?: boolean;\n}\n\nexport const Chip = React.forwardRef<\n HTMLDivElement,\n ChipProps & Omit<React.ComponentPropsWithoutRef<\"div\">, keyof ChipProps>\n>(\n (\n {\n leftAdornment,\n label,\n onClose,\n size = \"regular\",\n color,\n backgroundColor,\n closeClassName,\n isLabel,\n ...rest\n },\n ref\n ) => {\n const showClose = typeof onClose === \"function\";\n const variant = useMemo(() => {\n if (isLabel) {\n return \"Caption 2\";\n }\n switch (size) {\n case \"regular\":\n return \"Body 2\";\n case \"big\":\n return \"Body 1\";\n default:\n return \"Caption 1\";\n }\n }, [isLabel, size]);\n return (\n <ChipContainer\n {...rest}\n ref={ref}\n $size={size}\n $showClose={showClose}\n $color={color}\n $backgroundColor={backgroundColor}\n $isLabel={isLabel}\n data-testid={\"chip-container\"}\n >\n {leftAdornment}\n <Typography variant={variant} data-testid={\"chip-typography\"}>\n {label}\n </Typography>\n {showClose ? (\n <ChipTrigger\n $size={size}\n onClick={onClose}\n className={closeClassName}\n >\n <ChipCloseIcon fill={color ? color : \"currentColor\"} />\n </ChipTrigger>\n ) : null}\n </ChipContainer>\n );\n }\n);\n\nChip.displayName = \"Chip\";\n"],"file":"Chip.js"}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
export declare const ChipContainer: import("styled-components").StyledComponent<"div", any, {
|
|
3
3
|
$showClose?: boolean | undefined;
|
|
4
4
|
$size?: string | undefined;
|
|
5
|
+
$color?: string | undefined;
|
|
6
|
+
$backgroundColor?: string | undefined;
|
|
7
|
+
$isLabel?: boolean | undefined;
|
|
5
8
|
}, never>;
|
|
6
9
|
export declare const ChipLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
7
10
|
export declare const ChipTrigger: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "form" | "slot" | "style" | "title" | "key" | "css" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "cs" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "tw"> & import("react").RefAttributes<HTMLButtonElement>>, any, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Chip/Styles.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Chip/Styles.ts"],"names":[],"mappings":";AAQA,eAAO,MAAM,aAAa;;;;;;SA+EzB,CAAC;AAIF,eAAO,MAAM,SAAS,qEAGrB,CAAC;AAIF,eAAO,MAAM,WAAW;;SA+BvB,CAAC;AAIF,eAAO,MAAM,aAAa,grPAEzB,CAAC"}
|
|
@@ -3,10 +3,11 @@ import { CloseSmallIcon } from "../Icons";
|
|
|
3
3
|
import { BoxSizingStyle } from "../BoxSizingStyle";
|
|
4
4
|
import { Trigger } from "../Trigger";
|
|
5
5
|
import { FontStyle } from "../FontStyle";
|
|
6
|
+
import { StyledTypography } from "../Typography/Styles";
|
|
6
7
|
export var ChipContainer = styled.div.withConfig({
|
|
7
8
|
displayName: "Styles__ChipContainer",
|
|
8
9
|
componentId: "sc-7s0bd1-0"
|
|
9
|
-
})(["min-width:44px;max-width:220px;", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", ""], {
|
|
10
|
+
})(["min-width:44px;max-width:220px;", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", "{", " ", "}", " ", " ", " ", " ", " ", " ", ""], {
|
|
10
11
|
"height": "1.5rem"
|
|
11
12
|
}, {
|
|
12
13
|
"borderRadius": "0.25rem"
|
|
@@ -30,6 +31,21 @@ export var ChipContainer = styled.div.withConfig({
|
|
|
30
31
|
"fontWeight": "400"
|
|
31
32
|
}, {
|
|
32
33
|
"backgroundColor": "var(--color-theme-400)"
|
|
34
|
+
}, StyledTypography, {
|
|
35
|
+
"flex": "1 1 0%"
|
|
36
|
+
}, {
|
|
37
|
+
"overflow": "hidden",
|
|
38
|
+
"textOverflow": "ellipsis",
|
|
39
|
+
"whiteSpace": "nowrap"
|
|
40
|
+
}, function (_ref) {
|
|
41
|
+
var $color = _ref.$color;
|
|
42
|
+
return $color && css(["", "{color:", ";}"], StyledTypography, $color);
|
|
43
|
+
}, function (_ref2) {
|
|
44
|
+
var $isLabel = _ref2.$isLabel;
|
|
45
|
+
return $isLabel && css(["", "{color:#303037;}"], StyledTypography);
|
|
46
|
+
}, function (_ref3) {
|
|
47
|
+
var $backgroundColor = _ref3.$backgroundColor;
|
|
48
|
+
return $backgroundColor && css(["background-color:", ";"], $backgroundColor);
|
|
33
49
|
}, function (props) {
|
|
34
50
|
return props.$showClose ? null : css(["", ""], {
|
|
35
51
|
"paddingRight": "0.375rem"
|
|
@@ -56,12 +72,14 @@ ChipLabel.displayName = "ChipLabel";
|
|
|
56
72
|
export var ChipTrigger = styled(Trigger).withConfig({
|
|
57
73
|
displayName: "Styles__ChipTrigger",
|
|
58
74
|
componentId: "sc-7s0bd1-2"
|
|
59
|
-
})(["", " ", " ", " &:hover{", "}", " ", " ", ""], {
|
|
75
|
+
})(["", " ", " ", " ", " &:hover{", "}", " ", " ", ""], {
|
|
60
76
|
"display": "flex"
|
|
61
77
|
}, {
|
|
62
78
|
"alignItems": "center"
|
|
63
79
|
}, {
|
|
64
80
|
"justifyContent": "center"
|
|
81
|
+
}, {
|
|
82
|
+
"marginLeft": "0.125rem"
|
|
65
83
|
}, {
|
|
66
84
|
"backgroundColor": "var(--color-theme-transparent-400)"
|
|
67
85
|
}, function (props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Chip/Styles.ts"],"names":["styled","css","CloseSmallIcon","BoxSizingStyle","Trigger","FontStyle","ChipContainer","div","props","$showClose","$size","displayName","ChipLabel","span","ChipTrigger","ChipCloseIcon"],"mappings":"AAAA,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,mBAA5B;AAEA,SAASC,cAAT,QAA+B,UAA/B;AACA,SAASC,cAAT,QAA+B,mBAA/B;AACA,SAASC,OAAT,QAAwB,YAAxB;AACA,SAASC,SAAT,QAA0B,cAA1B;AAEA,OAAO,IAAMC,aAAa,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/Chip/Styles.ts"],"names":["styled","css","CloseSmallIcon","BoxSizingStyle","Trigger","FontStyle","StyledTypography","ChipContainer","div","$color","$isLabel","$backgroundColor","props","$showClose","$size","displayName","ChipLabel","span","ChipTrigger","ChipCloseIcon"],"mappings":"AAAA,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,mBAA5B;AAEA,SAASC,cAAT,QAA+B,UAA/B;AACA,SAASC,cAAT,QAA+B,mBAA/B;AACA,SAASC,OAAT,QAAwB,YAAxB;AACA,SAASC,SAAT,QAA0B,cAA1B;AACA,SAASC,gBAAT,QAAiC,sBAAjC;AAEA,OAAO,IAAMC,aAAa,GAAGP,MAAM,CAACQ,GAAV;AAAA;AAAA;AAAA,+JASpB;AAAA;AAAA,CAToB,EAUpB;AAAA;AAAA,CAVoB,EAWpB;AAAA;AAAA,CAXoB,EAYpB;AAAA;AAAA,CAZoB,EAapB;AAAA;AAAA,CAboB,EAcpB;AAAA;AAAA,CAdoB,EAgBtBH,SAhBsB,EAiBtBF,cAjBsB,EAoBpB;AAAA;AAAA,CApBoB,EAqBpB;AAAA;AAAA,CArBoB,EAsBpB;AAAA;AAAA,CAtBoB,EAuBpB;AAAA;AAAA,CAvBoB,EAwBpB;AAAA;AAAA,CAxBoB,EA2BpB;AAAA;AAAA,CA3BoB,EA6BtBG,gBA7BsB,EA8BlB;AAAA;AAAA,CA9BkB,EA+BlB;AAAA;AAAA;AAAA;AAAA,CA/BkB,EAkCtB;AAAA,MAAGG,MAAH,QAAGA,MAAH;AAAA,SACAA,MAAM,IACNR,GADM,wBAEFK,gBAFE,EAGOG,MAHP,CADN;AAAA,CAlCsB,EA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BADA;AAAA,CAlBoB,EAyBpB,UAACW,KAAD;AAAA,SACAA,KAAK,CAACE,KAAN,KAAgB,KAAhB,IACAb,GADA,6BADA;AAAA,CAzBoB,CAAjB;AAiCPiB,WAAW,CAACH,WAAZ,GAA0B,aAA1B;AAEA,OAAO,IAAMI,aAAa,GAAGnB,MAAM,CAACE,cAAD,CAAT;AAAA;AAAA;AAAA,aACpB;AAAA;AAAA,CADoB,CAAnB;AAIPiB,aAAa,CAACJ,WAAd,GAA4B,eAA5B","sourcesContent":["import styled, { css } from \"styled-components\";\nimport tw from \"twin.macro\";\nimport { CloseSmallIcon } from \"../Icons\";\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { Trigger } from \"../Trigger\";\nimport { FontStyle } from \"../FontStyle\";\nimport { StyledTypography } from \"../Typography/Styles\";\n\nexport const ChipContainer = styled.div<{\n $showClose?: boolean;\n $size?: string;\n $color?: string;\n $backgroundColor?: string;\n $isLabel?: boolean;\n}>`\n min-width: 44px;\n max-width: 220px;\n ${tw`tw-h-6`}\n ${tw`tw-rounded`}\n ${tw`tw-flex`}\n ${tw`tw-items-center`}\n ${tw`tw-pl-1.5`}\n ${tw`tw-overflow-hidden`}\n\n ${FontStyle}\n ${BoxSizingStyle}\n\n // font\n ${tw`tw-text-body-2`}\n ${tw`tw-text-theme-900`}\n ${tw`tw-leading-regular`}\n ${tw`tw-tracking-regular`}\n ${tw`tw-font-regular`}\n\n // background\n ${tw`tw-bg-theme-400`}\n\n ${StyledTypography} {\n ${tw`tw-flex-1`}\n ${tw`tw-truncate`}\n }\n\n ${({ $color }) =>\n $color &&\n css`\n ${StyledTypography} {\n color: ${$color};\n }\n `}\n ${({ $isLabel }) =>\n $isLabel &&\n css`\n ${StyledTypography} {\n color: #303037;\n }\n `}\n\n ${({ $backgroundColor }) =>\n $backgroundColor &&\n css`\n background-color: ${$backgroundColor};\n `}\n\n ${(props) =>\n props.$showClose\n ? null\n : css`\n ${tw`tw-pr-1.5`}\n `}\n\n ${(props) =>\n props.$size === \"regular\" &&\n css`\n height: 24px;\n `}\n\n ${(props) =>\n props.$size === \"small\" &&\n css`\n height: 18px;\n `}\n\n ${(props) =>\n props.$size === \"big\" &&\n css`\n height: 30px;\n `}\n`;\n\nChipContainer.displayName = \"ChipContainer\";\n\nexport const ChipLabel = styled.span`\n ${tw`tw-w-full`}\n ${tw`tw-truncate`}\n`;\n\nChipLabel.displayName = \"ChipLabel\";\n\nexport const ChipTrigger = styled(Trigger)<{ $size?: string }>`\n ${tw`tw-flex`}\n ${tw`tw-items-center`}\n ${tw`tw-justify-center`}\n ${tw`tw-ml-0.5`}\n\n\n &:hover {\n ${tw`tw-bg-theme-transparent-400`}\n }\n\n ${(props) =>\n props.$size === \"regular\" &&\n css`\n height: 24px;\n width: 24px;\n `}\n\n ${(props) =>\n props.$size === \"small\" &&\n css`\n height: 18px;\n width: 18px;\n `}\n\n ${(props) =>\n props.$size === \"big\" &&\n css`\n height: 30px;\n width: 30px;\n `}\n`;\n\nChipTrigger.displayName = \"ChipTrigger\";\n\nexport const ChipCloseIcon = styled(CloseSmallIcon)`\n ${tw`tw-text-theme-700`}\n`;\n\nChipCloseIcon.displayName = \"ChipCloseIcon\";\n"],"file":"Styles.js"}
|
|
@@ -16,6 +16,7 @@ export interface IComboBoxProps extends Omit<IAutocompleteProps, "handleChange"
|
|
|
16
16
|
hiddenNumberText?: (hidden: number) => string;
|
|
17
17
|
inPortal?: boolean;
|
|
18
18
|
inputWrapperClassName?: string;
|
|
19
|
+
scrollWrapper?: boolean;
|
|
19
20
|
}
|
|
20
21
|
export declare const ComboBox: FC<IComboBoxProps>;
|
|
21
22
|
//# sourceMappingURL=ComboBox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.d.ts","sourceRoot":"","sources":["../../../../src/components/ComboBox/ComboBox.tsx"],"names":[],"mappings":"AAAA,OAAc,EACZ,EAAE,EAOH,MAAM,OAAO,CAAC;AAIf,OAAO,EACL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S,EAAE,MAAM,gBAAgB,CAAC;AAc3C,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,cAAc,GAAG,SAAS,CAAC;IAE5D,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,EAAE,CACT,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,KACxD,IAAI,CAAC;IAEV,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,UAAU,CAAC,EAAE,CAAC,CAAC,SAAS,gBAAgB,EACtC,IAAI,EAAE,CAAC,EACP,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,KAClB,GAAG,CAAC,OAAO,CAAC;IAEjB,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IAE9C,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,cAAc,CAgdvC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
import _styled from "styled-components";
|
|
4
|
-
var _excluded = ["options", "selected", "loading", "loadingText", "onChange", "placeholder", "handleEmptyAction", "disabled", "size", "invalid", "type", "renderChip", "forceCloseMenu", "renderOption", "limitChips", "hiddenNumberText", "inPortal", "inputWrapperClassName"];
|
|
4
|
+
var _excluded = ["options", "selected", "loading", "loadingText", "onChange", "placeholder", "handleEmptyAction", "disabled", "size", "invalid", "type", "renderChip", "forceCloseMenu", "renderOption", "limitChips", "hiddenNumberText", "inPortal", "inputWrapperClassName", "scrollWrapper"];
|
|
5
5
|
import React, { useCallback, useState, useEffect, useRef, useMemo, Fragment } from "react";
|
|
6
6
|
import { RadioButton } from "../RadioButton";
|
|
7
7
|
import { Autocomplete } from "../Autocomplete";
|
|
@@ -54,6 +54,7 @@ export var ComboBox = function ComboBox(_ref) {
|
|
|
54
54
|
_ref$inPortal = _ref.inPortal,
|
|
55
55
|
inPortal = _ref$inPortal === void 0 ? false : _ref$inPortal,
|
|
56
56
|
inputWrapperClassName = _ref.inputWrapperClassName,
|
|
57
|
+
scrollWrapper = _ref.scrollWrapper,
|
|
57
58
|
prop = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
58
59
|
|
|
59
60
|
var selectedName = useMemo(function () {
|
|
@@ -214,24 +215,39 @@ export var ComboBox = function ComboBox(_ref) {
|
|
|
214
215
|
"marginRight": "0.125rem"
|
|
215
216
|
}
|
|
216
217
|
})) : undefined;
|
|
218
|
+
|
|
219
|
+
var onClose = function onClose(e) {
|
|
220
|
+
e.preventDefault();
|
|
221
|
+
e.stopPropagation();
|
|
222
|
+
|
|
223
|
+
if (Array.isArray(selected) && selected.includes(option.id)) {
|
|
224
|
+
if (typeof onChange === "function") {
|
|
225
|
+
var newSelected = selected.filter(function (item) {
|
|
226
|
+
return item !== option.id;
|
|
227
|
+
});
|
|
228
|
+
onChange(newSelected);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
var showOnClose = true;
|
|
234
|
+
|
|
235
|
+
if (disabled) {
|
|
236
|
+
showOnClose = false;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (option.color) {
|
|
240
|
+
showOnClose = false;
|
|
241
|
+
}
|
|
242
|
+
|
|
217
243
|
return /*#__PURE__*/React.createElement(Chip, {
|
|
218
244
|
className: "c-combo-box-chip",
|
|
219
245
|
leftAdornment: leftAdornment,
|
|
220
246
|
label: option.name,
|
|
221
247
|
key: index,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
if (Array.isArray(selected) && selected.includes(option.id)) {
|
|
227
|
-
if (typeof onChange === "function") {
|
|
228
|
-
var newSelected = selected.filter(function (item) {
|
|
229
|
-
return item !== option.id;
|
|
230
|
-
});
|
|
231
|
-
onChange(newSelected);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
} : undefined,
|
|
248
|
+
backgroundColor: option.color,
|
|
249
|
+
isLabel: Boolean(option.color),
|
|
250
|
+
onClose: showOnClose ? onClose : undefined,
|
|
235
251
|
size: size
|
|
236
252
|
});
|
|
237
253
|
}, [disabled, onChange, renderChip, selected, size]);
|
|
@@ -292,7 +308,9 @@ export var ComboBox = function ComboBox(_ref) {
|
|
|
292
308
|
|
|
293
309
|
(_elementRef$current = elementRef.current) == null ? void 0 : _elementRef$current.focus();
|
|
294
310
|
},
|
|
295
|
-
$_css3: autoSize === "auto" ? "auto" : undefined
|
|
311
|
+
$_css3: autoSize === "auto" ? "auto" : undefined,
|
|
312
|
+
$_css4: autoSize === "auto" && scrollWrapper ? "scroll" : undefined,
|
|
313
|
+
$_css5: autoSize === "auto" && scrollWrapper ? "80px" : undefined
|
|
296
314
|
}, /*#__PURE__*/React.createElement(StyledChipWrapper, {
|
|
297
315
|
$autoSize: autoSize,
|
|
298
316
|
$open: open,
|
|
@@ -395,8 +413,12 @@ var _StyledTypography = _styled(Typography).withConfig({
|
|
|
395
413
|
var _StyledStyledInputWrapper = _styled(StyledInputWrapper).withConfig({
|
|
396
414
|
displayName: "ComboBox___StyledStyledInputWrapper",
|
|
397
415
|
componentId: "sc-uvsz9l-2"
|
|
398
|
-
})(["display:flex;justify-content:space-between;flex:1;height:", ";"], function (p) {
|
|
416
|
+
})(["display:flex;justify-content:space-between;flex:1;height:", ";overflow-y:", ";max-height:", ";"], function (p) {
|
|
399
417
|
return p.$_css3;
|
|
418
|
+
}, function (p) {
|
|
419
|
+
return p.$_css4;
|
|
420
|
+
}, function (p) {
|
|
421
|
+
return p.$_css5;
|
|
400
422
|
});
|
|
401
423
|
|
|
402
424
|
var _StyledTrigger = _styled(Trigger).withConfig({
|