@loja-integrada/admin-components 0.9.5 → 0.9.6

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.
@@ -3,3 +3,4 @@ import { TabsProps } from './Tabs';
3
3
  declare const _default: Meta<import("@storybook/react").Args>;
4
4
  export default _default;
5
5
  export declare const Default: Story<TabsProps>;
6
+ export declare const WithTabDisabled: Story<TabsProps>;
@@ -10,5 +10,5 @@ interface TabsItemProps extends TabsItemInterface {
10
10
  */
11
11
  onChange: (arg0: string) => void;
12
12
  }
13
- export declare const TabsItem: ({ id, title, active, onChange, }: TabsItemProps) => JSX.Element;
13
+ export declare const TabsItem: ({ id, title, active, disabled, onChange, }: TabsItemProps) => JSX.Element;
14
14
  export {};
@@ -7,6 +7,10 @@ export interface TabsItemInterface {
7
7
  * Item visible title
8
8
  */
9
9
  title: string;
10
+ /**
11
+ * Disabled a specific tab
12
+ */
13
+ disabled?: boolean;
10
14
  /**
11
15
  * Item content
12
16
  * @deprecated Not implemented
@@ -1906,20 +1906,24 @@ var activeStyles = function activeStyles(active) {
1906
1906
 
1907
1907
 
1908
1908
  var boldFixStyle = "before:content-[attr(data-title)] before:block before:font-semibold before:h-0 before:overflow-hidden before:visibility-hidden";
1909
+ var disabledStyle = 'text-inverted-2 cursor-not-allowed';
1909
1910
  var TabsItem = function TabsItem(_ref) {
1910
1911
  var id = _ref.id,
1911
1912
  title = _ref.title,
1912
1913
  _ref$active = _ref.active,
1913
1914
  active = _ref$active === void 0 ? false : _ref$active,
1915
+ _ref$disabled = _ref.disabled,
1916
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
1914
1917
  onChange = _ref.onChange;
1915
1918
  return React__default.createElement("button", {
1916
1919
  id: "btnTab" + id,
1917
- className: "tabs-item " + (active ? 'tabs-item-active' : '') + " group min-w-0 flex-shrink-0 overflow-x-hidden px-2 last:-mr-2 first:-ml-2",
1920
+ className: "tabs-item " + (active ? 'tabs-item-active' : '') + " group min-w-0 flex-shrink-0 overflow-x-hidden px-2 last:-mr-2 first:-ml-2 " + (disabled ? disabledStyle : ''),
1918
1921
  onClick: function onClick() {
1919
1922
  return onChange(id);
1920
- }
1923
+ },
1924
+ disabled: disabled
1921
1925
  }, React__default.createElement("span", {
1922
- className: "block text-f6 tracking-4 text-sm py-4 border-b-4 break-words group-hover:font-semibold " + activeStyles(active) + " " + boldFixStyle,
1926
+ className: "block tracking-4 text-f6 text-sm py-4 border-b-4 break-words " + (disabled ? '' : 'group-hover:font-semibold') + " " + activeStyles(active) + " " + boldFixStyle,
1923
1927
  "data-title": title
1924
1928
  }, title));
1925
1929
  };