@veeqo/ui 9.6.1 → 9.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/components/SelectDropdown/ListItem/ListItem.cjs +19 -0
  2. package/dist/components/SelectDropdown/ListItem/ListItem.cjs.map +1 -0
  3. package/dist/components/SelectDropdown/ListItem/ListItem.js +13 -0
  4. package/dist/components/SelectDropdown/ListItem/ListItem.js.map +1 -0
  5. package/dist/components/SelectDropdown/ListItem/components/CheckboxIndicator.cjs +18 -0
  6. package/dist/components/SelectDropdown/ListItem/components/CheckboxIndicator.cjs.map +1 -0
  7. package/dist/components/SelectDropdown/ListItem/components/CheckboxIndicator.js +12 -0
  8. package/dist/components/SelectDropdown/ListItem/components/CheckboxIndicator.js.map +1 -0
  9. package/dist/components/SelectDropdown/ListItem/components/ListItemContent.cjs +33 -0
  10. package/dist/components/SelectDropdown/ListItem/components/ListItemContent.cjs.map +1 -0
  11. package/dist/components/SelectDropdown/ListItem/components/ListItemContent.js +27 -0
  12. package/dist/components/SelectDropdown/ListItem/components/ListItemContent.js.map +1 -0
  13. package/dist/components/SelectDropdown/ListItem/components/RadioIndicator.cjs +18 -0
  14. package/dist/components/SelectDropdown/ListItem/components/RadioIndicator.cjs.map +1 -0
  15. package/dist/components/SelectDropdown/ListItem/components/RadioIndicator.js +12 -0
  16. package/dist/components/SelectDropdown/ListItem/components/RadioIndicator.js.map +1 -0
  17. package/dist/components/SelectDropdown/ListItem/components/SelectionType.cjs +20 -0
  18. package/dist/components/SelectDropdown/ListItem/components/SelectionType.cjs.map +1 -0
  19. package/dist/components/SelectDropdown/ListItem/components/SelectionType.js +14 -0
  20. package/dist/components/SelectDropdown/ListItem/components/SelectionType.js.map +1 -0
  21. package/dist/components/SelectDropdown/ListItem/styled.cjs +40 -0
  22. package/dist/components/SelectDropdown/ListItem/styled.cjs.map +1 -0
  23. package/dist/components/SelectDropdown/ListItem/styled.js +29 -0
  24. package/dist/components/SelectDropdown/ListItem/styled.js.map +1 -0
  25. package/dist/components/SelectDropdown/ListItemSection/ListItemSection.cjs +25 -0
  26. package/dist/components/SelectDropdown/ListItemSection/ListItemSection.cjs.map +1 -0
  27. package/dist/components/SelectDropdown/ListItemSection/ListItemSection.js +19 -0
  28. package/dist/components/SelectDropdown/ListItemSection/ListItemSection.js.map +1 -0
  29. package/dist/components/SelectDropdown/ListItemSection/styled.cjs +16 -0
  30. package/dist/components/SelectDropdown/ListItemSection/styled.cjs.map +1 -0
  31. package/dist/components/SelectDropdown/ListItemSection/styled.js +9 -0
  32. package/dist/components/SelectDropdown/ListItemSection/styled.js.map +1 -0
  33. package/dist/components/SelectDropdown/SelectDropdown.cjs +48 -0
  34. package/dist/components/SelectDropdown/SelectDropdown.cjs.map +1 -0
  35. package/dist/components/SelectDropdown/SelectDropdown.js +42 -0
  36. package/dist/components/SelectDropdown/SelectDropdown.js.map +1 -0
  37. package/dist/components/SelectDropdown/components/SelectDropdownState.cjs +19 -0
  38. package/dist/components/SelectDropdown/components/SelectDropdownState.cjs.map +1 -0
  39. package/dist/components/SelectDropdown/components/SelectDropdownState.js +13 -0
  40. package/dist/components/SelectDropdown/components/SelectDropdownState.js.map +1 -0
  41. package/dist/components/SelectDropdown/components/SelectedOption.cjs +27 -0
  42. package/dist/components/SelectDropdown/components/SelectedOption.cjs.map +1 -0
  43. package/dist/components/SelectDropdown/components/SelectedOption.js +21 -0
  44. package/dist/components/SelectDropdown/components/SelectedOption.js.map +1 -0
  45. package/dist/components/SelectDropdown/index.cjs +10 -0
  46. package/dist/components/SelectDropdown/index.cjs.map +1 -0
  47. package/dist/components/SelectDropdown/index.js +8 -0
  48. package/dist/components/SelectDropdown/index.js.map +1 -0
  49. package/dist/components/SelectDropdown/styled.cjs +39 -0
  50. package/dist/components/SelectDropdown/styled.cjs.map +1 -0
  51. package/dist/components/SelectDropdown/styled.js +29 -0
  52. package/dist/components/SelectDropdown/styled.js.map +1 -0
  53. package/dist/components/SelectDropdown/utils.cjs +25 -0
  54. package/dist/components/SelectDropdown/utils.cjs.map +1 -0
  55. package/dist/components/SelectDropdown/utils.js +22 -0
  56. package/dist/components/SelectDropdown/utils.js.map +1 -0
  57. package/dist/components/Stack/Stack.cjs +4 -1
  58. package/dist/components/Stack/Stack.cjs.map +1 -1
  59. package/dist/components/Stack/Stack.js +4 -1
  60. package/dist/components/Stack/Stack.js.map +1 -1
  61. package/dist/components/index.d.ts +1 -0
  62. package/dist/index.cjs +4 -2
  63. package/dist/index.cjs.map +1 -1
  64. package/dist/index.js +1 -0
  65. package/dist/index.js.map +1 -1
  66. package/package.json +2 -2
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ require('../../../hooks/useFocusVisible.cjs');
5
+ var useId = require('../../../hooks/useId.cjs');
6
+ var styled = require('./styled.cjs');
7
+ var ListItemContent = require('./components/ListItemContent.cjs');
8
+
9
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
10
+
11
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
12
+
13
+ const ListItem = ({ id, label, href, ...props }) => {
14
+ const idComputed = useId.useId({ id, prefix: 'list-item' });
15
+ return (React__default.default.createElement(styled.StyledListItem, { id: idComputed, textValue: label, href: href, ...props }, ({ selectionMode, allowsDragging, isSelected }) => (React__default.default.createElement(ListItemContent.ListItemContent, { selectionMode: selectionMode, allowsDragging: allowsDragging, isSelected: isSelected, label: label, isLink: Boolean(href), ...props }))));
16
+ };
17
+
18
+ exports.ListItem = ListItem;
19
+ //# sourceMappingURL=ListItem.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListItem.cjs","sources":["../../../../src/components/SelectDropdown/ListItem/ListItem.tsx"],"sourcesContent":["import React from 'react';\nimport { ListBoxItemRenderProps } from 'react-aria-components';\nimport { useId } from '../../../hooks';\nimport { StyledListItem } from './styled';\nimport { ListItemProps } from './types';\nimport { ListItemContent } from './components/ListItemContent';\n\nexport const ListItem = ({ id, label, href, ...props }: ListItemProps) => {\n const idComputed = useId({ id, prefix: 'list-item' });\n return (\n <StyledListItem id={idComputed} textValue={label} href={href} {...props}>\n {/* use react aria's render props to add more such as isHovered */}\n {({ selectionMode, allowsDragging, isSelected }: ListBoxItemRenderProps) => (\n <ListItemContent\n selectionMode={selectionMode}\n allowsDragging={allowsDragging}\n isSelected={isSelected}\n label={label}\n isLink={Boolean(href)}\n {...props}\n />\n )}\n </StyledListItem>\n );\n};\n"],"names":["useId","React","StyledListItem","ListItemContent"],"mappings":";;;;;;;;;;;;AAOa,MAAA,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,EAAiB,KAAI;AACvE,IAAA,MAAM,UAAU,GAAGA,WAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AACrD,IAAA,QACEC,sBAAA,CAAA,aAAA,CAACC,qBAAc,EAAA,EAAC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAA,GAAM,KAAK,EAAA,EAEpE,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAA0B,MACrED,sBAAC,CAAA,aAAA,CAAAE,+BAAe,EACd,EAAA,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EAAA,GACjB,KAAK,EAAA,CACT,CACH,CACc;AAErB;;;;"}
@@ -0,0 +1,13 @@
1
+ import React__default from 'react';
2
+ import '../../../hooks/useFocusVisible.js';
3
+ import { useId } from '../../../hooks/useId.js';
4
+ import { StyledListItem } from './styled.js';
5
+ import { ListItemContent } from './components/ListItemContent.js';
6
+
7
+ const ListItem = ({ id, label, href, ...props }) => {
8
+ const idComputed = useId({ id, prefix: 'list-item' });
9
+ return (React__default.createElement(StyledListItem, { id: idComputed, textValue: label, href: href, ...props }, ({ selectionMode, allowsDragging, isSelected }) => (React__default.createElement(ListItemContent, { selectionMode: selectionMode, allowsDragging: allowsDragging, isSelected: isSelected, label: label, isLink: Boolean(href), ...props }))));
10
+ };
11
+
12
+ export { ListItem };
13
+ //# sourceMappingURL=ListItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListItem.js","sources":["../../../../src/components/SelectDropdown/ListItem/ListItem.tsx"],"sourcesContent":["import React from 'react';\nimport { ListBoxItemRenderProps } from 'react-aria-components';\nimport { useId } from '../../../hooks';\nimport { StyledListItem } from './styled';\nimport { ListItemProps } from './types';\nimport { ListItemContent } from './components/ListItemContent';\n\nexport const ListItem = ({ id, label, href, ...props }: ListItemProps) => {\n const idComputed = useId({ id, prefix: 'list-item' });\n return (\n <StyledListItem id={idComputed} textValue={label} href={href} {...props}>\n {/* use react aria's render props to add more such as isHovered */}\n {({ selectionMode, allowsDragging, isSelected }: ListBoxItemRenderProps) => (\n <ListItemContent\n selectionMode={selectionMode}\n allowsDragging={allowsDragging}\n isSelected={isSelected}\n label={label}\n isLink={Boolean(href)}\n {...props}\n />\n )}\n </StyledListItem>\n );\n};\n"],"names":["React"],"mappings":";;;;;;AAOa,MAAA,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,EAAiB,KAAI;AACvE,IAAA,MAAM,UAAU,GAAG,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AACrD,IAAA,QACEA,cAAA,CAAA,aAAA,CAAC,cAAc,EAAA,EAAC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAA,GAAM,KAAK,EAAA,EAEpE,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAA0B,MACrEA,cAAC,CAAA,aAAA,CAAA,eAAe,EACd,EAAA,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EAAA,GACjB,KAAK,EAAA,CACT,CACH,CACc;AAErB;;;;"}
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var ActiveCheckboxIcon = require('../../../../tempIcons/ActiveCheckboxIcon.cjs');
5
+ var InactiveCheckboxIcon = require('../../../../tempIcons/InactiveCheckboxIcon.cjs');
6
+
7
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
+
11
+ const CheckboxIndicator = ({ checked, ...otherProps }) => {
12
+ if (checked)
13
+ return React__default.default.createElement(ActiveCheckboxIcon.ActiveCheckboxIcon, { ...otherProps });
14
+ return React__default.default.createElement(InactiveCheckboxIcon.InactiveCheckboxIcon, { ...otherProps });
15
+ };
16
+
17
+ exports.CheckboxIndicator = CheckboxIndicator;
18
+ //# sourceMappingURL=CheckboxIndicator.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckboxIndicator.cjs","sources":["../../../../../src/components/SelectDropdown/ListItem/components/CheckboxIndicator.tsx"],"sourcesContent":["import React from 'react';\nimport { ActiveCheckboxIcon } from '../../../../tempIcons/ActiveCheckboxIcon';\nimport { InactiveCheckboxIcon } from '../../../../tempIcons/InactiveCheckboxIcon';\n\nexport const CheckboxIndicator = ({ checked, ...otherProps }: any) => {\n if (checked) return <ActiveCheckboxIcon {...otherProps} />;\n\n return <InactiveCheckboxIcon {...otherProps} />;\n};\n"],"names":["React","ActiveCheckboxIcon","InactiveCheckboxIcon"],"mappings":";;;;;;;;;;AAIO,MAAM,iBAAiB,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,UAAU,EAAO,KAAI;AACnE,IAAA,IAAI,OAAO;AAAE,QAAA,OAAOA,sBAAC,CAAA,aAAA,CAAAC,qCAAkB,EAAK,EAAA,GAAA,UAAU,GAAI;AAE1D,IAAA,OAAOD,sBAAC,CAAA,aAAA,CAAAE,yCAAoB,EAAK,EAAA,GAAA,UAAU,GAAI;AACjD;;;;"}
@@ -0,0 +1,12 @@
1
+ import React__default from 'react';
2
+ import { ActiveCheckboxIcon } from '../../../../tempIcons/ActiveCheckboxIcon.js';
3
+ import { InactiveCheckboxIcon } from '../../../../tempIcons/InactiveCheckboxIcon.js';
4
+
5
+ const CheckboxIndicator = ({ checked, ...otherProps }) => {
6
+ if (checked)
7
+ return React__default.createElement(ActiveCheckboxIcon, { ...otherProps });
8
+ return React__default.createElement(InactiveCheckboxIcon, { ...otherProps });
9
+ };
10
+
11
+ export { CheckboxIndicator };
12
+ //# sourceMappingURL=CheckboxIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckboxIndicator.js","sources":["../../../../../src/components/SelectDropdown/ListItem/components/CheckboxIndicator.tsx"],"sourcesContent":["import React from 'react';\nimport { ActiveCheckboxIcon } from '../../../../tempIcons/ActiveCheckboxIcon';\nimport { InactiveCheckboxIcon } from '../../../../tempIcons/InactiveCheckboxIcon';\n\nexport const CheckboxIndicator = ({ checked, ...otherProps }: any) => {\n if (checked) return <ActiveCheckboxIcon {...otherProps} />;\n\n return <InactiveCheckboxIcon {...otherProps} />;\n};\n"],"names":["React"],"mappings":";;;;AAIO,MAAM,iBAAiB,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,UAAU,EAAO,KAAI;AACnE,IAAA,IAAI,OAAO;AAAE,QAAA,OAAOA,cAAC,CAAA,aAAA,CAAA,kBAAkB,EAAK,EAAA,GAAA,UAAU,GAAI;AAE1D,IAAA,OAAOA,cAAC,CAAA,aAAA,CAAA,oBAAoB,EAAK,EAAA,GAAA,UAAU,GAAI;AACjD;;;;"}
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var reactAriaComponents = require('react-aria-components');
5
+ var DragIndicatorIcon = require('../../../../tempIcons/DragIndicatorIcon.cjs');
6
+ var styled = require('../styled.cjs');
7
+ var Text = require('../../../Text/Text.cjs');
8
+ var Stack = require('../../../Stack/Stack.cjs');
9
+ var MiniAlert = require('../../../Alerts/MiniAlert/MiniAlert.cjs');
10
+ var SelectionType = require('./SelectionType.cjs');
11
+
12
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
13
+
14
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
15
+
16
+ const ListItemContent = ({ label, hint, itemInfoSlot, endInfoSlot, alert, mediaSlot, allowsDragging = false, selectionMode = 'single', isLink, isSelected = false, }) => (React__default.default.createElement(Stack.Stack, { direction: "horizontal", alignY: "center", alignX: "between" },
17
+ React__default.default.createElement(styled.HorizontalContainer, null,
18
+ allowsDragging && React__default.default.createElement(DragIndicatorIcon.DragIndicatorIcon, null),
19
+ React__default.default.createElement(SelectionType.SelectionType, { selectionMode: selectionMode, isSelected: isSelected, isLink: isLink }),
20
+ mediaSlot,
21
+ React__default.default.createElement(styled.VerticalContainer, null,
22
+ React__default.default.createElement(styled.InfoContainer, { hasItemInfoSlot: Boolean(itemInfoSlot), hasEndInfoSlot: Boolean(endInfoSlot), "data-testid": "info-container" },
23
+ React__default.default.createElement(reactAriaComponents.Text, { slot: "label" },
24
+ React__default.default.createElement(Text.Text, { variant: "body" }, label)),
25
+ itemInfoSlot,
26
+ endInfoSlot),
27
+ hint && (React__default.default.createElement(reactAriaComponents.Text, { slot: "description" },
28
+ React__default.default.createElement(Text.Text, { variant: "hintText" }, hint))),
29
+ alert && React__default.default.createElement(MiniAlert.MiniAlert, { title: alert.title, variant: alert.variant }))),
30
+ isLink && React__default.default.createElement(styled.LinkIcon, { "data-testid": "link-icon" })));
31
+
32
+ exports.ListItemContent = ListItemContent;
33
+ //# sourceMappingURL=ListItemContent.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListItemContent.cjs","sources":["../../../../../src/components/SelectDropdown/ListItem/components/ListItemContent.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-aria-components';\nimport { DragIndicatorIcon } from '../../../../tempIcons/DragIndicatorIcon';\nimport { ListItemContentProps } from './types';\nimport { HorizontalContainer, InfoContainer, LinkIcon, VerticalContainer } from '../styled';\nimport { Text as VeeqoText } from '../../../Text';\nimport { Stack } from '../../../Stack';\nimport { MiniAlert } from '../../../Alerts/MiniAlert';\nimport { SelectionType } from './SelectionType';\n\nexport const ListItemContent = ({\n label,\n hint,\n itemInfoSlot,\n endInfoSlot,\n alert,\n mediaSlot,\n allowsDragging = false,\n selectionMode = 'single',\n isLink,\n isSelected = false,\n}: ListItemContentProps) => (\n <Stack direction=\"horizontal\" alignY=\"center\" alignX=\"between\">\n <HorizontalContainer>\n {allowsDragging && <DragIndicatorIcon />}\n <SelectionType selectionMode={selectionMode} isSelected={isSelected} isLink={isLink} />\n {mediaSlot}\n <VerticalContainer>\n <InfoContainer\n hasItemInfoSlot={Boolean(itemInfoSlot)}\n hasEndInfoSlot={Boolean(endInfoSlot)}\n data-testid=\"info-container\"\n >\n <Text slot=\"label\">\n <VeeqoText variant=\"body\">{label}</VeeqoText>\n </Text>\n {itemInfoSlot}\n {endInfoSlot}\n </InfoContainer>\n\n {hint && (\n <Text slot=\"description\">\n <VeeqoText variant=\"hintText\">{hint}</VeeqoText>\n </Text>\n )}\n {alert && <MiniAlert title={alert.title} variant={alert.variant} />}\n </VerticalContainer>\n </HorizontalContainer>\n {isLink && <LinkIcon data-testid=\"link-icon\" />}\n </Stack>\n);\n"],"names":["React","Stack","HorizontalContainer","DragIndicatorIcon","SelectionType","VerticalContainer","InfoContainer","Text","VeeqoText","MiniAlert","LinkIcon"],"mappings":";;;;;;;;;;;;;;;MAUa,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,cAAc,GAAG,KAAK,E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EAAA,CAAI,CACjD,CACA;IACrB,MAAM,IAAIT,qCAACU,eAAQ,EAAA,EAAA,aAAA,EAAa,WAAW,EAAG,CAAA,CACzC;;;;"}
@@ -0,0 +1,27 @@
1
+ import React__default from 'react';
2
+ import { Text } from 'react-aria-components';
3
+ import { DragIndicatorIcon } from '../../../../tempIcons/DragIndicatorIcon.js';
4
+ import { HorizontalContainer, VerticalContainer, InfoContainer, LinkIcon } from '../styled.js';
5
+ import { Text as Text$1 } from '../../../Text/Text.js';
6
+ import { Stack } from '../../../Stack/Stack.js';
7
+ import { MiniAlert } from '../../../Alerts/MiniAlert/MiniAlert.js';
8
+ import { SelectionType } from './SelectionType.js';
9
+
10
+ const ListItemContent = ({ label, hint, itemInfoSlot, endInfoSlot, alert, mediaSlot, allowsDragging = false, selectionMode = 'single', isLink, isSelected = false, }) => (React__default.createElement(Stack, { direction: "horizontal", alignY: "center", alignX: "between" },
11
+ React__default.createElement(HorizontalContainer, null,
12
+ allowsDragging && React__default.createElement(DragIndicatorIcon, null),
13
+ React__default.createElement(SelectionType, { selectionMode: selectionMode, isSelected: isSelected, isLink: isLink }),
14
+ mediaSlot,
15
+ React__default.createElement(VerticalContainer, null,
16
+ React__default.createElement(InfoContainer, { hasItemInfoSlot: Boolean(itemInfoSlot), hasEndInfoSlot: Boolean(endInfoSlot), "data-testid": "info-container" },
17
+ React__default.createElement(Text, { slot: "label" },
18
+ React__default.createElement(Text$1, { variant: "body" }, label)),
19
+ itemInfoSlot,
20
+ endInfoSlot),
21
+ hint && (React__default.createElement(Text, { slot: "description" },
22
+ React__default.createElement(Text$1, { variant: "hintText" }, hint))),
23
+ alert && React__default.createElement(MiniAlert, { title: alert.title, variant: alert.variant }))),
24
+ isLink && React__default.createElement(LinkIcon, { "data-testid": "link-icon" })));
25
+
26
+ export { ListItemContent };
27
+ //# sourceMappingURL=ListItemContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListItemContent.js","sources":["../../../../../src/components/SelectDropdown/ListItem/components/ListItemContent.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-aria-components';\nimport { DragIndicatorIcon } from '../../../../tempIcons/DragIndicatorIcon';\nimport { ListItemContentProps } from './types';\nimport { HorizontalContainer, InfoContainer, LinkIcon, VerticalContainer } from '../styled';\nimport { Text as VeeqoText } from '../../../Text';\nimport { Stack } from '../../../Stack';\nimport { MiniAlert } from '../../../Alerts/MiniAlert';\nimport { SelectionType } from './SelectionType';\n\nexport const ListItemContent = ({\n label,\n hint,\n itemInfoSlot,\n endInfoSlot,\n alert,\n mediaSlot,\n allowsDragging = false,\n selectionMode = 'single',\n isLink,\n isSelected = false,\n}: ListItemContentProps) => (\n <Stack direction=\"horizontal\" alignY=\"center\" alignX=\"between\">\n <HorizontalContainer>\n {allowsDragging && <DragIndicatorIcon />}\n <SelectionType selectionMode={selectionMode} isSelected={isSelected} isLink={isLink} />\n {mediaSlot}\n <VerticalContainer>\n <InfoContainer\n hasItemInfoSlot={Boolean(itemInfoSlot)}\n hasEndInfoSlot={Boolean(endInfoSlot)}\n data-testid=\"info-container\"\n >\n <Text slot=\"label\">\n <VeeqoText variant=\"body\">{label}</VeeqoText>\n </Text>\n {itemInfoSlot}\n {endInfoSlot}\n </InfoContainer>\n\n {hint && (\n <Text slot=\"description\">\n <VeeqoText variant=\"hintText\">{hint}</VeeqoText>\n </Text>\n )}\n {alert && <MiniAlert title={alert.title} variant={alert.variant} />}\n </VerticalContainer>\n </HorizontalContainer>\n {isLink && <LinkIcon data-testid=\"link-icon\" />}\n </Stack>\n);\n"],"names":["React","VeeqoText"],"mappings":";;;;;;;;;MAUa,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,cAAc,GAAG,KAAK,EACtB,aAAa,GAAG,QAAQ,EACxB,MAAM,EACN,UAAU,GAAG,KAAK,GACG,MACrBA,cAAA,CAAA,aAAA,CAAC,KAAK,EAAC,EAAA,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strict';
2
+
3
+ var React = require('react');
4
+ var ActiveRadioIcon = require('../../../../tempIcons/ActiveRadioIcon.cjs');
5
+ var InactiveRadioIcon = require('../../../../tempIcons/InactiveRadioIcon.cjs');
6
+
7
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
+
11
+ const RadioIndicator = ({ checked, ...otherProps }) => {
12
+ if (checked)
13
+ return React__default.default.createElement(ActiveRadioIcon.ActiveRadioIcon, { ...otherProps });
14
+ return React__default.default.createElement(InactiveRadioIcon.InactiveRadioIcon, { ...otherProps });
15
+ };
16
+
17
+ exports.RadioIndicator = RadioIndicator;
18
+ //# sourceMappingURL=RadioIndicator.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioIndicator.cjs","sources":["../../../../../src/components/SelectDropdown/ListItem/components/RadioIndicator.tsx"],"sourcesContent":["import React from 'react';\nimport { ActiveRadioIcon } from '../../../../tempIcons/ActiveRadioIcon';\nimport { InactiveRadioIcon } from '../../../../tempIcons/InactiveRadioIcon';\n\nexport const RadioIndicator = ({ checked, ...otherProps }: any) => {\n if (checked) return <ActiveRadioIcon {...otherProps} />;\n\n return <InactiveRadioIcon {...otherProps} />;\n};\n"],"names":["React","ActiveRadioIcon","InactiveRadioIcon"],"mappings":";;;;;;;;;;AAIO,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,UAAU,EAAO,KAAI;AAChE,IAAA,IAAI,OAAO;AAAE,QAAA,OAAOA,sBAAC,CAAA,aAAA,CAAAC,+BAAe,EAAK,EAAA,GAAA,UAAU,GAAI;AAEvD,IAAA,OAAOD,sBAAC,CAAA,aAAA,CAAAE,mCAAiB,EAAK,EAAA,GAAA,UAAU,GAAI;AAC9C;;;;"}
@@ -0,0 +1,12 @@
1
+ import React__default from 'react';
2
+ import { ActiveRadioIcon } from '../../../../tempIcons/ActiveRadioIcon.js';
3
+ import { InactiveRadioIcon } from '../../../../tempIcons/InactiveRadioIcon.js';
4
+
5
+ const RadioIndicator = ({ checked, ...otherProps }) => {
6
+ if (checked)
7
+ return React__default.createElement(ActiveRadioIcon, { ...otherProps });
8
+ return React__default.createElement(InactiveRadioIcon, { ...otherProps });
9
+ };
10
+
11
+ export { RadioIndicator };
12
+ //# sourceMappingURL=RadioIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioIndicator.js","sources":["../../../../../src/components/SelectDropdown/ListItem/components/RadioIndicator.tsx"],"sourcesContent":["import React from 'react';\nimport { ActiveRadioIcon } from '../../../../tempIcons/ActiveRadioIcon';\nimport { InactiveRadioIcon } from '../../../../tempIcons/InactiveRadioIcon';\n\nexport const RadioIndicator = ({ checked, ...otherProps }: any) => {\n if (checked) return <ActiveRadioIcon {...otherProps} />;\n\n return <InactiveRadioIcon {...otherProps} />;\n};\n"],"names":["React"],"mappings":";;;;AAIO,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,UAAU,EAAO,KAAI;AAChE,IAAA,IAAI,OAAO;AAAE,QAAA,OAAOA,cAAC,CAAA,aAAA,CAAA,eAAe,EAAK,EAAA,GAAA,UAAU,GAAI;AAEvD,IAAA,OAAOA,cAAC,CAAA,aAAA,CAAA,iBAAiB,EAAK,EAAA,GAAA,UAAU,GAAI;AAC9C;;;;"}
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var RadioIndicator = require('./RadioIndicator.cjs');
5
+ var CheckboxIndicator = require('./CheckboxIndicator.cjs');
6
+
7
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
+
11
+ const SelectionType = ({ selectionMode, isSelected, isLink }) => {
12
+ if (isLink || selectionMode === 'none')
13
+ return null;
14
+ if (selectionMode === 'single')
15
+ return React__default.default.createElement(RadioIndicator.RadioIndicator, { checked: isSelected });
16
+ return React__default.default.createElement(CheckboxIndicator.CheckboxIndicator, { checked: isSelected });
17
+ };
18
+
19
+ exports.SelectionType = SelectionType;
20
+ //# sourceMappingURL=SelectionType.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionType.cjs","sources":["../../../../../src/components/SelectDropdown/ListItem/components/SelectionType.tsx"],"sourcesContent":["import React from 'react';\nimport { RadioIndicator } from './RadioIndicator';\nimport { CheckboxIndicator } from './CheckboxIndicator';\n\ntype SelectionTypeProps = {\n selectionMode: 'single' | 'multiple' | 'none';\n isSelected: boolean;\n isLink?: boolean;\n};\n\nexport const SelectionType = ({ selectionMode, isSelected, isLink }: SelectionTypeProps) => {\n if (isLink || selectionMode === 'none') return null;\n\n if (selectionMode === 'single') return <RadioIndicator checked={isSelected} />;\n\n return <CheckboxIndicator checked={isSelected} />;\n};\n"],"names":["React","RadioIndicator","CheckboxIndicator"],"mappings":";;;;;;;;;;AAUO,MAAM,aAAa,GAAG,CAAC,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAsB,KAAI;AACzF,IAAA,IAAI,MAAM,IAAI,aAAa,KAAK,MAAM;AAAE,QAAA,OAAO,IAAI;IAEnD,IAAI,aAAa,KAAK,QAAQ;AAAE,QAAA,OAAOA,qCAACC,6BAAc,EAAA,EAAC,OAAO,EAAE,UAAU,GAAI;AAE9E,IAAA,OAAOD,qCAACE,mCAAiB,EAAA,EAAC,OAAO,EAAE,UAAU,GAAI;AACnD;;;;"}
@@ -0,0 +1,14 @@
1
+ import React__default from 'react';
2
+ import { RadioIndicator } from './RadioIndicator.js';
3
+ import { CheckboxIndicator } from './CheckboxIndicator.js';
4
+
5
+ const SelectionType = ({ selectionMode, isSelected, isLink }) => {
6
+ if (isLink || selectionMode === 'none')
7
+ return null;
8
+ if (selectionMode === 'single')
9
+ return React__default.createElement(RadioIndicator, { checked: isSelected });
10
+ return React__default.createElement(CheckboxIndicator, { checked: isSelected });
11
+ };
12
+
13
+ export { SelectionType };
14
+ //# sourceMappingURL=SelectionType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionType.js","sources":["../../../../../src/components/SelectDropdown/ListItem/components/SelectionType.tsx"],"sourcesContent":["import React from 'react';\nimport { RadioIndicator } from './RadioIndicator';\nimport { CheckboxIndicator } from './CheckboxIndicator';\n\ntype SelectionTypeProps = {\n selectionMode: 'single' | 'multiple' | 'none';\n isSelected: boolean;\n isLink?: boolean;\n};\n\nexport const SelectionType = ({ selectionMode, isSelected, isLink }: SelectionTypeProps) => {\n if (isLink || selectionMode === 'none') return null;\n\n if (selectionMode === 'single') return <RadioIndicator checked={isSelected} />;\n\n return <CheckboxIndicator checked={isSelected} />;\n};\n"],"names":["React"],"mappings":";;;;AAUO,MAAM,aAAa,GAAG,CAAC,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAsB,KAAI;AACzF,IAAA,IAAI,MAAM,IAAI,aAAa,KAAK,MAAM;AAAE,QAAA,OAAO,IAAI;IAEnD,IAAI,aAAa,KAAK,QAAQ;AAAE,QAAA,OAAOA,6BAAC,cAAc,EAAA,EAAC,OAAO,EAAE,UAAU,GAAI;AAE9E,IAAA,OAAOA,6BAAC,iBAAiB,EAAA,EAAC,OAAO,EAAE,UAAU,GAAI;AACnD;;;;"}
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ var styled = require('styled-components');
4
+ var index = require('../../../theme/index.cjs');
5
+ var reactAriaComponents = require('react-aria-components');
6
+ var ArrowUpIcon = require('../../../tempIcons/ArrowUpIcon.cjs');
7
+ var Stack = require('../../Stack/Stack.cjs');
8
+
9
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
10
+
11
+ var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
12
+
13
+ const colourStatesMap = {
14
+ hovered: '#F0F7FC',
15
+ pressed: '#E3F0FA',
16
+ disabled: index.theme.colors.neutral.grey.light,
17
+ };
18
+ const StyledListItem = styled__default.default(reactAriaComponents.ListBoxItem).withConfig({ displayName: "vui--StyledListItem", componentId: "vui--16fm0j" }) `border-radius:${index.theme.radius.base};cursor:pointer;background-color:${({ appearance = 'primary' }) => appearance === 'primary' ? 'white' : index.theme.colors.neutral.grey.lightest};text-decoration:none;&[data-hovered] > div{background-color:${colourStatesMap.hovered};}&[data-pressed] > div{background-color:${colourStatesMap.pressed};}&[data-focused]{outline:0;}&[data-focus-visible] > div{outline:solid ${index.theme.sizes.xs} ${index.theme.colors.secondary.blue.light};z-index:1;position:relative;}&[data-dragging]{background-color:${index.theme.colors.neutral.grey.base};border-color:${index.theme.colors.secondary.blue.base};}&[data-drop-target]{background-color:${index.theme.colors.secondary.green.base};border-color:${index.theme.colors.secondary.green.base};}&[data-disabled]{cursor:not-allowed;background-color:${colourStatesMap.disabled};opacity:0.75;}& > div{padding:${index.theme.sizes.sm};border-radius:${index.theme.radius.base};}`;
19
+ styled__default.default(reactAriaComponents.ListBox).withConfig({ displayName: "vui--StyledListBox", componentId: "vui--6npxd" }) `.react-aria-DropIndicator[data-drop-target]{outline:2px solid ${index.theme.colors.secondary.blue.base};}width:100%;`;
20
+ const LinkIcon = styled__default.default(ArrowUpIcon.ArrowUpIcon).attrs({
21
+ width: index.theme.sizes.md,
22
+ height: index.theme.sizes.md,
23
+ }).withConfig({ displayName: "vui--LinkIcon", componentId: "vui--14ybt8l" }) `transform:rotate(90deg);color:${index.theme.colors.neutral.ink.base};`;
24
+ const HorizontalContainer = styled__default.default(Stack.Stack).attrs({
25
+ direction: 'horizontal',
26
+ alignY: 'center',
27
+ }).withConfig({ displayName: "vui--HorizontalContainer", componentId: "vui--11udtca" }) `width:100%;`;
28
+ const VerticalContainer = styled__default.default(Stack.Stack).attrs({
29
+ spacing: 'xs',
30
+ }).withConfig({ displayName: "vui--VerticalContainer", componentId: "vui--1tl5q7x" }) `width:100%;`;
31
+ const InfoContainer = styled__default.default.div.withConfig({ displayName: "vui--InfoContainer", componentId: "vui--i2xz7h" }) `display:grid;grid-template-columns:${({ hasItemInfoSlot, hasEndInfoSlot }) => hasItemInfoSlot && hasEndInfoSlot ? 'auto 1fr 1fr' : 'auto 1fr'};gap:${index.theme.sizes.sm};width:100%;align-items:center;min-width:0;flex:1;> *:last-child{justify-self:${({ hasEndInfoSlot }) => (hasEndInfoSlot ? 'end' : 'start')};}`;
32
+ const ItemInfoContainer = styled__default.default.div.withConfig({ displayName: "vui--ItemInfoContainer", componentId: "vui--1gj2fqj" }) `display:flex;flex-direction:row;gap:8px;align-items:center;`;
33
+
34
+ exports.HorizontalContainer = HorizontalContainer;
35
+ exports.InfoContainer = InfoContainer;
36
+ exports.ItemInfoContainer = ItemInfoContainer;
37
+ exports.LinkIcon = LinkIcon;
38
+ exports.StyledListItem = StyledListItem;
39
+ exports.VerticalContainer = VerticalContainer;
40
+ //# sourceMappingURL=styled.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled.cjs","sources":["../../../../src/components/SelectDropdown/ListItem/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { theme } from 'Theme';\nimport { ListBox, ListBoxItem } from 'react-aria-components';\nimport { ArrowUpIcon } from '../../../tempIcons/ArrowUpIcon';\nimport { Stack } from '../../Stack';\n\nconst colourStatesMap = {\n hovered: '#F0F7FC',\n pressed: '#E3F0FA',\n disabled: theme.colors.neutral.grey.light,\n};\n\nexport const StyledListItem = styled(ListBoxItem)<{\n appearance?: 'primary' | 'secondary';\n}>`\n border-radius: ${theme.radius.base};\n cursor: pointer;\n background-color: ${({ appearance = 'primary' }) =>\n appearance === 'primary' ? 'white' : theme.colors.neutral.grey.lightest};\n text-decoration: none;\n\n &[data-hovered] > div {\n background-color: ${colourStatesMap.hovered};\n }\n\n &[data-pressed] > div {\n background-color: ${colourStatesMap.pressed};\n }\n\n &[data-focused] {\n outline: 0;\n }\n\n &[data-focus-visible] > div {\n outline: solid ${theme.sizes.xs} ${theme.colors.secondary.blue.light};\n z-index: 1;\n position: relative;\n }\n\n &[data-dragging] {\n background-color: ${theme.colors.neutral.grey.base};\n border-color: ${theme.colors.secondary.blue.base};\n }\n &[data-drop-target] {\n background-color: ${theme.colors.secondary.green.base};\n border-color: ${theme.colors.secondary.green.base};\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n background-color: ${colourStatesMap.disabled};\n opacity: 0.75;\n }\n\n & > div {\n padding: ${theme.sizes.sm};\n border-radius: ${theme.radius.base};\n }\n`;\n\nexport const StyledListBox = styled(ListBox)`\n .react-aria-DropIndicator[data-drop-target] {\n outline: 2px solid ${theme.colors.secondary.blue.base};\n }\n\n width: 100%;\n`;\n\nexport const LinkIcon = styled(ArrowUpIcon).attrs({\n width: theme.sizes.md,\n height: theme.sizes.md,\n})`\n transform: rotate(90deg);\n color: ${theme.colors.neutral.ink.base};\n`;\n\nexport const HorizontalContainer = styled(Stack).attrs({\n direction: 'horizontal',\n alignY: 'center',\n})`\n width: 100%;\n`;\n\nexport const VerticalContainer = styled(Stack).attrs({\n spacing: 'xs',\n})`\n width: 100%;\n`;\n\nexport const InfoContainer = styled.div<{\n hasItemInfoSlot: boolean;\n hasEndInfoSlot: boolean;\n}>`\n display: grid;\n grid-template-columns: ${({ hasItemInfoSlot, hasEndInfoSlot }) =>\n hasItemInfoSlot && hasEndInfoSlot ? 'auto 1fr 1fr' : 'auto 1fr'};\n gap: ${theme.sizes.sm};\n width: 100%;\n align-items: center;\n min-width: 0;\n flex: 1;\n\n > *:last-child {\n justify-self: ${({ hasEndInfoSlot }) => (hasEndInfoSlot ? 'end' : 'start')};\n }\n`;\n\nexport const ItemInfoContainer = styled.div`\n display: flex;\n flex-direction: row;\n gap: 8px;\n align-items: center;\n`;\n"],"names":["theme","styled","ListBoxItem","ListBox","ArrowUpIcon","Stack"],"mappings":";;;;;;;;;;;;AAMA,MAAM,eAAe,GAAG;AACtB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAEA,WAAK,CAAC,MAAM,CAAC,OAAO,CA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AAQ,GAAGC,uBAAM,CAACG,uBAAW,CAAC,CAAC,KAAK,CAAC;AAChD,IAAA,KAAK,EAAEJ,WAAK,CAAC,KAAK,CAAC,EAAE;AACrB,IAAA,MAAM,EAAEA,WAAK,CAAC,KAAK,CAAC,EAAE;CACvB,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,eAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,8BAAA,EAESA,WAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,CAAA;AAG3B,MAAA,mBAAmB,GAAGC,uBAAM,CAACI,WAAK,CAAC,CAAC,KAAK,CAAC;AACrD,IAAA,SAAS,EAAE,YAAY;AACvB,IAAA,MAAM,EAAE,QAAQ;AACjB,CAAA,CAAC;AAIW,MAAA,iBAAiB,GAAGJ,uBAAM,CAACI,WAAK,CAAC,CAAC,KAAK,CAAC;AACnD,IAAA,OAAO,EAAE,IAAI;AACd,CAAA,CAAC;AAIW,MAAA,aAAa,GAAGJ,uBAAM,CAAC,GAAG,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,oBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,mCAAA,EAKZ,CAAC,EAAE,eAAe,EAAE,cAAc,EAAE,KAC3D,eAAe,IAAI,cAAc,GAAG,cAAc,GAAG,UAAU,CAC1D,KAAA,EAAAD,WAAK,CAAC,KAAK,CAAC,EAAE,iFAOH,CAAC,EAAE,cAAc,EAAE,MAAM,cAAc,GAAG,KAAK,GAAG,OAAO,CAAC,CAAA,EAAA;MAIjE,iBAAiB,GAAGC,uBAAM,CAAC,GAAG;;;;;;;;;"}
@@ -0,0 +1,29 @@
1
+ import styled from 'styled-components';
2
+ import { theme } from '../../../theme/index.js';
3
+ import { ListBoxItem, ListBox } from 'react-aria-components';
4
+ import { ArrowUpIcon } from '../../../tempIcons/ArrowUpIcon.js';
5
+ import { Stack } from '../../Stack/Stack.js';
6
+
7
+ const colourStatesMap = {
8
+ hovered: '#F0F7FC',
9
+ pressed: '#E3F0FA',
10
+ disabled: theme.colors.neutral.grey.light,
11
+ };
12
+ const StyledListItem = styled(ListBoxItem).withConfig({ displayName: "vui--StyledListItem", componentId: "vui--16fm0j" }) `border-radius:${theme.radius.base};cursor:pointer;background-color:${({ appearance = 'primary' }) => appearance === 'primary' ? 'white' : theme.colors.neutral.grey.lightest};text-decoration:none;&[data-hovered] > div{background-color:${colourStatesMap.hovered};}&[data-pressed] > div{background-color:${colourStatesMap.pressed};}&[data-focused]{outline:0;}&[data-focus-visible] > div{outline:solid ${theme.sizes.xs} ${theme.colors.secondary.blue.light};z-index:1;position:relative;}&[data-dragging]{background-color:${theme.colors.neutral.grey.base};border-color:${theme.colors.secondary.blue.base};}&[data-drop-target]{background-color:${theme.colors.secondary.green.base};border-color:${theme.colors.secondary.green.base};}&[data-disabled]{cursor:not-allowed;background-color:${colourStatesMap.disabled};opacity:0.75;}& > div{padding:${theme.sizes.sm};border-radius:${theme.radius.base};}`;
13
+ styled(ListBox).withConfig({ displayName: "vui--StyledListBox", componentId: "vui--6npxd" }) `.react-aria-DropIndicator[data-drop-target]{outline:2px solid ${theme.colors.secondary.blue.base};}width:100%;`;
14
+ const LinkIcon = styled(ArrowUpIcon).attrs({
15
+ width: theme.sizes.md,
16
+ height: theme.sizes.md,
17
+ }).withConfig({ displayName: "vui--LinkIcon", componentId: "vui--14ybt8l" }) `transform:rotate(90deg);color:${theme.colors.neutral.ink.base};`;
18
+ const HorizontalContainer = styled(Stack).attrs({
19
+ direction: 'horizontal',
20
+ alignY: 'center',
21
+ }).withConfig({ displayName: "vui--HorizontalContainer", componentId: "vui--11udtca" }) `width:100%;`;
22
+ const VerticalContainer = styled(Stack).attrs({
23
+ spacing: 'xs',
24
+ }).withConfig({ displayName: "vui--VerticalContainer", componentId: "vui--1tl5q7x" }) `width:100%;`;
25
+ const InfoContainer = styled.div.withConfig({ displayName: "vui--InfoContainer", componentId: "vui--i2xz7h" }) `display:grid;grid-template-columns:${({ hasItemInfoSlot, hasEndInfoSlot }) => hasItemInfoSlot && hasEndInfoSlot ? 'auto 1fr 1fr' : 'auto 1fr'};gap:${theme.sizes.sm};width:100%;align-items:center;min-width:0;flex:1;> *:last-child{justify-self:${({ hasEndInfoSlot }) => (hasEndInfoSlot ? 'end' : 'start')};}`;
26
+ const ItemInfoContainer = styled.div.withConfig({ displayName: "vui--ItemInfoContainer", componentId: "vui--1gj2fqj" }) `display:flex;flex-direction:row;gap:8px;align-items:center;`;
27
+
28
+ export { HorizontalContainer, InfoContainer, ItemInfoContainer, LinkIcon, StyledListItem, VerticalContainer };
29
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled.js","sources":["../../../../src/components/SelectDropdown/ListItem/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { theme } from 'Theme';\nimport { ListBox, ListBoxItem } from 'react-aria-components';\nimport { ArrowUpIcon } from '../../../tempIcons/ArrowUpIcon';\nimport { Stack } from '../../Stack';\n\nconst colourStatesMap = {\n hovered: '#F0F7FC',\n pressed: '#E3F0FA',\n disabled: theme.colors.neutral.grey.light,\n};\n\nexport const StyledListItem = styled(ListBoxItem)<{\n appearance?: 'primary' | 'secondary';\n}>`\n border-radius: ${theme.radius.base};\n cursor: pointer;\n background-color: ${({ appearance = 'primary' }) =>\n appearance === 'primary' ? 'white' : theme.colors.neutral.grey.lightest};\n text-decoration: none;\n\n &[data-hovered] > div {\n background-color: ${colourStatesMap.hovered};\n }\n\n &[data-pressed] > div {\n background-color: ${colourStatesMap.pressed};\n }\n\n &[data-focused] {\n outline: 0;\n }\n\n &[data-focus-visible] > div {\n outline: solid ${theme.sizes.xs} ${theme.colors.secondary.blue.light};\n z-index: 1;\n position: relative;\n }\n\n &[data-dragging] {\n background-color: ${theme.colors.neutral.grey.base};\n border-color: ${theme.colors.secondary.blue.base};\n }\n &[data-drop-target] {\n background-color: ${theme.colors.secondary.green.base};\n border-color: ${theme.colors.secondary.green.base};\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n background-color: ${colourStatesMap.disabled};\n opacity: 0.75;\n }\n\n & > div {\n padding: ${theme.sizes.sm};\n border-radius: ${theme.radius.base};\n }\n`;\n\nexport const StyledListBox = styled(ListBox)`\n .react-aria-DropIndicator[data-drop-target] {\n outline: 2px solid ${theme.colors.secondary.blue.base};\n }\n\n width: 100%;\n`;\n\nexport const LinkIcon = styled(ArrowUpIcon).attrs({\n width: theme.sizes.md,\n height: theme.sizes.md,\n})`\n transform: rotate(90deg);\n color: ${theme.colors.neutral.ink.base};\n`;\n\nexport const HorizontalContainer = styled(Stack).attrs({\n direction: 'horizontal',\n alignY: 'center',\n})`\n width: 100%;\n`;\n\nexport const VerticalContainer = styled(Stack).attrs({\n spacing: 'xs',\n})`\n width: 100%;\n`;\n\nexport const InfoContainer = styled.div<{\n hasItemInfoSlot: boolean;\n hasEndInfoSlot: boolean;\n}>`\n display: grid;\n grid-template-columns: ${({ hasItemInfoSlot, hasEndInfoSlot }) =>\n hasItemInfoSlot && hasEndInfoSlot ? 'auto 1fr 1fr' : 'auto 1fr'};\n gap: ${theme.sizes.sm};\n width: 100%;\n align-items: center;\n min-width: 0;\n flex: 1;\n\n > *:last-child {\n justify-self: ${({ hasEndInfoSlot }) => (hasEndInfoSlot ? 'end' : 'start')};\n }\n`;\n\nexport const ItemInfoContainer = styled.div`\n display: flex;\n flex-direction: row;\n gap: 8px;\n align-items: center;\n`;\n"],"names":[],"mappings":";;;;;;AAMA,MAAM,eAAe,GAAG;AACtB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK;CAC1C;AAEM,MAAM,cAAc,GAAG,MAAM,CAAC,WAAW,CAAC,CAG9B,UAAA,CAAA,EAAA,WAAA,EAAA,qBAAA,EAAA,WAAA,EAAA,aAAA,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vB,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,eAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,8BAAA,EAES,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,CAAA;AAG3B,MAAA,mBAAmB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;AACrD,IAAA,SAAS,EAAE,YAAY;AACvB,IAAA,MAAM,EAAE,QAAQ;AACjB,CAAA,CAAC;AAIW,MAAA,iBAAiB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;AACnD,IAAA,OAAO,EAAE,IAAI;AACd,CAAA,CAAC;AAIW,MAAA,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,oBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,mCAAA,EAKZ,CAAC,EAAE,eAAe,EAAE,cAAc,EAAE,KAC3D,eAAe,IAAI,cAAc,GAAG,cAAc,GAAG,UAAU,CAC1D,KAAA,EAAA,KAAK,CAAC,KAAK,CAAC,EAAE,iFAOH,CAAC,EAAE,cAAc,EAAE,MAAM,cAAc,GAAG,KAAK,GAAG,OAAO,CAAC,CAAA,EAAA;MAIjE,iBAAiB,GAAG,MAAM,CAAC,GAAG;;;;"}
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var reactAriaComponents = require('react-aria-components');
5
+ var Stack = require('../../Stack/Stack.cjs');
6
+ var Text = require('../../Text/Text.cjs');
7
+ var styled = require('./styled.cjs');
8
+ var ListItem = require('../ListItem/ListItem.cjs');
9
+
10
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
11
+
12
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
13
+
14
+ const ListItemSection = ({ label, hint, itemInfoSlot, items, children, ...props }) => (React__default.default.createElement(styled.StyledSection, { ...props },
15
+ React__default.default.createElement(reactAriaComponents.Header, null,
16
+ React__default.default.createElement(Stack.Stack, { spacing: "xs" },
17
+ React__default.default.createElement(styled.InfoContainer, null,
18
+ React__default.default.createElement(Text.Text, { variant: "body" }, label),
19
+ itemInfoSlot),
20
+ hint && React__default.default.createElement(Text.Text, { variant: "hintText" }, hint))),
21
+ children,
22
+ items && (React__default.default.createElement(reactAriaComponents.Collection, { items: items }, (item) => React__default.default.createElement(ListItem.ListItem, { ...item })))));
23
+
24
+ exports.ListItemSection = ListItemSection;
25
+ //# sourceMappingURL=ListItemSection.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListItemSection.cjs","sources":["../../../../src/components/SelectDropdown/ListItemSection/ListItemSection.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport { Collection, Header, SectionProps } from 'react-aria-components';\nimport { Stack } from '../../Stack';\nimport { Text as VeeqoText } from '../../Text';\nimport { InfoContainer, StyledSection } from './styled';\nimport { ListItemProps } from '../ListItem/types';\nimport { ListItem } from '../ListItem/ListItem';\n\nexport type ListItemSectionProps = Omit<SectionProps<ListItemProps>, 'items'> & {\n label: string;\n hint?: string;\n itemInfoSlot?: ReactElement;\n items?: ListItemProps[];\n};\n\nexport const ListItemSection = ({\n label,\n hint,\n itemInfoSlot,\n items,\n children,\n ...props\n}: ListItemSectionProps) => (\n <StyledSection {...props}>\n <Header>\n <Stack spacing=\"xs\">\n <InfoContainer>\n <VeeqoText variant=\"body\">{label}</VeeqoText>\n {itemInfoSlot}\n </InfoContainer>\n {hint && <VeeqoText variant=\"hintText\">{hint}</VeeqoText>}\n </Stack>\n </Header>\n {children}\n {items && (\n <Collection items={items}>{(item: ListItemProps) => <ListItem {...item} />}</Collection>\n )}\n </StyledSection>\n);\n"],"names":["React","StyledSection","Header","Stack","InfoContainer","VeeqoText","Collection","ListItem"],"mappings":";;;;;;;;;;;;;AAea,MAAA,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACa,MACrBA,sBAAA,CAAA,aAAA,CAACC,oBAAa,EAAA,EAAA,GAAK,KAAK,EAAA;AACtB,IAAAD,sBAAA,CAAA,aAAA,CAACE,0BAAM,EAAA,IAAA;AACL,QAAAF,sBAAA,CAAA,aAAA,CAACG,WAAK,EAAA,EAAC,OAAO,EAAC,IAAI,EAAA;AACjB,YAAAH,sBAAA,CAAA,aAAA,CAACI,oBAAa,EAAA,IAAA;AACZ,gBAAAJ,sBAAA,CAAA,aAAA,CAACK,SAAS,EAAC,EAAA,OAAO,EAAC,MAAM,EAAA,EAAE,KAAK,CAAa;AAC5C,gBAAA,YAAY,CACC;YACf,IAAI,IAAIL,sBAAC,CAAA,aAAA,CAAAK,SAAS,EAAC,EAAA,OAAO,EAAC,UAAU,EAAE,EAAA,IAAI,CAAa,CACnD,CACD;IACR,QAAQ;IACR,KAAK,KACJL,sBAAC,CAAA,aAAA,CAAAM,8BAAU,IAAC,KAAK,EAAE,KAAK,EAAA,EAAG,CAAC,IAAmB,KAAKN,sBAAC,CAAA,aAAA,CAAAO,iBAAQ,EAAK,EAAA,GAAA,IAAI,GAAI,CAAc,CACzF,CACa;;;;"}
@@ -0,0 +1,19 @@
1
+ import React__default from 'react';
2
+ import { Header, Collection } from 'react-aria-components';
3
+ import { Stack } from '../../Stack/Stack.js';
4
+ import { Text } from '../../Text/Text.js';
5
+ import { StyledSection, InfoContainer } from './styled.js';
6
+ import { ListItem } from '../ListItem/ListItem.js';
7
+
8
+ const ListItemSection = ({ label, hint, itemInfoSlot, items, children, ...props }) => (React__default.createElement(StyledSection, { ...props },
9
+ React__default.createElement(Header, null,
10
+ React__default.createElement(Stack, { spacing: "xs" },
11
+ React__default.createElement(InfoContainer, null,
12
+ React__default.createElement(Text, { variant: "body" }, label),
13
+ itemInfoSlot),
14
+ hint && React__default.createElement(Text, { variant: "hintText" }, hint))),
15
+ children,
16
+ items && (React__default.createElement(Collection, { items: items }, (item) => React__default.createElement(ListItem, { ...item })))));
17
+
18
+ export { ListItemSection };
19
+ //# sourceMappingURL=ListItemSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListItemSection.js","sources":["../../../../src/components/SelectDropdown/ListItemSection/ListItemSection.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport { Collection, Header, SectionProps } from 'react-aria-components';\nimport { Stack } from '../../Stack';\nimport { Text as VeeqoText } from '../../Text';\nimport { InfoContainer, StyledSection } from './styled';\nimport { ListItemProps } from '../ListItem/types';\nimport { ListItem } from '../ListItem/ListItem';\n\nexport type ListItemSectionProps = Omit<SectionProps<ListItemProps>, 'items'> & {\n label: string;\n hint?: string;\n itemInfoSlot?: ReactElement;\n items?: ListItemProps[];\n};\n\nexport const ListItemSection = ({\n label,\n hint,\n itemInfoSlot,\n items,\n children,\n ...props\n}: ListItemSectionProps) => (\n <StyledSection {...props}>\n <Header>\n <Stack spacing=\"xs\">\n <InfoContainer>\n <VeeqoText variant=\"body\">{label}</VeeqoText>\n {itemInfoSlot}\n </InfoContainer>\n {hint && <VeeqoText variant=\"hintText\">{hint}</VeeqoText>}\n </Stack>\n </Header>\n {children}\n {items && (\n <Collection items={items}>{(item: ListItemProps) => <ListItem {...item} />}</Collection>\n )}\n </StyledSection>\n);\n"],"names":["React","VeeqoText"],"mappings":";;;;;;;AAea,MAAA,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACa,MACrBA,cAAA,CAAA,aAAA,CAAC,aAAa,EAAA,EAAA,GAAK,KAAK,EAAA;AACtB,IAAAA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAA,IAAA;AACL,QAAAA,cAAA,CAAA,aAAA,CAAC,KAAK,EAAA,EAAC,OAAO,EAAC,IAAI,EAAA;AACjB,YAAAA,cAAA,CAAA,aAAA,CAAC,aAAa,EAAA,IAAA;AACZ,gBAAAA,cAAA,CAAA,aAAA,CAACC,IAAS,EAAC,EAAA,OAAO,EAAC,MAAM,EAAA,EAAE,KAAK,CAAa;AAC5C,gBAAA,YAAY,CACC;YACf,IAAI,IAAID,cAAC,CAAA,aAAA,CAAAC,IAAS,EAAC,EAAA,OAAO,EAAC,UAAU,EAAE,EAAA,IAAI,CAAa,CACnD,CACD;IACR,QAAQ;IACR,KAAK,KACJD,cAAC,CAAA,aAAA,CAAA,UAAU,IAAC,KAAK,EAAE,KAAK,EAAA,EAAG,CAAC,IAAmB,KAAKA,cAAC,CAAA,aAAA,CAAA,QAAQ,EAAK,EAAA,GAAA,IAAI,GAAI,CAAc,CACzF,CACa;;;;"}
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var reactAriaComponents = require('react-aria-components');
4
+ var styled = require('styled-components');
5
+ var index = require('../../../theme/index.cjs');
6
+
7
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
+
9
+ var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
10
+
11
+ const InfoContainer = styled__default.default.div.withConfig({ displayName: "vui--InfoContainer", componentId: "vui--1q1w6zs" }) `display:flex;flex-direction:row;align-items:center;gap:${index.theme.sizes.sm};`;
12
+ const StyledSection = styled__default.default(reactAriaComponents.Section).withConfig({ displayName: "vui--StyledSection", componentId: "vui--6na2yk" }) `border-radius:${index.theme.sizes.base};`;
13
+
14
+ exports.InfoContainer = InfoContainer;
15
+ exports.StyledSection = StyledSection;
16
+ //# sourceMappingURL=styled.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled.cjs","sources":["../../../../src/components/SelectDropdown/ListItemSection/styled.ts"],"sourcesContent":["import { Section } from 'react-aria-components';\nimport styled from 'styled-components';\nimport { theme } from 'Theme';\n\nexport const InfoContainer = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: ${theme.sizes.sm};\n`;\n\nexport const StyledSection = styled(Section)`\n border-radius: ${theme.sizes.base};\n`;\n"],"names":["styled","theme","Section"],"mappings":";;;;;;;;;;AAIO,MAAM,aAAa,GAAGA,uBAAM,CAAC,GAAG,CAI9B,UAAA,CAAA,EAAA,WAAA,EAAA,oBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,uDAAA,EAAAC,WAAK,CAAC,KAAK,CAAC,EAAE;AAGhB,MAAM,aAAa,GAAGD,uBAAM,CAACE,2BAAO,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,oBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,cAAA,EACzBD,WAAK,CAAC,KAAK,CAAC,IAAI;;;;;"}
@@ -0,0 +1,9 @@
1
+ import { Section } from 'react-aria-components';
2
+ import styled from 'styled-components';
3
+ import { theme } from '../../../theme/index.js';
4
+
5
+ const InfoContainer = styled.div.withConfig({ displayName: "vui--InfoContainer", componentId: "vui--1q1w6zs" }) `display:flex;flex-direction:row;align-items:center;gap:${theme.sizes.sm};`;
6
+ const StyledSection = styled(Section).withConfig({ displayName: "vui--StyledSection", componentId: "vui--6na2yk" }) `border-radius:${theme.sizes.base};`;
7
+
8
+ export { InfoContainer, StyledSection };
9
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled.js","sources":["../../../../src/components/SelectDropdown/ListItemSection/styled.ts"],"sourcesContent":["import { Section } from 'react-aria-components';\nimport styled from 'styled-components';\nimport { theme } from 'Theme';\n\nexport const InfoContainer = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: ${theme.sizes.sm};\n`;\n\nexport const StyledSection = styled(Section)`\n border-radius: ${theme.sizes.base};\n`;\n"],"names":[],"mappings":";;;;AAIO,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAI9B,UAAA,CAAA,EAAA,WAAA,EAAA,oBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,uDAAA,EAAA,KAAK,CAAC,KAAK,CAAC,EAAE;AAGhB,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,oBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,cAAA,EACzB,KAAK,CAAC,KAAK,CAAC,IAAI;;;;"}
@@ -0,0 +1,48 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var buildClassnames = require('../../utils/buildClassnames.cjs');
5
+ require('uid/secure');
6
+ var SelectedOption = require('./components/SelectedOption.cjs');
7
+ var utils = require('./utils.cjs');
8
+ var styled = require('./styled.cjs');
9
+ var ListItemSection = require('./ListItemSection/ListItemSection.cjs');
10
+ var ListItem = require('./ListItem/ListItem.cjs');
11
+ var SelectDropdownState = require('./components/SelectDropdownState.cjs');
12
+
13
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
14
+
15
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
16
+
17
+ const SelectDropdown = ({ id, className, placeholder = 'Select item', multiple = false, compact = false, hasError = false, options, value, actions, isLoading = false, searchValue, emptyStateSlot, onSearchChange, onChange, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, ...otherProps }) => {
18
+ const hasSection = options.flatMap((option) => option).some((item) => 'items' in item);
19
+ const classNames = utils.generateClassNames(className);
20
+ const [isSelectOpen, setIsSelectOpen] = React.useState(false);
21
+ const [selectedValues, setSelectedValues] = React.useState(utils.getValuesFromKeys(options, hasSection, value));
22
+ const selectionMode = multiple ? 'multiple' : 'single';
23
+ const onSelectionChange = React.useCallback((keys) => {
24
+ const selectedKeys = Array.from(keys);
25
+ const newSelectedValues = utils.getValuesFromKeys(options, hasSection, selectedKeys);
26
+ setSelectedValues(newSelectedValues);
27
+ onChange(newSelectedValues);
28
+ if (multiple)
29
+ return;
30
+ setIsSelectOpen(false);
31
+ }, [options, hasSection, onChange, multiple]);
32
+ return (React__default.default.createElement(styled.StyledDropdown, { id: `select-dropdown-${id}`, className: buildClassnames.buildClassnames([classNames === null || classNames === undefined ? undefined : classNames.popover, className]), shouldShow: isSelectOpen, setShouldShow: setIsSelectOpen, useAnchorWidth: true, hasError: hasError, ctaProps: {
33
+ className: buildClassnames.buildClassnames([classNames === null || classNames === undefined ? undefined : classNames.button, className]),
34
+ children: (React__default.default.createElement(SelectedOption.SelectedOption, { placeholder: placeholder, options: selectedValues, selectionMode: selectionMode })),
35
+ size: compact ? 'sm' : 'base',
36
+ variant: hasError ? 'destructive' : 'default',
37
+ } },
38
+ onSearchChange && (React__default.default.createElement(React__default.default.Fragment, null,
39
+ React__default.default.createElement(styled.StyledSearch, { value: searchValue, onChange: onSearchChange }),
40
+ React__default.default.createElement(styled.Separator, null))),
41
+ React__default.default.createElement(styled.StyledListBox, { className: buildClassnames.buildClassnames([classNames === null || classNames === undefined ? undefined : classNames.optionsContainer, className]), "aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== undefined ? ariaLabelledBy : `${id}-label`, "aria-describedby": ariaDescribedBy !== null && ariaDescribedBy !== undefined ? ariaDescribedBy : `${id}-hint`, selectionMode: selectionMode, items: options, onSelectionChange: onSelectionChange, selectedKeys: selectedValues.map((selectedValue) => selectedValue.id), renderEmptyState: () => (React__default.default.createElement(SelectDropdownState.SelectDropdownState, { isLoading: isLoading, emptyStateSlot: emptyStateSlot })), ...otherProps }, (item) => hasSection ? (React__default.default.createElement(ListItemSection.ListItemSection, { ...item })) : (React__default.default.createElement(ListItem.ListItem, { ...item }))), actions === null || actions === undefined ? undefined :
42
+ actions.map(({ label, ...props }) => (React__default.default.createElement(React__default.default.Fragment, null,
43
+ React__default.default.createElement(styled.Separator, { key: `seperator-${label}` }),
44
+ React__default.default.createElement(styled.CTAButton, { key: label, ...props }))))));
45
+ };
46
+
47
+ exports.SelectDropdown = SelectDropdown;
48
+ //# sourceMappingURL=SelectDropdown.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectDropdown.cjs","sources":["../../../src/components/SelectDropdown/SelectDropdown.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Key, Selection } from 'react-aria-components';\n\nimport { buildClassnames } from '../../utils';\nimport { SelectedOption } from './components/SelectedOption';\nimport { generateClassNames, getValuesFromKeys } from './utils';\nimport { CTAButton, Separator, StyledDropdown, StyledListBox, StyledSearch } from './styled';\nimport { SelectDropdownItem, SelectDropdownProps } from './types';\nimport { ListItemSection, ListItemSectionProps } from './ListItemSection/ListItemSection';\nimport { ListItem } from './ListItem';\nimport { ListItemProps } from './ListItem/types';\nimport { SelectDropdownState } from './components/SelectDropdownState';\n\nexport const SelectDropdown = ({\n id,\n className,\n placeholder = 'Select item',\n multiple = false,\n compact = false,\n hasError = false,\n options,\n value,\n actions,\n isLoading = false,\n searchValue,\n emptyStateSlot,\n onSearchChange,\n onChange,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n ...otherProps\n}: SelectDropdownProps) => {\n const hasSection = options.flatMap((option) => option).some((item) => 'items' in item);\n const classNames = generateClassNames(className);\n\n const [isSelectOpen, setIsSelectOpen] = useState(false);\n const [selectedValues, setSelectedValues] = useState<SelectDropdownItem[]>(\n getValuesFromKeys(options, hasSection, value),\n );\n const selectionMode = multiple ? 'multiple' : 'single';\n\n const onSelectionChange = useCallback(\n (keys: Selection) => {\n const selectedKeys = Array.from(keys) as Key[];\n const newSelectedValues = getValuesFromKeys(options, hasSection, selectedKeys);\n setSelectedValues(newSelectedValues);\n onChange(newSelectedValues);\n\n if (multiple) return;\n setIsSelectOpen(false);\n },\n [options, hasSection, onChange, multiple],\n );\n\n return (\n <StyledDropdown\n id={`select-dropdown-${id}`}\n className={buildClassnames([classNames?.popover, className])}\n shouldShow={isSelectOpen}\n setShouldShow={setIsSelectOpen}\n useAnchorWidth\n hasError={hasError}\n ctaProps={{\n className: buildClassnames([classNames?.button, className]),\n children: (\n <SelectedOption\n placeholder={placeholder}\n options={selectedValues}\n selectionMode={selectionMode}\n />\n ),\n size: compact ? 'sm' : 'base',\n variant: hasError ? 'destructive' : 'default',\n }}\n >\n {onSearchChange && (\n <>\n <StyledSearch value={searchValue} onChange={onSearchChange} />\n <Separator />\n </>\n )}\n <StyledListBox\n className={buildClassnames([classNames?.optionsContainer, className])}\n aria-labelledby={ariaLabelledBy ?? `${id}-label`}\n aria-describedby={ariaDescribedBy ?? `${id}-hint`}\n selectionMode={selectionMode}\n items={options}\n onSelectionChange={onSelectionChange}\n selectedKeys={selectedValues.map((selectedValue) => selectedValue.id) as Key[]}\n renderEmptyState={() => (\n <SelectDropdownState isLoading={isLoading} emptyStateSlot={emptyStateSlot} />\n )}\n {...otherProps}\n >\n {(item) =>\n hasSection ? (\n <ListItemSection {...(item as ListItemSectionProps)} />\n ) : (\n <ListItem {...(item as ListItemProps)} />\n )\n }\n </StyledListBox>\n {actions?.map(({ label, ...props }) => (\n <>\n <Separator key={`seperator-${label}`} />\n <CTAButton key={label} {...props} />\n </>\n ))}\n </StyledDropdown>\n );\n};\n"],"names":["generateClassNames","useState","getValuesFromKeys","useCallback","React","StyledDropdown","buildClassnames","SelectedOption","StyledSearch","Separator","StyledListBox","SelectDropdownState","ListItemSection","ListItem","CTAButton"],"mappings":";;;;;;;;;;;;;;;;AAaa,MAAA,cAAc,GAAG,CAAC,EAC7B,EAAE,EACF,SAAS,EACT,WAAW,GAAG,aAAa,EAC3B,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,OAAO,EACP,KAAK,EACL,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,WAAW,EACX,cAAc,EACd,cAAc,EACd,QAAQ,EACR,iBAAiB,EAAE,cAAc,EACjC,kBAAkB,EAAE,eAAe,EACnC,GAAG,UAAU,EACO,KAAI;IACxB,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,IAA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AC9E,EACG,GAAA,UAAU,EAEb,EAAA,CAAC,IAAI,KACJ,UAAU,IACRP,sBAAC,CAAA,aAAA,CAAAQ,+BAAe,EAAM,EAAA,GAAA,IAA6B,EAAI,CAAA,KAEvDR,sBAAC,CAAA,aAAA,CAAAS,iBAAQ,EAAM,EAAA,GAAA,IAAsB,EAAI,CAAA,CAC1C,CAEW,EACf,OAAO,KAAA,IAAA,IAAP,OAAO,KAAA,SAAA,GAAA,SAAA;AAAP,QAAA,OAAO,CAAE,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,MAChCT,sBAAA,CAAA,aAAA,CAAAA,sBAAA,CAAA,QAAA,EAAA,IAAA;AACE,YAAAA,sBAAA,CAAA,aAAA,CAACK,gBAAS,EAAC,EAAA,GAAG,EAAE,CAAa,UAAA,EAAA,KAAK,EAAE,EAAI,CAAA;AACxC,YAAAL,sBAAA,CAAA,aAAA,CAACU,gBAAS,EAAA,EAAC,GAAG,EAAE,KAAK,EAAA,GAAM,KAAK,EAAA,CAAI,CACnC,CACJ,CAAC,CACa;AAErB;;;;"}
@@ -0,0 +1,42 @@
1
+ import React__default, { useState, useCallback } from 'react';
2
+ import { buildClassnames } from '../../utils/buildClassnames.js';
3
+ import 'uid/secure';
4
+ import { SelectedOption } from './components/SelectedOption.js';
5
+ import { getValuesFromKeys, generateClassNames } from './utils.js';
6
+ import { StyledDropdown, StyledSearch, Separator, StyledListBox, CTAButton } from './styled.js';
7
+ import { ListItemSection } from './ListItemSection/ListItemSection.js';
8
+ import { ListItem } from './ListItem/ListItem.js';
9
+ import { SelectDropdownState } from './components/SelectDropdownState.js';
10
+
11
+ const SelectDropdown = ({ id, className, placeholder = 'Select item', multiple = false, compact = false, hasError = false, options, value, actions, isLoading = false, searchValue, emptyStateSlot, onSearchChange, onChange, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, ...otherProps }) => {
12
+ const hasSection = options.flatMap((option) => option).some((item) => 'items' in item);
13
+ const classNames = generateClassNames(className);
14
+ const [isSelectOpen, setIsSelectOpen] = useState(false);
15
+ const [selectedValues, setSelectedValues] = useState(getValuesFromKeys(options, hasSection, value));
16
+ const selectionMode = multiple ? 'multiple' : 'single';
17
+ const onSelectionChange = useCallback((keys) => {
18
+ const selectedKeys = Array.from(keys);
19
+ const newSelectedValues = getValuesFromKeys(options, hasSection, selectedKeys);
20
+ setSelectedValues(newSelectedValues);
21
+ onChange(newSelectedValues);
22
+ if (multiple)
23
+ return;
24
+ setIsSelectOpen(false);
25
+ }, [options, hasSection, onChange, multiple]);
26
+ return (React__default.createElement(StyledDropdown, { id: `select-dropdown-${id}`, className: buildClassnames([classNames === null || classNames === undefined ? undefined : classNames.popover, className]), shouldShow: isSelectOpen, setShouldShow: setIsSelectOpen, useAnchorWidth: true, hasError: hasError, ctaProps: {
27
+ className: buildClassnames([classNames === null || classNames === undefined ? undefined : classNames.button, className]),
28
+ children: (React__default.createElement(SelectedOption, { placeholder: placeholder, options: selectedValues, selectionMode: selectionMode })),
29
+ size: compact ? 'sm' : 'base',
30
+ variant: hasError ? 'destructive' : 'default',
31
+ } },
32
+ onSearchChange && (React__default.createElement(React__default.Fragment, null,
33
+ React__default.createElement(StyledSearch, { value: searchValue, onChange: onSearchChange }),
34
+ React__default.createElement(Separator, null))),
35
+ React__default.createElement(StyledListBox, { className: buildClassnames([classNames === null || classNames === undefined ? undefined : classNames.optionsContainer, className]), "aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== undefined ? ariaLabelledBy : `${id}-label`, "aria-describedby": ariaDescribedBy !== null && ariaDescribedBy !== undefined ? ariaDescribedBy : `${id}-hint`, selectionMode: selectionMode, items: options, onSelectionChange: onSelectionChange, selectedKeys: selectedValues.map((selectedValue) => selectedValue.id), renderEmptyState: () => (React__default.createElement(SelectDropdownState, { isLoading: isLoading, emptyStateSlot: emptyStateSlot })), ...otherProps }, (item) => hasSection ? (React__default.createElement(ListItemSection, { ...item })) : (React__default.createElement(ListItem, { ...item }))), actions === null || actions === undefined ? undefined :
36
+ actions.map(({ label, ...props }) => (React__default.createElement(React__default.Fragment, null,
37
+ React__default.createElement(Separator, { key: `seperator-${label}` }),
38
+ React__default.createElement(CTAButton, { key: label, ...props }))))));
39
+ };
40
+
41
+ export { SelectDropdown };
42
+ //# sourceMappingURL=SelectDropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectDropdown.js","sources":["../../../src/components/SelectDropdown/SelectDropdown.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Key, Selection } from 'react-aria-components';\n\nimport { buildClassnames } from '../../utils';\nimport { SelectedOption } from './components/SelectedOption';\nimport { generateClassNames, getValuesFromKeys } from './utils';\nimport { CTAButton, Separator, StyledDropdown, StyledListBox, StyledSearch } from './styled';\nimport { SelectDropdownItem, SelectDropdownProps } from './types';\nimport { ListItemSection, ListItemSectionProps } from './ListItemSection/ListItemSection';\nimport { ListItem } from './ListItem';\nimport { ListItemProps } from './ListItem/types';\nimport { SelectDropdownState } from './components/SelectDropdownState';\n\nexport const SelectDropdown = ({\n id,\n className,\n placeholder = 'Select item',\n multiple = false,\n compact = false,\n hasError = false,\n options,\n value,\n actions,\n isLoading = false,\n searchValue,\n emptyStateSlot,\n onSearchChange,\n onChange,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n ...otherProps\n}: SelectDropdownProps) => {\n const hasSection = options.flatMap((option) => option).some((item) => 'items' in item);\n const classNames = generateClassNames(className);\n\n const [isSelectOpen, setIsSelectOpen] = useState(false);\n const [selectedValues, setSelectedValues] = useState<SelectDropdownItem[]>(\n getValuesFromKeys(options, hasSection, value),\n );\n const selectionMode = multiple ? 'multiple' : 'single';\n\n const onSelectionChange = useCallback(\n (keys: Selection) => {\n const selectedKeys = Array.from(keys) as Key[];\n const newSelectedValues = getValuesFromKeys(options, hasSection, selectedKeys);\n setSelectedValues(newSelectedValues);\n onChange(newSelectedValues);\n\n if (multiple) return;\n setIsSelectOpen(false);\n },\n [options, hasSection, onChange, multiple],\n );\n\n return (\n <StyledDropdown\n id={`select-dropdown-${id}`}\n className={buildClassnames([classNames?.popover, className])}\n shouldShow={isSelectOpen}\n setShouldShow={setIsSelectOpen}\n useAnchorWidth\n hasError={hasError}\n ctaProps={{\n className: buildClassnames([classNames?.button, className]),\n children: (\n <SelectedOption\n placeholder={placeholder}\n options={selectedValues}\n selectionMode={selectionMode}\n />\n ),\n size: compact ? 'sm' : 'base',\n variant: hasError ? 'destructive' : 'default',\n }}\n >\n {onSearchChange && (\n <>\n <StyledSearch value={searchValue} onChange={onSearchChange} />\n <Separator />\n </>\n )}\n <StyledListBox\n className={buildClassnames([classNames?.optionsContainer, className])}\n aria-labelledby={ariaLabelledBy ?? `${id}-label`}\n aria-describedby={ariaDescribedBy ?? `${id}-hint`}\n selectionMode={selectionMode}\n items={options}\n onSelectionChange={onSelectionChange}\n selectedKeys={selectedValues.map((selectedValue) => selectedValue.id) as Key[]}\n renderEmptyState={() => (\n <SelectDropdownState isLoading={isLoading} emptyStateSlot={emptyStateSlot} />\n )}\n {...otherProps}\n >\n {(item) =>\n hasSection ? (\n <ListItemSection {...(item as ListItemSectionProps)} />\n ) : (\n <ListItem {...(item as ListItemProps)} />\n )\n }\n </StyledListBox>\n {actions?.map(({ label, ...props }) => (\n <>\n <Separator key={`seperator-${label}`} />\n <CTAButton key={label} {...props} />\n </>\n ))}\n </StyledDropdown>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;AAaa,MAAA,cAAc,GAAG,CAAC,EAC7B,EAAE,EACF,SAAS,EACT,WAAW,GAAG,aAAa,EAC3B,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,OAAO,EACP,KAAK,EACL,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,WAAW,EACX,cAAc,EACd,cAAc,EACd,QAAQ,EACR,iBAAiB,EAAE,cAAc,EACjC,kBAAkB,EAAE,eA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cAAA,CAAA,aAAA,CAAC,mBAAmB,EAAC,EAAA,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAI,CAAA,CAC9E,EACG,GAAA,UAAU,EAEb,EAAA,CAAC,IAAI,KACJ,UAAU,IACRA,cAAC,CAAA,aAAA,CAAA,eAAe,EAAM,EAAA,GAAA,IAA6B,EAAI,CAAA,KAEvDA,cAAC,CAAA,aAAA,CAAA,QAAQ,EAAM,EAAA,GAAA,IAAsB,EAAI,CAAA,CAC1C,CAEW,EACf,OAAO,KAAA,IAAA,IAAP,OAAO,KAAA,SAAA,GAAA,SAAA;AAAP,QAAA,OAAO,CAAE,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,MAChCA,cAAA,CAAA,aAAA,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAA;AACE,YAAAA,cAAA,CAAA,aAAA,CAAC,SAAS,EAAC,EAAA,GAAG,EAAE,CAAa,UAAA,EAAA,KAAK,EAAE,EAAI,CAAA;AACxC,YAAAA,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAC,GAAG,EAAE,KAAK,EAAA,GAAM,KAAK,EAAA,CAAI,CACnC,CACJ,CAAC,CACa;AAErB;;;;"}
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var Loader = require('../../Loader/Loader.cjs');
5
+
6
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
7
+
8
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
9
+
10
+ const SelectDropdownState = ({ isLoading, emptyStateSlot }) => {
11
+ if (isLoading)
12
+ return React__default.default.createElement(Loader.Loader, null);
13
+ if (emptyStateSlot)
14
+ return emptyStateSlot;
15
+ return React__default.default.createElement("span", null, "No items found");
16
+ };
17
+
18
+ exports.SelectDropdownState = SelectDropdownState;
19
+ //# sourceMappingURL=SelectDropdownState.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectDropdownState.cjs","sources":["../../../../src/components/SelectDropdown/components/SelectDropdownState.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport { Loader } from '../../Loader';\n\ntype SelectDropdownStateProps = {\n isLoading: boolean;\n emptyStateSlot?: ReactElement;\n};\n\nexport const SelectDropdownState = ({ isLoading, emptyStateSlot }: SelectDropdownStateProps) => {\n if (isLoading) return <Loader />;\n if (emptyStateSlot) return emptyStateSlot;\n\n return <span>No items found</span>;\n};\n"],"names":["React","Loader"],"mappings":";;;;;;;;;AAQa,MAAA,mBAAmB,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,EAA4B,KAAI;AAC7F,IAAA,IAAI,SAAS;QAAE,OAAOA,sBAAA,CAAA,aAAA,CAACC,aAAM,EAAA,IAAA,CAAG;AAChC,IAAA,IAAI,cAAc;AAAE,QAAA,OAAO,cAAc;AAEzC,IAAA,OAAOD,oEAA2B;AACpC;;;;"}
@@ -0,0 +1,13 @@
1
+ import React__default from 'react';
2
+ import { Loader } from '../../Loader/Loader.js';
3
+
4
+ const SelectDropdownState = ({ isLoading, emptyStateSlot }) => {
5
+ if (isLoading)
6
+ return React__default.createElement(Loader, null);
7
+ if (emptyStateSlot)
8
+ return emptyStateSlot;
9
+ return React__default.createElement("span", null, "No items found");
10
+ };
11
+
12
+ export { SelectDropdownState };
13
+ //# sourceMappingURL=SelectDropdownState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectDropdownState.js","sources":["../../../../src/components/SelectDropdown/components/SelectDropdownState.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport { Loader } from '../../Loader';\n\ntype SelectDropdownStateProps = {\n isLoading: boolean;\n emptyStateSlot?: ReactElement;\n};\n\nexport const SelectDropdownState = ({ isLoading, emptyStateSlot }: SelectDropdownStateProps) => {\n if (isLoading) return <Loader />;\n if (emptyStateSlot) return emptyStateSlot;\n\n return <span>No items found</span>;\n};\n"],"names":["React"],"mappings":";;;AAQa,MAAA,mBAAmB,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,EAA4B,KAAI;AAC7F,IAAA,IAAI,SAAS;QAAE,OAAOA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAA,IAAA,CAAG;AAChC,IAAA,IAAI,cAAc;AAAE,QAAA,OAAO,cAAc;AAEzC,IAAA,OAAOA,4DAA2B;AACpC;;;;"}
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var Text = require('../../Text/Text.cjs');
5
+ var styled = require('../ListItem/styled.cjs');
6
+
7
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
+
9
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
+
11
+ const SelectedOption = ({ placeholder, options, selectionMode }) => {
12
+ var _a, _b, _c;
13
+ if (options.length === 0) {
14
+ return (React__default.default.createElement(styled.ItemInfoContainer, null,
15
+ React__default.default.createElement(Text.Text, { variant: "placeholder" }, placeholder)));
16
+ }
17
+ if (selectionMode === 'single') {
18
+ return (React__default.default.createElement(styled.ItemInfoContainer, null,
19
+ React__default.default.createElement(Text.Text, { variant: "placeholder" }, (_a = options[0]) === null || _a === undefined ? undefined : _a.label),
20
+ ((_b = options[0]) === null || _b === undefined ? undefined : _b.itemInfoSlot) && React__default.default.createElement(Text.Text, { variant: "hintText" }, (_c = options[0]) === null || _c === undefined ? undefined : _c.itemInfoSlot)));
21
+ }
22
+ return (React__default.default.createElement(styled.ItemInfoContainer, null,
23
+ React__default.default.createElement(Text.Text, { variant: "placeholder" }, options.map((opt) => opt.label).join(', '))));
24
+ };
25
+
26
+ exports.SelectedOption = SelectedOption;
27
+ //# sourceMappingURL=SelectedOption.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectedOption.cjs","sources":["../../../../src/components/SelectDropdown/components/SelectedOption.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from '../../Text';\nimport { ItemInfoContainer } from '../ListItem/styled';\nimport { SelectDropdownItem } from '../types';\n\ntype SelectedOptionProps = {\n placeholder: string;\n options: SelectDropdownItem[];\n selectionMode: 'single' | 'multiple';\n};\n\nexport const SelectedOption = ({ placeholder, options, selectionMode }: SelectedOptionProps) => {\n if (options.length === 0) {\n return (\n <ItemInfoContainer>\n <Text variant=\"placeholder\">{placeholder}</Text>\n </ItemInfoContainer>\n );\n }\n\n if (selectionMode === 'single') {\n return (\n <ItemInfoContainer>\n <Text variant=\"placeholder\">{options[0]?.label}</Text>\n {options[0]?.itemInfoSlot && <Text variant=\"hintText\">{options[0]?.itemInfoSlot}</Text>}\n </ItemInfoContainer>\n );\n }\n\n return (\n <ItemInfoContainer>\n <Text variant=\"placeholder\">{options.map((opt: any) => opt.label).join(', ')}</Text>\n </ItemInfoContainer>\n );\n};\n"],"names":["React","ItemInfoContainer","Text"],"mappings":";;;;;;;;;;AAWO,MAAM,cAAc,GAAG,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAuB,KAAI;;AAC7F,IAAA,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;QACxB,QACEA,qCAACC,wBAAiB,EAAA,IAAA;YAChBD,sBAAC,CAAA,aAAA,CAAAE,SAAI,EAAC,EAAA,OAAO,EAAC,aAAa,IAAE,WAAW,CAAQ,CAC9B;AAEvB;IAED,IAAI,aAAa,KAAK,QAAQ,EAAE;QAC9B,QACEF,qCAACC,wBAAiB,EAAA,IAAA;AAChB,YAAAD,sBAAA,CAAA,aAAA,CAACE,SAAI,EAAA,EAAC,OAAO,EAAC,aAAa,EAAA,EAAE,CAAA,EAAA,GAAA,OAAO,CAAC,CAAC,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,SAAA,GAAA,SAAA,GAAA,EAAA,CAAE,KAAK,CAAQ;YACrD,CAAA,CAAA,EAAA,GAAA,OAAO,CAAC,CAAC,CAAC,gDAAE,YAAY,KAAIF,sBAAC,CAAA,aAAA,CAAAE,SAAI,EAAC,EAAA,OAAO,EAAC,UAAU,EAAA,EAAE,CAAA,EAAA,GAAA,OAAO,CAAC,CAAC,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,SAAA,GAAA,SAAA,GAAA,EAAA,CAAE,YAAY,CAAQ,CACrE;AAEvB;IAED,QACEF,qCAACC,wBAAiB,EAAA,IAAA;QAChBD,sBAAC,CAAA,aAAA,CAAAE,SAAI,EAAC,EAAA,OAAO,EAAC,aAAa,EAAE,EAAA,OAAO,CAAC,GAAG,CAAC,CAAC,GAAQ,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAQ,CAClE;AAExB;;;;"}
@@ -0,0 +1,21 @@
1
+ import React__default from 'react';
2
+ import { Text } from '../../Text/Text.js';
3
+ import { ItemInfoContainer } from '../ListItem/styled.js';
4
+
5
+ const SelectedOption = ({ placeholder, options, selectionMode }) => {
6
+ var _a, _b, _c;
7
+ if (options.length === 0) {
8
+ return (React__default.createElement(ItemInfoContainer, null,
9
+ React__default.createElement(Text, { variant: "placeholder" }, placeholder)));
10
+ }
11
+ if (selectionMode === 'single') {
12
+ return (React__default.createElement(ItemInfoContainer, null,
13
+ React__default.createElement(Text, { variant: "placeholder" }, (_a = options[0]) === null || _a === undefined ? undefined : _a.label),
14
+ ((_b = options[0]) === null || _b === undefined ? undefined : _b.itemInfoSlot) && React__default.createElement(Text, { variant: "hintText" }, (_c = options[0]) === null || _c === undefined ? undefined : _c.itemInfoSlot)));
15
+ }
16
+ return (React__default.createElement(ItemInfoContainer, null,
17
+ React__default.createElement(Text, { variant: "placeholder" }, options.map((opt) => opt.label).join(', '))));
18
+ };
19
+
20
+ export { SelectedOption };
21
+ //# sourceMappingURL=SelectedOption.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectedOption.js","sources":["../../../../src/components/SelectDropdown/components/SelectedOption.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from '../../Text';\nimport { ItemInfoContainer } from '../ListItem/styled';\nimport { SelectDropdownItem } from '../types';\n\ntype SelectedOptionProps = {\n placeholder: string;\n options: SelectDropdownItem[];\n selectionMode: 'single' | 'multiple';\n};\n\nexport const SelectedOption = ({ placeholder, options, selectionMode }: SelectedOptionProps) => {\n if (options.length === 0) {\n return (\n <ItemInfoContainer>\n <Text variant=\"placeholder\">{placeholder}</Text>\n </ItemInfoContainer>\n );\n }\n\n if (selectionMode === 'single') {\n return (\n <ItemInfoContainer>\n <Text variant=\"placeholder\">{options[0]?.label}</Text>\n {options[0]?.itemInfoSlot && <Text variant=\"hintText\">{options[0]?.itemInfoSlot}</Text>}\n </ItemInfoContainer>\n );\n }\n\n return (\n <ItemInfoContainer>\n <Text variant=\"placeholder\">{options.map((opt: any) => opt.label).join(', ')}</Text>\n </ItemInfoContainer>\n );\n};\n"],"names":["React"],"mappings":";;;;AAWO,MAAM,cAAc,GAAG,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAuB,KAAI;;AAC7F,IAAA,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;QACxB,QACEA,6BAAC,iBAAiB,EAAA,IAAA;YAChBA,cAAC,CAAA,aAAA,CAAA,IAAI,EAAC,EAAA,OAAO,EAAC,aAAa,IAAE,WAAW,CAAQ,CAC9B;AAEvB;IAED,IAAI,aAAa,KAAK,QAAQ,EAAE;QAC9B,QACEA,6BAAC,iBAAiB,EAAA,IAAA;AAChB,YAAAA,cAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAC,OAAO,EAAC,aAAa,EAAA,EAAE,CAAA,EAAA,GAAA,OAAO,CAAC,CAAC,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,SAAA,GAAA,SAAA,GAAA,EAAA,CAAE,KAAK,CAAQ;YACrD,CAAA,CAAA,EAAA,GAAA,OAAO,CAAC,CAAC,CAAC,gDAAE,YAAY,KAAIA,cAAC,CAAA,aAAA,CAAA,IAAI,EAAC,EAAA,OAAO,EAAC,UAAU,EAAA,EAAE,CAAA,EAAA,GAAA,OAAO,CAAC,CAAC,CAAC,MAAA,IAAA,IAAA,EAAA,KAAA,SAAA,GAAA,SAAA,GAAA,EAAA,CAAE,YAAY,CAAQ,CACrE;AAEvB;IAED,QACEA,6BAAC,iBAAiB,EAAA,IAAA;QAChBA,cAAC,CAAA,aAAA,CAAA,IAAI,EAAC,EAAA,OAAO,EAAC,aAAa,EAAE,EAAA,OAAO,CAAC,GAAG,CAAC,CAAC,GAAQ,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAQ,CAClE;AAExB;;;;"}
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var withLabels = require('../../hoc/withLabels/withLabels.cjs');
4
+ require('react');
5
+ var SelectDropdown$1 = require('./SelectDropdown.cjs');
6
+
7
+ const SelectDropdown = withLabels.withLabels(SelectDropdown$1.SelectDropdown);
8
+
9
+ exports.SelectDropdown = SelectDropdown;
10
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/SelectDropdown/index.ts"],"sourcesContent":["import { withLabels } from '../../hoc';\nimport { SelectDropdown as BasicSelectDropdown } from './SelectDropdown';\n\nexport const SelectDropdown = withLabels(BasicSelectDropdown);\n"],"names":["withLabels","BasicSelectDropdown"],"mappings":";;;;;;MAGa,cAAc,GAAGA,qBAAU,CAACC,+BAAmB;;;;"}
@@ -0,0 +1,8 @@
1
+ import { withLabels } from '../../hoc/withLabels/withLabels.js';
2
+ import 'react';
3
+ import { SelectDropdown as SelectDropdown$1 } from './SelectDropdown.js';
4
+
5
+ const SelectDropdown = withLabels(SelectDropdown$1);
6
+
7
+ export { SelectDropdown };
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/SelectDropdown/index.ts"],"sourcesContent":["import { withLabels } from '../../hoc';\nimport { SelectDropdown as BasicSelectDropdown } from './SelectDropdown';\n\nexport const SelectDropdown = withLabels(BasicSelectDropdown);\n"],"names":["BasicSelectDropdown"],"mappings":";;;;MAGa,cAAc,GAAG,UAAU,CAACA,gBAAmB;;;;"}
@@ -0,0 +1,39 @@
1
+ 'use strict';
2
+
3
+ var styled = require('styled-components');
4
+ var index = require('../../theme/index.cjs');
5
+ var reactAriaComponents = require('react-aria-components');
6
+ var Button = require('../Button/Button.cjs');
7
+ var Dropdown = require('../Dropdown/Dropdown.cjs');
8
+ var Search = require('../Search/Search.cjs');
9
+
10
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
11
+
12
+ var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
13
+
14
+ const StyledListBox = styled__default.default(reactAriaComponents.ListBox).withConfig({ displayName: "vui--StyledListBox", componentId: "vui--1fqdcy1" }) `overflow-y:scroll;max-height:300px;padding:${index.theme.sizes.sm};scroll-padding:${index.theme.sizes.xs} 0;&[data-empty]{display:flex;align-items:center;justify-content:center;}`;
15
+ const StyledDropdown = styled__default.default(Dropdown.Dropdown).attrs((props) => ({
16
+ ctaProps: {
17
+ ...props.ctaProps,
18
+ style: {
19
+ padding: index.theme.sizes[3],
20
+ border: `1px solid ${props.hasError ? index.theme.colors.secondary.red.base : 'none'}`,
21
+ },
22
+ contentStyles: {
23
+ justifyContent: 'space-between',
24
+ flex: 1,
25
+ },
26
+ },
27
+ })).withConfig({ displayName: "vui--StyledDropdown", componentId: "vui--to2qbd" }) `padding:0;`;
28
+ const StyledSearch = styled__default.default(Search.Search).withConfig({ displayName: "vui--StyledSearch", componentId: "vui--122i7bz" }) `margin:${index.theme.sizes.sm};`;
29
+ const Separator = styled__default.default.hr.withConfig({ displayName: "vui--Separator", componentId: "vui--1vuemb8" }) `height:1px;background:${index.theme.colors.neutral.grey.base};border:none;margin:0 0;width:100%;`;
30
+ const CTAButton = styled__default.default(Button.Button).attrs({
31
+ variant: 'flat',
32
+ }).withConfig({ displayName: "vui--CTAButton", componentId: "vui--1udm7tz" }) `justify-content:start;padding-left:${index.theme.sizes.xs};margin:${index.theme.sizes.sm} ${index.theme.sizes.xs};border-radius:${index.theme.radius.base};font-size:14px;svg{width:${index.theme.sizes.md};height:${index.theme.sizes.md};}`;
33
+
34
+ exports.CTAButton = CTAButton;
35
+ exports.Separator = Separator;
36
+ exports.StyledDropdown = StyledDropdown;
37
+ exports.StyledListBox = StyledListBox;
38
+ exports.StyledSearch = StyledSearch;
39
+ //# sourceMappingURL=styled.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled.cjs","sources":["../../../src/components/SelectDropdown/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { theme } from 'Theme';\nimport { ListBox } from 'react-aria-components';\nimport { Button } from '../Button';\nimport { Dropdown } from '../Dropdown';\nimport { Search } from '../Search';\nimport { DropdownProps } from '../Dropdown/types';\n\nexport const StyledListBox = styled(ListBox)`\n overflow-y: scroll;\n max-height: 300px;\n padding: ${theme.sizes.sm};\n scroll-padding: ${theme.sizes.xs} 0;\n\n &[data-empty] {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n`;\n\nexport const StyledDropdown: React.FC<DropdownProps & { hasError: boolean }> = styled(\n Dropdown,\n).attrs<{ hasError: boolean }>((props) => ({\n ctaProps: {\n ...props.ctaProps,\n style: {\n padding: theme.sizes[3],\n border: `1px solid ${props.hasError ? theme.colors.secondary.red.base : 'none'}`,\n },\n contentStyles: {\n justifyContent: 'space-between',\n flex: 1,\n },\n },\n}))`\n padding: 0;\n`;\n\nexport const StyledSearch = styled(Search)`\n margin: ${theme.sizes.sm};\n`;\n\nexport const Separator = styled.hr`\n height: 1px;\n background: ${theme.colors.neutral.grey.base};\n border: none;\n margin: 0 0;\n width: 100%;\n`;\n\nexport const CTAButton = styled(Button).attrs({\n variant: 'flat',\n})`\n justify-content: start;\n padding-left: ${theme.sizes.xs};\n margin: ${theme.sizes.sm} ${theme.sizes.xs};\n border-radius: ${theme.radius.base};\n font-size: 14px;\n svg {\n width: ${theme.sizes.md};\n height: ${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,uBAAM,CAACK,aAAM,CAAC,CAAC,KAAK,CAAC;AAC5C,IAAA,OAAO,EAAE,MAAM;AAChB,CAAA,CAAC,kHAEgBH,WAAK,CAAC,KAAK,CAAC,EAAE,CACpB,QAAA,EAAAA,WAAK,CAAC,KAAK,CAAC,EAAE,CAAA,CAAA,EAAIA,WAAK,CAAC,KAAK,CAAC,EAAE,CACzB,eAAA,EAAAA,WAAK,CAAC,MAAM,CAAC,IAAI,CAAA,0BAAA,EAGvBA,WAAK,CAAC,KAAK,CAAC,EAAE,WACbA,WAAK,CAAC,KAAK,CAAC,EAAE;;;;;;;;"}
@@ -0,0 +1,29 @@
1
+ import styled from 'styled-components';
2
+ import { theme } from '../../theme/index.js';
3
+ import { ListBox } from 'react-aria-components';
4
+ import { Button } from '../Button/Button.js';
5
+ import { Dropdown } from '../Dropdown/Dropdown.js';
6
+ import { Search } from '../Search/Search.js';
7
+
8
+ const StyledListBox = styled(ListBox).withConfig({ displayName: "vui--StyledListBox", componentId: "vui--1fqdcy1" }) `overflow-y:scroll;max-height:300px;padding:${theme.sizes.sm};scroll-padding:${theme.sizes.xs} 0;&[data-empty]{display:flex;align-items:center;justify-content:center;}`;
9
+ const StyledDropdown = styled(Dropdown).attrs((props) => ({
10
+ ctaProps: {
11
+ ...props.ctaProps,
12
+ style: {
13
+ padding: theme.sizes[3],
14
+ border: `1px solid ${props.hasError ? theme.colors.secondary.red.base : 'none'}`,
15
+ },
16
+ contentStyles: {
17
+ justifyContent: 'space-between',
18
+ flex: 1,
19
+ },
20
+ },
21
+ })).withConfig({ displayName: "vui--StyledDropdown", componentId: "vui--to2qbd" }) `padding:0;`;
22
+ const StyledSearch = styled(Search).withConfig({ displayName: "vui--StyledSearch", componentId: "vui--122i7bz" }) `margin:${theme.sizes.sm};`;
23
+ const Separator = styled.hr.withConfig({ displayName: "vui--Separator", componentId: "vui--1vuemb8" }) `height:1px;background:${theme.colors.neutral.grey.base};border:none;margin:0 0;width:100%;`;
24
+ const CTAButton = styled(Button).attrs({
25
+ variant: 'flat',
26
+ }).withConfig({ displayName: "vui--CTAButton", componentId: "vui--1udm7tz" }) `justify-content:start;padding-left:${theme.sizes.xs};margin:${theme.sizes.sm} ${theme.sizes.xs};border-radius:${theme.radius.base};font-size:14px;svg{width:${theme.sizes.md};height:${theme.sizes.md};}`;
27
+
28
+ export { CTAButton, Separator, StyledDropdown, StyledListBox, StyledSearch };
29
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled.js","sources":["../../../src/components/SelectDropdown/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { theme } from 'Theme';\nimport { ListBox } from 'react-aria-components';\nimport { Button } from '../Button';\nimport { Dropdown } from '../Dropdown';\nimport { Search } from '../Search';\nimport { DropdownProps } from '../Dropdown/types';\n\nexport const StyledListBox = styled(ListBox)`\n overflow-y: scroll;\n max-height: 300px;\n padding: ${theme.sizes.sm};\n scroll-padding: ${theme.sizes.xs} 0;\n\n &[data-empty] {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n`;\n\nexport const StyledDropdown: React.FC<DropdownProps & { hasError: boolean }> = styled(\n Dropdown,\n).attrs<{ hasError: boolean }>((props) => ({\n ctaProps: {\n ...props.ctaProps,\n style: {\n padding: theme.sizes[3],\n border: `1px solid ${props.hasError ? theme.colors.secondary.red.base : 'none'}`,\n },\n contentStyles: {\n justifyContent: 'space-between',\n flex: 1,\n },\n },\n}))`\n padding: 0;\n`;\n\nexport const StyledSearch = styled(Search)`\n margin: ${theme.sizes.sm};\n`;\n\nexport const Separator = styled.hr`\n height: 1px;\n background: ${theme.colors.neutral.grey.base};\n border: none;\n margin: 0 0;\n width: 100%;\n`;\n\nexport const CTAButton = styled(Button).attrs({\n variant: 'flat',\n})`\n justify-content: start;\n padding-left: ${theme.sizes.xs};\n margin: ${theme.sizes.sm} ${theme.sizes.xs};\n border-radius: ${theme.radius.base};\n font-size: 14px;\n svg {\n width: ${theme.sizes.md};\n height: ${theme.s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O,EAAE,MAAM;AAChB,CAAA,CAAC,kHAEgB,KAAK,CAAC,KAAK,CAAC,EAAE,CACpB,QAAA,EAAA,KAAK,CAAC,KAAK,CAAC,EAAE,CAAA,CAAA,EAAI,KAAK,CAAC,KAAK,CAAC,EAAE,CACzB,eAAA,EAAA,KAAK,CAAC,MAAM,CAAC,IAAI,CAAA,0BAAA,EAGvB,KAAK,CAAC,KAAK,CAAC,EAAE,WACb,KAAK,CAAC,KAAK,CAAC,EAAE;;;;"}
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ const getValuesFromKeys = (items, hasSection, keys) => {
4
+ if (!keys)
5
+ return [];
6
+ if (!hasSection) {
7
+ return items.filter((item) => keys.includes(item.id));
8
+ }
9
+ return items.flatMap((section) => {
10
+ var _a;
11
+ return [
12
+ ...(keys.includes(section.id) ? [section] : []),
13
+ ...(((_a = section.items) === null || _a === undefined ? undefined : _a.filter((item) => keys.includes(item.id))) || []),
14
+ ];
15
+ });
16
+ };
17
+ const generateClassNames = (prefix) => ({
18
+ button: prefix ? `${prefix}-select-dropdown-button` : undefined,
19
+ optionsContainer: prefix ? `${prefix}-select-dropdown-container` : undefined,
20
+ popover: prefix ? `${prefix}-select-dropdown` : undefined,
21
+ });
22
+
23
+ exports.generateClassNames = generateClassNames;
24
+ exports.getValuesFromKeys = getValuesFromKeys;
25
+ //# sourceMappingURL=utils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.cjs","sources":["../../../src/components/SelectDropdown/utils.ts"],"sourcesContent":["import { Key } from 'react-aria-components';\nimport { ClassNamesReturnPayload, SelectDropdownItem } from './types';\nimport { ListItemSectionProps } from './ListItemSection/ListItemSection';\nimport { ListItemProps } from './ListItem/types';\n\nexport const getValuesFromKeys = (\n items: SelectDropdownItem[],\n hasSection: boolean,\n keys?: Key[],\n): SelectDropdownItem[] => {\n if (!keys) return [];\n if (!hasSection) {\n return items.filter((item) => keys.includes(item.id as Key));\n }\n\n return (items as ListItemSectionProps[]).flatMap((section) => [\n ...(keys.includes(section.id as Key) ? [section] : []),\n ...(section.items?.filter((item: ListItemProps) => keys.includes(item.id as Key)) || []),\n ]);\n};\n\nexport const generateClassNames = (prefix?: string): ClassNamesReturnPayload => ({\n button: prefix ? `${prefix}-select-dropdown-button` : undefined,\n optionsContainer: prefix ? `${prefix}-select-dropdown-container` : undefined,\n popover: prefix ? `${prefix}-select-dropdown` : undefined,\n});\n"],"names":[],"mappings":";;AAKa,MAAA,iBAAiB,GAAG,CAC/B,KAA2B,EAC3B,UAAmB,EACnB,IAAY,KACY;AACxB,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,EAAE;IACpB,IAAI,CAAC,UAAU,EAAE;AACf,QAAA,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAS,CAAC,CAAC;AAC7D;AAED,IAAA,OAAQ,KAAgC,CAAC,OAAO,CAAC,CAAC,OAAO,KAAI;;QAAC,OAAA;AAC5D,YAAA,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAS,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;YACtD,IAAI,CAAA,CAAA,EAAA,GAAA,OAAO,CAAC,KAAK,MAAE,IAAA,IAAA,EAAA,KAAA,SAAA,GAAA,SAAA,GAAA,EAAA,CAAA,MAAM,CAAC,CAAC,IAAmB,KAAK,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAS,CAAC,CAAC,KAAI,EAAE,CAAC;SACzF;AAAA,KAAA,CAAC;AACJ;MAEa,kBAAkB,GAAG,CAAC,MAAe,MAA+B;IAC/E,MAAM,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAyB,uBAAA,CAAA,GAAG,SAAS;IAC/D,gBAAgB,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAA4B,0BAAA,CAAA,GAAG,SAAS;IAC5E,OAAO,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAkB,gBAAA,CAAA,GAAG,SAAS;AAC1D,CAAA;;;;;"}
@@ -0,0 +1,22 @@
1
+ const getValuesFromKeys = (items, hasSection, keys) => {
2
+ if (!keys)
3
+ return [];
4
+ if (!hasSection) {
5
+ return items.filter((item) => keys.includes(item.id));
6
+ }
7
+ return items.flatMap((section) => {
8
+ var _a;
9
+ return [
10
+ ...(keys.includes(section.id) ? [section] : []),
11
+ ...(((_a = section.items) === null || _a === undefined ? undefined : _a.filter((item) => keys.includes(item.id))) || []),
12
+ ];
13
+ });
14
+ };
15
+ const generateClassNames = (prefix) => ({
16
+ button: prefix ? `${prefix}-select-dropdown-button` : undefined,
17
+ optionsContainer: prefix ? `${prefix}-select-dropdown-container` : undefined,
18
+ popover: prefix ? `${prefix}-select-dropdown` : undefined,
19
+ });
20
+
21
+ export { generateClassNames, getValuesFromKeys };
22
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../../src/components/SelectDropdown/utils.ts"],"sourcesContent":["import { Key } from 'react-aria-components';\nimport { ClassNamesReturnPayload, SelectDropdownItem } from './types';\nimport { ListItemSectionProps } from './ListItemSection/ListItemSection';\nimport { ListItemProps } from './ListItem/types';\n\nexport const getValuesFromKeys = (\n items: SelectDropdownItem[],\n hasSection: boolean,\n keys?: Key[],\n): SelectDropdownItem[] => {\n if (!keys) return [];\n if (!hasSection) {\n return items.filter((item) => keys.includes(item.id as Key));\n }\n\n return (items as ListItemSectionProps[]).flatMap((section) => [\n ...(keys.includes(section.id as Key) ? [section] : []),\n ...(section.items?.filter((item: ListItemProps) => keys.includes(item.id as Key)) || []),\n ]);\n};\n\nexport const generateClassNames = (prefix?: string): ClassNamesReturnPayload => ({\n button: prefix ? `${prefix}-select-dropdown-button` : undefined,\n optionsContainer: prefix ? `${prefix}-select-dropdown-container` : undefined,\n popover: prefix ? `${prefix}-select-dropdown` : undefined,\n});\n"],"names":[],"mappings":"AAKa,MAAA,iBAAiB,GAAG,CAC/B,KAA2B,EAC3B,UAAmB,EACnB,IAAY,KACY;AACxB,IAAA,IAAI,CAAC,IAAI;AAAE,QAAA,OAAO,EAAE;IACpB,IAAI,CAAC,UAAU,EAAE;AACf,QAAA,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAS,CAAC,CAAC;AAC7D;AAED,IAAA,OAAQ,KAAgC,CAAC,OAAO,CAAC,CAAC,OAAO,KAAI;;QAAC,OAAA;AAC5D,YAAA,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAS,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;YACtD,IAAI,CAAA,CAAA,EAAA,GAAA,OAAO,CAAC,KAAK,MAAE,IAAA,IAAA,EAAA,KAAA,SAAA,GAAA,SAAA,GAAA,EAAA,CAAA,MAAM,CAAC,CAAC,IAAmB,KAAK,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAS,CAAC,CAAC,KAAI,EAAE,CAAC;SACzF;AAAA,KAAA,CAAC;AACJ;MAEa,kBAAkB,GAAG,CAAC,MAAe,MAA+B;IAC/E,MAAM,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAyB,uBAAA,CAAA,GAAG,SAAS;IAC/D,gBAAgB,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAA4B,0BAAA,CAAA,GAAG,SAAS;IAC5E,OAAO,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAkB,gBAAA,CAAA,GAAG,SAAS;AAC1D,CAAA;;;;"}
@@ -3,6 +3,7 @@
3
3
  var styled = require('styled-components');
4
4
  var Alignments = require('./Alignments.cjs');
5
5
  var index = require('../../theme/index.cjs');
6
+ var Text = require('../Text/Text.cjs');
6
7
 
7
8
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
9
 
@@ -46,7 +47,9 @@ const Stack = styled__default.default.div.withConfig({ displayName: "vui--Stack"
46
47
  flex: ${itemFlex};
47
48
  }
48
49
 
49
- & > * + * {
50
+ & > * + *,
51
+ // Increase specificity to overwrite Text's Margin: 0
52
+ && > * + ${Text.Text} {
50
53
  margin-top: ${marginTop};
51
54
  margin-left: ${marginLeft};
52
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Stack.cjs","sources":["../../../src/components/Stack/Stack.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { StackProps } from './types';\nimport { Alignments } from './Alignments';\n\nimport { theme } from '../../theme';\n\n/**\n * Layout component.\n */\nexport const Stack = styled.div<StackProps>`\n display: flex;\n\n ${(props) => {\n const { direction = 'vertical', alignX = 'start', alignY = 'start', spacing = 'base' } = props;\n\n let alignItems;\n let justifyContent;\n let flexDirection;\n let itemFlex;\n let marginTop = '';\n let marginLeft = '';\n\n if (direction === 'vertical') {\n alignItems = alignX && Alignments[alignX];\n justifyContent = alignY && Alignments[alignY];\n marginTop = theme.sizes[spacing];\n flexDirection = 'column';\n } else {\n alignItems = alignY && Alignments[alignY];\n justifyContent = alignX && Alignments[alignX];\n marginLeft = theme.sizes[spacing];\n flexDirection = 'row';\n }\n\n // These options result in 'justify-content: stretch' which doesn't exist,\n // so instead we set the flex of child elements\n if (\n (direction === 'vertical' && alignY === 'stretch') ||\n (direction === 'horizontal' && alignX === 'stretch')\n ) {\n itemFlex = 1;\n }\n\n return `\n align-items: ${alignItems};\n justify-content: ${justifyContent};\n flex-direction: ${flexDirection};\n\n & > * {\n flex: ${itemFlex};\n }\n\n & > * + * {\n margin-top: ${marginTop};\n margin-left: ${marginLeft};\n }\n `;\n }}\n`;\n\nStack.displayName = 'Stack';\n"],"names":["styled","Alignments","theme"],"mappings":";;;;;;;;;;AAOA;;AAEG;AACU,MAAA,KAAK,GAAGA,uBAAM,CAAC,GAAG,CAG3B,UAAA,CAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cA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cesContent":["import styled from 'styled-components';\n\nimport { StackProps } from './types';\nimport { Alignments } from './Alignments';\n\nimport { theme } from '../../theme';\nimport { Text } from '../Text';\n\n/**\n * Layout component.\n */\nexport const Stack = styled.div<StackProps>`\n display: flex;\n\n ${(props) => {\n const { direction = 'vertical', alignX = 'start', alignY = 'start', spacing = 'base' } = props;\n\n let alignItems;\n let justifyContent;\n let flexDirection;\n let itemFlex;\n let marginTop = '';\n let marginLeft = '';\n\n if (direction === 'vertical') {\n alignItems = alignX && Alignments[alignX];\n justifyContent = alignY && Alignments[alignY];\n marginTop = theme.sizes[spacing];\n flexDirection = 'column';\n } else {\n alignItems = alignY && Alignments[alignY];\n justifyContent = alignX && Alignments[alignX];\n marginLeft = theme.sizes[spacing];\n flexDirection = 'row';\n }\n\n // These options result in 'justify-content: stretch' which doesn't exist,\n // so instead we set the flex of child elements\n if (\n (direction === 'vertical' && alignY === 'stretch') ||\n (direction === 'horizontal' && alignX === 'stretch')\n ) {\n itemFlex = 1;\n }\n\n return `\n align-items: ${alignItems};\n justify-content: ${justifyContent};\n flex-direction: ${flexDirection};\n\n & > * {\n flex: ${itemFlex};\n }\n\n & > * + *,\n // Increase specificity to overwrite Text's Margin: 0\n && > * + ${Text} {\n margin-top: ${marginTop};\n margin-left: ${marginLeft};\n }\n `;\n }}\n`;\n\nStack.displayName = 'Stack';\n"],"names":["styled","Alignments","theme","Text"],"mappings":";;;;;;;;;;;AAQA;;AAEG;AACU,MAAA,KAAK,GAAGA,uBAAM,CAAC,GAAG,CAG3B,UAAA,CAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,aAAA,EAAA,CAAC,KAAK,KAAI;AACV,IAAA,MAAM,EAAE,SAAS,GAAG,UAAU,EAAE,MAAM,GAAG,OAAO,EAAE,MAAM,GAAG,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,GAAG,KAAK;AAE9F,IAAA,IAAI,UAAU;AACd,IAAA,IAAI,cAAc;AAClB,IAAA,IAAI,aAAa;AACjB,IAAA,IAAI,QAAQ;IACZ,IAAI,SAAS,GAAG,EAAE;IAClB,IAAI,UAAU,GAAG,EAAE;IAEnB,IAAI,SAAS,KAAK,UAAU,EAAE;AAC5B,QAAA,UAAU,GAAG,MAAM,IAAIC,qBAAU,CAAC,MAAM,CAAC;AACzC,QAAA,cAAc,GAAG,MAAM,IAAIA,qBAAU,CAAC,MAAM,CAAC;AAC7C,QAAA,SAAS,GAAGC,WAAK,CAAC,KAAK,CAAC,OAAO,CAAC;QAChC,aAAa,GAAG,QAAQ;AACzB;AAAM,SAAA;AACL,QAAA,UAAU,GAAG,MAAM,IAAID,qBAAU,CAAC,MAAM,CAAC;AACzC,QAAA,cAAc,GAAG,MAAM,IAAIA,qBAAU,CAAC,MAAM,CAAC;AAC7C,QAAA,UAAU,GAAGC,WAAK,CAAC,KAAK,CAAC,OAAO,CAAC;QACjC,aAAa,GAAG,KAAK;AACtB;;;IAID,IACE,CAAC,SAAS,KAAK,UAAU,IAAI,MAAM,KAAK,SAAS;SAChD,SAAS,KAAK,YAAY,IAAI,MAAM,KAAK,SAAS,CAAC,EACpD;QACA,QAAQ,GAAG,CAAC;AACb;IAED,OAAO;qBACU,UAAU,CAAA;yBACN,cAAc,CAAA;wBACf,aAAa,CAAA;;;gBAGrB,QAAQ,CAAA;;;;;iBAKPC,SAAI,CAAA;sBACC,SAAS,CAAA;uBACR,UAAU,CAAA;;KAE5B;AACH,CAAC;AAGH,KAAK,CAAC,WAAW,GAAG,OAAO;;;;"}
@@ -1,6 +1,7 @@
1
1
  import styled from 'styled-components';
2
2
  import { Alignments } from './Alignments.js';
3
3
  import { theme } from '../../theme/index.js';
4
+ import { Text } from '../Text/Text.js';
4
5
 
5
6
  /**
6
7
  * Layout component.
@@ -40,7 +41,9 @@ const Stack = styled.div.withConfig({ displayName: "vui--Stack", componentId: "v
40
41
  flex: ${itemFlex};
41
42
  }
42
43
 
43
- & > * + * {
44
+ & > * + *,
45
+ // Increase specificity to overwrite Text's Margin: 0
46
+ && > * + ${Text} {
44
47
  margin-top: ${marginTop};
45
48
  margin-left: ${marginLeft};
46
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Stack.js","sources":["../../../src/components/Stack/Stack.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { StackProps } from './types';\nimport { Alignments } from './Alignments';\n\nimport { theme } from '../../theme';\n\n/**\n * Layout component.\n */\nexport const Stack = styled.div<StackProps>`\n display: flex;\n\n ${(props) => {\n const { direction = 'vertical', alignX = 'start', alignY = 'start', spacing = 'base' } = props;\n\n let alignItems;\n let justifyContent;\n let flexDirection;\n let itemFlex;\n let marginTop = '';\n let marginLeft = '';\n\n if (direction === 'vertical') {\n alignItems = alignX && Alignments[alignX];\n justifyContent = alignY && Alignments[alignY];\n marginTop = theme.sizes[spacing];\n flexDirection = 'column';\n } else {\n alignItems = alignY && Alignments[alignY];\n justifyContent = alignX && Alignments[alignX];\n marginLeft = theme.sizes[spacing];\n flexDirection = 'row';\n }\n\n // These options result in 'justify-content: stretch' which doesn't exist,\n // so instead we set the flex of child elements\n if (\n (direction === 'vertical' && alignY === 'stretch') ||\n (direction === 'horizontal' && alignX === 'stretch')\n ) {\n itemFlex = 1;\n }\n\n return `\n align-items: ${alignItems};\n justify-content: ${justifyContent};\n flex-direction: ${flexDirection};\n\n & > * {\n flex: ${itemFlex};\n }\n\n & > * + * {\n margin-top: ${marginTop};\n margin-left: ${marginLeft};\n }\n `;\n }}\n`;\n\nStack.displayName = 'Stack';\n"],"names":[],"mappings":";;;;AAOA;;AAEG;AACU,MAAA,KAAK,GAAG,MAAM,CAAC,GAAG,CAG3B,UAAA,CAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,aAAA,EAAA,CAAC,KAAK,KAAI;AACV,IAAA,MAAM,EAAE,SAAS,GAAG,UAAU,EAAE,MAAM,GAAG,OAAO,EAAE,MAAM,GAAG,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,GAAG,KAAK;AAE9F,IAAA,IAAI,UAAU;AACd,IAAA,IAAI,cAAc;AAClB,IAAA,IAAI,aAAa;AACjB,IAAA,IAAI,QAAQ;IACZ,IAAI,SAAS,GAAG,EAAE;IAClB,IAAI,UAAU,GAAG,EAAE;IAEnB,IAAI,SAAS,KAAK,UAAU,EAAE;AAC5B,QAAA,UAAU,GAAG,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC;AACzC,QAAA,cAAc,GAAG,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC;AAC7C,QAAA,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;QAChC,aAAa,GAAG,QAAQ;AACzB;AAAM,SAAA;AACL,QAAA,UAAU,GAAG,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC;AACzC,QAAA,cAAc,GAAG,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC;AAC7C,QAAA,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;QACjC,aAAa,GAAG,KAAK;AACtB;;;IAID,IACE,CAAC,SAAS,KAAK,UAAU,IAAI,MAAM,KAAK,SAAS;SAChD,SAAS,KAAK,YAAY,IAAI,MAAM,KAAK,SAAS,CAAC,EACpD;QACA,QAAQ,GAAG,CAAC;AACb;IAED,OAAO;qBACU,UAAU,CAAA;yBACN,cAAc,CAAA;wBACf,aAAa,CAAA;;;gBAGrB,QAAQ,CAAA;;;;sBAIF,SAAS,CAAA;uBACR,UAAU,CAAA;;KAE5B;AACH,CAAC;AAGH,KAAK,CAAC,WAAW,GAAG,OAAO;;;;"}
1
+ {"version":3,"file":"Stack.js","sources":["../../../src/components/Stack/Stack.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { StackProps } from './types';\nimport { Alignments } from './Alignments';\n\nimport { theme } from '../../theme';\nimport { Text } from '../Text';\n\n/**\n * Layout component.\n */\nexport const Stack = styled.div<StackProps>`\n display: flex;\n\n ${(props) => {\n const { direction = 'vertical', alignX = 'start', alignY = 'start', spacing = 'base' } = props;\n\n let alignItems;\n let justifyContent;\n let flexDirection;\n let itemFlex;\n let marginTop = '';\n let marginLeft = '';\n\n if (direction === 'vertical') {\n alignItems = alignX && Alignments[alignX];\n justifyContent = alignY && Alignments[alignY];\n marginTop = theme.sizes[spacing];\n flexDirection = 'column';\n } else {\n alignItems = alignY && Alignments[alignY];\n justifyContent = alignX && Alignments[alignX];\n marginLeft = theme.sizes[spacing];\n flexDirection = 'row';\n }\n\n // These options result in 'justify-content: stretch' which doesn't exist,\n // so instead we set the flex of child elements\n if (\n (direction === 'vertical' && alignY === 'stretch') ||\n (direction === 'horizontal' && alignX === 'stretch')\n ) {\n itemFlex = 1;\n }\n\n return `\n align-items: ${alignItems};\n justify-content: ${justifyContent};\n flex-direction: ${flexDirection};\n\n & > * {\n flex: ${itemFlex};\n }\n\n & > * + *,\n // Increase specificity to overwrite Text's Margin: 0\n && > * + ${Text} {\n margin-top: ${marginTop};\n margin-left: ${marginLeft};\n }\n `;\n }}\n`;\n\nStack.displayName = 'Stack';\n"],"names":[],"mappings":";;;;;AAQA;;AAEG;AACU,MAAA,KAAK,GAAG,MAAM,CAAC,GAAG,CAG3B,UAAA,CAAA,EAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,aAAA,EAAA,CAAC,KAAK,KAAI;AACV,IAAA,MAAM,EAAE,SAAS,GAAG,UAAU,EAAE,MAAM,GAAG,OAAO,EAAE,MAAM,GAAG,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,GAAG,KAAK;AAE9F,IAAA,IAAI,UAAU;AACd,IAAA,IAAI,cAAc;AAClB,IAAA,IAAI,aAAa;AACjB,IAAA,IAAI,QAAQ;IACZ,IAAI,SAAS,GAAG,EAAE;IAClB,IAAI,UAAU,GAAG,EAAE;IAEnB,IAAI,SAAS,KAAK,UAAU,EAAE;AAC5B,QAAA,UAAU,GAAG,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC;AACzC,QAAA,cAAc,GAAG,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC;AAC7C,QAAA,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;QAChC,aAAa,GAAG,QAAQ;AACzB;AAAM,SAAA;AACL,QAAA,UAAU,GAAG,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC;AACzC,QAAA,cAAc,GAAG,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC;AAC7C,QAAA,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;QACjC,aAAa,GAAG,KAAK;AACtB;;;IAID,IACE,CAAC,SAAS,KAAK,UAAU,IAAI,MAAM,KAAK,SAAS;SAChD,SAAS,KAAK,YAAY,IAAI,MAAM,KAAK,SAAS,CAAC,EACpD;QACA,QAAQ,GAAG,CAAC;AACb;IAED,OAAO;qBACU,UAAU,CAAA;yBACN,cAAc,CAAA;wBACf,aAAa,CAAA;;;gBAGrB,QAAQ,CAAA;;;;;iBAKP,IAAI,CAAA;sBACC,SAAS,CAAA;uBACR,UAAU,CAAA;;KAE5B;AACH,CAAC;AAGH,KAAK,CAAC,WAAW,GAAG,OAAO;;;;"}
@@ -62,3 +62,4 @@ export { ViewTab } from './ViewTab';
62
62
  export { ViewsContainer } from './ViewsContainer';
63
63
  export { WeightInput } from './WeightInput';
64
64
  export { Indicator } from './Indicator';
65
+ export { SelectDropdown } from './SelectDropdown';
package/dist/index.cjs CHANGED
@@ -75,6 +75,7 @@ var ViewTab = require('./components/ViewTab/ViewTab.cjs');
75
75
  var ViewsContainer = require('./components/ViewsContainer/ViewsContainer.cjs');
76
76
  var index$5 = require('./components/WeightInput/index.cjs');
77
77
  var Indicator = require('./components/Indicator/Indicator.cjs');
78
+ var index$6 = require('./components/SelectDropdown/index.cjs');
78
79
  var useClickOutside = require('./hooks/useClickOutside.cjs');
79
80
  var useDebounce = require('./hooks/useDebounce.cjs');
80
81
  var useDropdown = require('./hooks/useDropdown.cjs');
@@ -89,7 +90,7 @@ var buildClassnames = require('./utils/buildClassnames.cjs');
89
90
  var color = require('./utils/color.cjs');
90
91
  var generateId = require('./utils/generateId.cjs');
91
92
  var isExternalLink = require('./utils/isExternalLink.cjs');
92
- var index$6 = require('./theme/index.cjs');
93
+ var index$7 = require('./theme/index.cjs');
93
94
  var ActiveCheckboxIcon = require('./tempIcons/ActiveCheckboxIcon.cjs');
94
95
  var ActiveRadioIcon = require('./tempIcons/ActiveRadioIcon.cjs');
95
96
  var ArrowDownIcon = require('./tempIcons/ArrowDownIcon.cjs');
@@ -220,6 +221,7 @@ exports.ViewTab = ViewTab.ViewTab;
220
221
  exports.ViewsContainer = ViewsContainer.ViewsContainer;
221
222
  exports.WeightInput = index$5.WeightInput;
222
223
  exports.Indicator = Indicator.Indicator;
224
+ exports.SelectDropdown = index$6.SelectDropdown;
223
225
  exports.useClickOutside = useClickOutside.useClickOutside;
224
226
  exports.useDebounce = useDebounce.useDebounce;
225
227
  exports.useDropdown = useDropdown.useDropdown;
@@ -236,7 +238,7 @@ exports.getOpaqueHexColor = color.getOpaqueHexColor;
236
238
  exports.hexToRgb = color.hexToRgb;
237
239
  exports.generateId = generateId.generateId;
238
240
  exports.isExternalLink = isExternalLink.isExternalLink;
239
- exports.theme = index$6.theme;
241
+ exports.theme = index$7.theme;
240
242
  exports.ActiveCheckboxIcon = ActiveCheckboxIcon.ActiveCheckboxIcon;
241
243
  exports.ActiveRadioIcon = ActiveRadioIcon.ActiveRadioIcon;
242
244
  exports.ArrowDownIcon = ArrowDownIcon.ArrowDownIcon;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.js CHANGED
@@ -73,6 +73,7 @@ export { ViewTab } from './components/ViewTab/ViewTab.js';
73
73
  export { ViewsContainer } from './components/ViewsContainer/ViewsContainer.js';
74
74
  export { WeightInput } from './components/WeightInput/index.js';
75
75
  export { Indicator } from './components/Indicator/Indicator.js';
76
+ export { SelectDropdown } from './components/SelectDropdown/index.js';
76
77
  export { useClickOutside } from './hooks/useClickOutside.js';
77
78
  export { useDebounce } from './hooks/useDebounce.js';
78
79
  export { useDropdown } from './hooks/useDropdown.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veeqo/ui",
3
- "version": "9.6.1",
3
+ "version": "9.6.3",
4
4
  "description": "New optimised component library for Veeqo.",
5
5
  "author": "Robert Wealthall",
6
6
  "license": "ISC",
@@ -37,7 +37,7 @@
37
37
  "patch": "npm version patch && npm run changelog:update",
38
38
  "minor": "npm version minor && npm run changelog:update",
39
39
  "major": "npm version major && npm run changelog:update",
40
- "tags:remove": "node scripts/remove-tag.js",
40
+ "tags:remove": "node scripts/remove-tag.cjs",
41
41
  "tags:update": "git fetch --tags && git push --follow-tags",
42
42
  "changelog:update": "npm run tags:update && auto-changelog -p && git add CHANGELOG.md && git commit -m \"Update CHANGELOG\" && git push"
43
43
  },