@nulogy/components 8.10.0 → 8.10.1

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.
package/dist/main.js CHANGED
@@ -16135,11 +16135,31 @@
16135
16135
  });
16136
16136
  }
16137
16137
 
16138
- var HoverText = styled__default['default'].div.withConfig({
16139
- displayName: "IconicButton__HoverText",
16138
+ var IconWrapper = styled__default['default'].span.withConfig({
16139
+ displayName: "IconicButton__IconWrapper",
16140
16140
  componentId: "cimfyu-0"
16141
16141
  })(function (_ref) {
16142
- var theme = _ref.theme;
16142
+ var theme = _ref.theme,
16143
+ size = _ref.size;
16144
+
16145
+ var _a, _b;
16146
+
16147
+ return {
16148
+ display: "inline-flex",
16149
+ flexShrink: 0,
16150
+ alignItems: "center",
16151
+ justifyContent: "center",
16152
+ borderRadius: theme.radii.circle,
16153
+ height: "calc(" + ((_a = theme.sizes[size]) !== null && _a !== void 0 ? _a : size) + " + " + theme.sizes.x1 + ")",
16154
+ width: "calc(" + ((_b = theme.sizes[size]) !== null && _b !== void 0 ? _b : size) + " + " + theme.sizes.x1 + ")",
16155
+ transition: ".2s"
16156
+ };
16157
+ });
16158
+ var HoverText = styled__default['default'].div.withConfig({
16159
+ displayName: "IconicButton__HoverText",
16160
+ componentId: "cimfyu-1"
16161
+ })(function (_ref2) {
16162
+ var theme = _ref2.theme;
16143
16163
  return {
16144
16164
  whiteSpace: "nowrap",
16145
16165
  ontSize: theme.fontSizes.small,
@@ -16154,17 +16174,17 @@
16154
16174
  });
16155
16175
  var WrapperButton$1 = styled__default['default'].button.withConfig({
16156
16176
  displayName: "IconicButton__WrapperButton",
16157
- componentId: "cimfyu-1"
16158
- })(function (_ref2) {
16159
- var _hover, _active, _hoverActive, _focus, _ref3;
16177
+ componentId: "cimfyu-2"
16178
+ })(function (_ref3) {
16179
+ var _hover, _active, _hoverActive, _focus, _ref4;
16160
16180
 
16161
- var disabled = _ref2.disabled,
16162
- hoverBackgroundColor = _ref2.hoverBackgroundColor,
16163
- theme = _ref2.theme;
16181
+ var disabled = _ref3.disabled,
16182
+ hoverBackgroundColor = _ref3.hoverBackgroundColor,
16183
+ theme = _ref3.theme;
16164
16184
 
16165
16185
  var _a;
16166
16186
 
16167
- return _ref3 = {
16187
+ return _ref4 = {
16168
16188
  background: "transparent",
16169
16189
  border: "none",
16170
16190
  position: "relative",
@@ -16172,35 +16192,32 @@
16172
16192
  alignItems: "center",
16173
16193
  padding: theme.space.half + " " + theme.space.none,
16174
16194
  cursor: disabled ? "default" : "pointer"
16175
- }, _ref3["" + Icon] = {
16176
- borderRadius: theme.radii.circle,
16177
- transition: ".2s"
16178
- }, _ref3["" + Text] = {
16195
+ }, _ref4["" + Text] = {
16179
16196
  display: "block",
16180
16197
  fontWeight: theme.fontWeights.medium,
16181
16198
  textAlign: "left"
16182
- }, _ref3["" + HoverText] = {
16199
+ }, _ref4["" + HoverText] = {
16183
16200
  opacity: "0"
16184
- }, _ref3["&:hover"] = (_hover = {}, _hover["" + Icon] = {
16201
+ }, _ref4["&:hover"] = (_hover = {}, _hover["" + IconWrapper] = {
16185
16202
  backgroundColor: (_a = theme.colors[hoverBackgroundColor]) !== null && _a !== void 0 ? _a : hoverBackgroundColor
16186
16203
  }, _hover["" + HoverText] = {
16187
16204
  opacity: "1"
16188
- }, _hover), _ref3["&:active"] = (_active = {}, _active["" + Icon] = {
16205
+ }, _hover), _ref4["&:active"] = (_active = {}, _active["" + IconWrapper] = {
16189
16206
  transform: "scale(0.875)",
16190
16207
  transition: ".2s ease-in"
16191
- }, _active), _ref3["&:disabled"] = {
16208
+ }, _active), _ref4["&:disabled"] = {
16192
16209
  opacity: ".5",
16193
- "&:hover, &:active": (_hoverActive = {}, _hoverActive["" + Icon] = {
16210
+ "&:hover, &:active": (_hoverActive = {}, _hoverActive["" + IconWrapper] = {
16194
16211
  background: "none",
16195
16212
  transform: "none"
16196
16213
  }, _hoverActive)
16197
- }, _ref3["&:focus"] = (_focus = {
16214
+ }, _ref4["&:focus"] = (_focus = {
16198
16215
  outline: "none"
16199
- }, _focus["" + Icon] = {
16216
+ }, _focus["" + IconWrapper] = {
16200
16217
  boxShadow: theme.shadows.focus
16201
16218
  }, _focus["" + HoverText] = {
16202
16219
  opacity: "1"
16203
- }, _focus), _ref3;
16220
+ }, _focus), _ref4;
16204
16221
  }, space);
16205
16222
  var IconicButton = /*#__PURE__*/React__default['default'].forwardRef(function (_a, forwardedRef) {
16206
16223
  var children = _a.children,
@@ -16216,20 +16233,22 @@
16216
16233
  tooltip = _a.tooltip,
16217
16234
  props = __rest(_a, ["children", "color", "hoverBackgroundColor", "icon", "labelHidden", "className", "iconSize", "fontSize", "tooltip"]);
16218
16235
 
16236
+ var size = iconSize || "x3";
16219
16237
  return /*#__PURE__*/React__default['default'].createElement(WrapperButton$1, Object.assign({
16220
16238
  ref: forwardedRef,
16221
16239
  "aria-label": props["aria-label"] ? props["aria-label"] : typeof children === "string" ? children : undefined,
16222
16240
  className: className,
16223
16241
  hoverBackgroundColor: hoverBackgroundColor
16224
- }, props), /*#__PURE__*/React__default['default'].createElement(Manager$2, null, /*#__PURE__*/React__default['default'].createElement(Reference$2, null, function (_ref4) {
16225
- var ref = _ref4.ref;
16226
- return /*#__PURE__*/React__default['default'].createElement(Icon, {
16242
+ }, props), /*#__PURE__*/React__default['default'].createElement(Manager$2, null, /*#__PURE__*/React__default['default'].createElement(Reference$2, null, function (_ref5) {
16243
+ var ref = _ref5.ref;
16244
+ return /*#__PURE__*/React__default['default'].createElement(IconWrapper, {
16227
16245
  ref: ref,
16228
- size: iconSize || "x4",
16246
+ size: iconSize || "x3"
16247
+ }, /*#__PURE__*/React__default['default'].createElement(Icon, {
16248
+ size: size,
16229
16249
  icon: icon,
16230
- p: "half",
16231
16250
  color: color
16232
- });
16251
+ }));
16233
16252
  }), /*#__PURE__*/React__default['default'].createElement(Popper$4, {
16234
16253
  placement: "bottom",
16235
16254
  modifiers: [{
@@ -16240,10 +16259,10 @@
16240
16259
  rootBoundary: "viewport"
16241
16260
  }
16242
16261
  }]
16243
- }, function (_ref5) {
16244
- var ref = _ref5.ref,
16245
- style = _ref5.style,
16246
- placement = _ref5.placement;
16262
+ }, function (_ref6) {
16263
+ var ref = _ref6.ref,
16264
+ style = _ref6.style,
16265
+ placement = _ref6.placement;
16247
16266
  return labelHidden || tooltip ? /*#__PURE__*/React__default['default'].createElement(HoverText, {
16248
16267
  ref: ref,
16249
16268
  style: style,
@@ -16109,11 +16109,31 @@ function Reference$2(_ref) {
16109
16109
  });
16110
16110
  }
16111
16111
 
16112
- var HoverText = styled.div.withConfig({
16113
- displayName: "IconicButton__HoverText",
16112
+ var IconWrapper = styled.span.withConfig({
16113
+ displayName: "IconicButton__IconWrapper",
16114
16114
  componentId: "cimfyu-0"
16115
16115
  })(function (_ref) {
16116
- var theme = _ref.theme;
16116
+ var theme = _ref.theme,
16117
+ size = _ref.size;
16118
+
16119
+ var _a, _b;
16120
+
16121
+ return {
16122
+ display: "inline-flex",
16123
+ flexShrink: 0,
16124
+ alignItems: "center",
16125
+ justifyContent: "center",
16126
+ borderRadius: theme.radii.circle,
16127
+ height: "calc(" + ((_a = theme.sizes[size]) !== null && _a !== void 0 ? _a : size) + " + " + theme.sizes.x1 + ")",
16128
+ width: "calc(" + ((_b = theme.sizes[size]) !== null && _b !== void 0 ? _b : size) + " + " + theme.sizes.x1 + ")",
16129
+ transition: ".2s"
16130
+ };
16131
+ });
16132
+ var HoverText = styled.div.withConfig({
16133
+ displayName: "IconicButton__HoverText",
16134
+ componentId: "cimfyu-1"
16135
+ })(function (_ref2) {
16136
+ var theme = _ref2.theme;
16117
16137
  return {
16118
16138
  whiteSpace: "nowrap",
16119
16139
  ontSize: theme.fontSizes.small,
@@ -16128,17 +16148,17 @@ var HoverText = styled.div.withConfig({
16128
16148
  });
16129
16149
  var WrapperButton$1 = styled.button.withConfig({
16130
16150
  displayName: "IconicButton__WrapperButton",
16131
- componentId: "cimfyu-1"
16132
- })(function (_ref2) {
16133
- var _hover, _active, _hoverActive, _focus, _ref3;
16151
+ componentId: "cimfyu-2"
16152
+ })(function (_ref3) {
16153
+ var _hover, _active, _hoverActive, _focus, _ref4;
16134
16154
 
16135
- var disabled = _ref2.disabled,
16136
- hoverBackgroundColor = _ref2.hoverBackgroundColor,
16137
- theme = _ref2.theme;
16155
+ var disabled = _ref3.disabled,
16156
+ hoverBackgroundColor = _ref3.hoverBackgroundColor,
16157
+ theme = _ref3.theme;
16138
16158
 
16139
16159
  var _a;
16140
16160
 
16141
- return _ref3 = {
16161
+ return _ref4 = {
16142
16162
  background: "transparent",
16143
16163
  border: "none",
16144
16164
  position: "relative",
@@ -16146,35 +16166,32 @@ var WrapperButton$1 = styled.button.withConfig({
16146
16166
  alignItems: "center",
16147
16167
  padding: theme.space.half + " " + theme.space.none,
16148
16168
  cursor: disabled ? "default" : "pointer"
16149
- }, _ref3["" + Icon] = {
16150
- borderRadius: theme.radii.circle,
16151
- transition: ".2s"
16152
- }, _ref3["" + Text] = {
16169
+ }, _ref4["" + Text] = {
16153
16170
  display: "block",
16154
16171
  fontWeight: theme.fontWeights.medium,
16155
16172
  textAlign: "left"
16156
- }, _ref3["" + HoverText] = {
16173
+ }, _ref4["" + HoverText] = {
16157
16174
  opacity: "0"
16158
- }, _ref3["&:hover"] = (_hover = {}, _hover["" + Icon] = {
16175
+ }, _ref4["&:hover"] = (_hover = {}, _hover["" + IconWrapper] = {
16159
16176
  backgroundColor: (_a = theme.colors[hoverBackgroundColor]) !== null && _a !== void 0 ? _a : hoverBackgroundColor
16160
16177
  }, _hover["" + HoverText] = {
16161
16178
  opacity: "1"
16162
- }, _hover), _ref3["&:active"] = (_active = {}, _active["" + Icon] = {
16179
+ }, _hover), _ref4["&:active"] = (_active = {}, _active["" + IconWrapper] = {
16163
16180
  transform: "scale(0.875)",
16164
16181
  transition: ".2s ease-in"
16165
- }, _active), _ref3["&:disabled"] = {
16182
+ }, _active), _ref4["&:disabled"] = {
16166
16183
  opacity: ".5",
16167
- "&:hover, &:active": (_hoverActive = {}, _hoverActive["" + Icon] = {
16184
+ "&:hover, &:active": (_hoverActive = {}, _hoverActive["" + IconWrapper] = {
16168
16185
  background: "none",
16169
16186
  transform: "none"
16170
16187
  }, _hoverActive)
16171
- }, _ref3["&:focus"] = (_focus = {
16188
+ }, _ref4["&:focus"] = (_focus = {
16172
16189
  outline: "none"
16173
- }, _focus["" + Icon] = {
16190
+ }, _focus["" + IconWrapper] = {
16174
16191
  boxShadow: theme.shadows.focus
16175
16192
  }, _focus["" + HoverText] = {
16176
16193
  opacity: "1"
16177
- }, _focus), _ref3;
16194
+ }, _focus), _ref4;
16178
16195
  }, space);
16179
16196
  var IconicButton = /*#__PURE__*/React__default.forwardRef(function (_a, forwardedRef) {
16180
16197
  var children = _a.children,
@@ -16190,20 +16207,22 @@ var IconicButton = /*#__PURE__*/React__default.forwardRef(function (_a, forwarde
16190
16207
  tooltip = _a.tooltip,
16191
16208
  props = __rest(_a, ["children", "color", "hoverBackgroundColor", "icon", "labelHidden", "className", "iconSize", "fontSize", "tooltip"]);
16192
16209
 
16210
+ var size = iconSize || "x3";
16193
16211
  return /*#__PURE__*/React__default.createElement(WrapperButton$1, Object.assign({
16194
16212
  ref: forwardedRef,
16195
16213
  "aria-label": props["aria-label"] ? props["aria-label"] : typeof children === "string" ? children : undefined,
16196
16214
  className: className,
16197
16215
  hoverBackgroundColor: hoverBackgroundColor
16198
- }, props), /*#__PURE__*/React__default.createElement(Manager$2, null, /*#__PURE__*/React__default.createElement(Reference$2, null, function (_ref4) {
16199
- var ref = _ref4.ref;
16200
- return /*#__PURE__*/React__default.createElement(Icon, {
16216
+ }, props), /*#__PURE__*/React__default.createElement(Manager$2, null, /*#__PURE__*/React__default.createElement(Reference$2, null, function (_ref5) {
16217
+ var ref = _ref5.ref;
16218
+ return /*#__PURE__*/React__default.createElement(IconWrapper, {
16201
16219
  ref: ref,
16202
- size: iconSize || "x4",
16220
+ size: iconSize || "x3"
16221
+ }, /*#__PURE__*/React__default.createElement(Icon, {
16222
+ size: size,
16203
16223
  icon: icon,
16204
- p: "half",
16205
16224
  color: color
16206
- });
16225
+ }));
16207
16226
  }), /*#__PURE__*/React__default.createElement(Popper$4, {
16208
16227
  placement: "bottom",
16209
16228
  modifiers: [{
@@ -16214,10 +16233,10 @@ var IconicButton = /*#__PURE__*/React__default.forwardRef(function (_a, forwarde
16214
16233
  rootBoundary: "viewport"
16215
16234
  }
16216
16235
  }]
16217
- }, function (_ref5) {
16218
- var ref = _ref5.ref,
16219
- style = _ref5.style,
16220
- placement = _ref5.placement;
16236
+ }, function (_ref6) {
16237
+ var ref = _ref6.ref,
16238
+ style = _ref6.style,
16239
+ placement = _ref6.placement;
16221
16240
  return labelHidden || tooltip ? /*#__PURE__*/React__default.createElement(HoverText, {
16222
16241
  ref: ref,
16223
16242
  style: style,
@@ -73,3 +73,4 @@ export declare const WithNonTextChildren: {
73
73
  };
74
74
  export declare const WithCustomHoverBackgroundThemeColor: () => JSX.Element;
75
75
  export declare const WithCustomHoverBackgroundNonThemeColor: () => JSX.Element;
76
+ export declare const WithLargerIcons: () => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nulogy/components",
3
- "version": "8.10.0",
3
+ "version": "8.10.1",
4
4
  "description": "Component library for the Nulogy Design System - http://nulogy.design",
5
5
  "private": false,
6
6
  "publishConfig": {