Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-more-icons
Browse files Browse the repository at this point in the history
  • Loading branch information
marslavish committed Oct 28, 2023
2 parents 5481840 + dd9a246 commit 22e0d5c
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 7 deletions.
12 changes: 12 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.11.8](https://github.com/cosmology-tech/interchain-ui/compare/@interchain-ui/[email protected]...@interchain-ui/[email protected]) (2023-10-26)

**Note:** Version bump only for package @interchain-ui/react

## [1.11.7](https://github.com/cosmology-tech/interchain-ui/compare/@interchain-ui/[email protected]...@interchain-ui/[email protected]) (2023-10-25)

**Note:** Version bump only for package @interchain-ui/react

## [1.11.6](https://github.com/cosmology-tech/interchain-ui/compare/@interchain-ui/[email protected]...@interchain-ui/[email protected]) (2023-10-25)

**Note:** Version bump only for package @interchain-ui/react

## [1.11.5](https://github.com/cosmology-tech/interchain-ui/compare/@interchain-ui/[email protected]...@interchain-ui/[email protected]) (2023-10-23)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@interchain-ui/react",
"version": "1.11.5",
"version": "1.11.8",
"description": "UI building blocks for Interchain builders",
"author": "yyyyaaa <[email protected]>",
"homepage": "https://github.com/cosmology-tech/ui-kit/tree/main/packages/react#readme",
Expand Down
12 changes: 12 additions & 0 deletions packages/vue/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.2.6](https://github.com/cosmology-tech/interchain-ui/compare/@interchain-ui/[email protected]...@interchain-ui/[email protected]) (2023-10-26)

**Note:** Version bump only for package @interchain-ui/vue

## [1.2.5](https://github.com/cosmology-tech/interchain-ui/compare/@interchain-ui/[email protected]...@interchain-ui/[email protected]) (2023-10-25)

**Note:** Version bump only for package @interchain-ui/vue

## [1.2.4](https://github.com/cosmology-tech/interchain-ui/compare/@interchain-ui/[email protected]...@interchain-ui/[email protected]) (2023-10-25)

**Note:** Version bump only for package @interchain-ui/vue

## [1.2.3](https://github.com/cosmology-tech/interchain-ui/compare/@interchain-ui/[email protected]...@interchain-ui/[email protected]) (2023-10-23)

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@interchain-ui/vue",
"version": "1.2.3",
"version": "1.2.6",
"type": "module",
"description": "UI building blocks for Interchain builders",
"author": "yyyyaaa <[email protected]>",
Expand Down
3 changes: 2 additions & 1 deletion src/styles/rainbow-sprinkles.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const responsiveProperties = defineProperties({
maxWidth: true,
maxHeight: true,
borderRadius: themeVars.radii,
fontFamily: themeVars.font,
fontFamily: true,
fontSize: themeVars.fontSize,
lineHeight: themeVars.lineHeight,
textAlign: true,
Expand Down Expand Up @@ -110,6 +110,7 @@ const responsiveProperties = defineProperties({
minHeight: allSpace,
maxWidth: allSpace,
maxHeight: allSpace,
fontFamily: themeVars.font,
},
shorthands: {
p: ["padding"],
Expand Down
2 changes: 2 additions & 0 deletions src/ui/text/text.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import { themeVars } from "../../styles/themes.css";
const variant = {
body: style({
fontSize: themeVars.fontSize.sm,
color: themeVars.colors.text,
fontWeight: themeVars.fontWeight.normal,
lineHeight: themeVars.lineHeight.normal,
}),
heading: style({
fontSize: themeVars.fontSize.md,
color: themeVars.colors.text,
fontWeight: themeVars.fontWeight.semibold,
lineHeight: themeVars.lineHeight.tall,
}),
Expand Down
10 changes: 7 additions & 3 deletions src/ui/text/text.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,22 @@ import { Sprinkles } from "../../styles/rainbow-sprinkles.css";
export type Variant = "body" | "heading";
export type TextTransform = "ellipsis" | "underline" | "none";

export function getVariantStyles(variant: Variant): Sprinkles {
export function getVariantStyles(
variant: Variant,
customFontFamily?: Sprinkles["fontFamily"]
): Sprinkles {
if (variant === "body") {
return {
fontFamily: "$body",
fontFamily: customFontFamily ?? "$body",
fontSize: "$sm",
fontWeight: "$normal",
lineHeight: "$normal",
};
}

if (variant === "heading") {
return {
fontFamily: "$body",
fontFamily: customFontFamily ?? "$body",
fontSize: "$md",
fontWeight: "$semibold",
lineHeight: "$tall",
Expand Down
2 changes: 1 addition & 1 deletion src/ui/text/text.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function Text(props: TextProps) {
{...props.attributes}
{...props.domAttributes}
as={props.as}
{...getVariantStyles(props.variant ?? "body")}
{...getVariantStyles(props.variant ?? "body", props.fontFamily)}
{...getTextTransformStyles({
ellipsis: props.ellipsis,
underline: props.underline,
Expand Down
1 change: 1 addition & 0 deletions src/ui/text/text.types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface TextProps extends BaseComponentProps {
| "p"
| "span";
color?: Sprinkles["color"];
fontFamily?: Sprinkles["fontFamily"];
fontSize?: Sprinkles["fontSize"];
fontWeight?: Sprinkles["fontWeight"];
letterSpacing?: Sprinkles["letterSpacing"];
Expand Down

0 comments on commit 22e0d5c

Please sign in to comment.