@livechat/design-system-react-components 1.16.9 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/assets/ProgressBar.css +1 -0
- package/dist/assets/Tooltip.css +1 -0
- package/dist/assets/Typography.css +1 -0
- package/dist/assets/index.css +1 -0
- package/dist/assets/index10.css +1 -0
- package/dist/assets/index11.css +1 -0
- package/dist/assets/index12.css +1 -0
- package/dist/assets/index13.css +1 -0
- package/dist/assets/index14.css +1 -0
- package/dist/assets/index15.css +1 -0
- package/dist/assets/index16.css +1 -0
- package/dist/assets/index17.css +1 -0
- package/dist/assets/index18.css +1 -0
- package/dist/assets/index19.css +1 -0
- package/dist/assets/index2.css +1 -0
- package/dist/assets/index20.css +1 -0
- package/dist/assets/index21.css +1 -0
- package/dist/assets/index22.css +1 -0
- package/dist/assets/index23.css +1 -0
- package/dist/assets/index24.css +1 -0
- package/dist/assets/index25.css +1 -0
- package/dist/assets/index26.css +1 -0
- package/dist/assets/index27.css +1 -0
- package/dist/assets/index28.css +1 -0
- package/dist/assets/index29.css +1 -0
- package/dist/assets/index3.css +1 -0
- package/dist/assets/index30.css +1 -0
- package/dist/assets/index31.css +1 -0
- package/dist/assets/index32.css +1 -0
- package/dist/assets/index33.css +1 -0
- package/dist/assets/index34.css +1 -0
- package/dist/assets/index35.css +1 -0
- package/dist/assets/index36.css +1 -0
- package/dist/assets/index37.css +1 -0
- package/dist/assets/index38.css +1 -0
- package/dist/assets/index39.css +1 -0
- package/dist/assets/index4.css +1 -0
- package/dist/assets/index5.css +1 -0
- package/dist/assets/index6.css +1 -0
- package/dist/assets/index7.css +1 -0
- package/dist/assets/index8.css +1 -0
- package/dist/assets/index9.css +1 -0
- package/dist/chunks/Heading-075c4b09.js +64 -0
- package/dist/chunks/Heading-35451be0.js +1 -0
- package/dist/chunks/ProgressBar-45af3224.js +1 -0
- package/dist/chunks/ProgressBar-6af9d43b.js +88 -0
- package/dist/chunks/Text-cf7d33c8.js +66 -0
- package/dist/chunks/Text-fcac11f3.js +1 -0
- package/dist/chunks/Tooltip-9f31882b.js +1 -0
- package/dist/chunks/Tooltip-aed3eb5a.js +182 -0
- package/dist/chunks/Typography.module-75af45f8.js +1 -0
- package/dist/chunks/Typography.module-c8ea07e3.js +24 -0
- package/dist/chunks/keyCodes-30323e90.js +15 -0
- package/dist/chunks/keyCodes-c4c35e49.js +1 -0
- package/dist/components/ActionBar/index.cjs.js +1 -0
- package/dist/components/ActionBar/index.es.js +188 -0
- package/dist/components/ActionMenu/index.cjs.js +1 -0
- package/dist/components/ActionMenu/index.es.js +199 -0
- package/dist/components/Alert/index.cjs.js +1 -0
- package/dist/components/Alert/index.es.js +128 -0
- package/dist/components/Avatar/index.cjs.js +1 -0
- package/dist/components/Avatar/index.es.js +190 -0
- package/dist/components/Badge/index.cjs.js +1 -0
- package/dist/components/Badge/index.es.js +66 -0
- package/dist/components/Button/index.cjs.js +1 -0
- package/dist/components/Button/index.es.js +142 -0
- package/dist/components/Card/index.cjs.js +1 -0
- package/dist/components/Card/index.es.js +95 -0
- package/dist/components/Checkbox/index.cjs.js +1 -0
- package/dist/components/Checkbox/index.es.js +64 -0
- package/dist/components/DatePicker/index.cjs.js +1 -0
- package/dist/components/DatePicker/index.es.js +517 -0
- package/dist/components/DetailsCard/index.cjs.js +1 -0
- package/dist/components/DetailsCard/index.es.js +138 -0
- package/dist/components/DetailsCardInfo/index.cjs.js +1 -0
- package/dist/components/DetailsCardInfo/index.es.js +13 -0
- package/dist/components/FieldDescription/index.cjs.js +1 -0
- package/dist/components/FieldDescription/index.es.js +41 -0
- package/dist/components/FieldError/index.cjs.js +1 -0
- package/dist/components/FieldError/index.es.js +51 -0
- package/dist/components/FieldGroup/index.cjs.js +1 -0
- package/dist/components/FieldGroup/index.es.js +55 -0
- package/dist/components/FileUploadProgress/index.cjs.js +1 -0
- package/dist/components/FileUploadProgress/index.es.js +109 -0
- package/dist/components/Form/index.cjs.js +1 -0
- package/dist/components/Form/index.es.js +50 -0
- package/dist/components/FormField/index.cjs.js +1 -0
- package/dist/components/FormField/index.es.js +114 -0
- package/dist/components/FormGroup/index.cjs.js +1 -0
- package/dist/components/FormGroup/index.es.js +58 -0
- package/dist/components/Icon/index.cjs.js +1 -0
- package/dist/components/Icon/index.es.js +104 -0
- package/dist/components/Input/index.cjs.js +1 -0
- package/dist/components/Input/index.es.js +122 -0
- package/dist/components/Link/index.cjs.js +1 -0
- package/dist/components/Link/index.es.js +48 -0
- package/dist/components/Loader/index.cjs.js +1 -0
- package/dist/components/Loader/index.es.js +39 -0
- package/dist/components/Modal/index.cjs.js +1 -0
- package/dist/components/Modal/index.es.js +248 -0
- package/dist/components/NumericInput/index.cjs.js +1 -0
- package/dist/components/NumericInput/index.es.js +140 -0
- package/dist/components/Picker/index.cjs.js +1 -0
- package/dist/components/Picker/index.es.js +738 -0
- package/dist/components/Popover/index.cjs.js +1 -0
- package/dist/components/Popover/index.es.js +75 -0
- package/dist/components/Progress/index.cjs.js +1 -0
- package/dist/components/Progress/index.es.js +104 -0
- package/dist/components/PromoBanner/index.cjs.js +1 -0
- package/dist/components/PromoBanner/index.es.js +73 -0
- package/dist/components/PromoBannerV2/index.cjs.js +1 -0
- package/dist/components/PromoBannerV2/index.es.js +77 -0
- package/dist/components/RadioButton/index.cjs.js +1 -0
- package/dist/components/RadioButton/index.es.js +58 -0
- package/dist/components/Search/index.cjs.js +1 -0
- package/dist/components/Search/index.es.js +117 -0
- package/dist/components/SegmentedControl/index.cjs.js +1 -0
- package/dist/components/SegmentedControl/index.es.js +53 -0
- package/dist/components/Switch/index.cjs.js +1 -0
- package/dist/components/Switch/index.es.js +144 -0
- package/dist/components/Tab/Tab.d.ts +1 -1
- package/dist/components/Tab/index.cjs.js +1 -0
- package/dist/components/Tab/index.es.js +93 -0
- package/dist/components/Tag/index.cjs.js +1 -0
- package/dist/components/Tag/index.es.js +143 -0
- package/dist/components/TagInput/index.cjs.js +1 -0
- package/dist/components/TagInput/index.es.js +241 -0
- package/dist/components/Textarea/index.cjs.js +1 -0
- package/dist/components/Textarea/index.es.js +55 -0
- package/dist/components/Toast/index.cjs.js +1 -0
- package/dist/components/Toast/index.es.js +162 -0
- package/dist/components/Tooltip/components/UserGuide/index.cjs.js +1 -0
- package/dist/components/Tooltip/components/UserGuide/index.es.js +193 -0
- package/dist/components/Tooltip/components/index.cjs.js +1 -0
- package/dist/components/Tooltip/components/index.es.js +114 -0
- package/dist/components/Tooltip/index.cjs.js +1 -0
- package/dist/components/Tooltip/index.es.js +11 -0
- package/dist/components/Typography/index.cjs.js +1 -0
- package/dist/components/Typography/index.es.js +48 -0
- package/dist/components/UploadBar/index.cjs.js +1 -0
- package/dist/components/UploadBar/index.es.js +111 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.es.js +465 -0
- package/dist/preview-stats.json +852 -852
- package/dist/style.css +1 -1
- package/dist/utils/index.cjs.js +1 -0
- package/dist/utils/index.es.js +4 -0
- package/package.json +15 -10
- package/dist/components/ActionBar/ActionBar.spec.d.ts +0 -1
- package/dist/components/ActionBar/ActionBar.stories.d.ts +0 -10
- package/dist/components/ActionMenu/ActionMenu.spec.d.ts +0 -1
- package/dist/components/ActionMenu/ActionMenu.stories.d.ts +0 -12
- package/dist/components/Alert/Alert.spec.d.ts +0 -1
- package/dist/components/Alert/Alert.stories.d.ts +0 -9
- package/dist/components/Avatar/Avatar.helpers.spec.d.ts +0 -1
- package/dist/components/Avatar/Avatar.spec.d.ts +0 -1
- package/dist/components/Avatar/Avatar.stories.d.ts +0 -22
- package/dist/components/Badge/Badge.spec.d.ts +0 -1
- package/dist/components/Badge/Badge.stories.d.ts +0 -12
- package/dist/components/Button/Button.spec.d.ts +0 -1
- package/dist/components/Button/Button.stories.d.ts +0 -43
- package/dist/components/Card/Card.spec.d.ts +0 -1
- package/dist/components/Card/Card.stories.d.ts +0 -11
- package/dist/components/Checkbox/Checkbox.spec.d.ts +0 -1
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -13
- package/dist/components/DatePicker/DatePicker.spec.d.ts +0 -1
- package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -7
- package/dist/components/DatePicker/RangeDatePicker.spec.d.ts +0 -1
- package/dist/components/DatePicker/RangeDatePicker.stories.d.ts +0 -4
- package/dist/components/DetailsCard/DetailsCard.spec.d.ts +0 -1
- package/dist/components/DetailsCard/DetailsCard.stories.d.ts +0 -17
- package/dist/components/FieldGroup/FieldGroup.spec.d.ts +0 -1
- package/dist/components/FieldGroup/FieldGroup.stories.d.ts +0 -10
- package/dist/components/FileUploadProgress/FileUploadProgress.stories.d.ts +0 -7
- package/dist/components/Form/Form.spec.d.ts +0 -1
- package/dist/components/Form/Form.stories.d.ts +0 -8
- package/dist/components/FormField/FormField.spec.d.ts +0 -1
- package/dist/components/FormField/FormField.stories.d.ts +0 -9
- package/dist/components/FormGroup/FormGroup.spec.d.ts +0 -1
- package/dist/components/FormGroup/FormGroup.stories.d.ts +0 -10
- package/dist/components/Icon/Icon.stories.d.ts +0 -15
- package/dist/components/Input/Input.spec.d.ts +0 -1
- package/dist/components/Input/Input.stories.d.ts +0 -10
- package/dist/components/Link/Link.stories.d.ts +0 -12
- package/dist/components/Loader/Loader.spec.d.ts +0 -1
- package/dist/components/Loader/Loader.stories.d.ts +0 -10
- package/dist/components/Modal/Modal.spec.d.ts +0 -1
- package/dist/components/Modal/Modal.stories.d.ts +0 -14
- package/dist/components/Modal/components/ModalBase.spec.d.ts +0 -1
- package/dist/components/NumericInput/NumericInput.spec.d.ts +0 -1
- package/dist/components/NumericInput/NumericInput.stories.d.ts +0 -20
- package/dist/components/Picker/Picker.spec.d.ts +0 -1
- package/dist/components/Picker/Picker.stories.d.ts +0 -11
- package/dist/components/Picker/components/PickerList.spec.d.ts +0 -1
- package/dist/components/Picker/components/PickerTrigger.spec.d.ts +0 -1
- package/dist/components/Picker/components/PickerTriggerBody.spec.d.ts +0 -1
- package/dist/components/Popover/Popover.spec.d.ts +0 -1
- package/dist/components/Popover/Popover.stories.d.ts +0 -16
- package/dist/components/Progress/ProgressBar.spec.d.ts +0 -1
- package/dist/components/Progress/ProgressBar.stories.d.ts +0 -12
- package/dist/components/Progress/ProgressCircle.spec.d.ts +0 -1
- package/dist/components/Progress/ProgressCircle.stories.d.ts +0 -12
- package/dist/components/PromoBanner/PromoBanner.spec.d.ts +0 -1
- package/dist/components/PromoBanner/PromoBanner.stories.d.ts +0 -11
- package/dist/components/PromoBannerV2/PromoBannerV2.spec.d.ts +0 -1
- package/dist/components/PromoBannerV2/PromoBannerV2.stories.d.ts +0 -51
- package/dist/components/RadioButton/RadioButton.spec.d.ts +0 -1
- package/dist/components/RadioButton/RadioButton.stories.d.ts +0 -13
- package/dist/components/Search/Search.spec.d.ts +0 -1
- package/dist/components/Search/Search.stories.d.ts +0 -19
- package/dist/components/SegmentedControl/SegmentedControl.spec.d.ts +0 -1
- package/dist/components/SegmentedControl/SegmentedControl.stories.d.ts +0 -9
- package/dist/components/Switch/Switch.spec.d.ts +0 -1
- package/dist/components/Switch/Switch.stories.d.ts +0 -11
- package/dist/components/Tab/Tab.spec.d.ts +0 -1
- package/dist/components/Tab/Tab.stories.d.ts +0 -11
- package/dist/components/Tab/TabsWrapper.spec.d.ts +0 -1
- package/dist/components/Tab/TabsWrapper.stories.d.ts +0 -18
- package/dist/components/Tag/Tag.spec.d.ts +0 -1
- package/dist/components/Tag/Tag.stories.d.ts +0 -26
- package/dist/components/TagInput/TagInput.spec.d.ts +0 -1
- package/dist/components/TagInput/TagInput.stories.d.ts +0 -10
- package/dist/components/Textarea/Textarea.spec.d.ts +0 -1
- package/dist/components/Textarea/Textarea.stories.d.ts +0 -7
- package/dist/components/Toast/Toast.spec.d.ts +0 -1
- package/dist/components/Toast/Toast.stories.d.ts +0 -14
- package/dist/components/Toast/ToastWrapper.spec.d.ts +0 -1
- package/dist/components/Toast/ToastWrapper.stories.d.ts +0 -34
- package/dist/components/Tooltip/Tooltip.spec.d.ts +0 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -52
- package/dist/components/UploadBar/UploadBar.stories.d.ts +0 -7
- package/dist/dsrc.cjs.js +0 -1
- package/dist/dsrc.es.js +0 -5235
- package/dist/stories/components/BlockColumns/BlockColumns.d.ts +0 -8
- package/dist/stories/components/StoryDescriptor.d.ts +0 -7
- package/dist/stories/components/Table/Table.d.ts +0 -13
- package/dist/stories/foundations/Color/ColorTable.d.ts +0 -7
- package/dist/stories/foundations/Color/constants.d.ts +0 -2
- package/dist/stories/foundations/Color/data.d.ts +0 -7
- package/dist/stories/foundations/Color/helpers.d.ts +0 -2
- package/dist/stories/foundations/Color/types.d.ts +0 -43
- package/dist/stories/foundations/Radius/RadiusTable.d.ts +0 -7
- package/dist/stories/foundations/Radius/constants.d.ts +0 -2
- package/dist/stories/foundations/Radius/types.d.ts +0 -8
- package/dist/stories/foundations/Shadow/ShadowTable.d.ts +0 -7
- package/dist/stories/foundations/Shadow/constants.d.ts +0 -2
- package/dist/stories/foundations/Shadow/types.d.ts +0 -6
- package/dist/stories/foundations/Spacing/SpacingTable.d.ts +0 -7
- package/dist/stories/foundations/Spacing/constants.d.ts +0 -2
- package/dist/stories/foundations/Spacing/types.d.ts +0 -7
- package/dist/stories/foundations/Transition/TransitionTable.d.ts +0 -7
- package/dist/stories/foundations/Transition/components/TransitionDelayExample.d.ts +0 -2
- package/dist/stories/foundations/Transition/components/TransitionDurationExample.d.ts +0 -2
- package/dist/stories/foundations/Transition/components/TransitionTimingExample.d.ts +0 -2
- package/dist/stories/foundations/Transition/constants.d.ts +0 -4
- package/dist/stories/foundations/Transition/types.d.ts +0 -16
- package/dist/stories/foundations/Typography/components/DisplayExamples.d.ts +0 -2
- package/dist/stories/foundations/Typography/components/HeadingExamples.d.ts +0 -2
- package/dist/stories/foundations/Typography/components/TextExamples.d.ts +0 -2
- package/dist/stories/helpers.d.ts +0 -6
- package/dist/test/setup.d.ts +0 -0
- package/dist/test/utils.d.ts +0 -3
|
@@ -0,0 +1,55 @@
|
|
|
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/index3.css";
|
|
23
|
+
import * as o from "react";
|
|
24
|
+
import N from "clsx";
|
|
25
|
+
import { T as O } from "../../chunks/Text-cf7d33c8.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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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/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-fcac11f3.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;
|
|
@@ -0,0 +1,162 @@
|
|
|
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/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-cf7d33c8.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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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-9f31882b.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;
|
|
@@ -0,0 +1,193 @@
|
|
|
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-aed3eb5a.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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("./UserGuide/index.cjs.js"),e=require("../../../chunks/Tooltip-9f31882b.js"),N=require("react"),v=require("@livechat/design-system-icons"),d=require("clsx"),E=require("../../Icon/index.cjs.js"),$=require("../../../chunks/Heading-35451be0.js"),m=require("../../../chunks/Text-fcac11f3.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;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { UserGuide as P } from "./UserGuide/index.es.js";
|
|
2
|
+
import { s as t, g as f } from "../../../chunks/Tooltip-aed3eb5a.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-075c4b09.js";
|
|
8
|
+
import { T as o } from "../../../chunks/Text-cf7d33c8.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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../chunks/Tooltip-9f31882b.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;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { T as r } from "../../chunks/Tooltip-aed3eb5a.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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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-35451be0.js"),y=require("../../chunks/Text-fcac11f3.js"),f=require("react"),m=require("clsx"),b=require("../../chunks/Typography.module-75af45f8.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;
|
|
@@ -0,0 +1,48 @@
|
|
|
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-075c4b09.js";
|
|
22
|
+
import { T as $ } from "../../chunks/Text-cf7d33c8.js";
|
|
23
|
+
import * as d from "react";
|
|
24
|
+
import n from "clsx";
|
|
25
|
+
import { s as y } from "../../chunks/Typography.module-c8ea07e3.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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var C=require("../../assets/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-fcac11f3.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;
|