@bikdotai/bik-component-library 0.0.200 → 0.0.201-beta-inbox-v3-01
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/components/accordion/Accordion.d.ts +5 -2
- package/dist/cjs/components/accordion/Accordion.js +1 -1
- package/dist/cjs/components/accordion/Accordion.style.d.ts +2 -0
- package/dist/cjs/components/accordion/Accordion.style.js +8 -4
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/cjs/components/country-code-picker/CountryCodePicker.js +1 -1
- package/dist/cjs/components/country-code-picker/CountryCodePicker.styled.js +1 -1
- package/dist/cjs/components/stepper/WorkingStepper.d.ts +0 -1
- package/dist/esm/components/accordion/Accordion.d.ts +5 -2
- package/dist/esm/components/accordion/Accordion.js +1 -1
- package/dist/esm/components/accordion/Accordion.style.d.ts +2 -0
- package/dist/esm/components/accordion/Accordion.style.js +8 -4
- package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/esm/components/country-code-picker/CountryCodePicker.js +1 -1
- package/dist/esm/components/country-code-picker/CountryCodePicker.styled.js +1 -1
- package/dist/esm/components/stepper/WorkingStepper.d.ts +0 -1
- package/package.json +1 -1
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
export interface AccordionProps {
|
|
3
|
-
header: string;
|
|
4
|
-
caption
|
|
3
|
+
header: JSX.Element | string;
|
|
4
|
+
caption?: string;
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
width?: string;
|
|
7
|
+
rightActionComponent?: JSX.Element;
|
|
7
8
|
contentMargin?: string;
|
|
9
|
+
skipHoverHeader?: boolean;
|
|
10
|
+
headerPadding?: number;
|
|
8
11
|
}
|
|
9
12
|
export declare const BikAccordion: React.FC<AccordionProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../TypographyStyle.js"),n=require("./Accordion.style.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../TypographyStyle.js"),n=require("./Accordion.style.js"),i=require("./AccordionArrow.js");exports.BikAccordion=s=>{const[a,c]=r.useState(!1),o=r.useRef(null),d=r.useRef(null),l=(e,r)=>{d.current&&o.current&&("keydown"===r.type&&"Enter"!==r.key||(c(e),d.current.style.maxHeight?(d.current.style.maxHeight="",o.current.style.transform="rotate(0deg)",o.current.style.transition="transform 0.25s ease-in-out",d.current.style.padding="0",d.current.style.transition=" padding 0s"):(d.current.style.maxHeight=d.current.scrollHeight+"px",o.current.style.transform="rotate(180deg)",d.current.style.padding="0px 24px 24px 24px",o.current.style.transition="transform 0.25s ease-in-out",d.current.style.transition="max-height 0.25s ease-in-out")))};return e.jsxs(n.default,Object.assign({className:"accordion",isActive:a,width:null==s?void 0:s.width,contentMargin:null==s?void 0:s.contentMargin,headerPadding:s.headerPadding,skipHoverState:s.skipHoverHeader},{children:[e.jsxs("div",Object.assign({className:"accordion__overview "+(a?"active":""),onClick:e=>l(!a,e),onKeyDown:e=>l(!a,e),role:"button",tabIndex:0},{children:[!s.rightActionComponent&&e.jsxs("div",Object.assign({className:"accordion__overview__header"},{children:["string"==typeof s.header?e.jsx(t.TitleRegular,{children:null==s?void 0:s.header}):s.header,e.jsx(i.default,{ref:o})]})),s.rightActionComponent&&e.jsxs("div",Object.assign({className:"accordion__overview__header"},{children:[e.jsxs("div",Object.assign({className:"accordion__overview__title-wrapper"},{children:[e.jsx(i.default,{ref:o}),"string"==typeof s.header?e.jsx(t.TitleRegular,{children:null==s?void 0:s.header}):s.header]})),s.rightActionComponent]})),(null==s?void 0:s.caption)&&e.jsx("div",Object.assign({className:"accordion__overview__caption"},{children:e.jsx(t.BodySecondary,{children:s.caption})}))]})),e.jsx("div",Object.assign({ref:d,className:"accordion__content"},{children:s.children}))]}))};
|
|
@@ -2,5 +2,7 @@ declare const AccordionStyle: import("styled-components").StyledComponent<"div",
|
|
|
2
2
|
isActive: boolean;
|
|
3
3
|
width?: string | undefined;
|
|
4
4
|
contentMargin?: string | undefined;
|
|
5
|
+
skipHoverState?: boolean | undefined;
|
|
6
|
+
headerPadding?: number | undefined;
|
|
5
7
|
}, never>;
|
|
6
8
|
export default AccordionStyle;
|
|
@@ -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}}const
|
|
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}}const d=i(e).default.div`
|
|
2
2
|
width: ${e=>(null==e?void 0:e.width)||"100%"};
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -7,15 +7,19 @@
|
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
gap: 4px;
|
|
10
|
-
padding: 24px;
|
|
10
|
+
padding: ${e=>e.headerPadding?`${e.headerPadding}px`:"24px"};
|
|
11
11
|
&__header {
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: row;
|
|
14
14
|
align-items: center;
|
|
15
15
|
justify-content: space-between;
|
|
16
16
|
}
|
|
17
|
+
&__title-wrapper {
|
|
18
|
+
display: flex;
|
|
19
|
+
gap: 8px;
|
|
20
|
+
}
|
|
17
21
|
:hover {
|
|
18
|
-
background: ${t.COLORS.surface.subdued};
|
|
22
|
+
background: ${e=>e.skipHoverState?null:t.COLORS.surface.subdued};
|
|
19
23
|
border-radius: 4px;
|
|
20
24
|
}
|
|
21
25
|
}
|
|
@@ -25,4 +29,4 @@
|
|
|
25
29
|
max-height: 0;
|
|
26
30
|
}
|
|
27
31
|
}
|
|
28
|
-
`;exports.default=
|
|
32
|
+
`;exports.default=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("../../assets/icons/chevronDown.svg.js"),r=require("react"),t=require("./CountryCodePicker.modal.js"),n=require("./CountryCodePicker.styled.js");require("../dropdown/Dropdown.js");var s=require("../dropdown/DropdownPopover/index.js");require("../zeroState/ZeroState.js");var d=require("../TypographyStyle.js"),i=require("../../constants/Theme.js");require("../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../checkBox/CheckBox.styled.js"),require("../list-item/ListItem.js"),require("../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../dropdown/OpenedDropdown/components/menu/SelectAllMenu.js"),require("../button/Button.js"),require("../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../input/Input.js"),require("../dropdown/MenuItem/MenuItem.js");exports.CountryCodePicker=c=>{var l,u,p,a,m,j;const[y,w]=r.useState(null!==(l=c.selectedCountry)&&void 0!==l?l:{name:"India",dial:"+91",code:"IN"}),v=`https://flagcdn.com/${null===(u=y.code)||void 0===u?void 0:u.toLowerCase()}.svg`;r.useEffect((()=>{c.selectedCountry&&w(c.selectedCountry)}),[null===(p=c.selectedCountry)||void 0===p?void 0:p.code]);return e.jsx(s.DropdownPopover,Object.assign({isSearchable:!0,width:null!==(a=c.popoverWidth)&&void 0!==a?a:"200px",placement:null!==(m=c.placement)&&void 0!==m?m:"bottom-start",strategy:null!==(j=c.placementStrategy)&&void 0!==j?j:"absolute",options:t.CountriesData.map((o=>{var r;const t=`https://flagcdn.com/${null===(r=o.code)||void 0===r?void 0:r.toLowerCase()}.svg`;return{value:o.code,label:o.dial,searchKey:o.name,customComponent:e.jsxs(n.StyledCountryPickerOption,{children:[e.jsx("img",{src:t,className:"country-flag__option",alt:o.name}),e.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),o=require("../../assets/icons/chevronDown.svg.js"),r=require("react"),t=require("./CountryCodePicker.modal.js"),n=require("./CountryCodePicker.styled.js");require("../dropdown/Dropdown.js");var s=require("../dropdown/DropdownPopover/index.js");require("../zeroState/ZeroState.js");var d=require("../TypographyStyle.js"),i=require("../../constants/Theme.js");require("../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../checkBox/CheckBox.styled.js"),require("../list-item/ListItem.js"),require("../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../dropdown/OpenedDropdown/components/menu/SelectAllMenu.js"),require("../button/Button.js"),require("../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../input/Input.js"),require("../dropdown/MenuItem/MenuItem.js");exports.CountryCodePicker=c=>{var l,u,p,a,m,j;const[y,w]=r.useState(null!==(l=c.selectedCountry)&&void 0!==l?l:{name:"India",dial:"+91",code:"IN"}),v=`https://flagcdn.com/${null===(u=y.code)||void 0===u?void 0:u.toLowerCase()}.svg`;r.useEffect((()=>{c.selectedCountry&&w(c.selectedCountry)}),[null===(p=c.selectedCountry)||void 0===p?void 0:p.code]);return e.jsx(s.DropdownPopover,Object.assign({isSearchable:!0,width:null!==(a=c.popoverWidth)&&void 0!==a?a:"200px",placement:null!==(m=c.placement)&&void 0!==m?m:"bottom-start",strategy:null!==(j=c.placementStrategy)&&void 0!==j?j:"absolute",options:t.CountriesData.map((o=>{var r;const t=`https://flagcdn.com/${null===(r=o.code)||void 0===r?void 0:r.toLowerCase()}.svg`;return{value:o.code,label:o.dial,searchKey:o.name,customComponent:e.jsxs(n.StyledCountryPickerOption,{children:[e.jsx("img",{src:t,className:"country-flag__option",alt:o.name}),e.jsxs(d.BodySecondary,{children:[o.code," ",o.dial]})]}),selected:y.code===o.code}})),onSelect:e=>{const o=t.CountriesData.filter((o=>o.code===e.value));w(o[0]),c.onCountrySelect(o[0])}},{children:e.jsxs(n.StyledCountryPickerWrapper,Object.assign({height:c.height},{children:[e.jsxs("div",Object.assign({className:"content__wrapper"},{children:[e.jsx("img",{src:v,className:"country-flag__selected-option",alt:y.name}),e.jsx(d.BodySecondary,{children:y.dial})]})),e.jsx(o.default,{width:24,height:24,color:i.COLORS.content.primary})]}))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var c=require("@emotion/styled/base"),l=require("../../constants/Theme.js");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var c=require("@emotion/styled/base"),l=require("../../constants/Theme.js");function t(c){return c&&"object"==typeof c&&"default"in c?c:{default:c}}var e=t(c);const b=e.default("div","production"===process.env.NODE_ENV?{target:"efxlby21"}:{target:"efxlby21",label:"StyledCountryPickerOption"})("production"===process.env.NODE_ENV?{name:"1rta7hl",styles:"display:flex;align-items:center;flex-direction:row;gap:12px;width:100%;.country-flag__option{width:24px;height:auto;}"}:{name:"1rta7hl",styles:"display:flex;align-items:center;flex-direction:row;gap:12px;width:100%;.country-flag__option{width:24px;height:auto;}",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvdW50cnlDb2RlUGlja2VyLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRW9EIiwiZmlsZSI6IkNvdW50cnlDb2RlUGlja2VyLnN0eWxlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuZXhwb3J0IGNvbnN0IFN0eWxlZENvdW50cnlQaWNrZXJPcHRpb24gPSBzdHlsZWQuZGl2IGBcblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZmxleC1kaXJlY3Rpb246IHJvdztcblx0Z2FwOiAxMnB4O1xuXHR3aWR0aDogMTAwJTtcblxuXHQuY291bnRyeS1mbGFnX19vcHRpb24ge1xuXHRcdHdpZHRoOiAyNHB4O1xuXHRcdGhlaWdodDogYXV0bztcblx0fVxuYDtcclxuZXhwb3J0IGNvbnN0IFN0eWxlZENvdW50cnlQaWNrZXJXcmFwcGVyID0gc3R5bGVkLmRpdiBgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2Vlbjtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Z2FwOiA4cHg7XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcblx0Ym9yZGVyOiAxcHggc29saWQgJHtDT0xPUlMuc3Ryb2tlLnByaW1hcnl9O1xuXHRwYWRkaW5nOiA2cHggOHB4O1xuXHRoZWlnaHQ6ICR7KHByb3BzKSA9PiBwcm9wcy5oZWlnaHR9O1xuXG5cdC5jb250ZW50X193cmFwcGVyIHtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGdhcDogOHB4O1xuXHR9XG5cblx0LmNvdW50cnktZmxhZ19fc2VsZWN0ZWQtb3B0aW9uIHtcblx0XHR3aWR0aDogMjRweDtcblx0XHRoZWlnaHQ6IGF1dG87XG5cdH1cbmA7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPUNvdW50cnlDb2RlUGlja2VyLnN0eWxlZC5qcy5tYXAiXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}),a=e.default("div","production"===process.env.NODE_ENV?{target:"efxlby20"}:{target:"efxlby20",label:"StyledCountryPickerWrapper"})("display:flex;justify-content:space-between;align-items:center;gap:8px;border-radius:4px;border:1px solid ",l.COLORS.stroke.primary,";padding:6px 8px;height:",(c=>c.height),";.content__wrapper{display:flex;gap:8px;}.country-flag__selected-option{width:24px;height:auto;}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvdW50cnlDb2RlUGlja2VyLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBY3FEIiwiZmlsZSI6IkNvdW50cnlDb2RlUGlja2VyLnN0eWxlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuZXhwb3J0IGNvbnN0IFN0eWxlZENvdW50cnlQaWNrZXJPcHRpb24gPSBzdHlsZWQuZGl2IGBcblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZmxleC1kaXJlY3Rpb246IHJvdztcblx0Z2FwOiAxMnB4O1xuXHR3aWR0aDogMTAwJTtcblxuXHQuY291bnRyeS1mbGFnX19vcHRpb24ge1xuXHRcdHdpZHRoOiAyNHB4O1xuXHRcdGhlaWdodDogYXV0bztcblx0fVxuYDtcclxuZXhwb3J0IGNvbnN0IFN0eWxlZENvdW50cnlQaWNrZXJXcmFwcGVyID0gc3R5bGVkLmRpdiBgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2Vlbjtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Z2FwOiA4cHg7XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcblx0Ym9yZGVyOiAxcHggc29saWQgJHtDT0xPUlMuc3Ryb2tlLnByaW1hcnl9O1xuXHRwYWRkaW5nOiA2cHggOHB4O1xuXHRoZWlnaHQ6ICR7KHByb3BzKSA9PiBwcm9wcy5oZWlnaHR9O1xuXG5cdC5jb250ZW50X193cmFwcGVyIHtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGdhcDogOHB4O1xuXHR9XG5cblx0LmNvdW50cnktZmxhZ19fc2VsZWN0ZWQtb3B0aW9uIHtcblx0XHR3aWR0aDogMjRweDtcblx0XHRoZWlnaHQ6IGF1dG87XG5cdH1cbmA7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPUNvdW50cnlDb2RlUGlja2VyLnN0eWxlZC5qcy5tYXAiXX0= */"));exports.StyledCountryPickerOption=b,exports.StyledCountryPickerWrapper=a;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
export interface AccordionProps {
|
|
3
|
-
header: string;
|
|
4
|
-
caption
|
|
3
|
+
header: JSX.Element | string;
|
|
4
|
+
caption?: string;
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
width?: string;
|
|
7
|
+
rightActionComponent?: JSX.Element;
|
|
7
8
|
contentMargin?: string;
|
|
9
|
+
skipHoverHeader?: boolean;
|
|
10
|
+
headerPadding?: number;
|
|
8
11
|
}
|
|
9
12
|
export declare const BikAccordion: React.FC<AccordionProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useState as t,useRef as n}from"react";import{TitleRegular as i,BodySecondary as o}from"../TypographyStyle.js";import c from"./Accordion.style.js";import
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useState as t,useRef as n}from"react";import{TitleRegular as i,BodySecondary as o}from"../TypographyStyle.js";import c from"./Accordion.style.js";import a from"./AccordionArrow.js";const s=s=>{const[d,l]=t(!1),h=n(null),m=n(null),p=(e,r)=>{m.current&&h.current&&("keydown"===r.type&&"Enter"!==r.key||(l(e),m.current.style.maxHeight?(m.current.style.maxHeight="",h.current.style.transform="rotate(0deg)",h.current.style.transition="transform 0.25s ease-in-out",m.current.style.padding="0",m.current.style.transition=" padding 0s"):(m.current.style.maxHeight=m.current.scrollHeight+"px",h.current.style.transform="rotate(180deg)",m.current.style.padding="0px 24px 24px 24px",h.current.style.transition="transform 0.25s ease-in-out",m.current.style.transition="max-height 0.25s ease-in-out")))};return e(c,Object.assign({className:"accordion",isActive:d,width:null==s?void 0:s.width,contentMargin:null==s?void 0:s.contentMargin,headerPadding:s.headerPadding,skipHoverState:s.skipHoverHeader},{children:[e("div",Object.assign({className:"accordion__overview "+(d?"active":""),onClick:e=>p(!d,e),onKeyDown:e=>p(!d,e),role:"button",tabIndex:0},{children:[!s.rightActionComponent&&e("div",Object.assign({className:"accordion__overview__header"},{children:["string"==typeof s.header?r(i,{children:null==s?void 0:s.header}):s.header,r(a,{ref:h})]})),s.rightActionComponent&&e("div",Object.assign({className:"accordion__overview__header"},{children:[e("div",Object.assign({className:"accordion__overview__title-wrapper"},{children:[r(a,{ref:h}),"string"==typeof s.header?r(i,{children:null==s?void 0:s.header}):s.header]})),s.rightActionComponent]})),(null==s?void 0:s.caption)&&r("div",Object.assign({className:"accordion__overview__caption"},{children:r(o,{children:s.caption})}))]})),r("div",Object.assign({ref:m,className:"accordion__content"},{children:s.children}))]}))};export{s as BikAccordion};
|
|
@@ -2,5 +2,7 @@ declare const AccordionStyle: import("styled-components").StyledComponent<"div",
|
|
|
2
2
|
isActive: boolean;
|
|
3
3
|
width?: string | undefined;
|
|
4
4
|
contentMargin?: string | undefined;
|
|
5
|
+
skipHoverState?: boolean | undefined;
|
|
6
|
+
headerPadding?: number | undefined;
|
|
5
7
|
}, never>;
|
|
6
8
|
export default AccordionStyle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from"styled-components";import{COLORS as i}from"../../constants/Theme.js";const
|
|
1
|
+
import e from"styled-components";import{COLORS as i}from"../../constants/Theme.js";const d=e.div`
|
|
2
2
|
width: ${e=>(null==e?void 0:e.width)||"100%"};
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -7,15 +7,19 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
9
|
gap: 4px;
|
|
10
|
-
padding: 24px;
|
|
10
|
+
padding: ${e=>e.headerPadding?`${e.headerPadding}px`:"24px"};
|
|
11
11
|
&__header {
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: row;
|
|
14
14
|
align-items: center;
|
|
15
15
|
justify-content: space-between;
|
|
16
16
|
}
|
|
17
|
+
&__title-wrapper {
|
|
18
|
+
display: flex;
|
|
19
|
+
gap: 8px;
|
|
20
|
+
}
|
|
17
21
|
:hover {
|
|
18
|
-
background: ${i.surface.subdued};
|
|
22
|
+
background: ${e=>e.skipHoverState?null:i.surface.subdued};
|
|
19
23
|
border-radius: 4px;
|
|
20
24
|
}
|
|
21
25
|
}
|
|
@@ -25,4 +29,4 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
25
29
|
max-height: 0;
|
|
26
30
|
}
|
|
27
31
|
}
|
|
28
|
-
`;export{
|
|
32
|
+
`;export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,jsxs as e}from"react/jsx-runtime";import t from"../../assets/icons/chevronDown.svg.js";import{useState as n,useEffect as r}from"react";import{CountriesData as d}from"./CountryCodePicker.modal.js";import{StyledCountryPickerWrapper as s,StyledCountryPickerOption as p}from"./CountryCodePicker.styled.js";import"../dropdown/Dropdown.js";import{DropdownPopover as i}from"../dropdown/DropdownPopover/index.js";import"../zeroState/ZeroState.js";import{BodySecondary as c}from"../TypographyStyle.js";import{COLORS as m}from"../../constants/Theme.js";import"../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../checkBox/CheckBox.styled.js";import"../list-item/ListItem.js";import"../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../dropdown/OpenedDropdown/components/menu/SelectAllMenu.js";import"../button/Button.js";import"../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../input/Input.js";import"../dropdown/MenuItem/MenuItem.js";const l=l=>{var a,u,w,h,j,y;const[v,g]=n(null!==(a=l.selectedCountry)&&void 0!==a?a:{name:"India",dial:"+91",code:"IN"}),f=`https://flagcdn.com/${null===(u=v.code)||void 0===u?void 0:u.toLowerCase()}.svg`;r((()=>{l.selectedCountry&&g(l.selectedCountry)}),[null===(w=l.selectedCountry)||void 0===w?void 0:w.code]);return o(i,Object.assign({isSearchable:!0,width:null!==(h=l.popoverWidth)&&void 0!==h?h:"200px",placement:null!==(j=l.placement)&&void 0!==j?j:"bottom-start",strategy:null!==(y=l.placementStrategy)&&void 0!==y?y:"absolute",options:d.map((t=>{var n;const r=`https://flagcdn.com/${null===(n=t.code)||void 0===n?void 0:n.toLowerCase()}.svg`;return{value:t.code,label:t.dial,searchKey:t.name,customComponent:e(p,{children:[o("img",{src:r,className:"country-flag__option",alt:t.name}),
|
|
1
|
+
import{jsx as o,jsxs as e}from"react/jsx-runtime";import t from"../../assets/icons/chevronDown.svg.js";import{useState as n,useEffect as r}from"react";import{CountriesData as d}from"./CountryCodePicker.modal.js";import{StyledCountryPickerWrapper as s,StyledCountryPickerOption as p}from"./CountryCodePicker.styled.js";import"../dropdown/Dropdown.js";import{DropdownPopover as i}from"../dropdown/DropdownPopover/index.js";import"../zeroState/ZeroState.js";import{BodySecondary as c}from"../TypographyStyle.js";import{COLORS as m}from"../../constants/Theme.js";import"../dropdown/OpenedDropdown/components/description/Description.styled.js";import"../checkBox/CheckBox.styled.js";import"../list-item/ListItem.js";import"../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js";import"../dropdown/OpenedDropdown/components/menu/MenuItem.js";import"../dropdown/OpenedDropdown/components/menu/MenuList.styled.js";import"../dropdown/OpenedDropdown/components/menu/SelectAllMenu.js";import"../button/Button.js";import"../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js";import"../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js";import"../input/Input.js";import"../dropdown/MenuItem/MenuItem.js";const l=l=>{var a,u,w,h,j,y;const[v,g]=n(null!==(a=l.selectedCountry)&&void 0!==a?a:{name:"India",dial:"+91",code:"IN"}),f=`https://flagcdn.com/${null===(u=v.code)||void 0===u?void 0:u.toLowerCase()}.svg`;r((()=>{l.selectedCountry&&g(l.selectedCountry)}),[null===(w=l.selectedCountry)||void 0===w?void 0:w.code]);return o(i,Object.assign({isSearchable:!0,width:null!==(h=l.popoverWidth)&&void 0!==h?h:"200px",placement:null!==(j=l.placement)&&void 0!==j?j:"bottom-start",strategy:null!==(y=l.placementStrategy)&&void 0!==y?y:"absolute",options:d.map((t=>{var n;const r=`https://flagcdn.com/${null===(n=t.code)||void 0===n?void 0:n.toLowerCase()}.svg`;return{value:t.code,label:t.dial,searchKey:t.name,customComponent:e(p,{children:[o("img",{src:r,className:"country-flag__option",alt:t.name}),e(c,{children:[t.code," ",t.dial]})]}),selected:v.code===t.code}})),onSelect:o=>{const e=d.filter((e=>e.code===o.value));g(e[0]),l.onCountrySelect(e[0])}},{children:e(s,Object.assign({height:l.height},{children:[e("div",Object.assign({className:"content__wrapper"},{children:[o("img",{src:f,className:"country-flag__selected-option",alt:v.name}),o(c,{children:v.dial})]})),o(t,{width:24,height:24,color:m.content.primary})]}))}))};export{l as CountryCodePicker};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import c from"@emotion/styled/base";import{COLORS as l}from"../../constants/Theme.js";const t=c("div","production"===process.env.NODE_ENV?{target:"efxlby21"}:{target:"efxlby21",label:"StyledCountryPickerOption"})("production"===process.env.NODE_ENV?{name:"
|
|
1
|
+
import c from"@emotion/styled/base";import{COLORS as l}from"../../constants/Theme.js";const t=c("div","production"===process.env.NODE_ENV?{target:"efxlby21"}:{target:"efxlby21",label:"StyledCountryPickerOption"})("production"===process.env.NODE_ENV?{name:"1rta7hl",styles:"display:flex;align-items:center;flex-direction:row;gap:12px;width:100%;.country-flag__option{width:24px;height:auto;}"}:{name:"1rta7hl",styles:"display:flex;align-items:center;flex-direction:row;gap:12px;width:100%;.country-flag__option{width:24px;height:auto;}",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvdW50cnlDb2RlUGlja2VyLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRW9EIiwiZmlsZSI6IkNvdW50cnlDb2RlUGlja2VyLnN0eWxlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuZXhwb3J0IGNvbnN0IFN0eWxlZENvdW50cnlQaWNrZXJPcHRpb24gPSBzdHlsZWQuZGl2IGBcblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZmxleC1kaXJlY3Rpb246IHJvdztcblx0Z2FwOiAxMnB4O1xuXHR3aWR0aDogMTAwJTtcblxuXHQuY291bnRyeS1mbGFnX19vcHRpb24ge1xuXHRcdHdpZHRoOiAyNHB4O1xuXHRcdGhlaWdodDogYXV0bztcblx0fVxuYDtcclxuZXhwb3J0IGNvbnN0IFN0eWxlZENvdW50cnlQaWNrZXJXcmFwcGVyID0gc3R5bGVkLmRpdiBgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2Vlbjtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Z2FwOiA4cHg7XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcblx0Ym9yZGVyOiAxcHggc29saWQgJHtDT0xPUlMuc3Ryb2tlLnByaW1hcnl9O1xuXHRwYWRkaW5nOiA2cHggOHB4O1xuXHRoZWlnaHQ6ICR7KHByb3BzKSA9PiBwcm9wcy5oZWlnaHR9O1xuXG5cdC5jb250ZW50X193cmFwcGVyIHtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGdhcDogOHB4O1xuXHR9XG5cblx0LmNvdW50cnktZmxhZ19fc2VsZWN0ZWQtb3B0aW9uIHtcblx0XHR3aWR0aDogMjRweDtcblx0XHRoZWlnaHQ6IGF1dG87XG5cdH1cbmA7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPUNvdW50cnlDb2RlUGlja2VyLnN0eWxlZC5qcy5tYXAiXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}}),e=c("div","production"===process.env.NODE_ENV?{target:"efxlby20"}:{target:"efxlby20",label:"StyledCountryPickerWrapper"})("display:flex;justify-content:space-between;align-items:center;gap:8px;border-radius:4px;border:1px solid ",l.stroke.primary,";padding:6px 8px;height:",(c=>c.height),";.content__wrapper{display:flex;gap:8px;}.country-flag__selected-option{width:24px;height:auto;}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkNvdW50cnlDb2RlUGlja2VyLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBY3FEIiwiZmlsZSI6IkNvdW50cnlDb2RlUGlja2VyLnN0eWxlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuZXhwb3J0IGNvbnN0IFN0eWxlZENvdW50cnlQaWNrZXJPcHRpb24gPSBzdHlsZWQuZGl2IGBcblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0ZmxleC1kaXJlY3Rpb246IHJvdztcblx0Z2FwOiAxMnB4O1xuXHR3aWR0aDogMTAwJTtcblxuXHQuY291bnRyeS1mbGFnX19vcHRpb24ge1xuXHRcdHdpZHRoOiAyNHB4O1xuXHRcdGhlaWdodDogYXV0bztcblx0fVxuYDtcclxuZXhwb3J0IGNvbnN0IFN0eWxlZENvdW50cnlQaWNrZXJXcmFwcGVyID0gc3R5bGVkLmRpdiBgXG5cdGRpc3BsYXk6IGZsZXg7XG5cdGp1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2Vlbjtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0Z2FwOiA4cHg7XG5cdGJvcmRlci1yYWRpdXM6IDRweDtcblx0Ym9yZGVyOiAxcHggc29saWQgJHtDT0xPUlMuc3Ryb2tlLnByaW1hcnl9O1xuXHRwYWRkaW5nOiA2cHggOHB4O1xuXHRoZWlnaHQ6ICR7KHByb3BzKSA9PiBwcm9wcy5oZWlnaHR9O1xuXG5cdC5jb250ZW50X193cmFwcGVyIHtcblx0XHRkaXNwbGF5OiBmbGV4O1xuXHRcdGdhcDogOHB4O1xuXHR9XG5cblx0LmNvdW50cnktZmxhZ19fc2VsZWN0ZWQtb3B0aW9uIHtcblx0XHR3aWR0aDogMjRweDtcblx0XHRoZWlnaHQ6IGF1dG87XG5cdH1cbmA7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPUNvdW50cnlDb2RlUGlja2VyLnN0eWxlZC5qcy5tYXAiXX0= */"));export{t as StyledCountryPickerOption,e as StyledCountryPickerWrapper};
|