@bikdotai/bik-component-library 0.0.512-beta.0 → 0.0.512-beta.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.
Files changed (77) hide show
  1. package/dist/cjs/assets/icons/halfRectangle.svg.js +1 -1
  2. package/dist/cjs/components/SearchFilter/components/DatePickerButton.js +1 -1
  3. package/dist/cjs/components/SearchFilter/components/DateRangeOnlyButton.js +1 -1
  4. package/dist/cjs/components/TypographyStyle.d.ts +0 -17
  5. package/dist/cjs/components/TypographyStyle.js +14 -77
  6. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
  7. package/dist/cjs/components/button/Button.js +1 -1
  8. package/dist/cjs/components/button/model.d.ts +1 -1
  9. package/dist/cjs/components/button/themes.d.ts +2 -2
  10. package/dist/cjs/components/button/themes.js +1 -1
  11. package/dist/cjs/components/custom-date-time/DateSelector/DateSelector.js +1 -1
  12. package/dist/cjs/components/datePicker/index.d.ts +1 -0
  13. package/dist/cjs/components/dropdown/Dropdown.js +1 -1
  14. package/dist/cjs/components/icon-button/IconButton.styled.js +1 -1
  15. package/dist/cjs/components/icon-button/model.d.ts +1 -1
  16. package/dist/cjs/components/icon-button/theme.js +1 -1
  17. package/dist/cjs/components/input/Input.d.ts +1 -0
  18. package/dist/cjs/components/input/Input.js +1 -1
  19. package/dist/cjs/components/input/Input.styled.js +1 -1
  20. package/dist/cjs/components/states/StateComponent.d.ts +2 -0
  21. package/dist/cjs/components/states/StateComponent.js +1 -1
  22. package/dist/cjs/components/states/StateComponent.styled.d.ts +4 -1
  23. package/dist/cjs/components/states/StateComponent.styled.js +6 -6
  24. package/dist/cjs/components/states-modal/StateModalComponent.d.ts +2 -0
  25. package/dist/cjs/components/states-modal/StateModalComponent.js +1 -1
  26. package/dist/cjs/components/stepper/Stepper.d.ts +2 -0
  27. package/dist/cjs/components/stepper/Stepper.js +1 -1
  28. package/dist/cjs/components/stepper/Stepper.styled.d.ts +1 -0
  29. package/dist/cjs/components/stepper/Stepper.styled.js +7 -7
  30. package/dist/cjs/components/tag/Tag.js +1 -1
  31. package/dist/cjs/components/tag/Tag.styled.js +1 -1
  32. package/dist/cjs/components/tag/model.d.ts +1 -11
  33. package/dist/cjs/components/tag/model.js +1 -1
  34. package/dist/cjs/components/tag/themes.d.ts +1 -1
  35. package/dist/cjs/components/tag/themes.js +1 -1
  36. package/dist/cjs/components/template-preview/EmailTemplatePreview.styled.js +16 -14
  37. package/dist/cjs/components/template-preview/WhatsApp/ChatUI.style.js +13 -13
  38. package/dist/cjs/index.js +1 -1
  39. package/dist/esm/assets/icons/halfRectangle.svg.js +1 -1
  40. package/dist/esm/components/SearchFilter/components/DatePickerButton.js +1 -1
  41. package/dist/esm/components/SearchFilter/components/DateRangeOnlyButton.js +1 -1
  42. package/dist/esm/components/TypographyStyle.d.ts +0 -17
  43. package/dist/esm/components/TypographyStyle.js +83 -146
  44. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
  45. package/dist/esm/components/button/Button.js +1 -1
  46. package/dist/esm/components/button/model.d.ts +1 -1
  47. package/dist/esm/components/button/themes.d.ts +2 -2
  48. package/dist/esm/components/button/themes.js +1 -1
  49. package/dist/esm/components/custom-date-time/DateSelector/DateSelector.js +1 -1
  50. package/dist/esm/components/datePicker/index.d.ts +1 -0
  51. package/dist/esm/components/dropdown/Dropdown.js +1 -1
  52. package/dist/esm/components/icon-button/IconButton.styled.js +1 -1
  53. package/dist/esm/components/icon-button/model.d.ts +1 -1
  54. package/dist/esm/components/icon-button/theme.js +1 -1
  55. package/dist/esm/components/input/Input.d.ts +1 -0
  56. package/dist/esm/components/input/Input.js +1 -1
  57. package/dist/esm/components/input/Input.styled.js +1 -1
  58. package/dist/esm/components/states/StateComponent.d.ts +2 -0
  59. package/dist/esm/components/states/StateComponent.js +1 -1
  60. package/dist/esm/components/states/StateComponent.styled.d.ts +4 -1
  61. package/dist/esm/components/states/StateComponent.styled.js +6 -6
  62. package/dist/esm/components/states-modal/StateModalComponent.d.ts +2 -0
  63. package/dist/esm/components/states-modal/StateModalComponent.js +1 -1
  64. package/dist/esm/components/stepper/Stepper.d.ts +2 -0
  65. package/dist/esm/components/stepper/Stepper.js +1 -1
  66. package/dist/esm/components/stepper/Stepper.styled.d.ts +1 -0
  67. package/dist/esm/components/stepper/Stepper.styled.js +6 -6
  68. package/dist/esm/components/tag/Tag.js +1 -1
  69. package/dist/esm/components/tag/Tag.styled.js +1 -1
  70. package/dist/esm/components/tag/model.d.ts +1 -11
  71. package/dist/esm/components/tag/model.js +1 -1
  72. package/dist/esm/components/tag/themes.d.ts +1 -1
  73. package/dist/esm/components/tag/themes.js +1 -1
  74. package/dist/esm/components/template-preview/EmailTemplatePreview.styled.js +2 -0
  75. package/dist/esm/components/template-preview/WhatsApp/ChatUI.style.js +18 -18
  76. package/dist/esm/index.js +1 -1
  77. 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=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
+ "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,n=e(require("react"));function o(){return o=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},o.apply(this,arguments)}var a=e=>n.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 23"},e),t||(t=n.createElement("path",{fill:"currentColor",d:"M23 1v21L1 1h22Z"})),r||(r=n.createElement("path",{stroke:"#E0E0E0",strokeWidth:2.5,d:"M23 1H1l22 21"})));exports.default=a;
@@ -1 +1 @@
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
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),i=require("../../datePicker/DatePicker.js");require("react-calendar"),require("../../../utils/DateUtils.js");var n=require("../../../constants/Theme.js");require("../../TypographyStyle.js"),require("../../datePicker/DatePickerWrapper.styled.js");var a=require("../../input/Input.js"),s=require("../../input/context/InputStyleProvider.js"),o=require("../../tag/Tag.js"),l=require("../../../assets/icons/chevronDown.svg.js"),u=require("../../../assets/icons/chevronDownOutline.svg.js");const c=c=>{var d,p,{text:g,onSelect:h,variant:v}=c,j=e.__rest(c,["text","onSelect","variant"]);const[x,y]=r.useState(!1),[q,S]=r.useState(null),D=(null===(d=j.width)||void 0===d?void 0:d.toString())?null===(p=j.width)||void 0===p?void 0:p.toString():q?12*(null==q?void 0:q.toDateString().length)+"px":12*g.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"===v?t.jsx(o.Tag,{tagText:q?q.toDateString():null!=g?g:"",theme:"light",type:"neutral",variant:"regular",TrailingIcon:u.default}):t.jsx(s.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(a.Input,{state:"disabled",value:q?q.toDateString():void 0,variant:"small",placeholder:null!=g?g:"Select a date",width:D,onChangeText:()=>{},rightIcon:{icon:()=>t.jsx(l.default,{style:{transform:x?"rotate(180deg)":"rotate(0deg)"},onClick:()=>{},width:20,height:20,color:n.DEFAULT_THEME.colorsV2.content.primary})}})}))})),x&&t.jsx("div",Object.assign({style:{position:"absolute",top:"calc(100% + 8px)"}},{children:t.jsx(i.DatePicker,{selectRange:!1,onSelectDate:e=>{S(e),y(!1),h(e)}})}))]}))};c.displayName="DatePickerButton",exports.DatePickerButton=c;
@@ -1 +1 @@
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;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),i=require("../../datePicker/DatePicker.js");require("react-calendar"),require("../../../utils/DateUtils.js");var n=require("../../../constants/Theme.js");require("../../TypographyStyle.js"),require("../../datePicker/DatePickerWrapper.styled.js");var a=require("../../input/Input.js"),l=require("../../input/context/InputStyleProvider.js"),s=require("../../tag/Tag.js"),o=require("../../../assets/icons/chevronDown.svg.js"),u=require("../../../assets/icons/chevronDownOutline.svg.js");const c=c=>{var d,g,p,{text:h,onSelect:v,variant:j}=c,x=e.__rest(c,["text","onSelect","variant"]);const[y,S]=r.useState(!1),[q,D]=r.useState(null),b=(null===(d=x.width)||void 0===d?void 0:d.toString())?null===(g=x.width)||void 0===g?void 0:g.toString():q?12*(null===(p=q[0])||void 0===p?void 0:p.toDateString().length)*2+"px":12*h.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"===j?t.jsx(s.Tag,{tagText:(null==q?void 0:q.length)?`${q[0].toDateString()} - ${q[1].toDateString()}`:null!=h?h:"",theme:"light",type:"neutral",variant:"regular",TrailingIcon:u.default}):t.jsx(l.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(a.Input,{state:"disabled",value:(null==q?void 0:q.length)?`${q[0].toDateString()} - ${q[1].toDateString()}`:null!=h?h:"",variant:"small",placeholder:null!=h?h:"Select a date",width:b,onChangeText:()=>{},rightIcon:{icon:()=>t.jsx(o.default,{style:{transform:y?"rotate(180deg)":"rotate(0deg)"},onClick:()=>{},width:20,height:20,color:n.DEFAULT_THEME.colorsV2.content.primary})}})}))})),y&&t.jsx("div",Object.assign({style:{position:"absolute",top:"calc(100% + 8px)"}},{children:t.jsx(i.DatePicker,{selectRange:!0,onSelectRange:(e,t)=>{D([e,t]),S(!1),v([e,t])}})}))]}))};c.displayName="DateRangeOnlyButton",exports.DateRangeOnlyButton=c;
@@ -34,11 +34,6 @@ 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>;
42
37
  export declare const BodyPrimaryLink: import("styled-components").StyledComponent<"div", any, {
43
38
  numberOfLines?: number | undefined;
44
39
  color?: string | undefined;
@@ -51,26 +46,14 @@ export declare const BodyCaption: import("styled-components").StyledComponent<"d
51
46
  numberOfLines?: number | undefined;
52
47
  color?: string | undefined;
53
48
  }, never>;
54
- export declare const AiBodyCaption: import("styled-components").StyledComponent<"div", any, {
55
- numberOfLines?: number | undefined;
56
- color?: string | undefined;
57
- }, never>;
58
49
  export declare const BodyTiny: import("styled-components").StyledComponent<"div", any, {
59
50
  numberOfLines?: number | undefined;
60
51
  color?: string | undefined;
61
52
  }, never>;
62
- export declare const AiBodyTiny: import("styled-components").StyledComponent<"div", any, {
63
- numberOfLines?: number | undefined;
64
- color?: string | undefined;
65
- }, never>;
66
53
  export declare const ButtonLarge: import("styled-components").StyledComponent<"div", any, {
67
54
  numberOfLines?: number | undefined;
68
55
  color?: string | undefined;
69
56
  }, never>;
70
- export declare const ButtonLargeAI: import("styled-components").StyledComponent<"div", any, {
71
- numberOfLines?: number | undefined;
72
- color?: string | undefined;
73
- }, never>;
74
57
  export declare const ButtonRegular: import("styled-components").StyledComponent<"div", any, {
75
58
  numberOfLines?: number | undefined;
76
59
  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",r=o.default.div`
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",l=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
- `,l=o.default.div`
11
+ `,r=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
- `,c=o.default.div`
61
+ `,O=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
- `,g=o.default.div`
71
+ `,h=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,17 +78,7 @@
78
78
  overflow: hidden;
79
79
  display: -webkit-box;
80
80
  -webkit-line-clamp: ${e=>e.numberOfLines};
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`
81
+ `,c=o.default.div`
92
82
  font-family: Inter;
93
83
  color: ${e=>e.color||t.COLORS.text.primary};
94
84
  font-weight: ${t.FONTS.bodySecondary.fontWeight};
@@ -98,18 +88,12 @@
98
88
  overflow: hidden;
99
89
  display: -webkit-box;
100
90
  -webkit-line-clamp: ${e=>e.numberOfLines};
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)`
91
+ `,S=o.default(h)`
108
92
  text-decoration: underline;
109
93
  color: ${t.COLORS.content.brand};
110
94
  text-decoration-color: ${t.COLORS.content.brand};
111
95
  cursor: pointer;
112
- `,S=o.default(O)`
96
+ `,g=o.default(c)`
113
97
  text-decoration: underline;
114
98
  color: ${t.COLORS.content.brand};
115
99
  text-decoration-color: ${t.COLORS.content.brand};
@@ -124,23 +108,7 @@
124
108
  overflow: hidden;
125
109
  display: -webkit-box;
126
110
  -webkit-line-clamp: ${e=>e.numberOfLines};
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`
111
+ `,p=o.default.div`
144
112
  color: ${e=>e.color||t.COLORS.text.primary};
145
113
  font-weight: ${t.FONTS.tiny.fontWeight};
146
114
  font-size: ${n(t.FONTS.tiny.fontSize)};
@@ -149,32 +117,7 @@
149
117
  overflow: hidden;
150
118
  display: -webkit-box;
151
119
  -webkit-line-clamp: ${e=>e.numberOfLines};
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`
168
- font-family: Inter;
169
- color: ${e=>e.color||t.COLORS.text.primary};
170
- font-weight: ${t.FONTS.buttonLarge.fontWeight};
171
- font-size: ${n(t.FONTS.buttonLarge.fontSize)};
172
- line-height: ${n(t.FONTS.buttonLarge.lineHeight)};
173
- -webkit-box-orient: vertical;
174
- overflow: hidden;
175
- display: -webkit-box;
176
- -webkit-line-clamp: ${e=>e.numberOfLines};
177
- `,u=o.default.div`
120
+ `,s=o.default.div`
178
121
  font-family: Inter;
179
122
  color: ${e=>e.color||t.COLORS.text.primary};
180
123
  font-weight: ${t.FONTS.buttonLarge.fontWeight};
@@ -184,13 +127,7 @@
184
127
  overflow: hidden;
185
128
  display: -webkit-box;
186
129
  -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`
130
+ `,$=o.default.div`
194
131
  font-family: Inter;
195
132
  color: ${e=>e.color||t.COLORS.text.primary};
196
133
  font-weight: ${t.FONTS.buttonRegular.fontWeight};
@@ -200,7 +137,7 @@
200
137
  overflow: hidden;
201
138
  display: -webkit-box;
202
139
  -webkit-line-clamp: ${e=>e.numberOfLines};
203
- `,k=o.default.div`
140
+ `,m=o.default.div`
204
141
  font-family: Inter;
205
142
  color: ${e=>e.color||t.COLORS.text.primary};
206
143
  font-weight: ${t.FONTS.subHeading.fontWeight};
@@ -210,7 +147,7 @@
210
147
  overflow: hidden;
211
148
  display: -webkit-box;
212
149
  -webkit-line-clamp: ${e=>e.numberOfLines};
213
- `,T=o.default.div`
150
+ `,w=o.default.div`
214
151
  font-family: Inter;
215
152
  color: ${e=>e.color||t.COLORS.text.primary};
216
153
  font-weight: ${t.FONTS.bodyRegular.fontWeight};
@@ -220,7 +157,7 @@
220
157
  overflow: hidden;
221
158
  display: -webkit-box;
222
159
  -webkit-line-clamp: ${e=>e.numberOfLines};
223
- `,v=o.default.div`
160
+ `,u=o.default.div`
224
161
  font-family: Inter;
225
162
  color: ${t.COLORS.text.primary};
226
163
  font-weight: ${t.FONTS.caption.fontWeight};
@@ -230,4 +167,4 @@
230
167
  overflow: hidden;
231
168
  display: -webkit-box;
232
169
  -webkit-line-clamp: ${e=>e.numberOfLines};
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;
170
+ `;exports.BodyCaption=y,exports.BodyLarge=O,exports.BodyPrimary=h,exports.BodyPrimaryLink=S,exports.BodyRegular=w,exports.BodySecondary=c,exports.BodySecondaryLink=g,exports.BodyTiny=p,exports.ButtonLarge=s,exports.ButtonRegular=$,exports.Caption=u,exports.Display=b,exports.SmallRegular=a,exports.SubHeading=m,exports.TitleLarge=l,exports.TitleMedium=r,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"),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
+ "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");require("react-calendar"),require("../../utils/DateUtils.js");var i=require("../TypographyStyle.js");require("../datePicker/DatePickerWrapper.styled.js");var l=require("./CommonStyles.js");const a=o=>{let{eachOption:t,selectedOption:s,selectedDate:a,onClickingEachItem:r,rangeSelection:c}=o;return e.jsxs(l.ItemMenuContainer,Object.assign({onClick:()=>r(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:c?`${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=r=>{let{options:c,placeholder:u="Select an option",selected:p,onOptionSelected:g,resetDropdown:v,maxHeight:j,backgroundColor:m,calendarPopperConfig:O,variant:D="default",datePickerPlacement:y,closeDropdown:S}=r;var b,h,x;const[f,k]=o.useState(!1),[w,C]=o.useState(p),[R,E]=o.useState(),[q,T]=o.useState(!1),P=()=>{!f&&T(!q)},[A,M]=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((()=>{T(!1),k(!1)}),[S]),e.jsx(e.Fragment,{children:e.jsxs(l.MainDropdown,Object.assign({drop:"down",show:q,onToggle:P,backgroundColor:m,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==A?void 0:A.label)?null==A?void 0:A.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&&T(!1),k(!f)}},{children:[e.jsx("div",Object.assign({style:{maxHeight:j||"auto",overflowY:"scroll"}},{children:c.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),M(e),P(),!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==O?void 0:O.offsetSkid)||0,(null==O?void 0:O.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]}))),M(w),k(!1),E(t),T(!q)},onSelectDate:e=>{(null==w?void 0:w.dateRangeSelectionOptions)&&(w.dateRangeSelectionOptions.selectedDates=[e,e],g(Object.assign(Object.assign({},w),{selectedRange:[e,e]}))),M(w),k(!1),E([e,e]),T(!q)}})}))]}))}))]}))})},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"),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
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),i=require("react"),n=require("../spinner/Spinner.js"),s=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(i);const c=i.forwardRef(((i,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:g,onClick:x,matchParentWidth:f,subtitle:y,darkMode:N,activated:C,error:O}=i,B=e.__rest(i,["version","id","buttonType","size","buttonText","disabled","IconComponent","LeadingIcon","TrailingIcon","isLoading","inverse","onClick","matchParentWidth","subtitle","darkMode","activated","error"]);const T=a.GetButtonTextComponent(u,l),k="chip"===u?16:20,I={height:k,width:k,color:a.getButtonIconColor(u,l,g,j,v,N),style:{display:"block"},className:"icon"};return t.jsx(s.Button,Object.assign({"data-test":B["data-test"],version:c,onClick:v?()=>{}:x,ref:r,id:d,disabled:j,size:u,buttonType:l,isLoading:v,inverse:g,matchParentWidth:f,darkMode:N,activated:C,error:O},B,{children:t.jsxs("div",Object.assign({className:"button-container"},{children:[l.startsWith("dash")&&t.jsx(s.ButtonCustomDashedBorder,{}),t.jsx("div",Object.assign({className:"overlay-container"},{children:v&&t.jsx(n.Spinner,{className:"spinner",size:"small",color:a.SpinnerColorMap(l,g)})})),b&&t.jsx("div",Object.assign({className:"icon-component"},{children:o.default.createElement(b,I)})),h&&t.jsx("div",Object.assign({className:"icon-leading"},{children:o.default.createElement(h,I)})),m?t.jsxs(T,Object.assign({className:"text"},{children:[m,t.jsx("div",Object.assign({className:"text-subtitle"},{children:y}))]})):t.jsx(t.Fragment,{}),p&&t.jsx("div",Object.assign({className:"icon-trailing"},{children:o.default.createElement(p,I)}))]}))}))}));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' | 'ai';
3
+ export type Type = 'primary' | 'secondary' | 'tertiary' | 'tertiaryGray' | 'destructive' | 'dashBold' | 'dashRegular' | 'text';
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, disabled?: boolean) => import("styled-components").StyledComponent<"div", any, {
6
+ export declare const GetButtonTextComponent: (size: Size, type: Type) => 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) => string;
13
+ export declare const getHoverButtonBackground: (type: Type, inverse?: boolean) => "" | "background-color:transparent;" | "background-color: #000000;\n\t\t\t\topacity: 0.03;";
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,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
+ "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=(t,r)=>"text"===t?"background-color:transparent;":r||"primary"===t?"":"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"),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
+ "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");require("react-calendar");var n=require("../../../hooks/useOutside.js"),u=require("../../../utils/DateUtils.js");require("../../../constants/Theme.js"),require("../../TypographyStyle.js"),require("../../datePicker/DatePickerWrapper.styled.js");var o=require("../../dropdown/Common.styled.js"),c=require("../../dropShadow/DropShadow.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=d(r);exports.default=d=>{const[j,p]=r.useState(null),[h,f]=r.useState(null),[y,g]=r.useState(!1),{styles:m,attributes:D}=a.usePopper(j,h,{placement:d.placement}),q=l.default.useRef();return n.useOutside(q,(()=>{g(!1)})),e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({className:"date-preview",ref:p,onClick:()=>{g(!y)}},{children:[e.jsx(t.default,{width:24,height:24}),e.jsx("span",Object.assign({style:{marginLeft:8}},{children:u.default.onlyDateFormat(d.customDate,"dd MMM yyyy")})),e.jsx(s.default,{style:{marginLeft:"auto"},width:22,height:22})]})),y&&e.jsx(o.OpenDropdownContainer,Object.assign({ref:f,style:Object.assign(Object.assign({},m.popper),{zIndex:3})},D.popper,{children:e.jsx("div",Object.assign({ref:q},{children:e.jsx(c.default,Object.assign({level:"z2",position:"down",style:{borderRadius:4}},{children:e.jsx(i.DatePicker,{selectedDate:d.customDate||new Date,selectRange:!1,onSelectDate:e=>{g(!1),d.setCustomDate(e)},minDate:d.minDate})}))}))}))]})};
@@ -1 +1,2 @@
1
1
  export * from './DatePicker';
2
+ export * from './DatePickerWrapper';
@@ -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 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
+ "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 u=u=>{var d,c,p,{placeHolder:h,size:v,onSelect:g,defaultOptions:j,disabled:f,noErrorHint:b,placeHolderHeight:x}=u,w=e.__rest(u,["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!==(d=w.buttonWidth)&&void 0!==d?d: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})},truncateText:!0})}))}))};u.displayName="Dropdown",exports.Dropdown=u;
@@ -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&&"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`}
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-color: ${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' | 'ai';
2
+ export type IconButtonType = 'default' | 'negative' | 'positive' | 'warning';
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:"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}};
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}};
@@ -58,5 +58,6 @@ export interface InputProps {
58
58
  minHeight?: string;
59
59
  maxHeight?: string;
60
60
  labelTextBold?: boolean;
61
+ truncateText?: boolean;
61
62
  }
62
63
  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: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;
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:N,maxHeight:P,labelTextBold:G,truncateText:W}=Object.assign({maxCharLimit:0,type:"text",variant:"default"},d),V=null==y?void 0:y.icon,$=null==b?void 0:b.icon,[J,Q]=n.useState(!1),[U,X]=n.useState(!1),[Y,Z]=n.useState(),ee="small"===E?"18px":"22px",te=n.useContext(u.InputStyleContext),[ne,ie]=n.useState(),re=n.useRef(null),se=null!=h?h:re;n.useEffect((()=>{ie(L),!L&&K&&(se.current.style.height=N||"48px")}),[L]),n.useEffect((()=>{var e;se.current&&(null===(e=d.onReferenceInit)||void 0===e||e.call(d,se.current))}),[se]),n.useEffect((()=>{const e=se.current;if(e&&["phonenumber","zip","number"].includes(w))return e.addEventListener("wheel",ue,{passive:!1}),()=>{e.removeEventListener("wheel",ue)}}),[]),n.useEffect((()=>{B&&ie("")}),[B]),n.useEffect((()=>{var e;X(!!d.isActive),d.isActive&&(null===(e=se.current)||void 0===e||e.focus())}),[d.isActive]),n.useEffect((()=>{Z(d.errorMessage)}),[d.errorMessage]),n.useEffect((()=>{var e;Q(!1),("invalid"===d.state||Y||"disabled-invalid"===d.state)&&Q(!0),"active"===d.state&&(null===(e=se.current)||void 0===e||e.focus())}),[d.state,Y]),n.useEffect((()=>{Q(!!Y)}),[Y]);const le=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)}},ae=()=>"zip"===w?6:60,oe=e=>{const t=0!==C?C:ae();if(z||F(L||"",e),D)return;const n=e.target.value;![8].includes(e.which)&&t>0&&n.length>=t&&e.preventDefault()},ue=e=>{e.preventDefault()},ce=e=>{let t=e.target.value;const n=0!==C?C+1:ae();!D&&n>0&&t.length>=n&&(t=t.substring(0,n-1)),F(t,e),d.textControl||ie(t),K&&(se.current.style.height=`${se.current.scrollHeight}px`,t||(se.current.style.height=N||"48px"));const i=T||r.validateInput;if(!i||!r.isFunction(i))return;const[s,l]=i(t,w,M);Q(!s),Z(d.errorMessage?d.errorMessage:l)},de=e=>{var t;d.skipFocus||X(!0),le(null===(t=d.onFocus)||void 0===t?void 0:t.call(d,e))},he=e=>{var t;d.skipFocus||X(!1),le(null===(t=d.onBlur)||void 0===t?void 0:t.call(d,e))},ve=()=>{var t;return e.jsxs(e.Fragment,{children:["multiline"!==w&&e.jsx("input",{className:W?"truncate-class":"","data-test":d["data-test"],id:d.id,style:null!==(t=null==te?void 0:te.input)&&void 0!==t?t:{},ref:se,type:["phonenumber","zip","number"].includes(w)?"number":w,value:ne,onFocus:e=>de(e),onBlur:e=>he(e),placeholder:f||"Enter here",onChange:ce,onClick:e=>le(d.onClick),onKeyDown:e=>oe(e)}),"multiline"===w&&e.jsx("textarea",{"data-test":d["data-test"],value:ne,ref:se,onFocus:e=>de(e),onBlur:e=>he(e),onClick:e=>le(d.onClick),placeholder:f||"Enter here",onChange:ce,onKeyDown:e=>oe(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==te?void 0:te.RootContainer)&&void 0!==v?v:{}},{children:[!R&&(!!O||!!Y)&&e.jsxs(c.InputFooter,Object.assign({invalid:!!Y},{children:[!!Y&&e.jsx(o.default,{width:16,height:16}),Y||O]})),e.jsxs(c.InputWrapper,Object.assign({variant:E,state:S,width:d.width,isActive:"active"===S||U,isInvalid:J,style:null!==(p=null==te?void 0:te.InputWrapper)&&void 0!==p?p:{},version:A,height:d.height},{children:[!!V&&e.jsx(c.IconHolder,Object.assign({variant:E,iconSize:ee,onClick:()=>le(null==y?void 0:y.callback),isLeft:!0,style:null!==(x=null==te?void 0:te.IconHolder)&&void 0!==x?x:{}},{children:e.jsx(V,{})})),!!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:N,maxHeight:P,autoGrow:K},{children:ve()})),"small"===E&&e.jsx(c.InputContainerSmall,Object.assign({height:d.height,type:d.type},{children:ve()})),!!$&&e.jsx(c.IconHolder,Object.assign({variant:E,iconSize:ee,onClick:()=>le(null==b?void 0:b.callback),isLeft:!1},{children:e.jsx($,{})})),!!q&&e.jsx(c.SuffixHolder,Object.assign({variant:E},{children:q})),k&&k.text&&e.jsx(i.Button,{buttonText:k.text,onClick:()=>le(null==k?void 0:k.onClick)})]})),(!!m||!!C)&&e.jsxs(c.InputHeader,Object.assign({invalid:J},{children:[_&&_,e.jsxs("div",Object.assign({className:"label__container"},{children:[G?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:J?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;