@hexure/ui 1.8.12 → 1.8.13

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,5 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { MenuItemProps } from '../MoreMenu/MoreMenu';
3
+ import { TagProps } from '../Tag/Tag';
3
4
  export interface PageHeaderProps {
4
5
  title?: string;
5
6
  breadcrumbs?: Array<{
@@ -21,6 +22,7 @@ export interface PageHeaderProps {
21
22
  label: string;
22
23
  menuItems: Array<MenuItemProps>;
23
24
  };
25
+ tag?: TagProps;
24
26
  }
25
27
  declare const PageHeader: FC<PageHeaderProps>;
26
28
  export default PageHeader;
package/dist/esm/index.js CHANGED
@@ -2027,7 +2027,7 @@ const Header$3 = styled.div `
2027
2027
  height: 50px;
2028
2028
  cursor: pointer;
2029
2029
  `;
2030
- const Title$1 = styled.div `
2030
+ const Title$2 = styled.div `
2031
2031
  font-size: ${FontSizes.DEFAULT};
2032
2032
  font-weight: 400;
2033
2033
  color: ${Colors.BLACK.Hex};
@@ -2039,7 +2039,7 @@ const Accordion = (_a) => {
2039
2039
  var { title, children, open, onClick } = _a, accessibleProps = __rest(_a, ["title", "children", "open", "onClick"]);
2040
2040
  return (React.createElement(React.Fragment, null,
2041
2041
  React.createElement(Header$3, Object.assign({ onClick: onClick }, accessibleProps),
2042
- React.createElement(Title$1, null, title),
2042
+ React.createElement(Title$2, null, title),
2043
2043
  React.createElement(Icon, { color: Colors.BLACK.Hex, path: open ? mdiChevronUp : mdiChevronDown, size: '24px' })),
2044
2044
  open ? children : null));
2045
2045
  };
@@ -2431,7 +2431,7 @@ const MenuItem = styled.div `
2431
2431
  }
2432
2432
  }
2433
2433
  `;
2434
- const Title = styled.span `
2434
+ const Title$1 = styled.span `
2435
2435
  font-family: Roboto;
2436
2436
  font-size: 14px;
2437
2437
  font-weight: 400;
@@ -2445,7 +2445,7 @@ const MoreMenu = (_a) => {
2445
2445
  return (React.createElement(Wrapper$e, Object.assign({ "$maxHeight": maxHeight }, accessibleProps), menuItems.map((item, i) => {
2446
2446
  return (React.createElement(MenuItem, { key: i, onClick: item.onClick },
2447
2447
  item.icon ? (React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: item.icon, size: '20px' })) : null,
2448
- React.createElement(Title, null, item.label)));
2448
+ React.createElement(Title$1, null, item.label)));
2449
2449
  })));
2450
2450
  };
2451
2451
 
@@ -3825,6 +3825,40 @@ const MultiSelect = (_a) => {
3825
3825
  };
3826
3826
 
3827
3827
  const Wrapper$5 = styled.div `
3828
+ display: inline-block;
3829
+ border-radius: 4px;
3830
+ padding: 4px 6px;
3831
+ background: ${props => Colors[props.$color].Hex};
3832
+ color: #ffffff;
3833
+ box-sizing: border-box;
3834
+ cursor: ${props => (props.$removable ? 'pointer' : 'default')};
3835
+ `;
3836
+ const Content = styled.div `
3837
+ display: flex;
3838
+ align-items: center;
3839
+ `;
3840
+ const Label$1 = styled.div `
3841
+ color: ${props => (props.$color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff')};
3842
+ font-size: ${FontSizes.SMALL};
3843
+ font-weight: 500;
3844
+ font-family: ${FontStyles.DEFAULT};
3845
+ line-height: 1.2em;
3846
+ `;
3847
+ const Remove = styled.div `
3848
+ margin-left: 10px;
3849
+ display: flex;
3850
+ align-items: center;
3851
+ `;
3852
+ const Tag = (_a) => {
3853
+ var { children, color = 'PRIMARY', removable, onClick } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick"]);
3854
+ return (React.createElement(Wrapper$5, Object.assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps),
3855
+ React.createElement(Content, null,
3856
+ React.createElement(Label$1, { "$color": color }, children),
3857
+ removable ? (React.createElement(Remove, null,
3858
+ React.createElement(Icon, { color: color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff', path: mdiClose, size: '15px' }))) : null)));
3859
+ };
3860
+
3861
+ const Wrapper$4 = styled.div `
3828
3862
  display: flex;
3829
3863
  padding: 16px 30px;
3830
3864
  align-items: center;
@@ -3832,6 +3866,11 @@ const Wrapper$5 = styled.div `
3832
3866
  align-self: stretch;
3833
3867
  border-bottom: 1px solid ${Colors.LIGHT_GRAY.Hex};
3834
3868
  `;
3869
+ const Title = styled.div `
3870
+ display: flex;
3871
+ align-items: center;
3872
+ gap: 20px;
3873
+ `;
3835
3874
  const Info = styled.div `
3836
3875
  display: flex;
3837
3876
  flex-direction: column;
@@ -3849,11 +3888,13 @@ const Actions = styled.div `
3849
3888
  align-items: center;
3850
3889
  gap: 8px;
3851
3890
  `;
3852
- const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu }) => {
3891
+ const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu, tag }) => {
3853
3892
  const { format = 'primary', menuItems = [], label = '', } = buttonMenu || {};
3854
- return (React.createElement(Wrapper$5, null,
3893
+ return (React.createElement(Wrapper$4, null,
3855
3894
  React.createElement(Info, null,
3856
- React.createElement(Heading, { type: 'secondary' }, title),
3895
+ React.createElement(Title, null,
3896
+ React.createElement(Heading, { type: 'secondary' }, title),
3897
+ tag ? React.createElement(Tag, Object.assign({}, tag)) : null),
3857
3898
  breadcrumbs ? (React.createElement(Breadcrumbs, null, breadcrumbs.map((crumb, i) => {
3858
3899
  return (React.createElement(React.Fragment, { key: i },
3859
3900
  crumb.onClick ? (React.createElement(Link, { onClick: crumb.onClick, small: true }, crumb.label)) : (React.createElement(Copy, { type: 'small' }, crumb.label)),
@@ -3867,7 +3908,7 @@ const PageHeader = ({ title = '', breadcrumbs, actions, buttonMenu }) => {
3867
3908
  menuItems.length ? (React.createElement(ButtonMenu, { format: format, label: label, menuItems: menuItems, small: true })) : null)) : null));
3868
3909
  };
3869
3910
 
3870
- const Wrapper$4 = styled.nav `
3911
+ const Wrapper$3 = styled.nav `
3871
3912
  box-sizing: border-box;
3872
3913
  display: flex;
3873
3914
  align-items: center;
@@ -3893,7 +3934,7 @@ const Pagination = (_a) => {
3893
3934
  onClick(new_page);
3894
3935
  }
3895
3936
  };
3896
- return (React.createElement(Wrapper$4, Object.assign({}, accessibleProps),
3937
+ return (React.createElement(Wrapper$3, Object.assign({}, accessibleProps),
3897
3938
  React.createElement(Button, { disabled: is_first_page, icon: mdiChevronLeft, onClick: handlePrevClick, small: true }),
3898
3939
  React.createElement(Select, { onChange: handlePageChange, options: Array.from(Array(pageCount).keys(), p => p + 1).map(p => ({
3899
3940
  label: `Page ${p}`,
@@ -3902,7 +3943,7 @@ const Pagination = (_a) => {
3902
3943
  React.createElement(Button, { disabled: is_last_page, icon: mdiChevronRight, onClick: handleNextClick, small: true })));
3903
3944
  };
3904
3945
 
3905
- const Wrapper$3 = styled.label `
3946
+ const Wrapper$2 = styled.label `
3906
3947
  padding: 4px 0;
3907
3948
  cursor: ${props => (props.$disabled ? 'default' : 'pointer')};
3908
3949
  display: flex;
@@ -3916,7 +3957,7 @@ const Input = styled.input `
3916
3957
  margin: 0px 0px 2px 0px;
3917
3958
  line-height: 1.1em;
3918
3959
  `;
3919
- const Label$1 = styled.span `
3960
+ const Label = styled.span `
3920
3961
  font-family: ${FontStyles.DEFAULT};
3921
3962
  font-size: ${FontSizes.DEFAULT};
3922
3963
  font-weight: 400;
@@ -3926,9 +3967,9 @@ const Label$1 = styled.span `
3926
3967
  `;
3927
3968
  const Radio = (_a) => {
3928
3969
  var { children, disabled, checked, onChange, value } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value"]);
3929
- return (React.createElement(Wrapper$3, Object.assign({ "$disabled": disabled }, accessibleProps),
3970
+ return (React.createElement(Wrapper$2, Object.assign({ "$disabled": disabled }, accessibleProps),
3930
3971
  React.createElement(Input, { checked: checked, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, type: 'radio', value: value }),
3931
- React.createElement(Label$1, null, children)));
3972
+ React.createElement(Label, null, children)));
3932
3973
  };
3933
3974
 
3934
3975
  const RadioList = (_a) => {
@@ -4010,7 +4051,7 @@ const Table = (_a) => {
4010
4051
  }))) : null));
4011
4052
  };
4012
4053
 
4013
- const Wrapper$2 = styled.div `
4054
+ const Wrapper$1 = styled.div `
4014
4055
  display: flex;
4015
4056
  box-sizing: border-box;
4016
4057
  align-items: flex-end;
@@ -4059,7 +4100,7 @@ const Badge = styled.div `
4059
4100
  `;
4060
4101
  const Tabs = (_a) => {
4061
4102
  var { tabs } = _a, accessibleProps = __rest(_a, ["tabs"]);
4062
- return (React.createElement(Wrapper$2, Object.assign({}, accessibleProps), tabs.map((_a, i) => {
4103
+ return (React.createElement(Wrapper$1, Object.assign({}, accessibleProps), tabs.map((_a, i) => {
4063
4104
  var { isActive, label, badgeCount, errorBadge, onClick } = _a, accessibleProps = __rest(_a, ["isActive", "label", "badgeCount", "errorBadge", "onClick"]);
4064
4105
  return (React.createElement(Tab, Object.assign({ "$isActive": isActive || false, key: i, onClick: isActive ? undefined : onClick }, accessibleProps),
4065
4106
  badgeCount ? React.createElement(Badge, { "$isError": errorBadge || false }, badgeCount) : null,
@@ -4068,40 +4109,6 @@ const Tabs = (_a) => {
4068
4109
  };
4069
4110
  Tabs.defaultProps = {};
4070
4111
 
4071
- const Wrapper$1 = styled.div `
4072
- display: inline-block;
4073
- border-radius: 4px;
4074
- padding: 4px 6px;
4075
- background: ${props => Colors[props.$color].Hex};
4076
- color: #ffffff;
4077
- box-sizing: border-box;
4078
- cursor: ${props => (props.$removable ? 'pointer' : 'default')};
4079
- `;
4080
- const Content = styled.div `
4081
- display: flex;
4082
- align-items: center;
4083
- `;
4084
- const Label = styled.div `
4085
- color: ${props => (props.$color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff')};
4086
- font-size: ${FontSizes.SMALL};
4087
- font-weight: 500;
4088
- font-family: ${FontStyles.DEFAULT};
4089
- line-height: 1.2em;
4090
- `;
4091
- const Remove = styled.div `
4092
- margin-left: 10px;
4093
- display: flex;
4094
- align-items: center;
4095
- `;
4096
- const Tag = (_a) => {
4097
- var { children, color = 'PRIMARY', removable, onClick } = _a, accessibleProps = __rest(_a, ["children", "color", "removable", "onClick"]);
4098
- return (React.createElement(Wrapper$1, Object.assign({ "$color": color, "$removable": removable, onClick: onClick }, accessibleProps),
4099
- React.createElement(Content, null,
4100
- React.createElement(Label, { "$color": color }, children),
4101
- removable ? (React.createElement(Remove, null,
4102
- React.createElement(Icon, { color: color === 'SUBTLE_GRAY' ? '#000000' : '#ffffff', path: mdiClose, size: '15px' }))) : null)));
4103
- };
4104
-
4105
4112
  const Track = styled.div `
4106
4113
  height: 24px;
4107
4114
  border-radius: 12px;