@activecollab/components 1.0.227 → 1.0.228
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.map +1 -1
- package/dist/cjs/components/ComboBox/ComboBox.js.map +1 -1
- package/dist/cjs/components/CounterButton/CounterButton.js.map +1 -1
- package/dist/cjs/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/cjs/components/EntityCard/EntityCard.js.map +1 -1
- package/dist/cjs/components/Header/Header.js.map +1 -1
- package/dist/cjs/components/Nav/Nav.js.map +1 -1
- package/dist/cjs/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/cjs/components/Sheet/Sheet.js.map +1 -1
- package/dist/cjs/components/Signifier/Signifier.js.map +1 -1
- package/dist/cjs/components/ValueButton/ValueButton.js.map +1 -1
- package/dist/esm/components/Chip/Chip.js.map +1 -1
- package/dist/esm/components/ComboBox/ComboBox.js.map +1 -1
- package/dist/esm/components/CounterButton/CounterButton.js.map +1 -1
- package/dist/esm/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/esm/components/EntityCard/EntityCard.js.map +1 -1
- package/dist/esm/components/Header/Header.js.map +1 -1
- package/dist/esm/components/Nav/Nav.js.map +1 -1
- package/dist/esm/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/esm/components/Sheet/Sheet.js.map +1 -1
- package/dist/esm/components/Signifier/Signifier.js.map +1 -1
- package/dist/esm/components/ValueButton/ValueButton.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Signifier.js","names":["React","useMemo","useState","useEffect","classnames","SwitchTransition","Tooltip","Body1","Caption1","StyledIcon","StyledSignifier","StyledSignifierTransition","signifierTypes","Signifier","Component","type","value","className","tooltipText","tooltipClassName","indexOf","displayName","console","warn","direction","setDirection","setPrevValue","label","max","newValue","Math","floor","v","renderSignifier","includes"],"sources":["../../../../src/components/Signifier/Signifier.tsx"],"sourcesContent":["import React, { FC, useMemo, ElementType, useState, useEffect } from \"react\";\nimport classnames from \"classnames\";\nimport { SwitchTransition } from \"react-transition-group\";\nimport { Tooltip } from \"../Tooltip\";\nimport { Body1, Caption1 } from \"../Typography\";\nimport {\n StyledIcon,\n StyledSignifier,\n StyledSignifierTransition,\n} from \"./Styles\";\n\ninterface ISignifierProps {\n /** One of icon types */\n type: ElementType;\n /** Number that represent total value */\n value?: number;\n /** Value that represent class names */\n className?: string;\n /** The text that will be displayed on hover in tooltip */\n tooltipText?: string;\n /** ClassName for tooltip if there is one */\n tooltipClassName?: string;\n}\n\nexport const signifierTypes = [\n \"EyeIcon\",\n \"EyeSmallIcon\",\n \"PencilIcon\",\n \"PencilSmallIcon\",\n \"EyeOffIcon\",\n \"EyeOffSmallIcon\",\n \"ChecklistIcon\",\n \"ChecklistSmallIcon\",\n \"WarningTriangleIcon\",\n \"WarningTriangleSmallIcon\",\n \"DependencyIcon\",\n \"DependencySmallIcon\",\n \"MessageIcon\",\n \"MessageSmallIcon\",\n \"ClockStopwatchIcon\",\n \"ClockStopwatchSmallIcon\",\n \"ClockIcon\",\n \"ClockSmallIcon\",\n \"DollarOffIcon\",\n \"DollarOffSmallIcon\",\n \"DollarIcon\",\n \"DollarSmallIcon\",\n \"DollarCheckmarkIcon\",\n \"DollarCheckmarkSmallIcon\",\n \"DollarClockIcon\",\n \"DollarClockSmallIcon\",\n \"BellOffIcon\",\n \"BellOffSmallIcon\",\n \"LockIcon\",\n \"LockSmallIcon\",\n \"RecurringCheckmarkIcon\",\n \"RecurringCheckmarkSmallIcon\",\n];\n\nexport const Signifier: FC<ISignifierProps> = ({\n type: Component,\n value = null,\n className,\n tooltipText,\n tooltipClassName,\n}) => {\n if (\n signifierTypes.indexOf(\n (Component as { displayName: string }).displayName\n ) === -1\n ) {\n console.warn(\"You are using unsupported Signifier icon\");\n }\n\n const [direction, setDirection] = useState(\"c-signifier--top\");\n const [, setPrevValue] = useState(value);\n\n const label: string | null = useMemo(() => {\n if (!value || value < 1) return null;\n\n const max = 1_000_000_000;\n let newValue = value;\n\n if (newValue > max) {\n newValue = max;\n }\n\n if (newValue === max) {\n return `${Math.floor(newValue / 1_000_000_000)}B+`;\n } else if (newValue > 999_999) {\n return `${Math.floor(newValue / 1_000_000)}M`;\n } else if (newValue > 999) {\n return `${Math.floor(newValue / 1000)}k`;\n }\n\n return `${newValue}`;\n }, [value]);\n\n useEffect(() => {\n value &&\n setPrevValue((v) => {\n v &&\n setDirection(\n v - value > 0 ? \"c-signifier--top\" : \"c-signifier--bottom\"\n );\n return value;\n });\n }, [value]);\n\n const renderSignifier = useMemo(\n () => (\n <StyledSignifier\n className={classnames(\"c-signifier\", className)}\n $direction={direction}\n >\n <StyledIcon as={Component} />\n {value !== null && (\n <SwitchTransition mode
|
|
1
|
+
{"version":3,"file":"Signifier.js","names":["React","useMemo","useState","useEffect","classnames","SwitchTransition","Tooltip","Body1","Caption1","StyledIcon","StyledSignifier","StyledSignifierTransition","signifierTypes","Signifier","Component","type","value","className","tooltipText","tooltipClassName","indexOf","displayName","console","warn","direction","setDirection","setPrevValue","label","max","newValue","Math","floor","v","renderSignifier","includes"],"sources":["../../../../src/components/Signifier/Signifier.tsx"],"sourcesContent":["import React, { FC, useMemo, ElementType, useState, useEffect } from \"react\";\nimport classnames from \"classnames\";\nimport { SwitchTransition } from \"react-transition-group\";\nimport { Tooltip } from \"../Tooltip\";\nimport { Body1, Caption1 } from \"../Typography\";\nimport {\n StyledIcon,\n StyledSignifier,\n StyledSignifierTransition,\n} from \"./Styles\";\n\ninterface ISignifierProps {\n /** One of icon types */\n type: ElementType;\n /** Number that represent total value */\n value?: number;\n /** Value that represent class names */\n className?: string;\n /** The text that will be displayed on hover in tooltip */\n tooltipText?: string;\n /** ClassName for tooltip if there is one */\n tooltipClassName?: string;\n}\n\nexport const signifierTypes = [\n \"EyeIcon\",\n \"EyeSmallIcon\",\n \"PencilIcon\",\n \"PencilSmallIcon\",\n \"EyeOffIcon\",\n \"EyeOffSmallIcon\",\n \"ChecklistIcon\",\n \"ChecklistSmallIcon\",\n \"WarningTriangleIcon\",\n \"WarningTriangleSmallIcon\",\n \"DependencyIcon\",\n \"DependencySmallIcon\",\n \"MessageIcon\",\n \"MessageSmallIcon\",\n \"ClockStopwatchIcon\",\n \"ClockStopwatchSmallIcon\",\n \"ClockIcon\",\n \"ClockSmallIcon\",\n \"DollarOffIcon\",\n \"DollarOffSmallIcon\",\n \"DollarIcon\",\n \"DollarSmallIcon\",\n \"DollarCheckmarkIcon\",\n \"DollarCheckmarkSmallIcon\",\n \"DollarClockIcon\",\n \"DollarClockSmallIcon\",\n \"BellOffIcon\",\n \"BellOffSmallIcon\",\n \"LockIcon\",\n \"LockSmallIcon\",\n \"RecurringCheckmarkIcon\",\n \"RecurringCheckmarkSmallIcon\",\n];\n\nexport const Signifier: FC<ISignifierProps> = ({\n type: Component,\n value = null,\n className,\n tooltipText,\n tooltipClassName,\n}) => {\n if (\n signifierTypes.indexOf(\n (Component as { displayName: string }).displayName\n ) === -1\n ) {\n console.warn(\"You are using unsupported Signifier icon\");\n }\n\n const [direction, setDirection] = useState(\"c-signifier--top\");\n const [, setPrevValue] = useState(value);\n\n const label: string | null = useMemo(() => {\n if (!value || value < 1) return null;\n\n const max = 1_000_000_000;\n let newValue = value;\n\n if (newValue > max) {\n newValue = max;\n }\n\n if (newValue === max) {\n return `${Math.floor(newValue / 1_000_000_000)}B+`;\n } else if (newValue > 999_999) {\n return `${Math.floor(newValue / 1_000_000)}M`;\n } else if (newValue > 999) {\n return `${Math.floor(newValue / 1000)}k`;\n }\n\n return `${newValue}`;\n }, [value]);\n\n useEffect(() => {\n value &&\n setPrevValue((v) => {\n v &&\n setDirection(\n v - value > 0 ? \"c-signifier--top\" : \"c-signifier--bottom\"\n );\n return value;\n });\n }, [value]);\n\n const renderSignifier = useMemo(\n () => (\n <StyledSignifier\n className={classnames(\"c-signifier\", className)}\n $direction={direction}\n >\n <StyledIcon as={Component} />\n {value !== null && (\n <SwitchTransition mode=\"out-in\">\n <StyledSignifierTransition\n key={label}\n timeout={300}\n classNames=\"c-signifier--animate\"\n >\n {(Component as { displayName: string }).displayName.includes(\n \"SmallIcon\"\n ) ? (\n <Caption1 color=\"secondary\">{label}</Caption1>\n ) : (\n <Body1 color=\"secondary\">{label}</Body1>\n )}\n </StyledSignifierTransition>\n </SwitchTransition>\n )}\n </StyledSignifier>\n ),\n [className, direction, Component, value, label]\n );\n\n return (\n <Tooltip\n title={tooltipText ?? \"\"}\n disable={!tooltipText}\n popperTooltipClassName={tooltipClassName}\n >\n {renderSignifier}\n </Tooltip>\n );\n};\n\nSignifier.displayName = \"Signifier\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAAQC,OAAO,EAAeC,QAAQ,EAAEC,SAAS,QAAQ,OAAO;AAC5E,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SAASC,OAAO,QAAQ,YAAY;AACpC,SAASC,KAAK,EAAEC,QAAQ,QAAQ,eAAe;AAC/C,SACEC,UAAU,EACVC,eAAe,EACfC,yBAAyB,QACpB,UAAU;AAejB,OAAO,IAAMC,cAAc,GAAG,CAC5B,SAAS,EACT,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,yBAAyB,EACzB,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,0BAA0B,EAC1B,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,wBAAwB,EACxB,6BAA6B,CAC9B;AAED,OAAO,IAAMC,SAA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,KAAK,GAAG,CAAC,GAAG,kBAAkB,GAAG,qBAAqB,CAC3D;MACH,OAAOA,KAAK;IACd,CAAC,CAAC;EACN,CAAC,EAAE,CAACA,KAAK,CAAC,CAAC;EAEX,IAAMiB,eAAe,GAAGhC,OAAO,CAC7B;IAAA,oBACE,oBAAC,eAAe;MACd,SAAS,EAAEG,UAAU,CAAC,aAAa,EAAEa,SAAS,CAAE;MAChD,UAAU,EAAEO;IAAU,gBAEtB,oBAAC,UAAU;MAAC,EAAE,EAAEV;IAAU,EAAG,EAC5BE,KAAK,KAAK,IAAI,iBACb,oBAAC,gBAAgB;MAAC,IAAI,EAAC;IAAQ,gBAC7B,oBAAC,yBAAyB;MACxB,GAAG,EAAEW,KAAM;MACX,OAAO,EAAE,GAAI;MACb,UAAU,EAAC;IAAsB,GAE/Bb,SAAS,CAA6BO,WAAW,CAACa,QAAQ,CAC1D,WAAW,CACZ,gBACC,oBAAC,QAAQ;MAAC,KAAK,EAAC;IAAW,GAAEP,KAAK,CAAY,gBAE9C,oBAAC,KAAK;MAAC,KAAK,EAAC;IAAW,GAAEA,KAAK,CAChC,CACyB,CAE/B,CACe;EAAA,CACnB,EACD,CAACV,SAAS,EAAEO,SAAS,EAAEV,SAAS,EAAEE,KAAK,EAAEW,KAAK,CAAC,CAChD;EAED,oBACE,oBAAC,OAAO;IACN,KAAK,EAAET,WAAW,WAAXA,WAAW,GAAI,EAAG;IACzB,OAAO,EAAE,CAACA,WAAY;IACtB,sBAAsB,EAAEC;EAAiB,GAExCc,eAAe,CACR;AAEd,CAAC;AAEDpB,SAAS,CAACQ,WAAW,GAAG,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValueButton.js","names":["React","forwardRef","StyledValueButton","StyledValueButtonLabel","StyledValueButtonValue","ValueButton","ref","active","alwaysShowIcon","icon","label","value","args","cloneElement","style","display","displayName"],"sources":["../../../../src/components/ValueButton/ValueButton.tsx"],"sourcesContent":["import React, { forwardRef, ReactElement } from \"react\";\nimport {\n StyledValueButton,\n StyledValueButtonLabel,\n StyledValueButtonValue,\n} from \"./Styles\";\n\ninterface IValueButtonProps {\n /** Set active state */\n active?: boolean;\n /** Label for value */\n label?: string;\n /** Value */\n value: string;\n /** Icon */\n icon?: ReactElement;\n /** Always show icon */\n alwaysShowIcon?: boolean;\n}\n\nexport const ValueButton = forwardRef<HTMLButtonElement, IValueButtonProps>(\n (\n { active = false, alwaysShowIcon = false, icon, label, value, ...args },\n ref\n ) => {\n return (\n <StyledValueButton\n className
|
|
1
|
+
{"version":3,"file":"ValueButton.js","names":["React","forwardRef","StyledValueButton","StyledValueButtonLabel","StyledValueButtonValue","ValueButton","ref","active","alwaysShowIcon","icon","label","value","args","cloneElement","style","display","displayName"],"sources":["../../../../src/components/ValueButton/ValueButton.tsx"],"sourcesContent":["import React, { forwardRef, ReactElement } from \"react\";\nimport {\n StyledValueButton,\n StyledValueButtonLabel,\n StyledValueButtonValue,\n} from \"./Styles\";\n\ninterface IValueButtonProps {\n /** Set active state */\n active?: boolean;\n /** Label for value */\n label?: string;\n /** Value */\n value: string;\n /** Icon */\n icon?: ReactElement;\n /** Always show icon */\n alwaysShowIcon?: boolean;\n}\n\nexport const ValueButton = forwardRef<HTMLButtonElement, IValueButtonProps>(\n (\n { active = false, alwaysShowIcon = false, icon, label, value, ...args },\n ref\n ) => {\n return (\n <StyledValueButton\n className=\"c-value-button\"\n {...args}\n ref={ref}\n variant=\"text gray\"\n $active={active}\n >\n {icon && alwaysShowIcon\n ? React.cloneElement(icon, {\n style: { display: \"inline-block\" },\n })\n : null}\n {label ? (\n <StyledValueButtonLabel\n color=\"secondary\"\n weight=\"medium\"\n className=\"c-value-button__label\"\n >\n {label}:\n </StyledValueButtonLabel>\n ) : null}\n <StyledValueButtonValue\n color=\"secondary\"\n weight=\"medium\"\n className=\"c-value-button__value\"\n >\n {value}\n </StyledValueButtonValue>\n </StyledValueButton>\n );\n }\n);\n\nValueButton.displayName = \"ValueButton\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAsB,OAAO;AACvD,SACEC,iBAAiB,EACjBC,sBAAsB,EACtBC,sBAAsB,QACjB,UAAU;AAejB,OAAO,IAAMC,WAAW,gBAAGJ,UAAU,CACnC,gBAEEK,GAAG,EACA;EAAA,uBAFDC,MAAM;IAANA,MAAM,4BAAG,KAAK;IAAA,2BAAEC,cAAc;IAAdA,cAAc,oCAAG,KAAK;IAAEC,IAAI,QAAJA,IAAI;IAAEC,KAAK,QAALA,KAAK;IAAEC,KAAK,QAALA,KAAK;IAAKC,IAAI;EAGrE,oBACE,oBAAC,iBAAiB;IAChB,SAAS,EAAC;EAAgB,GACtBA,IAAI;IACR,GAAG,EAAEN,GAAI;IACT,OAAO,EAAC,WAAW;IACnB,OAAO,EAAEC;EAAO,IAEfE,IAAI,IAAID,cAAc,gBACnBR,KAAK,CAACa,YAAY,CAACJ,IAAI,EAAE;IACvBK,KAAK,EAAE;MAAEC,OAAO,EAAE;IAAe;EACnC,CAAC,CAAC,GACF,IAAI,EACPL,KAAK,gBACJ,oBAAC,sBAAsB;IACrB,KAAK,EAAC,WAAW;IACjB,MAAM,EAAC,QAAQ;IACf,SAAS,EAAC;EAAuB,GAEhCA,KAAK,MACiB,GACvB,IAAI,eACR,oBAAC,sBAAsB;IACrB,KAAK,EAAC,WAAW;IACjB,MAAM,EAAC,QAAQ;IACf,SAAS,EAAC;EAAuB,GAEhCC,KAAK,CACiB,CACP;AAExB,CAAC,CACF;AAEDN,WAAW,CAACW,WAAW,GAAG,aAAa"}
|