@ostack.tech/ui 1.3.0-beta.1 → 1.3.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/LICENSE +202 -0
- package/README.md +13 -1
- package/dist/chunks/{en-W4OWqPrv.js → en-Czf-_HZt.js} +9 -11
- package/dist/chunks/en-Czf-_HZt.js.map +1 -0
- package/dist/locales/en-GB.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/fr-FR.js +8 -10
- package/dist/locales/fr-FR.js.map +1 -1
- package/dist/locales/pt-PT.js +8 -10
- package/dist/locales/pt-PT.js.map +1 -1
- package/dist/ostack-ui.css +69 -6
- package/dist/ostack-ui.js +904 -557
- package/dist/ostack-ui.js.map +1 -1
- package/package.json +4 -2
- package/scss/_utils.scss +1 -0
- package/scss/components/ButtonGroup/_ButtonGroup.scss +2 -5
- package/scss/components/Pagination/_Pagination-variables.scss +89 -0
- package/scss/components/Pagination/_Pagination.scss +135 -0
- package/scss/components/Select/_Select-variables.scss +1 -1
- package/scss/components/Tabs/_Tabs-variables.scss +1 -1
- package/scss/components/Tabs/_Tabs.scss +3 -2
- package/scss/index.scss +1 -0
- package/scss/scss/placeholders/button/_button-variables.scss +3 -0
- package/scss/scss/placeholders/button/_button.scss +4 -3
- package/scss/scss/placeholders/menu/_menu-variables.scss +4 -1
- package/scss/scss/placeholders/menu/_menu.scss +4 -0
- package/types/components/Alert/Alert.d.ts +1 -1
- package/types/components/AlertDialog/AlertDialog.d.ts +0 -1
- package/types/components/AlertDialog/AlertDialogBody.d.ts +2 -2
- package/types/components/AlertDialog/AlertDialogFooter.d.ts +2 -2
- package/types/components/Box/Box.d.ts +1 -1
- package/types/components/CheckboxGroup/CheckboxGroup.d.ts +2 -2
- package/types/components/CommandMenu/CommandMenuItem.d.ts +6 -0
- package/types/components/CommandMenu/cmdk/index.d.ts +2 -2
- package/types/components/Container/Container.d.ts +1 -1
- package/types/components/DataTable/DataTable.d.ts +13 -6
- package/types/components/DataTable/DataTableContent.d.ts +1 -1
- package/types/components/DataTable/DataTablePagination.d.ts +7 -16
- package/types/components/DataTable/DataTableRowsPerPage.d.ts +1 -5
- package/types/components/DataTable/PagedDataTablePagination.d.ts +5 -5
- package/types/components/DataTable/sanitizeProps.d.ts +0 -2
- package/types/components/DateInput/DateInput.d.ts +4 -4
- package/types/components/DateRangeInput/DateRangeInput.d.ts +1 -1
- package/types/components/DropdownMenu/DropdownMenuItem.d.ts +6 -0
- package/types/components/Form/Form.d.ts +12 -3
- package/types/components/Form/FormError.d.ts +3 -2
- package/types/components/Keyboard/Keyboard.d.ts +1 -5
- package/types/components/Link/Link.d.ts +1 -1
- package/types/components/NumericInput/NumericInput.d.ts +4 -4
- package/types/components/Output/Output.d.ts +12 -0
- package/types/components/Pagination/Pagination.d.ts +93 -0
- package/types/components/Pagination/index.d.ts +1 -0
- package/types/components/Pagination/paginationItems.d.ts +7 -0
- package/types/components/Select/Select.d.ts +1 -1
- package/types/components/Separator/Separator.d.ts +1 -1
- package/types/components/Table/TableCell.d.ts +2 -2
- package/types/components/Text/Text.d.ts +2 -6
- package/types/components/Tooltip/Tooltip.d.ts +1 -1
- package/types/index.d.ts +1 -0
- package/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +1 -1
- package/types/providers/LocalizationProvider/LocalizationObject.d.ts +3 -1
- package/types/utils/sanitizeProps.d.ts +2 -0
- package/dist/chunks/en-W4OWqPrv.js.map +0 -1
|
@@ -49,7 +49,7 @@ export interface DateRangeInputProps extends UseMarginPropsOptions, Pick<UseText
|
|
|
49
49
|
* @param valueRepresentations Different representations of the date-range value.
|
|
50
50
|
*/
|
|
51
51
|
onValueChange?: (valueRepresentations: DateRangeValueRepresentations) => void;
|
|
52
|
-
/** Whether the
|
|
52
|
+
/** Whether the date-range input is required. */
|
|
53
53
|
required?: boolean;
|
|
54
54
|
/** Disables the control. */
|
|
55
55
|
disabled?: boolean;
|
|
@@ -10,6 +10,12 @@ export interface DropdownMenuItemProps extends Omit<ComponentProps<typeof Dropdo
|
|
|
10
10
|
* @default false
|
|
11
11
|
*/
|
|
12
12
|
asLink?: boolean;
|
|
13
|
+
/** Href for the link, when `asLink` is set. */
|
|
14
|
+
href?: ComponentProps<"a">["href"];
|
|
15
|
+
/** Target of the link, when `asLink` is set. */
|
|
16
|
+
target?: ComponentProps<"a">["target"];
|
|
17
|
+
/** Rel of the link, when `asLink` is set. */
|
|
18
|
+
rel?: ComponentProps<"a">["rel"];
|
|
13
19
|
}
|
|
14
20
|
/** Dropdown menu item. */
|
|
15
21
|
export declare function DropdownMenuItem({ onSelect, asLink, selected, color, disabled, loading, loadingContent, showSpinner, icon, iconPlacement, keybinds, href, target, rel, actionProps, contentProps, iconProps, spinnerProps, keybindsProps, className, "aria-disabled": ariaDisabled, ...otherProps }: DropdownMenuItemProps): import("react").JSX.Element;
|
|
@@ -89,8 +89,8 @@ export interface FormProps<T extends FormValues = any> extends Omit<BoxProps, ke
|
|
|
89
89
|
apiRef?: Ref<FormApi<T> | null>;
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
|
-
* The `Form` provides a wrapper over the browser's native validation capabilities and can
|
|
93
|
-
* to declaratively build simple forms.
|
|
92
|
+
* The `Form` component provides a wrapper over the browser's native validation capabilities and can
|
|
93
|
+
* be used to declaratively build simple forms.
|
|
94
94
|
*
|
|
95
95
|
* It composes the following subcomponents:
|
|
96
96
|
*
|
|
@@ -106,7 +106,16 @@ export interface FormProps<T extends FormValues = any> extends Omit<BoxProps, ke
|
|
|
106
106
|
* Example usage:
|
|
107
107
|
*
|
|
108
108
|
* ```tsx
|
|
109
|
-
* import {
|
|
109
|
+
* import {
|
|
110
|
+
* Button,
|
|
111
|
+
* Field,
|
|
112
|
+
* Form,
|
|
113
|
+
* FormError,
|
|
114
|
+
* FormSubmit,
|
|
115
|
+
* Input,
|
|
116
|
+
* Label,
|
|
117
|
+
* Stack,
|
|
118
|
+
* } from "@ostack.tech/ui";
|
|
110
119
|
*
|
|
111
120
|
* function SignInForm() {
|
|
112
121
|
* return (
|
|
@@ -5,8 +5,9 @@ export interface FormErrorProps {
|
|
|
5
5
|
/**
|
|
6
6
|
* Name of the field for which to display the error.
|
|
7
7
|
*
|
|
8
|
-
* By default, the name is inherited from the parent `Field` component if one
|
|
9
|
-
* provided a name. Otherwise, it defaults to the empty string, which represents a
|
|
8
|
+
* By default, the name is inherited from a control within the parent `Field` component if one
|
|
9
|
+
* exists and was provided a name. Otherwise, it defaults to the empty string, which represents a
|
|
10
|
+
* global error.
|
|
10
11
|
*/
|
|
11
12
|
name?: string;
|
|
12
13
|
/** How errors should be displayed. This property is, by default, inherited from the `Form`. */
|
|
@@ -12,11 +12,7 @@ export interface KeyboardProps extends UseMarginPropsOptions, UseTextPropsOption
|
|
|
12
12
|
* underlying DOM node.
|
|
13
13
|
*/
|
|
14
14
|
asChild?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Colour of the keyboard element.
|
|
17
|
-
*
|
|
18
|
-
* @default "primary"
|
|
19
|
-
*/
|
|
15
|
+
/** Colour of the keyboard element. */
|
|
20
16
|
color?: KeyboardColor;
|
|
21
17
|
}
|
|
22
18
|
/**
|
|
@@ -35,7 +35,7 @@ export interface LinkOwnProps extends UseMarginPropsOptions, UseTextPropsOptions
|
|
|
35
35
|
* `rel="noopener noreferrer"`).
|
|
36
36
|
*
|
|
37
37
|
* If a `Referer` header should be included when navigating, then the `rel` attribute should be
|
|
38
|
-
*
|
|
38
|
+
* overridden to simply `rel="noopener"`.
|
|
39
39
|
*/
|
|
40
40
|
external?: boolean;
|
|
41
41
|
/** Link icon. By default, only `external` links have an icon. */
|
|
@@ -30,22 +30,22 @@ export interface NumericInputProps extends NumericTransformerOptions, Omit<Contr
|
|
|
30
30
|
precision?: number | null;
|
|
31
31
|
/**
|
|
32
32
|
* Minimum number allowed. If a string is provided, it should **not** be the formatted
|
|
33
|
-
* representation, e.g. `"999999.99" should be provided instead of `"999 999,99 €"`.
|
|
33
|
+
* representation, e.g. `"999999.99"` should be provided instead of `"999 999,99 €"`.
|
|
34
34
|
*/
|
|
35
35
|
min?: string | number | bigint | null;
|
|
36
36
|
/**
|
|
37
37
|
* Maximum number allowed. If a string is provided, it should **not** be the formatted
|
|
38
|
-
* representation, e.g. `"999999.99" should be provided instead of `"999 999,99 €"`.
|
|
38
|
+
* representation, e.g. `"999999.99"` should be provided instead of `"999 999,99 €"`.
|
|
39
39
|
*/
|
|
40
40
|
max?: string | number | bigint | null;
|
|
41
41
|
/**
|
|
42
42
|
* Value that the number should be greater than. If a string is provided, it should **not** be the
|
|
43
|
-
* formatted representation, e.g. `"999999.99" should be provided instead of `"999 999,99 €"`.
|
|
43
|
+
* formatted representation, e.g. `"999999.99"` should be provided instead of `"999 999,99 €"`.
|
|
44
44
|
*/
|
|
45
45
|
exclusiveMin?: string | number | bigint | null;
|
|
46
46
|
/**
|
|
47
47
|
* Value that the number should be less than. If a string is provided, it should **not** be the
|
|
48
|
-
* formatted representation, e.g. `"999999.99" should be provided instead of `"999 999,99 €"`.
|
|
48
|
+
* formatted representation, e.g. `"999999.99"` should be provided instead of `"999 999,99 €"`.
|
|
49
49
|
*/
|
|
50
50
|
exclusiveMax?: string | number | bigint | null;
|
|
51
51
|
/** Custom validation function meant to validate the control when it is part of a `Form`. */
|
|
@@ -19,6 +19,18 @@ export interface OutputProps extends Omit<ControlOutputProps, "asChild" | "disab
|
|
|
19
19
|
* will remain unchanged.
|
|
20
20
|
*/
|
|
21
21
|
pendingContent?: ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to show a spinner in the output.
|
|
24
|
+
*
|
|
25
|
+
* Defaults to the value of the `pending` property. In most cases, prefer `pending`, which also
|
|
26
|
+
* marks the output as busy for assistive technologies.
|
|
27
|
+
*
|
|
28
|
+
* Use `showSpinner` when you want a spinner **without** marking the output as busy. To mark as
|
|
29
|
+
* busy **without** a spinner, set `pending` to `true` and `showSpinner` to `false`.
|
|
30
|
+
*
|
|
31
|
+
* @default pending
|
|
32
|
+
*/
|
|
33
|
+
showSpinner?: boolean;
|
|
22
34
|
}
|
|
23
35
|
/**
|
|
24
36
|
* The output component is used to display the result of a calculation or user action. It is built
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode } from "react";
|
|
2
|
+
import { type ButtonColor, type ButtonProps, type ButtonSize, type ButtonVariant } from "../Button";
|
|
3
|
+
import { type IconButtonProps } from "../IconButton";
|
|
4
|
+
/** Pagination buttons' variant. */
|
|
5
|
+
export type PaginationVariant = ButtonVariant;
|
|
6
|
+
/** Pagination button's colour. */
|
|
7
|
+
export type PaginationColor = ButtonColor;
|
|
8
|
+
/** Pagination buttons' size. */
|
|
9
|
+
export type PaginationSize = ButtonSize;
|
|
10
|
+
/** Properties of the pagination component. */
|
|
11
|
+
export interface PaginationProps extends ComponentProps<"nav"> {
|
|
12
|
+
/** Total number of pages. */
|
|
13
|
+
count: number;
|
|
14
|
+
/**
|
|
15
|
+
* Default (uncontrolled) current page, starting at `1`.
|
|
16
|
+
*
|
|
17
|
+
* @default 1
|
|
18
|
+
*/
|
|
19
|
+
defaultPage?: string | number;
|
|
20
|
+
/** Controlled current page, starting at `1`. Use together with `onPageChange`. */
|
|
21
|
+
page?: string | number;
|
|
22
|
+
/** Function called with the new page (starting at `1`) when the page changes. */
|
|
23
|
+
onPageChange?: (page: number) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Size of the pagination buttons.
|
|
26
|
+
*
|
|
27
|
+
* @default "md"
|
|
28
|
+
*/
|
|
29
|
+
size?: PaginationSize;
|
|
30
|
+
/**
|
|
31
|
+
* Number of pages shown on each side of the current page.
|
|
32
|
+
*
|
|
33
|
+
* @default 1
|
|
34
|
+
*/
|
|
35
|
+
siblingCount?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Number of pages always shown at the start and end.
|
|
38
|
+
*
|
|
39
|
+
* @default 1
|
|
40
|
+
*/
|
|
41
|
+
boundaryCount?: number;
|
|
42
|
+
/** Whether to disable all pagination buttons. */
|
|
43
|
+
disabled?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Renders the pagination in a **loading** state.
|
|
46
|
+
*
|
|
47
|
+
* When `true`, the page buttons are replaced by a single loading indicator, and the previous/next
|
|
48
|
+
* page buttons are “soft-disabled”: they look disabled and ignore user interaction but remain
|
|
49
|
+
* focusable.
|
|
50
|
+
*
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
53
|
+
loading?: boolean;
|
|
54
|
+
/** Navigation's label (for assistive technologies). */
|
|
55
|
+
label?: ReactNode;
|
|
56
|
+
/** Label of the previous page button. */
|
|
57
|
+
previousPageButtonLabel?: ReactNode;
|
|
58
|
+
/** Label of the next page button. */
|
|
59
|
+
nextPageButtonLabel?: ReactNode;
|
|
60
|
+
/** Accessible label of each page button. */
|
|
61
|
+
pageButtonLabel?: (page: string) => ReactNode;
|
|
62
|
+
/** Properties to pass to the previous page button. */
|
|
63
|
+
previousPageButtonProps?: Partial<IconButtonProps>;
|
|
64
|
+
/** Properties to pass to the next page button. */
|
|
65
|
+
nextPageButtonProps?: Partial<IconButtonProps>;
|
|
66
|
+
/** Properties to pass to each page button. */
|
|
67
|
+
pageButtonProps?: Omit<ButtonProps, "children">;
|
|
68
|
+
/** Properties to pass to each ellipsis button. */
|
|
69
|
+
ellipsisButtonProps?: Omit<ButtonProps, "children">;
|
|
70
|
+
/** Properties to pass to the loading button. */
|
|
71
|
+
loadingButtonProps?: Omit<ButtonProps, "children">;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The pagination component allows users to navigate between pages of content.
|
|
75
|
+
*
|
|
76
|
+
* Pages are numbered starting at `1`.
|
|
77
|
+
*
|
|
78
|
+
* Built on top of the browser's [`<nav>`
|
|
79
|
+
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/nav) and the
|
|
80
|
+
* [`Button`](/docs/ostack-ui-forms-button--docs)/[`IconButton`](/docs/ostack-ui-forms-icon-button--docs)
|
|
81
|
+
* components.
|
|
82
|
+
*
|
|
83
|
+
* Example usage:
|
|
84
|
+
*
|
|
85
|
+
* ```tsx
|
|
86
|
+
* import { Pagination } from "@ostack.tech/ui";
|
|
87
|
+
*
|
|
88
|
+
* function SearchResultsPagination() {
|
|
89
|
+
* return <Pagination count={20} />;
|
|
90
|
+
* }
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export declare function Pagination({ count, defaultPage, page: controllablePage, onPageChange, size, siblingCount, boundaryCount, disabled, loading, label: labelProp, previousPageButtonLabel: previousPageButtonLabelProp, nextPageButtonLabel: nextPageButtonLabelProp, pageButtonLabel: pageButtonLabelProp, previousPageButtonProps, nextPageButtonProps, pageButtonProps, ellipsisButtonProps, loadingButtonProps, className, ...otherProps }: PaginationProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Pagination.tsx";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Item of a pagination: a page number or an ellipsis. */
|
|
2
|
+
export type PaginationItem = number | "start-ellipsis" | "end-ellipsis";
|
|
3
|
+
/**
|
|
4
|
+
* Computes the items to display in a pagination, e.g. `[1, "start-ellipsis", 4, 5, 6,
|
|
5
|
+
* "end-ellipsis", 20]`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function paginationItems(page: number, count: number, siblingCount: number, boundaryCount: number): PaginationItem[];
|
|
@@ -55,7 +55,7 @@ interface SelectPropsBase<TValue> extends SelectPopoverTriggerProps, Pick<Comman
|
|
|
55
55
|
valueProps?: ComponentProps<"div">;
|
|
56
56
|
/** Properties to pass to each `Tag` holding a value, when `multiple` is set. */
|
|
57
57
|
valueTagProps?: Omit<TagProps, "defaultOpen" | "open" | "onOpenChange" | "color" | "showCloseButton">;
|
|
58
|
-
/** Properties to pass to the arrow `
|
|
58
|
+
/** Properties to pass to the arrow `IconButton` component. */
|
|
59
59
|
arrowProps?: Omit<IconButtonProps, "icon" | "label">;
|
|
60
60
|
/** Properties to pass to the `Popover` component. */
|
|
61
61
|
popoverProps?: PopoverContentProps;
|
|
@@ -22,7 +22,7 @@ export interface SeparatorProps extends UseMarginPropsOptions, ComponentProps<ty
|
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Component that visually or semantically separates content. Built on top of the [Radix Separator
|
|
25
|
-
* primitive](https://www.radix-ui.com/primitives/docs/components/separator)
|
|
25
|
+
* primitive](https://www.radix-ui.com/primitives/docs/components/separator).
|
|
26
26
|
*
|
|
27
27
|
* Example usage:
|
|
28
28
|
*
|
|
@@ -28,8 +28,8 @@ export interface TableCellProps extends Omit<ComponentProps<"td" | "th">, "align
|
|
|
28
28
|
/** Specifies how to align the cell's content. Numeric fields should typically be right aligned. */
|
|
29
29
|
align?: CSSProperties["textAlign"];
|
|
30
30
|
/**
|
|
31
|
-
* Style variant to use.
|
|
32
|
-
*
|
|
31
|
+
* Style variant to use. Defaults to `"header"` when the cell is a `header`, and to `"data"`
|
|
32
|
+
* otherwise.
|
|
33
33
|
*/
|
|
34
34
|
variant?: TableCellVariant;
|
|
35
35
|
/**
|
|
@@ -16,18 +16,14 @@ export interface TextOwnProps extends UseMarginPropsOptions, UseTextPropsOptions
|
|
|
16
16
|
* underlying DOM node.
|
|
17
17
|
*/
|
|
18
18
|
asChild?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Colour of the text.
|
|
21
|
-
*
|
|
22
|
-
* @default "primary"
|
|
23
|
-
*/
|
|
19
|
+
/** Colour of the text. */
|
|
24
20
|
color?: TextColor;
|
|
25
21
|
/** Uses a higher contrast colour for the text. */
|
|
26
22
|
highContrast?: boolean;
|
|
27
23
|
}
|
|
28
24
|
/**
|
|
29
25
|
* Component used to render text. By default, it renders as a [`<span>`
|
|
30
|
-
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/
|
|
26
|
+
* element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/span). Use the `as`
|
|
31
27
|
* property to render as an `<em>`, `<p>`, `<strong>`, or other text elements.
|
|
32
28
|
*
|
|
33
29
|
* Example usage:
|
|
@@ -54,7 +54,7 @@ export interface TooltipProps extends Omit<ComponentProps<typeof TooltipPrimitiv
|
|
|
54
54
|
* ```tsx
|
|
55
55
|
* import { Button, Tooltip } from "@ostack.tech/ui";
|
|
56
56
|
*
|
|
57
|
-
* function BookmarkButton() {
|
|
57
|
+
* function BookmarkButton() {
|
|
58
58
|
* return (
|
|
59
59
|
* <Tooltip content="Save for later…">
|
|
60
60
|
* <Button>Bookmark</Button>
|
package/types/index.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export * from "./components/Mark";
|
|
|
44
44
|
export * from "./components/MenuList";
|
|
45
45
|
export * from "./components/NumericInput";
|
|
46
46
|
export * from "./components/Output";
|
|
47
|
+
export * from "./components/Pagination";
|
|
47
48
|
export * from "./components/Popover";
|
|
48
49
|
export * from "./components/Portal";
|
|
49
50
|
export * from "./components/Printer";
|
|
@@ -36,7 +36,7 @@ export interface AlertDialogOptions {
|
|
|
36
36
|
*/
|
|
37
37
|
triggerElement?: HTMLElement | null;
|
|
38
38
|
/** Properties to pass to the alert dialog's content component. */
|
|
39
|
-
contentProps?: Omit<AlertDialogContentProps, "
|
|
39
|
+
contentProps?: Omit<AlertDialogContentProps, "variant" | "color" | "size">;
|
|
40
40
|
/** Properties to pass to the alert dialog's header component. */
|
|
41
41
|
headerProps?: AlertDialogHeaderProps;
|
|
42
42
|
/** Properties to pass to the alert dialog's title component. */
|
|
@@ -16,6 +16,7 @@ import type { InputProps } from "../../components/Input";
|
|
|
16
16
|
import type { KeybindsProps } from "../../components/Keybinds";
|
|
17
17
|
import type { LabelProps } from "../../components/Label";
|
|
18
18
|
import type { NumericInputProps } from "../../components/NumericInput";
|
|
19
|
+
import type { PaginationProps } from "../../components/Pagination/Pagination.tsx";
|
|
19
20
|
import type { RadioGroupProps } from "../../components/RadioGroup";
|
|
20
21
|
import type { SelectProps } from "../../components/Select";
|
|
21
22
|
import type { StepperFinishTriggerChildlessProps, StepperNextTriggerChildlessProps, StepperPreviousTriggerChildlessProps, StepProps } from "../../components/Stepper";
|
|
@@ -40,7 +41,7 @@ export interface LocalizationObject {
|
|
|
40
41
|
DataTable: Pick<DataTableProps, "selectAllRowsLabel" | "selectRowLabel">;
|
|
41
42
|
DataTableContent: Pick<DataTableContentProps, "emptyMessage">;
|
|
42
43
|
DataTableFilter: Pick<DataTableFilterProps, "aria-label" | "placeholder">;
|
|
43
|
-
DataTablePagination: Pick<DataTablePaginationProps, "
|
|
44
|
+
DataTablePagination: Pick<DataTablePaginationProps, "rowsRange" | "label" | "previousPageButtonLabel" | "nextPageButtonLabel" | "pageButtonLabel">;
|
|
44
45
|
DataTableRowsPerPage: Pick<DataTableRowsPerPageProps, "label">;
|
|
45
46
|
DateInput: Pick<DateInputProps, "format" | "announcedFormat" | "placeholder" | "formatDescription" | "selectedDateDescription" | "calendarButtonLabel">;
|
|
46
47
|
DateRangeInput: Pick<DateRangeInputProps, "startInputLabel" | "endInputLabel" | "selectedDateRangeDescription" | "calendarButtonLabel">;
|
|
@@ -53,6 +54,7 @@ export interface LocalizationObject {
|
|
|
53
54
|
Keybinds: Pick<KeybindsProps, "keybindsSeparatorLabel" | "keyPressesSeparatorLabel" | "keysSeparatorLabel" | "keySymbols" | "keyLabels">;
|
|
54
55
|
Label: Pick<LabelProps, "helperButtonLabel">;
|
|
55
56
|
NumericInput: Pick<NumericInputProps, "decimalSeparator" | "groupingStyle" | "groupSeparator">;
|
|
57
|
+
Pagination: Pick<PaginationProps, "label" | "previousPageButtonLabel" | "nextPageButtonLabel" | "pageButtonLabel">;
|
|
56
58
|
RadioGroup: Pick<RadioGroupProps, "clearDescription">;
|
|
57
59
|
Select: Pick<SelectProps, "placeholder" | "clearDescription" | "searchLabel" | "searchPlaceholder" | "emptyMessage" | "optionsLabel" | "loadingOptionsLabel" | "valueTagCloseButtonLabel">;
|
|
58
60
|
Step: Pick<StepProps, "stepNumberLabel" | "completedLabel">;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"en-W4OWqPrv.js","names":["_Fragment"],"sources":["../../src/locales/en.tsx"],"sourcesContent":["import type { LocalizationObject } from \"../providers/LocalizationProvider\";\nimport { IS_APPLE } from \"../utils/platformUtils.ts\";\n\n/** `en` locale (partial). */\nexport const en: Omit<LocalizationObject, \"languageTag\" | \"dayPickerLocale\"> = {\n ActionSplit: {\n splitLabel: \"More options\",\n },\n ActionsSecondary: {\n label: \"More actions\",\n },\n AlertDialog: {\n okText: \"OK\",\n },\n Calendar: {\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n previousMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n },\n CloseButton: {\n label: \"Close\",\n },\n CollapsibleTrigger: {\n expandLabel: \"Show\",\n collapseLabel: \"Hide\",\n },\n CommandMenu: {\n searchPlaceholder: \"Search…\",\n listLabel: \"Suggestions\",\n loadingLabel: \"Loading…\",\n emptyMessage: \"No results found.\",\n },\n CommandMenuDialog: {\n title: \"Command palette\",\n description: \"Search for a command…\",\n },\n ConfirmDialog: {\n cancelText: \"Cancel\",\n },\n ControlCode: {\n visuallyHiddenPrefix: \"Field\",\n },\n DataTable: {\n selectAllRowsLabel: \"Select all\",\n selectRowLabel: \"Select\",\n },\n DataTableContent: {\n emptyMessage: \"Nothing to show.\",\n },\n DataTableFilter: {\n \"aria-label\": \"Search table\",\n placeholder: \"Search…\",\n },\n DataTablePagination: {\n \"aria-label\": \"Table pagination\",\n rowsRangeSelectLabel: (total) => `Visible rows out of ${total}`,\n rowsRange: (range, total) => (\n <>\n Rows {range} of {total}\n </>\n ),\n previousPageButtonLabel: \"Previous page\",\n nextPageButtonLabel: \"Next page\",\n },\n DataTableRowsPerPage: {\n label: \"Rows per page:\",\n },\n DateInput: {\n selectedDateDescription: (date) => `Selected date, ${date}`,\n calendarButtonLabel: \"Open calendar\",\n },\n DateRangeInput: {\n startInputLabel: \"Start date\",\n endInputLabel: \"End date\",\n selectedDateRangeDescription: ({ start, end }) =>\n `Selected date range, ${start || \"missing start date\"} to ${end || \"missing end date\"}`,\n },\n ErrorBoundary: {\n fallbackMessage: (\n <>\n Something went wrong.\n <br />\n Press the button on the right to try again. If the problem persists, please try again later.\n </>\n ),\n resetButtonLabel: \"Retry\",\n },\n Feedback: {\n visuallyHiddenPrefix: (type) =>\n type === \"error\" ? \"Error,\" : type === \"warning\" ? \"Warning,\" : null,\n },\n FeedbackPopover: {\n label: \"Show feedback\",\n },\n FieldGroupHeader: {\n visuallyHiddenCodePrefix: \"Section\",\n },\n Form: {\n submitErrorMessage: \"An error occurred during submission. Please try again later.\",\n nativeErrorMessages: {\n valueMissing: \"Required.\",\n badInput: \"Unrecognized format.\",\n typeMismatch: (el) => {\n const type = (el as HTMLInputElement).type;\n return type === \"email\" ? \"Invalid email.\" : \"Invalid URL.\";\n },\n patternMismatch: \"Invalid format.\",\n tooShort: (el) => {\n const minLength = (el as HTMLInputElement).minLength;\n return `Requires at least ${minLength} ${minLength === 1 ? \"character\" : \"characters\"}.`;\n },\n tooLong: (el) => {\n const maxLength = (el as HTMLInputElement).maxLength;\n return `Limited to at most ${maxLength} ${maxLength === 1 ? \"character\" : \"characters\"}.`;\n },\n rangeUnderflow: (el) => {\n const min = (el as HTMLInputElement).min;\n return `Below minimum of ${min}.`;\n },\n rangeOverflow: (el) => {\n const max = (el as HTMLInputElement).max;\n return `Above maximum of ${max}.`;\n },\n stepMismatch: \"Invalid value increment.\",\n },\n },\n Input: {\n loadingDescription: \"Loading…\",\n clearButtonLabel: \"Clear\",\n },\n Keybinds: {\n keybindsSeparatorLabel: \"or\",\n keyPressesSeparatorLabel: \"then\",\n keyLabels: {\n Meta: IS_APPLE ? undefined : \"Windows Key\",\n },\n },\n Label: {\n helperButtonLabel: \"Show help\",\n },\n NumericInput: {\n decimalSeparator: \".\",\n groupingStyle: \"thousand\",\n groupSeparator: \",\",\n },\n RadioGroup: {\n clearDescription: \"Press Backspace or Delete to clear.\",\n },\n Select: {\n placeholder: \"Select…\",\n clearDescription: \"Press Backspace or Delete to clear.\",\n searchLabel: \"Search options\",\n optionsLabel: \"Options\",\n valueTagCloseButtonLabel: \"Remove\",\n },\n Step: {\n stepNumberLabel: (number) => `Step ${number}`,\n completedLabel: \"Completed\",\n },\n StepperFinishTrigger: {\n label: \"Finish\",\n },\n StepperNextTrigger: {\n label: \"Next\",\n },\n StepperPreviousTrigger: {\n label: \"Back\",\n },\n TableColumn: {\n helperButtonLabel: \"Show help\",\n },\n TableHead: {\n sortByColumnDescription: (sortDirection) =>\n sortDirection === null\n ? \"Clear sort\"\n : `Sort ${sortDirection === \"asc\" ? \"ascending\" : \"descending\"}`,\n },\n TabList: {\n scrollLeftButtonLabel: \"Scroll left\",\n scrollRightButtonLabel: \"Scroll right\",\n },\n ToastProvider: {\n label: \"Notification\",\n },\n ToastViewport: {\n label: \"Notifications ({hotkey})\",\n },\n};\n"],"mappings":"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"}
|