@opentrons/components 0.1.7-alpha.1 → 0.2.0-alpha.0
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/cssModuleSideEffect.ts +22 -0
- package/lib/assets/localization/en/index.d.ts +12 -0
- package/lib/assets/localization/index.d.ts +12 -0
- package/lib/atoms/AnimationVideo/index.d.ts +13 -0
- package/lib/atoms/InlineNotification/index.d.ts +1 -1
- package/lib/atoms/ListButton/ListButtonChildren/index.d.ts +0 -1
- package/lib/atoms/StyledText/PlaceholderStyledText.d.ts +14 -0
- package/lib/atoms/StyledText/index.d.ts +1 -0
- package/lib/atoms/buttons/BasicButton.d.ts +12 -0
- package/lib/atoms/buttons/index.d.ts +1 -0
- package/lib/atoms/index.d.ts +1 -0
- package/lib/hardware-sim/BaseDeck/BaseDeck.d.ts +10 -8
- package/lib/hardware-sim/Deck/FlexTrash.d.ts +4 -1
- package/lib/hardware-sim/Deck/MoveLabwareOnDeck.d.ts +3 -2
- package/lib/hardware-sim/Deck/RobotCoordsForeignDiv.d.ts +6 -5
- package/lib/hardware-sim/Deck/RobotCoordsForeignObject.d.ts +8 -5
- package/lib/hardware-sim/Deck/RobotCoordsText.d.ts +11 -1
- package/lib/hardware-sim/Deck/RobotWorkSpace.d.ts +30 -14
- package/lib/hardware-sim/Deck/__tests__/resolveLabwareLocation.test.d.ts +1 -0
- package/lib/hardware-sim/Deck/resolveLabwareLocation.d.ts +20 -0
- package/lib/hardware-sim/DeckConfigurator/AbsorbanceReaderItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/EmptyConfigItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/FlexStackerItem.d.ts +12 -0
- package/lib/hardware-sim/DeckConfigurator/HeaterShakerItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/MagneticBlockItem.d.ts +12 -0
- package/lib/hardware-sim/DeckConfigurator/StagingAreaConfigItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/{StaticFixture.d.ts → StaticItem.d.ts} +1 -1
- package/lib/hardware-sim/DeckConfigurator/TemperatureModuleItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/ThermocyclerItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/TrashBinConfigItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/WasteChuteConfigItem.d.ts +11 -0
- package/lib/hardware-sim/DeckConfigurator/constants.d.ts +5 -8
- package/lib/hardware-sim/DeckConfigurator/index.d.ts +4 -3
- package/lib/hardware-sim/Labware/CalibrationBlockRender.d.ts +15 -0
- package/lib/hardware-sim/Labware/Labware.d.ts +7 -8
- package/lib/hardware-sim/Labware/LabwareAdapter/index.d.ts +2 -2
- package/lib/hardware-sim/Labware/LabwareRender.d.ts +46 -5
- package/lib/hardware-sim/Labware/index.d.ts +1 -0
- package/lib/hardware-sim/Labware/labwareInternals/FilledWells.d.ts +3 -4
- package/lib/hardware-sim/Labware/labwareInternals/LabwareOutline.d.ts +20 -9
- package/lib/hardware-sim/Labware/labwareInternals/LabwareWellLabels.d.ts +2 -2
- package/lib/hardware-sim/Labware/labwareInternals/StaticLabware.d.ts +2 -2
- package/lib/hardware-sim/Labware/labwareInternals/StrokedWells.d.ts +2 -2
- package/lib/hardware-sim/Labware/labwareInternals/StyledWells.d.ts +2 -2
- package/lib/hardware-sim/Labware/labwareInternals/Well.d.ts +1 -2
- package/lib/hardware-sim/Labware/labwareInternals/WellLabels.d.ts +2 -2
- package/lib/hardware-sim/Module/index.d.ts +24 -2
- package/lib/hardware-sim/Pipette/PipetteRender.d.ts +2 -2
- package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.d.ts +5 -3
- package/lib/hocs/withStyleProps.d.ts +26 -0
- package/lib/hooks/useConditionalConfirm.d.ts +4 -0
- package/lib/icons/Icon.d.ts +7 -7
- package/lib/icons/ModuleIcon.d.ts +4 -3
- package/lib/instrument/index.d.ts +0 -2
- package/lib/legacy-hardware-sim/index.d.ts +0 -1
- package/lib/lists/index.d.ts +0 -1
- package/lib/molecules/CustomizeExpandButton/__tests__/CustomizeExpandButton.test.d.ts +1 -0
- package/lib/molecules/CustomizeExpandButton/index.d.ts +29 -0
- package/lib/molecules/DeckInfoLabel/index.d.ts +8 -16
- package/lib/molecules/index.d.ts +2 -1
- package/lib/organisms/CommandText/index.d.ts +2 -2
- package/lib/organisms/CommandText/useCommandTextString/index.d.ts +2 -2
- package/lib/organisms/CommandText/useCommandTextString/utils/getLabwareDefinitionsFromCommands.d.ts +2 -2
- package/lib/organisms/CommandText/useCommandTextString/utils/getLabwareLocation.d.ts +3 -3
- package/lib/organisms/CommandText/useCommandTextString/utils/getLabwareName.d.ts +2 -2
- package/lib/organisms/FixtureOption/index.d.ts +2 -2
- package/lib/organisms/ProtocolDeck/index.d.ts +10 -0
- package/lib/organisms/ProtocolTimelineScrubber/CommandItem.d.ts +2 -2
- package/lib/organisms/ProtocolTimelineScrubber/utils.d.ts +2 -2
- package/lib/organisms/index.d.ts +1 -0
- package/lib/primitives/ForeignObject.d.ts +8 -18
- package/lib/primitives/style-props.d.ts +1 -1
- package/lib/structure/index.d.ts +2 -3
- package/package.json +6 -3
- package/src/alerts/alerts.module.css +2 -2
- package/src/assets/localization/en/deck_configuration.json +12 -0
- package/src/assets/localization/en/index.ts +2 -0
- package/src/assets/localization/en/protocol_command_text.json +1 -1
- package/src/atoms/AnimationVideo/__tests__/AnimationVideo.test.tsx +40 -0
- package/src/atoms/AnimationVideo/index.tsx +44 -0
- package/src/atoms/CheckboxField/__tests__/CheckboxField.test.tsx +0 -3
- package/src/atoms/CheckboxField/index.tsx +1 -1
- package/src/atoms/InlineNotification/index.tsx +86 -70
- package/src/atoms/ListButton/ListButton.stories.tsx +21 -7
- package/src/atoms/ListButton/ListButtonChildren/index.ts +0 -1
- package/src/atoms/ListItem/ListItemChildren/ListItemDescriptor.tsx +2 -2
- package/src/atoms/MenuList/OverflowBtn.tsx +39 -41
- package/src/atoms/Snackbar/Snackbar.stories.tsx +59 -23
- package/src/atoms/Snackbar/index.tsx +48 -38
- package/src/atoms/StyledText/PlaceholderStyledText.tsx +46 -0
- package/src/atoms/StyledText/index.ts +1 -0
- package/src/atoms/StyledText/placeholderstyledtext.module.css +25 -0
- package/src/atoms/buttons/BasicButton.tsx +100 -0
- package/src/atoms/buttons/SecondaryButton.tsx +5 -2
- package/src/atoms/buttons/__tests__/BasicButton.test.tsx +87 -0
- package/src/atoms/buttons/buttons.stories.tsx +91 -55
- package/src/atoms/buttons/index.ts +1 -0
- package/src/atoms/index.ts +1 -0
- package/src/buttons/buttons.module.css +92 -92
- package/src/controls/styles.module.css +15 -15
- package/src/forms/Select.module.css +23 -23
- package/src/forms/forms.module.css +38 -37
- package/src/hardware-sim/BaseDeck/BaseDeck.stories.tsx +7 -7
- package/src/hardware-sim/BaseDeck/BaseDeck.tsx +98 -61
- package/src/hardware-sim/BaseDeck/WasteChuteFixture.tsx +22 -28
- package/src/hardware-sim/BaseDeck/basedeck.module.css +20 -0
- package/src/hardware-sim/Deck/FlexTrash.tsx +50 -30
- package/src/hardware-sim/Deck/MoveLabwareOnDeck.stories.tsx +2 -2
- package/src/hardware-sim/Deck/MoveLabwareOnDeck.tsx +122 -156
- package/src/hardware-sim/Deck/RobotCoordsForeignDiv.tsx +35 -27
- package/src/hardware-sim/Deck/RobotCoordsForeignObject.tsx +32 -29
- package/src/hardware-sim/Deck/RobotCoordsText.tsx +12 -11
- package/src/hardware-sim/Deck/RobotWorkSpace.tsx +74 -54
- package/src/hardware-sim/Deck/SlotLabels.tsx +51 -51
- package/src/hardware-sim/Deck/__tests__/resolveLabwareLocation.test.ts +138 -0
- package/src/hardware-sim/Deck/deck.module.css +54 -0
- package/src/hardware-sim/Deck/resolveLabwareLocation.ts +154 -0
- package/src/hardware-sim/DeckConfigurator/{FlexStackerFixture.tsx → AbsorbanceReaderItem.tsx} +34 -31
- package/src/hardware-sim/DeckConfigurator/{EmptyConfigFixture.tsx → EmptyConfigItem.tsx} +72 -44
- package/src/hardware-sim/DeckConfigurator/{AbsorbanceReaderFixture.tsx → FlexStackerItem.tsx} +46 -27
- package/src/hardware-sim/DeckConfigurator/{HeaterShakerFixture.tsx → HeaterShakerItem.tsx} +40 -28
- package/src/hardware-sim/DeckConfigurator/{MagneticBlockFixture.tsx → MagneticBlockItem.tsx} +41 -58
- package/src/hardware-sim/DeckConfigurator/{StagingAreaConfigFixture.tsx → StagingAreaConfigItem.tsx} +41 -23
- package/src/hardware-sim/DeckConfigurator/{StaticFixture.tsx → StaticItem.tsx} +16 -9
- package/src/hardware-sim/DeckConfigurator/{TemperatureModuleFixture.tsx → TemperatureModuleItem.tsx} +42 -26
- package/src/hardware-sim/DeckConfigurator/{ThermocyclerFixture.tsx → ThermocyclerItem.tsx} +31 -21
- package/src/hardware-sim/DeckConfigurator/{TrashBinConfigFixture.tsx → TrashBinConfigItem.tsx} +42 -27
- package/src/hardware-sim/DeckConfigurator/{WasteChuteConfigFixture.tsx → WasteChuteConfigItem.tsx} +38 -27
- package/src/hardware-sim/DeckConfigurator/constants.ts +5 -9
- package/src/hardware-sim/DeckConfigurator/index.tsx +236 -206
- package/src/hardware-sim/Labware/CalibrationBlockRender.stories.tsx +49 -0
- package/src/hardware-sim/Labware/CalibrationBlockRender.tsx +172 -0
- package/src/hardware-sim/Labware/Labware.tsx +30 -15
- package/src/hardware-sim/Labware/LabwareAdapter/index.tsx +2 -2
- package/src/hardware-sim/Labware/LabwareRender.stories.tsx +36 -21
- package/src/hardware-sim/Labware/LabwareRender.tsx +70 -15
- package/src/hardware-sim/Labware/__tests__/Labware.test.tsx +9 -4
- package/src/hardware-sim/Labware/__tests__/LabwareRender.test.tsx +14 -5
- package/src/hardware-sim/Labware/index.ts +1 -0
- package/src/hardware-sim/Labware/labware.module.css +8 -0
- package/src/hardware-sim/Labware/labwareInternals/FilledWells.tsx +3 -4
- package/src/hardware-sim/Labware/labwareInternals/LabwareOutline.tsx +48 -23
- package/src/hardware-sim/Labware/labwareInternals/LabwareWellLabels.tsx +3 -3
- package/src/hardware-sim/Labware/labwareInternals/StaticLabware.tsx +2 -2
- package/src/hardware-sim/Labware/labwareInternals/StrokedWells.tsx +2 -2
- package/src/hardware-sim/Labware/labwareInternals/StyledWells.tsx +2 -2
- package/src/hardware-sim/Labware/labwareInternals/Well.tsx +1 -2
- package/src/hardware-sim/Labware/labwareInternals/WellLabels.tsx +10 -11
- package/src/hardware-sim/Labware/labwareInternals/__tests__/LabwareWellLabels.test.tsx +2 -2
- package/src/hardware-sim/Labware/labwareInternals/__tests__/StrokedWells.test.tsx +2 -2
- package/src/hardware-sim/Labware/labwareInternals/__tests__/WellLabels.test.tsx +2 -2
- package/src/hardware-sim/Module/Module.stories.tsx +45 -15
- package/src/hardware-sim/Module/Thermocycler/index.tsx +2 -2
- package/src/hardware-sim/Module/index.tsx +41 -18
- package/src/hardware-sim/Pipette/PipetteRender.stories.tsx +2 -2
- package/src/hardware-sim/Pipette/PipetteRender.tsx +5 -7
- package/src/hardware-sim/Pipette/__tests__/PipetteRender.test.tsx +2 -2
- package/src/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.tsx +15 -14
- package/src/hardware-sim/RobotCoordinateSpace/robotcoordinatespace.module.css +3 -0
- package/src/hocs/withStyleProps.ts +53 -0
- package/src/hooks/useConditionalConfirm.ts +15 -5
- package/src/icons/Icon.tsx +38 -29
- package/src/icons/ModuleIcon.tsx +5 -3
- package/src/icons/icon-data.ts +26 -2
- package/src/icons/icon.module.css +10 -0
- package/src/index.module.css +1 -0
- package/src/instrument/InstrumentDiagram.tsx +0 -2
- package/src/instrument/PipetteSelect.module.css +3 -3
- package/src/instrument/index.ts +0 -2
- package/src/legacy-hardware-sim/LabwareNameOverlay.module.css +5 -5
- package/src/legacy-hardware-sim/ModuleItem.module.css +19 -19
- package/src/legacy-hardware-sim/index.ts +0 -1
- package/src/lists/index.ts +0 -1
- package/src/lists/lists.module.css +23 -23
- package/src/modals/modals.module.css +55 -55
- package/src/molecules/CustomizeExpandButton/__tests__/CustomizeExpandButton.test.tsx +88 -0
- package/src/molecules/CustomizeExpandButton/index.tsx +189 -0
- package/src/molecules/DeckInfoLabel/DeckInfoLabel.stories.tsx +10 -6
- package/src/molecules/DeckInfoLabel/__tests__/DeckInfoLabel.test.tsx +15 -11
- package/src/molecules/DeckInfoLabel/deckinfolabel.module.css +42 -0
- package/src/molecules/DeckInfoLabel/index.tsx +36 -62
- package/src/molecules/DropdownMenu/index.tsx +17 -13
- package/src/molecules/InfoScreen/index.tsx +6 -2
- package/src/molecules/ReleaseNotes/styles.module.css +15 -15
- package/src/molecules/index.ts +2 -1
- package/src/nav/SidePanel.module.css +6 -6
- package/src/organisms/CommandText/__tests__/CommandText.test.tsx +12 -12
- package/src/organisms/CommandText/index.tsx +2 -2
- package/src/organisms/CommandText/useCommandTextString/index.ts +2 -2
- package/src/organisms/CommandText/useCommandTextString/utils/__tests__/getFinalLabwareLocation.test.ts +4 -4
- package/src/organisms/CommandText/useCommandTextString/utils/commandText/__tests__/getPipettingCommandText.test.tsx +3 -3
- package/src/organisms/CommandText/useCommandTextString/utils/commandText/getFlexStackerCommandText.ts +2 -4
- package/src/organisms/CommandText/useCommandTextString/utils/commandText/getMoveToWellCommandText.ts +19 -3
- package/src/organisms/CommandText/useCommandTextString/utils/commandText/getPipettingCommandText.ts +19 -10
- package/src/organisms/CommandText/useCommandTextString/utils/getLabwareDefinitionsFromCommands.ts +9 -9
- package/src/organisms/CommandText/useCommandTextString/utils/getLabwareLocation.tsx +3 -3
- package/src/organisms/CommandText/useCommandTextString/utils/getLabwareName.ts +2 -2
- package/src/organisms/DeckLabelSet/index.tsx +1 -3
- package/src/organisms/FixtureOption/__tests__/FixtureOption.test.tsx +0 -2
- package/src/organisms/FixtureOption/index.tsx +42 -71
- package/src/organisms/ProtocolDeck/index.tsx +118 -0
- package/src/organisms/ProtocolTimelineScrubber/CommandItem.tsx +2 -2
- package/src/organisms/ProtocolTimelineScrubber/PipetteVisuals.tsx +1 -1
- package/src/organisms/ProtocolTimelineScrubber/utils.ts +3 -3
- package/src/organisms/index.ts +1 -0
- package/src/primitives/ForeignObject.tsx +20 -61
- package/src/primitives/style-props.ts +1 -0
- package/src/slotmap/styles.module.css +1 -1
- package/src/structure/Pill.module.css +1 -1
- package/src/structure/Splash.module.css +1 -1
- package/src/structure/index.ts +2 -4
- package/src/structure/structure.module.css +11 -11
- package/src/styles/colors.module.css +1 -0
- package/src/styles/global.css +179 -0
- package/src/styles/index.module.css +1 -1
- package/src/styles/typography.module.css +1 -0
- package/src/testing/utils/renderWithProviders.tsx +3 -6
- package/src/tooltips/tooltips.module.css +14 -14
- package/vite.config.mts +6 -3
- package/lib/atoms/ListButton/ListButtonChildren/ListButtonRadioButton.d.ts +0 -14
- package/lib/hardware-sim/DeckConfigurator/AbsorbanceReaderFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/EmptyConfigFixture.d.ts +0 -8
- package/lib/hardware-sim/DeckConfigurator/FlexStackerFixture.d.ts +0 -11
- package/lib/hardware-sim/DeckConfigurator/HeaterShakerFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/MagneticBlockFixture.d.ts +0 -11
- package/lib/hardware-sim/DeckConfigurator/StagingAreaConfigFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/TemperatureModuleFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/ThermocyclerFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/TrashBinConfigFixture.d.ts +0 -10
- package/lib/hardware-sim/DeckConfigurator/WasteChuteConfigFixture.d.ts +0 -11
- package/lib/hardware-sim/utils.d.ts +0 -3
- package/lib/instrument/InstrumentGroup.d.ts +0 -11
- package/lib/instrument/InstrumentInfo.d.ts +0 -18
- package/lib/legacy-hardware-sim/ModuleItem.d.ts +0 -17
- package/lib/lists/TitledList.d.ts +0 -44
- package/lib/structure/Card.d.ts +0 -18
- package/src/atoms/ListButton/ListButtonChildren/ListButtonRadioButton.tsx +0 -109
- package/src/atoms/ListButton/__tests__/ListButtonRadioButton.test.tsx +0 -28
- package/src/hardware-sim/utils.ts +0 -18
- package/src/instrument/InstrumentDiagram.stories.tsx +0 -43
- package/src/instrument/InstrumentGroup.stories.tsx +0 -89
- package/src/instrument/InstrumentGroup.tsx +0 -35
- package/src/instrument/InstrumentInfo.tsx +0 -106
- package/src/instrument/__tests__/InstrumentInfo.test.tsx +0 -58
- package/src/instrument/instrument.module.css +0 -45
- package/src/legacy-hardware-sim/ModuleItem.tsx +0 -145
- package/src/lists/TitledList.tsx +0 -154
- package/src/structure/Card.stories.tsx +0 -29
- package/src/structure/Card.tsx +0 -65
- /package/lib/atoms/{ListButton/__tests__/ListButtonRadioButton.test.d.ts → AnimationVideo/__tests__/AnimationVideo.test.d.ts} +0 -0
- /package/lib/{instrument/__tests__/InstrumentInfo.test.d.ts → atoms/buttons/__tests__/BasicButton.test.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentrons/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-alpha.0",
|
|
4
4
|
"description": "React components library for Opentrons' projects",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
7
7
|
"style": "src/index.module.css",
|
|
8
8
|
"main": "src/index.ts",
|
|
9
9
|
"module": "src/index.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
"./styles": "./src/styles/global.css"
|
|
12
|
+
},
|
|
10
13
|
"repository": {
|
|
11
14
|
"type": "git",
|
|
12
15
|
"url": "git+https://github.com/Opentrons/opentrons.git"
|
|
@@ -22,7 +25,7 @@
|
|
|
22
25
|
"react-dom": "18.2.0"
|
|
23
26
|
},
|
|
24
27
|
"dependencies": {
|
|
25
|
-
"@opentrons/shared-data": "0.
|
|
28
|
+
"@opentrons/shared-data": "0.2.0-alpha.0",
|
|
26
29
|
"@popperjs/core": "2.1.1",
|
|
27
30
|
"@react-spring/types": "9.6.1",
|
|
28
31
|
"@react-spring/web": "9.6.1",
|
|
@@ -40,7 +43,7 @@
|
|
|
40
43
|
"react-remove-scroll": "2.4.3",
|
|
41
44
|
"react-select": "5.4.0",
|
|
42
45
|
"react-viewport-list": "6.3.0",
|
|
43
|
-
"redux": "
|
|
46
|
+
"redux": "5.0.1",
|
|
44
47
|
"styled-components": "5.3.6"
|
|
45
48
|
},
|
|
46
49
|
"devDependencies": {
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
.title_bar {
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: row;
|
|
15
|
-
justify-content: space-between;
|
|
16
15
|
align-items: center;
|
|
16
|
+
justify-content: space-between;
|
|
17
17
|
padding: 0.5rem 1rem;
|
|
18
18
|
font-weight: var(--fw-semibold);
|
|
19
19
|
}
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
background-color: white;
|
|
80
80
|
|
|
81
81
|
& a {
|
|
82
|
-
text-decoration: underline;
|
|
83
82
|
color: inherit;
|
|
83
|
+
text-decoration: underline;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
&:empty {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"flex_stacker_display_name": "Stacker",
|
|
3
|
+
"flex_stacker_waste_chute_display_name": "Stacker + Waste chute",
|
|
4
|
+
"absorbance": "Absorbance",
|
|
5
|
+
"heater_Shaker": "Heater-Shaker",
|
|
6
|
+
"mag_block": "Mag",
|
|
7
|
+
"staging_area": "Stage",
|
|
8
|
+
"temperature": "Temperature",
|
|
9
|
+
"thermocycler": "Thermocycler",
|
|
10
|
+
"trash_bin": "Trash bin",
|
|
11
|
+
"waste": "Waste"
|
|
12
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import deck_configuration from './deck_configuration.json'
|
|
1
2
|
import protocol_command_text from './protocol_command_text.json'
|
|
2
3
|
|
|
3
4
|
// i18n files needed for unit testing. this is the quick fix for now until we figure out
|
|
@@ -5,4 +6,5 @@ import protocol_command_text from './protocol_command_text.json'
|
|
|
5
6
|
// translation across multiple projects
|
|
6
7
|
export const en = {
|
|
7
8
|
protocol_command_text,
|
|
9
|
+
deck_configuration,
|
|
8
10
|
}
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"move_to_addressable_area_drop_tip": "Moving to {{addressable_area}}",
|
|
61
61
|
"move_to_coordinates": "Moving to (X: {{x}}, Y: {{y}}, Z: {{z}})",
|
|
62
62
|
"move_to_slot": "Moving to Slot {{slot_name}}",
|
|
63
|
-
"move_to_well": "Moving to well {{
|
|
63
|
+
"move_to_well": "Moving to X {{xOffset}} Y {{yOffset}} Z {{zOffset}} relative to {{positionRelative}} of well {{wellName}} of {{labware}} in {{displayLocation}}",
|
|
64
64
|
"multiple": "multiple",
|
|
65
65
|
"notes": "notes",
|
|
66
66
|
"off_deck": "off deck",
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/react'
|
|
2
|
+
import { describe, expect, it } from 'vitest'
|
|
3
|
+
|
|
4
|
+
import { AnimationVideo } from '..'
|
|
5
|
+
|
|
6
|
+
describe('AnimationVideo', () => {
|
|
7
|
+
it('should have default props', () => {
|
|
8
|
+
render(<AnimationVideo data-testid="subject" />)
|
|
9
|
+
const videoNode = screen.getByTestId('subject')
|
|
10
|
+
expect(videoNode).toHaveAttribute('autoplay')
|
|
11
|
+
expect(videoNode).toHaveAttribute('loop')
|
|
12
|
+
expect(videoNode).not.toHaveAttribute('controls')
|
|
13
|
+
expect(videoNode).toHaveAttribute('disableRemotePlayback')
|
|
14
|
+
expect(videoNode).toHaveAttribute('disablePictureInPicture')
|
|
15
|
+
expect((videoNode as HTMLVideoElement).muted).toBeTruthy()
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
it('should merge default props with custom props', () => {
|
|
19
|
+
render(<AnimationVideo data-testid="subject" preload="auto" loop={false} />)
|
|
20
|
+
const videoNode = screen.getByTestId('subject')
|
|
21
|
+
expect(videoNode).toHaveAttribute('autoplay')
|
|
22
|
+
expect(videoNode).not.toHaveAttribute('loop') // Default overridden by custom.
|
|
23
|
+
expect(videoNode).not.toHaveAttribute('controls')
|
|
24
|
+
expect(videoNode).toHaveAttribute('disableRemotePlayback')
|
|
25
|
+
expect(videoNode).toHaveAttribute('disablePictureInPicture')
|
|
26
|
+
expect((videoNode as HTMLVideoElement).muted).toBeTruthy()
|
|
27
|
+
expect(videoNode).toHaveAttribute('preload', 'auto') // Custom-only.
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it('should render children', () => {
|
|
31
|
+
render(
|
|
32
|
+
<AnimationVideo>
|
|
33
|
+
<source data-testid="source1"></source>
|
|
34
|
+
<source data-testid="source2"></source>
|
|
35
|
+
</AnimationVideo>
|
|
36
|
+
)
|
|
37
|
+
screen.getByTestId('source1')
|
|
38
|
+
screen.getByTestId('source2')
|
|
39
|
+
})
|
|
40
|
+
})
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react'
|
|
2
|
+
|
|
3
|
+
export type AnimationVideoProps = ComponentProps<'video'>
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A `<video>` tag with default props for showing a looping animation.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```jsx
|
|
10
|
+
* <AnimationVideo>
|
|
11
|
+
* <source src="foo.webm" />
|
|
12
|
+
* </AnimationVideo>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export function AnimationVideo(props: AnimationVideoProps): JSX.Element {
|
|
16
|
+
const {
|
|
17
|
+
autoPlay = true,
|
|
18
|
+
loop = true,
|
|
19
|
+
// Our animations don't have audio, but we apparently need to pass `muted` anyway.
|
|
20
|
+
// It prevents the browser from trying to play audio on connected Bluetooth
|
|
21
|
+
// headphones, which would interrupt audio coming from other devices.
|
|
22
|
+
//
|
|
23
|
+
// Because of some React nonsense, the rendered DOM node will not have a `muted`
|
|
24
|
+
// attribute, but its `muted` property will be true, which is good enough.
|
|
25
|
+
// https://github.com/facebook/react/issues/10389
|
|
26
|
+
muted = true,
|
|
27
|
+
controls = false,
|
|
28
|
+
disableRemotePlayback = true,
|
|
29
|
+
disablePictureInPicture = true,
|
|
30
|
+
...restProps
|
|
31
|
+
} = props
|
|
32
|
+
return (
|
|
33
|
+
<video
|
|
34
|
+
autoPlay={autoPlay}
|
|
35
|
+
loop={loop}
|
|
36
|
+
muted={muted}
|
|
37
|
+
controls={controls}
|
|
38
|
+
disableRemotePlayback={disableRemotePlayback}
|
|
39
|
+
disablePictureInPicture={disablePictureInPicture}
|
|
40
|
+
{...restProps}
|
|
41
|
+
// Child <source>s rendered via {...restProps} spreading above.
|
|
42
|
+
/>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
@@ -42,7 +42,6 @@ describe('CheckboxField', () => {
|
|
|
42
42
|
const checkBoxIcon = screen.getByTestId('CheckboxField_icon')
|
|
43
43
|
|
|
44
44
|
// INNER_STYLE_NO_VALUE
|
|
45
|
-
expect(checkBoxIcon).toHaveStyle(`width: 1.25rem`)
|
|
46
45
|
expect(checkBoxIcon).toHaveStyle(`min-width: 1.25rem`)
|
|
47
46
|
expect(checkBoxIcon).toHaveStyle(`color: ${COLORS.grey50}`)
|
|
48
47
|
expect(checkBoxIcon).toHaveStyle(`display: flex`)
|
|
@@ -77,7 +76,6 @@ describe('CheckboxField', () => {
|
|
|
77
76
|
props.value = true
|
|
78
77
|
render(props)
|
|
79
78
|
const checkBoxIcon = screen.getByTestId('CheckboxField_icon')
|
|
80
|
-
expect(checkBoxIcon).toHaveStyle(`width: 1.25rem`)
|
|
81
79
|
expect(checkBoxIcon).toHaveStyle(`min-width: 1.25rem`)
|
|
82
80
|
expect(checkBoxIcon).toHaveStyle(`color: ${COLORS.blue50}`)
|
|
83
81
|
expect(checkBoxIcon).toHaveStyle(`display: flex`)
|
|
@@ -90,7 +88,6 @@ describe('CheckboxField', () => {
|
|
|
90
88
|
props.value = undefined
|
|
91
89
|
render(props)
|
|
92
90
|
const checkBoxIcon = screen.getByTestId('CheckboxField_icon')
|
|
93
|
-
expect(checkBoxIcon).toHaveStyle(`width: 1.25rem`)
|
|
94
91
|
expect(checkBoxIcon).toHaveStyle(`min-width: 1.25rem`)
|
|
95
92
|
expect(checkBoxIcon).toHaveStyle(`color: ${COLORS.grey50}`)
|
|
96
93
|
expect(checkBoxIcon).toHaveStyle(`display: flex`)
|
|
@@ -65,7 +65,7 @@ export function CheckboxField(props: CheckboxFieldProps): JSX.Element {
|
|
|
65
65
|
<Icon
|
|
66
66
|
css={value ?? false ? INNER_STYLE_VALUE : INNER_STYLE_NO_VALUE}
|
|
67
67
|
name={value ?? false ? 'ot-checkbox' : 'checkbox-blank-outline'}
|
|
68
|
-
width="
|
|
68
|
+
width="1.25rem"
|
|
69
69
|
data-testid="CheckboxField_icon"
|
|
70
70
|
/>
|
|
71
71
|
)}
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import { RESPONSIVENESS, SPACING, TYPOGRAPHY } from '../../ui-style-constants'
|
|
14
14
|
import { StyledText } from '../StyledText'
|
|
15
15
|
|
|
16
|
+
import type { FlattenSimpleInterpolation } from 'styled-components'
|
|
16
17
|
import type { MouseEventHandler } from 'react'
|
|
17
18
|
import type { IconProps } from '../../icons'
|
|
18
19
|
import type { StyleProps } from '../../primitives'
|
|
@@ -23,7 +24,7 @@ export interface InlineNotificationProps extends StyleProps {
|
|
|
23
24
|
/** name constant of the icon to display */
|
|
24
25
|
type: InlineNotificationType
|
|
25
26
|
/** InlineNotification contents */
|
|
26
|
-
heading
|
|
27
|
+
heading?: string
|
|
27
28
|
message?: string
|
|
28
29
|
/** Optional dynamic width based on contents */
|
|
29
30
|
hug?: boolean
|
|
@@ -79,46 +80,16 @@ export function InlineNotification(
|
|
|
79
80
|
color: INLINE_NOTIFICATION_PROPS_BY_TYPE[type].color,
|
|
80
81
|
size: '100%',
|
|
81
82
|
}
|
|
83
|
+
const backgroundColor =
|
|
84
|
+
INLINE_NOTIFICATION_PROPS_BY_TYPE[type].backgroundColor
|
|
85
|
+
|
|
82
86
|
return (
|
|
83
87
|
<Flex
|
|
84
|
-
alignItems={ALIGN_CENTER}
|
|
85
|
-
backgroundColor={INLINE_NOTIFICATION_PROPS_BY_TYPE[type].backgroundColor}
|
|
86
88
|
data-testid={`InlineNotification_${type}`}
|
|
87
|
-
|
|
88
|
-
justifyContent={JUSTIFY_SPACE_BETWEEN}
|
|
89
|
-
width={hug ? 'max-content' : '100%'}
|
|
90
|
-
css={css`
|
|
91
|
-
gap: ${SPACING.spacing8};
|
|
92
|
-
border-radius: ${BORDERS.borderRadius4};
|
|
93
|
-
padding: ${SPACING.spacing8} ${SPACING.spacing12};
|
|
94
|
-
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
|
|
95
|
-
gap: ${SPACING.spacing12};
|
|
96
|
-
border-radius: ${BORDERS.borderRadius8};
|
|
97
|
-
padding: ${SPACING.spacing12} ${SPACING.spacing16};
|
|
98
|
-
}
|
|
99
|
-
`}
|
|
89
|
+
css={INLINE_NOTIFICATION_WRAPPER_STYLES(backgroundColor, hug)}
|
|
100
90
|
>
|
|
101
|
-
<Flex
|
|
102
|
-
|
|
103
|
-
alignItems={ALIGN_CENTER}
|
|
104
|
-
flexDirection={DIRECTION_ROW}
|
|
105
|
-
css={css`
|
|
106
|
-
gap: ${SPACING.spacing8};
|
|
107
|
-
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
|
|
108
|
-
gap: ${SPACING.spacing12};
|
|
109
|
-
}
|
|
110
|
-
`}
|
|
111
|
-
>
|
|
112
|
-
<Box
|
|
113
|
-
css={css`
|
|
114
|
-
width: ${SPACING.spacing16};
|
|
115
|
-
height: ${SPACING.spacing16};
|
|
116
|
-
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
|
|
117
|
-
width: 1.75rem;
|
|
118
|
-
height: 1.75rem;
|
|
119
|
-
}
|
|
120
|
-
`}
|
|
121
|
-
>
|
|
91
|
+
<Flex css={INLINE_NOTIFICATION_FLEX_STYLE}>
|
|
92
|
+
<Box css={INLINE_NOTIFICATION_BOX_STYLE}>
|
|
122
93
|
<Icon {...iconProps} aria-label={`icon_${type}`} />
|
|
123
94
|
</Box>
|
|
124
95
|
<Flex flex="1" alignItems={ALIGN_CENTER}>
|
|
@@ -126,22 +97,26 @@ export function InlineNotification(
|
|
|
126
97
|
oddStyle="bodyTextRegular"
|
|
127
98
|
desktopStyle="bodyDefaultRegular"
|
|
128
99
|
>
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
100
|
+
{heading != null && (
|
|
101
|
+
<>
|
|
102
|
+
<span
|
|
103
|
+
css={`
|
|
104
|
+
font-weight: ${TYPOGRAPHY.fontWeightSemiBold};
|
|
105
|
+
`}
|
|
106
|
+
>
|
|
107
|
+
{fullHeading}
|
|
108
|
+
</span>
|
|
109
|
+
{/* this break is because the desktop wants this on two lines, but also wants/
|
|
110
|
+
inline text layout on ODD. Soooo here you go */}
|
|
111
|
+
<br
|
|
112
|
+
css={`
|
|
113
|
+
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
|
|
114
|
+
display: none;
|
|
115
|
+
}
|
|
116
|
+
`}
|
|
117
|
+
/>
|
|
118
|
+
</>
|
|
119
|
+
)}
|
|
145
120
|
{message != null && fullmessage}
|
|
146
121
|
</StyledText>
|
|
147
122
|
</Flex>
|
|
@@ -166,28 +141,13 @@ export function InlineNotification(
|
|
|
166
141
|
<Btn
|
|
167
142
|
data-testid="InlineNotification_close-button"
|
|
168
143
|
onClick={onCloseClick}
|
|
169
|
-
css={
|
|
170
|
-
width: 28px;
|
|
171
|
-
height: 28px;
|
|
172
|
-
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
|
|
173
|
-
width: ${SPACING.spacing48};
|
|
174
|
-
height: ${SPACING.spacing48};
|
|
175
|
-
}
|
|
176
|
-
`}
|
|
177
|
-
width=""
|
|
144
|
+
css={INLINE_NOTIFICATION_CLOSE_BUTTON_STYLE}
|
|
178
145
|
height="fit-content"
|
|
179
146
|
>
|
|
180
147
|
<Icon
|
|
181
148
|
aria-label="close_icon"
|
|
182
149
|
name="close"
|
|
183
|
-
css={
|
|
184
|
-
width: 28px;
|
|
185
|
-
height: 28px;
|
|
186
|
-
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
|
|
187
|
-
width: ${SPACING.spacing48};
|
|
188
|
-
height: ${SPACING.spacing48};
|
|
189
|
-
}
|
|
190
|
-
`}
|
|
150
|
+
css={INLINE_NOTIFICATION_ICON_STYLE}
|
|
191
151
|
/>
|
|
192
152
|
</Btn>
|
|
193
153
|
)}
|
|
@@ -195,3 +155,59 @@ export function InlineNotification(
|
|
|
195
155
|
</Flex>
|
|
196
156
|
)
|
|
197
157
|
}
|
|
158
|
+
|
|
159
|
+
const INLINE_NOTIFICATION_WRAPPER_STYLES = (
|
|
160
|
+
backgroundColor: string,
|
|
161
|
+
hug: boolean
|
|
162
|
+
): FlattenSimpleInterpolation => css`
|
|
163
|
+
background-color: ${backgroundColor};
|
|
164
|
+
align-items: ${ALIGN_CENTER};
|
|
165
|
+
flex-direction: ${DIRECTION_ROW};
|
|
166
|
+
justify-content: ${JUSTIFY_SPACE_BETWEEN};
|
|
167
|
+
width: ${hug ? 'max-content' : '100%'};
|
|
168
|
+
gap: ${SPACING.spacing8};
|
|
169
|
+
border-radius: ${BORDERS.borderRadius4};
|
|
170
|
+
padding: ${SPACING.spacing8} ${SPACING.spacing12};
|
|
171
|
+
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
|
|
172
|
+
gap: ${SPACING.spacing12};
|
|
173
|
+
border-radius: ${BORDERS.borderRadius8};
|
|
174
|
+
padding: ${SPACING.spacing12} ${SPACING.spacing16};
|
|
175
|
+
}
|
|
176
|
+
`
|
|
177
|
+
|
|
178
|
+
const INLINE_NOTIFICATION_FLEX_STYLE = css`
|
|
179
|
+
justify-content: ${JUSTIFY_FLEX_START};
|
|
180
|
+
align-items: ${ALIGN_CENTER};
|
|
181
|
+
flex-direction: ${DIRECTION_ROW};
|
|
182
|
+
gap: ${SPACING.spacing8};
|
|
183
|
+
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
|
|
184
|
+
gap: ${SPACING.spacing12};
|
|
185
|
+
}
|
|
186
|
+
`
|
|
187
|
+
|
|
188
|
+
const INLINE_NOTIFICATION_BOX_STYLE = css`
|
|
189
|
+
width: 1rem;
|
|
190
|
+
height: 1rem;
|
|
191
|
+
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
|
|
192
|
+
width: 1.75rem;
|
|
193
|
+
height: 1.75rem;
|
|
194
|
+
}
|
|
195
|
+
`
|
|
196
|
+
|
|
197
|
+
const INLINE_NOTIFICATION_CLOSE_BUTTON_STYLE = css`
|
|
198
|
+
width: 1.75rem;
|
|
199
|
+
height: 1.75rem;
|
|
200
|
+
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
|
|
201
|
+
width: 3rem;
|
|
202
|
+
height: 3rem;
|
|
203
|
+
}
|
|
204
|
+
`
|
|
205
|
+
|
|
206
|
+
const INLINE_NOTIFICATION_ICON_STYLE = css`
|
|
207
|
+
width: 1.75rem;
|
|
208
|
+
height: 1.75rem;
|
|
209
|
+
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
|
|
210
|
+
width: 3rem;
|
|
211
|
+
height: 3rem;
|
|
212
|
+
}
|
|
213
|
+
`
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
|
|
3
|
-
import { StyledText } from '../..'
|
|
3
|
+
import { CustomizeExpandButton, StyledText } from '../..'
|
|
4
4
|
import { STYLE_PROPS } from '../../primitives'
|
|
5
5
|
import { ListButton as ListButtonComponent } from './index'
|
|
6
6
|
import {
|
|
7
7
|
ListButtonAccordion,
|
|
8
8
|
ListButtonAccordionContainer,
|
|
9
|
-
ListButtonRadioButton,
|
|
10
9
|
} from './ListButtonChildren/index'
|
|
11
10
|
|
|
12
11
|
import type { Meta, StoryObj } from '@storybook/react'
|
|
@@ -58,8 +57,11 @@ const Template = (args: ListButtonComponentProps): JSX.Element => {
|
|
|
58
57
|
>
|
|
59
58
|
<ListButtonAccordionContainer id="mainAccordionContainer">
|
|
60
59
|
<>
|
|
61
|
-
<
|
|
60
|
+
<CustomizeExpandButton
|
|
61
|
+
enableStackingFF={false}
|
|
62
62
|
key="buttonNested"
|
|
63
|
+
allowInputField={false}
|
|
64
|
+
loadName="mockloadname0"
|
|
63
65
|
isSelected={buttonValue === 'radio button nested'}
|
|
64
66
|
buttonValue="radio button nested"
|
|
65
67
|
buttonText="Radio button, click to expand nested accordion"
|
|
@@ -78,7 +80,10 @@ const Template = (args: ListButtonComponentProps): JSX.Element => {
|
|
|
78
80
|
isExpanded={buttonValue === 'radio button nested'}
|
|
79
81
|
>
|
|
80
82
|
<>
|
|
81
|
-
<
|
|
83
|
+
<CustomizeExpandButton
|
|
84
|
+
enableStackingFF={false}
|
|
85
|
+
allowInputField={false}
|
|
86
|
+
loadName="mockloadname1"
|
|
82
87
|
isSelected={nestedButtonValue === 'radio button1'}
|
|
83
88
|
buttonValue="radio button1"
|
|
84
89
|
buttonText="nested button"
|
|
@@ -92,7 +97,10 @@ const Template = (args: ListButtonComponentProps): JSX.Element => {
|
|
|
92
97
|
</StyledText>
|
|
93
98
|
) : null}
|
|
94
99
|
</>
|
|
95
|
-
<
|
|
100
|
+
<CustomizeExpandButton
|
|
101
|
+
enableStackingFF={false}
|
|
102
|
+
allowInputField={false}
|
|
103
|
+
loadName="mockloadname2"
|
|
96
104
|
isSelected={nestedButtonValue === 'radio button2'}
|
|
97
105
|
buttonValue="radio button2"
|
|
98
106
|
buttonText="nested button 2"
|
|
@@ -100,7 +108,10 @@ const Template = (args: ListButtonComponentProps): JSX.Element => {
|
|
|
100
108
|
setNestedButtonValue('radio button2')
|
|
101
109
|
}}
|
|
102
110
|
/>
|
|
103
|
-
<
|
|
111
|
+
<CustomizeExpandButton
|
|
112
|
+
enableStackingFF={false}
|
|
113
|
+
allowInputField={false}
|
|
114
|
+
loadName="mockloadname3"
|
|
104
115
|
isSelected={nestedButtonValue === 'radio button3'}
|
|
105
116
|
buttonValue="radio button3"
|
|
106
117
|
buttonText="nested button 3"
|
|
@@ -113,8 +124,11 @@ const Template = (args: ListButtonComponentProps): JSX.Element => {
|
|
|
113
124
|
) : null}
|
|
114
125
|
</>
|
|
115
126
|
<>
|
|
116
|
-
<
|
|
127
|
+
<CustomizeExpandButton
|
|
128
|
+
enableStackingFF={false}
|
|
117
129
|
key="buttonNonNested"
|
|
130
|
+
allowInputField={false}
|
|
131
|
+
loadName="mockloadname4"
|
|
118
132
|
isSelected={buttonValue === 'radio button non nest'}
|
|
119
133
|
buttonValue="radio button non nest"
|
|
120
134
|
buttonText="Radio button without nested"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Flex } from '../../../primitives'
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
ALIGN_CENTER,
|
|
4
4
|
DIRECTION_COLUMN,
|
|
5
5
|
DIRECTION_ROW,
|
|
6
6
|
JUSTIFY_FLEX_START,
|
|
@@ -35,7 +35,7 @@ export const ListItemDescriptor = (
|
|
|
35
35
|
flexDirection={changeFlexDirection ? DIRECTION_COLUMN : DIRECTION_ROW}
|
|
36
36
|
gridGap={SPACING.spacing8}
|
|
37
37
|
width="100%"
|
|
38
|
-
alignItems={
|
|
38
|
+
alignItems={ALIGN_CENTER}
|
|
39
39
|
justifyContent={justifyContent}
|
|
40
40
|
padding={type === 'default' ? SPACING.spacing4 : SPACING.spacing12}
|
|
41
41
|
>
|
|
@@ -20,47 +20,7 @@ export const OverflowBtn: (
|
|
|
20
20
|
): JSX.Element => {
|
|
21
21
|
const { fillColor, ...restProps } = props
|
|
22
22
|
return (
|
|
23
|
-
<Btn
|
|
24
|
-
css={css`
|
|
25
|
-
border-radius: ${BORDERS.borderRadius4};
|
|
26
|
-
max-height: ${SPACING.spacing32};
|
|
27
|
-
|
|
28
|
-
&:hover {
|
|
29
|
-
background-color: ${COLORS.grey30};
|
|
30
|
-
}
|
|
31
|
-
&:hover circle {
|
|
32
|
-
fill: ${COLORS.grey55};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&:active,
|
|
36
|
-
&:focus {
|
|
37
|
-
background-color: ${COLORS.grey35};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&:active circle,
|
|
41
|
-
&:focus circle {
|
|
42
|
-
fill: ${COLORS.grey60};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&:focus-visible {
|
|
46
|
-
box-shadow: ${`0 0 0 3px ${COLORS.yellow50}`};
|
|
47
|
-
background-color: ${'transparent'};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&:focus-visible circle {
|
|
51
|
-
fill: ${COLORS.grey60};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&:disabled circle {
|
|
55
|
-
fill: ${COLORS.grey40};
|
|
56
|
-
}
|
|
57
|
-
&:disabled {
|
|
58
|
-
background-color: transparent;
|
|
59
|
-
}
|
|
60
|
-
`}
|
|
61
|
-
{...restProps}
|
|
62
|
-
ref={ref}
|
|
63
|
-
>
|
|
23
|
+
<Btn css={OVERFLOW_MENU_BUTTON_STYLE} {...restProps} ref={ref}>
|
|
64
24
|
<svg
|
|
65
25
|
width="19"
|
|
66
26
|
height="31"
|
|
@@ -76,3 +36,41 @@ export const OverflowBtn: (
|
|
|
76
36
|
)
|
|
77
37
|
}
|
|
78
38
|
)
|
|
39
|
+
|
|
40
|
+
const OVERFLOW_MENU_BUTTON_STYLE = css`
|
|
41
|
+
border-radius: ${BORDERS.borderRadius4};
|
|
42
|
+
max-height: ${SPACING.spacing32};
|
|
43
|
+
|
|
44
|
+
&:hover {
|
|
45
|
+
background-color: ${COLORS.grey30};
|
|
46
|
+
}
|
|
47
|
+
&:hover circle {
|
|
48
|
+
fill: ${COLORS.grey55};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:active,
|
|
52
|
+
&:focus {
|
|
53
|
+
background-color: ${COLORS.grey35};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:active circle,
|
|
57
|
+
&:focus circle {
|
|
58
|
+
fill: ${COLORS.grey60};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:focus-visible {
|
|
62
|
+
box-shadow: ${`0 0 0 3px ${COLORS.yellow50}`};
|
|
63
|
+
background-color: ${COLORS.transparent};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:focus-visible circle {
|
|
67
|
+
fill: ${COLORS.grey60};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:disabled circle {
|
|
71
|
+
fill: ${COLORS.grey40};
|
|
72
|
+
}
|
|
73
|
+
&:disabled {
|
|
74
|
+
background-color: ${COLORS.transparent};
|
|
75
|
+
}
|
|
76
|
+
`
|