glints-aries 4.1.49 → 4.1.50

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,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { BrandContainer } from './BrandStyle';
3
- declare const Brand: ({ alt, asset, className, rightClickURL, onContextMenu, ...defaultProps }: Props) => JSX.Element;
3
+ declare const Brand: ({ alt, asset, className, rightClickURL, onContextMenu, variant, ...defaultProps }: Props) => JSX.Element;
4
4
  export declare type Props = React.ComponentPropsWithoutRef<typeof BrandContainer> & {
5
5
  /** There are 3 available values for asset props. The first and second one are Glints logo, but you can also custom the logo by parsing url or path of the logo. */
6
6
  asset: string;
@@ -11,5 +11,7 @@ export declare type Props = React.ComponentPropsWithoutRef<typeof BrandContainer
11
11
  rightClickURL?: string;
12
12
  /** Executes when the user right-clicks on the component */
13
13
  onContextMenu?(): void;
14
+ /** Display mode of the brand image */
15
+ variant?: 'square' | 'horizontal';
14
16
  };
15
17
  export default Brand;
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
- var _excluded = ["alt", "asset", "className", "rightClickURL", "onContextMenu"];
3
+ var _excluded = ["alt", "asset", "className", "rightClickURL", "onContextMenu", "variant"];
4
4
  import * as React from 'react';
5
5
  import classNames from 'classnames';
6
6
  import { BrandContainer, BrandImage } from './BrandStyle';
@@ -24,6 +24,8 @@ var Brand = function Brand(_ref) {
24
24
  className = _ref.className,
25
25
  rightClickURL = _ref.rightClickURL,
26
26
  onContextMenu = _ref.onContextMenu,
27
+ _ref$variant = _ref.variant,
28
+ variant = _ref$variant === void 0 ? 'horizontal' : _ref$variant,
27
29
  defaultProps = _objectWithoutPropertiesLoose(_ref, _excluded);
28
30
  var handleRightClick = function handleRightClick(e) {
29
31
  if (rightClickURL) {
@@ -71,7 +73,8 @@ var Brand = function Brand(_ref) {
71
73
  className: "brand-image",
72
74
  src: srcAsset,
73
75
  alt: alt,
74
- tabIndex: -1
76
+ tabIndex: -1,
77
+ $variant: variant
75
78
  }));
76
79
  };
77
80
  export default Brand;
@@ -1,2 +1,4 @@
1
1
  export declare const BrandContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const BrandImage: import("styled-components").StyledComponent<"img", any, {}, never>;
2
+ export declare const BrandImage: import("styled-components").StyledComponent<"img", any, {
3
+ $variant?: 'square' | 'horizontal';
4
+ }, never>;
@@ -6,4 +6,7 @@ export var BrandContainer = styled.div.withConfig({
6
6
  export var BrandImage = styled.img.withConfig({
7
7
  displayName: "BrandStyle__BrandImage",
8
8
  componentId: "sc-xckggx-1"
9
- })(["object-fit:contain;width:3em;height:3em;outline:none;"]);
9
+ })(["object-fit:contain;width:", ";height:3em;outline:none;"], function (_ref) {
10
+ var $variant = _ref.$variant;
11
+ return $variant === 'square' ? '3em' : '5em';
12
+ });
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { BrandContainer } from './BrandStyle';
3
- declare const Brand: ({ alt, asset, className, rightClickURL, onContextMenu, ...defaultProps }: Props) => JSX.Element;
3
+ declare const Brand: ({ alt, asset, className, rightClickURL, onContextMenu, variant, ...defaultProps }: Props) => JSX.Element;
4
4
  export declare type Props = React.ComponentPropsWithoutRef<typeof BrandContainer> & {
5
5
  /** There are 3 available values for asset props. The first and second one are Glints logo, but you can also custom the logo by parsing url or path of the logo. */
6
6
  asset: string;
@@ -11,5 +11,7 @@ export declare type Props = React.ComponentPropsWithoutRef<typeof BrandContainer
11
11
  rightClickURL?: string;
12
12
  /** Executes when the user right-clicks on the component */
13
13
  onContextMenu?(): void;
14
+ /** Display mode of the brand image */
15
+ variant?: 'square' | 'horizontal';
14
16
  };
15
17
  export default Brand;
@@ -20,7 +20,7 @@ var _glintsTaplokerLogoBlack = _interopRequireDefault(require("../../../assets/i
20
20
  var _glintsTaplokerLogoWhite = _interopRequireDefault(require("../../../assets/image/glints-taploker-logo-white.svg"));
21
21
  var _glintsTapjobsLogoBlack = _interopRequireDefault(require("../../../assets/image/glints-tapjobs-logo-black.svg"));
22
22
  var _glintsTapjobsLogoWhite = _interopRequireDefault(require("../../../assets/image/glints-tapjobs-logo-white.svg"));
23
- var _excluded = ["alt", "asset", "className", "rightClickURL", "onContextMenu"];
23
+ var _excluded = ["alt", "asset", "className", "rightClickURL", "onContextMenu", "variant"];
24
24
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
25
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
26
26
  var Brand = function Brand(_ref) {
@@ -29,6 +29,8 @@ var Brand = function Brand(_ref) {
29
29
  className = _ref.className,
30
30
  rightClickURL = _ref.rightClickURL,
31
31
  onContextMenu = _ref.onContextMenu,
32
+ _ref$variant = _ref.variant,
33
+ variant = _ref$variant === void 0 ? 'horizontal' : _ref$variant,
32
34
  defaultProps = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
33
35
  var handleRightClick = function handleRightClick(e) {
34
36
  if (rightClickURL) {
@@ -76,7 +78,8 @@ var Brand = function Brand(_ref) {
76
78
  className: "brand-image",
77
79
  src: srcAsset,
78
80
  alt: alt,
79
- tabIndex: -1
81
+ tabIndex: -1,
82
+ $variant: variant
80
83
  }));
81
84
  };
82
85
  var _default = Brand;
@@ -1,2 +1,4 @@
1
1
  export declare const BrandContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const BrandImage: import("styled-components").StyledComponent<"img", any, {}, never>;
2
+ export declare const BrandImage: import("styled-components").StyledComponent<"img", any, {
3
+ $variant?: 'square' | 'horizontal';
4
+ }, never>;
@@ -12,5 +12,8 @@ exports.BrandContainer = BrandContainer;
12
12
  var BrandImage = _styledComponents["default"].img.withConfig({
13
13
  displayName: "BrandStyle__BrandImage",
14
14
  componentId: "sc-xckggx-1"
15
- })(["object-fit:contain;width:3em;height:3em;outline:none;"]);
15
+ })(["object-fit:contain;width:", ";height:3em;outline:none;"], function (_ref) {
16
+ var $variant = _ref.$variant;
17
+ return $variant === 'square' ? '3em' : '5em';
18
+ });
16
19
  exports.BrandImage = BrandImage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glints-aries",
3
- "version": "4.1.49",
3
+ "version": "4.1.50",
4
4
  "description": "Glints ui-kit for frontend",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",