@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,141 +0,0 @@
|
|
|
1
|
-
import { useState, useEffect, useCallback } from "react";
|
|
2
|
-
// Function to sort data by field and order
|
|
3
|
-
const sortData = (data, sorter) => {
|
|
4
|
-
// Handle case when no sorting is applied
|
|
5
|
-
if (!sorter || (Array.isArray(sorter) && sorter.length === 0)) {
|
|
6
|
-
return [...data];
|
|
7
|
-
}
|
|
8
|
-
// Handle multiple sorters
|
|
9
|
-
if (Array.isArray(sorter)) {
|
|
10
|
-
return [...data].sort((a, b) => {
|
|
11
|
-
for (const sort of sorter) {
|
|
12
|
-
if (!sort.field)
|
|
13
|
-
continue;
|
|
14
|
-
const field = sort.field;
|
|
15
|
-
const aValue = a[field];
|
|
16
|
-
const bValue = b[field];
|
|
17
|
-
if (aValue < bValue)
|
|
18
|
-
return sort.order === "ascend" ? -1 : 1;
|
|
19
|
-
if (aValue > bValue)
|
|
20
|
-
return sort.order === "ascend" ? 1 : -1;
|
|
21
|
-
}
|
|
22
|
-
return 0;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
// Handle single sorter
|
|
26
|
-
if (sorter.field) {
|
|
27
|
-
const field = sorter.field;
|
|
28
|
-
return [...data].sort((a, b) => {
|
|
29
|
-
const aValue = a[field];
|
|
30
|
-
const bValue = b[field];
|
|
31
|
-
if (sorter.order === "ascend") {
|
|
32
|
-
if (aValue < bValue)
|
|
33
|
-
return -1;
|
|
34
|
-
if (aValue > bValue)
|
|
35
|
-
return 1;
|
|
36
|
-
return 0;
|
|
37
|
-
}
|
|
38
|
-
if (sorter.order === "descend") {
|
|
39
|
-
if (aValue < bValue)
|
|
40
|
-
return 1;
|
|
41
|
-
if (aValue > bValue)
|
|
42
|
-
return -1;
|
|
43
|
-
return 0;
|
|
44
|
-
}
|
|
45
|
-
return 0;
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
return [...data];
|
|
49
|
-
};
|
|
50
|
-
/*
|
|
51
|
-
Example of disableRowSelection function which can be passed to the useTable hook
|
|
52
|
-
const disableRowSelection = (record: any) => ({
|
|
53
|
-
disabled: record.status === "completed", // Column configuration not to be checked
|
|
54
|
-
name: record.status.toString(),
|
|
55
|
-
});
|
|
56
|
-
*/
|
|
57
|
-
const defaultRowSelection = (record) => ({
|
|
58
|
-
disabled: false, // Add your disable logic here
|
|
59
|
-
name: record.id,
|
|
60
|
-
});
|
|
61
|
-
export const useTable = (useTableConfig) => {
|
|
62
|
-
const [isLoading, setLoading] = useState(true);
|
|
63
|
-
const { columns, filters = null, fetchUrl = "/table/data", fetchOptions = {
|
|
64
|
-
method: "POST",
|
|
65
|
-
headers: {
|
|
66
|
-
"Content-Type": "application/json",
|
|
67
|
-
},
|
|
68
|
-
body: JSON.stringify(filters),
|
|
69
|
-
}, selectionType = "checkbox", simulateDelay = 0, disableRowSelection = defaultRowSelection, disableAutoFetch = false, dataSource: initialDataSource = [], } = useTableConfig;
|
|
70
|
-
// State to hold the original data and the current data
|
|
71
|
-
const [originalData, setOriginalData] = useState(initialDataSource);
|
|
72
|
-
const [data, setData] = useState({
|
|
73
|
-
dataSource: initialDataSource,
|
|
74
|
-
columns,
|
|
75
|
-
error: null,
|
|
76
|
-
});
|
|
77
|
-
const [selectedRows, setSelectedRows] = useState([]);
|
|
78
|
-
// Load initial data
|
|
79
|
-
useEffect(() => {
|
|
80
|
-
// If auto-fetch is disabled and we have initial data, skip fetching
|
|
81
|
-
if (disableAutoFetch && initialDataSource.length > 0) {
|
|
82
|
-
setLoading(false);
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
const fetchData = async () => {
|
|
86
|
-
try {
|
|
87
|
-
const response = await fetch(fetchUrl, fetchOptions);
|
|
88
|
-
const result = await response.json();
|
|
89
|
-
const sourceData = result.data || [];
|
|
90
|
-
setOriginalData(sourceData);
|
|
91
|
-
setData({
|
|
92
|
-
dataSource: sourceData,
|
|
93
|
-
columns,
|
|
94
|
-
error: null,
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
catch (error) {
|
|
98
|
-
console.error("Error fetching table data:", error);
|
|
99
|
-
// Fallback to static data
|
|
100
|
-
setData({
|
|
101
|
-
dataSource: [],
|
|
102
|
-
columns,
|
|
103
|
-
error: error instanceof Error ? error : new Error(String(error)),
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
finally {
|
|
107
|
-
setLoading(false);
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
if (simulateDelay > 0) {
|
|
111
|
-
setTimeout(fetchData, simulateDelay);
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
fetchData();
|
|
115
|
-
}
|
|
116
|
-
}, [fetchOptions, disableAutoFetch, initialDataSource]);
|
|
117
|
-
const handleRowSelection = useCallback((selectedRowKeys, selectedRows) => {
|
|
118
|
-
console.log("Row Selected:", selectedRowKeys, selectedRows);
|
|
119
|
-
setSelectedRows(selectedRows);
|
|
120
|
-
}, []);
|
|
121
|
-
// Function to manually update data source (for external data fetching)
|
|
122
|
-
const updateDataSource = useCallback((newDataSource) => {
|
|
123
|
-
setOriginalData(newDataSource);
|
|
124
|
-
setData((prev) => ({
|
|
125
|
-
...prev,
|
|
126
|
-
dataSource: newDataSource,
|
|
127
|
-
}));
|
|
128
|
-
}, []);
|
|
129
|
-
const rowSelection = {
|
|
130
|
-
type: selectionType,
|
|
131
|
-
onChange: handleRowSelection,
|
|
132
|
-
getCheckboxProps: disableRowSelection,
|
|
133
|
-
};
|
|
134
|
-
return {
|
|
135
|
-
...data,
|
|
136
|
-
isLoading,
|
|
137
|
-
rowSelection,
|
|
138
|
-
selectedRows,
|
|
139
|
-
updateDataSource,
|
|
140
|
-
};
|
|
141
|
-
};
|
package/dist/components/TableWithControls/components/TableWithControls/TableWithControls.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { TableProps } from "../Table";
|
|
2
|
-
import { type TableControlsData } from "../Table/TableControls/TableControls";
|
|
3
|
-
export interface TableWithControlsProps {
|
|
4
|
-
tableControlsData: TableControlsData;
|
|
5
|
-
tableData: TableProps<Record<string, any>>;
|
|
6
|
-
onChange: (event: {
|
|
7
|
-
event: string;
|
|
8
|
-
payload: any;
|
|
9
|
-
}) => void;
|
|
10
|
-
}
|
|
11
|
-
declare const TableWithControls: ({ tableData, tableControlsData, onChange, }: TableWithControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export default TableWithControls;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import TableControls from "../Table/TableControls";
|
|
3
|
-
import Table from "../Table";
|
|
4
|
-
const TableWithControls = ({ tableData, tableControlsData, onChange, }) => {
|
|
5
|
-
const { primaryTableRowData, secondaryTableRowData } = tableControlsData;
|
|
6
|
-
const { dataSource, columns, rowSelection } = tableData;
|
|
7
|
-
// handle changes from the table controls
|
|
8
|
-
const onTableControlsChange = (event) => {
|
|
9
|
-
onChange(event);
|
|
10
|
-
};
|
|
11
|
-
// handle changes from the table
|
|
12
|
-
const onTableChange = (pagination, filters, sorter) => {
|
|
13
|
-
onChange({
|
|
14
|
-
event: "tableChange",
|
|
15
|
-
payload: { pagination, filters, sorter },
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
return (_jsxs(_Fragment, { children: [_jsx(TableControls, { primaryTableRowData: primaryTableRowData, secondaryTableRowData: secondaryTableRowData, onChange: onTableControlsChange }), _jsx(Table, { dataSource: dataSource, columns: columns, rowSelection: rowSelection, onChange: onTableChange })] }));
|
|
19
|
-
};
|
|
20
|
-
export default TableWithControls;
|
package/dist/components/TableWithControls/components/TableWithControls/useTableWithControls.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type UseTableConfig } from "../Table/useTable";
|
|
2
|
-
import { ActionEvent, TableEventPayload } from "../../types/events";
|
|
3
|
-
export declare const useTableWithControls: (tableConfig: UseTableConfig) => {
|
|
4
|
-
onChange: (actionEvent: ActionEvent<TableEventPayload>) => void;
|
|
5
|
-
primaryTableRowData: {
|
|
6
|
-
sortOptions: {
|
|
7
|
-
value: string;
|
|
8
|
-
label: import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
}[];
|
|
10
|
-
searchByPlaceholder: string;
|
|
11
|
-
isSortedAscending: boolean;
|
|
12
|
-
};
|
|
13
|
-
secondaryTableRowData: {
|
|
14
|
-
groups: {
|
|
15
|
-
orders: string[];
|
|
16
|
-
warehouse: string[];
|
|
17
|
-
availability: string[];
|
|
18
|
-
};
|
|
19
|
-
totalRecords: number;
|
|
20
|
-
};
|
|
21
|
-
dataSource: Record<string, any>[];
|
|
22
|
-
columns: import("antd").TableColumnsType<Record<string, any>>;
|
|
23
|
-
rowSelection: {
|
|
24
|
-
type: import("../Table/Table").SelectionType;
|
|
25
|
-
onChange: (selectedRowKeys: React.Key[], selectedRows: Record<string, any>[]) => void;
|
|
26
|
-
getCheckboxProps: (record: any) => unknown;
|
|
27
|
-
};
|
|
28
|
-
updateDataSource: (newDataSource: Record<string, any>[]) => void;
|
|
29
|
-
};
|
package/dist/components/TableWithControls/components/TableWithControls/useTableWithControls.js
DELETED
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { useTable } from "../Table/useTable";
|
|
4
|
-
import { mockColumns, mockDataSource } from "../Table/__mocks__/table-mocks";
|
|
5
|
-
//import
|
|
6
|
-
const tableControlsData = {
|
|
7
|
-
primaryTableRowData: {
|
|
8
|
-
sortOptions: [
|
|
9
|
-
{ value: "status", label: _jsx("span", { children: "Status" }) },
|
|
10
|
-
{ value: "address", label: _jsx("span", { children: "Address" }) },
|
|
11
|
-
{ value: "job_subtype", label: _jsx("span", { children: "Type" }) },
|
|
12
|
-
],
|
|
13
|
-
searchByPlaceholder: "Search by Address",
|
|
14
|
-
isSortedAscending: true,
|
|
15
|
-
},
|
|
16
|
-
secondaryTableRowData: {
|
|
17
|
-
groups: {
|
|
18
|
-
orders: ["Cancelled", "Paused"],
|
|
19
|
-
warehouse: ["D2C"],
|
|
20
|
-
availability: ["Out of Stock"],
|
|
21
|
-
},
|
|
22
|
-
totalRecords: mockDataSource.appointments.length,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
const startingUseTableConfig = {
|
|
26
|
-
columns: mockColumns,
|
|
27
|
-
filters: {
|
|
28
|
-
order: "asc",
|
|
29
|
-
},
|
|
30
|
-
// Disable auto-fetch to allow external data management
|
|
31
|
-
disableAutoFetch: true,
|
|
32
|
-
dataSource: [],
|
|
33
|
-
};
|
|
34
|
-
export const useTableWithControls = (tableConfig) => {
|
|
35
|
-
const [useTableConfig, setUseTableConfig] = useState(startingUseTableConfig);
|
|
36
|
-
const [groups, setGroups] = useState(tableControlsData.secondaryTableRowData.groups);
|
|
37
|
-
const [primaryTableRowData, setPrimaryTableRowData] = useState(tableControlsData.primaryTableRowData);
|
|
38
|
-
const { secondaryTableRowData } = tableControlsData;
|
|
39
|
-
const newSecondaryTableRowData = {
|
|
40
|
-
...secondaryTableRowData,
|
|
41
|
-
groups,
|
|
42
|
-
totalRecords: safeDataSource.length,
|
|
43
|
-
};
|
|
44
|
-
const { dataSource, columns, rowSelection, updateDataSource } = useTable(useTableConfig);
|
|
45
|
-
// Ensure we always return a valid object, even if dataSource is empty
|
|
46
|
-
const safeDataSource = dataSource || [];
|
|
47
|
-
const onGroupItemClick = (title, item) => {
|
|
48
|
-
const newGroups = { ...groups };
|
|
49
|
-
newGroups[title] = newGroups[title].filter((group) => group !== item);
|
|
50
|
-
setGroups(newGroups);
|
|
51
|
-
};
|
|
52
|
-
const onChange = (actionEvent) => {
|
|
53
|
-
if (actionEvent.event === "inputChange") {
|
|
54
|
-
const { value } = actionEvent.payload;
|
|
55
|
-
if (typeof value === "string") {
|
|
56
|
-
setUseTableConfig((previous) => ({
|
|
57
|
-
...previous,
|
|
58
|
-
filters: {
|
|
59
|
-
...previous.filters,
|
|
60
|
-
search: value,
|
|
61
|
-
},
|
|
62
|
-
fetchOptions: {
|
|
63
|
-
...previous.fetchOptions,
|
|
64
|
-
body: JSON.stringify({
|
|
65
|
-
filters: {
|
|
66
|
-
...previous.filters,
|
|
67
|
-
search: value,
|
|
68
|
-
},
|
|
69
|
-
}),
|
|
70
|
-
},
|
|
71
|
-
}));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
if (actionEvent.event === "primaryChange") {
|
|
75
|
-
const { value } = actionEvent.payload;
|
|
76
|
-
if (typeof value === "string") {
|
|
77
|
-
setUseTableConfig((previous) => ({
|
|
78
|
-
...previous,
|
|
79
|
-
filters: {
|
|
80
|
-
...previous.filters,
|
|
81
|
-
sort: value,
|
|
82
|
-
},
|
|
83
|
-
fetchOptions: {
|
|
84
|
-
...previous.fetchOptions,
|
|
85
|
-
body: JSON.stringify({
|
|
86
|
-
filters: {
|
|
87
|
-
...previous.filters,
|
|
88
|
-
sort: value,
|
|
89
|
-
},
|
|
90
|
-
}),
|
|
91
|
-
},
|
|
92
|
-
}));
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
if (actionEvent.event === "groupItemClick") {
|
|
96
|
-
const { title, item } = actionEvent.payload;
|
|
97
|
-
if (typeof title === "string" && typeof item === "string") {
|
|
98
|
-
onGroupItemClick(title, item);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
if (actionEvent.event === "orderClick") {
|
|
102
|
-
setPrimaryTableRowData((previous) => ({
|
|
103
|
-
...previous,
|
|
104
|
-
isSortedAscending: !previous.isSortedAscending,
|
|
105
|
-
}));
|
|
106
|
-
const { value } = actionEvent.payload;
|
|
107
|
-
if (typeof value === "string") {
|
|
108
|
-
setUseTableConfig((previous) => ({
|
|
109
|
-
...previous,
|
|
110
|
-
filters: {
|
|
111
|
-
...previous.filters,
|
|
112
|
-
order: value,
|
|
113
|
-
},
|
|
114
|
-
fetchOptions: {
|
|
115
|
-
...previous.fetchOptions,
|
|
116
|
-
body: JSON.stringify({
|
|
117
|
-
filters: {
|
|
118
|
-
...previous.filters,
|
|
119
|
-
order: value,
|
|
120
|
-
},
|
|
121
|
-
}),
|
|
122
|
-
},
|
|
123
|
-
}));
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
return {
|
|
128
|
-
onChange,
|
|
129
|
-
primaryTableRowData,
|
|
130
|
-
secondaryTableRowData: newSecondaryTableRowData,
|
|
131
|
-
dataSource: safeDataSource,
|
|
132
|
-
columns,
|
|
133
|
-
rowSelection,
|
|
134
|
-
updateDataSource,
|
|
135
|
-
};
|
|
136
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export interface TooltipProps {
|
|
2
|
-
tip: string;
|
|
3
|
-
placement?: "top" | "bottom" | "left" | "right" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
}
|
|
6
|
-
declare const Tooltip: ({ tip, children }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default Tooltip;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as S from "./styles";
|
|
3
|
-
import { Typography } from "@gobolt/genesis/components";
|
|
4
|
-
import { TYPOGRAPHY_VARIANT } from "@gobolt/genesis/constants";
|
|
5
|
-
const Tooltip = ({ tip = "", children }) => {
|
|
6
|
-
return (_jsx(S.Tooltip, { "data-testid": "Tooltip", placement: "top", title: _jsx("div", { style: { marginTop: 2 }, children: _jsx(Typography, { variant: TYPOGRAPHY_VARIANT.body2, color: "white", children: tip }) }), children: children }));
|
|
7
|
-
};
|
|
8
|
-
export default Tooltip;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./Tooltip";
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import styled from "@gobolt/genesis/utils/styled";
|
|
2
|
-
import { Tooltip as AntTooltip } from "antd";
|
|
3
|
-
export const getGenesisClass = ({ colors, borderRadius, sizing }, type = "primary", state = "active") => `
|
|
4
|
-
.ant-tooltip {
|
|
5
|
-
--antd-arrow-background-color: ${colors.surface.dark};
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.ant-tooltip-inner {
|
|
9
|
-
background-color: ${colors.surface.dark};
|
|
10
|
-
border-radius: ${borderRadius.sm};
|
|
11
|
-
padding: ${sizing.xs} ${sizing.sm};
|
|
12
|
-
font-size: 14px;
|
|
13
|
-
line-height: 20px;
|
|
14
|
-
color: ${colors.onsurface.white};
|
|
15
|
-
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.ant-tooltip-arrow-content {
|
|
19
|
-
background-color: ${colors.surface.dark};
|
|
20
|
-
}
|
|
21
|
-
`;
|
|
22
|
-
export const Tooltip = styled(AntTooltip) `
|
|
23
|
-
${({ theme, type, state }) => {
|
|
24
|
-
return getGenesisClass(theme, type, state);
|
|
25
|
-
}}
|
|
26
|
-
`;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties } from "react";
|
|
2
|
-
import { TYPE, TYPOGRAPHY_VARIANT, STATE } from "@gobolt/genesis/constants";
|
|
3
|
-
type HeadingLevel = 1 | 2 | 3 | 4 | 5;
|
|
4
|
-
export interface TypographyProps {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
variant?: keyof typeof TYPOGRAPHY_VARIANT;
|
|
7
|
-
themeType?: keyof typeof TYPE;
|
|
8
|
-
state?: keyof typeof STATE;
|
|
9
|
-
color?: string;
|
|
10
|
-
level?: HeadingLevel;
|
|
11
|
-
isText?: boolean;
|
|
12
|
-
isFullWidth?: boolean;
|
|
13
|
-
style?: CSSProperties;
|
|
14
|
-
isDisabled?: boolean;
|
|
15
|
-
}
|
|
16
|
-
declare const Typography: ({ children, themeType, variant, state, color, isText, isFullWidth, style, isDisabled, ...rest }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export default Typography;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as S from "./styles";
|
|
3
|
-
import { useGenesis } from "@gobolt/genesis/providers";
|
|
4
|
-
import { TYPE, TYPOGRAPHY_VARIANT, STATE, } from "@gobolt/genesis/constants";
|
|
5
|
-
const Typography = ({ children, themeType = TYPE.secondary, variant = TYPOGRAPHY_VARIANT.body1, state = STATE.active, color, isText = false, isFullWidth, style, isDisabled, ...rest }) => {
|
|
6
|
-
const { breakpoint } = useGenesis();
|
|
7
|
-
if (variant.startsWith("display") || variant.startsWith("heading")) {
|
|
8
|
-
const level = variant.split("heading")[1] || variant.split("display")[1];
|
|
9
|
-
return (_jsx(S.Headline, { state: state, "$themeType": themeType, variant: variant, breakpoint: breakpoint, color: color, level: Number.parseInt(level), "$isFullWidth": isFullWidth, style: style, disabled: isDisabled, ...rest, children: children }));
|
|
10
|
-
}
|
|
11
|
-
if (isText) {
|
|
12
|
-
return (_jsx(S.Text, { state: state, "$themeType": themeType, variant: variant, breakpoint: breakpoint, color: color, "$isFullWidth": isFullWidth, style: style, disabled: isDisabled, ...rest, children: children }));
|
|
13
|
-
}
|
|
14
|
-
return (_jsx(S.Paragraph, { state: state, "$themeType": themeType, variant: variant, breakpoint: breakpoint, color: color, "$isFullWidth": isFullWidth, style: style, disabled: isDisabled, ...rest, children: children }));
|
|
15
|
-
};
|
|
16
|
-
export default Typography;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./Typography";
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import styled from "@gobolt/genesis/utils/styled";
|
|
2
|
-
import { Typography as AntTypography } from "antd";
|
|
3
|
-
const getVariant = (typography, variant, breakpoint) => {
|
|
4
|
-
return `
|
|
5
|
-
font-size: ${typography[breakpoint][variant].fontSize}px !important;
|
|
6
|
-
line-height: ${typography[breakpoint][variant].lineHeight};
|
|
7
|
-
letter-spacing: ${typography[breakpoint][variant].letterSpacing}px;
|
|
8
|
-
font-weight: ${typography[breakpoint][variant].fontWeight};
|
|
9
|
-
`;
|
|
10
|
-
};
|
|
11
|
-
const getColor = (color, colors, $themeType) => {
|
|
12
|
-
if (color) {
|
|
13
|
-
return color;
|
|
14
|
-
}
|
|
15
|
-
return colors[$themeType].active.color;
|
|
16
|
-
};
|
|
17
|
-
const getFontFamily = (variant) => {
|
|
18
|
-
return `
|
|
19
|
-
${variant.includes("digits")
|
|
20
|
-
? "'Roboto Mono', sans-serif"
|
|
21
|
-
: "'Inter', sans-serif"} !important;
|
|
22
|
-
`;
|
|
23
|
-
};
|
|
24
|
-
const getGenesisTypographyClass = ({ colors, typography }, $themeType, variant, state, breakpoint, color, $isFullWidth) => `
|
|
25
|
-
&.ant-typography {
|
|
26
|
-
font-family: ${getFontFamily(variant)};
|
|
27
|
-
color: ${getColor(color, colors, $themeType)} !important;
|
|
28
|
-
${getVariant(typography, variant, breakpoint)}
|
|
29
|
-
margin-bottom: 0 !important;
|
|
30
|
-
width: ${$isFullWidth ? "100%" : "auto"};
|
|
31
|
-
line-height: 1;
|
|
32
|
-
|
|
33
|
-
&:disabled {
|
|
34
|
-
color: ${colors.status.disabled.default} !important;
|
|
35
|
-
userSelect: none;
|
|
36
|
-
cursor: not-allowed;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
`;
|
|
40
|
-
export const Headline = styled(AntTypography.Title) `
|
|
41
|
-
${({ theme, $themeType, variant, state, breakpoint, color, $isFullWidth, }) => {
|
|
42
|
-
return getGenesisTypographyClass(theme, $themeType, variant, state, breakpoint, color, $isFullWidth);
|
|
43
|
-
}}
|
|
44
|
-
`;
|
|
45
|
-
export const Paragraph = styled(AntTypography.Paragraph) `
|
|
46
|
-
${({ theme, $themeType, variant, state, breakpoint, color, $isFullWidth, }) => {
|
|
47
|
-
return getGenesisTypographyClass(theme, $themeType, variant, state, breakpoint, color, $isFullWidth);
|
|
48
|
-
}}
|
|
49
|
-
`;
|
|
50
|
-
export const Text = styled(AntTypography.Text) `
|
|
51
|
-
${({ theme, $themeType, variant, state, breakpoint, color, $isFullWidth, }) => {
|
|
52
|
-
return getGenesisTypographyClass(theme, $themeType, variant, state, breakpoint, color, $isFullWidth);
|
|
53
|
-
}}
|
|
54
|
-
`;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ButtonProps } from "../Button";
|
|
2
|
-
export interface UtilityButtonProps extends Omit<ButtonProps, "themeType"> {
|
|
3
|
-
}
|
|
4
|
-
declare const UtilityButton: ({ children, onClick, state, isIconButton, size, ...rest }: UtilityButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export default UtilityButton;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import Button from "../Button";
|
|
3
|
-
import { TYPE } from "../../constants";
|
|
4
|
-
const UtilityButton = ({ children, onClick, state = "active", isIconButton = false, size = "normal", ...rest }) => {
|
|
5
|
-
const buttonState = state === "active" || state === "disabled" ? state : "active";
|
|
6
|
-
const themeType = TYPE.utility;
|
|
7
|
-
return (_jsx(Button, { onClick: onClick, themeType: themeType, state: buttonState, disabled: state === "disabled" || rest.disabled, isIconButton: isIconButton, size: size, ...rest, children: children }));
|
|
8
|
-
};
|
|
9
|
-
export default UtilityButton;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./UtilityButton";
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useGenesis } from "@gobolt/genesis/providers";
|
|
3
|
-
const DropdownChevron = (properties) => {
|
|
4
|
-
const { theme } = useGenesis();
|
|
5
|
-
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: 20, height: 20, fill: "none", ...properties, children: _jsx("path", { fill: "#222", fillRule: "evenodd", d: "M5.293 7.293a1 1 0 0 1 1.414 0L10 10.586l3.293-3.293a1 1 0 1 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 0-1.414Z", clipRule: "evenodd" }) }));
|
|
6
|
-
};
|
|
7
|
-
export default DropdownChevron;
|