@popsure/dirty-swan 0.41.0-alpha → 0.41.0-alpha.2
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/index.js +82 -81
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/button/index.d.ts +19 -12
- package/dist/cjs/lib/components/button/index.stories.d.ts +57 -0
- package/dist/cjs/lib/components/button/index.test.d.ts +1 -0
- package/dist/cjs/lib/index.d.ts +1 -1
- package/dist/esm/components/button/index.js +20 -17
- package/dist/esm/components/button/index.js.map +1 -1
- package/dist/esm/components/button/index.stories.js +97 -0
- package/dist/esm/components/button/index.stories.js.map +1 -0
- package/dist/esm/components/button/index.test.js +50 -0
- package/dist/esm/components/button/index.test.js.map +1 -0
- package/dist/esm/components/comparisonTable/index.js.map +1 -1
- package/dist/esm/components/downloadButton/index.js +5 -6
- package/dist/esm/components/downloadButton/index.js.map +1 -1
- package/dist/esm/components/downloadButton/index.stories.js +3 -2
- package/dist/esm/components/downloadButton/index.stories.js.map +1 -1
- package/dist/esm/components/icon/icons/Download.js +2 -2
- package/dist/esm/components/icon/icons/Download.js.map +1 -1
- package/dist/esm/components/icon/icons.stories.js +3 -3
- package/dist/esm/components/icon/icons.stories.js.map +1 -1
- package/dist/esm/components/icon/index.stories.js +1 -1
- package/dist/esm/components/toast/index.stories.js +2 -2
- package/dist/esm/components/toast/index.stories.js.map +1 -1
- package/dist/esm/{index-b4cd59e9.js → index-39fa3631.js} +3 -3
- package/dist/esm/{index-b4cd59e9.js.map → index-39fa3631.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lib/components/button/index.d.ts +19 -12
- package/dist/esm/lib/components/button/index.stories.d.ts +57 -0
- package/dist/esm/lib/components/button/index.test.d.ts +1 -0
- package/dist/esm/lib/index.d.ts +1 -1
- package/dist/index.css +84 -27
- package/dist/index.css.map +1 -1
- package/dist/lib/scss/private/components/_buttons.scss +107 -26
- package/package.json +1 -1
- package/src/lib/components/button/index.stories.tsx +189 -0
- package/src/lib/components/button/index.test.tsx +51 -0
- package/src/lib/components/button/index.tsx +78 -59
- package/src/lib/components/comparisonTable/index.tsx +1 -1
- package/src/lib/components/downloadButton/index.tsx +9 -8
- package/src/lib/components/icon/icons.stories.tsx +4 -2
- package/src/lib/components/toast/index.stories.tsx +2 -5
- package/src/lib/index.tsx +1 -1
- package/src/lib/scss/private/components/_buttons.scss +107 -26
- package/dist/cjs/lib/components/button/icons/index.d.ts +0 -9
- package/dist/esm/lib/components/button/icons/index.d.ts +0 -9
- package/src/lib/components/button/icons/index.ts +0 -14
- package/src/lib/components/button/icons/send-purple.svg +0 -4
- package/src/lib/components/button/icons/send-white.svg +0 -4
- package/src/lib/components/button/index.stories.mdx +0 -142
- package/src/lib/components/button/styles.module.scss +0 -5
- package/src/lib/components/downloadButton/icons/download.svg +0 -5
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { _ as __assign } from '../../tslib.es6-5bc94358.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import Button from '../button/index.js';
|
|
3
|
+
import { Button } from '../button/index.js';
|
|
4
4
|
import CheckIcon from '../icon/icons/Check.js';
|
|
5
|
+
import DownloadIcon from '../icon/icons/Download.js';
|
|
5
6
|
import { s as styleInject } from '../../style-inject.es-1f59c1d0.js';
|
|
7
|
+
import '../../index-6ea95111.js';
|
|
6
8
|
import 'react';
|
|
7
9
|
import '../icon/IconWrapper/IconWrapper.js';
|
|
8
|
-
import '../../index-6ea95111.js';
|
|
9
|
-
|
|
10
|
-
var downloadIcon = "data:image/svg+xml,%3Csvg%20width%3D%2221%22%20height%3D%2220%22%20viewBox%3D%220%200%2021%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M18%2012.5V15.8333C18%2016.2754%2017.8244%2016.6993%2017.5118%2017.0118C17.1993%2017.3244%2016.7754%2017.5%2016.3333%2017.5H4.66667C4.22464%2017.5%203.80072%2017.3244%203.48816%2017.0118C3.17559%2016.6993%203%2016.2754%203%2015.8333V12.5%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M6.33325%208.33301L10.4999%2012.4997L14.6666%208.33301%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M10.5%2012.5V2.5%22%20stroke%3D%22white%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E";
|
|
11
10
|
|
|
12
11
|
var css_248z = ".style-module_button__mw9kQ {\n height: 48px;\n}\n\n.style-module_chip-complete__3YkB9 {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: white;\n border-radius: 8px;\n padding: 8px 16px;\n height: 48px;\n}";
|
|
13
12
|
var styles = {"button":"style-module_button__mw9kQ","chip-complete":"style-module_chip-complete__3YkB9"};
|
|
@@ -15,10 +14,10 @@ styleInject(css_248z);
|
|
|
15
14
|
|
|
16
15
|
var InitialButton = function (_a) {
|
|
17
16
|
var onDownload = _a.onDownload;
|
|
18
|
-
return (jsx(Button, { className: "w100 " + styles.button,
|
|
17
|
+
return (jsx(Button, __assign({ className: "w100 " + styles.button, leftIcon: jsx(DownloadIcon, {}, void 0), onClick: onDownload, "data-cy": "download-documents-button" }, { children: "Download" }), void 0));
|
|
19
18
|
};
|
|
20
19
|
// TODO: Allow setting loading to true to display text
|
|
21
|
-
var GeneratingButton = function () { return (jsx(Button, { className: "w100 " + styles.button,
|
|
20
|
+
var GeneratingButton = function () { return (jsx(Button, __assign({ className: "w100 " + styles.button, loading: true }, { children: "Generating" }), void 0)); };
|
|
22
21
|
var CompletedChip = function () { return (jsxs("div", __assign({ className: styles['chip-complete'] }, { children: [jsx(CheckIcon, { color: 'grey-500', size: 16 }, void 0),
|
|
23
22
|
jsx("div", __assign({ className: "p-h4 tc-grey-500 ml8" }, { children: "Download complete" }), void 0)] }), void 0)); };
|
|
24
23
|
var DownloadButton = function (_a) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/lib/components/downloadButton/index.tsx"],"sourcesContent":["import { Button } from '../button';\nimport { DownloadStatus } from '../../models/download';\nimport { CheckIcon, DownloadIcon } from '../icon/icons';\nimport styles from './style.module.scss';\n\nexport interface DownloadButtonProps {\n downloadStatus: DownloadStatus;\n onDownload: () => void;\n className?: string;\n customFail?: React.ReactNode;\n}\n\nconst InitialButton = ({ onDownload }: { onDownload: () => void }) => (\n <Button\n className={`w100 ${styles.button}`}\n leftIcon={<DownloadIcon />}\n onClick={onDownload}\n data-cy=\"download-documents-button\"\n >\n Download\n </Button>\n);\n\n// TODO: Allow setting loading to true to display text\nconst GeneratingButton = () => (\n <Button\n className={`w100 ${styles.button}`}\n loading={true}\n >\n Generating\n </Button>\n);\n\nconst CompletedChip = () => (\n <div className={styles['chip-complete']}>\n <CheckIcon color={'grey-500'} size={16} />\n <div className=\"p-h4 tc-grey-500 ml8\">Download complete</div>\n </div>\n);\n\nconst DownloadButton = ({\n downloadStatus,\n onDownload,\n className = '',\n customFail,\n}: DownloadButtonProps) => {\n const mapDownloadButton: { [K in DownloadStatus]: React.ReactNode } = {\n INITIAL: <InitialButton onDownload={onDownload} />,\n GENERATING: <GeneratingButton />,\n COMPLETED: <CompletedChip />,\n FAILED: <InitialButton onDownload={onDownload} />,\n };\n\n return (\n <div className={`d-flex fd-column ai-center ${className}`}>\n <div className=\"ws4\">{mapDownloadButton[downloadStatus]}</div>\n {downloadStatus === 'FAILED' && (\n <div className=\"p-notice p-notice--danger p-p mt40 wmx5\">\n {customFail ??\n 'An error occured when generating documents. Please try again or contact us.'}\n </div>\n )}\n </div>\n );\n};\n\nexport { DownloadButton };\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;AAYA,IAAM,aAAa,GAAG,UAAC,EAA0C;QAAxC,UAAU,gBAAA;IAAmC,QACpEA,IAAC,MAAM,aACL,SAAS,EAAE,UAAQ,MAAM,CAAC,MAAQ,EAClC,QAAQ,EAAEA,IAAC,YAAY,aAAG,EAC1B,OAAO,EAAE,UAAU,aACX,2BAA2B,sCAG5B;AAR2D,CASrE,CAAC;AAEF;AACA,IAAM,gBAAgB,GAAG,cAAM,QAC7BA,IAAC,MAAM,aACL,SAAS,EAAE,UAAQ,MAAM,CAAC,MAAQ,EAClC,OAAO,EAAE,IAAI,wCAGN,IACV,CAAC;AAEF,IAAM,aAAa,GAAG,cAAM,QAC1BC,uBAAK,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,iBACrCD,IAAC,SAAS,IAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,WAAI;QAC1CA,sBAAK,SAAS,EAAC,sBAAsB,+CAAwB,aACzD,IACP,CAAC;IAEI,cAAc,GAAG,UAAC,EAKF;QAJpB,cAAc,oBAAA,EACd,UAAU,gBAAA,EACV,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA,EACd,UAAU,gBAAA;IAEV,IAAM,iBAAiB,GAA+C;QACpE,OAAO,EAAEA,IAAC,aAAa,IAAC,UAAU,EAAE,UAAU,WAAI;QAClD,UAAU,EAAEA,IAAC,gBAAgB,aAAG;QAChC,SAAS,EAAEA,IAAC,aAAa,aAAG;QAC5B,MAAM,EAAEA,IAAC,aAAa,IAAC,UAAU,EAAE,UAAU,WAAI;KAClD,CAAC;IAEF,QACEC,uBAAK,SAAS,EAAE,gCAA8B,SAAW,iBACvDD,sBAAK,SAAS,EAAC,KAAK,gBAAE,iBAAiB,CAAC,cAAc,CAAC,YAAO;YAC7D,cAAc,KAAK,QAAQ,KAC1BA,sBAAK,SAAS,EAAC,yCAAyC,gBACrD,UAAU,aAAV,UAAU,cAAV,UAAU,GACT,6EAA6E,YAC3E,CACP,aACG,EACN;AACJ;;;;"}
|
|
@@ -2,11 +2,12 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { DownloadButton } from './index.js';
|
|
3
3
|
import '../../tslib.es6-5bc94358.js';
|
|
4
4
|
import '../button/index.js';
|
|
5
|
+
import '../../index-6ea95111.js';
|
|
5
6
|
import 'react';
|
|
6
|
-
import '../../style-inject.es-1f59c1d0.js';
|
|
7
7
|
import '../icon/icons/Check.js';
|
|
8
8
|
import '../icon/IconWrapper/IconWrapper.js';
|
|
9
|
-
import '../../
|
|
9
|
+
import '../../style-inject.es-1f59c1d0.js';
|
|
10
|
+
import '../icon/icons/Download.js';
|
|
10
11
|
|
|
11
12
|
var story = {
|
|
12
13
|
title: 'JSX/DownloadButton',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.stories.js","sources":["../../../../../src/lib/components/downloadButton/index.stories.tsx"],"sourcesContent":["import { DownloadButton, DownloadButtonProps } from '.';\n\nconst story = {\n title: 'JSX/DownloadButton',\n component: DownloadButton,\n argTypes: {\n downloadStatus: {\n description: 'Status of the button',\n defaultValue: 'INITIAL',\n },\n customFail: {\n description: 'Customised error message. Only visible when button is on `FAILED` state.',\n control: { type: 'text' },\n },\n onDownload: {\n description: 'Called when download button has been clicked.',\n action: true,\n table: {\n category: 'Callbacks',\n },\n },\n className: {\n description: 'This property allows to add custom styles to the component.',\n }\n },\n parameters: {\n componentSubtitle: 'DownloadButton component displays progress and status of downloading files.',\n },\n};\n\nexport const DownloadButtonStory = ({\n downloadStatus,\n onDownload,\n className,\n customFail\n}: DownloadButtonProps) => (\n <DownloadButton\n className={className}\n customFail={customFail}\n downloadStatus={downloadStatus}\n onDownload={onDownload}\n />\n);\n\nDownloadButtonStory.storyName = \"DownloadButton\";\n\nexport const CustomErrorMessage = ({\n onDownload,\n}: DownloadButtonProps) => (\n <DownloadButton\n customFail=\"Custom error message\"\n downloadStatus=\"FAILED\"\n onDownload={onDownload}\n />\n);\n\n\nexport default story;\n"],"names":["_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.stories.js","sources":["../../../../../src/lib/components/downloadButton/index.stories.tsx"],"sourcesContent":["import { DownloadButton, DownloadButtonProps } from '.';\n\nconst story = {\n title: 'JSX/DownloadButton',\n component: DownloadButton,\n argTypes: {\n downloadStatus: {\n description: 'Status of the button',\n defaultValue: 'INITIAL',\n },\n customFail: {\n description: 'Customised error message. Only visible when button is on `FAILED` state.',\n control: { type: 'text' },\n },\n onDownload: {\n description: 'Called when download button has been clicked.',\n action: true,\n table: {\n category: 'Callbacks',\n },\n },\n className: {\n description: 'This property allows to add custom styles to the component.',\n }\n },\n parameters: {\n componentSubtitle: 'DownloadButton component displays progress and status of downloading files.',\n },\n};\n\nexport const DownloadButtonStory = ({\n downloadStatus,\n onDownload,\n className,\n customFail\n}: DownloadButtonProps) => (\n <DownloadButton\n className={className}\n customFail={customFail}\n downloadStatus={downloadStatus}\n onDownload={onDownload}\n />\n);\n\nDownloadButtonStory.storyName = \"DownloadButton\";\n\nexport const CustomErrorMessage = ({\n onDownload,\n}: DownloadButtonProps) => (\n <DownloadButton\n customFail=\"Custom error message\"\n downloadStatus=\"FAILED\"\n onDownload={onDownload}\n />\n);\n\n\nexport default story;\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;IAEM,KAAK,GAAG;IACZ,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,cAAc;IACzB,QAAQ,EAAE;QACR,cAAc,EAAE;YACd,WAAW,EAAE,sBAAsB;YACnC,YAAY,EAAE,SAAS;SACxB;QACD,UAAU,EAAE;YACV,WAAW,EAAE,0EAA0E;YACvF,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SAC1B;QACD,UAAU,EAAE;YACV,WAAW,EAAE,+CAA+C;YAC5D,MAAM,EAAE,IAAI;YACZ,KAAK,EAAE;gBACL,QAAQ,EAAE,WAAW;aACtB;SACF;QACD,SAAS,EAAE;YACT,WAAW,EAAE,6DAA6D;SAC3E;KACF;IACD,UAAU,EAAE;QACV,iBAAiB,EAAE,6EAA6E;KACjG;EACD;IAEW,mBAAmB,GAAG,UAAC,EAKd;QAJpB,cAAc,oBAAA,EACd,UAAU,gBAAA,EACV,SAAS,eAAA,EACT,UAAU,gBAAA;IACe,QACzBA,IAAC,cAAc,IACb,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,WACtB;AANuB,EAOzB;AAEF,mBAAmB,CAAC,SAAS,GAAG,gBAAgB,CAAC;IAEpC,kBAAkB,GAAG,UAAC,EAEb;QADlB,UAAU,gBAAA;IACa,QACzBA,IAAC,cAAc,IACb,UAAU,EAAC,sBAAsB,EACjC,cAAc,EAAC,QAAQ,EACvB,UAAU,EAAE,UAAU,WACtB;AALuB;;;;;"}
|
|
@@ -5,9 +5,9 @@ import '../../../tslib.es6-5bc94358.js';
|
|
|
5
5
|
import '../../../index-6ea95111.js';
|
|
6
6
|
import '../../../style-inject.es-1f59c1d0.js';
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var DownloadIcon = (function (props) {
|
|
9
9
|
return createElement(IconWrapper, props, jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeMiterlimit: 10, strokeWidth: 2, d: "M3 14v5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5" }, void 0), jsx("path", { stroke: "currentColor", strokeLinecap: "round", strokeWidth: 2, d: "m7 10 4.823 4.823a.25.25 0 0 0 .354 0L17 10M12 3v12" }, void 0));
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
export default
|
|
12
|
+
export default DownloadIcon;
|
|
13
13
|
//# sourceMappingURL=Download.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Download.js","sources":["../../../../../../src/lib/components/icon/icons/Download.tsx"],"sourcesContent":["/* Generated file. Do not modify. */\nimport { createElement } from 'react';\nimport { IconWrapper } from '../IconWrapper';\nimport type { IconWrapperProps } from '../IconWrapper';\nexport default (props: IconWrapperProps) =>\n createElement(\n IconWrapper,\n props,\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeMiterlimit={10}\n strokeWidth={2}\n d=\"M3 14v5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5\"\n />,\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeWidth={2}\n d=\"m7 10 4.823 4.823a.25.25 0 0 0 .354 0L17 10M12 3v12\"\n />\n );\n"],"names":["_jsx"],"mappings":";;;;;;;AAIA,
|
|
1
|
+
{"version":3,"file":"Download.js","sources":["../../../../../../src/lib/components/icon/icons/Download.tsx"],"sourcesContent":["/* Generated file. Do not modify. */\nimport { createElement } from 'react';\nimport { IconWrapper } from '../IconWrapper';\nimport type { IconWrapperProps } from '../IconWrapper';\nexport default (props: IconWrapperProps) =>\n createElement(\n IconWrapper,\n props,\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeMiterlimit={10}\n strokeWidth={2}\n d=\"M3 14v5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5\"\n />,\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeWidth={2}\n d=\"m7 10 4.823 4.823a.25.25 0 0 0 .354 0L17 10M12 3v12\"\n />\n );\n"],"names":["_jsx"],"mappings":";;;;;;;AAIA,oBAAe,UAAC,KAAuB;IACrC,OAAA,aAAa,CACX,WAAW,EACX,KAAK,EACLA,cACE,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,gBAAgB,EAAE,EAAE,EACpB,WAAW,EAAE,CAAC,EACd,CAAC,EAAC,2CAA2C,WAC7C,EACFA,cACE,MAAM,EAAC,cAAc,EACrB,aAAa,EAAC,OAAO,EACrB,WAAW,EAAE,CAAC,EACd,CAAC,EAAC,qDAAqD,WACvD,CACH;AAhBD,CAgBC;;;;"}
|
|
@@ -2,8 +2,8 @@ import { _ as __assign } from '../../tslib.es6-5bc94358.js';
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { Input } from '../input/index.js';
|
|
5
|
-
import { i as icons } from '../../index-
|
|
6
|
-
import Button from '../button/index.js';
|
|
5
|
+
import { i as icons } from '../../index-39fa3631.js';
|
|
6
|
+
import { Button } from '../button/index.js';
|
|
7
7
|
import { c as classNames } from '../../index-6ea95111.js';
|
|
8
8
|
import { s as styleInject } from '../../style-inject.es-1f59c1d0.js';
|
|
9
9
|
import '../../index-fb46adf9.js';
|
|
@@ -399,7 +399,7 @@ var IconsList = function () {
|
|
|
399
399
|
}));
|
|
400
400
|
};
|
|
401
401
|
return (jsxs("div", { children: [jsx("div", __assign({ className: classNames(styles.searchBar, 'bg-white') }, { children: jsxs("div", __assign({ className: 'd-flex gap8 wmx12 m-auto' }, { children: [jsx(Input, { className: 'w70', onChange: handleOnSearch, placeholder: 'Search icon', value: value }, void 0),
|
|
402
|
-
jsx(Button, { className: 'w30', disabled: !value,
|
|
402
|
+
jsx(Button, __assign({ className: 'w30', disabled: !value, onClick: clearSearch }, { children: "Clear search" }), void 0)] }), void 0) }), void 0),
|
|
403
403
|
jsx("div", __assign({ className: 'd-flex f-wrap' }, { children: options.map(function (_a) {
|
|
404
404
|
var iconKey = _a[0], Icon = _a[1];
|
|
405
405
|
return (jsx("div", __assign({ className: "w20 p8" }, { children: jsxs("div", __assign({ className: 'br4 p24 pt16 pb16 bg-grey-100 w100 d-flex fd-column ai-center' }, { children: [jsx(Icon, { size: 32 }, void 0),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.stories.js","sources":["../../../../../src/lib/components/icon/icons.stories.tsx"],"sourcesContent":["import { ChangeEvent, useState } from 'react';\nimport { Input } from '../input';\nimport * as icons from './icons';\nimport Button from '../button';\nimport classNames from 'classnames';\nimport styles from './style.module.scss';\n\nconst story = {\n title: 'JSX/Icon/IconsList',\n};\n\nconst iconsList = Object.entries(icons);\n\nexport const IconsList = () => {\n const [value, setValue] = useState('');\n const [options, setOptions] = useState(iconsList);\n\n const clearSearch = () => {\n setValue('');\n setOptions(iconsList);\n };\n\n const handleOnSearch = (event: ChangeEvent<HTMLInputElement>) => {\n const searchValue = event.target.value;\n setValue(event.target.value);\n\n if (searchValue === '') {\n setOptions(iconsList);\n return;\n }\n\n setOptions(iconsList.filter(([key]) => \n key.toLowerCase()\n .includes(searchValue.toLowerCase())\n ));\n };\n\n return (\n <div>\n <div className={classNames(styles.searchBar, 'bg-white')}>\n <div className='d-flex gap8 wmx12 m-auto'>\n <Input\n className='w70'\n onChange={handleOnSearch}\n placeholder='Search icon'\n value={value} \n />\n <Button className='w30' disabled={!value}
|
|
1
|
+
{"version":3,"file":"icons.stories.js","sources":["../../../../../src/lib/components/icon/icons.stories.tsx"],"sourcesContent":["import { ChangeEvent, useState } from 'react';\nimport { Input } from '../input';\nimport * as icons from './icons';\nimport { Button } from '../button';\nimport classNames from 'classnames';\nimport styles from './style.module.scss';\n\nconst story = {\n title: 'JSX/Icon/IconsList',\n};\n\nconst iconsList = Object.entries(icons);\n\nexport const IconsList = () => {\n const [value, setValue] = useState('');\n const [options, setOptions] = useState(iconsList);\n\n const clearSearch = () => {\n setValue('');\n setOptions(iconsList);\n };\n\n const handleOnSearch = (event: ChangeEvent<HTMLInputElement>) => {\n const searchValue = event.target.value;\n setValue(event.target.value);\n\n if (searchValue === '') {\n setOptions(iconsList);\n return;\n }\n\n setOptions(iconsList.filter(([key]) => \n key.toLowerCase()\n .includes(searchValue.toLowerCase())\n ));\n };\n\n return (\n <div>\n <div className={classNames(styles.searchBar, 'bg-white')}>\n <div className='d-flex gap8 wmx12 m-auto'>\n <Input\n className='w70'\n onChange={handleOnSearch}\n placeholder='Search icon'\n value={value} \n />\n <Button className='w30' disabled={!value} onClick={clearSearch}>\n Clear search\n </Button>\n </div>\n </div>\n\n <div className='d-flex f-wrap'>\n {options.map(([iconKey, Icon]) => (\n <div key={iconKey} className=\"w20 p8\">\n <div className='br4 p24 pt16 pb16 bg-grey-100 w100 d-flex fd-column ai-center'>\n <Icon size={32} />\n <span className='p-p--small'>{iconKey}</span>\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n}\n\nexport default story;\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOM,KAAK,GAAG;IACZ,KAAK,EAAE,oBAAoB;EAC3B;AAEF,IAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAE3B,SAAS,GAAG;IACjB,IAAA,KAAoB,QAAQ,CAAC,EAAE,CAAC,EAA/B,KAAK,QAAA,EAAE,QAAQ,QAAgB,CAAC;IACjC,IAAA,KAAwB,QAAQ,CAAC,SAAS,CAAC,EAA1C,OAAO,QAAA,EAAE,UAAU,QAAuB,CAAC;IAElD,IAAM,WAAW,GAAG;QAClB,QAAQ,CAAC,EAAE,CAAC,CAAC;QACb,UAAU,CAAC,SAAS,CAAC,CAAC;KACvB,CAAC;IAEF,IAAM,cAAc,GAAG,UAAC,KAAoC;QAC1D,IAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;QACvC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAE7B,IAAI,WAAW,KAAK,EAAE,EAAE;YACtB,UAAU,CAAC,SAAS,CAAC,CAAC;YACtB,OAAO;SACR;QAED,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,UAAC,EAAK;gBAAJ,GAAG,QAAA;YAC/B,OAAA,GAAG,CAAC,WAAW,EAAE;iBACd,QAAQ,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;SAAA,CACvC,CAAC,CAAC;KACJ,CAAC;IAEF,QACEA,yBACEC,sBAAK,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,gBACtDD,uBAAK,SAAS,EAAC,0BAA0B,iBACzCC,IAAC,KAAK,IACJ,SAAS,EAAC,KAAK,EACf,QAAQ,EAAE,cAAc,EACxB,WAAW,EAAC,aAAa,EACzB,KAAK,EAAE,KAAK,WACZ;wBACFA,IAAC,MAAM,aAAC,SAAS,EAAC,KAAK,EAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,WAAW,0CAErD,aACH,YACF;YAENA,sBAAK,SAAS,EAAC,eAAe,gBAC3B,OAAO,CAAC,GAAG,CAAC,UAAC,EAAe;wBAAd,OAAO,QAAA,EAAE,IAAI,QAAA;oBAAM,QAChCA,sBAAmB,SAAS,EAAC,QAAQ,gBACnCD,uBAAK,SAAS,EAAC,+DAA+D,iBAC5EC,IAAC,IAAI,IAAC,IAAI,EAAE,EAAE,WAAI;gCAClBA,uBAAM,SAAS,EAAC,YAAY,gBAAE,OAAO,YAAQ,aACzC,KAJE,OAAO,CAKX;iBACP,CAAC,YACE,YACF,EACN;AACJ;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { IconWrapper } from './IconWrapper/IconWrapper.js';
|
|
3
|
-
import { i as icons } from '../../index-
|
|
3
|
+
import { i as icons } from '../../index-39fa3631.js';
|
|
4
4
|
import '../../tslib.es6-5bc94358.js';
|
|
5
5
|
import '../../index-6ea95111.js';
|
|
6
6
|
import '../../style-inject.es-1f59c1d0.js';
|
|
@@ -2,7 +2,7 @@ import { _ as __assign } from '../../tslib.es6-5bc94358.js';
|
|
|
2
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { c as classNames } from '../../index-6ea95111.js';
|
|
4
4
|
import { T as Toast, a as Toaster, s as styles, t as toast } from '../../index-de7886d3.js';
|
|
5
|
-
import Button from '../button/index.js';
|
|
5
|
+
import { Button } from '../button/index.js';
|
|
6
6
|
import '../../style-inject.es-1f59c1d0.js';
|
|
7
7
|
import 'react';
|
|
8
8
|
import '../../_commonjsHelpers-e7f67fd8.js';
|
|
@@ -64,7 +64,7 @@ var ToastStory = function (_a) {
|
|
|
64
64
|
return (jsxs(Fragment, { children: [jsxs("div", __assign({ className: 'mb16' }, { children: [jsx("div", { children: "Show a toast using the following code:" }, void 0),
|
|
65
65
|
jsx("pre", __assign({ className: 'bg-grey-300 br4 d-inline-flex p8 mt8' }, { children: "() => toast(title, { description, type, action })" }), void 0)] }), void 0),
|
|
66
66
|
jsx(Toaster, {}, void 0),
|
|
67
|
-
jsx(Button, {
|
|
67
|
+
jsx(Button, __assign({ onClick: showToast }, { children: "Click here to trigger toast" }), void 0)] }, void 0));
|
|
68
68
|
};
|
|
69
69
|
ToastStory.storyName = "Toast";
|
|
70
70
|
var ToastTypes = function (props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.stories.js","sources":["../../../../../src/lib/components/toast/index.stories.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { Toast, ToastProps, ToastType, Toaster, toast } from '.';\nimport Button from '../button';\nimport styles from './style.module.scss';\n\nconst toastTypes: ToastType[] = ['success', 'warning', 'error', 'information'];\n\nconst story = {\n title: 'JSX/Toast',\n component: Toast,\n argTypes: {\n title: {\n description: 'Title of the toast.',\n },\n description: {\n description: 'Additional description content to be displayed inside the toast.',\n },\n type: {\n description: 'Type of toast to display. This changes the styles/colors of the toast.',\n },\n action: {\n description: 'Object containing a possible action button inside the toast.',\n },\n duration: {\n description: 'Duration in ms that the toast should be displayed.',\n table: {\n defaultValue: { summary: 3000 },\n }\n },\n onDismiss: {\n table: {\n disable: true,\n },\n }\n },\n args: {\n title: 'We couldn’t open the chat',\n description: 'Description description description description description description description',\n action: {\n title: 'Send an email',\n onClick: () => {}\n },\n type: 'success',\n duration: 3000,\n },\n};\n\nconst FakeInlineToast = ({ \n title, \n description, \n action, \n type\n}: Omit<ToastProps, 'onDismiss'>) => (\n <div className='mb32'>\n <div className={classNames(styles.toast, 'br8 bs-lg d-inline-flex')}>\n <Toast \n title={title}\n onDismiss={() => {}}\n description={description}\n action={action}\n type={type}\n />\n </div>\n </div>\n);\n\nexport const ToastStory = ({ title, description, action, type, duration }: ToastProps) => {\n const showToast = () => toast(\n title, \n {\n description,\n duration,\n type,\n action\n }\n );\n\n return (\n <>\n <div className='mb16'>\n <div>\n Show a toast using the following code:\n </div>\n <pre className='bg-grey-300 br4 d-inline-flex p8 mt8'>\n {\"() => toast(title, { description, type, action })\"}\n </pre>\n </div>\n <Toaster />\n\n <Button
|
|
1
|
+
{"version":3,"file":"index.stories.js","sources":["../../../../../src/lib/components/toast/index.stories.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport { Toast, ToastProps, ToastType, Toaster, toast } from '.';\nimport { Button } from '../button';\nimport styles from './style.module.scss';\n\nconst toastTypes: ToastType[] = ['success', 'warning', 'error', 'information'];\n\nconst story = {\n title: 'JSX/Toast',\n component: Toast,\n argTypes: {\n title: {\n description: 'Title of the toast.',\n },\n description: {\n description: 'Additional description content to be displayed inside the toast.',\n },\n type: {\n description: 'Type of toast to display. This changes the styles/colors of the toast.',\n },\n action: {\n description: 'Object containing a possible action button inside the toast.',\n },\n duration: {\n description: 'Duration in ms that the toast should be displayed.',\n table: {\n defaultValue: { summary: 3000 },\n }\n },\n onDismiss: {\n table: {\n disable: true,\n },\n }\n },\n args: {\n title: 'We couldn’t open the chat',\n description: 'Description description description description description description description',\n action: {\n title: 'Send an email',\n onClick: () => {}\n },\n type: 'success',\n duration: 3000,\n },\n};\n\nconst FakeInlineToast = ({ \n title, \n description, \n action, \n type\n}: Omit<ToastProps, 'onDismiss'>) => (\n <div className='mb32'>\n <div className={classNames(styles.toast, 'br8 bs-lg d-inline-flex')}>\n <Toast \n title={title}\n onDismiss={() => {}}\n description={description}\n action={action}\n type={type}\n />\n </div>\n </div>\n);\n\nexport const ToastStory = ({ title, description, action, type, duration }: ToastProps) => {\n const showToast = () => toast(\n title, \n {\n description,\n duration,\n type,\n action\n }\n );\n\n return (\n <>\n <div className='mb16'>\n <div>\n Show a toast using the following code:\n </div>\n <pre className='bg-grey-300 br4 d-inline-flex p8 mt8'>\n {\"() => toast(title, { description, type, action })\"}\n </pre>\n </div>\n <Toaster />\n\n <Button onClick={showToast}>Click here to trigger toast</Button>\n </>\n );\n};\n\nToastStory.storyName = \"Toast\";\n\nexport const ToastTypes = (props: ToastProps) => {\n return (\n <>\n {toastTypes.map((toastType) => (\n <div key={toastType} className='d-flex fd-column'>\n <h3 className='p-h3 mb16'>{toastType}</h3>\n <FakeInlineToast {...props} type={toastType} />\n </div>\n ))}\n </>\n );\n};\n\nexport const ToastContent = ({ title, description, action }: ToastProps) => {\n return (\n <div className='d-flex fd-column'>\n <FakeInlineToast title={title} />\n <FakeInlineToast title={title} description={description} />\n <FakeInlineToast title={title} description={description} action={action} />\n <FakeInlineToast title={title} action={action} />\n </div>\n );\n};\n\nexport default story;\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;AAKA,IAAM,UAAU,GAAgB,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;IAEzE,KAAK,GAAG;IACZ,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,WAAW,EAAE,qBAAqB;SACnC;QACD,WAAW,EAAE;YACX,WAAW,EAAE,kEAAkE;SAChF;QACD,IAAI,EAAE;YACJ,WAAW,EAAE,wEAAwE;SACtF;QACD,MAAM,EAAE;YACN,WAAW,EAAE,8DAA8D;SAC5E;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,oDAAoD;YACjE,KAAK,EAAE;gBACL,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;aAChC;SACF;QACD,SAAS,EAAE;YACT,KAAK,EAAE;gBACL,OAAO,EAAE,IAAI;aACd;SACF;KACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,2BAA2B;QAClC,WAAW,EAAE,qFAAqF;QAClG,MAAM,EAAE;YACN,KAAK,EAAE,eAAe;YACtB,OAAO,EAAE,eAAQ;SAClB;QACD,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;KACf;EACD;AAEF,IAAM,eAAe,GAAG,UAAC,EAKO;QAJ9B,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,MAAM,YAAA,EACN,IAAI,UAAA;IAC+B,QACnCA,sBAAK,SAAS,EAAC,MAAM,gBACnBA,sBAAK,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,yBAAyB,CAAC,gBACjEA,IAAC,KAAK,IACJ,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,eAAQ,EACnB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,WACV,YACE,YACF;AAX6B,CAYpC,CAAC;IAEW,UAAU,GAAG,UAAC,EAA0D;QAAxD,KAAK,WAAA,EAAE,WAAW,iBAAA,EAAE,MAAM,YAAA,EAAE,IAAI,UAAA,EAAE,QAAQ,cAAA;IACrE,IAAM,SAAS,GAAG,cAAM,OAAA,KAAK,CAC3B,KAAK,EACL;QACE,WAAW,aAAA;QACX,QAAQ,UAAA;QACR,IAAI,MAAA;QACJ,MAAM,QAAA;KACP,CACF,GAAA,CAAC;IAEF,QACEC,4BACEA,uBAAK,SAAS,EAAC,MAAM,iBACnBD,0EAEM;oBACNA,sBAAK,SAAS,EAAC,sCAAsC,gBAClD,mDAAmD,YAChD,aACF;YACNA,IAAC,OAAO,aAAG;YAEXA,IAAC,MAAM,aAAC,OAAO,EAAE,SAAS,yDAAsC,YAC/D,EACH;AACJ,EAAE;AAEF,UAAU,CAAC,SAAS,GAAG,OAAO,CAAC;IAElB,UAAU,GAAG,UAAC,KAAiB;IAC1C,QACEA,0BACG,UAAU,CAAC,GAAG,CAAC,UAAC,SAAS,IAAK,QAC7BC,uBAAqB,SAAS,EAAC,kBAAkB,iBAC/CD,qBAAI,SAAS,EAAC,WAAW,gBAAE,SAAS,YAAM;gBAC1CA,IAAC,eAAe,eAAK,KAAK,IAAE,IAAI,EAAE,SAAS,YAAI,MAFvC,SAAS,CAGb,IACP,CAAC,WACD,EACH;AACJ,EAAE;IAEW,YAAY,GAAG,UAAC,EAA0C;QAAxC,KAAK,WAAA,EAAE,WAAW,iBAAA,EAAE,MAAM,YAAA;IACvD,QACEC,uBAAK,SAAS,EAAC,kBAAkB,iBAC/BD,IAAC,eAAe,IAAC,KAAK,EAAE,KAAK,WAAI;YACjCA,IAAC,eAAe,IAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,WAAI;YAC3DA,IAAC,eAAe,IAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,WAAI;YAC3EA,IAAC,eAAe,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,WAAI,aAC7C,EACN;AACJ;;;;;"}
|
|
@@ -125,7 +125,7 @@ import DoctorStethoscope from './components/icon/icons/DoctorStethoscope.js';
|
|
|
125
125
|
import Doctor from './components/icon/icons/Doctor.js';
|
|
126
126
|
import DollarSign from './components/icon/icons/DollarSign.js';
|
|
127
127
|
import DownloadCloud from './components/icon/icons/DownloadCloud.js';
|
|
128
|
-
import
|
|
128
|
+
import DownloadIcon from './components/icon/icons/Download.js';
|
|
129
129
|
import DragCorner from './components/icon/icons/DragCorner.js';
|
|
130
130
|
import Droplet from './components/icon/icons/Droplet.js';
|
|
131
131
|
import Edit2 from './components/icon/icons/Edit2.js';
|
|
@@ -489,7 +489,7 @@ var icons = /*#__PURE__*/Object.freeze({
|
|
|
489
489
|
DoctorIcon: Doctor,
|
|
490
490
|
DollarSignIcon: DollarSign,
|
|
491
491
|
DownloadCloudIcon: DownloadCloud,
|
|
492
|
-
DownloadIcon:
|
|
492
|
+
DownloadIcon: DownloadIcon,
|
|
493
493
|
DragCornerIcon: DragCorner,
|
|
494
494
|
DropletIcon: Droplet,
|
|
495
495
|
Edit2Icon: Edit2,
|
|
@@ -726,4 +726,4 @@ var icons = /*#__PURE__*/Object.freeze({
|
|
|
726
726
|
});
|
|
727
727
|
|
|
728
728
|
export { icons as i };
|
|
729
|
-
//# sourceMappingURL=index-
|
|
729
|
+
//# sourceMappingURL=index-39fa3631.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-39fa3631.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/esm/index.js
CHANGED
|
@@ -15,7 +15,7 @@ export { RegularModal } from './components/modal/regularModal/index.js';
|
|
|
15
15
|
export { BottomOrRegularModal } from './components/modal/bottomOrRegularModal/index.js';
|
|
16
16
|
export { CardWithLeftIcon, CardWithTopIcon, CardWithTopLeftIcon, InfoCard } from './components/cards/index.js';
|
|
17
17
|
export { CardButton } from './components/cards/cardButton/index.js';
|
|
18
|
-
export {
|
|
18
|
+
export { Button } from './components/button/index.js';
|
|
19
19
|
export { AutoSuggestMultiSelect } from './components/input/autoSuggestMultiSelect/index.js';
|
|
20
20
|
export { default as Chip } from './components/chip/index.js';
|
|
21
21
|
export { AutoSuggestInput } from './components/input/autoSuggestInput/index.js';
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import React, { ReactElement, ReactNode } from 'react';
|
|
2
|
+
declare type ButtonVariant = 'filledColor' | 'filledGray' | 'filledWhite' | 'textColor' | 'textWhite' | 'outlineWhite' | 'filledSuccess' | 'filledError';
|
|
3
|
+
declare type ButtonProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
leftIcon?: ReactElement;
|
|
7
|
+
rightIcon?: ReactElement;
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
hideLabel?: boolean;
|
|
10
|
+
} & Omit<JSX.IntrinsicElements['button'], 'children'>;
|
|
11
|
+
declare const Button: React.ForwardRefExoticComponent<Pick<{
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
variant?: ButtonVariant | undefined;
|
|
14
|
+
leftIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
15
|
+
rightIcon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
11
16
|
loading?: boolean | undefined;
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
hideLabel?: boolean | undefined;
|
|
18
|
+
} & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children">, "className" | "form" | "slot" | "style" | "title" | "children" | "onClick" | "color" | "hidden" | "type" | "value" | "onChange" | "dir" | "onBlur" | "onFocus" | "onKeyDown" | "tabIndex" | "leftIcon" | "rightIcon" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "hideLabel" | "loading" | "variant"> & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
export { Button };
|
|
20
|
+
export type { ButtonProps, ButtonVariant };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ButtonProps, ButtonVariant } from '.';
|
|
3
|
+
declare const story: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<Pick<{
|
|
6
|
+
children: import("react").ReactNode;
|
|
7
|
+
variant?: ButtonVariant | undefined;
|
|
8
|
+
leftIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
9
|
+
rightIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
10
|
+
loading?: boolean | undefined;
|
|
11
|
+
hideLabel?: boolean | undefined;
|
|
12
|
+
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "children">, "className" | "form" | "slot" | "style" | "title" | "children" | "onClick" | "color" | "hidden" | "type" | "value" | "onChange" | "dir" | "onBlur" | "onFocus" | "onKeyDown" | "tabIndex" | "leftIcon" | "rightIcon" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "hideLabel" | "loading" | "variant"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
argTypes: {
|
|
14
|
+
children: {
|
|
15
|
+
control: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
defaultValue: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
variant: {
|
|
22
|
+
defaultValue: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
leftIcon: {
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
rightIcon: {
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
loading: {
|
|
32
|
+
defaultValue: boolean;
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
hideLabel: {
|
|
36
|
+
defaultValue: boolean;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
parameters: {
|
|
41
|
+
design: {
|
|
42
|
+
url: string;
|
|
43
|
+
type: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export declare const ButtonStory: {
|
|
48
|
+
({ className, loading, children, variant, hideLabel }: ButtonProps): JSX.Element;
|
|
49
|
+
storyName: string;
|
|
50
|
+
};
|
|
51
|
+
export declare const ButtonVariants: ({ children, onClick }: ButtonProps) => JSX.Element;
|
|
52
|
+
export declare const ButtonOnBackgrounds: ({ onClick }: ButtonProps) => JSX.Element;
|
|
53
|
+
export declare const ButtonWithIcons: ({ children, onClick }: ButtonProps) => JSX.Element;
|
|
54
|
+
export declare const ButtonWithIconOnly: ({ children, onClick }: ButtonProps) => JSX.Element;
|
|
55
|
+
export declare const ButtonLoading: ({ children, onClick }: ButtonProps) => JSX.Element;
|
|
56
|
+
export declare const ButtonDisabled: ({ children, onClick }: ButtonProps) => JSX.Element;
|
|
57
|
+
export default story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/lib/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { Checkbox } from './components/input/checkbox';
|
|
|
12
12
|
import { Radio } from './components/input/radio';
|
|
13
13
|
import { BottomModal, RegularModal, BottomOrRegularModal } from './components/modal';
|
|
14
14
|
import { CardWithTopLeftIcon, CardWithLeftIcon, CardWithTopIcon, InfoCard, CardButton } from './components/cards';
|
|
15
|
-
import Button from './components/button';
|
|
15
|
+
import { Button } from './components/button';
|
|
16
16
|
import { AutoSuggestMultiSelect } from './components/input/autoSuggestMultiSelect';
|
|
17
17
|
import Chip from './components/chip';
|
|
18
18
|
import { AutoSuggestInput } from './components/input/autoSuggestInput';
|
package/dist/index.css
CHANGED
|
@@ -2249,12 +2249,13 @@ body {
|
|
|
2249
2249
|
transform: rotate(360deg);
|
|
2250
2250
|
}
|
|
2251
2251
|
}
|
|
2252
|
-
.p-btn, .p-btn--outline-grey, .p-btn--outline, .p-btn--danger, .p-btn--secondary, .p-btn--secondary-grey, .p-btn--primary {
|
|
2253
|
-
display: inline-
|
|
2252
|
+
.p-btn, .p-btn--outline-grey, .p-btn--outline-white, .p-btn--outline, .p-btn--success, .p-btn--danger, .p-btn--secondary, .p-btn--secondary-inverted, .p-btn--secondary-white, .p-btn--secondary-grey, .p-btn--primary {
|
|
2253
|
+
display: inline-flex;
|
|
2254
|
+
align-items: center;
|
|
2254
2255
|
position: relative;
|
|
2255
2256
|
cursor: pointer;
|
|
2256
2257
|
height: 48px;
|
|
2257
|
-
padding:
|
|
2258
|
+
padding: 0 24px;
|
|
2258
2259
|
line-height: 24px;
|
|
2259
2260
|
font-size: 16px;
|
|
2260
2261
|
font-family: inherit;
|
|
@@ -2266,9 +2267,14 @@ body {
|
|
|
2266
2267
|
border: none;
|
|
2267
2268
|
transition: 0.3s opacity, 0.3s background-color;
|
|
2268
2269
|
}
|
|
2269
|
-
.p-btn[disabled], [disabled].p-btn--outline-grey, [disabled].p-btn--outline, [disabled].p-btn--danger, [disabled].p-btn--secondary, [disabled].p-btn--secondary-grey, [disabled].p-btn--primary {
|
|
2270
|
+
.p-btn[disabled], [disabled].p-btn--outline-grey, [disabled].p-btn--outline-white, [disabled].p-btn--outline, [disabled].p-btn--success, [disabled].p-btn--danger, [disabled].p-btn--secondary, [disabled].p-btn--secondary-inverted, [disabled].p-btn--secondary-white, [disabled].p-btn--secondary-grey, [disabled].p-btn--primary {
|
|
2270
2271
|
cursor: default;
|
|
2271
2272
|
opacity: 0.5;
|
|
2273
|
+
cursor: not-allowed;
|
|
2274
|
+
}
|
|
2275
|
+
.p-btn--icon-only {
|
|
2276
|
+
width: 48px;
|
|
2277
|
+
padding: 0;
|
|
2272
2278
|
}
|
|
2273
2279
|
.p-btn--primary {
|
|
2274
2280
|
background-color: #8e8cee;
|
|
@@ -2290,31 +2296,40 @@ body {
|
|
|
2290
2296
|
outline: none;
|
|
2291
2297
|
box-shadow: 0 0 0 1px white, 0 0 0 3px rgba(142, 140, 238, 0.5);
|
|
2292
2298
|
}
|
|
2293
|
-
.p-btn--secondary, .p-btn--secondary-grey {
|
|
2299
|
+
.p-btn--secondary, .p-btn--secondary-inverted, .p-btn--secondary-white, .p-btn--secondary-grey {
|
|
2294
2300
|
background-color: transparent;
|
|
2295
2301
|
color: #8e8cee;
|
|
2296
2302
|
}
|
|
2297
|
-
.p-btn--secondary:hover, .p-btn--secondary-grey:hover {
|
|
2303
|
+
.p-btn--secondary:hover, .p-btn--secondary-inverted:hover, .p-btn--secondary-white:hover, .p-btn--secondary-grey:hover {
|
|
2298
2304
|
background-color: #ebebff;
|
|
2299
2305
|
}
|
|
2300
2306
|
@media (max-width: 34rem) {
|
|
2301
|
-
.p-btn--secondary:hover, .p-btn--secondary-grey:hover {
|
|
2307
|
+
.p-btn--secondary:hover, .p-btn--secondary-inverted:hover, .p-btn--secondary-white:hover, .p-btn--secondary-grey:hover {
|
|
2302
2308
|
background-color: transparent;
|
|
2303
2309
|
}
|
|
2304
2310
|
}
|
|
2305
|
-
.p-btn--secondary[disabled], [disabled].p-btn--secondary-grey {
|
|
2311
|
+
.p-btn--secondary[disabled], [disabled].p-btn--secondary-inverted, [disabled].p-btn--secondary-white, [disabled].p-btn--secondary-grey {
|
|
2306
2312
|
color: #6160a2;
|
|
2307
2313
|
}
|
|
2308
|
-
.p-btn--secondary[disabled]:hover, [disabled].p-btn--secondary-grey:hover {
|
|
2314
|
+
.p-btn--secondary[disabled]:hover, [disabled].p-btn--secondary-inverted:hover, [disabled].p-btn--secondary-white:hover, [disabled].p-btn--secondary-grey:hover {
|
|
2309
2315
|
background-color: transparent;
|
|
2310
2316
|
}
|
|
2311
|
-
.p-btn--secondary:focus, .p-btn--secondary-grey:focus {
|
|
2317
|
+
.p-btn--secondary:focus, .p-btn--secondary-inverted:focus, .p-btn--secondary-white:focus, .p-btn--secondary-grey:focus {
|
|
2312
2318
|
outline: none;
|
|
2313
2319
|
box-shadow: 0 0 0 1px white, 0 0 0 3px rgba(142, 140, 238, 0.5);
|
|
2314
2320
|
}
|
|
2315
2321
|
.p-btn--secondary-grey {
|
|
2316
2322
|
background-color: #f7f7ff;
|
|
2317
2323
|
}
|
|
2324
|
+
.p-btn--secondary-white {
|
|
2325
|
+
background-color: #fff;
|
|
2326
|
+
}
|
|
2327
|
+
.p-btn--secondary-inverted {
|
|
2328
|
+
color: #fff;
|
|
2329
|
+
}
|
|
2330
|
+
.p-btn--secondary-inverted:hover, .p-btn--secondary-inverted:focus {
|
|
2331
|
+
background-color: #6160a2;
|
|
2332
|
+
}
|
|
2318
2333
|
.p-btn--danger {
|
|
2319
2334
|
background-color: #e55454;
|
|
2320
2335
|
color: white;
|
|
@@ -2335,27 +2350,30 @@ body {
|
|
|
2335
2350
|
outline: none;
|
|
2336
2351
|
box-shadow: 0 0 0 1px white, 0 0 0 3px rgba(142, 140, 238, 0.5);
|
|
2337
2352
|
}
|
|
2338
|
-
.p-btn--
|
|
2339
|
-
color:
|
|
2340
|
-
|
|
2341
|
-
opacity: 1 !important;
|
|
2353
|
+
.p-btn--success {
|
|
2354
|
+
background-color: #84de8a;
|
|
2355
|
+
color: white;
|
|
2342
2356
|
}
|
|
2343
|
-
.p-btn--
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2357
|
+
.p-btn--success:hover {
|
|
2358
|
+
background-color: #5b985f;
|
|
2359
|
+
}
|
|
2360
|
+
@media (max-width: 34rem) {
|
|
2361
|
+
.p-btn--success:hover {
|
|
2362
|
+
background-color: #84de8a;
|
|
2363
|
+
}
|
|
2364
|
+
}
|
|
2365
|
+
.p-btn--success[disabled] {
|
|
2366
|
+
background-color: #c4f5c8;
|
|
2367
|
+
opacity: 1;
|
|
2368
|
+
}
|
|
2369
|
+
.p-btn--success:focus {
|
|
2370
|
+
outline: none;
|
|
2371
|
+
box-shadow: 0 0 0 1px white, 0 0 0 3px rgba(142, 140, 238, 0.5);
|
|
2354
2372
|
}
|
|
2355
2373
|
.p-btn--outline {
|
|
2356
2374
|
color: #8e8cee;
|
|
2357
2375
|
background-color: transparent;
|
|
2358
|
-
border: 1px
|
|
2376
|
+
border: 1px solid #b1b0f5;
|
|
2359
2377
|
}
|
|
2360
2378
|
.p-btn--outline:hover {
|
|
2361
2379
|
color: #6160a2;
|
|
@@ -2368,12 +2386,30 @@ body {
|
|
|
2368
2386
|
}
|
|
2369
2387
|
.p-btn--outline:focus {
|
|
2370
2388
|
color: #6160a2;
|
|
2389
|
+
outline: none;
|
|
2390
|
+
box-shadow: 0 0 0 1px white, 0 0 0 3px rgba(142, 140, 238, 0.5);
|
|
2391
|
+
}
|
|
2392
|
+
.p-btn--outline-white {
|
|
2393
|
+
color: #fff;
|
|
2394
|
+
border: 1px solid #fff;
|
|
2395
|
+
background-color: transparent;
|
|
2396
|
+
}
|
|
2397
|
+
.p-btn--outline-white:hover {
|
|
2398
|
+
background-color: #6160a2;
|
|
2371
2399
|
border-color: #6160a2;
|
|
2372
2400
|
}
|
|
2401
|
+
.p-btn--outline-white[disabled] {
|
|
2402
|
+
background-color: transparent;
|
|
2403
|
+
opacity: 0.5;
|
|
2404
|
+
}
|
|
2405
|
+
.p-btn--outline-white:focus {
|
|
2406
|
+
outline: none;
|
|
2407
|
+
box-shadow: 0 0 0 1px white, 0 0 0 3px rgba(142, 140, 238, 0.5);
|
|
2408
|
+
}
|
|
2373
2409
|
.p-btn--outline-grey {
|
|
2374
2410
|
color: #91919c;
|
|
2375
2411
|
background-color: transparent;
|
|
2376
|
-
border: 1px
|
|
2412
|
+
border: 1px solid #d2d2d8;
|
|
2377
2413
|
}
|
|
2378
2414
|
.p-btn--outline-grey:hover {
|
|
2379
2415
|
color: #696970;
|
|
@@ -2388,6 +2424,27 @@ body {
|
|
|
2388
2424
|
color: #696970;
|
|
2389
2425
|
border-color: #696970;
|
|
2390
2426
|
}
|
|
2427
|
+
.p-btn--loading {
|
|
2428
|
+
color: transparent;
|
|
2429
|
+
cursor: default;
|
|
2430
|
+
opacity: 1 !important;
|
|
2431
|
+
}
|
|
2432
|
+
.p-btn--loading::before {
|
|
2433
|
+
content: "";
|
|
2434
|
+
position: absolute;
|
|
2435
|
+
width: 26px;
|
|
2436
|
+
height: 26px;
|
|
2437
|
+
left: calc(50% - 13px);
|
|
2438
|
+
top: calc(50% - 13px);
|
|
2439
|
+
border-radius: 50%;
|
|
2440
|
+
border: 2px solid rgba(255, 255, 255, 0.5);
|
|
2441
|
+
border-left-color: white;
|
|
2442
|
+
animation: spinner-rotate 0.9s infinite;
|
|
2443
|
+
}
|
|
2444
|
+
.p-btn--loading.p-btn--secondary-grey::before, .p-btn--loading.p-btn--secondary-white::before {
|
|
2445
|
+
border-color: rgba(142, 140, 238, 0.5);
|
|
2446
|
+
border-left-color: #8e8cee;
|
|
2447
|
+
}
|
|
2391
2448
|
|
|
2392
2449
|
.sr-only {
|
|
2393
2450
|
border-width: 0;
|