@spark-web/text 5.0.0 → 5.1.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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @spark-web/text
2
2
 
3
+ ## 5.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#542](https://github.com/brighte-labs/spark-web/pull/542)
8
+ [`602547f`](https://github.com/brighte-labs/spark-web/commit/602547f280fb12f7ce4de86b7046719167ada075)
9
+ Thanks [@ralcoriza-brighte](https://github.com/ralcoriza-brighte)! - Support
10
+ responsive font weights per theme
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+ [[`602547f`](https://github.com/brighte-labs/spark-web/commit/602547f280fb12f7ce4de86b7046719167ada075)]:
16
+ - @spark-web/theme@5.2.0
17
+
3
18
  ## 5.0.0
4
19
 
5
20
  ### Major Changes
@@ -2,10 +2,10 @@
2
2
  export declare const TextContext: import("react").Context<{
3
3
  size: import("@spark-web/theme/src/themes/_types/typography").TypographySizing;
4
4
  tone: string | number;
5
- weight: "regular" | "semibold";
5
+ weight: "bold" | "medium" | "light" | "thin" | "black" | "extralight" | "regular" | "semibold" | "extrabold";
6
6
  } | undefined>;
7
7
  export declare function useTextContext(): {
8
8
  size: import("@spark-web/theme/src/themes/_types/typography").TypographySizing;
9
9
  tone: string | number;
10
- weight: "regular" | "semibold";
10
+ weight: "bold" | "medium" | "light" | "thin" | "black" | "extralight" | "regular" | "semibold" | "extrabold";
11
11
  } | undefined;
@@ -11,6 +11,6 @@ export declare function DefaultTextPropsProvider({ children, size, tone, weight,
11
11
  export declare const useDefaultTextProps: ({ size: sizeProp, tone: toneProp, weight: weightProp, }: DefaultTextProps) => {
12
12
  size: import("@spark-web/theme/src/themes/_types/typography").TypographySizing;
13
13
  tone: string | number;
14
- weight: "regular" | "semibold";
14
+ weight: "bold" | "medium" | "light" | "thin" | "black" | "extralight" | "regular" | "semibold" | "extrabold";
15
15
  };
16
16
  export {};
@@ -11,7 +11,7 @@ export declare type UseTextProps = {
11
11
  weight: keyof SparkTheme['typography']['fontWeight'];
12
12
  };
13
13
  export declare function useText({ baseline, size, tone, weight }: UseTextProps): (import("@emotion/serialize").CSSObject | undefined)[];
14
- export declare function createTextStyles({ fontSize, lineHeight, trims }: SparkTextDefinition, { includeTrims }?: {
14
+ export declare function createTextStyles({ fontSize, fontWeight, lineHeight, trims }: SparkTextDefinition, { includeTrims }?: {
15
15
  includeTrims?: boolean | undefined;
16
16
  }): {
17
17
  '::before'?: {
@@ -25,5 +25,6 @@ export declare function createTextStyles({ fontSize, lineHeight, trims }: SparkT
25
25
  display: string;
26
26
  } | undefined;
27
27
  fontSize: string;
28
+ fontWeight: number;
28
29
  lineHeight: string;
29
30
  };
@@ -142,6 +142,7 @@ function useText(_ref) {
142
142
  }
143
143
  function createTextStyles(_ref2) {
144
144
  var fontSize = _ref2.fontSize,
145
+ fontWeight = _ref2.fontWeight,
145
146
  lineHeight = _ref2.lineHeight,
146
147
  trims = _ref2.trims;
147
148
  var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
@@ -161,6 +162,7 @@ function createTextStyles(_ref2) {
161
162
  } : null;
162
163
  return _objectSpread({
163
164
  fontSize: fontSize,
165
+ fontWeight: fontWeight,
164
166
  lineHeight: lineHeight
165
167
  }, leadingTrim);
166
168
  }
@@ -142,6 +142,7 @@ function useText(_ref) {
142
142
  }
143
143
  function createTextStyles(_ref2) {
144
144
  var fontSize = _ref2.fontSize,
145
+ fontWeight = _ref2.fontWeight,
145
146
  lineHeight = _ref2.lineHeight,
146
147
  trims = _ref2.trims;
147
148
  var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
@@ -161,6 +162,7 @@ function createTextStyles(_ref2) {
161
162
  } : null;
162
163
  return _objectSpread({
163
164
  fontSize: fontSize,
165
+ fontWeight: fontWeight,
164
166
  lineHeight: lineHeight
165
167
  }, leadingTrim);
166
168
  }
@@ -138,6 +138,7 @@ function useText(_ref) {
138
138
  }
139
139
  function createTextStyles(_ref2) {
140
140
  var fontSize = _ref2.fontSize,
141
+ fontWeight = _ref2.fontWeight,
141
142
  lineHeight = _ref2.lineHeight,
142
143
  trims = _ref2.trims;
143
144
  var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
@@ -157,6 +158,7 @@ function createTextStyles(_ref2) {
157
158
  } : null;
158
159
  return _objectSpread({
159
160
  fontSize: fontSize,
161
+ fontWeight: fontWeight,
160
162
  lineHeight: lineHeight
161
163
  }, leadingTrim);
162
164
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-web/text",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "homepage": "https://github.com/brighte-labs/spark-web#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,7 +18,7 @@
18
18
  "@babel/runtime": "^7.25.0",
19
19
  "@emotion/react": "^11.14.0",
20
20
  "@spark-web/box": "^5.0.0",
21
- "@spark-web/theme": "^5.0.0",
21
+ "@spark-web/theme": "^5.2.0",
22
22
  "@spark-web/utils": "^5.0.0"
23
23
  },
24
24
  "devDependencies": {