@opengovsg/oui 0.0.45 → 0.0.46
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/dist/cjs/banner/banner.cjs +1 -1
- package/dist/cjs/checkbox/checkbox.cjs +1 -1
- package/dist/cjs/combo-box/combo-box.cjs +1 -1
- package/dist/cjs/date-field/date-field.cjs +1 -1
- package/dist/cjs/date-picker/date-picker.cjs +5 -4
- package/dist/cjs/date-range-picker/date-range-picker.cjs +3 -3
- package/dist/cjs/field/field.cjs +15 -12
- package/dist/cjs/file-dropzone/file-dropzone.cjs +2 -2
- package/dist/cjs/file-dropzone/file-info.cjs +1 -1
- package/dist/cjs/index.cjs +98 -72
- package/dist/cjs/modal/modal-content.cjs +1 -1
- package/dist/cjs/number-field/number-field.cjs +2 -2
- package/dist/cjs/phone-number-field/constants.cjs +500 -0
- package/dist/cjs/phone-number-field/context.cjs +11 -0
- package/dist/cjs/phone-number-field/i18n.cjs +1043 -0
- package/dist/cjs/phone-number-field/index.cjs +32 -0
- package/dist/cjs/phone-number-field/phone-number-field.cjs +299 -0
- package/dist/cjs/phone-number-field/types.cjs +3 -0
- package/dist/cjs/range-calendar/range-calendar.cjs +1 -1
- package/dist/cjs/search-field/search-field.cjs +2 -2
- package/dist/cjs/select/i18n.cjs +23 -0
- package/dist/cjs/select/select.cjs +47 -47
- package/dist/cjs/sidebar/sidebar-list.cjs +1 -1
- package/dist/cjs/system/l10n.cjs +18 -0
- package/dist/cjs/system/react-utils/sizing.cjs +21 -0
- package/dist/cjs/tag-field/tag-field.cjs +1 -1
- package/dist/cjs/text-area-field/text-area-field.cjs +1 -1
- package/dist/cjs/text-field/text-field.cjs +1 -1
- package/dist/cjs/time-field/time-field.cjs +2 -2
- package/dist/esm/banner/banner.js +1 -1
- package/dist/esm/checkbox/checkbox.js +1 -1
- package/dist/esm/combo-box/combo-box.js +1 -1
- package/dist/esm/date-field/date-field.js +1 -1
- package/dist/esm/date-picker/date-picker.js +5 -4
- package/dist/esm/date-range-picker/date-range-picker.js +3 -3
- package/dist/esm/field/field.js +18 -15
- package/dist/esm/file-dropzone/file-dropzone.js +2 -2
- package/dist/esm/file-dropzone/file-info.js +1 -1
- package/dist/esm/index.js +27 -25
- package/dist/esm/modal/modal-content.js +1 -1
- package/dist/esm/number-field/number-field.js +2 -2
- package/dist/esm/phone-number-field/constants.js +497 -0
- package/dist/esm/phone-number-field/context.js +8 -0
- package/dist/esm/phone-number-field/i18n.js +1041 -0
- package/dist/esm/phone-number-field/index.js +3 -0
- package/dist/esm/phone-number-field/phone-number-field.js +294 -0
- package/dist/esm/phone-number-field/types.js +1 -0
- package/dist/esm/range-calendar/range-calendar.js +1 -1
- package/dist/esm/search-field/search-field.js +2 -2
- package/dist/esm/select/i18n.js +21 -0
- package/dist/esm/select/select.js +47 -47
- package/dist/esm/sidebar/sidebar-list.js +1 -1
- package/dist/esm/system/l10n.js +16 -0
- package/dist/esm/system/react-utils/sizing.js +19 -0
- package/dist/esm/tag-field/tag-field.js +1 -1
- package/dist/esm/text-area-field/text-area-field.js +1 -1
- package/dist/esm/text-field/text-field.js +1 -1
- package/dist/esm/time-field/time-field.js +2 -2
- package/dist/types/field/field.d.ts +1 -1
- package/dist/types/field/field.d.ts.map +1 -1
- package/dist/types/index.d.mts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/phone-number-field/constants.d.ts +495 -0
- package/dist/types/phone-number-field/constants.d.ts.map +1 -0
- package/dist/types/phone-number-field/context.d.ts +15 -0
- package/dist/types/phone-number-field/context.d.ts.map +1 -0
- package/dist/types/phone-number-field/i18n.d.ts +1039 -0
- package/dist/types/phone-number-field/i18n.d.ts.map +1 -0
- package/dist/types/phone-number-field/index.d.ts +9 -0
- package/dist/types/phone-number-field/index.d.ts.map +1 -0
- package/dist/types/phone-number-field/phone-number-field.d.ts +42 -0
- package/dist/types/phone-number-field/phone-number-field.d.ts.map +1 -0
- package/dist/types/phone-number-field/types.d.ts +21 -0
- package/dist/types/phone-number-field/types.d.ts.map +1 -0
- package/dist/types/select/i18n.d.ts +19 -0
- package/dist/types/select/i18n.d.ts.map +1 -0
- package/dist/types/select/select.d.ts +11 -1
- package/dist/types/select/select.d.ts.map +1 -1
- package/dist/types/system/l10n.d.ts +10 -0
- package/dist/types/system/l10n.d.ts.map +1 -0
- package/dist/types/system/react-utils/sizing.d.ts +8 -0
- package/dist/types/system/react-utils/sizing.d.ts.map +1 -0
- package/package.json +6 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../src/phone-number-field/i18n.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAghCI,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { PhoneNumberField, CountrySelect, FlagComponent, PhoneInput, } from "./phone-number-field";
|
|
2
|
+
export type { PhoneNumberFieldProps, CountrySelectProps, FlagComponentProps, PhoneInputProps, } from "./phone-number-field";
|
|
3
|
+
export { formatPhoneNumber, formatPhoneNumberIntl, parsePhoneNumber, isPossiblePhoneNumber,
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Use `isPossiblePhoneNumber` instead. The rationale is that telephone numbering plans can and sometimes do change, meaning that `isValidPhoneNumber()` function may one day become outdated on a website that isn't actively maintained anymore.
|
|
6
|
+
*/
|
|
7
|
+
isValidPhoneNumber, } from "react-phone-number-input";
|
|
8
|
+
export type { Value as E164Number } from "react-phone-number-input";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/phone-number-field/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,UAAU,GACX,MAAM,sBAAsB,CAAA;AAC7B,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,GAChB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB;AACrB;;GAEG;AACH,kBAAkB,GACnB,MAAM,0BAA0B,CAAA;AAEjC,YAAY,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,0BAA0B,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { FocusEvents } from "react-aria";
|
|
2
|
+
import type { InputProps as AriaInputProps, TextFieldProps, ValidationResult } from "react-aria-components";
|
|
3
|
+
import type { Props as ComponentPhoneInputProps, Country, Value as E164Number, ExternalValue, FlagProps } from "react-phone-number-input";
|
|
4
|
+
import type { SetOptional } from "type-fest";
|
|
5
|
+
import type { PhoneNumberFieldSlots, PhoneNumberFieldVariantProps, SlotsToClasses } from "@opengovsg/oui-theme";
|
|
6
|
+
import type { InputProps } from "../input";
|
|
7
|
+
import type { BasePhoneInputProps } from "./types";
|
|
8
|
+
export interface PhoneInputProps extends InputProps {
|
|
9
|
+
onClear?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const PhoneInput: ({ onClear, onKeyDown, ...props }: PhoneInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export interface PhoneNumberFieldProps extends Omit<Partial<ComponentPhoneInputProps<Omit<AriaInputProps, "size">>>, "disabled">, BasePhoneInputProps, PhoneNumberFieldVariantProps {
|
|
13
|
+
label?: React.ReactNode;
|
|
14
|
+
description?: React.ReactNode;
|
|
15
|
+
errorMessage?: React.ReactNode | ((validation: ValidationResult) => string);
|
|
16
|
+
isInvalid?: TextFieldProps["isInvalid"];
|
|
17
|
+
classNames?: SlotsToClasses<PhoneNumberFieldSlots>;
|
|
18
|
+
defaultValue?: ExternalValue | E164Number;
|
|
19
|
+
/**
|
|
20
|
+
* Whether to use the international phone input with country select (default) or a non-international phone input with a fixed country code.
|
|
21
|
+
* When the variant is `local`, the formatting of the phone number will be based on the `defaultCountry` prop.
|
|
22
|
+
*/
|
|
23
|
+
variant?: PhoneNumberFieldVariantProps["variant"];
|
|
24
|
+
}
|
|
25
|
+
export declare const PhoneNumberField: (originalProps: PhoneNumberFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
type CountryItem = {
|
|
27
|
+
label: string;
|
|
28
|
+
value: Country | undefined;
|
|
29
|
+
};
|
|
30
|
+
export interface CountrySelectProps extends Pick<FocusEvents, "onBlur" | "onFocus"> {
|
|
31
|
+
value: string;
|
|
32
|
+
options: CountryItem[];
|
|
33
|
+
onChange: (country: Country) => void;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export declare function CountrySelect(props: CountrySelectProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export interface FlagComponentProps extends SetOptional<FlagProps, "country"> {
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare const FlagComponent: ({ country, countryName, className, }: FlagComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=phone-number-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-number-field.d.ts","sourceRoot":"","sources":["../../../src/phone-number-field/phone-number-field.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EACV,UAAU,IAAI,cAAc,EAC5B,cAAc,EACd,gBAAgB,EACjB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EACV,KAAK,IAAI,wBAAwB,EACjC,OAAO,EACP,KAAK,IAAI,UAAU,EACnB,aAAa,EACb,SAAS,EACV,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAO5C,OAAO,KAAK,EACV,qBAAqB,EACrB,4BAA4B,EAC5B,cAAc,EACf,MAAM,sBAAsB,CAAA;AAG7B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAYlD,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,eAAO,MAAM,UAAU,qCAIpB,eAAe,4CA2DjB,CAAA;AAED,MAAM,WAAW,qBACf,SAAQ,IAAI,CACR,OAAO,CAAC,wBAAwB,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC,EAC/D,UAAU,CACX,EACD,mBAAmB,EACnB,4BAA4B;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,UAAU,EAAE,gBAAgB,KAAK,MAAM,CAAC,CAAA;IAE3E,SAAS,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAA;IAEvC,UAAU,CAAC,EAAE,cAAc,CAAC,qBAAqB,CAAC,CAAA;IAClD,YAAY,CAAC,EAAE,aAAa,GAAG,UAAU,CAAA;IAEzC;;;OAGG;IACH,OAAO,CAAC,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAA;CAClD;AAED,eAAO,MAAM,gBAAgB,kBAAmB,qBAAqB,4CAiIpE,CAAA;AAED,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,CAAA;AAEhE,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,2CA0EtD;AAED,MAAM,WAAW,kBAAmB,SAAQ,WAAW,CAAC,SAAS,EAAE,SAAS,CAAC;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,aAAa,yCAIvB,kBAAkB,4CAMpB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Country } from "react-phone-number-input";
|
|
2
|
+
export interface BasePhoneInputProps {
|
|
3
|
+
/**
|
|
4
|
+
* Set the input's placeholder to an example number for the selected country,
|
|
5
|
+
* and update it if the country changes.
|
|
6
|
+
*
|
|
7
|
+
* By default it is set to "polite", which means it will only set the
|
|
8
|
+
* placeholder if the input doesn't already have one. You can also set it to
|
|
9
|
+
* "aggressive", which will replace any existing placeholder, or "off" to not
|
|
10
|
+
* show any example numbers in the placeholder.
|
|
11
|
+
*/
|
|
12
|
+
placeholderMode?: "polite" | "aggressive" | "off";
|
|
13
|
+
/**
|
|
14
|
+
* Examples to retrieve placeholder number from, if any. Defaults to
|
|
15
|
+
* `MOBILE_EXAMPLES` if none provided.
|
|
16
|
+
*/
|
|
17
|
+
examples?: {
|
|
18
|
+
[country in Country]: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/phone-number-field/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAEvD,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,KAAK,CAAA;IAEjD;;;OAGG;IACH,QAAQ,CAAC,EAAE;SAAG,OAAO,IAAI,OAAO,GAAG,MAAM;KAAE,CAAA;CAC5C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const i18nStrings: {
|
|
2
|
+
"en-SG": {
|
|
3
|
+
"Search...": string;
|
|
4
|
+
"Search options": string;
|
|
5
|
+
};
|
|
6
|
+
"zh-SG": {
|
|
7
|
+
"Search...": string;
|
|
8
|
+
"Search options": string;
|
|
9
|
+
};
|
|
10
|
+
"ms-SG": {
|
|
11
|
+
"Search...": string;
|
|
12
|
+
"Search options": string;
|
|
13
|
+
};
|
|
14
|
+
"ta-SG": {
|
|
15
|
+
"Search...": string;
|
|
16
|
+
"Search options": string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../src/select/i18n.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;CAiBI,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { SelectProps as AriaSelectProps, ListBoxProps, ListLayoutOptions, ValidationResult } from "react-aria-components";
|
|
1
|
+
import type { SelectProps as AriaSelectProps, ListBoxProps, ListLayoutOptions, SelectValueRenderProps, ValidationResult } from "react-aria-components";
|
|
2
2
|
import type { SelectVariantSlots, SlotsToClasses, VariantProps } from "@opengovsg/oui-theme";
|
|
3
3
|
import { selectStyles } from "@opengovsg/oui-theme";
|
|
4
|
+
import type { PopoverProps } from "../popover";
|
|
5
|
+
import type { ChildrenOrFunction } from "../system/react-utils/children";
|
|
4
6
|
export interface SelectProps<T> extends Omit<AriaSelectProps, "children">, VariantProps<typeof selectStyles> {
|
|
5
7
|
classNames?: SlotsToClasses<SelectVariantSlots | "error">;
|
|
6
8
|
/**
|
|
@@ -27,6 +29,14 @@ export interface SelectProps<T> extends Omit<AriaSelectProps, "children">, Varia
|
|
|
27
29
|
* Icon to display in the search field. If not provided, no icon will be displayed.
|
|
28
30
|
*/
|
|
29
31
|
searchIcon?: React.ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Custom renderer for the selected value displayed in the trigger button.
|
|
34
|
+
* If not provided, the default renderer will display the selected option's text.
|
|
35
|
+
* The render prop function receives the same props as the children of SelectValue.
|
|
36
|
+
* You can use these props to conditionally render based on the selected option's state (e.g. isPlaceholder).
|
|
37
|
+
*/
|
|
38
|
+
renderSelectValue?: ChildrenOrFunction<SelectValueRenderProps<T>>;
|
|
39
|
+
popoverProps?: Partial<PopoverProps>;
|
|
30
40
|
}
|
|
31
41
|
export declare function Select<T extends object>({ label, description, classNames, errorMessage, ...originalProps }: SelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
32
42
|
//# sourceMappingURL=select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/select/select.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/select/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,IAAI,eAAe,EAC9B,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,uBAAuB,CAAA;AAiB9B,OAAO,KAAK,EAEV,kBAAkB,EAClB,cAAc,EACd,YAAY,EACb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAA0B,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAE3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAA;AASxE,MAAM,WAAW,WAAW,CAAC,CAAC,CAC5B,SAAQ,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,EACvC,YAAY,CAAC,OAAO,YAAY,CAAC;IACnC,UAAU,CAAC,EAAE,cAAc,CAAC,kBAAkB,GAAG,OAAO,CAAC,CAAA;IAEzD;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IAErC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAA;IAEpC,YAAY,CAAC,EACT,KAAK,CAAC,SAAS,GACf,CAAC,CAAC,UAAU,EAAE,gBAAgB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAA;IAEvD,2CAA2C;IAC3C,KAAK,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;IAE7C,QAAQ,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAA;IAEtC;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAE1B;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE5B;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAA;IAEjE,YAAY,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;CACrC;AAeD,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,EAAE,EACvC,KAAK,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,GAAG,aAAa,EACjB,EAAE,WAAW,CAAC,CAAC,CAAC,2CA+JhB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { LocalizedString, LocalizedStrings } from "@internationalized/string";
|
|
2
|
+
import { LocalizedStringFormatter } from "@internationalized/string";
|
|
3
|
+
/**
|
|
4
|
+
* Provides localized string formatting for the current locale. Supports interpolating variables,
|
|
5
|
+
* selecting the correct pluralization, and formatting numbers. Automatically updates when the locale changes.
|
|
6
|
+
*
|
|
7
|
+
* @param strings - A mapping of languages to localized strings by key.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useLocalizedStringFormatter<K extends string = string, T extends LocalizedString = string>(strings: LocalizedStrings<K, T>, packageName?: string): LocalizedStringFormatter<K, T>;
|
|
10
|
+
//# sourceMappingURL=l10n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"l10n.d.ts","sourceRoot":"","sources":["../../../src/system/l10n.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAIpE;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,CAAC,SAAS,MAAM,GAAG,MAAM,EACzB,CAAC,SAAS,eAAe,GAAG,MAAM,EAElC,OAAO,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAC/B,WAAW,CAAC,EAAE,MAAM,GACnB,wBAAwB,CAAC,CAAC,EAAE,CAAC,CAAC,CAOhC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Extracted from Select.tsx in react-aria-components. Used as a workaround for https://github.com/adobe/react-spectrum/issues/9451
|
|
4
|
+
*
|
|
5
|
+
* @see https://github.com/adobe/react-spectrum/blob/245a7031367d5f1d1264071b5dd84cc7b367513e/packages/react-aria-components/src/Select.tsx#L166-L176
|
|
6
|
+
*/
|
|
7
|
+
export declare function useElementWidth(ref: RefObject<Element | null> | undefined): string | null;
|
|
8
|
+
//# sourceMappingURL=sizing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sizing.d.ts","sourceRoot":"","sources":["../../../../src/system/react-utils/sizing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,SAAS,iBAezE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengovsg/oui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.46",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"type": "module",
|
|
@@ -50,14 +50,15 @@
|
|
|
50
50
|
"storybook": "10.1.10",
|
|
51
51
|
"tsx": "^4.21.0",
|
|
52
52
|
"typescript": "5.7.3",
|
|
53
|
-
"@opengovsg/oui-theme": "0.0.
|
|
53
|
+
"@opengovsg/oui-theme": "0.0.46",
|
|
54
54
|
"@oui/chromatic": "0.0.0",
|
|
55
|
-
"@oui/prettier-config": "0.0.0",
|
|
56
55
|
"@oui/eslint-config": "0.0.0",
|
|
56
|
+
"@oui/prettier-config": "0.0.0",
|
|
57
57
|
"@oui/typescript-config": "0.0.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@internationalized/date": "^3.10.1",
|
|
61
|
+
"@internationalized/string": "^3.2.7",
|
|
61
62
|
"@react-aria/calendar": "^3.9.2",
|
|
62
63
|
"@react-aria/focus": "^3.21.2",
|
|
63
64
|
"@react-aria/i18n": "^3.12.13",
|
|
@@ -76,6 +77,7 @@
|
|
|
76
77
|
"nanoid": "^5.1.5",
|
|
77
78
|
"react-aria": "^3.41.1",
|
|
78
79
|
"react-dropzone": "^14.3.8",
|
|
80
|
+
"react-phone-number-input": "^3.4.14",
|
|
79
81
|
"react-stately": "^3.41.0",
|
|
80
82
|
"scroll-into-view-if-needed": "^3.1.0",
|
|
81
83
|
"sonner": "^2.0.7",
|
|
@@ -88,7 +90,7 @@
|
|
|
88
90
|
"motion": ">=11.12.0 || >=12.0.0-alpha.1",
|
|
89
91
|
"react": ">= 18",
|
|
90
92
|
"react-aria-components": "^1.14.0",
|
|
91
|
-
"@opengovsg/oui-theme": "0.0.
|
|
93
|
+
"@opengovsg/oui-theme": "0.0.46"
|
|
92
94
|
},
|
|
93
95
|
"scripts": {
|
|
94
96
|
"build": "tsx ../../tooling/build-scripts/main.ts --dts --clean",
|