@gobolt/genesis 0.3.26 → 0.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- 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 +31 -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/common-settings.d.ts +75 -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 +4 -2
- 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 +6 -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 +7 -5
- 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/Tooltip.d.ts +6 -1
- 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 +84795 -0
- package/dist/index.d.ts +6 -10
- package/dist/index.js +84778 -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 -79
- package/dist/styles/theme/index.d.ts +2 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/utils/user-util.d.ts +2 -0
- package/package.json +25 -31
- 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.d.ts +0 -706
- 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,163 +0,0 @@
|
|
|
1
|
-
export declare const TYPE: {
|
|
2
|
-
primary: string;
|
|
3
|
-
secondary: string;
|
|
4
|
-
tertiary: string;
|
|
5
|
-
destructive: string;
|
|
6
|
-
utility: string;
|
|
7
|
-
icon: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const BREAKPOINTS: {
|
|
10
|
-
wide: string;
|
|
11
|
-
medium: string;
|
|
12
|
-
narrow: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const STATE: {
|
|
15
|
-
active: string;
|
|
16
|
-
hover: string;
|
|
17
|
-
pressed: string;
|
|
18
|
-
focussed: string;
|
|
19
|
-
disabled: string;
|
|
20
|
-
error: string;
|
|
21
|
-
success: string;
|
|
22
|
-
warning: string;
|
|
23
|
-
progress: string;
|
|
24
|
-
info: string;
|
|
25
|
-
filled: string;
|
|
26
|
-
generic: string;
|
|
27
|
-
removed: string;
|
|
28
|
-
hollow: string;
|
|
29
|
-
};
|
|
30
|
-
export declare const TYPOGRAPHY_VARIANT: {
|
|
31
|
-
display1: string;
|
|
32
|
-
display2: string;
|
|
33
|
-
display3: string;
|
|
34
|
-
heading1: string;
|
|
35
|
-
heading2: string;
|
|
36
|
-
heading3: string;
|
|
37
|
-
subHeading1: string;
|
|
38
|
-
subHeading2: string;
|
|
39
|
-
subHeading3: string;
|
|
40
|
-
body1: string;
|
|
41
|
-
body2: string;
|
|
42
|
-
body3: string;
|
|
43
|
-
body4: string;
|
|
44
|
-
body5: string;
|
|
45
|
-
message: string;
|
|
46
|
-
overline1: string;
|
|
47
|
-
overline2: string;
|
|
48
|
-
overline3: string;
|
|
49
|
-
label1: string;
|
|
50
|
-
label2: string;
|
|
51
|
-
label3: string;
|
|
52
|
-
link1: string;
|
|
53
|
-
link2: string;
|
|
54
|
-
link3: string;
|
|
55
|
-
digits1: string;
|
|
56
|
-
digits2: string;
|
|
57
|
-
digits3: string;
|
|
58
|
-
};
|
|
59
|
-
export declare const BUTTON_VARIANT: {
|
|
60
|
-
primary: string;
|
|
61
|
-
secondary: string;
|
|
62
|
-
tertiary: string;
|
|
63
|
-
};
|
|
64
|
-
export declare const SIZE: {
|
|
65
|
-
small: string;
|
|
66
|
-
medium: string;
|
|
67
|
-
large: string;
|
|
68
|
-
standard: string;
|
|
69
|
-
};
|
|
70
|
-
export declare const BADGE: {
|
|
71
|
-
appointment: string;
|
|
72
|
-
asn: string;
|
|
73
|
-
inventory: string;
|
|
74
|
-
parcel: string;
|
|
75
|
-
product: string;
|
|
76
|
-
route: string;
|
|
77
|
-
shipment: string;
|
|
78
|
-
shoppingCart: string;
|
|
79
|
-
system: string;
|
|
80
|
-
};
|
|
81
|
-
declare const _default: {
|
|
82
|
-
TYPE: {
|
|
83
|
-
primary: string;
|
|
84
|
-
secondary: string;
|
|
85
|
-
tertiary: string;
|
|
86
|
-
destructive: string;
|
|
87
|
-
utility: string;
|
|
88
|
-
icon: string;
|
|
89
|
-
};
|
|
90
|
-
BREAKPOINTS: {
|
|
91
|
-
wide: string;
|
|
92
|
-
medium: string;
|
|
93
|
-
narrow: string;
|
|
94
|
-
};
|
|
95
|
-
STATE: {
|
|
96
|
-
active: string;
|
|
97
|
-
hover: string;
|
|
98
|
-
pressed: string;
|
|
99
|
-
focussed: string;
|
|
100
|
-
disabled: string;
|
|
101
|
-
error: string;
|
|
102
|
-
success: string;
|
|
103
|
-
warning: string;
|
|
104
|
-
progress: string;
|
|
105
|
-
info: string;
|
|
106
|
-
filled: string;
|
|
107
|
-
generic: string;
|
|
108
|
-
removed: string;
|
|
109
|
-
hollow: string;
|
|
110
|
-
};
|
|
111
|
-
TYPOGRAPHY_VARIANT: {
|
|
112
|
-
display1: string;
|
|
113
|
-
display2: string;
|
|
114
|
-
display3: string;
|
|
115
|
-
heading1: string;
|
|
116
|
-
heading2: string;
|
|
117
|
-
heading3: string;
|
|
118
|
-
subHeading1: string;
|
|
119
|
-
subHeading2: string;
|
|
120
|
-
subHeading3: string;
|
|
121
|
-
body1: string;
|
|
122
|
-
body2: string;
|
|
123
|
-
body3: string;
|
|
124
|
-
body4: string;
|
|
125
|
-
body5: string;
|
|
126
|
-
message: string;
|
|
127
|
-
overline1: string;
|
|
128
|
-
overline2: string;
|
|
129
|
-
overline3: string;
|
|
130
|
-
label1: string;
|
|
131
|
-
label2: string;
|
|
132
|
-
label3: string;
|
|
133
|
-
link1: string;
|
|
134
|
-
link2: string;
|
|
135
|
-
link3: string;
|
|
136
|
-
digits1: string;
|
|
137
|
-
digits2: string;
|
|
138
|
-
digits3: string;
|
|
139
|
-
};
|
|
140
|
-
BUTTON_VARIANT: {
|
|
141
|
-
primary: string;
|
|
142
|
-
secondary: string;
|
|
143
|
-
tertiary: string;
|
|
144
|
-
};
|
|
145
|
-
SIZE: {
|
|
146
|
-
small: string;
|
|
147
|
-
medium: string;
|
|
148
|
-
large: string;
|
|
149
|
-
standard: string;
|
|
150
|
-
};
|
|
151
|
-
BADGE: {
|
|
152
|
-
appointment: string;
|
|
153
|
-
asn: string;
|
|
154
|
-
inventory: string;
|
|
155
|
-
parcel: string;
|
|
156
|
-
product: string;
|
|
157
|
-
route: string;
|
|
158
|
-
shipment: string;
|
|
159
|
-
shoppingCart: string;
|
|
160
|
-
system: string;
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
export default _default;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
export const TYPE = {
|
|
2
|
-
primary: "primary",
|
|
3
|
-
secondary: "secondary",
|
|
4
|
-
tertiary: "tertiary",
|
|
5
|
-
destructive: "destructive",
|
|
6
|
-
utility: "utility",
|
|
7
|
-
icon: "icon",
|
|
8
|
-
};
|
|
9
|
-
export const BREAKPOINTS = {
|
|
10
|
-
wide: "wide",
|
|
11
|
-
medium: "medium",
|
|
12
|
-
narrow: "narrow",
|
|
13
|
-
};
|
|
14
|
-
export const STATE = {
|
|
15
|
-
active: "active",
|
|
16
|
-
hover: "hover",
|
|
17
|
-
pressed: "pressed",
|
|
18
|
-
focussed: "focus",
|
|
19
|
-
disabled: "disabled",
|
|
20
|
-
error: "error",
|
|
21
|
-
success: "success",
|
|
22
|
-
warning: "warning",
|
|
23
|
-
progress: "progress",
|
|
24
|
-
info: "info",
|
|
25
|
-
filled: "filled",
|
|
26
|
-
generic: "generic",
|
|
27
|
-
removed: "removed",
|
|
28
|
-
hollow: "hollow",
|
|
29
|
-
};
|
|
30
|
-
export const TYPOGRAPHY_VARIANT = {
|
|
31
|
-
display1: "display1",
|
|
32
|
-
display2: "display2",
|
|
33
|
-
display3: "display3",
|
|
34
|
-
heading1: "heading1",
|
|
35
|
-
heading2: "heading2",
|
|
36
|
-
heading3: "heading3",
|
|
37
|
-
subHeading1: "subHeading1",
|
|
38
|
-
subHeading2: "subHeading2",
|
|
39
|
-
subHeading3: "subHeading3",
|
|
40
|
-
body1: "body1",
|
|
41
|
-
body2: "body2",
|
|
42
|
-
body3: "body3",
|
|
43
|
-
body4: "body4",
|
|
44
|
-
body5: "body5",
|
|
45
|
-
message: "message",
|
|
46
|
-
overline1: "overline1",
|
|
47
|
-
overline2: "overline2",
|
|
48
|
-
overline3: "overline3",
|
|
49
|
-
label1: "label1",
|
|
50
|
-
label2: "label2",
|
|
51
|
-
label3: "label3",
|
|
52
|
-
link1: "link1",
|
|
53
|
-
link2: "link2",
|
|
54
|
-
link3: "link3",
|
|
55
|
-
digits1: "digits1",
|
|
56
|
-
digits2: "digits2",
|
|
57
|
-
digits3: "digits3",
|
|
58
|
-
};
|
|
59
|
-
export const BUTTON_VARIANT = {
|
|
60
|
-
primary: "primary",
|
|
61
|
-
secondary: "secondary",
|
|
62
|
-
tertiary: "tertiary",
|
|
63
|
-
};
|
|
64
|
-
export const SIZE = {
|
|
65
|
-
small: "small",
|
|
66
|
-
medium: "medium",
|
|
67
|
-
large: "large",
|
|
68
|
-
standard: "standard",
|
|
69
|
-
};
|
|
70
|
-
export const BADGE = {
|
|
71
|
-
appointment: "appointment",
|
|
72
|
-
asn: "asn",
|
|
73
|
-
inventory: "inventory",
|
|
74
|
-
parcel: "parcel",
|
|
75
|
-
product: "product",
|
|
76
|
-
route: "route",
|
|
77
|
-
shipment: "shipment",
|
|
78
|
-
shoppingCart: "shopping cart",
|
|
79
|
-
system: "system",
|
|
80
|
-
};
|
|
81
|
-
export default {
|
|
82
|
-
TYPE,
|
|
83
|
-
BREAKPOINTS,
|
|
84
|
-
STATE,
|
|
85
|
-
TYPOGRAPHY_VARIANT,
|
|
86
|
-
BUTTON_VARIANT,
|
|
87
|
-
SIZE,
|
|
88
|
-
BADGE,
|
|
89
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface BaseEventPayload {
|
|
2
|
-
value: string;
|
|
3
|
-
}
|
|
4
|
-
export interface TableEventPayload {
|
|
5
|
-
title?: string;
|
|
6
|
-
item?: unknown;
|
|
7
|
-
value?: string | number;
|
|
8
|
-
}
|
|
9
|
-
export interface ActionEvent<T = Record<string, unknown>> {
|
|
10
|
-
event?: string;
|
|
11
|
-
payload: T;
|
|
12
|
-
type?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface FilterChangeEvent {
|
|
15
|
-
id: string;
|
|
16
|
-
label: string;
|
|
17
|
-
type: string;
|
|
18
|
-
value: string;
|
|
19
|
-
onChange: (event: ActionEvent) => void;
|
|
20
|
-
}
|
|
21
|
-
export interface InputEvent extends ActionEvent<BaseEventPayload> {
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
13
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
14
|
-
if (!m) return o;
|
|
15
|
-
var i = m.call(o), r, ar = [], e;
|
|
16
|
-
try {
|
|
17
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
18
|
-
}
|
|
19
|
-
catch (error) { e = { error: error }; }
|
|
20
|
-
finally {
|
|
21
|
-
try {
|
|
22
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
23
|
-
}
|
|
24
|
-
finally { if (e) throw e.error; }
|
|
25
|
-
}
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
29
|
-
import { useState } from "react";
|
|
30
|
-
import { useTable } from "../Table/useTable";
|
|
31
|
-
import { mockColumns, mockDataSource } from "../Table/__mocks__/table-mocks";
|
|
32
|
-
//import
|
|
33
|
-
var tableControlsData = {
|
|
34
|
-
primaryTableRowData: {
|
|
35
|
-
sortOptions: [
|
|
36
|
-
{ value: "status", label: _jsx("span", { children: "Status" }) },
|
|
37
|
-
{ value: "address", label: _jsx("span", { children: "Address" }) },
|
|
38
|
-
{ value: "job_subtype", label: _jsx("span", { children: "Type" }) },
|
|
39
|
-
],
|
|
40
|
-
searchByPlaceholder: "Search by Address",
|
|
41
|
-
isSortedAscending: true,
|
|
42
|
-
},
|
|
43
|
-
secondaryTableRowData: {
|
|
44
|
-
groups: {
|
|
45
|
-
orders: ["Cancelled", "Paused"],
|
|
46
|
-
warehouse: ["D2C"],
|
|
47
|
-
availability: ["Out of Stock"],
|
|
48
|
-
},
|
|
49
|
-
totalRecords: mockDataSource.appointments.length,
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
var startingUseTableConfig = {
|
|
53
|
-
columns: mockColumns,
|
|
54
|
-
filters: {
|
|
55
|
-
order: "asc",
|
|
56
|
-
},
|
|
57
|
-
// Disable auto-fetch to allow external data management
|
|
58
|
-
disableAutoFetch: true,
|
|
59
|
-
dataSource: [],
|
|
60
|
-
};
|
|
61
|
-
export var useTableWithControls = function (tableConfig) {
|
|
62
|
-
var _a = __read(useState(startingUseTableConfig), 2), useTableConfig = _a[0], setUseTableConfig = _a[1];
|
|
63
|
-
var _b = __read(useState(tableControlsData.secondaryTableRowData.groups), 2), groups = _b[0], setGroups = _b[1];
|
|
64
|
-
var _c = __read(useState(tableControlsData.primaryTableRowData), 2), primaryTableRowData = _c[0], setPrimaryTableRowData = _c[1];
|
|
65
|
-
var secondaryTableRowData = tableControlsData.secondaryTableRowData;
|
|
66
|
-
var newSecondaryTableRowData = __assign(__assign({}, secondaryTableRowData), { groups: groups, totalRecords: safeDataSource.length });
|
|
67
|
-
var _d = useTable(useTableConfig), dataSource = _d.dataSource, columns = _d.columns, rowSelection = _d.rowSelection, updateDataSource = _d.updateDataSource;
|
|
68
|
-
// Ensure we always return a valid object, even if dataSource is empty
|
|
69
|
-
var safeDataSource = dataSource || [];
|
|
70
|
-
var onGroupItemClick = function (title, item) {
|
|
71
|
-
var newGroups = __assign({}, groups);
|
|
72
|
-
newGroups[title] = newGroups[title].filter(function (group) { return group !== item; });
|
|
73
|
-
setGroups(newGroups);
|
|
74
|
-
};
|
|
75
|
-
var onChange = function (actionEvent) {
|
|
76
|
-
if (actionEvent.event === "inputChange") {
|
|
77
|
-
var value_1 = actionEvent.payload.value;
|
|
78
|
-
if (typeof value_1 === "string") {
|
|
79
|
-
setUseTableConfig(function (previous) { return (__assign(__assign({}, previous), { filters: __assign(__assign({}, previous.filters), { search: value_1 }), fetchOptions: __assign(__assign({}, previous.fetchOptions), { body: JSON.stringify({
|
|
80
|
-
filters: __assign(__assign({}, previous.filters), { search: value_1 }),
|
|
81
|
-
}) }) })); });
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
if (actionEvent.event === "primaryChange") {
|
|
85
|
-
var value_2 = actionEvent.payload.value;
|
|
86
|
-
if (typeof value_2 === "string") {
|
|
87
|
-
setUseTableConfig(function (previous) { return (__assign(__assign({}, previous), { filters: __assign(__assign({}, previous.filters), { sort: value_2 }), fetchOptions: __assign(__assign({}, previous.fetchOptions), { body: JSON.stringify({
|
|
88
|
-
filters: __assign(__assign({}, previous.filters), { sort: value_2 }),
|
|
89
|
-
}) }) })); });
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
if (actionEvent.event === "groupItemClick") {
|
|
93
|
-
var _a = actionEvent.payload, title = _a.title, item = _a.item;
|
|
94
|
-
if (typeof title === "string" && typeof item === "string") {
|
|
95
|
-
onGroupItemClick(title, item);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
if (actionEvent.event === "orderClick") {
|
|
99
|
-
setPrimaryTableRowData(function (previous) { return (__assign(__assign({}, previous), { isSortedAscending: !previous.isSortedAscending })); });
|
|
100
|
-
var value_3 = actionEvent.payload.value;
|
|
101
|
-
if (typeof value_3 === "string") {
|
|
102
|
-
setUseTableConfig(function (previous) { return (__assign(__assign({}, previous), { filters: __assign(__assign({}, previous.filters), { order: value_3 }), fetchOptions: __assign(__assign({}, previous.fetchOptions), { body: JSON.stringify({
|
|
103
|
-
filters: __assign(__assign({}, previous.filters), { order: value_3 }),
|
|
104
|
-
}) }) })); });
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
return {
|
|
109
|
-
onChange: onChange,
|
|
110
|
-
primaryTableRowData: primaryTableRowData,
|
|
111
|
-
secondaryTableRowData: newSecondaryTableRowData,
|
|
112
|
-
dataSource: safeDataSource,
|
|
113
|
-
columns: columns,
|
|
114
|
-
rowSelection: rowSelection,
|
|
115
|
-
updateDataSource: updateDataSource,
|
|
116
|
-
};
|
|
117
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const getIcon: (name: string) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
-
export declare const getIconColor: (state: any, theme: any) => any;
|
|
3
|
-
export declare const getBadgeStateIcon: (state: any, color: any, isFilled?: boolean, hasIcon?: boolean, customIcon?: any) => any;
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { STATE } from "@gobolt/genesis/constants";
|
|
3
|
-
const iconSize = 18;
|
|
4
|
-
// check circle filled & outline
|
|
5
|
-
import { FaCircleCheck } from "react-icons/fa6";
|
|
6
|
-
import { HiOutlineCheckCircle } from "react-icons/hi";
|
|
7
|
-
// info circle filled & outline
|
|
8
|
-
import { PiInfoFill, PiInfo } from "react-icons/pi";
|
|
9
|
-
// error circle filled & outline
|
|
10
|
-
import { HiXCircle } from "react-icons/hi";
|
|
11
|
-
import { HiOutlineXCircle } from "react-icons/hi";
|
|
12
|
-
// warning circle filled & outline
|
|
13
|
-
import { HiExclamationCircle } from "react-icons/hi";
|
|
14
|
-
import { HiOutlineExclamationCircle } from "react-icons/hi";
|
|
15
|
-
// minus circle filled & outline
|
|
16
|
-
import { HiMinusCircle } from "react-icons/hi";
|
|
17
|
-
import { HiOutlineMinusCircle } from "react-icons/hi";
|
|
18
|
-
// clock circle filled & outline
|
|
19
|
-
import { HiClock } from "react-icons/hi";
|
|
20
|
-
import { HiOutlineClock } from "react-icons/hi";
|
|
21
|
-
import { HiOutlineGlobe } from "react-icons/hi";
|
|
22
|
-
import { TbFiles } from "react-icons/tb";
|
|
23
|
-
import { LuTag } from "react-icons/lu";
|
|
24
|
-
export const getIcon = (name) => {
|
|
25
|
-
switch (name.toLowerCase()) {
|
|
26
|
-
case "orders": {
|
|
27
|
-
return _jsx(LuTag, {});
|
|
28
|
-
}
|
|
29
|
-
case "warehouse": {
|
|
30
|
-
return _jsx(HiOutlineGlobe, {});
|
|
31
|
-
}
|
|
32
|
-
case "availability": {
|
|
33
|
-
return _jsx(TbFiles, {});
|
|
34
|
-
}
|
|
35
|
-
default: {
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
export const getIconColor = (state, theme) => {
|
|
41
|
-
switch (state) {
|
|
42
|
-
case STATE.error: {
|
|
43
|
-
return theme.colors.status.error.onsurface;
|
|
44
|
-
}
|
|
45
|
-
case STATE.success: {
|
|
46
|
-
return theme.colors.status.success.onsurface;
|
|
47
|
-
}
|
|
48
|
-
case STATE.warning: {
|
|
49
|
-
return theme.colors.status.warning.default;
|
|
50
|
-
}
|
|
51
|
-
case STATE.removed: {
|
|
52
|
-
return theme.colors.status.generic.default;
|
|
53
|
-
}
|
|
54
|
-
case STATE.progress: {
|
|
55
|
-
return theme.colors.timebox.evening.default;
|
|
56
|
-
}
|
|
57
|
-
case STATE.info:
|
|
58
|
-
default: {
|
|
59
|
-
return theme.colors.status.info.onsurface;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
export const getBadgeStateIcon = (state, color, isFilled = true, hasIcon = true, customIcon = null) => {
|
|
64
|
-
if (!state || !hasIcon) {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
if (customIcon) {
|
|
68
|
-
return customIcon;
|
|
69
|
-
}
|
|
70
|
-
if (!isFilled) {
|
|
71
|
-
switch (state) {
|
|
72
|
-
// isFilled is false
|
|
73
|
-
case STATE.warning: {
|
|
74
|
-
return _jsx(HiOutlineExclamationCircle, { size: iconSize, style: { color } });
|
|
75
|
-
}
|
|
76
|
-
case STATE.error: {
|
|
77
|
-
return _jsx(HiOutlineXCircle, { size: iconSize, style: { color } });
|
|
78
|
-
}
|
|
79
|
-
case STATE.success: {
|
|
80
|
-
return _jsx(HiOutlineCheckCircle, { size: iconSize, style: { color } });
|
|
81
|
-
}
|
|
82
|
-
case STATE.progress: {
|
|
83
|
-
return _jsx(HiOutlineClock, { size: iconSize, style: { color } });
|
|
84
|
-
}
|
|
85
|
-
case STATE.removed: {
|
|
86
|
-
return _jsx(HiOutlineMinusCircle, { size: iconSize, style: { color } });
|
|
87
|
-
}
|
|
88
|
-
case STATE.info:
|
|
89
|
-
default: {
|
|
90
|
-
return _jsx(PiInfo, { size: iconSize, style: { color } });
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
switch (state) {
|
|
95
|
-
// isFilled is true
|
|
96
|
-
case STATE.warning: {
|
|
97
|
-
return _jsx(HiExclamationCircle, { size: iconSize, style: { color } });
|
|
98
|
-
}
|
|
99
|
-
case STATE.error: {
|
|
100
|
-
return _jsx(HiXCircle, { size: iconSize, style: { color } });
|
|
101
|
-
}
|
|
102
|
-
case STATE.success: {
|
|
103
|
-
return _jsx(FaCircleCheck, { size: iconSize, style: { color } });
|
|
104
|
-
}
|
|
105
|
-
case STATE.progress: {
|
|
106
|
-
return _jsx(HiClock, { size: iconSize, style: { color } });
|
|
107
|
-
}
|
|
108
|
-
case STATE.removed: {
|
|
109
|
-
return _jsx(HiMinusCircle, { size: iconSize, style: { color } });
|
|
110
|
-
}
|
|
111
|
-
case STATE.info:
|
|
112
|
-
default: {
|
|
113
|
-
return _jsx(PiInfoFill, { size: iconSize, style: { color } });
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
};
|
|
@@ -1,9 +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
|
-
var Tooltip = function (_a) {
|
|
6
|
-
var _b = _a.tip, tip = _b === void 0 ? "" : _b, children = _a.children;
|
|
7
|
-
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 }));
|
|
8
|
-
};
|
|
9
|
-
export default Tooltip;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./Tooltip";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
-
return cooked;
|
|
4
|
-
};
|
|
5
|
-
import styled from "@gobolt/genesis/utils/styled";
|
|
6
|
-
import { Tooltip as AntTooltip } from "antd";
|
|
7
|
-
export var getGenesisClass = function (_a, type, state) {
|
|
8
|
-
var colors = _a.colors, borderRadius = _a.borderRadius, sizing = _a.sizing;
|
|
9
|
-
if (type === void 0) { type = "primary"; }
|
|
10
|
-
if (state === void 0) { state = "active"; }
|
|
11
|
-
return "\n .ant-tooltip {\n --antd-arrow-background-color: ".concat(colors.surface.dark, ";\n }\n\n .ant-tooltip-inner {\n background-color: ").concat(colors.surface.dark, ";\n border-radius: ").concat(borderRadius.sm, ";\n padding: ").concat(sizing.xs, " ").concat(sizing.sm, ";\n font-size: 14px;\n line-height: 20px;\n color: ").concat(colors.onsurface.white, ";\n box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);\n }\n\n .ant-tooltip-arrow-content {\n background-color: ").concat(colors.surface.dark, ";\n }\n");
|
|
12
|
-
};
|
|
13
|
-
export var Tooltip = styled(AntTooltip)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
14
|
-
var theme = _a.theme, type = _a.type, state = _a.state;
|
|
15
|
-
return getGenesisClass(theme, type, state);
|
|
16
|
-
});
|
|
17
|
-
var templateObject_1;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import * as S from "./styles";
|
|
25
|
-
import { useGenesis } from "@gobolt/genesis/providers";
|
|
26
|
-
import { TYPE, TYPOGRAPHY_VARIANT, STATE, } from "@gobolt/genesis/constants";
|
|
27
|
-
var Typography = function (_a) {
|
|
28
|
-
var children = _a.children, _b = _a.themeType, themeType = _b === void 0 ? TYPE.secondary : _b, _c = _a.variant, variant = _c === void 0 ? TYPOGRAPHY_VARIANT.body1 : _c, _d = _a.state, state = _d === void 0 ? STATE.active : _d, color = _a.color, _e = _a.isText, isText = _e === void 0 ? false : _e, isFullWidth = _a.isFullWidth, style = _a.style, isDisabled = _a.isDisabled, rest = __rest(_a, ["children", "themeType", "variant", "state", "color", "isText", "isFullWidth", "style", "isDisabled"]);
|
|
29
|
-
var breakpoint = useGenesis().breakpoint;
|
|
30
|
-
if (variant.startsWith("display") || variant.startsWith("heading")) {
|
|
31
|
-
var level = variant.split("heading")[1] || variant.split("display")[1];
|
|
32
|
-
return (_jsx(S.Headline, __assign({ state: state, "$themeType": themeType, variant: variant, breakpoint: breakpoint, color: color, level: Number.parseInt(level), "$isFullWidth": isFullWidth, style: style, disabled: isDisabled }, rest, { children: children })));
|
|
33
|
-
}
|
|
34
|
-
if (isText) {
|
|
35
|
-
return (_jsx(S.Text, __assign({ state: state, "$themeType": themeType, variant: variant, breakpoint: breakpoint, color: color, "$isFullWidth": isFullWidth, style: style, disabled: isDisabled }, rest, { children: children })));
|
|
36
|
-
}
|
|
37
|
-
return (_jsx(S.Paragraph, __assign({ state: state, "$themeType": themeType, variant: variant, breakpoint: breakpoint, color: color, "$isFullWidth": isFullWidth, style: style, disabled: isDisabled }, rest, { children: children })));
|
|
38
|
-
};
|
|
39
|
-
export default Typography;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./Typography";
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
-
return cooked;
|
|
4
|
-
};
|
|
5
|
-
import styled from "@gobolt/genesis/utils/styled";
|
|
6
|
-
import { Typography as AntTypography } from "antd";
|
|
7
|
-
var getVariant = function (typography, variant, breakpoint) {
|
|
8
|
-
return "\n font-size: ".concat(typography[breakpoint][variant].fontSize, "px !important;\n line-height: ").concat(typography[breakpoint][variant].lineHeight, ";\n letter-spacing: ").concat(typography[breakpoint][variant].letterSpacing, "px;\n font-weight: ").concat(typography[breakpoint][variant].fontWeight, ";\n ");
|
|
9
|
-
};
|
|
10
|
-
var getColor = function (color, colors, $themeType) {
|
|
11
|
-
if (color) {
|
|
12
|
-
return color;
|
|
13
|
-
}
|
|
14
|
-
return colors[$themeType].active.color;
|
|
15
|
-
};
|
|
16
|
-
var getFontFamily = function (variant) {
|
|
17
|
-
return "\n ".concat(variant.includes("digits")
|
|
18
|
-
? "'Roboto Mono', sans-serif"
|
|
19
|
-
: "'Inter', sans-serif", " !important;\n ");
|
|
20
|
-
};
|
|
21
|
-
var getGenesisTypographyClass = function (_a, $themeType, variant, state, breakpoint, color, $isFullWidth) {
|
|
22
|
-
var colors = _a.colors, typography = _a.typography;
|
|
23
|
-
return "\n &.ant-typography {\n font-family: ".concat(getFontFamily(variant), ";\n color: ").concat(getColor(color, colors, $themeType), " !important;\n ").concat(getVariant(typography, variant, breakpoint), "\n margin-bottom: 0 !important;\n width: ").concat($isFullWidth ? "100%" : "auto", ";\n line-height: 1;\n\n &:disabled {\n color: ").concat(colors.status.disabled.default, " !important;\n userSelect: none;\n cursor: not-allowed;\n }\n } \n");
|
|
24
|
-
};
|
|
25
|
-
export var Headline = styled(AntTypography.Title)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
26
|
-
var theme = _a.theme, $themeType = _a.$themeType, variant = _a.variant, state = _a.state, breakpoint = _a.breakpoint, color = _a.color, $isFullWidth = _a.$isFullWidth;
|
|
27
|
-
return getGenesisTypographyClass(theme, $themeType, variant, state, breakpoint, color, $isFullWidth);
|
|
28
|
-
});
|
|
29
|
-
export var Paragraph = styled(AntTypography.Paragraph)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
30
|
-
var theme = _a.theme, $themeType = _a.$themeType, variant = _a.variant, state = _a.state, breakpoint = _a.breakpoint, color = _a.color, $isFullWidth = _a.$isFullWidth;
|
|
31
|
-
return getGenesisTypographyClass(theme, $themeType, variant, state, breakpoint, color, $isFullWidth);
|
|
32
|
-
});
|
|
33
|
-
export var Text = styled(AntTypography.Text)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
34
|
-
var theme = _a.theme, $themeType = _a.$themeType, variant = _a.variant, state = _a.state, breakpoint = _a.breakpoint, color = _a.color, $isFullWidth = _a.$isFullWidth;
|
|
35
|
-
return getGenesisTypographyClass(theme, $themeType, variant, state, breakpoint, color, $isFullWidth);
|
|
36
|
-
});
|
|
37
|
-
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import Button from "../Button";
|
|
25
|
-
import { TYPE } from "../../constants";
|
|
26
|
-
var UtilityButton = function (_a) {
|
|
27
|
-
var children = _a.children, onClick = _a.onClick, _b = _a.state, state = _b === void 0 ? "active" : _b, _c = _a.isIconButton, isIconButton = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? "normal" : _d, rest = __rest(_a, ["children", "onClick", "state", "isIconButton", "size"]);
|
|
28
|
-
var buttonState = state === "active" || state === "disabled" ? state : "active";
|
|
29
|
-
var themeType = TYPE.utility;
|
|
30
|
-
return (_jsx(Button, __assign({ onClick: onClick, themeType: themeType, state: buttonState, disabled: state === "disabled" || rest.disabled, isIconButton: isIconButton, size: size }, rest, { children: children })));
|
|
31
|
-
};
|
|
32
|
-
export default UtilityButton;
|