@deskpro/deskpro-ui 0.1.12 → 0.1.16
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/README.md +11 -8
- package/dist/cjs/components/AttachmentTag/AttachmentTag.d.ts.map +1 -1
- package/dist/cjs/components/AttachmentTag/AttachmentTag.js +1 -3
- package/dist/cjs/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/cjs/components/Avatar/Avatar.js +5 -11
- package/dist/cjs/components/Avatar/AvatarGroup.d.ts +1 -1
- package/dist/cjs/components/Avatar/AvatarGroup.d.ts.map +1 -1
- package/dist/cjs/components/Button/Button.d.ts +17 -9
- package/dist/cjs/components/Button/Button.d.ts.map +1 -1
- package/dist/cjs/components/Button/Button.js +93 -27
- package/dist/cjs/components/Button/styles.d.ts +6 -5
- package/dist/cjs/components/Button/styles.d.ts.map +1 -1
- package/dist/cjs/components/Button/styles.js +59 -39
- package/dist/cjs/components/Button/types.d.ts +19 -9
- package/dist/cjs/components/Button/types.d.ts.map +1 -1
- package/dist/cjs/components/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/cjs/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.js +1 -3
- package/dist/cjs/components/ColorInput/ColorInput.d.ts.map +1 -1
- package/dist/cjs/components/ColorInput/ColorInput.js +4 -8
- package/dist/cjs/components/DatePicker/index.d.ts +1 -1
- package/dist/cjs/components/DatePicker/index.d.ts.map +1 -1
- package/dist/cjs/components/Dialog/Dialog.d.ts +1 -1
- package/dist/cjs/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/cjs/components/Dialog/Dialog.js +1 -0
- package/dist/cjs/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/cjs/components/Dropdown/Dropdown.js +5 -11
- package/dist/cjs/components/Dropdown/types.d.ts.map +1 -1
- package/dist/cjs/components/Icon/DeskproCustomIcon.d.ts +5 -4
- package/dist/cjs/components/Icon/DeskproCustomIcon.d.ts.map +1 -1
- package/dist/cjs/components/Icon/DeskproCustomIcon.js +2 -2
- package/dist/cjs/components/Icon/HeroIcon.d.ts +2 -2
- package/dist/cjs/components/Icon/HeroIcon.d.ts.map +1 -1
- package/dist/cjs/components/Icon/Icon.d.ts.map +1 -1
- package/dist/cjs/components/Icon/Icon.js +8 -16
- package/dist/cjs/components/Infinite/Infinite.d.ts.map +1 -1
- package/dist/cjs/components/Infinite/Infinite.js +5 -10
- package/dist/cjs/components/Infinite/InfiniteTopBottom.d.ts.map +1 -1
- package/dist/cjs/components/Infinite/InfiniteTopBottom.js +4 -8
- package/dist/cjs/components/IntlPhoneInput/IntlPhoneInput.d.ts +1 -1
- package/dist/cjs/components/IntlPhoneInput/IntlPhoneInput.d.ts.map +1 -1
- package/dist/cjs/components/IntlPhoneInput/IntlPhoneInput.js +2 -6
- package/dist/cjs/components/LabelTag/Tag.d.ts +1 -1
- package/dist/cjs/components/LabelTag/Tag.d.ts.map +1 -1
- package/dist/cjs/components/LabelTag/Tag.js +7 -6
- package/dist/cjs/components/Menu/Menu.d.ts +8 -16
- package/dist/cjs/components/Menu/Menu.d.ts.map +1 -1
- package/dist/cjs/components/Menu/Menu.js +2 -2
- package/dist/cjs/components/Modal/Modal.d.ts +1 -1
- package/dist/cjs/components/Modal/Modal.d.ts.map +1 -1
- package/dist/cjs/components/Modal/Modal.js +3 -9
- package/dist/cjs/components/OptionTag/OptionTag.d.ts.map +1 -1
- package/dist/cjs/components/OptionTag/OptionTag.js +1 -1
- package/dist/cjs/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/cjs/components/Pagination/Pagination.js +3 -4
- package/dist/cjs/components/Select/Select.d.ts.map +1 -1
- package/dist/cjs/components/Select/Select.js +5 -11
- package/dist/cjs/components/TabbedSection/Tabs.d.ts.map +1 -1
- package/dist/cjs/components/TabbedSection/Tabs.js +2 -2
- package/dist/cjs/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/cjs/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/cjs/components/Toggle/Toggle.js +4 -16
- package/dist/cjs/components/Tooltip/Tooltip.d.ts +4 -2
- package/dist/cjs/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.js +21 -8
- package/dist/cjs/nav/NavSidebar/NavSidebar.d.ts +1 -1
- package/dist/cjs/nav/NavSidebar/NavSidebar.d.ts.map +1 -1
- package/dist/cjs/nav/NavSidebar/NavSidebar.js +2 -6
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/components/AttachmentTag/AttachmentTag.js +1 -3
- package/dist/esm/components/Avatar/Avatar.js +5 -11
- package/dist/esm/components/Button/Button.js +92 -27
- package/dist/esm/components/Button/styles.js +58 -38
- package/dist/esm/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/esm/components/Checkbox/Checkbox.js +1 -3
- package/dist/esm/components/ColorInput/ColorInput.js +4 -8
- package/dist/esm/components/DatePicker/index.js +1 -1
- package/dist/esm/components/Dialog/Dialog.js +1 -0
- package/dist/esm/components/Dropdown/Dropdown.js +6 -12
- package/dist/esm/components/Icon/DeskproCustomIcon.js +3 -3
- package/dist/esm/components/Icon/Icon.js +8 -16
- package/dist/esm/components/Infinite/Infinite.js +6 -11
- package/dist/esm/components/Infinite/InfiniteTopBottom.js +5 -9
- package/dist/esm/components/IntlPhoneInput/IntlPhoneInput.js +3 -7
- package/dist/esm/components/LabelTag/Tag.js +7 -6
- package/dist/esm/components/Menu/Menu.js +3 -3
- package/dist/esm/components/Modal/Modal.js +3 -9
- package/dist/esm/components/OptionTag/OptionTag.js +1 -1
- package/dist/esm/components/Pagination/Pagination.js +4 -5
- package/dist/esm/components/Select/Select.js +5 -11
- package/dist/esm/components/TabbedSection/Tabs.js +2 -2
- package/dist/esm/components/Toggle/Toggle.js +4 -16
- package/dist/esm/components/Tooltip/Tooltip.js +23 -10
- package/dist/esm/nav/NavSidebar/NavSidebar.js +2 -6
- package/package.json +19 -10
|
@@ -7,8 +7,8 @@ var classnames_1 = (0, tslib_1.__importDefault)(require("classnames"));
|
|
|
7
7
|
var customIconsCodegen_1 = require("./customIconsCodegen");
|
|
8
8
|
var utils_1 = require("../../utils");
|
|
9
9
|
var DeskproCustomIcon = function (_a) {
|
|
10
|
-
var icon = _a.icon, className = _a.className;
|
|
11
|
-
return (React.createElement("i", (0, tslib_1.__assign)({}, (0, utils_1.dpNameProp)("DeskproCustomIcon"), { className: (0, classnames_1.default)("dp-custom-icon-".concat(icon), className), style: { lineHeight: 1, height: "auto" } })));
|
|
10
|
+
var icon = _a.icon, className = _a.className, rest = (0, tslib_1.__rest)(_a, ["icon", "className"]);
|
|
11
|
+
return (React.createElement("i", (0, tslib_1.__assign)({}, rest, (0, utils_1.dpNameProp)("DeskproCustomIcon"), { className: (0, classnames_1.default)("dp-custom-icon-".concat(icon), className), style: { lineHeight: 1, height: "auto" } })));
|
|
12
12
|
};
|
|
13
13
|
exports.DeskproCustomIcon = DeskproCustomIcon;
|
|
14
14
|
var isDpCustomIconId = function (icon) {
|
|
@@ -86,10 +86,10 @@ export declare const heroIconList: {
|
|
|
86
86
|
};
|
|
87
87
|
export declare type HeroIconType = keyof typeof heroIconList;
|
|
88
88
|
export declare const isHeroIcon: (icon: unknown) => icon is "AcademicCapIcon" | "AdjustmentsIcon" | "ArrowsExpandIcon" | "ArrowNarrowLeftIcon" | "BadgeCheckIcon" | "BanIcon" | "BellIcon" | "BookmarkAltIcon" | "BookmarkIcon" | "BookOpenIcon" | "CalendarIcon" | "CashIcon" | "ChartPieIcon" | "ChartSquareBarIcon" | "ChatAlt2Icon" | "ChatIcon" | "CheckCircleIcon" | "CheckIcon" | "ChevronDownIcon" | "ChevronRightIcon" | "ChevronLeftIcon" | "ChevronUpIcon" | "ClipboardCheckIcon" | "ClipboardListIcon" | "ClockIcon" | "CodeIcon" | "CogIcon" | "CollectionIcon" | "CubeTransparentIcon" | "DocumentTextIcon" | "DocumentDuplicateIcon" | "DownloadIcon" | "EmojiHappyIcon" | "ExclamationIcon" | "ExternalLinkIcon" | "FilterIcon" | "FolderIcon" | "GlobeIcon" | "InboxInIcon" | "KeyIcon" | "LightBulbIcon" | "LightningBoltIcon" | "LinkIcon" | "LockClosedIcon" | "LogoutIcon" | "MailIcon" | "MenuIcon" | "MinusCircleIcon" | "NewspaperIcon" | "OfficeBuildingIcon" | "PencilAltIcon" | "PencilIcon" | "PhoneIcon" | "PlusIcon" | "PresentationChartLineIcon" | "PuzzleIcon" | "QuestionMarkCircleIcon" | "RefreshIcon" | "SaveIcon" | "ScissorsIcon" | "SearchIcon" | "ShareIcon" | "ShieldCheckIcon" | "SortDescendingIcon" | "SparklesIcon" | "SpeakerphoneIcon" | "StarIcon" | "StatusOnlineIcon" | "StatusOfflineIcon" | "SwitchVerticalIcon" | "TagIcon" | "TemplateIcon" | "TranslateIcon" | "TrashIcon" | "UserCircleIcon" | "UserGroupIcon" | "UserIcon" | "UsersIcon" | "ViewGridAddIcon" | "ViewGridIcon" | "XIcon";
|
|
89
|
-
export
|
|
89
|
+
export interface HeroIconProps extends HTMLAttributes<SVGSVGElement> {
|
|
90
90
|
icon: HeroIconType;
|
|
91
91
|
width?: number;
|
|
92
|
-
}
|
|
92
|
+
}
|
|
93
93
|
declare const HeroIcon: ({ icon, ...rest }: HeroIconProps) => JSX.Element;
|
|
94
94
|
export default HeroIcon;
|
|
95
95
|
//# sourceMappingURL=HeroIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeroIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon/HeroIcon.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EACL,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,OAAO,EACP,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,OAAO,EACP,aAAa,EACb,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,SAAS,EACT,QAAQ,EACR,yBAAyB,EACzB,UAAU,EACV,sBAAsB,EACtB,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,OAAO,EACP,YAAY,EACZ,aAAa,EACb,SAAS,EACT,cAAc,EACd,aAAa,EACb,QAAQ,EACR,SAAS,EACT,eAAe,EACf,YAAY,EACZ,KAAK,EACN,MAAM,wBAAwB,CAAC;AAEhC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFxB,CAAC;AAEF,oBAAY,YAAY,GAAG,MAAM,OAAO,YAAY,CAAC;AAErD,eAAO,MAAM,UAAU,SAAU,OAAO,k6CAEvC,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"HeroIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon/HeroIcon.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EACL,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,OAAO,EACP,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,QAAQ,EACR,eAAe,EACf,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACR,OAAO,EACP,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,OAAO,EACP,aAAa,EACb,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,SAAS,EACT,QAAQ,EACR,yBAAyB,EACzB,UAAU,EACV,sBAAsB,EACtB,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,OAAO,EACP,YAAY,EACZ,aAAa,EACb,SAAS,EACT,cAAc,EACd,aAAa,EACb,QAAQ,EACR,SAAS,EACT,eAAe,EACf,YAAY,EACZ,KAAK,EACN,MAAM,wBAAwB,CAAC;AAEhC,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFxB,CAAC;AAEF,oBAAY,YAAY,GAAG,MAAM,OAAO,YAAY,CAAC;AAErD,eAAO,MAAM,UAAU,SAAU,OAAO,k6CAEvC,CAAC;AAEF,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,aAAa,CAAC;IAClE,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,QAAQ,sBAAuB,aAAa,gBAGjD,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":";;AAGA,OAAO,EAAE,cAAc,IAAI,MAAM,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAsB,WAAW,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAiB,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAEhE,oBAAY,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,YAAY,CAAC;AAE5E,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,sEAAsE;IACtE,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gGAAgG;IAChG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":";;AAGA,OAAO,EAAE,cAAc,IAAI,MAAM,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAsB,WAAW,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAiB,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAEhE,oBAAY,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,YAAY,CAAC;AAE5E,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,sEAAsE;IACtE,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gGAAgG;IAChG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,MAAM,CAEtD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,OAAO,CAExD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAO9D;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI,oFAKd,SAAS,KAAG,WAAW,sDA4BzB,CAAC"}
|
|
@@ -10,17 +10,11 @@ var utils_1 = require("../../utils");
|
|
|
10
10
|
var DeskproCustomIcon_1 = require("./DeskproCustomIcon");
|
|
11
11
|
var HeroIcon_1 = (0, tslib_1.__importStar)(require("./HeroIcon"));
|
|
12
12
|
function isFaIcon(icon) {
|
|
13
|
-
return
|
|
14
|
-
(0, utils_1.notEmpty)(icon) &&
|
|
15
|
-
"prefix" in icon &&
|
|
16
|
-
"iconName" in icon);
|
|
13
|
+
return typeof icon === "object" && (0, utils_1.notEmpty)(icon) && "prefix" in icon && "iconName" in icon;
|
|
17
14
|
}
|
|
18
15
|
exports.isFaIcon = isFaIcon;
|
|
19
16
|
function isAnyIcon(icon) {
|
|
20
|
-
return (
|
|
21
|
-
(0, DeskproCustomIcon_1.isDpCustomIconId)(icon) ||
|
|
22
|
-
isFaIcon(icon) ||
|
|
23
|
-
(0, HeroIcon_1.isHeroIcon)(icon));
|
|
17
|
+
return (0, FlagImg_1.isISO3166)(icon) || (0, DeskproCustomIcon_1.isDpCustomIconId)(icon) || isFaIcon(icon) || (0, HeroIcon_1.isHeroIcon)(icon);
|
|
24
18
|
}
|
|
25
19
|
exports.isAnyIcon = isAnyIcon;
|
|
26
20
|
function isIconProps(props) {
|
|
@@ -43,23 +37,21 @@ exports.isIconProps = isIconProps;
|
|
|
43
37
|
exports.Icon = (0, styled_components_1.default)(function Icon(_a) {
|
|
44
38
|
var icon = _a.icon, themeColor = _a.themeColor, size = _a.size, rest = (0, tslib_1.__rest)(_a, ["icon", "themeColor", "size"]);
|
|
45
39
|
if (isFaIcon(icon)) {
|
|
46
|
-
return React.createElement(react_fontawesome_1.FontAwesomeIcon, (0, tslib_1.__assign)({}, (0, utils_1.dpNameProp)("FAIcon"), { icon: icon }, rest));
|
|
40
|
+
return (React.createElement(react_fontawesome_1.FontAwesomeIcon, (0, tslib_1.__assign)({ "data-testid": "fa-icon" }, (0, utils_1.dpNameProp)("FAIcon"), { icon: icon }, rest)));
|
|
47
41
|
}
|
|
48
42
|
if ((0, FlagImg_1.isISO3166)(icon)) {
|
|
49
|
-
return React.createElement(FlagImg_1.FlagImg, (0, tslib_1.__assign)({ isoCode: icon }, rest));
|
|
43
|
+
return React.createElement(FlagImg_1.FlagImg, (0, tslib_1.__assign)({ "data-testid": "flag-icon", isoCode: icon }, rest));
|
|
50
44
|
}
|
|
51
45
|
if ((0, DeskproCustomIcon_1.isDpCustomIconId)(icon)) {
|
|
52
|
-
return React.createElement(DeskproCustomIcon_1.DeskproCustomIcon, (0, tslib_1.__assign)({ icon: icon }, rest));
|
|
46
|
+
return React.createElement(DeskproCustomIcon_1.DeskproCustomIcon, (0, tslib_1.__assign)({ "data-testid": "custom-icon", icon: icon }, rest));
|
|
53
47
|
}
|
|
54
48
|
if ((0, HeroIcon_1.isHeroIcon)(icon)) {
|
|
55
|
-
return React.createElement(HeroIcon_1.default, (0, tslib_1.__assign)({ icon: icon }, rest, { width: size }));
|
|
49
|
+
return React.createElement(HeroIcon_1.default, (0, tslib_1.__assign)({ "data-testid": "hero-icon", icon: icon }, rest, { width: size }));
|
|
56
50
|
}
|
|
57
|
-
return React.createElement(DeskproCustomIcon_1.DeskproCustomIcon, (0, tslib_1.__assign)({ icon: "dot" }, rest));
|
|
51
|
+
return React.createElement(DeskproCustomIcon_1.DeskproCustomIcon, (0, tslib_1.__assign)({ "data-testid": "custom-icon", icon: "dot" }, rest));
|
|
58
52
|
})(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n height: 1em;\n color: ", ";\n font-size: ", ";\n user-select: none;\n"], ["\n height: 1em;\n color: ", ";\n font-size: ", ";\n user-select: none;\n"])), function (props) {
|
|
59
53
|
var _a;
|
|
60
54
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
61
55
|
return (_a = props.theme.colors[props.themeColor]) !== null && _a !== void 0 ? _a : "inherit";
|
|
62
|
-
}, function (props) {
|
|
63
|
-
return typeof props.size === "number" ? "".concat(props.size, "px") : "inherit";
|
|
64
|
-
});
|
|
56
|
+
}, function (props) { return (typeof props.size === "number" ? "".concat(props.size, "px") : "inherit"); });
|
|
65
57
|
var templateObject_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Infinite.d.ts","sourceRoot":"","sources":["../../../../src/components/Infinite/Infinite.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"Infinite.d.ts","sourceRoot":"","sources":["../../../../src/components/Infinite/Infinite.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAA6D,MAAM,OAAO,CAAC;AAS7F,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKnC,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,KAAK,GAAG,gBAAgB,CAAC;IAE9D,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;IAC/B,wDAAwD;IACxD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,SAAS,CAAC;IACzB,cAAc,EAAE,SAAS,CAAC;CAC3B;AA4HD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,OAAe,EACf,MAAc,EACd,WAAW,EACX,MAAM,EACN,SAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,aAAa,EACb,cAAc,GACf,EAAE,aAAa,eAkEf"}
|
|
@@ -51,15 +51,13 @@ function useScrollControl(children, reverse, anchor, scrollSideEffect) {
|
|
|
51
51
|
}
|
|
52
52
|
else if (typeof lastKnownScrollOffset.current === "number" && reverse) {
|
|
53
53
|
ref.current.scrollTo({
|
|
54
|
-
top: Math.abs(lastKnownScrollOffset.current -
|
|
55
|
-
(ref.current.scrollHeight - ref.current.clientHeight)),
|
|
54
|
+
top: Math.abs(lastKnownScrollOffset.current - (ref.current.scrollHeight - ref.current.clientHeight)),
|
|
56
55
|
});
|
|
57
56
|
}
|
|
58
57
|
});
|
|
59
58
|
var debouncedSetIsAttached = (0, use_debounce_1.useDebouncedCallback)(function () {
|
|
60
59
|
if (typeof lastKnownScrollOffset.current === "number" && ref.current) {
|
|
61
|
-
if (shouldAttachScroll.current !== isAttached &&
|
|
62
|
-
lastKnownScrollOffset.current > 300) {
|
|
60
|
+
if (shouldAttachScroll.current !== isAttached && lastKnownScrollOffset.current > 300) {
|
|
63
61
|
setIsAttached(shouldAttachScroll.current);
|
|
64
62
|
}
|
|
65
63
|
else if (shouldAttachScroll.current !== isAttached &&
|
|
@@ -72,15 +70,13 @@ function useScrollControl(children, reverse, anchor, scrollSideEffect) {
|
|
|
72
70
|
var handleScroll = (0, react_1.useCallback)(function () {
|
|
73
71
|
if (ref.current &&
|
|
74
72
|
!isAttached &&
|
|
75
|
-
ref.current.scrollTop + ref.current.offsetHeight >
|
|
76
|
-
ref.current.scrollHeight - 2) {
|
|
73
|
+
ref.current.scrollTop + ref.current.offsetHeight > ref.current.scrollHeight - 2) {
|
|
77
74
|
setIsAttached(true);
|
|
78
75
|
}
|
|
79
76
|
if (!ref.current)
|
|
80
77
|
return;
|
|
81
78
|
if (reverse) {
|
|
82
|
-
if (ref.current.scrollTop <
|
|
83
|
-
ref.current.scrollHeight - ref.current.clientHeight) {
|
|
79
|
+
if (ref.current.scrollTop < ref.current.scrollHeight - ref.current.clientHeight) {
|
|
84
80
|
shouldAttachScroll.current = false;
|
|
85
81
|
}
|
|
86
82
|
else {
|
|
@@ -96,8 +92,7 @@ function useScrollControl(children, reverse, anchor, scrollSideEffect) {
|
|
|
96
92
|
}
|
|
97
93
|
}
|
|
98
94
|
scrollSideEffect === null || scrollSideEffect === void 0 ? void 0 : scrollSideEffect();
|
|
99
|
-
lastKnownScrollOffset.current = Math.abs(ref.current.scrollTop -
|
|
100
|
-
(ref.current.scrollHeight - ref.current.clientHeight));
|
|
95
|
+
lastKnownScrollOffset.current = Math.abs(ref.current.scrollTop - (ref.current.scrollHeight - ref.current.clientHeight));
|
|
101
96
|
debouncedSetIsAttached();
|
|
102
97
|
}, [debouncedSetIsAttached, reverse, scrollSideEffect, isAttached]);
|
|
103
98
|
var reAttach = (0, react_1.useCallback)(function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfiniteTopBottom.d.ts","sourceRoot":"","sources":["../../../../src/components/Infinite/InfiniteTopBottom.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"InfiniteTopBottom.d.ts","sourceRoot":"","sources":["../../../../src/components/Infinite/InfiniteTopBottom.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAA6D,MAAM,OAAO,CAAC;AAS7F,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKnC,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,SAAS,GAAG,iBAAiB,GAAG,OAAO,CAAC;IACpD,YAAY,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,KAAK,GAAG,gBAAgB,CAAC;IAEpE,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;IAC/B,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,SAAS,CAAC;IAC3B,cAAc,EAAE,SAAS,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA+GD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,OAAe,EACf,MAAc,EACd,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,SAAkB,EAClB,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,eAAe,EACf,cAAc,EACd,KAAK,GACN,EAAE,aAAa,eA2Ef"}
|
|
@@ -51,15 +51,13 @@ function useScrollControl(children, reverse, anchor, scrollSideEffect) {
|
|
|
51
51
|
}
|
|
52
52
|
else if (typeof lastKnownScrollOffset.current === "number" && reverse) {
|
|
53
53
|
ref.current.scrollTo({
|
|
54
|
-
top: Math.abs(lastKnownScrollOffset.current -
|
|
55
|
-
(ref.current.scrollHeight - ref.current.clientHeight)),
|
|
54
|
+
top: Math.abs(lastKnownScrollOffset.current - (ref.current.scrollHeight - ref.current.clientHeight)),
|
|
56
55
|
});
|
|
57
56
|
}
|
|
58
57
|
});
|
|
59
58
|
var debouncedSetIsAttached = (0, use_debounce_1.useDebouncedCallback)(function () {
|
|
60
59
|
if (typeof lastKnownScrollOffset.current === "number" && ref.current) {
|
|
61
|
-
if (shouldAttachScroll.current !== isAttached &&
|
|
62
|
-
lastKnownScrollOffset.current > 300) {
|
|
60
|
+
if (shouldAttachScroll.current !== isAttached && lastKnownScrollOffset.current > 300) {
|
|
63
61
|
setIsAttached(shouldAttachScroll.current);
|
|
64
62
|
}
|
|
65
63
|
}
|
|
@@ -69,8 +67,7 @@ function useScrollControl(children, reverse, anchor, scrollSideEffect) {
|
|
|
69
67
|
if (!ref.current)
|
|
70
68
|
return;
|
|
71
69
|
if (reverse) {
|
|
72
|
-
if (ref.current.scrollTop <
|
|
73
|
-
ref.current.scrollHeight - ref.current.clientHeight) {
|
|
70
|
+
if (ref.current.scrollTop < ref.current.scrollHeight - ref.current.clientHeight) {
|
|
74
71
|
shouldAttachScroll.current = false;
|
|
75
72
|
}
|
|
76
73
|
else {
|
|
@@ -86,8 +83,7 @@ function useScrollControl(children, reverse, anchor, scrollSideEffect) {
|
|
|
86
83
|
}
|
|
87
84
|
}
|
|
88
85
|
scrollSideEffect === null || scrollSideEffect === void 0 ? void 0 : scrollSideEffect();
|
|
89
|
-
lastKnownScrollOffset.current = Math.abs(ref.current.scrollTop -
|
|
90
|
-
(ref.current.scrollHeight - ref.current.clientHeight));
|
|
86
|
+
lastKnownScrollOffset.current = Math.abs(ref.current.scrollTop - (ref.current.scrollHeight - ref.current.clientHeight));
|
|
91
87
|
debouncedSetIsAttached();
|
|
92
88
|
}, [debouncedSetIsAttached, reverse, scrollSideEffect]);
|
|
93
89
|
var reAttach = (0, react_1.useCallback)(function () {
|
|
@@ -2,7 +2,7 @@ import { ReactNode } from "react";
|
|
|
2
2
|
import { formatPhoneNumberIntl, getCountryCallingCode, isValidPhoneNumber, parsePhoneNumber, PhoneInputProps, PhoneNumber } from "react-phone-number-input";
|
|
3
3
|
import { InputProps } from "../Input";
|
|
4
4
|
import { AnyIcon } from "../Icon";
|
|
5
|
-
export { isValidPhoneNumber, getCountryCallingCode, parsePhoneNumber, formatPhoneNumberIntl
|
|
5
|
+
export { isValidPhoneNumber, getCountryCallingCode, parsePhoneNumber, formatPhoneNumberIntl };
|
|
6
6
|
export type { PhoneNumber };
|
|
7
7
|
declare type IntlPhoneInputProps = Omit<PhoneInputProps, "inputComponent" | "containerComponent" | "countrySelectComponent" | "numberInputProps" | "error"> & Pick<InputProps, "rightIcon" | "leftIcon" | "variant" | "inputsize" | "error" | "hasLabel"> & {
|
|
8
8
|
defaultCountryCode?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlPhoneInput.d.ts","sourceRoot":"","sources":["../../../../src/components/IntlPhoneInput/IntlPhoneInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAkC,MAAM,OAAO,CAAC;AAGlE,OAAwB,EAEtB,qBAAqB,EAErB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,WAAW,EACZ,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAS,UAAU,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAQ,MAAM,SAAS,CAAC;AAKxC,OAAO,
|
|
1
|
+
{"version":3,"file":"IntlPhoneInput.d.ts","sourceRoot":"","sources":["../../../../src/components/IntlPhoneInput/IntlPhoneInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAkC,MAAM,OAAO,CAAC;AAGlE,OAAwB,EAEtB,qBAAqB,EAErB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,WAAW,EACZ,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAS,UAAU,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAQ,MAAM,SAAS,CAAC;AAKxC,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,CAAC;AAC9F,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B,aAAK,mBAAmB,GAAG,IAAI,CAC7B,eAAe,EACf,gBAAgB,GAAG,oBAAoB,GAAG,wBAAwB,GAAG,kBAAkB,GAAG,OAAO,CAClG,GACC,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,UAAU,CAAC,GAAG;IAC5F,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,EAAE,SAAS,CAAC;IACzB,cAAc,EAAE,SAAS,CAAC;IAC1B,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AA8FJ;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,OAAO,EACP,SAAS,EACT,KAAK,EACL,QAAQ,EACR,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,GAAG,IAAI,EACR,EAAE,mBAAmB,eAiCrB"}
|
|
@@ -51,9 +51,7 @@ var SelectComponent = function (_a) {
|
|
|
51
51
|
var onChange = _a.onChange, value = _a.value, fetchMoreText = _a.fetchMoreText, autoscrollText = _a.autoscrollText, externalLinkIcon = _a.externalLinkIcon, selectedIcon = _a.selectedIcon;
|
|
52
52
|
var _b = (0, tslib_1.__read)((0, react_1.useState)(""), 2), searchString = _b[0], setSearchString = _b[1];
|
|
53
53
|
var options = (0, react_1.useMemo)(function () {
|
|
54
|
-
return searchString
|
|
55
|
-
? optionsFuse.search(searchString).map(function (options) { return options.item; })
|
|
56
|
-
: allOptions;
|
|
54
|
+
return searchString ? optionsFuse.search(searchString).map(function (options) { return options.item; }) : allOptions;
|
|
57
55
|
}, [searchString]);
|
|
58
56
|
var handleClose = (0, react_1.useCallback)(function () { return setSearchString(""); }, []);
|
|
59
57
|
return (React.createElement(Dropdown_1.Dropdown, { onClose: handleClose, inputValue: searchString, showInternalSearch: true, onInputChange: setSearchString, onSelectOption: function (_a) {
|
|
@@ -78,9 +76,7 @@ var container = function (_a) {
|
|
|
78
76
|
function IntlPhoneInput(_a) {
|
|
79
77
|
var rightIcon = _a.rightIcon, variant = _a.variant, inputsize = _a.inputsize, error = _a.error, hasLabel = _a.hasLabel, defaultCountryCode = _a.defaultCountryCode, fetchMoreText = _a.fetchMoreText, autoscrollText = _a.autoscrollText, selectedIcon = _a.selectedIcon, externalLinkIcon = _a.externalLinkIcon, rest = (0, tslib_1.__rest)(_a, ["rightIcon", "variant", "inputsize", "error", "hasLabel", "defaultCountryCode", "fetchMoreText", "autoscrollText", "selectedIcon", "externalLinkIcon"]);
|
|
80
78
|
var SelectComponentWithText = (0, react_1.useCallback)(function (props) { return (React.createElement(SelectComponent, (0, tslib_1.__assign)({}, props, { fetchMoreText: fetchMoreText, autoscrollText: autoscrollText, selectedIcon: selectedIcon, externalLinkIcon: externalLinkIcon }))); }, [fetchMoreText, autoscrollText, selectedIcon, externalLinkIcon]);
|
|
81
|
-
return (React.createElement(react_phone_number_input_1.default, (0, tslib_1.__assign)({ placeholder: rest.placeholder, containerComponent: container, inputComponent: Input_1.Input, defaultCountry: defaultCountryCode && (0, FlagImg_1.isISO3166)(defaultCountryCode)
|
|
82
|
-
? defaultCountryCode
|
|
83
|
-
: "GB", countrySelectComponent: SelectComponentWithText, international: false, numberInputProps: {
|
|
79
|
+
return (React.createElement(react_phone_number_input_1.default, (0, tslib_1.__assign)({ placeholder: rest.placeholder, containerComponent: container, inputComponent: Input_1.Input, defaultCountry: defaultCountryCode && (0, FlagImg_1.isISO3166)(defaultCountryCode) ? defaultCountryCode : "GB", countrySelectComponent: SelectComponentWithText, international: false, numberInputProps: {
|
|
84
80
|
variant: variant,
|
|
85
81
|
rightIcon: rightIcon,
|
|
86
82
|
inputsize: inputsize,
|
|
@@ -49,7 +49,7 @@ export declare type TagNumberProps = {
|
|
|
49
49
|
number: number;
|
|
50
50
|
icon?: AnyIcon;
|
|
51
51
|
};
|
|
52
|
-
export declare const TagNumber: ({ number, icon, color
|
|
52
|
+
export declare const TagNumber: ({ number, icon, color }: TagNumberProps) => JSX.Element;
|
|
53
53
|
export declare const CodeLabel: ({ label }: {
|
|
54
54
|
label: string;
|
|
55
55
|
}) => JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../src/components/LabelTag/Tag.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAmB,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,OAAO,EAAQ,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../src/components/LabelTag/Tag.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAmB,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,OAAO,EAAQ,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,SAAS,CAAC;AAoElD,eAAO,MAAM,UAAU;eAKV,eAAe;;;iBAe3B,CAAC;AAkEF,eAAO,MAAM,QAAQ,yGAmBpB,CAAC;AAQF,oBAAY,WAAW,GAAG;IACxB,eAAe,EAAE,WAAW,CAAC,KAAK,CAAC;IACnC,WAAW,EAAE,WAAW,CAAC,KAAK,CAAC;IAC/B,SAAS,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC;CAC/B,CAAC;AACF,oBAAY,QAAQ,GAAG;IACrB,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,eAAe,EAAE,WAAW,CAAC,KAAK,CAAC;IACnC,WAAW,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC;IAChC,SAAS,EAAE,WAAW,CAAC,KAAK,CAAC;IAC7B,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAChE,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,GAAG,kHAYb,QAAQ,gBAgDV,CAAC;AAEF,eAAO,MAAM,eAAe,0IAazB,oBAAoB,gBA6BtB,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC3B,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,SAAS,4BAA6B,cAAc,KAAG,WAcnE,CAAC;AAEF,eAAO,MAAM,SAAS;WAAwB,MAAM;iBAEnD,CAAC"}
|
|
@@ -16,7 +16,7 @@ var Container = styled_components_1.default.div(templateObject_1 || (templateObj
|
|
|
16
16
|
return (addMargin ? "2px 4px 2px 0" : "0");
|
|
17
17
|
}, function (props) { return props.backgroundColor; }, function (props) { return props.borderColor; }, function (_a) {
|
|
18
18
|
var theme = _a.theme, textColor = _a.textColor;
|
|
19
|
-
return textColor ? textColor : theme.colors.grey40;
|
|
19
|
+
return (textColor ? textColor : theme.colors.grey40);
|
|
20
20
|
}, function (_a) {
|
|
21
21
|
var maxWidth = _a.maxWidth;
|
|
22
22
|
return maxWidth;
|
|
@@ -26,10 +26,10 @@ var RoundedContainer = styled_components_1.default.div(templateObject_2 || (temp
|
|
|
26
26
|
return (addMargin ? "2px 4px 2px 0" : "0");
|
|
27
27
|
}, function (_a) {
|
|
28
28
|
var theme = _a.theme, textColor = _a.textColor;
|
|
29
|
-
return textColor ? textColor : theme.colors.grey40;
|
|
29
|
+
return (textColor ? textColor : theme.colors.grey40);
|
|
30
30
|
}, function (props) { return (props.size === "large" ? "28px" : "16px"); }, function (_a) {
|
|
31
31
|
var backgroundColor = _a.backgroundColor, borderColor = _a.borderColor;
|
|
32
|
-
return borderColor ? borderColor : backgroundColor;
|
|
32
|
+
return (borderColor ? borderColor : backgroundColor);
|
|
33
33
|
}, function (_a) {
|
|
34
34
|
var backgroundColor = _a.backgroundColor;
|
|
35
35
|
return backgroundColor;
|
|
@@ -58,7 +58,7 @@ var Text = (0, styled_components_1.default)(Typography_1.TSpan).attrs({ type: "p
|
|
|
58
58
|
return (color ? color : theme.colors.grey100);
|
|
59
59
|
}, function (_a) {
|
|
60
60
|
var capitalize = _a.capitalize;
|
|
61
|
-
return capitalize ? "capitalize" : "initial";
|
|
61
|
+
return (capitalize ? "capitalize" : "initial");
|
|
62
62
|
}, function (_a) {
|
|
63
63
|
var size = _a.size;
|
|
64
64
|
return size === "large" && "12px";
|
|
@@ -84,7 +84,7 @@ var Tag = function (_a) {
|
|
|
84
84
|
icon && (React.createElement(IconWrapper, null,
|
|
85
85
|
React.createElement(Icon_1.Icon, { icon: icon, size: size === "large" ? 12 : undefined }))),
|
|
86
86
|
React.createElement(Text, { size: size, capitalize: capitalize, color: color.textColor, ref: ref }, label),
|
|
87
|
-
withClose &&
|
|
87
|
+
withClose && React.createElement(CloseButton, { minimal: true, icon: closeIcon, onClick: onCloseClick }))); }, [
|
|
88
88
|
addMargin,
|
|
89
89
|
capitalize,
|
|
90
90
|
className,
|
|
@@ -97,8 +97,9 @@ var Tag = function (_a) {
|
|
|
97
97
|
onCloseClick,
|
|
98
98
|
size,
|
|
99
99
|
withClose,
|
|
100
|
+
closeIcon,
|
|
100
101
|
]);
|
|
101
|
-
return isOverflowActive ?
|
|
102
|
+
return isOverflowActive ? React.createElement(Tooltip_1.Tooltip, { content: label }, TagComponent) : TagComponent;
|
|
102
103
|
};
|
|
103
104
|
exports.Tag = Tag;
|
|
104
105
|
var RoundedLabelTag = function (_a) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="@typescript/lib-dom" />
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { HTMLAttributes, ReactNode } from "react";
|
|
4
|
-
import { AnyIcon } from "../Icon";
|
|
4
|
+
import { AnyIcon, IconProps } from "../Icon";
|
|
5
|
+
import { Maybe } from "../../common/types";
|
|
5
6
|
interface MenuProps {
|
|
6
7
|
children?: ReactNode | ((active: boolean) => ReactNode);
|
|
7
8
|
/** default true */
|
|
@@ -9,30 +10,21 @@ interface MenuProps {
|
|
|
9
10
|
/** default false */
|
|
10
11
|
fill?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare function Menu({ fill, hasElevation, children
|
|
13
|
+
export declare function Menu({ fill, hasElevation, children }: MenuProps): JSX.Element;
|
|
13
14
|
interface MenuDividerProps {
|
|
14
15
|
title?: ReactNode;
|
|
15
16
|
}
|
|
16
17
|
export declare function MenuDivider({ title }: MenuDividerProps): JSX.Element;
|
|
17
|
-
export
|
|
18
|
+
export interface MenuItemProps extends HTMLAttributes<HTMLAnchorElement> {
|
|
18
19
|
active?: boolean;
|
|
19
20
|
children?: ReactNode;
|
|
20
21
|
disabled?: boolean;
|
|
21
|
-
icon?: AnyIcon | JSX.Element
|
|
22
|
-
rightIcon?: AnyIcon | JSX.Element
|
|
22
|
+
icon?: AnyIcon | IconProps | Maybe<JSX.Element>;
|
|
23
|
+
rightIcon?: AnyIcon | IconProps | Maybe<JSX.Element>;
|
|
23
24
|
label?: ReactNode;
|
|
24
25
|
htmlTitle?: string;
|
|
25
26
|
iconColor?: string;
|
|
26
|
-
}
|
|
27
|
-
export declare const MenuItem: React.ForwardRefExoticComponent<
|
|
28
|
-
active?: boolean | undefined;
|
|
29
|
-
children?: ReactNode;
|
|
30
|
-
disabled?: boolean | undefined;
|
|
31
|
-
icon?: JSX.Element | AnyIcon | null | undefined;
|
|
32
|
-
rightIcon?: JSX.Element | AnyIcon | null | undefined;
|
|
33
|
-
label?: ReactNode;
|
|
34
|
-
htmlTitle?: string | undefined;
|
|
35
|
-
iconColor?: string | undefined;
|
|
36
|
-
} & React.HTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement>>;
|
|
27
|
+
}
|
|
28
|
+
export declare const MenuItem: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
37
29
|
export {};
|
|
38
30
|
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAc,cAAc,EAAE,SAAS,EAAO,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,OAAO,EAAmB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAc,cAAc,EAAE,SAAS,EAAO,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,OAAO,EAAmB,SAAS,EAAe,MAAM,SAAS,CAAC;AAS3E,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,UAAU,SAAS;IACjB,QAAQ,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC;IACxD,mBAAmB;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oBAAoB;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAgB,IAAI,CAAC,EAAE,IAAY,EAAE,YAAmB,EAAE,QAAQ,EAAE,EAAE,SAAS,eAM9E;AAED,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE,gBAAgB,eAUtD;AAED,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IACtE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAEhD,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACrD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,QAAQ,yFAkEnB,CAAC"}
|
|
@@ -25,9 +25,9 @@ exports.MenuItem = (0, react_1.forwardRef)(function MenuItem(_a, ref) {
|
|
|
25
25
|
var active = _a.active, children = _a.children, disabled = _a.disabled, icon = _a.icon, rightIcon = _a.rightIcon, label = _a.label, htmlTitle = _a.htmlTitle, iconColor = _a.iconColor, anchorProps = (0, tslib_1.__rest)(_a, ["active", "children", "disabled", "icon", "rightIcon", "label", "htmlTitle", "iconColor"]);
|
|
26
26
|
var colors = (0, styled_components_1.useTheme)().colors;
|
|
27
27
|
var target = (React.createElement(S.MenuItem, (0, tslib_1.__assign)({}, (0, utils_1.dpNameProp)("MenuItem"), { ref: ref, disabled: disabled }, anchorProps, { title: htmlTitle, role: "menuitem" }),
|
|
28
|
-
icon && (React.createElement(Typography_1.TSpan, { type: "p5", style: { color: iconColor || colors.grey20 } }, (0, Icon_1.isAnyIcon)(icon) ? React.createElement(Icon_1.Icon, { icon: icon }) : icon)),
|
|
28
|
+
icon && (React.createElement(Typography_1.TSpan, { type: "p5", style: { color: iconColor || colors.grey20 } }, (0, Icon_1.isAnyIcon)(icon) ? React.createElement(Icon_1.Icon, { icon: icon }) : (0, Icon_1.isIconProps)(icon) ? React.createElement(Icon_1.Icon, (0, tslib_1.__assign)({}, icon)) : icon)),
|
|
29
29
|
React.createElement(Typography_1.TSpan, { "$fill": true, overflow: "ellipsis", type: "p5" }, label),
|
|
30
|
-
rightIcon && (React.createElement(Typography_1.TSpan, { type: "p5" }, (0, Icon_1.isAnyIcon)(rightIcon) ? React.createElement(Icon_1.Icon, { icon: rightIcon }) : rightIcon)),
|
|
30
|
+
rightIcon && (React.createElement(Typography_1.TSpan, { type: "p5" }, (0, Icon_1.isAnyIcon)(rightIcon) ? (React.createElement(Icon_1.Icon, { icon: rightIcon })) : (0, Icon_1.isIconProps)(rightIcon) ? (React.createElement(Icon_1.Icon, (0, tslib_1.__assign)({}, rightIcon))) : (rightIcon))),
|
|
31
31
|
children && React.createElement(Icon_1.Icon, { icon: free_solid_svg_icons_1.faCaretRight })));
|
|
32
32
|
if (!children) {
|
|
33
33
|
return React.createElement("li", { role: "none" }, target);
|
|
@@ -20,5 +20,5 @@ export interface ModalHeaderProps {
|
|
|
20
20
|
color?: ThemeColorKey;
|
|
21
21
|
children?: ReactNode;
|
|
22
22
|
}
|
|
23
|
-
export declare function ModalHeader({ title, backgroundColor, color, children
|
|
23
|
+
export declare function ModalHeader({ title, backgroundColor, color, children }: ModalHeaderProps): JSX.Element;
|
|
24
24
|
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,YAAY,EAAE,MAAM,YAAY,CAAC;AAInD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,YAAY,EAAE,MAAM,YAAY,CAAC;AAInD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAgDlC,eAAO,MAAM,UAAU,yGAmBtB,CAAC;AAcF,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC;IAClE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,KAAK,CAAC,EACpB,MAAM,EACN,oBAAoB,EACpB,WAAW,EACX,QAAQ,EACR,WAAW,EACX,cAAc,EACd,SAAS,EACT,SAAS,EACT,MAAM,EACN,KAAK,EACL,SAAS,EACT,GAAG,EACH,MAAM,EACN,IAAI,EACJ,KAAK,GACN,EAAE,UAAU,eAmCZ;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,eAAe,CAAC,EAAE,aAAa,CAAC;IAChC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,gBAAgB,eAaxF"}
|
|
@@ -25,9 +25,7 @@ var ModalPositonContainer = styled_components_1.default.div(templateObject_1 ||
|
|
|
25
25
|
});
|
|
26
26
|
var ModalOverlayContainer = (0, styled_components_1.default)(framer_motion_1.motion.div)(templateObject_2 || (templateObject_2 = (0, tslib_1.__makeTemplateObject)(["\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 100%;\n width: 100%;\n pointer-events: none;\n position: relative;\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 100%;\n width: 100%;\n pointer-events: none;\n position: relative;\n"])));
|
|
27
27
|
var ModalContainer = styled_components_1.default.div(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n background-color: ", ";\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n padding-bottom: 10px;\n pointer-events: all;\n width: ", "; // Space for the close btn\n height: ", ";\n overflow: hidden;\n box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.15);\n z-index: 20;\n"], ["\n background-color: ", ";\n border-radius: 8px;\n display: flex;\n flex-direction: column;\n padding-bottom: 10px;\n pointer-events: all;\n width: ", "; // Space for the close btn\n height: ", ";\n overflow: hidden;\n box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.15);\n z-index: 20;\n"])), function (props) { return props.theme.colors.white; }, function (props) {
|
|
28
|
-
return props.width
|
|
29
|
-
? props.width
|
|
30
|
-
: "calc(100vw - 80px)";
|
|
28
|
+
return props.width ? props.width : "calc(100vw - 80px)";
|
|
31
29
|
}, function (props) { return (props.height ? props.height : "90vh"); });
|
|
32
30
|
var ModalCloseContainer = styled_components_1.default.div(templateObject_4 || (templateObject_4 = (0, tslib_1.__makeTemplateObject)(["\n padding: 0 38px;\n position: relative;\n"], ["\n padding: 0 38px;\n position: relative;\n"])));
|
|
33
31
|
exports.ModalClose = styled_components_1.default.div(templateObject_5 || (templateObject_5 = (0, tslib_1.__makeTemplateObject)(["\n position: absolute;\n right: 0;\n background-color: ", ";\n box-shadow: 0px 5px 8px rgba(0, 0, 0, 0.05);\n padding: 10px;\n border-radius: 100%;\n width: 28px;\n height: 28px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n z-index: 99999;\n\n button {\n color: ", ";\n }\n"], ["\n position: absolute;\n right: 0;\n background-color: ", ";\n box-shadow: 0px 5px 8px rgba(0, 0, 0, 0.05);\n padding: 10px;\n border-radius: 100%;\n width: 28px;\n height: 28px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n z-index: 99999;\n\n button {\n color: ", ";\n }\n"])), function (_a) {
|
|
@@ -38,12 +36,8 @@ exports.ModalClose = styled_components_1.default.div(templateObject_5 || (templa
|
|
|
38
36
|
return theme.colors.brandShade100;
|
|
39
37
|
});
|
|
40
38
|
var ModalHeaderContainer = (0, styled_components_1.default)(layout_1.Stack)(templateObject_6 || (templateObject_6 = (0, tslib_1.__makeTemplateObject)(["\n background-color: ", ";\n color: ", ";\n height: 32px;\n padding: 0 12px;\n flex-shrink: 0;\n"], ["\n background-color: ", ";\n color: ", ";\n height: 32px;\n padding: 0 12px;\n flex-shrink: 0;\n"])), function (props) {
|
|
41
|
-
return props.backgroundColor
|
|
42
|
-
|
|
43
|
-
: props.theme.colors.grey5;
|
|
44
|
-
}, function (props) {
|
|
45
|
-
return props.color ? props.theme.colors[props.color] : props.theme.colors.grey100;
|
|
46
|
-
});
|
|
39
|
+
return props.backgroundColor ? props.theme.colors[props.backgroundColor] : props.theme.colors.grey5;
|
|
40
|
+
}, function (props) { return (props.color ? props.theme.colors[props.color] : props.theme.colors.grey100); });
|
|
47
41
|
function Modal(_a) {
|
|
48
42
|
var isOpen = _a.isOpen, canClickOutsideClose = _a.canClickOutsideClose, canEscClose = _a.canEscClose, children = _a.children, hasBackdrop = _a.hasBackdrop, onRequestClose = _a.onRequestClose, closeIcon = _a.closeIcon, autofocus = _a.autofocus, height = _a.height, width = _a.width, hideClose = _a.hideClose, top = _a.top, bottom = _a.bottom, left = _a.left, right = _a.right;
|
|
49
43
|
return (React.createElement(Overlay_1.Overlay, (0, tslib_1.__assign)({}, (0, utils_1.dpNameProp)("Modal"), { hasBackdrop: hasBackdrop, isOpen: isOpen, onRequestClose: onRequestClose, canEscClose: canEscClose, canClickOutsideClose: canClickOutsideClose, autofocus: autofocus }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionTag.d.ts","sourceRoot":"","sources":["../../../../src/components/OptionTag/OptionTag.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,OAAO,EAAQ,MAAM,SAAS,CAAC;AA4BxC,aAAK,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAC5D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"OptionTag.d.ts","sourceRoot":"","sources":["../../../../src/components/OptionTag/OptionTag.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,OAAO,EAAQ,MAAM,SAAS,CAAC;AA4BxC,aAAK,cAAc,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAC5D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CACtD,CAAC;AAEF,eAAO,MAAM,SAAS,uDAAwD,cAAc,gBAQ3F,CAAC"}
|
|
@@ -21,7 +21,7 @@ var OptionTag = function (_a) {
|
|
|
21
21
|
return (React.createElement(OptionTagContainer, (0, tslib_1.__assign)({}, (0, utils_1.dpNameProp)("OptionTag"), rest),
|
|
22
22
|
icon && React.createElement(Icon_1.Icon, { icon: icon }),
|
|
23
23
|
React.createElement(Typography_1.P6, null, displayName),
|
|
24
|
-
withClose &&
|
|
24
|
+
withClose && React.createElement(Button_1.IconButton, { minimal: true, icon: free_solid_svg_icons_1.faTimes, onClick: onClose })));
|
|
25
25
|
};
|
|
26
26
|
exports.OptionTag = OptionTag;
|
|
27
27
|
var templateObject_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":";;AAWA,oBAAY,WAAW,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEvC,oBAAY,WAAW,GACnB,aAAa,GACb,eAAe,GACf,YAAY,GACZ,OAAO,GACP,aAAa,GACb,WAAW,CAAC;AAMhB,aAAK,eAAe,GAAG;IACrB,OAAO,EAAE,WAAW,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,eAAe,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAC;IACrD,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,uGAAuG;IACvG,WAAW,EAAE,MAAM,CAAC;IACpB,qHAAqH;IACrH,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAqBF,eAAO,MAAM,UAAU,oJAWpB,eAAe,KAAG,WAqFpB,CAAC"}
|
|
@@ -51,17 +51,16 @@ var Pagination = function (_a) {
|
|
|
51
51
|
var ofTotalString = ofTotalText.replace("{total}", displayTotal);
|
|
52
52
|
var uniqueItemsString = uniqueItemsText.replace("{unique}", String(uniqueItems));
|
|
53
53
|
return (React.createElement(Stack_1.Stack, (0, tslib_1.__assign)({}, (0, utils_1.dpNameProp)("Pagination"), { align: "center" }),
|
|
54
|
-
displayItems.includes("perPageText") &&
|
|
54
|
+
displayItems.includes("perPageText") && React.createElement(P1Items, null, itemsPerPageText),
|
|
55
55
|
displayItems.includes("perPageSelect") && (React.createElement(PerPageItem, null,
|
|
56
56
|
React.createElement(Select_1.Select, { options: perPageOptions, value: currentPerPageOption === null || currentPerPageOption === void 0 ? void 0 : currentPerPageOption.value, onChange: function (event) {
|
|
57
|
-
onPerPageChange &&
|
|
58
|
-
onPerPageChange(Number(event.target.value));
|
|
57
|
+
onPerPageChange && onPerPageChange(Number(event.target.value));
|
|
59
58
|
onPageChange(1);
|
|
60
59
|
} }))),
|
|
61
60
|
displayItems.includes("pageSelect") && (React.createElement(PageItem, null,
|
|
62
61
|
React.createElement(Select_1.Select, { options: pageOptions, value: currentPageOption === null || currentPageOption === void 0 ? void 0 : currentPageOption.value, onChange: function (event) { return onPageChange(Number(event.target.value)); } }))),
|
|
63
62
|
displayItems.includes("total") && React.createElement(P1Total, null, ofTotalString),
|
|
64
|
-
displayItems.includes("uniqueItems") &&
|
|
63
|
+
displayItems.includes("uniqueItems") && React.createElement(P1Items, null, uniqueItemsString),
|
|
65
64
|
displayItems.includes("navArrows") && (React.createElement(React.Fragment, null,
|
|
66
65
|
React.createElement(ButtonLeftItem, null,
|
|
67
66
|
React.createElement(Button_1.IconButton, { minimal: true, icon: free_solid_svg_icons_1.faChevronLeft, onClick: function () { return onPageChange(currentPage - 1); }, disabled: currentPage === 1 })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/Select.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EAErB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/Select.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EAErB,MAAM,OAAO,CAAC;AAoHf,oBAAY,UAAU,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AACjE,oBAAY,UAAU,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AACjE,oBAAY,YAAY,GAAG,sBAAsB,CAAC,mBAAmB,CAAC,GAAG;IACvE,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACxB,CAAC;AAEF,aAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,UAAU,CAAC;AAEf,eAAO,MAAM,MAAM,4GAWhB,KAAK,gBAgDP,CAAC"}
|
|
@@ -12,7 +12,7 @@ var StyledIcon = (0, styled_components_1.default)(Icon_1.Icon)(templateObject_1
|
|
|
12
12
|
var theme = _a.theme;
|
|
13
13
|
return theme.colors.grey40;
|
|
14
14
|
});
|
|
15
|
-
var StyledSelect = styled_components_1.default.div(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n width: ", ";\n display: ", ";\n position: relative;\n\n select {\n border-radius: 4px;\n border: 1px solid
|
|
15
|
+
var StyledSelect = styled_components_1.default.div(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n width: ", ";\n display: ", ";\n position: relative;\n\n select {\n border-radius: 4px;\n border: 1px solid ", ";\n color: ", ";\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n cursor: pointer;\n font-size: 12px;\n justify-content: center;\n text-align: left;\n vertical-align: middle;\n -moz-appearance: none;\n -webkit-appearance: none;\n height: 30px;\n line-height: 25px;\n padding: 0 25px 0 10px;\n width: ", ";\n\n > * {\n flex-grow: 0;\n flex-shrink: 0;\n }\n\n option {\n color: ", ";\n }\n\n &:hover {\n border-color: ", ";\n color: ", ";\n }\n\n &:focus {\n border-color: ", ";\n color: ", ";\n background-color: ", ";\n outline: none;\n }\n\n &:disabled {\n border-color: ", ";\n color: ", ";\n background-color: ", ";\n }\n\n ", ";\n }\n\n // Control the dropdown icon color\n :hover {\n ", " {\n visibility: visible;\n color: ", ";\n }\n }\n &:focus-within {\n ", " {\n color: ", ";\n }\n }\n"], ["\n width: ", ";\n display: ", ";\n position: relative;\n\n select {\n border-radius: 4px;\n border: 1px solid ", ";\n color: ", ";\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n cursor: pointer;\n font-size: 12px;\n justify-content: center;\n text-align: left;\n vertical-align: middle;\n -moz-appearance: none;\n -webkit-appearance: none;\n height: 30px;\n line-height: 25px;\n padding: 0 25px 0 10px;\n width: ", ";\n\n > * {\n flex-grow: 0;\n flex-shrink: 0;\n }\n\n option {\n color: ", ";\n }\n\n &:hover {\n border-color: ", ";\n color: ", ";\n }\n\n &:focus {\n border-color: ", ";\n color: ", ";\n background-color: ", ";\n outline: none;\n }\n\n &:disabled {\n border-color: ", ";\n color: ", ";\n background-color: ", ";\n }\n\n ", ";\n }\n\n // Control the dropdown icon color\n :hover {\n ", " {\n visibility: visible;\n color: ", ";\n }\n }\n &:focus-within {\n ", " {\n color: ", ";\n }\n }\n"])), function (_a) {
|
|
16
16
|
var fillWidth = _a.fillWidth;
|
|
17
17
|
return (fillWidth ? "100%" : "fit-content");
|
|
18
18
|
}, function (_a) {
|
|
@@ -20,12 +20,10 @@ var StyledSelect = styled_components_1.default.div(templateObject_3 || (template
|
|
|
20
20
|
return (fillWidth ? "block" : "inline-block");
|
|
21
21
|
}, function (_a) {
|
|
22
22
|
var theme = _a.theme, error = _a.error;
|
|
23
|
-
return error ? theme.colors.red100 : theme.colors.grey20;
|
|
23
|
+
return (error ? theme.colors.red100 : theme.colors.grey20);
|
|
24
24
|
}, function (_a) {
|
|
25
25
|
var theme = _a.theme, hasSelectedValue = _a.hasSelectedValue, hasPlaceholder = _a.hasPlaceholder;
|
|
26
|
-
return !hasPlaceholder || hasSelectedValue
|
|
27
|
-
? theme.colors.grey100
|
|
28
|
-
: theme.colors.grey80;
|
|
26
|
+
return !hasPlaceholder || hasSelectedValue ? theme.colors.grey100 : theme.colors.grey80;
|
|
29
27
|
}, function (_a) {
|
|
30
28
|
var fillWidth = _a.fillWidth;
|
|
31
29
|
return (fillWidth ? "100%" : "auto");
|
|
@@ -34,7 +32,7 @@ var StyledSelect = styled_components_1.default.div(templateObject_3 || (template
|
|
|
34
32
|
return theme.colors.grey100;
|
|
35
33
|
}, function (_a) {
|
|
36
34
|
var theme = _a.theme, error = _a.error;
|
|
37
|
-
return error ? theme.colors.red100 : theme.colors.grey40;
|
|
35
|
+
return (error ? theme.colors.red100 : theme.colors.grey40);
|
|
38
36
|
}, function (_a) {
|
|
39
37
|
var theme = _a.theme;
|
|
40
38
|
return theme.colors.grey100;
|
|
@@ -58,11 +56,7 @@ var StyledSelect = styled_components_1.default.div(templateObject_3 || (template
|
|
|
58
56
|
return theme.colors.grey5;
|
|
59
57
|
}, function (_a) {
|
|
60
58
|
var theme = _a.theme, inline = _a.inline, required = _a.required, error = _a.error;
|
|
61
|
-
return inline && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = (0, tslib_1.__makeTemplateObject)(["\n border: none;\n border-radius: 0;\n border-bottom: 1px solid\n ", ";\n\n &:hover {\n border-bottom-color: ", ";\n }\n\n &:focus {\n border-bottom-color: ", ";\n color: ", ";\n background-color: ", ";\n }\n &:disabled {\n background-color: ", ";\n }\n "], ["\n border: none;\n border-radius: 0;\n border-bottom: 1px solid\n ", ";\n\n &:hover {\n border-bottom-color: ", ";\n }\n\n &:focus {\n border-bottom-color: ", ";\n color: ", ";\n background-color: ", ";\n }\n &:disabled {\n background-color: ", ";\n }\n "])), error
|
|
62
|
-
? theme.colors.red100
|
|
63
|
-
: required
|
|
64
|
-
? theme.colors.red20
|
|
65
|
-
: "transparent", required
|
|
59
|
+
return inline && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = (0, tslib_1.__makeTemplateObject)(["\n border: none;\n border-radius: 0;\n border-bottom: 1px solid\n ", ";\n\n &:hover {\n border-bottom-color: ", ";\n }\n\n &:focus {\n border-bottom-color: ", ";\n color: ", ";\n background-color: ", ";\n }\n &:disabled {\n background-color: ", ";\n }\n "], ["\n border: none;\n border-radius: 0;\n border-bottom: 1px solid\n ", ";\n\n &:hover {\n border-bottom-color: ", ";\n }\n\n &:focus {\n border-bottom-color: ", ";\n color: ", ";\n background-color: ", ";\n }\n &:disabled {\n background-color: ", ";\n }\n "])), error ? theme.colors.red100 : required ? theme.colors.red20 : "transparent", required
|
|
66
60
|
? theme.colors.red20
|
|
67
61
|
: error
|
|
68
62
|
? theme.colors.red100
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/TabbedSection/Tabs.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAI7C,eAAO,MAAM,aAAa;
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/TabbedSection/Tabs.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAI7C,eAAO,MAAM,aAAa;YACkB,OAAO;;6CAElD,CAAC;AA8DF,wBAAgB,iBAAiB,CAAC,KAAK,GAAG,MAAM,EAAE,EAChD,IAAI,EACJ,SAAS,EACT,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,YAAY,EACZ,OAAe,EACf,SAAS,GACV,EAAE,kBAAkB,CAAC,KAAK,CAAC,eAkC3B"}
|
|
@@ -9,7 +9,7 @@ var Typography_1 = require("../Typography");
|
|
|
9
9
|
var utils_1 = require("../../utils");
|
|
10
10
|
exports.TabWrapperCSS = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
11
11
|
var active = _a.active, isTicketHistory = _a.isTicketHistory;
|
|
12
|
-
return
|
|
12
|
+
return active && isTicketHistory ? Typography_1.headingStyles.h1 : Typography_1.headingStyles.h2;
|
|
13
13
|
});
|
|
14
14
|
var TabWrapper = (0, styled_components_1.default)(Stack_1.Stack)(templateObject_4 || (templateObject_4 = (0, tslib_1.__makeTemplateObject)(["\n font-family: ", ";\n font-style: normal;\n font-weight: ", ";\n font-size: 11px;\n line-height: 110%;\n cursor: default;\n align-items: center;\n justify-content: center;\n pointer-events: ", ";\n color: ", ";\n border-bottom: ", ";\n padding: 0 3px 6px 3px;\n\n :hover {\n color: ", ";\n cursor: pointer;\n }\n\n ", ";\n\n ", ";\n"], ["\n font-family: ", ";\n font-style: normal;\n font-weight: ", ";\n font-size: 11px;\n line-height: 110%;\n cursor: default;\n align-items: center;\n justify-content: center;\n pointer-events: ", ";\n color: ", ";\n border-bottom: ", ";\n padding: 0 3px 6px 3px;\n\n :hover {\n color: ", ";\n cursor: pointer;\n }\n\n ", ";\n\n ", ";\n"])), function (_a) {
|
|
15
15
|
var theme = _a.theme;
|
|
@@ -30,7 +30,7 @@ var TabWrapper = (0, styled_components_1.default)(Stack_1.Stack)(templateObject_
|
|
|
30
30
|
return props.active ? "solid 2px ".concat(props.theme.colors.brandPrimary) : "none";
|
|
31
31
|
}, function (props) { return props.theme.colors.grey100; }, function (_a) {
|
|
32
32
|
var active = _a.active, tabStyle = _a.tabStyle, theme = _a.theme;
|
|
33
|
-
return tabStyle === "button" && (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n flex-grow: 1;\n border: 1px solid ", ";\n border-bottom: solid 1px
|
|
33
|
+
return tabStyle === "button" && (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n flex-grow: 1;\n border: 1px solid ", ";\n border-bottom: solid 1px ", ";\n border-right-width: 0;\n\n :first-of-type {\n border-left-width: 0;\n }\n\n padding: 7px;\n\n ", ";\n "], ["\n flex-grow: 1;\n border: 1px solid ", ";\n border-bottom: solid 1px ", ";\n border-right-width: 0;\n\n :first-of-type {\n border-left-width: 0;\n }\n\n padding: 7px;\n\n ", ";\n "])), theme.colors.grey20, active ? theme.colors.brandPrimary : theme.colors.grey20, active && (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = (0, tslib_1.__makeTemplateObject)(["\n background-color: ", ";\n "], ["\n background-color: ", ";\n "])), theme.colors.brandShade20));
|
|
34
34
|
}, exports.TabWrapperCSS);
|
|
35
35
|
var StyledTabBar = (0, styled_components_1.default)(Stack_1.Stack)(templateObject_5 || (templateObject_5 = (0, tslib_1.__makeTemplateObject)(["\n border-bottom: ", ";\n width: 100%;\n padding: ", ";\n"], ["\n border-bottom: ", ";\n width: 100%;\n padding: ", ";\n"])), function (_a) {
|
|
36
36
|
var tabStyle = _a.tabStyle, theme = _a.theme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAiBxC,oBAAY,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;AA2BlD,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAiBxC,oBAAY,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;AA2BlD,eAAO,MAAM,wBAAwB,aAAc,mBAAmB,KAAG,MAMxE,CAAC;AAcF,eAAO,MAAM,QAAQ;;;;;mGA6BpB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;IApE9B,+DAA+D;;;;IAI/D,wFAAwF;;IAExF,8BAA8B;;mGAoL/B,CAAC"}
|