@homecode/ui 4.19.2 → 4.19.3

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.
@@ -30,8 +30,8 @@ import '../Container/Container.styl.js';
30
30
  import '../DatePicker/DatePicker.styl.js';
31
31
  import 'moment';
32
32
  import '../DatePickerInput/DatePickerInput.styl.js';
33
- import '../../tools/queryParams.js';
34
33
  import '../Draggable/Draggable.styl.js';
34
+ import '../../tools/queryParams.js';
35
35
  import '../Expand/Expand.styl.js';
36
36
  import '../Form/Form.styl.js';
37
37
  import '../Form/Validator.js';
@@ -1,15 +1,15 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { Component } from 'react';
3
- import { createStore } from 'justorm/react';
4
- import cn from 'classnames';
3
+ import S from './Draggable.styl.js';
5
4
  import Time from 'timen';
5
+ import cn from 'classnames';
6
+ import { createStore } from 'justorm/react';
6
7
  import 'nanoid';
7
8
  import '../../tools/dom.js';
8
9
  import debounce from '../../tools/debounce.js';
9
10
  import 'compareq';
10
11
  import 'lodash.pick';
11
12
  import '../../tools/queryParams.js';
12
- import S from './Draggable.styl.js';
13
13
 
14
14
  class Draggable extends Component {
15
15
  store;
@@ -129,7 +129,7 @@ class Draggable extends Component {
129
129
  render() {
130
130
  const { items, className, itemClassName, renderItem, children } = this.props;
131
131
  const { draggingId, underId, underOffset } = this.store;
132
- return (jsxs("div", { className: cn(S.root, draggingId && S.dragging, className), children: [items.map(id => (jsx("div", { className: cn(S.item, itemClassName, id === draggingId && S.active), onPointerDown: this.onPointerDown, "data-id": id, children: jsx("div", { className: S.inner, style: underId === id ? { transform: underOffset } : null, children: renderItem(id, id === draggingId) }) }, id))), children] }));
132
+ return (jsxs("div", { className: cn(S.root, draggingId && S.dragging, className), children: [items.map((id, index) => (jsx("div", { className: cn(S.item, itemClassName, id === draggingId && S.active), onPointerDown: this.onPointerDown, "data-id": id, children: jsx("div", { className: S.inner, style: underId === id ? { transform: underOffset } : null, children: renderItem(id, index, id === draggingId) }) }, id))), children] }));
133
133
  }
134
134
  }
135
135
 
@@ -1,5 +1,5 @@
1
- import { Component } from 'react';
2
1
  import * as T from './Draggable.types';
2
+ import { Component } from 'react';
3
3
  export declare class Draggable extends Component<T.Props> {
4
4
  store: any;
5
5
  startPos: any;
@@ -3,7 +3,7 @@ export type Props = {
3
3
  items: string[];
4
4
  className?: string;
5
5
  itemClassName?: string;
6
- renderItem: (id: string, isActive: boolean) => ReactNode;
6
+ renderItem: (id: string, index: number, isActive: boolean) => ReactNode;
7
7
  onDragStart?: (id: string) => void;
8
8
  onDragEnd?: (id: string) => void;
9
9
  onChange: (items: string[]) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.19.2",
3
+ "version": "4.19.3",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "test": "jest",