@livechat/design-system-react-components 1.17.1-alpha.1 → 1.17.1-alpha.3
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/index.cjs.js +1 -1
- package/dist/index.es.js +5231 -120
- package/dist/preview-stats.json +1158 -1158
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/assets/style-ProgressBar.css +0 -1
- package/dist/assets/style-Tooltip.css +0 -1
- package/dist/assets/style-Typography.css +0 -1
- package/dist/assets/style-index.css +0 -1
- package/dist/assets/style-index10.css +0 -1
- package/dist/assets/style-index11.css +0 -1
- package/dist/assets/style-index12.css +0 -1
- package/dist/assets/style-index13.css +0 -1
- package/dist/assets/style-index14.css +0 -1
- package/dist/assets/style-index15.css +0 -1
- package/dist/assets/style-index16.css +0 -1
- package/dist/assets/style-index17.css +0 -1
- package/dist/assets/style-index18.css +0 -1
- package/dist/assets/style-index19.css +0 -1
- package/dist/assets/style-index2.css +0 -1
- package/dist/assets/style-index20.css +0 -1
- package/dist/assets/style-index21.css +0 -1
- package/dist/assets/style-index22.css +0 -1
- package/dist/assets/style-index23.css +0 -1
- package/dist/assets/style-index24.css +0 -1
- package/dist/assets/style-index25.css +0 -1
- package/dist/assets/style-index26.css +0 -1
- package/dist/assets/style-index27.css +0 -1
- package/dist/assets/style-index28.css +0 -1
- package/dist/assets/style-index29.css +0 -1
- package/dist/assets/style-index3.css +0 -1
- package/dist/assets/style-index30.css +0 -1
- package/dist/assets/style-index31.css +0 -1
- package/dist/assets/style-index32.css +0 -1
- package/dist/assets/style-index33.css +0 -1
- package/dist/assets/style-index34.css +0 -1
- package/dist/assets/style-index35.css +0 -1
- package/dist/assets/style-index36.css +0 -1
- package/dist/assets/style-index37.css +0 -1
- package/dist/assets/style-index38.css +0 -1
- package/dist/assets/style-index39.css +0 -1
- package/dist/assets/style-index4.css +0 -1
- package/dist/assets/style-index5.css +0 -1
- package/dist/assets/style-index6.css +0 -1
- package/dist/assets/style-index7.css +0 -1
- package/dist/assets/style-index8.css +0 -1
- package/dist/assets/style-index9.css +0 -1
- package/dist/chunks/Heading-1a31001f.js +0 -64
- package/dist/chunks/Heading-597d11a4.js +0 -1
- package/dist/chunks/ProgressBar-0e01c602.js +0 -88
- package/dist/chunks/ProgressBar-dd89d43a.js +0 -1
- package/dist/chunks/Text-78b02609.js +0 -66
- package/dist/chunks/Text-dd6930a2.js +0 -1
- package/dist/chunks/Tooltip-21230071.js +0 -1
- package/dist/chunks/Tooltip-f4d8b8fd.js +0 -182
- package/dist/chunks/Typography.module-58a031dc.js +0 -24
- package/dist/chunks/Typography.module-8b7171c2.js +0 -1
- package/dist/chunks/keyCodes-30323e90.js +0 -15
- package/dist/chunks/keyCodes-c4c35e49.js +0 -1
- package/dist/components/ActionBar/index.cjs.js +0 -1
- package/dist/components/ActionBar/index.es.js +0 -188
- package/dist/components/ActionMenu/index.cjs.js +0 -1
- package/dist/components/ActionMenu/index.es.js +0 -199
- package/dist/components/Alert/index.cjs.js +0 -1
- package/dist/components/Alert/index.es.js +0 -128
- package/dist/components/Avatar/index.cjs.js +0 -1
- package/dist/components/Avatar/index.es.js +0 -190
- package/dist/components/Badge/index.cjs.js +0 -1
- package/dist/components/Badge/index.es.js +0 -66
- package/dist/components/Button/index.cjs.js +0 -1
- package/dist/components/Button/index.es.js +0 -142
- package/dist/components/Card/index.cjs.js +0 -1
- package/dist/components/Card/index.es.js +0 -95
- package/dist/components/Checkbox/index.cjs.js +0 -1
- package/dist/components/Checkbox/index.es.js +0 -64
- package/dist/components/DatePicker/index.cjs.js +0 -1
- package/dist/components/DatePicker/index.es.js +0 -517
- package/dist/components/DetailsCard/index.cjs.js +0 -1
- package/dist/components/DetailsCard/index.es.js +0 -138
- package/dist/components/DetailsCardInfo/index.cjs.js +0 -1
- package/dist/components/DetailsCardInfo/index.es.js +0 -13
- package/dist/components/FieldDescription/index.cjs.js +0 -1
- package/dist/components/FieldDescription/index.es.js +0 -41
- package/dist/components/FieldError/index.cjs.js +0 -1
- package/dist/components/FieldError/index.es.js +0 -51
- package/dist/components/FieldGroup/index.cjs.js +0 -1
- package/dist/components/FieldGroup/index.es.js +0 -55
- package/dist/components/FileUploadProgress/index.cjs.js +0 -1
- package/dist/components/FileUploadProgress/index.es.js +0 -109
- package/dist/components/Form/index.cjs.js +0 -1
- package/dist/components/Form/index.es.js +0 -50
- package/dist/components/FormField/index.cjs.js +0 -1
- package/dist/components/FormField/index.es.js +0 -114
- package/dist/components/FormGroup/index.cjs.js +0 -1
- package/dist/components/FormGroup/index.es.js +0 -58
- package/dist/components/Icon/index.cjs.js +0 -1
- package/dist/components/Icon/index.es.js +0 -104
- package/dist/components/Input/index.cjs.js +0 -1
- package/dist/components/Input/index.es.js +0 -122
- package/dist/components/Link/index.cjs.js +0 -1
- package/dist/components/Link/index.es.js +0 -48
- package/dist/components/Loader/index.cjs.js +0 -1
- package/dist/components/Loader/index.es.js +0 -39
- package/dist/components/Modal/index.cjs.js +0 -1
- package/dist/components/Modal/index.es.js +0 -248
- package/dist/components/NumericInput/index.cjs.js +0 -1
- package/dist/components/NumericInput/index.es.js +0 -140
- package/dist/components/Picker/index.cjs.js +0 -1
- package/dist/components/Picker/index.es.js +0 -738
- package/dist/components/Popover/index.cjs.js +0 -1
- package/dist/components/Popover/index.es.js +0 -75
- package/dist/components/Progress/index.cjs.js +0 -1
- package/dist/components/Progress/index.es.js +0 -104
- package/dist/components/PromoBanner/index.cjs.js +0 -1
- package/dist/components/PromoBanner/index.es.js +0 -73
- package/dist/components/PromoBannerV2/index.cjs.js +0 -1
- package/dist/components/PromoBannerV2/index.es.js +0 -77
- package/dist/components/RadioButton/index.cjs.js +0 -1
- package/dist/components/RadioButton/index.es.js +0 -58
- package/dist/components/Search/index.cjs.js +0 -1
- package/dist/components/Search/index.es.js +0 -117
- package/dist/components/SegmentedControl/index.cjs.js +0 -1
- package/dist/components/SegmentedControl/index.es.js +0 -53
- package/dist/components/Switch/index.cjs.js +0 -1
- package/dist/components/Switch/index.es.js +0 -144
- package/dist/components/Tab/index.cjs.js +0 -1
- package/dist/components/Tab/index.es.js +0 -93
- package/dist/components/Tag/index.cjs.js +0 -1
- package/dist/components/Tag/index.es.js +0 -143
- package/dist/components/TagInput/index.cjs.js +0 -1
- package/dist/components/TagInput/index.es.js +0 -241
- package/dist/components/Textarea/index.cjs.js +0 -1
- package/dist/components/Textarea/index.es.js +0 -55
- package/dist/components/Toast/index.cjs.js +0 -1
- package/dist/components/Toast/index.es.js +0 -162
- package/dist/components/Tooltip/components/UserGuide/index.cjs.js +0 -1
- package/dist/components/Tooltip/components/UserGuide/index.es.js +0 -193
- package/dist/components/Tooltip/components/index.cjs.js +0 -1
- package/dist/components/Tooltip/components/index.es.js +0 -114
- package/dist/components/Tooltip/index.cjs.js +0 -1
- package/dist/components/Tooltip/index.es.js +0 -11
- package/dist/components/Typography/index.cjs.js +0 -1
- package/dist/components/Typography/index.es.js +0 -48
- package/dist/components/UploadBar/index.cjs.js +0 -1
- package/dist/components/UploadBar/index.es.js +0 -111
- package/dist/foundations/index.cjs.js +0 -1
- package/dist/foundations/index.es.js +0 -353
- package/dist/utils/index.cjs.js +0 -1
- package/dist/utils/index.es.js +0 -4
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
var h = Object.defineProperty, C = Object.defineProperties;
|
|
2
|
-
var G = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var s = Object.getOwnPropertySymbols;
|
|
4
|
-
var f = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var u = (e, a, t) => a in e ? h(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t, T = (e, a) => {
|
|
6
|
-
for (var t in a || (a = {}))
|
|
7
|
-
f.call(a, t) && u(e, t, a[t]);
|
|
8
|
-
if (s)
|
|
9
|
-
for (var t of s(a))
|
|
10
|
-
i.call(a, t) && u(e, t, a[t]);
|
|
11
|
-
return e;
|
|
12
|
-
}, b = (e, a) => C(e, G(a));
|
|
13
|
-
var p = (e, a) => {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var r in e)
|
|
16
|
-
f.call(e, r) && a.indexOf(r) < 0 && (t[r] = e[r]);
|
|
17
|
-
if (e != null && s)
|
|
18
|
-
for (var r of s(e))
|
|
19
|
-
a.indexOf(r) < 0 && i.call(e, r) && (t[r] = e[r]);
|
|
20
|
-
return t;
|
|
21
|
-
};
|
|
22
|
-
import "../../assets/style-index3.css";
|
|
23
|
-
import * as o from "react";
|
|
24
|
-
import N from "clsx";
|
|
25
|
-
import { T as O } from "../../chunks/Text-78b02609.js";
|
|
26
|
-
const R = "lc-Textarea-module__textarea___g6U8F", c = {
|
|
27
|
-
textarea: R,
|
|
28
|
-
"textarea--focused": "lc-Textarea-module__textarea--focused___1vtEx",
|
|
29
|
-
"textarea--disabled": "lc-Textarea-module__textarea--disabled___xXaGv",
|
|
30
|
-
"textarea--error": "lc-Textarea-module__textarea--error___0EGuq"
|
|
31
|
-
}, l = "textarea", S = o.forwardRef(
|
|
32
|
-
(q, r) => {
|
|
33
|
-
var m = q, { className: e, error: a } = m, t = p(m, ["className", "error"]);
|
|
34
|
-
const { disabled: E, onBlur: d, onFocus: x } = t, [F, n] = o.useState(!1), v = N(e, c[l], {
|
|
35
|
-
[c[`${l}--disabled`]]: E,
|
|
36
|
-
[c[`${l}--focused`]]: F,
|
|
37
|
-
[c[`${l}--error`]]: a
|
|
38
|
-
}), $ = (_) => {
|
|
39
|
-
n(!1), d == null || d(_);
|
|
40
|
-
}, g = (_) => {
|
|
41
|
-
n(!0), x == null || x(_);
|
|
42
|
-
};
|
|
43
|
-
return /* @__PURE__ */ o.createElement(O, { as: "div", className: v }, /* @__PURE__ */ o.createElement(
|
|
44
|
-
"textarea",
|
|
45
|
-
b(T({}, t), {
|
|
46
|
-
ref: r,
|
|
47
|
-
onFocus: g,
|
|
48
|
-
onBlur: $
|
|
49
|
-
})
|
|
50
|
-
));
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
export {
|
|
54
|
-
S as Textarea
|
|
55
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var q=Object.defineProperty,j=Object.defineProperties;var M=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var x=(t,o,e)=>o in t?q(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e,w=(t,o)=>{for(var e in o||(o={}))$.call(o,e)&&x(t,e,o[e]);if(d)for(var e of d(o))N.call(o,e)&&x(t,e,o[e]);return t},C=(t,o)=>j(t,M(o));var E=(t,o)=>{var e={};for(var a in t)$.call(t,a)&&o.indexOf(a)<0&&(e[a]=t[a]);if(t!=null&&d)for(var a of d(t))o.indexOf(a)<0&&N.call(t,a)&&(e[a]=t[a]);return e};var R=require("../../assets/style-index2.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("react"),u=require("@livechat/design-system-icons"),v=require("clsx"),h=require("../Button/index.cjs.js"),I=require("../Icon/index.cjs.js"),y=require("../../chunks/Text-dd6930a2.js"),k=require("react-transition-group");function S(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(o,e,a.get?a:{enumerable:!0,get:()=>t[e]})}}return o.default=t,Object.freeze(o)}const _=S(G),B="lc-Toast-module__toast___j5Amn",W="lc-Toast-module__toast__content___HjaNw",D="lc-Toast-module__toast__actions___JWu-1",H="lc-Toast-module__toast__actions__button___Iblrl",s={toast:B,toast__content:W,toast__actions:D,toast__actions__button:H,"toast__actions__button--success":"lc-Toast-module__toast__actions__button--success___5JmFw","toast__actions__button--warning":"lc-Toast-module__toast__actions__button--warning___zGQ-Q","toast__actions__button--error":"lc-Toast-module__toast__actions__button--error___PuTv3","toast__actions__button--info":"lc-Toast-module__toast__actions__button--info___fNtsj","toast__actions--custom":"lc-Toast-module__toast__actions--custom___lm-pM","toast--success":"lc-Toast-module__toast--success___7UC6m","toast--warning":"lc-Toast-module__toast--warning___pteb7","toast--error":"lc-Toast-module__toast--error___trg--","toast--info":"lc-Toast-module__toast--info___IOp44","toast-wrapper":"lc-Toast-module__toast-wrapper___Oiwqp","toast-wrapper--fixed":"lc-Toast-module__toast-wrapper--fixed___QYxRI","toast-wrapper--block":"lc-Toast-module__toast-wrapper--block___j0kGt","toast-wrapper--horizontal-center":"lc-Toast-module__toast-wrapper--horizontal-center___t9AFd","toast-wrapper--horizontal-left":"lc-Toast-module__toast-wrapper--horizontal-left___-GY4I","toast-wrapper--horizontal-right":"lc-Toast-module__toast-wrapper--horizontal-right___VVMgm","toast-wrapper--vertical-top":"lc-Toast-module__toast-wrapper--vertical-top___uBfEG","toast-appear--slide":"lc-Toast-module__toast-appear--slide___G7GAp","toast-appear-active--slide":"lc-Toast-module__toast-appear-active--slide___brfgK","toast-exit--slide":"lc-Toast-module__toast-exit--slide___aqiBq","toast-exit-active--slide":"lc-Toast-module__toast-exit-active--slide___WryMi","toast-wrapper--vertical-bottom":"lc-Toast-module__toast-wrapper--vertical-bottom___erPuH","toast-appear--fade":"lc-Toast-module__toast-appear--fade___oUwHm","toast-appear-active--fade":"lc-Toast-module__toast-appear-active--fade___D3--J","toast-exit--fade":"lc-Toast-module__toast-exit--fade___iDA1p","toast-exit-active--fade":"lc-Toast-module__toast-exit-active--fade___tL7sb"},J={success:{source:u.CheckCircle},warning:{source:u.Warning},error:{source:u.Block},info:{source:u.Info}},r="toast",z=g=>{var m=g,{action:t,className:o,children:e,removable:a,kind:c="info",onClose:n}=m,p=E(m,["action","className","children","removable","kind","onClose"]);const T=v(s[r],s[`${r}--${c}`],o),f=typeof e=="string",b=l=>l&&l.closesOnClick&&n?(l.onClick(),n()):l.onClick();return _.createElement("div",w({className:T},p),_.createElement("div",{className:s[`${r}__icon`]},_.createElement(I.Icon,C(w({},J[c]),{size:"medium"}))),_.createElement("div",{className:s[`${r}__content`]},f?_.createElement(y.Text,{as:"div"},e):e),(t||a)&&_.createElement("div",{className:s[`${r}__actions`]},t&&_.createElement(h.Button,{className:s[`${r}__actions--custom`],kind:"text",size:"compact",onClick:()=>b(t)},t.label),a&&_.createElement("button",{className:v(s[`${r}__actions__button`],s[`${r}__actions__button--${c}`]),"aria-label":"Close toast",onClick:n},_.createElement(I.Icon,{source:u.Close,size:"medium"}))))},A=200,i="toast-wrapper",P=({className:t,toasts:o=[],fixed:e=!0,block:a=!1,animationType:c="slide",verticalPosition:n="top",horizontalPosition:p="center"})=>{const g=v(s[i],{[s[`${i}--fixed`]]:e,[s[`${i}--block`]]:!e&&a,[s[`${i}--horizontal-${p}`]]:p,[s[`${i}--vertical-${n}`]]:n},t);return _.createElement("div",{className:g},_.createElement(k.TransitionGroup,{component:null},o.map(({id:m,kind:T,content:f,removable:b,action:l,onClose:O})=>_.createElement(k.CSSTransition,{key:m,classNames:{enter:s[`toast-appear--${c}`],enterActive:s[`toast-appear-active--${c}`],exit:s[`toast-exit--${c}`],exitActive:s[`toast-exit-active--${c}`]},timeout:A},_.createElement(z,{kind:T,onClose:O,removable:b,action:l},f)))))};exports.ANIMATION_TIME=A;exports.Toast=z;exports.ToastWrapper=P;
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
var z = Object.defineProperty, A = Object.defineProperties;
|
|
2
|
-
var I = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var u = Object.getOwnPropertySymbols;
|
|
4
|
-
var $ = Object.prototype.hasOwnProperty, C = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var x = (t, a, o) => a in t ? z(t, a, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[a] = o, b = (t, a) => {
|
|
6
|
-
for (var o in a || (a = {}))
|
|
7
|
-
$.call(a, o) && x(t, o, a[o]);
|
|
8
|
-
if (u)
|
|
9
|
-
for (var o of u(a))
|
|
10
|
-
C.call(a, o) && x(t, o, a[o]);
|
|
11
|
-
return t;
|
|
12
|
-
}, g = (t, a) => A(t, I(a));
|
|
13
|
-
var E = (t, a) => {
|
|
14
|
-
var o = {};
|
|
15
|
-
for (var _ in t)
|
|
16
|
-
$.call(t, _) && a.indexOf(_) < 0 && (o[_] = t[_]);
|
|
17
|
-
if (t != null && u)
|
|
18
|
-
for (var _ of u(t))
|
|
19
|
-
a.indexOf(_) < 0 && C.call(t, _) && (o[_] = t[_]);
|
|
20
|
-
return o;
|
|
21
|
-
};
|
|
22
|
-
import "../../assets/style-index2.css";
|
|
23
|
-
import * as s from "react";
|
|
24
|
-
import { Close as h, CheckCircle as G, Warning as M, Block as j, Info as B } from "@livechat/design-system-icons";
|
|
25
|
-
import w from "clsx";
|
|
26
|
-
import { Button as O } from "../Button/index.es.js";
|
|
27
|
-
import { Icon as N } from "../Icon/index.es.js";
|
|
28
|
-
import { T as W } from "../../chunks/Text-78b02609.js";
|
|
29
|
-
import { TransitionGroup as q, CSSTransition as H } from "react-transition-group";
|
|
30
|
-
const J = "lc-Toast-module__toast___j5Amn", Q = "lc-Toast-module__toast__content___HjaNw", D = "lc-Toast-module__toast__actions___JWu-1", F = "lc-Toast-module__toast__actions__button___Iblrl", e = {
|
|
31
|
-
toast: J,
|
|
32
|
-
toast__content: Q,
|
|
33
|
-
toast__actions: D,
|
|
34
|
-
toast__actions__button: F,
|
|
35
|
-
"toast__actions__button--success": "lc-Toast-module__toast__actions__button--success___5JmFw",
|
|
36
|
-
"toast__actions__button--warning": "lc-Toast-module__toast__actions__button--warning___zGQ-Q",
|
|
37
|
-
"toast__actions__button--error": "lc-Toast-module__toast__actions__button--error___PuTv3",
|
|
38
|
-
"toast__actions__button--info": "lc-Toast-module__toast__actions__button--info___fNtsj",
|
|
39
|
-
"toast__actions--custom": "lc-Toast-module__toast__actions--custom___lm-pM",
|
|
40
|
-
"toast--success": "lc-Toast-module__toast--success___7UC6m",
|
|
41
|
-
"toast--warning": "lc-Toast-module__toast--warning___pteb7",
|
|
42
|
-
"toast--error": "lc-Toast-module__toast--error___trg--",
|
|
43
|
-
"toast--info": "lc-Toast-module__toast--info___IOp44",
|
|
44
|
-
"toast-wrapper": "lc-Toast-module__toast-wrapper___Oiwqp",
|
|
45
|
-
"toast-wrapper--fixed": "lc-Toast-module__toast-wrapper--fixed___QYxRI",
|
|
46
|
-
"toast-wrapper--block": "lc-Toast-module__toast-wrapper--block___j0kGt",
|
|
47
|
-
"toast-wrapper--horizontal-center": "lc-Toast-module__toast-wrapper--horizontal-center___t9AFd",
|
|
48
|
-
"toast-wrapper--horizontal-left": "lc-Toast-module__toast-wrapper--horizontal-left___-GY4I",
|
|
49
|
-
"toast-wrapper--horizontal-right": "lc-Toast-module__toast-wrapper--horizontal-right___VVMgm",
|
|
50
|
-
"toast-wrapper--vertical-top": "lc-Toast-module__toast-wrapper--vertical-top___uBfEG",
|
|
51
|
-
"toast-appear--slide": "lc-Toast-module__toast-appear--slide___G7GAp",
|
|
52
|
-
"toast-appear-active--slide": "lc-Toast-module__toast-appear-active--slide___brfgK",
|
|
53
|
-
"toast-exit--slide": "lc-Toast-module__toast-exit--slide___aqiBq",
|
|
54
|
-
"toast-exit-active--slide": "lc-Toast-module__toast-exit-active--slide___WryMi",
|
|
55
|
-
"toast-wrapper--vertical-bottom": "lc-Toast-module__toast-wrapper--vertical-bottom___erPuH",
|
|
56
|
-
"toast-appear--fade": "lc-Toast-module__toast-appear--fade___oUwHm",
|
|
57
|
-
"toast-appear-active--fade": "lc-Toast-module__toast-appear-active--fade___D3--J",
|
|
58
|
-
"toast-exit--fade": "lc-Toast-module__toast-exit--fade___iDA1p",
|
|
59
|
-
"toast-exit-active--fade": "lc-Toast-module__toast-exit-active--fade___tL7sb"
|
|
60
|
-
}, R = {
|
|
61
|
-
success: {
|
|
62
|
-
source: G
|
|
63
|
-
},
|
|
64
|
-
warning: {
|
|
65
|
-
source: M
|
|
66
|
-
},
|
|
67
|
-
error: {
|
|
68
|
-
source: j
|
|
69
|
-
},
|
|
70
|
-
info: {
|
|
71
|
-
source: B
|
|
72
|
-
}
|
|
73
|
-
}, r = "toast", S = (v) => {
|
|
74
|
-
var p = v, {
|
|
75
|
-
action: t,
|
|
76
|
-
className: a,
|
|
77
|
-
children: o,
|
|
78
|
-
removable: _,
|
|
79
|
-
kind: c = "info",
|
|
80
|
-
onClose: l
|
|
81
|
-
} = p, m = E(p, [
|
|
82
|
-
"action",
|
|
83
|
-
"className",
|
|
84
|
-
"children",
|
|
85
|
-
"removable",
|
|
86
|
-
"kind",
|
|
87
|
-
"onClose"
|
|
88
|
-
]);
|
|
89
|
-
const d = w(
|
|
90
|
-
e[r],
|
|
91
|
-
e[`${r}--${c}`],
|
|
92
|
-
a
|
|
93
|
-
), T = typeof o == "string", f = (n) => n && n.closesOnClick && l ? (n.onClick(), l()) : n.onClick();
|
|
94
|
-
return /* @__PURE__ */ s.createElement("div", b({ className: d }, m), /* @__PURE__ */ s.createElement("div", { className: e[`${r}__icon`] }, /* @__PURE__ */ s.createElement(N, g(b({}, R[c]), { size: "medium" }))), /* @__PURE__ */ s.createElement("div", { className: e[`${r}__content`] }, T ? /* @__PURE__ */ s.createElement(W, { as: "div" }, o) : o), (t || _) && /* @__PURE__ */ s.createElement("div", { className: e[`${r}__actions`] }, t && /* @__PURE__ */ s.createElement(
|
|
95
|
-
O,
|
|
96
|
-
{
|
|
97
|
-
className: e[`${r}__actions--custom`],
|
|
98
|
-
kind: "text",
|
|
99
|
-
size: "compact",
|
|
100
|
-
onClick: () => f(t)
|
|
101
|
-
},
|
|
102
|
-
t.label
|
|
103
|
-
), _ && /* @__PURE__ */ s.createElement(
|
|
104
|
-
"button",
|
|
105
|
-
{
|
|
106
|
-
className: w(
|
|
107
|
-
e[`${r}__actions__button`],
|
|
108
|
-
e[`${r}__actions__button--${c}`]
|
|
109
|
-
),
|
|
110
|
-
"aria-label": "Close toast",
|
|
111
|
-
onClick: l
|
|
112
|
-
},
|
|
113
|
-
/* @__PURE__ */ s.createElement(N, { source: h, size: "medium" })
|
|
114
|
-
)));
|
|
115
|
-
}, U = 200, i = "toast-wrapper", tt = ({
|
|
116
|
-
className: t,
|
|
117
|
-
toasts: a = [],
|
|
118
|
-
fixed: o = !0,
|
|
119
|
-
block: _ = !1,
|
|
120
|
-
animationType: c = "slide",
|
|
121
|
-
verticalPosition: l = "top",
|
|
122
|
-
horizontalPosition: m = "center"
|
|
123
|
-
}) => {
|
|
124
|
-
const v = w(
|
|
125
|
-
e[i],
|
|
126
|
-
{
|
|
127
|
-
[e[`${i}--fixed`]]: o,
|
|
128
|
-
[e[`${i}--block`]]: !o && _,
|
|
129
|
-
[e[`${i}--horizontal-${m}`]]: m,
|
|
130
|
-
[e[`${i}--vertical-${l}`]]: l
|
|
131
|
-
},
|
|
132
|
-
t
|
|
133
|
-
);
|
|
134
|
-
return /* @__PURE__ */ s.createElement("div", { className: v }, /* @__PURE__ */ s.createElement(q, { component: null }, a.map(({ id: p, kind: d, content: T, removable: f, action: n, onClose: k }) => /* @__PURE__ */ s.createElement(
|
|
135
|
-
H,
|
|
136
|
-
{
|
|
137
|
-
key: p,
|
|
138
|
-
classNames: {
|
|
139
|
-
enter: e[`toast-appear--${c}`],
|
|
140
|
-
enterActive: e[`toast-appear-active--${c}`],
|
|
141
|
-
exit: e[`toast-exit--${c}`],
|
|
142
|
-
exitActive: e[`toast-exit-active--${c}`]
|
|
143
|
-
},
|
|
144
|
-
timeout: U
|
|
145
|
-
},
|
|
146
|
-
/* @__PURE__ */ s.createElement(
|
|
147
|
-
S,
|
|
148
|
-
{
|
|
149
|
-
kind: d,
|
|
150
|
-
onClose: k,
|
|
151
|
-
removable: f,
|
|
152
|
-
action: n
|
|
153
|
-
},
|
|
154
|
-
T
|
|
155
|
-
)
|
|
156
|
-
))));
|
|
157
|
-
};
|
|
158
|
-
export {
|
|
159
|
-
U as ANIMATION_TIME,
|
|
160
|
-
S as Toast,
|
|
161
|
-
tt as ToastWrapper
|
|
162
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var R=Object.defineProperty,S=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var v=(e,t,n)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_=(e,t)=>{for(var n in t||(t={}))N.call(t,n)&&v(e,n,t[n]);if(p)for(var n of p(t))O.call(t,n)&&v(e,n,t[n]);return e},$=(e,t)=>S(e,C(t));var f=(e,t,n)=>(v(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react"),h=require("clsx"),l=require("../../../../chunks/Tooltip-21230071.js");function P(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const s=P(B),i="guide-tooltip",M=({gap:e,isVisible:t,slide:n,disablePointerEvents:r})=>{if(!e)return null;const c={top:`${e.top}px`,left:"0",width:`${e.left}px`,height:`${e.height}px`},o={top:`${e.top}px`,left:`${e.right}px`,width:`calc(100% - ${e.right}px)`,height:`${e.height}px`},d={top:"0",left:"0",width:"100%",height:`${e.top}px`},a={top:`${e.bottom}px`,left:"0",width:"100%",height:`calc(100% - ${e.bottom}px)`},u={top:`${e.top}px`,left:`${e.left}px`,width:`${e.width}px`,height:`${e.height}px`,backgroundColor:"transparent"};return s.createElement(s.Fragment,null,s.createElement("div",{className:h({[l.styles[`${i}__overlay`]]:!0,[l.styles[`${i}__overlay--visible`]]:t,[l.styles[`${i}__overlay--slide`]]:n}),style:c}),s.createElement("div",{className:h({[l.styles[`${i}__overlay`]]:!0,[l.styles[`${i}__overlay--visible`]]:t,[l.styles[`${i}__overlay--slide`]]:n}),style:d}),s.createElement("div",{className:h({[l.styles[`${i}__overlay`]]:!0,[l.styles[`${i}__overlay--visible`]]:t,[l.styles[`${i}__overlay--slide`]]:n}),style:o}),s.createElement("div",{className:h({[l.styles[`${i}__overlay`]]:!0,[l.styles[`${i}__overlay--visible`]]:t,[l.styles[`${i}__overlay--slide`]]:n}),style:a}),r&&s.createElement("div",{className:h({[l.styles[`${i}__overlay`]]:!0,[l.styles[`${i}__overlay--visible`]]:t,[l.styles[`${i}__overlay--slide`]]:n}),style:u}))},j=M;class L{constructor(t,n){f(this,"element");f(this,"padding");this.element=t,this.padding=n}addPadding(t){const n=Math.round(t.left)-this.padding,r=Math.round(t.top)-this.padding,c=Math.round(t.width)+2*this.padding,o=Math.round(t.height)+2*this.padding,d=r,a=n,u=d+o,y=a+c;return{x:n,y:r,width:c,height:o,top:d,left:a,bottom:u,right:y}}getBoundingClientRect(){return this.addPadding(this.element.getBoundingClientRect())}get clientWidth(){return this.getBoundingClientRect().width}get clientHeight(){return this.getBoundingClientRect().height}}const E=8,w="guide-tooltip",b=(e,t)=>new L(e,t),T=e=>{const{className:t,parentElementName:n,isVisible:r=!1,shouldSlide:c=!0}=e,[o,d]=s.useState(null),[a,u]=s.useState(null),[y,m]=s.useState(c),g=()=>{o&&(u(b(o,E).getBoundingClientRect()),m(!1))};return s.useEffect(()=>{if(o!==null)return window.addEventListener("resize",g),window.addEventListener("scroll",g),()=>{window.addEventListener("resize",g),window.addEventListener("resize",g)}},[o,n]),s.useEffect(()=>{if(n){const x=document.querySelector(n);d(x)}},[n]),s.useEffect(()=>{o&&u(b(o,E).getBoundingClientRect()),m(!0)},[o]),o&&r?s.createElement("div",null,s.createElement(j,{gap:a,isVisible:r,slide:y,disablePointerEvents:!0}),s.createElement(l.Tooltip,$(_({},e),{referenceElement:{getBoundingClientRect:()=>a,contextElement:o},arrowOffsetY:25,className:h({[l.styles[w]]:!0,[l.styles[`${w}--slide`]]:y,className:t})}),e.children)):null};exports.UserGuide=T;
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
var C = Object.defineProperty, b = Object.defineProperties;
|
|
2
|
-
var S = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var p = Object.getOwnPropertySymbols;
|
|
4
|
-
var B = Object.prototype.hasOwnProperty, N = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var v = (e, t, n) => t in e ? C(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, _ = (e, t) => {
|
|
6
|
-
for (var n in t || (t = {}))
|
|
7
|
-
B.call(t, n) && v(e, n, t[n]);
|
|
8
|
-
if (p)
|
|
9
|
-
for (var n of p(t))
|
|
10
|
-
N.call(t, n) && v(e, n, t[n]);
|
|
11
|
-
return e;
|
|
12
|
-
}, y = (e, t) => b(e, S(t));
|
|
13
|
-
var $ = (e, t, n) => (v(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
14
|
-
import * as i from "react";
|
|
15
|
-
import u from "clsx";
|
|
16
|
-
import { s as l, T as L } from "../../../../chunks/Tooltip-f4d8b8fd.js";
|
|
17
|
-
const o = "guide-tooltip", P = ({
|
|
18
|
-
gap: e,
|
|
19
|
-
isVisible: t,
|
|
20
|
-
slide: n,
|
|
21
|
-
disablePointerEvents: s
|
|
22
|
-
}) => {
|
|
23
|
-
if (!e)
|
|
24
|
-
return null;
|
|
25
|
-
const d = {
|
|
26
|
-
top: `${e.top}px`,
|
|
27
|
-
left: "0",
|
|
28
|
-
width: `${e.left}px`,
|
|
29
|
-
height: `${e.height}px`
|
|
30
|
-
}, r = {
|
|
31
|
-
top: `${e.top}px`,
|
|
32
|
-
left: `${e.right}px`,
|
|
33
|
-
width: `calc(100% - ${e.right}px)`,
|
|
34
|
-
height: `${e.height}px`
|
|
35
|
-
}, c = {
|
|
36
|
-
top: "0",
|
|
37
|
-
left: "0",
|
|
38
|
-
width: "100%",
|
|
39
|
-
height: `${e.top}px`
|
|
40
|
-
}, a = {
|
|
41
|
-
top: `${e.bottom}px`,
|
|
42
|
-
left: "0",
|
|
43
|
-
width: "100%",
|
|
44
|
-
height: `calc(100% - ${e.bottom}px)`
|
|
45
|
-
}, h = {
|
|
46
|
-
top: `${e.top}px`,
|
|
47
|
-
left: `${e.left}px`,
|
|
48
|
-
width: `${e.width}px`,
|
|
49
|
-
height: `${e.height}px`,
|
|
50
|
-
backgroundColor: "transparent"
|
|
51
|
-
};
|
|
52
|
-
return /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement(
|
|
53
|
-
"div",
|
|
54
|
-
{
|
|
55
|
-
className: u({
|
|
56
|
-
[l[`${o}__overlay`]]: !0,
|
|
57
|
-
[l[`${o}__overlay--visible`]]: t,
|
|
58
|
-
[l[`${o}__overlay--slide`]]: n
|
|
59
|
-
}),
|
|
60
|
-
style: d
|
|
61
|
-
}
|
|
62
|
-
), /* @__PURE__ */ i.createElement(
|
|
63
|
-
"div",
|
|
64
|
-
{
|
|
65
|
-
className: u({
|
|
66
|
-
[l[`${o}__overlay`]]: !0,
|
|
67
|
-
[l[`${o}__overlay--visible`]]: t,
|
|
68
|
-
[l[`${o}__overlay--slide`]]: n
|
|
69
|
-
}),
|
|
70
|
-
style: c
|
|
71
|
-
}
|
|
72
|
-
), /* @__PURE__ */ i.createElement(
|
|
73
|
-
"div",
|
|
74
|
-
{
|
|
75
|
-
className: u({
|
|
76
|
-
[l[`${o}__overlay`]]: !0,
|
|
77
|
-
[l[`${o}__overlay--visible`]]: t,
|
|
78
|
-
[l[`${o}__overlay--slide`]]: n
|
|
79
|
-
}),
|
|
80
|
-
style: r
|
|
81
|
-
}
|
|
82
|
-
), /* @__PURE__ */ i.createElement(
|
|
83
|
-
"div",
|
|
84
|
-
{
|
|
85
|
-
className: u({
|
|
86
|
-
[l[`${o}__overlay`]]: !0,
|
|
87
|
-
[l[`${o}__overlay--visible`]]: t,
|
|
88
|
-
[l[`${o}__overlay--slide`]]: n
|
|
89
|
-
}),
|
|
90
|
-
style: a
|
|
91
|
-
}
|
|
92
|
-
), s && /* @__PURE__ */ i.createElement(
|
|
93
|
-
"div",
|
|
94
|
-
{
|
|
95
|
-
className: u({
|
|
96
|
-
[l[`${o}__overlay`]]: !0,
|
|
97
|
-
[l[`${o}__overlay--visible`]]: t,
|
|
98
|
-
[l[`${o}__overlay--slide`]]: n
|
|
99
|
-
}),
|
|
100
|
-
style: h
|
|
101
|
-
}
|
|
102
|
-
));
|
|
103
|
-
}, M = P;
|
|
104
|
-
class z {
|
|
105
|
-
constructor(t, n) {
|
|
106
|
-
$(this, "element");
|
|
107
|
-
$(this, "padding");
|
|
108
|
-
this.element = t, this.padding = n;
|
|
109
|
-
}
|
|
110
|
-
addPadding(t) {
|
|
111
|
-
const n = Math.round(t.left) - this.padding, s = Math.round(t.top) - this.padding, d = Math.round(t.width) + 2 * this.padding, r = Math.round(t.height) + 2 * this.padding, c = s, a = n, h = c + r, g = a + d;
|
|
112
|
-
return {
|
|
113
|
-
x: n,
|
|
114
|
-
y: s,
|
|
115
|
-
width: d,
|
|
116
|
-
height: r,
|
|
117
|
-
top: c,
|
|
118
|
-
left: a,
|
|
119
|
-
bottom: h,
|
|
120
|
-
right: g
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
getBoundingClientRect() {
|
|
124
|
-
return this.addPadding(this.element.getBoundingClientRect());
|
|
125
|
-
}
|
|
126
|
-
get clientWidth() {
|
|
127
|
-
return this.getBoundingClientRect().width;
|
|
128
|
-
}
|
|
129
|
-
get clientHeight() {
|
|
130
|
-
return this.getBoundingClientRect().height;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
const E = 8, w = "guide-tooltip", x = (e, t) => new z(e, t), q = (e) => {
|
|
134
|
-
const {
|
|
135
|
-
className: t,
|
|
136
|
-
parentElementName: n,
|
|
137
|
-
isVisible: s = !1,
|
|
138
|
-
shouldSlide: d = !0
|
|
139
|
-
} = e, [r, c] = i.useState(
|
|
140
|
-
null
|
|
141
|
-
), [a, h] = i.useState(null), [g, f] = i.useState(d), m = () => {
|
|
142
|
-
r && (h(
|
|
143
|
-
x(
|
|
144
|
-
r,
|
|
145
|
-
E
|
|
146
|
-
).getBoundingClientRect()
|
|
147
|
-
), f(!1));
|
|
148
|
-
};
|
|
149
|
-
return i.useEffect(() => {
|
|
150
|
-
if (r !== null)
|
|
151
|
-
return window.addEventListener("resize", m), window.addEventListener("scroll", m), () => {
|
|
152
|
-
window.addEventListener("resize", m), window.addEventListener("resize", m);
|
|
153
|
-
};
|
|
154
|
-
}, [r, n]), i.useEffect(() => {
|
|
155
|
-
if (n) {
|
|
156
|
-
const R = document.querySelector(n);
|
|
157
|
-
c(R);
|
|
158
|
-
}
|
|
159
|
-
}, [n]), i.useEffect(() => {
|
|
160
|
-
r && h(
|
|
161
|
-
x(
|
|
162
|
-
r,
|
|
163
|
-
E
|
|
164
|
-
).getBoundingClientRect()
|
|
165
|
-
), f(!0);
|
|
166
|
-
}, [r]), r && s ? /* @__PURE__ */ i.createElement("div", null, /* @__PURE__ */ i.createElement(
|
|
167
|
-
M,
|
|
168
|
-
{
|
|
169
|
-
gap: a,
|
|
170
|
-
isVisible: s,
|
|
171
|
-
slide: g,
|
|
172
|
-
disablePointerEvents: !0
|
|
173
|
-
}
|
|
174
|
-
), /* @__PURE__ */ i.createElement(
|
|
175
|
-
L,
|
|
176
|
-
y(_({}, e), {
|
|
177
|
-
referenceElement: {
|
|
178
|
-
getBoundingClientRect: () => a,
|
|
179
|
-
contextElement: r
|
|
180
|
-
},
|
|
181
|
-
arrowOffsetY: 25,
|
|
182
|
-
className: u({
|
|
183
|
-
[l[w]]: !0,
|
|
184
|
-
[l[`${w}--slide`]]: g,
|
|
185
|
-
className: t
|
|
186
|
-
})
|
|
187
|
-
}),
|
|
188
|
-
e.children
|
|
189
|
-
)) : null;
|
|
190
|
-
};
|
|
191
|
-
export {
|
|
192
|
-
q as UserGuide
|
|
193
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./UserGuide/index.cjs.js"),e=require("../../../chunks/Tooltip-21230071.js"),N=require("react"),v=require("@livechat/design-system-icons"),d=require("clsx"),E=require("../../Icon/index.cjs.js"),$=require("../../../chunks/Heading-597d11a4.js"),m=require("../../../chunks/Text-dd6930a2.js"),_=require("../../Button/index.cjs.js");function x(s){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const n in s)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(s,n);Object.defineProperty(l,n,r.get?r:{enumerable:!0,get:()=>s[n]})}}return l.default=s,Object.freeze(l)}const t=x(N),k=({text:s})=>t.createElement("div",null,s),o="tooltip",C=({className:s,header:l,text:n,closeWithX:r,theme:c,handleCloseAction:u})=>t.createElement("div",{className:s},r&&t.createElement("button",{type:"button","aria-label":"Close tooltip",className:e.styles[`${o}-close`],onClick:u},t.createElement(E.Icon,{source:v.Close,kind:c?e.getIconType(c):"primary"})),l&&t.createElement($.Heading,{as:"div",size:"xs",className:d(e.styles[`${o}-header`],e.styles[`${o}-header--info`])},l),t.createElement(m.Text,{as:"div",className:d(e.styles[`${o}-text`],e.styles[`${o}-text--info`])},n)),a="tooltip",T=({header:s,text:l,image:n,closeWithX:r,theme:c,handleCloseAction:u,primaryButton:y,secondaryButton:p})=>{const f=b=>b==="invert"?"secondary":"high-contrast";return t.createElement("div",{className:e.styles[`${a}__interactive`]},r&&t.createElement("button",{type:"button","aria-label":"Close tooltip",className:e.styles[`${a}-close`],onClick:u},t.createElement(E.Icon,{source:v.Close,kind:c?e.getIconType(c):"primary"})),n&&t.createElement("div",{className:e.styles[`${a}-image-container`]},t.createElement("img",{className:e.styles[`${a}-image`],src:n.src,alt:n.alt})),s&&t.createElement($.Heading,{as:"div",size:"xs",className:e.styles[`${a}-header`]},s),t.createElement("div",{className:e.styles[`${a}-text`]},l),t.createElement("div",{className:d(e.styles[`${a}-footer`],e.styles[`${a}-footer--interactive`])},t.createElement(_.Button,{kind:y.kind||f(c),onClick:y.handleClick},y.label),t.createElement(_.Button,{className:d(e.styles[`${a}-footer-secondary`],{[e.styles[`${a}-footer-secondary-invert`]]:c==="invert"}),kind:p.kind||"text",onClick:p.handleClick},p.label)))},i="reports-tooltip",I=({title:s,description:l,children:n})=>t.createElement("div",{className:e.styles[i]},t.createElement("div",{className:e.styles[`${i}__heading`]},t.createElement(m.Text,{as:"div",className:e.styles[`${i}__heading__title`]},s),t.createElement(m.Text,{as:"div",size:"xs",className:e.styles[`${i}__heading__description`]},l)),t.createElement("div",{className:e.styles[`${i}__content`]},t.createElement(m.Text,{as:"div"},n)));exports.UserGuide=g.UserGuide;exports.Info=C;exports.Interactive=T;exports.Reports=I;exports.Simple=k;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { UserGuide as P } from "./UserGuide/index.es.js";
|
|
2
|
-
import { s as t, g as f } from "../../../chunks/Tooltip-f4d8b8fd.js";
|
|
3
|
-
import * as e from "react";
|
|
4
|
-
import { Close as N } from "@livechat/design-system-icons";
|
|
5
|
-
import m from "clsx";
|
|
6
|
-
import { Icon as _ } from "../../Icon/index.es.js";
|
|
7
|
-
import { H as u } from "../../../chunks/Heading-1a31001f.js";
|
|
8
|
-
import { T as o } from "../../../chunks/Text-78b02609.js";
|
|
9
|
-
import { Button as $ } from "../../Button/index.es.js";
|
|
10
|
-
const T = ({ text: s }) => /* @__PURE__ */ e.createElement("div", null, s), c = "tooltip", H = ({ className: s, header: n, text: r, closeWithX: d, theme: l, handleCloseAction: p }) => /* @__PURE__ */ e.createElement("div", { className: s }, d && /* @__PURE__ */ e.createElement(
|
|
11
|
-
"button",
|
|
12
|
-
{
|
|
13
|
-
type: "button",
|
|
14
|
-
"aria-label": "Close tooltip",
|
|
15
|
-
className: t[`${c}-close`],
|
|
16
|
-
onClick: p
|
|
17
|
-
},
|
|
18
|
-
/* @__PURE__ */ e.createElement(_, { source: N, kind: l ? f(l) : "primary" })
|
|
19
|
-
), n && /* @__PURE__ */ e.createElement(
|
|
20
|
-
u,
|
|
21
|
-
{
|
|
22
|
-
as: "div",
|
|
23
|
-
size: "xs",
|
|
24
|
-
className: m(
|
|
25
|
-
t[`${c}-header`],
|
|
26
|
-
t[`${c}-header--info`]
|
|
27
|
-
)
|
|
28
|
-
},
|
|
29
|
-
n
|
|
30
|
-
), /* @__PURE__ */ e.createElement(
|
|
31
|
-
o,
|
|
32
|
-
{
|
|
33
|
-
as: "div",
|
|
34
|
-
className: m(
|
|
35
|
-
t[`${c}-text`],
|
|
36
|
-
t[`${c}-text--info`]
|
|
37
|
-
)
|
|
38
|
-
},
|
|
39
|
-
r
|
|
40
|
-
)), a = "tooltip", R = ({
|
|
41
|
-
header: s,
|
|
42
|
-
text: n,
|
|
43
|
-
image: r,
|
|
44
|
-
closeWithX: d,
|
|
45
|
-
theme: l,
|
|
46
|
-
handleCloseAction: p,
|
|
47
|
-
primaryButton: E,
|
|
48
|
-
secondaryButton: v
|
|
49
|
-
}) => {
|
|
50
|
-
const k = (C) => C === "invert" ? "secondary" : "high-contrast";
|
|
51
|
-
return /* @__PURE__ */ e.createElement("div", { className: t[`${a}__interactive`] }, d && /* @__PURE__ */ e.createElement(
|
|
52
|
-
"button",
|
|
53
|
-
{
|
|
54
|
-
type: "button",
|
|
55
|
-
"aria-label": "Close tooltip",
|
|
56
|
-
className: t[`${a}-close`],
|
|
57
|
-
onClick: p
|
|
58
|
-
},
|
|
59
|
-
/* @__PURE__ */ e.createElement(_, { source: N, kind: l ? f(l) : "primary" })
|
|
60
|
-
), r && /* @__PURE__ */ e.createElement("div", { className: t[`${a}-image-container`] }, /* @__PURE__ */ e.createElement(
|
|
61
|
-
"img",
|
|
62
|
-
{
|
|
63
|
-
className: t[`${a}-image`],
|
|
64
|
-
src: r.src,
|
|
65
|
-
alt: r.alt
|
|
66
|
-
}
|
|
67
|
-
)), s && /* @__PURE__ */ e.createElement(u, { as: "div", size: "xs", className: t[`${a}-header`] }, s), /* @__PURE__ */ e.createElement("div", { className: t[`${a}-text`] }, n), /* @__PURE__ */ e.createElement(
|
|
68
|
-
"div",
|
|
69
|
-
{
|
|
70
|
-
className: m(
|
|
71
|
-
t[`${a}-footer`],
|
|
72
|
-
t[`${a}-footer--interactive`]
|
|
73
|
-
)
|
|
74
|
-
},
|
|
75
|
-
/* @__PURE__ */ e.createElement(
|
|
76
|
-
$,
|
|
77
|
-
{
|
|
78
|
-
kind: E.kind || k(l),
|
|
79
|
-
onClick: E.handleClick
|
|
80
|
-
},
|
|
81
|
-
E.label
|
|
82
|
-
),
|
|
83
|
-
/* @__PURE__ */ e.createElement(
|
|
84
|
-
$,
|
|
85
|
-
{
|
|
86
|
-
className: m(t[`${a}-footer-secondary`], {
|
|
87
|
-
[t[`${a}-footer-secondary-invert`]]: l === "invert"
|
|
88
|
-
}),
|
|
89
|
-
kind: v.kind || "text",
|
|
90
|
-
onClick: v.handleClick
|
|
91
|
-
},
|
|
92
|
-
v.label
|
|
93
|
-
)
|
|
94
|
-
));
|
|
95
|
-
}, i = "reports-tooltip", D = ({
|
|
96
|
-
title: s,
|
|
97
|
-
description: n,
|
|
98
|
-
children: r
|
|
99
|
-
}) => /* @__PURE__ */ e.createElement("div", { className: t[i] }, /* @__PURE__ */ e.createElement("div", { className: t[`${i}__heading`] }, /* @__PURE__ */ e.createElement(o, { as: "div", className: t[`${i}__heading__title`] }, s), /* @__PURE__ */ e.createElement(
|
|
100
|
-
o,
|
|
101
|
-
{
|
|
102
|
-
as: "div",
|
|
103
|
-
size: "xs",
|
|
104
|
-
className: t[`${i}__heading__description`]
|
|
105
|
-
},
|
|
106
|
-
n
|
|
107
|
-
)), /* @__PURE__ */ e.createElement("div", { className: t[`${i}__content`] }, /* @__PURE__ */ e.createElement(o, { as: "div" }, r)));
|
|
108
|
-
export {
|
|
109
|
-
H as Info,
|
|
110
|
-
R as Interactive,
|
|
111
|
-
D as Reports,
|
|
112
|
-
T as Simple,
|
|
113
|
-
P as UserGuide
|
|
114
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../chunks/Tooltip-21230071.js"),e=require("./components/index.cjs.js"),t=require("./components/UserGuide/index.cjs.js");exports.Tooltip=o.Tooltip;exports.Info=e.Info;exports.Interactive=e.Interactive;exports.Reports=e.Reports;exports.Simple=e.Simple;exports.UserGuide=t.UserGuide;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { T as r } from "../../chunks/Tooltip-f4d8b8fd.js";
|
|
2
|
-
import { Info as p, Interactive as f, Reports as i, Simple as m } from "./components/index.es.js";
|
|
3
|
-
import { UserGuide as x } from "./components/UserGuide/index.es.js";
|
|
4
|
-
export {
|
|
5
|
-
p as Info,
|
|
6
|
-
f as Interactive,
|
|
7
|
-
i as Reports,
|
|
8
|
-
m as Simple,
|
|
9
|
-
r as Tooltip,
|
|
10
|
-
x as UserGuide
|
|
11
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var p=Object.defineProperty;var c=Object.getOwnPropertySymbols;var i=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var o=(e,r,t)=>r in e?p(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,u=(e,r)=>{for(var t in r||(r={}))i.call(r,t)&&o(e,t,r[t]);if(c)for(var t of c(r))s.call(r,t)&&o(e,t,r[t]);return e};var l=(e,r)=>{var t={};for(var n in e)i.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&c)for(var n of c(e))r.indexOf(n)<0&&s.call(e,n)&&(t[n]=e[n]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../../chunks/Heading-597d11a4.js"),y=require("../../chunks/Text-dd6930a2.js"),f=require("react"),m=require("clsx"),b=require("../../chunks/Typography.module-8b7171c2.js");function O(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const T=O(f),j=q=>{var a=q,{as:e="div",size:r="md",children:t,className:n}=a,d=l(a,["as","size","children","className"]);return T.createElement(e,u({className:m(b.styles[`display-${r}`],n)},d),t)};exports.Heading=g.Heading;exports.Text=y.Text;exports.Display=j;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
var x = Object.defineProperty;
|
|
2
|
-
var s = Object.getOwnPropertySymbols;
|
|
3
|
-
var p = Object.prototype.hasOwnProperty, i = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var m = (r, t, e) => t in r ? x(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e, c = (r, t) => {
|
|
5
|
-
for (var e in t || (t = {}))
|
|
6
|
-
p.call(t, e) && m(r, e, t[e]);
|
|
7
|
-
if (s)
|
|
8
|
-
for (var e of s(t))
|
|
9
|
-
i.call(t, e) && m(r, e, t[e]);
|
|
10
|
-
return r;
|
|
11
|
-
};
|
|
12
|
-
var f = (r, t) => {
|
|
13
|
-
var e = {};
|
|
14
|
-
for (var o in r)
|
|
15
|
-
p.call(r, o) && t.indexOf(o) < 0 && (e[o] = r[o]);
|
|
16
|
-
if (r != null && s)
|
|
17
|
-
for (var o of s(r))
|
|
18
|
-
t.indexOf(o) < 0 && i.call(r, o) && (e[o] = r[o]);
|
|
19
|
-
return e;
|
|
20
|
-
};
|
|
21
|
-
import { H as N } from "../../chunks/Heading-1a31001f.js";
|
|
22
|
-
import { T as $ } from "../../chunks/Text-78b02609.js";
|
|
23
|
-
import * as d from "react";
|
|
24
|
-
import n from "clsx";
|
|
25
|
-
import { s as y } from "../../chunks/Typography.module-58a031dc.js";
|
|
26
|
-
const v = (H) => {
|
|
27
|
-
var a = H, {
|
|
28
|
-
as: r = "div",
|
|
29
|
-
size: t = "md",
|
|
30
|
-
children: e,
|
|
31
|
-
className: o
|
|
32
|
-
} = a, l = f(a, [
|
|
33
|
-
"as",
|
|
34
|
-
"size",
|
|
35
|
-
"children",
|
|
36
|
-
"className"
|
|
37
|
-
]);
|
|
38
|
-
return d.createElement(
|
|
39
|
-
r,
|
|
40
|
-
c({ className: n(y[`display-${t}`], o) }, l),
|
|
41
|
-
e
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
export {
|
|
45
|
-
v as Display,
|
|
46
|
-
N as Heading,
|
|
47
|
-
$ as Text
|
|
48
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var C=require("../../assets/style-index.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react"),p=require("@livechat/design-system-icons"),q=require("clsx"),U=require("react-transition-group"),b=require("../FileUploadProgress/index.cjs.js"),n=require("../Icon/index.cjs.js"),I=require("../Progress/index.cjs.js"),S=require("../../chunks/Text-dd6930a2.js");function O(a){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const c in a)if(c!=="default"){const d=Object.getOwnPropertyDescriptor(a,c);Object.defineProperty(t,c,d.get?d:{enumerable:!0,get:()=>a[c]})}}return t.default=a,Object.freeze(t)}const e=O(T),_={"upload-bar":"lc-UploadBar-module__upload-bar___6Or8h","upload-bar__loader-test":"lc-UploadBar-module__upload-bar__loader-test___aZb2J","upload-bar--error":"lc-UploadBar-module__upload-bar--error___MzvhT","upload-bar__wrapper":"lc-UploadBar-module__upload-bar__wrapper___MAUeH","upload-bar__wrapper__header":"lc-UploadBar-module__upload-bar__wrapper__header___x9fen","upload-bar__wrapper__header__icon":"lc-UploadBar-module__upload-bar__wrapper__header__icon___Aetm5","upload-bar__wrapper__header__title":"lc-UploadBar-module__upload-bar__wrapper__header__title___BNuDu","upload-bar__wrapper__header__collapse-button":"lc-UploadBar-module__upload-bar__wrapper__header__collapse-button___3khMy","upload-bar__wrapper__header__actions-container":"lc-UploadBar-module__upload-bar__wrapper__header__actions-container___5Pj4y","upload-bar__wrapper__header__success-icon":"lc-UploadBar-module__upload-bar__wrapper__header__success-icon___ZLCdw","upload-bar__wrapper__header__error-icon":"lc-UploadBar-module__upload-bar__wrapper__header__error-icon___q-sZo","upload-bar__wrapper__header__loader":"lc-UploadBar-module__upload-bar__wrapper__header__loader___DKHu3","upload-bar__files":"lc-UploadBar-module__upload-bar__files___3W4nx","upload-bar__files--enter":"lc-UploadBar-module__upload-bar__files--enter___zGq19","upload-bar__files--enter-active":"lc-UploadBar-module__upload-bar__files--enter-active___-dMVb","upload-bar__files--exit":"lc-UploadBar-module__upload-bar__files--exit___MXBRY","upload-bar__files--exit-active":"lc-UploadBar-module__upload-bar__files--exit-active___krGW5","upload-bar__files--exit-done":"lc-UploadBar-module__upload-bar__files--exit-done___2I72G","upload-bar__files-wrapper":"lc-UploadBar-module__upload-bar__files-wrapper___93bs8","upload-bar__files__list":"lc-UploadBar-module__upload-bar__files__list___QJFEq"},r="upload-bar",l=`${r}__wrapper__header`,P=300,y=(a,t)=>a==="success"?e.createElement("div",{className:_[`${l}__success-icon`]},e.createElement(n.Icon,{source:p.Check})):a==="error"?e.createElement("div",{className:_[`${l}__error-icon`]},e.createElement(n.Icon,{source:p.Error})):e.createElement(I.ProgressCircle,{className:_[`${l}__loader`],status:a,progressValue:t}),A=({children:a,className:t,progressValue:c,title:d,isExpanded:h,errorMessage:f,status:o="normal",icon:v,size:x,mode:N="multiple",onCloseButtonClick:i,onRetryButtonClick:u})=>{const[m,$]=e.useState(h||!1),s=o==="error",B=o==="success",w=q(_[r],t,{[_[`${r}--error`]]:s,[_[`${r}--success`]]:B}),g=!(s&&(u||i)),E=()=>$(!m);return N==="single"?e.createElement("div",{className:w},e.createElement("div",{className:_[`${r}__wrapper`]},e.createElement("div",{className:_[`${l}`]},e.createElement(b.FileUploadProgress,{title:s&&f||d,progressValue:c,status:o,icon:v,size:x})),o==="error"&&e.createElement(b.FileUploadProgressActions,{status:o,onCloseButtonClick:i,onRetryButtonClick:u}))):e.createElement("div",{className:w},e.createElement("div",{className:_[`${r}__wrapper`],onClick:E},e.createElement("div",{className:_[`${l}`]},e.createElement("div",{className:_[`${l}__icon`]},y(o,c)),e.createElement("div",{className:_[`${l}__title`]},e.createElement(S.Text,{size:"sm",as:"div"},s?f:d)),g&&e.createElement("button",{className:_[`${l}__collapse-button`],type:"button",onClick:E},m?e.createElement(n.Icon,{source:p.ChevronUp}):e.createElement(n.Icon,{source:p.ChevronDown})),o==="error"&&e.createElement("div",{className:_[`${l}__actions-container`]},e.createElement(b.FileUploadProgressActions,{status:o,onCloseButtonClick:i,onRetryButtonClick:u})))),e.createElement(U.TransitionGroup,{component:null},m&&e.createElement(U.CSSTransition,{timeout:P,classNames:{enter:_[`${r}__files--enter`],enterActive:_[`${r}__files--enter-active`],exit:_[`${r}__files--exit`],exitActive:_[`${r}__files--exit-active`],exitDone:_[`${r}__files--exit-done`]}},e.createElement("div",{className:_[`${r}__files`]},e.createElement("div",{className:_[`${r}__files-wrapper`]},e.createElement("div",{className:_[`${r}__files__list`]},a))))))};exports.UploadBar=A;
|