@synerise/ds-dropdown 1.0.14 → 1.0.15

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
@@ -14,7 +14,7 @@ Dropdown UI Component
14
14
  ### Dropdown
15
15
 
16
16
  | Property | Description | Type | Default |
17
- |-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------|
17
+ | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------- |
18
18
  | disabled | Whether the dropdown menu is disabled | boolean | - |
19
19
  | getPopupContainer | Function used to set the container of the dropdown menu. The default is to create a `div` element in `body`, you can reset it to the scrolling area and make a relative reposition. | Function(triggerNode) | `() => document.body` |
20
20
  | overlay | Dropdown menu | [Menu](/docs/components/menu) \ () => Menu | - |
@@ -1,12 +1,12 @@
1
- import { ComponentType } from 'react';
1
+ import { type DropDownProps as AntDropDownProps, type DropdownButtonProps } from 'antd/lib/dropdown';
2
+ import { type ComponentType } from 'react';
2
3
  import '@synerise/ds-core/dist/js/style';
3
- import './style/index.less';
4
- import { DropDownProps as AntDropDownProps, DropdownButtonProps } from 'antd/lib/dropdown';
5
4
  import SearchBar from '@synerise/ds-search-bar/';
6
- import BottomAction from './elements/BottomAction/BottomAction';
7
- import BackAction from './elements/BackAction/BackAction';
8
5
  import { Wrapper } from './Dropdown.styles';
6
+ import BackAction from './elements/BackAction/BackAction';
7
+ import BottomAction from './elements/BottomAction/BottomAction';
9
8
  import TextTrigger from './elements/TextTrigger/TextTrigger';
9
+ import './style/index.less';
10
10
  export type DropdownProps = AntDropDownProps & {
11
11
  destroyPopupOnHide?: boolean;
12
12
  hideOnItemClick?: string | boolean;
package/dist/Dropdown.js CHANGED
@@ -1,16 +1,16 @@
1
1
  var _excluded = ["hideOnItemClick", "placement", "dropdownRender", "visible", "open", "onVisibleChange", "onOpenChange", "overlay"];
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 React, { useState, useRef, useCallback, useEffect } from 'react';
5
- import '@synerise/ds-core/dist/js/style';
6
- import "./style/index.css";
7
4
  import AntdDropdown from 'antd/lib/dropdown';
5
+ import React, { useCallback, useEffect, useRef, useState } from 'react';
6
+ import '@synerise/ds-core/dist/js/style';
8
7
  import SearchBar from '@synerise/ds-search-bar/';
9
8
  import { getPopupContainer } from '@synerise/ds-utils';
10
- import BottomAction from './elements/BottomAction/BottomAction';
9
+ import { OverlayWrapper, Wrapper } from './Dropdown.styles';
11
10
  import BackAction from './elements/BackAction/BackAction';
12
- import { Wrapper, OverlayWrapper } from './Dropdown.styles';
11
+ import BottomAction from './elements/BottomAction/BottomAction';
13
12
  import TextTrigger from './elements/TextTrigger/TextTrigger';
13
+ import "./style/index.css";
14
14
  var topPlacements = ['topLeft', 'topRight', 'topCenter'];
15
15
  var Dropdown = function Dropdown(_ref) {
16
16
  var hideOnItemClick = _ref.hideOnItemClick,
@@ -1,6 +1,4 @@
1
1
  import styled from 'styled-components';
2
-
3
- // eslint-disable-next-line import/prefer-default-export
4
2
  export var Wrapper = styled.div.withConfig({
5
3
  displayName: "Dropdownstyles__Wrapper",
6
4
  componentId: "sc-1onktq5-0"
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { Props } from './BackAction.types';
2
+ import { type Props } from './BackAction.types';
3
3
  declare const BackAction: ({ label, onClick, tooltip, tooltipProps }: Props) => React.JSX.Element;
4
4
  export default BackAction;
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { TooltipProps } from '@synerise/ds-tooltip';
1
+ import { type ReactNode } from 'react';
2
+ import { type TooltipProps } from '@synerise/ds-tooltip';
3
3
  export type Props = {
4
4
  label: ReactNode;
5
5
  onClick: () => void;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { Props } from './BottomAction.types';
2
+ import { type Props } from './BottomAction.types';
3
3
  declare const BottomAction: ({ onClickAction, children, style, icon, ...rest }: Props) => React.JSX.Element;
4
4
  export default BottomAction;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { TextTriggerProps } from './TextTrigger.types';
2
+ import { type TextTriggerProps } from './TextTrigger.types';
3
3
  declare const TextTrigger: React.FC<TextTriggerProps>;
4
4
  export default TextTrigger;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
+ import { theme } from '@synerise/ds-core';
2
3
  import Icon, { AngleDownS } from '@synerise/ds-icon';
3
4
  import { Title } from '@synerise/ds-typography';
4
- import { theme } from '@synerise/ds-core';
5
5
  import * as S from './TextTrigger.styles';
6
6
  var TextTrigger = function TextTrigger(_ref) {
7
7
  var value = _ref.value,
@@ -1,4 +1,4 @@
1
- import { ThemeProps } from '@synerise/ds-core';
1
+ import { type ThemeProps } from '@synerise/ds-core';
2
2
  export declare const TextTrigger: import("styled-components").StyledComponent<"div", any, {
3
3
  inactiveColor: string;
4
4
  onFocus?: (() => void) | undefined;
@@ -1,5 +1,4 @@
1
1
  import styled from 'styled-components';
2
- // eslint-disable-next-line import/prefer-default-export
3
2
  export var TextTrigger = styled.div.withConfig({
4
3
  displayName: "TextTriggerstyles__TextTrigger",
5
4
  componentId: "sc-4ebj2t-0"
@@ -23,6 +22,6 @@ export var TextTrigger = styled.div.withConfig({
23
22
  export var IconWrapper = styled.div.withConfig({
24
23
  displayName: "TextTriggerstyles__IconWrapper",
25
24
  componentId: "sc-4ebj2t-1"
26
- })(["&&&{svg{transition:transform 0.1s linear;transform:rotateZ(", ");}}"], function (props) {
25
+ })(["&&&{svg{transition:transform 0.1s linear;transform:rotateZ( ", " );}}"], function (props) {
27
26
  return props.expanded ? '180deg' : '0deg';
28
27
  });
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  export type TextTriggerProps = {
3
3
  value: string | React.ReactNode | undefined;
4
4
  inactiveColor?: string;
package/dist/index.d.ts CHANGED
@@ -1,2 +1 @@
1
- export { default } from './Dropdown';
2
- export type { DropdownProps } from './Dropdown';
1
+ export { default, type DropdownProps } from './Dropdown';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-dropdown",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Dropdown 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-divider": "^1.0.12",
38
- "@synerise/ds-icon": "^1.5.3",
39
- "@synerise/ds-search-bar": "^1.3.3",
40
- "@synerise/ds-typography": "^1.0.12",
41
- "@synerise/ds-utils": "^1.3.0"
37
+ "@synerise/ds-divider": "^1.0.13",
38
+ "@synerise/ds-icon": "^1.5.4",
39
+ "@synerise/ds-search-bar": "^1.3.4",
40
+ "@synerise/ds-typography": "^1.0.13",
41
+ "@synerise/ds-utils": "^1.3.1"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@synerise/ds-core": "*",
@@ -46,5 +46,5 @@
46
46
  "react": ">=16.9.0 <= 18.3.1",
47
47
  "styled-components": "^5.3.3"
48
48
  },
49
- "gitHead": "11fe1d29b2ac23e70c3d5e6ce8ae20201a619a34"
49
+ "gitHead": "4512641033ba3581a3df208143c547fcfed45895"
50
50
  }