@utilitywarehouse/hearth-react-native 0.19.1 → 0.21.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/.storybook/manager.ts +1 -0
- package/.storybook/preview.tsx +1 -0
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-lint.log +13 -13
- package/CHANGELOG.md +299 -4
- package/build/components/BodyText/BodyText.js +12 -5
- package/build/components/BodyText/BodyText.props.d.ts +5 -19
- package/build/components/Box/Box.js +23 -3
- package/build/components/Box/Box.props.d.ts +3 -95
- package/build/components/Card/Card.props.d.ts +2 -5
- package/build/components/Container/Container.props.d.ts +2 -78
- package/build/components/DateInput/DateInput.d.ts +1 -1
- package/build/components/DateInput/DateInput.js +2 -2
- package/build/components/DateInput/DateInput.props.d.ts +15 -1
- package/build/components/DateInput/DateInputSegment.d.ts +1 -1
- package/build/components/DateInput/DateInputSegment.js +2 -2
- package/build/components/DetailText/DetailText.js +14 -13
- package/build/components/DetailText/DetailText.props.d.ts +4 -17
- package/build/components/Flex/Flex.js +3 -1
- package/build/components/Flex/Flex.props.d.ts +2 -2
- package/build/components/Heading/Heading.js +34 -13
- package/build/components/Heading/Heading.props.d.ts +4 -18
- package/build/components/Select/Select.d.ts +1 -1
- package/build/components/Select/Select.js +9 -10
- package/build/components/Select/Select.props.d.ts +16 -0
- package/build/core/themes.d.ts +188 -8
- package/build/core/themes.js +18 -2
- package/build/hooks/useStyleProps.js +22 -5
- package/build/tokens/color.d.ts +4 -0
- package/build/tokens/color.js +2 -0
- package/build/tokens/components/dark/modal.d.ts +6 -0
- package/build/tokens/components/dark/modal.js +6 -0
- package/build/tokens/components/dark/navigation.d.ts +1 -0
- package/build/tokens/components/dark/navigation.js +1 -0
- package/build/tokens/components/light/modal.d.ts +6 -0
- package/build/tokens/components/light/modal.js +6 -0
- package/build/tokens/components/light/navigation.d.ts +1 -0
- package/build/tokens/components/light/navigation.js +1 -0
- package/build/tokens/components/light/skeleton.d.ts +1 -1
- package/build/tokens/components/light/skeleton.js +1 -1
- package/build/tokens/font.d.ts +2 -0
- package/build/tokens/font.js +2 -0
- package/build/tokens/line-height.d.ts +2 -0
- package/build/tokens/line-height.js +2 -0
- package/build/tokens/primitive.d.ts +4 -0
- package/build/tokens/primitive.js +4 -0
- package/build/tokens/semantic-dark.d.ts +1 -0
- package/build/tokens/semantic-dark.js +1 -0
- package/build/tokens/semantic-light.d.ts +1 -0
- package/build/tokens/semantic-light.js +1 -0
- package/build/tokens/typography.d.ts +30 -0
- package/build/tokens/typography.js +15 -0
- package/build/types/index.d.ts +4 -2
- package/build/types/index.js +4 -2
- package/build/types/semanticColorValues.d.ts +22 -0
- package/build/types/semanticColorValues.js +1 -0
- package/build/types/utilityProps.d.ts +326 -0
- package/build/types/utilityProps.js +1 -0
- package/build/types/values.d.ts +4 -3
- package/build/utils/coloursAsArray.d.ts +4 -0
- package/build/utils/coloursAsArray.js +5 -0
- package/build/utils/index.d.ts +1 -1
- package/build/utils/index.js +1 -1
- package/build/utils/styleUtils.d.ts +26 -2
- package/build/utils/styleUtils.js +42 -13
- package/build/utils/themeValueHelpers.d.ts +13 -0
- package/build/utils/themeValueHelpers.js +29 -0
- package/docs/changelog.mdx +74 -2
- package/docs/components/AllComponents.web.tsx +23 -24
- package/docs/components/UsageWrap.tsx +2 -2
- package/docs/introduction.mdx +0 -7
- package/package.json +5 -3
- package/src/components/BodyText/BodyText.props.ts +5 -19
- package/src/components/BodyText/BodyText.stories.tsx +2 -1
- package/src/components/BodyText/BodyText.tsx +17 -6
- package/src/components/Box/Box.docs.mdx +5 -4
- package/src/components/Box/Box.props.ts +3 -231
- package/src/components/Box/Box.stories.tsx +2 -2
- package/src/components/Box/Box.tsx +38 -9
- package/src/components/Button/Button.docs.mdx +46 -1
- package/src/components/Card/Card.docs.mdx +1 -1
- package/src/components/Card/Card.props.ts +2 -5
- package/src/components/Card/Card.stories.tsx +54 -23
- package/src/components/Carousel/Carousel.docs.mdx +49 -44
- package/src/components/Center/Center.docs.mdx +6 -4
- package/src/components/Checkbox/CheckboxGroup.figma.tsx +21 -1
- package/src/components/Container/Container.docs.mdx +13 -8
- package/src/components/Container/Container.props.ts +9 -80
- package/src/components/Container/Container.stories.tsx +81 -65
- package/src/components/DateInput/DateInput.docs.mdx +43 -0
- package/src/components/DateInput/DateInput.props.ts +15 -1
- package/src/components/DateInput/DateInput.stories.tsx +37 -2
- package/src/components/DateInput/DateInput.tsx +6 -0
- package/src/components/DateInput/DateInputSegment.tsx +2 -0
- package/src/components/DetailText/DetailText.props.ts +4 -17
- package/src/components/DetailText/DetailText.stories.tsx +2 -3
- package/src/components/DetailText/DetailText.tsx +16 -17
- package/src/components/Flex/Flex.props.ts +2 -2
- package/src/components/Flex/Flex.stories.tsx +1 -1
- package/src/components/Flex/Flex.tsx +4 -1
- package/src/components/Grid/Grid.docs.mdx +53 -49
- package/src/components/Heading/Heading.props.ts +4 -18
- package/src/components/Heading/Heading.stories.tsx +2 -1
- package/src/components/Heading/Heading.tsx +40 -18
- package/src/components/PillGroup/Pill.figma.tsx +4 -17
- package/src/components/PillGroup/PillGroup.figma.tsx +8 -9
- package/src/components/ProgressStepper/ProgressStep.figma.tsx +4 -15
- package/src/components/ProgressStepper/ProgressStepper.figma.tsx +9 -16
- package/src/components/Radio/Radio.figma.tsx +35 -22
- package/src/components/Radio/RadioGroup.figma.tsx +69 -41
- package/src/components/Radio/RadioTile.figma.tsx +34 -0
- package/src/components/RadioCard/RadioCard.figma.tsx +24 -0
- package/src/components/SectionHeader/SectionHeader.figma.tsx +31 -25
- package/src/components/Select/Select.docs.mdx +76 -28
- package/src/components/Select/Select.figma.tsx +44 -43
- package/src/components/Select/Select.props.ts +16 -0
- package/src/components/Select/Select.tsx +42 -35
- package/src/components/Select/SelectOption.figma.tsx +3 -21
- package/src/components/Spinner/Spinner.figma.tsx +12 -25
- package/src/components/Switch/Switch.figma.tsx +2 -23
- package/src/components/Tabs/Tab.figma.tsx +21 -0
- package/src/components/Tabs/Tabs.figma.tsx +18 -27
- package/src/components/Textarea/Textarea.figma.tsx +64 -0
- package/src/components/Toast/ToastItem.figma.tsx +1 -8
- package/src/components/ToggleButtonCard/ToggleButtonCard.figma.tsx +24 -0
- package/src/components/VerificationInput/VerificationInput.figma.tsx +53 -0
- package/src/core/themes.ts +19 -2
- package/src/hooks/useStyleProps.ts +40 -5
- package/src/tokens/color.ts +2 -0
- package/src/tokens/components/dark/modal.ts +6 -0
- package/src/tokens/components/dark/navigation.ts +1 -0
- package/src/tokens/components/light/modal.ts +6 -0
- package/src/tokens/components/light/navigation.ts +1 -0
- package/src/tokens/components/light/skeleton.ts +1 -1
- package/src/tokens/font.ts +2 -0
- package/src/tokens/line-height.ts +2 -0
- package/src/tokens/primitive.ts +4 -0
- package/src/tokens/semantic-dark.ts +1 -0
- package/src/tokens/semantic-light.ts +1 -0
- package/src/tokens/typography.ts +15 -0
- package/src/types/index.ts +4 -2
- package/src/types/semanticColorValues.ts +26 -0
- package/src/types/utilityProps.ts +410 -0
- package/src/types/values.ts +4 -7
- package/src/utils/coloursAsArray.ts +6 -0
- package/src/utils/index.ts +8 -1
- package/src/utils/styleUtils.ts +45 -14
- package/src/utils/themeValueHelpers.ts +38 -0
- package/src/components/Radio/RadioTileRoot.figma.tsx +0 -31
|
@@ -1,29 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Tabs from
|
|
3
|
-
import figma from "@figma/code-connect"
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import { TabPanel, Tabs, TabsList } from '../';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
figma.connect(
|
|
13
|
-
Tabs,
|
|
14
|
-
"https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=6464%3A8744",
|
|
15
|
-
{
|
|
16
|
-
props: {
|
|
17
|
-
// These props were automatically mapped based on your linked code:
|
|
18
|
-
size: figma.enum("Size", {
|
|
19
|
-
"MD-56": "md",
|
|
20
|
-
"LG-64": "lg",
|
|
21
|
-
}),
|
|
22
|
-
// No matching props could be found for these Figma properties:
|
|
23
|
-
// "arrowLeft": figma.boolean('Arrow left?'),
|
|
24
|
-
// "arrowRight": figma.boolean('Arrow right?'),
|
|
25
|
-
// "condensed": figma.boolean('Condensed?')
|
|
26
|
-
},
|
|
27
|
-
example: (props) => <Tabs size={props.size} />,
|
|
4
|
+
figma.connect(Tabs, 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=6464%3A8744', {
|
|
5
|
+
props: {
|
|
6
|
+
size: figma.enum('Size', {
|
|
7
|
+
'LG-64': 'lg',
|
|
8
|
+
}),
|
|
9
|
+
tabs: figma.children('Tab item'),
|
|
28
10
|
},
|
|
29
|
-
|
|
11
|
+
example: props => (
|
|
12
|
+
<Tabs size={props.size}>
|
|
13
|
+
<TabsList>{props.tabs}</TabsList>
|
|
14
|
+
{/* Example TabPanel content, make sure they match the value of your Tab items */}
|
|
15
|
+
<TabPanel value="account">Account content</TabPanel>
|
|
16
|
+
<TabPanel value="billing">Billing content</TabPanel>
|
|
17
|
+
<TabPanel value="usage">Usage content</TabPanel>
|
|
18
|
+
</Tabs>
|
|
19
|
+
),
|
|
20
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import { Textarea } from '..';
|
|
3
|
+
|
|
4
|
+
const props = {
|
|
5
|
+
disabled: figma.enum('State', {
|
|
6
|
+
Disabled: true,
|
|
7
|
+
}),
|
|
8
|
+
readonly: figma.enum('State', {
|
|
9
|
+
'Read-only': true,
|
|
10
|
+
}),
|
|
11
|
+
placeholder: figma.enum('Value type', {
|
|
12
|
+
Placeholder: figma.string('Value'),
|
|
13
|
+
}),
|
|
14
|
+
value: figma.enum('Value type', {
|
|
15
|
+
Filled: figma.string('Value'),
|
|
16
|
+
}),
|
|
17
|
+
label: figma.string('Label'),
|
|
18
|
+
labelVariant: figma.enum('Label variant', {
|
|
19
|
+
Body: 'body',
|
|
20
|
+
Heading: 'heading',
|
|
21
|
+
}),
|
|
22
|
+
helperText: figma.boolean('Helper text?', {
|
|
23
|
+
true: figma.string('Helper text'),
|
|
24
|
+
}),
|
|
25
|
+
validationStatus: figma.enum('State', {
|
|
26
|
+
Invalid: 'invalid',
|
|
27
|
+
Valid: 'valid',
|
|
28
|
+
}),
|
|
29
|
+
invalidText: figma.enum('State', {
|
|
30
|
+
Invalid: figma.string('Validation'),
|
|
31
|
+
}),
|
|
32
|
+
validText: figma.enum('State', {
|
|
33
|
+
Valid: figma.string('Validation'),
|
|
34
|
+
}),
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
figma.connect(
|
|
38
|
+
Textarea,
|
|
39
|
+
'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=2356-5180&m=dev',
|
|
40
|
+
{
|
|
41
|
+
props: {
|
|
42
|
+
...props,
|
|
43
|
+
required: figma.boolean('Optional?', {
|
|
44
|
+
true: false,
|
|
45
|
+
false: true,
|
|
46
|
+
}),
|
|
47
|
+
},
|
|
48
|
+
example: props => (
|
|
49
|
+
<Textarea
|
|
50
|
+
disabled={props.disabled}
|
|
51
|
+
readonly={props.readonly}
|
|
52
|
+
placeholder={props.placeholder}
|
|
53
|
+
value={props.value}
|
|
54
|
+
label={props.label}
|
|
55
|
+
labelVariant={props.labelVariant}
|
|
56
|
+
helperText={props.helperText}
|
|
57
|
+
required={props.required}
|
|
58
|
+
validationStatus={props.validationStatus}
|
|
59
|
+
invalidText={props.invalidText}
|
|
60
|
+
validText={props.validText}
|
|
61
|
+
/>
|
|
62
|
+
),
|
|
63
|
+
}
|
|
64
|
+
);
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import figma from '@figma/code-connect';
|
|
2
2
|
import ToastItem from './ToastItem';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* -- This file was auto-generated by Code Connect --
|
|
6
|
-
* None of your props could be automatically mapped to Figma properties.
|
|
7
|
-
* You should update the `props` object to include a mapping from your
|
|
8
|
-
* code props to Figma properties, and update the `example` function to
|
|
9
|
-
* return the code example you'd like to see in Figma
|
|
10
|
-
*/
|
|
11
4
|
|
|
12
5
|
figma.connect(ToastItem, 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=7072%3A913', {
|
|
13
6
|
props: {
|
|
@@ -18,5 +11,5 @@ figma.connect(ToastItem, 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?no
|
|
|
18
11
|
// "icon24": figma.instance('Icon-24'),
|
|
19
12
|
// "dismiss": figma.boolean('Dismiss?')
|
|
20
13
|
},
|
|
21
|
-
example: props => <ToastItem
|
|
14
|
+
example: props => <ToastItem />,
|
|
22
15
|
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import { ToggleButtonCard } from '../';
|
|
3
|
+
|
|
4
|
+
figma.connect(
|
|
5
|
+
ToggleButtonCard,
|
|
6
|
+
'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=2164-727&t=Uq6QfQcygdNGv5lM-4',
|
|
7
|
+
{
|
|
8
|
+
variant: {
|
|
9
|
+
Variant: 'Toggle Button',
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
radio: figma.nestedProps('Radio', {
|
|
13
|
+
label: figma.string('Label'),
|
|
14
|
+
}),
|
|
15
|
+
content: figma.instance('Content'),
|
|
16
|
+
},
|
|
17
|
+
example: props => (
|
|
18
|
+
// This should be wrapped in a ToggleButtonCardGroup, see docs
|
|
19
|
+
<ToggleButtonCard label={props.radio.label} value="someValue">
|
|
20
|
+
{props.content}
|
|
21
|
+
</ToggleButtonCard>
|
|
22
|
+
),
|
|
23
|
+
}
|
|
24
|
+
);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import { VerificationInput } from '..';
|
|
3
|
+
|
|
4
|
+
const props = {
|
|
5
|
+
disabled: figma.enum('State', {
|
|
6
|
+
Disabled: true,
|
|
7
|
+
}),
|
|
8
|
+
placeholder: figma.enum('Value type', {
|
|
9
|
+
Placeholder: figma.string('Value'),
|
|
10
|
+
}),
|
|
11
|
+
value: figma.enum('Value type', {
|
|
12
|
+
Filled: figma.string('Value 1'),
|
|
13
|
+
}),
|
|
14
|
+
label: figma.string('Label'),
|
|
15
|
+
labelVariant: figma.enum('Label variant', {
|
|
16
|
+
Body: 'body',
|
|
17
|
+
Heading: 'heading',
|
|
18
|
+
}),
|
|
19
|
+
helperText: figma.boolean('Helper text?', {
|
|
20
|
+
true: figma.string('Helper text'),
|
|
21
|
+
}),
|
|
22
|
+
validationStatus: figma.enum('State', {
|
|
23
|
+
Invalid: 'invalid',
|
|
24
|
+
Valid: 'valid',
|
|
25
|
+
}),
|
|
26
|
+
invalidText: figma.enum('State', {
|
|
27
|
+
Invalid: figma.string('Validation'),
|
|
28
|
+
}),
|
|
29
|
+
validText: figma.enum('State', {
|
|
30
|
+
Valid: figma.string('Validation'),
|
|
31
|
+
}),
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
figma.connect(
|
|
35
|
+
VerificationInput,
|
|
36
|
+
'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=4049-3615&m=dev',
|
|
37
|
+
{
|
|
38
|
+
props,
|
|
39
|
+
example: props => (
|
|
40
|
+
<VerificationInput
|
|
41
|
+
disabled={props.disabled}
|
|
42
|
+
placeholder={props.placeholder}
|
|
43
|
+
value={props.value}
|
|
44
|
+
label={props.label}
|
|
45
|
+
labelVariant={props.labelVariant}
|
|
46
|
+
helperText={props.helperText}
|
|
47
|
+
validationStatus={props.validationStatus}
|
|
48
|
+
invalidText={props.invalidText}
|
|
49
|
+
validText={props.validText}
|
|
50
|
+
/>
|
|
51
|
+
),
|
|
52
|
+
}
|
|
53
|
+
);
|
package/src/core/themes.ts
CHANGED
|
@@ -306,9 +306,18 @@ export const lightTheme = {
|
|
|
306
306
|
white: '#ffffff',
|
|
307
307
|
black: '#000000',
|
|
308
308
|
} as const,
|
|
309
|
+
|
|
309
310
|
components: components.light,
|
|
310
311
|
...shared,
|
|
311
|
-
helpers:
|
|
312
|
+
helpers: {
|
|
313
|
+
...lightHelpers /** Simplified semantic color tokens grouped by category */,
|
|
314
|
+
semanticColor: {
|
|
315
|
+
background: light.background,
|
|
316
|
+
border: light.border,
|
|
317
|
+
text: light.text,
|
|
318
|
+
icon: light.icon,
|
|
319
|
+
},
|
|
320
|
+
},
|
|
312
321
|
} as const;
|
|
313
322
|
|
|
314
323
|
const darkHelpers = {
|
|
@@ -364,7 +373,15 @@ export const darkTheme = {
|
|
|
364
373
|
},
|
|
365
374
|
components: components.dark,
|
|
366
375
|
...shared,
|
|
367
|
-
helpers:
|
|
376
|
+
helpers: {
|
|
377
|
+
...darkHelpers /** Simplified semantic color tokens grouped by category */,
|
|
378
|
+
semanticColor: {
|
|
379
|
+
background: dark.background,
|
|
380
|
+
border: dark.border,
|
|
381
|
+
text: dark.text,
|
|
382
|
+
icon: dark.icon,
|
|
383
|
+
},
|
|
384
|
+
},
|
|
368
385
|
} as const;
|
|
369
386
|
|
|
370
387
|
export const themes = {
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
propStyleMapping,
|
|
5
|
+
resolveThemeKey,
|
|
6
|
+
resolveThemeValueWithFallback,
|
|
7
|
+
semanticPropMapping,
|
|
8
|
+
themeStyleFallbackMapping,
|
|
9
|
+
themeStyleMapping,
|
|
10
|
+
viewStyleProps,
|
|
11
|
+
} from '../utils';
|
|
4
12
|
import useTheme from './useTheme';
|
|
5
13
|
|
|
6
14
|
/**
|
|
@@ -28,8 +36,23 @@ export const useStyleProps = (props: Record<string, any>): StylePropsResult => {
|
|
|
28
36
|
Object.entries(props).forEach(([propName, propValue]) => {
|
|
29
37
|
if (propValue === undefined) return;
|
|
30
38
|
|
|
39
|
+
// Check for semantic prop mappings first (e.g., iconColor, color)
|
|
40
|
+
const semanticMapping = semanticPropMapping[propName];
|
|
41
|
+
if (semanticMapping) {
|
|
42
|
+
const { styleProp, themeKey } = semanticMapping;
|
|
43
|
+
const themeMapping = resolveThemeKey(theme, themeKey);
|
|
44
|
+
const fallbackKey = themeStyleFallbackMapping[themeKey];
|
|
45
|
+
const fallbackMapping = fallbackKey ? resolveThemeKey(theme, fallbackKey) : undefined;
|
|
46
|
+
|
|
47
|
+
computedStyles[styleProp] = resolveThemeValueWithFallback(
|
|
48
|
+
propValue,
|
|
49
|
+
themeMapping,
|
|
50
|
+
fallbackMapping
|
|
51
|
+
);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
31
55
|
let stylePropName: keyof ViewStyle | undefined;
|
|
32
|
-
let themeKey: keyof typeof theme | undefined;
|
|
33
56
|
|
|
34
57
|
// Handle shorthand props
|
|
35
58
|
if (propStyleMapping[propName]) {
|
|
@@ -42,10 +65,22 @@ export const useStyleProps = (props: Record<string, any>): StylePropsResult => {
|
|
|
42
65
|
|
|
43
66
|
if (stylePropName) {
|
|
44
67
|
// Resolve theme value if needed
|
|
45
|
-
themeKey = themeStyleMapping[stylePropName
|
|
68
|
+
const themeKey = themeStyleMapping[stylePropName as string];
|
|
69
|
+
|
|
70
|
+
if (themeKey) {
|
|
71
|
+
const themeObj = resolveThemeKey(theme, themeKey);
|
|
72
|
+
const fallbackKey = themeStyleFallbackMapping[themeKey];
|
|
73
|
+
const fallbackMapping = fallbackKey ? resolveThemeKey(theme, fallbackKey) : undefined;
|
|
46
74
|
|
|
47
|
-
|
|
48
|
-
|
|
75
|
+
if (themeObj) {
|
|
76
|
+
computedStyles[stylePropName] = resolveThemeValueWithFallback(
|
|
77
|
+
propValue,
|
|
78
|
+
themeObj,
|
|
79
|
+
fallbackMapping
|
|
80
|
+
);
|
|
81
|
+
} else {
|
|
82
|
+
computedStyles[stylePropName] = propValue;
|
|
83
|
+
}
|
|
49
84
|
} else {
|
|
50
85
|
computedStyles[stylePropName] = propValue;
|
|
51
86
|
}
|
package/src/tokens/color.ts
CHANGED
|
@@ -232,6 +232,7 @@ export const yellow = {
|
|
|
232
232
|
export const light = {
|
|
233
233
|
background: {
|
|
234
234
|
brand: '#7a42c8',
|
|
235
|
+
loading: '#f1efe4',
|
|
235
236
|
primary: '#fcfbf2',
|
|
236
237
|
secondary: '#ffffff',
|
|
237
238
|
},
|
|
@@ -480,6 +481,7 @@ export const light = {
|
|
|
480
481
|
export const dark = {
|
|
481
482
|
background: {
|
|
482
483
|
brand: '#7a42c8',
|
|
484
|
+
loading: '#30302c',
|
|
483
485
|
primary: '#191917',
|
|
484
486
|
secondary: '#232323',
|
|
485
487
|
},
|
package/src/tokens/font.ts
CHANGED
package/src/tokens/primitive.ts
CHANGED
|
@@ -33,7 +33,9 @@ export default {
|
|
|
33
33
|
'400': 30,
|
|
34
34
|
'500': 36,
|
|
35
35
|
'550': 40,
|
|
36
|
+
'575': 44,
|
|
36
37
|
'600': 48,
|
|
38
|
+
'650': 54,
|
|
37
39
|
'700': 60,
|
|
38
40
|
'800': 72,
|
|
39
41
|
'900': 96,
|
|
@@ -78,7 +80,9 @@ export default {
|
|
|
78
80
|
'800': 36,
|
|
79
81
|
'900': 40,
|
|
80
82
|
'950': 48,
|
|
83
|
+
'975': 52,
|
|
81
84
|
'1000': 56,
|
|
85
|
+
'1050': 62,
|
|
82
86
|
'1100': 72,
|
|
83
87
|
'1200': 90,
|
|
84
88
|
},
|
package/src/tokens/typography.ts
CHANGED
|
@@ -64,6 +64,11 @@ export const mobile = {
|
|
|
64
64
|
},
|
|
65
65
|
},
|
|
66
66
|
heading: {
|
|
67
|
+
'2xl': {
|
|
68
|
+
fontSize: 44,
|
|
69
|
+
fontWeight: 700,
|
|
70
|
+
lineHeight: 52,
|
|
71
|
+
},
|
|
67
72
|
fontFamily: 'Comic Hams',
|
|
68
73
|
lg: {
|
|
69
74
|
fontSize: 24,
|
|
@@ -151,6 +156,11 @@ export const tablet = {
|
|
|
151
156
|
},
|
|
152
157
|
},
|
|
153
158
|
heading: {
|
|
159
|
+
'2xl': {
|
|
160
|
+
fontSize: 44,
|
|
161
|
+
fontWeight: 700,
|
|
162
|
+
lineHeight: 52,
|
|
163
|
+
},
|
|
154
164
|
fontFamily: 'Comic Hams',
|
|
155
165
|
lg: {
|
|
156
166
|
fontSize: 24,
|
|
@@ -238,6 +248,11 @@ export const desktop = {
|
|
|
238
248
|
},
|
|
239
249
|
},
|
|
240
250
|
heading: {
|
|
251
|
+
'2xl': {
|
|
252
|
+
fontSize: 54,
|
|
253
|
+
fontWeight: 700,
|
|
254
|
+
lineHeight: 62,
|
|
255
|
+
},
|
|
241
256
|
fontFamily: 'Comic Hams',
|
|
242
257
|
lg: {
|
|
243
258
|
fontSize: 30,
|
package/src/types/index.ts
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type semanticLight from '../tokens/semantic-light';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Simplified background color values derived from the semantic token `background` keys.
|
|
5
|
+
* e.g., 'brand' | 'primary' | 'secondary'
|
|
6
|
+
*/
|
|
7
|
+
export type BackgroundColorValue = keyof typeof semanticLight.background;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Simplified border color values derived from the semantic token `border` keys.
|
|
11
|
+
* e.g., 'strong' | 'subtle'
|
|
12
|
+
*/
|
|
13
|
+
export type BorderColorValue = keyof typeof semanticLight.border;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Simplified text color values derived from the semantic token `text` keys.
|
|
17
|
+
* e.g., 'affirmative' | 'brand' | 'inverted' | 'primary' | 'secondary'
|
|
18
|
+
* Also accepts any raw color value or undefined.
|
|
19
|
+
*/
|
|
20
|
+
export type TextColorValue = keyof typeof semanticLight.text;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Simplified icon color values derived from the semantic token `icon` keys.
|
|
24
|
+
* e.g., 'inverted' | 'primary'
|
|
25
|
+
*/
|
|
26
|
+
export type IconColorValue = keyof typeof semanticLight.icon;
|