@hexure/ui 1.8.15 → 1.8.17

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/cjs/index.js CHANGED
@@ -2123,7 +2123,7 @@ const Label$5 = styled.span `
2123
2123
  font-weight: 500;
2124
2124
  line-height: 1;
2125
2125
  `;
2126
- const StyledIcon$3 = styled.span `
2126
+ const StyledIcon$4 = styled.span `
2127
2127
  margin-left: ${props => (props.$hasChildren ? '6px' : '0px')};
2128
2128
  margin-right: ${props => (props.$hasChildren ? '-4px' : '0px')};
2129
2129
  display: flex;
@@ -2152,7 +2152,7 @@ const Button = (_a) => {
2152
2152
  const has_children = children && children.length > 0;
2153
2153
  return (React.createElement(StyledButton, Object.assign({ "$disabled": disabled || loading, "$format": format, "$hasChildren": !!has_children, "$margin": margin, "$small": small, onClick: disabled || loading ? undefined : onClick, type: isForm ? 'submit' : undefined }, accessibleProps),
2154
2154
  children ? (React.createElement(Label$5, { "$format": format, "$small": small }, children)) : null,
2155
- icon && !badge ? (React.createElement(StyledIcon$3, { "$hasChildren": !!has_children },
2155
+ icon && !badge ? (React.createElement(StyledIcon$4, { "$hasChildren": !!has_children },
2156
2156
  React.createElement(Icon, { color: format ? button_type_mapping[format].content_color : '#fff', path: loading ? js.mdiLoading : icon, size: small ? '20px' : '24px', spin: loading }))) : null,
2157
2157
  badge && !icon ? (React.createElement(Badge$1, { "$format": format, "$small": small }, badge)) : null));
2158
2158
  };
@@ -2280,11 +2280,12 @@ const Wrapper$h = styled.div `
2280
2280
  box-shadow: 0px 4px 12px -6px rgba(0, 0, 0, 0.2);
2281
2281
  display: flex;
2282
2282
  align-items: flex-start;
2283
- padding: 20px;
2283
+ gap: ${({ $small }) => ($small ? '8px' : '20px')};
2284
+ padding: ${({ $small }) => ($small ? '11px' : '20px')};
2284
2285
  box-sizing: border-box;
2285
2286
  `;
2286
- const Content$4 = styled.div `
2287
- margin-left: 20px;
2287
+ const StyledIcon$3 = styled(Icon) `
2288
+ flex-shrink: 0;
2288
2289
  `;
2289
2290
  const Action$1 = styled.div `
2290
2291
  color: ${Colors.PRIMARY.Hex};
@@ -2295,7 +2296,7 @@ const Action$1 = styled.div `
2295
2296
  margin-top: 6px;
2296
2297
  `;
2297
2298
  const Alert = (_a) => {
2298
- var { action, type = 'info', title, description } = _a, accessibleProps = __rest(_a, ["action", "type", "title", "description"]);
2299
+ var { action, type = 'info', title, description, small = false } = _a, accessibleProps = __rest(_a, ["action", "type", "title", "description", "small"]);
2299
2300
  const type_mapping = {
2300
2301
  info: {
2301
2302
  color: Colors.PRIMARY.Hex,
@@ -2314,13 +2315,12 @@ const Alert = (_a) => {
2314
2315
  icon: js.mdiCheckboxMarkedCircleOutline,
2315
2316
  },
2316
2317
  };
2317
- return (React.createElement(Wrapper$h, Object.assign({}, accessibleProps, { style: { borderLeftColor: type_mapping[type].color } }),
2318
- React.createElement("div", { style: { flexShrink: 0 } },
2319
- React.createElement(Icon, { color: type_mapping[type].color, path: type_mapping[type].icon, size: '30px' })),
2320
- React.createElement(Content$4, null,
2321
- title ? (React.createElement(Heading, { bold: true, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
2322
- description ? React.createElement(Copy, { margin: '6px 0 0 0 !important' }, description) : null,
2323
- action ? React.createElement(Action$1, { onClick: action.onClick }, action.label) : null)));
2318
+ return (React.createElement(Wrapper$h, Object.assign({}, accessibleProps, { "$small": small, style: { borderLeftColor: type_mapping[type].color } }),
2319
+ React.createElement(StyledIcon$3, { color: type_mapping[type].color, path: type_mapping[type].icon, size: small ? '20px' : '30px' }),
2320
+ React.createElement("div", null,
2321
+ title && !small ? (React.createElement(Heading, { bold: true, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
2322
+ description ? (React.createElement(Copy, { margin: small ? '' : '6px 0 0 0 !important' }, description)) : null,
2323
+ action && !small ? React.createElement(Action$1, { onClick: action.onClick }, action.label) : null)));
2324
2324
  };
2325
2325
 
2326
2326
  const Wrapper$g = styled.div `
@@ -2398,7 +2398,7 @@ const BulkActionBar = (_a) => {
2398
2398
  selectedCount,
2399
2399
  " Selected"),
2400
2400
  onClear ? React.createElement(Clear, { onClick: onClear }, "Clear") : null),
2401
- React.createElement(Actions$1, null, actions.map(action => (React.createElement(Button, Object.assign({}, action, { small: true })))))),
2401
+ React.createElement(Actions$1, null, actions.map((action, i) => (React.createElement(Button, Object.assign({}, action, { key: i, small: true })))))),
2402
2402
  errorMsg ? (React.createElement(Error$1, null,
2403
2403
  React.createElement(Icon, { color: Colors.RED.Hex, path: js.mdiInformationOutline, size: '20px' }),
2404
2404
  React.createElement(ErrorMsg, null, errorMsg))) : null));