@razorpay/blade 11.25.0 → 11.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +1 -1
- package/build/lib/native/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +4 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -1
- package/build/lib/native/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js +1 -1
- package/build/lib/native/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/native/components/Table/TableBody.native.js +2 -2
- package/build/lib/native/components/Table/TableBody.native.js.map +1 -1
- package/build/lib/native/components/Table/TableContext.js +6 -0
- package/build/lib/native/components/Table/TableContext.js.map +1 -0
- package/build/lib/native/components/Table/TableEditableCell.native.js +16 -0
- package/build/lib/native/components/Table/TableEditableCell.native.js.map +1 -0
- package/build/lib/native/components/Table/TableEditableCellContext.js +6 -0
- package/build/lib/native/components/Table/TableEditableCellContext.js.map +1 -0
- package/build/lib/native/components/Table/TablePagination.native.js +2 -2
- package/build/lib/native/components/Table/TablePagination.native.js.map +1 -1
- package/build/lib/native/components/Table/TableToolbar.native.js +2 -2
- package/build/lib/native/components/Table/TableToolbar.native.js.map +1 -1
- package/build/lib/native/components/Table/tokens.js +22 -0
- package/build/lib/native/components/Table/tokens.js.map +1 -0
- package/build/lib/native/components/index.js +4 -3
- package/build/lib/native/components/index.js.map +1 -1
- package/build/lib/native/tokens/theme/createTheme.js +1 -1
- package/build/lib/native/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/web/development/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +1 -1
- package/build/lib/web/development/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +1 -2
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js +3 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +1 -1
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +5 -3
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js +55 -33
- package/build/lib/web/development/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +4 -4
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js +4 -2
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +22 -4
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -0
- package/build/lib/web/development/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js +3 -3
- package/build/lib/web/development/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/web/development/components/Table/TableBody.web.js +26 -166
- package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableEditableCell.web.js +194 -0
- package/build/lib/web/development/components/Table/TableEditableCell.web.js.map +1 -0
- package/build/lib/web/development/components/Table/TableEditableCellContext.js +12 -0
- package/build/lib/web/development/components/Table/TableEditableCellContext.js.map +1 -0
- package/build/lib/web/development/components/Table/TablePagination.web.js +3 -2
- package/build/lib/web/development/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/development/components/Table/index.js +2 -2
- package/build/lib/web/development/components/Table/tokens.js +14 -2
- package/build/lib/web/development/components/Table/tokens.js.map +1 -1
- package/build/lib/web/development/components/index.js +2 -1
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/tokens/theme/createTheme.js +5 -2
- package/build/lib/web/development/tokens/theme/createTheme.js.map +1 -1
- package/build/lib/web/production/components/BaseMenu/BaseMenuItem/BaseMenuItem.js +1 -1
- package/build/lib/web/production/components/BaseMenu/BaseMenuItem/BaseMenuItem.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +1 -2
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js +3 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +1 -1
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +5 -3
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js +55 -33
- package/build/lib/web/production/components/Input/BaseInput/BaseInputTagSlot.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +4 -4
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js +4 -2
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +22 -4
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js +1 -0
- package/build/lib/web/production/components/Radio/RadioIcon/RadioIconWrapperStyles.js.map +1 -1
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js +3 -3
- package/build/lib/web/production/components/Spinner/BaseSpinner/BaseSpinner.js.map +1 -1
- package/build/lib/web/production/components/Table/TableBody.web.js +26 -166
- package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableEditableCell.web.js +194 -0
- package/build/lib/web/production/components/Table/TableEditableCell.web.js.map +1 -0
- package/build/lib/web/production/components/Table/TableEditableCellContext.js +12 -0
- package/build/lib/web/production/components/Table/TableEditableCellContext.js.map +1 -0
- package/build/lib/web/production/components/Table/TablePagination.web.js +3 -2
- package/build/lib/web/production/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/production/components/Table/index.js +2 -2
- package/build/lib/web/production/components/Table/tokens.js +14 -2
- package/build/lib/web/production/components/Table/tokens.js.map +1 -1
- package/build/lib/web/production/components/index.js +2 -1
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/tokens/theme/createTheme.js +5 -2
- package/build/lib/web/production/tokens/theme/createTheme.js.map +1 -1
- package/build/types/components/index.d.ts +16 -4
- package/build/types/components/index.native.d.ts +18 -6
- package/build/types/tokens/index.d.ts +6 -3
- package/build/types/tokens/index.native.d.ts +6 -3
- package/package.json +1 -1
- package/build/lib/web/development/components/Table/types.js +0 -2
- package/build/lib/web/development/components/Table/types.js.map +0 -1
- package/build/lib/web/production/components/Table/types.js +0 -2
- package/build/lib/web/production/components/Table/types.js.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
var TableEditableCellContext = /*#__PURE__*/React__default.createContext({
|
|
4
|
+
isInsideTableEditableCell: false
|
|
5
|
+
});
|
|
6
|
+
var useTableEditableCell = function useTableEditableCell() {
|
|
7
|
+
var contextValue = React__default.useContext(TableEditableCellContext);
|
|
8
|
+
return contextValue;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { TableEditableCellContext, useTableEditableCell };
|
|
12
|
+
//# sourceMappingURL=TableEditableCellContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableEditableCellContext.js","sources":["../../../../../../src/components/Table/TableEditableCellContext.tsx"],"sourcesContent":["import React from 'react';\n\ntype TableEditableCellContextType = {\n isInsideTableEditableCell: boolean;\n};\n\nconst TableEditableCellContext = React.createContext<TableEditableCellContextType>({\n isInsideTableEditableCell: false,\n});\n\nconst useTableEditableCell = (): TableEditableCellContextType => {\n const contextValue = React.useContext(TableEditableCellContext);\n return contextValue;\n};\n\nexport { TableEditableCellContext, useTableEditableCell };\n"],"names":["TableEditableCellContext","React","createContext","isInsideTableEditableCell","useTableEditableCell","contextValue","useContext"],"mappings":";;AAMA,IAAMA,wBAAwB,gBAAGC,cAAK,CAACC,aAAa,CAA+B;AACjFC,EAAAA,yBAAyB,EAAE,KAAA;AAC7B,CAAC,EAAC;AAEF,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAoBA,GAAuC;AAC/D,EAAA,IAAMC,YAAY,GAAGJ,cAAK,CAACK,UAAU,CAACN,wBAAwB,CAAC,CAAA;AAC/D,EAAA,OAAOK,YAAY,CAAA;AACrB;;;;"}
|
|
@@ -162,7 +162,8 @@ var _TablePagination = function _TablePagination(_ref3) {
|
|
|
162
162
|
currentPaginationState = _useTableContext.currentPaginationState,
|
|
163
163
|
totalItems = _useTableContext.totalItems,
|
|
164
164
|
setPaginationRowSize = _useTableContext.setPaginationRowSize,
|
|
165
|
-
setPaginationType = _useTableContext.setPaginationType
|
|
165
|
+
setPaginationType = _useTableContext.setPaginationType,
|
|
166
|
+
backgroundColor = _useTableContext.backgroundColor;
|
|
166
167
|
var _React$useState = React__default.useState(defaultPageSize),
|
|
167
168
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
168
169
|
currentPageSize = _React$useState2[0],
|
|
@@ -236,7 +237,7 @@ var _TablePagination = function _TablePagination(_ref3) {
|
|
|
236
237
|
display: "flex",
|
|
237
238
|
flexDirection: "row",
|
|
238
239
|
padding: tablePagination.padding,
|
|
239
|
-
backgroundColor:
|
|
240
|
+
backgroundColor: backgroundColor,
|
|
240
241
|
children: [showLabel && !onMobile && /*#__PURE__*/jsx(BaseBox, {
|
|
241
242
|
display: "flex",
|
|
242
243
|
justifyContent: "center",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TablePagination.web.js","sources":["../../../../../../src/components/Table/TablePagination.web.tsx"],"sourcesContent":["import React, { useCallback, useEffect } from 'react';\nimport styled from 'styled-components';\nimport { useTableContext } from './TableContext';\nimport { ComponentIds } from './componentIds';\nimport { tablePagination } from './tokens';\nimport type { TablePaginationCommonProps, TablePaginationProps } from './types';\nimport isUndefined from '~utils/lodashButBetter/isUndefined';\nimport getIn from '~utils/lodashButBetter/get';\nimport BaseBox from '~components/Box/BaseBox';\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n ChevronsLeftIcon,\n ChevronsRightIcon,\n MoreHorizontalIcon,\n} from '~components/Icons';\nimport { Dropdown, DropdownOverlay } from '~components/Dropdown';\nimport { SelectInput } from '~components/Input/DropdownInputTriggers';\nimport { ActionList, ActionListItem } from '~components/ActionList';\nimport { Text } from '~components/Typography';\nimport { makeSize } from '~utils';\nimport { Button } from '~components/Button';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { useTheme } from '~components/BladeProvider';\nimport { throwBladeError } from '~utils/logger';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\n\nconst pageSizeOptions: NonNullable<TablePaginationCommonProps['defaultPageSize']>[] = [10, 25, 50];\n\nconst PageSelectionButton = styled.button<{ isSelected?: boolean }>(({ theme, isSelected }) => ({\n backgroundColor: isSelected\n ? getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorSelected)\n : 'transparent',\n border: 'none',\n cursor: 'pointer',\n height: makeSize(tablePagination.pageSelectionButton.height),\n width: makeSize(tablePagination.pageSelectionButton.width),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: getIn(theme.border.radius, tablePagination.pageSelectionButton.borderRadius),\n '&:hover': {\n backgroundColor: isSelected\n ? getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorSelectedHover)\n : getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorHover),\n },\n '&:focus-visible': {\n backgroundColor: isSelected\n ? getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorSelectedActive)\n : getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorActive),\n outline: 'none',\n '&:focus-visible': getFocusRingStyles({ theme }),\n },\n '&:active': {\n backgroundColor: isSelected\n ? getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorSelectedActive)\n : getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorActive),\n },\n}));\nconst getPaginationButtons = ({\n currentSelection,\n totalPages,\n}: {\n currentSelection: number;\n totalPages: number;\n}): {\n middleItems: number[];\n showStartEllipsis: boolean;\n showEndEllipsis: boolean;\n firstItem: number;\n lastItem: number;\n} => {\n const halfRange = 2;\n const minMiddleItems = 5;\n\n // return if totalPages is less than minMiddleItems\n if (totalPages <= minMiddleItems) {\n return {\n middleItems: Array.from({ length: totalPages - 2 }, (_, index) => index + 2),\n showStartEllipsis: false,\n showEndEllipsis: false,\n firstItem: 1,\n lastItem: totalPages,\n };\n }\n\n let start = Math.max(1, currentSelection - halfRange);\n let end = Math.min(totalPages, start + 2 * halfRange);\n\n // Ensure at least minMiddleItems items in middleItems\n while (end - start + 1 < minMiddleItems && (start > 1 || end < totalPages)) {\n if (start > 1) {\n start--;\n }\n if (end < totalPages) {\n end++;\n }\n }\n\n let showStartEllipsis = false;\n let showEndEllipsis = false;\n\n const paginationButtons: number[] = [];\n for (let i = start; i <= end; i++) {\n paginationButtons.push(i);\n }\n\n // if paginationButtons contains 1, remove it\n if (paginationButtons.includes(1)) {\n paginationButtons.shift();\n // add an extra item at the end if length of total pages is greater than minMiddleItems+1\n if (totalPages > minMiddleItems + 1) paginationButtons.push(end + 1);\n }\n\n // if paginationButtons contains totalPages, remove it\n if (paginationButtons.includes(totalPages)) {\n paginationButtons.pop();\n // add an extra item at the beginning if length of total pages is greater than minMiddleItems+1\n if (totalPages > minMiddleItems + 1) paginationButtons.unshift(start - 1);\n }\n\n if (paginationButtons[0] > 2) {\n showStartEllipsis = true;\n }\n\n if (paginationButtons[paginationButtons.length - 1] + 1 < totalPages) {\n showEndEllipsis = true;\n }\n\n return {\n middleItems: paginationButtons,\n showStartEllipsis,\n showEndEllipsis,\n firstItem: 1,\n lastItem: totalPages,\n };\n};\n\nconst _TablePagination = ({\n currentPage: controlledCurrentPage,\n onPageChange,\n onPageSizeChange,\n defaultPageSize = tablePagination.defaultPageSize,\n showPageSizePicker = true,\n showPageNumberSelector = false,\n showLabel,\n label,\n totalItemCount,\n paginationType = 'client',\n}: TablePaginationProps): React.ReactElement => {\n const {\n setPaginationPage,\n currentPaginationState,\n totalItems,\n setPaginationRowSize,\n setPaginationType,\n } = useTableContext();\n const [currentPageSize, setCurrentPageSize] = React.useState<number>(defaultPageSize);\n const [currentPage, setCurrentPage] = React.useState<number>(\n !isUndefined(controlledCurrentPage) ? controlledCurrentPage : currentPaginationState?.page ?? 0,\n );\n const [currentEllipseHover, setCurrentEllipseHover] = React.useState<'start' | 'end' | undefined>(\n undefined,\n );\n\n const defaultLabel = currentPaginationState\n ? `Showing ${currentPaginationState.page * currentPaginationState.size + 1}-${\n currentPaginationState.page * currentPaginationState.size + currentPaginationState.size\n } Items`\n : `Showing 1 to ${totalItems} Items`;\n\n const { platform } = useTheme();\n const onMobile = platform === 'onMobile';\n useEffect(() => {\n setPaginationRowSize(currentPageSize);\n setPaginationType(paginationType);\n }, []);\n\n useEffect(() => {\n if (currentPage && currentPaginationState?.page !== currentPage) {\n setPaginationPage(currentPage);\n }\n }, [currentPage, currentPaginationState?.page, setPaginationPage]);\n\n const totalPages = isUndefined(totalItemCount)\n ? Math.ceil(totalItems / currentPageSize)\n : Math.ceil(totalItemCount / currentPageSize);\n\n const handlePageChange = useCallback(\n (page: number): void => {\n let pageToJumpTo = page;\n if (pageToJumpTo < 0) {\n pageToJumpTo = 0;\n } else if (pageToJumpTo > totalPages - 1) {\n pageToJumpTo = totalPages - 1;\n }\n\n onPageChange?.({ page: pageToJumpTo });\n\n if (!isUndefined(controlledCurrentPage)) {\n pageToJumpTo = controlledCurrentPage;\n }\n setPaginationPage(pageToJumpTo);\n setCurrentPage(pageToJumpTo);\n },\n [controlledCurrentPage, onPageChange, setPaginationPage, totalPages],\n );\n\n useEffect(() => {\n if (!isUndefined(controlledCurrentPage) && controlledCurrentPage !== currentPage) {\n handlePageChange(controlledCurrentPage);\n }\n }, [controlledCurrentPage, currentPage, handlePageChange, onPageChange]);\n\n if (__DEV__) {\n if (paginationType === 'server' && (isUndefined(totalItemCount) || isUndefined(onPageChange))) {\n throwBladeError({\n message:\n '`onPageChange` and `totalItemCount` props are required when paginationType is server.',\n moduleName: 'TablePagination',\n });\n }\n }\n\n const handlePageSizeChange = (pageSize: number): void => {\n onPageSizeChange?.({ pageSize });\n setPaginationRowSize(pageSize);\n setCurrentPageSize(pageSize);\n };\n\n const shouldDisableNextPage = (): boolean => {\n return currentPage >= totalPages - 1;\n };\n const paginationButtons = getPaginationButtons({\n currentSelection: currentPage + 1,\n totalPages,\n });\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n padding={tablePagination.padding}\n backgroundColor={tablePagination.backgroundColor}\n >\n {showLabel && !onMobile && (\n <BaseBox display=\"flex\" justifyContent=\"center\" alignItems=\"center\">\n <Text size=\"medium\" weight=\"semibold\">\n {label ?? defaultLabel}\n </Text>\n </BaseBox>\n )}\n <BaseBox\n display=\"flex\"\n flex={1}\n gap=\"spacing.2\"\n justifyContent=\"flex-end\"\n alignItems=\"center\"\n >\n {showPageSizePicker && !onMobile && (\n <BaseBox display=\"flex\" flexDirection=\"row\" alignItems=\"center\">\n <Dropdown selectionType=\"single\">\n <SelectInput\n accessibilityLabel=\"Select pages per row\"\n name=\"page-size\"\n label=\"\"\n labelPosition=\"inside-input\"\n placeholder=\"\"\n onChange={({ values }) => {\n handlePageSizeChange(Number(values[0]));\n }}\n defaultValue={currentPageSize.toString()}\n />\n <DropdownOverlay>\n <ActionList>\n {pageSizeOptions.map((item, index) => (\n <ActionListItem key={index} title={item.toString()} value={item.toString()} />\n ))}\n </ActionList>\n </DropdownOverlay>\n </Dropdown>\n <BaseBox aria-hidden paddingLeft=\"spacing.3\" paddingRight=\"spacing.3\">\n <Text>rows / page</Text>\n </BaseBox>\n </BaseBox>\n )}\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n gap=\"spacing.2\"\n flex={onMobile ? 1 : undefined}\n alignItems=\"center\"\n >\n <Button\n icon={ChevronLeftIcon}\n accessibilityLabel=\"Previous Page\"\n variant=\"tertiary\"\n onClick={() => {\n handlePageChange(currentPage - 1);\n }}\n isDisabled={currentPage <= 0}\n />\n {onMobile && (\n <BaseBox flex={1} alignItems=\"center\" justifyContent=\"center\">\n <Text textAlign=\"center\">{`Showing ${currentPage + 1} of ${totalPages} pages`}</Text>\n </BaseBox>\n )}\n {totalPages > 1 && showPageNumberSelector && !onMobile && (\n <BaseBox gap=\"spacing.1\" display=\"flex\" flexDirection=\"row\">\n <PageSelectionButton\n onClick={() => handlePageChange(paginationButtons.firstItem - 1)}\n isSelected={currentPage === paginationButtons.firstItem - 1}\n >\n <Text\n size=\"medium\"\n color={\n currentPage === paginationButtons.firstItem - 1\n ? tablePagination.pageSelectionButton.textColorSelected\n : tablePagination.pageSelectionButton.textColor\n }\n >\n {paginationButtons.firstItem}\n </Text>\n </PageSelectionButton>\n {paginationButtons.showStartEllipsis && (\n <PageSelectionButton\n onClick={() => handlePageChange(currentPage - 5)}\n onMouseOver={() => setCurrentEllipseHover('start')}\n onMouseLeave={() => setCurrentEllipseHover(undefined)}\n onFocus={() => setCurrentEllipseHover('start')}\n onBlur={() => setCurrentEllipseHover(undefined)}\n {...makeAccessible({ label: 'Go back 5 pages' })}\n >\n {currentEllipseHover === 'start' ? (\n <ChevronsLeftIcon size=\"medium\" />\n ) : (\n <MoreHorizontalIcon size=\"medium\" />\n )}\n </PageSelectionButton>\n )}\n {paginationButtons.middleItems.map((item) => (\n <PageSelectionButton\n key={item - 1}\n onClick={() => handlePageChange(item - 1)}\n isSelected={currentPage === item - 1}\n {...makeAccessible({ label: `Page ${item}` })}\n >\n <Text\n size=\"medium\"\n color={\n currentPage === item - 1\n ? tablePagination.pageSelectionButton.textColorSelected\n : tablePagination.pageSelectionButton.textColor\n }\n >\n {item}\n </Text>\n </PageSelectionButton>\n ))}\n {paginationButtons.showEndEllipsis && (\n <PageSelectionButton\n onClick={() => handlePageChange(currentPage + 5)}\n onMouseOver={() => setCurrentEllipseHover('end')}\n onMouseLeave={() => setCurrentEllipseHover(undefined)}\n onFocus={() => setCurrentEllipseHover('end')}\n onBlur={() => setCurrentEllipseHover(undefined)}\n {...makeAccessible({ label: 'Go forward 5 pages' })}\n >\n {currentEllipseHover === 'end' ? (\n <ChevronsRightIcon size=\"medium\" />\n ) : (\n <MoreHorizontalIcon size=\"medium\" />\n )}\n </PageSelectionButton>\n )}\n <PageSelectionButton\n onClick={() => handlePageChange(paginationButtons.lastItem - 1)}\n isSelected={currentPage === paginationButtons.lastItem - 1}\n >\n <Text\n size=\"medium\"\n color={\n currentPage === paginationButtons.lastItem - 1\n ? tablePagination.pageSelectionButton.textColorSelected\n : tablePagination.pageSelectionButton.textColor\n }\n >\n {paginationButtons.lastItem}\n </Text>\n </PageSelectionButton>\n </BaseBox>\n )}\n <Button\n variant=\"tertiary\"\n icon={ChevronRightIcon}\n accessibilityLabel=\"Next Page\"\n onClick={() => {\n handlePageChange(currentPage + 1);\n }}\n isDisabled={shouldDisableNextPage()}\n />\n </BaseBox>\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst TablePagination = assignWithoutSideEffects(_TablePagination, {\n componentId: ComponentIds.TablePagination,\n});\n\nexport { TablePagination };\n"],"names":["pageSizeOptions","PageSelectionButton","styled","button","withConfig","displayName","componentId","_ref","theme","isSelected","backgroundColor","getIn","colors","tablePagination","pageSelectionButton","backgroundColorSelected","border","cursor","height","makeSize","width","display","alignItems","justifyContent","borderRadius","radius","backgroundColorSelectedHover","backgroundColorHover","backgroundColorSelectedActive","backgroundColorActive","outline","getFocusRingStyles","getPaginationButtons","_ref2","currentSelection","totalPages","halfRange","minMiddleItems","middleItems","Array","from","length","_","index","showStartEllipsis","showEndEllipsis","firstItem","lastItem","start","Math","max","end","min","paginationButtons","i","push","includes","shift","pop","unshift","_TablePagination","_ref3","_currentPaginationSta","controlledCurrentPage","currentPage","onPageChange","onPageSizeChange","_ref3$defaultPageSize","defaultPageSize","_ref3$showPageSizePic","showPageSizePicker","_ref3$showPageNumberS","showPageNumberSelector","showLabel","label","totalItemCount","_ref3$paginationType","paginationType","_useTableContext","useTableContext","setPaginationPage","currentPaginationState","totalItems","setPaginationRowSize","setPaginationType","_React$useState","React","useState","_React$useState2","_slicedToArray","currentPageSize","setCurrentPageSize","_React$useState3","isUndefined","page","_React$useState4","setCurrentPage","_React$useState5","undefined","_React$useState6","currentEllipseHover","setCurrentEllipseHover","defaultLabel","concat","size","_useTheme","useTheme","platform","onMobile","useEffect","ceil","handlePageChange","useCallback","pageToJumpTo","throwBladeError","message","moduleName","handlePageSizeChange","pageSize","shouldDisableNextPage","_jsxs","BaseBox","flexDirection","padding","children","_jsx","Text","weight","flex","gap","Dropdown","selectionType","SelectInput","accessibilityLabel","name","labelPosition","placeholder","onChange","_ref4","values","Number","defaultValue","toString","DropdownOverlay","ActionList","map","item","ActionListItem","title","value","paddingLeft","paddingRight","Button","icon","ChevronLeftIcon","variant","onClick","isDisabled","textAlign","color","textColorSelected","textColor","_objectSpread","onMouseOver","onMouseLeave","onFocus","onBlur","makeAccessible","ChevronsLeftIcon","MoreHorizontalIcon","ChevronsRightIcon","ChevronRightIcon","TablePagination","assignWithoutSideEffects","ComponentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,IAAMA,eAA6E,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;AAElG,IAAMC,mBAAmB,gBAAGC,MAAM,CAACC,MAAM,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,yCAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAA,CAAA,CAA2B,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,UAAU,GAAAF,IAAA,CAAVE,UAAU,CAAA;EAAA,OAAQ;AAC9FC,IAAAA,eAAe,EAAED,UAAU,GACvBE,KAAK,CAACH,KAAK,CAACI,MAAM,EAAEC,eAAe,CAACC,mBAAmB,CAACC,uBAAuB,CAAC,GAChF,aAAa;AACjBC,IAAAA,MAAM,EAAE,MAAM;AACdC,I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cAAAA,KAAK,EACH/F,WAAW,KAAKX,iBAAiB,CAACN,QAAQ,GAAG,CAAC,GAC1ClC,eAAe,CAACC,mBAAmB,CAACkJ,iBAAiB,GACrDnJ,eAAe,CAACC,mBAAmB,CAACmJ,SACzC;cAAArC,QAAA,EAEAvE,iBAAiB,CAACN,QAAAA;aACf,CAAA;AAAC,WACY,CAAC,CAAA;AAAA,SACf,CACV,eACD8E,GAAA,CAAC2B,MAAM,EAAA;AACLG,UAAAA,OAAO,EAAC,UAAU;AAClBF,UAAAA,IAAI,EAAEkB,gBAAiB;AACvBtC,UAAAA,kBAAkB,EAAC,WAAW;UAC9BuB,OAAO,EAAE,SAAAA,OAAAA,GAAM;AACb7C,YAAAA,gBAAgB,CAAC/C,WAAW,GAAG,CAAC,CAAC,CAAA;WACjC;UACF6F,UAAU,EAAEtC,qBAAqB,EAAC;AAAE,SACrC,CAAC,CAAA;AAAA,OACK,CAAC,CAAA;AAAA,KACH,CAAC,CAAA;AAAA,GACH,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMqD,eAAe,gBAAGC,wBAAwB,CAACjH,gBAAgB,EAAE;EACjEtD,WAAW,EAAEwK,YAAY,CAACF,eAAAA;AAC5B,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"TablePagination.web.js","sources":["../../../../../../src/components/Table/TablePagination.web.tsx"],"sourcesContent":["import React, { useCallback, useEffect } from 'react';\nimport styled from 'styled-components';\nimport { useTableContext } from './TableContext';\nimport { ComponentIds } from './componentIds';\nimport { tablePagination } from './tokens';\nimport type { TablePaginationCommonProps, TablePaginationProps } from './types';\nimport isUndefined from '~utils/lodashButBetter/isUndefined';\nimport getIn from '~utils/lodashButBetter/get';\nimport BaseBox from '~components/Box/BaseBox';\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n ChevronsLeftIcon,\n ChevronsRightIcon,\n MoreHorizontalIcon,\n} from '~components/Icons';\nimport { Dropdown, DropdownOverlay } from '~components/Dropdown';\nimport { SelectInput } from '~components/Input/DropdownInputTriggers';\nimport { ActionList, ActionListItem } from '~components/ActionList';\nimport { Text } from '~components/Typography';\nimport { makeSize } from '~utils';\nimport { Button } from '~components/Button';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { useTheme } from '~components/BladeProvider';\nimport { throwBladeError } from '~utils/logger';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\n\nconst pageSizeOptions: NonNullable<TablePaginationCommonProps['defaultPageSize']>[] = [10, 25, 50];\n\nconst PageSelectionButton = styled.button<{ isSelected?: boolean }>(({ theme, isSelected }) => ({\n backgroundColor: isSelected\n ? getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorSelected)\n : 'transparent',\n border: 'none',\n cursor: 'pointer',\n height: makeSize(tablePagination.pageSelectionButton.height),\n width: makeSize(tablePagination.pageSelectionButton.width),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: getIn(theme.border.radius, tablePagination.pageSelectionButton.borderRadius),\n '&:hover': {\n backgroundColor: isSelected\n ? getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorSelectedHover)\n : getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorHover),\n },\n '&:focus-visible': {\n backgroundColor: isSelected\n ? getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorSelectedActive)\n : getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorActive),\n outline: 'none',\n '&:focus-visible': getFocusRingStyles({ theme }),\n },\n '&:active': {\n backgroundColor: isSelected\n ? getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorSelectedActive)\n : getIn(theme.colors, tablePagination.pageSelectionButton.backgroundColorActive),\n },\n}));\nconst getPaginationButtons = ({\n currentSelection,\n totalPages,\n}: {\n currentSelection: number;\n totalPages: number;\n}): {\n middleItems: number[];\n showStartEllipsis: boolean;\n showEndEllipsis: boolean;\n firstItem: number;\n lastItem: number;\n} => {\n const halfRange = 2;\n const minMiddleItems = 5;\n\n // return if totalPages is less than minMiddleItems\n if (totalPages <= minMiddleItems) {\n return {\n middleItems: Array.from({ length: totalPages - 2 }, (_, index) => index + 2),\n showStartEllipsis: false,\n showEndEllipsis: false,\n firstItem: 1,\n lastItem: totalPages,\n };\n }\n\n let start = Math.max(1, currentSelection - halfRange);\n let end = Math.min(totalPages, start + 2 * halfRange);\n\n // Ensure at least minMiddleItems items in middleItems\n while (end - start + 1 < minMiddleItems && (start > 1 || end < totalPages)) {\n if (start > 1) {\n start--;\n }\n if (end < totalPages) {\n end++;\n }\n }\n\n let showStartEllipsis = false;\n let showEndEllipsis = false;\n\n const paginationButtons: number[] = [];\n for (let i = start; i <= end; i++) {\n paginationButtons.push(i);\n }\n\n // if paginationButtons contains 1, remove it\n if (paginationButtons.includes(1)) {\n paginationButtons.shift();\n // add an extra item at the end if length of total pages is greater than minMiddleItems+1\n if (totalPages > minMiddleItems + 1) paginationButtons.push(end + 1);\n }\n\n // if paginationButtons contains totalPages, remove it\n if (paginationButtons.includes(totalPages)) {\n paginationButtons.pop();\n // add an extra item at the beginning if length of total pages is greater than minMiddleItems+1\n if (totalPages > minMiddleItems + 1) paginationButtons.unshift(start - 1);\n }\n\n if (paginationButtons[0] > 2) {\n showStartEllipsis = true;\n }\n\n if (paginationButtons[paginationButtons.length - 1] + 1 < totalPages) {\n showEndEllipsis = true;\n }\n\n return {\n middleItems: paginationButtons,\n showStartEllipsis,\n showEndEllipsis,\n firstItem: 1,\n lastItem: totalPages,\n };\n};\n\nconst _TablePagination = ({\n currentPage: controlledCurrentPage,\n onPageChange,\n onPageSizeChange,\n defaultPageSize = tablePagination.defaultPageSize,\n showPageSizePicker = true,\n showPageNumberSelector = false,\n showLabel,\n label,\n totalItemCount,\n paginationType = 'client',\n}: TablePaginationProps): React.ReactElement => {\n const {\n setPaginationPage,\n currentPaginationState,\n totalItems,\n setPaginationRowSize,\n setPaginationType,\n backgroundColor,\n } = useTableContext();\n const [currentPageSize, setCurrentPageSize] = React.useState<number>(defaultPageSize);\n const [currentPage, setCurrentPage] = React.useState<number>(\n !isUndefined(controlledCurrentPage) ? controlledCurrentPage : currentPaginationState?.page ?? 0,\n );\n const [currentEllipseHover, setCurrentEllipseHover] = React.useState<'start' | 'end' | undefined>(\n undefined,\n );\n\n const defaultLabel = currentPaginationState\n ? `Showing ${currentPaginationState.page * currentPaginationState.size + 1}-${\n currentPaginationState.page * currentPaginationState.size + currentPaginationState.size\n } Items`\n : `Showing 1 to ${totalItems} Items`;\n\n const { platform } = useTheme();\n const onMobile = platform === 'onMobile';\n useEffect(() => {\n setPaginationRowSize(currentPageSize);\n setPaginationType(paginationType);\n }, []);\n\n useEffect(() => {\n if (currentPage && currentPaginationState?.page !== currentPage) {\n setPaginationPage(currentPage);\n }\n }, [currentPage, currentPaginationState?.page, setPaginationPage]);\n\n const totalPages = isUndefined(totalItemCount)\n ? Math.ceil(totalItems / currentPageSize)\n : Math.ceil(totalItemCount / currentPageSize);\n\n const handlePageChange = useCallback(\n (page: number): void => {\n let pageToJumpTo = page;\n if (pageToJumpTo < 0) {\n pageToJumpTo = 0;\n } else if (pageToJumpTo > totalPages - 1) {\n pageToJumpTo = totalPages - 1;\n }\n\n onPageChange?.({ page: pageToJumpTo });\n\n if (!isUndefined(controlledCurrentPage)) {\n pageToJumpTo = controlledCurrentPage;\n }\n setPaginationPage(pageToJumpTo);\n setCurrentPage(pageToJumpTo);\n },\n [controlledCurrentPage, onPageChange, setPaginationPage, totalPages],\n );\n\n useEffect(() => {\n if (!isUndefined(controlledCurrentPage) && controlledCurrentPage !== currentPage) {\n handlePageChange(controlledCurrentPage);\n }\n }, [controlledCurrentPage, currentPage, handlePageChange, onPageChange]);\n\n if (__DEV__) {\n if (paginationType === 'server' && (isUndefined(totalItemCount) || isUndefined(onPageChange))) {\n throwBladeError({\n message:\n '`onPageChange` and `totalItemCount` props are required when paginationType is server.',\n moduleName: 'TablePagination',\n });\n }\n }\n\n const handlePageSizeChange = (pageSize: number): void => {\n onPageSizeChange?.({ pageSize });\n setPaginationRowSize(pageSize);\n setCurrentPageSize(pageSize);\n };\n\n const shouldDisableNextPage = (): boolean => {\n return currentPage >= totalPages - 1;\n };\n const paginationButtons = getPaginationButtons({\n currentSelection: currentPage + 1,\n totalPages,\n });\n\n return (\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n padding={tablePagination.padding}\n backgroundColor={backgroundColor}\n >\n {showLabel && !onMobile && (\n <BaseBox display=\"flex\" justifyContent=\"center\" alignItems=\"center\">\n <Text size=\"medium\" weight=\"semibold\">\n {label ?? defaultLabel}\n </Text>\n </BaseBox>\n )}\n <BaseBox\n display=\"flex\"\n flex={1}\n gap=\"spacing.2\"\n justifyContent=\"flex-end\"\n alignItems=\"center\"\n >\n {showPageSizePicker && !onMobile && (\n <BaseBox display=\"flex\" flexDirection=\"row\" alignItems=\"center\">\n <Dropdown selectionType=\"single\">\n <SelectInput\n accessibilityLabel=\"Select pages per row\"\n name=\"page-size\"\n label=\"\"\n labelPosition=\"inside-input\"\n placeholder=\"\"\n onChange={({ values }) => {\n handlePageSizeChange(Number(values[0]));\n }}\n defaultValue={currentPageSize.toString()}\n />\n <DropdownOverlay>\n <ActionList>\n {pageSizeOptions.map((item, index) => (\n <ActionListItem key={index} title={item.toString()} value={item.toString()} />\n ))}\n </ActionList>\n </DropdownOverlay>\n </Dropdown>\n <BaseBox aria-hidden paddingLeft=\"spacing.3\" paddingRight=\"spacing.3\">\n <Text>rows / page</Text>\n </BaseBox>\n </BaseBox>\n )}\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n gap=\"spacing.2\"\n flex={onMobile ? 1 : undefined}\n alignItems=\"center\"\n >\n <Button\n icon={ChevronLeftIcon}\n accessibilityLabel=\"Previous Page\"\n variant=\"tertiary\"\n onClick={() => {\n handlePageChange(currentPage - 1);\n }}\n isDisabled={currentPage <= 0}\n />\n {onMobile && (\n <BaseBox flex={1} alignItems=\"center\" justifyContent=\"center\">\n <Text textAlign=\"center\">{`Showing ${currentPage + 1} of ${totalPages} pages`}</Text>\n </BaseBox>\n )}\n {totalPages > 1 && showPageNumberSelector && !onMobile && (\n <BaseBox gap=\"spacing.1\" display=\"flex\" flexDirection=\"row\">\n <PageSelectionButton\n onClick={() => handlePageChange(paginationButtons.firstItem - 1)}\n isSelected={currentPage === paginationButtons.firstItem - 1}\n >\n <Text\n size=\"medium\"\n color={\n currentPage === paginationButtons.firstItem - 1\n ? tablePagination.pageSelectionButton.textColorSelected\n : tablePagination.pageSelectionButton.textColor\n }\n >\n {paginationButtons.firstItem}\n </Text>\n </PageSelectionButton>\n {paginationButtons.showStartEllipsis && (\n <PageSelectionButton\n onClick={() => handlePageChange(currentPage - 5)}\n onMouseOver={() => setCurrentEllipseHover('start')}\n onMouseLeave={() => setCurrentEllipseHover(undefined)}\n onFocus={() => setCurrentEllipseHover('start')}\n onBlur={() => setCurrentEllipseHover(undefined)}\n {...makeAccessible({ label: 'Go back 5 pages' })}\n >\n {currentEllipseHover === 'start' ? (\n <ChevronsLeftIcon size=\"medium\" />\n ) : (\n <MoreHorizontalIcon size=\"medium\" />\n )}\n </PageSelectionButton>\n )}\n {paginationButtons.middleItems.map((item) => (\n <PageSelectionButton\n key={item - 1}\n onClick={() => handlePageChange(item - 1)}\n isSelected={currentPage === item - 1}\n {...makeAccessible({ label: `Page ${item}` })}\n >\n <Text\n size=\"medium\"\n color={\n currentPage === item - 1\n ? tablePagination.pageSelectionButton.textColorSelected\n : tablePagination.pageSelectionButton.textColor\n }\n >\n {item}\n </Text>\n </PageSelectionButton>\n ))}\n {paginationButtons.showEndEllipsis && (\n <PageSelectionButton\n onClick={() => handlePageChange(currentPage + 5)}\n onMouseOver={() => setCurrentEllipseHover('end')}\n onMouseLeave={() => setCurrentEllipseHover(undefined)}\n onFocus={() => setCurrentEllipseHover('end')}\n onBlur={() => setCurrentEllipseHover(undefined)}\n {...makeAccessible({ label: 'Go forward 5 pages' })}\n >\n {currentEllipseHover === 'end' ? (\n <ChevronsRightIcon size=\"medium\" />\n ) : (\n <MoreHorizontalIcon size=\"medium\" />\n )}\n </PageSelectionButton>\n )}\n <PageSelectionButton\n onClick={() => handlePageChange(paginationButtons.lastItem - 1)}\n isSelected={currentPage === paginationButtons.lastItem - 1}\n >\n <Text\n size=\"medium\"\n color={\n currentPage === paginationButtons.lastItem - 1\n ? tablePagination.pageSelectionButton.textColorSelected\n : tablePagination.pageSelectionButton.textColor\n }\n >\n {paginationButtons.lastItem}\n </Text>\n </PageSelectionButton>\n </BaseBox>\n )}\n <Button\n variant=\"tertiary\"\n icon={ChevronRightIcon}\n accessibilityLabel=\"Next Page\"\n onClick={() => {\n handlePageChange(currentPage + 1);\n }}\n isDisabled={shouldDisableNextPage()}\n />\n </BaseBox>\n </BaseBox>\n </BaseBox>\n );\n};\n\nconst TablePagination = assignWithoutSideEffects(_TablePagination, {\n componentId: ComponentIds.TablePagination,\n});\n\nexport { TablePagination };\n"],"names":["pageSizeOptions","PageSelectionButton","styled","button","withConfig","displayName","componentId","_ref","theme","isSelected","backgroundColor","getIn","colors","tablePagination","pageSelectionButton","backgroundColorSelected","border","cursor","height","makeSize","width","display","alignItems","justifyContent","borderRadius","radius","backgroundColorSelectedHover","backgroundColorHover","backgroundColorSelectedActive","backgroundColorActive","outline","getFocusRingStyles","getPaginationButtons","_ref2","currentSelection","totalPages","halfRange","minMiddleItems","middleItems","Array","from","length","_","index","showStartEllipsis","showEndEllipsis","firstItem","lastItem","start","Math","max","end","min","paginationButtons","i","push","includes","shift","pop","unshift","_TablePagination","_ref3","_currentPaginationSta","controlledCurrentPage","currentPage","onPageChange","onPageSizeChange","_ref3$defaultPageSize","defaultPageSize","_ref3$showPageSizePic","showPageSizePicker","_ref3$showPageNumberS","showPageNumberSelector","showLabel","label","totalItemCount","_ref3$paginationType","paginationType","_useTableContext","useTableContext","setPaginationPage","currentPaginationState","totalItems","setPaginationRowSize","setPaginationType","_React$useState","React","useState","_React$useState2","_slicedToArray","currentPageSize","setCurrentPageSize","_React$useState3","isUndefined","page","_React$useState4","setCurrentPage","_React$useState5","undefined","_React$useState6","currentEllipseHover","setCurrentEllipseHover","defaultLabel","concat","size","_useTheme","useTheme","platform","onMobile","useEffect","ceil","handlePageChange","useCallback","pageToJumpTo","throwBladeError","message","moduleName","handlePageSizeChange","pageSize","shouldDisableNextPage","_jsxs","BaseBox","flexDirection","padding","children","_jsx","Text","weight","flex","gap","Dropdown","selectionType","SelectInput","accessibilityLabel","name","labelPosition","placeholder","onChange","_ref4","values","Number","defaultValue","toString","DropdownOverlay","ActionList","map","item","ActionListItem","title","value","paddingLeft","paddingRight","Button","icon","ChevronLeftIcon","variant","onClick","isDisabled","textAlign","color","textColorSelected","textColor","_objectSpread","onMouseOver","onMouseLeave","onFocus","onBlur","makeAccessible","ChevronsLeftIcon","MoreHorizontalIcon","ChevronsRightIcon","ChevronRightIcon","TablePagination","assignWithoutSideEffects","ComponentIds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,IAAMA,eAA6E,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;AAElG,IAAMC,mBAAmB,gBAAGC,MAAM,CAACC,MAAM,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,yCAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAA,CAAA,CAA2B,UAAAC,IAAA,EAAA;AAAA,EAAA,IAAGC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,UAAU,GAAAF,IAAA,CAAVE,UAAU,CAAA;EAAA,OAAQ;AAC9FC,IAAAA,eAAe,EAAED,UAAU,GACvBE,KAAK,CAACH,KAAK,CAACI,MAAM,EAAEC,eAAe,CAACC,mBAAmB,CAACC,uBAAuB,CAAC,GAChF,aAAa;AACjBC,IAAAA,MAAM,EAAE,MAAM;AACdC,IAAAA,MAAM,EAAE,SAAS;IACjBC,MAAM,EAAEC,QAAQ,CAACN,eAAe,CAACC,mBAAm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BAAiB,CAACN,QAAQ,GAAG,CAAC,GAC1ClC,eAAe,CAACC,mBAAmB,CAACkJ,iBAAiB,GACrDnJ,eAAe,CAACC,mBAAmB,CAACmJ,SACzC;cAAArC,QAAA,EAEAvE,iBAAiB,CAACN,QAAAA;aACf,CAAA;AAAC,WACY,CAAC,CAAA;AAAA,SACf,CACV,eACD8E,GAAA,CAAC2B,MAAM,EAAA;AACLG,UAAAA,OAAO,EAAC,UAAU;AAClBF,UAAAA,IAAI,EAAEkB,gBAAiB;AACvBtC,UAAAA,kBAAkB,EAAC,WAAW;UAC9BuB,OAAO,EAAE,SAAAA,OAAAA,GAAM;AACb7C,YAAAA,gBAAgB,CAAC/C,WAAW,GAAG,CAAC,CAAC,CAAA;WACjC;UACF6F,UAAU,EAAEtC,qBAAqB,EAAC;AAAE,SACrC,CAAC,CAAA;AAAA,OACK,CAAC,CAAA;AAAA,KACH,CAAC,CAAA;AAAA,GACH,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMqD,eAAe,gBAAGC,wBAAwB,CAACjH,gBAAgB,EAAE;EACjEtD,WAAW,EAAEwK,YAAY,CAACF,eAAAA;AAC5B,CAAC;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { Table } from './Table.web.js';
|
|
2
2
|
export { TableHeader, TableHeaderCell, TableHeaderRow } from './TableHeader.web.js';
|
|
3
|
-
export { TableBody, TableCell,
|
|
3
|
+
export { TableBody, TableCell, TableRow } from './TableBody.web.js';
|
|
4
4
|
export { TableFooter, TableFooterCell, TableFooterRow } from './TableFooter.web.js';
|
|
5
5
|
export { TablePagination } from './TablePagination.web.js';
|
|
6
6
|
export { TableToolbar, TableToolbarActions } from './TableToolbar.web.js';
|
|
7
|
-
|
|
7
|
+
export { TableEditableCell, TableEditableDropdownCell } from './TableEditableCell.web.js';
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import '../Icons/index.js';
|
|
1
2
|
import '../../tokens/global/index.js';
|
|
2
3
|
import { size } from '../../tokens/global/size.js';
|
|
4
|
+
import CheckIcon from '../Icons/CheckIcon/CheckIcon.js';
|
|
5
|
+
import AlertCircleIcon from '../Icons/AlertCircleIcon/AlertCircleIcon.js';
|
|
3
6
|
|
|
4
7
|
var firstColumnStickyHeaderFooterZIndex = 2;
|
|
5
8
|
var refreshWrapperZIndex = 3;
|
|
@@ -93,7 +96,6 @@ var tableToolbar = {
|
|
|
93
96
|
backgroundColorMotionDuration: 'duration.xquick'
|
|
94
97
|
};
|
|
95
98
|
var tablePagination = {
|
|
96
|
-
backgroundColor: 'transparent',
|
|
97
99
|
padding: 'spacing.4',
|
|
98
100
|
pageSelectionButton: {
|
|
99
101
|
backgroundColor: 'transparent',
|
|
@@ -117,6 +119,16 @@ var tableEditableCellRowDensityToInputSizeMap = {
|
|
|
117
119
|
normal: 'large',
|
|
118
120
|
comfortable: 'medium'
|
|
119
121
|
};
|
|
122
|
+
var validationStateToInputTrailingIconMap = {
|
|
123
|
+
none: undefined,
|
|
124
|
+
success: CheckIcon,
|
|
125
|
+
error: AlertCircleIcon
|
|
126
|
+
};
|
|
127
|
+
var rowDensityToIsTableInputCellMapping = {
|
|
128
|
+
comfortable: false,
|
|
129
|
+
normal: true,
|
|
130
|
+
compact: true
|
|
131
|
+
};
|
|
120
132
|
|
|
121
|
-
export { checkboxCellWidth, firstColumnStickyHeaderFooterZIndex, refreshWrapperZIndex, tableBackgroundColor, tableEditableCellRowDensityToInputSizeMap, tableFooter, tableHeader, tablePagination, tableRow, tableToolbar };
|
|
133
|
+
export { checkboxCellWidth, firstColumnStickyHeaderFooterZIndex, refreshWrapperZIndex, rowDensityToIsTableInputCellMapping, tableBackgroundColor, tableEditableCellRowDensityToInputSizeMap, tableFooter, tableHeader, tablePagination, tableRow, tableToolbar, validationStateToInputTrailingIconMap };
|
|
122
134
|
//# sourceMappingURL=tokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sources":["../../../../../../src/components/Table/tokens.ts"],"sourcesContent":["import { size } from '~tokens/global';\n\nconst firstColumnStickyHeaderFooterZIndex = 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
|
|
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 firstColumnStickyHeaderFooterZIndex = 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 firstColumnStickyHeaderFooterZIndex,\n checkboxCellWidth,\n tableEditableCellRowDensityToInputSizeMap,\n validationStateToInputTrailingIconMap,\n rowDensityToIsTableInputCellMapping,\n};\n"],"names":["firstColumnStickyHeaderFooterZIndex","refreshWrapperZIndex","checkboxCellWidth","size","tableBackgroundColor","tableHeader","paddingTop","paddingBottom","paddingLeft","paddingRight","backgroundColor","borderBottomAndTopWidth","borderBottomAndTopColor","tableFooter","tableRow","compact","normal","comfortable","minHeight","nonStripe","backgroundColorHover","backgroundColorFocus","backgroundColorActive","backgroundColorSelected","backgroundColorSelectedHover","backgroundColorSelectedFocus","backgroundColorSelectedActive","nonStripeWrapper","stripe","stripeWrapper","borderBottomWidth","borderColor","backgroundColorMotionEasing","backgroundColorMotionDuration","tableToolbar","tablePagination","padding","pageSelectionButton","borderRadius","focusRingColor","textColor","textColorSelected","height","width","defaultPageSize","tableEditableCellRowDensityToInputSizeMap","validationStateToInputTrailingIconMap","none","undefined","success","CheckIcon","error","AlertCircleIcon","rowDensityToIsTableInputCellMapping"],"mappings":";;;;;;AAGMA,IAAAA,mCAAmC,GAAG,EAAC;AAEvCC,IAAAA,oBAAoB,GAAG,EAAC;AAE9B,IAAMC,iBAAiB,GAAGC,IAAI,CAAC,IAAI,EAAC;AAE9BC,IAAAA,oBAAoB,GAAG,kCAAiC;AAC9D,IAAMC,WAAW,GAAG;AAClBC,EAAAA,UAAU,EAAE,WAAW;AACvBC,EAAAA,aAAa,EAAE,WAAW;AAC1BC,EAAAA,WAAW,EAAE,WAAW;AACxBC,EAAAA,YAAY,EAAE,WAAW;AACzBC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,uBAAuB,EAAE,MAAM;AAC/BC,EAAAA,uBAAuB,EAAE,2BAAA;AAC3B,EAAU;AAEV,IAAMC,WAAW,GAAG;AAClBP,EAAAA,UAAU,EAAE,WAAW;AACvBC,EAAAA,aAAa,EAAE,WAAW;AAC1BC,EAAAA,WAAW,EAAE,WAAW;AACxBC,EAAAA,YAAY,EAAE,WAAW;AACzBE,EAAAA,uBAAuB,EAAE,MAAM;AAC/BC,EAA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WAAW;AACpBE,IAAAA,YAAY,EAAE,OAAO;AACrBC,IAAAA,cAAc,EAAE,8BAA8B;AAC9CC,IAAAA,SAAS,EAAE,0BAA0B;AACrCC,IAAAA,iBAAiB,EAAE,6BAA6B;AAChDC,IAAAA,MAAM,EAAEvC,IAAI,CAAC,IAAI,CAAC;IAClBwC,KAAK,EAAExC,IAAI,CAAC,IAAI,CAAA;GACjB;AACDyC,EAAAA,eAAe,EAAE,EAAA;AACnB,EAAU;AAEV,IAAMC,yCAAyC,GAAG;AAChD9B,EAAAA,OAAO,EAAE,QAAQ;AACjBC,EAAAA,MAAM,EAAE,OAAO;AACfC,EAAAA,WAAW,EAAE,QAAA;AACf,EAAU;AAEV,IAAM6B,qCAAqC,GAAG;AAC5CC,EAAAA,IAAI,EAAEC,SAAS;AACfC,EAAAA,OAAO,EAAEC,SAAS;AAClBC,EAAAA,KAAK,EAAEC,eAAAA;AACT,EAAC;AAED,IAAMC,mCAAmC,GAAG;AAC1CpC,EAAAA,WAAW,EAAE,KAAK;AAClBD,EAAAA,MAAM,EAAE,IAAI;AACZD,EAAAA,OAAO,EAAE,IAAA;AACX;;;;"}
|
|
@@ -498,10 +498,11 @@ export { StepItemIcon, StepItemIndicator } from './StepGroup/StepItemMarker.js';
|
|
|
498
498
|
export { Switch } from './Switch/Switch.js';
|
|
499
499
|
export { Table } from './Table/Table.web.js';
|
|
500
500
|
export { TableHeader, TableHeaderCell, TableHeaderRow } from './Table/TableHeader.web.js';
|
|
501
|
-
export { TableBody, TableCell,
|
|
501
|
+
export { TableBody, TableCell, TableRow } from './Table/TableBody.web.js';
|
|
502
502
|
export { TableFooter, TableFooterCell, TableFooterRow } from './Table/TableFooter.web.js';
|
|
503
503
|
export { TablePagination } from './Table/TablePagination.web.js';
|
|
504
504
|
export { TableToolbar, TableToolbarActions } from './Table/TableToolbar.web.js';
|
|
505
|
+
export { TableEditableCell, TableEditableDropdownCell } from './Table/TableEditableCell.web.js';
|
|
505
506
|
export { Tabs } from './Tabs/Tabs.web.js';
|
|
506
507
|
export { TabItem } from './Tabs/TabItem.web.js';
|
|
507
508
|
export { TabList } from './Tabs/TabList.web.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -257,7 +257,7 @@ var getOnDarkOverrides = function getOnDarkOverrides(brandColors) {
|
|
|
257
257
|
* Creates a Blade Theme based on the custom brand color
|
|
258
258
|
* @returns The Theme Tokens with the custom brand colors
|
|
259
259
|
* @example
|
|
260
|
-
* const theme = createTheme({ brandColor: '#19BEA2'})
|
|
260
|
+
* const { theme, brandColors } = createTheme({ brandColor: '#19BEA2'})
|
|
261
261
|
**/
|
|
262
262
|
var createTheme = function createTheme(_ref) {
|
|
263
263
|
var brandColor = _ref.brandColor;
|
|
@@ -277,7 +277,10 @@ var createTheme = function createTheme(_ref) {
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
});
|
|
280
|
-
return
|
|
280
|
+
return {
|
|
281
|
+
theme: brandedThemeTokens,
|
|
282
|
+
brandColors: chromaticBrandColors
|
|
283
|
+
};
|
|
281
284
|
};
|
|
282
285
|
|
|
283
286
|
export { createTheme };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTheme.js","sources":["../../../../../../src/tokens/theme/createTheme.ts"],"sourcesContent":["import tinycolor from 'tinycolor2';\nimport type { WCAG2Options, ColorInput } from 'tinycolor2';\nimport type { ThemeTokens } from './theme';\nimport overrideTheme from './overrideTheme';\nimport bladeTheme from './bladeTheme';\nimport { colors as globalColors, opacity } from '~tokens/global';\nimport type { ColorChromaticScale } from '~tokens/global/colors';\nimport { throwBladeError } from '~utils/logger';\nimport type { DeepPartial } from '~utils/isPartialMatchObjectKeys';\n\n// WCAG2ContrastOptions are the options used to determine if a color is readable\nconst WCAG2ContrastOptions: WCAG2Options = {\n level: 'AAA',\n size: 'large',\n};\n\n/**\n * getColorWithOpacity\n * @param color - The color to add opacity to\n * @param opacity - The opacity to add to the color\n * @returns The color with the opacity added\n * @example\n * getColorWithOpacity('#fff', 0.5) // returns 'hsla(0, 0%, 100%, 0.5)'\n *\n **/\nconst getColorWithOpacity = (color: ColorInput, opacity: number): string => {\n return tinycolor(color).setAlpha(opacity).toHslString();\n};\n\n/**\n *\n * @description\n * Generates a chromatic color palette based on the base color passed in.\n * The base color is used to generate a palette of 11 colors, 5 shades lighter and 5 shades darker than the base color.\n * @param baseColorInput - The base color to generate the chromatic color palette from in hex, rgb, or hsl format\n * @returns Array of chromatic color palette\n */\nconst generateChromaticBrandColors = (baseColorInput: ColorInput): ColorChromaticScale => {\n const baseColor = tinycolor(baseColorInput);\n const baseColorHslString = baseColor.toHslString();\n if (__DEV__) {\n if (!baseColor.isValid()) {\n throwBladeError({\n message: 'Invalid brandColor passed',\n moduleName: 'createTheme',\n });\n }\n }\n\n const palette = [baseColorHslString]; // Include the original color\n const brightness = tinycolor(baseColor).getBrightness();\n // Determine how much to lighten or darken the colors depending on the brightness of the base color\n const lightnessFactor = brightness > 150 ? 3 : 6;\n const darknessFactor = brightness < 50 ? 3 : 5;\n\n let currentColor = baseColor;\n\n // Generate shades lighter\n for (let lightShadeIndex = 0; lightShadeIndex < 6; lightShadeIndex++) {\n currentColor = currentColor.brighten(lightnessFactor);\n palette.push(currentColor.toHslString());\n }\n\n currentColor = tinycolor(baseColorHslString); // Reset to the base color\n\n // Generate shades darker\n for (let darkShadeIndex = 0; darkShadeIndex < 4; darkShadeIndex++) {\n currentColor = currentColor.darken(darknessFactor);\n palette.unshift(currentColor.toHslString()); // Add shades at the beginning of the palette\n }\n\n const colorPalette = palette.reverse();\n const brandPrimaryColor = colorPalette[6];\n\n const brandColors: ColorChromaticScale = {\n '50': colorPalette[0],\n '100': colorPalette[1],\n '200': colorPalette[2],\n '300': colorPalette[3],\n '400': colorPalette[4],\n '500': colorPalette[5],\n '600': brandPrimaryColor,\n '700': colorPalette[7],\n '800': colorPalette[8],\n '900': colorPalette[9],\n '1000': colorPalette[10],\n a50: getColorWithOpacity(brandPrimaryColor, opacity[100]),\n a150: getColorWithOpacity(brandPrimaryColor, opacity[100]),\n a100: getColorWithOpacity(brandPrimaryColor, opacity[200]),\n a200: getColorWithOpacity(brandPrimaryColor, opacity[300]),\n };\n\n return brandColors;\n};\n\n/**\n *\n * @param brandColors - The brand colors to use to override the light theme\n * @description Returns overrides for the light theme with the brand colors passed in\n * @returns Overrides for the light theme with the custom brand colors\n */\nconst getOnLightOverrides = (\n brandColors: ColorChromaticScale,\n): DeepPartial<ThemeTokens['colors']['onLight']> => {\n // Select the most readable color to use as the foreground color on top of surface color\n // For example: On Secondary Button where the background color is surface color, the text color should be either the brand color or dark color depending on which is more readable on top of that surface color\n const foregroundOnSurface = tinycolor.isReadable(\n globalColors.neutral.blueGrayLight[50],\n brandColors[600],\n WCAG2ContrastOptions,\n )\n ? brandColors[600]\n : globalColors.neutral.blueGrayLight[1100];\n\n const foregroundOnBrand = tinycolor\n .mostReadable(\n brandColors[900],\n [globalColors.neutral.white[500], globalColors.neutral.black[500]],\n WCAG2ContrastOptions,\n )\n .toHslString();\n\n // Overrides for the light theme with the brand colors passed in\n const lightThemeOverrides: DeepPartial<ThemeTokens['colors']['onLight']> = {\n interactive: {\n background: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n fadedHighlighted: brandColors.a150,\n },\n },\n border: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n },\n },\n text: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n icon: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n },\n surface: {\n background: {\n primary: {\n intense: brandColors[600],\n subtle: brandColors[200],\n },\n },\n icon: {\n primary: {\n normal: brandColors[600],\n },\n },\n text: {\n primary: {\n normal: brandColors[600],\n },\n },\n },\n };\n\n return lightThemeOverrides;\n};\n\n/**\n *\n * @param brandColors - The brand colors to use to override the dark theme\n * @description Returns overrides for the dark theme with the brand colors passed in\n * @returns Overrides for the dark theme with the custom brand colors\n */\nconst getOnDarkOverrides = (\n brandColors: ColorChromaticScale,\n): DeepPartial<ThemeTokens['colors']['onDark']> => {\n // Select the most readable color to use as the foreground color on top of surface color\n // For example: On Secondary Button where the background color is surface color, the text color should be either the brand color or dark color depending on which is more readable on top of that surface color\n const foregroundOnSurface = tinycolor.isReadable(\n globalColors.neutral.blueGrayDark[1100],\n brandColors[400],\n WCAG2ContrastOptions,\n )\n ? brandColors[400]\n : globalColors.neutral.blueGrayDark[0];\n\n const foregroundOnBrand = tinycolor\n .mostReadable(\n brandColors[900],\n [globalColors.neutral.white[500], globalColors.neutral.black[500]],\n WCAG2ContrastOptions,\n )\n .toHslString();\n\n // Overrides for the dark theme with the brand colors passed in\n const darkThemeOverrides: DeepPartial<ThemeTokens['colors']['onDark']> = {\n interactive: {\n background: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n fadedHighlighted: brandColors.a150,\n },\n },\n border: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n },\n },\n text: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n icon: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n },\n surface: {\n background: {\n primary: {\n intense: brandColors[600],\n subtle: brandColors[200],\n },\n },\n icon: {\n primary: {\n normal: brandColors[600],\n },\n },\n },\n };\n\n return darkThemeOverrides;\n};\n\n/**\n * @param {Object} themeConfig - The brand color and overrides to apply to the theme\n * @param {string} themeConfig.brandColor - The brand color to use to generate the theme. Can be in hex, rgb, or hsl format.\n * @description\n * Creates a Blade Theme based on the custom brand color\n * @returns The Theme Tokens with the custom brand colors\n * @example\n * const theme = createTheme({ brandColor: '#19BEA2'})\n **/\nexport const createTheme = ({ brandColor }: { brandColor: ColorInput }): ThemeTokens => {\n const chromaticBrandColors = generateChromaticBrandColors(brandColor);\n // Get onLight overrides\n const brandedLightTheme = getOnLightOverrides(chromaticBrandColors);\n // Get onDark overrides\n const brandedDarkTheme = getOnDarkOverrides(chromaticBrandColors);\n // Override the payment theme with the brand colors\n const brandedThemeTokens = overrideTheme({\n baseThemeTokens: bladeTheme,\n overrides: {\n name: `custom-${tinycolor(brandColor).toHex()}`,\n colors: {\n onLight: {\n ...brandedLightTheme,\n },\n onDark: {\n ...brandedDarkTheme,\n },\n },\n },\n });\n\n return brandedThemeTokens;\n};\n"],"names":["WCAG2ContrastOptions","level","size","getColorWithOpacity","color","opacity","tinycolor","setAlpha","toHslString","generateChromaticBrandColors","baseColorInput","baseColor","baseColorHslString","isValid","throwBladeError","message","moduleName","palette","brightness","getBrightness","lightnessFactor","darknessFactor","currentColor","lightShadeIndex","brighten","push","darkShadeIndex","darken","unshift","colorPalette","reverse","brandPrimaryColor","brandColors","a50","a150","a100","a200","getOnLightOverrides","foregroundOnSurface","isReadable","globalColors","neutral","blueGrayLight","foregroundOnBrand","mostReadable","white","black","lightThemeOverrides","interactive","background","primary","highlighted","disabled","faded","fadedHighlighted","border","text","normal","muted","subtle","onPrimary","icon","surface","intense","getOnDarkOverrides","blueGrayDark","darkThemeOverrides","createTheme","_ref","brandColor","chromaticBrandColors","brandedLightTheme","brandedDarkTheme","brandedThemeTokens","overrideTheme","baseThemeTokens","bladeTheme","overrides","name","concat","toHex","colors","onLight","_objectSpread","onDark"],"mappings":";;;;;;;;;;;;AAUA;AACA,IAAMA,oBAAkC,GAAG;AACzCC,EAAAA,KAAK,EAAE,KAAK;AACZC,EAAAA,IAAI,EAAE,OAAA;AACR,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIC,KAAiB,EAAEC,OAAe,EAAa;AAC1E,EAAA,OAAOC,SAAS,CA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C,GAAG,CAAA;AACzB,SAAA;AACF,OAAA;AACF,KAAA;GACD,CAAA;AAED,EAAA,OAAOkC,kBAAkB,CAAA;AAC3B,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACaC,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAAgE;AAAA,EAAA,IAA1DC,UAAU,GAAAD,IAAA,CAAVC,UAAU,CAAA;AACtC,EAAA,IAAMC,oBAAoB,GAAG7D,4BAA4B,CAAC4D,UAAU,CAAC,CAAA;AACrE;AACA,EAAA,IAAME,iBAAiB,GAAGlC,mBAAmB,CAACiC,oBAAoB,CAAC,CAAA;AACnE;AACA,EAAA,IAAME,gBAAgB,GAAGR,kBAAkB,CAACM,oBAAoB,CAAC,CAAA;AACjE;EACA,IAAMG,kBAAkB,GAAGC,aAAa,CAAC;AACvCC,IAAAA,eAAe,EAAEC,UAAU;AAC3BC,IAAAA,SAAS,EAAE;MACTC,IAAI,EAAA,SAAA,CAAAC,MAAA,CAAYzE,SAAS,CAAC+D,UAAU,CAAC,CAACW,KAAK,EAAE,CAAE;AAC/CC,MAAAA,MAAM,EAAE;AACNC,QAAAA,OAAO,EAAAC,aAAA,CACFZ,EAAAA,EAAAA,iBAAiB,CACrB;QACDa,MAAM,EAAAD,aAAA,CAAA,EAAA,EACDX,gBAAgB,CAAA;AAEvB,OAAA;AACF,KAAA;AACF,GAAC,CAAC,CAAA;AAEF,EAAA,OAAOC,kBAAkB,CAAA;AAC3B;;;;"}
|
|
1
|
+
{"version":3,"file":"createTheme.js","sources":["../../../../../../src/tokens/theme/createTheme.ts"],"sourcesContent":["import tinycolor from 'tinycolor2';\nimport type { WCAG2Options, ColorInput } from 'tinycolor2';\nimport type { ThemeTokens } from './theme';\nimport overrideTheme from './overrideTheme';\nimport bladeTheme from './bladeTheme';\nimport { colors as globalColors, opacity } from '~tokens/global';\nimport type { ColorChromaticScale } from '~tokens/global/colors';\nimport { throwBladeError } from '~utils/logger';\nimport type { DeepPartial } from '~utils/isPartialMatchObjectKeys';\n\n// WCAG2ContrastOptions are the options used to determine if a color is readable\nconst WCAG2ContrastOptions: WCAG2Options = {\n level: 'AAA',\n size: 'large',\n};\n\n/**\n * getColorWithOpacity\n * @param color - The color to add opacity to\n * @param opacity - The opacity to add to the color\n * @returns The color with the opacity added\n * @example\n * getColorWithOpacity('#fff', 0.5) // returns 'hsla(0, 0%, 100%, 0.5)'\n *\n **/\nconst getColorWithOpacity = (color: ColorInput, opacity: number): string => {\n return tinycolor(color).setAlpha(opacity).toHslString();\n};\n\n/**\n *\n * @description\n * Generates a chromatic color palette based on the base color passed in.\n * The base color is used to generate a palette of 11 colors, 5 shades lighter and 5 shades darker than the base color.\n * @param baseColorInput - The base color to generate the chromatic color palette from in hex, rgb, or hsl format\n * @returns Array of chromatic color palette\n */\nconst generateChromaticBrandColors = (baseColorInput: ColorInput): ColorChromaticScale => {\n const baseColor = tinycolor(baseColorInput);\n const baseColorHslString = baseColor.toHslString();\n if (__DEV__) {\n if (!baseColor.isValid()) {\n throwBladeError({\n message: 'Invalid brandColor passed',\n moduleName: 'createTheme',\n });\n }\n }\n\n const palette = [baseColorHslString]; // Include the original color\n const brightness = tinycolor(baseColor).getBrightness();\n // Determine how much to lighten or darken the colors depending on the brightness of the base color\n const lightnessFactor = brightness > 150 ? 3 : 6;\n const darknessFactor = brightness < 50 ? 3 : 5;\n\n let currentColor = baseColor;\n\n // Generate shades lighter\n for (let lightShadeIndex = 0; lightShadeIndex < 6; lightShadeIndex++) {\n currentColor = currentColor.brighten(lightnessFactor);\n palette.push(currentColor.toHslString());\n }\n\n currentColor = tinycolor(baseColorHslString); // Reset to the base color\n\n // Generate shades darker\n for (let darkShadeIndex = 0; darkShadeIndex < 4; darkShadeIndex++) {\n currentColor = currentColor.darken(darknessFactor);\n palette.unshift(currentColor.toHslString()); // Add shades at the beginning of the palette\n }\n\n const colorPalette = palette.reverse();\n const brandPrimaryColor = colorPalette[6];\n\n const brandColors: ColorChromaticScale = {\n '50': colorPalette[0],\n '100': colorPalette[1],\n '200': colorPalette[2],\n '300': colorPalette[3],\n '400': colorPalette[4],\n '500': colorPalette[5],\n '600': brandPrimaryColor,\n '700': colorPalette[7],\n '800': colorPalette[8],\n '900': colorPalette[9],\n '1000': colorPalette[10],\n a50: getColorWithOpacity(brandPrimaryColor, opacity[100]),\n a150: getColorWithOpacity(brandPrimaryColor, opacity[100]),\n a100: getColorWithOpacity(brandPrimaryColor, opacity[200]),\n a200: getColorWithOpacity(brandPrimaryColor, opacity[300]),\n };\n\n return brandColors;\n};\n\n/**\n *\n * @param brandColors - The brand colors to use to override the light theme\n * @description Returns overrides for the light theme with the brand colors passed in\n * @returns Overrides for the light theme with the custom brand colors\n */\nconst getOnLightOverrides = (\n brandColors: ColorChromaticScale,\n): DeepPartial<ThemeTokens['colors']['onLight']> => {\n // Select the most readable color to use as the foreground color on top of surface color\n // For example: On Secondary Button where the background color is surface color, the text color should be either the brand color or dark color depending on which is more readable on top of that surface color\n const foregroundOnSurface = tinycolor.isReadable(\n globalColors.neutral.blueGrayLight[50],\n brandColors[600],\n WCAG2ContrastOptions,\n )\n ? brandColors[600]\n : globalColors.neutral.blueGrayLight[1100];\n\n const foregroundOnBrand = tinycolor\n .mostReadable(\n brandColors[900],\n [globalColors.neutral.white[500], globalColors.neutral.black[500]],\n WCAG2ContrastOptions,\n )\n .toHslString();\n\n // Overrides for the light theme with the brand colors passed in\n const lightThemeOverrides: DeepPartial<ThemeTokens['colors']['onLight']> = {\n interactive: {\n background: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n fadedHighlighted: brandColors.a150,\n },\n },\n border: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n },\n },\n text: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n icon: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n },\n surface: {\n background: {\n primary: {\n intense: brandColors[600],\n subtle: brandColors[200],\n },\n },\n icon: {\n primary: {\n normal: brandColors[600],\n },\n },\n text: {\n primary: {\n normal: brandColors[600],\n },\n },\n },\n };\n\n return lightThemeOverrides;\n};\n\n/**\n *\n * @param brandColors - The brand colors to use to override the dark theme\n * @description Returns overrides for the dark theme with the brand colors passed in\n * @returns Overrides for the dark theme with the custom brand colors\n */\nconst getOnDarkOverrides = (\n brandColors: ColorChromaticScale,\n): DeepPartial<ThemeTokens['colors']['onDark']> => {\n // Select the most readable color to use as the foreground color on top of surface color\n // For example: On Secondary Button where the background color is surface color, the text color should be either the brand color or dark color depending on which is more readable on top of that surface color\n const foregroundOnSurface = tinycolor.isReadable(\n globalColors.neutral.blueGrayDark[1100],\n brandColors[400],\n WCAG2ContrastOptions,\n )\n ? brandColors[400]\n : globalColors.neutral.blueGrayDark[0];\n\n const foregroundOnBrand = tinycolor\n .mostReadable(\n brandColors[900],\n [globalColors.neutral.white[500], globalColors.neutral.black[500]],\n WCAG2ContrastOptions,\n )\n .toHslString();\n\n // Overrides for the dark theme with the brand colors passed in\n const darkThemeOverrides: DeepPartial<ThemeTokens['colors']['onDark']> = {\n interactive: {\n background: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n fadedHighlighted: brandColors.a150,\n },\n },\n border: {\n primary: {\n default: brandColors[600],\n highlighted: brandColors[700],\n disabled: brandColors.a100,\n faded: brandColors.a100,\n },\n },\n text: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n icon: {\n primary: {\n normal: foregroundOnSurface,\n disabled: foregroundOnSurface,\n muted: foregroundOnSurface,\n subtle: foregroundOnSurface,\n },\n onPrimary: {\n normal: foregroundOnBrand,\n disabled: foregroundOnBrand,\n muted: foregroundOnBrand,\n subtle: foregroundOnBrand,\n },\n },\n },\n surface: {\n background: {\n primary: {\n intense: brandColors[600],\n subtle: brandColors[200],\n },\n },\n icon: {\n primary: {\n normal: brandColors[600],\n },\n },\n },\n };\n\n return darkThemeOverrides;\n};\n\n/**\n * @param {Object} themeConfig - The brand color and overrides to apply to the theme\n * @param {string} themeConfig.brandColor - The brand color to use to generate the theme. Can be in hex, rgb, or hsl format.\n * @description\n * Creates a Blade Theme based on the custom brand color\n * @returns The Theme Tokens with the custom brand colors\n * @example\n * const { theme, brandColors } = createTheme({ brandColor: '#19BEA2'})\n **/\nexport const createTheme = ({\n brandColor,\n}: {\n brandColor: ColorInput;\n}): { theme: ThemeTokens; brandColors: ColorChromaticScale } => {\n const chromaticBrandColors = generateChromaticBrandColors(brandColor);\n // Get onLight overrides\n const brandedLightTheme = getOnLightOverrides(chromaticBrandColors);\n // Get onDark overrides\n const brandedDarkTheme = getOnDarkOverrides(chromaticBrandColors);\n // Override the payment theme with the brand colors\n const brandedThemeTokens = overrideTheme({\n baseThemeTokens: bladeTheme,\n overrides: {\n name: `custom-${tinycolor(brandColor).toHex()}`,\n colors: {\n onLight: {\n ...brandedLightTheme,\n },\n onDark: {\n ...brandedDarkTheme,\n },\n },\n },\n });\n\n return { theme: brandedThemeTokens, brandColors: chromaticBrandColors };\n};\n"],"names":["WCAG2ContrastOptions","level","size","getColorWithOpacity","color","opacity","tinycolor","setAlpha","toHslString","generateChromaticBrandColors","baseColorInput","baseColor","baseColorHslString","isValid","throwBladeError","message","moduleName","palette","brightness","getBrightness","lightnessFactor","darknessFactor","currentColor","lightShadeIndex","brighten","push","darkShadeIndex","darken","unshift","colorPalette","reverse","brandPrimaryColor","brandColors","a50","a150","a100","a200","getOnLightOverrides","foregroundOnSurface","isReadable","globalColors","neutral","blueGrayLight","foregroundOnBrand","mostReadable","white","black","lightThemeOverrides","interactive","background","primary","highlighted","disabled","faded","fadedHighlighted","border","text","normal","muted","subtle","onPrimary","icon","surface","intense","getOnDarkOverrides","blueGrayDark","darkThemeOverrides","createTheme","_ref","brandColor","chromaticBrandColors","brandedLightTheme","brandedDarkTheme","brandedThemeTokens","overrideTheme","baseThemeTokens","bladeTheme","overrides","name","concat","toHex","colors","onLight","_objectSpread","onDark","theme"],"mappings":";;;;;;;;;;;;AAUA;AACA,IAAMA,oBAAkC,GAAG;AACzCC,EAAAA,KAAK,EAAE,KAAK;AACZC,EAAAA,IAAI,EAAE,OAAA;AACR,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIC,KAAiB,EAAEC,OAAe,EAAa;AAC1E,EAAA,OAAOC,SAAS,CAACF,KAAK,CAAC,CAACG,QAAQ,CAACF,OAAO,CAAC,CAACG,WAAW,EAAE,CAAA;AACzD,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMC,4BAA4B,GAAG,SAA/BA,4BAA4BA,CAAIC,cAA0B,EAA0B;AACxF,EAAA,IAAMC,SAAS,GAAGL,SAAS,CAACI,cAAc,CAAC,CAAA;AAC3C,EAAA,IAAME,kBAAkB,GAAGD,SAAS,CAACH,WAAW,EAAE,CAAA;AAClD,EAAA,IAAI,KAAO,EAAE;AACX,IAAA,IAAI,CAACG,SAAS,CAACE,OAAO,EAAE,EAAE;AACxBC,MAAAA,eAAe,CAAC;AACdC,QAAAA,OAAO,EAA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BAAkB,CAACM,oBAAoB,CAAC,CAAA;AACjE;EACA,IAAMG,kBAAkB,GAAGC,aAAa,CAAC;AACvCC,IAAAA,eAAe,EAAEC,UAAU;AAC3BC,IAAAA,SAAS,EAAE;MACTC,IAAI,EAAA,SAAA,CAAAC,MAAA,CAAYzE,SAAS,CAAC+D,UAAU,CAAC,CAACW,KAAK,EAAE,CAAE;AAC/CC,MAAAA,MAAM,EAAE;AACNC,QAAAA,OAAO,EAAAC,aAAA,CACFZ,EAAAA,EAAAA,iBAAiB,CACrB;QACDa,MAAM,EAAAD,aAAA,CAAA,EAAA,EACDX,gBAAgB,CAAA;AAEvB,OAAA;AACF,KAAA;AACF,GAAC,CAAC,CAAA;EAEF,OAAO;AAAEa,IAAAA,KAAK,EAAEZ,kBAAkB;AAAEzC,IAAAA,WAAW,EAAEsC,oBAAAA;GAAsB,CAAA;AACzE;;;;"}
|
|
@@ -7204,6 +7204,10 @@ type BaseInputCommonProps = FormInputLabelProps & FormInputValidationProps & {
|
|
|
7204
7204
|
* @default true
|
|
7205
7205
|
**/
|
|
7206
7206
|
isTableInputCell?: boolean;
|
|
7207
|
+
/**
|
|
7208
|
+
* Hides the form hints and shows them as tooltip of trailing
|
|
7209
|
+
*/
|
|
7210
|
+
showHintsAsTooltip?: boolean;
|
|
7207
7211
|
} & TestID & Platform.Select<{
|
|
7208
7212
|
native: {
|
|
7209
7213
|
/**
|
|
@@ -8075,6 +8079,12 @@ type DropdownProps = {
|
|
|
8075
8079
|
onOpenChange?: (isOpen: boolean) => void;
|
|
8076
8080
|
selectionType?: 'single' | 'multiple';
|
|
8077
8081
|
children: React__default.ReactNode[];
|
|
8082
|
+
/**
|
|
8083
|
+
* @private
|
|
8084
|
+
*
|
|
8085
|
+
* width prop for outer relative container of Dropdown. Use width prop on DropdownOverlay to change width of menu
|
|
8086
|
+
*/
|
|
8087
|
+
_width?: BoxProps['width'];
|
|
8078
8088
|
} & TestID & StyledPropsBlade;
|
|
8079
8089
|
type DropdownOverlayProps = {
|
|
8080
8090
|
children: React__default.ReactElement[] | React__default.ReactElement;
|
|
@@ -8117,7 +8127,7 @@ type DropdownOverlayProps = {
|
|
|
8117
8127
|
defaultPlacement?: Placement;
|
|
8118
8128
|
} & TestID;
|
|
8119
8129
|
|
|
8120
|
-
declare const Dropdown: ({ children, isOpen: isOpenControlled, onOpenChange, selectionType, testID, ...styledProps }: DropdownProps) => React__default.ReactElement;
|
|
8130
|
+
declare const Dropdown: ({ children, isOpen: isOpenControlled, onOpenChange, selectionType, testID, _width, ...styledProps }: DropdownProps) => React__default.ReactElement;
|
|
8121
8131
|
|
|
8122
8132
|
declare const DropdownOverlay: ({ children, testID, zIndex, width, minWidth, maxWidth, referenceRef, defaultPlacement, }: DropdownOverlayProps) => React__default.ReactElement | null;
|
|
8123
8133
|
|
|
@@ -12536,7 +12546,6 @@ type TableNode<Item> = Item & {
|
|
|
12536
12546
|
type TableData<Item> = {
|
|
12537
12547
|
nodes: TableNode<Item>[];
|
|
12538
12548
|
};
|
|
12539
|
-
type TableBackgroundColors = `surface.background.gray.${DotNotationToken<Theme['colors']['surface']['background']['gray']>}`;
|
|
12540
12549
|
type TableHeaderProps = {
|
|
12541
12550
|
/**
|
|
12542
12551
|
* The children of TableHeader should be TableHeaderRow
|
|
@@ -12767,6 +12776,7 @@ type TableCellProps = {
|
|
|
12767
12776
|
type TableEditableCellProps = Pick<BaseInputProps, 'validationState' | 'placeholder' | 'defaultValue' | 'name' | 'onChange' | 'onFocus' | 'onBlur' | 'value' | 'isDisabled' | 'isRequired' | 'prefix' | 'suffix' | 'maxCharacters' | 'autoFocus' | 'keyboardReturnKeyType' | 'autoCompleteSuggestionType' | 'onSubmit' | 'autoCapitalize' | 'testID' | 'onClick' | 'leadingIcon' | 'trailingButton' | 'errorText' | 'successText'> & {
|
|
12768
12777
|
accessibilityLabel: NonNullable<BaseInputProps['accessibilityLabel']>;
|
|
12769
12778
|
};
|
|
12779
|
+
type TableEditableDropdownCellProps = Pick<DropdownProps, 'children' | 'isOpen' | 'onOpenChange' | 'selectionType' | 'zIndex'>;
|
|
12770
12780
|
type TableFooterProps = {
|
|
12771
12781
|
/**
|
|
12772
12782
|
* The children of TableFooter should be TableFooterRow
|
|
@@ -12907,7 +12917,6 @@ declare const TableHeaderRow: ({ children, rowDensity }: TableHeaderRowProps) =>
|
|
|
12907
12917
|
|
|
12908
12918
|
declare const TableBody: ({ children }: TableBodyProps) => React__default.ReactElement;
|
|
12909
12919
|
declare const TableCell: ({ children }: TableCellProps) => React__default.ReactElement;
|
|
12910
|
-
declare const TableEditableCell: ({ validationState, accessibilityLabel, autoCapitalize, autoCompleteSuggestionType, autoFocus, defaultValue, isDisabled, isRequired, keyboardReturnKeyType, leadingIcon, maxCharacters, name, onBlur, onChange, onClick, onFocus, onSubmit, placeholder, prefix, suffix, value, testID, trailingButton, errorText, successText, }: TableEditableCellProps) => React__default.ReactElement;
|
|
12911
12920
|
declare const TableRow: <Item>({ children, item, isDisabled, onHover, onClick, }: TableRowProps<Item>) => React__default.ReactElement;
|
|
12912
12921
|
|
|
12913
12922
|
declare const TableFooter: ({ children }: TableFooterProps) => React__default.ReactElement;
|
|
@@ -12919,6 +12928,9 @@ declare const TablePagination: ({ currentPage: controlledCurrentPage, onPageChan
|
|
|
12919
12928
|
declare const TableToolbarActions: ({ children, ...styledProps }: TableToolbarActionsProps) => React__default.ReactElement;
|
|
12920
12929
|
declare const TableToolbar: ({ children, title, selectedTitle: controlledSelectedTitle, }: TableToolbarProps) => React__default.ReactElement;
|
|
12921
12930
|
|
|
12931
|
+
declare const TableEditableDropdownCell: (dropdownProps: TableEditableDropdownCellProps) => React.ReactElement;
|
|
12932
|
+
declare const TableEditableCell: ({ validationState, accessibilityLabel, autoCapitalize, autoCompleteSuggestionType, autoFocus, defaultValue, isDisabled, isRequired, keyboardReturnKeyType, leadingIcon, maxCharacters, name, onBlur, onChange, onClick, onFocus, onSubmit, placeholder, prefix, suffix, value, testID, trailingButton, errorText, successText, }: TableEditableCellProps) => React.ReactElement;
|
|
12933
|
+
|
|
12922
12934
|
type TabsProps = {
|
|
12923
12935
|
/**
|
|
12924
12936
|
* The content of the component, accepts `TabsList` and `TabsPanel` components.
|
|
@@ -13895,4 +13907,4 @@ declare const VisuallyHidden: ({ children, testID }: VisuallyHiddenProps) => Rea
|
|
|
13895
13907
|
*/
|
|
13896
13908
|
declare const screenReaderStyles: CSSObject;
|
|
13897
13909
|
|
|
13898
|
-
export { AcceptPaymentsIcon, Accordion, AccordionItem, AccordionItemBody, AccordionItemHeader, AccordionItemProps, AccordionProps, ActionList, ActionListItem, ActionListItemAsset, ActionListItemAssetProps, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemProps, ActionListItemText, ActionListProps, ActionListSection, ActionListSectionProps, ActivityIcon, AddressBookIcon, AffordabilityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertOctagonIcon, AlertOnlyIcon, AlertProps, AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AmountProps, AnchorIcon, AnnouncementIcon, ApertureIcon, AppStoreIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, AttachmentIcon, AutoComplete, AutoCompleteProps, AutomateAccountingIcon, AutomatePayrollIcon, Avatar, AvatarGroup, AvatarGroupProps, AvatarProps, AwardIcon, Badge, BadgeProps, BankAccountVerificationIcon, BankIcon, BarChartAltIcon, BarChartIcon, BarCodeIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BfsiIcon, BillIcon, BladeCommonEvents, BladeFile, BladeFileList, BladeProvider, BladeProviderProps, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomSheet, BottomSheetBody, BottomSheetBodyProps, BottomSheetFooter, BottomSheetFooterProps, BottomSheetHeader, BottomSheetHeaderProps, BottomSheetProps, Box, BoxIcon, BoxProps, BoxRefType, Breadcrumb, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbProps, BriefcaseIcon, BugIcon, BuildingIcon, BulkPayoutsIcon, BusinessBankingIcon, BusinessSpendManagementIcon, Button, ButtonGroup, ButtonGroupProps, ButtonProps, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderAmount, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, Carousel, CarouselItem, CarouselProps, CashIcon, CastIcon, CheckCircle2Icon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChipGroupProps, ChipProps, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, ClosedCaptioningIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodeProps, CodeSnippetIcon, CodepenIcon, CoinIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleBodyProps, CollapsibleButton, CollapsibleButtonProps, CollapsibleLink, CollapsibleLinkProps, CollapsibleProps, CommandIcon, CompanyRegistrationIcon, CompassIcon, ComponentIds, ConfettiIcon, ContactlessPaymentIcon, CookieIcon, CopyIcon, CopyrightIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CounterProps, CpuIcon, CreditCardIcon, CreditsAndLoansIcon, CropIcon, CrosshairIcon, CurrentAccountIcon, CustomersIcon, CutIcon, DashboardIcon, DatePicker, DatePickerProps, DeleteIcon, DigitalLendingIcon, DisbursePaymentsIcon, DiscIcon, Display, DisplayProps, Divider, DividerProps, DollarIcon, DollarsIcon, DotIcon, DownloadCloudIcon, DownloadIcon, Drawer, DrawerBody, DrawerHeader, DrawerHeaderProps, DrawerProps, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownLink, DropdownOverlay, DropdownOverlayProps, DropdownProps, DropletIcon, EcommerceIcon, EditComposeIcon, EditIcon, EditInlineIcon, EducationIcon, EscrowAccountIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FigmaIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FileUpload, FileUploadProps, FileZipIcon, FilmIcon, FilterIcon, FlagIcon, FolderIcon, ForexManagementIcon, FreelanceIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadingProps, HeadphoneIcon, HeadphonesIcon, HeadsetIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconColors, IconComponent, IconProps, IconSize,
|
|
13910
|
+
export { AcceptPaymentsIcon, Accordion, AccordionItem, AccordionItemBody, AccordionItemHeader, AccordionItemProps, AccordionProps, ActionList, ActionListItem, ActionListItemAsset, ActionListItemAssetProps, ActionListItemBadge, ActionListItemBadgeGroup, ActionListItemIcon, ActionListItemProps, ActionListItemText, ActionListProps, ActionListSection, ActionListSectionProps, ActivityIcon, AddressBookIcon, AffordabilityIcon, AirplayIcon, Alert, AlertCircleIcon, AlertOctagonIcon, AlertOnlyIcon, AlertProps, AlertTriangleIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, Amount, AmountProps, AnchorIcon, AnnouncementIcon, ApertureIcon, AppStoreIcon, ArrowDownIcon, ArrowDownLeftIcon, ArrowDownRightIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpLeftIcon, ArrowUpRightIcon, AtSignIcon, AttachmentIcon, AutoComplete, AutoCompleteProps, AutomateAccountingIcon, AutomatePayrollIcon, Avatar, AvatarGroup, AvatarGroupProps, AvatarProps, AwardIcon, Badge, BadgeProps, BankAccountVerificationIcon, BankIcon, BarChartAltIcon, BarChartIcon, BarCodeIcon, BatteryChargingIcon, BatteryIcon, BellIcon, BellOffIcon, BfsiIcon, BillIcon, BladeCommonEvents, BladeFile, BladeFileList, BladeProvider, BladeProviderProps, BluetoothIcon, BoldIcon, BookIcon, BookmarkIcon, BottomSheet, BottomSheetBody, BottomSheetBodyProps, BottomSheetFooter, BottomSheetFooterProps, BottomSheetHeader, BottomSheetHeaderProps, BottomSheetProps, Box, BoxIcon, BoxProps, BoxRefType, Breadcrumb, BreadcrumbItem, BreadcrumbItemProps, BreadcrumbProps, BriefcaseIcon, BugIcon, BuildingIcon, BulkPayoutsIcon, BusinessBankingIcon, BusinessSpendManagementIcon, Button, ButtonGroup, ButtonGroupProps, ButtonProps, CalendarIcon, CameraIcon, CameraOffIcon, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderAmount, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, Carousel, CarouselItem, CarouselProps, CashIcon, CastIcon, CheckCircle2Icon, CheckCircleIcon, CheckIcon, CheckSquareIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsDownIcon, ChevronsLeftIcon, ChevronsRightIcon, ChevronsUpIcon, Chip, ChipGroup, ChipGroupProps, ChipProps, ChromeIcon, CircleIcon, ClipboardIcon, ClockIcon, CloseIcon, ClosedCaptioningIcon, CloudDrizzleIcon, CloudIcon, CloudLightningIcon, CloudOffIcon, CloudRainIcon, CloudSnowIcon, Code, CodeProps, CodeSnippetIcon, CodepenIcon, CoinIcon, CoinsIcon, Collapsible, CollapsibleBody, CollapsibleBodyProps, CollapsibleButton, CollapsibleButtonProps, CollapsibleLink, CollapsibleLinkProps, CollapsibleProps, CommandIcon, CompanyRegistrationIcon, CompassIcon, ComponentIds, ConfettiIcon, ContactlessPaymentIcon, CookieIcon, CopyIcon, CopyrightIcon, CornerDownLeftIcon, CornerDownRightIcon, CornerLeftDownIcon, CornerLeftUpIcon, CornerRightDownIcon, CornerRightUpIcon, CornerUpLeftIcon, CornerUpRightIcon, Counter, CounterProps, CpuIcon, CreditCardIcon, CreditsAndLoansIcon, CropIcon, CrosshairIcon, CurrentAccountIcon, CustomersIcon, CutIcon, DashboardIcon, DatePicker, DatePickerProps, DeleteIcon, DigitalLendingIcon, DisbursePaymentsIcon, DiscIcon, Display, DisplayProps, Divider, DividerProps, DollarIcon, DollarsIcon, DotIcon, DownloadCloudIcon, DownloadIcon, Drawer, DrawerBody, DrawerHeader, DrawerHeaderProps, DrawerProps, Dropdown, DropdownButton, DropdownFooter, DropdownHeader, DropdownLink, DropdownOverlay, DropdownOverlayProps, DropdownProps, DropletIcon, EcommerceIcon, EditComposeIcon, EditIcon, EditInlineIcon, EducationIcon, EscrowAccountIcon, ExportIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FacebookIcon, FastForwardIcon, FeatherIcon, FigmaIcon, FileIcon, FileMinusIcon, FilePlusIcon, FileTextIcon, FileUpload, FileUploadProps, FileZipIcon, FilmIcon, FilterIcon, FlagIcon, FolderIcon, ForexManagementIcon, FreelanceIcon, FullScreenEnterIcon, FullScreenExitIcon, GithubIcon, GitlabIcon, GlobeIcon, GridIcon, HashIcon, Heading, HeadingProps, HeadphoneIcon, HeadphonesIcon, HeadsetIcon, HeartIcon, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconColors, IconComponent, IconProps, IconSize, ImageIcon, InboxIcon, Indicator, IndicatorProps, InfoIcon, InstagramIcon, InstantSettlementIcon, InternationalPaymentsIcon, InvoicesIcon, ItalicIcon, LayersIcon, LayoutIcon, LifeBuoyIcon, Link, LinkButtonVariantProps, LinkIcon, LinkProps, List, ListIcon, ListItem, ListItemCode, ListItemCodeProps, ListItemLink, ListItemLinkProps, ListItemProps, ListItemText, ListItemTextProps, ListProps, LoaderIcon, LoansForBusinessesIcon, LockIcon, LogInIcon, LogOutIcon, MagicCheckoutIcon, MailIcon, MailOpenIcon, MapIcon, MapPinIcon, MaximizeIcon, Menu, MenuDivider, MenuDotsIcon, MenuFooter, MenuFooterProps, MenuHeader, MenuHeaderProps, MenuIcon, MenuItem, MenuItemProps, MenuOverlay, MenuOverlayProps, MenuProps, MessageCircleIcon, MessageSquareIcon, MicIcon, MicOffIcon, MinimizeIcon, MinusCircleIcon, MinusIcon, MinusSquareIcon, MobileAppIcon, Modal, ModalBody, ModalBodyProps, ModalFooter, ModalFooterProps, ModalHeader, ModalHeaderProps, ModalProps, MonitorIcon, MoonIcon, MoreHorizontalIcon, MoreIcon, MoreVerticalIcon, MoveIcon, MusicIcon, MyAccountIcon, NavigationIcon, OTPInput, OTPInputCommonProps, OTPInputProps, OctagonIcon, OffersIcon, OptimizerIcon, PackageIcon, PaperclipIcon, PasswordInput, PasswordInputProps, PauseCircleIcon, PauseIcon, PaymentButtonIcon, PaymentButtonsIcon, PaymentGatewayIcon, PaymentLinkIcon, PaymentLinksIcon, PaymentPagesIcon, PayoutLinkIcon, PayrollAddonsIcon, PayrollForCaIcon, PayrollForStartupOrSmeIcon, PercentIcon, PettyCashBudgetIcon, PhoneCallIcon, PhoneForwardedIcon, PhoneIcon, PhoneIncomingIcon, PhoneMissedIcon, PhoneNumberInput, PhoneNumberInputProps, PhoneOffIcon, PhoneOutgoingIcon, PictureInPictureIcon, PieChartIcon, PinIcon, PlayCircleIcon, PlayIcon, PlusCircleIcon, PlusIcon, PlusSquareIcon, PocketIcon, Popover, PopoverInteractiveWrapper, PopoverProps, PopoverTriggerProps, PosIcon, PowerIcon, PrinterIcon, ProgressBar, ProgressBarProps, ProgressBarVariant, QRCodeIcon, Radio, RadioGroup, RadioGroupProps, RadioIcon, RadioProps, RazorpayIcon, RazorpayXIcon, RazorpayxPayrollIcon, RefreshIcon, RepeatIcon, ReportsIcon, ResizerIcon, RewindIcon, RotateClockWiseIcon, RotateCounterClockWiseIcon, RouteIcon, RoutesIcon, RupeeIcon, RupeesIcon, SIDE_NAV_EXPANDED_L1_WIDTH_BASE, SIDE_NAV_EXPANDED_L1_WIDTH_XL, SaasIcon, SaveIcon, ScissorsIcon, SearchIcon, SearchInput, SearchInputProps, SelectInput, SelectInputProps, SendIcon, ServerIcon, SettingsIcon, SettlementsIcon, ShareIcon, ShieldIcon, ShoppingBagIcon, ShoppingCartIcon, ShuffleIcon, SideNav, SideNavBody, SideNavFooter, SideNavFooterProps, SideNavItem, SideNavItemProps, SideNavLevel, SideNavLink, SideNavLinkProps, SideNavProps, SideNavSection, SideNavSectionProps, SidebarIcon, Skeleton, SkeletonProps, SkipBackIcon, SkipForwardIcon, SkipNavContent, SkipNavLink, SlackIcon, SlashIcon, SlidersIcon, SmartCollectIcon, SmartphoneIcon, SolutionsIcon, SourceToPayIcon, SparklesIcon, SpeakerIcon, Spinner, SpinnerProps, SpotlightPopoverStepRenderProps, SpotlightPopoverTour, SpotlightPopoverTourFooter, SpotlightPopoverTourProps, SpotlightPopoverTourStep, SpotlightPopoverTourSteps, SquareIcon, StampIcon, StarIcon, StepGroup, StepGroupProps, StepItem, StepItemIcon, StepItemIndicator, StepItemProps, StopCircleIcon, StorefrontIcon, SubscriptionsIcon, SunIcon, SunriseIcon, SunsetIcon, Switch, SwitchProps, TabItem, TabItemProps, TabList, TabNav, TabNavItem, TabNavItemProps, TabPanel, TabPanelProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableData, TableEditableCell, TableEditableCellProps, TableEditableDropdownCell, TableEditableDropdownCellProps, TableFooter, TableFooterCell, TableFooterCellProps, TableFooterProps, TableFooterRow, TableFooterRowProps, TableHeader, TableHeaderCell, TableHeaderCellProps, TableHeaderProps, TableHeaderRow, TableHeaderRowProps, TableNode, TablePagination, TablePaginationProps, TableProps, TableRow, TableRowProps, TableToolbar, TableToolbarActions, TableToolbarActionsProps, TableToolbarProps, TabletIcon, Tabs, TabsProps, Tag, TagIcon, TagProps, TargetIcon, TaxPaymentsIcon, TestIcon, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, ThermometerIcon, ThumbsDownIcon, ThumbsUpIcon, TicketIcon, ToastContainer, ToastProps, ToggleLeftIcon, ToggleRightIcon, TokenHqIcon, Tooltip, TooltipInteractiveWrapper, TooltipProps, TopNav, TopNavActions, TopNavBrand, TopNavContent, TopNavProps, TrademarkIcon, TrademarkRegisteredIcon, TransactionsIcon, TrashIcon, TrendingDownIcon, TrendingUpIcon, TriangleIcon, TrustedBadgeIcon, TvIcon, TwitterIcon, TypeIcon, UmbrellaIcon, UnderlineIcon, UnlockIcon, UpiAutopayIcon, UploadCloudIcon, UploadIcon, UseToastReturn, UserCheckIcon, UserIcon, UserMinusIcon, UserPlusIcon, UserXIcon, UsersIcon, VendorPaymentsIcon, VideoIcon, VideoOffIcon, ViewLiveDemoIcon, VisuallyHidden, VisuallyHiddenProps, VoicemailIcon, VolumeHighIcon, VolumeIcon, VolumeLowIcon, VolumeMuteIcon, WalletIcon, WatchIcon, WifiIcon, WifiOffIcon, WindIcon, XCircleIcon, XSquareIcon, ZapIcon, ZoomInIcon, ZoomOutIcon, announce, clearAnnouncer, destroyAnnouncer, drawerPadding, getHeadingProps, getTextProps, screenReaderStyles, useTheme, useToast };
|