@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,16 +0,0 @@
|
|
|
1
|
-
import React, { MouseEvent } from "react";
|
|
2
|
-
import type { ButtonProps as AntButtonProperties } from "antd/es/button";
|
|
3
|
-
import { STATE } from "../../constants";
|
|
4
|
-
type ButtonThemeType = "primary" | "secondary" | "tertiary" | "destructive" | "utility" | "icon";
|
|
5
|
-
export interface ButtonProps extends Omit<AntButtonProperties, "type" | "size"> {
|
|
6
|
-
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
themeType?: ButtonThemeType;
|
|
9
|
-
state?: keyof typeof STATE;
|
|
10
|
-
isIconButton?: boolean;
|
|
11
|
-
size?: "small" | "normal" | "large";
|
|
12
|
-
isSelected?: boolean;
|
|
13
|
-
icon?: React.ReactNode;
|
|
14
|
-
}
|
|
15
|
-
declare const Button: React.FC<ButtonProps>;
|
|
16
|
-
export default Button;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as S from "./styles";
|
|
3
|
-
const getState = (state, isSelected) => {
|
|
4
|
-
if (isSelected) {
|
|
5
|
-
return "selected";
|
|
6
|
-
}
|
|
7
|
-
return state === "active" || state === "disabled" ? state : "active";
|
|
8
|
-
};
|
|
9
|
-
const Button = ({ children, onClick, themeType = "primary", state = "active", isIconButton = false, size = "normal", isSelected, ...rest }) => {
|
|
10
|
-
const buttonState = getState(state, isSelected);
|
|
11
|
-
return (_jsx(S.Button, { onClick: onClick, "$themeType": themeType, "$state": buttonState, disabled: state === "disabled" || rest.disabled, "$isIconButton": isIconButton, size: size, ...rest, children: children }));
|
|
12
|
-
};
|
|
13
|
-
export default Button;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ButtonProps } from "./Button";
|
|
2
|
-
export interface IconButtonProps extends Omit<ButtonProps, "themeType" | "size"> {
|
|
3
|
-
icon: React.ReactNode;
|
|
4
|
-
size?: "small" | "normal" | "large";
|
|
5
|
-
isSelected?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare const IconButton: ({ isSelected, state, onClick, icon, size, ...rest }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default IconButton;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import * as S from "./icon-button-styles";
|
|
3
|
-
import { TYPE } from "../../constants";
|
|
4
|
-
const IconButton = ({ isSelected = false, state = "active", onClick, icon, size = "small", ...rest }) => {
|
|
5
|
-
const buttonState = state === "active" || state === "disabled" ? state : "active";
|
|
6
|
-
const themeType = TYPE.icon;
|
|
7
|
-
return (_jsx(S.Button, { onClick: onClick, "$themeType": themeType, "$state": buttonState, disabled: state === "disabled" || rest.disabled, size: size, "$isSelected": isSelected, ...rest, children: icon }));
|
|
8
|
-
};
|
|
9
|
-
export default IconButton;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Button: any;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import styled from "@gobolt/genesis/utils/styled";
|
|
2
|
-
const getPadding = (size, sizing) => {
|
|
3
|
-
if (size === "small") {
|
|
4
|
-
return `${sizing.Size1}px ${sizing.Size1}px`;
|
|
5
|
-
}
|
|
6
|
-
return `${sizing.Size2}px ${sizing.Size2}px`;
|
|
7
|
-
};
|
|
8
|
-
const getVariant = ({ colors, sizing, borderRadius, components }, $themeType, $state, size, $isSelected) => {
|
|
9
|
-
return `
|
|
10
|
-
display: flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
justify-content: center;
|
|
13
|
-
text-align: center;
|
|
14
|
-
color: ${colors[$themeType][$state].color};
|
|
15
|
-
font-size: ${sizing.Size4}px;
|
|
16
|
-
line-height: ${sizing.Size6}px;
|
|
17
|
-
letter-spacing: 0;
|
|
18
|
-
font-weight: 400;
|
|
19
|
-
border-width: 1px;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
width: auto; !important;
|
|
22
|
-
height: auto; !important;
|
|
23
|
-
|
|
24
|
-
background-color:${$isSelected
|
|
25
|
-
? colors[$themeType].hover.backgroundColor
|
|
26
|
-
: colors[$themeType][$state].backgroundColor};
|
|
27
|
-
padding: ${getPadding(size, sizing)};
|
|
28
|
-
|
|
29
|
-
box-shadow: ${$themeType === "utility" ? "0px 1px 2px 0px #00000026" : "none"};
|
|
30
|
-
|
|
31
|
-
border-radius: ${borderRadius.BorderRadiusMd}px;
|
|
32
|
-
gap: ${components.button.gap}px;
|
|
33
|
-
border-style: solid;
|
|
34
|
-
border-color: ${colors[$themeType][$state].borderColor};
|
|
35
|
-
|
|
36
|
-
transition: all 0.2s ease-in-out;
|
|
37
|
-
|
|
38
|
-
&:hover {
|
|
39
|
-
color: ${colors[$themeType].hover.color};
|
|
40
|
-
background-color: ${colors[$themeType].hover.backgroundColor};
|
|
41
|
-
border-color: ${colors[$themeType].hover.borderColor};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&:active {
|
|
45
|
-
color: ${colors[$themeType].pressed.color};
|
|
46
|
-
background-color: ${colors[$themeType].pressed.backgroundColor};
|
|
47
|
-
border-color: ${colors[$themeType].pressed.borderColor};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&:focus-visible {
|
|
51
|
-
outline: none;
|
|
52
|
-
color: ${colors[$themeType].focussed.color};
|
|
53
|
-
background-color: ${colors[$themeType].focussed.backgroundColor};
|
|
54
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 4px ${colors[$themeType].focussed.ringColor};
|
|
55
|
-
border-radius: ${borderRadius.BorderRadiusMd}px;
|
|
56
|
-
border-color: ${colors[$themeType].focussed.borderColor};
|
|
57
|
-
transition: box-shadow 0.2s ease-in-out;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&:disabled {
|
|
61
|
-
color: ${colors[$themeType].disabled.color};
|
|
62
|
-
background-color: ${colors[$themeType].disabled.backgroundColor};
|
|
63
|
-
border-color: ${colors[$themeType].disabled.borderColor};
|
|
64
|
-
cursor: not-allowed;
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
};
|
|
68
|
-
const getGenesisButtonClass = (theme, $themeType, $state, size, $isSelected) => `
|
|
69
|
-
font-family: 'Inter', sans-serif;
|
|
70
|
-
${getVariant(theme, $themeType, $state, size, $isSelected)}
|
|
71
|
-
`;
|
|
72
|
-
export const Button = styled.button `
|
|
73
|
-
${({ theme, $themeType, $state, size, $isSelected }) => {
|
|
74
|
-
return getGenesisButtonClass(theme, $themeType, $state, size, $isSelected);
|
|
75
|
-
}}
|
|
76
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Button: any;
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import styled from "@gobolt/genesis/utils/styled";
|
|
2
|
-
import { Button as AntButton } from "antd";
|
|
3
|
-
const getPadding = (size, $themeType, sizing, $isIconButton) => {
|
|
4
|
-
if ($isIconButton && (size === "normal" || size === "large")) {
|
|
5
|
-
return `${sizing.Size2}px ${sizing.Size2}px`;
|
|
6
|
-
}
|
|
7
|
-
if ($isIconButton && size === "small") {
|
|
8
|
-
return `${sizing.Size1}px ${sizing.Size1}px`;
|
|
9
|
-
}
|
|
10
|
-
// utility button padding is different from the main button
|
|
11
|
-
if ($themeType === "utility" && size === "small") {
|
|
12
|
-
return `${sizing.Size1_5}px ${sizing.Size2}px`;
|
|
13
|
-
}
|
|
14
|
-
if ($themeType === "utility" && (size === "normal" || size === "large")) {
|
|
15
|
-
return `${sizing.Size2_5}px ${sizing.Size3}px`;
|
|
16
|
-
}
|
|
17
|
-
if (size === "small") {
|
|
18
|
-
return `${sizing.Size1_5}px ${sizing.Size4}px`;
|
|
19
|
-
}
|
|
20
|
-
if (size === "normal" || size === "large") {
|
|
21
|
-
return `${sizing.Size2_5}px ${sizing.Size6}px`;
|
|
22
|
-
}
|
|
23
|
-
return `${sizing.Size2}px ${sizing.Size2}px`;
|
|
24
|
-
};
|
|
25
|
-
const getHeight = (size) => {
|
|
26
|
-
if (size === "normal" || size === "large") {
|
|
27
|
-
return `40px`;
|
|
28
|
-
}
|
|
29
|
-
if (size === "small") {
|
|
30
|
-
return `32px`;
|
|
31
|
-
}
|
|
32
|
-
return `40px`;
|
|
33
|
-
};
|
|
34
|
-
const getWidth = (size, $isIconButton) => {
|
|
35
|
-
if (!$isIconButton) {
|
|
36
|
-
return `auto`;
|
|
37
|
-
}
|
|
38
|
-
if (size === "normal" || size === "large") {
|
|
39
|
-
return `40px`;
|
|
40
|
-
}
|
|
41
|
-
if (size === "small") {
|
|
42
|
-
return `32px`;
|
|
43
|
-
}
|
|
44
|
-
return `40px`;
|
|
45
|
-
};
|
|
46
|
-
const getVariant = ({ colors, sizing, borderRadius, components }, $themeType, $state, size, $isIconButton) => {
|
|
47
|
-
const backgroundColor = colors[$themeType][$state].backgroundColor;
|
|
48
|
-
return `
|
|
49
|
-
&.ant-btn {
|
|
50
|
-
|
|
51
|
-
color: ${colors[$themeType][$state].color};
|
|
52
|
-
font-size: ${sizing.Size4}px;
|
|
53
|
-
line-height: ${sizing.Size6}px;
|
|
54
|
-
letter-spacing: 0;
|
|
55
|
-
font-weight: 400;
|
|
56
|
-
border-width: 1px;
|
|
57
|
-
line-height: 1 !important;
|
|
58
|
-
|
|
59
|
-
width: ${getWidth(size, $isIconButton)}; !important;
|
|
60
|
-
height: ${getHeight(size)}; !important;
|
|
61
|
-
|
|
62
|
-
background-color: ${colors[$themeType][$state].backgroundColor};
|
|
63
|
-
padding: ${getPadding(size, $themeType, sizing, $isIconButton)};
|
|
64
|
-
|
|
65
|
-
box-shadow: ${$themeType === "utility" ? "0px 1px 2px 0px #00000026" : "none"};
|
|
66
|
-
|
|
67
|
-
border-radius: ${borderRadius.BorderRadiusMd}px;
|
|
68
|
-
gap: ${components.button.gap}px;
|
|
69
|
-
border-style: solid;
|
|
70
|
-
border-color: ${colors[$themeType][$state].borderColor};
|
|
71
|
-
|
|
72
|
-
transition: all 0.2s ease-in-out;
|
|
73
|
-
|
|
74
|
-
&:hover {
|
|
75
|
-
color: ${colors[$themeType].hover.color};
|
|
76
|
-
background-color: ${colors[$themeType].hover.backgroundColor};
|
|
77
|
-
border-color: ${colors[$themeType].hover.borderColor};
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&:active {
|
|
81
|
-
color: ${colors[$themeType].pressed.color};
|
|
82
|
-
background-color: ${colors[$themeType].pressed.backgroundColor};
|
|
83
|
-
border-color: ${colors[$themeType].pressed.borderColor};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&:focus-visible {
|
|
87
|
-
outline: none;
|
|
88
|
-
color: ${colors[$themeType].focussed.color};
|
|
89
|
-
background-color: ${colors[$themeType].focussed.backgroundColor};
|
|
90
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 4px ${colors[$themeType].focussed.ringColor};
|
|
91
|
-
border-radius: ${borderRadius.BorderRadiusMd}px;
|
|
92
|
-
border-color: ${colors[$themeType].focussed.borderColor};
|
|
93
|
-
transition: box-shadow 0.2s ease-in-out;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
&:disabled {
|
|
97
|
-
color: ${colors[$themeType].disabled.color};
|
|
98
|
-
background-color: ${colors[$themeType].disabled.backgroundColor};
|
|
99
|
-
border-color: ${colors[$themeType].disabled.borderColor};
|
|
100
|
-
cursor: not-allowed;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
`;
|
|
106
|
-
};
|
|
107
|
-
const getGenesisButtonClass = (theme, $themeType, $state, $isIconButton, size) => `
|
|
108
|
-
&.ant-btn {
|
|
109
|
-
font-family: 'Inter', sans-serif;
|
|
110
|
-
|
|
111
|
-
${getVariant(theme, $themeType, $state, size, $isIconButton)}
|
|
112
|
-
}
|
|
113
|
-
`;
|
|
114
|
-
export const Button = styled(AntButton) `
|
|
115
|
-
${({ theme, $themeType, $state, children, $isIconButton, size }) => {
|
|
116
|
-
return getGenesisButtonClass(theme, $themeType, $state, $isIconButton, size);
|
|
117
|
-
}}
|
|
118
|
-
`;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { STATE } from "../../constants";
|
|
3
|
-
import type { InputProps as AntInputProperties, InputRef } from "antd";
|
|
4
|
-
import type { InputEvent } from "../../types/events";
|
|
5
|
-
type BaseInputProps = Omit<AntInputProperties, "size" | "onChange" | "value">;
|
|
6
|
-
export interface InputProps extends BaseInputProps {
|
|
7
|
-
state?: keyof typeof STATE;
|
|
8
|
-
size?: "normal" | "small" | "large";
|
|
9
|
-
onChange?: (actionEvent: InputEvent) => void;
|
|
10
|
-
value?: string;
|
|
11
|
-
}
|
|
12
|
-
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<InputRef>>;
|
|
13
|
-
export default Input;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import * as S from "./styles";
|
|
4
|
-
import { STATE } from "../../constants";
|
|
5
|
-
import DropdownChevron from "../shared/DropdownChevron";
|
|
6
|
-
import { Select } from "antd";
|
|
7
|
-
const Input = React.forwardRef(({ state = STATE.active, size = "normal", onChange, value, ...rest }, ref) => {
|
|
8
|
-
// make sure rest.type is ignored in the final output
|
|
9
|
-
// we don't want the rest type "number" to be passed to the input
|
|
10
|
-
// since we have our own version of type
|
|
11
|
-
const { type, ...validRest } = rest;
|
|
12
|
-
// If addonAfter is a Select, use our custom chevron
|
|
13
|
-
const addonAfter = React.isValidElement(rest.addonAfter) && rest.addonAfter.type === Select
|
|
14
|
-
? React.cloneElement(rest.addonAfter, {
|
|
15
|
-
suffixIcon: _jsx(DropdownChevron, {}),
|
|
16
|
-
})
|
|
17
|
-
: rest.addonAfter;
|
|
18
|
-
const handleChange = React.useCallback((e) => {
|
|
19
|
-
if (onChange) {
|
|
20
|
-
onChange({
|
|
21
|
-
event: "inputChange",
|
|
22
|
-
payload: {
|
|
23
|
-
value: e.target.value,
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}, [onChange]);
|
|
28
|
-
return (_jsx(S.Input, { ...validRest, ref: ref, size: size, state: state, disabled: state === "disabled" || rest.disabled, addonAfter: addonAfter, style: {
|
|
29
|
-
height: size === "normal" || size === "large" ? "40px" : "32px",
|
|
30
|
-
}, onChange: handleChange, value: value }));
|
|
31
|
-
});
|
|
32
|
-
Input.displayName = "Input";
|
|
33
|
-
Input.__ANT_INPUT = true;
|
|
34
|
-
export default Input;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./Input";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Input: any;
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import styled from "@gobolt/genesis/utils/styled";
|
|
2
|
-
import { Input as AntInput } from "antd";
|
|
3
|
-
import { TYPE, STATE } from "@gobolt/genesis/constants";
|
|
4
|
-
const getStateColors = (colors, type, state) => {
|
|
5
|
-
const filled = {
|
|
6
|
-
color: colors.inputs.onsurface.active,
|
|
7
|
-
borderColor: colors[TYPE.secondary].active.borderColor,
|
|
8
|
-
ringColor: colors[type].focussed.ringColor,
|
|
9
|
-
};
|
|
10
|
-
const success = {
|
|
11
|
-
color: colors.status.success.default,
|
|
12
|
-
borderColor: colors.status.success.default,
|
|
13
|
-
ringColor: colors.status.success.ringColor,
|
|
14
|
-
};
|
|
15
|
-
const error = {
|
|
16
|
-
color: colors.status.error.default,
|
|
17
|
-
borderColor: colors.status.error.default,
|
|
18
|
-
ringColor: colors.status.error.ringColor,
|
|
19
|
-
};
|
|
20
|
-
const themeState = state !== STATE.error && state !== STATE.success && state !== STATE.filled
|
|
21
|
-
? {
|
|
22
|
-
color: colors.inputs.onsurface.active,
|
|
23
|
-
backgroundColor: colors.inputs.surface.active,
|
|
24
|
-
borderColor: colors.inputs.surface.border,
|
|
25
|
-
ringColor: colors[type][state].ringColor,
|
|
26
|
-
}
|
|
27
|
-
: null;
|
|
28
|
-
const stateMap = {
|
|
29
|
-
filled,
|
|
30
|
-
error,
|
|
31
|
-
success,
|
|
32
|
-
themeState,
|
|
33
|
-
};
|
|
34
|
-
const getValidKey = (state) => {
|
|
35
|
-
const validStates = [STATE.filled, STATE.error, STATE.success];
|
|
36
|
-
return validStates.includes(state) ? state : "themeState";
|
|
37
|
-
};
|
|
38
|
-
const css = stateMap[getValidKey(state)];
|
|
39
|
-
return css;
|
|
40
|
-
};
|
|
41
|
-
const getGenesisInputClass = ({ colors, borderRadius, components, shadows }, type, state, hasBeforeAddon, hasAfterAddon, size) => {
|
|
42
|
-
const stateColors = getStateColors(colors, type, state);
|
|
43
|
-
const getBorderRadius = (hasBeforeAddon, hasAfterAddon) => {
|
|
44
|
-
if (hasAfterAddon && !hasBeforeAddon) {
|
|
45
|
-
return `${borderRadius.BorderRadiusMd}px 0px 0px ${borderRadius.BorderRadiusMd}px`;
|
|
46
|
-
}
|
|
47
|
-
if (hasBeforeAddon && !hasAfterAddon) {
|
|
48
|
-
return `0px ${borderRadius.BorderRadiusMd}px ${borderRadius.BorderRadiusMd}px 0px`;
|
|
49
|
-
}
|
|
50
|
-
return `0px`;
|
|
51
|
-
};
|
|
52
|
-
return `
|
|
53
|
-
&.ant-input {
|
|
54
|
-
font-family: 'Inter', sans-serif;
|
|
55
|
-
color: ${stateColors.color};
|
|
56
|
-
border-color: ${stateColors.borderColor};
|
|
57
|
-
box-shadow: ${shadows.inputs[1]} !important;
|
|
58
|
-
height: ${size === "normal" || size === "large" ? "40px" : "32px"} !important;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/* Increase specificity for focus states */
|
|
62
|
-
&.ant-input.ant-input:focus,
|
|
63
|
-
&.ant-input.ant-input:focus-visible,
|
|
64
|
-
&.ant-input.ant-input-focused {
|
|
65
|
-
outline: none !important;
|
|
66
|
-
border-color: ${colors[type].focussed.borderColor} !important;
|
|
67
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors[type].focussed.ringColor} !important;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&.ant-input-outlined {
|
|
71
|
-
border: 1px solid ${stateColors.borderColor};
|
|
72
|
-
|
|
73
|
-
&:hover {
|
|
74
|
-
border-color: ${stateColors.borderColor};
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.ant-input-group & {
|
|
79
|
-
&:focus-within {
|
|
80
|
-
outline: none;
|
|
81
|
-
color: ${stateColors.color};
|
|
82
|
-
box-shadow: none;
|
|
83
|
-
border-color: ${colors[type].focussed.borderColor};
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.ant-input-group:focus-within {
|
|
88
|
-
outline: none;
|
|
89
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors[type].focussed.ringColor};
|
|
90
|
-
border-radius: ${borderRadius.BorderRadiusMd}px;
|
|
91
|
-
transition: box-shadow 0.2s ease-in-out;
|
|
92
|
-
|
|
93
|
-
/* Hide focus styles on inner input when parent is focused */
|
|
94
|
-
.ant-input:focus-within {
|
|
95
|
-
box-shadow: none;
|
|
96
|
-
border-radius: 0;
|
|
97
|
-
border-radius: ${getBorderRadius(hasBeforeAddon, hasAfterAddon)};
|
|
98
|
-
border-color: #ddd;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/* Remove inner input focus styles when in a group */
|
|
103
|
-
.ant-input-group .ant-input:focus,
|
|
104
|
-
.ant-input-group .ant-input:focus-visible,
|
|
105
|
-
.ant-input-group .ant-input:focus-within {
|
|
106
|
-
outline: none;
|
|
107
|
-
box-shadow: none;
|
|
108
|
-
border-color: ${colors[type].focussed.borderColor};
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/* Single focus ring on group */
|
|
112
|
-
.ant-input-group:focus-within {
|
|
113
|
-
outline: none;
|
|
114
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors[type].focussed.ringColor};
|
|
115
|
-
border-radius: ${borderRadius.BorderRadiusMd}px;
|
|
116
|
-
transition: box-shadow 0.2s ease-in-out;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/* Remove focus styles for standalone inputs */
|
|
120
|
-
&:not(.ant-input-group):focus-visible {
|
|
121
|
-
outline: none;
|
|
122
|
-
color: ${stateColors.color};
|
|
123
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors[type].focussed.ringColor};
|
|
124
|
-
border-radius: ${borderRadius.BorderRadiusMd}px;
|
|
125
|
-
border-color: ${colors[type].focussed.borderColor};
|
|
126
|
-
transition: box-shadow 0.2s ease-in-out;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
&:not(.ant-input-group .ant-input):focus-visible {
|
|
130
|
-
outline: none;
|
|
131
|
-
color: ${stateColors.color};
|
|
132
|
-
box-shadow: 0 0 0 1px #fff, 0 0 0 3px ${colors[type].focussed.ringColor};
|
|
133
|
-
border-radius: ${borderRadius.BorderRadiusMd}px;
|
|
134
|
-
border-color: ${colors[type].focussed.borderColor};
|
|
135
|
-
transition: box-shadow 0.2s ease-in-out;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
&.ant-input-group-wrapper {
|
|
139
|
-
.ant-input-group {
|
|
140
|
-
display: flex;
|
|
141
|
-
align-items: center;
|
|
142
|
-
height: ${size === "normal" || size === "large" ? "40px" : "32px"};
|
|
143
|
-
|
|
144
|
-
.ant-input {
|
|
145
|
-
height: 100% !important;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.ant-input-group-addon {
|
|
149
|
-
padding: 0 ${components.input.suffixPrefixHorPadding};
|
|
150
|
-
height: 100%;
|
|
151
|
-
display: flex;
|
|
152
|
-
align-items: center;
|
|
153
|
-
min-width: fit-content;
|
|
154
|
-
width: auto;
|
|
155
|
-
|
|
156
|
-
> * {
|
|
157
|
-
width: 100%;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.ant-select {
|
|
161
|
-
height: 100%;
|
|
162
|
-
|
|
163
|
-
.ant-select-selector {
|
|
164
|
-
height: 100%;
|
|
165
|
-
display: flex;
|
|
166
|
-
align-items: center;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
`;
|
|
173
|
-
};
|
|
174
|
-
export const Input = styled(AntInput) `
|
|
175
|
-
${({ theme, state, type = TYPE.primary, size = "normal", ...rest }) => {
|
|
176
|
-
const hasBeforeAddon = !!rest.addonBefore;
|
|
177
|
-
const hasAfterAddon = !!rest.addonAfter;
|
|
178
|
-
return getGenesisInputClass(theme, type, state, hasBeforeAddon, hasAfterAddon, size);
|
|
179
|
-
}}
|
|
180
|
-
`;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { TYPE, STATE } from "@gobolt/genesis/constants";
|
|
3
|
-
import { SelectProps as AntSelectProps } from "antd";
|
|
4
|
-
import { GenesisTheme } from "@/lib/styles/theme/genesis-theme.types";
|
|
5
|
-
type Variant = "none" | "simple";
|
|
6
|
-
export interface SelectProps extends Omit<AntSelectProps, "variant" | "size"> {
|
|
7
|
-
type?: keyof typeof TYPE;
|
|
8
|
-
state?: keyof typeof STATE;
|
|
9
|
-
options?: {
|
|
10
|
-
value: string;
|
|
11
|
-
label: React.ReactNode;
|
|
12
|
-
}[];
|
|
13
|
-
variant?: Variant;
|
|
14
|
-
defaultValue?: string | string[] | number | number[] | unknown;
|
|
15
|
-
onChange?: (value: string | string[]) => void;
|
|
16
|
-
size?: "normal" | "small" | "large";
|
|
17
|
-
value?: string[] | string | number[] | number;
|
|
18
|
-
width?: number | string;
|
|
19
|
-
placeholder?: string;
|
|
20
|
-
selectDisplayMode?: "chip" | "count";
|
|
21
|
-
isSingleSelect?: boolean;
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
theme?: GenesisTheme;
|
|
24
|
-
}
|
|
25
|
-
declare const Select: ({ type, state, variant, defaultValue, onChange, size, width, value, options, placeholder, selectDisplayMode, isSingleSelect, disabled, ...rest }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
export default Select;
|