@bikdotai/bik-component-library 0.0.512-beta.3 → 0.0.512-beta.ai-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/assets/icons/halfRectangle.svg.js +1 -1
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/SingleDate.js +1 -1
- package/dist/cjs/components/QueryBuilder/components/Connectors/Components/TwoDate.js +1 -1
- package/dist/cjs/components/SearchFilter/components/DatePickerButton.js +1 -1
- package/dist/cjs/components/SearchFilter/components/DateRangeOnlyButton.js +1 -1
- package/dist/cjs/components/TypographyStyle.d.ts +17 -0
- package/dist/cjs/components/TypographyStyle.js +77 -14
- package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
- package/dist/cjs/components/button/Button.js +1 -1
- package/dist/cjs/components/button/model.d.ts +1 -1
- package/dist/cjs/components/button/themes.d.ts +2 -2
- package/dist/cjs/components/button/themes.js +1 -1
- package/dist/cjs/components/custom-date-time/DateSelector/DateSelector.js +1 -1
- package/dist/cjs/components/datePicker/DatePickerWrapper.d.ts +2 -1
- package/dist/cjs/components/datePicker/DatePickerWrapper.js +1 -1
- package/dist/cjs/components/datePicker/index.d.ts +0 -1
- package/dist/cjs/components/dropdown/Dropdown.js +1 -1
- package/dist/cjs/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/cjs/components/dropdown/type.d.ts +0 -1
- package/dist/cjs/components/icon-button/IconButton.styled.js +1 -1
- package/dist/cjs/components/icon-button/model.d.ts +1 -1
- package/dist/cjs/components/icon-button/theme.js +1 -1
- package/dist/cjs/components/input/Input.d.ts +0 -1
- package/dist/cjs/components/input/Input.js +1 -1
- package/dist/cjs/components/input/Input.styled.js +1 -1
- package/dist/cjs/components/states/StateComponent.d.ts +0 -2
- package/dist/cjs/components/states/StateComponent.js +1 -1
- package/dist/cjs/components/states/StateComponent.styled.d.ts +1 -4
- package/dist/cjs/components/states/StateComponent.styled.js +6 -6
- package/dist/cjs/components/states-modal/StateModalComponent.d.ts +0 -2
- package/dist/cjs/components/states-modal/StateModalComponent.js +1 -1
- package/dist/cjs/components/stepper/Stepper.d.ts +0 -2
- package/dist/cjs/components/stepper/Stepper.js +1 -1
- package/dist/cjs/components/stepper/Stepper.styled.d.ts +0 -1
- package/dist/cjs/components/stepper/Stepper.styled.js +7 -7
- package/dist/cjs/components/tag/Tag.js +1 -1
- package/dist/cjs/components/tag/Tag.styled.js +1 -1
- package/dist/cjs/components/tag/model.d.ts +11 -1
- package/dist/cjs/components/tag/model.js +1 -1
- package/dist/cjs/components/tag/themes.d.ts +1 -1
- package/dist/cjs/components/tag/themes.js +1 -1
- package/dist/cjs/components/template-preview/EmailTemplatePreview.styled.js +14 -16
- package/dist/cjs/components/template-preview/WhatsApp/ChatUI.style.js +13 -13
- package/dist/cjs/hooks/useOutside.d.ts +1 -1
- package/dist/cjs/hooks/useOutside.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/assets/icons/halfRectangle.svg.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleDate.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/TwoDate.js +1 -1
- package/dist/esm/components/SearchFilter/components/DatePickerButton.js +1 -1
- package/dist/esm/components/SearchFilter/components/DateRangeOnlyButton.js +1 -1
- package/dist/esm/components/TypographyStyle.d.ts +17 -0
- package/dist/esm/components/TypographyStyle.js +146 -83
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
- package/dist/esm/components/button/Button.js +1 -1
- package/dist/esm/components/button/model.d.ts +1 -1
- package/dist/esm/components/button/themes.d.ts +2 -2
- package/dist/esm/components/button/themes.js +1 -1
- package/dist/esm/components/custom-date-time/DateSelector/DateSelector.js +1 -1
- package/dist/esm/components/datePicker/DatePickerWrapper.d.ts +2 -1
- package/dist/esm/components/datePicker/DatePickerWrapper.js +1 -1
- package/dist/esm/components/datePicker/index.d.ts +0 -1
- package/dist/esm/components/dropdown/Dropdown.js +1 -1
- package/dist/esm/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/esm/components/dropdown/type.d.ts +0 -1
- package/dist/esm/components/icon-button/IconButton.styled.js +1 -1
- package/dist/esm/components/icon-button/model.d.ts +1 -1
- package/dist/esm/components/icon-button/theme.js +1 -1
- package/dist/esm/components/input/Input.d.ts +0 -1
- package/dist/esm/components/input/Input.js +1 -1
- package/dist/esm/components/input/Input.styled.js +1 -1
- package/dist/esm/components/states/StateComponent.d.ts +0 -2
- package/dist/esm/components/states/StateComponent.js +1 -1
- package/dist/esm/components/states/StateComponent.styled.d.ts +1 -4
- package/dist/esm/components/states/StateComponent.styled.js +6 -6
- package/dist/esm/components/states-modal/StateModalComponent.d.ts +0 -2
- package/dist/esm/components/states-modal/StateModalComponent.js +1 -1
- package/dist/esm/components/stepper/Stepper.d.ts +0 -2
- package/dist/esm/components/stepper/Stepper.js +1 -1
- package/dist/esm/components/stepper/Stepper.styled.d.ts +0 -1
- package/dist/esm/components/stepper/Stepper.styled.js +6 -6
- package/dist/esm/components/tag/Tag.js +1 -1
- package/dist/esm/components/tag/Tag.styled.js +1 -1
- package/dist/esm/components/tag/model.d.ts +11 -1
- package/dist/esm/components/tag/model.js +1 -1
- package/dist/esm/components/tag/themes.d.ts +1 -1
- package/dist/esm/components/tag/themes.js +1 -1
- package/dist/esm/components/template-preview/EmailTemplatePreview.styled.js +0 -2
- package/dist/esm/components/template-preview/WhatsApp/ChatUI.style.js +18 -18
- package/dist/esm/hooks/useOutside.d.ts +1 -1
- package/dist/esm/hooks/useOutside.js +1 -1
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r
|
|
1
|
+
"use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r=e(require("react"));function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}var o=e=>r.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 8 8"},e),t||(t=r.createElement("path",{fill:"currentColor",d:"M8 0H0l8 8V0Z"})));exports.default=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("../../../../datePicker/DatePickerWrapper.js");const a=a=>{let{val:s,onChange:i,nativeID:n,disabled:l}=a;const d=Array.isArray(s)?new Date(null==s?void 0:s[0]):s;return t.useEffect((()=>{d||i(new Date((new Date).setHours(0,0,0,0)))}),[]),e.jsx("div",Object.assign({style:{position:"relative",width:200}},{children:e.jsx(r.default,{maxDate:new Date,pickerStyles:{zIndex:3},disabled:l,val:d,onChange:i})}))};exports.default=t=>e.jsx(a,Object.assign({},t));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),a=require("../../../../datePicker/DatePickerWrapper.js");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),a=require("../../../../datePicker/DatePickerWrapper.js");const s=s=>{let{val:r,onChange:n,disabled:i}=s;return t.useEffect((()=>{if(!r){const e=new Date((new Date).setHours(0,0,0,0)),t=new Date(new Date((new Date).setHours(23,59,59,999)).setDate((new Date).getDate()+1));t.setDate(e.getDate()+1),n([e,t])}}),[]),e.jsx("div",Object.assign({style:{position:"relative"}},{children:e.jsx(a.default,{maxDate:new Date,pickerStyles:{zIndex:3},disabled:i,val:r,onChange:n,calendarProps:{selectRange:!0}})}))};exports.default=t=>e.jsx(s,Object.assign({},t));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),i=require("react"),r=require("../../datePicker/DatePicker.js"),n=require("../../input/Input.js"),a=require("../../input/context/InputStyleProvider.js"),s=require("../../tag/Tag.js"),o=require("../../../constants/Theme.js"),l=require("../../../assets/icons/chevronDown.svg.js"),c=require("../../../assets/icons/chevronDownOutline.svg.js");const u=u=>{var d,g,{text:p,onSelect:h,variant:v}=u,x=e.__rest(u,["text","onSelect","variant"]);const[j,S]=i.useState(!1),[y,D]=i.useState(null),q=(null===(d=x.width)||void 0===d?void 0:d.toString())?null===(g=x.width)||void 0===g?void 0:g.toString():y?12*(null==y?void 0:y.toDateString().length)+"px":12*p.length+"px";return t.jsxs("div",Object.assign({style:{position:"relative"}},{children:[t.jsx("div",Object.assign({onClick:()=>S((e=>!e)),style:{cursor:"pointer",width:"100%",height:"100%"}},{children:"small"===v?t.jsx(s.Tag,{tagText:y?y.toDateString():null!=p?p:"",theme:"light",type:"neutral",variant:"regular",TrailingIcon:c.default}):t.jsx(a.InputStyleContext.Provider,Object.assign({value:{InputWrapper:{height:32,width:"100%",zIndex:1,cursor:"pointer",padding:"6px 8px",backgroundColor:"#fff"},RootContainer:{opacity:1},input:{minHeight:"100%"}}},{children:t.jsx(n.Input,{state:"disabled",value:y?y.toDateString():void 0,variant:"small",placeholder:null!=p?p:"Select a date",width:q,onChangeText:()=>{},rightIcon:{icon:()=>t.jsx(l.default,{style:{transform:j?"rotate(180deg)":"rotate(0deg)"},onClick:()=>{},width:20,height:20,color:o.DEFAULT_THEME.colorsV2.content.primary})}})}))})),j&&t.jsx("div",Object.assign({style:{position:"absolute",top:"calc(100% + 8px)"}},{children:t.jsx(r.DatePicker,{selectRange:!1,onSelectDate:e=>{D(e),S(!1),h(e)}})}))]}))};u.displayName="DatePickerButton",exports.DatePickerButton=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),n=require("react"),i=require("../../datePicker/DatePicker.js"),r=require("../../input/Input.js"),a=require("../../input/context/InputStyleProvider.js"),o=require("../../tag/Tag.js"),l=require("../../../constants/Theme.js"),s=require("../../../assets/icons/chevronDown.svg.js"),u=require("../../../assets/icons/chevronDownOutline.svg.js");const c=c=>{var d,g,h,{text:p,onSelect:v,variant:x}=c,j=e.__rest(c,["text","onSelect","variant"]);const[S,y]=n.useState(!1),[D,q]=n.useState(null),b=(null===(d=j.width)||void 0===d?void 0:d.toString())?null===(g=j.width)||void 0===g?void 0:g.toString():D?12*(null===(h=D[0])||void 0===h?void 0:h.toDateString().length)*2+"px":12*p.length+"px";return t.jsxs("div",Object.assign({style:{position:"relative"}},{children:[t.jsx("div",Object.assign({onClick:()=>y((e=>!e)),style:{cursor:"pointer",width:"100%",height:"100%"}},{children:"small"===x?t.jsx(o.Tag,{tagText:(null==D?void 0:D.length)?`${D[0].toDateString()} - ${D[1].toDateString()}`:null!=p?p:"",theme:"light",type:"neutral",variant:"regular",TrailingIcon:u.default}):t.jsx(a.InputStyleContext.Provider,Object.assign({value:{InputWrapper:{height:32,width:"100%",zIndex:1,cursor:"pointer",padding:"6px 8px",backgroundColor:"#fff"},RootContainer:{opacity:1},input:{minHeight:"100%"}}},{children:t.jsx(r.Input,{state:"disabled",value:(null==D?void 0:D.length)?`${D[0].toDateString()} - ${D[1].toDateString()}`:null!=p?p:"",variant:"small",placeholder:null!=p?p:"Select a date",width:b,onChangeText:()=>{},rightIcon:{icon:()=>t.jsx(s.default,{style:{transform:S?"rotate(180deg)":"rotate(0deg)"},onClick:()=>{},width:20,height:20,color:l.DEFAULT_THEME.colorsV2.content.primary})}})}))})),S&&t.jsx("div",Object.assign({style:{position:"absolute",top:"calc(100% + 8px)"}},{children:t.jsx(i.DatePicker,{selectRange:!0,onSelectRange:(e,t)=>{q([e,t]),y(!1),v([e,t])}})}))]}))};c.displayName="DateRangeOnlyButton",exports.DateRangeOnlyButton=c;
|
|
@@ -34,6 +34,11 @@ export declare const BodySecondary: import("styled-components").StyledComponent<
|
|
|
34
34
|
numberOfLines?: number | undefined;
|
|
35
35
|
color?: string | undefined;
|
|
36
36
|
}, never>;
|
|
37
|
+
export declare const ButtonRegularAI: import("styled-components").StyledComponent<"div", any, {
|
|
38
|
+
numberOfLines?: number | undefined;
|
|
39
|
+
color?: string | undefined;
|
|
40
|
+
disabled?: boolean | undefined;
|
|
41
|
+
}, never>;
|
|
37
42
|
export declare const BodyPrimaryLink: import("styled-components").StyledComponent<"div", any, {
|
|
38
43
|
numberOfLines?: number | undefined;
|
|
39
44
|
color?: string | undefined;
|
|
@@ -46,14 +51,26 @@ export declare const BodyCaption: import("styled-components").StyledComponent<"d
|
|
|
46
51
|
numberOfLines?: number | undefined;
|
|
47
52
|
color?: string | undefined;
|
|
48
53
|
}, never>;
|
|
54
|
+
export declare const AiBodyCaption: import("styled-components").StyledComponent<"div", any, {
|
|
55
|
+
numberOfLines?: number | undefined;
|
|
56
|
+
color?: string | undefined;
|
|
57
|
+
}, never>;
|
|
49
58
|
export declare const BodyTiny: import("styled-components").StyledComponent<"div", any, {
|
|
50
59
|
numberOfLines?: number | undefined;
|
|
51
60
|
color?: string | undefined;
|
|
52
61
|
}, never>;
|
|
62
|
+
export declare const AiBodyTiny: import("styled-components").StyledComponent<"div", any, {
|
|
63
|
+
numberOfLines?: number | undefined;
|
|
64
|
+
color?: string | undefined;
|
|
65
|
+
}, never>;
|
|
53
66
|
export declare const ButtonLarge: import("styled-components").StyledComponent<"div", any, {
|
|
54
67
|
numberOfLines?: number | undefined;
|
|
55
68
|
color?: string | undefined;
|
|
56
69
|
}, never>;
|
|
70
|
+
export declare const ButtonLargeAI: import("styled-components").StyledComponent<"div", any, {
|
|
71
|
+
numberOfLines?: number | undefined;
|
|
72
|
+
color?: string | undefined;
|
|
73
|
+
}, never>;
|
|
57
74
|
export declare const ButtonRegular: import("styled-components").StyledComponent<"div", any, {
|
|
58
75
|
numberOfLines?: number | undefined;
|
|
59
76
|
color?: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../constants/Theme.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(e);const n=e=>e+"px",
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../constants/Theme.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(e);const n=e=>e+"px",r=o.default.div`
|
|
2
2
|
font-family: Inter;
|
|
3
3
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
4
4
|
font-weight: ${t.FONTS.titleLarge.fontWeight};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
overflow: hidden;
|
|
9
9
|
display: -webkit-box;
|
|
10
10
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
11
|
-
`,
|
|
11
|
+
`,l=o.default.div`
|
|
12
12
|
font-family: Inter;
|
|
13
13
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
14
14
|
font-weight: ${t.FONTS.titleMedium.fontWeight};
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
overflow: hidden;
|
|
59
59
|
display: -webkit-box;
|
|
60
60
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
61
|
-
`,
|
|
61
|
+
`,c=o.default.div`
|
|
62
62
|
font-family: Inter;
|
|
63
63
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
64
64
|
font-weight: ${t.FONTS.bodyPrimary.fontWeight};
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
overflow: hidden;
|
|
69
69
|
display: -webkit-box;
|
|
70
70
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
71
|
-
`,
|
|
71
|
+
`,g=o.default.div`
|
|
72
72
|
font-family: Inter;
|
|
73
73
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
74
74
|
font-weight: ${t.FONTS.bodyPrimary.fontWeight};
|
|
@@ -78,7 +78,17 @@
|
|
|
78
78
|
overflow: hidden;
|
|
79
79
|
display: -webkit-box;
|
|
80
80
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
81
|
-
`,
|
|
81
|
+
`,O=o.default.div`
|
|
82
|
+
font-family: Inter;
|
|
83
|
+
color: ${e=>e.color||t.COLORS.text.primary};
|
|
84
|
+
font-weight: ${t.FONTS.bodySecondary.fontWeight};
|
|
85
|
+
font-size: ${n(t.FONTS.bodySecondary.fontSize)};
|
|
86
|
+
line-height: ${n(t.FONTS.bodySecondary.lineHeight)};
|
|
87
|
+
-webkit-box-orient: vertical;
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
display: -webkit-box;
|
|
90
|
+
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
91
|
+
`,h=o.default.div`
|
|
82
92
|
font-family: Inter;
|
|
83
93
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
84
94
|
font-weight: ${t.FONTS.bodySecondary.fontWeight};
|
|
@@ -88,12 +98,18 @@
|
|
|
88
98
|
overflow: hidden;
|
|
89
99
|
display: -webkit-box;
|
|
90
100
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
91
|
-
|
|
101
|
+
z-index: 1;
|
|
102
|
+
background: linear-gradient(93deg, #ff166a 0.37%, #fb5f08 100%);
|
|
103
|
+
-webkit-background-clip: text;
|
|
104
|
+
-webkit-text-fill-color: transparent;
|
|
105
|
+
background-clip: text;
|
|
106
|
+
text-fill-color: transparent;
|
|
107
|
+
`,p=o.default(g)`
|
|
92
108
|
text-decoration: underline;
|
|
93
109
|
color: ${t.COLORS.content.brand};
|
|
94
110
|
text-decoration-color: ${t.COLORS.content.brand};
|
|
95
111
|
cursor: pointer;
|
|
96
|
-
`,
|
|
112
|
+
`,S=o.default(O)`
|
|
97
113
|
text-decoration: underline;
|
|
98
114
|
color: ${t.COLORS.content.brand};
|
|
99
115
|
text-decoration-color: ${t.COLORS.content.brand};
|
|
@@ -108,7 +124,23 @@
|
|
|
108
124
|
overflow: hidden;
|
|
109
125
|
display: -webkit-box;
|
|
110
126
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
111
|
-
`,
|
|
127
|
+
`,s=o.default.div`
|
|
128
|
+
font-family: Inter;
|
|
129
|
+
color: ${e=>e.color||t.COLORS.text.primary};
|
|
130
|
+
font-weight: ${t.FONTS.caption.fontWeight};
|
|
131
|
+
font-size: ${n(t.FONTS.caption.fontSize)};
|
|
132
|
+
line-height: ${n(t.FONTS.caption.lineHeight)};
|
|
133
|
+
-webkit-box-orient: vertical;
|
|
134
|
+
overflow: hidden;
|
|
135
|
+
display: -webkit-box;
|
|
136
|
+
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
137
|
+
z-index: 1;
|
|
138
|
+
background: linear-gradient(93deg, #ff166a 0.37%, #fb5f08 100%);
|
|
139
|
+
-webkit-background-clip: text;
|
|
140
|
+
-webkit-text-fill-color: transparent;
|
|
141
|
+
background-clip: text;
|
|
142
|
+
text-fill-color: transparent;
|
|
143
|
+
`,w=o.default.div`
|
|
112
144
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
113
145
|
font-weight: ${t.FONTS.tiny.fontWeight};
|
|
114
146
|
font-size: ${n(t.FONTS.tiny.fontSize)};
|
|
@@ -117,7 +149,22 @@
|
|
|
117
149
|
overflow: hidden;
|
|
118
150
|
display: -webkit-box;
|
|
119
151
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
120
|
-
`,
|
|
152
|
+
`,x=o.default.div`
|
|
153
|
+
color: ${e=>e.color||t.COLORS.text.primary};
|
|
154
|
+
font-weight: ${t.FONTS.tiny.fontWeight};
|
|
155
|
+
font-size: ${n(t.FONTS.tiny.fontSize)};
|
|
156
|
+
line-height: ${n(t.FONTS.tiny.lineHeight)};
|
|
157
|
+
-webkit-box-orient: vertical;
|
|
158
|
+
overflow: hidden;
|
|
159
|
+
display: -webkit-box;
|
|
160
|
+
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
161
|
+
z-index: 1;
|
|
162
|
+
background: linear-gradient(93deg, #ff166a 0.37%, #fb5f08 100%);
|
|
163
|
+
-webkit-background-clip: text;
|
|
164
|
+
-webkit-text-fill-color: transparent;
|
|
165
|
+
background-clip: text;
|
|
166
|
+
text-fill-color: transparent;
|
|
167
|
+
`,$=o.default.div`
|
|
121
168
|
font-family: Inter;
|
|
122
169
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
123
170
|
font-weight: ${t.FONTS.buttonLarge.fontWeight};
|
|
@@ -127,7 +174,23 @@
|
|
|
127
174
|
overflow: hidden;
|
|
128
175
|
display: -webkit-box;
|
|
129
176
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
130
|
-
|
|
177
|
+
`,u=o.default.div`
|
|
178
|
+
font-family: Inter;
|
|
179
|
+
color: ${e=>e.color||t.COLORS.text.primary};
|
|
180
|
+
font-weight: ${t.FONTS.buttonLarge.fontWeight};
|
|
181
|
+
font-size: ${n(t.FONTS.buttonLarge.fontSize)};
|
|
182
|
+
line-height: ${n(t.FONTS.buttonLarge.lineHeight)};
|
|
183
|
+
-webkit-box-orient: vertical;
|
|
184
|
+
overflow: hidden;
|
|
185
|
+
display: -webkit-box;
|
|
186
|
+
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
187
|
+
background: linear-gradient(93deg, #ff166a 0.37%, #fb5f08 100%);
|
|
188
|
+
z-index: 1;
|
|
189
|
+
-webkit-background-clip: text;
|
|
190
|
+
-webkit-text-fill-color: transparent;
|
|
191
|
+
background-clip: text;
|
|
192
|
+
text-fill-color: transparent;
|
|
193
|
+
`,m=o.default.div`
|
|
131
194
|
font-family: Inter;
|
|
132
195
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
133
196
|
font-weight: ${t.FONTS.buttonRegular.fontWeight};
|
|
@@ -137,7 +200,7 @@
|
|
|
137
200
|
overflow: hidden;
|
|
138
201
|
display: -webkit-box;
|
|
139
202
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
140
|
-
`,
|
|
203
|
+
`,k=o.default.div`
|
|
141
204
|
font-family: Inter;
|
|
142
205
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
143
206
|
font-weight: ${t.FONTS.subHeading.fontWeight};
|
|
@@ -147,7 +210,7 @@
|
|
|
147
210
|
overflow: hidden;
|
|
148
211
|
display: -webkit-box;
|
|
149
212
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
150
|
-
`,
|
|
213
|
+
`,T=o.default.div`
|
|
151
214
|
font-family: Inter;
|
|
152
215
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
153
216
|
font-weight: ${t.FONTS.bodyRegular.fontWeight};
|
|
@@ -157,7 +220,7 @@
|
|
|
157
220
|
overflow: hidden;
|
|
158
221
|
display: -webkit-box;
|
|
159
222
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
160
|
-
`,
|
|
223
|
+
`,v=o.default.div`
|
|
161
224
|
font-family: Inter;
|
|
162
225
|
color: ${t.COLORS.text.primary};
|
|
163
226
|
font-weight: ${t.FONTS.caption.fontWeight};
|
|
@@ -167,4 +230,4 @@
|
|
|
167
230
|
overflow: hidden;
|
|
168
231
|
display: -webkit-box;
|
|
169
232
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
170
|
-
`;exports.BodyCaption=y,exports.BodyLarge=
|
|
233
|
+
`;exports.AiBodyCaption=s,exports.AiBodyTiny=x,exports.BodyCaption=y,exports.BodyLarge=c,exports.BodyPrimary=g,exports.BodyPrimaryLink=p,exports.BodyRegular=T,exports.BodySecondary=O,exports.BodySecondaryLink=S,exports.BodyTiny=w,exports.ButtonLarge=$,exports.ButtonLargeAI=u,exports.ButtonRegular=m,exports.ButtonRegularAI=h,exports.Caption=v,exports.Display=b,exports.SmallRegular=a,exports.SubHeading=k,exports.TitleLarge=r,exports.TitleMedium=l,exports.TitleRegular=f,exports.TitleSmall=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react"),t=require("react-bootstrap"),n=require("../../constants/Theme.js"),s=require("../datePicker/DatePicker.js")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("react"),t=require("react-bootstrap"),n=require("../../constants/Theme.js"),s=require("../datePicker/DatePicker.js"),i=require("../TypographyStyle.js"),l=require("./CommonStyles.js");const a=o=>{let{eachOption:t,selectedOption:s,selectedDate:a,onClickingEachItem:c,rangeSelection:r}=o;return e.jsxs(l.ItemMenuContainer,Object.assign({onClick:()=>c(t),isSelected:t.isCustom?t.key==(null==s?void 0:s.key)&&!!a:t.key==(null==s?void 0:s.key)},{children:[e.jsx(i.BodySecondary,Object.assign({color:t.key==(null==s?void 0:s.key)?n.BASE_COLORS.positive[900]:n.BASE_COLORS.grayscale[900]},{children:t.label})),a&&(null==s?void 0:s.isCustom)&&t.key==(null==s?void 0:s.key)&&e.jsx(i.BodyCaption,{children:r?`${d(a[0])} to ${d(a[1])}`:`${d(a[0])}`})]}),t.key)},d=e=>e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});exports.AnalyticsDropdown=c=>{let{options:r,placeholder:u="Select an option",selected:p,onOptionSelected:g,resetDropdown:v,maxHeight:m,backgroundColor:O,calendarPopperConfig:j,variant:D="default",datePickerPlacement:y,closeDropdown:S}=c;var b,h,x;const[f,k]=o.useState(!1),[w,C]=o.useState(p),[R,E]=o.useState(),[T,A]=o.useState(!1),M=()=>{!f&&A(!T)},[q,P]=o.useState(p),$="small"===D?i.Caption:i.BodySecondary;return o.useEffect((()=>{v&&C(void 0)}),[v]),o.useEffect((()=>{var e;(null==p?void 0:p.isCustom)&&(null===(e=p.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?E(p.dateRangeSelectionOptions.selectedDates):E(void 0),C(p)}),[p]),o.useEffect((()=>{A(!1),k(!1)}),[S]),e.jsx(e.Fragment,{children:e.jsxs(l.MainDropdown,Object.assign({drop:"down",show:T,onToggle:M,backgroundColor:O,id:"analytic-dropdown"},{children:[e.jsx(t.Dropdown.Toggle,Object.assign({id:"dropdown-autoclose-outside",className:"main--dropdown",style:"small"===D?{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",backgroundColor:"#FAFAFA",borderRadius:4,border:`1px solid ${n.DEFAULT_THEME.colorsV2.stroke.primary}`}:void 0},{children:e.jsx($,Object.assign({style:"small"===D?{color:n.DEFAULT_THEME.colorsV2.content.secondary}:void 0},{children:(null==w?void 0:w.isCustom)?R?d(R[0])===d(R[1])?`${d(R[0])}`:`${d(R[0])} to ${d(R[1])}`:(null==q?void 0:q.label)?null==q?void 0:q.label:u:w?null==w?void 0:w.label:u}))})),e.jsx(t.Dropdown.Menu,Object.assign({className:"main--dropdown"},{children:e.jsxs(l.MainDropdown,Object.assign({drop:null!=y?y:"end",id:"sub--dropdown",show:f,onToggle:e=>{!e&&A(!1),k(!f)}},{children:[e.jsx("div",Object.assign({style:{maxHeight:m||"auto",overflowY:"scroll"}},{children:r.map((o=>{var n;return e.jsx("div",{children:(null==o?void 0:o.isCustom)?e.jsx(t.Dropdown.Toggle,Object.assign({className:"sub--dropdown"},{children:e.jsx(a,{eachOption:o,selectedOption:w,selectedDate:R,onClickingEachItem:e=>{C(e),k(!0)},rangeSelection:!!(null===(n=null==o?void 0:o.dateRangeSelectionOptions)||void 0===n?void 0:n.selectRange)})})):e.jsx(a,{eachOption:o,selectedOption:w,selectedDate:R,onClickingEachItem:e=>{if(E(void 0),C(e),P(e),M(),!e.noOfDays)return void g(e);const o=new Date,t=new Date;t.setDate(o.getDate()-e.noOfDays),g(Object.assign(Object.assign({},e),{selectedRange:[t,o]}))}})},null==o?void 0:o.key)}))})),e.jsx(t.Dropdown.Menu,Object.assign({className:"sub--dropdown",popperConfig:{modifiers:[{name:"offset",options:{offset:[(null==j?void 0:j.offsetSkid)||0,(null==j?void 0:j.offsetDistance)||0]}}]}},{children:e.jsx(s.DatePicker,{selectRange:(null===(b=null==w?void 0:w.dateRangeSelectionOptions)||void 0===b?void 0:b.selectRange)||!1,maxDate:null===(h=null==w?void 0:w.dateRangeSelectionOptions)||void 0===h?void 0:h.maxDate,minDate:null===(x=null==w?void 0:w.dateRangeSelectionOptions)||void 0===x?void 0:x.minDate,selectedDates:R,onSelectRange:(e,o)=>{const t=[e,o];(null==w?void 0:w.dateRangeSelectionOptions)&&(w.dateRangeSelectionOptions.selectedDates=t,g(Object.assign(Object.assign({},w),{selectedRange:[e,o]}))),P(w),k(!1),E(t),A(!T)},onSelectDate:e=>{(null==w?void 0:w.dateRangeSelectionOptions)&&(w.dateRangeSelectionOptions.selectedDates=[e,e],g(Object.assign(Object.assign({},w),{selectedRange:[e,e]}))),P(w),k(!1),E([e,e]),A(!T)}})}))]}))}))]}))})},exports.EachItem=a,exports.formatDate=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),n=require("react"),s=require("../spinner/Spinner.js"),i=require("./Button.styled.js"),a=require("./themes.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=r(n);const c=n.forwardRef(((n,r)=>{var{version:c,id:d,buttonType:l="primary",size:u="small",buttonText:m,disabled:j,IconComponent:b,LeadingIcon:h,TrailingIcon:p,isLoading:v,inverse:x,onClick:g,matchParentWidth:y,subtitle:f,darkMode:N,activated:C,error:I}=n,O=e.__rest(n,["version","id","buttonType","size","buttonText","disabled","IconComponent","LeadingIcon","TrailingIcon","isLoading","inverse","onClick","matchParentWidth","subtitle","darkMode","activated","error"]);const B=a.GetButtonTextComponent(u,l,j),T="chip"===u?16:20,k={height:T,width:T,color:a.getButtonIconColor(u,l,x,j,v,N),style:{display:"block"},className:"icon"};return t.jsx(i.Button,Object.assign({"data-test":O["data-test"],version:c,onClick:v?()=>{}:g,ref:r,id:d,disabled:j,size:u,buttonType:l,isLoading:v,inverse:x,matchParentWidth:y,darkMode:N,activated:C,error:I},O,{children:t.jsxs("div",Object.assign({className:"button-container"},{children:[l.startsWith("dash")&&t.jsx(i.ButtonCustomDashedBorder,{}),t.jsx("div",Object.assign({className:"overlay-container"},{children:v&&t.jsx(s.Spinner,{className:"spinner",size:"small",color:a.SpinnerColorMap(l,x)})})),b&&t.jsx("div",Object.assign({className:"icon-component"},{children:o.default.createElement(b,k)})),h&&t.jsx("div",Object.assign({className:"icon-leading",style:{zIndex:1}},{children:o.default.createElement(h,k)})),m?t.jsxs(B,Object.assign({className:"text"},{children:[m,t.jsx("div",Object.assign({className:"text-subtitle"},{children:f}))]})):t.jsx(t.Fragment,{}),p&&t.jsx("div",Object.assign({className:"icon-trailing",style:{zIndex:1}},{children:o.default.createElement(p,k)}))]}))}))}));c.displayName="Button",exports.Button=c;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export type Size = 'chip' | 'small' | 'medium' | 'large';
|
|
3
|
-
export type Type = 'primary' | 'secondary' | 'tertiary' | 'tertiaryGray' | 'destructive' | 'dashBold' | 'dashRegular' | 'text';
|
|
3
|
+
export type Type = 'primary' | 'secondary' | 'tertiary' | 'tertiaryGray' | 'destructive' | 'dashBold' | 'dashRegular' | 'text' | 'ai';
|
|
4
4
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
5
|
'data-test'?: string;
|
|
6
6
|
/**
|
|
@@ -3,14 +3,14 @@ export declare const getBackgroundColor: (type: Type, size: Size, inverse?: bool
|
|
|
3
3
|
export declare const getColor: (type: Type, size: Size, inverse?: boolean, darkMode?: boolean) => string;
|
|
4
4
|
export declare const getDisabledTextColor: (inverse?: boolean) => string;
|
|
5
5
|
export declare const getPadding: (type: Type, size: Size) => "0px" | "4px 8px" | "6px 4px" | "6px 12px" | "10px 4px" | "10px 12px" | "14px 4px" | "14px 12px" | undefined;
|
|
6
|
-
export declare const GetButtonTextComponent: (size: Size, type: Type) => import("styled-components").StyledComponent<"div", any, {
|
|
6
|
+
export declare const GetButtonTextComponent: (size: Size, type: Type, disabled?: boolean) => import("styled-components").StyledComponent<"div", any, {
|
|
7
7
|
numberOfLines?: number | undefined;
|
|
8
8
|
color?: string | undefined;
|
|
9
9
|
}, never>;
|
|
10
10
|
export declare const getBorderColor: (type: Type, inverse?: boolean, error?: boolean) => string;
|
|
11
11
|
export declare const getBorder: (version: '1.0' | '2.0', type: Type, size: Size, inverse?: boolean, error?: boolean) => string;
|
|
12
12
|
export declare const getLinearGradientValue: (size: Size) => string;
|
|
13
|
-
export declare const getHoverButtonBackground: (type: Type, inverse?: boolean) =>
|
|
13
|
+
export declare const getHoverButtonBackground: (type: Type, inverse?: boolean) => string;
|
|
14
14
|
export declare const getHoverButtonTextDecorationStyle: (type: Type, disabled?: boolean) => string;
|
|
15
15
|
export declare const generateInverseHoverBackground: (type: Type, disabled?: boolean) => string;
|
|
16
16
|
export declare const generateDisabledStyling: (type: Type, size: Size, inverse?: boolean) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../constants/Theme.js"),r=require("../TypographyStyle.js");const n=(r,n,e)=>e?t.COLORS.stroke.negative.vibrant:n?t.COLORS.surface.standard:"secondary"==r?t.COLORS.stroke.brand:t.COLORS.content.placeholder,e=t=>"medium"===t?"5px,\n\t\ttransparent 5px,\n\t\ttransparent 10px":"6px,\n\t\ttransparent 6px,\n\t\ttransparent 12px";exports.GetButtonTextComponent=(t,n)=>"dashRegular"===n?r.BodySecondary:"chip"===t?r.BodyCaption:"small"===t?r.ButtonRegular:r.ButtonLarge,exports.SpinnerColorMap=(r,n)=>n?"primary"===r?t.COLORS.content.primary:t.COLORS.content.primaryInverse:"destructive"===r?t.COLORS.content.negative:t.COLORS.content.brand,exports.generateDisabledStyling=(r,n,e)=>"chip"===n?"background-color: transparent;":"primary"===r||"destructive"===r?e?"background-color: rgba(255,255,255,0.3);":`background-color: ${t.COLORS.background.inactive};`:"secondary"===r?e?"border: 1px solid rgba(255, 255, 255, 0.5);":`border: 1px solid ${t.COLORS.stroke.primary};`:"",exports.generateInverseHoverBackground=(r,n)=>n?"":"primary"===r?`background-color: ${t.COLORS.stroke.warning.lightAlt};`:"background-color: rgba(255, 255, 255, 0.1)",exports.getBackgroundColor=(r,n,e,o)=>{if("chip"===n)return"text"===r?"transparent":o?t.COLORS.surface.hovered:t.COLORS.surface.subdued;switch(r){case"primary":return e?t.COLORS.background.warning.vibrant:t.COLORS.background.inverseLight;case"destructive":return t.COLORS.background.negative.vibrant;default:return"transparent"}},exports.getBorder=(r,e,o,a,i)=>"text"==e?"border: none;":"chip"===o?`border: ${"2.0"===r?.5:1}px solid ${t.COLORS.stroke.primary};`:a?"secondary"===e?`border: ${"2.0"===r?.5:1}px solid ${n(e,a,i)};`:"border: none;":"secondary"===e?`border: ${"2.0"===r?.5:1}px solid ${n(e,!1,i)};`:"border: none;",exports.getBorderColor=n,exports.getButtonIconColor=(r,n,e,o,a,i)=>"chip"===r?o?t.COLORS.content.inactive:i?t.COLORS.content.primary:t.COLORS.content.secondary:a?"transparent":"primary"===n||"destructive"===n?e?o?"rgba(255, 255, 255, 0.5)":t.COLORS.content.primary:o?t.COLORS.content.inactive:t.COLORS.content.primaryInverse:"secondary"===n||"tertiary"===n?e?o?"rgba(255, 255, 255, 0.5)":t.COLORS.content.primaryInverse:o?t.COLORS.content.inactive:t.COLORS.content.brand:"tertiaryGray"===n||n.startsWith("dash")?o?t.COLORS.content.inactive:t.COLORS.content.secondary:void 0,exports.getClickEffect=(r,n,e)=>"text"===r?`background-color: ${t.COLORS.background.brandLight};\n\t\t\ttext-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.COLORS.content.brand};`:"chip"===n?`border: 1px solid ${t.COLORS.stroke.brandLightAlt};\n\t\tbackground-color: ${t.COLORS.background.brandLight};`:"primary"===r||"destructive"===r?e?`background-color: ${t.COLORS.background.warning.vibrant} !important;\n\t\t\tbox-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);\n\t\t\t`:"box-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);":"secondary"===r||"tertiary"===r||"tertiaryGray"===r||r.startsWith("dash")?e?`background-color: ${t.COLORS.background.inverseLight} !important;`:`background-color: ${t.COLORS.background.brandLight};`:void 0,exports.getColor=(r,n,e,o)=>{if("chip"===n)return"text"===r?e?t.COLORS.content.inactive:t.COLORS.content.brand:o?t.COLORS.content.primary:t.COLORS.content.secondary;switch(r){case"primary":return e?t.COLORS.content.primary:t.COLORS.content.primaryInverse;case"tertiaryGray":case"dashBold":case"dashRegular":return t.COLORS.content.secondary;case"destructive":return t.COLORS.content.primaryInverse;default:return e?t.COLORS.content.primaryInverse:t.COLORS.stroke.brand}},exports.getDashedBorderStyling=function(t,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n(t,!1);return`\n\t.line-top {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t.line-right {\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t.line-bottom {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tbottom: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t.line-left {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t`},exports.getDisabledTextColor=r=>r?"rgba(255, 255, 255, 0.5)":t.COLORS.content.inactive,exports.getHoverButtonBackground=(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../constants/Theme.js"),r=require("../TypographyStyle.js");const n=(r,n,e)=>e?t.COLORS.stroke.negative.vibrant:n?t.COLORS.surface.standard:"secondary"==r?t.COLORS.stroke.brand:t.COLORS.content.placeholder,e=t=>"medium"===t?"5px,\n\t\ttransparent 5px,\n\t\ttransparent 10px":"6px,\n\t\ttransparent 6px,\n\t\ttransparent 12px";exports.GetButtonTextComponent=(t,n,e)=>e||"ai"!==n?"dashRegular"===n?r.BodySecondary:"chip"===t?r.BodyCaption:"small"===t?r.ButtonRegular:r.ButtonLarge:"small"===t?r.ButtonRegularAI:r.ButtonLargeAI,exports.SpinnerColorMap=(r,n)=>n?"primary"===r?t.COLORS.content.primary:t.COLORS.content.primaryInverse:"destructive"===r?t.COLORS.content.negative:t.COLORS.content.brand,exports.generateDisabledStyling=(r,n,e)=>"chip"===n?"background-color: transparent;":"primary"===r||"destructive"===r?e?"background-color: rgba(255,255,255,0.3);":`background-color: ${t.COLORS.background.inactive};`:"secondary"===r?e?"border: 1px solid rgba(255, 255, 255, 0.5);":`border: 1px solid ${t.COLORS.stroke.primary};`:"",exports.generateInverseHoverBackground=(r,n)=>n?"":"primary"===r?`background-color: ${t.COLORS.stroke.warning.lightAlt};`:"background-color: rgba(255, 255, 255, 0.1)",exports.getBackgroundColor=(r,n,e,o)=>{if("chip"===n)return"text"===r?"transparent":o?t.COLORS.surface.hovered:t.COLORS.surface.subdued;switch(r){case"primary":return e?t.COLORS.background.warning.vibrant:t.COLORS.background.inverseLight;case"destructive":return t.COLORS.background.negative.vibrant;default:return"transparent"}},exports.getBorder=(r,e,o,a,i)=>"text"==e?"border: none;":"chip"===o?`border: ${"2.0"===r?.5:1}px solid ${t.COLORS.stroke.primary};`:a?"secondary"===e?`border: ${"2.0"===r?.5:1}px solid ${n(e,a,i)};`:"border: none;":"secondary"===e?`border: ${"2.0"===r?.5:1}px solid ${n(e,!1,i)};`:"border: none;",exports.getBorderColor=n,exports.getButtonIconColor=(r,n,e,o,a,i)=>"chip"===r?o?t.COLORS.content.inactive:i?t.COLORS.content.primary:t.COLORS.content.secondary:a?"transparent":"primary"===n||"destructive"===n?e?o?"rgba(255, 255, 255, 0.5)":t.COLORS.content.primary:o?t.COLORS.content.inactive:t.COLORS.content.primaryInverse:"secondary"===n||"tertiary"===n?e?o?"rgba(255, 255, 255, 0.5)":t.COLORS.content.primaryInverse:o?t.COLORS.content.inactive:t.COLORS.content.brand:"tertiaryGray"===n||n.startsWith("dash")?o?t.COLORS.content.inactive:t.COLORS.content.secondary:void 0,exports.getClickEffect=(r,n,e)=>"text"===r?`background-color: ${t.COLORS.background.brandLight};\n\t\t\ttext-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.COLORS.content.brand};`:"chip"===n?`border: 1px solid ${t.COLORS.stroke.brandLightAlt};\n\t\tbackground-color: ${t.COLORS.background.brandLight};`:"primary"===r||"destructive"===r?e?`background-color: ${t.COLORS.background.warning.vibrant} !important;\n\t\t\tbox-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);\n\t\t\t`:"box-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);":"secondary"===r||"tertiary"===r||"tertiaryGray"===r||r.startsWith("dash")?e?`background-color: ${t.COLORS.background.inverseLight} !important;`:`background-color: ${t.COLORS.background.brandLight};`:void 0,exports.getColor=(r,n,e,o)=>{if("chip"===n)return"text"===r?e?t.COLORS.content.inactive:t.COLORS.content.brand:o?t.COLORS.content.primary:t.COLORS.content.secondary;switch(r){case"primary":return e?t.COLORS.content.primary:t.COLORS.content.primaryInverse;case"tertiaryGray":case"dashBold":case"dashRegular":return t.COLORS.content.secondary;case"destructive":return t.COLORS.content.primaryInverse;case"ai":return t.COLORS.content.ai;default:return e?t.COLORS.content.primaryInverse:t.COLORS.stroke.brand}},exports.getDashedBorderStyling=function(t,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n(t,!1);return`\n\t.line-top {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t.line-right {\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t.line-bottom {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tbottom: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t.line-left {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${o},\n\t\t\t${o}\n\t\t\t\t${e(r)}\n\t\t);\n\t}\n\t`},exports.getDisabledTextColor=r=>r?"rgba(255, 255, 255, 0.5)":t.COLORS.content.inactive,exports.getHoverButtonBackground=(r,n)=>"ai"===r?`background: ${t.COLORS.surface.aiLight};`:"text"===r?"background-color:transparent;":n||"primary"===r?"":"background-color: #000000;\n\t\t\t\topacity: 0.03;",exports.getHoverButtonTextDecorationStyle=(r,n)=>n?"":`text-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.COLORS.content.brand};`,exports.getLinearGradientValue=e,exports.getLoadingBackground=(r,n,e)=>"chip"===n?`background-color: ${t.COLORS.background.base};`:"primary"===r?`background-color: ${e?t.COLORS.background.warning.vibrant:t.COLORS.background.brandLight};`:"destructive"===r?`background-color: ${t.COLORS.background.negative.light};`:"background-color: transparent;",exports.getLoadingBorder=(r,n,e)=>"chip"===n?"border: none;":"secondary"===r?e?`border: 1px solid ${t.COLORS.content.secondary};`:`border: 1px solid ${t.COLORS.stroke.brandLightAlt};`:"",exports.getPadding=(t,r)=>{if("text"===t)return"0px";if("chip"===r)return"4px 8px";if("small"===r)switch(t){case"tertiary":case"tertiaryGray":return"6px 4px";default:return"6px 12px"}else if("medium"===r)switch(t){case"tertiary":case"tertiaryGray":return"10px 4px";default:return"10px 12px"}else if("large"===r)switch(t){case"tertiary":case"tertiaryGray":return"14px 4px";default:return"14px 12px"}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/calendar.svg.js"),s=require("../../../assets/icons/chevronDown.svg.js"),r=require("react"),a=require("react-popper"),i=require("../../datePicker/DatePicker.js")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/calendar.svg.js"),s=require("../../../assets/icons/chevronDown.svg.js"),r=require("react"),a=require("react-popper"),i=require("../../datePicker/DatePicker.js"),n=require("../../dropdown/Common.styled.js"),u=require("../../dropShadow/DropShadow.js"),o=require("../../../hooks/useOutside.js"),d=require("../../../utils/DateUtils.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=l(r);exports.default=l=>{const[j,p]=r.useState(null),[f,h]=r.useState(null),[g,m]=r.useState(!1),{styles:D,attributes:x}=a.usePopper(j,f,{placement:l.placement}),y=c.default.useRef();return o.useOutside(y,(()=>{m(!1)})),e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({className:"date-preview",ref:p,onClick:()=>{m(!g)}},{children:[e.jsx(t.default,{width:24,height:24}),e.jsx("span",Object.assign({style:{marginLeft:8}},{children:d.default.onlyDateFormat(l.customDate,"dd MMM yyyy")})),e.jsx(s.default,{style:{marginLeft:"auto"},width:22,height:22})]})),g&&e.jsx(n.OpenDropdownContainer,Object.assign({ref:h,style:Object.assign(Object.assign({},D.popper),{zIndex:3})},x.popper,{children:e.jsx("div",Object.assign({ref:y},{children:e.jsx(u.default,Object.assign({level:"z2",position:"down",style:{borderRadius:4}},{children:e.jsx(i.DatePicker,{selectedDate:l.customDate||new Date,selectRange:!1,onSelectDate:e=>{m(!1),l.setCustomDate(e)},minDate:l.minDate})}))}))}))]})};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CalendarProps } from 'react-calendar';
|
|
3
3
|
import { CSSProperties } from 'styled-components';
|
|
4
|
-
|
|
4
|
+
declare const DatePickerWrapper: React.FC<{
|
|
5
5
|
val?: Date | Date[];
|
|
6
6
|
onChange: (val: Date | Date[]) => void;
|
|
7
7
|
calendarProps?: CalendarProps;
|
|
@@ -11,3 +11,4 @@ export declare const DatePickerWrapper: React.FC<{
|
|
|
11
11
|
maxDate?: Date;
|
|
12
12
|
minDate?: Date;
|
|
13
13
|
}>;
|
|
14
|
+
export default DatePickerWrapper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("react-calendar"),a=require("../../hooks/useOutside.js"),n=require("../../utils/DateUtils.js"),i=require("../../constants/Theme.js"),o=require("../../assets/icons/calendar.svg.js"),s=require("../TypographyStyle.js"),l=require("./DatePickerWrapper.styled.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=c(t),u=c(r);exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("react-calendar"),a=require("../../hooks/useOutside.js"),n=require("../../utils/DateUtils.js"),i=require("../../constants/Theme.js"),o=require("../../assets/icons/calendar.svg.js"),s=require("../TypographyStyle.js"),l=require("./DatePickerWrapper.styled.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=c(t),u=c(r);exports.default=r=>{let{val:c,onChange:O,calendarProps:g,disabled:S,pickerStyles:D,nativeID:v,maxDate:C,minDate:y}=r;var j,b,L,m;const[f,p]=t.useState(!1),h=d.default.createRef();return a.useOutside(h,(()=>{p(!1)})),e.jsxs(e.Fragment,{children:[e.jsxs(l.DateBtn,Object.assign({id:v,bgColor:S?i.COLORS.background.base:i.COLORS.surface.standard,borderColor:i.COLORS.stroke.primary,onClick:()=>p(!f)},{children:[e.jsx(s.BodySecondary,Object.assign({style:{color:S?i.COLORS.content.inactive:i.COLORS.content.primary,flex:1}},{children:c?Array.isArray(c)?(null===(j=null==c?void 0:c[0])||void 0===j?void 0:j.toString())&&(null===(b=null==c?void 0:c[1])||void 0===b?void 0:b.toString())?`${new Date(null===(L=null==c?void 0:c[0])||void 0===L?void 0:L.toString()).toLocaleDateString()}-${new Date(null===(m=null==c?void 0:c[1])||void 0===m?void 0:m.toString()).toLocaleDateString()}`:`${n.default.getPastDate(new Date,30).toLocaleDateString()}-${(new Date).toLocaleDateString()}`:new Date(c.toString()).toLocaleDateString():(new Date).toLocaleDateString()})),e.jsx(o.default,{width:20,height:20,color:S?i.COLORS.content.inactive:i.COLORS.content.primary})]})),f&&!S&&e.jsx(l.PickerContainer,Object.assign({ref:h,style:Object.assign({},D),contentPrimary:i.COLORS.content.primary,subDued:i.COLORS.surface.subdued,brandColor:i.COLORS.background.brand,bgColor:i.COLORS.surface.standard,borderColor:i.COLORS.stroke.primary},{children:e.jsx(u.default,Object.assign({tileClassName:["custom__tile"],className:["custom__calendar"],onChange:e=>{O(e),p(!1)},maxDate:C,minDate:y,value:c?Array.isArray(c)?2===c.length?[new Date(c[0]),new Date(c[1])]:null:new Date(c):null},g))}))]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),n=require("../../constants/Theme.js"),o=require("../../assets/icons/chevronDown.svg.js"),i=require("../input/Input.js"),l=require("../input/context/InputStyleProvider.js"),s=require("./DropdownPopover/index.js");function a(){}const
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),n=require("../../constants/Theme.js"),o=require("../../assets/icons/chevronDown.svg.js"),i=require("../input/Input.js"),l=require("../input/context/InputStyleProvider.js"),s=require("./DropdownPopover/index.js");function a(){}const d=d=>{var u,c,p,{placeHolder:h,size:v,onSelect:g,defaultOptions:j,disabled:f,noErrorHint:b,placeHolderHeight:x}=d,w=e.__rest(d,["placeHolder","size","onSelect","defaultOptions","disabled","noErrorHint","placeHolderHeight"]);const[m,H]=r.useState(!1),y=null!=v?v:"default",O=r.useRef(),[S,q]=r.useState(null!=j?j:[]);r.useEffect((()=>{var e;const t=[];null===(e=null==w?void 0:w.options)||void 0===e||e.forEach((e=>{e.options?e.options.forEach((e=>{e.selected&&t.push(Object.assign(Object.assign({},e),{label:e.label}))})):e.selected&&t.push(e)})),q([...t])}),[w.options]),r.useEffect((()=>{j&&q([...j])}),[j]);const E=S.length?S.map((e=>e.label)).join(", "):void 0;return t.jsx(l.InputStyleContext.Provider,Object.assign({value:{InputWrapper:{height:x||("small"===y?32:48),width:null!==(c=null!==(u=w.buttonWidth)&&void 0!==u?u:w.width)&&void 0!==c?c:"100%",zIndex:1,cursor:"pointer",padding:"6px 8px"},input:{minHeight:"100%"}}},{children:t.jsx(s.DropdownPopover,Object.assign({ref:O,onSelect:function(e){Array.isArray(e)?q([...e]):q([e]),null==g||g(e)},disabled:f,onDropdownVisbilityChange:e=>H(e)},w,{children:t.jsx(i.Input,{version:w.version,noErrorHint:b,state:f?"disabled":"none",value:null!=E?E:"",errorMessage:w.error,variant:y,placeholder:null!=h?h:"Select an option",width:null!==(p=w.width)&&void 0!==p?p:"100%",onChangeText:a,rightIcon:{icon:()=>t.jsx(o.default,{style:{transform:m?"rotate(180deg)":"rotate(0deg)"},onClick:a,width:"small"===y?20:24,height:"small"===y?20:24,color:n.COLORS.content.primary})}})}))}))};d.displayName="Dropdown",exports.Dropdown=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),n=require("react"),o=require("react-popper"),t=require("../../dropShadow/DropShadow.js"),l=require("../Common.styled.js"),s=require("../OpenedDropdown/components/OpennedDropdown.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const a=i(n).default.forwardRef(((i,a)=>{var{children:d,onDropdownVisbilityChange:p,version:u="1.0"}=i,c=e.__rest(i,["children","onDropdownVisbilityChange","version"]);const v=a,[
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),r=require("react/jsx-runtime"),n=require("react"),o=require("react-popper"),t=require("../../dropShadow/DropShadow.js"),l=require("../Common.styled.js"),s=require("../OpenedDropdown/components/OpennedDropdown.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const a=i(n).default.forwardRef(((i,a)=>{var{children:d,onDropdownVisbilityChange:p,version:u="1.0"}=i,c=e.__rest(i,["children","onDropdownVisbilityChange","version"]);const v=a,[j,b]=n.useState(!1),[f,w]=n.useState(null),[D,O]=n.useState(null),{styles:y,attributes:g}=o.usePopper(f,D,{placement:c.placement,strategy:c.strategy});return n.useImperativeHandle(v,(()=>({openDropdown:j})),[]),n.useEffect((()=>{(null==v?void 0:v.current)&&(v.current.openDropdown=j)}),[j]),n.useEffect((()=>{null==p||p(j)}),[j]),r.jsxs(r.Fragment,{children:[r.jsxs("div",Object.assign({style:{position:"relative"},ref:w},{children:[r.jsx(l.OverLapAbs,{disabled:c.disabled,onClick:e=>{var r;null===(r=c.onDropdownOpen)||void 0===r||r.call(c),j?e.preventDefault():c.disabled||b(!0)}}),d]})),j&&r.jsx(l.OpenDropdownContainer,Object.assign({ref:O,style:Object.assign(Object.assign({},y.popper),{zIndex:3})},g.popper,{children:r.jsx(t.default,Object.assign({level:"z2",position:"down",style:{borderRadius:8}},{children:r.jsx(s.OpenedDropdown,Object.assign({},c,{onSelect:e=>{var r;"2.0"===u&&c.isMultiSelect||(null===(r=c.onSelect)||void 0===r||r.call(c,e),b(!1))},onClose:e=>{var r,n;"2.0"===u&&c.isMultiSelect&&e&&(null===(r=c.onSelect)||void 0===r||r.call(c,[...e])),b(!1),null===(n=null==c?void 0:c.onClose)||void 0===n||n.call(c)},version:u}))}))}))]})}));a.displayName="DropdownPopover",exports.DropdownPopover=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("../../../zeroState/ZeroState.js"),s=require("../../../../hooks/useOutside.js"),n=require("../../hooks/useDropdown.js"),o=require("./description/Description.js"),i=require("./menu/FreeFormMenu.js"),l=require("./menu/MenuList.js"),u=require("./menu/SelectAllMenu.js"),c=require("./multiSelect/MultiSelectDropdownBottomBar.js"),a=require("./OpennedDropdown.styled.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("../../../zeroState/ZeroState.js"),s=require("../../../../hooks/useOutside.js"),n=require("../../hooks/useDropdown.js"),o=require("./description/Description.js"),i=require("./menu/FreeFormMenu.js"),l=require("./menu/MenuList.js"),u=require("./menu/SelectAllMenu.js"),c=require("./multiSelect/MultiSelectDropdownBottomBar.js"),a=require("./OpennedDropdown.styled.js"),p=require("./searchbox/SearchBox.js"),d=require("./searchbox/SearchZeroState.js");const h=304,S=290;exports.OpenedDropdown=j=>{let{options:f,isSearchable:x,isMultiSelect:g,width:v,allowFreeForm:w,height:b,onClose:y,onSelect:m,onSearch:O,version:q,skipSorting:M}=j;const{dropdownOptions:C,search:D,searchedString:L,searchedOptions:F,onApplyHandler:A,selectAllHandler:k,onMultiSelectClear:B,onFreeFormSelect:H,onMultiSelectApply:Z,latestDropdownOptionsRef:P,getSelectedOptions:R}=n.useDropdown(q,f,m,M,g,O),[_,z]=t.useState(null!=v?v:S),[E,I]=t.useState(null),K=t.useRef(null);s.useOutside(K,(()=>{if(I(null),g&&"2.0"===q){const e=R(P.current);null==y||y(e)}else null==y||y(C)}));const N=null!=b?b:h,T="number"==typeof N?x&&g?N-96:x&&!g||!x&&g?N-48:N:N;t.useEffect((()=>{const e=null!=v?v:S;if(null===E)z(e);else if("number"==typeof e)z(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));z(t)}}),[E]);const W=[],G=(L&&O?F:C).map((e=>{var t,r;if(L&&!O){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(L.toLowerCase()))&&(W.push(!L||e.label===L),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(L.toLowerCase()))||(null===(r=e.searchKey)||void 0===r?void 0:r.toLowerCase().includes(L.toLowerCase()))?(W.push(!L||e.label===L),e):null}return e})).filter((e=>null!==e)),J=!!x&&L&&0===G.length;return e.jsxs(a.OpennedDropdownContainer,Object.assign({version:q,ref:K,style:{width:_}},{children:[e.jsxs("div",Object.assign({style:{width:E?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!x&&e.jsx(p.SearchBox,{onSearch:D,version:q}),G.length||L?e.jsxs(a.MenuListContainer,Object.assign({minHeight:N,maxHeight:T},{children:[!!g&&!J&&e.jsx(u.SelectAllMenu,{version:q,options:L&&O?F:C,onSelect:k}),!w&&J&&e.jsx(d.SearchZeroState,{height:T,searchedString:L}),w&&(J||!!W.length&&W.every((e=>!1===e)))&&e.jsx(i.FreeFormMenu,{version:q,isMultiSelect:g,onSelect:H,searchedString:L}),e.jsx(l.MenuList,{version:q,onSelect:A,showDescription:function(e,t){I(e&&t?{title:e,description:t}:null)},isMultiSelect:g,options:G})]})):e.jsx("div",Object.assign({style:{height:N,display:"flex"}},{children:e.jsx(r.ZeroState,{title:"No results found",subTitle:"Please try again later or contact us at support@bik.ai if you require further assistance."})})),!!g&&!(!G.length&&!L)&&"2.0"!==q&&e.jsx(c.default,{onClear:B,onApply:Z,list:L&&O?F:C})]})),!!E&&e.jsx(o.Description,{title:E.title,description:E.description,version:q})]}))};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("styled-components"),e=require("../../constants/Theme.js"),n=require("./theme.js");function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}const o=r(t).default.button`
|
|
2
|
-
${t=>`\n\tall: unset;\n\tcursor: pointer;\n\tpadding: 6px;\n\tborder-radius: 4px;\n\tflex-wrap: wrap;\n\t${t.bordered?`border: 1px solid ${e.COLORS.stroke.primary};`:""}\n\t${t.isSelected?`\n\t\t\tbackground
|
|
2
|
+
${t=>`\n\tall: unset;\n\tcursor: pointer;\n\tpadding: 6px;\n\tborder-radius: 4px;\n\tflex-wrap: wrap;\n\t${t.bordered&&"ai"!==t.iconButtonType?`border: 1px solid ${e.COLORS.stroke.primary};`:""}\n\t${t.isSelected?`\n\t\t\tbackground: ${n.generateBackgroundColor(t.iconButtonType)};\n\t\t\t\t`:"\n\t\t\t\t:hover {\n\t\t\t\t\tbackground-color: rgba(0, 0, 0, 0.03);\n\t\t\t\t}\n\t\t\t"}\n\t${t.disabled&&"\n\t\t\tcursor: not-allowed !important;\n\t\t\tbackground-color: rgba(0, 0, 0, 0.03);\n\t\t"}\n\n\t`}
|
|
3
3
|
`;exports.IconButton=o;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export type IconButtonType = 'default' | 'negative' | 'positive' | 'warning';
|
|
2
|
+
export type IconButtonType = 'default' | 'negative' | 'positive' | 'warning' | 'ai';
|
|
3
3
|
export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
4
|
/**
|
|
5
5
|
* Icon to render
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../constants/Theme.js");exports.generateBackgroundColor=t=>"default"===t?e.COLORS.background.brandLight:"negative"===t?e.COLORS.background.negative.light:"positive"===t?e.COLORS.background.positive.light:e.COLORS.background.warning.light,exports.getIconColor=(t,n,r)=>{if(n)return e.COLORS.content.inactive;switch(t){case"default":return r?e.COLORS.content.brand:e.COLORS.content.primary;case"negative":return e.COLORS.content.negative;case"positive":return e.COLORS.content.positive;case"warning":return r?e.COLORS.content.warning:e.COLORS.content.primary;default:return e.COLORS.content.primary}};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../constants/Theme.js");exports.generateBackgroundColor=t=>"default"===t?e.COLORS.background.brandLight:"negative"===t?e.COLORS.background.negative.light:"positive"===t?e.COLORS.background.positive.light:"ai"===t?e.COLORS.surface.aiLight:e.COLORS.background.warning.light,exports.getIconColor=(t,n,r)=>{if(n)return e.COLORS.content.inactive;switch(t){case"default":return r?e.COLORS.content.brand:e.COLORS.content.primary;case"negative":return e.COLORS.content.negative;case"positive":return e.COLORS.content.positive;case"warning":return r?e.COLORS.content.warning:e.COLORS.content.primary;default:return e.COLORS.content.primary}};
|
|
@@ -58,6 +58,5 @@ export interface InputProps {
|
|
|
58
58
|
minHeight?: string;
|
|
59
59
|
maxHeight?: string;
|
|
60
60
|
labelTextBold?: boolean;
|
|
61
|
-
truncateText?: boolean;
|
|
62
61
|
}
|
|
63
62
|
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement | null>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/info.svg.js"),n=require("react"),i=require("../button/Button.js"),r=require("./Input-helper.js"),s=require("../tooltips/Tooltip.js"),l=require("../TypographyStyle.js"),a=require("../../constants/Theme.js"),o=require("../../assets/icons/errorInfo.svg.js"),u=require("./context/InputStyleProvider.js"),c=require("./Input.styled.js");const d=n.forwardRef(((d,h)=>{var v,p,x,g,j;const{placeholder:f,leftIcon:y,rightIcon:b,labelText:m,maxCharLimit:C,isRequired:I,hintText:O,type:w,state:S,validate:T,variant:E,button:k,suffixText:q,prefixText:H,onChangeText:F,value:L,noErrorHint:R,reset:B,rangeValidation:M,noKeyDownChange:z,version:A,noMaxCharCheck:D,labelElement:_,autoGrow:K,minHeight:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/info.svg.js"),n=require("react"),i=require("../button/Button.js"),r=require("./Input-helper.js"),s=require("../tooltips/Tooltip.js"),l=require("../TypographyStyle.js"),a=require("../../constants/Theme.js"),o=require("../../assets/icons/errorInfo.svg.js"),u=require("./context/InputStyleProvider.js"),c=require("./Input.styled.js");const d=n.forwardRef(((d,h)=>{var v,p,x,g,j;const{placeholder:f,leftIcon:y,rightIcon:b,labelText:m,maxCharLimit:C,isRequired:I,hintText:O,type:w,state:S,validate:T,variant:E,button:k,suffixText:q,prefixText:H,onChangeText:F,value:L,noErrorHint:R,reset:B,rangeValidation:M,noKeyDownChange:z,version:A,noMaxCharCheck:D,labelElement:_,autoGrow:K,minHeight:P,maxHeight:G,labelTextBold:N}=Object.assign({maxCharLimit:0,type:"text",variant:"default"},d),W=null==y?void 0:y.icon,V=null==b?void 0:b.icon,[$,J]=n.useState(!1),[Q,U]=n.useState(!1),[X,Y]=n.useState(),Z="small"===E?"18px":"22px",ee=n.useContext(u.InputStyleContext),[te,ne]=n.useState(),ie=n.useRef(null),re=null!=h?h:ie;n.useEffect((()=>{ne(L),!L&&K&&(re.current.style.height=P||"48px")}),[L]),n.useEffect((()=>{var e;re.current&&(null===(e=d.onReferenceInit)||void 0===e||e.call(d,re.current))}),[re]),n.useEffect((()=>{const e=re.current;if(e&&["phonenumber","zip","number"].includes(w))return e.addEventListener("wheel",oe,{passive:!1}),()=>{e.removeEventListener("wheel",oe)}}),[]),n.useEffect((()=>{B&&ne("")}),[B]),n.useEffect((()=>{var e;U(!!d.isActive),d.isActive&&(null===(e=re.current)||void 0===e||e.focus())}),[d.isActive]),n.useEffect((()=>{Y(d.errorMessage)}),[d.errorMessage]),n.useEffect((()=>{var e;J(!1),("invalid"===d.state||X||"disabled-invalid"===d.state)&&J(!0),"active"===d.state&&(null===(e=re.current)||void 0===e||e.focus())}),[d.state,X]),n.useEffect((()=>{J(!!X)}),[X]);const se=function(e){if(r.isFunction(e)){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];e(...n)}},le=()=>"zip"===w?6:60,ae=e=>{const t=0!==C?C:le();if(z||F(L||"",e),D)return;const n=e.target.value;![8].includes(e.which)&&t>0&&n.length>=t&&e.preventDefault()},oe=e=>{e.preventDefault()},ue=e=>{let t=e.target.value;const n=0!==C?C+1:le();!D&&n>0&&t.length>=n&&(t=t.substring(0,n-1)),F(t,e),d.textControl||ne(t),K&&(re.current.style.height=`${re.current.scrollHeight}px`,t||(re.current.style.height=P||"48px"));const i=T||r.validateInput;if(!i||!r.isFunction(i))return;const[s,l]=i(t,w,M);J(!s),Y(d.errorMessage?d.errorMessage:l)},ce=e=>{var t;d.skipFocus||U(!0),se(null===(t=d.onFocus)||void 0===t?void 0:t.call(d,e))},de=e=>{var t;d.skipFocus||U(!1),se(null===(t=d.onBlur)||void 0===t?void 0:t.call(d,e))},he=()=>{var t;return e.jsxs(e.Fragment,{children:["multiline"!==w&&e.jsx("input",{"data-test":d["data-test"],id:d.id,style:null!==(t=null==ee?void 0:ee.input)&&void 0!==t?t:{},ref:re,type:["phonenumber","zip","number"].includes(w)?"number":w,value:te,onFocus:e=>ce(e),onBlur:e=>de(e),placeholder:f||"Enter here",onChange:ue,onClick:e=>se(d.onClick),onKeyDown:e=>ae(e)}),"multiline"===w&&e.jsx("textarea",{"data-test":d["data-test"],value:te,ref:re,onFocus:e=>ce(e),onBlur:e=>de(e),onClick:e=>se(d.onClick),placeholder:f||"Enter here",onChange:ue,onKeyDown:e=>ae(e),maxLength:C>0?C:void 0})]})};return e.jsxs(c.RootContainer,Object.assign({width:d.width,height:d.height,state:S,type:w,style:null!==(v=null==ee?void 0:ee.RootContainer)&&void 0!==v?v:{}},{children:[!R&&(!!O||!!X)&&e.jsxs(c.InputFooter,Object.assign({invalid:!!X},{children:[!!X&&e.jsx(o.default,{width:16,height:16}),X||O]})),e.jsxs(c.InputWrapper,Object.assign({variant:E,state:S,width:d.width,isActive:"active"===S||Q,isInvalid:$,style:null!==(p=null==ee?void 0:ee.InputWrapper)&&void 0!==p?p:{},version:A,height:d.height},{children:[!!W&&e.jsx(c.IconHolder,Object.assign({variant:E,iconSize:Z,onClick:()=>se(null==y?void 0:y.callback),isLeft:!0,style:null!==(x=null==ee?void 0:ee.IconHolder)&&void 0!==x?x:{}},{children:e.jsx(W,{})})),!!H&&e.jsx(c.PrefixHolder,Object.assign({variant:E},{children:H})),"default"===E&&e.jsx(c.InputContainer,Object.assign({height:d.height,type:d.type,minHeight:P,maxHeight:G,autoGrow:K},{children:he()})),"small"===E&&e.jsx(c.InputContainerSmall,Object.assign({height:d.height,type:d.type},{children:he()})),!!V&&e.jsx(c.IconHolder,Object.assign({variant:E,iconSize:Z,onClick:()=>se(null==b?void 0:b.callback),isLeft:!1},{children:e.jsx(V,{})})),!!q&&e.jsx(c.SuffixHolder,Object.assign({variant:E},{children:q})),k&&k.text&&e.jsx(i.Button,{buttonText:k.text,onClick:()=>se(null==k?void 0:k.onClick)})]})),(!!m||!!C)&&e.jsxs(c.InputHeader,Object.assign({invalid:$},{children:[_&&_,e.jsxs("div",Object.assign({className:"label__container"},{children:[N?e.jsxs(l.TitleSmall,{children:[m,I?e.jsx("span",{children:"*"}):""]}):e.jsxs(l.BodySecondary,{children:[m,I?e.jsx("span",{children:"*"}):""]}),d.tooltipText&&e.jsx(s.Tooltip,Object.assign({body:d.tooltipText,placement:"top"},{children:e.jsx("span",{children:e.jsx(t.default,{style:{marginTop:-3},width:18,height:18,color:$?a.COLORS.content.negative:a.COLORS.content.primary})})}))]})),C>0&&e.jsxs(c.MaxCharStyle,{children:[null!==(j=null===(g=d.value)||void 0===g?void 0:g.length)&&void 0!==j?j:0,"/",C]})]}))]}))}));d.displayName="Input",exports.Input=d;
|