tharaday 0.5.3 → 0.5.4
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/dist/components/Box/Box.d.ts +1 -1
- package/dist/components/Box/Box.stories.d.ts +1 -1
- package/dist/components/Box/Box.types.d.ts +4 -3
- package/dist/components/Box/helpers/getSpacingStyles.d.ts +2 -0
- package/dist/ds.js +1041 -1015
- package/dist/ds.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/components/Box/Box.tsx +39 -15
- package/src/components/Box/Box.types.ts +4 -3
- package/src/components/Box/helpers/getSpacingStyles.ts +41 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BoxProps } from './Box.types.ts';
|
|
2
|
-
export declare const Box: ({ children, as: Component, display, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, margin, marginX, marginY, marginTop, marginBottom, marginLeft, marginRight, gap, flexDirection, alignItems, justifyContent, flexWrap, flexGrow, flexShrink, flex, fullWidth, textAlign, width, height, gridTemplateColumns, backgroundColor, border, borderBottom, borderColor, borderRadius, className, style, ...props }: BoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const Box: ({ children, as: Component, display, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, margin, marginX, marginY, marginTop, marginBottom, marginLeft, marginRight, gap, flexDirection, alignItems, justifyContent, flexWrap, flexGrow, flexShrink, flex, fullWidth, textAlign, width, height, maxWidth, gridTemplateColumns, backgroundColor, border, borderBottom, borderColor, borderRadius, className, style, ...props }: BoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ children, as: Component, display, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, margin, marginX, marginY, marginTop, marginBottom, marginLeft, marginRight, gap, flexDirection, alignItems, justifyContent, flexWrap, flexGrow, flexShrink, flex, fullWidth, textAlign, width, height, gridTemplateColumns, backgroundColor, border, borderBottom, borderColor, borderRadius, className, style, ...props }: import('./Box.types.ts').BoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ children, as: Component, display, padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight, margin, marginX, marginY, marginTop, marginBottom, marginLeft, marginRight, gap, flexDirection, alignItems, justifyContent, flexWrap, flexGrow, flexShrink, flex, fullWidth, textAlign, width, height, maxWidth, gridTemplateColumns, backgroundColor, border, borderBottom, borderColor, borderRadius, className, style, ...props }: import('./Box.types.ts').BoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
argTypes: {
|
|
7
7
|
display: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode, ElementType } from 'react';
|
|
2
|
-
export type BoxPadding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 14;
|
|
3
|
-
export type BoxMargin = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 14;
|
|
4
|
-
export type BoxGap = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 14;
|
|
2
|
+
export type BoxPadding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 14 | (string & {});
|
|
3
|
+
export type BoxMargin = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 14 | (string & {});
|
|
4
|
+
export type BoxGap = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 14 | (string & {});
|
|
5
5
|
export type BoxDisplay = 'block' | 'flex' | 'inline-flex' | 'grid' | 'inline-block' | 'none';
|
|
6
6
|
export type BoxFlexDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
7
7
|
export type BoxAlignItems = 'stretch' | 'flex-start' | 'center' | 'flex-end' | 'baseline';
|
|
@@ -40,6 +40,7 @@ export interface BoxProps extends HTMLAttributes<HTMLElement> {
|
|
|
40
40
|
textAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
41
41
|
width?: string | number;
|
|
42
42
|
height?: string | number;
|
|
43
|
+
maxWidth?: string | number;
|
|
43
44
|
gridTemplateColumns?: string;
|
|
44
45
|
backgroundColor?: BoxBackgroundColor;
|
|
45
46
|
border?: boolean;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { BoxPadding } from '../Box.types.ts';
|
|
2
|
+
export declare const getSpacingStyles: (type: "padding" | "margin", prop: BoxPadding | undefined, propX: BoxPadding | undefined, propY: BoxPadding | undefined, propTop: BoxPadding | undefined, propBottom: BoxPadding | undefined, propLeft: BoxPadding | undefined, propRight: BoxPadding | undefined) => Record<string, string | undefined>;
|