klun-ui 0.4.0 → 0.4.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.
package/dist/index.d.cts CHANGED
@@ -818,7 +818,7 @@ interface KanbanColumn {
818
818
  }
819
819
  interface KanbanProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> {
820
820
  columns: KanbanColumn[];
821
- /** Fired when a card is dropped in another position/column. */
821
+ /** Fired when a card lands in another position/column. */
822
822
  onMove?: (cardId: string, fromColumn: string, toColumn: string, toIndex: number) => void;
823
823
  onCardClick?: (card: KanbanCard, columnId: string) => void;
824
824
  /** Replace the default card body. */
@@ -829,9 +829,12 @@ interface KanbanProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> {
829
829
  style?: CSSProperties;
830
830
  }
831
831
  /**
832
- * Kanban — dependency-free drag & drop board. Columns hold cards; dropping a
833
- * card calls `onMove(cardId, fromColumn, toColumn, toIndex)` so the parent owns
834
- * the data. Native HTML5 DnD, keyboard-clickable cards.
832
+ * Kanban — drag & drop board (dnd-kit: mouse, touch and keyboard). Columns hold
833
+ * cards; dropping a card calls `onMove(cardId, fromColumn, toColumn, toIndex)`
834
+ * so the parent owns the data. `toIndex` is the position in the target column
835
+ * **after** the card is removed from its old slot, so consumers can simply
836
+ * `splice(toIndex, 0, card)`. Dropping on the lower half of a card lands after
837
+ * it, on the upper half before it; dropping on empty column space appends.
835
838
  */
836
839
  declare const Kanban: react.ForwardRefExoticComponent<KanbanProps & react.RefAttributes<HTMLDivElement>>;
837
840
 
@@ -1244,7 +1247,7 @@ interface TableProps<Row = any> extends Omit<HTMLAttributes<HTMLDivElement>, "st
1244
1247
  defaultExpandedRowKeys?: Array<string | number>;
1245
1248
  /** Show a toolbar "Columns" menu to toggle column visibility. */
1246
1249
  columnSettings?: boolean;
1247
- /** Enable drag-to-reorder rows (native HTML5 DnD; disabled in tree mode). */
1250
+ /** Enable drag-to-reorder rows (dnd-kit: pointer + keyboard; disabled in tree mode). */
1248
1251
  rowDraggable?: boolean;
1249
1252
  /** Called with the reordered rows after a drop. */
1250
1253
  onReorder?: (rows: Row[], from: number, to: number) => void;
package/dist/index.d.ts CHANGED
@@ -818,7 +818,7 @@ interface KanbanColumn {
818
818
  }
819
819
  interface KanbanProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> {
820
820
  columns: KanbanColumn[];
821
- /** Fired when a card is dropped in another position/column. */
821
+ /** Fired when a card lands in another position/column. */
822
822
  onMove?: (cardId: string, fromColumn: string, toColumn: string, toIndex: number) => void;
823
823
  onCardClick?: (card: KanbanCard, columnId: string) => void;
824
824
  /** Replace the default card body. */
@@ -829,9 +829,12 @@ interface KanbanProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> {
829
829
  style?: CSSProperties;
830
830
  }
831
831
  /**
832
- * Kanban — dependency-free drag & drop board. Columns hold cards; dropping a
833
- * card calls `onMove(cardId, fromColumn, toColumn, toIndex)` so the parent owns
834
- * the data. Native HTML5 DnD, keyboard-clickable cards.
832
+ * Kanban — drag & drop board (dnd-kit: mouse, touch and keyboard). Columns hold
833
+ * cards; dropping a card calls `onMove(cardId, fromColumn, toColumn, toIndex)`
834
+ * so the parent owns the data. `toIndex` is the position in the target column
835
+ * **after** the card is removed from its old slot, so consumers can simply
836
+ * `splice(toIndex, 0, card)`. Dropping on the lower half of a card lands after
837
+ * it, on the upper half before it; dropping on empty column space appends.
835
838
  */
836
839
  declare const Kanban: react.ForwardRefExoticComponent<KanbanProps & react.RefAttributes<HTMLDivElement>>;
837
840
 
@@ -1244,7 +1247,7 @@ interface TableProps<Row = any> extends Omit<HTMLAttributes<HTMLDivElement>, "st
1244
1247
  defaultExpandedRowKeys?: Array<string | number>;
1245
1248
  /** Show a toolbar "Columns" menu to toggle column visibility. */
1246
1249
  columnSettings?: boolean;
1247
- /** Enable drag-to-reorder rows (native HTML5 DnD; disabled in tree mode). */
1250
+ /** Enable drag-to-reorder rows (dnd-kit: pointer + keyboard; disabled in tree mode). */
1248
1251
  rowDraggable?: boolean;
1249
1252
  /** Called with the reordered rows after a drop. */
1250
1253
  onReorder?: (rows: Row[], from: number, to: number) => void;
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { Accordion, Alert, AutoComplete, Avatar, AvatarGroup, Badge, Banner, Breadcrumb, BulkAction, BulkActionBar, Button, ButtonGroup, CRON_PRESETS, Card, Carousel, Cascader, CharacterCounter, ChartLegend, ChartTooltip, Checkbox, CheckboxCard, CheckboxGroup, Chip, CircularProgress, CodeViewer, Col, Collapse, ColorDot, ColorPicker, ColorSlider, CommandMenu, CompactSelect, CompactSelectForInput, ConfigProvider, Confirm, ContentLabel, ContextMenu, CopyButton, CounterInput, CronEditor, CrossRefBadge, DatePicker, DateRangePicker, DateTimePicker, Descriptions, DiffViewer, DigitInput, Divider, Drawer, Dropdown, EmptyState, ExpiryCountdown, FileUpload, Flex, Form, FormItem, FormList, Format, GaugeBar, Grid, Hint, HorizontalFilter, ImageUpload, ImageViewer, InlineInput, InlineSelect, Input, Kanban, Kbd, KeyIcon, Label, Layout, LayoutContent, LayoutFooter, LayoutHeader, LayoutSider, List, ListItem, LiveDot, LogViewer, Markdown, Masonry, Menu, Message, Modal, Money, Notification, PageHeader, Pagination, PasswordStrength, Popconfirm, Popover, ProgressBar, Radio, RadioCard, RangeSlider, Rating, RelativeTime, Result, RichEditor, RichEditorToolbar, Row, SegmentedControl, SegmentedProgress, Select, SelectMenu, Skeleton, Slider, Space, Spinner, Splitter, SplitterPanel, StatCard, Statistic, StatusBadge, StatusDot, StepIndicator, Switch, Table, Tabs, Tag, Textarea, TimePicker, Timeline, Toast, Toaster, Tooltip, Tree, VirtualTable, Wizard, arSA, deDE, describeCron, enUS, esES, fmt, frFR, idID, itIT, jaJP, koKR, locales, nlNL, parsePatch, plPL, primaryColorVars, ptBR, renderMarkdown, ruRU, toast, trTR, useBreakpoint, useConfig, useContextMenu, useForm, useLocale, useMappedSize, useMessage, useNotification, useSize, viVN, zhCN, zhTW } from './chunk-TREMQLWT.js';
1
+ export { Accordion, Alert, AutoComplete, Avatar, AvatarGroup, Badge, Banner, Breadcrumb, BulkAction, BulkActionBar, Button, ButtonGroup, CRON_PRESETS, Card, Carousel, Cascader, CharacterCounter, ChartLegend, ChartTooltip, Checkbox, CheckboxCard, CheckboxGroup, Chip, CircularProgress, CodeViewer, Col, Collapse, ColorDot, ColorPicker, ColorSlider, CommandMenu, CompactSelect, CompactSelectForInput, ConfigProvider, Confirm, ContentLabel, ContextMenu, CopyButton, CounterInput, CronEditor, CrossRefBadge, DatePicker, DateRangePicker, DateTimePicker, Descriptions, DiffViewer, DigitInput, Divider, Drawer, Dropdown, EmptyState, ExpiryCountdown, FileUpload, Flex, Form, FormItem, FormList, Format, GaugeBar, Grid, Hint, HorizontalFilter, ImageUpload, ImageViewer, InlineInput, InlineSelect, Input, Kanban, Kbd, KeyIcon, Label, Layout, LayoutContent, LayoutFooter, LayoutHeader, LayoutSider, List, ListItem, LiveDot, LogViewer, Markdown, Masonry, Menu, Message, Modal, Money, Notification, PageHeader, Pagination, PasswordStrength, Popconfirm, Popover, ProgressBar, Radio, RadioCard, RangeSlider, Rating, RelativeTime, Result, RichEditor, RichEditorToolbar, Row, SegmentedControl, SegmentedProgress, Select, SelectMenu, Skeleton, Slider, Space, Spinner, Splitter, SplitterPanel, StatCard, Statistic, StatusBadge, StatusDot, StepIndicator, Switch, Table, Tabs, Tag, Textarea, TimePicker, Timeline, Toast, Toaster, Tooltip, Tree, VirtualTable, Wizard, arSA, deDE, describeCron, enUS, esES, fmt, frFR, idID, itIT, jaJP, koKR, locales, nlNL, parsePatch, plPL, primaryColorVars, ptBR, renderMarkdown, ruRU, toast, trTR, useBreakpoint, useConfig, useContextMenu, useForm, useLocale, useMappedSize, useMessage, useNotification, useSize, viVN, zhCN, zhTW } from './chunk-MBL2CDDG.js';
2
2
  export { cx } from './chunk-T225J6LV.js';
3
3
  //# sourceMappingURL=index.js.map
4
4
  //# sourceMappingURL=index.js.map
package/dist/styles.css CHANGED
@@ -3236,6 +3236,7 @@ body {
3236
3236
  box-shadow: var(--klun-shadow-xs, 0 1px 2px rgba(14, 18, 27, 0.06)), inset 0 0 0 1px var(--klun-stroke-soft-200);
3237
3237
  cursor: grab;
3238
3238
  transition: transform var(--klun-duration-fast, 0.15s) var(--klun-ease-out, ease);
3239
+ touch-action: none;
3239
3240
  }
3240
3241
  .klun-kanban__card:hover {
3241
3242
  transform: translateY(-1px);
@@ -4135,6 +4136,12 @@ body {
4135
4136
  }
4136
4137
  .klun-table__td--util {
4137
4138
  width: 40px;
4139
+ cursor: grab;
4140
+ user-select: none;
4141
+ touch-action: none;
4142
+ }
4143
+ .klun-table__td--util:active {
4144
+ cursor: grabbing;
4138
4145
  }
4139
4146
  .klun-table__td--nowrap {
4140
4147
  white-space: nowrap;
@@ -4170,13 +4177,10 @@ body {
4170
4177
  cursor: pointer;
4171
4178
  }
4172
4179
  .klun-table__row--dragging {
4173
- opacity: 0.5;
4174
- }
4175
- .klun-table__row--dropover {
4176
- box-shadow: inset 0 2px 0 var(--klun-primary-base);
4177
- }
4178
- .klun-table__row--dropover-after {
4179
- box-shadow: inset 0 -2px 0 var(--klun-primary-base);
4180
+ position: relative;
4181
+ z-index: 2;
4182
+ background: var(--klun-bg-white-0);
4183
+ box-shadow: var(--klun-shadow-lg);
4180
4184
  }
4181
4185
  .klun-table__row--status-success {
4182
4186
  background: var(--klun-state-success-lighter, var(--klun-green-50));