diff --git a/example/src/__snapshots__/App.test.js.snap b/example/src/__snapshots__/App.test.js.snap index e4db26d7..d2ac7455 100644 --- a/example/src/__snapshots__/App.test.js.snap +++ b/example/src/__snapshots__/App.test.js.snap @@ -5,7 +5,7 @@ exports[`renders the expected elements 1`] = `
Success diff --git a/jest-puppeteer.config.js b/jest-puppeteer.config.js index a8453deb..2424d597 100644 --- a/jest-puppeteer.config.js +++ b/jest-puppeteer.config.js @@ -2,6 +2,7 @@ module.exports = { launch: { dumpio: true, headless: true, + args: ['--no-sandbox', '--disable-setuid-sandbox'] }, server: { command: 'yarn http-server storybook-static -p 6006', diff --git a/lib/components/Avatar/Avatar.d.ts b/lib/components/Avatar/Avatar.d.ts new file mode 100644 index 00000000..5d59acf7 --- /dev/null +++ b/lib/components/Avatar/Avatar.d.ts @@ -0,0 +1,12 @@ +import React from 'react'; +import { Override } from '../../shared'; +declare type AvatarProps = Override, { + username: string; + firstName: string; + lastName: string; + avatarUrl?: string; + size?: 'default' | 'big'; +}>; +declare const Avatar: ({ username, firstName, lastName, avatarUrl, size, ...rest }: AvatarProps) => React.JSX.Element; +export { Avatar }; +export type { AvatarProps }; diff --git a/lib/components/Avatar/Avatar.js b/lib/components/Avatar/Avatar.js new file mode 100644 index 00000000..21ec7d75 --- /dev/null +++ b/lib/components/Avatar/Avatar.js @@ -0,0 +1,89 @@ +"use strict"; +var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Avatar = void 0; +var react_1 = __importStar(require("react")); +var styled_components_1 = __importStar(require("styled-components")); +var hooks_1 = require("../../hooks"); +var theme_1 = require("../../theme"); +var AvatarContainer = styled_components_1.default.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n display: inline-block;\n color: ", ";\n text-align: center;\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n text-transform: uppercase;\n cursor: ", ";\n"], ["\n ", "\n display: inline-block;\n color: ", ";\n text-align: center;\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n text-transform: uppercase;\n cursor: ", ";\n"])), function (_a) { + var size = _a.size; + return size === 'default' + ? (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 32px;\n width: 32px;\n line-height: 32px;\n font-size: 15px;\n border-radius: 32px;\n "], ["\n height: 32px;\n width: 32px;\n line-height: 32px;\n font-size: 15px;\n border-radius: 32px;\n "]))) : (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 140px;\n width: 140px;\n line-height: 140px;\n font-size: 66px;\n border-radius: 140px;\n "], ["\n height: 140px;\n width: 140px;\n line-height: 140px;\n font-size: 66px;\n border-radius: 140px;\n "]))); +}, (0, theme_1.getColor)('white'), function (_a) { + var onClick = _a.onClick; + return (onClick ? 'pointer' : 'default'); +}); +var Avatar = function (_a) { + var username = _a.username, firstName = _a.firstName, lastName = _a.lastName, avatarUrl = _a.avatarUrl, _b = _a.size, size = _b === void 0 ? 'default' : _b, rest = __rest(_a, ["username", "firstName", "lastName", "avatarUrl", "size"]); + var theme = (0, hooks_1.useTheme)(); + var fallback = (firstName.trim().charAt(0) + lastName.trim().charAt(0) || username.substring(0, 2)).toLocaleUpperCase(); + var title = (firstName + " " + lastName).trim() || username; + var backgroundColor = (0, react_1.useMemo)(function () { + var colorId = username.split('').reduce(function (s, l) { return s + l.charCodeAt(0); }, 0); + var colors = [ + theme.colorAlternative.green120, + theme.colorAlternative.darkCyan120, + theme.colorAlternative.forestGreen120, + theme.colorAlternative.oliveGreen120, + theme.colorAlternative.blue120, + theme.colorAlternative.darkBlue120, + theme.colorAlternative.hotPink120, + theme.colorAlternative.red120, + theme.colorAlternative.coralRed120, + theme.colorAlternative.yellow120, + theme.colorAlternative.orange120, + theme.colorAlternative.chocolate120, + ]; + return colors[colorId % colors.length]; + }, [theme, username]); + var style = avatarUrl ? { backgroundImage: "url(" + avatarUrl + ")" } : { backgroundColor: backgroundColor }; + return (react_1.default.createElement(AvatarContainer, __assign({ size: size }, rest, { style: style, title: title }), avatarUrl ? '' : fallback)); +}; +exports.Avatar = Avatar; +var templateObject_1, templateObject_2, templateObject_3; +//# sourceMappingURL=Avatar.js.map \ No newline at end of file diff --git a/lib/components/Avatar/Avatar.js.map b/lib/components/Avatar/Avatar.js.map new file mode 100644 index 00000000..76bc8b80 --- /dev/null +++ b/lib/components/Avatar/Avatar.js.map @@ -0,0 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 No newline at end of file diff --git a/lib/components/Avatar/Avatars.d.ts b/lib/components/Avatar/Avatars.d.ts new file mode 100644 index 00000000..2c362e63 --- /dev/null +++ b/lib/components/Avatar/Avatars.d.ts @@ -0,0 +1,8 @@ +import React from 'react'; +import { Override } from '../../shared'; +declare type AvatarsProps = Override, { + max: number; +}>; +declare const Avatars: ({ max, children, ...rest }: AvatarsProps) => React.JSX.Element; +export { Avatars }; +export type { AvatarsProps }; diff --git a/lib/components/Avatar/Avatars.js b/lib/components/Avatar/Avatars.js new file mode 100644 index 00000000..28dd3a5d --- /dev/null +++ b/lib/components/Avatar/Avatars.js @@ -0,0 +1,71 @@ +"use strict"; +var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __rest = (this && this.__rest) || function (s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Avatars = void 0; +var react_1 = __importStar(require("react")); +var styled_components_1 = __importDefault(require("styled-components")); +var theme_1 = require("../../theme"); +var AvatarListContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-end;\n & > * {\n margin-right: -4px;\n position: relative;\n }\n"], ["\n display: flex;\n flex-direction: row-reverse;\n justify-content: flex-end;\n & > * {\n margin-right: -4px;\n position: relative;\n }\n"]))); +var RemainingAvatar = styled_components_1.default.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 32px;\n width: 32px;\n display: inline-block;\n border: 1px solid ", ";\n line-height: 32px;\n text-align: center;\n font-size: 15px;\n border-radius: 32px;\n background-color: ", ";\n"], ["\n height: 32px;\n width: 32px;\n display: inline-block;\n border: 1px solid ", ";\n line-height: 32px;\n text-align: center;\n font-size: 15px;\n border-radius: 32px;\n background-color: ", ";\n"])), (0, theme_1.getColor)('grey', 10), (0, theme_1.getColor)('white')); +var Avatars = function (_a) { + var max = _a.max, children = _a.children, rest = __rest(_a, ["max", "children"]); + var childrenArray = react_1.Children.toArray(children); + var displayedChildren = childrenArray.slice(0, max); + var remainingChildrenCount = childrenArray.length - max; + var reverseChildren = displayedChildren.reverse(); + return (react_1.default.createElement(AvatarListContainer, __assign({}, rest), + remainingChildrenCount > 0 && react_1.default.createElement(RemainingAvatar, null, + "+", + remainingChildrenCount), + reverseChildren)); +}; +exports.Avatars = Avatars; +var templateObject_1, templateObject_2; +//# sourceMappingURL=Avatars.js.map \ No newline at end of file diff --git a/lib/components/Avatar/Avatars.js.map b/lib/components/Avatar/Avatars.js.map new file mode 100644 index 00000000..d35cb9b4 --- /dev/null +++ b/lib/components/Avatar/Avatars.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Avatars.js","sourceRoot":"","sources":["../../../src/components/Avatar/Avatars.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAsC;AACtC,wEAAuC;AAEvC,qCAAwD;AAExD,IAAM,mBAAmB,GAAG,2BAAM,CAAC,GAAG,yNAAkC,sJAQvE,IAAA,CAAC;AAEF,IAAM,eAAe,GAAG,2BAAM,CAAC,IAAI,iRAAA,mFAIb,EAAoB,kHAKpB,EAAiB,KACtC,KANqB,IAAA,gBAAQ,EAAC,MAAM,EAAE,EAAE,CAAC,EAKpB,IAAA,gBAAQ,EAAC,OAAO,CAAC,CACtC,CAAC;AASF,IAAM,OAAO,GAAG,UAAC,EAAsC;IAArC,IAAA,GAAG,SAAA,EAAE,QAAQ,cAAA,EAAK,IAAI,cAAvB,mBAAwB,CAAD;IACtC,IAAM,aAAa,GAAG,gBAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjD,IAAM,iBAAiB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACtD,IAAM,sBAAsB,GAAG,aAAa,CAAC,MAAM,GAAG,GAAG,CAAC;IAC1D,IAAM,eAAe,GAAG,iBAAiB,CAAC,OAAO,EAAE,CAAC;IAEpD,OAAO,CACL,8BAAC,mBAAmB,eAAK,IAAI;QAC1B,sBAAsB,GAAG,CAAC,IAAI,8BAAC,eAAe;;YAAG,sBAAsB,CAAmB;QAC1F,eAAe,CACI,CACvB,CAAC;AACJ,CAAC,CAAC;AAEM,0BAAO"} \ No newline at end of file diff --git a/lib/components/Dropdown/Dropdown.d.ts b/lib/components/Dropdown/Dropdown.d.ts index 305c3a09..efb98cf2 100644 --- a/lib/components/Dropdown/Dropdown.d.ts +++ b/lib/components/Dropdown/Dropdown.d.ts @@ -6,7 +6,7 @@ declare type DropdownProps = Override, { declare const Dropdown: { ({ children, ...rest }: DropdownProps): React.JSX.Element; Overlay: { - ({ verticalPosition, horizontalPosition, dropdownOpenerVisible, fullWidth, parentRef, onClose, children, ...rest }: Omit, "children" | "onClose" | "verticalPosition" | "horizontalPosition" | "dropdownOpenerVisible" | "fullWidth" | "parentRef"> & { + ({ verticalPosition, horizontalPosition, dropdownOpenerVisible, fullWidth, parentRef, onClose, children, ...rest }: Omit, "verticalPosition" | "horizontalPosition" | "children" | "onClose" | "dropdownOpenerVisible" | "fullWidth" | "parentRef"> & { verticalPosition?: import("../../hooks/usePosition").VerticalPosition | undefined; horizontalPosition?: import("../../hooks/usePosition").HorizontalPosition | undefined; dropdownOpenerVisible?: boolean | undefined; diff --git a/lib/components/Input/BooleanInput/BooleanInput.d.ts b/lib/components/Input/BooleanInput/BooleanInput.d.ts index 4138b0e8..cd9b40f5 100644 --- a/lib/components/Input/BooleanInput/BooleanInput.d.ts +++ b/lib/components/Input/BooleanInput/BooleanInput.d.ts @@ -12,7 +12,7 @@ declare type BooleanInputProps = Override, ({ onChange?: (value: boolean) => void; clearLabel?: string; }) & { - readOnly: boolean; + readOnly?: boolean; yesLabel: string; noLabel: string; invalid?: boolean; diff --git a/lib/components/Input/BooleanInput/BooleanInput.js b/lib/components/Input/BooleanInput/BooleanInput.js index c48bd265..972c0d0c 100644 --- a/lib/components/Input/BooleanInput/BooleanInput.js +++ b/lib/components/Input/BooleanInput/BooleanInput.js @@ -84,7 +84,7 @@ var ContainerInvalid = styled_components_1.default.div(templateObject_13 || (tem var IconInvalidContainer = styled_components_1.default.span(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n margin: 2px 0;\n color: ", ";\n"], ["\n margin: 2px 0;\n color: ", ";\n"])), (0, theme_1.getColor)('red', 100)); var TextInvalidContainer = styled_components_1.default.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n font-size: 11px;\n padding-left: 4px;\n white-space: break-spaces;\n flex: 1;\n\n a {\n color: ", ";\n }\n"], ["\n font-size: 11px;\n padding-left: 4px;\n white-space: break-spaces;\n flex: 1;\n\n a {\n color: ", ";\n }\n"])), (0, theme_1.getColor)('red', 100)); var BooleanInput = react_1.default.forwardRef(function (_a, forwardedRef) { - var value = _a.value, readOnly = _a.readOnly, onChange = _a.onChange, _b = _a.clearable, clearable = _b === void 0 ? false : _b, yesLabel = _a.yesLabel, noLabel = _a.noLabel, clearLabel = _a.clearLabel, invalid = _a.invalid, children = _a.children, _c = _a.size, size = _c === void 0 ? 'normal' : _c, rest = __rest(_a, ["value", "readOnly", "onChange", "clearable", "yesLabel", "noLabel", "clearLabel", "invalid", "children", "size"]); + var value = _a.value, _b = _a.readOnly, readOnly = _b === void 0 ? false : _b, onChange = _a.onChange, _c = _a.clearable, clearable = _c === void 0 ? false : _c, yesLabel = _a.yesLabel, noLabel = _a.noLabel, clearLabel = _a.clearLabel, invalid = _a.invalid, children = _a.children, _d = _a.size, size = _d === void 0 ? 'normal' : _d, rest = __rest(_a, ["value", "readOnly", "onChange", "clearable", "yesLabel", "noLabel", "clearLabel", "invalid", "children", "size"]); var handleChange = (0, react_1.useCallback)(function (value) { if (!onChange) { return; diff --git a/lib/components/Input/BooleanInput/BooleanInput.js.map b/lib/components/Input/BooleanInput/BooleanInput.js.map index efce556f..581b6785 100644 --- a/lib/components/Input/BooleanInput/BooleanInput.js.map +++ b/lib/components/Input/BooleanInput/BooleanInput.js.map @@ -1 +1 @@ -{"version":3,"file":"BooleanInput.js","sourceRoot":"","sources":["../../../../src/components/Input/BooleanInput/BooleanInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAyD;AACzD,qEAA8C;AAC9C,wCAAwE;AACxE,wCAA+D;AAI/D,IAAM,qBAAqB,GA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GAAG,EAAE,YAAY,IACb,IAAI;QAER,8BAAC,QAAQ,IACP,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,mBACH,QAAQ,EACvB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE;gBACP,YAAY,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC,EACD,KAAK,EAAE,OAAO,kBACA,OAAO,EACrB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,IAET,OAAO,CACC;QAEX,8BAAC,SAAS,IACR,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,mBACH,QAAQ,EACvB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE;gBACP,YAAY,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC,EACD,KAAK,EAAE,QAAQ,kBACD,OAAO,EACrB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,IAET,QAAQ,CACC;QAEX,KAAK,KAAK,IAAI,IAAI,CAAC,QAAQ,IAAI,SAAS,IAAI,CAC3C,8BAAC,WAAW,IACV,OAAO,EAAE;gBACP,YAAY,CAAC,IAAI,CAAC,CAAC;YACrB,CAAC;YAED,8BAAC,qBAAqB,IAAC,IAAI,EAAE,EAAE,GAAI;YAClC,UAAU,CACC,CACf;QAEA,QAAQ,IAAI,CACX,8BAAC,aAAa;YACZ,8BAAC,oBAAoB,IAAC,IAAI,EAAE,EAAE,GAAI,CACpB,CACjB;QACA,OAAO,IAAI,QAAQ,IAAI,CACtB,8BAAC,gBAAgB;YACf,8BAAC,oBAAoB,QAAE,eAAK,CAAC,YAAY,CAAC,8BAAC,kBAAU,IAAC,IAAI,EAAE,EAAE,GAAI,CAAC,CAAwB;YAC3F,8BAAC,oBAAoB,QAAE,QAAQ,CAAwB,CACtC,CACpB,CACqB,CACzB,CAAC;AACJ,CAAC,CACF,CAAC;AAEM,oCAAY"} \ No newline at end of file +{"version":3,"file":"BooleanInput.js","sourceRoot":"","sources":["../../../../src/components/Input/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EAAE,EAAE,GAAI,CAAC,CAAwB;YAC3F,8BAAC,oBAAoB,QAAE,QAAQ,CAAwB,CACtC,CACpB,CACqB,CACzB,CAAC;AACJ,CAAC,CACF,CAAC;AAEM,oCAAY"} \ No newline at end of file diff --git a/lib/components/Input/MultiSelectInput/MultiSelectInput.d.ts b/lib/components/Input/MultiSelectInput/MultiSelectInput.d.ts index f1f85c99..f0edded2 100644 --- a/lib/components/Input/MultiSelectInput/MultiSelectInput.d.ts +++ b/lib/components/Input/MultiSelectInput/MultiSelectInput.d.ts @@ -22,11 +22,17 @@ declare type MultiMultiSelectInputProps = Override[] | ReactElement; verticalPosition?: VerticalPosition; onSubmit?: () => void; +} & ({ onNextPage?: () => void; onSearchChange?: (searchValue: string) => void; -}>; + disableInternalSearch?: false; +} | { + onNextPage: () => void; + onSearchChange: (searchValue: string) => void; + disableInternalSearch: true; +})>; declare const MultiSelectInput: { - ({ id, placeholder, invalid, value, invalidValue, emptyResultLabel, children, onChange, removeLabel, onSubmit, openLabel, readOnly, verticalPosition, onNextPage, onSearchChange, "aria-labelledby": ariaLabelledby, ...rest }: MultiMultiSelectInputProps): React.JSX.Element; + ({ id, placeholder, invalid, value, invalidValue, emptyResultLabel, children, onChange, removeLabel, onSubmit, openLabel, readOnly, verticalPosition, onNextPage, onSearchChange, disableInternalSearch, "aria-labelledby": ariaLabelledby, ...rest }: MultiMultiSelectInputProps): React.JSX.Element; Option: { ({ children, ...rest }: OptionProps): React.JSX.Element; displayName: string; diff --git a/lib/components/Input/MultiSelectInput/MultiSelectInput.js b/lib/components/Input/MultiSelectInput/MultiSelectInput.js index 2037088c..e34d59d5 100644 --- a/lib/components/Input/MultiSelectInput/MultiSelectInput.js +++ b/lib/components/Input/MultiSelectInput/MultiSelectInput.js @@ -85,9 +85,9 @@ var Option = function (_a) { return react_1.default.createElement("span", __assign({}, rest), children); }; var MultiSelectInput = function (_a) { - var id = _a.id, placeholder = _a.placeholder, invalid = _a.invalid, value = _a.value, _b = _a.invalidValue, invalidValue = _b === void 0 ? [] : _b, emptyResultLabel = _a.emptyResultLabel, _c = _a.children, children = _c === void 0 ? [] : _c, onChange = _a.onChange, removeLabel = _a.removeLabel, onSubmit = _a.onSubmit, openLabel = _a.openLabel, _d = _a.readOnly, readOnly = _d === void 0 ? false : _d, verticalPosition = _a.verticalPosition, onNextPage = _a.onNextPage, onSearchChange = _a.onSearchChange, ariaLabelledby = _a["aria-labelledby"], rest = __rest(_a, ["id", "placeholder", "invalid", "value", "invalidValue", "emptyResultLabel", "children", "onChange", "removeLabel", "onSubmit", "openLabel", "readOnly", "verticalPosition", "onNextPage", "onSearchChange", 'aria-labelledby']); - var _e = (0, react_1.useState)(''), searchValue = _e[0], setSearchValue = _e[1]; - var _f = (0, hooks_1.useBooleanState)(), dropdownIsOpen = _f[0], openOverlay = _f[1], closeOverlay = _f[2]; + var id = _a.id, placeholder = _a.placeholder, invalid = _a.invalid, value = _a.value, _b = _a.invalidValue, invalidValue = _b === void 0 ? [] : _b, emptyResultLabel = _a.emptyResultLabel, _c = _a.children, children = _c === void 0 ? [] : _c, onChange = _a.onChange, removeLabel = _a.removeLabel, onSubmit = _a.onSubmit, openLabel = _a.openLabel, _d = _a.readOnly, readOnly = _d === void 0 ? false : _d, verticalPosition = _a.verticalPosition, onNextPage = _a.onNextPage, onSearchChange = _a.onSearchChange, _e = _a.disableInternalSearch, disableInternalSearch = _e === void 0 ? false : _e, ariaLabelledby = _a["aria-labelledby"], rest = __rest(_a, ["id", "placeholder", "invalid", "value", "invalidValue", "emptyResultLabel", "children", "onChange", "removeLabel", "onSubmit", "openLabel", "readOnly", "verticalPosition", "onNextPage", "onSearchChange", "disableInternalSearch", 'aria-labelledby']); + var _f = (0, react_1.useState)(''), searchValue = _f[0], setSearchValue = _f[1]; + var _g = (0, hooks_1.useBooleanState)(), dropdownIsOpen = _g[0], openOverlay = _g[1], closeOverlay = _g[2]; var inputRef = (0, react_1.useRef)(null); var containerRef = (0, react_1.useRef)(null); var optionsContainerRef = (0, react_1.useRef)(null); @@ -106,12 +106,14 @@ var MultiSelectInput = function (_a) { indexedChips[value] = { code: value, label: children }; return indexedChips; }, {}); - var filteredChildren = validChildren.filter(function (_a) { - var props = _a.props; - var childValue = props.value; - var optionValue = childValue + props.children; - return !value.includes(childValue) && optionValue.toLowerCase().includes(searchValue.toLowerCase()); - }); + var filteredChildren = disableInternalSearch + ? validChildren + : validChildren.filter(function (_a) { + var props = _a.props; + var childValue = props.value; + var optionValue = childValue + props.children; + return !value.includes(childValue) && optionValue.toLowerCase().includes(searchValue.toLowerCase()); + }); var handleEnter = function () { if (filteredChildren.length > 0 && dropdownIsOpen) { var newValue = filteredChildren[0].props.value; diff --git a/lib/components/Input/MultiSelectInput/MultiSelectInput.js.map b/lib/components/Input/MultiSelectInput/MultiSelectInput.js.map index 950aa3e6..5d87cb5d 100644 --- a/lib/components/Input/MultiSelectInput/MultiSelectInput.js.map +++ b/lib/components/Input/MultiSelectInput/MultiSelectInput.js.map @@ -1 +1 @@ -{"version":3,"file":"MultiSelectInput.js","sourceRoot":"","sources":["../../../../src/components/Input/MultiSelectInput/MultiSelectInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA4E;AAC5E,wEAAuC;AACvC,0CAA2D;AAC3D,oCAA8C;AAC9C,kDAA+C;AAC/C,wCAA8E;AAC9E,wCAA2D;AAC3D,wCAA6C;AAC7C,yCAAiD;AACjD,8DAA2D;AAE3D,IAAM,yBAAyB,GAAG,2BAAM,CAAC,GAAG,6MAA+D,4DAI7F,EAAsD,qBAClD,EAA0F,qDAM3G,KAPa,UAAC,EAAU;QAAT,QAAQ,cAAA;IAAM,OAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;AAAtC,CAAsC,EAClD,UAAC,EAAiB;QAAhB,KAAK,WAAA,EAAE,QAAQ,cAAA;IAA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,CACF,gBAAgB,CAAC,GAAG,CAAC,UAAC,KAAK,EAAE,KAAK;gBAChC,OAAO,CACL,8BAAC,eAAe,IACd,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,EACtB,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,EAC7C,GAAG,EAAE,KAAK,KAAK,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,IAErE,eAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CACV,CACnB,CAAC;YACJ,CAAC,CAAC,CACH,CACgB,CACX,CACX,CACyB,CAC7B,CAAC;AACJ,CAAC,CAAC;AAKM,4CAAgB;AAHxB,MAAM,CAAC,WAAW,GAAG,yBAAyB,CAAC;AAC/C,gBAAgB,CAAC,MAAM,GAAG,MAAM,CAAC"} \ No newline at end of file +{"version":3,"file":"MultiSelectInput.js","sourceRoot":"","sources":["../../../../src/components/Input/MultiSelectInput/MultiSelectInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA4E;AAC5E,wEAAuC;AACvC,0CAA2D;AAC3D,oCAA8C;AAC9C,kDAA+C;AAC/C,wCAA8E;AAC9E,wCAA2D;AAC3D,wCAA6C;AAC7C,yCAAiD;AACjD,8DAA2D;AAE3D,IAAM,yBAAyB,GAAG,2BAAM,CAAC,GAAG,6MAA+D,4DAI7F,EAAsD,qBAClD,EAA0F,qDAM3G,KAPa,UAAC,EAAU;QAAT,QAAQ,cAAA;IAAM,OAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;AAAtC,CAAsC,EAClD,UAAC,EAAiB;QAAhB,KAAK,WAAA,EAAE,QAAQ,cAAA;IAAM,OAAA,CAAC,IAAI,KAAK,KAAK,IAAI,QAAQ,CAAC,CAAC,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AAE,gBAAgB,CAAwB,CAChE,CAAC,CAAC,CAAC,CACF,gBAAgB,CAAC,GAAG,CAAC,UAAC,KAAK,EAAE,KAAK;gBAChC,OAAO,CACL,8BAAC,eAAe,IACd,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,EACtB,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,EAC7C,GAAG,EAAE,KAAK,KAAK,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,IAErE,eAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CACV,CACnB,CAAC;YACJ,CAAC,CAAC,CACH,CACgB,CACX,CACX,CACyB,CAC7B,CAAC;AACJ,CAAC,CAAC;AAKM,4CAAgB;AAHxB,MAAM,CAAC,WAAW,GAAG,yBAAyB,CAAC;AAC/C,gBAAgB,CAAC,MAAM,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/lib/components/Input/SelectInput/SelectInput.d.ts b/lib/components/Input/SelectInput/SelectInput.d.ts index 8f9450d7..ba266c22 100644 --- a/lib/components/Input/SelectInput/SelectInput.d.ts +++ b/lib/components/Input/SelectInput/SelectInput.d.ts @@ -24,11 +24,17 @@ declare type SelectInputProps = Override void; onSearchChange?: (searchValue: string) => void; -}>; + disableInternalSearch?: false; +} | { + onNextPage: () => void; + onSearchChange: (searchValue: string) => void; + disableInternalSearch: true; +})>; declare const SelectInput: { - ({ id, placeholder, invalid, value, emptyResultLabel, children, onChange, clearable, clearLabel, openLabel, readOnly, verticalPosition, onNextPage, onSearchChange, "aria-labelledby": ariaLabelledby, ...rest }: SelectInputProps): React.JSX.Element; + ({ id, placeholder, invalid, value, emptyResultLabel, children, onChange, clearable, clearLabel, openLabel, readOnly, verticalPosition, onNextPage, onSearchChange, disableInternalSearch, "aria-labelledby": ariaLabelledby, ...rest }: SelectInputProps): React.JSX.Element; Option: import("styled-components").StyledComponent<"span", any, { value: string; }, never>; diff --git a/lib/components/Input/SelectInput/SelectInput.js b/lib/components/Input/SelectInput/SelectInput.js index 55948d6b..81af0a05 100644 --- a/lib/components/Input/SelectInput/SelectInput.js +++ b/lib/components/Input/SelectInput/SelectInput.js @@ -88,9 +88,9 @@ var OptionCollection = styled_components_1.default.div(templateObject_8 || (temp var Option = styled_components_1.default.span(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: block;\n line-height: 34px;\n min-height: 34px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"], ["\n display: block;\n line-height: 34px;\n min-height: 34px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"]))); var SelectInput = function (_a) { var _b; - var id = _a.id, placeholder = _a.placeholder, invalid = _a.invalid, value = _a.value, emptyResultLabel = _a.emptyResultLabel, children = _a.children, onChange = _a.onChange, _c = _a.clearable, clearable = _c === void 0 ? true : _c, _d = _a.clearLabel, clearLabel = _d === void 0 ? '' : _d, openLabel = _a.openLabel, _e = _a.readOnly, readOnly = _e === void 0 ? false : _e, verticalPosition = _a.verticalPosition, onNextPage = _a.onNextPage, onSearchChange = _a.onSearchChange, ariaLabelledby = _a["aria-labelledby"], rest = __rest(_a, ["id", "placeholder", "invalid", "value", "emptyResultLabel", "children", "onChange", "clearable", "clearLabel", "openLabel", "readOnly", "verticalPosition", "onNextPage", "onSearchChange", 'aria-labelledby']); - var _f = (0, react_1.useState)(''), searchValue = _f[0], setSearchValue = _f[1]; - var _g = (0, hooks_1.useBooleanState)(), dropdownIsOpen = _g[0], openOverlay = _g[1], closeOverlay = _g[2]; + var id = _a.id, placeholder = _a.placeholder, invalid = _a.invalid, value = _a.value, emptyResultLabel = _a.emptyResultLabel, children = _a.children, onChange = _a.onChange, _c = _a.clearable, clearable = _c === void 0 ? true : _c, _d = _a.clearLabel, clearLabel = _d === void 0 ? '' : _d, openLabel = _a.openLabel, _e = _a.readOnly, readOnly = _e === void 0 ? false : _e, verticalPosition = _a.verticalPosition, onNextPage = _a.onNextPage, onSearchChange = _a.onSearchChange, _f = _a.disableInternalSearch, disableInternalSearch = _f === void 0 ? false : _f, ariaLabelledby = _a["aria-labelledby"], rest = __rest(_a, ["id", "placeholder", "invalid", "value", "emptyResultLabel", "children", "onChange", "clearable", "clearLabel", "openLabel", "readOnly", "verticalPosition", "onNextPage", "onSearchChange", "disableInternalSearch", 'aria-labelledby']); + var _g = (0, react_1.useState)(''), searchValue = _g[0], setSearchValue = _g[1]; + var _h = (0, hooks_1.useBooleanState)(), dropdownIsOpen = _h[0], openOverlay = _h[1], closeOverlay = _h[2]; var inputRef = (0, react_1.useRef)(null); var containerRef = (0, react_1.useRef)(null); var firstOptionRef = (0, react_1.useRef)(null); @@ -106,14 +106,16 @@ var SelectInput = function (_a) { optionCodes.push(child.props.value); return optionCodes; }, []); - var filteredChildren = validChildren.filter(function (child) { - var _a; - var content = typeof child.props.children === 'string' ? child.props.children : ''; - var title = (_a = child.props.title) !== null && _a !== void 0 ? _a : ''; - var value = child.props.value; - var optionValue = value + content + title; - return optionValue.toLowerCase().includes(searchValue.toLowerCase()); - }); + var filteredChildren = disableInternalSearch + ? validChildren + : validChildren.filter(function (child) { + var _a; + var content = typeof child.props.children === 'string' ? child.props.children : ''; + var title = (_a = child.props.title) !== null && _a !== void 0 ? _a : ''; + var value = child.props.value; + var optionValue = value + content + title; + return optionValue.toLowerCase().includes(searchValue.toLowerCase()); + }); var currentValueElement = (_b = validChildren.find(function (child) { var childrenValue = child.props.value; return value === childrenValue; diff --git a/lib/components/Input/SelectInput/SelectInput.js.map b/lib/components/Input/SelectInput/SelectInput.js.map index 267d1ec5..b461832a 100644 --- a/lib/components/Input/SelectInput/SelectInput.js.map +++ b/lib/components/Input/SelectInput/SelectInput.js.map @@ -1 +1 @@ -{"version":3,"file":"SelectInput.js","sourceRoot":"","sources":["../../../../src/components/Input/SelectInput/SelectInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC;gBACrC,IAAI,GAAG,GAAG,SAAS,CAAC;gBACpB,QAAQ,KAAK,EAAE;oBACb,KAAK,CAAC;wBACJ,GAAG,GAAG,cAAc,CAAC;wBACrB,MAAM;oBACR,KAAK,gBAAgB,CAAC,MAAM,GAAG,CAAC;wBAC9B,GAAG,GAAG,aAAa,CAAC;wBACpB,MAAM;iBACT;gBACD,IAAI,KAAK,KAAK,UAAU,EAAE;oBACxB,GAAG,GAAG,iBAAiB,CAAC;iBACzB;gBAED,OAAO,CACL,8BAAC,eAAe,mBACD,UAAU,EACvB,GAAG,EAAE,UAAU,EACf,OAAO,EAAE,iBAAiB,CAAC,UAAU,CAAC,EACtC,SAAS,EAAE,mBAAmB,EAC9B,QAAQ,EAAE,CAAC,EACX,GAAG,EAAE,GAAG,IAEP,eAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CACV,CACnB,CAAC;YACJ,CAAC,CAAC,CACH,CACgB,CACX,CACX,CACoB,CACxB,CAAC;AACJ,CAAC,CAAC;AAKM,kCAAW;AAHnB,MAAM,CAAC,WAAW,GAAG,oBAAoB,CAAC;AAC1C,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC"} \ No newline at end of file +{"version":3,"file":"SelectInput.js","sourceRoot":"","sources":["../../../../src/components/Input/SelectInput/SelectInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CASe;AACf,wEAAuC;AACvC,0CAA8C;AAC9C,oCAA8C;AAC9C,wEAAqE;AACrE,2EAAwE;AACxE,wCAA8E;AAC9E,wCAA2D;AAC3D,wCAAwD;AACxD,8DAA2D;AAE3D,IAAM,oBAAoB,GAAG,2BAAM,CAAC,GAAG,6MAA+D,4DAIxF,EAAsD,qBAClD,EAA0F,qDAM3G,KAPa,UAAC,EAAU;QAAT,QAAQ,cAAA;IAAM,OAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS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,GAAG,GAAG,iBAAiB,CAAC;iBACzB;gBAED,OAAO,CACL,8BAAC,eAAe,mBACD,UAAU,EACvB,GAAG,EAAE,UAAU,EACf,OAAO,EAAE,iBAAiB,CAAC,UAAU,CAAC,EACtC,SAAS,EAAE,mBAAmB,EAC9B,QAAQ,EAAE,CAAC,EACX,GAAG,EAAE,GAAG,IAEP,eAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CACV,CACnB,CAAC;YACJ,CAAC,CAAC,CACH,CACgB,CACX,CACX,CACoB,CACxB,CAAC;AACJ,CAAC,CAAC;AAKM,kCAAW;AAHnB,MAAM,CAAC,WAAW,GAAG,oBAAoB,CAAC;AAC1C,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC"} \ No newline at end of file diff --git a/lib/components/Input/TableInput/TableInput.d.ts b/lib/components/Input/TableInput/TableInput.d.ts index ff7851f0..df4890ae 100644 --- a/lib/components/Input/TableInput/TableInput.d.ts +++ b/lib/components/Input/TableInput/TableInput.d.ts @@ -40,7 +40,7 @@ declare const TableInput: { highlighted?: boolean | undefined; inError?: boolean | undefined; }) => React.JSX.Element; - Boolean: React.FC, "onChange" | "value" | "clearLabel" | "yesLabel" | "noLabel" | "highlighted" | "inError" | "openDropdownLabel"> & { + Boolean: React.FC, "value" | "onChange" | "clearLabel" | "yesLabel" | "noLabel" | "highlighted" | "inError" | "openDropdownLabel"> & { value: boolean | null; onChange: (value: boolean | null) => void; yesLabel: string; diff --git a/lib/components/Input/TableInput/TableInputRow/TableInputRow.js b/lib/components/Input/TableInput/TableInputRow/TableInputRow.js index 1709b568..f3f855f6 100644 --- a/lib/components/Input/TableInput/TableInputRow/TableInputRow.js +++ b/lib/components/Input/TableInput/TableInputRow/TableInputRow.js @@ -70,7 +70,7 @@ var TableInputTr = styled_components_1.default.tr(templateObject_6 || (templateO return placeholderPosition === 'none' && (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n & > td {\n background: ", ";\n }\n "], ["\n & > td {\n background: ", ";\n }\n "])), getZebraBackgroundColor(highlighted, rowIndex)); }, function (_a) { var highlighted = _a.highlighted; - return highlighted && (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n & > td {\n &:before {\n content: '';\n border-bottom: 1px solid ", ";\n position: relative;\n width: 100%;\n display: block;\n height: 0;\n margin-top: -1px;\n }\n &:has(div) {\n background: red !important;\n }\n border-bottom-color: ", ";\n &:first-child {\n border-left: 1px solid ", ";\n }\n &:last-child {\n border-right: 1px solid ", ";\n }\n }\n "], ["\n & > td {\n &:before {\n content: '';\n border-bottom: 1px solid ", ";\n position: relative;\n width: 100%;\n display: block;\n height: 0;\n margin-top: -1px;\n }\n &:has(div) {\n background: red !important;\n }\n border-bottom-color: ", ";\n &:first-child {\n border-left: 1px solid ", ";\n }\n &:last-child {\n border-right: 1px solid ", ";\n }\n }\n "])), (0, theme_1.getColor)('blue', 100), (0, theme_1.getColor)('blue', 100), (0, theme_1.getColor)('blue', 100), (0, theme_1.getColor)('blue', 100)); + return highlighted && (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n & > td {\n &:before {\n content: '';\n border-bottom: 1px solid ", ";\n position: relative;\n width: 100%;\n display: block;\n height: 0;\n margin-top: -1px;\n }\n border-bottom-color: ", ";\n border-left-color: ", ";\n &:last-child {\n border-right-color: ", ";\n }\n }\n "], ["\n & > td {\n &:before {\n content: '';\n border-bottom: 1px solid ", ";\n position: relative;\n width: 100%;\n display: block;\n height: 0;\n margin-top: -1px;\n }\n border-bottom-color: ", ";\n border-left-color: ", ";\n &:last-child {\n border-right-color: ", ";\n }\n }\n "])), (0, theme_1.getColor)('blue', 100), (0, theme_1.getColor)('blue', 100), (0, theme_1.getColor)('blue', 100), (0, theme_1.getColor)('blue', 100)); }); var DragAndDropCell = (0, styled_components_1.default)(TableInputCell_1.TableInputCell)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n max-width: 26px;\n min-width: 26px;\n width: 26px;\n color: ", ";\n text-align: right;\n cursor: grab;\n vertical-align: middle;\n line-height: 0px !important;\n & > div {\n height: 39px;\n vertical-align: middle;\n line-height: 44px;\n }\n"], ["\n max-width: 26px;\n min-width: 26px;\n width: 26px;\n color: ", ";\n text-align: right;\n cursor: grab;\n vertical-align: middle;\n line-height: 0px !important;\n & > div {\n height: 39px;\n vertical-align: middle;\n line-height: 44px;\n }\n"])), (0, theme_1.getColor)('grey', 100)); var TableInputRow = (0, react_1.forwardRef)(function (_a, forwardedRef) { diff --git a/lib/components/Input/TableInput/TableInputRow/TableInputRow.js.map b/lib/components/Input/TableInput/TableInputRow/TableInputRow.js.map index a0cc8632..dbee4ded 100644 --- a/lib/components/Input/TableInput/TableInputRow/TableInputRow.js.map +++ b/lib/components/Input/TableInput/TableInputRow/TableInputRow.js.map @@ -1 +1 @@ -{"version":3,"file":"TableInputRow.js","sourceRoot":"","sources":["../../../../../src/components/Input/TableInput/TableInputRow/TableInputRow.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qEAA8C;AAC9C,6CAA+F;AAC/F,2CAA8D;AAE9D,0DAAuD;AACvD,2CAA0C;AAC1C,mEAAgE;AAChE,mFAAqG;AAErG,IAAM,uBAAuB,GAAqF,UAChH,WAAW,EACX,QAAQ;IAER,OAAO,WAAW,CAAC,CAAC,CAAC,IAAA,gBAAQ,EAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAA,gBAAQ,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAA,gBAAQ,EAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAC5G,CAAC,CAAC;AAEF,IAAM,YAAY,GAAG,2BAAM,CAAC,EAAE,obAO7B,uDAGuB,EAAoB,wMAYxC,EASC,oEAMD,EAUC,QAED,EAUC,UAED,EAMC,YAED,EAwBC,IACJ,KApFuB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AE;YACtB,kBAAkB,EAAE,CAAC;YACrB,SAAS,aAAT,SAAS,uBAAT,SAAS,EAAI,CAAC;SACf;IACH,CAAC,CAAC;IAEF,OAAO,CACL,8BAAC,YAAY,aACX,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,kBAAkB,IAAI,SAAS,EAC1C,kBAAkB,EAAE,kBAAkB,0BAChB,QAAQ,EAC9B,WAAW,EAAE,eAAe,EAC5B,WAAW,EAAE,oBAAoB,EACjC,WAAW,EAAE,eAAe,EAC5B,SAAS,EAAE,aAAa,EACxB,GAAG,EAAE,YAAY,EACjB,mBAAmB,EAAE,mBAAmB,EACxC,QAAQ,EAAE,QAAQ,IACd,IAAI;QAEP,kBAAkB,IAAI,CACrB,8BAAC,eAAe,IAAC,WAAW,EAAE,cAAM,OAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,QAAQ,CAAC,EAAvB,CAAuB,EAAE,SAAS,EAAE,SAAS,iBAAc,aAAa;YAC1G;gBACE,8BAAC,eAAO,IAAC,IAAI,EAAE,EAAE,GAAI,CACjB,CACU,CACnB;QACA,QAAQ,CACI,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAIM,sCAAa;AAFrB,aAAa,CAAC,WAAW,GAAG,gBAAgB,CAAC"} \ No newline at end of file +{"version":3,"file":"TableInputRow.js","sourceRoot":"","sources":["../../../../../src/components/Input/TableInput/TableInputRow/TableInputRow.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qEAA8C;AAC9C,6CAA+F;AAC/F,2CAA8D;AAE9D,0DAAuD;AACvD,2CAA0C;AAC1C,mEAAgE;AAChE,mFAAqG;AAErG,IAAM,uBAAuB,GAAqF,UAChH,WAAW,EACX,QAAQ;IAER,OAAO,WAAW,CAAC,CAAC,CAAC,IAAA,gBAAQ,EAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,KAAK,C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Ae,GAAG,UAAC,KAAqC;QAC5D,IAAI,kBAAkB,EAAE;YACtB,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC;YACxD,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,QAAQ,CAAC,CAAC;SACzB;IACH,CAAC,CAAC;IAEF,IAAM,aAAa,GAAG;QACpB,IAAI,kBAAkB,EAAE;YACtB,kBAAkB,EAAE,CAAC;YACrB,SAAS,aAAT,SAAS,uBAAT,SAAS,EAAI,CAAC;SACf;IACH,CAAC,CAAC;IAEF,OAAO,CACL,8BAAC,YAAY,aACX,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,kBAAkB,IAAI,SAAS,EAC1C,kBAAkB,EAAE,kBAAkB,0BAChB,QAAQ,EAC9B,WAAW,EAAE,eAAe,EAC5B,WAAW,EAAE,oBAAoB,EACjC,WAAW,EAAE,eAAe,EAC5B,SAAS,EAAE,aAAa,EACxB,GAAG,EAAE,YAAY,EACjB,mBAAmB,EAAE,mBAAmB,EACxC,QAAQ,EAAE,QAAQ,IACd,IAAI;QAEP,kBAAkB,IAAI,CACrB,8BAAC,eAAe,IAAC,WAAW,EAAE,cAAM,OAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,QAAQ,CAAC,EAAvB,CAAuB,EAAE,SAAS,EAAE,SAAS,iBAAc,aAAa;YAC1G;gBACE,8BAAC,eAAO,IAAC,IAAI,EAAE,EAAE,GAAI,CACjB,CACU,CACnB;QACA,QAAQ,CACI,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAIM,sCAAa;AAFrB,aAAa,CAAC,WAAW,GAAG,gBAAgB,CAAC"} \ No newline at end of file diff --git a/lib/components/Input/TagInput/TagInput.js b/lib/components/Input/TagInput/TagInput.js index 0af27c6e..e7045518 100644 --- a/lib/components/Input/TagInput/TagInput.js +++ b/lib/components/Input/TagInput/TagInput.js @@ -88,7 +88,10 @@ var Tag = styled_components_1.default.li(templateObject_3 || (templateObject_3 = return isErrored ? (0, theme_1.getColor)('red', 100) : readOnly ? (0, theme_1.getColor)('grey', 100) : (0, theme_1.getColor)('grey', 140); }); var TagText = styled_components_1.default.span(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"], ["\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"]))); -var InputContainer = styled_components_1.default.li(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n list-style-type: none;\n color: ", ";\n border: 0;\n flex: 1;\n padding: 0;\n align-items: center;\n display: flex;\n\n > input {\n border: 0;\n outline: 0;\n color: ", ";\n background-color: transparent;\n width: 100%;\n\n &::placeholder {\n opacity: 1;\n color: ", ";\n font-family: ", ";\n }\n }\n"], ["\n list-style-type: none;\n color: ", ";\n border: 0;\n flex: 1;\n padding: 0;\n align-items: center;\n display: flex;\n\n > input {\n border: 0;\n outline: 0;\n color: ", ";\n background-color: transparent;\n width: 100%;\n\n &::placeholder {\n opacity: 1;\n color: ", ";\n font-family: ", ";\n }\n }\n"])), (0, theme_1.getColor)('grey', 120), (0, theme_1.getColor)('grey', 120), (0, theme_1.getColor)('grey', 100), (0, theme_1.getFontFamily)('default')); +var InputContainer = styled_components_1.default.li(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n list-style-type: none;\n color: ", ";\n border: 0;\n flex: 1;\n padding: ", ";\n align-items: center;\n display: flex;\n\n > input {\n border: 0;\n outline: 0;\n color: ", ";\n background-color: transparent;\n width: 100%;\n\n &::placeholder {\n opacity: 1;\n color: ", ";\n font-family: ", ";\n }\n }\n"], ["\n list-style-type: none;\n color: ", ";\n border: 0;\n flex: 1;\n padding: ", ";\n align-items: center;\n display: flex;\n\n > input {\n border: 0;\n outline: 0;\n color: ", ";\n background-color: transparent;\n width: 100%;\n\n &::placeholder {\n opacity: 1;\n color: ", ";\n font-family: ", ";\n }\n }\n"])), (0, theme_1.getColor)('grey', 120), function (_a) { + var hasTags = _a.hasTags; + return (hasTags ? '0' : '0 11px'); +}, (0, theme_1.getColor)('grey', 120), (0, theme_1.getColor)('grey', 100), (0, theme_1.getFontFamily)('default')); var ReadOnlyIcon = (0, styled_components_1.default)(icons_1.LockIcon)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: absolute;\n right: 0;\n top: 0;\n margin: 11px;\n color: ", ";\n"], ["\n position: absolute;\n right: 0;\n top: 0;\n margin: 11px;\n color: ", ";\n"])), (0, theme_1.getColor)('grey', 100)); var TagInput = function (_a) { var onChange = _a.onChange, placeholder = _a.placeholder, invalid = _a.invalid, _b = _a.value, value = _b === void 0 ? [] : _b, readOnly = _a.readOnly, onSubmit = _a.onSubmit, _c = _a.separators, separators = _c === void 0 ? ['\\s', ',', ';'] : _c, labels = _a.labels, _d = _a.invalidValue, invalidValue = _d === void 0 ? [] : _d, inputProps = __rest(_a, ["onChange", "placeholder", "invalid", "value", "readOnly", "onSubmit", "separators", "labels", "invalidValue"]); @@ -162,7 +165,7 @@ var TagInput = function (_a) { !readOnly && (react_1.default.createElement(RemoveTagIcon, { onClick: function () { return removeTag(index); }, "data-testid": "remove-" + index, "$isErrored": invalidValue.includes(tag) })), react_1.default.createElement(TagText, null, getLabel(tag)))); }), - react_1.default.createElement(InputContainer, { ref: inputContainerRef, onClick: focusOnInputField }, + react_1.default.createElement(InputContainer, { ref: inputContainerRef, onClick: focusOnInputField, hasTags: value.length > 0 }, react_1.default.createElement("input", __assign({ type: "text", "data-testid": "tag-input", ref: inputRef, placeholder: value.length === 0 ? placeholder : '', onKeyDown: handleKeyDown, onChange: onChangeCreateTags, onBlurCapture: onBlurCreateTag, "aria-invalid": invalid, readOnly: readOnly }, inputProps)), readOnly && react_1.default.createElement(ReadOnlyIcon, { size: 16 })))); }; diff --git a/lib/components/Input/TagInput/TagInput.js.map b/lib/components/Input/TagInput/TagInput.js.map index 5c3a623b..a254ac42 100644 --- a/lib/components/Input/TagInput/TagInput.js.map +++ b/lib/components/Input/TagInput/TagInput.js.map @@ -1 +1 @@ -{"version":3,"file":"TagInput.js","sourceRoot":"","sources":["../../../../src/components/Input/TagInput/TagInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA2F;AAC3F,wEAAuC;AACvC,wCAA0E;AAC1E,wCAAmD;AACnD,0CAA2D;AAG3D,IAAM,aAAa,GAAG,IAAA,2BAAM,EAAC,iBAAS,CAAC,sLAA2C,4GAMvE,EAA6E,KACvF,KADU,UAAC,EAAY;QAAX,UAAU,gBAAA;IAAM,OAAA,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,gBAAQ,EAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAA,gBAAQ,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAA3D,CAA2D,CACvF,CAAC;AAEF,IAAM,YAAY,GAAG,2BAAM,CAAC,EAAE,mXAAwC,wBAChD,EAAsE,8JAQ5E,EAAqE,0GAMzD,EAAoB,UAE/C,KAhBqB,UAAC,EAAS;QAAR,OAAO,aAAA;IAAM,OAAA,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,gBAAQ,EAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAA,gBAAQ,EAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAAvD,CAAuD,EAQ5E,UAAC,EAAU;QAAT,QAAQ,cAAA;IAAM,OAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAA,gBAAQ,EAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAA,gBAAQ,EAAC,OAAO,CAAC,CAAC;AAArD,CAAqD,EAMzD,IAAA,gBAAQ,EAAC,MAAM,EAAE,EAAE,CAAC,CAE/C,CAAC;AAEF,IAAM,GAAG,GAAG,2BAAM,CAAC,EAAE,mSAAk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AM,GAAG,CAAC;YAC3F,kDACE,IAAI,EAAC,MAAM,iBACC,WAAW,EACvB,GAAG,EAAE,QAAQ,EACb,WAAW,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAClD,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,kBAAkB,EAC5B,aAAa,EAAE,eAAe,kBAChB,OAAO,EACrB,QAAQ,EAAE,QAAQ,IACd,UAAU,EACd;YACD,QAAQ,IAAI,8BAAC,YAAY,IAAC,IAAI,EAAE,EAAE,GAAI,CACxB,CACJ,CAChB,CAAC;AACJ,CAAC,CAAC;AAEM,4BAAQ"} \ No newline at end of file diff --git a/lib/components/ProgressIndicator/ProgressIndicator.d.ts b/lib/components/ProgressIndicator/ProgressIndicator.d.ts index 8cb7e170..c929f05d 100644 --- a/lib/components/ProgressIndicator/ProgressIndicator.d.ts +++ b/lib/components/ProgressIndicator/ProgressIndicator.d.ts @@ -6,7 +6,7 @@ declare type ProgressIndicatorProps = Override, }>; declare const ProgressIndicator: { ({ children, ...rest }: ProgressIndicatorProps): React.JSX.Element; - Step: React.ForwardRefExoticComponent, "disabled" | "children" | "current" | "state" | "index"> & { + Step: React.ForwardRefExoticComponent, "current" | "disabled" | "children" | "state" | "index"> & { current?: boolean | undefined; state?: StepState | undefined; disabled?: boolean | undefined; diff --git a/lib/components/index.d.ts b/lib/components/index.d.ts index ab655abc..d37d222a 100644 --- a/lib/components/index.d.ts +++ b/lib/components/index.d.ts @@ -1,3 +1,5 @@ +export * from './Avatar/Avatar'; +export * from './Avatar/Avatars'; export * from './Badge/Badge'; export * from './Block/Block'; export * from './BlockButton/BlockButton'; diff --git a/lib/components/index.js b/lib/components/index.js index a61be7b1..404e70d1 100644 --- a/lib/components/index.js +++ b/lib/components/index.js @@ -10,6 +10,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./Avatar/Avatar"), exports); +__exportStar(require("./Avatar/Avatars"), exports); __exportStar(require("./Badge/Badge"), exports); __exportStar(require("./Block/Block"), exports); __exportStar(require("./BlockButton/BlockButton"), exports); diff --git a/lib/components/index.js.map b/lib/components/index.js.map index 89293735..03bdefb5 100644 --- a/lib/components/index.js.map +++ b/lib/components/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gDAA8B;AAC9B,gDAA8B;AAC9B,4DAA0C;AAC1C,0DAAwC;AACxC,kDAAgC;AAChC,8CAA4B;AAC5B,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,gDAA8B;AAC9B,kDAAgC;AAChC,0DAAwC;AACxC,sDAAoC;AACpC,gDAA8B;AAC9B,4DAA0C;AAC1C,0CAAwB;AACxB,wDAAsC;AACtC,8CAA4B;AAC5B,8CAA4B;AAC5B,kDAAgC;AAChC,0DAAwC;AACxC,gDAA8B;AAC9B,+CAA6B;AAC7B,0DAAwC;AACxC,8CAA4B;AAC5B,4DAA0C;AAC1C,oDAAkC;AAClC,4DAA0C;AAC1C,wEAAsD;AACtD,kDAAgC;AAChC,8DAA4C;AAC5C,kEAAgD;AAChD,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B;AAC5B,gDAA8B;AAC9B,oDAAkC;AAClC,8CAA4B;AAC5B,oDAAkC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAgC;AAChC,mDAAiC;AACjC,gDAA8B;AAC9B,gDAA8B;AAC9B,4DAA0C;AAC1C,0DAAwC;AACxC,kDAAgC;AAChC,8CAA4B;AAC5B,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,gDAA8B;AAC9B,kDAAgC;AAChC,0DAAwC;AACxC,sDAAoC;AACpC,gDAA8B;AAC9B,4DAA0C;AAC1C,0CAAwB;AACxB,wDAAsC;AACtC,8CAA4B;AAC5B,8CAA4B;AAC5B,kDAAgC;AAChC,0DAAwC;AACxC,gDAA8B;AAC9B,+CAA6B;AAC7B,0DAAwC;AACxC,8CAA4B;AAC5B,4DAA0C;AAC1C,oDAAkC;AAClC,4DAA0C;AAC1C,wEAAsD;AACtD,kDAAgC;AAChC,8DAA4C;AAC5C,kEAAgD;AAChD,kDAAgC;AAChC,gDAA8B;AAC9B,8CAA4B;AAC5B,gDAA8B;AAC9B,oDAAkC;AAClC,8CAA4B;AAC5B,oDAAkC"} \ No newline at end of file diff --git a/package.json b/package.json index d6c376da..c3b0f955 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "akeneo-design-system", - "version": "0.1.226", + "version": "0.1.227", "description": "Akeneo design system", "main": "lib/index.js", "scripts": { diff --git a/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-avatar-avatar-list-correctly-1-snap.png b/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-avatar-avatar-list-correctly-1-snap.png new file mode 100644 index 00000000..9b3c7935 Binary files /dev/null and b/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-avatar-avatar-list-correctly-1-snap.png differ diff --git a/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-avatar-avatar-size-correctly-1-snap.png b/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-avatar-avatar-size-correctly-1-snap.png new file mode 100644 index 00000000..1e695208 Binary files /dev/null and b/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-avatar-avatar-size-correctly-1-snap.png differ diff --git a/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-avatar-background-colors-correctly-1-snap.png b/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-avatar-background-colors-correctly-1-snap.png new file mode 100644 index 00000000..4f63adac Binary files /dev/null and b/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-avatar-background-colors-correctly-1-snap.png differ diff --git a/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-avatar-standard-correctly-1-snap.png b/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-avatar-standard-correctly-1-snap.png new file mode 100644 index 00000000..84053f15 Binary files /dev/null and b/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-avatar-standard-correctly-1-snap.png differ diff --git a/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-avatar-with-image-correctly-1-snap.png b/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-avatar-with-image-correctly-1-snap.png new file mode 100644 index 00000000..d5ac6fa3 Binary files /dev/null and b/src/__image_snapshots__/all-visual-tsx-visual-tests-renders-components-avatar-with-image-correctly-1-snap.png differ diff --git a/src/components/Avatar/Avatar.stories.mdx b/src/components/Avatar/Avatar.stories.mdx new file mode 100644 index 00000000..0ec0bfd2 --- /dev/null +++ b/src/components/Avatar/Avatar.stories.mdx @@ -0,0 +1,147 @@ +import {Meta, Story, ArgsTable, Canvas} from '@storybook/addon-docs'; +import {Avatar} from './Avatar.tsx'; +import {Avatars} from './Avatars.tsx'; + + + +# Avatar + +## Usage + +This component is used to display users avatars. If no avatar is available, first letters of the first and last name are +displayed with a dedicated color. + +## Playground + + + + {args => { + return ; + }} + + + + + +## Variation on background colors + +The background color is based from the username. + + + + {args => { + return ( + <> + + + + + + + + + + + + + + ); + }} + + + +## Variation with image + + + + {args => { + return ( + <> + + + ); + }} + + + +## Variation on List + +You can use a dedicated component to display avatar list. After a defined maximum, other avatars are not displayed. + + + + {args => { + return ( + <> + + + + + + + + + + + + + + + + ); + }} + + + +## Variation on Size + + + + {args => { + return ( + <> + + + + ); + }} + + diff --git a/src/components/Avatar/Avatar.tsx b/src/components/Avatar/Avatar.tsx new file mode 100644 index 00000000..7d79ef33 --- /dev/null +++ b/src/components/Avatar/Avatar.tsx @@ -0,0 +1,102 @@ +import React, {useMemo} from 'react'; +import styled, {css} from 'styled-components'; +import {useTheme} from '../../hooks'; +import {Override} from '../../shared'; +import {AkeneoThemedProps, getColor} from '../../theme'; + +const AvatarContainer = styled.span` + ${({size}) => + size === 'default' + ? css` + height: 32px; + width: 32px; + line-height: 32px; + font-size: 15px; + border-radius: 32px; + ` + : css` + height: 140px; + width: 140px; + line-height: 140px; + font-size: 66px; + border-radius: 140px; + `} + display: inline-block; + color: ${getColor('white')}; + text-align: center; + background-position: center; + background-repeat: no-repeat; + background-size: cover; + text-transform: uppercase; + cursor: ${({onClick}) => (onClick ? 'pointer' : 'default')}; +`; + +type AvatarProps = Override< + React.HTMLAttributes, + { + /** + * Username to use as fallback if the avatar is not provided and the Firstname and Lastname are empty. + */ + username: string; + + /** + * Firstname to use as fallback with the Lastname if the avatar is not provided. + */ + firstName: string; + + /** + * Lastname to use as fallback with the Firstname if the avatar is not provided. + */ + lastName: string; + + /** + * Url of the avatar image. + */ + avatarUrl?: string; + + /** + * Size of the avatar. + */ + size?: 'default' | 'big'; + } +>; + +const Avatar = ({username, firstName, lastName, avatarUrl, size = 'default', ...rest}: AvatarProps) => { + const theme = useTheme(); + + const fallback = ( + firstName.trim().charAt(0) + lastName.trim().charAt(0) || username.substring(0, 2) + ).toLocaleUpperCase(); + const title = `${firstName} ${lastName}`.trim() || username; + + const backgroundColor = useMemo(() => { + const colorId = username.split('').reduce((s, l) => s + l.charCodeAt(0), 0); + const colors = [ + theme.colorAlternative.green120, + theme.colorAlternative.darkCyan120, + theme.colorAlternative.forestGreen120, + theme.colorAlternative.oliveGreen120, + theme.colorAlternative.blue120, + theme.colorAlternative.darkBlue120, + theme.colorAlternative.hotPink120, + theme.colorAlternative.red120, + theme.colorAlternative.coralRed120, + theme.colorAlternative.yellow120, + theme.colorAlternative.orange120, + theme.colorAlternative.chocolate120, + ]; + + return colors[colorId % colors.length]; + }, [theme, username]); + + const style = avatarUrl ? {backgroundImage: `url(${avatarUrl})`} : {backgroundColor}; + + return ( + + {avatarUrl ? '' : fallback} + + ); +}; + +export {Avatar}; +export type {AvatarProps}; diff --git a/src/components/Avatar/Avatar.unit.tsx b/src/components/Avatar/Avatar.unit.tsx new file mode 100644 index 00000000..816f0397 --- /dev/null +++ b/src/components/Avatar/Avatar.unit.tsx @@ -0,0 +1,79 @@ +import React from 'react'; +import {render, screen} from '../../storybook/test-util'; +import {Avatar} from './Avatar'; + +test('renders', () => { + render(); + + const avatar = screen.getByTitle('John Doe'); + expect(avatar).toBeInTheDocument(); +}); + +test('avatar image', () => { + render(); + + const avatar = screen.getByTitle('John Doe'); + expect(avatar).toHaveStyle('background-image: url(path/to/image)'); +}); + +test('deterministic fallback color', () => { + render(); + + const avatar = screen.getByTitle('John Doe'); + expect(avatar).toHaveStyle('background-color: rgb(68, 31, 0)'); +}); + +test('fallback to firstname + lastname', () => { + render(); + + const avatar = screen.getByTitle('John Doe'); + expect(avatar).toHaveTextContent('JD'); +}); + +test('fallback to firstname only', () => { + render(); + + const avatar = screen.getByTitle('John'); + expect(avatar).toHaveTextContent('J'); +}); + +test('fallback to lastname only', () => { + render(); + + const avatar = screen.getByTitle('Doe'); + expect(avatar).toHaveTextContent('D'); +}); + +test('fallback to username', () => { + render(); + + const avatar = screen.getByTitle('john'); + expect(avatar).toHaveTextContent('JO'); +}); + +test('initial are converted to uppercase', () => { + render(); + + const avatar = screen.getByTitle('john doe'); + expect(avatar).toHaveTextContent('JD'); +}); + +test('size default', () => { + render(); + + const avatar = screen.getByTitle('John Doe'); + expect(avatar).toHaveStyle('width: 32px'); +}); + +test('size big', () => { + render(); + + const avatar = screen.getByTitle('John Doe'); + expect(avatar).toHaveStyle('width: 140px'); +}); + +test('supports ...rest props', () => { + render(); + + expect(screen.getByTestId('my_value')).toBeInTheDocument(); +}); diff --git a/src/components/Avatar/Avatars.tsx b/src/components/Avatar/Avatars.tsx new file mode 100644 index 00000000..dbd5a117 --- /dev/null +++ b/src/components/Avatar/Avatars.tsx @@ -0,0 +1,50 @@ +import React, {Children} from 'react'; +import styled from 'styled-components'; +import {Override} from '../../shared'; +import {AkeneoThemedProps, getColor} from '../../theme'; + +const AvatarListContainer = styled.div` + display: flex; + flex-direction: row-reverse; + justify-content: flex-end; + & > * { + margin-right: -4px; + position: relative; + } +`; + +const RemainingAvatar = styled.span` + height: 32px; + width: 32px; + display: inline-block; + border: 1px solid ${getColor('grey', 10)}; + line-height: 32px; + text-align: center; + font-size: 15px; + border-radius: 32px; + background-color: ${getColor('white')}; +`; + +type AvatarsProps = Override< + React.HTMLAttributes, + { + max: number; + } +>; + +const Avatars = ({max, children, ...rest}: AvatarsProps) => { + const childrenArray = Children.toArray(children); + const displayedChildren = childrenArray.slice(0, max); + const remainingChildrenCount = childrenArray.length - max; + const reverseChildren = displayedChildren.reverse(); + + return ( + + {remainingChildrenCount > 0 && +{remainingChildrenCount}} + {reverseChildren} + + ); +}; + +export {Avatars}; +export type {AvatarsProps}; diff --git a/src/components/Avatar/Avatars.unit.tsx b/src/components/Avatar/Avatars.unit.tsx new file mode 100644 index 00000000..2f8ac9ea --- /dev/null +++ b/src/components/Avatar/Avatars.unit.tsx @@ -0,0 +1,41 @@ +import React from 'react'; +import {render, screen} from '../../storybook/test-util'; +import {Avatar} from './Avatar'; +import {Avatars} from './Avatars'; + +test('renders multiple avatars', () => { + render( + + + + + ); + + expect(screen.getByTitle('John Doe')).toBeInTheDocument(); + expect(screen.getByTitle('Leonard Doe')).toBeInTheDocument(); +}); + +test('renders a maximum number of avatars', () => { + render( + + + + + ); + + expect(screen.getByTitle('John Doe')).toBeInTheDocument(); + expect(screen.queryByTitle('Leonard Doe')).not.toBeInTheDocument(); + expect(screen.getByText('+1')).toBeInTheDocument(); +}); + +test('renders no avatar', () => { + render(); + + expect(screen.queryByTitle('+1')).not.toBeInTheDocument(); +}); + +test('supports ...rest props', () => { + render(); + + expect(screen.getByTestId('my_value')).toBeInTheDocument(); +}); diff --git a/src/components/Input/BooleanInput/BooleanInput.tsx b/src/components/Input/BooleanInput/BooleanInput.tsx index 214cd7e0..f5b78c41 100644 --- a/src/components/Input/BooleanInput/BooleanInput.tsx +++ b/src/components/Input/BooleanInput/BooleanInput.tsx @@ -149,7 +149,7 @@ type BooleanInputProps = Override< clearLabel?: string; } ) & { - readOnly: boolean; + readOnly?: boolean; yesLabel: string; noLabel: string; invalid?: boolean; @@ -165,7 +165,7 @@ const BooleanInput = React.forwardRef( ( { value, - readOnly, + readOnly = false, onChange, clearable = false, yesLabel, diff --git a/src/components/Input/MultiSelectInput/MultiSelectInput.tsx b/src/components/Input/MultiSelectInput/MultiSelectInput.tsx index 05d0b6b4..7b196793 100644 --- a/src/components/Input/MultiSelectInput/MultiSelectInput.tsx +++ b/src/components/Input/MultiSelectInput/MultiSelectInput.tsx @@ -150,17 +150,24 @@ type MultiMultiSelectInputProps = Override< * Callback called when the user hit enter on the field. */ onSubmit?: () => void; - - /** - * Handler called when the next page is almost reached. - */ - onNextPage?: () => void; - - /** - * Handler called when the search value changed - */ - onSearchChange?: (searchValue: string) => void; - } + } & ( + | { + /** + * Handler called when the next page is almost reached. + */ + onNextPage?: () => void; + /** + * Handler called when the search value changed + */ + onSearchChange?: (searchValue: string) => void; + disableInternalSearch?: false; + } + | { + onNextPage: () => void; + onSearchChange: (searchValue: string) => void; + disableInternalSearch: true; + } + ) >; /** @@ -183,6 +190,7 @@ const MultiSelectInput = ({ verticalPosition, onNextPage, onSearchChange, + disableInternalSearch = false, 'aria-labelledby': ariaLabelledby, ...rest }: MultiMultiSelectInputProps) => { @@ -211,12 +219,14 @@ const MultiSelectInput = ({ return indexedChips; }, {}); - const filteredChildren = validChildren.filter(({props}) => { - const childValue = props.value; - const optionValue = childValue + props.children; + const filteredChildren = disableInternalSearch + ? validChildren + : validChildren.filter(({props}) => { + const childValue = props.value; + const optionValue = childValue + props.children; - return !value.includes(childValue) && optionValue.toLowerCase().includes(searchValue.toLowerCase()); - }); + return !value.includes(childValue) && optionValue.toLowerCase().includes(searchValue.toLowerCase()); + }); const handleEnter = () => { if (filteredChildren.length > 0 && dropdownIsOpen) { diff --git a/src/components/Input/MultiSelectInput/MultiSelectInput.unit.tsx b/src/components/Input/MultiSelectInput/MultiSelectInput.unit.tsx index c0e9ff24..b7ae72c0 100644 --- a/src/components/Input/MultiSelectInput/MultiSelectInput.unit.tsx +++ b/src/components/Input/MultiSelectInput/MultiSelectInput.unit.tsx @@ -77,6 +77,51 @@ test('it handles search', () => { expect(onChange).toHaveBeenCalledTimes(2); }); +test('it handles external search', () => { + const onChange = jest.fn(); + const onNextPage = jest.fn(); + const onSearchChange = jest.fn(); + + const observe = jest.fn(); + const unobserve = jest.fn(); + window.IntersectionObserver = jest.fn(() => ({ + observe, + unobserve, + })) as unknown as jest.Mock; + + render( + + English + French + German + Spanish + + ); + + const input = screen.getByRole('textbox'); + fireEvent.click(input); + fireEvent.change(input, {target: {value: 'Fr'}}); + + const germanOption = screen.queryByText('German'); + expect(germanOption).toBeInTheDocument(); + const usOption = screen.queryByText('English'); + expect(usOption).toBeInTheDocument(); + const spanishOption = screen.queryByText('Spanish'); + expect(spanishOption).toBeInTheDocument(); + const frenchOption = screen.getByText('French'); + expect(frenchOption).toBeInTheDocument(); +}); + test('it handles empty cases', () => { const onChange = jest.fn(); render( diff --git a/src/components/Input/SelectInput/SelectInput.tsx b/src/components/Input/SelectInput/SelectInput.tsx index f83c1aa8..cc675ffd 100644 --- a/src/components/Input/SelectInput/SelectInput.tsx +++ b/src/components/Input/SelectInput/SelectInput.tsx @@ -178,17 +178,24 @@ type SelectInputProps = Override< * Force the vertical position of the overlay. */ verticalPosition?: VerticalPosition; - - /** - * Handler called when the next page is almost reached. - */ - onNextPage?: () => void; - - /** - * Handler called when the search value changed - */ - onSearchChange?: (searchValue: string) => void; - } + } & ( + | { + /** + * Handler called when the next page is almost reached. + */ + onNextPage?: () => void; + /** + * Handler called when the search value changed + */ + onSearchChange?: (searchValue: string) => void; + disableInternalSearch?: false; + } + | { + onNextPage: () => void; + onSearchChange: (searchValue: string) => void; + disableInternalSearch: true; + } + ) >; /** @@ -209,6 +216,7 @@ const SelectInput = ({ verticalPosition, onNextPage, onSearchChange, + disableInternalSearch = false, 'aria-labelledby': ariaLabelledby, ...rest }: SelectInputProps) => { @@ -235,14 +243,16 @@ const SelectInput = ({ return optionCodes; }, []); - const filteredChildren = validChildren.filter(child => { - const content = typeof child.props.children === 'string' ? child.props.children : ''; - const title = child.props.title ?? ''; - const value = child.props.value; - const optionValue = value + content + title; + const filteredChildren = disableInternalSearch + ? validChildren + : validChildren.filter(child => { + const content = typeof child.props.children === 'string' ? child.props.children : ''; + const title = child.props.title ?? ''; + const value = child.props.value; + const optionValue = value + content + title; - return optionValue.toLowerCase().includes(searchValue.toLowerCase()); - }); + return optionValue.toLowerCase().includes(searchValue.toLowerCase()); + }); const currentValueElement = validChildren.find(child => { diff --git a/src/components/Input/SelectInput/SelectInput.unit.tsx b/src/components/Input/SelectInput/SelectInput.unit.tsx index b27153f5..da1abe9a 100644 --- a/src/components/Input/SelectInput/SelectInput.unit.tsx +++ b/src/components/Input/SelectInput/SelectInput.unit.tsx @@ -95,6 +95,58 @@ test('it handles search', () => { expect(onChange).toHaveBeenCalledWith('es_ES'); }); +test('it handles external search', () => { + const onChange = jest.fn(); + const onNextPage = jest.fn(); + const onSearchChange = jest.fn(); + + const observe = jest.fn(); + const unobserve = jest.fn(); + window.IntersectionObserver = jest.fn(() => ({ + observe, + unobserve, + })) as unknown as jest.Mock; + + render( + + + + + + Français + + + + + + + + + ); + + const input = screen.getByRole('textbox'); + fireEvent.click(input); + fireEvent.change(input, {target: {value: 'Français'}}); + + const germanOption = screen.queryByText('German'); + expect(germanOption).toBeInTheDocument(); + const usOption = screen.queryByText('English'); + expect(usOption).toBeInTheDocument(); + const spanishOption = screen.queryByText('Spanish'); + expect(spanishOption).toBeInTheDocument(); + const frenchOption = screen.getByText('Français'); + expect(frenchOption).toBeInTheDocument(); +}); + test('it handles empty cases', () => { const onChange = jest.fn(); render( diff --git a/src/components/Input/TableInput/TableInputRow/TableInputRow.tsx b/src/components/Input/TableInput/TableInputRow/TableInputRow.tsx index f694f095..a01608ff 100644 --- a/src/components/Input/TableInput/TableInputRow/TableInputRow.tsx +++ b/src/components/Input/TableInput/TableInputRow/TableInputRow.tsx @@ -96,15 +96,10 @@ const TableInputTr = styled.tr< height: 0; margin-top: -1px; } - &:has(div) { - background: red !important; - } border-bottom-color: ${getColor('blue', 100)}; - &:first-child { - border-left: 1px solid ${getColor('blue', 100)}; - } + border-left-color: ${getColor('blue', 100)}; &:last-child { - border-right: 1px solid ${getColor('blue', 100)}; + border-right-color: ${getColor('blue', 100)}; } } `} diff --git a/src/components/Input/TagInput/TagInput.tsx b/src/components/Input/TagInput/TagInput.tsx index 1a6a2139..8d1994ae 100644 --- a/src/components/Input/TagInput/TagInput.tsx +++ b/src/components/Input/TagInput/TagInput.tsx @@ -55,12 +55,12 @@ const TagText = styled.span` white-space: nowrap; `; -const InputContainer = styled.li` +const InputContainer = styled.li` list-style-type: none; color: ${getColor('grey', 120)}; border: 0; flex: 1; - padding: 0; + padding: ${({hasTags}) => (hasTags ? '0' : '0 11px')}; align-items: center; display: flex; @@ -255,7 +255,7 @@ const TagInput: FC = ({ ); })} - + 0}>