@razorpay/blade 11.32.0 → 11.33.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 (40) hide show
  1. package/build/lib/native/components/Button/IconButton/IconButton.js +1 -1
  2. package/build/lib/native/components/Button/IconButton/IconButton.js.map +1 -1
  3. package/build/lib/native/components/Table/TableContext.js +1 -1
  4. package/build/lib/native/components/Table/TableContext.js.map +1 -1
  5. package/build/lib/native/components/Table/tokens.js.map +1 -1
  6. package/build/lib/web/development/components/Button/IconButton/IconButton.js +2 -0
  7. package/build/lib/web/development/components/Button/IconButton/IconButton.js.map +1 -1
  8. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js +25 -3
  9. package/build/lib/web/development/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  10. package/build/lib/web/development/components/Button/IconButton/tokens.js +14 -0
  11. package/build/lib/web/development/components/Button/IconButton/tokens.js.map +1 -0
  12. package/build/lib/web/development/components/Table/Table.web.js +12 -3
  13. package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
  14. package/build/lib/web/development/components/Table/TableBody.web.js +214 -70
  15. package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
  16. package/build/lib/web/development/components/Table/TableContext.js +3 -1
  17. package/build/lib/web/development/components/Table/TableContext.js.map +1 -1
  18. package/build/lib/web/development/components/Table/TableHeader.web.js +14 -6
  19. package/build/lib/web/development/components/Table/TableHeader.web.js.map +1 -1
  20. package/build/lib/web/development/components/Table/tokens.js +6 -1
  21. package/build/lib/web/development/components/Table/tokens.js.map +1 -1
  22. package/build/lib/web/production/components/Button/IconButton/IconButton.js +2 -0
  23. package/build/lib/web/production/components/Button/IconButton/IconButton.js.map +1 -1
  24. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js +25 -3
  25. package/build/lib/web/production/components/Button/IconButton/StyledIconButton.web.js.map +1 -1
  26. package/build/lib/web/production/components/Button/IconButton/tokens.js +14 -0
  27. package/build/lib/web/production/components/Button/IconButton/tokens.js.map +1 -0
  28. package/build/lib/web/production/components/Table/Table.web.js +12 -3
  29. package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
  30. package/build/lib/web/production/components/Table/TableBody.web.js +214 -70
  31. package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
  32. package/build/lib/web/production/components/Table/TableContext.js +3 -1
  33. package/build/lib/web/production/components/Table/TableContext.js.map +1 -1
  34. package/build/lib/web/production/components/Table/TableHeader.web.js +14 -6
  35. package/build/lib/web/production/components/Table/TableHeader.web.js.map +1 -1
  36. package/build/lib/web/production/components/Table/tokens.js +6 -1
  37. package/build/lib/web/production/components/Table/tokens.js.map +1 -1
  38. package/build/types/components/index.d.ts +38 -17
  39. package/build/types/components/index.native.d.ts +30 -14
  40. package/package.json +1 -1
@@ -2,7 +2,7 @@ import React__default from 'react';
2
2
  import StyledIconButton from './StyledIconButton.native.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
5
- var _IconButton=function _IconButton(_ref,ref){var icon=_ref.icon,onClick=_ref.onClick,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,_ref$emphasis=_ref.emphasis,emphasis=_ref$emphasis===void 0?'intense':_ref$emphasis,accessibilityLabel=_ref.accessibilityLabel,isDisabled=_ref.isDisabled,onBlur=_ref.onBlur,onFocus=_ref.onFocus,onMouseLeave=_ref.onMouseLeave,onMouseMove=_ref.onMouseMove,onPointerDown=_ref.onPointerDown,onPointerEnter=_ref.onPointerEnter,onTouchEnd=_ref.onTouchEnd,onTouchStart=_ref.onTouchStart,_tabIndex=_ref._tabIndex;return jsx(StyledIconButton,{ref:ref,onClick:onClick,emphasis:emphasis,size:size,icon:icon,tabIndex:_tabIndex,accessibilityLabel:accessibilityLabel,isDisabled:isDisabled,onBlur:onBlur,onFocus:onFocus,onMouseLeave:onMouseLeave,onMouseMove:onMouseMove,onPointerDown:onPointerDown,onPointerEnter:onPointerEnter,onTouchEnd:onTouchEnd,onTouchStart:onTouchStart});};var IconButton=React__default.forwardRef(_IconButton);
5
+ var _IconButton=function _IconButton(_ref,ref){var icon=_ref.icon,onClick=_ref.onClick,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,_ref$emphasis=_ref.emphasis,emphasis=_ref$emphasis===void 0?'intense':_ref$emphasis,accessibilityLabel=_ref.accessibilityLabel,isDisabled=_ref.isDisabled,onBlur=_ref.onBlur,onFocus=_ref.onFocus,onMouseLeave=_ref.onMouseLeave,onMouseMove=_ref.onMouseMove,onPointerDown=_ref.onPointerDown,onPointerEnter=_ref.onPointerEnter,onTouchEnd=_ref.onTouchEnd,onTouchStart=_ref.onTouchStart,isHighlighted=_ref.isHighlighted,_tabIndex=_ref._tabIndex;return jsx(StyledIconButton,{ref:ref,onClick:onClick,emphasis:emphasis,size:size,icon:icon,tabIndex:_tabIndex,accessibilityLabel:accessibilityLabel,isDisabled:isDisabled,isHighlighted:isHighlighted,onBlur:onBlur,onFocus:onFocus,onMouseLeave:onMouseLeave,onMouseMove:onMouseMove,onPointerDown:onPointerDown,onPointerEnter:onPointerEnter,onTouchEnd:onTouchEnd,onTouchStart:onTouchStart});};var IconButton=React__default.forwardRef(_IconButton);
6
6
 
7
7
  export { IconButton };
8
8
  //# sourceMappingURL=IconButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","sources":["../../../../../../src/components/Button/IconButton/IconButton.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable react/display-name */\nimport React from 'react';\nimport type { GestureResponderEvent } from 'react-native';\nimport StyledIconButton from './StyledIconButton';\nimport type { IconComponent } from '~components/Icons';\nimport type { BladeElementRef } from '~utils/types';\nimport type { BladeCommonEvents } from '~components/types';\nimport type { Platform } from '~utils';\nimport type { SubtleOrIntense } from '~tokens/theme/theme';\n\ntype IconButtonProps = {\n /**\n * Icon component to be rendered, eg. `CloseIcon`\n */\n icon: IconComponent;\n\n /**\n * Icon size\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Icon contrast\n *\n * @default 'intense'\n */\n emphasis?: SubtleOrIntense;\n\n /**\n * Sets aria-label to help users know what the action does, eg 'Dismiss alert'\n */\n accessibilityLabel: string;\n\n /**\n * Disabled state for IconButton\n */\n isDisabled?: boolean;\n\n /**\n * Sets tabindex property on button element\n */\n _tabIndex?: number;\n} & BladeCommonEvents &\n Platform.Select<{\n web: {\n onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;\n };\n native: {\n onClick: (event: GestureResponderEvent) => void;\n };\n }>;\n\n/**\n * Component for making clickable icons with transparent background.\n * For other cases please use `Button` component with `icon` prop.\n */\nconst _IconButton: React.ForwardRefRenderFunction<BladeElementRef, IconButtonProps> = (\n {\n icon,\n onClick,\n size = 'medium',\n emphasis = 'intense',\n accessibilityLabel,\n isDisabled,\n onBlur,\n onFocus,\n onMouseLeave,\n onMouseMove,\n onPointerDown,\n onPointerEnter,\n onTouchEnd,\n onTouchStart,\n _tabIndex,\n },\n ref,\n) => {\n return (\n <StyledIconButton\n ref={ref as any}\n onClick={onClick}\n emphasis={emphasis}\n size={size}\n icon={icon}\n tabIndex={_tabIndex}\n accessibilityLabel={accessibilityLabel}\n isDisabled={isDisabled}\n onBlur={onBlur}\n onFocus={onFocus}\n onMouseLeave={onMouseLeave}\n onMouseMove={onMouseMove}\n onPointerDown={onPointerDown}\n onPointerEnter={onPointerEnter}\n onTouchEnd={onTouchEnd}\n onTouchStart={onTouchStart}\n />\n );\n};\n\nconst IconButton = React.forwardRef(_IconButton);\n\nexport type { IconButtonProps };\nexport { IconButton };\n"],"names":["_IconButton","_ref","ref","icon","onClick","_ref$size","size","_ref$emphasis","emphasis","accessibilityLabel","isDisabled","onBlur","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","onTouchEnd","onTouchStart","_tabIndex","_jsx","StyledIconButton","tabIndex","IconButton","React","forwardRef"],"mappings":";;;;AA2DA,IAAMA,WAA6E,CAAG,SAAhFA,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C,YAAY,CAAEA,YAAa,CAC5B,CAAC,CAEN,CAAC,CAEK,IAAAK,UAAU,CAAGC,cAAK,CAACC,UAAU,CAACzB,WAAW;;;;"}
1
+ {"version":3,"file":"IconButton.js","sources":["../../../../../../src/components/Button/IconButton/IconButton.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable react/display-name */\nimport React from 'react';\nimport type { GestureResponderEvent } from 'react-native';\nimport StyledIconButton from './StyledIconButton';\nimport type { IconComponent } from '~components/Icons';\nimport type { BladeElementRef } from '~utils/types';\nimport type { BladeCommonEvents } from '~components/types';\nimport type { Platform } from '~utils';\nimport type { SubtleOrIntense } from '~tokens/theme/theme';\n\ntype IconButtonProps = {\n /**\n * Icon component to be rendered, eg. `CloseIcon`\n */\n icon: IconComponent;\n\n /**\n * Icon size\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Icon contrast\n *\n * @default 'intense'\n */\n emphasis?: SubtleOrIntense;\n\n /**\n * Sets aria-label to help users know what the action does, eg 'Dismiss alert'\n */\n accessibilityLabel: string;\n\n /**\n * Disabled state for IconButton\n */\n isDisabled?: boolean;\n\n /**\n * Sets tabindex property on button element\n */\n _tabIndex?: number;\n} & BladeCommonEvents &\n Platform.Select<{\n web: {\n onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;\n /**\n * This changes the hover interaction to highlight icon more\n *\n * **Only available on web currently**\n */\n isHighlighted?: boolean;\n };\n native: {\n onClick: (event: GestureResponderEvent) => void;\n isHighlighted?: undefined;\n };\n }>;\n\n/**\n * Component for making clickable icons with transparent background.\n * For other cases please use `Button` component with `icon` prop.\n */\nconst _IconButton: React.ForwardRefRenderFunction<BladeElementRef, IconButtonProps> = (\n {\n icon,\n onClick,\n size = 'medium',\n emphasis = 'intense',\n accessibilityLabel,\n isDisabled,\n onBlur,\n onFocus,\n onMouseLeave,\n onMouseMove,\n onPointerDown,\n onPointerEnter,\n onTouchEnd,\n onTouchStart,\n isHighlighted,\n _tabIndex,\n },\n ref,\n) => {\n return (\n <StyledIconButton\n ref={ref as any}\n onClick={onClick}\n emphasis={emphasis}\n size={size}\n icon={icon}\n tabIndex={_tabIndex}\n accessibilityLabel={accessibilityLabel}\n isDisabled={isDisabled}\n isHighlighted={isHighlighted}\n onBlur={onBlur}\n onFocus={onFocus}\n onMouseLeave={onMouseLeave}\n onMouseMove={onMouseMove}\n onPointerDown={onPointerDown}\n onPointerEnter={onPointerEnter}\n onTouchEnd={onTouchEnd}\n onTouchStart={onTouchStart}\n />\n );\n};\n\nconst IconButton = React.forwardRef(_IconButton);\n\nexport type { IconButtonProps };\nexport { IconButton };\n"],"names":["_IconButton","_ref","ref","icon","onClick","_ref$size","size","_ref$emphasis","emphasis","accessibilityLabel","isDisabled","onBlur","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","onTouchEnd","onTouchStart","isHighlighted","_tabIndex","_jsx","StyledIconButton","tabIndex","IconButton","React","forwardRef"],"mappings":";;;;AAkEA,IAAMA,WAA6E,CAAG,SAAhFA,WAA6EA,CAAAC,IAAA,CAmBjFC,GAAG,CACA,CAAA,IAlBDC,IAAI,CAAAF,IAAA,CAAJE,IAAI,CACJC,OAAO,CAAAH,IAAA,CAAPG,OAAO,CAAAC,SAAA,CAAAJ,IAAA,CACPK,IAAI,CAAJA,IAAI,CAAAD,SAAA,GAAA,KAAA,CAAA,CAAG,QAAQ,CAAAA,SAAA,CAAAE,aAAA,CAAAN,IAAA,CACfO,QAAQ,CAARA,QAAQ,CAAAD,aAAA,UAAG,SAAS,CAAAA,aAAA,CACpBE,kBAAkB,CAAAR,IAAA,CAAlBQ,kBAAkB,CAClBC,UAAU,CAAAT,IAAA,CAAVS,UAAU,CACVC,MAAM,CAAAV,IAAA,CAANU,MAAM,CACNC,OAAO,CAAAX,IAAA,CAAPW,OAAO,CACPC,YAAY,CAAAZ,IAAA,CAAZY,YAAY,CACZC,WAAW,CAAAb,IAAA,CAAXa,WAAW,CACXC,aAAa,CAAAd,IAAA,CAAbc,aAAa,CACbC,cAAc,CAAAf,IAAA,CAAde,cAAc,CACdC,UAAU,CAAAhB,IAAA,CAAVgB,UAAU,CACVC,YAAY,CAAAjB,IAAA,CAAZiB,YAAY,CACZC,aAAa,CAAAlB,IAAA,CAAbkB,aAAa,CACbC,SAAS,CAAAnB,IAAA,CAATmB,SAAS,CAIX,OACEC,GAAA,CAACC,gBAAgB,CACfpB,CAAAA,GAAG,CAAEA,GAAW,CAChBE,OAAO,CAAEA,OAAQ,CACjBI,QAAQ,CAAEA,QAAS,CACnBF,IAAI,CAAEA,IAAK,CACXH,IAAI,CAAEA,IAAK,CACXoB,QAAQ,CAAEH,SAAU,CACpBX,kBAAkB,CAAEA,kBAAmB,CACvCC,UAAU,CAAEA,UAAW,CACvBS,aAAa,CAAEA,aAAc,CAC7BR,MAAM,CAAEA,MAAO,CACfC,OAAO,CAAEA,OAAQ,CACjBC,YAAY,CAAEA,YAAa,CAC3BC,WAAW,CAAEA,WAAY,CACzBC,aAAa,CAAEA,aAAc,CAC7BC,cAAc,CAAEA,cAAe,CAC/BC,UAAU,CAAEA,UAAW,CACvBC,YAAY,CAAEA,YAAa,CAC5B,CAAC,CAEN,CAAC,CAEK,IAAAM,UAAU,CAAGC,cAAK,CAACC,UAAU,CAAC1B,WAAW;;;;"}
@@ -1,6 +1,6 @@
1
1
  import React__default from 'react';
2
2
 
3
- var TableContext=React__default.createContext({selectionType:'none',selectedRows:undefined,totalItems:0,toggleRowSelectionById:function toggleRowSelectionById(){},toggleAllRowsSelection:function toggleAllRowsSelection(){},deselectAllRows:function deselectAllRows(){},rowDensity:'normal',toggleSort:function toggleSort(){},currentSortedState:{sortKey:'',isSortReversed:false},setPaginationPage:function setPaginationPage(){},setPaginationRowSize:function setPaginationRowSize(){},disabledRows:[],setDisabledRows:function setDisabledRows(){},paginationType:'client',setPaginationType:function setPaginationType(){},backgroundColor:'surface.background.gray.intense',setHeaderRowDensity:function setHeaderRowDensity(){},showBorderedCells:false});var useTableContext=function useTableContext(){var context=React__default.useContext(TableContext);return context;};
3
+ var TableContext=React__default.createContext({selectionType:'none',selectedRows:undefined,totalItems:0,toggleRowSelectionById:function toggleRowSelectionById(){},toggleAllRowsSelection:function toggleAllRowsSelection(){},deselectAllRows:function deselectAllRows(){},rowDensity:'normal',toggleSort:function toggleSort(){},currentSortedState:{sortKey:'',isSortReversed:false},setPaginationPage:function setPaginationPage(){},setPaginationRowSize:function setPaginationRowSize(){},disabledRows:[],setDisabledRows:function setDisabledRows(){},paginationType:'client',setPaginationType:function setPaginationType(){},backgroundColor:'surface.background.gray.intense',setHeaderRowDensity:function setHeaderRowDensity(){},showBorderedCells:false,hasHoverActions:false,setHasHoverActions:function setHasHoverActions(){}});var useTableContext=function useTableContext(){var context=React__default.useContext(TableContext);return context;};
4
4
 
5
5
  export { TableContext, useTableContext };
6
6
  //# sourceMappingURL=TableContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableContext.js","sources":["../../../../../src/components/Table/TableContext.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-function */\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nimport React from 'react';\nimport type { TableNode } from '@table-library/react-table-library/table';\nimport type {\n TableBackgroundColors,\n TableProps,\n TablePaginationType,\n TableHeaderRowProps,\n} from './types';\n\nexport type TableContextType = {\n selectionType?: TableProps<unknown>['selectionType'];\n selectedRows?: TableNode['id'][];\n totalItems: number;\n toggleRowSelectionById: (id: TableNode['id']) => void;\n toggleAllRowsSelection: () => void;\n deselectAllRows: () => void;\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n toggleSort: (sortKey: string) => void;\n currentSortedState: {\n sortKey: string;\n isSortReversed: boolean;\n sortableColumns?: string[];\n };\n setPaginationPage: (page: number) => void;\n setPaginationRowSize: (size: number) => void;\n currentPaginationState?: {\n page: number;\n size: number;\n };\n showStripedRows?: boolean;\n disabledRows: TableNode['id'][];\n setDisabledRows: React.Dispatch<React.SetStateAction<TableNode['id'][]>>;\n paginationType: NonNullable<TablePaginationType>;\n setPaginationType: React.Dispatch<React.SetStateAction<NonNullable<TablePaginationType>>>;\n backgroundColor: TableBackgroundColors;\n headerRowDensity?: TableHeaderRowProps['rowDensity'];\n setHeaderRowDensity: React.Dispatch<React.SetStateAction<TableHeaderRowProps['rowDensity']>>;\n showBorderedCells: NonNullable<TableProps<unknown>['showBorderedCells']>;\n};\n\nconst TableContext = React.createContext<TableContextType>({\n selectionType: 'none',\n selectedRows: undefined,\n totalItems: 0,\n toggleRowSelectionById: () => {},\n toggleAllRowsSelection: () => {},\n deselectAllRows: () => {},\n rowDensity: 'normal',\n toggleSort: () => {},\n currentSortedState: {\n sortKey: '',\n isSortReversed: false,\n },\n setPaginationPage: () => {},\n setPaginationRowSize: () => {},\n disabledRows: [],\n setDisabledRows: () => {},\n paginationType: 'client',\n setPaginationType: () => {},\n backgroundColor: 'surface.background.gray.intense',\n setHeaderRowDensity: () => {},\n showBorderedCells: false,\n});\n\nconst useTableContext = (): TableContextType => {\n const context = React.useContext(TableContext);\n return context;\n};\n\nexport { useTableContext, TableContext };\n"],"names":["TableContext","React","createContext","selectionType","selectedRows","undefined","totalItems","toggleRowSelectionById","toggleAllRowsSelection","deselectAllRows","rowDensity","toggleSort","currentSortedState","sortKey","isSortReversed","setPaginationPage","setPaginationRowSize","disabledRows","setDisabledRows","paginationType","setPaginationType","backgroundColor","setHeaderRowDensity","showBorderedCells","useTableContext","context","useContext"],"mappings":";;AA0CM,IAAAA,YAAY,CAAGC,cAAK,CAACC,aAAa,CAAmB,CACzDC,aAAa,CAAE,MAAM,CACrBC,YAAY,CAAEC,SAAS,CACvBC,UAAU,CAAE,CAAC,CACbC,sBAAsB,CAAE,SAAAA,sBAAAA,EAAM,EAAE,CAChCC,sBAAsB,CAAE,SAAAA,sBAAA,EAAM,EAAE,CAChCC,eAAe,CAAE,SAAAA,eAAAA,EAAM,EAAE,CACzBC,UAAU,CAAE,QAAQ,CACpBC,UAAU,CAAE,SAAAA,YAAM,EAAE,CACpBC,kBAAkB,CAAE,CAClBC,OAAO,CAAE,EAAE,CACXC,cAAc,CAAE,KAClB,CAAC,CACDC,iBAAiB,CAAE,SAAAA,iBAAAA,EAAM,EAAE,CAC3BC,oBAAoB,CAAE,SAAAA,oBAAAA,EAAM,EAAE,CAC9BC,YAAY,CAAE,EAAE,CAChBC,eAAe,CAAE,SAAAA,eAAAA,EAAM,EAAE,CACzBC,cAAc,CAAE,QAAQ,CACxBC,iBAAiB,CAAE,SAAAA,iBAAA,EAAM,EAAE,CAC3BC,eAAe,CAAE,iCAAiC,CAClDC,mBAAmB,CAAE,SAAAA,mBAAAA,EAAM,EAAE,CAC7BC,iBAAiB,CAAE,KACrB,CAAC,EAEK,IAAAC,eAAe,CAAG,SAAlBA,eAAeA,EAA2B,CAC9C,IAAMC,OAAO,CAAGxB,cAAK,CAACyB,UAAU,CAAC1B,YAAY,CAAC,CAC9C,OAAOyB,OAAO,CAChB;;;;"}
1
+ {"version":3,"file":"TableContext.js","sources":["../../../../../src/components/Table/TableContext.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-function */\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nimport React from 'react';\nimport type { TableNode } from '@table-library/react-table-library/table';\nimport type {\n TableBackgroundColors,\n TableProps,\n TablePaginationType,\n TableHeaderRowProps,\n} from './types';\n\nexport type TableContextType = {\n selectionType?: TableProps<unknown>['selectionType'];\n selectedRows?: TableNode['id'][];\n totalItems: number;\n toggleRowSelectionById: (id: TableNode['id']) => void;\n toggleAllRowsSelection: () => void;\n deselectAllRows: () => void;\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n toggleSort: (sortKey: string) => void;\n currentSortedState: {\n sortKey: string;\n isSortReversed: boolean;\n sortableColumns?: string[];\n };\n setPaginationPage: (page: number) => void;\n setPaginationRowSize: (size: number) => void;\n currentPaginationState?: {\n page: number;\n size: number;\n };\n showStripedRows?: boolean;\n disabledRows: TableNode['id'][];\n setDisabledRows: React.Dispatch<React.SetStateAction<TableNode['id'][]>>;\n paginationType: NonNullable<TablePaginationType>;\n setPaginationType: React.Dispatch<React.SetStateAction<NonNullable<TablePaginationType>>>;\n backgroundColor: TableBackgroundColors;\n headerRowDensity?: TableHeaderRowProps['rowDensity'];\n setHeaderRowDensity: React.Dispatch<React.SetStateAction<TableHeaderRowProps['rowDensity']>>;\n showBorderedCells: NonNullable<TableProps<unknown>['showBorderedCells']>;\n hasHoverActions: boolean;\n setHasHoverActions: (hasHoverActions: boolean) => void;\n};\n\nconst TableContext = React.createContext<TableContextType>({\n selectionType: 'none',\n selectedRows: undefined,\n totalItems: 0,\n toggleRowSelectionById: () => {},\n toggleAllRowsSelection: () => {},\n deselectAllRows: () => {},\n rowDensity: 'normal',\n toggleSort: () => {},\n currentSortedState: {\n sortKey: '',\n isSortReversed: false,\n },\n setPaginationPage: () => {},\n setPaginationRowSize: () => {},\n disabledRows: [],\n setDisabledRows: () => {},\n paginationType: 'client',\n setPaginationType: () => {},\n backgroundColor: 'surface.background.gray.intense',\n setHeaderRowDensity: () => {},\n showBorderedCells: false,\n hasHoverActions: false,\n setHasHoverActions: () => {},\n});\n\nconst useTableContext = (): TableContextType => {\n const context = React.useContext(TableContext);\n return context;\n};\n\nexport { useTableContext, TableContext };\n"],"names":["TableContext","React","createContext","selectionType","selectedRows","undefined","totalItems","toggleRowSelectionById","toggleAllRowsSelection","deselectAllRows","rowDensity","toggleSort","currentSortedState","sortKey","isSortReversed","setPaginationPage","setPaginationRowSize","disabledRows","setDisabledRows","paginationType","setPaginationType","backgroundColor","setHeaderRowDensity","showBorderedCells","hasHoverActions","setHasHoverActions","useTableContext","context","useContext"],"mappings":";;AA4CM,IAAAA,YAAY,CAAGC,cAAK,CAACC,aAAa,CAAmB,CACzDC,aAAa,CAAE,MAAM,CACrBC,YAAY,CAAEC,SAAS,CACvBC,UAAU,CAAE,CAAC,CACbC,sBAAsB,CAAE,SAAAA,sBAAA,EAAM,EAAE,CAChCC,sBAAsB,CAAE,SAAAA,sBAAA,EAAM,EAAE,CAChCC,eAAe,CAAE,SAAAA,eAAA,EAAM,EAAE,CACzBC,UAAU,CAAE,QAAQ,CACpBC,UAAU,CAAE,SAAAA,UAAAA,EAAM,EAAE,CACpBC,kBAAkB,CAAE,CAClBC,OAAO,CAAE,EAAE,CACXC,cAAc,CAAE,KAClB,CAAC,CACDC,iBAAiB,CAAE,SAAAA,iBAAAA,EAAM,EAAE,CAC3BC,oBAAoB,CAAE,SAAAA,oBAAA,EAAM,EAAE,CAC9BC,YAAY,CAAE,EAAE,CAChBC,eAAe,CAAE,SAAAA,eAAAA,EAAM,EAAE,CACzBC,cAAc,CAAE,QAAQ,CACxBC,iBAAiB,CAAE,SAAAA,iBAAA,EAAM,EAAE,CAC3BC,eAAe,CAAE,iCAAiC,CAClDC,mBAAmB,CAAE,SAAAA,mBAAAA,EAAM,EAAE,CAC7BC,iBAAiB,CAAE,KAAK,CACxBC,eAAe,CAAE,KAAK,CACtBC,kBAAkB,CAAE,SAAAA,kBAAA,EAAM,EAC5B,CAAC,EAEK,IAAAC,eAAe,CAAG,SAAlBA,eAAeA,EAA2B,CAC9C,IAAMC,OAAO,CAAG1B,cAAK,CAAC2B,UAAU,CAAC5B,YAAY,CAAC,CAC9C,OAAO2B,OAAO,CAChB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.js","sources":["../../../../../src/components/Table/tokens.ts"],"sourcesContent":["import { AlertCircleIcon, CheckIcon } from '~components/Icons';\nimport { size } from '~tokens/global';\n\nconst firstColumnStickyZIndex = 2;\n\nconst refreshWrapperZIndex = 3;\n\nconst checkboxCellWidth = size['44'];\n\nconst tableBackgroundColor = 'surface.background.gray.intense';\nconst tableHeader = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n backgroundColor: 'interactive.background.gray.default',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n} as const;\n\nconst tableFooter = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n backgroundColor: 'interactive.background.gray.default',\n} as const;\n\nconst tableRow = {\n paddingLeft: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n paddingRight: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n minHeight: {\n compact: '36',\n normal: '48',\n comfortable: '60',\n },\n nonStripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n // TODO: Rebranding - on design side: explore pressed state color change, right now both hover & active are same\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n nonStripeWrapper: {\n // not used anywhere\n backgroundColor: 'transparent',\n backgroundColorHover: 'transparent',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'transparent',\n backgroundColorSelectedHover: 'transparent',\n backgroundColorSelectedFocus: 'transparent',\n backgroundColorSelectedActive: 'transparent',\n },\n stripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n stripeWrapper: {\n backgroundColor: 'interactive.background.gray.default',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.faded',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.faded',\n },\n borderBottomWidth: 'thin',\n borderColor: 'surface.border.gray.muted',\n backgroundColorMotionEasing: 'easing.standard.effective',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tableToolbar = {\n backgroundColor: 'transparent',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorMotionEasing: 'easing.standard.effective',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tablePagination = {\n padding: 'spacing.4',\n pageSelectionButton: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.highlighted',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n padding: 'spacing.2',\n borderRadius: 'small',\n focusRingColor: 'surface.border.primary.muted',\n textColor: 'surface.text.gray.subtle',\n textColorSelected: 'surface.text.primary.normal',\n height: size['32'],\n width: size['32'],\n },\n defaultPageSize: 10,\n} as const;\n\nconst tableEditableCellRowDensityToInputSizeMap = {\n compact: 'medium',\n normal: 'large',\n comfortable: 'medium',\n} as const;\n\nconst validationStateToInputTrailingIconMap = {\n none: undefined,\n success: CheckIcon,\n error: AlertCircleIcon,\n};\n\nconst rowDensityToIsTableInputCellMapping = {\n comfortable: false,\n normal: true,\n compact: true,\n};\n\nexport {\n tableHeader,\n tableFooter,\n tableRow,\n tableToolbar,\n tablePagination,\n refreshWrapperZIndex,\n tableBackgroundColor,\n firstColumnStickyZIndex,\n checkboxCellWidth,\n tableEditableCellRowDensityToInputSizeMap,\n validationStateToInputTrailingIconMap,\n rowDensityToIsTableInputCellMapping,\n};\n"],"names":["tableEditableCellRowDensityToInputSizeMap","compact","normal","comfortable","validationStateToInputTrailingIconMap","none","undefined","success","CheckIcon","error","AlertCircleIcon","rowDensityToIsTableInputCellMapping"],"mappings":";;;;;;;;;;;;;;;;;;AAyHM,IAAAA,yCAAyC,CAAG,CAChDC,OAAO,CAAE,QAAQ,CACjBC,MAAM,CAAE,OAAO,CACfC,WAAW,CAAE,QACf,EAEM,IAAAC,qCAAqC,CAAG,CAC5CC,IAAI,CAAEC,SAAS,CACfC,OAAO,CAAEC,SAAS,CAClBC,KAAK,CAAEC,eACT,EAEM,IAAAC,mCAAmC,CAAG,CAC1CR,WAAW,CAAE,KAAK,CAClBD,MAAM,CAAE,IAAI,CACZD,OAAO,CAAE,IACX;;;;"}
1
+ {"version":3,"file":"tokens.js","sources":["../../../../../src/components/Table/tokens.ts"],"sourcesContent":["import { AlertCircleIcon, CheckIcon } from '~components/Icons';\nimport { size } from '~tokens/global';\n\nconst firstColumnStickyZIndex = 2;\n\nconst refreshWrapperZIndex = 3;\n\nconst checkboxCellWidth = size['44'];\n\nconst tableBackgroundColor = 'surface.background.gray.intense';\nconst tableHeader = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n backgroundColor: 'interactive.background.gray.default',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n} as const;\n\nconst tableFooter = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n backgroundColor: 'interactive.background.gray.default',\n} as const;\n\nconst tableRow = {\n paddingLeft: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n paddingRight: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n minHeight: {\n compact: '36',\n normal: '48',\n comfortable: '60',\n },\n nonStripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n // TODO: Rebranding - on design side: explore pressed state color change, right now both hover & active are same\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n nonStripeWrapper: {\n // not used anywhere\n backgroundColor: 'transparent',\n backgroundColorHover: 'transparent',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'transparent',\n backgroundColorSelectedHover: 'transparent',\n backgroundColorSelectedFocus: 'transparent',\n backgroundColorSelectedActive: 'transparent',\n },\n stripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n stripeWrapper: {\n backgroundColor: 'interactive.background.gray.default',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.faded',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.faded',\n },\n borderBottomWidth: 'thin',\n borderColor: 'surface.border.gray.muted',\n backgroundColorMotionEasing: 'easing.standard.effective',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tableToolbar = {\n backgroundColor: 'transparent',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorMotionEasing: 'easing.standard.effective',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tablePagination = {\n padding: 'spacing.4',\n pageSelectionButton: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.highlighted',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n padding: 'spacing.2',\n borderRadius: 'small',\n focusRingColor: 'surface.border.primary.muted',\n textColor: 'surface.text.gray.subtle',\n textColorSelected: 'surface.text.primary.normal',\n height: size['32'],\n width: size['32'],\n },\n defaultPageSize: 10,\n} as const;\n\nconst tableEditableCellRowDensityToInputSizeMap = {\n compact: 'medium',\n normal: 'large',\n comfortable: 'medium',\n} as const;\n\nconst validationStateToInputTrailingIconMap = {\n none: undefined,\n success: CheckIcon,\n error: AlertCircleIcon,\n};\n\nconst rowDensityToIsTableInputCellMapping = {\n comfortable: false,\n normal: true,\n compact: true,\n};\n\nconst classes = {\n HOVER_ACTIONS: 'hover-actions',\n HOVER_ACTIONS_LAYER2: 'hover-actions-layer-2',\n HOVER_ACTIONS_LAYER3: 'hover-actions-layer-3',\n};\n\nexport {\n tableHeader,\n tableFooter,\n tableRow,\n tableToolbar,\n tablePagination,\n refreshWrapperZIndex,\n tableBackgroundColor,\n firstColumnStickyZIndex,\n checkboxCellWidth,\n tableEditableCellRowDensityToInputSizeMap,\n validationStateToInputTrailingIconMap,\n rowDensityToIsTableInputCellMapping,\n classes,\n};\n"],"names":["tableEditableCellRowDensityToInputSizeMap","compact","normal","comfortable","validationStateToInputTrailingIconMap","none","undefined","success","CheckIcon","error","AlertCircleIcon","rowDensityToIsTableInputCellMapping"],"mappings":";;;;;;;;;;;;;;;;;;AAyHM,IAAAA,yCAAyC,CAAG,CAChDC,OAAO,CAAE,QAAQ,CACjBC,MAAM,CAAE,OAAO,CACfC,WAAW,CAAE,QACf,EAEM,IAAAC,qCAAqC,CAAG,CAC5CC,IAAI,CAAEC,SAAS,CACfC,OAAO,CAAEC,SAAS,CAClBC,KAAK,CAAEC,eACT,EAEM,IAAAC,mCAAmC,CAAG,CAC1CR,WAAW,CAAE,KAAK,CAClBD,MAAM,CAAE,IAAI,CACZD,OAAO,CAAE,IACX;;;;"}
@@ -25,6 +25,7 @@ var _IconButton = function _IconButton(_ref, ref) {
25
25
  onPointerEnter = _ref.onPointerEnter,
26
26
  onTouchEnd = _ref.onTouchEnd,
27
27
  onTouchStart = _ref.onTouchStart,
28
+ isHighlighted = _ref.isHighlighted,
28
29
  _tabIndex = _ref._tabIndex;
29
30
  return /*#__PURE__*/jsx(StyledIconButton, {
30
31
  ref: ref,
@@ -35,6 +36,7 @@ var _IconButton = function _IconButton(_ref, ref) {
35
36
  tabIndex: _tabIndex,
36
37
  accessibilityLabel: accessibilityLabel,
37
38
  isDisabled: isDisabled,
39
+ isHighlighted: isHighlighted,
38
40
  onBlur: onBlur,
39
41
  onFocus: onFocus,
40
42
  onMouseLeave: onMouseLeave,
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","sources":["../../../../../../../src/components/Button/IconButton/IconButton.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable react/display-name */\nimport React from 'react';\nimport type { GestureResponderEvent } from 'react-native';\nimport StyledIconButton from './StyledIconButton';\nimport type { IconComponent } from '~components/Icons';\nimport type { BladeElementRef } from '~utils/types';\nimport type { BladeCommonEvents } from '~components/types';\nimport type { Platform } from '~utils';\nimport type { SubtleOrIntense } from '~tokens/theme/theme';\n\ntype IconButtonProps = {\n /**\n * Icon component to be rendered, eg. `CloseIcon`\n */\n icon: IconComponent;\n\n /**\n * Icon size\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Icon contrast\n *\n * @default 'intense'\n */\n emphasis?: SubtleOrIntense;\n\n /**\n * Sets aria-label to help users know what the action does, eg 'Dismiss alert'\n */\n accessibilityLabel: string;\n\n /**\n * Disabled state for IconButton\n */\n isDisabled?: boolean;\n\n /**\n * Sets tabindex property on button element\n */\n _tabIndex?: number;\n} & BladeCommonEvents &\n Platform.Select<{\n web: {\n onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;\n };\n native: {\n onClick: (event: GestureResponderEvent) => void;\n };\n }>;\n\n/**\n * Component for making clickable icons with transparent background.\n * For other cases please use `Button` component with `icon` prop.\n */\nconst _IconButton: React.ForwardRefRenderFunction<BladeElementRef, IconButtonProps> = (\n {\n icon,\n onClick,\n size = 'medium',\n emphasis = 'intense',\n accessibilityLabel,\n isDisabled,\n onBlur,\n onFocus,\n onMouseLeave,\n onMouseMove,\n onPointerDown,\n onPointerEnter,\n onTouchEnd,\n onTouchStart,\n _tabIndex,\n },\n ref,\n) => {\n return (\n <StyledIconButton\n ref={ref as any}\n onClick={onClick}\n emphasis={emphasis}\n size={size}\n icon={icon}\n tabIndex={_tabIndex}\n accessibilityLabel={accessibilityLabel}\n isDisabled={isDisabled}\n onBlur={onBlur}\n onFocus={onFocus}\n onMouseLeave={onMouseLeave}\n onMouseMove={onMouseMove}\n onPointerDown={onPointerDown}\n onPointerEnter={onPointerEnter}\n onTouchEnd={onTouchEnd}\n onTouchStart={onTouchStart}\n />\n );\n};\n\nconst IconButton = React.forwardRef(_IconButton);\n\nexport type { IconButtonProps };\nexport { IconButton };\n"],"names":["_IconButton","_ref","ref","icon","onClick","_ref$size","size","_ref$emphasis","emphasis","accessibilityLabel","isDisabled","onBlur","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","onTouchEnd","onTouchStart","_tabIndex","_jsx","StyledIconButton","tabIndex","IconButton","React","forwardRef"],"mappings":";;;;AAAA;AACA;AAsDA;AACA;AACA;AACA;AACA,IAAMA,WAA6E,GAAG,SAAhFA,WAA6EA,CAAA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WAAW,EAAEA,WAAY;AACzBC,IAAAA,aAAa,EAAEA,aAAc;AAC7BC,IAAAA,cAAc,EAAEA,cAAe;AAC/BC,IAAAA,UAAU,EAAEA,UAAW;AACvBC,IAAAA,YAAY,EAAEA,YAAAA;AAAa,GAC5B,CAAC,CAAA;AAEN,CAAC,CAAA;AAED,IAAMK,UAAU,gBAAGC,cAAK,CAACC,UAAU,CAACzB,WAAW;;;;"}
1
+ {"version":3,"file":"IconButton.js","sources":["../../../../../../../src/components/Button/IconButton/IconButton.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable react/display-name */\nimport React from 'react';\nimport type { GestureResponderEvent } from 'react-native';\nimport StyledIconButton from './StyledIconButton';\nimport type { IconComponent } from '~components/Icons';\nimport type { BladeElementRef } from '~utils/types';\nimport type { BladeCommonEvents } from '~components/types';\nimport type { Platform } from '~utils';\nimport type { SubtleOrIntense } from '~tokens/theme/theme';\n\ntype IconButtonProps = {\n /**\n * Icon component to be rendered, eg. `CloseIcon`\n */\n icon: IconComponent;\n\n /**\n * Icon size\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n\n /**\n * Icon contrast\n *\n * @default 'intense'\n */\n emphasis?: SubtleOrIntense;\n\n /**\n * Sets aria-label to help users know what the action does, eg 'Dismiss alert'\n */\n accessibilityLabel: string;\n\n /**\n * Disabled state for IconButton\n */\n isDisabled?: boolean;\n\n /**\n * Sets tabindex property on button element\n */\n _tabIndex?: number;\n} & BladeCommonEvents &\n Platform.Select<{\n web: {\n onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;\n /**\n * This changes the hover interaction to highlight icon more\n *\n * **Only available on web currently**\n */\n isHighlighted?: boolean;\n };\n native: {\n onClick: (event: GestureResponderEvent) => void;\n isHighlighted?: undefined;\n };\n }>;\n\n/**\n * Component for making clickable icons with transparent background.\n * For other cases please use `Button` component with `icon` prop.\n */\nconst _IconButton: React.ForwardRefRenderFunction<BladeElementRef, IconButtonProps> = (\n {\n icon,\n onClick,\n size = 'medium',\n emphasis = 'intense',\n accessibilityLabel,\n isDisabled,\n onBlur,\n onFocus,\n onMouseLeave,\n onMouseMove,\n onPointerDown,\n onPointerEnter,\n onTouchEnd,\n onTouchStart,\n isHighlighted,\n _tabIndex,\n },\n ref,\n) => {\n return (\n <StyledIconButton\n ref={ref as any}\n onClick={onClick}\n emphasis={emphasis}\n size={size}\n icon={icon}\n tabIndex={_tabIndex}\n accessibilityLabel={accessibilityLabel}\n isDisabled={isDisabled}\n isHighlighted={isHighlighted}\n onBlur={onBlur}\n onFocus={onFocus}\n onMouseLeave={onMouseLeave}\n onMouseMove={onMouseMove}\n onPointerDown={onPointerDown}\n onPointerEnter={onPointerEnter}\n onTouchEnd={onTouchEnd}\n onTouchStart={onTouchStart}\n />\n );\n};\n\nconst IconButton = React.forwardRef(_IconButton);\n\nexport type { IconButtonProps };\nexport { IconButton };\n"],"names":["_IconButton","_ref","ref","icon","onClick","_ref$size","size","_ref$emphasis","emphasis","accessibilityLabel","isDisabled","onBlur","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","onTouchEnd","onTouchStart","isHighlighted","_tabIndex","_jsx","StyledIconButton","tabIndex","IconButton","React","forwardRef"],"mappings":";;;;AAAA;AACA;AA6DA;AACA;AACA;AACA;AACA,IAAMA,WAA6E,GAAG,SAAhFA,WAA6EA,CAAAC,IAAA,EAmBjFC,GAAG,EACA;AAAA,EAAA,IAlBDC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,OAAO,GAAAH,IAAA,CAAPG,OAAO;IAAAC,SAAA,GAAAJ,IAAA,CACPK,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,SAAA;IAAAE,aAAA,GAAAN,IAAA,CACfO,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,aAAA;IACpBE,kBAAkB,GAA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perty from '@babel/runtime/helpers/defineProperty';
2
2
  import styled from 'styled-components';
3
3
  import React__default from 'react';
4
+ import { highlightedButtonSizeMap, highlightedHoverColorMap } from './tokens.js';
4
5
  import '../../../utils/index.js';
5
6
  import '../../../utils/metaAttribute/index.js';
6
7
  import '../../../utils/makeAccessible/index.js';
7
8
  import '../../../utils/makeMotionTime/index.web.js';
8
9
  import '../../../utils/getFocusRingStyles/index.js';
10
+ import '../../../utils/logger/index.js';
11
+ import getIn from '../../../utils/lodashButBetter/get.js';
9
12
  import { jsx } from 'react/jsx-runtime';
13
+ import { throwBladeError } from '../../../utils/logger/logger.js';
14
+ import { makeSize } from '../../../utils/makeSize/makeSize.js';
10
15
  import { castWebType } from '../../../utils/platform/castUtils.js';
11
16
  import { makeMotionTime } from '../../../utils/makeMotionTime/makeMotionTime.web.js';
12
17
  import { getFocusRingStyles } from '../../../utils/getFocusRingStyles/getFocusRingStyles.web.js';
@@ -24,11 +29,24 @@ var StyledButton = /*#__PURE__*/styled.button.withConfig({
24
29
  emphasis = props.emphasis;
25
30
  var motionToken = theme.motion;
26
31
  var emphasisColor = emphasis === 'intense' ? 'gray' : 'staticWhite';
32
+ if (true) {
33
+ if (props.$size === 'large' && props.$isHighlighted) {
34
+ throwBladeError({
35
+ moduleName: 'IconButton',
36
+ message: 'size large is not allowed with isHighlighted true'
37
+ });
38
+ return null;
39
+ }
40
+ }
27
41
  return {
28
42
  border: 'none',
29
43
  cursor: props.disabled ? 'not-allowed' : 'pointer',
30
44
  padding: 0,
31
- borderRadius: theme.border.radius.small,
45
+ height: props.$isHighlighted ?
46
+ // We throw error for size large on top
47
+ makeSize(highlightedButtonSizeMap[props.$size]) : undefined,
48
+ width: props.$isHighlighted ? makeSize(highlightedButtonSizeMap[props.$size]) : undefined,
49
+ borderRadius: props.$isHighlighted ? theme.border.radius.round : theme.border.radius.small,
32
50
  background: 'transparent',
33
51
  display: 'flex',
34
52
  alignItems: 'center',
@@ -37,8 +55,9 @@ var StyledButton = /*#__PURE__*/styled.button.withConfig({
37
55
  transitionProperty: 'color, box-shadow',
38
56
  transitionDuration: castWebType(makeMotionTime(motionToken.duration.xquick)),
39
57
  transitionTimingFunction: motionToken.easing.standard.effective,
40
- '&:hover': {
41
- color: theme.colors.interactive.icon[emphasisColor].subtle
58
+ '&:hover:not([disabled])': {
59
+ color: theme.colors.interactive.icon[emphasisColor].subtle,
60
+ backgroundColor: props.$isHighlighted ? getIn(theme.colors, highlightedHoverColorMap[emphasis]) : 'transparent'
42
61
  },
43
62
  '&:focus-visible': _objectSpread(_objectSpread({}, getFocusRingStyles({
44
63
  theme: theme
@@ -57,6 +76,7 @@ var StyledIconButton = /*#__PURE__*/React__default.forwardRef(function (_ref, re
57
76
  emphasis = _ref.emphasis,
58
77
  accessibilityLabel = _ref.accessibilityLabel,
59
78
  isDisabled = _ref.isDisabled,
79
+ isHighlighted = _ref.isHighlighted,
60
80
  testID = _ref.testID,
61
81
  onBlur = _ref.onBlur,
62
82
  onFocus = _ref.onFocus,
@@ -81,6 +101,8 @@ var StyledIconButton = /*#__PURE__*/React__default.forwardRef(function (_ref, re
81
101
  onTouchEnd: onTouchEnd,
82
102
  onTouchStart: onTouchStart,
83
103
  disabled: isDisabled,
104
+ $isHighlighted: isHighlighted,
105
+ $size: size,
84
106
  tabIndex: tabIndex
85
107
  }, makeAccessible({
86
108
  label: accessibilityLabel
@@ -1 +1 @@
1
- {"version":3,"file":"StyledIconButton.web.js","sources":["../../../../../../../src/components/Button/IconButton/StyledIconButton.web.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport styled from 'styled-components';\nimport type { ReactElement } from 'react';\nimport React from 'react';\nimport type { StyledIconButtonProps } from './types';\nimport { castWebType } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { SubtleOrIntense } from '~tokens/theme/theme';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { makeMotionTime } from '~utils/makeMotionTime';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\n\ntype StyledButtonProps = {\n emphasis: SubtleOrIntense;\n};\n\nconst StyledButton = styled.button<StyledButtonProps>((props) => {\n const { theme, emphasis } = props;\n const motionToken = theme.motion;\n\n const emphasisColor = emphasis === 'intense' ? 'gray' : 'staticWhite';\n\n return {\n border: 'none',\n cursor: props.disabled ? 'not-allowed' : 'pointer',\n padding: 0,\n borderRadius: theme.border.radius.small,\n background: 'transparent',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: props.disabled\n ? theme.colors.interactive.icon[emphasisColor].disabled\n : theme.colors.interactive.icon[emphasisColor].muted,\n transitionProperty: 'color, box-shadow',\n transitionDuration: castWebType(makeMotionTime(motionToken.duration.xquick)),\n transitionTimingFunction: motionToken.easing.standard.effective as string,\n\n '&:hover': {\n color: theme.colors.interactive.icon[emphasisColor].subtle,\n },\n\n '&:focus-visible': {\n ...getFocusRingStyles({ theme }),\n color: theme.colors.interactive.icon[emphasisColor].subtle,\n },\n\n '&:active': {\n color: theme.colors.interactive.icon[emphasisColor].subtle,\n },\n };\n});\n\nconst StyledIconButton = React.forwardRef<HTMLButtonElement, StyledIconButtonProps>(\n (\n {\n icon: Icon,\n onClick,\n size,\n emphasis,\n accessibilityLabel,\n isDisabled,\n testID,\n onBlur,\n onFocus,\n onMouseLeave,\n onMouseMove,\n onPointerDown,\n onPointerEnter,\n onTouchEnd,\n onTouchStart,\n tabIndex,\n },\n ref,\n ): ReactElement => (\n <StyledButton\n ref={ref}\n onClick={castWebType(onClick)}\n emphasis={emphasis}\n type=\"button\"\n onBlur={onBlur}\n onFocus={onFocus}\n onMouseLeave={onMouseLeave}\n onMouseMove={onMouseMove}\n onPointerDown={onPointerDown}\n onPointerEnter={onPointerEnter}\n onTouchEnd={onTouchEnd}\n onTouchStart={onTouchStart}\n disabled={isDisabled}\n tabIndex={tabIndex}\n {...makeAccessible({ label: accessibilityLabel })}\n {...metaAttribute({ name: MetaConstants.IconButton, testID })}\n >\n <Icon size={size} color={isDisabled ? 'interactive.icon.gray.disabled' : 'currentColor'} />\n </StyledButton>\n ),\n);\n\nexport default StyledIconButton;\n"],"names":["StyledButton","styled","button","withConfig","displayName","componentId","props","theme","emphasis","motionToken","motion","emphasisColor","border","cursor","disabled","padding","borderRadius","radius","small","background","display","alignItems","justifyContent","color","colors","interactive","icon","muted","transitionProperty","transitionDuration","castWebType","makeMotionTime","duration","xquick","transitionTimingFunction","easing","standard","effective","subtle","_objectSpread","getFocusRingStyles","StyledIconButton","React","forwardRef","_ref","ref","Icon","onClick","size","accessibilityLabel","isDisabled","testID","onBlur","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","onTouchEnd","onTouchStart","tabIndex","_jsx","type","makeAccessible","label","metaAttribute","name","MetaConstants","IconButton","children"],"mappings":";;;;;;;;;;;;;;;;;;AAgBA,IAAMA,YAAY,gBAAGC,MAAM,CAACC,MAAM,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,mCAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAoB,CAAA,CAAA,UAACC,KAAK,EAAK;AAC/D,EAAA,IAAQC,KAAK,GAAeD,KAAK,CAAzBC,KAAK;IAAEC,QAAQ,GAAKF,KAAK,CAAlBE,QAAQ,CAAA;AACvB,EAAA,IAAMC,WAAW,GAAGF,KAAK,CAACG,MAAM,CAAA;EAEhC,IAAMC,aAAa,GAAGH,QAAQ,KAAK,SAAS,GAAG,MAAM,GAAG,aAAa,CAAA;EAErE,OAAO;AACLI,IAAAA,MAAM,EAAE,MAAM;AACdC,IAAAA,MAAM,EAAEP,KAAK,CAACQ,QAAQ,GAAG,aAAa,GAAG,SAAS;AAClDC,IAAAA,OAAO,EAAE,CAAC;AACVC,IAAAA,YAAY,EAAET,KAAK,CAACK,MAAM,CAACK,MAAM,CAACC,KAAK;AACvCC,IAAAA,UAAU,EAAE,aAAa;AACzBC,IAAAA,OAAO,EAAE,MAAM;AACfC,IAAAA,UAAU,EAAE,QAAQ;AACpBC,IAAAA,cAA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,CAACC,UAAU;AAAEjB,IAAAA,MAAM,EAANA,MAAAA;AAAO,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;IAAAkB,QAAA,eAE7DR,GAAA,CAACf,IAAI,EAAA;AAACE,MAAAA,IAAI,EAAEA,IAAK;AAACzB,MAAAA,KAAK,EAAE2B,UAAU,GAAG,gCAAgC,GAAG,cAAA;KAAiB,CAAA;AAAC,GAAA,CAC/E,CAAC,CAAA;AAAA,CAEnB;;;;"}
1
+ {"version":3,"file":"StyledIconButton.web.js","sources":["../../../../../../../src/components/Button/IconButton/StyledIconButton.web.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\nimport styled from 'styled-components';\nimport type { ReactElement } from 'react';\nimport React from 'react';\nimport type { StyledIconButtonProps } from './types';\nimport { highlightedButtonSizeMap, highlightedHoverColorMap } from './tokens';\nimport { castWebType, makeSize } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport type { SubtleOrIntense } from '~tokens/theme/theme';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { makeMotionTime } from '~utils/makeMotionTime';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport { throwBladeError } from '~utils/logger';\nimport getIn from '~utils/lodashButBetter/get';\n\ntype StyledButtonProps = {\n emphasis: SubtleOrIntense;\n $isHighlighted: StyledIconButtonProps['isHighlighted'];\n $size: StyledIconButtonProps['size'];\n};\n\nconst StyledButton = styled.button<StyledButtonProps>((props) => {\n const { theme, emphasis } = props;\n const motionToken = theme.motion;\n\n const emphasisColor = emphasis === 'intense' ? 'gray' : 'staticWhite';\n\n if (__DEV__) {\n if (props.$size === 'large' && props.$isHighlighted) {\n throwBladeError({\n moduleName: 'IconButton',\n message: 'size large is not allowed with isHighlighted true',\n });\n return null;\n }\n }\n\n return {\n border: 'none',\n cursor: props.disabled ? 'not-allowed' : 'pointer',\n padding: 0,\n height: props.$isHighlighted\n ? // We throw error for size large on top\n makeSize(highlightedButtonSizeMap[props.$size as 'small' | 'medium'])\n : undefined,\n width: props.$isHighlighted\n ? makeSize(highlightedButtonSizeMap[props.$size as 'small' | 'medium'])\n : undefined,\n borderRadius: props.$isHighlighted ? theme.border.radius.round : theme.border.radius.small,\n background: 'transparent',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: props.disabled\n ? theme.colors.interactive.icon[emphasisColor].disabled\n : theme.colors.interactive.icon[emphasisColor].muted,\n transitionProperty: 'color, box-shadow',\n transitionDuration: castWebType(makeMotionTime(motionToken.duration.xquick)),\n transitionTimingFunction: motionToken.easing.standard.effective as string,\n\n '&:hover:not([disabled])': {\n color: theme.colors.interactive.icon[emphasisColor].subtle,\n backgroundColor: props.$isHighlighted\n ? getIn(theme.colors, highlightedHoverColorMap[emphasis])\n : 'transparent',\n },\n\n '&:focus-visible': {\n ...getFocusRingStyles({ theme }),\n color: theme.colors.interactive.icon[emphasisColor].subtle,\n },\n\n '&:active': {\n color: theme.colors.interactive.icon[emphasisColor].subtle,\n },\n };\n});\n\nconst StyledIconButton = React.forwardRef<HTMLButtonElement, StyledIconButtonProps>(\n (\n {\n icon: Icon,\n onClick,\n size,\n emphasis,\n accessibilityLabel,\n isDisabled,\n isHighlighted,\n testID,\n onBlur,\n onFocus,\n onMouseLeave,\n onMouseMove,\n onPointerDown,\n onPointerEnter,\n onTouchEnd,\n onTouchStart,\n tabIndex,\n },\n ref,\n ): ReactElement => (\n <StyledButton\n ref={ref}\n onClick={castWebType(onClick)}\n emphasis={emphasis}\n type=\"button\"\n onBlur={onBlur}\n onFocus={onFocus}\n onMouseLeave={onMouseLeave}\n onMouseMove={onMouseMove}\n onPointerDown={onPointerDown}\n onPointerEnter={onPointerEnter}\n onTouchEnd={onTouchEnd}\n onTouchStart={onTouchStart}\n disabled={isDisabled}\n $isHighlighted={isHighlighted}\n $size={size}\n tabIndex={tabIndex}\n {...makeAccessible({ label: accessibilityLabel })}\n {...metaAttribute({ name: MetaConstants.IconButton, testID })}\n >\n <Icon size={size} color={isDisabled ? 'interactive.icon.gray.disabled' : 'currentColor'} />\n </StyledButton>\n ),\n);\n\nexport default StyledIconButton;\n"],"names":["StyledButton","styled","button","withConfig","displayName","componentId","props","theme","emphasis","motionToken","motion","emphasisColor","$size","$isHighlighted","throwBladeError","moduleName","message","border","cursor","disabled","padding","height","makeSize","highlightedButtonSizeMap","undefined","width","borderRadius","radius","round","small","background","display","alignItems","justifyContent","color","colors","interactive","icon","muted","transitionProperty","transitionDuration","castWebType","makeMotionTime","duration","xquick","transitionTimingFunction","easing","standard","effective","subtle","backgroundColor","getIn","highlightedHoverColorMap","_objectSpread","getFocusRingStyles","StyledIconButton","React","forwardRef","_ref","ref","Icon","onClick","size","accessibilityLabel","isDisabled","isHighlighted","testID","onBlur","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","onTouchEnd","onTouchStart","tabIndex","_jsx","type","makeAccessible","label","metaAttribute","name","MetaConstants","IconButton","children"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAMA,YAAY,gBAAGC,MAAM,CAACC,MAAM,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,mCAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAoB,CAAA,CAAA,UAACC,KAAK,EAAK;AAC/D,EAAA,IAAQC,KAAK,GAAeD,KAAK,CAAzBC,KAAK;IAAEC,QAAQ,GAAKF,KAAK,CAAlBE,QAAQ,CAAA;AACvB,EAAA,IAAMC,WAAW,GAAGF,KAAK,CAACG,MAAM,CAAA;EAEhC,IAAMC,aAAa,GAAGH,QAAQ,KAAK,SAAS,GAAG,MAAM,GAAG,aAAa,CAAA;AAErE,EAAA,IAAI,IAAO,EAAE;IACX,IAAIF,KAAK,CAACM,KAAK,KAAK,OAAO,IAAIN,KAAK,CAACO,cAAc,EAAE;AACnDC,MAAAA,eAAe,CAAC;AACdC,QAAAA,UAAU,EAAE,YAAY;AACxBC,QAAAA,OAAO,EAAE,mDAAA;AACX,OAAC,CAAC,CAAA;AACF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B,CAAA;AAAC,GAAA,CAC/E,CAAC,CAAA;AAAA,CAEnB;;;;"}
@@ -0,0 +1,14 @@
1
+ import '../../../tokens/global/index.js';
2
+ import { size } from '../../../tokens/global/size.js';
3
+
4
+ var highlightedButtonSizeMap = {
5
+ small: size['24'],
6
+ medium: size['32']
7
+ };
8
+ var highlightedHoverColorMap = {
9
+ intense: 'interactive.background.gray.fadedHighlighted',
10
+ subtle: 'interactive.background.staticWhite.faded'
11
+ };
12
+
13
+ export { highlightedButtonSizeMap, highlightedHoverColorMap };
14
+ //# sourceMappingURL=tokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens.js","sources":["../../../../../../../src/components/Button/IconButton/tokens.ts"],"sourcesContent":["import { size } from '~tokens/global';\n\nconst highlightedButtonSizeMap = {\n small: size['24'],\n medium: size['32'],\n} as const;\n\nconst highlightedHoverColorMap = {\n intense: 'interactive.background.gray.fadedHighlighted',\n subtle: 'interactive.background.staticWhite.faded',\n} as const;\n\nexport { highlightedButtonSizeMap, highlightedHoverColorMap };\n"],"names":["highlightedButtonSizeMap","small","size","medium","highlightedHoverColorMap","intense","subtle"],"mappings":";;;AAEA,IAAMA,wBAAwB,GAAG;AAC/BC,EAAAA,KAAK,EAAEC,IAAI,CAAC,IAAI,CAAC;EACjBC,MAAM,EAAED,IAAI,CAAC,IAAI,CAAA;AACnB,EAAU;AAEV,IAAME,wBAAwB,GAAG;AAC/BC,EAAAA,OAAO,EAAE,8CAA8C;AACvDC,EAAAA,MAAM,EAAE,0CAAA;AACV;;;;"}
@@ -24,6 +24,7 @@ import '../../utils/assignWithoutSideEffects/index.js';
24
24
  import '../BladeProvider/index.js';
25
25
  import getIn from '../../utils/lodashButBetter/get.js';
26
26
  import '../../utils/makeAccessible/index.js';
27
+ import { useIsMobile } from '../../utils/useIsMobile.js';
27
28
  import { jsx, jsxs } from 'react/jsx-runtime';
28
29
  import { getComponentId, isValidAllowedChildren } from '../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
29
30
  import useTheme from '../BladeProvider/useTheme.js';
@@ -152,9 +153,15 @@ var _Table = function _Table(_ref3) {
152
153
  _React$useState10 = _slicedToArray(_React$useState9, 2),
153
154
  headerRowDensity = _React$useState10[0],
154
155
  setHeaderRowDensity = _React$useState10[1];
156
+ var _React$useState11 = React__default.useState(false),
157
+ _React$useState12 = _slicedToArray(_React$useState11, 2),
158
+ hasHoverActions = _React$useState12[0],
159
+ setHasHoverActions = _React$useState12[1];
155
160
  // Need to make header is sticky if first column is sticky otherwise the first header cell will not be sticky
156
161
  var shouldHeaderBeSticky = isHeaderSticky !== null && isHeaderSticky !== void 0 ? isHeaderSticky : isFirstColumnSticky;
157
162
  var backgroundColor = tableBackgroundColor;
163
+ var isMobile = useIsMobile();
164
+ var lastHoverActionsColWidth = isMobile ? '1fr' : '0px';
158
165
  var _usePresence = usePresence(isRefreshing, {
159
166
  transitionDuration: theme.motion.duration.quick
160
167
  }),
@@ -169,7 +176,7 @@ var _Table = function _Table(_ref3) {
169
176
  var firstColumnStickyFooterCellCSS = isFirstColumnSticky ? "\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ".concat(firstColumnStickyZIndex, " !important;\n }\n ").concat(selectionType === 'multiple' && "&:nth-of-type(2) {\n left: ".concat(checkboxCellWidth, "px !important;\n position: sticky !important;\n z-index: ").concat(firstColumnStickyZIndex, " !important;\n }\n ")) : '';
170
177
  var firstColumnStickyBodyCellCSS = isFirstColumnSticky ? "\n &:nth-of-type(1) {\n left: 0 !important;\n position: sticky !important;\n z-index: ".concat(firstColumnStickyZIndex, " !important;\n }\n ").concat(selectionType === 'multiple' && "&:nth-of-type(2) {\n left: ".concat(checkboxCellWidth, "px !important;\n position: sticky !important;\n z-index: ").concat(firstColumnStickyZIndex, " !important;\n }\n ")) : '';
171
178
  var tableTheme = useTheme$1({
172
- Table: "\n height:".concat(isFooterSticky ? "100%" : undefined, ";\n border: ").concat(makeBorderSize(theme.border.width.thin), " solid ").concat(theme.colors.surface.border.gray.muted, ";\n --data-table-library_grid-template-columns: ").concat(gridTemplateColumns !== null && gridTemplateColumns !== void 0 ? gridTemplateColumns : " ".concat(selectionType === 'multiple' ? 'min-content' : '', " repeat(").concat(columnCount, ",minmax(100px, 1fr)) !important;"), " !important;\n background-color: ").concat(getIn(theme.colors, backgroundColor), ";\n "),
179
+ Table: "\n height:".concat(isFooterSticky ? "100%" : undefined, ";\n border: ").concat(makeBorderSize(theme.border.width.thin), " solid ").concat(theme.colors.surface.border.gray.muted, ";\n --data-table-library_grid-template-columns: ").concat(gridTemplateColumns ? "".concat(gridTemplateColumns, " ").concat(hasHoverActions ? lastHoverActionsColWidth : '') : " ".concat(selectionType === 'multiple' ? 'min-content' : '', " repeat(").concat(columnCount, ",minmax(100px, 1fr)) ").concat(hasHoverActions ? lastHoverActionsColWidth : '', " !important;"), " !important;\n background-color: ").concat(getIn(theme.colors, backgroundColor), ";\n "),
173
180
  HeaderCell: "\n position: ".concat(shouldHeaderBeSticky ? 'sticky' : 'relative', ";\n \n top: ").concat(shouldHeaderBeSticky ? '0' : undefined, ";\n ").concat(firstColumnStickyHeaderCellCSS, "\n "),
174
181
  Cell: "\n ".concat(firstColumnStickyBodyCellCSS, "\n "),
175
182
  FooterCell: "\n position: ".concat(isFooterSticky ? 'sticky' : 'relative', ";\n bottom: ").concat(isFooterSticky ? '0' : undefined, ";\n ").concat(firstColumnStickyFooterCellCSS, "\n ")
@@ -308,9 +315,11 @@ var _Table = function _Table(_ref3) {
308
315
  backgroundColor: backgroundColor,
309
316
  headerRowDensity: headerRowDensity,
310
317
  setHeaderRowDensity: setHeaderRowDensity,
311
- showBorderedCells: showBorderedCells
318
+ showBorderedCells: showBorderedCells,
319
+ hasHoverActions: hasHoverActions,
320
+ setHasHoverActions: setHasHoverActions
312
321
  };
313
- }, [selectionType, selectedRows, totalItems, toggleRowSelectionById, toggleAllRowsSelection, deselectAllRows, rowDensity, toggleSort, currentSortedState, setPaginationPage, setPaginationRowSize, currentPaginationState, showStripedRows, disabledRows, setDisabledRows, paginationType, setPaginationType, backgroundColor, headerRowDensity, setHeaderRowDensity, showBorderedCells]);
322
+ }, [selectionType, selectedRows, totalItems, toggleRowSelectionById, toggleAllRowsSelection, deselectAllRows, rowDensity, toggleSort, currentSortedState, setPaginationPage, setPaginationRowSize, currentPaginationState, showStripedRows, disabledRows, setDisabledRows, paginationType, setPaginationType, backgroundColor, headerRowDensity, setHeaderRowDensity, showBorderedCells, hasHoverActions, setHasHoverActions]);
314
323
  return /*#__PURE__*/jsx(TableContext.Provider, {
315
324
  value: tableContext,
316
325
  children: isLoading ? /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread(_objectSpread({
@@ -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';\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\" testID=\"table-spinner\" />\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","testID","_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,IAAA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,IAAMyD,KAAK,gBAAGuG,wBAAwB,CAAChL,MAAM,EAAE;EAC7C3B,WAAW,EAAEf,YAAY,CAACmH,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';\nimport { useIsMobile } from '~utils/useIsMobile';\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 const [hasHoverActions, setHasHoverActions] = React.useState(false);\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 isMobile = useIsMobile();\n const lastHoverActionsColWidth = isMobile ? '1fr' : '0px';\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 ? `${gridTemplateColumns} ${hasHoverActions ? lastHoverActionsColWidth : ''}`\n : ` ${\n selectionType === 'multiple' ? 'min-content' : ''\n } repeat(${columnCount},minmax(100px, 1fr)) ${\n hasHoverActions ? lastHoverActionsColWidth : ''\n } !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 hasHoverActions,\n setHasHoverActions,\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 hasHoverActions,\n setHasHoverActions,\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\" testID=\"table-spinner\" />\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","_React$useState11","_React$useState12","hasHoverActions","setHasHoverActions","shouldHeaderBeSticky","backgroundColor","tableBackgroundColor","isMobile","useIsMobile","lastHoverActionsColWidth","_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","testID","_jsxs","position","zIndex","refreshWrapperZIndex","color","role","layout","fixedHeader","horizontalScroll","select","makeAccessible","multiSelectable","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,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,IA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