@shmidko61/lc-ui-kit 0.0.1 → 0.0.3
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/box/box.d.ts +8 -6
- package/dist/box/box.types.d.ts +11 -0
- package/dist/index.d.ts +2 -1
- package/package.json +1 -1
package/dist/box/box.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { JSX,
|
|
2
|
-
import { BoxAs, BoxProps } from './box.types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { ForwardRefExoticComponent, JSX, RefAttributes } from 'react';
|
|
2
|
+
import { BoxAs, BoxComponentProps, BoxProps } from './box.types';
|
|
3
|
+
type BoxComponentType = ForwardRefExoticComponent<BoxComponentProps & RefAttributes<Element>> & {
|
|
4
|
+
(props: BoxComponentProps & RefAttributes<Element>): JSX.Element;
|
|
5
|
+
<TAs extends BoxAs>(props: BoxProps<TAs> & RefAttributes<Element>): JSX.Element;
|
|
6
|
+
};
|
|
7
|
+
export declare const Box: BoxComponentType;
|
|
8
|
+
export type { BoxAs, BoxBackgroundValue, BoxBreakpointProps, BoxComponentProps, BoxProps } from './box.types';
|
|
7
9
|
export type { BorderRadiusItem, BorderRadiusKeys, BorderRadiusSides, BorderWidthItem, BorderWidthSides, PositionValue, UiKitAnyIndentationMargin, UiKitAnyIndentationPadding, UiKitArrayIndentation, UiKitAxisIndentationMargin, UiKitAxisIndentationPadding, UiKitDimensionProps, UiKitIndentations, UiKitIndentationsProps, UiKitMarginArrayIndentation, UiKitMarginIndentation, UiKitBackgroundProps, UiKitBorderColor, UiKitBorderProps, UiKitBorderRadius, UiKitBorderWidth, UiKitCursorProps, UiKitDisplayProps, UiKitListStyleProps, UiKitMixedXAxisIndentationMargin, UiKitMixedXAxisIndentationPadding, UiKitMixedYAxisIndentationMargin, UiKitMixedYAxisIndentationPadding, UiKitOutlineProps, UiKitPositionProps, } from '../types';
|
package/dist/box/box.types.d.ts
CHANGED
|
@@ -59,4 +59,15 @@ export type BoxOwnProps = BoxBreakpointProps & BoxResponsiveProps & {
|
|
|
59
59
|
export type BoxProps<TAs extends BoxAs = 'div'> = BoxOwnProps & Omit<ComponentPropsWithoutRef<TAs>, keyof BoxOwnProps | 'as' | 'children'> & {
|
|
60
60
|
as?: TAs;
|
|
61
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* Публичный тип props для JSX autocomplete.
|
|
64
|
+
*
|
|
65
|
+
* Generic `BoxProps<TAs>` нужен для точной типизации `as`, но IDE хуже
|
|
66
|
+
* показывают подсказки для generic-компонентов из npm-пакета. Этот тип
|
|
67
|
+
* описывает дефолтный JSX-контракт Box и сохраняет подсказки для `m`, `md`,
|
|
68
|
+
* `lg`, `xl` и остальных style props при импорте из `@shmidko61/lc-ui-kit`.
|
|
69
|
+
*/
|
|
70
|
+
export type BoxComponentProps = BoxOwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof BoxOwnProps | 'as' | 'children'> & {
|
|
71
|
+
as?: BoxAs;
|
|
72
|
+
};
|
|
62
73
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './accordion/accordion';
|
|
2
|
-
export
|
|
2
|
+
export { Box } from './box/box';
|
|
3
|
+
export type { BoxAs, BoxBackgroundValue, BoxBreakpointProps, BoxComponentProps, BoxProps, BorderRadiusItem, BorderRadiusKeys, BorderRadiusSides, BorderWidthItem, BorderWidthSides, PositionValue, UiKitAnyIndentationMargin, UiKitAnyIndentationPadding, UiKitArrayIndentation, UiKitAxisIndentationMargin, UiKitAxisIndentationPadding, UiKitDimensionProps, UiKitIndentations, UiKitIndentationsProps, UiKitMarginArrayIndentation, UiKitMarginIndentation, UiKitBackgroundProps, UiKitBorderColor, UiKitBorderProps, UiKitBorderRadius, UiKitBorderWidth, UiKitCursorProps, UiKitDisplayProps, UiKitListStyleProps, UiKitMixedXAxisIndentationMargin, UiKitMixedXAxisIndentationPadding, UiKitMixedYAxisIndentationMargin, UiKitMixedYAxisIndentationPadding, UiKitOutlineProps, UiKitPositionProps, } from './box/box';
|
|
3
4
|
export * from './button/button';
|
|
4
5
|
export * from './design-tokens/color.tokens';
|
|
5
6
|
export * from './design-tokens/typography.tokens';
|