@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,58 +0,0 @@
|
|
|
1
|
-
var G = Object.defineProperty, N = Object.defineProperties;
|
|
2
|
-
var h = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var _ = Object.getOwnPropertySymbols;
|
|
4
|
-
var d = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var c = (r, o, e) => o in r ? G(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e, p = (r, o) => {
|
|
6
|
-
for (var e in o || (o = {}))
|
|
7
|
-
d.call(o, e) && c(r, e, o[e]);
|
|
8
|
-
if (_)
|
|
9
|
-
for (var e of _(o))
|
|
10
|
-
f.call(o, e) && c(r, e, o[e]);
|
|
11
|
-
return r;
|
|
12
|
-
}, u = (r, o) => N(r, h(o));
|
|
13
|
-
var g = (r, o) => {
|
|
14
|
-
var e = {};
|
|
15
|
-
for (var m in r)
|
|
16
|
-
d.call(r, m) && o.indexOf(m) < 0 && (e[m] = r[m]);
|
|
17
|
-
if (r != null && _)
|
|
18
|
-
for (var m of _(r))
|
|
19
|
-
o.indexOf(m) < 0 && f.call(r, m) && (e[m] = r[m]);
|
|
20
|
-
return e;
|
|
21
|
-
};
|
|
22
|
-
import "../../assets/style-index22.css";
|
|
23
|
-
import * as a from "react";
|
|
24
|
-
import F from "clsx";
|
|
25
|
-
import { H as v } from "../../chunks/Heading-1a31001f.js";
|
|
26
|
-
import { T as E } from "../../chunks/Text-78b02609.js";
|
|
27
|
-
const s = {
|
|
28
|
-
"form-group": "lc-FormGroup-module__form-group___e2JHa",
|
|
29
|
-
"form-group__header": "lc-FormGroup-module__form-group__header___DgGmR",
|
|
30
|
-
"form-group__label": "lc-FormGroup-module__form-group__label___NC-JW",
|
|
31
|
-
"form-group__helper": "lc-FormGroup-module__form-group__helper___SRuxe"
|
|
32
|
-
}, l = "form-group", J = (b) => {
|
|
33
|
-
var t = b, {
|
|
34
|
-
className: r = "",
|
|
35
|
-
children: o,
|
|
36
|
-
labelText: e,
|
|
37
|
-
helperText: m
|
|
38
|
-
} = t, i = g(t, [
|
|
39
|
-
"className",
|
|
40
|
-
"children",
|
|
41
|
-
"labelText",
|
|
42
|
-
"helperText"
|
|
43
|
-
]);
|
|
44
|
-
const n = F(s[l], r);
|
|
45
|
-
return /* @__PURE__ */ a.createElement(
|
|
46
|
-
"div",
|
|
47
|
-
u(p(u(p({}, i), {
|
|
48
|
-
role: "group"
|
|
49
|
-
}), e && { "aria-label": e }), {
|
|
50
|
-
className: n
|
|
51
|
-
}),
|
|
52
|
-
/* @__PURE__ */ a.createElement("div", { className: s[`${l}__header`] }, /* @__PURE__ */ a.createElement(v, { as: "div", size: "sm", className: s[`${l}__label`] }, e), m && /* @__PURE__ */ a.createElement(E, { as: "div", size: "sm", className: s[`${l}__helper`] }, m)),
|
|
53
|
-
o
|
|
54
|
-
);
|
|
55
|
-
};
|
|
56
|
-
export {
|
|
57
|
-
J as FormGroup
|
|
58
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var h=Object.defineProperty,y=Object.defineProperties;var k=Object.getOwnPropertyDescriptors;var c=Object.getOwnPropertySymbols;var a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var t=(o,i,n)=>i in o?h(o,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):o[i]=n,_=(o,i)=>{for(var n in i||(i={}))a.call(i,n)&&t(o,n,i[n]);if(c)for(var n of c(i))s.call(i,n)&&t(o,n,i[n]);return o},r=(o,i)=>y(o,k(i));var u=(o,i)=>{var n={};for(var e in o)a.call(o,e)&&i.indexOf(e)<0&&(n[e]=o[e]);if(o!=null&&c)for(var e of c(o))i.indexOf(e)<0&&s.call(o,e)&&(n[e]=o[e]);return n};var B=require("../../assets/style-index21.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),C=require("clsx");function S(o){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const e=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(i,n,e.get?e:{enumerable:!0,get:()=>o[n]})}}return i.default=o,Object.freeze(i)}const m=S(z),j="lc-Icon-module__icon___tw31R",b={icon:j,"icon--primary":"lc-Icon-module__icon--primary___JJnBV","icon--subtle":"lc-Icon-module__icon--subtle___sZIzL","icon--inverted":"lc-Icon-module__icon--inverted___zA9QC","icon--inverted-subtle":"lc-Icon-module__icon--inverted-subtle___6UwBT","icon--link":"lc-Icon-module__icon--link___Jwkw9","icon--success":"lc-Icon-module__icon--success___MKdz3","icon--warning":"lc-Icon-module__icon--warning___5YCSW","icon--error":"lc-Icon-module__icon--error___CiJCD","icon--negative":"lc-Icon-module__icon--negative___vfgpo","icon--positive":"lc-Icon-module__icon--positive___ulUuj","icon--info":"lc-Icon-module__icon--info___Lfxfs","icon--action-primary":"lc-Icon-module__icon--action-primary___n5UhF","icon--action-negative":"lc-Icon-module__icon--action-negative___f1EPS","icon--action-positive":"lc-Icon-module__icon--action-positive___o-6Q-","icon--action-warning":"lc-Icon-module__icon--action-warning___zik06","icon--action-neutral":"lc-Icon-module__icon--action-neutral___sTHAF","icon--disabled--primary":"lc-Icon-module__icon--disabled--primary___E0nee","icon--disabled--subtle":"lc-Icon-module__icon--disabled--subtle___l-hK4","icon--disabled--inverted":"lc-Icon-module__icon--disabled--inverted___5SBAf","icon--disabled--inverted-subtle":"lc-Icon-module__icon--disabled--inverted-subtle___w-NBk","icon--disabled--link":"lc-Icon-module__icon--disabled--link___sVJOa","icon--disabled--success":"lc-Icon-module__icon--disabled--success___sG-7d","icon--disabled--warning":"lc-Icon-module__icon--disabled--warning___8ko1e","icon--disabled--error":"lc-Icon-module__icon--disabled--error___9KbVo","icon--disabled--negative":"lc-Icon-module__icon--disabled--negative___AzzCW","icon--disabled--positive":"lc-Icon-module__icon--disabled--positive___JelzZ","icon--disabled--info":"lc-Icon-module__icon--disabled--info___3xl-B","icon--disabled--action-primary":"lc-Icon-module__icon--disabled--action-primary___2k1TG","icon--disabled--action-negative":"lc-Icon-module__icon--disabled--action-negative___Oraj8","icon--disabled--action-positive":"lc-Icon-module__icon--disabled--action-positive___zaLja","icon--disabled--action-warning":"lc-Icon-module__icon--disabled--action-warning___5VvCf","icon--disabled--action-neutral":"lc-Icon-module__icon--disabled--action-neutral___SxlyC"},O={xsmall:{width:12,height:12},small:{width:16,height:16},medium:{width:20,height:20},large:{width:24,height:24},xlarge:{width:32,height:32}},I="icon",x=o=>{const d=o,{source:i,size:n="medium",kind:e,disabled:g,className:p,customColor:l}=d,v=u(d,["source","size","kind","disabled","className","customColor"]),f=m.createElement(i,_(_({},O[n]),l?{color:l}:{})),w=C(p,b[I],e&&b[`${I}--${g?"disabled--":""}${e}`]);return m.createElement("span",r(_({},v),{className:w}),f)};exports.Icon=x;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
var f = Object.defineProperty, k = Object.defineProperties;
|
|
2
|
-
var y = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var e = Object.getOwnPropertySymbols;
|
|
4
|
-
var s = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var a = (i, o, n) => o in i ? f(i, o, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[o] = n, _ = (i, o) => {
|
|
6
|
-
for (var n in o || (o = {}))
|
|
7
|
-
s.call(o, n) && a(i, n, o[n]);
|
|
8
|
-
if (e)
|
|
9
|
-
for (var n of e(o))
|
|
10
|
-
t.call(o, n) && a(i, n, o[n]);
|
|
11
|
-
return i;
|
|
12
|
-
}, r = (i, o) => k(i, y(o));
|
|
13
|
-
var m = (i, o) => {
|
|
14
|
-
var n = {};
|
|
15
|
-
for (var c in i)
|
|
16
|
-
s.call(i, c) && o.indexOf(c) < 0 && (n[c] = i[c]);
|
|
17
|
-
if (i != null && e)
|
|
18
|
-
for (var c of e(i))
|
|
19
|
-
o.indexOf(c) < 0 && t.call(i, c) && (n[c] = i[c]);
|
|
20
|
-
return n;
|
|
21
|
-
};
|
|
22
|
-
import "../../assets/style-index21.css";
|
|
23
|
-
import * as u from "react";
|
|
24
|
-
import z from "clsx";
|
|
25
|
-
const C = "lc-Icon-module__icon___tw31R", b = {
|
|
26
|
-
icon: C,
|
|
27
|
-
"icon--primary": "lc-Icon-module__icon--primary___JJnBV",
|
|
28
|
-
"icon--subtle": "lc-Icon-module__icon--subtle___sZIzL",
|
|
29
|
-
"icon--inverted": "lc-Icon-module__icon--inverted___zA9QC",
|
|
30
|
-
"icon--inverted-subtle": "lc-Icon-module__icon--inverted-subtle___6UwBT",
|
|
31
|
-
"icon--link": "lc-Icon-module__icon--link___Jwkw9",
|
|
32
|
-
"icon--success": "lc-Icon-module__icon--success___MKdz3",
|
|
33
|
-
"icon--warning": "lc-Icon-module__icon--warning___5YCSW",
|
|
34
|
-
"icon--error": "lc-Icon-module__icon--error___CiJCD",
|
|
35
|
-
"icon--negative": "lc-Icon-module__icon--negative___vfgpo",
|
|
36
|
-
"icon--positive": "lc-Icon-module__icon--positive___ulUuj",
|
|
37
|
-
"icon--info": "lc-Icon-module__icon--info___Lfxfs",
|
|
38
|
-
"icon--action-primary": "lc-Icon-module__icon--action-primary___n5UhF",
|
|
39
|
-
"icon--action-negative": "lc-Icon-module__icon--action-negative___f1EPS",
|
|
40
|
-
"icon--action-positive": "lc-Icon-module__icon--action-positive___o-6Q-",
|
|
41
|
-
"icon--action-warning": "lc-Icon-module__icon--action-warning___zik06",
|
|
42
|
-
"icon--action-neutral": "lc-Icon-module__icon--action-neutral___sTHAF",
|
|
43
|
-
"icon--disabled--primary": "lc-Icon-module__icon--disabled--primary___E0nee",
|
|
44
|
-
"icon--disabled--subtle": "lc-Icon-module__icon--disabled--subtle___l-hK4",
|
|
45
|
-
"icon--disabled--inverted": "lc-Icon-module__icon--disabled--inverted___5SBAf",
|
|
46
|
-
"icon--disabled--inverted-subtle": "lc-Icon-module__icon--disabled--inverted-subtle___w-NBk",
|
|
47
|
-
"icon--disabled--link": "lc-Icon-module__icon--disabled--link___sVJOa",
|
|
48
|
-
"icon--disabled--success": "lc-Icon-module__icon--disabled--success___sG-7d",
|
|
49
|
-
"icon--disabled--warning": "lc-Icon-module__icon--disabled--warning___8ko1e",
|
|
50
|
-
"icon--disabled--error": "lc-Icon-module__icon--disabled--error___9KbVo",
|
|
51
|
-
"icon--disabled--negative": "lc-Icon-module__icon--disabled--negative___AzzCW",
|
|
52
|
-
"icon--disabled--positive": "lc-Icon-module__icon--disabled--positive___JelzZ",
|
|
53
|
-
"icon--disabled--info": "lc-Icon-module__icon--disabled--info___3xl-B",
|
|
54
|
-
"icon--disabled--action-primary": "lc-Icon-module__icon--disabled--action-primary___2k1TG",
|
|
55
|
-
"icon--disabled--action-negative": "lc-Icon-module__icon--disabled--action-negative___Oraj8",
|
|
56
|
-
"icon--disabled--action-positive": "lc-Icon-module__icon--disabled--action-positive___zaLja",
|
|
57
|
-
"icon--disabled--action-warning": "lc-Icon-module__icon--disabled--action-warning___5VvCf",
|
|
58
|
-
"icon--disabled--action-neutral": "lc-Icon-module__icon--disabled--action-neutral___SxlyC"
|
|
59
|
-
}, x = {
|
|
60
|
-
xsmall: {
|
|
61
|
-
width: 12,
|
|
62
|
-
height: 12
|
|
63
|
-
},
|
|
64
|
-
small: {
|
|
65
|
-
width: 16,
|
|
66
|
-
height: 16
|
|
67
|
-
},
|
|
68
|
-
medium: {
|
|
69
|
-
width: 20,
|
|
70
|
-
height: 20
|
|
71
|
-
},
|
|
72
|
-
large: {
|
|
73
|
-
width: 24,
|
|
74
|
-
height: 24
|
|
75
|
-
},
|
|
76
|
-
xlarge: {
|
|
77
|
-
width: 32,
|
|
78
|
-
height: 32
|
|
79
|
-
}
|
|
80
|
-
}, I = "icon", A = (i) => {
|
|
81
|
-
const d = i, {
|
|
82
|
-
source: o,
|
|
83
|
-
size: n = "medium",
|
|
84
|
-
kind: c,
|
|
85
|
-
disabled: v,
|
|
86
|
-
className: g,
|
|
87
|
-
customColor: l
|
|
88
|
-
} = d, p = m(d, [
|
|
89
|
-
"source",
|
|
90
|
-
"size",
|
|
91
|
-
"kind",
|
|
92
|
-
"disabled",
|
|
93
|
-
"className",
|
|
94
|
-
"customColor"
|
|
95
|
-
]), w = u.createElement(o, _(_({}, x[n]), l ? { color: l } : {})), h = z(
|
|
96
|
-
g,
|
|
97
|
-
b[I],
|
|
98
|
-
c && b[`${I}--${v ? "disabled--" : ""}${c}`]
|
|
99
|
-
);
|
|
100
|
-
return /* @__PURE__ */ u.createElement("span", r(_({}, p), { className: h }), w);
|
|
101
|
-
};
|
|
102
|
-
export {
|
|
103
|
-
A as Icon
|
|
104
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var D=Object.defineProperty,Q=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var s=Object.getOwnPropertySymbols;var b=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;var I=(t,n,e)=>n in t?D(t,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[n]=e,g=(t,n)=>{for(var e in n||(n={}))b.call(n,e)&&I(t,e,n[e]);if(s)for(var e of s(n))y.call(n,e)&&I(t,e,n[e]);return t},$=(t,n)=>Q(t,T(n));var S=(t,n)=>{var e={};for(var u in t)b.call(t,u)&&n.indexOf(u)<0&&(e[u]=t[u]);if(t!=null&&s)for(var u of s(t))n.indexOf(u)<0&&y.call(t,u)&&(e[u]=t[u]);return e};var A=require("../../assets/style-index20.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("react"),O=require("@livechat/design-system-icons"),q=require("clsx"),k=require("../Button/index.cjs.js"),z=require("../Icon/index.cjs.js"),K=require("../../chunks/Text-dd6930a2.js");function M(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const u=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,u.get?u:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const _=M(X),P="lc-Input-module__input___qeMAQ",o={input:P,"input--focused":"lc-Input-module__input--focused___wQH5-","input--disabled":"lc-Input-module__input--disabled___HidXX","input--crop":"lc-Input-module__input--crop___uzJS8","input--read-only":"lc-Input-module__input--read-only___4O-G3","input--error":"lc-Input-module__input--error___DlDbC","input--xsmall":"lc-Input-module__input--xsmall___9u99K","input--compact":"lc-Input-module__input--compact___iKSQZ","input--medium":"lc-Input-module__input--medium___3BjqQ","input--large":"lc-Input-module__input--large___jX5RW","input__icon--disabled":"lc-Input-module__input__icon--disabled___XO3dc","input__icon--left":"lc-Input-module__input__icon--left___BcySs","input__icon--right":"lc-Input-module__input__icon--right___VefSK","input__visibility-button":"lc-Input-module__input__visibility-button___eWrVe"},i="input",x=(t,n)=>_.cloneElement(t.source,{"data-testid":`input-icon-${t.place}`,className:q(o[`${i}__icon`],o[`${i}__icon--${t.place}`],{[o[`${i}__icon--disabled`]]:n})}),F=_.forwardRef((H,w)=>{var d=H,{inputSize:t="medium",error:n=!1,disabled:e,icon:u=null,className:v,cropOnBlur:j=!0}=d,r=S(d,["inputSize","error","disabled","icon","className","cropOnBlur"]);const[C,m]=_.useState(!1),[f,R]=_.useState(!1),{type:l,onFocus:p,onBlur:a}=r,h=q(v,o[i],o[`${i}--${t}`],{[o[`${i}--disabled`]]:e,[o[`${i}--focused`]]:C,[o[`${i}--error`]]:n,[o[`${i}--crop`]]:j,[o[`${i}--read-only`]]:r.readOnly}),V=e?"var(--content-disabled)":"var(--content-default)",E=f?O.VisibilityOn:O.VisibilityOff,N=u&&u.place==="left",B=u&&l!=="password"&&u.place==="right";return _.createElement(K.Text,{as:"div",className:h,"aria-disabled":e,"tab-index":"0"},N&&x(u,e),_.createElement("input",$(g({},r),{ref:w,onFocus:c=>{m(!0),p==null||p(c)},onBlur:c=>{m(!1),a==null||a(c)},disabled:e,type:l&&!f?l:"text"})),B&&x(u,e),l==="password"&&_.createElement(k.Button,{disabled:e,kind:"text",size:"compact",icon:_.createElement(z.Icon,{customColor:V,source:E}),onClick:()=>R(c=>!c),className:o[`${i}__visibility-button`]}))});exports.Input=F;
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
var B = Object.defineProperty, K = Object.defineProperties;
|
|
2
|
-
var j = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var s = Object.getOwnPropertySymbols;
|
|
4
|
-
var b = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var I = (t, n, e) => n in t ? B(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e, $ = (t, n) => {
|
|
6
|
-
for (var e in n || (n = {}))
|
|
7
|
-
b.call(n, e) && I(t, e, n[e]);
|
|
8
|
-
if (s)
|
|
9
|
-
for (var e of s(n))
|
|
10
|
-
y.call(n, e) && I(t, e, n[e]);
|
|
11
|
-
return t;
|
|
12
|
-
}, x = (t, n) => K(t, j(n));
|
|
13
|
-
var g = (t, n) => {
|
|
14
|
-
var e = {};
|
|
15
|
-
for (var _ in t)
|
|
16
|
-
b.call(t, _) && n.indexOf(_) < 0 && (e[_] = t[_]);
|
|
17
|
-
if (t != null && s)
|
|
18
|
-
for (var _ of s(t))
|
|
19
|
-
n.indexOf(_) < 0 && y.call(t, _) && (e[_] = t[_]);
|
|
20
|
-
return e;
|
|
21
|
-
};
|
|
22
|
-
import "../../assets/style-index20.css";
|
|
23
|
-
import * as u from "react";
|
|
24
|
-
import { VisibilityOn as k, VisibilityOff as q } from "@livechat/design-system-icons";
|
|
25
|
-
import S from "clsx";
|
|
26
|
-
import { Button as z } from "../Button/index.es.js";
|
|
27
|
-
import { Icon as D } from "../Icon/index.es.js";
|
|
28
|
-
import { T as F } from "../../chunks/Text-78b02609.js";
|
|
29
|
-
const H = "lc-Input-module__input___qeMAQ", o = {
|
|
30
|
-
input: H,
|
|
31
|
-
"input--focused": "lc-Input-module__input--focused___wQH5-",
|
|
32
|
-
"input--disabled": "lc-Input-module__input--disabled___HidXX",
|
|
33
|
-
"input--crop": "lc-Input-module__input--crop___uzJS8",
|
|
34
|
-
"input--read-only": "lc-Input-module__input--read-only___4O-G3",
|
|
35
|
-
"input--error": "lc-Input-module__input--error___DlDbC",
|
|
36
|
-
"input--xsmall": "lc-Input-module__input--xsmall___9u99K",
|
|
37
|
-
"input--compact": "lc-Input-module__input--compact___iKSQZ",
|
|
38
|
-
"input--medium": "lc-Input-module__input--medium___3BjqQ",
|
|
39
|
-
"input--large": "lc-Input-module__input--large___jX5RW",
|
|
40
|
-
"input__icon--disabled": "lc-Input-module__input__icon--disabled___XO3dc",
|
|
41
|
-
"input__icon--left": "lc-Input-module__input__icon--left___BcySs",
|
|
42
|
-
"input__icon--right": "lc-Input-module__input__icon--right___VefSK",
|
|
43
|
-
"input__visibility-button": "lc-Input-module__input__visibility-button___eWrVe"
|
|
44
|
-
}, i = "input", C = (t, n) => u.cloneElement(t.source, {
|
|
45
|
-
"data-testid": `input-icon-${t.place}`,
|
|
46
|
-
className: S(
|
|
47
|
-
o[`${i}__icon`],
|
|
48
|
-
o[`${i}__icon--${t.place}`],
|
|
49
|
-
{
|
|
50
|
-
[o[`${i}__icon--disabled`]]: n
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
}), P = u.forwardRef(
|
|
54
|
-
(T, w) => {
|
|
55
|
-
var m = T, {
|
|
56
|
-
inputSize: t = "medium",
|
|
57
|
-
error: n = !1,
|
|
58
|
-
disabled: e,
|
|
59
|
-
icon: _ = null,
|
|
60
|
-
className: h,
|
|
61
|
-
cropOnBlur: v = !0
|
|
62
|
-
} = m, p = g(m, [
|
|
63
|
-
"inputSize",
|
|
64
|
-
"error",
|
|
65
|
-
"disabled",
|
|
66
|
-
"icon",
|
|
67
|
-
"className",
|
|
68
|
-
"cropOnBlur"
|
|
69
|
-
]);
|
|
70
|
-
const [R, d] = u.useState(!1), [f, V] = u.useState(!1), { type: c, onFocus: r, onBlur: a } = p, E = S(
|
|
71
|
-
h,
|
|
72
|
-
o[i],
|
|
73
|
-
o[`${i}--${t}`],
|
|
74
|
-
{
|
|
75
|
-
[o[`${i}--disabled`]]: e,
|
|
76
|
-
[o[`${i}--focused`]]: R,
|
|
77
|
-
[o[`${i}--error`]]: n,
|
|
78
|
-
[o[`${i}--crop`]]: v,
|
|
79
|
-
[o[`${i}--read-only`]]: p.readOnly
|
|
80
|
-
}
|
|
81
|
-
), O = e ? "var(--content-disabled)" : "var(--content-default)", N = f ? k : q, Q = _ && _.place === "left", X = _ && c !== "password" && _.place === "right";
|
|
82
|
-
return /* @__PURE__ */ u.createElement(
|
|
83
|
-
F,
|
|
84
|
-
{
|
|
85
|
-
as: "div",
|
|
86
|
-
className: E,
|
|
87
|
-
"aria-disabled": e,
|
|
88
|
-
"tab-index": "0"
|
|
89
|
-
},
|
|
90
|
-
Q && C(_, e),
|
|
91
|
-
/* @__PURE__ */ u.createElement(
|
|
92
|
-
"input",
|
|
93
|
-
x($({}, p), {
|
|
94
|
-
ref: w,
|
|
95
|
-
onFocus: (l) => {
|
|
96
|
-
d(!0), r == null || r(l);
|
|
97
|
-
},
|
|
98
|
-
onBlur: (l) => {
|
|
99
|
-
d(!1), a == null || a(l);
|
|
100
|
-
},
|
|
101
|
-
disabled: e,
|
|
102
|
-
type: c && !f ? c : "text"
|
|
103
|
-
})
|
|
104
|
-
),
|
|
105
|
-
X && C(_, e),
|
|
106
|
-
c === "password" && /* @__PURE__ */ u.createElement(
|
|
107
|
-
z,
|
|
108
|
-
{
|
|
109
|
-
disabled: e,
|
|
110
|
-
kind: "text",
|
|
111
|
-
size: "compact",
|
|
112
|
-
icon: /* @__PURE__ */ u.createElement(D, { customColor: O, source: N }),
|
|
113
|
-
onClick: () => V((l) => !l),
|
|
114
|
-
className: o[`${i}__visibility-button`]
|
|
115
|
-
}
|
|
116
|
-
)
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
);
|
|
120
|
-
export {
|
|
121
|
-
P as Input
|
|
122
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var b=Object.defineProperty;var o=Object.getOwnPropertySymbols;var i=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var r=(e,n,t)=>n in e?b(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,a=(e,n)=>{for(var t in n||(n={}))i.call(n,t)&&r(e,t,n[t]);if(o)for(var t of o(n))s.call(n,t)&&r(e,t,n[t]);return e};var u=(e,n)=>{var t={};for(var l in e)i.call(e,l)&&n.indexOf(l)<0&&(t[l]=e[l]);if(e!=null&&o)for(var l of o(e))n.indexOf(l)<0&&s.call(e,l)&&(t[l]=e[l]);return t};var j=require("../../assets/style-index19.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react"),f=require("clsx");function m(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,l.get?l:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const p=m(k),g="lc-Link-module__link___kqx52",d={link:g,"link--bold":"lc-Link-module__link--bold___1rGdO"},_="link",O=l=>{var c=l,{bold:e=!1,className:n=""}=c,t=u(c,["bold","className"]);return p.createElement("a",a({className:f(d[_],e&&d[`${_}--bold`],n)},t))};exports.Link=O;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
var d = Object.defineProperty;
|
|
2
|
-
var s = Object.getOwnPropertySymbols;
|
|
3
|
-
var c = Object.prototype.hasOwnProperty, k = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var i = (l, o, n) => o in l ? d(l, o, { enumerable: !0, configurable: !0, writable: !0, value: n }) : l[o] = n, r = (l, o) => {
|
|
5
|
-
for (var n in o || (o = {}))
|
|
6
|
-
c.call(o, n) && i(l, n, o[n]);
|
|
7
|
-
if (s)
|
|
8
|
-
for (var n of s(o))
|
|
9
|
-
k.call(o, n) && i(l, n, o[n]);
|
|
10
|
-
return l;
|
|
11
|
-
};
|
|
12
|
-
var _ = (l, o) => {
|
|
13
|
-
var n = {};
|
|
14
|
-
for (var e in l)
|
|
15
|
-
c.call(l, e) && o.indexOf(e) < 0 && (n[e] = l[e]);
|
|
16
|
-
if (l != null && s)
|
|
17
|
-
for (var e of s(l))
|
|
18
|
-
o.indexOf(e) < 0 && k.call(l, e) && (n[e] = l[e]);
|
|
19
|
-
return n;
|
|
20
|
-
};
|
|
21
|
-
import "../../assets/style-index19.css";
|
|
22
|
-
import * as b from "react";
|
|
23
|
-
import p from "clsx";
|
|
24
|
-
const f = "lc-Link-module__link___kqx52", a = {
|
|
25
|
-
link: f,
|
|
26
|
-
"link--bold": "lc-Link-module__link--bold___1rGdO"
|
|
27
|
-
}, m = "link", q = (e) => {
|
|
28
|
-
var t = e, {
|
|
29
|
-
bold: l = !1,
|
|
30
|
-
className: o = ""
|
|
31
|
-
} = t, n = _(t, [
|
|
32
|
-
"bold",
|
|
33
|
-
"className"
|
|
34
|
-
]);
|
|
35
|
-
return /* @__PURE__ */ b.createElement(
|
|
36
|
-
"a",
|
|
37
|
-
r({
|
|
38
|
-
className: p(
|
|
39
|
-
a[m],
|
|
40
|
-
l && a[`${m}--bold`],
|
|
41
|
-
o
|
|
42
|
-
)
|
|
43
|
-
}, n)
|
|
44
|
-
);
|
|
45
|
-
};
|
|
46
|
-
export {
|
|
47
|
-
q as Link
|
|
48
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var g=require("../../assets/style-index18.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),t=require("clsx"),i=require("../../chunks/Text-dd6930a2.js");function m(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const _=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(l,r,_.get?_:{enumerable:!0,get:()=>e[r]})}}return l.default=e,Object.freeze(l)}const a=m(c),u="lc-Loader-module__loader___LRflD",p="lc-Loader-module__loader__spinner___l3C1g",b="lc-Loader-module__rotate___Tlni-",f="lc-Loader-module__loader__label___R74f6",o={loader:u,loader__spinner:p,"loader__spinner--small":"lc-Loader-module__loader__spinner--small___dGFFt","loader__spinner--medium":"lc-Loader-module__loader__spinner--medium___J-ki0","loader__spinner--large":"lc-Loader-module__loader__spinner--large___Poqq7","loader__spinner-circle":"lc-Loader-module__loader__spinner-circle___ApBUO",rotate:b,loader__label:f},d="loader",n=`${d}__spinner`,L=({primaryColor:e,secondaryColor:l,label:r,className:_,size:s="medium"})=>a.createElement("div",{className:t(o[d],_)},a.createElement("div",{className:t(o[n],o[`${n}--${s}`])},a.createElement("div",{className:o["loader__spinner-circle"],style:{borderColor:l,borderTopColor:e}})),r&&a.createElement(i.Text,{as:"div",size:"md",className:o.loader__label},r));exports.Loader=L;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import "../../assets/style-index18.css";
|
|
2
|
-
import * as _ from "react";
|
|
3
|
-
import l from "clsx";
|
|
4
|
-
import { T as c } from "../../chunks/Text-78b02609.js";
|
|
5
|
-
const m = "lc-Loader-module__loader___LRflD", i = "lc-Loader-module__loader__spinner___l3C1g", p = "lc-Loader-module__rotate___Tlni-", u = "lc-Loader-module__loader__label___R74f6", e = {
|
|
6
|
-
loader: m,
|
|
7
|
-
loader__spinner: i,
|
|
8
|
-
"loader__spinner--small": "lc-Loader-module__loader__spinner--small___dGFFt",
|
|
9
|
-
"loader__spinner--medium": "lc-Loader-module__loader__spinner--medium___J-ki0",
|
|
10
|
-
"loader__spinner--large": "lc-Loader-module__loader__spinner--large___Poqq7",
|
|
11
|
-
"loader__spinner-circle": "lc-Loader-module__loader__spinner-circle___ApBUO",
|
|
12
|
-
rotate: p,
|
|
13
|
-
loader__label: u
|
|
14
|
-
}, a = "loader", o = `${a}__spinner`, C = ({
|
|
15
|
-
primaryColor: d,
|
|
16
|
-
secondaryColor: s,
|
|
17
|
-
label: r,
|
|
18
|
-
className: n,
|
|
19
|
-
size: t = "medium"
|
|
20
|
-
}) => /* @__PURE__ */ _.createElement("div", { className: l(e[a], n) }, /* @__PURE__ */ _.createElement(
|
|
21
|
-
"div",
|
|
22
|
-
{
|
|
23
|
-
className: l(e[o], e[`${o}--${t}`])
|
|
24
|
-
},
|
|
25
|
-
/* @__PURE__ */ _.createElement(
|
|
26
|
-
"div",
|
|
27
|
-
{
|
|
28
|
-
className: e["loader__spinner-circle"],
|
|
29
|
-
style: {
|
|
30
|
-
/* stylelint-disable */
|
|
31
|
-
borderColor: s,
|
|
32
|
-
borderTopColor: d
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
)
|
|
36
|
-
), r && /* @__PURE__ */ _.createElement(c, { as: "div", size: "md", className: e.loader__label }, r));
|
|
37
|
-
export {
|
|
38
|
-
C as Loader
|
|
39
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var B=Object.defineProperty;var v=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var k=(a,l,e)=>l in a?B(a,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[l]=e,u=(a,l)=>{for(var e in l||(l={}))x.call(l,e)&&k(a,e,l[e]);if(v)for(var e of v(l))H.call(l,e)&&k(a,e,l[e]);return a};var E=(a,l)=>{var e={};for(var o in a)x.call(a,o)&&l.indexOf(o)<0&&(e[o]=a[o]);if(a!=null&&v)for(var o of v(a))l.indexOf(o)<0&&H.call(a,o)&&(e[o]=a[o]);return e};var X=require("../../assets/style-index17.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("react"),y=require("clsx"),C=require("../../chunks/Heading-597d11a4.js"),O=require("../../chunks/Text-dd6930a2.js"),z=require("@floating-ui/react"),D=require("../../chunks/keyCodes-c4c35e49.js"),F=require("@livechat/design-system-icons"),K=require("../Button/index.cjs.js"),S=require("../Icon/index.cjs.js"),P=require("react-dom"),R=require("@emotion/css"),I=require("../Avatar/index.cjs.js");function T(a){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(l,e,o.get?o:{enumerable:!0,get:()=>a[e]})}}return l.default=a,Object.freeze(l)}const t=T(j),w=T(P),A="lc-Modal-module__modal__body___M-jmN",G="lc-Modal-module__modal__header___Fp5VE",U="lc-Modal-module__modal__heading___G9KVK",V="lc-Modal-module__modal__footer___2LYdc",d={"modal-base":"lc-Modal-module__modal-base___hbL1U","modal-base--full-space":"lc-Modal-module__modal-base--full-space___KcGFL","modal-base__overlay":"lc-Modal-module__modal-base__overlay___kCQ8t","modal-base__overlay--visible":"lc-Modal-module__modal-base__overlay--visible___zUNJL","modal-base__overlay--labelled":"lc-Modal-module__modal-base__overlay--labelled___THAo-","modal-base__close":"lc-Modal-module__modal-base__close___gJlgr","modal-base__close--label-type":"lc-Modal-module__modal-base__close--label-type___Om0Vb",modal__body:A,modal__header:G,"modal__label-header":"lc-Modal-module__modal__label-header___ZPtEy",modal__heading:U,"modal__label-heading":"lc-Modal-module__modal__label-heading___WnYcF",modal__footer:V},b="modal-base",L=$=>{var f=$,{children:a,className:l="",onClose:e,closeOnEscPress:o=!0,closeOnOverlayPress:_=!0,fullSpaceContent:s,isLabelled:r}=f,M=E(f,["children","className","onClose","closeOnEscPress","closeOnOverlayPress","fullSpaceContent","isLabelled"]);const g=y(d[b],l,s&&d[`${b}--full-space`]);t.useEffect(()=>{if(!o)return;const c=h=>{h.key===D.KeyCodes.esc&&e()};return document.addEventListener("keyup",c,!0),()=>document.removeEventListener("keyup",c,!0)},[o]);const p=c=>{_&&c.target===c.currentTarget&&e()};return t.createElement(z.FloatingOverlay,{"data-testid":"lc-modal-overlay",onMouseDown:p,className:y(d[`${b}__overlay`],d[`${b}__overlay--visible`],r&&d[`${b}__overlay--labelled`])},t.createElement("div",u({role:"dialog","aria-modal":!0,className:g},M),a))},N=({labelType:a,customColor:l,onClick:e})=>t.createElement(K.Button,{type:"button",kind:"plain","aria-label":"Close modal",title:"Close modal",className:y(d["modal-base__close"],a&&d["modal-base__close--label-type"]),onClick:e,icon:t.createElement(S.Icon,{source:F.Close,size:"medium",customColor:l})}),n="modal",J=f=>{var g=f,{children:a,className:l="",heading:e,labelHeading:o,fullSpaceContent:_,footer:s,onClose:r,contentClassName:M}=g,$=E(g,["children","className","heading","labelHeading","fullSpaceContent","footer","onClose","contentClassName"]);const p=y(d[n],l),c=typeof a=="string",h=q=>{q.preventDefault(),q.stopPropagation(),r()};return t.createElement(L,u({className:p,fullSpaceContent:_,onClose:r,isLabelled:!!o},$),o&&t.createElement("div",{className:d[`${n}__label-header`]},t.createElement(C.Heading,{size:"md",as:"div",className:d[`${n}__label-heading`]},o),t.createElement(N,{labelType:!!o,customColor:"var(--color-white)",onClick:h})),!o&&e&&t.createElement("div",{className:d[`${n}__header`]},t.createElement(C.Heading,{size:"md",as:"div",className:d[`${n}__heading`]},e),t.createElement(N,{onClick:h})),t.createElement("div",{"data-testid":"modal-body",className:y(d[`${n}__body`],M)},c?t.createElement(O.Text,{as:"div"},a):a),s&&t.createElement("div",{className:d[`${n}__footer`]},s))},Y=({children:a,className:l="",parentElementName:e="body",zIndex:o})=>{const[_]=t.useState(()=>document.createElement("div"));return l&&_.classList.add(l),o&&(_.style.zIndex=o.toString()),t.useEffect(()=>{var s;return(s=document.querySelector(e))==null||s.appendChild(_),()=>{var r;(r=document.querySelector(e))==null||r.removeChild(_)}},[e]),t.createElement(t.Fragment,null,w.createPortal(a,_))},m={"modal-header":"lc-ModalHeader-module__modal-header___xk3bd","modal-header__heading-left-node":"lc-ModalHeader-module__modal-header__heading-left-node___1--G5","modal-header__heading-body":"lc-ModalHeader-module__modal-header__heading-body___HHEF-","modal-header__heading-title":"lc-ModalHeader-module__modal-header__heading-title___2R9pm","modal-header__heading-description":"lc-ModalHeader-module__modal-header__heading-description___54Xvf"},i="modal-header",Q=({title:a,iconProps:l,avatarProps:e,children:o,className:_=""})=>{const s=R.cx(m[i],_);return t.createElement("div",{className:s},l&&t.createElement(S.Icon,u({className:m[`${i}__heading-left-node`]},l)),e&&t.createElement(I.Avatar,u({className:m[`${i}__heading-left-node`]},e)),t.createElement("div",{className:m[`${i}__heading-body`]},t.createElement(C.Heading,{as:"div",size:"md",className:m[`${i}__heading-title`]},a),o&&t.createElement(O.Text,{as:"div",className:m[`${i}__heading-description`]},o)))};exports.Modal=J;exports.ModalBase=L;exports.ModalCloseButton=N;exports.ModalHeader=Q;exports.ModalPortal=Y;
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
var T = Object.defineProperty;
|
|
2
|
-
var p = Object.getOwnPropertySymbols;
|
|
3
|
-
var L = Object.prototype.hasOwnProperty, x = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var k = (a, l, e) => l in a ? T(a, l, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[l] = e, u = (a, l) => {
|
|
5
|
-
for (var e in l || (l = {}))
|
|
6
|
-
L.call(l, e) && k(a, e, l[e]);
|
|
7
|
-
if (p)
|
|
8
|
-
for (var e of p(l))
|
|
9
|
-
x.call(l, e) && k(a, e, l[e]);
|
|
10
|
-
return a;
|
|
11
|
-
};
|
|
12
|
-
var M = (a, l) => {
|
|
13
|
-
var e = {};
|
|
14
|
-
for (var _ in a)
|
|
15
|
-
L.call(a, _) && l.indexOf(_) < 0 && (e[_] = a[_]);
|
|
16
|
-
if (a != null && p)
|
|
17
|
-
for (var _ of p(a))
|
|
18
|
-
l.indexOf(_) < 0 && x.call(a, _) && (e[_] = a[_]);
|
|
19
|
-
return e;
|
|
20
|
-
};
|
|
21
|
-
import "../../assets/style-index17.css";
|
|
22
|
-
import * as o from "react";
|
|
23
|
-
import h from "clsx";
|
|
24
|
-
import { H as C } from "../../chunks/Heading-1a31001f.js";
|
|
25
|
-
import { T as F } from "../../chunks/Text-78b02609.js";
|
|
26
|
-
import { FloatingOverlay as z } from "@floating-ui/react";
|
|
27
|
-
import { K as B } from "../../chunks/keyCodes-30323e90.js";
|
|
28
|
-
import { Close as S } from "@livechat/design-system-icons";
|
|
29
|
-
import { Button as D } from "../Button/index.es.js";
|
|
30
|
-
import { Icon as K } from "../Icon/index.es.js";
|
|
31
|
-
import * as G from "react-dom";
|
|
32
|
-
import { cx as O } from "@emotion/css";
|
|
33
|
-
import { Avatar as R } from "../Avatar/index.es.js";
|
|
34
|
-
const U = "lc-Modal-module__modal__body___M-jmN", V = "lc-Modal-module__modal__header___Fp5VE", q = "lc-Modal-module__modal__heading___G9KVK", w = "lc-Modal-module__modal__footer___2LYdc", d = {
|
|
35
|
-
"modal-base": "lc-Modal-module__modal-base___hbL1U",
|
|
36
|
-
"modal-base--full-space": "lc-Modal-module__modal-base--full-space___KcGFL",
|
|
37
|
-
"modal-base__overlay": "lc-Modal-module__modal-base__overlay___kCQ8t",
|
|
38
|
-
"modal-base__overlay--visible": "lc-Modal-module__modal-base__overlay--visible___zUNJL",
|
|
39
|
-
"modal-base__overlay--labelled": "lc-Modal-module__modal-base__overlay--labelled___THAo-",
|
|
40
|
-
"modal-base__close": "lc-Modal-module__modal-base__close___gJlgr",
|
|
41
|
-
"modal-base__close--label-type": "lc-Modal-module__modal-base__close--label-type___Om0Vb",
|
|
42
|
-
modal__body: U,
|
|
43
|
-
modal__header: V,
|
|
44
|
-
"modal__label-header": "lc-Modal-module__modal__label-header___ZPtEy",
|
|
45
|
-
modal__heading: q,
|
|
46
|
-
"modal__label-heading": "lc-Modal-module__modal__label-heading___WnYcF",
|
|
47
|
-
modal__footer: w
|
|
48
|
-
}, b = "modal-base", A = ($) => {
|
|
49
|
-
var g = $, {
|
|
50
|
-
children: a,
|
|
51
|
-
className: l = "",
|
|
52
|
-
onClose: e,
|
|
53
|
-
closeOnEscPress: _ = !0,
|
|
54
|
-
closeOnOverlayPress: t = !0,
|
|
55
|
-
fullSpaceContent: m,
|
|
56
|
-
isLabelled: s
|
|
57
|
-
} = g, v = M(g, [
|
|
58
|
-
"children",
|
|
59
|
-
"className",
|
|
60
|
-
"onClose",
|
|
61
|
-
"closeOnEscPress",
|
|
62
|
-
"closeOnOverlayPress",
|
|
63
|
-
"fullSpaceContent",
|
|
64
|
-
"isLabelled"
|
|
65
|
-
]);
|
|
66
|
-
const y = h(
|
|
67
|
-
d[b],
|
|
68
|
-
l,
|
|
69
|
-
m && d[`${b}--full-space`]
|
|
70
|
-
);
|
|
71
|
-
o.useEffect(() => {
|
|
72
|
-
if (!_)
|
|
73
|
-
return;
|
|
74
|
-
const r = (f) => {
|
|
75
|
-
f.key === B.esc && e();
|
|
76
|
-
};
|
|
77
|
-
return document.addEventListener("keyup", r, !0), () => document.removeEventListener("keyup", r, !0);
|
|
78
|
-
}, [_]);
|
|
79
|
-
const E = (r) => {
|
|
80
|
-
t && r.target === r.currentTarget && e();
|
|
81
|
-
};
|
|
82
|
-
return /* @__PURE__ */ o.createElement(
|
|
83
|
-
z,
|
|
84
|
-
{
|
|
85
|
-
"data-testid": "lc-modal-overlay",
|
|
86
|
-
onMouseDown: E,
|
|
87
|
-
className: h(
|
|
88
|
-
d[`${b}__overlay`],
|
|
89
|
-
d[`${b}__overlay--visible`],
|
|
90
|
-
s && d[`${b}__overlay--labelled`]
|
|
91
|
-
)
|
|
92
|
-
},
|
|
93
|
-
/* @__PURE__ */ o.createElement(
|
|
94
|
-
"div",
|
|
95
|
-
u({
|
|
96
|
-
role: "dialog",
|
|
97
|
-
"aria-modal": !0,
|
|
98
|
-
className: y
|
|
99
|
-
}, v),
|
|
100
|
-
a
|
|
101
|
-
)
|
|
102
|
-
);
|
|
103
|
-
}, H = ({
|
|
104
|
-
labelType: a,
|
|
105
|
-
customColor: l,
|
|
106
|
-
onClick: e
|
|
107
|
-
}) => /* @__PURE__ */ o.createElement(
|
|
108
|
-
D,
|
|
109
|
-
{
|
|
110
|
-
type: "button",
|
|
111
|
-
kind: "plain",
|
|
112
|
-
"aria-label": "Close modal",
|
|
113
|
-
title: "Close modal",
|
|
114
|
-
className: h(
|
|
115
|
-
d["modal-base__close"],
|
|
116
|
-
a && d["modal-base__close--label-type"]
|
|
117
|
-
),
|
|
118
|
-
onClick: e,
|
|
119
|
-
icon: /* @__PURE__ */ o.createElement(K, { source: S, size: "medium", customColor: l })
|
|
120
|
-
}
|
|
121
|
-
), c = "modal", oe = (g) => {
|
|
122
|
-
var y = g, {
|
|
123
|
-
children: a,
|
|
124
|
-
className: l = "",
|
|
125
|
-
heading: e,
|
|
126
|
-
labelHeading: _,
|
|
127
|
-
fullSpaceContent: t,
|
|
128
|
-
footer: m,
|
|
129
|
-
onClose: s,
|
|
130
|
-
contentClassName: v
|
|
131
|
-
} = y, $ = M(y, [
|
|
132
|
-
"children",
|
|
133
|
-
"className",
|
|
134
|
-
"heading",
|
|
135
|
-
"labelHeading",
|
|
136
|
-
"fullSpaceContent",
|
|
137
|
-
"footer",
|
|
138
|
-
"onClose",
|
|
139
|
-
"contentClassName"
|
|
140
|
-
]);
|
|
141
|
-
const E = h(d[c], l), r = typeof a == "string", f = (N) => {
|
|
142
|
-
N.preventDefault(), N.stopPropagation(), s();
|
|
143
|
-
};
|
|
144
|
-
return /* @__PURE__ */ o.createElement(
|
|
145
|
-
A,
|
|
146
|
-
u({
|
|
147
|
-
className: E,
|
|
148
|
-
fullSpaceContent: t,
|
|
149
|
-
onClose: s,
|
|
150
|
-
isLabelled: !!_
|
|
151
|
-
}, $),
|
|
152
|
-
_ && /* @__PURE__ */ o.createElement("div", { className: d[`${c}__label-header`] }, /* @__PURE__ */ o.createElement(
|
|
153
|
-
C,
|
|
154
|
-
{
|
|
155
|
-
size: "md",
|
|
156
|
-
as: "div",
|
|
157
|
-
className: d[`${c}__label-heading`]
|
|
158
|
-
},
|
|
159
|
-
_
|
|
160
|
-
), /* @__PURE__ */ o.createElement(
|
|
161
|
-
H,
|
|
162
|
-
{
|
|
163
|
-
labelType: !!_,
|
|
164
|
-
customColor: "var(--color-white)",
|
|
165
|
-
onClick: f
|
|
166
|
-
}
|
|
167
|
-
)),
|
|
168
|
-
!_ && e && /* @__PURE__ */ o.createElement("div", { className: d[`${c}__header`] }, /* @__PURE__ */ o.createElement(
|
|
169
|
-
C,
|
|
170
|
-
{
|
|
171
|
-
size: "md",
|
|
172
|
-
as: "div",
|
|
173
|
-
className: d[`${c}__heading`]
|
|
174
|
-
},
|
|
175
|
-
e
|
|
176
|
-
), /* @__PURE__ */ o.createElement(H, { onClick: f })),
|
|
177
|
-
/* @__PURE__ */ o.createElement(
|
|
178
|
-
"div",
|
|
179
|
-
{
|
|
180
|
-
"data-testid": "modal-body",
|
|
181
|
-
className: h(d[`${c}__body`], v)
|
|
182
|
-
},
|
|
183
|
-
r ? /* @__PURE__ */ o.createElement(F, { as: "div" }, a) : a
|
|
184
|
-
),
|
|
185
|
-
m && /* @__PURE__ */ o.createElement("div", { className: d[`${c}__footer`] }, m)
|
|
186
|
-
);
|
|
187
|
-
}, _e = ({
|
|
188
|
-
children: a,
|
|
189
|
-
className: l = "",
|
|
190
|
-
parentElementName: e = "body",
|
|
191
|
-
zIndex: _
|
|
192
|
-
}) => {
|
|
193
|
-
const [t] = o.useState(() => document.createElement("div"));
|
|
194
|
-
return l && t.classList.add(l), _ && (t.style.zIndex = _.toString()), o.useEffect(() => {
|
|
195
|
-
var m;
|
|
196
|
-
return (m = document.querySelector(e)) == null || m.appendChild(t), () => {
|
|
197
|
-
var s;
|
|
198
|
-
(s = document.querySelector(e)) == null || s.removeChild(t);
|
|
199
|
-
};
|
|
200
|
-
}, [e]), /* @__PURE__ */ o.createElement(o.Fragment, null, G.createPortal(a, t));
|
|
201
|
-
}, n = {
|
|
202
|
-
"modal-header": "lc-ModalHeader-module__modal-header___xk3bd",
|
|
203
|
-
"modal-header__heading-left-node": "lc-ModalHeader-module__modal-header__heading-left-node___1--G5",
|
|
204
|
-
"modal-header__heading-body": "lc-ModalHeader-module__modal-header__heading-body___HHEF-",
|
|
205
|
-
"modal-header__heading-title": "lc-ModalHeader-module__modal-header__heading-title___2R9pm",
|
|
206
|
-
"modal-header__heading-description": "lc-ModalHeader-module__modal-header__heading-description___54Xvf"
|
|
207
|
-
}, i = "modal-header", de = ({
|
|
208
|
-
title: a,
|
|
209
|
-
iconProps: l,
|
|
210
|
-
avatarProps: e,
|
|
211
|
-
children: _,
|
|
212
|
-
className: t = ""
|
|
213
|
-
}) => {
|
|
214
|
-
const m = O(n[i], t);
|
|
215
|
-
return /* @__PURE__ */ o.createElement("div", { className: m }, l && /* @__PURE__ */ o.createElement(
|
|
216
|
-
K,
|
|
217
|
-
u({
|
|
218
|
-
className: n[`${i}__heading-left-node`]
|
|
219
|
-
}, l)
|
|
220
|
-
), e && /* @__PURE__ */ o.createElement(
|
|
221
|
-
R,
|
|
222
|
-
u({
|
|
223
|
-
className: n[`${i}__heading-left-node`]
|
|
224
|
-
}, e)
|
|
225
|
-
), /* @__PURE__ */ o.createElement("div", { className: n[`${i}__heading-body`] }, /* @__PURE__ */ o.createElement(
|
|
226
|
-
C,
|
|
227
|
-
{
|
|
228
|
-
as: "div",
|
|
229
|
-
size: "md",
|
|
230
|
-
className: n[`${i}__heading-title`]
|
|
231
|
-
},
|
|
232
|
-
a
|
|
233
|
-
), _ && /* @__PURE__ */ o.createElement(
|
|
234
|
-
F,
|
|
235
|
-
{
|
|
236
|
-
as: "div",
|
|
237
|
-
className: n[`${i}__heading-description`]
|
|
238
|
-
},
|
|
239
|
-
_
|
|
240
|
-
)));
|
|
241
|
-
};
|
|
242
|
-
export {
|
|
243
|
-
oe as Modal,
|
|
244
|
-
A as ModalBase,
|
|
245
|
-
H as ModalCloseButton,
|
|
246
|
-
de as ModalHeader,
|
|
247
|
-
_e as ModalPortal
|
|
248
|
-
};
|