@mirohq/design-system-base-hotkey 0.1.24 → 0.2.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/dist/main.js CHANGED
@@ -10,6 +10,9 @@ const Hotkey = designSystemStitches.styled(designSystemPrimitive.Primitive.span,
10
10
  fontSize: "$175",
11
11
  lineHeight: "20px",
12
12
  variants: {
13
+ v1: {
14
+ true: {}
15
+ },
13
16
  variant: {
14
17
  neutral: {
15
18
  color: "$text-neutrals-subtle"
@@ -22,6 +25,17 @@ const Hotkey = designSystemStitches.styled(designSystemPrimitive.Primitive.span,
22
25
  }
23
26
  }
24
27
  },
28
+ compoundVariants: [
29
+ {
30
+ variant: "inverted",
31
+ v1: true,
32
+ css: {
33
+ backgroundColor: "$gray-650",
34
+ color: "$white",
35
+ borderRadius: "$75"
36
+ }
37
+ }
38
+ ],
25
39
  defaultVariants: {
26
40
  variant: "neutral"
27
41
  }
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sources":["../src/hotkey.ts"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const Hotkey = styled(Primitive.span, {\n whiteSpace: 'nowrap',\n fontSize: '$175',\n lineHeight: '20px',\n\n variants: {\n variant: {\n neutral: {\n color: '$text-neutrals-subtle',\n },\n inverted: {\n backgroundColor: '$background-neutrals-inverted-subtle',\n color: '$text-neutrals-inverted',\n padding: '2px 6px',\n borderRadius: '$50',\n },\n },\n },\n defaultVariants: {\n variant: 'neutral',\n },\n})\n\nexport type HotkeyProps = ComponentPropsWithRef<typeof Hotkey>\n"],"names":["styled","Primitive"],"mappings":";;;;;;;AAIa,MAAA,MAAA,GAASA,2BAAO,CAAAC,+BAAA,CAAU,IAAM,EAAA;AAAA,EAC3C,UAAY,EAAA,QAAA;AAAA,EACZ,QAAU,EAAA,MAAA;AAAA,EACV,UAAY,EAAA,MAAA;AAAA,EAEZ,QAAU,EAAA;AAAA,IACR,OAAS,EAAA;AAAA,MACP,OAAS,EAAA;AAAA,QACP,KAAO,EAAA,uBAAA;AAAA,OACT;AAAA,MACA,QAAU,EAAA;AAAA,QACR,eAAiB,EAAA,sCAAA;AAAA,QACjB,KAAO,EAAA,yBAAA;AAAA,QACP,OAAS,EAAA,SAAA;AAAA,QACT,YAAc,EAAA,KAAA;AAAA,OAChB;AAAA,KACF;AAAA,GACF;AAAA,EACA,eAAiB,EAAA;AAAA,IACf,OAAS,EAAA,SAAA;AAAA,GACX;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"main.js","sources":["../src/hotkey.ts"],"sourcesContent":["import type { ComponentPropsWithRef, HTMLAttributes } from 'react'\nimport type { CSS, SafeProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const Hotkey = styled(Primitive.span, {\n whiteSpace: 'nowrap',\n fontSize: '$175',\n lineHeight: '20px',\n\n variants: {\n v1: {\n true: {},\n },\n variant: {\n neutral: {\n color: '$text-neutrals-subtle',\n },\n inverted: {\n backgroundColor: '$background-neutrals-inverted-subtle',\n color: '$text-neutrals-inverted',\n padding: '2px 6px',\n borderRadius: '$50',\n },\n },\n },\n compoundVariants: [\n {\n variant: 'inverted',\n v1: true,\n css: {\n backgroundColor: '$gray-650',\n color: '$white',\n borderRadius: '$75',\n },\n },\n ],\n defaultVariants: {\n variant: 'neutral',\n },\n})\n\nexport type HotkeyStyledProps = ComponentPropsWithRef<typeof Hotkey>\n\ntype SpanProps = HTMLAttributes<HTMLSpanElement>\nexport type HotkeySharedProps = SafeProps<SpanProps & { css?: CSS }>\n"],"names":["styled","Primitive"],"mappings":";;;;;;;AAKa,MAAA,MAAA,GAASA,2BAAO,CAAAC,+BAAA,CAAU,IAAM,EAAA;AAAA,EAC3C,UAAY,EAAA,QAAA;AAAA,EACZ,QAAU,EAAA,MAAA;AAAA,EACV,UAAY,EAAA,MAAA;AAAA,EAEZ,QAAU,EAAA;AAAA,IACR,EAAI,EAAA;AAAA,MACF,MAAM,EAAC;AAAA,KACT;AAAA,IACA,OAAS,EAAA;AAAA,MACP,OAAS,EAAA;AAAA,QACP,KAAO,EAAA,uBAAA;AAAA,OACT;AAAA,MACA,QAAU,EAAA;AAAA,QACR,eAAiB,EAAA,sCAAA;AAAA,QACjB,KAAO,EAAA,yBAAA;AAAA,QACP,OAAS,EAAA,SAAA;AAAA,QACT,YAAc,EAAA,KAAA;AAAA,OAChB;AAAA,KACF;AAAA,GACF;AAAA,EACA,gBAAkB,EAAA;AAAA,IAChB;AAAA,MACE,OAAS,EAAA,UAAA;AAAA,MACT,EAAI,EAAA,IAAA;AAAA,MACJ,GAAK,EAAA;AAAA,QACH,eAAiB,EAAA,WAAA;AAAA,QACjB,KAAO,EAAA,QAAA;AAAA,QACP,YAAc,EAAA,KAAA;AAAA,OAChB;AAAA,KACF;AAAA,GACF;AAAA,EACA,eAAiB,EAAA;AAAA,IACf,OAAS,EAAA,SAAA;AAAA,GACX;AACF,CAAC;;;;"}
package/dist/module.js CHANGED
@@ -6,6 +6,9 @@ const Hotkey = styled(Primitive.span, {
6
6
  fontSize: "$175",
7
7
  lineHeight: "20px",
8
8
  variants: {
9
+ v1: {
10
+ true: {}
11
+ },
9
12
  variant: {
10
13
  neutral: {
11
14
  color: "$text-neutrals-subtle"
@@ -18,6 +21,17 @@ const Hotkey = styled(Primitive.span, {
18
21
  }
19
22
  }
20
23
  },
24
+ compoundVariants: [
25
+ {
26
+ variant: "inverted",
27
+ v1: true,
28
+ css: {
29
+ backgroundColor: "$gray-650",
30
+ color: "$white",
31
+ borderRadius: "$75"
32
+ }
33
+ }
34
+ ],
21
35
  defaultVariants: {
22
36
  variant: "neutral"
23
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":["../src/hotkey.ts"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const Hotkey = styled(Primitive.span, {\n whiteSpace: 'nowrap',\n fontSize: '$175',\n lineHeight: '20px',\n\n variants: {\n variant: {\n neutral: {\n color: '$text-neutrals-subtle',\n },\n inverted: {\n backgroundColor: '$background-neutrals-inverted-subtle',\n color: '$text-neutrals-inverted',\n padding: '2px 6px',\n borderRadius: '$50',\n },\n },\n },\n defaultVariants: {\n variant: 'neutral',\n },\n})\n\nexport type HotkeyProps = ComponentPropsWithRef<typeof Hotkey>\n"],"names":[],"mappings":";;;AAIa,MAAA,MAAA,GAAS,MAAO,CAAA,SAAA,CAAU,IAAM,EAAA;AAAA,EAC3C,UAAY,EAAA,QAAA;AAAA,EACZ,QAAU,EAAA,MAAA;AAAA,EACV,UAAY,EAAA,MAAA;AAAA,EAEZ,QAAU,EAAA;AAAA,IACR,OAAS,EAAA;AAAA,MACP,OAAS,EAAA;AAAA,QACP,KAAO,EAAA,uBAAA;AAAA,OACT;AAAA,MACA,QAAU,EAAA;AAAA,QACR,eAAiB,EAAA,sCAAA;AAAA,QACjB,KAAO,EAAA,yBAAA;AAAA,QACP,OAAS,EAAA,SAAA;AAAA,QACT,YAAc,EAAA,KAAA;AAAA,OAChB;AAAA,KACF;AAAA,GACF;AAAA,EACA,eAAiB,EAAA;AAAA,IACf,OAAS,EAAA,SAAA;AAAA,GACX;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"module.js","sources":["../src/hotkey.ts"],"sourcesContent":["import type { ComponentPropsWithRef, HTMLAttributes } from 'react'\nimport type { CSS, SafeProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const Hotkey = styled(Primitive.span, {\n whiteSpace: 'nowrap',\n fontSize: '$175',\n lineHeight: '20px',\n\n variants: {\n v1: {\n true: {},\n },\n variant: {\n neutral: {\n color: '$text-neutrals-subtle',\n },\n inverted: {\n backgroundColor: '$background-neutrals-inverted-subtle',\n color: '$text-neutrals-inverted',\n padding: '2px 6px',\n borderRadius: '$50',\n },\n },\n },\n compoundVariants: [\n {\n variant: 'inverted',\n v1: true,\n css: {\n backgroundColor: '$gray-650',\n color: '$white',\n borderRadius: '$75',\n },\n },\n ],\n defaultVariants: {\n variant: 'neutral',\n },\n})\n\nexport type HotkeyStyledProps = ComponentPropsWithRef<typeof Hotkey>\n\ntype SpanProps = HTMLAttributes<HTMLSpanElement>\nexport type HotkeySharedProps = SafeProps<SpanProps & { css?: CSS }>\n"],"names":[],"mappings":";;;AAKa,MAAA,MAAA,GAAS,MAAO,CAAA,SAAA,CAAU,IAAM,EAAA;AAAA,EAC3C,UAAY,EAAA,QAAA;AAAA,EACZ,QAAU,EAAA,MAAA;AAAA,EACV,UAAY,EAAA,MAAA;AAAA,EAEZ,QAAU,EAAA;AAAA,IACR,EAAI,EAAA;AAAA,MACF,MAAM,EAAC;AAAA,KACT;AAAA,IACA,OAAS,EAAA;AAAA,MACP,OAAS,EAAA;AAAA,QACP,KAAO,EAAA,uBAAA;AAAA,OACT;AAAA,MACA,QAAU,EAAA;AAAA,QACR,eAAiB,EAAA,sCAAA;AAAA,QACjB,KAAO,EAAA,yBAAA;AAAA,QACP,OAAS,EAAA,SAAA;AAAA,QACT,YAAc,EAAA,KAAA;AAAA,OAChB;AAAA,KACF;AAAA,GACF;AAAA,EACA,gBAAkB,EAAA;AAAA,IAChB;AAAA,MACE,OAAS,EAAA,UAAA;AAAA,MACT,EAAI,EAAA,IAAA;AAAA,MACJ,GAAK,EAAA;AAAA,QACH,eAAiB,EAAA,WAAA;AAAA,QACjB,KAAO,EAAA,QAAA;AAAA,QACP,YAAc,EAAA,KAAA;AAAA,OAChB;AAAA,KACF;AAAA,GACF;AAAA,EACA,eAAiB,EAAA;AAAA,IACf,OAAS,EAAA,SAAA;AAAA,GACX;AACF,CAAC;;;;"}
package/dist/types.d.ts CHANGED
@@ -1,14 +1,21 @@
1
1
  import * as _stitches_react_types_styled_component from '@stitches/react/types/styled-component';
2
2
  import * as _mirohq_design_system_stitches from '@mirohq/design-system-stitches';
3
+ import { SafeProps, CSS } from '@mirohq/design-system-stitches';
3
4
  import * as react from 'react';
4
- import { ComponentPropsWithRef } from 'react';
5
+ import { ComponentPropsWithRef, HTMLAttributes } from 'react';
5
6
  import * as _mirohq_design_system_primitive from '@mirohq/design-system-primitive';
6
7
 
7
- declare const Hotkey: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"span">>>, "variant"> & _stitches_react_types_styled_component.TransformProps<{
8
+ declare const Hotkey: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"span">>>, "v1" | "variant"> & _stitches_react_types_styled_component.TransformProps<{
9
+ v1?: boolean | "true" | undefined;
8
10
  variant?: "neutral" | "inverted" | undefined;
9
11
  }, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLSpanElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"span">>, {
12
+ v1?: boolean | "true" | undefined;
10
13
  variant?: "neutral" | "inverted" | undefined;
11
14
  }, {}>;
12
- declare type HotkeyProps = ComponentPropsWithRef<typeof Hotkey>;
15
+ declare type HotkeyStyledProps = ComponentPropsWithRef<typeof Hotkey>;
16
+ declare type SpanProps = HTMLAttributes<HTMLSpanElement>;
17
+ declare type HotkeySharedProps = SafeProps<SpanProps & {
18
+ css?: CSS;
19
+ }>;
13
20
 
14
- export { Hotkey, HotkeyProps };
21
+ export { Hotkey, HotkeySharedProps, HotkeyStyledProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirohq/design-system-base-hotkey",
3
- "version": "0.1.24",
3
+ "version": "0.2.0",
4
4
  "description": "",
5
5
  "author": "Miro",
6
6
  "source": "src/index.ts",