@ornikar/bumper 2.8.1-canary.1768927687.5a0439490957cfbbe8b8c5136c5fc68b0828466d.0 → 2.8.1-canary.1769093881.a46790da1b5b6361954b6ad25766074d3ed69784.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/CHANGELOG.md +4 -1
- package/dist/definitions/index.d.ts +2 -1
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/shared/storybook/StoryTitle.d.ts +1 -1
- package/dist/definitions/shared/storybook/helpers/argsHelpers.d.ts +8 -0
- package/dist/definitions/shared/storybook/helpers/argsHelpers.d.ts.map +1 -0
- package/dist/definitions/system/content/typography/Typography.d.ts +5 -14
- package/dist/definitions/system/content/typography/Typography.d.ts.map +1 -1
- package/dist/definitions/system/content/typography/TypographyLink.d.ts +9 -0
- package/dist/definitions/system/content/typography/TypographyLink.d.ts.map +1 -0
- package/dist/definitions/system/content/typography/index.d.ts +21 -0
- package/dist/definitions/system/content/typography/index.d.ts.map +1 -0
- package/dist/definitions/system/core/themes/light/light.d.ts +3 -0
- package/dist/definitions/system/core/themes/light/light.d.ts.map +1 -0
- package/dist/definitions/system/core/themes/themes.d.ts +6 -0
- package/dist/definitions/system/core/themes/themes.d.ts.map +1 -0
- package/dist/definitions/tamagui.config.d.ts +1 -57
- package/dist/definitions/tamagui.config.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +139 -105
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +139 -105
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.22.cjs.js +143 -109
- package/dist/index-node-22.22.cjs.js.map +1 -1
- package/dist/index-node-22.22.cjs.web.js +143 -109
- package/dist/index-node-22.22.cjs.web.js.map +1 -1
- package/dist/index-node-22.22.es.mjs +145 -111
- package/dist/index-node-22.22.es.mjs.map +1 -1
- package/dist/index-node-22.22.es.web.mjs +145 -111
- package/dist/index-node-22.22.es.web.mjs.map +1 -1
- package/dist/index.es.js +137 -103
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +137 -103
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/index.ts +2 -1
- package/src/shared/storybook/StoryTitle.tsx +1 -1
- package/src/shared/storybook/helpers/argsHelpers.ts +47 -0
- package/src/system/content/icon/Icon.features.stories.tsx +1 -1
- package/src/system/content/icon/Icon.stories.tsx +3 -22
- package/src/system/content/typography/Typography.features.stories.tsx +1 -1
- package/src/system/content/typography/Typography.stories.tsx +3 -23
- package/src/system/content/typography/Typography.tsx +2 -14
- package/src/system/content/typography/TypographyIcon.features.stories.tsx +1 -1
- package/src/system/content/typography/TypographyIcon.stories.tsx +2 -19
- package/src/system/content/typography/TypographyLink.features.stories.tsx +62 -0
- package/src/system/content/typography/TypographyLink.stories.tsx +72 -0
- package/src/system/content/typography/TypographyLink.tsx +38 -0
- package/src/system/content/typography/__snapshots__/TypographyLink.features.stories.tsx.snap +229 -0
- package/src/system/content/typography/__snapshots__/TypographyLink.stories.tsx.snap +41 -0
- package/src/system/content/typography/__snapshots_web__/TypographyLink.features.stories.tsx.snap +196 -0
- package/src/system/content/typography/__snapshots_web__/TypographyLink.stories.tsx.snap +33 -0
- package/src/system/content/typography/index.ts +15 -0
- package/src/system/core/primitives/Center.features.stories.tsx +1 -1
- package/src/system/core/primitives/Center.stories.tsx +6 -89
- package/src/system/core/primitives/Image/Image.stories.tsx +3 -8
- package/src/system/core/primitives/Pressable.features.stories.tsx +1 -1
- package/src/system/core/primitives/Pressable.stories.tsx +4 -53
- package/src/system/core/primitives/ScrollView/ScrollView.features.stories.tsx +1 -1
- package/src/system/core/primitives/ScrollView/ScrollView.stories.tsx +3 -6
- package/src/system/core/primitives/Stack.features.stories.tsx +1 -1
- package/src/system/core/primitives/Stack.stories.tsx +4 -39
- package/src/system/core/primitives/View.features.stories.tsx +1 -1
- package/src/system/core/primitives/View.stories.tsx +6 -107
- package/src/system/core/themes/{light.stories.tsx → light/light.stories.tsx} +5 -5
- package/src/system/core/themes/{light.ts → light/light.ts} +3 -2
- package/src/system/core/themes/themes.ts +69 -0
- package/src/system/core/tokens/breakpoints.stories.tsx +1 -1
- package/src/system/core/tokens/fonts.stories.tsx +1 -1
- package/src/system/core/tokens/palettes/deepPurpleColorPalette.stories.tsx +1 -1
- package/src/system/core/tokens/radius.stories.tsx +1 -1
- package/src/system/core/tokens/size.stories.tsx +1 -1
- package/src/system/core/tokens/space.stories.tsx +1 -1
- package/src/tamagui.config.ts +1 -1
- package/dist/definitions/system/core/themes/light.d.ts +0 -58
- package/dist/definitions/system/core/themes/light.d.ts.map +0 -1
- /package/src/system/core/themes/{__snapshots__ → light/__snapshots__}/light.stories.tsx.snap +0 -0
- /package/src/system/core/themes/{__snapshots_web__ → light/__snapshots_web__}/light.stories.tsx.snap +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,15 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [2.8.1-canary.
|
|
6
|
+
## [2.8.1-canary.1769093881.a46790da1b5b6361954b6ad25766074d3ed69784.0](https://github.com/ornikar/kitt/compare/@ornikar/bumper@2.8.0...@ornikar/bumper@2.8.1-canary.1769093881.a46790da1b5b6361954b6ad25766074d3ed69784.0) (2026-01-22)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Features
|
|
10
10
|
|
|
11
|
+
* **bumper:** abstract semantic tokens [no issue] ([#2858](https://github.com/ornikar/kitt/issues/2858)) ([c69c325](https://github.com/ornikar/kitt/commit/c69c325fadfbb3fc0da45eb7b73c00e72d595cf2))
|
|
11
12
|
* **bumper:** add Image primitive [OSE-22653] ([#2854](https://github.com/ornikar/kitt/issues/2854)) ([ff6ef30](https://github.com/ornikar/kitt/commit/ff6ef30e9b68525d893591297955718f331d4c5f))
|
|
12
13
|
* **bumper:** add ScrollView primitive [OSE-22231] ([#2853](https://github.com/ornikar/kitt/issues/2853)) ([c1657e6](https://github.com/ornikar/kitt/commit/c1657e677d375077e44e3908fa00afe3d9568ea1))
|
|
13
14
|
* **bumper:** create Icon component OSE-22651 ([#2850](https://github.com/ornikar/kitt/issues/2850)) ([badab32](https://github.com/ornikar/kitt/commit/badab3252d3ed42a97dafa5084baca4c4c34c24b))
|
|
14
15
|
* **bumper:** create TypographyIcon OSE-22633 ([#2855](https://github.com/ornikar/kitt/issues/2855)) ([297fe14](https://github.com/ornikar/kitt/commit/297fe148e19d80fa39a225fff62279ba901bc876))
|
|
16
|
+
* **bumper:** create TypographyLink OSE-22634 ([#2857](https://github.com/ornikar/kitt/issues/2857)) ([0ada312](https://github.com/ornikar/kitt/commit/0ada312fd3b1c6c5a5b2ae9f117bdd3e9d4fea63))
|
|
17
|
+
* **bumper:** shared argTypes [OSE-22659] ([#2859](https://github.com/ornikar/kitt/issues/2859)) ([e0d7b77](https://github.com/ornikar/kitt/commit/e0d7b77f2563649a1e4c140a1067a734accd71cf))
|
|
15
18
|
|
|
16
19
|
|
|
17
20
|
|
|
@@ -12,9 +12,10 @@ export type { HStackProps, StackProps, VStackProps } from './system/core/primiti
|
|
|
12
12
|
export { HStack, Stack, VStack } from './system/core/primitives/Stack';
|
|
13
13
|
export type { ViewProps } from './system/core/primitives/View';
|
|
14
14
|
export { View } from './system/core/primitives/View';
|
|
15
|
+
export { Typography } from './system/content/typography';
|
|
15
16
|
export type { TypographyTextProps } from './system/content/typography/Typography';
|
|
16
|
-
export { Typography } from './system/content/typography/Typography';
|
|
17
17
|
export type { TypographyIconProps } from './system/content/typography/TypographyIcon';
|
|
18
|
+
export type { TypographyLinkProps } from './system/content/typography/TypographyLink';
|
|
18
19
|
export { useBreakpointValue } from './system/core/breakpoints/hooks/useBreakpointValue';
|
|
19
20
|
export { useCurrentBreakpointName } from './system/core/breakpoints/hooks/useCurrentBreakpointName';
|
|
20
21
|
export { useWindowSize } from './system/core/breakpoints/hooks/useWindowSize';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAGvE,YAAY,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,YAAY,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,YAAY,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAC5E,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACvE,YAAY,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAGrD,YAAY,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAClF,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAGvE,YAAY,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,YAAY,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,YAAY,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAC5E,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACvE,YAAY,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,YAAY,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAClF,YAAY,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACtF,YAAY,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAGtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,0DAA0D,CAAC;AACpG,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAC9E,YAAY,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,YAAY,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const StoryTitle: import("@tamagui/core").TamaguiComponent<import("@tamagui/core").TamaDefer, import("@tamagui/core").TamaguiTextElement, import("@tamagui/core").RNTamaguiTextNonStyleProps & import("
|
|
1
|
+
export declare const StoryTitle: import("@tamagui/core").TamaguiComponent<import("@tamagui/core").TamaDefer, import("@tamagui/core").TamaguiTextElement, import("@tamagui/core").RNTamaguiTextNonStyleProps & import("../..").TypographyTextProps, import("@tamagui/core").TextStylePropsBase, {
|
|
2
2
|
variant?: "heading-2xl" | "heading-xl" | "heading-l" | "heading-m" | "heading-s" | "heading-xs" | "heading-2xs" | "body-xl" | "body-l" | "body-m" | "body-s" | "body-xs" | "label-xl" | "label-l" | "label-m" | "label-s" | "content-caps-3xl" | "content-caps-2xl" | "content-caps-xl" | "content-caps-l" | "content-caps-m" | "content-caps-s" | "content-caps-xs" | undefined;
|
|
3
3
|
weight?: "bold" | "semibold" | "regular" | undefined;
|
|
4
4
|
level?: 1 | 2 | 3 | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ArgTypes } from '@storybook/react';
|
|
2
|
+
export declare const backgroundColorArgType: ArgTypes[string];
|
|
3
|
+
export declare const spaceArgType: ArgTypes[string];
|
|
4
|
+
export declare const sizeArgType: ArgTypes[string];
|
|
5
|
+
export declare const radiusArgType: ArgTypes[string];
|
|
6
|
+
export declare const contentColorArgType: ArgTypes[string];
|
|
7
|
+
export declare const borderColorArgType: ArgTypes[string];
|
|
8
|
+
//# sourceMappingURL=argsHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"argsHelpers.d.ts","sourceRoot":"","sources":["../../../../../src/shared/storybook/helpers/argsHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAYjD,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,MAAM,CAInD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAIzC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAIxC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAI1C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAIhD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAI/C,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ColorTokens, GetProps, TamaguiComponent, WithMediaProps } from '@tamagui/core';
|
|
2
2
|
import { type Except } from 'type-fest';
|
|
3
3
|
import type { BodyFontVariants, ContentCapsVariants, HeadingFontVariants, LabelFontVariants } from '../../core/tokens/fonts';
|
|
4
|
-
import { TypographyIcon } from './TypographyIcon';
|
|
5
4
|
type PropsWithoutMedia<A> = {
|
|
6
5
|
[Key in keyof A as Key extends `$${string}` ? never : Key]?: A[Key];
|
|
7
6
|
};
|
|
@@ -28,18 +27,10 @@ export interface ContentCapsProps extends TypographyPropsWithoutFontStyleProps {
|
|
|
28
27
|
weight?: 'bold';
|
|
29
28
|
}
|
|
30
29
|
export type TypographyTextProps = OverrideTamaguiComponentProps<BodyProps> | OverrideTamaguiComponentProps<HeadingLabelProps> | OverrideTamaguiComponentProps<ContentCapsProps>;
|
|
31
|
-
export declare const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Header1: TamaguiComponent<TypographyTextProps>;
|
|
37
|
-
Header2: TamaguiComponent<TypographyTextProps>;
|
|
38
|
-
Header3: TamaguiComponent<TypographyTextProps>;
|
|
39
|
-
Header4: TamaguiComponent<TypographyTextProps>;
|
|
40
|
-
Header5: TamaguiComponent<TypographyTextProps>;
|
|
41
|
-
Header6: TamaguiComponent<TypographyTextProps>;
|
|
42
|
-
Icon: typeof TypographyIcon;
|
|
43
|
-
};
|
|
30
|
+
export declare const TypographyBase: TamaguiComponent<TypographyTextProps, import("@tamagui/core").TamaguiTextElement, import("@tamagui/core").RNTamaguiTextNonStyleProps & TypographyTextProps, import("@tamagui/core").TextStylePropsBase, {
|
|
31
|
+
variant?: "heading-2xl" | "heading-xl" | "heading-l" | "heading-m" | "heading-s" | "heading-xs" | "heading-2xs" | "body-xl" | "body-l" | "body-m" | "body-s" | "body-xs" | "label-xl" | "label-l" | "label-m" | "label-s" | "content-caps-3xl" | "content-caps-2xl" | "content-caps-xl" | "content-caps-l" | "content-caps-m" | "content-caps-s" | "content-caps-xs" | undefined;
|
|
32
|
+
weight?: "bold" | "semibold" | "regular" | undefined;
|
|
33
|
+
}, import("@tamagui/core").StaticConfigPublic>;
|
|
34
|
+
export declare const createHeading: (level: number) => TamaguiComponent<TypographyTextProps>;
|
|
44
35
|
export {};
|
|
45
36
|
//# sourceMappingURL=Typography.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../../../src/system/content/typography/Typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAuB,gBAAgB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAElH,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EAEnB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"Typography.d.ts","sourceRoot":"","sources":["../../../../../src/system/content/typography/Typography.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAuB,gBAAgB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAElH,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EAEnB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAcjC,KAAK,iBAAiB,CAAC,CAAC,IAAI;KAEzB,GAAG,IAAI,MAAM,CAAC,IAAI,GAAG,SAAS,IAAI,MAAM,EAAE,GAAG,KAAK,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC;CACpE,CAAC;AAEF,KAAK,6BAA6B,CAAC,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAEpG,QAAA,MAAM,kBAAkB;;;8CAgCtB,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAG1E,KAAK,gCAAgC,GACjC,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,YAAY,GACZ,OAAO,CAAC;AAEZ,KAAK,oCAAoC,GAAG,MAAM,CAAC,uBAAuB,EAAE,gCAAgC,CAAC,GAAG;IAC9G,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF,MAAM,WAAW,SAAU,SAAQ,oCAAoC;IACrE,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC7B;AACD,MAAM,WAAW,iBAAkB,SAAQ,oCAAoC;IAC7E,OAAO,EAAE,mBAAmB,GAAG,iBAAiB,CAAC;IACjD,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AACD,MAAM,WAAW,gBAAiB,SAAQ,oCAAoC;IAC5E,OAAO,EAAE,mBAAmB,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,mBAAmB,GAC3B,6BAA6B,CAAC,SAAS,CAAC,GACxC,6BAA6B,CAAC,iBAAiB,CAAC,GAChD,6BAA6B,CAAC,gBAAgB,CAAC,CAAC;AAEpD,eAAO,MAAM,cAAc;;;8CAgDzB,CAAC;AAEH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,gBAAgB,CAAC,mBAAmB,CAIjF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { GetProps } from '@tamagui/core';
|
|
2
|
+
export declare const TypographyLink: import("@tamagui/core").TamaguiComponent<import("@tamagui/core").TamaDefer, import("@tamagui/core").TamaguiTextElement, import("@tamagui/core").RNTamaguiTextNonStyleProps & import("./Typography").TypographyTextProps, import("@tamagui/core").TextStylePropsBase, {
|
|
3
|
+
disabled?: boolean | undefined;
|
|
4
|
+
variant?: "heading-2xl" | "heading-xl" | "heading-l" | "heading-m" | "heading-s" | "heading-xs" | "heading-2xs" | "body-xl" | "body-l" | "body-m" | "body-s" | "body-xs" | "label-xl" | "label-l" | "label-m" | "label-s" | "content-caps-3xl" | "content-caps-2xl" | "content-caps-xl" | "content-caps-l" | "content-caps-m" | "content-caps-s" | "content-caps-xs" | undefined;
|
|
5
|
+
weight?: "bold" | "semibold" | "regular" | undefined;
|
|
6
|
+
noUnderline?: boolean | undefined;
|
|
7
|
+
}, import("@tamagui/core").StaticConfigPublic>;
|
|
8
|
+
export type TypographyLinkProps = GetProps<typeof TypographyLink>;
|
|
9
|
+
//# sourceMappingURL=TypographyLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypographyLink.d.ts","sourceRoot":"","sources":["../../../../../src/system/content/typography/TypographyLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAI9C,eAAO,MAAM,cAAc;;;;;8CA+BzB,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TypographyIcon } from './TypographyIcon';
|
|
2
|
+
export declare const Typography: {
|
|
3
|
+
Text: import("@tamagui/web").TamaguiComponent<import("./Typography").TypographyTextProps, import("@tamagui/web").TamaguiTextElement, import("@tamagui/core").RNTamaguiTextNonStyleProps & import("./Typography").TypographyTextProps, import("@tamagui/web").TextStylePropsBase, {
|
|
4
|
+
variant?: "heading-2xl" | "heading-xl" | "heading-l" | "heading-m" | "heading-s" | "heading-xs" | "heading-2xs" | "body-xl" | "body-l" | "body-m" | "body-s" | "body-xs" | "label-xl" | "label-l" | "label-m" | "label-s" | "content-caps-3xl" | "content-caps-2xl" | "content-caps-xl" | "content-caps-l" | "content-caps-m" | "content-caps-s" | "content-caps-xs" | undefined;
|
|
5
|
+
weight?: "bold" | "semibold" | "regular" | undefined;
|
|
6
|
+
}, import("@tamagui/web").StaticConfigPublic>;
|
|
7
|
+
Header1: import("@tamagui/web").TamaguiComponent<import("./Typography").TypographyTextProps>;
|
|
8
|
+
Header2: import("@tamagui/web").TamaguiComponent<import("./Typography").TypographyTextProps>;
|
|
9
|
+
Header3: import("@tamagui/web").TamaguiComponent<import("./Typography").TypographyTextProps>;
|
|
10
|
+
Header4: import("@tamagui/web").TamaguiComponent<import("./Typography").TypographyTextProps>;
|
|
11
|
+
Header5: import("@tamagui/web").TamaguiComponent<import("./Typography").TypographyTextProps>;
|
|
12
|
+
Header6: import("@tamagui/web").TamaguiComponent<import("./Typography").TypographyTextProps>;
|
|
13
|
+
Icon: typeof TypographyIcon;
|
|
14
|
+
Link: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiTextElement, import("@tamagui/core").RNTamaguiTextNonStyleProps & import("./Typography").TypographyTextProps, import("@tamagui/web").TextStylePropsBase, {
|
|
15
|
+
disabled?: boolean | undefined;
|
|
16
|
+
variant?: "heading-2xl" | "heading-xl" | "heading-l" | "heading-m" | "heading-s" | "heading-xs" | "heading-2xs" | "body-xl" | "body-l" | "body-m" | "body-s" | "body-xs" | "label-xl" | "label-l" | "label-m" | "label-s" | "content-caps-3xl" | "content-caps-2xl" | "content-caps-xl" | "content-caps-l" | "content-caps-m" | "content-caps-s" | "content-caps-xs" | undefined;
|
|
17
|
+
weight?: "bold" | "semibold" | "regular" | undefined;
|
|
18
|
+
noUnderline?: boolean | undefined;
|
|
19
|
+
}, import("@tamagui/web").StaticConfigPublic>;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/system/content/typography/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;CAUtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../../../../../src/system/core/themes/light/light.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAGvC,eAAO,MAAM,KAAK,EAAE,KA6DnB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface Theme extends Record<(typeof SEMANTIC_TOKENS_CONTENT | typeof SEMANTIC_TOKENS_BACKGROUND | typeof SEMANTIC_TOKENS_BORDER)[number], string> {
|
|
2
|
+
}
|
|
3
|
+
export declare const SEMANTIC_TOKENS_CONTENT: readonly ["content.base.low", "content.base.mid", "content.base.hi", "content.base.onContrasted.low", "content.base.onContrasted.mid", "content.base.onContrasted.hi", "content.accent", "content.promo", "content.promo.onContrasted", "content.info", "content.success", "content.warning", "content.danger", "content.muted", "content.disabled", "content.disabled.onContrasted"];
|
|
4
|
+
export declare const SEMANTIC_TOKENS_BACKGROUND: readonly ["bg.base.low.default", "bg.base.low.pressed", "bg.base.mid.default", "bg.base.mid.pressed", "bg.base.hi.default", "bg.base.hi.pressed", "bg.accent.default", "bg.accent.pressed", "bg.promo.mid.default", "bg.promo.mid.pressed", "bg.promo.hi.default", "bg.promo.hi.pressed", "bg.highlight.mid.default", "bg.highlight.mid.pressed", "bg.highlight.hi.default", "bg.highlight.hi.pressed", "bg.info.mid", "bg.info.hi", "bg.success.mid", "bg.success.hi", "bg.warning.mid", "bg.warning.hi", "bg.danger.mid", "bg.danger.hi", "bg.disabled.mid", "bg.disabled.hi", "bg.overlay"];
|
|
5
|
+
export declare const SEMANTIC_TOKENS_BORDER: readonly ["border.base.low", "border.base.mid", "border.base.hi", "border.base.onContrasted.mid", "border.base.onContrasted.hi", "border.base.accent", "border.info", "border.success", "border.warning", "border.danger", "border.disabled", "border.highlight"];
|
|
6
|
+
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../../../../src/system/core/themes/themes.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KACf,SAAQ,MAAM,CACZ,CAAC,OAAO,uBAAuB,GAAG,OAAO,0BAA0B,GAAG,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,EAC5G,MAAM,CACP;CAAG;AAEN,eAAO,MAAM,uBAAuB,uXAiB1B,CAAC;AAEX,eAAO,MAAM,0BAA0B,gkBA4B7B,CAAC;AAEX,eAAO,MAAM,sBAAsB,mQAazB,CAAC"}
|
|
@@ -84,63 +84,7 @@ export declare const config: import("@tamagui/core").TamaguiInternalConfig<{
|
|
|
84
84
|
"radius.circle": import("@tamagui/core").Variable<number>;
|
|
85
85
|
};
|
|
86
86
|
}, "color" | "space" | "size" | "radius" | "zIndex">, {
|
|
87
|
-
light:
|
|
88
|
-
'content.base.low': string;
|
|
89
|
-
'content.base.mid': string;
|
|
90
|
-
'content.base.hi': string;
|
|
91
|
-
'content.base.onContrasted.low': string;
|
|
92
|
-
'content.base.onContrasted.mid': string;
|
|
93
|
-
'content.base.onContrasted.hi': string;
|
|
94
|
-
'content.accent': string;
|
|
95
|
-
'content.promo': string;
|
|
96
|
-
'content.promo.onContrasted': string;
|
|
97
|
-
'content.info': string;
|
|
98
|
-
'content.success': string;
|
|
99
|
-
'content.warning': string;
|
|
100
|
-
'content.danger': string;
|
|
101
|
-
'content.muted': string;
|
|
102
|
-
'content.disabled': string;
|
|
103
|
-
'content.disabled.onContrasted': string;
|
|
104
|
-
'bg.base.low.default': string;
|
|
105
|
-
'bg.base.low.pressed': string;
|
|
106
|
-
'bg.base.mid.default': string;
|
|
107
|
-
'bg.base.mid.pressed': string;
|
|
108
|
-
'bg.base.hi.default': string;
|
|
109
|
-
'bg.base.hi.pressed': string;
|
|
110
|
-
'bg.accent.default': string;
|
|
111
|
-
'bg.accent.pressed': string;
|
|
112
|
-
'bg.promo.mid.default': string;
|
|
113
|
-
'bg.promo.mid.pressed': string;
|
|
114
|
-
'bg.promo.hi.default': string;
|
|
115
|
-
'bg.promo.hi.pressed': string;
|
|
116
|
-
'bg.highlight.mid.default': string;
|
|
117
|
-
'bg.highlight.mid.pressed': string;
|
|
118
|
-
'bg.highlight.hi.default': string;
|
|
119
|
-
'bg.highlight.hi.pressed': string;
|
|
120
|
-
'bg.info.mid': string;
|
|
121
|
-
'bg.info.hi': string;
|
|
122
|
-
'bg.success.mid': string;
|
|
123
|
-
'bg.success.hi': string;
|
|
124
|
-
'bg.warning.mid': string;
|
|
125
|
-
'bg.warning.hi': string;
|
|
126
|
-
'bg.danger.mid': string;
|
|
127
|
-
'bg.danger.hi': string;
|
|
128
|
-
'bg.disabled.mid': string;
|
|
129
|
-
'bg.disabled.hi': string;
|
|
130
|
-
'bg.overlay': string;
|
|
131
|
-
'border.base.low': string;
|
|
132
|
-
'border.base.mid': string;
|
|
133
|
-
'border.base.hi': string;
|
|
134
|
-
'border.base.onContrasted.mid': string;
|
|
135
|
-
'border.base.onContrasted.hi': string;
|
|
136
|
-
'border.base.accent': string;
|
|
137
|
-
'border.info': string;
|
|
138
|
-
'border.success': string;
|
|
139
|
-
'border.warning': string;
|
|
140
|
-
'border.danger': string;
|
|
141
|
-
'border.disabled': string;
|
|
142
|
-
'border.highlight': string;
|
|
143
|
-
};
|
|
87
|
+
light: import("./system/core/themes/themes").Theme;
|
|
144
88
|
}, {}, {
|
|
145
89
|
base: {
|
|
146
90
|
minWidth: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tamagui.config.d.ts","sourceRoot":"","sources":["../../src/tamagui.config.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,KAAK;;;;;;;CAOhB,CAAC;AASH,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"tamagui.config.d.ts","sourceRoot":"","sources":["../../src/tamagui.config.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,KAAK;;;;;;;CAOhB,CAAC;AASH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBjB,CAAC;AAEH,KAAK,IAAI,GAAG,OAAO,MAAM,CAAC;AAG1B,OAAO,QAAQ,eAAe,CAAC;IAC7B,UAAU,mBAAoB,SAAQ,IAAI;KAAG;CAC9C"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { makeDecorator } from '@storybook/preview-api';
|
|
2
|
-
import { createFont, createTokens, createTamagui, TamaguiProvider, styled, View, Stack,
|
|
2
|
+
import { createFont, createTokens, createTamagui, TamaguiProvider, styled, View, Stack, Text, useStyle, useMedia } from '@tamagui/core';
|
|
3
3
|
export { Stack, View } from '@tamagui/core';
|
|
4
4
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
7
|
-
import {
|
|
7
|
+
import { createContext, useContext, cloneElement, useMemo } from 'react';
|
|
8
8
|
export { Image } from '@tamagui/image';
|
|
9
9
|
export { ScrollView } from '@tamagui/scroll-view';
|
|
10
10
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
@@ -118,7 +118,6 @@ const deepPurpleColorPalette = _objectSpread(_objectSpread({}, transformColorSca
|
|
|
118
118
|
});
|
|
119
119
|
|
|
120
120
|
// WARNING
|
|
121
|
-
|
|
122
121
|
// https://github.com/ornikar/kitt/blob/79e367e962c957c016c4df67dbcf515c8f45ff0e/@ornikar/kitt-universal/src/themes/late-ocean/colors.ts#L28
|
|
123
122
|
const light = {
|
|
124
123
|
// content
|
|
@@ -433,107 +432,6 @@ const VStack = styled(Stack, {
|
|
|
433
432
|
flexDirection: 'column'
|
|
434
433
|
});
|
|
435
434
|
|
|
436
|
-
const IconContainer = styled(View, {
|
|
437
|
-
name: 'Icon',
|
|
438
|
-
variants: {
|
|
439
|
-
size: {
|
|
440
|
-
'...size': (size, {
|
|
441
|
-
tokens
|
|
442
|
-
}) => {
|
|
443
|
-
return {
|
|
444
|
-
width: tokens.size[size],
|
|
445
|
-
height: tokens.size[size]
|
|
446
|
-
};
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
});
|
|
451
|
-
function Icon({
|
|
452
|
-
icon,
|
|
453
|
-
color = '$content.base.hi',
|
|
454
|
-
size = '$size.20',
|
|
455
|
-
testID,
|
|
456
|
-
alignSelf
|
|
457
|
-
}) {
|
|
458
|
-
const style = useStyle({
|
|
459
|
-
color
|
|
460
|
-
});
|
|
461
|
-
const clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
462
|
-
color: style.color
|
|
463
|
-
});
|
|
464
|
-
return /*#__PURE__*/jsx(IconContainer, {
|
|
465
|
-
size: size,
|
|
466
|
-
testID: testID,
|
|
467
|
-
alignSelf: alignSelf,
|
|
468
|
-
children: clonedIcon
|
|
469
|
-
});
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
const TypographyVariantContext = /*#__PURE__*/createContext(null);
|
|
473
|
-
const TypographyWeightContext = /*#__PURE__*/createContext(null);
|
|
474
|
-
const TypograhyColorContext = /*#__PURE__*/createContext(null);
|
|
475
|
-
const TypographyContext = /*#__PURE__*/createContext(false);
|
|
476
|
-
const useTypographyColor = () => {
|
|
477
|
-
return useContext(TypograhyColorContext);
|
|
478
|
-
};
|
|
479
|
-
const useTypographyVariant = () => {
|
|
480
|
-
return useContext(TypographyVariantContext);
|
|
481
|
-
};
|
|
482
|
-
const useTypographyWeight = () => {
|
|
483
|
-
return useContext(TypographyWeightContext);
|
|
484
|
-
};
|
|
485
|
-
const useTypographyContext = () => {
|
|
486
|
-
return useContext(TypographyContext);
|
|
487
|
-
};
|
|
488
|
-
|
|
489
|
-
const InternalTypographyView = styled(View, {
|
|
490
|
-
name: 'TypographyView'
|
|
491
|
-
});
|
|
492
|
-
/**
|
|
493
|
-
*
|
|
494
|
-
* A wrapper component that applies typography styles to its children in order to maintain consistent style between web and native
|
|
495
|
-
* In native, it simply renders a View as it renders correctly by default
|
|
496
|
-
* In web, it ensures that the display is set to inline-flex when inside a Typography context
|
|
497
|
-
*
|
|
498
|
-
* React Native Web includes this implementation in its codebase
|
|
499
|
-
* but Tamagui does not use React Native Webview, we need to implement it ourselves
|
|
500
|
-
*
|
|
501
|
-
* Inside a Typography component, always use TypographyView to wrap external components like Icon or Svg
|
|
502
|
-
*/
|
|
503
|
-
function TypographyView(props) {
|
|
504
|
-
const isInTypographyContext = useTypographyContext();
|
|
505
|
-
return /*#__PURE__*/jsx(InternalTypographyView, _objectSpread(_objectSpread({}, props), {}, {
|
|
506
|
-
"$platform-web": isInTypographyContext ? _objectSpread(_objectSpread({}, props['$platform-web']), {}, {
|
|
507
|
-
display: 'inline-flex'
|
|
508
|
-
}) : props['$platform-web']
|
|
509
|
-
}));
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
const _excluded = ["color"];
|
|
513
|
-
function TypographyIconInternal(props) {
|
|
514
|
-
return /*#__PURE__*/jsx(TypographyView, {
|
|
515
|
-
children: /*#__PURE__*/jsx(Icon, _objectSpread({}, props))
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
function TypographyIconInheritColor(props) {
|
|
519
|
-
const typographyColorAncestorValue = useTypographyColor();
|
|
520
|
-
return /*#__PURE__*/jsx(TypographyIconInternal, _objectSpread({
|
|
521
|
-
color: typographyColorAncestorValue || undefined
|
|
522
|
-
}, props));
|
|
523
|
-
}
|
|
524
|
-
function TypographyIcon(_ref) {
|
|
525
|
-
let {
|
|
526
|
-
color
|
|
527
|
-
} = _ref,
|
|
528
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
529
|
-
if (color) {
|
|
530
|
-
return /*#__PURE__*/jsx(TypographyIconInternal, _objectSpread({
|
|
531
|
-
color: color
|
|
532
|
-
}, props));
|
|
533
|
-
}
|
|
534
|
-
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread({}, props));
|
|
535
|
-
}
|
|
536
|
-
|
|
537
435
|
function getVariantAndWeightValues(weightProp, variantProp, typographyWeightAncestorValue, typographyVariantAncestorValue) {
|
|
538
436
|
const computedVariant = variantProp || typographyVariantAncestorValue || undefined;
|
|
539
437
|
if (computedVariant) {
|
|
@@ -572,6 +470,23 @@ function getVariantAndWeightValues(weightProp, variantProp, typographyWeightAnce
|
|
|
572
470
|
};
|
|
573
471
|
}
|
|
574
472
|
|
|
473
|
+
const TypographyVariantContext = /*#__PURE__*/createContext(null);
|
|
474
|
+
const TypographyWeightContext = /*#__PURE__*/createContext(null);
|
|
475
|
+
const TypograhyColorContext = /*#__PURE__*/createContext(null);
|
|
476
|
+
const TypographyContext = /*#__PURE__*/createContext(false);
|
|
477
|
+
const useTypographyColor = () => {
|
|
478
|
+
return useContext(TypograhyColorContext);
|
|
479
|
+
};
|
|
480
|
+
const useTypographyVariant = () => {
|
|
481
|
+
return useContext(TypographyVariantContext);
|
|
482
|
+
};
|
|
483
|
+
const useTypographyWeight = () => {
|
|
484
|
+
return useContext(TypographyWeightContext);
|
|
485
|
+
};
|
|
486
|
+
const useTypographyContext = () => {
|
|
487
|
+
return useContext(TypographyContext);
|
|
488
|
+
};
|
|
489
|
+
|
|
575
490
|
const InternalTypography = styled(Text, {
|
|
576
491
|
fontFamily: '$GTStandard',
|
|
577
492
|
color: '$content.base.hi',
|
|
@@ -658,6 +573,124 @@ const createHeading = level => {
|
|
|
658
573
|
}));
|
|
659
574
|
});
|
|
660
575
|
};
|
|
576
|
+
|
|
577
|
+
const IconContainer = styled(View, {
|
|
578
|
+
name: 'Icon',
|
|
579
|
+
variants: {
|
|
580
|
+
size: {
|
|
581
|
+
'...size': (size, {
|
|
582
|
+
tokens
|
|
583
|
+
}) => {
|
|
584
|
+
return {
|
|
585
|
+
width: tokens.size[size],
|
|
586
|
+
height: tokens.size[size]
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
function Icon({
|
|
593
|
+
icon,
|
|
594
|
+
color = '$content.base.hi',
|
|
595
|
+
size = '$size.20',
|
|
596
|
+
testID,
|
|
597
|
+
alignSelf
|
|
598
|
+
}) {
|
|
599
|
+
const style = useStyle({
|
|
600
|
+
color
|
|
601
|
+
});
|
|
602
|
+
const clonedIcon = /*#__PURE__*/cloneElement(icon, {
|
|
603
|
+
color: style.color
|
|
604
|
+
});
|
|
605
|
+
return /*#__PURE__*/jsx(IconContainer, {
|
|
606
|
+
size: size,
|
|
607
|
+
testID: testID,
|
|
608
|
+
alignSelf: alignSelf,
|
|
609
|
+
children: clonedIcon
|
|
610
|
+
});
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
const InternalTypographyView = styled(View, {
|
|
614
|
+
name: 'TypographyView'
|
|
615
|
+
});
|
|
616
|
+
/**
|
|
617
|
+
*
|
|
618
|
+
* A wrapper component that applies typography styles to its children in order to maintain consistent style between web and native
|
|
619
|
+
* In native, it simply renders a View as it renders correctly by default
|
|
620
|
+
* In web, it ensures that the display is set to inline-flex when inside a Typography context
|
|
621
|
+
*
|
|
622
|
+
* React Native Web includes this implementation in its codebase
|
|
623
|
+
* but Tamagui does not use React Native Webview, we need to implement it ourselves
|
|
624
|
+
*
|
|
625
|
+
* Inside a Typography component, always use TypographyView to wrap external components like Icon or Svg
|
|
626
|
+
*/
|
|
627
|
+
function TypographyView(props) {
|
|
628
|
+
const isInTypographyContext = useTypographyContext();
|
|
629
|
+
return /*#__PURE__*/jsx(InternalTypographyView, _objectSpread(_objectSpread({}, props), {}, {
|
|
630
|
+
"$platform-web": isInTypographyContext ? _objectSpread(_objectSpread({}, props['$platform-web']), {}, {
|
|
631
|
+
display: 'inline-flex'
|
|
632
|
+
}) : props['$platform-web']
|
|
633
|
+
}));
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
const _excluded = ["color"];
|
|
637
|
+
function TypographyIconInternal(props) {
|
|
638
|
+
return /*#__PURE__*/jsx(TypographyView, {
|
|
639
|
+
children: /*#__PURE__*/jsx(Icon, _objectSpread({}, props))
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
function TypographyIconInheritColor(props) {
|
|
643
|
+
const typographyColorAncestorValue = useTypographyColor();
|
|
644
|
+
return /*#__PURE__*/jsx(TypographyIconInternal, _objectSpread({
|
|
645
|
+
color: typographyColorAncestorValue || undefined
|
|
646
|
+
}, props));
|
|
647
|
+
}
|
|
648
|
+
function TypographyIcon(_ref) {
|
|
649
|
+
let {
|
|
650
|
+
color
|
|
651
|
+
} = _ref,
|
|
652
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
653
|
+
if (color) {
|
|
654
|
+
return /*#__PURE__*/jsx(TypographyIconInternal, _objectSpread({
|
|
655
|
+
color: color
|
|
656
|
+
}, props));
|
|
657
|
+
}
|
|
658
|
+
return /*#__PURE__*/jsx(TypographyIconInheritColor, _objectSpread({}, props));
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
const TypographyLink = styled(TypographyBase, {
|
|
662
|
+
name: 'TypographyLink',
|
|
663
|
+
role: 'link',
|
|
664
|
+
variants: {
|
|
665
|
+
disabled: {
|
|
666
|
+
true: {
|
|
667
|
+
cursor: 'not-allowed',
|
|
668
|
+
onPress: undefined,
|
|
669
|
+
color: '$content.disabled',
|
|
670
|
+
hoverStyle: undefined
|
|
671
|
+
},
|
|
672
|
+
false: {
|
|
673
|
+
cursor: 'pointer',
|
|
674
|
+
hoverStyle: {
|
|
675
|
+
textDecorationLine: 'none'
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
},
|
|
679
|
+
noUnderline: {
|
|
680
|
+
true: {
|
|
681
|
+
textDecorationLine: 'none'
|
|
682
|
+
},
|
|
683
|
+
false: {
|
|
684
|
+
textDecorationLine: 'underline'
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
defaultVariants: {
|
|
689
|
+
disabled: false,
|
|
690
|
+
noUnderline: false
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
|
|
661
694
|
const Typography = {
|
|
662
695
|
Text: TypographyBase,
|
|
663
696
|
Header1: createHeading(1),
|
|
@@ -666,7 +699,8 @@ const Typography = {
|
|
|
666
699
|
Header4: createHeading(4),
|
|
667
700
|
Header5: createHeading(5),
|
|
668
701
|
Header6: createHeading(6),
|
|
669
|
-
Icon: TypographyIcon
|
|
702
|
+
Icon: TypographyIcon,
|
|
703
|
+
Link: TypographyLink
|
|
670
704
|
};
|
|
671
705
|
|
|
672
706
|
function getValueForBreakpoint(breakpoint, {
|