@razorpay/blade 11.28.2 → 11.30.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.
Files changed (52) hide show
  1. package/build/lib/native/components/ActionList/ActionListItem.js +3 -2
  2. package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
  3. package/build/lib/native/components/ActionList/actionListUtils.js +1 -1
  4. package/build/lib/native/components/ActionList/actionListUtils.js.map +1 -1
  5. package/build/lib/native/components/ActionList/componentIds.js +1 -1
  6. package/build/lib/native/components/ActionList/componentIds.js.map +1 -1
  7. package/build/lib/native/components/Form/FormLabel.js +1 -1
  8. package/build/lib/native/components/Form/FormLabel.js.map +1 -1
  9. package/build/lib/native/components/index.js +1 -1
  10. package/build/lib/web/development/components/ActionList/ActionListItem.js +11 -1
  11. package/build/lib/web/development/components/ActionList/ActionListItem.js.map +1 -1
  12. package/build/lib/web/development/components/ActionList/actionListUtils.js +2 -2
  13. package/build/lib/web/development/components/ActionList/actionListUtils.js.map +1 -1
  14. package/build/lib/web/development/components/ActionList/componentIds.js +1 -0
  15. package/build/lib/web/development/components/ActionList/componentIds.js.map +1 -1
  16. package/build/lib/web/development/components/ActionList/index.js +1 -1
  17. package/build/lib/web/development/components/DatePicker/CalendarFooter.web.js +3 -1
  18. package/build/lib/web/development/components/DatePicker/CalendarFooter.web.js.map +1 -1
  19. package/build/lib/web/development/components/DatePicker/DatePicker.web.js +22 -4
  20. package/build/lib/web/development/components/DatePicker/DatePicker.web.js.map +1 -1
  21. package/build/lib/web/development/components/Form/FormLabel.js +4 -2
  22. package/build/lib/web/development/components/Form/FormLabel.js.map +1 -1
  23. package/build/lib/web/development/components/Table/Table.web.js +16 -5
  24. package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
  25. package/build/lib/web/development/components/Table/TableBody.web.js +6 -2
  26. package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
  27. package/build/lib/web/development/components/Tooltip/TooltipInteractiveWrapper.web.js +9 -13
  28. package/build/lib/web/development/components/Tooltip/TooltipInteractiveWrapper.web.js.map +1 -1
  29. package/build/lib/web/development/components/index.js +1 -1
  30. package/build/lib/web/production/components/ActionList/ActionListItem.js +11 -1
  31. package/build/lib/web/production/components/ActionList/ActionListItem.js.map +1 -1
  32. package/build/lib/web/production/components/ActionList/actionListUtils.js +2 -2
  33. package/build/lib/web/production/components/ActionList/actionListUtils.js.map +1 -1
  34. package/build/lib/web/production/components/ActionList/componentIds.js +1 -0
  35. package/build/lib/web/production/components/ActionList/componentIds.js.map +1 -1
  36. package/build/lib/web/production/components/ActionList/index.js +1 -1
  37. package/build/lib/web/production/components/DatePicker/CalendarFooter.web.js +3 -1
  38. package/build/lib/web/production/components/DatePicker/CalendarFooter.web.js.map +1 -1
  39. package/build/lib/web/production/components/DatePicker/DatePicker.web.js +22 -4
  40. package/build/lib/web/production/components/DatePicker/DatePicker.web.js.map +1 -1
  41. package/build/lib/web/production/components/Form/FormLabel.js +4 -2
  42. package/build/lib/web/production/components/Form/FormLabel.js.map +1 -1
  43. package/build/lib/web/production/components/Table/Table.web.js +16 -5
  44. package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
  45. package/build/lib/web/production/components/Table/TableBody.web.js +6 -2
  46. package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
  47. package/build/lib/web/production/components/Tooltip/TooltipInteractiveWrapper.web.js +9 -13
  48. package/build/lib/web/production/components/Tooltip/TooltipInteractiveWrapper.web.js.map +1 -1
  49. package/build/lib/web/production/components/index.js +1 -1
  50. package/build/types/components/index.d.ts +454 -1134
  51. package/build/types/components/index.native.d.ts +259 -250
  52. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Table.web.js","sources":["../../../../../../src/components/Table/Table.web.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo } from 'react';\nimport { Table as ReactTable } from '@table-library/react-table-library/table';\nimport { useTheme as useTableTheme } from '@table-library/react-table-library/theme';\nimport type { MiddlewareFunction } from '@table-library/react-table-library/types/common';\nimport { useSort } from '@table-library/react-table-library/sort';\nimport { usePagination } from '@table-library/react-table-library/pagination';\nimport {\n SelectClickTypes,\n SelectTypes,\n useRowSelect,\n} from '@table-library/react-table-library/select';\nimport styled from 'styled-components';\nimport usePresence from 'use-presence';\nimport type { TableContextType } from './TableContext';\nimport { TableContext } from './TableContext';\nimport { ComponentIds } from './componentIds';\nimport {\n checkboxCellWidth,\n firstColumnStickyZIndex,\n refreshWrapperZIndex,\n tableBackgroundColor,\n tablePagination,\n} from './tokens';\nimport type {\n TableProps,\n TableNode,\n Identifier,\n TablePaginationType,\n TableHeaderRowProps,\n} from './types';\nimport { makeBorderSize, makeMotionTime } from '~utils';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\nimport type { BoxProps } from '~components/Box';\nimport { getBaseBoxStyles } from '~components/Box/BaseBox/baseBoxStyles';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { useTheme } from '~components/BladeProvider';\nimport getIn from '~utils/lodashButBetter/get';\n\nconst rowSelectType: Record<\n NonNullable<TableProps<unknown>['selectionType']>,\n SelectTypes | undefined\n> = {\n single: SelectTypes.SingleSelect,\n multiple: SelectTypes.MultiSelect,\n none: undefined,\n};\n\n// Get the number of TableHeaderCell components.\n// This is very complicated but the only way to iterate through the structure and get number of header cells.\n// Assuming number of header cells is the same as number of columns\nconst getTableHeaderCellCount = (children: (data: []) => React.ReactElement): number => {\n const tableRootComponent = children([]);\n if (tableRootComponent && React.isValidElement(tableRootComponent)) {\n const tableComponentArray = React.Children.toArray(tableRootComponent);\n if (React.isValidElement(tableComponentArray[0])) {\n const tableComponentArrayChildren = React.Children.toArray(\n tableComponentArray[0].props.children,\n );\n const tableHeader = tableComponentArrayChildren.find(\n (child) => getComponentId(child) === ComponentIds.TableHeader,\n );\n const tableHeaderChildrenArray = React.isValidElement(tableHeader)\n ? React.Children.toArray(tableHeader.props.children)\n : null;\n const tableHeaderRow = tableHeaderChildrenArray?.find(\n (child) => getComponentId(child) === ComponentIds.TableHeaderRow,\n );\n const tableHeaderRowChildrenArray = React.isValidElement(tableHeaderRow)\n ? React.Children.toArray(tableHeaderRow.props.children)\n : null;\n const tableHeaderCells = tableHeaderRowChildrenArray\n ? tableHeaderRowChildrenArray.filter(\n (child) => getComponentId(child) === ComponentIds.TableHeaderCell,\n )\n : null;\n return tableHeaderCells?.length ?? 0;\n }\n }\n return 0;\n};\n\nconst StyledReactTable = styled(ReactTable)<{ $styledProps?: { height?: BoxProps['height'] } }>(\n ({ $styledProps }) => {\n const { theme } = useTheme();\n const styledPropsCSSObject = getBaseBoxStyles({\n theme,\n height: $styledProps?.height,\n });\n\n return {\n '&&&': {\n ...styledPropsCSSObject,\n },\n };\n },\n);\n\nconst RefreshWrapper = styled(BaseBox)<{\n isRefreshSpinnerVisible: boolean;\n isRefreshSpinnerEntering: boolean;\n isRefreshSpinnerExiting: boolean;\n}>(({ isRefreshSpinnerVisible, isRefreshSpinnerEntering, isRefreshSpinnerExiting, theme }) => {\n return {\n opacity: isRefreshSpinnerVisible ? 1 : 0,\n transition: `opacity ${makeMotionTime(theme.motion.duration.quick)} ${\n isRefreshSpinnerEntering\n ? theme.motion.easing.entrance.effective\n : isRefreshSpinnerExiting\n ? theme.motion.easing.exit.effective\n : ''\n }`,\n };\n});\n\nconst _Table = <Item,>({\n children,\n data,\n multiSelectTrigger = 'row',\n selectionType = 'none',\n onSelectionChange,\n isHeaderSticky,\n isFooterSticky,\n isFirstColumnSticky,\n rowDensity = 'normal',\n onSortChange,\n sortFunctions,\n toolbar,\n pagination,\n height,\n showStripedRows,\n gridTemplateColumns,\n isLoading = false,\n isRefreshing = false,\n showBorderedCells = false,\n ...styledProps\n}: TableProps<Item>): React.ReactElement => {\n const { theme } = useTheme();\n const [selectedRows, setSelectedRows] = React.useState<TableNode<unknown>['id'][]>([]);\n const [disabledRows, setDisabledRows] = React.useState<TableNode<unknown>['id'][]>([]);\n const [totalItems, setTotalItems] = React.useState(data.nodes.length || 0);\n const [paginationType, setPaginationType] = React.useState<NonNullable<TablePaginationType>>(\n 'client',\n );\n const [headerRowDensity, setHeaderRowDensity] = React.useState<TableHeaderRowProps['rowDensity']>(\n undefined,\n );\n // Need to make header is sticky if first column is sticky otherwise the first header cell will not be sticky\n const shouldHeaderBeSticky = isHeaderSticky ?? isFirstColumnSticky;\n const backgroundColor = tableBackgroundColor;\n\n const {\n isEntering: isRefreshSpinnerEntering,\n isMounted: isRefreshSpinnerMounted,\n isExiting: isRefreshSpinnerExiting,\n isVisible: isRefreshSpinnerVisible,\n } = usePresence(isRefreshing, {\n transitionDuration: theme.motion.duration.quick,\n });\n\n // Table Theme\n const columnCount = getTableHeaderCellCount(children);\n const firstColumnStickyHeaderCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n `\n }`\n : '';\n const firstColumnStickyFooterCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n `\n }`\n : '';\n const firstColumnStickyBodyCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n `\n }`\n : '';\n\n const tableTheme = useTableTheme({\n Table: `\n height:${isFooterSticky ? `100%` : undefined};\n border: ${makeBorderSize(theme.border.width.thin)} solid ${\n theme.colors.surface.border.gray.muted\n };\n --data-table-library_grid-template-columns: ${\n gridTemplateColumns ??\n ` ${\n selectionType === 'multiple' ? 'min-content' : ''\n } repeat(${columnCount},minmax(100px, 1fr)) !important;`\n } !important;\n background-color: ${getIn(theme.colors, backgroundColor)};\n `,\n HeaderCell: `\n position: ${shouldHeaderBeSticky ? 'sticky' : 'relative'};\n \n top: ${shouldHeaderBeSticky ? '0' : undefined};\n ${firstColumnStickyHeaderCellCSS}\n `,\n Cell: `\n ${firstColumnStickyBodyCellCSS}\n `,\n FooterCell: `\n position: ${isFooterSticky ? 'sticky' : 'relative'};\n bottom: ${isFooterSticky ? '0' : undefined};\n ${firstColumnStickyFooterCellCSS}\n `,\n });\n\n useEffect(() => {\n // Get the total number of items\n setTotalItems(data.nodes.length);\n }, [data.nodes]);\n\n // Selection Logic\n const onSelectChange: MiddlewareFunction = (action, state): void => {\n const selectedIds: Identifier[] = state.id ? [state.id] : state.ids ?? [];\n setSelectedRows(selectedIds);\n onSelectionChange?.({\n selectedIds,\n values: data.nodes.filter((node) => selectedIds.includes(node.id)),\n });\n };\n\n const rowSelectConfig = useRowSelect(\n data,\n {\n onChange: onSelectChange,\n },\n {\n clickType:\n multiSelectTrigger === 'row' ? SelectClickTypes.RowClick : SelectClickTypes.ButtonClick,\n rowSelect: selectionType !== 'none' ? rowSelectType[selectionType] : undefined,\n },\n );\n\n const toggleRowSelectionById = useMemo(\n () => (id: Identifier): void => {\n rowSelectConfig.fns.onToggleById(id);\n },\n [rowSelectConfig.fns],\n );\n\n const deselectAllRows = useMemo(\n () => (): void => {\n rowSelectConfig.fns.onRemoveAll();\n },\n [rowSelectConfig.fns],\n );\n\n const toggleAllRowsSelection = useMemo(\n () => (): void => {\n if (selectedRows.length > 0) {\n rowSelectConfig.fns.onRemoveAll();\n } else {\n const ids = data.nodes\n .map((item: TableNode<Item>) => (disabledRows.includes(item.id) ? null : item.id))\n .filter(Boolean) as Identifier[];\n\n rowSelectConfig.fns.onAddAll(ids);\n }\n },\n [rowSelectConfig.fns, data.nodes, selectedRows, disabledRows],\n );\n\n // Sort Logic\n const handleSortChange: MiddlewareFunction = (action, state) => {\n onSortChange?.({\n sortKey: state.sortKey,\n isSortReversed: state.reverse,\n });\n };\n\n const sort = useSort(\n data,\n {\n onChange: handleSortChange,\n },\n {\n // @ts-expect-error ignore this, if sortFunctions is undefined, it will be ignored\n sortFns: sortFunctions,\n },\n );\n\n const currentSortedState: TableContextType['currentSortedState'] = useMemo(() => {\n return {\n sortKey: sort.state.sortKey,\n isSortReversed: sort.state.reverse,\n sortableColumns: Object.keys(sortFunctions ?? {}),\n };\n }, [sort.state, sortFunctions]);\n\n const toggleSort = useCallback(\n (sortKey: string): void => {\n sort.fns.onToggleSort({\n sortKey,\n });\n },\n [sort.fns],\n );\n\n // Pagination\n\n const hasPagination = Boolean(pagination);\n\n const paginationConfig = usePagination(\n data,\n {\n state: {\n page: 0,\n size: tablePagination.defaultPageSize,\n },\n },\n {\n isServer: paginationType === 'server',\n },\n );\n\n const currentPaginationState = useMemo(() => {\n return hasPagination\n ? {\n page: paginationConfig.state.page,\n size: paginationConfig.state.size,\n }\n : undefined;\n }, [paginationConfig.state, hasPagination]);\n\n const setPaginationPage = useCallback(\n (page: number): void => {\n paginationConfig.fns.onSetPage(page);\n },\n [paginationConfig.fns],\n );\n\n const setPaginationRowSize = useCallback(\n (size: number): void => {\n paginationConfig.fns.onSetSize(size);\n },\n [paginationConfig.fns],\n );\n\n // Toolbar Component\n if (__DEV__) {\n if (toolbar && !isValidAllowedChildren(toolbar, ComponentIds.TableToolbar)) {\n throwBladeError({\n message: 'Only TableToolbar component is allowed in the `toolbar` prop',\n moduleName: 'Table',\n });\n }\n }\n\n // Table Context\n const tableContext: TableContextType = useMemo(\n () => ({\n selectionType,\n selectedRows,\n totalItems,\n toggleRowSelectionById,\n toggleAllRowsSelection,\n deselectAllRows,\n rowDensity,\n toggleSort,\n currentSortedState,\n setPaginationPage,\n setPaginationRowSize,\n currentPaginationState,\n showStripedRows,\n disabledRows,\n setDisabledRows,\n paginationType,\n setPaginationType,\n backgroundColor,\n headerRowDensity,\n setHeaderRowDensity,\n showBorderedCells,\n }),\n [\n selectionType,\n selectedRows,\n totalItems,\n toggleRowSelectionById,\n toggleAllRowsSelection,\n deselectAllRows,\n rowDensity,\n toggleSort,\n currentSortedState,\n setPaginationPage,\n setPaginationRowSize,\n currentPaginationState,\n showStripedRows,\n disabledRows,\n setDisabledRows,\n paginationType,\n setPaginationType,\n backgroundColor,\n headerRowDensity,\n setHeaderRowDensity,\n showBorderedCells,\n ],\n );\n\n return (\n <TableContext.Provider value={tableContext}>\n {isLoading ? (\n <BaseBox\n display=\"flex\"\n flex={1}\n alignItems=\"center\"\n justifyContent=\"center\"\n height={height}\n {...getStyledProps(styledProps)}\n {...metaAttribute({ name: MetaConstants.Table })}\n >\n <Spinner accessibilityLabel=\"Loading Table\" size=\"large\" />\n </BaseBox>\n ) : (\n <BaseBox\n flex={1}\n position=\"relative\"\n {...getStyledProps(styledProps)}\n {...metaAttribute({ name: MetaConstants.Table })}\n >\n {isRefreshSpinnerMounted && (\n <RefreshWrapper\n position=\"absolute\"\n width=\"100%\"\n height=\"100%\"\n zIndex={refreshWrapperZIndex}\n backgroundColor=\"overlay.background.subtle\"\n justifyContent=\"center\"\n alignItems=\"center\"\n display=\"flex\"\n isRefreshSpinnerEntering={isRefreshSpinnerEntering}\n isRefreshSpinnerExiting={isRefreshSpinnerExiting}\n isRefreshSpinnerVisible={isRefreshSpinnerVisible}\n >\n <Spinner color=\"white\" accessibilityLabel=\"Refreshing Table\" size=\"large\" />\n </RefreshWrapper>\n )}\n {toolbar}\n <StyledReactTable\n role=\"table\"\n layout={{ fixedHeader: shouldHeaderBeSticky, horizontalScroll: true }}\n data={data}\n // @ts-expect-error ignore this, theme clashes with styled-component's theme. We're using useTheme from blade to get actual theme\n theme={tableTheme}\n select={selectionType !== 'none' ? rowSelectConfig : null}\n sort={sortFunctions ? sort : null}\n $styledProps={{\n height,\n }}\n pagination={hasPagination ? paginationConfig : null}\n {...metaAttribute({ name: MetaConstants.Table })}\n >\n {children}\n </StyledReactTable>\n {pagination}\n </BaseBox>\n )}\n </TableContext.Provider>\n );\n};\n\nconst Table = assignWithoutSideEffects(_Table, {\n componentId: ComponentIds.Table,\n});\n\nexport { Table };\n"],"names":["rowSelectType","single","SelectTypes","SingleSelect","multiple","MultiSelect","none","undefined","getTableHeaderCellCount","children","tableRootComponent","React","isValidElement","tableComponentArray","Children","toArray","_tableHeaderCells$len","tableComponentArrayChildren","props","tableHeader","find","child","getComponentId","ComponentIds","TableHeader","tableHeaderChildrenArray","tableHeaderRow","TableHeaderRow","tableHeaderRowChildrenArray","tableHeaderCells","filter","TableHeaderCell","length","StyledReactTable","styled","ReactTable","withConfig","displayName","componentId","_ref","$styledProps","_useTheme","useTheme","theme","styledPropsCSSObject","getBaseBoxStyles","height","_objectSpread","RefreshWrapper","BaseBox","_ref2","isRefreshSpinnerVisible","isRefreshSpinnerEntering","isRefreshSpinnerExiting","opacity","transition","concat","makeMotionTime","motion","duration","quick","easing","entrance","effective","exit","_Table","_ref3","data","_ref3$multiSelectTrig","multiSelectTrigger","_ref3$selectionType","selectionType","onSelectionChange","isHeaderSticky","isFooterSticky","isFirstColumnSticky","_ref3$rowDensity","rowDensity","onSortChange","sortFunctions","toolbar","pagination","showStripedRows","gridTemplateColumns","_ref3$isLoading","isLoading","_ref3$isRefreshing","isRefreshing","_ref3$showBorderedCel","showBorderedCells","styledProps","_objectWithoutProperties","_excluded","_useTheme2","_React$useState","useState","_React$useState2","_slicedToArray","selectedRows","setSelectedRows","_React$useState3","_React$useState4","disabledRows","setDisabledRows","_React$useState5","nodes","_React$useState6","totalItems","setTotalItems","_React$useState7","_React$useState8","paginationType","setPaginationType","_React$useState9","_React$useState10","headerRowDensity","setHeaderRowDensity","shouldHeaderBeSticky","backgroundColor","tableBackgroundColor","_usePresence","usePresence","transitionDuration","isEntering","isRefreshSpinnerMounted","isMounted","isExiting","isVisible","columnCount","firstColumnStickyHeaderCellCSS","firstColumnStickyZIndex","checkboxCellWidth","firstColumnStickyFooterCellCSS","firstColumnStickyBodyCellCSS","tableTheme","useTableTheme","Table","makeBorderSize","border","width","thin","colors","surface","gray","muted","getIn","HeaderCell","Cell","FooterCell","useEffect","onSelectChange","action","state","_state$ids","selectedIds","id","ids","values","node","includes","rowSelectConfig","useRowSelect","onChange","clickType","SelectClickTypes","RowClick","ButtonClick","rowSelect","toggleRowSelectionById","useMemo","fns","onToggleById","deselectAllRows","onRemoveAll","toggleAllRowsSelection","map","item","Boolean","onAddAll","handleSortChange","sortKey","isSortReversed","reverse","sort","useSort","sortFns","currentSortedState","sortableColumns","Object","keys","toggleSort","useCallback","onToggleSort","hasPagination","paginationConfig","usePagination","page","size","tablePagination","defaultPageSize","isServer","currentPaginationState","setPaginationPage","onSetPage","setPaginationRowSize","onSetSize","isValidAllowedChildren","TableToolbar","throwBladeError","message","moduleName","tableContext","_jsx","TableContext","Provider","value","display","flex","alignItems","justifyContent","getStyledProps","metaAttribute","name","MetaConstants","Spinner","accessibilityLabel","_jsxs","position","zIndex","refreshWrapperZIndex","color","role","layout","fixedHeader","horizontalScroll","select","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,IAAMA,aAGL,GAAG;EACFC,MAAM,EAAEC,WAAW,CAACC,YAAY;EAChCC,QAAQ,EAAEF,WAAW,CAACG,WAAW;AACjCC,EAAAA,IAAI,EAAEC,SAAAA;AACR,CAAC,CAAA;;AAED;AACA;AACA;AACA,IAAMC,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAIC,QAA0C,EA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A,uBAAuB,EAAEA,uBAAwB;QAAA1C,QAAA,eAEjD2M,GAAA,CAACY,OAAO,EAAA;AAACM,UAAAA,KAAK,EAAC,OAAO;AAACL,UAAAA,kBAAkB,EAAC,kBAAkB;AAAC5B,UAAAA,IAAI,EAAC,OAAA;SAAS,CAAA;OAC7D,CACjB,EACArH,OAAO,eACRoI,GAAA,CAACnL,gBAAgB,EAAAc,aAAA,CAAAA,aAAA,CAAA;AACfwL,QAAAA,IAAI,EAAC,OAAO;AACZC,QAAAA,MAAM,EAAE;AAAEC,UAAAA,WAAW,EAAEpH,oBAAoB;AAAEqH,UAAAA,gBAAgB,EAAE,IAAA;SAAO;AACtEvK,QAAAA,IAAI,EAAEA,IAAAA;AACN;AAAA;AACAxB,QAAAA,KAAK,EAAE2F,UAAW;AAClBqG,QAAAA,MAAM,EAAEpK,aAAa,KAAK,MAAM,GAAGyF,eAAe,GAAG,IAAK;AAC1DuB,QAAAA,IAAI,EAAExG,aAAa,GAAGwG,IAAI,GAAG,IAAK;AAClC/I,QAAAA,YAAY,EAAE;AACZM,UAAAA,MAAM,EAANA,MAAAA;SACA;AACFmC,QAAAA,UAAU,EAAEgH,aAAa,GAAGC,gBAAgB,GAAG,IAAA;AAAK,OAAA,EAChD2B,aAAa,CAAC;QAAEC,IAAI,EAAEC,aAAa,CAACvF,KAAAA;AAAM,OAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAA/H,QAAAA,QAAA,EAE/CA,QAAAA;OACe,CAAA,CAAC,EAClBwE,UAAU,CAAA;KACJ,CAAA,CAAA;AACV,GACoB,CAAC,CAAA;AAE5B,CAAC,CAAA;AAED,IAAMuD,KAAK,gBAAGoG,wBAAwB,CAAC3K,MAAM,EAAE;EAC7C3B,WAAW,EAAEf,YAAY,CAACiH,KAAAA;AAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"Table.web.js","sources":["../../../../../../src/components/Table/Table.web.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo } from 'react';\nimport { Table as ReactTable } from '@table-library/react-table-library/table';\nimport { useTheme as useTableTheme } from '@table-library/react-table-library/theme';\nimport type { MiddlewareFunction } from '@table-library/react-table-library/types/common';\nimport { useSort } from '@table-library/react-table-library/sort';\nimport { usePagination } from '@table-library/react-table-library/pagination';\nimport {\n SelectClickTypes,\n SelectTypes,\n useRowSelect,\n} from '@table-library/react-table-library/select';\nimport styled from 'styled-components';\nimport usePresence from 'use-presence';\nimport type { TableContextType } from './TableContext';\nimport { TableContext } from './TableContext';\nimport { ComponentIds } from './componentIds';\nimport {\n checkboxCellWidth,\n firstColumnStickyZIndex,\n refreshWrapperZIndex,\n tableBackgroundColor,\n tablePagination,\n} from './tokens';\nimport type {\n TableProps,\n TableNode,\n Identifier,\n TablePaginationType,\n TableHeaderRowProps,\n} from './types';\nimport { makeBorderSize, makeMotionTime } from '~utils';\nimport { getComponentId, isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\nimport type { BoxProps } from '~components/Box';\nimport { getBaseBoxStyles } from '~components/Box/BaseBox/baseBoxStyles';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { useTheme } from '~components/BladeProvider';\nimport getIn from '~utils/lodashButBetter/get';\nimport { makeAccessible } from '~utils/makeAccessible';\n\nconst rowSelectType: Record<\n NonNullable<TableProps<unknown>['selectionType']>,\n SelectTypes | undefined\n> = {\n single: SelectTypes.SingleSelect,\n multiple: SelectTypes.MultiSelect,\n none: undefined,\n};\n\n// Get the number of TableHeaderCell components.\n// This is very complicated but the only way to iterate through the structure and get number of header cells.\n// Assuming number of header cells is the same as number of columns\nconst getTableHeaderCellCount = (children: (data: []) => React.ReactElement): number => {\n const tableRootComponent = children([]);\n if (tableRootComponent && React.isValidElement(tableRootComponent)) {\n const tableComponentArray = React.Children.toArray(tableRootComponent);\n if (React.isValidElement(tableComponentArray[0])) {\n const tableComponentArrayChildren = React.Children.toArray(\n tableComponentArray[0].props.children,\n );\n const tableHeader = tableComponentArrayChildren.find(\n (child) => getComponentId(child) === ComponentIds.TableHeader,\n );\n const tableHeaderChildrenArray = React.isValidElement(tableHeader)\n ? React.Children.toArray(tableHeader.props.children)\n : null;\n const tableHeaderRow = tableHeaderChildrenArray?.find(\n (child) => getComponentId(child) === ComponentIds.TableHeaderRow,\n );\n const tableHeaderRowChildrenArray = React.isValidElement(tableHeaderRow)\n ? React.Children.toArray(tableHeaderRow.props.children)\n : null;\n const tableHeaderCells = tableHeaderRowChildrenArray\n ? tableHeaderRowChildrenArray.filter(\n (child) => getComponentId(child) === ComponentIds.TableHeaderCell,\n )\n : null;\n return tableHeaderCells?.length ?? 0;\n }\n }\n return 0;\n};\n\nconst StyledReactTable = styled(ReactTable)<{ $styledProps?: { height?: BoxProps['height'] } }>(\n ({ $styledProps }) => {\n const { theme } = useTheme();\n const styledPropsCSSObject = getBaseBoxStyles({\n theme,\n height: $styledProps?.height,\n });\n\n return {\n '&&&': {\n ...styledPropsCSSObject,\n },\n };\n },\n);\n\nconst RefreshWrapper = styled(BaseBox)<{\n isRefreshSpinnerVisible: boolean;\n isRefreshSpinnerEntering: boolean;\n isRefreshSpinnerExiting: boolean;\n}>(({ isRefreshSpinnerVisible, isRefreshSpinnerEntering, isRefreshSpinnerExiting, theme }) => {\n return {\n opacity: isRefreshSpinnerVisible ? 1 : 0,\n transition: `opacity ${makeMotionTime(theme.motion.duration.quick)} ${\n isRefreshSpinnerEntering\n ? theme.motion.easing.entrance.effective\n : isRefreshSpinnerExiting\n ? theme.motion.easing.exit.effective\n : ''\n }`,\n };\n});\n\nconst _Table = <Item,>({\n children,\n data,\n multiSelectTrigger = 'row',\n selectionType = 'none',\n onSelectionChange,\n isHeaderSticky,\n isFooterSticky,\n isFirstColumnSticky,\n rowDensity = 'normal',\n onSortChange,\n sortFunctions,\n toolbar,\n pagination,\n height,\n showStripedRows,\n gridTemplateColumns,\n isLoading = false,\n isRefreshing = false,\n showBorderedCells = false,\n defaultSelectedIds = [],\n ...styledProps\n}: TableProps<Item>): React.ReactElement => {\n const { theme } = useTheme();\n const [selectedRows, setSelectedRows] = React.useState<TableNode<unknown>['id'][]>(\n selectionType !== 'none' ? defaultSelectedIds : [],\n );\n const [disabledRows, setDisabledRows] = React.useState<TableNode<unknown>['id'][]>([]);\n const [totalItems, setTotalItems] = React.useState(data.nodes.length || 0);\n const [paginationType, setPaginationType] = React.useState<NonNullable<TablePaginationType>>(\n 'client',\n );\n const [headerRowDensity, setHeaderRowDensity] = React.useState<TableHeaderRowProps['rowDensity']>(\n undefined,\n );\n // Need to make header is sticky if first column is sticky otherwise the first header cell will not be sticky\n const shouldHeaderBeSticky = isHeaderSticky ?? isFirstColumnSticky;\n const backgroundColor = tableBackgroundColor;\n\n const {\n isEntering: isRefreshSpinnerEntering,\n isMounted: isRefreshSpinnerMounted,\n isExiting: isRefreshSpinnerExiting,\n isVisible: isRefreshSpinnerVisible,\n } = usePresence(isRefreshing, {\n transitionDuration: theme.motion.duration.quick,\n });\n\n // Table Theme\n const columnCount = getTableHeaderCellCount(children);\n const firstColumnStickyHeaderCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n `\n }`\n : '';\n const firstColumnStickyFooterCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n `\n }`\n : '';\n const firstColumnStickyBodyCellCSS = isFirstColumnSticky\n ? `\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n ${\n selectionType === 'multiple' &&\n `&:nth-of-type(2) {\n left: ${checkboxCellWidth}px !important;\n position: sticky !important;\n z-index: ${firstColumnStickyZIndex} !important;\n }\n `\n }`\n : '';\n\n const tableTheme = useTableTheme({\n Table: `\n height:${isFooterSticky ? `100%` : undefined};\n border: ${makeBorderSize(theme.border.width.thin)} solid ${\n theme.colors.surface.border.gray.muted\n };\n --data-table-library_grid-template-columns: ${\n gridTemplateColumns ??\n ` ${\n selectionType === 'multiple' ? 'min-content' : ''\n } repeat(${columnCount},minmax(100px, 1fr)) !important;`\n } !important;\n background-color: ${getIn(theme.colors, backgroundColor)};\n `,\n HeaderCell: `\n position: ${shouldHeaderBeSticky ? 'sticky' : 'relative'};\n \n top: ${shouldHeaderBeSticky ? '0' : undefined};\n ${firstColumnStickyHeaderCellCSS}\n `,\n Cell: `\n ${firstColumnStickyBodyCellCSS}\n `,\n FooterCell: `\n position: ${isFooterSticky ? 'sticky' : 'relative'};\n bottom: ${isFooterSticky ? '0' : undefined};\n ${firstColumnStickyFooterCellCSS}\n `,\n });\n\n useEffect(() => {\n // Get the total number of items\n setTotalItems(data.nodes.length);\n }, [data.nodes]);\n\n // Selection Logic\n const onSelectChange: MiddlewareFunction = (action, state): void => {\n const selectedIds: Identifier[] = state.id ? [state.id] : state.ids ?? [];\n setSelectedRows(selectedIds);\n onSelectionChange?.({\n selectedIds,\n values: data.nodes.filter((node) => selectedIds.includes(node.id)),\n });\n };\n\n const rowSelectConfig = useRowSelect(\n data,\n {\n onChange: onSelectChange,\n state: {\n ...(selectionType === 'multiple'\n ? { ids: selectedRows }\n : selectionType === 'single'\n ? { id: selectedRows[0] }\n : {}),\n },\n },\n {\n clickType:\n multiSelectTrigger === 'row' ? SelectClickTypes.RowClick : SelectClickTypes.ButtonClick,\n rowSelect: selectionType !== 'none' ? rowSelectType[selectionType] : undefined,\n },\n );\n\n const toggleRowSelectionById = useMemo(\n () => (id: Identifier): void => {\n rowSelectConfig.fns.onToggleById(id);\n },\n [rowSelectConfig.fns],\n );\n\n const deselectAllRows = useMemo(\n () => (): void => {\n rowSelectConfig.fns.onRemoveAll();\n },\n [rowSelectConfig.fns],\n );\n\n const toggleAllRowsSelection = useMemo(\n () => (): void => {\n if (selectedRows.length > 0) {\n rowSelectConfig.fns.onRemoveAll();\n } else {\n const ids = data.nodes\n .map((item: TableNode<Item>) => (disabledRows.includes(item.id) ? null : item.id))\n .filter(Boolean) as Identifier[];\n\n rowSelectConfig.fns.onAddAll(ids);\n }\n },\n [rowSelectConfig.fns, data.nodes, selectedRows, disabledRows],\n );\n\n // Sort Logic\n const handleSortChange: MiddlewareFunction = (action, state) => {\n onSortChange?.({\n sortKey: state.sortKey,\n isSortReversed: state.reverse,\n });\n };\n\n const sort = useSort(\n data,\n {\n onChange: handleSortChange,\n },\n {\n // @ts-expect-error ignore this, if sortFunctions is undefined, it will be ignored\n sortFns: sortFunctions,\n },\n );\n\n const currentSortedState: TableContextType['currentSortedState'] = useMemo(() => {\n return {\n sortKey: sort.state.sortKey,\n isSortReversed: sort.state.reverse,\n sortableColumns: Object.keys(sortFunctions ?? {}),\n };\n }, [sort.state, sortFunctions]);\n\n const toggleSort = useCallback(\n (sortKey: string): void => {\n sort.fns.onToggleSort({\n sortKey,\n });\n },\n [sort.fns],\n );\n\n // Pagination\n\n const hasPagination = Boolean(pagination);\n\n const paginationConfig = usePagination(\n data,\n {\n state: {\n page: 0,\n size: tablePagination.defaultPageSize,\n },\n },\n {\n isServer: paginationType === 'server',\n },\n );\n\n const currentPaginationState = useMemo(() => {\n return hasPagination\n ? {\n page: paginationConfig.state.page,\n size: paginationConfig.state.size,\n }\n : undefined;\n }, [paginationConfig.state, hasPagination]);\n\n const setPaginationPage = useCallback(\n (page: number): void => {\n paginationConfig.fns.onSetPage(page);\n },\n [paginationConfig.fns],\n );\n\n const setPaginationRowSize = useCallback(\n (size: number): void => {\n paginationConfig.fns.onSetSize(size);\n },\n [paginationConfig.fns],\n );\n\n // Toolbar Component\n if (__DEV__) {\n if (toolbar && !isValidAllowedChildren(toolbar, ComponentIds.TableToolbar)) {\n throwBladeError({\n message: 'Only TableToolbar component is allowed in the `toolbar` prop',\n moduleName: 'Table',\n });\n }\n }\n\n // Table Context\n const tableContext: TableContextType = useMemo(\n () => ({\n selectionType,\n selectedRows,\n totalItems,\n toggleRowSelectionById,\n toggleAllRowsSelection,\n deselectAllRows,\n rowDensity,\n toggleSort,\n currentSortedState,\n setPaginationPage,\n setPaginationRowSize,\n currentPaginationState,\n showStripedRows,\n disabledRows,\n setDisabledRows,\n paginationType,\n setPaginationType,\n backgroundColor,\n headerRowDensity,\n setHeaderRowDensity,\n showBorderedCells,\n }),\n [\n selectionType,\n selectedRows,\n totalItems,\n toggleRowSelectionById,\n toggleAllRowsSelection,\n deselectAllRows,\n rowDensity,\n toggleSort,\n currentSortedState,\n setPaginationPage,\n setPaginationRowSize,\n currentPaginationState,\n showStripedRows,\n disabledRows,\n setDisabledRows,\n paginationType,\n setPaginationType,\n backgroundColor,\n headerRowDensity,\n setHeaderRowDensity,\n showBorderedCells,\n ],\n );\n\n return (\n <TableContext.Provider value={tableContext}>\n {isLoading ? (\n <BaseBox\n display=\"flex\"\n flex={1}\n alignItems=\"center\"\n justifyContent=\"center\"\n height={height}\n {...getStyledProps(styledProps)}\n {...metaAttribute({ name: MetaConstants.Table })}\n >\n <Spinner accessibilityLabel=\"Loading Table\" size=\"large\" />\n </BaseBox>\n ) : (\n <BaseBox\n flex={1}\n position=\"relative\"\n {...getStyledProps(styledProps)}\n {...metaAttribute({ name: MetaConstants.Table })}\n >\n {isRefreshSpinnerMounted && (\n <RefreshWrapper\n position=\"absolute\"\n width=\"100%\"\n height=\"100%\"\n zIndex={refreshWrapperZIndex}\n backgroundColor=\"overlay.background.subtle\"\n justifyContent=\"center\"\n alignItems=\"center\"\n display=\"flex\"\n isRefreshSpinnerEntering={isRefreshSpinnerEntering}\n isRefreshSpinnerExiting={isRefreshSpinnerExiting}\n isRefreshSpinnerVisible={isRefreshSpinnerVisible}\n >\n <Spinner color=\"white\" accessibilityLabel=\"Refreshing Table\" size=\"large\" />\n </RefreshWrapper>\n )}\n {toolbar}\n <StyledReactTable\n role=\"table\"\n layout={{ fixedHeader: shouldHeaderBeSticky, horizontalScroll: true }}\n data={data}\n // @ts-expect-error ignore this, theme clashes with styled-component's theme. We're using useTheme from blade to get actual theme\n theme={tableTheme}\n select={selectionType !== 'none' ? rowSelectConfig : null}\n sort={sortFunctions ? sort : null}\n $styledProps={{\n height,\n }}\n pagination={hasPagination ? paginationConfig : null}\n {...makeAccessible({ multiSelectable: selectionType === 'multiple' })}\n {...metaAttribute({ name: MetaConstants.Table })}\n >\n {children}\n </StyledReactTable>\n {pagination}\n </BaseBox>\n )}\n </TableContext.Provider>\n );\n};\n\nconst Table = assignWithoutSideEffects(_Table, {\n componentId: ComponentIds.Table,\n});\n\nexport { Table };\n"],"names":["rowSelectType","single","SelectTypes","SingleSelect","multiple","MultiSelect","none","undefined","getTableHeaderCellCount","children","tableRootComponent","React","isValidElement","tableComponentArray","Children","toArray","_tableHeaderCells$len","tableComponentArrayChildren","props","tableHeader","find","child","getComponentId","ComponentIds","TableHeader","tableHeaderChildrenArray","tableHeaderRow","TableHeaderRow","tableHeaderRowChildrenArray","tableHeaderCells","filter","TableHeaderCell","length","StyledReactTable","styled","ReactTable","withConfig","displayName","componentId","_ref","$styledProps","_useTheme","useTheme","theme","styledPropsCSSObject","getBaseBoxStyles","height","_objectSpread","RefreshWrapper","BaseBox","_ref2","isRefreshSpinnerVisible","isRefreshSpinnerEntering","isRefreshSpinnerExiting","opacity","transition","concat","makeMotionTime","motion","duration","quick","easing","entrance","effective","exit","_Table","_ref3","data","_ref3$multiSelectTrig","multiSelectTrigger","_ref3$selectionType","selectionType","onSelectionChange","isHeaderSticky","isFooterSticky","isFirstColumnSticky","_ref3$rowDensity","rowDensity","onSortChange","sortFunctions","toolbar","pagination","showStripedRows","gridTemplateColumns","_ref3$isLoading","isLoading","_ref3$isRefreshing","isRefreshing","_ref3$showBorderedCel","showBorderedCells","_ref3$defaultSelected","defaultSelectedIds","styledProps","_objectWithoutProperties","_excluded","_useTheme2","_React$useState","useState","_React$useState2","_slicedToArray","selectedRows","setSelectedRows","_React$useState3","_React$useState4","disabledRows","setDisabledRows","_React$useState5","nodes","_React$useState6","totalItems","setTotalItems","_React$useState7","_React$useState8","paginationType","setPaginationType","_React$useState9","_React$useState10","headerRowDensity","setHeaderRowDensity","shouldHeaderBeSticky","backgroundColor","tableBackgroundColor","_usePresence","usePresence","transitionDuration","isEntering","isRefreshSpinnerMounted","isMounted","isExiting","isVisible","columnCount","firstColumnStickyHeaderCellCSS","firstColumnStickyZIndex","checkboxCellWidth","firstColumnStickyFooterCellCSS","firstColumnStickyBodyCellCSS","tableTheme","useTableTheme","Table","makeBorderSize","border","width","thin","colors","surface","gray","muted","getIn","HeaderCell","Cell","FooterCell","useEffect","onSelectChange","action","state","_state$ids","selectedIds","id","ids","values","node","includes","rowSelectConfig","useRowSelect","onChange","clickType","SelectClickTypes","RowClick","ButtonClick","rowSelect","toggleRowSelectionById","useMemo","fns","onToggleById","deselectAllRows","onRemoveAll","toggleAllRowsSelection","map","item","Boolean","onAddAll","handleSortChange","sortKey","isSortReversed","reverse","sort","useSort","sortFns","currentSortedState","sortableColumns","Object","keys","toggleSort","useCallback","onToggleSort","hasPagination","paginationConfig","usePagination","page","size","tablePagination","defaultPageSize","isServer","currentPaginationState","setPaginationPage","onSetPage","setPaginationRowSize","onSetSize","isValidAllowedChildren","TableToolbar","throwBladeError","message","moduleName","tableContext","_jsx","TableContext","Provider","value","display","flex","alignItems","justifyContent","getStyledProps","metaAttribute","name","MetaConstants","Spinner","accessibilityLabel","_jsxs","position","zIndex","refreshWrapperZIndex","color","role","layout","fixedHeader","horizontalScroll","select","makeAccessible","multiSelectable","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAMA,aAGL,GAAG;EACFC,MAAM,EAAEC,WAAW,CAACC,YAAY;EAChCC,QAAQ,EAAEF,WAAW,CAACG,WAAW;AACjCC,EAAAA,IAAI,EAAEC,SAAAA;AACR,CAAC,CAAA;;AAED;AACA;AACA;AACA,IAAMC,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAIC,QAA0C,EAAa;AACtF,EAAA,IAAMC,kBAAkB,GAAGD,QAAQ,CAAC,EAAE,CAAC,CAAA;EACvC,IAAIC,kBAAkB,iBAAIC,cAAK,CAACC,cAAc,CAACF,kBAAkB,CAAC,EAAE;IAClE,IAAMG,mBAAmB,GAAGF,cAAK,CAACG,QAAQ,CAACC,OAAO,CAACL,kBAAkB,CAAC,CAAA;IACtE,kBAAIC,cAAK,CAACC,cAAc,CAACC,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE;AAAA,MAAA,IAAAG,qBAAA,CAAA;AAChD,MAAA,IAAMC,2BAA2B,GAAGN,cAAK,CAACG,QAAQ,CAACC,OAAO,CACxDF,mBAAmB,CAAC,CAAC,CAAC,CAACK,KAAK,CAACT,QAC/B,CAAC,CAAA;AACD,MAAA,IAAMU,WAAW,GAAGF,2BAA2B,CAACG,IAAI,CAClD,UAACC,KAAK,EAAA;AAAA,QAAA,OAAKC,cAAc,CAACD,KAAK,CAAC,KAAKE,YAAY,CAACC,WAAW,CAAA;AAAA,OAC/D,CAAC,CAAA;MACD,IAAMC,wBAAwB,gBAAGd,cAAK,CAACC,cAAc,CAACO,WAAW,CAAC,GAC9DR,cAAK,CAACG,QAAQ,CAACC,OAAO,CAACI,WAAW,CAACD,KAAK,CAACT,QAAQ,CAAC,GAClD,IAAI,CAAA;MACR,IAAMiB,cAAc,GAAGD,wBAAwB,KAAxBA,IAAAA,IAAAA,wBAAwB,KAAxB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B,QAAAA,KAAK,EAAE6F,UAAW;AAClBqG,QAAAA,MAAM,EAAEtK,aAAa,KAAK,MAAM,GAAG2F,eAAe,GAAG,IAAK;AAC1DuB,QAAAA,IAAI,EAAE1G,aAAa,GAAG0G,IAAI,GAAG,IAAK;AAClCjJ,QAAAA,YAAY,EAAE;AACZM,UAAAA,MAAM,EAANA,MAAAA;SACA;AACFmC,QAAAA,UAAU,EAAEkH,aAAa,GAAGC,gBAAgB,GAAG,IAAA;AAAK,OAAA,EAChD0C,cAAc,CAAC;QAAEC,eAAe,EAAExK,aAAa,KAAK,UAAA;OAAY,CAAC,CACjEwJ,EAAAA,aAAa,CAAC;QAAEC,IAAI,EAAEC,aAAa,CAACvF,KAAAA;AAAM,OAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAAjI,QAAAA,QAAA,EAE/CA,QAAAA;OACe,CAAA,CAAC,EAClBwE,UAAU,CAAA;KACJ,CAAA,CAAA;AACV,GACoB,CAAC,CAAA;AAE5B,CAAC,CAAA;AAED,IAAMyD,KAAK,gBAAGsG,wBAAwB,CAAC/K,MAAM,EAAE;EAC7C3B,WAAW,EAAEf,YAAY,CAACmH,KAAAA;AAC5B,CAAC;;;;"}
@@ -15,6 +15,7 @@ import '../../utils/metaAttribute/index.js';
15
15
  import '../../utils/assignWithoutSideEffects/index.js';
16
16
  import '../../utils/getFocusRingStyles/index.js';
17
17
  import '../../tokens/global/index.js';
18
+ import '../../utils/makeAccessible/index.js';
18
19
  import { jsx, jsxs } from 'react/jsx-runtime';
19
20
  import { makeMotionTime } from '../../utils/makeMotionTime/makeMotionTime.web.js';
20
21
  import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
@@ -27,6 +28,7 @@ import { makeSize } from '../../utils/makeSize/makeSize.js';
27
28
  import { size } from '../../tokens/global/size.js';
28
29
  import { Text } from '../Typography/Text/Text.js';
29
30
  import { Checkbox } from '../Checkbox/Checkbox.js';
31
+ import { makeAccessible } from '../../utils/makeAccessible/makeAccessible.web.js';
30
32
 
31
33
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
32
34
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -311,7 +313,7 @@ var _TableRow = function _TableRow(_ref8) {
311
313
  });
312
314
  }
313
315
  }, [isDisabled, item.id, setDisabledRows]);
314
- return /*#__PURE__*/jsxs(StyledRow, _objectSpread(_objectSpread({
316
+ return /*#__PURE__*/jsxs(StyledRow, _objectSpread(_objectSpread(_objectSpread({
315
317
  disabled: isDisabled,
316
318
  $isSelectable: isDisabled ? false : isSelectable,
317
319
  $isHoverable: isDisabled ? false : Boolean(onHover) || Boolean(_onClick),
@@ -328,7 +330,9 @@ var _TableRow = function _TableRow(_ref8) {
328
330
  item: item
329
331
  });
330
332
  }
331
- }, metaAttribute({
333
+ }, makeAccessible({
334
+ selected: isSelected
335
+ })), metaAttribute({
332
336
  name: MetaConstants.TableRow
333
337
  })), {}, {
334
338
  children: [isMultiSelect && /*#__PURE__*/jsx(TableCheckboxCell, {
@@ -1 +1 @@
1
- {"version":3,"file":"TableBody.web.js","sources":["../../../../../../src/components/Table/TableBody.web.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { Body, Row, Cell } from '@table-library/react-table-library/table';\nimport styled from 'styled-components';\nimport { useTableContext } from './TableContext';\nimport { checkboxCellWidth, tableRow } from './tokens';\nimport { ComponentIds } from './componentIds';\nimport type {\n TableProps,\n TableBodyProps,\n TableRowProps,\n TableCellProps,\n TableBackgroundColors,\n} from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { Text } from '~components/Typography';\nimport type { CheckboxProps } from '~components/Checkbox';\nimport { Checkbox } from '~components/Checkbox';\nimport { makeMotionTime, makeSize, makeSpace } from '~utils';\nimport BaseBox from '~components/Box/BaseBox';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport { size } from '~tokens/global';\n\nconst StyledBody = styled(Body)<{\n $isSelectable: boolean;\n $showStripedRows: boolean;\n}>(({ theme, $showStripedRows, $isSelectable }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n border: 'none',\n transition: rowBackgroundTransition,\n\n '& tr:last-child .cell-wrapper': {\n borderBottom: 'none',\n },\n\n '& .row-select-single-selected .cell-wrapper-base, .row-select-selected .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelected),\n },\n '& .row-select-single-selected:hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedHover),\n },\n '& .row-select-single-selected:focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedFocus),\n },\n '& .row-select-single-selected:active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedActive),\n },\n\n ...($isSelectable && {\n '& tr:active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripeWrapper.backgroundColorActive),\n },\n }),\n\n ...($showStripedRows && {\n '& tr:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColor),\n },\n '& tr:nth-child(even) .cell-wrapper-base': {\n backgroundColor: tableRow.stripe.backgroundColor,\n },\n }),\n\n ...($showStripedRows &&\n $isSelectable && {\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorHover),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorFocus),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorActive),\n },\n '& .row-select-single-selected:nth-child(even) .cell-wrapper, .row-select-selected:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorSelected),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedHover,\n ),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedFocus,\n ),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedActive,\n ),\n },\n\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorHover),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorFocus),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorActive),\n },\n\n '& .row-select-single-selected:nth-child(even) .cell-wrapper-base, .row-select-selected:nth-child(even) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelected),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedHover),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedFocus),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedActive),\n },\n }),\n },\n };\n});\n\nconst _TableBody = ({ children }: TableBodyProps): React.ReactElement => {\n const { showStripedRows, selectionType } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledBody\n $isSelectable={isSelectable}\n $showStripedRows={showStripedRows}\n $showBorderedCells={true}\n {...metaAttribute({ name: MetaConstants.TableBody })}\n >\n {children}\n </StyledBody>\n );\n};\n\nconst TableBody = assignWithoutSideEffects(_TableBody, {\n componentId: ComponentIds.TableBody,\n});\n\nexport const StyledCell = styled(Cell)<{\n $backgroundColor: TableBackgroundColors;\n}>(({ theme, $backgroundColor }) => ({\n '&&&': {\n height: '100%',\n backgroundColor: getIn(theme.colors, $backgroundColor),\n '& > div:first-child': {\n alignSelf: 'stretch',\n },\n '&:focus-visible': { ...getFocusRingStyles({ theme, negativeOffset: true }) },\n },\n}));\n\nexport const CellWrapper = styled(BaseBox)<{\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n showStripedRows?: boolean;\n hasPadding?: boolean;\n}>(({ theme, rowDensity, showStripedRows, hasPadding = true }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n transition: rowBackgroundTransition,\n backgroundColor: tableRow.nonStripeWrapper.backgroundColor,\n paddingLeft: hasPadding ? makeSpace(getIn(theme, tableRow.paddingLeft[rowDensity])) : '0px',\n paddingRight: hasPadding ? makeSpace(getIn(theme, tableRow.paddingRight[rowDensity])) : '0px',\n minHeight: makeSize(getIn(size, tableRow.minHeight[rowDensity])),\n height: '100%',\n width: '100%',\n ...(!showStripedRows && {\n borderBottomWidth: makeSpace(getIn(theme.border.width, tableRow.borderBottomWidth)),\n borderBottomColor: getIn(theme.colors, tableRow.borderColor),\n borderBottomStyle: 'solid',\n }),\n },\n };\n});\n\nconst _TableCell = ({ children }: TableCellProps): React.ReactElement => {\n const isChildrenString = typeof children === 'string';\n const { selectionType, rowDensity, showStripedRows, backgroundColor } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledCell\n tabIndex={0}\n role=\"cell\"\n $backgroundColor={backgroundColor}\n {...metaAttribute({ name: MetaConstants.TableCell })}\n >\n <BaseBox className=\"cell-wrapper-base\" display=\"flex\" alignItems=\"center\" height=\"100%\">\n <CellWrapper\n className=\"cell-wrapper\"\n rowDensity={rowDensity}\n showStripedRows={showStripedRows}\n display=\"flex\"\n alignItems=\"center\"\n flex={1}\n // when a direct string child is passed we want to disable pointer events\n // for custom cells components, consumers can handle pointer events themselves\n pointerEvents={isChildrenString && isSelectable ? 'none' : 'auto'}\n >\n {isChildrenString ? <Text size=\"medium\">{children}</Text> : children}\n </CellWrapper>\n </BaseBox>\n </StyledCell>\n );\n};\n\nconst TableCell = assignWithoutSideEffects(_TableCell, {\n componentId: ComponentIds.TableCell,\n});\n\nconst TableCheckboxCell = ({\n isChecked,\n onChange,\n isDisabled,\n}: {\n isChecked: CheckboxProps['isChecked'];\n onChange: CheckboxProps['onChange'];\n isDisabled?: boolean;\n}): React.ReactElement => {\n return (\n <TableCell>\n <BaseBox\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n flex={1}\n width={makeSize(checkboxCellWidth)}\n onClick={(e) => e.stopPropagation()}\n >\n <Checkbox isDisabled={isDisabled} isChecked={isChecked} onChange={onChange} />\n </BaseBox>\n </TableCell>\n );\n};\n\nconst StyledRow = styled(Row)<{\n $isSelectable: boolean;\n $isHoverable: boolean;\n $showBorderedCells: boolean;\n}>(({ theme, $isSelectable, $isHoverable, $showBorderedCells }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n backgroundColor: 'transparent',\n '& .cell-wrapper': $showBorderedCells\n ? {\n borderRightWidth: makeSpace(getIn(theme.border.width, tableRow.borderBottomWidth)),\n borderRightStyle: 'solid',\n borderRightColor: getIn(theme.colors, tableRow.borderColor),\n }\n : undefined,\n '& td:last-child .cell-wrapper': {\n borderRight: 'none',\n },\n ...(($isHoverable || $isSelectable) && {\n '&:hover:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n cursor: 'pointer',\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorHover),\n },\n }),\n ...($isSelectable && {\n '&:focus:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorFocus),\n cursor: 'pointer',\n },\n '&:active:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorActive),\n cursor: 'pointer',\n },\n }),\n '&:focus': getFocusRingStyles({ theme, negativeOffset: true }),\n },\n };\n});\n\nconst _TableRow = <Item,>({\n children,\n item,\n isDisabled,\n onHover,\n onClick,\n}: TableRowProps<Item>): React.ReactElement => {\n const {\n selectionType,\n selectedRows,\n toggleRowSelectionById,\n setDisabledRows,\n showBorderedCells,\n } = useTableContext();\n const isSelectable = selectionType !== 'none';\n const isMultiSelect = selectionType === 'multiple';\n const isSelected = selectedRows?.includes(item.id);\n useEffect(() => {\n if (isDisabled) {\n setDisabledRows((prev) => [...prev, item.id]);\n }\n }, [isDisabled, item.id, setDisabledRows]);\n\n return (\n <StyledRow\n disabled={isDisabled}\n $isSelectable={isDisabled ? false : isSelectable}\n $isHoverable={isDisabled ? false : Boolean(onHover) || Boolean(onClick)}\n $showBorderedCells={showBorderedCells}\n item={item}\n className={isDisabled ? 'disabled-row' : ''}\n onMouseEnter={() => onHover?.({ item })}\n onClick={() => onClick?.({ item })}\n {...metaAttribute({ name: MetaConstants.TableRow })}\n >\n {isMultiSelect && (\n <TableCheckboxCell\n isChecked={isSelected}\n onChange={() => !isDisabled && toggleRowSelectionById(item.id)}\n isDisabled={isDisabled}\n />\n )}\n {children}\n </StyledRow>\n );\n};\n\nconst TableRow = assignWithoutSideEffects(_TableRow, {\n componentId: ComponentIds.TableRow,\n});\n\nexport { TableBody, TableRow, TableCell };\n"],"names":["StyledBody","styled","Body","withConfig","displayName","componentId","_ref","theme","$showStripedRows","$isSelectable","rowBackgroundTransition","concat","makeMotionTime","getIn","motion","tableRow","backgroundColorMotionDuration","backgroundColorMotionEasing","_objectSpread","border","transition","borderBottom","backgroundColor","colors","nonStripe","backgroundColorSelected","backgroundColorSelectedHover","backgroundColorSelectedFocus","backgroundColorSelectedActive","nonStripeWrapper","backgroundColorActive","stripeWrapper","stripe","backgroundColorHover","backgroundColorFocus","_TableBody","_ref2","children","_useTableContext","useTableContext","showStripedRows","selectionType","isSelectable","_jsx","$showBorderedCells","metaAttribute","name","MetaConstants","TableBody","assignWithoutSideEffects","ComponentIds","StyledCell","Cell","_ref3","$backgroundColor","height","alignSelf","getFocusRingStyles","negativeOffset","CellWrapper","BaseBox","_ref4","rowDensity","_ref4$hasPadding","hasPadding","paddingLeft","makeSpace","paddingRight","minHeight","makeSize","size","width","borderBottomWidth","borderBottomColor","borderColor","borderBottomStyle","_TableCell","_ref5","isChildrenString","_useTableContext2","tabIndex","role","TableCell","className","display","alignItems","flex","pointerEvents","Text","TableCheckboxCell","_ref6","isChecked","onChange","isDisabled","justifyContent","checkboxCellWidth","onClick","e","stopPropagation","Checkbox","StyledRow","Row","_ref7","$isHoverable","borderRightWidth","borderRightStyle","borderRightColor","undefined","borderRight","cursor","_TableRow","_ref8","item","onHover","_useTableContext3","selectedRows","toggleRowSelectionById","setDisabledRows","showBorderedCells","isMultiSelect","isSelected","includes","id","useEffect","prev","_toConsumableArray","_jsxs","disabled","Boolean","onMouseEnter","TableRow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAMA,UAAU,gBAAGC,MAAM,CAACC,IAAI,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,0BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAG5B,CAAA,CAAA,UAAAC,IAAA,EAAgD;AAAA,EAAA,IAA7CC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,gBAAgB,GAAAF,IAAA,CAAhBE,gBAAgB;IAAEC,aAAa,GAAAH,IAAA,CAAbG,aAAa,CAAA;AAC1C,EAAA,IAAMC,uBAAuB,GAAA,mBAAA,CAAAC,MAAA,CAAuBC,cAAc,CAChEC,KAAK,CAACN,KAAK,CAACO,MAAM,EAAEC,QAAQ,CAACC,6BAA6B,CAC5D,CAAC,EAAAL,GAAAA,CAAAA,CAAAA,MAAA,CAAIE,KAAK,CAACN,KAAK,CAACO,MAAM,EAAEC,QAAQ,CAACE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AAA,SAAS,EAAEU,UAAU,GAAG,cAAc,GAAG,EAAG;IAC5CoC,YAAY,EAAE,SAAAA,YAAA,GAAA;AAAA,MAAA,OAAMhB,OAAO,KAAA,IAAA,IAAPA,OAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAPA,OAAO,CAAG;AAAED,QAAAA,IAAI,EAAJA,IAAAA;AAAK,OAAC,CAAC,CAAA;KAAC;IACxChB,OAAO,EAAE,SAAAA,OAAA,GAAA;AAAA,MAAA,OAAMA,QAAO,KAAA,IAAA,IAAPA,QAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAPA,QAAO,CAAG;AAAEgB,QAAAA,IAAI,EAAJA,IAAAA;AAAK,OAAC,CAAC,CAAA;AAAA,KAAA;AAAC,GAAA,EAC/BnE,aAAa,CAAC;IAAEC,IAAI,EAAEC,aAAa,CAACmF,QAAAA;AAAS,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AAAA7F,IAAAA,QAAA,EAElDkF,CAAAA,aAAa,iBACZ5E,GAAA,CAAC8C,iBAAiB,EAAA;AAChBE,MAAAA,SAAS,EAAE6B,UAAW;MACtB5B,QAAQ,EAAE,SAAAA,QAAA,GAAA;QAAA,OAAM,CAACC,UAAU,IAAIuB,sBAAsB,CAACJ,IAAI,CAACU,EAAE,CAAC,CAAA;OAAC;AAC/D7B,MAAAA,UAAU,EAAEA,UAAAA;KACb,CACF,EACAxD,QAAQ,CAAA;AAAA,GAAA,CACA,CAAC,CAAA;AAEhB,CAAC,CAAA;AAED,IAAM6F,QAAQ,gBAAGjF,wBAAwB,CAAC6D,SAAS,EAAE;EACnDzG,WAAW,EAAE6C,YAAY,CAACgF,QAAAA;AAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"TableBody.web.js","sources":["../../../../../../src/components/Table/TableBody.web.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { Body, Row, Cell } from '@table-library/react-table-library/table';\nimport styled from 'styled-components';\nimport { useTableContext } from './TableContext';\nimport { checkboxCellWidth, tableRow } from './tokens';\nimport { ComponentIds } from './componentIds';\nimport type {\n TableProps,\n TableBodyProps,\n TableRowProps,\n TableCellProps,\n TableBackgroundColors,\n} from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { Text } from '~components/Typography';\nimport type { CheckboxProps } from '~components/Checkbox';\nimport { Checkbox } from '~components/Checkbox';\nimport { makeMotionTime, makeSize, makeSpace } from '~utils';\nimport BaseBox from '~components/Box/BaseBox';\nimport { MetaConstants, metaAttribute } from '~utils/metaAttribute';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport { size } from '~tokens/global';\nimport { makeAccessible } from '~utils/makeAccessible';\n\nconst StyledBody = styled(Body)<{\n $isSelectable: boolean;\n $showStripedRows: boolean;\n}>(({ theme, $showStripedRows, $isSelectable }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n border: 'none',\n transition: rowBackgroundTransition,\n\n '& tr:last-child .cell-wrapper': {\n borderBottom: 'none',\n },\n\n '& .row-select-single-selected .cell-wrapper-base, .row-select-selected .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelected),\n },\n '& .row-select-single-selected:hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedHover),\n },\n '& .row-select-single-selected:focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedFocus),\n },\n '& .row-select-single-selected:active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorSelectedActive),\n },\n\n ...($isSelectable && {\n '& tr:active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.nonStripeWrapper.backgroundColorActive),\n },\n }),\n\n ...($showStripedRows && {\n '& tr:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColor),\n },\n '& tr:nth-child(even) .cell-wrapper-base': {\n backgroundColor: tableRow.stripe.backgroundColor,\n },\n }),\n\n ...($showStripedRows &&\n $isSelectable && {\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorHover),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorFocus),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorActive),\n },\n '& .row-select-single-selected:nth-child(even) .cell-wrapper, .row-select-selected:nth-child(even) .cell-wrapper': {\n backgroundColor: getIn(theme.colors, tableRow.stripeWrapper.backgroundColorSelected),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedHover,\n ),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedFocus,\n ),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper': {\n backgroundColor: getIn(\n theme.colors,\n tableRow.stripeWrapper.backgroundColorSelectedActive,\n ),\n },\n\n '& tr:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorHover),\n },\n '& tr:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorFocus),\n },\n '& tr:nth-child(even):active:not(.disabled-row) .cell-wrapper-base': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorActive),\n },\n\n '& .row-select-single-selected:nth-child(even) .cell-wrapper-base, .row-select-selected:nth-child(even) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelected),\n },\n '& .row-select-single-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):hover:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedHover),\n },\n '& .row-select-single-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):focus:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedFocus),\n },\n '& .row-select-single-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base, .row-select-selected:nth-child(even):active:not(.disabled-row) .cell-wrapper-base ': {\n backgroundColor: getIn(theme.colors, tableRow.stripe.backgroundColorSelectedActive),\n },\n }),\n },\n };\n});\n\nconst _TableBody = ({ children }: TableBodyProps): React.ReactElement => {\n const { showStripedRows, selectionType } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledBody\n $isSelectable={isSelectable}\n $showStripedRows={showStripedRows}\n $showBorderedCells={true}\n {...metaAttribute({ name: MetaConstants.TableBody })}\n >\n {children}\n </StyledBody>\n );\n};\n\nconst TableBody = assignWithoutSideEffects(_TableBody, {\n componentId: ComponentIds.TableBody,\n});\n\nexport const StyledCell = styled(Cell)<{\n $backgroundColor: TableBackgroundColors;\n}>(({ theme, $backgroundColor }) => ({\n '&&&': {\n height: '100%',\n backgroundColor: getIn(theme.colors, $backgroundColor),\n '& > div:first-child': {\n alignSelf: 'stretch',\n },\n '&:focus-visible': { ...getFocusRingStyles({ theme, negativeOffset: true }) },\n },\n}));\n\nexport const CellWrapper = styled(BaseBox)<{\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n showStripedRows?: boolean;\n hasPadding?: boolean;\n}>(({ theme, rowDensity, showStripedRows, hasPadding = true }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n transition: rowBackgroundTransition,\n backgroundColor: tableRow.nonStripeWrapper.backgroundColor,\n paddingLeft: hasPadding ? makeSpace(getIn(theme, tableRow.paddingLeft[rowDensity])) : '0px',\n paddingRight: hasPadding ? makeSpace(getIn(theme, tableRow.paddingRight[rowDensity])) : '0px',\n minHeight: makeSize(getIn(size, tableRow.minHeight[rowDensity])),\n height: '100%',\n width: '100%',\n ...(!showStripedRows && {\n borderBottomWidth: makeSpace(getIn(theme.border.width, tableRow.borderBottomWidth)),\n borderBottomColor: getIn(theme.colors, tableRow.borderColor),\n borderBottomStyle: 'solid',\n }),\n },\n };\n});\n\nconst _TableCell = ({ children }: TableCellProps): React.ReactElement => {\n const isChildrenString = typeof children === 'string';\n const { selectionType, rowDensity, showStripedRows, backgroundColor } = useTableContext();\n const isSelectable = selectionType !== 'none';\n\n return (\n <StyledCell\n tabIndex={0}\n role=\"cell\"\n $backgroundColor={backgroundColor}\n {...metaAttribute({ name: MetaConstants.TableCell })}\n >\n <BaseBox className=\"cell-wrapper-base\" display=\"flex\" alignItems=\"center\" height=\"100%\">\n <CellWrapper\n className=\"cell-wrapper\"\n rowDensity={rowDensity}\n showStripedRows={showStripedRows}\n display=\"flex\"\n alignItems=\"center\"\n flex={1}\n // when a direct string child is passed we want to disable pointer events\n // for custom cells components, consumers can handle pointer events themselves\n pointerEvents={isChildrenString && isSelectable ? 'none' : 'auto'}\n >\n {isChildrenString ? <Text size=\"medium\">{children}</Text> : children}\n </CellWrapper>\n </BaseBox>\n </StyledCell>\n );\n};\n\nconst TableCell = assignWithoutSideEffects(_TableCell, {\n componentId: ComponentIds.TableCell,\n});\n\nconst TableCheckboxCell = ({\n isChecked,\n onChange,\n isDisabled,\n}: {\n isChecked: CheckboxProps['isChecked'];\n onChange: CheckboxProps['onChange'];\n isDisabled?: boolean;\n}): React.ReactElement => {\n return (\n <TableCell>\n <BaseBox\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n flex={1}\n width={makeSize(checkboxCellWidth)}\n onClick={(e) => e.stopPropagation()}\n >\n <Checkbox isDisabled={isDisabled} isChecked={isChecked} onChange={onChange} />\n </BaseBox>\n </TableCell>\n );\n};\n\nconst StyledRow = styled(Row)<{\n $isSelectable: boolean;\n $isHoverable: boolean;\n $showBorderedCells: boolean;\n}>(({ theme, $isSelectable, $isHoverable, $showBorderedCells }) => {\n const rowBackgroundTransition = `background-color ${makeMotionTime(\n getIn(theme.motion, tableRow.backgroundColorMotionDuration),\n )} ${getIn(theme.motion, tableRow.backgroundColorMotionEasing)}`;\n\n return {\n '&&&': {\n backgroundColor: 'transparent',\n '& .cell-wrapper': $showBorderedCells\n ? {\n borderRightWidth: makeSpace(getIn(theme.border.width, tableRow.borderBottomWidth)),\n borderRightStyle: 'solid',\n borderRightColor: getIn(theme.colors, tableRow.borderColor),\n }\n : undefined,\n '& td:last-child .cell-wrapper': {\n borderRight: 'none',\n },\n ...(($isHoverable || $isSelectable) && {\n '&:hover:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n cursor: 'pointer',\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorHover),\n },\n }),\n ...($isSelectable && {\n '&:focus:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorFocus),\n cursor: 'pointer',\n },\n '&:active:not(.disabled-row) .cell-wrapper-base': {\n transition: rowBackgroundTransition,\n backgroundColor: getIn(theme.colors, tableRow.nonStripe.backgroundColorActive),\n cursor: 'pointer',\n },\n }),\n '&:focus': getFocusRingStyles({ theme, negativeOffset: true }),\n },\n };\n});\n\nconst _TableRow = <Item,>({\n children,\n item,\n isDisabled,\n onHover,\n onClick,\n}: TableRowProps<Item>): React.ReactElement => {\n const {\n selectionType,\n selectedRows,\n toggleRowSelectionById,\n setDisabledRows,\n showBorderedCells,\n } = useTableContext();\n const isSelectable = selectionType !== 'none';\n const isMultiSelect = selectionType === 'multiple';\n const isSelected = selectedRows?.includes(item.id);\n useEffect(() => {\n if (isDisabled) {\n setDisabledRows((prev) => [...prev, item.id]);\n }\n }, [isDisabled, item.id, setDisabledRows]);\n\n return (\n <StyledRow\n disabled={isDisabled}\n $isSelectable={isDisabled ? false : isSelectable}\n $isHoverable={isDisabled ? false : Boolean(onHover) || Boolean(onClick)}\n $showBorderedCells={showBorderedCells}\n item={item}\n className={isDisabled ? 'disabled-row' : ''}\n onMouseEnter={() => onHover?.({ item })}\n onClick={() => onClick?.({ item })}\n {...makeAccessible({ selected: isSelected })}\n {...metaAttribute({ name: MetaConstants.TableRow })}\n >\n {isMultiSelect && (\n <TableCheckboxCell\n isChecked={isSelected}\n onChange={() => !isDisabled && toggleRowSelectionById(item.id)}\n isDisabled={isDisabled}\n />\n )}\n {children}\n </StyledRow>\n );\n};\n\nconst TableRow = assignWithoutSideEffects(_TableRow, {\n componentId: ComponentIds.TableRow,\n});\n\nexport { TableBody, TableRow, TableCell };\n"],"names":["StyledBody","styled","Body","withConfig","displayName","componentId","_ref","theme","$showStripedRows","$isSelectable","rowBackgroundTransition","concat","makeMotionTime","getIn","motion","tableRow","backgroundColorMotionDuration","backgroundColorMotionEasing","_objectSpread","border","transition","borderBottom","backgroundColor","colors","nonStripe","backgroundColorSelected","backgroundColorSelectedHover","backgroundColorSelectedFocus","backgroundColorSelectedActive","nonStripeWrapper","backgroundColorActive","stripeWrapper","stripe","backgroundColorHover","backgroundColorFocus","_TableBody","_ref2","children","_useTableContext","useTableContext","showStripedRows","selectionType","isSelectable","_jsx","$showBorderedCells","metaAttribute","name","MetaConstants","TableBody","assignWithoutSideEffects","ComponentIds","StyledCell","Cell","_ref3","$backgroundColor","height","alignSelf","getFocusRingStyles","negativeOffset","CellWrapper","BaseBox","_ref4","rowDensity","_ref4$hasPadding","hasPadding","paddingLeft","makeSpace","paddingRight","minHeight","makeSize","size","width","borderBottomWidth","borderBottomColor","borderColor","borderBottomStyle","_TableCell","_ref5","isChildrenString","_useTableContext2","tabIndex","role","TableCell","className","display","alignItems","flex","pointerEvents","Text","TableCheckboxCell","_ref6","isChecked","onChange","isDisabled","justifyContent","checkboxCellWidth","onClick","e","stopPropagation","Checkbox","StyledRow","Row","_ref7","$isHoverable","borderRightWidth","borderRightStyle","borderRightColor","undefined","borderRight","cursor","_TableRow","_ref8","item","onHover","_useTableContext3","selectedRows","toggleRowSelectionById","setDisabledRows","showBorderedCells","isMultiSelect","isSelected","includes","id","useEffect","prev","_toConsumableArray","_jsxs","disabled","Boolean","onMouseEnter","makeAccessible","selected","TableRow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAMA,UAAU,gBAAGC,MAAM,CAACC,IAAI,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,0BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAG5B,CAAA,CAAA,UAAAC,IAAA,EAAgD;AAAA,EAAA,IAA7CC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,gBAAgB,GAAAF,IAAA,CAAhBE,gBAAgB;IAAEC,aAAa,GAAAH,IAAA,CAAbG,aAAa,CAAA;AAC1C,EAAA,IAAMC,uBAAuB,GAAA,mBAAA,CAAAC,MAAA,CAAuBC,cAAc,CAChEC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AwB,CAAC6D,SAAS,EAAE;EACnDzG,WAAW,EAAE6C,YAAY,CAACkF,QAAAA;AAC5B,CAAC;;;;"}
@@ -1,29 +1,25 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
- import styled from 'styled-components';
2
+ import React__default from 'react';
3
3
  import { useTooltipContext } from './TooltipContext.js';
4
4
  import '../Box/BaseBox/index.js';
5
5
  import '../../utils/metaAttribute/index.js';
6
+ import { jsx } from 'react/jsx-runtime';
6
7
  import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
7
8
  import { metaAttribute } from '../../utils/metaAttribute/metaAttribute.web.js';
8
9
  import { MetaConstants } from '../../utils/metaAttribute/metaConstants.js';
9
10
 
10
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
12
- var TooltipInteractiveWrapper = /*#__PURE__*/styled(BaseBox).attrs(function () {
13
- return _objectSpread({
14
- tabIndex: -1
13
+ var TooltipInteractiveWrapper = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
14
+ useTooltipContext();
15
+ return /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread({
16
+ ref: ref,
17
+ tabIndex: -1,
18
+ display: "inline-block"
15
19
  }, metaAttribute({
16
20
  testID: 'tooltip-interactive-wrapper',
17
21
  name: MetaConstants.TooltipInteractiveWrapper
18
- }));
19
- }).withConfig({
20
- displayName: "TooltipInteractiveWrapperweb__TooltipInteractiveWrapper",
21
- componentId: "y7list-0"
22
- })(function () {
23
- useTooltipContext();
24
- return {
25
- display: 'inline-block'
26
- };
22
+ })), props));
27
23
  });
28
24
 
29
25
  export { TooltipInteractiveWrapper };
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipInteractiveWrapper.web.js","sources":["../../../../../../src/components/Tooltip/TooltipInteractiveWrapper.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { useTooltipContext } from './TooltipContext';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\nconst TooltipInteractiveWrapper = styled(BaseBox).attrs(() => {\n return {\n tabIndex: -1,\n ...metaAttribute({\n testID: 'tooltip-interactive-wrapper',\n name: MetaConstants.TooltipInteractiveWrapper,\n }),\n };\n})(() => {\n useTooltipContext();\n\n return {\n display: 'inline-block',\n };\n});\n\nexport { TooltipInteractiveWrapper };\n"],"names":["TooltipInteractiveWrapper","styled","BaseBox","attrs","_objectSpread","tabIndex","metaAttribute","testID","name","MetaConstants","withConfig","displayName","componentId","useTooltipContext","display"],"mappings":";;;;;;;;;;;AAKMA,IAAAA,yBAAyB,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAACC,KAAK,CAAC,YAAM;AAC5D,EAAA,OAAAC,aAAA,CAAA;AACEC,IAAAA,QAAQ,EAAE,CAAC,CAAA;AAAC,GAAA,EACTC,aAAa,CAAC;AACfC,IAAAA,MAAM,EAAE,6BAA6B;IACrCC,IAAI,EAAEC,aAAa,CAACT,yBAAAA;AACtB,GAAC,CAAC,CAAA,CAAA;AAEN,CAAC,CAAC,CAAAU,UAAA,CAAA;EAAAC,WAAA,EAAA,yDAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAAC,YAAM;AACPC,EAAAA,iBAAiB,EAAE,CAAA;EAEnB,OAAO;AACLC,IAAAA,OAAO,EAAE,cAAA;GACV,CAAA;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"TooltipInteractiveWrapper.web.js","sources":["../../../../../../src/components/Tooltip/TooltipInteractiveWrapper.web.tsx"],"sourcesContent":["import React from 'react';\nimport { useTooltipContext } from './TooltipContext';\nimport type { BaseBoxProps } from '~components/Box/BaseBox';\nimport BaseBox from '~components/Box/BaseBox';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\n\nconst TooltipInteractiveWrapper = React.forwardRef<HTMLDivElement, Omit<BaseBoxProps, 'as'>>(\n (props, ref) => {\n useTooltipContext();\n\n return (\n <BaseBox\n ref={ref}\n tabIndex={-1}\n display=\"inline-block\"\n {...metaAttribute({\n testID: 'tooltip-interactive-wrapper',\n name: MetaConstants.TooltipInteractiveWrapper,\n })}\n {...props}\n />\n );\n },\n);\n\nexport { TooltipInteractiveWrapper };\n"],"names":["TooltipInteractiveWrapper","React","forwardRef","props","ref","useTooltipContext","_jsx","BaseBox","_objectSpread","tabIndex","display","metaAttribute","testID","name","MetaConstants"],"mappings":";;;;;;;;;;;;AAMMA,IAAAA,yBAAyB,gBAAGC,cAAK,CAACC,UAAU,CAChD,UAACC,KAAK,EAAEC,GAAG,EAAK;AACdC,EAAAA,iBAAiB,EAAE,CAAA;AAEnB,EAAA,oBACEC,GAAA,CAACC,OAAO,EAAAC,aAAA,CAAAA,aAAA,CAAA;AACNJ,IAAAA,GAAG,EAAEA,GAAI;IACTK,QAAQ,EAAE,CAAC,CAAE;AACbC,IAAAA,OAAO,EAAC,cAAA;AAAc,GAAA,EAClBC,aAAa,CAAC;AAChBC,IAAAA,MAAM,EAAE,6BAA6B;IACrCC,IAAI,EAAEC,aAAa,CAACd,yBAAAA;AACtB,GAAC,CAAC,CAAA,EACEG,KAAK,CACV,CAAC,CAAA;AAEN,CACF;;;;"}
@@ -60,7 +60,7 @@ export { AccordionItemHeader } from './Accordion/AccordionItemHeader.js';
60
60
  export { AccordionItemBody } from './Accordion/AccordionItemBody.js';
61
61
  export { AccordionItem } from './Accordion/AccordionItem.js';
62
62
  export { ActionList } from './ActionList/ActionList.js';
63
- export { ActionListItem, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemText, ActionListSection } from './ActionList/ActionListItem.js';
63
+ export { ActionListItem, ActionListItemAvatar, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemText, ActionListSection } from './ActionList/ActionListItem.js';
64
64
  export { ActionListItemAsset } from './ActionList/ActionListItemAsset.web.js';
65
65
  export { Alert } from './Alert/Alert.js';
66
66
  export { Amount } from './Amount/Amount.js';
@@ -19,6 +19,7 @@ import '../Box/index.js';
19
19
  import { dropdownComponentIds } from '../Dropdown/dropdownComponentIds.js';
20
20
  import '../BaseMenu/index.js';
21
21
  import '../Checkbox/index.js';
22
+ import '../Avatar/index.js';
22
23
  import { jsxs, jsx } from 'react/jsx-runtime';
23
24
  import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
24
25
  import { makeSize } from '../../utils/makeSize/makeSize.js';
@@ -31,6 +32,7 @@ import { Divider } from '../Divider/Divider.js';
31
32
  import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
32
33
  import { useBaseMenuItem } from '../BaseMenu/BaseMenuContext.js';
33
34
  import { Box } from '../Box/Box.js';
35
+ import { Avatar } from '../Avatar/Avatar.web.js';
34
36
  import { Badge } from '../Badge/Badge.js';
35
37
  import { throwBladeError } from '../../utils/logger/logger.js';
36
38
  import { BaseMenuItem } from '../BaseMenu/BaseMenuItem/BaseMenuItem.js';
@@ -128,6 +130,14 @@ var _ActionListItemBadgeGroup = function _ActionListItemBadgeGroup(_ref3) {
128
130
  var ActionListItemBadgeGroup = /*#__PURE__*/assignWithoutSideEffects(_ActionListItemBadgeGroup, {
129
131
  componentId: componentIds.ActionListItemBadgeGroup
130
132
  });
133
+ var _ActionListItemAvatar = function _ActionListItemAvatar(avatarProps) {
134
+ return /*#__PURE__*/jsx(Avatar, _objectSpread({
135
+ size: "xsmall"
136
+ }, avatarProps));
137
+ };
138
+ var ActionListItemAvatar = /*#__PURE__*/assignWithoutSideEffects(_ActionListItemAvatar, {
139
+ componentId: componentIds.ActionListItemAvatar
140
+ });
131
141
  var _ActionListItemBadge = function _ActionListItemBadge(props) {
132
142
  return /*#__PURE__*/jsx(Badge, _objectSpread({
133
143
  size: "medium",
@@ -298,5 +308,5 @@ var ActionListItem = /*#__PURE__*/assignWithoutSideEffects( /*#__PURE__*/React__
298
308
  displayName: componentIds.ActionListItem
299
309
  });
300
310
 
301
- export { ActionListItem, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemText, ActionListSection };
311
+ export { ActionListItem, ActionListItemAvatar, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemText, ActionListSection };
302
312
  //# sourceMappingURL=ActionListItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActionListItem.js","sources":["../../../../../../src/components/ActionList/ActionListItem.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { TouchableOpacity } from 'react-native';\nimport { componentIds } from './componentIds';\nimport { validateActionListItemProps, getNormalTextColor } from './actionListUtils';\nimport { getActionListItemRole, getActionListSectionRole } from './getA11yRoles';\nimport { Divider } from '~components/Divider';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { Text } from '~components/Typography';\nimport type { Platform } from '~utils';\nimport { castWebType, isReactNative } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { StringChildrenType, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport type { BadgeProps } from '~components/Badge';\nimport { Badge } from '~components/Badge';\nimport { Box } from '~components/Box';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { BaseMenuItem, useBaseMenuItem } from '~components/BaseMenu';\nimport { Checkbox } from '~components/Checkbox';\n\ntype ActionListItemProps = {\n title: string;\n description?: string;\n onClick?: (clickProps: {\n name: string;\n value?: boolean;\n event: Platform.Select<{\n web: React.MouseEvent;\n native: React.TouchEvent<TouchableOpacity>;\n }>;\n }) => void;\n /**\n * value that you get from `onChange` event on SelectInput or in form submissions.\n */\n value: string;\n /**\n * Link to open when item is clicked.\n */\n href?: string;\n /**\n * HTML target of the link\n */\n target?: string;\n /**\n * Item that goes on left-side of item.\n *\n * Valid elements - `<ActionListItemIcon />`, `<ActionListItemAsset />`\n *\n * Will be overriden in multiselect\n */\n leading?: React.ReactNode;\n /**\n * Item that goes on right-side of item.\n *\n * Valid elements - `<ActionListItemText />`, `<ActionListItemIcon />`\n */\n trailing?: React.ReactNode;\n /**\n * Item that goes immediately next to the title.\n *\n * Valid elements - `<ActionListItemBadge />`, `<ActionListItemBadgeGroup />`\n *\n */\n titleSuffix?: React.ReactElement;\n isDisabled?: boolean;\n intent?: Extract<FeedbackColors, 'negative'>;\n /**\n * Can be used in combination of `onClick` to highlight item as selected in Button Triggers.\n *\n * When trigger is SelectInput, Use `value` prop on SelectInput instead to make dropdown controlled.\n */\n isSelected?: boolean;\n /**\n * Internally passed from ActionList. No need to pass it explicitly\n *\n * @private\n */\n _index?: number;\n} & TestID;\n\nconst StyledActionListSectionTitle = styled(BaseBox)((props) => ({\n // @TODO: replace this styled-component with new layout box when we have padding shorthand\n padding: makeSize(props.theme.spacing[3]),\n}));\n\ntype ActionListSectionProps = {\n title: string;\n children: React.ReactNode[] | React.ReactNode;\n /**\n * Internally used to hide the divider on final item in React Native.\n *\n * Should not be used by consumers (also won't work on web)\n *\n * @private\n */\n _hideDivider?: boolean;\n /**\n * Internally used to hide / show section in AutoComplete\n *\n * @private\n */\n _sectionChildValues?: string[];\n} & TestID;\nconst _ActionListSection = ({\n title,\n children,\n testID,\n _hideDivider,\n _sectionChildValues,\n}: ActionListSectionProps): React.ReactElement => {\n const { hasAutoCompleteInBottomSheetHeader, dropdownTriggerer, filteredValues } = useDropdown();\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const isSectionVisible = React.useMemo(() => {\n if (hasAutoComplete) {\n const visibleActionListItemInSection = _sectionChildValues?.find((actionItemValue) =>\n filteredValues.includes(actionItemValue),\n );\n\n return Boolean(visibleActionListItemInSection);\n }\n\n return true;\n }, [_sectionChildValues, hasAutoComplete, filteredValues]);\n\n const showDividerInRN = !(_hideDivider && isReactNative());\n const showDividerInAutoComplete = hasAutoComplete\n ? isSectionVisible && filteredValues.length > 1\n : true;\n\n return (\n <BaseBox\n {...makeAccessible({\n role: getActionListSectionRole(),\n label: title,\n })}\n {...metaAttribute({ name: MetaConstants.ActionListSection, testID })}\n >\n {/* We're announcing title as group label so we can hide this */}\n {isSectionVisible ? (\n <StyledActionListSectionTitle {...makeAccessible({ hidden: true })}>\n <Text color=\"surface.text.gray.muted\" size=\"small\" weight=\"semibold\">\n {title}\n </Text>\n </StyledActionListSectionTitle>\n ) : null}\n <BaseBox\n {...makeAccessible({\n // On web, we just wrap it in another listbox to announce item count properly for particular group.\n // On React Native, we ignore it since `menu` + `group` role will take care of accessibility\n role: isReactNative() ? undefined : 'listbox',\n })}\n >\n {children}\n </BaseBox>\n {showDividerInAutoComplete && showDividerInRN ? (\n <Divider marginX=\"spacing.3\" marginY=\"spacing.1\" />\n ) : null}\n </BaseBox>\n );\n};\n\nconst ActionListSection = assignWithoutSideEffects(_ActionListSection, {\n componentId: componentIds.ActionListSection,\n});\n\nconst _ActionListItemIcon = ({ icon }: { icon: IconComponent }): React.ReactElement => {\n const Icon = icon;\n const { color, isDisabled } = useBaseMenuItem();\n const iconState = isDisabled ? 'disabled' : 'muted';\n return (\n <Icon\n color={\n color === 'negative'\n ? 'feedback.icon.negative.intense'\n : `interactive.icon.gray.${iconState}`\n }\n size=\"medium\"\n />\n );\n};\n\nconst ActionListItemIcon = assignWithoutSideEffects(_ActionListItemIcon, {\n componentId: componentIds.ActionListItemIcon,\n});\n\nconst _ActionListItemBadgeGroup = ({\n children,\n}: {\n children: React.ReactElement[] | React.ReactElement;\n}): React.ReactElement => {\n return (\n <Box display=\"flex\" alignItems=\"center\" flexDirection=\"row\">\n {children}\n </Box>\n );\n};\n\nconst ActionListItemBadgeGroup = assignWithoutSideEffects(_ActionListItemBadgeGroup, {\n componentId: componentIds.ActionListItemBadgeGroup,\n});\n\nconst _ActionListItemBadge = (props: BadgeProps): React.ReactElement => {\n return <Badge size=\"medium\" marginLeft=\"spacing.3\" {...props} />;\n};\n\nconst ActionListItemBadge = assignWithoutSideEffects(_ActionListItemBadge, {\n componentId: componentIds.ActionListItemBadge,\n});\n\nconst _ActionListItemText = ({\n children,\n}: {\n children: StringChildrenType;\n}): React.ReactElement => {\n const { isDisabled } = useBaseMenuItem();\n\n return (\n <Text variant=\"caption\" color={getNormalTextColor(isDisabled, { isMuted: true })}>\n {children}\n </Text>\n );\n};\n\nconst ActionListItemText = assignWithoutSideEffects(_ActionListItemText, {\n componentId: componentIds.ActionListItemText,\n});\n\ntype ClickHandlerType = (e: React.MouseEvent<HTMLButtonElement>) => void;\n\nconst makeActionListItemClickable = (\n clickHandler: ClickHandlerType,\n): { onPress?: (e: React.TouchEvent<TouchableOpacity>) => void; onClick?: ClickHandlerType } => {\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: ignoring ReactNative press type for the peace of mind\n return { onPress: clickHandler };\n }\n\n return {\n onClick: clickHandler,\n };\n};\n\n/**\n * ### ActionListItem\n *\n * Creates option inside `ActionList`.\n *\n * #### Usage\n *\n * ```jsx\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * trailing={<ActionListItemText>⌘ + S</ActionListItemText>}\n * />\n * </ActionList>\n * ```\n */\nconst _ActionListItem = (props: ActionListItemProps): React.ReactElement => {\n const {\n activeIndex,\n dropdownBaseId,\n onOptionClick,\n selectedIndices,\n setShouldIgnoreBlurAnimation,\n selectionType,\n dropdownTriggerer,\n isKeydownPressed,\n filteredValues,\n hasAutoCompleteInBottomSheetHeader,\n } = useDropdown();\n\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const renderOnWebAs = props.href ? 'a' : 'button';\n\n /**\n * In SelectInput, returns the isSelected according to selected indexes in the state\n *\n * In Other Triggers (Menu Usecase), returns `props.isSelected` since passing the\n * isSelected prop explicitly is the only way to select item in menu\n */\n const getIsSelected = (): boolean | undefined => {\n if (dropdownTriggerer === dropdownComponentIds.triggers.SelectInput || hasAutoComplete) {\n if (typeof props._index === 'number') {\n return selectedIndices.includes(props._index);\n }\n\n return undefined;\n }\n\n return props.isSelected;\n };\n\n const isSelected = getIsSelected();\n\n React.useEffect(() => {\n validateActionListItemProps({\n leading: props.leading,\n trailing: props.trailing,\n titleSuffix: props.titleSuffix,\n });\n }, [props.leading, props.trailing, props.titleSuffix]);\n\n React.useEffect(() => {\n if (__DEV__) {\n if (\n dropdownTriggerer === dropdownComponentIds.triggers.SelectInput &&\n props.intent === 'negative'\n ) {\n throwBladeError({\n message:\n 'negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger',\n moduleName: 'ActionListItem',\n });\n }\n }\n }, [props.intent, dropdownTriggerer]);\n\n return (\n // We use this context to change the color of subcomponents like ActionListItemIcon, ActionListItemText, etc\n <BaseMenuItem\n isVisible={hasAutoComplete && filteredValues ? filteredValues.includes(props.value) : true}\n as={!isReactNative() ? renderOnWebAs : undefined}\n id={`${dropdownBaseId}-${props._index}`}\n tabIndex={-1}\n title={props.title}\n description={props.description}\n leading={\n selectionType === 'multiple' ? (\n <BaseBox\n pointerEvents=\"none\"\n // Adding aria-hidden because the listbox item in multiselect in itself explains the behaviour so announcing checkbox is unneccesary and just a nice UI tweak for us\n {...makeAccessible({\n hidden: true,\n })}\n >\n <Checkbox isChecked={isSelected} tabIndex={-1} isDisabled={props.isDisabled}>\n {/* \n Checkbox requires children. Didn't want to make it optional because its helpful for consumers\n But for this case in particular, we just want to use Text separately so that we can control spacing and color and keep it consistent with non-multiselect dropdowns\n */}\n {null}\n </Checkbox>\n </BaseBox>\n ) : (\n props.leading\n )\n }\n trailing={props.trailing}\n titleSuffix={props.titleSuffix}\n href={props.href}\n target={props.target}\n className={activeIndex === props._index ? 'active-focus' : ''}\n isSelected={isSelected}\n isDisabled={props.isDisabled}\n role={getActionListItemRole(dropdownTriggerer, props.href)}\n {...makeActionListItemClickable((e: React.MouseEvent<HTMLButtonElement>): void => {\n if (typeof props._index === 'number') {\n onOptionClick(e, props._index);\n props.onClick?.({ name: props.value, value: isSelected, event: castWebType(e) });\n }\n })}\n {...metaAttribute({ name: MetaConstants.ActionListItem, testID: props.testID })}\n onMouseDown={() => {\n // We want to keep focus on Dropdown's trigger while option is being clicked\n // So We set this flag that ignores the blur animation to avoid the flicker between focus out + focus in\n setShouldIgnoreBlurAnimation(true);\n }}\n onMouseUp={() => {\n // (Contd from above comment...) We set this flag back to false since blur of SelectInput is done calling by this time\n setShouldIgnoreBlurAnimation(false);\n }}\n data-value={props.value}\n data-index={props._index}\n selectionType={selectionType}\n color={props.intent}\n isKeydownPressed={isKeydownPressed}\n />\n );\n};\n\nconst ActionListItem = assignWithoutSideEffects(React.memo(_ActionListItem), {\n componentId: componentIds.ActionListItem,\n displayName: componentIds.ActionListItem,\n});\n\nexport type { ActionListItemProps, ActionListSectionProps };\nexport {\n ActionListItem,\n ActionListItemIcon,\n ActionListItemText,\n ActionListItemBadge,\n ActionListItemBadgeGroup,\n ActionListSection,\n};\n"],"names":["StyledActionListSectionTitle","styled","BaseBox","withConfig","displayName","componentId","props","padding","makeSize","theme","spacing","_ActionListSection","_ref","title","children","testID","_hideDivider","_sectionChildValues","_useDropdown","useDropdown","hasAutoCompleteInBottomSheetHeader","dropdownTriggerer","filteredValues","hasAutoComplete","dropdownComponentIds","triggers","AutoComplete","isSectionVisible","React","useMemo","visibleActionListItemInSection","find","actionItemValue","includes","Boolean","showDividerInRN","isReactNative","showDividerInAutoComplete","length","_jsxs","_objectSpread","makeAccessible","role","getActionListSectionRole","label","metaAttribute","name","MetaConstants","ActionListSection","_jsx","hidden","Text","color","size","weight","undefined","Divider","marginX","marginY","assignWithoutSideEffects","componentIds","_ActionListItemIcon","_ref2","icon","Icon","_useBaseMenuItem","useBaseMenuItem","isDisabled","iconState","concat","ActionListItemIcon","_ActionListItemBadgeGroup","_ref3","Box","display","alignItems","flexDirection","ActionListItemBadgeGroup","_ActionListItemBadge","Badge","marginLeft","ActionListItemBadge","_ActionListItemText","_ref4","_useBaseMenuItem2","variant","getNormalTextColor","isMuted","ActionListItemText","makeActionListItemClickable","clickHandler","onPress","onClick","_ActionListItem","_useDropdown2","activeIndex","dropdownBaseId","onOptionClick","selectedIndices","setShouldIgnoreBlurAnimation","selectionType","isKeydownPressed","renderOnWebAs","href","getIsSelected","SelectInput","_index","isSelected","useEffect","validateActionListItemProps","leading","trailing","titleSuffix","intent","throwBladeError","message","moduleName","BaseMenuItem","isVisible","value","as","id","tabIndex","description","pointerEvents","Checkbox","isChecked","target","className","getActionListItemRole","e","_props$onClick","call","event","castWebType","ActionListItem","onMouseDown","onMouseUp","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFA,IAAMA,4BAA4B,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8CAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAAC,UAACC,KAAK,EAAA;EAAA,OAAM;AAC/D;IACAC,OAAO,EAAEC,QAAQ,CAACF,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c;EACxCnI,WAAW,EAAEwD,YAAY,CAAC2E,cAAAA;AAC5B,CAAC;;;;"}
1
+ {"version":3,"file":"ActionListItem.js","sources":["../../../../../../src/components/ActionList/ActionListItem.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-ts-comment */\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { TouchableOpacity } from 'react-native';\nimport { componentIds } from './componentIds';\nimport { validateActionListItemProps, getNormalTextColor } from './actionListUtils';\nimport { getActionListItemRole, getActionListSectionRole } from './getA11yRoles';\nimport { Divider } from '~components/Divider';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { IconComponent } from '~components/Icons';\nimport { useDropdown } from '~components/Dropdown/useDropdown';\nimport type { FeedbackColors } from '~tokens/theme/theme';\nimport { Text } from '~components/Typography';\nimport type { Platform } from '~utils';\nimport { castWebType, isReactNative } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { StringChildrenType, TestID } from '~utils/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { makeSize } from '~utils/makeSize';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport type { BadgeProps } from '~components/Badge';\nimport { Badge } from '~components/Badge';\nimport { Box } from '~components/Box';\nimport { dropdownComponentIds } from '~components/Dropdown/dropdownComponentIds';\nimport { BaseMenuItem, useBaseMenuItem } from '~components/BaseMenu';\nimport { Checkbox } from '~components/Checkbox';\nimport type { AvatarProps } from '~components/Avatar/types';\nimport { Avatar } from '~components/Avatar';\n\ntype ActionListItemProps = {\n title: string;\n description?: string;\n onClick?: (clickProps: {\n name: string;\n value?: boolean;\n event: Platform.Select<{\n web: React.MouseEvent;\n native: React.TouchEvent<TouchableOpacity>;\n }>;\n }) => void;\n /**\n * value that you get from `onChange` event on SelectInput or in form submissions.\n */\n value: string;\n /**\n * Link to open when item is clicked.\n */\n href?: string;\n /**\n * HTML target of the link\n */\n target?: string;\n /**\n * Item that goes on left-side of item.\n *\n * Valid elements - `<ActionListItemIcon />`, `<ActionListItemAsset />`\n *\n * Will be overriden in multiselect\n */\n leading?: React.ReactNode;\n /**\n * Item that goes on right-side of item.\n *\n * Valid elements - `<ActionListItemText />`, `<ActionListItemIcon />`\n */\n trailing?: React.ReactNode;\n /**\n * Item that goes immediately next to the title.\n *\n * Valid elements - `<ActionListItemBadge />`, `<ActionListItemBadgeGroup />`\n *\n */\n titleSuffix?: React.ReactElement;\n isDisabled?: boolean;\n intent?: Extract<FeedbackColors, 'negative'>;\n /**\n * Can be used in combination of `onClick` to highlight item as selected in Button Triggers.\n *\n * When trigger is SelectInput, Use `value` prop on SelectInput instead to make dropdown controlled.\n */\n isSelected?: boolean;\n /**\n * Internally passed from ActionList. No need to pass it explicitly\n *\n * @private\n */\n _index?: number;\n} & TestID;\n\nconst StyledActionListSectionTitle = styled(BaseBox)((props) => ({\n // @TODO: replace this styled-component with new layout box when we have padding shorthand\n padding: makeSize(props.theme.spacing[3]),\n}));\n\ntype ActionListSectionProps = {\n title: string;\n children: React.ReactNode[] | React.ReactNode;\n /**\n * Internally used to hide the divider on final item in React Native.\n *\n * Should not be used by consumers (also won't work on web)\n *\n * @private\n */\n _hideDivider?: boolean;\n /**\n * Internally used to hide / show section in AutoComplete\n *\n * @private\n */\n _sectionChildValues?: string[];\n} & TestID;\nconst _ActionListSection = ({\n title,\n children,\n testID,\n _hideDivider,\n _sectionChildValues,\n}: ActionListSectionProps): React.ReactElement => {\n const { hasAutoCompleteInBottomSheetHeader, dropdownTriggerer, filteredValues } = useDropdown();\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const isSectionVisible = React.useMemo(() => {\n if (hasAutoComplete) {\n const visibleActionListItemInSection = _sectionChildValues?.find((actionItemValue) =>\n filteredValues.includes(actionItemValue),\n );\n\n return Boolean(visibleActionListItemInSection);\n }\n\n return true;\n }, [_sectionChildValues, hasAutoComplete, filteredValues]);\n\n const showDividerInRN = !(_hideDivider && isReactNative());\n const showDividerInAutoComplete = hasAutoComplete\n ? isSectionVisible && filteredValues.length > 1\n : true;\n\n return (\n <BaseBox\n {...makeAccessible({\n role: getActionListSectionRole(),\n label: title,\n })}\n {...metaAttribute({ name: MetaConstants.ActionListSection, testID })}\n >\n {/* We're announcing title as group label so we can hide this */}\n {isSectionVisible ? (\n <StyledActionListSectionTitle {...makeAccessible({ hidden: true })}>\n <Text color=\"surface.text.gray.muted\" size=\"small\" weight=\"semibold\">\n {title}\n </Text>\n </StyledActionListSectionTitle>\n ) : null}\n <BaseBox\n {...makeAccessible({\n // On web, we just wrap it in another listbox to announce item count properly for particular group.\n // On React Native, we ignore it since `menu` + `group` role will take care of accessibility\n role: isReactNative() ? undefined : 'listbox',\n })}\n >\n {children}\n </BaseBox>\n {showDividerInAutoComplete && showDividerInRN ? (\n <Divider marginX=\"spacing.3\" marginY=\"spacing.1\" />\n ) : null}\n </BaseBox>\n );\n};\n\nconst ActionListSection = assignWithoutSideEffects(_ActionListSection, {\n componentId: componentIds.ActionListSection,\n});\n\nconst _ActionListItemIcon = ({ icon }: { icon: IconComponent }): React.ReactElement => {\n const Icon = icon;\n const { color, isDisabled } = useBaseMenuItem();\n const iconState = isDisabled ? 'disabled' : 'muted';\n return (\n <Icon\n color={\n color === 'negative'\n ? 'feedback.icon.negative.intense'\n : `interactive.icon.gray.${iconState}`\n }\n size=\"medium\"\n />\n );\n};\n\nconst ActionListItemIcon = assignWithoutSideEffects(_ActionListItemIcon, {\n componentId: componentIds.ActionListItemIcon,\n});\n\nconst _ActionListItemBadgeGroup = ({\n children,\n}: {\n children: React.ReactElement[] | React.ReactElement;\n}): React.ReactElement => {\n return (\n <Box display=\"flex\" alignItems=\"center\" flexDirection=\"row\">\n {children}\n </Box>\n );\n};\n\nconst ActionListItemBadgeGroup = assignWithoutSideEffects(_ActionListItemBadgeGroup, {\n componentId: componentIds.ActionListItemBadgeGroup,\n});\n\nconst _ActionListItemAvatar = (avatarProps: Omit<AvatarProps, 'size' | ''>): React.ReactElement => {\n return <Avatar size=\"xsmall\" {...avatarProps} />;\n};\n\nconst ActionListItemAvatar = assignWithoutSideEffects(_ActionListItemAvatar, {\n componentId: componentIds.ActionListItemAvatar,\n});\n\nconst _ActionListItemBadge = (props: BadgeProps): React.ReactElement => {\n return <Badge size=\"medium\" marginLeft=\"spacing.3\" {...props} />;\n};\n\nconst ActionListItemBadge = assignWithoutSideEffects(_ActionListItemBadge, {\n componentId: componentIds.ActionListItemBadge,\n});\n\nconst _ActionListItemText = ({\n children,\n}: {\n children: StringChildrenType;\n}): React.ReactElement => {\n const { isDisabled } = useBaseMenuItem();\n\n return (\n <Text variant=\"caption\" color={getNormalTextColor(isDisabled, { isMuted: true })}>\n {children}\n </Text>\n );\n};\n\nconst ActionListItemText = assignWithoutSideEffects(_ActionListItemText, {\n componentId: componentIds.ActionListItemText,\n});\n\ntype ClickHandlerType = (e: React.MouseEvent<HTMLButtonElement>) => void;\n\nconst makeActionListItemClickable = (\n clickHandler: ClickHandlerType,\n): { onPress?: (e: React.TouchEvent<TouchableOpacity>) => void; onClick?: ClickHandlerType } => {\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: ignoring ReactNative press type for the peace of mind\n return { onPress: clickHandler };\n }\n\n return {\n onClick: clickHandler,\n };\n};\n\n/**\n * ### ActionListItem\n *\n * Creates option inside `ActionList`.\n *\n * #### Usage\n *\n * ```jsx\n * <ActionList>\n * <ActionListItem\n * title=\"Home\"\n * value=\"home\"\n * leading={<ActionListItemIcon icon={HomeIcon} />}\n * trailing={<ActionListItemText>⌘ + S</ActionListItemText>}\n * />\n * </ActionList>\n * ```\n */\nconst _ActionListItem = (props: ActionListItemProps): React.ReactElement => {\n const {\n activeIndex,\n dropdownBaseId,\n onOptionClick,\n selectedIndices,\n setShouldIgnoreBlurAnimation,\n selectionType,\n dropdownTriggerer,\n isKeydownPressed,\n filteredValues,\n hasAutoCompleteInBottomSheetHeader,\n } = useDropdown();\n\n const hasAutoComplete =\n hasAutoCompleteInBottomSheetHeader ||\n dropdownTriggerer === dropdownComponentIds.triggers.AutoComplete;\n\n const renderOnWebAs = props.href ? 'a' : 'button';\n\n /**\n * In SelectInput, returns the isSelected according to selected indexes in the state\n *\n * In Other Triggers (Menu Usecase), returns `props.isSelected` since passing the\n * isSelected prop explicitly is the only way to select item in menu\n */\n const getIsSelected = (): boolean | undefined => {\n if (dropdownTriggerer === dropdownComponentIds.triggers.SelectInput || hasAutoComplete) {\n if (typeof props._index === 'number') {\n return selectedIndices.includes(props._index);\n }\n\n return undefined;\n }\n\n return props.isSelected;\n };\n\n const isSelected = getIsSelected();\n\n React.useEffect(() => {\n validateActionListItemProps({\n leading: props.leading,\n trailing: props.trailing,\n titleSuffix: props.titleSuffix,\n });\n }, [props.leading, props.trailing, props.titleSuffix]);\n\n React.useEffect(() => {\n if (__DEV__) {\n if (\n dropdownTriggerer === dropdownComponentIds.triggers.SelectInput &&\n props.intent === 'negative'\n ) {\n throwBladeError({\n message:\n 'negative intent ActionListItem cannot be used inside Dropdown with SelectInput trigger',\n moduleName: 'ActionListItem',\n });\n }\n }\n }, [props.intent, dropdownTriggerer]);\n\n return (\n // We use this context to change the color of subcomponents like ActionListItemIcon, ActionListItemText, etc\n <BaseMenuItem\n isVisible={hasAutoComplete && filteredValues ? filteredValues.includes(props.value) : true}\n as={!isReactNative() ? renderOnWebAs : undefined}\n id={`${dropdownBaseId}-${props._index}`}\n tabIndex={-1}\n title={props.title}\n description={props.description}\n leading={\n selectionType === 'multiple' ? (\n <BaseBox\n pointerEvents=\"none\"\n // Adding aria-hidden because the listbox item in multiselect in itself explains the behaviour so announcing checkbox is unneccesary and just a nice UI tweak for us\n {...makeAccessible({\n hidden: true,\n })}\n >\n <Checkbox isChecked={isSelected} tabIndex={-1} isDisabled={props.isDisabled}>\n {/* \n Checkbox requires children. Didn't want to make it optional because its helpful for consumers\n But for this case in particular, we just want to use Text separately so that we can control spacing and color and keep it consistent with non-multiselect dropdowns\n */}\n {null}\n </Checkbox>\n </BaseBox>\n ) : (\n props.leading\n )\n }\n trailing={props.trailing}\n titleSuffix={props.titleSuffix}\n href={props.href}\n target={props.target}\n className={activeIndex === props._index ? 'active-focus' : ''}\n isSelected={isSelected}\n isDisabled={props.isDisabled}\n role={getActionListItemRole(dropdownTriggerer, props.href)}\n {...makeActionListItemClickable((e: React.MouseEvent<HTMLButtonElement>): void => {\n if (typeof props._index === 'number') {\n onOptionClick(e, props._index);\n props.onClick?.({ name: props.value, value: isSelected, event: castWebType(e) });\n }\n })}\n {...metaAttribute({ name: MetaConstants.ActionListItem, testID: props.testID })}\n onMouseDown={() => {\n // We want to keep focus on Dropdown's trigger while option is being clicked\n // So We set this flag that ignores the blur animation to avoid the flicker between focus out + focus in\n setShouldIgnoreBlurAnimation(true);\n }}\n onMouseUp={() => {\n // (Contd from above comment...) We set this flag back to false since blur of SelectInput is done calling by this time\n setShouldIgnoreBlurAnimation(false);\n }}\n data-value={props.value}\n data-index={props._index}\n selectionType={selectionType}\n color={props.intent}\n isKeydownPressed={isKeydownPressed}\n />\n );\n};\n\nconst ActionListItem = assignWithoutSideEffects(React.memo(_ActionListItem), {\n componentId: componentIds.ActionListItem,\n displayName: componentIds.ActionListItem,\n});\n\nexport type { ActionListItemProps, ActionListSectionProps };\nexport {\n ActionListItem,\n ActionListItemIcon,\n ActionListItemText,\n ActionListItemAvatar,\n ActionListItemBadge,\n ActionListItemBadgeGroup,\n ActionListSection,\n};\n"],"names":["StyledActionListSectionTitle","styled","BaseBox","withConfig","displayName","componentId","props","padding","makeSize","theme","spacing","_ActionListSection","_ref","title","children","testID","_hideDivider","_sectionChildValues","_useDropdown","useDropdown","hasAutoCompleteInBottomSheetHeader","dropdownTriggerer","filteredValues","hasAutoComplete","dropdownComponentIds","triggers","AutoComplete","isSectionVisible","React","useMemo","visibleActionListItemInSection","find","actionItemValue","includes","Boolean","showDividerInRN","isReactNative","showDividerInAutoComplete","length","_jsxs","_objectSpread","makeAccessible","role","getActionListSectionRole","label","metaAttribute","name","MetaConstants","ActionListSection","_jsx","hidden","Text","color","size","weight","undefined","Divider","marginX","marginY","assignWithoutSideEffects","componentIds","_ActionListItemIcon","_ref2","icon","Icon","_useBaseMenuItem","useBaseMenuItem","isDisabled","iconState","concat","ActionListItemIcon","_ActionListItemBadgeGroup","_ref3","Box","display","alignItems","flexDirection","ActionListItemBadgeGroup","_ActionListItemAvatar","avatarProps","Avatar","ActionListItemAvatar","_ActionListItemBadge","Badge","marginLeft","ActionListItemBadge","_ActionListItemText","_ref4","_useBaseMenuItem2","variant","getNormalTextColor","isMuted","ActionListItemText","makeActionListItemClickable","clickHandler","onPress","onClick","_ActionListItem","_useDropdown2","activeIndex","dropdownBaseId","onOptionClick","selectedIndices","setShouldIgnoreBlurAnimation","selectionType","isKeydownPressed","renderOnWebAs","href","getIsSelected","SelectInput","_index","isSelected","useEffect","validateActionListItemProps","leading","trailing","titleSuffix","intent","throwBladeError","message","moduleName","BaseMenuItem","isVisible","value","as","id","tabIndex","description","pointerEvents","Checkbox","isChecked","target","className","getActionListItemRole","e","_props$onClick","call","event","castWebType","ActionListItem","onMouseDown","onMouseUp","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0FA,IAAMA,4BAA4B,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8CAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAAC,UAACC,KAAK,EAAA;EAAA,OAAM;AAC/D;IACAC,OAAO,EAAEC,QAAQ,CAACF,KAAK,CAACG,KAAK,CAACC,OAAO,CAAC,CAAC,CAAC,CAAA;GACzC,CAAA;AAAA,CAAC,CAAC,CAAA;AAoBH,IAAMC,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAAC,IAAA,EAM0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