@ostack.tech/ui 0.10.4 → 0.11.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/dist/chunks/{en-DwZKZVGL.js → en-DtnihkTA.js} +20 -3
- package/dist/chunks/en-DtnihkTA.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 +19 -2
- package/dist/locales/fr-FR.js.map +1 -1
- package/dist/locales/pt-PT.js +19 -2
- package/dist/locales/pt-PT.js.map +1 -1
- package/dist/ostack-ui.css +186 -110
- package/dist/ostack-ui.js +1466 -681
- package/dist/ostack-ui.js.map +1 -1
- package/dist/types/components/Alert/Alert.d.ts +3 -3
- package/dist/types/components/AlertDialog/AlertDialog.d.ts +6 -2
- package/dist/types/components/Button/Button.d.ts +7 -7
- package/dist/types/components/Calendar/Calendar.d.ts +60 -4
- package/dist/types/components/Card/Card.d.ts +2 -2
- package/dist/types/components/Code/Code.d.ts +1 -1
- package/dist/types/components/Collapsible/Collapsible.d.ts +26 -8
- package/dist/types/components/Collapsible/CollapsibleContext.d.ts +2 -2
- package/dist/types/components/Collapsible/CollapsibleTrigger.d.ts +22 -6
- package/dist/types/components/CommandMenu/CommandMenu.d.ts +1 -1
- package/dist/types/components/Container/Container.d.ts +21 -10
- package/dist/types/components/DataTable/DataTable.d.ts +63 -29
- package/dist/types/components/DataTable/DataTableContext.d.ts +3 -1
- package/dist/types/components/DateInput/DateInput.d.ts +8 -5
- package/dist/types/components/DateRangeInput/DateRangeInput.d.ts +6 -5
- package/dist/types/components/DescriptionList/DescriptionList.d.ts +38 -0
- package/dist/types/components/DescriptionList/DescriptionListItem.d.ts +15 -0
- package/dist/types/components/DescriptionList/index.d.ts +2 -0
- package/dist/types/components/Dialog/Dialog.d.ts +1 -2
- package/dist/types/components/Dialog/DialogContent.d.ts +3 -3
- package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/types/components/FieldGroup/FieldGroup.d.ts +42 -14
- package/dist/types/components/Grid/Grid.d.ts +64 -11
- package/dist/types/components/Icon/Icon.d.ts +1 -1
- package/dist/types/components/IconButton/IconButton.d.ts +8 -10
- package/dist/types/components/Input/Input.d.ts +2 -3
- package/dist/types/components/Link/Link.d.ts +1 -3
- package/dist/types/components/Mark/Mark.d.ts +1 -1
- package/dist/types/components/MenuList/MenuList.d.ts +5 -0
- package/dist/types/components/MenuList/MenuListItem.d.ts +3 -3
- package/dist/types/components/NumericInput/NumericInput.d.ts +2 -2
- package/dist/types/components/Popover/Popover.d.ts +32 -19
- package/dist/types/components/Popover/PopoverClose.d.ts +10 -3
- package/dist/types/components/Printer/Printer.d.ts +4 -4
- package/dist/types/components/Printer/PrinterContentContext.d.ts +4 -4
- package/dist/types/components/Printer/PrinterContext.d.ts +2 -2
- package/dist/types/components/Root/Root.d.ts +7 -7
- package/dist/types/components/Select/Select.d.ts +6 -0
- package/dist/types/components/Select/SelectContext.d.ts +2 -1
- package/dist/types/components/Select/SelectNative.d.ts +7 -0
- package/dist/types/components/Separator/Separator.d.ts +39 -1
- package/dist/types/components/Stack/Stack.d.ts +27 -5
- package/dist/types/components/Stepper/Step.d.ts +21 -6
- package/dist/types/components/Stepper/StepContent.d.ts +13 -4
- package/dist/types/components/Stepper/StepList.d.ts +8 -3
- package/dist/types/components/Stepper/Stepper.d.ts +51 -34
- package/dist/types/components/Stepper/StepperContext.d.ts +77 -4
- package/dist/types/components/Stepper/StepperFinishTrigger.d.ts +37 -0
- package/dist/types/components/Stepper/StepperNextTrigger.d.ts +34 -0
- package/dist/types/components/Stepper/StepperPreviousTrigger.d.ts +37 -0
- package/dist/types/components/Stepper/StepperState.d.ts +8 -0
- package/dist/types/components/Stepper/index.d.ts +5 -0
- package/dist/types/components/Table/Table.d.ts +2 -2
- package/dist/types/components/Table/TableColumn.d.ts +1 -1
- package/dist/types/components/Tabs/Tab.d.ts +6 -1
- package/dist/types/components/Tabs/Tabs.d.ts +1 -1
- package/dist/types/components/Toast/Toast.d.ts +81 -15
- package/dist/types/components/Tooltip/Tooltip.d.ts +4 -0
- package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +22 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/providers/AlertDialogProvider/AlertDialogProviderContext.d.ts +2 -2
- package/dist/types/providers/ErrorReportingProvider/ErrorReport.d.ts +3 -3
- package/dist/types/providers/ErrorReportingProvider/ErrorReportingProvider.d.ts +2 -2
- package/dist/types/providers/LocalizationProvider/LocalizationObject.d.ts +7 -0
- package/dist/types/providers/ToastManagerProvider/ToastManagerContext.d.ts +4 -2
- package/dist/types/utils/control.d.ts +1 -1
- package/dist/types/utils/keyboardShortcut.d.ts +1 -1
- package/dist/types/utils/useSearchParam.d.ts +5 -5
- package/dist/types/utils/useSearchParams.d.ts +7 -4
- package/package.json +3 -3
- package/scss/_utils.scss +3 -0
- package/scss/components/Checkbox/_Checkbox.scss +1 -1
- package/scss/components/Collapsible/_Collapsible-variables.scss +0 -1
- package/scss/components/Collapsible/_Collapsible.scss +2 -6
- package/scss/components/Container/_Container.scss +16 -5
- package/scss/components/DescriptionList/_DescriptionList-variables.scss +21 -0
- package/scss/components/DescriptionList/_DescriptionList.scss +33 -0
- package/scss/components/DropdownMenu/_DropdownMenu.scss +1 -3
- package/scss/components/FeedbackPopover/_FeedbackPopover-variables.scss +9 -9
- package/scss/components/FeedbackPopover/_FeedbackPopover.scss +1 -1
- package/scss/components/Field/_Field-variables.scss +9 -0
- package/scss/components/Field/_Field.scss +6 -8
- package/scss/components/Input/_Input.scss +5 -0
- package/scss/components/Label/_Label-variables.scss +1 -1
- package/scss/components/MenuList/_MenuList.scss +4 -1
- package/scss/components/RadioGroup/_Radio.scss +1 -1
- package/scss/components/Separator/_Separator-variables.scss +11 -0
- package/scss/components/Separator/_Separator.scss +13 -5
- package/scss/components/Stepper/_Stepper-variables.scss +37 -9
- package/scss/components/Stepper/_Stepper.scss +69 -22
- package/scss/components/Tabs/_Tabs.scss +6 -4
- package/scss/index.scss +1 -0
- package/scss/scss/placeholders/checkable/_checkable.scss +3 -3
- package/scss/scss/placeholders/control/_control.scss +1 -1
- package/scss/scss/placeholders/menu/_menu.scss +5 -16
- package/scss/scss/utils/_animation.scss +1 -1
- package/scss/scss/utils/_transition.scss +1 -1
- package/dist/chunks/en-DwZKZVGL.js.map +0 -1
- package/dist/types/components/DatePicker/DatePicker.d.ts +0 -27
- package/dist/types/components/DatePicker/index.d.ts +0 -1
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +0 -41
- package/dist/types/components/DateRangePicker/index.d.ts +0 -1
|
@@ -6,6 +6,8 @@ import { Icon, IconProp } from '../Icon';
|
|
|
6
6
|
export type ToastVariant = "solid" | "subtle" | "outlined";
|
|
7
7
|
/** Toast severities. */
|
|
8
8
|
export type ToastSeverity = "neutral" | "info" | "success" | "danger" | "warning";
|
|
9
|
+
/** Toast type of announcement. */
|
|
10
|
+
export type ToastAnnounce = "polite" | "assertive";
|
|
9
11
|
/** Properties of the toast component. */
|
|
10
12
|
export type ToastProps = ToastPropsWithAction | ToastPropsWithoutAction;
|
|
11
13
|
/** Properties of the toast component when it has an action. */
|
|
@@ -19,20 +21,33 @@ export interface ToastPropsWithoutAction extends ToastPropsBase {
|
|
|
19
21
|
actionAltText?: undefined;
|
|
20
22
|
}
|
|
21
23
|
/** Base properties of the toast component. */
|
|
22
|
-
export interface ToastPropsBase extends Pick<ComponentPropsWithoutRef<typeof ToastPrimitive.Root>, "
|
|
24
|
+
export interface ToastPropsBase extends Pick<ComponentPropsWithoutRef<typeof ToastPrimitive.Root>, "duration" | "defaultOpen" | "open" | "onOpenChange" | "onEscapeKeyDown" | "onPause" | "onResume" | "onSwipeStart" | "onSwipeMove" | "onSwipeEnd" | "onSwipeCancel" | "forceMount">, Omit<ComponentPropsWithoutRef<"div">, "onPause"> {
|
|
23
25
|
/**
|
|
24
26
|
* Toast variant.
|
|
25
27
|
*
|
|
26
|
-
* @default solid
|
|
28
|
+
* @default "solid"
|
|
27
29
|
*/
|
|
28
30
|
variant?: ToastVariant;
|
|
29
31
|
/**
|
|
30
32
|
* Sets the toast's severity.
|
|
31
33
|
*
|
|
32
|
-
* @default info
|
|
34
|
+
* @default "info"
|
|
33
35
|
*/
|
|
34
36
|
severity?: ToastSeverity;
|
|
35
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Controls how the toast is announced to screen reader users:
|
|
39
|
+
*
|
|
40
|
+
* - `polite`: The screen reader will announce the toast at the next available
|
|
41
|
+
* opportunity without interrupting the user. Best for background events not
|
|
42
|
+
* directly triggered by the user.
|
|
43
|
+
* - `assertive`: The screen reader will interrupt any current speech to
|
|
44
|
+
* announce this immediately. Recommended for feedback directly resulting
|
|
45
|
+
* from a user action.
|
|
46
|
+
*
|
|
47
|
+
* @default "assertive"
|
|
48
|
+
*/
|
|
49
|
+
announce?: ToastAnnounce;
|
|
50
|
+
/** Toast action. */
|
|
36
51
|
action?: ReactNode;
|
|
37
52
|
/**
|
|
38
53
|
* Describes an alternative way to achieve the action for assistive technology
|
|
@@ -43,9 +58,24 @@ export interface ToastPropsBase extends Pick<ComponentPropsWithoutRef<typeof Toa
|
|
|
43
58
|
actionAltText?: string;
|
|
44
59
|
/** Icon to show. Each severity except `"neutral"` has its own default icon. */
|
|
45
60
|
icon?: IconProp | null;
|
|
61
|
+
/**
|
|
62
|
+
* Whether the toast can be manually dismissed by the user. Setting this to
|
|
63
|
+
* `false` disables all manual exit triggers:
|
|
64
|
+
*
|
|
65
|
+
* - The close button is not rendered.
|
|
66
|
+
* - The `Escape` key is ignored.
|
|
67
|
+
* - Swipe gestures are disabled.
|
|
68
|
+
*
|
|
69
|
+
* > **Note:** This does not affect automatic dismissal via the `duration`
|
|
70
|
+
* > property. To create a truly "permanent" toast, set `duration` to
|
|
71
|
+
* > `Infinity`.
|
|
72
|
+
*
|
|
73
|
+
* @default true
|
|
74
|
+
*/
|
|
75
|
+
dismissible?: boolean;
|
|
46
76
|
/**
|
|
47
77
|
* Whether to show a close button. By default, a close button is shown when an
|
|
48
|
-
* `action` is not specified
|
|
78
|
+
* `action` is not specified and when the toast is dismissible..
|
|
49
79
|
*/
|
|
50
80
|
showCloseButton?: boolean;
|
|
51
81
|
/**
|
|
@@ -71,18 +101,54 @@ export interface ToastPropsBase extends Pick<ComponentPropsWithoutRef<typeof Toa
|
|
|
71
101
|
closeButtonProps?: ComponentPropsWithRef<typeof CloseButton>;
|
|
72
102
|
}
|
|
73
103
|
/**
|
|
74
|
-
* The
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* visually appealing and unobtrusive manner.
|
|
104
|
+
* The toast component provides a brief, temporary notification. Built on top of
|
|
105
|
+
* the [Radix Toast
|
|
106
|
+
* primitive](https://www.radix-ui.com/primitives/docs/components/toast).
|
|
78
107
|
*
|
|
79
108
|
* It composes the following subcomponents:
|
|
80
109
|
*
|
|
81
|
-
* - `
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
110
|
+
* - `ToastTitle`: Optional title for the toast.
|
|
111
|
+
* - `ToastDescription`: The primary message content.
|
|
112
|
+
*
|
|
113
|
+
* Example usage:
|
|
114
|
+
*
|
|
115
|
+
* ```tsx
|
|
116
|
+
* import {
|
|
117
|
+
* Button,
|
|
118
|
+
* Toast,
|
|
119
|
+
* ToastTitle,
|
|
120
|
+
* ToastDescription,
|
|
121
|
+
* } from "@ostack.tech/ui";
|
|
122
|
+
* import { useState } from "react";
|
|
123
|
+
*
|
|
124
|
+
* function UpdateProfile() {
|
|
125
|
+
* const [notifySaved, setNotifySaved] = useState(false);
|
|
126
|
+
*
|
|
127
|
+
* const handleSave = () => {
|
|
128
|
+
* saveProfile();
|
|
129
|
+
* setNotifySaved(true);
|
|
130
|
+
* };
|
|
131
|
+
*
|
|
132
|
+
* return (
|
|
133
|
+
* <>
|
|
134
|
+
* <Button onClick={handleSave}>Save changes</Button>
|
|
135
|
+
* <Toast open={notifySaved} onOpenChange={setNotifySaved}>
|
|
136
|
+
* <ToastTitle>Changes saved</ToastTitle>
|
|
137
|
+
* <ToastDescription>
|
|
138
|
+
* Your profile information has been updated.
|
|
139
|
+
* </ToastDescription>
|
|
140
|
+
* </Toast>
|
|
141
|
+
* </>
|
|
142
|
+
* );
|
|
143
|
+
* }
|
|
144
|
+
* ```
|
|
145
|
+
*
|
|
146
|
+
* > **Note:** In most scenarios, you might prefer to use the `useToastManager`
|
|
147
|
+
* > hook instead, which provides an imperative API to manage toasts.
|
|
148
|
+
*
|
|
149
|
+
* > **Note:** The `Root` component automatically initializes the `ToastProvider`
|
|
150
|
+
* > and `ToastViewport`. These manage the global state, configuration, and the
|
|
151
|
+
* > accessible region where notifications are rendered. Manual setup of these
|
|
152
|
+
* > components is not required.
|
|
87
153
|
*/
|
|
88
154
|
export declare const Toast: import('react').ForwardRefExoticComponent<ToastProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -62,5 +62,9 @@ export interface TooltipProps extends Omit<ComponentPropsWithoutRef<typeof Toolt
|
|
|
62
62
|
* );
|
|
63
63
|
* }
|
|
64
64
|
* ```
|
|
65
|
+
*
|
|
66
|
+
* > **Note:** The `Root` component automatically initializes the
|
|
67
|
+
* > `TooltipProvider`, which manages the global configuration and state for all
|
|
68
|
+
* > nested tooltips. Manual setup of the provider is not required.
|
|
65
69
|
*/
|
|
66
70
|
export declare const Tooltip: import('react').ForwardRefExoticComponent<TooltipProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -17,5 +17,26 @@ export interface VisuallyHiddenOwnProps {
|
|
|
17
17
|
*/
|
|
18
18
|
focusable?: boolean;
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Component that hides content from the screen while keeping it accessible to
|
|
22
|
+
* assistive technologies.
|
|
23
|
+
*
|
|
24
|
+
* Used to provide context to screen readers that is redundant for sighted
|
|
25
|
+
* users.
|
|
26
|
+
*
|
|
27
|
+
* Example usage:
|
|
28
|
+
*
|
|
29
|
+
* ```tsx
|
|
30
|
+
* import { VisuallyHidden } from "@ostack.tech/ui";
|
|
31
|
+
*
|
|
32
|
+
* function AddItemButton() {
|
|
33
|
+
* return (
|
|
34
|
+
* <button onClick={addItem}>
|
|
35
|
+
* <span aria-hidden>+</span>
|
|
36
|
+
* <VisuallyHidden>Add item</VisuallyHidden>
|
|
37
|
+
* </button>
|
|
38
|
+
* );
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
21
42
|
export declare const VisuallyHidden: PolymorphicComponent<VisuallyHiddenAs, "span", VisuallyHiddenOwnProps>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -18,9 +18,8 @@ export * from './components/ControlAddon';
|
|
|
18
18
|
export * from './components/ControlCode';
|
|
19
19
|
export * from './components/DataTable';
|
|
20
20
|
export * from './components/DateInput';
|
|
21
|
-
export * from './components/DatePicker';
|
|
22
21
|
export * from './components/DateRangeInput';
|
|
23
|
-
export * from './components/
|
|
22
|
+
export * from './components/DescriptionList';
|
|
24
23
|
export * from './components/Dialog';
|
|
25
24
|
export * from './components/DropdownMenu';
|
|
26
25
|
export * from './components/ErrorBoundary';
|
|
@@ -8,7 +8,7 @@ export interface AlertDialogOptions {
|
|
|
8
8
|
/**
|
|
9
9
|
* Alert dialog content variant.
|
|
10
10
|
*
|
|
11
|
-
* @default solid
|
|
11
|
+
* @default "solid"
|
|
12
12
|
*/
|
|
13
13
|
variant?: AlertDialogContentVariant;
|
|
14
14
|
/**
|
|
@@ -22,7 +22,7 @@ export interface AlertDialogOptions {
|
|
|
22
22
|
/**
|
|
23
23
|
* Alert dialog content color.
|
|
24
24
|
*
|
|
25
|
-
* @default neutral
|
|
25
|
+
* @default "neutral"
|
|
26
26
|
*/
|
|
27
27
|
color?: AlertDialogContentColor;
|
|
28
28
|
/** Alert dialog content size. */
|
|
@@ -17,9 +17,9 @@ export interface ErrorReport {
|
|
|
17
17
|
/**
|
|
18
18
|
* Browser's user agent.
|
|
19
19
|
*
|
|
20
|
-
* **
|
|
21
|
-
* HTTP request. However, it is included here since it is possible for the
|
|
22
|
-
* reporting to go through a proxy, which is free to alter the HTTP header.
|
|
20
|
+
* > **Note:** This could also be obtained from the `User-Agent` header of the
|
|
21
|
+
* > HTTP request. However, it is included here since it is possible for the
|
|
22
|
+
* > reporting to go through a proxy, which is free to alter the HTTP header.
|
|
23
23
|
*/
|
|
24
24
|
userAgent: string;
|
|
25
25
|
/** URL where the error occurred. */
|
|
@@ -29,7 +29,7 @@ export interface ErrorReportingProviderProps {
|
|
|
29
29
|
*
|
|
30
30
|
* This property is ignored when a custom `reportError` is provided.
|
|
31
31
|
*
|
|
32
|
-
* @default POST
|
|
32
|
+
* @default "POST"
|
|
33
33
|
*/
|
|
34
34
|
errorReportingMethod?: string;
|
|
35
35
|
/**
|
|
@@ -47,7 +47,7 @@ export interface ErrorReportingProviderProps {
|
|
|
47
47
|
*
|
|
48
48
|
* This property is ignored when a custom `reportError` is provided.
|
|
49
49
|
*
|
|
50
|
-
* @default application/json
|
|
50
|
+
* @default "application/json"
|
|
51
51
|
*/
|
|
52
52
|
encodedErrorReportMimeType?: string;
|
|
53
53
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Locale as DayPickerLocale } from 'react-day-picker';
|
|
2
2
|
import { CalendarProps } from '../../components/Calendar';
|
|
3
3
|
import { CloseButtonProps } from '../../components/CloseButton';
|
|
4
|
+
import { CollapsibleTriggerChildlessProps } from '../../components/Collapsible/CollapsibleTrigger.tsx';
|
|
4
5
|
import { CommandMenuDialogProps, CommandMenuProps } from '../../components/CommandMenu';
|
|
5
6
|
import { ControlCodeProps } from '../../components/ControlCode';
|
|
6
7
|
import { DataTableContentProps, DataTableFilterProps, DataTablePaginationProps, DataTableProps, DataTableRowsPerPageProps } from '../../components/DataTable';
|
|
@@ -16,6 +17,7 @@ import { LabelProps } from '../../components/Label';
|
|
|
16
17
|
import { NumericInputProps } from '../../components/NumericInput';
|
|
17
18
|
import { RadioGroupProps } from '../../components/RadioGroup';
|
|
18
19
|
import { SelectProps } from '../../components/Select';
|
|
20
|
+
import { StepperFinishTriggerChildlessProps, StepperNextTriggerChildlessProps, StepperPreviousTriggerChildlessProps, StepProps } from '../../components/Stepper';
|
|
19
21
|
import { TableColumnProps, TableHeadProps } from '../../components/Table';
|
|
20
22
|
import { TabListProps } from '../../components/Tabs';
|
|
21
23
|
import { ToastProviderProps, ToastViewportProps } from '../../components/Toast';
|
|
@@ -27,6 +29,7 @@ export interface LocalizationObject {
|
|
|
27
29
|
AlertDialog: Pick<ConfirmDialogOptions, "okText">;
|
|
28
30
|
Calendar: Pick<CalendarProps, "monthSelectLabel" | "yearSelectLabel" | "previousMonthLabel" | "nextMonthLabel">;
|
|
29
31
|
CloseButton: Pick<CloseButtonProps, "label">;
|
|
32
|
+
CollapsibleTrigger: Pick<CollapsibleTriggerChildlessProps, "expandLabel" | "collapseLabel">;
|
|
30
33
|
CommandMenu: Pick<CommandMenuProps, "label" | "searchPlaceholder" | "listLabel" | "loadingLabel" | "emptyMessage">;
|
|
31
34
|
CommandMenuDialog: Pick<CommandMenuDialogProps, "title" | "description">;
|
|
32
35
|
ConfirmDialog: Pick<ConfirmDialogOptions, "okText" | "cancelText">;
|
|
@@ -48,6 +51,10 @@ export interface LocalizationObject {
|
|
|
48
51
|
NumericInput: Pick<NumericInputProps, "decimalSeparator" | "groupingStyle" | "groupSeparator">;
|
|
49
52
|
RadioGroup: Pick<RadioGroupProps, "clearDescription">;
|
|
50
53
|
Select: Pick<SelectProps, "placeholder" | "clearDescription" | "searchLabel" | "searchPlaceholder" | "emptyMessage" | "optionsLabel" | "loadingOptionsLabel" | "valueTagCloseButtonLabel">;
|
|
54
|
+
Step: Pick<StepProps, "stepNumberLabel" | "completedLabel">;
|
|
55
|
+
StepperFinishTrigger: Pick<StepperFinishTriggerChildlessProps, "label">;
|
|
56
|
+
StepperNextTrigger: Pick<StepperNextTriggerChildlessProps, "label">;
|
|
57
|
+
StepperPreviousTrigger: Pick<StepperPreviousTriggerChildlessProps, "label">;
|
|
51
58
|
TableColumn: Pick<TableColumnProps, "helperButtonLabel">;
|
|
52
59
|
TableHead: Pick<TableHeadProps, "sortByColumnDescription">;
|
|
53
60
|
TabList: Pick<TabListProps, "scrollLeftButtonLabel" | "scrollRightButtonLabel">;
|
|
@@ -25,11 +25,13 @@ export interface ToastManagerContextValue {
|
|
|
25
25
|
*/
|
|
26
26
|
addToast: (description: ReactNode, toastOptions?: ToastOptions) => ToastId;
|
|
27
27
|
/**
|
|
28
|
-
* Removes an existing toast with the given identifier.
|
|
28
|
+
* Removes an existing toast with the given identifier. Calling `removeToast`
|
|
29
|
+
* with `null`, `undefined`, or the id of a toast which has already been
|
|
30
|
+
* removed is supported and behaves as a no-op.
|
|
29
31
|
*
|
|
30
32
|
* @param toastId Toast identifier.
|
|
31
33
|
*/
|
|
32
|
-
removeToast: (toastId: ToastId) => void;
|
|
34
|
+
removeToast: (toastId: ToastId | null | undefined) => void;
|
|
33
35
|
}
|
|
34
36
|
/** Toast manager context. */
|
|
35
37
|
export declare const ToastManagerContext: import('react').Context<ToastManagerContextValue | undefined>;
|
|
@@ -9,14 +9,14 @@ export interface SetSearchParamOptions extends SetSearchParamsOptions {
|
|
|
9
9
|
*/
|
|
10
10
|
clearDefaultValue?: boolean;
|
|
11
11
|
}
|
|
12
|
+
/** Accepted search parameter value. */
|
|
13
|
+
export type SearchParamValue = {
|
|
14
|
+
toString(): string;
|
|
15
|
+
} | null | undefined;
|
|
12
16
|
/** Result of the {@link useSearchParam} hook. */
|
|
13
17
|
export type UseSearchParamResult<TValue extends string | undefined = string | undefined> = [
|
|
14
18
|
searchParamValue: TValue,
|
|
15
|
-
setSearchParamValue: (nextSearchParamValue:
|
|
16
|
-
toString(): string;
|
|
17
|
-
} | null | undefined | ((prevSearchParamValue: TValue) => {
|
|
18
|
-
toString(): string;
|
|
19
|
-
} | null | undefined), options?: SetSearchParamOptions) => void
|
|
19
|
+
setSearchParamValue: (nextSearchParamValue: SearchParamValue | ((prevSearchParamValue: TValue) => SearchParamValue), options?: SetSearchParamOptions) => void
|
|
20
20
|
];
|
|
21
21
|
/**
|
|
22
22
|
* Hook exposing the value of a single URL search parameter and a function to
|
|
@@ -8,13 +8,16 @@ export interface SetSearchParamsOptions extends NavigationOptions {
|
|
|
8
8
|
*/
|
|
9
9
|
clearHash?: boolean;
|
|
10
10
|
}
|
|
11
|
+
/** Argument used to initialize a URL search parameters instance. */
|
|
12
|
+
type URLSearchParamsInit = ConstructorParameters<typeof URLSearchParams>[0];
|
|
11
13
|
/** Result of the {@link useSearchParams} hook. */
|
|
12
|
-
export
|
|
13
|
-
searchParams: URLSearchParams
|
|
14
|
-
setSearchParams: (nextSearchParams:
|
|
15
|
-
|
|
14
|
+
export interface UseSearchParamsResult {
|
|
15
|
+
searchParams: URLSearchParams;
|
|
16
|
+
setSearchParams: (nextSearchParams: URLSearchParamsInit | ((prevSearchParams: URLSearchParams) => URLSearchParamsInit), options?: SetSearchParamsOptions) => void;
|
|
17
|
+
}
|
|
16
18
|
/**
|
|
17
19
|
* Hook exposing the current URL search parameters and a function to update
|
|
18
20
|
* them.
|
|
19
21
|
*/
|
|
20
22
|
export declare function useSearchParams(): UseSearchParamsResult;
|
|
23
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ostack.tech/ui",
|
|
3
3
|
"description": "ostack/UI component library.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0",
|
|
5
5
|
"homepage": "https://ui.ostack.tech/",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Opensoft",
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"copy:scss": "cpy 'src/**/*.scss' '!src/**/*.stories.scss' scss/"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@fortawesome/react-fontawesome": "^3.
|
|
45
|
+
"@fortawesome/react-fontawesome": "^3.2.0",
|
|
46
46
|
"@tanstack/react-virtual": "^3.13.18",
|
|
47
47
|
"from-exponential": "^1.1.1",
|
|
48
48
|
"radix-ui": "^1.4.3",
|
|
49
|
-
"react-day-picker": "^9.13.
|
|
49
|
+
"react-day-picker": "^9.13.2",
|
|
50
50
|
"react-error-boundary": "^6.1.0",
|
|
51
51
|
"react-number-format": "^5.4.4",
|
|
52
52
|
"react-to-print": "^3.2.0",
|
package/scss/_utils.scss
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
@forward "components/Code/Code-variables";
|
|
30
30
|
@forward "components/Collapsible/Collapsible-variables";
|
|
31
31
|
@forward "components/DataTable/DataTable-variables";
|
|
32
|
+
@forward "components/DescriptionList/DescriptionList-variables";
|
|
32
33
|
@forward "components/Dialog/Dialog-variables";
|
|
33
34
|
@forward "components/CommandMenu/CommandMenu-variables";
|
|
34
35
|
@forward "components/Container/Container-variables";
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
@forward "components/ControlCode/ControlCode-variables";
|
|
38
39
|
@forward "components/DropdownMenu/DropdownMenu-variables";
|
|
39
40
|
@forward "components/FeedbackList/FeedbackList-variables";
|
|
41
|
+
@forward "components/Field/Field-variables";
|
|
40
42
|
@forward "components/FeedbackPopover/FeedbackPopover-variables";
|
|
41
43
|
@forward "components/FieldGroup/FieldGroup-variables";
|
|
42
44
|
@forward "components/Heading/Heading-variables";
|
|
@@ -53,6 +55,7 @@
|
|
|
53
55
|
@forward "components/RadioGroup/Radio-variables";
|
|
54
56
|
@forward "components/Root/Root-variables";
|
|
55
57
|
@forward "components/Select/Select-variables";
|
|
58
|
+
@forward "components/Separator/Separator-variables";
|
|
56
59
|
@forward "components/Stack/Stack-variables";
|
|
57
60
|
@forward "components/Stepper/Stepper-variables";
|
|
58
61
|
@forward "components/Table/Table-variables";
|
|
@@ -4,14 +4,10 @@
|
|
|
4
4
|
@use "../../scss/utils/declare-var" as *;
|
|
5
5
|
|
|
6
6
|
.#{$prefix}collapsible {
|
|
7
|
-
&__trigger {
|
|
8
|
-
color: inherit !important;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
7
|
&__content {
|
|
12
8
|
overflow: hidden;
|
|
13
9
|
|
|
14
|
-
&[data-
|
|
10
|
+
&[data-orientation="vertical"] {
|
|
15
11
|
@include declare-var(
|
|
16
12
|
--#{$prefix}animation-height,
|
|
17
13
|
var(--radix-collapsible-content-height)
|
|
@@ -32,7 +28,7 @@
|
|
|
32
28
|
}
|
|
33
29
|
}
|
|
34
30
|
|
|
35
|
-
&[data-
|
|
31
|
+
&[data-orientation="horizontal"] {
|
|
36
32
|
@include declare-var(
|
|
37
33
|
--#{$prefix}animation-width,
|
|
38
34
|
var(--radix-collapsible-content-width)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use "sass:map";
|
|
1
2
|
@use "Container-variables" as *;
|
|
2
3
|
@use "../../scss/base-variables" as *;
|
|
3
4
|
@use "../../scss/utils/breakpoints" as *;
|
|
@@ -6,11 +7,19 @@
|
|
|
6
7
|
$container: ".#{$prefix}container";
|
|
7
8
|
#{$container} {
|
|
8
9
|
width: 100%;
|
|
10
|
+
max-width: min(
|
|
11
|
+
var(--#{$prefix}container-max-width, 100%),
|
|
12
|
+
var(--#{$prefix}container-fluid-max-width, 100%)
|
|
13
|
+
);
|
|
9
14
|
margin-left: auto;
|
|
10
15
|
margin-right: auto;
|
|
11
16
|
padding-left: var(--#{$prefix}container-left-gutter);
|
|
12
17
|
padding-right: var(--#{$prefix}container-right-gutter);
|
|
13
18
|
|
|
19
|
+
@each $container-size, $container-max-width in $container-max-width-by-size {
|
|
20
|
+
--#{$prefix}container-max-width-#{$container-size}: #{$container-max-width};
|
|
21
|
+
}
|
|
22
|
+
|
|
14
23
|
@include responsive-values(
|
|
15
24
|
--#{$prefix}container,
|
|
16
25
|
(
|
|
@@ -20,10 +29,12 @@ $container: ".#{$prefix}container";
|
|
|
20
29
|
);
|
|
21
30
|
}
|
|
22
31
|
|
|
23
|
-
@each $container-size
|
|
32
|
+
@each $container-size in map.keys($container-max-width-by-size) {
|
|
24
33
|
@include media-breakpoint-up($container-size) {
|
|
25
|
-
%#{$prefix}container
|
|
26
|
-
|
|
34
|
+
%#{$prefix}container--fluid-#{$container-size} {
|
|
35
|
+
--#{$prefix}container-fluid-max-width: var(
|
|
36
|
+
--#{$prefix}container-max-width-#{$container-size}
|
|
37
|
+
);
|
|
27
38
|
}
|
|
28
39
|
|
|
29
40
|
// Extend each breakpoint which is smaller or equal to the current
|
|
@@ -32,8 +43,8 @@ $container: ".#{$prefix}container";
|
|
|
32
43
|
|
|
33
44
|
@each $breakpoint-size, $breakpoint in $breakpoint-by-size {
|
|
34
45
|
@if $extend-breakpoint and $breakpoint > 0 {
|
|
35
|
-
#{$container}
|
|
36
|
-
@extend %#{$prefix}container
|
|
46
|
+
#{$container}--fluid-#{$breakpoint-size} {
|
|
47
|
+
@extend %#{$prefix}container--fluid-#{$container-size};
|
|
37
48
|
}
|
|
38
49
|
|
|
39
50
|
// Once the current breakpoint is reached, stop extending
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@use "../../scss/base-variables" as *;
|
|
2
|
+
@use "../../scss/utils/spacing" as *;
|
|
3
|
+
|
|
4
|
+
$description-list-font-size: var(--#{$prefix}font-size-sm) !default;
|
|
5
|
+
$description-list-line-height: var(--#{$prefix}line-height-sm) !default;
|
|
6
|
+
|
|
7
|
+
// Item
|
|
8
|
+
$description-list-item-gap-y: spacing(1) !default;
|
|
9
|
+
|
|
10
|
+
// Term
|
|
11
|
+
$description-list-term-font-size: null !default;
|
|
12
|
+
$description-list-term-line-height: null !default;
|
|
13
|
+
$description-list-term-font-weight: $font-weight-medium !default;
|
|
14
|
+
$description-list-term-text-transform: null !default;
|
|
15
|
+
$description-list-term-color: var(--#{$prefix}neutral-a11) !default;
|
|
16
|
+
|
|
17
|
+
// Details
|
|
18
|
+
$description-list-details-font-size: null !default;
|
|
19
|
+
$description-list-details-line-height: null !default;
|
|
20
|
+
$description-list-details-font-weight: null !default;
|
|
21
|
+
$description-list-details-color: null !default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@use "DescriptionList-variables" as *;
|
|
2
|
+
@use "../../scss/base-variables" as *;
|
|
3
|
+
|
|
4
|
+
.#{$prefix}description-list {
|
|
5
|
+
margin-bottom: 0;
|
|
6
|
+
|
|
7
|
+
font-size: $description-list-font-size;
|
|
8
|
+
line-height: $description-list-line-height;
|
|
9
|
+
|
|
10
|
+
&__item {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&__term {
|
|
16
|
+
margin-bottom: $description-list-item-gap-y;
|
|
17
|
+
|
|
18
|
+
font-size: $description-list-term-font-size;
|
|
19
|
+
line-height: $description-list-term-line-height;
|
|
20
|
+
font-weight: $description-list-term-font-weight;
|
|
21
|
+
text-transform: $description-list-term-text-transform;
|
|
22
|
+
color: $description-list-term-color;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__details {
|
|
26
|
+
margin: 0;
|
|
27
|
+
|
|
28
|
+
font-size: $description-list-details-font-size;
|
|
29
|
+
line-height: $description-list-details-line-height;
|
|
30
|
+
font-weight: $description-list-details-font-weight;
|
|
31
|
+
color: $description-list-details-color;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -19,9 +19,7 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
:is(&__item, &__checkbox-item, &__radio-item)
|
|
22
|
-
#{$menu-list-item-action}:not(a):not(:disabled
|
|
23
|
-
[data-loading]
|
|
24
|
-
) {
|
|
22
|
+
#{$menu-list-item-action}:not(a):not(:disabled, [data-disabled]) {
|
|
25
23
|
cursor: $menu-item-button-cursor;
|
|
26
24
|
}
|
|
27
25
|
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
@use "../ControlAddon/ControlAddon-variables" as *;
|
|
2
|
+
@use "../Field/Field-variables" as *;
|
|
3
|
+
@use "../Label/Label-variables" as *;
|
|
2
4
|
@use "../../scss/base-variables" as *;
|
|
3
5
|
@use "../../scss/utils/spacing" as *;
|
|
4
6
|
@use "../../scss/placeholders/control/control-variables" as *;
|
|
5
7
|
|
|
6
|
-
$feedback-popover-max-width:
|
|
7
|
-
$feedback-popover-max-height:
|
|
8
|
-
$feedback-popover-padding-y:
|
|
9
|
-
$feedback-popover-padding-x:
|
|
8
|
+
$feedback-popover-max-width: $label-helper-popover-max-width !default;
|
|
9
|
+
$feedback-popover-max-height: $label-helper-popover-max-height !default;
|
|
10
|
+
$feedback-popover-padding-y: $label-helper-popover-padding-y !default;
|
|
11
|
+
$feedback-popover-padding-x: $label-helper-popover-padding-x !default;
|
|
10
12
|
|
|
11
13
|
// Button - Within control
|
|
12
14
|
$feedback-popover-button-control-inset-x: calc(
|
|
@@ -19,8 +21,6 @@ $feedback-popover-button-control-inset-x: calc(
|
|
|
19
21
|
);
|
|
20
22
|
|
|
21
23
|
// Feedback
|
|
22
|
-
$feedback-popover-feedback-
|
|
23
|
-
$feedback-popover-feedback-font-size:
|
|
24
|
-
$feedback-popover-feedback-line-height:
|
|
25
|
-
--#{$prefix}line-height-xs
|
|
26
|
-
) !default;
|
|
24
|
+
$feedback-popover-feedback-spacing-y: $field-feedback-spacing-y !default;
|
|
25
|
+
$feedback-popover-feedback-font-size: null !default;
|
|
26
|
+
$feedback-popover-feedback-line-height: null !default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@use "../ControlCode/ControlCode-variables" as *;
|
|
2
|
+
@use "../../scss/base-variables" as *;
|
|
3
|
+
@use "../../scss/utils/spacing" as *;
|
|
4
|
+
|
|
5
|
+
$field-spacing-y: spacing(1) !default;
|
|
6
|
+
$field-feedback-spacing-y: spacing(0.5) !default;
|
|
7
|
+
|
|
8
|
+
// Has code
|
|
9
|
+
$field-has-code-margin-left: calc($control-code-width + spacing(0.5)) !default;
|