@loja-integrada/admin-components 0.12.8 → 0.13.0

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.
@@ -114,6 +114,12 @@ var ArrowRight = function ArrowRight() {
114
114
  });
115
115
  };
116
116
 
117
+ var Back = function Back() {
118
+ return React.createElement("path", {
119
+ d: "M5.5495 4.26c.282-.303.265-.777-.039-1.06-.304-.281-.778-.264-1.061.039l-3.25 3.5c-.266.289-.266.734 0 1.021l3.25 3.5c.149.159.349.24.55.24.183 0 .366-.066.511-.2.304-.282.321-.757.039-1.061L3.4695 8H13V6.5H3.4695l2.08-2.24ZM13 6.5V8c.5926-.00007 1.1679.22038 1.6206.60807.4916.42109.8001 1.01704.8599 1.66163.0599.6445-.1335 1.2871-.5393 1.7915-.4057.5044-.9918.8311-1.6342.9108l.1858 1.4976c1.0316-.1281 1.9728-.6526 2.6243-1.4626.6515-.81.9621-1.8418.866-2.8769-.0962-1.03499-.5914-1.99196-1.3809-2.66814C14.8753 6.83943 13.9516 6.49992 13 6.5Z"
120
+ });
121
+ };
122
+
117
123
  var Ban = function Ban() {
118
124
  return React.createElement("path", {
119
125
  fillRule: "evenodd",
@@ -274,6 +280,16 @@ var ExternalLink = function ExternalLink() {
274
280
  });
275
281
  };
276
282
 
283
+ var HalfBack = function HalfBack() {
284
+ return React.createElement(React.Fragment, null, React.createElement("path", {
285
+ fillRule: "evenodd",
286
+ clipRule: "evenodd",
287
+ d: "m15.8384 13.3186-.0174-.0196-.9881-1.1119c.0374-.0406.0735-.0826.1083-.1259.4058-.5044.5992-1.1469.5393-1.7915-.0598-.64458-.3683-1.24053-.8599-1.66162-.4527-.38769-1.028-.60814-1.6206-.60807h-1.8884l-1.33319-1.5H13c.9516-.00008 1.8753.33943 2.6022.96196.7895.67618 1.2847 1.63314 1.3809 2.66823.0961 1.035-.2145 2.0668-.866 2.8768-.0878.1091-.1808.2131-.2787.3116Zm-1.2441.85c-.3479.1512-.7185.2534-1.1015.301l-.1858-1.4976c.0657-.0081.1308-.0188.1951-.0321l1.0922 1.2287ZM9.11111 8.00001l-1.33333-1.5H3.4695l2.08-2.24c.04231-.04545.07788-.09476.10677-.14669l-.9404-1.05796c-.0981.03985-.18931.10115-.26637.18365l-3.25 3.5c-.266.289-.266.734 0 1.021l3.25 3.49999c.149.159.349.24.55.24.183 0 .366-.066.511-.2.304-.282.321-.757.039-1.061l-2.08-2.23899h5.64161Z"
288
+ }), React.createElement("path", {
289
+ d: "m14.366 13.912-.545-.613-2.476-2.786-5.289-5.951-2.028-2.281L2 0H0l2.02756 2.281L16 18h2l-3.634-4.088Z"
290
+ }));
291
+ };
292
+
277
293
  var Home = function Home() {
278
294
  return React.createElement("path", {
279
295
  fillRule: "evenodd",
@@ -523,6 +539,7 @@ var icons = {
523
539
  arrowLeft: ArrowLeft,
524
540
  arrowRight: ArrowRight,
525
541
  sortDown: SortDown,
542
+ back: Back,
526
543
  ban: Ban,
527
544
  barcodeRead: BarcodeRead,
528
545
  bell: Bell,
@@ -543,6 +560,7 @@ var icons = {
543
560
  exclamationCircle: ExclamationCircle,
544
561
  exclamationTriangle: ExclamationTriangle,
545
562
  externalLink: ExternalLink,
563
+ halfBack: HalfBack,
546
564
  home: Home,
547
565
  image: Image,
548
566
  moneyBill: MoneyBill,
@@ -690,7 +708,9 @@ var ButtonComponent = function ButtonComponent(_ref2, ref) {
690
708
  onClick = _ref2.onClick,
691
709
  _ref2$size = _ref2.size,
692
710
  size = _ref2$size === void 0 ? 'default' : _ref2$size,
693
- props = _objectWithoutPropertiesLoose(_ref2, ["children", "loading", "variant", "fullWidth", "icon", "disabled", "className", "onClick", "size"]);
711
+ _ref2$iconPosition = _ref2.iconPosition,
712
+ iconPosition = _ref2$iconPosition === void 0 ? 'right' : _ref2$iconPosition,
713
+ props = _objectWithoutPropertiesLoose(_ref2, ["children", "loading", "variant", "fullWidth", "icon", "disabled", "className", "onClick", "size", "iconPosition"]);
694
714
 
695
715
  var handleClick = function handleClick(event) {
696
716
  (!disabled || !loading) && onClick && onClick(event);
@@ -715,9 +735,13 @@ var ButtonComponent = function ButtonComponent(_ref2, ref) {
715
735
  className: classes,
716
736
  disabled: disabled,
717
737
  onClick: handleClick
718
- }, props), children, currentIcon && React.createElement(Icon, {
738
+ }, props), currentIcon && iconPosition === 'left' && React.createElement(Icon, {
719
739
  icon: currentIcon,
720
- size: 4,
740
+ size: size === 'small' ? 3 : 4,
741
+ className: "mr-2 inline-block"
742
+ }), children, currentIcon && iconPosition === 'right' && React.createElement(Icon, {
743
+ icon: currentIcon,
744
+ size: size === 'small' ? 3 : 4,
721
745
  className: "ml-3 inline-block"
722
746
  }));
723
747
  };
@@ -2889,14 +2913,20 @@ var Breadcrumb = /*#__PURE__*/React.memo(function (_ref) {
2889
2913
  currentTitle = _ref.currentTitle,
2890
2914
  previousTitle = _ref.previousTitle,
2891
2915
  previousHref = _ref.previousHref,
2916
+ _ref$mobileAlign = _ref.mobileAlign,
2917
+ mobileAlign = _ref$mobileAlign === void 0 ? 'left' : _ref$mobileAlign,
2918
+ help = _ref.help,
2919
+ actions = _ref.actions,
2892
2920
  _ref$className = _ref.className,
2893
2921
  className = _ref$className === void 0 ? '' : _ref$className;
2894
2922
  var renderPrevTitle = React.createElement("span", {
2895
- className: "hidden lg:inline"
2923
+ className: "hidden lg:inline truncate"
2896
2924
  }, previousTitle);
2897
2925
  var renderPrevIcon = React.createElement(Icon, {
2898
2926
  icon: "arrowLeft",
2899
- className: "w-4 h-4 inline-flex mr-3 lg:-mt-1"
2927
+ size: 4,
2928
+ className: "inline-flex mr-3 -mt-1",
2929
+ block: true
2900
2930
  });
2901
2931
 
2902
2932
  var renderPrevLink = function renderPrevLink() {
@@ -2923,24 +2953,36 @@ var Breadcrumb = /*#__PURE__*/React.memo(function (_ref) {
2923
2953
 
2924
2954
  return React.createElement("div", {
2925
2955
  "aria-label": "breadcrumbs",
2926
- className: "header-navigation flex flex-wrap items-center justify-between mb-4 lg:mb-7 " + className
2956
+ className: "header-navigation flex items-center justify-between mb-4 lg:mb-7 " + className
2927
2957
  }, React.createElement("div", {
2928
- className: "header-navigation-breadcrumb max-w-full truncate"
2958
+ className: "header-navigation-breadcrumb max-w-full truncate w-full"
2929
2959
  }, React.createElement("div", {
2930
- className: "inline-flex self-center items-center font-semibold tracking-5 text-f5 sm:text-f4 lg:text-f3"
2931
- }, previousTitle && React.createElement("span", {
2932
- className: "header-navigation-previous inline-flex items-center text-on-base-2 text-xl -mr-px"
2933
- }, renderPrevLink(), React.createElement("span", {
2960
+ className: "w-full inline-flex self-center items-center font-semibold tracking-5 text-f5 sm:text-f4 lg:text-f3"
2961
+ }, (previousTitle || previousHref) && React.createElement("span", {
2962
+ className: "header-navigation-previous inline-flex items-center text-on-base-2 text-xl -mr-px truncate"
2963
+ }, renderPrevLink(), previousTitle && React.createElement("span", {
2934
2964
  className: "hidden lg:inline px-2 -ml-px"
2935
2965
  }, " / ")), React.createElement("span", {
2936
- className: "header-navigation-current text-on-base"
2966
+ className: "header-navigation-current text-on-base truncate " + (mobileAlign === 'center' ? 'w-full lg:w-auto text-center lg:text-left' : '')
2937
2967
  }, currentTitle))), React.createElement("div", {
2938
- className: "header-navigation-content flex items-center flex-grow justify-end"
2968
+ className: "header-navigation-content flex shrink-0 max-w-1/2 items-center flex-grow justify-end gap-5 ml-2 whitespace-nowrap"
2939
2969
  }, React.createElement("div", {
2940
2970
  className: "header-navigation-help help flex items-center"
2941
- }), React.createElement("div", {
2942
- className: "header-navigation-actions flex items-center"
2943
- })));
2971
+ }, help && React.createElement("a", {
2972
+ href: help.href,
2973
+ target: "_blank",
2974
+ rel: "noreferrer",
2975
+ className: "flex p-1 pr-0 text-on-base-2 hover:text-on-base duration-200 transition-colors items-center"
2976
+ }, React.createElement(Icon, {
2977
+ icon: "questionCircle",
2978
+ size: 4,
2979
+ className: "shrink-0",
2980
+ block: true
2981
+ }), help.title && React.createElement("span", {
2982
+ className: "text-f6 font-semibold tracking-4 leading-6 ml-2 " + (!help.mobileText ? 'hidden md:inline' : '')
2983
+ }, help.title))), actions && React.createElement("div", {
2984
+ className: "header-navigation-actions flex items-center gap-5"
2985
+ }, actions)));
2944
2986
  });
2945
2987
 
2946
2988
  var PaginationInfoComponent = function PaginationInfoComponent(_ref) {