@citygross/components_v2 0.0.47 → 0.0.49

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.
@@ -14,7 +14,8 @@ declare type TCgButton = {
14
14
  round?: boolean;
15
15
  className?: string;
16
16
  shouldPreventDefault?: boolean;
17
+ ariaLabel?: string;
17
18
  };
18
- declare const Button: ({ size, variant, icon, flexReverse, disabled, onClick, children, loading, fullWidth, buttonRef, round, className, shouldPreventDefault }: TCgButton) => JSX.Element;
19
+ declare const Button: ({ size, variant, icon, flexReverse, disabled, onClick, children, loading, fullWidth, buttonRef, round, className, shouldPreventDefault, ariaLabel }: TCgButton) => JSX.Element;
19
20
 
20
21
  export { Button, TCgButton };
@@ -15,12 +15,14 @@ const Button = ({
15
15
  buttonRef,
16
16
  round,
17
17
  className,
18
- shouldPreventDefault = true
18
+ shouldPreventDefault = true,
19
+ ariaLabel
19
20
  }) => {
20
21
  return /* @__PURE__ */ React.createElement(
21
22
  "button",
22
23
  {
23
24
  ref: buttonRef,
25
+ "aria-label": ariaLabel,
24
26
  className: `${button({
25
27
  buttonPadding: size,
26
28
  buttonRadius: round ? "round" : "default",
@@ -5,7 +5,8 @@ declare type TLinkButton = {
5
5
  variant?: 'primary' | 'secondary' | 'tertiary' | 'primaryInverted' | 'secondaryInverted';
6
6
  disabled?: boolean;
7
7
  onClick?: () => void;
8
+ ariaLabel?: string;
8
9
  };
9
- declare const LinkButton: ({ onClick, children, variant, disabled }: TLinkButton) => JSX.Element;
10
+ declare const LinkButton: ({ onClick, children, variant, ariaLabel, disabled }: TLinkButton) => JSX.Element;
10
11
 
11
12
  export { LinkButton, TLinkButton };
@@ -5,11 +5,13 @@ const LinkButton = ({
5
5
  onClick,
6
6
  children,
7
7
  variant,
8
+ ariaLabel,
8
9
  disabled
9
10
  }) => {
10
11
  return /* @__PURE__ */ React.createElement(
11
12
  "button",
12
13
  {
14
+ "aria-label": ariaLabel,
13
15
  className: linkStyle({ linkVariant: variant }),
14
16
  disabled,
15
17
  onClick: () => onClick && onClick()
@@ -1,8 +1,12 @@
1
1
  import React from 'react';
2
2
  import { TPaletteKeys } from '@citygross/design-tokens_v2';
3
3
 
4
+ declare enum EAnimate {
5
+ In = "in",
6
+ Out = "out"
7
+ }
4
8
  declare type TSideModal = {
5
- animate?: 'in' | 'out';
9
+ animate?: EAnimate;
6
10
  backgroundColor?: TPaletteKeys;
7
11
  children?: React.ReactNode;
8
12
  onBackdropClick: () => void;
@@ -13,4 +17,4 @@ declare type TSideModal = {
13
17
  };
14
18
  declare const SideModal: ({ animate, backgroundColor, children, onBackdropClick, overlayBackground, querySelector, slideFrom, width }: TSideModal) => React.ReactPortal;
15
19
 
16
- export { SideModal, TSideModal };
20
+ export { EAnimate, SideModal, TSideModal };
@@ -2,6 +2,11 @@ import React, { useRef } from 'react';
2
2
  import { createPortal } from 'react-dom';
3
3
  import { sideModalOverLayer, sideModal } from './SideModal.css.vanilla.js';
4
4
 
5
+ var EAnimate = /* @__PURE__ */ ((EAnimate2) => {
6
+ EAnimate2["In"] = "in";
7
+ EAnimate2["Out"] = "out";
8
+ return EAnimate2;
9
+ })(EAnimate || {});
5
10
  const SideModal = ({
6
11
  animate,
7
12
  backgroundColor = "white",
@@ -35,7 +40,7 @@ const SideModal = ({
35
40
  className: sideModal({
36
41
  backgroundColor,
37
42
  slideVariants: slideFrom,
38
- slideIn: slideFrom === "left" ? animate === "in" ? "leftIn" : "leftOut" : animate === "in" ? "rightIn" : "rightOut"
43
+ slideIn: slideFrom === "left" ? animate === "in" /* In */ ? "leftIn" : "leftOut" : animate === "in" /* In */ ? "rightIn" : "rightOut"
39
44
  }),
40
45
  style: { width }
41
46
  },
@@ -46,4 +51,4 @@ const SideModal = ({
46
51
  ) : null;
47
52
  };
48
53
 
49
- export { SideModal };
54
+ export { EAnimate, SideModal };
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@ export { BorderPosition, borderStyle, orderTable, orderTd, orderTh, orderThead,
18
18
  export { MobileOrderLine } from './components/OrderTableMobile/OrderTableMobile.js';
19
19
  export { Pagination, TPagination } from './components/Pagination/Pagination.js';
20
20
  export { RippleContainer, TRippleContainer } from './components/RippleContainer/RippleContainer.js';
21
- export { SideModal, TSideModal } from './components/SideModal/SideModal.js';
21
+ export { EAnimate, SideModal, TSideModal } from './components/SideModal/SideModal.js';
22
22
  export { Skeleton, TSkeleton } from './components/Skeleton/Skeleton.js';
23
23
  export { Spacer, TSpacer } from './components/Spacer/Spacer.js';
24
24
  export { Spinner, TSpinner } from './components/Spinner/Spinner.js';
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ export { BorderPosition, borderStyle, orderTable, orderTd, orderTh, orderThead,
18
18
  export { MobileOrderLine } from './components/OrderTableMobile/OrderTableMobile.js';
19
19
  export { Pagination } from './components/Pagination/Pagination.js';
20
20
  export { RippleContainer } from './components/RippleContainer/RippleContainer.js';
21
- export { SideModal } from './components/SideModal/SideModal.js';
21
+ export { EAnimate, SideModal } from './components/SideModal/SideModal.js';
22
22
  export { Skeleton } from './components/Skeleton/Skeleton.js';
23
23
  export { Spacer } from './components/Spacer/Spacer.js';
24
24
  export { Spinner } from './components/Spinner/Spinner.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citygross/components_v2",
3
- "version": "0.0.47",
3
+ "version": "0.0.49",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -79,5 +79,5 @@
79
79
  "react-slick": "^0.30.1",
80
80
  "slick-carousel": "^1.8.1"
81
81
  },
82
- "gitHead": "33efba573b6bbe8f8a6b5d626b0a18d7e8f3bb22"
82
+ "gitHead": "e55c66b9803f54e9bbc21b5b898d6f28919397a5"
83
83
  }