@mirohq/design-system-styles 1.0.8
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 +81 -0
- package/dist/main.js.map +1 -0
- package/dist/module.js +58 -0
- package/dist/module.js.map +1 -0
- package/dist/types.d.ts +57 -0
- package/package.json +34 -0
package/dist/main.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var designSystemStitches = require('@mirohq/design-system-stitches');
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var _a;
|
|
26
|
+
if (/apple/i.test((_a = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : _a.vendor)) {
|
|
27
|
+
Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
28
|
+
/* webpackChunkName: "what-input" */
|
|
29
|
+
'what-input'
|
|
30
|
+
)); });
|
|
31
|
+
}
|
|
32
|
+
const css = (style) => ({
|
|
33
|
+
"&:focus-visible": style,
|
|
34
|
+
'[data-whatintent="keyboard"] &:focus': style
|
|
35
|
+
});
|
|
36
|
+
const defaults = css({
|
|
37
|
+
boxShadow: `0 0 0 1px rgba(104, 129, 255, 1), 0 0 0 5px rgba(217, 224, 255, 1)`,
|
|
38
|
+
outline: "none"
|
|
39
|
+
});
|
|
40
|
+
const inner = css({
|
|
41
|
+
borderRadius: "$100",
|
|
42
|
+
boxShadow: `inset 0 0 0 3px rgba(217, 224, 255, 1), inset 0 0 0 5px rgba(104, 129, 255, 1)`,
|
|
43
|
+
outline: "none"
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
var focus = /*#__PURE__*/Object.freeze({
|
|
47
|
+
__proto__: null,
|
|
48
|
+
css: css,
|
|
49
|
+
defaults: defaults,
|
|
50
|
+
inner: inner
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
const fadeInScaled = designSystemStitches.keyframes({
|
|
54
|
+
"0%": { opacity: 0, transform: "scale(0.8)" },
|
|
55
|
+
"100%": { opacity: 1, transform: "scale(1)" }
|
|
56
|
+
});
|
|
57
|
+
const fadeOutScaled = designSystemStitches.keyframes({
|
|
58
|
+
"0%": { opacity: 1, transform: "scale(1)" },
|
|
59
|
+
"100%": { opacity: 0, transform: "scale(0.8)" }
|
|
60
|
+
});
|
|
61
|
+
const fadeIn = designSystemStitches.keyframes({
|
|
62
|
+
"0%": { opacity: 0 },
|
|
63
|
+
"50%": { opacity: 0.7 },
|
|
64
|
+
"100%": { opacity: 1 }
|
|
65
|
+
});
|
|
66
|
+
const fadeOut = designSystemStitches.keyframes({
|
|
67
|
+
"0%": { opacity: 1 },
|
|
68
|
+
"100%": { opacity: 0 }
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
var animations = /*#__PURE__*/Object.freeze({
|
|
72
|
+
__proto__: null,
|
|
73
|
+
fadeInScaled: fadeInScaled,
|
|
74
|
+
fadeOutScaled: fadeOutScaled,
|
|
75
|
+
fadeIn: fadeIn,
|
|
76
|
+
fadeOut: fadeOut
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
exports.animations = animations;
|
|
80
|
+
exports.focus = focus;
|
|
81
|
+
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sources":["../src/focus.ts","../src/animations.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\n\n// use what-input to \"fake\" focus-visible\n// TODO: Remove it whenever Safari 15.4 becomes the default for most of its users\nif (/apple/i.test(globalThis?.navigator?.vendor)) {\n import(/* webpackChunkName: \"what-input\" */ 'what-input')\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const css = (style: CSSProperties) => ({\n '&:focus-visible': style,\n '[data-whatintent=\"keyboard\"] &:focus': style,\n})\n\nexport const defaults = css({\n boxShadow: `0 0 0 1px rgba(104, 129, 255, 1), 0 0 0 5px rgba(217, 224, 255, 1)`,\n outline: 'none',\n})\n\nexport const inner = css({\n borderRadius: '$100',\n boxShadow: `inset 0 0 0 3px rgba(217, 224, 255, 1), inset 0 0 0 5px rgba(104, 129, 255, 1)`,\n outline: 'none',\n})\n","import { keyframes } from '@mirohq/design-system-stitches'\n\nexport const fadeInScaled = keyframes({\n '0%': { opacity: 0, transform: 'scale(0.8)' },\n '100%': { opacity: 1, transform: 'scale(1)' },\n})\n\nexport const fadeOutScaled = keyframes({\n '0%': { opacity: 1, transform: 'scale(1)' },\n '100%': { opacity: 0, transform: 'scale(0.8)' },\n})\n\nexport const fadeIn = keyframes({\n '0%': { opacity: 0 },\n '50%': { opacity: 0.7 },\n '100%': { opacity: 1 },\n})\n\nexport const fadeOut = keyframes({\n '0%': { opacity: 1 },\n '100%': { opacity: 0 },\n})\n"],"names":["keyframes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,EAAA,CAAA;AAIA,IAAI,SAAS,IAAK,CAAA,CAAA,EAAA,GAAA,UAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAY,SAAZ,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAuB,MAAM,CAAG,EAAA;AAChD,EAAA,mFAAA;AAAA;AAAA,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,CAAE,EAAA;AACvB,CAAC,CAAA;;;;;;;;;;;;;"}
|
package/dist/module.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { keyframes } from '@mirohq/design-system-stitches';
|
|
2
|
+
|
|
3
|
+
var _a;
|
|
4
|
+
if (/apple/i.test((_a = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : _a.vendor)) {
|
|
5
|
+
import(
|
|
6
|
+
/* webpackChunkName: "what-input" */
|
|
7
|
+
'what-input'
|
|
8
|
+
);
|
|
9
|
+
}
|
|
10
|
+
const css = (style) => ({
|
|
11
|
+
"&:focus-visible": style,
|
|
12
|
+
'[data-whatintent="keyboard"] &:focus': style
|
|
13
|
+
});
|
|
14
|
+
const defaults = css({
|
|
15
|
+
boxShadow: `0 0 0 1px rgba(104, 129, 255, 1), 0 0 0 5px rgba(217, 224, 255, 1)`,
|
|
16
|
+
outline: "none"
|
|
17
|
+
});
|
|
18
|
+
const inner = css({
|
|
19
|
+
borderRadius: "$100",
|
|
20
|
+
boxShadow: `inset 0 0 0 3px rgba(217, 224, 255, 1), inset 0 0 0 5px rgba(104, 129, 255, 1)`,
|
|
21
|
+
outline: "none"
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
var focus = /*#__PURE__*/Object.freeze({
|
|
25
|
+
__proto__: null,
|
|
26
|
+
css: css,
|
|
27
|
+
defaults: defaults,
|
|
28
|
+
inner: inner
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const fadeInScaled = keyframes({
|
|
32
|
+
"0%": { opacity: 0, transform: "scale(0.8)" },
|
|
33
|
+
"100%": { opacity: 1, transform: "scale(1)" }
|
|
34
|
+
});
|
|
35
|
+
const fadeOutScaled = keyframes({
|
|
36
|
+
"0%": { opacity: 1, transform: "scale(1)" },
|
|
37
|
+
"100%": { opacity: 0, transform: "scale(0.8)" }
|
|
38
|
+
});
|
|
39
|
+
const fadeIn = keyframes({
|
|
40
|
+
"0%": { opacity: 0 },
|
|
41
|
+
"50%": { opacity: 0.7 },
|
|
42
|
+
"100%": { opacity: 1 }
|
|
43
|
+
});
|
|
44
|
+
const fadeOut = keyframes({
|
|
45
|
+
"0%": { opacity: 1 },
|
|
46
|
+
"100%": { opacity: 0 }
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
var animations = /*#__PURE__*/Object.freeze({
|
|
50
|
+
__proto__: null,
|
|
51
|
+
fadeInScaled: fadeInScaled,
|
|
52
|
+
fadeOutScaled: fadeOutScaled,
|
|
53
|
+
fadeIn: fadeIn,
|
|
54
|
+
fadeOut: fadeOut
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export { animations, focus };
|
|
58
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../src/focus.ts","../src/animations.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\n\n// use what-input to \"fake\" focus-visible\n// TODO: Remove it whenever Safari 15.4 becomes the default for most of its users\nif (/apple/i.test(globalThis?.navigator?.vendor)) {\n import(/* webpackChunkName: \"what-input\" */ 'what-input')\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const css = (style: CSSProperties) => ({\n '&:focus-visible': style,\n '[data-whatintent=\"keyboard\"] &:focus': style,\n})\n\nexport const defaults = css({\n boxShadow: `0 0 0 1px rgba(104, 129, 255, 1), 0 0 0 5px rgba(217, 224, 255, 1)`,\n outline: 'none',\n})\n\nexport const inner = css({\n borderRadius: '$100',\n boxShadow: `inset 0 0 0 3px rgba(217, 224, 255, 1), inset 0 0 0 5px rgba(104, 129, 255, 1)`,\n outline: 'none',\n})\n","import { keyframes } from '@mirohq/design-system-stitches'\n\nexport const fadeInScaled = keyframes({\n '0%': { opacity: 0, transform: 'scale(0.8)' },\n '100%': { opacity: 1, transform: 'scale(1)' },\n})\n\nexport const fadeOutScaled = keyframes({\n '0%': { opacity: 1, transform: 'scale(1)' },\n '100%': { opacity: 0, transform: 'scale(0.8)' },\n})\n\nexport const fadeIn = keyframes({\n '0%': { opacity: 0 },\n '50%': { opacity: 0.7 },\n '100%': { opacity: 1 },\n})\n\nexport const fadeOut = keyframes({\n '0%': { opacity: 1 },\n '100%': { opacity: 0 },\n})\n"],"names":[],"mappings":";;AAAA,IAAA,EAAA,CAAA;AAIA,IAAI,SAAS,IAAK,CAAA,CAAA,EAAA,GAAA,UAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAY,SAAZ,KAAA,IAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAuB,MAAM,CAAG,EAAA;AAChD,EAAA;AAAA;AAAA,IAA4C,YAAA;AAAA,GAAA,CAAA;AAC9C,CAAA;AAGa,MAAA,GAAA,GAAM,CAAC,KAA0B,MAAA;AAAA,EAC5C,iBAAmB,EAAA,KAAA;AAAA,EACnB,sCAAwC,EAAA,KAAA;AAC1C,CAAA,CAAA,CAAA;AAEO,MAAM,WAAW,GAAI,CAAA;AAAA,EAC1B,SAAW,EAAA,CAAA,kEAAA,CAAA;AAAA,EACX,OAAS,EAAA,MAAA;AACX,CAAC,CAAA,CAAA;AAEM,MAAM,QAAQ,GAAI,CAAA;AAAA,EACvB,YAAc,EAAA,MAAA;AAAA,EACd,SAAW,EAAA,CAAA,8EAAA,CAAA;AAAA,EACX,OAAS,EAAA,MAAA;AACX,CAAC,CAAA;;;;;;;;;ACrBM,MAAM,eAAe,SAAU,CAAA;AAAA,EACpC,IAAM,EAAA,EAAE,OAAS,EAAA,CAAA,EAAG,WAAW,YAAa,EAAA;AAAA,EAC5C,MAAQ,EAAA,EAAE,OAAS,EAAA,CAAA,EAAG,WAAW,UAAW,EAAA;AAC9C,CAAC,CAAA,CAAA;AAEM,MAAM,gBAAgB,SAAU,CAAA;AAAA,EACrC,IAAM,EAAA,EAAE,OAAS,EAAA,CAAA,EAAG,WAAW,UAAW,EAAA;AAAA,EAC1C,MAAQ,EAAA,EAAE,OAAS,EAAA,CAAA,EAAG,WAAW,YAAa,EAAA;AAChD,CAAC,CAAA,CAAA;AAEM,MAAM,SAAS,SAAU,CAAA;AAAA,EAC9B,IAAA,EAAM,EAAE,OAAA,EAAS,CAAE,EAAA;AAAA,EACnB,KAAA,EAAO,EAAE,OAAA,EAAS,GAAI,EAAA;AAAA,EACtB,MAAA,EAAQ,EAAE,OAAA,EAAS,CAAE,EAAA;AACvB,CAAC,CAAA,CAAA;AAEM,MAAM,UAAU,SAAU,CAAA;AAAA,EAC/B,IAAA,EAAM,EAAE,OAAA,EAAS,CAAE,EAAA;AAAA,EACnB,MAAA,EAAQ,EAAE,OAAA,EAAS,CAAE,EAAA;AACvB,CAAC,CAAA;;;;;;;;;;;;"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
declare const css: (style: CSSProperties) => {
|
|
4
|
+
'&:focus-visible': CSSProperties;
|
|
5
|
+
'[data-whatintent="keyboard"] &:focus': CSSProperties;
|
|
6
|
+
};
|
|
7
|
+
declare const defaults: {
|
|
8
|
+
'&:focus-visible': CSSProperties;
|
|
9
|
+
'[data-whatintent="keyboard"] &:focus': CSSProperties;
|
|
10
|
+
};
|
|
11
|
+
declare const inner: {
|
|
12
|
+
'&:focus-visible': CSSProperties;
|
|
13
|
+
'[data-whatintent="keyboard"] &:focus': CSSProperties;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
declare const focus_css: typeof css;
|
|
17
|
+
declare const focus_defaults: typeof defaults;
|
|
18
|
+
declare const focus_inner: typeof inner;
|
|
19
|
+
declare namespace focus {
|
|
20
|
+
export {
|
|
21
|
+
focus_css as css,
|
|
22
|
+
focus_defaults as defaults,
|
|
23
|
+
focus_inner as inner,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare const fadeInScaled: {
|
|
28
|
+
(): string;
|
|
29
|
+
name: string;
|
|
30
|
+
};
|
|
31
|
+
declare const fadeOutScaled: {
|
|
32
|
+
(): string;
|
|
33
|
+
name: string;
|
|
34
|
+
};
|
|
35
|
+
declare const fadeIn: {
|
|
36
|
+
(): string;
|
|
37
|
+
name: string;
|
|
38
|
+
};
|
|
39
|
+
declare const fadeOut: {
|
|
40
|
+
(): string;
|
|
41
|
+
name: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
declare const animations_fadeInScaled: typeof fadeInScaled;
|
|
45
|
+
declare const animations_fadeOutScaled: typeof fadeOutScaled;
|
|
46
|
+
declare const animations_fadeIn: typeof fadeIn;
|
|
47
|
+
declare const animations_fadeOut: typeof fadeOut;
|
|
48
|
+
declare namespace animations {
|
|
49
|
+
export {
|
|
50
|
+
animations_fadeInScaled as fadeInScaled,
|
|
51
|
+
animations_fadeOutScaled as fadeOutScaled,
|
|
52
|
+
animations_fadeIn as fadeIn,
|
|
53
|
+
animations_fadeOut as fadeOut,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { animations, focus };
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mirohq/design-system-styles",
|
|
3
|
+
"version": "1.0.8",
|
|
4
|
+
"description": "",
|
|
5
|
+
"author": "Miro",
|
|
6
|
+
"source": "src/index.ts",
|
|
7
|
+
"main": "dist/main.js",
|
|
8
|
+
"module": "dist/module.js",
|
|
9
|
+
"types": "dist/types.d.ts",
|
|
10
|
+
"sideEffects": false,
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"require": "./dist/main.js",
|
|
14
|
+
"import": "./dist/module.js",
|
|
15
|
+
"types": "./dist/types.d.ts"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"what-input": "^5.2.11",
|
|
26
|
+
"@mirohq/design-tokens": "^1.5.0",
|
|
27
|
+
"@mirohq/design-system-stitches": "^2.0.8"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "rollup -c ../../rollup.config.js",
|
|
31
|
+
"clean": "rm -rf dist",
|
|
32
|
+
"prebuild": "pnpm clean"
|
|
33
|
+
}
|
|
34
|
+
}
|