@pagopa/io-app-design-system 5.3.3 → 5.3.5
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/banner/Banner.js +1 -1
- package/lib/commonjs/components/banner/Banner.js.map +1 -1
- package/lib/commonjs/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +3 -0
- package/lib/commonjs/components/listitems/ListItemHeader.js +14 -4
- package/lib/commonjs/components/listitems/ListItemHeader.js.map +1 -1
- package/lib/commonjs/components/searchInput/SearchInput.js +5 -4
- package/lib/commonjs/components/searchInput/SearchInput.js.map +1 -1
- package/lib/commonjs/components/stepper/Stepper.js +11 -11
- package/lib/commonjs/components/stepper/Stepper.js.map +1 -1
- package/lib/commonjs/components/textInput/TextInputBase.js +21 -3
- package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
- package/lib/commonjs/core/IOColors.js +3 -1
- package/lib/commonjs/core/IOColors.js.map +1 -1
- package/lib/commonjs/hooks/useAccordionAnimation.js +1 -0
- package/lib/commonjs/hooks/useAccordionAnimation.js.map +1 -1
- package/lib/module/components/banner/Banner.js +1 -1
- package/lib/module/components/banner/Banner.js.map +1 -1
- package/lib/module/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +3 -0
- package/lib/module/components/listitems/ListItemHeader.js +16 -6
- package/lib/module/components/listitems/ListItemHeader.js.map +1 -1
- package/lib/module/components/searchInput/SearchInput.js +5 -4
- package/lib/module/components/searchInput/SearchInput.js.map +1 -1
- package/lib/module/components/stepper/Stepper.js +13 -13
- package/lib/module/components/stepper/Stepper.js.map +1 -1
- package/lib/module/components/textInput/TextInputBase.js +22 -4
- package/lib/module/components/textInput/TextInputBase.js.map +1 -1
- package/lib/module/core/IOColors.js +3 -1
- package/lib/module/core/IOColors.js.map +1 -1
- package/lib/module/hooks/useAccordionAnimation.js +1 -0
- package/lib/module/hooks/useAccordionAnimation.js.map +1 -1
- package/lib/typescript/components/listitems/ListItemHeader.d.ts +2 -1
- package/lib/typescript/components/listitems/ListItemHeader.d.ts.map +1 -1
- package/lib/typescript/components/searchInput/SearchInput.d.ts.map +1 -1
- package/lib/typescript/components/stepper/Stepper.d.ts.map +1 -1
- package/lib/typescript/components/textInput/TextInputBase.d.ts +2 -1
- package/lib/typescript/components/textInput/TextInputBase.d.ts.map +1 -1
- package/lib/typescript/components/textInput/TextInputValidation.d.ts +1 -0
- package/lib/typescript/components/textInput/TextInputValidation.d.ts.map +1 -1
- package/lib/typescript/core/IOColors.d.ts +1 -1
- package/lib/typescript/core/IOColors.d.ts.map +1 -1
- package/lib/typescript/core/IOStyles.d.ts +2 -2
- package/lib/typescript/hooks/useAccordionAnimation.d.ts +1 -0
- package/lib/typescript/hooks/useAccordionAnimation.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/banner/Banner.tsx +1 -1
- package/src/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +3 -0
- package/src/components/listitems/ListItemHeader.tsx +15 -2
- package/src/components/searchInput/SearchInput.tsx +9 -4
- package/src/components/stepper/Stepper.tsx +23 -16
- package/src/components/textInput/TextInputBase.tsx +30 -2
- package/src/core/IOColors.ts +3 -1
- package/src/hooks/useAccordionAnimation.tsx +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputBase.d.ts","sourceRoot":"","sources":["../../../../src/components/textInput/TextInputBase.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EACZ,SAAS,EAMV,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TextInputBase.d.ts","sourceRoot":"","sources":["../../../../src/components/textInput/TextInputBase.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EACZ,SAAS,EAMV,MAAM,OAAO,CAAC;AAqBf,OAAO,EACL,QAAQ,EAKT,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,gBAAgB,EAAuB,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAmB,OAAO,EAAQ,MAAM,UAAU,CAAC;AAI1D,KAAK,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;AAEhE,KAAK,cAAc,GAAG,UAAU,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iCAAiC,CAAC,EAAE,MAAM,CAAC;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,QAAQ,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAiJH,eAAO,MAAM,aAAa,GAAI,kRAqB3B,cAAc,sBA+UhB,CAAC"}
|
|
@@ -18,6 +18,7 @@ export declare const TextInputValidation: React.ForwardRefExoticComponent<Omit<{
|
|
|
18
18
|
icon?: IOIcons;
|
|
19
19
|
rightElement?: React.ReactNode;
|
|
20
20
|
counterLimit?: number;
|
|
21
|
+
accessibilityAnnounceLimitReached?: string;
|
|
21
22
|
bottomMessage?: string;
|
|
22
23
|
bottomMessageColor?: IOColors;
|
|
23
24
|
disabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputValidation.d.ts","sourceRoot":"","sources":["../../../../src/components/textInput/TextInputValidation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAM/C,OAAO,EAAmB,OAAO,EAAQ,MAAM,UAAU,CAAC;AAG1D,MAAM,MAAM,qBAAqB,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAsC/E,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"TextInputValidation.d.ts","sourceRoot":"","sources":["../../../../src/components/textInput/TextInputValidation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAM/C,OAAO,EAAmB,OAAO,EAAQ,MAAM,UAAU,CAAC;AAG1D,MAAM,MAAM,qBAAqB,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAsC/E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;IAhC9B;;;;OAIG;gBACS,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,qBAAqB;IAC9D;;OAEG;kBACW,MAAM;IACpB;;OAEG;qBACc,QAAQ,GAAG,YAAY;IACxC;;OAEG;8BACuB,MAAM;qDA+IjC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -145,7 +145,7 @@ export declare const IOColorsExtra: {
|
|
|
145
145
|
"blueItalia-50": string;
|
|
146
146
|
};
|
|
147
147
|
export type IOColorsExtra = keyof typeof IOColorsExtra;
|
|
148
|
-
declare const themeKeys: readonly ["appBackground-primary", "appBackground-secondary", "appBackground-tertiary", "appBackground-accent", "interactiveElem-default", "interactiveElem-pressed", "interactiveElem-disabled", "interactiveOutline-disabled", "neutralButton-default", "neutralButton-pressed", "neutralButton-disabled", "buttonText-default", "buttonText-danger", "buttonText-disabled", "listItem-pressed", "textHeading-default", "textHeading-secondary", "textHeading-tertiary", "textBody-default", "textBody-secondary", "textBody-tertiary", "cardBorder-default", "textInputBorder-default", "icon-default", "icon-decorative", "textInputBorder-default", "textInputLabel-default", "textInputValue-default", "textInputValue-disabled", "otpInputBorder-default", "otpInputBorder-error", "switch-background-off", "switch-background-on", "switch-thumb-color", "selection-border-off", "selection-background-on", "selection-tick", "divider-header", "divider-default", "divider-bottomBar", "pdfViewer-background", "skeleton-background", "tab-item-border-default", "tab-item-foreground-default", "tab-item-foreground-selected", "tab-item-background-selected", "errorIcon", "errorText", "successIcon", "successText", "warningIcon", "infoIcon", "pictogram-hands", "pictogram-tint-main", "pictogram-tint-secondary", "pictogram-tint-tertiary"];
|
|
148
|
+
declare const themeKeys: readonly ["appBackground-primary", "appBackground-secondary", "appBackground-tertiary", "appBackground-accent", "interactiveElem-default", "interactiveElem-pressed", "interactiveElem-disabled", "interactiveOutline-disabled", "neutralButton-default", "neutralButton-pressed", "neutralButton-disabled", "buttonText-default", "buttonText-danger", "buttonText-disabled", "listItem-pressed", "textHeading-default", "textHeading-secondary", "textHeading-tertiary", "textBody-default", "textBody-secondary", "textBody-tertiary", "cardBorder-default", "textInputBorder-default", "stepper-default", "icon-default", "icon-decorative", "textInputBorder-default", "textInputLabel-default", "textInputValue-default", "textInputValue-disabled", "otpInputBorder-default", "otpInputBorder-error", "switch-background-off", "switch-background-on", "switch-thumb-color", "selection-border-off", "selection-background-on", "selection-tick", "divider-header", "divider-default", "divider-bottomBar", "pdfViewer-background", "skeleton-background", "tab-item-border-default", "tab-item-foreground-default", "tab-item-foreground-selected", "tab-item-background-selected", "errorIcon", "errorText", "successIcon", "successText", "warningIcon", "infoIcon", "pictogram-hands", "pictogram-tint-main", "pictogram-tint-secondary", "pictogram-tint-tertiary"];
|
|
149
149
|
export type IOTheme = {
|
|
150
150
|
[K in (typeof themeKeys)[number]]: IOColors;
|
|
151
151
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOColors.d.ts","sourceRoot":"","sources":["../../../src/core/IOColors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,cAAc,MAAM,8BAA8B,CAAC;AAyB/D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DnB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,QAAQ,CAAC;AAE7C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;CAgB3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAE7D,eAAO,MAAM,sBAAsB,GACjC,YAAY,gBAAgB,KAC3B,cAAc,CAAC,OAAO,cAAc,CAAC,CAAC,QAAQ,CAGhD,CAAC;AAMF,eAAO,MAAM,eAAe;;;;;;;;;;;;CAY1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,eAAe,CAAC;AAE3D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;CAgBxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,aAAa,CAAC;AAEvD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;CAqBzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,cAAc,CAAC;AAEzD,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,cAAc,EACd,WAAW,GAAG,aAAa,GAAG,UAAU,GAAG,aAAa,CACzD,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,cAAc,EACd,WAAW,GAAG,aAAa,GAAG,UAAU,GAAG,aAAa,CACzD,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;CAMzB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,aAAa,CAAC;AAMvD,QAAA,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"IOColors.d.ts","sourceRoot":"","sources":["../../../src/core/IOColors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,cAAc,MAAM,8BAA8B,CAAC;AAyB/D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DnB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,QAAQ,CAAC;AAE7C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;CAgB3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAE7D,eAAO,MAAM,sBAAsB,GACjC,YAAY,gBAAgB,KAC3B,cAAc,CAAC,OAAO,cAAc,CAAC,CAAC,QAAQ,CAGhD,CAAC;AAMF,eAAO,MAAM,eAAe;;;;;;;;;;;;CAY1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,eAAe,CAAC;AAE3D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;CAgBxB,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,aAAa,CAAC;AAEvD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;CAqBzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,cAAc,CAAC;AAEzD,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,cAAc,EACd,WAAW,GAAG,aAAa,GAAG,UAAU,GAAG,aAAa,CACzD,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,cAAc,EACd,WAAW,GAAG,aAAa,GAAG,UAAU,GAAG,aAAa,CACzD,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;CAMzB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,aAAa,CAAC;AAMvD,QAAA,MAAM,SAAS,izCAmEL,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG;KACnB,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,GAAG,QAAQ;CAC5C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,OAkE1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,OAgEzB,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;CAiBrC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GACpC,MAAM,OAAO,0BAA0B,CAAC;AAE1C,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC5C,WAAW,CAAC,0BAA0B,CAAC,EACvC,cAAc,CAkBf,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,OAAO,yBAAyB,CAAC;AAM/E;;;;GAIG;AAEH,eAAO,MAAM,SAAS,GAAI,SAAS,UAAU,EAAE,UAAS,MAAU,WAQjE,CAAC"}
|
|
@@ -154,7 +154,7 @@ interface IOListItemVisualParams {
|
|
|
154
154
|
export declare const IOListItemVisualParams: IOListItemVisualParams;
|
|
155
155
|
export declare const IOListItemStyles: {
|
|
156
156
|
listItem: {
|
|
157
|
-
paddingVertical:
|
|
157
|
+
paddingVertical: 16 | 4 | 6 | 20 | 12 | 28 | 32 | 8 | 24 | 48 | 40 | 56 | 64 | 72 | 80 | 96;
|
|
158
158
|
paddingHorizontal: 16 | 32 | 8 | 24 | 48;
|
|
159
159
|
marginHorizontal: number;
|
|
160
160
|
};
|
|
@@ -196,7 +196,7 @@ interface IOSelectionListItemVisualParams {
|
|
|
196
196
|
export declare const IOSelectionListItemVisualParams: IOSelectionListItemVisualParams;
|
|
197
197
|
export declare const IOSelectionListItemStyles: {
|
|
198
198
|
listItem: {
|
|
199
|
-
paddingVertical:
|
|
199
|
+
paddingVertical: 16 | 4 | 6 | 20 | 12 | 28 | 32 | 8 | 24 | 48 | 40 | 56 | 64 | 72 | 80 | 96;
|
|
200
200
|
paddingHorizontal: 16 | 32 | 8 | 24 | 48;
|
|
201
201
|
marginHorizontal: number;
|
|
202
202
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccordionAnimation.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAccordionAnimation.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAUlE,KAAK,MAAM,GAAG;IACZ,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,sBAEnC,MAAW;;IAwDV;;OAEG;;IAEH;;OAEG;;;;;;IAEH;;OAEG;0BArCK,iBAAiB;IAuCzB;;OAEG;;;;;;IAEH;;OAEG
|
|
1
|
+
{"version":3,"file":"useAccordionAnimation.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAccordionAnimation.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAUlE,KAAK,MAAM,GAAG;IACZ,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,sBAEnC,MAAW;;IAwDV;;OAEG;;IAEH;;OAEG;;;;;;IAEH;;OAEG;0BArCK,iBAAiB;IAuCzB;;OAEG;;;;;;IAEH;;OAEG;;;;;;;CAGN,CAAC"}
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@ import { BodySmall, buttonTextFontSize, H6, IOText } from "../typography";
|
|
|
29
29
|
|
|
30
30
|
/* Styles */
|
|
31
31
|
const sizePictogram: IOPictogramSizeScale = 80;
|
|
32
|
-
const closeButtonDistanceFromEdge: number =
|
|
32
|
+
const closeButtonDistanceFromEdge: number = 10;
|
|
33
33
|
const closeButtonOpacity = 0.6;
|
|
34
34
|
const bannerPadding = IOBannerBigSpacing;
|
|
35
35
|
|
|
@@ -174,6 +174,7 @@ exports[`ClaimsSelector ClaimsSelector Snapshot (controlled) 1`] = `
|
|
|
174
174
|
"padding": 16,
|
|
175
175
|
"paddingTop": 0,
|
|
176
176
|
"position": "absolute",
|
|
177
|
+
"width": "100%",
|
|
177
178
|
},
|
|
178
179
|
{
|
|
179
180
|
"width": "100%",
|
|
@@ -703,6 +704,7 @@ exports[`ClaimsSelector ClaimsSelector Snapshot (uncontrolled) 1`] = `
|
|
|
703
704
|
"padding": 16,
|
|
704
705
|
"paddingTop": 0,
|
|
705
706
|
"position": "absolute",
|
|
707
|
+
"width": "100%",
|
|
706
708
|
},
|
|
707
709
|
{
|
|
708
710
|
"width": "100%",
|
|
@@ -1163,6 +1165,7 @@ exports[`ClaimsSelector ClaimsSelector Snapshot (unselectable items) 1`] = `
|
|
|
1163
1165
|
"padding": 16,
|
|
1164
1166
|
"paddingTop": 0,
|
|
1165
1167
|
"position": "absolute",
|
|
1168
|
+
"width": "100%",
|
|
1166
1169
|
},
|
|
1167
1170
|
{
|
|
1168
1171
|
"width": "100%",
|
|
@@ -3,8 +3,10 @@ import { View } from "react-native";
|
|
|
3
3
|
import {
|
|
4
4
|
IOListItemStyles,
|
|
5
5
|
IOListItemVisualParams,
|
|
6
|
+
IOSelectionListItemVisualParams,
|
|
6
7
|
IOSpacingScale,
|
|
7
8
|
IOStyles,
|
|
9
|
+
IOVisualCostants,
|
|
8
10
|
useIOTheme
|
|
9
11
|
} from "../../core";
|
|
10
12
|
import { useIOFontDynamicScale } from "../../utils/accessibility";
|
|
@@ -12,7 +14,8 @@ import { WithTestID } from "../../utils/types";
|
|
|
12
14
|
import { Badge } from "../badge";
|
|
13
15
|
import { ButtonLink, IconButton } from "../buttons";
|
|
14
16
|
import { IOIcons, Icon } from "../icons";
|
|
15
|
-
import { H6 } from "../typography";
|
|
17
|
+
import { BodySmall, H6 } from "../typography";
|
|
18
|
+
import { VSpacer } from "../spacer";
|
|
16
19
|
|
|
17
20
|
type ButtonLinkActionProps = {
|
|
18
21
|
type: "buttonLink";
|
|
@@ -45,18 +48,20 @@ export type ListItemHeader = WithTestID<{
|
|
|
45
48
|
label: string;
|
|
46
49
|
numberOfLines?: number;
|
|
47
50
|
endElement?: EndElementProps;
|
|
51
|
+
description?: string;
|
|
48
52
|
// Accessibility
|
|
49
53
|
accessibilityLabel?: string;
|
|
50
54
|
}> &
|
|
51
55
|
IconProps;
|
|
52
56
|
|
|
53
|
-
const iconMargin: IOSpacingScale =
|
|
57
|
+
const iconMargin: IOSpacingScale = IOVisualCostants.iconMargin;
|
|
54
58
|
|
|
55
59
|
export const ListItemHeader = ({
|
|
56
60
|
label,
|
|
57
61
|
iconName,
|
|
58
62
|
iconColor,
|
|
59
63
|
endElement,
|
|
64
|
+
description,
|
|
60
65
|
accessibilityLabel,
|
|
61
66
|
testID
|
|
62
67
|
}: ListItemHeader) => {
|
|
@@ -123,6 +128,14 @@ export const ListItemHeader = ({
|
|
|
123
128
|
</View>
|
|
124
129
|
)}
|
|
125
130
|
</View>
|
|
131
|
+
{description && (
|
|
132
|
+
<View>
|
|
133
|
+
<VSpacer size={IOSelectionListItemVisualParams.descriptionMargin} />
|
|
134
|
+
<BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
|
|
135
|
+
{description}
|
|
136
|
+
</BodySmall>
|
|
137
|
+
</View>
|
|
138
|
+
)}
|
|
126
139
|
</View>
|
|
127
140
|
);
|
|
128
141
|
};
|
|
@@ -48,11 +48,7 @@ import {
|
|
|
48
48
|
const inputPaddingHorizontal: IOSpacingScale = 12;
|
|
49
49
|
const inputPaddingClearButton: IOSpacingScale = 8;
|
|
50
50
|
const inputRadius: number = 8;
|
|
51
|
-
const inputBgColorDefault: ColorValue = IOColors["grey-50"];
|
|
52
|
-
const inputBgColorFocused: ColorValue = IOColors["grey-100"];
|
|
53
|
-
const inputColorPlaceholder: ColorValue = IOColors["grey-700"];
|
|
54
51
|
const iconMargin: IOSpacingScale = 8;
|
|
55
|
-
const iconColor: IOColors = "grey-700";
|
|
56
52
|
const iconSize: IOIconSizeScale = 16;
|
|
57
53
|
const iconCloseSize: IOIconSizeScale = 24;
|
|
58
54
|
const inputFontSizePlaceholder: IOFontSize = 14;
|
|
@@ -126,6 +122,14 @@ export const SearchInput = forwardRef<SearchInputRef, SearchInputProps>(
|
|
|
126
122
|
const theme = useIOTheme();
|
|
127
123
|
const inputCaretColor = IOColors[theme["interactiveElem-default"]];
|
|
128
124
|
|
|
125
|
+
const inputBgColorDefault: ColorValue =
|
|
126
|
+
IOColors[theme["appBackground-secondary"]];
|
|
127
|
+
const inputBgColorFocused: ColorValue =
|
|
128
|
+
IOColors[theme["appBackground-tertiary"]];
|
|
129
|
+
const inputColorPlaceholder: ColorValue =
|
|
130
|
+
IOColors[theme["textBody-tertiary"]];
|
|
131
|
+
const iconColor: IOColors = theme["textBody-tertiary"];
|
|
132
|
+
|
|
129
133
|
/* Widths used for the transition:
|
|
130
134
|
- `SearchInput` entire width
|
|
131
135
|
- `Cancel` button */
|
|
@@ -258,6 +262,7 @@ export const SearchInput = forwardRef<SearchInputRef, SearchInputProps>(
|
|
|
258
262
|
accessibilityLabel={accessibilityLabel}
|
|
259
263
|
style={[
|
|
260
264
|
{
|
|
265
|
+
color: IOColors[theme["textBody-default"]],
|
|
261
266
|
...makeFontStyleObject(
|
|
262
267
|
inputFontSizePlaceholder,
|
|
263
268
|
newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
|
|
@@ -1,40 +1,47 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { ColorValue, View } from "react-native";
|
|
3
|
+
import {
|
|
4
|
+
IOColors,
|
|
5
|
+
IOSpacer,
|
|
6
|
+
IOStyles,
|
|
7
|
+
IOVisualCostants,
|
|
8
|
+
useIOTheme
|
|
9
|
+
} from "../../core";
|
|
4
10
|
|
|
5
11
|
type StepperProps = {
|
|
6
12
|
steps: number;
|
|
7
13
|
currentStep: number;
|
|
8
14
|
};
|
|
9
|
-
const STEPPER_SPACE: IOSpacer = 4;
|
|
10
|
-
|
|
11
|
-
const colorMap: Record<string, IOColors> = {
|
|
12
|
-
active: "blueIO-500"
|
|
13
|
-
};
|
|
14
15
|
|
|
15
16
|
export const Stepper = ({ steps, currentStep }: StepperProps) => {
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
const theme = useIOTheme();
|
|
18
|
+
|
|
19
|
+
const STEPPER_SPACE: IOSpacer = 4;
|
|
20
|
+
|
|
21
|
+
const colorMap: Record<string, ColorValue> = {
|
|
22
|
+
default: IOColors[theme["stepper-default"]],
|
|
23
|
+
active: IOColors[theme["interactiveElem-default"]]
|
|
21
24
|
};
|
|
22
25
|
|
|
23
26
|
return (
|
|
24
27
|
<View style={{ paddingHorizontal: IOVisualCostants.appMarginDefault }}>
|
|
25
28
|
<View
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
style={[
|
|
30
|
+
IOStyles.flex,
|
|
31
|
+
IOStyles.rowSpaceBetween,
|
|
32
|
+
{ gap: STEPPER_SPACE }
|
|
33
|
+
]}
|
|
28
34
|
>
|
|
29
35
|
{[...Array(steps)].map((_, i) => (
|
|
30
36
|
<View
|
|
31
37
|
key={i}
|
|
32
38
|
style={{
|
|
33
39
|
borderRadius: 2,
|
|
40
|
+
borderCurve: "continuous",
|
|
34
41
|
borderBottomColor:
|
|
35
|
-
|
|
42
|
+
i > currentStep - 1 ? colorMap.default : colorMap.active,
|
|
36
43
|
borderBottomWidth: 2,
|
|
37
|
-
|
|
44
|
+
flex: 1
|
|
38
45
|
}}
|
|
39
46
|
/>
|
|
40
47
|
))}
|
|
@@ -8,6 +8,7 @@ import React, {
|
|
|
8
8
|
useState
|
|
9
9
|
} from "react";
|
|
10
10
|
import {
|
|
11
|
+
AccessibilityInfo,
|
|
11
12
|
ColorValue,
|
|
12
13
|
LayoutChangeEvent,
|
|
13
14
|
Platform,
|
|
@@ -55,6 +56,7 @@ type InputTextProps = WithTestID<{
|
|
|
55
56
|
icon?: IOIcons;
|
|
56
57
|
rightElement?: ReactNode;
|
|
57
58
|
counterLimit?: number;
|
|
59
|
+
accessibilityAnnounceLimitReached?: string;
|
|
58
60
|
bottomMessage?: string;
|
|
59
61
|
bottomMessageColor?: IOColors;
|
|
60
62
|
disabled?: boolean;
|
|
@@ -125,6 +127,7 @@ type InputTextHelperRow = Pick<
|
|
|
125
127
|
| "bottomMessage"
|
|
126
128
|
| "bottomMessageColor"
|
|
127
129
|
| "inputType"
|
|
130
|
+
| "textInputProps"
|
|
128
131
|
>;
|
|
129
132
|
|
|
130
133
|
const HelperRow = ({
|
|
@@ -132,7 +135,8 @@ const HelperRow = ({
|
|
|
132
135
|
counterLimit,
|
|
133
136
|
bottomMessage,
|
|
134
137
|
bottomMessageColor,
|
|
135
|
-
inputType
|
|
138
|
+
inputType,
|
|
139
|
+
textInputProps
|
|
136
140
|
}: InputTextHelperRow) => {
|
|
137
141
|
const theme = useIOTheme();
|
|
138
142
|
|
|
@@ -142,6 +146,13 @@ const HelperRow = ({
|
|
|
142
146
|
[inputType, value]
|
|
143
147
|
);
|
|
144
148
|
|
|
149
|
+
const helperAccessibilityLabel = useMemo(() => {
|
|
150
|
+
if (textInputProps?.keyboardType === "numeric") {
|
|
151
|
+
return `${value.split("").join(" ")}, ${valueCount} / ${counterLimit}`;
|
|
152
|
+
}
|
|
153
|
+
return `${value}, ${valueCount}`;
|
|
154
|
+
}, [value, valueCount, counterLimit, textInputProps]);
|
|
155
|
+
|
|
145
156
|
const bottomMessageColorDefault: IOColors = theme["textBody-tertiary"];
|
|
146
157
|
const bottomMessageColorValue =
|
|
147
158
|
bottomMessageColor ?? bottomMessageColorDefault;
|
|
@@ -188,7 +199,9 @@ const HelperRow = ({
|
|
|
188
199
|
)}
|
|
189
200
|
{counterLimit && (
|
|
190
201
|
<BodySmall
|
|
202
|
+
accessibilityLiveRegion="polite"
|
|
191
203
|
weight="Regular"
|
|
204
|
+
accessibilityLabel={helperAccessibilityLabel}
|
|
192
205
|
color={bottomMessageColorValue}
|
|
193
206
|
>{`${valueCount} / ${counterLimit}`}</BodySmall>
|
|
194
207
|
)}
|
|
@@ -209,6 +222,7 @@ export const TextInputBase = ({
|
|
|
209
222
|
icon,
|
|
210
223
|
rightElement,
|
|
211
224
|
counterLimit,
|
|
225
|
+
accessibilityAnnounceLimitReached,
|
|
212
226
|
bottomMessage,
|
|
213
227
|
bottomMessageColor,
|
|
214
228
|
onBlur,
|
|
@@ -328,6 +342,18 @@ export const TextInputBase = ({
|
|
|
328
342
|
const actualTextLength =
|
|
329
343
|
inputType !== "default" ? text.replace(/\s/g, "").length : text.length;
|
|
330
344
|
|
|
345
|
+
// Notify the user when the limit is reached
|
|
346
|
+
// This is only for iOS, as Android handles it via accessibilityLiveRegion
|
|
347
|
+
if (
|
|
348
|
+
counterLimit &&
|
|
349
|
+
actualTextLength >= counterLimit &&
|
|
350
|
+
accessibilityAnnounceLimitReached &&
|
|
351
|
+
Platform.OS === "ios"
|
|
352
|
+
) {
|
|
353
|
+
AccessibilityInfo.announceForAccessibility(
|
|
354
|
+
accessibilityAnnounceLimitReached
|
|
355
|
+
);
|
|
356
|
+
}
|
|
331
357
|
if (counterLimit && actualTextLength > counterLimit) {
|
|
332
358
|
return;
|
|
333
359
|
}
|
|
@@ -340,7 +366,7 @@ export const TextInputBase = ({
|
|
|
340
366
|
onChangeText(text);
|
|
341
367
|
}
|
|
342
368
|
},
|
|
343
|
-
[counterLimit, onChangeText, inputType]
|
|
369
|
+
[counterLimit, onChangeText, inputType, accessibilityAnnounceLimitReached]
|
|
344
370
|
);
|
|
345
371
|
|
|
346
372
|
const onBlurHandler = useCallback(() => {
|
|
@@ -434,6 +460,7 @@ export const TextInputBase = ({
|
|
|
434
460
|
accessibilityState={{ disabled }}
|
|
435
461
|
accessibilityLabel={accessibilityLabel ?? placeholder}
|
|
436
462
|
accessibilityHint={accessibilityHint}
|
|
463
|
+
accessibilityLiveRegion="polite"
|
|
437
464
|
selectionColor={IOColors[theme["interactiveElem-default"]]} // Caret on iOS
|
|
438
465
|
cursorColor={IOColors[theme["interactiveElem-default"]]} // Caret Android
|
|
439
466
|
maxLength={adjustedMaxLength}
|
|
@@ -533,6 +560,7 @@ export const TextInputBase = ({
|
|
|
533
560
|
bottomMessageColor={bottomMessageColor}
|
|
534
561
|
counterLimit={counterLimit}
|
|
535
562
|
inputType={inputType}
|
|
563
|
+
textInputProps={textInputProps}
|
|
536
564
|
/>
|
|
537
565
|
)}
|
|
538
566
|
</>
|
package/src/core/IOColors.ts
CHANGED
|
@@ -227,6 +227,7 @@ const themeKeys = [
|
|
|
227
227
|
// Design System related
|
|
228
228
|
"cardBorder-default",
|
|
229
229
|
"textInputBorder-default",
|
|
230
|
+
"stepper-default",
|
|
230
231
|
"icon-default",
|
|
231
232
|
"icon-decorative",
|
|
232
233
|
// Inputs
|
|
@@ -254,7 +255,6 @@ const themeKeys = [
|
|
|
254
255
|
"tab-item-foreground-default",
|
|
255
256
|
"tab-item-foreground-selected",
|
|
256
257
|
"tab-item-background-selected",
|
|
257
|
-
|
|
258
258
|
// Status
|
|
259
259
|
"errorIcon",
|
|
260
260
|
"errorText",
|
|
@@ -300,6 +300,7 @@ export const IOThemeLight: IOTheme = {
|
|
|
300
300
|
// Design System related
|
|
301
301
|
"cardBorder-default": "grey-100",
|
|
302
302
|
"icon-default": "grey-650",
|
|
303
|
+
"stepper-default": "grey-200",
|
|
303
304
|
"icon-decorative": "grey-300",
|
|
304
305
|
// Inputs
|
|
305
306
|
"textInputBorder-default": "grey-200",
|
|
@@ -368,6 +369,7 @@ export const IOThemeDark: IOTheme = {
|
|
|
368
369
|
"cardBorder-default": "grey-850",
|
|
369
370
|
"icon-default": "grey-450",
|
|
370
371
|
"icon-decorative": "grey-650",
|
|
372
|
+
"stepper-default": "grey-700",
|
|
371
373
|
// Inputs
|
|
372
374
|
"textInputBorder-default": "grey-850",
|
|
373
375
|
"textInputLabel-default": "grey-450",
|