@citygross/components 0.7.211 → 0.7.213

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.
@@ -29,6 +29,7 @@ export declare type TBaseSmallButton = Omit<TButton, 'size' | 'flexReverse' | 'f
29
29
  width?: number;
30
30
  height?: number;
31
31
  color?: string;
32
+ opacity?: string;
32
33
  border?: string;
33
34
  shadow?: boolean;
34
35
  };
@@ -59,6 +60,7 @@ export declare const BaseIconButton: import("styled-components").StyledComponent
59
60
  width?: number | undefined;
60
61
  height?: number | undefined;
61
62
  color?: string | undefined;
63
+ opacity?: string | undefined;
62
64
  border?: string | undefined;
63
65
  shadow?: boolean | undefined;
64
66
  }, never>;
@@ -66,6 +68,7 @@ export declare const BasePaginationButton: import("styled-components").StyledCom
66
68
  width?: number | undefined;
67
69
  height?: number | undefined;
68
70
  color?: string | undefined;
71
+ opacity?: string | undefined;
69
72
  border?: string | undefined;
70
73
  shadow?: boolean | undefined;
71
74
  }, never>;
@@ -78,6 +81,7 @@ export declare const NavButton: import("styled-components").StyledComponent<"but
78
81
  width?: number | undefined;
79
82
  height?: number | undefined;
80
83
  color?: string | undefined;
84
+ opacity?: string | undefined;
81
85
  border?: string | undefined;
82
86
  shadow?: boolean | undefined;
83
87
  } & TNavButton, never>;
@@ -7,5 +7,6 @@ export declare type TIconButton = styles.TBaseSmallButton & {
7
7
  buttonBadge?: string;
8
8
  badgeBackground?: string;
9
9
  tabIndex?: number;
10
+ opacity?: string;
10
11
  };
11
- export declare function IconButton({ color, height, icon, isDisabled, loading, noWrap, onClick, border, shadow, width, buttonBadge, badgeBackground, tabIndex, ...props }: TIconButton): JSX.Element;
12
+ export declare function IconButton({ color, height, icon, isDisabled, loading, noWrap, onClick, border, shadow, width, buttonBadge, badgeBackground, tabIndex, opacity, ...props }: TIconButton): JSX.Element;
@@ -144,7 +144,10 @@ var BaseIconButtonCSS = styled.css(templateObject_11 || (templateObject_11 = _ts
144
144
  ? "box-shadow: inset 0px 0px 0px 1px ".concat(props.border)
145
145
  : '';
146
146
  }, function (props) { var _a, _b; return !props.noShadow && ((_b = (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.boxShadow) === null || _b === void 0 ? void 0 : _b.iconButtonHover); });
147
- var BaseIconButton = styled__default["default"](BaseButton)(templateObject_12 || (templateObject_12 = _tslib.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), BaseIconButtonCSS);
147
+ var BaseIconButton = styled__default["default"](BaseButton)(templateObject_12 || (templateObject_12 = _tslib.__makeTemplateObject(["\n ", "\n ", ";\n"], ["\n ", "\n ", ";\n"])), BaseIconButtonCSS, function (_a) {
148
+ var opacity = _a.opacity;
149
+ return opacity && "opacity: ".concat(opacity);
150
+ });
148
151
  var BasePaginationButton = styled__default["default"](BaseButton)(templateObject_13 || (templateObject_13 = _tslib.__makeTemplateObject(["\n height: ", "px;\n width: ", "px;\n min-width: ", "px;\n text-align: center;\n ", ";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n"], ["\n height: ", "px;\n width: ", "px;\n min-width: ", "px;\n text-align: center;\n ", ";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n"])), function (props) { return props.height || 36; }, function (props) { return props.width || 36; }, function (props) { return props.width || 36; }, function (props) {
149
152
  var _a, _b, _c;
150
153
  return props.color !== ((_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.white)
@@ -1 +1 @@
1
- {"version":3,"file":"Button.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Button.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -12,8 +12,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
12
12
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
13
 
14
14
  function IconButton(_a) {
15
- var _b = _a.color, color = _b === void 0 ? 'darkest' : _b, height = _a.height, icon = _a.icon, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, border = _a.border, shadow = _a.shadow, width = _a.width, buttonBadge = _a.buttonBadge, badgeBackground = _a.badgeBackground, tabIndex = _a.tabIndex, props = _tslib.__rest(_a, ["color", "height", "icon", "isDisabled", "loading", "noWrap", "onClick", "border", "shadow", "width", "buttonBadge", "badgeBackground", "tabIndex"]);
16
- return (React__default["default"].createElement(Button_styles.BaseIconButton, _tslib.__assign({ tabIndex: tabIndex, color: designTokens.theme && designTokens.theme.palette ? designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette[color] : '#333333', height: height, icon: icon, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, border: border, shadow: shadow }, props),
15
+ var _b = _a.color, color = _b === void 0 ? 'darkest' : _b, height = _a.height, icon = _a.icon, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, border = _a.border, shadow = _a.shadow, width = _a.width, buttonBadge = _a.buttonBadge, badgeBackground = _a.badgeBackground, tabIndex = _a.tabIndex, opacity = _a.opacity, props = _tslib.__rest(_a, ["color", "height", "icon", "isDisabled", "loading", "noWrap", "onClick", "border", "shadow", "width", "buttonBadge", "badgeBackground", "tabIndex", "opacity"]);
16
+ return (React__default["default"].createElement(Button_styles.BaseIconButton, _tslib.__assign({ tabIndex: tabIndex, color: designTokens.theme && designTokens.theme.palette ? designTokens.theme === null || designTokens.theme === void 0 ? void 0 : designTokens.theme.palette[color] : '#333333', height: height, icon: icon, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, opacity: opacity, border: border, shadow: shadow }, props),
17
17
  loading && (React__default["default"].createElement(Button_styles.Loading, null,
18
18
  React__default["default"].createElement(Button_styles.LoadingContainer, null,
19
19
  React__default["default"].createElement(Button_styles.LoadingSpinner, null)))),
@@ -38,6 +38,11 @@ var Slider = function (_a) {
38
38
  });
39
39
  return sections;
40
40
  }, [slotsLength, resizeSlides]);
41
+ React.useEffect(function () {
42
+ var _a;
43
+ if (initialSlot && (ref === null || ref === void 0 ? void 0 : ref.current))
44
+ (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.slickGoTo(initialSlot);
45
+ }, [initialSlot, ref === null || ref === void 0 ? void 0 : ref.current]);
41
46
  var settings = {
42
47
  speed: 500,
43
48
  slidesToShow: defaultSlides,
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Slider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -136,7 +136,10 @@ var BaseIconButtonCSS = css(templateObject_11 || (templateObject_11 = __makeTemp
136
136
  ? "box-shadow: inset 0px 0px 0px 1px ".concat(props.border)
137
137
  : '';
138
138
  }, function (props) { var _a, _b; return !props.noShadow && ((_b = (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.boxShadow) === null || _b === void 0 ? void 0 : _b.iconButtonHover); });
139
- var BaseIconButton = styled(BaseButton)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), BaseIconButtonCSS);
139
+ var BaseIconButton = styled(BaseButton)(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n ", "\n ", ";\n"], ["\n ", "\n ", ";\n"])), BaseIconButtonCSS, function (_a) {
140
+ var opacity = _a.opacity;
141
+ return opacity && "opacity: ".concat(opacity);
142
+ });
140
143
  var BasePaginationButton = styled(BaseButton)(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n height: ", "px;\n width: ", "px;\n min-width: ", "px;\n text-align: center;\n ", ";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n"], ["\n height: ", "px;\n width: ", "px;\n min-width: ", "px;\n text-align: center;\n ", ";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n"])), function (props) { return props.height || 36; }, function (props) { return props.width || 36; }, function (props) { return props.width || 36; }, function (props) {
141
144
  var _a, _b, _c;
142
145
  return props.color !== ((_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.white)
@@ -1 +1 @@
1
- {"version":3,"file":"Button.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Button.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -4,8 +4,8 @@ import { theme } from '@citygross/design-tokens';
4
4
  import { BaseIconButton, Loading, LoadingContainer, LoadingSpinner, ButtonBadge } from './Button.styles.js';
5
5
 
6
6
  function IconButton(_a) {
7
- var _b = _a.color, color = _b === void 0 ? 'darkest' : _b, height = _a.height, icon = _a.icon, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, border = _a.border, shadow = _a.shadow, width = _a.width, buttonBadge = _a.buttonBadge, badgeBackground = _a.badgeBackground, tabIndex = _a.tabIndex, props = __rest(_a, ["color", "height", "icon", "isDisabled", "loading", "noWrap", "onClick", "border", "shadow", "width", "buttonBadge", "badgeBackground", "tabIndex"]);
8
- return (React.createElement(BaseIconButton, __assign({ tabIndex: tabIndex, color: theme && theme.palette ? theme === null || theme === void 0 ? void 0 : theme.palette[color] : '#333333', height: height, icon: icon, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, border: border, shadow: shadow }, props),
7
+ var _b = _a.color, color = _b === void 0 ? 'darkest' : _b, height = _a.height, icon = _a.icon, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, border = _a.border, shadow = _a.shadow, width = _a.width, buttonBadge = _a.buttonBadge, badgeBackground = _a.badgeBackground, tabIndex = _a.tabIndex, opacity = _a.opacity, props = __rest(_a, ["color", "height", "icon", "isDisabled", "loading", "noWrap", "onClick", "border", "shadow", "width", "buttonBadge", "badgeBackground", "tabIndex", "opacity"]);
8
+ return (React.createElement(BaseIconButton, __assign({ tabIndex: tabIndex, color: theme && theme.palette ? theme === null || theme === void 0 ? void 0 : theme.palette[color] : '#333333', height: height, icon: icon, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: function (e) { return onClick && onClick(e); }, width: width, opacity: opacity, border: border, shadow: shadow }, props),
9
9
  loading && (React.createElement(Loading, null,
10
10
  React.createElement(LoadingContainer, null,
11
11
  React.createElement(LoadingSpinner, null)))),
@@ -1,5 +1,5 @@
1
1
  import { __assign } from '../../../../_virtual/_tslib.js';
2
- import React, { useState, useRef, useMemo } from 'react';
2
+ import React, { useState, useRef, useMemo, useEffect } from 'react';
3
3
  import { Container, LeftIconButtonContainer, RightIconButtonContainer } from './Slider.styles.js';
4
4
  import { IconButton } from '../Button/IconButton.js';
5
5
  import { Icons } from '@citygross/icons';
@@ -29,6 +29,11 @@ var Slider = function (_a) {
29
29
  });
30
30
  return sections;
31
31
  }, [slotsLength, resizeSlides]);
32
+ useEffect(function () {
33
+ var _a;
34
+ if (initialSlot && (ref === null || ref === void 0 ? void 0 : ref.current))
35
+ (_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.slickGoTo(initialSlot);
36
+ }, [initialSlot, ref === null || ref === void 0 ? void 0 : ref.current]);
32
37
  var settings = {
33
38
  speed: 500,
34
39
  slidesToShow: defaultSlides,
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Slider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citygross/components",
3
- "version": "0.7.211",
3
+ "version": "0.7.213",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "./build/cjs/components/src/index.js",
@@ -74,5 +74,5 @@
74
74
  "react-slick": "^0.30.1",
75
75
  "slick-carousel": "^1.8.1"
76
76
  },
77
- "gitHead": "d46519d614514f303d66b6d91da301993d0a9fcc"
77
+ "gitHead": "fe2fd4bcbe7ca8626e551868f9d22f80be052ba8"
78
78
  }