@midas-ds/components 6.2.0 → 7.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 +16 -0
- package/character-counter/CharacterCounter.d.ts +3 -0
- package/character-counter/index.d.ts +1 -0
- package/field-error/FieldError.d.ts +3 -0
- package/field-error/index.d.ts +1 -0
- package/index.cjs +29 -29
- package/index.css +1 -1
- package/index.d.ts +2 -1
- package/index.js +6236 -6268
- package/package.json +1 -1
- package/textfield/Input.d.ts +4 -0
- package/textfield/PasswordField.d.ts +3 -0
- package/textfield/TextArea.d.ts +7 -0
- package/textfield/TextField.d.ts +5 -23
- package/textfield/TextFieldBase.d.ts +18 -0
- package/textfield/index.d.ts +3 -0
- package/textfield/intl/translations.json.d.ts +85 -0
- package/theme/index.d.ts +7 -0
- package/theme/tokens.d.ts +7 -0
- package/theme.cjs +1 -1
- package/theme.js +4 -3
- package/{tokens-DzCqA9U7.cjs → tokens-CG8BaZyJ.cjs} +1 -1
- package/{tokens-DeYazHS9.js → tokens-XrriCAqI.js} +11 -3
- package/utils/intl/index.d.ts +2 -0
- package/utils/intl/useLocalizedStringFormatter.d.ts +11 -0
- package/utils/intl/useMessageFormatter.d.ts +11 -0
- package/utils/test.d.ts +4 -0
- package/textarea/TextArea.d.ts +0 -20
- package/textarea/index.d.ts +0 -1
package/package.json
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TextFieldBaseProps } from './TextFieldBase';
|
|
2
|
+
import { TextAreaProps as AriaTextAreaProps } from 'react-aria-components';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export interface TextAreaProps extends Omit<TextFieldBaseProps, 'children' | 'type'> {
|
|
5
|
+
className?: AriaTextAreaProps['className'];
|
|
6
|
+
}
|
|
7
|
+
export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
package/textfield/TextField.d.ts
CHANGED
|
@@ -1,25 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TextFieldBaseProps } from './TextFieldBase';
|
|
2
|
+
import { InputProps } from './Input';
|
|
2
3
|
import * as React from 'react';
|
|
3
|
-
export interface TextFieldProps extends
|
|
4
|
-
|
|
5
|
-
/** Specify label displayed above the TextField*/
|
|
6
|
-
label?: string;
|
|
7
|
-
/** Specify description displayed below the label */
|
|
8
|
-
description?: string;
|
|
9
|
-
/** Custom error messages */
|
|
10
|
-
errorMessage?: string | ((validation: ValidationResult) => string) | undefined;
|
|
11
|
-
/** Enable validations or add your own regex */
|
|
12
|
-
validationType?: 'ssn' | 'dossnr' | RegExp;
|
|
13
|
-
/**
|
|
14
|
-
* Whether to show the character counter or not
|
|
15
|
-
* @default
|
|
16
|
-
* false
|
|
17
|
-
*/
|
|
18
|
-
showCounter?: boolean;
|
|
4
|
+
export interface TextFieldProps extends Omit<TextFieldBaseProps, 'children'> {
|
|
5
|
+
className?: InputProps['className'];
|
|
19
6
|
}
|
|
20
|
-
export declare const TextField: React.
|
|
21
|
-
type InputWrapperProps = Pick<TextFieldProps, 'label' | 'description' | 'errorMessage' | 'children'>;
|
|
22
|
-
export declare const InputWrapper: ({ label, description, errorMessage, children, }: InputWrapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
-
export declare const ssnRegEx: RegExp;
|
|
24
|
-
export declare const dossNrRegEx: RegExp;
|
|
25
|
-
export {};
|
|
7
|
+
export declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TextFieldProps, ValidationResult } from 'react-aria-components';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface TextFieldBaseProps extends Omit<TextFieldProps, 'className'> {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
/** Specify label displayed above the TextField*/
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Specify description displayed below the label */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Custom error messages */
|
|
10
|
+
errorMessage?: string | ((validation: ValidationResult) => string) | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Whether to show the character counter or not
|
|
13
|
+
* @default
|
|
14
|
+
* false
|
|
15
|
+
*/
|
|
16
|
+
showCounter?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const TextFieldBase: React.ForwardRefExoticComponent<TextFieldBaseProps & React.RefAttributes<HTMLDivElement>>;
|
package/textfield/index.d.ts
CHANGED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"en": {
|
|
3
|
+
"hide": "Hide",
|
|
4
|
+
"show": "Show"
|
|
5
|
+
},
|
|
6
|
+
"sv": {
|
|
7
|
+
"hide": "Dölj",
|
|
8
|
+
"show": "Visa"
|
|
9
|
+
},
|
|
10
|
+
"es": {
|
|
11
|
+
"hide": "Ocultar",
|
|
12
|
+
"show": "Mostrar"
|
|
13
|
+
},
|
|
14
|
+
"fr": {
|
|
15
|
+
"hide": "Cacher",
|
|
16
|
+
"show": "Afficher"
|
|
17
|
+
},
|
|
18
|
+
"de": {
|
|
19
|
+
"hide": "Verstecken",
|
|
20
|
+
"show": "Anzeigen"
|
|
21
|
+
},
|
|
22
|
+
"ja": {
|
|
23
|
+
"hide": "隠す",
|
|
24
|
+
"show": "表示"
|
|
25
|
+
},
|
|
26
|
+
"zh": {
|
|
27
|
+
"hide": "隐藏",
|
|
28
|
+
"show": "显示"
|
|
29
|
+
},
|
|
30
|
+
"ar": {
|
|
31
|
+
"hide": "إخفاء",
|
|
32
|
+
"show": "إظهار"
|
|
33
|
+
},
|
|
34
|
+
"ru": {
|
|
35
|
+
"hide": "Скрыть",
|
|
36
|
+
"show": "Показать"
|
|
37
|
+
},
|
|
38
|
+
"pt": {
|
|
39
|
+
"hide": "Ocultar",
|
|
40
|
+
"show": "Mostrar"
|
|
41
|
+
},
|
|
42
|
+
"it": {
|
|
43
|
+
"hide": "Nascondi",
|
|
44
|
+
"show": "Mostra"
|
|
45
|
+
},
|
|
46
|
+
"ko": {
|
|
47
|
+
"hide": "숨기기",
|
|
48
|
+
"show": "보여주기"
|
|
49
|
+
},
|
|
50
|
+
"hi": {
|
|
51
|
+
"hide": "छुपाएँ",
|
|
52
|
+
"show": "दिखाएँ"
|
|
53
|
+
},
|
|
54
|
+
"nl": {
|
|
55
|
+
"hide": "Verbergen",
|
|
56
|
+
"show": "Tonen"
|
|
57
|
+
},
|
|
58
|
+
"pl": {
|
|
59
|
+
"hide": "Ukryj",
|
|
60
|
+
"show": "Pokaż"
|
|
61
|
+
},
|
|
62
|
+
"tr": {
|
|
63
|
+
"hide": "Gizle",
|
|
64
|
+
"show": "Göster"
|
|
65
|
+
},
|
|
66
|
+
"vi": {
|
|
67
|
+
"hide": "Ẩn",
|
|
68
|
+
"show": "Hiện"
|
|
69
|
+
},
|
|
70
|
+
"th": {
|
|
71
|
+
"hide": "ซ่อน",
|
|
72
|
+
"show": "แสดง"
|
|
73
|
+
},
|
|
74
|
+
"id": {
|
|
75
|
+
"hide": "Sembunyikan",
|
|
76
|
+
"show": "Tampilkan"
|
|
77
|
+
},
|
|
78
|
+
"ms": {
|
|
79
|
+
"hide": "Sembunyikan",
|
|
80
|
+
"show": "Tunjukkan"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
;
|
|
84
|
+
|
|
85
|
+
export default _default;
|
package/theme/index.d.ts
CHANGED
package/theme/tokens.d.ts
CHANGED
package/theme.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./tokens-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./tokens-CG8BaZyJ.cjs"),e={...t.tokens};exports.baseColors=t.baseColors;exports.breakpoints=t.breakpoints;exports.semantic=t.semantic;exports.spacing=t.spacing;exports.states=t.states;exports.transitions=t.transitions;exports.typography=t.typography;exports.zIndex=t.zIndex;exports.theme=e;
|
package/theme.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as s } from "./tokens-
|
|
2
|
-
import { b as r, f as n, s as p, c as i, d as m, e as c, a as b } from "./tokens-
|
|
1
|
+
import { t as s } from "./tokens-XrriCAqI.js";
|
|
2
|
+
import { b as r, f as n, s as p, c as i, d as m, e as c, a as b, z as f } from "./tokens-XrriCAqI.js";
|
|
3
3
|
const t = { ...s };
|
|
4
4
|
export {
|
|
5
5
|
r as baseColors,
|
|
@@ -9,5 +9,6 @@ export {
|
|
|
9
9
|
m as states,
|
|
10
10
|
t as theme,
|
|
11
11
|
c as transitions,
|
|
12
|
-
b as typography
|
|
12
|
+
b as typography,
|
|
13
|
+
f as zIndex
|
|
13
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r={black:"#000000",white:"#ffffff",blackHover:"#0d0d0d",whiteHover:"#e6e6e6",gray10:"#f2f2f2",gray20:"#e6e6e6",gray30:"#d9d9d9",gray40:"#cccccc",gray50:"#bfbfbf",gray60:"#b3b3b3",gray70:"#a6a6a6",gray80:"#999999",gray90:"#8c8c8c",gray100:"#808080",gray110:"#737373",gray120:"#666666",gray130:"#5d5d5d",gray140:"#525252",gray150:"#474747",gray160:"#383838",gray170:"#333333",gray180:"#262626",gray190:"#212121",gray200:"#171717",blue10:"#eaf2f6",blue20:"#d5e5ed",blue40:"#abcbdb",blue60:"#82b0c9",blue80:"#5897b8",blue90:"#4289ad",blue100:"#2e7ca5",blue140:"#25607f",blue170:"#143c50",purple80:"#b46ab4",purple140:"#954b95",red100:"#b90835",signalBlue20:"#eaf2f6",signalBlue140:"#0066cc",signalGreen20:"#d5f2d9",signalGreen140:"#008d3c",signalRed20:"#ffdfdf",signalRed140:"#e62323",signalRed160:"#b31b1b",signalRed180:"#801313",signalYellow20:"#fff8e1",signalYellow140:"#fdb813"},
|
|
1
|
+
"use strict";const r={black:"#000000",white:"#ffffff",blackHover:"#0d0d0d",whiteHover:"#e6e6e6",gray10:"#f2f2f2",gray20:"#e6e6e6",gray30:"#d9d9d9",gray40:"#cccccc",gray50:"#bfbfbf",gray60:"#b3b3b3",gray70:"#a6a6a6",gray80:"#999999",gray90:"#8c8c8c",gray100:"#808080",gray110:"#737373",gray120:"#666666",gray130:"#5d5d5d",gray140:"#525252",gray150:"#474747",gray160:"#383838",gray170:"#333333",gray180:"#262626",gray190:"#212121",gray200:"#171717",blue10:"#eaf2f6",blue20:"#d5e5ed",blue40:"#abcbdb",blue60:"#82b0c9",blue80:"#5897b8",blue90:"#4289ad",blue100:"#2e7ca5",blue140:"#25607f",blue170:"#143c50",purple80:"#b46ab4",purple140:"#954b95",red100:"#b90835",signalBlue20:"#eaf2f6",signalBlue140:"#0066cc",signalGreen20:"#d5f2d9",signalGreen140:"#008d3c",signalRed20:"#ffdfdf",signalRed140:"#e62323",signalRed160:"#b31b1b",signalRed180:"#801313",signalYellow20:"#fff8e1",signalYellow140:"#fdb813"},e={fontFamily:'"Inter", sans-serif',lineHeight01:1,lineHeight02:1.125,lineHeight03:1.25,lineHeight04:1.375,lineHeight05:1.5,lineHeight06:1.75,lineHeight07:2,lineHeight08:2.25,lineHeight09:2.5,size01:"0.75rem",size02:"0.875rem",size03:"1rem",size04:"1.125rem",size05:"1.25rem",size06:"1.5rem",size07:"1.75rem",size08:"2rem",size09:"2.25rem",size10:"2.625rem",weightThin:100,weightExtraLight:200,weightLight:300,weightRegular:400,weightMedium:500,weightSemiBold:600,weightBold:700,weightExtraBold:800,weightBlack:900},a={"01":"0.125rem","02":"0.25rem","03":"0.5rem","04":"0.75rem","05":"1rem","06":"1.5rem","07":"2rem","08":"2.5rem","09":"3rem",10:"4rem",11:"5rem",12:"6rem"},g={focus:"0 0 0 2px white, 0 0 0 4px black"},i={slow:"500ms",normal:"300ms",fast:"250ms"},t={sm:"(max-width: 767px)",md:"(min-width: 768px)",lg:"(min-width: 1200px)",xl:"(min-width: 1440px)",forcedColorsMode:"(forced-colors: active)",darkMode:"(prefers-color-scheme: dark)",prefersReducedMotion:"(prefers-reduced-motion: reduced)"},l={background01:`light-dark(${r.white}, ${r.gray200})`,backgroundHover01:`light-dark(${r.whiteHover}, ${r.gray190})`,backgroundInverse01:`light-dark(${r.gray200}, ${r.gray10})`,layer01:`light-dark(${r.gray10}, ${r.gray180})`,layerHover01:`light-dark(${r.gray20}, ${r.gray170})`,layerSelected01:`light-dark(${r.gray30}, ${r.gray160})`,layerSelectedHover01:`light-dark(${r.gray40}, ${r.gray150})`,layer02:`light-dark(${r.white}, ${r.gray160})`,layerHover02:`light-dark(${r.whiteHover}, ${r.gray150})`,layerSelected02:`light-dark(${r.gray30}, ${r.gray140})`,layerSelectedHover02:`light-dark(${r.gray40}, ${r.gray130})`,layerAccent01:`light-dark(${r.gray30}, ${r.gray160})`,layerAccentHover01:`light-dark(${r.gray40}, ${r.gray150})`,layerAccentSelected01:`light-dark(${r.gray50}, ${r.gray140})`,layerAccent02:`light-dark(${r.gray10}, ${r.gray180})`,layerAccentHover02:`light-dark(${r.gray20}, ${r.gray170})`,layerAccentSelected02:`light-dark(${r.gray30}, ${r.gray160})`,brandPrimary:`light-dark(${r.red100}, ${r.red100})`,borderStrong:`light-dark(${r.gray200}, ${r.gray10})`,borderMedium:`light-dark(${r.gray110}, ${r.gray90})`,borderSubtle:`light-dark(${r.gray50}, ${r.gray160})`,borderBrand:`light-dark(${r.blue170}, ${r.blue170})`,borderInvalid:`light-dark(${r.signalRed140}, ${r.signalRed140})`,borderDisabled:`light-dark(${r.gray50}, ${r.gray140})`,borderSkeleton:`light-dark(${r.gray10}, ${r.gray180})`,borderInverse:`light-dark(${r.white}, ${r.gray180})`,field01:`light-dark(${r.gray10}, ${r.gray180})`,fieldHover01:`light-dark(${r.gray20}, ${r.gray170})`,fieldActive01:`light-dark(${r.gray30}, ${r.gray160})`,field02:`light-dark(${r.white}, ${r.gray160})`,fieldHover02:`light-dark(${r.whiteHover}, ${r.gray150})`,fieldActive02:`light-dark(${r.gray30}, ${r.gray140})`,fieldDisabled:`light-dark(${r.gray10}, ${r.gray180})`,fieldSkeleton:`light-dark(${r.gray10}, ${r.gray180})`,iconPrimary:`light-dark(${r.gray200}, ${r.gray10})`,iconSecondary:`light-dark(${r.blue170}, ${r.gray10})`,iconInverse:`light-dark(${r.white}, ${r.gray200})`,iconOnColor:`light-dark(${r.white}, ${r.white})`,iconDanger:`light-dark(${r.signalRed140}, ${r.signalRed140})`,iconDisabled:`light-dark(${r.gray50}, ${r.gray140})`,iconSuccess:`light-dark(${r.signalGreen140}, ${r.signalGreen140})`,iconInfo:`light-dark(${r.signalBlue140}, ${r.signalBlue140})`,iconWarning:`light-dark(${r.signalRed140}, ${r.signalRed140})`,iconImportant:`light-dark(${r.signalYellow140}, ${r.signalYellow140})`,linkEnabled:`light-dark(${r.blue100}, ${r.blue90})`,linkHover:`light-dark(${r.blue170}, ${r.blue80})`,linkPressed:`light-dark(${r.gray200}, ${r.blue60})`,linkVisited:`light-dark(${r.purple140}, ${r.purple80})`,notificationBorderSuccess:`light-dark(${r.signalGreen140}, ${r.signalGreen140})`,notificationBorderInfo:`light-dark(${r.signalBlue140}, ${r.signalBlue140})`,notificationBorderImportant:`light-dark(${r.signalYellow140}, ${r.signalYellow140})`,notificationBorderWarning:`light-dark(${r.signalRed140}, ${r.signalRed140})`,notificationBackgroundSuccess:`light-dark(${r.signalGreen20}, ${r.gray180})`,notificationBackgroundInfo:`light-dark(${r.signalBlue20}, ${r.gray180})`,notificationBackgroundImportant:`light-dark(${r.signalYellow20}, ${r.gray180})`,notificationBackgroundWarning:`light-dark(${r.signalRed20}, ${r.gray180})`,textPrimary:`light-dark(${r.gray200}, ${r.gray10})`,textSecondary:`light-dark(${r.gray140}, ${r.gray70})`,textBrand:`light-dark(${r.blue170}, ${r.gray10})`,textOnColor:`light-dark(${r.white}, ${r.white})`,textInverse:`light-dark(${r.gray10}, ${r.gray200})`,textSubtle:`light-dark(${r.gray90}, ${r.gray90})`,textDisabled:`light-dark(${r.gray50}, ${r.gray140})`,textInvalid:`light-dark(${r.signalRed140}, ${r.signalRed140})`,textPlaceholder:`light-dark(${r.gray70}, ${r.gray140})`,buttonBackgroundPrimary:`light-dark(${r.blue170}, ${r.blue100})`,buttonBackgroundPrimaryHover:`light-dark(${r.blue140}, ${r.blue140})`,buttonBackgroundPrimaryActive:`light-dark(${r.blue100}, ${r.blue170})`,buttonBackgroundSecondary:`light-dark(${r.white}, ${r.gray200})`,buttonBackgroundSecondaryHover:`light-dark(${r.whiteHover}, ${r.gray190})`,buttonBackgroundSecondaryActive:`light-dark(${r.gray30}, ${r.gray180})`,buttonBackgroundTertiaryHover:`light-dark(${r.whiteHover}, ${r.gray190})`,buttonBackgroundTertiaryActive:`light-dark(${r.gray30}, ${r.gray180})`,buttonBackgroundDanger:`light-dark(${r.signalRed140}, ${r.signalRed140})`,buttonBackgroundDangerHover:`light-dark(${r.signalRed160}, ${r.signalRed160})`,buttonBackgroundDangerActive:`light-dark(${r.signalRed180}, ${r.signalRed180})`,buttonBackgroundDisabled:`light-dark(${r.gray10}, ${r.gray180})`,buttonBackgroundSkeleton:`light-dark(${r.gray10}, ${r.gray180})`,buttonBackgroundGhostHover:`light-dark(${r.whiteHover}, ${r.gray190})`,buttonBackgroundGhostActive:`light-dark(${r.gray30}, ${r.gray190})`,buttonBorderPrimary:`light-dark(${r.blue170}, ${r.gray10})`,logoPrimary:`light-dark(${r.red100}, ${r.white})`},d={base:1,above:10,modal:1e3,toast:1100,skipToContent:1200},n=Object.freeze(Object.defineProperty({__proto__:null,baseColors:r,breakpoints:t,semantic:l,spacing:a,states:g,transitions:i,typography:e,zIndex:d},Symbol.toStringTag,{value:"Module"}));exports.baseColors=r;exports.breakpoints=t;exports.semantic=l;exports.spacing=a;exports.states=g;exports.tokens=n;exports.transitions=i;exports.typography=e;exports.zIndex=d;
|
|
@@ -216,7 +216,13 @@ const r = {
|
|
|
216
216
|
buttonBackgroundGhostActive: `light-dark(${r.gray30}, ${r.gray190})`,
|
|
217
217
|
buttonBorderPrimary: `light-dark(${r.blue170}, ${r.gray10})`,
|
|
218
218
|
logoPrimary: `light-dark(${r.red100}, ${r.white})`
|
|
219
|
-
}, d =
|
|
219
|
+
}, d = {
|
|
220
|
+
base: 1,
|
|
221
|
+
above: 10,
|
|
222
|
+
modal: 1e3,
|
|
223
|
+
toast: 1100,
|
|
224
|
+
skipToContent: 1200
|
|
225
|
+
}, n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
220
226
|
__proto__: null,
|
|
221
227
|
baseColors: r,
|
|
222
228
|
breakpoints: t,
|
|
@@ -224,7 +230,8 @@ const r = {
|
|
|
224
230
|
spacing: e,
|
|
225
231
|
states: g,
|
|
226
232
|
transitions: i,
|
|
227
|
-
typography: a
|
|
233
|
+
typography: a,
|
|
234
|
+
zIndex: d
|
|
228
235
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
229
236
|
export {
|
|
230
237
|
a,
|
|
@@ -234,5 +241,6 @@ export {
|
|
|
234
241
|
i as e,
|
|
235
242
|
t as f,
|
|
236
243
|
l as s,
|
|
237
|
-
|
|
244
|
+
n as t,
|
|
245
|
+
d as z
|
|
238
246
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LocalizedString, LocalizedStringDictionary, LocalizedStringFormatter, LocalizedStrings } from '@internationalized/string';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a cached LocalizedStringDictionary for the given strings.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useLocalizedStringDictionary<K extends string = string, T extends LocalizedString = string>(strings: LocalizedStrings<K, T>, packageName?: string): LocalizedStringDictionary<K, T>;
|
|
6
|
+
/**
|
|
7
|
+
* Provides localized string formatting for the current locale. Supports interpolating variables,
|
|
8
|
+
* selecting the correct pluralization, and formatting numbers. Automatically updates when the locale changes.
|
|
9
|
+
* @param strings - A mapping of languages to localized strings by key.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useLocalizedStringFormatter<K extends string = string, T extends LocalizedString = string>(strings: LocalizedStrings<K, T>, packageName?: string): LocalizedStringFormatter<K, T>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LocalizedStrings } from '@internationalized/message';
|
|
2
|
+
export type FormatMessage = (key: string, variables?: {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}) => string;
|
|
5
|
+
/**
|
|
6
|
+
* Handles formatting ICU Message strings to create localized strings for the current locale.
|
|
7
|
+
* Automatically updates when the locale changes, and handles caching of messages for performance.
|
|
8
|
+
* @param strings - A mapping of languages to strings by key.
|
|
9
|
+
* @deprecated - use useLocalizedStringFormatter instead.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useMessageFormatter(strings: LocalizedStrings): FormatMessage;
|
package/utils/test.d.ts
ADDED
package/textarea/TextArea.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ValidationResult, TextFieldProps as AriaTextFieldProps } from 'react-aria-components';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
export interface TextAreaProps extends AriaTextFieldProps {
|
|
4
|
-
/** Specify label displayed above the TextArea*/
|
|
5
|
-
label?: string;
|
|
6
|
-
/** Specify description displayed below the label */
|
|
7
|
-
description?: string;
|
|
8
|
-
/** Set number of rows for the TextArea */
|
|
9
|
-
rows?: number;
|
|
10
|
-
/** Set minimum number of characters that are allowed before the TextArea is put in an invalid state */
|
|
11
|
-
minLength?: number;
|
|
12
|
-
/**
|
|
13
|
-
* Whether to show the character counter or not
|
|
14
|
-
* @default
|
|
15
|
-
* false
|
|
16
|
-
*/
|
|
17
|
-
showCounter?: boolean;
|
|
18
|
-
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
19
|
-
}
|
|
20
|
-
export declare const TextArea: React.FC<TextAreaProps>;
|
package/textarea/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { TextArea } from './TextArea';
|