@gobolt/genesis 0.3.25 → 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,174 +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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
6
|
-
var t = {};
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
8
|
-
t[p] = s[p];
|
|
9
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
10
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
11
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
12
|
-
t[p[i]] = s[p[i]];
|
|
13
|
-
}
|
|
14
|
-
return t;
|
|
15
|
-
};
|
|
16
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
17
|
-
import styled from "styled-components";
|
|
18
|
-
import { PaginationNumber } from "./PaginationNumber";
|
|
19
|
-
export var PaginationStyle;
|
|
20
|
-
(function (PaginationStyle) {
|
|
21
|
-
PaginationStyle["SIMPLE"] = "simple";
|
|
22
|
-
PaginationStyle["TRUNCATED"] = "truncated";
|
|
23
|
-
PaginationStyle["CENTERED"] = "centered";
|
|
24
|
-
PaginationStyle["END_FOCUSED"] = "endFocused";
|
|
25
|
-
})(PaginationStyle || (PaginationStyle = {}));
|
|
26
|
-
var PaginationContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n margin: 0;\n gap: 0 0;\n"], ["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n margin: 0;\n gap: 0 0;\n"])));
|
|
27
|
-
var ChevronButton = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: transparent;\n border: none;\n color: ", ";\n font-size: 32px;\n height: 40px;\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: ", ";\n margin-right: ", ";\n margin-left: ", ";\n transition: color 0.2s;\n"], ["\n background: transparent;\n border: none;\n color: ", ";\n font-size: 32px;\n height: 40px;\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: ", ";\n margin-right: ", ";\n margin-left: ", ";\n transition: color 0.2s;\n"])), function (_a) {
|
|
28
|
-
var theme = _a.theme, disabled = _a.disabled;
|
|
29
|
-
return disabled ? theme.colors.onsurface["copy-light"] || "#B0B0B0" : "#222";
|
|
30
|
-
}, function (_a) {
|
|
31
|
-
var disabled = _a.disabled;
|
|
32
|
-
return (disabled ? "not-allowed" : "pointer");
|
|
33
|
-
}, function (_a) {
|
|
34
|
-
var $right = _a.$right;
|
|
35
|
-
return ($right ? "0" : "8px");
|
|
36
|
-
}, function (_a) {
|
|
37
|
-
var $right = _a.$right;
|
|
38
|
-
return ($right ? "8px" : "0");
|
|
39
|
-
});
|
|
40
|
-
var ChevronIcon = function (_a) {
|
|
41
|
-
var _b = _a.left, left = _b === void 0 ? false : _b;
|
|
42
|
-
return (_jsx("svg", { width: "28", height: "28", viewBox: "0 0 28 28", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: left ? "M17.5 21L11.5 14L17.5 7" : "M10.5 7L16.5 14L10.5 21", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
43
|
-
};
|
|
44
|
-
var getSimplePages = function (current, total) {
|
|
45
|
-
// Always show 1-5, but don't exceed total
|
|
46
|
-
var pages = [];
|
|
47
|
-
for (var index = 1; index <= Math.min(5, total); index++) {
|
|
48
|
-
pages.push(index);
|
|
49
|
-
}
|
|
50
|
-
return pages;
|
|
51
|
-
};
|
|
52
|
-
var CustomPagination = function (_a) {
|
|
53
|
-
var _b = _a.paginationStyle, paginationStyle = _b === void 0 ? PaginationStyle.SIMPLE : _b, _c = _a.current, current = _c === void 0 ? 1 : _c, _d = _a.total, total = _d === void 0 ? 1 : _d, _e = _a.pageSize, pageSize = _e === void 0 ? 10 : _e, onChange = _a.onChange, properties = __rest(_a, ["paginationStyle", "current", "total", "pageSize", "onChange"]);
|
|
54
|
-
var pageCount = Math.ceil(total / pageSize);
|
|
55
|
-
var handleChange = function (page) {
|
|
56
|
-
if (onChange)
|
|
57
|
-
onChange(page, pageSize);
|
|
58
|
-
};
|
|
59
|
-
if (paginationStyle === PaginationStyle.SIMPLE) {
|
|
60
|
-
var pages = getSimplePages(current, pageCount);
|
|
61
|
-
return (_jsxs(PaginationContainer, { children: [_jsx(ChevronButton, { onClick: function () { return handleChange(current - 1); }, disabled: current === 1, "aria-label": "Previous Page", children: _jsx(ChevronIcon, { left: true }) }), pages.map(function (number_) { return (_jsx(PaginationNumber, { active: number_ === current, onClick: function () { return handleChange(number_); }, "aria-label": "Page ".concat(number_), children: number_ }, number_)); }), _jsx(ChevronButton, { onClick: function () { return handleChange(current + 1); }, disabled: current === pageCount, "aria-label": "Next Page", "$right": true, children: _jsx(ChevronIcon, {}) })] }));
|
|
62
|
-
}
|
|
63
|
-
if (paginationStyle === PaginationStyle.TRUNCATED) {
|
|
64
|
-
// Show 1 2 3 4 5 ... last
|
|
65
|
-
var pages = [];
|
|
66
|
-
for (var index = 1; index <= Math.min(5, pageCount); index++) {
|
|
67
|
-
pages.push(index);
|
|
68
|
-
}
|
|
69
|
-
return (_jsxs(PaginationContainer, { children: [_jsx(ChevronButton, { onClick: function () { return handleChange(current - 1); }, disabled: current === 1, "aria-label": "Previous Page", children: _jsx(ChevronIcon, { left: true }) }), pages.map(function (number_) { return (_jsx(PaginationNumber, { active: number_ === current, onClick: function () { return handleChange(number_); }, "aria-label": "Page ".concat(number_), children: number_ }, number_)); }), pageCount > 5 && (_jsxs(_Fragment, { children: [_jsx("span", { style: {
|
|
70
|
-
color: "#7F7F7F",
|
|
71
|
-
fontWeight: 600,
|
|
72
|
-
fontSize: 16,
|
|
73
|
-
margin: "0 8px",
|
|
74
|
-
display: "flex",
|
|
75
|
-
alignItems: "center",
|
|
76
|
-
justifyContent: "center",
|
|
77
|
-
paddingBottom: 10,
|
|
78
|
-
}, children: "..." }), _jsx(PaginationNumber, { active: current === pageCount, onClick: function () { return handleChange(pageCount); }, "aria-label": "Page ".concat(pageCount), children: pageCount }, pageCount)] })), _jsx(ChevronButton, { onClick: function () { return handleChange(current + 1); }, disabled: current === pageCount, "aria-label": "Next Page", "$right": true, children: _jsx(ChevronIcon, {}) })] }));
|
|
79
|
-
}
|
|
80
|
-
if (paginationStyle === PaginationStyle.CENTERED) {
|
|
81
|
-
// Show 1 ... left mid mid mid mid ... last
|
|
82
|
-
// Always show 5 numbers, current centered if possible
|
|
83
|
-
var pages = [];
|
|
84
|
-
var visibleCount = 5;
|
|
85
|
-
var sideCount = 2; // numbers to show on each side of current
|
|
86
|
-
var start = Math.max(2, current - 2);
|
|
87
|
-
var end = Math.min(pageCount - 1, current + 2);
|
|
88
|
-
// Adjust if near the start
|
|
89
|
-
if (current <= 3) {
|
|
90
|
-
start = 2;
|
|
91
|
-
end = 6;
|
|
92
|
-
}
|
|
93
|
-
// Adjust if near the end
|
|
94
|
-
if (current >= pageCount - 2) {
|
|
95
|
-
start = pageCount - 4;
|
|
96
|
-
end = pageCount - 1;
|
|
97
|
-
}
|
|
98
|
-
start = Math.max(2, start);
|
|
99
|
-
end = Math.min(pageCount - 1, end);
|
|
100
|
-
// Always show first page
|
|
101
|
-
pages.push(1);
|
|
102
|
-
// Show left ellipsis if needed
|
|
103
|
-
if (start > 2) {
|
|
104
|
-
pages.push("left-ellipsis");
|
|
105
|
-
}
|
|
106
|
-
// Show middle pages
|
|
107
|
-
for (var index = start; index <= end; index++) {
|
|
108
|
-
pages.push(index);
|
|
109
|
-
}
|
|
110
|
-
// Show right ellipsis if needed
|
|
111
|
-
if (end < pageCount - 1) {
|
|
112
|
-
pages.push("right-ellipsis");
|
|
113
|
-
}
|
|
114
|
-
// Always show last page if more than 1
|
|
115
|
-
if (pageCount > 1) {
|
|
116
|
-
pages.push(pageCount);
|
|
117
|
-
}
|
|
118
|
-
return (_jsxs(PaginationContainer, { children: [_jsx(ChevronButton, { onClick: function () { return handleChange(current - 1); }, disabled: current === 1, "aria-label": "Previous Page", children: _jsx(ChevronIcon, { left: true }) }), pages.map(function (number_, index) {
|
|
119
|
-
if (number_ === "left-ellipsis" || number_ === "right-ellipsis") {
|
|
120
|
-
return (_jsx("span", { style: {
|
|
121
|
-
color: "#7F7F7FB0",
|
|
122
|
-
fontWeight: 600,
|
|
123
|
-
fontSize: 16,
|
|
124
|
-
margin: "0 8px",
|
|
125
|
-
height: "40px",
|
|
126
|
-
display: "flex",
|
|
127
|
-
alignItems: "center",
|
|
128
|
-
justifyContent: "center",
|
|
129
|
-
paddingBottom: 10,
|
|
130
|
-
}, children: "..." }, number_ + index));
|
|
131
|
-
}
|
|
132
|
-
return (_jsx(PaginationNumber, { active: number_ === current, onClick: function () {
|
|
133
|
-
return typeof number_ === "number" && handleChange(number_);
|
|
134
|
-
}, "aria-label": "Page ".concat(number_), children: number_ }, number_));
|
|
135
|
-
}), _jsx(ChevronButton, { onClick: function () { return handleChange(current + 1); }, disabled: current === pageCount, "aria-label": "Next Page", "$right": true, children: _jsx(ChevronIcon, {}) })] }));
|
|
136
|
-
}
|
|
137
|
-
if (paginationStyle === PaginationStyle.END_FOCUSED) {
|
|
138
|
-
// Show 1 ... last 5 pages
|
|
139
|
-
var pages = [];
|
|
140
|
-
// Always show first page
|
|
141
|
-
pages.push(1);
|
|
142
|
-
// If more than 6 pages, show ellipsis
|
|
143
|
-
if (pageCount > 6) {
|
|
144
|
-
pages.push("left-ellipsis");
|
|
145
|
-
}
|
|
146
|
-
// Show last 5 pages
|
|
147
|
-
var start = Math.max(2, pageCount - 4);
|
|
148
|
-
for (var index = start; index <= pageCount; index++) {
|
|
149
|
-
pages.push(index);
|
|
150
|
-
}
|
|
151
|
-
return (_jsxs(PaginationContainer, { children: [_jsx(ChevronButton, { onClick: function () { return handleChange(current - 1); }, disabled: current === 1, "aria-label": "Previous Page", children: _jsx(ChevronIcon, { left: true }) }), pages.map(function (number_, index) {
|
|
152
|
-
if (number_ === "left-ellipsis") {
|
|
153
|
-
return (_jsx("span", { style: {
|
|
154
|
-
color: "#7F7F7F",
|
|
155
|
-
fontWeight: 600,
|
|
156
|
-
fontSize: 18,
|
|
157
|
-
margin: "0 8px",
|
|
158
|
-
display: "flex",
|
|
159
|
-
alignItems: "center",
|
|
160
|
-
justifyContent: "center",
|
|
161
|
-
height: "40px",
|
|
162
|
-
paddingBottom: 10,
|
|
163
|
-
}, children: "..." }, number_ + index));
|
|
164
|
-
}
|
|
165
|
-
return (_jsx(PaginationNumber, { active: number_ === current, onClick: function () {
|
|
166
|
-
return typeof number_ === "number" && handleChange(number_);
|
|
167
|
-
}, "aria-label": "Page ".concat(number_), children: number_ }, number_));
|
|
168
|
-
}), _jsx(ChevronButton, { onClick: function () { return handleChange(current + 1); }, disabled: current === pageCount, "aria-label": "Next Page", "$right": true, children: _jsx(ChevronIcon, {}) })] }));
|
|
169
|
-
}
|
|
170
|
-
// Fallback for other styles (not implemented yet)
|
|
171
|
-
return null;
|
|
172
|
-
};
|
|
173
|
-
export default CustomPagination;
|
|
174
|
-
var templateObject_1, templateObject_2;
|
|
@@ -1,46 +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
|
-
var __assign = (this && this.__assign) || function () {
|
|
6
|
-
__assign = Object.assign || function(t) {
|
|
7
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
-
s = arguments[i];
|
|
9
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
-
t[p] = s[p];
|
|
11
|
-
}
|
|
12
|
-
return t;
|
|
13
|
-
};
|
|
14
|
-
return __assign.apply(this, arguments);
|
|
15
|
-
};
|
|
16
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
17
|
-
var t = {};
|
|
18
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
-
t[p] = s[p];
|
|
20
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
-
t[p[i]] = s[p[i]];
|
|
24
|
-
}
|
|
25
|
-
return t;
|
|
26
|
-
};
|
|
27
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
|
-
import styled from "styled-components";
|
|
29
|
-
import Typography from "../../Typography";
|
|
30
|
-
var NumberButton = styled.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n border: none;\n border-radius: 4px;\n min-width: 24px;\n height: 24px;\n padding: 4px 7px;\n font-size: 16px;\n font-weight: 600;\n margin: 0 4px;\n cursor: pointer;\n transition: background 0.2s, color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: inherit;\n white-space: nowrap;\n\n &:hover {\n background: ", ";\n color: #fff;\n }\n"], ["\n background: ", ";\n color: ", ";\n border: none;\n border-radius: 4px;\n min-width: 24px;\n height: 24px;\n padding: 4px 7px;\n font-size: 16px;\n font-weight: 600;\n margin: 0 4px;\n cursor: pointer;\n transition: background 0.2s, color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: inherit;\n white-space: nowrap;\n\n &:hover {\n background: ", ";\n color: #fff;\n }\n"])), function (_a) {
|
|
31
|
-
var $active = _a.$active, theme = _a.theme;
|
|
32
|
-
return $active ? theme.colors.primary.default.backgroundColor : "transparent";
|
|
33
|
-
}, function (_a) {
|
|
34
|
-
var $active = _a.$active, theme = _a.theme;
|
|
35
|
-
return $active ? "#fff" : theme.colors.onsurface["copy-light"] || "#6C6C6C";
|
|
36
|
-
}, function (_a) {
|
|
37
|
-
var $active = _a.$active, theme = _a.theme;
|
|
38
|
-
return $active
|
|
39
|
-
? theme.colors.primary.default.backgroundColor
|
|
40
|
-
: theme.colors.primary.default.backgroundColor + "22";
|
|
41
|
-
});
|
|
42
|
-
export var PaginationNumber = function (_a) {
|
|
43
|
-
var active = _a.active, children = _a.children, properties = __rest(_a, ["active", "children"]);
|
|
44
|
-
return (_jsx(NumberButton, __assign({ "$active": active, "aria-current": active ? "page" : undefined }, properties, { children: _jsx(Typography, { variant: "digits3", color: active ? "white" : "#6C6C6C", children: children }) })));
|
|
45
|
-
};
|
|
46
|
-
var templateObject_1;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import UtilityButton from "../../UtilityButton";
|
|
3
|
-
import IconButton from "../../Button/IconButton";
|
|
4
|
-
import Select from "../../Select";
|
|
5
|
-
import Typography from "../../Typography";
|
|
6
|
-
import Input from "../../Input";
|
|
7
|
-
import { HiMiniAdjustmentsVertical } from "react-icons/hi2";
|
|
8
|
-
import { HiSearch } from "react-icons/hi";
|
|
9
|
-
import { HiOutlineSortAscending, HiOutlineSortDescending, } from "react-icons/hi";
|
|
10
|
-
import { FiSettings } from "react-icons/fi";
|
|
11
|
-
var PrimaryTableControlsRow = function (_a) {
|
|
12
|
-
var sortOptions = _a.sortOptions, _b = _a.searchByPlaceholder, searchByPlaceholder = _b === void 0 ? "" : _b, _c = _a.searchField, searchField = _c === void 0 ? "address" : _c, _d = _a.isSortedAscending, isSortedAscending = _d === void 0 ? true : _d, _e = _a.searchValue, searchValue = _e === void 0 ? "" : _e, _f = _a.selectedSortOption, selectedSortOption = _f === void 0 ? "" : _f, onChange = _a.onChange;
|
|
13
|
-
var onInputChange = function (actionEvent) {
|
|
14
|
-
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
15
|
-
event: "inputChange",
|
|
16
|
-
payload: actionEvent.payload,
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
var onSortChange = function (value) {
|
|
20
|
-
var sortActionEvent = {
|
|
21
|
-
event: "primarySortChange",
|
|
22
|
-
payload: { value: value },
|
|
23
|
-
};
|
|
24
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(sortActionEvent);
|
|
25
|
-
};
|
|
26
|
-
var onFilterClick = function () {
|
|
27
|
-
var filterActionEvent = {
|
|
28
|
-
event: "filterClick",
|
|
29
|
-
payload: {},
|
|
30
|
-
};
|
|
31
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(filterActionEvent);
|
|
32
|
-
};
|
|
33
|
-
var onSettingsClick = function () {
|
|
34
|
-
var settingsActionEvent = {
|
|
35
|
-
event: "settingsClick",
|
|
36
|
-
payload: {},
|
|
37
|
-
};
|
|
38
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(settingsActionEvent);
|
|
39
|
-
};
|
|
40
|
-
var onOrderClick = function () {
|
|
41
|
-
var ascendingActionEvent = {
|
|
42
|
-
event: "orderClick",
|
|
43
|
-
payload: {
|
|
44
|
-
value: isSortedAscending ? "desc" : "asc",
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(ascendingActionEvent);
|
|
48
|
-
};
|
|
49
|
-
return (_jsxs("div", { style: {
|
|
50
|
-
display: "flex",
|
|
51
|
-
justifyContent: "space-between",
|
|
52
|
-
alignItems: "center",
|
|
53
|
-
width: "100%",
|
|
54
|
-
minWidth: 800,
|
|
55
|
-
marginBottom: 16,
|
|
56
|
-
}, children: [_jsxs("div", { style: { display: "flex" }, children: [_jsx(Input, { size: "normal", placeholder: searchByPlaceholder, prefix: _jsx(HiSearch, {}), style: {
|
|
57
|
-
padding: "5px 8px",
|
|
58
|
-
}, value: searchValue, onChange: onInputChange }), onFilterClick && (_jsx("div", { style: { marginLeft: 16 }, children: _jsx(UtilityButton, { isIconButton: true, icon: _jsx(HiMiniAdjustmentsVertical, { color: "#222222" }), onClick: onFilterClick }) })), onSettingsClick && (_jsx("div", { style: { marginLeft: 16 }, children: _jsx(UtilityButton, { isIconButton: true, icon: _jsx(FiSettings, { color: "#222222" }), onClick: onSettingsClick }) }))] }), _jsxs("div", { style: {
|
|
59
|
-
display: "flex",
|
|
60
|
-
alignItems: "center",
|
|
61
|
-
width: 300,
|
|
62
|
-
justifyContent: "flex-end",
|
|
63
|
-
marginLeft: "auto",
|
|
64
|
-
}, children: [_jsx(Typography, { variant: "body1", color: "#6C6C6C", style: {
|
|
65
|
-
width: 70,
|
|
66
|
-
flexShrink: 0,
|
|
67
|
-
textAlign: "right",
|
|
68
|
-
paddingRight: 4,
|
|
69
|
-
marginRight: 8,
|
|
70
|
-
}, children: "Sort by" }), sortOptions && onSortChange ? (_jsx(Select, { options: sortOptions, defaultValue: sortOptions[0].value, value: selectedSortOption, variant: "simple", onChange: onSortChange, style: {
|
|
71
|
-
width: 180,
|
|
72
|
-
flexShrink: 0,
|
|
73
|
-
} })) : null, _jsx("div", { style: {
|
|
74
|
-
marginLeft: 8,
|
|
75
|
-
flexShrink: 0,
|
|
76
|
-
}, children: _jsx(IconButton, { icon: isSortedAscending ? (_jsx(HiOutlineSortDescending, { size: 20 })) : (_jsx(HiOutlineSortAscending, { size: 20 })), onClick: onOrderClick }) })] })] }));
|
|
77
|
-
};
|
|
78
|
-
export default PrimaryTableControlsRow;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
2
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
3
|
-
if (!m) return o;
|
|
4
|
-
var i = m.call(o), r, ar = [], e;
|
|
5
|
-
try {
|
|
6
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
7
|
-
}
|
|
8
|
-
catch (error) { e = { error: error }; }
|
|
9
|
-
finally {
|
|
10
|
-
try {
|
|
11
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
12
|
-
}
|
|
13
|
-
finally { if (e) throw e.error; }
|
|
14
|
-
}
|
|
15
|
-
return ar;
|
|
16
|
-
};
|
|
17
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
-
import Badge from "../../Badge";
|
|
19
|
-
import Typography from "../../Typography";
|
|
20
|
-
import Tooltip from "../../Tooltip";
|
|
21
|
-
import { getIcon } from "../../../utils/icon-util";
|
|
22
|
-
var GroupItem = function (_a) {
|
|
23
|
-
var title = _a.title, items = _a.items, onGroupItemClick = _a.onGroupItemClick;
|
|
24
|
-
if (items.length === 0)
|
|
25
|
-
return null;
|
|
26
|
-
return (_jsxs(_Fragment, { children: [_jsx(Tooltip, { tip: title, children: _jsx("div", { style: {
|
|
27
|
-
display: "flex",
|
|
28
|
-
justifyContent: "center",
|
|
29
|
-
alignItems: "center",
|
|
30
|
-
width: 24,
|
|
31
|
-
height: 24,
|
|
32
|
-
}, children: getIcon(title) }) }), _jsx("div", { style: { display: "flex", gap: 4 }, children: items.map(function (item) { return (_jsx(Badge, { label: item, hasClose: true, state: "generic", size: "small", onClick: function () { return onGroupItemClick(title, item); } }, item.toString())); }) })] }));
|
|
33
|
-
};
|
|
34
|
-
var GroupsRow = function (_a) {
|
|
35
|
-
var groups = _a.groups, onGroupItemClick = _a.onGroupItemClick;
|
|
36
|
-
if (!groups)
|
|
37
|
-
return null;
|
|
38
|
-
var groupArray = Object.entries(groups).map(function (_a) {
|
|
39
|
-
var _b = __read(_a, 2), title = _b[0], items = _b[1];
|
|
40
|
-
return ({
|
|
41
|
-
title: title,
|
|
42
|
-
items: items,
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
return (_jsx("div", { style: { display: "flex", gap: 4 }, children: groupArray.length > 0
|
|
46
|
-
? groupArray.map(function (group) { return (_jsx(GroupItem, { title: group.title, items: group.items, onGroupItemClick: onGroupItemClick }, group.title)); })
|
|
47
|
-
: null }));
|
|
48
|
-
};
|
|
49
|
-
var SecondaryTableControlsRow = function (_a) {
|
|
50
|
-
var groups = _a.groups, totalRecords = _a.totalRecords, onChange = _a.onChange;
|
|
51
|
-
var onGroupItemClick = function (title, item) {
|
|
52
|
-
var groupItemClickEvent = {
|
|
53
|
-
event: "groupItemClick",
|
|
54
|
-
payload: { title: title, item: item },
|
|
55
|
-
};
|
|
56
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(groupItemClickEvent);
|
|
57
|
-
};
|
|
58
|
-
return (_jsxs("div", { style: {
|
|
59
|
-
display: "flex",
|
|
60
|
-
justifyContent: "space-between",
|
|
61
|
-
alignItems: "flex-end",
|
|
62
|
-
marginTop: 8,
|
|
63
|
-
}, children: [_jsx(GroupsRow, { groups: groups, onGroupItemClick: onGroupItemClick }), totalRecords > 0 ? (_jsx(Typography, { variant: "body2", color: "#6C6C6C", children: "".concat(totalRecords, " results") })) : null] }));
|
|
64
|
-
};
|
|
65
|
-
export default SecondaryTableControlsRow;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import PrimaryTableControlsRow from "./PrimaryTableControlsRow";
|
|
3
|
-
import SecondaryTableControlsRow from "./SecondaryTableControlsRow";
|
|
4
|
-
var TableControls = function (_a) {
|
|
5
|
-
var primaryTableRowData = _a.primaryTableRowData, secondaryTableRowData = _a.secondaryTableRowData, onChange = _a.onChange;
|
|
6
|
-
var onPrimaryChange = function (actionEvent) {
|
|
7
|
-
onChange(actionEvent);
|
|
8
|
-
};
|
|
9
|
-
var onSecondaryChange = function (actionEvent) {
|
|
10
|
-
onChange(actionEvent);
|
|
11
|
-
};
|
|
12
|
-
return (_jsxs("div", { "data-testid": "TableControls", style: { margin: "16px 0px" }, children: [_jsx(PrimaryTableControlsRow, { sortOptions: primaryTableRowData.sortOptions, searchByPlaceholder: primaryTableRowData.searchByPlaceholder, isSortedAscending: primaryTableRowData.isSortedAscending, onChange: onPrimaryChange, searchValue: primaryTableRowData.searchValue, selectedSortOption: primaryTableRowData.selectedSortOption }), secondaryTableRowData ? (_jsx(SecondaryTableControlsRow, { groups: secondaryTableRowData.groups, totalRecords: secondaryTableRowData.totalRecords, onChange: onSecondaryChange })) : null] }));
|
|
13
|
-
};
|
|
14
|
-
export default TableControls;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import PrimaryTableControlsRow from "./PrimaryTableControlsRow";
|
|
2
|
-
import SecondaryTableControlsRow from "./SecondaryTableControlsRow";
|
|
3
|
-
import type { PrimaryTableControlsRowProps } from "./PrimaryTableControlsRow";
|
|
4
|
-
import type { SecondaryTableControlsRowProps } from "./SecondaryTableControlsRow";
|
|
5
|
-
import type { ActionEvent, TableEventPayload } from "../../../types/events";
|
|
6
|
-
|
|
7
|
-
export type TableControlsData = {
|
|
8
|
-
primaryTableRowData: PrimaryTableControlsRowProps;
|
|
9
|
-
secondaryTableRowData?: SecondaryTableControlsRowProps;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export interface TableControlsProps {
|
|
13
|
-
primaryTableRowData: PrimaryTableControlsRowProps;
|
|
14
|
-
secondaryTableRowData?: SecondaryTableControlsRowProps;
|
|
15
|
-
onChange: (event: ActionEvent<TableEventPayload>) => void;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const TableControls = ({
|
|
19
|
-
primaryTableRowData,
|
|
20
|
-
secondaryTableRowData,
|
|
21
|
-
onChange,
|
|
22
|
-
}: TableControlsProps) => {
|
|
23
|
-
const onPrimaryChange = (actionEvent: ActionEvent<TableEventPayload>) => {
|
|
24
|
-
onChange(actionEvent);
|
|
25
|
-
};
|
|
26
|
-
const onSecondaryChange = (actionEvent: ActionEvent<TableEventPayload>) => {
|
|
27
|
-
onChange(actionEvent);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
<div data-testid="TableControls" style={{ margin: "16px 0px" }}>
|
|
32
|
-
<PrimaryTableControlsRow
|
|
33
|
-
sortOptions={primaryTableRowData.sortOptions}
|
|
34
|
-
searchByPlaceholder={primaryTableRowData.searchByPlaceholder}
|
|
35
|
-
isSortedAscending={primaryTableRowData.isSortedAscending}
|
|
36
|
-
onChange={onPrimaryChange}
|
|
37
|
-
searchValue={primaryTableRowData.searchValue}
|
|
38
|
-
selectedSortOption={primaryTableRowData.selectedSortOption}
|
|
39
|
-
/>
|
|
40
|
-
{secondaryTableRowData ? (
|
|
41
|
-
<SecondaryTableControlsRow
|
|
42
|
-
groups={secondaryTableRowData.groups}
|
|
43
|
-
totalRecords={secondaryTableRowData.totalRecords}
|
|
44
|
-
onChange={onSecondaryChange}
|
|
45
|
-
/>
|
|
46
|
-
) : null}
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export default TableControls;
|
package/dist/components/Table/TableControls/__stories__/CustomPaginationStandalone.stories.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import CustomPagination from "../CustomPagination";
|
|
3
|
-
declare const meta: Meta<typeof CustomPagination>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof CustomPagination>;
|
|
6
|
-
export declare const Simple: Story;
|
|
7
|
-
export declare const Truncated: Story;
|
|
8
|
-
export declare const Centered: Story;
|
|
9
|
-
export declare const EndFocused: Story;
|
package/dist/components/Table/TableControls/__stories__/CustomPaginationStandalone.stories.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
2
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
3
|
-
if (!m) return o;
|
|
4
|
-
var i = m.call(o), r, ar = [], e;
|
|
5
|
-
try {
|
|
6
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
7
|
-
}
|
|
8
|
-
catch (error) { e = { error: error }; }
|
|
9
|
-
finally {
|
|
10
|
-
try {
|
|
11
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
12
|
-
}
|
|
13
|
-
finally { if (e) throw e.error; }
|
|
14
|
-
}
|
|
15
|
-
return ar;
|
|
16
|
-
};
|
|
17
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
-
import { useState } from "react";
|
|
19
|
-
import CustomPagination, { PaginationStyle } from "../CustomPagination";
|
|
20
|
-
import description from "./CustomPaginationDescription.md?raw";
|
|
21
|
-
var meta = {
|
|
22
|
-
title: "Components/Table/CustomPagination",
|
|
23
|
-
component: CustomPagination,
|
|
24
|
-
tags: ["autodocs"],
|
|
25
|
-
parameters: {
|
|
26
|
-
layout: "centered",
|
|
27
|
-
docs: {
|
|
28
|
-
description: {
|
|
29
|
-
component: description,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
export default meta;
|
|
35
|
-
export var Simple = {
|
|
36
|
-
render: function () {
|
|
37
|
-
var _a = __read(useState(1), 2), current = _a[0], setCurrent = _a[1];
|
|
38
|
-
return (_jsx(CustomPagination, { paginationStyle: PaginationStyle.SIMPLE, current: current, total: 50, pageSize: 10, onChange: setCurrent }));
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
export var Truncated = {
|
|
42
|
-
render: function () {
|
|
43
|
-
var _a = __read(useState(1), 2), current = _a[0], setCurrent = _a[1];
|
|
44
|
-
return (_jsx(CustomPagination, { paginationStyle: PaginationStyle.TRUNCATED, current: current, total: 200, pageSize: 10, onChange: setCurrent }));
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
export var Centered = {
|
|
48
|
-
render: function () {
|
|
49
|
-
var _a = __read(useState(6), 2), current = _a[0], setCurrent = _a[1];
|
|
50
|
-
return (_jsx(CustomPagination, { paginationStyle: PaginationStyle.CENTERED, current: current, total: 200, pageSize: 10, onChange: setCurrent }));
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
export var EndFocused = {
|
|
54
|
-
render: function () {
|
|
55
|
-
var _a = __read(useState(20), 2), current = _a[0], setCurrent = _a[1];
|
|
56
|
-
return (_jsx(CustomPagination, { paginationStyle: PaginationStyle.END_FOCUSED, current: current, total: 200, pageSize: 10, onChange: setCurrent }));
|
|
57
|
-
},
|
|
58
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PaginationNumber } from "../PaginationNumber";
|
|
2
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
-
declare const meta: Meta<typeof PaginationNumber>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof PaginationNumber>;
|
|
6
|
-
export declare const ActiveAndInactive: Story;
|
|
7
|
-
export declare const Interactive: Story;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
2
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
3
|
-
if (!m) return o;
|
|
4
|
-
var i = m.call(o), r, ar = [], e;
|
|
5
|
-
try {
|
|
6
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
7
|
-
}
|
|
8
|
-
catch (error) { e = { error: error }; }
|
|
9
|
-
finally {
|
|
10
|
-
try {
|
|
11
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
12
|
-
}
|
|
13
|
-
finally { if (e) throw e.error; }
|
|
14
|
-
}
|
|
15
|
-
return ar;
|
|
16
|
-
};
|
|
17
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
-
import { useState } from "react";
|
|
19
|
-
import { PaginationNumber } from "../PaginationNumber";
|
|
20
|
-
var meta = {
|
|
21
|
-
title: "Components/Table/PaginationNumber",
|
|
22
|
-
component: PaginationNumber,
|
|
23
|
-
tags: ["autodocs"],
|
|
24
|
-
parameters: {
|
|
25
|
-
layout: "centered",
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
export default meta;
|
|
29
|
-
export var ActiveAndInactive = {
|
|
30
|
-
render: function () { return (_jsxs("div", { style: { display: "flex", gap: 4 }, children: [_jsx(PaginationNumber, { active: true, children: "1" }), _jsx(PaginationNumber, { children: "2" })] })); },
|
|
31
|
-
};
|
|
32
|
-
export var Interactive = {
|
|
33
|
-
render: function () {
|
|
34
|
-
var _a = __read(useState(1), 2), active = _a[0], setActive = _a[1];
|
|
35
|
-
return (_jsx("div", { style: { display: "flex", gap: 4 }, children: [1, 2, 3, 4, 5].map(function (number_) { return (_jsx(PaginationNumber, { active: active === number_, onClick: function () { return setActive(number_); }, children: number_ }, number_)); }) }));
|
|
36
|
-
},
|
|
37
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import TableControls from "../TableControls";
|
|
3
|
-
declare const meta: Meta<typeof TableControls>;
|
|
4
|
-
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof TableControls>;
|
|
6
|
-
export declare const TableControlsStory: Story;
|