@pagopa/io-app-design-system 4.4.0 → 4.4.1
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/lib/commonjs/components/typography/IOText.js +1 -1
- package/lib/commonjs/components/typography/IOText.js.map +1 -1
- package/lib/commonjs/utils/accessibility.js +4 -9
- package/lib/commonjs/utils/accessibility.js.map +1 -1
- package/lib/commonjs/utils/fonts.js +3 -3
- package/lib/commonjs/utils/fonts.js.map +1 -1
- package/lib/module/components/typography/IOText.js +2 -2
- package/lib/module/components/typography/IOText.js.map +1 -1
- package/lib/module/utils/accessibility.js +5 -10
- package/lib/module/utils/accessibility.js.map +1 -1
- package/lib/module/utils/fonts.js +1 -1
- package/lib/module/utils/fonts.js.map +1 -1
- package/lib/typescript/components/buttons/ButtonLink.d.ts +1 -1
- package/lib/typescript/components/buttons/ButtonOutline.d.ts +1 -1
- package/lib/typescript/components/buttons/ButtonSolid.d.ts +1 -1
- package/lib/typescript/components/typography/H2.d.ts +3 -0
- package/lib/typescript/components/typography/H2.d.ts.map +1 -1
- package/lib/typescript/components/typography/IOText.d.ts.map +1 -1
- package/lib/typescript/core/IOStyles.d.ts +6 -6
- package/lib/typescript/utils/accessibility.d.ts +1 -1
- package/lib/typescript/utils/accessibility.d.ts.map +1 -1
- package/lib/typescript/utils/fonts.d.ts +2 -2
- package/lib/typescript/utils/fonts.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/typography/IOText.tsx +2 -2
- package/src/utils/accessibility.ts +5 -8
- package/src/utils/fonts.ts +1 -1
|
@@ -86,7 +86,7 @@ const IOText = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
86
86
|
/* Accessible typography based on the `fontScale` parameter */
|
|
87
87
|
const accessibleFontSizeProps = {
|
|
88
88
|
allowFontScaling,
|
|
89
|
-
maxFontSizeMultiplier: maxFontSizeMultiplier ?? _fonts.
|
|
89
|
+
maxFontSizeMultiplier: maxFontSizeMultiplier ?? _fonts.IOMaxFontSizeMultiplier
|
|
90
90
|
};
|
|
91
91
|
return /*#__PURE__*/_react.default.createElement(_reactNative.Text, _extends({
|
|
92
92
|
ref: ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_core","_accessibility","_fonts","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","calculateTextStyle","color","args","makeFontStyleObject","IOColors","IOText","forwardRef","size","font","lineHeight","weight","fontStyle","textStyle","style","children","allowFontScaling","maxFontSizeMultiplier","props","ref","theme","useIOTheme","boldEnabled","useBoldTextEnabled","computedStyleObj","useMemo","fontStyleObj","styleObj","accessibleFontSizeProps","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_core","_accessibility","_fonts","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","calculateTextStyle","color","args","makeFontStyleObject","IOColors","IOText","forwardRef","size","font","lineHeight","weight","fontStyle","textStyle","style","children","allowFontScaling","maxFontSizeMultiplier","props","ref","theme","useIOTheme","boldEnabled","useBoldTextEnabled","computedStyleObj","useMemo","fontStyleObj","styleObj","accessibleFontSizeProps","IOMaxFontSizeMultiplier","createElement","Text","exports"],"sourceRoot":"../../../../src","sources":["components/typography/IOText.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA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,EAAEC,UAAU,EAAEC,MAAM,EAAEC,SAAS,EAAEU,WAAW,CACvE,CAAC;;EAED;AACJ;AACA;AACA;AACA;AACA;EACI,MAAMI,YAAY,GAAGZ,KAAK,aAALA,KAAK,eAALA,KAAK,CAAEZ,KAAK,GAC7B,CAAC;IAAE,GAAGsB,gBAAgB;IAAEtB,KAAK,EAAEY,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAEZ;EAAM,CAAC,CAAC,GAC9CsB,gBAAgB;;EAEpB;AACJ;AACA;AACA;AACA;AACA;AACA;EACI,MAAMG,QAAQ,GAAGb,KAAK,GAClB,CAACD,SAAS,IAAI,CAAC,CAAC,EAAEa,YAAY,IAAI,CAAC,CAAC,EAAEZ,KAAK,CAAC,GAC5C,CAACD,SAAS,IAAI,CAAC,CAAC,EAAEa,YAAY,IAAI,CAAC,CAAC,CAAC;;EAEzC;EACA,MAAME,uBAAoD,GAAG;IAC3DZ,gBAAgB;IAChBC,qBAAqB,EAAEA,qBAAqB,IAAIY;EAClD,CAAC;EAED,oBACElE,MAAA,CAAAc,OAAA,CAAAqD,aAAA,CAAChE,YAAA,CAAAiE,IAAI,EAAAvC,QAAA;IAAC2B,GAAG,EAAEA,GAAI;IAACL,KAAK,EAAEa;EAAS,GAAKT,KAAK,EAAMU,uBAAuB,GACpEb,QACG,CAAC;AAEX,CACF,CAAC;AAACiB,OAAA,CAAA1B,MAAA,GAAAA,MAAA"}
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useIOFontDynamicScale = exports.useBoldTextEnabled = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var _core = require("../core");
|
|
10
9
|
var _fonts = require("./fonts");
|
|
11
10
|
/**
|
|
12
11
|
* Query whether a bold text is currently enabled. The result is true
|
|
@@ -33,23 +32,19 @@ const useBoldTextEnabled = () => {
|
|
|
33
32
|
|
|
34
33
|
/**
|
|
35
34
|
* Returns a font size multiplier based on the font scale of the device,
|
|
36
|
-
* but limited to the `
|
|
35
|
+
* but limited to the `IOMaxFontSizeMultiplier` value.
|
|
37
36
|
* @returns number
|
|
38
37
|
*/
|
|
39
38
|
exports.useBoldTextEnabled = useBoldTextEnabled;
|
|
40
39
|
const useIOFontDynamicScale = () => {
|
|
41
|
-
const {
|
|
42
|
-
isExperimental
|
|
43
|
-
} = (0, _core.useIOExperimentalDesign)();
|
|
44
40
|
const {
|
|
45
41
|
fontScale
|
|
46
42
|
} = (0, _reactNative.useWindowDimensions)();
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
const dynamicFontScale = Math.min(deviceFontScale, _fonts.IOFontSizeMultiplier);
|
|
43
|
+
const hugeFontEnabled = fontScale >= 1.35;
|
|
44
|
+
const dynamicFontScale = Math.min(fontScale, _fonts.IOMaxFontSizeMultiplier);
|
|
50
45
|
/* We make the spacing dynamic based on the font scale, but we multiply
|
|
51
46
|
this value to limit the amount of scaling applied to the spacing */
|
|
52
|
-
const spacingScaleMultiplier = dynamicFontScale <= _fonts.
|
|
47
|
+
const spacingScaleMultiplier = dynamicFontScale <= _fonts.IOMaxFontSizeMultiplier ? 1 : 0.8;
|
|
53
48
|
return {
|
|
54
49
|
hugeFontEnabled,
|
|
55
50
|
dynamicFontScale,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_fonts","useBoldTextEnabled","boldTextEnabled","setBoldTextEnabled","useState","useEffect","Platform","OS","boldTextChangedSubscription","AccessibilityInfo","addEventListener","isBoldTextEnabled","then","catch","_","remove","exports","useIOFontDynamicScale","fontScale","useWindowDimensions","hugeFontEnabled","dynamicFontScale","Math","min","IOMaxFontSizeMultiplier","spacingScaleMultiplier"],"sourceRoot":"../../../src","sources":["utils/accessibility.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAA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@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.makeFontStyleObject = exports.makeFontFamilyName = exports.fontWeights = exports.
|
|
6
|
+
exports.makeFontStyleObject = exports.makeFontFamilyName = exports.fontWeights = exports.IOMaxFontSizeMultiplier = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
8
|
/**
|
|
9
9
|
* Utility functions to manage font properties to style mapping for both iOS and Android
|
|
@@ -91,7 +91,7 @@ exports.makeFontFamilyName = makeFontFamilyName;
|
|
|
91
91
|
const defaultFont = "TitilliumSansPro";
|
|
92
92
|
const defaultWeight = "Regular";
|
|
93
93
|
const defaultFontSize = 16;
|
|
94
|
-
const
|
|
94
|
+
const IOMaxFontSizeMultiplier = 1.5;
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
97
|
* Return a {@link FontStyleObject} with the fields filled based on the platform (iOS or Android).
|
|
@@ -100,7 +100,7 @@ const IOFontSizeMultiplier = 1.5;
|
|
|
100
100
|
* @param weight
|
|
101
101
|
* @param fontStyle
|
|
102
102
|
*/
|
|
103
|
-
exports.
|
|
103
|
+
exports.IOMaxFontSizeMultiplier = IOMaxFontSizeMultiplier;
|
|
104
104
|
const makeFontStyleObject = (size = defaultFontSize, font = defaultFont, lineHeight, weight = defaultWeight, fontStyle = "normal", boldEnabled = false) => {
|
|
105
105
|
/* If bold text is currently enabled, we select the next
|
|
106
106
|
available `IOFontWeight` value */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","fonts","TitilliumSansPro","Platform","select","android","web","ios","default","Titillio","DMMono","fontSizes","fontSizesLegacy","allFontSizes","Set","weights","weightValues","fontWeights","Thin","Light","Regular","Medium","Semibold","Bold","Black","exports","getBolderFontWeight","weight","currentWeight","indexOf","length","makeFontFamilyName","font","defaultWeight","fontStyle","defaultFont","defaultFontSize","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","fonts","TitilliumSansPro","Platform","select","android","web","ios","default","Titillio","DMMono","fontSizes","fontSizesLegacy","allFontSizes","Set","weights","weightValues","fontWeights","Thin","Light","Regular","Medium","Semibold","Bold","Black","exports","getBolderFontWeight","weight","currentWeight","indexOf","length","makeFontFamilyName","font","defaultWeight","fontStyle","defaultFont","defaultFontSize","IOMaxFontSizeMultiplier","makeFontStyleObject","size","lineHeight","boldEnabled","dynamicWeight","fontSize","fontFamily","fontWeight","includeFontPadding"],"sourceRoot":"../../../src","sources":["utils/fonts.ts"],"mappings":";;;;;;AAMA,IAAAA,YAAA,GAAAC,OAAA;AANA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA,MAAMC,KAAK,GAAG;EACZC,gBAAgB,EAAEC,qBAAQ,CAACC,MAAM,CAAC;IAChCC,OAAO,EAAE,kBAAkB;IAC3BC,GAAG,EAAE,kBAAkB;IACvBC,GAAG,EAAE,oBAAoB;IACzBC,OAAO,EAAE;EACX,CAAC,CAAC;EACFC,QAAQ,EAAEN,qBAAQ,CAACC,MAAM,CAAC;IACxBC,OAAO,EAAE,UAAU;IACnBC,GAAG,EAAE,UAAU;IACfC,GAAG,EAAE,UAAU;IACfC,OAAO,EAAE;EACX,CAAC,CAAC;EACFE,MAAM,EAAEP,qBAAQ,CAACC,MAAM,CAAC;IACtBC,OAAO,EAAE,QAAQ;IACjBC,GAAG,EAAE,QAAQ;IACbC,GAAG,EAAE,SAAS;IACdC,OAAO,EAAE;EACX,CAAC;AACH,CAAU;AAIV;AACA;AACA;AACA,MAAMG,SAAS,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAU;AAC3D,MAAMC,eAAe,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAU;AACjD,MAAMC,YAAY,GAAG,CAAC,GAAG,IAAIC,GAAG,CAAC,CAAC,GAAGH,SA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AEJ,IAAI;MACdK,UAAU,EAAEb,kBAAkB,CAACC,IAAI,EAAEU,aAAa,EAAER,SAAS;IAC/D;EACF,CAAC,CAAC;AACJ,CAAC;AAACT,OAAA,CAAAa,mBAAA,GAAAA,mBAAA"}
|
|
@@ -3,7 +3,7 @@ import React, { forwardRef, useMemo } from "react";
|
|
|
3
3
|
import { Text } from "react-native";
|
|
4
4
|
import { IOColors, useIOTheme } from "../../core";
|
|
5
5
|
import { useBoldTextEnabled } from "../../utils/accessibility";
|
|
6
|
-
import {
|
|
6
|
+
import { IOMaxFontSizeMultiplier, makeFontStyleObject } from "../../utils/fonts";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* We exclude all of the following props when we define a new
|
|
@@ -79,7 +79,7 @@ export const IOText = /*#__PURE__*/forwardRef(({
|
|
|
79
79
|
/* Accessible typography based on the `fontScale` parameter */
|
|
80
80
|
const accessibleFontSizeProps = {
|
|
81
81
|
allowFontScaling,
|
|
82
|
-
maxFontSizeMultiplier: maxFontSizeMultiplier ??
|
|
82
|
+
maxFontSizeMultiplier: maxFontSizeMultiplier ?? IOMaxFontSizeMultiplier
|
|
83
83
|
};
|
|
84
84
|
return /*#__PURE__*/React.createElement(Text, _extends({
|
|
85
85
|
ref: ref,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","useMemo","Text","IOColors","useIOTheme","useBoldTextEnabled","
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useMemo","Text","IOColors","useIOTheme","useBoldTextEnabled","IOMaxFontSizeMultiplier","makeFontStyleObject","calculateTextStyle","color","args","IOText","size","font","lineHeight","weight","fontStyle","textStyle","style","children","allowFontScaling","maxFontSizeMultiplier","props","ref","theme","boldEnabled","computedStyleObj","fontStyleObj","styleObj","accessibleFontSizeProps","createElement","_extends"],"sourceRoot":"../../../../src","sources":["components/typography/IOText.tsx"],"mappings":";AAAA,OAAOA,KAAK,IAAoBC,UAAU,EAAEC,OAAO,QAAQ,OAA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E,GAAGiB,gBAAgB;IAAEjB,KAAK,EAAES,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAET;EAAM,CAAC,CAAC,GAC9CiB,gBAAgB;;EAEpB;AACJ;AACA;AACA;AACA;AACA;AACA;EACI,MAAME,QAAQ,GAAGV,KAAK,GAClB,CAACD,SAAS,IAAI,CAAC,CAAC,EAAEU,YAAY,IAAI,CAAC,CAAC,EAAET,KAAK,CAAC,GAC5C,CAACD,SAAS,IAAI,CAAC,CAAC,EAAEU,YAAY,IAAI,CAAC,CAAC,CAAC;;EAEzC;EACA,MAAME,uBAAoD,GAAG;IAC3DT,gBAAgB;IAChBC,qBAAqB,EAAEA,qBAAqB,IAAIf;EAClD,CAAC;EAED,oBACEP,KAAA,CAAA+B,aAAA,CAAC5B,IAAI,EAAA6B,QAAA;IAACR,GAAG,EAAEA,GAAI;IAACL,KAAK,EAAEU;EAAS,GAAKN,KAAK,EAAMO,uBAAuB,GACpEV,QACG,CAAC;AAEX,CACF,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
2
|
import { AccessibilityInfo, Platform, useWindowDimensions } from "react-native";
|
|
3
|
-
import {
|
|
4
|
-
import { IOFontSizeMultiplier } from "./fonts";
|
|
3
|
+
import { IOMaxFontSizeMultiplier } from "./fonts";
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* Query whether a bold text is currently enabled. The result is true
|
|
@@ -28,22 +27,18 @@ export const useBoldTextEnabled = () => {
|
|
|
28
27
|
|
|
29
28
|
/**
|
|
30
29
|
* Returns a font size multiplier based on the font scale of the device,
|
|
31
|
-
* but limited to the `
|
|
30
|
+
* but limited to the `IOMaxFontSizeMultiplier` value.
|
|
32
31
|
* @returns number
|
|
33
32
|
*/
|
|
34
33
|
export const useIOFontDynamicScale = () => {
|
|
35
|
-
const {
|
|
36
|
-
isExperimental
|
|
37
|
-
} = useIOExperimentalDesign();
|
|
38
34
|
const {
|
|
39
35
|
fontScale
|
|
40
36
|
} = useWindowDimensions();
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const dynamicFontScale = Math.min(deviceFontScale, IOFontSizeMultiplier);
|
|
37
|
+
const hugeFontEnabled = fontScale >= 1.35;
|
|
38
|
+
const dynamicFontScale = Math.min(fontScale, IOMaxFontSizeMultiplier);
|
|
44
39
|
/* We make the spacing dynamic based on the font scale, but we multiply
|
|
45
40
|
this value to limit the amount of scaling applied to the spacing */
|
|
46
|
-
const spacingScaleMultiplier = dynamicFontScale <=
|
|
41
|
+
const spacingScaleMultiplier = dynamicFontScale <= IOMaxFontSizeMultiplier ? 1 : 0.8;
|
|
47
42
|
return {
|
|
48
43
|
hugeFontEnabled,
|
|
49
44
|
dynamicFontScale,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useState","AccessibilityInfo","Platform","useWindowDimensions","
|
|
1
|
+
{"version":3,"names":["useEffect","useState","AccessibilityInfo","Platform","useWindowDimensions","IOMaxFontSizeMultiplier","useBoldTextEnabled","boldTextEnabled","setBoldTextEnabled","OS","boldTextChangedSubscription","addEventListener","isBoldTextEnabled","then","catch","_","remove","useIOFontDynamicScale","fontScale","hugeFontEnabled","dynamicFontScale","Math","min","spacingScaleMultiplier"],"sourceRoot":"../../../src","sources":["utils/accessibility.ts"],"mappings":"AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,iBAAiB,EAAEC,QAAQ,EAAEC,mBAAmB,QAAQ,cAAc;AAC/E,SAASC,uBAAuB,QAAQ,SAAS;;AAEjD;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;EACtC,MAAM,CAACC,eAAe,EAAEC,kBAAkB,CAAC,GAAGP,QAAQ,CAAC,KAAK,CAAC;EAE7DD,SAAS,CAAC,MAAM;IACd,IAAIG,QAAQ,CAACM,EAAE,KAAK,KAAK,EAAE;MACzB,MAAMC,2BAA2B,GAAGR,iBAAiB,CAACS,gBAAgB,CACpE,iBAAiB,EACjBC,iBAAiB,IAAI;QACnBJ,kBAAkB,CAACI,iBAAiB,CAAC;MACvC,CACF,CAAC;MAEDV,iBAAiB,CAACU,iBAAiB,CAAC,CAAC,CAClCC,IAAI,CAACD,iBAAiB,IAAI;QACzBJ,kBAAkB,CAACI,iBAAiB,CAAC;MACvC,CAAC,CAAC,CACDE,KAAK,CAACC,CAAC,IAAI,KAAK,CAAC;MAEpB,OAAO,MAAM;QACXL,2BAA2B,CAACM,MAAM,CAAC,CAAC;MACtC,CAAC;IACH;IACA;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOT,eAAe;AACxB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMU,qBAAqB,GAAGA,CAAA,KAIhC;EACH,MAAM;IAAEC;EAAU,CAAC,GAAGd,mBAAmB,CAAC,CAAC;EAE3C,MAAMe,eAAe,GAAGD,SAAS,IAAI,IAAI;EAEzC,MAAME,gBAAgB,GAAGC,IAAI,CAACC,GAAG,CAACJ,SAAS,EAAEb,uBAAuB,CAAC;EACrE;AACF;EACE,MAAMkB,sBAAsB,GAC1BH,gBAAgB,IAAIf,uBAAuB,GAAG,CAAC,GAAG,GAAG;EAEvD,OAAO;IACLc,eAAe;IACfC,gBAAgB;IAChBG;EACF,CAAC;AACH,CAAC"}
|
|
@@ -84,7 +84,7 @@ export const makeFontFamilyName = (font, weight = defaultWeight, fontStyle = "no
|
|
|
84
84
|
const defaultFont = "TitilliumSansPro";
|
|
85
85
|
const defaultWeight = "Regular";
|
|
86
86
|
const defaultFontSize = 16;
|
|
87
|
-
export const
|
|
87
|
+
export const IOMaxFontSizeMultiplier = 1.5;
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
90
|
* Return a {@link FontStyleObject} with the fields filled based on the platform (iOS or Android).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","fonts","TitilliumSansPro","select","android","web","ios","default","Titillio","DMMono","fontSizes","fontSizesLegacy","allFontSizes","Set","weights","weightValues","fontWeights","Thin","Light","Regular","Medium","Semibold","Bold","Black","getBolderFontWeight","weight","currentWeight","indexOf","length","makeFontFamilyName","font","defaultWeight","fontStyle","defaultFont","defaultFontSize","
|
|
1
|
+
{"version":3,"names":["Platform","fonts","TitilliumSansPro","select","android","web","ios","default","Titillio","DMMono","fontSizes","fontSizesLegacy","allFontSizes","Set","weights","weightValues","fontWeights","Thin","Light","Regular","Medium","Semibold","Bold","Black","getBolderFontWeight","weight","currentWeight","indexOf","length","makeFontFamilyName","font","defaultWeight","fontStyle","defaultFont","defaultFontSize","IOMaxFontSizeMultiplier","makeFontStyleObject","size","lineHeight","boldEnabled","dynamicWeight","fontSize","fontFamily","fontWeight","includeFontPadding"],"sourceRoot":"../../../src","sources":["utils/fonts.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAmB,cAAc;;AAElD;AACA;AACA;AACA,MAAMC,KAAK,GAAG;EACZC,gBAAgB,EAAEF,QAAQ,CAACG,MAAM,CAAC;IAChCC,OAAO,EAAE,kBAAkB;IAC3BC,GAAG,EAAE,kBAAkB;IACvBC,GAAG,EAAE,oBAAoB;IACzBC,OAAO,EAAE;EACX,CAAC,CAAC;EACFC,QAAQ,EAAER,QAAQ,CAACG,MAAM,CAAC;IACxBC,OAAO,EAAE,UAAU;IACnBC,GAAG,EAAE,UAAU;IACfC,GAAG,EAAE,UAAU;IACfC,OAAO,EAAE;EACX,CAAC,CAAC;EACFE,MAAM,EAAET,QAAQ,CAACG,MAAM,CAAC;IACtBC,OAAO,EAAE,QAAQ;IACjBC,GAAG,EAAE,QAAQ;IACbC,GAAG,EAAE,SAAS;IACdC,OAAO,EAAE;EACX,CAAC;AACH,CAAU;AAIV;AACA;AACA;AACA,MAAMG,SAAS,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,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tCF,UAAU;MACVN;IACF,CAAC;IACDzB,OAAO,EAAE;MACPkC,QAAQ,EAAEJ,IAAI;MACdK,UAAU,EAAEb,kBAAkB,CAACC,IAAI,EAAEU,aAAa,EAAER,SAAS;IAC/D;EACF,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -17,7 +17,7 @@ export declare const ButtonLink: React.ForwardRefExoticComponent<{
|
|
|
17
17
|
color?: ColorButtonLink | undefined;
|
|
18
18
|
label: string;
|
|
19
19
|
disabled?: boolean | undefined;
|
|
20
|
-
icon?: "code" | "option" | "
|
|
20
|
+
icon?: "code" | "option" | "change" | "search" | "key" | "spid" | "cie" | "cieLetter" | "qrCode" | "bell" | "website" | "abacus" | "home" | "homeFill" | "copy" | "selfCert" | "institution" | "merchant" | "hourglass" | "shareiOs" | "shareAndroid" | "filterOniOS" | "filterOffiOS" | "filterAndroid" | "locked" | "unlocked" | "initiatives" | "analytics" | "fornitori" | "eyeShow" | "eyeHide" | "pinOff" | "pinOn" | "emojiSad" | "emojiHappy" | "phone" | "email" | "emailFill" | "pec" | "messageLegal" | "message" | "chat" | "archive" | "archiveFilled" | "inbox" | "inboxFilled" | "security" | "docGiacenza" | "docPaymentTitle" | "docPaymentCode" | "docAttach" | "docAttachPDF" | "folder" | "receiptOn" | "receiptOff" | "notes" | "attachment" | "print" | "add" | "addSmall" | "success" | "ok" | "fiscalCodeIndividual" | "entityCode" | "creditCard" | "creditCardOff" | "creditCardFilled" | "bonus" | "bonusFilled" | "transactionsBoxed" | "transactions" | "amount" | "psp" | "mapPin" | "locationiOS" | "locationiOSFilled" | "locationAndroid" | "coggle" | "warningFilled" | "notice" | "noticeFilled" | "noticePlain" | "info" | "infoFilled" | "canceled" | "errorFilled" | "legalValue" | "refund" | "reload" | "history" | "edit" | "battery" | "trashcan" | "calendar" | "profile" | "familySharing" | "lightbulb" | "magicWand" | "sparkles" | "starEmpty" | "starFilled" | "starOff" | "heartEmpty" | "heartFilled" | "heartOff" | "switchOff" | "switchCard" | "fingerprint" | "touch" | "device" | "deviceVibration" | "contactless" | "signal" | "notification" | "keyboard" | "keyboardDown" | "dotMenu" | "barcode" | "save" | "login" | "logout" | "ladybug" | "tag" | "gallery" | "externalLink" | "externalLinkSmall" | "forward" | "cancel" | "compare" | "instruction" | "terms" | "help" | "accessibility" | "car" | "healthCard" | "chevronRight" | "chevronLeft" | "chevronBottom" | "chevronTop" | "chevronRightListItem" | "closeLarge" | "closeMedium" | "closeSmall" | "arrowBottom" | "arrowLeft" | "arrowTop" | "arrowRight" | "backiOS" | "backAndroid" | "checkTick" | "checkTickBig" | "read" | "light" | "lightFilled" | "navMessages" | "navMessagesFocused" | "navWallet" | "navWalletFocused" | "navQrWallet" | "navScan" | "navServices" | "navServicesFocused" | "navProfile" | "navProfileFocused" | "navPsp" | "legRadioOn" | "legRadioOff" | "legCheckOn" | "legCheckOff" | "biomFingerprint" | "biomFaceID" | "categCulture" | "categWellness" | "categLearning" | "categSport" | "categHome" | "categTelco" | "categFinance" | "categTravel" | "categMobility" | "categJobOffers" | "categShopping" | "categSustainability" | "productIOApp" | "productPagoPA" | "productIOAppBlueBg" | "systemSettingsAndroid" | "systemSettingsiOS" | "systemToggleInstructions" | "systemAppsAndroid" | "systemNotificationsInstructions" | "systemPermissionsAndroid" | "systemLocationiOS" | "systemPhotosiOS" | "systemPrivacyiOS" | "systemBiometricRecognitionOS" | "systemNFC" | "systemPasswordAndroid" | "systemPasswordiOS" | undefined;
|
|
21
21
|
iconPosition?: "end" | "start" | undefined;
|
|
22
22
|
accessibilityLabel?: string | undefined;
|
|
23
23
|
accessibilityHint?: string | undefined;
|
|
@@ -15,7 +15,7 @@ export declare const ButtonOutline: React.ForwardRefExoticComponent<{
|
|
|
15
15
|
color?: ColorButtonOutline | undefined;
|
|
16
16
|
label: string;
|
|
17
17
|
fullWidth?: boolean | undefined;
|
|
18
|
-
icon?: "code" | "option" | "
|
|
18
|
+
icon?: "code" | "option" | "change" | "search" | "key" | "spid" | "cie" | "cieLetter" | "qrCode" | "bell" | "website" | "abacus" | "home" | "homeFill" | "copy" | "selfCert" | "institution" | "merchant" | "hourglass" | "shareiOs" | "shareAndroid" | "filterOniOS" | "filterOffiOS" | "filterAndroid" | "locked" | "unlocked" | "initiatives" | "analytics" | "fornitori" | "eyeShow" | "eyeHide" | "pinOff" | "pinOn" | "emojiSad" | "emojiHappy" | "phone" | "email" | "emailFill" | "pec" | "messageLegal" | "message" | "chat" | "archive" | "archiveFilled" | "inbox" | "inboxFilled" | "security" | "docGiacenza" | "docPaymentTitle" | "docPaymentCode" | "docAttach" | "docAttachPDF" | "folder" | "receiptOn" | "receiptOff" | "notes" | "attachment" | "print" | "add" | "addSmall" | "success" | "ok" | "fiscalCodeIndividual" | "entityCode" | "creditCard" | "creditCardOff" | "creditCardFilled" | "bonus" | "bonusFilled" | "transactionsBoxed" | "transactions" | "amount" | "psp" | "mapPin" | "locationiOS" | "locationiOSFilled" | "locationAndroid" | "coggle" | "warningFilled" | "notice" | "noticeFilled" | "noticePlain" | "info" | "infoFilled" | "canceled" | "errorFilled" | "legalValue" | "refund" | "reload" | "history" | "edit" | "battery" | "trashcan" | "calendar" | "profile" | "familySharing" | "lightbulb" | "magicWand" | "sparkles" | "starEmpty" | "starFilled" | "starOff" | "heartEmpty" | "heartFilled" | "heartOff" | "switchOff" | "switchCard" | "fingerprint" | "touch" | "device" | "deviceVibration" | "contactless" | "signal" | "notification" | "keyboard" | "keyboardDown" | "dotMenu" | "barcode" | "save" | "login" | "logout" | "ladybug" | "tag" | "gallery" | "externalLink" | "externalLinkSmall" | "forward" | "cancel" | "compare" | "instruction" | "terms" | "help" | "accessibility" | "car" | "healthCard" | "chevronRight" | "chevronLeft" | "chevronBottom" | "chevronTop" | "chevronRightListItem" | "closeLarge" | "closeMedium" | "closeSmall" | "arrowBottom" | "arrowLeft" | "arrowTop" | "arrowRight" | "backiOS" | "backAndroid" | "checkTick" | "checkTickBig" | "read" | "light" | "lightFilled" | "navMessages" | "navMessagesFocused" | "navWallet" | "navWalletFocused" | "navQrWallet" | "navScan" | "navServices" | "navServicesFocused" | "navProfile" | "navProfileFocused" | "navPsp" | "legRadioOn" | "legRadioOff" | "legCheckOn" | "legCheckOff" | "biomFingerprint" | "biomFaceID" | "categCulture" | "categWellness" | "categLearning" | "categSport" | "categHome" | "categTelco" | "categFinance" | "categTravel" | "categMobility" | "categJobOffers" | "categShopping" | "categSustainability" | "productIOApp" | "productPagoPA" | "productIOAppBlueBg" | "systemSettingsAndroid" | "systemSettingsiOS" | "systemToggleInstructions" | "systemAppsAndroid" | "systemNotificationsInstructions" | "systemPermissionsAndroid" | "systemLocationiOS" | "systemPhotosiOS" | "systemPrivacyiOS" | "systemBiometricRecognitionOS" | "systemNFC" | "systemPasswordAndroid" | "systemPasswordiOS" | undefined;
|
|
19
19
|
iconPosition?: "end" | "start" | undefined;
|
|
20
20
|
onPress: (event: GestureResponderEvent) => void;
|
|
21
21
|
} & Pick<import("react-native").PressableProps & React.RefAttributes<View>, "accessibilityLabel" | "disabled" | "accessibilityHint"> & import("../../utils/types").TestID & React.RefAttributes<View>>;
|
|
@@ -38,7 +38,7 @@ export declare const ButtonSolid: React.ForwardRefExoticComponent<{
|
|
|
38
38
|
* @default false
|
|
39
39
|
*/
|
|
40
40
|
loading?: boolean | undefined;
|
|
41
|
-
icon?: "code" | "option" | "
|
|
41
|
+
icon?: "code" | "option" | "change" | "search" | "key" | "spid" | "cie" | "cieLetter" | "qrCode" | "bell" | "website" | "abacus" | "home" | "homeFill" | "copy" | "selfCert" | "institution" | "merchant" | "hourglass" | "shareiOs" | "shareAndroid" | "filterOniOS" | "filterOffiOS" | "filterAndroid" | "locked" | "unlocked" | "initiatives" | "analytics" | "fornitori" | "eyeShow" | "eyeHide" | "pinOff" | "pinOn" | "emojiSad" | "emojiHappy" | "phone" | "email" | "emailFill" | "pec" | "messageLegal" | "message" | "chat" | "archive" | "archiveFilled" | "inbox" | "inboxFilled" | "security" | "docGiacenza" | "docPaymentTitle" | "docPaymentCode" | "docAttach" | "docAttachPDF" | "folder" | "receiptOn" | "receiptOff" | "notes" | "attachment" | "print" | "add" | "addSmall" | "success" | "ok" | "fiscalCodeIndividual" | "entityCode" | "creditCard" | "creditCardOff" | "creditCardFilled" | "bonus" | "bonusFilled" | "transactionsBoxed" | "transactions" | "amount" | "psp" | "mapPin" | "locationiOS" | "locationiOSFilled" | "locationAndroid" | "coggle" | "warningFilled" | "notice" | "noticeFilled" | "noticePlain" | "info" | "infoFilled" | "canceled" | "errorFilled" | "legalValue" | "refund" | "reload" | "history" | "edit" | "battery" | "trashcan" | "calendar" | "profile" | "familySharing" | "lightbulb" | "magicWand" | "sparkles" | "starEmpty" | "starFilled" | "starOff" | "heartEmpty" | "heartFilled" | "heartOff" | "switchOff" | "switchCard" | "fingerprint" | "touch" | "device" | "deviceVibration" | "contactless" | "signal" | "notification" | "keyboard" | "keyboardDown" | "dotMenu" | "barcode" | "save" | "login" | "logout" | "ladybug" | "tag" | "gallery" | "externalLink" | "externalLinkSmall" | "forward" | "cancel" | "compare" | "instruction" | "terms" | "help" | "accessibility" | "car" | "healthCard" | "chevronRight" | "chevronLeft" | "chevronBottom" | "chevronTop" | "chevronRightListItem" | "closeLarge" | "closeMedium" | "closeSmall" | "arrowBottom" | "arrowLeft" | "arrowTop" | "arrowRight" | "backiOS" | "backAndroid" | "checkTick" | "checkTickBig" | "read" | "light" | "lightFilled" | "navMessages" | "navMessagesFocused" | "navWallet" | "navWalletFocused" | "navQrWallet" | "navScan" | "navServices" | "navServicesFocused" | "navProfile" | "navProfileFocused" | "navPsp" | "legRadioOn" | "legRadioOff" | "legCheckOn" | "legCheckOff" | "biomFingerprint" | "biomFaceID" | "categCulture" | "categWellness" | "categLearning" | "categSport" | "categHome" | "categTelco" | "categFinance" | "categTravel" | "categMobility" | "categJobOffers" | "categShopping" | "categSustainability" | "productIOApp" | "productPagoPA" | "productIOAppBlueBg" | "systemSettingsAndroid" | "systemSettingsiOS" | "systemToggleInstructions" | "systemAppsAndroid" | "systemNotificationsInstructions" | "systemPermissionsAndroid" | "systemLocationiOS" | "systemPhotosiOS" | "systemPrivacyiOS" | "systemBiometricRecognitionOS" | "systemNFC" | "systemPasswordAndroid" | "systemPasswordiOS" | undefined;
|
|
42
42
|
/**
|
|
43
43
|
* @default start
|
|
44
44
|
*/
|
|
@@ -8,6 +8,9 @@ export declare const h2LineHeight = 34;
|
|
|
8
8
|
* `H2` typographic style
|
|
9
9
|
*/
|
|
10
10
|
export declare const H2: React.ForwardRefExoticComponent<Omit<IOTextProps, "style" | "lineHeight" | "fontStyle" | "size" | "color" | "font" | "weight"> & {
|
|
11
|
+
/**
|
|
12
|
+
* `H2` typographic style
|
|
13
|
+
*/
|
|
11
14
|
textStyle?: import("./IOText").IOTextStyle | undefined;
|
|
12
15
|
style?: import("./IOText").IOTextStyle | undefined;
|
|
13
16
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"H2.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/H2.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAU,WAAW,EAAyB,MAAM,UAAU,CAAC;AAItE,eAAO,MAAM,UAAU,EAAE,UAAe,CAAC;AACzC,eAAO,MAAM,YAAY,KAAK,CAAC;AAU/B;;GAEG;AACH,eAAO,MAAM,EAAE;;;;;
|
|
1
|
+
{"version":3,"file":"H2.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/H2.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAU,WAAW,EAAyB,MAAM,UAAU,CAAC;AAItE,eAAO,MAAM,UAAU,EAAE,UAAe,CAAC;AACzC,eAAO,MAAM,YAAY,KAAK,CAAC;AAU/B;;GAEG;AACH,eAAO,MAAM,EAAE;IAHf;;OAEG;;;;;8BAsBF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOText.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/IOText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;AACnE,OAAO,EAEL,qBAAqB,EACrB,IAAI,EACJ,SAAS,EACT,IAAI,EACL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAc,MAAM,YAAY,CAAC;AAElD,OAAO,EACL,YAAY,
|
|
1
|
+
{"version":3,"file":"IOText.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/IOText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;AACnE,OAAO,EAEL,qBAAqB,EACrB,IAAI,EACJ,SAAS,EACT,IAAI,EACL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAc,MAAM,YAAY,CAAC;AAElD,OAAO,EACL,YAAY,EACZ,YAAY,EAGb,MAAM,mBAAmB,CAAC;AAE3B;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,CAC5B,SAAS,EACT,YAAY,GAAG,UAAU,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,CACtE,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,WAAW,EACX,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,WAAW,CAC5E,GAAG;IAAE,SAAS,CAAC,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,WAAW,CAAA;CAAE,GAAG;IACrD,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;CAClC,CAAC;AAEF;;;GAGG;AACH,KAAK,eAAe,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,KAAK,mBAAmB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;AAEtE,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,mBAAmB,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GACnC;IACE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACjD,GACD;IAAE,KAAK,CAAC,EAAE,QAAQ,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAezC;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,oGAoElB,CAAC"}
|
|
@@ -28,7 +28,7 @@ export declare const IOStyles: {
|
|
|
28
28
|
alignItems: "center";
|
|
29
29
|
};
|
|
30
30
|
horizontalContentPadding: {
|
|
31
|
-
paddingHorizontal: 16 |
|
|
31
|
+
paddingHorizontal: 16 | 32 | 8 | 24 | 48;
|
|
32
32
|
};
|
|
33
33
|
row: {
|
|
34
34
|
flexDirection: "row";
|
|
@@ -46,7 +46,7 @@ export declare const IOStyles: {
|
|
|
46
46
|
footer: {
|
|
47
47
|
backgroundColor: string;
|
|
48
48
|
paddingBottom: number;
|
|
49
|
-
paddingHorizontal: 16 |
|
|
49
|
+
paddingHorizontal: 16 | 32 | 8 | 24 | 48;
|
|
50
50
|
paddingTop: number;
|
|
51
51
|
shadowColor: string;
|
|
52
52
|
shadowOffset: {
|
|
@@ -183,8 +183,8 @@ interface IOListItemVisualParams {
|
|
|
183
183
|
export declare const IOListItemVisualParams: IOListItemVisualParams;
|
|
184
184
|
export declare const IOListItemStyles: {
|
|
185
185
|
listItem: {
|
|
186
|
-
paddingVertical: 16 | 4 | 6 |
|
|
187
|
-
paddingHorizontal: 16 |
|
|
186
|
+
paddingVertical: 16 | 4 | 6 | 12 | 20 | 28 | 32 | 8 | 24 | 48 | 40 | 56 | 64 | 72 | 80 | 96;
|
|
187
|
+
paddingHorizontal: 16 | 32 | 8 | 24 | 48;
|
|
188
188
|
marginHorizontal: number;
|
|
189
189
|
};
|
|
190
190
|
listItemInner: {
|
|
@@ -243,8 +243,8 @@ interface IOSelectionListItemVisualParams {
|
|
|
243
243
|
export declare const IOSelectionListItemVisualParams: IOSelectionListItemVisualParams;
|
|
244
244
|
export declare const IOSelectionListItemStyles: {
|
|
245
245
|
listItem: {
|
|
246
|
-
paddingVertical: 16 | 4 | 6 |
|
|
247
|
-
paddingHorizontal: 16 |
|
|
246
|
+
paddingVertical: 16 | 4 | 6 | 12 | 20 | 28 | 32 | 8 | 24 | 48 | 40 | 56 | 64 | 72 | 80 | 96;
|
|
247
|
+
paddingHorizontal: 16 | 32 | 8 | 24 | 48;
|
|
248
248
|
marginHorizontal: number;
|
|
249
249
|
};
|
|
250
250
|
listItemInner: {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export declare const useBoldTextEnabled: () => boolean;
|
|
6
6
|
/**
|
|
7
7
|
* Returns a font size multiplier based on the font scale of the device,
|
|
8
|
-
* but limited to the `
|
|
8
|
+
* but limited to the `IOMaxFontSizeMultiplier` value.
|
|
9
9
|
* @returns number
|
|
10
10
|
*/
|
|
11
11
|
export declare const useIOFontDynamicScale: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../../src/utils/accessibility.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../../src/utils/accessibility.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,kBAAkB,eA0B9B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,QAAO;IACvC,gBAAgB,EAAE,MAAM,CAAC;IACzB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;CAiB1B,CAAC"}
|
|
@@ -13,7 +13,7 @@ declare const fonts: {
|
|
|
13
13
|
readonly DMMono: string;
|
|
14
14
|
};
|
|
15
15
|
export type IOFontFamily = keyof typeof fonts;
|
|
16
|
-
declare const allFontSizes: (16 |
|
|
16
|
+
declare const allFontSizes: (16 | 12 | 14 | 20 | 22 | 26 | 28 | 32 | 17 | 31 | 35)[];
|
|
17
17
|
export type IOFontSize = (typeof allFontSizes)[number];
|
|
18
18
|
declare const weights: readonly ["Thin", "Light", "Regular", "Medium", "Semibold", "Bold", "Black"];
|
|
19
19
|
export type IOFontWeight = (typeof weights)[number];
|
|
@@ -39,7 +39,7 @@ type FontStyleObject = {
|
|
|
39
39
|
* @param isItalic
|
|
40
40
|
*/
|
|
41
41
|
export declare const makeFontFamilyName: (font: IOFontFamily, weight?: IOFontWeight, fontStyle?: TextStyle["fontStyle"]) => string;
|
|
42
|
-
export declare const
|
|
42
|
+
export declare const IOMaxFontSizeMultiplier = 1.5;
|
|
43
43
|
/**
|
|
44
44
|
* Return a {@link FontStyleObject} with the fields filled based on the platform (iOS or Android).
|
|
45
45
|
* @param size
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../src/utils/fonts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAY,SAAS,EAA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Y,GAAG,MAAM,OAAO,KAAK,CAAC;AAO9C,QAAA,MAAM,YAAY,0DAAmD,CAAC;AACtE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAMvD,QAAA,MAAM,OAAO,8EAQH,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpD,QAAA,MAAM,YAAY,4DAA6D,CAAC;AAChF,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,YAAY,EAAE,mBAAmB,CAQjE,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,UAAU,GAAG,MAAM,CAAC;IAG9B,UAAU,EAAE,MAAM,GAAG,YAAY,CAAC;IAClC,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,UAAU,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAeF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,SACvB,YAAY,WACV,YAAY,cACT,SAAS,CAAC,WAAW,CAAC,KAChC,MAQC,CAAC;AAQL,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C;;;;;;GAMG;AAEH,eAAO,MAAM,mBAAmB,uGAGlB,SAAS,CAAC,YAAY,CAAC,WAC3B,YAAY,cACT,SAAS,CAAC,WAAW,CAAC,gBACpB,OAAO,KACnB,eAkCF,CAAC"}
|
package/package.json
CHANGED
|
@@ -10,8 +10,8 @@ import { IOColors, useIOTheme } from "../../core";
|
|
|
10
10
|
import { useBoldTextEnabled } from "../../utils/accessibility";
|
|
11
11
|
import {
|
|
12
12
|
IOFontFamily,
|
|
13
|
-
IOFontSizeMultiplier,
|
|
14
13
|
IOFontWeight,
|
|
14
|
+
IOMaxFontSizeMultiplier,
|
|
15
15
|
makeFontStyleObject
|
|
16
16
|
} from "../../utils/fonts";
|
|
17
17
|
|
|
@@ -142,7 +142,7 @@ export const IOText = forwardRef<View, IOTextProps>(
|
|
|
142
142
|
/* Accessible typography based on the `fontScale` parameter */
|
|
143
143
|
const accessibleFontSizeProps: ComponentProps<typeof Text> = {
|
|
144
144
|
allowFontScaling,
|
|
145
|
-
maxFontSizeMultiplier: maxFontSizeMultiplier ??
|
|
145
|
+
maxFontSizeMultiplier: maxFontSizeMultiplier ?? IOMaxFontSizeMultiplier
|
|
146
146
|
};
|
|
147
147
|
|
|
148
148
|
return (
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
2
|
import { AccessibilityInfo, Platform, useWindowDimensions } from "react-native";
|
|
3
|
-
import {
|
|
4
|
-
import { IOFontSizeMultiplier } from "./fonts";
|
|
3
|
+
import { IOMaxFontSizeMultiplier } from "./fonts";
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* Query whether a bold text is currently enabled. The result is true
|
|
@@ -37,7 +36,7 @@ export const useBoldTextEnabled = () => {
|
|
|
37
36
|
|
|
38
37
|
/**
|
|
39
38
|
* Returns a font size multiplier based on the font scale of the device,
|
|
40
|
-
* but limited to the `
|
|
39
|
+
* but limited to the `IOMaxFontSizeMultiplier` value.
|
|
41
40
|
* @returns number
|
|
42
41
|
*/
|
|
43
42
|
export const useIOFontDynamicScale = (): {
|
|
@@ -45,17 +44,15 @@ export const useIOFontDynamicScale = (): {
|
|
|
45
44
|
spacingScaleMultiplier: number;
|
|
46
45
|
hugeFontEnabled: boolean;
|
|
47
46
|
} => {
|
|
48
|
-
const { isExperimental } = useIOExperimentalDesign();
|
|
49
47
|
const { fontScale } = useWindowDimensions();
|
|
50
48
|
|
|
51
|
-
const
|
|
52
|
-
const hugeFontEnabled = deviceFontScale >= 1.35;
|
|
49
|
+
const hugeFontEnabled = fontScale >= 1.35;
|
|
53
50
|
|
|
54
|
-
const dynamicFontScale = Math.min(
|
|
51
|
+
const dynamicFontScale = Math.min(fontScale, IOMaxFontSizeMultiplier);
|
|
55
52
|
/* We make the spacing dynamic based on the font scale, but we multiply
|
|
56
53
|
this value to limit the amount of scaling applied to the spacing */
|
|
57
54
|
const spacingScaleMultiplier =
|
|
58
|
-
dynamicFontScale <=
|
|
55
|
+
dynamicFontScale <= IOMaxFontSizeMultiplier ? 1 : 0.8;
|
|
59
56
|
|
|
60
57
|
return {
|
|
61
58
|
hugeFontEnabled,
|
package/src/utils/fonts.ts
CHANGED
|
@@ -122,7 +122,7 @@ export const makeFontFamilyName = (
|
|
|
122
122
|
const defaultFont: IOFontFamily = "TitilliumSansPro";
|
|
123
123
|
const defaultWeight: IOFontWeight = "Regular";
|
|
124
124
|
const defaultFontSize: IOFontSize = 16;
|
|
125
|
-
export const
|
|
125
|
+
export const IOMaxFontSizeMultiplier = 1.5;
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
128
|
* Return a {@link FontStyleObject} with the fields filled based on the platform (iOS or Android).
|