@skalar-saas/design-system 0.1.128 → 0.1.129

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 (27) hide show
  1. package/dist/shared/ui/Alert/Alert.d.ts +1 -1
  2. package/dist/shared/ui/ChatCollapsibleDialog/ChatCollapsibleDialog.d.ts +1 -1
  3. package/dist/shared/ui/ChatHistorial/ChatHistorial.d.ts +1 -1
  4. package/dist/shared/ui/ChatHistorialItem/ChatHistorialItem.d.ts +1 -1
  5. package/dist/shared/ui/ChatPanel/ChatPanel.types.d.ts +2 -2
  6. package/dist/shared/ui/DateRangePicker/DateRangePicker.stories.d.ts +69 -0
  7. package/dist/shared/ui/DropModal/DropModal.d.ts +1 -1
  8. package/dist/shared/ui/FormFieldGroup/FormFieldGroup.d.ts +1 -1
  9. package/dist/shared/ui/KPI/KPIAutomationTrigger/KPIAutomationTrigger.d.ts +1 -1
  10. package/dist/shared/ui/KPI/KPIProgress/KPIProgress.d.ts +1 -1
  11. package/dist/shared/ui/KPI/KPIQuickActionList/KPIQuickActionList.d.ts +1 -1
  12. package/dist/shared/ui/KPI/KPISlider/KPISlider.d.ts +1 -1
  13. package/dist/shared/ui/KPI/KPIValueBreakdown/KPIValueBreakdown.d.ts +1 -1
  14. package/dist/shared/ui/Kanban/Kanban.d.ts +2 -2
  15. package/dist/shared/ui/KanbanCard/KanbanCard.d.ts +1 -1
  16. package/dist/shared/ui/KanbanColumn/KanbanColumn.d.ts +1 -1
  17. package/dist/shared/ui/LabelIcon/LabelIcon.d.ts +1 -1
  18. package/dist/shared/ui/Modal/Modal.d.ts +1 -1
  19. package/dist/shared/ui/Planner/Planner.d.ts +2 -2
  20. package/dist/shared/ui/ProjectCard/ProjectCard.d.ts +1 -1
  21. package/dist/shared/ui/ProjectCardPlan/ProjectCardPlan.d.ts +1 -1
  22. package/dist/shared/ui/SupportCard/SupportCard.d.ts +1 -1
  23. package/dist/shared/ui/VisualComposer/VisualComposer.d.ts +1 -1
  24. package/dist/shared/ui/WidgetBuilderEdit/Header.d.ts +1 -1
  25. package/dist/shared/ui/WidgetBuilderEdit/WidgetBuilderEdit.d.ts +1 -1
  26. package/dist/shared/ui/WidgetBuilderEdit/index.d.ts +1 -1
  27. package/package.json +3 -2
@@ -1,5 +1,5 @@
1
1
  import React, { ComponentPropsWithoutRef } from "react";
2
- import { Button } from "@/shared/ui/Button";
2
+ import { Button } from "../Button";
3
3
  /**
4
4
  * Alert type options.
5
5
  * @typedef {'success' | 'warning' | 'error' | 'info' | 'default'} AlertType
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type ButtonProps } from '@/shared/ui/Button/Button';
2
+ import { type ButtonProps } from "../Button/Button";
3
3
  export interface ChatCollapsibleDialogAction {
4
4
  label: string;
5
5
  onClick?: () => void;
@@ -1,4 +1,4 @@
1
- import { ChatHistorialItemProps } from '@/shared/ui/ChatHistorialItem/ChatHistorialItem';
1
+ import { ChatHistorialItemProps } from "../ChatHistorialItem/ChatHistorialItem";
2
2
  import type { ReactNode } from 'react';
3
3
  /**
4
4
  * Represents a single item in the chat history with timestamp
@@ -1,4 +1,4 @@
1
- import { DropMenuItemProps } from '@/shared/ui/DropMenu/DropMenu';
1
+ import { DropMenuItemProps } from "../DropMenu/DropMenu";
2
2
  /**
3
3
  * Defines the public API for the ChatHistorialItem component.
4
4
  */
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import type { ChatView } from '@/shared/ui/ChatHeader';
3
- import type { ChatHistorialItem } from '@/shared/ui/ChatHistorial';
2
+ import type { ChatView } from "../ChatHeader";
3
+ import type { ChatHistorialItem } from "../ChatHistorial";
4
4
  /**
5
5
  * Attachment data structure
6
6
  */
@@ -0,0 +1,69 @@
1
+ import { StoryObj } from '@storybook/nextjs-vite';
2
+ /**
3
+ * The `DateRangePicker` component is a calendar UI for date selection in the design system.
4
+ * It provides a clean interface for both single date and date range selection.
5
+ *
6
+ * ### Core Concepts
7
+ *
8
+ * The component's behavior is controlled by combining props:
9
+ * - **`pickType`**: Determines selection mode ('range' for date ranges, 'single' for single dates).
10
+ * - **`extraMonth`**: When true, displays two months side by side for easier range selection.
11
+ * - **`selected`**: The currently selected DateRange object (`{ from: Date, to?: Date }`).
12
+ *
13
+ * ### Built-in Actions
14
+ *
15
+ * The component includes Cancel and Accept buttons at the bottom:
16
+ * - Cancel resets the selection and fires `onCancel` callback
17
+ * - Accept confirms the selection and fires `onAccept` callback with the current range
18
+ * - Both buttons can be customized via `cancelLabel` and `acceptLabel` props for internationalization
19
+ *
20
+ * ### Calendar Customization
21
+ *
22
+ * The component uses custom Chevron icons from the design system and shows outside days
23
+ * for better month navigation context.
24
+ *
25
+ * The main **Interactive** story serves as a playground to test all prop combinations.
26
+ */
27
+ declare const meta: Meta<({ selected: selectedProp, onSelect, disabled, onCancel, onAccept, extraMonth, pickType, className, cancelLabel, acceptLabel, }: import('./DateRangePicker').DateRangePickerProps) => import("react/jsx-runtime").JSX.Element>;
28
+ export default meta;
29
+ type Story = StoryObj<typeof meta>;
30
+ /**
31
+ * ## Interactive Playground
32
+ *
33
+ * This story provides a fully interactive playground to test all DateRangePicker configurations.
34
+ * Use the Storybook controls panel to experiment with different prop combinations.
35
+ *
36
+ * Try changing:
37
+ * - `pickType` to switch between range and single date selection
38
+ * - `extraMonth` to toggle dual-month display
39
+ * - `disabled` to see the disabled state
40
+ * - `cancelLabel` and `acceptLabel` for internationalization
41
+ */
42
+ export declare const Interactive: Story;
43
+ /**
44
+ * ## Date Range Selection
45
+ *
46
+ * A date range picker showing two months side by side for easy range selection.
47
+ * Users can select a start date and an end date, making it ideal for filtering data
48
+ * or booking multi-day experiences.
49
+ *
50
+ * **Use cases:**
51
+ * - Hotel booking systems (check-in to check-out)
52
+ * - Report date filters (start to end period)
53
+ * - Event scheduling (multi-day events)
54
+ * - Analytics dashboards (time range selection)
55
+ */
56
+ export declare const RangeSelection: Story;
57
+ /**
58
+ * ## Single Date Selection
59
+ *
60
+ * A calendar picker for selecting a single date. Displays one month at a time
61
+ * for a more compact layout, perfect for forms and single-point-in-time selection.
62
+ *
63
+ * **Use cases:**
64
+ * - Birth date selection in forms
65
+ * - Appointment booking (single day)
66
+ * - Deadline picker (due date)
67
+ * - Event date selection (single-day events)
68
+ */
69
+ export declare const SingleDateSelection: Story;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Button } from '@/shared/ui/Button/Button';
2
+ import { Button } from "../Button/Button";
3
3
  export type DropModalSize = 'sm' | 'md' | 'lg';
4
4
  declare const DropModal: {
5
5
  ({ children, size, padding, open: controlledOpen, onClose, triggerRef: externalTriggerRef, }: {
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { type LayoutValue } from "@/shared/ui/DropLayoutPicker/DropLayoutPicker";
2
+ import { type LayoutValue } from "../DropLayoutPicker/DropLayoutPicker";
3
3
  export type { LayoutValue };
4
4
  export interface FormFieldGroupProps extends React.HTMLAttributes<HTMLDivElement> {
5
5
  bodyClassName?: string;
@@ -1,4 +1,4 @@
1
- import type { KPIValueBreakdownSize } from "@/shared/ui/KPI/KPIValueBreakdown";
1
+ import type { KPIValueBreakdownSize } from "../KPIValueBreakdown";
2
2
  export type KPIAutomationTriggerSize = KPIValueBreakdownSize;
3
3
  export interface KPIAutomationTriggerItem {
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- import type { KPISingleValueContentProps } from "@/shared/ui/KPI/KPISingleValue";
1
+ import type { KPISingleValueContentProps } from "../KPISingleValue";
2
2
  export type KPIProgressVariant = "none" | "inline" | "below" | "tooltip";
3
3
  export interface KPIProgressBarProps extends KPISingleValueContentProps {
4
4
  /** Label shown above the progress bar. */
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { ListItemSize } from "@/shared/ui/ListItem/ListItem";
2
+ import type { ListItemSize } from "../../ListItem/ListItem";
3
3
  export interface KPIQuickActionListItem {
4
4
  title: string;
5
5
  description?: string;
@@ -1,4 +1,4 @@
1
- import type { KPISingleValueContentProps } from "@/shared/ui/KPI/KPISingleValue";
1
+ import type { KPISingleValueContentProps } from "../KPISingleValue";
2
2
  export interface KPISliderProps extends KPISingleValueContentProps {
3
3
  /** Minimum slider value. Defaults to 0. */
4
4
  min?: number;
@@ -1,4 +1,4 @@
1
- import type { ListItemSize } from "@/shared/ui/ListItem/ListItem";
1
+ import type { ListItemSize } from "../../ListItem/ListItem";
2
2
  export type KPIValueBreakdownSize = ListItemSize;
3
3
  export interface KPIValueBreakdownItem {
4
4
  name: string;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { type KanbanColumnStatusColor } from '@/shared/ui/KanbanColumn';
3
- import { type KanbanUser, type KanbanCardVariant } from '@/shared/ui/KanbanCard';
2
+ import { type KanbanColumnStatusColor } from "../KanbanColumn";
3
+ import { type KanbanUser, type KanbanCardVariant } from "../KanbanCard";
4
4
  export type { KanbanColumnStatusColor };
5
5
  export type { KanbanUser };
6
6
  export type { KanbanCardVariant };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type BadgeTheme } from '@/shared/ui/Badge';
2
+ import { type BadgeTheme } from "../Badge";
3
3
  export interface KanbanUser {
4
4
  imageUrl?: string;
5
5
  initials?: string;
@@ -1,4 +1,4 @@
1
- import { type KanbanUser, type KanbanCardVariant } from '@/shared/ui/KanbanCard';
1
+ import { type KanbanUser, type KanbanCardVariant } from "../KanbanCard";
2
2
  export type KanbanColumnStatusColor = 'red' | 'orange' | 'green' | 'gray';
3
3
  export interface KanbanColumnCardData {
4
4
  id: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { IconSize } from '@/shared/ui/Icon/Icon';
2
+ import { IconSize } from "../Icon/Icon";
3
3
  export type LabelSize = 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl';
4
4
  export interface LabelIconProps extends React.HTMLAttributes<HTMLDivElement> {
5
5
  /** The icon component or element to display */
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Button } from '@/shared/ui/Button/Button';
2
+ import { Button } from "../Button/Button";
3
3
  /**
4
4
  * Modal size options.
5
5
  * @typedef {'sm' | 'md' | 'lg'} ModalSize
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { type AppointmentDetailProps } from '@/shared/ui/AppointmentDetail';
3
- import type { AppointmentStatus } from '@/shared/ui/AppointmentRow';
2
+ import { type AppointmentDetailProps } from "../AppointmentDetail";
3
+ import type { AppointmentStatus } from "../AppointmentRow";
4
4
  export type { AppointmentStatus };
5
5
  export type { AppointmentDetailProps };
6
6
  export interface PlannerAppointment {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { StatusState } from '@/shared/ui/Badge/Badge';
2
+ import { StatusState } from "../Badge/Badge";
3
3
  /**
4
4
  * Defines the public API for the ProjectCard component, extending standard div attributes.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { BadgeProps } from "@/shared/ui/Badge/Badge";
2
+ import { BadgeProps } from "../Badge/Badge";
3
3
  export type ProjectCardTimeLabel = "month" | "week" | "year" | "day";
4
4
  export interface ProjectCardPlanItem {
5
5
  icon: React.ReactNode;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { ButtonVariant, ButtonHierarchy } from "@/shared/ui/Button/Button";
2
+ import { ButtonVariant, ButtonHierarchy } from "../Button/Button";
3
3
  export interface SupportCardButtonItem {
4
4
  icon?: React.ReactNode;
5
5
  label: string;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { type LayoutValue } from "@/shared/ui/FormFieldGroup/FormFieldGroup";
2
+ import { type LayoutValue } from "../FormFieldGroup/FormFieldGroup";
3
3
  export type SectionAction = "maximize" | "grid" | "add" | "copy" | "trash" | "addWidget";
4
4
  export type ColumnAction = "drag" | "duplicate" | "delete";
5
5
  export type WidgetAction = "maximize" | "text-block" | "edit" | "copy" | "trash";
@@ -1,4 +1,4 @@
1
- import { ContextMenuItem } from "@/shared/ui/WidgetEditor";
1
+ import { ContextMenuItem } from "../WidgetEditor";
2
2
  interface HeaderProps {
3
3
  title: string;
4
4
  contextMenu?: ContextMenuItem[];
@@ -1,4 +1,4 @@
1
- import { WidgetConfig } from "@/shared/ui/WidgetEditor";
1
+ import { WidgetConfig } from "../WidgetEditor";
2
2
  export interface WidgetBuilderEditProps {
3
3
  config: WidgetConfig;
4
4
  onChange: (config: WidgetConfig) => void;
@@ -1,3 +1,3 @@
1
1
  export { WidgetBuilderEdit } from "./WidgetBuilderEdit";
2
2
  export type { WidgetBuilderEditProps } from "./WidgetBuilderEdit";
3
- export type { WidgetConfig, Section, Field, FieldType, ContextMenuItem, DropdownOption, ListItem, DraggableItem, MultiDropdownConfig, } from "@/shared/ui/WidgetEditor";
3
+ export type { WidgetConfig, Section, Field, FieldType, ContextMenuItem, DropdownOption, ListItem, DraggableItem, MultiDropdownConfig, } from "../WidgetEditor";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skalar-saas/design-system",
3
- "version": "0.1.128",
3
+ "version": "0.1.129",
4
4
  "type": "module",
5
5
  "description": "Skalar Design System - UI component library",
6
6
  "author": "Skalar Team",
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/skalar-saas/skalar-design-system.git"
11
11
  },
12
12
  "scripts": {
13
- "build": "vite build && tsc --project tsconfig.build.json --skipLibCheck",
13
+ "build": "vite build && tsc --project tsconfig.build.json --skipLibCheck && node scripts/fix-dts-imports.cjs",
14
14
  "lint": "eslint",
15
15
  "test:storybook": "vitest run --project=storybook",
16
16
  "storybook": "storybook dev -p 6006",
@@ -104,6 +104,7 @@
104
104
  "typescript": "^5",
105
105
  "typescript-eslint": "^8.46.3",
106
106
  "vite": "^7.2.1",
107
+ "vite-plugin-dts": "^5.0.2",
107
108
  "vitest": "^3.2.4"
108
109
  },
109
110
  "dependencies": {