@opentrons/components 0.2.1-alpha.0 → 0.3.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.
Files changed (219) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +12 -48
  3. package/lib/assets/index.d.ts +1 -0
  4. package/lib/assets/localization/en/index.d.ts +191 -16
  5. package/lib/assets/localization/index.d.ts +292 -13
  6. package/lib/assets/localization/zh/index.d.ts +110 -8
  7. package/lib/atoms/Checkbox/index.d.ts +3 -3
  8. package/lib/atoms/CheckboxField/index.d.ts +2 -0
  9. package/lib/atoms/FixedTrashText/index.d.ts +1 -0
  10. package/lib/atoms/InlineNotification/index.d.ts +1 -1
  11. package/lib/atoms/ListButton/index.d.ts +2 -2
  12. package/lib/atoms/MenuList/OverflowBtn.d.ts +2 -2
  13. package/lib/atoms/Slider/index.d.ts +14 -0
  14. package/lib/atoms/StepMeter/__tests__/StepMeter.test.d.ts +1 -1
  15. package/lib/atoms/StepMeter/index.d.ts +1 -2
  16. package/lib/atoms/StyledText/LegacyStyledText.d.ts +3 -1
  17. package/lib/atoms/StyledText/PlaceholderStyledText.d.ts +14 -0
  18. package/lib/atoms/StyledText/StyledText.d.ts +1 -0
  19. package/lib/atoms/StyledText/index.d.ts +1 -0
  20. package/lib/atoms/Tag/index.d.ts +1 -1
  21. package/lib/atoms/buttons/AlertPrimaryButton.d.ts +3 -1
  22. package/lib/atoms/buttons/AltPrimaryButton.d.ts +3 -1
  23. package/lib/atoms/buttons/PrimaryButton.d.ts +2 -1
  24. package/lib/atoms/buttons/TertiaryButton.d.ts +8 -3
  25. package/lib/atoms/index.d.ts +2 -1
  26. package/lib/buttons/Button.d.ts +3 -3
  27. package/lib/controls/ToggleButton.d.ts +1 -1
  28. package/lib/forms/DeprecatedCheckboxField.d.ts +2 -2
  29. package/lib/forms/FormGroup.d.ts +4 -4
  30. package/lib/forms/LegacyInputField.d.ts +5 -5
  31. package/lib/forms/RadioGroup.d.ts +2 -2
  32. package/lib/forms/ToggleField.d.ts +1 -1
  33. package/lib/hardware-sim/BaseDeck/BaseDeck.d.ts +19 -11
  34. package/lib/hardware-sim/BaseDeck/SingleSlotFixture.d.ts +2 -0
  35. package/lib/hardware-sim/BaseDeck/StackedBadge.d.ts +1 -0
  36. package/lib/hardware-sim/BaseDeck/StagingAreaFixture.d.ts +1 -0
  37. package/lib/hardware-sim/BaseDeck/WasteChuteStagingAreaFixture.d.ts +1 -0
  38. package/lib/hardware-sim/Deck/MoveLabwareOnDeck.d.ts +3 -2
  39. package/lib/hardware-sim/Deck/RobotCoordsForeignDiv.d.ts +6 -5
  40. package/lib/hardware-sim/Deck/RobotCoordsForeignObject.d.ts +8 -5
  41. package/lib/hardware-sim/Deck/RobotWorkSpace.d.ts +2 -3
  42. package/lib/hardware-sim/DeckConfigurator/VacuumModuleItem.d.ts +11 -0
  43. package/lib/hardware-sim/DeckConfigurator/constants.d.ts +5 -0
  44. package/lib/hardware-sim/Labware/Labware.d.ts +3 -3
  45. package/lib/hardware-sim/Labware/LabwareAdapter/GenericLid.d.ts +9 -0
  46. package/lib/hardware-sim/Labware/LabwareAdapter/OpentronsUniversalFlatAdapterTypeB.d.ts +1 -0
  47. package/lib/hardware-sim/Labware/LabwareAdapter/index.d.ts +11 -3
  48. package/lib/hardware-sim/Labware/LabwareRender.d.ts +9 -9
  49. package/lib/hardware-sim/Labware/index.d.ts +1 -1
  50. package/lib/hardware-sim/Labware/labwareInternals/LabwareOutline.d.ts +1 -1
  51. package/lib/hardware-sim/Labware/labwareInternals/LabwareWellLabels.d.ts +1 -1
  52. package/lib/hardware-sim/Labware/labwareInternals/StaticLabware.d.ts +7 -2
  53. package/lib/hardware-sim/Labware/labwareInternals/Tips/InaccessibleTip.d.ts +3 -0
  54. package/lib/hardware-sim/Labware/labwareInternals/Tips/NewTip.d.ts +4 -0
  55. package/lib/hardware-sim/Labware/labwareInternals/Tips/TipStatus.d.ts +11 -0
  56. package/lib/hardware-sim/Labware/labwareInternals/Tips/UsedTip.d.ts +4 -0
  57. package/lib/hardware-sim/Labware/labwareInternals/Tips/__tests__/TipStatus.test.d.ts +1 -0
  58. package/lib/hardware-sim/Labware/labwareInternals/Tips/constants.d.ts +11 -0
  59. package/lib/hardware-sim/Labware/labwareInternals/Tips/index.d.ts +2 -0
  60. package/lib/hardware-sim/Labware/labwareInternals/Wells/EmptyWell.d.ts +10 -0
  61. package/lib/hardware-sim/Labware/labwareInternals/{FilledWells.d.ts → Wells/FilledWells.d.ts} +3 -3
  62. package/lib/hardware-sim/Labware/labwareInternals/Wells/SelectedWell.d.ts +13 -0
  63. package/lib/hardware-sim/Labware/labwareInternals/{StrokedWells.d.ts → Wells/StrokedWells.d.ts} +2 -2
  64. package/lib/hardware-sim/Labware/labwareInternals/{StyledWells.d.ts → Wells/StyledWells.d.ts} +1 -1
  65. package/lib/hardware-sim/Labware/labwareInternals/{Well.d.ts → Wells/Well.d.ts} +2 -3
  66. package/lib/hardware-sim/Labware/labwareInternals/{WellLabels.d.ts → Wells/WellLabels.d.ts} +2 -2
  67. package/lib/hardware-sim/Labware/labwareInternals/Wells/WellStatus.d.ts +12 -0
  68. package/lib/hardware-sim/Labware/labwareInternals/Wells/constants.d.ts +21 -0
  69. package/lib/hardware-sim/Labware/labwareInternals/Wells/index.d.ts +9 -0
  70. package/lib/hardware-sim/Labware/labwareInternals/Wells/utils.d.ts +2 -0
  71. package/lib/hardware-sim/Labware/labwareInternals/index.d.ts +2 -5
  72. package/lib/hardware-sim/Labware/labwareInternals/types.d.ts +10 -12
  73. package/lib/hardware-sim/Module/Vacuum.d.ts +1 -0
  74. package/lib/hardware-sim/Module/index.d.ts +40 -5
  75. package/lib/hardware-sim/Pipette/StrokedNozzles.d.ts +10 -0
  76. package/lib/hardware-sim/Pipette/constants.d.ts +3 -0
  77. package/lib/hardware-sim/Pipette/index.d.ts +1 -0
  78. package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpace.d.ts +5 -3
  79. package/lib/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpaceWithRef.d.ts +5 -4
  80. package/lib/hardware-sim/alignment/AlignToModuleChildSlot.d.ts +25 -0
  81. package/lib/hardware-sim/alignment/CenterLabwareInModuleChildSlot.d.ts +33 -0
  82. package/lib/hardware-sim/alignment/CenterLabwareInSlot.d.ts +11 -0
  83. package/lib/hardware-sim/alignment/index.d.ts +4 -0
  84. package/lib/hardware-sim/index.d.ts +1 -0
  85. package/lib/helix-design-system/colors.d.ts +1 -0
  86. package/lib/hocs/withStyleProps.d.ts +1 -1
  87. package/lib/hooks/__tests__/useCommandTypeSummaries.test.d.ts +1 -0
  88. package/lib/hooks/index.d.ts +2 -1
  89. package/lib/hooks/testHelpers/index.d.ts +2 -0
  90. package/lib/hooks/useCommandTypeSummaries.d.ts +2 -0
  91. package/lib/hooks/useConditionalConfirm.d.ts +5 -9
  92. package/lib/i18n.d.ts +4 -0
  93. package/lib/icons/ModuleIcon.d.ts +5 -4
  94. package/lib/icons/icon-data.d.ts +702 -4
  95. package/lib/index.d.ts +2 -1
  96. package/lib/index.js +557 -0
  97. package/lib/index.mjs +30626 -28730
  98. package/lib/interaction-enhancers/HandleKeypress.d.ts +2 -2
  99. package/lib/legacy-hardware-sim/LabwareNameOverlay.d.ts +1 -1
  100. package/lib/legacy-hardware-sim/index.d.ts +0 -1
  101. package/lib/modals/AlertModal.d.ts +1 -1
  102. package/lib/molecules/CustomizeExpandButton/index.d.ts +2 -2
  103. package/lib/molecules/DeckInfoLabel/index.d.ts +8 -20
  104. package/lib/molecules/DeckLabel/index.d.ts +9 -2
  105. package/lib/molecules/DropdownMenu/index.d.ts +5 -4
  106. package/lib/molecules/IconButton/index.d.ts +45 -0
  107. package/lib/molecules/InfoScreen/index.d.ts +3 -1
  108. package/lib/molecules/InputField/__tests__/InputField.test.d.ts +1 -0
  109. package/lib/{atoms → molecules}/InputField/index.d.ts +13 -12
  110. package/lib/molecules/LiquidIcon/index.d.ts +2 -1
  111. package/lib/molecules/RobotInfoLabel/__tests__/RobotInfoLabel.test.d.ts +1 -0
  112. package/lib/molecules/RobotInfoLabel/index.d.ts +12 -0
  113. package/lib/molecules/StepGroup/__tests__/StepGroup.test.d.ts +1 -0
  114. package/lib/molecules/StepGroup/index.d.ts +11 -0
  115. package/lib/molecules/TextAreaField/__tests__/TextAreaField.test.d.ts +1 -0
  116. package/lib/molecules/TextAreaField/index.d.ts +34 -0
  117. package/lib/molecules/TimelineScrubber/TrackSlider.d.ts +10 -0
  118. package/lib/molecules/TimelineScrubber/index.d.ts +6 -0
  119. package/lib/molecules/TouchInputField/__tests__/TouchInputField.test.d.ts +1 -0
  120. package/lib/molecules/TouchInputField/index.d.ts +56 -0
  121. package/lib/molecules/WizardHeader/__tests__/WizardHeader.test.d.ts +1 -0
  122. package/lib/molecules/WizardHeader/index.d.ts +11 -0
  123. package/lib/molecules/index.d.ts +8 -1
  124. package/lib/organisms/CommandText/getCommandData.d.ts +3 -0
  125. package/lib/organisms/CommandText/index.d.ts +2 -1
  126. package/lib/organisms/CommandText/useCommandTextString/index.d.ts +8 -3
  127. package/lib/organisms/CommandText/useCommandTextString/utils/commandText/__tests__/getTipStateCommandText.test.d.ts +1 -0
  128. package/lib/organisms/CommandText/useCommandTextString/utils/commandText/getConcurrentCommandText.d.ts +3 -0
  129. package/lib/organisms/CommandText/useCommandTextString/utils/commandText/getHSConcurrentShakeSpeedCommandTex.d.ts +3 -0
  130. package/lib/organisms/CommandText/useCommandTextString/utils/commandText/getRobotDevicesCommandText.d.ts +3 -0
  131. package/lib/organisms/CommandText/useCommandTextString/utils/commandText/getTCStartRunExtendedProfileCommandText.d.ts +4 -0
  132. package/lib/organisms/CommandText/useCommandTextString/utils/commandText/getTipStateCommandText.d.ts +3 -0
  133. package/lib/organisms/CommandText/useCommandTextString/utils/commandText/index.d.ts +5 -0
  134. package/lib/organisms/CommandText/useCommandTextString/utils/getLabwareDisplayLocation.d.ts +2 -0
  135. package/lib/organisms/CommandText/useCommandTextString/utils/getLiquidDisplayName.d.ts +2 -1
  136. package/lib/organisms/CommandText/useCommandTextString/utils/types.d.ts +2 -1
  137. package/lib/organisms/DeckLabelSet/index.d.ts +1 -0
  138. package/lib/organisms/FixtureOption/index.d.ts +0 -1
  139. package/lib/organisms/LabwareDetailsWithCount/__tests__/LabwareDetailsWithCount.test.d.ts +1 -0
  140. package/lib/organisms/LabwareDetailsWithCount/index.d.ts +7 -0
  141. package/lib/organisms/LabwareInfoOverlay/__tests__/LabwareInfoOverlay.test.d.ts +1 -0
  142. package/lib/organisms/LabwareInfoOverlay/index.d.ts +12 -0
  143. package/lib/organisms/ProtocolDeck/index.d.ts +1 -0
  144. package/lib/organisms/Toolbox/index.d.ts +2 -0
  145. package/lib/organisms/index.d.ts +4 -3
  146. package/lib/primitives/Box.d.ts +3 -7
  147. package/lib/primitives/Btn.d.ts +2 -55
  148. package/lib/primitives/Buttons/NewPrimaryBtn.d.ts +8 -0
  149. package/lib/primitives/Buttons/NewSecondaryBtn.d.ts +8 -0
  150. package/lib/primitives/Flex.d.ts +3 -7
  151. package/lib/primitives/ForeignObject.d.ts +8 -18
  152. package/lib/primitives/Link.d.ts +3 -7
  153. package/lib/primitives/Svg.d.ts +4 -13
  154. package/lib/primitives/Text.d.ts +5 -7
  155. package/lib/primitives/index.d.ts +2 -0
  156. package/lib/primitives/style-props.d.ts +3 -3
  157. package/lib/primitives/types.d.ts +10 -3
  158. package/lib/src/alerts/alerts.module.css +103 -0
  159. package/lib/src/atoms/StyledText/placeholderstyledtext.module.css +26 -0
  160. package/lib/src/buttons/buttons.module.css +428 -0
  161. package/lib/src/controls/styles.module.css +103 -0
  162. package/lib/src/forms/Select.module.css +118 -0
  163. package/lib/src/forms/SelectField.module.css +16 -0
  164. package/lib/src/forms/forms.module.css +240 -0
  165. package/lib/src/hardware-sim/BaseDeck/basedeck.module.css +20 -0
  166. package/lib/src/hardware-sim/Deck/deck.module.css +54 -0
  167. package/lib/src/hardware-sim/Labware/labware.module.css +8 -0
  168. package/lib/src/hardware-sim/RobotCoordinateSpace/robotcoordinatespace.module.css +3 -0
  169. package/lib/src/icons/icon.module.css +10 -0
  170. package/lib/src/index.module.css +9 -0
  171. package/lib/src/instrument/PipetteSelect.module.css +14 -0
  172. package/lib/src/legacy-hardware-sim/LabwareNameOverlay.module.css +20 -0
  173. package/lib/src/legacy-hardware-sim/ModuleItem.module.css +98 -0
  174. package/lib/src/lists/lists.module.css +171 -0
  175. package/lib/src/modals/modals.module.css +275 -0
  176. package/lib/src/molecules/DeckInfoLabel/deckinfolabel.module.css +42 -0
  177. package/lib/src/molecules/ReleaseNotes/styles.module.css +66 -0
  178. package/lib/src/nav/SidePanel.module.css +34 -0
  179. package/lib/src/slotmap/styles.module.css +18 -0
  180. package/lib/src/structure/Pill.module.css +16 -0
  181. package/lib/src/structure/Splash.module.css +16 -0
  182. package/lib/src/structure/structure.module.css +114 -0
  183. package/lib/src/styles/borders.module.css +20 -0
  184. package/lib/src/styles/colors.module.css +58 -0
  185. package/lib/src/styles/global.css +179 -0
  186. package/lib/src/styles/index.module.css +8 -0
  187. package/lib/src/styles/typography.module.css +23 -0
  188. package/lib/src/tooltips/tooltips.module.css +72 -0
  189. package/lib/structure/Pill.d.ts +3 -3
  190. package/lib/style.css +1 -1
  191. package/lib/testing/utils/matchers.d.ts +0 -1
  192. package/lib/utils/__tests__/setRefs.test.d.ts +1 -0
  193. package/lib/utils/__tests__/truncateString.test.d.ts +1 -0
  194. package/lib/utils/humanizeLabwareType.d.ts +1 -0
  195. package/lib/utils/index.d.ts +4 -0
  196. package/lib/utils/setRefs.d.ts +2 -0
  197. package/lib/{utils.d.ts → utils/truncateString.d.ts} +0 -2
  198. package/lib/utils/wellNameSplit.d.ts +1 -0
  199. package/package.json +21 -26
  200. package/src/index.module.css +9 -0
  201. package/src/styles/borders.module.css +20 -0
  202. package/src/styles/borders.ts +16 -0
  203. package/src/styles/colors.module.css +52 -0
  204. package/src/styles/colors.ts +58 -0
  205. package/src/styles/cursor.ts +12 -0
  206. package/src/styles/flexbox.ts +39 -0
  207. package/src/styles/global.css +180 -0
  208. package/src/styles/index.module.css +8 -0
  209. package/src/styles/index.ts +8 -0
  210. package/src/styles/layout.ts +31 -0
  211. package/src/styles/position.ts +5 -0
  212. package/src/styles/spacing.ts +11 -0
  213. package/src/styles/typography.module.css +23 -0
  214. package/src/styles/typography.ts +90 -0
  215. package/lib/legacy-hardware-sim/ModuleItem.d.ts +0 -17
  216. /package/lib/{__tests__/utils.test.d.ts → atoms/Slider/__tests__/Slider.test.d.ts} +0 -0
  217. /package/lib/{atoms/InputField/__tests__/InputField.test.d.ts → hardware-sim/DeckConfigurator/__tests__/VacuumModuleItem.test.d.ts} +0 -0
  218. /package/lib/hardware-sim/Labware/labwareInternals/{__tests__ → Wells/__tests__}/StrokedWells.test.d.ts +0 -0
  219. /package/lib/hardware-sim/Labware/labwareInternals/{__tests__ → Wells/__tests__}/WellLabels.test.d.ts +0 -0
@@ -0,0 +1,428 @@
1
+ /* button styling */
2
+ @import '../index.module.css';
3
+
4
+ :root {
5
+ --button-pad: 0.5rem;
6
+
7
+ --button-inverted: {
8
+ border-color: var(--c-font-light);
9
+
10
+ /* VVV from legacy --button-inverted VVV */
11
+ color: var(--c-font-light);
12
+
13
+ &:active {
14
+ background-color: color-mod(var(--c-bg-dark) tint(10%));
15
+ font-weight: var(--fw-regular);
16
+ }
17
+
18
+ &:focus {
19
+ background-color: color-mod(var(--c-bg-dark) tint(5%));
20
+ }
21
+
22
+ &:hover {
23
+ background-color: color-mod(var(--c-bg-dark) tint(5%));
24
+ }
25
+
26
+ &:disabled,
27
+ &.disabled {
28
+ /* from legacy --button-disabled */
29
+ border-color: var(--c-font-disabled);
30
+ background-color: transparent;
31
+
32
+ /* from legacy --button-disabled */
33
+ color: var(--c-font-disabled);
34
+
35
+ /* from legacy --button-disabled */
36
+ cursor: default;
37
+
38
+ /* from legacy --button-disabled */
39
+ fill: var(--c-font-disabled);
40
+
41
+ /* from legacy --button-disabled */
42
+ font-weight: normal;
43
+
44
+ /* from legacy --button-disabled */
45
+ pointer-events: none;
46
+
47
+ /* from legacy --button-disabled */
48
+ }
49
+
50
+ &.hover {
51
+ background-color: color-mod(var(--c-bg-dark) tint(5%));
52
+ }
53
+
54
+ /* ^^^ from legacy --button-default ^^^ */
55
+ }
56
+ }
57
+
58
+ /* TODO(ka, 2017-2-14): standardize primary button vars */
59
+
60
+ .button_primary {
61
+ position: relative;
62
+
63
+ /* VVV from legacy --button-default VVV */
64
+ display: inline-block;
65
+
66
+ /* ^^^ from legacy --button-default ^^^ */
67
+
68
+ width: 100%;
69
+ padding: var(--button-pad);
70
+ border: none;
71
+ border-radius: var(--bd-radius-default);
72
+ background: transparent;
73
+ background-color: var(--c-bg-dark);
74
+
75
+ /* TODO(mc, 2017-12-07): pull shadows out to central file */
76
+ box-shadow:
77
+ 0 0 2px rgba(0, 0, 0, 0.12),
78
+ 0 2px 2px rgba(0, 0, 0, 0.24);
79
+ color: var(--c-font-light);
80
+ cursor: pointer;
81
+ font-size: var(--fs-body-2);
82
+ font-weight: var(--fw-semibold);
83
+ line-height: 1.4;
84
+ text-align: center;
85
+ text-decoration: none;
86
+ text-transform: uppercase;
87
+
88
+ &:focus {
89
+ background-color: color-mod(var(--c-bg-dark) shade(30%));
90
+ }
91
+
92
+ &:hover {
93
+ background-color: color-mod(var(--c-bg-dark) shade(30%));
94
+ }
95
+
96
+ &.hover {
97
+ background-color: color-mod(var(--c-bg-dark) shade(30%));
98
+ }
99
+
100
+ &:active {
101
+ background-color: color-mod(var(--c-bg-dark) tint(30%));
102
+
103
+ /* TODO(mc, 2017-12-07): pull shadows out to central file */
104
+ box-shadow:
105
+ 0 0 8px rgba(0, 0, 0, 0.12),
106
+ 0 8px 8px rgba(0, 0, 0, 0.24);
107
+ font-weight: var(--fw-regular);
108
+ }
109
+
110
+ &.inverted {
111
+ background-color: var(--c-bg-light);
112
+ color: var(--c-font-dark);
113
+
114
+ &:focus,
115
+ &:hover,
116
+ &.hover {
117
+ background-color: color-mod(var(--c-bg-light) shade(5%));
118
+ }
119
+
120
+ &:active {
121
+ background-color: color-mod(var(--c-bg-light) shade(10%));
122
+ }
123
+ }
124
+
125
+ &:disabled,
126
+ &.disabled {
127
+ /* from legacy --button-disabled */
128
+ border-color: var(--c-font-disabled);
129
+
130
+ /* from legacy --button-disabled */
131
+
132
+ background-color: color-mod(var(--c-bg-dark) tint(70%));
133
+ box-shadow: none;
134
+ color: var(--c-font-disabled);
135
+
136
+ /* from legacy --button-disabled */
137
+ cursor: default;
138
+
139
+ /* from legacy --button-disabled */
140
+ fill: var(--c-font-disabled);
141
+
142
+ /* from legacy --button-disabled */
143
+ font-weight: normal;
144
+
145
+ /* from legacy --button-disabled */
146
+ pointer-events: none;
147
+ }
148
+ }
149
+
150
+ .button_flat {
151
+ position: relative;
152
+
153
+ /* VVV from legacy --button-default VVV */
154
+ display: inline-block;
155
+
156
+ /* ^^^ from legacy --button-default ^^^ */
157
+
158
+ width: 9rem;
159
+ padding: var(--button-pad);
160
+ border: none;
161
+ border-radius: var(--bd-radius-default);
162
+ background: transparent;
163
+ color: var(--c-font-dark);
164
+ cursor: pointer;
165
+ font-size: var(--fs-body-2);
166
+ font-weight: var(--fw-semibold);
167
+ line-height: 1.4;
168
+ text-align: center;
169
+ text-decoration: none;
170
+ text-transform: uppercase;
171
+
172
+ &:active {
173
+ background-color: color-mod(var(--c-bg-light) shade(10%));
174
+ font-weight: var(--fw-regular);
175
+ }
176
+
177
+ &:disabled,
178
+ &.disabled {
179
+ /* from legacy --button-disabled */
180
+ border-color: var(--c-font-disabled);
181
+ background-color: transparent;
182
+
183
+ /* from legacy --button-disabled */
184
+ color: var(--c-font-disabled);
185
+
186
+ /* from legacy --button-disabled */
187
+ cursor: default;
188
+
189
+ /* from legacy --button-disabled */
190
+ fill: var(--c-font-disabled);
191
+
192
+ /* from legacy --button-disabled */
193
+ font-weight: normal;
194
+
195
+ /* from legacy --button-disabled */
196
+ pointer-events: none;
197
+
198
+ /* from legacy --button-disabled */
199
+ }
200
+
201
+ &:focus {
202
+ background-color: color-mod(var(--c-med-gray) alpha(25%));
203
+ }
204
+
205
+ &:hover {
206
+ background-color: color-mod(var(--c-med-gray) alpha(25%));
207
+ }
208
+
209
+ &.hover {
210
+ background-color: color-mod(var(--c-med-gray) alpha(25%));
211
+ }
212
+
213
+ &.inverted {
214
+ border-color: var(--c-font-light);
215
+
216
+ /* VVV from legacy --button-inverted VVV */
217
+ color: var(--c-font-light);
218
+
219
+ &:active {
220
+ background-color: color-mod(var(--c-bg-dark) tint(10%));
221
+ font-weight: var(--fw-regular);
222
+ }
223
+
224
+ &:disabled,
225
+ &.disabled {
226
+ /* from legacy --button-disabled */
227
+ border-color: var(--c-font-disabled);
228
+ background-color: transparent;
229
+
230
+ /* from legacy --button-disabled */
231
+ color: var(--c-font-disabled);
232
+
233
+ /* from legacy --button-disabled */
234
+ cursor: default;
235
+
236
+ /* from legacy --button-disabled */
237
+ fill: var(--c-font-disabled);
238
+
239
+ /* from legacy --button-disabled */
240
+ font-weight: normal;
241
+
242
+ /* from legacy --button-disabled */
243
+ pointer-events: none;
244
+
245
+ /* from legacy --button-disabled */
246
+ }
247
+
248
+ &:focus {
249
+ background-color: color-mod(var(--c-bg-dark) tint(5%));
250
+ }
251
+
252
+ &:hover {
253
+ background-color: color-mod(var(--c-bg-dark) tint(5%));
254
+ }
255
+
256
+ &.hover {
257
+ background-color: color-mod(var(--c-bg-dark) tint(5%));
258
+ }
259
+
260
+ /* ^^^ from legacy --button-default ^^^ */
261
+ }
262
+ }
263
+
264
+ .button_outline {
265
+ position: relative;
266
+
267
+ /* VVV from legacy --button-default VVV */
268
+ display: inline-block;
269
+
270
+ /* ^^^ from legacy --button-default ^^^ */
271
+
272
+ width: 9rem;
273
+ padding: var(--button-pad);
274
+ border: 1px solid var(--c-font-dark);
275
+ border-radius: var(--bd-radius-default);
276
+ background: transparent;
277
+ color: var(--c-font-dark);
278
+ cursor: pointer;
279
+ font-size: var(--fs-body-2);
280
+ font-weight: var(--fw-semibold);
281
+ line-height: 1.4;
282
+ text-align: center;
283
+ text-decoration: none;
284
+ text-transform: uppercase;
285
+
286
+ &:active {
287
+ background-color: color-mod(var(--c-bg-light) shade(10%));
288
+ font-weight: var(--fw-regular);
289
+ }
290
+
291
+ &:disabled,
292
+ &.disabled {
293
+ /* from legacy --button-disabled */
294
+ border-color: var(--c-font-disabled);
295
+ background-color: transparent;
296
+
297
+ /* from legacy --button-disabled */
298
+ color: var(--c-font-disabled);
299
+
300
+ /* from legacy --button-disabled */
301
+ cursor: default;
302
+
303
+ /* from legacy --button-disabled */
304
+ fill: var(--c-font-disabled);
305
+
306
+ /* from legacy --button-disabled */
307
+ font-weight: normal;
308
+
309
+ /* from legacy --button-disabled */
310
+ pointer-events: none;
311
+
312
+ /* from legacy --button-disabled */
313
+ }
314
+
315
+ &:focus {
316
+ background-color: color-mod(var(--c-med-gray) alpha(25%));
317
+ }
318
+
319
+ &:hover {
320
+ background-color: color-mod(var(--c-med-gray) alpha(25%));
321
+ }
322
+
323
+ &.hover {
324
+ background-color: color-mod(var(--c-med-gray) alpha(25%));
325
+ }
326
+
327
+ &.inverted {
328
+ border-color: var(--c-font-light);
329
+
330
+ /* VVV from legacy --button-inverted VVV */
331
+ color: var(--c-font-light);
332
+
333
+ &:active {
334
+ background-color: color-mod(var(--c-bg-dark) tint(10%));
335
+ font-weight: var(--fw-regular);
336
+ }
337
+
338
+ &:disabled,
339
+ &.disabled {
340
+ /* from legacy --button-disabled */
341
+ border-color: var(--c-font-disabled);
342
+ background-color: transparent;
343
+
344
+ /* from legacy --button-disabled */
345
+ color: var(--c-font-disabled);
346
+
347
+ /* from legacy --button-disabled */
348
+ cursor: default;
349
+
350
+ /* from legacy --button-disabled */
351
+ fill: var(--c-font-disabled);
352
+
353
+ /* from legacy --button-disabled */
354
+ font-weight: normal;
355
+
356
+ /* from legacy --button-disabled */
357
+ pointer-events: none;
358
+
359
+ /* from legacy --button-disabled */
360
+ }
361
+
362
+ &:focus {
363
+ background-color: color-mod(var(--c-bg-dark) tint(5%));
364
+ }
365
+
366
+ &:hover {
367
+ background-color: color-mod(var(--c-bg-dark) tint(5%));
368
+ }
369
+
370
+ &.hover {
371
+ background-color: color-mod(var(--c-bg-dark) tint(5%));
372
+ }
373
+
374
+ /* ^^^ from legacy --button-default ^^^ */
375
+ }
376
+ }
377
+
378
+ /* style for IconButton */
379
+
380
+ .button_icon {
381
+ width: auto;
382
+
383
+ & > * {
384
+ display: block;
385
+ width: 100%;
386
+ height: 100%;
387
+ }
388
+
389
+ &.inverted {
390
+ color: white;
391
+ fill: white;
392
+
393
+ /* TODO(mc, 2019-03-29): Is this correct? Our icons use only fill */
394
+ stroke: white;
395
+
396
+ &:disabled,
397
+ &.disabled {
398
+ /* from legacy --button-disabled */
399
+ border-color: var(--c-font-disabled);
400
+ background-color: transparent;
401
+
402
+ /* from legacy --button-disabled */
403
+ color: var(--c-font-disabled);
404
+
405
+ /* from legacy --button-disabled */
406
+ cursor: default;
407
+
408
+ /* from legacy --button-disabled */
409
+ fill: var(--c-font-disabled);
410
+
411
+ /* from legacy --button-disabled */
412
+ font-weight: normal;
413
+
414
+ /* from legacy --button-disabled */
415
+ pointer-events: none;
416
+
417
+ /* from legacy --button-disabled */
418
+ }
419
+ }
420
+ }
421
+
422
+ /* style for the supplementary icon displayed by Button */
423
+ .icon {
424
+ position: absolute;
425
+ top: var(--button-pad);
426
+ left: var(--button-pad);
427
+ height: calc(100% - 2 * var(--button-pad));
428
+ }
@@ -0,0 +1,103 @@
1
+ @import '../index.module.css';
2
+
3
+ :root {
4
+ --mw-labeled-toggle: 25rem;
5
+ }
6
+
7
+ /* Toggle Button */
8
+ .toggled_on {
9
+ color: #0ec9eb;
10
+ fill: #0ec9eb;
11
+ }
12
+
13
+ .toggled_off {
14
+ fill: var(--c-dark-gray);
15
+ }
16
+
17
+ .labeled_control_wrapper {
18
+ display: block;
19
+ width: 100%;
20
+ padding: 1rem;
21
+
22
+ &:not(:last-child) {
23
+ border-bottom: 1px solid var(--c-light-gray);
24
+ }
25
+ }
26
+
27
+ .labeled_control {
28
+ display: block;
29
+ }
30
+
31
+ .stacked_labeled_control {
32
+ display: block;
33
+ margin-top: 0.5rem;
34
+ margin-left: 1rem;
35
+ }
36
+
37
+ .stacked_labeled_control_label {
38
+ display: inline-block;
39
+ color: var(--c-font-dark); /* from legacy --font-body-1-dark */
40
+ font-size: var(--fs-body-1); /* from legacy --font-body-1-dark */
41
+ font-weight: var(--fw-semibold);
42
+ }
43
+
44
+ .labeled_control_label {
45
+ display: inline-block;
46
+ max-width: var(--mw-labeled-toggle);
47
+ color: var(--c-font-dark); /* from legacy --font-body-1-dark */
48
+ font-size: var(--fs-body-1); /* from legacy --font-body-1-dark */
49
+ font-weight: var(--fw-semibold);
50
+ }
51
+
52
+ .labeled_toggle_button {
53
+ width: 2rem;
54
+ padding: 0;
55
+ margin-right: 1rem;
56
+ float: right;
57
+
58
+ &:hover {
59
+ background-color: transparent;
60
+ }
61
+ }
62
+
63
+ .labeled_button,
64
+ .labeled_select {
65
+ width: 9rem;
66
+ margin-top: 0.5rem;
67
+ float: right;
68
+ }
69
+
70
+ .labeled_select {
71
+ color: var(--c-font-dark); /* from legacy --font-body-2-dark */
72
+ font-size: var(--fs-body-2); /* from legacy --font-body-2-dark */
73
+ font-weight: var(--fw-regular); /* from legacy --font-body-2-dark */
74
+ }
75
+
76
+ .labeled_checkbox {
77
+ float: right;
78
+ }
79
+
80
+ .stacked_control_info {
81
+ color: var(--c-font-dark); /* from legacy --font-body-1-dark */
82
+ font-size: var(--fs-body-1); /* from legacy --font-body-1-dark */
83
+ font-weight: var(--fw-regular); /* from legacy --font-body-1-dark */
84
+
85
+ & > p {
86
+ margin-top: 0.5rem;
87
+ margin-bottom: 0;
88
+ line-height: 1.5;
89
+ }
90
+ }
91
+
92
+ .control_info {
93
+ max-width: var(--mw-labeled-toggle);
94
+ color: var(--c-font-dark); /* from legacy --font-body-1-dark */
95
+ font-size: var(--fs-body-1); /* from legacy --font-body-1-dark */
96
+ font-weight: var(--fw-regular); /* from legacy --font-body-1-dark */
97
+
98
+ & > p {
99
+ margin-top: 0.5rem;
100
+ margin-bottom: 0;
101
+ line-height: 1.5;
102
+ }
103
+ }
@@ -0,0 +1,118 @@
1
+ /* stylelint-disable selector-class-pattern */
2
+ @import '../index.module.css';
3
+
4
+ /* NOTE(mc, 2021-04-27): this class only used by storybook */
5
+ .example_select_override {
6
+ & :global(.ot_select__control) {
7
+ background-color: blue;
8
+ }
9
+ }
10
+
11
+ .select {
12
+ position: relative;
13
+
14
+ & :global(.ot_select__control) {
15
+ position: relative;
16
+ display: flex;
17
+ height: 1.75rem;
18
+ padding: 0.25rem 0;
19
+ border: none;
20
+ border-radius: var(--bd-radius-form-field);
21
+ background-color: var(--c-light-gray);
22
+ box-shadow: none;
23
+ color: var(--c-font-dark); /* from legacy --font-body-1-dark */
24
+ font-size: var(--fs-body-1); /* from legacy --font-body-1-dark */
25
+ font-weight: var(--fw-regular); /* from legacy --font-body-1-dark */
26
+ outline: none;
27
+ }
28
+
29
+ & :global(.ot_select__control--menu-is-open) {
30
+ border-bottom-left-radius: 0;
31
+ border-bottom-right-radius: 0;
32
+ }
33
+
34
+ & :global(.ot_select__control--menu-is-open),
35
+ & :global(.ot_select__control--is-focused) {
36
+ background-color: var(--c-white);
37
+ box-shadow: 0 0.125rem 0.25rem 0 color-mod(var(--c-black) alpha(0.5));
38
+ }
39
+
40
+ & :global(.ot_select__option) {
41
+ display: flex;
42
+ padding: 0.25rem 0.75rem;
43
+ cursor: default;
44
+ }
45
+
46
+ & :global(.ot_select__option--is-focused) {
47
+ background-color: var(--c-light-gray);
48
+ }
49
+
50
+ & :global(.ot_select__option--is-disabled) {
51
+ color: var(--c-font-disabled);
52
+ }
53
+
54
+ & :global(.ot_select__group-heading) {
55
+ margin-left: 0.5rem;
56
+ color: var(--c-med-gray); /* from legacy --font-form-caption */
57
+ font-size: var(--fs-caption); /* from legacy --font-form-caption */
58
+ font-weight: var(--fw-semibold); /* from legacy --font-form-caption */
59
+ text-transform: uppercase;
60
+ }
61
+
62
+ & :global(.ot_select__single-value) {
63
+ display: flex;
64
+ }
65
+
66
+ & :global(.ot_select__group):not(:first-child) {
67
+ padding-top: 0.25rem;
68
+ border-top: 1px solid color-mod(var(--c-med-gray) alpha(0.4));
69
+ margin-top: 0.25rem;
70
+ }
71
+ }
72
+
73
+ .dropdown_indicator {
74
+ position: absolute;
75
+ top: 0.25rem;
76
+ right: 0.25rem;
77
+ width: 1.25rem;
78
+ pointer-events: none;
79
+
80
+ & > svg {
81
+ color: var(--c-dark-gray);
82
+ }
83
+
84
+ &.flipped > svg {
85
+ transform: rotate(180deg);
86
+ }
87
+ }
88
+
89
+ .dropdown_indicator_icon {
90
+ width: 100%;
91
+ }
92
+
93
+ .menu {
94
+ position: absolute;
95
+ z-index: 99;
96
+ top: 100%;
97
+ right: 0;
98
+ left: 0;
99
+ padding-top: 0.25rem;
100
+ padding-bottom: 0.25rem;
101
+ background-color: var(--c-white);
102
+ border-bottom-left-radius: var(--bd-radius-form-field);
103
+ border-bottom-right-radius: var(--bd-radius-form-field);
104
+ box-shadow: 0 0.125rem 0.25rem 0 color-mod(var(--c-black) alpha(0.5));
105
+ color: var(--c-font-dark); /* from legacy --font-body-1-dark */
106
+ font-size: var(--fs-body-1); /* from legacy --font-body-1-dark */
107
+ font-weight: var(--fw-regular); /* from legacy --font-body-1-dark */
108
+ }
109
+
110
+ .menu_control_bridge {
111
+ position: absolute;
112
+ z-index: 99;
113
+ top: calc(100% - 2px);
114
+ right: 0;
115
+ left: 0;
116
+ height: 4px;
117
+ background-color: var(--c-white);
118
+ }
@@ -0,0 +1,16 @@
1
+ @import '../index.module.css';
2
+
3
+ .select_field.error {
4
+ & :global(.ot_select__control) {
5
+ background-color: var(--c-warning-light);
6
+ }
7
+ }
8
+
9
+ .select_caption {
10
+ font-size: var(--fs-caption);
11
+
12
+ &.error {
13
+ color: var(--c-warning-dark);
14
+ font-weight: var(--fw-semibold);
15
+ }
16
+ }