armtek-uikit-react 1.0.80 → 1.0.82

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.
@@ -1,12 +1,57 @@
1
1
  @import "variables";
2
2
 
3
+ .Accordion_variant_section {
4
+ & + .Accordion_variant_section{
5
+ border-top: 1px solid var(--color-gray-300)
6
+ }
7
+ }
8
+
3
9
  .AccordionHead{
4
10
  position: relative;
5
11
  padding-right: 40px;
6
12
  }
13
+
14
+ .AccordionBody *:last-child{
15
+ margin-bottom: 0;
16
+ }
17
+ .AccordionBody *:first-child{
18
+ margin-top: 0;
19
+ }
20
+ .Accordion_size_large{
21
+ //padding: calc(var(--size-step) * 3) var(--size-step);
22
+ }
7
23
  .AccordionToggle{
8
24
  position: absolute;
9
25
  right: var(--size-step);
10
26
  top:50%;
11
27
  transform: translateY(-50%);
28
+ }
29
+ .Accordion_variant_alert{
30
+ padding-left: calc(var(--size-step) * 2);
31
+ border-left: 5px solid transparent;
32
+ }
33
+ .Accordion_color_primary{
34
+ border-color: var(--color-primary);
35
+ }
36
+ .Accordion_color_secondary{
37
+ border-color: var(--color-secondary);
38
+ }
39
+ .Accordion_color_neutral{
40
+ border-color: var(--color-neutral);
41
+ }
42
+ .Accordion_color_success{
43
+ border-color: var(--color-success);
44
+ }
45
+ .Accordion_color_error{
46
+ border-color: var(--color-error);
47
+ }
48
+ .Accordion_color_warning{
49
+ border-color: var(--color-warning);
50
+ }
51
+ .Accordion_color_info{
52
+ border-color: var(--color-info);
53
+ }
54
+ .AccordionTitle_variant_alert,
55
+ .AccordionTitle_variant_section{
56
+ font-weight: 700;
12
57
  }
@@ -18,6 +18,9 @@
18
18
  &:disabled{
19
19
  cursor: initial;
20
20
  }
21
+ &_fullWidth{
22
+ width: 100%;
23
+ }
21
24
  }
22
25
  .button__iconWrapper{
23
26
  position: absolute;
@@ -82,7 +82,7 @@
82
82
  }
83
83
  }
84
84
  .textfield_error{
85
- border-color: $color-error-dark;
85
+ border-color: var(--color-error-dark) !important;
86
86
  }
87
87
 
88
88
  .textfield__label_small{
package/assets/global.css CHANGED
@@ -527,7 +527,7 @@ body{
527
527
  .p-6{padding:calc(var(--size-step) * 6)}
528
528
 
529
529
  .px-0{padding-left:0;padding-right:0}
530
- .px-1{padding-left:var(--size-step);margin-right:var(--size-step)}
530
+ .px-1{padding-left:var(--size-step);padding-bottom:var(--size-step)}
531
531
  .px-2{padding-left:calc(var(--size-step) * 2);padding-right:calc(var(--size-step) * 2)}
532
532
  .px-3{padding-left:calc(var(--size-step) * 3);padding-right:calc(var(--size-step) * 3)}
533
533
  .px-4{padding-left:calc(var(--size-step) * 4);padding-right:calc(var(--size-step) * 4)}
@@ -535,7 +535,7 @@ body{
535
535
  .px-6{padding-left:calc(var(--size-step) * 6);padding-right:calc(var(--size-step) * 6)}
536
536
 
537
537
  .py-0{padding-top:0;padding-bottom:0}
538
- .py-1{padding-top:var(--size-step);margin-right:var(--size-step)}
538
+ .py-1{padding-top:var(--size-step);padding-bottom:var(--size-step)}
539
539
  .py-2{padding-top:calc(var(--size-step) * 2);padding-bottom:calc(var(--size-step) * 2)}
540
540
  .py-3{padding-top:calc(var(--size-step) * 3);padding-bottom:calc(var(--size-step) * 3)}
541
541
  .py-4{padding-top:calc(var(--size-step) * 4);padding-bottom:calc(var(--size-step) * 4)}
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"armtek-uikit-react","version":"1.0.80","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":"*","react-transition-group":"^4.4.5"},"peerDependencies":{"react":"*","react-dom":"*"},"scripts":{"pub":"npm version patch && npm publish"}}
1
+ {"name":"armtek-uikit-react","version":"1.0.82","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":"*","react-transition-group":"^4.4.5"},"peerDependencies":{"react":"*","react-dom":"*"},"scripts":{"pub":"npm version patch && npm publish"}}
@@ -1,5 +1,6 @@
1
1
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  import { DropDownProps } from '../Dropdown';
3
+ import { ColorStatusType, ColorType, SizeType } from '../../types/theme';
3
4
  type ClassNames = 'AccordionHead' | 'AccordionBody' | 'AccordionTitle' | 'AccordionToggle';
4
5
  type OwnProps = {
5
6
  title: string | ReactNode;
@@ -9,6 +10,9 @@ type OwnProps = {
9
10
  onChange?: () => void;
10
11
  transitionProps?: DropDownProps['transitionProps'];
11
12
  triggerOnIcon?: boolean;
13
+ variant?: 'alert' | 'contained' | 'blockquote' | 'section';
14
+ color?: ColorType | ColorStatusType;
15
+ size?: SizeType;
12
16
  };
13
17
  export type AccordionProps = OwnProps & Omit<ComponentPropsWithoutRef<'div'>, keyof OwnProps>;
14
18
  declare const Accordion: (props: AccordionProps) => import("react/jsx-runtime").JSX.Element;
@@ -19,6 +19,9 @@ const Accordion = props => {
19
19
  onChange,
20
20
  triggerOnIcon,
21
21
  transitionProps,
22
+ variant,
23
+ color,
24
+ size,
22
25
  ...divPops
23
26
  } = props;
24
27
  const [isExpanded, setIsExpanded] = useState(!!defaultExpanded);
@@ -47,12 +50,25 @@ const Accordion = props => {
47
50
  return /*#__PURE__*/_jsx(_Fragment, {
48
51
  children: /*#__PURE__*/_jsxs("div", {
49
52
  ...divPops,
50
- className: clsx(css.Accordion, className),
53
+ className: clsx(css.Accordion, className, {
54
+ [css['Accordion_size_' + size]]: !!size,
55
+ [css['Accordion_variant_' + variant]]: !!variant,
56
+ [css['Accordion_color_' + color]]: !!color
57
+ }),
51
58
  children: [/*#__PURE__*/_jsxs("div", {
52
- className: clsx(css.AccordionHead, classNames == null ? void 0 : classNames.AccordionHead),
59
+ className: clsx(css.AccordionHead, classNames == null ? void 0 : classNames.AccordionHead, {
60
+ [css['AccordionHead_variant_' + variant]]: !!variant,
61
+ [css['AccordionHead_color_' + color]]: !!color,
62
+ 'py-1': size === 'small',
63
+ 'py-2': size === 'medium',
64
+ 'py-3': size === 'large',
65
+ 'py-4': size === 'extraLarge'
66
+ }),
53
67
  onClick: handleHeadClick,
54
68
  children: [/*#__PURE__*/_jsx("div", {
55
- className: clsx(classNames == null ? void 0 : classNames.AccordionTitle),
69
+ className: clsx(classNames == null ? void 0 : classNames.AccordionTitle, {
70
+ [css['AccordionTitle_variant_' + variant]]: !!variant
71
+ }),
56
72
  children: title
57
73
  }), /*#__PURE__*/_jsx("div", {
58
74
  className: clsx(classNames == null ? void 0 : classNames.AccordionTitle, css.AccordionToggle),
@@ -68,7 +84,10 @@ const Accordion = props => {
68
84
  })
69
85
  })]
70
86
  }), /*#__PURE__*/_jsx("div", {
71
- className: clsx(classNames == null ? void 0 : classNames.AccordionBody),
87
+ className: clsx(classNames == null ? void 0 : classNames.AccordionBody, css.AccordionBody, {
88
+ [css['AccordionBody_variant_' + variant]]: !!variant,
89
+ [css['AccordionBody_color_' + color]]: !!color
90
+ }),
72
91
  children: /*#__PURE__*/_jsx(Dropdown, {
73
92
  transitionProps: {
74
93
  unmountOnExit: true,
@@ -11,6 +11,7 @@ type OwnProps<T extends ElementType = BtnType> = {
11
11
  radius?: boolean;
12
12
  asIcon?: boolean;
13
13
  theme?: ThemeType;
14
+ fullWidth?: boolean;
14
15
  as?: T;
15
16
  };
16
17
  export type ButtonProps<T extends ElementType = BtnType> = OwnProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof OwnProps<T>>;
@@ -20,6 +20,7 @@ const Button = props => {
20
20
  radius,
21
21
  asIcon,
22
22
  theme,
23
+ fullWidth,
23
24
  as,
24
25
  ...restProps
25
26
  } = props;
@@ -31,6 +32,7 @@ const Button = props => {
31
32
  [css['button_grouped_' + group]]: group,
32
33
  [css.button_radius_none]: radius === false,
33
34
  [css.button_radius_full]: radius === true,
35
+ [css.button_fullWidth]: !!fullWidth,
34
36
  [css['button_theme_' + theme]]: !!theme
35
37
  }),
36
38
  children: [startAdornment && /*#__PURE__*/_jsx("div", {
@@ -73,9 +73,9 @@ export const TextField = /*#__PURE__*/forwardRef((props, ref) => {
73
73
  focused: realFocused,
74
74
  error: error,
75
75
  multiline: multiline,
76
+ ...inputProps,
76
77
  onFocus: handleFocus,
77
- onBlur: handleBlur,
78
- ...inputProps
78
+ onBlur: handleBlur
79
79
  }), endContentExists && endContent]
80
80
  }), helperText && /*#__PURE__*/_jsx(HelperText, {
81
81
  className: css.textfield__helperText,