ouisys-component-library 0.0.2 → 0.0.4
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 +1 -3
- package/build/index.css +1 -1
- package/build/index.css.map +1 -1
- package/build/index.d.ts +124 -2
- package/build/index.js +1 -7
- package/build/index.js.map +1 -1
- package/build/index.mjs +2 -0
- package/build/index.mjs.map +1 -0
- package/build/src/Disclaimers/Disclaimers.d.ts +3 -0
- package/build/{Disclaimers → src/Disclaimers}/Disclaimers.stories.d.ts +0 -0
- package/build/{Disclaimers → src/Disclaimers}/Disclaimers.test.d.ts +0 -0
- package/build/{Disclaimers → src/Disclaimers}/Disclaimers.types.d.ts +8 -2
- package/build/src/ExtraDisclaimers/ExtraDisclaimers.d.ts +3 -0
- package/build/src/ExtraDisclaimers/ExtraDisclaimers.stories.d.ts +41 -0
- package/build/src/ExtraDisclaimers/ExtraDisclaimers.test.d.ts +1 -0
- package/build/src/ExtraDisclaimers/ExtraDisclaimers.types.d.ts +8 -0
- package/build/src/Input/Input.d.ts +3 -0
- package/build/src/Input/Input.stories.d.ts +5 -0
- package/build/src/Input/Input.types.d.ts +38 -0
- package/build/src/Intl/Intl.d.ts +18 -0
- package/build/src/MOLink/MOLink.d.ts +4 -0
- package/build/src/MOLink/MOLink.stories.d.ts +32 -0
- package/build/src/MOLink/MOLink.test.d.ts +1 -0
- package/build/src/MOLink/MOLink.types.d.ts +10 -0
- package/build/src/PricePoint/PricePoint.d.ts +3 -0
- package/build/src/PricePoint/PricePoint.stories.d.ts +41 -0
- package/build/src/PricePoint/PricePoint.test.d.ts +1 -0
- package/build/src/PricePoint/PricePoint.types.d.ts +9 -0
- package/build/src/TopLegals/TopLegals.d.ts +3 -0
- package/build/src/TopLegals/TopLegals.stories.d.ts +41 -0
- package/build/src/TopLegals/TopLegals.test.d.ts +1 -0
- package/build/src/TopLegals/TopLegals.types.d.ts +8 -0
- package/build/src/index.d.ts +11 -0
- package/build/{utils → src/utils}/test/index.d.ts +1 -1
- package/package.json +30 -8
- package/build/Disclaimers/Disclaimers.d.ts +0 -3
- package/build/index.es.css +0 -2
- package/build/index.es.css.map +0 -1
- package/build/index.es.js +0 -8
- package/build/index.es.js.map +0 -1
package/README.md
CHANGED
|
@@ -6,11 +6,10 @@ The code contained in this repository is a Component Library.
|
|
|
6
6
|
|
|
7
7
|
- **You don't have to clone this repo** in order to use the library, and this Component Library.
|
|
8
8
|
|
|
9
|
-
|
|
10
9
|
## Install CLI
|
|
11
10
|
|
|
12
11
|
```bash
|
|
13
|
-
yarn
|
|
12
|
+
yarn
|
|
14
13
|
```
|
|
15
14
|
|
|
16
15
|
### Storybook local env.
|
|
@@ -39,7 +38,6 @@ Alternatively you can add the `--watch` flag for continued refresh and testing,
|
|
|
39
38
|
|
|
40
39
|
## Usage
|
|
41
40
|
|
|
42
|
-
|
|
43
41
|
```bash
|
|
44
42
|
yarn add ouisys-component-library@latest
|
|
45
43
|
```
|
package/build/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.Disclaimers-module_wrapper__yyrGN{background-color:red}
|
|
1
|
+
.Disclaimers-module_wrapper__yyrGN{background-color:red}.Input-module_wrapper__bzo7K input,.Input-module_wrapper__bzo7K select{border:1px solid #ccc;border-radius:4px;box-sizing:border-box;display:inline-block;margin:8px 0;padding:12px 20px;width:100%}.Input-module_wrapper__bzo7K input[type=submit]{background-color:#4caf50;border:none;border-radius:4px;color:#fff;cursor:pointer;margin:8px 0;padding:14px 20px;width:100%}.Input-module_wrapper__bzo7K input[type=submit]:hover{background-color:#45a049}.Input-module_wrapper__bzo7K .Input-module_error__rkwNz{color:red}
|
|
2
2
|
/*# sourceMappingURL=index.css.map */
|
package/build/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Disclaimers.module.scss"],"names":[],"mappings":"AAAA,mCACE,oBAAuB","file":"index.css","sourcesContent":[".wrapper {\n background-color: red; }\n"]}
|
|
1
|
+
{"version":3,"sources":["Disclaimers.module.scss","Input.module.scss"],"names":[],"mappings":"AAAA,mCACE,oBAAuB,CCDzB,uEAME,qBAAsB,CACtB,iBAAkB,CAClB,qBAAsB,CAHtB,oBAAqB,CADrB,YAAa,CADb,iBAAkB,CADlB,UAMwB,CAE1B,gDAEE,wBAAyB,CAIzB,WAAY,CACZ,iBAAkB,CAJlB,UAAY,CAKZ,cAAe,CAHf,YAAa,CADb,iBAAkB,CAHlB,UAOiB,CAEnB,sDACE,wBAA2B,CAE7B,wDACE,SAAY","file":"index.css","sourcesContent":[".wrapper {\n background-color: red; }\n",".wrapper input,\n.wrapper select {\n width: 100%;\n padding: 12px 20px;\n margin: 8px 0;\n display: inline-block;\n border: 1px solid #ccc;\n border-radius: 4px;\n box-sizing: border-box; }\n\n.wrapper input[type='submit'] {\n width: 100%;\n background-color: #4caf50;\n color: white;\n padding: 14px 20px;\n margin: 8px 0;\n border: none;\n border-radius: 4px;\n cursor: pointer; }\n\n.wrapper input[type='submit']:hover {\n background-color: #45a049; }\n\n.wrapper .error {\n color: red; }\n"]}
|
package/build/index.d.ts
CHANGED
|
@@ -1,2 +1,124 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
|
|
3
|
+
declare enum ILegalFlows {
|
|
4
|
+
PIN = "pin",
|
|
5
|
+
MO = "mo",
|
|
6
|
+
ONE_CLICK = "oneClick",
|
|
7
|
+
CLICK_2SMS = "click2sms",
|
|
8
|
+
MO_REDIR = "moRedir",
|
|
9
|
+
USSD = "ussd",
|
|
10
|
+
TPAY_HE = "tpayHe"
|
|
11
|
+
}
|
|
12
|
+
interface ILegals {
|
|
13
|
+
id: number;
|
|
14
|
+
country: string;
|
|
15
|
+
service: string;
|
|
16
|
+
scenario: string;
|
|
17
|
+
language: string;
|
|
18
|
+
top_legal: string;
|
|
19
|
+
price_point: string;
|
|
20
|
+
disclaimer: string;
|
|
21
|
+
date_created: string;
|
|
22
|
+
extra_disclaimer: string;
|
|
23
|
+
mcc_disclaimer: {
|
|
24
|
+
[key: string]: string;
|
|
25
|
+
} | null;
|
|
26
|
+
operator_price_point: {
|
|
27
|
+
[key: string]: string;
|
|
28
|
+
} | null;
|
|
29
|
+
flow?: ILegalFlows;
|
|
30
|
+
}
|
|
31
|
+
interface DisclaimersProps {
|
|
32
|
+
locale: string;
|
|
33
|
+
legals: Array<ILegals>;
|
|
34
|
+
className?: string;
|
|
35
|
+
flow?: ILegalFlows;
|
|
36
|
+
mcc?: string;
|
|
37
|
+
dataQaId?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
declare function Disclaimers({ locale, className, legals, flow, dataQaId, mcc }: DisclaimersProps): JSX.Element;
|
|
41
|
+
|
|
42
|
+
interface ExtraDisclaimersProps {
|
|
43
|
+
locale: string;
|
|
44
|
+
legals: Array<ILegals>;
|
|
45
|
+
className?: string;
|
|
46
|
+
flow?: ILegalFlows;
|
|
47
|
+
dataQaId?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare function ExtraDisclaimers({ locale, className, legals, flow, dataQaId }: ExtraDisclaimersProps): JSX.Element;
|
|
51
|
+
|
|
52
|
+
interface InputProps extends React.HTMLAttributes<HTMLInputElement> {
|
|
53
|
+
value: string;
|
|
54
|
+
label?: string;
|
|
55
|
+
onChange: React.FocusEventHandler<HTMLInputElement> | undefined;
|
|
56
|
+
type: InputType;
|
|
57
|
+
placeholder?: string;
|
|
58
|
+
error?: string;
|
|
59
|
+
dataQaId?: string;
|
|
60
|
+
disabled?: boolean;
|
|
61
|
+
readOnly?: boolean;
|
|
62
|
+
required?: boolean;
|
|
63
|
+
maxLength?: number;
|
|
64
|
+
minLength?: number;
|
|
65
|
+
wrapperClassName?: string;
|
|
66
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement> | undefined;
|
|
67
|
+
}
|
|
68
|
+
declare enum InputType {
|
|
69
|
+
Text = "text",
|
|
70
|
+
Number = "number",
|
|
71
|
+
Email = "email",
|
|
72
|
+
Password = "password",
|
|
73
|
+
Search = "search",
|
|
74
|
+
Telephone = "tel",
|
|
75
|
+
URL = "url"
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare function Input({ wrapperClassName, dataQaId, id, value, placeholder, disabled, readOnly, error, type, onChange, ...props }: InputProps): JSX.Element;
|
|
79
|
+
|
|
80
|
+
interface IHash {
|
|
81
|
+
[key: string]: string;
|
|
82
|
+
}
|
|
83
|
+
declare function IntlProvider({ locale, messages, children }: {
|
|
84
|
+
locale: string;
|
|
85
|
+
messages: IHash;
|
|
86
|
+
children: React$1.ReactChild | JSX.Element[] | JSX.Element;
|
|
87
|
+
}): JSX.Element;
|
|
88
|
+
declare function injectIntl(Child: React$1.ComponentType<any>): (props: any) => JSX.Element;
|
|
89
|
+
declare function defineMessages(messageDescriptors: any): any;
|
|
90
|
+
|
|
91
|
+
declare type IKeywordShortcode = {
|
|
92
|
+
keyword: string;
|
|
93
|
+
shortcode: string;
|
|
94
|
+
};
|
|
95
|
+
declare type MOLinkProps = {
|
|
96
|
+
keywordAndShortcode: IKeywordShortcode;
|
|
97
|
+
children: React.ReactNode;
|
|
98
|
+
dataQaId?: string;
|
|
99
|
+
} & React.HTMLAttributes<HTMLAnchorElement>;
|
|
100
|
+
|
|
101
|
+
declare const MOLink: React$1.ComponentType<MOLinkProps>;
|
|
102
|
+
|
|
103
|
+
interface PricePointProps {
|
|
104
|
+
locale: string;
|
|
105
|
+
legals: Array<ILegals>;
|
|
106
|
+
operator?: string;
|
|
107
|
+
className?: string;
|
|
108
|
+
flow?: ILegalFlows;
|
|
109
|
+
dataQaId?: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
declare function PricePoint({ locale, className, legals, flow, dataQaId, operator }: PricePointProps): JSX.Element;
|
|
113
|
+
|
|
114
|
+
interface TopLegalsProps {
|
|
115
|
+
locale: string;
|
|
116
|
+
legals: Array<ILegals>;
|
|
117
|
+
className?: string;
|
|
118
|
+
flow?: ILegalFlows;
|
|
119
|
+
dataQaId?: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
declare function TopLegals({ locale, className, legals, flow, dataQaId }: TopLegalsProps): JSX.Element;
|
|
123
|
+
|
|
124
|
+
export { Disclaimers, ExtraDisclaimers, IKeywordShortcode, Input, InputType, IntlProvider, MOLink, PricePoint, TopLegals, defineMessages, injectIntl };
|
package/build/index.js
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
"use strict";function e(e){if(e&&e.__esModule)return e;var
|
|
2
|
-
/*!
|
|
3
|
-
Copyright (c) 2018 Jed Watson.
|
|
4
|
-
Licensed under the MIT License (MIT), see
|
|
5
|
-
http://jedwatson.github.io/classnames
|
|
6
|
-
*/
|
|
7
|
-
r=n,function(){var e={}.hasOwnProperty;function t(){for(var r=[],a=0;a<arguments.length;a++){var n=arguments[a];if(n){var i=typeof n;if("string"===i||"number"===i)r.push(n);else if(Array.isArray(n)){if(n.length){var o=t.apply(null,n);o&&r.push(o)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var l in n)e.call(n,l)&&n[l]&&r.push(l);else r.push(n.toString())}}return r.join(" ")}r.exports?(t.default=t,r.exports=t):window.classNames=t}();var i=n.exports;exports.Disclaimers=function(e){var r=e.locale,n=e.className,o=void 0===n?"":n,l=e.legals,s=e.flow,u=e.dataQaId,c=void 0===u?"disclaimers":u,f=l.filter((function(e){return e.flow===s})),p=((s?f:l).reduce((function(e,r){return e[r.language]=r,e}),{})[r]||"").disclaimer;return t.createElement("div",{"data-qa-id":c,className:i(o,a)},t.createElement("div",{dangerouslySetInnerHTML:{__html:p}}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("classnames"),t=require("react"),a=require("tslib");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var o=r(e),i=r(t),c=n(t),s="Disclaimers-module_wrapper__yyrGN";var l,d,u,m,f="Input-module_wrapper__bzo7K",p="Input-module_error__rkwNz";exports.InputType=void 0,(l=exports.InputType||(exports.InputType={})).Text="text",l.Number="number",l.Email="email",l.Password="password",l.Search="search",l.Telephone="tel",l.URL="url",function(e){e.Medium="Medium",e.Large="Large"}(d||(d={})),function(e){e.Left="Left",e.Right="Right"}(u||(u={})),function(e){e.Telephone="telephone",e.CreditCard="credit_card"}(m||(m={}));var v=c.createContext({locale:"en",messages:{},intl:{formatMessage:function(e,t){return e.id,e.defaultMessage,""}}});function g(e){return e}exports.defineMessages=g;var _=function(e,t){return"undefined"!=typeof navigator&&(/iPhone/i.test(navigator.userAgent)||/Mac OS/i.test(navigator.userAgent))?t?"sms:/open?addresses=".concat(e.shortcode,"&body=").concat(e.keyword):"sms:".concat(e.shortcode,"&body=").concat(e.keyword):["com.facebook.orca","com.facebook.katana","com.instagram.android"].some((function(e){return new RegExp(e,"ig").test(window.pac_analytics.visitor["x-requested-with"])}))?"/mo-redirect-util/".concat(e.shortcode,"/").concat(e.keyword):window.pac_analytics.visitor["x-requested-with"]&&null!==window.pac_analytics.visitor["x-requested-with"]&&-1!==window.pac_analytics.visitor["x-requested-with"].indexOf("com.facebook")?"sms://".concat(e.shortcode,"?body=").concat(e.keyword):"sms:".concat(e.shortcode,"?body=").concat(e.keyword)};exports.Disclaimers=function(e){var t=e.locale,a=e.className,r=void 0===a?"":a,n=e.legals,c=e.flow,l=e.dataQaId,d=void 0===l?"disclaimers":l,u=e.mcc,m=void 0===u?"":u,f=n.filter((function(e){return e.flow===c})),p=(c?f:n).reduce((function(e,t){return e[t.language]=t,e}),{}),v=(p[t]||"").disclaimer,g=(p[t]||"").mcc_disclaimer;return i.default.createElement("div",{"data-qa-id":d,className:o.default(s,r)},g&&m&&i.default.createElement("div",{dangerouslySetInnerHTML:{__html:g[m.toLowerCase()]}})||i.default.createElement("div",{dangerouslySetInnerHTML:{__html:v}})," ")},exports.ExtraDisclaimers=function(e){var t=e.locale,a=e.className,r=e.legals,n=e.flow,o=e.dataQaId,i=void 0===o?"extra-disclaimers-":o,s=r.filter((function(e){return e.flow===n})),l=((n&&!process.env.scenario?s:r).reduce((function(e,t){return e[t.language]=t,e}),{})[t]||"").extra_disclaimer;return c.createElement("div",{"data-qa-id":i,className:a},c.createElement("div",{dangerouslySetInnerHTML:{__html:l}}))},exports.Input=function(e){var t=e.wrapperClassName,r=void 0===t?"":t,n=e.dataQaId,i=void 0===n?"input-":n,s=e.id,l=e.value,d=e.placeholder,u=e.disabled,m=e.readOnly,v=e.error,g=e.type,_=e.onChange,y=a.__rest(e,["wrapperClassName","dataQaId","id","value","placeholder","disabled","readOnly","error","type","onChange"]);return c.createElement("div",{className:o.default(f,r)},c.createElement("input",a.__assign({"data-testid":i,name:s,id:s,value:l,placeholder:d,disabled:u,readOnly:m,onChange:_,type:g},y)),v&&c.createElement("div",{className:p},v))},exports.IntlProvider=function(e){var t=e.locale,a=e.messages,r=e.children;return c.createElement(v.Provider,{value:{locale:t,messages:a,intl:{formatMessage:function(e,t){var r=e.id,n=e.defaultMessage,o=a&&a[r]?a[r]:n||"";if(t){var i=Object.keys(t);Array.isArray(i)&&i.map((function(e){var a=o.replace("{".concat(e,"}"),t[e]);o=a}))}return o}}}},r)},exports.MOLink=function(e){var t=e.keywordAndShortcode,r=e.className,n=e.dataQaId,o=void 0===n?"mo-link":n,i=e.children,s=a.__rest(e,["keywordAndShortcode","className","dataQaId","children"]);return c.createElement("a",a.__assign({href:_(t),className:r,"data-qa-id":o},s),i)},exports.PricePoint=function(e){var t=e.locale,a=e.className,r=void 0===a?"":a,n=e.legals,o=e.flow,i=e.dataQaId,s=void 0===i?"price-point":i,l=e.operator,d=n.filter((function(e){return e.flow===o})),u=(o?d:n).reduce((function(e,t){return e[t.language]=t,e}),{}),m=(u[t]||"").price_point,f=(u[t]||"").operator_price_point;return c.createElement("div",{"data-qa-id":s,className:r||""},f&&l&&c.createElement("div",{dangerouslySetInnerHTML:{__html:f[l.toUpperCase()]}})||c.createElement("div",{dangerouslySetInnerHTML:{__html:m}}))},exports.TopLegals=function(e){var t=e.locale,a=e.className,r=void 0===a?"":a,n=e.legals,o=e.flow,i=e.dataQaId,s=void 0===i?"top-legals-":i,l=n.filter((function(e){return e.flow===o})),d=((o?l:n).reduce((function(e,t){return e[t.language]=t,e}),{})[t]||"").top_legal;return c.createElement("div",{"data-qa-id":s,className:r},c.createElement("div",{dangerouslySetInnerHTML:{__html:d}}))},exports.defineMessages=g,exports.injectIntl=function(e){return function(t){return c.createElement(v.Consumer,null,(function(r){var n=r.intl;return c.createElement(e,a.__assign({},t,{intl:n}))}))}};
|
|
8
2
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/build/index.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"classnames";import*as a from"react";import t from"react";import{__rest as r,__assign as n}from"tslib";var o="Disclaimers-module_wrapper__yyrGN";function i(a){var r=a.locale,n=a.className,i=void 0===n?"":n,c=a.legals,l=a.flow,d=a.dataQaId,s=void 0===d?"disclaimers":d,u=a.mcc,m=void 0===u?"":u,f=c.filter((function(e){return e.flow===l})),v=(l?f:c).reduce((function(e,a){return e[a.language]=a,e}),{}),p=(v[r]||"").disclaimer,g=(v[r]||"").mcc_disclaimer;return t.createElement("div",{"data-qa-id":s,className:e(o,i)},g&&m&&t.createElement("div",{dangerouslySetInnerHTML:{__html:g[m.toLowerCase()]}})||t.createElement("div",{dangerouslySetInnerHTML:{__html:p}})," ")}function c(e){var t=e.locale,r=e.className,n=e.legals,o=e.flow,i=e.dataQaId,c=void 0===i?"extra-disclaimers-":i,l=n.filter((function(e){return e.flow===o})),d=o&&!process.env.scenario?l:n,s=(d.reduce((function(e,a){return e[a.language]=a,e}),{})[t]||"").extra_disclaimer;return a.createElement("div",{"data-qa-id":c,className:r},a.createElement("div",{dangerouslySetInnerHTML:{__html:s}}))}var l,d,s,u,m="Input-module_wrapper__bzo7K",f="Input-module_error__rkwNz";function v(t){var o=t.wrapperClassName,i=void 0===o?"":o,c=t.dataQaId,l=void 0===c?"input-":c,d=t.id,s=t.value,u=t.placeholder,v=t.disabled,p=t.readOnly,g=t.error,w=t.type,h=t.onChange,y=r(t,["wrapperClassName","dataQaId","id","value","placeholder","disabled","readOnly","error","type","onChange"]);return a.createElement("div",{className:e(m,i)},a.createElement("input",n({"data-testid":l,name:d,id:d,value:s,placeholder:u,disabled:v,readOnly:p,onChange:h,type:w},y)),g&&a.createElement("div",{className:f},g))}!function(e){e.Text="text",e.Number="number",e.Email="email",e.Password="password",e.Search="search",e.Telephone="tel",e.URL="url"}(l||(l={})),function(e){e.Medium="Medium",e.Large="Large"}(d||(d={})),function(e){e.Left="Left",e.Right="Right"}(s||(s={})),function(e){e.Telephone="telephone",e.CreditCard="credit_card"}(u||(u={}));var p=a.createContext({locale:"en",messages:{},intl:{formatMessage:function(e,a){return e.id,e.defaultMessage,""}}});function g(e){var t=e.locale,r=e.messages,n=e.children;return a.createElement(p.Provider,{value:{locale:t,messages:r,intl:{formatMessage:function(e,a){var t=e.id,n=e.defaultMessage,o=r&&r[t]?r[t]:n||"";if(a){var i=Object.keys(a);Array.isArray(i)&&i.map((function(e){var t=o.replace("{".concat(e,"}"),a[e]);o=t}))}return o}}}},n)}function w(e){return function(t){return a.createElement(p.Consumer,null,(function(r){var o=r.intl;return a.createElement(e,n({},t,{intl:o}))}))}}function h(e){return e}exports.defineMessages=h;var y=function(e,a){return"undefined"!=typeof navigator&&(/iPhone/i.test(navigator.userAgent)||/Mac OS/i.test(navigator.userAgent))?a?"sms:/open?addresses=".concat(e.shortcode,"&body=").concat(e.keyword):"sms:".concat(e.shortcode,"&body=").concat(e.keyword):["com.facebook.orca","com.facebook.katana","com.instagram.android"].some((function(e){return new RegExp(e,"ig").test(window.pac_analytics.visitor["x-requested-with"])}))?"/mo-redirect-util/".concat(e.shortcode,"/").concat(e.keyword):window.pac_analytics.visitor["x-requested-with"]&&null!==window.pac_analytics.visitor["x-requested-with"]&&-1!==window.pac_analytics.visitor["x-requested-with"].indexOf("com.facebook")?"sms://".concat(e.shortcode,"?body=").concat(e.keyword):"sms:".concat(e.shortcode,"?body=").concat(e.keyword)},_=function(e){var t=e.keywordAndShortcode,o=e.className,i=e.dataQaId,c=void 0===i?"mo-link":i,l=e.children,d=r(e,["keywordAndShortcode","className","dataQaId","children"]);return a.createElement("a",n({href:y(t),className:o,"data-qa-id":c},d),l)};function E(e){var t=e.locale,r=e.className,n=void 0===r?"":r,o=e.legals,i=e.flow,c=e.dataQaId,l=void 0===c?"price-point":c,d=e.operator,s=o.filter((function(e){return e.flow===i})),u=(i?s:o).reduce((function(e,a){return e[a.language]=a,e}),{}),m=(u[t]||"").price_point,f=(u[t]||"").operator_price_point;return a.createElement("div",{"data-qa-id":l,className:n||""},f&&d&&a.createElement("div",{dangerouslySetInnerHTML:{__html:f[d.toUpperCase()]}})||a.createElement("div",{dangerouslySetInnerHTML:{__html:m}}))}function N(e){var t=e.locale,r=e.className,n=void 0===r?"":r,o=e.legals,i=e.flow,c=e.dataQaId,l=void 0===c?"top-legals-":c,d=o.filter((function(e){return e.flow===i})),s=((i?d:o).reduce((function(e,a){return e[a.language]=a,e}),{})[t]||"").top_legal;return a.createElement("div",{"data-qa-id":l,className:n},a.createElement("div",{dangerouslySetInnerHTML:{__html:s}}))}export{i as Disclaimers,c as ExtraDisclaimers,v as Input,l as InputType,g as IntlProvider,_ as MOLink,E as PricePoint,N as TopLegals,h as defineMessages,w as injectIntl};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
File without changes
|
|
File without changes
|
|
@@ -18,13 +18,19 @@ export interface ILegals {
|
|
|
18
18
|
disclaimer: string;
|
|
19
19
|
date_created: string;
|
|
20
20
|
extra_disclaimer: string;
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
mcc_disclaimer: {
|
|
22
|
+
[key: string]: string;
|
|
23
|
+
} | null;
|
|
24
|
+
operator_price_point: {
|
|
25
|
+
[key: string]: string;
|
|
26
|
+
} | null;
|
|
27
|
+
flow?: ILegalFlows;
|
|
23
28
|
}
|
|
24
29
|
export interface DisclaimersProps {
|
|
25
30
|
locale: string;
|
|
26
31
|
legals: Array<ILegals>;
|
|
27
32
|
className?: string;
|
|
28
33
|
flow?: ILegalFlows;
|
|
34
|
+
mcc?: string;
|
|
29
35
|
dataQaId?: string;
|
|
30
36
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Story } from '@storybook/react';
|
|
2
|
+
import { ExtraDisclaimersProps } from './ExtraDisclaimers.types';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: string;
|
|
6
|
+
parameters: {
|
|
7
|
+
importObject: string;
|
|
8
|
+
importPath: string;
|
|
9
|
+
};
|
|
10
|
+
argTypes: {
|
|
11
|
+
locale: {
|
|
12
|
+
control: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
className: {
|
|
18
|
+
control: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
legals: {
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
flow: {
|
|
27
|
+
control: {
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
dataQaId: {
|
|
33
|
+
control: {
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export default _default;
|
|
41
|
+
export declare const Main: Story<ExtraDisclaimersProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface InputProps extends React.HTMLAttributes<HTMLInputElement> {
|
|
3
|
+
value: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
onChange: React.FocusEventHandler<HTMLInputElement> | undefined;
|
|
6
|
+
type: InputType;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
dataQaId?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
readOnly?: boolean;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
maxLength?: number;
|
|
14
|
+
minLength?: number;
|
|
15
|
+
wrapperClassName?: string;
|
|
16
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement> | undefined;
|
|
17
|
+
}
|
|
18
|
+
export declare enum InputType {
|
|
19
|
+
Text = "text",
|
|
20
|
+
Number = "number",
|
|
21
|
+
Email = "email",
|
|
22
|
+
Password = "password",
|
|
23
|
+
Search = "search",
|
|
24
|
+
Telephone = "tel",
|
|
25
|
+
URL = "url"
|
|
26
|
+
}
|
|
27
|
+
export declare enum InputSize {
|
|
28
|
+
Medium = "Medium",
|
|
29
|
+
Large = "Large"
|
|
30
|
+
}
|
|
31
|
+
export declare enum InputIconPosition {
|
|
32
|
+
Left = "Left",
|
|
33
|
+
Right = "Right"
|
|
34
|
+
}
|
|
35
|
+
export declare enum InputMaskTypes {
|
|
36
|
+
Telephone = "telephone",
|
|
37
|
+
CreditCard = "credit_card"
|
|
38
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface IHash {
|
|
3
|
+
[key: string]: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function IntlProvider({ locale, messages, children }: {
|
|
6
|
+
locale: string;
|
|
7
|
+
messages: IHash;
|
|
8
|
+
children: React.ReactChild | JSX.Element[] | JSX.Element;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
export declare function Translate({ id, values, defaultMessage }: {
|
|
11
|
+
id: string;
|
|
12
|
+
values?: {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
};
|
|
15
|
+
defaultMessage?: string;
|
|
16
|
+
}): string;
|
|
17
|
+
export declare function injectIntl(Child: React.ComponentType<any>): (props: any) => JSX.Element;
|
|
18
|
+
export declare function defineMessages(messageDescriptors: any): any;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { IKeywordShortcode, MOLinkProps } from './MOLink.types';
|
|
3
|
+
export declare const formatSMSLink: (keywordAndShortcode: IKeywordShortcode, useOpenAddresses?: boolean) => string;
|
|
4
|
+
export declare const MOLink: React.ComponentType<MOLinkProps>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Story } from '@storybook/react';
|
|
2
|
+
import { MOLinkProps } from './MOLink.types';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: string;
|
|
6
|
+
parameters: {
|
|
7
|
+
importObject: string;
|
|
8
|
+
importPath: string;
|
|
9
|
+
};
|
|
10
|
+
argTypes: {
|
|
11
|
+
className: {
|
|
12
|
+
control: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
dataQaId: {
|
|
18
|
+
control: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
keywordAndShortcode: {
|
|
24
|
+
control: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default _default;
|
|
32
|
+
export declare const Main: Story<MOLinkProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type IKeywordShortcode = {
|
|
3
|
+
keyword: string;
|
|
4
|
+
shortcode: string;
|
|
5
|
+
};
|
|
6
|
+
export declare type MOLinkProps = {
|
|
7
|
+
keywordAndShortcode: IKeywordShortcode;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
dataQaId?: string;
|
|
10
|
+
} & React.HTMLAttributes<HTMLAnchorElement>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Story } from '@storybook/react';
|
|
2
|
+
import { PricePointProps } from './PricePoint.types';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: string;
|
|
6
|
+
parameters: {
|
|
7
|
+
importObject: string;
|
|
8
|
+
importPath: string;
|
|
9
|
+
};
|
|
10
|
+
argTypes: {
|
|
11
|
+
locale: {
|
|
12
|
+
control: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
className: {
|
|
18
|
+
control: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
legals: {
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
flow: {
|
|
27
|
+
control: {
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
dataQaId: {
|
|
33
|
+
control: {
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export default _default;
|
|
41
|
+
export declare const Main: Story<PricePointProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Story } from '@storybook/react';
|
|
2
|
+
import { TopLegalsProps } from './TopLegals.types';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: string;
|
|
6
|
+
parameters: {
|
|
7
|
+
importObject: string;
|
|
8
|
+
importPath: string;
|
|
9
|
+
};
|
|
10
|
+
argTypes: {
|
|
11
|
+
locale: {
|
|
12
|
+
control: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
className: {
|
|
18
|
+
control: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
legals: {
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
flow: {
|
|
27
|
+
control: {
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
dataQaId: {
|
|
33
|
+
control: {
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export default _default;
|
|
41
|
+
export declare const Main: Story<TopLegalsProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Disclaimers } from './Disclaimers/Disclaimers';
|
|
2
|
+
import { ExtraDisclaimers } from './ExtraDisclaimers/ExtraDisclaimers';
|
|
3
|
+
import { Input } from './Input/Input';
|
|
4
|
+
import { InputType } from './Input/Input.types';
|
|
5
|
+
import { defineMessages, injectIntl, IntlProvider } from './Intl/Intl';
|
|
6
|
+
import { MOLink } from './MOLink/MOLink';
|
|
7
|
+
import { IKeywordShortcode } from './MOLink/MOLink.types';
|
|
8
|
+
import { PricePoint } from './PricePoint/PricePoint';
|
|
9
|
+
import { TopLegals } from './TopLegals/TopLegals';
|
|
10
|
+
export { Disclaimers, PricePoint, TopLegals, ExtraDisclaimers, MOLink, Input, InputType, injectIntl, IntlProvider, defineMessages };
|
|
11
|
+
export type { IKeywordShortcode };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RenderOptions } from '@testing-library/react';
|
|
2
2
|
import React, { ReactElement } from 'react';
|
|
3
3
|
import renderer from 'react-test-renderer';
|
|
4
|
-
declare const customRender: (ui: ReactElement, options?: Omit<RenderOptions
|
|
4
|
+
declare const customRender: (ui: ReactElement, options?: Omit<RenderOptions, 'wrapper'>) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
|
|
5
5
|
declare const jsonRenderer: (ui: React.ReactNode) => renderer.ReactTestRendererJSON | renderer.ReactTestRendererJSON[] | null;
|
|
6
6
|
export * from '@testing-library/react';
|
|
7
7
|
export { customRender as render, jsonRenderer };
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ouisys-component-library",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Ouisys Components",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"module": "build/index.es.js",
|
|
7
|
+
"typings": "build/index.d.ts",
|
|
7
8
|
"files": [
|
|
8
9
|
"build"
|
|
9
10
|
],
|
|
@@ -28,6 +29,7 @@
|
|
|
28
29
|
"babel-loader": "^8.2.3",
|
|
29
30
|
"babel-preset-react-app": "^10.0.1",
|
|
30
31
|
"classnames": "^2.3.1",
|
|
32
|
+
"esbuild": "^0.15.10",
|
|
31
33
|
"eslint": "^7.16.0",
|
|
32
34
|
"eslint-config-airbnb": "^18.2.1",
|
|
33
35
|
"eslint-config-ouisys": "0.0.1",
|
|
@@ -41,21 +43,26 @@
|
|
|
41
43
|
"eslint-plugin-testing-library": "^3.10.1",
|
|
42
44
|
"identity-obj-proxy": "^3.0.0",
|
|
43
45
|
"jest": "^27.4.7",
|
|
46
|
+
"lint-staged": "^13.0.3",
|
|
44
47
|
"node-sass": "^6",
|
|
45
48
|
"postcss": "8",
|
|
46
|
-
"prettier": "^2.
|
|
47
|
-
"prettier-
|
|
49
|
+
"prettier": "^2.7.1",
|
|
50
|
+
"prettier-config-ouisys": "0.0.2",
|
|
51
|
+
"prettier-plugin-organize-imports": "^3.0.0",
|
|
48
52
|
"react": "^17.0.2",
|
|
49
53
|
"react-dom": "^17.0.2",
|
|
50
54
|
"react-test-renderer": "^17.0.2",
|
|
51
55
|
"rollup": "^2.64.0",
|
|
52
56
|
"rollup-plugin-analyzer": "^4.0.0",
|
|
57
|
+
"rollup-plugin-dts": "^4.2.3",
|
|
58
|
+
"rollup-plugin-esbuild": "^4.10.1",
|
|
53
59
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
54
60
|
"rollup-plugin-postcss": "^4.0.2",
|
|
55
61
|
"rollup-plugin-terser": "^7.0.2",
|
|
56
62
|
"rollup-plugin-typescript2": "^0.31.1",
|
|
57
63
|
"sass-loader": "^10",
|
|
58
64
|
"ts-jest": "^27.1.3",
|
|
65
|
+
"ts-node": "^10.9.1",
|
|
59
66
|
"typescript": "^4.5.4"
|
|
60
67
|
},
|
|
61
68
|
"dependencies": {},
|
|
@@ -64,14 +71,29 @@
|
|
|
64
71
|
"react-dom": ">=16.8.0"
|
|
65
72
|
},
|
|
66
73
|
"scripts": {
|
|
67
|
-
"build": "rollup -c",
|
|
74
|
+
"build": "rm -rf build && rollup -c",
|
|
68
75
|
"storybook": "start-storybook -p 6006",
|
|
69
76
|
"storybook:export": "build-storybook",
|
|
70
77
|
"build-storybook": "build-storybook",
|
|
71
78
|
"clean": "rm -rf ./dist && rm -rf ./build",
|
|
72
79
|
"watch": "tsc -b -w --preserveWatchOutput",
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
|
|
80
|
+
"lint": "eslint --fix 'src/**/*.{ts,tsx}'",
|
|
81
|
+
"format": "prettier --write .",
|
|
82
|
+
"test": "node --max_old_space_size=5096 node_modules/.bin/jest",
|
|
83
|
+
"test:local": "jest --runInBand",
|
|
84
|
+
"test:coverage": "yarn run test -- --watch --coverage --coverage-reporters=lcov --watchAll=false; echo \"\\033[32m>>> 🌹 Coverage report now in /coverage folder\"",
|
|
85
|
+
"test:coverageWatch": "yarn run test -- --watch --coverage --coverage-reporters=lcov --watchAll=true",
|
|
86
|
+
"test:watch": "yarn run test -- --watch --watchAll=true",
|
|
87
|
+
"test:debug": "node --inspect-brk node_modules/.bin/jest --watch --ci --runInBand"
|
|
88
|
+
},
|
|
89
|
+
"husky": {
|
|
90
|
+
"hooks": {
|
|
91
|
+
"pre-commit": "lint-staged"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"lint-staged": {
|
|
95
|
+
"*": "prettier --ignore-unknown --write",
|
|
96
|
+
"src/**/*.{ts,tsx}": "eslint --fix"
|
|
97
|
+
},
|
|
98
|
+
"prettier": "prettier-config-ouisys"
|
|
77
99
|
}
|
package/build/index.es.css
DELETED
package/build/index.es.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["Disclaimers.module.scss"],"names":[],"mappings":"AAAA,mCACE,oBAAuB","file":"index.es.css","sourcesContent":[".wrapper {\n background-color: red; }\n"]}
|
package/build/index.es.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import*as r from"react";var e,t="Disclaimers-module_wrapper__yyrGN",a={exports:{}};
|
|
2
|
-
/*!
|
|
3
|
-
Copyright (c) 2018 Jed Watson.
|
|
4
|
-
Licensed under the MIT License (MIT), see
|
|
5
|
-
http://jedwatson.github.io/classnames
|
|
6
|
-
*/
|
|
7
|
-
e=a,function(){var r={}.hasOwnProperty;function t(){for(var e=[],a=0;a<arguments.length;a++){var i=arguments[a];if(i){var n=typeof i;if("string"===n||"number"===n)e.push(i);else if(Array.isArray(i)){if(i.length){var o=t.apply(null,i);o&&e.push(o)}}else if("object"===n)if(i.toString===Object.prototype.toString)for(var l in i)r.call(i,l)&&i[l]&&e.push(l);else e.push(i.toString())}}return e.join(" ")}e.exports?(t.default=t,e.exports=t):window.classNames=t}();var i=a.exports,n=function(e){var a=e.locale,n=e.className,o=void 0===n?"":n,l=e.legals,s=e.flow,u=e.dataQaId,c=void 0===u?"disclaimers":u,f=l.filter((function(r){return r.flow===s})),p=((s?f:l).reduce((function(r,e){return r[e.language]=e,r}),{})[a]||"").disclaimer;return r.createElement("div",{"data-qa-id":c,className:i(o,t)},r.createElement("div",{dangerouslySetInnerHTML:{__html:p}}))};export{n as Disclaimers};
|
|
8
|
-
//# sourceMappingURL=index.es.js.map
|
package/build/index.es.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../node_modules/classnames/index.js"],"sourcesContent":["/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n"],"names":["hasOwn","hasOwnProperty","classNames","classes","i","arguments","length","arg","argType","push","Array","isArray","inner","apply","toString","Object","prototype","key","call","join","module","exports","default","window"],"mappings":";;;;;;IAOC,WAGA,IAAIA,EAAS,GAAGC,eAEhB,SAASC,IAGR,IAFA,IAAIC,EAAU,GAELC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAC1C,IAAIG,EAAMF,UAAUD,GACpB,GAAKG,EAAL,CAEA,IAAIC,SAAiBD,EAErB,GAAgB,WAAZC,GAAoC,WAAZA,EAC3BL,EAAQM,KAAKF,QACP,GAAIG,MAAMC,QAAQJ,IACxB,GAAIA,EAAID,OAAQ,CACf,IAAIM,EAAQV,EAAWW,MAAM,KAAMN,GAC/BK,GACHT,EAAQM,KAAKG,SAGT,GAAgB,WAAZJ,EACV,GAAID,EAAIO,WAAaC,OAAOC,UAAUF,SACrC,IAAK,IAAIG,KAAOV,EACXP,EAAOkB,KAAKX,EAAKU,IAAQV,EAAIU,IAChCd,EAAQM,KAAKQ,QAIfd,EAAQM,KAAKF,EAAIO,aAKpB,OAAOX,EAAQgB,KAAK,KAGgBC,EAAOC,SAC3CnB,EAAWoB,QAAUpB,EACrBkB,UAAiBlB,GAOjBqB,OAAOrB,WAAaA,EAhDtB"}
|