@tuuject/koi-react 0.0.0-stage → 0.1.0
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 +21 -0
- package/README.md +73 -2
- package/dist/alert/Alert.d.ts +13 -0
- package/dist/alert/Alert.js +16 -0
- package/dist/avatar/Avatar.d.ts +7 -0
- package/dist/avatar/Avatar.js +10 -0
- package/dist/badge/Badge.d.ts +7 -0
- package/dist/badge/Badge.js +8 -0
- package/dist/button/Button.d.ts +22 -0
- package/dist/button/Button.js +28 -0
- package/dist/card/Card.d.ts +9 -0
- package/dist/card/Card.js +8 -0
- package/dist/chat-bubble/ChatBubble.d.ts +7 -0
- package/dist/chat-bubble/ChatBubble.js +7 -0
- package/dist/checkbox/Checkbox.d.ts +18 -0
- package/dist/checkbox/Checkbox.js +25 -0
- package/dist/dialog/Dialog.d.ts +13 -0
- package/dist/dialog/Dialog.js +38 -0
- package/dist/divider/Divider.d.ts +6 -0
- package/dist/divider/Divider.js +17 -0
- package/dist/field/Field.d.ts +14 -0
- package/dist/field/Field.js +19 -0
- package/dist/field/context.d.ts +5 -0
- package/dist/field/context.js +2 -0
- package/dist/icons.d.ts +26 -0
- package/dist/icons.js +46 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +30 -0
- package/dist/input/Input.d.ts +9 -0
- package/dist/input/Input.js +15 -0
- package/dist/link/Link.d.ts +11 -0
- package/dist/link/Link.js +17 -0
- package/dist/pagination/Pagination.d.ts +7 -0
- package/dist/pagination/Pagination.js +26 -0
- package/dist/panda/buildinfo.json +10442 -0
- package/dist/panda/lib.json +18 -0
- package/dist/panda/preset.mjs +3907 -0
- package/dist/progress/Progress.d.ts +7 -0
- package/dist/progress/Progress.js +17 -0
- package/dist/prose/Prose.d.ts +10 -0
- package/dist/prose/Prose.js +10 -0
- package/dist/radio-group/RadioGroup.d.ts +15 -0
- package/dist/radio-group/RadioGroup.js +26 -0
- package/dist/select/Select.d.ts +11 -0
- package/dist/select/Select.js +21 -0
- package/dist/select/SelectPanel.d.ts +24 -0
- package/dist/select/SelectPanel.js +105 -0
- package/dist/shape.d.ts +16 -0
- package/dist/shape.js +17 -0
- package/dist/skeleton/Skeleton.d.ts +8 -0
- package/dist/skeleton/Skeleton.js +8 -0
- package/dist/spinner/Spinner.d.ts +7 -0
- package/dist/spinner/Spinner.js +13 -0
- package/dist/switch/Switch.d.ts +22 -0
- package/dist/switch/Switch.js +23 -0
- package/dist/table/DataTable.d.ts +12 -0
- package/dist/table/DataTable.js +12 -0
- package/dist/table/Table.d.ts +38 -0
- package/dist/table/Table.js +45 -0
- package/dist/tabs/Tabs.d.ts +11 -0
- package/dist/tabs/Tabs.js +20 -0
- package/dist/tag/Tag.d.ts +6 -0
- package/dist/tag/Tag.js +15 -0
- package/dist/textarea/Textarea.d.ts +9 -0
- package/dist/textarea/Textarea.js +14 -0
- package/dist/toast/Toast.d.ts +23 -0
- package/dist/toast/Toast.js +80 -0
- package/dist/tooltip/Tooltip.d.ts +9 -0
- package/dist/tooltip/Tooltip.js +29 -0
- package/dist/types.d.ts +11 -0
- package/dist/types.js +1 -0
- package/package.json +218 -3
- package/styled-system/css/conditions.d.ts +7 -0
- package/styled-system/css/conditions.js +32 -0
- package/styled-system/css/css.d.ts +22 -0
- package/styled-system/css/css.js +63 -0
- package/styled-system/css/cva.d.ts +5 -0
- package/styled-system/css/cva.js +51 -0
- package/styled-system/css/cx.d.ts +6 -0
- package/styled-system/css/cx.js +16 -0
- package/styled-system/css/first-that-works.d.ts +22 -0
- package/styled-system/css/first-that-works.js +1 -0
- package/styled-system/css/index.d.ts +8 -0
- package/styled-system/css/index.js +8 -0
- package/styled-system/css/keyframes.d.ts +5 -0
- package/styled-system/css/keyframes.js +8 -0
- package/styled-system/css/position-try.d.ts +5 -0
- package/styled-system/css/position-try.js +11 -0
- package/styled-system/css/sva.d.ts +3 -0
- package/styled-system/css/sva.js +49 -0
- package/styled-system/css/view-transition.d.ts +7 -0
- package/styled-system/css/view-transition.js +18 -0
- package/styled-system/helpers.d.ts +67 -0
- package/styled-system/helpers.js +624 -0
- package/styled-system/jsx/aspect-ratio.d.ts +7 -0
- package/styled-system/jsx/aspect-ratio.js +11 -0
- package/styled-system/jsx/bleed.d.ts +7 -0
- package/styled-system/jsx/bleed.js +11 -0
- package/styled-system/jsx/box.d.ts +7 -0
- package/styled-system/jsx/box.js +11 -0
- package/styled-system/jsx/center.d.ts +7 -0
- package/styled-system/jsx/center.js +11 -0
- package/styled-system/jsx/circle.d.ts +7 -0
- package/styled-system/jsx/circle.js +11 -0
- package/styled-system/jsx/container.d.ts +7 -0
- package/styled-system/jsx/container.js +11 -0
- package/styled-system/jsx/cq.d.ts +7 -0
- package/styled-system/jsx/cq.js +11 -0
- package/styled-system/jsx/create-recipe-context.d.ts +32 -0
- package/styled-system/jsx/create-recipe-context.js +38 -0
- package/styled-system/jsx/create-slot-recipe-context.d.ts +48 -0
- package/styled-system/jsx/create-slot-recipe-context.js +116 -0
- package/styled-system/jsx/divider.d.ts +7 -0
- package/styled-system/jsx/divider.js +11 -0
- package/styled-system/jsx/factory.d.ts +3 -0
- package/styled-system/jsx/factory.js +91 -0
- package/styled-system/jsx/flex.d.ts +7 -0
- package/styled-system/jsx/flex.js +11 -0
- package/styled-system/jsx/float.d.ts +7 -0
- package/styled-system/jsx/float.js +11 -0
- package/styled-system/jsx/grid-item.d.ts +7 -0
- package/styled-system/jsx/grid-item.js +11 -0
- package/styled-system/jsx/grid.d.ts +7 -0
- package/styled-system/jsx/grid.js +11 -0
- package/styled-system/jsx/helper.d.ts +34 -0
- package/styled-system/jsx/helper.js +83 -0
- package/styled-system/jsx/hstack.d.ts +7 -0
- package/styled-system/jsx/hstack.js +11 -0
- package/styled-system/jsx/index.d.ts +25 -0
- package/styled-system/jsx/index.js +24 -0
- package/styled-system/jsx/is-valid-prop.d.ts +7 -0
- package/styled-system/jsx/is-valid-prop.js +12 -0
- package/styled-system/jsx/link-overlay.d.ts +7 -0
- package/styled-system/jsx/link-overlay.js +11 -0
- package/styled-system/jsx/spacer.d.ts +7 -0
- package/styled-system/jsx/spacer.js +11 -0
- package/styled-system/jsx/square.d.ts +7 -0
- package/styled-system/jsx/square.js +11 -0
- package/styled-system/jsx/stack.d.ts +7 -0
- package/styled-system/jsx/stack.js +11 -0
- package/styled-system/jsx/visually-hidden.d.ts +7 -0
- package/styled-system/jsx/visually-hidden.js +11 -0
- package/styled-system/jsx/vstack.d.ts +7 -0
- package/styled-system/jsx/vstack.js +11 -0
- package/styled-system/jsx/wrap.d.ts +7 -0
- package/styled-system/jsx/wrap.js +11 -0
- package/styled-system/patterns/aspect-ratio.d.ts +19 -0
- package/styled-system/patterns/aspect-ratio.js +37 -0
- package/styled-system/patterns/bleed.d.ts +20 -0
- package/styled-system/patterns/bleed.js +30 -0
- package/styled-system/patterns/box.d.ts +17 -0
- package/styled-system/patterns/box.js +16 -0
- package/styled-system/patterns/center.d.ts +19 -0
- package/styled-system/patterns/center.js +22 -0
- package/styled-system/patterns/circle.d.ts +19 -0
- package/styled-system/patterns/circle.js +26 -0
- package/styled-system/patterns/container.d.ts +17 -0
- package/styled-system/patterns/container.js +26 -0
- package/styled-system/patterns/cq.d.ts +21 -0
- package/styled-system/patterns/cq.js +24 -0
- package/styled-system/patterns/divider.d.ts +22 -0
- package/styled-system/patterns/divider.js +31 -0
- package/styled-system/patterns/flex.d.ts +25 -0
- package/styled-system/patterns/flex.js +27 -0
- package/styled-system/patterns/float.d.ts +23 -0
- package/styled-system/patterns/float.js +84 -0
- package/styled-system/patterns/grid-item.d.ts +24 -0
- package/styled-system/patterns/grid-item.js +26 -0
- package/styled-system/patterns/grid.d.ts +24 -0
- package/styled-system/patterns/grid.js +30 -0
- package/styled-system/patterns/hstack.d.ts +20 -0
- package/styled-system/patterns/hstack.js +27 -0
- package/styled-system/patterns/index.d.ts +20 -0
- package/styled-system/patterns/index.js +20 -0
- package/styled-system/patterns/link-overlay.d.ts +17 -0
- package/styled-system/patterns/link-overlay.js +25 -0
- package/styled-system/patterns/runtime.js +25 -0
- package/styled-system/patterns/spacer.d.ts +20 -0
- package/styled-system/patterns/spacer.js +26 -0
- package/styled-system/patterns/square.d.ts +19 -0
- package/styled-system/patterns/square.js +25 -0
- package/styled-system/patterns/stack.d.ts +22 -0
- package/styled-system/patterns/stack.js +30 -0
- package/styled-system/patterns/visually-hidden.d.ts +17 -0
- package/styled-system/patterns/visually-hidden.js +19 -0
- package/styled-system/patterns/vstack.d.ts +20 -0
- package/styled-system/patterns/vstack.js +27 -0
- package/styled-system/patterns/wrap.d.ts +23 -0
- package/styled-system/patterns/wrap.js +26 -0
- package/styled-system/recipes/alert.d.ts +19 -0
- package/styled-system/recipes/alert.js +5 -0
- package/styled-system/recipes/avatar.d.ts +19 -0
- package/styled-system/recipes/avatar.js +5 -0
- package/styled-system/recipes/badge.d.ts +18 -0
- package/styled-system/recipes/badge.js +5 -0
- package/styled-system/recipes/button.d.ts +20 -0
- package/styled-system/recipes/button.js +5 -0
- package/styled-system/recipes/card.d.ts +19 -0
- package/styled-system/recipes/card.js +5 -0
- package/styled-system/recipes/chat-bubble.d.ts +16 -0
- package/styled-system/recipes/chat-bubble.js +5 -0
- package/styled-system/recipes/checkbox.d.ts +16 -0
- package/styled-system/recipes/checkbox.js +5 -0
- package/styled-system/recipes/dialog.d.ts +18 -0
- package/styled-system/recipes/dialog.js +5 -0
- package/styled-system/recipes/field.d.ts +16 -0
- package/styled-system/recipes/field.js +5 -0
- package/styled-system/recipes/index.d.ts +27 -0
- package/styled-system/recipes/index.js +27 -0
- package/styled-system/recipes/input.d.ts +18 -0
- package/styled-system/recipes/input.js +5 -0
- package/styled-system/recipes/link.d.ts +18 -0
- package/styled-system/recipes/link.js +5 -0
- package/styled-system/recipes/pagination.d.ts +19 -0
- package/styled-system/recipes/pagination.js +5 -0
- package/styled-system/recipes/progress.d.ts +18 -0
- package/styled-system/recipes/progress.js +5 -0
- package/styled-system/recipes/prose.d.ts +16 -0
- package/styled-system/recipes/prose.js +5 -0
- package/styled-system/recipes/radio-group.d.ts +18 -0
- package/styled-system/recipes/radio-group.js +5 -0
- package/styled-system/recipes/runtime.js +133 -0
- package/styled-system/recipes/select-panel.d.ts +18 -0
- package/styled-system/recipes/select-panel.js +5 -0
- package/styled-system/recipes/select.d.ts +18 -0
- package/styled-system/recipes/select.js +5 -0
- package/styled-system/recipes/separator.d.ts +16 -0
- package/styled-system/recipes/separator.js +5 -0
- package/styled-system/recipes/skeleton.d.ts +14 -0
- package/styled-system/recipes/skeleton.js +5 -0
- package/styled-system/recipes/spinner.d.ts +16 -0
- package/styled-system/recipes/spinner.js +5 -0
- package/styled-system/recipes/switch-recipe.d.ts +16 -0
- package/styled-system/recipes/switch-recipe.js +5 -0
- package/styled-system/recipes/table.d.ts +20 -0
- package/styled-system/recipes/table.js +5 -0
- package/styled-system/recipes/tabs.d.ts +18 -0
- package/styled-system/recipes/tabs.js +5 -0
- package/styled-system/recipes/tag.d.ts +18 -0
- package/styled-system/recipes/tag.js +5 -0
- package/styled-system/recipes/textarea.d.ts +14 -0
- package/styled-system/recipes/textarea.js +5 -0
- package/styled-system/recipes/toast.d.ts +20 -0
- package/styled-system/recipes/toast.js +5 -0
- package/styled-system/recipes/tooltip.d.ts +16 -0
- package/styled-system/recipes/tooltip.js +5 -0
- package/styled-system/tokens/index.d.ts +8 -0
- package/styled-system/tokens/index.js +18 -0
- package/styled-system/types/index.d.ts +5 -0
- package/styled-system/types/jsx.d.ts +80 -0
- package/styled-system/types/pattern.d.ts +26 -0
- package/styled-system/types/recipe.d.ts +77 -0
- package/styled-system/types/system.d.ts +1645 -0
- package/styled-system/types/tokens.d.ts +47 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { hstack } from '../patterns/hstack';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const HStack = /* @__PURE__ */ forwardRef(function HStack(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, hstack.propKeys)
|
|
8
|
+
const styleProps = hstack.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...restProps, css: styleProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from './factory';
|
|
2
|
+
export * from './is-valid-prop';
|
|
3
|
+
export * from './create-recipe-context';
|
|
4
|
+
export * from './create-slot-recipe-context';
|
|
5
|
+
export * from './aspect-ratio';
|
|
6
|
+
export * from './bleed';
|
|
7
|
+
export * from './box';
|
|
8
|
+
export * from './center';
|
|
9
|
+
export * from './circle';
|
|
10
|
+
export * from './container';
|
|
11
|
+
export * from './cq';
|
|
12
|
+
export * from './divider';
|
|
13
|
+
export * from './flex';
|
|
14
|
+
export * from './float';
|
|
15
|
+
export * from './grid';
|
|
16
|
+
export * from './grid-item';
|
|
17
|
+
export * from './hstack';
|
|
18
|
+
export * from './link-overlay';
|
|
19
|
+
export * from './spacer';
|
|
20
|
+
export * from './square';
|
|
21
|
+
export * from './stack';
|
|
22
|
+
export * from './visually-hidden';
|
|
23
|
+
export * from './vstack';
|
|
24
|
+
export * from './wrap';
|
|
25
|
+
export { HTMLStyledProps, StyledComponent, Styled, StyledVariantProps, JsxFactoryOptions, ComponentProps, DataAttrs, AsProps } from '../types/jsx';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from './factory';
|
|
2
|
+
export * from './is-valid-prop';
|
|
3
|
+
export * from './create-recipe-context';
|
|
4
|
+
export * from './create-slot-recipe-context';
|
|
5
|
+
export * from './aspect-ratio';
|
|
6
|
+
export * from './bleed';
|
|
7
|
+
export * from './box';
|
|
8
|
+
export * from './center';
|
|
9
|
+
export * from './circle';
|
|
10
|
+
export * from './container';
|
|
11
|
+
export * from './cq';
|
|
12
|
+
export * from './divider';
|
|
13
|
+
export * from './flex';
|
|
14
|
+
export * from './float';
|
|
15
|
+
export * from './grid';
|
|
16
|
+
export * from './grid-item';
|
|
17
|
+
export * from './hstack';
|
|
18
|
+
export * from './link-overlay';
|
|
19
|
+
export * from './spacer';
|
|
20
|
+
export * from './square';
|
|
21
|
+
export * from './stack';
|
|
22
|
+
export * from './visually-hidden';
|
|
23
|
+
export * from './vstack';
|
|
24
|
+
export * from './wrap';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { DistributiveOmit, JsxStyleProps } from '../types/system';
|
|
2
|
+
|
|
3
|
+
type CssPropKey = keyof JsxStyleProps;
|
|
4
|
+
type OmittedCssProps<T> = DistributiveOmit<T, CssPropKey>;
|
|
5
|
+
export declare function isCssProperty(value: string): boolean;
|
|
6
|
+
export declare function splitCssProps<T>(props: T): [JsxStyleProps, OmittedCssProps<T>];
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { splitProps } from '../helpers';
|
|
2
|
+
|
|
3
|
+
const cssPropertySet = new Set(["css"])
|
|
4
|
+
const cssPropertySelectorRe = /&|@/
|
|
5
|
+
|
|
6
|
+
export function isCssProperty(value) {
|
|
7
|
+
return cssPropertySet.has(value) || value.startsWith("--") || cssPropertySelectorRe.test(value)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function splitCssProps(props) {
|
|
11
|
+
return splitProps(props, isCssProperty)
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { LinkOverlayProperties } from '../patterns/link-overlay';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
5
|
+
|
|
6
|
+
export interface LinkOverlayProps extends LinkOverlayProperties, DistributiveOmit<HTMLStyledProps<'a'>, keyof LinkOverlayProperties> {}
|
|
7
|
+
export declare const LinkOverlay: FunctionComponent<LinkOverlayProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { linkOverlay } from '../patterns/link-overlay';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const LinkOverlay = /* @__PURE__ */ forwardRef(function LinkOverlay(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, linkOverlay.propKeys)
|
|
8
|
+
const styleProps = linkOverlay.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...restProps, css: styleProps }
|
|
10
|
+
return createElement(styled["a"], mergedProps)
|
|
11
|
+
})
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { SpacerProperties } from '../patterns/spacer';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
5
|
+
|
|
6
|
+
export interface SpacerProps extends SpacerProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof SpacerProperties> {}
|
|
7
|
+
export declare const Spacer: FunctionComponent<SpacerProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { spacer } from '../patterns/spacer';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const Spacer = /* @__PURE__ */ forwardRef(function Spacer(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, spacer.propKeys)
|
|
8
|
+
const styleProps = spacer.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...restProps, css: styleProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { SquareProperties } from '../patterns/square';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
5
|
+
|
|
6
|
+
export interface SquareProps extends SquareProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof SquareProperties> {}
|
|
7
|
+
export declare const Square: FunctionComponent<SquareProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { square } from '../patterns/square';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const Square = /* @__PURE__ */ forwardRef(function Square(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, square.propKeys)
|
|
8
|
+
const styleProps = square.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...restProps, css: styleProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { StackProperties } from '../patterns/stack';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
5
|
+
|
|
6
|
+
export interface StackProps extends StackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof StackProperties> {}
|
|
7
|
+
export declare const Stack: FunctionComponent<StackProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { stack } from '../patterns/stack';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const Stack = /* @__PURE__ */ forwardRef(function Stack(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, stack.propKeys)
|
|
8
|
+
const styleProps = stack.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...restProps, css: styleProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { VisuallyHiddenProperties } from '../patterns/visually-hidden';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
5
|
+
|
|
6
|
+
export interface VisuallyHiddenProps extends VisuallyHiddenProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof VisuallyHiddenProperties> {}
|
|
7
|
+
export declare const VisuallyHidden: FunctionComponent<VisuallyHiddenProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { visuallyHidden } from '../patterns/visually-hidden';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const VisuallyHidden = /* @__PURE__ */ forwardRef(function VisuallyHidden(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, visuallyHidden.propKeys)
|
|
8
|
+
const styleProps = visuallyHidden.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...restProps, css: styleProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { VstackProperties } from '../patterns/vstack';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
5
|
+
|
|
6
|
+
export interface VstackProps extends VstackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof VstackProperties> {}
|
|
7
|
+
export declare const VStack: FunctionComponent<VstackProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { vstack } from '../patterns/vstack';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const VStack = /* @__PURE__ */ forwardRef(function VStack(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, vstack.propKeys)
|
|
8
|
+
const styleProps = vstack.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...restProps, css: styleProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { WrapProperties } from '../patterns/wrap';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
5
|
+
|
|
6
|
+
export interface WrapProps extends WrapProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof WrapProperties> {}
|
|
7
|
+
export declare const Wrap: FunctionComponent<WrapProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { wrap } from '../patterns/wrap';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const Wrap = /* @__PURE__ */ forwardRef(function Wrap(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, wrap.propKeys)
|
|
8
|
+
const styleProps = wrap.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...restProps, css: styleProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ConditionalValue, SystemStyleObject } from '../types/system';
|
|
2
|
+
|
|
3
|
+
export interface AspectRatioProperties {
|
|
4
|
+
ratio?: ConditionalValue<number>
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
type AspectRatioRestStyles = Omit<SystemStyleObject, keyof AspectRatioProperties | "aspectRatio">
|
|
8
|
+
|
|
9
|
+
interface AspectRatioStyles extends AspectRatioProperties, AspectRatioRestStyles {}
|
|
10
|
+
|
|
11
|
+
interface AspectRatioPatternFn {
|
|
12
|
+
(styles?: AspectRatioStyles): string
|
|
13
|
+
raw: (styles?: AspectRatioStyles) => SystemStyleObject
|
|
14
|
+
propKeys: Array<keyof AspectRatioProperties>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export declare function aspectRatioRaw(styles?: AspectRatioStyles): SystemStyleObject;
|
|
18
|
+
|
|
19
|
+
export declare const aspectRatio: AspectRatioPatternFn;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const aspectRatioConfig = { transform(props, { map }) {
|
|
6
|
+
const { ratio = 4 / 3, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
position: "relative",
|
|
9
|
+
_before: {
|
|
10
|
+
content: `""`,
|
|
11
|
+
display: "block",
|
|
12
|
+
height: "0",
|
|
13
|
+
paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
|
|
14
|
+
},
|
|
15
|
+
"&>*": {
|
|
16
|
+
display: "flex",
|
|
17
|
+
justifyContent: "center",
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
overflow: "hidden",
|
|
20
|
+
position: "absolute",
|
|
21
|
+
inset: "0",
|
|
22
|
+
width: "100%",
|
|
23
|
+
height: "100%"
|
|
24
|
+
},
|
|
25
|
+
"&>img, &>video": { objectFit: "cover" },
|
|
26
|
+
...rest
|
|
27
|
+
};
|
|
28
|
+
} }
|
|
29
|
+
|
|
30
|
+
export function aspectRatioRaw(styles) {
|
|
31
|
+
const s = getPatternStyles(aspectRatioConfig, styles || {})
|
|
32
|
+
return aspectRatioConfig.transform(s, patternFns)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const aspectRatio = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function aspectRatio(styles = {}) {
|
|
36
|
+
return css(aspectRatioRaw(styles))
|
|
37
|
+
}), { raw: aspectRatioRaw, propKeys: ["ratio"] })
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SystemProperties, SystemStyleObject } from '../types/system';
|
|
2
|
+
|
|
3
|
+
export interface BleedProperties {
|
|
4
|
+
block?: SystemProperties["marginBlock"]
|
|
5
|
+
inline?: SystemProperties["marginInline"]
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
type BleedRestStyles = Omit<SystemStyleObject, keyof BleedProperties>
|
|
9
|
+
|
|
10
|
+
interface BleedStyles extends BleedProperties, BleedRestStyles {}
|
|
11
|
+
|
|
12
|
+
interface BleedPatternFn {
|
|
13
|
+
(styles?: BleedStyles): string
|
|
14
|
+
raw: (styles?: BleedStyles) => SystemStyleObject
|
|
15
|
+
propKeys: Array<keyof BleedProperties>
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare function bleedRaw(styles?: BleedStyles): SystemStyleObject;
|
|
19
|
+
|
|
20
|
+
export declare const bleed: BleedPatternFn;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const bleedConfig = {
|
|
6
|
+
transform(props, { map, isCssUnit, isCssVar }) {
|
|
7
|
+
const { inline, block, ...rest } = props;
|
|
8
|
+
const valueFn = (v) => isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
|
|
9
|
+
return {
|
|
10
|
+
"--bleed-x": map(inline, valueFn),
|
|
11
|
+
"--bleed-y": map(block, valueFn),
|
|
12
|
+
marginInline: "calc(var(--bleed-x, 0) * -1)",
|
|
13
|
+
marginBlock: "calc(var(--bleed-y, 0) * -1)",
|
|
14
|
+
...rest
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
defaultValues: {
|
|
18
|
+
inline: "0",
|
|
19
|
+
block: "0"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function bleedRaw(styles) {
|
|
24
|
+
const s = getPatternStyles(bleedConfig, styles || {})
|
|
25
|
+
return bleedConfig.transform(s, patternFns)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const bleed = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function bleed(styles = {}) {
|
|
29
|
+
return css(bleedRaw(styles))
|
|
30
|
+
}), { raw: bleedRaw, propKeys: ["block","inline"] })
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SystemStyleObject } from '../types/system';
|
|
2
|
+
|
|
3
|
+
export interface BoxProperties {}
|
|
4
|
+
|
|
5
|
+
type BoxRestStyles = Omit<SystemStyleObject, keyof BoxProperties>
|
|
6
|
+
|
|
7
|
+
interface BoxStyles extends BoxProperties, BoxRestStyles {}
|
|
8
|
+
|
|
9
|
+
interface BoxPatternFn {
|
|
10
|
+
(styles?: BoxStyles): string
|
|
11
|
+
raw: (styles?: BoxStyles) => SystemStyleObject
|
|
12
|
+
propKeys: Array<keyof BoxProperties>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export declare function boxRaw(styles?: BoxStyles): SystemStyleObject;
|
|
16
|
+
|
|
17
|
+
export declare const box: BoxPatternFn;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const boxConfig = { transform(props) {
|
|
6
|
+
return props;
|
|
7
|
+
} }
|
|
8
|
+
|
|
9
|
+
export function boxRaw(styles) {
|
|
10
|
+
const s = getPatternStyles(boxConfig, styles || {})
|
|
11
|
+
return boxConfig.transform(s, patternFns)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const box = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function box(styles = {}) {
|
|
15
|
+
return css(boxRaw(styles))
|
|
16
|
+
}), { raw: boxRaw, propKeys: [] })
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ConditionalValue, SystemStyleObject } from '../types/system';
|
|
2
|
+
|
|
3
|
+
export interface CenterProperties {
|
|
4
|
+
inline?: ConditionalValue<boolean>
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
type CenterRestStyles = Omit<SystemStyleObject, keyof CenterProperties>
|
|
8
|
+
|
|
9
|
+
interface CenterStyles extends CenterProperties, CenterRestStyles {}
|
|
10
|
+
|
|
11
|
+
interface CenterPatternFn {
|
|
12
|
+
(styles?: CenterStyles): string
|
|
13
|
+
raw: (styles?: CenterStyles) => SystemStyleObject
|
|
14
|
+
propKeys: Array<keyof CenterProperties>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export declare function centerRaw(styles?: CenterStyles): SystemStyleObject;
|
|
18
|
+
|
|
19
|
+
export declare const center: CenterPatternFn;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const centerConfig = { transform(props) {
|
|
6
|
+
const { inline, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: inline ? "inline-flex" : "flex",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
justifyContent: "center",
|
|
11
|
+
...rest
|
|
12
|
+
};
|
|
13
|
+
} }
|
|
14
|
+
|
|
15
|
+
export function centerRaw(styles) {
|
|
16
|
+
const s = getPatternStyles(centerConfig, styles || {})
|
|
17
|
+
return centerConfig.transform(s, patternFns)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const center = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function center(styles = {}) {
|
|
21
|
+
return css(centerRaw(styles))
|
|
22
|
+
}), { raw: centerRaw, propKeys: ["inline"] })
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SystemProperties, SystemStyleObject } from '../types/system';
|
|
2
|
+
|
|
3
|
+
export interface CircleProperties {
|
|
4
|
+
size?: SystemProperties["width"]
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
type CircleRestStyles = Omit<SystemStyleObject, keyof CircleProperties>
|
|
8
|
+
|
|
9
|
+
interface CircleStyles extends CircleProperties, CircleRestStyles {}
|
|
10
|
+
|
|
11
|
+
interface CirclePatternFn {
|
|
12
|
+
(styles?: CircleStyles): string
|
|
13
|
+
raw: (styles?: CircleStyles) => SystemStyleObject
|
|
14
|
+
propKeys: Array<keyof CircleProperties>
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export declare function circleRaw(styles?: CircleStyles): SystemStyleObject;
|
|
18
|
+
|
|
19
|
+
export declare const circle: CirclePatternFn;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const circleConfig = { 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
|
+
borderRadius: "9999px",
|
|
15
|
+
...rest
|
|
16
|
+
};
|
|
17
|
+
} }
|
|
18
|
+
|
|
19
|
+
export function circleRaw(styles) {
|
|
20
|
+
const s = getPatternStyles(circleConfig, styles || {})
|
|
21
|
+
return circleConfig.transform(s, patternFns)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const circle = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function circle(styles = {}) {
|
|
25
|
+
return css(circleRaw(styles))
|
|
26
|
+
}), { raw: circleRaw, propKeys: ["size"] })
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SystemStyleObject } from '../types/system';
|
|
2
|
+
|
|
3
|
+
export interface ContainerProperties {}
|
|
4
|
+
|
|
5
|
+
type ContainerRestStyles = Omit<SystemStyleObject, keyof ContainerProperties>
|
|
6
|
+
|
|
7
|
+
interface ContainerStyles extends ContainerProperties, ContainerRestStyles {}
|
|
8
|
+
|
|
9
|
+
interface ContainerPatternFn {
|
|
10
|
+
(styles?: ContainerStyles): string
|
|
11
|
+
raw: (styles?: ContainerStyles) => SystemStyleObject
|
|
12
|
+
propKeys: Array<keyof ContainerProperties>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export declare function containerRaw(styles?: ContainerStyles): SystemStyleObject;
|
|
16
|
+
|
|
17
|
+
export declare const container: ContainerPatternFn;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const containerConfig = { transform(props) {
|
|
6
|
+
return {
|
|
7
|
+
position: "relative",
|
|
8
|
+
maxWidth: "8xl",
|
|
9
|
+
mx: "auto",
|
|
10
|
+
px: {
|
|
11
|
+
base: "4",
|
|
12
|
+
md: "6",
|
|
13
|
+
lg: "8"
|
|
14
|
+
},
|
|
15
|
+
...props
|
|
16
|
+
};
|
|
17
|
+
} }
|
|
18
|
+
|
|
19
|
+
export function containerRaw(styles) {
|
|
20
|
+
const s = getPatternStyles(containerConfig, styles || {})
|
|
21
|
+
return containerConfig.transform(s, patternFns)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const container = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function container(styles = {}) {
|
|
25
|
+
return css(containerRaw(styles))
|
|
26
|
+
}), { raw: containerRaw, propKeys: [] })
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TokenValue } from '../types/tokens';
|
|
2
|
+
import type { ConditionalValue, SystemProperties, SystemStyleObject } from '../types/system';
|
|
3
|
+
|
|
4
|
+
export interface CqProperties {
|
|
5
|
+
name?: ConditionalValue<TokenValue<"containerNames"> | SystemProperties["containerName"]>
|
|
6
|
+
type?: SystemProperties["containerType"]
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type CqRestStyles = Omit<SystemStyleObject, keyof CqProperties>
|
|
10
|
+
|
|
11
|
+
interface CqStyles extends CqProperties, CqRestStyles {}
|
|
12
|
+
|
|
13
|
+
interface CqPatternFn {
|
|
14
|
+
(styles?: CqStyles): string
|
|
15
|
+
raw: (styles?: CqStyles) => SystemStyleObject
|
|
16
|
+
propKeys: Array<keyof CqProperties>
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export declare function cqRaw(styles?: CqStyles): SystemStyleObject;
|
|
20
|
+
|
|
21
|
+
export declare const cq: CqPatternFn;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const cqConfig = {
|
|
6
|
+
transform(props) {
|
|
7
|
+
const { name, type, ...rest } = props;
|
|
8
|
+
return {
|
|
9
|
+
containerType: type,
|
|
10
|
+
containerName: name,
|
|
11
|
+
...rest
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
defaultValues: { type: "inline-size" }
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function cqRaw(styles) {
|
|
18
|
+
const s = getPatternStyles(cqConfig, styles || {})
|
|
19
|
+
return cqConfig.transform(s, patternFns)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const cq = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function cq(styles = {}) {
|
|
23
|
+
return css(cqRaw(styles))
|
|
24
|
+
}), { raw: cqRaw, propKeys: ["name","type"] })
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { TokenValue } from '../types/tokens';
|
|
2
|
+
import type { ConditionalValue, SystemProperties, SystemStyleObject } from '../types/system';
|
|
3
|
+
|
|
4
|
+
export interface DividerProperties {
|
|
5
|
+
color?: ConditionalValue<TokenValue<"colors"> | SystemProperties["borderColor"]>
|
|
6
|
+
orientation?: ConditionalValue<"horizontal" | "vertical">
|
|
7
|
+
thickness?: ConditionalValue<TokenValue<"sizes"> | SystemProperties["borderWidth"]>
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type DividerRestStyles = Omit<SystemStyleObject, keyof DividerProperties>
|
|
11
|
+
|
|
12
|
+
interface DividerStyles extends DividerProperties, DividerRestStyles {}
|
|
13
|
+
|
|
14
|
+
interface DividerPatternFn {
|
|
15
|
+
(styles?: DividerStyles): string
|
|
16
|
+
raw: (styles?: DividerStyles) => SystemStyleObject
|
|
17
|
+
propKeys: Array<keyof DividerProperties>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export declare function dividerRaw(styles?: DividerStyles): SystemStyleObject;
|
|
21
|
+
|
|
22
|
+
export declare const divider: DividerPatternFn;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const dividerConfig = {
|
|
6
|
+
transform(props, { map }) {
|
|
7
|
+
const { orientation, thickness, color: color2, ...rest } = props;
|
|
8
|
+
return {
|
|
9
|
+
"--thickness": thickness,
|
|
10
|
+
width: map(orientation, (v) => v === "vertical" ? void 0 : "100%"),
|
|
11
|
+
height: map(orientation, (v) => v === "horizontal" ? void 0 : "100%"),
|
|
12
|
+
borderBlockEndWidth: map(orientation, (v) => v === "horizontal" ? "var(--thickness)" : void 0),
|
|
13
|
+
borderInlineEndWidth: map(orientation, (v) => v === "vertical" ? "var(--thickness)" : void 0),
|
|
14
|
+
borderColor: color2,
|
|
15
|
+
...rest
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
defaultValues: {
|
|
19
|
+
orientation: "horizontal",
|
|
20
|
+
thickness: "1px"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function dividerRaw(styles) {
|
|
25
|
+
const s = getPatternStyles(dividerConfig, styles || {})
|
|
26
|
+
return dividerConfig.transform(s, patternFns)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const divider = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function divider(styles = {}) {
|
|
30
|
+
return css(dividerRaw(styles))
|
|
31
|
+
}), { raw: dividerRaw, propKeys: ["color","orientation","thickness"] })
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { SystemProperties, SystemStyleObject } from '../types/system';
|
|
2
|
+
|
|
3
|
+
export interface FlexProperties {
|
|
4
|
+
align?: SystemProperties["alignItems"]
|
|
5
|
+
basis?: SystemProperties["flexBasis"]
|
|
6
|
+
direction?: SystemProperties["flexDirection"]
|
|
7
|
+
grow?: SystemProperties["flexGrow"]
|
|
8
|
+
justify?: SystemProperties["justifyContent"]
|
|
9
|
+
shrink?: SystemProperties["flexShrink"]
|
|
10
|
+
wrap?: SystemProperties["flexWrap"]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type FlexRestStyles = Omit<SystemStyleObject, keyof FlexProperties>
|
|
14
|
+
|
|
15
|
+
interface FlexStyles extends FlexProperties, FlexRestStyles {}
|
|
16
|
+
|
|
17
|
+
interface FlexPatternFn {
|
|
18
|
+
(styles?: FlexStyles): string
|
|
19
|
+
raw: (styles?: FlexStyles) => SystemStyleObject
|
|
20
|
+
propKeys: Array<keyof FlexProperties>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export declare function flexRaw(styles?: FlexStyles): SystemStyleObject;
|
|
24
|
+
|
|
25
|
+
export declare const flex: FlexPatternFn;
|