@gobolt/genesis 0.3.26 → 0.3.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.css +1205 -0
- package/dist/components/Avatar/Avatar.d.ts +16 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/{TableWithControls/components/Tooltip → Avatar}/styles.d.ts +1 -1
- package/dist/components/Badge/index.d.ts +2 -2
- package/dist/components/Badge/styles.d.ts +3 -12
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +7 -0
- package/dist/components/Breadcrumb/index.d.ts +4 -0
- package/dist/components/Breadcrumb/styles.d.ts +5 -0
- package/dist/components/Button/Button.d.ts +3 -3
- package/dist/components/Button/IconButton.d.ts +1 -1
- package/dist/components/Button/icon-button-styles.d.ts +1 -12
- package/dist/components/Button/index.d.ts +4 -4
- package/dist/components/Button/styles.d.ts +1 -16
- package/dist/components/Card/Card.d.ts +9 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Card/styles.d.ts +6 -0
- package/dist/components/Chat/Chat.d.ts +18 -0
- package/dist/components/Chat/Message.d.ts +8 -0
- package/dist/components/Chat/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +9 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/styles.d.ts +10 -0
- package/dist/components/DatePicker/DatePicker.d.ts +4 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +4 -0
- package/dist/components/DateRangePicker/index.d.ts +2 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +19 -0
- package/dist/components/ErrorBoundary/index.d.ts +2 -0
- package/dist/components/ErrorBoundaryFallback/ErrorBoundaryFallback.d.ts +8 -0
- package/dist/components/ErrorBoundaryFallback/index.d.ts +2 -0
- package/dist/components/ErrorBoundaryFallback/styles.d.ts +1 -0
- package/dist/components/Form/Form.d.ts +25 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/Form/styles.d.ts +2 -0
- package/dist/components/Glyph/custom/UnitNumber.d.ts +5 -0
- package/dist/components/Input/Input.d.ts +4 -4
- package/dist/components/Input/index.d.ts +2 -2
- package/dist/components/Input/styles.d.ts +1 -18
- package/dist/components/Insights/BarChart/BarChart.d.ts +30 -0
- package/dist/components/Insights/BarChart/index.d.ts +2 -0
- package/dist/components/Insights/BarChart/styles.d.ts +2 -0
- package/dist/components/Insights/DonutChart/DonutChart.d.ts +19 -0
- package/dist/components/Insights/DonutChart/index.d.ts +2 -0
- package/dist/components/Insights/DonutChart/styles.d.ts +2 -0
- package/dist/components/Insights/LineChart/LineChart.d.ts +23 -0
- package/dist/components/Insights/LineChart/index.d.ts +2 -0
- package/dist/components/Insights/LineChart/styles.d.ts +2 -0
- package/dist/components/Insights/index.d.ts +6 -0
- package/dist/components/Layout/Content/Content.d.ts +10 -0
- package/dist/components/Layout/Content/index.d.ts +2 -0
- package/dist/components/Layout/Content/styles.d.ts +4 -0
- package/dist/components/Layout/Layout.d.ts +8 -0
- package/dist/components/Layout/index.d.ts +2 -0
- package/dist/components/Message/Message.d.ts +14 -0
- package/dist/components/Message/index.d.ts +2 -0
- package/dist/components/Message/styles.d.ts +3 -0
- package/dist/components/Notification/Notification.d.ts +17 -0
- package/dist/components/Notification/NotificationBadge/NotificationBadge.d.ts +6 -0
- package/dist/components/Notification/NotificationBadge/icons/ASN.d.ts +2 -0
- package/dist/components/Notification/NotificationBadge/icons/Appointment.d.ts +2 -0
- package/dist/components/Notification/NotificationBadge/icons/Inventory.d.ts +2 -0
- package/dist/components/Notification/NotificationBadge/icons/Parcel.d.ts +2 -0
- package/dist/components/Notification/NotificationBadge/icons/Product.d.ts +2 -0
- package/dist/components/Notification/NotificationBadge/icons/Route.d.ts +2 -0
- package/dist/components/Notification/NotificationBadge/icons/Shipment.d.ts +2 -0
- package/dist/components/Notification/NotificationBadge/icons/ShoppingCart.d.ts +2 -0
- package/dist/components/Notification/NotificationBadge/icons/System.d.ts +2 -0
- package/dist/components/Notification/NotificationBadge/styles.d.ts +3 -0
- package/dist/components/Notification/NotificationRightChevron.d.ts +2 -0
- package/dist/components/Notification/index.d.ts +2 -0
- package/dist/components/Notification/styles.d.ts +5 -0
- package/dist/components/Popover/Popover.d.ts +10 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Popover/styles.d.ts +2 -0
- package/dist/components/Progress/Progress.d.ts +18 -0
- package/dist/components/Progress/Progress.util.d.ts +3 -0
- package/dist/components/Progress/ProgressText.d.ts +10 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/Progress/styles.d.ts +4 -0
- package/dist/components/Radio/Radio.d.ts +10 -0
- package/dist/components/Radio/RadioGroup.d.ts +12 -0
- package/dist/components/Radio/index.d.ts +4 -0
- package/dist/components/Radio/states/RadioChecked.d.ts +2 -0
- package/dist/components/Radio/states/RadioCheckedDisabled.d.ts +2 -0
- package/dist/components/Radio/states/RadioCheckedFocussed.d.ts +2 -0
- package/dist/components/Radio/states/RadioCheckedHover.d.ts +2 -0
- package/dist/components/Radio/states/RadioUnchecked.d.ts +2 -0
- package/dist/components/Radio/states/RadioUncheckedDisabled.d.ts +2 -0
- package/dist/components/Radio/states/RadioUncheckedFocussed.d.ts +2 -0
- package/dist/components/Radio/states/RadioUncheckedHover.d.ts +2 -0
- package/dist/components/Row/Row.d.ts +13 -0
- package/dist/components/Row/RowActions/RowActions.d.ts +9 -0
- package/dist/components/Row/RowActions/styles.d.ts +1 -0
- package/dist/components/Row/RowLabelValue/RowLabelValue.d.ts +10 -0
- package/dist/components/Row/RowLabelValue/RowSkeleton.d.ts +3 -0
- package/dist/components/Row/RowLabelValue/styles.d.ts +5 -0
- package/dist/components/Row/index.d.ts +2 -0
- package/dist/components/Row/styles.d.ts +6 -0
- package/dist/components/SegmentedControls/SegmentedControls.d.ts +12 -0
- package/dist/components/SegmentedControls/index.d.ts +2 -0
- package/dist/components/SegmentedControls/styles.d.ts +3 -0
- package/dist/components/Select/Select.d.ts +4 -4
- package/dist/components/Select/SelectTrigger.d.ts +3 -3
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/components/Shapes/Shapes.d.ts +6 -0
- package/dist/components/Shapes/index.d.ts +2 -0
- package/dist/components/Shapes/variants/Circle.d.ts +5 -0
- package/dist/components/Shapes/variants/Rectangle.d.ts +5 -0
- package/dist/components/Shapes/variants/Triangle.d.ts +5 -0
- package/dist/components/Switch/Switch.d.ts +9 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switch/styles.d.ts +2 -0
- package/dist/components/Table/Table.d.ts +3 -4
- package/dist/components/Table/TableControls/CustomPagination.d.ts +2 -2
- package/dist/components/Table/TableControls/PaginationNumber.d.ts +1 -1
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.d.ts +1 -1
- package/dist/components/Table/TableControls/SecondaryTableControlsRow.d.ts +1 -1
- package/dist/components/Table/TableControls/TableControls.d.ts +3 -3
- package/dist/components/Table/TableControls/index.d.ts +2 -2
- package/dist/components/Table/TablePagination.d.ts +2 -2
- package/dist/components/Table/__mocks__/table-mocks.d.ts +1 -1
- package/dist/components/Table/index.d.ts +6 -6
- package/dist/components/Table/styles.d.ts +3 -17
- package/dist/components/Table/useTable.d.ts +2 -2
- package/dist/components/TableWithControls/TableWithControls.d.ts +2 -2
- package/dist/components/TableWithControls/index.d.ts +3 -3
- package/dist/components/TableWithControls/useTableWithControls.d.ts +4 -4
- package/dist/components/Tabs/Tabs.d.ts +50 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/styles.d.ts +3 -0
- package/dist/components/Tile/Tile.d.ts +10 -0
- package/dist/components/Tile/index.d.ts +2 -0
- package/dist/components/Tile/styles.d.ts +4 -0
- package/dist/components/Toast/Toast.d.ts +13 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/styles.d.ts +3 -0
- package/dist/components/Tooltip/index.d.ts +2 -2
- package/dist/components/Tooltip/styles.d.ts +1 -14
- package/dist/components/Typography/Typography.d.ts +2 -2
- package/dist/components/Typography/index.d.ts +2 -2
- package/dist/components/Typography/styles.d.ts +3 -21
- package/dist/components/UtilityButton/UtilityButton.d.ts +1 -1
- package/dist/components/UtilityButton/index.d.ts +2 -2
- package/dist/components/index.d.ts +74 -7
- package/dist/index.cjs +84476 -0
- package/dist/index.d.ts +6 -10
- package/dist/index.js +84459 -9
- package/dist/providers/BreakpointProvider.d.ts +7 -0
- package/dist/providers/GenesisProvider.d.ts +7 -0
- package/dist/providers/ToastProvider.d.ts +12 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/useGenesis.d.ts +7 -0
- package/dist/styles/global-styles.d.ts +1 -0
- package/dist/styles/theme/genesis-theme.d.ts +1 -1
- package/dist/styles/theme/index.d.ts +2 -2
- package/dist/types/index.d.ts +1 -0
- package/package.json +17 -18
- package/dist/components/Badge/Badge.js +0 -51
- package/dist/components/Badge/index.js +0 -1
- package/dist/components/Badge/styles.js +0 -21
- package/dist/components/Button/Button.js +0 -36
- package/dist/components/Button/IconButton.js +0 -32
- package/dist/components/Button/__stories__/Button.stories.d.ts +0 -12
- package/dist/components/Button/__stories__/Button.stories.js +0 -154
- package/dist/components/Button/__stories__/IconButton.stories.d.ts +0 -8
- package/dist/components/Button/__stories__/IconButton.stories.js +0 -133
- package/dist/components/Button/__stories__/UtilityButton.stories.d.ts +0 -8
- package/dist/components/Button/__stories__/UtilityButton.stories.js +0 -71
- package/dist/components/Button/__tests__/Button.test.js +0 -19
- package/dist/components/Button/components/Button/Button.d.ts +0 -16
- package/dist/components/Button/components/Button/Button.js +0 -13
- package/dist/components/Button/components/Button/styles.d.ts +0 -1
- package/dist/components/Button/components/Button/styles.js +0 -118
- package/dist/components/Button/constants/index.d.ts +0 -163
- package/dist/components/Button/constants/index.js +0 -89
- package/dist/components/Button/icon-button-styles.js +0 -23
- package/dist/components/Button/index.js +0 -2
- package/dist/components/Button/styles.js +0 -60
- package/dist/components/Button/styles.ts +0 -176
- package/dist/components/Input/Input.js +0 -57
- package/dist/components/Input/index.js +0 -1
- package/dist/components/Input/styles.js +0 -76
- package/dist/components/Select/Select.js +0 -199
- package/dist/components/Select/SelectTrigger.js +0 -89
- package/dist/components/Select/index.js +0 -1
- package/dist/components/Table/Table/Table.d.ts +0 -51
- package/dist/components/Table/Table/Table.js +0 -14
- package/dist/components/Table/Table/TableControls/CustomPagination.d.ts +0 -13
- package/dist/components/Table/Table/TableControls/CustomPagination.js +0 -158
- package/dist/components/Table/Table/TableControls/PaginationNumber.d.ts +0 -7
- package/dist/components/Table/Table/TableControls/PaginationNumber.js +0 -30
- package/dist/components/Table/Table/styles.d.ts +0 -14
- package/dist/components/Table/Table/styles.js +0 -64
- package/dist/components/Table/Table/useTable.d.ts +0 -26
- package/dist/components/Table/Table/useTable.js +0 -141
- package/dist/components/Table/Table.js +0 -33
- package/dist/components/Table/TableControls/CustomPagination.js +0 -174
- package/dist/components/Table/TableControls/PaginationNumber.js +0 -46
- package/dist/components/Table/TableControls/PrimaryTableControlsRow.js +0 -78
- package/dist/components/Table/TableControls/SecondaryTableControlsRow.js +0 -65
- package/dist/components/Table/TableControls/TableControls.js +0 -14
- package/dist/components/Table/TableControls/TableControls.tsx +0 -51
- package/dist/components/Table/TableControls/__stories__/CustomPaginationStandalone.stories.d.ts +0 -9
- package/dist/components/Table/TableControls/__stories__/CustomPaginationStandalone.stories.js +0 -58
- package/dist/components/Table/TableControls/__stories__/PaginationNumber.stories.d.ts +0 -7
- package/dist/components/Table/TableControls/__stories__/PaginationNumber.stories.js +0 -37
- package/dist/components/Table/TableControls/__stories__/TableControls.stories.d.ts +0 -6
- package/dist/components/Table/TableControls/__stories__/TableControls.stories.js +0 -106
- package/dist/components/Table/TableControls/__tests__/CustomPagination.test.d.ts +0 -1
- package/dist/components/Table/TableControls/__tests__/CustomPagination.test.js +0 -82
- package/dist/components/Table/TableControls/__tests__/TableControls.test.d.ts +0 -1
- package/dist/components/Table/TableControls/__tests__/TableControls.test.js +0 -74
- package/dist/components/Table/TableControls/index.js +0 -1
- package/dist/components/Table/TableControls/styles.d.ts +0 -13
- package/dist/components/Table/TableControls/styles.js +0 -16
- package/dist/components/Table/TablePagination.js +0 -28
- package/dist/components/Table/Typography/Typography.d.ts +0 -17
- package/dist/components/Table/Typography/Typography.js +0 -16
- package/dist/components/Table/Typography/index.d.ts +0 -2
- package/dist/components/Table/Typography/index.js +0 -1
- package/dist/components/Table/Typography/styles.d.ts +0 -3
- package/dist/components/Table/Typography/styles.js +0 -54
- package/dist/components/Table/__mocks__/table-mocks.js +0 -310
- package/dist/components/Table/__stories__/GenesisTable.stories.d.ts +0 -5
- package/dist/components/Table/__stories__/GenesisTable.stories.js +0 -23
- package/dist/components/Table/__stories__/Table.stories.d.ts +0 -8
- package/dist/components/Table/__stories__/Table.stories.js +0 -188
- package/dist/components/Table/__tests__/table.test.d.ts +0 -1
- package/dist/components/Table/__tests__/table.test.js +0 -47
- package/dist/components/Table/index.js +0 -3
- package/dist/components/Table/styles.js +0 -20
- package/dist/components/Table/useTable.js +0 -238
- package/dist/components/TableWithControls/TableWithControls.js +0 -21
- package/dist/components/TableWithControls/__stories__/TableWithControls.stories.d.ts +0 -6
- package/dist/components/TableWithControls/__stories__/TableWithControls.stories.js +0 -178
- package/dist/components/TableWithControls/__stories__/TableWithControlsStory.d.ts +0 -1
- package/dist/components/TableWithControls/__stories__/TableWithControlsStory.js +0 -55
- package/dist/components/TableWithControls/__tests__/TableWithControls.test.d.ts +0 -1
- package/dist/components/TableWithControls/__tests__/TableWithControls.test.js +0 -41
- package/dist/components/TableWithControls/components/Badge/Badge.d.ts +0 -16
- package/dist/components/TableWithControls/components/Badge/Badge.js +0 -28
- package/dist/components/TableWithControls/components/Badge/index.d.ts +0 -2
- package/dist/components/TableWithControls/components/Badge/index.js +0 -1
- package/dist/components/TableWithControls/components/Badge/styles.d.ts +0 -4
- package/dist/components/TableWithControls/components/Badge/styles.js +0 -46
- package/dist/components/TableWithControls/components/Button/Button.d.ts +0 -16
- package/dist/components/TableWithControls/components/Button/Button.js +0 -13
- package/dist/components/TableWithControls/components/Button/IconButton.d.ts +0 -8
- package/dist/components/TableWithControls/components/Button/IconButton.js +0 -9
- package/dist/components/TableWithControls/components/Button/icon-button-styles.d.ts +0 -1
- package/dist/components/TableWithControls/components/Button/icon-button-styles.js +0 -76
- package/dist/components/TableWithControls/components/Button/index.d.ts +0 -4
- package/dist/components/TableWithControls/components/Button/index.js +0 -2
- package/dist/components/TableWithControls/components/Button/styles.d.ts +0 -1
- package/dist/components/TableWithControls/components/Button/styles.js +0 -118
- package/dist/components/TableWithControls/components/Input/Input.d.ts +0 -13
- package/dist/components/TableWithControls/components/Input/Input.js +0 -34
- package/dist/components/TableWithControls/components/Input/index.d.ts +0 -2
- package/dist/components/TableWithControls/components/Input/index.js +0 -1
- package/dist/components/TableWithControls/components/Input/styles.d.ts +0 -1
- package/dist/components/TableWithControls/components/Input/styles.js +0 -180
- package/dist/components/TableWithControls/components/Select/Select.d.ts +0 -26
- package/dist/components/TableWithControls/components/Select/Select.js +0 -175
- package/dist/components/TableWithControls/components/Select/SelectTrigger.d.ts +0 -23
- package/dist/components/TableWithControls/components/Select/SelectTrigger.js +0 -103
- package/dist/components/TableWithControls/components/Select/index.d.ts +0 -2
- package/dist/components/TableWithControls/components/Select/index.js +0 -1
- package/dist/components/TableWithControls/components/Table/Table.d.ts +0 -51
- package/dist/components/TableWithControls/components/Table/Table.js +0 -14
- package/dist/components/TableWithControls/components/Table/TableControls/CustomPagination.d.ts +0 -13
- package/dist/components/TableWithControls/components/Table/TableControls/CustomPagination.js +0 -158
- package/dist/components/TableWithControls/components/Table/TableControls/PaginationNumber.d.ts +0 -7
- package/dist/components/TableWithControls/components/Table/TableControls/PaginationNumber.js +0 -30
- package/dist/components/TableWithControls/components/Table/TableControls/PrimaryTableControlsRow.d.ts +0 -18
- package/dist/components/TableWithControls/components/Table/TableControls/PrimaryTableControlsRow.js +0 -77
- package/dist/components/TableWithControls/components/Table/TableControls/SecondaryTableControlsRow.d.ts +0 -11
- package/dist/components/TableWithControls/components/Table/TableControls/SecondaryTableControlsRow.js +0 -43
- package/dist/components/TableWithControls/components/Table/TableControls/TableControls.d.ts +0 -14
- package/dist/components/TableWithControls/components/Table/TableControls/TableControls.js +0 -13
- package/dist/components/TableWithControls/components/Table/TableControls/index.d.ts +0 -2
- package/dist/components/TableWithControls/components/Table/TableControls/index.js +0 -1
- package/dist/components/TableWithControls/components/Table/TablePagination.d.ts +0 -13
- package/dist/components/TableWithControls/components/Table/TablePagination.js +0 -11
- package/dist/components/TableWithControls/components/Table/__mocks__/table-mocks.d.ts +0 -20
- package/dist/components/TableWithControls/components/Table/__mocks__/table-mocks.js +0 -301
- package/dist/components/TableWithControls/components/Table/index.d.ts +0 -6
- package/dist/components/TableWithControls/components/Table/index.js +0 -3
- package/dist/components/TableWithControls/components/Table/styles.d.ts +0 -14
- package/dist/components/TableWithControls/components/Table/styles.js +0 -64
- package/dist/components/TableWithControls/components/Table/useTable.d.ts +0 -26
- package/dist/components/TableWithControls/components/Table/useTable.js +0 -141
- package/dist/components/TableWithControls/components/TableWithControls/TableWithControls.d.ts +0 -12
- package/dist/components/TableWithControls/components/TableWithControls/TableWithControls.js +0 -20
- package/dist/components/TableWithControls/components/TableWithControls/useTableWithControls.d.ts +0 -29
- package/dist/components/TableWithControls/components/TableWithControls/useTableWithControls.js +0 -136
- package/dist/components/TableWithControls/components/Tooltip/Tooltip.d.ts +0 -7
- package/dist/components/TableWithControls/components/Tooltip/Tooltip.js +0 -8
- package/dist/components/TableWithControls/components/Tooltip/index.d.ts +0 -2
- package/dist/components/TableWithControls/components/Tooltip/index.js +0 -1
- package/dist/components/TableWithControls/components/Tooltip/styles.js +0 -26
- package/dist/components/TableWithControls/components/Typography/Typography.d.ts +0 -17
- package/dist/components/TableWithControls/components/Typography/Typography.js +0 -16
- package/dist/components/TableWithControls/components/Typography/index.d.ts +0 -2
- package/dist/components/TableWithControls/components/Typography/index.js +0 -1
- package/dist/components/TableWithControls/components/Typography/styles.d.ts +0 -3
- package/dist/components/TableWithControls/components/Typography/styles.js +0 -54
- package/dist/components/TableWithControls/components/UtilityButton/UtilityButton.d.ts +0 -5
- package/dist/components/TableWithControls/components/UtilityButton/UtilityButton.js +0 -9
- package/dist/components/TableWithControls/components/UtilityButton/index.d.ts +0 -2
- package/dist/components/TableWithControls/components/UtilityButton/index.js +0 -1
- package/dist/components/TableWithControls/components/shared/DropdownChevron.d.ts +0 -2
- package/dist/components/TableWithControls/components/shared/DropdownChevron.js +0 -7
- package/dist/components/TableWithControls/constants/index.d.ts +0 -163
- package/dist/components/TableWithControls/constants/index.js +0 -89
- package/dist/components/TableWithControls/index.js +0 -2
- package/dist/components/TableWithControls/types/events.d.ts +0 -22
- package/dist/components/TableWithControls/types/events.js +0 -1
- package/dist/components/TableWithControls/useTableWithControls.js +0 -117
- package/dist/components/TableWithControls/utils/icon-util.d.ts +0 -3
- package/dist/components/TableWithControls/utils/icon-util.js +0 -116
- package/dist/components/Tooltip/Tooltip.js +0 -9
- package/dist/components/Tooltip/index.js +0 -1
- package/dist/components/Tooltip/styles.js +0 -17
- package/dist/components/Typography/Typography.js +0 -39
- package/dist/components/Typography/index.js +0 -1
- package/dist/components/Typography/styles.js +0 -37
- package/dist/components/UtilityButton/UtilityButton.js +0 -32
- package/dist/components/UtilityButton/components/Button/Button.d.ts +0 -16
- package/dist/components/UtilityButton/components/Button/Button.js +0 -13
- package/dist/components/UtilityButton/components/Button/IconButton.d.ts +0 -8
- package/dist/components/UtilityButton/components/Button/IconButton.js +0 -9
- package/dist/components/UtilityButton/components/Button/icon-button-styles.d.ts +0 -1
- package/dist/components/UtilityButton/components/Button/icon-button-styles.js +0 -76
- package/dist/components/UtilityButton/components/Button/index.d.ts +0 -4
- package/dist/components/UtilityButton/components/Button/index.js +0 -2
- package/dist/components/UtilityButton/components/Button/styles.d.ts +0 -1
- package/dist/components/UtilityButton/components/Button/styles.js +0 -118
- package/dist/components/UtilityButton/components/UtilityButton/UtilityButton.d.ts +0 -5
- package/dist/components/UtilityButton/components/UtilityButton/UtilityButton.js +0 -9
- package/dist/components/UtilityButton/constants/index.d.ts +0 -163
- package/dist/components/UtilityButton/constants/index.js +0 -89
- package/dist/components/UtilityButton/index.js +0 -1
- package/dist/components/index.js +0 -7
- package/dist/components/shared/DropdownChevron.js +0 -18
- package/dist/constants/index.js +0 -89
- package/dist/interface/address.d.ts +0 -10
- package/dist/interface/address.js +0 -1
- package/dist/interface/appointment.d.ts +0 -56
- package/dist/interface/appointment.js +0 -23
- package/dist/styles/design-tokens/variables.js +0 -707
- package/dist/styles/theme/genesis-theme.js +0 -1512
- package/dist/styles/theme/genesis-theme.types.d.ts +0 -263
- package/dist/styles/theme/genesis-theme.types.js +0 -6
- package/dist/styles/theme/index.js +0 -1
- package/dist/test/setup.d.ts +0 -6
- package/dist/test/setup.js +0 -53
- package/dist/test/setup.types.d.ts +0 -7
- package/dist/test/setup.types.js +0 -1
- package/dist/types/events.d.ts +0 -22
- package/dist/types/events.js +0 -1
- package/dist/utils/icon-util.js +0 -119
- package/dist/utils/styled.d.ts +0 -1
- package/dist/utils/styled.js +0 -44
- /package/dist/{components/Button/__tests__/Button.test.d.ts → styles/theme/genesis-theme.test.d.ts} +0 -0
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { Badge } from "@gobolt/genesis/components";
|
|
13
|
-
import React from "react";
|
|
14
|
-
// Helper function for title case
|
|
15
|
-
var startCase = function (string_) {
|
|
16
|
-
if (string_) {
|
|
17
|
-
return string_
|
|
18
|
-
.replaceAll(/([A-Z])/g, " $1")
|
|
19
|
-
.replace(/^./, function (s) { return s.toUpperCase(); });
|
|
20
|
-
}
|
|
21
|
-
return string_;
|
|
22
|
-
};
|
|
23
|
-
export var mockColumns = [
|
|
24
|
-
{
|
|
25
|
-
key: "number",
|
|
26
|
-
title: "Id",
|
|
27
|
-
dataIndex: "number",
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
key: "timeslot",
|
|
31
|
-
title: "Timeslot",
|
|
32
|
-
dataIndex: "timerange",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
key: "status",
|
|
36
|
-
title: "Status",
|
|
37
|
-
dataIndex: "status",
|
|
38
|
-
render: function (status) {
|
|
39
|
-
var colorStateMap = {
|
|
40
|
-
in_progress: "warning",
|
|
41
|
-
scheduled: "generic",
|
|
42
|
-
completed: "success",
|
|
43
|
-
};
|
|
44
|
-
var statusLabel = status === "in_progress" ? "in progress" : status;
|
|
45
|
-
return React.createElement(Badge, {
|
|
46
|
-
label: startCase(statusLabel),
|
|
47
|
-
state: colorStateMap[status],
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
key: "address",
|
|
53
|
-
title: "Address",
|
|
54
|
-
render: function (appointment) {
|
|
55
|
-
var _a = appointment.address, nickname = _a.nickname, address = _a.address;
|
|
56
|
-
return nickname ? "".concat(nickname, " (").concat(address, ")") : address;
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
title: "Type",
|
|
61
|
-
dataIndex: "job_subtype",
|
|
62
|
-
render: function (jobSubtype) {
|
|
63
|
-
var colorStateMap = {
|
|
64
|
-
delivery: "info",
|
|
65
|
-
pickup: "success",
|
|
66
|
-
};
|
|
67
|
-
return React.createElement(Badge, {
|
|
68
|
-
label: startCase(jobSubtype),
|
|
69
|
-
state: colorStateMap[jobSubtype],
|
|
70
|
-
});
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
];
|
|
74
|
-
// Note: it's important that we don't show the Ant Design sorting since it controlled via the table controls
|
|
75
|
-
export var mockColumnsWithSortDisabled = mockColumns.map(function (column) { return (__assign({}, column)); });
|
|
76
|
-
export var mockDataSource = {
|
|
77
|
-
appointments: [
|
|
78
|
-
{
|
|
79
|
-
id: "1",
|
|
80
|
-
number: "1",
|
|
81
|
-
timerange: "9:00 AM - 10:00 AM",
|
|
82
|
-
status: "in_progress",
|
|
83
|
-
address: {
|
|
84
|
-
nickname: "Home",
|
|
85
|
-
address: "123 Main St",
|
|
86
|
-
},
|
|
87
|
-
job_subtype: "delivery",
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
id: "2",
|
|
91
|
-
number: "2",
|
|
92
|
-
timerange: "10:00 AM - 11:00 AM",
|
|
93
|
-
status: "scheduled",
|
|
94
|
-
address: {
|
|
95
|
-
nickname: "Work",
|
|
96
|
-
address: "456 Elm St",
|
|
97
|
-
},
|
|
98
|
-
job_subtype: "pickup",
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
id: "3",
|
|
102
|
-
number: "3",
|
|
103
|
-
timerange: "11:00 AM - 12:00 PM",
|
|
104
|
-
status: "scheduled",
|
|
105
|
-
address: {
|
|
106
|
-
nickname: "Store",
|
|
107
|
-
address: "789 Oak St",
|
|
108
|
-
},
|
|
109
|
-
job_subtype: "delivery",
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
id: "4",
|
|
113
|
-
number: "4",
|
|
114
|
-
timerange: "1:00 PM - 2:00 PM",
|
|
115
|
-
status: "scheduled",
|
|
116
|
-
address: {
|
|
117
|
-
nickname: "Office",
|
|
118
|
-
address: "321 Pine St",
|
|
119
|
-
},
|
|
120
|
-
job_subtype: "pickup",
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
id: "5",
|
|
124
|
-
number: "5",
|
|
125
|
-
timerange: "2:00 PM - 3:00 PM",
|
|
126
|
-
status: "scheduled",
|
|
127
|
-
address: {
|
|
128
|
-
nickname: "Library",
|
|
129
|
-
address: "555 Book Lane",
|
|
130
|
-
},
|
|
131
|
-
job_subtype: "delivery",
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
id: "6",
|
|
135
|
-
number: "6",
|
|
136
|
-
timerange: "3:00 PM - 4:00 PM",
|
|
137
|
-
status: "scheduled",
|
|
138
|
-
address: {
|
|
139
|
-
nickname: "Gym",
|
|
140
|
-
address: "777 Fitness Ave",
|
|
141
|
-
},
|
|
142
|
-
job_subtype: "pickup",
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
id: "7",
|
|
146
|
-
number: "7",
|
|
147
|
-
timerange: "4:00 PM - 5:00 PM",
|
|
148
|
-
status: "scheduled",
|
|
149
|
-
address: {
|
|
150
|
-
nickname: "Mall",
|
|
151
|
-
address: "888 Shopping Center",
|
|
152
|
-
},
|
|
153
|
-
job_subtype: "delivery",
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
id: "8",
|
|
157
|
-
number: "8",
|
|
158
|
-
timerange: "9:00 AM - 10:00 AM",
|
|
159
|
-
status: "completed",
|
|
160
|
-
address: {
|
|
161
|
-
nickname: "School",
|
|
162
|
-
address: "999 Education Rd",
|
|
163
|
-
},
|
|
164
|
-
job_subtype: "pickup",
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
id: "9",
|
|
168
|
-
number: "9",
|
|
169
|
-
timerange: "10:00 AM - 11:00 AM",
|
|
170
|
-
status: "scheduled",
|
|
171
|
-
address: {
|
|
172
|
-
nickname: "Restaurant",
|
|
173
|
-
address: "111 Food Court",
|
|
174
|
-
},
|
|
175
|
-
job_subtype: "delivery",
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
id: "10",
|
|
179
|
-
number: "10",
|
|
180
|
-
timerange: "11:00 AM - 12:00 PM",
|
|
181
|
-
status: "scheduled",
|
|
182
|
-
address: {
|
|
183
|
-
nickname: "Park",
|
|
184
|
-
address: "222 Green Ave",
|
|
185
|
-
},
|
|
186
|
-
job_subtype: "pickup",
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
id: "11",
|
|
190
|
-
number: "11",
|
|
191
|
-
timerange: "1:00 PM - 2:00 PM",
|
|
192
|
-
status: "scheduled",
|
|
193
|
-
address: {
|
|
194
|
-
nickname: "Beach",
|
|
195
|
-
address: "333 Shore Dr",
|
|
196
|
-
},
|
|
197
|
-
job_subtype: "delivery",
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
id: "12",
|
|
201
|
-
number: "12",
|
|
202
|
-
timerange: "2:00 PM - 3:00 PM",
|
|
203
|
-
status: "scheduled",
|
|
204
|
-
address: {
|
|
205
|
-
nickname: "Hotel",
|
|
206
|
-
address: "444 Stay Blvd",
|
|
207
|
-
},
|
|
208
|
-
job_subtype: "pickup",
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
id: "13",
|
|
212
|
-
number: "13",
|
|
213
|
-
timerange: "3:00 PM - 4:00 PM",
|
|
214
|
-
status: "scheduled",
|
|
215
|
-
address: {
|
|
216
|
-
nickname: "Airport",
|
|
217
|
-
address: "666 Flight Way",
|
|
218
|
-
},
|
|
219
|
-
job_subtype: "delivery",
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
id: "14",
|
|
223
|
-
number: "14",
|
|
224
|
-
timerange: "4:00 PM - 5:00 PM",
|
|
225
|
-
status: "cancelled",
|
|
226
|
-
address: {
|
|
227
|
-
nickname: "Stadium",
|
|
228
|
-
address: "777 Sports Complex",
|
|
229
|
-
},
|
|
230
|
-
job_subtype: "pickup",
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
id: "15",
|
|
234
|
-
number: "15",
|
|
235
|
-
timerange: "9:00 AM - 10:00 AM",
|
|
236
|
-
status: "scheduled",
|
|
237
|
-
address: {
|
|
238
|
-
nickname: "Theater",
|
|
239
|
-
address: "888 Show Ave",
|
|
240
|
-
},
|
|
241
|
-
job_subtype: "delivery",
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
id: "16",
|
|
245
|
-
number: "16",
|
|
246
|
-
timerange: "10:00 AM - 11:00 AM",
|
|
247
|
-
status: "scheduled",
|
|
248
|
-
address: {
|
|
249
|
-
nickname: "Museum",
|
|
250
|
-
address: "999 History Lane",
|
|
251
|
-
},
|
|
252
|
-
job_subtype: "pickup",
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
id: "17",
|
|
256
|
-
number: "17",
|
|
257
|
-
timerange: "11:00 AM - 12:00 PM",
|
|
258
|
-
status: "scheduled",
|
|
259
|
-
address: {
|
|
260
|
-
nickname: "Zoo",
|
|
261
|
-
address: "123 Animal Park",
|
|
262
|
-
},
|
|
263
|
-
job_subtype: "delivery",
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
id: "18",
|
|
267
|
-
number: "18",
|
|
268
|
-
timerange: "1:00 PM - 2:00 PM",
|
|
269
|
-
status: "scheduled",
|
|
270
|
-
address: {
|
|
271
|
-
nickname: "Bank",
|
|
272
|
-
address: "456 Money St",
|
|
273
|
-
},
|
|
274
|
-
job_subtype: "pickup",
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
id: "19",
|
|
278
|
-
number: "19",
|
|
279
|
-
timerange: "2:00 PM - 3:00 PM",
|
|
280
|
-
status: "scheduled",
|
|
281
|
-
address: {
|
|
282
|
-
nickname: "Post Office",
|
|
283
|
-
address: "789 Mail Road",
|
|
284
|
-
},
|
|
285
|
-
job_subtype: "delivery",
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
id: "20",
|
|
289
|
-
number: "20",
|
|
290
|
-
timerange: "3:00 PM - 4:00 PM",
|
|
291
|
-
status: "scheduled",
|
|
292
|
-
address: {
|
|
293
|
-
nickname: "Church",
|
|
294
|
-
address: "321 Faith Street",
|
|
295
|
-
},
|
|
296
|
-
job_subtype: "pickup",
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
id: "21",
|
|
300
|
-
number: "21",
|
|
301
|
-
timerange: "4:00 PM - 5:00 PM",
|
|
302
|
-
status: "scheduled",
|
|
303
|
-
address: {
|
|
304
|
-
nickname: "Pharmacy",
|
|
305
|
-
address: "654 Health Ave",
|
|
306
|
-
},
|
|
307
|
-
job_subtype: "delivery",
|
|
308
|
-
},
|
|
309
|
-
],
|
|
310
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import description from "./GenesisTableDescription.md?raw";
|
|
2
|
-
import Table from "../TablePagination";
|
|
3
|
-
import { mockColumnsWithSortDisabled, mockDataSource, } from "../__mocks__/table-mocks";
|
|
4
|
-
var meta = {
|
|
5
|
-
title: "Components/Table",
|
|
6
|
-
component: Table,
|
|
7
|
-
tags: ["autodocs"],
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: "centered",
|
|
10
|
-
docs: {
|
|
11
|
-
description: {
|
|
12
|
-
component: description,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
export default meta;
|
|
18
|
-
export var Default = {
|
|
19
|
-
args: {
|
|
20
|
-
columns: mockColumnsWithSortDisabled,
|
|
21
|
-
dataSource: mockDataSource.appointments,
|
|
22
|
-
},
|
|
23
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import TablePagination from "../TablePagination";
|
|
3
|
-
declare const meta: Meta<typeof TablePagination>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof TablePagination>;
|
|
6
|
-
export declare const BulkCheckSelection: Story;
|
|
7
|
-
export declare const RadioSelection: Story;
|
|
8
|
-
export declare const MainContentCell: Story;
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { useEffect } from "react";
|
|
14
|
-
import description from "./TableDescription.md?raw";
|
|
15
|
-
import Typography from "../../Typography";
|
|
16
|
-
import TablePagination from "../TablePagination";
|
|
17
|
-
import { http } from "msw";
|
|
18
|
-
import { useTable } from "../useTable";
|
|
19
|
-
import { mockColumnsWithSortDisabled, // import that we don't show the Ant Design sorting since it controlled via the table controls
|
|
20
|
-
mockDataSource, } from "../__mocks__/table-mocks";
|
|
21
|
-
var commonUseTableConfig = {
|
|
22
|
-
columns: mockColumnsWithSortDisabled,
|
|
23
|
-
filters: {},
|
|
24
|
-
fetchUrl: "/table/data",
|
|
25
|
-
fetchOptions: {
|
|
26
|
-
method: "POST",
|
|
27
|
-
headers: {
|
|
28
|
-
"Content-Type": "application/json",
|
|
29
|
-
},
|
|
30
|
-
body: JSON.stringify({
|
|
31
|
-
filters: {
|
|
32
|
-
order: "asc",
|
|
33
|
-
search: "",
|
|
34
|
-
page: 1,
|
|
35
|
-
per_page: 10,
|
|
36
|
-
sort: null,
|
|
37
|
-
},
|
|
38
|
-
}),
|
|
39
|
-
},
|
|
40
|
-
selectionType: "checkbox",
|
|
41
|
-
simulateDelay: 0,
|
|
42
|
-
disableRowSelection: function (record) { return ({
|
|
43
|
-
disabled: record.status === "completed", // Column configuration not to be checked
|
|
44
|
-
name: record.status.toString(),
|
|
45
|
-
}); },
|
|
46
|
-
};
|
|
47
|
-
var meta = {
|
|
48
|
-
component: TablePagination,
|
|
49
|
-
title: "Components/Table/Table",
|
|
50
|
-
tags: ["autodocs"],
|
|
51
|
-
parameters: {
|
|
52
|
-
layout: "centered",
|
|
53
|
-
docs: {
|
|
54
|
-
description: {
|
|
55
|
-
component: description,
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
export default meta;
|
|
61
|
-
export var BulkCheckSelection = {
|
|
62
|
-
parameters: {
|
|
63
|
-
msw: {
|
|
64
|
-
enabled: true,
|
|
65
|
-
handlers: [
|
|
66
|
-
http.post("/table/data", function (_a) {
|
|
67
|
-
var request = _a.request;
|
|
68
|
-
return new Response(JSON.stringify({
|
|
69
|
-
data: mockDataSource.appointments,
|
|
70
|
-
pagination: {
|
|
71
|
-
count: 2,
|
|
72
|
-
page: 1,
|
|
73
|
-
pages: 1,
|
|
74
|
-
per_page: "ALL",
|
|
75
|
-
},
|
|
76
|
-
meta: {
|
|
77
|
-
total_count: mockDataSource.appointments.length,
|
|
78
|
-
page: 1,
|
|
79
|
-
per_page: 10,
|
|
80
|
-
},
|
|
81
|
-
}), {
|
|
82
|
-
status: 200,
|
|
83
|
-
headers: { "Content-Type": "application/json" },
|
|
84
|
-
});
|
|
85
|
-
}),
|
|
86
|
-
],
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
render: function () {
|
|
90
|
-
var _a = useTable(commonUseTableConfig), dataSource = _a.dataSource, columns = _a.columns, selectedRows = _a.selectedRows, rowSelection = _a.rowSelection;
|
|
91
|
-
if (!dataSource)
|
|
92
|
-
return null;
|
|
93
|
-
useEffect(function () {
|
|
94
|
-
console.log("BulkCheckSelection - Selected Rows:", selectedRows);
|
|
95
|
-
}, [selectedRows]);
|
|
96
|
-
// handle changes from the table
|
|
97
|
-
var onTableChange = function (pagination, filters, sorter) {
|
|
98
|
-
console.log("Table changed:", pagination, filters, sorter);
|
|
99
|
-
};
|
|
100
|
-
return (_jsxs("div", { children: [_jsxs("div", { style: { margin: "26px 0px" }, children: [_jsx("div", { style: { margin: "16px 0px" }, children: _jsx(Typography, { variant: "heading3", children: "Table Example" }) }), _jsx(Typography, { variant: "body2", children: "Any rows with Completed status are disabled from selection" })] }), _jsx(TablePagination, { dataSource: dataSource, columns: columns, rowSelection: rowSelection, onChange: onTableChange })] }));
|
|
101
|
-
},
|
|
102
|
-
};
|
|
103
|
-
export var RadioSelection = {
|
|
104
|
-
parameters: {
|
|
105
|
-
msw: {
|
|
106
|
-
enabled: true,
|
|
107
|
-
handlers: [
|
|
108
|
-
http.post("/table/data", function (_a) {
|
|
109
|
-
var request = _a.request;
|
|
110
|
-
return new Response(JSON.stringify({
|
|
111
|
-
data: mockDataSource.appointments,
|
|
112
|
-
pagination: {
|
|
113
|
-
count: 2,
|
|
114
|
-
page: 1,
|
|
115
|
-
pages: 1,
|
|
116
|
-
per_page: "ALL",
|
|
117
|
-
},
|
|
118
|
-
meta: {
|
|
119
|
-
total_count: mockDataSource.appointments.length,
|
|
120
|
-
page: 1,
|
|
121
|
-
per_page: 10,
|
|
122
|
-
},
|
|
123
|
-
}), {
|
|
124
|
-
status: 200,
|
|
125
|
-
headers: { "Content-Type": "application/json" },
|
|
126
|
-
});
|
|
127
|
-
}),
|
|
128
|
-
],
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
render: function () {
|
|
132
|
-
var useTableConfig = __assign(__assign({}, commonUseTableConfig), { selectionType: "radio" });
|
|
133
|
-
var _a = useTable(useTableConfig), dataSource = _a.dataSource, columns = _a.columns, rowSelection = _a.rowSelection, selectedRows = _a.selectedRows;
|
|
134
|
-
if (!dataSource)
|
|
135
|
-
return null;
|
|
136
|
-
// handle changes from the table
|
|
137
|
-
var onTableChange = function (pagination, filters, sorter) {
|
|
138
|
-
console.log("Table changed:", pagination, filters, sorter);
|
|
139
|
-
};
|
|
140
|
-
useEffect(function () {
|
|
141
|
-
console.log("RadioSelection - Selected Rows:", selectedRows);
|
|
142
|
-
}, [selectedRows]);
|
|
143
|
-
return (_jsxs("div", { children: [_jsxs("div", { style: { margin: "26px 0px" }, children: [_jsx("div", { style: { margin: "16px 0px" }, children: _jsx(Typography, { variant: "heading3", children: "Radio Selection Example" }) }), _jsx(Typography, { variant: "body2", children: "Any rows with Completed status have been disabled from selection via configuration." })] }), _jsx(TablePagination, { dataSource: dataSource, columns: columns, rowSelection: rowSelection, onChange: onTableChange })] }));
|
|
144
|
-
},
|
|
145
|
-
};
|
|
146
|
-
export var MainContentCell = {
|
|
147
|
-
parameters: {
|
|
148
|
-
msw: {
|
|
149
|
-
enabled: true,
|
|
150
|
-
handlers: [
|
|
151
|
-
http.post("/table/data", function (_a) {
|
|
152
|
-
var request = _a.request;
|
|
153
|
-
return new Response(JSON.stringify({
|
|
154
|
-
data: mockDataSource.appointments,
|
|
155
|
-
pagination: {
|
|
156
|
-
count: 2,
|
|
157
|
-
page: 1,
|
|
158
|
-
pages: 1,
|
|
159
|
-
per_page: "ALL",
|
|
160
|
-
},
|
|
161
|
-
meta: {
|
|
162
|
-
total_count: mockDataSource.appointments.length,
|
|
163
|
-
page: 1,
|
|
164
|
-
per_page: 10,
|
|
165
|
-
},
|
|
166
|
-
}), {
|
|
167
|
-
status: 200,
|
|
168
|
-
headers: { "Content-Type": "application/json" },
|
|
169
|
-
});
|
|
170
|
-
}),
|
|
171
|
-
],
|
|
172
|
-
},
|
|
173
|
-
},
|
|
174
|
-
render: function () {
|
|
175
|
-
var useTableConfig = __assign(__assign({}, commonUseTableConfig), { selectionType: "radio" });
|
|
176
|
-
var _a = useTable(useTableConfig), dataSource = _a.dataSource, columns = _a.columns, rowSelection = _a.rowSelection, selectedRows = _a.selectedRows;
|
|
177
|
-
if (!dataSource)
|
|
178
|
-
return null;
|
|
179
|
-
// handle changes from the table
|
|
180
|
-
var onTableChange = function (pagination, filters, sorter) {
|
|
181
|
-
console.log("Table changed:", pagination, filters, sorter);
|
|
182
|
-
};
|
|
183
|
-
useEffect(function () {
|
|
184
|
-
console.log("RadioSelection - Selected Rows:", selectedRows);
|
|
185
|
-
}, [selectedRows]);
|
|
186
|
-
return (_jsxs("div", { children: [_jsxs("div", { style: { margin: "26px 0px" }, children: [_jsx("div", { style: { margin: "16px 0px" }, children: _jsx(Typography, { variant: "heading3", children: "Main Content Cell Example" }) }), _jsx(Typography, { variant: "body2", children: "In this example, the table cell typography is styled darker and larger than the default" })] }), _jsx(TablePagination, { dataSource: dataSource, columns: columns, rowSelection: rowSelection, onChange: onTableChange, isMainContentCell: true })] }));
|
|
187
|
-
},
|
|
188
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { screen, fireEvent } from "@testing-library/react";
|
|
3
|
-
import { customRender } from "../../../test/setup";
|
|
4
|
-
import { vi } from "vitest";
|
|
5
|
-
import Table from "../Table";
|
|
6
|
-
describe("Table component", function () {
|
|
7
|
-
var mockData = [
|
|
8
|
-
{ id: 1, name: "John Doe", age: 30 },
|
|
9
|
-
{ id: 2, name: "Jane Smith", age: 25 },
|
|
10
|
-
{ id: 3, name: "Bob Johnson", age: 40 },
|
|
11
|
-
];
|
|
12
|
-
var mockColumns = [
|
|
13
|
-
{ title: "Name", dataIndex: "name", key: "name" },
|
|
14
|
-
{ title: "Age", dataIndex: "age", key: "age" },
|
|
15
|
-
];
|
|
16
|
-
it("renders correctly with data", function () {
|
|
17
|
-
customRender(_jsx(Table, { dataSource: mockData, columns: mockColumns }));
|
|
18
|
-
expect(screen.getByTestId("Table")).toBeInTheDocument();
|
|
19
|
-
expect(screen.getByText("John Doe")).toBeInTheDocument();
|
|
20
|
-
expect(screen.getByText("Jane Smith")).toBeInTheDocument();
|
|
21
|
-
expect(screen.getByText("Bob Johnson")).toBeInTheDocument();
|
|
22
|
-
});
|
|
23
|
-
it("displays empty state when no data is provided", function () {
|
|
24
|
-
customRender(_jsx(Table, { dataSource: [], columns: mockColumns }));
|
|
25
|
-
expect(screen.getByText("No Data")).toBeInTheDocument();
|
|
26
|
-
});
|
|
27
|
-
it("handles row selection correctly", function () {
|
|
28
|
-
var onSelectionChangeMock = vi.fn();
|
|
29
|
-
customRender(_jsx(Table, { dataSource: mockData, columns: mockColumns, rowSelection: {
|
|
30
|
-
type: "checkbox",
|
|
31
|
-
onChange: onSelectionChangeMock,
|
|
32
|
-
} }));
|
|
33
|
-
// Find and click checkbox
|
|
34
|
-
var checkboxes = screen.getAllByRole("checkbox");
|
|
35
|
-
fireEvent.click(checkboxes[1]); // Select the first row checkbox (index 0 is the header)
|
|
36
|
-
expect(onSelectionChangeMock).toHaveBeenCalled();
|
|
37
|
-
});
|
|
38
|
-
it("applies custom row key correctly", function () {
|
|
39
|
-
var customData = [
|
|
40
|
-
{ key: "a", name: "John Doe", age: 30 },
|
|
41
|
-
{ key: "b", name: "Jane Smith", age: 25 },
|
|
42
|
-
];
|
|
43
|
-
customRender(_jsx(Table, { dataSource: customData, columns: mockColumns, rowKey: "key" }));
|
|
44
|
-
expect(screen.getByText("John Doe")).toBeInTheDocument();
|
|
45
|
-
expect(screen.getByText("Jane Smith")).toBeInTheDocument();
|
|
46
|
-
});
|
|
47
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
-
return cooked;
|
|
4
|
-
};
|
|
5
|
-
import styled from "@gobolt/genesis/utils/styled";
|
|
6
|
-
import { Table as AntTable } from "antd";
|
|
7
|
-
export var getGenesisClass = function (_a, $isMainContentCell) {
|
|
8
|
-
// Log the hovered color and the entire tableCell object
|
|
9
|
-
var colors = _a.colors, borderRadius = _a.borderRadius, sizing = _a.sizing, typography = _a.typography, components = _a.components;
|
|
10
|
-
return "\n &.ant-table-wrapper {\n // Add your custom styles here\n }\n\n .ant-table {\n // Add your custom table styles here\n }\n\n .ant-table-cell {\n font-size: ".concat($isMainContentCell ? "16px" : "14px", " !important;\n color: ").concat($isMainContentCell
|
|
11
|
-
? colors.onsurface.copy
|
|
12
|
-
: colors.onsurface["copy-light"], " !important;\n background-color: ").concat(components.tableCell.surface, " !important;\n transition: background-color 0.2s ease;\n }\n\n .ant-table-tbody > tr:hover > td,\n .ant-table-tbody > tr:hover > .ant-table-cell {\n background-color: ").concat(components.tableCell.hover, " !important;\n }\n\n .ant-table-cell-selected {\n background-color: ").concat(components.tableCell.selected, " !important;\n }\n\n .ant-table-thead > tr > th {\n // Add your custom header styles here\n font-family: 'Inter', sans-serif;\n font-size: ").concat($isMainContentCell ? "16px" : "14px", " !important;\n font-weight: 400;\n color: ").concat($isMainContentCell
|
|
13
|
-
? colors.onsurface.copy
|
|
14
|
-
: colors.onsurface["copy-light"], " !important;\n }\n\n .ant-table-tbody > tr {\n // Add your custom row styles here\n }\n\n .ant-table-tbody > tr > td {\n // Add your custom cell styles here\n font-family: 'Inter', sans-serif;\n font-size: 14px;\n color: ").concat(colors.onsurface["copy-light"], ";\n }\n\n .ant-table-tbody > tr.ant-table-row-selected > td,\n .ant-table-tbody > tr.ant-table-row-selected > .ant-table-cell {\n background-color: ").concat(components.tableCell.selected, " !important;\n color: #fff !important;\n }\n ");
|
|
15
|
-
};
|
|
16
|
-
export var Table = styled(AntTable)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
17
|
-
var theme = _a.theme, $isMainContentCell = _a.$isMainContentCell;
|
|
18
|
-
return getGenesisClass(theme, $isMainContentCell);
|
|
19
|
-
});
|
|
20
|
-
var templateObject_1;
|