@mindlogic-ai/logician-ui 4.0.0-alpha.25 → 4.0.0-alpha.26
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/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/index.d.ts +1 -1
- package/dist/components/Card/index.d.ts.map +1 -1
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Chip/Chip.d.ts.map +1 -1
- package/dist/components/Chip/index.d.ts +1 -1
- package/dist/components/Chip/index.d.ts.map +1 -1
- package/dist/components/Container/Container.d.ts +1 -1
- package/dist/components/Container/Container.d.ts.map +1 -1
- package/dist/components/Container/index.d.ts +1 -0
- package/dist/components/Container/index.d.ts.map +1 -1
- package/dist/components/ExpandableText/ExpandableText.d.ts +8 -8
- package/dist/components/IconButton/IconButton.d.ts +1 -1
- package/dist/components/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/IconButton/index.d.ts +1 -1
- package/dist/components/IconButton/index.d.ts.map +1 -1
- package/dist/components/Menu/Menu.d.ts +1 -1
- package/dist/components/Menu/MenuItem.d.ts +1 -1
- package/dist/components/Menu/MenuItem.d.ts.map +1 -1
- package/dist/components/SeeMoreButton/SeeMoreButton.d.ts +1 -1
- package/dist/components/SeeMoreButton/SeeMoreButton.d.ts.map +1 -1
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.d.ts.map +1 -1
- package/dist/components/Tag/index.d.ts +1 -1
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Typography/Caption.d.ts +1 -1
- package/dist/components/Typography/Caption.d.ts.map +1 -1
- package/dist/components/Typography/H1.d.ts +1 -1
- package/dist/components/Typography/H1.d.ts.map +1 -1
- package/dist/components/Typography/H2.d.ts +1 -1
- package/dist/components/Typography/H2.d.ts.map +1 -1
- package/dist/components/Typography/H3.d.ts +1 -1
- package/dist/components/Typography/H3.d.ts.map +1 -1
- package/dist/components/Typography/H4.d.ts +1 -1
- package/dist/components/Typography/H4.d.ts.map +1 -1
- package/dist/components/Typography/H5.d.ts +1 -1
- package/dist/components/Typography/H5.d.ts.map +1 -1
- package/dist/components/Typography/Link.d.ts +1 -1
- package/dist/components/Typography/Link.d.ts.map +1 -1
- package/dist/components/Typography/Overline.d.ts +1 -1
- package/dist/components/Typography/Overline.d.ts.map +1 -1
- package/dist/components/Typography/Subtext.d.ts +1 -1
- package/dist/components/Typography/Subtext.d.ts.map +1 -1
- package/dist/components/Typography/Subtitle.d.ts +1 -1
- package/dist/components/Typography/Subtitle.d.ts.map +1 -1
- package/dist/components/Typography/Text.d.ts +1 -1
- package/dist/components/Typography/Text.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/dist/types/polymorphic.d.ts +17 -0
- package/dist/types/polymorphic.d.ts.map +1 -1
- package/dist/types/polymorphic.js +17 -0
- package/dist/types/polymorphic.js.map +1 -1
- package/dist/types/polymorphic.mjs +17 -0
- package/dist/types/polymorphic.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/Badge/index.ts +1 -1
- package/src/components/Button/index.tsx +1 -0
- package/src/components/Card/index.ts +1 -1
- package/src/components/Chip/index.ts +6 -1
- package/src/components/Container/index.ts +1 -0
- package/src/components/IconButton/index.tsx +1 -0
- package/src/components/Tag/index.ts +6 -1
- package/src/index.ts +26 -1
- package/src/types/polymorphic.ts +17 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BadgeOwnProps } from './Badge.types';
|
|
2
|
-
export declare const Badge: import("
|
|
2
|
+
export declare const Badge: import("../..").PolymorphicComponent<BadgeOwnProps, "span">;
|
|
3
3
|
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAoC9C,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAoC9C,eAAO,MAAM,KAAK,6DAAgD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Badge } from './Badge';
|
|
2
2
|
export { baseStyles as badgeStyles, variantStyles as badgeVariantStyles, } from './Badge.styles';
|
|
3
|
-
export type { BadgeProps, BadgeVariant } from './Badge.types';
|
|
3
|
+
export type { BadgeOwnProps, BadgeProps, BadgeVariant } from './Badge.types';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EACL,UAAU,IAAI,WAAW,EACzB,aAAa,IAAI,kBAAkB,GACpC,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EACL,UAAU,IAAI,WAAW,EACzB,aAAa,IAAI,kBAAkB,GACpC,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ButtonOwnProps } from './Button.types';
|
|
2
|
-
export declare const Button: import("
|
|
2
|
+
export declare const Button: import("../..").PolymorphicComponent<ButtonOwnProps, "button">;
|
|
3
3
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAe,MAAM,gBAAgB,CAAC;AAkE7D,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,cAAc,EAAe,MAAM,gBAAgB,CAAC;AAkE7D,eAAO,MAAM,MAAM,gEAA0C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Button } from './Button';
|
|
2
2
|
export { buttonColorPalettes, buttonColorPaletteStyles, buttonVariants, getButtonStyles, } from './Button.styles';
|
|
3
|
-
export type { ButtonColorPalette, ButtonProps, ButtonVariant, } from './Button.types';
|
|
3
|
+
export type { ButtonColorPalette, ButtonOwnProps, ButtonProps, ButtonVariant, } from './Button.types';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,EACd,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,kBAAkB,EAClB,WAAW,EACX,aAAa,GACd,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,cAAc,EACd,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,aAAa,GACd,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CardOwnProps } from './Card.types';
|
|
2
|
-
export declare const Card: import("
|
|
2
|
+
export declare const Card: import("../..").PolymorphicComponent<CardOwnProps, "div">;
|
|
3
3
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAsC5C,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAsC5C,eAAO,MAAM,IAAI,2DAA6C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ChipOwnProps } from './Chip.types';
|
|
2
2
|
/** Type-level polymorphism over the same runtime — see `polymorphic`. */
|
|
3
|
-
export declare const Chip: import("
|
|
3
|
+
export declare const Chip: import("../..").PolymorphicComponent<ChipOwnProps, "span">;
|
|
4
4
|
//# sourceMappingURL=Chip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Chip.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAqC5C,yEAAyE;AACzE,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Chip.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAqC5C,yEAAyE;AACzE,eAAO,MAAM,IAAI,4DAA8C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Chip } from './Chip';
|
|
2
2
|
export { colorSchemes, colorSchemeStyles, getChipStyles, variants, } from './Chip.styles';
|
|
3
|
-
export type { ChipColorScheme, ChipProps, ChipVariant } from './Chip.types';
|
|
3
|
+
export type { ChipColorScheme, ChipOwnProps, ChipProps, ChipVariant, } from './Chip.types';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,eAAe,EACf,YAAY,EACZ,SAAS,EACT,WAAW,GACZ,MAAM,cAAc,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ContainerOwnProps } from './Container.types';
|
|
2
2
|
/** Type-level polymorphism over the same runtime — see `polymorphic`. */
|
|
3
|
-
export declare const Container: import("
|
|
3
|
+
export declare const Container: import("../..").PolymorphicComponent<ContainerOwnProps, "div">;
|
|
4
4
|
//# sourceMappingURL=Container.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../src/components/Container/Container.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAsBtD,yEAAyE;AACzE,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"Container.d.ts","sourceRoot":"","sources":["../../../src/components/Container/Container.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAsBtD,yEAAyE;AACzE,eAAO,MAAM,SAAS,gEAAuD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Container/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Container/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC3E,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TypographyProps } from '@/components/Typography';
|
|
2
2
|
declare const TEXT_COMPONENTS: {
|
|
3
|
-
readonly Text: import("
|
|
4
|
-
readonly Subtitle: import("
|
|
5
|
-
readonly Subtext: import("
|
|
6
|
-
readonly H1: import("
|
|
7
|
-
readonly H2: import("
|
|
8
|
-
readonly H3: import("
|
|
9
|
-
readonly H4: import("
|
|
10
|
-
readonly H5: import("
|
|
3
|
+
readonly Text: import("../..").PolymorphicComponent<import("@/components/Typography").TypographyOwnProps, "p">;
|
|
4
|
+
readonly Subtitle: import("../..").PolymorphicComponent<import("@/components/Typography").TypographyOwnProps, "p">;
|
|
5
|
+
readonly Subtext: import("../..").PolymorphicComponent<import("@/components/Typography").TypographyOwnProps, "p">;
|
|
6
|
+
readonly H1: import("../..").PolymorphicComponent<import("@/components/Typography").HeadingOwnProps, "h1">;
|
|
7
|
+
readonly H2: import("../..").PolymorphicComponent<import("@/components/Typography").HeadingOwnProps, "h2">;
|
|
8
|
+
readonly H3: import("../..").PolymorphicComponent<import("@/components/Typography").HeadingOwnProps, "h3">;
|
|
9
|
+
readonly H4: import("../..").PolymorphicComponent<import("@/components/Typography").HeadingOwnProps, "h4">;
|
|
10
|
+
readonly H5: import("../..").PolymorphicComponent<import("@/components/Typography").HeadingOwnProps, "h5">;
|
|
11
11
|
};
|
|
12
12
|
export type TextComponentType = keyof typeof TEXT_COMPONENTS;
|
|
13
13
|
export type ExpandableTextProps = {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IconButtonOwnProps } from './IconButton.types';
|
|
2
|
-
export declare const IconButton: import("
|
|
2
|
+
export declare const IconButton: import("../..").PolymorphicComponent<IconButtonOwnProps, "button">;
|
|
3
3
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/components/IconButton/IconButton.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAmB,MAAM,oBAAoB,CAAC;AA6CzE,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/components/IconButton/IconButton.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAmB,MAAM,oBAAoB,CAAC;AA6CzE,eAAO,MAAM,UAAU,oEAAkD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { IconButton } from './IconButton';
|
|
2
2
|
export { getIconButtonStyles, iconButtonColorPalettes, iconButtonColorPaletteStyles, iconButtonVariants, } from './IconButton.styles';
|
|
3
|
-
export type { IconButtonColorPalette, IconButtonProps, IconButtonVariant, } from './IconButton.types';
|
|
3
|
+
export type { IconButtonColorPalette, IconButtonOwnProps, IconButtonProps, IconButtonVariant, } from './IconButton.types';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/IconButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,sBAAsB,EACtB,eAAe,EACf,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/IconButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,sBAAsB,EACtB,kBAAkB,EAClB,eAAe,EACf,iBAAiB,GAClB,MAAM,oBAAoB,CAAC"}
|
|
@@ -10,7 +10,7 @@ export declare const Menu: {
|
|
|
10
10
|
List: import("react").ForwardRefExoticComponent<ChakraMenu.ContentProps & {
|
|
11
11
|
portalled?: boolean;
|
|
12
12
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
-
Item: import("
|
|
13
|
+
Item: import("../..").PolymorphicComponent<import("./MenuItem.types").MenuItemOwnProps, "div">;
|
|
14
14
|
ItemGroup: import("react").ForwardRefExoticComponent<ChakraMenu.ItemGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
15
|
ItemGroupLabel: import("react").ForwardRefExoticComponent<ChakraMenu.ItemGroupLabelProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
16
|
ItemCommand: import("react").ForwardRefExoticComponent<ChakraMenu.CommandProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MenuItemOwnProps } from './MenuItem.types';
|
|
2
|
-
export declare const MenuItem: import("
|
|
2
|
+
export declare const MenuItem: import("../..").PolymorphicComponent<MenuItemOwnProps, "div">;
|
|
3
3
|
//# sourceMappingURL=MenuItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuItem.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAe,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AA0CjE,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuItem.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAe,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AA0CjE,eAAO,MAAM,QAAQ,+DAAqD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SeeMoreButtonOwnProps } from './SeeMoreButton.types';
|
|
2
2
|
/** Type-level polymorphism over the same runtime — see `polymorphic`. */
|
|
3
|
-
export declare const SeeMoreButton: import("
|
|
3
|
+
export declare const SeeMoreButton: import("../..").PolymorphicComponent<SeeMoreButtonOwnProps, "button">;
|
|
4
4
|
//# sourceMappingURL=SeeMoreButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeeMoreButton.d.ts","sourceRoot":"","sources":["../../../src/components/SeeMoreButton/SeeMoreButton.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AA2B9D,yEAAyE;AACzE,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"SeeMoreButton.d.ts","sourceRoot":"","sources":["../../../src/components/SeeMoreButton/SeeMoreButton.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AA2B9D,yEAAyE;AACzE,eAAO,MAAM,aAAa,uEAC6B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TagOwnProps } from './Tag.types';
|
|
2
2
|
/** Type-level polymorphism over the same runtime — see `polymorphic`. */
|
|
3
|
-
export declare const Tag: import("
|
|
3
|
+
export declare const Tag: import("../..").PolymorphicComponent<TagOwnProps, "span">;
|
|
4
4
|
//# sourceMappingURL=Tag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAoD1C,yEAAyE;AACzE,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAoD1C,yEAAyE;AACzE,eAAO,MAAM,GAAG,2DAA4C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Icon } from '@chakra-ui/react';
|
|
2
2
|
export { Tag } from './Tag';
|
|
3
3
|
export { getTagStyles, tagColorPalettes, tagColorPaletteStyles, tagVariants, } from './Tag.styles';
|
|
4
|
-
export type { TagColorPalette, TagProps, TagVariant } from './Tag.types';
|
|
4
|
+
export type { TagColorPalette, TagOwnProps, TagProps, TagVariant, } from './Tag.types';
|
|
5
5
|
export * from './TagCloseButton';
|
|
6
6
|
export * from './TagLabel';
|
|
7
7
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,WAAW,GACZ,MAAM,cAAc,CAAC;AACtB,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,WAAW,GACZ,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,eAAe,EACf,WAAW,EACX,QAAQ,EACR,UAAU,GACX,MAAM,aAAa,CAAC;AACrB,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAE3B;;GAEG;AACH,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,CAAC;AAE/B;;GAEG;AACH,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TypographyOwnProps } from './Typography.types';
|
|
2
2
|
/** Type-level polymorphism over the same runtime — see `polymorphic`. */
|
|
3
|
-
export declare const Caption: import("
|
|
3
|
+
export declare const Caption: import("../..").PolymorphicComponent<TypographyOwnProps, "p">;
|
|
4
4
|
//# sourceMappingURL=Caption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Caption.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Caption.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAmCxD,yEAAyE;AACzE,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"Caption.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Caption.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAmCxD,yEAAyE;AACzE,eAAO,MAAM,OAAO,+DAAoD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HeadingOwnProps } from './Typography.types';
|
|
2
2
|
/** Type-level polymorphism over the same runtime — see `polymorphic`. */
|
|
3
|
-
export declare const H1: import("
|
|
3
|
+
export declare const H1: import("../..").PolymorphicComponent<HeadingOwnProps, "h1">;
|
|
4
4
|
//# sourceMappingURL=H1.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"H1.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/H1.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAoBrD,yEAAyE;AACzE,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"H1.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/H1.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAoBrD,yEAAyE;AACzE,eAAO,MAAM,EAAE,6DAA6C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HeadingOwnProps } from './Typography.types';
|
|
2
2
|
/** Type-level polymorphism over the same runtime — see `polymorphic`. */
|
|
3
|
-
export declare const H2: import("
|
|
3
|
+
export declare const H2: import("../..").PolymorphicComponent<HeadingOwnProps, "h2">;
|
|
4
4
|
//# sourceMappingURL=H2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"H2.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/H2.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAoBrD,yEAAyE;AACzE,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"H2.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/H2.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAoBrD,yEAAyE;AACzE,eAAO,MAAM,EAAE,6DAA6C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HeadingOwnProps } from './Typography.types';
|
|
2
2
|
/** Type-level polymorphism over the same runtime — see `polymorphic`. */
|
|
3
|
-
export declare const H3: import("
|
|
3
|
+
export declare const H3: import("../..").PolymorphicComponent<HeadingOwnProps, "h3">;
|
|
4
4
|
//# sourceMappingURL=H3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"H3.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/H3.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAoBrD,yEAAyE;AACzE,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"H3.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/H3.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAoBrD,yEAAyE;AACzE,eAAO,MAAM,EAAE,6DAA6C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HeadingOwnProps } from './Typography.types';
|
|
2
2
|
/** Type-level polymorphism over the same runtime — see `polymorphic`. */
|
|
3
|
-
export declare const H4: import("
|
|
3
|
+
export declare const H4: import("../..").PolymorphicComponent<HeadingOwnProps, "h4">;
|
|
4
4
|
//# sourceMappingURL=H4.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"H4.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/H4.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAoBrD,yEAAyE;AACzE,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"H4.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/H4.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAoBrD,yEAAyE;AACzE,eAAO,MAAM,EAAE,6DAA6C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HeadingOwnProps } from './Typography.types';
|
|
2
2
|
/** Type-level polymorphism over the same runtime — see `polymorphic`. */
|
|
3
|
-
export declare const H5: import("
|
|
3
|
+
export declare const H5: import("../..").PolymorphicComponent<HeadingOwnProps, "h5">;
|
|
4
4
|
//# sourceMappingURL=H5.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"H5.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/H5.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAoBrD,yEAAyE;AACzE,eAAO,MAAM,EAAE
|
|
1
|
+
{"version":3,"file":"H5.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/H5.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAoBrD,yEAAyE;AACzE,eAAO,MAAM,EAAE,6DAA6C,CAAC"}
|
|
@@ -38,5 +38,5 @@ export declare const LINK_RAMP: {
|
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
40
|
/** Type-level polymorphism over the same runtime — see `polymorphic`. */
|
|
41
|
-
export declare const Link: import("
|
|
41
|
+
export declare const Link: import("../..").PolymorphicComponent<LinkOwnProps, "a">;
|
|
42
42
|
//# sourceMappingURL=Link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC,GAAG;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,CAAC,QAAQ,SAAS,WAAW,GAAG,GAAG,IAC5D,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AAE3C;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;CAKZ,CAAC;AA8DX,yEAAyE;AACzE,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAsB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC,GAAG;IAC7D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,CAAC,QAAQ,SAAS,WAAW,GAAG,GAAG,IAC5D,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;AAE3C;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;CAKZ,CAAC;AA8DX,yEAAyE;AACzE,eAAO,MAAM,IAAI,yDAA2C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TypographyOwnProps } from './Typography.types';
|
|
2
2
|
/** Type-level polymorphism over the same runtime — see `polymorphic`. */
|
|
3
|
-
export declare const Overline: import("
|
|
3
|
+
export declare const Overline: import("../..").PolymorphicComponent<TypographyOwnProps, "p">;
|
|
4
4
|
//# sourceMappingURL=Overline.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overline.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Overline.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAiCxD,yEAAyE;AACzE,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Overline.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Overline.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAiCxD,yEAAyE;AACzE,eAAO,MAAM,QAAQ,+DAAqD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TypographyOwnProps } from './Typography.types';
|
|
2
2
|
/** Type-level polymorphism over the same runtime — see `polymorphic`. */
|
|
3
|
-
export declare const Subtext: import("
|
|
3
|
+
export declare const Subtext: import("../..").PolymorphicComponent<TypographyOwnProps, "p">;
|
|
4
4
|
//# sourceMappingURL=Subtext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Subtext.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Subtext.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAqBxD,yEAAyE;AACzE,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"Subtext.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Subtext.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAqBxD,yEAAyE;AACzE,eAAO,MAAM,OAAO,+DAAoD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TypographyOwnProps } from './Typography.types';
|
|
2
2
|
/** Type-level polymorphism over the same runtime — see `polymorphic`. */
|
|
3
|
-
export declare const Subtitle: import("
|
|
3
|
+
export declare const Subtitle: import("../..").PolymorphicComponent<TypographyOwnProps, "p">;
|
|
4
4
|
//# sourceMappingURL=Subtitle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Subtitle.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Subtitle.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAsCxD,yEAAyE;AACzE,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"Subtitle.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Subtitle.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAsCxD,yEAAyE;AACzE,eAAO,MAAM,QAAQ,+DAAqD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TypographyOwnProps } from './Typography.types';
|
|
2
2
|
/** Type-level polymorphism over the same runtime — see `polymorphic`. */
|
|
3
|
-
export declare const Text: import("
|
|
3
|
+
export declare const Text: import("../..").PolymorphicComponent<TypographyOwnProps, "p">;
|
|
4
4
|
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Text.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAwBxD,yEAAyE;AACzE,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/Text.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAwBxD,yEAAyE;AACzE,eAAO,MAAM,IAAI,+DAAiD,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -63,10 +63,12 @@ export * from './components/Tooltip';
|
|
|
63
63
|
export * from './components/Tree';
|
|
64
64
|
export * from './components/Workflow';
|
|
65
65
|
export { Caption, H1, H2, H3, H4, H5, Link, LINK_RAMP, Overline, Subtext, Subtitle, Text, } from './components/Typography';
|
|
66
|
+
export type { CaptionProps, H1Props, H2Props, H3Props, H4Props, H5Props, HeadingOwnProps, HeadingProps, OverlineProps, SubtextProps, SubtitleProps, TextProps, TypographyOwnProps, TypographyProps, } from './components/Typography';
|
|
66
67
|
export { useHasHover } from './hooks/useHasHover';
|
|
67
68
|
export type { LanguageContextValue } from './hooks/useLanguage';
|
|
68
69
|
export { LanguageContext, useLanguage } from './hooks/useLanguage';
|
|
69
70
|
export { logicianConfig, system, theme } from './theme';
|
|
70
71
|
export { colors, type SemanticColorToken, semanticTokens, } from './theme/colors';
|
|
71
|
-
export type { PolymorphicProps, PolymorphicRef } from './types/polymorphic';
|
|
72
|
+
export type { PolymorphicComponent, PolymorphicProps, PolymorphicRef, } from './types/polymorphic';
|
|
73
|
+
export { polymorphic } from './types/polymorphic';
|
|
72
74
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 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M,SAAS,CAAC;AACxD,OAAO,EACL,MAAM,EACN,KAAK,kBAAkB,EACvB,cAAc,GACf,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EACV,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,GACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -174,6 +174,7 @@ var useHasHover = require('./hooks/useHasHover.js');
|
|
|
174
174
|
var useLanguage = require('./hooks/useLanguage.js');
|
|
175
175
|
var index = require('./theme/index.js');
|
|
176
176
|
var colors = require('./theme/colors.js');
|
|
177
|
+
var polymorphic = require('./types/polymorphic.js');
|
|
177
178
|
|
|
178
179
|
|
|
179
180
|
|
|
@@ -410,4 +411,5 @@ exports.system = index.system;
|
|
|
410
411
|
exports.theme = index.theme;
|
|
411
412
|
exports.colors = colors.colors;
|
|
412
413
|
exports.semanticTokens = colors.semanticTokens;
|
|
414
|
+
exports.polymorphic = polymorphic.polymorphic;
|
|
413
415
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.mjs
CHANGED
|
@@ -172,4 +172,5 @@ export { useHasHover } from './hooks/useHasHover.mjs';
|
|
|
172
172
|
export { LanguageContext, useLanguage } from './hooks/useLanguage.mjs';
|
|
173
173
|
export { logicianConfig, system, theme } from './theme/index.mjs';
|
|
174
174
|
export { colors, semanticTokens } from './theme/colors.mjs';
|
|
175
|
+
export { polymorphic } from './types/polymorphic.mjs';
|
|
175
176
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -79,6 +79,23 @@ export type PolymorphicComponent<TOwn, TDefault extends ElementType> = (<TElemen
|
|
|
79
79
|
* `displayName` stays on the implementation, where `react/display-name` can
|
|
80
80
|
* see it — the lint rule is the thing that stops a component shipping without
|
|
81
81
|
* one, and it cannot follow a name through this call.
|
|
82
|
+
*
|
|
83
|
+
* ## Consumers wrapping these components
|
|
84
|
+
*
|
|
85
|
+
* Call this the same way the components above do — a wrapper that pins the
|
|
86
|
+
* element back to its default undoes the polymorphism one layer up:
|
|
87
|
+
*
|
|
88
|
+
* ```ts
|
|
89
|
+
* export const ClickableCard = polymorphic<ClickableCardOwnProps, 'div'>(ClickableCardImpl);
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* One thing to know: this is a runtime export, so a test that mocks
|
|
93
|
+
* `@mindlogic-ai/logician-ui` wholesale has to include it or the wrapper's
|
|
94
|
+
* module throws on import. The mock is `<T,>(Impl: T) => Impl` — this function
|
|
95
|
+
* is a type-level identity, so that IS the implementation. Casting against
|
|
96
|
+
* `PolymorphicComponent` instead works and needs no mock, but it costs the call
|
|
97
|
+
* site an `as unknown as` double cast, which is the kind of escape hatch a
|
|
98
|
+
* wrapper should not have to write.
|
|
82
99
|
*/
|
|
83
100
|
export declare function polymorphic<TOwn, TDefault extends ElementType = 'button'>(Impl: unknown): PolymorphicComponent<TOwn, TDefault>;
|
|
84
101
|
//# sourceMappingURL=polymorphic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polymorphic.d.ts","sourceRoot":"","sources":["../../src/types/polymorphic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACrB,WAAW,EACX,YAAY,EACb,MAAM,OAAO,CAAC;AAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,MAAM,gBAAgB,CAAC,QAAQ,SAAS,WAAW,EAAE,IAAI,IAAI,IAAI,GAAG;IACxE,2EAA2E;IAC3E,EAAE,CAAC,EAAE,QAAQ,CAAC;CACf,GAAG,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,MAAM,cAAc,CAAC,QAAQ,SAAS,WAAW,IACrD,qBAAqB,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC;AAEzC;;;GAGG;AACH,MAAM,MAAM,oBAAoB,CAAC,IAAI,EAAE,QAAQ,SAAS,WAAW,IAAI,CAAC,CACtE,QAAQ,SAAS,WAAW,GAAG,QAAQ,EAEvC,KAAK,EAAE,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG;IAAE,GAA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Q,CAAC,CAEtC"}
|
|
@@ -31,6 +31,23 @@
|
|
|
31
31
|
* `displayName` stays on the implementation, where `react/display-name` can
|
|
32
32
|
* see it — the lint rule is the thing that stops a component shipping without
|
|
33
33
|
* one, and it cannot follow a name through this call.
|
|
34
|
+
*
|
|
35
|
+
* ## Consumers wrapping these components
|
|
36
|
+
*
|
|
37
|
+
* Call this the same way the components above do — a wrapper that pins the
|
|
38
|
+
* element back to its default undoes the polymorphism one layer up:
|
|
39
|
+
*
|
|
40
|
+
* ```ts
|
|
41
|
+
* export const ClickableCard = polymorphic<ClickableCardOwnProps, 'div'>(ClickableCardImpl);
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* One thing to know: this is a runtime export, so a test that mocks
|
|
45
|
+
* `@mindlogic-ai/logician-ui` wholesale has to include it or the wrapper's
|
|
46
|
+
* module throws on import. The mock is `<T,>(Impl: T) => Impl` — this function
|
|
47
|
+
* is a type-level identity, so that IS the implementation. Casting against
|
|
48
|
+
* `PolymorphicComponent` instead works and needs no mock, but it costs the call
|
|
49
|
+
* site an `as unknown as` double cast, which is the kind of escape hatch a
|
|
50
|
+
* wrapper should not have to write.
|
|
34
51
|
*/
|
|
35
52
|
function polymorphic(Impl) {
|
|
36
53
|
return Impl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polymorphic.js","sources":["../../src/types/polymorphic.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AA6DA
|
|
1
|
+
{"version":3,"file":"polymorphic.js","sources":["../../src/types/polymorphic.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AA6DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CG;AACG,SAAU,WAAW,CACzB,IAAa,EAAA;AAEb,IAAA,OAAO,IAA4C;AACrD;;;;"}
|
|
@@ -29,6 +29,23 @@
|
|
|
29
29
|
* `displayName` stays on the implementation, where `react/display-name` can
|
|
30
30
|
* see it — the lint rule is the thing that stops a component shipping without
|
|
31
31
|
* one, and it cannot follow a name through this call.
|
|
32
|
+
*
|
|
33
|
+
* ## Consumers wrapping these components
|
|
34
|
+
*
|
|
35
|
+
* Call this the same way the components above do — a wrapper that pins the
|
|
36
|
+
* element back to its default undoes the polymorphism one layer up:
|
|
37
|
+
*
|
|
38
|
+
* ```ts
|
|
39
|
+
* export const ClickableCard = polymorphic<ClickableCardOwnProps, 'div'>(ClickableCardImpl);
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* One thing to know: this is a runtime export, so a test that mocks
|
|
43
|
+
* `@mindlogic-ai/logician-ui` wholesale has to include it or the wrapper's
|
|
44
|
+
* module throws on import. The mock is `<T,>(Impl: T) => Impl` — this function
|
|
45
|
+
* is a type-level identity, so that IS the implementation. Casting against
|
|
46
|
+
* `PolymorphicComponent` instead works and needs no mock, but it costs the call
|
|
47
|
+
* site an `as unknown as` double cast, which is the kind of escape hatch a
|
|
48
|
+
* wrapper should not have to write.
|
|
32
49
|
*/
|
|
33
50
|
function polymorphic(Impl) {
|
|
34
51
|
return Impl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polymorphic.mjs","sources":["../../src/types/polymorphic.ts"],"sourcesContent":[null],"names":[],"mappings":";AA6DA
|
|
1
|
+
{"version":3,"file":"polymorphic.mjs","sources":["../../src/types/polymorphic.ts"],"sourcesContent":[null],"names":[],"mappings":";AA6DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CG;AACG,SAAU,WAAW,CACzB,IAAa,EAAA;AAEb,IAAA,OAAO,IAA4C;AACrD;;;;"}
|
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Card } from './Card';
|
|
2
|
-
export type { CardProps } from './Card.types';
|
|
2
|
+
export type { CardOwnProps, CardProps, CardVariant } from './Card.types';
|
|
@@ -7,7 +7,12 @@ export {
|
|
|
7
7
|
tagColorPaletteStyles,
|
|
8
8
|
tagVariants,
|
|
9
9
|
} from './Tag.styles';
|
|
10
|
-
export type {
|
|
10
|
+
export type {
|
|
11
|
+
TagColorPalette,
|
|
12
|
+
TagOwnProps,
|
|
13
|
+
TagProps,
|
|
14
|
+
TagVariant,
|
|
15
|
+
} from './Tag.types';
|
|
11
16
|
export * from './TagCloseButton';
|
|
12
17
|
export * from './TagLabel';
|
|
13
18
|
|
package/src/index.ts
CHANGED
|
@@ -105,6 +105,26 @@ export {
|
|
|
105
105
|
Subtitle,
|
|
106
106
|
Text,
|
|
107
107
|
} from './components/Typography';
|
|
108
|
+
// …and their prop types, which the block above never exported — so a consumer
|
|
109
|
+
// could not type a wrapper over `H3`/`Text` at all. `LinkProps` is deliberately
|
|
110
|
+
// left out: the root already exports a `Link` component from elsewhere and the
|
|
111
|
+
// name would collide.
|
|
112
|
+
export type {
|
|
113
|
+
CaptionProps,
|
|
114
|
+
H1Props,
|
|
115
|
+
H2Props,
|
|
116
|
+
H3Props,
|
|
117
|
+
H4Props,
|
|
118
|
+
H5Props,
|
|
119
|
+
HeadingOwnProps,
|
|
120
|
+
HeadingProps,
|
|
121
|
+
OverlineProps,
|
|
122
|
+
SubtextProps,
|
|
123
|
+
SubtitleProps,
|
|
124
|
+
TextProps,
|
|
125
|
+
TypographyOwnProps,
|
|
126
|
+
TypographyProps,
|
|
127
|
+
} from './components/Typography';
|
|
108
128
|
|
|
109
129
|
// Hooks
|
|
110
130
|
export { useHasHover } from './hooks/useHasHover';
|
|
@@ -120,4 +140,9 @@ export {
|
|
|
120
140
|
} from './theme/colors';
|
|
121
141
|
|
|
122
142
|
// Shared Types
|
|
123
|
-
export type {
|
|
143
|
+
export type {
|
|
144
|
+
PolymorphicComponent,
|
|
145
|
+
PolymorphicProps,
|
|
146
|
+
PolymorphicRef,
|
|
147
|
+
} from './types/polymorphic';
|
|
148
|
+
export { polymorphic } from './types/polymorphic';
|
package/src/types/polymorphic.ts
CHANGED
|
@@ -89,6 +89,23 @@ export type PolymorphicComponent<TOwn, TDefault extends ElementType> = (<
|
|
|
89
89
|
* `displayName` stays on the implementation, where `react/display-name` can
|
|
90
90
|
* see it — the lint rule is the thing that stops a component shipping without
|
|
91
91
|
* one, and it cannot follow a name through this call.
|
|
92
|
+
*
|
|
93
|
+
* ## Consumers wrapping these components
|
|
94
|
+
*
|
|
95
|
+
* Call this the same way the components above do — a wrapper that pins the
|
|
96
|
+
* element back to its default undoes the polymorphism one layer up:
|
|
97
|
+
*
|
|
98
|
+
* ```ts
|
|
99
|
+
* export const ClickableCard = polymorphic<ClickableCardOwnProps, 'div'>(ClickableCardImpl);
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* One thing to know: this is a runtime export, so a test that mocks
|
|
103
|
+
* `@mindlogic-ai/logician-ui` wholesale has to include it or the wrapper's
|
|
104
|
+
* module throws on import. The mock is `<T,>(Impl: T) => Impl` — this function
|
|
105
|
+
* is a type-level identity, so that IS the implementation. Casting against
|
|
106
|
+
* `PolymorphicComponent` instead works and needs no mock, but it costs the call
|
|
107
|
+
* site an `as unknown as` double cast, which is the kind of escape hatch a
|
|
108
|
+
* wrapper should not have to write.
|
|
92
109
|
*/
|
|
93
110
|
export function polymorphic<TOwn, TDefault extends ElementType = 'button'>(
|
|
94
111
|
Impl: unknown
|