@hexure/ui 1.8.14 → 1.8.16

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.
@@ -12,6 +12,8 @@ export interface AlertProps extends AccessibleProps {
12
12
  description: string;
13
13
  /** Display a link to display below the description */
14
14
  action?: ActionProps;
15
+ /** Show a condensed, smaller version of the alert. The title and action props will be ignore if this is set to true */
16
+ small?: boolean;
15
17
  }
16
18
  declare const Alert: FC<AlertProps>;
17
19
  export default Alert;
@@ -33,7 +33,7 @@ export interface InputProps extends AccessibleProps {
33
33
  /** Set the css of the wrapping div */
34
34
  style?: styleProps;
35
35
  /** Define the type of input to be displayed */
36
- type?: 'date' | 'email' | 'number' | 'password' | 'tel' | 'text' | 'url' | 'textarea' | 'search';
36
+ type?: 'date' | 'datetime-local' | 'email' | 'number' | 'password' | 'tel' | 'text' | 'url' | 'textarea' | 'search';
37
37
  /** Set the value of the input. This should be used by the parent component to control the input's value. */
38
38
  value?: string;
39
39
  }
package/dist/esm/index.js CHANGED
@@ -2121,7 +2121,7 @@ const Label$5 = styled.span `
2121
2121
  font-weight: 500;
2122
2122
  line-height: 1;
2123
2123
  `;
2124
- const StyledIcon$3 = styled.span `
2124
+ const StyledIcon$4 = styled.span `
2125
2125
  margin-left: ${props => (props.$hasChildren ? '6px' : '0px')};
2126
2126
  margin-right: ${props => (props.$hasChildren ? '-4px' : '0px')};
2127
2127
  display: flex;
@@ -2150,7 +2150,7 @@ const Button = (_a) => {
2150
2150
  const has_children = children && children.length > 0;
2151
2151
  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),
2152
2152
  children ? (React.createElement(Label$5, { "$format": format, "$small": small }, children)) : null,
2153
- icon && !badge ? (React.createElement(StyledIcon$3, { "$hasChildren": !!has_children },
2153
+ icon && !badge ? (React.createElement(StyledIcon$4, { "$hasChildren": !!has_children },
2154
2154
  React.createElement(Icon, { color: format ? button_type_mapping[format].content_color : '#fff', path: loading ? mdiLoading : icon, size: small ? '20px' : '24px', spin: loading }))) : null,
2155
2155
  badge && !icon ? (React.createElement(Badge$1, { "$format": format, "$small": small }, badge)) : null));
2156
2156
  };
@@ -2278,11 +2278,12 @@ const Wrapper$h = styled.div `
2278
2278
  box-shadow: 0px 4px 12px -6px rgba(0, 0, 0, 0.2);
2279
2279
  display: flex;
2280
2280
  align-items: flex-start;
2281
- padding: 20px;
2281
+ gap: ${({ $small }) => ($small ? '8px' : '20px')};
2282
+ padding: ${({ $small }) => ($small ? '11px' : '20px')};
2282
2283
  box-sizing: border-box;
2283
2284
  `;
2284
- const Content$4 = styled.div `
2285
- margin-left: 20px;
2285
+ const StyledIcon$3 = styled(Icon) `
2286
+ flex-shrink: 0;
2286
2287
  `;
2287
2288
  const Action$1 = styled.div `
2288
2289
  color: ${Colors.PRIMARY.Hex};
@@ -2293,7 +2294,7 @@ const Action$1 = styled.div `
2293
2294
  margin-top: 6px;
2294
2295
  `;
2295
2296
  const Alert = (_a) => {
2296
- var { action, type = 'info', title, description } = _a, accessibleProps = __rest(_a, ["action", "type", "title", "description"]);
2297
+ var { action, type = 'info', title, description, small = false } = _a, accessibleProps = __rest(_a, ["action", "type", "title", "description", "small"]);
2297
2298
  const type_mapping = {
2298
2299
  info: {
2299
2300
  color: Colors.PRIMARY.Hex,
@@ -2312,13 +2313,12 @@ const Alert = (_a) => {
2312
2313
  icon: mdiCheckboxMarkedCircleOutline,
2313
2314
  },
2314
2315
  };
2315
- return (React.createElement(Wrapper$h, Object.assign({}, accessibleProps, { style: { borderLeftColor: type_mapping[type].color } }),
2316
- React.createElement("div", { style: { flexShrink: 0 } },
2317
- React.createElement(Icon, { color: type_mapping[type].color, path: type_mapping[type].icon, size: '30px' })),
2318
- React.createElement(Content$4, null,
2319
- title ? (React.createElement(Heading, { bold: true, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
2320
- description ? React.createElement(Copy, { margin: '6px 0 0 0 !important' }, description) : null,
2321
- action ? React.createElement(Action$1, { onClick: action.onClick }, action.label) : null)));
2316
+ return (React.createElement(Wrapper$h, Object.assign({}, accessibleProps, { "$small": small, style: { borderLeftColor: type_mapping[type].color } }),
2317
+ React.createElement(StyledIcon$3, { color: type_mapping[type].color, path: type_mapping[type].icon, size: small ? '20px' : '30px' }),
2318
+ React.createElement("div", null,
2319
+ title && !small ? (React.createElement(Heading, { bold: true, margin: '2px 0 0 0', type: 'tertiary' }, title)) : null,
2320
+ description ? (React.createElement(Copy, { margin: small ? '' : '6px 0 0 0 !important' }, description)) : null,
2321
+ action && !small ? React.createElement(Action$1, { onClick: action.onClick }, action.label) : null)));
2322
2322
  };
2323
2323
 
2324
2324
  const Wrapper$g = styled.div `