@synerise/ds-sidebar 1.0.15 → 1.0.16

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/README.md CHANGED
@@ -47,8 +47,8 @@ import Sidebar from '@synerise/ds-sidebar'
47
47
 
48
48
  #### SidebarButton
49
49
 
50
- | Property | Description | Type | Default |
51
- | ------------ | ----------------------------- | ------------------------ | ------- |
52
- | buttonLabel | prop to show text of button | string | - |
53
- | title | prop to show title | string | - |
54
- | dataSource | data of all items in dropdown | string / MenuItemProps | - |
50
+ | Property | Description | Type | Default |
51
+ | ----------- | ----------------------------- | ---------------------- | ------- |
52
+ | buttonLabel | prop to show text of button | string | - |
53
+ | title | prop to show title | string | - |
54
+ | dataSource | data of all items in dropdown | string / MenuItemProps | - |
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { PanelProps } from '../Sidebar.types';
2
+ import { type PanelProps } from '../Sidebar.types';
3
3
  export declare const Panel: ({ header, children, id, ...props }: PanelProps) => React.JSX.Element;
4
4
  export default Panel;
@@ -3,8 +3,8 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
3
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
4
  import React, { useContext, useMemo, useRef } from 'react';
5
5
  import { useDrag, useDrop } from 'react-dnd';
6
- import Icon, { DragHandleM } from '@synerise/ds-icon';
7
6
  import { theme } from '@synerise/ds-core';
7
+ import Icon, { DragHandleM } from '@synerise/ds-icon';
8
8
  import { SidebarContext } from '../Sidebar.context';
9
9
  import * as S from '../Sidebar.styles';
10
10
  var DraggablePanel = function DraggablePanel(_ref) {
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { SidebarContextType } from './Sidebar.types';
2
+ import { type SidebarContextType } from './Sidebar.types';
3
3
  export declare const SidebarContext: React.Context<SidebarContextType | undefined>;
4
4
  export default SidebarContext;
package/dist/Sidebar.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import './style/index.less';
3
2
  import { Panel } from './Panel/Panel';
4
- import { SidebarProps } from './Sidebar.types';
3
+ import { type SidebarProps } from './Sidebar.types';
4
+ import './style/index.less';
5
5
  declare const Sidebar: React.FC<SidebarProps> & {
6
6
  Panel: typeof Panel;
7
7
  };
package/dist/Sidebar.js CHANGED
@@ -1,16 +1,16 @@
1
1
  var _excluded = ["children", "order", "onChangeOrder", "defaultActiveKey", "activeKey", "onChange"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
+ import update from 'immutability-helper';
4
5
  import React from 'react';
5
- import "./style/index.css";
6
- import { theme } from '@synerise/ds-core';
7
- import Icon, { AngleDownS, AngleUpS } from '@synerise/ds-icon';
8
6
  import { DndProvider } from 'react-dnd';
9
7
  import HTML5Backend from 'react-dnd-html5-backend';
10
- import update from 'immutability-helper';
11
- import * as S from './Sidebar.styles';
8
+ import { theme } from '@synerise/ds-core';
9
+ import Icon, { AngleDownS, AngleUpS } from '@synerise/ds-icon';
12
10
  import { Panel } from './Panel/Panel';
13
11
  import { SidebarContext } from './Sidebar.context';
12
+ import * as S from './Sidebar.styles';
13
+ import "./style/index.css";
14
14
  var prependDots = function prependDots(keys) {
15
15
  return keys && Array.isArray(keys) ? keys.map(function (el) {
16
16
  return "." + el;
@@ -76,7 +76,7 @@ var Sidebar = function Sidebar(_ref) {
76
76
  }, [antdDefaultActiveKey, antdActiveKey, isDragDrop, handleOnChange, collapseProps, children, compareByPositionOfKey]);
77
77
  return isDragDrop ?
78
78
  /*#__PURE__*/
79
- // @ts-expect-error
79
+ // @ts-expect-error Property 'children' does not exist on type 'IntrinsicAttributes & DndProviderProps<any, any>'.
80
80
  React.createElement(DndProvider, {
81
81
  backend: HTML5Backend
82
82
  }, /*#__PURE__*/React.createElement(SidebarContext.Provider, {
@@ -1,5 +1,5 @@
1
- import { CollapseProps } from 'antd/lib/collapse';
2
- import React from 'react';
1
+ import { type CollapseProps } from 'antd/lib/collapse';
2
+ import type React from 'react';
3
3
  export declare const SidebarHandle: import("styled-components").StyledComponent<"div", any, {}, never>;
4
4
  export declare const SidebarHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
5
5
  export declare const PanelWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,5 +1,5 @@
1
- import styled from 'styled-components';
2
1
  import Collapse from 'antd/lib/collapse';
2
+ import styled from 'styled-components';
3
3
  var Panel = Collapse.Panel;
4
4
  var themePaletteGrey700 = function themePaletteGrey700(props) {
5
5
  return props.theme.palette['grey-700'];
@@ -28,8 +28,6 @@ export var PanelWrapper = styled.div.withConfig({
28
28
  displayName: "Sidebarstyles__PanelWrapper",
29
29
  componentId: "sc-19um1hw-2"
30
30
  })(["position:relative;"]);
31
-
32
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
33
31
  export var AntdCollapse = styled(Collapse).withConfig({
34
32
  displayName: "Sidebarstyles__AntdCollapse",
35
33
  componentId: "sc-19um1hw-3"
@@ -1,5 +1,5 @@
1
+ import { type CollapseProps } from 'antd/lib/collapse';
1
2
  import type { ReactElement, ReactNode } from 'react';
2
- import { CollapseProps } from 'antd/lib/collapse';
3
3
  export type SidebarProps = CollapseProps & {
4
4
  children: ReactNode;
5
5
  order?: string[];
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { SidebarWithButtonProps } from './SidebarWithButton.types';
3
- declare const SidebarWithButton: ({ dataSource, buttonLabel, title }: SidebarWithButtonProps) => React.JSX.Element;
2
+ import { type SidebarWithButtonProps } from './SidebarWithButton.types';
3
+ declare const SidebarWithButton: ({ dataSource, buttonLabel, title, }: SidebarWithButtonProps) => React.JSX.Element;
4
4
  export default SidebarWithButton;
@@ -1,9 +1,9 @@
1
1
  import React, { useRef, useState } from 'react';
2
2
  import Button from '@synerise/ds-button';
3
- import Icon, { AngleDownS } from '@synerise/ds-icon';
4
3
  import Dropdown from '@synerise/ds-dropdown';
5
- import { useOnClickOutside } from '@synerise/ds-utils';
4
+ import Icon, { AngleDownS } from '@synerise/ds-icon';
6
5
  import Menu from '@synerise/ds-menu';
6
+ import { useOnClickOutside } from '@synerise/ds-utils';
7
7
  import * as S from './SidebarWithButton.styles';
8
8
  var SidebarWithButton = function SidebarWithButton(_ref) {
9
9
  var dataSource = _ref.dataSource,
@@ -1,4 +1,4 @@
1
- import { MenuItemProps } from '@synerise/ds-menu/dist/Elements/Item/MenuItem.types';
1
+ import { type MenuItemProps } from '@synerise/ds-menu/dist/Elements/Item/MenuItem.types';
2
2
  export type SidebarWithButtonProps = {
3
3
  dataSource: MenuItemProps[];
4
4
  buttonLabel?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-sidebar",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "Sidebar UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,11 +34,11 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-button": "^1.4.1",
38
- "@synerise/ds-dropdown": "^1.0.14",
39
- "@synerise/ds-icon": "^1.5.3",
40
- "@synerise/ds-menu": "^1.0.13",
41
- "@synerise/ds-utils": "^1.3.0",
37
+ "@synerise/ds-button": "^1.4.2",
38
+ "@synerise/ds-dropdown": "^1.0.15",
39
+ "@synerise/ds-icon": "^1.5.4",
40
+ "@synerise/ds-menu": "^1.0.14",
41
+ "@synerise/ds-utils": "^1.3.1",
42
42
  "dnd-core": "10.0.2",
43
43
  "immutability-helper": "^3.0.1",
44
44
  "react-dnd": "^10.0.2",
@@ -50,5 +50,5 @@
50
50
  "react": ">=16.9.0 <= 18.3.1",
51
51
  "styled-components": "^5.3.3"
52
52
  },
53
- "gitHead": "11fe1d29b2ac23e70c3d5e6ce8ae20201a619a34"
53
+ "gitHead": "4512641033ba3581a3df208143c547fcfed45895"
54
54
  }