@epam/ai-dial-ui-kit 0.13.0-dev.39 → 0.13.0-dev.42
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/README.md +1 -0
- package/dist/{JsonEditor-DsxGV74b.js → JsonEditor-Bh1CrjfQ.js} +1 -1
- package/dist/{JsonEditor-ByXdw2DW.cjs → JsonEditor-DxDjBP7K.cjs} +1 -1
- package/dist/{MarkdownEditor-yLqLTK49.cjs → MarkdownEditor-C-WjyKxs.cjs} +1 -1
- package/dist/MarkdownEditor-C9iab_6m.js +75 -0
- package/dist/{MarkdownEditor-B371qY-K.js → MarkdownEditor-CQ4byXdu.js} +1 -1
- package/dist/MarkdownEditor-Dz4A2knk.cjs +1 -0
- package/dist/components-manifest.json +80 -88
- package/dist/dial-ui-kit.cjs.js +1 -1
- package/dist/dial-ui-kit.es.js +185 -175
- package/dist/{index-g9PIrkp9.js → index-C-WBTQje.js} +20453 -19314
- package/dist/{index-DiKB9zEP.cjs → index-Dw1hi3_q.cjs} +31 -31
- package/dist/index.css +2 -2
- package/dist/src/components/New/CloseButton/CloseButton.d.ts +32 -0
- package/dist/src/components/New/ConfirmationPopup/ConfirmationPopup.d.ts +54 -0
- package/dist/src/components/New/ConfirmationPopup/constants.d.ts +14 -0
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +86 -0
- package/dist/src/components/New/Dropdown/DropdownSubMenuItem.d.ts +8 -0
- package/dist/src/components/New/Dropdown/constants.d.ts +8 -0
- package/dist/src/components/New/InfoButton/InfoButton.stories.d.ts +0 -5
- package/dist/src/components/New/Input/Input.d.ts +9 -0
- package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +32 -0
- package/dist/src/components/New/MarkdownEditor/constants.d.ts +15 -0
- package/dist/src/components/New/NumberInput/NumberInput.d.ts +35 -0
- package/dist/src/components/New/PasswordInput/PasswordInput.d.ts +32 -0
- package/dist/src/components/New/Popup/Popup.d.ts +68 -0
- package/dist/src/components/New/Popup/constants.d.ts +10 -0
- package/dist/src/components/New/Select/MultiSelectTags.d.ts +16 -0
- package/dist/src/components/New/Select/Select.d.ts +109 -0
- package/dist/src/components/New/Select/SelectSubMenuItem.d.ts +8 -0
- package/dist/src/components/New/Select/constants.d.ts +29 -0
- package/dist/src/components/New/constants/overlay.d.ts +17 -0
- package/dist/src/components/Skeleton/Skeleton.d.ts +18 -18
- package/dist/src/components/Skeleton/utils.d.ts +2 -2
- package/dist/src/index.d.ts +21 -2
- package/dist/src/types/skeleton.d.ts +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { InputProps } from '../Input/Input';
|
|
3
|
+
export interface NumberInputProps extends Omit<InputProps, 'onChange' | 'type'> {
|
|
4
|
+
/** When true, restricts input to integer values only — blocks decimal points, minus, plus, and scientific notation (e/E) */
|
|
5
|
+
integer?: boolean;
|
|
6
|
+
onChange?: (value?: number | string) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A number field, built on {@link Input}.
|
|
10
|
+
* aliases: NumericField|NumberField
|
|
11
|
+
*
|
|
12
|
+
* `type` is owned by this component; every other {@link Input} prop is passed
|
|
13
|
+
* through, so it shares the 2.0 field styling, sizes, label, caption and error
|
|
14
|
+
* states.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <NumberInput
|
|
19
|
+
* id="age"
|
|
20
|
+
* placeholder="Enter your age"
|
|
21
|
+
* value={25}
|
|
22
|
+
* onChange={(value) => setAge(value)}
|
|
23
|
+
* />
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @param [integer] - When true, restricts input to integer values only — blocks decimal points, minus, plus, and scientific notation (e/E)
|
|
27
|
+
* @param [min] - Minimum allowed value
|
|
28
|
+
* @param [max] - Maximum allowed value
|
|
29
|
+
* @param [size=ElementSize.Standard] - Field height: standard is 40px, small is 24px
|
|
30
|
+
* @param [onKeyDown] - Called after the numeric key guard has run, unless the key was blocked
|
|
31
|
+
* @param [onPaste] - Called after pasted text has been sanitized in `integer` mode
|
|
32
|
+
* @param onChange - Callback function called when the input value changes.
|
|
33
|
+
* Returns either a number (for most values) or a string (for decimal values < 1 with leading zeros)
|
|
34
|
+
*/
|
|
35
|
+
export declare const NumberInput: FC<NumberInputProps>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { InputProps } from '../Input/Input';
|
|
3
|
+
export interface PasswordInputProps extends Omit<InputProps, 'type' | 'iconAfter'> {
|
|
4
|
+
/** Accessible name of the reveal toggle while the value is masked. */
|
|
5
|
+
showPasswordLabel?: string;
|
|
6
|
+
/** Accessible name of the reveal toggle while the value is visible. */
|
|
7
|
+
hidePasswordLabel?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A password field with a reveal toggle, built on {@link Input}.
|
|
11
|
+
* aliases: SecureInput|ToggleablePassword
|
|
12
|
+
*
|
|
13
|
+
* The toggle is a real `<button>`, so it is reachable by keyboard and announces
|
|
14
|
+
* both its purpose and its state. `type` and `iconAfter` are owned by this
|
|
15
|
+
* component; every other {@link Input} prop is passed through.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <PasswordInput
|
|
20
|
+
* id="password"
|
|
21
|
+
* labelProps={{ label: 'Password', required: true }}
|
|
22
|
+
* value={password}
|
|
23
|
+
* onChange={setPassword}
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @param [showPasswordLabel="Show password"] - Accessible name of the toggle while the value is masked
|
|
28
|
+
* @param [hidePasswordLabel="Hide password"] - Accessible name of the toggle while the value is visible
|
|
29
|
+
* @param [size=ElementSize.Standard] - Field height: standard is 40px, small is 24px
|
|
30
|
+
* @param [disabled=false] - Disables the field and its reveal toggle
|
|
31
|
+
*/
|
|
32
|
+
export declare const PasswordInput: FC<PasswordInputProps>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { FC, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { PopupSize } from '../../../types/popup';
|
|
3
|
+
export interface PopupProps {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
header?: ReactNode;
|
|
6
|
+
ariaLabel?: string;
|
|
7
|
+
portalId?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
overlayClassName?: string;
|
|
10
|
+
titleClassName?: string;
|
|
11
|
+
headerClassName?: string;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
footer?: ReactNode;
|
|
14
|
+
onClose?: (e?: MouseEvent<HTMLButtonElement> | null) => void;
|
|
15
|
+
size?: PopupSize;
|
|
16
|
+
hideClose?: boolean;
|
|
17
|
+
closeAriaLabel?: string;
|
|
18
|
+
closeOnOutsideClick?: boolean;
|
|
19
|
+
preventKeyboardOnOpen?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* An accessible modal dialog using Floating UI.
|
|
23
|
+
* aliases: Modal|Dialog
|
|
24
|
+
*
|
|
25
|
+
* Renders in a portal with a scrim overlay, focus management, a header with the
|
|
26
|
+
* title and close control, a scrollable body and an optional footer. Sections
|
|
27
|
+
* are separated by spacing rather than rules; add your own through
|
|
28
|
+
* `headerClassName` or the footer node if a surface needs them.
|
|
29
|
+
*
|
|
30
|
+
* A string `header` names the dialog automatically. A `header` node cannot —
|
|
31
|
+
* pass `ariaLabel` in that case, or the dialog opens unnamed.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* <Popup
|
|
36
|
+
* open
|
|
37
|
+
* header="Title"
|
|
38
|
+
* size={PopupSize.Md}
|
|
39
|
+
* footer={
|
|
40
|
+
* <div className="flex justify-end gap-2 px-6 py-4">
|
|
41
|
+
* <NeutralButton label="Cancel" />
|
|
42
|
+
* <PrimaryButton label="Confirm" />
|
|
43
|
+
* </div>
|
|
44
|
+
* }
|
|
45
|
+
* onClose={() => setOpen(false)}
|
|
46
|
+
* >
|
|
47
|
+
* <div className="px-6 py-4">Dialog content goes here…</div>
|
|
48
|
+
* </Popup>
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @param [open=false] - Controls visibility of the popup
|
|
52
|
+
* @param [header] - Optional title rendered in the header
|
|
53
|
+
* @param [ariaLabel] - Accessible name for the dialog; needed when `header` is not a string
|
|
54
|
+
* @param [portalId] - Optional portal container id
|
|
55
|
+
* @param [className] - Additional CSS classes applied to the popup container
|
|
56
|
+
* @param [overlayClassName] - Additional CSS classes applied to the overlay
|
|
57
|
+
* @param [titleClassName] - Additional CSS classes applied to the title element
|
|
58
|
+
* @param [headerClassName] - Additional CSS classes applied to the popup header container
|
|
59
|
+
* @param [children] - Body content
|
|
60
|
+
* @param [footer] - Footer area for actions
|
|
61
|
+
* @param [onClose] - Callback fired when the popup requests to close
|
|
62
|
+
* @param [size=PopupSize.Md] - Sets the max-width of the popup
|
|
63
|
+
* @param [hideClose=false] - Whether the close button is hidden in the header
|
|
64
|
+
* @param [closeAriaLabel="Close dialog"] - Accessible name of the close button
|
|
65
|
+
* @param [closeOnOutsideClick=true] - Whether the popup closes when clicking outside
|
|
66
|
+
* @param [preventKeyboardOnOpen=false] - When true, initial focus goes to a non-input guard to avoid opening the virtual keyboard on mobile
|
|
67
|
+
*/
|
|
68
|
+
export declare const Popup: FC<PopupProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PopupSize } from '../../../types/popup';
|
|
2
|
+
export declare const popupOverlayBaseClassName = "z-[52] flex items-center justify-center bg-backdrop md:p-4 gap-5 p-6";
|
|
3
|
+
export declare const popupBaseClassName = "relative flex w-full max-h-full flex-col rounded-xl bg-layer-raised md:h-auto";
|
|
4
|
+
export declare const popupHeaderClassName = "flex flex-row items-center justify-between px-6 py-4";
|
|
5
|
+
export declare const popupTitleClassName = "flex-1 min-w-0 mr-3 truncate dial-h2-text text-primary";
|
|
6
|
+
/**
|
|
7
|
+
* Max widths per size. Full width below the `md` breakpoint, where the popup
|
|
8
|
+
* fills the screen.
|
|
9
|
+
*/
|
|
10
|
+
export declare const popupSizeClassMap: Record<PopupSize, string>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC, MouseEvent } from 'react';
|
|
2
|
+
import { SelectOption } from '../../../models/select';
|
|
3
|
+
export interface MultiSelectTagsProps {
|
|
4
|
+
options: SelectOption[];
|
|
5
|
+
selectedValues: string[];
|
|
6
|
+
handleRemoveTag?: (event: MouseEvent<HTMLButtonElement, globalThis.MouseEvent>, val: string) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The selected values of a multi-select, rendered as removable tags inside the
|
|
10
|
+
* field.
|
|
11
|
+
*
|
|
12
|
+
* @param options - All available options, used to resolve labels and icons
|
|
13
|
+
* @param selectedValues - Values currently selected
|
|
14
|
+
* @param [handleRemoveTag] - Called with the value whose tag was removed; when omitted the tags are not removable
|
|
15
|
+
*/
|
|
16
|
+
export declare const MultiSelectTags: FC<MultiSelectTagsProps>;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { FC, MouseEvent, ReactNode, Ref } from 'react';
|
|
2
|
+
import { LabelProps } from '../Label/Label';
|
|
3
|
+
import { SelectOption } from '../../../models/select';
|
|
4
|
+
import { ElementSize } from '../../../types/size';
|
|
5
|
+
export interface SelectProps {
|
|
6
|
+
options: SelectOption[];
|
|
7
|
+
multiple?: boolean;
|
|
8
|
+
id?: string;
|
|
9
|
+
size?: ElementSize;
|
|
10
|
+
value?: string | string[];
|
|
11
|
+
customSelectedValue?: string;
|
|
12
|
+
prefix?: string;
|
|
13
|
+
defaultValue?: string | string[];
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
labelProps?: LabelProps;
|
|
16
|
+
error?: string;
|
|
17
|
+
caption?: string;
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
searchable?: boolean;
|
|
20
|
+
searchSize?: ElementSize;
|
|
21
|
+
searchPlaceholder?: string;
|
|
22
|
+
selectAll?: boolean;
|
|
23
|
+
selectAllLabel?: string;
|
|
24
|
+
emptyStateTitle?: string;
|
|
25
|
+
emptyStateDescription?: string;
|
|
26
|
+
emptyStateIcon?: ReactNode;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
className?: string;
|
|
29
|
+
fieldClassName?: string;
|
|
30
|
+
listClassName?: string;
|
|
31
|
+
closable?: boolean;
|
|
32
|
+
invalid?: boolean;
|
|
33
|
+
header?: ReactNode | (() => ReactNode);
|
|
34
|
+
footer?: ReactNode | (() => ReactNode);
|
|
35
|
+
open?: boolean;
|
|
36
|
+
onOpenChange?: (open: boolean) => void;
|
|
37
|
+
onSearchQueryChange?: (query: string) => void;
|
|
38
|
+
dismissRef?: Ref<unknown>;
|
|
39
|
+
onClose?: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
40
|
+
onChange?: (next: string | string[]) => void;
|
|
41
|
+
onFooterClick?: (e: MouseEvent<HTMLDivElement>) => void;
|
|
42
|
+
customMultiSelectTagsRenderer?: (options: SelectOption[], selectedValues: string[], handleRemoveTag: (event: MouseEvent<HTMLButtonElement, globalThis.MouseEvent>, val: string) => void) => ReactNode;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A versatile select supporting single and multiple selections.
|
|
46
|
+
* aliases: OptionPicker|ChoiceSelector
|
|
47
|
+
*
|
|
48
|
+
* The field is an {@link Input}, so it carries the 2.0 field styling, sizes,
|
|
49
|
+
* label, caption and error states, and it exposes the control as a `combobox`
|
|
50
|
+
* whose popup is the option list.
|
|
51
|
+
*
|
|
52
|
+
* Single mode:
|
|
53
|
+
* - The field shows the selected option's leading icon + label.
|
|
54
|
+
* - In the list, the selected option is indicated by a LEFT border, a tinted background
|
|
55
|
+
* and a trailing check icon.
|
|
56
|
+
*
|
|
57
|
+
* Multiple mode uses checkboxes (including Select All with indeterminate state) and
|
|
58
|
+
* renders the selection as removable tags inside the field.
|
|
59
|
+
*
|
|
60
|
+
* The field itself is never typeable: `searchable` puts a search field in the overlay
|
|
61
|
+
* header that filters the options.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```tsx
|
|
65
|
+
* <Select options={[{ value: 'option-1', label: 'Option 1' }]} />
|
|
66
|
+
* <Select searchable options={[{ value: 'a', label: 'Alpha' }, { value: 'b', label: 'Beta' }]} />
|
|
67
|
+
* <Select multiple selectAll options={[{ value: '1', label: 'One' }, { value: '2', label: 'Two' }]} />
|
|
68
|
+
* <Select labelProps={{ label: 'Operator' }} caption="Pick a comparison" options={options} />
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @param options - Array of options to select from.
|
|
72
|
+
* @param [id] - The id of the field, linked to the label.
|
|
73
|
+
* @param [multiple] - Whether multiple selections are allowed.
|
|
74
|
+
* @param [size=ElementSize.Standard] - Field height: standard is 40px, small is 24px.
|
|
75
|
+
* @param [value] - Controlled selected value(s).
|
|
76
|
+
* @param [customSelectedValue] - Custom string to render as the selected value in single mode.
|
|
77
|
+
* @param [prefix] - Prefix for selected value(s).
|
|
78
|
+
* @param [defaultValue] - Uncontrolled initial selected value(s).
|
|
79
|
+
* @param [placeholder="Select..."] - Placeholder text when no selection is made.
|
|
80
|
+
* @param [labelProps] - Props of the {@link Label} rendered above the field.
|
|
81
|
+
* @param [error] - Error message rendered below the field (does not by itself apply error styling, pass `invalid` too).
|
|
82
|
+
* @param [caption] - Helper text rendered below the field when there is no `error`.
|
|
83
|
+
* @param [ariaLabel] - Accessible name for the field; use it when there is no visible label.
|
|
84
|
+
* @param [searchable=false] - Show a search field in the overlay header.
|
|
85
|
+
* @param [searchSize=ElementSize.Standard] - Size of the overlay search input when `searchable` is enabled.
|
|
86
|
+
* @param [searchPlaceholder] - Placeholder for the overlay search input.
|
|
87
|
+
* @param [selectAll=false] - Show a "Select All" checkbox in multiple mode.
|
|
88
|
+
* @param [selectAllLabel="Select all"] - Label for the "Select All" checkbox.
|
|
89
|
+
* @param [emptyStateTitle="No options available"] - Title text when there are no options.
|
|
90
|
+
* @param [emptyStateDescription] - Description text when there are no options.
|
|
91
|
+
* @param [emptyStateIcon] - Icon to display when there are no options.
|
|
92
|
+
* @param [invalid] - Whether the select is in an invalid state, affecting styling.
|
|
93
|
+
* @param [disabled=false] - Disable the control.
|
|
94
|
+
* @param [className] - Additional CSS classes for the outer container.
|
|
95
|
+
* @param [fieldClassName] - Additional CSS classes for the field itself.
|
|
96
|
+
* @param [listClassName] - Additional CSS classes for the list dropdown.
|
|
97
|
+
* @param [closable=false] - Show a close button in the dropdown header.
|
|
98
|
+
* @param [header] - Custom node/function rendered above the options.
|
|
99
|
+
* @param [footer] - Custom node/function rendered below the options.
|
|
100
|
+
* @param [open] - Controlled open state of the dropdown. When provided, makes the dropdown controlled.
|
|
101
|
+
* @param [onOpenChange] - Called when the dropdown open state changes.
|
|
102
|
+
* @param [onClose] - Called when the dropdown close button is clicked.
|
|
103
|
+
* @param [onChange] - Called when the selection changes.
|
|
104
|
+
* @param [onSearchQueryChange] - Called when the overlay search query changes, including the reset to `''` on close. Use it to fetch options for the query.
|
|
105
|
+
* @param [onFooterClick] - Called when the footer element is clicked. When provided, automatically closes the dropdown.
|
|
106
|
+
* @param [dismissRef] - Ref object to expose a `dismiss` method to programmatically close the select.
|
|
107
|
+
* @param [customMultiSelectTagsRenderer] - Renders the selected tags of a multi-select in place of the default ones.
|
|
108
|
+
*/
|
|
109
|
+
export declare const Select: FC<SelectProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { SelectOption } from '../../../models/select';
|
|
3
|
+
export interface SelectSubMenuItemProps {
|
|
4
|
+
opt: SelectOption;
|
|
5
|
+
selectedValues: string[];
|
|
6
|
+
onSelect: (value: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const SelectSubMenuItem: FC<SelectSubMenuItemProps>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const selectOverlayBaseClassName: string;
|
|
2
|
+
export declare const selectOptionBaseClassName: string;
|
|
3
|
+
export declare const selectOptionSelectedClassName = "bg-accent-primary-alpha";
|
|
4
|
+
/**
|
|
5
|
+
* Holds the option list to the width of the field.
|
|
6
|
+
*
|
|
7
|
+
* `Dropdown` only pins the overlay's *min* width to the trigger and lets
|
|
8
|
+
* `max-width` run to the available viewport width — as an inline style, so a
|
|
9
|
+
* single long label stretches the list across the screen and only `!important`
|
|
10
|
+
* can rein it back in. `--reference-width` is the trigger width the dropdown
|
|
11
|
+
* publishes, and it is set whenever `matchReferenceWidth` is left on (the
|
|
12
|
+
* default this component relies on).
|
|
13
|
+
*/
|
|
14
|
+
export declare const selectListWidthClassName = "!max-w-[var(--reference-width)]";
|
|
15
|
+
export declare const selectOptionDisabledClassName = "opacity-75";
|
|
16
|
+
export declare const dropdownMenuMaxHeight = 352;
|
|
17
|
+
export declare const selectSubMenuGap = 4;
|
|
18
|
+
/** Classes for the chevron rendered as the field's trailing icon. */
|
|
19
|
+
export declare const selectFieldIconClassName = "text-secondary transition-transform";
|
|
20
|
+
/**
|
|
21
|
+
* Number of options below which the overlay's search row stays hidden: a list
|
|
22
|
+
* short enough to scan at a glance does not need to be filtered.
|
|
23
|
+
*/
|
|
24
|
+
export declare const selectSearchThreshold = 8;
|
|
25
|
+
export declare const selectSearchIcon: import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const selectCloseIcon: import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
/** Marks the selected option in single mode, alongside its tinted row. */
|
|
28
|
+
export declare const selectOptionCheckIcon: import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const selectEmptyStateIcon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Styling shared by the 2.0 floating surfaces — the dropdown menu and the select
|
|
3
|
+
* option list. They are the same object visually, so they read from one place
|
|
4
|
+
* rather than each keeping its own copy of the tokens.
|
|
5
|
+
*/
|
|
6
|
+
/** The floating panel itself: rounded raised card with a one-unit inset. */
|
|
7
|
+
export declare const overlaySurfaceClassName = "rounded-xl bg-layer-raised p-1 shadow-md";
|
|
8
|
+
/**
|
|
9
|
+
* A selectable row inside the panel. Keeps a visible focus ring: these rows are
|
|
10
|
+
* reached by keyboard, and the 1.0 versions suppressed the ring outright.
|
|
11
|
+
*/
|
|
12
|
+
export declare const overlayItemClassName: string;
|
|
13
|
+
/** Tint marking the row that is currently selected. */
|
|
14
|
+
export declare const overlayItemSelectedClassName = "bg-accent-primary-alpha";
|
|
15
|
+
export declare const overlayItemDisabledClassName = "opacity-75";
|
|
16
|
+
/** Distance between the trigger and its panel, and between nested panels. */
|
|
17
|
+
export declare const overlayGap = 4;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { FC, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
2
|
+
import { SkeletonVariant, SkeletonAvatarSize, SkeletonAvatarShape } from '../../types/skeleton';
|
|
3
|
+
export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
active?: boolean;
|
|
5
5
|
paragraph?: boolean | {
|
|
6
6
|
rows?: number;
|
|
7
7
|
width?: string | string[];
|
|
8
8
|
};
|
|
9
9
|
avatar?: boolean | {
|
|
10
|
-
size?: number |
|
|
11
|
-
shape?:
|
|
10
|
+
size?: number | SkeletonAvatarSize;
|
|
11
|
+
shape?: SkeletonAvatarShape;
|
|
12
12
|
};
|
|
13
13
|
showTitle?: boolean | {
|
|
14
14
|
width?: string;
|
|
15
15
|
};
|
|
16
16
|
loading?: boolean;
|
|
17
17
|
children?: ReactNode;
|
|
18
|
-
variant?:
|
|
18
|
+
variant?: SkeletonVariant;
|
|
19
19
|
width?: string | number;
|
|
20
20
|
height?: string | number;
|
|
21
21
|
overlay?: ReactNode;
|
|
22
22
|
color?: string;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Skeleton
|
|
26
26
|
* aliases: PlaceholderUI|ShimmerLoader
|
|
27
27
|
*
|
|
28
28
|
* A placeholder component to show while content is loading.
|
|
@@ -31,16 +31,16 @@ export interface DialSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
31
31
|
* @example
|
|
32
32
|
* ```tsx
|
|
33
33
|
* // Simple skeleton
|
|
34
|
-
* <
|
|
34
|
+
* <Skeleton />
|
|
35
35
|
*
|
|
36
36
|
* // Text skeleton with custom size
|
|
37
|
-
* <
|
|
37
|
+
* <Skeleton variant={SkeletonVariant.Text} width="200px" height="20px" />
|
|
38
38
|
*
|
|
39
39
|
* // Circular avatar skeleton
|
|
40
|
-
* <
|
|
40
|
+
* <Skeleton variant={SkeletonVariant.Circular} width={40} height={40} />
|
|
41
41
|
*
|
|
42
42
|
* // Complex skeleton with avatar, showTitle and paragraph
|
|
43
|
-
* <
|
|
43
|
+
* <Skeleton
|
|
44
44
|
* avatar
|
|
45
45
|
* showTitle
|
|
46
46
|
* paragraph={{ rows: 3 }}
|
|
@@ -48,20 +48,20 @@ export interface DialSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
48
48
|
* />
|
|
49
49
|
*
|
|
50
50
|
* // Conditional loading
|
|
51
|
-
* <
|
|
51
|
+
* <Skeleton loading={isLoading}>
|
|
52
52
|
* <div>Your content here</div>
|
|
53
|
-
* </
|
|
53
|
+
* </Skeleton>
|
|
54
54
|
*
|
|
55
55
|
* // Custom paragraph widths
|
|
56
|
-
* <
|
|
56
|
+
* <Skeleton
|
|
57
57
|
* paragraph={{ rows: 3, width: ['100%', '80%', '60%'] }}
|
|
58
58
|
* />
|
|
59
59
|
*
|
|
60
60
|
* // Avatar with size and shape
|
|
61
|
-
* <
|
|
61
|
+
* <Skeleton
|
|
62
62
|
* avatar={{
|
|
63
|
-
* size:
|
|
64
|
-
* shape:
|
|
63
|
+
* size: SkeletonAvatarSize.Large,
|
|
64
|
+
* shape: SkeletonAvatarShape.Square
|
|
65
65
|
* }}
|
|
66
66
|
* />
|
|
67
67
|
* ```
|
|
@@ -72,11 +72,11 @@ export interface DialSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
72
72
|
* @param [showTitle=true] - Show title placeholder or configure its appearance
|
|
73
73
|
* @param [loading=true] - Display the skeleton when true
|
|
74
74
|
* @param [children] - Content to be displayed when loading is false
|
|
75
|
-
* @param [variant=
|
|
75
|
+
* @param [variant=SkeletonVariant.Default] - Skeleton variant
|
|
76
76
|
* @param [width] - Width of the skeleton
|
|
77
77
|
* @param [height] - Height of the skeleton
|
|
78
78
|
* @param [className] - Additional CSS classes
|
|
79
79
|
* @param [overlay] - Content to overlay on top of the skeleton (e.g., a spinner)
|
|
80
80
|
* @param [color] - Custom background color for the skeleton elements (overrides the default token)
|
|
81
81
|
*/
|
|
82
|
-
export declare const
|
|
82
|
+
export declare const Skeleton: FC<SkeletonProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getAvatarSize: (size?: number |
|
|
1
|
+
import { SkeletonAvatarSize } from '../../types/skeleton';
|
|
2
|
+
export declare const getAvatarSize: (size?: number | SkeletonAvatarSize) => number;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export { DialFileName } from './components/FileName/FileName';
|
|
|
46
46
|
export { DialFolderName } from './components/FolderName/FolderName';
|
|
47
47
|
export { DialResizableContainer } from './components/ResizableContainer/ResizableContainer';
|
|
48
48
|
export { DialConditionalResizableContainer } from './components/ResizableContainer/ConditionalResizableContainer';
|
|
49
|
-
export {
|
|
49
|
+
export { Skeleton } from './components/Skeleton/Skeleton';
|
|
50
50
|
export { DialGrid } from './components/Grid/Grid';
|
|
51
51
|
export type { DialGridProps } from './components/Grid/Grid';
|
|
52
52
|
export { DialDateCellRenderer } from './components/Grid/renderers/DateCellRenderer';
|
|
@@ -101,6 +101,7 @@ export type { FileManagerGridRow } from './components/FileManager/FileManagerCon
|
|
|
101
101
|
export type { GridOptions, ToolbarOptions, BulkActionsToolbarOptions, } from './components/FileManager/FileManager';
|
|
102
102
|
export { DialDestinationFolderPopup } from './components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup';
|
|
103
103
|
export { DialFoldersTree } from './components/FileManager/components/FoldersTree/FoldersTree';
|
|
104
|
+
export { EditorThemes } from './types/editor';
|
|
104
105
|
export { ButtonVariant, ButtonAppearance } from './types/button';
|
|
105
106
|
export { RadioGroupOrientation } from './types/radio-group';
|
|
106
107
|
export { PopupSize } from './types/popup';
|
|
@@ -115,7 +116,7 @@ export { DialFileManagerTabs, DialFileManagerActions, FileManagerColumnKey, } fr
|
|
|
115
116
|
export { FlexibleActionsDirection } from './types/flexible-actions';
|
|
116
117
|
export { DialItemType } from './types/item';
|
|
117
118
|
export { ResizableContainerSide } from './types/resizable-container';
|
|
118
|
-
export {
|
|
119
|
+
export { SkeletonVariant, SkeletonAvatarSize, SkeletonAvatarShape, } from './types/skeleton';
|
|
119
120
|
export { useDialFileManagerTabs } from './components/FileManager/hooks/use-file-manager-tabs';
|
|
120
121
|
export { EDITABLE_CONTAINER_ATTRIBUTE, editableContainerProps, useEditableItem, } from './hooks/use-editable-item';
|
|
121
122
|
export type { UseEditableItemOptions } from './hooks/use-editable-item';
|
|
@@ -165,8 +166,14 @@ export { FabButton } from './components/FabButton/FabButton';
|
|
|
165
166
|
export type { FabButtonProps } from './components/FabButton/FabButton';
|
|
166
167
|
export { ButtonDropdown } from './components/New/ButtonDropdown/ButtonDropdown';
|
|
167
168
|
export type { ButtonDropdownProps } from './components/New/ButtonDropdown/ButtonDropdown';
|
|
169
|
+
export type { MarkdownEditorProps } from './components/New/MarkdownEditor/MarkdownEditor';
|
|
170
|
+
export declare const LazyMarkdownEditor: () => Promise<typeof import("./components/New/MarkdownEditor/MarkdownEditor")>;
|
|
168
171
|
export { InlineSelect, InlineSelectTrigger, } from './components/New/InlineSelect/InlineSelect';
|
|
169
172
|
export type { InlineSelectProps, InlineSelectTriggerProps, } from './components/New/InlineSelect/InlineSelect';
|
|
173
|
+
export { Select } from './components/New/Select/Select';
|
|
174
|
+
export type { SelectProps } from './components/New/Select/Select';
|
|
175
|
+
export { MultiSelectTags } from './components/New/Select/MultiSelectTags';
|
|
176
|
+
export type { MultiSelectTagsProps } from './components/New/Select/MultiSelectTags';
|
|
170
177
|
export { InfoButton } from './components/New/InfoButton/InfoButton';
|
|
171
178
|
export type { InfoButtonProps } from './components/New/InfoButton/InfoButton';
|
|
172
179
|
export type { LabelProps } from './components/New/Label/Label';
|
|
@@ -174,6 +181,18 @@ export { Label } from './components/New/Label/Label';
|
|
|
174
181
|
export { Textarea } from './components/New/Textarea/Textarea';
|
|
175
182
|
export { Input } from './components/New/Input/Input';
|
|
176
183
|
export type { InputProps } from './components/New/Input/Input';
|
|
184
|
+
export { PasswordInput } from './components/New/PasswordInput/PasswordInput';
|
|
185
|
+
export type { PasswordInputProps } from './components/New/PasswordInput/PasswordInput';
|
|
186
|
+
export { NumberInput } from './components/New/NumberInput/NumberInput';
|
|
187
|
+
export type { NumberInputProps } from './components/New/NumberInput/NumberInput';
|
|
188
|
+
export { Popup } from './components/New/Popup/Popup';
|
|
189
|
+
export type { PopupProps } from './components/New/Popup/Popup';
|
|
190
|
+
export { CloseButton } from './components/New/CloseButton/CloseButton';
|
|
191
|
+
export type { CloseButtonProps } from './components/New/CloseButton/CloseButton';
|
|
192
|
+
export { ConfirmationPopup } from './components/New/ConfirmationPopup/ConfirmationPopup';
|
|
193
|
+
export type { ConfirmationPopupProps } from './components/New/ConfirmationPopup/ConfirmationPopup';
|
|
194
|
+
export { Dropdown } from './components/New/Dropdown/Dropdown';
|
|
195
|
+
export type { DropdownProps } from './components/New/Dropdown/Dropdown';
|
|
177
196
|
export type { TextareaProps } from './components/New/Textarea/Textarea';
|
|
178
197
|
export type { CaptionTextProps } from './components/New/CaptionText/CaptionText';
|
|
179
198
|
export { CaptionText, ErrorText, } from './components/New/CaptionText/CaptionText';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export declare enum
|
|
1
|
+
export declare enum SkeletonVariant {
|
|
2
2
|
Default = "default",
|
|
3
3
|
Text = "text",
|
|
4
4
|
Circular = "circular",
|
|
5
5
|
Rectangular = "rectangular"
|
|
6
6
|
}
|
|
7
|
-
export declare enum
|
|
7
|
+
export declare enum SkeletonAvatarSize {
|
|
8
8
|
Small = "small",
|
|
9
9
|
Default = "default",
|
|
10
10
|
Large = "large"
|
|
11
11
|
}
|
|
12
|
-
export declare enum
|
|
12
|
+
export declare enum SkeletonAvatarShape {
|
|
13
13
|
Circle = "circle",
|
|
14
14
|
Square = "square"
|
|
15
15
|
}
|