@veeqo/ui 12.4.0 → 12.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Alerts/Alert/Alert.cjs +2 -2
- package/dist/components/Alerts/Alert/Alert.cjs.map +1 -1
- package/dist/components/Alerts/Alert/Alert.js +2 -2
- package/dist/components/Alerts/Alert/Alert.js.map +1 -1
- package/dist/components/Flex/FlexCol/FlexCol.d.ts +3 -3
- package/dist/components/Flex/FlexRow/FlexRow.d.ts +3 -3
- package/dist/components/Flex/types.d.ts +13 -4
- package/dist/components/Pagination/styled.d.ts +3 -3
- package/dist/components/SelectDropdown/SelectDropdown.cjs +27 -19
- package/dist/components/SelectDropdown/SelectDropdown.cjs.map +1 -1
- package/dist/components/SelectDropdown/SelectDropdown.d.ts +1 -1
- package/dist/components/SelectDropdown/SelectDropdown.js +27 -19
- package/dist/components/SelectDropdown/SelectDropdown.js.map +1 -1
- package/dist/components/SelectDropdown/SelectDropdown.module.scss.cjs +2 -2
- package/dist/components/SelectDropdown/SelectDropdown.module.scss.cjs.map +1 -1
- package/dist/components/SelectDropdown/SelectDropdown.module.scss.js +2 -2
- package/dist/components/SelectDropdown/SelectDropdown.module.scss.js.map +1 -1
- package/dist/components/SelectDropdown/components/GridItem/GridItem.cjs +37 -0
- package/dist/components/SelectDropdown/components/GridItem/GridItem.cjs.map +1 -0
- package/dist/components/SelectDropdown/components/GridItem/GridItem.js +31 -0
- package/dist/components/SelectDropdown/components/GridItem/GridItem.js.map +1 -0
- package/dist/components/SelectDropdown/components/GridItem/GridItem.module.scss.cjs +9 -0
- package/dist/components/SelectDropdown/components/GridItem/GridItem.module.scss.cjs.map +1 -0
- package/dist/components/SelectDropdown/components/GridItem/GridItem.module.scss.js +7 -0
- package/dist/components/SelectDropdown/components/GridItem/GridItem.module.scss.js.map +1 -0
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.cjs +4 -4
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.d.ts +1 -1
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.js +4 -4
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.js.map +1 -1
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.module.scss.cjs +2 -2
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.module.scss.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.module.scss.js +2 -2
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.module.scss.js.map +1 -1
- package/dist/components/SelectDropdown/components/ItemContent/types.d.ts +2 -0
- package/dist/components/SelectDropdown/components/ListItem/ListItem.cjs +1 -1
- package/dist/components/SelectDropdown/components/ListItem/ListItem.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/ListItem/ListItem.js +2 -2
- package/dist/components/SelectDropdown/components/ListItem/ListItem.js.map +1 -1
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.cjs +1 -1
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.js +1 -1
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.js.map +1 -1
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.module.scss.cjs +2 -2
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.module.scss.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.module.scss.js +2 -2
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.module.scss.js.map +1 -1
- package/dist/components/SelectDropdown/components/OptionsContainers/GridList.cjs +18 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/GridList.cjs.map +1 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/GridList.d.ts +3 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/GridList.js +12 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/GridList.js.map +1 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/ListBox.cjs +19 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/ListBox.cjs.map +1 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/ListBox.d.ts +3 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/ListBox.js +13 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/ListBox.js.map +1 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss.cjs +9 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss.cjs.map +1 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss.js +7 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss.js.map +1 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/types.d.ts +25 -0
- package/dist/components/SelectDropdown/components/SelectDropdownState.cjs +11 -3
- package/dist/components/SelectDropdown/components/SelectDropdownState.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/SelectDropdownState.js +11 -3
- package/dist/components/SelectDropdown/components/SelectDropdownState.js.map +1 -1
- package/dist/components/SelectDropdown/components/SelectedOption.cjs +2 -2
- package/dist/components/SelectDropdown/components/SelectedOption.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/SelectedOption.js +2 -2
- package/dist/components/SelectDropdown/components/SelectedOption.js.map +1 -1
- package/dist/components/SelectDropdown/components/item.module.scss.cjs +3 -3
- package/dist/components/SelectDropdown/components/item.module.scss.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/item.module.scss.js +3 -3
- package/dist/components/SelectDropdown/components/item.module.scss.js.map +1 -1
- package/dist/components/SelectDropdown/types.d.ts +4 -1
- package/dist/components/ViewsContainer/ViewsContainer.cjs +4 -3
- package/dist/components/ViewsContainer/ViewsContainer.cjs.map +1 -1
- package/dist/components/ViewsContainer/ViewsContainer.js +4 -3
- package/dist/components/ViewsContainer/ViewsContainer.js.map +1 -1
- package/dist/components/ViewsContainer/ViewsContainer.module.scss.cjs +2 -2
- package/dist/components/ViewsContainer/ViewsContainer.module.scss.cjs.map +1 -1
- package/dist/components/ViewsContainer/ViewsContainer.module.scss.js +2 -2
- package/dist/components/ViewsContainer/ViewsContainer.module.scss.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { GridListItem } from 'react-aria-components';
|
|
3
|
+
import { FlexRow } from '../../../Flex/FlexRow/FlexRow.js';
|
|
4
|
+
import { Button } from '../../../Button/Button.js';
|
|
5
|
+
import { ReactComponent as ArrowRightIcon } from '../../../../icons/design-system/components/ArrowRightIcon.js';
|
|
6
|
+
import { ItemContent } from '../ItemContent/ItemContent.js';
|
|
7
|
+
import { buildClassnames } from '../../../../utils/buildClassnames.js';
|
|
8
|
+
import 'uid/secure';
|
|
9
|
+
import '../../../../hooks/useFocusVisible.js';
|
|
10
|
+
import { useId } from '../../../../hooks/useId.js';
|
|
11
|
+
import 'lodash.throttle';
|
|
12
|
+
import itemStyles from '../item.module.scss.js';
|
|
13
|
+
import styles from './GridItem.module.scss.js';
|
|
14
|
+
|
|
15
|
+
function GridItem({ id, label, href, appearance = 'primary', className, onClickRowAction, rowActionAriaLabel, isRowActionDisabled = false, ...props }) {
|
|
16
|
+
const idComputed = useId({ id, prefix: 'grid-item' });
|
|
17
|
+
return (React__default.createElement(GridListItem, { id: idComputed, textValue: label, href: href, className: buildClassnames([
|
|
18
|
+
itemStyles.item,
|
|
19
|
+
itemStyles[`appearance-${appearance}`],
|
|
20
|
+
className,
|
|
21
|
+
]), ...props }, ({ selectionMode, allowsDragging, isSelected, isHovered }) => (React__default.createElement(FlexRow, { flexWrap: "nowrap", justifyContent: "space-between" },
|
|
22
|
+
React__default.createElement(ItemContent, { selectionMode: selectionMode, allowsDragging: allowsDragging, isSelected: isSelected, isHovered: isHovered, label: label, isLink: Boolean(href), appearance: appearance, itemType: "grid", ...props }),
|
|
23
|
+
onClickRowAction && (
|
|
24
|
+
/** onPointerDown event prevents click events from bubbling up to the GridListItem.
|
|
25
|
+
* onKeyDown event prevents keyboard events from bubbling up to the GridListItem.
|
|
26
|
+
*/
|
|
27
|
+
React__default.createElement(Button, { onClick: onClickRowAction, disabled: isRowActionDisabled, onPointerDown: (event) => event.stopPropagation(), onKeyDown: (event) => event.stopPropagation(), variant: "flat", iconSlot: React__default.createElement(ArrowRightIcon, null), "aria-label": rowActionAriaLabel || `${label} row action`, className: styles.actionButton }))))));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { GridItem };
|
|
31
|
+
//# sourceMappingURL=GridItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridItem.js","sources":["../../../../../src/components/SelectDropdown/components/GridItem/GridItem.tsx"],"sourcesContent":["import React from 'react';\nimport { GridListItem, GridListItemRenderProps } from 'react-aria-components';\nimport { FlexRow } from '../../../Flex/FlexRow';\nimport { Button } from '../../../Button';\nimport { ArrowRightIcon } from '../../../../icons';\nimport { ItemContent } from '../ItemContent';\nimport { GridItemProps } from './types';\nimport { buildClassnames } from '../../../../utils';\nimport { useId } from '../../../../hooks';\n\nimport itemStyles from '../item.module.scss';\nimport styles from './GridItem.module.scss';\n\nexport function GridItem({\n id,\n label,\n href,\n appearance = 'primary',\n className,\n onClickRowAction,\n rowActionAriaLabel,\n isRowActionDisabled = false,\n ...props\n}: GridItemProps) {\n const idComputed = useId({ id, prefix: 'grid-item' });\n\n return (\n <GridListItem\n id={idComputed}\n textValue={label}\n href={href}\n className={buildClassnames([\n itemStyles.item,\n itemStyles[`appearance-${appearance}`],\n className,\n ])}\n {...props}\n >\n {/* use react aria's render props to add more such as isHovered */}\n {({ selectionMode, allowsDragging, isSelected, isHovered }: GridListItemRenderProps) => (\n <FlexRow flexWrap=\"nowrap\" justifyContent=\"space-between\">\n <ItemContent\n selectionMode={selectionMode}\n allowsDragging={allowsDragging}\n isSelected={isSelected}\n isHovered={isHovered}\n label={label}\n isLink={Boolean(href)}\n appearance={appearance}\n itemType=\"grid\"\n {...props}\n />\n {onClickRowAction && (\n /** onPointerDown event prevents click events from bubbling up to the GridListItem.\n * onKeyDown event prevents keyboard events from bubbling up to the GridListItem.\n */\n <Button\n onClick={onClickRowAction}\n disabled={isRowActionDisabled}\n onPointerDown={(event) => event.stopPropagation()}\n onKeyDown={(event) => event.stopPropagation()}\n variant=\"flat\"\n iconSlot={<ArrowRightIcon />}\n aria-label={rowActionAriaLabel || `${label} row action`}\n className={styles.actionButton}\n />\n )}\n </FlexRow>\n )}\n </GridListItem>\n );\n}\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;AAaM,SAAU,QAAQ,CAAC,EACvB,EAAE,EACF,KAAK,EACL,IAAI,EACJ,UAAU,GAAG,SAAS,EACtB,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,GAAG,KAAK,EAC3B,GAAG,KAAK,EACM,EAAA;AACd,IAAA,MAAM,UAAU,GAAG,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AAErD,IAAA,QACEA,cAAC,CAAA,aAAA,CAAA,YAAY,IACX,EAAE,EAAE,UAAU,EACd,SAAS,EAAE,KAAK,EAChB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,eAAe,CAAC;AACzB,YAAA,UAAU,CAAC,IAAI;AACf,YAAA,UAAU,CAAC,CAAA,WAAA,EAAc,UAAU,CAAA,CAAE,CAAC;YACtC,SAAS;SACV,CAAC,EAAA,GACE,KAAK,EAAA,EAGR,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAA2B,MACjFA,cAAA,CAAA,aAAA,CAAC,OAAO,EAAA,EAAC,QAAQ,EAAC,QAAQ,EAAC,cAAc,EAAC,eAAe,EAAA;AACvD,QAAAA,cAAA,CAAA,aAAA,CAAC,WAAW,EACV,EAAA,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EACrB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAC,MAAM,EAAA,GACX,KAAK,EACT,CAAA;AACD,QAAA,gBAAgB;AACf;;AAEG;AACH,QAAAA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EACL,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,mBAAmB,EAC7B,aAAa,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,eAAe,EAAE,EACjD,SAAS,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,eAAe,EAAE,EAC7C,OAAO,EAAC,MAAM,EACd,QAAQ,EAAEA,cAAC,CAAA,aAAA,CAAA,cAAc,EAAG,IAAA,CAAA,EAAA,YAAA,EAChB,kBAAkB,IAAI,CAAG,EAAA,KAAK,CAAa,WAAA,CAAA,EACvD,SAAS,EAAE,MAAM,CAAC,YAAY,EAAA,CAC9B,CACH,CACO,CACX,CACY;AAEnB;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ___$insertStyle = require('../../../../_virtual/____insertStyle.cjs');
|
|
4
|
+
|
|
5
|
+
___$insertStyle("._actionButton_bip91_1:hover {\n outline: solid var(--sizes-xs) var(--colors-secondary-blue-light);\n}");
|
|
6
|
+
var styles = {"actionButton":"_actionButton_bip91_1"};
|
|
7
|
+
|
|
8
|
+
module.exports = styles;
|
|
9
|
+
//# sourceMappingURL=GridItem.module.scss.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridItem.module.scss.cjs","sources":["../../../../../src/components/SelectDropdown/components/GridItem/GridItem.module.scss"],"sourcesContent":[".actionButton {\n &:hover {\n outline: solid var(--sizes-xs) var(--colors-secondary-blue-light);\n }\n}\n"],"names":[],"mappings":";;;;AAEI,eAAA,CAAA,yGAAA;;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import insertStyle from '../../../../_virtual/____insertStyle.js';
|
|
2
|
+
|
|
3
|
+
insertStyle("._actionButton_bip91_1:hover {\n outline: solid var(--sizes-xs) var(--colors-secondary-blue-light);\n}");
|
|
4
|
+
var styles = {"actionButton":"_actionButton_bip91_1"};
|
|
5
|
+
|
|
6
|
+
export { styles as default };
|
|
7
|
+
//# sourceMappingURL=GridItem.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridItem.module.scss.js","sources":["../../../../../src/components/SelectDropdown/components/GridItem/GridItem.module.scss"],"sourcesContent":[".actionButton {\n &:hover {\n outline: solid var(--sizes-xs) var(--colors-secondary-blue-light);\n }\n}\n"],"names":["___$insertStyle"],"mappings":";;AAEIA,WAAA,CAAA,yGAAA;;;;;"}
|
|
@@ -17,7 +17,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
17
17
|
|
|
18
18
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
19
19
|
|
|
20
|
-
const ItemContent = ({ label, hint, itemInfoSlot, endInfoSlot, alert, mediaSlot, allowsDragging = false, selectionMode = 'single', isLink, isSelected = false, itemType, }) => {
|
|
20
|
+
const ItemContent = ({ label, hint, itemInfoSlot, endInfoSlot, alert, mediaSlot, allowsDragging = false, selectionMode = 'single', isLink, isSelected = false, isHovered = false, itemType, }) => {
|
|
21
21
|
const infoContainerClassNames = React.useMemo(() => {
|
|
22
22
|
const base = ItemContent_module.infoContainer;
|
|
23
23
|
if (itemInfoSlot && endInfoSlot) {
|
|
@@ -38,12 +38,12 @@ const ItemContent = ({ label, hint, itemInfoSlot, endInfoSlot, alert, mediaSlot,
|
|
|
38
38
|
mediaSlot,
|
|
39
39
|
React__default.default.createElement(FlexCol.FlexCol, { gap: "xs", style: { flexGrow: 1 } },
|
|
40
40
|
React__default.default.createElement("div", { className: infoContainerClassNames, "data-testid": "info-container" },
|
|
41
|
-
itemType === 'grid' ? (React__default.default.createElement(Text.Text, { variant:
|
|
42
|
-
React__default.default.createElement(Text.Text, { variant:
|
|
41
|
+
itemType === 'grid' ? (React__default.default.createElement(Text.Text, { variant: isHovered ? 'bodyBold' : 'body' }, label)) : (React__default.default.createElement(reactAriaComponents.Text, { slot: "label" },
|
|
42
|
+
React__default.default.createElement(Text.Text, { variant: isHovered ? 'bodyBold' : 'body' }, label))),
|
|
43
43
|
itemInfoSlot,
|
|
44
44
|
endInfoSlot && (React__default.default.createElement("div", { className: endInfoSlot ? ItemContent_module.justifyEnd : ItemContent_module.justifyStart }, endInfoSlot))),
|
|
45
45
|
hint && (React__default.default.createElement(reactAriaComponents.Text, { slot: "description" },
|
|
46
|
-
React__default.default.createElement(Text.Text, { variant: "
|
|
46
|
+
React__default.default.createElement(Text.Text, { variant: "body" }, hint))),
|
|
47
47
|
alert && React__default.default.createElement(MiniAlert.MiniAlert, { title: alert.title, variant: alert.variant }))),
|
|
48
48
|
isLink && React__default.default.createElement(ArrowRightIcon.ReactComponent, { className: ItemContent_module.linkIcon, "data-testid": "link-icon" })));
|
|
49
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemContent.cjs","sources":["../../../../../src/components/SelectDropdown/components/ItemContent/ItemContent.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 { ItemContentProps } from './types';\nimport { Text as VeeqoText } from '../../../Text';\nimport { MiniAlert } from '../../../Alerts/MiniAlert';\nimport { SelectionType } from './SelectionType';\nimport styles from './ItemContent.module.scss';\nimport { FlexRow } from '../../../Flex/FlexRow';\n\nexport const ItemContent = ({\n label,\n hint,\n itemInfoSlot,\n endInfoSlot,\n alert,\n mediaSlot,\n allowsDragging = false,\n selectionMode = 'single',\n isLink,\n isSelected = false,\n itemType,\n}: ItemContentProps) => {\n const infoContainerClassNames = 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\n flexWrap=\"nowrap\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n gap=\"base\"\n style={{ flexGrow: 1 }}\n >\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={infoContainerClassNames} data-testid=\"info-container\">\n {itemType === 'grid' ? (\n <VeeqoText variant
|
|
1
|
+
{"version":3,"file":"ItemContent.cjs","sources":["../../../../../src/components/SelectDropdown/components/ItemContent/ItemContent.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 { ItemContentProps } from './types';\nimport { Text as VeeqoText } from '../../../Text';\nimport { MiniAlert } from '../../../Alerts/MiniAlert';\nimport { SelectionType } from './SelectionType';\nimport styles from './ItemContent.module.scss';\nimport { FlexRow } from '../../../Flex/FlexRow';\n\nexport const ItemContent = ({\n label,\n hint,\n itemInfoSlot,\n endInfoSlot,\n alert,\n mediaSlot,\n allowsDragging = false,\n selectionMode = 'single',\n isLink,\n isSelected = false,\n isHovered = false,\n itemType,\n}: ItemContentProps) => {\n const infoContainerClassNames = 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\n flexWrap=\"nowrap\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n gap=\"base\"\n style={{ flexGrow: 1 }}\n >\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={infoContainerClassNames} data-testid=\"info-container\">\n {itemType === 'grid' ? (\n <VeeqoText variant={isHovered ? 'bodyBold' : 'body'}>{label}</VeeqoText>\n ) : (\n <Text slot=\"label\">\n <VeeqoText variant={isHovered ? 'bodyBold' : 'body'}>{label}</VeeqoText>\n </Text>\n )}\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=\"body\">{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":["useMemo","styles","buildClassnames","React","FlexRow","DragIndicatorIcon","SelectionType","FlexCol","VeeqoText","Text","MiniAlert","ArrowRightIcon"],"mappings":"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"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ItemContentProps } from './types';
|
|
3
|
-
export declare const ItemContent: ({ label, hint, itemInfoSlot, endInfoSlot, alert, mediaSlot, allowsDragging, selectionMode, isLink, isSelected, itemType, }: ItemContentProps) => React.JSX.Element;
|
|
3
|
+
export declare const ItemContent: ({ label, hint, itemInfoSlot, endInfoSlot, alert, mediaSlot, allowsDragging, selectionMode, isLink, isSelected, isHovered, itemType, }: ItemContentProps) => React.JSX.Element;
|
|
@@ -11,7 +11,7 @@ import { SelectionType } from './SelectionType.js';
|
|
|
11
11
|
import styles from './ItemContent.module.scss.js';
|
|
12
12
|
import { FlexRow } from '../../../Flex/FlexRow/FlexRow.js';
|
|
13
13
|
|
|
14
|
-
const ItemContent = ({ label, hint, itemInfoSlot, endInfoSlot, alert, mediaSlot, allowsDragging = false, selectionMode = 'single', isLink, isSelected = false, itemType, }) => {
|
|
14
|
+
const ItemContent = ({ label, hint, itemInfoSlot, endInfoSlot, alert, mediaSlot, allowsDragging = false, selectionMode = 'single', isLink, isSelected = false, isHovered = false, itemType, }) => {
|
|
15
15
|
const infoContainerClassNames = useMemo(() => {
|
|
16
16
|
const base = styles.infoContainer;
|
|
17
17
|
if (itemInfoSlot && endInfoSlot) {
|
|
@@ -32,12 +32,12 @@ const ItemContent = ({ label, hint, itemInfoSlot, endInfoSlot, alert, mediaSlot,
|
|
|
32
32
|
mediaSlot,
|
|
33
33
|
React__default.createElement(FlexCol, { gap: "xs", style: { flexGrow: 1 } },
|
|
34
34
|
React__default.createElement("div", { className: infoContainerClassNames, "data-testid": "info-container" },
|
|
35
|
-
itemType === 'grid' ? (React__default.createElement(Text, { variant:
|
|
36
|
-
React__default.createElement(Text, { variant:
|
|
35
|
+
itemType === 'grid' ? (React__default.createElement(Text, { variant: isHovered ? 'bodyBold' : 'body' }, label)) : (React__default.createElement(Text$1, { slot: "label" },
|
|
36
|
+
React__default.createElement(Text, { variant: isHovered ? 'bodyBold' : 'body' }, label))),
|
|
37
37
|
itemInfoSlot,
|
|
38
38
|
endInfoSlot && (React__default.createElement("div", { className: endInfoSlot ? styles.justifyEnd : styles.justifyStart }, endInfoSlot))),
|
|
39
39
|
hint && (React__default.createElement(Text$1, { slot: "description" },
|
|
40
|
-
React__default.createElement(Text, { variant: "
|
|
40
|
+
React__default.createElement(Text, { variant: "body" }, hint))),
|
|
41
41
|
alert && React__default.createElement(MiniAlert, { title: alert.title, variant: alert.variant }))),
|
|
42
42
|
isLink && React__default.createElement(ArrowRightIcon, { className: styles.linkIcon, "data-testid": "link-icon" })));
|
|
43
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemContent.js","sources":["../../../../../src/components/SelectDropdown/components/ItemContent/ItemContent.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 { ItemContentProps } from './types';\nimport { Text as VeeqoText } from '../../../Text';\nimport { MiniAlert } from '../../../Alerts/MiniAlert';\nimport { SelectionType } from './SelectionType';\nimport styles from './ItemContent.module.scss';\nimport { FlexRow } from '../../../Flex/FlexRow';\n\nexport const ItemContent = ({\n label,\n hint,\n itemInfoSlot,\n endInfoSlot,\n alert,\n mediaSlot,\n allowsDragging = false,\n selectionMode = 'single',\n isLink,\n isSelected = false,\n itemType,\n}: ItemContentProps) => {\n const infoContainerClassNames = 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\n flexWrap=\"nowrap\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n gap=\"base\"\n style={{ flexGrow: 1 }}\n >\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={infoContainerClassNames} data-testid=\"info-container\">\n {itemType === 'grid' ? (\n <VeeqoText variant
|
|
1
|
+
{"version":3,"file":"ItemContent.js","sources":["../../../../../src/components/SelectDropdown/components/ItemContent/ItemContent.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 { ItemContentProps } from './types';\nimport { Text as VeeqoText } from '../../../Text';\nimport { MiniAlert } from '../../../Alerts/MiniAlert';\nimport { SelectionType } from './SelectionType';\nimport styles from './ItemContent.module.scss';\nimport { FlexRow } from '../../../Flex/FlexRow';\n\nexport const ItemContent = ({\n label,\n hint,\n itemInfoSlot,\n endInfoSlot,\n alert,\n mediaSlot,\n allowsDragging = false,\n selectionMode = 'single',\n isLink,\n isSelected = false,\n isHovered = false,\n itemType,\n}: ItemContentProps) => {\n const infoContainerClassNames = 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\n flexWrap=\"nowrap\"\n justifyContent=\"space-between\"\n alignItems=\"center\"\n gap=\"base\"\n style={{ flexGrow: 1 }}\n >\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={infoContainerClassNames} data-testid=\"info-container\">\n {itemType === 'grid' ? (\n <VeeqoText variant={isHovered ? 'bodyBold' : 'body'}>{label}</VeeqoText>\n ) : (\n <Text slot=\"label\">\n <VeeqoText variant={isHovered ? 'bodyBold' : 'body'}>{label}</VeeqoText>\n </Text>\n )}\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=\"body\">{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","Text"],"mappings":"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"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var ___$insertStyle = require('../../../../_virtual/____insertStyle.cjs');
|
|
4
4
|
|
|
5
|
-
___$insertStyle(".
|
|
6
|
-
var styles = {"infoContainer":"
|
|
5
|
+
___$insertStyle("._infoContainer_1oi71_1 {\n display: grid;\n gap: var(--sizes-sm);\n width: 100%;\n align-items: center;\n min-width: 0;\n flex: 1;\n}\n._infoContainer_1oi71_1._hasItemInfoAndEndInfo_1oi71_9 {\n grid-template-columns: auto 1fr 1fr;\n}\n._infoContainer_1oi71_1._hasItemInfoAndEndInfo_1oi71_9 span {\n font-size: var(--text-body-font-size);\n}\n._infoContainer_1oi71_1._hasItemInfoOnly_1oi71_15, ._infoContainer_1oi71_1._hasEndInfoOnly_1oi71_15 {\n grid-template-columns: auto 1fr;\n}\n._infoContainer_1oi71_1._hasItemInfoOnly_1oi71_15 span, ._infoContainer_1oi71_1._hasEndInfoOnly_1oi71_15 span {\n font-size: var(--text-body-font-size);\n}\n._infoContainer_1oi71_1 > *:last-child._justifyEnd_1oi71_21 {\n justify-self: end;\n}\n._infoContainer_1oi71_1 > *:last-child._justifyStart_1oi71_24 {\n justify-self: start;\n}\n\n._linkIcon_1oi71_28 {\n color: var(--colors-neutral-ink-base);\n}");
|
|
6
|
+
var styles = {"infoContainer":"_infoContainer_1oi71_1","hasItemInfoAndEndInfo":"_hasItemInfoAndEndInfo_1oi71_9","hasItemInfoOnly":"_hasItemInfoOnly_1oi71_15","hasEndInfoOnly":"_hasEndInfoOnly_1oi71_15","justifyEnd":"_justifyEnd_1oi71_21","justifyStart":"_justifyStart_1oi71_24","linkIcon":"_linkIcon_1oi71_28"};
|
|
7
7
|
|
|
8
8
|
module.exports = styles;
|
|
9
9
|
//# sourceMappingURL=ItemContent.module.scss.cjs.map
|
package/dist/components/SelectDropdown/components/ItemContent/ItemContent.module.scss.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemContent.module.scss.cjs","sources":["../../../../../src/components/SelectDropdown/components/ItemContent/ItemContent.module.scss"],"sourcesContent":[".infoContainer {\n display: grid;\n gap: var(--sizes-sm);\n width: 100%;\n align-items: center;\n min-width: 0;\n flex: 1;\n\n &.hasItemInfoAndEndInfo {\n grid-template-columns: auto 1fr 1fr;\n }\n\n &.hasItemInfoOnly,\n &.hasEndInfoOnly {\n grid-template-columns: auto 1fr;\n }\n\n > *:last-child {\n &.justifyEnd {\n justify-self: end;\n }\n\n &.justifyStart {\n justify-self: start;\n }\n }\n}\n\n.linkIcon {\n color: var(--colors-neutral-ink-base);\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"ItemContent.module.scss.cjs","sources":["../../../../../src/components/SelectDropdown/components/ItemContent/ItemContent.module.scss"],"sourcesContent":[".infoContainer {\n display: grid;\n gap: var(--sizes-sm);\n width: 100%;\n align-items: center;\n min-width: 0;\n flex: 1;\n\n &.hasItemInfoAndEndInfo {\n grid-template-columns: auto 1fr 1fr;\n\n span {\n font-size: var(--text-body-font-size);\n }\n }\n\n &.hasItemInfoOnly,\n &.hasEndInfoOnly {\n grid-template-columns: auto 1fr;\n\n span {\n font-size: var(--text-body-font-size);\n }\n }\n\n > *:last-child {\n &.justifyEnd {\n justify-self: end;\n }\n\n &.justifyStart {\n justify-self: start;\n }\n }\n}\n\n.linkIcon {\n color: var(--colors-neutral-ink-base);\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,q4BAAA;AACA,aAAA,CAAA,eAAA,CAAA,wBAAA,CAAA,uBAAA,CAAA,gCAAA,CAAA,iBAAA,CAAA,2BAAA,CAAA,gBAAA,CAAA,0BAAA,CAAA,YAAA,CAAA,sBAAA,CAAA,cAAA,CAAA,wBAAA,CAAA,UAAA,CAAA,oBAAA;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import insertStyle from '../../../../_virtual/____insertStyle.js';
|
|
2
2
|
|
|
3
|
-
insertStyle(".
|
|
4
|
-
var styles = {"infoContainer":"
|
|
3
|
+
insertStyle("._infoContainer_1oi71_1 {\n display: grid;\n gap: var(--sizes-sm);\n width: 100%;\n align-items: center;\n min-width: 0;\n flex: 1;\n}\n._infoContainer_1oi71_1._hasItemInfoAndEndInfo_1oi71_9 {\n grid-template-columns: auto 1fr 1fr;\n}\n._infoContainer_1oi71_1._hasItemInfoAndEndInfo_1oi71_9 span {\n font-size: var(--text-body-font-size);\n}\n._infoContainer_1oi71_1._hasItemInfoOnly_1oi71_15, ._infoContainer_1oi71_1._hasEndInfoOnly_1oi71_15 {\n grid-template-columns: auto 1fr;\n}\n._infoContainer_1oi71_1._hasItemInfoOnly_1oi71_15 span, ._infoContainer_1oi71_1._hasEndInfoOnly_1oi71_15 span {\n font-size: var(--text-body-font-size);\n}\n._infoContainer_1oi71_1 > *:last-child._justifyEnd_1oi71_21 {\n justify-self: end;\n}\n._infoContainer_1oi71_1 > *:last-child._justifyStart_1oi71_24 {\n justify-self: start;\n}\n\n._linkIcon_1oi71_28 {\n color: var(--colors-neutral-ink-base);\n}");
|
|
4
|
+
var styles = {"infoContainer":"_infoContainer_1oi71_1","hasItemInfoAndEndInfo":"_hasItemInfoAndEndInfo_1oi71_9","hasItemInfoOnly":"_hasItemInfoOnly_1oi71_15","hasEndInfoOnly":"_hasEndInfoOnly_1oi71_15","justifyEnd":"_justifyEnd_1oi71_21","justifyStart":"_justifyStart_1oi71_24","linkIcon":"_linkIcon_1oi71_28"};
|
|
5
5
|
|
|
6
6
|
export { styles as default };
|
|
7
7
|
//# sourceMappingURL=ItemContent.module.scss.js.map
|
package/dist/components/SelectDropdown/components/ItemContent/ItemContent.module.scss.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemContent.module.scss.js","sources":["../../../../../src/components/SelectDropdown/components/ItemContent/ItemContent.module.scss"],"sourcesContent":[".infoContainer {\n display: grid;\n gap: var(--sizes-sm);\n width: 100%;\n align-items: center;\n min-width: 0;\n flex: 1;\n\n &.hasItemInfoAndEndInfo {\n grid-template-columns: auto 1fr 1fr;\n }\n\n &.hasItemInfoOnly,\n &.hasEndInfoOnly {\n grid-template-columns: auto 1fr;\n }\n\n > *:last-child {\n &.justifyEnd {\n justify-self: end;\n }\n\n &.justifyStart {\n justify-self: start;\n }\n }\n}\n\n.linkIcon {\n color: var(--colors-neutral-ink-base);\n}\n"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"ItemContent.module.scss.js","sources":["../../../../../src/components/SelectDropdown/components/ItemContent/ItemContent.module.scss"],"sourcesContent":[".infoContainer {\n display: grid;\n gap: var(--sizes-sm);\n width: 100%;\n align-items: center;\n min-width: 0;\n flex: 1;\n\n &.hasItemInfoAndEndInfo {\n grid-template-columns: auto 1fr 1fr;\n\n span {\n font-size: var(--text-body-font-size);\n }\n }\n\n &.hasItemInfoOnly,\n &.hasEndInfoOnly {\n grid-template-columns: auto 1fr;\n\n span {\n font-size: var(--text-body-font-size);\n }\n }\n\n > *:last-child {\n &.justifyEnd {\n justify-self: end;\n }\n\n &.justifyStart {\n justify-self: start;\n }\n }\n}\n\n.linkIcon {\n color: var(--colors-neutral-ink-base);\n}\n"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,q4BAAA;AACA,aAAA,CAAA,eAAA,CAAA,wBAAA,CAAA,uBAAA,CAAA,gCAAA,CAAA,iBAAA,CAAA,2BAAA,CAAA,gBAAA,CAAA,0BAAA,CAAA,YAAA,CAAA,sBAAA,CAAA,cAAA,CAAA,wBAAA,CAAA,UAAA,CAAA,oBAAA;;;;"}
|
|
@@ -6,6 +6,8 @@ export type ItemContentProps = BaseItemProps & {
|
|
|
6
6
|
selectionMode?: 'single' | 'multiple' | 'none';
|
|
7
7
|
/** shows item in selected state */
|
|
8
8
|
isSelected?: boolean;
|
|
9
|
+
/** shows item in hovered state */
|
|
10
|
+
isHovered?: boolean;
|
|
9
11
|
/** Renders icon to indicate item is a link */
|
|
10
12
|
isLink?: boolean;
|
|
11
13
|
/** type of item */
|
|
@@ -16,7 +16,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
16
16
|
|
|
17
17
|
const ListItem = ({ id, label, href, appearance = 'primary', className, ...props }) => {
|
|
18
18
|
const idComputed = useId.useId({ id, prefix: 'list-item' });
|
|
19
|
-
return (React__default.default.createElement(reactAriaComponents.ListBoxItem, { id: idComputed, textValue: label, href: href, className: buildClassnames.buildClassnames([item_module.item, item_module[`appearance-${appearance}`], className]), ...props }, ({ selectionMode, allowsDragging, isSelected }) => (React__default.default.createElement(ItemContent.ItemContent, { selectionMode: selectionMode, allowsDragging: allowsDragging, isSelected: isSelected, label: label, isLink: Boolean(href), appearance: appearance, itemType: "list", ...props }))));
|
|
19
|
+
return (React__default.default.createElement(reactAriaComponents.ListBoxItem, { id: idComputed, textValue: label, href: href, className: buildClassnames.buildClassnames([item_module.item, item_module[`appearance-${appearance}`], className]), ...props }, ({ selectionMode, allowsDragging, isSelected, isHovered }) => (React__default.default.createElement(ItemContent.ItemContent, { selectionMode: selectionMode, allowsDragging: allowsDragging, isSelected: isSelected, isHovered: isHovered, label: label, isLink: Boolean(href), appearance: appearance, itemType: "list", ...props }))));
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
exports.ListItem = ListItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.cjs","sources":["../../../../../src/components/SelectDropdown/components/ListItem/ListItem.tsx"],"sourcesContent":["import React from 'react';\nimport { ListBoxItem, ListBoxItemRenderProps } from 'react-aria-components';\nimport { useId } from '../../../../hooks';\nimport { ListItemProps } from './types';\nimport { ItemContent } from '../ItemContent';\nimport { buildClassnames } from '../../../../utils';\n\nimport styles from '../item.module.scss';\n\nexport const ListItem = ({\n id,\n label,\n href,\n appearance = 'primary',\n className,\n ...props\n}: ListItemProps) => {\n const idComputed = useId({ id, prefix: 'list-item' });\n\n return (\n <ListBoxItem\n id={idComputed}\n textValue={label}\n href={href}\n className={buildClassnames([styles.item, styles[`appearance-${appearance}`], className])}\n {...props}\n >\n {/* use react aria's render props to add more such as isHovered */}\n {({ selectionMode, allowsDragging, isSelected }: ListBoxItemRenderProps) => (\n <ItemContent\n selectionMode={selectionMode}\n allowsDragging={allowsDragging}\n isSelected={isSelected}\n label={label}\n isLink={Boolean(href)}\n appearance={appearance}\n itemType=\"list\"\n {...props}\n />\n )}\n </ListBoxItem>\n );\n};\n"],"names":["useId","React","ListBoxItem","buildClassnames","styles","ItemContent"],"mappings":";;;;;;;;;;;;;;;;MASa,QAAQ,GAAG,CAAC,EACvB,EAAE,EACF,KAAK,EACL,IAAI,EACJ,UAAU,GAAG,SAAS,EACtB,SAAS,EACT,GAAG,KAAK,EACM,KAAI;AAClB,IAAA,MAAM,UAAU,GAAGA,WAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"ListItem.cjs","sources":["../../../../../src/components/SelectDropdown/components/ListItem/ListItem.tsx"],"sourcesContent":["import React from 'react';\nimport { ListBoxItem, ListBoxItemRenderProps } from 'react-aria-components';\nimport { useId } from '../../../../hooks';\nimport { ListItemProps } from './types';\nimport { ItemContent } from '../ItemContent';\nimport { buildClassnames } from '../../../../utils';\n\nimport styles from '../item.module.scss';\n\nexport const ListItem = ({\n id,\n label,\n href,\n appearance = 'primary',\n className,\n ...props\n}: ListItemProps) => {\n const idComputed = useId({ id, prefix: 'list-item' });\n\n return (\n <ListBoxItem\n id={idComputed}\n textValue={label}\n href={href}\n className={buildClassnames([styles.item, styles[`appearance-${appearance}`], className])}\n {...props}\n >\n {/* use react aria's render props to add more such as isHovered */}\n {({ selectionMode, allowsDragging, isSelected, isHovered }: ListBoxItemRenderProps) => (\n <ItemContent\n selectionMode={selectionMode}\n allowsDragging={allowsDragging}\n isSelected={isSelected}\n isHovered={isHovered}\n label={label}\n isLink={Boolean(href)}\n appearance={appearance}\n itemType=\"list\"\n {...props}\n />\n )}\n </ListBoxItem>\n );\n};\n"],"names":["useId","React","ListBoxItem","buildClassnames","styles","ItemContent"],"mappings":";;;;;;;;;;;;;;;;MASa,QAAQ,GAAG,CAAC,EACvB,EAAE,EACF,KAAK,EACL,IAAI,EACJ,UAAU,GAAG,SAAS,EACtB,SAAS,EACT,GAAG,KAAK,EACM,KAAI;AAClB,IAAA,MAAM,UAAU,GAAGA,WAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IAErD,QACEC,qCAACC,+BAAW,EAAA,EACV,EAAE,EAAE,UAAU,EACd,SAAS,EAAE,KAAK,EAChB,IAAI,EAAE,IAAI,EACV,SAAS,EAAEC,+BAAe,CAAC,CAACC,WAAM,CAAC,IAAI,EAAEA,WAAM,CAAC,CAAA,WAAA,EAAc,UAAU,CAAE,CAAA,CAAC,EAAE,SAAS,CAAC,CAAC,EACpF,GAAA,KAAK,IAGR,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAA0B,MAChFH,sBAAA,CAAA,aAAA,CAACI,uBAAW,EACV,EAAA,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EACrB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAC,MAAM,EAAA,GACX,KAAK,EACT,CAAA,CACH,CACW;AAElB;;;;"}
|
|
@@ -6,11 +6,11 @@ import 'lodash.throttle';
|
|
|
6
6
|
import { ItemContent } from '../ItemContent/ItemContent.js';
|
|
7
7
|
import { buildClassnames } from '../../../../utils/buildClassnames.js';
|
|
8
8
|
import 'uid/secure';
|
|
9
|
-
import
|
|
9
|
+
import itemStyles from '../item.module.scss.js';
|
|
10
10
|
|
|
11
11
|
const ListItem = ({ id, label, href, appearance = 'primary', className, ...props }) => {
|
|
12
12
|
const idComputed = useId({ id, prefix: 'list-item' });
|
|
13
|
-
return (React__default.createElement(ListBoxItem, { id: idComputed, textValue: label, href: href, className: buildClassnames([
|
|
13
|
+
return (React__default.createElement(ListBoxItem, { id: idComputed, textValue: label, href: href, className: buildClassnames([itemStyles.item, itemStyles[`appearance-${appearance}`], className]), ...props }, ({ selectionMode, allowsDragging, isSelected, isHovered }) => (React__default.createElement(ItemContent, { selectionMode: selectionMode, allowsDragging: allowsDragging, isSelected: isSelected, isHovered: isHovered, label: label, isLink: Boolean(href), appearance: appearance, itemType: "list", ...props }))));
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export { ListItem };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","sources":["../../../../../src/components/SelectDropdown/components/ListItem/ListItem.tsx"],"sourcesContent":["import React from 'react';\nimport { ListBoxItem, ListBoxItemRenderProps } from 'react-aria-components';\nimport { useId } from '../../../../hooks';\nimport { ListItemProps } from './types';\nimport { ItemContent } from '../ItemContent';\nimport { buildClassnames } from '../../../../utils';\n\nimport styles from '../item.module.scss';\n\nexport const ListItem = ({\n id,\n label,\n href,\n appearance = 'primary',\n className,\n ...props\n}: ListItemProps) => {\n const idComputed = useId({ id, prefix: 'list-item' });\n\n return (\n <ListBoxItem\n id={idComputed}\n textValue={label}\n href={href}\n className={buildClassnames([styles.item, styles[`appearance-${appearance}`], className])}\n {...props}\n >\n {/* use react aria's render props to add more such as isHovered */}\n {({ selectionMode, allowsDragging, isSelected }: ListBoxItemRenderProps) => (\n <ItemContent\n selectionMode={selectionMode}\n allowsDragging={allowsDragging}\n isSelected={isSelected}\n label={label}\n isLink={Boolean(href)}\n appearance={appearance}\n itemType=\"list\"\n {...props}\n />\n )}\n </ListBoxItem>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;MASa,QAAQ,GAAG,CAAC,EACvB,EAAE,EACF,KAAK,EACL,IAAI,EACJ,UAAU,GAAG,SAAS,EACtB,SAAS,EACT,GAAG,KAAK,EACM,KAAI;AAClB,IAAA,MAAM,UAAU,GAAG,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"ListItem.js","sources":["../../../../../src/components/SelectDropdown/components/ListItem/ListItem.tsx"],"sourcesContent":["import React from 'react';\nimport { ListBoxItem, ListBoxItemRenderProps } from 'react-aria-components';\nimport { useId } from '../../../../hooks';\nimport { ListItemProps } from './types';\nimport { ItemContent } from '../ItemContent';\nimport { buildClassnames } from '../../../../utils';\n\nimport styles from '../item.module.scss';\n\nexport const ListItem = ({\n id,\n label,\n href,\n appearance = 'primary',\n className,\n ...props\n}: ListItemProps) => {\n const idComputed = useId({ id, prefix: 'list-item' });\n\n return (\n <ListBoxItem\n id={idComputed}\n textValue={label}\n href={href}\n className={buildClassnames([styles.item, styles[`appearance-${appearance}`], className])}\n {...props}\n >\n {/* use react aria's render props to add more such as isHovered */}\n {({ selectionMode, allowsDragging, isSelected, isHovered }: ListBoxItemRenderProps) => (\n <ItemContent\n selectionMode={selectionMode}\n allowsDragging={allowsDragging}\n isSelected={isSelected}\n isHovered={isHovered}\n label={label}\n isLink={Boolean(href)}\n appearance={appearance}\n itemType=\"list\"\n {...props}\n />\n )}\n </ListBoxItem>\n );\n};\n"],"names":["React","styles"],"mappings":";;;;;;;;;;MASa,QAAQ,GAAG,CAAC,EACvB,EAAE,EACF,KAAK,EACL,IAAI,EACJ,UAAU,GAAG,SAAS,EACtB,SAAS,EACT,GAAG,KAAK,EACM,KAAI;AAClB,IAAA,MAAM,UAAU,GAAG,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IAErD,QACEA,6BAAC,WAAW,EAAA,EACV,EAAE,EAAE,UAAU,EACd,SAAS,EAAE,KAAK,EAChB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,eAAe,CAAC,CAACC,UAAM,CAAC,IAAI,EAAEA,UAAM,CAAC,CAAA,WAAA,EAAc,UAAU,CAAE,CAAA,CAAC,EAAE,SAAS,CAAC,CAAC,EACpF,GAAA,KAAK,IAGR,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAA0B,MAChFD,cAAA,CAAA,aAAA,CAAC,WAAW,EACV,EAAA,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EACrB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAC,MAAM,EAAA,GACX,KAAK,EACT,CAAA,CACH,CACW;AAElB;;;;"}
|
|
@@ -15,7 +15,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
16
|
|
|
17
17
|
const ListItemSection = ({ label, hint, itemInfoSlot, items, children, className, ...props }) => (React__default.default.createElement(reactAriaComponents.Section, { className: buildClassnames.buildClassnames([ListItemSection_module.section, className]), ...props },
|
|
18
|
-
React__default.default.createElement(reactAriaComponents.Header,
|
|
18
|
+
React__default.default.createElement(reactAriaComponents.Header, { className: ListItemSection_module.sectionHeader },
|
|
19
19
|
React__default.default.createElement(FlexCol.FlexCol, { gap: "xs" },
|
|
20
20
|
React__default.default.createElement(FlexRow.FlexRow, null,
|
|
21
21
|
React__default.default.createElement(Text.Text, { variant: "body" }, label),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemSection.cjs","sources":["../../../../../src/components/SelectDropdown/components/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 { buildClassnames } from '../../../../utils';\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 className,\n ...props\n}: ListItemSectionProps) => (\n <Section className={buildClassnames([styles.section, className])} {...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","buildClassnames","styles","Header","FlexCol","FlexRow","VeeqoText","Collection","ListItem"],"mappings":";;;;;;;;;;;;;;;;AAiBa,MAAA,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACa,MACrBA,qCAACC,2BAAO,EAAA,EAAC,SAAS,EAAEC,+BAAe,CAAC,CAACC,sBAAM,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,KAAM,KAAK,EAAA;AACzE,IAAAH,sBAAA,CAAA,aAAA,CAACI,0BAAM,EAAA,
|
|
1
|
+
{"version":3,"file":"ListItemSection.cjs","sources":["../../../../../src/components/SelectDropdown/components/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 { buildClassnames } from '../../../../utils';\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 className,\n ...props\n}: ListItemSectionProps) => (\n <Section className={buildClassnames([styles.section, className])} {...props}>\n <Header className={styles.sectionHeader}>\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","buildClassnames","styles","Header","FlexCol","FlexRow","VeeqoText","Collection","ListItem"],"mappings":";;;;;;;;;;;;;;;;AAiBa,MAAA,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACa,MACrBA,qCAACC,2BAAO,EAAA,EAAC,SAAS,EAAEC,+BAAe,CAAC,CAACC,sBAAM,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,KAAM,KAAK,EAAA;AACzE,IAAAH,sBAAA,CAAA,aAAA,CAACI,0BAAM,EAAC,EAAA,SAAS,EAAED,sBAAM,CAAC,aAAa,EAAA;AACrC,QAAAH,sBAAA,CAAA,aAAA,CAACK,eAAO,EAAA,EAAC,GAAG,EAAC,IAAI,EAAA;AACf,YAAAL,sBAAA,CAAA,aAAA,CAACM,eAAO,EAAA,IAAA;AACN,gBAAAN,sBAAA,CAAA,aAAA,CAACO,SAAS,EAAC,EAAA,OAAO,EAAC,MAAM,EAAA,EAAE,KAAK,CAAa;AAC5C,gBAAA,YAAY,CACL;YACT,IAAI,IAAIP,sBAAC,CAAA,aAAA,CAAAO,SAAS,EAAC,EAAA,OAAO,EAAC,UAAU,EAAE,EAAA,IAAI,CAAa,CACjD,CACH;IACR,QAAQ;IACR,KAAK,KACJP,sBAAC,CAAA,aAAA,CAAAQ,8BAAU,IAAC,KAAK,EAAE,KAAK,EAAA,EAAG,CAAC,IAAmB,KAAKR,sBAAC,CAAA,aAAA,CAAAS,iBAAQ,EAAK,EAAA,GAAA,IAAI,GAAI,CAAc,CACzF,CACO;;;;"}
|
|
@@ -9,7 +9,7 @@ import 'uid/secure';
|
|
|
9
9
|
import styles from './ListItemSection.module.scss.js';
|
|
10
10
|
|
|
11
11
|
const ListItemSection = ({ label, hint, itemInfoSlot, items, children, className, ...props }) => (React__default.createElement(Section, { className: buildClassnames([styles.section, className]), ...props },
|
|
12
|
-
React__default.createElement(Header,
|
|
12
|
+
React__default.createElement(Header, { className: styles.sectionHeader },
|
|
13
13
|
React__default.createElement(FlexCol, { gap: "xs" },
|
|
14
14
|
React__default.createElement(FlexRow, null,
|
|
15
15
|
React__default.createElement(Text, { variant: "body" }, label),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemSection.js","sources":["../../../../../src/components/SelectDropdown/components/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 { buildClassnames } from '../../../../utils';\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 className,\n ...props\n}: ListItemSectionProps) => (\n <Section className={buildClassnames([styles.section, className])} {...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":";;;;;;;;;;AAiBa,MAAA,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACa,MACrBA,6BAAC,OAAO,EAAA,EAAC,SAAS,EAAE,eAAe,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,KAAM,KAAK,EAAA;AACzE,IAAAA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAA,
|
|
1
|
+
{"version":3,"file":"ListItemSection.js","sources":["../../../../../src/components/SelectDropdown/components/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 { buildClassnames } from '../../../../utils';\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 className,\n ...props\n}: ListItemSectionProps) => (\n <Section className={buildClassnames([styles.section, className])} {...props}>\n <Header className={styles.sectionHeader}>\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":";;;;;;;;;;AAiBa,MAAA,eAAe,GAAG,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACa,MACrBA,6BAAC,OAAO,EAAA,EAAC,SAAS,EAAE,eAAe,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,KAAM,KAAK,EAAA;AACzE,IAAAA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAC,EAAA,SAAS,EAAE,MAAM,CAAC,aAAa,EAAA;AACrC,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;;;;"}
|
package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.module.scss.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var ___$insertStyle = require('../../../../_virtual/____insertStyle.cjs');
|
|
4
4
|
|
|
5
|
-
___$insertStyle(".
|
|
6
|
-
var styles = {"section":"
|
|
5
|
+
___$insertStyle("._section_r14jl_1 {\n border-radius: var(--sizes-base);\n}\n\n._sectionHeader_r14jl_5 {\n min-height: var(--sizes-10);\n padding: var(--sizes-sm) var(--sizes-sm);\n}");
|
|
6
|
+
var styles = {"section":"_section_r14jl_1","sectionHeader":"_sectionHeader_r14jl_5"};
|
|
7
7
|
|
|
8
8
|
module.exports = styles;
|
|
9
9
|
//# sourceMappingURL=ListItemSection.module.scss.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemSection.module.scss.cjs","sources":["../../../../../src/components/SelectDropdown/components/ListItemSection/ListItemSection.module.scss"],"sourcesContent":[".section {\n border-radius: var(--sizes-base);\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"ListItemSection.module.scss.cjs","sources":["../../../../../src/components/SelectDropdown/components/ListItemSection/ListItemSection.module.scss"],"sourcesContent":[".section {\n border-radius: var(--sizes-base);\n}\n\n.sectionHeader {\n min-height: var(--sizes-10);\n padding: var(--sizes-sm) var(--sizes-sm);\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,0KAAA;;;;;"}
|
package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.module.scss.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import insertStyle from '../../../../_virtual/____insertStyle.js';
|
|
2
2
|
|
|
3
|
-
insertStyle(".
|
|
4
|
-
var styles = {"section":"
|
|
3
|
+
insertStyle("._section_r14jl_1 {\n border-radius: var(--sizes-base);\n}\n\n._sectionHeader_r14jl_5 {\n min-height: var(--sizes-10);\n padding: var(--sizes-sm) var(--sizes-sm);\n}");
|
|
4
|
+
var styles = {"section":"_section_r14jl_1","sectionHeader":"_sectionHeader_r14jl_5"};
|
|
5
5
|
|
|
6
6
|
export { styles as default };
|
|
7
7
|
//# sourceMappingURL=ListItemSection.module.scss.js.map
|
package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.module.scss.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemSection.module.scss.js","sources":["../../../../../src/components/SelectDropdown/components/ListItemSection/ListItemSection.module.scss"],"sourcesContent":[".section {\n border-radius: var(--sizes-base);\n}\n"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"ListItemSection.module.scss.js","sources":["../../../../../src/components/SelectDropdown/components/ListItemSection/ListItemSection.module.scss"],"sourcesContent":[".section {\n border-radius: var(--sizes-base);\n}\n\n.sectionHeader {\n min-height: var(--sizes-10);\n padding: var(--sizes-sm) var(--sizes-sm);\n}\n"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,0KAAA;;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var reactAriaComponents = require('react-aria-components');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var GridItem = require('../GridItem/GridItem.cjs');
|
|
6
|
+
var buildClassnames = require('../../../../utils/buildClassnames.cjs');
|
|
7
|
+
require('uid/secure');
|
|
8
|
+
var OptionsContainer_module = require('./OptionsContainer.module.scss.cjs');
|
|
9
|
+
var SelectDropdownState = require('../SelectDropdownState.cjs');
|
|
10
|
+
|
|
11
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
|
+
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
|
+
|
|
15
|
+
const GridList = ({ id, className, options, onSelectionChange, selectedValues, selectionMode, emptyStateSlot, isLoading = false, ariaDescribedBy, ariaLabelledBy, ...otherProps }) => (React__default.default.createElement(reactAriaComponents.GridList, { className: buildClassnames.buildClassnames([className, OptionsContainer_module.container]), selectionMode: selectionMode, items: options, onSelectionChange: onSelectionChange, selectedKeys: selectedValues.map((selectedValue) => selectedValue.id), renderEmptyState: () => (React__default.default.createElement(SelectDropdownState.SelectDropdownState, { isLoading: isLoading, emptyStateSlot: emptyStateSlot })), "aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== undefined ? ariaLabelledBy : `${id}-label`, "aria-describedby": ariaDescribedBy !== null && ariaDescribedBy !== undefined ? ariaDescribedBy : `${id}-hint`, ...otherProps }, (item) => React__default.default.createElement(GridItem.GridItem, { ...item })));
|
|
16
|
+
|
|
17
|
+
exports.GridList = GridList;
|
|
18
|
+
//# sourceMappingURL=GridList.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridList.cjs","sources":["../../../../../src/components/SelectDropdown/components/OptionsContainers/GridList.tsx"],"sourcesContent":["import { GridList as AriaGridList, Key } from 'react-aria-components';\nimport React from 'react';\nimport { GridItem } from '../GridItem';\nimport { GridListProps } from './types';\nimport { buildClassnames } from '../../../../utils';\n\nimport styles from './OptionsContainer.module.scss';\nimport { SelectDropdownState } from '../SelectDropdownState';\n\nexport const GridList = ({\n id,\n className,\n options,\n onSelectionChange,\n selectedValues,\n selectionMode,\n emptyStateSlot,\n isLoading = false,\n ariaDescribedBy,\n ariaLabelledBy,\n ...otherProps\n}: GridListProps) => (\n <AriaGridList\n className={buildClassnames([className, styles.container])}\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 aria-labelledby={ariaLabelledBy ?? `${id}-label`}\n aria-describedby={ariaDescribedBy ?? `${id}-hint`}\n {...otherProps}\n >\n {(item) => <GridItem {...item} />}\n </AriaGridList>\n);\n"],"names":["React","AriaGridList","buildClassnames","styles","SelectDropdownState","GridItem"],"mappings":";;;;;;;;;;;;;;AASO,MAAM,QAAQ,GAAG,CAAC,EACvB,EAAE,EACF,SAAS,EACT,OAAO,EACP,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,SAAS,GAAG,KAAK,EACjB,eAAe,EACf,cAAc,EACd,GAAG,UAAU,EACC,MACdA,sBAAA,CAAA,aAAA,CAACC,4BAAY,EAAA,EACX,SAAS,EAAEC,+BAAe,CAAC,CAAC,SAAS,EAAEC,uBAAM,CAAC,SAAS,CAAC,CAAC,EACzD,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,OAAO,EACd,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,aAAa,KAAK,aAAa,CAAC,EAAE,CAAU,EAC9E,gBAAgB,EAAE,OAChBH,sBAAC,CAAA,aAAA,CAAAI,uCAAmB,EAAC,EAAA,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAI,CAAA,CAC9E,qBACgB,cAAc,KAAA,IAAA,IAAd,cAAc,KAAA,SAAA,GAAd,cAAc,GAAI,CAAG,EAAA,EAAE,CAAQ,MAAA,CAAA,EAAA,kBAAA,EAC9B,eAAe,KAAA,IAAA,IAAf,eAAe,KAAA,SAAA,GAAf,eAAe,GAAI,GAAG,EAAE,CAAA,KAAA,CAAO,EAC7C,GAAA,UAAU,EAEb,EAAA,CAAC,IAAI,KAAKJ,sBAAC,CAAA,aAAA,CAAAK,iBAAQ,EAAK,EAAA,GAAA,IAAI,EAAI,CAAA,CACpB;;;;"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GridListProps } from './types';
|
|
3
|
+
export declare const GridList: ({ id, className, options, onSelectionChange, selectedValues, selectionMode, emptyStateSlot, isLoading, ariaDescribedBy, ariaLabelledBy, ...otherProps }: GridListProps) => React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GridList as GridList$1 } from 'react-aria-components';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { GridItem } from '../GridItem/GridItem.js';
|
|
4
|
+
import { buildClassnames } from '../../../../utils/buildClassnames.js';
|
|
5
|
+
import 'uid/secure';
|
|
6
|
+
import styles from './OptionsContainer.module.scss.js';
|
|
7
|
+
import { SelectDropdownState } from '../SelectDropdownState.js';
|
|
8
|
+
|
|
9
|
+
const GridList = ({ id, className, options, onSelectionChange, selectedValues, selectionMode, emptyStateSlot, isLoading = false, ariaDescribedBy, ariaLabelledBy, ...otherProps }) => (React__default.createElement(GridList$1, { className: buildClassnames([className, styles.container]), selectionMode: selectionMode, items: options, onSelectionChange: onSelectionChange, selectedKeys: selectedValues.map((selectedValue) => selectedValue.id), renderEmptyState: () => (React__default.createElement(SelectDropdownState, { isLoading: isLoading, emptyStateSlot: emptyStateSlot })), "aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== undefined ? ariaLabelledBy : `${id}-label`, "aria-describedby": ariaDescribedBy !== null && ariaDescribedBy !== undefined ? ariaDescribedBy : `${id}-hint`, ...otherProps }, (item) => React__default.createElement(GridItem, { ...item })));
|
|
10
|
+
|
|
11
|
+
export { GridList };
|
|
12
|
+
//# sourceMappingURL=GridList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridList.js","sources":["../../../../../src/components/SelectDropdown/components/OptionsContainers/GridList.tsx"],"sourcesContent":["import { GridList as AriaGridList, Key } from 'react-aria-components';\nimport React from 'react';\nimport { GridItem } from '../GridItem';\nimport { GridListProps } from './types';\nimport { buildClassnames } from '../../../../utils';\n\nimport styles from './OptionsContainer.module.scss';\nimport { SelectDropdownState } from '../SelectDropdownState';\n\nexport const GridList = ({\n id,\n className,\n options,\n onSelectionChange,\n selectedValues,\n selectionMode,\n emptyStateSlot,\n isLoading = false,\n ariaDescribedBy,\n ariaLabelledBy,\n ...otherProps\n}: GridListProps) => (\n <AriaGridList\n className={buildClassnames([className, styles.container])}\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 aria-labelledby={ariaLabelledBy ?? `${id}-label`}\n aria-describedby={ariaDescribedBy ?? `${id}-hint`}\n {...otherProps}\n >\n {(item) => <GridItem {...item} />}\n </AriaGridList>\n);\n"],"names":["React","AriaGridList"],"mappings":";;;;;;;;AASO,MAAM,QAAQ,GAAG,CAAC,EACvB,EAAE,EACF,SAAS,EACT,OAAO,EACP,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,SAAS,GAAG,KAAK,EACjB,eAAe,EACf,cAAc,EACd,GAAG,UAAU,EACC,MACdA,cAAA,CAAA,aAAA,CAACC,UAAY,EAAA,EACX,SAAS,EAAE,eAAe,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,EACzD,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,OAAO,EACd,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,aAAa,KAAK,aAAa,CAAC,EAAE,CAAU,EAC9E,gBAAgB,EAAE,OAChBD,cAAC,CAAA,aAAA,CAAA,mBAAmB,EAAC,EAAA,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAI,CAAA,CAC9E,qBACgB,cAAc,KAAA,IAAA,IAAd,cAAc,KAAA,SAAA,GAAd,cAAc,GAAI,CAAG,EAAA,EAAE,CAAQ,MAAA,CAAA,EAAA,kBAAA,EAC9B,eAAe,KAAA,IAAA,IAAf,eAAe,KAAA,SAAA,GAAf,eAAe,GAAI,GAAG,EAAE,CAAA,KAAA,CAAO,EAC7C,GAAA,UAAU,EAEb,EAAA,CAAC,IAAI,KAAKA,cAAC,CAAA,aAAA,CAAA,QAAQ,EAAK,EAAA,GAAA,IAAI,EAAI,CAAA,CACpB;;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var reactAriaComponents = require('react-aria-components');
|
|
5
|
+
var buildClassnames = require('../../../../utils/buildClassnames.cjs');
|
|
6
|
+
require('uid/secure');
|
|
7
|
+
var OptionsContainer_module = require('./OptionsContainer.module.scss.cjs');
|
|
8
|
+
var SelectDropdownState = require('../SelectDropdownState.cjs');
|
|
9
|
+
var ListItemSection = require('../ListItemSection/ListItemSection.cjs');
|
|
10
|
+
var ListItem = require('../ListItem/ListItem.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 ListBox = ({ id, className, ariaLabelledBy, ariaDescribedBy, selectionMode, options, onSelectionChange, selectedValues, isLoading = false, emptyStateSlot, hasSection, ...otherProps }) => (React__default.default.createElement(reactAriaComponents.ListBox, { className: buildClassnames.buildClassnames([className, OptionsContainer_module.container]), selectionMode: selectionMode, items: options, onSelectionChange: onSelectionChange, selectedKeys: selectedValues.map((selectedValue) => selectedValue.id), renderEmptyState: () => (React__default.default.createElement(SelectDropdownState.SelectDropdownState, { isLoading: isLoading, emptyStateSlot: emptyStateSlot })), "aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== undefined ? ariaLabelledBy : `${id}-label`, "aria-describedby": ariaDescribedBy !== null && ariaDescribedBy !== undefined ? ariaDescribedBy : `${id}-hint`, ...otherProps }, (item) => hasSection ? (React__default.default.createElement(ListItemSection.ListItemSection, { ...item })) : (React__default.default.createElement(ListItem.ListItem, { ...item }))));
|
|
17
|
+
|
|
18
|
+
exports.ListBox = ListBox;
|
|
19
|
+
//# sourceMappingURL=ListBox.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListBox.cjs","sources":["../../../../../src/components/SelectDropdown/components/OptionsContainers/ListBox.tsx"],"sourcesContent":["import React from 'react';\nimport { ListBox as AriaListBox, Key } from 'react-aria-components';\nimport { buildClassnames } from '../../../../utils';\n\nimport styles from './OptionsContainer.module.scss';\nimport { SelectDropdownState } from '../SelectDropdownState';\nimport { ListItemSection } from '../ListItemSection';\nimport { ListItem } from '../ListItem';\nimport { ListItemProps } from '../ListItem/types';\nimport { ListItemSectionProps } from '../ListItemSection/ListItemSection';\nimport { ListBoxProps } from './types';\n\nexport const ListBox = ({\n id,\n className,\n ariaLabelledBy,\n ariaDescribedBy,\n selectionMode,\n options,\n onSelectionChange,\n selectedValues,\n isLoading = false,\n emptyStateSlot,\n hasSection,\n ...otherProps\n}: ListBoxProps) => (\n <AriaListBox\n className={buildClassnames([className, styles.container])}\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 aria-labelledby={ariaLabelledBy ?? `${id}-label`}\n aria-describedby={ariaDescribedBy ?? `${id}-hint`}\n {...otherProps}\n >\n {(item) =>\n hasSection ? (\n <ListItemSection {...(item as ListItemSectionProps)} />\n ) : (\n <ListItem {...(item as ListItemProps)} />\n )\n }\n </AriaListBox>\n);\n"],"names":["React","AriaListBox","buildClassnames","styles","SelectDropdownState","ListItemSection","ListItem"],"mappings":";;;;;;;;;;;;;;;AAYO,MAAM,OAAO,GAAG,CAAC,EACtB,EAAE,EACF,SAAS,EACT,cAAc,EACd,eAAe,EACf,aAAa,EACb,OAAO,EACP,iBAAiB,EACjB,cAAc,EACd,SAAS,GAAG,KAAK,EACjB,cAAc,EACd,UAAU,EACV,GAAG,UAAU,EACA,MACbA,sBAAA,CAAA,aAAA,CAACC,2BAAW,EAAA,EACV,SAAS,EAAEC,+BAAe,CAAC,CAAC,SAAS,EAAEC,uBAAM,CAAC,SAAS,CAAC,CAAC,EACzD,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,OAAO,EACd,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,aAAa,KAAK,aAAa,CAAC,EAAE,CAAU,EAC9E,gBAAgB,EAAE,OAChBH,sBAAC,CAAA,aAAA,CAAAI,uCAAmB,EAAC,EAAA,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAA,CAAI,CAC9E,EAAA,iBAAA,EACgB,cAAc,KAAd,IAAA,IAAA,cAAc,KAAd,SAAA,GAAA,cAAc,GAAI,CAAG,EAAA,EAAE,CAAQ,MAAA,CAAA,EAAA,kBAAA,EAC9B,eAAe,KAAf,IAAA,IAAA,eAAe,KAAf,SAAA,GAAA,eAAe,GAAI,CAAA,EAAG,EAAE,CAAA,KAAA,CAAO,KAC7C,UAAU,EAAA,EAEb,CAAC,IAAI,KACJ,UAAU,IACRJ,sBAAC,CAAA,aAAA,CAAAK,+BAAe,OAAM,IAA6B,EAAA,CAAI,KAEvDL,sBAAC,CAAA,aAAA,CAAAM,iBAAQ,OAAM,IAAsB,EAAA,CAAI,CAC1C,CAES;;;;"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ListBoxProps } from './types';
|
|
3
|
+
export declare const ListBox: ({ id, className, ariaLabelledBy, ariaDescribedBy, selectionMode, options, onSelectionChange, selectedValues, isLoading, emptyStateSlot, hasSection, ...otherProps }: ListBoxProps) => React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { ListBox as ListBox$1 } from 'react-aria-components';
|
|
3
|
+
import { buildClassnames } from '../../../../utils/buildClassnames.js';
|
|
4
|
+
import 'uid/secure';
|
|
5
|
+
import styles from './OptionsContainer.module.scss.js';
|
|
6
|
+
import { SelectDropdownState } from '../SelectDropdownState.js';
|
|
7
|
+
import { ListItemSection } from '../ListItemSection/ListItemSection.js';
|
|
8
|
+
import { ListItem } from '../ListItem/ListItem.js';
|
|
9
|
+
|
|
10
|
+
const ListBox = ({ id, className, ariaLabelledBy, ariaDescribedBy, selectionMode, options, onSelectionChange, selectedValues, isLoading = false, emptyStateSlot, hasSection, ...otherProps }) => (React__default.createElement(ListBox$1, { className: buildClassnames([className, styles.container]), selectionMode: selectionMode, items: options, onSelectionChange: onSelectionChange, selectedKeys: selectedValues.map((selectedValue) => selectedValue.id), renderEmptyState: () => (React__default.createElement(SelectDropdownState, { isLoading: isLoading, emptyStateSlot: emptyStateSlot })), "aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== undefined ? ariaLabelledBy : `${id}-label`, "aria-describedby": ariaDescribedBy !== null && ariaDescribedBy !== undefined ? ariaDescribedBy : `${id}-hint`, ...otherProps }, (item) => hasSection ? (React__default.createElement(ListItemSection, { ...item })) : (React__default.createElement(ListItem, { ...item }))));
|
|
11
|
+
|
|
12
|
+
export { ListBox };
|
|
13
|
+
//# sourceMappingURL=ListBox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListBox.js","sources":["../../../../../src/components/SelectDropdown/components/OptionsContainers/ListBox.tsx"],"sourcesContent":["import React from 'react';\nimport { ListBox as AriaListBox, Key } from 'react-aria-components';\nimport { buildClassnames } from '../../../../utils';\n\nimport styles from './OptionsContainer.module.scss';\nimport { SelectDropdownState } from '../SelectDropdownState';\nimport { ListItemSection } from '../ListItemSection';\nimport { ListItem } from '../ListItem';\nimport { ListItemProps } from '../ListItem/types';\nimport { ListItemSectionProps } from '../ListItemSection/ListItemSection';\nimport { ListBoxProps } from './types';\n\nexport const ListBox = ({\n id,\n className,\n ariaLabelledBy,\n ariaDescribedBy,\n selectionMode,\n options,\n onSelectionChange,\n selectedValues,\n isLoading = false,\n emptyStateSlot,\n hasSection,\n ...otherProps\n}: ListBoxProps) => (\n <AriaListBox\n className={buildClassnames([className, styles.container])}\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 aria-labelledby={ariaLabelledBy ?? `${id}-label`}\n aria-describedby={ariaDescribedBy ?? `${id}-hint`}\n {...otherProps}\n >\n {(item) =>\n hasSection ? (\n <ListItemSection {...(item as ListItemSectionProps)} />\n ) : (\n <ListItem {...(item as ListItemProps)} />\n )\n }\n </AriaListBox>\n);\n"],"names":["React","AriaListBox"],"mappings":";;;;;;;;;AAYO,MAAM,OAAO,GAAG,CAAC,EACtB,EAAE,EACF,SAAS,EACT,cAAc,EACd,eAAe,EACf,aAAa,EACb,OAAO,EACP,iBAAiB,EACjB,cAAc,EACd,SAAS,GAAG,KAAK,EACjB,cAAc,EACd,UAAU,EACV,GAAG,UAAU,EACA,MACbA,cAAA,CAAA,aAAA,CAACC,SAAW,EAAA,EACV,SAAS,EAAE,eAAe,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,EACzD,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,OAAO,EACd,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,aAAa,KAAK,aAAa,CAAC,EAAE,CAAU,EAC9E,gBAAgB,EAAE,OAChBD,cAAC,CAAA,aAAA,CAAA,mBAAmB,EAAC,EAAA,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAA,CAAI,CAC9E,EAAA,iBAAA,EACgB,cAAc,KAAd,IAAA,IAAA,cAAc,KAAd,SAAA,GAAA,cAAc,GAAI,CAAG,EAAA,EAAE,CAAQ,MAAA,CAAA,EAAA,kBAAA,EAC9B,eAAe,KAAf,IAAA,IAAA,eAAe,KAAf,SAAA,GAAA,eAAe,GAAI,CAAA,EAAG,EAAE,CAAA,KAAA,CAAO,KAC7C,UAAU,EAAA,EAEb,CAAC,IAAI,KACJ,UAAU,IACRA,cAAC,CAAA,aAAA,CAAA,eAAe,OAAM,IAA6B,EAAA,CAAI,KAEvDA,cAAC,CAAA,aAAA,CAAA,QAAQ,OAAM,IAAsB,EAAA,CAAI,CAC1C,CAES;;;;"}
|
package/dist/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss.cjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ___$insertStyle = require('../../../../_virtual/____insertStyle.cjs');
|
|
4
|
+
|
|
5
|
+
___$insertStyle("._container_jvp9b_1 {\n overflow-y: scroll;\n max-height: 300px;\n padding: var(--sizes-sm);\n scroll-padding: var(--sizes-xs) 0;\n}\n._container_jvp9b_1[data-empty] {\n display: flex;\n align-items: center;\n justify-content: center;\n}");
|
|
6
|
+
var styles = {"container":"_container_jvp9b_1"};
|
|
7
|
+
|
|
8
|
+
module.exports = styles;
|
|
9
|
+
//# sourceMappingURL=OptionsContainer.module.scss.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionsContainer.module.scss.cjs","sources":["../../../../../src/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss"],"sourcesContent":[".container {\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"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,sPAAA;AACA,aAAA,CAAA,WAAA,CAAA,oBAAA;;;;"}
|
package/dist/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import insertStyle from '../../../../_virtual/____insertStyle.js';
|
|
2
|
+
|
|
3
|
+
insertStyle("._container_jvp9b_1 {\n overflow-y: scroll;\n max-height: 300px;\n padding: var(--sizes-sm);\n scroll-padding: var(--sizes-xs) 0;\n}\n._container_jvp9b_1[data-empty] {\n display: flex;\n align-items: center;\n justify-content: center;\n}");
|
|
4
|
+
var styles = {"container":"_container_jvp9b_1"};
|
|
5
|
+
|
|
6
|
+
export { styles as default };
|
|
7
|
+
//# sourceMappingURL=OptionsContainer.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OptionsContainer.module.scss.js","sources":["../../../../../src/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss"],"sourcesContent":[".container {\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"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,sPAAA;AACA,aAAA,CAAA,WAAA,CAAA,oBAAA;;;;"}
|