@pandacss/studio 0.0.0-dev-20230613163214
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/LICENSE.md +21 -0
- package/astro.config.ts +14 -0
- package/dist/studio.d.ts +13 -0
- package/dist/studio.js +2089 -0
- package/dist/studio.mjs +2087 -0
- package/index.ts +1 -0
- package/package.json +59 -0
- package/panda.config.ts +110 -0
- package/public/favicon.svg +13 -0
- package/src/components/analyzer/category-utilities.tsx +146 -0
- package/src/components/analyzer/data-combobox.tsx +125 -0
- package/src/components/analyzer/data-table.tsx +43 -0
- package/src/components/analyzer/external-icon.tsx +8 -0
- package/src/components/analyzer/file-details.tsx +101 -0
- package/src/components/analyzer/get-report-infos-from.ts +80 -0
- package/src/components/analyzer/quick-tooltip.tsx +15 -0
- package/src/components/analyzer/report-item-columns.tsx +52 -0
- package/src/components/analyzer/report-item-link.tsx +98 -0
- package/src/components/analyzer/section.tsx +24 -0
- package/src/components/analyzer/sort-icon.tsx +7 -0
- package/src/components/analyzer/text-with-count.tsx +28 -0
- package/src/components/analyzer/token-search-combobox.tsx +39 -0
- package/src/components/analyzer/truncated-text.tsx +26 -0
- package/src/components/analyzer/utility-details.tsx +312 -0
- package/src/components/color-constrast.tsx +131 -0
- package/src/components/color-item.tsx +37 -0
- package/src/components/color-wrapper.tsx +25 -0
- package/src/components/colors.tsx +96 -0
- package/src/components/empty-state.tsx +19 -0
- package/src/components/font-family.tsx +55 -0
- package/src/components/font-tokens.tsx +69 -0
- package/src/components/head.astro +35 -0
- package/src/components/icons.tsx +207 -0
- package/src/components/input.tsx +27 -0
- package/src/components/layer-styles.tsx +38 -0
- package/src/components/logo.tsx +34 -0
- package/src/components/nav-item.tsx +39 -0
- package/src/components/overview.tsx +65 -0
- package/src/components/radii.tsx +34 -0
- package/src/components/semantic-color.tsx +27 -0
- package/src/components/side-nav-item.astro +25 -0
- package/src/components/side-nav.astro +30 -0
- package/src/components/sizes.tsx +53 -0
- package/src/components/text-styles.tsx +33 -0
- package/src/components/theme-toggle.astro +56 -0
- package/src/components/token-analyzer.tsx +390 -0
- package/src/components/token-content.tsx +5 -0
- package/src/components/token-group.tsx +6 -0
- package/src/components/typography-playground.tsx +83 -0
- package/src/env.d.ts +1 -0
- package/src/icons/moon.tsx +15 -0
- package/src/icons/sun.tsx +19 -0
- package/src/layouts/Layout.astro +19 -0
- package/src/layouts/Sidebar.astro +35 -0
- package/src/lib/analysis-data.ts +17 -0
- package/src/lib/color-contrast-checker.ts +218 -0
- package/src/lib/color.ts +40 -0
- package/src/lib/constants.ts +140 -0
- package/src/lib/create-context.ts +27 -0
- package/src/lib/get-report-item.tsx +41 -0
- package/src/lib/group-in.ts +35 -0
- package/src/lib/panda.context.ts +23 -0
- package/src/lib/pick.ts +24 -0
- package/src/lib/sizes-sort.ts +10 -0
- package/src/lib/truncate.tsx +7 -0
- package/src/lib/use-color-docs.ts +101 -0
- package/src/pages/colors.astro +11 -0
- package/src/pages/font-sizes.astro +15 -0
- package/src/pages/font-weights.astro +15 -0
- package/src/pages/fonts.astro +11 -0
- package/src/pages/index.astro +8 -0
- package/src/pages/layer-styles.astro +11 -0
- package/src/pages/letter-spacings.astro +20 -0
- package/src/pages/line-heights.astro +21 -0
- package/src/pages/playground/contrast-checker.astro +11 -0
- package/src/pages/playground/typography.astro +11 -0
- package/src/pages/radii.astro +11 -0
- package/src/pages/sizes.astro +14 -0
- package/src/pages/spacing.astro +14 -0
- package/src/pages/text-styles.astro +11 -0
- package/src/pages/token-analyzer/file.astro +11 -0
- package/src/pages/token-analyzer/index.astro +11 -0
- package/src/pages/token-analyzer/utility.astro +11 -0
- package/styled-system/chunks/..__core____tests____composition.test.css +2 -0
- package/styled-system/chunks/src__components__analyzer__category-utilities.css +97 -0
- package/styled-system/chunks/src__components__analyzer__data-combobox.css +77 -0
- package/styled-system/chunks/src__components__analyzer__data-table.css +37 -0
- package/styled-system/chunks/src__components__analyzer__file-details.css +103 -0
- package/styled-system/chunks/src__components__analyzer__quick-tooltip.css +2 -0
- package/styled-system/chunks/src__components__analyzer__report-item-columns.css +29 -0
- package/styled-system/chunks/src__components__analyzer__report-item-link.css +109 -0
- package/styled-system/chunks/src__components__analyzer__section.css +29 -0
- package/styled-system/chunks/src__components__analyzer__text-with-count.css +33 -0
- package/styled-system/chunks/src__components__analyzer__truncated-text.css +13 -0
- package/styled-system/chunks/src__components__analyzer__utility-details.css +125 -0
- package/styled-system/chunks/src__components__color-constrast.css +114 -0
- package/styled-system/chunks/src__components__color-item.css +21 -0
- package/styled-system/chunks/src__components__color-wrapper.css +73 -0
- package/styled-system/chunks/src__components__colors.css +97 -0
- package/styled-system/chunks/src__components__empty-state.css +45 -0
- package/styled-system/chunks/src__components__font-family.css +85 -0
- package/styled-system/chunks/src__components__font-tokens.css +61 -0
- package/styled-system/chunks/src__components__input.css +68 -0
- package/styled-system/chunks/src__components__layer-styles.css +66 -0
- package/styled-system/chunks/src__components__nav-item.css +73 -0
- package/styled-system/chunks/src__components__overview.css +125 -0
- package/styled-system/chunks/src__components__radii.css +49 -0
- package/styled-system/chunks/src__components__semantic-color.css +45 -0
- package/styled-system/chunks/src__components__side-nav-item.css +33 -0
- package/styled-system/chunks/src__components__side-nav.css +49 -0
- package/styled-system/chunks/src__components__sizes.css +41 -0
- package/styled-system/chunks/src__components__text-styles.css +31 -0
- package/styled-system/chunks/src__components__theme-toggle.css +63 -0
- package/styled-system/chunks/src__components__token-analyzer.css +227 -0
- package/styled-system/chunks/src__components__token-content.css +13 -0
- package/styled-system/chunks/src__components__token-group.css +21 -0
- package/styled-system/chunks/src__components__token-search-combobox.css +2 -0
- package/styled-system/chunks/src__components__typography-playground.css +61 -0
- package/styled-system/chunks/src__layouts__Layout.css +2 -0
- package/styled-system/chunks/src__layouts__Sidebar.css +113 -0
- package/styled-system/chunks/src__pages__colors.css +2 -0
- package/styled-system/chunks/src__pages__font-sizes.css +2 -0
- package/styled-system/chunks/src__pages__font-weights.css +2 -0
- package/styled-system/chunks/src__pages__fonts.css +2 -0
- package/styled-system/chunks/src__pages__index.css +2 -0
- package/styled-system/chunks/src__pages__layer-styles.css +2 -0
- package/styled-system/chunks/src__pages__letter-spacings.css +2 -0
- package/styled-system/chunks/src__pages__line-heights.css +2 -0
- package/styled-system/chunks/src__pages__playground__contrast-checker.css +2 -0
- package/styled-system/chunks/src__pages__playground__typography.css +2 -0
- package/styled-system/chunks/src__pages__radii.css +2 -0
- package/styled-system/chunks/src__pages__sizes.css +2 -0
- package/styled-system/chunks/src__pages__spacing.css +2 -0
- package/styled-system/chunks/src__pages__text-styles.css +2 -0
- package/styled-system/chunks/src__pages__token-analyzer__file.css +2 -0
- package/styled-system/chunks/src__pages__token-analyzer__index.css +2 -0
- package/styled-system/chunks/src__pages__token-analyzer__utility.css +2 -0
- package/styled-system/css/conditions.mjs +147 -0
- package/styled-system/css/css.d.ts +2 -0
- package/styled-system/css/css.mjs +391 -0
- package/styled-system/css/cva.d.ts +5 -0
- package/styled-system/css/cva.mjs +63 -0
- package/styled-system/css/cx.d.ts +4 -0
- package/styled-system/css/cx.mjs +15 -0
- package/styled-system/css/index.d.ts +3 -0
- package/styled-system/css/index.mjs +3 -0
- package/styled-system/global.css +61 -0
- package/styled-system/helpers.mjs +251 -0
- package/styled-system/jsx/absolute-center.d.ts +8 -0
- package/styled-system/jsx/absolute-center.mjs +9 -0
- package/styled-system/jsx/aspect-ratio.d.ts +8 -0
- package/styled-system/jsx/aspect-ratio.mjs +9 -0
- package/styled-system/jsx/box.d.ts +8 -0
- package/styled-system/jsx/box.mjs +8 -0
- package/styled-system/jsx/center.d.ts +8 -0
- package/styled-system/jsx/center.mjs +9 -0
- package/styled-system/jsx/circle.d.ts +8 -0
- package/styled-system/jsx/circle.mjs +9 -0
- package/styled-system/jsx/container.d.ts +8 -0
- package/styled-system/jsx/container.mjs +8 -0
- package/styled-system/jsx/divider.d.ts +8 -0
- package/styled-system/jsx/divider.mjs +9 -0
- package/styled-system/jsx/factory.d.ts +2 -0
- package/styled-system/jsx/factory.mjs +59 -0
- package/styled-system/jsx/flex.d.ts +8 -0
- package/styled-system/jsx/flex.mjs +9 -0
- package/styled-system/jsx/float.d.ts +8 -0
- package/styled-system/jsx/float.mjs +9 -0
- package/styled-system/jsx/grid-item.d.ts +8 -0
- package/styled-system/jsx/grid-item.mjs +9 -0
- package/styled-system/jsx/grid.d.ts +8 -0
- package/styled-system/jsx/grid.mjs +9 -0
- package/styled-system/jsx/hstack.d.ts +8 -0
- package/styled-system/jsx/hstack.mjs +9 -0
- package/styled-system/jsx/index.d.ts +20 -0
- package/styled-system/jsx/index.mjs +19 -0
- package/styled-system/jsx/is-valid-prop.mjs +1010 -0
- package/styled-system/jsx/spacer.d.ts +8 -0
- package/styled-system/jsx/spacer.mjs +9 -0
- package/styled-system/jsx/square.d.ts +8 -0
- package/styled-system/jsx/square.mjs +9 -0
- package/styled-system/jsx/stack.d.ts +8 -0
- package/styled-system/jsx/stack.mjs +9 -0
- package/styled-system/jsx/styled-link.d.ts +8 -0
- package/styled-system/jsx/styled-link.mjs +8 -0
- package/styled-system/jsx/vstack.d.ts +8 -0
- package/styled-system/jsx/vstack.mjs +9 -0
- package/styled-system/jsx/wrap.d.ts +8 -0
- package/styled-system/jsx/wrap.mjs +9 -0
- package/styled-system/patterns/absolute-center.d.ts +14 -0
- package/styled-system/patterns/absolute-center.mjs +23 -0
- package/styled-system/patterns/aspect-ratio.d.ts +14 -0
- package/styled-system/patterns/aspect-ratio.mjs +25 -0
- package/styled-system/patterns/box.d.ts +14 -0
- package/styled-system/patterns/box.mjs +12 -0
- package/styled-system/patterns/center.d.ts +14 -0
- package/styled-system/patterns/center.mjs +18 -0
- package/styled-system/patterns/circle.d.ts +14 -0
- package/styled-system/patterns/circle.mjs +22 -0
- package/styled-system/patterns/container.d.ts +14 -0
- package/styled-system/patterns/container.mjs +18 -0
- package/styled-system/patterns/divider.d.ts +16 -0
- package/styled-system/patterns/divider.mjs +21 -0
- package/styled-system/patterns/flex.d.ts +20 -0
- package/styled-system/patterns/flex.mjs +23 -0
- package/styled-system/patterns/float.d.ts +17 -0
- package/styled-system/patterns/float.mjs +45 -0
- package/styled-system/patterns/grid-item.d.ts +19 -0
- package/styled-system/patterns/grid-item.mjs +20 -0
- package/styled-system/patterns/grid.d.ts +18 -0
- package/styled-system/patterns/grid.mjs +25 -0
- package/styled-system/patterns/hstack.d.ts +15 -0
- package/styled-system/patterns/hstack.mjs +20 -0
- package/styled-system/patterns/index.d.ts +18 -0
- package/styled-system/patterns/index.mjs +18 -0
- package/styled-system/patterns/spacer.d.ts +14 -0
- package/styled-system/patterns/spacer.mjs +18 -0
- package/styled-system/patterns/square.d.ts +14 -0
- package/styled-system/patterns/square.mjs +21 -0
- package/styled-system/patterns/stack.d.ts +17 -0
- package/styled-system/patterns/stack.mjs +20 -0
- package/styled-system/patterns/styled-link.d.ts +14 -0
- package/styled-system/patterns/styled-link.mjs +18 -0
- package/styled-system/patterns/vstack.d.ts +15 -0
- package/styled-system/patterns/vstack.mjs +20 -0
- package/styled-system/patterns/wrap.d.ts +18 -0
- package/styled-system/patterns/wrap.mjs +22 -0
- package/styled-system/reset.css +190 -0
- package/styled-system/static.css +5 -0
- package/styled-system/styles.css +938 -0
- package/styled-system/tokens/index.css +374 -0
- package/styled-system/tokens/index.d.ts +8 -0
- package/styled-system/tokens/index.mjs +1590 -0
- package/styled-system/tokens/keyframes.css +30 -0
- package/styled-system/tokens/tokens.d.ts +56 -0
- package/styled-system/types/composition.d.ts +110 -0
- package/styled-system/types/conditions.d.ts +135 -0
- package/styled-system/types/csstype.d.ts +20748 -0
- package/styled-system/types/global.d.ts +15 -0
- package/styled-system/types/helpers.d.ts +1 -0
- package/styled-system/types/index.d.ts +3 -0
- package/styled-system/types/jsx.d.ts +27 -0
- package/styled-system/types/parts.d.ts +5 -0
- package/styled-system/types/pattern.d.ts +52 -0
- package/styled-system/types/prop-type.d.ts +300 -0
- package/styled-system/types/recipe.d.ts +79 -0
- package/styled-system/types/selectors.d.ts +56 -0
- package/styled-system/types/style-props.d.ts +688 -0
- package/styled-system/types/system-types.d.ts +76 -0
- package/virtual-panda.ts +72 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './box.mjs'
|
|
2
|
+
export * from './flex.mjs'
|
|
3
|
+
export * from './stack.mjs'
|
|
4
|
+
export * from './vstack.mjs'
|
|
5
|
+
export * from './hstack.mjs'
|
|
6
|
+
export * from './spacer.mjs'
|
|
7
|
+
export * from './square.mjs'
|
|
8
|
+
export * from './circle.mjs'
|
|
9
|
+
export * from './center.mjs'
|
|
10
|
+
export * from './absolute-center.mjs'
|
|
11
|
+
export * from './aspect-ratio.mjs'
|
|
12
|
+
export * from './grid.mjs'
|
|
13
|
+
export * from './grid-item.mjs'
|
|
14
|
+
export * from './wrap.mjs'
|
|
15
|
+
export * from './container.mjs'
|
|
16
|
+
export * from './divider.mjs'
|
|
17
|
+
export * from './float.mjs'
|
|
18
|
+
export * from './styled-link.mjs'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
2
|
+
import type { PropertyValue } from '../types/prop-type'
|
|
3
|
+
import type { Properties } from '../types/csstype'
|
|
4
|
+
import type { Tokens } from '../tokens'
|
|
5
|
+
|
|
6
|
+
export type SpacerProperties = {
|
|
7
|
+
size?: ConditionalValue<Tokens["spacing"]>
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
type SpacerOptions = SpacerProperties & Omit<SystemStyleObject, keyof SpacerProperties >
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export declare function spacer(options?: SpacerOptions): string
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs'
|
|
2
|
+
import { css } from '../css/index.mjs'
|
|
3
|
+
|
|
4
|
+
const spacerConfig = {
|
|
5
|
+
transform(props, { map }) {
|
|
6
|
+
const { size, ...rest } = props
|
|
7
|
+
return {
|
|
8
|
+
alignSelf: 'stretch',
|
|
9
|
+
justifySelf: 'stretch',
|
|
10
|
+
flex: map(size, (v) => (v == null ? '1' : `0 0 ${v}`)),
|
|
11
|
+
...rest,
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const getSpacerStyle = (styles = {}) => spacerConfig.transform(styles, { map: mapObject })
|
|
17
|
+
|
|
18
|
+
export const spacer = (styles) => css(getSpacerStyle(styles))
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
2
|
+
import type { PropertyValue } from '../types/prop-type'
|
|
3
|
+
import type { Properties } from '../types/csstype'
|
|
4
|
+
import type { Tokens } from '../tokens'
|
|
5
|
+
|
|
6
|
+
export type SquareProperties = {
|
|
7
|
+
size?: PropertyValue<'width'>
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
type SquareOptions = SquareProperties & Omit<SystemStyleObject, keyof SquareProperties >
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export declare function square(options?: SquareOptions): string
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs'
|
|
2
|
+
import { css } from '../css/index.mjs'
|
|
3
|
+
|
|
4
|
+
const squareConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { size, ...rest } = props
|
|
7
|
+
return {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
flex: '0 0 auto',
|
|
12
|
+
width: size,
|
|
13
|
+
height: size,
|
|
14
|
+
...rest,
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const getSquareStyle = (styles = {}) => squareConfig.transform(styles, { map: mapObject })
|
|
20
|
+
|
|
21
|
+
export const square = (styles) => css(getSquareStyle(styles))
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
2
|
+
import type { PropertyValue } from '../types/prop-type'
|
|
3
|
+
import type { Properties } from '../types/csstype'
|
|
4
|
+
import type { Tokens } from '../tokens'
|
|
5
|
+
|
|
6
|
+
export type StackProperties = {
|
|
7
|
+
align?: PropertyValue<'alignItems'>
|
|
8
|
+
justify?: PropertyValue<'justifyContent'>
|
|
9
|
+
direction?: PropertyValue<'flexDirection'>
|
|
10
|
+
gap?: PropertyValue<'gap'>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
type StackOptions = StackProperties & Omit<SystemStyleObject, keyof StackProperties >
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export declare function stack(options?: StackOptions): string
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs'
|
|
2
|
+
import { css } from '../css/index.mjs'
|
|
3
|
+
|
|
4
|
+
const stackConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { align, justify, direction = 'column', gap = '10px', ...rest } = props
|
|
7
|
+
return {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
flexDirection: direction,
|
|
10
|
+
alignItems: align,
|
|
11
|
+
justifyContent: justify,
|
|
12
|
+
gap,
|
|
13
|
+
...rest,
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const getStackStyle = (styles = {}) => stackConfig.transform(styles, { map: mapObject })
|
|
19
|
+
|
|
20
|
+
export const stack = (styles) => css(getStackStyle(styles))
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
2
|
+
import type { PropertyValue } from '../types/prop-type'
|
|
3
|
+
import type { Properties } from '../types/csstype'
|
|
4
|
+
import type { Tokens } from '../tokens'
|
|
5
|
+
|
|
6
|
+
export type StyledLinkProperties = {
|
|
7
|
+
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
type StyledLinkOptions = StyledLinkProperties & Omit<SystemStyleObject, keyof StyledLinkProperties >
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export declare function styledLink(options?: StyledLinkOptions): string
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs'
|
|
2
|
+
import { css } from '../css/index.mjs'
|
|
3
|
+
|
|
4
|
+
const styledLinkConfig = {
|
|
5
|
+
transform: (props) => ({
|
|
6
|
+
display: 'inline-flex',
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
opacity: '0.5',
|
|
9
|
+
borderBottom: '1px solid transparent',
|
|
10
|
+
cursor: 'pointer',
|
|
11
|
+
_hover: { opacity: 1, borderBottomColor: 'black' },
|
|
12
|
+
...props,
|
|
13
|
+
}),
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const getStyledLinkStyle = (styles = {}) => styledLinkConfig.transform(styles, { map: mapObject })
|
|
17
|
+
|
|
18
|
+
export const styledLink = (styles) => css(getStyledLinkStyle(styles))
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
2
|
+
import type { PropertyValue } from '../types/prop-type'
|
|
3
|
+
import type { Properties } from '../types/csstype'
|
|
4
|
+
import type { Tokens } from '../tokens'
|
|
5
|
+
|
|
6
|
+
export type VstackProperties = {
|
|
7
|
+
justify?: PropertyValue<'justifyContent'>
|
|
8
|
+
gap?: PropertyValue<'gap'>
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
type VstackOptions = VstackProperties & Omit<SystemStyleObject, keyof VstackProperties >
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export declare function vstack(options?: VstackOptions): string
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs'
|
|
2
|
+
import { css } from '../css/index.mjs'
|
|
3
|
+
|
|
4
|
+
const vstackConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { justify, gap = '10px', ...rest } = props
|
|
7
|
+
return {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
justifyContent: justify,
|
|
11
|
+
gap,
|
|
12
|
+
flexDirection: 'column',
|
|
13
|
+
...rest,
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const getVstackStyle = (styles = {}) => vstackConfig.transform(styles, { map: mapObject })
|
|
19
|
+
|
|
20
|
+
export const vstack = (styles) => css(getVstackStyle(styles))
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
2
|
+
import type { PropertyValue } from '../types/prop-type'
|
|
3
|
+
import type { Properties } from '../types/csstype'
|
|
4
|
+
import type { Tokens } from '../tokens'
|
|
5
|
+
|
|
6
|
+
export type WrapProperties = {
|
|
7
|
+
gap?: PropertyValue<'gap'>
|
|
8
|
+
rowGap?: PropertyValue<'gap'>
|
|
9
|
+
columnGap?: PropertyValue<'gap'>
|
|
10
|
+
align?: PropertyValue<'alignItems'>
|
|
11
|
+
justify?: PropertyValue<'justifyContent'>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
type WrapOptions = WrapProperties & Omit<SystemStyleObject, keyof WrapProperties >
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
export declare function wrap(options?: WrapOptions): string
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { mapObject } from '../helpers.mjs'
|
|
2
|
+
import { css } from '../css/index.mjs'
|
|
3
|
+
|
|
4
|
+
const wrapConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { columnGap, rowGap, gap = columnGap || rowGap ? void 0 : '10px', align, justify, ...rest } = props
|
|
7
|
+
return {
|
|
8
|
+
display: 'flex',
|
|
9
|
+
flexWrap: 'wrap',
|
|
10
|
+
alignItems: align,
|
|
11
|
+
justifyContent: justify,
|
|
12
|
+
gap,
|
|
13
|
+
columnGap,
|
|
14
|
+
rowGap,
|
|
15
|
+
...rest,
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const getWrapStyle = (styles = {}) => wrapConfig.transform(styles, { map: mapObject })
|
|
21
|
+
|
|
22
|
+
export const wrap = (styles) => css(getWrapStyle(styles))
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
@layer reset {
|
|
2
|
+
* {
|
|
3
|
+
margin: 0;
|
|
4
|
+
padding: 0;
|
|
5
|
+
font: inherit;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
*,
|
|
9
|
+
*::before,
|
|
10
|
+
*::after {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
border-width: 0;
|
|
13
|
+
border-style: solid;
|
|
14
|
+
border-color: var(--global-color-border, currentColor);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
html {
|
|
18
|
+
line-height: 1.5;
|
|
19
|
+
--font-fallback: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
|
|
20
|
+
Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
21
|
+
-webkit-text-size-adjust: 100%;
|
|
22
|
+
-webkit-text-size-adjust: 100%;
|
|
23
|
+
-webkit-font-smoothing: antialiased;
|
|
24
|
+
-moz-tab-size: 4;
|
|
25
|
+
tab-size: 4;
|
|
26
|
+
font-family: var(--global-font-body, var(--font-fallback));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
hr {
|
|
30
|
+
height: 0;
|
|
31
|
+
color: inherit;
|
|
32
|
+
border-top-width: 1px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body {
|
|
36
|
+
height: 100%;
|
|
37
|
+
line-height: inherit;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
img {
|
|
41
|
+
border-style: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
img,
|
|
45
|
+
svg,
|
|
46
|
+
video,
|
|
47
|
+
canvas,
|
|
48
|
+
audio,
|
|
49
|
+
iframe,
|
|
50
|
+
embed,
|
|
51
|
+
object {
|
|
52
|
+
display: block;
|
|
53
|
+
vertical-align: middle;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
img,
|
|
57
|
+
video {
|
|
58
|
+
max-width: 100%;
|
|
59
|
+
height: auto;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
p,
|
|
63
|
+
h1,
|
|
64
|
+
h2,
|
|
65
|
+
h3,
|
|
66
|
+
h4,
|
|
67
|
+
h5,
|
|
68
|
+
h6 {
|
|
69
|
+
overflow-wrap: break-word;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
ol,
|
|
73
|
+
ul {
|
|
74
|
+
list-style: none;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
code,
|
|
78
|
+
kbd,
|
|
79
|
+
pre,
|
|
80
|
+
samp {
|
|
81
|
+
font-size: 1em;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
button,
|
|
85
|
+
[type='button'],
|
|
86
|
+
[type='reset'],
|
|
87
|
+
[type='submit'] {
|
|
88
|
+
-webkit-appearance: button;
|
|
89
|
+
background-color: transparent;
|
|
90
|
+
background-image: none;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
button,
|
|
94
|
+
select {
|
|
95
|
+
text-transform: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
table {
|
|
99
|
+
text-indent: 0;
|
|
100
|
+
border-color: inherit;
|
|
101
|
+
border-collapse: collapse;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
input::placeholder,
|
|
105
|
+
textarea::placeholder {
|
|
106
|
+
opacity: 1;
|
|
107
|
+
color: var(--global-color-placeholder, #9ca3af);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
textarea {
|
|
111
|
+
resize: vertical;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
summary {
|
|
115
|
+
display: list-item;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
small {
|
|
119
|
+
font-size: 80%;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
sub,
|
|
123
|
+
sup {
|
|
124
|
+
font-size: 75%;
|
|
125
|
+
line-height: 0;
|
|
126
|
+
position: relative;
|
|
127
|
+
vertical-align: baseline;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
sub {
|
|
131
|
+
bottom: -0.25em;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
sup {
|
|
135
|
+
top: -0.5em;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
dialog {
|
|
139
|
+
padding: 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
a {
|
|
143
|
+
color: inherit;
|
|
144
|
+
text-decoration: inherit;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
abbr:where([title]) {
|
|
148
|
+
text-decoration: underline dotted;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
b,
|
|
152
|
+
strong {
|
|
153
|
+
font-weight: bolder;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
code,
|
|
157
|
+
kbd,
|
|
158
|
+
samp,
|
|
159
|
+
pre {
|
|
160
|
+
font-size: 1em;
|
|
161
|
+
--font-mono-fallback: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New';
|
|
162
|
+
font-family: var(--global-font-mono, var(--font-fallback));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
[type='search'] {
|
|
166
|
+
-webkit-appearance: textfield;
|
|
167
|
+
outline-offset: -2px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
::-webkit-search-decoration {
|
|
171
|
+
-webkit-appearance: none;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
::-webkit-file-upload-button {
|
|
175
|
+
-webkit-appearance: button;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
::-webkit-inner-spin-button,
|
|
179
|
+
::-webkit-outer-spin-button {
|
|
180
|
+
height: auto;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
:-moz-ui-invalid {
|
|
184
|
+
box-shadow: none;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:-moz-focusring {
|
|
188
|
+
outline: auto;
|
|
189
|
+
}
|
|
190
|
+
}
|