@dinofront/design_system 0.1.4 → 1.1.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.
Files changed (114) hide show
  1. package/dist/FormField-CwRAOtTN.js +170 -0
  2. package/dist/FormField-CwRAOtTN.js.map +1 -0
  3. package/dist/components/Accordion/Accordion.types.d.ts +4 -0
  4. package/dist/components/Badge/Badge.types.d.ts +11 -0
  5. package/dist/components/Breadcrumb/Breadcrumb.d.ts +2 -0
  6. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +19 -0
  7. package/dist/components/Breadcrumb/index.d.ts +2 -0
  8. package/dist/components/CardGroup/CardGroup.d.ts +2 -0
  9. package/dist/components/CardGroup/CardGroup.types.d.ts +19 -0
  10. package/dist/components/CardGroup/index.d.ts +2 -0
  11. package/dist/components/Copy/Copy.d.ts +2 -0
  12. package/dist/components/Copy/Copy.types.d.ts +17 -0
  13. package/dist/components/Copy/index.d.ts +2 -0
  14. package/dist/components/Counter/Counter.d.ts +2 -0
  15. package/dist/components/Counter/Counter.types.d.ts +20 -0
  16. package/dist/components/Counter/index.d.ts +2 -0
  17. package/dist/components/DistributionBar/DistributionBar.d.ts +2 -0
  18. package/dist/components/DistributionBar/DistributionBar.types.d.ts +20 -0
  19. package/dist/components/DistributionBar/index.d.ts +2 -0
  20. package/dist/components/Divider/Divider.d.ts +2 -0
  21. package/dist/components/Divider/Divider.types.d.ts +10 -0
  22. package/dist/components/Divider/index.d.ts +2 -0
  23. package/dist/components/Drawer/Drawer.types.d.ts +4 -0
  24. package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +22 -2
  25. package/dist/components/Empty/Empty.d.ts +2 -0
  26. package/dist/components/Empty/Empty.types.d.ts +12 -0
  27. package/dist/components/Empty/index.d.ts +2 -0
  28. package/dist/components/FormContainer/FormContainer.d.ts +2 -0
  29. package/dist/components/FormContainer/FormContainer.types.d.ts +18 -0
  30. package/dist/components/FormContainer/index.d.ts +2 -0
  31. package/dist/components/FormField/FormField.d.ts +2 -0
  32. package/dist/components/FormField/FormField.types.d.ts +22 -0
  33. package/dist/components/FormField/index.d.ts +2 -0
  34. package/dist/components/Input/Input.types.d.ts +2 -0
  35. package/dist/components/Link/Link.d.ts +2 -0
  36. package/dist/components/Link/Link.types.d.ts +15 -0
  37. package/dist/components/Link/index.d.ts +2 -0
  38. package/dist/components/MultiSelect/MultiSelect.types.d.ts +8 -0
  39. package/dist/components/Popover/Popover.d.ts +2 -0
  40. package/dist/components/Popover/Popover.types.d.ts +29 -0
  41. package/dist/components/Popover/index.d.ts +2 -0
  42. package/dist/components/Progress/Progress.d.ts +2 -0
  43. package/dist/components/Progress/Progress.types.d.ts +18 -0
  44. package/dist/components/Progress/index.d.ts +2 -0
  45. package/dist/components/ReadMore/ReadMore.d.ts +2 -0
  46. package/dist/components/ReadMore/ReadMore.types.d.ts +17 -0
  47. package/dist/components/ReadMore/index.d.ts +2 -0
  48. package/dist/components/Select/Select.types.d.ts +2 -0
  49. package/dist/components/Skeleton/Skeleton.d.ts +2 -0
  50. package/dist/components/Skeleton/Skeleton.types.d.ts +22 -0
  51. package/dist/components/Skeleton/index.d.ts +2 -0
  52. package/dist/components/StepIndicator/StepIndicator.d.ts +2 -0
  53. package/dist/components/StepIndicator/StepIndicator.types.d.ts +24 -0
  54. package/dist/components/StepIndicator/index.d.ts +2 -0
  55. package/dist/components/Tabs/Tabs.types.d.ts +16 -1
  56. package/dist/components/Text/Text.types.d.ts +2 -0
  57. package/dist/components/TextArea/TextArea.types.d.ts +2 -0
  58. package/dist/components/ThemeSwitch/ThemeSwitch.d.ts +2 -0
  59. package/dist/components/ThemeSwitch/ThemeSwitch.types.d.ts +7 -0
  60. package/dist/components/ThemeSwitch/index.d.ts +2 -0
  61. package/dist/components/UnderConstruction/UnderConstruction.d.ts +2 -0
  62. package/dist/components/UnderConstruction/UnderConstruction.types.d.ts +12 -0
  63. package/dist/components/UnderConstruction/index.d.ts +2 -0
  64. package/dist/components/Upload/Upload.types.d.ts +31 -2
  65. package/dist/components/Upload/index.d.ts +1 -1
  66. package/dist/form/index.d.ts +2 -0
  67. package/dist/form.d.ts +2 -0
  68. package/dist/form.js +2 -0
  69. package/dist/hooks/index.d.ts +2 -0
  70. package/dist/hooks/useStepper.d.ts +27 -0
  71. package/dist/icons/brands/AppleIcon.d.ts +1 -0
  72. package/dist/icons/brands/FacebookIcon.d.ts +1 -0
  73. package/dist/icons/brands/GoogleIcon.d.ts +1 -0
  74. package/dist/icons/brands/InstagramIcon.d.ts +1 -0
  75. package/dist/icons/brands/LinkedinIcon.d.ts +1 -0
  76. package/dist/icons/brands/MediumIcon.d.ts +1 -0
  77. package/dist/icons/brands/TelegramIcon.d.ts +1 -0
  78. package/dist/icons/brands/TwitterIcon.d.ts +1 -0
  79. package/dist/icons/brands/YoutubeIcon.d.ts +1 -0
  80. package/dist/icons/brands/index.d.ts +9 -0
  81. package/dist/icons/createIcon.d.ts +28 -0
  82. package/dist/icons/currency/AmdIcon.d.ts +1 -0
  83. package/dist/icons/currency/EurIcon.d.ts +1 -0
  84. package/dist/icons/currency/RubIcon.d.ts +1 -0
  85. package/dist/icons/currency/UsdIcon.d.ts +1 -0
  86. package/dist/icons/currency/index.d.ts +4 -0
  87. package/dist/icons/domain/BudgetTransferIcon.d.ts +1 -0
  88. package/dist/icons/domain/ContractCardIcon.d.ts +1 -0
  89. package/dist/icons/domain/HandOpenHeartIcon.d.ts +1 -0
  90. package/dist/icons/domain/OnlyEmployeeIcon.d.ts +1 -0
  91. package/dist/icons/domain/ProjectProductIcon.d.ts +1 -0
  92. package/dist/icons/domain/UnitsEmployeeIcon.d.ts +1 -0
  93. package/dist/icons/domain/VacationIcon.d.ts +1 -0
  94. package/dist/icons/domain/index.d.ts +7 -0
  95. package/dist/icons/flags/FlagAmIcon.d.ts +1 -0
  96. package/dist/icons/flags/FlagGbIcon.d.ts +1 -0
  97. package/dist/icons/flags/FlagRuIcon.d.ts +1 -0
  98. package/dist/icons/flags/FlagUsIcon.d.ts +1 -0
  99. package/dist/icons/flags/index.d.ts +4 -0
  100. package/dist/icons/index.d.ts +4 -0
  101. package/dist/icons.d.ts +2 -0
  102. package/dist/icons.js +342 -0
  103. package/dist/icons.js.map +1 -0
  104. package/dist/index.d.ts +18 -0
  105. package/dist/index.js +2513 -1472
  106. package/dist/index.js.map +1 -1
  107. package/dist/lib/FormContext.d.ts +22 -0
  108. package/dist/lib/mergeRefs.d.ts +4 -0
  109. package/dist/lib/motion.d.ts +11 -0
  110. package/dist/lib/useAnchoredPosition.d.ts +31 -0
  111. package/dist/lib/useFloatingPosition.d.ts +29 -0
  112. package/dist/lib/useMountTransition.d.ts +21 -0
  113. package/dist/styles.css +548 -0
  114. package/package.json +30 -4
@@ -0,0 +1,29 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { BaseProps } from '../../types';
3
+ import { FloatingAlign, FloatingSide } from '../../lib/useFloatingPosition';
4
+ export type PopoverSide = FloatingSide;
5
+ export type PopoverAlign = FloatingAlign;
6
+ export interface PopoverProps extends BaseProps {
7
+ /** Bubble content. May contain interactive elements — unlike `Tooltip`, the bubble is not `pointer-events-none`. */
8
+ content: ReactNode;
9
+ /** Single trigger element; `Popover` attaches an `onClick` (composed with any the child already has) plus `aria-expanded`/`aria-haspopup`. */
10
+ children: ReactElement;
11
+ side?: PopoverSide;
12
+ align?: PopoverAlign;
13
+ /** Gap between the trigger and the bubble, in px. Default `8`. */
14
+ offset?: number;
15
+ /** Controlled open state. Pass alongside `onOpenChange` to fully control the popover. */
16
+ open?: boolean;
17
+ defaultOpen?: boolean;
18
+ onOpenChange?: (open: boolean) => void;
19
+ /** Flips to the opposite side on the same axis when there isn't room. Default `true`. */
20
+ flip?: boolean;
21
+ showArrow?: boolean;
22
+ /** Closes the popover when any ancestor scrolls. Default `true`. */
23
+ closeOnScroll?: boolean;
24
+ /** Moves focus into the bubble on open, restoring it to the trigger on close. Default `false` — there is no focus trap in v1, so use sparingly for content that's genuinely keyboard-operable. */
25
+ autoFocus?: boolean;
26
+ className?: string;
27
+ /** Portal target. Defaults to `document.body`. */
28
+ container?: HTMLElement | null;
29
+ }
@@ -0,0 +1,2 @@
1
+ export { Popover } from './Popover';
2
+ export type { PopoverAlign, PopoverProps, PopoverSide } from './Popover.types';
@@ -0,0 +1,2 @@
1
+ import { ProgressProps } from './Progress.types';
2
+ export declare const Progress: import('react').ForwardRefExoticComponent<ProgressProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,18 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { BaseProps } from '../../types';
3
+ export type ProgressVariant = 'linear' | 'circular';
4
+ export type ProgressSize = 'sm' | 'lg';
5
+ export interface ProgressProps extends HTMLAttributes<HTMLDivElement>, BaseProps {
6
+ variant?: ProgressVariant;
7
+ size?: ProgressSize;
8
+ /** Completion percentage (0-100). Ignored when `stepCount`/`currentStep` are set. */
9
+ percent?: number;
10
+ stepCount?: number;
11
+ currentStep?: number;
12
+ /** Hides the percent/step text next to (linear) or inside (circular) the bar. */
13
+ hideLabel?: boolean;
14
+ /** Circular only — overrides the size-based default radius, in px. */
15
+ dimension?: number;
16
+ /** Circular only — renders an indeterminate spinner instead of tracking `percent`. */
17
+ loop?: boolean;
18
+ }
@@ -0,0 +1,2 @@
1
+ export { Progress } from './Progress';
2
+ export type { ProgressProps, ProgressSize, ProgressVariant } from './Progress.types';
@@ -0,0 +1,2 @@
1
+ import { ReadMoreProps } from './ReadMore.types';
2
+ export declare const ReadMore: import('react').ForwardRefExoticComponent<ReadMoreProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,17 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { BaseProps } from '../../types';
3
+ import { TextProps } from '../Text';
4
+ export interface ReadMoreProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'>, BaseProps {
5
+ children: ReactNode;
6
+ /** Lines shown while collapsed. Default `3`. Ignored when `collapsedContent` supplies its own text. */
7
+ clamp?: number;
8
+ /** Escape hatch for collapsed copy that genuinely differs from `children`, rather than just clamping it. */
9
+ collapsedContent?: ReactNode;
10
+ expandLabel?: ReactNode;
11
+ collapseLabel?: ReactNode;
12
+ defaultExpanded?: boolean;
13
+ expanded?: boolean;
14
+ onExpandedChange?: (expanded: boolean) => void;
15
+ /** Typography passed through to the underlying `Text`. */
16
+ textProps?: Pick<TextProps, 'variant' | 'weight' | 'color'>;
17
+ }
@@ -0,0 +1,2 @@
1
+ export { ReadMore } from './ReadMore';
2
+ export type { ReadMoreProps } from './ReadMore.types';
@@ -13,6 +13,8 @@ export interface SelectProps extends BaseProps {
13
13
  onChange?: (value: string) => void;
14
14
  placeholder?: string;
15
15
  label?: ReactNode;
16
+ /** Content rendered on the label row, right of the label text — e.g. an info tooltip trigger. Rendered as a sibling of the `<label>`, not a child, so an interactive addon never steals focus into the trigger. */
17
+ labelAddons?: ReactNode;
16
18
  helperText?: ReactNode;
17
19
  errorText?: ReactNode;
18
20
  error?: boolean;
@@ -0,0 +1,2 @@
1
+ import { SkeletonProps } from './Skeleton.types';
2
+ export declare const Skeleton: import('react').ForwardRefExoticComponent<SkeletonProps & import('react').RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,22 @@
1
+ import { CSSProperties, HTMLAttributes, ReactNode } from 'react';
2
+ import { BaseProps } from '../../types';
3
+ export type SkeletonVariant = 'text' | 'circular' | 'rectangular' | 'rounded';
4
+ export type SkeletonAnimation = 'pulse' | 'wave' | 'none';
5
+ export interface SkeletonProps extends HTMLAttributes<HTMLSpanElement>, BaseProps {
6
+ /** Visual shape of the placeholder. */
7
+ variant?: SkeletonVariant;
8
+ /** Animation style. Pass `'none'` to disable. */
9
+ animation?: SkeletonAnimation;
10
+ /** Width as a number (px) or any valid CSS length / percentage. */
11
+ width?: number | string;
12
+ /** Height as a number (px) or any valid CSS length / percentage. */
13
+ height?: number | string;
14
+ /** Render N stacked skeletons. Useful for placeholder paragraphs. */
15
+ count?: number;
16
+ /**
17
+ * If provided, the skeleton wraps the children and infers its size from
18
+ * them while the children remain invisible (used as a layout guide).
19
+ */
20
+ children?: ReactNode;
21
+ style?: CSSProperties;
22
+ }
@@ -0,0 +1,2 @@
1
+ export { Skeleton } from './Skeleton';
2
+ export type { SkeletonAnimation, SkeletonProps, SkeletonVariant } from './Skeleton.types';
@@ -0,0 +1,2 @@
1
+ import { StepIndicatorProps } from './StepIndicator.types';
2
+ export declare const StepIndicator: import('react').ForwardRefExoticComponent<StepIndicatorProps & import('react').RefAttributes<HTMLOListElement>>;
@@ -0,0 +1,24 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { BaseProps } from '../../types';
3
+ export type StepIndicatorStatus = 'upcoming' | 'active' | 'completed' | 'rejected';
4
+ export type StepIndicatorMarker = 'number' | 'dot' | 'icon';
5
+ export type StepIndicatorOrientation = 'horizontal' | 'vertical';
6
+ export type StepIndicatorSize = 'lg' | 'sm';
7
+ export interface StepIndicatorItem {
8
+ value: string | number;
9
+ label: ReactNode;
10
+ description?: ReactNode;
11
+ status?: StepIndicatorStatus;
12
+ /** Halo ring around the marker — an orthogonal emphasis flag, independent of `status` (e.g. a completed step still awaiting review). */
13
+ highlighted?: boolean;
14
+ }
15
+ export interface StepIndicatorProps extends Omit<HTMLAttributes<HTMLOListElement>, 'children'>, BaseProps {
16
+ steps: StepIndicatorItem[];
17
+ /** Marks the matching step `aria-current="step"`. */
18
+ activeValue?: string | number;
19
+ /** Wraps each marker in a `<button>` when set. Omit to render a non-interactive indicator. */
20
+ onStepSelect?: (value: string | number) => void;
21
+ marker?: StepIndicatorMarker;
22
+ orientation?: StepIndicatorOrientation;
23
+ size?: StepIndicatorSize;
24
+ }
@@ -0,0 +1,2 @@
1
+ export { StepIndicator } from './StepIndicator';
2
+ export type { StepIndicatorItem, StepIndicatorMarker, StepIndicatorOrientation, StepIndicatorProps, StepIndicatorSize, StepIndicatorStatus, } from './StepIndicator.types';
@@ -1,5 +1,6 @@
1
1
  import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
2
2
  import { BaseProps } from '../../types';
3
+ import { BadgeProps } from '../Badge';
3
4
  export type TabsVariant = 'underline' | 'pills' | 'boxed';
4
5
  export type TabsSize = 'lg' | 'md' | 'sm';
5
6
  export interface TabsProps extends HTMLAttributes<HTMLDivElement>, BaseProps {
@@ -10,8 +11,12 @@ export interface TabsProps extends HTMLAttributes<HTMLDivElement>, BaseProps {
10
11
  onValueChange?: (value: string) => void;
11
12
  variant?: TabsVariant;
12
13
  size?: TabsSize;
14
+ /** Disables every tab in the bar at once. OR'd with each `Tab`'s own `disabled`. */
15
+ disabled?: boolean;
13
16
  }
14
17
  export interface TabListProps extends HTMLAttributes<HTMLDivElement>, BaseProps {
18
+ /** Horizontally scrolls the bar when tabs overflow, instead of wrapping. */
19
+ scrollable?: boolean;
15
20
  }
16
21
  export interface TabProps extends ButtonHTMLAttributes<HTMLButtonElement>, BaseProps {
17
22
  /** Unique identifier matched against the parent `Tabs`'s active value. */
@@ -19,8 +24,18 @@ export interface TabProps extends ButtonHTMLAttributes<HTMLButtonElement>, BaseP
19
24
  icon?: ReactNode;
20
25
  /** Count/indicator rendered after the label. Hidden when `undefined`, `null`, or `false`. */
21
26
  badge?: ReactNode;
27
+ /** Styles `badge` through `Badge` instead of the default fixed-style count pill. Omit to keep the default. */
28
+ badgeProps?: Pick<BadgeProps, 'variant' | 'appearance' | 'size'>;
29
+ /** Trailing icon rendered as its own button — e.g. a close-tab X. Rendered as a sibling of the tab button, not a nested one (nesting a button inside a button is invalid HTML). */
30
+ rightIcon?: ReactNode;
31
+ /** Called with this tab's `value` when `rightIcon` is clicked. Does not activate the tab. */
32
+ onRightIconClick?: (value: string) => void;
33
+ /** Accessible name for the `rightIcon` button. Required when `rightIcon` is set. */
34
+ rightIconLabel?: string;
22
35
  }
23
36
  export interface TabPanelProps extends HTMLAttributes<HTMLDivElement>, BaseProps {
24
- /** Matched against the parent `Tabs`'s active value; renders nothing (unmounted) when not active. */
37
+ /** Matched against the parent `Tabs`'s active value; hidden (or unmounted, depending on `keepMounted`) when not active. */
25
38
  value: string;
39
+ /** Keeps the panel mounted (hidden via the `hidden` attribute) while inactive, instead of unmounting it — preserves scroll position and in-panel state across tab switches. */
40
+ keepMounted?: boolean;
26
41
  }
@@ -12,4 +12,6 @@ export interface TextProps extends HTMLAttributes<HTMLElement>, BaseProps {
12
12
  as?: ElementType;
13
13
  /** Truncate to a single line with ellipsis. */
14
14
  truncate?: boolean;
15
+ /** Truncate to this many lines with ellipsis (CSS line-clamp). Ignored when `truncate` is set. */
16
+ clamp?: number;
15
17
  }
@@ -2,6 +2,8 @@ import { TextareaHTMLAttributes, ReactNode } from 'react';
2
2
  import { BaseProps } from '../../types';
3
3
  export interface TextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement>, BaseProps {
4
4
  label?: ReactNode;
5
+ /** Content rendered on the label row, right of the label text and required marker — e.g. an info tooltip trigger. Rendered as a sibling of the `<label>`, not a child, so an interactive addon never steals focus into the field. */
6
+ labelAddons?: ReactNode;
5
7
  helperText?: ReactNode;
6
8
  errorText?: ReactNode;
7
9
  error?: boolean;
@@ -0,0 +1,2 @@
1
+ import { ThemeSwitchProps } from './ThemeSwitch.types';
2
+ export declare const ThemeSwitch: import('react').ForwardRefExoticComponent<ThemeSwitchProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,7 @@
1
+ import { InputHTMLAttributes, ReactNode } from 'react';
2
+ import { BaseProps } from '../../types';
3
+ export interface ThemeSwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'type'>, BaseProps {
4
+ /** `true` renders the "dark" thumb position. Purely presentational — `ThemeSwitch` owns no theme state; wire `onChange` to your own theme toggle. */
5
+ checked?: boolean;
6
+ label?: ReactNode;
7
+ }
@@ -0,0 +1,2 @@
1
+ export { ThemeSwitch } from './ThemeSwitch';
2
+ export type { ThemeSwitchProps } from './ThemeSwitch.types';
@@ -0,0 +1,2 @@
1
+ import { UnderConstructionProps } from './UnderConstruction.types';
2
+ export declare const UnderConstruction: import('react').ForwardRefExoticComponent<UnderConstructionProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,12 @@
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
+ import { BaseProps } from '../../types';
3
+ export type UnderConstructionSize = 'lg' | 'sm';
4
+ export interface UnderConstructionProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, BaseProps {
5
+ size?: UnderConstructionSize;
6
+ /** Defaults to "We'll be back soon" — pass a translated string for other locales. */
7
+ title?: ReactNode;
8
+ /** Defaults to a generic maintenance message — pass a translated string for other locales. */
9
+ description?: ReactNode;
10
+ /** Defaults to a `Construction` icon in an `IconTile` circle — pass your own illustration node to override. */
11
+ illustration?: ReactNode;
12
+ }
@@ -0,0 +1,2 @@
1
+ export { UnderConstruction } from './UnderConstruction';
2
+ export type { UnderConstructionProps, UnderConstructionSize } from './UnderConstruction.types';
@@ -1,15 +1,42 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
2
  import { BaseProps } from '../../types';
3
- export interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick' | 'onDrop' | 'onDragOver' | 'onDragLeave' | 'onKeyDown' | 'role' | 'tabIndex' | 'aria-disabled'>, BaseProps {
3
+ export type UploadMode = 'dropzone' | 'button' | 'icon';
4
+ export type UploadRejectionReason = 'size' | 'type' | 'maxFiles' | 'duplicate';
5
+ export interface UploadRejection {
6
+ file: File;
7
+ reason: UploadRejectionReason;
8
+ }
9
+ export interface UploadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick' | 'onDrop' | 'onDragEnter' | 'onDragOver' | 'onDragLeave' | 'onKeyDown' | 'role' | 'tabIndex' | 'aria-disabled'>, BaseProps {
4
10
  /** Forwarded to the hidden native `<input type="file">`, e.g. `"image/png,image/jpeg"`. */
5
11
  accept?: string;
6
12
  multiple?: boolean;
7
- /** Shown in the default hint text (e.g. "PNG, up to 10 MB"); purely informational, not enforced. */
13
+ /** Shown in the default hint text (e.g. "PNG, up to 10 MB"). Enforced only when `validateFiles` is set. */
8
14
  maxSizeMB?: number;
9
15
  /** Overrides the auto-generated hint derived from `accept`/`maxSizeMB`. */
10
16
  hint?: ReactNode;
17
+ /** Called with the files that passed validation (or every selected/dropped file, when `validateFiles` is `false`). */
11
18
  onFiles?: (files: File[]) => void;
12
19
  disabled?: boolean;
20
+ /** Enforces `accept`, `maxSizeMB`, `maxFiles`, and de-duplication against `currentFiles`, routing rejected files to `onReject` instead of `onFiles`. Defaults to `false` — existing consumers keep receiving every file the user picked. */
21
+ validateFiles?: boolean;
22
+ /** Max total files, counted against `currentFiles.length` plus the new selection. Only enforced when `validateFiles` is set. */
23
+ maxFiles?: number;
24
+ /** Drops files already present in `currentFiles` (matched by name + size). Defaults to `validateFiles`'s value. */
25
+ dedupe?: boolean;
26
+ /** Files the consumer is already holding — enables `maxFiles`/`dedupe` enforcement without `Upload` owning any file state itself. */
27
+ currentFiles?: File[];
28
+ /** Files that failed validation, with the reason. Only called when `validateFiles` is set. */
29
+ onReject?: (rejections: UploadRejection[]) => void;
30
+ /** `'dropzone'` (default) is the drag-and-drop area. `'button'` renders a secondary Button trigger. `'icon'` renders a compact icon-only trigger. */
31
+ mode?: UploadMode;
32
+ /** Label for the `'button'`-mode trigger. Ignored in other modes. */
33
+ triggerLabel?: ReactNode;
34
+ /** Overrides the default trigger icon (a paperclip for `'button'` mode, a pencil for `'icon'` mode). */
35
+ triggerIcon?: ReactNode;
36
+ label?: ReactNode;
37
+ required?: boolean;
38
+ /** Content rendered on the label row, right of the label text and required marker — e.g. an info tooltip trigger. */
39
+ labelAddons?: ReactNode;
13
40
  }
14
41
  export type UploadItemStatus = 'processing' | 'completed' | 'error';
15
42
  export interface UploadItemProps extends HTMLAttributes<HTMLDivElement>, BaseProps {
@@ -21,4 +48,6 @@ export interface UploadItemProps extends HTMLAttributes<HTMLDivElement>, BasePro
21
48
  errorText?: ReactNode;
22
49
  onRetry?: () => void;
23
50
  onRemove?: () => void;
51
+ /** Image thumbnail URL, rendered in place of the file-type icon. The consumer owns the URL's lifetime (e.g. call `URL.revokeObjectURL` on unmount). Falls back to the file icon on load failure. */
52
+ previewSrc?: string;
24
53
  }
@@ -1,2 +1,2 @@
1
1
  export { Upload, UploadItem } from './Upload';
2
- export type { UploadItemProps, UploadItemStatus, UploadProps } from './Upload.types';
2
+ export type { UploadItemProps, UploadItemStatus, UploadMode, UploadProps, UploadRejection, UploadRejectionReason, } from './Upload.types';
@@ -0,0 +1,2 @@
1
+ export * from '../components/FormContainer';
2
+ export * from '../components/FormField';
package/dist/form.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './form/index.js'
2
+ export {}
package/dist/form.js ADDED
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "./FormField-CwRAOtTN.js";
2
+ export { e as FormContainer, t as FormField };
@@ -0,0 +1,2 @@
1
+ export { useStepper } from './useStepper';
2
+ export type { UseStepperOptions, UseStepperResult } from './useStepper';
@@ -0,0 +1,27 @@
1
+ export interface UseStepperOptions {
2
+ /** Total number of steps. */
3
+ count: number;
4
+ /** Uncontrolled initial step index. Default `0`. */
5
+ initialStep?: number;
6
+ /** Controlled step index. Pass alongside `onStepChange` to fully control the step. */
7
+ step?: number;
8
+ onStepChange?: (step: number) => void;
9
+ /** Wraps `next`/`prev` past the last/first step instead of clamping. Default `false`. */
10
+ loop?: boolean;
11
+ }
12
+ export interface UseStepperResult {
13
+ step: number;
14
+ count: number;
15
+ isFirst: boolean;
16
+ isLast: boolean;
17
+ next: () => void;
18
+ prev: () => void;
19
+ goTo: (step: number) => void;
20
+ reset: () => void;
21
+ }
22
+ /** Drives a multi-step flow's current index — the logic half of a wizard,
23
+ * with no rendering of its own; render `list[step]` (or similar) yourself.
24
+ * Supports both controlled (`step` + `onStepChange`) and uncontrolled
25
+ * (`initialStep`) usage, the same shape as a controlled/uncontrolled form
26
+ * input. */
27
+ export declare function useStepper({ count, initialStep, step: controlledStep, onStepChange, loop, }: UseStepperOptions): UseStepperResult;
@@ -0,0 +1 @@
1
+ export declare const AppleIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const FacebookIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const GoogleIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const InstagramIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const LinkedinIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const MediumIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const TelegramIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const TwitterIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const YoutubeIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1,9 @@
1
+ export { GoogleIcon } from './GoogleIcon';
2
+ export { AppleIcon } from './AppleIcon';
3
+ export { FacebookIcon } from './FacebookIcon';
4
+ export { InstagramIcon } from './InstagramIcon';
5
+ export { TelegramIcon } from './TelegramIcon';
6
+ export { TwitterIcon } from './TwitterIcon';
7
+ export { LinkedinIcon } from './LinkedinIcon';
8
+ export { MediumIcon } from './MediumIcon';
9
+ export { YoutubeIcon } from './YoutubeIcon';
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+ import { LucideIcon } from 'lucide-react';
3
+ type IconRenderer = (uid: string) => ReactNode;
4
+ /** Builds a solid-fill glyph icon (currency, brand logos, HR-domain marks)
5
+ * typed as lucide's own `LucideIcon`, so it drops straight into any
6
+ * `icon: LucideIcon` prop (`IconTile`, `InfoField`, ...) with no widening
7
+ * of the existing type. `fill` is set on the root `<svg>` from `color`
8
+ * (default `currentColor`) and inherited by every child `<path>` that
9
+ * doesn't set its own `fill` — the same mechanism the source icon set
10
+ * relied on via a `path:not([fill]) { fill: currentColor }` CSS rule,
11
+ * reproduced here without needing any external CSS. `strokeWidth` is
12
+ * accepted (for prop-shape compatibility with `LucideIcon`) but has no
13
+ * effect — these are solid fills, not stroke-based glyphs.
14
+ *
15
+ * `content` is either static markup, or — for the handful of icons whose
16
+ * source used a `<clipPath>` — a function receiving a mask/clip id
17
+ * generated fresh per instance via `useId()`. The source hardcoded these
18
+ * ids (e.g. `clip0_697_1766`), which collide (`url(#...)` resolves to
19
+ * whichever instance rendered first) the moment the same icon renders
20
+ * twice on one page. */
21
+ export declare function createIcon(name: string, content: ReactNode | IconRenderer, viewBox?: string): LucideIcon;
22
+ /** Builds a fixed multi-color icon (flags) — same `LucideIcon` shape as
23
+ * `createIcon`, but `color`/`strokeWidth` have no effect: every shape
24
+ * already carries its own literal `fill`, since a flag's colors aren't
25
+ * theme-able. `renderShapes` receives a fresh-per-instance mask id, same
26
+ * rationale as `createIcon`'s clip id. */
27
+ export declare function createFlagIcon(name: string, renderShapes: IconRenderer, viewBox?: string): LucideIcon;
28
+ export {};
@@ -0,0 +1 @@
1
+ export declare const AmdIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const EurIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const RubIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const UsdIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1,4 @@
1
+ export { AmdIcon } from './AmdIcon';
2
+ export { EurIcon } from './EurIcon';
3
+ export { UsdIcon } from './UsdIcon';
4
+ export { RubIcon } from './RubIcon';
@@ -0,0 +1 @@
1
+ export declare const BudgetTransferIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const ContractCardIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const HandOpenHeartIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const OnlyEmployeeIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const ProjectProductIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const UnitsEmployeeIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const VacationIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1,7 @@
1
+ export { OnlyEmployeeIcon } from './OnlyEmployeeIcon';
2
+ export { UnitsEmployeeIcon } from './UnitsEmployeeIcon';
3
+ export { ProjectProductIcon } from './ProjectProductIcon';
4
+ export { BudgetTransferIcon } from './BudgetTransferIcon';
5
+ export { HandOpenHeartIcon } from './HandOpenHeartIcon';
6
+ export { VacationIcon } from './VacationIcon';
7
+ export { ContractCardIcon } from './ContractCardIcon';
@@ -0,0 +1 @@
1
+ export declare const FlagAmIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const FlagGbIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const FlagRuIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1 @@
1
+ export declare const FlagUsIcon: import('lucide-react').LucideIcon;
@@ -0,0 +1,4 @@
1
+ export { FlagAmIcon } from './FlagAmIcon';
2
+ export { FlagUsIcon } from './FlagUsIcon';
3
+ export { FlagGbIcon } from './FlagGbIcon';
4
+ export { FlagRuIcon } from './FlagRuIcon';
@@ -0,0 +1,4 @@
1
+ export * from './currency';
2
+ export * from './flags';
3
+ export * from './brands';
4
+ export * from './domain';
@@ -0,0 +1,2 @@
1
+ export * from './icons/index.js'
2
+ export {}