playroom 0.37.1 → 0.38.1
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/CHANGELOG.md +32 -0
- package/README.md +4 -0
- package/lib/start.js +3 -0
- package/package.json +17 -5
- package/src/Playroom/Box/Box.tsx +33 -0
- package/src/Playroom/Button/Button.css.ts +3 -2
- package/src/Playroom/Button/Button.tsx +0 -1
- package/src/Playroom/CodeEditor/CodeEditor.css.ts +5 -4
- package/src/Playroom/Frames/Frames.css.ts +21 -42
- package/src/Playroom/Frames/Frames.tsx +31 -28
- package/src/Playroom/FramesPanel/FramesPanel.css.ts +8 -24
- package/src/Playroom/FramesPanel/FramesPanel.tsx +89 -116
- package/src/Playroom/Heading/Heading.css.ts +2 -1
- package/src/Playroom/Inline/Inline.css.ts +22 -49
- package/src/Playroom/Inline/Inline.tsx +12 -16
- package/src/Playroom/Playroom.css.ts +2 -1
- package/src/Playroom/Playroom.tsx +22 -0
- package/src/Playroom/PreviewPanel/CopyButton.tsx +0 -1
- package/src/Playroom/PreviewPanel/PreviewPanel.tsx +2 -3
- package/src/Playroom/SettingsPanel/SettingsPanel.css.ts +12 -25
- package/src/Playroom/SettingsPanel/SettingsPanel.tsx +76 -73
- package/src/Playroom/Snippets/SearchField/SearchField.css.ts +2 -1
- package/src/Playroom/Snippets/SearchField/SearchField.tsx +3 -3
- package/src/Playroom/Snippets/Snippets.css.ts +4 -3
- package/src/Playroom/Snippets/Snippets.tsx +3 -3
- package/src/Playroom/Stack/Stack.css.ts +4 -6
- package/src/Playroom/Stack/Stack.tsx +4 -19
- package/src/Playroom/StatusMessage/StatusMessage.css.ts +2 -1
- package/src/Playroom/Toolbar/Toolbar.css.ts +35 -41
- package/src/Playroom/Toolbar/Toolbar.tsx +37 -36
- package/src/Playroom/ToolbarItem/ToolbarItem.css.ts +2 -1
- package/src/Playroom/ToolbarItem/ToolbarItem.tsx +1 -4
- package/src/Playroom/ToolbarPanel/ToolbarPanel.tsx +1 -7
- package/src/Playroom/icons/ChevronIcon.css.ts +1 -1
- package/src/Playroom/sprinkles.css.ts +9 -49
- package/src/Playroom/vars.css.ts +47 -0
- package/.changeset/README.md +0 -8
- package/.changeset/config.json +0 -11
- package/.editorconfig +0 -13
- package/.eslintignore +0 -4
- package/.eslintrc +0 -16
- package/.github/CODEOWNERS +0 -5
- package/.github/workflows/preview-site.yml +0 -42
- package/.github/workflows/release.yml +0 -41
- package/.github/workflows/snapshot.yml +0 -35
- package/.github/workflows/validate.yml +0 -63
- package/.husky/pre-commit +0 -4
- package/.nvmrc +0 -1
- package/.prettierignore +0 -4
- package/.prettierrc +0 -3
- package/cypress/e2e/editor.cy.js +0 -35
- package/cypress/e2e/keymaps.cy.js +0 -2025
- package/cypress/e2e/scope.cy.js +0 -16
- package/cypress/e2e/smoke.cy.js +0 -28
- package/cypress/e2e/snippets.cy.js +0 -117
- package/cypress/e2e/toolbar.cy.js +0 -52
- package/cypress/e2e/urlHandling.cy.js +0 -50
- package/cypress/projects/basic/components.js +0 -26
- package/cypress/projects/basic/playroom.config.js +0 -8
- package/cypress/projects/basic/snippets.js +0 -27
- package/cypress/projects/basic/useScope.js +0 -4
- package/cypress/projects/themed/components.js +0 -26
- package/cypress/projects/themed/playroom.config.js +0 -10
- package/cypress/projects/themed/serve.json +0 -3
- package/cypress/projects/themed/snippets.js +0 -22
- package/cypress/projects/themed/themes.js +0 -2
- package/cypress/projects/typescript/components/Bar.tsx +0 -13
- package/cypress/projects/typescript/components/Foo.tsx +0 -13
- package/cypress/projects/typescript/components/styles.ts +0 -4
- package/cypress/projects/typescript/components.ts +0 -2
- package/cypress/projects/typescript/playroom.config.js +0 -33
- package/cypress/projects/typescript/snippets.ts +0 -22
- package/cypress/projects/typescript/tsconfig.json +0 -18
- package/cypress/support/commands.js +0 -10
- package/cypress/support/e2e.js +0 -1
- package/cypress/support/utils.js +0 -236
- package/cypress/tsconfig.json +0 -9
- package/cypress.config.mjs +0 -7
- package/scripts/postCommitStatus.js +0 -50
- package/src/Playroom/Divider/Divider.css.ts +0 -16
- package/src/Playroom/Divider/Divider.tsx +0 -7
- package/tsconfig.json +0 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# playroom
|
|
2
2
|
|
|
3
|
+
## 0.38.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a62002d: Apply `title` from url on page load
|
|
8
|
+
|
|
9
|
+
Previously the document `title` would only update when the frames panel is open.
|
|
10
|
+
The title is now correctly reflected from the url on page load.
|
|
11
|
+
|
|
12
|
+
- cf0fa9e: start: Disable webpack error overlay
|
|
13
|
+
|
|
14
|
+
Prevent the default webpack dev server error overlay from blocking the preview frames in `start` mode.
|
|
15
|
+
Playroom handles its own errors, and this would block the preview frames and need to be dismissed manually.
|
|
16
|
+
|
|
17
|
+
## 0.38.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- 7df36e3: Improve frame filtering UX.
|
|
22
|
+
|
|
23
|
+
- Allow users to select all checkboxes in a frame filter section, rather than automatically unselecting all checkboxes when all are selected.
|
|
24
|
+
- Rename the "Show all" button to "Clear" to reinforce the filtering pattern.
|
|
25
|
+
|
|
26
|
+
- 384810e: Use CSS gap and grid for layout spacing in Playroom UI.
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- a0724d2: Fixes a bug in the side panel exit animation that was causing the contents to vanish abruptly
|
|
31
|
+
- 934a017: Exclude irrelevant files from published package
|
|
32
|
+
- 92a0039: Fix Playroom UI icon centering
|
|
33
|
+
- 422a259: Remove `data-testid` attributes from UI elements
|
|
34
|
+
|
|
3
35
|
## 0.37.1
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -208,6 +208,10 @@ Playroom supports loading [ESM](https://nodejs.org/api/esm.html#introduction) co
|
|
|
208
208
|
|
|
209
209
|
If you are interested in integrating Playroom into Storybook, check out [storybook-addon-playroom](https://github.com/rbardini/storybook-addon-playroom).
|
|
210
210
|
|
|
211
|
+
## Browser Support
|
|
212
|
+
|
|
213
|
+
Playroom is built to work on the latest stable versions of all major browsers. Some features may not work as expected in older browsers.
|
|
214
|
+
|
|
211
215
|
## License
|
|
212
216
|
|
|
213
217
|
MIT.
|
package/lib/start.js
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playroom",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.1",
|
|
4
4
|
"description": "Design with code, powered by your own component library",
|
|
5
5
|
"main": "utils/index.js",
|
|
6
6
|
"types": "utils/index.d.ts",
|
|
7
7
|
"bin": {
|
|
8
8
|
"playroom": "bin/cli.cjs"
|
|
9
9
|
},
|
|
10
|
+
"files": [
|
|
11
|
+
"CHANGELOG.md",
|
|
12
|
+
".babelrc",
|
|
13
|
+
"images",
|
|
14
|
+
"lib",
|
|
15
|
+
"src",
|
|
16
|
+
"utils"
|
|
17
|
+
],
|
|
10
18
|
"lint-staged": {
|
|
11
19
|
"**/*.{js,ts,tsx}": [
|
|
12
20
|
"eslint"
|
|
@@ -44,6 +52,7 @@
|
|
|
44
52
|
"@vanilla-extract/webpack-plugin": "^2.3.6",
|
|
45
53
|
"babel-loader": "^9.1.0",
|
|
46
54
|
"classnames": "^2.3.2",
|
|
55
|
+
"clsx": "^2.1.1",
|
|
47
56
|
"codemirror": "^5.65.10",
|
|
48
57
|
"command-line-args": "^5.2.1",
|
|
49
58
|
"command-line-usage": "^6.1.3",
|
|
@@ -69,6 +78,7 @@
|
|
|
69
78
|
"re-resizable": "^6.9.9",
|
|
70
79
|
"react-docgen-typescript": "^2.2.2",
|
|
71
80
|
"react-helmet": "^6.1.0",
|
|
81
|
+
"react-transition-group": "^4.4.5",
|
|
72
82
|
"react-use": "^17.4.0",
|
|
73
83
|
"read-pkg-up": "^7.0.1",
|
|
74
84
|
"scope-eval": "^1.0.0",
|
|
@@ -83,11 +93,13 @@
|
|
|
83
93
|
"@actions/core": "^1.10.0",
|
|
84
94
|
"@changesets/cli": "^2.25.2",
|
|
85
95
|
"@octokit/rest": "^19.0.5",
|
|
96
|
+
"@testing-library/cypress": "^10.0.1",
|
|
86
97
|
"@types/jest": "^29.2.4",
|
|
87
98
|
"@types/react-helmet": "^6.1.6",
|
|
99
|
+
"@types/react-transition-group": "^4.4.10",
|
|
88
100
|
"concurrently": "^7.6.0",
|
|
89
101
|
"cypress": "^13.6.6",
|
|
90
|
-
"eslint": "^8.
|
|
102
|
+
"eslint": "^8.56.0",
|
|
91
103
|
"eslint-config-seek": "^11.3.1",
|
|
92
104
|
"husky": "^8.0.2",
|
|
93
105
|
"jest": "^29.3.1",
|
|
@@ -115,19 +127,19 @@
|
|
|
115
127
|
"cypress:verify": "cypress verify",
|
|
116
128
|
"start:basic": "./bin/cli.cjs start --config cypress/projects/basic/playroom.config.js",
|
|
117
129
|
"build:basic": "./bin/cli.cjs build --config cypress/projects/basic/playroom.config.js",
|
|
118
|
-
"serve:basic": "PORT=9000 serve --no-request-logging cypress/projects/basic/dist",
|
|
130
|
+
"serve:basic": "PORT=9000 serve --config ../serve.json --no-request-logging cypress/projects/basic/dist",
|
|
119
131
|
"start:themed": "./bin/cli.cjs start --config cypress/projects/themed/playroom.config.js",
|
|
120
132
|
"build:themed": "./bin/cli.cjs build --config cypress/projects/themed/playroom.config.js",
|
|
121
133
|
"serve:themed": "PORT=9001 serve --config ../serve.json --no-request-logging cypress/projects/themed/dist",
|
|
122
134
|
"start:typescript": "./bin/cli.cjs start --config cypress/projects/typescript/playroom.config.js",
|
|
123
135
|
"build:typescript": "./bin/cli.cjs build --config cypress/projects/typescript/playroom.config.js",
|
|
124
|
-
"serve:typescript": "PORT=9002 serve --no-request-logging cypress/projects/typescript/dist",
|
|
136
|
+
"serve:typescript": "PORT=9002 serve --config ../serve.json --no-request-logging cypress/projects/typescript/dist",
|
|
125
137
|
"start:all": "concurrently 'npm:start:*(!all)'",
|
|
126
138
|
"build:all": "concurrently 'npm:build:*(!all)'",
|
|
127
139
|
"serve:all": "concurrently 'npm:serve:*(!all)'",
|
|
128
140
|
"build-and-serve:all": "pnpm build:all && pnpm serve:all",
|
|
129
141
|
"lint": "concurrently 'npm:lint:*'",
|
|
130
|
-
"lint:eslint": "eslint --cache .",
|
|
142
|
+
"lint:eslint": "NODE_OPTIONS=--max_old_space_size=8192 eslint --cache .",
|
|
131
143
|
"lint:prettier": "prettier --list-different '**/*.{js,md,ts,tsx}'",
|
|
132
144
|
"lint:tsc": "tsc --noEmit",
|
|
133
145
|
"lint:cypress": "tsc --project cypress/tsconfig.json",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import clsx, { type ClassValue } from 'clsx';
|
|
2
|
+
import type { AllHTMLAttributes, ElementType } from 'react';
|
|
3
|
+
import { sprinkles, type Sprinkles } from '../sprinkles.css';
|
|
4
|
+
|
|
5
|
+
interface BoxProps
|
|
6
|
+
extends Omit<
|
|
7
|
+
AllHTMLAttributes<HTMLElement>,
|
|
8
|
+
'width' | 'height' | 'className' | 'data'
|
|
9
|
+
>,
|
|
10
|
+
Sprinkles {
|
|
11
|
+
className?: ClassValue;
|
|
12
|
+
component?: ElementType;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const Box = ({
|
|
16
|
+
component = 'div',
|
|
17
|
+
className,
|
|
18
|
+
...restProps
|
|
19
|
+
}: BoxProps) => {
|
|
20
|
+
const atomProps: Record<string, unknown> = {};
|
|
21
|
+
|
|
22
|
+
for (const key in restProps) {
|
|
23
|
+
if (sprinkles.properties.has(key as keyof Sprinkles)) {
|
|
24
|
+
atomProps[key] = restProps[key as keyof typeof restProps];
|
|
25
|
+
delete restProps[key as keyof typeof restProps];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const classes = clsx(className, sprinkles({ ...atomProps }));
|
|
30
|
+
const Component = component;
|
|
31
|
+
|
|
32
|
+
return <Component className={classes} {...restProps} />;
|
|
33
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { style, createVar } from '@vanilla-extract/css';
|
|
2
2
|
import { calc } from '@vanilla-extract/css-utils';
|
|
3
|
-
import { sprinkles,
|
|
3
|
+
import { sprinkles, colorPaletteVars } from '../sprinkles.css';
|
|
4
|
+
import { vars } from '../vars.css';
|
|
4
5
|
|
|
5
6
|
export const reset = style([
|
|
6
7
|
sprinkles({
|
|
@@ -78,7 +79,7 @@ export const positive = style({
|
|
|
78
79
|
});
|
|
79
80
|
|
|
80
81
|
export const iconContainer = style([
|
|
81
|
-
sprinkles({ position: 'relative', paddingLeft: '
|
|
82
|
+
sprinkles({ position: 'relative', paddingLeft: 'small' }),
|
|
82
83
|
{
|
|
83
84
|
top: '1px',
|
|
84
85
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { style, globalStyle, keyframes, createVar } from '@vanilla-extract/css';
|
|
2
|
-
import {
|
|
2
|
+
import { colorPaletteVars, sprinkles } from '../sprinkles.css';
|
|
3
|
+
import { vars } from '../vars.css';
|
|
3
4
|
import { toolbarItemSize } from '../ToolbarItem/ToolbarItem.css';
|
|
4
5
|
|
|
5
6
|
const minimumLineNumberWidth = '50px';
|
|
@@ -296,9 +297,9 @@ globalStyle('.CodeMirror-dialog button', {
|
|
|
296
297
|
appearance: 'none',
|
|
297
298
|
font: vars.font.scale.standard,
|
|
298
299
|
fontFamily: vars.font.family.standard,
|
|
299
|
-
marginLeft: vars.space.
|
|
300
|
-
paddingTop: vars.space.
|
|
301
|
-
paddingBottom: vars.space.
|
|
300
|
+
marginLeft: vars.space.small,
|
|
301
|
+
paddingTop: vars.space.small,
|
|
302
|
+
paddingBottom: vars.space.small,
|
|
302
303
|
paddingLeft: vars.space.large,
|
|
303
304
|
paddingRight: vars.space.large,
|
|
304
305
|
alignSelf: 'center',
|
|
@@ -1,50 +1,29 @@
|
|
|
1
1
|
import { style } from '@vanilla-extract/css';
|
|
2
2
|
import { sprinkles } from '../sprinkles.css';
|
|
3
3
|
|
|
4
|
-
export const root =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
paddingLeft: 'gutter',
|
|
13
|
-
textAlign: 'center',
|
|
14
|
-
}),
|
|
15
|
-
{
|
|
16
|
-
overflowX: 'auto',
|
|
17
|
-
overflowY: 'hidden',
|
|
18
|
-
// // Simulate centering when fewer frames than viewport width.
|
|
19
|
-
'::before': {
|
|
20
|
-
content: '""',
|
|
21
|
-
flex: 1,
|
|
22
|
-
},
|
|
23
|
-
'::after': {
|
|
24
|
-
content: '""',
|
|
25
|
-
flex: 1,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
]);
|
|
4
|
+
export const root = sprinkles({
|
|
5
|
+
height: 'full',
|
|
6
|
+
boxSizing: 'border-box',
|
|
7
|
+
display: 'flex',
|
|
8
|
+
padding: 'gutter',
|
|
9
|
+
textAlign: 'center',
|
|
10
|
+
overflow: 'auto',
|
|
11
|
+
});
|
|
29
12
|
|
|
30
|
-
export const frameContainer =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
paddingRight: 'gutter',
|
|
38
|
-
}),
|
|
39
|
-
{},
|
|
40
|
-
]);
|
|
13
|
+
export const frameContainer = sprinkles({
|
|
14
|
+
position: 'relative',
|
|
15
|
+
height: 'full',
|
|
16
|
+
textAlign: 'left',
|
|
17
|
+
display: 'flex',
|
|
18
|
+
flexDirection: 'column',
|
|
19
|
+
});
|
|
41
20
|
|
|
42
|
-
export const frame =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
21
|
+
export const frame = sprinkles({
|
|
22
|
+
position: 'relative',
|
|
23
|
+
height: 'full',
|
|
24
|
+
border: 0,
|
|
25
|
+
flexGrow: 1,
|
|
26
|
+
});
|
|
48
27
|
|
|
49
28
|
export const frameBorder = style([
|
|
50
29
|
sprinkles({
|
|
@@ -9,6 +9,7 @@ import playroomConfig from '../../config';
|
|
|
9
9
|
import frameSrc from './frameSrc';
|
|
10
10
|
|
|
11
11
|
import * as styles from './Frames.css';
|
|
12
|
+
import { Box } from '../Box/Box';
|
|
12
13
|
|
|
13
14
|
interface FramesProps {
|
|
14
15
|
code: string;
|
|
@@ -34,36 +35,38 @@ export default function Frames({ code, themes, widths }: FramesProps) {
|
|
|
34
35
|
|
|
35
36
|
return (
|
|
36
37
|
<div ref={scrollingPanelRef} className={styles.root}>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<div className={styles.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
{
|
|
48
|
-
|
|
38
|
+
<Box display="flex" gap="gutter" marginX="auto">
|
|
39
|
+
{frames.map((frame) => (
|
|
40
|
+
<div
|
|
41
|
+
key={`${frame.theme}_${frame.width}`}
|
|
42
|
+
className={styles.frameContainer}
|
|
43
|
+
>
|
|
44
|
+
<div className={styles.frame}>
|
|
45
|
+
<div className={styles.frameBorder} />
|
|
46
|
+
<Iframe
|
|
47
|
+
intersectionRootRef={scrollingPanelRef}
|
|
48
|
+
src={frameSrc(
|
|
49
|
+
{ themeName: frame.theme, code: renderCode.current },
|
|
50
|
+
playroomConfig
|
|
51
|
+
)}
|
|
52
|
+
className={styles.frame}
|
|
53
|
+
style={{ width: frame.width }}
|
|
54
|
+
data-testid="previewFrame"
|
|
55
|
+
/>
|
|
56
|
+
</div>
|
|
57
|
+
<div className={styles.frameName} data-testid="frameName">
|
|
58
|
+
{frame.theme === '__PLAYROOM__NO_THEME__' ? (
|
|
59
|
+
<Text weight="strong">{frame.widthName}</Text>
|
|
60
|
+
) : (
|
|
61
|
+
<Text>
|
|
62
|
+
<Strong>{frame.theme}</Strong>
|
|
63
|
+
{` \u2013 ${frame.widthName}`}
|
|
64
|
+
</Text>
|
|
49
65
|
)}
|
|
50
|
-
|
|
51
|
-
style={{ width: frame.width }}
|
|
52
|
-
data-testid="previewFrame"
|
|
53
|
-
/>
|
|
66
|
+
</div>
|
|
54
67
|
</div>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<Text weight="strong">{frame.widthName}</Text>
|
|
58
|
-
) : (
|
|
59
|
-
<Text>
|
|
60
|
-
<Strong>{frame.theme}</Strong>
|
|
61
|
-
{` \u2013 ${frame.widthName}`}
|
|
62
|
-
</Text>
|
|
63
|
-
)}
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
))}
|
|
68
|
+
))}
|
|
69
|
+
</Box>
|
|
67
70
|
</div>
|
|
68
71
|
);
|
|
69
72
|
}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
import { calc } from '@vanilla-extract/css-utils';
|
|
2
2
|
import { globalStyle, style } from '@vanilla-extract/css';
|
|
3
|
-
import { colorPaletteVars, sprinkles
|
|
4
|
-
|
|
5
|
-
export const title = sprinkles({
|
|
6
|
-
display: 'flex',
|
|
7
|
-
alignItems: 'center',
|
|
8
|
-
justifyContent: 'space-between',
|
|
9
|
-
marginBottom: 'medium',
|
|
10
|
-
});
|
|
3
|
+
import { colorPaletteVars, sprinkles } from '../sprinkles.css';
|
|
4
|
+
import { vars } from '../vars.css';
|
|
11
5
|
|
|
12
6
|
export const reset = style([
|
|
13
7
|
sprinkles({
|
|
14
8
|
position: 'relative',
|
|
15
9
|
font: 'small',
|
|
16
10
|
border: 0,
|
|
17
|
-
padding: '
|
|
11
|
+
padding: 'small',
|
|
18
12
|
appearance: 'none',
|
|
19
13
|
}),
|
|
20
14
|
{
|
|
@@ -22,7 +16,7 @@ export const reset = style([
|
|
|
22
16
|
backgroundColor: 'transparent',
|
|
23
17
|
outline: 'none',
|
|
24
18
|
textDecoration: 'underline',
|
|
25
|
-
margin: calc(vars.space.
|
|
19
|
+
margin: calc(vars.space.small).negate().toString(),
|
|
26
20
|
'::before': {
|
|
27
21
|
content: '""',
|
|
28
22
|
position: 'absolute',
|
|
@@ -46,18 +40,9 @@ export const reset = style([
|
|
|
46
40
|
},
|
|
47
41
|
]);
|
|
48
42
|
|
|
49
|
-
export const label =
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
display: 'flex',
|
|
53
|
-
alignItems: 'center',
|
|
54
|
-
cursor: 'pointer',
|
|
55
|
-
userSelect: 'none',
|
|
56
|
-
}),
|
|
57
|
-
{
|
|
58
|
-
height: calc(vars.grid).multiply(9).toString(),
|
|
59
|
-
},
|
|
60
|
-
]);
|
|
43
|
+
export const label = sprinkles({
|
|
44
|
+
cursor: 'pointer',
|
|
45
|
+
});
|
|
61
46
|
|
|
62
47
|
const checkboxSize = '20px';
|
|
63
48
|
export const checkbox = style([
|
|
@@ -67,7 +52,6 @@ export const checkbox = style([
|
|
|
67
52
|
left: 0,
|
|
68
53
|
right: 0,
|
|
69
54
|
opacity: 0,
|
|
70
|
-
pointerEvents: 'none',
|
|
71
55
|
}),
|
|
72
56
|
{
|
|
73
57
|
height: checkboxSize,
|
|
@@ -83,8 +67,8 @@ export const fakeCheckbox = style([
|
|
|
83
67
|
justifyContent: 'center',
|
|
84
68
|
position: 'relative',
|
|
85
69
|
borderRadius: 'large',
|
|
86
|
-
marginRight: 'large',
|
|
87
70
|
padding: checkboxPadding,
|
|
71
|
+
pointerEvents: 'none',
|
|
88
72
|
}),
|
|
89
73
|
{
|
|
90
74
|
flexGrow: 0,
|