@loja-integrada/admin-components 0.12.4 → 0.12.5

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.
@@ -10,7 +10,7 @@ declare const badgeSizes: {
10
10
  default: string;
11
11
  small: string;
12
12
  };
13
- export declare const Badge: React.MemoExoticComponent<({ type, text, size, }: BadgeProps) => JSX.Element>;
13
+ export declare const Badge: React.MemoExoticComponent<({ type, text, size, expanded, }: BadgeProps) => JSX.Element>;
14
14
  export interface BadgeProps {
15
15
  /** Badge color
16
16
  * @default neutral
@@ -24,5 +24,9 @@ export interface BadgeProps {
24
24
  * @default default
25
25
  * */
26
26
  size?: keyof typeof badgeSizes;
27
+ /**
28
+ * Enlarge width of the badge
29
+ * */
30
+ expanded?: boolean;
27
31
  }
28
32
  export {};
@@ -2,4 +2,5 @@ import { BadgeProps } from './Badge';
2
2
  declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
3
3
  export default _default;
4
4
  export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, BadgeProps>;
5
+ export declare const Expanded: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, BadgeProps>;
5
6
  export declare const Small: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, BadgeProps>;
@@ -2434,9 +2434,11 @@ var BadgeComponent = function BadgeComponent(_ref) {
2434
2434
  type = _ref$type === void 0 ? 'neutral' : _ref$type,
2435
2435
  text = _ref.text,
2436
2436
  _ref$size = _ref.size,
2437
- size = _ref$size === void 0 ? 'default' : _ref$size;
2437
+ size = _ref$size === void 0 ? 'default' : _ref$size,
2438
+ _ref$expanded = _ref.expanded,
2439
+ expanded = _ref$expanded === void 0 ? false : _ref$expanded;
2438
2440
  return React__default.createElement("div", {
2439
- className: "badge inline-flex items-center justify-center rounded-full " + badgeTypes[type] + " " + badgeSizes[size]
2441
+ className: "badge items-center justify-center rounded-full " + badgeTypes[type] + " " + badgeSizes[size] + " " + (expanded ? 'flex w-full' : 'inline-flex')
2440
2442
  }, React__default.createElement("span", {
2441
2443
  className: "text-xs tracking-4 font-semibold text-base-1"
2442
2444
  }, text));