@spark-web/text 5.0.0-rc.31 → 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,62 @@
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
+
18
+ ## 5.0.0
19
+
20
+ ### Major Changes
21
+
22
+ - This release of spark-web standardises the version across all packages to be
23
+ **`v5`**, primarily signifying the switch from `@emotion/css` to
24
+ `@emotion/react` as one of the key dependencies of the entire library, in
25
+ order to support server-side rendering / SSR.
26
+
27
+ This release also introduces support for theming, to allow for more co-branded
28
+ experiences across our web applications. It also supports component-level
29
+ theming for `<Button />`, `<ButtonLink />`, and `<Checkbox />`, which provides
30
+ the capability to override the global theme available inside an application.
31
+
32
+ To use this in an application, you can wrap the affected areas with a
33
+ `ThemeProvider`:
34
+
35
+ ```
36
+ <ThemeProvider theme="pantheon">
37
+ <Input type="text" />
38
+ <Button type="submit" />
39
+ </ThemeProvider>
40
+ ```
41
+
42
+ Part of the theming capabilities includes a new theme for `spark-web` called
43
+ "pantheon", which should map with our co-branding efforts in the Pantheon
44
+ project. It currently includes a small set of colors and its corresponding
45
+ font family.
46
+
47
+ ### Patch Changes
48
+
49
+ - [#532](https://github.com/brighte-labs/spark-web/pull/532)
50
+ [`631573c`](https://github.com/brighte-labs/spark-web/commit/631573cb72981d99b9afa4ad559123f44e47b2a9)
51
+ Thanks [@ralcoriza-brighte](https://github.com/ralcoriza-brighte)! - Fix
52
+ type-related issues
53
+
54
+ - Updated dependencies
55
+ [[`631573c`](https://github.com/brighte-labs/spark-web/commit/631573cb72981d99b9afa4ad559123f44e47b2a9)]:
56
+ - @spark-web/theme@5.0.0
57
+ - @spark-web/utils@5.0.0
58
+ - @spark-web/box@5.0.0
59
+
3
60
  ## 5.0.0-rc.31
4
61
 
5
62
  ### Patch 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-rc.31",
3
+ "version": "5.1.0",
4
4
  "homepage": "https://github.com/brighte-labs/spark-web#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,9 +17,9 @@
17
17
  "dependencies": {
18
18
  "@babel/runtime": "^7.25.0",
19
19
  "@emotion/react": "^11.14.0",
20
- "@spark-web/box": "^5.0.0-rc.31",
21
- "@spark-web/theme": "^5.0.0-rc.31",
22
- "@spark-web/utils": "^5.0.0-rc.31"
20
+ "@spark-web/box": "^5.0.0",
21
+ "@spark-web/theme": "^5.2.0",
22
+ "@spark-web/utils": "^5.0.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/react": "^18.2.0",