@epam/ai-dial-ui-kit 0.13.0-dev.9 → 0.14.0-dev.1

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.
Files changed (173) hide show
  1. package/README.md +45 -0
  2. package/dist/CHANGELOG.md +48 -1
  3. package/dist/{JsonEditor-CRSkEnWP.cjs → JsonEditor-pyqbLZZf.cjs} +1 -1
  4. package/dist/{JsonEditor-Djt1V27V.js → JsonEditor-v9m_npfK.js} +1 -1
  5. package/dist/MarkdownEditor-5UpxUtXf.js +75 -0
  6. package/dist/{MarkdownEditor-BbGX2uA9.cjs → MarkdownEditor-9aPIyyuu.cjs} +1 -1
  7. package/dist/MarkdownEditor-BjqdSHPU.cjs +1 -0
  8. package/dist/{MarkdownEditor-DtKScLM2.js → MarkdownEditor-CWZVSR--.js} +1 -1
  9. package/dist/components-manifest.json +3420 -391
  10. package/dist/dial-ui-kit.cjs.js +1 -1
  11. package/dist/dial-ui-kit.es.js +201 -148
  12. package/dist/{index-JVDPW40K.js → index-DKDaSZqV.js} +24490 -21241
  13. package/dist/index-xlqMH2Q1.cjs +71 -0
  14. package/dist/index.css +6 -2
  15. package/dist/mcp-server.cjs +29 -9
  16. package/dist/migration-guides/0.13.0/caption-semi-text-lead-rename.md +82 -0
  17. package/dist/migration-guides/0.13.0/field-label-props-unification.md +94 -0
  18. package/dist/migration-guides/0.13.0/focus-border-token-rename.md +106 -0
  19. package/dist/migration-guides/0.13.0/progress-bar-2-0-rewrite.md +103 -0
  20. package/dist/migration-guides/0.13.0/spinner-dial-prefix-removal.md +69 -0
  21. package/dist/migration-guides/0.13.0/typography-heading-scale-shift.md +93 -0
  22. package/dist/migration-guides/README.md +6 -0
  23. package/dist/src/components/Accordion/Accordion.d.ts +1 -0
  24. package/dist/src/components/Analytics/Bar/Bar.d.ts +12 -7
  25. package/dist/src/components/Analytics/BarGroup/BarGroup.d.ts +23 -16
  26. package/dist/src/components/Analytics/Card/Card.d.ts +14 -3
  27. package/dist/src/components/Analytics/ErrorTag/ErrorTag.d.ts +1 -0
  28. package/dist/src/components/Analytics/Histogram/Histogram.d.ts +9 -6
  29. package/dist/src/components/Analytics/Histogram/utils.d.ts +10 -0
  30. package/dist/src/components/AutocompleteInput/AutocompleteInputValue.d.ts +1 -0
  31. package/dist/src/components/Breadcrumb/Breadcrumb.d.ts +1 -0
  32. package/dist/src/components/Breadcrumb/BreadcrumbItem.d.ts +3 -0
  33. package/dist/src/components/Button/Button.d.ts +1 -0
  34. package/dist/src/components/Button/ButtonWrappers.d.ts +1 -15
  35. package/dist/src/components/ButtonDropdown/ButtonDropdown.d.ts +1 -0
  36. package/dist/src/components/CaptionText/CaptionText.d.ts +1 -0
  37. package/dist/src/components/Checkbox/Checkbox.d.ts +1 -0
  38. package/dist/src/components/CloseButton/CloseButton.d.ts +1 -0
  39. package/dist/src/components/CollapsibleSidebar/CollapsibleSidebar.d.ts +1 -0
  40. package/dist/src/components/ConfirmationPopup/ConfirmationPopup.d.ts +1 -0
  41. package/dist/src/components/DraggableItem/DraggableItem.d.ts +1 -0
  42. package/dist/src/components/DropdownIcon/DropdownIcon.d.ts +1 -0
  43. package/dist/src/components/EllipsisTooltip/EllipsisTooltip.d.ts +1 -0
  44. package/dist/src/components/FabButton/FabButton.d.ts +8 -3
  45. package/dist/src/components/FileIcon/FileIcon.d.ts +1 -0
  46. package/dist/src/components/FileManager/FileManager.d.ts +3 -0
  47. package/dist/src/components/FileManager/FileManagerProvider.d.ts +1 -0
  48. package/dist/src/components/FileManager/components/DestinationFolderPopup/DestinationFolderPopup.d.ts +3 -0
  49. package/dist/src/components/FileManager/components/FoldersTree/FoldersTree.d.ts +3 -0
  50. package/dist/src/components/FileManager/hooks/use-file-manager-context.d.ts +2 -0
  51. package/dist/src/components/FileManager/hooks/use-file-manager-tabs.d.ts +3 -0
  52. package/dist/src/components/FileName/FileName.d.ts +1 -0
  53. package/dist/src/components/FolderName/FolderName.d.ts +1 -0
  54. package/dist/src/components/FormItem/FormItem.d.ts +1 -0
  55. package/dist/src/components/FormPopup/FormPopup.d.ts +1 -0
  56. package/dist/src/components/Grid/Grid.d.ts +1 -0
  57. package/dist/src/components/Grid/comparators/base-column-comparator.d.ts +1 -0
  58. package/dist/src/components/Grid/renderers/DateCellRenderer.d.ts +1 -0
  59. package/dist/src/components/Icon/Icon.d.ts +1 -0
  60. package/dist/src/components/IconButton/IconButton.d.ts +5 -0
  61. package/dist/src/components/IconButton/IconButtonWrappers.d.ts +1 -0
  62. package/dist/src/components/Input/Input.d.ts +1 -0
  63. package/dist/src/components/InputPopup/InputPopup.d.ts +1 -0
  64. package/dist/src/components/JsonEditor/JsonEditor.d.ts +1 -0
  65. package/dist/src/components/Label/Label.d.ts +1 -0
  66. package/dist/src/components/LabelledText/LabelledText.d.ts +1 -0
  67. package/dist/src/components/LoadFileArea/LoadFileArea.d.ts +1 -0
  68. package/dist/src/components/LoadFileArea/LoadFileAreaField.d.ts +1 -0
  69. package/dist/src/components/Loader/Loader.d.ts +1 -0
  70. package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +1 -0
  71. package/dist/src/components/New/Accordion/Accordion.d.ts +71 -0
  72. package/dist/src/components/New/Button/Button.d.ts +66 -0
  73. package/dist/src/components/New/Button/ButtonWrappers.d.ts +94 -0
  74. package/dist/src/components/New/Button/__tests__/utils.spec.d.ts +1 -0
  75. package/dist/src/components/New/Button/constants.d.ts +2 -0
  76. package/dist/src/components/New/Button/utils.d.ts +2 -0
  77. package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +24 -0
  78. package/dist/src/components/New/ButtonDropdown/constants.d.ts +1 -0
  79. package/dist/src/components/New/Calendar/Calendar.d.ts +55 -0
  80. package/dist/src/components/New/Calendar/constants.d.ts +17 -0
  81. package/dist/src/components/New/Calendar/utils.d.ts +25 -0
  82. package/dist/src/components/New/Calendar/utils.spec.d.ts +1 -0
  83. package/dist/src/components/New/CaptionText/CaptionText.d.ts +21 -0
  84. package/dist/src/components/New/CardShell/CardShell.d.ts +14 -0
  85. package/dist/src/components/New/CloseButton/CloseButton.d.ts +33 -0
  86. package/dist/src/components/New/ConfirmationPopup/ConfirmationPopup.d.ts +55 -0
  87. package/dist/src/components/New/ConfirmationPopup/constants.d.ts +14 -0
  88. package/dist/src/components/New/Dropdown/Dropdown.d.ts +87 -0
  89. package/dist/src/components/New/Dropdown/DropdownSubMenuItem.d.ts +8 -0
  90. package/dist/src/components/New/Dropdown/constants.d.ts +9 -0
  91. package/dist/src/components/New/FileDropzone/FileDropzone.d.ts +81 -0
  92. package/dist/src/components/New/FolderPath/FolderPath.d.ts +32 -0
  93. package/dist/src/components/New/Highlight/Highlight.d.ts +19 -0
  94. package/dist/src/components/New/IconButton/IconButton.d.ts +48 -0
  95. package/dist/src/components/New/IconButton/IconButtonWrappers.d.ts +71 -0
  96. package/dist/src/components/New/InfoButton/InfoButton.d.ts +26 -0
  97. package/dist/src/components/New/InfoButton/InfoButton.stories.d.ts +6 -0
  98. package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +51 -0
  99. package/dist/src/components/New/Input/Button/InputButton.d.ts +25 -0
  100. package/dist/src/components/New/Input/Button/constants.d.ts +1 -0
  101. package/dist/src/components/New/Input/Input.d.ts +67 -0
  102. package/dist/src/components/New/Input/utils.d.ts +2 -0
  103. package/dist/src/components/New/Label/Label.d.ts +33 -0
  104. package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +33 -0
  105. package/dist/src/components/New/MarkdownEditor/constants.d.ts +20 -0
  106. package/dist/src/components/New/Notification/Notification.d.ts +7 -0
  107. package/dist/src/components/New/Notification/constants.d.ts +12 -1
  108. package/dist/src/components/New/NumberInput/NumberInput.d.ts +36 -0
  109. package/dist/src/components/New/PasswordInput/PasswordInput.d.ts +33 -0
  110. package/dist/src/components/New/Popup/Popup.d.ts +72 -0
  111. package/dist/src/components/New/Popup/constants.d.ts +10 -0
  112. package/dist/src/components/New/Search/Search.d.ts +42 -0
  113. package/dist/src/components/New/Select/MultiSelectTags.d.ts +17 -0
  114. package/dist/src/components/New/Select/Select.d.ts +110 -0
  115. package/dist/src/components/New/Select/SelectSubMenuItem.d.ts +8 -0
  116. package/dist/src/components/New/Select/constants.d.ts +32 -0
  117. package/dist/src/components/New/Switch/Switch.d.ts +38 -0
  118. package/dist/src/components/New/Tabs/Tabs.d.ts +63 -0
  119. package/dist/src/components/New/Tag/Tag.d.ts +45 -0
  120. package/dist/src/components/New/TagInput/TagInput.d.ts +72 -0
  121. package/dist/src/components/New/TagInput/utils.d.ts +21 -0
  122. package/dist/src/components/New/TagInput/utils.spec.d.ts +1 -0
  123. package/dist/src/components/New/Textarea/Textarea.d.ts +39 -0
  124. package/dist/src/components/New/constants/overlay.d.ts +24 -0
  125. package/dist/src/components/NoDataContent/NoDataContent.d.ts +1 -0
  126. package/dist/src/components/Notification/Notification.d.ts +1 -0
  127. package/dist/src/components/NumberInput/NumberInput.d.ts +1 -0
  128. package/dist/src/components/Pagination/Pagination.d.ts +3 -0
  129. package/dist/src/components/PasswordInput/PasswordInput.d.ts +1 -0
  130. package/dist/src/components/Popup/Popup.d.ts +2 -1
  131. package/dist/src/components/ProgressBar/ProgressBar.d.ts +51 -10
  132. package/dist/src/components/RadioButton/RadioButton.d.ts +1 -0
  133. package/dist/src/components/RadioGroup/RadioGroup.d.ts +1 -0
  134. package/dist/src/components/RadioGroupPopupField/RadioGroupPopupField.d.ts +1 -0
  135. package/dist/src/components/RemoveButton/RemoveButton.d.ts +1 -0
  136. package/dist/src/components/ResizableContainer/ConditionalResizableContainer.d.ts +1 -0
  137. package/dist/src/components/ResizableContainer/ResizableContainer.d.ts +1 -0
  138. package/dist/src/components/SchemaRenderer/SchemaRenderer.d.ts +1 -0
  139. package/dist/src/components/SchemaRenderer/components/SchemaKeyValueEditor.d.ts +9 -1
  140. package/dist/src/components/SchemaRenderer/types.d.ts +6 -1
  141. package/dist/src/components/SchemaRenderer/utils.d.ts +1 -0
  142. package/dist/src/components/Search/Search.d.ts +1 -0
  143. package/dist/src/components/SegmentedControl/SegmentedControl.d.ts +1 -0
  144. package/dist/src/components/Select/Select.d.ts +1 -0
  145. package/dist/src/components/SelectField/SelectField.d.ts +1 -0
  146. package/dist/src/components/SharedEntityIndicator/SharedEntityIndicator.d.ts +1 -0
  147. package/dist/src/components/Skeleton/Skeleton.d.ts +19 -18
  148. package/dist/src/components/Skeleton/utils.d.ts +2 -2
  149. package/dist/src/components/Slider/Slider.d.ts +1 -0
  150. package/dist/src/components/Spinner/Spinner.d.ts +5 -2
  151. package/dist/src/components/Steps/Steps.d.ts +1 -0
  152. package/dist/src/components/Switch/Switch.d.ts +1 -0
  153. package/dist/src/components/Tabs/Tabs.d.ts +1 -0
  154. package/dist/src/components/Tag/Tag.d.ts +1 -0
  155. package/dist/src/components/TagInput/TagInput.d.ts +1 -0
  156. package/dist/src/components/Textarea/Textarea.d.ts +1 -0
  157. package/dist/src/components/Tooltip/Tooltip.d.ts +1 -0
  158. package/dist/src/components/Tooltip/TooltipContainer.d.ts +1 -0
  159. package/dist/src/components/Tooltip/TooltipContent.d.ts +1 -0
  160. package/dist/src/components/Tooltip/TooltipTrigger.d.ts +1 -0
  161. package/dist/src/index.d.ts +89 -13
  162. package/dist/src/mcp/types.d.ts +12 -0
  163. package/dist/src/models/dropdown.d.ts +27 -0
  164. package/dist/src/types/button.d.ts +1 -0
  165. package/dist/src/types/calendar.d.ts +6 -0
  166. package/dist/src/types/skeleton.d.ts +3 -3
  167. package/dist/src/utils/__tests__/accessible-name.spec.d.ts +1 -0
  168. package/dist/src/utils/__tests__/file-accept.spec.d.ts +1 -0
  169. package/dist/src/utils/accessible-name.d.ts +19 -0
  170. package/dist/src/utils/file-accept.d.ts +16 -0
  171. package/dist/src/utils/sub-menu-floating.d.ts +15 -2
  172. package/package.json +4 -2
  173. package/dist/index-CmA_N28F.cjs +0 -71
@@ -0,0 +1,94 @@
1
+ import { FC } from 'react';
2
+ import { ButtonProps } from './Button';
3
+ type ButtonVariantProps = Omit<ButtonProps, 'variant'>;
4
+ type ButtonAppearanceProps = Omit<ButtonProps, 'appearance'>;
5
+ /**
6
+ * A Primary Button component with predefined primary variant
7
+ * Design system 2.0
8
+ * @example
9
+ * ```tsx
10
+ * <PrimaryButton
11
+ * label="Click me"
12
+ * onClick={handleClick}
13
+ * className="custom-button"
14
+ * />
15
+ * ```
16
+ *
17
+ * Inherits all properties from the `ButtonProps`
18
+ */
19
+ export declare const PrimaryButton: FC<ButtonVariantProps>;
20
+ /** A Neutral Button component with predefined neutral variant
21
+ * @example
22
+ * ```tsx
23
+ * <NeutralButton
24
+ * label="Click me"
25
+ * onClick={handleClick}
26
+ * className="custom-button"
27
+ * />
28
+ * ```
29
+ *
30
+ * Inherits all properties from the `ButtonProps`
31
+ */
32
+ export declare const NeutralButton: FC<ButtonVariantProps>;
33
+ /** A Danger Button component with predefined danger variant
34
+ * @example
35
+ * ```tsx
36
+ * <DangerButton
37
+ * label="Click me"
38
+ * onClick={handleClick}
39
+ * className="custom-button"
40
+ * />
41
+ * ```
42
+ *
43
+ * Inherits all properties from the `ButtonProps`
44
+ */
45
+ export declare const DangerButton: FC<ButtonVariantProps>;
46
+ /** A Link Button component with predefined link appearance
47
+ * @example
48
+ * ```tsx
49
+ * <LinkButton
50
+ * label="Click me"
51
+ * onClick={handleClick}
52
+ * className="custom-button"
53
+ * />
54
+ * ```
55
+ *
56
+ * Pass `href` to navigate: the control then renders a real `<a>`, so it keeps
57
+ * the link role, middle-click, and "open in new tab". Without `href` it stays a
58
+ * `<button>` and needs an `onClick`.
59
+ *
60
+ * @example
61
+ * ```tsx
62
+ * <LinkButton label="Read the docs" href="/docs" />
63
+ * <LinkButton label="Open dashboard" href="https://example.com" target="_blank" />
64
+ * ```
65
+ *
66
+ * Inherits all properties from the `ButtonProps`
67
+ */
68
+ export declare const LinkButton: FC<ButtonAppearanceProps>;
69
+ /** A Ghost Button component with predefined ghost appearance
70
+ * @example
71
+ * ```tsx
72
+ * <GhostButton
73
+ * label="Click me"
74
+ * onClick={handleClick}
75
+ * className="custom-button"
76
+ * />
77
+ * ```
78
+ *
79
+ * Inherits all properties from the `ButtonProps`
80
+ */
81
+ export declare const GhostButton: FC<ButtonAppearanceProps>;
82
+ /** An Outlined Button component with predefined outlined appearance
83
+ * @example
84
+ * ```tsx
85
+ * <OutlinedButton
86
+ * label="Click me"
87
+ * onClick={handleClick}
88
+ * className="custom-button"
89
+ * />
90
+ * ```
91
+ * Inherits all properties from the `ButtonProps`
92
+ */
93
+ export declare const OutlinedButton: FC<ButtonAppearanceProps>;
94
+ export {};
@@ -0,0 +1,2 @@
1
+ import { ButtonVariant } from '../../../types/button';
2
+ export declare const variantClassMap: Record<ButtonVariant, Record<string, string>>;
@@ -0,0 +1,2 @@
1
+ import { ButtonAppearance, ButtonVariant } from '../../../types/button';
2
+ export declare const getButtonClassNames: (variant?: ButtonVariant, appearance?: ButtonAppearance) => string;
@@ -0,0 +1,24 @@
1
+ import { FC } from 'react';
2
+ import { DropdownItem } from '../../../models/dropdown';
3
+ import { ButtonProps } from '../Button/Button';
4
+ export interface ButtonDropdownProps extends Omit<ButtonProps, 'iconAfter'> {
5
+ items: DropdownItem[];
6
+ }
7
+ /**
8
+ * A Button dropdown component based on the Dropdown component
9
+ * aliases: SplitButton|MenuButton
10
+ * Design system 2.0
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <ButtonDropdown
15
+ * title="Click me"
16
+ * variant={ButtonVariant.Neutral}
17
+ * items={[{ key: 'profile', label: 'Profile' }, { key: 'logout', label: 'Logout' }]}
18
+ * />
19
+ * ```
20
+ *
21
+ * Inherits all props from Button.
22
+ * @param [items] - DropdownItems with actions
23
+ */
24
+ export declare const ButtonDropdown: FC<ButtonDropdownProps>;
@@ -0,0 +1 @@
1
+ export declare const getButtonChevron: (isOpen: boolean) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,55 @@
1
+ import { FC } from 'react';
2
+ import { LabelProps } from '../Label/Label';
3
+ import { CalendarMode } from '../../../types/calendar';
4
+ export type CalendarValue = Date | string | null;
5
+ export interface CalendarProps {
6
+ mode?: CalendarMode;
7
+ value?: CalendarValue;
8
+ onChange?: (value: CalendarValue) => void;
9
+ labelProps?: LabelProps;
10
+ placeholder?: string;
11
+ disabled?: boolean;
12
+ invalid?: boolean;
13
+ id?: string;
14
+ className?: string;
15
+ minDate?: Date;
16
+ maxDate?: Date;
17
+ /** BCP 47 locale tag used to localize month/weekday names and date formatting. */
18
+ locale?: string;
19
+ fieldClassName?: string;
20
+ }
21
+ /**
22
+ * A date/time picker supporting four selection modes.
23
+ * aliases: DatePicker|DateTimePicker
24
+ * Design system 2.0
25
+ *
26
+ * Renders a text-field trigger that opens a rounded month-grid popover for
27
+ * the `date`/`datetime` modes, a masked `"HH:mm"` text field for `time`, and
28
+ * a popover list of weekday names for `weekday`. Month/weekday names and
29
+ * date formatting are localized via the `locale` prop.
30
+ *
31
+ * @example
32
+ * ```tsx
33
+ * <Calendar mode={CalendarMode.Date} value={date} onChange={setDate} />
34
+ * <Calendar mode={CalendarMode.DateTime} value={date} onChange={setDate} />
35
+ * <Calendar mode={CalendarMode.Time} value={time} onChange={setTime} />
36
+ * <Calendar mode={CalendarMode.Weekday} value={weekday} onChange={setWeekday} />
37
+ * <Calendar mode={CalendarMode.Date} value={date} onChange={setDate} locale="de-DE" />
38
+ * <Calendar labelProps={{ label: 'Start date', required: true }} value={date} onChange={setDate} />
39
+ * ```
40
+ *
41
+ * @param [mode=CalendarMode.Date] - Selection mode: date, datetime, time or weekday
42
+ * @param [value] - Controlled value: a `Date` for date/datetime, an `"HH:mm"` string for time, an ISO weekday number (`"1"`=Monday…`"7"`=Sunday) for weekday
43
+ * @param [onChange] - Callback fired with the next value when the selection changes
44
+ * @param [labelProps] - Props of the {@link Label} rendered above the control, including `label`, `required` and `caption`
45
+ * @param [placeholder] - Placeholder shown when there is no value; defaults to a mode-appropriate string ("Select date", "Select date and time", "--:--" or "Select day")
46
+ * @param [disabled=false] - Disables the control
47
+ * @param [invalid=false] - Applies error styling
48
+ * @param [id] - id applied to the control, linked to the label
49
+ * @param [className] - Additional CSS classes applied to the outer container
50
+ * @param [minDate] - Earliest selectable date (date/datetime modes)
51
+ * @param [maxDate] - Latest selectable date (date/datetime modes)
52
+ * @param [locale="en-GB"] - BCP 47 locale tag used to localize month/weekday names and date formatting
53
+ * @param [fieldClassName] - Additional classes merged onto the trigger field, overriding conflicting defaults
54
+ */
55
+ export declare const Calendar: FC<CalendarProps>;
@@ -0,0 +1,17 @@
1
+ import { CalendarMode } from '../../../types/calendar';
2
+ export declare const DEFAULT_CALENDAR_LOCALE = "en-GB";
3
+ export declare const calendarModeDefaultPlaceholder: Record<CalendarMode, string>;
4
+ export declare const calendarFieldBaseClassName = "flex w-full items-center justify-between gap-2 rounded-xl border border-secondary bg-layer-raised px-4 py-3 dial-small-text text-primary outline-none transition-colors hover:border-hover-alpha focus-within:border-focus-blue";
5
+ export declare const calendarFieldDisabledClassName = "!cursor-not-allowed !border-transparent bg-layer-sunken text-control-disable-alpha hover:!border-transparent";
6
+ export declare const calendarFieldInvalidClassName = "!border-error";
7
+ export declare const calendarPopoverClassName = "z-[53] flex w-[248px] flex-col gap-4 rounded-lg bg-layer-raised px-3 py-4 shadow-md";
8
+ export declare const calendarDayButtonBaseClassName = "flex size-8 items-center justify-center rounded-full dial-small-text text-primary hover:bg-control-accent-alpha-hover hover:text-primary focus:outline-none focus-visible:outline focus-visible:outline-focus-black";
9
+ export declare const calendarDaySelectedClassName = "bg-control-accent text-control-permanent";
10
+ export declare const calendarDayTodayClassName = "text-accent dial-small-semi-text";
11
+ export declare const calendarDayOutsideClassName = "text-control-disable-alpha";
12
+ export declare const calendarFieldIconClassName = "text-secondary";
13
+ export declare const calendarIcon: import("react/jsx-runtime").JSX.Element;
14
+ export declare const calendarNavIcons: {
15
+ prev: import("react/jsx-runtime").JSX.Element;
16
+ next: import("react/jsx-runtime").JSX.Element;
17
+ };
@@ -0,0 +1,25 @@
1
+ export declare const getMonthGrid: (year: number, month: number) => Date[];
2
+ export declare const isSameDay: (a?: Date | null, b?: Date | null) => boolean;
3
+ export declare const isDateOutOfRange: (date: Date, minDate?: Date, maxDate?: Date) => boolean;
4
+ export declare const formatMonthLabel: (date: Date, locale: string) => string;
5
+ export declare const formatDateLabel: (date: Date, locale: string) => string;
6
+ /**
7
+ * Full label for a day cell in the month grid, e.g. `"Wednesday 11 March 2026"`.
8
+ *
9
+ * A day button renders only its number, so on its own it announces as "15" with
10
+ * no month, year, or weekday context — and a cell spilling over from an
11
+ * adjacent month is indistinguishable from one in the visible month. The
12
+ * weekday and long month also keep this distinct from `formatDateLabel`, which
13
+ * names the trigger.
14
+ */
15
+ export declare const formatDayAriaLabel: (date: Date, locale: string) => string;
16
+ export declare const formatTimeLabel: (date: Date) => string;
17
+ export declare const setTimeOnDate: (date: Date, time: string) => Date;
18
+ export declare const isCompleteTimeString: (value: string) => boolean;
19
+ /** Formats free-typed digits into an `"HH:mm"` mask, clamping each completed segment. */
20
+ export declare const sanitizeTimeInput: (raw: string) => string;
21
+ export declare const getWeekdayShortLabels: (locale: string) => string[];
22
+ export declare const getWeekdayOptions: (locale: string) => {
23
+ value: string;
24
+ label: string;
25
+ }[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ import { FC, HTMLAttributes } from 'react';
2
+ import { CaptionType } from '../../../types/caption';
3
+ export interface CaptionTextProps extends HTMLAttributes<HTMLSpanElement> {
4
+ text?: string;
5
+ variant?: CaptionType;
6
+ }
7
+ /**
8
+ * A component for displaying caption text with consistent styling
9
+ * aliases: HelperText|ValidationText
10
+ * Design system 2.0
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <CaptionText text="This field is required" variant={CaptionType.Error} />
15
+ * ```
16
+ *
17
+ * @param [text] - The text to display. If undefined or empty, nothing is rendered
18
+ * @param [variant] - The variant of the caption text, e.g., error or description.
19
+ */
20
+ export declare const CaptionText: FC<CaptionTextProps>;
21
+ export declare const ErrorText: FC<Omit<CaptionTextProps, 'variant'>>;
@@ -0,0 +1,14 @@
1
+ import { FC, HTMLAttributes } from 'react';
2
+ export type CardShellProps = HTMLAttributes<HTMLElement>;
3
+ /**
4
+ * A shared elevated card shell used as the base wrapper for browse-grid cards.
5
+ * Design system 2.0
6
+ *
7
+ * Renders an `<article>` with rounded corners, padding, a resting shadow, and
8
+ * a hover lift with a stronger shadow. Respects `prefers-reduced-motion` by
9
+ * disabling the transform/shadow transition and hover lift.
10
+ *
11
+ * @param [className] - Additional CSS classes applied to the card container
12
+ * @param [children] - Content rendered inside the card
13
+ */
14
+ export declare const CardShell: FC<CardShellProps>;
@@ -0,0 +1,33 @@
1
+ import { FC, MouseEvent } from 'react';
2
+ import { ElementSize } from '../../../types/size';
3
+ export interface CloseButtonProps {
4
+ ariaLabel?: string;
5
+ className?: string;
6
+ size?: ElementSize;
7
+ onClose: (e: MouseEvent<HTMLButtonElement>) => void;
8
+ disabled?: boolean;
9
+ }
10
+ /**
11
+ * A close button: a ghost {@link IconButton} carrying an X icon.
12
+ * aliases: DismissButton|ExitButton
13
+ * Design system 2.0
14
+ *
15
+ * Sized through {@link ElementSize} like every other 2.0 control. It defaults to
16
+ * the small 24px box that headers and toasts want; pass `ElementSize.Standard`
17
+ * where the control stands alone, since only that variant carries the 44×44
18
+ * pointer target. Name it after the thing it closes ("Close dialog", "Close
19
+ * notification") — the default `"Close"` only keeps the control from being unnamed.
20
+ *
21
+ * @example
22
+ * ```tsx
23
+ * <CloseButton ariaLabel="Close notification" onClose={handleClose} />
24
+ * <CloseButton ariaLabel="Close dialog" size={ElementSize.Standard} onClose={handleClose} />
25
+ * ```
26
+ *
27
+ * @param [ariaLabel="Close"] - Accessible name of the button
28
+ * @param [className] - Additional CSS classes to apply to the button
29
+ * @param [size=ElementSize.Small] - Button size: small is 24px, standard is 40px
30
+ * @param onClose - Click event handler for the close button
31
+ * @param [disabled] - Whether the button is disabled
32
+ */
33
+ export declare const CloseButton: FC<CloseButtonProps>;
@@ -0,0 +1,55 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { PopupProps } from '../Popup/Popup';
3
+ import { ConfirmationPopupVariant } from '../../../types/confirmation-popup';
4
+ export interface ConfirmationPopupProps extends PopupProps {
5
+ description?: ReactNode;
6
+ descriptionClassName?: string;
7
+ confirmLabel?: string;
8
+ cancelLabel?: string;
9
+ isLoading?: boolean;
10
+ disableConfirmButton?: boolean;
11
+ confirmClassName?: string;
12
+ onConfirm: () => void;
13
+ onCancel?: () => void;
14
+ children?: ReactNode;
15
+ variant?: ConfirmationPopupVariant;
16
+ }
17
+ /**
18
+ * A confirmation dialog built from {@link Popup} and the 2.0 {@link Button}.
19
+ * aliases: ConfirmDialog|WarningDialog
20
+ * Design system 2.0
21
+ *
22
+ * Provides an accessible modal with a title, optional description or custom content,
23
+ * and a footer with Cancel / Confirm actions.
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * <ConfirmationPopup
28
+ * open
29
+ * header="Delete item?"
30
+ * description="This action cannot be undone."
31
+ * confirmLabel="Delete"
32
+ * variant={ConfirmationPopupVariant.Danger}
33
+ * onClose={() => setOpen(false)}
34
+ * onConfirm={handleDelete}
35
+ * />
36
+ * ```
37
+ *
38
+ * @param header - Title content for the header
39
+ * @param [description] - Secondary text (ignored when `children` set)
40
+ * @param [descriptionClassName] - Custom CSS class for the description
41
+ * @param [open=false] - Controls visibility of the popup
42
+ * @param [confirmLabel="Ok"] - Label for the confirm button
43
+ * @param [cancelLabel="Cancel"] - Label for the cancel button
44
+ * @param [isLoading=false] - Shows loader placeholder and hides actions
45
+ * @param [disableConfirmButton=false] - Disables the confirm button
46
+ * @param [className] - Extra classes for the popup container
47
+ * @param [confirmClassName] - Extra classes merged into the confirm button
48
+ * @param onClose - Fired on close
49
+ * @param onConfirm - Fired on confirm
50
+ * @param [onCancel] - Fired on cancel (falls back to `onClose`)
51
+ * @param [children] - Custom body content
52
+ * @param [variant=ConfirmationPopupVariant.Info] - Visual variant for the popup
53
+ * @param [size=PopupSize.Sm] - Size of the popup
54
+ */
55
+ export declare const ConfirmationPopup: FC<ConfirmationPopupProps>;
@@ -0,0 +1,14 @@
1
+ import { ButtonAppearance, ButtonVariant } from '../../../types/button';
2
+ import { ConfirmationPopupVariant } from '../../../types/confirmation-popup';
3
+ export declare const actionsBaseClassName = "flex justify-end gap-2 px-6 py-4 border-t border-tertiary";
4
+ export declare const descriptionBaseClassName = "text-secondary dial-small-paragraph-text px-6 pb-4";
5
+ export declare const loaderContainerClassName = "px-6 py-4 h-[120px]";
6
+ export declare const defaultCancelLabel = "Cancel";
7
+ export declare const defaultConfirmLabel = "Ok";
8
+ export declare const variantConfig: Record<ConfirmationPopupVariant, {
9
+ container?: string;
10
+ confirm: {
11
+ variant: ButtonVariant;
12
+ appearance: ButtonAppearance;
13
+ };
14
+ }>;
@@ -0,0 +1,87 @@
1
+ import { Placement } from '@floating-ui/react';
2
+ import { FC, MouseEvent, ReactNode, RefObject } from 'react';
3
+ import { DropdownTrigger } from '../../../types/dropdown';
4
+ import { DropdownItem } from '../../../models/dropdown';
5
+ export interface DropdownProps {
6
+ children: ReactNode;
7
+ items?: DropdownItem[];
8
+ onItemClick?: (info: {
9
+ key: string;
10
+ domEvent: MouseEvent;
11
+ }) => void;
12
+ menuHeader?: ReactNode | (() => ReactNode);
13
+ menuFooter?: ReactNode | (() => ReactNode);
14
+ renderOverlay?: () => ReactNode;
15
+ trigger?: DropdownTrigger[];
16
+ placement?: Placement;
17
+ allowedPlacements?: Placement[];
18
+ disabled?: boolean;
19
+ open?: boolean;
20
+ defaultOpen?: boolean;
21
+ onOpenChange?: (open: boolean) => void;
22
+ closable?: boolean;
23
+ onClose?: (e: MouseEvent<HTMLButtonElement>) => void;
24
+ className?: string;
25
+ overlayContentClassName?: string;
26
+ separatorClassName?: string;
27
+ listClassName?: string;
28
+ outsidePressIgnoreRef?: RefObject<HTMLElement | null>;
29
+ outsideClosable?: boolean;
30
+ anchorToMouse?: boolean;
31
+ matchReferenceWidth?: boolean;
32
+ maxDropdownHeight?: number | null;
33
+ }
34
+ /**
35
+ *
36
+ * Renders the given trigger (`children`) and a floating contextual menu overlay.
37
+ * aliases: ContextMenu|PopupMenu
38
+ * Design system 2.0
39
+ *
40
+ * Supports click/hover/contextMenu triggers, controlled/uncontrolled open, and an optional
41
+ * close button inside the overlay. Placement is taken directly from Floating UI; when
42
+ * `placement` is **undefined** (default), automatic placement is handled by `autoPlacement`.
43
+ *
44
+ * @example
45
+ * ```tsx
46
+ * // Simple items menu
47
+ * <Dropdown items={[{ key: 'profile', label: 'Profile' }, { key: 'logout', label: 'Logout' }]}>
48
+ * <button type="button" className="px-3 py-2 rounded border">Open</button>
49
+ * </Dropdown>
50
+ *
51
+ * // Hover trigger
52
+ * <Dropdown trigger={[DropdownTrigger.Hover]} placement="bottom-end" items={items}>
53
+ * <button type="button" className="px-3 py-2 rounded border">Hover me</button>
54
+ * </Dropdown>
55
+ *
56
+ * // Custom overlay content
57
+ * <Dropdown closable renderOverlay={() => <div className="p-3">Custom content</div>}>
58
+ * <button type="button" className="px-3 py-2 rounded border">Custom</button>
59
+ * </Dropdown>
60
+ * ```
61
+ *
62
+ * @param children - Trigger element(s) to anchor and open the menu
63
+ * @param [items] - Menu items to render
64
+ * @param [onItemClick] - Global handler fired when any item is clicked
65
+ * @param [menuHeader] - Content rendered above the items list
66
+ * @param [menuFooter] - Content rendered below the items list
67
+ * @param [renderOverlay] - Render function for fully custom overlay content (ignored when `items` is provided)
68
+ * @param [trigger=[DropdownTrigger.Click]] - Interactions that open the menu
69
+ * @param [placement] - Floating UI placement string; when omitted, auto placement is used
70
+ * @param [allowedPlacements] - Restricts the allowed placements
71
+ * @param [disabled=false] - Disables interaction and prevents opening
72
+ * @param [open] - Controlled open state (when provided, `defaultOpen` is ignored)
73
+ * @param [defaultOpen=false] - Initial open state in uncontrolled mode
74
+ * @param [onOpenChange] - Fired whenever the open state changes
75
+ * @param [closable=false] - Whether the overlay shows an internal close button
76
+ * @param [onClose] - Fired when the close button inside the overlay is clicked
77
+ * @param [className] - Additional CSS classes applied to the trigger wrapper
78
+ * @param [overlayContentClassName] - Additional CSS classes applied to the overlay content
79
+ * @param [separatorClassName] - Additional CSS classes applied to the separators between items
80
+ * @param [listClassName] - Additional CSS classes applied to the floating overlay
81
+ * @param [outsidePressIgnoreRef] - Ref to an element that should not trigger outside press behavior
82
+ * @param [outsideClosable=true] - Whether clicks outside the overlay should close it
83
+ * @param [anchorToMouse=false] - Whether to anchor the dropdown to the mouse position
84
+ * @param [matchReferenceWidth=true] - Whether to match the reference element's width
85
+ * @param [maxDropdownHeight] - Maximum height of the dropdown menu; when omitted, no limit is applied
86
+ */
87
+ export declare const Dropdown: FC<DropdownProps>;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { DropdownItem } from '../../../models/dropdown';
3
+ export interface DropdownSubMenuItemProps {
4
+ item: DropdownItem;
5
+ /** Close the root dropdown when a leaf child is selected. */
6
+ onRootClose: () => void;
7
+ }
8
+ export declare const DropdownSubMenuItem: FC<DropdownSubMenuItemProps>;
@@ -0,0 +1,9 @@
1
+ export declare const dropdownBaseClassName: string;
2
+ export declare const dropdownListBaseClassName: string;
3
+ export declare const dropdownSubMenuClassName: string;
4
+ export declare const dropdownItemBaseClassName: string;
5
+ export declare const dropdownItemDisabledClassName: string;
6
+ export declare const dropdownItemDangerClassName = "text-error";
7
+ export declare const dropdownDividerClassName = "my-1 border-t border-secondary";
8
+ export declare const dropdownGap = 4;
9
+ export declare const submenuCaretIcon: import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,81 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { LabelProps } from '../Label/Label';
3
+ export interface FileDropzoneProps {
4
+ /**
5
+ * Props of the {@link Label} rendered above the area — the name of the field
6
+ * this dropzone fills, e.g. `{ label: 'Attachments', required: true }`. The
7
+ * copy inside the area is `label`, which says how to use the control rather
8
+ * than what it is for.
9
+ */
10
+ labelProps?: LabelProps;
11
+ /** Primary line of copy, e.g. `'Drag and drop it or click here to upload'`. */
12
+ label: ReactNode;
13
+ /** Secondary line of copy, e.g. `'File formats .md, .zip and .skill'`. */
14
+ description?: ReactNode;
15
+ /** Fired with the accepted files when files are picked or dropped. */
16
+ onChange: (files: File[]) => void;
17
+ /**
18
+ * Fired with files that a drop offered but `accept` excluded. The file picker
19
+ * filters by `accept` itself, so this only ever comes from a drop.
20
+ */
21
+ onReject?: (files: File[]) => void;
22
+ /** Comma-separated `accept` tokens, e.g. `'.md,.zip,.skill'` or `'image/*'`. */
23
+ accept?: string;
24
+ /** Whether more than one file can be selected at a time. */
25
+ multiple?: boolean;
26
+ /** Disables picking and dropping. */
27
+ disabled?: boolean;
28
+ /** Error message rendered below the area, which also turns its border red. */
29
+ errorText?: string;
30
+ /** Icon rendered above the copy. Defaults to an upload arrow. */
31
+ icon?: ReactNode;
32
+ /** `id` of the underlying file input. Generated when omitted. */
33
+ id?: string;
34
+ /**
35
+ * Accessible name for the control. Only needed when `label` is a node that
36
+ * carries no text of its own — a string label already names the input.
37
+ */
38
+ ariaLabel?: string;
39
+ /** Additional CSS classes for the drop area. */
40
+ className?: string;
41
+ }
42
+ /**
43
+ * A dashed drop area that takes files by drag-and-drop or through the file picker.
44
+ * aliases: LoadFileArea|FileUpload|DragDropUpload|UploadArea
45
+ * Design system 2.0
46
+ *
47
+ * The area is a label over a visually hidden file input, so the picker opens on
48
+ * click and the control stays operable by keyboard and announced as a file input
49
+ * without any extra wiring. The border highlights while a drag hovers it.
50
+ *
51
+ * `accept` is enforced on drops as well as in the picker — the browser only
52
+ * filters the latter — so `onChange` never receives a file the caller excluded.
53
+ * Rejected files go to `onReject`; all copy stays with the caller, which keeps
54
+ * validation messages in the consumer's own wording and language.
55
+ *
56
+ * @example
57
+ * ```tsx
58
+ * <FileDropzone
59
+ * label="Drag and drop it or click here to upload"
60
+ * description="File formats .md, .zip and .skill"
61
+ * accept=".md,.zip,.skill"
62
+ * onChange={(files) => upload(files)}
63
+ * onReject={() => setError('Unsupported file format')}
64
+ * />
65
+ * ```
66
+ *
67
+ * @param [labelProps] - Props of the {@link Label} naming the field, rendered above the area.
68
+ * @param label - Primary line of copy.
69
+ * @param [description] - Secondary line of copy.
70
+ * @param onChange - Fired with the accepted files.
71
+ * @param [onReject] - Fired with dropped files that `accept` excluded.
72
+ * @param [accept] - Comma-separated `accept` tokens.
73
+ * @param [multiple=false] - Whether more than one file can be selected.
74
+ * @param [disabled=false] - Disables picking and dropping.
75
+ * @param [errorText] - Error message rendered below the area.
76
+ * @param [icon] - Icon rendered above the copy.
77
+ * @param [id] - `id` of the underlying file input.
78
+ * @param [ariaLabel] - Accessible name; needed when `label` carries no text.
79
+ * @param [className] - Additional CSS classes for the drop area.
80
+ */
81
+ export declare const FileDropzone: FC<FileDropzoneProps>;
@@ -0,0 +1,32 @@
1
+ import { FC } from 'react';
2
+ export interface FolderPathProps {
3
+ segments: string[];
4
+ labelClassName?: string;
5
+ leafClassName?: string;
6
+ className?: string;
7
+ ariaLabel?: string;
8
+ }
9
+ /**
10
+ * A read-only, non-clickable folder/location path built on top of `DialBreadcrumb`.
11
+ * aliases: FolderBreadcrumb|LocationPath
12
+ * Design system 2.0
13
+ *
14
+ * Every segment is disabled (no navigation); the first segment gets a leading
15
+ * folder icon and the last segment is styled as the current/leaf item.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * <FolderPath segments={['Shared', 'Team Space', 'Reports']} />
20
+ * ```
21
+ *
22
+ * @param segments - Path segments to display, outermost first
23
+ * @param [labelClassName='dial-small-text'] - Additional CSS classes applied to non-leaf segments
24
+ * @param [leafClassName='dial-small-semi-text'] - Additional CSS classes applied to the last (leaf) segment
25
+ * @param [className] - Additional CSS classes applied to the breadcrumb's `<nav>` element.
26
+ * `DialBreadcrumb` scrolls horizontally on overflow, so this must not shrink
27
+ * the nav to content width (e.g. never `w-auto`).
28
+ * @param [ariaLabel='Folder path'] - Accessible name for the underlying `<nav>`.
29
+ * `DialBreadcrumb` would otherwise name it "Breadcrumb", which misdescribes a
30
+ * path with no navigable items; override it when a page shows more than one.
31
+ */
32
+ export declare const FolderPath: FC<FolderPathProps>;
@@ -0,0 +1,19 @@
1
+ import { FC } from 'react';
2
+ /** Props for `Highlight`. */
3
+ export interface HighlightProps {
4
+ /** Full text to display. */
5
+ text: string;
6
+ /** Search query; the first case-insensitive match is highlighted. */
7
+ query: string;
8
+ /** Optional class name for the highlighted segment. */
9
+ markClassName?: string;
10
+ /** Optional class name forwarded to the `DialEllipsisTooltip` container. */
11
+ className?: string;
12
+ /** Maximum number of lines to display before truncating. Use `1` for single-line ellipsis truncation (e.g. list rows). Defaults to `2`. */
13
+ maxLines?: number;
14
+ }
15
+ /**
16
+ * Renders text with the first occurrence of `query` wrapped in a highlight mark, with ellipsis truncation and a tooltip when overflowing.
17
+ * Design system 2.0
18
+ */
19
+ export declare const Highlight: FC<HighlightProps>;