@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/studio",
3
- "version": "0.0.0-dev-20230810095033",
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-20230810095033",
37
- "@pandacss/config": "0.0.0-dev-20230810095033",
38
- "@pandacss/shared": "0.0.0-dev-20230810095033",
39
- "@pandacss/token-dictionary": "0.0.0-dev-20230810095033",
40
- "@pandacss/logger": "0.0.0-dev-20230810095033",
41
- "@pandacss/node": "0.0.0-dev-20230810095033"
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-20230810095033"
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
+ })
@@ -19,5 +19,7 @@ export * from './wrap'
19
19
  export * from './container'
20
20
  export * from './divider'
21
21
  export * from './float'
22
+ export * from './bleed'
23
+ export * from './visually-hidden'
22
24
  export * from './styled-link'
23
25
  export type { HTMLPandaProps } from '../types/jsx'
@@ -18,4 +18,6 @@ export * from './wrap.mjs'
18
18
  export * from './container.mjs'
19
19
  export * from './divider.mjs'
20
20
  export * from './float.mjs'
21
+ export * from './bleed.mjs'
22
+ export * from './visually-hidden.mjs'
21
23
  export * from './styled-link.mjs'
@@ -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
@@ -17,4 +17,6 @@ export * from './wrap'
17
17
  export * from './container'
18
18
  export * from './divider'
19
19
  export * from './float'
20
+ export * from './bleed'
21
+ export * from './visually-hidden'
20
22
  export * from './styled-link'
@@ -16,4 +16,6 @@ export * from './wrap.mjs'
16
16
  export * from './container.mjs'
17
17
  export * from './divider.mjs'
18
18
  export * from './float.mjs'
19
+ export * from './bleed.mjs'
20
+ export * from './visually-hidden.mjs'
19
21
  export * from './styled-link.mjs'
@@ -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