@deskpro/deskpro-ui 0.1.6 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/AttachmentTag/AttachmentTag.d.ts.map +1 -1
- package/dist/cjs/components/AttachmentTag/AttachmentTag.js +1 -1
- package/dist/cjs/components/Menu/Menu.d.ts +11 -1
- package/dist/cjs/components/Menu/Menu.d.ts.map +1 -1
- package/dist/cjs/components/TabbedSection/Tabs.d.ts.map +1 -1
- package/dist/cjs/components/TabbedSection/Tabs.js +4 -4
- package/dist/cjs/components/TabbedSection/types.d.ts +2 -0
- package/dist/cjs/components/TabbedSection/types.d.ts.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/deskpro-custom-icons.css +156 -0
- package/dist/deskpro-ui.css +248 -0
- package/dist/esm/components/AttachmentTag/AttachmentTag.js +1 -1
- package/dist/esm/components/TabbedSection/Tabs.js +4 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentTag.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentTag/AttachmentTag.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAoC,UAAU,EAAE,MAAM,OAAO,CAAC;AACrE,OAAO,EAAE,OAAO,EAAQ,MAAM,SAAS,CAAC;AA2CxC,eAAO,MAAM,IAAI;aAAyB,SAAS,GAAG,OAAO;SAO5D,CAAC;AAiBF,eAAO,MAAM,aAAa;cAVd,MAAM;cACN,MAAM;UACV,OAAO;mBACC,WAAW,iBAAiB,CAAC,KAAK,IAAI;;;;;
|
|
1
|
+
{"version":3,"file":"AttachmentTag.d.ts","sourceRoot":"","sources":["../../../../src/components/AttachmentTag/AttachmentTag.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAoC,UAAU,EAAE,MAAM,OAAO,CAAC;AACrE,OAAO,EAAE,OAAO,EAAQ,MAAM,SAAS,CAAC;AA2CxC,eAAO,MAAM,IAAI;aAAyB,SAAS,GAAG,OAAO;SAO5D,CAAC;AAiBF,eAAO,MAAM,aAAa;cAVd,MAAM;cACN,MAAM;UACV,OAAO;mBACC,WAAW,iBAAiB,CAAC,KAAK,IAAI;;;;;2CAyDpD,CAAC"}
|
|
@@ -39,7 +39,7 @@ exports.AttachmentTag = (0, react_1.forwardRef)(function AttachmentTag(_a, ref)
|
|
|
39
39
|
React.createElement(Size, null, displayFileSize)),
|
|
40
40
|
(0, ts_pattern_1.match)({ withClose: withClose, isLoading: isLoading })
|
|
41
41
|
.with({ isLoading: true }, function () { return React.createElement(LoadingAttachment_1.InlineLoadingSpinner, null); })
|
|
42
|
-
.with({ withClose: true }, function () { return (React.createElement(Button_1.IconButton, { minimal: true, onClick: onClose, icon: free_solid_svg_icons_1.faTimes })); })
|
|
42
|
+
.with({ withClose: true }, function () { return (React.createElement(Button_1.IconButton, { role: "button", "aria-label": "close-attachment", minimal: true, onClick: onClose, icon: free_solid_svg_icons_1.faTimes })); })
|
|
43
43
|
.otherwise(function () { return null; })));
|
|
44
44
|
});
|
|
45
45
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="@typescript/lib-dom" />
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { ReactNode } from "react";
|
|
3
|
+
import { HTMLAttributes, ReactNode } from "react";
|
|
4
4
|
import { AnyIcon } from "../Icon";
|
|
5
5
|
interface MenuProps {
|
|
6
6
|
children?: ReactNode | ((active: boolean) => ReactNode);
|
|
@@ -14,6 +14,16 @@ interface MenuDividerProps {
|
|
|
14
14
|
title?: ReactNode;
|
|
15
15
|
}
|
|
16
16
|
export declare function MenuDivider({ title }: MenuDividerProps): JSX.Element;
|
|
17
|
+
export declare type MenuItemProps = {
|
|
18
|
+
active?: boolean;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
icon?: AnyIcon | JSX.Element | null;
|
|
22
|
+
rightIcon?: AnyIcon | JSX.Element | null;
|
|
23
|
+
label?: ReactNode;
|
|
24
|
+
htmlTitle?: string;
|
|
25
|
+
iconColor?: string;
|
|
26
|
+
} & HTMLAttributes<HTMLAnchorElement>;
|
|
17
27
|
export declare const MenuItem: React.ForwardRefExoticComponent<{
|
|
18
28
|
active?: boolean | undefined;
|
|
19
29
|
children?: ReactNode;
|
|
@@ -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,
|
|
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;AAUnD,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,EACnB,IAAY,EACZ,YAAmB,EACnB,QAAQ,GACT,EAAE,SAAS,eAWX;AAED,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE,gBAAgB,eAUtD;AAED,oBAAY,aAAa,GAAG;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACpC,SAAS,CAAC,EAAE,OAAO,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACzC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,cAAc,CAAC,iBAAiB,CAAC,CAAC;AAEtC,eAAO,MAAM,QAAQ;;eATR,SAAS;;;;YAIZ,SAAS;;;qFAiEjB,CAAC"}
|
|
@@ -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;YAKd,OAAO;;6CAGlB,CAAC;AA+DF,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 active && isTicketHistory ? Typography_1.headingStyles.h1 : Typography_1.headingStyles.h2;
|
|
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 ", ";\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 ", ";\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;
|
|
@@ -42,11 +42,11 @@ var StyledTabBar = (0, styled_components_1.default)(Stack_1.Stack)(templateObjec
|
|
|
42
42
|
function TabbedSectionTabs(_a) {
|
|
43
43
|
var tabs = _a.tabs, activeTab = _a.activeTab, onTabChange = _a.onTabChange, children = _a.children, tabsWrapperStyles = _a.tabsWrapperStyles, rightElement = _a.rightElement, _b = _a.tabType, tabType = _b === void 0 ? "tab" : _b, className = _a.className;
|
|
44
44
|
return (React.createElement(React.Fragment, null,
|
|
45
|
-
React.createElement(StyledTabBar, (0, tslib_1.__assign)({}, (0, utils_1.dpNameProp)("TabbedSectionTabs"), { style: tabsWrapperStyles, tabStyle: tabType, justify: "space-around", className: className }),
|
|
45
|
+
React.createElement(StyledTabBar, (0, tslib_1.__assign)({}, (0, utils_1.dpNameProp)("TabbedSectionTabs"), { style: tabsWrapperStyles, tabStyle: tabType, justify: "space-around", className: className, role: "tablist" }),
|
|
46
46
|
tabs.map(function (tab, index) {
|
|
47
47
|
return (React.createElement(TabWrapper, { key: index, disabled: tab.disabled, active: tab.id === activeTab, onClick: function () {
|
|
48
48
|
onTabChange(tab);
|
|
49
|
-
}, tabStyle: tabType }, tab.title));
|
|
49
|
+
}, tabStyle: tabType, role: "tab", "aria-selected": tab.id === activeTab, "aria-controls": tab.controls }, tab.title));
|
|
50
50
|
}),
|
|
51
51
|
rightElement),
|
|
52
52
|
children));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/TabbedSection/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,oBAAoB,CAAC,KAAK,GAAG,MAAM;IAClD,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/TabbedSection/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,oBAAoB,CAAC,KAAK,GAAG,MAAM;IAClD,EAAE,EAAE,KAAK,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,oBAAY,kBAAkB,CAAC,KAAK,IAAI;IACtC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,EAAE,oBAAoB,CAAC,KAAK,CAAC,EAAE,CAAC;IACpC,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,WAAW,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IAC1D,iBAAiB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACxC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|