@veeqo/ui 11.3.1 → 11.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DataGrid/DataGrid.cjs +9 -3
- package/dist/components/DataGrid/DataGrid.cjs.map +1 -1
- package/dist/components/DataGrid/DataGrid.d.ts +1 -1
- package/dist/components/DataGrid/DataGrid.js +9 -3
- package/dist/components/DataGrid/DataGrid.js.map +1 -1
- package/dist/components/DataGrid/components/Body/Body.cjs +6 -2
- package/dist/components/DataGrid/components/Body/Body.cjs.map +1 -1
- package/dist/components/DataGrid/components/Body/Body.d.ts +7 -3
- package/dist/components/DataGrid/components/Body/Body.js +6 -2
- package/dist/components/DataGrid/components/Body/Body.js.map +1 -1
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.cjs +5 -3
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.cjs.map +1 -1
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.js +6 -4
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.js.map +1 -1
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.module.scss.cjs +2 -2
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.module.scss.cjs.map +1 -1
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.module.scss.js +2 -2
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.module.scss.js.map +1 -1
- package/dist/components/DataGrid/components/Body/Row/Row.cjs +12 -1
- package/dist/components/DataGrid/components/Body/Row/Row.cjs.map +1 -1
- package/dist/components/DataGrid/components/Body/Row/Row.d.ts +11 -3
- package/dist/components/DataGrid/components/Body/Row/Row.js +12 -1
- package/dist/components/DataGrid/components/Body/Row/Row.js.map +1 -1
- package/dist/components/DataGrid/components/Body/Row/Row.module.scss.cjs +9 -0
- package/dist/components/DataGrid/components/Body/Row/Row.module.scss.cjs.map +1 -0
- package/dist/components/DataGrid/components/Body/Row/Row.module.scss.js +7 -0
- package/dist/components/DataGrid/components/Body/Row/Row.module.scss.js.map +1 -0
- package/dist/components/DataGrid/components/Body/Row/hooks/index.d.ts +1 -0
- package/dist/components/DataGrid/components/Body/Row/hooks/useRowTheme.cjs +26 -0
- package/dist/components/DataGrid/components/Body/Row/hooks/useRowTheme.cjs.map +1 -0
- package/dist/components/DataGrid/components/Body/Row/hooks/useRowTheme.d.ts +16 -0
- package/dist/components/DataGrid/components/Body/Row/hooks/useRowTheme.js +24 -0
- package/dist/components/DataGrid/components/Body/Row/hooks/useRowTheme.js.map +1 -0
- package/dist/components/DataGrid/types/ColumnDefinition.d.ts +9 -3
- package/dist/components/DataGrid/types/DataGridProps.d.ts +6 -6
- package/dist/components/DataGrid/types/RowTheme.d.ts +13 -0
- package/dist/components/DataGrid/types/declarations.d.ts +1 -0
- package/dist/components/DataGrid/types/index.d.ts +1 -0
- package/dist/components/DataGrid/utils/ColumnMapper.cjs +1 -0
- package/dist/components/DataGrid/utils/ColumnMapper.cjs.map +1 -1
- package/dist/components/DataGrid/utils/ColumnMapper.js +1 -0
- package/dist/components/DataGrid/utils/ColumnMapper.js.map +1 -1
- package/dist/components/SelectDropdown/ListItem/ListItem.cjs +6 -3
- package/dist/components/SelectDropdown/ListItem/ListItem.cjs.map +1 -1
- package/dist/components/SelectDropdown/ListItem/ListItem.d.ts +1 -1
- package/dist/components/SelectDropdown/ListItem/ListItem.js +6 -3
- package/dist/components/SelectDropdown/ListItem/ListItem.js.map +1 -1
- package/dist/components/SelectDropdown/ListItem/ListItem.module.scss.cjs +9 -0
- package/dist/components/SelectDropdown/ListItem/ListItem.module.scss.cjs.map +1 -0
- package/dist/components/SelectDropdown/ListItem/ListItem.module.scss.js +7 -0
- package/dist/components/SelectDropdown/ListItem/ListItem.module.scss.js.map +1 -0
- package/dist/components/SelectDropdown/ListItem/components/ListItemContent.cjs +36 -18
- package/dist/components/SelectDropdown/ListItem/components/ListItemContent.cjs.map +1 -1
- package/dist/components/SelectDropdown/ListItem/components/ListItemContent.js +37 -19
- package/dist/components/SelectDropdown/ListItem/components/ListItemContent.js.map +1 -1
- package/dist/components/SelectDropdown/ListItem/components/SelectionType.cjs +4 -4
- package/dist/components/SelectDropdown/ListItem/components/SelectionType.cjs.map +1 -1
- package/dist/components/SelectDropdown/ListItem/components/SelectionType.js +4 -4
- package/dist/components/SelectDropdown/ListItem/components/SelectionType.js.map +1 -1
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.cjs +6 -6
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.cjs.map +1 -1
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.js +7 -7
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.js.map +1 -1
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.module.scss.cjs +9 -0
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.module.scss.cjs.map +1 -0
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.module.scss.js +7 -0
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.module.scss.js.map +1 -0
- package/dist/components/SelectDropdown/SelectDropdown.cjs +20 -8
- package/dist/components/SelectDropdown/SelectDropdown.cjs.map +1 -1
- package/dist/components/SelectDropdown/SelectDropdown.js +21 -9
- package/dist/components/SelectDropdown/SelectDropdown.js.map +1 -1
- package/dist/components/SelectDropdown/SelectDropdown.module.scss.cjs +9 -0
- package/dist/components/SelectDropdown/SelectDropdown.module.scss.cjs.map +1 -0
- package/dist/components/SelectDropdown/SelectDropdown.module.scss.js +7 -0
- package/dist/components/SelectDropdown/SelectDropdown.module.scss.js.map +1 -0
- package/dist/components/SelectDropdown/components/SelectedOption.cjs +4 -6
- package/dist/components/SelectDropdown/components/SelectedOption.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/SelectedOption.js +4 -6
- package/dist/components/SelectDropdown/components/SelectedOption.js.map +1 -1
- package/dist/utils/forms/form.module.scss.cjs +9 -0
- package/dist/utils/forms/form.module.scss.cjs.map +1 -0
- package/dist/utils/forms/form.module.scss.js +7 -0
- package/dist/utils/forms/form.module.scss.js.map +1 -0
- package/dist/utils/forms/inputStyles.cjs +17 -0
- package/dist/utils/forms/inputStyles.cjs.map +1 -1
- package/dist/utils/forms/inputStyles.d.ts +17 -0
- package/dist/utils/forms/inputStyles.js +17 -0
- package/dist/utils/forms/inputStyles.js.map +1 -1
- package/dist/utils/forms/variables.cjs +6 -0
- package/dist/utils/forms/variables.cjs.map +1 -1
- package/dist/utils/forms/variables.d.ts +6 -0
- package/dist/utils/forms/variables.js +6 -0
- package/dist/utils/forms/variables.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/SelectDropdown/ListItem/components/CheckboxIndicator.cjs +0 -18
- package/dist/components/SelectDropdown/ListItem/components/CheckboxIndicator.cjs.map +0 -1
- package/dist/components/SelectDropdown/ListItem/components/CheckboxIndicator.d.ts +0 -2
- package/dist/components/SelectDropdown/ListItem/components/CheckboxIndicator.js +0 -12
- package/dist/components/SelectDropdown/ListItem/components/CheckboxIndicator.js.map +0 -1
- package/dist/components/SelectDropdown/ListItem/components/RadioIndicator.cjs +0 -18
- package/dist/components/SelectDropdown/ListItem/components/RadioIndicator.cjs.map +0 -1
- package/dist/components/SelectDropdown/ListItem/components/RadioIndicator.d.ts +0 -2
- package/dist/components/SelectDropdown/ListItem/components/RadioIndicator.js +0 -12
- package/dist/components/SelectDropdown/ListItem/components/RadioIndicator.js.map +0 -1
- package/dist/components/SelectDropdown/ListItem/styled.cjs +0 -42
- package/dist/components/SelectDropdown/ListItem/styled.cjs.map +0 -1
- package/dist/components/SelectDropdown/ListItem/styled.d.ts +0 -21
- package/dist/components/SelectDropdown/ListItem/styled.js +0 -31
- package/dist/components/SelectDropdown/ListItem/styled.js.map +0 -1
- package/dist/components/SelectDropdown/ListItemSection/styled.cjs +0 -16
- package/dist/components/SelectDropdown/ListItemSection/styled.cjs.map +0 -1
- package/dist/components/SelectDropdown/ListItemSection/styled.d.ts +0 -3
- package/dist/components/SelectDropdown/ListItemSection/styled.js +0 -9
- package/dist/components/SelectDropdown/ListItemSection/styled.js.map +0 -1
- package/dist/components/SelectDropdown/styled.cjs +0 -33
- package/dist/components/SelectDropdown/styled.cjs.map +0 -1
- package/dist/components/SelectDropdown/styled.d.ts +0 -321
- package/dist/components/SelectDropdown/styled.js +0 -22
- package/dist/components/SelectDropdown/styled.js.map +0 -1
|
@@ -1 +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 {
|
|
1
|
+
{"version":3,"file":"ListItemContent.js","sources":["../../../../../src/components/SelectDropdown/ListItem/components/ListItemContent.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { Text } from 'react-aria-components';\nimport { buildClassnames } from '../../../../utils';\nimport { FlexCol } from '../../../Flex/FlexCol';\nimport { ArrowRightIcon, DragIndicatorIcon } from '../../../../icons';\nimport { ListItemContentProps } from './types';\nimport { Text as VeeqoText } from '../../../Text';\nimport { MiniAlert } from '../../../Alerts/MiniAlert';\nimport { SelectionType } from './SelectionType';\nimport styles from '../ListItem.module.scss';\nimport { FlexRow } from '../../../Flex/FlexRow';\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 const getInfoContainerClassNames = useMemo(() => {\n const base = styles.infoContainer;\n\n if (itemInfoSlot && endInfoSlot) {\n return buildClassnames([base, styles.hasItemInfoAndEndInfo]);\n }\n\n if (itemInfoSlot) {\n return buildClassnames([base, styles.hasItemInfoOnly]);\n }\n\n if (endInfoSlot) {\n return buildClassnames([base, styles.hasEndInfoOnly]);\n }\n\n return buildClassnames([base]);\n }, [endInfoSlot, itemInfoSlot]);\n\n return (\n <FlexRow flexWrap=\"nowrap\" justifyContent=\"space-between\" alignItems=\"center\" gap=\"base\">\n <FlexRow flexWrap=\"nowrap\" gap=\"base\" style={{ flexGrow: 1 }}>\n {allowsDragging && <DragIndicatorIcon data-testid=\"drag-icon\" />}\n <SelectionType selectionMode={selectionMode} isSelected={isSelected} isLink={isLink} />\n {mediaSlot}\n <FlexCol gap=\"xs\" style={{ flexGrow: 1 }}>\n <div className={getInfoContainerClassNames} data-testid=\"info-container\">\n <Text slot=\"label\">\n <VeeqoText variant=\"body\">{label}</VeeqoText>\n </Text>\n {itemInfoSlot}\n {endInfoSlot && (\n <div className={endInfoSlot ? styles.justifyEnd : styles.justifyStart}>\n {endInfoSlot}\n </div>\n )}\n </div>\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 </FlexCol>\n </FlexRow>\n {isLink && <ArrowRightIcon className={styles.linkIcon} data-testid=\"link-icon\" />}\n </FlexRow>\n );\n};\n"],"names":["React","VeeqoText"],"mappings":";;;;;;;;;;;;;AAYO,MAAM,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,KAAI;AACzB,IAAA,MAAM,0BAA0B,GAAG,OAAO,CAAC,MAAK;AAC9C,QAAA,MAAM,IAAI,GAAG,MAAM,CAAC,aAAa;QAEjC,IAAI,YAAY,IAAI,WAAW,EAAE;YAC/B,OAAO,eAAe,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAC7D;AAED,QAAA,IAAI,YAAY,EAAE;YAChB,OAAO,eAAe,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC;AACvD;AAED,QAAA,IAAI,WAAW,EAAE;YACf,OAAO,eAAe,CAAC,CAAC,IAAI,EAA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G,MAAM,CAAC,YAAY,EAClE,EAAA,WAAW,CACR,CACP,CACG;AAEL,gBAAA,IAAI,KACHA,cAAA,CAAA,aAAA,CAAC,IAAI,EAAC,EAAA,IAAI,EAAC,aAAa,EAAA;oBACtBA,cAAC,CAAA,aAAA,CAAAC,MAAS,IAAC,OAAO,EAAC,UAAU,EAAE,EAAA,IAAI,CAAa,CAC3C,CACR;AACA,gBAAA,KAAK,IAAID,cAAC,CAAA,aAAA,CAAA,SAAS,EAAC,EAAA,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAA,CAAI,CAC3D,CACF;AACT,QAAA,MAAM,IAAIA,cAAA,CAAA,aAAA,CAAC,cAAc,EAAA,EAAC,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAc,aAAA,EAAA,WAAW,EAAG,CAAA,CACzE;AAEd;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var Radio = require('../../../Radio/Radio.cjs');
|
|
5
|
+
var Checkbox = require('../../../Checkbox/Checkbox.cjs');
|
|
6
6
|
|
|
7
7
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
8
|
|
|
@@ -12,8 +12,8 @@ const SelectionType = ({ selectionMode, isSelected, isLink }) => {
|
|
|
12
12
|
if (isLink || selectionMode === 'none')
|
|
13
13
|
return null;
|
|
14
14
|
if (selectionMode === 'single')
|
|
15
|
-
return React__default.default.createElement(
|
|
16
|
-
return React__default.default.createElement(
|
|
15
|
+
return React__default.default.createElement(Radio.Radio, { checked: isSelected, onChange: () => { } });
|
|
16
|
+
return React__default.default.createElement(Checkbox.Checkbox, { checked: isSelected, onChange: () => { } });
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
exports.SelectionType = SelectionType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionType.cjs","sources":["../../../../../src/components/SelectDropdown/ListItem/components/SelectionType.tsx"],"sourcesContent":["import React from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"SelectionType.cjs","sources":["../../../../../src/components/SelectDropdown/ListItem/components/SelectionType.tsx"],"sourcesContent":["import React from 'react';\nimport { Radio } from '../../../Radio';\nimport { Checkbox } from '../../../Checkbox';\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 <Radio checked={isSelected} onChange={() => {}} />;\n\n return <Checkbox checked={isSelected} onChange={() => {}} />;\n};\n"],"names":["React","Radio","Checkbox"],"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,sBAAC,CAAA,aAAA,CAAAC,WAAK,EAAC,EAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAO,GAAC,GAAI;AAEzF,IAAA,OAAOD,sBAAC,CAAA,aAAA,CAAAE,iBAAQ,EAAC,EAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAO,GAAC,GAAI;AAC9D;;;;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Radio } from '../../../Radio/Radio.js';
|
|
3
|
+
import { Checkbox } from '../../../Checkbox/Checkbox.js';
|
|
4
4
|
|
|
5
5
|
const SelectionType = ({ selectionMode, isSelected, isLink }) => {
|
|
6
6
|
if (isLink || selectionMode === 'none')
|
|
7
7
|
return null;
|
|
8
8
|
if (selectionMode === 'single')
|
|
9
|
-
return React__default.createElement(
|
|
10
|
-
return React__default.createElement(
|
|
9
|
+
return React__default.createElement(Radio, { checked: isSelected, onChange: () => { } });
|
|
10
|
+
return React__default.createElement(Checkbox, { checked: isSelected, onChange: () => { } });
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export { SelectionType };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectionType.js","sources":["../../../../../src/components/SelectDropdown/ListItem/components/SelectionType.tsx"],"sourcesContent":["import React from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"SelectionType.js","sources":["../../../../../src/components/SelectDropdown/ListItem/components/SelectionType.tsx"],"sourcesContent":["import React from 'react';\nimport { Radio } from '../../../Radio';\nimport { Checkbox } from '../../../Checkbox';\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 <Radio checked={isSelected} onChange={() => {}} />;\n\n return <Checkbox checked={isSelected} onChange={() => {}} />;\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,cAAC,CAAA,aAAA,CAAA,KAAK,EAAC,EAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAO,GAAC,GAAI;AAEzF,IAAA,OAAOA,cAAC,CAAA,aAAA,CAAA,QAAQ,EAAC,EAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAO,GAAC,GAAI;AAC9D;;;;"}
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactAriaComponents = require('react-aria-components');
|
|
5
|
-
var
|
|
6
|
-
require('../../
|
|
5
|
+
var FlexRow = require('../../Flex/FlexRow/FlexRow.cjs');
|
|
6
|
+
var FlexCol = require('../../Flex/FlexCol/FlexCol.cjs');
|
|
7
7
|
var Text = require('../../Text/Text.cjs');
|
|
8
|
-
var styled = require('./styled.cjs');
|
|
9
8
|
var ListItem = require('../ListItem/ListItem.cjs');
|
|
9
|
+
var ListItemSection_module = require('./ListItemSection.module.scss.cjs');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
12
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
14
|
|
|
15
|
-
const ListItemSection = ({ label, hint, itemInfoSlot, items, children, ...props }) => (React__default.default.createElement(
|
|
15
|
+
const ListItemSection = ({ label, hint, itemInfoSlot, items, children, ...props }) => (React__default.default.createElement(reactAriaComponents.Section, { className: ListItemSection_module.section, ...props },
|
|
16
16
|
React__default.default.createElement(reactAriaComponents.Header, null,
|
|
17
|
-
React__default.default.createElement(
|
|
18
|
-
React__default.default.createElement(
|
|
17
|
+
React__default.default.createElement(FlexCol.FlexCol, { gap: "xs" },
|
|
18
|
+
React__default.default.createElement(FlexRow.FlexRow, null,
|
|
19
19
|
React__default.default.createElement(Text.Text, { variant: "body" }, label),
|
|
20
20
|
itemInfoSlot),
|
|
21
21
|
hint && React__default.default.createElement(Text.Text, { variant: "hintText" }, hint))),
|
|
@@ -1 +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 {
|
|
1
|
+
{"version":3,"file":"ListItemSection.cjs","sources":["../../../../src/components/SelectDropdown/ListItemSection/ListItemSection.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport { Collection, Header, Section, SectionProps } from 'react-aria-components';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { FlexCol } from '../../Flex/FlexCol';\nimport { Text as VeeqoText } from '../../Text';\nimport { ListItemProps } from '../ListItem/types';\nimport { ListItem } from '../ListItem/ListItem';\nimport styles from './ListItemSection.module.scss';\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 <Section className={styles.section} {...props}>\n <Header>\n <FlexCol gap=\"xs\">\n <FlexRow>\n <VeeqoText variant=\"body\">{label}</VeeqoText>\n {itemInfoSlot}\n </FlexRow>\n {hint && <VeeqoText variant=\"hintText\">{hint}</VeeqoText>}\n </FlexCol>\n </Header>\n {children}\n {items && (\n <Collection items={items}>{(item: ListItemProps) => <ListItem {...item} />}</Collection>\n )}\n </Section>\n);\n"],"names":["React","Section","styles","Header","FlexCol","FlexRow","VeeqoText","Collection","ListItem"],"mappings":";;;;;;;;;;;;;;AAgBO,MAAM,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACa,MACrBA,sBAAC,CAAA,aAAA,CAAAC,2BAAO,EAAC,EAAA,SAAS,EAAEC,sBAAM,CAAC,OAAO,KAAM,KAAK,EAAA;AAC3C,IAAAF,sBAAA,CAAA,aAAA,CAACG,0BAAM,EAAA,IAAA;AACL,QAAAH,sBAAA,CAAA,aAAA,CAACI,eAAO,EAAA,EAAC,GAAG,EAAC,IAAI,EAAA;AACf,YAAAJ,sBAAA,CAAA,aAAA,CAACK,eAAO,EAAA,IAAA;AACN,gBAAAL,sBAAA,CAAA,aAAA,CAACM,SAAS,EAAC,EAAA,OAAO,EAAC,MAAM,EAAA,EAAE,KAAK,CAAa;AAC5C,gBAAA,YAAY,CACL;YACT,IAAI,IAAIN,sBAAC,CAAA,aAAA,CAAAM,SAAS,EAAC,EAAA,OAAO,EAAC,UAAU,EAAE,EAAA,IAAI,CAAa,CACjD,CACH;IACR,QAAQ;IACR,KAAK,KACJN,sBAAC,CAAA,aAAA,CAAAO,8BAAU,IAAC,KAAK,EAAE,KAAK,EAAA,EAAG,CAAC,IAAmB,KAAKP,sBAAC,CAAA,aAAA,CAAAQ,iBAAQ,EAAK,EAAA,GAAA,IAAI,GAAI,CAAc,CACzF,CACO;;;;"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { Header, Collection } from 'react-aria-components';
|
|
3
|
-
import {
|
|
4
|
-
import '../../
|
|
2
|
+
import { Section, Header, Collection } from 'react-aria-components';
|
|
3
|
+
import { FlexRow } from '../../Flex/FlexRow/FlexRow.js';
|
|
4
|
+
import { FlexCol } from '../../Flex/FlexCol/FlexCol.js';
|
|
5
5
|
import { Text } from '../../Text/Text.js';
|
|
6
|
-
import { StyledSection, InfoContainer } from './styled.js';
|
|
7
6
|
import { ListItem } from '../ListItem/ListItem.js';
|
|
7
|
+
import styles from './ListItemSection.module.scss.js';
|
|
8
8
|
|
|
9
|
-
const ListItemSection = ({ label, hint, itemInfoSlot, items, children, ...props }) => (React__default.createElement(
|
|
9
|
+
const ListItemSection = ({ label, hint, itemInfoSlot, items, children, ...props }) => (React__default.createElement(Section, { className: styles.section, ...props },
|
|
10
10
|
React__default.createElement(Header, null,
|
|
11
|
-
React__default.createElement(
|
|
12
|
-
React__default.createElement(
|
|
11
|
+
React__default.createElement(FlexCol, { gap: "xs" },
|
|
12
|
+
React__default.createElement(FlexRow, null,
|
|
13
13
|
React__default.createElement(Text, { variant: "body" }, label),
|
|
14
14
|
itemInfoSlot),
|
|
15
15
|
hint && React__default.createElement(Text, { variant: "hintText" }, hint))),
|
|
@@ -1 +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 {
|
|
1
|
+
{"version":3,"file":"ListItemSection.js","sources":["../../../../src/components/SelectDropdown/ListItemSection/ListItemSection.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport { Collection, Header, Section, SectionProps } from 'react-aria-components';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { FlexCol } from '../../Flex/FlexCol';\nimport { Text as VeeqoText } from '../../Text';\nimport { ListItemProps } from '../ListItem/types';\nimport { ListItem } from '../ListItem/ListItem';\nimport styles from './ListItemSection.module.scss';\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 <Section className={styles.section} {...props}>\n <Header>\n <FlexCol gap=\"xs\">\n <FlexRow>\n <VeeqoText variant=\"body\">{label}</VeeqoText>\n {itemInfoSlot}\n </FlexRow>\n {hint && <VeeqoText variant=\"hintText\">{hint}</VeeqoText>}\n </FlexCol>\n </Header>\n {children}\n {items && (\n <Collection items={items}>{(item: ListItemProps) => <ListItem {...item} />}</Collection>\n )}\n </Section>\n);\n"],"names":["React","VeeqoText"],"mappings":";;;;;;;;AAgBO,MAAM,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACa,MACrBA,cAAC,CAAA,aAAA,CAAA,OAAO,EAAC,EAAA,SAAS,EAAE,MAAM,CAAC,OAAO,KAAM,KAAK,EAAA;AAC3C,IAAAA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAA,IAAA;AACL,QAAAA,cAAA,CAAA,aAAA,CAAC,OAAO,EAAA,EAAC,GAAG,EAAC,IAAI,EAAA;AACf,YAAAA,cAAA,CAAA,aAAA,CAAC,OAAO,EAAA,IAAA;AACN,gBAAAA,cAAA,CAAA,aAAA,CAACC,IAAS,EAAC,EAAA,OAAO,EAAC,MAAM,EAAA,EAAE,KAAK,CAAa;AAC5C,gBAAA,YAAY,CACL;YACT,IAAI,IAAID,cAAC,CAAA,aAAA,CAAAC,IAAS,EAAC,EAAA,OAAO,EAAC,UAAU,EAAE,EAAA,IAAI,CAAa,CACjD,CACH;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,CACO;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ___$insertStyle = require('../../../_virtual/____insertStyle.cjs');
|
|
4
|
+
|
|
5
|
+
___$insertStyle("._section_wlx0b_1 {\n border-radius: var(--sizes-base);\n}");
|
|
6
|
+
var styles = {"section":"_section_wlx0b_1"};
|
|
7
|
+
|
|
8
|
+
module.exports = styles;
|
|
9
|
+
//# sourceMappingURL=ListItemSection.module.scss.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItemSection.module.scss.cjs","sources":["../../../../src/components/SelectDropdown/ListItemSection/ListItemSection.module.scss"],"sourcesContent":[".section {\n border-radius: var(--sizes-base);\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,6DAAA;;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import insertStyle from '../../../_virtual/____insertStyle.js';
|
|
2
|
+
|
|
3
|
+
insertStyle("._section_wlx0b_1 {\n border-radius: var(--sizes-base);\n}");
|
|
4
|
+
var styles = {"section":"_section_wlx0b_1"};
|
|
5
|
+
|
|
6
|
+
export { styles as default };
|
|
7
|
+
//# sourceMappingURL=ListItemSection.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItemSection.module.scss.js","sources":["../../../../src/components/SelectDropdown/ListItemSection/ListItemSection.module.scss"],"sourcesContent":[".section {\n border-radius: var(--sizes-base);\n}\n"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,6DAAA;;;;;"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
+
var reactAriaComponents = require('react-aria-components');
|
|
4
5
|
var buildClassnames = require('../../utils/buildClassnames.cjs');
|
|
5
6
|
require('uid/secure');
|
|
6
7
|
var SelectedOption = require('./components/SelectedOption.cjs');
|
|
7
8
|
var utils = require('./utils.cjs');
|
|
8
|
-
var styled = require('./styled.cjs');
|
|
9
9
|
var ListItemSection = require('./ListItemSection/ListItemSection.cjs');
|
|
10
10
|
var ListItem = require('./ListItem/ListItem.cjs');
|
|
11
11
|
var SelectDropdownState = require('./components/SelectDropdownState.cjs');
|
|
12
|
+
var Dropdown = require('../Dropdown/Dropdown.cjs');
|
|
13
|
+
var Search = require('../Search/Search.cjs');
|
|
14
|
+
var Button = require('../Button/Button.cjs');
|
|
15
|
+
var SelectDropdown_module = require('./SelectDropdown.module.scss.cjs');
|
|
16
|
+
var form_module = require('../../utils/forms/form.module.scss.cjs');
|
|
12
17
|
|
|
13
18
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
14
19
|
|
|
@@ -32,15 +37,22 @@ const SelectDropdown = ({ id, className, placeholder = 'Select item', multiple =
|
|
|
32
37
|
setIsSelectOpen(false);
|
|
33
38
|
}
|
|
34
39
|
}, [options, hasSection, multiple, onChange]);
|
|
35
|
-
return (React__default.default.createElement(
|
|
40
|
+
return (React__default.default.createElement(Dropdown.Dropdown, { id: `select-dropdown-${id}`, className: buildClassnames.buildClassnames([classNames === null || classNames === undefined ? undefined : classNames.popover, SelectDropdown_module.dropdown, className]), shouldShow: isSelectOpen, setShouldShow: setIsSelectOpen, useAnchorWidth: true, disabled: disabled, renderCta: (buttonProps, anchorRef) => (React__default.default.createElement("button", { ...buttonProps, type: "button", ref: anchorRef, className: buildClassnames.buildClassnames([
|
|
41
|
+
className,
|
|
42
|
+
SelectDropdown_module.dropdownTrigger,
|
|
43
|
+
form_module.fullStyles,
|
|
44
|
+
form_module.base,
|
|
45
|
+
hasError && form_module.error,
|
|
46
|
+
compact && form_module.compact,
|
|
47
|
+
]) },
|
|
36
48
|
React__default.default.createElement(SelectedOption.SelectedOption, { placeholder: placeholder, options: selectedValues, selectionMode: selectionMode }))) },
|
|
37
49
|
onSearchChange && (React__default.default.createElement(React__default.default.Fragment, null,
|
|
38
|
-
React__default.default.createElement(
|
|
39
|
-
React__default.default.createElement(
|
|
40
|
-
React__default.default.createElement(
|
|
41
|
-
actions.map(({ label, ...actionProps }) => (React__default.default.createElement(
|
|
42
|
-
React__default.default.createElement(
|
|
43
|
-
React__default.default.createElement(
|
|
50
|
+
React__default.default.createElement(Search.Search, { className: SelectDropdown_module.search, value: searchValue, onChange: onSearchChange }),
|
|
51
|
+
React__default.default.createElement("hr", { className: SelectDropdown_module.separator }))),
|
|
52
|
+
React__default.default.createElement(reactAriaComponents.ListBox, { className: buildClassnames.buildClassnames([classNames === null || classNames === undefined ? undefined : classNames.optionsContainer, SelectDropdown_module.listBox, 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 :
|
|
53
|
+
actions.map(({ label, ...actionProps }) => (React__default.default.createElement(React.Fragment, { key: label },
|
|
54
|
+
React__default.default.createElement("hr", { className: SelectDropdown_module.separator, key: `seperator-${label}` }),
|
|
55
|
+
React__default.default.createElement(Button.Button, { className: SelectDropdown_module.ctaButton, variant: "flat", key: label, ...actionProps }))))));
|
|
44
56
|
};
|
|
45
57
|
|
|
46
58
|
exports.SelectDropdown = SelectDropdown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectDropdown.cjs","sources":["../../../src/components/SelectDropdown/SelectDropdown.tsx"],"sourcesContent":["/* eslint-disable react/destructuring-assignment */\nimport React, { useCallback, useState } from 'react';\nimport { Key, Selection } from 'react-aria-components';\n\nimport { buildClassnames } from '../../utils';\nimport { SelectedOption } from './components/SelectedOption';\nimport { generateClassNames, getSelectedValues } from './utils';\nimport {
|
|
1
|
+
{"version":3,"file":"SelectDropdown.cjs","sources":["../../../src/components/SelectDropdown/SelectDropdown.tsx"],"sourcesContent":["/* eslint-disable react/destructuring-assignment */\nimport React, { Fragment, useCallback, useState } from 'react';\nimport { Key, ListBox, Selection } from 'react-aria-components';\n\nimport { buildClassnames } from '../../utils';\nimport { SelectedOption } from './components/SelectedOption';\nimport { generateClassNames, getSelectedValues } from './utils';\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';\nimport { Dropdown } from '../Dropdown';\nimport { Search } from '../Search';\nimport { Button } from '../Button';\nimport styles from './SelectDropdown.module.scss';\nimport formStyles from '../../utils/forms/form.module.scss';\n\nexport const SelectDropdown = ({\n id,\n className,\n placeholder = 'Select item',\n multiple = false,\n compact = false,\n hasError = false,\n disabled,\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\n const selectedValues = getSelectedValues(options, hasSection, value);\n const selectionMode = multiple ? 'multiple' : 'single';\n\n const onSelectionChange = useCallback(\n (keys: Selection) => {\n const selectedKeys = Array.from(keys);\n const newSelectedValues = getSelectedValues(options, hasSection, selectedKeys);\n\n if (multiple) {\n (onChange as (items: SelectDropdownItem[]) => void)(newSelectedValues);\n } else {\n (onChange as (item: SelectDropdownItem) => void)(newSelectedValues[0]);\n setIsSelectOpen(false);\n }\n },\n [options, hasSection, multiple, onChange],\n );\n\n return (\n <Dropdown\n id={`select-dropdown-${id}`}\n className={buildClassnames([classNames?.popover, styles.dropdown, className])}\n shouldShow={isSelectOpen}\n setShouldShow={setIsSelectOpen}\n useAnchorWidth\n disabled={disabled}\n renderCta={(buttonProps, anchorRef) => (\n <button\n {...buttonProps}\n type=\"button\"\n ref={anchorRef}\n className={buildClassnames([\n className,\n styles.dropdownTrigger,\n formStyles.fullStyles,\n formStyles.base,\n hasError && formStyles.error,\n compact && formStyles.compact,\n ])}\n >\n <SelectedOption\n placeholder={placeholder}\n options={selectedValues}\n selectionMode={selectionMode}\n />\n </button>\n )}\n >\n {onSearchChange && (\n <>\n <Search className={styles.search} value={searchValue} onChange={onSearchChange} />\n <hr className={styles.separator} />\n </>\n )}\n <ListBox\n className={buildClassnames([classNames?.optionsContainer, styles.listBox, 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 </ListBox>\n {actions?.map(({ label, ...actionProps }) => (\n <Fragment key={label}>\n <hr className={styles.separator} key={`seperator-${label}`} />\n <Button className={styles.ctaButton} variant=\"flat\" key={label} {...actionProps} />\n </Fragment>\n ))}\n </Dropdown>\n );\n};\n"],"names":["generateClassNames","useState","getSelectedValues","useCallback","React","Dropdown","buildClassnames","styles","formStyles","SelectedOption","Search","ListBox","SelectDropdownState","ListItemSection","ListItem","Fragment","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAkBa,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,QAAQ,EACR,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,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC;AACtF,IAAA,MAAM,UAAU,GAAGA,wBAAkB,CAAC,SAAS,CAAC;IAEhD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAGC,cAAQ,CAAC,KAAK,CAAC;IAEvD,MAAM,cAAc,GAAGC,uB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A,aAAA,CAACQ,uCAAmB,EAAA,EAAC,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAA,CAAI,CAC9E,EAAA,GACG,UAAU,EAAA,EAEb,CAAC,IAAI,KACJ,UAAU,IACRR,sBAAC,CAAA,aAAA,CAAAS,+BAAe,EAAM,EAAA,GAAA,IAA6B,EAAI,CAAA,KAEvDT,sBAAC,CAAA,aAAA,CAAAU,iBAAQ,EAAM,EAAA,GAAA,IAAsB,EAAI,CAAA,CAC1C,CAEK,EACT,OAAO,KAAA,IAAA,IAAP,OAAO,KAAA,SAAA,GAAA,SAAA;AAAP,QAAA,OAAO,CAAE,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,MACtCV,sBAAA,CAAA,aAAA,CAACW,cAAQ,EAAC,EAAA,GAAG,EAAE,KAAK,EAAA;YAClBX,sBAAI,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,SAAS,EAAEG,qBAAM,CAAC,SAAS,EAAE,GAAG,EAAE,CAAA,UAAA,EAAa,KAAK,CAAA,CAAE,EAAI,CAAA;YAC9DH,sBAAC,CAAA,aAAA,CAAAY,aAAM,IAAC,SAAS,EAAET,qBAAM,CAAC,SAAS,EAAE,OAAO,EAAC,MAAM,EAAC,GAAG,EAAE,KAAK,EAAA,GAAM,WAAW,EAAA,CAAI,CAC1E,CACZ,CAAC,CACO;AAEf;;;;"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import React__default, { useState, useCallback } from 'react';
|
|
1
|
+
import React__default, { useState, useCallback, Fragment } from 'react';
|
|
2
|
+
import { ListBox } from 'react-aria-components';
|
|
2
3
|
import { buildClassnames } from '../../utils/buildClassnames.js';
|
|
3
4
|
import 'uid/secure';
|
|
4
5
|
import { SelectedOption } from './components/SelectedOption.js';
|
|
5
6
|
import { getSelectedValues, generateClassNames } from './utils.js';
|
|
6
|
-
import { StyledDropdown, StyledSelectButton, StyledSearch, Separator, StyledListBox, CTAButton } from './styled.js';
|
|
7
7
|
import { ListItemSection } from './ListItemSection/ListItemSection.js';
|
|
8
8
|
import { ListItem } from './ListItem/ListItem.js';
|
|
9
9
|
import { SelectDropdownState } from './components/SelectDropdownState.js';
|
|
10
|
+
import { Dropdown } from '../Dropdown/Dropdown.js';
|
|
11
|
+
import { Search } from '../Search/Search.js';
|
|
12
|
+
import { Button } from '../Button/Button.js';
|
|
13
|
+
import styles from './SelectDropdown.module.scss.js';
|
|
14
|
+
import formStyles from '../../utils/forms/form.module.scss.js';
|
|
10
15
|
|
|
11
16
|
/* eslint-disable react/destructuring-assignment */
|
|
12
17
|
const SelectDropdown = ({ id, className, placeholder = 'Select item', multiple = false, compact = false, hasError = false, disabled, options, value, actions, isLoading = false, searchValue, emptyStateSlot, onSearchChange, onChange, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, ...otherProps }) => {
|
|
@@ -26,15 +31,22 @@ const SelectDropdown = ({ id, className, placeholder = 'Select item', multiple =
|
|
|
26
31
|
setIsSelectOpen(false);
|
|
27
32
|
}
|
|
28
33
|
}, [options, hasSection, multiple, onChange]);
|
|
29
|
-
return (React__default.createElement(
|
|
34
|
+
return (React__default.createElement(Dropdown, { id: `select-dropdown-${id}`, className: buildClassnames([classNames === null || classNames === undefined ? undefined : classNames.popover, styles.dropdown, className]), shouldShow: isSelectOpen, setShouldShow: setIsSelectOpen, useAnchorWidth: true, disabled: disabled, renderCta: (buttonProps, anchorRef) => (React__default.createElement("button", { ...buttonProps, type: "button", ref: anchorRef, className: buildClassnames([
|
|
35
|
+
className,
|
|
36
|
+
styles.dropdownTrigger,
|
|
37
|
+
formStyles.fullStyles,
|
|
38
|
+
formStyles.base,
|
|
39
|
+
hasError && formStyles.error,
|
|
40
|
+
compact && formStyles.compact,
|
|
41
|
+
]) },
|
|
30
42
|
React__default.createElement(SelectedOption, { placeholder: placeholder, options: selectedValues, selectionMode: selectionMode }))) },
|
|
31
43
|
onSearchChange && (React__default.createElement(React__default.Fragment, null,
|
|
32
|
-
React__default.createElement(
|
|
33
|
-
React__default.createElement(
|
|
34
|
-
React__default.createElement(
|
|
35
|
-
actions.map(({ label, ...actionProps }) => (React__default.createElement(
|
|
36
|
-
React__default.createElement(
|
|
37
|
-
React__default.createElement(
|
|
44
|
+
React__default.createElement(Search, { className: styles.search, value: searchValue, onChange: onSearchChange }),
|
|
45
|
+
React__default.createElement("hr", { className: styles.separator }))),
|
|
46
|
+
React__default.createElement(ListBox, { className: buildClassnames([classNames === null || classNames === undefined ? undefined : classNames.optionsContainer, styles.listBox, 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 :
|
|
47
|
+
actions.map(({ label, ...actionProps }) => (React__default.createElement(Fragment, { key: label },
|
|
48
|
+
React__default.createElement("hr", { className: styles.separator, key: `seperator-${label}` }),
|
|
49
|
+
React__default.createElement(Button, { className: styles.ctaButton, variant: "flat", key: label, ...actionProps }))))));
|
|
38
50
|
};
|
|
39
51
|
|
|
40
52
|
export { SelectDropdown };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectDropdown.js","sources":["../../../src/components/SelectDropdown/SelectDropdown.tsx"],"sourcesContent":["/* eslint-disable react/destructuring-assignment */\nimport React, { useCallback, useState } from 'react';\nimport { Key, Selection } from 'react-aria-components';\n\nimport { buildClassnames } from '../../utils';\nimport { SelectedOption } from './components/SelectedOption';\nimport { generateClassNames, getSelectedValues } from './utils';\nimport {
|
|
1
|
+
{"version":3,"file":"SelectDropdown.js","sources":["../../../src/components/SelectDropdown/SelectDropdown.tsx"],"sourcesContent":["/* eslint-disable react/destructuring-assignment */\nimport React, { Fragment, useCallback, useState } from 'react';\nimport { Key, ListBox, Selection } from 'react-aria-components';\n\nimport { buildClassnames } from '../../utils';\nimport { SelectedOption } from './components/SelectedOption';\nimport { generateClassNames, getSelectedValues } from './utils';\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';\nimport { Dropdown } from '../Dropdown';\nimport { Search } from '../Search';\nimport { Button } from '../Button';\nimport styles from './SelectDropdown.module.scss';\nimport formStyles from '../../utils/forms/form.module.scss';\n\nexport const SelectDropdown = ({\n id,\n className,\n placeholder = 'Select item',\n multiple = false,\n compact = false,\n hasError = false,\n disabled,\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\n const selectedValues = getSelectedValues(options, hasSection, value);\n const selectionMode = multiple ? 'multiple' : 'single';\n\n const onSelectionChange = useCallback(\n (keys: Selection) => {\n const selectedKeys = Array.from(keys);\n const newSelectedValues = getSelectedValues(options, hasSection, selectedKeys);\n\n if (multiple) {\n (onChange as (items: SelectDropdownItem[]) => void)(newSelectedValues);\n } else {\n (onChange as (item: SelectDropdownItem) => void)(newSelectedValues[0]);\n setIsSelectOpen(false);\n }\n },\n [options, hasSection, multiple, onChange],\n );\n\n return (\n <Dropdown\n id={`select-dropdown-${id}`}\n className={buildClassnames([classNames?.popover, styles.dropdown, className])}\n shouldShow={isSelectOpen}\n setShouldShow={setIsSelectOpen}\n useAnchorWidth\n disabled={disabled}\n renderCta={(buttonProps, anchorRef) => (\n <button\n {...buttonProps}\n type=\"button\"\n ref={anchorRef}\n className={buildClassnames([\n className,\n styles.dropdownTrigger,\n formStyles.fullStyles,\n formStyles.base,\n hasError && formStyles.error,\n compact && formStyles.compact,\n ])}\n >\n <SelectedOption\n placeholder={placeholder}\n options={selectedValues}\n selectionMode={selectionMode}\n />\n </button>\n )}\n >\n {onSearchChange && (\n <>\n <Search className={styles.search} value={searchValue} onChange={onSearchChange} />\n <hr className={styles.separator} />\n </>\n )}\n <ListBox\n className={buildClassnames([classNames?.optionsContainer, styles.listBox, 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 </ListBox>\n {actions?.map(({ label, ...actionProps }) => (\n <Fragment key={label}>\n <hr className={styles.separator} key={`seperator-${label}`} />\n <Button className={styles.ctaButton} variant=\"flat\" key={label} {...actionProps} />\n </Fragment>\n ))}\n </Dropdown>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;AAAA;AAkBa,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,QAAQ,EACR,OAAO,EACP,KAAK,EACL,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,WAAW,EACX,cAAc,EACd,cAAc,E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
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ___$insertStyle = require('../../_virtual/____insertStyle.cjs');
|
|
4
|
+
|
|
5
|
+
___$insertStyle("._listBox_fnslz_1 {\n overflow-y: scroll;\n max-height: 300px;\n padding: var(--sizes-sm);\n scroll-padding: var(--sizes-xs) 0;\n}\n._listBox_fnslz_1[data-empty] {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n._dropdown_fnslz_13 {\n padding: var(--sizes-none) !important;\n}\n\n._dropdownTrigger_fnslz_17 {\n padding-right: var(--sizes-9);\n background-image: url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M4 6L8 10L12 6H4Z' fill='currentColor' /%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right var(--sizes-3) top 50%;\n}\n\n._separator_fnslz_24 {\n height: var(--sizes-line);\n background: var(--colors-neutral-grey-base);\n border: none;\n margin: var(--sizes-none) var(--sizes-none);\n width: 100%;\n}\n\n._search_fnslz_32 {\n margin: var(--sizes-sm) !important;\n}\n\n._ctaButton_fnslz_36 {\n justify-content: start !important;\n padding-left: var(--sizes-xs) !important;\n margin: var(--sizes-sm) var(--sizes-xs) !important;\n border-radius: var(--radius-base) !important;\n font-size: var(--text-body-font-size) !important;\n}\n._ctaButton_fnslz_36 svg {\n width: var(--sizes-md) !important;\n height: var(--sizes-md) !important;\n}");
|
|
6
|
+
var styles = {"listBox":"_listBox_fnslz_1","dropdown":"_dropdown_fnslz_13","dropdownTrigger":"_dropdownTrigger_fnslz_17","separator":"_separator_fnslz_24","search":"_search_fnslz_32","ctaButton":"_ctaButton_fnslz_36"};
|
|
7
|
+
|
|
8
|
+
module.exports = styles;
|
|
9
|
+
//# sourceMappingURL=SelectDropdown.module.scss.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectDropdown.module.scss.cjs","sources":["../../../src/components/SelectDropdown/SelectDropdown.module.scss"],"sourcesContent":[".listBox {\n overflow-y: scroll;\n max-height: 300px;\n padding: var(--sizes-sm);\n scroll-padding: var(--sizes-xs) 0;\n\n &[data-empty] {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n\n// used important to override styled-component styles from Dropdown\n.dropdown {\n padding: var(--sizes-none) !important;\n}\n\n.dropdownTrigger {\n padding-right: var(--sizes-9);\n background-image: url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M4 6L8 10L12 6H4Z' fill='currentColor' /%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right var(--sizes-3) top 50%;\n}\n\n.separator {\n height: var(--sizes-line);\n background: var(--colors-neutral-grey-base);\n border: none;\n margin: var(--sizes-none) var(--sizes-none);\n width: 100%;\n}\n\n// used important to override styled-component styles from Search\n.search {\n margin: var(--sizes-sm) !important;\n}\n\n// used important to override styled-component styles from Button\n.ctaButton {\n justify-content: start !important;\n padding-left: var(--sizes-xs) !important;\n margin: var(--sizes-sm) var(--sizes-xs) !important;\n border-radius: var(--radius-base) !important;\n font-size: var(--text-body-font-size) !important;\n svg {\n width: var(--sizes-md) !important;\n height: var(--sizes-md) !important;\n }\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,s0CAAA;AACA,aAAA,CAAA,SAAA,CAAA,kBAAA,CAAA,UAAA,CAAA,oBAAA,CAAA,iBAAA,CAAA,2BAAA,CAAA,WAAA,CAAA,qBAAA,CAAA,QAAA,CAAA,kBAAA,CAAA,WAAA,CAAA,qBAAA;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import insertStyle from '../../_virtual/____insertStyle.js';
|
|
2
|
+
|
|
3
|
+
insertStyle("._listBox_fnslz_1 {\n overflow-y: scroll;\n max-height: 300px;\n padding: var(--sizes-sm);\n scroll-padding: var(--sizes-xs) 0;\n}\n._listBox_fnslz_1[data-empty] {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n._dropdown_fnslz_13 {\n padding: var(--sizes-none) !important;\n}\n\n._dropdownTrigger_fnslz_17 {\n padding-right: var(--sizes-9);\n background-image: url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M4 6L8 10L12 6H4Z' fill='currentColor' /%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right var(--sizes-3) top 50%;\n}\n\n._separator_fnslz_24 {\n height: var(--sizes-line);\n background: var(--colors-neutral-grey-base);\n border: none;\n margin: var(--sizes-none) var(--sizes-none);\n width: 100%;\n}\n\n._search_fnslz_32 {\n margin: var(--sizes-sm) !important;\n}\n\n._ctaButton_fnslz_36 {\n justify-content: start !important;\n padding-left: var(--sizes-xs) !important;\n margin: var(--sizes-sm) var(--sizes-xs) !important;\n border-radius: var(--radius-base) !important;\n font-size: var(--text-body-font-size) !important;\n}\n._ctaButton_fnslz_36 svg {\n width: var(--sizes-md) !important;\n height: var(--sizes-md) !important;\n}");
|
|
4
|
+
var styles = {"listBox":"_listBox_fnslz_1","dropdown":"_dropdown_fnslz_13","dropdownTrigger":"_dropdownTrigger_fnslz_17","separator":"_separator_fnslz_24","search":"_search_fnslz_32","ctaButton":"_ctaButton_fnslz_36"};
|
|
5
|
+
|
|
6
|
+
export { styles as default };
|
|
7
|
+
//# sourceMappingURL=SelectDropdown.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectDropdown.module.scss.js","sources":["../../../src/components/SelectDropdown/SelectDropdown.module.scss"],"sourcesContent":[".listBox {\n overflow-y: scroll;\n max-height: 300px;\n padding: var(--sizes-sm);\n scroll-padding: var(--sizes-xs) 0;\n\n &[data-empty] {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}\n\n// used important to override styled-component styles from Dropdown\n.dropdown {\n padding: var(--sizes-none) !important;\n}\n\n.dropdownTrigger {\n padding-right: var(--sizes-9);\n background-image: url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M4 6L8 10L12 6H4Z' fill='currentColor' /%3E%3C/svg%3E\");\n background-repeat: no-repeat;\n background-position: right var(--sizes-3) top 50%;\n}\n\n.separator {\n height: var(--sizes-line);\n background: var(--colors-neutral-grey-base);\n border: none;\n margin: var(--sizes-none) var(--sizes-none);\n width: 100%;\n}\n\n// used important to override styled-component styles from Search\n.search {\n margin: var(--sizes-sm) !important;\n}\n\n// used important to override styled-component styles from Button\n.ctaButton {\n justify-content: start !important;\n padding-left: var(--sizes-xs) !important;\n margin: var(--sizes-sm) var(--sizes-xs) !important;\n border-radius: var(--radius-base) !important;\n font-size: var(--text-body-font-size) !important;\n svg {\n width: var(--sizes-md) !important;\n height: var(--sizes-md) !important;\n }\n}\n"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,s0CAAA;AACA,aAAA,CAAA,SAAA,CAAA,kBAAA,CAAA,UAAA,CAAA,oBAAA,CAAA,iBAAA,CAAA,2BAAA,CAAA,WAAA,CAAA,qBAAA,CAAA,QAAA,CAAA,kBAAA,CAAA,WAAA,CAAA,qBAAA;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
+
var FlexRow = require('../../Flex/FlexRow/FlexRow.cjs');
|
|
4
5
|
var Text = require('../../Text/Text.cjs');
|
|
5
|
-
var styled = require('../ListItem/styled.cjs');
|
|
6
6
|
|
|
7
7
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
8
|
|
|
@@ -11,16 +11,14 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
11
11
|
const SelectedOption = ({ placeholder, options, selectionMode }) => {
|
|
12
12
|
var _a, _b, _c;
|
|
13
13
|
if (options.length === 0) {
|
|
14
|
-
return
|
|
15
|
-
React__default.default.createElement(Text.Text, { variant: "placeholder" }, placeholder)));
|
|
14
|
+
return React__default.default.createElement(Text.Text, { variant: "placeholder" }, placeholder);
|
|
16
15
|
}
|
|
17
16
|
if (selectionMode === 'single') {
|
|
18
|
-
return (React__default.default.createElement(
|
|
17
|
+
return (React__default.default.createElement(FlexRow.FlexRow, { gap: "sm" },
|
|
19
18
|
React__default.default.createElement(Text.Text, { variant: "placeholder" }, (_a = options[0]) === null || _a === undefined ? undefined : _a.label),
|
|
20
19
|
((_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
20
|
}
|
|
22
|
-
return
|
|
23
|
-
React__default.default.createElement(Text.Text, { variant: "placeholder" }, options.map((opt) => opt.label).join(', '))));
|
|
21
|
+
return React__default.default.createElement(Text.Text, { variant: "placeholder" }, options.map((opt) => opt.label).join(', '));
|
|
24
22
|
};
|
|
25
23
|
|
|
26
24
|
exports.SelectedOption = SelectedOption;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectedOption.cjs","sources":["../../../../src/components/SelectDropdown/components/SelectedOption.tsx"],"sourcesContent":["import React from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"SelectedOption.cjs","sources":["../../../../src/components/SelectDropdown/components/SelectedOption.tsx"],"sourcesContent":["import React from 'react';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { Text } from '../../Text';\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 <Text variant=\"placeholder\">{placeholder}</Text>;\n }\n\n if (selectionMode === 'single') {\n return (\n <FlexRow gap=\"sm\">\n <Text variant=\"placeholder\">{options[0]?.label}</Text>\n {options[0]?.itemInfoSlot && <Text variant=\"hintText\">{options[0]?.itemInfoSlot}</Text>}\n </FlexRow>\n );\n }\n\n return <Text variant=\"placeholder\">{options.map((opt: any) => opt.label).join(', ')}</Text>;\n};\n"],"names":["React","Text","FlexRow"],"mappings":";;;;;;;;;;AAWO,MAAM,cAAc,GAAG,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAuB,KAAI;;AAC7F,IAAA,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;QACxB,OAAOA,sBAAA,CAAA,aAAA,CAACC,SAAI,EAAC,EAAA,OAAO,EAAC,aAAa,EAAA,EAAE,WAAW,CAAQ;AACxD;IAED,IAAI,aAAa,KAAK,QAAQ,EAAE;AAC9B,QAAA,QACED,sBAAC,CAAA,aAAA,CAAAE,eAAO,EAAC,EAAA,GAAG,EAAC,IAAI,EAAA;AACf,YAAAF,sBAAA,CAAA,aAAA,CAACC,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,KAAID,sBAAC,CAAA,aAAA,CAAAC,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,CAC/E;AAEb;IAED,OAAOD,sBAAA,CAAA,aAAA,CAACC,SAAI,EAAA,EAAC,OAAO,EAAC,aAAa,EAAA,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,GAAQ,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAQ;AAC7F;;;;"}
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
+
import { FlexRow } from '../../Flex/FlexRow/FlexRow.js';
|
|
2
3
|
import { Text } from '../../Text/Text.js';
|
|
3
|
-
import { ItemInfoContainer } from '../ListItem/styled.js';
|
|
4
4
|
|
|
5
5
|
const SelectedOption = ({ placeholder, options, selectionMode }) => {
|
|
6
6
|
var _a, _b, _c;
|
|
7
7
|
if (options.length === 0) {
|
|
8
|
-
return
|
|
9
|
-
React__default.createElement(Text, { variant: "placeholder" }, placeholder)));
|
|
8
|
+
return React__default.createElement(Text, { variant: "placeholder" }, placeholder);
|
|
10
9
|
}
|
|
11
10
|
if (selectionMode === 'single') {
|
|
12
|
-
return (React__default.createElement(
|
|
11
|
+
return (React__default.createElement(FlexRow, { gap: "sm" },
|
|
13
12
|
React__default.createElement(Text, { variant: "placeholder" }, (_a = options[0]) === null || _a === undefined ? undefined : _a.label),
|
|
14
13
|
((_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
14
|
}
|
|
16
|
-
return
|
|
17
|
-
React__default.createElement(Text, { variant: "placeholder" }, options.map((opt) => opt.label).join(', '))));
|
|
15
|
+
return React__default.createElement(Text, { variant: "placeholder" }, options.map((opt) => opt.label).join(', '));
|
|
18
16
|
};
|
|
19
17
|
|
|
20
18
|
export { SelectedOption };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectedOption.js","sources":["../../../../src/components/SelectDropdown/components/SelectedOption.tsx"],"sourcesContent":["import React from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"SelectedOption.js","sources":["../../../../src/components/SelectDropdown/components/SelectedOption.tsx"],"sourcesContent":["import React from 'react';\nimport { FlexRow } from '../../Flex/FlexRow';\nimport { Text } from '../../Text';\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 <Text variant=\"placeholder\">{placeholder}</Text>;\n }\n\n if (selectionMode === 'single') {\n return (\n <FlexRow gap=\"sm\">\n <Text variant=\"placeholder\">{options[0]?.label}</Text>\n {options[0]?.itemInfoSlot && <Text variant=\"hintText\">{options[0]?.itemInfoSlot}</Text>}\n </FlexRow>\n );\n }\n\n return <Text variant=\"placeholder\">{options.map((opt: any) => opt.label).join(', ')}</Text>;\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,OAAOA,cAAA,CAAA,aAAA,CAAC,IAAI,EAAC,EAAA,OAAO,EAAC,aAAa,EAAA,EAAE,WAAW,CAAQ;AACxD;IAED,IAAI,aAAa,KAAK,QAAQ,EAAE;AAC9B,QAAA,QACEA,cAAC,CAAA,aAAA,CAAA,OAAO,EAAC,EAAA,GAAG,EAAC,IAAI,EAAA;AACf,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,CAC/E;AAEb;IAED,OAAOA,cAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAC,OAAO,EAAC,aAAa,EAAA,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,GAAQ,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAQ;AAC7F;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ___$insertStyle = require('../../_virtual/____insertStyle.cjs');
|
|
4
|
+
|
|
5
|
+
___$insertStyle("._fullStyles_1j3kl_1 {\n /* Set default CSS custom properties */\n --outline-size: var(--sizes-xs);\n --border-color: var(--colors-neutral-ink-lightest);\n --shadow-color: var(--colors-secondary-blue-light);\n}\n._fullStyles_1j3kl_1:disabled, ._fullStyles_1j3kl_1[data-disabled] {\n opacity: 1;\n box-shadow: none;\n background-color: var(--colors-neutral-grey-light);\n cursor: not-allowed;\n}\n._fullStyles_1j3kl_1._compact_1j3kl_13 {\n --outline-size: 2px;\n min-height: var(--sizes-8);\n}\n._fullStyles_1j3kl_1._error_1j3kl_17 {\n --border-color: var(--colors-secondary-red-base);\n --shadow-color: var(--colors-secondary-red-light);\n}\n._fullStyles_1j3kl_1:focus {\n border-color: var(--border-color);\n box-shadow: 0 0 0 var(--outline-size) var(--shadow-color);\n outline: 0;\n}\n._fullStyles_1j3kl_1::placeholder {\n font-family: var(--text-placeholder-font-family);\n font-style: var(--text-placeholder-font-style);\n font-weight: var(--text-placeholder-font-weight);\n font-size: var(--text-placeholder-font-size);\n line-height: var(--text-placeholder-line-height);\n color: var(--text-placeholder-color);\n text-decoration: var(--text-placeholder-text-decoration);\n letter-spacing: var(--text-placeholder-letter-spacing);\n}\n._fullStyles_1j3kl_1:invalid {\n box-shadow: 0 0 0 var(--outline-size) var(--border-color);\n border-color: var(--colors-secondary-red-base);\n}\n\n._base_1j3kl_41 {\n font-family: var(--text-body-font-family);\n font-style: var(--text-body-font-style);\n font-weight: var(--text-body-font-weight);\n font-size: var(--text-body-font-size);\n line-height: var(--text-body-line-height);\n color: var(--text-body-color);\n text-decoration: var(--text-body-text-decoration);\n letter-spacing: var(--text-body-letter-spacing);\n appearance: none;\n box-sizing: border-box;\n background-color: white;\n text-align: left;\n min-height: var(--sizes-10);\n padding-inline: var(--sizes-3);\n border-radius: var(--radius-base);\n border: 1px solid var(--border-color);\n display: flex;\n align-items: center;\n justify-content: flex-start;\n}\n._base_1j3kl_41._inputGroup_1j3kl_62:first-child {\n padding-right: calc(var(--sizes-3) - var(--sizes-1));\n}\n._base_1j3kl_41._inputGroup_1j3kl_62:last-child {\n padding-left: var(--sizes-2);\n}\n._base_1j3kl_41._inputGroup_1j3kl_62:not(:first-child):not(:last-child) {\n padding-inline: var(--sizes-2);\n}");
|
|
6
|
+
var formStyles = {"fullStyles":"_fullStyles_1j3kl_1","compact":"_compact_1j3kl_13","error":"_error_1j3kl_17","base":"_base_1j3kl_41","inputGroup":"_inputGroup_1j3kl_62"};
|
|
7
|
+
|
|
8
|
+
module.exports = formStyles;
|
|
9
|
+
//# sourceMappingURL=form.module.scss.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.module.scss.cjs","sources":["../../../src/utils/forms/form.module.scss"],"sourcesContent":[".fullStyles {\n /* Set default CSS custom properties */\n --outline-size: var(--sizes-xs);\n --border-color: var(--colors-neutral-ink-lightest);\n --shadow-color: var(--colors-secondary-blue-light);\n\n &:disabled,\n &[data-disabled] {\n opacity: 1;\n box-shadow: none;\n background-color: var(--colors-neutral-grey-light);\n cursor: not-allowed;\n }\n\n &.compact {\n --outline-size: 2px;\n min-height: var(--sizes-8);\n }\n\n &.error {\n --border-color: var(--colors-secondary-red-base);\n --shadow-color: var(--colors-secondary-red-light);\n }\n\n &:focus {\n border-color: var(--border-color);\n box-shadow: 0 0 0 var(--outline-size) var(--shadow-color);\n outline: 0;\n }\n\n &::placeholder {\n font-family: var(--text-placeholder-font-family);\n font-style: var(--text-placeholder-font-style);\n font-weight: var(--text-placeholder-font-weight);\n font-size: var(--text-placeholder-font-size);\n line-height: var(--text-placeholder-line-height);\n color: var(--text-placeholder-color);\n text-decoration: var(--text-placeholder-text-decoration);\n letter-spacing: var(--text-placeholder-letter-spacing);\n }\n\n &:invalid {\n box-shadow: 0 0 0 var(--outline-size) var(--border-color);\n border-color: var(--colors-secondary-red-base);\n }\n}\n\n.base {\n font-family: var(--text-body-font-family);\n font-style: var(--text-body-font-style);\n font-weight: var(--text-body-font-weight);\n font-size: var(--text-body-font-size);\n line-height: var(--text-body-line-height);\n color: var(--text-body-color);\n text-decoration: var(--text-body-text-decoration);\n letter-spacing: var(--text-body-letter-spacing);\n\n appearance: none;\n box-sizing: border-box;\n\n background-color: white;\n text-align: left;\n\n min-height: var(--sizes-10);\n padding-inline: var(--sizes-3);\n border-radius: var(--radius-base);\n border: 1px solid var(--border-color);\n\n display: flex;\n align-items: center;\n justify-content: flex-start;\n\n &.inputGroup {\n &:first-child {\n padding-right: calc(var(--sizes-3) - var(--sizes-1));\n }\n\n &:last-child {\n padding-left: var(--sizes-2);\n }\n\n &:not(:first-child):not(:last-child) {\n padding-inline: var(--sizes-2);\n }\n }\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,43EAAA;AACA,iBAAA,CAAA,YAAA,CAAA,qBAAA,CAAA,SAAA,CAAA,mBAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,MAAA,CAAA,gBAAA,CAAA,YAAA,CAAA,sBAAA;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import insertStyle from '../../_virtual/____insertStyle.js';
|
|
2
|
+
|
|
3
|
+
insertStyle("._fullStyles_1j3kl_1 {\n /* Set default CSS custom properties */\n --outline-size: var(--sizes-xs);\n --border-color: var(--colors-neutral-ink-lightest);\n --shadow-color: var(--colors-secondary-blue-light);\n}\n._fullStyles_1j3kl_1:disabled, ._fullStyles_1j3kl_1[data-disabled] {\n opacity: 1;\n box-shadow: none;\n background-color: var(--colors-neutral-grey-light);\n cursor: not-allowed;\n}\n._fullStyles_1j3kl_1._compact_1j3kl_13 {\n --outline-size: 2px;\n min-height: var(--sizes-8);\n}\n._fullStyles_1j3kl_1._error_1j3kl_17 {\n --border-color: var(--colors-secondary-red-base);\n --shadow-color: var(--colors-secondary-red-light);\n}\n._fullStyles_1j3kl_1:focus {\n border-color: var(--border-color);\n box-shadow: 0 0 0 var(--outline-size) var(--shadow-color);\n outline: 0;\n}\n._fullStyles_1j3kl_1::placeholder {\n font-family: var(--text-placeholder-font-family);\n font-style: var(--text-placeholder-font-style);\n font-weight: var(--text-placeholder-font-weight);\n font-size: var(--text-placeholder-font-size);\n line-height: var(--text-placeholder-line-height);\n color: var(--text-placeholder-color);\n text-decoration: var(--text-placeholder-text-decoration);\n letter-spacing: var(--text-placeholder-letter-spacing);\n}\n._fullStyles_1j3kl_1:invalid {\n box-shadow: 0 0 0 var(--outline-size) var(--border-color);\n border-color: var(--colors-secondary-red-base);\n}\n\n._base_1j3kl_41 {\n font-family: var(--text-body-font-family);\n font-style: var(--text-body-font-style);\n font-weight: var(--text-body-font-weight);\n font-size: var(--text-body-font-size);\n line-height: var(--text-body-line-height);\n color: var(--text-body-color);\n text-decoration: var(--text-body-text-decoration);\n letter-spacing: var(--text-body-letter-spacing);\n appearance: none;\n box-sizing: border-box;\n background-color: white;\n text-align: left;\n min-height: var(--sizes-10);\n padding-inline: var(--sizes-3);\n border-radius: var(--radius-base);\n border: 1px solid var(--border-color);\n display: flex;\n align-items: center;\n justify-content: flex-start;\n}\n._base_1j3kl_41._inputGroup_1j3kl_62:first-child {\n padding-right: calc(var(--sizes-3) - var(--sizes-1));\n}\n._base_1j3kl_41._inputGroup_1j3kl_62:last-child {\n padding-left: var(--sizes-2);\n}\n._base_1j3kl_41._inputGroup_1j3kl_62:not(:first-child):not(:last-child) {\n padding-inline: var(--sizes-2);\n}");
|
|
4
|
+
var formStyles = {"fullStyles":"_fullStyles_1j3kl_1","compact":"_compact_1j3kl_13","error":"_error_1j3kl_17","base":"_base_1j3kl_41","inputGroup":"_inputGroup_1j3kl_62"};
|
|
5
|
+
|
|
6
|
+
export { formStyles as default };
|
|
7
|
+
//# sourceMappingURL=form.module.scss.js.map
|