@pandacss/studio 0.0.0-dev-20230810095033 → 0.0.0-dev-20230810190237
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/package.json +8 -8
- package/styled-system/jsx/bleed.d.ts +9 -0
- package/styled-system/jsx/bleed.mjs +9 -0
- package/styled-system/jsx/index.d.ts +2 -0
- package/styled-system/jsx/index.mjs +2 -0
- package/styled-system/jsx/visually-hidden.d.ts +9 -0
- package/styled-system/jsx/visually-hidden.mjs +8 -0
- package/styled-system/patterns/bleed.d.ts +21 -0
- package/styled-system/patterns/bleed.mjs +20 -0
- package/styled-system/patterns/index.d.ts +2 -0
- package/styled-system/patterns/index.mjs +2 -0
- package/styled-system/patterns/visually-hidden.d.ts +20 -0
- package/styled-system/patterns/visually-hidden.mjs +16 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/studio",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20230810190237",
|
|
4
4
|
"description": "The automated token documentation for Panda CSS",
|
|
5
5
|
"main": "dist/studio.js",
|
|
6
6
|
"module": "dist/studio.mjs",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"react": "18.2.0",
|
|
34
34
|
"react-dom": "18.2.0",
|
|
35
35
|
"vite": "4.4.8",
|
|
36
|
-
"@pandacss/types": "0.0.0-dev-
|
|
37
|
-
"@pandacss/config": "0.0.0-dev-
|
|
38
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
39
|
-
"@pandacss/token-dictionary": "0.0.0-dev-
|
|
40
|
-
"@pandacss/logger": "0.0.0-dev-
|
|
41
|
-
"@pandacss/node": "0.0.0-dev-
|
|
36
|
+
"@pandacss/types": "0.0.0-dev-20230810190237",
|
|
37
|
+
"@pandacss/config": "0.0.0-dev-20230810190237",
|
|
38
|
+
"@pandacss/shared": "0.0.0-dev-20230810190237",
|
|
39
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20230810190237",
|
|
40
|
+
"@pandacss/logger": "0.0.0-dev-20230810190237",
|
|
41
|
+
"@pandacss/node": "0.0.0-dev-20230810190237"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/react": "18.2.18",
|
|
45
45
|
"@types/react-dom": "18.2.7",
|
|
46
46
|
"@vitejs/plugin-react": "4.0.4",
|
|
47
47
|
"execa": "7.2.0",
|
|
48
|
-
"@pandacss/dev": "0.0.0-dev-
|
|
48
|
+
"@pandacss/dev": "0.0.0-dev-20230810190237"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"codegen": "panda",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { BleedProperties } from '../patterns/bleed'
|
|
4
|
+
import type { HTMLPandaProps } from '../types/jsx'
|
|
5
|
+
|
|
6
|
+
export type BleedProps = BleedProperties & Omit<HTMLPandaProps<'div'>, keyof BleedProperties >
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export declare const Bleed: FunctionComponent<BleedProps>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { panda } from './factory.mjs'
|
|
3
|
+
import { getBleedStyle } from '../patterns/bleed.mjs'
|
|
4
|
+
|
|
5
|
+
export const Bleed = /* @__PURE__ */ forwardRef(function Bleed(props, ref) {
|
|
6
|
+
const { inline, block, ...restProps } = props
|
|
7
|
+
const styleProps = getBleedStyle({ inline, block })
|
|
8
|
+
return createElement(panda.div, { ref, ...styleProps, ...restProps })
|
|
9
|
+
})
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { FunctionComponent } from 'react'
|
|
3
|
+
import type { VisuallyHiddenProperties } from '../patterns/visually-hidden'
|
|
4
|
+
import type { HTMLPandaProps } from '../types/jsx'
|
|
5
|
+
|
|
6
|
+
export type VisuallyHiddenProps = VisuallyHiddenProperties & Omit<HTMLPandaProps<'div'>, keyof VisuallyHiddenProperties >
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export declare const VisuallyHidden: FunctionComponent<VisuallyHiddenProps>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react'
|
|
2
|
+
import { panda } from './factory.mjs'
|
|
3
|
+
import { getVisuallyHiddenStyle } from '../patterns/visually-hidden.mjs'
|
|
4
|
+
|
|
5
|
+
export const VisuallyHidden = /* @__PURE__ */ forwardRef(function VisuallyHidden(props, ref) {
|
|
6
|
+
const styleProps = getVisuallyHiddenStyle()
|
|
7
|
+
return createElement(panda.div, { ref, ...styleProps, ...props })
|
|
8
|
+
})
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
3
|
+
import type { PropertyValue } from '../types/prop-type'
|
|
4
|
+
import type { Properties } from '../types/csstype'
|
|
5
|
+
import type { Tokens } from '../tokens'
|
|
6
|
+
|
|
7
|
+
export type BleedProperties = {
|
|
8
|
+
inline?: PropertyValue<'marginInline'>
|
|
9
|
+
block?: PropertyValue<'marginBlock'>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
type BleedOptions = BleedProperties & Omit<SystemStyleObject, keyof BleedProperties >
|
|
14
|
+
|
|
15
|
+
interface BleedPatternFn {
|
|
16
|
+
(options?: BleedOptions): string
|
|
17
|
+
raw: (options: BleedOptions) => BleedOptions
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export declare const bleed: BleedPatternFn;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs'
|
|
2
|
+
import { css } from '../css/index.mjs'
|
|
3
|
+
|
|
4
|
+
const bleedConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { inline = '0', block = '0', ...rest } = props
|
|
7
|
+
return {
|
|
8
|
+
'--bleed-x': `spacing.${inline}`,
|
|
9
|
+
'--bleed-y': `spacing.${block}`,
|
|
10
|
+
marginInline: 'calc(var(--bleed-x, 0) * -1)',
|
|
11
|
+
marginBlock: 'calc(var(--bleed-y, 0) * -1)',
|
|
12
|
+
...rest,
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const getBleedStyle = (styles = {}) => bleedConfig.transform(styles, { map: mapObject })
|
|
18
|
+
|
|
19
|
+
export const bleed = (styles) => css(getBleedStyle(styles))
|
|
20
|
+
bleed.raw = (styles) => styles
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
3
|
+
import type { PropertyValue } from '../types/prop-type'
|
|
4
|
+
import type { Properties } from '../types/csstype'
|
|
5
|
+
import type { Tokens } from '../tokens'
|
|
6
|
+
|
|
7
|
+
export type VisuallyHiddenProperties = {
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
type VisuallyHiddenOptions = VisuallyHiddenProperties & Omit<SystemStyleObject, keyof VisuallyHiddenProperties >
|
|
13
|
+
|
|
14
|
+
interface VisuallyHiddenPatternFn {
|
|
15
|
+
(options?: VisuallyHiddenOptions): string
|
|
16
|
+
raw: (options: VisuallyHiddenOptions) => VisuallyHiddenOptions
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export declare const visuallyHidden: VisuallyHiddenPatternFn;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs'
|
|
2
|
+
import { css } from '../css/index.mjs'
|
|
3
|
+
|
|
4
|
+
const visuallyHiddenConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
return {
|
|
7
|
+
srOnly: true,
|
|
8
|
+
...props,
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const getVisuallyHiddenStyle = (styles = {}) => visuallyHiddenConfig.transform(styles, { map: mapObject })
|
|
14
|
+
|
|
15
|
+
export const visuallyHidden = (styles) => css(getVisuallyHiddenStyle(styles))
|
|
16
|
+
visuallyHidden.raw = (styles) => styles
|