@mirohq/design-system-base-hotkey 1.1.2 → 1.2.0-fix-stitches-types.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
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var designSystemStitches = require('@mirohq/design-system-stitches');
6
4
  var designSystemPrimitive = require('@mirohq/design-system-primitive');
7
5
 
package/dist/main.js.map CHANGED
@@ -1 +1 @@
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 variant: {\n neutral: {\n color: '$text-neutrals-subtle',\n },\n inverted: {\n backgroundColor: '$gray-650',\n color: '$white',\n borderRadius: '$75',\n padding: '2px 6px',\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,OAAS,EAAA;AAAA,MACP,OAAS,EAAA;AAAA,QACP,KAAO,EAAA,uBAAA;AAAA,OACT;AAAA,MACA,QAAU,EAAA;AAAA,QACR,eAAiB,EAAA,WAAA;AAAA,QACjB,KAAO,EAAA,QAAA;AAAA,QACP,YAAc,EAAA,KAAA;AAAA,QACd,OAAS,EAAA,SAAA;AAAA,OACX;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 variant: {\n neutral: {\n color: '$text-neutrals-subtle',\n },\n inverted: {\n backgroundColor: '$gray-650',\n color: '$white',\n borderRadius: '$75',\n padding: '2px 6px',\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":";;;;;AAKO,MAAM,MAAA,GAASA,2BAAA,CAAOC,+BAAA,CAAU,IAAA,EAAM;AAAA,EAC3C,UAAA,EAAY,QAAA;AAAA,EACZ,QAAA,EAAU,MAAA;AAAA,EACV,UAAA,EAAY,MAAA;AAAA,EAEZ,QAAA,EAAU;AAAA,IACR,OAAA,EAAS;AAAA,MACP,OAAA,EAAS;AAAA,QACP,KAAA,EAAO;AAAA,OACT;AAAA,MACA,QAAA,EAAU;AAAA,QACR,eAAA,EAAiB,WAAA;AAAA,QACjB,KAAA,EAAO,QAAA;AAAA,QACP,YAAA,EAAc,KAAA;AAAA,QACd,OAAA,EAAS;AAAA;AACX;AACF,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,OAAA,EAAS;AAAA;AAEb,CAAC;;;;"}
@@ -1 +1 @@
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 variant: {\n neutral: {\n color: '$text-neutrals-subtle',\n },\n inverted: {\n backgroundColor: '$gray-650',\n color: '$white',\n borderRadius: '$75',\n padding: '2px 6px',\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,OAAS,EAAA;AAAA,MACP,OAAS,EAAA;AAAA,QACP,KAAO,EAAA,uBAAA;AAAA,OACT;AAAA,MACA,QAAU,EAAA;AAAA,QACR,eAAiB,EAAA,WAAA;AAAA,QACjB,KAAO,EAAA,QAAA;AAAA,QACP,YAAc,EAAA,KAAA;AAAA,QACd,OAAS,EAAA,SAAA;AAAA,OACX;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 variant: {\n neutral: {\n color: '$text-neutrals-subtle',\n },\n inverted: {\n backgroundColor: '$gray-650',\n color: '$white',\n borderRadius: '$75',\n padding: '2px 6px',\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":";;;AAKO,MAAM,MAAA,GAAS,MAAA,CAAO,SAAA,CAAU,IAAA,EAAM;AAAA,EAC3C,UAAA,EAAY,QAAA;AAAA,EACZ,QAAA,EAAU,MAAA;AAAA,EACV,UAAA,EAAY,MAAA;AAAA,EAEZ,QAAA,EAAU;AAAA,IACR,OAAA,EAAS;AAAA,MACP,OAAA,EAAS;AAAA,QACP,KAAA,EAAO;AAAA,OACT;AAAA,MACA,QAAA,EAAU;AAAA,QACR,eAAA,EAAiB,WAAA;AAAA,QACjB,KAAA,EAAO,QAAA;AAAA,QACP,YAAA,EAAc,KAAA;AAAA,QACd,OAAA,EAAS;AAAA;AACX;AACF,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,OAAA,EAAS;AAAA;AAEb,CAAC;;;;"}
package/dist/types.d.ts CHANGED
@@ -1,13 +1,32 @@
1
- import * as _stitches_react_types_styled_component from '@stitches/react/types/styled-component';
2
1
  import * as _mirohq_design_system_stitches from '@mirohq/design-system-stitches';
3
2
  import { SafeProps, CSS } from '@mirohq/design-system-stitches';
4
- import * as react from 'react';
5
- import { ComponentPropsWithRef, HTMLAttributes } from 'react';
3
+ import * as React from 'react';
4
+ import { HTMLAttributes, ComponentPropsWithRef } from 'react';
6
5
  import * as _mirohq_design_system_primitive from '@mirohq/design-system-primitive';
7
6
 
8
- 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<{
7
+ /* Utilities */
8
+ /* ========================================================================== */
9
+
10
+ /** Returns a string with the given prefix followed by the given values. */
11
+ type Prefixed<K extends string, T> = `${K}${Extract<T, boolean | number | string>}`
12
+
13
+ type TransformProps<Props, Media> = {
14
+ [K in keyof Props]: (
15
+ | Props[K]
16
+ | (
17
+ & {
18
+ [KMedia in Prefixed<'@', 'initial' | keyof Media>]?: Props[K]
19
+ }
20
+ & {
21
+ [KMedia in string]: Props[K]
22
+ }
23
+ )
24
+ )
25
+ }
26
+
27
+ declare const Hotkey: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"span">>>, "variant"> & TransformProps<{
9
28
  variant?: "neutral" | "inverted" | undefined;
10
- }, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLSpanElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"span">>, {
29
+ }, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLSpanElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"span">>, {
11
30
  variant?: "neutral" | "inverted" | undefined;
12
31
  }, {}>;
13
32
  type HotkeyStyledProps = ComponentPropsWithRef<typeof Hotkey>;
@@ -16,4 +35,5 @@ type HotkeySharedProps = SafeProps<SpanProps & {
16
35
  css?: CSS;
17
36
  }>;
18
37
 
19
- export { Hotkey, HotkeySharedProps, HotkeyStyledProps };
38
+ export { Hotkey };
39
+ export type { HotkeySharedProps, HotkeyStyledProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirohq/design-system-base-hotkey",
3
- "version": "1.1.2",
3
+ "version": "1.2.0-fix-stitches-types.0",
4
4
  "description": "",
5
5
  "author": "Miro",
6
6
  "source": "src/index.ts",
@@ -26,8 +26,8 @@
26
26
  "react": "^16.14 || ^17 || ^18 || ^19"
27
27
  },
28
28
  "dependencies": {
29
- "@mirohq/design-system-primitive": "^2.1.0",
30
- "@mirohq/design-system-stitches": "^3.1.2"
29
+ "@mirohq/design-system-primitive": "^2.2.0-fix-stitches-types.0",
30
+ "@mirohq/design-system-stitches": "^3.2.0-fix-stitches-types.0"
31
31
  },
32
32
  "scripts": {
33
33
  "build": "rollup -c ../../../../rollup.config.js",