armtek-uikit-react 1.0.61 → 1.0.63

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.
@@ -11,6 +11,10 @@
11
11
  border: none;
12
12
  text-align: left;
13
13
  cursor: pointer;
14
+ text-decoration: none;
15
+ font-size: 16px;
16
+ line-height: 1.1;
17
+ font-family: inherit;
14
18
  &:hover{
15
19
  background: $color-gray-50;
16
20
  }
@@ -0,0 +1,21 @@
1
+ @import "variables";
2
+
3
+ .skeleton{
4
+ background-color: $color-gray-100;
5
+ animation: shine-lines 1.6s infinite linear;
6
+ opacity: 0;
7
+ }
8
+ .skeleton_circle{
9
+ border-radius: 50%;
10
+ }
11
+ @keyframes shine-lines {
12
+ 0% {
13
+ opacity: 0.5;
14
+ }
15
+ 50% {
16
+ opacity: 1;
17
+ }
18
+ 100% {
19
+ opacity: 0.5;
20
+ }
21
+ }
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"armtek-uikit-react","version":"1.0.61","description":"Armtek UIKit for React","repository":{"type":"git","url":"ssh://git@gl.corp:10022/int/uikit/uikit_react.git"},"author":"","license":"ISC","dependencies":{"build":"^0.1.4","clsx":"^2.0.0","rc-slider":"^10.2.1","react":"*","react-datepicker":"^4.16.0","react-dom":"*"},"peerDependencies":{"react":"*","react-dom":"*"},"scripts":{"pub":"npm version patch && npm publish"}}
1
+ {"name":"armtek-uikit-react","version":"1.0.63","description":"Armtek UIKit for React","repository":{"type":"git","url":"ssh://git@gl.corp:10022/int/uikit/uikit_react.git"},"author":"","license":"ISC","dependencies":{"build":"^0.1.4","clsx":"^2.0.0","rc-slider":"^10.2.1","react":"*","react-datepicker":"^4.16.0","react-dom":"*"},"peerDependencies":{"react":"*","react-dom":"*"},"scripts":{"pub":"npm version patch && npm publish"}}
@@ -1,10 +1,12 @@
1
- import { ButtonHTMLAttributes, ReactNode } from 'react';
2
- export type ListItemProps = {
1
+ import { ButtonHTMLAttributes, ComponentPropsWithoutRef, ElementType, HTMLAttributes, ReactNode } from 'react';
2
+ export type OwnProps<T extends ElementType = ElementType> = {
3
3
  active?: boolean;
4
4
  checked?: boolean;
5
5
  divider?: boolean;
6
6
  endAdornment?: string | ReactNode;
7
7
  startAdornment?: string | ReactNode;
8
+ as?: T;
8
9
  } & ButtonHTMLAttributes<HTMLButtonElement>;
9
- declare const ListItem: (props: ListItemProps) => import("react/jsx-runtime").JSX.Element;
10
+ type ListItemProps<T extends ElementType = ElementType<HTMLAttributes<HTMLButtonElement>>> = OwnProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof OwnProps>;
11
+ declare function ListItem<T extends ElementType>(props: ListItemProps<T>): import("react/jsx-runtime").JSX.Element;
10
12
  export default ListItem;
@@ -9,7 +9,7 @@ const CssClasses = ['listitem', 'listitem_active', 'listitem_divider', 'listitem
9
9
 
10
10
  // const css = getCssPrefix(CssClasses)
11
11
 
12
- const ListItem = props => {
12
+ function ListItem(props) {
13
13
  let {
14
14
  children,
15
15
  className,
@@ -19,11 +19,13 @@ const ListItem = props => {
19
19
  checked,
20
20
  startAdornment,
21
21
  endAdornment,
22
+ as,
22
23
  ...restProps
23
24
  } = props;
24
25
  let withStartAdornment = checked !== undefined || !!startAdornment;
26
+ let Component = as || 'button';
25
27
  return /*#__PURE__*/_jsx(_Fragment, {
26
- children: /*#__PURE__*/_jsxs("button", {
28
+ children: /*#__PURE__*/_jsxs(Component, {
27
29
  ...restProps,
28
30
  className: clsx(css.listitem, className, {
29
31
  [css.listitem_active]: !!active || !!checked,
@@ -47,7 +49,7 @@ const ListItem = props => {
47
49
  })]
48
50
  }), /*#__PURE__*/_jsxs("span", {
49
51
  className: clsx(css.listitem__Content, {
50
- [css.listitem__content_adornment_left]: withStartAdornment
52
+ [css.listitem__Content_adornment_left]: withStartAdornment
51
53
  }),
52
54
  children: [/*#__PURE__*/_jsx("span", {
53
55
  className: clsx(css.listitemText),
@@ -65,5 +67,5 @@ const ListItem = props => {
65
67
  })]
66
68
  })
67
69
  });
68
- };
70
+ }
69
71
  export default ListItem;
@@ -0,0 +1,8 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ type SkeletonProps = {
3
+ width: number | string;
4
+ height: number | string;
5
+ circle?: boolean;
6
+ } & ComponentPropsWithoutRef<'div'>;
7
+ declare const Skeleton: (props: SkeletonProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default Skeleton;
@@ -0,0 +1,23 @@
1
+ import css from "./Skeleton.module.scss";
2
+ import clsx from 'clsx';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ const Skeleton = props => {
5
+ const {
6
+ width,
7
+ height,
8
+ className,
9
+ circle,
10
+ ...divProps
11
+ } = props;
12
+ return /*#__PURE__*/_jsx("div", {
13
+ ...divProps,
14
+ className: clsx(className, css.skeleton, {
15
+ [css.skeleton_circle]: !!circle
16
+ }),
17
+ style: {
18
+ width: typeof width === 'number' ? width + 'px' : width,
19
+ height: typeof height === 'number' ? height + 'px' : height
20
+ }
21
+ });
22
+ };
23
+ export default Skeleton;
@@ -0,0 +1 @@
1
+ @import "../../assets/Skeleton";
@@ -0,0 +1,2 @@
1
+ export { default } from './Skeleton';
2
+ export * from './Skeleton';
@@ -0,0 +1,2 @@
1
+ export { default } from "./Skeleton";
2
+ export * from "./Skeleton";