@opentrons/components 0.2.0-alpha.4 → 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 +30576 -28609
  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
@@ -5,6 +5,7 @@ interface ProtocolDeckProps {
5
5
  protocolAnalysis: CompletedProtocolAnalysis | ProtocolAnalysisOutput | null;
6
6
  /** extra props to pass through to BaseDeck component */
7
7
  baseDeckProps?: Partial<ComponentProps<typeof BaseDeck>>;
8
+ showLabwareLabels?: boolean;
8
9
  }
9
10
  export declare function ProtocolDeck(props: ProtocolDeckProps): JSX.Element | null;
10
11
  export {};
@@ -11,6 +11,8 @@ export interface ToolboxProps extends StyleProps {
11
11
  closeButton?: JSX.Element;
12
12
  titlePadding?: string;
13
13
  childrenPadding?: string;
14
+ /** Optional test id for the scrollable children container. */
15
+ childrenContainerTestId?: string;
14
16
  subHeader?: JSX.Element | null;
15
17
  secondaryHeaderButton?: JSX.Element;
16
18
  }
@@ -1,6 +1,7 @@
1
- export * from './DeckLabelSet';
2
- export * from './Toolbox';
3
- export * from './ProtocolTimelineScrubber';
4
1
  export * from './CommandText';
2
+ export * from './DeckLabelSet';
5
3
  export * from './FixtureOption';
4
+ export * from './LabwareDetailsWithCount';
5
+ export * from './LabwareInfoOverlay';
6
6
  export * from './ProtocolDeck';
7
+ export * from './Toolbox';
@@ -1,7 +1,3 @@
1
- import type { PrimitiveComponent } from './types';
2
- /**
3
- * Simple Box atom. Renders a `div` by default and accepts all primitive styling props.
4
- *
5
- * @component
6
- */
7
- export declare const Box: PrimitiveComponent<'div'>;
1
+ import type { ComponentProps, FC } from 'react';
2
+ import type { StyleProps } from './types';
3
+ export declare const Box: FC<ComponentProps<'div'> & StyleProps>;
@@ -1,59 +1,6 @@
1
- import type { StyledComponent } from 'styled-components';
1
+ import type { ComponentProps, FC } from 'react';
2
2
  import type { StyleProps } from './types';
3
3
  export declare const BUTTON_TYPE_SUBMIT: 'submit';
4
4
  export declare const BUTTON_TYPE_RESET: 'reset';
5
5
  export declare const BUTTON_TYPE_BUTTON: 'button';
6
- /**
7
- * Button primitive
8
- *
9
- * @component
10
- */
11
- export declare const Btn: StyledComponent<'button', any, StyleProps, any>;
12
- /**
13
- * Primary button variant
14
- *
15
- * @component
16
- */
17
- export declare const PrimaryBtn: StyledComponent<"button", any, StyleProps, any>;
18
- /**
19
- * Secondary button variant
20
- *
21
- * @component
22
- */
23
- export declare const SecondaryBtn: StyledComponent<"button", any, StyleProps, any>;
24
- /**
25
- * New primary button variant used in app
26
- *
27
- * @component
28
- */
29
- export declare const NewPrimaryBtn: StyledComponent<"button", any, StyleProps, any>;
30
- /**
31
- * New secondary button variant used in app
32
- *
33
- * @component
34
- */
35
- export declare const NewSecondaryBtn: StyledComponent<"button", any, StyleProps, any>;
36
- /**
37
- * Red primary button variant used in app
38
- *
39
- * @component
40
- */
41
- export declare const NewAlertPrimaryBtn: StyledComponent<"button", any, StyleProps, any>;
42
- /**
43
- * Red secondary button variant used in app
44
- *
45
- * @component
46
- */
47
- export declare const NewAlertSecondaryBtn: StyledComponent<"button", any, StyleProps, any>;
48
- /**
49
- * Light secondary button variant
50
- *
51
- * @component
52
- */
53
- export declare const LightSecondaryBtn: StyledComponent<"button", any, StyleProps, any>;
54
- /**
55
- * Tertiary button variant
56
- *
57
- * @component
58
- */
59
- export declare const TertiaryBtn: StyledComponent<"button", any, StyleProps, any>;
6
+ export declare const Btn: FC<ComponentProps<'button'> & StyleProps>;
@@ -0,0 +1,8 @@
1
+ import type { ComponentProps, FC } from 'react';
2
+ import type { StyleProps } from '../types';
3
+ /**
4
+ * New primary button variant used in app
5
+ *
6
+ * @component
7
+ */
8
+ export declare const NewPrimaryBtn: FC<ComponentProps<'button'> & StyleProps>;
@@ -0,0 +1,8 @@
1
+ import type { ComponentProps, FC } from 'react';
2
+ import type { StyleProps } from '../types';
3
+ /**
4
+ * New secondary button variant used in app
5
+ *
6
+ * @component
7
+ */
8
+ export declare const NewSecondaryBtn: FC<ComponentProps<'button'> & StyleProps>;
@@ -1,7 +1,3 @@
1
- import type { PrimitiveComponent } from './types';
2
- /**
3
- * Flex primitive
4
- *
5
- * @component
6
- */
7
- export declare const Flex: PrimitiveComponent<'div'>;
1
+ import type { ComponentProps, FC } from 'react';
2
+ import type { StyleProps } from './types';
3
+ export declare const Flex: FC<ComponentProps<'div'> & StyleProps>;
@@ -1,23 +1,13 @@
1
- import type { PrimitiveComponent, StyleProps } from './types';
2
- export interface ForeignObjectProps extends StyleProps {
3
- /** attach a width attribute to the <svg> element */
4
- svgWidth?: string | number;
5
- /** attach a height attribute to the <svg> element */
6
- svgHeight?: string | number;
7
- /**
8
- * internal helper prop to remap width style-prop to CSS
9
- * @internal
10
- */
11
- _cssWidth?: string | number;
12
- /**
13
- * internal helper prop to remap height style-prop to CSS
14
- * @internal
15
- */
16
- _cssHeight?: string | number;
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ export interface ForeignObjectProps {
3
+ width: string | number;
4
+ height: string | number;
5
+ x: string | number;
6
+ y: string | number;
7
+ children?: ReactNode;
17
8
  }
18
9
  /**
19
10
  * Foreign Object styled atomic component
20
- *
21
11
  * @component
22
12
  */
23
- export declare const ForeignObject: PrimitiveComponent<'foreignObject', ForeignObjectProps>;
13
+ export declare const ForeignObject: ({ width, height, x, y, children, }: ForeignObjectProps) => ReactElement;
@@ -1,11 +1,7 @@
1
- import type { PrimitiveComponent, StyleProps } from './types';
1
+ import type { ComponentProps, FC } from 'react';
2
+ import type { StyleProps } from './types';
2
3
  export interface LinkProps extends StyleProps {
3
4
  /** render link with target="_blank" */
4
5
  external?: boolean;
5
6
  }
6
- /**
7
- * Link primitive
8
- *
9
- * @component
10
- */
11
- export declare const Link: PrimitiveComponent<'a', LinkProps>;
7
+ export declare const Link: FC<ComponentProps<'a'> & LinkProps>;
@@ -1,23 +1,14 @@
1
- import type { PrimitiveComponent, StyleProps } from './types';
1
+ import type { ComponentProps, FC } from 'react';
2
+ import type { StyleProps } from './types';
2
3
  export interface SvgProps extends StyleProps {
3
4
  /** attach a width attribute to the <svg> element */
4
5
  svgWidth?: string | number;
5
6
  /** attach a height attribute to the <svg> element */
6
7
  svgHeight?: string | number;
7
- /**
8
- * internal helper prop to remap width style-prop to CSS
9
- * @internal
10
- */
11
- _cssWidth?: string | number;
12
- /**
13
- * internal helper prop to remap height style-prop to CSS
14
- * @internal
15
- */
16
- _cssHeight?: string | number;
17
8
  }
18
9
  /**
19
- * SVG primitive
10
+ * SVG primitive with style props support
20
11
  *
21
12
  * @component
22
13
  */
23
- export declare const Svg: PrimitiveComponent<'svg', SvgProps>;
14
+ export declare const Svg: FC<ComponentProps<'svg'> & SvgProps>;
@@ -1,7 +1,5 @@
1
- import type { PrimitiveComponent } from './types';
2
- /**
3
- * Text primitive
4
- *
5
- * @component
6
- */
7
- export declare const Text: PrimitiveComponent<'p'>;
1
+ import type { ComponentProps, FC } from 'react';
2
+ import type { StyleProps } from './types';
3
+ export declare const Text: FC<ComponentProps<'p'> & StyleProps & {
4
+ as?: string;
5
+ }>;
@@ -6,4 +6,6 @@ export * from './ForeignObject';
6
6
  export * from './Link';
7
7
  export * from './Svg';
8
8
  export * from './Text';
9
+ export * from './Buttons/NewSecondaryBtn';
10
+ export * from './Buttons/NewPrimaryBtn';
9
11
  export * from './types';
@@ -1,7 +1,7 @@
1
- import type { CSSObject } from 'styled-components';
1
+ import type { CSSProperties } from 'react';
2
2
  import type * as Types from './types';
3
3
  type Text = string | number;
4
- export declare const STYLE_PROPS: ("filter" | "height" | "width" | "color" | "top" | "bottom" | "left" | "right" | "overflow" | "overflowX" | "overflowY" | "cursor" | "transformOrigin" | "backgroundColor" | "opacity" | "fontSize" | "fontWeight" | "fontStyle" | "lineHeight" | "textAlign" | "textTransform" | "textDecoration" | "margin" | "marginX" | "marginY" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "padding" | "paddingX" | "paddingY" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderRadius" | "borderWidth" | "borderColor" | "boxShadow" | "flex" | "alignItems" | "alignSelf" | "justifyContent" | "flexDirection" | "flexWrap" | "whiteSpace" | "columnGap" | "gridGap" | "gridTemplateAreas" | "gridTemplateRows" | "gridTemplateColumns" | "gridArea" | "gridRow" | "gridColumn" | "display" | "size" | "minWidth" | "maxWidth" | "minHeight" | "maxHeight" | "wordSpacing" | "overflowWrap" | "position" | "zIndex" | "transform" | "textOverflow" | "flexGrow" | "gap" | "rowGap" | "transition")[];
5
- export declare const styleProps: (props: Types.StyleProps) => CSSObject;
4
+ export declare const STYLE_PROPS: ("top" | "bottom" | "left" | "right" | "height" | "filter" | "width" | "position" | "overflow" | "overflowX" | "overflowY" | "cursor" | "transformOrigin" | "color" | "backgroundColor" | "opacity" | "fontSize" | "fontWeight" | "fontStyle" | "lineHeight" | "textAlign" | "textTransform" | "textDecoration" | "textOverflow" | "margin" | "marginX" | "marginY" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "padding" | "paddingX" | "paddingY" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderRadius" | "borderWidth" | "borderColor" | "boxShadow" | "flex" | "alignItems" | "alignSelf" | "alignContent" | "justifyContent" | "justifyItems" | "justifySelf" | "flexDirection" | "flexWrap" | "flexGrow" | "whiteSpace" | "columnGap" | "gridGap" | "gap" | "gridTemplateAreas" | "gridTemplateRows" | "gridTemplateColumns" | "gridArea" | "gridRow" | "gridColumn" | "display" | "visibility" | "size" | "minWidth" | "maxWidth" | "minHeight" | "maxHeight" | "wordSpacing" | "overflowWrap" | "zIndex" | "transform" | "rowGap" | "transition")[];
5
+ export declare const styleProps: (props: Types.StyleProps) => CSSProperties;
6
6
  export declare const isntStyleProp: (prop: string | Text) => boolean;
7
7
  export {};
@@ -1,5 +1,4 @@
1
- import type { CSSProperties, StyledComponent } from 'styled-components';
2
- import type { ComponentType } from 'react';
1
+ import type { ComponentType, CSSProperties } from 'react';
3
2
  export interface ColorProps {
4
3
  color?: string;
5
4
  backgroundColor?: string;
@@ -13,6 +12,7 @@ export interface TypographyProps {
13
12
  textAlign?: string;
14
13
  textTransform?: string;
15
14
  textDecoration?: string;
15
+ textOverflow?: string;
16
16
  }
17
17
  export interface SpacingProps {
18
18
  margin?: string | number;
@@ -45,14 +45,20 @@ export interface FlexboxProps {
45
45
  flex?: string | number;
46
46
  alignItems?: string;
47
47
  alignSelf?: string;
48
+ alignContent?: string;
48
49
  justifyContent?: string;
50
+ justifyItems?: string;
51
+ justifySelf?: string;
49
52
  flexDirection?: string;
50
53
  flexWrap?: string;
54
+ flexShrink?: string | number;
55
+ flexGrow?: string | number;
51
56
  whiteSpace?: string;
52
57
  }
53
58
  export interface GridProps {
54
59
  columnGap?: string | number;
55
60
  gridGap?: string | number;
61
+ gap?: string | number;
56
62
  gridTemplateAreas?: string;
57
63
  gridTemplateRows?: string;
58
64
  gridTemplateColumns?: string;
@@ -62,6 +68,7 @@ export interface GridProps {
62
68
  }
63
69
  export interface LayoutProps {
64
70
  display?: string;
71
+ visibility?: string;
65
72
  size?: string | number;
66
73
  width?: string | number;
67
74
  minWidth?: string | number;
@@ -93,4 +100,4 @@ export interface TransitionProps {
93
100
  export interface StyleProps extends ColorProps, TypographyProps, SpacingProps, BorderProps, FlexboxProps, GridProps, LayoutProps, PositionProps, TransitionProps {
94
101
  className?: string;
95
102
  }
96
- export type PrimitiveComponent<Instance extends keyof JSX.IntrinsicElements | ComponentType<any>, Props extends StyleProps = StyleProps> = StyledComponent<Instance, any, Props, any>;
103
+ export type PrimitiveComponent<Instance extends keyof JSX.IntrinsicElements | ComponentType<any>, Props extends StyleProps = StyleProps> = ComponentType<Instance extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[Instance] & Props : Instance extends ComponentType<infer P> ? P & Props : Props>;
@@ -0,0 +1,103 @@
1
+ @import '../index.module.css';
2
+
3
+ .alert {
4
+ font-size: var(--fs-body-2);
5
+ font-weight: var(--fw-regular);
6
+ }
7
+
8
+ .alert:not(:first-of-type) {
9
+ border-top: none;
10
+ }
11
+
12
+ .title_bar {
13
+ display: flex;
14
+ flex-direction: row;
15
+ align-items: center;
16
+ justify-content: space-between;
17
+ padding: 0.5rem 1rem;
18
+ font-weight: var(--fw-semibold);
19
+ }
20
+
21
+ .title {
22
+ width: 100%;
23
+ }
24
+
25
+ .success {
26
+ border: 1px solid var(--c-success);
27
+
28
+ & > .title_bar {
29
+ background-color: var(--c-bg-success);
30
+ color: var(--c-success);
31
+
32
+ & svg {
33
+ color: var(--c-success);
34
+ }
35
+ }
36
+ }
37
+
38
+ .info {
39
+ border: 1px solid var(--c-highlight);
40
+
41
+ & > .title_bar {
42
+ background-color: var(--c-bg-selected);
43
+ color: var(--c-selected-dark);
44
+
45
+ & svg {
46
+ color: var(--c-highlight);
47
+ }
48
+ }
49
+ }
50
+
51
+ .warning {
52
+ border: 1px solid var(--c-warning);
53
+
54
+ & > .title_bar {
55
+ background-color: var(--c-warning-light);
56
+ color: var(--c-warning-dark);
57
+
58
+ & svg {
59
+ fill: var(--c-warning);
60
+ }
61
+ }
62
+ }
63
+
64
+ .error {
65
+ border: 1px solid var(--c-error);
66
+
67
+ & > .title_bar {
68
+ background-color: var(--c-error-light);
69
+ color: var(--c-error-dark);
70
+
71
+ & svg {
72
+ fill: var(--c-error);
73
+ }
74
+ }
75
+ }
76
+
77
+ .message {
78
+ padding: 1rem 3rem;
79
+ background-color: white;
80
+
81
+ & a {
82
+ color: inherit;
83
+ text-decoration: underline;
84
+ }
85
+
86
+ &:empty {
87
+ padding: 0;
88
+ }
89
+ }
90
+
91
+ .icon {
92
+ width: 1.5rem;
93
+ margin-right: 0.5rem;
94
+ }
95
+
96
+ .close {
97
+ width: 2rem;
98
+ padding: 0.125rem;
99
+
100
+ &:hover {
101
+ background-color: rgba(100, 100, 100, 0.1);
102
+ }
103
+ }
@@ -0,0 +1,26 @@
1
+ @media not all and (width: 1024px) and (height: 600px) {
2
+ .heading_small_bold {
3
+ font-size: 1.125rem;
4
+ font-weight: var(--font-weight-bold);
5
+ line-height: var(--line-height-24);
6
+ }
7
+
8
+ .caption_bold {
9
+ font-size: 0.75rem;
10
+ font-weight: var(--font-weight-bold);
11
+ }
12
+
13
+ .body_default_semi_bold {
14
+ font-size: var(--font-size-16);
15
+ font-weight: var(--font-weight-semi-bold);
16
+ line-height: var(--line-height-24);
17
+ }
18
+ }
19
+
20
+ @media (width: 1024px) and (height: 600px) {
21
+ .small_body_text_bold {
22
+ font-size: var(--font-size-20);
23
+ font-weight: var(--font-weight-bold);
24
+ line-height: var(--font-height-24);
25
+ }
26
+ }